Disc Eddy current brake Torque calculation

I have built a rotational Eddy brake in a small car, where I use gears to make the metal disc in the brake rotate faster or slower at will.  I know that the braking torque is dependant on the rate of change of the magnetic flux linkage and therefore the faster the disc spins the stronger the brake force.  But I am unable to calculate the braking torque. I can't find a formula that joins the Rotational speed of the disc with the torque produced. I think I would first need a relation between rotational speed and magnitude of the eddy current produced. An then work with that to calculate magnetic drag. From which to obtain braking torque  I am currently lost. I think I have over researched and am unable to find something useful.


jquery clicking on list item is not working

I have this HTML and JS/jQuery code:   $(document).ready(function() { $("#livesearch").on("click",  ".searchres", function(event){     console.log('clicked');   }); });
   <?php foreach($data as $i){?>
<?php echo $i["name"];?>
     <?php } ?>
    This is part of a dropdown list that appears after an input form is being populated. I would like to press on one of the dropdown lists .searchres and just print to console as a test. This is, however, not printing on console. What am I doing wrong? Details At the start of my php file I have this code snippet that creates a 'livesearch' object which connects to my database. <?php   require_once('livesearch.php');   $livesearch = new livesearch();   $data = null;    ?>  I am declaring $data=null here because I do not want any database fields to show at loading time. could this be the issue that is making livesearch Id non-existant on load?


I am refreshing the primary tab after clicking on the update button.i am using the oncomplete function. on the command button oncomplete action is not working.  i have tried in the following way:   <apex:commandButton action="{!calculateMilestone}" title="Submit" value="Update"       reRender="id1" status="loadStatus"  rendered="{!controls}"       oncomplete="testRefreshPrimaryTabById()"/>


Trying to install Catlateral Damage using the usual extracting and installing commands on the terminal, but it keeps tossing me annoying errors. Probably missing something obvious. Both the archive and the file are on my desktop. Note: the file created by extracting the archive starts out named the same, but then switches to "Linux". I tried renaming it CatlateralDamage too.   rachael@rachael-desktop:~$ cd /home/rachael/desktop/catlateraldamage bash: cd: /home/rachael/desktop/catlateraldamage: No such file or directory rachael@rachael-desktop:~$ cd /home/rachael/desktop/catlateral damage bash: cd: /home/rachael/desktop/catlateral: No such file or directory rachael@rachael-desktop:~$ cd /home/rachael/desktop/catlateraldamage bash: cd: /home/rachael/desktop/catlateraldamage: No such file or directory rachael@rachael-desktop:~$ cd /home/rachael/desktop/catlateraldamage_v4.1a_linux.tar.gz bash: cd: /home/rachael/desktop/catlateraldamage_v4.1a_linux.tar.gz: No such file or directory rachael@rachael-desktop:~$ tar -xzf catlateraldamage_v4.1a_linux.tar.gz tar (child): catlateraldamage_v4.1a_linux.tar.gz: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now rachael@rachael-desktop:~$ sudo apt-get install catlateraldamage [sudo] password for rachael:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package catlateraldamage rachael@rachael-desktop:~$ cd /home/rachael/desktop/linux  bash: cd: /home/rachael/desktop/linux: No such file or directory rachael@rachael-desktop:~$ tar -zxvf CatlateralDamage_v4.1a_Linux.tar.gz tar (child): CatlateralDamage_v4.1a_Linux.tar.gz: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now rachael@rachael-desktop:~$


Setting labels closer to the coordinates that they represent

A pentagon is drawn from the following code.  I label the vertices A, B, C, D, and P.  The labels are too far from the points that they represent.  I used the label option for the coordinate command to place the labels about their points.  So, I thought that the labels would be placed directly over the coordinates, which wouldn't have been appropriate.  (I was told that having an angle specified, such as 180, provides some "padding" about the point.)  I would still have needed a command to move the label.  I now know they syntax for moving the label about the point is  [label distance=<distance>]<angle>:<name for the label> .  What is the default distance between a point and its label?  How much padding is added when an angle is specified.  I would like to either suppress this padding or use label distance=<distance> to compensate for it.  \documentclass{amsart} \usepackage{tikz} \usetikzlibrary{calc,angles,positioning,intersections}   \begin{document}   \begin{tikzpicture}  \coordinate[label={225:$A$}] (A) at (-0.5,-0.75); \coordinate[label={135:$B$}] (B) at (-0.5,0.5); \coordinate[label={45:$C$}] (C) at (1,0.5); \coordinate[label={-45:$D$}] (D) at (1,-0.75);  \draw (A) -- (B) -- (C) -- (D) -- (A) -- cycle;  \path (A) -- (C); \path (B) -- (D);  \path[name path=ray1] (C) -- ($(C)!1.5cm!90:(A)$); \path[name path=ray2] (D) -- ($(D)!1.5cm!-90:(B)$);   \coordinate[name intersections={of=ray1 and ray2,by={P}}]; \node[label={right:$P$}] at (P) {};   \draw (C) -- (P) -- (D);  %\draw[line width=0.1pt, draw=gray!25] (current bounding box.south west) grid (current bounding box.north east); \end{tikzpicture}  \end{document}


Is it possible to add images to comments?

