I'm having a minor reference problem. Im using LyX 2.1.0 on Mac and Jabref 2.9.   My problem is that when I'm making a reference to an article/book, etc. that have exactly two authors it says "and" between the authors, for example (Petersen, C. and Plenborg, T.).   Right now, I'm writing a seminar that has to be in my native language (danish) and therefore, I need to replace the "and" with "og". How can I do that?  I have tried to change the language-settings in both LyX and Jabref to danish, but it doesn't work. Jabref is set to the ISO8859_1 encoding - I don't now if it has something to do with that?  Any help is appreciated.

Since I am writing in norwegian, I would like to chang the two words "and" and "in" into norwegian. "And" appears both in references in the text and in the bibliography, while "in" appears in the bibliography.  My document:   \documentclass[a4paper, norsk, 12pt]{article}  \usepackage[latin1]{inputenc}        \usepackage [norsk] {babel}                           \usepackage[round, longnamesfirst]{natbib}        \begin{document}  If I have more than one author, the reference would be a list of alle the authors the first time i cite it \citep{fysdid}.  The problem is that I can not have the word ''and'' in the reference when I am writing i norwegian. I would like to replace it by ''og''.  \renewcommand{\refname}{Litteratur} \addcontentsline{toc}{section}{\refname} \bibliography{litteratur} \bibliographystyle{abbrvnat}   \end{document}        the bibtex-file:  @book{fysdid, title= {Fysikkdidaktikk}, author= {Carl Angell and Berit Bungum and Ellen K. Henriksen and Stein Dankert Kolstø and Jonas Persson and Reidun Renstrøm}, year= {2011}, publisher={Manusutkast}, }   The result:  If I have more than one author, the reference would be a list of alle the authors the rst time i cite it (Angell, Bungum, Henriksen, Kolst, Persson, and Renstrm, 2011). The problem is that I can not have the word "and" in the reference when I am writing i norwegian. I would like to replace it by "og".  Litteratur  C. Angell, B. Bungum, E. K. Henriksen, S. D. Kolst, J. Persson, and R. Renstrm. Fysikkdidaktikk. Manusutkast, 2011.


I use scrreprt for my thesis. I set the margins using the geometry package. But those somehow don't aply to the titlepage. It shows much more space on the right side, which, I reckon, is due to the two page character of scrreprt. How do I get my titlepage to be centered?  I am thankful for any ides on how to achieve my goal.  \documentclass[12pt,a4paper]{scrreprt} \usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=2cm,includeheadfoot]{geometry}  \setlength{\headheight}{15pt}  \begin{document} %titlepage \thispagestyle{empty}     \begin{minipage}{0.75\linewidth}         \begin{center}             \centering             %University logo             %\includegraphics[width=\textwidth]{logo.pdf}             \rule{0.4\linewidth}{0.15\linewidth}\par             \vspace{2cm}             %Thesis title             {\uppercase{\Large This is a very long title going over three lines and it is still not completely done\par}}             \vspace{2cm}             %Author's name             {\normalsize submitted by}\\{\Large Name \par}             \vspace{2cm}             %Degree             {\normalsize xx xxxxxxx xxxxxxxxxx xx xxx xxxxxxxxxxxx xxx xxx xxxxxx xx}\\{\Large xxxxxxxx xx xxxxxxx \par}             \vspace{2cm}             \end{center}             %Date         \begin{flushleft}             \vspace{1cm}             \begin{tabular}{ll}                 {\Large xxxxxx, August 2017}&\\                 &\\                 {\Large Student Number:}&{\normalsize xxxxxxxxxxx} \\                  {\Large Supervisor:}&{\normalsize xxxxxxxxxxxxxxx.}\\                 {\Large Co-Supervisor:}&{\normalsize xxxxxxxxxxxxxxxxx}\\             \end{tabular}         \end{flushleft}     \end{minipage}     \clearpage \end{document}

The standard titlepage is quite simple. I am looking for a very  and need help customizing my title page.  It should match the  classicthesis doctoral thesis template  Below a minimal working example:   \documentclass[12pt,a4paper,footinclude=true,twoside,headinclude=true]{scrbook} \XeTeXinputencoding iso-8859-1 \usepackage[marginparsep=8pt,left=3.5cm,right=3.5cm,top=3cm,bottom=3cm]{geometry}  \usepackage[parts,pdfspacing,dottedtoc]{classicthesis}    \frontmatter  \begin{document}     \pagestyle{scrheadings}        %this is the place to set up my cover sheet.       %*******************************************************      % Abstract     %*******************************************************    %\renewcommand{\abstractname}{Abstract}    \pdfbookmark[1]{Résumé}{Résumé}   \begingroup    \let\clearpage\relax    \let\cleardoublepage\relax    \let\cleardoublepage\relax       \chapter{Résumé}     Résumé de la thèse en français\dots      \vfill      \chapter*{Summary}   Résumé de la thèse en anglais\dots    \endgroup             \vfill     \end{document}


i am working with linked list,and I have one possibly stupid question.I have class Node for linked list which contains attribute Node as next element,and I have this line:   Node current=head; while(current!=null) current=current.next;   I don't understand why head doesn't also change,but only current?And why does it change only if I do current.next=current.next.next,how can that reflect anyhow on head?I understand that with current=current.next we iterate through current(head),and it changes current,but why doesn't it change head also?Thank you in advance!

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


The $\aleph$ hierarchy, I think, is a sequence of infinite cardinals. $\aleph_0$ is $|\mathbb{N}|$, possibly by definition. $\aleph_1$ is the next highest cardinal.  A lot has been written about whether $\aleph_1 = |\mathbb{R}|$ or, equivalently $\aleph_1 = \beth_1$ and how the continuum hypothesis is independent of ZFC.  But there definitely isn't a cardinal $\kappa$ such that $\aleph_0 < \kappa < \aleph_1$.  Why do we know that there's a successor cardinal to $\aleph_0$ / least cardinal greater than $\aleph_0$?    What would break if we insist, by fiat, on the existence of a hierarchy of cardinals indexed by the non-negative reals or non-negative rationals (in the way that $\aleph_n$ is indexed by $n \in \mathbb{N_0}$)? If cardinals aren't primitive things and the existence of a successor falls right out of how they're defined, this question might not make sense.

From what I understood, cardinal numbers are defined as:  $\aleph_0$ = the cardinality of $\mathbb{N}$ $\aleph_{n+1}$ = is the least cardinal number greater than $\aleph_n$  The continuum hypothesis states that the cardinality of $\mathbb{R}$ is  $\aleph_1$. I more or less understand this cannot be proven (does not follow from ZFC).  However, can it be proven dat there in fact is a 'least cardinal number' greater than $\aleph_0$?  Is it possible that there are sets with cardinality $\aleph_{1/2}$, $\aleph_{1/3}$, et cetera, so to speak?  Or expressed differently: is it possible that for every set A with cardinality CA > $\aleph_0$, there exists another set B with cardinality CB where CA > CB > $\aleph_0$?


I have a Lava Iris X1 (8GB ROM), but the storage shows up in two types.  Internal storage total space is 3.54GB:  Available                         : 2.52GB Apps (app data & media etc.)      : 0.97GB Cached data                       : 48.17MB   Phone storage total space is 2.50GB:  Available                         : 8.55MB Apps (app data & media etc.)      : 27.54MB Pictures, videos                  : 1.85GB audio (music, ringtones etc.)     : 313MB Downloads                         : 25.92MB Cached data                       : 64.14MB Misc.                             : 223MB   I am confused about why my phone memory is less than 8 GB. Is my phone's total ROM capacity 8GB or not?

I just purchased a Samsung Galaxy S3 32GB, when I check the storage I have only 25.5GB. Where is the other 6.5GB?


Isn't it against the law to blatantly lie to the viewing public?  If the TV series  is not true then why do they say it is?

The first episode of FX's Fargo series begins with the disclaimer-     THIS IS A TRUE STORY.   The events depicted took place in Minnesota in 2006.   At the request of the survivors, the names have been changed.   Out of the respect for the dead, the rest has been told exactly as it occurred.   However in case of Fargo, the movie which uses a similar disclaimer. According to Richard Deakins the director of photography the events were inspired by multiple incidents which took place in Minnesota and around. So how close is the TV series to the reality?


I want to change the color of a section of a document. The command to do so is   {\color{red} \section{Introduction}}   (Merely doing \section{\color{Introduction}} does not change the color of the section number).  So when I carry out the command above, it slightly adjusts the vertical space of all of the text in the entire document. This can be observed in the gif   So, how do I carry out color changes without changing the vertical spacing, etc ?  Edit : A minimal code snippet and the effect of changing color can be seen here  (no other change except color)  \documentclass{article} % For LaTeX2e \usepackage{xcolor}  \title{Generative Adversarial Nets}  \begin{document}  \section{Introduction}  The promise of deep learning is to discover rich, hierarchical models that represent probability distributions over the kinds of data encountered in artificial intelligence applications,  such as natural images, audio waveforms containing speech, and symbols in natural language corpora.  {\color{red} \section{Next Section}}  This framework can yield specific training algorithms for many kinds of model and optimization algorithm. In this article, we explore the special case when the generative model generates samples by passing random noise through a multilayer perceptron, and the discriminative model is also a multilayer perceptron. We refer to this special case as {\em adversarial nets}. In this case, we can train both models using only the highly successful backpropagation and dropout algorithms and sample from the generative model using only forward propagation. No approximate inference or Markov chains are necessary.   \end{document}     I previously thought the culprit was the nips14submit_e (which can be found here ()), but it doesn't seem to be

In the following example, the space after the red equation is much larger than the space after the black one.  \documentclass[12pt]{article} \usepackage{xcolor} \begin{document} \[ a = b \]  The quick brown fox jumps over the lazy dog. \color{red} \[ a = b \] \color{black}  The quick brown fox jumps over the lazy dog. \end{document}   It appears to me that the presence of \color{black} fools TeX into thinking there is something on the line after the equation, so the paragraph break causes a spurious blank line before the text. Section 3.7 of  mentions spacing problems, but doesn't really explain the situation. What is on the line after the red equation?  Note that there is already ; I want to understand what is going on.


