Is there a simple way to calculate $\sin \frac{3\pi}{10}-\sin \frac{\pi}{10}$?

I know how to find the exact value of $\sin \frac{\pi}{10}$ using double and triple angle formulas and the fact that $\frac{5\pi}{10}=\frac{\pi}{2}$ but it maybe too complicated for high school students. Is there an easier way that I do not see? The answer is $0.5$.  Unfortunately I did not see a clear answer among posted answers to my question but thanks to @labbhattacharjee, the main idea is to multiply and divide by $2 \cos 18°$. Thus $\large{\sin 54°-\sin 18°=\frac{2 \sin 54°\cos 18°-2 \sin 18°\cos 18°}{2 \cos 18°}=\frac{\sin 72° + \sin 36°-\sin 36°}{2 \cos 18°}=\frac{\sin 72°}{2\cos 18°}=0.5}$


How to reject a PhD Scholarship offer after accepting it?

I have accepted a scholarship at a certain university, after exchanging many emails with the supervisor. I was interviewed by him and he personally took trouble to secure funding for me. And he also helped me a lot throughout the process. But now I have received a better offer from a better university, which has a better research group.  Now I am not sure how to email my supervisor rejecting the offer, after accepting it months back. It seems a really unethical thing to do. But considering all the other aspects, the second university seems to be the ideal choice for me.  How should I reject the first offer without offending my supervisor?


How to prove that $A$ is positive semi-definite if all principal minors are non-negative?

Let $A\in\mathbb C^{n\times n}$ be a Hermitian matrix such that all its principal minors are non-negative (i.e. for $B=\left(a_{l_il_j}\right)_{1≤i,j≤k}$ with $1≤l_1<...<l_k≤n$ we have $\det(B)≥0$). Then how to show that $A$ is positive semi-definite?   I thought maybe we could use induction since the condition is also satisfied for every submatrix, but I couldn't find an easy way. Can prove it elegantly?


How does the expected value relate to mean, median, etc. in a non-normal distribution?

How does the expected value of a continuous random variable relate to its arithmetic mean, median, etc. in a non-normal distribution (eg. skew-normal)?  I'm interested in any common/interesting distributions (eg. log-normal, simple bi/multimodal distributions, anything else weird and wonderful).  I'm looking mostly for qualitative answers, but any quantitative or formulaic answers are also welcome. I'd particularly like to see any visual representations that make it clearer.


Concept about anonymous function and invoke in javascript

Now I have to solve a exercise in the exercise from freecodecamp.  The outcome are expected as follows:   addTogether(2, 3) should return 5.  addTogether(2)(3) should return 5.  addTogether("This is sth") should return undefined.  addTogether(2, "3") should return undefined.  addTogether(2)([3]) should return undefined.  And by referring to some suggested solutions, one of the solutions is like:   function add(){    var args= [].slice.call(arguments);     if (!args.every(function(argument){return typeof argument === 'number';})){     return undefined;    }     if(args.length === 2){     return args[0] + args[1];     } else {     var a = args[0];     var addOne = function(b){       return add(a,b);     };     return addOne;     }   return false  }  add(2)(3)   In here, I am not really sure, why in the variable addOne, the anonymous function will successfully capture the the value in the second  brackets, after calling the first value before?  I seek for the information about JavaScript function invocation, but still do not 100% sure why...   Edited:  With the features of closure, because I have already extracted the first parentheses, the next closure i.e the function, will automatically take the second input? And in this case, if I want to do addTogether(2)(3)(4)(5) , then I can do that by creating closures within different parentheses e.g   var a = args[0];   var addOne = function(b){     var addTwo = function(c){      var addThree = function(d){        return a+b+c+d;      }    }       };   Do I understand in the correct sense?


During installation of 18.04 on HP Pavillion 15 CS2082-TX my screen appears rotated by 90 degrees

I am  trying to install Ubuntu 18.04, but in installation mode my laptop screen is randomly rotating by 90 degrees.  This is happening on a hp pavilion 15 cs2082-tx.  I had previously installed Ubuntu 16.04 and I didn't have this issue, in fact is was working fine with the exception of wifi, and due to the wifi problem I want to switch to 18.04.  Any help will be appreciated.


dhruvhadoop1@hadoopmaster:~$ cat /home/hadoopuser/.ssh/id_rsa.pub >> /home/hadoopuser/.ssh/authorized_keys bash: /home/hadoopuser/.ssh/authorized_keys: No such file or directory dhruvhadoop1@hadoopmaster:~$ cat /home/hadoopuser/.ssh/id_rsa.pub >> /home/hadoopuser/ .ssh/authorized_keys bash: /home/hadoopuser/: Is a directory dhruvhadoop1@hadoopmaster:~$ cat /home/hadoopuser/.ssh/id_rsa.pub >> /home/hadoopuser/ .ssh/authorized_keys/ bash: /home/hadoopuser/: Is a directory dhruvhadoop1@hadoopmaster:~$ cat /home/hadoopuser/.ssh/id_rsa.pub >> /home/hadoopuser/.ssh/authorized_keys bash: /home/hadoopuser/.ssh/authorized_keys: No such file or directory dhruvhadoop1@hadoopmaster:~$


Pirates of the Caribbean: Dead Men Tell No Tales seems to contradict the entire movie series, because the compass Jack possesses was allegedly given to him by Tia Dalma. But in Dead Men Tell No Tales it is said that the compass was handed over to Jack by a dying pirate. Who actually gave Jack the compass?


I am trying to put 3 figures in this format:   but they appear like this:   I am using this code:  \begin{figure}[!htb]     \begin{subfigmatrix}{2}         \subfigure[Dados do vento e respectiva potência por modelo de turbina]{\includegraphics[width=0.4\linewidth]{Figures/tabvento.png}}         \subfigure[Perfil de vento típico da ilha da Brava]{\includegraphics[width=0.5\linewidth]{Figures/perfilvento.png}}         \subfigure[Curva de potência dos 2 modelos de aerogeradores]{\includegraphics[width=0.5\linewidth]{Figures/curvaaero.png}}     \end{subfigmatrix}     \caption[Dados gerais do recurso eólico utilizado para as simulações]{Dados gerais do recurso eólico utilizado para as simulações}     \label{fig:irrfdad} \end{figure}   Any suggestion how to solve it?


Is it bad to have /home/ on an NTFS partition?

On my new computer, I didn't want to have /home on the system SSD but rather on the secondary drive which is a conventional hard drive.   I followed these instructions for moving /home to the other disk:   (actually )  But now I realize that the disk is NTFS format.    Will running home from NTFS be a problem, or perhaps a performance killer?   Can I convert the HDD from NTFS to ext3 (or ext4?!) without losing all the files, and how?


Am I Searching or Filtering in this design?

[Edit]:This question is asked to handle a specific design issue. Although it is mainly related to the post I am sharing below, it is not meant to generally differentiate between Filtering and Searching but to use the concept in practice. The answer below by @KK although good, it assumes a fact that when no data is displayed then the user is searching, when data is displayed then user is filtering. If that is a fact to draw conclusion upon, then the answer to my question = Filtering. [End of Edit]  In a web-based application, a page displays information in a table format (random data displayed in the table). The table could have hundreds of records. Two  ways are provided to filter/limit/refine/search the results in the table:  (1)- A single select drop-down list (Filter by Type) with the Types available (there are less than 10 types in the system). When the user selects a Type from the list, results will only be the records with the Type the user selected. So I know I am filtering here (I am providing the filter which in this case = Type). For example: If I select "Accounting" from the list, only records with the Type = Accounting will be displayed.  (2)- A text-box where the user is advised to enter either a Director name or a Year, and results are displayed based on the user's entry (see example below). If user enters "41" only, then the results will be every record that contains the number "41" under Director or Year columns. This text-box will only look at values under the Director and Year columns.    The irony is that I answered a question () thinking I have good enough knowledge in regard. However, I am still confused about it in this specific design.  So am I Filtering or Searching in the Text-box? Should the Placeholder (or if replaced by a Label) say "Filter by..." or "Search by..."?


What are the specific naming conventions for variables in bash shell scripting language?

Is it the same convention as those used in known programming languages such as Java and C? I'm trying to create a lot of variables and I want it to start with a number, but I'm not sure if it's okay.


Let $a_1,a_2,\ldots,a_n\in \mathbb R$ and $f(x)=a_1\sin x+a_2\sin 2x+\ldots+a_n\sin nx$  such that $|f(x)|\leq|\sin x|$ for every $x\in \mathbb R$. Prove that $|a_1+2a_2+3a_3+\ldots+na_n|\leq1$.  Solve: I solved it very simple. $$|a_1+2a_2+\ldots+na_n|=\lim_{x\to 0}\frac{|a_1\sin x+a_2\sin 2x+\ldots+a_n\sin nx|}{|\sin x|}=\lim_{x\to 0}\frac{|f(x)|}{|\sin x|}\leq1.$$


I am trying to find $[\mathbb{Q}(\sqrt [3] {3},\sqrt [3] {2}):\mathbb{Q}]$. My guess is it is $9$. There are 3 possibilities-3,6,9. If it is not 9 then $X^{3}-3$ is not irreducible over $\mathbb{Q}(\sqrt [3] {2})$ hence it has a root in $\mathbb{Q}(\sqrt [3] {2})$. But $\mathbb{Q}(\sqrt [3] {2})$ is real field so the only possibility is that it contains $\sqrt [3] {3}$. To show this is not the case I assumed that $\sqrt [3] {3}=a+b\sqrt [3] {2}+c\sqrt [3] {4}$ and cubed both side. I have not yet completed it , but seems this methode is very long. Is there a better approach?  I WANT A SOLUTION WHICH DOES NOT USE ANY GALOIS THEORY/ALGEBRAIC NUMBER THEORY.


Is it possible in apt/apt-get to install a package and only some of its recommendations?  For example: I want to install kde-plasma-desktop which recommends sddm, but I don't want to install sddm. What I do want is to install the rest of the recommended packages.  Is there any way of doing this with apt?


In 1999, I was living in Cuba.      In 1999, I lived in Cuba.   Do both sentences seem grammatically correct?   My teacher had told that the first sentence, which is with past continuous, is incorrect. I don't know whether or not the first sentence is correct. It indeed seems natural, doesn't it?


How to use fonts.handlers.otf.addfeature, etc.?

The following commands are used in some of the examples about Lua(La)TeX and ConTeXt in their manuals, tutorials and on the net:  fonts.handlers.otf.addfeature, fonts.protrusions.vectors, fonts.expansions.classes, etc.  Is there any documentation on how to use these functions?  Any help would be gratefully appreciated.


How to calculate the frequency of each word in a String