I was wondering if it is possible to post a comment with an image.  Recently, during a question about data-visualization in Cross Validated, there was a controversy about using one type of chart for another.   I had posted a question about pie-charts, after reading some references I decided to build an example and clarify the point of using waffle-chart vs pie-chart. In a way, my example was not an answer it was more properly a comment on waffle-charts. But it seems to be impossible to post a comment with an image (Maybe, there is a way but I can't figure out how).  I don't know if it is relevant to post images in comments in other SO sites. So, if there is no way to post images in comments... why not making it possible? And if there is a way to post an image with a comment, how I can do it?


How to line up the pieces at the coast near the shipwreck?

In The Witness, I was walking along the coast, and I came upon this:    Now, since I've learned      that mazes can be embedded in the environment,   I see the puzzle here, but I just can't get the pieces to line up well enough.  Standing on the couch and walking all around it doesn't seem to get me a       functional maze.   Where do I need to stand to activate the puzzle successfully?


Of course I know the \star can make a filled star symbol. But how to input a empty star? It is like:


Why is it sometimes 'most' and sometimes '-est'?

There are various rules about whether an adjective takes '-er/-est' or 'more/most', but they're based on syllable count and don't give an etymological rationale.  Does anyone know? Is it based on whether the word was Saxon in origin?


Is there a way to disable this "often used with" prompt on an iPhone?

Sometime within last 6 months my iPhone started showing a prompt on the bottom for apps that I don't have running in the background. I use the task switcher to close apps after I am done with, say, ordering food or what-now. And for most apps, like Audible mentioned in the prompt in below image, the "background app refresh" is turned off. It looks as shown below.  Some additional details: My iPhone 7 is running iOS v14.6. I may have had my iPhone connected to an Apple Watch at the time this message popped up. My internet search so far had found  (to disable it in Settings -> iTunes & App Store -> turn off suggested apps for installed apps) but the instructions do not seem to be valid for v14.6. So with this background, would anyone know if there is a way to disable this "Often used with Bluetooth device connected" prompt?


ConcurrentModificationException while iterating through ArrayList

synchronized(queueClientList){     Iterator<Client> iterator = queueClientList.iterator();     while (iterator.hasNext()){         Client client = new Client();         client = iterator.next();         try {             Thread.sleep(client.serviceTime);         } catch (InterruptedException e) {             Thread.currentThread().interrupt();         }         System.out.println(client.ID+ " it`s out");         queueClientList.remove(client);     } }   This code should iterate through queueClientList and sleep the Thread for client.serviceTime milliseconds. After waking up, it should delete the current client from the queueClientList.   It gives me the ConcurrentModificationException at client = iterator.next() line  The declaration of queueClientList is:  public List<Client> queueClientList = Collections.synchronizedList(new ArrayList<Client>());   Why does it throw that error if this whole method is synchronized?


Where should I post a programming question without code or an algorithm?

I have a problem which I want to solve using programming. I have sample input/output data, but I don't have a good algorithm. As I don't have some code, where should I post about the problem?


How do we prove $\cos(\pi/5) - \cos(2\pi/5) = 0.5$ ?.

How do we prove $\cos(\pi/5) - \cos(2\pi/5) = 0.5$ without using a calculator.  Related question: how do we prove that $\cos(\pi/5)\cos(2\pi/5) = 0.25$, also without using a calculator


I setup my Windows 7 to automatically log into my account at home.  I have a password set so that I can access it remotely.  It seems like this was a feature in control panel somewhere, but now I can't find it to turn if off.  I know I used to use Tweak UI in older versions of windows to do this, and before that I could edit the registry . . . but it appears they changed it for Windows 7


Inequality between two sequences preserved in the limit?

Let $(a_n)_{n\in \mathbb{N}}$ and $(b_n)_{n\in \mathbb{N}}$ be two real sequences that satisfy $a_n\geq b_n, \forall n \in \mathbb{N}$ and converge to some $a,b$, respectively.  Is it always true that $a \geq b$?


I've tried doing a WP_Query based on a custom field, which name is 'date' and value is something like '14/01/2015'. I want the query to give results when 'date' is between today and tomorrow.  All I've tried so far is this:  $y=date('d/m/Y',strtotime('yesterday')); $t=date('d/m/Y',strtotime('tomorrow')); $o=date('d/m/Y',strtotime('today'));  echo "yesterday: ".$y; echo "today: ".$o; echo "tomorrow: ".$t; $d=new WP_Query(     array(         'category__in' => array(4),         'post_type' => 'post',         'posts_per_page' => '-1',         'orderby' => 'meta_value',         'order' => 'DESC',         'meta_query' => array(             'key' => 'data',             'value'     => array($y,$t),             'compare'   => 'BETWEEN',             'type'      => 'DATE',         )     ) );   But is giving me posts which 'date' is also 25/01/2015. What am I doing wrong? Thanks in advice


I use showkeys to manage my lablels. However, sometimes I would like to use long label names but it seems that showkeys does not like them! :) The problem is that the labels get out of the margin. I am aware of the two other similar questions          but their solution does not seem to work in my case. Here is a MWE where the solution of David Carlisle suggested in the first question is implemented in it but the result is not satisfactory.  \documentclass{article} \usepackage{amsmath} \usepackage{hyperref} \usepackage[notref]{showkeys} \renewcommand*\showkeyslabelformat[1]{%   \fbox{\parbox[t]{\marginparwidth}{\raggedright\normalfont\small\ttfamily#1}}}  \begin{document}  These are the constraint equations \begin{align*} \dot{x}  &=  \frac{R}{2}(\dot{\varphi_1}+\dot{\varphi_2})\sin\theta  \\ \dot{y}  &=  -\frac{R}{2}(\dot{\varphi_1}+\dot{\varphi_2})\cos\theta  \\ \theta-\theta_0   &=  \frac{R}{2L}(\varphi_1-\varphi_2) \tag{1}  \label{eq:constraint:final:integrated} \end{align*} \ref{eq:constraint:final:integrated} but the label seems to be out the paper!  \end{document}


What does "java.lang.NullPointerException: Attempt to invoke virtual method '...' on a null object reference" mean, and how do I solve it?

I'm getting the NullPointerException described in the title, but I don't understand how to use the information in the error message to debug it.  How do I know what's null, and what are common causes of that?  If you're seeing an error like java.lang.NullPointerException: Attempt to invoke virtual method '...' on a null object reference, this question aims to help solve your problem. This also applies to all the following similar errors:  java.lang.NullPointerException: Attempt to invoke interface method '...' on a null object reference java.lang.NullPointerException: Attempt to read from field '...' on a null object reference java.lang.NullPointerException: Attempt to read from null array java.lang.NullPointerException: Attempt to get length of null array    Note: this is intended as a canonical self-answered question to provide a single place to point the many users who have questions about NullPointerExceptions on Android that contains Android-specific advice.   For the non-Android Java version of this question, or for more information, see


When is matrix multiplication commutative?

I know that matrix multiplication in general is not commutative. So, in general:  $A, B \in \mathbb{R}^{n \times n}: A \cdot B \neq B \cdot A$  But for some matrices, this equations holds, e.g. A = Identity or A = Null-matrix $\forall B \in \mathbb{R}^{n \times n}$.  I think I remember that a group of special matrices (was it $O(n)$, the ?) exist, for which matrix multiplication is commutative.  For which matrices $A, B \in \mathbb{R}^{n \times n}$ is $A\cdot B = B \cdot A$?


iterator in for loop of list and matrix in Python

I hope to set up a matrix/list through for loop but I observed different results between 1D list and 2D list of the same method. I know this is a stupid way to create a list through for loop but could anyone give me a hint what caused the difference please?  m = [[0] * 4] * 4 print m m[0] = range(4) for i in range(4):     m[i][0] = i print m   And the result is:   [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]] [[0, 1, 2, 3], [3, 0, 0, 0], [3, 0, 0, 0], [3, 0, 0, 0]]   I was expecting to be [[0, 1, 2, 3], [1, 0, 0, 0], [2, 0, 0, 0], [3, 0, 0, 0]]. However it worked find in 1D list as below  tmp = [0,0,0,0] for i in range(4):     tmp[i] = i print tmp   It printed [0,1,2,3] as I expected.


var myFunction = function functionName()

I always used to write functions like this:  var myFunction = function(param) {     console.log(param); }; myFunction('myFunction');   Now I've seen this:  var otherFunction = function whyNameHere(param) {     console.log(param); }; otherFunction('otherFunction');   and I'm wondering what is whyNameHere? When and why should functions be written like this? Also I can call it exactly the same as the myFunction function above.. why should someone write whyNameHere? Also is there a naming for this kind of function?  If anyone wants to play with it,


7zip - Encrypting and compressing each file in a folder while maintaining directory structure

Say I have a directory structure like this:  - main folder   - folder 1      - file 1.txt   - folder 2   - folder 3      - file 2.txt      - file 3.png   - file 4.txt   - file 5.jpg   I'd like to create a batch script in Windows where I can drag/drop main folder onto it and it'll do the following:  - main folder_encrypted   - folder 1      - file 1.txt.7z   - folder 2   - folder 3      - file 2.txt.7z      - file 3.png.7z   - file 4.txt.7z   - file 5.jpg.7z   Basically, it'll maintain directory structure and individually compress and encrypt every file using 7zip and copy it to main folder_encrypted


How to Understand the Definition of Cardinal Exponentiation

I'm having trouble understanding the definition of cardinal exponentiation.  Let's start with the definitions / claims I've been given:  For any finite sets $A,B$, such that if $|A|=a$ and $|B|=b\neq 0$ then the number of functions from $A$ to $B$ is $b^a$. ( I'm guessing this is only used when both sets are finite ).  For any sets $A,B$, $B^A$ is the set of functions from $A$ to $B$.  For every set $A$, $|P(A)|=|\left \{ 0,1 \right \}^A|$  Now for the definition and why I don't understand it:  Let $a,b$ be cardinal numbers.  Let $A,B$ be sets such that $|A|=a, |B|=b$.  Then $|B^A|=b^a$.  How analagous to normal exponentiation is this and where does in differ when we introduce cardinals like $\aleph_0$ or $C$?  Is $2^2=4$ and is $\frak c^2=c\cdot c=c\times c$?


Could please give me a hint.  $$\lim_{n\rightarrow\infty}\frac{1}{n}\sum_{k=1}^{n}\frac{k}{k^{2}+1}$$  It looks like an integral, but I failed to figure out the function.


How to force main thread to close if a sub thread is alive in python?  sys.exit() and exit() appears to wait for sub thread to complete?


If you provide 0 as the dayValue in Date.setFullYear you get the last day of the previous month:  d = new Date(); d.setFullYear(2008, 11, 0); //  Sun Nov 30 2008   There is reference to this behaviour at . Is this a reliable cross-browser feature or should I look at alternative methods?


Do I need a firewall if the service doesn't listen on all interfaces?

Short version: I have a CentOS 6.5 with two NICs, one connected to the internet and one connected to the internal network.  The services that shouldn't be accessible to the internet don't listen on that interface.  Do I still need iptables?  Longer version:  I have a machine running CentOS 6.5. eth0 is connected to our internal network (actually a DMZ that is protected, but it is RFC1918 space). eth1 is connected to our external network (directly accessable from the internet).  For the purpose of discussion, let's pretend eth0 is 10.1.1.1 and eth1 is 198.252.206.140.  The machine is running 2 services: ssh and http.  We only want HTTP to be accessible from the internet, so we have iptables with rules that block traffic on eth1 if it isn't port 80.  We also permit ICMP.  However we just reconfigured SSH to only listen on 10.1.1.1 and 127.0.0.1.  SSH'ing to 198.252.206.140 gets a "connection refused".  What do we lose if we turn off iptables?  I assert we lose nothing by turning off iptables.  In fact, we gain a small performance win.  Yes, there are non-technical issues, for example if someone accidentally enables a new service and it is listening on all interfaces, we're vulnerable.  However this question is specifically about how the Linux kernel processes packets once they are received.


Why does C/C++ differentiates in case of array index out of bound #include <stdio.h> int main() {     int a[10];     a[3]=4;     a[11]=3;//does not give segmentation fault     a[25]=4;//does not give segmentation fault     a[20000]=3; //gives segmentation fault     return 0; }  I understand that it's trying to access memory allocated to process or thread in case of a[11] or a[25] and it's going out of stack bounds in case of a[20000]. Why doesn't compiler or linker give an error, aren't they aware of the array size? If not then how does sizeof(a) work correctly?


Use of object pronouns after the verb "to be" and in the presence of a conjunction.

The other day my friend and I were playing darts with several other players.  We selected teams.  When I learned that my partner would be Jordan, I enthusiastically announced,   "Hey Jordan, it's you and me!"  My friend objected that I should have said "Hey Jordan, it's you and I," for the same reason that one announces at the door of a friend who wonders who is outside, "It is I."    I find "It is I" rather pompous, but it seems correct.  "Hey Jordan, it's you and I," on the other hand, seems incorrect.  What is the rule here?


I'm having problems with the linker.  It gives me the following error:  [Linker error] undefined reference to `bool Polis :: deleteEdifice <Mine> (int) '   The prototype is declared as follows:  template <typename T> bool deleteEdifice(int);   deleteEdifice is empty, that does not do anything for now but it does not work.  The call to the prototype is:  obj->deleteEdifice<Mine>(3);   I also tried to do:  obj->template deleteEdifice<Mine>(3);   Print the following error:  `template' (as a disambiguator) is only allowed within templates   Could you tell me what am I doing wrong.


Repetition of the same word in a sentence

Pouring the water on the flower, Jenny admired the flowers just beginning to open. In the above sentence, the word "flower" is repeated once. Is  repetition of the same word in a single sentence ok or is it necessary to avoid repetition?


LinkedIn import requests excessive privileges

When importing a LinkedIn profile, I'm asked to approve access to   YOUR PROFILE OVERVIEW (fine) YOUR FULL PROFILE (makes sense) YOUR CONNECTIONS (hang on a minute...) INVITATIONS AND MESSAGES (whoa there!!)   I'm uneasy about allowing SE access to my list of connections, and access to messages is a definite 'no way'. My LinkedIn messages are private.   What exactly does the import feature do with the connections, invitations and messages data? If the answer is 'nothing', could it be modified so that access to this data is not requested at all?


Let $G$ be a group of order $p^2$ where $p$ is a prime. I want to show that either $G$ is cyclic or is the product of two cyclic groups of order $p$.  After some work, the problem reduces to showing the following:  Let $x,y \in G$ be two elements of order $p$ and $y \notin \langle x\rangle$.  Need to show that  1) $\langle x\rangle$ is normal  2) $\langle x\rangle \cap \langle y\rangle={e}$  3) $\langle x\rangle \langle y\rangle = G$  Anyone can give some hints? Thanks!


What does the notation like 8.6e-28 mean? What is the 'e' for?

I have a problem with the interpretation of a test result in which the p-value is 8.6e-28. How should it be interpreted? What is the e for?  Specifically, I used White's Test for the homoscedasticity assumption of a linear regression:  White's general test statistic :  150.0535  Chi-sq( 9)  P-value =  8.6e-28


Why do methods that return objects have an asterisk in the brackets?

Why do methods that return objects have the asterisk in the brackets?    Example: -(NSString *) method:val;


How to syllabify may be certain in many words. But some words have several ways, I think.  For example, "extra" can be divided into "ek" + "stra" and "eks" + "tra".  Does this mean that people remember a word in several different ways? Or do people usually have a fixed manner individually to utter a word which can be divided in several ways, with more easiness?


I would like to redirect domain1.com to domain2.com using DNS. I would further like to redirect www.domain1.com to www.domain2.com.  For domain1.com zone file, do I need to have an A record or are CNAME records sufficient, e.g.  *                               IN      CNAME           domain2.com. www.domain1.com                 IN      CNAME           www.domain2.com.   The goal is that when visitors visit domain1.com or www.domain1.com, they go to domain2


The += Operator Not Acting As I Expect On Class Variable

I have this code:  class Doh:     ctr = 0;     def __init__(self):         self.my_num = self.ctr         self.ctr += 1 d1 = Doh() d2 = Doh() print(f"d1: {d1.my_num}") print(f"d2: {d2.my_num}")   I run it expecting d1 and d2 to have different values for self.my_num but they both come out 0:  d1: 0 d2: 0   So clearly I don't get how class variables work with +=.  What am I doing wrong?


I noticed at some point that different merchants don't all pay the same for what you're selling. Depending on the category, or even the specific item, some merchants simply pay significantly more.  Are there some general rules on which merchants pay better for which items?


I am new to Blender and I have attached the photo of the render and the photo of the scene I'm working on. If anyone knows what I'm doing wrong please let me know, thank you!


If the columns of an $n \times n$ matrix are linearly independent, then the columns span $\mathbb{R}^{n}$

My textbook says that its true but I can't find a proof of this on the internet.  "If $A$ is an $n \times n$ matrix with linearly independent columns, then the columns of $A$ span $\mathbb{R}^{n}$."


Where or when is it unsafe to clean using compressed air?

There's this lesson on ICT for us in cleaning computers and their equipment. One of the components that can be used for cleaning is something called compressed air. Just to make sure, which computer equipment is/are unsafe to clean using compressed air or when is it unsafe to clean using it?


I have my own email server and I've recently noticed that many of the emails I sent ended up in the recipients' spam folder. I have verified the IP of my mail server and it's not in any blacklist. What could be causing this? Could it be that my IP doesn't have a long history? How can I fix this?


When do we say that s function is defined

Can we say that $\frac{\sin x}{x}$ is defined at $x=0$? When is a function defined within its domain?


What if I download a different IPSW for a different Device?

I've always been doing research on how to download a firmware for a different device. What i'm trying to say is: What will happen if I download a firmware that is not meant for my device? I downloaded the iPhone 4s iOS 6 IPSW to for my iPhone 6s. Will it not work? Will it brick the device? Will it still work anyway but will the display be stretched? No, i'm not trying to make a duplicate question, I just want to know is going to happen.


Why the significance of terms in orthogonal polynomial regression changes with the degree of the regression


I´ve made a contact form, but since I´m not English I use characters such as "á","ň","š" etc. But when I fill my form with those characters, I submit the form, and I recieve email, where all of these "unknown" characters are replaces with characters like "@-". The website is .html, not .php. I don´t store anything in the database.  I´ve put  <meta charset="UTF-8"> and also <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> in the . Also I modified <form> attribute to <form id="contact-form" action="send_me" enctype="multipart/form-data" accept-charset="utf-8"> And I added header('Content-type: text/html; charset=utf-8'); into my php file. But nothing helped.  This is a piece of HTML:  <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   ...  <form id="contact-form" action="send_me" enctype="multipart/form-data" accept-charset="utf-8">

             Name             <input id="name" class="text form-input" type="name" name="name"/>

         Message         <textarea id="message" class="text form-input" type="message" name="message">         </textarea>

         <input role="button" type="submit" name="submit">

 </form>    JS:  $(".form-input").focus(function() {     let parent = $(this).parent();     if (!parent.hasClass("active")) {         parent.addClass("active")         }  });  $(".form-input").blur(function() {     let self = $(this);     let parent = self.parent();     if (parent.hasClass("active") && self.val().length === 0) {         parent.removeClass("active")     }  });  $("#contact-form").submit(function(e) {     e.preventDefault();     const url = "sendMailB.php";     messageHolder = $(".contact-form__message");     messageHolder.removeClass();     messageHolder.text('');     const successMessage = 'Successfully sent!';     const errorMessage = 'Oops, try later';     $.ajax({         type: "POST",         url: url,         data: $("#contact-form").serialize(),         success: function(data) {             console.log(data);                         messageHolder.addClass("success");                                     messageHolder.text(successMessage);         },         error: function(error){         console.log('error');         messageHolder.addClass("error");         messageHolder.text(errorMessage);             }     });  });    PHP:  header('Content-type: text/html; charset=utf-8'); $to = "paula@soulmates.sk"; $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $message = $_POST['message']; $extra = "From email: $email\r\n Answer to email: $email\r\n";
 $subject = "Mail from ".$name.""; $odkaz = $message; $mess = "Name: ".$name."\nEmail: ".$email."\nPhone: ".$phone."\nMessage: ".$odkaz." \n";  $too = $email; $subjectt = "Thank you for contacting us"; $messs = "Thank you message"; $extraa = "From email: $to\r\n Answer to email: $to\r\n";   mail ($to, $subject, $mess, $extra) mail ($too, $subjectt, $messs, $extraa);  ?>   I just need every infromation, that user puts into form to receive just the way they are. I need "Safaládka" to stay "Safaládka" in the received email, not to turn into for example "SafalˇA-dka"


Sending messages to an iPhone without iMessage

I need to send texts to my kids while they are away from Wi-Fi. I pay for a text message service through my carrier, but can't force my phone to send a text message instead of an iMessage with iOS 10.  So are all our iPhones incapable of sending text messages to people without data plans now?


In "The Last Jedi" was it actually Poe's fault that so much of the resistance died?

In The Last Jedi would Holdo's plan have worked if not for Poe's folly?      Holdo planned to discreetly evacuate the remaining Resistance members using small transports.  It seemed to me that the reason many of them got blown out of space was because when Finn and Rose got caught that guy DJ told the enemy about the escape transports.  Somehow the bad guys didn't see them until DJ told them to look.  So the transports could have evaded the bad guys had Poe not hatched that sabotage plan.   What I'm asking is, did everyone else see it that way?  The First Order would not have seen the small transports if DJ didn't alert them about it?  Or did I miss something?  If, so, really?  Poe could disobey orders, mutiny, fail, get more than half his comrades killed and that's OK because he meant well.


Was the time dilation caused by Miller's planet or the close proximity to the Gargantua black hole?

In the movie Interstellar, is the time dilation the team suffers on the water planet Miller caused by the proximity of the planet to Gargantua or by the planet's gravitational pull?  In the beginning I thought it was caused by the black hole, but later I was reading  and the guys said it was caused by the planet. Do we have some information about this?


I'm using latex template for asme conferences.   The asmems4 style is used for references.  The last reference gets misaligned as in figure. It does not matter what the last reference is. If I add another reference below it, the last one goes bad while the second last one, which was last previously, aligned itself.     Please suggest what might be the problem.


How safe is it to photograph sunset or sunrise?

I took the following photographs of sunset at beach. I know that photographing sun could damage the camera or even eyes, but the intensity of the sun light at the time I captured it was so weak that I could directly look at the sun and somehow knew it wont be harmful. So my question is: How can we tell if the intensity of the light is low enough so that we can directly point the camera at sun?


table of contents: adding a vertical space

In a table of contents that has been generated with LaTeX's \tableofcontents command, I would like to add a vertical space before a Chapter item in the table of contents. One way that I have in my notes is to use  \addtocontents{toc}{\protect\vspace{10pt}}   at a desired location in the document so that this gets processed by \tableofcontents to include an appropriate vertical space in the table of contents. I have two questions:   Is the above the correct way to get a vertical space in a table of contents? Why is it necessary to use the \protect command here?   Thank you...


I commonly use the word 'guys' to refer to a group of males colloquially. It's colloquial but not rude, off putting, condescending, patronizing (though I wouldn't use it with a group of men at a board meeting (hypothetically of course), unless I knew them). So, some that I would not consider as replacements would be    buddies: too old-fashioned dudes: too informal boys: too patronizing men, gentlemen: too formal or false respect   I realized that I had also been using it for any group of people, males and females, even just females. It worked for me and I didn't think of the gender implications, that women might not care for it. No one ever complained, directly or indirectly (rule of life: sometimes people don't complain about things they should).   But it occurred to me (maybe by reading something that sparked realization) that the intended hearers might not all care for it.  What might be a female gendered or non-gendered version of 'guys'?  Some that I've considered don't feel right about (though these may be reasonable answers) are:   dolls: too old-fashioned babes: too informal  ladies: too formal or I've heard from women, too creepy women: too factual girls: too patronizing (as much as 'boys') everyone, you all: too bland y'all: perfectly non-sexist but too regional (might work, but not everywhere)   Hopefully I haven't eliminated all the possibilities -- any suggestions?


Does C# have a String Tokenizer like Java's?

I'm doing simple string input parsing and I am in need of a string tokenizer. I am new to C# but have programmed Java, and it seems natural that C# should have a string tokenizer. Does it? Where is it? How do I use it?


I have defended my thesis and the PhD was awarded. But now I realize that I have made a mistake. The same images are published for 2 different samples. ( I have  the real two images but somehow 1 was published in both cases). What should I do now? No one has looked into the matter.


Let $A$ be an $m \times n$ matrix. Show $A^TA$ and $AA^T$ have the same eigenvalues.   I'm unsure how to approach this. I'm trying to assume that $\lambda$ is an eigenvalue of $A^TA$ with its eigenvector $\neq 0$ and use that to prove that $\lambda$ is also an eigenvalue of $AA^T$ with eigenvector $Ax \neq 0$, but I'm lost on how to actually state it with notation and build off it.  Should I be trying something else?


Formula for the number of partitions of 2N elements

We have a set $S$ of $2N$ distinct elements. I want to partition it into $N$ parts each containing 2 elements. My motivation is partitioning a group of people into pairs.     What is the formula that gives the number of different partitions of $S$?   I prefer closed-form formula. If no such formula exists then asymptotic growth rate is fine.  EDIT: I received several answers. The formula seems hard to calculate. Hence, I am also interested in an accurate Stirling approximation of the formula.  I got this Stirling approximation: $\sqrt 2 (2N/e)^N$. Is this the most accurate approximation?


Open a folder in a Graphic File Manager from a terminal

How can I open a folder in a GFM (in a files window) from the terminal?  Thank you for your kind help.


What's an example of a finite, non-abelian, non-simple group that is *not* semidirectly reducible?

Say I want to classify all groups of a given order. The abelian case is completely understood by the structure theorem for finitely generated abelian groups.  Assume our group is non-abelian, and we somehow managed to find a normal subgroup $N$ (e.g., by considering the core of some Sylow subgroup). It would be pretty nice if we could go on to construct all semidirect products of $N$ with groups of the remaining order – but $G$ need not be semidirectly reducible*.  The only counterexample that comes to mind is $0 \to C_2 \to C_4 \to C_2 \to 0$, which does not admit an appropriate section, i.e. a subgroup complementing our normal subgroup with trivial intersection.  What are counterexamples in the non-abelian case?


i cant choose any resolution other than 1024*768

i tried to fix this from youtube but it doesnt work. Last time my resolution was 1366 768 16:9 but this time it is 1024 768 4:3. How can I fix it?


Ideals of a valuation rings are totally ordered

Why are ideals in valuation rings totally ordered? I was thinking of defining a valuation $v:I \rightarrow \text{min}\{v(x): x \in I\}$, would this work?


With rules to categorize emails into folders, how to receive notifications for new email, and list all the emails in all the folders?

In Outlook 2016, I created some rules to automatically move emails received in Inbox to self-created folders, according to who the senders are.   Now when Outlook receives a new email and move it to a folder according to some rule, it doesn't notify me. Can it notify me for any incoming email, regardless of whether it is subject to some rule or not and then moved to a folder or stay in Inbox? Now I can only manage to list all the emails in a folder in a single view in time reverse order. Is it possible to list all the emails, regardless in which folders they are stored, in a single view, in reverse time order?   Thanks.


Is there a good syntax highlighting hint for regular expressions?

Looking at , I see that there is no language code for regular expressions, but I wondered if there was a language tag which would give good highlighting for regex's anyway (perhaps one with first-class support for regular expressions, like Perl). Is there?  Ideally I'd like a regex .*(capturingGroup)[a-z]{1,10} to be highlighted something like this:


Asymptotics of the number distinct of subgroups of $S_n$ as $n$ goes to infinity

I would like to have a sense of the number of distinct subgroups (that is, isomorphic subgroups are counted multiple times) the symmetric group $S_n$ has as $n$ goes to infinity. I suspect nailing down the exact number is harder than understanding the general size. Can someone help me understand this?


Python 3.6 for loop is only printing one string per line, why?

I am making a small Morse Code translator, and everything works fine; nonetheless, the output is not shown properly.  CIPHER = {'E': "⦾", "A": '⦿', 'R': '⦾⦿', 'I': '⦿⦾', 'O': '⦿⦿',         'T': '⦾⦾⦿', 'N': '⦾⦿⦾', 'S': '⦾⦿⦿', 'L': '⦿⦾⦾',         'C': '⦿⦾⦿', 'U': '⦿⦿⦾', 'D': '⦿⦿⦿',         'P': '⦾⦾⦾⦿', 'M': '⦾⦾⦿⦾', 'H': '⦾⦾⦿⦿',         'G': '⦾⦿⦾⦾', 'B': '⦾⦿⦾⦿', 'F': '⦾⦿⦿⦾',         'Y': '⦾⦿⦿⦿', 'W': '⦿⦾⦾⦾', 'K': '⦿⦾⦾⦿',         'V': '⦿⦾⦿⦾', 'X': '⦿⦾⦿⦿', 'Z': '⦿⦿⦾⦾',         'J': '⦿⦿⦾⦿', 'Q': '⦿⦿⦿⦾',         '1': '⦾⦾⦾⦾⦿', '2': '⦾⦾⦾⦿⦿', '3': '⦾⦾⦿⦿⦿',         '4': '⦾⦿⦿⦿⦿', '5': '⦿⦿⦿⦿⦿', '6': '⦿⦾⦾⦾⦾',         '7': '⦿⦿⦾⦾⦾', '8': '⦿⦿⦿⦾⦾', '9': '⦿⦿⦿⦿⦾',         '0': '⦿⦿⦿⦿⦿'         } def main():     msg = input("Type your message below:\n\n")     for char in msg:         if char == ' ':             print (' '*7,)         elif char not in 'abcdefghijklmnopqrstuvwxyz1234567890':             print ('')         else:             print (CIPHER[char.upper()])   I would expect the output for "Hello, World!" to be something like this:  ⦾⦿⦾⦾⦿⦾⦾⦿⦿       ⦿⦿⦾⦿⦿⦾⦾⦿⦿⦿  However, the actual output looks much more like this:  ⦾ ⦿⦾⦾ ⦿⦾⦾ ⦿⦿    ⦿⦿ ⦾⦿ ⦿⦾⦾ ⦿⦿⦿   I tried removing and placing commas randomly. Then, I tried removing the '\n' statements on the input, but nothing changed with respect to the output. I tried to use the .splitlines as shown here (), but it stopped printing completely! Then, I googled it and did not found anything close to this problem, so I started to read more material on Python strings. I found a website () that has a good amount of material about Python strings, but I could not find anything that could solve my problem there.  I would greatly appreciate your help!


I've been on these sites for several years now, and I've asked a bunch of questions. I've put out a few bounties, however, I don't believe that I've ever actually awarded one. I'm not sure that I've ever had anyone ANSWER a question with a bounty on it.   Are there statistics on how effective bounties are to get better/more answers for questions?


If temperature is dependent on mass, how did the early universe have a temperature?

I am near the end of the book  by Steven Weinberg. I am reading it in order to get a better picture of the early universe in the Big Bang model. But one thing I am having trouble with and wanted to get some clarity. Namely: Question What is meant by "temperature" if the  in the Big Bang model was mostly radiation, or pre-inflation, something more basic than radiation? Explanation Below I will try to explain why I am getting confused. Please let me know if it needs clarification (but that's also part of the question, I haven't been able to clearly understand temperature in this context yet). Since the  is about the movement of massive particles: $$T   =   {m\overline{v^2}\over 3 k_B}$$ How do you think of temperature when there is no mass, or when there is mostly radiation in the very early universe? Here is where I get confused.. Radiation is moving at the speed of light $c$, and since the speed of light is constant, and since radiation doesn't have mass, it seems like the universe would be "maximally" hot (particles moving at the speed of light). But intuitively that's not true because the temperature formula requires mass. But then if the early universe was mostly radiation, how does it have a temperature? If mass slowly increased to be the majority ~400,000 years after the Big Bang, it seems the temperature would increase rather than decrease. But then taking into account the expansion, it makes sense that even if more matter was forming, the temperature would decrease. But how could it decrease if there was less matter before? To summarize, in trying to pinpoint temperature, I seem to be stuck in cyclic reasoning and am looking for a better way of understanding it. I am working toward learning the purely mathematical form of these theories, but have a ways to go. For now, looking for a description to broadly make sense of "temperature" during the evolution of the few moments after the Big Bang. Examples of how "temperature" is used In the book above, Steven Weinberg talks a lot about the temperature and radiation of the early universe, and how the early universe was dominated by photons/radiation, and ~400,000 years later became dominated by mass-particles when the temperature cooled. Some other quotes from the web include:  In the first moments after the big bang, the universe was extremely hot and dense. As the universe cooled, conditions became just right to give rise to the building blocks of matter – the quarks and electrons of which we are all made. () ...the temperature was so high that the four fundamental forces ... were one fundamental force. () ...the temperature of the universe was still too high to allow quarks to bind together to form hadrons. ()


Single slave - multiple master MySQL replication

I need to replicate different MySQL databases from multiple servers into a single slave server. How can this be done? is there a way to define multiple master hosts?


Is Austria out of Schengen? Can EU citizens travel there normally with IDs?

I read that Austria is out of Schengen for a while because of the international situation.    What does that mean?    Can European citizens still travel there with their valid EU IDs or do we need more documents, such as a visa?


I own a Vittoria Rubino Pro Slick 700x23 and a Conti GP4000S 700x25.   What do you guys think about:   mounting different tires on a bike? which tire should go where? The Vittoria has around 200 miles on it and Conti has less than a 100.


Mesh: Plastic bottle curved indent, boolean or displacement map? Or maybe something else?

I'm new to blender and I'm trying to make a 3d model of a complex-ish water bottle. Now I'm stuck at a part where there's an array of wavy lines that need to be indented at the top. I've tried a few things, some didn't work and other's didn't really look right. ...and now I'm left with the question, if what I'm trying to do is even possible. :)     First I tried using an array of curves and applying a boolean modifier to cut the waves into the bottle. But it instead ended up destroying the mesh. (Maybe by increasing the size of the bottle, cutting it and scaling it down?)  I also tried using a displacement map which actually works, but at rendering I run out of memory. Only when I turn off experimental mode can it render it and it doesn't look smooth enough either way:    My question, if it's possible and what's the best way of doing it is? I look forward to your replies, thank you.  Kind Regards, Peter


How can I queue different blender actions to be rendered?

I'm designing a character with different animations (idle, eating, walking, etc) that are separated in different blender actions in the same .blend file.  I would like to queue the actions to be rendered, so I could leave the computer rendering over night. Is there any way to do that??


Do you have to want to hurt someone for the cruciatus curse to work?

OK so the scene where Harry sees Voldemort making Draco tutur Rowel brings a few questions to my mind.      he felt the rage that did not belong to him posses his soul, saw a long room, only light by fire light, and the grate blond Death Eater on the floor,screaming and writhing, and a slighter figure standing over him, wand outstretched, while Harry spoke in a high, cold, merciless voice.   "More, Rowel, or shall we end it and feed you to Nagini? Lord Voldemort is not sure he will forgive you this time...You called me back for this, to tell me Harry Potter has escaped again? Draco, give Rowel another taste of our displeasure... do it, or feel, my wrath yourself!"   A log fell in the fire: flames reared, their light darting across a terrified, pointed white face-   I remember in the Order of the Phoenix Harry tries to do the cruciatus curse on Bellatrix, it doesn't work. She say this is because Harry doesn't mean it, he doesn't want to hurt he enough. If she's right about that (I'm sure she is) I don't see how Draco is managing to make to make Rowel writhe and scream, because it is clear he doesn't want to be doing it.   Also Harry was actually angry at Bellatrix and if his anger at her killing his godfather won't work... well you get my drift.   I know Draco is probably better at magic, but I feel Bellatrix is right, you really have to want them to hurt for it to work.  Next thing, Voldemort's having Draco do it why? Is he doing to upset Lucius, because that and lot of effort to go to, seeing as Voldemort is angry and he'd probably do a better job himself. Or is he trying to train himself a new soldier, I mean the other ones are getting old.


Banned from asking question, but cannot improve existing question because of deletion

I have my questions deleted after realizing the below standard quality, but still got banned.   similar case in  but it seems I need to open this question for moderators to undelete those?


How to automatically open "saved" pdfs in system viewer on chrome?

As  and  Chrome no longer lets you automatically open downloaded pdfs in your System viewer.  In general, I like using the built-in Chrome PDF viewer, but for some longer and more complex PDF documents I much prefer to use my system PDF viewer (i.e., Skim).  I used to be able to save the PDF and it would automatically open in Skim (once I selected automatically open). Or I could save it and click the icon at the bottom. Now you have to manually download and then select "open in system viewer".   Is there a plugin to open the currently opened PDF in Chrome in the system viewer? Is there a way of overriding the behaviour in Chrome to force downloaded PDFs to open automatically in the system viewer? (note that I don't want to disable the Chrome PDF viewer in general)   Update: Note that this question is not about disabling the built-in chrome pdf viewer entirely which is covered by .  The distinction between the two questions is made quite clearly in .


How do I move the Bionic Beaver dock away from the left of the screen?

By default under Bionic Beaver 18.04 LTS the dock is on the left of the screen and I would like to move it either to the bottom or the right of the screen. How do I do this?


How can I stand on the ground? EM or/and Pauli?

There is this famous example about the order difference between gravitational force and EM force. All the gravitational force of Earth is just countered by the electromagnetic force between the electrons on the surface of my feet and the ground.  But also wave-function of electrons(fermions) do not overlap each other due to Pauli exclusion principle.  So which one is the true reason of me not flopping inside the earth forever? Is it only one of them(my guess is Pauli exclusion) or is it both?


If $f(f(x))$ is a linear function, must $f(x)$ be linear?

I'm thinking of $f$ as a function either from the reals to the reals or from the naturals to the naturals.   Edit: Okay, what if $f$ is from the naturals to the naturals?


I want to use dd to clone my running Linux OS which is installed on a PI4 MicroSD 64GB media, to an image.  Because it is a Raspberry PI I cannot (easily) boot from a USB stick and run the job with the PI4 OS not running. If I do such a job, using a console login, can I restore later without issue?  Essentially can dd create a proper, restorable image of the main drive (/dev/sda) from a terminal session from within a running system?


Tradeoffs around using a query string vs embedding version number in the CSS/JS files

I was reading articles and forum posts about using version numbers in CSS/JS files.        It turns out that embedding version numbers in file names are more reliable than using a query string. The articles and discussions I found were back in 2008 or so. I was just wondering if this is still the case today or have things changed with browsers and servers handling things differently? Is the query string now equally reliable?


In what occasion could the word “precious” be taken disapprovingly, or sarcastically?

I understand that the word “precious” in the following quote of Maureen Dowd’s article “Heart of Darkness” (NYT, March 20) literally means “2. valuable or important and not to be wasted” as defined in OALD:     Congressman Jones read an e-mail from a former boss of General   Allen’s, giving the congressman this unvarnished assessment:   “Attempting to find a true military and political answer to the   problems in Afghanistan would take decades. Would drain our nation of   precious resources, with the most precious being our sons and daughters. Simply put, the United States cannot solve the Afghan   problem, no matter how brave and determined our troops are.   But I didn’t know “precious” has another meaning as defined in OALD: 5. (disapproving, people and their behavior) very formal, exaggerated and not natural, and Readers English Dictionary: 2.(colloquial) terrible, almost worthless, until I was told by my respected forum mate a few days ago.   Being encouraged by his suggestion for me to “ask another question if I’m not sure of what he means by describing his input as “precious” is actually rather “precious” phrasing, I would like to ask:   What is an example of “precious” being used as “disapproving” or sarcastic way (as neither OALD nor CALD provides examples)? Is there an easy way to discern the instance “precious” being used as “disapproving” from the case being used in the sense of genuine “great value” as used in the above quote other than judging from the context?


ArcGIS 10 Addin Code Doesn't Execute on Another Computer?

I've created an ArcGIS 10 Addin that consists of a toolbar containing one button and one tool. The button opens a form, and the tool is disabled until the user enters some information on the form.  This addin works great on my development computer and on other computers in my office. But when I deliver the addin to the client, toolbar is there with the button and tool, but when he clicks the button, nothing happens. Not knowing if this had something to do with the form, I added a third button to the toolbar which displays a simple message when the button in clicked. For the client, a click on this button also results in nothing happening. The addin was created using vb.net and Visual Studio 2010.  I've checked that he has the same ArcGIS 10 service pack installed that I have, and that he has the correct .net framework installed. What else could be missing on his computer?


Guys i have many links:  "img/dasda/ja.png", "../img/no.png", "wild/rpm/gulp/in.png",  How in js change sting to last "/"? To get just the name of image?


How can I shrink my Windows partition further than the disk management is allowing?

I just bought a new computer with a 2TB hard drive that has only a single partition. I would like to divide this into at least 4 partitions, but when I try to shrink the current partition, it says the total size is 1888171 MB and that the size of available shrink space is only 939075 MB. The used disk space is at 40gb right now - why can't shrink it to somewhere around that?   I read here:  that this is because of unmovable system files. I doubt this is the only problem though.   I would like to get this partition down to 500GB. How can I do this?  edit: So I've learned that 4 partitions is the max allowed on MBR. I realize this makes it sound silly that I said I wanted "at least 4". Time to learn how to use GPT :/


Unused UK visa and applying for a new one

I got my son a 6-month UK visa. Now I am concerned that he might be unable to take the flight because school has already started and his visa remained unused. Is it possible that when he applies for a new one next time he will be provided with a new one, or will there be any complications due to the unused visa?


How to get element by id after id dynamically added to element?

I have a button with empty id attribute. I want to get  by id that added dynamically to it.  note : I don't want to use createElement() to add .  HTML  <!DOCTYPE html>     <meta charset="UTF-8">   <title>Document</title>     <button>Green</button>

   <button>Change Id!</button>      JS  $(document).ready(function() {    $("a#green").on("click", function(){     $("body").css("background-color","green");   });   $("a#changeId").on("click", function(){     $("a.btn").attr("id","green");   });  });   Here is my code on


I am looking for a multivariable calculus book that is really physics oriented.  Anyone know of any?  EDIT: My wife is looking to brush up on multivariable at the same time she needs to brush up on the related physics.


What's the difference between microscopy and spectroscopy?

Both methods collect particles or electromagnetic waves, and in both methods it's possible to reconstruct a 2D image, which may represent morphology (,  for example), electronic structure (,  for example), magnetic structure (,  for example) etc.  But is there a reason (other than historic) to divide  between microscopy and spectroscopy?  (Related question: )


ERROR Code: Unity on 14.04 would not load

Unity 14.04 is failing to load after an upgrade from 12.04. I think it is because it was an incomplete upgrade and there was some errors. I finally got it to recognize me and let me login into Unity with my user name and password but then it crashes. When I went into the terminal I searched for errors but have no clue what the below code describes:  X Error of failed request: Bad Request (invalid request code or no such operation) major opcode of failed request: 155 (glx) minor opcode of failed request: 19 (X_GLXqueryserverstring) serial number of failed request: 22 Current serial number in output stream: 22 openConnection: connect: no such file or directory cannot connect to brltty at: 0 script for ibus started at run_im. script for auto started at run_im. script for default started at run_im. init: update-notifier-crash (/var/crash/_usr_lib_i386-linux-gnu_libgtk-3-0_gtk-update-icon-cache-3.0.0.crash) main process (2007) terminated with status 1 init: update-notifier-crash (/var/crash/_usr_sbin_unity-greety.114.crash) main process (2008) terminated with status 1


8PST switches, do they exist? (not 8SPST DIP Switch)

I'm looking for a switch that can connect/disconnect 8 signals at a time with one button/lever/slide whatever. Power requirements are very low. I do not want to use analog switches due to interference with my measurements, which are in the nanoamp range.  I would prefer something that is through-hole or surface mount instead of solder lugs. Does such a switch exist?


Prove that an abelian group is not finitely generated.

The following exercise appeared in An Invitation to Arithmetic Geometry by Dino Lorenzini (AMS Graduate Studies in Mathematics, Volume 9, page 32, Exercise 1) Prove that ${\bf Z}(\sqrt{d})$ is not a finitely generated abelian group for $d\in{{\bf Q}-{\bf Z}}$. I am trying to understand why this group must contain rationals whose denominators come from an infinite set of integers which are relatively prime in pairs. This would seem to prove the assertion. But my attempts to find such a set feel contrived!


Is it true that every convex set of the Euclidean space is the sublevel set of some convex function?

Let $C \subset \mathbb{R}^n$ be a convex set.  Is it true, that there exists a convex function $f$ such that   $C = \{x | f(x) \leq a\}$ for some $a \in \mathbb{R}$


Associating linux shell (.sh) scripts on Windows 10 to Bash or WSL

If you ever tried to run an .sh linux script on Windows 10 by double-clicking it, after assigning it to bash.exe (Ubuntu Bash for Windows 10) by default, you most likely noticed it wouldn't open.  Why doesn't it open, and how can I fix this?


Branding Cars on Photoshop / Illustrator

Any idea on how to Design Printable stuff for different cars. I mean branding a complete car by designing stickers which are than pasted on a car. The main problem is that how can we get the measurements of different things like doors of the car etc...


closed form for $\binom{n}{0}+\binom{n}{3}+\binom{n}{6}+...+\binom{n}{n}$

closed form for  $$\binom{n}{0}+\binom{n}{3}+\binom{n}{6}+...+\binom{n}{n}$$  I tried to solve it by :   $$\binom{n}{0}+\binom{n}{3}+\binom{n}{6}+...+\binom{n}{n}=\sum_{k=0}^{n/3}\binom{n}{3k}$$  $$\sum_{k=0}^{n/3}\binom{n}{3k}=\sum_{k=0}^{n/3}\frac{1}{2\pi i}\int_{\left |z  \right |=1}\frac{(1+z)^n}{z^{3k+1}}dz$$  then using geometric series but i got no result .  what is your suggest to solve ?


Working with a huge file. Illustrator is super slow. What can I do to ease the load?

The size of the file is 168mb and it's nearly impossible to work on the file because every action takes like five minutes or so to complete. The artwork is of a scene filled with characters and I so far outlined the entire thing with a brush and afterwards expanded all the strokes thinking it would help ease the load. However, the file is still way too big. Is there something I can do to make it easier to work on the file?  Edit: I flattened transparency and got it reduced to 33mb. Huge difference, but would like it even smaller if possible.


In the Game of Thrones Season 8 finale before leaving for      The Wall (or whatever it is right now)   Jon apologises to Bran and says:     I am sorry I wasn't there when you needed me.   To which Bran replies"     You were exactly where you were supposed to be.   What is Jon apologising for and what does Bran mean exactly?


Analytic Expression for special integral

I want to calculate $$ \int_{0}^{\infty} \frac{\arctan{2t}}{e^{2\pi t}+1} \, {\rm d}t $$ and am wondering if there at all is an analytical expression for the result. I haven't tried much so far, but expressing the denominator as the geometric series and then substituting $z=2\pi t (n+1)$. Equivalently I get $$ \sum_{n=0}^{\infty} \frac{{\rm si}\left(\pi(n+1)\right)}{2\pi (n+1)} $$ where $$ {\rm si}(x) = -\int_{x}^{\infty} \frac{\sin(t)}{t} \, {\rm d}t $$ is the shifted ${\rm Si}(x)$ function. The value is approximately $0.03618247146$, in fact I know from comparison with something else that it is exactly $\frac{\ln \pi -1}{4}$, but there should be some (direct) derivation, or?  Thanks for your input if you have any.  Edit: I tried to follow your instructions, but am now stuck. So I wrote $$ {\cal L}^{-1} \left(\frac{\psi(t)-\psi(1)}{t-1}\right)(s) =\sum_{n=0}^{\infty} \frac{e^{-sn}}{n+1} = e^s \int_s^\infty \frac{{\rm d}x}{e^{x}-1} $$ and taking the Laplace-transform \begin{align} \psi(t) &= \psi(1) + (t-1)\int_0^\infty {\rm d}s \, e^{-s(t-1)} \int_s^\infty \frac{{\rm d}x}{e^{x}-1} \\ &= \psi(1) + (t-1) \int_0^\infty {\rm d}x \int_{0}^{x} {\rm d}s \, \frac{e^{-s(t-1)}}{e^{x}-1} \\ &= \psi(1) + \int_{0}^{\infty} {\rm d}x \, \frac{1-e^{-x(t-1)}}{e^x-1} \tag{1} \\ &= -\frac{1}{t} + \psi(1) + \int_0^\infty {\rm d}x \, \frac{1-e^{-tx}}{e^x-1} \tag{2} \\ &= \dots \\ &=-\sum_{k=0}^{n} \frac{1}{t+k} + \psi(1) + \int_0^\infty {\rm d}x \, \frac{1-e^{-(t+n)x}}{e^x-1} \\ &\stackrel{(\rm{2})}{=} -\frac{1}{2t} + \ln(t) - \int_0^\infty {\rm d}x \, \left\{ \frac{1}{2} - \frac{1}{x} + \frac{1}{e^x-1}\right\} e^{-tx} \tag{Binet 1} \end{align} where $\psi(1)=-\gamma$.  Now we integrate over $t$ from $1$ to $y$ yielding $$ \ln \Gamma(y) \stackrel{({\rm 1})}{=} \psi(1)\,(y-1) + \int_0^\infty {\rm d}x \, \frac{y-1+\frac{e^{-x(y-1)}-1}{x}}{e^x-1} $$ but what now? Substitute?


Could not get the nested array initialization work?


I created a controller which looks like this  public with sharing class EventRegistrationController {      // A CONTROLLER FUNCTION     // FUNCTION RETURNS A LIST OF cSession      public List<cSession> getSessions() {            //DO STUFF       }     //A PUBLIC CLASS WITHIN CONTROLLER    @TestVisible public class cSession      {         public Session__c con {get; set;}         public Boolean selected {get; set;}          //This is the contructor method.          public cSession(Session__c c) {              con = c;             selected = false;         }     }  }   I need to write a test code for the controller, how can I create a list of cSession and call getSession function?


Creating elements few times inside function

It's a question about dom manipulation inside functions, I have seen code that create shopping list , it goes like this:   const list = document.querySelector('ul'); const input = document.querySelector('input'); const button = document.querySelector('button');  button.onclick = function() {   let myItem = input.value;   input.value = '';    const listItem = document.createElement('li');   const listText = document.createElement('span');   const listBtn = document.createElement('button');    listItem.appendChild(listText);   listText.textContent = myItem;   listItem.appendChild(listBtn);   listBtn.textContent = 'Delete';   list.appendChild(listItem);    listBtn.onclick = function(e) {     list.removeChild(listItem);   }    input.focus(); } li {   margin-bottom: 10px; }  li button {   font-size: 8px;   margin-left: 20px;   color: #666; }
My shopping list

     Enter a new item:     <input type="text" name="item" id="item">     <button>Add item</button>

     Now, what I don't understand is, how it possible to use const a few times in order to create elements, why it doesn't cause an error? In addition I want to ask, How can I manipulate those element: Let's say I have created few li elements, if for example I want to change the color of one of them to blue, How can I do that? When I write the variables names in the console I get this:


What is the difference between "He comes from the U.S." and "He is from the U.S."?  Can you always use them interchangeably, or is there a subtle difference between them?


I'm trying to perform a bitwise NOT in SQL Server. I'd like to do something like this:  update foo set Sync = NOT @IsNew   Note: I started writing this and found out the answer to my own question before I finished. I still wanted to share with the community, since this piece of documentation was lacking on MSDN (until I added it to the Community Content there, too).


How to locate the directory that uses all disk space

I have used Ubuntu 14.04 as a server to host my company website and mailsystem. The system was online for 3 weeks before I was not able to send or receive emails.  A few minutes of debugging showed the reason: No more disk space.  Filesystem      Size  Used Avail Use% Mounted on udev            3.9G     0  3.9G   0% /dev tmpfs           799M  8.7M  790M   2% /run /dev/xvda1      7.8G  7.4G     0 100% / tmpfs           3.9G     0  3.9G   0% /dev/shm tmpfs           5.0M     0  5.0M   0% /run/lock tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup tmpfs           100K     0  100K   0% /run/lxcfs/controllers tmpfs           799M     0  799M   0% /run/user/1000   Question: How can I locate the directory that occupies all the disk space?   I have tried using df -hs /path/to/directory on all root directories without luck. There is 4GB of space that is not accounted for.


flight delayed from London Heathrow to Grand Cayman

actual flight times BA0253 on 22 may2016 heathrow to George town cayman islands as flight delayed


Let T:$\mathbb R^3\to\mathbb R^3$ be an orthogonal transformation such that det T=1 and T is not the identity. Let S subset of $\mathbb R^3$ be the Unit sphere. Show that T fixes exactly two points on S. S is compact and the linear function T is continuous. Hence T(S) is compact. No way I can proceed further. Help me out please.


Proving $\lim \frac{x^n-a^n}{x-a}=n\cdot a^{n-1}$

Please note that this question was asked by one of my students who doesn't know differentiation yet nor Lhopital nor mean value theorems. We teach limits before all these topics like differentiation , MVT , Lhopital , etc $$\lim_{ x \to a} \frac{x^n-a^n}{x-a}=n\cdot a^{n-1}$$ I can prove this result for $n \in \mathbb Z$ And for $n \in \mathbb Q $ , that is when $n =\frac{p}{q}$ , I can prove the result using the result for $n \in\mathbb Z$. But my question is this : Since $\mathbb Z \subset \mathbb Q$ , why can't we prove this result only for $n \in \mathbb Q$ ? Is there a method to prove $$\lim_{ x \to a} \frac{x^\frac{p}{q}-a^\frac{p}{q}}{x-a}=\frac{p}{q}\cdot a^{\frac{p}{q}-1}$$ without the result for $n \in \mathbb Z $  ?


MySQL problem in the sorting of column set as varchar(255)


Eigenfunctions heuristics for self-conjugate priors

Previously asked on .  I am looking for a citable reference (books, research papers, PhD theses, not websites, internal reports, etc.) about the heuristic interpretation of self-conjugate priors as "eigenfunctions for the conditioning operator". This is best explained (though without reference) in the Wikipedia page .  In a nutshell: A statistical model is any family $\{P_\theta\}_\theta$ of probability distributions, parametrized by $\theta\in T$ (e.g., $T\subset \mathbb R$ or $T\subset \mathbb R^k$). Some data $X:=(X_1,\dotsc, X_k)$ is sampled from the model in two stages:   firstly, we let $\Theta\in T$ be a $Q$-distributed random variable; secondly, we draw $X_1,\dotsc, X_k$ in such a way that $X_1,\dotsc, X_k\mid \Theta\sim P_\Theta$ conditionally i.i.d..   The posterior distribution of $Q$ given $X$ is then defined as $Q^X:=Q[\Theta\in \cdot\mid X]$.  A family of distributions $\{Q_\alpha\}_{\alpha\in A}$ (again $A\subset \mathbb R$ or $\mathbb R^k$) is self-conjugate (for a fixed model) if the posterior distribution $Q_\alpha^X$ satisfies $Q_\alpha^X=Q_{\alpha'}$ for some $\alpha'\in A$.  Heuristically, $Q_\alpha$ is (sort of) an "eigenfunction" for the conditioning operator $\mathbf E[\cdot \mid X]$.


Convergence for $\sum _{n=3}^{\infty }\:\frac{1}{n\left(\ln n\right)\ln(\ln n)}$

I am not allowed to use the integral test. Basically I need to find whether this is convergent or not. $$\sum _{n=3}^{\infty }\:\frac{1}{n\left(\ln n\right)\ln(\ln n)}$$  I tried using Bertrand's test since it seemed like it would be a good fit here but to no avail. Any thoughts?


I know that with iCloud Drive I can sync the Desktop and Documents folder on iCloud. But I wonder if there is a way I can sync other folders on iCloud such as Applications, Photo Library, Downloads, etc.?


From an old number theory book:  Consider all numbers of the form $$ x_n={2^n+1}, n=0,1,2,\dots $$ How many of them are prime? Mathematica gave $x_0=2,x_1=3,x_2=5,x_4=17,x_8=257, x_{16}=65537$ and is still running!  We know that if it finds a prime like that it will be of the form $x_{2^k}+1$. So we only need to search for index a power of two. Has this been answered yet?  Thanks a bunch!


A stick of unit length is cut into three pieces of lengths $X, Y, Z$ according to its length in two sequence of cuts. Find Cov(X,Y).

A stick of unit length is cut into three pieces of lengths $X, Y, $and $Z$, with $X \le Y \le Z$. First the stick of length $1$ is cut into two pieces at a randomly chosen point uniformly distributed along its length. Then the smaller of these two sticks is also cut into two pieces at a randomly chosen point uniformly distributed along its length. These two cuts are conducted independently. Find Cov(X,Y).  I need to get $E(XY)-EXEY$. First, I write $S=X+Y$. Then the length function of $S$ is $\min(s, 1-s)$. Given $S=s$, I can find the covariance of $X,Y$ as follows. The distribution of $X$ is $\min(x, s-x)$, so $E[X|S]=\int_0^{s/2} xdx + \int_{s/2}^s (s-x) dx=s^2/4.$ Likewise, $E[Y|S]=\int_0^{s/2} (s-y)dy + \int_{s/2}^s y dy=3s^2/4.$ Now $E[XY|S]=\int_0^s x(s-x)dx=s^2/6$,since $y$ is just $s-x$(I'm not sure about this part). Now to get the expectation, I just need to integrate them over $s$, which has the uniform distribution, so that would be integrating them over $[0,1/2]$. Is this correct? I would greatly appreciate any comment.


Adjust server configuration [PHP, Laravel, mysql, nginx] for serve great number of user

I have a Laravel PHP webapp that shows analytics data in Angular frontend to users. User can only show content, plots and tables. I have written 3 laravel commands that hourly download and store data into mysql db. The main components in the server are:  The API written in PHP with Laravel framework. The angular frontend. The nginx web server that serve API and Frontend. The mysql DB that is used to store and retrieve data.  The application is online and works good with default php-cli/php-fpm, nginx, mysql configuration without any tune for current user load (10 user per minute). I expecting a great user flow for a particular event next week, so I decided to increase server resources from 8GB RAM and 4 core to 32GB RAM with 8 core on SSD. I'm quite new in server and db administration, I read that each component (php, mysql and nginx) have configurations that allows an amount of memory or a number of child process to be run. How can I adjust configuration properties to use my server resources at best? Thanks in advance!


C# looks great because it is a compiled language which seems to run quite well without too much CPU and does not consume too much memory. And StackOverflow and ServerFault are good examples of an MVC/.Net/C# stack that scales.  C# is also interesting because despite being compiled, it still has a lot of advanced features as a language only found on slower interpreted language.  My server being Linux only (Ubuntu 8.04 LTS), I am wondering if installing Mono in place of the .Net framework is a good idea for production use.  I currently do not have any existing applications using .Net but I am interested in using existing frameworks (like MS MVC).


What happens after you leave Windows 7 inactivated?

It seems that there is a sequence of events that happens when you leave Windows 7 inactivated. First, you get tooltips in the tray that say "This copy of Windows is not genuine, click here to activate now."  If you ignore the warnings, eventually you get a watermark on your desktop:    Then, after another few days, Microsoft tries to make you afraid of the dark by turning the desktop background to solid black:    Eventually another tool tip will say "Activation period has expired, click here to activate now."  I know that to prevent all these things from happening, I should just activate. But my question is merely one of curiosity:  Is there anything further that Windows 7 does to try to convince you to activate? Do certain services get shut down or functionality lost? What can I expect to happen if I don't activate?


For loop behaviour when calling a method from another method in same class in java

Please don't get confused by my full complex code. Let me walk you through my code and problem.  I have built a class (CharDrawing), in which I am calling one method (charDrawing) inside another method (stringDrawing), let's say two times, in full code below. And it is returning me desired object.  Now, I am trying to replace these 2 calls of charDrawing() method, using for loop. See the commented part below.  sr=charDrawing(sr,x,y,w,h,pw,"G"); sr=charDrawing(sr,x+w+5,y,w,h,pw,"B");      /*for (int i=0;i<l;i++)     {                              sr=charDrawing(sr,x+i*(w+gap),y,w,h,pw,Character.toString(s.charAt(i)));     }*/   But my for loop is not behaving same as above two lines? What is the difference?  After applying for loop I am not getting same result.  Debugging: These are my debugging result of objects in both cases. Refer full code below.  Code run without for loop:  simple object line 1com.badlogic.gdx.graphics.glutils.ShapeRenderer@1ef3e2e simple object line 2com.badlogic.gdx.graphics.glutils.ShapeRenderer@1ef3e2e   Code run using for loop:  for loop objectcom.badlogic.gdx.graphics.glutils.ShapeRenderer@13841b8 for loop objectcom.badlogic.gdx.graphics.glutils.ShapeRenderer@13841b8   My Analysis: As you can see, in both cases, same objects are getting updated in each line. Then why am I not getting same results?  Full Code:  public class CharDrawing {      public ShapeRenderer stringDrawing(ShapeRenderer sr,float x, float y, float w, float h,float pw,float gap,String s) {          int l=s.length();         sr.begin(ShapeType.Filled);         /*for (int i=0;i<l;i++)         {                                  sr=charDrawing(sr,x+i*(w+gap),y,w,h,pw,Character.toString(s.charAt(i)));           System.out.println("for loop object"+sr);         }*/         sr=charDrawing(sr,x,y,w,h,pw,"G");         System.out.println("simple object line 1"+sr);         sr=charDrawing(sr,x+w+5,y,w,h,pw,"B");         System.out.println("simple object line 2"+sr);         sr.end();         return sr;     }     public ShapeRenderer charDrawing(ShapeRenderer sr,float x, float y, float w, float h,float pw,String c)     {          if(c=="G")         {             //sr.begin(ShapeType.Filled);             sr.setColor(200/255f, 245/255f,112/255f, 1);  //color1             sr.rect(x,y,w,h);             sr.setColor(107/255f, 107/255f,107/255f, 1);   //color2             sr.rect(x+pw,y+pw,w*0.35f,h-2*pw);             //sr.setColor(407/255f, 107/255f,107/255f, 1); //for debugging             sr.rect(x+pw+w*0.35f,y+pw+h*0.5f-pw,0.65f*w-pw,h*0.5f-pw);             sr.rect(x+2*pw+w*0.35f,y,0.65f*w-3*pw,h*0.5f-pw);                    //sr.end();         }          if(c=="B")         {             //sr.begin(ShapeType.Filled);             sr.setColor(200/255f, 245/255f,112/255f, 1);  //color1             sr.rect(x,y,w,h);             sr.setColor(107/255f, 107/255f,107/255f, 1);   //color2             //sr.setColor(407/255f, 107/255f,107/255f, 1); //for debugging             sr.rect(x+pw,y+pw,w-2*pw,0.5f*h-1.5f*pw);             sr.rect(x+pw,y+0.5f*h+0.5f*pw,w-2*pw,0.5f*h-1.5f*pw);             //sr.end();         }          return sr;     } }   FYI.. I am using this libGDX ShapeRenderer api to draw few shapes.   Apologies if it's very basic concept and I am unable to figure it out  Thanks.


Transfer files client-server inside a SSH session

Is it possible to transfer files (client-server) from inside a ssh session?.   I know how to transfer files using SCP, This question is about transference from inside a ssh session.  For example I start the ssh session:  ssh root@example.com   I perform some operations  echo "Test" > FILE   I transfer the files (pseudocode)  remotecp FILE client_directory   I want to know this because I want to make an automation script from some process (mostly backup operations) and I want to make it the most atomic way possible.


System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record, how to rectify kindly hep me


Testing in android, NullPointerException on fragment

Trying to implement some small test cases in my Android application, but at the moment i have some trouble getting the test class to find the fragment.  Here is my Activity that just create my fragment.  public class DetailActivity extends FragmentActivity {     @Override    protected void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setContentView(R.layout.activity_detail);        Intent intent = getIntent();        Bundle bundle = new Bundle();        bundle.putParcelable("match", intent.getParcelableExtra("match"));        DetailFragment fragment = new DetailFragment();        fragment.setArguments(bundle);        if (savedInstanceState == null) {           getSupportFragmentManager().beginTransaction()                   .add(R.id.container, fragment, "test")                   .commit();        }    } }   And my fragment looks like this.  public class DetailFragment extends Fragment {    @Override    public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {        context = getActivity().getApplicationContext();       mh = getArguments().getParcelable("match");        int id = context.getResources().getIdentifier(               "c" + String.valueOf(mh.getChampionImage()),               "drawable", context.getPackageName()       );     }      @Override     public void onStart() {       super.onStart();       if (Utility.hasNetworkConnection(context)) {          FetchIcons fetchIcons = new FetchIcons();          fetchIcons.execute(mh);       }     }  ...//Some Code   My test looks like this.  public class DetailFragmentTest extends ActivityUnitTestCase<DetailActivity> {     DetailActivity activity;    DetailFragment fragment;     public DetailFragmentTest() {        super(DetailActivity.class);    }     @Override    protected void setUp() throws Exception {       super.setUp();       Intent intent = new Intent(new MockContext(), DetailActivity.class);       int[] i = {1, 2, 3, 4, 5, 6, 7};       MatchHistory mh = new MatchHistory("Win", "23", "42", "31", "23414", "321", 22, true, i);       intent.putExtra("match", mh);       startActivity(intent, null, null);       activity = getActivity();       fragment = (DetailFragment) activity.getSupportFragmentManager().findFragmentByTag("test");     }     public void testText() {     ...//Some more code    } }   Everything up to the part where i'm trying to receive the framgent works fine, but gives me NullPointerException as soon as i try to fetch it.  And my stacktrace doesn't shed much light on the problem.  java.lang.NullPointerException at com.plushogskolan.chobi.matchhistory.DetailFragmentTest.setUp(DetailFragmentTest.java:34) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)   Been trying to solve it using several different methods, including just the ActivityInstrumentationTestCase2, but then i can't even get the Activity.  I'm clearly doing something wrong. But since not a single tutorial for unit testing in android have yielded any luck i can at least give it a shot here and see if anyone knows what the problem is.  Regards!


Web browser or extension to move multiple tabs between windows in a single action

In Safari, I'd like to be able select multiple tabs at once, and move them all to an open or new window. Looking for extension (or magic Safari invocation) that can , I find no viable solutions.   Since Safari lacks this feature, is there any browser on OS X that does a better job of this, out of the box, or with an extension.


How to add additional x-axis labels to each bar in a ybar chart?

I've drawn a ybar chart in pgfplots as below, and I want to add additional x-axis labels, as indicated by what I've drawn by hand in orange.    Question: How do I add additional x-axis labels to each bar in a ybar chart?  My current code is the following:  \documentclass[crop,margin=1mm]{standalone}  \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.13}  \pgfplotstableread{ n  A  B  C C1 32 24 57 C2 34 35 12 C3 45 47 34 C4 10 20 30 }\mytable  \begin{document}  \begin{tikzpicture}  \begin{axis}[     ybar,     width=6in,     height=2.5in,     ymin=0,     ymax=100,     bar width=0.2cm,     ymajorgrids=true,     major grid style={dotted,black},     ylabel={y axis},     symbolic x coords={C1,C2,C3,C4},     xtick=data,     x tick label style={yshift=-0.5cm}   ]      \addplot table [x=n,y=A,draw=black,fill=blue!20] {\mytable};   \addplot table [x=n,y=B,draw=black,fill=blue!20] {\mytable};   \addplot table [x=n,y=C,draw=black,fill=blue!20] {\mytable};  \end{axis}  \end{tikzpicture}  \end{document}   Importantly, the labels A, B, and C repeat (they usually occur in a legend, when they're not repeated).  I attempted to use nodes near coords={A}, but putting it inside the axis[ .. ] puts an A above every bar, and putting it inside the table[ .. ] does nothing.  The labels are from the header (namely the line n  A  B  C) within \pgfplotstableread{ ... }.


SQL query to fetch second last row or nth row from the table

How we can print the second last row from the table using SQL query.


How can I indicate the first and the last reference number written in a page of the bibliography in the header of the page?

I have this document with a huge numbered bibliography e.g. from 1 to 600. I would like the first and the last reference number of the page to be inserted in the heading of the page. Like in the following example:    I am using fancyhdr has explained in this .  \documentclass[a4,11pt,twoside]{book} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhead[LE]{\slshape My text} \fancyhead[RE]{} \fancyhead[LO]{\hfill \slshape \leftmark}  \renewcommand{\headrulewidth}{0pt}  \usepackage{kantlipsum}  \title{My title} \author{My name} \date{}  \begin{document}  \renewcommand{\headrulewidth}{.4pt}  \chapter{example}  \kant[1-3]\clearpage  \fancyhead[LE]{\slshape BIBLIOGRAPHY 19 - 42}  \begin{thebibliography}{99}  \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example} \bibitem{example}  \end{thebibliography}  \end{document}   Is it possible to have a method that works also with  \usepackage[backend=biber]{biblatex}?


Example of slides presentations using beamer

Well I am looking for examples of slides presentations.  I also want know how to get a pack  that is missing to get when I use texmaker.   Tanx


Conditional expectation of $X$ given $\sin(X)$

What is the conditional expectation of $\mathbb{E}(X\mid\sin(X))$ if $X$ is uniformly distributed on $[0,\pi]$?  Intuitively I expect that it is constant and equal to $\frac{\pi}{2}$, since the Borel set generated by $\sin(X)$ is symmetric around $\frac{\pi}{2}$.  Is that true? What would be the formal proof?


What is the difference between const and readonly in C#?   When would you use one over the other?


Is there any way i can install ubuntu on my smartphone. My phone is Samsung wave 3 GT-S8600 It is Bada 2.0 OS It's firmware is S8600DDLD1/s8600ODDLD1 (INU)


one sample t-tests applied to each row - 'data are essentially constant' error

I have three replicates of an experiment which gives me ratios of the abundance of different peptides.  If I take the data for one peptide:  pep1 <- c(4.3, 5.7, 6.3)   I can use a one-sample t-test to test the hypothesis that the ratio is different from 1:  t.test(pep1,         alternative=c("greater"),        mu=1,        paired=FALSE,        var.equal=FALSE,        conf.level=0.95)   output:  data:  pep1 t = 7.4818, df = 2, p-value = 0.0087 alternative hypothesis: true mean is greater than 1 95 percent confidence interval:  3.703107      Inf sample estimates: mean of x   5.433333    However if I try and apply this to the rows of a dataframe called peptides, where each row is a separate peptide, with three ratios:  t_test <- function(x) p_val =  t.test(x,                                        alternative=c("greater"),                                       mu=1,                                       paired=FALSE,                                       var.equal=FALSE,                                       conf.level=0.95)$p.value  apply(peptides, 1, t_test)   I get the data are essentially constant error.  I don't understand! I think apply is doing what I want because if I substitute 't-test' for 'mean' then it does the correct calculations.   My aim is to get the p-values for each peptide and then adjust these for multiple comparisons.  I'm relatively new to R, and any advice would be very much appreciated!


How can I get the created dates for all files in subdirectories

I have a list of file path within a sub-directory. How can I find the created date for each of the file paths? I used the code below to get all the files within each sub-directory using Python:  def find(pattern, path):     result = []     for root, dirs, files in os.walk(path):         for name in files:             if fnmatch.fnmatch(name, pattern):                 result.append(os.path.join(root, name))     return result  find(pattern, Path)


How to check if two objects in a ArrayList are the same?

I want to see if two objects in the same array list are the same. Similarly if there are not objects that are the same in the array list I also want to display an appropriate message. At the moment it is printing too much. I just want it to display one line: "there are books that are the same" or "there are NO books that are the same". Here are my efforts so far.  public static void main(String[] args) {      List<Book> listOfBooks = new ArrayList<>();     Book book1 = new Book();     Book book2 = new Book();     Book book3 = new Book();      listOfBooks.add(book1);     listOfBooks.add(book2);     listOfBooks.add(book3);     listOfBooks.add(book2);      for (Book bookA : listOfBooks) {         for (Book bookB : listOfBooks) {             if (bookA.equals(bookB)) {                 System.out.println("there are books that are the same");             }             System.out.println("there are NO books that are the same");         }      } }   Thanks in advance.  EDIT: I amended my code as such according to "duplicate question"  List<Book> listOfBooks = new ArrayList<>();     Set<Book> setOfBooks = new HashSet<Book>(listOfBooks);      Book book1 = new Book();     Book book2 = new Book();     Book book3 = new Book();      listOfBooks.add(book1);     listOfBooks.add(book2);     listOfBooks.add(book3);      if (setOfBooks.size() < listOfBooks.size()) {         System.out.println("there are duplicates");     } else {         System.out.println("there are no duplicates");     }   Still prints "there are duplicates" when there clearly are not.   RESOLVED: Ordering of my code was incorrect. Solution-      List<Book> listOfBooks = new ArrayList<>();      Book book1 = new Book();     Book book2 = new Book();     Book book3 = new Book();      listOfBooks.add(book1);     listOfBooks.add(book2);     listOfBooks.add(book3);      Set<Book> setOfBooks = new HashSet<>(listOfBooks);      if (setOfBooks.size() < listOfBooks.size()) {         System.out.println("there are duplicates");     } else {         System.out.println("there are no duplicates");     }


Combining Shimano RS500 crankset with Stages Shimano 105 5800

I've been thinking about getting a power meter for a while now. I finally decided I would get one, but now I realise that Stages only starts at the Shimano 105 level.  I currently have a Shimano RS500 Crankset ( 50 x 34 ) and I'm very pleased with it, so I don't feel a need to replace the whole crankset with a 105 5800.  I also have no plans to upgrade anytime soon to Dura Ace or something like that (the rest of my bike has the 105 5800 set), so I don't think I should buy a higher lever crank arm from Stages.  Now, I know something about bikes, but not a lot. It seems that what I have (RS500) looks compatible with the 105 crank arm (just judging by the looks), but I would like to be certain before I spend this amount of money.  My set:  Stages I would like to get:   Kind regards and thanks in advance,


i am using js for dynamic content  now i want to get the size (width and height) of an image  until now i used img.clientWidth and img.clientHeight but when i have set img.style.width and img.style.height the img.clientWidth and img.clientHeight changed as well. i need a variable which does not change during the webpage changes, since the src does not change as well. if there is any way, i would prefer no jquery


Are there rules for disassembling a slain creature, especially dragon?

I haven't played D&D for a while though recently I have started playing it with my kids. The group is made out of five. So far they have acted with wisdom and they have been lucky which allowed them to slay the Green Dragon in Thundertree.  Are there any rules for disassembling the dragon for the sake of doing things such as selling its meat and making armor from its scales?


How to check that a string contains only “a-z”, “A-Z” and “0-9” characters

I am importing string and trying to check if text contains only "a-z", "A-Z", and "0-9".  But I get only input and it doesn't print success when I enter letters and digits  import string text=input("Enter: ") correct = string.ascii_letters + string.digits if text in correct:     print("Success")


Why do heavier objects roll faster down a hill?

My main question is why more liquid would roll down a ramp faster than less for a viscosity assignment, however I would like to have a full understanding of why heavier objects would roll faster down a hill


What is an example of a connected Hausdorff space with a countable number of elements? Any finite Hausdorff space is discrete (therefore not connected) and there are a myriad of examples uncountable Hausdorff spaces. But what about countable?


Proof by Strong Induction: $n = 2^a b,\, b\,$ odd, every natural a product of an odd and a power of 2

Can someone guide me in the right direction on this question?  Prove that every $n$ in $\mathbb{N}$ can be written as a product of an odd integer and a non-negative integer power of $2$.  For instance: $36 = 2^2(9)$ , $80 = 2^4(5)$ , $17 = 2^0(17)$ , $64 = 2^6(1)$ , etc...  Any hints in the right direction is appreciated (please explain for a beginner). Thanks.


When I run sudo apt-get update && sudo apt-get -y upgrade command in my Ubuntu18.04 system.


Split file into multiple small files, separate by the newline symbol

Is there a utility that split file by newline symbol? e.g if a file contains the following lines,  aa bbb cccc   If I want to split it to 3 files, the desired output would be:  aa, bbb And cccc (in 3 different files)  I already checked the split command, it only cut file by file sizes, not what I want.  If I don't wrote a utility myself, is there any standard tool to use?


SOS Directory Nightmare - Possible for a directory to have two different users with full access?

I am setting up a directory for media. I need two users to be able to read, write and execute any content inside a directory, even if the other user created it.   The directory is a samba share. I want a user, bob,  to be able to access it and allow the user plex to access it. Both users must have full access to all directories. So if the shared directory is called /myShare, and bob creates a directory inside of it /myShare/bobs, the user plex could read write execute and delete any content inside of /myShare/bobs.  I am somewhat new to Ubuntu, but I have spent hours and hours on this.   Any suggestions would be VERY VERY VERY VERY VERY appreciated!


What is the difference between the two BOLDFACE tags and the two Italicized Tags?

There are two ways to make your text  BOLD.   One of them (which I personally think is an easier way):   </b> This is a Bold Text!</b>    The other one is:  <strong> This is also a Bold text! </strong>  So, What's the difference?  They both do the same job, so what's the point of using two tags that do the same thing? Do you think the  < strong > tag should be depreciated?   There is also two tags that can be used for Italicised text   The first one:  <i> This is Italicised </i>   The 2nd one:   <em> This is also Italicised <em>    These Italicised text tags are like the bold tags, why not just keep the most efficient one?   I think we should keep the < b >  tag and the  < i > tag for our HTML documents. They are less time to consume and take up less space.


Documentation inconsistency with new top bar and search box

According to , the way to search is     Enter search terms in the search box that appears in the upper right corner of every page   However, the search box in the new top bar is in the center-left, not on the right. .


Limit of product of cosines: $\lim\limits_{n \to \infty} \cos(\frac{x}{2})\cos(\frac{x}{4})\cos(\frac{x}{6})\cdots\cos(\frac{x}{2^n})$

We've got this problem $$ y= \lim_{n \to \infty} \cos\left(\frac{x}{2}\right)\cos\left(\frac{x}{4}\right)\cdots\cos\left(\frac{x}{2^n}\right)$$  I have got stuck in this problem of evaluating the limits. What I was thinking was to convert $$\cos\left(\frac{x}{2^n}\right)$$ somehow to $\sin$ and thus term might fully get dissolved for a shorter expression and we can evaluate value of limit.


What does the "free" in *free abelian group* or *free group* mean?

I am asking for the definition of "free". What is the difference between, say, any old abelian group, and a free abelian group?


I have a Lenovo G580 with 4 GB DDR-3 RAM and i5 3rd gen processor. I installed Ubuntu 18.04.5 LTS and it takes about a minute to boot. Is it a problem for me? If yes, how can I solve it? Is it booting slowly with respect to my hardware? My laptop is 7 yrs old and has a traditional HDD. I ran systemd-analyze command and got following output - Startup finished in 4.627s (kernel) + 1min 5.376s (userspace) = 1min 10.003s graphical.target reached after 1min 5.257s in userspace


plane throw two points and paralell to another plane

I have $\pi:4y−3z−4=0 \quad A=(2,4,4) \quad B=(2,−2,−4)$. I have to calculate the equation of the plane σ throw A and B and parallel (not orthogonal)  to π. What is the solution? Thanks in advice! And if I have three points, what's the solution?


I have seen this operation before but cant seem to recall the name or corresponding theory. This operation changes inner product $<a,b> = a^T b$ to $a^T R b$, where $R$ is some matrix. What does this do intuitively and what is the name?


Cannot apply color attribute to a lightning-output-field using CSS in LWC

I am trying to change the color of the <lightning-output-field> in LWC using CSS but it doesn't work. I am able to change the background color though. Is there any workaround for this? I don't seem to find any documentation online. Please find my html and css.  HTML  <template>        <lightning-record-view-form object-api-name="Invoice__c" record-id={recordId}>           <lightning-output-field field-name="Name" class="baby"> </lightning-output-field>           <lightning-output-field field-name="Total_Amount__c"></lightning-output-field>           <lightning-output-field field-name="Password__c"></lightning-output-field>       </lightning-record-view-form>  </template>   CSS  .baby {    background-color:lightblue;    color: red; }   Output: