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
<?xml version="1.0" encoding="utf-8" ?> | |
<!-- SQL XML created by WWW SQL Designer, https://github.com/ondras/wwwsqldesigner/ --> | |
<!-- Active URL: http://ondras.zarovi.cz/sql/demo/ --> | |
<sql> | |
<datatypes db="mssql"> | |
<group label="Integer" color="rgb(238,238,170)"> | |
<type label="TinyInt" length="0" sql="tinyint" re="INT" quote="" bytes="1" note="Integer data: 0 to 255"/> | |
<type label="SmallInt" length="0" sql="smallint" re="INT" quote="" bytes="2" note="Integer data: -32,768 to 32,767"/> | |
<type label="Int" length="0" sql="int" re="INT" quote="" bytes="4" note="Integer data: -2,147,483,648 to 2,147,483,647"/> | |
<type label="BigInt" length="0" sql="bigint" re="INT" quote="" bytes="8" note="Integer data: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807"/> |
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
import 'dart:convert'; | |
Map<String, dynamic> parseJwt(String token) { | |
final parts = token.split('.'); | |
if (parts.length != 3) { | |
throw Exception('invalid token'); | |
} | |
final payload = _decodeBase64(parts[1]); | |
final payloadMap = json.decode(payload); |
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 | |
use Slim\Http\Request; | |
use Slim\Http\Response; | |
use Slim\Http\Stream; | |
$app->get('/stream', function (Request $request, Response $response, array $args) { | |
// a 100mb file | |
$path = '../public/files/document.pdf'; |
Here I have 2 methods for running portainer on windows, a quick, preferred method only requiring a fairly recent version of docker, or a more complicated method to try if that does not work.
This setup will let you run Portainer on windows by using the docker.for.win.localhost endpoint.
Please note:
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
import 'dart:async'; | |
// Creditos | |
// https://stackoverflow.com/a/52922130/7834829 | |
class Debouncer<T> { | |
Debouncer({ this.duration, this.onValue }); | |
final Duration duration; | |
void Function(T value) onValue; |
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
import 'package:dio/dio.dart'; | |
class ApiBaseHelper { | |
static final String url = 'BASE_URL'; | |
static BaseOptions opts = BaseOptions( | |
baseUrl: url, | |
responseType: ResponseType.json, | |
connectTimeout: 30000, | |
receiveTimeout: 30000, | |
); |
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
/********************************************************** | |
* COSAS SIMPLES CON TIPOS PARA IR ABRIENDO BOCA. | |
*********************************************************/ | |
/* Una interfaz que maneja datos en una agenda de contactos. */ | |
interface Person { | |
/* Datos personales sobre esta persona. */ | |
name: string; | |
age: number; | |
city: 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
CREATE TABLE tone_data_temp AS | |
SELECT file_name, last_update, category, word_count, litigious, | |
positive, uncertainty, negative, modal_strong, modal_weak | |
FROM bgt.tone_data; | |
DROP TABLE bgt.tone_data; | |
ALTER TABLE tone_data_temp RENAME TO tone_data; | |
ALTER TABLE tone_data SET SCHEMA bgt; |
OlderNewer