Should I pay down mortgage faster or Invest?

I've a appx 450K mortgage left at 2.49% (5 year term with a 25 year mortgage). I've a few options to pay my mortgage faster   Increase principal payment amount once/year Change payment frequency from monthly to weekly / bi-weekly Lump sum payment once/year   My mortgage is going to renew in 1.5 years and I assume my refinancing rate is not going to be more than 3 odd %.  (Currently you can get a 5 year term term / 25 year amortization for 2.69%).    Having said that if there is an extra 200$ every month, Which option would be better for me?   Increase the payment amount by $200 / month Change payment frequency to weekly/bi-weekly Invest the $200 each month and then pay the lump sum amount at certain point in time.   I'm leaning towards #3 because my investments have been growing at a higher % than the loan rate. I'am thinking of investing the $200/month in a Tax free investment account (TFSA) and then pay a lump sum if refinancing mortgage ever goes higher than 3.5%.  If it does not happen during the refinancing date (every 5 years), then keep investing in the TFSA.  Am I right in assuming that this is correct for me?  FYI: I do not have any other form of debt. The $200 is the extra amount I have after moving some $$$ into my TFSA (Tax Free Investment) and RRSP (Retirement plan) accounts.


This is a simple question but I cant seem to find a concrete definition.  What is the meaning of a time series "season"?  Quoting from  blog on determining the period of a season, "...the “frequency” is the number of observations per season."


in a file how could I select line where there is :  Value_1 and Name_species   I should get for instance:  Value_1:(O)_content_:Name_species    I tried   grep "Value_1:*:Name_species" file    but it does not work...


How to check if a given PPA or repository is available

I am working on generating some auto install scripts that would work on different versions of Ubuntu. Therefore, I try to keep the add-apt-repository statements generic as seen below.  add-apt-repository -y "deb http://archive.canonical.com/ $(lsb_release -sc) partner"   add-apt-repository -y ppa:graphics-drivers   However, as some repos don't exist for certain versions, auto generated urls might lead to errors like below.  Err:22 http://ppa.launchpad.net/wireshark-dev/stable/ubuntu disco Release     404  Not Found [IP: 91.189.95.83 80]  E: The repository 'http://ppa.launchpad.net/wireshark-dev/stable/ubuntu disco Release' does not have a Release file. N: Updating from such a repository can't be done securely, an is therefore disabled by default.   I know that this can't be kept 100% flexible across all versions without keeping ubuntu version vs package repo lookup tables/if-else statements. However, for my simple purposes, it is enough to know if any given url/ppa is valid or not.  So, is there a way to test this without adding the url/ppa and seeing it to fail on next apt update?  Update:  As pointed out,  is closely related to mine but my aim is to check the validity before adding to the sources list, also, both for PPAs and repo urls. So, I've come up with the scripts below which possibly can be improved but also seem to do the job.  function add_ppa() {   local __ppa_name   for __ppa_name in "$@"; do     grep -h "^deb.*$__ppa_name" /etc/apt/sources.list.d/* > /dev/null 2>&1     if [ "$?" != "0" ]     then         local __ppa_prefix=$(echo $__ppa_name | cut -d"/" -f1)         local __ppa_suffix=${__ppa_name##*/}         curl -fsSL https://launchpad.net/~"$__ppa_prefix"/+archive/ubuntu/"$__ppa_suffix" &>/dev/stdout | grep "\"`lsb_release -sc`\"" -m1 >/dev/null 2>&1         if [ "$?" == "0" ]; then              echo "Adding ppa:$__ppa_name"             sudo add-apt-repository -y ppa:$__ppa_name         fi     fi   done }  function add_to_sources_list() {     local __repo_base_link="$1"     local __flavour="$2"     local __version_name=`lsb_release -sc`     local __repo_link="deb $__repo_base_link $__version_name $__flavour"      grep -h "^$__repo_link" /etc/apt/sources.list > /dev/null 2>&1     if [ "$?" != "0" ]     then         echo "Adding $__repo_link"         curl -fsSL "${__repo_base_link}/dists/${__version_name}/Release" >/dev/null 2>&1         if [ "$?" == "0" ]; then              echo "Adding repo:$__repo_link"             sudo add-apt-repository -y "$__repo_link"         fi           fi }  # example use add_ppa "wireshark-dev/stable" add_to_sources_list "http://gb.archive.ubuntu.com/ubuntu/" "multiverse"


How to send kill signal to java process running on server?

I have some Java code running on server in infinite loop. Currently I am using "kill -9 process_id" to stop process. But kill command forcefully stop Java process without cleaning resource.   I want to implement signal handler in Java just like C++ so that I can clean all resource and gracefully stop Java process.   Can anyone please suggest me the right way to do this?


Multivariate Gaussian distribution explanation needed

I am pretty new in statistics. I Googled the multivariate Gaussian distribution, but still have no idea how to solve this.    I tried to make $\mu_{x} \rightarrow  a\mu_{x} \ and\, \mu_{y} \rightarrow  b\mu_{y}$, is this the answer?  $\left ( X,Y \right )\sim N(\mu,\sum )\\ \mu =\begin{bmatrix} \mu _{x} \\ \mu _{y} \end{bmatrix}  \ and \,  \sum= \begin{bmatrix}  a^{2}\mu_{x}^{2}& abCOV[X,Y]\\  abCOV[X,Y]& b^{2}\mu_{y}^{2} \end{bmatrix}$


Why is the singularity of the Big Bang not considered to be the center of the Universe?

If the universe is expanding, then at some time in the past, it must have started from a single point but why this point is not the center of the Universe. Just like the singularity of black holes is its center?


CaseComment and CaseHistory relatedlist in visualforce page

I want to add CaseComment and CaseHistory related list to my visualforce page.   <apex:relatedList list=" " />  What should be the value for List attribute in the code defined above. When I added   <apex:relatedList list="CaseHistory" /> 'Histories' is also not working   <apex:relatedList list="CaseComment" /> 'CaseComments' is also not working  I get errors saying they are not valid child relationship name for entity Case.  Please help me out on this issue.


