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
/** | |
* checa se o username é igual ao do avaliador | |
* @param {string} username [description] | |
* @param {string} fieldText [description] | |
* @return {boolean} | |
*/ | |
var checkUsername = function (username, avaliadores) { | |
return ! avaliadores.indexOf(username) > -1; | |
}; |
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
-- SYS | |
DROP TABLE IF EXISTS `types`; | |
CREATE TABLE `types` ( | |
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | |
`item_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL, | |
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL, | |
PRIMARY KEY (`id`), | |
UNIQUE(`name`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
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
(function(exports) { | |
function WPForm() { | |
this.formEl = ''; | |
this.messagesEl = ''; | |
this.validationRules = {}; | |
this.payload = {}; | |
this.messages = []; | |
} |
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 | |
// template | |
// Usually you want to replace the following static array | |
// with a dynamic one built retrieving users from the database | |
$users = array( | |
array( | |
"fullname" => "Aurelio De Rosa", | |
"operations" => 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
#!/bin/bash | |
readonly WORKING_DIR=$(pwd) | |
readonly CONVERSION_DIR=/tmp/conversion | |
readonly LOG_FILE=$WORKING_DIR/conversion.log | |
remove_base_dir() { | |
local SED_BUFFER=/tmp/sed.buffer | |
echo $1 > $SED_BUFFER | |
sed -e 's/\/home\/pedro//g' $SED_BUFFER |
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
# Apache Server Configs v2.3.0 | MIT License | |
# https://github.com/h5bp/server-configs-apache | |
# (!) Using `.htaccess` files slows down Apache, therefore, if you have access | |
# to the main server config file (usually called `httpd.conf`), you should add | |
# this logic there: http://httpd.apache.org/docs/current/howto/htaccess.html. | |
# ############################################################################## | |
# # CROSS-ORIGIN RESOURCE SHARING (CORS) # | |
# ############################################################################## |
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
Técnicas de Pesquisa | |
As técnicas de investigação a serem utilizadas em um determinado estudo dependem das especificidades do objeto em análise. Dentre as principais metodologias utilizadas pelo IPO - Instituto Pesquisas de Opinião destacam-se as seguintes técnicas: quantitativas, qualitativas e estudos exploratórios. | |
Veja abaixo as principais diferenças entre as técnicas quantitativas e qualitativas: | |
As diferenças básicas entre o método de pesquisa quantitativa e método de pesquisa qualitativa | |
Etapas do processo de | |
pesquisa Método pesquisa | |
quantitativo Método pesquisa | |
qualitativo |
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
Maturity begins when you can be right without having to prove the other person wrong. | |
If you're the smartest person in the room, you're probably in the wrong room. | |
There is nothing noble about being better than your fellow man. Only being better than your former self. | |
No snowflake feels responsible for the avalanche | |
Fear... is forward. No one is afraid of yesterday. |
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
create table jobs( | |
id auto_increment not null primary key, | |
message text not null, | |
process_id varbinary(255) null default null, | |
key jobs_key(process_id) | |
); | |
# queue | |
insert into jobs(message) values('blah blah'); |
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
public function show() { | |
// Begin capturing the byte stream | |
ob_start(); | |
// generate the byte stream | |
imagejpeg($this->image, NULL, 100); | |
// and finally retrieve the byte stream | |
$rawImageBytes = ob_get_clean(); |