This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class ArrayTest extends PHPUnit_Framework_TestCase { | |
| public function testNextAndPrev1(){ | |
| $rs = array(1=>1,2=>2,3=>3,4=>4,5=>5); | |
| $curID = 3; | |
| $prev = null; | |
| foreach ($rs as $ID => $r){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Pippo{ | |
| private _$asset = null; | |
| public function getAsset() | |
| { | |
| if(null === $this->asset) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class UtenteManagedBean{ | |
| public String deleteUtente() { | |
| Utente utente = (Utente) getFacesContext().getApplication().createValueBinding("#{list}").getValue(getFacesContext()); | |
| utenteManagerLocal.removeUtente(utente); | |
| return "success"; | |
| } | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function likeAction() | |
| { | |
| // Make sure user exists | |
| if( !$this->_helper->requireUser()->isValid() ) return; | |
| // Collect params | |
| $action_id = $this->_getParam('action_id'); | |
| $viewer = $this->_helper->api()->user()->getViewer(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $url = "http://example.org"; | |
| $curlSession = curl_init(); | |
| $putParameters = array('email' => '[email protected]', 'username' => 'pluto'); | |
| curl_setopt($curlSession,CURLOPT_SSL_VERIFYPEER, FALSE); | |
| curl_setopt($curlSession,CURLOPT_URL, $url); | |
| curl_setopt($curlSession, CURLOPT_CUSTOMREQUEST, 'PUT'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export CLICOLOR=1 | |
| export LSCOLORS=ExFxCxDxBxegedabagacad | |
| # check the window size after each command and, if necessary, | |
| # update the values of LINES and COLUMNS. | |
| shopt -s checkwinsize | |
| alias 'll=ls -lah' | |
| PS1='\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | |
| export PSI | |
| PATH=/usr/local/bin:$PATH:/usr/local/mysql/bin/; export PATH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export CLICOLOR=1 | |
| export LSCOLORS=ExFxCxDxBxegedabagacad | |
| # check the window size after each command and, if necessary, | |
| # update the values of LINES and COLUMNS. | |
| shopt -s checkwinsize | |
| export EDITOR=vim | |
| export VISUAL=vim | |
| alias 'll=ls -lah' | |
| alias 'zf=/usr/local/Cellar/php/5.3.3/lib/php/bin/zf.sh' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var oggettoX = function(){ | |
| var valore = 0; | |
| return { | |
| increment : function(inc){ | |
| valore += inc; | |
| }, | |
| getValue: function(){ | |
| return valore; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export CLICOLOR=1 | |
| export LSCOLORS=ExFxCxDxBxegedabagacad | |
| # check the window size after each command and, if necessary, | |
| # update the values of LINES and COLUMNS. | |
| shopt -s checkwinsize | |
| export EDITOR=vim | |
| export VISUAL=vim | |
| alias 'll=ls -lah' | |
| alias 'zf=/usr/local/Cellar/php/5.3.3/lib/php/bin/zf.sh' |