- Chuck Norris code has no error handling. Chuck Norris code has no errors.
- An infinite loop in a Chuck Norris program takes 2,1 seconds to finish.
- If a Chuck Norris program requires more memory it simply kills all other processes with a roundhouse kick.
- In UNIX you have SIGQUIT, SIGKILL and SIGCHUCKNORRIS.
- A Chuck Norris program can write on a DVD-R.
- The C in "C language" means Chuck.
- The N in NUnit means Norris.
- Chuck Norris uses windows 64 bit on 32 bit machine.
- It was Chuck Norris that bit the apple in the Apple logo.
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 | |
interface PolicialInterface { | |
/** | |
* Garante o din din do café | |
* | |
* @param MelianteInterface $suspeito | |
* @return void | |
* @throws SujouException |
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
#!/bin/bash | |
# Execute this script and you might have a better idea of how git-svn works | |
# I think the main point here is to ilustrate how to commit/update from git-svn | |
# For merging svn branches and keeping the feature-branch history it should | |
# probably be done using svn, for I do not know how to accomplish that with | |
# git-svn. Git merge would group all the feature-branch commits into a single | |
# commit. If you do not mind the history of the feature-branch, just merge using | |
# git, it is just pain-free |
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
#!/bin/bash | |
# Execute this script and you might have a better idea of how git-svn works | |
# I think the main point here is to ilustrate how to commit/update from git-svn | |
# ultility | |
# | |
# Keep in mind that when merge svn branches you won't get the feature branch | |
# commits on top of your target branch. Instead it will only modify your files | |
# on your working copy and than you can commit the merge. | |
# |
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
puts "Exemplo com o print" | |
puts "-------------------" | |
print "Qual a sua idade: " | |
idade = gets.chomp | |
puts idade | |
puts "" | |
puts "" | |
puts "" |
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
alias mb='cd ~/Projects/mb' | |
alias mbt='cd ~/Projects/mbtracking' | |
alias testmb='phpunit -c tests/phpunit.xml' | |
export SHELL=/usr/bin/zsh | |
exec /usr/bin/zsh -l |
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
alias mb='cd ~/Projects/mb' | |
alias mbt='cd ~/Projects/mbtracking' | |
alias testmb='phpunit -c tests/phpunit.xml' | |
# http://unix.stackexchange.com/questions/136423/making-zsh-default-shell-without-root-access | |
# export SHELL=/usr/bin/zsh | |
# [ -z "$ZSH_VERSION" ] && exec /usr/bin/zsh -l |
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
/** | |
* Bind values to the bound object | |
* | |
* @param array $values | |
* @return mixed | |
*/ | |
public function bindValues(array $values = array()) | |
{ | |
if (!is_object($this->object)) { | |
if ($this->baseFieldset === null || $this->baseFieldset->allowValueBinding() == false) { |
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 | |
$num = 1.12345678901234567890; | |
// What? | |
var_export(array( | |
(string) $num, // '1.1234567890123' | |
number_format($num, 20), // '1.12345678901234569125' | |
)); |
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 | |
$num = 187.02000427246094; | |
$num; // 187.02000427246094 | |
(string) $num; // '187.02000427246' // what about last 3 chars? | |
strval($num); // '187.02000427246' // what about last 3 chars? |