Why can the primary record for a domain not be a CNAME record?

I have read on the internet that the primary record for a domain (eg example.com) should be an A record, and that bad things happen if you use a CNAME record.  I work for a web company that has several clients. Each client has their business domain (which they typically own), but I wanted to be a) able to update the server their site is hosted on without contacting them and b) have an alternate domain to access all their sites on.  The company I work for has a domain that I control, eg mycompany.com  To this end, for each client, I have created eg (client1.mycompany.com, client2.mycompany.com) records that point to our server that hosts the websites.  Now, since many clients own their own domains, I ask the clients IT person to create a CNAME record for clientdomain.com that points to client1.mycompany.com. This allows me to update the IP address that client1.mycompany.com points to without involving the clients IT person because all they have is a CNAME record that points to something I control.  This appears to work.  However, I have read that creating a CNAME record as the primary record can lead to issues with email (some of these domains have MX records but typically the client has their own mailserver). The information I read didn't really go into much detail and I didn't quite understand it.  Can someone please elaborate on why setting a CNAME record as the primary record is considered a bad idea, as it seems to work?


Can I have a straight up *real* off topic reason for moderators only?

I recently came across this piece of spam:    Now, it's spam, and it's been deleted, but a lot of times, we get questions that are just plain off topic by legitimate users, and not suitable for any other sites in the Stack Exchange network.  We wouldn't delete these, we'd just put them on hold as "Off Topic".  Given that we are rolling all of the old close reasons into "off topic", for a case like this, I generally have to do the following:   Click "Off Topic" Select "Custom" Type at least 15 characters "This post is not suitable on any site in the Stack Exchange network".   That said, when I click the first "Off Topic" radio button, I'd like to not have to select any other reason to close the post.  I should be able to click close and have the system auto-insert some standardized text (which can be standardized per-site, or for the entire network) saying "you shall not pass/do not pass go, do not collect $200".  The workflow of having to select two items and possibly type custom text is excessive for things that should be one-click operations.  Basically, there are times where obvious is obvious, and we shouldn't have to go through extreme hand holding/extra work in order to express that.  Just don't make it more painful for me to stamp it as off topic when it's so blatantly obvious.


Question:  If $0 < x < \frac{\pi}{2}$ and $f_k(x) = \tan(x)+\frac{1}{2}\tan(x/2)+ ...+\frac{1}{2^k}\tan(x/2^k)$.  In Sigma Notation: $$f_k(x) = \sum_{n=0}^k \frac{1}{2^n}\tan\frac{x}{2^n}$$  Find $$\lim_{k\to \infty}f_k(x)$$  I'm not quite sure how to take the limit of a sequence, I've never seen this before, If someone could help me solve this it would be greatly appreciated.


Capitalizing certain strings in an array

I basically want to capitalize the first letter in every word in a sentence, assuming that str is all lowercase. So here, I tried to split the string, letter by letter, then by using for loop, I would capitalize whatever the letter that's after a space. Here's my code and could you please point out where I coded wrong? Thank you.  function titleCase(str) {   var strArray = str.split('');   strArray[0].toUpperCase();   for (i=0; i<strArray.length;i++){     if (strArray[i]===" "){       strArray[i+1].toUpperCase();     }   }   return strArray.join(''); }


Can anyone give me a list of books to study so that I can "master" (whatever the precise definition of that may be) all the branches of physics? I want to start from the most elementary to the most advanced.


What year is the series "Chilling Adventures of Sabrina" supposedly set in?

Almost everything in Greendale seems to be vintage 1960's (cars, movies, dress). I assume it is to reflect the original comic book, but I swear I saw Ambrose using a laptop computer in the first episode. Was this just to make it more topical? Or is it some kind of alternate reality?


Why is the rocket equation different from the product rule?

So in my lectures we derived the rocket equation which is given by:  $$F = m \cdot\frac{dv}{dt} + u\cdot \frac{dm}{dt}$$  Where m is the mass of the rocket, and u is the speed of the ejected fuel.  But if I use  $$F = \frac{dP}{dt} = \frac{d(mv)}{dt}$$  Where $P$ is the momentum I get  $$F = m \cdot\frac{dv}{dt} + v\cdot \frac{dm}{dt}$$  My question is why are these different? Isn't this a contradiction?


the mask is too small but in the movie clip editor its looks good is it because I filmed with an iPhone  I can resize it my self but I want it to be normal


I am searching means to create a multicol document in which each column has a background color like illustrated below. The colored areas (red rectangles) should be filled with the background color. Since the document has many columns (4 in the example, but 10 in reality) splitting the text in minipages or similar is not my favored option.


How can I select an element which has one class and hasn't another one?

There is an element like this in my DOM:
 whatever
   And I get its text as well like this:  var elValue = $(".myClass1").text();   Now I want to avoid selecting that element when it looks like this:
 whatever
   So, the scenario is: get the value of div.myClass1 when that element doesn't have myClass2 class name. How can I do that?


I'd like to search recursively for files with a specific Change date. Note, this is not the Access or Modify date, but the Change date as outputted by stat.  #stat prototype.js   File: `prototype.js'   Size: 175637      Blocks: 352        IO Block: 4096   regular file Device: 803h/2051d  Inode: 18146171    Links: 1 Access: (0644/-rw-r--r--)  Uid: (  507/user)   Gid: (  505/user) Access: 2016-11-03 04:54:05.000000000 -0500 Modify: 2016-01-06 03:38:54.000000000 -0600 Change: 2016-07-23 03:42:37.000000000 -0500   In my specific case, I'd like to find all files with a Change date of 2016-07-23. The OS is CentOS release 6.4. Thanks!


Is there a species that don't have Force Sensitives?

In Star Wars, we see that the ranks of the Jedi and Sith are made up of a myriad of different sentient species throughout the galaxy.  Are there races in the galaxy that just simply can't have force-sensitives for whatever reason?


I have have some code which adds new cells to a table and fills them with text boxes.   The way I've coded it so far works fine:          TableCell tCell1 = new TableCell();         TableCell tCell2 = new TableCell();         TableCell tCell3 = new TableCell();         TableCell tCell4 = new TableCell();         TableCell tCell5 = new TableCell();         TableCell tCell6 = new TableCell();         TableCell tCell7 = new TableCell();          TextBox txt1 = new TextBox();         TextBox txt2 = new TextBox();         TextBox txt3 = new TextBox();         TextBox txt4 = new TextBox();         TextBox txt5 = new TextBox();         TextBox txt6 = new TextBox();         TextBox txt7 = new TextBox();          tCell1.Controls.Add(txt1);         tCell2.Controls.Add(txt2);         tCell3.Controls.Add(txt3);         tCell4.Controls.Add(txt4);         tCell5.Controls.Add(txt5);         tCell6.Controls.Add(txt6);         tCell7.Controls.Add(txt7);          tRow.Cells.Add(tCell1);         tRow.Cells.Add(tCell2);         tRow.Cells.Add(tCell3);         tRow.Cells.Add(tCell4);         tRow.Cells.Add(tCell5);         tRow.Cells.Add(tCell6);         tRow.Cells.Add(tCell7);   As you can see there's basically 4 instructions getting repeated 7 times. I'm sure there has to be a way to accomplish this with just 4 lines of code within a FOR loop and having all the names dynamically assigned but I just can't seem to find anything that would point me in the direction of how to do it.  Something like the following is what I'm after:      for (int i = 0; i < 6; i++)     {          TableCell tCell[i] = new TableCell();         TextBox txt[i] = new TextBox();         tCell[i].Controls.Add(txt[i]);         tRow.Cells.Add(tCell[i]);      }    Any help would be much appreciated.


Trigger to create sum all the opportunities under the account

I am not able to sum all the opportunities under the account ?  How will I do that?  What I have to use in this to run the trigger? Is it possible to create because opp. is child and account is parent ?  trigger sumAllopptyAmtAccount on Account(before insert) {     Set < ID > AccID = New Set < ID > ();     if (Trigger.isInsert)         for (Account oppAc: trigger.New) {             AccID.add(oppAc.AccountID);         }     List < Account > acc = [select id, SumAll_Opprty__c from Account where id in: a.AccID];     List < Opportunity > opp = [selece id from Opportunity where AccountID in: a.AccID];     for (Account a: acc) {         a.SumAll_Opprty__c = con.size();     } }


