Questions tagged as 'switch'

1
answer

Using Switch Case for Intervals

My teacher passed an exercise in which we should use the cases of a switch to handle intervals, he said strictly that we should use the switch and we can not use if nor while/do . I've tried the following code: switch(saldo)...
asked by 24.11.2017 / 18:17
1
answer

How to condition e-mail content with chosen variable in form?

I am trying to condition the format of the email sending by a certain option chosen by the user, in the Subject / Script field: If the option is SCRIPT, the contents of the $ html variable will be sent. If it is INFORMATION, the contents of the...
asked by 02.12.2018 / 15:08
0
answers

Use the NgSwitch function inside php masi at once

            selection={{selection}}             Settings Div       Home Span       default            (function (angular) {   'use strict'; angular.module ('switchExample', ['ngAnimate'])   .controller ('ExampleController', ['$ scope', fu...
asked by 22.10.2018 / 20:53
0
answers

How can I make a switch run in parallel with another switch?

I made this code to move a character to a college job, but I wish that when I pressed the 'a', I could still walk and the ship would not be erased, just as I could press the 'a' several times and I got a lot of shots, I took a look at the pthrea...
asked by 11.07.2018 / 16:07
0
answers

Android studio, Switch Method hangs the app

I'm having a problem with the Android studio switch, I just can not seem to manipulate it with its data because it simply hangs the app in the VM. MAIN.Java A question, are these changes in MAIN.JAVA or in Fragment?     
asked by 20.06.2018 / 21:19
2
answers

Switch case on submit button according to button ID

I have 7 submit buttons on a form. Being: Four of that: <input type="submit" id="chamado1" class="mr-abre-btn" value="Abrir chamado"> Two of these: <input type="submit" id="chamado2" class="mr-abre-btn" value="Encaminhar chama...
asked by 19.10.2017 / 22:20
1
answer

Problems scanning strings inside the switch command (C)

I am trying to make a program that encodes and decodes strings that are given by the user by the cesar method, using switch-case to select what should be done, however when trying to read a string inside the case of the case this occurs) the pro...
asked by 27.05.2017 / 20:28
1
answer

How do I make a button class switch that triggers a player to appear and hide?

I have 3 buttons in the Link format with classes: .icon-play, .icon-pause and .icon-download, I want to change the play class with pause, as well as the inverse without influencing the download button , once the icon-play is clicked it will show...
asked by 05.04.2017 / 17:15
1
answer

Counters not being incremented in code

I'm having some difficulties with the code snippet below: The call to this function is: cache = OperaCache(true , endereco, op, cache, descricao, read_hits, read_misses, write_hits, write_misses); VETOR_CACHE OperaCache(bool conta...
asked by 23.11.2016 / 13:50
2
answers

What's the difference between Switch, Case and If, Else?

I would like to know the difference between switch .. case and if .. else . What offers better "performance"?     
asked by 13.04.2015 / 20:33