I've been trying to figure out how to make a kind of crackle map similar to this:    Using this: the Voronoi cells texture in cycles:    My theory is that you could use the information in the texture (the places where the different colors meet) to create black lines, but I just cannot figure it out.  Any examples would be appreciated.

I am familliar with Blenders Cycle's Voronoi Texture and have fiddled with it for a while. I am trying to get a result that is not like Intensity or Cells, but more like cracks. I tried the node setup from Image 1, but it came to Image 2 (not good!). I would prefer something like in image 3. So basically what I am asking is:  Is it possible to create the result from Image 3 purely with nodes in Blender.  Image 1:    Image 2:    Image 3:


In terms of the creation and annihilation operators $a_{j}$ and $a_{j}^{\dagger}$ (fermionic or bosonic, doesn't matter):  Is the vacuum state $\mid\mathrm{vacuum}\rangle$ exactly the zero vector on the Hilbert space $\mathcal{H}$ in question?  For a while I thought that the answer is yes, but if I think about a finite-dimensional Hilbert space I can never apply a matrix (a.k.a, some representation of $a_{j}^{\dagger}$) to the zero vector, and get out a vector that is not the zero vector. However, you can do this with the vacuum state.

What is the difference between $|0\rangle $ and $0$ in the context of $$a_-  |0\rangle =0~?$$


On my mail setup I'm currently using self signed certificate generated for server hostname.   And I'm curious is there some kind of SSL certificate that shared hosting providers use for multiple domains mail and how are they setting them up?

I've got a Postfix mail server setup for hosting multiple virtual domains (say xxx.com and yyy.com).  Users configure their outgoing mail server as mail.xxx.com and mail.yyy.com. All mail servers refer to the same physical Postfix server (same IP, single instance of Postfix running on this Linux server).  Which SSL certificate do I need for Postfix smtpd_tls_cert_file configuration option?  Or do I have to use a single certificate for mail.xxx.com and tell users of yyy.com to use mail.xxx.com as their outgoing server? This would break the illusion of separate virtual servers.  [Note: the domains are completely separate. These are not multiple subdomains sharing a common root].


I installed a new GPU, since then my mesh or object appears to be broken:  What's causing this? BTW: I already tried installing older version of Blender.

Blender worked fine before I installed a GPU to my PC. Is it the GPU? How can I fix this? I already reinstalled to the latest version. When I try to move a cube, the orange outline only moves but not the cube and I cant click it.


I see that many of the questions posted all have really low reputations points, from 1-50.  Given that you get points for simply editing and selecting answers, I find this hard to believe.  It makes me less likely to want to answer questions as it seems these users create accounts just to mine information and then open up another account for their next question.  Why not give users more incentives to use the site as an actual user and not just a place to mine information?  For example - the ability to delete down-voted posts, the ability to block users (trolls, etc.).  Basically any of the things popular social sites have?

I know SO's policy is "you don't have to register to ask questions," but there are so many new members and so many hit-and-runs... The majority of the questions I see now are coming from new users (i.e., it's their first question). Although unregistered users should still be able to ask questions, I think we should encourage users to create an account. Here is a couple of ways we could do that:  Explicitly encourage people to get an account: there's currently nothing telling people to do that. Maybe tell people something like "Get an account, it's easy!" and maybe show some of the perks of having an account (and having rep).  Maybe give a few bonus points for registering; and have that enable a basic privilege. It could be taken from one of the , for example.   Of course getting people to register is just half of the battle. I don't know what the stats are on this, but I think there's a number of users who create multiple accounts anyways. We could curb that by:  Having smart(er)? duplicate account detection systems, alerting someone who is about to create a new account and possibly has an account already. Give them a message like "Hey, it looks like you already have  account, are you sure you want to create a new one?"  Create a new privilege (10k? 20k?) that gives users tools to detect possible duplicate accounts, eg: "List users with the same e-mail," "List users with the same IP addresses,"  etc. (without revealing said emails and IPs). Then the 10k/20k can look at other stuff (e.g.: posts) and refer the new user to a moderator for a possible merge.


So my new canon d1200 doesn't take pictures in AF mode , my both lenses(50mm and 18-55mm) I have tried searching but up till now there is no solution. My canon takes picture in manual mode but in auto focus mode the lenses rotate (to focus) but don't take a picture it shows busy and no picture is taken but when i take the picture in auto focus, live mode (seeing through the screen) the picture is taken. i don't understand what the problem is . i have tried cleaning the lenses , still no use. ya, when i take pictures of tube lights , the pictures are taken .

I just purchased a brand new Canon Rebel T3i kit from Costco.. I used it for a couple of days, but now when I have the 18-55mm lens attached and the camera on auto-focus, it will not take a picture. Still will take a picture in manual focus. And will take a picture in either focus with the other lens on (55-250mm).  I've been told by a friend that the lens may not be seating right.  Are there any other settings I can check? I am very new to the camera and I probably messed with some settings or accidentally bumped something I shouldn't have.  Or I can take it back to Coscto and exchange it.


Let $a_n$ be a sequence of real numbers with $a_n>0 $ $ \forall n\in\mathbb{N}$. Show (or disprove) this statement:  If $\sum_{n=0}^\infty a_n$ converges, then there exists a sequence $c_n$ of real numbers with $c_n \geq 0$ and $\lim_{n\rightarrow\infty}c_n=\infty$, so that $\sum_{n=0}^\infty c_na_n$ converges.   I tried many examples and I always found a $c_n$, I have a good feeling that this statement might be true, I can be wrong tho. Does someone have a tip, how to show this? I tried applying several Convergence-Criteria, but it didn't really work out that well. Thanks in advance!

I am not able to solve this exercise. I've tried everything.     Exercise Let be $a_n > 0$ a sequence and suppose that $\sum a_n$ converges. Prove that exists a sequence $c_n > 0$ such that $\lim c_n = \infty$ and $\sum c_na_n < \infty$   I don't even know if I have to find an "always-valid" closed form for $c_n$ (maybe in function of $a_n$?) or prove its existence in another way.  Thanks in advance.


I am trying to reduce the gap between the subfigure and the subcaption.      \captionsetup[subfigure]{labelformat=empty, aboveskip=10pt}   but the line of code above does not work.  \begin{figure} \captionsetup[subfigure]{labelformat=empty, aboveskip=10pt}     \centering     \subfloat[Ground Truth]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-gt.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[Recurrent Neural Network]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-rnn.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-vrnn.png} }}     \\ \vspace{-0.5\baselineskip} \noindent\rule{14cm}{0.4pt}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-gt.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-rnn.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-vrnn.png} }}     \\ \vspace{-0.5\baselineskip} \noindent\rule{14cm}{0.4pt}         \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-gt.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-rnn.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-vrnn.png} }}     \\ \vspace{-0.5\baselineskip} \noindent\rule{14cm}{0.4pt}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-gt.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-rnn.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-vrnn.png} }}     \\ \vspace{-1\baselineskip}     \caption{}     \label{fig:ood} \end{figure}

How can I reduce the gap between the subfloat and its caption? I tried to use   \captionsetup[subfigure]{aboveskip=0pt}    but it doesnt work for me. Below is the snippet i have and the output  \begin{figure} \captionsetup[subfigure]{labelformat=empty} \captionsetup[subfigure]{aboveskip=0pt}     \centering     \subfloat[Ground Truth]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-gt.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[Recurrent Neural Network]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-rnn.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-vrnn.png} }}     \\ \vspace{-0.5\baselineskip} \noindent\rule{14cm}{0.4pt}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-gt.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-rnn.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-vrnn.png} }}     \\ \vspace{-0.5\baselineskip} \noindent\rule{14cm}{0.4pt}         \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-gt.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-rnn.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-vrnn.png} }}     \\ \vspace{-0.5\baselineskip} \noindent\rule{14cm}{0.4pt}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-gt.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-rnn.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-vrnn.png} }}     \\ \vspace{-1\baselineskip}     \caption{}     \label{fig:ms} \end{figure}   Here is the output


