Skip to content

Instantly share code, notes, and snippets.

@scriptdev
scriptdev / .php
Last active April 19, 2024 12:59
ENVIO DE EMAIL DO PHPMailer
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
/* SMTP - CONEXÃO
587 > TLS
465 > SSL
G-MAIL:
你长的怪像人殊不知是只人面犬
你的脸有碍观瞻
当初惊艳,完完全全,只为世面见得少。
嫉妒是一种不好的情感,我理解你嫉妒我有家人,可你这么说有点过分了
你自拍一张就是你的全家福
远看是美景,近看想报警
你在无中生有 你在暗度陈仓 你在凭空想象 你在凭空捏造 你在无言无语 你在无可救药 你是逝者安息 你是一路走好 你是傻子巴拉 你是永无止境 你是没钱买药 你是头脑有病 你是眼里有泡 你是嘴里刘能 你是污言秽语 你是咎由自取 你是殃及无辜 你是祸害众生 你是仓皇失措 你是暗度陈仓 你是无可救药
胖姑娘袭花衫,花都胖起来。
即使是做咸鱼,也要做最咸的那一条。
@scriptdev
scriptdev / .php
Created November 1, 2022 22:56
EXEMPLO GRÁFICO DE BARRAS ( VendaGraficoBarChart )
<?php
class VendaGraficoBarChart extends TPage
{
private $form;
private $loaded;
private static $database = 'exemplos';
private static $activeRecord = 'VendaGrafico';
private static $primaryKey = 'id';
private static $formName = 'form_VendaGrafico';
@scriptdev
scriptdev / .php
Last active April 19, 2024 12:57
SALVAR IMAGEM NO FORMULÁRIO ( TFile + TImage)
<?php
use Adianti\Base\AdiantiFileSaveTrait;
public function __construct( $param )
{
parent::__construct();
@scottmatthewman
scottmatthewman / AdaptsToSoftwareKeyboard.swift
Last active April 19, 2024 12:56
An example of using Combine to automatically adapt a SwiftUI scrollable view to accommodate an iOS onscreen keyboard
import SwiftUI
import Combine
struct AdaptsToSoftwareKeyboard: ViewModifier {
@State var currentHeight: CGFloat = 0
func body(content: Content) -> some View {
content
.padding(.bottom, currentHeight)
.edgesIgnoringSafeArea(.bottom)
@scriptdev
scriptdev / .php
Created November 2, 2022 08:16
INTEGRAR MENSAGENS DA BIBLIOTECA SweetAlert2 NO ADIANTI
<?php
/* IMPORTAR O CSS e JS DO sweetalert2 NO HTML
<link href="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/11.4.18/sweetalert2.css" rel="stylesheet" type="text/css" media="screen" />
<script src='https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/11.4.18/sweetalert2.js' type='text/javascript'></script>
*/
TScript::create("
Swal.fire(
'SUCESSO!',
@scriptdev
scriptdev / .sql
Last active April 19, 2024 12:55
ATRIBUIR DATA NO CAMPO date DO CADASTRO POR PADRÃO AO INCLUIR O REGISTRO
CREATE TABLE cliente(
`data_cadastro` date DEFAULT 'CURDATE' # MySQL
`data_cadastro` date DEFAULT 'CURRENT_DATE' # PostgreSQL
@scriptdev
scriptdev / .php
Created November 4, 2022 00:45
AÇÃO ESTÁTICA
<?php
$btn_avancar->setAction(new TAction(['onFuncao', 'onShow'],['static' => 1]), "AVANÇAR");
@scriptdev
scriptdev / .php
Last active April 19, 2024 12:54
FILTRO (REGRA DE CARREGAMENTO" USANDO O OPERADOR IN
<?php
# VIA CÓDIGO
$filterVar = array('0001', '0002');
$criteria->add(new TFilter('codigo', 'in', $filterVar));
# NO ADIANTI BUILDER
=['0001','0002']
@scriptdev
scriptdev / WelcomeView.php
Created November 5, 2022 05:34
TELA INICIAL WelcomeView COM IMAGEM
<?php
class WelcomeView extends TPage
{
function __construct()
{
parent::__construct();
$html = new THtmlRenderer('app/resources/welcome_logo.html');
$html->enableSection('main', array());