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 | |
declare(strict_types=1); | |
namespace Api2Bundle\Service; | |
use Doctrine\ORM\AbstractQuery; | |
use Doctrine\ORM\QueryBuilder; | |
use Doctrine\ORM\Tools\Pagination\Paginator; | |
use Symfony\Component\HttpFoundation\ParameterBag; | |
use Symfony\Component\HttpFoundation\Request; |
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
import { isUndefined, isArray, isObject } from '@/utils/function' | |
function capitalize(str) { | |
return `${str[0].toUpperCase()}${str.slice(1).toLowerCase()}` | |
} | |
function methodExist(context, methodName) { | |
return typeof context[methodName] === 'function' | |
} |
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
import Vue from 'vue'; | |
import { VSnackbar, VBtn, VIcon } from 'vuetify/lib'; | |
const message = Vue.observable({ | |
show: false, | |
message: '', | |
color: 'default', | |
timeout: 3000, | |
}); |
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 | |
function transformSituacao($situacao) { | |
return [ | |
'INDEFERIDO' => 'INDEFIRO', | |
'DEFERIDO' => 'DEFIRO' | |
][strtoupper($situacao)]; | |
} | |
function transformSituacao2($situacao) { |
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
async function getCityByZipCode(zipCode) { | |
if (zipCode instanceof String && zipCode.length === 8) { | |
return {} | |
} | |
try { | |
return await this.$viacep.buscarCep(zipCode) | |
} catch(exception( { | |
console.log(exception) | |
} |
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
sudo apt install wine-binfmt | |
cp /usr/share/doc/wine/examples/wine.desktop $HOME/.local/share/applications/ |
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 | |
defined( 'ABSPATH' ) || exit; | |
$order = wc_get_order( $order_id ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited | |
if ( ! $order ) { | |
return; | |
} |
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 | |
/* | |
* Usuarios Model | |
*/ | |
namespace Admin\Model\Table; | |
use Admin\Model\Table\AdminAppTable; | |
use Cake\ORM\Query; | |
use Cake\ORM\RulesChecker; | |
use Cake\Validation\Validator; | |
use Cake\Datasource\EntityInterface; |
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 | |
declare(strict_types=1); | |
use Migrations\AbstractMigration; | |
class CreateCollationNonDeterministic extends AbstractMigration | |
{ | |
const COLLATION_NAME = 'nd_unaccent_isensitive'; | |
/** | |
* Change Method. |
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
/** | |
* Adicionar campo de endereco (rua,av) | |
* @param {Object} address | |
* @param {Array} enderecos | |
* @param {Array} cidades | |
*/ | |
addCampoDeRua(address = {}, enderecos = [], cidades = []) { | |
this.addField('address_name') | |
.fieldAutoComplete() | |
.setPossibilities(enderecos, 'name', 'object') |