Hi i'm new to programming and i started doing unit testing.I have problem with NullPointerException. I think something is broken in my InteliJ when i update it.My teachers type same code but their tests are passing.Here is what i should Test:  @Before public void SetUp() {    this.motorcycle= new UnitMotorcycle("Nissan", 70, 120); }  @Test(expected = NullPointerException.class) public void testShouldThrowNullException() {     UnitRider unitRider = new UnitRider(null, motorcycle); } @Test(expected = NullPointerException.class) public void testNameShouldBeNull() {     UnitRider unitRider = new UnitRider(null, motorcycle);     assertNull(unitRider.getName()); } @Test(expected = NullPointerException.class) public void testNameAndMotorShouldBeNull() {     UnitRider unitRider = new UnitRider("", null);     assertEquals("",unitRider.getName()); }  Here is the method i am testing:  public String addRider(UnitRider rider) {     if (rider == null) {         throw new NullPointerException(RIDER_INVALID);     }  And my testing is failing and give me NullPointerException is expected. Like i did what my teacher.And I think it was from update and i preinstall with diffrent versions of inteliJ but still dont't working.I'm using Java 11, Junit 4.12 and Maven 11

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


In the effort to lock down a new Centos box I am building I am installing  iptables. I would like to be able to put this in a script so I can do this to other boxes but I am getting some odd errors and the roll back requires a reboot? Installing with  yum install iptables   which works fine, but before reboot:  [root@ip-10-0-0-132 ~]# systemctl start iptables Failed to issue method call: Unit iptables.service failed to load: No such file or directory. [root@ip-10-0-0-132 ~]# systemctl enable iptables Failed to issue method call: Access denied [root@ip-10-0-0-132 ~]#   and after  [root@ip-10-0-0-132 ~]# systemctl enable iptables ln -s '/usr/lib/systemd/system/iptables.service' '/etc/systemd/system/basic.target.wants/iptables.service' [root@ip-10-0-0-132 ~]# systemctl start iptables [root@ip-10-0-0-132 ~]#   I am new to systemd and if this is completely trivial please point me to a man page/guide/wiki so I can research this. I just haven't found anything obvious as yet.

The newest fedora has firewalld as new firewall aplication. I liked old iptables services. I want them back but have no idea how to do that. I have tried :  systemctl disable firewalld.service systemctl stop firewalld.service systemctl enable iptables.service systemctl enable ip6tables.service systemctl start iptables.service systemctl start ip6tables.service   But it does not work! Didn't find any help on wiki or google.  Disabling firewalld work ok, but when I'm trying to enable iptables.service I get:  systemctl enable iptables.service Failed to issue method call: No such file or directory


Can anyone explain me the differences between sharepoint apps:  SharePoint-Hosted;  Provider-hosted;  Sharepoint-hosted;  do these all apps need to configure store in sharepoint?

When we create a new app in Visual Studio, we are given the option to select an hosting model:    What are the differences between the various models?


I've often heard it said that gravity is much weaker than electromagnetism, and after looking at several questions on SE, I feel that I've got at least a qualitative handle on the concept -- gravity only appears to be stronger macroscopically because positive and negative charges in most everyday matter cancel each other out almost perfectly, leading to low Coulomb forces.  But I've also heard it said that gravity is "thirty orders of magnitude" weaker than EM. How is that figure arrived at, since charge and mass are pretty fundamentally different, at least from what I've learned?  This differs from  because I'm looking for a quantitative and hopefully more complete understanding of the issue than the answers to that question provided. The closest any of those answers come is vaguely mentioning a coupling constant, without really explaining its nature mathematically.

I can understand that on small scales (within an atom/molecule), the other forces are much stronger, but on larger scales, it seems that gravity is a far stronger force; e.g. planets are held to the sun by gravity. So what does it mean to say that "gravity is the weakest of the forces" when in some cases, it seems far stronger?


Can there exist an argument that could be used for proving that the universe is indeterministic?  If this one seems to be too strict (rigorous), I would also be interested to know a 1-sentence argument from either QEM or statistical mechanics that conjectures the indeterminism of the universe?  Sources:    I already received an answer, "QM wave function is interpreted as a probability density and statistical mechanics postulates equates the ensemble average with the time average of a given physical quantity." (), but I still fail to see the actual argument.

I'm not sure if this is the right place to ask this question. I realise that this maybe a borderline philosophical question at this point in time, therefore feel free to close this question if you think that this is a duplicate or inappropriate for this forum. Anyway, I'm an electrical engineer and I have some basic knowledge of quantum mechanics. I know that Schrödinger's equation is deterministic. However, quantum mechanics is much deeper than that and I would like to learn more. If this question is not clearly answerable at this point than can anyone point out some recognized sources that try to answer this question. I would appreciate it if the source is scientific and more specifically, is related to quantum theory.


Is there a homeomorphism between $\mathbb{R}\setminus \mathbb{Q}$ and $\mathbb{R}^2\setminus \mathbb{Q}^2$, where both are given their usual topologies coming from $\mathbb{R}$ and $\mathbb{R}^2$ respectively? Here $\mathbb{Q}$ denotes the rational numbers.

Possible Duplicate:          As the topic,if $A\subset\mathbb{R^2}$ is countable, does $\mathbb{R^2}\setminus A$ path connected??? I know the answer is it is path connected but not sure how to prove it.


I'm planning to visit UK on 25th January but my visa will expire in 30 January  Is it OK to make a journey in the last few days of my visa?

I have a valid UK (Visit/Tourist) visa that expires on 30 Jan and my flight is scheduled on the same day morning time is it fine will I have any issue?


I have a points layer of about 300 points, and I'm trying to find a way to draw lines between every pair of points (so 44,850 lines in total). I've thoroughly perused similar questions here and tried all of them no avail. I know R and Python, but have never used packages related to QGIS. Any suggestions?

I want to connect all points in a point feature with every possible line segment using QGIS. For example, how a pentagon has five points with ten line segments connecting them all to form a pentagram inside. Alternatively phrased: How do I make spokes when all the points are hubs? I don't care about the order, I just want every connection between two points as one line each. Is there a tool or script that can do this in QGIS? This topic () is the closest to what I want but the plugins are no longer supported.


WhatsApp uses and end-to-end encryption, on both personal and group chats. According to my understanding, that means every message I send to a group  is encrypted on my Device for every group member separately and is sent separately to everyone  If I understood properly, this is why WhatsApp group chats are limited to 256 members.  And here comes my question:  Why doesn't sending large files on WhatsApp groups require much data and takes much time?  If a group contains hundreds of people, sending a small movie has to cost hundreds of megabytes, but actually it doesn't!

Is it possible to encrypt a message in such a way that multiple keys can independently decrypt it?  In other words:  Having knowledge of $key_1, key_2 ...key_N$, which are different symmetrical keys, is it possible to generate a ciphertext that can be independently decrypted using either $key_1$ or $key_2$ or $key_N$, in such a way that the length of the ciphertext is less than directly proportional to $N$?


I have no idea how to compute this infinite sum. It seems to pass the convergence test. It even seems to be equal to $\frac{p}{(1-p)^2}$, but I cannot prove it. Any insightful piece of advice will be appreciated.

I am trying to find a closed form solution for $\sum_{n\ge0} nx^n\text{, where }\lvert x \rvert<1$.  This solution makes sense to me:  $\sum_{n\ge0} x^n=(1-x)^{-1} \\ \frac{d}{d x} \sum_{n\ge0} x^n = \frac{d}{d x} (1-x)^{-1} \\ \sum_{n\ge0} nx^{n-1} = (1-x)^{-2} \\ x \sum_{n\ge0} n x^{n-1} = x(1-x)^{-2} \\ \sum_{n\ge0} nx^n=\frac x{(1-x)^2}$  However, a  I am reading used the following method:  $$\sum_{n\ge0}nx^n=\sum_{n\ge0}x\frac d{dx}x^n= x\frac d{dx}\sum\limits_{n\ge0}x^n=x\frac d{dx}\frac1{1-x}=\frac x{(1-x)^2}$$  This seems closely related to the solution I described above, but I am having difficulty understanding it.  Can someone explain the method being used here?


I have an Ubuntu 12.04 machine on which I have installed VirtualBox with Ubuntu 12.04 as the guest OS.  How can I share files between the host and guest?   I have installed the guest additions also but still it’s not able to mount the sf_shared folders if even it’s mounted. This means I'm unable to retrieve the file from the host.

Since Ubuntu 11.10 use a new kernel, it's very difficult to have a decent support for virtualization.   VirtualBox doesn't support guest additions for ubuntu 11.10, so I can't copy to and from my ubuntu desktop and windows, which I absolutely require, plus FreeBSD seems not to be able to use DHCP without guest additions.  Virt-manager instead gives an error on launch:  Unable to open a connection to the libvirt management daemon.  Libvirt URI is: qemu:///system  Verify that:  - The 'libvirt-bin' package is installed  - The 'libvirtd' daemon has been started  - You are member of the 'libvirtd' group   unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may need to be started: Permission denied  Traceback (most recent call last):   File "/usr/share/virt-manager/virtManager/connection.py", line 1146, in _open_thread     self.vmm = self._try_open()   File "/usr/share/virt-manager/virtManager/connection.py", line 1130, in _try_open     flags)   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 102, in openAuth     if ret is None:raise libvirtError('virConnectOpenAuth() failed') libvirtError: unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may need to be started: Permission denied   The problem is solved by running virt-manager as root, but I don't like that. How do I change permissions to run Virt-Manager as user?  Is there a way to install guest additions on Ubuntu 11.10?


I have a computer that has 2 gb ram and not very good other features.I want to run Android Developer Studio on this computer and I want to use linux distribution.Which linux distribution can I use ?  EDIT If I should be more clear, Is LXLE or Lubuntu is good for me or not ?

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


So I need to have a zombie with the closest player's name but I don't know how to do it anyone that can help? I think it would be something like this: /summon zombie ~ ~ ~ {name:@p}

This question was recently split into different questions for each workaround. See   meta posts for more information.   Can you use NBT tags in commands? I’ve tried commands that normally work in Java Edition like: give @s minecraft:planks 30 1 {display:{Lore:["Wooden planks"]}} give @s stone_pickaxe{Unbreakable:1b} give @s item_frame{EntityTag:{Invisible:1b}} summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"emerald",Count:5b},sell:{id:"diamond_sword"}}]}} summon tnt ~ ~ ~ {Fuse:20s}


public int minCompletionTime() { // finds minCompletionTime   int time = -1;    for(Job j : jobs) {      if (j.getStartTime() == -1) {       return -1;     }   }    for (Job j : jobs) { //Calculate the minimum completion time      if (j.getStartTime() + j.time > time) {          time = j.getStartTime() + j.time;      }   }    return time; }    Can someone explain the loop condition? it looks new to for me. Thank you

Consider:  List<String> someList = new ArrayList<String>(); // add "monkey", "donkey", "skeleton key" to someList     for (String item : someList) {     System.out.println(item); }   What would the equivalent for loop look like without using the for each syntax?


I'm not sure how well this question fits into MSE, but no other community (probably except mathoverflow) has as many mathematicians as MSE who might be able to answer this question.  In the departments of mathematics in Russia (and probably other post-Soviet countries) it is very common to have oral theoretical-oriented exams as opposed to written exams where one is offered to solve problems. For example, for a course in analysis, the students are expected to be able to reproduce proofs of all theorems in, say, Chapters 1-9 of Baby Rudin. At the same time, my experience has shown that many students are not able to apply e.g. the Implicit Function Theorem and they just learn proofs by heart. I wonder what's the point of making the students memorize proofs? How is the knowledge of the cumbersome proof of the Morse Lemma or the Rank Theorem (see the analysis syllabus below) supposed to be helpful? Of course, there are theorems whose proofs only test the knowledge of definitions, and it just impossible not to know their proofs for someone who understands what's going on. But what's the point of making everyone memorize conceptually hard proofs instead of testing the understanding?  Note that I do not deny the fact that one should read and understand proofs of whatever theorem that they are studying. Below I'm giving examples of theorems which the students are supposed to know (with proofs of course), restricting myself to the sophomore year. But the same is expected from freshmen. Mind you that there is no introductory "Calculus" courses, the first "analytical" course is real analysis (covering for example Zorich's book). I'm saying this to emphasize that the students who come from ordinary high schools have a hard time understanding the basics, and yet they are required to memorize complicated proofs as opposed to being able to work with the theorems.  I do realize that writing proofs is an essential part of a mathematician's job, but I find it much more reasonable to learn how to do proofs by solving proof-oriented problems as opposed to memorizing proofs of theorems that took the humanity hundreds of years to come up with.  Here are some examples (lists of theorems whose proofs the students (sophomores) are supposed to know), in Russian [but you can use Google Translate]:   ()

This is a question I have been thinking about for a while, which seems especially important as I hope to transition from undergraduate to graduate study in the next year, where studying for an exam becomes less important and studying for actual learning becomes more important.   I have always been required as part of my degree to learn proofs. Seemingly, basically, just memorising them line-by-line - there might be other methods for answering "prove [random proposition in the lecture notes]" questions, but memorisation is most effective and effectively forced by a tight time limit.   I always thought there had to be a good reason these kind of questions were put - in fact, apparently required by guidelines to be put - in the examinations. Therefore, even when teaching myself maths, I put in the effort to memorise as many proofs of theorems and propositions as I could. This especially seemed useful for maintaining understanding over long periods of time.   Now, I wonder if this was all just a bit of a waste of time. I have read many people commenting here that doing problems is far more useful - "you learn maths by doing it".   Am I wrong? Is there value in memorising proofs (after having read and understood them, not as opposed to skipping them entirely)? Or is this just a waste of time? What about when reading research papers?


Let $V$ be a vector space and $A,B\in\mathcal L(V)$, the set of linear operators on $V$. Suppose $AB=I$. Must $BA=I$? In other words, do left and right inverses coincide? If not, do conditions of finite-dimensionality of $V$ or boundedness of $A$ and $B$ change anything?  I am asking because I know that for a group, the existence of left inverses or right inverses alone guarantees existence of the other, with both coinciding. But the set of operators with, say, left inverses, doesn't automatically form a group, so I am not sure whether this applies. But I can't think of any example of square matrices with different left and right inverses.

If $A$ and $B$ are square matrices such that $AB = I$, where $I$ is the identity matrix, show that $BA = I$.    I do not understand anything more than the following.   Elementary row operations. Linear dependence. Row reduced forms and their relations with the original matrix.   If the entries of the matrix are not from a mathematical structure which supports commutativity, what can we say about this problem?  P.S.: Please avoid using the transpose and/or inverse of a matrix.


Let n be a natural number. Prove that if 2^n -1 is prime, then n is prime.  I have considered proof by contradiction, as well as writing the converse and contrapositive of the statement out, but still cannot seem to come up with a proof.  Any help is appreciated

Problem: $$\text{ If } 2^{n} - 1 \text{ is prime then n is prime}$$  Proof 1: $$\text{If } n = kl \text{ with } 2 \leq k, l < n \text{ then } (2^{k} - 1)|(2^{n} - 1). \text{ Hence if } 2^{n} - 1 \text{ is prime, n must be prime }$$    Proof 2: Using the identity: $$2^{n} - 1 = ( 2 - 1 )( 2^{k-1} + 2^{k-2} + ... + 1 )$$  $$\text{ Let }n = rs, \text{ then } 2^{n} - 1 = ( 2^{r} - 1 )( 2^{r(s-1)} + 2^{r(s-2)} + ... + 1 )$$  $$\text{ However each factor on the right exceeds 1 contradicting with the fact that } 2^{n} - 1 \text{ is prime }$$  Hence, n is prime.  Proof 1: I have no idea what the author's purpose.     Proof 2: I understood a little bit. Can anyone help me explain why n must be prime? I am totally lost with the above proofs. If we let $ n = rs $, then what can we say about $n$ with $2^{n} - 1$ is prime?


Is it possible to edit the title bar display in Notepad++ ?  Currently I see  C:\Users\Tony\Desktop\lmx.txt - Notepad++   I would like to see just  lmx.txt - Notepad++   Thank you for your help.

Is there a way to remove the full file path from the title in Notepad++?  Let's say I only wanted the file name to be displayed there. How can this be done?


I know that if $u\cdot v = 0$ then by definition, $u_1v_1 + u_2v_2 + \cdots +  u_nv_n = 0$  I also know that if $u$ and $v$ are linearly independent and a matrix $A$ has $u$ and $v$ as its successive column vectors then the equation $Ax = 0$ will have only the trivial solution.   However I can't think of anything else that might help me answer this question.

If we have vectors $V$ and $W$ in $\mathbb{R^n}$ and their dot product is $0$, are the two vectors linearly independent?  I can expand $V_1 \cdot V_2 = 0 \Rightarrow v_1w_1+...+v_nw_n = 0$, but I don't understand how this relates to linear independence.


How to find the number of weakly increasing functions of $g: \{1,2,3,....m\} \rightarrow \{1,2,3,....m\}$? Here weakly increasing means that $x < y$ implies $g(x) \le g(y)$.    Attempt: The first element $1$ has $m$ choices(including $1$), second element has $m-1$ choices ..... So I get $m!$ , is this right?

Let $f$ be a function from $X=\{1,2,3,...,n\}$ to itself. We say $f$ is increasing if $a\le b$ then $f(a)\le f(b)$. How do we find the number of increasing functions?    I think if we can define $f(1)$ then we can count. But it is very difficult.


Since I have 4 GPUs   $ lspci | grep VGA 02:00.0 VGA compatible controller: NVIDIA Corporation GM200 [GeForce GTX TITAN X] (rev a1) 03:00.0 VGA compatible controller: NVIDIA Corporation GM200 [GeForce GTX TITAN X] (rev a1) 83:00.0 VGA compatible controller: NVIDIA Corporation GM200 [GeForce GTX TITAN X] (rev a1) 84:00.0 VGA compatible controller: NVIDIA Corporation GM200 [GeForce GTX TITAN X] (rev a1)   and here is the content of /etc/X11/xorg.conf.failsafe  $ cat /etc/X11/xorg.conf.failsafe Section "Device"     Identifier  "Configured Video Device"     Driver      "vesa" EndSection  Section "Monitor"     Identifier  "Configured Monitor" EndSection  Section "Screen"     Identifier  "Default Screen"     Monitor     "Configured Monitor"     Device      "Configured Video Device" EndSection   My question is what the current graphic driver this machine is using?

I would like to try a different video display driver, but I'm not sure which one I'm currently using.    What's the simple way to see what driver my system is using currently?


I brought a WD Elements 1tb external hdd and I'm planning to install Ubuntu on my laptop.(not a dual boot). So I was wondering will the hdd work on Ubuntu, it's ntfs formatted.I dont want to format it again just for ubuntu. i want it to be able to work on different os platforms as well

My machine is currently running Windows 7. I have 2 partitions: OS (C:) and DATA (D:). I intend to do a native Ubuntu 14.04 install. Assuming I format my Windows OS partition, will I have full access to my D partition in Ubuntu ?


line 1 does  not contain anything I have checked this by using sudo gedit /etc/apt/sources.list command. Got this error during repository update.

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


I haven't seen any nice app frameworks for clojure yet. Are there any good sdks with binding for clojure or clojure script?

What is the best way to do GUIs in ?  Is there an example of some functional  or  wrapper? Or some integration with  declarative GUI description which could be easily wrapped to  using some macrology?  Any tutorials?


I have an old pc with 3GB of RAM and a Centrino Duo 1.66 GHz. I would like to install Linux but I don´t know which Linux distribution is the best. Any help with this is welcome.

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I wrote a tiny software that retrieves some data from a MySQL database and shows them through labels in a table format. Now for each "row" (or information) the user has the possibility to remove that info from the MySQL Database. So, that's some piece of code:  public Form1() {    InitializeComponent();    MySqlConnection conn = null;    MySqlDataReader mainrdr = null;    if (open_connection()) //open_connection simply opens a connection to MySQL DB and returns true or false according if the connection was opened with success or something else.    {       string query = "SELECT * FROM res_ev;";       MySqlCommand cmd = new MySqlCommand(query, conn);       mainrdr = cmd.ExecuteReader();       While(mainrdr.Read())       {         Label label = new Label();         Button button = new Button();         ...         ... //DEFINING PROPERTY OF THESE OBJECTS         ...         string inform = mainrdr.GetString(0);         button.Click += new EventHandler((s, e) => remove(s, e, inform));         ...         ...       }       ...    } } private void remove(object sender, EventArgs e, string info) {    MessageBox.Show(info);    ...    ... }   The problem is: The string "inform" during the While clause assumes Always the right information  For ex.   Loop 1 inform is Apple and in button.Click in remove function inform is Apple; Loop 2 inform is Book and in button.Click in remove function inform is Book; Loop 3 inform is Marshmallow and in button.Click in remove function inform is Marshmallow   but when I click each button dynamically created, all shows up the last string that was assumed by inform during the While clause.  So I want that if I click the first button (created in loop 1) it has to show "Apple", the second one "Book" and the last one "Marshmallow".  Any idea to resolve that?

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


