Questions tagged as 'switch'

1
answer

Android Switch picking up Varialvel

I have a Switch component and would like to get its status if it is on or off. When searching the net for the examples I got it did not work but it worked fine but it only takes the value when I make the on / off change because of the setOnChec...
asked by 18.10.2017 / 16:02
1
answer

use of regex in a switch

I'm trying to use regular expressions to validate a switch, however, it occurs to me on the console that "day.match" is not a function: function dayOfWeek(day){ var regex = /[1-7]/g; if(!day.match(regex)){ day == 8; } switch(...
asked by 20.10.2017 / 19:01
1
answer

Text changes on label with switch

Do you know that initial Pokemon conversation?    "Welcome to the pokemon world" - ENTER   "Are you a girl or a boy?" -ENTER   CONTINUE .... So, I'm trying to do one through Java swing, at the moment it looks like this: private void j...
asked by 29.05.2016 / 02:12
1
answer

Problem with the code structure inside the switch case

When choosing option 1 (easy) the program enters case 1 correctly, but when I choose the port (0, 1 or 2) it returns to the menu, the goal is that if the port is right, the next line with the new port sequence (second line of the array) and if i...
asked by 26.04.2015 / 13:59
1
answer

Switch Doubt

I have a dialog with Switch and I programmed with Click to change and now I need to do the same thing when the user drags the Switch from off to on or to the opposite. public void Dialogo_Setor() { dialog.setTitle("Setores"); final Swi...
asked by 11.03.2015 / 20:26
1
answer

Problem to enter Switch

Good afternoon, when executing the program below, after typing the third note, the program ends without typing the letter required to enter the switch. I tested with "i" getting integer and the program worked. Thank you. float media_aritmet...
asked by 19.11.2017 / 16:39
1
answer

Data does not persist in switch case

Write a program that lists the names, height, weight, cpf, and sex of some people. With the data entered, then locate a person through your CPF and print your BMI. When I choose the Query option, the data that was entered before does not rema...
asked by 04.10.2017 / 04:39
2
answers

how to use a switch inside a switch?

In case, I can not choose the menu option to select difficulty, am I doing the correct way the switch inside a switch? #include <stdio.h> #include <stdlib.h> #define TENTF 5 #define TENTD 3 int main() { char opcao; int n...
asked by 22.04.2016 / 21:53
1
answer

Switch case checkbox

I need a different phrase to be entered when checking the options of a checkbox , even if I check two or more different checkboxes. In this case down, I used switch but I'm having trouble getting the correct answers. How can I do th...
asked by 29.12.2015 / 13:51
1
answer

Switch in ZF 1 Application.ini configuration

Inside the Zend Framework Application.ini I have the following configuration: resources.multidb.sga.adapter = "PDO_MYSQL" resources.multidb.sga.host = "host.acula.net" resources.multidb.sga.username = "usuario" resources.multidb.sga.password...
asked by 04.11.2014 / 19:18