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
async searsh({params,request}){ | |
const { field, word } = request.only(['field','word']); | |
const page = params.page | |
const total = params.total || 20 | |
const data = await MDO | |
.query() | |
.where(field, 'like', `%${word}%`) | |
.paginate(page,total) | |
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
--------------------------------------------------------------------------- | |
ParserError Traceback (most recent call last) | |
<ipython-input-16-5eaf2be191b6> in <module>() | |
----> 1 df = pd.read_csv('exemplo.csv',sep=';') | |
~/anaconda3/lib/python3.6/site-packages/pandas/io/parsers.py in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, escapechar, comment, encoding, dialect, tupleize_cols, error_bad_lines, warn_bad_lines, skipfooter, doublequote, delim_whitespace, low_memory, memory_map, float_precision) | |
676 skip_blank_lines=skip_blank_lines) | |
677 | |
--> 678 return _read(filepa |
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
if(session()->has('busca') && !empty((session()->get('busca')))){ | |
$palavras = session()->get('busca'); | |
$dados = new Mdos(); | |
foreach ($palavras as $palavra){ | |
$dados = $dados->where('DESCRICAODOPRODUTO','like',$palavra); | |
} | |
$this->page['palavras'] = $palavras; | |
$dados->paginate(20); |
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
{% if dados.lastPage > 1 %} | |
<nav aria-label="Page navigation example"> | |
<ul class="pagination"> | |
{% if dados.currentPage > 1 %} | |
<li class="page-item"><a href="{{ this.page.baseFileName|page({ (pageParam): (dados.currentPage-1) }) }}">back</a></li> | |
{% endif %} |
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 | |
/** | |
* ContaPagarList Listing | |
* @author Fred Az. | |
*/ | |
class ContaPagarList extends TStandardList | |
{ | |
protected $form; // registration form | |
protected $datagrid; // listing | |
protected $pageNavigation; |
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
import React, { Component } from 'react'; | |
import { AppContext } from '../context/app'; | |
class Contador extends Component { | |
render() { | |
return ( | |
<AppContext.Consumer> | |
{context => { | |
<div> | |
<p>contador : {context.state.count}</p> |
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
import { combineReducers } from "redux"; | |
import { reducer as formReducer } from 'redux-form' | |
import CallReducer from "./calls"; | |
import LoginReducer,{MeReducer} from './login'; | |
const rootReducer = combineReducers({ | |
listCalls: CallReducer, | |
login:LoginReducer, | |
me:MeReducer, |
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
import React, { Component } from "react"; | |
import axios from "axios"; | |
import Cardcalls from "../components/cardcalls/cardcalls"; | |
import ModalCall from "../components/modals/modalcalls"; | |
import { Grid, Loader, Dimmer } from "semantic-ui-react"; | |
import { connect } from 'react-redux' | |
import {bindActionCreators} from 'redux' | |
import { featchCalls } from '../actions/callsAction' | |
class Calls extends Component { |
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 mtel(v) | |
{ | |
v=v.replace(/\D/g,""); //Remove tudo o que não é dígito | |
var res = v.replace(/\D/g,""); | |
//v=v.replace(/^(\d{2})(\d)/g,"($1) $2"); //Coloca parênteses em volta dos dois primeiros dígitos | |
//res = "(" + res.substring(0,2) + ")"; | |
if(res.length == 11) { | |
v = v.replace(/(\d{2})(\d{5})(\d{4})$/, "($1)$2-$3"); //Coloca hífen entre o quarto e o quinto dígitos | |
console.log(v); | |
} |
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
<template> | |
<div class="layout-padding"> | |
<q-data-table | |
:data="table" | |
:config="config" | |
:columns="columns" | |
/> | |
</div> | |
</template> |