Skip to content

Instantly share code, notes, and snippets.

View josue1dario2's full-sized avatar
🎯
Focusing

Josue Solis josue1dario2

🎯
Focusing
  • Argentina
View GitHub Profile
app.get('/update-all-training-phrases', async (request, response) => {
try {
const { agentId } = request.query;
functions.logger.info('/update-all-training-phrases >> agentId', agentId);
if (isUndefined(agentId) || isEmpty(agentId.trim()))
return response.status(400).send('AgentId es requerido').end();
const entityTypesClient = await handleEntityTypesClient(agentId, response);
if (entityTypesClient.error) {
const { statusCode, message } = entityTypesClient.error;
import axios from 'axios';
const BASE_URL_API = 'https://erp.duxsoftware.com.ar/WSERP/rest/services';
export async function getItems(){
try{
const response = await axios({
url: `${BASE_URL_API}/items`,
method: 'GET',
headers:{
@josue1dario2
josue1dario2 / gist:9311385dbee147c3c094f062f37ccf57
Last active November 6, 2023 14:08
Test library compromise
const datos = require('./datos.json');
const nlp = require('compromise');
const expresionRegular = /(\d+\s*\"|\d+[A-Za-z]+|\d+\s*\w+|[A-Za-z]\d+|A54)/gi;
let lista = [];
datos.entry.map((obj, index) => {
if (index < 5) {
public void enableOrDisableDeveloper(Long id) {
Optional<Desarrollador> devOptional = desarrolladorRepository.findById(id);
if (devOptional.isPresent()) {
Desarrollador desarrollador = devOptional.get();
boolean isCurrentlyDeleted = desarrollador.getDeleted();
desarrollador.setDeleted(!isCurrentlyDeleted);
desarrolladorRepository.save(desarrollador);
}
class DropDownScreen extends StatelessWidget {
const DropDownScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Container(
//color: Colors.amber,
height: 250,
class AlertScreen extends StatelessWidget {
const AlertScreen({super.key});
void displayDialog(BuildContext context) {
showDialog(
barrierDismissible: false,
context: context,
builder: ((context) {
return AlertDialog(
elevation: 5,
class Screen3_1 extends StatelessWidget {
const Screen3_1({super.key});
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
appBar: const MyAppBar(
title: 'Nueva obra', icon: Icon(Icons.close), isIcon: true),
body: Column(
class Screen3_1_dropdown extends StatelessWidget {
const Screen3_1_dropdown({super.key});
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
appBar: const MyAppBar(
title: 'Nueva obra', icon: Icon(Icons.close), isIcon: true),
body: Column(
class LogoButton extends StatelessWidget {
const LogoButton({super.key, required this.navigator});
final Widget navigator;
@override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;
return MaterialButton(
onPressed: () {
class CustomerButton extends StatelessWidget {
const CustomerButton({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
children: const [
SizedBox(