I have a bar chart that looks like this:    Here is the code that I used to generate the plot:  \begin{tikzpicture} \begin{axis}[     enlarge x limits=0.03,     every axis plot post/.style={/pgf/number format/fixed},     ybar=1pt,     ylabel=F1 Score,      xlabel=objects,     bar width=10pt,     x=0.45cm,     ymin=0,     axis on top,     ymax=1,     xtick= \empty,     xticklabel style={rotate=-90,  xshift=0.2cm},    symbolic x coords={barkely hide bones, cherokee easy tee-shirt, clorox utility brush,  cloud b plush bear, command hooks, cool shot glue sticks,                 crayola 24 ct,                         creativity chenille stems ,             dasani water bottle,                  dove beauty bar,                       dr browns bottle brush,               easter turtle sippy cup ,             elmers washable no run school glue ,    expo dry erase board eraser ,          fiskars scissors red,                fitness gear 3lb dumbbell,         folgers classic roast coffee, hanes tube socks,                       i am a bunny book,       jane eyre dvd,                    kleenex paper towels,  kleenex tissue box, kyjen squeakin eggs plush puppies, laugh out loud joke book, oral b toothbrush green, oral b toothbrush red, peva shower curtain liner, platinum pets dog bowl, rawlings baseball, rolodex jumbo pencil cup, safety first outlet plugs, scotch bubble mailer, scotch duct tape, soft white lightbulb, staples index cards, ticonderoga 12 pencils, up glucose bottle, womens knit gloves, woods extension cord  },     visualization depends on=rawy\as\rawy, % Save the unclipped values     after end axis/.code={ % Draw line indicating break             \draw [ultra thick, white, decoration={snake, amplitude=2pt}, decorate] (rel axis cs:0,1.05) -- (rel axis cs:1,1.05);         },     nodes near coords={%             \pgfmathprintnumber{\rawy}% Print unclipped values         }, every node near coord/.append style={font=\tiny, inner sep=1pt,rotate=90,xshift=0.3cm},     axis lines*=left,     clip=false     ] \addplot coordinates { (barkely hide bones,0.8780) (cherokee easy tee-shirt,0.8210) (clorox utility brush,0.8210) (cloud b plush bear,0.8360) (command hooks,0.8770)  (cool shot glue sticks,0.7930)                  (crayola 24 ct,0.8110)                          (creativity chenille stems ,0.7610)              (dasani water bottle,0.7960)                   (dove beauty bar,0.7400)                        (dr browns bottle brush,0.9400)                (easter turtle sippy cup ,0.8790)              (elmers washable no run school glue ,0.8380)     (expo dry erase board eraser ,0.8240)           (fiskars scissors red,0.4780)                 (fitness gear 3lb dumbbell,0.7630)          (folgers classic roast coffee,0.8980)  (hanes tube socks,0.8890)                        (i am a bunny book,0.9060)        (jane eyre dvd,0.8930)                     (kleenex paper towels,0.8880) (kleenex tissue box,0.9420)  (kyjen squeakin eggs plush puppies,0.8600)  (laugh out loud joke book,0.8940)  (oral b toothbrush green,0.7460)  (oral b toothbrush red,0.6790)  (peva shower curtain liner,0.9160)  (platinum pets dog bowl,0.9170)  (rawlings baseball,0.8580)  (rolodex jumbo pencil cup,0.9260)  (safety first outlet plugs,0.8340)  (scotch bubble mailer,0.8940)  (scotch duct tape,0.8100)  (soft white lightbulb,0.8410)  (staples index cards,0.8470)  (ticonderoga 12 pencils,0.9500)  (up glucose bottle,0.7860)  (womens knit gloves,0.8870)  (woods extension cord,0.8880) };  \end{axis} \end{tikzpicture}   I want the bars to be sorted automatically based on the y value. Could someone please help in figuring this out?
I am using a tikzpicture for plotting. the values I want to plot are typical (X,Y) pairs. The x-value is an uninteresting id-value. I want to order the bins ascending/descending according to the y-value, but how do I do that? The figure seems to automatically take the x-values for ordering, how can I override that? (I am not particularly fixed to tikzpicture - its just the first thing that actually worked and displayed the plot....) Following minimal-working example, how could I achieve a reordering according to the y-value?  \documentclass{article} \usepackage[english]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{relsize} \usepackage{times} \usepackage{url} \usepackage{latexsym} \usepackage{graphicx} \usepackage{colortbl} \usepackage{color} \usepackage{caption} \usepackage{pgfplots, pgfplotstable} \usetikzlibrary{arrows} \usepackage{amsmath} \usepackage{multirow} \usepackage{booktabs}  \usepackage{filecontents} \definecolor{OgAns}{rgb}{0, 0.8, 0.4}  \begin{filecontents}{testdata.dat} 1   30 2   44 4   26 3   39 \end{filecontents}  \begin{document} \begin{figure} \begin{tikzpicture}         \begin{axis}[                ybar stacked,             ymin=0,             ymax=100,             bar width=5pt,             legend style={at={(0.35, -0.4)},anchor=south west},             legend columns=-1                       ]           \addplot[ybar,fill=OgAns]  file {testdata.dat};          \end{axis}     \end{tikzpicture} \end{figure}   \end{document}
Streaming large files in a java servlet Show that every nonzero integer has balanced ternary expansion? Access denied for user 'root@localhost' (using password:NO) Finding what methods a Python object has I've read in several places that one motivation for category theory was to be able to give precise meaning to statements like, "finite dimensional vector spaces are canonically isomorphic to their double duals; they are isomorphic to their duals as well, but not canonically."  I've finally sat down to work through this, and -  Okay, yes, it is easy to see that the "canonical isomorphism" from $V$ to $V^{**}$ is a functor that has a natural isomorphism (in the sense of category theory) to the identity functor.  Also, I see that there is no way that the functor $V\mapsto V^*$ could have a natural isomorphism to the identity functor, because it is contravariant whereas the identity functor is covariant. My question amounts to:     Is contravariance the whole problem?   To elaborate:   I was initially disappointed by the realization that the definition of natural isomorphism doesn't apply to a pair of functors one of which is covariant and the other contravariant, because I was hoping that the lack of a canonical isomorphism $V\rightarrow V^*$ would feel more like a theorem as opposed to an artifact of the inapplicability of a definition.  Then I tried to create a definition of a natural transformation from a covariant functor $F:\mathscr{A}\rightarrow\mathscr{B}$ to a contravariant functor $G:\mathscr{A}\rightarrow\mathscr{B}$. It seems to me that this definition should be that all objects $A\in\mathscr{A}$ get a morphism $m_A:F(A)\rightarrow G(A)$ such that for all morphisms $f:A\rightarrow A'$ of $\mathscr{A}$, the following diagram (in $\mathscr{B}$) commutes:  $$\require{AMScd}\begin{CD} F(A) @&gt;m_A&gt;&gt; G(A)\\ @VF(f)VV @AAG(f)A\\ F(A') @&gt;&gt;m_{A'}&gt; G(A') \end{CD}$$  This is much more stringent a demand on the $m_A$ than the typical definition of a natural transformation.  Indeed, it is asking that $m_A=G(f)\circ m_{A'}\circ F(f)$, regardless of how $f$ or $A'$ may vary. Taking $\mathscr{A}=\mathscr{B}=\text{f.d.Vec}_k$, $F$ the identity functor and $G$ the dualizing functor, it is clear that this definition can never be satisfied unless $m_V$ is the zero map for all $V\in\text{f.d.Vec}_k$ (because take $f$ to be the zero map). In particular, it cannot be satisfied if $m_V$ is required to be an isomorphism.     Is this the right way to understand (categorically) why there is no natural isomorphism $V\rightarrow V^*$?   As an aside, are there any interesting cases of some kind of analog (the above definition or another) of natural transformations from covariant to contravariant functors?  Note: I have read a number of math.SE answers regarding why $V^*$ is not naturally isomorphic to $V$. None that I have found are addressed to what I'm asking here, which is about how categories make the question and answer precise. ( was closest.) Hence my question here. This question is similar, but not identical to:   Whereas the aforementioned question is about whether the hand’s movement is measured from the hand’s point of view or from the caster’s, this question revolves around the total distance the hand can travel to reach its destination.  To illustrate, let me give an example: Two narrow stone pillars stand next to each other, 10 feet apart. They are several kilometers high and on top of each pillar stands a wizard. One wizard casts Maximillian's Earthen Grasp and lets the hand made from compacted soil rise from the ground on his own pillar. With another action, he wants to move the hand in order to restrain the other wizard, who is within range of 30 feet.  Would the hand retract into his own pillar, then rise again from the ground on the other pillar? Or would the hand move several kilometers down the first pillar, across the floor, then several kilometers up the second pillar? What if both pillars would float in the Astral Plane, without a direct ground-based connection between them?  This might seem like a stupid and unnecessary convoluted question, but lo and behold, something similar happened in one of my games. Would I be scrutinized at the border for traveling to the US twice in a quick succession? I am a British citizen visiting the USA in early August for a two week vacation with friends. After the holiday I'm returning to my home in the UK for three weeks. After that I will return to the USA and will be working for my British employer under the Visa Waiver Program for a period of 80-85 days.  I have read already that there is technically no problems with this under ESTA rules, but should I limit this working period to a shorter time frame (e.g. 70 or so days) so that it does not negatively affect the decision made by the POE officer? Ideally I would love to be over in the states for the near-full 85 day period.  Any advice or previous experiences anyone can offer?  Some clarifications: As confirmed by the immigration attorney, as I am employed by my UK employer, it will be regarded as a business trip, the important part being that I will be working officially as a consultant for my UK employer just overseas for the allotted 85 or so days I'm trying to prove : Given a simple graph $G$ with $n$ vertices, where $n$ is even, prove that if every vertex has degree $\dfrac n2 + 1$, then $G$ must contain a (simple) $3$-cycle. A (simple) $3$-cycle is a set of $3$ (distinct) vertices, $a, b, c$ such that $ab$ is an edge, $bc$ is an edge and $ac$ is an edge.  I know there are similar ones already on here, but I can't comprehend any of the answers. This is what I have so far:  Base Case: Since the graph has to have at least $3$ vertices to have a simple $3$-cycle, the lowest possible even number of vertices is $n = 4$.   $\dfrac42 + 1 = 3$ degree (edges attached to node). This means each vertex connects to each of the other $3$ vertices since $G$ is a simple graph. Thus, any combination of $3$ vertices will be a simple $3$-cycle.  Inductive Hypothesis: Assume a simple graph with $k$ vertices, where $k$ is even, contains a simple $3$-cycle if each vertex has degree $\dfrac k2 + 1$.  Inductive Step: Since only concerned about when the graph has an even number of vertices, going to show a simple graph with $k + 2$ vertices, where $k$ is even, contains a simple $3$-cycle if every vertex has degree $\dfrac{k+2}{2} + 1$   This is as far as I get and don't know how to finish the Inductive Step (Also please feel free to let me know if I messed anything up, up to this point) All beta sites (e.g. ) are appearing with 0 Q/D and 0 avid users.  is unaffected.  In the Q&amp;A spirit, my question is: Who borked the stats? Database design for products with bundles of products I am building a database system for my retail business. I have set some tables which are:   Product Purchase Sales Balance   All are connected one another and are able to show my inventory level.  The problem I am having is I also sell bundles of products - that have different prices than their individual prices. Example: I sell an orange for $1, an apple for $1.2; I sell fruit package 1 (2 oranges and 2 apples) for $3.8, package 2 (4 oranges and 4 apples) for $7.  Is there a right way how to create relationship for these product bundles?  PS: I am using FileMaker Pro creating this. Tried to install both Windows and Ubuntu, now neither will boot I'm quite confused about attacking with two weapons in both hands and wondering what is required to be able to do to (in Pathfinder).  1. Base Attack Bonus Looking at the base attack bonus tables for different classes (e.g. the ) it seems like up to +5 you get only one attack per full action but starting from base-attack-bonus of +6 you get a second attack with +1.  2. Feats There is a feat . The existence of the feat sounds like you could not do two-weapon-fighting without it. However, in the description of "normal" it says:     If you wield a second weapon in your off hand, you can get one extra attack per round with that weapon. When fighting in this way you suffer a –6 penalty with your regular attack or attacks with your primary hand and a –10 penalty to the attack with your off hand. If your off-hand weapon is light, the penalties are reduced by 2 each.   3. Core Rulebook Chapter about combat If I understand the  it says that you need a full-round action do attack with both weapons in two hands.  So how do these things interact? Can I only attack with my off-hand weapon if my base-attack-bonus is high enough that I get second one with +1?  If not, how does the "multiple attacks from high base-attack-bonus" interact with dual-wielding? Assuming I reached a state of base-attack-bonus with +11/+6/+1 and have a full-round action to attack. Does that mean I can either attack with my primary weapon three times or use the primary weapon and off-hand weapon to attack only twice? Why would I then ever choose dual-wielding? Or can I attack three times with both weapons (leading to a total of 6 attacks with heavy malus) Or would I get 3 attacks with the primary weapon + 1 attack with the off-hand weapon? If so, what attack bonus do I have to use for each of the attacks? What are the limitations of a typical kit lens as a general purpose lens? I have a Canon EOS 550d with the 18-55mm IS kit lens. I have done  (portraits, nature, night shots etc), and find the image quality to be pretty good. In fact most of the reviews have also been positive (at least in terms of image quality):   Quote:     indeed Canon's main concern may   ultimately become whether users have   as much incentive to upgrade to more   expensive optics as they did before       So, what are the key limitations of this lens (or any other similar kit lens) that would compel one to upgrade to a more expensive general purpose zoom lens (apart from the wanting to upgrade the zoom range)? On the proof that the product of diagonal matrices is a diagonal matrix? Let $A [a_{i,j}]$  and $B =[b_{ij}]$   be two diagonal matrices in   $M_n(F)$. Let $i \ne j \in \left\{1, \ldots, n \right\}$. Using the   product rule, we obtain      $$(AB)_{ij} = \sum_{k=1}^{n} a_{ik}b_{kj}$$      We claim that $a_{ik}b_{kj} =0$ for all $k \in \left\{1, \ldots, n \right\}$ thus $(AB)_{ij}=0$ for all $i \ne j$ and $AB$ is diagonal. To    prove the claim, note that since $i \ne j$ , we have $i \ne k$ or $    k\ne j$. Thus either $a_{ik} = 0$ (since $A$ is diagonal) or $b_{kj} =  0$ (since $B$ is diagonal), thus in all cases $a_{ik}b_{kj}=0$ and the   claim is proved.   Where does the bit "we have $i \ne k$ or $k\ne j$" come from? I understand that since $i \ne j$, and $k$ and $j$ run over the same set of natural numbers, we also have $i \ne k$. But the "or $k \ne j$" baffles me. I understand that $k \ne j$ implies that we can have $i=k$. But that's from the other direction ($\Longleftarrow).$  Also, when it says $a_{ik}=0$ or $b_{kj}=0$ it's talking about when $i \ne k$ or $k \ne j$ right? Many thanks. The well-known fable of an astronaut sending signals out to an external observer while falling toward an event horizon states that the time lapse between such signals becomes greater even if in the astronaut sends them out periodically (as judged in his inertial frame). When viewed from earth and weighing time-dilation due to the gravitational field of the collapsing star, how is it possible that a black hole can form in finite time (for any external observer) if it takes an infinite amount of time to "see" events occurring at the event horizon? I recall a short lived TV show that I think was broadcast on the British TV channel ITV in the late 90s or early 2000s and it was about time travel. It was set in Britain in relatively modern times. The scene that really sticks in my head is when the protagonist goes to use their time travelling machine they go in to a room where the machine is and they close all the windows. The windows have latches on them and by closing the window it creates a circuit. By closing all the latches the circuit is complete and the machine is able to be activated. I don't know if it's much to go on, but it's been really bugging me for ages. Extracting numbers from vectors of strings sed - replace string with file contents I have two files: file1 and file2.  file1 has the following contents:  ---   host: "localhost"   port: 3000   reporter_type: "zookeeper"   zk_hosts:      - "localhost:2181"   file2 contains an IP address (1.1.1.1)  What I want to do is replace localhost with 1.1.1.1, so that the end result is:  ---   host: "1.1.1.1"   port: 3000   reporter_type: "zookeeper"   zk_hosts:      - "1.1.1.1:2181"   I have tried:  sed -i -e "/localhost/r file2" -e "/localhost/d" file1 sed '/localhost/r file2' file1 |sed '/localhost/d' sed -e '/localhost/r file2' -e "s///" file1   But I either get the whole line replaced, or the IP going to the line after the one I need to modify. How did the Community user earn the Civic Duty badge? Apparently, .  How the heck did that happen? What's "Another Way In"? There's a new achievement and I'm stumped as to how to get it:     Start a game without breaking the laboratory wall   I assume it has something to do with the new Gadgets but none of them sound like they'd help. How do I get this achievement?