I am getting null pointer exception at line 9 of my code I am fairly new to java can someone tell me the concept and mistakes I am doing.  public static void main(String[] args) {     Certificate certificate1= new Certificate(60,"cnexirk","cbnifms",77);     Certificate certificate2= new Certificate(45,"gphspvq","pqjbhmz",62);     Certificate certificate3= new Certificate(41,"nfpxsmp","vimiopu",89);     Certificate certificate4= new Certificate(95,"ionouca","bsbknpx",38);     Certificate certificate5= new Certificate(39,"yhzrafu","itnbskb",44);     Certificate[] objArray={certificate1,certificate2,certificate3,certificate4,certificate5};     Certificate[] objResultArray1=getEven(objArray);     for(Certificate certificate:objResultArray1){         System.out.println(certificate.getId()+" " + certificate.getTitle()+" " + certificate.getDate()+" " + certificate.getRank()+" ");     }   public static Certificate[] getEven(Certificate[] cer) {     Certificate[] objresult=new Certificate[cer.length];     for(int i=0;i<cer.length;i++)     {         if(cer[i].getRank()==77)         {             objresult[i]=cer[i];         }     } return  objresult; }   } `


Is it a good idea to take a break from studying a mathematics PhD and revisit academia at a later stage?

In September I started a mathematics PhD at a UK university straight after my undergraduate MMath degree at a different university. On the whole, I am enjoying the experience. However, I've been having recurring thoughts that perhaps I am not cut out for doctorate level work and it might be a good idea to revisit mathematical studies at a later stage.   Basically, since coming here I've been feeling consistently like my heart isn't in it (and this has had a negative effect on my work ethic). This is not necessarily because I’m not capable of doing it, but rather because I never had a proper break from academia and I feel like I've been running out of steam. I know PhD students very frequently go through spells of feeling dispirited, but I feel that if my heart is really in mathematics that this shouldn't be happening. I would rather go into doctoral studies with a running start knowing that I am adequately trained in the area I am in, rather than adjusting to a learning curve (and an inexperienced supervisor).   Here are some options I have considered:   Having a complete break from academia (6 months to a year), followed by a period where I slowly ease myself back in at my own pace by reading. Taking CDT (Centre for Doctoral Training) courses. I had previously applied to this and been rejected, but now I think I would be more competitive. I think this rigorous training would be helpful for me.  Doing something altogether different -- learning another programming language and doing a programming job, or working in simulation/modeling at the Met Office, or another company that relies heavily on fluid dynamics. Or maybe even the EPSRC (which is where a lot of the funding for PhD mathematics students comes from) Getting a normal job to demonstrate people skills, and saving up money to do another Masters programme, which will put me in a very good position for my PhD.   After doing the above, I could return to a PhD programme much    later, when I am a much more mature person with a    better mindset towards my work.  Thankfully, my parents are willing to support me emotionally and financially while I pursue any of these.  My question is whether this is a good plan. In particular:   Is it a good idea to take a break from studies if wanting to continue them at a later date, especially for mathematics? Would it hurt any opportunities later on down the line to take up a PhD a year or so from now? Would my department or supervisor think badly of me for wanting to terminate my studies - and (generally speaking) would I not have to pay back the studentship instalments that I've been paid so far? (I've been funded solely by the University, not by a funding body such as the EPSRC). What would be some worthwhile things to consider doing during a break from academia?     Update: it sounds like this would not be a great idea, and I should only make the move if I am really, really convinced about it. Nonetheless, I'm leaning further and further towards it because I think it's better to take a break from my studies now rather than 3 years down the line. I don't seem to have the motivation required to be a good doctoral student at the moment. This is something I might speak to my advisor about.


How to run a shell script with a file argument located in the same directory at the script?

I would like to run a command with an argument placed in the same directory as the shell script, from a shell script.  example:   my_installer.sh:   #!/bin/sh  sudo dpkg -i --someflags=abcd blah.deb    How do I tell my_installer.sh where blah.deb is ?  I have tried ./blah.deb  and looked at some env vars... I get an error about file not found.  I am assuming that the user would double-click the script, or run it from home - not cd to the script location.


My server has been down most of the day, running top shows several Apache processes (httpd) each one using 70% or more of the CPU, and MySql eating almost all memory.  I have tried rebooting the server, restarting the services and each time the situations goes back to the same.  running:  netstat -n | grep :80 | wc -l  to see the number of connections open to the web server shows around 600 at some points.  That made my think I'm under a DDOS but when I run  netstat -a   There is a tons of connections (more than 200) that look like this:  tcp        0      0 mail.my-domain.com:tproxy     mail.my-domain.com:55907      TIME_WAIT tcp        0      0 mail.my-domain.com:tproxy     mail.my-domain.com:55687      TIME_WAIT tcp        0      0 mail.my-domain.com:tproxy     mail.my-domain.com:55733      TIME_WAIT tcp        0      0 mail.my-domain.com:tproxy     mail.my-domain.com:55909      TIME_WAIT tcp        0      0 mail.my-domain.com:tproxy     mail.my-domain.com:55893      TIME_WAIT  Why could be my mail subdomain opening so many HTTP connections?  My mail server is EXIM, when I check "SHOW PROCESSLIST" on MySQL all that I see is bunch of Sleep commands running.  What can I do? I'm running out of ideas, PLEASE help!


What is the kernel for a double slit experiment?

In the book path integrals by Feynman and Hibbs, the author has established the kernel for a single slit in the Gaussian form. How can I find the kernel for a double slit in a similar fashion as described in the books?


I cant break blocks in survival mode in minecraft.  I know you hold the mouse button to break I have had minecraft for 6 yrs, and all the sudden I cant break blocks. It just reappears after I break it.   Also, I have optifine, but when I went into creative I could break and place blocks.    I have also tried, to change all the graphics settings and it still did not work!


How can I calculate the current carrying capacity of a DC copper bus bar with respect to temperature?  Bus bar specifications: Copper Busbar  Width=40mm Thickness=6mm Ambient Temp5 (C)=4


Convergence of the sequence $x_{n+1} = a^{x_n}$

Let $a > 0$. Show that the sequence defined by $$ x_0 = 1, \qquad x_{n+1} = a^{x_n} $$ converges for $a \leq e^{1/e}$.  Any help is appreciated, I don't even know where to start with this.  Edit to add clarifications:  The case $1 \leq a \leq e^{1/e}$ is solved below in the comments and answers. It is also easy to show that the sequence does not converge for $a > e^{1/e}$ (not part of the question but still worth mentioning).  The interesting case is the remaining one $0 < a < 1$. Here, I found that $x_{n-1} < x_n \Rightarrow x_n > x_{n+1}$ so that the sequence seems to be oscillating. Since $x_0 > x_1$, this implies that the subsequence $\{x_{2n}\}$ is decreasing while the subsequence $\{x_{2n+1}\}$ is increasing, and both converge since they are bounded. This is illustrated by the plot below of the first few terms of the sequence when $a = 0.1$.   It remains to show that both subsequences have the same limit, which is where I have trouble.


This seems to be ever lasting problem of showing special characters in HTML.  I am using PDO with mysql and PHP, the collation in mysql is utf8_unicode_ci  .  Here is this sentence and name saved in database.  "I can't go to school   When I make a select query and echo it in my HTML file ,it appears like this  â€œI can't go to school   I have set $PDO->exec("set names utf8"); that should make that the response received should handle the special characters.  Moreover my HTML has this on top when I view the viewsource via browser  <meta content="charset=utf-8">   I suppose there could be two reasons, either the data is not fetched properly or it is fetched properly but not displated properly in View,   how can I solve/debug that ?


A quiz question in elementary number theory about division by polynomials

This question was asked in my number theory quiz, but I am unable to solve it.  Let $a, b, n$ be positive integers such that $n$ divides $a^n -b^n $. Prove that $n$ also divides $ \dfrac{a^n -b^n}{a-b}$.  I started by writing $ a^n -b^n  = (a-b) ( a^{n-1} +... + b^{n-1} ) \equiv 0 \mod n $ . But I don't understand what can I do from it and which result should be used. Can you please help. Thank you!!


Given that: $$F = \langle yz-2xy^2, axz-2x^2y+z, xy+y \rangle$$ in which $a$ is some constant.  Now, for what $a$ would make the vector field of $F$ conservative? How can we find an $f$ with $\nabla f=F$? Also for what $a$ would $F$ be the curl of another vector field?


Frobenius element in cyclotomic extension

Let $K=\mathbb{Q}(\zeta_m)$. Then if $p\nmid m$ is any odd prime, how i can show that Frobenius map is $(p,K/\mathbb{Q})(\zeta_m)=\zeta_m^p$.  We know, if $P$ is a prime above $p$   $$(p,K/\mathbb{Q})(x) \equiv x^p (\mbox{mod } P) \quad\forall x \in \mathbb{Z}_K$$  Thanks!


Why is there one P in "hoping" and two P's in "hopping"?

Hoping is the present participle of hope. hopping is the present participle of hop. Hoping has only one p while hopping has two. What difference does it make? Why is hoping not hopping?  Edit: I changed mop to hop because of a comment by Kat.  Kat: Why would you compare hope to mop instead of hope to hop (in which case I think your answer will become obvious)?


Quarks are now considered to be fundamentals, but so were atoms some time ago. So the way we see is only limited by our technological advances?

After watching this FuseSchool - Global Education episode, I cannot stop thinking how can something not have a substructure, how it cannot be split?


I am trying to get 3 parameters on my servlet,i split my code into 3 classes for code readability but on the query_a1 method of my DatabaseQuery class i always get false and i cant understand why! Here it is my servlets classes :  DatabaseQuery     public class DatabaseQuery {      //Query i aktivitetit 1 public static boolean query_a1(String user,String pass) {     if (user== "andi" & pass=="andi")         return true;     else         return  false;  } //ky do te jete query i aktivitetit 2 public static void  query_a2() {  } }   Servlet    import java.io.IOException;     import java.io.PrintWriter;     import javax.servlet.ServletException;     import javax.servlet.annotation.WebServlet;     import javax.servlet.http.HttpServlet;     import javax.servlet.http.HttpServletRequest;     import javax.servlet.http.HttpServletResponse;     @WebServlet("/web2")     public class Servlet extends HttpServlet {         private static final long serialVersionUID = 1L;         @Override         public void doGet(HttpServletRequest req, HttpServletResponse resp)                 throws ServletException, IOException {              //merr aktivitetitn nga i cili vijne parametrat             int activiteti=Integer.parseInt(req.getParameter("activitetiNR").toString());              //krijo nje switch per cdo parameter            switch (activiteti){           case 1:{               //marrim te dhenat qe i perkasin aktivitetit               String user = req.getParameter("user").toString();               System.out.println(user);               String pass = req.getParameter("pass").toString();             System.out.println(pass);                //i kalojme ne metoden e klases Aktiviteti1 dhe marrim pergjigje dhe me pas japim response             response(resp,Aktiviteti1.kontrolloDhenat(user,pass));           }           break;           }         }         private void response(HttpServletResponse resp, String msg)                 throws IOException {             PrintWriter out = resp.getWriter();             out.println(msg);         }     }   Aktiviteti  public class Aktiviteti1 {     //ketu vendosen kontrollet llogjike te aktivitetit  public static String kontrolloDhenat(String user,String pass){     //ndersa ketu therrasim queryn nga klasa database if (DatabaseQuery.query_a1(user,pass)==true){      return "Succes!";                }else{         System.out.println(DatabaseQuery.query_a1(user,pass));     return "Failure!";      } } }   Do you have any idea?


Find: $$ \int^\infty_0 \frac{1}{(1+x^{2015})(1+x^2)}dx $$  My initial thoughts were to use a trigonometric substitution of $x=\tan(\theta)$ which implies that $ dx= \sec^2(\theta) d\theta$ this transforms our integral into $$ \int^\infty_0 \frac{1}{(1+x^{2015})(1+x^2)}dx = \int^\frac{\pi}{2}_0 \frac{1}{1+(\tan(\theta))^{2015}} d\theta $$ But I'm having trouble evaluating it after. I also tried a substitution of $y=\frac{1}{x}$ but that did not get me anywhere either. Thanks for any help in advance :)


SSH and Latent Connections (e.g., satellite connections)

Most of the week I live in the city where I have a typical broadband connection, but most weekends I'm out of town and only have access to a satellite connection. Trying to work over SSH on a satellite connection, while possible, is hardly desirable due to the high latency (> 1 second).  My question is this: Is there any software that will do something like buffering keystrokes on my local machine before they're sent over SSH to help make the lag on individual keystrokes a little bit more transparent? Essentially I'm looking for something that would reduce the effects of the high latency for everything except for commands (e.g., opening files, changing to a new directory, etc.).  I've already discovered that vim can open remote files locally and rewrite them remotely, but, while this is a huge help, it is not quite what I'm looking for since it only works when editing files, and requires opening a connection every time a read/write occurs.  (For anyone who may not know how to do this and is curious, just use this command: 'vim scp://host/file/path/here)


How to edit a .odt file from the terminal?

I work a lot with LibreOffice Writer.  I wanted to know if there was a way to edit the text through the terminal?


For 3 numbers represented with $n$ bits in binary, how many bits is required for their product.

Problem:  Let $x, y,$ and $z$ be three integers. Suppose that the binary representation of $x$ uses $n$ bits, the binary representation of $y$ uses $n$ bits and the binary representation of $z$ uses $n$ bits. How many bits does the binary representation of the product $xyz$ use?  Thoughts:  My first impulse is to consider the case where $x,y,z$ are all the maximal number that can be represented by $n$ bits in binary, namely that $x=y=z=2^n -1 $.   Then $xyz = (2^n -1)^3 = 2^{3n}-2^{2n}-2^{2n+1}+2^{n+1}+2^n-1$  $=2^{2n}(2^n-1)-2^{n+1}(2^n-1)+2^n-1 = (2^{n}-1)(2^n-2^{n+1}+1)$  Expanding in this manner has not really helped me clarify what the solution should be. Any different approaches or hints would be much appreciated.


Remove obsolete packages after upgrading to 17.04?

I just upgraded my Kubuntu to 17.04 from 16.10 - following .  But during the upgrade stage it was interrupted - my machine hung so I had to restart it.  So I missed the step of Remove obsolete packages.  After logging in, from my terminal:  $ lsb_release -a Distributor ID: Ubuntu Description:    Ubuntu 17.04 Release:        17.04 Codename:       zesty   I have it upgraded but how can I remove obsolete packages then?  Edit:  I did this:  $ sudo apt-get autoremove   But is it the right way doing it?


Please help me identify this story.  I think it is a short story, not a novel but I could be wrong.  A scientist works on genetically engineering super intelligent cells.  He has some successes.  I don't recall the details but his research comes under scrutiny and the funding agency decides to end the experiment and destroy the test cells.  The scientist decides to save his intelligent cells by ingesting them.  The protagonist first comes down with a terrible illness.  From here on out, the writing is in the style of someone in and out of lucidity.  Essentially the cells are battling the scientist's immune system.  Eventually the intelligent cells win and begin re-engineering the human body for their needs.  Using the human body as a reservoir of resources, they expand, change the human body into more of an amoeba structure and eventually invade the city water supply through the protagonists kitchen sink.  At one point one of his colleagues checks on the scientist and the intelligent amoebas capture him/her (I think it's a her).  The implication is that the cells will eventually destroy the entire human race this way.


What does big U below signify? And what is number written above and below it?


Removing all punctuation except white spaces python

I would like to replace all punctuation from a text, except whitespaces and without splitting the text.  I have tried:  text=re.sub('\W+', '', text)   but it removes whitespace. Any hint?


Used < size and no available space, even after reboot

Yesterday evening, I ran something that produced way more output data that I expected, filling the root ext4 partition as a result. I killed the offending process and started deleting unrelated data I no longer needed, and then saw this:  $ df -h Filesystem      Size  Used Avail Use% Mounted on udev            3.4G     0  3.4G   0% /dev tmpfs           690M   11M  680M   2% /run /dev/sda4       810G  806G     0 100% / tmpfs           3.4G     0  3.4G   0% /dev/shm tmpfs           5.0M  4.0K  5.0M   1% /run/lock tmpfs           3.4G     0  3.4G   0% /sys/fs/cgroup /dev/sda1       476M   26M  450M   6% /boot/efi tmpfs           690M     0  690M   0% /run/user/1000   As you can see, there is no space available even though "used" is four gigabytes smaller than "size". Working under the assumption that these are deleted files that some process has open, I used lsof to find that the biggest one was a 64MB /memfd:pulseaudio.  Baffled, I rebooted the system, being almost sure it would solve the issue. However, the output of df didn't change.  How is this possible and how can I fix it?  $ uname -a Linux ... 4.16.0-1-amd64 #1 SMP Debian 4.16.5-1 (2018-04-29) x86_64 GNU/Linux $ cat /etc/issue Debian GNU/Linux buster/sid \n \l


Getting Rid of Software Records for Software installed on an external disk?

So I'm cleaning out an old computer, and several of the programs it thinks it has were actually installed on an old drive, that's now gone. For some of them, it prompts to get rid of them because it can't find the drive, so that's all well and good.  But, for LibreOffice and a couple of others, it tries to run the LibreOffice Uninstaller, and only quits with a fatal error when the LibreOffice uninstaller can't find the drive.   The difference here is that in the first case, Windows can't even find the drive with the uninstallers on them, so it prompts to remove them; but in the second, its found the uninstallers on the local disk somewhere and is trying to run them, prompting a fatal error when the uninstaller can't find them.  What should I do here? How can I remove what's left of these programs/erase their names from the family tree?  Thanks!  evamvid


Efficiently reverse the order of the words (not characters) in an array of characters

Given an array of characters which forms a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.  Example input and output:  >>> reverse_words("this is a string") 'string a is this'   It should be O(N) time and O(1) space (split() and pushing on / popping off the stack are not allowed).  The puzzle is taken from .


I am currently trying to change the colour of an imageview. I am trying to do this from a fragment, and it works fine until I switch activities. When I return to the fragment that I use to change the colour of the image I get this error,  Attempt to invoke virtual method 'int android.content.Context.getColor(int)' on a null object reference   I use the following code to change the colour of my image,  imgUpvote.setColorFilter(ContextCompat.getColor(getContext(), R.color.lGrey));   Anyone know a fix? This error only occurs when I switch activities, thanks for any answers.  EDIT:here is where code is located,  firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<postsGetInfo, postsGetInfoViewHolder>(postsGetInfo.class, R.layout.posts_layout,postsGetInfoViewHolder.class,postRef) {                 @Override                 protected void populateViewHolder(final postsGetInfoViewHolder viewHolder, postsGetInfo model, int position) {                     final String postKey = getRef(position).getKey();                     UpdateTheDisplayVotes(postKey); //Displays the votes at the start of creation                     postRef.removeEventListener(VoteListener);                      defaultVote = VotesRef.addValueEventListener(new ValueEventListener() {                         @Override                         public void onDataChange(DataSnapshot dataSnapshot) {                             if (!dataSnapshot.hasChild(postKey)) {                                 VotesRef.child(postKey).child(current_user_id).child("votes").setValue("none");                             }                             String voteStatus = dataSnapshot.child(postKey).child(current_user_id).child("votes").getValue().toString();                            if (voteStatus.equals("upvoted")){                                 ImageView btnUpvote = viewHolder.myView.findViewById(R.id.imgUpvote);                                 ImageView btnDownvote = viewHolder.myView.findViewById(R.id.imgDownvote);                                btnUpvote.setColorFilter(ContextCompat.getColor(getActivity(), R.color.lBlue));                                 btnDownvote.setColorFilter(ContextCompat.getColor(getActivity(), R.color.lGrey));                             }if (voteStatus.equals("downvoted")){                                 ImageView btnUpvote = viewHolder.myView.findViewById(R.id.imgUpvote);                                 ImageView btnDownvote = viewHolder.myView.findViewById(R.id.imgDownvote);                                 btnUpvote.setColorFilter(ContextCompat.getColor(getActivity(), R.color.lGrey));                                 btnDownvote.setColorFilter(ContextCompat.getColor(getActivity(), R.color.Black));                             }if (voteStatus.equals("none")){                                 ImageView btnUpvote = viewHolder.myView.findViewById(R.id.imgUpvote);                                 ImageView btnDownvote = viewHolder.myView.findViewById(R.id.imgDownvote);                                 btnUpvote.setColorFilter(ContextCompat.getColor(getActivity(), R.color.lGrey));                                 btnDownvote.setColorFilter(ContextCompat.getColor(getActivity(), R.color.lGrey));                             }                         }


I have a PHP array being created from a .csv file, the resulting array has data that I have no use for so I would like to cleanup the array before proceeding.  array (size=45)   0 =>      array (size=63)       '"Unique ID"' => string '3585370' (length=7)       'Source ID' => string '242' (length=3)       'Source Date' => string '20/9/18 12:08:22 AM' (length=19)       'Email' => string 'email@email.com' (length=3)   How can I remove "Source Date" and "Source ID" from the array of each record?


As we know that Autonumber field in standard object cannot be packaged. So Before creating package I converted the Autonumber to Text field and after installation in a scracth org I tried to change the Field type of that field but I am not able to do that. Even I cant delete that field.I am getting this Error This Custom Field Definition is managed, meaning that you may only edit certain attributes. Is there a way we can achieve this as post installation step?.


Replacing brackets with parentheses for \textcite, Biblatex numeric-comp

I'm trying to modify the numeric-comp style so in-text citations appear with parentheses rather than brackets for both \cite and \textcite i.e. [1] becomes (1) and Smith et al. [1] becomes Smith et al. (1).    This was no problem for \cite - I just changed the command:  \DeclareCiteCommand{\cite}[\mkbibparens]   {\usebibmacro{cite:init}%    \usebibmacro{prenote}}   {\usebibmacro{citeindex}%    \usebibmacro{cite:comp}}   {}   {\usebibmacro{cite:dump}%    \usebibmacro{postnote}}   For \textcite, I assumed that I could redefine the textcite macro replacing \bibopenbracket with \bibopenparen and \bibclosebracket with \bibcloseparen, like so:  \renewbibmacro*{textcite}{%   \iffieldequals{namehash}{\cbx@lasthash}     {\usebibmacro{cite:comp}}     {\usebibmacro{cite:dump}\cbx@tempa     \usebibmacro{cite:init}%  \ifnameundef{labelname}        {\printfield[citetitle]{labeltitle}}        {\printnames{labelname}}%      \addspace\bibopenparen      \ifnumequal{\value{citecount}}{1}        {\usebibmacro{prenote}}        {}%      \usebibmacro{cite:comp}}%   \savefield{namehash}{\cbx@lasthash}%   \gdef\cbx@tempa{\bibcloseparen\multicitedelim}}   But when I compile (after running biber) this I get the error "Argument of \@secondoftwo has an extra }". In fact this happens even if I renew the textcite macro to be exactly as it appears in numeric-comp.cbx. Is there something I'm not understanding here, or is it a bug? And is there another way?  (I'm using TeXShop 3.21 on Mac OS X.)  Minimal example to reproduce the error:  \documentclass{article} \usepackage{filecontents} \usepackage[style=numeric-comp, sorting=none, backend=biber, firstinits=true, maxcitenames=1]{biblatex}  \begin{filecontents}{testref.bib} @article{a_reference,     Author = {Smith, A A and Jones, Z Z},     Journal = {A Journal},     Number = {4},     Pages = {267--277},     Title = {A title},     Volume = {75},     Year = {2008}} \end{filecontents}    \renewbibmacro*{textcite}{%   \iffieldequals{namehash}{\cbx@lasthash}     {\usebibmacro{cite:comp}}     {\usebibmacro{cite:dump}\cbx@tempa      \usebibmacro{cite:init}%      \ifnameundef{labelname}        {\printfield[citetitle]{labeltitle}}        {\printnames{labelname}}%      \addspace\bibopenparen      \ifnumequal{\value{citecount}}{1}        {\usebibmacro{prenote}}        {}%      \usebibmacro{cite:comp}}%   \savefield{namehash}{\cbx@lasthash}%   \gdef\cbx@tempa{\bibcloseparen\multicitedelim}}  \bibliography{testref} \begin{document}  We \textbackslash cite \cite{a_reference} and then \textbackslash textcite -\textcite{a_reference}.  \printbibliography \end{document}


I have the following thoughts so I'd like to hear are there any straightforward implications which might support or undermine them.  You have a class BPP where problems have a TM with bounded two side error and constant ratio of correct leaves in your computational tree.  You have a class NP, which you can think of there is a TM with computational tree which is correct for no instances , but for yes instance $x$ you can have the correct leaves ration as small as $\frac{1}{2^{p(|x|)}}$.  If you kind of combine this you get for no instances all leaves correct for yes instances only the constant ratio, and this is class RP.   So the conjecture is $RP = NP \cap BPP$. What are the important implications? Is there a 1-line proof?  From me, I can add that the widely believed conjecture $BPP = P$ definitely supports the claim.  Thank you.


Variance as a function of the mean. Why does this affect linear regression?

I'm currently studying university level statistics and I'm struggling to wrap my head around the concept of variance as a function of the mean. How does this affect linear regression and why does it violate the assumption of constant variance? How can you visually assess stable variance?


I have the following code.  I cannot for the life of me find a way to lay the table under the pink figure ..    \documentclass{article}  \usepackage[english]{babel} \usepackage{tikz} \usetikzlibrary{arrows,automata} \usepackage{adjustbox}  \begin{document}  \begin{adjustbox}{center} \begin{tikzpicture}[->, >=stealth', shorten >= 2pt, auto, node distance=8cm, thick] \tikzstyle{every edge}=[draw=black,thick] \tikzstyle{every state}=[fill=white, draw=black, thick, text=black, scale=1] \node[state] (1) {\tikz \draw[->,very thick] (0,1) -- (1,0);}; \path (1) edge [loop left] node[left] { \fbox{\scalebox{.5}{\tikz \filldraw[draw=red,fill=red!20] rectangle (3,3);}} \\ \\ \begin{tabular}[b]{ll} p: 78\%&\\[2ex] $\mu$: -7\% & $\sigma$: 7\%\\ $\alpha$: 0.38 & N: 11977 \end{tabular} } (1); \end{tikzpicture}\end{adjustbox}  \end{document}   any help? thx ! :-)


Showing that projections $\mathbb{R}^2 \to \mathbb{R}$ are not closed

Consider $\mathbb{R}^2$ as $\mathbb{R} \times \mathbb{R}$ with the product topology.  I am simply trying to show that the two projections $p_1$ and $p_2$ onto the first and second factor space respectively are not closed mappings.  It seems like this should be easy, but I have not been able to come up with a closed set in $\mathbb{R}^2$ whose projection onto one of the axes is not closed.  I don't really have any work to show...I've really just tried the obvious things like closed rectangles and unions of such, the complement of an open rectangle or union of open rectangles, horizontal and vertical lines, unions of singletons, etc., and haven't come up with anything non-obvious, which I hope is where the answer lies.  It's bothering me that I can't come up with an answer, and I'd appreciate some help.  Thanks.


is there an elementary proof of $\sum\limits_{d|n}\phi(d)=n$?

this question has been asked for several times but I need an elementary solution without advanced  techniques  there are some links that can help you  1-  2-  3-  4-


How to do Statistics in Partial Indexes of PostgreSQL efficiently?

This  motivated think again my following tables but I am still uncertain how to store variables/results from data analysis for quick selection in post-processing.  If stored, I think it is well done with partial indexes (B-tree) because only a subset of data is required in my application described . Assume you have three orthonormal tables: measurements, events and headers where all have some static (size of events in bytes, etc) columns but wonder if the storage of some numbers from data analysis is beneficial or not.   Example of my table schema measurements without names:  SERIAL                     | NOT NULL INTEGER                    | NOT NULL INTEGER                    | NOT NULL TIMESTAMP WITH TIME ZONE   | DEFAULT CURRENT_TIMESTAMP   where I am worried about increasing the schema size by INTEGER fields because of my need in statistics.  I do not want to store in the main tables variables which are used rarely.  I do not want cause my indexes not being used as described in the book PostgreSQL Up & Running and this article   Possible sources    and his blog      When should the static/dynamic statistics stored in tables?  How can static/dynamic statistics be stored efficiently in partial indexes of PostgreSQL?


Can I patent work after I have published a paper about it?

I've published my scientific results one year ago, but I didn't apply for patent at that time. Can I still patent it?


Klein-Gordon-Equation provides a Scalar Theory that doesn't contain Spin

I'm reading actually Schwabl's "Advanced Quantum Mechanics" and encounter an understanding problem while considering the Klein-Gordan-equation. Here the excerpt:  Obviously, since the eigen energies of free solutions are $E= \pm \sqrt{p^2c^2+m^2c^4}$, the energy is not bounded from below. But I don't understand the conclusion why that means that then K-G-equation provide a scalar theory that does not contain spin and then could only describe particles with zero spin.


Zip_longest Plus: Iterating through lists of Different Lengths

I have been going through the questions on iteration through lists of unequal lengths, like this , but I have been unable to find one which addresses my exact requirements. I have two lists of unequal lengths: list_1 = ["dog", "cat"] list_2 = ["girl", "boy", "man", "woman"]  if I want to iterate through the lists of different lengths, I can use itertools zip-longest function as follows for pet, human in zip_longest(list_1, list_2):     print(pet, human)  The output I get is as follows: dog girl cat boy None man None woman  Question: What would I do if I wanted the iterator to output the following: dog girl dog boy dog man dog woman cat girl cat boy cat man cat woman  That, is in the iteration, I want to "combine" each element of list_1 to each element of list_2. What would I do?


Newtonian gravity equation in a 2 dimensional world

I am wondering if my line of thought is correct - and thus the resulting answer to the problem above would be correct.  As we know the gravitational force (of two point masses) is given by $$F = G\frac{m_1m_2}{r^2}.$$  So the gravitational force/vector field reduces with the distance squared. Now this is the formula in 3 spatial dimensions - and I always picture it as a point with gravitational field lines moving outward. Then the "strength" of the field would be the density of the lines. And hence the density drops with the distance squared (as it is inversely proportional to the area of the sphere at that distance).  Now taking this line of thought to other situations we can think of course about a hypothetical 2 dimensional world. Here gravity would also be. And here we can also see the density of the "gravitational field lines". However as they propagate only in 2 spatial dimensions the density would be inversely proportional to the circumference of the circle at a distance $r$. And hence the formula would lose the square and become like:  $$F = G\frac{m_1m_2}{r}$$  (With change $G$, and obviously we can't talk about mass in 2d).  Is this line of thought correct?


I installed ubuntu 12.04 LTS and it was working properly. I didnt use for one month and now when i boot it the screen becomes blank with a cursor blinking on it. What is the problem?


What would be the shape of a candle in a zero gravity environment?

What would be the exact shape of a burning candle if it is placed in a zero gravity environment...I am not able to determine the way the fire and the candle aligns..  Please help me out!


How can I download and use Ubuntu Touch on my Samsung Galaxy smartphone? I saw a video for downloading it on an Android smartphone and using it as a default OS. Is it really possible?


10 different letters of an alphabet are given. words with 5 letters are formed from these given letters.I have to determine the number of words which have at least one letter repeated.   Answer is - 69760  Can someone please help me solve this?


Continuity of function if $f^2$ and $f^3$ are continuous

Let $f:(a,b)\rightarrow \mathbb{R}$ be a real valued function. Prove or disprove:  $f$ is continuous if $f^2$ and $f^3$ are continuous. $f^2=(f(x))^2$.  I think $f$ would be continuous. But don't know how to prove it.


How is the energy efficiency in bicycles accounted for?

Bikes are more efficient than walking, but that's only because roads are flat so wheels make sense, right?  Does it make sense to say that this fact is simply gained by putting a lot of energy into making the earth flat, into making tarmac and putting it there?


I am trying to prove the so-called "Tower law' for subgroups:  Given $G \supset H \supset K$, subgroups of $G$ such that $[G:H]$ and $[H:K]$ are finite, we have $$[G:K] = [G:H][H:K].$$  I do not want to make the assumption that $G$ is finite. If that were the case, then the result follows immediately from Lagrange's theorem. If I am not mistaken, if I assume that one of these indices is finite, then all of them are finite, but the group itself may still be infinite, even if it's partitioned into an infinite number of cosets. (I can't think of an example off-hand of this, so if anyone knows of a canonical one, that'd be very helpful.) I've done some reading on this and have an attempt written down, but I can't understand a few of the steps.  By assumption, $[G:H]$ and $[H:K]$ are finite. Denote the former by $m$ and the latter by $n$. Since left cosets of $H$ in $G$ partition $G$ and the left cosets of $K$ in. $H$ partition $K$, we choose $g_1, \ldots, g_m$ and $h_1, \ldots, h_n$ such that \begin{align*} G = \bigsqcup\limits_{i=1}^m g_i H, \; H = \bigsqcup\limits_{j=1}^n h_j K. \end{align*} We therefore have: \begin{align*} G = \bigsqcup\limits_{i=1}^m g_i H = \bigsqcup\limits_{i=1}^m g_i \left(\bigsqcup\limits_{j=1}^n h_j K  \right) = \bigsqcup\limits_{i=1}^m g_i \bigsqcup\limits_{j=1}^n g_i (h_j K) = \bigsqcup\limits_{i=1}^m \bigsqcup\limits_{j=1}^n (g_i h_j)K, \end{align*} so $G$ is a disjoint union of $mn$ left cosets of $K$ in $G$, so we have \begin{align*} [G:K] = mn = [G:H][H:K], \end{align*} as desired.  I approached this by "naive" substitution, treating these disjoint unions as if they were sums or products, but I'm not convinced that I fully understand the operation. When I put two unions together, I assume this is, in effect, a 'Cartesian product.' Is that right? When I "pull $g_i$ within the inner union," I can't say I'm using "linearity," but I don't know what the multiplication is, since I have coset multiplication within the union (and I'm multiplying $g_i$ by a coset) but also a group multiplication. In a virtually identical proof, Artin comments that the last step is justified because multiplication by $g_i$ is an invertible operation. I do not understand where this comes from, unless its using the defining equivalence relation $a \sim b \iff a^{-1} b \in H$ that defines a coset. Any help on understanding this would be grtand, greatly appreciated.


Do all black holes have the same mass density?

I have been reading about black holes in Stephan Hawking's 'A Brief History of Time'. Then I was reading more about it on Wikipedia; I am making a school project on it. I do not really remember what made me ask this question, ie. whether all black holes have the same mass density. But, then I also saw (or saw again, because that book has it too) the 'No-Hair Theorem' which states that 'all black hole solutions of the Einstein-Maxwell equations of gravitation and electromagnetism in general relativity can be completely characterized by only three externally observable classical parameters: mass, electric charge, and angular momentum.' - Wikipedia. So, it doesn't look like the mass-density with change for a black hole. Would it? Do all black holes have the same mass-densities or not?


Is this a valid mathematical proof that $\pi = 4\sqrt{\sqrt{5/4}-\sqrt{1/4}}$?

Is this a valid derivation that the value of $\pi$ is $4\sqrt{\sqrt{5/4}-\sqrt{1/4}}$?   This is a completely different from . It is in no way a duplicate of my last question.    When the circumference (c) of a circle with diameter (d), and the perimeter (4h) of a square are equal, we will call it a squared circle.    Our first squared circle. (Fig. 1)    Our second squared circle, which is π/4 times smaller. (Fig. 2)    Next we stack our two squared circles. (Fig. 3)    Then we can add in our triangle. (Fig. 4)    Our full triangle where the hypotenuse equals the diameter (d) of the previous circle. (Fig. 5)    Then we could use Pythagoras to calculate π.    But first, lets dig a little deeper.  Any generic squared circle. (Fig. 6)    From this we get our red and blue squares. (Fig. 7)    The blue squares link the previous squared circle with the next consecutive squared circle, which is always π/4 times smaller. (Fig. 8)    This can be seen more clearly in the table below, the arrows show this relationship between any two consecutive squared circles.    This repeating pattern goes on ad infinitum, where each consecutive squared circle is always π/4 times smaller. (Fig. 9)    This gives us our angles and our generic triangle. The base (x) of the triangle is equal to the height (h) of the triangle minus the side-lengths of the two blue squares. (Fig. 10)      The side-length (h) divided by the diameter (d) is always π/4.    Then we can replace π/4 in our equation.    And then we use this value in the following triangle.  This gives us the generic triangle. (Fig. 11)    A circle with diameter (d) equal to 1. (Fig. 12)    Using Pythagoras we get the following equation.    From this equation we can calculate π.


Analog voltage level conversion (level shift)

I have a joystick that puts out analog voltage somewhere between 1.5V and 3.5V.  I want to transform this range of voltage to control a motor controller that takes analog voltage between 0V and 5V.  How do I level shift and amplify properly?


The following is an old competition problem from :     The product $$1!\times 2!\times\cdots 2011!\times 2012!$$ is written  on the blackboard. Which factor, in term of a factorial of an integer, should be erased so that the product of the remaining factors is the square of an integer?   The answer is  $1006!$. But I am curious how one can derive the answer.


Is there a way to see who voted on your posts?

Is there a way to see who voted (upvotes and/or downvotes) on your answers and/or questions?


Should it be obvious that independent quantum states are composed by taking the tensor product?

My text introduces multi-quibt quantum states with the example of a state that can be "factored" into two (non-entangled) substates. It then goes on to suggest that it should be obvious1 that the joint state of two (non-entangled) substates should be the tensor product of the substates: that is, for example, that given a first qubit $$\left|a\right\rangle = \alpha_1\left|0\right\rangle+\alpha_2\left|1\right\rangle$$ and a second qubit $$\left|b\right\rangle = \beta_1\left|0\right\rangle+\beta_2\left|1\right\rangle$$ any non-entangled joint two-qubit state of $\left|a\right\rangle$ and $\left|b\right\rangle$ will be $$\left|a\right\rangle\otimes\left|b\right\rangle = \alpha_1 \beta_1\left|00\right\rangle+\alpha_1\beta_2\left|01\right\rangle+\alpha_2\beta_1\left|10\right\rangle+\alpha_2\beta_2\left|11\right\rangle$$ but it isn't clear to me why this should be the case. It seems to me there is some implicit understanding or interpretation of the coefficients $\alpha_i$ and $\beta_i$ that is used to arrive at this conclusion. It's clear enough why this should be true in a classical case, where the coefficients represent (where normalized, relative) abundance, so that the result follows from simple combinatorics. But what accounts for the assertion that this is true for a quantum system, in which (at least in my text, up to this point) coefficients only have this correspondence by analogy (and a perplexing analogy at that, since they can be complex and negative)? Should it be obvious that independent quantum states are composed by taking the tensor product, or is some additional observation or definition (e.g. of the nature of the coefficients of quantum states) required?  1:  (bottom of p. 18) "so the state of the two qubits must be the product" (emphasis added).


Starting next year (2019), my family will be covered by an HSA plan. A member of my family is undergoing a medical treatment, starting on 12/27/2018, which will continue into March 2019. There is a flat fee for this service, which will be billed on 12/27. Which, of any of this, could be paid for using the HSA?   None? Only services provided on or after 1/1/2019? Only services provided after the date the HSA is "established", which might be a week or two into the New Year?


How to restrain the arbor on a circular saw to change the blade

Been trying to change blades on my B&D circular saw But as I try to fasten it the whole thing turns,Seems like the arbor is loose,What could be the problem and can it be fixed?.....Thanks guys.


I am using App Backup & Restore for creating backup of my apps but with KitKat its using the internal SdCard as Storage.  When I explicitly set the external SdCard path it gives the error that it is unable to create folder,  I have also tried with creating folder under android/data/[packagename]/files/ but it is still not able to do the same.  Is there any solution so that apps can use external storage for writing files.  Note : I don't want to ROOT my Phone.


in C++, can I derive a class from a struct

The question says it all really.  Am I allowed derive a class from a struct, or should I create a class that embeds my struct and defines copy constructors and an = operator to move between the two?


Word to describe a real computer versus a virtual machine

In computing environments a lot of software and processes are moving to VMs or virtual machines.  I am always at a loss as to how to refer to a real, physical computer in comparison to a virtual environment.  For example,      Our amazing software can be installed on a VM (virtual machine) or on a real computer.      Our amazing software can be installed on a VM (virtual machine) or on a physical machine.   Is there a better word choice to refer to a real, physical computer particularly in contrast to a VMWare or XenServer virtual computer?


Take input from the user and pass on to the scpi commands

I am writing this script: def main():     rc = RemoteControl()          # To Check if HCCU is responding to SCPI commands     scpi_command = r'*IDN?'     debug('Calling SendSCPICommandToHCCU:', scpi_command)     result = rc.SendSCPICommandToHCCU(scpi_command)     debug('Result:', result)      scpi_command = r'setup:ports:recall "SISO_NR"'     debug('Calling SendSCPICommandToHCCU:', scpi_command)     result = rc.SendSCPICommandToHCCU(scpi_command)     debug('Result:', result)  now in scpi_command I am passing a recall command to recall a profile which is a string("SISO_NR"). I want to modify this script in such a way that my script asks the user for the input of the string here. How can I do it?


Limit all post/article titles in wordpress to 65 char without cutting the last word

NOTE PLEASE : for all of you who will mark this as a duplicate  THE ISSUE WAS NOT SOLVED USING CODE FROM THAT TOPIC. PLEASE DON'T MARK THIS AS A DUPLICATE BUT TRY TO HELP ME OUT. I'D REALLY APPRECIATE IT :)  Let me explain my issue.  I got a WordPress with 10,000 posts and like +6k of them have tittles longer than 65 characters which affects SEO.  I'm using this code to limit titles to 65 characters:  function tokenTruncate($title, $your_desired_width) { $parts = preg_split('/([\s\n\r]+)/', $title, null, PREG_SPLIT_DELIM_CAPTURE); $parts_count = count($parts);  $length = 0; $last_part = 0; for (; $last_part < $parts_count; ++$last_part) { $length += strlen($parts[$last_part]); if ($length > $your_desired_width) { break; } }  return implode(array_slice($parts, 0, $last_part));  $your_desired_width = 65;  if (strlen($title) > $your_desired_width) { $title = wordwrap($title, $your_desired_width); $title = substr($title, 0, strpos($title, "\n")).'...'; return $title; }  add_filter('the_title','tokenTruncate');


Why use Time.deltaTime in Lerping functions?

To my understanding, a Lerp function interpolates between two values (a and b) using a third value (t) between 0 and 1. At t = 0, the value a is returned, at t = 1, the value b is returned. At 0.5 the value halfway between a and b is returned.  (The following picture is a smoothstep, usually a cubic interpolation)    I have been browsing the forums and on  I found the following line of code: transform.rotation = Quaternion.Slerp(transform.rotation, _lookRotation, Time.deltaTime);  I thought to myself, "what a fool, he has no idea" but since it had 40+ upvotes I gave it a try and sure enough, it worked!  float t = Time.deltaTime; transform.rotation = Quaternion.Slerp(transform.rotation, toRotation, t); Debug.Log(t);   I got random values between 0.01 and 0.02 for t. Shouldn't the function interpolate accordingly? Why do these values stack? What is it about lerp that I do not understand?


Sugar Daddy is Threatening to Report Me To FBI

I recently got involved with someone Over the internet and I asked him if he wanted me to be his sugar baby. Long story short he agreed and sent me money to be his sugar baby. I told him I was going to go and see him but I lied because I didn’t know this man. So he said he contacted the fbi and said if I didn’t send the money back he was coming after me. But then he tells me you can still come see me if you want. So we started talking and I told him I was 17 which I’m not I’m 18 but he said he would let me keep the money and that we were ok. Now he’s saying oh the FBI contacted me and you need to send it back before they take action because what you did was illegal. So I asked him for screenshots and the email and he won’t give it to me. I seriously don’t know what to do. Should I send it back or keep it. I’ve already invested time into him and all. Also with me telling him I was 17 he was ok with it and he’s like 42 years older than me. He also told me he liked younger women and was ok with me being younger. What should I do?


I practise before the real analysis exam and I got stuck on few excercises.  "if $F$ is an antiderivative of a continuous periodic function and $F$ is bounded, then $F$ is periodic"  $~\to~$ one should give a proof or counterexample.  (I'm convinced it's true, but how to prove it?)


What's the difference between legal (illegal) and lawful (unlawful)?

For example, why signage in national parks says "it's unlawful to feed wildlife" instead of illegal?


Real Analysis proof, show there is a limit and find it.

Assume$${ x }_{ 1 }=\sqrt { 3 } ,{ x }_{ 2 }=\sqrt { 3+\sqrt { 3 }  } ,..,{ x }_{ n }=\sqrt { 3+\sqrt { 3+..+\sqrt { 3 }  }  } $$this sequence has a limit and find the limit.  I know I need to show that is is bounded and then show $x_{ n }<{ x }_{ n+1 }$ before finding the limit but have no idea how to go about it. Please help!


binary logistic regression with large sample size

I try to make a binary logistic regression model from 85871 samples. I used enter method. There are seven explanatory variables and all of them have significant in Wald Test. But, in Hosmer Lemeshow Test also significant, so my model doesn't fit the data right? What can I do in order to make my model fit? Is there another goodness of fit test?


I am trying to make a simple irc server and client, and I am trying to find a way to have the server respond differently to certain messages sent to it. I am using the kryonet api for networking. Here is my listener:          public void received(Connection c, Object o){              if (o instanceof TransferMessage){                  TransferMessage msg = (TransferMessage)o;                  if (msg.text == "Hello"){                      System.out.println("User said Hello to me!");                  }                 System.out.println(tag+msg.user+": "+msg.text);                 server.sendToAllTCP(msg);              }          }   I have created a client program which sends the message "Hello" upon connecting. However, the server fails to recognize that msg.text does in fact equal "Hello", or some other anomaly is happening. There is no error produced, but the server ignores the conditional statement. I have also verified that the string that the client sends is what it is supposed to be.


Infinitely differentiable function with divergent Taylor series?

I'd greatly appreciate it if someone could provide examples of the following:  1) A infinitely differentiable function whose Taylor series does not converge to the function.  2) An infinitely differentiable function whose Taylor series diverges.   My differential equations text says that "most" smooth functions are of one of these types. What can be done if we weaken the infinitely differentiable condition?  (Please do not use $f(x) = e^{-1/x^2}$ as an example!)


How much of an impact would the discovery of an exact formula that is equivalent to the prime counting function have on the mathematics community and acedemia as a whole?


How to use only part of screen, as if the monitor was a smaller one?

Water was sprayed on my 19" monitor and damaged some parts of it. I need a solution that will let me specify the screen area to be used by Windows, as if it was a smaller monitor. Its default menu doesn't have this option.


How can I ensure food safety if my cooking utensils have touched raw meat?

Twice in the past week or so, I've wondered whether my cooking utensil was still clean enough to cook / serve with. Here were the situations:   Cooking ground sausage (no casing). While breaking the sausage up, raw sausage clearly got on the back of the spoon. Over the course of cooking the sausage and later adding veggies, all visible traces of the raw meat disappeared. I finished up cooking, used the spoon to stir in some penne, and then served.  Candying some bacon. Put some bacon in the oven with some brown sugar on it. Used a fork to flip the bacon half way through. Then used the same fork to take the cooked bacon out of the pan and on to a rack.    Is this safe? When do I need to worry about contamination on my cooking utensils? What is sufficient to make the utensil safe again?


Which is the stable custom ROM for LG L3 E400 ? Rooted my mob and looking for a stable ROM to flash.Cynogenmod is not stable for this model.


Drupal Views Exposed filter ( Taxonomy )

I have 3 fields ( Exposed filter ) 1 Country 2 State 3 City  When a respective Country is selected in the 1st field, I want the second filter ( Dropdown or autocompete ) to display states of the country selected in the 1st field & when this is done based on the state selection , I want the 3rd field to show only the cities belonging to the state selected in the second field.  How can this be done ? any help ?


I was looking at how the wrap decorator was implemented in functools.py and it used partial(), which I then wanted to see how that was implemented.  It was imported from _functools so I looked for _functools.py but couldn't find it.  I grepped the whole python directory, and then my entire C: drive but nothing came up.  Where is this file located? (Win7 x64)


How to find architecture of my PC and Ubuntu?

When running uname -a, I get as output   41-Ubuntu SMP Mon Aug 13 17:59:54 UTC 2012 i686 athlon i386 GNU/Linux   Can someone please explain to  me why both i386 & i686 ?    What exactly is my PC architecture and what version of Ubuntu am I using (32bit or 64bit)?


Inequality about holomorphic functions on the disk

I'm trying to show that $ |g(z) +g(-z)| \leq 2|z|^{2}, z\in \mathbb{D}, g:\mathbb{D} \rightarrow\mathbb{D}, g(0)=0$ I applied Schwarz's lemma and got $|g(z)| \leq |z|$ and $g(-z)\leq |-z|=|z|$. $$|g(z)+g(-z) | \leq |g(z)| +|g(-z)| \leq 2|z|$$ the first inequality follows from the triangle inequality. But, I'm now stuck as I cannot just say that $2|z|\leq 2|z|^2$ since $z\in \mathbb{D}$ where it it is not true. Where do I go from here?


The input in file field.html.twig is normally like this:  {% for item in items %}
{{ item.content }}
 {% endfor %}   And you get the output in HTML like this:

   But I want to add a class to img-tag. How do I receive the following output:

   I am looking for a solution like , but it is not working. Can anybody help?


He is taller than I. →correct He is taller than me. →incorrect  Is it possible to use object me? They use object with another case.  I am taller than him.(object)


Similar to this question:  except my main problem is accusations of creating duplicates when I (correctly, in my view) post separate and completely different but superficially similar-looking questions. Here's an example:  . The question actually got closed as a duplicate when it is not a duplicate at all because it is a completely different question -- a case of "close but no cigar", as I see it. I feel like I'm in a catch twenty-two situation when posting questions. If I post related but different questions separately, I get accused in the comments of creating a duplicate, but if I post them together I am (not as often) accused of having too many questions in one post. [I'm afraid to ask, but is this a normal experience for a noob on SE, or are people out to get me? Or both? :)]


Debian : Verify disk encryption password for already mounted system

I am working on our Debian server on which we have a Raid drive encrypted with 2 devices. I did this around 1.5 years back and have never rebooted since. Now, we want to reboot for some reasons, but I have to make sure that the password I have is the correct one, or we will be stuck.   How can we verify the password for an encrypted-raid? Thank you.  Raid details :    mdadm --detail /dev/md0    /dev/md0:         Version : 1.2   Creation Time : Thu Feb 11 14:43:40 2016      Raid Level : raid1      Array Size : 1953382336 (1862.89 GiB 2000.26 GB)   Used Dev Size : 1953382336 (1862.89 GiB 2000.26 GB)    Raid Devices : 2   Total Devices : 2     Persistence : Superblock is persistent      Update Time : Fri Mar 10 10:37:42 2017           State : clean   Active Devices : 2 Working Devices : 2  Failed Devices : 0   Spare Devices : 0             Name : HOSTNAME:0  (local to host HOSTNAME)            UUID : 5c450558:44a2b1e9:83cb4361:9c74df8e          Events : 49      Number   Major   Minor   RaidDevice State        0       8        1        0      active sync   /dev/sda1        1       8       17        1      active sync   /dev/sdb1   Thank you.   Update  dmsetup table --showkeys CryptVol: 0 Large_Number crypt aes-cbc-essiv:sha256 RANDOM_TEXT  0 253:0 4096 RaidVG-LVMVol: 0 Large_Number linear 9:0 2048


I'm looking at the -f flag on man which is described as:     -f, --whatis           Equivalent to whatis.  Display a short description from the manual page, if available.  See whatis(1) for details.   When I actually use -f entries always have a bracket at the end and sometimes you get multiple entries.   Examples of man -f results:  man -f grep:  grep (1)             - print lines matching a pattern   man -f man:  man (7)              - macros to format man pages man (1)              - an interface to the on-line reference manuals   man -f git:  Git (3pm)            - Perl interface to the Git version control system git (1)              - the stupid content tracker   I'm guessing all normal program descriptions are shown with (1).  Can anyone explain what other lists are being searched and how to identify what different numbers mean within the parenthesis?   Note: I also noticed that for git I can get the (3pm) manual page by doing man Git instead of man git. It seems counter-intuitive that man git would include the manual on git but not Git where as man -f git returns info on both.


How to find which updates failed in "Windows Update"

I just got a new laptop and was installing all the Windows updates (including driver updates) to it.  One of the driver updates failed.  Windows update tells me that one did, but not which one (other than it was a driver update and maybe I have a better one already installed, but it will keep trying).  I looked through update history, but cannot find one listed as failed. I just want to turn off that update and not have it keep trying.  But I don't know how to find which one it was, nor how to turn it off. Exact message: A current driver on your PC may be better than the driver we're trying to install. We'll keep trying to install. (And, I just want to say, stop trying....)


Cycles OpenEXR output way too dark when imported into After Effects

When I render to OpenEXR (multilayer) in Blender 2.80 (Cycles) and then import it back into After Effects (2019) the image looks way too dark.  What it looks like in Blender 2.80:    What it looks like in After Effects:    I've tried playing around with the color management settings in Blender but it doesn't seem to make a difference. I've tried opening the EXR in other applications like IrfanView and Photoshop but that doesn't work at all (either an error or a black image).


Do smart pointers delete memory defined by new

In the following code example, does the destructor of the shared pointer delete the object that's been destructed defined by new?  auto object = std::shared_ptr<Foo>(new Foo());  I found this in some legacy code and I'm wondering if this causes memleaks or not.


Can I travel to the USA while working remotely for my non-US employer?

I would like to travel in the USA for a period of 3 - 6 months. But I want to spend some time working for my employer (remote work) and getting paid by the employer. Is this possible under a tourist visa (B1/B2)?  I hope this is OK since I will not be getting paid by a US employer. I am in the IT trade so all that I will be needing is my own laptop and a connection to the internet. The money I earn would actually help me pay for the expenses I get during the holiday.


What are some good books I can use to learn Algebra 1?

I would like some suggestions on some good books to learn Algebra 1. This is my first time learning the topic but I already know some of the topics (ex. Linear Equations and Real Numbers). Does anyone have any suggestions? Thank you. Edit: By Algebra 1 I mean the subject that's taught in high school usually in either 8th or 9th grade.


To encode an inverted circumflex accent in text method I use the following formulation:   \v{C}   Which produces the desired outcome:    In my BibTex file I have an author whose name requires the same accent:  Author = {Maksimovi\'{c}, \v{C}.},   This however, produces the following in the Bibliography section:    How should I encode the inverted circumflex in the BibTex file?


Hiding and redirecting extensions on my webpage

I want to hide extensions on my webpage using the .htaccess file.  I have managed to do it by using this code;  RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L]   So when I visit mysite.com/index it shows my index.php. That's fine but I want to block visitors from visiting mysite.com/index.php so it should be redirected to mysite.com/index  I think I have found a way to do that. However, I will be using querystrings on my webpage. There will be some pages which I will need to carry the variables via GET method.  Normally a link with an id variable is like this;     index.php?id=xx   However, if I redirect /index.php to /index my variables will be gone. So I want the urls to seem like this when carrying a variable      mysite.com/index?id=xx  The extension will be PHP always. But I want this system work in all pages with all variables. I am not sure how many pages and variables there will be so do I have to write a rule in htacces for each of them or can I define a general rule? So it will be like this  Examples: index.php?id=xx will be index?id=xx index.php?page=xx will be index?page=xx users.php?uid=xx will be users?uid=xx news.php?nid=xx will be news?nid=xx   This could probably be achieved using .htaccess file but I don't know, how can I do that.  P.S. Although I am pretty good at PHP, I don't know anything about creating a rule for htaccess file I just use the codes I find on the internet.


Can we use $F_{\rm net} = ma$ for fictitious force?

For instance, in a non-inertial frame of reference, the net force of an object in a circular motion = (Centripetal force - centrifugal force) = 0.  So, my question is... Can the net force = centripetal force - centrifugal force = mass * acceleration?  Or the fictitious force (centrifugal force) is already mass * acceleration in the inertial frame of reference?


Previous year Olympiad problem (polynomials)

Let $P(x)$ be a nonconstant polynomial whose coefficients are positive integers. If $P(n)$ divides $P(P(n) - 2015 )$ for every natural number n, then prove that $$P (-2015) = 0$$  I've observed that the proof depends on  $ P(n)$ divides $ P(P(n)-2015)-P(-2015)\,$ but I cannot see how to prove that. Could someone please elaborate on how to proceed.


Super+space disables the Activities overview shortcut

I just installed Ubuntu 20.04. As far as I can tell, there seems to be at least 3 shortcuts to access the Activities menu: Super, Super+S and Alt+F1.  I also tend to switch between "en-us" and "pt" keyboard layouts often with the Super+space shortcut.  The problem is, when I press Super+space to switch to the Portuguese layout, the Super shortcut stops working. Super+S and Alt+F1 still work though, but they're not as handy.  When I press Super+space again to switch back to en-us, the Super shortcut starts working again.  Any idea why this might be happening? I suspect something else also has Super+space registered as a shortcut for a different purpose, but I don't know where to look.


tikz: Ignore one path in bounding box calculation

I want to ignore one specific path for the bounding box calculation in the middle of a tikz picture (I need the path only to get an intersection point and had to make it quite long, to be sure that the point exists).  I came up with the following solution but I find it a bit odd-looking. Does something better exist?  \documentclass{article} \usepackage{tikz}  \begin{document}  \begin{tikzpicture} \draw(0,0)-- (2,2);  \begin{scope} \path [use as bounding box]               (current bounding box.south west)              rectangle (current bounding box.north east); \path (-1,-1)--(5,5); %ignore this \end{scope}  \fill[red](0,1)rectangle (1,3); \draw [black] (0,0)rectangle (2,3); %wanted bounding box  \draw [blue] (current bounding box.south west)               rectangle (current bounding box.north east);%current bounding box \end{tikzpicture} \end{document}


While trying to change the proxy settings for Google Chrome from Advanced Settings on Ubuntu 16.10, I am getting the following error:  When running Google Chrome under a supported desktop environment, the system proxy settings will be used. However, either your system is not supported or there was a problem launching your system configuration. But you can still configure via the command line. Please see man chrome for more information on flags and environment variables. Well my friend using Ubuntu 16.04 is able to do it from the Chrome UI itself.


Simplify: $\sum_{k=1}^n ({n \choose k}k^2 )$

I need to simplify: $\sum_{k=1}^n ({n \choose k}k^2 )$.  My first idea was to get rid of the square and use known identities to proceed. This is what I did  $$\sum_{k=1}^n( {n \choose k}k^2) = \sum_{k=1}^n( \frac n k {n-1 \choose k-1}k^2) = \sum_{k=1}^n {n-1 \choose k-1} nk = n \sum_{k=1}^n {n-1 \choose k-1} k = \\ n \sum_{s=0}^n \left({n-1 \choose s}(s+1) \right)$$ Now, the only thing that stops me here is the $s+1$ factor. Is there a way to dispose of it, or maybe to change it to $s$?


JS Regex: How to capture repeating pattern into different array elements?

For example, I have a target string like: str='Every "red","white","blue" flower is $7.'  If I run /Every ("(.+)",?)+ flower is \$(.+)/.exec(str), I will get "red","white","blue" as a whole output element, but what I want is ["red,"white","blue"].  Is there a way to do this, or I can only use split?   Thanks!


Is a visa required by an Indian citizen for visiting Seoul?

I am an Indian passport holder travelling to Germany via Seoul and would like to stay in Seoul for a couple of days. I have my flight tickets to Germany and a German residence permit.  Do I need a visa to enter Seoul (via Incheon Airport)?


What tips can you offer for indoor architectural photography?

Specifically, I might be taking pictures inside of a house that's for sale. I want to make them look as best as possible.  While I think it'd be nice to have general answers, let me just give you some of my gear, that I think would be the best I have towards photography.   Canon 20D 580 EX II Flash 28-135mm lens   I'm interested in both gear and in general advice.


Refreshing MapCanvas while PyQGIS-script is running

I try to write a PyQGIS script similar to this: .  Basically there are two loops to pan the mapCanvas, refresh the mapCanvas and export the mapCanvas to *.png.  iface.mapCanvas().setExtent(QgsRectangle(xmin, ymin, xmax, ymax)) time.sleep(5) iface.mapCanvas().refresh() time.sleep(5) iface.mapCanvas().saveAsImage("D:/GE"+str(i)+"to"+str(j)+"img.png" )   If I execute this code line by line in the Python Console it is working fine. If I use it in a loop georeferenced png will be exported but they are either blank or contain all the same content. As you see above I tried to use time.sleep() to have a timeslot for the map to update. But was not successful. As  suggested I also tried:  for layer in qgis.utils.iface.mapCanvas().layers():     layer.triggerRepaint()   Same problem here: works line by line in the Python Console but not in a loop.  How to refresh mapCanvas while PyQGIS-script is running?  (QGIS Version 2.14.3)


How to make Biber also print the debug information in the log file?

I've switched from BibTeX to Biber and I was struggling with some errors.  During those problems (see  and  ) I noticed that other users seem to get a more detailed output in the log file (see e. g. ).  I also tried to run biber --tool --debug myreferences.bib, but I'm still missing those details (like the problematic source text for a FATAL error)  example of my current project  command: biber -tool --debug references.bib   INFO - This is Biber 1.9 running in TOOL mode INFO - Config file is '/Users/mbg4/.biber.conf' INFO - Logfile is 'references.bib.blg' INFO - DEBUG mode: all messages are logged to 'references.bib.blg' INFO - Looking for bibtex format file 'references.bib' INFO - Decoding LaTeX character macros into UTF-8 INFO - Found BibTeX data source 'references.bib' WARN - Datamodel: Entry '2005' (references.bib): Invalid format '2005/12//' of date field 'date' - ignoring WARN - Datamodel: Entry '2002a' (references.bib): Invalid format '2002/12//' of date field 'date' - ignoring WARN - Datamodel: Entry 'Ferri2009' (references.bib): Invalid format '2009/3/25/' of date field 'date' - ignoring WARN - Datamodel: Entry 'Klein2005' (references.bib): Invalid format '2005/9//' of date field 'date' - ignoring WARN - Range field 'pages' in entry 'Prochazaka1983' is malformed, skipping WARN - Datamodel: Entry '2006b' (references.bib): Invalid format '2006/2//' of date field 'date' - ignoring WARN - Datamodel: Entry 'Lu2001a' (references.bib): Invalid format '2001/6/15/' of date field 'date' - ignoring WARN - Datamodel: Entry 'Schubert2002' (references.bib): Invalid format '2002/9//' of date field 'date' - ignoring WARN - Datamodel: Entry 'N.N.c' (references.bib): Invalid format 'Apr\,2003' of date field 'urldate' - ignoring FATAL - Caught signal: SEGV Likely your .bib has a very bad entry which causes libbtparse to crash:    how I'd like it to look like (the FATAL - Caught signal: SEGV line):  [496] bibtex.pm:1029> DEBUG - Parsing namestring 'Coyle, ,Thomas W.' [496] bibtex.pm:94> FATAL - Caught signal: SEGV   Used software   TeXLive 2014 on MacOS X  biblatex v2.9a biber 1.9


Why don't people just use rsync to back up vmware guests?

If I am running a modern vmware ESXi system, I can drop in a statically linked rsync binary and rsync files to any destination over SSH.  I'm trying to understand why most (all ?) backup of vmware guests is not done this way.  If the VM is running, you can simply use 'vim-cmd vmsvc/snapshot.create' to create a snapshot and then rsync that snapshot to the remote host.  (there's even an option to "quiesce" the snapshot)  OR, if you want a more robust backup, you can gracefully halt the VM and rsync over the vmdk file(s).  So ... it seems like I am a simple shell script away from all the backups I ever wanted to do, simply and easily, using plain old rsync.  What am I missing here ?


I am facing issues in uploading an image to my answer. I have cleared cache and cookies and tried in another browser. But the issue still persists. My image size is less than 2MB.  Here is my :    Is anybody facing the same issue?


How to hide the Start button in Windows 10

In Windows 8, Microsoft removed the Start button. I've upgraded to Windows 10 and the Start button has made an appearance again.  I've checked the taskbar context menu and it allows me to remove:   Search bar/icon Task View button Touch keyboard button   In System Settings > Notifications & Actions > Turn system icons on or off, I see:   Clock Volume Network Power Input indicator Location Action Center   None of which I want to remove. I find it a bit ridiculous that you can remove the clock as well as all the other icons but not the Start button.  I'd prefer not installing a third-party app for this purpose if possible, however I am open to the idea of it. Covering up that square of my screen is not an acceptable solution as it does not allow me to gain that square of screen real estate on my taskbar.  Is there a way to remove the Start button?


Ball in hand on the black - where can it go?

If I made a foul (such as scratching the cue ball), my opponent has the ball in hand.  Where can they place it, if they are on the black?


Force is generally a function of $\mathbf{x}$, $\mathbf{v}$ (or $\mathbf{p}$) and $t$

Force is generally a function of $\mathbf{r}(t)$, $\mathbf{v}(t)$  and $t$. $$1-)\begin{cases} \mathbf F: \mathbb R^3\times\mathbb R^3 \times \mathbb R \  \rightarrow \mathbb R^3\\ (\mathbf r, \mathbf v, t) \longmapsto \mathbf F(\mathbf r,\mathbf v,t) \end{cases}$$   But I do't understand it . Because function from $\mathbb{R^7}$ to $\mathbb{R^3}$ I don't know how is that .    Can we conclude that $\mathbf F(\mathbf r(t),\mathbf v(t),t)=\mathbf F(t)$ ??


The $k$th moments of normal distribution

How to proof that the $k$th moments of random variable $X\backsim N(0, \sigma^2)$ which is:  $$ E(X^k) =  \begin{cases} \sigma^k(k!!) & \text{for k even;}\\ \ 0 & \text{for k odd} \end{cases} $$  I started from the basic definition of the $k$th moments:  $$E(X^k) =\int_{-\infty}^\infty x^k\frac{1}{\sqrt{2\pi}\sigma}e^{- \frac{x^2}{2\sigma^2}}dx$$  What kind of integration techniques that could solve this equation?


Finding Distribution function from probability density function

Given $$f(x) = \begin{cases} x, \; 0 < x <1\\ 2-x, \; 1 \leq x < 2\\ 0 \text{ everywhere else} \end{cases}$$  as our P.D.F, I must find the corresponding distribution function.   I know that $F(x) = P(X \leq x) = \int_{-\infty}^{x}f(t) dt$ is the distribution function, but I don't know how to apply it to this particular probability density function. The P.D.F has three different cases. How do I handle that? A sum of integrals with the appropriate bounds for each case of $f(x)$?  I'm kind of confused on how to create those bounds. How do we get rid the of the $-\infty$?  I'm thinking:  For $x > 0$:  $$F(x) = P(X \leq x) = \int_{-\infty}^{x} f(t)dt = \int_{0}^{1} x dx + \int_{1}^{2} 2-x dx$$ Eh....


Is necromancy necessarily evil in 5e or Forgotten Realms?

With Forgotten Realms being the default setting for 5e, I am curious if there is the possibility for a necromancer, specifically a wizard, to be considered not evil:   In terms of alignment In terms of how they are viewed by the general populace.   I haven't seen any rules specifically pointing out necromancers as evil, but going over the  the closest thing to non-evil is someone who was impersonating a neutral character before they revealed themselves as evil.  So, would it be thematically reasonable to have a neutral or even good necromancer, interested in manipulating life forces without explicit malicious intent? Would it be possible to do the same, while summoning undead?


Saving Bing Aerial Images out using MapInfo Pro 16.0

I'm using MapInfo Pro v16.0 and I'm trying to extract the raster data out for later use.  I've saved my final output already as PDF and JPEG but I'd like to know if there is a way in clipping out the area of interest (using Mapinfo v16) and saving it as a raster data for later use.


If I appeal an admission decision by a German university at the court, would the department take it personally?

I've applied to a graduate program at a university in Germany and there is relatively clear evidence indicating that they've missed one or even two of my documents in application review based on the responses they've given me. Now they are reluctant to reconsidering my application when I resent the documents to them and explained how those documents mean the reason they mentioned for rejection is clearly not true. This is not a subjective thing and it's completely objective and bureaucratic.  It's stated on my rejection letter that I could appeal the decision at the court and I have their emails where they explained reasons that are in contradiction with each other about those documents, which could help me make the case. I really like that department and want to have the option to go there later in my academic career, but I'm afraid if I take my complaint to the court, the department may develop some level of animosity towards me.  Do you think I should forget about working in that department if I start an appeal process at the court, or could I assume that everyone could just be adults and behave professionally?  Note that while  about what possible decisions to take, this is just about the consequences of an appeal at court when it comes to working with the department in the future.


Given a convex quadrilateral $ABCD$. We trisect $AB, BC, CD ,DA$ by the points $P_1, P_2, R_1, R_2, Q_1,Q_2,S_1,S_2$ respectively as shown below. Show that  $$\frac{[KLMN]}{[ABCD]}=\frac{1}{9}.$$ Where $[ABCD]$ denotes the area of $ABCD$.  I think the question make use of the following fact:  If the line $AB$ and $PQ$ intersect at $M$, then $[ABP]/[ABQ]=PM/QM$.  I tried to decompose the quadrilateral into triangle and make use of the theorem, but it seemed not very helpful, please helps.


How to compare the performance of different feature subsets with the same classifier?

I have a small dataset (55 samples) described by 20 features.  I performed a SVM (RBF) approach with cross-validation on 70% of the dataset (training part) and I recorded the AUC (average) for 150 combinations of features that may have a sense for the experiment (nevertheless I had tried before feature selection but with no success).  I have very good results (near 99% AUC) for some combinations of features and bad ones 51% for example for others.  My question is which statistical approach I have to use to assess correctly which combinations are better than others ?


When I run sudo update-grub2 or sudo update-grub  I get the response     Sourcing file `/etc/default/grub'   /usr/sbin/grub-mkconfig: 1: /etc/default/grub: If: not found   However, my /etc/default/grub file is definitely there. The contents are as such:    If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: #   info -f grub -n 'Simple configuration'  GRUB_DEFAULT=0 GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` #Originally... #GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX_DEFAULT="splash radeon.si_support=0 amdgpu.si_support=1 radeon.cik_support=0 amdgpu.cik_support=1" GRUB_CMDLINE_LINUX=""  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"   Any clue what the error could be? Thanks!