This in Java as well.  I can't seem to get this method to work, the saving part works great and saves the object. But once I try to read the file it doesn't work and I get ObjectInputStream errors. I'm new to using the Serializable interface and none of the other questions seem to help me.  The expected output is name Joe, weight 153, height 69.  The errors are:    java.io.InvalidClassException: Person; local class incompatible: stream classdesc serialVersionUID = -1404541419531259795, local class serialVersionUID = 3020781085877336930     at java.io.ObjectStreamClass.initNonProxy(Unknown Source)     at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)     at java.io.ObjectInputStream.readClassDesc(Unknown Source)     at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)     at java.io.ObjectInputStream.readObject0(Unknown Source)     at java.io.ObjectInputStream.readObject(Unknown Source)      public static boolean save(Person p, String filename) {         try {         ObjectOutputStream os = new ObjectOutputStream(                 new FileOutputStream(filename));         os.writeObject(p);         os.close();         return true;     } catch (Exception e) {         e.printStackTrace();     }     return false; }      public static Person read(String filename) {     try {         ObjectInputStream oi = new ObjectInputStream(new FileInputStream(                 filename));         Object o = oi.readObject();         oi.close();         if (o instanceof Person)             return (Person) o;     } catch (Exception e) {         e.printStackTrace();     }     return null; }  public static void main(String[] args) {     Scanner s = new Scanner(System.in);     System.out.println("Do you want to save or load?");     String option = s.next();     Person p = new Person("Joe", 154, 69);     if (option.equals("save")) {         if (save(p, "newfile")) {             System.out.println("Saved.");         }     }     if (option.equals("load")) {         Person p1 = read("newfile");         if ((p1 != null)) {             System.out.println(p1.getInfo());         }     }  }   }

Eclipse issues warnings when a serialVersionUID is missing.       The serializable class Foo does not declare a static final   serialVersionUID field of type long   What is serialVersionUID and why is it important?  Please show an example where missing serialVersionUID will cause a problem.


I found out today that $- gives the options with which bash was started.  $ echo $- himHB   I would like to know in which file these options to bash were set or which file runs bash with these options.

I  that the default shell that I use when I start Terminal (with Ctrl+Alt+T) is /bin/bash.   And running the built-in command  on  as:   type -p bash   returns the result as:  /bin/bash   Suggesting the same executable is run when I do Ctrl+Alt+T or say bash.  This shell is the same as an invocation of the command  with some of its options passed to it right? If yes, what are these options?   As an example, perhaps the -i option gets passed so as to make the bash shell interactive?   PS: Maybe  is related too, but I cannot seem to piece together all the pieces here.


I happened to find a chart showing a rank of countries based on their frequent use of VPNs.  Someone wrote "to think my country is at the first place." (and this was the only sentence he wrote)  What does this really mean? (It seems that the "commenter" was surprised by the fact) Is this a common expression in English?  I have tried Googling this, and found nothing. I will be grateful for any help you can provide.

I have this Magic: The Gathering card flavor text: “To think some believe it peaceful to die in one's sleep.”    What exactly that “to think” means?