~~This is my code Can Anybody tell me why outputs are not coming correct?  class FrequencyOfWord {   public static void main(String dt[])   {     String str="Hello World Hello";     int i=0,j=0,space=0,count=0;     for(i=0;i<str.length()-1;i++)     {         if(str.charAt(i)==' ')         {             space++;         }     }     String arr[]=new String[space+1];     String cstr="";     for(i=0;i<str.length();i++)     {         if(str.charAt(i)==' ')         {             arr[j]=cstr;             cstr="";             j++;         }         else         {             cstr=cstr+str.charAt(i);         }         arr[j]=cstr;     }     //System.out.println(str);     for(i=0;i<arr.length;i++)     {         System.out.print(arr[i]);     }     for(i=0;i<arr.length;i++)     {         count=0;         int flag=0;         for(j=0;j<arr.length;j++)         {             if(arr[i]==arr[j])             {                 count++;             }             if((arr[i]==arr[j])&&(i>j))             {                 flag=1;             }         }         if((count!=0)&&(flag==0))         {             System.out.println(arr[i]+"\t\t"+count);         }     }   } }   the output of count is coming to be 1 for each word. Can anyone tell me the error. The flag variable is used so that only once the frequency of a word is printed.


How can I delete all files from a directory when it reports "Argument list too long"

I have a directory with a couple hundred thousand files in it.    I want to delete all the files, but rm * -f reports: "argument list too long"  What is the best way to clear out this directory?


How to obtain a closed form for summation over polynomial ($\sum_{x=1}^n x^m$)?

What is the method for obtaining the polynomial equal to   \begin{equation*} \sum^{n}_{x=1}x^m \end{equation*}  for unknown $n$, and systematically for various values of $m$? I know it should be a polynomial in $n$ of degree $m+1$, but what are the coefficients?  Wolfram Alpha seems to implement this method, at least for $m$ up to , but it is not clear to me how to reproduce it. Thanks.


What is the name of the poem Belle reads out?

In one of the scenes from Beauty and the Beast (2017), they are both walking around the castle grounds outside in daylight as she reads a poem aloud about winter/snow/ice. I can't really remember any of the words, although the final word she read was glass and 'grass' featured as an earlier word. Timing wise it was before she left to return to the village, and I'm pretty sure before the ballroom dance.  What is the name, and what are the words, of that poem? Was it created specifically for the film? How does this poem contribute the overall value of the movie?


Getting case sensitive 15 char id from insensitive 18 char id

We have a system that automatically uppercase's all characters in the salesforce 18 character ID, so for example 0060H00000mbAZlQAM versus 0060H00000MBAZLQAM. Salesforce does not accept the latter as valid whereas the former is valid, which is contrary to our memory of how the case insensitive ID's worked. Is there any information on how to get the proper case sensitive ID from the case insensitive ID (One where the 15 char bit has had its cases jumbled up)?


Clicking back button after entering full screen

I'm clicking Run code snipped, then Full page and then the back button in my browser. And now I get a white blank page with only Close button.  Expected results: the full screen should close and the page should get back to the question/answer.  Testcase:


Why doesn't $f(z)=\sqrt z$ work as a counterexample to If $f(z)$ is not an entire function, then $g(z) = f^2(z)$ cannot be an entire function.

We have a statement “If $f(z)$ is not an entire function, then $g(z) = f^2(z)$ cannot be an entire function.”. Two students and a professor had the following conversation: A: The statement is false. I can give a counter-example. Let $f(z) = \sqrt z$, assuming that it is a branch that takes −1 to i. Then it is not analytic on the branch cut, but $g(z) = f ^2(z) = z$ is obviously an entire function. B: I think this is not a counter-example, so we cannot conclude the statement is false yet. Professor: Good! B is correct. The statement is false. Now I give you an assignment: (a) Show that student A’s example does not work as a counter-example. Why doesn't student A's example work as a counter example? I don't understand what is wrong with the statement that it'd be incorrect Also I'm not exactly clear on what $f^2(z)$ means is it $f(f(z))$ or $[f(z)]^2$ This is a bit different from my previous question as previously I was asking about why it wasn't analytic on the branch cut, now I'm trying to understand why the counterexample: $f(z)=\sqrt z$ isn't right. I know $f(z)$ is not analytic on the branch -1 to i therefore not entire, but $f^2(z)=z$ is clearly analytic, and therefore entire so it should work as a counterexample however the question states it doesn't. I don't understand why it doesn't work as a counter example. No matter how I look at it $z$ is obviously entire and $\sqrt z$ isn't so shouldn't it work as a proper counter example.


Mount disk 100% full after clean install

After struggling for a bit installing Ubuntu I managed to do it by setting the acpi flag to off with the following setup in the installer:    I have my main Windows 10 running on an NVMe drive and Ubuntu is installed on a SSD.  After a successful installation, it seems that the disk is ENTIRELY full:    What's going on here? Thanks in advance for any help.    Update:  I re-installed the system and right away the usage was something like 17%. A few minutes later it was up to 70%, seconds later to 71%, etc. How do can I diagnose what's happening?


WordPress keeps writing rewrite rules to .htaccess

WordPress keeps writing rewrite rules into .htaccess again and again till it causes an error and causes server to return 500 Internal server error...  i.e. My .htaccess is a series of  # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>  # END WordPress # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>  # END WordPress   repeated over and over and over again.    By itself, that's not a massive problem (except that my .htaccess will grow to several MBs, slowing down the site significantly). But occasionally, there would appear some garbage in the .htaccess which takes the site down (500 Internal Server Error)


Late Binding to dll based on CPU architecture

I am currently writing a helper library that connects to shop floor PLCs via .   The TopServer library has separate versions for x86 and x64 architectures and I want to load the appropriate version at runtime using late binding based on the CPU architecture of the calling code. The methods in the two libraries have the same signatures.  I can use reflection to load the relevant object using the below code but I am wondering what is the best method of using this instance in the calling code.  public class LateBinding {     public static T GetInstance<T>(string dllPath, string fullyQualifiedClassName) where T : class     {         Assembly assembly = System.Reflection.Assembly.LoadFile(dllPath);         Type t = assembly.GetType(fullyQualifiedClassName);          return (T)Activator.CreateInstance(t);     } }   As I'm late binding I don't get the types pre-runtime so was thinking that creating an interface based on the libraries method signatures would be a good way to implement both version.  Does anyone have a view on this method or recommendations on other methods?


There are weird shadows on my model in cycles and I have no idea why. What is this and how to fix this? Thanks in advance


I just started Java programming. I love it so far, but I have been stuck on this problem for a while.  When I run this code, whenever I type in “boy” it will just respond with GIRL:  import java.util.Scanner;  public class ifstatementgirlorboy {     public static void main(String args[]) {         System.out.println("Are you a boy or a girl?");         Scanner input = new Scanner(System.in);         String gender = input.nextLine();          if(gender=="boy") {              System.out.println("BOY");         }          else {              System.out.println("GIRL");          }     } }   Why?


I need to know please any suggestion about how to create a custom login form for another type of users in drupal 8 , I have now /user/login is for administrator, but I need to add /account/login it's different for the first one and it's for a normal user and this form should use the functionnalities of Drupal 8.


It's easy to represent (via fractions) numbers like $2,34$ or $2,\overline{34}$ and even $2,3\overline{4}$. But what about $2,\overline{3}4$?  $2,3333333333333333333333333333333333....$ and I'll never be able to write the number $4$!!  Does it exist with this notation?  Is a rational number?  Notation: The top bar represents periodic numbers.


I want to get this math font:    But I can only get this one:    I have tried different options but I can't get it. Can you tell me what options I need to change in order to make the separation between characters smaller and to change only the math font. I have checked different questions with my same issue, but I have not been able to reproduce their solutions.


How to uninstall redundant python instance?

When I execute:  $ which -a python /usr/local/bin/python /usr/bin/python   This bothers me because execute python directly will execute /usr/local/bin/python, but it can't link to correct dependencies. So, how could i correctly uninstall it? I've checked all packages.   I've checked dpkg --search /usr/local/bin/python but only get no path found matching pattern /usr/local/bin/python. Seems it was installed by compiling sources of python and make install. But now how can i remove it?


What if there are two paths of least time?

I’m reading Fermat’s principle of least time from the Feynman lectures. And the following question popped.  Suppose we have a medium whose the refractive index is a (continuous) function of the position. Then consider two points $A$ and $B$ in the medium.  Question 1: Can the refractive index be such a function of position that we have in fact two paths of “stationary” time (as I read on , it need not be least) form $A$ to $B$? (The time taken need not be the same for both the paths, but these paths make their corresponding times local extrema.)  Question 2: If such a refractive index medium ceases to exist, why so? If not, which path will the light go?


Allow moderators to move messages without inviting users into the new room

The tool to move multiple messages into a different chat room also invites all users that particpated into that new room. Which does make some sense if you want to continue the discussion there, but it is absolutely counterproductive if I'm moving messages because I want to get rid of the entire discussion and just put the whole mess somewhere where it doesn't draw any attention.  I think the move tool has some potential as a tool for moderating chat, but the automatic invitation of users makes it useless for this purpose and because I didn't think about this rather obscure feature I just invited a whole bunch of people to a discussion I wanted to archive quietly.  Please just make this invitation feature optional, and off by default. Though the ability to silently move should be restricted to moderators, and not be available to room owners.


C# round a number to any arbitrary digit of a double

I am looking to round a double to any arbitrary digit to right or left of the decimal point. Math.Round only works for digits to the right of the decimal point, and I need to be able to round to values the nearest 10s, 100s, 1000s, ... Example of desired inputs/outputs: Round(1234.56789,  0) == 1235 Round(1234.56789, -3) == 1234.568 Round(1234.56789,  3) == 1000  This problem differs from  because I need to round values to positions to the left of the decimal point such as 1,2345,000 rounding to the nearest 10,000


How to make a modification take affect without restarting nginx?

Apache has a graceful option which can scan for modification in http.conf without restarting Apache. What about nginx?


listings package changes hyphens to minus signs

The  package transforms source-code hyphens (-, U+002D) into minus signs (−, U+2212) when using the default proportional fonts, though not when using the default monospaced typewriter font.  A minimal working example:  \documentclass{article} \usepackage{listings} \lstset{language=C}  \begin{document}   \lstinline[basicstyle=\rmfamily]{--x} \textrm{-{}-x} \par   \lstinline[basicstyle=\sffamily]{--x} \textsf{-{}-x} \par   \lstinline[basicstyle=\ttfamily]{--x} \texttt{-{}-x} \end{document}   The first two rendered lines clearly show the difference between the long minus signs and the short hyphens:    This is not just an aesthetic problem.  The listing is genuinely no longer correct code.  A minus sign is not a hyphen, and the syntax of C (and most other languages) does not treat them as interchangeable.  --x is valid C code, but −−x is not.  If a non-Unicode-savvy person tries to copy and paste the code from such a listing, she may find that it does not compile but be baffled as to the problem.  How can I prevent listings from turning hyphens into minus signs?


Show that there exists a $3 × 3$ invertible matrix $M$ with entries in $\mathbb{Z}/2\mathbb{Z}$ such that $M^7 = I_3$.

Show that there exists a $3 × 3$ invertible matrix $M$ (which is not the identity matrix) with entries in the field $\mathbb{Z}/2\mathbb{Z}$ such that $M^7 = $Identity matrix.  All I could do was use hit and try method. I was checking different matrices which might satisfy this condition. Of course, it's a bad approach.


With the current android app the bodies of questions/answers show all black, with links (URLs) in blue and equations in grey.  Just updated, no idea what version it is now.


I have created a table and want to get an id on a td click. The data is population through an ajax call and I an want an id on when delete is clicked. So its on the fly the elements are added.  $.ajax({         url: 'http://localhost:8080/getUsers,         type: 'GET',         success: function (data, textStatus, jqXHR) {             $.each(data, function (index, result) {                 $("

").attr("id",result.user_id+"userTr").appendTo("#userTBody");                 $("	").attr("id",result.user_id+"userName").appendTo("#"+result.user_id+"userTr");                 $("#"+result.user_id+"userName").html(result.username);                 $("	").attr("id",result.user_id).appendTo("#"+result.user_id+"userTr");                 $("#"+result.user_id).html('Delete');                 $("#"+result.user_id).css('cursor', 'pointer');                 $("#"+result.user_id).addClass("delete");             });         },         error: function() {             alert('err')         }     });  $('.delete').on('click', function () {         alert($(this).attr('id'));     });   I have also tried with this.id but nothing happens.


For simple fraction, we can easily convert it to repeating decimal by calculator. Ex. $\frac 1 3 = 0.33333\ldots$, $\frac 1 7=0.(142857),\ldots$ But some fraction fraction like $10/29, 1/97,...$ The repeating part of them are too long, so it can't fully show on the calculator. So is there any algorithm  to find the repeating part for that fraction?


C#: Should a base interface be included in the list of interface for a class implementation?

In the C# specification for Interface (), there is an example regarding a class implements multiple interfaces:  interface IControl {     void Paint(); }  interface ITextBox: IControl {     void SetText(string text); }  interface IListBox: IControl {     void SetItems(string[] items); }  class ComboBox: IControl, ITextBox, IListBox {     void IControl.Paint() {...}     void ITextBox.SetText(string text) {...}     void IListBox.SetItems(string[] items) {...} }   My question is not about Implicit and Explicit implementation, I was wondering why people wants to include the base interface(IControl in this example) in the class definition? Isn't following definition good enough?  class ComboBox: /*IControl,*/ ITextBox, IListBox     {         void Paint() {...}         void ITextBox.SetText(string text) {...}         void IListBox.SetItems(string[] items) {...}     }   Another example is in the List definition, its base interface list includes the base interfaces of IList<T> and ILit, why?  interface IList<T> : ICollection<T>, IEnumerable<T>, IEnumerable   interface IList : ICollection, IEnumerableclass   List<T> : IList<T>, ICollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable


How to cite articles from a well known website

I would like to cite articles and the specific authors from well known websites. My problem is that I would also like to include the website info in the citation. For example I am citing an article from Surfing Magazine but the article was only published online and not in the magazine. Alternatively, I am looking to cite an article from surfline.com by a named author but I would like surfline.com to show up in the citation alone and not just included in the url portion of the citation.   My code is as follows:  For the online references I used the following format in my .bib file (Cite.bib)   @MISC{maldives,    author =       "Connoly, Darlene",    title =        "Controversy in the Maldives",    editor =       "Surfline.com",    month =        "August",    year =         "2012",    url =          "\url{http://www.surfline.com/surf-news/maldives-surf-access-controversy-update_75296/ }",    note =         "[Online; posted 27-August-2012]",  }   @MISC{mull,    author =       "Mull, Jeff",    title =        "Maldives Controversy",    editor =       "Surfing Magazine",    month =        "September",    year =         "2010",    url =          "\url{http://www.surfermag.com/features/maldives-controversy/ }",    note =         "[Online; posted 13-September-2012]",  }   For the .tex file I am using the following code/packages   \usepackage{natbib}  \usepackage{url}   \begin{document}    text   \nocite{mull}  \bibliographystyle{plainnat}  \bibliography{Cite}   \end{document}   When I try to compile the document using 'pdftexify' I get the following error.  Package natbib warning: Citation 'Mull' undefined on input line 373   [23] [24] [25] (C:\Users\...\LaTex\title.bbl ! TeX capacity exceeded, sorry [input stack size=5000]. \@makeother #1->\catcode '#1                         12\relax 1.12 ...  ! ==> Fatal error occured, no output PDF file produced! Transcript written on title.log. texify: pdflatex.exe failed for some reason (see log file)   However if I try the same syntax using an @ARTICLE or @BOOK reference from 'Cite.bib,' I do not get the error. I am looking for a way to cite authors of online articles as well as the website they were published on. Any help with this will be really helpful.   Also, if it is not important or not regularly practiced to include the name of the website separately in the citation then I could just omit the editor portion of my @MISC entries. I have tried omitting the editor field but I still get the same error message.


In Dune, Are the Guild Navigators non-humanoid?

I finished the first book recently, and am watching the movie. It threw me that the navigators look like they do in the movie.  I don't remember them being non-humanoid, and if they were I missed it.  So, in the novels, are they? And if so, where is it first mentioned? Please avoid spoilers.


Apache server config redirect from IP to domain name EC2

I am running an apache webserver on a linux EC2 instance.  The problem is that you can access the server using the IP address, DNS and the domain name. This causes a problem for SEO and I want to tidy it up.  I have read on the apache documentation that you can do a mod_rewrite and this needs to be done in the httpd.conf if you have root access otherwise in the .htaccess for per directory override.  I have root access so I am trying to change the  httpd.conf  If the user types in   or   I want them to be redirected to  www.example.com  This is what I tried  <VirtualHost *:80>  DocumentRoot "/var/www/html/my-website"  # Other directives here  RewriteEngine On  RewriteCond %{HTTP_HOST} !^52.17.12.123.com$  RewriteRule /* http://www.example.com/ [R] </VirtualHost>   It seems to partially work but www.example.com does not load due to to many redirects.


Should we retag questions with topics proposed in the answers?

Considering the following two questions, as examples:       The OPs ask for possible techniques to match similar strings in SQL. In both cases, the majority of the answers seem to suggest  or  functions to tackle this problem.  My question is, should we tag these two questions with the [levenshtein-distance] and [soundex] tags, even though the OPs were probably not aware of these two methods?  I think there are some obvious advantages in doing that, because it makes it very easy for someone who is aware of the methods to search for the [mysql]+[levenshtein-distance] tags, for example. It also makes it much easier to find duplicates when similar questions are asked.  However, there are a few reasons why I am not sure about this:   It may imply that the OP was already aware of these solutions, and this may alter the context of the question. For example,  may look out of point, even though that answer was probably very helpful to the OP. It could also make the context of the question appear to be focused on the newly tagged categories, while in reality, the OP would have been open to any possible solution. This could deter someone from suggesting an alternative, possibly better, solution. What if there were 5+ suggested solutions to tackle the "similar strings" problem, apart from Levenshtein and Soundex? Where do you stop adding tags?     UPDATE:  A more subtle example of this "retagging behaviour" happens in the  tag on Stack Overflow. There are currently 95 questions with this tag, and I think the vast majority of them were not tagged like this by the OPs. In fact, many questions have answers that say something like "What you're doing is called Polymorphic Associations" (). This looks like a valid categorization method and has its benefits, but does it alter the context of the question, since the OPs knew nothing about polymorphic associations before asking the question?     BOUNTY:  Started a bounty to attract any other possible opinions. Should we accept  or  stance on this issue? Or can you think of some balanced compromise between the two views?


How to show default image if image not found in HTML 5

I want to show default image describing that image not found  when one of the images in page is not found .  How to do it ?


What made scientists believe that we should calculate probability $P$ as the $P = \left|\psi\right|^2$ in quantum mechanics? Was it the double slit experiment? How? Is there anywhere in the statistical mathematics a similar equation where we calculate probability like $P=\left|x\right|^2$ where $x$ is whatever?


[True/False] If $S$ is a quotient ring of $R$, then either $char(S)$   divides $char(R)$, or $char(S)=0$   $char(R)$ is notation to denote characteristic of a ring $R$  Efforts,  Let $f : R \to R'$ be a ring homomorphism where $\mathrm{char}(R) > 0$.We can  show that   $$0 < \mathrm{char}(f(R)) \leq \mathrm{char}(R).$$ and it follows from Euclidean Algorithm that $char(f(R))$ divided $char(R)$  Solution:   So the statetement should be True. Right? The book says answer is False. Am I missing something here?  Thanks.


What is the most time effiencent way to gain golden basic cards

I like gaining the golden cards that you earn from leveling up you heroes. I find that the closer I get to obtaining the next gold card, the more I want to just get that card rather than just playing against other players.  My understanding is that you earn by playing cards, destroying enemy minions, and winning games. You get less by playing in solo content, but you can more easily win the game and you can also play specifically to win fast or play all of your cards.  What I have been doing lately is play against Razorgore in Normal mode. I will play through my entire hand. He spawns new minions each turn so I have plenty to destroy and its pretty easy so I win unless I do something stupid or get a terrible opening hand.  Does anyone have any other ideas that they use to level up their heroes?  The "duplicate" question does indeed ask the same basic thing, however that was asked over 1 year ago. Hearthstone has added 2 adventure modes that were not taken into consideration at the time of that question. It is possible that it's answer is still correct, but no one has shown that to be true just used anecdotal evidence.


Can't compile any c/ c++ program, linker problem

It's my second post here, i have a huge problem which prevents me to study so i have to fix it as soon as it's possible ! My gcc was working fine and i had to work on FairThreads (in C). I downloaded the following archive :  As you can see, in /src there's a makeFile, i replaced the second line which was : LIB_DIR     = ../lib  by LIB_DIR     =  /usr/bin/ld and i compiled the makeFile by the command "make" And now, i cannot compile any c/c++ program anymore. Even a hello world program. I got the following error message on the terminal for every compiling attempt : /usr/bin/ld: 2: /usr/bin/ld: Syntax error: newline unexpected collect2: error: ld returned 2 exit status  I have found on the net this solution but it doesn't work for me : sudo apt-get autoremove binutils     sudo apt-get install binutils  I also tried to reinstall gcc, when executing : sudo apt-get purge gcc   i got : Des erreurs ont été rencontrées pendant l'exécution :   linux-firmware   linux-image-generic-hwe-18.04   linux-generic-hwe-18.04 E: Sub-process /usr/bin/dpkg returned an error code (1)  but when i trie a gcc --version it tells me that it is not found. So when i execute the command to reintall it : sudo apt-get install gcc   i also get : Des erreurs ont été rencontrées pendant l'exécution :  linux-firmware  linux-image-generic-hwe-18.04  linux-generic-hwe-18.04  linux-image-5.4.0-72-generic  initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1)  but gcc --version tellls that it's installed. Finally, when i trie to compile a program, i got : /usr/bin/ld: 2: /usr/bin/ld: Syntax error: newline unexpected collect2: error: ld returned 2 exit status  I hope that i explained well, and i'll get a solution for this :/, as a computer science student, i can't do anything without gcc :( EDIT 1 : When i try to remove bin/ld by executing : sudo rm -fr /usr/bin/ld;sudo apt-get install --reinstall binutils  i got : Des erreurs ont été rencontrées pendant l'exécution :  linux-firmware  linux-image-generic-hwe-18.04  linux-generic-hwe-18.04  linux-image-5.4.0-72-generic  initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1)  and this particular error message : WARNING: no ldd around - install libc-bin  EDIT : I have installed ldd by the command : sudo apt-get install libc-bin  still no changes...


How to add a custom field to the media screen (image/gallery)?

I’m trying to add a custom field to image and gallery edit screen.  I’m aware there are similar questions here, although answers either don’t work with the current version or they add field only to upload screen while I need a field to be visible in all edit screens (see below).  For this, I believe, you’ll have to mess with backbone.js as attachment_fields_to_edit only adds to upload screen.  Adding field with attachment_fields_to_edit    ↑ This is upload image screeen. Here Style is added with attachment_fields_to_edit filter, and my_field is added with ACF plugin.   But they are missing in edit screen in the post    ↑ Click edit on the actual post    ↑ No style & my_field fields!  The question  How to add fields to still have them on the edit screen? Ideally answer will include adding fields to gallery edit screen if it’s a similar process  This question is really important for me so I’ll be adding a 100 rep bounty when it’s available.   Thanks!


Is it appropriate for parents to cry in front of their children?

Sometimes a parent may be feeling sad (for whatever reason) and needs to cry.   Is it harmful, or could it even be good, to cry sometimes in front of your children? What does research say?


$$\int_0^{n\pi} f(\cos^2 x )\, dx = n \int_0^\pi f(\cos^2 x )\, dx$$   I am studying the chapter on Riemann integral so wondering if this equality requires the concept of Riemann integration to prove or there are other methods?


I have all of the materials for a sawmill yet it is not on the crafting menu. I also got 22 silver bars and no armor is on the crafting menu for silver.   Can someone please help?


\documentclass{article} %\usepackage{amsmath} It does Not work ! \begin{document} \[ x\lt y \gt z \] \end{document}  What library do I have to use such that the document can render \lt and \gt as less than and greater than signs, respectively? Edit I am using MathJax library in my site under Asp.net Mvc 3. Web application is vulnerable to XSS and XSRF attacks so < and > should be avoided as the input from the users. My database will save LaTeX commands that can be rendered by both LaTeX compiler and MathJax. Therefore, I need \gt and \lt that already work in MathJax. Source:  Rendered:


Merge python dictionaries with common key

Assume I have the following dictionaries:  {name: "john", place: "nyc", owns: "gold", quantity: 30} {name: "john", place: "nyc", owns: "silver", quantity: 20} {name: "jane", place: "nyc", owns: "platinum", quantity: 5} {name: "john", place: "chicago", owns: "brass", quantity: 60} {name: "john", place: "chicago", owns: "silver", quantity: 40}   And I have hundreds of these small dictionaries. I have to merge them with a subset of common keys, in this example (name, place) and create a new dictionary. Ultimately, the output should look like the following:  {name: "john", place: "nyc", gold: 30, silver: 20} {name: "jane", place: "nyc", platinum: 5} {name: "john", place: "chicago", brass: 60, silver: 40}   Is there any efficient way to do this? All I can think of is brute-force, where I will keep track of every possible name-place combination, store in some list, traverse the entire thing again for each combination and merge the dictionaries into a new one. Thanks!


I am kind of new to the whole animation aspect and in fact still in high school.  I am trying to make a Minecraft character rig and I want to make some 3D hair. I did not know how to quite make it so I kind of when just did something pretty simple. It isn't the greatest in any means, but any how the point is every time I render it white lines show up between objects or joined objects. I don't know how to fix this and would like help (a picture is posted below of the problem).


Distance between incentre and orthocentre.

I want to prove that the distance between incentre and orthocentre is $$\sqrt{2r^2-4R^2\cos A\cos B\cos C} $$here $r$ is inradius and $R$ is circumradius. I considered $\triangle API$ ($P$ is orthocentre and $I$ is incentre). I could find  $AP=2R\cos A$, $AI=4R\sin\frac{B}{2}\sin\frac{C}{2} $ and $\angle PAI=\angle \frac{B-C}{2}$. So applying cosine rule I got $$PI^2=4R^2+16R^2\sin^2\frac{B}{2}\sin^2\frac{C}{2} -16R^2\cos A\sin\frac{B}{2}\sin\frac{C}{2}\Bigg(\cos\frac{B}{2}\cos\frac{C}{2}+\sin\frac{B}{2}\sin\frac{C}{2}\Bigg)$$ How to proceed form here ?


Find the smallest value of $c$ such that $(1-x)\ln(1-x)+(1+x)\ln(1+x)\leq c x^2$ holds for $0<x<1$.   I saw the curve and realized this is true for $c=2$. How can I prove it? What is the smallest $c$ that still makes the inequality valid?  I think we should use the Taylor expansions of the $\ln$s.


Damaged Anti-reflective Layer on MacBook Pro

My MacBook Pro's display has the anti-reflective coating damaged. What can I do about it?


Do Message Digests protect public cryptography from replay attacks?

I read about HMAC and want to be sure if it protects against replay attacks as well.


Are the conferences organized by WASET legit or some type of scam?

Searching through websites dedicated to collect upcoming scientific conferences, I have stumbled upon a lot of similar-sounding conferences around the world (e.g., see ), all organized through the "World Academy of Science, Engineering and Technology", . There is plenty of information about them on their respective websites, as the organizing committee, speakers already confirmed, etc. This high quantity of similarly-titled conferences smells fishy. Is this some sort of scam, be it hard (they steal your money) or soft (lectures are actually given, without any real effort to look for relevant speakers, do peer-review, etc.)? Can anyone shed some light on this? Has someone here actually participated in, or even organized one of those?


Windows cut off at the bottom of screen in overview

When I enter the window overview by pressing the super key, I keep having windows on the bottom row of the overview cut off at the bottom edge of the screen, like the overview is reaching past the screen. It's only the windows that do this, the dock and the desktop list do not. I've tried this on multiple screens, and also tried it while having a single-monitor setup or multi-monitor set up, and the problem is consistent.


How to display line numbers in Nano text editor

When using Nano text editor, how can I display line numbers so I can see the lines that I am getting error messages about.  I have a lengthy program and am getting an error message for line 95 and 125 for example.


How can I cut an arc into a square plane? The gif above shows what I want to do, but, in another software.


When does HashSet 'add' method calls equals?

I did this test in a HashSet comparision and equals is not being called   I would like to consider equals when farAway=false (A function to check two point distances)  Full compilable code, you could test it, and tells why equals is not being called in this example.  public class TestClass{      static class Posicion     {         private int x;         private int y;          @Override         public boolean equals(Object obj) {             if (obj == null) {                 return false;             }             if (getClass() != obj.getClass()) {                 return false;             }             final Posicion other = (Posicion) obj;             if ( farAway(this.x, other.x, this.y, other.y,5)){                    return false;             }              return true;         }          @Override         public int hashCode() {             int hash = 7; hash = 59 * hash + this.x; hash = 59 * hash + this.y;             return hash;         }           Posicion(int x0, int y0) {             x=x0;             y=y0;         }          private boolean farAway(int x, int x0, int y, int y0, int i) {             return false;         }     }      public static void main(String[] args) {         HashSet<Posicion> test=new HashSet<>();         System.out.println("result:"+test.add(new Posicion(1,1)));         System.out.println("result:"+test.add(new Posicion(1,2)));     } }   EDIT  -Is there a way to force HashSet add to call equals?


Does the definitive way to write the colon, when writing sets in the form \{x\in A : P(x) \} exist and if there is one, which is it?   (Two approaches exist. Either writing it as I just did (this is seemingly endorsed by the tex.SX community, as I have seen it being used multiple times in different questions) or writing it as  \{x\in A \colon P(x) \}. This is the way LaTeX-companion proceeds.)


Finding precision of Monte Carlo simulation estimate

Background  I am designing a Monte Carlo simulation that combines the outputs of series of models, and I want to be sure that the simulation will allow me to make reasonable claims about the probability of the simulated outcome and the precision of that probability estimate.  The simulation will find the probability that a jury drawn from a specified community will convict a certain defendant. These are the steps of the simulation:   Using existing data, generate a logistic probability model (M) by regressing “juror first ballot vote” on demographic predictors. Use Monte Carlo methods to simulate 1,000 versions of M (i.e., 1000 versions of the coefficients for the model parameters). Select one of the 1,000 versions of the model (Mi). Empanel 1,000 juries by randomly selecting 1,000 sets of 12 “jurors” from a “community” (C) of individuals with specified demographic characteristic distributions. Deterministically calculate the probability of a first ballot guilty vote for each juror using Mi. Render each "juror’s" probable vote into a determinate vote (based on whether it is greater or less than randomly selected value between 0-1). Determine each "jury’s" “final vote” by using a model (derived from empirical data) of the probability a jury will convict, conditional on the proportion of jurors voting for conviction on the first ballot. Store the proportion of guilty verdicts for the 1000 juries (PGi). Repeat steps 3-8 for each of the 1,000 simulated versions of M. Calculate the mean value of PG and report that as the point estimate of the probability of conviction in C. Identify the 2.5 & 97.5 percentile values for PG and report that as 0.95 confidence interval.   I am currently using 1,000 jurors and 1,000 juries on the theory that 1,000 random draws from a probability distribution—demographic characteristics of C or versions of M—will fill out that distribution.   Questions  Will this allow me to accurately determine the precision of my estimate? If so, how many juries do I need to empanel for each PGi calculation to cover C's probability distribution (so I avoid selection bias); may I use fewer than 1,000?  Thank you so much for any help!


Note: as a neophyte user, I'm not allowed multiple links or images. It has been suggested that I edit my original content in order to add updates. Also it's been suggested to edit the hyperlinks so they're not quite right. Hopefully you can sort out what's going on.  I've been following this post by Kristin Brinner "Drupal Tutorial: Use Views to Create an Alphabetical List of Taxonomy Terms" (at h ttp://getlevelten.com/blog/kristin-brinner/drupal-tutorial-use-views-create-alphabetical-list-taxonomy-terms) but my sample does not produce the results illustrated and by now I'm very confused.  Part 1: said to create new view showing taxonomy terms, display in grid format and create menu link. Done.  Part 2: grouped terms alphabetically (add Taxonomy term: Name, label it "Grouping", exclude from display, rewrite to max length = 1 and uncheck 'trim on word boundary' and 'add ellipsis'). Under Grid-Settings use "Grouping" apply to all displays. My view looks like the sample. Done.  Part 3, Create a Views page for each letter of the alphabet: said to add a Contextual Filter: Taxonomy term: Name. When the filter value is NOT in the url, display all results for specified field. Under More, click Glossary mode, character limit = 1. Note that I now have a Taxonomy term: Name in the Contextual Filter section. I don't know how to test these results.  Part 4, Create A-Z list (create a block that will display the list of first letters in a cute list above the grouping grids) says to add a new Contextual Filter for this block (override). When the filter value is not available, 'display a summary', sort by alphabetical, unformatted, display record count and display items inline. This isn't working as predicted, here is what the tutorial says should be the result: Image 1 in the diagram (h ttp://imgur.com/l9TbLyv). My content continues to look the same as it did previously in the exercise, i.e. like this: Image 2 in the diagram. However when I put "S" into the Preview with contextual filters, I get: Image 3 in the diagram. I was asked for screenshots, so without contextual filters is h ttp://imgur.com/zXCnsvA and with "s" in contextual filters is h ttp://imgur.com/7DF6UUD .  When I created the new contextual filter in Part 4, I got a copy of what was in the Page, so I have two contextual filters, both with Taxonomy term: Name. If I delete the first contextual filter from the block, then my preview shows the same information as Image 1 in the diagram. I think I'm missing something &/or the blog post is unclear. Should I have started "this block override" with 0 contextual filters? I.e. Should I have started by deleting elements from the page which were copied into the block?  Part 5 instructs to "Add the alphabetical list on our page with the grouped terms and Go back to our Page display".  I've got the view working correctly now. The thing which stumped me was that adding a block created an entire copy of the original page which (philosophically) I don't understand. When there's a page and a block override which give instructions about the view, how does drupal know which instructions to pay attention to?  Thanks to all the folks who have helped.


What is the minimum value of $(1 + a_1)(1 + a_2). . .(1 + a_n)$?

Suppose $a_1, a_2,\dots , a_n$ are $n$ positive real numbers with $a_1a_2 \dots a_n = 1$.   Then what is the minimum value of $(1 + a_1)(1 + a_2). . .(1 + a_n)$ ?    I think $(1 + a_1)(1 + a_2). . .(1 + a_n)$ takes its minimum value when $a_1=a_2=\dots=a_n=1$ and thus the minimum value is $2^n$.  I don't know how to prove it. Please help.


jquery selector not working in the elements i creating dynamically on some events

i am just practising in some king of exercise and stuck in a point i dont understand.in my code i got a button and when the user press it ,it creates 25 cells and place random numbers on them.After i tried to do some kind of things when the user clicks in each cell.Well it didnt work.the $("td") selector doesnt trigger at all.any help?  $("button").click(function(){     $("body").append("

")     for (i=0; i<5; i++){         $("#t1").append("

");     }     for (i=0; i<5; i++){         $("#t1 tr").append("	");     }     for (i=0; i<25; i++){         var z = Math.round((Math.random()*89)+10);         $("#t1 tr td").eq(i).text(z);     } });  $("td").click(function(){     //code goes here });


Civil Union Partner with Family Permit approved travelling with EEA member - Customs Queue

My Family Member permit was approved - Civil Union Partnership with separate Surnames.  Can I join my partner at the EU Customs queue when entering the UK?


If I connect settlement A to settlement B, and B to C, are the items in A available to C?


Prime factorization of $\frac{3^{41} -1}{2}$

How can  I determine all prime factor of  $\frac{3^{41} -1}{2}$ without doing prime factorizations.  Any help will be appreciated.


How does   apt install chromium   install chromium. All I understand about apt is that it downloads the .deb files and then runs dpkg. Is there anything else apt does?


Did the Old Republic have better worker safety standards than the Empire?

I'm obsessed with the liability Imperial installations seem to carry in terms of worker accidents.  (For instance, they build installations where you have insane drops, with no railings at all.  We saw this recently I think on Starkiller Base in The Force Awakens.)   is especially concerning.  I recall a droid skimming on the actual lava on some sort of vehicle that offered scant protection.  I know droids aren't considered people, but I got the strong sense biological organisms are working with the same lack of safety measures. (I understand that the natives of Mustafar have thick, heat resistant skins, but that's not going to help all that much if you fall 1000 feet into a river of lava!)  It seems pretty clear that the Empire (and probably the Tech Union, which had possession of Mustafar previously) aren't concerned with working conditions, but:  Was the Old Republic any better than the Empire in terms of worker safety standards?


Ramsey Number Inequality: $R(\underbrace{3,3,...,3,3}_{k+1}) \le (k+1)(R(\underbrace{3,3,...3}_k)-1)+2$

I want to prove that:  $$R(\underbrace{3,3,...,3,3}_{k+1}) \le (k+1)(R(\underbrace{3,3,...3}_k)-1)+2$$  where R is a Ramsey number. In the LHS, there are $k+1$ $3$'s, and in the RHS, there are $k$ $3's$. I really have no clue how to start this proof. Any help is appreciated!


What is the width of the standard paragraph indent in LaTeX's article class?

If no changes has been made to the settings of indentation of an article class LaTeX document, what is the width of the paragraph indent?  texdoc article in the terminal opens the Standard Document Classes for LaTeX version 2e manual. In section 6.2 Paragraphing I find the following line:  ⟨10pt⟩ \setlength\parindent{15\p@}   The  means 1pt ... so I guess this would mean that the standard indent is 15 pt at a 10 pt text size? Is this correct?


Why does a Lipschitz function $f:\mathbb{R}^d\to\mathbb{R}^d$ map measure zero sets to measure zero sets?   It is easy to prove this statement if the domain is bounded. Is there any way to extend the argument to unbounded domains? Can anyone give me some hint, or show me a simple proof sketch?


New to javascript. I'm trying to access a variable from within a function to trigger an ajax call. Any help greatly appreciated.  document.onkeydown = logKey; i = 0; function logKey(e) {     var keys = i += 1; }; console.log(keys);   Uncaught ReferenceError: keys is not defined  It was a scope issue as pointed out by @sanketd617. I used the following from @Arun P Jonny  $(document).ready(function () {     var idleTime = 0;     //Increment the idle time counter every minute.     var idleInterval = setInterval(timerIncrement, 60000);       //Zero the idle timer on keypress.     $(this).on('keypress', function (e) {         console.log('reset: ', e.type)         idleTime = 0;     });       function timerIncrement() {         idleTime = idleTime + 1;         if (idleTime > 1) {             console.log(idleTime)         }     } });


I have a CheckBox, and when it is not checked, I want some other stuff to be visible. When it is checked, I want to hide the other stuff. So far, I can do the exact opposite (visible when checked, hidden when unchecked). <StackPanel Orientation="Horizontal">      <TextBlock Text="Use random seed" TextWrapping="Wrap" FontWeight="Bold" />      <CheckBox Name="bias_checkBox" Margin="5 0 0 0" BorderThickness="0 0 0 1" IsChecked="true" /> </StackPanel>  <StackPanel>      <StackPanel.Resources>            <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>      </StackPanel.Resources>       <Label Visibility="{Binding ElementName=tmp_checkBox, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}" >Foo</Label> </StackPanel>  How can I do that?


For every element $g$ in a group $G$ of order $23$, there is $h\in G$ such that $g=h^2$.

For every element $g$ in a group $G$ of order $23$, prove that there is $h\in G$ such that $g=h^2$.  I am not sure how to prove this. I think that, since $G$ has prime order is isomorphic to a cyclic group and therefore abelian. I can use that property to prove that $g=h^2$ but i am not sure how. Any help will be appreciated.


Please let me know how to remove certain repositories in Ubuntu 11.04. I am getting the following errors while updating.  sudo apt-get update  Err http://ppa.launchpad.net natty/main Sources                                      404  Not Found Err http://ppa.launchpad.net natty/main i386 Packages                                404  Not Found ......  E: Some index files failed to download. They have been ignored, or old ones used instead.


Are there any inventions/applications in our world based on QFT?

Are there nowadays any actual devices or experimental applications which are based on the quantum field theory and if so, how are they related to QFT?  I could not find any similar question besides  one.


Why do return flight costs vary depending on the country of origin?

I had planned for my wife, daughters and I to take a holiday from our home in China to the UK for a few weeks in July. Usually, when people visit us in China from the UK, the cost is around £450 to £500 for a return flight. Looking online, I can see that such tickets are available. However, when I looked at the flights from China to the UK the costs for return tickets were in the £850 to £1,000 range.  This seems unfair. Buying the same ticket on the same airplane results in vastly different prices depending on your origin. What justification is there for airlines to charge double the price for return flights from China to the UK and back as for the return flights from UK to China and back?  As it stands this will end our vacation plans as the cost has gone from an expensive £2000 trip for the family to an astronomical £4000 trip, equal to my entire years salary.


Regex which captures a pattern plus everything after until a character is reached

I want a regular expression which catches every time +other appears as well as everything until the next comma.  With  (word),+(other)(word),(code),(word),(other)(code),(example) (code),+(other),+(other)(code)(word)(example),(example),+(example) +(code),(other)(code)(word),(code),(word)   I want to return  +(other)(word) +(other) +(other)(code)(word)(example)   My command that I would use looks something like egrep -o '\+\(other).*,. The only problem is that the comma in this regex isn't necessarily the next comma. Right now the command returns  +(other)(word),(code),(word),(other)(code), +(other),+(other)(code)(word)(example),(example),


Example of function $f:\Bbb R\to \Bbb R$ continuous at $x$ iff $x$ is trascendental

I've seen examples of functions that are continuous only at the irrationals, and discontinuous at the rationals, and I wanted to go a bit further, but I couldn't come up with a function like the one in the title.  Does anyone know such an $f$?


KERNELS path for USB device connected to HUB

I'm creating udev rules to map my USB devices (ttyUSB*) to the USB ports where they are connected. The usual way to do so is looking at the output of:  udevadm info --name=/dev/ttyUSB0 --attribute-walk   Here my output (I removed the ATTRS lines not meaningful):  looking at device '/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5.6/1-1.5.6:1.0/ttyUSB0/tty/ttyUSB0':     KERNEL=="ttyUSB0"     SUBSYSTEM=="tty"     DRIVER==""    looking at parent device '/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5.6/1-1.5.6:1.0/ttyUSB0':     KERNELS=="ttyUSB0"     SUBSYSTEMS=="usb-serial"     DRIVERS=="ftdi_sio"    looking at parent device '/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5.6/1-1.5.6:1.0':     KERNELS=="1-1.5.6:1.0"     SUBSYSTEMS=="usb"     DRIVERS=="ftdi_sio"     ATTRS{interface}=="USB-RS485 Cable"     ATTRS{supports_autosuspend}=="1"      looking at parent device '/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5.6':     KERNELS=="1-1.5.6"     SUBSYSTEMS=="usb"     DRIVERS=="usb"     ATTRS{idProduct}=="6001"     ATTRS{idVendor}=="0403"     ATTRS{manufacturer}=="FTDI"     ATTRS{product}=="USB-RS485 Cable"     ATTRS{serial}=="FTY48GF2"    looking at parent device '/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5':     KERNELS=="1-1.5"     SUBSYSTEMS=="usb"     DRIVERS=="usb"     ATTRS{product}=="USB 2.0 Hub [MTT]"    looking at parent device '/devices/platform/soc/3f980000.usb/usb1/1-1':     KERNELS=="1-1"     SUBSYSTEMS=="usb"     DRIVERS=="usb"    looking at parent device '/devices/platform/soc/3f980000.usb/usb1':     KERNELS=="usb1"     SUBSYSTEMS=="usb"     DRIVERS=="usb"     ATTRS{manufacturer}=="Linux 4.9.41-v7+ dwc_otg_hcd"     ATTRS{product}=="DWC OTG Controller"    looking at parent device '/devices/platform/soc/3f980000.usb':     KERNELS=="3f980000.usb"     SUBSYSTEMS=="platform"     DRIVERS=="dwc_otg"    looking at parent device '/devices/platform/soc':     KERNELS=="soc"     SUBSYSTEMS=="platform"     DRIVERS==""    looking at parent device '/devices/platform':     KERNELS=="platform"     SUBSYSTEMS==""     DRIVERS==""   Here the connection: Raspberry Pi -> USB HUB -> FTDI dongle. My rule is the following:  $ cat /etc/udev/rules.d/99-usb.rules  KERNEL=="1-1.5.6", SUBSYSTEM=="usb", SYMLINK+="rs485"   but:  # ls -l /dev/rs485  lrwxrwxrwx 1 root root 15 Oct  4 07:04 /dev/rs485 -> bus/usb/001/009   I was expecting the symlink should be created to /dev/ttyUSB0. Now, I understand my dongle is at that usb position from:  $ lsusb Bus 001 Device 006: ID 046d:c062 Logitech, Inc. M-UAS144 [LS1 Laser Mouse] Bus 001 Device 009: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC ...   but of course it IS NOT the serial port (i.e. I cannot echo to it). Trying to use 1-1.5.6:1.0 as KERNEL key doesn't work - no symlink created.  What value should I use?


Windows 8 displays linux ext4 partitions as RAW

I installed Linux Mint in 2 partitions: / and /home  Windows 8 is under UEFI boot mode.  How to hide those linux partitions in Explorer?    When I click on them:


As far as I know, DNA is the construction protocol of all organisms on Earth.  Does it change when influenced by time and environment (physical laws)?  As parents with schizophrenia are more likely to have children with schizophrenia and an individual with no genetic predisposition for schizophrenia can suffer from such a condition because of drug abuse or environmental influence, does this prove that human DNA is changing during our lifespan?


First of all, a screenshot storyboard:     I tried uploading a 5MB image just as an experiment. The pro API shouldn't mess this up, right? Why doesn't this work?


If $A$ and $B$ are two $4\times3$ matrices such that $A\mathbb{v}=B\mathbb{v}$ for all $\mathbb{v}\in\mathbb{R}^3$, then $A=B$?  If it's not true, can you give me an example of it?  Thank you.


RegEX does not matches until end of line

I'm trying to extract the String Hex-STRING until the end of line. But what it matches is Hex-STRING: 84 16 F9 B0 05 1F 70 4F 57 4C A8 1F 60 E3 27 A1 E0 CD C4 E9 84 C3 68 53 C4 E9 84 C9 7A BB C4 E9 84 AC.  Something is missing in this expression? I already tried to include $but it does not work.  RegEX: Hex-STRING:\s(.+)  Test String:   iso.3.6.1.4.1.25355.3.2.6.4.2.5.1.7.4.2.13.36 = Hex-STRING: 84 16 F9 B0 05 1F 70 4F 57 4C A8 1F 60 E3 27 A1 E0 CD C4 E9 84 C3 68 53 C4 E9 84 C9 7A BB C4 E9 84 AC  C3 68 53 27 CC 58 97 84 AC 74 F7 60 E3 27 CC 58 97 84 AC 74 F7 60 E3 27 CC 58 97 84 AC 74 F7 60 E3 27 CC 58 97  84 AC 74 F7 60 E3 27 C3 68 53 84 AC 74 F7 60 E3 27 CC  58 97   Python Code  Text File content:    iso.3.6.1.4.1.25355.3.2.6.3.2.1.11.1.2.4 = STRING: "785c720855c8" iso.3.6.1.4.1.25355.3.2.6.4.2.5.1.7.1.2.4.9 = Hex-STRING: 84 16 F9 AF CF 75 84 16 F9 AF E1 35 50 C7 BF F2 F8 4B 70 4F 57 3A C6 23 70 4F 57 3E C5 CD   Code:  w = open("text.txt","r")  for item in w:   for match in re.findall(r'Hex-STRING:\s*(.+)',item):    print match   Output:   84 16 F9 AF CF 75 84 16 F9 AF E1 35 50 C7 BF F2   Output Expected:   84 16 F9 AF CF 75 84 16 F9 AF E1 35 50 C7 BF F2 F8 4B 70 4F 57 3A C6 23 70 4F 57 3E C5 CD


Trying to add a column of Mysql timestamp through hook_update

I was trying to add the column of MYSQL Timestamp to the Database Table, the Query seems to be working correctly in mysql console.But when I execute the same in db_query() the following error is thrown.     Failed: PDOException: SQLSTATE[42000]: Syntax error or access   violation: 1067 Invalid default value for 'last_update_date': ALTER   TABLE stores ADD last_update_date TIMESTAMP NOT NULL DEFAULT   '0000-00-00 00:00:00';; Array ( ) in store_update_7100() (line 254 of   /var/www/slocamo_app/sites/all/modules/store/store.install).   Is the Query.  ALTER TABLE  `stores` ADD  `last_update_date` TIMESTAMP NOT NULL DEFAULT  '0000-00-00 00:00:00');


Search custom properties in objects on the scene (Python)

Is it possible to somehow search all objects on the scene which have a custom property enabled using prop_search?  I know how to do this with dynamic EnumProperty but it seems to be not an option as it has some bugs.


Proper communication from parent to child kernel in CUDA Dynamic Parallelism

I'm experimenting with CUDA Dynamic Parallelism and I have a problem in assuring proper work of parallel Kernel lunches. I've made simple test code:  __global__ void child(int id) {     if(id%10000 == 0)         printf("hello\n"); }  __global__ void parent(int nop) {     unsigned int indX = blockIdx.x*blockDim.x + threadIdx.x;     unsigned int indY = blockIdx.y*blockDim.y + threadIdx.y;     unsigned int ind = indX* ((int)sqrtf(nop) + 1) + indY;     if (ind < nop)     {         if (ind % 10000 == 0) {             child << <1, 1 >> > (ind);             printf("world!");         }     } }   Where nop is a value larger than 1 000 000. I want to pass variable created in parent Kernel to child one but every time I'm getting unspecified failures or BSOD during call. Slowly I'm running out of ideas how to do this properly.  I couldn't find any useful examples for such case.


So, in the next phrase:  «I miss you. That's the hardest thing I've got to deal with everyday»   According to that phrase, should it be every day or everyday?  Also, what's the difference between these two, could you please give me many examples?   Thank you! ❤


I need to get the max record for each version in Oralce SQL   Price  Total_Amount  Group   Version  10      100           1       20190401.00 11      111           1       20190501.00 --- Print this version  5       50            2       20190401.00 --- Print this version 6       60            3       20190401.00 7       70            3       20190501.00 8       80            3       20190601.00 9       90            3       20190701.00  --- Print this version     The above query was output from   select     sum(price),     sum(Total_amount),     group,     version,     row_number() over(Partition by group order by version) row_num,     dense_Rank over ( order by version) dense_Rank from Table_name  group by group,version    I tried using Partition on group and dense rank in the above query it gives me  max in each group but when i tried to query the result from above its not giving me the result i want   Desired output   Price  Total_Amount  Group   Version 11      111           1       20190501.00  5       50            2       20190401.00 9       90            3       20190701.00


SQL Prove memory pressure - high Buffer Cache Hit Ratio, but low Page Life Expectancy

Our production server (2012, VM + SAN) has 32 GB of RAM, the database size is ~80GB. The application uses TempDB heavily - disk is hit ~100 MBps both reads & writes.  Seeing tons of SQL compilations/sec .. 95% of all batch requests are compilations.  Ideally would like to increase the RAM to 64GB or 128GB, but need to 'prove' to team that it's required.  Buffer Cache Hit Ratio (BCHR) is 99.9%, but Page Life Expectancy (PLE) is only ~400. What's the explanation for this ? I though PLE & BCHR had a linear relationship (i.e. they increase or decrease together)  On other VMs with larger databases and lot more RAM, both BCHR & PLE are high.  Current wait stats and perf counters


There is a famous proof of the Sum of integers, supposedly put forward by Gauss.  $$S=\sum\limits_{i=1}^{n}i=1+2+3+\cdots+(n-2)+(n-1)+n$$  $$2S=(1+n)+(2+(n-2))+\cdots+(n+1)$$  $$S=\frac{n(1+n)}{2}$$  I was looking for a similar proof for when $S=\sum\limits_{i=1}^{n}i^2$  I've tried the same approach of adding the summation to itself in reverse, and I've found this:  $$2S=(1^2+n^2)+(2^2+n^2+1^2-2n)+(3^2+n^2+2^2-4n)+\cdots+(n^2+n^2+(n-1)^2-2(n-1)n$$  From which I noted I could extract the original sum;  $$2S-S=(1^2+n^2)+(2^2+n^2-2n)+(3^2+n^2-4n)+\cdots+(n^2+n^2-2(n-1)n-n^2$$  Then if I collect all the $n$ terms;  $$2S-S=n\cdot (n-1)^2 +(1^2)+(2^2-2n)+(3^2-4n)+\cdots+(n^2-2(n-1)n$$  But then I realised I still had the original sum in there, and taking that out mean I no longer had a sum term to extract.  Have I made a mistake here? How can I arrive at the answer of  $\dfrac{n (n + 1) (2 n + 1)}{6}$ using a method similar to the one I expound on above? I.e following Gauss' line of reasoning?


analogue to Windows combination ctrl+alt+del

Combination Ctrl+Alt+Del in Windows calls Task manager. You can see running processes and kill any task. Is there anything like this in Ubuntu? Thanks in advance


I have a laptop with an Atheros card and I woud like to use it as a wireless access point.   I need an AP with WPA/WPA2 encryption for testing purposes; I don't need any routing functionality or anything else (it's fine if it has that, but it's not a requirement).   A live CD would be good, I just want something that's easy to setup -- like I mentioned, it's not for real use. I tried it on Ubuntu but I guess by default Ubuntu is missing the special drivers required to act as an access point.


Are community ads still a thing? , and I can’t remember when I last saw a community ad banner (this might be due to ad blocking, although I’ve in principle disabled it on Stack Exchange sites).  I’m asking since the  is interested in .


unable to find my hard drives in ubuntu 14.04 in device

I installed Ubuntu 14.04 LTS in my old pc by erasing Windows 7. When I opened my files in Ubuntu, I didn't find my hard drives under Device. The only one option available was Computer.  Is there anyway that I could get my data and hard drives back?


Multiple-choice question about the probability of a random answer to itself being correct

I found this math "problem" on the internet, and I'm wondering if it has an answer:     Question: If you choose an answer to this question at random, what is the probability that you will be correct?      a. $25\%$      b. $50\%$      c. $0\%$      d. $25\%$   Does this question have a correct answer?


Clean Install Of Ubuntu Server over the network?

I have an install of Ubuntu server, I was recently fooling around with it, and as all learning processes do, I messed a few things up.   I would this box to be secure and reliable in the future, So I have decided to do a clean install of the system. Is there a way I can do it over the network (PCs and a router) without having to connect a monitor, and burning the cd?  Basically a network install after I completely remove the previous copy of Ubuntu 10.04?  Thoughts? Please and thank you.


I believe this was a childrens book. I would have read it about 10 years ago.  The main character was a girl who could change her appearance when concentrating on herself in the mirror. This is later explained as her shifting around in more than three dimensions. She at some point tries to point at something she sees in a higher dimension, and another character says her arm turns red and disappears. She at one point finds a hypersphere that she can "fold" into higher or lower dimensions that she carries around with her which helps her use her powers.   She is part of a group of four children with different such power that start out trapped in a house and unaware of their powers and origins. They work differently, one boy turns into a metallic dragon-like creature and is then semi-killed/reborn via magic bacteria/nanomachines.


To display a Text Field on selection of a particular pick list value

My requirement is suppose a pick list field is there like "Bill Shipment to", and it's values are 'SHIPPER', 'RECIPIENT' & 'THIRD PARTY', then if i select third party then a text field will be auto populate beside this picklist field to fill the "Account no of Third Party". How to achieve this? Please help me..


I'm quite having problems with the twisting of the shoulders I don't know if its the weight, or something about the IK. This is my character.


I feel like this should be really easy to do, but I can't find anything about it on the web. Is there a way, through either javascript or a java web servlet, to skip the subsequent authentication?  We are trying to use the REST Api in production, but the problem is, that each time you refresh the page in javascript, or delete the cookies in java, you have to login again to salesforce.  Is there some way to do an ajax call or the login in the background or whatever, so that you can have your application connecting to salesforce right away?


How can I efficiently model the sum of Bernoulli random variables?

I am modeling a random variable ($Y$) which is the sum of some ~15-40k independent Bernoulli random variables ($X_i$), each with a different success probability ($p_i$). Formally, $Y=\sum X_i$ where $\Pr(X_i=1)=p_i$ and $\Pr(X_i=0)=1-p_i$.  I am interested in quickly answering queries such as $\Pr(Y<=k)$ (where $k$ is given).  Currently, I use random simulations to answer such queries. I randomly draw each $X_i$ according to its $p_i$, then sum all $X_i$ values to get $Y'$. I repeat this process a few thousand times and return the fraction of times $\Pr(Y'\leq k)$.  Obviously, this is not totally accurate (although accuracy greatly increases as the number of simulations increases). Also, it seems I have enough data about the distribution to avoid the use simulations. Can you think of a reasonable way to get the exact probability $\Pr(Y\leq k)$?  p.s.  I use Perl & R.  EDIT  Following the responses I thought some clarifications might be needed. I will shortly describe the setting of my problem. Given is a circular genome with  circumference c and a set of n ranges mapped to it. For example, c=3*10^9 and ranges={[100,200],[50,1000],[3*10^9-1,1000],...}. Note all ranges are closed (both ends are inclusive). Also note that we only deal with integers (whole units).  I am looking for regions on the circle that are undercovered by the given n mapped ranges. So to test whether a given a range of length x on the circle is undercovered, I test the hypothesis that the n ranges are mapped randomly. The probability a mapped range of length q>x will fully cover the given range of length x is (q-x)/c. This probability becomes quite small when c is large and/or q is small. What I'm interested is the number of ranges (out of n) which cover x. This is how Y is formed.   I test my null hypothesis vs. one sided alternative (undercoverage). Also note I am testing multiple hypothesis (different x lengths), and sure to correct for this.


Is this possible to avoid ngon in this case?

I have this curved surface:  With subdiv modifier it looks exactly as I want:   So is this the only way to get such a geometry? If I add a connection between vertices, it changes the shape of subdivided mesh.


I have recently purchased the new Dell Inspirion 3000 that comes pre-installed with Ubuntu. It came with Ubuntu 14.04 and some Dell bloatware, so I decided to do a clean install with Ubuntu 15.04. Unfortunately, now the touchpad doesn't work and I'm forced to use a USB mouse. Where could I possibly obtain a driver for the touchpad?  Here is the output from the xinput command:  ⎡ Virtual core pointer                      id=2    [master pointer  (3)] ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)] ⎜   ↳ Logitech USB Optical Mouse                id=10   [slave  pointer  (2)] ⎜   ↳ DLL06AB:00 06CB:78F1                      id=12   [slave  pointer  (2)] ⎜   ↳ SynPS/2 Synaptics TouchPad                id=14   [slave  pointer  (2)] ⎣ Virtual core keyboard                     id=3    [master keyboard (2)]     ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]     ↳ Power Button                              id=6    [slave  keyboard (3)]     ↳ Video Bus                                 id=7    [slave  keyboard (3)]     ↳ Power Button                              id=8    [slave  keyboard (3)]     ↳ Sleep Button                              id=9    [slave  keyboard (3)]     ↳ Integrated_Webcam_HD                      id=11   [slave  keyboard (3)]     ↳ AT Translated Set 2 keyboard              id=13   [slave  keyboard (3)]     ↳ Dell WMI hotkeys                          id=15   [slave  keyboard (3)]


I'd like to use Python 3.3.3 to test for the existence of a backup file.  Something like this:  if backup does not exist:     create it     write to backup  otherwise:     run other procedures not related to backup file   Any suggestions?


Income reported on W2 was not received AND the company no longer exists

Our situation is the same as in :   Spouse was employed by the company till Jan 31 '17, but was on unpaid leave for the entire month so no salary. We now receive a W2 for 1 month's wages but there was no check/direct deposit corresponding to that amount (or any amount) for that month.   The additional twist here is that the company no longer exists — they closed operations sometime fall '17. We do not have a person to contact at the company, since all employees were laid off. Further more, we're not sure if this money somehow represents legitimate backpay/corrections/bonuses for 2016 that were paid out in 2017 and it was just a human error that the check went missing or wasn't sent out.   How should we go about correcting this? We could take it straight to the IRS, but unclear if we can have ambiguity in not knowing whether it was actually $0 in wages or a case of missing check.


Concise form of "remove from the list" and "add to the list" in the same sentence

I a technical correspondence, I wanted to express the fact that there are two outcomes of "onclick" event:     Also, "onclick" event removes the group in question from the list "excluded_groups" or adds it to the list.   However, the above sentence looks too long to me. Is the following sentence grammatically and stylistically correct: (note that there is no "from" after "remove", or anywhere else in the sentence)     Also, "onclick" event removes or adds the group in question to the list "excluded_groups".


Prove that there are no integer solutions to the equation below

This is the equation for which I've to show that there are no integer solutions: $5x^2-2y^2=4$ Any approach works! I’m just confused because I see some people approach by showing hyperbolas and some approach with a more modular approach.


Should marker TA discuss marks with students?

As a marker, there are always some students who will email requesting to meet  as they disagree with the marking. According to the professor, the marker should solve students' marking issues but I am uncomfortable with those students who insist that marks should be given in their way. Some of them are disrespectful. If I refuse to meet them, they will complain to the professor about me not engaging with students and the professor will criticize me. Should I engage with these students?


Suppose $G=H\cup K$, where $H$ and $K$ are subgroups. Show that either $H=G$ or $K=G$.  What I did: For finite $G$, if $H\neq G$ and $K\neq G$, then $|H|,|K|\le |G|/2$. But they clearly share the identity element, so $H\cup K\neq G$.  How can I extend it to $G$ infinite?


I've got an InDesign document with multiple A4 pages, with a 12.7 mm margin on all sides. I've got a bunch of images I want to drop onto each page.  To save me dropping in each image and manually resizing it to fit between the width or height of the margins is there a "fit to margins" option in InDesign.   I've made a video to better articulate my question here :


Prove that every continuous image of a separable space is separable.   Let $(X, \mathcal T)$ be a separable space. Then there exists some countable subset $A \subseteq X$ such that $\overline{A}=X$. Let $f:X\to Y$ be a continuous mapping. Notice that $f:X \to f(X)\subseteq Y$ is clearly surjective.  Since $A\subseteq X$, and functions preserve set inclusion, we have that $$f(A) \subseteq f(X)= f(\overline{A}).$$ Also, it is clear that $f(A)$ is itself also countable.  What (I think) I need to show, however, is that $\overline{f(A)}=f(\overline{A})$ (which I am not sure if it's true). This will thus show that $f(A)$ is a countable, dense subset of $f(X).$  Is this the correct approach, or do I have a mistake in my method?  Can anyone please help show me how I can go about finishing this proof?


How to reference a paragraph with § symbol and without a dot?

I'd like to add a clickable reference to \paragraph, but instead of having just a clickable number with a dot after it, I'd like to add a \S sign to the link too (NOT the name of the paragraph!) and remove the dot.  For example,  \paragraph{Name}\label{p1} \ref{p1}   gives me a clickable number of the paragraph, say, "1." (with the dot after the number). How to change it to a clickable text "§ 1" (with sign \S and without a dot)?


Proving $f$ is a constant multiple of $\phi$

Let $U\subset\mathbb{C}$ be simply connected, and let $\phi:U\rightarrow\mathbb{D}$ be a conformal map with $\phi(z_0)=0$ and $\phi'(z_0)>0$. If $f:U\rightarrow\mathbb{D}$ is analytic with $f(z_0) = 0$ then $|f'(z_0)|\leq\phi'(z_0)$, with equality only when $f$ is a constant multiple of $\phi.$ Can we use Schwarz Lemma to prove the statement? Since we know $f$ is analytic, it remains for us to show other requirement to apply Schwarz Lemma, if using Schwarz Lemma was the right call. But I am having trouble translating statement to $f'$ and showing we have everything to apply the Lemma. Here is the Schwarz Lemma: Let $f(z)$ be analytic for $|z|<1$. Suppose $|f(z)|\leq 1$ for all $|z|<1$, and $f(0)=0$. Then $|f(z)|\leq|z|$ for $|z|>1$. Further, if equality holds at some point $z_0\neq 0$, then $f(z)=\lambda z$ for some constant $\lambda$ of unit modulus.


Is it bad to use const_cast to factor out getters?

Is there anything wrong with using const_cast in situations like this?  class List { public:     const List * head () const     {         // seek to the head of the list     }      List * head ()     {         return const_cast <List *> (((const List *)this) -> head ());     } };   It seems clear to me that, assuming there are no strange tricks in the const version of the function, it should always be safe to defer to it in the non-const version (but not vice-versa of course).  Are there any nasty surprises in the language that would ever make this a bad idea?


Unable to change privacy settings upon install of Ubuntu 18.04 LTS

I am new to Linux with Ubuntu 18.04 LTS as of this morning.  Anyone else experienced the inability to change privacy settings upon installation? I.e. I can tap the toggle switch to the "off" position for "automatically empty trash" but the toggle immediately bounces back to the "on" position. This is the same for all other privacy settings. I have Gnome Shell 3.28.2


How to unlock icloud account? at the same time Apple ID had been lock. Both is same ID

How to reset iCloud account? Apple ID and iCloud are the same ID. At the same time both had been block. I go to iforgot.apple.com to reset, reset link had send to iCloud.com, but then iCloud I can't get to reset password.


What tool do I need to install to make my terminal show the autocompletion of the command that I'm writing?

I use Ubuntu on a daily basis, recently I've seen that the terminal on Kali Linux behaves differently from the terminal on Ubuntu... I can see the end of the command that I'm typing based on the history of commands that I've typed like the following:  I know I can use autocompletion by pressing tab, but this feature is something else since I can see the command before pressing tab... That's not a Kali related question too since I just want to replicate this feature on Ubuntu 20.04. Is it a feature that I can easily install on Ubuntu by installing some tool with apt install? Or is it a configuration that I need to do?


How to update script (to put to sleep at given cpu temp) for 16.04

script worked in the past, then was updated for 14.04.  #!/bin/bash  while true; do    val=$(sensors | awk '/temp1/ {print $2}')    max="+75.0"    if [[ "$val" > "$max" ]]; then        dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend    fi    sleep 10    clear    sensors done exit 0   In 16.04 it gives an error:  Error org.freedesktop.DBus.Error.UnknownMethod: No such method 'Suspend'  Can it be updated so it would work in 16.04?


Branch of the n-th root of a holomorphic function is holomorphic

It is true that given a domain $D$ and a function $f$ that is holomorphic and not vanishing in $D$, then a branch $\varphi$ (with $\varphi$ continuous) of $f^{1/n}$ in $D$ is holomorphic in $D$ ().   My question is, does the statement remain true if we remove the non-vanishing condition? I haven't been able to find a counterexample or a proof on that more general case.


How can I copy a large file (11GB) file to a thumb drive

Can you please tell me how I can copy a large file (11GB) to a thumb drive (16GB)?  I am copying from Ubuntu and I get a message saying that the file is too large when it reaches 4GB.  I want a Windows machine to be able to read that file on the thumb drive after the copy.


How to derive the formula for coefficient (slope) of a simple linear regression line?

There is a formula for calculating slope (Regression coefficient), b1,  for the following regression line:   y= b0 + b1 xi + ei (alternatively y'(predicted)=b0 + b1 * x); which is   b1=(∑(xi-Ẋ) * (yi-Ῡ)) / (∑ ((xi- Ẋ) ^ 2))   ---- (formula-A)  source:  etc.   Now, how to derive that formula (formula-A here) and what are the logical or intuitive rationales behind the formula?  I searched the web but couldnot find anything helpful


I created a module to generate and display demo content; I would like to know if I can use Twig inside my pricing-table.html file and use a function to convert all data to HTML to use for #markup.  How does Drupal 8 convert Twig in HTML?    public function princingTablesPage() {     return array(       '#title' => 'Pricing Tables',       '#markup' => file_get_contents(__DIR__."/../../demo_pages/pricing-table.html")     );   }


Theme is inconsistent for window commands / title bar buttons

I prefer the color system of MacOS for title buttons (green yellow and red) and am looking to configure my Ubuntu 18.04 to that. I've installed a number of extensions that modified the appearance of the buttons:   Added Gnome-OSC-HS-(transparent) theme through GNOME OS X II GTK theme. Added ‘La Capitaine‘ icon pack   But I'm still seeing that Chrome and a number of other applications aren't using the same style.  Even more confusing, the other buttons themselves are different - in the screenshot the top buttons are Chrome and the one below is the System Monitor.  Any help would be greatly appreciated!


Can Ubuntu read music and data CDs Burnt on Windows

I'm seriously considering switching from Winows to Ubuntu as I seriously dislike Windows 8.1 and have an old eMachines EL-1600. I believe this old net top will run 32 bit Ubuntu just fine. (Intel Atom 230 1.6 GHz processor and 1 GB ram with Intel 945G Express Chipset) I believe Ubuntu 12.04LTS will run perfectly, but I'm hoping the latest LTS release will as well. However, that now brings me to my question.  I've burnt a whole pile of MP3 DVDss using Win XP, and I was wondering if I install Ubuntu can they still be read? I just want to copy the MP3s back from the DVDs back to the  main music folder in Ubuntu. I have no intention of installing WINE (viruses) and will beusing the pre-instlled and native Ubuntu apps such as Libre Office and Firefox which I'm already using in Windows. I also use a PPoE broadband connection so that won't be a problem either. Thank you.


How to REALLY, completely and totally delete a program and all its files

My virt-manager recently started refusing to open a VM that had worked perfectly before. I couldn’t find the reason or the solution to that, so I thought I would really, completely and totally uninstall virt-manager and then do a really, completely and totally new install. I used ALL the terminal commands I could find: autoremove, remove, --purge, autoclean, clean &c on virt-manager, qemu and kvm. I manually even deleted some relevant files I could find and razed the Trash folder to the ground.  I also had problems with Wine and went through the same steps with autoremove &c.  However…  When I “re-installed” virt-manager, qemu and kvm, I saw the VM I had previously created was automatically made available on the hypervisor. How come? This meant that somehow the config files or whatever had been kept somewhere, even though I thought I had deleted everything. That didn’t bode well. Indeed, when I tried to open the VM… sure enough, the same error message was there.  With Wine, it’s the same: when you think you’re autoremoving or purging or cleaning, you’re in fact just telling Ubuntu not to execute some files, but no actual deleting seems to occur. They just sort of retire to a private life of their own.  Short of re-formating a computer, is there a way to really, completely, totally delete a program and its related files and references from a computer, and then do a really, completely, totally new install as if the computer and the program had never been introduced to each other before?


I am a Turkish citizen. I have a 45-day Greek Schengen tourist visa. Can I extend my visa for 5 days in Spain?


Camera film effect to put in sequence the images

I wished to know if there is a specific package to put in a sequence of images like the old films of a camera or old movies. Just as an alternative for my book the effect of which could also be very nice. Correctly, with sincerity, this is a "do this for me" question. I have no idea if I must to create successive tables, or to do a drawing with TikZ/PStricks (using successive iterations), or with other tricks, but I'm curious how you would set up the solution. I put some images:


The tab is overlapping in the activity page.  Actually, I earned a new badge and when I go to grab it. I found this glitch. The activity tabs are overlapped on congratulation badge area.


How to make a Java thread wait for another thread's output?

I'm making a Java application with an application-logic-thread and a database-access-thread. Both of them persist for the entire lifetime of the application and both need to be running at the same time (one talks to the server, one talks to the user; when the app is fully started, I need both of them to work).  However, on startup, I need to make sure that initially the app thread waits until the db thread is ready (currently determined by polling a custom method dbthread.isReady()). I wouldn't mind if app thread blocks until the db thread was ready.  Thread.join() doesn't look like a solution - the db thread only exits at app shutdown.  while (!dbthread.isReady()) {} kind of works, but the empty loop consumes a lot of processor cycles.  Any other ideas? Thanks.


I am currently testing in Java whether the use of a custom class or int arrays as a datatype is faster and ran speed tests for that purpose (see below).  int repetitions = 1000000000;  for (int i = 0; i < repetitions*10; i++) {     Move move3 = new Move(2, 3);     int sum3 = move3.x + move3.y; }  // object block long start = System.nanoTime(); for (int i = 0; i < repetitions; i++) {     Move move2 = new Move(2, 3);     int sum2 = move2.x + move2.y; } System.out.println("Object took " + (System.nanoTime() - start) + "ns");  // array block long start2 = System.nanoTime(); for (int i = 0; i < repetitions; i++) {     int[] move = new int[]{2, 3};     int sum = move[0] + move[1]; } System.out.println("Array took " + (System.nanoTime() - start2) + "ns");   Swapping around the timing blocks basically decides what is faster. This was by a factor of 4 originally, but running the meaningless first block beforehand reduced it to a factor of about 1.1. Why is this? Is there a "warmup period" for the JVM? And how could I get completely rid of the issue?   (I know, I can get all performance-related information from the fact that swapping changes the advantage, but I am curious what is happening here.)


Left ideal $I$ is a direct summand of $R$ iff $I = Rr$, $r^2 = r$

I am stuck on proving a left ideal $I$ of a ring $R$ is a direct summand of $R$ if and only if $I = Rr$ with $r^2 = r$. Could you help me with that? Any help will be very appreciated. Thanks!


Is $\frac{nx}{n^{2}x^{2}+1}$ Cauchy in uniform norm (I guess it is not Cauchy but am not sure about my proof)?

The sequence $f_{n}(x)=\frac{nx}{n^{2}x^{2}+1}$, for $x\in[0,1]$, pointwise converges function $f(x)=0$.    Is $\left\{f_{n}(x)\right\}$ Cauchy with the norm $||\cdots||_{\infty}$?


For example,  made a link to a comment.   How to do it? There isn't any link in the comment (except for vote up, and flag a comment).


I'm trying to search  user by his name, Deepak Rai. But when I'm searching, I'm not getting his profile. This is what I'm getting:    The search should show that user as well with pink color Avatar.


Numbers are not displayed correctly in Feather Theme

I am using  template by overleaf. It doesn't display the numbers in a "correct format" () even by using $1$. It has an undesirable format (). I have tried to look into the theme and other files but unable to fix it. I appreciate any help you can provide. Thanks.


How to type a particular kind of unit vector?

I write unit vectors frequently. Right now, the best thing going for me is to define:  \newcommand{\uvec}[1]{\boldsymbol{\hat{\textbf{#1}}}}   and then do  \uvec{i}, \uvec{j}, and \uvec{k}. I like the results (they're clear enough), but I would prefer no dots for the i and j unit vectors. What's a nice, unified way to get that?  I tried \hat{\textbf{\i}}, and that works ok, as does \hat{\textbf{k}}. The problem is that \hat{\textbf{\j}} doesn't work for me. For some reason, I don't get a j, but some rectangular blob of ink.   \jmath and \imath don't work for me, because I don't want italics but bold-face.   So, to sum up:   Want bold, not italic Want a hat over the unit vector Want no dot for the i or j unit vectors.   How best to get all this? Thanks very much for your time!  Here's a minimum working example:  \documentclass{article} \usepackage{amsmath} \newcommand{\uvec}[1]{\boldsymbol{\hat{\textbf{#1}}}} \begin{document} $\uvec{i}, \uvec{j}, \uvec{k}$ \end{document}   Please feel free to suggest the inclusion of other packages.


I'm using a backup utility to backup my linux to an SMB share..having case sensitivity issues

I'm mounting an SMB share with an ext3 formatted drive from my home router.  Wanting to backup some information from my linux box to the share. Is SMB/CIFS shared. Having issues with the fact that TEST==test in the eyes of the SMB so it is failing the backup.  Wondering how I can make TEST!=test in the eyes of the share to oget things running  OK.   I have added   case sensitive = yes    to the globals section of my smb.conf file and  when I   touch test.txt   it creates the file but when I then   touch TEST.txt   nothing happens.....  Thanks -R


Which pronoun do I use to refer a gender-neutral subject?

I want to say that "Feeding from a human doesn't mean killing them" (yes, vampire stuff), but I feel like the them I'm using isn't correct.   But I don't want to use he/she because a human can be either, and I don't want to use it because it sounds weird. What is the best option here?