When writing a title, do you capitalize "the" in names like "Boris The Animal"?

When writing a title, do you capitalize "the" in names like "Boris The Animal", "Mike the Bike Guy" or "Tom The Dancing Bug"?


Is it possible to transfer ownership of an answer?

I often get the result of my questions via a couple of comments (because the other person is too humble to write it as answer?).   In some cases, several comments together make a worthy answer. Thus, I would like to sum up all the comments into the final solution, but feel cheap for getting any reputation for it. I would rather transfer the answer to the poster of all the comments - if he accepts.  Is this possible somehow?    Exemplary post:   Related meta-post:     Update: Making the answer community wiki is a good idea. Since the commentor gets no points and I cannot accept the answer for two days, this is not perfect - but acceptable ;)


Help me count editors of this post (made CW by "more than 5 different editor", I found only 3)

was made community wiki in rev 14.  says:     [Post Made Community Wiki by being edited by more than 5 different editor]   (Side note "5 different editor" (instead of "...editors") is exact quote, that's just the way how system wrote it. Also worth noting that this happened before .)  The problem is, I found only three editors, not five: Jimmy edited , David edited  and all the rest seems to be done by yours truly. (For the sake of completeness, I found fourth editor but it was .)  In a simpler case I would say it's a  but here, I am not certain. Revision history  and I could have missed something.  Were there indeed five different editors when this post was made community wiki?


Why BufferedReader gives me exception When it found nothing

I am writing an application for the Android platform.  My purpose is; I search the word that I wrote on edit text from a text file. To make this; I used to BufferedReader. ( Txt file size too high so that I used to edit custom properties). My code is working perfectly when It found my word in a text file. But When I search meanless something like 'asdsad'. My code gives me the exception. It is about BufferedReader How can I fix it?   custom properties:  idea.max.intellisense.filesize=999999   My codes:  String text = "";         BufferedReader reader;          try {             InputStream is = getAssets().open("word_families_kopya.txt");             reader = new BufferedReader(new InputStreamReader(is));             String line = reader.readLine();              String translating_string = editText_words.getText().toString();   while (!line.contains(translating_string) && line.toString() != null) {       line = reader.readLine();   Log.i(TAG, "onClick: " + line);         cevirilmis_textview.setText(line);  }       } catch (IOException e) {         e.printStackTrace();     }finally {      }            } catch (IOException e) {             e.printStackTrace();         }finally {          }   Exception message:     read: unexpected EOF!


