Skip to content

Instantly share code, notes, and snippets.

View wesleyguirra's full-sized avatar
🃏
Open to work

Wes Guirra wesleyguirra

🃏
Open to work
  • Brasilia
  • 05:43 (UTC -03:00)
View GitHub Profile
<script>
import CcButton from './Button'
import { getMedics } from '../services/medics'
export default {
data () {
return {
medics: ''
}
},
components: {
<template>
// ...
</template>
<script>
// ...
methods: {
handleSubmit (name) {
this.$refs[name].validate((valid) => {
if (valid) {
this.login(this.formValidate).then(() => {
<?php
//protected/config/common.php
return [
'components' => [
'i18n' => [
'class' => 'humhub\components\i18n\I18N',
'translations' => [
'base' => [
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@config/messages/humhub'
@wesleyguirra
wesleyguirra / index.php
Last active October 11, 2019 21:53
funcao recursiva para calcular fatorial de um numero e passagem de parametros por referencia
<?php
// funcao recursiva para calcular fatorial de um numero
function fator($valorx) {
if ($valorx <= 1) {
// caso o valor seja menor ou igual a 1 a funcao ira retornar o proprio valor
return $valorx;
} else {
// senao ela multiplicara o valor pelo retorno dela mesma so que dessa vez diminuindo 1 do nosso parametro
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/css/bootstrap.css">
</head>
<body>
<div class="container-fluid" id="elemento">
This file has been truncated, but you can view the full file.
{
"bot": {
"chatSystem": {},
"factSystem": {
"db": {},
"level": {
"domain": null,
"_events": {},
this.state.companyExists ? (
<Stage key={'Cadastro Empresa'} noPrevious continue={() => true}>
{(instance, context) => (
<View>
<View>
<Text style={styles.title}>{'Cadastre sua empresa'}</Text>
</View>
<View style={styles.inputContainer}>
<Icon name='home' size={18} color='gray' style={styles.icon}/>
import React from 'react';
import { Animated, Dimensions } from 'react-native'
// também os componentes SVG que vamos utilizar da lib react-native-svg
import Svg, { Defs, LinearGradient, Path, Stop } from 'react-native-svg';
// Por padrão nossos componentes SVG não são animados
// para que possamos trabalhar com animações
// vamos precisar criar componentes animados
// podemos fazer isso com o método createAnimatedComponent da Animated API
const AnimatedPath = Animated.createAnimatedComponent(Path);
import React, { Component, Fragment } from 'react';
import { Image, ScrollView, StyleSheet, Text, View } from 'react-native';
import AnimatedHeader from './components/AnimatedHeader';
import WomanPicture from './assets/images/woman.png';
export default class App extends Component {
render() {
return (
<Fragment>
<AnimatedHeader style={styles.header}>
@wesleyguirra
wesleyguirra / AnimatedHeader.js
Last active November 18, 2022 20:31
[Code Tutorial] AnimatedHeader with path curve via prop
import React from 'react';
import { Animated, Dimensions } from 'react-native'
import Svg, { Defs, LinearGradient, Path, Stop } from 'react-native-svg';
const AnimatedPath = Animated.createAnimatedComponent(Path);
const screenWidth = Dimensions.get('window').width;
const height = (32 * screenWidth) / 64;
const AnimatedHeader = ({ children, curve }) => {
return (