Questions tagged as 'string'

1
answer

Search for text in a String as a "like"

I want to do a text search, like the ones I do in MySQL. Ex: LIKE "9% 4" I tried to implement a find_if() , but without success. #include <iostream> #include <string> #include <algorithm> using namespace std; int m...
asked by 12.07.2016 / 09:44
2
answers

Convert an IPAddress to string

This code gets the default gateway , but I can not convert the result to string and put it in a label . public static IPAddress GetDefaultGateway() { var card = NetworkInterface.GetAllNetworkInterfaces().FirstOrDefault(); if(c...
asked by 24.06.2016 / 02:24
1
answer

How can I put a variable inside a resource string?

How can I put a variable within a resource string? I have the following string: <resources> <string name="card_closed">O cartão Nº _var_ está fechado! </string> </resources> How can I put my variable _var_...
asked by 27.06.2016 / 16:21
1
answer

Decrypt a code (so I understand it is in ASCII)

Well, basically I would like to know if there is any way to transform a script written in ASCII into Characters and if so, how would I transform it? Code (1) local code = '7 minimize = true -- minimizar a mainbp? bps = 1 -- quantidade d...
asked by 19.07.2016 / 19:04
2
answers

Transform a JSON string into a non-associative array in PHP

Good afternoon, I would like to convert a string to a non-associative array in PHP, functions like json_encode / json_encode are not working properly. String:    word = '{"world": ["CE", "Supply"], "regional": ["CSC"   RJ / Verticalized...
asked by 19.10.2016 / 16:08
1
answer

Error sending request - get.

Considering the code below: path = "/admin/" host = "192.168.1.1" s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((host, 80)) req = ("GET /"+path+" HTTP/1.1\n Host: %s \r\n\r\n", host) s.send(req) print(s.recv()) s.close()...
asked by 22.05.2016 / 00:59
1
answer

string comparison + linkedList

Good evening, I'm trying to compare a string with a linked list but I'm not having success, the linked list is being returned a value from another function, but I'll put the linked list output here. assertEquals("nome composto",frase.converter...
asked by 08.07.2016 / 02:00
4
answers

How to print multiples of N in a range?

The program should receive three N, A, and B values as input, and should print the multiples of N contained in the interval between A and B. I am doing this, but it is going wrong: N = int(raw_input()) A = int(raw_input()) B = int(raw_input())...
asked by 04.04.2016 / 14:01
1
answer

Problem with split function in C

Hi, I'm studying C language and I came across a pointer problem in a string breaking function. I use the 4.8.4 GCC version. The input value that results in an error is "1234 | 123 | 123 | 123" 4/3/3/3, other values such as "1234 | 123 | 123 |...
asked by 04.02.2016 / 16:07
1
answer

How to convert an integer to a binary string in Python 3?

If I want to convert between integers and characters, I use chr and ord : >>> chr(10) '\n' >>> ord('$') 36 However, I need to do a test with binary strings , something new in Python 3, and I - which I onl...
asked by 29.09.2015 / 03:31