I wanted to draw a simple protocol flow using the tikz package. However, I got some errors and really don't know how to deal with them.  Here's the code in LaTeX:  \documentclass[12pt]{article} \usepackage{tikz} \usepackage{tkz-base,tkz-fct} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{graphicx} \usepackage{psfrag} \usepackage{amsmath} \usepackage{msc} \begin{document}  \begin{figure*}[!h] \center \resizebox{12cm}{!} { \begin{msc}{$IJS_{NK, dec/enc}$} \small \setlength{\instwidth}{1.7 cm} \setlength{\instdist}{2.3 cm} \setlength{\bottomfootdist}{0.2 cm} %\setlength{\instwidth}{2 cm} %\setlength{\instdist}{3.75 cm} \setlength{\envinstdist}{1.2 cm} \setlength{\topheaddist}{0.5 cm} \instfoot  \declinst{I}{\scriptsize new node}{$I$}  \declinst{R}{\scriptsize neighbour node}{$R$} \declinst{J1k-1}{\scriptsize intermediate nodes}{$J_{1:k-1}$} \declinst{Jk}{\scriptsize \:\: intermediate node}{$J_{k}$} \declinst{S}{\scriptsize Sink}{$S$}  % left to right messages \mess{$m_1 = \{n_I, I, R\}_{K_{DH}(I,S)}$}{I}{R} \nextlevel \mess{$\{n_R, m_1\}_{NK}$}{R}{J1k-1} \nextlevel \mess{$\{n_{J_{k-1}}, ..., n_{J_1}, n_R, m_1\}_{NK}$}{J1k-1}{Jk} \nextlevel \mess{$\{n_{J_k}, ..., n_{J_1}, n_R, m_1\}_{NK}$}{Jk}{S} \nextlevel  % right to left messages \nextlevel \mess{$\{n_{J_k}, ..., n_{J_1}, n_R, m_2\}_{NK}$}{S}{Jk} \nextlevel \mess{$\{n_{J_{k-1}}, ..., n_{J_1}, n_R, m_2\}_{NK}$}{Jk}{J1k-1} \nextlevel \mess{$\{n_R, m_2\}_{NK}$}{J1k-1}{R} \nextlevel \mess{$m_3$}{R}{I} %\nextlevel \end{msc} } \fbox{ \begin{minipage}{11.5 cm} $m_2 = \{pk(I), \{n_I, I, R, S\}_{K_{DH}(I,S)}\}_{K_{DH}(R,S)}$\\ $m_3 = \{K(R,I), \{n_I, I, R, S\}_{K_{DH}(I,S)} \}_{pk(I)}$ \end{minipage}  } \caption{$IJS_{NK, dec/enc}$: Proof by Induction.} \label{figure : IJS-NK-dec-enc Induction} \end{figure*}  \end{document}   I compile it in console using: pdflatex -synctex=1 -interaction=nonstopmode toc.tex.  My pdflatex version is:  pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) kpathsea version 6.1.1 Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). There is NO warranty.  Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the pdfTeX source. Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). Compiled with libpng 1.2.49; using libpng 1.2.50 Compiled with zlib 1.2.8; using zlib 1.2.8 Compiled with poppler version 0.24.5   However, I'm using it "inside" TeXMaker on Kubuntu 14.04.  pdflatex -synctex=1 -interaction=nonstopmode toc.tex &gt; errors.txt:  Here's the *.log file: , and the errors .  xelatex toc.tex &gt; xelatexerrors.txt:     latex toc.tex &gt; latexerrors.txt:    Adding \usepackage[pdf]{pstricks} produced an empty pdf (I did pdflatex -synctex=1 -interaction=nonstopmode toc.tex &gt; errors.txt), here're the erros:
I have a problem with this file tex:  \begin{document} \begin{figure} \begin{center} \begin{pspicture}(0,0)(1,3.8) \psline{-&lt;}(0,0)(0,.2) \psline{-}(0,.2)(0,.4) \psline{*-&gt;}(0,.4)(0,.9) \psline{-*}(0,.9)(0,1.4) \psline{-&lt;}(0,1.4)(0,2.4) \psline{-}(0,2.4)(0,3.4) \psline{*-}(0,3.4)(0,3.6) \psline{&gt;-}(0,3.6)(0,3.8) \rput(1,.4){$y=0$}%testo \rput(1,1.4){$y=1$} \rput(1,3.4){$y=3$} \end{pspicture} \end{center} \caption{} \end{figure} \end{document}   but I don't understand where is the error.
Image with axis Creating a new DOM element from an HTML string using built-in DOM methods or Prototype I have an HTML string representing an element: '&lt;li&gt;text&lt;/li&gt;'. I'd like to append it to an element in the DOM (a ul in my case). How can I do this with Prototype or with DOM methods?  (I know i could do this easily in jQuery, but unfortunately we're not using jQuery.) Blending colors in photoshop and illustrator I am working on a print for my wall and I am trying to create something like this:      I have already created the letters in Illustrator and now I am adding the colors in Illustrator and then exporting everything to Photoshop and then using the liquify tool to blend the colors to create a similar effect. I also used the healing patch tool to blend in the hard edges.  Is that the right way of doing it? Or is there another way? How to prove $ \prod_{d|n} d= n^{\frac{\tau (n)}{2}}$ How to tell a lambda function to capture a copy instead of a reference in C#? I've been learning C#, and I'm trying to understand lambdas.  In this sample below, it prints out 10 ten times.  class Program {     delegate void Action();     static void Main(string[] args)     {         List&lt;Action&gt; actions = new List&lt;Action&gt;();          for (int i = 0; i &lt; 10; ++i )             actions.Add(()=&gt;Console.WriteLine(i));          foreach (Action a in actions)             a();     } }   Obviously, the generated class behind the lambda is storing a reference or pointer to the int i variable, and is assigning a new value to the same reference every time the loop iterates.  Is there a way to force the lamda to grab a copy instead, like the C++0x syntax  [&amp;](){ ... } // Capture by reference   vs.  [=](){ ... } // Capture copies Use parameter expansion to modify output of another expansion I'm trying to use the Bash parameter expansions to modify the output of a command substitution or another parameter expansion. The following nested expansions work quite well in Zsh; but result in a &quot;bad substitution&quot; error in Bash: ${${PWD##*/}//trunk/latest}  or ${$(basename $PWD)//trunk/latest}  the output should be the last folder of the $PWD, replaced by latest when my current directory is trunk so /home/user/trunk should become latest Is there a Bash equivalent allowing to chain expansions without relying on variables or pipes? Or do Bash expansions only allows the input to be a string or a plain variable? Fonts larger than \Huge? How can I make text that is larger than the size of the output of {\Huge ...}?   I would like to be able to make text arbitrarily large (even if that is done by some suboptimal scaling routine). Is it true that the order of $ab$ is always equal to the order of $ba$? change environment of a running process How might it be possible to alter some variable in the env of an already running process, for example through /proc/PID/environ? That "file" is read-only.  Need to change or unset the DISPLAY variable of a long-running batch job without killing it. Why can't I destroy or place blocks? I'm playing on a Survival world with cheats on, "easy" difficulty, and at night in-game. I didn't have a sword or anything to make a sword with, and I was starving, so I switched to Creative to give myself a stack of food and a bed to set my spawn point. When I switched back to Survival, I couldn't destroy or place blocks. I'm on single player, and my Internet is fine, and I can destroy blocks still if I switch to creative. I've tried resetting the button one, and reloading the map, and it still doesn't work. I've even tried deleting everything I gave myself in Creative. This happened before on a different world and I ended up deleting it.  This only happens on this world. How do I fix it?  If I know I'm in the correct game mode, what else can cause this?  Are there different causes in multiplayer? How to revert uncommitted changes including files and folders? How do you apply a QgsExpression to a Label ?   I can do it in QGIS with this simple expression  concat('N:' ,round(Value,0),'\n','Yield:' ,round(Value 2,0))  N: 65   Yield: 40  How do I do it in PyQGIS ? I see a getLabelExpression but no setLabelExpression  This works but I want but only for the field name    crap = QgsVectorLayer("D:/data.shp", "data", "ogr")  QgsMapLayerRegistry.instance().addMapLayer(crap)  palyr = QgsPalLayerSettings()  palyr.readFromLayer(crap)  palyr.enabled = True  palyr.fieldName = 'Name'  palyr.placement= QgsPalLayerSettings.OverPoint  palyr.setDataDefinedProperty(QgsPalLayerSettings.Size,True,True,'8','')  palyr.writeToLayer(crap) Is there an easy way to create ordinals in C#? How to prove the function is a constant Let $f\in C[0,1]$ be such  that $\forall \phi\in C[0,1]$ with $\int_0^1\phi \, dx=0$,we have $\int_0^1f\phi \, dx=0$.  Then $f$ is constant.  May be someone can help me proof this problem. Thanks! Why aren't people voting for questions? Disable password request from suspend - 18.04 How can I create an executable JAR with dependencies using Maven? What is it used for and why  doesn't it equal $\log{x^2}$? What is the difference between sector and cluster? I have gone through wikipedia and other sites and here's the information I have obtained.  Sector: Smallest Addressable Unit (mostly 512 bytes) Cluster: Smallest Allocation Unit (equals to 1 or more sectors and the number of clusters depends on the file system).  Let's say in the below example:  sector =512 bytes and a cluster =8 sectors=4096 bytes. Now, I am having a hard time figuring out, when I am trying to create a file what does the file system do? Does it consider 4096 bytes as the smallest write/read unit or 512 bytes?  If the answer is 4096 bytes: When the manufacturer of the disk drives has provided 512 bytes as the smallest addressable unit, why does the file system consider cluster as the smallest unit? I mean, what are the advantages in doing so? example:   Does Chocolatey run the native program installer? If I prefer simplicity, should I avoid packages with (Install) in their name?