Questions tagged as 'funciones'

2
answers

Error calling a T-SQL function

I have created a function with Transact-SQL that after the ISBN of a book returns 1 (if it exists) or 0 (if it does not exist), but calling the function gives me an error. The code: CREATE FUNCTION fn_llibre_ok (@isbn varchar(13)) returns bit...
asked by 12.06.2017 / 11:53
2
answers

How to discard an empty array in a function?

Hello everyone I am working with native js, in this function I return the product of the elements in the array, what I can not achieve is to discard the case of an empty array, it always shows me the 1, but if it resulted in change the value to...
asked by 29.12.2017 / 09:41
2
answers

C ++ declare data of an array as parameter

Let's say I have this: string opciones[] = { "Registrar estudiante", "Consultar estudiante", "Eliminar estudiante", "Atras" }; and I have a function like this: construir(string titulo, string opcion...
asked by 22.02.2017 / 18:54
2
answers

Why does a line of text about the functions in Visual Studio Code come up?

Hello for days in Visual Studio Code I get a text about the functions of my code: Complexity is 11 You must be kidding. (the frame with green arrow in the image) The number changes depending on the function. A colored square also co...
asked by 25.06.2018 / 18:37
4
answers

How to add an event to an element created with JavaScript

Create a button dynamically with javascript and now I want that when you click on it, a certain function will be executed that with jQuery would be as follows: $(".elemento").on("load", function() { // Codigo });...
asked by 16.05.2018 / 00:35
1
answer

Language C Functional dynamic memory

I want to reserve memory for a dynamic variable and assign value in the same function to avoid duplicating code, but I can not make the value take it in the main, it only remains in the function. Thank you very much #include <stdio.h> #i...
asked by 24.12.2017 / 21:55
1
answer

Count repeated numbers in an array

I have an array that will randomly have between 500 and 1000 positions. And in each position a value is saved that will be between 1 and 50. To get this array I have created the following functions: //Funcion numero aleatorio entre 1 y 5...
asked by 10.11.2017 / 03:28
2
answers

How to 'defragment' an array to make an insert in the database?

In my controller perform the following arrangement $DataPerson= array( 'documentos' => $this->input->post('documentos'), 'num_identificacion' => $this->input->post('num_identifi...
asked by 22.06.2017 / 18:52
1
answer

fatal error call to a member function prepare () on boolean in functions.php online 32

I am making a news system that is perfect in apache and in an online server. This error arises when running the site on a local server windows iis can be the php versions? has the 5.6 $bd_config = array( 'basedatos' => 'noticias',...
asked by 13.02.2017 / 15:36
2
answers

How to subtract values in an array (PHP)?

First I generate an array of 3 positions with random numbers, then I try to subtract the three values from the array. The problem is that if the first subtraction gives me a negative number the next value does not subtract it well. For example:...
asked by 29.11.2018 / 12:44