Questions tagged as 'funciones'

0
answers

In variable, assign value, change it in one function and pass the changed value to another

I'll get to the point; I'm doing something like this: public class clase{//clase principal int valor;//variable global if (post.containsKey("xempieza")) { if(valida()){ bit.bitHtml = recibedato(); //bit.bitHtml obtien...
asked by 18.04.2018 / 18:21
0
answers

How can I modify data a record with pointers in C? [closed]

In my program I have a struct students record where I input data from 3 students, ( name, age, phone ), into the program main ( main ) asks what you want to do, when selecting the option "modify", I need to modify some value entered, but in...
asked by 09.02.2018 / 21:47
1
answer

Error "only length-1 arrays can be converted to Python scalars" when using ndarray as a function

I have the following code in Python, I have problems in the penultimate line, I do not know if calling the method initial there is an error. Can you help me? import numpy as np from math import exp,ceil def initial (x): init=0.09...
asked by 01.02.2018 / 02:29
1
answer

Program to perform the average of a series of random dice rolls by means of functions

good, the program is based on making a series of random rolls of a die and make the average of this series of rolls. The number of runs is requested by the screen. The program is executed using the getRoundand perform Media functions. I do not k...
asked by 07.11.2017 / 22:29
1
answer

which means "return 32; "In c?

This is the exercise, I just wanted to know what you mean by:    return 32; #include <stdio.h> #include <stdlib.h> int bits(unsigned int n); int main() { unsigned int n=7,j; j=bits(n); printf("%d",j); return...
asked by 27.10.2017 / 23:38
2
answers

Incorrect operation of a character counter within strings in Python

Suppose I have the following sentence: oracion = 'Mi perro bonito come todas las noches' And I want to create a function that tells the occurrence of each character within it. To that end, we import string and create an alphabet that is our...
asked by 12.10.2017 / 07:21
1
answer

how can I "extract" from a string in C using fscanf?

I want to use fscanf () as a filter, for example if I do the following with a record with two fields, the first field is "ignored" and it reads the second field fscanf(fd, "%*d, %d", &numero) As I would if I want to read a part of the c...
asked by 17.10.2017 / 05:04
1
answer

Use the same variable in two PHP functions

<?php require_once 'config.php'; // INICIA FUNCION 1 function saveInvoice( array $data){ if( !empty( $data ) ){ global $con; $count = 0; if( isset($data['data'] )){ foreach ($data['data'] as $value) {...
asked by 26.07.2017 / 00:25
2
answers

Timer + JavaScript Semaphore

I'm making a timer that is a traffic light. At the moment of entering the values, for example 20 minutes are entered, and the green background should be. When 5 minutes remain, it should change to yellow, and when it is left in 0 min, it should...
asked by 06.10.2016 / 17:42
1
answer

Google Charts from PHP and JavaScript

I am developing a small tool to perform dynamic reports on a ticket tracking system. So far I'm doing the reports by hand, but I want to automate it. In these reports I would like to add some graphs that feed each month and form a small big d...
asked by 17.06.2016 / 05:35