So im kinda new to java and i followed some tutorials, and he showed an example of how to use arrays in methods like this:  public static void main(String[] args){     int myArray[] = new int[2];     myArray[1] = 1;  //Setting the array to equal 1     change(myArray);      System.out.println(myArray[1]);  //Prints 2 instead of 1 }  public static void change(int a[]){     a[1] = 2;  }   But when i change the array to an int it suddenly doesn't work anymore:  public static void main(String[] args){     int myInt = 1;  //Setting the int to equal 1     change(myInt);      System.out.println(myInt);  //Still prints 1 }  public static void change(int a) {     a = 2; }   So my question is: Why can i change the array with a method but not the int?

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


! If you have a multiline spoiler, you get a post that looks like this.      ! The spoiler tag does not work and breaks on a line break. Neither spoiler works and it immediately converts to a normal "quote."   The expected behavior would be similar to a multiline quote:     Hello      World   except the entire block being converted to a spoiler.    The following also behaves... weird:           Line 1         ! Line 2   Converting it to:          ! Line 1          ! Line 2      Also causes more unexpected behavior (but more expected than the previous example).

The markdown >! a  >! b  >! c  Will be shown as a blockquote with ! in front of it:   a    b    c  Instead of a spoiler for 3 paragraphs (or 3 spoiler blocks, whatever).


I saw from "Advanced Engineering Mathematics, 10th Edition" by Kreyszig, p. 400, that the solution $V$ of the Laplace's equation,  $$\nabla^2 V = \frac{\partial^2V}{\partial x^2}+\frac{\partial^2V}{\partial y^2}+\frac{\partial^2V}{\partial z^2} = 0,$$  is a potential function.  However I thought I can manipulate the expression as $\nabla^2V=0 \ \rightarrow \ \nabla \cdot (\nabla V)=0$. Because $\vec{F}=-\nabla V$, I can write the expression as $\nabla \cdot \vec{F} = 0$.  I did an example calculation with the gravitational force:  $$\vec{F} = - \frac{GMm}{r^2} \hat{r} = - \frac{GMm}{(x^2+y^2+z^2)^{3/2}} \ (x, y, z)$$  and I got $\text{div} \ \vec{F} = \vec{0}$.  But why is this not introduced in most mathematics / physics books?  Or is there any exception?

I just started in Griffith's Introduction to electrodynamics and I stumbled upon the divergence of $\frac{ \hat r}{r^2} \equiv \frac{{\bf r}}{r^3}$, now from the book, Griffiths says:  Now what is the paradox, exactly? Ignoring any physical intuition behind this (point charge at the origin) how are we supposed to believe that the source of $\vec v$ is concentrated at the origin mathematically? Or are we forced to believe that because there was a contradiction with the divergence theorem? Also how would the situation differ if $\vec v$ was the same vector function but not for a point charge? Or is it impossible?


She is dutch and I am a US citizen. Her immigrant visa case is in the process and applied for.

This community wiki explains the current restrictions by the United States of America on the entry of individuals who may pose a risk of transmission of the SARS-Cov2, the virus which causes the Covid-19 disease.


I don't know which group I belong to. I don't know to which group I belong.     Which one of the sentences is true?    Note: An answer was given to this question when it still read "I don't know (to) which group do I belong (to)."

Like many others, I commonly find myself ending a sentence with a preposition.  Yes, it makes me cringe.  I usually rewrite the sentence, but sometimes (in emails) I just live with it.  To, with... you know who you are.  Should I keep fighting myself on this one, or is it okay in some circumstances?


How come I don't get any upgrade notice on my ubuntu 16.04 LTS for an upgrade to 18.04? Shouldn't I normally receive an upgrade notice on my system? On the ubuntu wiki it says: Upgrades from 16.04 LTS will not be enabled until a few days after 18.04.1's release expected in early August. It's been more than two weeks since the release of 18.04.1! Should I wait for a upgrade notification or I can proceed and upgrade? Thanks

I understand that the first point release of Ubuntu 18.04, namely 18.04.1 is now available and that my system should now offer it as an update.  My current OS version is 16.04.5 LTS. In System Settings/Software and Updates I have set 'Notify me of a new Ubuntu version' to 'For long term support versions'. I have tried both the main server and the server for United Kingdom, neither offers an update when Software Updater is clicked or via the Ubuntu Software icon.  Can anyone please tell me why I don't get the option of updating to 18.04?  Edit:  I don't remember the details exactly, but I think that my last LTS point release update was offered automatically a lot sooner after the published release date than where we are now with 18.04.1.  Edit 10th August  It appears that there has been some problem with the update process and that it should be fixed next week, see:    Edit 14th August 18.04.1 LTS now available from UK server,


Consider the below code.  x = 10 y = 10 print(id(x)) print(id(y))   Output:  140710803641440  140710803641440  Now, give same values outside the range [-5,256]  x = 257 y = 257 print(id(x)) print(id(y))   Output:  2366730643376  2366730642864

Why does the following behave unexpectedly in Python?  >>> a = 256 >>> b = 256 >>> a is b True           # This is an expected result >>> a = 257 >>> b = 257 >>> a is b False          # What happened here? Why is this False? >>> 257 is 257 True           # Yet the literal numbers compare properly   I am using Python 2.5.2. Trying some different versions of Python, it appears that Python 2.3.3 shows the above behaviour between 99 and 100.  Based on the above, I can hypothesize that Python is internally implemented such that "small" integers are stored in a different way than larger integers and the is operator can tell the difference. Why the leaky abstraction? What is a better way of comparing two arbitrary objects to see whether they are the same when I don't know in advance whether they are numbers or not?


The words "opportunism" and "opportunist" suggest the ability to take advantage of situations -- but they assume that one is doing so for one's own benefit, which makes the terms pejorative.   What is a non-pejorative word in English that means "have the skill and wisdom to recognize and seize opportunities that lead to broad gains"?  I am looking for something that is part of the "art" of diplomacy and politics, for example.    "Clever" is a somewhat helpful adjective, but there is no such thing as a "cleverist."  "Entrepreneur" means is a person who is willing to take on risk and innovate, but lacks the sense of seizing opportunities as they emerge.  It seems like an important concept that has no word.  Any suggestions?

The word opportunist seems to be used negatively for a person.    Is there a word with the same but positive meaning?


Let $d=(a^n,b^n), d_1=(a,b)^n$; need show $d\mid d_1$ & $d_1\mid d$ to prove.  For the general case of $(a,b)\ne 1, (a,b)= (d_1)^\frac{1}{n}$, else $(a,b)=d_1$.  Let, $d_2= (a,b)=d_1^\frac{1}{n}\implies a=a'd_2, b = b'd_2\implies a^n= (a')^nd_2^n, b^n= (b')^nd_2^n$  Unable to progress further.

Let $a$ and $b$ be two integers. Show that $\gcd(a^2, b^2) = \gcd(a,b)^2$.   This is what I have done so far:  Let $d = \gcd(a,b)$. Then $d=ax+by$ for some $x,y$. Then $d^2 =(ax+by)^2 = a^2x^2 + 2axby+b^2y^2$.  I am trying to create a linear combination of $a^2$ and $b^2$ but do not know what to do with the middle term.  EDIT: I would be interested in seeing a proof using the Fundamental Theorem of Arithmetic as well. I simply thought it would be easiest to use Bezout's Identity.


I'm currently in an introductory physics class, and we've learned about Gauss Law defining the flux as  $$\int d\phi  = \oint EdA = \frac{q}{\epsilon_0} $$ and from what I understand the way to arrive at this equation is to assume a source at the center of a sphere, so the electric field at every point is the same. $$\oint EdA = E\oint dA = EA = (\frac{1}{4\pi\epsilon_0})(\frac{q}{r^2})(4\pi r^2) = \frac{q}{\epsilon_0}$$ So I understand how to derive Gauss' Law, and I see how it can be applied to spheres, but I can't see mathematically how this law can be generalized for any enclosed surface. Wouldn't there be a change in derivation for any other shape? Or am I missing something?

On a similar note: when using Gauss' Law, do you even begin with Coulomb's law, or does one take it as given that flux is the surface integral of the Electric field in the direction of the normal to the surface at a point?


Merry Christmas and Happy New Year are proper nouns. But, why are they used with an indefinite article as in "I wish you a Happy New Year/Merry Christmas.

On the very first Christmas card it was written as "A Merry Christmas and a Happy New Year..."   In Wiktionary that same general phrase is "Merry Christmas and a Happy New Year"   A few quick searches in Google show that many people use it without any articles at all:     Merry Christmas and Happy New Year   Does anyone have a source explaining if one of those phrases is more correct than others and if there's any difference implied by the number of articles used?   Edit just to make it more clear: I'm asking for the case when you design a Christmas card, for example, and you have to write the phrase on the card — not personally to anybody, but rather as an impersonally commercial message to the general audience.


Considering all opposing players are on the left side of the pitch, is player 22 offside ? I drew this on paint so please pardon the laziness. Might seem odd as a question but all opposing players are on my side (left side) of the pitch does that not free the player 22 ?

The offside rule on the pitch is often unclear and called suddenly. How do I know if a player is offside?


Soap operas have a distinctive look to them in terms of motion and feel. It's a bit difficult to describe. What exactly creates this look?   I have heard it compared to  films such as the 48 fps version of The Hobbit trilogy, with some describing it specifically as having a "soap opera" look to them. Is it the same thing that creates this appearance in both soap operas and HFR movies?

The soap opera effect occurs when frame interpolation is used. For example, if a movie is shot at 24 frames per second and then shown on a TV screen which is capable of displaying 60 frames per second then it is possible to use a computer to do motion interpolation. In other words the computer can average (interpolate) two frames and create a synthetic third frame and stick it between the two real frames.  This interpolation makes the picture look unnatural and plastic, somewhat like soap operas look on TV, hence the name.  My understanding of why soap operas have the soap opera effect has something to do with the fact that many of them are shot using camcorders instead of film, but I am not completely sure.  Why do soap operas have the soap opera effect?


I'm looking for the Mac keyboard shortcut equivalent of "windows key + left/right/top arrow" to resize windows (not split view)

In Windows 7, we can easily arrange two windows with these shortcuts: Option (Alt) ⌥ + ← maximizes the window to the left side of the screen, and Option (Alt) ⌥ + → maximizes the window to the right side of the screen.  I'm using a 27" iMac now, and I'd really like to do this. Does Mac OS X have this functionality?


I was able to push my effective rating over 4000 before I started the final assault on Earth and received the "Master and Commander" trophy.  I then got to just after you are beamed up to the Citadel and saved.  Due to some personal issues I didn't get back to the game and now my Readiness rating is down to 60% (which BTW is the worst "feature" of this game).  Does anyone know if my effective rating was "locked" in when I started the assault or do I need to grind it back up to 80%?  It's also annoying you can't find this data without being on Normandy.  :-(

I just finished Mass Effect 3, though I didn't play the multiplayer and my war readiness was therefore at only 50%. So I didn't have enough war assets to get to the best ending.  I now want to play some multiplayer and get that war readiness to a good value, so that I can get the best ending with the same playthrough. I'm wondering now from which point on I need to replay to have my increased effective war asset score count.  At which point in the game is the ending you get determined? When are the war assets counted, the war readiness evaluated and the ending "locked"?


package ru.reflection; public class ReflectionTool {     public static void main(String[] args) throws IOException {      } }   I am working in Intellij IDEA. The main class is located in path_to_my_project/out/production/ru/reflection/Reflection.class  How can I get File object for folder where from Reflection.class was loaded -  path_to_my_project/out/production/ru/reflection/ ?

Does anyone know how to programmaticly find out where the java classloader actually loads the class from?    I often work on large projects where the classpath gets very long and manual searching is not really an option.  I recently had a  where the classloader was loading an incorrect version of a class because it was on the classpath in two different places.  So how can I get the classloader to tell me where on disk the actual class file is coming from?  Edit: What about if the classloader actually fails to load the class due to a version mismatch (or something else),  is there anyway we could find out what file its trying to read before it reads it?


I have a lot of views and I want to add a filter to just one of them. This view is called soccer_news_feed and I want it to check out my custom field: field_data_field_is_score and display if it's not 1.  So in a hook_update_n I have this code:  $view = views_get_view("soccer_news_feed");  $view->add_item(   $view->current_display,   'filter',   'field_data_field_is_score',   'field_is_score_value',   array('operator' => '<>','value' => array('value' => 1)) );   So I thought maybe this work but I get this error when I run updb:  PHP Fatal error:  Call to a member function get_option() on a non-object in /var/www/public/sites/all/modules/contrib/views/includes/view.inc on line 2450   I'm very lost on this.

I have a page view with exposed filters. One of the filters is term vocabulary, and that's dropdown list, user can select only one category (term).   I want to set programmatically one term from dropdown list when I came from specific URL. I tried with views_query_alter where $category is tid.    $set_exposed_input  = array();  $set_exposed_input['field_category_tid'] = $category;   if ($set_exposed_input) {     $view->set_exposed_input($set_exposed_input);  }


I have the following armature, and I want to write a code sets the position each bone pose to a new pose. In the image below I've added cubes to indicate the desired positions for the armature. However, I couldn't find any systematic way to set the bones position. I found a way using convert_space, however I can't set separatelly the position of the tail and bone. Does someone have a good idea? EDIT: There is a similar question that shows how to properly get the bones position, however my intention here would be to SET the bones position, and that I couldn't do succesfully.

Is there a command for getting world-space matrix of pose bones, same as obj.matrix_world for objects? I found pose_bone.matrix, but it gives weird result for me.


I would like the first word (i.e. Programming) to be hyphenated, but it is not and it is running into the column beside it. I'm thinking that since it is a standalone word, LaTeX is trying to avoid hyphenating it?  \documentclass[11pt]{article} \usepackage{array,tabularx} \begin{document}     \begin{tabularx}{2in}{@{}p{0.3in}@{\hspace{3ex}}X@{}}         Programming &  Python, MATLAB, R, FORTRAN\\     \end{tabularx} \end{document} %  also tried this in place of p column: >{\raggedright\hsize=6ex\arraybackslash}X Also tried removing @{\hspace{3ex}} between columns

I have a table table and the first column is a multirow. The multirow column text exceeds the column with.   \documentclass{article}  \usepackage[dutch]{babel} \usepackage{ragged2e} \usepackage{ltablex, multirow, makecell, caption}  \begin{document}  \keepXColumns\setcellgapes{3pt}\makegapedcells \begin{tabularx}{\linewidth}{|p{25mm}|*{3}{>{\RaggedRight\arraybackslash}X|}}   \caption{My caption}   \label{my-label} \\    \hline  Onderwerp & Persoonlijk niveau & Professioneel niveau & Samenlevingsniveau \\ \hline     \multirow{4}{*}{Perspectief: Wat is het hogere doel}      & Wat is jouw hoge doel in het leven?  & Wat is jouw hoge doel in je beroep? &  Wat is jouw hoge doel in de samenleving? \\ \cline{2-4}     & & & x \\ \cline{2-4}   \hline  \end{tabularx}  \end{document}     How can I make the text wrap and go to next line when the line is longer then the column width like the other columns?


I struggle to understand why if $A\in M_n(\mathbb{C}) $, $\det A=0$ and $rank A \le n-2$, then $A^*=O_n$. Could you please tell me why this claim holds? My textbook offers no proof for this.

Let $A \in M_n(\mathbf{C})$ and let $B = \operatorname{adj}(A)$ be the adjugate matrix.      a) Prove that if $A$ is invertible, then so is $B$.   b) Prove that if $A$ has rank $n-1$, then $B$ has rank $1$.   c) Prove that if $A$ has rank at most $n-2$, then $B = O_n$.   a) We have that $A$ is invertible, so $\det(A) \neq 0$. The rank of $A$ is $n$. Also $$     A \operatorname{adj}(A)   = \operatorname{adj}(A) A   = \det(A) I. $$ But what next? Please help me to solve the problem using elementary theory  of matrix algebra (also please do not use the rank–nullity theorem).   EDIT: b) Clearly $\det(A) = 0$. Then $$     A \operatorname{adj}(A)   =  \operatorname{adj}(A) A   =  \det(A) I   =  0, $$ i.e. $A \operatorname{adj}(A) = 0$. But how does this imply that $\operatorname{adj}(A)$ has rank $1$?     May I request for any alternative solution of the problem? Can we conclude the result from $A \operatorname{adj}(A) = 0$?


