Skip to content

Instantly share code, notes, and snippets.

import React, { Component, useState, useEffect, useRef } from 'react';
import { View, Text, StyleSheet, TouchableHighlight, Animated, Button, Alert, TouchableOpacity, Image, FlatList, Dimensions} from 'react-native';
function Schema0 (props){
//const [doAnimation, setDoAnimation] = useState(false);
const [forma_pagamento, setforma_pagamento] = useState(0);
function handleAdd(valor) {
//console.log('aqui é o log do handle '+valor+' e '+forma_pagamento)
props.onSubmit({valor:valor.valor,escolha:valor.pagamento})
chave = $('#get_chave').val();
codigo_prod = $(this).attr("id");
cod_fabri = $(this).attr("data-cod-fabr");
$(document).on('keyup focus','#input_ean',function(e){
if($(this).val().length > 6 || $(this).val().length < 4){
$(this).addClass('is-invalid');
if(e.keyCode != 13){
$(this).popover({trigger:'focus',placement:'bottom',content:'O código EAN está maior ou menor que a quantidade padrao.'})
$(this).popover('show')
}
{
"base": [
{
"ordem": 1,
"codigo_produto": 1312,
"nome_produto": "CAIXA ACOPL SINGLE BRANCA ARIES MAX ETERNIT",
"codigo_barras": 7898959445774,
"codigo_ncm": 69109000,
"quantidade": 3,
"valor_unitario": 77.3,
$model['sefaz'] = array();
$array_sefaz_0 = array();
$tabelas = $dom->getElementsByTagName('table');
foreach($tabelas as $node){
if($node->nodeName=='table' && $node->getAttribute('class')=='toggle box' OR $node->getAttribute('class')=='toggable box'){
if($node->getAttribute('class')=='toggle box'){
foreach($node->childNodes as $child){
$cols = $child->getElementsByTagName('td');
$array_sefaz_0['numero_item'] = (int)$cols->item(0)->nodeValue;
$array_sefaz_0['nome_produto'] = $cols->item(1)->nodeValue;
$dom = new domDocument;
$dom->loadHTML($value);
$model['sefaz'] = array();
$array_sefaz_1 = array();
$array_sefaz_0 = array();
$tabelas = $dom->getElementsByTagName('table');
foreach($tabelas as $node){
if($node->nodeName=='table' && $node->getAttribute('class')=='toggle box' OR $node->getAttribute('class')=='toggable box'){
if($node->getAttribute('class')=='toggle box'){
foreach($node->childNodes as $child){
import requests
from bs4 import BeautifulSoup
from random import choice
#from requests import session
user_agents = [
'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11',
'Opera/9.25 (Windows NT 5.1; U; en)',
'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)',
'Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko) (Kubuntu)',