snipt

Ctrl+h for KB shortcuts

Python

Plot format defaults in Matplotlib

1
2
3
4
rc('font', family='serif')
rc('font', serif='Times New Roman')
rc('font', size=20)
rc('lines', linewidth=2)
https://snipt.net/embed/7cd75e7b22bd620b5f76c2768ad063a0/
/raw/7cd75e7b22bd620b5f76c2768ad063a0/
7cd75e7b22bd620b5f76c2768ad063a0
python
Python
4
2019-07-11T08:58:00
True
False
False
Nov 20, 2012 at 01:57 PM
/api/public/snipt/50528/
plot-format-defaults-in-matplotlib
<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="n">rc</span><span class="p">(</span><span class="s1">&#39;font&#39;</span><span class="p">,</span> <span class="n">family</span><span class="o">=</span><span class="s1">&#39;serif&#39;</span><span class="p">)</span> </span><span id="L-2"><a name="L-2"></a><span class="n">rc</span><span class="p">(</span><span class="s1">&#39;font&#39;</span><span class="p">,</span> <span class="n">serif</span><span class="o">=</span><span class="s1">&#39;Times New Roman&#39;</span><span class="p">)</span> </span><span id="L-3"><a name="L-3"></a><span class="n">rc</span><span class="p">(</span><span class="s1">&#39;font&#39;</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="mi">20</span><span class="p">)</span> </span><span id="L-4"><a name="L-4"></a><span class="n">rc</span><span class="p">(</span><span class="s1">&#39;lines&#39;</span><span class="p">,</span> <span class="n">linewidth</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span> </span></pre></div> </td></tr></table>
"plot format default", Matplotlib, Python, default, format, plot

Text only

make sun java 6 default

sudo update-java-alternatives -s java-6-sun
https://snipt.net/embed/5fe6ecb36927777f231767c30b34e21c/
/raw/5fe6ecb36927777f231767c30b34e21c/
5fe6ecb36927777f231767c30b34e21c
text
Text only
1
2019-07-13T10:21:30
True
False
False
/api/public/snipt/30186/
make-sun-java-6-default
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>sudo update-java-alternatives -s java-6-sun </span></pre></div> </td></tr></table>
default, java, sun

Bash

Force Apatana Studio to run with factory default Workspace on Mac OS X

/Applications/Aptana\ Studio\ 3/AptanaStudio3.app/Contents/MacOS/AptanaStudio3 -data ~/Documents/Aptana\ Studio\ 3\ Workspace
https://snipt.net/embed/c68d5acac918d8236e1ec0b2ab107491/
/raw/c68d5acac918d8236e1ec0b2ab107491/
c68d5acac918d8236e1ec0b2ab107491
bash
Bash
1
2019-07-15T19:17:42
True
False
False
/api/public/snipt/26013/
force-apatana-studio-to-run-with-factory-default-workspace-on-mac-os-x
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>/Applications/Aptana<span class="se">\ </span>Studio<span class="se">\ </span>3/AptanaStudio3.app/Contents/MacOS/AptanaStudio3 -data ~/Documents/Aptana<span class="se">\ </span>Studio<span class="se">\ </span>3<span class="se">\ </span>Workspace </span></pre></div> </td></tr></table>
aptana, default, mac, workspace

SQL

create table

CREATE TABLE categories ( id int PRIMARY KEY AUTO_INCREMENT, name varchar(255) DEFAULT "xasedy", created_at datetime, updated_at datetime, site_id int) ENGINE=innodb;
https://snipt.net/embed/ddd082caf46c6856ebf7af87b106963f/
/raw/ddd082caf46c6856ebf7af87b106963f/
ddd082caf46c6856ebf7af87b106963f
sql
SQL
1
2019-07-13T17:35:01
True
False
False
/api/public/snipt/2676/
create-table-1
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</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">CREATE</span> <span class="k">TABLE</span> <span class="n">categories</span> <span class="p">(</span> <span class="n">id</span> <span class="nb">int</span> <span class="k">PRIMARY</span> <span class="k">KEY</span> <span class="n">AUTO_INCREMENT</span><span class="p">,</span> <span class="n">name</span> <span class="nb">varchar</span><span class="p">(</span><span class="mi">255</span><span class="p">)</span> <span class="k">DEFAULT</span> <span class="ss">&quot;xasedy&quot;</span><span class="p">,</span> <span class="n">created_at</span> <span class="n">datetime</span><span class="p">,</span> <span class="n">updated_at</span> <span class="n">datetime</span><span class="p">,</span> <span class="n">site_id</span> <span class="nb">int</span><span class="p">)</span> <span class="n">ENGINE</span><span class="o">=</span><span class="n">innodb</span><span class="p">;</span> </span></pre></div> </td></tr></table>
"auto increment", "primary key", default, id, innodb, sql, table