Last year I had a little extra and decided to try my hand at penny stocks. I spent the $200 on shares in 5 different companies trading for under $1 a share, ranging from $20-$80 total per company. I thought I fully understood the risks (worst case and honestly most likely scenario, the companies would declare bankruptcy and I'd lose my investment) Unfortunately, one did go bankrupt (DNR), but instead of just losing the $40 worth of shares I bought, I was also charged a $38 "Mandatory Reorganization Fee", which basically doubled the loss for that investment. I searched and saw other posts here talking about a reorg fee for a reverse split (which one of my other investments also had) but I hadn't seen anything about a fee for when a company goes bankrupt. Is it typical to be charged this fee if a company goes bankrupt? If so, I could be out double my initial investment, or more if the companies do one or more reverse splits and still go bankrupt.


Title sums it up: can you remarry if your spouse is dead?


I am a creator of a flash game server. I use cloudflare for my site, however the game tcp server cant be protected by CloudFlare. For about 2 months some person DDoSes my game using direct ip. Every VPS/Dedicated server provider instantly null routes my server ip and suspends server. I have no idea what to do. The attack probably comes from a botnet. Its about 2.5 gbps.


Meaning of MATLAB logistic regression coeficients

Suppose that I'm using this function to implement logistic regression in MATLAB R2015a:  [coefs,~,stats] = glmfit(TrainInputs,TrainTargets,'binomial','logit'); % Logistic regression   I have ten continues inputs and a binary output (1 and 0). This is the coefs output of above function:  coefs =  2.04869088486007 -4.66230054501349 0.355690380077187 -1.87230109681715 6.85763253382301 3.46437006313075 -0.282766819896174 -1.08763387246821 -1.94250600133904 1.46621342829667 -2.83661766065114   What is meaning of the coefs in logistic regression of MATLAB? Suppose that input names are X1 to X10. If we have 1 % increase in X1, We have -4.66% increase in probability of being class 1?


How to programmatically logout idle users on Windows Server 2012 R2?

I've searched a lot but couldn't find a direct solution. Can anyone tell me how to logoff idle users from a remote desktop connection to a Windows Server 2012 server after a period of time?  These are Windows 7 clients.


Is it possible to hook a function every time an api attribute has been changed?

I have built a custom inputSelect component:   <template>     <div class="slds-select_container">         <select class="slds-select select-input" data-rea={reatag}>             <option value="">None</option>             <template for:each={options} for:item="optionstr">                 <option value={optionstr} key={optionstr}>{optionstr}</option>             </template>                     </select>     </div> </template>   Javascript:  import { LightningElement, api } from 'lwc';  export default class ReaInputSelect extends LightningElement {     @api value;     @api options;     @api reatag;      renderedCallback() {         let curSelect = this.template.querySelector(".select-input");         if(this.value) {             curSelect.value = this.value;         }     }      @api getSelectValue() {         let curSelect = this.template.querySelector(".select-input");         return curSelect.value;     } }   It works okay. But the problem with this one is: when the value passed through @api is changed, it doesn't rerender. The reason is pretty obvious since it only sets the value during renderedCallback() time.   I tried to find a lifecycle hook in this page:  . But it doesn't seem to be a hook for the changing event of @api attributes.   How should I resolve this?


I have a String that contains method names with arguments.I wanna execute all methods.How can I do that.Consider following input -  String s="second(first(\"string1\"))";   where first(String s) and second(String s) are two method in my class.  Note that when I change Strings s=second(first("string1")); manually,its working fine, I'm looking for some dynamic approach to do same.  (If possible then without reflection).


Dynamically Pass attributes to SAML from Lightning Component/VF Page

I have a use case where a user clicks the SSO link on a case record or account record and it should pass some Case/Account fields based on the current record information to the SAML response. In other words, I want to append SAML parameters with Case.eID__c for example. That way, the remote report would display only information relevant to the current account the user is viewing.  I tried many approaches, read many forum posts with no success.  I tried customAttributes method on the Auth.ConnectedAppPlugin class (extending the class and overrding the method), like described in this documentation: ConnectedAppPlugin Class. It works but I am not able to query those values to customAttributes method as I need to pass the current record's ID to the method. So I want help in figuring out as to how I can pass that ID.  The custom attributes that we can add declaratively to the connected app are not helpful in my case, they only get information about the environment or the current user


Prove that if $x^TAx = 0 \Rightarrow Ax = 0$

A is $n \times n$ symmetric and positive semidefinite. So we can use $A^T = A$ and $x^TAx \geq 0$ for all x $\in \mathbb{R}^n$. Proof by contradiction comes to mind, or $x^TAx = 0 \; \land \; Ax \neq 0$. This might seem like a given at first but I'm thinking what if there is some linear dependence between $x^T$ and the $Ax$ vector? Edit: Ideally, I'm supposed to prove this using the rank of a matrix. If I were to prove it by contradiction, $x^TAx = 0 \; \land \; Ax \neq 0$, I'd start off by saying that:  $x$ cannot be a zero vector in this case. The original statement $x^TAx = 0 \Rightarrow Ax = 0$ is trivial for a zero $x$ vector and needs no proof. from $Ax \neq 0$ we have $rank(Ax) = 1$ since $Ax$ is also a non-zero vector. problem: how to show that the $x^T$ vector and the $Ax$ vector cannot be orthogonal? (this would be the point of the contradiction proof) problem 2: the only idea I have for a proof barely utilizes the rank of a matrix, which is my assignment.


My laptop Lenovo z50-70 with Ubuntu 14.04 has wifi issue.  Wifi gets connected after restarting the laptop. But after sometimes it stops functioning though the wifi icon shows proper connected status. After getting disconnected, it never reconnects before I restart the laptop.  uname -a     Linux  Lenovo-Z50-70 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


Migrating from Skype 4.2 to 4.3 on Ubuntu

I have a lot of history in Skype v 4.2, but now it is deprecated cause of "cloud" conversations in new Skype versions. Now I installed Skype 4.3.0.37-1 on Ubuntu 14.04 (and my co-worker on his Debian 7) and I wondered I loss all history before 20th may 2014. How can I to integrate old history (I backuped ~/.Skype folder) to new Skype?


The following verbatim section:  \begin{verbatim} $ curl -i -G  -X POST \         'http://localhost:8888/deploy' \        --data-urlencode 'name=z' \        --data-urlencode 'code=function f(event, callback){callback(null, 3)}' {"newFile":"functions/z.js"}% \end{verbatim}   Is displayed as:    Note that the quotes around 'http://localhost:8888/deploy' and all other single-quoted texts are converted to ’http://localhost:8888/deploy’, which of course breaks the code when it is copy-pasted to a terminal, editor or IDE.  Is there a way to tell verbatim to use the exact characters of the source, without prettifying any characters?


How to add events to newly added elements?

When you start an HTML page you start with a certain set of elements. The user can then obviously add new elements to the page and those changes can immediately be viewed. One problem I have noticed though is that javascript/jquery isn't able to see these newly added elements, it is as though it can only see the elements that were present when the page was loaded (so the elements in the HTML page). Therefore you can't add any events to those new elements.  $('#old_element').on('click', function() {  var frag = $('

')  $('#old_element').append(frag); })  $('.new_element').on('click', function() { $(this).hide(); })   Here you can see an example I made.   I couldn't find any place that had an answer for this, so does anyone here have any?


I accidentally chown'd /usr/lib... what do I do now?

I made a terrible mistake. I realized it right after I did it, but now it is too late.  I ran this command:  sudo chown -R $USER /usr/lib   and I tried to fix it with:  sudo chown -R root /usr/lib   but I get this error:  sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy" sudo: /usr/lib/sudo/sudoers.so must be owned by uid 0 sudo: fatal error, unable to load plugins   I tried to log in as root with:  su   but authentication failed every time. I'm 99% sure I have my password right.  I figured I owned the files now, so I also tried:  chown -R root /usr/lib   But the operation fails. I get what appears to be a long list of an the same error for changing the permission of every file. Each line looks like this:  chown: changing ownership of 'lib': Operation not permitted   Is there anything I can do to save myself?


move file by list in file (with leading whitespace)

I have a file that contains file names. For example:  /tmp/list.txt (it is with the spaces at the start of each line):     /tmp/file.log   /app/nir/home.txt   /etc/config.cust   I want, using one line, to move all the files listed in /tmp/list.txt to /app/dest  So it should be something like this:  cat /tmp/list.txt | xargs mv /app/dest/


About passing instances of objects to other classes

Let's say I have two classes. Class1 and Class2.  The constructor of Class2 looks like this:  public Class2{  Class1 c;      public Class2(Class1 c){         this.c = c;     }  }   When creating an instance of Class2 inside the code of Class1, we pass the existing instance of Class1 to Class2. This is from Class1:  Class2 c2 = new Class2(this);   Inside Class2, I want to manipulate the variables inside the instance of Class1 that's been passed to Class2.  My question is:  If I make changes to the c (the instance of Class1 that's been passed to Class2), am I affecting the original instance of Class1, or just a copy?


Although I have been visiting the Stack Overflow site for the past 20 days, until 18 day ago the Consecutive Days were shown properly but suddenly the next day it became 1 Day Consecutive.  Is there a bug with Consecutive Days counting? What can we do about it?


How do I run a script on startup as superuser?

I want to run a command on startup on my Ubuntu Server. Does anyone know how to do this? Does /etc/rc.local run as superuser? Any help will be appreciated. Thanks!


Can a tetrahedron lying completely inside another tetrahedron have a larger sum of edge lengths?

Find 2 tetrahedrons $ABCD$ and $EFGH$ such that   $EFGH$ lies completely inside $ABCD$. The sum of edge lengths of $EFGH$ is strictly greater than the sum of edge lengths of $ABCD$.   I am completely stumped on this. Seems very counter intuitive to begin. I now have doubts if a solution exists or not.  Source :


C++ symbol(s) not found for architecture x86_64 in xCode

I'm trying to implement template for stack however error occurred when compiling.  This is my Stack.h file  const int MAX_STACK = 2;  enum STATE { OK = 0, STACK_FULL, STACK_EMPTY };  template <class T> class Stack { public:     Stack();      void Clear();     int Push(T x);     int Pop(T * w);     int StackState();  private:     T t[MAX_STACK];     int top; };   and my Stack.cpp file  #include "Stack.h"  template<class T> Stack<T>::Stack(): top(0) {}  template<class T> void Stack<T>::Clear() {     top = 0; }  template<class T> int Stack<T>::Push(T x) {     if (top < MAX_STACK)     {         t[top++] = x;         return OK;     }     else     {         return STACK_FULL;     } }  template<class T> int Stack<T>::Pop(T * w) {     if (top > 0)     {         *w = t[--top];         return OK;     }     else     {         return STACK_EMPTY;     } }  template<class T> int Stack<T>::StackState() {     switch (top)     {         case 0:             return STACK_EMPTY;         case MAX_STACK:             return STACK_FULL;         default:             return OK;     } }   Test program in Main.cpp  #include <iostream> #include "Stack.h"  int main() {     Stack<char *> stack;      char tab[3] = { 'V', 'E', 'R' };      std::cout << "Inserting into stack:\n";      for (int i = 0; i < 3; i++)     {         if (stack.StackState() != STACK_FULL)         {             std::cout << "Trying to insert " << tab[i] << ",\n";             stack.Push(&tab[i]);         }         else         {             std::cout << "Stack is full!\n";             break;         }     }      std::cout << "\n\nDeleting items from stack: ";      for (int i = 0; i < 3; i++)     {         char ** z;          if (stack.Pop(z) == OK)         {             std::cout << "Deletion successful: " << **z << "\n";         }     }      return 0; }   However getting this error  Undefined symbols for architecture x86_64:   "Stack<char*>::StackState()", referenced from:       _main in main.o   "Stack<char*>::Pop(char**)", referenced from:       _main in main.o   "Stack<char*>::Push(char*)", referenced from:       _main in main.o   "Stack<char*>::Stack()", referenced from:       _main in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)   Thank you for ideas.


Enable automatic deletion of old, unanswered, zero-score questions after a year?

Related to Meta Super User efforts:  and Meta Server Fault efforts:  We already auto-remove negatively voted unanswered old questions automatically after 30 days, network wide, with no human intervention required. I was thinking we might extend that to remove old, unanswered zero score questions... based on the following criteria:  fewer than (question age in days * 1.5) views 0 score or lower, or 1 score or lower if the original author is deleted no answers 1 comment or fewer asked more than 1 year ago (thus based on creation date, not last activity date, so , or a user editing it, does not give a doomed question 365 more days of zombie "life")  See the results of this query on:  (10509) |  (787) |  (650) This query has been refined based on the comments, and this is the final version that will roll out tonight. Every site in the network (except metas) will automatically delete old questions that meet this criteria from this point forward.


How can we write  (an 'm') and  in TeX format?


I just noticed  that got bumped up recently on RPG SE. The editor was trying to replace a formerly MathJax-based table with one in Markdown, which is fine. But the table isn't working at all. So, I hit Edit, and the live preview has the table just fine. Clearly, the server-side Markdown renderer and the client-side one for live preview, aren't matching up here. For reference, here's the same exact table:  ...blahblah |Magic Item Ingredients || |---|---| |Item Rarity | CR Range | |Common | 1—3 | |Uncommon | 4—8 | |Rare | 9—12 | |Very rare | 13—18 | |Legendary | 19+ |  I can confirm that the table above looks perfectly fine in the preview prior to submitting this report. And after posting, it worked fine, until I added actual text in the blockquote, before the table, so that apparently has something to do with it. Even if this broken table is okay, the two different renderers should probably be built to agree on the results, so people don't post things that look good in the preview, but are broken when actually displayed.


Is it acceptable style to mix equalities and inequalities in one line

Is this considered bad style  $$2 = \sqrt{4} < \sqrt{16} = 4?$$  It seems as though this is not strictly correct, since $2 = \sqrt{4}$ is a logical proposition which represents boolean value (true or false). A boolean value cannot be less than $\sqrt{16}$.  On the other hand, I am sure that most people will correctly interpret this as shorthand for $2 = \sqrt{4},$ $\sqrt{4} < \sqrt{16},$ and $\sqrt{16} = 4$


Why isn't COVID-19 just called SARS-2? Isn't it a second SARS?

. We now have a second disease caused by a second coronavirus, which we call SARS-CoV-2. So why is the disease named COVID-19 now, instead of SARS-2 (or SARS-19 if you wanted the year)?


Version Control for Designers / Alternative to Version Cue

I've just been searching around the net for version control that has some support for graphic/Photoshop files. We're currently using BitBucket which is free and unlimited when it comes to file size but doesn't have any design review tools.  Here's what I've found. Does anyone else have any recommendations?  Pixelapse – Free/Beta, works well. Now has layer comp support.   Shipment – Private Beta (waiting for an invite)   LayerVault (out of business) – Windows/Mac, has layer comp support   PixelNovel – SVN Version control for Photoshop   CAD only?! But looks really good.   FileTrek – Very enterprise. No price or demo.   Kaleidoscopeapp – GIT with image compare   Apps that copy files with an incremented version


I am conducting separate regression models for two of my hypotheses. If I spot outliers in one case of conducting the regression model can I then bring them back for my second? Or do these outliers have to be removed from the dataset completely?


Prove that if $3|a^2+b^2\Rightarrow 3|a ,\, 3|b$

How do i prove that if $$3|a^2+b^2\Rightarrow  3|a ,\, 3|b \,?$$ The book (Problem-Solving Strategies by Arthur Engels, page 43, E9) does not prove this theorem and leaves it as an excercise. I'm relatively new to this kind of problems and I just can't get any ideas. If anyone could prove that or, even better, just give me some hints it would be great. Thanks for your time


Many times I heard people say that "beat up someone". But on the internet, I can only found this definition which does not seem matching with the word beat up in the above sentence  "beat-up:(of a thing) worn out by overuse; in a state of disrepair."   So, what does the preposition "up" mean in "He got beaten up by other kids in school"?  Note: "beat" means "strike repeatedly" & "beat up" also means "strike repeatedly". So, "up" should have a certain meaning and what is the difference between "beat" and "beat up"?


Vertical Spacing Between Figure Names from Different Chapters in Table of Figures

I'm using the chngcntr package to prevent the figure numbering from restarting, in my scrreprt. Take a look at the following code:  \usepackage{chngcntr} \counterwithout{figure}{chapter} \counterwithout{table}{chapter} \counterwithout{footnote}{chapter}   Although the numbering is not interrupted, at times, I get a little vertical space in the Table of Figures between the references, which again plays the role of a divisor between figures coming from different chapters. Is there a way to get rid of it?  In my .lof file for the Table of Figures, those lines happen to be the cause of this vertical space:  \addvspace {10\p@ } \defcounter {refsection}{0}\relax \addvspace {10\p@ }   EDIT: A sample code to illustrate what I mean:  \documentclass[a4paper,fontsize=11pt,oneside,parskip=half]{scrreprt}   \usepackage[demo]{graphicx}  \usepackage{scrhack}   \usepackage{chngcntr} \counterwithout{figure}{chapter} \counterwithout{table}{chapter} \counterwithout{footnote}{chapter}  \begin{document}  \listoffigures   \clearpage  \chapter{Chapter}  \begin{figure}[htb] \includegraphics{image} \caption{First Figure} \label{fig1} \end{figure} \begin{figure}[htb] \includegraphics{image} \caption{First Figure} \label{fig2} \end{figure} \chapter{Chapter} \begin{figure}[htb] \includegraphics{image} \caption{First Figure} \label{fig3} \end{figure} \begin{figure}[htb] \includegraphics{image} \caption{First Figure} \label{fig4} \end{figure}  \chapter{Chapter} \begin{figure}[htb] \includegraphics{image} \caption{First Figure} \label{fig5} \end{figure} \begin{figure}[htb] \includegraphics{image} \caption{First Figure} \label{fig6} \end{figure}  \end{document}


This screen pops up when while trying to install Ubuntu. I'm not trying to dual boot.  0.219073] Ignoring BGRT: invalid status 0 (expected 1) 4.609665] ACPI PCC probe failed.  4.768952] nouveau E[     DRM] failed to initialise sync subsystem, -38


Don't change the cursor position when scrolling in Emacs

Is there a way to stop Emacs from automatically moving my text-cursor position (aka, point) while I'm scrolling? I keep losing my location and marks with this annoying behavior.  I tested the following suggestion, with no success:  (setq scroll-preserve-screen-position t scroll-conservatively 0)   (I'm running Emacs 24.2 on Ubuntu and on OS X.)


I'm new to Blender. I've been trying to follow BlenderGuru's donut tutorial but I can't seem to add sprinkles. The particles are stuck inside the icing and I'm not sure how to get them on the surface.


Ubuntu keeps messing with audio output settings - how to completely remove hdmi / displayport options

Ubuntu (20.04) just keeps changing my audio-output config. I need this pc for work and i need to use my headset for calls and so on. Everytime after a reboot everything is f*** up again and some programs would use the headset, others use the hdmi output. If i change the output via the settings, it does not have an effect, the hdmi output is still used. I have an amd graphics card (Radeon R9 380). Please tell me - how can i disable specific audio interfaces? I only need the line-out and the front-panel line-out - all other options (hdmi/displayport) simply need to go! I tried pavucontrol to disable some interfaces, it does work sometimes but will always be reset after some time. This is really annoying!


Return mutiple values as single result separated by commas

I have a list of employees (EmployeeID, EmployeeName, etc) I have a list of Projects (ProjectID, ProjectName, etc) This is a many to many relationship - a project can have many employees working on it and an employee can be working on many projects.  This much is okay. Currently I've done  SELECT Employee.EmployeeID, ProjectEmployee.ProjectID FROM Employee LEFT JOIN ProjectEmployee ON Employee.EmployeeID = ProjectEmployee.EmployeeID LEFT JOIN Projects ON ProjectEmployee.ProjectID = Projects.ProjectID   This currently returns all employees whether or not they are assigned to a project. If they are assigned to multiple projects, their ID appears in column 1, twice.  e.g.  EmployeeID  ProjectID 1           NULL 2           1 3           1 4           1 4           2 5           1 6           2 7           2   I don't know if it's possible but I'd like it to list all employees once in column one. If they are assigned to multiple projects, list all the projects in a single field in column 2 e.g.  EmployeeID  ProjectID 1           NULL 2           1 3           1 4           1,2 5           1 6           2 7           2   Thanks in advance for any advice!


How to use the array modifier with imperial units

Pretty new to Blender, I'm trying to learn how to make a studded wall.  How do I use the array modifier to use imperial units? For example, I would like to create a stud, and have them spaced 16 inches on center a set distance.  Thank you much!  Edit I've accepted the below answer, however, I had another issue I had to fix. The culprit was that when I scaled the initial object, I didn't apply the scale. Because I didn't apply the scale before the modifier, it wasn't working as expcted. Thank you much to  for helping me through this issue!


Find all functions $f: \mathbb Z \to \mathbb Z$ such that $f(x+y)=f(x)+f(y)$

Let $x=0\,\, f(x+y)=f(0+y)$ every $y \in \mathbb{Z}$ So we get $f(0)+f(y)=f(y)$ then $f(0)=0$  $0=f(0)=f(x(-x))=f(x)+f(-x)=0$ Let $f(1)=k$ for some $k \in \mathbb{Z}$ $f(n)=f(1+1+1+...+1) (n \text{ many } 1)$           $=f(1)+f(1)+...+f(1) (n \text{ many } f(1))$           $=n\cdot k$  Thus $f: \mathbb{Z} \to \mathbb{Z}$ a function such that $f(n)=nk$ I found this but I must also show that there is no other function which satisfies $f(x+y)=f(x)+f(y)$ and I am stuck can somebody help me.


Java supports pass by value (always works on a copy) but when you pass a user defined object then it changes the actual object (kind of pass by reference but no pointer changes), which I understand but why the changeObject2CLEAR method below is actually changing the value of the object ? Instead it has to work on the copy?      import java.util.HashMap; import java.util.Map;  public class PassBy {      class CustomBean {         public CustomBean() {          }          private int id;         private String name;          public int getId() {             return id;         }         public void setId(int id) {             this.id = id;         }         public String getName() {             return name;         }         public void setName(String name) {             this.name = name;         }             @Override         public String toString() {             return id + ", " + name;         }     }      public Map<Integer, String> changeObject2NULL (Map<Integer, String> m) {         m = null;         return m;     }      public Map<Integer, String> changeObject2CLEAR (Map<Integer, String> m) {         m.clear();         return m;     }      public CustomBean changeCustomObject (CustomBean _e) {          _e.setId(_e.getId() + 1);         return _e;     }      public static void main(String[] args) {      PassBy passby = new PassBy();      Map<Integer, String> map = new HashMap<Integer, String>();     map.put(1, "value");      CustomBean bean = passby.new CustomBean();     bean.setId(1);     bean.setName("arun");      // Initial Value     System.out.println(map.toString());     System.out.println(bean.toString());     System.out.println("-------------------------");      // Pass by value works fine     passby.changeObject2NULL(map);     passby.changeCustomObject(bean);      // Custom object value changes since we pass as the object reference but Map remains with actual value     System.out.println(map.toString());     System.out.println(bean.toString());     System.out.println("-------------------------");      // Testing Pass by value - CANT UNDERSTAND why it changed the object since it has to be pass-by-value and not by ref in this case ??     // Why setting to null not chainging the value but clear does ?     passby.changeObject2CLEAR(map);     System.out.println(map.toString());      } }


Can a battleship float in a tiny amount of water?

Given a battleship, suppose we construct a tub with exactly the same shape as the hull of the battleship, but 3 cm larger. We fill the tub with just enough water to equal the volume of space between the hull and the tub. Now, we very carefully lower the battleship into the tub.  Does the battleship float in the tub?   I tried it with two large glass bowls, and the inner bowl seemed to float. But if the battleship floats, doesn't this contradict what we learned in school?  says "Any floating object displaces its own weight of fluid." Surely the battleship weighs far more than the small amount of water that it would displace in the tub.  Note:  I originally specified the tub to be just 1 mm larger in every direction, but I figured you would probably tell me when a layer of fluid becomes so thin, buoyancy is overtaken by surface tension, cohesion, adhesion, , or whatever.  I wanted this to be a question about buoyancy alone.


Find two pairs where neither is the case ⟨x1,y1⟩⪯⟨x2,y2⟩, ⟨x1,y1⟩⪰⟨x2,y2⟩.

can you help me find any two pairs where neither ⟨x1,y1⟩⪯⟨x2,y2⟩,  ⟨x1,y1⟩⪰⟨x2,y2⟩. Neither should be the case.


Can't Pass MultipartFile through Ajax JAVA

I'm trying to send a file from my jsp to controller via ajax, im getting EXCEPTION:Null Error, below is my code:  Controller:  @RequestMapping(value = "/schedulebatch",method =  RequestMethod.POST,params="insertData") public @ResponseBody String addBatch(@RequestParam( @RequestParam(value="upfile",required=false) MultipartFile upfile) throws  Exception {  if(!upfile.isEmpty()){                     System.out.println("test1");}   View:      $("#submit-btn").click(function(){      var upfile = document.getElementById('upfile').enctypeVIEW;     alert('test');  if(batchname==null || fromdate == null || partners == null || interval ==      null){   $('#insertmodalalert').empty();      $('#insertmodalalert').append('
NOTICE | Please fill out the required form.
');      $('#alertMod').modal();      $('#okbtn').click(function(){       window.location.reload(true);      });  }  else{      $.ajax({        type: "POST",    url: "schedulebatch?insertData",    data: {"upfile" : upfile},                         success: function(response){       // alert('test');             $('#insertmodalalert').empty();             $('#insertmodalalert').append('
NOTICE | '+response+'
');             $('#alertMod').modal();             $('#okbtn').click(function(){              $('#alertMod').modal('hide');              window.location.reload(true);             });            },                       error: function(xhr, status, error) {                              var err = eval("(" + xhr.responseText + ")");             // alert('test');               // Display the specific error raised by the server      (e.g. not a               //   valid value for Int32, or attempted to divide by      zero).               $('#insertmodalalert').append('
NOTICE | '+err.Message+'
');              $('#activateMod').modal();                            $('#okbtn').click(function(){               $('#alertMod').modal('hide');               window.location.reload(true);              });            }             });   //alert("Test");  }     HTML:     File to upload: <input class="form-control" type="file" name="upfile"      accept=".csv" id="upfile"> <button type="submit" class="btn btn-success" id="submit-     btn">Submit</button>     I narrowed down the code to the only thing that gives me error, thanks in advance. It gets the Multipart file successfully but im not sure why it gives a null exception error


apt-get remove messages (triggers for shared-mime-info): Unknown media type in type '...'

I uninstalled quite a few programs today and in every removal there are the following messages on terminal. What are they supposed to mean? Is something to be fixed?    I have seen that there are similar questions but they are outdated. My question's point is to see if there is currently a way to fix it, so if someone wants to vote to close this one I would advice them against it.


Access nested class of template specialization

template<class T> class CData{ public:     T::Buffer GetBuffer() = 0; }  class CAudio : public CData<CAudio>{ public:     struct Buffer{}; }   How can I implement a functionality like this?  This throws: error C2061: syntax error: identifier 'BuffData' error C2334: unexpected token(s) preceding '{'; skipping apparent function body error C2039: 'BuffData': is not a member of 'CAudio'


How to find points of tangency on an ellipse?

The problem I have to solve is:     If tangent lines to ellipse $9x^2+4y^2=36$ intersect the y-axis at point $(0,6)$, find the points of tangency.


when trying to create a list and including a code-block in one of the points, either you can't properly format the codeblock as such, or you reset the numbered list counter.  imagine following scenario:   Some explanation or reasoning adding a language declaration to make the codeblock render     here comes the codeblock    Second point in chain of reasoning


I created a small model of a building, then tried to add some color. But when I apply the color the "entire" model is affected instead of just the highlighted area of the model. I want to use multiple colors on that model. Different color depending on the model section/area. I can't get this done.  Not sure if this will help. Last attempt. Clicked "Edit Mode". (next option) Textures. then scrolled to the circle icon right of the triangle. Tried using color from the "Diffuse" and "Specular" sections.


What is next step? I can boot from CD bot not from disk

I just installed ubuntu-14.04.2 on my HP elitebook 8440p laptop. I set it for dual boot with windows 7. I set up a 100GB partition for Ubuntu. The laptop has 8GB of RAM and intel core i7 processor. I can bring up Ubuntu when I boot from CD. I can still boot Windows 7. When I try booting up Ubuntu from disk I can see the disk light flashing for a while and my screen goes from completely dark to "slightly lit" but I never get to an Ubuntu login screen. What would be the next step to diagnose/fix this problem?


Show that if a positive integer $ n $ is composite then $ R(n) = \frac{10^{n}-1}{9}= 111...11 (n times) $ is composite

Show that if a positive integer $ n $ is composite then $ R(n) = \frac{10^{n}-1}{9}= \underset{n\text{ times}}{\underbrace{111...11}}  $ is composite  I attempted a both a normal proof and proof by contradiction by trying:  $ n = ak $  show if $ ak\equiv 0 \mod a $ then $ (10^{ak}-1) \equiv 0\mod (10^a-1) $  I reached a point where I began to go around in cirlces. Maybe I'm going down the wrong track. Any ideas ?


Error: Illegal Parameter number in definition of \iterate

I'm using beamer class and I want to add a figure to my slides, however I keep getting this error :       ! Illegal parameter number in definition of \iterate.      <to be read again>                 1       l.229 \end{frame}           ?   This is my code :  \begin{frame}  \begin{figure}  \centering  \begin{tikzpicture}[   node distance = 0pt,   shorten <>/.style = {shorten <=#1, shorten >=#1},   start chain = going right,    box/.style = {shape=rectangle, draw, fill=#1,             minimum width=6mm, minimum height=9mm, outer sep=0pt,             node contents={},             on chain},    box/.default = none,     arrow/.style = {draw=blue!60!black, thick, shorten <>=1mm,              out=90, in=90, looseness=3,             -{Straight Barb[bend]}},      arbox/.style = {inner sep=0pt, minimum size=5pt},   %crbox/.style = {inner sep=0pt,           %  node contents={\scriptsize\color{red}$\boldsymbol{\times}$}            % },     label distance = -3pt,      sx/.style = {xshift=#1pt}                     ]    \node (n0) [box,dashed];       \foreach \i in {1,2,3}           \ifnum\i<1               \node (n\i) [box]                   \else               \node (n\i) [box=gray!25]             \fi;            \node (n14) [box,dashed];  \draw[ultra thick,dotted,shorten <=1mm]  (n0)  -- + (-9mm,0mm); \draw[ultra thick,dotted,shorten <=1mm]  (n14) -- + (+9mm,0mm);    %\fill[black!75]      \end{tikzpicture}        \end{figure}        \end{frame}   I don't know exactly why figures inside a frame make a problem ? I would appreciate it if anyone could help me with that.


There are two separate users with separate Gmail accounts on this computer. However, now that my brother has signed up for Gmail, he is the only one who can sign into an account on the computer. It automatically comes up with his address and won't let me switch to mine. I am effectively locked out of my account.


What is the best way to compare objects in JavaScript?  Example:  var user1 = {name : "nerd", org: "dev"}; var user2 = {name : "nerd", org: "dev"}; var eq = user1 == user2; alert(eq); // gives false   I know that two objects are equal if they refer to the exact same object, but is there a way to check if they have the same attributes' values?  The following way works for me, but is it the only possibility?  var eq = Object.toJSON(user1) == Object.toJSON(user2); alert(eq); // gives true


Is there a way of getting an 'n' value in the while conditional without resorting to plugging in a number like a 3?

The code works. I am asking, what is one method in having a variable instead of a '3' in the while conditional. I learned that these should be variables and not a plugged in number. How can I get an 'n' value instead of a '3' in there. Typically, this value is the total number of a particular category. In this case, the category is entries of floating points. In 'C' language, I believe the usage of '#define VARIABLE_NAME value' is used. import java.util.Scanner;   public class Measurement {       public static void main(String[] args) {         int first, second, third;         double[] arr = new double[2];         int count;         count = 0;          System.out.println("Enter three values: \n");          Scanner val = new Scanner(System.in);         while(count < 3) {             arr[count] = val.nextFloat();             ++count;         }          if(arr[0] > arr[1] && arr[0] > arr[2])         {             System.out.println(arr[0]);             if(arr[1] > arr[2]){                 System.out.println(arr[1]);                 System.out.println(arr[2]);             }             else if(arr[2] > arr[1]) {                 System.out.println(arr[2]);                 System.out.println(arr[1]);             }         }         else if(arr[1] > arr[0] && arr[1] > arr[2])         {             System.out.println(arr[1]);             if(arr[0] > arr[2]){                 System.out.println(arr[0]);                 System.out.println(arr[2]);             }             else if(arr[2] > arr[0])             {                 System.out.println(arr[2]);                 System.out.println(arr[0]);             }         }         else if(arr[2] > arr[0] && arr[2] > arr[1])         {             System.out.println(arr[2]);             if(arr[0] > arr[1]){                 System.out.println(arr[0]);                 System.out.println(arr[1]);             }             else if(arr[1] > arr[0])             {                 System.out.println(arr[1]);                 System.out.println(arr[0]);             }         }         else             System.out.println("There was an error");      } }


So I found My page to be very vulnerable to sql injection attacks, I wish to patch it but a bit confused where to start, Ive done some research and I think I should be using PDO, basically from what I understand I need to be Pre-making my statements and then parsing there input as a string, As this is the first time doing this I would like to make sure I'm going own the right path,   So for example, this statement in my login page php code:  $verify_pass = $dB1->query('SELECT * FROM accounts WHERE account="'.$compte.'" AND pass="'.$pass.'"');   It's to my understanding I should be changing this to   $verify_pass = $dB1->prepare('SELECT * FROM accounts WHERE account="?" AND pass="?"');           $stmt->bind_param("sss", $user, $pass);   and then save there input as $user, Would this work to prevent an sql injection attack, I would obviously need to do this for every user input surrounding the database but is this a step in the right direction?


CLIPBRD_E_CANT_OPEN error when setting the Clipboard from .NET

Why does the following code sometimes causes an Exception with the contents "CLIPBRD_E_CANT_OPEN":  Clipboard.SetText(str);   This usually occurs the first time the Clipboard is used in the application and not after that.


Photons travel at the fastest speed in our universe, the speed of light.  Do photons have acceleration?


Automatic pyqgis categorized renderer classification

I have some layers in my project and I would like to alter their styles, since ranges of values for underlying columns have changed.  Normally it would require to enter each layer style settings separately and trigger "Remove All", and "Classify" button, however I would like to execute it from the code.   I found such method for graduated symbol:  renderer.updateClasses(layer,0,bins)   ,however I'm having trouble to find corresponding method for categorized symbol class  Is there any way to do this from pyqgis without the need to specify the layer style from the scratch (create category, label etc.) ? Some equivalent of "Classify" button from below screenshot:


"Newbie" doesn't have enough reputation to talk in chat

Possible Duplicate:          I just tried the new feature to move a conversation to chat, and got the message indicated in the title.  The whole reason the comment chain got so chatty is because this is an inexperienced person who doesn't quite "get it" and isn't likely to get a lot of reputation any time soon. Isn't this exactly the sort of conversation that should be taken off-line?  I think if someone is invited to a chat by someone with enough reputation, it shouldn't matter what their own reputation is - they should be allowed into the chat.


Visual artifacts when seeing an object form afar in Edit Mode

I'm trying to model a double sided cabinet using metric units (if thats helpful) and I'm seeing both inside and outside faces without enabling wireframe mode or something like this. Does anyone know how I can avoid those artifacts? The problem appears only when I am relatively far from the object(but not so far) and only in edit mode and while using orthographic view.


Are real numbers a subset of the complex numbers?

I am having an argument with a friend. I think that in a sense, the answer is no. My reasoning is that in linear algebra, a vector $(a, b)$ is not the same as a vector $(a, b, 0)$ because the first one is in $\mathbb{R}^2$, while the second is in $\mathbb{R}^3$. However I am not sure if a similar argument can be made for real vs complex numbers.


I am using a simple error handling and I think I have everything else right, how would I make the if statement check to see if the value is equal to this array?  String[] values = { "A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K" };  public String Value {     get     {         return _value;     }      set     {         if (value != values)             throw new Exception("Invalid Card Value");         _value = value;     } }


Arch on WSL: libQt5Core.so.5 not found, despite being installed

I was hit by some hardcore power-tripping forum mods on the Arch Linux forum, so here I am.  I'm trying to run GUI apps on WSL, such as dolphin or kate. However, none of them can find libQt5Core.so.5, despite it being installed in /usr/lib as you'd expect. Here's a terminal transcript:  /u/lib » DISPLAY=:0.0 dolphin dolphin: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory /u/lib » pwd /usr/lib /u/lib » ls -la | grep Qt5Core -rw-r--r-- 1 root root     1143 Aug  7 06:05 libQt5Core.prl lrwxrwxrwx 1 root root       20 Aug  7 06:05 libQt5Core.so -> libQt5Core.so.5.11.1* lrwxrwxrwx 1 root root       20 Aug  7 06:05 libQt5Core.so.5 -> libQt5Core.so.5.11.1* lrwxrwxrwx 1 root root       20 Aug  7 06:05 libQt5Core.so.5.11 -> libQt5Core.so.5.11.1* -rwxr-xr-x 1 root root  5234312 Aug  7 06:05 libQt5Core.so.5.11.1* /u/lib » ldd `which dolphin`         linux-vdso.so.1 (0x00007fffdb426000) ...         libQt5Core.so.5 => not found /u/lib » pacman -Qk qt5-base qt5-base: 3546 total files, 0 missing files   Note that other GUI apps work fine - anything compiled against GTK, including Firefox, work perfectly. I just have to set the $DISPLAY variable. Not setting the var doesn't help, as you'd expect.  Any ideas? Thanks!


Output the common lines (similarities) of two text files (the opposite of diff)?

Diff is a great tool to display the changes between two files. But how to display the similarities of two text files (while ignoring the differences)?  I.e. sample input:  a: Foo Bar X Hello World 42  b: Foo Baz Hello World 23   Pseudo output (something like this):  @@ 2,3 =Hello World   Just sorting both files and using comm is not enough, because in that case the line information is lost.


Value of this definite integral $\int_{0}^{\infty} \frac{ \ln(x)}{x^2+2x+4} dx $

So I came across this question on brilliant.org and didn't know how to go about it: $$\int_{0}^{\infty} \frac{ \ln(x)}{x^2+2x+4} dx $$  I tried to complete the squares in the denominator and then use a trigonometric substitution (with tan) but I didn't get anything beyond that.   How do I do it? Do we need to differentiate under the integral sign here?


Is there any way to delete hundreds of empty contacts group

Because of some unknown problems, I have hundreds of empty contacts group,I want to delete them all.  I try it on Mac and iCloud,they can just delete one group a time.  I haven’t found any good apps to do it in App Store,if you know one,please tell me.


I am a new user of Ubuntu 20.04. My previous os was windows 10. so I have all software backup as .exe file. Such for example, I want to install photoshop and illustrator from my extarnal hard disk. But I dont have any internet in my home. How can I install those software or software like .exe extention in Ubuntu offline? please give me a solution. or should I download any other software for that. I have wine and play on linux in my ubuntu. But I can't install .exe file from my extarnal drive. thanks in advance


Some DOI links are not properly clickable

Some  links are not  properly clickable.  Example: <118::aid-ptr493>3.3.co;2-g


Will the Earth ever show synchronous rotation? Why and when?

In  answer to the question "why does the moon have the same rotation and revolution periods?", we read:     The mass and speed of rotation of the Earth influence the moon in that some of its rotational energy is actually transferred to the moon. (...) Many of the moons in the solar system have also reached this point of equilibrium. In Jupiter, the moons Amalthea, Thebe, Io, Ganymede, Callista, and Europa, all have identical rotational and revolutionary periods.    My two questions are:   Can we show the mechanics of this quantitatively?  Does the system Earth-Sun experience the same phenomenon, in some measure? Will then the earth slow down its rotation speed until it will show always the same face to the sunlight? In this last case, on which timescale?


Uneven spacing between glossary entrances in the list

I am trying to make a glossary list and there is something weird going on: the spacing between entrances is uneven for no obvious reason. The minimal example of the code is below:  \documentclass{article}  \usepackage[nonumberlist,acronym]{glossaries-extra}  \setlength{\glsdescwidth}{6.5in}  \newglossarystyle{acronyms}{%acronymsandsymbols     \setglossarystyle{long}% based on the list style     \renewcommand*{\arraystretch}{1}     \renewcommand*{\glossarypreamble}{\vspace{4ex}     \glsresetentrycounter} % }  \makeglossaries  \newacronym{ASR}{ASR}{angular spectrum decomposition    (representation)} \newacronym{TAM}{TAM}{total angular momentum (TAM) vector} \newacronym{OAM}{OAM}{orbital angular momentum} \newacronym{SAM}{SAM}{spin angular momentum} \newacronym{QM}{QM}{quantum qechanics} \newacronym{QFT}{QFT}{quantum field theory} \newacronym{QED}{QED}{quantum electrodynamics}  \begin{document} \printglossary[style=acronyms,type=\acronymtype] \newpage  Hello here  \glsaddall  \end{document}   Output:   Thanks in advance!


I've created a random question generator. All questions are in the form: x=3/random number. The problem is that the program never recognizes the fact that the user's answer is correct. I've made it print out the answer and copy it into the answer input (text pane), yet it always prints out "wrong."   private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                               //Generates random value for n (2 decimal plcae)        double nMin = 1.0;//minimum     double nMax = 38.6;//maximum     Random rn = new Random();       double nRand = nMin + (nMax - nMin) * rn.nextDouble();      //Calculates corresponding value of v     String x = String.format("%.2f", 3/nRand );     double nAns = Double.parseDouble(x);//corresponding value of c     check.setText(x);      //displays question     question.setText("n = " + String.format( "%.2f", nRand ) + "     v = ?");//question     String answer = answerInput.getText();     Double nUserA = Double.parseDouble(answer);     //checks user's answer     if(x.equals(answer)) {         check.setText("correct");     }         else         check.setText("wrong");     }


I just had a quick question is it true that you can make your own operating system with Ubuntu and if so where can i go to learn how to make my own operating system with Ubuntu.   Thanks


Have vs. Has in third person of unknown gender?

Let's take the sentence "Have they entered their password?", where we use "they" meaning "he/she", a third person of any or unknown gender. If we replace the pronoun "they" with a more specific noun, e.g. "the user" we'll also need to replace "Have" with "Has" — "Has the user entered the password?".  For some reason I'm thinking that there's a rule in English that say that pronouns can replace nouns without changing the structure of the sentence. Since using "they" as "he/she" is relatively new, does this mean that that old rule is no longer universal? Or is the sentence "Has they entered the password?" now grammatically correct?


I am reading Chris Bishop's Pattern Recognition and Machine Learning textbook. I came across the term probabilistic inference several times. I have a couple of questions.   Is probabilistic inference only applicable in a graphical modelling context? What's the distinction between traditional statistical inference (p-values, confidence intervals, Bayes factors etc.) and probabilistic inference? Is this a term that's specific to the CS community or is it widely used in the statistics community as well?


does 'I introduce someone as something' mean 'I introduce someone as I am something' or 'I introduce someone as he is something'?


I am having trouble grasping the concept of derivatives in relation to linear transformations. If I have a function f(x)=Tx which is the linear transformations given by the matrix T. Then what is the derivative Df(x)?


Loading NOAA Nautical Charts .bsb format into QGIS?

Is it possible to load a nautical chart from  into QGIS that has the .bsb format?  Didn't have much luck with mrSID format.   using QGIS(dev) on ubuntu 13.04


After changing all file permissions to 000, how to change it back to normal?

Sometimes, just to make sure all files are private, a command  sudo chmod -R 000 .   If we want to change back the permissions back to "normal", what command can be used?  sudo chmod -R 777 .   will not work because it makes some files that are not supposed to be executable become executable.  The executable flag is need for directories to be able to be accessible.


Can make perfect voxels with Blender using an addon or tools? How?

I've tried this using the remesh modifier with cubes and looks great, but it loses the texture/coloring, and the cubes aren't perfect, the cubes aren't at same size and position on a 3d grid.  The cubes must be all the same size, and the positions be align by the cubes size. The texture/colors and uv must be made from views(front,back,left,right,bottom,top) and pixelated interpolating colors.


"Have you ever seen anyone walk (walking) the streets like that?"

Have you ever seen anyone walk the streets like that? Have you ever seen anyone walking the streets like that?  Are both the above sentences grammatically correct? Do they mean the same?  I saw him kiss her the other day. I saw him kissing her the other day.  Are both the above sentences grammatically correct? Do they mean the same? And I'm sorry, if the latter two sentences come off immature .-. I couldn't come up with better sentences.


Java if (string=="0") check doesn't work

I want to make a program that copies strings into a vector until the hold string is set to a certain value, at which point the program should print out the elements of the array.    I'm not sure how the in.nextline() function works, so it could be that I'm not erasing previous entries from hold, or is it that my if(hold=="0") check is simply not valid java?  import java.util.*; import java.util.Scanner; public class startingPoint  {     public static void main(String roark[])     {         String hold;         boolean finished=false;         Scanner in = new Scanner(System.in);         Vector<String> vec = new Vector<String>();         while(finished==false){         System.out.print("Enter the string you'd like to save, or enter 0 to print out saved strings\n");         hold=in.nextLine();         if(hold=="0"){             for(int looper=0;looper<vec.size();looper++){                 System.out.print(vec.get(looper));                 System.out.print("\n");             }             finished=true;         }else{             vec.add(hold);         }     }  }   }


Probability for the length of the longest run in $n$ Bernoulli trials

Suppose a biased coin (probability of head being $p$) was flipped $n$ times. I would like to find the probability that the length of the longest run of heads, say $\ell_n$, exceeds a given number $m$, i.e. $\mathbb{P}(\ell_n > m)$.   It suffices to find the probability that length of any run of heads exceeds $m$. I was trying to approach the problem by fixing a run of $m+1$ heads, and counting the number of such configurations, but did not get anywhere.  It is easy to simulate it:    I would appreciate any advice on how to analytically solve this problem, i.e. express an answer in terms of a sum or an integral.  Thank you.


In the magical world (in Harry Potter) can ghosts use magic?  Can magic be used on ghosts?  Or, once they become ghosts, can they interact with magic at all?


Python code to recognise and convert from CRS

I have a Python function which converts Eastings and Northings to Latitude and Longitude These Eastings and Northings are given in CSV format like so:     Name Easting Northing     The python code is then ran to import the CSV and convert as follows (see code snippet): if line_count == 0:                     keys = row                     print('keys', keys)                     line_count += 1                 else:                     inProj = Proj(init='epsg:27700') # British National Grid                     outProj = Proj(init='epsg:4326') # WGS84                     x1, y1 = row[1], row[2]  # easting, northing                     x2, y2 = transform(inProj, outProj, x1, y1)                     row[1], row[2] = y2, x2                                          json_doc = {}   At the moment it converts from epsg:27700 (British National Grid) to WGS84, however there is a possibility I will get TM75 Irish Grid too. The CSV contains no CRS information - but perhaps there is a way I could manually do this or even state in another column the projection?


Can SO have a fluid vs. fixed-width layout?

When will SO stop wasting real estate of my screen by having static width layout?  EDIT  It would be very interesting to hear how does Joel, being UI specialist, feel about this. JoelOnSoftware site has fluid layout...


Uniform distribution on $\{1,\dots,7\}$ from rolling a die

This was a job interview question someone asked about on Reddit. ()  How can you generate a uniform distribution on $\{1,\dots,7\}$ using a fair die?  Presumably, you are to do this by combining repeated i.i.d draws from $\{1,\dots,6\}$ (and not some Rube-Goldberg-esque rig that involves using the die for something other than rolling it).


Is it possible to solve this limit without Hopital / Taylor / derivatives: $\lim\limits_{x \to 0} \frac{x-\sin(x)}{x^3} = \frac{1}{6}$?

It's simple to prove with Hopital that  $$ \lim_{x \to 0} \frac{x-\sin(x)}{x^3} = \frac{1}{6}$$  Is it possible to solve this limit without Hopital or Taylor (without derivatives)?


I tried to shrink Windows and then expand Ubuntu. I did shrink Windows from within Windows and I boot Ubuntu from USB to add that unallocated space to Ubuntu but I cant do it.  The option doesn't show. Any idea how to complete the process?


The youngest person on Earth in a society of immortals

The protagonist is the youngest person on Earth -- the only one to be born in many centuries. Terrestrial society is small but every individual is unique and multitalented, as they are all immortal and have lived for centuries. They live in flying habitats.  No one knows how to raise children anymore; the protagonist wears diapers into adulthood because he was never potty-trained, and his education was haphazard. Consequently, he is quite lost in this advanced society, and only tolerated by the sophisticates around him.   When the Earth is invaded, the immortals put up only a show of a fight, arriving at the scene of battle in a colorful flotilla of unarmed flying habitats. To the horror of the protagonist, they are wiped out by the invaders. He realizes that the immortals were weary of life and welcomed this end.   This is probably a novel, though it might be a novella. It was written in English and I read it probably in the 1970s or 1980s.


I've been a Linux user all this week and graduated to finding programs in a repository, marking and applying while the system installs. I search everywhere and cannot find anything.  Is there a step by step guide for this?  I don't see how you guys win over MS Windows users... but I'm still trying.


I am trying to add NOPASSWD option for existing user who belongs to the sudo group and have admin rights. I added this line in sudoers file:    max     ALL=(ALL:ALL) NOPASSWD: ALL   But it still ask me for password when i try to execute command with sudo.


First eigenvector of covariance matrix as the direction of largest variance

After reading , I am still not sure how to intuitively understand why eigenvectors of a covariance matrix represents direction of the LARGEST variance.   Need more explanation on:     Then $w^{T}Cw$ simplifies to $\sum\lambda_i w_i^{2}$ , in other words the variance is given by the weighted sum of the eigenvalues. It is almost immediate (why?) that to maximize this expression one should simply take $w=(1,0,0,…,0)$, i.e. the first eigenvector, yielding variance $\lambda_1$."   Here $C$ should be the original $C$ before decomposition? or both $C$ and $w$ have changed basis? If they changed basis, how do we know the original variance $w^{T}Cw$ is the same as the new variance $w^{T}Cw$?


Many hormones use , such as cAMP and cGMP, and also act on the same cells. For example calcitonin and PTH both use cAMP and have opposite effects. How is it possible that the same second messenger molecule (cAMP) can have opposite effects on the same cells? Why are there more hormones compared to 2nd messengers - doesn't that reduce the uniqueness of each hormone? Shouldn't that make the function of any hormone using e.g. cAMP be the same as that of any other hormone using the same 2nd messenger on the same cell?


I installed gnuplot on my yosemite system using brew. When I try to plot cos(x) the way I would on ubuntu, I get this:  gnuplot> plot cos(x) WARNING: Plotting with an 'unknown' terminal. No output will be generated. Please select a terminal with 'set terminal'.   I also notice that when gnuplot loads, it says Terminal type set to 'unknown'. I would like to load the graphs in a new window, so I tried set terminal xterm, which seems to work at first glance, given the message Terminal type set to 'xterm'. But then I try plotting again, and it produces garbage:    How do I get the terminal to function correctly, as it does on ubuntu?


How did Bohr come up with the figure $n\hbar$?

Bohr gave his atomic model in the year 1913, whereas De Broglie proposed his idea of matter waves in the year 1924 (from which the relationship can be derived by considering an electron to be a standing wave). How is it then that Bohr came up with this postulate?


How to logically understand the multiplication of two integers ?  Eg:  3 x 4 = 12 (is understandable)  -3 x4 = -12 (is also somewhat understandable)  But , 3 x -4 = -12 (is NOT understandable)  -3 x -4 = 12 (is also NOT understandable)  Now , at this we must assume that commutative property may not be true .  What is the logical explanation for something being multiplied negative times ?


Why Isn't this Valid Housing? [Terraria PC]

I was recently playing Terraria on my laptop when I saw that this was not valid housing. Why? I might be stupid and there could just be a simple answer but do any of you know?


Is a DNA molecule a single strand of polynucleotide or two of them linked together?

Our molecular biology teacher told us that a double helix of DNA was composed of two DNA molecules linked together by hydrogen bonds. The thing is, until now, I always thought a DNA molecule was composed of two strands, those being polynucleotides, both of them being linked together. I can't find a link which is saying the same as my teacher, even if it seems technically correct to call a double helix a dimer of two DNA molecules.  I was curious to know what was the exact terminology.


I have a class Array which implements a generic two-dimensional array of elements of type T :  #ifndef _ARRAY_ #define _ARRAY_  namespace math {  template <typename T> class Array { protected:     //! Flat storage of the elements of the array of type T     T * buffer;                           //! The width of the array (number of columns)     unsigned int width,                   //! The height of the array (number of rows)                  height;              public:      /*! Reports the width (columns) of the array      *      * \return the width.      */     unsigned int getWidth() const { return width; }            /*! Reports the height (rows) of the array      *      * \return the height.      */     unsigned int getHeight() const { return height; }          template <typename T>     T & Array<T>::operator () (int x, int y) {         float loc = y*width + x;         return *(buffer + loc);     }      template <typename T>     Array<T>::Array(unsigned int w, unsigned int h):width(w),height(h) {}      template <typename T>     Array<T>::Array(const Array<T> & source):width(source.width),height(source.height) {}                         template <typename T>     Array<T>::Array & operator = (const Array<T> & source) {         width = source.width;         height = source.height;         return *this;     }      /*! Virtual destructor.      */     virtual ~Array();                                      };  } // namespace math  #endif   I also have a derived class named Image which is used to store the image data of a ppm image:  using namespace std; #include <iostream> #include "Image.h"  namespace math {  class Image : public Array<Vec3<float>> { protected:      Vec3<float> * buffer;  public:       //Obtains the color of the image at location (x,y).     Vec3<float> getPixel(unsigned int x, unsigned int y) const {         if (x > 0 && x < Array::getWidth() && y > 0 && y < Array::getHeight()) {             float pixel_r = (x, y);             float pixel_g = (x, y) + 1;             float pixel_b = (x, y) + 2;             Vec3<float> c = Vec3<float>(pixel_r, pixel_g, pixel_b);             return c;         }         Vec3<float> c = Vec3<float>();         return c;     }      //Constructor      Image(int w, int h, Vec3<float> * t_buffer) : Array(w, h), buffer(t_buffer) {}      //Copy Constructor     Image(const Image & src) : Array(src) {         memcpy(buffer, src.buffer, sizeof(Vec3<float>));     }      //Copy assignment operator     Image & operator = (const Image& right) {         operator=(right);         if (buffer != nullptr)             delete[] buffer;         memcpy(buffer, right.buffer, sizeof(Vec3<float>));         return *this;     }      //The Image destructor.     ~Image() {         if (buffer) delete[] buffer;     } }; }   My question is how can I use the getWidth() and getHeight() functions of the Array class in Image class.


Usually, the angular frequency $\omega$ is given in $\mathrm{1/s}$. I find it more consistent to give it in $\mathrm{rad/s}$. For the angular momentum $L$ is then given in $\mathrm{rad \cdot kg \cdot m^2 / s}$.  However, the relation for torque $\tau$ says: $$ \tau \cdot t = L$$  So the torque should not be measured in $\mathrm{N \cdot m}$ but $\mathrm{rad \cdot N \cdot m}$. Would that then be completely consistent?


Is the Frattini subgroup a normal subgroup?

Ive been trying to attack this question from different point of view but i cant make it. Basicly I started thinking that Frattini was not normal, i was trying to get a counterexample but all the groups I try failed.   Now I am convinced that The Frattini subgroup is normal but i cant prove it.  I would appreciate any help


Prove $\lim_{x \to0}{x\sin\left(\frac1{x}\right)} = 0$ by using $\epsilon$-$\delta$ method.

I have done many exercises of proving limits by using this method, but this one, I don't know how can I prove it.  The definition says:  Prove $\displaystyle\lim_{x \to0}{x\sin\left(\displaystyle\frac{1}{x}\right)} = 0$ by using $\epsilon$-$\delta$ method.  Thank you very much.


How to calculate the eigenvalue of the following general matrix

Let the $n\times n$ matrix $Z$ with $(i,j)$-element defined by $Z_{i,j}=i+j$. How to calculate the eigenvalue of $Z.$?  I have used Matlab to calculate it. I find no matter how bigger n is, there are always two nonzero eigenvalues. But how to get the formula for eigenvalues of $Z$?


If $\forall x \in R, x^2-x \in Z(G)$, than $R$ is commutative

Let $R$ be a ring such that for every $x\in R$ we have $x^2-x \in Z(G)$. Show that $R$ is a commutative ring.    My thoughts  What should I do? I could show that every $y \in R$ could be written in the shape $x^2-x$ but I don't know if that is true. We know that  $y \cdot(x^2-x) \ = \ (x^2-x)\cdot y$ for any $x,y \in R$, but that doesn't mean that $xy = yx$. Please give me a hint


Will hashing over and over eventually give the same hash?

There are many cases in maths where doing the same thing over and over again will bring you closer to a value. Derivation of polynomials is the striking example: no matter what you start with, you end up with 0. In a series expansion, the longer you continue the sequence the closer you get to the real value.  This concept applies in areas other than math (Wikipedia's everything-leads-to-philosophy phenomenon, for example). It's a little unrelated but it just proves the concept.  Hashing algorithms are just special math. Following logically, hash entropy supposedly decreases the more you hash a value. So is there a point at which any input value will give the same hash as any other?  (Let me just specify that we're not re-injecting any new data every time we hash, as if we're trying to increase the security of the hash by salting and re-hashing. It's strictly a matter of md5(md5(md5(... if that's the algorithm we're using.  I can see some problems with this already. Algorithms like md5 are designed to change their output radically when the input changes only by one bit of information. So even if a common hash for two values appears along the way, it itself will start changing. But then, does the fact that the output appears to be very different actually mean the possibilities are still many?


Prove that $\sqrt[3]{2} + \sqrt[3]{4}$ is irrational. My steps so far: I found that the polynomial $y^3-6y-6=0$ has roots $\sqrt[3]{2} + \sqrt[3]{4}.$ Can I use this to prove that $\sqrt[3]{2} + \sqrt[3]{4}$ is irrational? If so, how? I was thinking of using Proof by Contradiction, but I'm not so sure.


Identify year of manufacturing of Merida frame by Serial number

I'm trying to buy a used Merida Scultura Road frame, but the current owner does not know the year of manufacturing. It is possible to extract this information from serial number?  Serial:   WC 93055 B  BI - 1582 BR


What is the best way to proof your time series has a deterministic linear trend

In case you suspect your time series has a linear trend, what is the best way to prove it? If you just regress it against time, you ignore the auto correlation of the time series so I assume that is a bit foolish.  We learned to do unit root tests, and in those test you remove the auto correlation by including lags of the time series. So that problem is solved.  But I am struggling a bit with the unit root test which includes a trend (  ur.df(type="trend") in R ) , because the intercept is also included. But this intercept is like a drift, doesn't it remove the significance of the trend? Why don't we test for unit root with only the presence of a trend and not the intercept?


I using this code to generate two digit but I want to change it and make it generate three digit.  int lottery = (int)(Math.random() * 100);  Thanks


I am a frequent user of StackOverflow. Many beginner questions contain code that has no formatting at all, some even close to winning a code obfuscation contest. I try to answer even beginner questions, and what I end up doing is just copying the code snippet, pasting it into my favorite IDE/editor, format it, then paste it back and edit the question.  What I'd very much like to see is an automatic code formatting feature on the site. Is it so hard to implement one? Are there reasons for not implementing it? (I.e., lack of time/resources/other motives)?  For example, implementing a plugin similar to , at least for common languages.


I have tried Farbar scan, I have tried MalwareBytes, I have been able to get into registry at one point and remove all of what I thought was infecting it. I ran Kaspersky, CCleaner, and TDS killer. Nothing is working to get rid of this virus. The virus also morphed and now  I can't click ctrl+alt+del after starting a scan and try to close, which was allowing me to say "no" so I could get back in.


Using Tags in Profile Page (About Me Description)

How can I use the Tags in Profile Description. I saw few StackOverflow friends using the TAGS in there Description page. Can some one tell me how can it be done? It will be nice for me to just simple click on the tags and check for new questions and answers!!


According to Einstein $E= mc^2$ so $m = E/ c^2$. So energy present in an atom contributes to its mass. So if a photon is a carrier of energy shouldn't it have mass since energy contributes to mass of an atom?


How to use keyboard to navigate google search results (now that instant search is dead)

As of today, Google Instant Search . This is what it used to look like:    I never cared much for the instant display of results while I typed. However, I did use, hundreds of times a day, the keyboard shortcuts it allowed.  For those that never used it - with instant search turned on, you could:   Press enter after a search, and use the up/down keys to move a 'pointer'  down through the results Then press 'enter' to open a search result being pointed at At any point in time, typing letters/numbers on the keyboard would refocus on the search bar Pressing enter with a result highlighted could be combined with the ctrl modifier to open a result in a new tab.   I find the mouse quite difficult to use and try to avoid it when possible. Is there a tool or script I could use to replicate the keyboard behaviour that instant search used to give me?  Previous questions have asked (and been answered) in the era of instant search (e.g. ,  and my previous question ), while I'm looking for a non-google replacement with the same functionality.  I am using Chrome on Ubuntu 15.01.


I have the following piece of tikz code:  \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[>=latex] \draw (2,2) circle [radius=2pt]; \draw (3,3) circle [radius=2pt]; \path[inner sep=0pt] (2,2) ++(45:2pt) node (A) {}; \path[inner sep=0pt] (3,3) ++(225:2pt) node (B) {}; \draw[-] (A) -- (B); \end{tikzpicture} \end{document}   where I want to connect two connect the circles with a line. Points A and B should be on the circles, but unfortunately they are slighty off. How can I fix the existing code?


variable content is different than the output of the assigned command

I'm having a problem when trying to echo a variable. The echo output of the variable is different than the output of the command. Why any thing like this happen? I suppose it may have something to do with the text, since this problem didn't appear when applying this on a different text.  me@myPC:~/some/directory/$ grep "frag" link | awk '{print$2}' KETENE OH H2O HCCO CO CH2OH H CH(OH)CO (HCO)2 HCO CH2O CH3O CO2 CH3 me@myPC:~/some/directory/$ frag_list=$(grep "frag" link | awk '{print$2}') me@myPC:~/some/directory/$ echo $frag_list   CH3O)2CO


What is the best Ubuntu version for my hp tc4200 netbook?

Which version of Ubuntu should I load on my laptop which has 768 MB RAM and just 40 GB hard drive space so that it runs smoothly and looks nice?


During the last session with my Canon 50D, 4 or 5 photos from 180 appeared to be with artifacts:      These photos were already broken in preview on camera display, so it can't be usb cord issue. Each jpg is broken the same way as corresponding raw.  How can I troubleshoot the reason?


How to alter a float by its smallest increment (or close to it)?

I have a double value f and would like a way to nudge it very slightly larger (or smaller) to get a new value that will be as close as possible to the original but still strictly greater than (or less than) the original.  It doesn't have to be close down to the last bit—it's more important that whatever change I make is guaranteed to produce a different value and not round back to the original.


I installed Ubuntu 12.10, then installed Nemo. Now I would like to make Nemo the default file manager.  I've searched the web for a solution but every time I restart my computer Nautilus come back.  Does anyone know an effective solution?


I'm new to GIS and mapping, and I need to learn how to create web map application for my project. I'm really confused on what to use. I have read PostGIS, OpenStreetMap, and OpenLayers. I'm wondering how those API's work together. I'm an experienced PHP programmer, so is there a way that I can apply my PHP skills?   Later on this project, I'll be calculating the shortest path and creating a routing guide. Can you guys suggest a best guide for accomplishing my project?  Also, is there a way that I can use only domain server or host like bluehost? Since I'm only required to work within a small town.


Argue by contradiction to show that there is no surjection...

from $A$ to $\{0,1\}^A$. When $A$ is any (possibly infinite) set  How does one go about this?


Yesterday, I saw serial upvotes to my Questions and Answers. Today all those upvotes were reversed, as per the rules.    But, today I see that I am being serial-downvoted.    Now, I don't know if these serial downvotes get rollbacked or not tomorrow.    What I am thinking is, there should be a time difference between two votes, say 30 seconds. So it can reduce serial voting.


In java how are lambda expressions are different from regular functions

I am really thinking hard to understand why java has introduced new concept called Lambda Expression in its 8th version.  I mean as far as I understand it is just like a regular function which calculates an expression and returns the value. Is there anything that a lambda expression does beyond this and what exactly happens behind the screen. Please educate me!!!   Thanks in Advance.!!


What should I do when getting a C in a core graduate course as an undergraduate planning to apply for grad school in applied math?

I'm a third year undergraduate student planning to apply for graduate school in applied math. I have done REU in applied math and had one conference paper. I had decent grades in my undergraduate math courses: mainly A's and A+'s and only a few A-'s. However, I ended up with a C in my first graduate course(Real analysis), which is really discouraging to me. In fact, out of all 20 people in the class, including all the graduate students, only 2 ppl got A and the rest are split into B's and C's. I was originally planning to continue with the sequence (the B part of the course), work harder and get a B or above grade, but after the professor told me that he is going to have even higher standards this semester, that being said, only people who get nearly perfect scores deserve to pass the course, I'm not so sure now. Based on his new standards, only the two people who got A last semester can pass the course and the rest of us would have failed, which is totally insane. I wonder if I should continue with this course, study really hard and try to pass the course, and hopefully get a better grade, or simply drop the class and try some other grad classes? Also how bad does getting a C in a core graduate class hurts and how else can I make up for it? I'm going to apply for grad school next year so I'm short on time, any advice will be appreciated! I'm really desperate right now.


Lubuntu will not install on my macbook: "grub-efi-amd64-signed failed to install"

I keep getting an error during installation saying  grub-efi-amd64-signed failed to install    Specs: Macbook 13-inch, Early 2008 4GB of RAM Macs work differently   Are there any solutions to this problem?


Find the number of ways to express 1050 as sum of consecutive integers

I have to solve this task:   Find the number of ways to present $1050$ as sum of consecutive positive integers.  I was thinking if factorization can help there: $$1050 = 2 \cdot  3 \cdot  5^2 \cdot  7 $$ but I am not sure how to use that information (if there is a sense) example I can solve something similar but on smaller scale: \begin{align} 15 &= 15  \\ &= 7+8 \\ &=4+5+6 \\ &= 1+2+3+4+5 \end{align} ($4$ ways)


I’ve heard somebody say:     All what is needed is …   I thought the correct way to phrase it was:     All that is needed is …   However, thinking about it more, the former doesn’t sound too incorrect, albeit a bit odd. Is the former grammatically correct? Am I alone in thinking the latter sounds more natural?


i need to proof the following formula by math. induction  $ \sum_{k=1}^n k!*k=(n+1)!-1  $   n ∈ N  I dont know how to start and there to end, i would appreciate any help.


'Reviews completed' what does this status mean in springer

I have submitted revision of my paper at the end of last month and status changed from Reviewers assigned to under review and now since 6 days it is showing reviews completed. Anybody has experience with this kind?


I have read several articles on math.stackexchange.com, and also this article:   I still can't quite understand why one of the numbers can't be even. Especially this part: "Since any choice of even values of a and b leads to a ratio a/b that can be reduced by canceling a common factor of 2, we must assume that a and b are odd, and that the ratio a/b is already reduced to smallest possible terms."  Isn't 2/3 or 3/2 smallest possible terms as well?


People who have given an interview test maybe familiar with the "substring" question. The question is, as follows:  "For string find the largest substring from the right that has at most two different characters.  I have written a small code to achieve this:  def generate_substring(givenstring):     givenstring_list = []      for i in range(0, len(givenstring)):         for j in range(0, len(givenstring)):             if i != j:                 givenstring_list.append(givenstring[i:j])      return_list = [givenstring_list[i] for i in range(0,len(givenstring_list)) if givenstring_list[i] != '']      return reversed(return_list)   def main():     code_input = raw_input("Enter a string: ")     substrings_list = generate_substring(code_input)     temp = ""      for substrings in substrings_list:         for i in range(1, len(substrings)):             if substrings[i - 1] != substrings[i]:                 temp = substrings                 break #Notice This!      print(temp)   main()   Notice the for loop with a break. I don't know why is this, but break cannot manage to break out of the loop. Therefore I get the leftmost substring instead. Why is that?


Are there published rules for navigating and travelling through jungles?

I’m interested in designing part of my D&D campaign to have a jungle environment which the players will potentially need to navigate at some point.   Does D&D 5e have published rules for navigating and travelling through jungles?


how do I remove Microsoft Edge from Windows 10?

I know with XP it was possible to remove Internet Explorer as a component, and it looks like Windows 8 made that even easier.  How is IE removed from Windows 10 and what are the ramifications?  see also:


What non-alphabetic characters are valid in English spelling?

Is ' (the apostrophe) the only character which is not part of the English alphabet that can appear in the correct spelling of an English word?


How do I disable an app from running at startup

I have a genymotion virtual device which has an app which runs at startup which make the device crash giving me no access to the device.  How do I disable the app from my computer. (I am using virtual device)?


Faithful group actions for singleton group or for empty set

Let $G$ be a group, possibly a singleton. Let $M$ be a set, possibly empty. Let $\mu: M \times G \to M$ be a right group action. Let $1_G$ be the identity of $G$.  I understand 's second definition of faithful as follows:     $\mu$ is faithful if for each $g \in G$ such that $g \ne 1_G$, there exists $x \in M$ such that $\mu(x,g) \ne x$. $\tag{1}$   Later  says if $\mu$ is free and $M$ is a non-empty set, then $\mu$ is faithful.  Question: Given the idea that we can have $M$ as an empty set, I would like to clarify: Are these correct?   If $G$ is a singleton, then every action $\mu$ is faithful, whether or not $M$ is empty. If $G$ is not a singleton, but $M$ is empty, then every action $\mu$ is not faithful.


There is no field with exactly 6 elements

I saw the related posts, and I tried a different proof. Please have a look.  Let $D$ be any field with $|D|=6$.  $|D|=6<\infty \Longrightarrow Char(D)\neq 0\Longrightarrow Char(D)=prime\ number$  From the theorem of Lagrange in $(D,+)$ we have that: $$ord(1_R) \mid  |D| \Longrightarrow Char(D)\mid  |D|\Longrightarrow Char(D)\mid 6$$ So, $Char(D)=2$ or $3$.   $Char(D)=2$   $\forall x\in U(D):ord(x)=Char(D) \Longrightarrow ord(x)=2 \Longrightarrow 2x=0_D \Longrightarrow x=-x $ (*)  If $H= \{0_D, a,b,a+b\} $ from (*) $(H,+)\leq (D,+)$ and from Theorem Of Lagrange we have that $|H|\mid |D| \Longrightarrow4|6$, contradiction.   $Char(D)=3$   Can we find another additive subgroup of $(D,+)$ with 4 or 5 elements to work on the same say as above?


Why are these estimates to the German tank problem different?

Suppose that I observe $k=4$ tanks with serial numbers $2,6,7,14$.   What is the best estimate for the total number of tanks $n$?   I assume the observations are drawn from a discrete uniform distribution with the interval $[1,n]$. I know that for a $[0,1]$ interval the expected maximum draw $m$ for $k$ draws is  $1 - (1/(1+k))$. So I estimate $\frac {k}{k+1}$$(n-1)≈$ $m$, rearranged so $n≈$ $\frac {k+1 }{k}$$m+1$.  But the frequentist estimate from  is defined as:  $n ≈ m-1 + $$\frac {m}{k}$  I suspect there is some flaw in the way I have extrapolated from one interval to another, but I would welcome an explanation of why I have gone wrong!


Ammeter time limits - how to understand them

On my multimeter, near the 10 A connector it says 10 A MAX 10sec EACH 15min. I usually measure currents less than 1 A so I never cared about this.    Is it correct to assume that if the measured current is lower than 10 A, I can take the measurement in more than 10 sec and I don't have to wait 15 minutes?  I measured only a few times a current of about 4 A and I'm sure I didn't follow those time limits and the multimeter is still working (so far).  I read the manual, there's nothing written about this.


why Chrome browser doesn't recognize my nginx http2 server?

I setup my Nginx conf as per  , and now http2 is available...  But in Chrome (Version 54.0.2840.98 (64-bit))  Dev tool, it's always on HTTP 1/1 :  NAME             METHOD  STATUS  PROTOCOL shell.js?v=xx..    GET    200     http/1.1   my server is running Ubuntu 16.04 LTS which supports both ALPN & NPN , and the openssl version shipped with it is 1.0.2g  I checked http2 support with and the result is :    Yeah! example.com supports HTTP/2.0. ALPN supported...   Also checking with curl is OK   $ curl -I --http2 https://www.example.com   HTTP/2 200    server: nginx/1.10.0 (Ubuntu)   date: Tue, 13 Dec 2016 15:59:13 GMT   content-type: text/html; charset=utf-8   content-length: 5603   x-powered-by: Express   cache-control: public, max-age=0   etag: W/"15e3-EUyjnNnyevoQO+tRlVVZxg"   vary: Accept-Encoding   strict-transport-security: max-age=63072000; includeSubdomains   x-frame-options: DENY   x-content-type-options: nosniff   I also checked with is-http2 cli from my console  is-http2 www.amazon.com × HTTP/2 not supported by www.amazon.com Supported protocols: http/1.1  is-http2 www.example.com ✓ HTTP/2  supported by www.example.com Supported protocols: h2 http/1.1   tested with openssl from my localhost  $ echo | openssl s_client -alpn h2 -connect www.example.com:443 | grep ALPN  depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3  verify return:1  depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3  verify return:1  depth=0 CN = example.com  verify return:1  ALPN protocol: h2  DONE   why Chrome is left behind it ? How can I check it also with Safari (v 10.0.1)


How good is it for SEO if you have a widget that lives on other sites?

I made a widget that would ideally live on other sites.  Here is an example:   I guess since the widget would link back to me, it would be an SEO boost for my site.  Is that correct?  Or would it be just an SEO boost for that particular URL?  If it is just an SEO boost for the particular URL, it does me little good since that page does not link to any of my other pages.  Am I thinking about this correctly?  How are these things typically handled so that there is  a benefit to my site's SEO?


Does a bijection $f:\textbf{Z}\rightarrow \textbf{Q}$ exist?

In this case, as is usual, $\textbf{Z}$ represents the set of integers and $\textbf{Q}$ represents the set of rational numbers.  I'm meant to figure out if the bijection $f:\textbf{Z}\rightarrow\textbf{Q}$ exists and, while I know that this entails proving that it is both injective and surjective, I'm stuck with how to proceed.  I've been struggling with proving bijectivity for sets in general and what I'm looking for is a framework with which to work when it comes to these sorts of problems, as my attempts to research similar problems online haven't helped.  EDIT: While I do see other problems asking similar questions, the answers I read failed to show steps that proved both injectivity and surjectivity, which is how I would like to solve the question, if possible.


I want to make a theorem's header stands in a separated line like (as style break in ntheorem)  Examples 1   (1) GL(n)   (2) SL(n)   I copied the solution from , but it doesn't work if I begin the theorem by  \begin{enumerate}.  \documentclass[12pt, a4paper]{amsart} %a minimal example \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \newtheoremstyle{mystyle}% name   {3pt}%Space above   {3pt}%Space below   {\normalfont}%Body font   {0pt}%Indent amount   {\itshape}% Theorem head font   {.}%Punctuation after theorem head   {\newline}%Space after theorem head 2   {}%Theorem head spec (can be left empty, meaning ‘normal’) \theoremstyle{mystyle} \newtheorem{exam}{Examples}  \begin{document} \begin{exam} \begin{enumerate} %If I begin with enumerate, the results are not good   \item $GL(n)$   \item $SL(n)$ \end{enumerate} \end{exam}  \begin{exam} Groups % if I begin with normal text, it works. \begin{enumerate}   \item $GL(n)$   \item $SL(n)$ \end{enumerate} \end{exam}  \end{document}


I am setting the umask to a new value as below.   However although I am applying rxw to the user, this does not seem to be respected (?)  /home/pkaramol $ umask u=rxw,g=rw,o=r /home/pkaramol $ umask -S u=rwx,g=rw,o=r /home/pkaramol $ rm -rf afile && touch afile; /home/pkaramol $ ls -l afile  -rw-rw-r-- 1 pkaramol pkaramol 0 Μar   2 10:30 afile   edit:  $ mount | grep -E '\s/\s' /dev/sda3 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)  $ mount | grep -i home /home/pkaramol


Merge records depending on common columns and specify the values which are uncommon in the last column as comma separated

I need to merge records depending on first three common  columns and place the values  which are uncommon in the last column as comma separated . I have a requirement to do the following-  InputFile :   HWF CommonDomain  javatools       AdminServer ABC CommonDomain  resourcebundle  AdminServer HWF CommonDomain  stringeditor    AdminServer ABC CommonDomain  resourcebundle  HelpPortalServer_1 HWF CommonDomain  stringeditor    HelpPortalServer_1  HWF CommonDomain  javatools       HelpPortalServer_1   Expected Output :  ABC CommonDomain resourcebundle   AdminServer,HelpPortalServer_1 HWF CommonDomain javatools       AdminServer,IHelpPortalServer_1  HWF CommonDomain stringeditor   AdminServer,HelpPortalServer_1


do presets affect sharpness and contrast of raw files?

Do the presets like portrait and landscape also affect the sharpness and contrast (and so on) of the raw files or does it only apply on the jpgs ? And if so, is it recommended to turn down the sharpness of the preset in order to have more control of it afterwards in post editing ?  I am a bit unsure about this, because i heard that it is best to turn down contrast (again for more control in post) while taking video. Is this true only because you have no equivalent of Raw in video on most cameras ?


How do Ι show if $a^n-1$ is prime for $n >1$ then $a=2$?

It is well known that $a^n-1$ is prime Mersann formula  for some pimes $p$ , I would like to show this implication if $a^n-1$ is prime for $n >1$   with $a$ is a positive integer then $a=2$ ?  Edit: I edited the question as it is related to the precedent question   Note : I have tried to show that for $a$ is odd it's obvious no integer $a$ satisfy $(a^n-1)$ which means it's not prime for an odd integer $a$


How to add views count for each playlist track?

I want to add views count inside playlist to show views-count on each track like this sample:


$\sin \frac{1}{x}$ is not uniformly continuous on $[1, \infty]$  I was trying to come up with a counter example using sequence, but I could not find one.


With a negative Constitution modifier, can you lose hit points when levelling up?

The PHB states that a wizard add 1d6 + constitution mod per level after first level. Would I subtract hit points when I level up if I have a negative constitution modifier and roll badly?


Is there a way of arranging Mission Control's workspaces in a two dimensional layout (like 5x5)? So far I've only been able to arrange them in a one dimensional straight line (like 1x9) across the top.  I'm finding that even though there are fewer workspaces, I get "lost" more often with 1x9 than 5x5. Thanks.


Does the penalty to movement speed while grappling stack if you grapple two opponents?

In 5e, a player who is grappling has their movement speed halved. However, a player with two hands can grapple two opponents.  As the wording seems to indicate that the movement speed penalty applies due to the grappling status, does that mean that a player grappling two opponents is doubly penalized?  If so, how would it apply: is your speed reduced to 0 ([1 - 0.5] - 0.5), or a quarter of your regular speed ([1 / 2] / 2)?


How can I get a list of the programs that are in the dock through the terminal in the correct order? I am using Ubuntu 18.04.


Why don't I get $e$ when I solve $\lim_{n\to \infty}(1 + \frac{1}{n})^n$?

If I were given $\lim_{n\to \infty}(1 + \frac{1}{n})^n$, and asked to solve, I would do so as follows:  $$\lim_{n\to \infty}(1 + \frac{1}{n})^n$$ $$=(1 + \frac{1}{\infty})^\infty$$ $$=(1 + 0)^\infty$$ $$=1^\infty$$ $$=1$$  I'm aware that this limit is meant to equal to $e$, and so I ask:     why don't I get $e$ when I solve $\lim_{n\to \infty}(1 + \frac{1}{n})^n$?


Correct plural form of a noun preceded by "zero"

When using zero as a quantifier, is it correct to use the singular form on the object of the quantifier, or the plural form?  It sounds confusing when I put it that way, but what I mean is: Which is correct?   Your password expires in 0 days. Your password expires in 0 day.   Essentially I suppose I'm asking, does "singular" mean "one" or "the opposite of more than one", as zero is not "plural" in the traditional "more than one" sense?  I'm pretty sure "days" sounds correct, but I can't be sure.