All Questions

5
answers

How to create a vector without determining its size in java?

I have a TesteAplicacao class that is to test and a Teste class with attributes and methods. When creating a vector in Java: Teste[] t = new Teste[10];// veja que teve definir um tamanho Would you like to create vector wit...
asked on 03.03.2016 / 17:24
3
answers

Which regular expression can I use to remove double spaces in Javascript or PHP? [duplicate]

Which regular expression can I use to remove excess white space? I mean, leave them with the amount of standard spaces. Example From: $string = 'Estou no Stack Overflow em Português '; To: $string = 'Estou no Stack Overflow...
asked on 21.08.2015 / 18:14
3
answers

Can anyone see my projects on Github?

Personal greetings I'm starting there with the concepts of GitHub and would like to know when I put my project there it is accessible for all people with the option to download. If yes,      Is there a way to remove this download option? I...
asked on 03.10.2016 / 15:26
4
answers

Should I use a "try-catch" to identify if a password is wrong?

In the login screen, I check the bank with select , and I'm using catch to catch this exception. Is it correct to use catch for this type? if (Usuario != string.Empty && Password != string.Empty) {...
asked on 21.07.2016 / 16:04
4
answers

I need to block ctrl + v in a text box

I want to create an input type="text" that does not allow anything to be pasted into it. You do not need to have any alert or anything, just do not allow the paste.     
asked on 27.02.2014 / 01:58
5
answers

Test for string padding

When I read a post about good programming practices, more related to validating string fills, I came across the following: Check too slow: string ret = String.Empty; if (string.IsNullOrEmpty(ret)) Slow check: string ret = String.Empt...
asked on 29.08.2018 / 14:03
4
answers

What is the difference between "notice" and "warning" in PHP?

I always see programmers saying, "Ah, if you do, you'll get a notice , but if you do, you get a warning ", so I got the debt: What's the difference between them?     
asked on 23.02.2017 / 20:58
4
answers

How to find hashtags in a string and store them in an array?

I have a system for posting content on a certain social network of our company. When the user enters text with hashtags , I need to detect all of them and store them in an array. Example:    Hello, I'm posting this # question to #...
asked on 19.10.2015 / 17:47
3
answers

How can I replace a part of a string by itself plus the character "~"?

How can I replace a part of a string with itself plus the "~" character? I am doing this as follows: only when the string has two equal numbers like the 51 that comes shortly after AP and the contained in 17 51 3322 Replace does...
asked on 15.06.2016 / 20:49
3
answers

Fill string with leading zeros

I'm doing an OS work and need to turn decimal numbers into binaries. So that's fine, because the method below takes an integer and converts to binary. My problem is this: When I put it, for example (integer 1), it returns me correctly 1. But...
asked on 30.10.2014 / 11:34