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
in main.js | |
import VueI18n from 'vue-i18n' | |
import lang from './language/lang' | |
const i18n = new VueI18n({ | |
locale: 'pt-BR', // set locale | |
messages: lang // set locale messages | |
} |
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
The code of component! | |
The impportant thing here is the event input, this name must be exactly this to vue handle the bind of value propoerty outside de component! | |
<template lang="html"> | |
<div> | |
<div | |
id='on' | |
@click="switched(true)" | |
:class="{active: value}">On</div> |
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
class Cubo { | |
int[] num = {1,2,3,4,8,6,7,5,9}; | |
int t = 0; | |
public static void main (String args[]){ | |
new Cubo(); | |
} | |
Cubo(){ |
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
# tira um print da tela e manda em anexo via e-mail | |
echo "Assunto:"; | |
read ASSUNTO | |
echo "Destinatário"; | |
read EMAIL | |
# gera o jpg da tela | |
import tela.jpg |
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
<script type="text/javascript" src="http://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
google.load("language", "1"); | |
function translate(palavra) { | |
google.language.translate(palavra, 'pt', 'en', function(result) { | |
if (result.translation) { | |
alert(result.translation); | |
} |
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
/** | |
* somar_dias_uteis | |
* | |
* @abstract Soma dias úteis a uma data | |
* | |
* @param unknown_type $str_data data original | |
* @param unknown_type $int_qtd_dias_somar dias que serão somados | |
* @param unknown_type $formato formato da saida | |
* | |
* @return string |
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
/** | |
* moeda | |
* | |
* @abstract Classe que formata de desformata valores monetários em float e formata valores | |
* de float em moeda. | |
* | |
* @author anselmo | |
* | |
* @email anselmobattisti arroba gmail.com | |
* |
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 | |
/** | |
* Retorna dados sobre o endereço | |
* | |
* @url http://code.google.com/apis/maps/documentation/v3/reference.html#GeocoderRequest | |
* | |
* @autor Anselmo Battisti ([email protected]) | |
*/ | |
define("URL","http://maps.google.com/maps/api/geocode/json?address="); |
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
class xml2array { | |
function xml2array($xml) { | |
if (is_string($xml)) { | |
$this->dom = new DOMDocument; | |
$this->dom->loadXml($xml); | |
} | |
return FALSE; | |
} |