Questions tagged as 'string'

2
answers

In SQL Server how to convert string part uppercase based on the separator: \?

I need to make a script to convert all user records into a table in this format (single field): INFORMATICA\desenvolvedor ADMINISTRACAO\contador That is, before the uppercase bar and then the lower bar. How to do this in SQL Server? Cu...
asked by 17.12.2013 / 14:30
1
answer

Why does String hashCode () in Java use 31 as a multiplier?

In Java, the hash code for an object String is computed as s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1] using integer arithmetic, where s[i] is the i -th character of the string, n is the length of the string,...
asked by 02.01.2019 / 17:54
1
answer

Cryptography using piles in java

In an encrypted message using Stack to invert each word of a String and using chatAt (int) to get characters specific to it, I had the following problem, when if you put a character on the stack, you can not use primitive types as a paramete...
asked by 13.11.2015 / 00:04
2
answers

preg_split is not breaking the strings in the array

I'm not able to use the preg_split() function correctly. I'm trying to break a String in a array() via regex but it's not rolling. $string = "<:termo.9:><:termo.10:><:termo.11:>"; $res = preg_split("/(<:)...
asked by 30.09.2015 / 23:02
1
answer

Why is strcpy () unsafe?

I'm reading about secure programming, and I read that the strcpy() function of the C language is an example of insecure function. I also read that there is a safe version of this function, which would be strcpy_s() . What is...
asked by 30.04.2016 / 21:57
1
answer

Reduce a string in C language

How do I reduce the size of a string in C? In my program it is implemented as follows: char nomeString[] = "nomedoarquivo.txt"; I want to cut the ".txt" from the end of the string .     
asked by 27.11.2016 / 17:42
1
answer

How to count touches (letters, spaces and symbols) in PHP?

I made a program that extracts my notes from my code and creates a txt file to be a little manual. I formatted to stay cool: +-----------+ | | | ESPECIAIS | | | +-----------+ It takes the SPECIAL line and formats...
asked by 26.03.2015 / 19:22
1
answer

Is it possible to use MD6 in C #?

hash , is it possible to use MD6 in C #? Would anyone have an example of the use in a simple string ? In my searches I did not find anything very objective.     
asked by 16.09.2015 / 22:40
1
answer

Use "FieldByName" or the associated variable?

I have a doubt that maybe it's silly ... But it takes a little bit of peace. When I have a ClientDataset , a MemoryTable or a Query , how do I get the value of a field using FieldByName() or the variable associated w...
asked by 12.07.2016 / 03:40
1
answer

Execute cmd commands by Java

I would like to know how I do to run cmd commands in java. Well, I did this: import java.io.*; public class Commands { static final Runtime run = Runtime.getRuntime(); static Process pro; static BufferedReader read; public static void main(...
asked by 06.04.2015 / 04:05