snipt

Ctrl+h for KB shortcuts

XML

maven file dependency

1
2
3
4
5
6
<dependency>
    <artifactId>..</artifactId>
    <groupId>..</groupId>
    <scope>system</scope>
    <systemPath>${basedir}/lib/dependency.jar</systemPath>
</dependency>
https://snipt.net/embed/6556d6f758fe77870930d7f6489d06b1/
https://snipt.net/raw/6556d6f758fe77870930d7f6489d06b1/
6556d6f758fe77870930d7f6489d06b1
xml
XML
6
2016-09-29T16:27:16
True
False
False
Jan 09, 2016 at 03:27 AM
/api/public/snipt/143483/
maven-file-dependency
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nt">&lt;dependency&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="nt">&lt;artifactId&gt;</span>..<span class="nt">&lt;/artifactId&gt;</span> </span><span id="L-3"><a name="L-3"></a> <span class="nt">&lt;groupId&gt;</span>..<span class="nt">&lt;/groupId&gt;</span> </span><span id="L-4"><a name="L-4"></a> <span class="nt">&lt;scope&gt;</span>system<span class="nt">&lt;/scope&gt;</span> </span><span id="L-5"><a name="L-5"></a> <span class="nt">&lt;systemPath&gt;</span>${basedir}/lib/dependency.jar<span class="nt">&lt;/systemPath&gt;</span> </span><span id="L-6"><a name="L-6"></a><span class="nt">&lt;/dependency&gt;</span> </span></pre></div> </td></tr></table>
dependency, file, maven, mvn, pom

PHP

information about a file path

1
2
3
4
5
6
7
8
<?php
$path_parts = pathinfo('/www/htdocs/inc/lib.inc.php');

echo $path_parts['dirname'], "\n";   // /www/htdocs/inc
echo $path_parts['basename'], "\n";  // lib.inc.php
echo $path_parts['extension'], "\n"; // php
echo $path_parts['filename'], "\n"; // since PHP 5.2.0   // lib.inc
?>
https://snipt.net/embed/81a29e3434c523a22c4da9d047f0b7a5/
https://snipt.net/raw/81a29e3434c523a22c4da9d047f0b7a5/
81a29e3434c523a22c4da9d047f0b7a5
php
PHP
8
2016-10-01T00:49:28
True
False
True
Apr 08, 2014 at 06:04 AM
/api/public/snipt/128291/
information-about-a-file-path
<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 id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a><span class="nv">$path_parts</span> <span class="o">=</span> <span class="nb">pathinfo</span><span class="p">(</span><span class="s1">&#39;/www/htdocs/inc/lib.inc.php&#39;</span><span class="p">);</span> </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="k">echo</span> <span class="nv">$path_parts</span><span class="p">[</span><span class="s1">&#39;dirname&#39;</span><span class="p">],</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">;</span> <span class="c1">// /www/htdocs/inc</span> </span><span id="L-5"><a name="L-5"></a><span class="k">echo</span> <span class="nv">$path_parts</span><span class="p">[</span><span class="s1">&#39;basename&#39;</span><span class="p">],</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">;</span> <span class="c1">// lib.inc.php</span> </span><span id="L-6"><a name="L-6"></a><span class="k">echo</span> <span class="nv">$path_parts</span><span class="p">[</span><span class="s1">&#39;extension&#39;</span><span class="p">],</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">;</span> <span class="c1">// php</span> </span><span id="L-7"><a name="L-7"></a><span class="k">echo</span> <span class="nv">$path_parts</span><span class="p">[</span><span class="s1">&#39;filename&#39;</span><span class="p">],</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">;</span> <span class="c1">// since PHP 5.2.0 // lib.inc</span> </span><span id="L-8"><a name="L-8"></a><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
file, php
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.