This variable is defined inside data:  data () {   return {     isSent: false,     (...)   When trying to call the method here:  methods: {   sendEmail () {     let isSent = this.isSent      const xhr = new XMLHttpRequest()     xhr.onreadystatechange = function () {       if (xhr.readyState === 4 && xhr.status === 200) {         console.log(xhr.responseText)         this.isSent = true (...)   linter says there is an unused variable defined. When I remove the let isSent... initialization, linter says about undefined variable.  I saw the Q&A related to JS closures, but information there, although useful and broad, is very general and doesn't solve more specific issues like this one.  How should I get to the variable from inside the xhr function?

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


Where should I ask this?     I need some help making some tech choices, and I'm not sure where else   to turn.      I realize answers to this question could be influenced by personal   opinion, but that's okay. I'm actually hoping to hear those opinions.      My challenge is this:      I am trying to develop a platform upon which non-engineers can produce   custom reports against transaction-level data. I have access to a data   team that maintains a data warehouse, which can be used to structure   data for said reports. The trick is, working out a platform that   supports the following criteria:      Primary Criteria      The data and presentation should be separate concerns. So, the report   builder would ideally not have to be terribly technical, and would   just be building a report template, if that makes sense.       I should be able to email the report to a user as either a link to an online   report, or as a static "PDF" version of the report. The sending of   emails would be triggered by application-level events.      Secondary Criteria      It would be wonderful if the reports could also be executed in an   offline state. That is, without requiring an internet connection. For   example, a JavaScript-generated report with JSON data objects behind   it.       An HTML-to-PDF generator that understands and honors bootstrap   styles, div elements, etc. That is, not having to write everything in   tables. I've used ABCPdf by webSupergoo and Aspose.Pdf, but both seem   to rely heavily on the use of tables, and struggle with bootstrap.

I'm pretty sure this isn't the right place to ask this. I'm not aware of a stack site out there where this question would fit. If someone could point me to the right place it would be awesome.     The question I was going to ask is:       I am incorporating a blogging feature into my car enthusiast site. I want each user to be able to have their own blog and be able to browse other people's blogs. What blog engine would be best for this scenario?      I am using ASP MVC 4 and found  to look promising; however, I am a bit confused at the setup. This seems to be a blog set up for a personal site and not a "Nest of blogs" type of system. I've never done a blog before so I'm fresh meat here.


Somehow, all my menus disappeared, but I managed to get my tools and transfer menu back. Also, nothing will render without the materials menu. Here is a picture:  Please tell me what to do! Also, shift and space makes this.

My friend who has only recently downloaded blender has come across a workspace issue. He said he accidentally pressed a button and it has entirely changed his user interface/ Workspace. He can't open, save or do anything with the change.    This is a full window image!


I'm just curious, and I know the Stack Overflow guys often release data like this; is there any data or personal experience for which times of day / day of week / month of year produce the most interesting questions? I suppose data-wise that would translate to average upvotes per question asked.  Similarly, are there times when people are more likely to ask duplicate questions, etc.?

In my experience, question popularity has a lot to do with what time-of-day it's asked. Also, I suspect that the day of the week is important too. These are just suppositions, however. Does time of day and day of the week in which a question is asked affect its popularity? If so, when and how?


I have this script, which changes NVIDIA-SETTINGS vibrance, when certain application/process is launched (in my case Counter-Strike:Global Offensive game)  Script:  #!/bin/bash  on="1023" off="0" dv="0"   # RESET sleep 10 log "RESET" nvidia-settings -a "[gpu:0]/DigitalVibrance[DFP-0]=$off"  while true; do #daemon mode dv=`nvidia-settings -q "[gpu:0]/DigitalVibrance[DFP-0]" -t`   if pgrep -l csgo | grep csgo_linux   then #  log "Process csgo_linux found"     if [ $dv -eq $off ]; then       nvidia-settings -a "[gpu:0]/DigitalVibrance[DFP-0]=$on"     fi   else # No process found     if [ $dv -eq $on ]; then       nvidia-settings -a "[gpu:0]/DigitalVibrance[DFP-0]=$off"     fi   fi    if [ $dv -eq $on ]; then   sleep 5   else   sleep 1   fi  done   What is wrong with this script, why it gives me these errors?  622 csgo_linux64 /home/matas/Desktop/vib-gui.sh: line 18: [: -eq: unary operator expected /home/matas/Desktop/vib-gui.sh: line 28: [: -eq: unary operator expected 622 csgo_linux64 /home/matas/Desktop/vib-gui.sh: line 18: [: -eq: unary operator expected /home/matas/Desktop/vib-gui.sh: line 28: [: -eq: unary operator expected 622 csgo_linux64 /home/matas/Desktop/vib-gui.sh: line 18: [: -eq: unary operator expected /home/matas/Desktop/vib-gui.sh: line 28: [: -eq: unary operator expected 622 csgo_linux64 /home/matas/Desktop/vib-gui.sh: line 18: [: -eq: unary operator expected /home/matas/Desktop/vib-gui.sh: line 28: [: -eq: unary operator expected   EDIT:  #!/bin/bash  on="1023" off="0" dv="0"   # RESET sleep 10 nvidia-settings -a "[gpu:0]/DigitalVibrance[DFP-0]=$off"  while true; do #daemon mode dv=`nvidia-settings -q "[gpu:0]/DigitalVibrance[DFP-0]" -t`   if pgrep -l csgo | grep csgo_linux   then #  log "Process csgo_linux found"     if [ "$dv -eq $off" ]; then       nvidia-settings -a "[gpu:0]/DigitalVibrance[DFP-0]=$on"     fi   else # No process found     if [ "$dv" -eq "$on" ]; then       nvidia-settings -a "[gpu:0]/DigitalVibrance[DFP-0]=$off"     fi   fi    if [ "$dv -eq $on" ]; then   sleep 5   else   sleep 1   fi  done

#!/bin/bash  SUBJECT="WARNING CPU USAGE HIGH" TO=gmail id MESSAGE=/tmp/messages echo "#######################" > $MESSAGE echo "CPU statistics as follows.." >> $MESSAGE mpstat >> $MESSAGE echo "#######################" >> $MESSAGE CPU_USAGE=$(top -b -n1 | awk '/^Cpu/ {print $2}' | cut -d. -f1) [ $CPU_USAGE -gt 85 ] && mail -s "$SUBJECT" "$TO" < $MESSAGE`   ./cpu.sh: line 11: [: -gt: unary operator expected What might be the reason


This might have a really basic answer, but its been bugging me. In a lot of circuits where you are controlling a series of leds, circuits will be draw with a separate current-limiting resistor for each led, instead of one single on the common side.  Why would you do this?         – Schematic created using   Instead of this?

Why can't you use a single resistor for a number of LEDs in parallel instead of one each?


I have two classes. The first class call to call method(with parameter) that is inside in second class. I want to know when parameter pass , it copy to  MyClass ref or it pass by reference.   public class NewClass  {     public static void main(String[] args)     {         MyClass obj = new MyClass();         obj.val = 1;         obj.call(obj);         System.out.println(obj.val);     } }   public class MyClass  {     public int val;     public void call(MyClass ref)     {         ref.val++;     } }   The output is 2. My understanding is it is pass by refernece. Please confirm my answer. Thank you very much.

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


I am putting together a report as part of a group project for part of physics degree, and I have been having fun trying to format the table of contents correctly. Here is a MWE:      \documentclass[twoside]{article}     \usepackage[a4paper,pdftex,left=1.7cm,right=1.7cm,top=2cm,bottom=2.5cm]{geometry}        \usepackage{blindtext}     \usepackage[english]{babel}     \renewcommand*\thesection{\arabic{section}.0}     \renewcommand*\thesubsection{\arabic{section}.\arabic{subsection}}      \begin{document}     \tableofcontents     \addtocontents{toc}{~\hfill\textbf{Page}\par}     \newpage      \begin{abstract}     \blindtext     \end{abstract}      \section{A section}     \blindtext     \section{Another section}     \blindtext         \subsection{A subsection}         \blindtext         \subsection{Yet another subsection}         \blindtext             \subsubsection{Oh, exciting, a sub sub section!}             \blindtext     \section{Another boring old section}     \blindtext      \end{document}   Which gives something like this as the output:    Not bad, except for the spacing between the sections and their respective numbers is far too small. I tried to fix it by including this in the preamble:      \makeatletter     \renewcommand{\l@section}{\@dottedtocline{1}{1.5em}{3em}}     \renewcommand{\l@subsection}{\@dottedtocline{2}{3.0em}{3.5em}}     \renewcommand{\l@subsubsection}{\@dottedtocline{3}{4.5em}{4.2em}}     \makeatother   giving this:    Although it allows me to adjust the spacing to my liking (not adjusted correctly in the picture, just an example), I seem to have lost the bold font and gained some dots for my sections which were previously absent. I have also lost the nice spacing between sections. I tried getting the bold font back with      \renewcommand\cftsecfont{\bfseries}   but it didn't seem to have any effect. Any advice on how to better format my ToC would be appreciated. I don't have to comply with any specific layout of formatting specified by the university, but I do want it to look clear and professional. The first example was perfect except for the section numbers being stuck right next to the sections, although it was fine for the subsections.

I'm preparing a document using the book class. In the table of contents, the space between the subsection number and title is too wide. How to reduce it?


A function $f : \mathbb{R} \rightarrow \mathbb{R}$ is called even if $f(-x) = f(x)$ $ \forall x \in \mathbb{R}  $   A function $f : \mathbb{R} \rightarrow \mathbb{R}$ is called odd if $f(-x) = -f(x)$ $ \forall x \in \mathbb{R}  $   Let $U_{e}$ denote the set of real-valued even functions on $\mathbb{R}$ and let $U_{o}$ denote the set of real valued odd functions on $\mathbb{R}$.   Show that $\mathbb{R}^{\mathbb{R}} = U_{e} \oplus U_{o}$   This question from Q24 of "Linear Algebra Done Right" 3rd Edition - Chp 1.4 (Subspaces). The author of the book does minimal work with functions during the chapter. I have no idea how to approach the question.

While working on a proof showing that all functions limited to the domain of real numbers can be expressed as a sum of their odd and even components, I stumbled into a troublesome roadblock; namely, I had no clue how one divides the function into these even and odd parts.  Looking up a solution for the proof, I found these general formulas for the even and odd parts of a function $f(n)$:  $$\begin{align*} f_e(n)&\overset{\Delta}{=}\frac{f(n)+f(-n)}{2}\\ f_o(n)&\overset{\Delta}{=}\frac{f(n)-f(-n)}{2} \end{align*}$$  While I understand that in an even function $f(n) = f(-n)$ and that in an odd function $f(-n) = -f(n)$, I still don't get how these general formulas for the even and odd parts were obtained. Can someone guide me through the logic?


All:  what is the most easy to read (most accessible) Algebraic Geometry book ?  (If possible, I am looking for an introduction book, maybe for undergraduate, and maybe similar to A Friendly Introduction to Number Theory).

What are the best algebraic geometry textbooks for undergraduate students?


Continuing from a previously asked question here (), I am having trouble finding the proper URL to use to get data from a WMS to add to a leaflet map. I believe this service is free to use by the public. My code is below: library(leaflet) url="https://nowcoast.noaa.gov/arcgis/services/nowcoast/analysis_meteohydro_sfc_qpe_time/MapServer/WMSServer?request=GetCapabilities&service=WMS" leaflet() %>%   addTiles() %>%   setView(lat=42,lng = -78,zoom=6) %>%   addWMSTiles(url,layers = 9)  The links to the data on the site is here: , use control F and this ("analysis_meteohydro_sfc_qpe_time") string to get to the exact data I am looking for. The service name is "analysis_meteohydro_sfc_qpe_time" The image layer ID number is 9 The layer description is, "24-Hr Quantitative Precipitation Accumulation (inches)" The WMS instruction guide for getting data is here:

I am looking to add a specific layer from this website () to a leaflet map in R. I have tried the code below, but the data does not seem to add to the map. library(leaflet) url='https://www.iweathernet.com/total-rainfall-map-24-hours-to-72-hours' leaflet() %>%   addTiles() %>%   setView(lat=42,lng = -78,zoom=6) %>%   addWMSTiles(url,layers=0)  Note that I have changed the number to a few different options in: layers = 0  The website in question has 10 different base maps as options in a dropdown, in addition to 6 different times for retrospective weather data as a dropdown option.


I tried to add a form from a php file to another php file using jQuery, and I added an event to my added input(submit) button, but it's nt work,   I have seen some answers that propose using the method $elm.on("click",function() instead of of $elm.click(function(), but it still not work.  So here is my code :

     You will have to rwrite all the data again     <form method="post" class="updating">       <input type="text" name="id" class="id" style="width:40px;" />       <input type="submit" id="button" value="Insert" />     </form>     <input type="submit" id="button" class="cancel" value="Cancel" />

   when I press the Button Insert this php file is added :   <?php require_once "connexion.php";  $gdb = new GestionBD();  $id = $_POST["id"];   $req = "select * from utilisateurs WHERE id='$id'";  $results = $gdb->selectFromBD($req);    foreach ($results as $result):   ?>   <form class="insertMode" method="post">     <input type="text" value="<?php echo $result->nom;?>" class="nom"                name="nom" />
     <input type="text" value="<?php echo $result->email;?>" class="email" name="email" />
     <input type="text" value="<?php echo $result->sexe;?>" class="sexe" name="sexe" />
     <input type="text" value="<?php echo $result->age;?>" class="age" name="age" />
     <input class="test" id="button" type="submit" value="Add" />   </form> <?php endforeach;?>   When I press the button with the class test I don't get an alert with "no" message, as you can see in the script :   $(".updating").submit(function () {   var id = $(".id").val()   $(".insertion").show()   $.post("getId.php",{id:id},function (data) {     $(".insertion").html(data)   });   return false; });  $(".test").click(function () {   alert("no"); });   And i am sorry if this is long.. Thank you people

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


We have the equation in $x$: $$x^2 = 2^x$$  We know that, by logic, if we equate the bases and the powers separately, we get $x=2$ in both the cases and thus we conclude that $2$ is the root of the equation.  But what if we don't apply that logic. Is their a mathematical way we can get the same result? Using mathematical steps instead of intuition and logic?

How to solve this equation $$x^{2}=2^{x}$$   where $x \in \mathbb{R}$.  Por tentativa erro consegui descobri que $2$ é uma solução, mas não encontrei um método pra isso. Alguma sugestão?(*)  (Translation: By trying different values I've found that $2$ is a solution, but I couldn't find any method to this though. Any suggestions? )


i basically want to define  a  templet data object ,  and use this templet data object to assign new data objects. then put different values to  new data objects.  code like:  public class sData {     public  string name;     public  int Number;     public sData(string name,int Number)     {         this.poster_path = path;         this.Number = Number;     } }  sData templet= new sData("aaaa","0");  sData realData1 = new sData(); realData1=templet; realData1.Number=100;   but after  realData1.Number=100;  i found the  templet.Number is changed to 100  how can i just give the 100 to realData1 , but no the templet ?

I want to do something like:  MyObject myObj = GetMyObj(); // Create and fill a new object MyObject newObj = myObj.Clone();   And then make changes to the new object that are not reflected in the original object.  I don't often need this functionality, so when it's been necessary, I've resorted to creating a new object and then copying each property individually, but it always leaves me with the feeling that there is a better or more elegant way of handling the situation.  How can I clone or deep copy an object so that the cloned object can be modified without any changes being reflected in the original object?


I have iOS 7 and I know how to work all of it but when there was iOS 6 all music you've bought on iTunes, could be deleted from the device. Now I you remove songs that you've bought on the device stay there with the stupid iCloud download symbol. I want it to go away completely because I have duplicates of almost everyone of my songs. How will I erase all music from my phone without doing factory reset.

How do I delete all the music on my iPhone.  I tried doing it through iTunes but it says my collection is not managed by iTunes and I don't want to erase and sync because all my apps are nicely backed up and sorted with iTunes.  I have only seen a way of deleting song by song on the phone.


My email attached to my Pokémon Go account will soon be deleted. How can I change it, so I can login with another email?

Is it possible to change the email associated with Pokemon go? I used my collage email which will soon be deleted.


I have noticed some comment popup is coming in SP List Modern forms. It looks like a new update from the Microsoft. It will be in the collapsed view while opening it from the List, but I open it from the Lists/ListA/dispform.aspx?ID=1, the comment popup is opening in expanded view, what is the Actualpurpose of it?, is there any way to collapse that expanded Popup? I have attached the image below for your reference. Any help would be appreciated. Thanks in Advance!.

Anyone know how to turn this OFF? I use my own field to track comments in our document approval system, this new feature confuses users. This icon appears in custom lists:    PS: And what is this?


Just woke up and realized the turkey chili (2 cans kidney beans, 1 can black beans, 2 cans diced tomatoes, 1 lb turkey ground) had been cooking from raw on warm for 10 hours.   I'm a bit desolate since it's all organic. I just turned it to high and set a timer for 4 hours. Can my chili still be salvaged?   This isn't a duplicate to this  because it is specific to chili crockpot with the ingredients above.

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


fontspec defines the commands  \setmainfont{font name}[font features] \setsansfont{font name}[font features] \setmonofont{font name}[font features]   to set the document’s default fonts. However, if I use a sans-serif font as the main font, e. g. \setmainfont{Latin Modern Sans}, \rmfamily is redefined as Latin Modern Sans, so I lose the ability to specify a separate serif font. Of course, I could set the serif font with \setsansfont, but then I have the fonts all backwards.  Shouldn’t there also be a command \setseriffont? I don't think a “main” font should necessarily always be a serif font. If this is intended, what is the best way to have a sans-serif font as the default font, but still have a serif font defined as \rmfamily?  (This is unrelated to . I already explained that I could typeset the document in a sans-serif font by using \setmainfont. This question is about the semantics of the command \setmainfont, which doesn’t seem to imply any specific font characteristics from its name, compared to \setsansfont, \rmfamily and \sffamily – see also .)

How do I typeset an entire document in sans-serif, e.g. Helvetica, without littering the document with font changes for every heading/paragraph, etc.? Like in , but with the paragraphs all in sans-serif.  For example, I've seen documents typeset in Computer Modern and then switched to Palatino, but can I do the same with Helvetica with a few commands at the beginning?  (And please don't tell me to use a serif font for body copy / paragraphs. I know. I'm trying to use latex to typeset my resume to look like the one I've created in a word processor, which is hard to maintain but looks good. I'm hoping latex will let me do more advanced formatting/layout, separating content from form.)


I want to fill   \documentclass[12pt]{standalone} \usepackage{pgf,tikz} \usetikzlibrary{arrows} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm] \clip(-2.3,-2.3) rectangle (2.3,2.3); \draw [rotate around={0.:(0.,0.)},color=black,fill=gray,fill opacity=0.5] (0.,0.) ellipse (1.5 cm and 2.cm); \draw [rotate around={0.:(0.,0.)},color=black,fill=white] (0.,0.) ellipse (1.cm and 1.3cm); \end{tikzpicture}\end{document}      How can I fill complement of two sets A and B knowing that A is subset of B with venndiagram?

What I am up to is to write some exercises dealing with logical formulas for my students, like:     And the students should draw these formulas on . At the end of the lesson, I really would like to print the correct answer for them. I found a great resource on a forum thread at , which helped me a lot to make up some Venn diagrams with tikz, but have some problems with visualizing complements, like ~A.  A simple, modified version of the TeX file found on the forum linked above, can be seen below, which produces the following expression:    \documentclass{letter}   \usepackage{tikz}   \def\firstcircle{(90:1.75cm) circle (2.5cm)}   \def\secondcircle{(210:1.75cm) circle (2.5cm)}   \def\thirdcircle{(330:1.75cm) circle (2.5cm)}   \begin{document}     \begin{tikzpicture}       \begin{scope}     \clip \secondcircle;     \fill[cyan] \thirdcircle;       \end{scope}       \begin{scope}     \clip \firstcircle;     \fill[cyan] \thirdcircle;       \end{scope}       \draw \firstcircle node[text=black,above] {$A$};       \draw \secondcircle node [text=black,below left] {$B$};       \draw \thirdcircle node [text=black,below right] {$C$};     \end{tikzpicture}   \end{document}   Which looks like:    Could anyone please help me out plotting/defining some expressions dealing with complements? A nice example could be:    That should look like: (image from )    I do not insist on the red color :)  I would like to use the simplest possible solution, as I would like to mass generate the exercises with the help of . So any suggestion dealing with gnuplot, R or any other opensource packages is welcome. Thank you!    UPDATE (25/01/2011): added details based on answers.  Thank you @Leo Liu, you helped me a lot! I modified a bit the code you suggested to be able to color the area outside of the two circles also (in the H universe), but have no idea how to set a background to that polygon also. The code:  \begin{tikzpicture}[fill=gray] % left hand \scope \clip (-2,-2) rectangle (2,2)       (1,0) circle (1); \fill (0,0) circle (1); \endscope % right hand \scope \clip (-2,-2) rectangle (2,2)       (0,0) circle (1); \fill (1,0) circle (1); \endscope % outline \draw (0,0) circle (1) (0,1)  node [text=black,above] {$A$}       (1,0) circle (1) (1,1)  node [text=black,above] {$B$}       (-2,-2) rectangle (3,2) node [text=black,above] {$H$}; \end{tikzpicture}   And the image generated:    I will also look for even odd rule in the near future which does not make sense for me at the moment but looks really simple and promising!


So I did a "git rebase interactively" in SourceTree, and the result wasn't exactly as expected.   Result:    Intended / wanted situation (ms-paint'ed):     In other words i want to   Move the branch point to after commit c4d389e Move commit 5a57dea to after c4d389e on the main branch delete commits 474e72f, b61bbf50 on the shadow branch as they will be duplicates after moving the branching point, and delete afba1b9 and 0f2b626 as they have no business on the shadow branch   I haven't pushed the commits to any remote repo.  Can anyone please tell me what steps I need to do? Iv'e seen the big -thread, but I don't really understand how to apply the answers to this particular situation.

Does anybody know how to easily undo a git rebase?  The only way that comes to mind is to go at it manually:   git checkout the commit parent to both of the branches  then create a temp branch from there cherry-pick all commits by hand replace the branch in which I rebased by the manually-created branch   In my current situation this is gonna work because I can easily spot commits from both branches (one was my stuff, the other was my colleague's stuff).  However my approach strikes me as suboptimal and error-prone (let's say I had just rebased with 2 of my own branches).  Any ideas?  Clarification: I'm talking about a rebase during which a bunch of commits were replayed. Not only one.


This is kind of a new type of question for me:  If $\alpha$ and $\beta$ are two different roots of the equation $a\cos\theta + b\sin\theta = c$, then show that $$\sin(\alpha+\beta) = \frac{2ab}{a^2 + b^2}$$  Could someone please explain the procedure to me?

Question: If $\alpha$ and $\beta$ are the solutions of $a\cos \theta + b\sin \theta = c$, then show that: $$\cos (\alpha + \beta) = \frac{a^2 - b^2}{a^2 + b^2}$$  No idea how to even approach the problem. I tried taking two equations, by substituting $\alpha$ and $\beta$ in place of $\theta$ in the equation and manipulating them, but that didn't get me anywhere. Please help!


My question is this: Is there a single-word to describe my actions or to describe a person who sticks to their guns? I recently encountered an issue with a seller online. The goods were shipped over two months ago. I did a shipping inquiry through USPS and received a formal letter from them two days ago stating that they lost the package and that since it's lost it will still display as being in transit. I contacted the seller asking for a refund and attached a copy of the letter from USPS. Their response: "Dear, why they think lost? Still in transit." I asked for a refund and they refused. So, I opened a dispute. The sellers response to the dispute: "Dear, close dispute bad for business logistics in transit. Sob sob sob" My response: "I will close the dispute when you provide me with a guarantee in writing that I will receive a full refund when the package hasn't arrived by a specified date. USPS has already informed me that they lost the package, please see the attached letter that I provided two days ago." The sellers response: "Dear, why they think lost? Still in transit. Please close dispute. Sob sob sob" My response: "As previously stated, I will close the dispute when you provide me with a guarantee in writing that I will receive a full refund when the package hasn't arrived by a specified date. USPS has already informed me that they lost the package, please see the attached letter that I provided two days ago." The sellers response: "Dear, please close dispute wait patiently for logistics. Sob sob sob"

What will you call a person with an endless spirit of pursuing something?


I am trying to solve problem related to absolute value function, i.e given $Z(x,y) = |Ax + By + C|$ , what is the minimum value of $Z$, if $x \geq 0$ and $y\geq 0$ and x,y belongs to integers

Find the minimum of the function      $$ f(x,y)=|ax-by+c|$$      where $a,b,c \in \mathbb N$ and $x,y \in \mathbb Z$.   The questions  and  are similar but they are in cases where $x, y$ are bounded.Taking the partial derivatives,etc. doesn't help. Is there a way to do this efficiently(for a computer program)?


I have two machines A and B which are in different subnets, both behind separate firewalls. Machine A can see B, but B cannot see A. I have a user account (non-root) on both machines, I can SSH B from A, and I would like to be able to SSH A from B instead, but that cannot be done directly.   I have used tunnelling to hop through intermediate servers with SSH, but what I am asking is different here, and I don't know what it would be called. Is there a way to open a connection from A to B, which could in turn be used "in reverse" from machine B to run commands on A?

As I understand this, firewalls (assuming default settings) deny all incoming traffic that has no prior corresponding outgoing traffic.  Based on  and , reverse SSH tunneling can be used to get around pesky firewall restrictions.  I would like to execute shell commands on a remote machine. The remote machine has its own firewall and is behind an additional firewall (router). It has an IP address like 192.168.1.126 (or something similar). I am not behind a firewall and I know the remote machine's IP address as seen from the Internet (not the 192.168.1.126 address). Additionally, I can ask someone to execute ssh (something) as root on the remote machine first.  Could anyone explain me, step by step, how reverse SSH tunneling works to get around the firewalls (local and remote machines' firewalls and the additional firewall between them)?  What is the role of the switches (-R, -f, -L, -N)?


I have a user info command for my bot, and am using message.author.presence.game to display what game the user is playing. Whenever they are not playing a game, it displays null. How can I make it so it displays Nothing or No game?

Is there a null coalescing operator in Javascript?  For example, in C#, I can do this:  String someString = null; var whatIWant = someString ?? "Cookies!";   The best approximation I can figure out for Javascript is using the conditional operator:  var someString = null; var whatIWant = someString ? someString : 'Cookies!';   Which is sorta icky IMHO. Can I do better?


If someone asks me "would you give me your bike", which one of the following will be the usual reply?   1- No, I won't give you my bike.   2- No, I wouldn't give you my bike.   My question is should I be using 'would' to reply as the question is asked with 'would'?

Here is the sentence from the test     Without the Sun there _____________ no light, no heat, no energy of any kind.   a) will be   b) would be   c) will   The answer is obviously "b" because it is second conditional. However in another sentence     Oxygen is an element of greatest importance to the Earth as all living things __________ without it.   a) would die   b) will die   c) will be dying   the correct answer is "b" and not "a". I don't understand why, because both sentences are constructed similarly, even the "without" preposition appears in both of them.


