All Questions

1
answer

How to make application running in the background all the time

I tried to use Service as they said but it is not working yet. I do not know if I understand correctly, will the onStartCommand() method run all the time? Because I've debugged and the application only goes into this method once, w...
asked on 25.06.2016 / 05:22
2
answers

Invert array (vector) without an external function, 'manually'

Friends, I always inverted vectors using a helper in an external function (I think the default way), but until recently a friend told me that I had a way to invert vectors without using a helper, I asked to show myself but it turned out What did...
asked on 31.05.2016 / 15:05
2
answers

Placing and comparing dominoes in order in C, using list or not (if not)

The program asks you to check if you have the same dominoes (if you have at least one possibility of joining data 12 | 21) and asks to show an order that suits the basic rule of the dominoes (12 | 24 | 45 | 53); An accepted entry would be:...
asked on 05.05.2016 / 21:54
1
answer

What is the purpose of stdClass in PHP?

What is the purpose of the stdClass pre-defined class in PHP? In detail what does it do? How important is it?
asked on 04.06.2016 / 22:25
4
answers

Loop run every 20 lines

I would like every button click to count, and it would invoke variavel to change the initialization and condition > for , for a numeric value of 20 in 20 . It would be kind to go from 0 to 20 and wait another click. On a...
asked on 05.05.2016 / 17:12
2
answers

Search for files by extension

In a Windows Forms application I would like to know how to fetch all files that exist and contain the word teste in the file extension. For example, opening a folder in Windows and typing *.teste* into the search field will return...
asked on 04.05.2018 / 19:54
1
answer

How to implement AutoMapper 5.0.2

I set up a project a while back, as follows, A class named AutoMapperConfig as follows: public class AutoMapperConfig { public static void RegisterMappings() { Mapper.Initialize(x => { x.AddProfile<D...
asked on 28.07.2016 / 05:10
3
answers

Counter of a subsequence of strings repeated in C

Consider a string composed of several subsequences.    For example: cccaaaabbbbxdddddddddaaannn. The smallest substring is the letter x, with only one element; the largest subsequence is that of letter d, with 9 elements. Make an algorith...
asked on 01.11.2018 / 21:18
2
answers

Should I avoid repeated access to the same method within a loop?

I worry about the final performance of an executable at the same time, I do not want to penalize the programmer with excessive or unnecessary care in the code. In the code below, for example, it will return the same value as the getPositio...
asked on 21.05.2018 / 03:06
4
answers

Generate random random string in PHP

How to use the PHP language to generate a string, preferably with configurable size, random enough to be used in routines that handle encryption and that for security reasons can not be not too random? If you propose more than one solutio...
asked on 15.02.2014 / 20:20