While i'am trying to execute this code IN IDLE, i got error :  import arcpy import math import arcview from arcpy import env   arcpy.env.workspace = "D:/Users/saadiya/Documents/ArcGIS/Default.gdb" arcpy.env.overwriteOutput = True  #Create a table of neighbors  arcpy.PolygonNeighbors_analysis("Parcelles_class_copy","Voisins_table") #Parcelles_class_copy est le résultat de la conversion de dwg en polygon   #Select each table neighbors for i in range(1,8) :     expression = '"src_OBJECTID"=' + str(i)     output_table = "output_table" + str(i)     arcpy.TableSelect_analysis("Voisins_table", output_table, expression)     #print expression  #***************** supprimer la table Voisins_table ********************************************************************** arcpy.Delete_management("Voisins_table")  #Joint table of neighbors to feautre class arcpy.AddJoin_management("Parcelles_class_copy","OBJECTID", output_table,"nbr_OBJECTID","KEEP_ALL")  del expression       #Select a target parcel  target_parcel = "target_parcel" + str(i) whereclause1 = '"Parcelles_class.OBJECTID"=' + str(i) arcpy.Select_analysis("Parcelles_class_copy",target_parcel,whereclause1) arcpy.RemoveJoin_management("Parcelles_class_copy",output_table)   i got this error :   ERROR 000840: The value is not a Raster Catalogue Layer ERROR 000840: The value is not a Raster Layer. ERROR 000840: The value is not a Mosaic Layer Failed to execute (Addjoin)

I am doing some arcpy -functions and afterwards I'm trying to add the calculated results from one table to another table. I'm using the arcpy.AddJoin_management() function.   As input table I'm using a table which is stored in a personal geodatabase. The personal geodatabase is not the workspace environment! As "JoinTable" a Table of a file geodatabase is used. This file geodatabase is the workspace geodatabase environment.  The initialized function looks like this:  (%self.getWorkspaceEnvironment => "W:/a18fb/data/mypersonalgeodatabase.mdb" and tFactsheetHochwasser => table in the personal geodatabase)  arcpy.AddJoin_management("%s/tFactsheetHochwasser"%self.getWorkspaceEnvironment(),"KPG", "GebaeudeKtn_BWVred1Stat","KPG","KEEP_ALL")  If the code is executed the following error-message appears:  Failed to execute.Parameters are not valid. The value cannot be a table     ERROR 000840: The value is not a Raster Layer.      ERROR 000840: The value is not a Raster Catalog Layer.      ERROR 000840: The value is not a Mosaic Layer.      Failed to execute (AddJoin)`.


"This area is monitored constantly" vs. "this area is constantly monitored"   Which is grammatically correct?

In the following sentence I'm not sure where to put implicitly:     The language doesn't support Int and (implicitly) converts (implicitly) Int to Double (implicitly).   First I put it at the end, because I learned:     The man drove the car carefully.   But somehow it sounds strange: converts Int to Double implicitly.  Most natural to my ears is implicitly at position two so I would place it there, although comparing  to  indicate to put it at the first place (Same for converts (with s)). But most Google hits show its use with cannot, should, ..., so I'm unsure which one is correct in my example above.  Which one is correct and why?


What is the difference between:   p = (int*) malloc (5*sizeof(int));   vs  int *ptr = new int[5];   Is the top one C's version of memory allocation for a pointer to point to create a spot in memory for 5 integers? Then the bottom is C++'s version? Where do they appear in memory (if they do).

What is the difference between new/delete and malloc/free?  Related (duplicate?):


I am trying to setup my server so that I can restart Apache as userx without having to enter a sudo password.  However when I logon as userx and run sudo /usr/sbin/service apache2 restart it asks me for a password.  What have I got wrong?  Below is the content of my sudoers file.  # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults        env_reset Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"  # Host alias specification  # User alias specification userx ALL=(root) NOPASSWD: /usr/sbin/service apache2 restart  # Cmnd alias specification  # User privilege specification root    ALL=(ALL:ALL) ALL  # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL  # Allow members of group sudo to execute any command %sudo   ALL=(ALL:ALL) ALL  # See sudoers(5) for more information on "#include" directives:  #includedir /etc/sudoers.d   Let me add back in my edit where I point out what the answer was and explain where I found the solution in case other people stubmle across this.  Turns out that userx was a member of the admin group and the %admin group entry was overwriting the settings. Moving the userx line below the %admin line solved the problem.  This answer also helped

I need to run something as sudo without a password, so I used visudo and added this to my sudoers file:  MYUSERNAME ALL = NOPASSWD: /path/to/my/program   Then I tried it out:  $ sudo /path/to/my/program [sudo] password for MYUSERNAME:    Why does it ask for a password? How can I run/use commands as root with a non-root user, without asking for a password?


What is the difference between      A Random Variable is a variable which represents the outcome of a random experiment.   and     A Random Variable is a variable that represents the outcome of a random experiment.   ?

When is it appropriate to use that as opposed to which with relative clauses?


Where would be a good place to ask general performance related questions about websites and webapps?  The Stack exchange communities Stack Overflow, Server Fault, Webmasters and Web Applications would be a possibility.  (What do I mean by "general"? E.g. discussing the  suggestions list)

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


I am interested in knowing whether it is clear (undisputed) that the density of matter/energy increases as we approach the time of the big bang?   Does this follow from the FLRW metric?

What was the density of the universe when it was only the size of our solar system?  Did it approach neutron star density?  Is it physically correct to even ask such a question?


Let a real sequence {$x_n$}$_{n\ge 1}$ be such that $\lim_{n \to \infty} nx_n=0$ Find all real values of t such that  $\lim_{n \to \infty} x_n(\log n)^t=0$ My approach is $\log n\to \infty$, so $t > 0$, but I am not sure about it. Also, I am not sure how to write the solution.

How can I prove that $\log^k(n) = O(n^\epsilon)$? (for any $\epsilon > 0 $ and for any integer and positive $k$).  I tried to do it by - definition , and to prove that exists $c,n_0 > 0$ so that for any $n > n_0 $ exists: $c \cdot n^\epsilon > \log^k(n) $, but I don't have idea how to continue for this point.    I will be happy to listen ideas :).


How can I prove (without polar coordinates) that the $\lim \frac{x^2+y^2}{x-y}$ when $(x,y)\rightarrow (0,0)$ does not exist? Moreover, can I use $(x^2+y^2)=(x+y)(x-y)$ in this case?  If I do it seems strange because I would get $\frac{x^2+y^2}{x-y}=x+y$ and the limit would be zero. Whereas if I try finding the limit along $y=mx$, the function becomes $\frac{x(1+m^2)}{1-m}$ which suggest that if m approaches 1 the function goes to $\pm \infty$.   If I try polar coordinates I get $\frac{r}{\sin{a}-\cos{a}}$ which suggests that the limit does not exist (and if a approaches $\pi/4$ the expression is $\pm \infty$. Than you!

I'm having a difficult time trying to find two different paths that give me different limits  for the following:  $$\lim_{(x,y) \rightarrow (0,0)}  \frac{x-y}{x^2 + y^2}$$


Let $A$ be a ring such that for any $x \in A, x^2=0$ implies $x=0$.  Show that if $a \in A$ satisfies $a^3=a$ then $2a$ is in the center of $A$.  I have no idea how to use the $x^2=0$ implies $x=0$ thing. My progress is as follows: note that if $a^3=a$ then $6a = 0$.  Denote by $B$ the set of $a$'s in $A$ for which $a^3=a$. I suspect that $B$ actually induces a subring. First of all, $B$ is closed under taking inverses: if $a^3=a$ then $(-a)^3 = - (a^3) = -a$ so $-a \in A$. Also $B$ is closed under addition: if $a \in B$ then $(2a)^3 = 8a^3 = 8a = 2a; (3a)^3 = 27a^3 = 3a$ and $4a = - 2a, 5a = -a$.   Let's say this actually induces a subring. Then the subring is of characteristic at most $6$, so it is of characteristic $1,2,3$ or $6$. If it is of characteristic $1$ or $2$ it is trivial that $2B$ is in the center of $A$. Otherwise I dont know how to proceed.  Edit: indeed I don't think this forms a subring. I proved it: here is a quick outline: Since the ring is reduced, any idempotent element is central. If $a=a^3$ then $a^2=a^4$ so $a^2$ is idempotent and thus central. We can show that if $a^3=a$ then $(a+1)^2$ is idempotent and thus central. Then since the center of the ring is a subring, we have that $(a+1)^2-a^2-1$ is in the center so $2a$ is in the center.   The problem now asks to show that any two elements of $B$ commute; That is, if $a^3=a$ and $b^3=b$ then $ab=ba$. Haven't cracked this one yet so ideas are welcome.

Let $(A,+,\cdot)$ be a unity ring with the property that if $x \in A$ and $x^2=0$ then $x=0$. Consider the set $M=\{a\in A | a^3=a\}$. Prove that:      a) $2a\in Z(A)$, $\forall a\in M$, where $Z(A)$ denotes the centre of the ring $A$;   b) $ab=ba$, $\forall a,b\in M$.   My attempts revolved around the fact that an idempotent element in a reduced ring is central. So, since for $a\in M$ we have that $(a^2)^2=a^2$, it follows that $a^2\in Z(A)$, $\forall a\in M$. The next thing I wanted to use in order to solve a) was that $Z(A)$ is a subring of $A$, so if I had proved that $(a+1)^2 \in Z(A)$, $\forall a\in M$, then we would have reached the desired conclusion. However, I couldn't prove this and I honestly doubt that it is true. Another idea that I had was to prove that $M$ is a subring of $A$. Of course, this didn't work out because I cannot even prove that $M$ is closed under addition. Again, I don't know if this is true and it most likely isn't. As for b), I think that a) should be of use, but I don't know how. It is a well-known problem that a ring with $x^3=x$ for any $x$ in that ring is commutative, but since $(M,+,\cdot)$ is almost definitely not a ring, this doesn't help. EDIT: Is there any chance that this question is simply wrong? I tended to believe this before asking it here too, but since nobody has made any progress on it until now I am even more inclined to think so.


