Questions tagged as 'array'

1
answer

Problem removing all attributes of an object that contains null values

Context I'm inside an application in NodeJS, where I have a fairly large object that has several attributes and also attributes objects that have children, and I have a situation where I can not keep the attributes containing null values, so...
asked by 28.11.2018 / 23:26
1
answer

Keep alive object in memory for another class

Hello! I have a very simple question, as I have already found a solution for her, but it still seems problematic to me. I'll explain: I created a web service connection to receive some data, and in the end I am storing this data in a dictiona...
asked by 15.07.2014 / 18:00
1
answer

How to check if the vector of a record is empty in C

I have this record: typedef struct{ char nome[200], telefone[200], email[200]; } Agenda; Agenda contato; Agenda vetor[300]; And I want to print only those records that have data: int lista_contatos(void){ printf("========== Cont...
asked by 29.10.2018 / 15:55
2
answers

Incorrect jQuery Array

asked by 12.06.2015 / 18:08
2
answers

How do I add more elements to an array in php

I am creating a function to validate form data, and wanted to know how I add the errors to array , every new error it adds in the array ??? <?php // Função criada para validar todo tipo de formularios em uma unica função \ function...
asked by 25.07.2018 / 13:09
2
answers

str_replace using arrays

I want to negate the searched terms in the results, but when I use explode , and I try to use str_replace , I get an array back. <?php $search_term = filter_var( $_GET['s'], FILTER_SANITIZE_STRING ); $palavras = explode( ' ',...
asked by 10.10.2014 / 19:03
3
answers

Sort sequence numbers from a TXT file

I have a TXT file with numbers separated by spaces and I want to sequence from the smallest number to the largest, only the numbers on the first line of that file. The sequencing logic I believe I have achieved: tam_entrada = len(lista) for i...
asked by 03.07.2018 / 04:47
2
answers

Difficulties in searching for values in an array

The following code is an increment code in an array. However, I have not been able to select any value from the array. If I give print_r to it, it shows all but if I try to access with $guarda_array[1] it returns Array an...
asked by 14.06.2018 / 12:57
1
answer

Array split with array_push for multiple INSERT in SQL

I have a foreach looping in a file's data, this loop generates some values that are entered in array with array_push , precise break those values entered in this array to generate multiple INSERT INTO because...
asked by 01.05.2018 / 04:10
1
answer

How to assign a value treated in the function to my vector?

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #define TAM_Min 1 #define TAM_Max 500 /* Sintese Objetivo: Classificar animais de um zoologico segundo seu peso Entrada: Numeros de animais do...
asked by 28.03.2018 / 20:31