All Questions

2
answers

How to check if a given sequence of elements exists in R?

I have a vector like this: vectorx<-c(3,3,1,1,1,2,2,2,2,2,2,2,2,2) and I want to check if the sequence 3,3,1,1,1,2 exists. It turns out that this sequence can be in any position of the vector, I just want to know if this sequence specifi...
asked on 27.11.2017 / 22:25
2
answers

How to prevent the user from making changes in the input?

I have input in a form, but it should not have its value changed: <input type="text" name="pais" value=""> How can I prevent the value from being changed? <!DOCTYPE html> <html> <body> <form action="/act...
asked on 17.11.2017 / 17:31
2
answers

How do I know if the screen is in "Extend" mode?

I want to make a if to know if the screen is in "Extend" mode. Example: (Win + P) HowcanIdothisinC#:if(?)//sópodeentrarnoif,seatelaestánomodo"Estender". { SegundaTela formulario = new SegundaTela(); Screen[] telas = Screen....
asked on 19.10.2017 / 22:23
3
answers

What is the correct way to concatenate strings in JavaScript?

I started learning Python and was told I should not concatenate the strings with , but use the .format() method. And in JavaScript is it correct to use + or , to concatenate strings or is there a more recommended and...
asked on 23.08.2017 / 01:18
3
answers

Replace part of a String in Java

I have Strings that repeat themselves, just changing a word. I have a case to mount the email content, but I do not want to repeat the entire string, and the only value that will be different is whether it is front-end, backend, mobile, e...
asked on 19.09.2017 / 05:06
2
answers

How to limit decimal numbers in Python?

How do I format a decimal number in Python for a given amount? For example, I want to display only two decimal places of the following number: numero_decimal = 3.141592653589793 How could I turn this number to 3.14 ?     
asked on 09.01.2017 / 19:51
4
answers

Problems with conditional structures

I started programming shortly and I'm doing some Python exercises. The problem is that the result variable always returns "Approved" even when the concept is "D" or "E". I have already broken my head and can not see the error.    Make a...
asked on 18.08.2017 / 22:18
2
answers

Handle JavaScript window.history

Is there any way to list the URL's of window.history ? If I want to use window.history.go(-2) , can you know which URL this -2 will return?     
asked on 17.08.2016 / 20:01
2
answers

Error adding information in DB

When testing the application where I migrated the Firebird DB to PostgreSQL, the following error occurs when trying to save an item in the database: Reviewing the code I could see that the error actually occurs at this point in the code...
asked on 21.11.2016 / 20:58
2
answers

How do I convert an enum type to list?

Is there any way to convert a Enum to List ? public enum TiposHospedagem { Casa = 1, Hotel = 2, Pousada = 3, CasaCampo = 4 } I'm trying to get enum and add to the list, but foreach does not want to...
asked on 31.08.2016 / 17:13