snipt

Ctrl+h for KB shortcuts
#27788

PHP

Messaging in symfony

1
2
3
4
5
6
7
// Method 1
$this->getUser()->setFlash('error', 'The begin time is invalid');
sfContext::getInstance()->getController()->redirect('@message');


// Redirect to 404 page
$this->redirect404() // in action
https://snipt.net/embed/9288168ec47db571260ebe6accd79a0e/
https://snipt.net/raw/9288168ec47db571260ebe6accd79a0e/
9288168ec47db571260ebe6accd79a0e
php
PHP
7
2014-04-16T14:50:51
True
False
/api/public/snipt/27788/
messaging-in-symfony
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="x">// Method 1</span> </span><span id="L-2"><a name="L-2"></a><span class="x">$this-&gt;getUser()-&gt;setFlash(&#39;error&#39;, &#39;The begin time is invalid&#39;);</span> </span><span id="L-3"><a name="L-3"></a><span class="x">sfContext::getInstance()-&gt;getController()-&gt;redirect(&#39;@message&#39;);</span> </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a> </span><span id="L-6"><a name="L-6"></a><span class="x">// Redirect to 404 page</span> </span><span id="L-7"><a name="L-7"></a><span class="x">$this-&gt;redirect404() // in action</span> </span></pre></div> </td></tr></table>
message, notice, symfony, waring
#4996

Bash

send direct message on twitter in linux terminal

curl -u username:password -d user="reciever" text="the message" http://twitter.com/direct_messages/new.xml
https://snipt.net/embed/c710e32a29a6138c669c0fc368bb9e02/
https://snipt.net/raw/c710e32a29a6138c669c0fc368bb9e02/
c710e32a29a6138c669c0fc368bb9e02
bash
Bash
1
2014-04-18T20:58:15
True
False
/api/public/snipt/4996/
send-direct-message-on-twitter-in-linux-terminal
<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>curl -u username:password -d <span class="nv">user</span><span class="o">=</span><span class="s2">&quot;reciever&quot;</span> <span class="nv">text</span><span class="o">=</span><span class="s2">&quot;the message&quot;</span> http://twitter.com/direct_messages/new.xml </span></pre></div> </td></tr></table>
bash, curl, direct, linux, message, terminal, twitter
#3768

Delphi

Hello snipt!

ShowMessage('Hello snipt!');
https://snipt.net/embed/5d0c2a3f60d8c8d648dff2e794fc666d/
https://snipt.net/raw/5d0c2a3f60d8c8d648dff2e794fc666d/
5d0c2a3f60d8c8d648dff2e794fc666d
delphi
Delphi
1
2014-04-19T05:00:32
True
False
/api/public/snipt/3768/
hello-snipt
<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><span class="n">ShowMessage</span><span class="p">(</span><span class="s">&#39;Hello snipt!&#39;</span><span class="p">)</span><span class="o">;</span> </span></pre></div> </td></tr></table>
delphi, hello, message, pascal, show, showmessage, snipt