Good afternoon,  I'm a relatively new cyclist and I've been caught out in a heavy rain a few times recently.  After this, or if I was to wash my bike thoroughly, I'm not sure which parts of the bike to re-lube and what lube to use.  Obviously I should clean and re-lube the chain, but what about everything else?  For example in this video:                                  at 7:30 the presenter, after re-lubing the chain, shoots the front and rear derailleurs and adjacent parts with WD-40.  This seems backward to me, being that WD-40 is also a solvent I would have figured to clean the chain first, then shoot the front and rear derailleurs and adjacent parts with WD-40, then re-lube the chain with chain lube.  I've checked various other YouTube videos and websites, many suggest similar to above, but others recommend to re-lube each pivot point of the front and rear mech parts individually with chain lube.  Also, in the above video the presenter shoots the metal brake parts with WD-40.  This seems to make sense with rim brakes, but I've recently changed to a bike with disc brakes (cable, not hydraulic) and I'm apprehensive about spraying WD-40 or anything else near the relatively small and delicate brake pad friction material surfaces.  Can anybody suggest a recommended re-lubing procedure after heavy rain or a wash (pertaining to brake parts, please clarify advice for rim vs. disk brakes), thanks!  Edit: somebody linked this:  which contains similar advice but does not state clearly which front or rear mech parts or brake parts to lube after a heavy rain and with what type of lubricant.

I've tried avoiding riding during the rain for years because I didn't want to hurt my bike.  But, tomorrow I really want to ride, rain (most likely) or shine.  What should I do after the ride to ensure my bike remains in good shape?


public class MusicPlayerAndLibraryForm extends javax.swing.JFrame {  SongPlayer SP = new SongPlayer();  int audioLength; int audioPosition = 0;  AudioInputStream audioInputStream = null;  ArrayList<Song> songs = new ArrayList<Song>(); ArrayList<Song> songFileLibrary = new ArrayList<Song>();  String songFile;  Media media = new Media(songFile);  private MediaPlayer mediaPlayer = new MediaPlayer(media); private Slider seekSlider = new Slider();   int currentMusicLibraryIndex = 0; int currentSongFileIndex = 0; public static int count;   public MusicPlayerAndLibraryForm() {     initComponents();  }   private void jButtonPlayActionPerformed(java.awt.event.ActionEvent evt) {                                                  String songName = jListMusicLibrary.getSelectedValue();     songFile = jListSongFiles.getSelectedValue();       SP.Stop();      this.mediaPlayer.currentTimeProperty().addListener(new ChangeListener<Duration>() {    @Override    public void changed(ObservableValue<? extends Duration> observable, Duration oldValue, Duration newValue) {        MusicPlayerAndLibraryForm.this.seekSlider.setValue(newValue.toSeconds());    }    });     this.seekSlider.setOnMouseClicked(new EventHandler<MouseEvent>() {        @Override        public void handle(MouseEvent event) {            MusicPlayerAndLibraryForm.this.mediaPlayer.seek(Duration.seconds(MusicPlayerAndLibraryForm.this.seekSlider.getValue()));    }    });     jTextFieldSongPlaying.setText(songName);    SP.PlayBack(songFile); }      The culprits seems to possibly be the "Media media = new Media(songFile); " and "private MediaPlayer mediaPlayer = new MediaPlayer(media)" lines. I am unsure as to why the program is returning this error. I believe that all of my objects have been instantiated so I do not know where the program is getting null instead of an object.

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


When I try to start my new VM I get this error. server1@server1:~$ VBoxManage startvm roy --type=headless Waiting for VM "roy" to power on...       VBoxManage: error: VT-x is disabled in the BIOS for all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED)          VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole

I can't use VirtualBox. When I tried to create a ubuntu in it, after powering the virtual box on it gives this as output. Failed to open a session for the virtual machine Ubuntu GNOME.     VT-x is disabled in the BIOS for all CPU modes   (VERR_VMX_MSR_ALL_VMX_DISABLED).      Result Code: NS_ERROR_FAILURE (0x80004005) Component: ConsoleWrap   Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}   Please help me fix this.


