Questions tagged as 'string'

2
answers

Password Validator in C [closed]

I'm trying to solve the problem 2253 - Password Validator , but it is giving 10% wrong answer, but all my tests are working, can anyone find the error? #include <stdio.h> #include <string.h> #include <ctype.h> int validade(c...
asked by 24.09.2017 / 03:08
1
answer

How to manipulate strings with ".find"

Can I use ".find" to make the program search for a word within a typed text and say whether it exists or not (true or false) and in which line of text it is located, if not, which command use to do this? What I already have: a = str(input()) #...
asked by 25.10.2017 / 19:39
1
answer

How to display multiline text with format?

I'm trying for several consecutive lines with a single string along with the .format method, but I can not. a=input("digite algo; ") print("""contem maiusculos:{} contem: {}n\contem números: {} contem alfanumericos: {}""".format(a.i...
asked by 30.10.2017 / 18:46
2
answers

How to create a regular expression

I have the following div with information <div class="endereco-item"> <h2 class="azulclaro identify">Casa</h2> <div class="entrelinha_0"></div> <div class="font_15"></div> <div class="fo...
asked by 08.11.2017 / 02:53
2
answers

Decode data in Base64

I'm working with metadata of an image extracted in Json format. One of these data is a base64 binary string . I have read in a documentation that these values are 16 bits . Is there any way I can decode them and send them to an array automatic...
asked by 05.11.2017 / 19:59
2
answers

How to print the number of days of each month using Array, String and byte?

I'm trying this code, but it does not work. public class MesDias { public static void main(String[] args) { // Array String byte String Mes = {Jan, Fev, Mar, Abr, Mai, Jun, Jul, Ago, Set, Out, Nov, Dez}; byte[] Di...
asked by 04.01.2017 / 15:24
3
answers

How to print without line break in Python

matriz = [] def create_matriz(a, b): for contador in range(a): matriz.append( [0] * b ) def print_matriz(txt): cont = 0 for j in range(a): for i in range(b): if txt[cont] == "0": matriz[i][...
asked by 06.06.2017 / 06:15
3
answers

Remove spaces from a text file

How do I remove spaces from a text file? I have the following text file: LC1 00019 1 31012012 00001 00243206 I uploaded and put the following code: $abrirArquivo = fopen($uploadArquivo, "r"); wh...
asked by 15.10.2015 / 22:30
2
answers

Capture file name

I have a form that I look for the path of a file in .mdb (Access database), however I wanted to know how I can limit and exactly get the string of the file between the last bar of OpenFileDialog and the point of .mdb . S...
asked by 01.08.2016 / 15:26
1
answer

A comparison between 2 char (s) is wrong

I am manipulating a string with a loop for... that generates a new string of it, starting and ending of a certain position (would be "Hello" in that case). > When I compare the return of the manipulation with another string con...
asked by 15.05.2016 / 15:56