Adding a constraint to prevent duplicates in SQL Update Trigger

We have a user table, every user has an unique email and username. We try to do this within our code but we want to be sure users are never inserted (or updated) in the database with the same username of email. I've added a BEFORE INSERT Trigger which prevents the insertion of duplicate users.  CREATE TRIGGER [dbo].[BeforeUpdateUser]    ON  [dbo].[Users]    INSTEAD OF INSERT AS  BEGIN     -- SET NOCOUNT ON added to prevent extra result sets from     -- interfering with SELECT statements.     SET NOCOUNT ON;      DECLARE @Email nvarchar(MAX)     DECLARE @UserName nvarchar(MAX)     DECLARE @UserId int     DECLARE @DoInsert bit      SET @DoInsert = 1      SELECT @Email = Email, @UserName = UserName FROM INSERTED      SELECT @UserId = UserId FROM Users WHERE Email = @Email      IF (@UserId IS NOT NULL)         BEGIN             SET @DoInsert = 0         END      SELECT @UserId = UserId FROM Users WHERE UserName = @UserName      IF (@UserId IS NOT NULL)         BEGIN             SET @DoInsert = 0         END      IF (@DoInsert = 1)         BEGIN             INSERT INTO Users             SELECT                             FirstName,                             LastName,                             Email,                             Password,                             UserName,                             LanguageId,                            Data,                             IsDeleted                         FROM INSERTED         END     ELSE         BEGIN             DECLARE @ErrorMessage nvarchar(MAX)             SET @ErrorMessage =                           'The username and emailadress of a user must be unique!'             RAISERROR 50001 @ErrorMessage         END  END   But for the Update trigger I have no Idea how to do this. I've found this example with google:  But I don't know if it applies when you update multiple columns at once.  EDIT:  I've tried to add a unique constraint on these columns but it doesn't work:  Msg 1919, Level 16, State 1, Line 1 Column 'Email' in table 'Users' is of a type  that is invalid for use as a key column in an index.