I wonder if there is any way in Blender for saving render results in PSD (from what I can see it is not supported) or TIFF file with layers from passes (for example refletion pass, object id, material id pass and so on)? I know that it can be done with compositor, but the problem is that I`m looking for a fast workflow for hundreds of files and in general I need to put all those passes into photoshop layers anyway. So struggling with compositor is not an option for me.

How can I render all render passes for all of the frames of an animation in Cycles to different files or a file with multiple layers? I'm going to do the final compositing in another compositing package and I need to have access to the passes.


"My shift at work's kinda long, you know? It is -so I,ve usually got some time on my hands to, you know...whatever. Think, I guess."

My shift at work's kinda long, so I've got some time on my hands to, you know...whatever. Think, I guess.   What does "I have got some time on my hands" mean in the above quote?


What counts as water when casting the spell control water? I'm sure that the answer could be "that's up to the DM", but how does the DM justify this judgement? There's many ways to approach this question; here are a few examples:   Chemically: in that anything that mostly composed of H20 counts as water. Muddy river, glacial ice, frozen lake, mist, fog, etc. Intuitively: in that anything that seems like water counts as water. It's liquid, mostly clear, you can swim in it and drink it, etc.    Simplistic: where only liquid, mostly pure water counts as water.   Related question:   Spell information:

Imagine a scenario: A character doesn't have a spellcasting focus, and his party is going to die because they don't have water.  What else can be used as a component to cast the  spell?  The material component is listed as:     (a drop of water if creating water or a few grains of sand if destroying it)   But what counts as water for the spell? Can it be water from pee? Sweat? Anything else?  As a DM, would you let the player use something else like sweat?


I'm living in Seattle. Can I obtain a Schengen visa in Vancouver, BC, specifically at the Italian Consulate?

I'm a citizen of country A who would like to apply for a Schengen visa at a consulate in country B. When is this possible?


In my text book it is written that:      { } ⊆ { }; { } ⊆ {0/}; { } ⊆ { {0/} }; { } ⊆ C; and {0/} ⊆ C; {   {0/} } ⊆ C; but {0/} is not a subset of { {0/} } since the only   element of {0/} is 0/ and the only element of { {0/} } is   {0/}, so the element of {0/} is not an element of { {0/} }.   A set with no elements is an empty set, denoted by {0/}.   There are three parts to my question.   Firstly, what is the distinction between {0/} and { }? Why is the latter not an empty set like the former?  Secondly, is { {0/} } an element and at the same time a set?    And finally, howcome is {0/} is not a subset of { {0/} }? How can an empty set not be a subset of an empty set?   This is my first question on math.stackexchange: I have no formal Mathematics background so please don't presume too much as much as I want to learn...  Thank you, internet!  UPDATE: Let C = { 0/, {0/} }

$\{\emptyset\}$ is a set containing the empty set. Is $\{\emptyset\}$ a subset of $\{\{\emptyset\}\}$?  My hypothesis is yes by looking at the form of "the superset $\{\{\emptyset\}\}$" which contains "the subset $\{\emptyset\}$".


I found this post :   However, they did not explain clearly in terms of mathematical model. Could anyone make it more clearly please ?

There exist several implementations of the GBDT family of model such as:   GBM XGBoost LightGBM Catboost.    What are the mathematical differences between these different implementations?  Catboost seems to outperform the other implementations even by using only its default parameters according to , but it is still very slow.  My guess is that catboost doesn't use the dummified variables, so the weight given to each (categorical) variable is more balanced compared to the other implementations, so the high-cardinality variables don't have more weight than the others. It allows the weak categorical (with low cardinality) to enter to some trees, hence better performance. Other than that, I have no further explanation.


I am an active contributor on the . I perform a fair amount of volunteer moderation activities like responding to votes (but I am not a site moderator).  When I log into the site, directly next to the review button is a little numeric indicator that shows me how many Suggested Edits (and perhaps other things) are awaiting my review.  After I complete my reviews, the numeric indicator often decreases in value, but does not go to zero.  What am I missing?  What is that indicator indicating?  Or is it just broken?

So far, I thought that the number shown in the orange box in the top-bar was the number of items available for review. However, when I acually visit /review, the numbers don't match:    Note that top-bar shows 15 items (?) but the queues only add up to 8.  Since I can't think of a reason for this being by design (which, as experience shows, is not a good indicator for "this is not an SE feature) I'm tentatively labelling this a (UI) bug.


I have seen multiple questions on this site that mention how when a dividend is paid out, the price of stock drops by the same amount, which makes it so that getting the dividend does not actually amount to profit for the shareholder.  And aside from having the same net worth the day before and the day after the dividend is paid; you have to pay taxes on the dividend; as well as not having it automatically re-invested as regular stock growth would be.  Given that, why would you ever want a dividend? Certainly there's a "feeling" of getting regular income from the stock; but you couldn't get that same regular income from a non-dividend stock by selling a small portion of the stock at regular intervals? As far as I understand, the math on this should work out the same as getting a dividend in regards to how much your stock holdings are worth afterwords.  Are there any financial advantages to having a stock that pays dividends? If not, why do some companies bother doing it; and why don't people avoid the stocks that do it?

I understand that a dividend is a way for a company to return money to shareholders. But I'm not quite understanding why it is preferable to capital appreciation and putting the money to work increasing the earnings and revenue of the company. I get that people who buy stocks to get income from dividends, but the decrease in the price of a stock that correlates directly to the amount of the dividend seems to me like it's a zero-sum game.  Part of me thinks that I just fall into the Warren Buffet camp of thought that the money can be spent more wisely in house. But the other part feels like the desire for a dividend is to reinvest and add shares at a lower price (the price the stock goes to ex-dividend).   What am I missing here?


Wrapping my head around the mathematical definition of infinity and just curious here: Are there more real numbers than irrational numbers? It would intuitively seem so, but they are both just uncountable infinite sets, right? Some I guess there would be the same number of irrational numbers as real numbers? But I can't imagine a "bijection" between them. (A term I just learned about five minutes ago...)

I'm reading "Understanding Analysis" by Abbott, and I'm confused about the density of $Q$ in $R$ and how that ties to the cardinality of rational vs irrational numbers.  First, on page 20, Theorem 1.4.3 "Density of $Q$ in $R$" Abbot states:     For every two real numbers a and b   with a < b, there exists a rational number r satisfying a < r < b.   For which he provides a proof.  Later, on page 22, in the section titled "Countable and Uncountable Sets" he states:     Mentally, there is a temptation to think of $Q$ and $I$ as being intricately mixed together in equal proportions, but this turns out not to be the case...the irrational numbers far outnumber the rational numbers in making   up the real line.   My question is: how are these two statements not in direct contradiction? Given any closed interval of irrational numbers of cardinality $X$, $A$, shouldn't be the case that we would have corresponding set of $X-1$ rational numbers, $B$, where each rational in $B$ falls "between" two other irrationals in $A$?  If this is not the case, how do we have so many more irrationals than rationals while still satisfying our theorem that between every two reals there is a rational number?  I know there are other questions similar to this, but I haven't found an answer that explains this very well, and none that address this (perceived) contradiction.


Is it better in practice to make sure the algorithm only initiates the function if there is a need to do so or to just initiate the function in jquery? as an example lets use these pieces of code. imagine a web page has a considerable amount of divs like 1000 or something some of them are nested like a regular web page and how would the programme behave in a $(window).scroll(function(){}); as apposed to a $("element").click(function(){});. the function fires regardless of weather or not it needs to doesn't it? and might that have performance side effects?  $("div").css({"display":"none"});   or      $("div").each(function(){   if ( $(this).css("display") !== "none" ) {  $(this).css({"display":"none"});  }   });   or even   $("div").each(function(){   if ( $(this).is(":visible") ) {  $(this).css({"display":"none"});  }   });   Please give a detailed explanation on which is better in practice

CPU Cycles, Memory Usage, Execution Time, etc.?  Added: Is there a quantitative way of testing performance in JavaScript besides just perception of how fast the code runs?


I would like to calculate average NDVI values. I have 3 values of NDVI:   high:243 low:0 high:243 low:0  high:238 low:0   How can I use a a raster calculator to calculate the average valvue

I have yearly maximum NDVI data (1982-2008) and extracted all value to Excel. Also calculated slope value for each point during the 27 years. All of you know the slope value represents changes per unit (per year). Now I would like to look for significant changes in NDVI over the 27 years. So I have to get "p value" for each point. How I calculate it?   I tried it in Excel. Firstly I have to estimate t-test, but i don't know which value should be in place of  'mu' for this case! After estimating it I can find p value using TDIST function in MS excel.


I'm writing a class for LaTeX, and I need to make it general. I want to include a simple image, a logo, within the class, which would be inserted into the document as a simple command \insertCompanyLogo. To avoid extra files, I added the PostScript definition of the logo in the .sty file.  % Include PSTricks package \usepackage{pstricks} % Create new command to insert logo \newcommand{\insertCompanyLogo}{   \psset{xunit=.5pt,yunit=.5pt,runit=.5pt}   \begin{pspicture}(180,180)      \psline(0,0)(180,180) %The actual image is far more complex   \end{pspicture} }   This works good when I compile the document with latex <filename>. However, it fails when I try to use pdflatex.  In order to use PSTricks with pdflatex, some modifications are required. For example, I can add in the .sty file \usepackage[pdf]{pstricks}.  Then compile the document using pdflatex -shell-escape <filename>. But this won't be general, and it won't work using the regular latex command.  My question is: Is there any way to define a command that understand if the document is being compiled with pdflatex or latex? That way I can add a couple of \ifthenelse{}{}{} to the include line of PSTricks. Thus, the document that uses this .sty class and calls the \insertCompanyLogo could be compiled with both commands without any modification.  I hope I was clear enough. And any solution, tip, recommendation or workaround, as always, is more than welcome.  EDIT: Forgot to mention, I think that packages like xelatex and asymptote that could make this easier. But I would like this to work with a standard TexLive or MiKTeX installation, which is probably what 95% of the users of this class will have installed  EDIT 2: This question was marked as duplicate. The other questions address the engine issue (pdflatex vs. latex). Helpful information. But they leave out the PSTricks part, and how to make its use flexible and multi-engine, and that was the reason of my question.  EDIT 3: At the end, I opted for a completely different solution. What I wanted was to put a logo with a macro that works with both engines, latex and pdflatex. I used TiKz  \documentclass{article} % Include package TiKz \includepackage{tikz} % Create new command to insert logo \newcommand{\insertCompanyLogo}{   \begin{tikzpicture}     \draw[thick,rounded corners=8pt] (0,0) -- (0,2) -- (1,3.25)      -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);   \end{tikzpicture} } \begin{document} \insertCompanyLogo \end{document}   The actual logo, and the contents of the tikzpicture environment, I got them from Inkscape, with an extension to export to TiKz format.

How can I detect inside a TeX file which engine (pdftex/xetex/luatex) is used to compile the file? Is there a LaTeX package that provides this functionality?


using 3 inch display phone, cannot scan QR code for login. any idea to solve this?

Why I can't scan the Whatsapp QR?   I reinstalled WhatsApp  I already have the WhatsApp Web Option  I put it to scan but it just doesn't scan it. I Installed a QR Scanner app and it works perfectly. I uninstalled the QR Scanner app to see if that was the issue and still doesn't work.   My phone is a Samsung Galaxy Ace.


When trying to log on to the Stack Exchange app (since I have decided to become an active member rather than just browsing like I used to) I get the following error.     'key' is not valid 'access_token', not found.   I know the login info is correct and I have internet. My device is a Samsung Galaxy S5 running Android 4.4.2 and I don't know if the rest is relevant but here it is anyway the Security software version is     MDF v1.0 Release 3   VPN v1.4 Release 1   What do I do?

I am unable to log on to . I receive the following error as soon as I try "Log in using Google". (This is the same Gmail account I use for Stack Exchange.)     'key' is not valid for passed 'access_token', token not found.     On my Android Device (Galaxy S4 4.4.2), I have two Google accounts – will this have an effect, or am I missing a step in order to log on with a Google account using the Stack Exchange Android app?


I'm working on an animation of paper sheets. I want to keep things very simple since I'll have to animate a lot of them and don't want to complexify things if I don't need to. So my mesh is just a subdivised rectangle :    But when I use a solidify modifier (to give the sheet some thickness), the edges of my paper are getting weird :    which is not the case without the modifier:    Does anyone knows what causes this and how could I avoid it ?  Thanks a lot

I'm currently working on a model of an X-wing that I'm intending for use in a game and running into a bit of trouble with the shading of the mesh. The upper nose is rounded off where the sensor cone attaches, but at the point it reaches the canopy frame it flattens out and meets at a corner.  Everything is fine and dandy when the sides are modeled:    but once I close it off and add the top of the nose, the shading goes to hell:    As you can see, the smoothing gets confused at the lip of the cockpit.  I've tried a couple different means of getting around this, none of which looks right while maintaining the correct shape. The transition from the rounded to flat is a fairly important part of the ship's character, so I don't want to discard the contours, either.  Any tips or suggestions on modeling this area?  Addendum:  If I eliminate that second angle where the canopy frame meets the fuselage as marked in red:    this also fixes the smoothing. However this is not a solution, as the angle is a part of the design. It DOES give me another thought on fixing, but I won't be able to test it until I get home.


I'd like to take a look to the source code but I can't find the right folder.  No the folder in the home directory, the one where the source and configuration is stored, a cd banshee isn’t going to work, I obviously need the right path.

I would like to know where to find the source code of Ubuntu. I'd like to see how far it is "open source".


I am trying to make an android application that requires a database (the database has only one table). How can I ship this database along with the android application?

If your application requires a database and it comes with built in data, what is the best way to ship that application? Should I:   Precreate the SQLite database and include it in the .apk? Include the SQL commands with the application and have it create the database and insert the data on first use?   The drawbacks I see are:   Possible SQLite version mismatches might cause problems and I currently don't know where the database should go and how to access it. It may take a really long time to create and populate the database on the device.   Any suggestions? Pointers to the documentation regarding any issues would be greatly appreciated.


Suppose we have the following:  $X = A + B $ where $X, A,$ and $B$ are any sets. $A + B = \{ a + b : a \in A , \; \; \; b \in B \} $ Can we conclude that $\sup X = \sup A + \sup B $ ?

If $A,B$ non empty, upper bounded sets and $A+B=\{a+b\mid a\in A, b\in B\}$, how can I prove that $\sup(A+B)=\sup A+\sup B$?


I tried to insert name into database.  name = 'test' cur.execute("INSERT INTO scholars(name) VALUES('{}') returning id".format(name)) id = cur.fetchone() print(id)   error message:  psycopg2.IntegrityError: duplicate key value violates unique constraint "idx_16514_primary" DETAIL:  Key (id)=(2321) already exists.   When id=2301, it succeed,and return ID. After that,id += 1and returns the error below.

I ran into the problem that my primary key sequence is not in sync with my table rows.   That is, when I insert a new row I get a duplicate key error because the sequence implied in the serial datatype returns a number that already exists.  It seems to be caused by import/restores not maintaining the sequence properly.


I don't really know awk, but my attempt so far  history | awk '!x[<everything except first column which is the order>]++' | sort -r

I really enjoying using control+r to recursively search my command history. I've found a few good options I like to use with it: # ignore duplicate commands, ignore commands starting with a space export HISTCONTROL=erasedups:ignorespace  # keep the last 5000 entries export HISTSIZE=5000  # append to the history instead of overwriting (good for multiple connections) shopt -s histappend  The only problem for me is that erasedups only erases sequential duplicates - so that with this string of commands: ls cd ~ ls  The ls command will actually be recorded twice. I've thought about periodically running w/ cron: cat .bash_history | sort | uniq > temp.txt mv temp.txt .bash_history  This would achieve removing the duplicates, but unfortunately the order would not be preserved. If I don't sort the file first I don't believe uniq can work properly. How can I remove duplicates in my .bash_history, preserving order? Extra Credit: Are there any problems with overwriting the .bash_history file via a script? For example, if you remove an apache log file I think you need to send a nohup / reset signal with kill to have it flush it's connection to the file. If that is the case with the .bash_history file, perhaps I could somehow use ps to check and make sure there are no connected sessions before the filtering script is run?


I don't get why he had to choose one of his friends

Why wasn't James Potter his own Secret Keeper? The whole thing came about because Potters chose the wrong Secret Keeper (who betrayed them) for the Fidelius Charm on their house. Why didn't James just make himself a Secret Keeper? We know that it’s possible from Deathly Hallows: (Bill and Arthur Weasley are their own Secret Keepers).  “I’ve been getting them all out of the Burrow,” Bill explained. “Moved them to Muriel’s. The Death Eaters know Ron’s with you now, they’re bound to target the family – don’t apologize,” he added at the sight of Harry’s expression. “It was always a matter of time, Dad’s been saying so for months. We’re the biggest blood traitor family there is.” “How are they protected?” asked Harry. “Fidelius Charm. Dad’s Secret-Keeper. And we’ve done it on this cottage too; I’m Secret-Keeper here."