snipt

Ctrl+h for KB shortcuts

Java

java clipboard access

this.clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
this.clipboard.addFlavorListener(new FlavorListener() {...});
https://snipt.net/embed/6e81f1621d8c050f4f581252876d2d8f/
https://snipt.net/raw/6e81f1621d8c050f4f581252876d2d8f/
6e81f1621d8c050f4f581252876d2d8f
java
Java
2
2016-09-29T07:32:42
True
False
False
/api/public/snipt/24128/
java-clipboard-access
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="k">this</span><span class="o">.</span><span class="na">clipboard</span> <span class="o">=</span> <span class="n">Toolkit</span><span class="o">.</span><span class="na">getDefaultToolkit</span><span class="o">().</span><span class="na">getSystemClipboard</span><span class="o">();</span> </span><span id="L-2"><a name="L-2"></a><span class="k">this</span><span class="o">.</span><span class="na">clipboard</span><span class="o">.</span><span class="na">addFlavorListener</span><span class="o">(</span><span class="k">new</span> <span class="n">FlavorListener</span><span class="o">()</span> <span class="o">{...});</span> </span></pre></div> </td></tr></table>
access, clipboard, java, listener, memory

Bash

Show list of IPs accessing apache (Plesk)

cat /var/www/vhosts/*/statistics/logs/access_log | cut -d ' ' -f 1 | sort | uniq -c | sort -n
https://snipt.net/embed/8c1cabe00b657fe52305153767f9f68c/
https://snipt.net/raw/8c1cabe00b657fe52305153767f9f68c/
8c1cabe00b657fe52305153767f9f68c
bash
Bash
1
2016-09-28T19:58:24
True
False
False
/api/public/snipt/23540/
show-list-of-ips-accessing-apache-plesk
<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 id="L-1"><a name="L-1"></a>cat /var/www/vhosts/*/statistics/logs/access_log <span class="p">|</span> cut -d <span class="s1">&#39; &#39;</span> -f <span class="m">1</span> <span class="p">|</span> sort <span class="p">|</span> uniq -c <span class="p">|</span> sort -n </span></pre></div> </td></tr></table>
access, access_log, apache, plesk, report

VB.net

VB6: Connect via ADO to Access 2007 database

1
2
3
4
'Needs Microsoft ActiveX Data Objects Library

ConnectionString = "PROVIDER=Microsoft.ACE.OLEDB.12.0;" & _
  "Data Source=" & FileName & ";"
https://snipt.net/embed/2a8a6722bd207ee8060462d8ff0797ca/
https://snipt.net/raw/2a8a6722bd207ee8060462d8ff0797ca/
2a8a6722bd207ee8060462d8ff0797ca
vb.net
VB.net
4
2016-09-27T02:02:57
True
False
False
/api/public/snipt/12138/
vb6-connect-via-ado-to-access-2007-database
<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 id="L-1"><a name="L-1"></a><span class="c">&#39;Needs Microsoft ActiveX Data Objects Library</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="n">ConnectionString</span> <span class="o">=</span> <span class="s">&quot;PROVIDER=Microsoft.ACE.OLEDB.12.0;&quot;</span> <span class="o">&amp;</span> _ </span><span id="L-4"><a name="L-4"></a> <span class="s">&quot;Data Source=&quot;</span> <span class="o">&amp;</span> <span class="n">FileName</span> <span class="o">&amp;</span> <span class="s">&quot;;&quot;</span> </span></pre></div> </td></tr></table>
access, database, vb6
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.