How do these particles sort themselves by size?

I have this bowl of sodium polyacrylate (Insta-Snow) that has been drying out for a few weeks.  At this point it consists of solid pieces ranging in size from 3 or 4 mm across to much smaller ones that form a fine powder. I can stir them around and mix them but if I hold the bowl at a slight angle and shake it for few seconds they sort themselves out with the smallest particles at the higher part of the bowl and the largest ones at the bottom.  The behaviour reminds me of seeing sand grains sorted on a beach by the action of waves.  How does this self sorting happen?  EDIT   If I put the particles in a cylindrical cup and shake them they sort themselves the opposite way with the largest particles on top but in the bowl it's the finest particles on top.  This seems to be a case of the reverse Brazil nut effect.  Clearly interactions between the particles and the container are part of the explanation.     I'm not sure what tags apply - feel free to edit.


I am using ubuntu 11.10 version .. when I try to open the ubuntu software center it opens but gives me a blank screen and nothing shows up , before this happens it used to open normally but I couldn't install or upgrade anything from it as an error used to pop up that I have to remove something and it also refused to remove it ! so please I need a solution for this .


Today I answered  on ELU and included as my suggestion of the correct answer the following line (taken from the OP's own example):     To his amusement, Jason realized that 'Madam Curie' is an anagram of 'Radium Came'   This was queried by another user, specifically my use of the present tense "is an anagram" as they felt the tense should match the tense of the comparison, i.e. "...was an anagram..."  In my explanation I replied:     Because 'Madame Curie' is an anagram of 'Radium Came' throughout the continuum of time. Jason only realised it in the past.   However I am not sure of my ground here and perhaps I am incorrect, so I have since scoured ELU to try and find a grammatical rule for handling this and I was unable to.  Am I using the correct tense (and for the right reasons)? Is there a rule for this?  Edit: Not a duplicate of  because that refers to a finite event in the past that does not continue into the present. I refer to something that was true then and is still true now, leading to the confusion about tenses.


How to replace the_post_thumbnail template tag and show the first inside the post image instead

I want WordPress to return the first post image or a default image if no featured image has been set. My theme uses the_post_thumbnail many times, so I don't want to go through and change all references to a new function. I'd rather filter the core. Here's what I've added to functions.php:  add_filter('post_thumbnail_html', 'my_thumbnail_html', 10, 5);  function my_thumbnail_html( $html, $post_id, $post_thumbnail_id, $size, $attr ) {     global $post, $posts;     if (has_post_thumbnail() ) {         echo get_the_post_thumbnail( null, $size, $attr );     }     else {         $first_img = '';         ob_start();         ob_end_clean();         $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);         $first_img = $matches [1] [0];         if(empty($first_img)){             $first_img = get_bloginfo("template_url") . '/images/default.gif';         }         return $first_img;     } }   How do I hook this correctly?


How to make FBD in a vertical circle and a banked road?

How is free body diagram of a block on an inclined plane different than that of a vertical circle (string connected to a block doing circular motion in vertical direction) and a banked road  Because there are two types of results in both cases:- T(tension)/N(Normal Reaction) cos [some angle]= mg And  Mg cos[some angle]= N/T !()