All Questions

3
answers

Functions with parameters of type TextBox and Buttons

I have a program that at one point works with the visibility of an object. I'm creating a function and I do not know how to reference objects. private void Visible(object x, object y, object z, object a) { x.Visible = true; y.Visi...
asked on 28.05.2015 / 16:57
3
answers

Concatenation or sequencing of data: Which one performs best?

A few days ago I was writing articles about PHP, in which I was asked about a possible improvement in large scale when developing applications in PHP. The assumption was as follows: Printing data via echo of PHP is extremely used at...
asked on 23.06.2017 / 17:16
3
answers

Variable is not updated in constructor

I'm learning OO and venturing into PHP, but I've come across something I believe in theory should work, but in practice it does not. <?php class Users{ public $name; public $idade; public $email; private $senha; function __co...
asked on 30.08.2016 / 23:04
4
answers

Check if string has only numbers

What command can I use to know if a string contains only numbers? For example, I'm using prompt : var quantidade=prompt('Quantidade de entrada de produtos(somente números)'); I would like to check if actually in the variable qua...
asked on 01.04.2014 / 16:46
4
answers

How do I make a DropDownList linked with a model property?

I have my class: public class Topico { public int Id { get; set; } public string Nome { get; set; } public string Observacao { get; set; } } and my SubTopic class public class SubTopico { public int Id { get; set; } pu...
asked on 27.05.2014 / 23:47
2
answers

How can I create a regular expression that accepts a certain number at most once

I'm learning how to use Regex and would like to know if I can get it to accept a maximum of 2 in some sequence (it may contain letters or numbers) Eg: "sskfdam09471928" Approved "asldk02210920139" Disapproved by repeating twice     
asked on 03.07.2018 / 23:05
3
answers

How to replace a given string inside another Javascript string?

How can I replace only a certain part of a string ? Example: var linha_nova = "EU TENHO UM CACHORRO"; I want to replace only the word "UM" with another. How should I proceed? I also need to replace with the known position of the...
asked on 24.05.2014 / 20:10
3
answers

How to change a text variable to number value?

I have this segment of code, I would like someone to help me in transforming the variable P (in which it takes the attribute 'value') and transform it into number value for the sum. $(document).ready(function(e) { $('.pizzad...
asked on 03.12.2016 / 01:41
3
answers

Redeem only 10 first Python object records

I'm curled up in a part of the code I'm doing. I need to retrieve only the first 10 records of an object that I call in a for loop: listaTabela = [] for aluno in alunos: listaLinha = "" listaLinha += str(aluno.g...
asked on 18.07.2018 / 16:39
3
answers

Error creating a MySQL database via PHP in WampServer

I have a problem when creating the database, on the net I found little content about, only meeting how to mount database by phpMyAdmin, but it is via script that I want to create. > I have the following code: <?php $mysqli = new mysqli...
asked on 28.09.2014 / 14:52