All Questions

2
answers

How to avoid an IllegalStateException: The content of the adapter has changed but ListView did not receive a notification?

I have Activity that displays a ListView , which is associated with Adapter "backed by" ArrayList global. If I add an element to this ArrayList , ideally I do it on the main thread and immediately call Adapter...
asked on 14.01.2014 / 12:39
2
answers

Comparison of search algorithms within text strings

I'm trying to implement the following algorithms for searching expressions within Java text strings: Knuth-Morris-Pratt (KMP), Brute Force, Boyer-Moore, and Levenshtein How could you show the similarity obtained to perform a comparison betwee...
asked on 07.08.2015 / 04:49
1
answer

What are the best practices for implementing DryIoc, FluentValidation and Lazy?

I'm building an architecture based on the use of Lazy, DryIoc e o FluentValidation . I intend to do all validations with the object. When I actually use the object I will instantiate it (Start). I do not know if I'm sinning in any det...
asked on 03.07.2017 / 16:14
1
answer

How to remove the last number from an integer?

How can I remove the last number from an integer? Ex: int value = 123456789; int newValue = 12345678; Note that the new value does not have 9. I know it would be possible to change to a string and use the substring (), but I...
asked on 24.08.2017 / 14:54
2
answers

Sum of TimeSpan in C #?

In the sum of two variables of type TimeSpan with the language c # I could see that it happens as if it were a mathematical operation of two simple numbers, example : TimeSpan t1 = TimeSpan.ParseExact("00:01:45", "c", CultureInfo.Invari...
asked on 06.06.2017 / 22:27
2
answers

Differences and use of Strings vs. CharSequence

Many methods in Java expect parameters CharSequence , but the code runs normally when I pass String without conversion, for example: String mensagem = intent.getStringExtra(MainActivity.MENSAGEM); TextView t = (TextView)findViewB...
asked on 17.01.2014 / 12:43
2
answers

What is the difference between "NULL", "\ 0" and 0?

Both are worth zero. Can I always use the 3 interchangeably?     
asked on 16.01.2017 / 11:51
2
answers

In HTML what is an undetermined Checkbox and how to use this status along with CSS?

As far as I know, a% of% of type input could have three states, checked , not checked and disabled . But it looks like it has a fourth state that is undetermined . See in the image a comparison of the states that Checkbox c...
asked on 11.09.2018 / 18:07
4
answers

What's the difference between LIKE, IN and BETWEEN in MySQL?

I'm doubtful about the difference and use of the LIKE , IN and BETWEEN tags in MySQL. When should I use the tags and example?     
asked on 13.11.2017 / 15:27
2
answers

Get the current date and time on the internet, in desktop application

I am implementing a system lock by date, and I need to get the current date of brasilia for example, which would be the official time in Brazil, or the date in time zone -3. I believe there are web services that do this and that are reliable,...
asked on 17.04.2014 / 22:13