Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

Text only

export and import tabular data for sector chart

1
2
3
4
5
6
7
8
Export ["/Users/dgg32/Downloads/test2.dat", {{a, 1, 1}, {b, 2, 3}, {c,
    3, 4}}]

data = Import["/Users/dgg32/Downloads/test2.dat", "Table"];
names = data[[All, 1]]
numbers = data[[All, {2, 3}]]
SectorChart [numbers, SectorOrigin -> {Automatic, 1}, 
 ChartLabels -> Placed[names, "RadialCallout"]]
https://snipt.net/embed/5bf9e2a749af11f2488bc6ecb023af3e/
https://snipt.net/raw/5bf9e2a749af11f2488bc6ecb023af3e/
5bf9e2a749af11f2488bc6ecb023af3e
text
Text only
8
2016-12-02T17:45:22
True
False
False
/api/public/snipt/14603/
export-and-import-tabular-data-for-sector-chart
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>Export [&quot;/Users/dgg32/Downloads/test2.dat&quot;, {{a, 1, 1}, {b, 2, 3}, {c, </span><span id="L-2"><a name="L-2"></a> 3, 4}}] </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a>data = Import[&quot;/Users/dgg32/Downloads/test2.dat&quot;, &quot;Table&quot;]; </span><span id="L-5"><a name="L-5"></a>names = data[[All, 1]] </span><span id="L-6"><a name="L-6"></a>numbers = data[[All, {2, 3}]] </span><span id="L-7"><a name="L-7"></a>SectorChart [numbers, SectorOrigin -&gt; {Automatic, 1}, </span><span id="L-8"><a name="L-8"></a> ChartLabels -&gt; Placed[names, &quot;RadialCallout&quot;]] </span></pre></div> </td></tr></table>
export, import, mathematica, sectorchart

MySQL

Export mySQL to CSV

1
2
3
4
SELECT a,b,a+b INTO OUTFILE '/tmp/result.text' 
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' 
LINES TERMINATED BY '\n' 
FROM test_table;
https://snipt.net/embed/79a28e8da20bd538c988745d06ea4e5f/
https://snipt.net/raw/79a28e8da20bd538c988745d06ea4e5f/
79a28e8da20bd538c988745d06ea4e5f
mysql
MySQL
4
2016-12-03T13:54:14
True
False
False
/api/public/snipt/6185/
export-mysql-to-csv
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">SELECT</span> <span class="n">a</span><span class="p">,</span><span class="n">b</span><span class="p">,</span><span class="n">a</span><span class="o">+</span><span class="n">b</span> <span class="k">INTO</span> <span class="k">OUTFILE</span> <span class="s1">&#39;/tmp/result.text&#39;</span> </span><span id="L-2"><a name="L-2"></a><span class="n">FIELDS</span> <span class="k">TERMINATED</span> <span class="k">BY</span> <span class="s1">&#39;,&#39;</span> <span class="k">OPTIONALLY</span> <span class="k">ENCLOSED</span> <span class="k">BY</span> <span class="s1">&#39;&quot;&#39;</span> </span><span id="L-3"><a name="L-3"></a><span class="k">LINES</span> <span class="k">TERMINATED</span> <span class="k">BY</span> <span class="s1">&#39;\n&#39;</span> </span><span id="L-4"><a name="L-4"></a><span class="k">FROM</span> <span class="n">test_table</span><span class="p">;</span> </span></pre></div> </td></tr></table>
csv, export, mysql
Copyrighted, illegal, or inappropriate content? Email [email protected].