On an old Dell PC that originally ran Windows XP 32 bit that I erased the Windows XP 32 bit and installed Ubuntu 32 bit on with less than 2 gigs of RAM. I would like to upgrade the RAM above 2 gigs. So now that if I have more than 2 gigs of RAM should I then also upgrade the Ubuntu to the 64 bit OS?

I need to use a large software package (Xojo) that requires the 32-bit architecture to run. Try as I might, I can't seem to install the 32-bit libraries on my 64-bit installation of 15.04.  I don't have a problem running a 32-bit version of Ubuntu (I'm only using this computer for Xojo) but the computer has 8GB of RAM and I'd like to be able to use it all. Is there a way to utilise all 8GB of RAM with a 32-bit Ubuntu install? Does Ubuntu do this out of the box?


I was wondering how to treat odd and even numbered pages differently, for example I want the page number appear on the upper right corner of the page on odd pages while upper left corner of the page on even pages. How can I accomplish this? Many thanks in advance

Please help me to design pages with a different title on odd and even pages:  I mean I would like to have for example    name of author on odd pages. name of article on even pages.   How can I do it?  Many thanks,


I know this has been asked many times before, but even by looking at similar posts, I haven't been able to figure this out.  Here is my MainActivity class:  package binchtitsinc.adventuregameamlior;  import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.TextView;  public class MainActivity extends AppCompatActivity {      private int compteur;     private TextView display;      @Override     protected void onCreate(Bundle savedInstanceState) {          super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);         compteur = 0;         display = (TextView) findViewById(R.id.Afficheur);         display.setText("Count is: " + compteur);           Game theGame;          theGame = new Game();          theGame.play();      }       public void plusOne(View button){         compteur=compteur+1;         display.setText("Count is: "+compteur);      }      public void toUser(String texte){         display.setText("Message:"+texte);     } }   I already checked, the ID is correct (R.id.Afficheur).  What's really weird is that when I call toUser in that class, it works flawlessly. However, when I call that method from another class (here, "Game"), I get the error that I pasted in the title.  Here is the beginning of my class Game:  package binchtitsinc.adventuregameamlior;  /**  * Created by Leo on 11/04/16.  */ public class Game {      //Attributes      private Parser parser;     private Energy energy;     private Room currentRoom;     private Room goalRoom;     private MainActivity main;     private DirectionLexicon dirVocabulary;     private CommandLexicon commandVocabulary;     private boolean wantsToQuit;     private boolean hasTheItem;      //Methods      //Public methods      /**      * This is a constructor.      * It creates the game and initialise its internal map.      */     public Game() {         dirVocabulary = new DirectionLexicon();         commandVocabulary = new CommandLexicon();         createRooms();           energy = new Energy();         main = new MainActivity();          parser = new Parser(2);  //the parameter 2 here in the call to the constructor of Parser means that in this game         // sentences typed in by the player will contain at most 2 words.     }       /**      * Main play routine.  Loops until end of play.      */     public void play() {         printWelcome();          // Enter the main command loop.  Here we repeatedly read commands and         // execute them until the game is over.          wantsToQuit = false;         hasTheItem = false;         while (!wantsToQuit) {             if (!currentRoom.isSameRoomAs(goalRoom) || !hasTheItem) {                 // && is the logical operator AND                 // ! is the logical operator NOT                 // currentRoom.isSameRoomAs(goalRoom) checks whether we have reached the goal.                 parser.getAndAnalyzeSentence();                 if (parser.lastSentenceLength() > 0) {// Here we know the player has typed in at list 1 word                     if (commandVocabulary.isLexiconWord(parser.word(1))) { // here we know the firs word typed in corresponds to a known command                         if (energy.getEnergy() <= energy.move) { // If the remaining energy is less than the amount required to move, it's over                             main.toUser("You don't have any more energy. You're dead.");   printwelcome() calls that main.toUser() method, and it's also at the end of the pasted code: main.toUser("You don't have any more energy. You're dead").  Any ideas?

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


Consider a non-symmetric coin experiment where $p$ is the probability to get heads. I flip the coin $n$ times and try to estimate the value of $p$. The amount of heads has the binomial distribution so the Fisher information for the distribution parameter $p$ is $$I_p = \frac{n}{p(1-p)}$$ and the variance for an effective estimator is $$D_p = \frac{p(1-p)}{n}.$$ When $p$ is very small one got a very high information and low variance so I need much smaller sample size to get the same accuracy as for the case $p=1/2$.  What is the intuition behind that? Why am I almost certain about the value of $p$ after few throws if it is small?

It confuses/blows my mind that the Binomial has variance proportional to $p(1-p)$. Equivalently, the Fisher information is proportional to $\frac{1}{p(1-p)}$. What is the reason for this? Why is the Fisher Information minimized at $p=0.5$? That is, why is inference most difficult at $p=0.5$?  Context:  I'm working on a sample size calculator, and the formula for $N$, the sample size needed, is an increasing factor of $p(1-p)$, the result of a variance estimation in the derivation.


I  changed my system language to Geez, an Ethiopian language, and I was using it.  But I forgot to reset or change the language setting to English when I logged out.   My intention was to use Geez one time only. Now  I cannot login after rebooting. The language switch keyboard shortcut Super+Space does not switch the language on the login screen. My password is not recognized now because the Geez layout is being used and my password is English. I tried many things through GRUB shell.  I tried to change the language setting using Grub.  I  tried to change, I changed to LANG = en_US.UTF-8 which was LANG=am_ET.UTF-8, LC_ALL=C, LANGUAGE=en_US.UTF-8 which was ET. Most of the environment variables changed to US from ET.   I checked by echo $LANG and it shows the change. But when I reboot the language never change. I am believing the problem is caused after I changed the language.  The desktop is  Gnome.  How can I fix this?

Wow, I've really done it this time. I've locked myself out of my machine.  In preparing for a Cherokee language course, I added the Cherokee keyboard layout to my options. However, I was unable to generate any Cherokee characters by selecting that input device.  I found an article on the web which instructed me to use the dpkg-reconfigure keyboard-configuration command in a terminal.  Once I did that, I rebooted as instructed. Once I was presented with the login screen, I entered my password as usual only for it to fail.  After failing a few times, I gave my attention to what is usually a mundane exercise (i.e., logging in).  While I carefully entered my password, each time, I get the message, "Sorry that didn't work..."  So, I brought up the onscreen keyboard... But the password box displays an asterisk for only the first character of my password.  I attempted to use the direct Unicode input method (ctrl-shift-Uxxxx) but the Cherokee keyboard has no "U" key.  Can anyone please help me troubleshoot this?


I would like to know if there's an easier way than editing each row separately. This should be a quite common problem, when adding additional columns I often stumbled over this issue and always resorted to just editing each row by hand.  Is there any LaTeX editor which perhaps offers additional table editing capabilities?

What is the best way of editing an existing LaTeX table? I need to swap the order of two columns and can't think of an efficient way of doing this.  My table is a long creature of the following structure:  A &     -0.523 &      26.94 &     0.8243 &     0.0000 &     -12.67 \\ B &     -0.614 &      30.02 &     0.8509 &     0.0000 &     -13.12 \\ C &     -0.630 &      32.92 &     0.9254 &     0.0000 &     -21.45 \   I need to change the values so that it is:   A &     26.94 &      -0.523 &     0.8243 &     0.0000 &     -12.67 \\ (etc)   The thoughts that I had were to import it into Excel and to drag columns around, and then use the concatenate() function to produce the number & number structure. I feel like there might be a better way of doing this that I am unaware of.


First i noticed its coming from a nameless extension, i had to reset the browser cause i didn't find a way to uninstall it. Now it came back after at least one PC restart, so there must be malware installing it. The nameless extension is listed in add ons, but is not inside the extensions folder and a search for the ID from the troubleshooting information page didn't find any results. Where else could extensions be stored that are not in the folder/how do they hook onto firefox? I remember i had some weird ad software that i had no idea where it came from, sadly don't remember the name, but i thought it would be done by uninstalling that. I can't spot anything unusual now in programs or services. I appreciate any hints.

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


If we define a random variable $X \sim N(0,1)$ with $\Phi$ being the cdf of a standard normal, what would $E(\Phi(a+bX))$ be?  I was only able to rewrite $\Phi(a+bX)$ as $P(Z\leq aX+b|X)$ with $Z\sim N(0,1)$.  I could also calculate the cdf of $\Phi(a+bX)$  but it doesn't help with its expectation.  Any help would be greatly appreciated.

I am trying to calculate the expected value of a Normal CDF, but I have gotten stuck. I want to find the expected value of $\Phi( \frac{a-bX}{c} )$ where $X$ is distributed as $\mathcal{N}(0,1)$ and $\Phi$ is the standard normal CDF.  I know I can transform $\frac{a-bX}{c}$ to be a normal random variable $\mathcal{N}\left(\frac{a}{c},\frac{b^2}{c^2}\right)$ where $\frac{b^2}{c^2}$ is the variance of the normal random variable. I'm not sure if this helps though.  I think that the expected value of a CDF is $0.5$ but since $\Phi$ is the CDF of a standard normal CDF and $\frac{a-bX}{c}$ is not standard normal I do not think the expected value should be 0.5. I tried integrating the CDF, but I do not believe I did it correctly.  When $a = -2.3338$, $b = 0.32164$, $c = 0.94686$, I believe the correct answer is approximately $0.009803$. I found this through simulation.  I would appreciate any help or suggestions.


Quadratic potential is a good approximation for the minima of smooth functions. This is I think is the reason that simple harmonic motion is so common.  What is the reason behind this?

I've been wondering what makes the  such an important model. What I came up with:   It is a (relatively) simple system, making it a perfect example for physics students to learn principles of classical and quantum mechanics. The harmonic oscillator potential can be used as a model to approximate many physical phenomena quite well.   The first point is sort of meaningless though, I think the real reason is my second point. I'm looking for some materials to read about the different applications of the HO in different areas of physics.


I'm new to bash scripts and I'd like to make a simple progressbar  init pb do stuff pb add 10% do other stuff ...   But, the scripts that'll lunch will print some log, and I don't want the progress bar to disappear, I'd like it to stay at the bottom of the screen. Is that possible ?  thanks a lot,  Arthur  Here is my code :  #!/bin/bash echo 'Welcome to autoIrc' echo 'This will automaticly create a gephi file for you' echo 'I suggest running the script in a screen if you are with ssh' # Are you sure ? location=`pwd` echo "We are in $location. Do you want to install the script there ? [Y/n]" read -p 'Y/n >' confirm if [ $confirm != "Y" ] then     echo "I am exiting"     exit fi clear echo 'Cleaning up...' echo -e "\e[100m" echo "We are in $location." echo "Files list here:" echo `ls ./` echo "File list in ../" echo `ls ../` rm ./ircsnapshot -R echo -e "\e[49m" clear # Okay, now, go on echo 'First, a bit of config' read -p "Please enter the bot nickname >" nickname read -p "Please enter the bot username >" username read -p "Please enter the bot realname >" realname read -p "Now, please enter the number of seconds between commands >" throttle read -p "Please enter the server adress >" server  # Git, python, toilet echo 'Downloading dependencies. You may have to enter your SU password.' echo -e "\e[100m" sudo apt-get update -y && apt-get install -y git python toilet echo -e "\e[49m" clear echo 'Dependencies are now installed.'  # Main script echo 'Cloning the script from github to here' echo -e "\e[100m" git clone https://github.com/bwall/ircsnapshot.git echo -e "\e[49m" cd "./ircsnapshot/ircsnapshot" location=`pwd` echo "We are in $location." echo "Files list here:" echo `ls ./` echo "File list in ../" echo `ls ../` echo -e "\e[41m" rm ./example.png echo -e "\e[49m" clear # GeoIP data echo "I will download the database" echo -e "\e[100m" wget -O geolite.zip http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity-latest.zip echo -e "\e[49m" clear echo 'Download complete. Unzipping' echo -e "\e[100m" unzip geolite.zip -d ./GeoLiteData echo -e "\e[49m"  mv ./GeoLiteData/*/* ./GeoLiteData  clear echo "Is it OK ?" ping -c 1 $server # script clear echo "We are in $location." echo "Files list here:" echo `ls ./` echo "File list in ../" echo `ls ../` echo "I will lunch the script now It will print some lines and take some time'" echo -e "\e[100m" python "./ircsnapshot.py" "-n $nickname" "-u $username" "-r $realname" "$server" echo -e "\e[49m" # 2nd script echo 'Great !' clear echo "I'll now convert the json generated to something readable by gephi" echo "This will take some time" echo -e "\e[100m" sudo chmod +x ./to.gexf.py var=$(./to.gexf.py -m "./GeoLiteData" "UserToLink" "./$server.json") echo -e "\e[49m" clear echo 'Good.' gexf="./$server.gexf" echo "$var" >> "$gexf" echo "Here it is : ./ircsnapshot/ircsnapshot/$gexf" toilet -t --filter gay Finished install ! exit   EDIT : The "duplicate" does not show a progress bar that stays at the bottom of the screen

When scripting in bash or any other shell in *NIX, while running a command that will take more than a few seconds, a progress bar is needed.  For example, copying a big file, opening a big tar file.  What ways do you recommend to add progress bars to shell scripts?


Say I have x = 'abcde'. If I write x[::] I get 'abcde', If I write x[::2] I get 'ace'. So the spaces between the colons implies for the first space, "the start of the list" and for the second space "the end of the list". It's as if you were writing x[0:len(x)] right?   Okay, so when I write x[::-1] I get the list completely in reverse, i.e. 'edcba'. So what are the equivalent values I could substitute in?  x[len(x)-1:0:-1] won't work because the second space is not including that number, so I would get 'edcb' and if I went x[len(x)-1:-1:-1] it would simply do nothing because x[len(x)-1] == x[-1].   Yes, it will always work if I leave the colons in, my confusion comes is what does just having x[::] actually doing, what values is it actually substituting? Because if it were always just "the start of the list and the end of the list" then there's no way it would work for x[::-1], it would simply print nothing, and if it somehow knows to reverse it, then what values is it putting because even if we didn't have the problem of not being able to terminate at the right place (i.e. can't put 0 in the middle space because that wouldn't be include but can't put -1 because that's the end of the list) we have the problem that it should still start at 0, i.e. we should have  aedcb instead?   Can anyone shed light on the behind the scenes magic here?   Thank-you.  (Yes I googled for this, and tried to look it up in the docs and could find no explanation to this specific question)  edit: The answer to my question can be found in the non accepted answer of , namely, .   Thanks guys

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I'm dealing with a quantity that diminishes over time from 100% to 0%.  I'm trying to plot the values, a lm abline, and large indicative points where the graph intersects y==100% and y==0%.  I'm finding the results of lm(y~x) don't appear to be the inverse of lm(x~y) and I'm confused why this should be for a deterministic calculation.  This illustrates in R:  set.seed(100) d = data.frame(t = sort(sample(1:60,10)), q = sort(sample(1:100,10), dec=T))  # linear model - dependant y fit = lm(q ~ t, d)  # predicting x where y == c(100,0) - i.e. dependant x pred = predict.lm(lm(t ~ q, d), data.frame(q=c(100,0)), se.fit=T)$fit pred = data.frame(t = pred, q = c(100,0))  plot.new() plot.window(xlim=c(0,60), ylim=c(0,100)) axis(1); axis(2) points(d) abline(fit) points(pred, pch=16, cex=2, col='red')   Why don't the red points not fall on the line?  I know the modelling/plotting here is probably topsy-turvy, but I'm interested in the principal..

The Pearson correlation coefficient of x and y is the same, whether you compute pearson(x, y) or pearson(y, x). This suggests that doing a linear regression of y given x or x given y should be the same, but I don't think that's the case.   Can someone shed light on when the relationship is not symmetric, and how that relates to the Pearson correlation coefficient (which I always think of as summarizing the best fit line)?


I want to understand special and/or general relativity in details, including computations, space/time curvature, etc. What textbook do you recommend?

What are some good books for learning general relativity?


We would like to configure OS X to only allow Remote File Sharing (SCP) from a specific range of internal IP addresses. That way they only accessible when the user is connected via the VPN.  What's the preferred method? Doesn't seem to be doable via the Security & Privacy tab.

Can someone please tell me how to restrict SSH access only to certain IP ranges (e.g. local network) and not the whole Internet? I guess this has to be done via firewall.


Consider this example:  \documentclass{article} \usepackage{tikz} \usepackage[showframe]{geometry} \usepackage{lipsum} \begin{document} \lipsum[1]  \noindent\begin{tikzpicture} \draw (0,0)--(\linewidth,0); \end{tikzpicture} \end{document}   It gets a warning   Overfull \hbox (0.4pt too wide) in paragraph at lines 8--11    On my viewer, I can't even see the "too wide" part    Of course, it is very difficult to see it, because it is only 0.4pt! However, I don't like having such warnings pop-up, so how to make sure that the line perfectly fits the margin, i.e. set the "inner sep" of the "node" TikZ picture to exactly 0pt?  I know I can use \rule, etc. for this, but I have to draw something more in TikZ, so I use TikZ in the whole picture.  Thank you in advance!  Bonus question: You can see that I am using \noindent. Without modifications to \parindent, are there any better ways to do that?

Why does the following latex document:  \documentclass{minimal} \usepackage{tikz}  \begin{document}     \noindent     \begin{tikzpicture}         \draw (0,0) -- (\textwidth,0);     \end{tikzpicture} \end{document}   give an overfull \hbox of 0.4pt? The line cap option has no effect. An ultra thick line gives a larger overfull \hbox of 1.6pt.  Is there a better (more TikZ-like) way to achieve the same effect, i.e., draw a line to the edge of the text box? Ideally I'd like to do this without scaling the figure.


I am currently working on a single page website. I am trying to retrieve the page content via AJAX.  The page URL is http://mylocalserver/sad/wp/clients.      $.get( 'http://mylocalserver/sad/wp/wp-admin/wp-ajax.php',            {             'action' : 'retrieve_content',            'page_title' : 'clients'           }, function( response ){             if ( !response.error ) {               alert ('AJAX request made! The post title is ' + response.post_title );             } else {               alert ('error: ' + response.error );                 }         });   in my php functions.php      function retrieve_content(){     $page = get_page_by_title( 'clients' );     $content = apply_filters('the_content', $page->post_content);      var_dump($content);     exit();      }   It says Page not found, whereas if I visit the page via URL the content appears. I have hard coded the page title in the PHP function as-well.

I know that jQuery is loaded, because I can switch out the $ for 'jQuery' and everything behaves as expected, but this will be a messy script if I can't fix this  This script:  jQuery(document).ready(function(){     $("ul.vimeo_desc_feed li a").click(function(){         alert($(this).attr('href'));         return false;     }) });   Produces the error $ is not a function  This script:  jQuery(document).ready(function(){     jQuery("ul.vimeo_desc_feed li a").click(function(){         alert(jQuery(this).attr('href'));         return false;     }) });   works fine.


From my understaning, a simple progressive wave is written in the form: $y(x,t)=A \sin(kx \pm wt)$ (or its cossine equivalent) and it is a solution to the equation: $$\frac{\partial^2 y}{\partial x^2}=\frac{1}{c^2}\frac{\partial^2 y}{\partial t^2}$$   In simple examples, the equation can usually be written as a sum of solutions $y(x,t)=A \sin(kx \pm wt)$, and in that case, since the wave equation is linear, the outcome is still a wave (progressive or standing). But what about more complex equations, such as $y(x,t)=A \sin(kx - wt)^2$ or $y(x,t) = \exp(kx - wt)^2$?  Is there any "method" to determine wether they are progressive or stationary waves? Is it sufficient to show that they solve the wave equation and whether they have nodes/antinodes? Or is  there a better way to identify them?

How to determine whether a wave is travelling or standing? I have been told that wave function of the form $f(k_1x \pm k_2t)$ is a travelling wave. But then even a standing wave equation $2A \cos \omega t \sin kx$ can be written as superposition of two waves $$A\sin\frac{kx-\omega t}{2} + A\sin\frac{kx+\omega t}{2}$$ This is of the form $f(k_1x \pm k_2t)$ but still not a travelling wave.  In particular is $y=\cos x \sin t \ + \cos 2x \sin 2t$ a travelling wave?


I've tried to get 2^64 in Google Console.  I got this below:     Math.pow(2,64) = 18446744073709552000 (18,446,744,073,709,552,000)   And I tried another way:    var x = 1; for(var i=1;i<=64;i++){x*=2} console.log(x);     Both two returned the same result.  I felt it's strange that it ends with zero, so I calculated by Windows calculator and then I got the result below:     (((((2^2)^2)^2)^2)^2)^2 = 2^64 = 18,446,744,073,709,551,616.   Why the two results have such error?  I've tried to Google but I have no idea what keywords should I use.  Anything is appreciated and if this is duplicate please tell me.  Thanks.

Is this defined by the language? Is there a defined maximum? Is it different in different browsers?


On my Gmail account I have create a new label named: Work, now I want that when I receive a new email from some specific address (for example: myboss@example.com) these messages are automatically inserted into the Work label.  Can I do this operation? What have I to do?

I would like to set it up so that Gmail labels incoming mail based on which business email of mine the emails are sent to. I have two business emails that come to my Gmail account.  For instance, if someone emails me at example@firstbusiness.com, I would like the email to be automatically labeled first business. If someone emails me at my other email address (which also is forwarded to Gmail), example@secondbusiness.com, I would like that email to be automatically labeled second business.   Is there any way to do this?


I'm running Openbox on Manjaro, and I've come across a peculiarity trying to use write and wall with some friends. I use xfce4-terminal as my preferred terminal emulator, and I was never able to get any messages using these utilities.   If I logged in and did not startx, I could communicate on the base tty just fine. If I used Xterm things worked fine as well. I noticed though, that the xfce terminal does not create a new pts session, and the results of who showed only myself as tty1. However, trying to write or wall to tty1 here was no dice. ssh'ing from somewhere else, or using screen within the xfce terminal gave me a virtual pts, which could be written to.  I did note with w that the user on tty1 was running xinit /home/mmes/.xinitrc -- /etc/X11/xinit/xserverrc :0 vt1 -auth/yadayada all the time. This led me to believe that somehow the xfce terminal is sending commands through the x server somehow, without using a session of its own?  This situation has kind of baffled me, and I would love to hear thoughts why from someone who knows how these graphical terminal emulators actually work, as well as if they know how to write or wall messages there.

When I try to use write to talk to users logged into an X session results vary depending on which terminal they are using. Gnome terminal can pick up writes, but neither lxterminal nor terminator can. The reason is that lxterminal and terminator don't have associated pts devices:  With lxterminal(s) running:  $ who tshaw    tty7         2013-01-27 21:34   With Gnome terminal running:  $ who tshaw    tty7         2013-01-27 21:34 tshaw    pts/1        2013-01-27 22:25 (:0)   (the tty7 entry in the above is the X session)  Is there a way to configure other terminals to take pts devices or would that have to be done in source code?


Suppose that $f$ is homolorphic in a open subset $\Omega$ of $\mathbb{C}$. Why  $$\Re \oint_\gamma \overline{ f(\zeta)}f'(\zeta)d\zeta=0\ ?$$ with $\gamma$ a closed curve in $\Omega$  This is my reasoning: $$\Re \oint_\gamma \overline{ f(\zeta)}f'(\zeta)d\zeta=\oint_\gamma \Re \Big(\overline{ f(\zeta)}f'(\zeta)\Big) d\zeta$$ If we denote $f:=u+iv:\Omega \to\mathbb{C}$ it's easy to prove that: $$\oint_\gamma \Re \Big(\overline{ f(\zeta)}f'(\zeta)\Big) d\zeta=\oint_\gamma u(\zeta)\frac{\partial u}{\partial x}(\zeta)d\zeta +\oint_\gamma v(\zeta)\frac{\partial v}{\partial x}(\zeta)d\zeta $$ I think that we can apply some theorem of real analysis. Any hint?  Many thanks

Suppose that $f$ is analytic on a close curve γ. Prove or disprove   $$\int_\gamma \overline{f(z)}f'(z)dz$$  is purely imagine.  I know that $f$ is analytic on a close curve, then   $$\int_\gamma f(z) dz=0$$  I tried an example with $\gamma =e^{it}$ with $0\leq t\leq 2\pi$, I often get the real part of the integral equal zero.  I tried let $f=u+iv$ so $f'=u_x+iv_x$. Since $f=u+iv$, $\overline{f}=u-iv$  $$\overline{f(z)}f'(z)=uu_x+vv_x+i(uv_x-vu_x)$$  But this doesn't get me anywhere. Any help would be greatly appreciated.


In Bash, how could I create a directory named -p?  mkdir -p failed. mkdir "-p" failed. mkdir "\-p" failed. mkdir \-p failed.

I was wondering how to make a file named as a flag, e.g., if I wanted to make a folder named -a, what commands would do the trick?   I tried mkdir '-a', mkdir \-a, and neither worked. I'm on Ubuntu.


I am accessing a shared memory (that is created in C-code) with a program in C#.  The content of the memory mapped file consists of bytes that represent text that has to be processed with C#.  Encoding issues are not the problem here...  Basically the C-Code writes text into the shared memory and increments a write index (at the beginning of the shared memory) to the next write position. At the end of the memory the index wraps around and begins from 0.   To read in C# I maintain a read index (also at the beginning of the shared memory) and as long as both indices are not equal, I am processing the data in C#. Managing these two indices works, and should not be a matter of this question.   C-Code can only write new data as long as the write index does not equal to the read index - because then data would be lost.     In C# I am using a MemoryMappedFile object, and access the bytes with a MemoryMappedViewAccessor object. From this view accessor I get an IntPtr:  This code is an excerpt from my project, it works as expected...  public MemoryMappedFile mmf; public MemoryMappedViewAccessor mma; public byte* pointer; public void Init() {     mmf = MemoryMappedFile.OpenExisting("MyFileMappingObject", MemoryMappedFileRights.ReadWrite);     mma = mmf.CreateViewAccessor(0, 0, MemoryMappedFileAccess.ReadWrite);     mma.SafeMemoryMappedViewHandle.AcquirePointer(ref pointer);  }   I tried to use stream access to the shared memory but this was slower than using unsafe IntPtr variables.  The bytes have to be read out and converted to a C# string. Because I have to do some interpreting and reformatting, i can not simply take all bytes and convert them in a single step to a C# String.  So I end up with many calls of adding a C# string to an existing one:  string zeile = string.Empty; while (!eof()) {     string newpart = GetTextFromSharedMemory(); // this works fine     zeile = zeile + newpart;  // Makes problems }   If I meassure the time for a certain amount of text to be processed (a single walk through the whole shared memory) , GetTextFromSharedMemory() alone may take around 50 milliseconds. So this is not a bottle neck.   As soon as i add the newpart string to the zeile string my processing time raises up to 5 to 6 seconds ( while I processed about 4 198 528 bytes of data in the shared memory, this roughly 2048 lines of 2048 bytes)   This means 100 times longer than only reading from shared memory.   How can I make these string concatenations more efficient? I tried to read out the text parts as byte and concatenate lists of bytes together before converting them to strings. This helps a lot, but I would have to work on single bytes for interpreting and reformating...  Allocating and disposing many strings during execution time may trigger the Garbage Collector and this could als have a negative impact on performance.   Because processing time in C# is that "bad", the shared memory eventually gets filled up, and then the C-Code would have to wait for it to get emptied befor adding more data. But this would affect performance of other processes...

What's the most efficient way to concatenate strings?


Windows8.1 is pre-installed in a 500GB HDD and then also installed Ubuntu14.04 in the second 256GB SSD for dual booting. Since planning to use Ubuntu as main OS, I want to store files in the larger space in the HDD while running OS from the SSD.   Now should I make a partition in the 500GB HDD for such storage purpose? If I make a folder, say 'LinuxStorage', as in 'C:/Users/UserProfile/LinuxStorage' and store all Linux files and folders in it, could it cause any problem? Thanks

I use wubi to install Ubuntu 10.10 on my ntfs partition. So I want to change the home folder to a folder on the ntfs partition. I could keep the personal configuration, software and so on after reinstalling the Ubuntu.  So I use ntfs-config to manage the disk partition, it's mounted when system is startup. And the permission of all files and directories are 777.  Then I modified the /etc/passwd to set the home folder to the folder on the ntfs partition. I can successfully login the account, however it looks like the .bashrc and .profile are not loaded correctly. I can't use the input method(even can't configure ibus), no sound device. However everything works well after changing the home folder back to /home/.  Could anybody give me a hint to make it work? Thanks.


I have bought a new laptop (acer notebook) with windows 10, but I can't install ubuntu 16.04 on it. When I make a bootable usb flash drive (by Rufus) and I put it in the flash drive, then pressing f12, the usb is not being recognized and the installation process doesn't start.  Please help

This is the third time I've tried to install Ubuntu Server 14.04.03 64-bit on the same laptop, and each time it caused different problems.  Each time I wrote the same iso image to a USB flash drive by using a different application and OS.   Universal USB Installer (pendrivelinux.com) from Windows WinImage writer from Windows built-in image writer from Linux Mint 17.2    The iso image is the same in all three cases, the USB flash drive is the same, and the laptop is the same. However each time the installation of Ubuntu gave me different installation options. For example, the last time I installed Ubuntu, it didn't show all the packages to choose while installing (Basic Ubuntu server, etc.).


I have a Python script which   calls a function foo which imports and uses module my_module  does some lengthy calculations calls a function bar which also imports and uses module my_module   If my_module.py is changed at some point during step 2, will bar always use the same my_module that was used in  foo ?  What if I run another Python script during step 2. that also imports my_module?  I created the toy scenarios above, and it seems like my_module indeed stays the same for all its calls in the original Pythons script, but I'd like to have a guarantee for that or know situations in which it could fail.  (Background: This is for scientific software development. I write an algorithm, commit to git, run it to see if it works and what it produces, and while waiting for it to finish continue working on its source. If I don't like the results, I'd like to know what exact source was responsible for the results.)

I have a long-running Python server and would like to be able to upgrade a service without restarting the server. What's the best way do do this?  if foo.py has changed:     unimport foo  <-- How do I do this?     import foo     myfoo = foo.Foo()


The recently discovered ShockShell vulnerability affects many Linux and Mac systems, because they are using the vulnerable BASH shell.  How do I know if I am vulnerable to this attack and how do I protect myself from it?

Recently, there have been news going around regarding "CVE-2014-6271" (See ), which is a vulnerability in Bash. How do I know if I am affected by this, how can I fix it, and why should I care?  This is designed as a canonical answer for this vulnerability, due to its scope and severity.


I recently moved from DSL to Cable. I have a 'dumb' cable modem, but a 'smart' DSL modem (two actually). What I would like to do is to connect the cable modem to one of the lan ports of the DSL modem (the internet port of the DSL modem is a DSL line obviously) and have it act as the DHCP and wireless router.  The modem in question is an ActionTec GT784WN.  The closes answer I've found seems to be , but it seems to be discussing using the modem/router as a wireless access point instead of as a router.

I have purchased  a while back when I was connecting to my first ISP via ADSL.  Now, I have changed the ISP to a cable company and am having trouble setting up the router to connect to the new cable modem.  The Internet works, but only in bridge mode, i.e. my PC gets a public IP, and isn't part of the 192.168.1.0 network (and can't be accessed by other PCs in the network) which is what I want - I want the router to have the NAT and the clients behind it to have access to the Internet, but with 192.168.1.0 addresses.  The setup is pretty simple - from cable modem one network cable to router, from router another network cable to PC.  When I configure the router to use Encapsulation - Bridged (VC Mux), my PC gets the public IP and the Internet works. When I configure it to use a routed connection (either LLC or VC Mux) I do get the local IP but no Internet (regardless of the NAT setting)  The router also has diagnostics, status, ping etc, but nothing I change in the PVC settings enables the Internet.  Is what I'm trying even possible? If so, how can I do it? What am I missing?


How do I create template file for view field, My view machine name is page_search and field name is room type.

There is a lot about theming custom blocks, but what about blocks created by views?  My views block has id: block-views-posts-listing-block,  I try many ways for naming template file, ex: block--block--views-posts-listing-block.tpl.php, but I can't find correct file name.


I’ve completed the quest ‘Find the word of power at Archwind’ , but the text is still there in the miscellaneous. What to do?

When I picked up the word of power at Arcwind Point, the quest didn't get removed from my quest log. If I select it, the arrow still points to the wall even though there is no word to collect anymore. The monks at High Hrothgar won't give me a new word power quest since they don't realize that I finished this one.  I can see in the Unofficial Elder Scrolls pages that this is a known issue.   My question is now, is there anything I can do about it? I don't want to reload a previous save since I have done much since it happened. I didn't realize until hours afterwards what had happened.   Note: I am on Xbox 360 so the Unofficial Dawnguard Patch is not an option.


This happend when I try to install amavisd-new on Ubuntu 20.04: mandi@rez-latitude:~$ sudo apt-get install -y amavisd-new Reading package lists... Done Building dependency tree        Reading state information... Done The following additional packages will be installed:   libberkeleydb-perl libconvert-binhex-perl libconvert-tnef-perl   libconvert-uulib-perl libio-multiplex-perl libmime-tools-perl   libnet-cidr-perl libnet-server-perl libunix-syslog-perl pax Suggested packages:   apt-listchanges arj dspam lhasa libnet-ldap-perl libsnmp-perl libzeromq-perl   lzop nomarch rpm altermime ripole liblog-log4perl-perl The following NEW packages will be installed:   amavisd-new libberkeleydb-perl libconvert-binhex-perl libconvert-tnef-perl   libconvert-uulib-perl libio-multiplex-perl libmime-tools-perl   libnet-cidr-perl libnet-server-perl libunix-syslog-perl pax 0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/1,380 kB of archives. After this operation, 4,952 kB of additional disk space will be used. Selecting previously unselected package libberkeleydb-perl:amd64. (Reading database ... 283931 files and directories currently installed.) Preparing to unpack .../00-libberkeleydb-perl_0.62-1build1_amd64.deb ... Unpacking libberkeleydb-perl:amd64 (0.62-1build1) ... Selecting previously unselected package libconvert-binhex-perl. Preparing to unpack .../01-libconvert-binhex-perl_1.125-1_all.deb ... Unpacking libconvert-binhex-perl (1.125-1) ... Selecting previously unselected package libmime-tools-perl. Preparing to unpack .../02-libmime-tools-perl_5.509-1_all.deb ... Unpacking libmime-tools-perl (5.509-1) ... Selecting previously unselected package libconvert-tnef-perl. Preparing to unpack .../03-libconvert-tnef-perl_0.18-1_all.deb ... Unpacking libconvert-tnef-perl (0.18-1) ...  ...... Selecting previously unselected package libconvert-uulib-perl. Setting up libnet-server-perl (2.009-2) ... Setting up amavisd-new (1:2.11.0-6.1ubuntu1) ... Creating/updating amavis user account... Job for amavis.service failed because the control process exited with error code. See "systemctl status amavis.service" and "journalctl -xe" for details. invoke-rc.d: initscript amavis, action "start" failed. ● amavis.service - LSB: Starts amavisd-new mailfilter      Loaded: loaded (/etc/init.d/amavis; generated)      Active: failed (Result: exit-code) since Sun 2020-10-18 09:50:03 CEST; 6ms ago        Docs: man:systemd-sysv-generator(8)     Process: 412289 ExecStart=/etc/init.d/amavis start (code=exited, status=1/FAILURE)  Oct 18 09:50:03 rez-latitude amavis[412289]: Starting amavisd: Oct 18 09:50:03 rez-latitude amavis[412301]:   The value of variable $myhostname is "rez-  latitude", but should have been Oct 18 09:50:03 rez-latitude amavis[412301]:   a fully qualified domain name; perhaps  uname(3) did not provide such. Oct 18 09:50:03 rez-latitude amavis[412301]:   You must explicitly assign a FQDN of this  host to variable $myhostname Oct 18 09:50:03 rez-latitude amavis[412301]:   in /etc/amavis/conf.d/05-node_id, or fix what  uname(3) provides as a host's Oct 18 09:50:03 rez-latitude amavis[412301]:   network name! Oct 18 09:50:03 rez-latitude amavis[412289]: (failed). Oct 18 09:50:03 rez-latitude systemd[1]: amavis.service: Control process exited,  code=exited, status=1/FAILURE Oct 18 09:50:03 rez-latitude systemd[1]: amavis.service: Failed with result 'exit-code'. Oct 18 09:50:03 rez-latitude systemd[1]: Failed to start LSB: Starts amavisd-new mailfilter. dpkg: error processing package amavisd-new (--configure):  installed amavisd-new package post-installation script subprocess returned error exit  status 1 Processing triggers for man-db (2.9.1-1) ... Processing triggers for ureadahead (0.100.0-21) ... Processing triggers for systemd (245.4-4ubuntu3.2) ... Errors were encountered while processing:  amavisd-new E: Sub-process /usr/bin/dpkg returned an error code (1)  Can somone explain why this happend?

I am running Ubuntu 16.10 and trying to set up postfix. But my amavis installation is not happening smoothly.  apt upgrade   gives  Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up amavisd-new (1:2.10.1-4ubuntu1) ... Creating/updating amavis user account... Job for amavis.service failed because the control process exited with error code. See "systemctl status amavis.service" and "journalctl -xe" for details. invoke-rc.d: initscript amavis, action "start" failed. amavis.service - LSB: Starts amavisd-new mailfilter Loaded: loaded (/etc/init.d/amavis; generated; vendor preset: enabled Active: failed (Result: exit-code) since Mon 2016-11-14 19:56:05 IST; 9ms ago Docs: man:systemd-sysv-generator(8) Process: 5465 ExecStart=/etc/init.d/amavis start (code=exited, status=1/FAILURE) Nov 14 19:56:05 lenovo amavis[5465]:   The value of variable $myhostname is...en Nov 14 19:56:05 lenovo amavis[5465]:   a fully qualified domain name; perha...h. Nov 14 19:56:05 lenovo amavis[5465]:   You must explicitly assign a FQDN of...me Nov 14 19:56:05 lenovo amavis[5465]:   in /etc/amavis/conf.d/05-node_id, or...'s Nov 14 19:56:05 lenovo amavis[5465]:   network name! Nov 14 19:56:05 lenovo amavis[5465]: (failed). Nov 14 19:56:05 lenovo systemd[1]: amavis.service: Control process exited, ...=1 Nov 14 19:56:05 lenovo systemd[1]: Failed to start LSB: Starts amavisd-new ...r. Nov 14 19:56:05 lenovo systemd[1]: amavis.service: Unit entered failed state. Nov 14 19:56:05 lenovo systemd[1]: amavis.service: Failed with result 'exit...'. Hint: Some lines were ellipsized, use -l to show in full. dpkg: error processing package amavisd-new (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: amavisd-new E: Sub-process /usr/bin/dpkg returned an error code (1)   How can I fix this?


Is there a way to copy the first line in a text file to the end of every line? - could include copying line 1 to the end of line 1 if it simplifies things.   I have:   __1  2  3   I want:    1  2__1  3__1   or    1__1  2__1  3__1   It has to be easily modified to handle multiple files.  Any suggestions?  Big thanks.

I'm trying to append the first line of a file at the end of each line with a single sed command:  Example:  line 1 line 2 line 3 line 4   should become:  line 1 line 1 line 2 line 1 line 3 line 1 line 4 line 1   How can I do it?


Through some way I have completely erased all accounts from my laptop. When I try to add a new admin account it asks for the root password. I've tried my password from my previous account and it didn’t work. What do I do to get an admin account back?  Edit: I'm logged in through a guest account right now.  Edit: I have access to recovery mode but I'm not Sure how to get into the root account.  Hasiya Rulzz, I tried this but I don't have any accounts to change the password on and it didn't work with the root account.  Edit: I am not able to download the rescue cd

I clean-installed Ubuntu 11.10 today, and then installed VirtualBox.  This required me to add myself to the vboxusers group, and since 11.10 seems to no longer have a graphical app to add users to a group, I ran the following command:  sudo usermod -G vboxusers stephane   This is a problem.  I now see what I should have run instead is:  sudo usermod -aG vboxusers stephane   The end result is I'm no longer in the groups I should be in.  Including whatever group is required to run "sudo".  When I run any command as sudo now, I get the following:  $ sudo ls [sudo] password for stephane:  stephane is not in the sudoers file.  This incident will be reported.   Is there a way to fix this, or do I need to re-install from scratch again?


Photons which constitute X-rays and gamma rays have a significantly higher energy than those which constitute the visible light. If they have so much more energy, why do they travel at the same speed as photons of visible light. If we add energy to particles such as electrons, we can make them move faster. For example, if we give energy of the order of 220,000 eV to an electron, we can make the electron attain speeds of 90% the speed of light. Why does the same rule not apply to photons?

My question is not about why speed of light has a particular constant value which has been sufficiently addressed in other questions on SE already. I want to know whether the fact that speed of light has to be constant is a consequence of other fundamental laws of Universe, or is it just a fundamental law itself.  My motivation for asking this question is thinking about Special Theory of Relativity. One way of understanding why time dilation and length contraction happen is to look at it from the perspective of constancy of speed of light. Alice who is on the moving source of light and Bob, a fixed observer see the speed of light as constant. In order for Alice to see the speed of light as a constant value, time slows down and length expands (in forward direction) thus keeping the speed constant.   In the  I'm doing, the Professor tells that this constancy of speed of light could be more generally referred to as, "Principle of wave constancy". That is, the speed of any wave is a property of the medium (and thus it remains constant). So, the speed of a wave in water, for example, remains constant even if the source of the waves (say a paddle keeps moving). Frequency and wavelength may change but the speed remains constant. In a similar fashion, light is an electromagnetic wave and thus its speed is constant. And the constant speed is defined by the medium (which happens to be vaccum i.e., no medium for light).   My questions are twofold now -    Is the above reasoning correct to explain why speed of light is constant? (i.e., thinking of it as constancy of any wave in general) Theoretically, could there be other waves that could travel through vaccum at a different speed? If yes, time dilation and length contraction will have to be different.   I'd appreciate it if the answer is kept non-technical (essential math is okay). More importantly, I request you to try and explain without using General Theory of Relativity. Because I'm thinking how the scientific understanding by 1905 had already knew that speed of light has to be constant.


I have written two file.m, I want to compare it, in Notepad, I can use a split view in the same window.

I know some other text editors like Notepad++ enable split pane to edit to files side by side.  Is there any way I can add this functionality to Gedit?


I'm using redhat 7. My user is not a root user, and the root user can't run the commands in the bash script file. I added the command that runs the script in crontab -e but it doesn't run. However if I run the script from command line it works, what to do ?

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


I just bought a new bike. I ride about 3 times a week. The last 2 times I've taken my bike out the front tire has been completely flat. I put air in it the first time it happened and went for a 10mi ride and the tire was still fine. Then next morning it was flat again (same thing the 2nd time).. I recently got into riding and I have no clue about the maintenance and fixing my bike. Any help would be greatly appreciated.

I ride my cruiser to the supermarket and back, using either a trailer or a basket over the front wheel for carrying groceries. The bike has developed a persistent slow leak on the front wheel, and I've replaced the tube without it helping. I can't see anything puncturing the tire, and the spokes aren't poking through the rim tape that I can see.   These are 26" wheels with low pressure (around 40 - 50 psi). What else can I look for that might be causing this?


public void traverseRowLR(String [] list, String [] key, String pool)    {        pool = "left to right";       ArrayList<Location> obj = new ArrayList<Location>();       for(int i = 0; i<key.length; i++)       {          for(int a=0;a<list.length;a++)             if(list[a].indexOf(key[i])>-1)                finalList.add(new Location(key[i],a+1,list[a].indexOf(key[i]),pool));               }     }   That above is the method. The error is on the line of the second for loop.  Heres another place the error is mentioned:   public MazeAH(String [] key, String [][] wordBank)    {       maze = wordBank;       answer = key;     }   //other methods      public ArrayList<Location> solve()    {         mergeRow(maze, rowWords);       mergeCol(maze, colWords);          traverseRowLR(rowWords, answer, horizontal);       traverseRowRL(rowWords, answer, horizontal);       traverseRowTB(colWords, answer, vertical);       traverseRowBT(colWords, answer, vertical);        return finalList;    }         The error is in the line:   traverseRowLR(rowWords, answer, horizontal);   Finally, heres the driver program, sorry if im posting too much code, im not sure what's necessary: The goal of this program is to merge rows and columns together into Strings, and then search for words in the "key" word bank. I originally completed this project using non-void methods, but my professor wants me to redo it with void methods.  import java.util.*;  public class SolveWordSearchAH {     public static void main(String [] args)    {        String [][] letters = {{"e","p","l","i","r","q","k","o","s","a"},                         {"u","k","i","e","s","y","x","c","n","f"},                         {"c","p","o","z","g","f","q","a","y","r"},                         {"p","e","m","c","z","a","n","t","e","i"},                         {"g","u","g","q","t","a","b","r","h","e"},                         {"g","i","q","v","b","e","d","b","s","s"},                         {"c","o","f","f","e","e","i","l","r","q"},                         {"h","r","e","t","a","w","b","d","e","l"},                         {"y","q","o","k","w","v","p","x","h","z"},                         {"c","d","n","t","f","q","k","b","p","w"}};        String [] key = {"coffee", "water", "taco", "hershey", "fries"};       //can have another key array if needed-depends on your implementation        MazeAH m=new MazeAH(key, letters);       ArrayList<Location> answer=m.solve();       System.out.println(answer);     } }    My variables are declared here:  private ArrayList<Location> finalList = new ArrayList<Location>();    private String [][] maze;    private String [] answer;    private String vertical="";    private String horizontal = "";     private String [] rowWords;    private String [] colWords;   Here is the error in the compile log:  Exception in thread "main" java.lang.NullPointerException     at MazeAH.mergeRow(MazeAH.java:117)     at MazeAH.solve(MazeAH.java:26)     at SolveWordSearchAH.main(SolveWordSearchAH.java:24)   Heres MergeRow:   public void mergeRow(String[][] letters, String [] words)    {       String []temp = new String [letters.length];       for(int i=0; i<letters.length; i++)       {          temp[i]="";          for(int a=0; a<letters[0].length; a++)          {             temp[i]+=letters[i][a];          }       }       for(int s = 0; s<temp.length; s++)       {       temp[s] = words[s];       }     }   Heres the updated trace:  Exception in thread "main" java.lang.NullPointerException     at MazeAH.mergeRow(MazeAH.java:117)     at MazeAH.solve(MazeAH.java:26)     at SolveWordSearchAH.main(SolveWordSearchAH.java:24)

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


What is the difference between the following two statements though both are apparently used to load the xml configuration?  ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");   and  Resource resource = new ClassPathResource("applicationContext.xml"); BeanFactory factory = new XmlBeanFactory(resource);   Is there any difference (wrt performance, usage) between these two?

I'm pretty new to the Spring Framework, I've been playing around with it and putting a few samples apps together for the purposes of evaluating Spring MVC for use in an upcoming company project. So far I really like what I see in Spring MVC, seems very easy to use and encourages you to write classes that are very unit test-friendly.  Just as an exercise, I'm writing a main method for one of my sample/test projects. One thing I'm unclear about is the exact differences between BeanFactory and ApplicationContext - which is appropriate to use in which conditions?  I understand that ApplicationContext extends BeanFactory, but if I'm just writing a simple main method, do I need the extra functionality that ApplicationContext provides? And just exactly what kind of extra functionality does ApplicationContext provide?  In addition to answering "which should I use in a main() method", are there any standards or guidelines as far as which implementation I should use in such a scenario? Should my main() method be written to depend on the bean/application configuration to be in XML format - is that a safe assumption, or am I locking the user into something specific?  And does this answer change in a web environment - if any of my classes needed to be aware of Spring, are they more likely to need ApplicationContext?  Thanks for any help. I know a lot of these questions are probably answered in the reference manual, but I'm having a hard time finding a clear breakdown of these two interfaces and the pros/cons of each without reading thru the manual with a fine-tooth comb.