This file contains 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
# coding:utf-8 | |
""" | |
>>> maior(1, 2, 3) | |
3 é o maior número!! | |
>>> maior(1, 2, 4) | |
4 é o maior número!! | |
>>> maior(5,5,1) | |
5 é o maior!! | |
>>> maior(5,5,5) | |
todos o numeros são iguais |
This file contains 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
# coding: utf-8 | |
""" | |
>>> decrescente(1, 2, 3) | |
3 | |
2 | |
1 | |
>>> decrescente(100, 101, 102) | |
102 | |
101 | |
100 |
This file contains 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 | |
require_once 'PHPUnit/Autoload.php'; | |
class AcessarHuTest extends PHPUnit_Framework_TestSuite | |
{ | |
public function test_soma() | |
{ | |
#$this->open('http://hu2.1/'); | |
#$this->assertTitleEquals("Descontos em hotéis é no Hotel Urbano | Home"); |
This file contains 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
from mock import Mock | |
class MockUrlLib(Mock): | |
def __init__(self, _file, _type='html', code=200, msg='OK', headers={'content-type': 'text/plain; charset=utf-8'}): | |
self.file_test = ("%s.%s" % (_file, _type)) | |
self.code = code | |
self.msg = msg | |
self.headers = headers | |
This file contains 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
/** | |
* Remove array element. | |
*/ | |
Array.prototype.rm = function(value) | |
{ | |
var arrays_s = this; | |
for( var i=0; i<this.length; i++) | |
{ | |
var obj = this[i]; | |
if( typeof obj === 'number' && obj == value ) |
This file contains 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 Faixa = { | |
criterios:{ | |
1:{reg:/^([1-9]|[1-9][0-9]|1[0-4][0-9]|15[0])$/, label:'1-150'}, | |
2:{reg:/^(15[1-9]|1[6-9][0-9]|2[0-4][0-9]|25[0])$/, label:'151-250'}, | |
3:{reg:/^(25[1-9]|2[6-9][0-9]|3[0-4][0-9]|35[0])$/, label:'251-350'}, | |
4:{reg:/^(35[1-9]|3[6-9][0-9]|4[0-4][0-9]|45[0])$/, label:'351-450'}, | |
5:{reg:/^(45[1-9]|4[6-9][0-9]|5[0-4][0-9]|55[0])$/, label:'451-550'}, | |
6:{reg:/^(55[1-9]|[6-9][0-9][0-9]|[1-4][0-9][0-9][0-9]?[0-9])$/, label:'>551'} | |
}, | |
execs:function(cri, value) |
This file contains 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
Array.prototype.shuffle=function(){ | |
this.sort(function(){ | |
return 0.5 - Math.random(); | |
}); | |
return this; | |
} |
This file contains 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
phpunit --filter name_class -c phpunit.dev --verbose |
This file contains 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
@app.route('/name.json') | |
def name(): | |
name = json.dumps({"name":"recomeçar"}, ensure_ascii=False) | |
return Response(name, mimetype="application/json; charset=utf-8") |
This file contains 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
>>> kill -9 PID |
OlderNewer