## Namimg Methods – How to name method with complex execution sequence?

This question: https://stackoverflow.com/questions/1866794/naming-classes-how-to-avoid-calling-everything-a-whatevermanager contains many examples of suffixes and prefixes that can be used to come up with precise name for your class.

What about methods? For example, how to name a method that should execute some action upon validation of some state – `ExecuteIfSomething`, if we imagine that some transition in state should be executed after checking if something is true – `ValidateTransition` (kind of ok, but reading it makes me think that it should just validate something – not additionally execute some action), `TranslateUponValidation`?

It would be very useful to have list of common parts that can be added to action/topic/… to describe method.

Here are some that I can come up with at the moment:

• Get
• Set
• Contains
• Remove
• Push
• Pop
• Clear
• Close
• Lock
• Open
• Unlock
• Enqueue
• Dequeue
• Activate
• Deactivate
• Translate
• Move
• Jump
• Fill
• Empty
• Draw
• Take
• Give
• Stash
• Group
• Shuffle
• Mix
• Sort
• Merge
• Inline
• Validate
• Check
• Execute
• Apply
• Compose
• Decompose
• Decay
• Break
• Gather
• Fuse
• Grow
• Rise
• Drop
• Fall
• Pick
• Select
• Accept
• Decline
• Retire
• Increase
• Decrease
• Stop
• Continue
• Pause
• Resume
• Process
• Create
• Destroy

Maybe, I have put too many of them.

As you can see now – many if not almost all verbs can be used depending on the situation. Using them or finding the matching one shouldn’t be a problem. The problem is on how to combine them or use some of them to describe complex situations or complex executing sequence. The one I have described as an example is the most common one that I haven’t found a good solution for. Personally I am interested in this particular one. But having some way/approach (not a formula like `Object` + `Action` + …) to define/come up with method/function names can be very useful.

Main question here is how do you name a method as the one described in the example? It might seem to be a duplicate of this question – Meaningful concise method naming guidelines – I can clarify and update my question if that is going to be required.

## Namimg Methods – How to name method with complex execution sequence?

This question: https://stackoverflow.com/questions/1866794/naming-classes-how-to-avoid-calling-everything-a-whatevermanager contains many examples of suffixes and prefixes that can be used to come up with precise name for your class.

What about methods? For example, how to name a method that should execute some action upon validation of some state – `ExecuteIfSomething`, if we imagine that some transition in state should be executed after checking if something is true – `ValidateTransition` (kind of ok, but reading it makes me think that it should just validate something – not additionally execute some action), `TranslateUponValidation`?

It would be very useful to have list of common parts that can be added to action/topic/… to describe method.

Here are some that I can come up with at the moment:

• Get
• Set
• Contains
• Remove
• Push
• Pop
• Clear
• Close
• Lock
• Open
• Unlock
• Enqueue
• Dequeue
• Activate
• Deactivate
• Translate
• Move
• Jump
• Fill
• Empty
• Draw
• Take
• Give
• Stash
• Group
• Shuffle
• Mix
• Sort
• Merge
• Inline
• Validate
• Check
• Execute
• Apply
• Compose
• Decompose
• Decay
• Break
• Gather
• Fuse
• Grow
• Rise
• Drop
• Fall
• Pick
• Select
• Accept
• Decline
• Retire
• Increase
• Decrease
• Stop
• Continue
• Pause
• Resume
• Process
• Create
• Destroy

Maybe, I have put too many of them.

As you can see now – many if not almost all verbs can be used depending on the situation. Using them or finding the matching one shouldn’t be a problem. The problem is on how to combine them or use some of them to describe complex situations or complex executing sequence. The one I have described as an example is the most common one that I haven’t found a good solution for. Personally I am interested in this particular one. But having some way/approach (not a formula like `Object` + `Action` + …) to define/come up with method/function names can be very useful.

Main question here is how do you name a method as the one described in the example? It might seem to be a duplicate of this question – Meaningful concise method naming guidelines – I can clarify and update my question if that is going to be required.

## Namimg Methods – How to name method with complex execution sequence?

This question: https://stackoverflow.com/questions/1866794/naming-classes-how-to-avoid-calling-everything-a-whatevermanager contains many examples of suffixes and prefixes that can be used to come up with precise name for your class.

What about methods? For example, how to name a method that should execute some action upon validation of some state – `ExecuteIfSomething`, if we imagine that some transition in state should be executed after checking if something is true – `ValidateTransition` (kind of ok, but reading it makes me think that it should just validate something – not additionally execute some action), `TranslateUponValidation`?

It would be very useful to have list of common parts that can be added to action/topic/… to describe method.

Here are some that I can come up with at the moment:

• Get
• Set
• Contains
• Remove
• Push
• Pop
• Clear
• Close
• Lock
• Open
• Unlock
• Enqueue
• Dequeue
• Activate
• Deactivate
• Translate
• Move
• Jump
• Fill
• Empty
• Draw
• Take
• Give
• Stash
• Group
• Shuffle
• Mix
• Sort
• Merge
• Inline
• Validate
• Check
• Execute
• Apply
• Compose
• Decompose
• Decay
• Break
• Gather
• Fuse
• Grow
• Rise
• Drop
• Fall
• Pick
• Select
• Accept
• Decline
• Retire
• Increase
• Decrease
• Stop
• Continue
• Pause
• Resume
• Process
• Create
• Destroy

Maybe, I have put too many of them.

As you can see now – many if not almost all verbs can be used depending on the situation. Using them or finding the matching one shouldn’t be a problem. The problem is on how to combine them or use some of them to describe complex situations or complex executing sequence. The one I have described as an example is the most common one that I haven’t found a good solution for. Personally I am interested in this particular one. But having some way/approach (not a formula like `Object` + `Action` + …) to define/come up with method/function names can be very useful.

Main question here is how do you name a method as the one described in the example? It might seem to be a duplicate of this question – Meaningful concise method naming guidelines – I can clarify and update my question if that is going to be required.

## Namimg Methods – How to name method with complex execution sequence?

This question: https://stackoverflow.com/questions/1866794/naming-classes-how-to-avoid-calling-everything-a-whatevermanager contains many examples of suffixes and prefixes that can be used to come up with precise name for your class.

What about methods? For example, how to name a method that should execute some action upon validation of some state – `ExecuteIfSomething`, if we imagine that some transition in state should be executed after checking if something is true – `ValidateTransition` (kind of ok, but reading it makes me think that it should just validate something – not additionally execute some action), `TranslateUponValidation`?

It would be very useful to have list of common parts that can be added to action/topic/… to describe method.

Here are some that I can come up with at the moment:

• Get
• Set
• Contains
• Remove
• Push
• Pop
• Clear
• Close
• Lock
• Open
• Unlock
• Enqueue
• Dequeue
• Activate
• Deactivate
• Translate
• Move
• Jump
• Fill
• Empty
• Draw
• Take
• Give
• Stash
• Group
• Shuffle
• Mix
• Sort
• Merge
• Inline
• Validate
• Check
• Execute
• Apply
• Compose
• Decompose
• Decay
• Break
• Gather
• Fuse
• Grow
• Rise
• Drop
• Fall
• Pick
• Select
• Accept
• Decline
• Retire
• Increase
• Decrease
• Stop
• Continue
• Pause
• Resume
• Process
• Create
• Destroy

Maybe, I have put too many of them.

As you can see now – many if not almost all verbs can be used depending on the situation. Using them or finding the matching one shouldn’t be a problem. The problem is on how to combine them or use some of them to describe complex situations or complex executing sequence. The one I have described as an example is the most common one that I haven’t found a good solution for. Personally I am interested in this particular one. But having some way/approach (not a formula like `Object` + `Action` + …) to define/come up with method/function names can be very useful.

Main question here is how do you name a method as the one described in the example? It might seem to be a duplicate of this question – Meaningful concise method naming guidelines – I can clarify and update my question if that is going to be required.

## Sequence diagram, main scenario of use case “Register Company”

About the Sequence Diagram above, judge the following items:

I.The internal actor is the “Company”, which is responsible for informing the data to perform the business registration.

II.As initial interface, the class “Register Company” is used. To register the companies, it is understood that the objects “Branch of Activity” and “Zip Code” are already registered.

For each object represented, it can be seen that a “lifeline” has begun, and when the object begins to interact, the focus of control is used, which has its messages in a numbered and orderly manner.

IV.After the execution of the operations, the receiving object “Company” sends a return message to the sender interface “Form_Cadastrar Empresa”, represented in the dashed line.

The correct items are:

## Proving whether an input sequence satisfies a given RE language

I’ve learned this a few years ago that this is impossible unless one simply ‘executes’ (in a modern computing sense) the input with the language rules, but I have some problems in just using this statement.

• The fundamental doubt is that the statement itself is well-stated. If I’m using the term ‘execution’ to describe the act of matching the rules one input element by one, is this statement valid?

• Is this statement (deciding whether an input sequence is following a language is impossible without an execution) not exactly limited to RE? In other words, I wonder this statement also holds even for the languages in other classes.

• I’m not even sure how I can search for this statement and confirm from the external source.

(By RE, here I indicate the recursively enumerable languages, not the regular expression)

## Given a sequence of integers \$A_1,A_2,A_3 ……A_n\$ , find number triples giving equal xor?

For giving sequence $$A_1,A_2,A_3 ……A_n$$ , find number of triples $$i,j,k$$ such that $$1<=i and $$A_i + A_{i+1} + … A_{j-1} = A_{j} + A_{j+1} ….. A_{k}$$ .Where $$+$$ is bitwise xor operation .

I tried to solve it using dynamic programming somewhat similar to https://www.geeksforgeeks.org/count-number-of-subsets-having-a-particular-xor-value/ , but it’s time complexity if $$O(n*m)$$ , where m is maximum element in the array .Can we do better than $$O(n*n)$$ or $$O(n*m)$$ ?

## How to maintain unique sequence across table columns?

I hava two tables registed_products and unregisted_products. Both have autoincrement primary key which can be overlapping which if 100 id exist reg table, it can exist in unreg table as well. Insert can come from many places with in the application

There is third service expecting unique id for both type of products.

In oracle , I could have introduced one more column in each table. Create a sequence. Now could create the trigger before_insert on both the tables so that whenever there is an insert in any table, trigerr will get the next_val from sequence and insert in to new column. This way I can ensure unique number across table columns.

I am not sure how to achieve the same in mysql as there are triggers but not sequences that can be used across tables ?

## Sequence Diagram Assistance with external database

I have 5 Java/android classes which are in sequential order. The user inputs data into the text box and clicks next. Two things happen, 1 the data the user inputs is passed to the next activity and it is also inserted into an external database.

The same things happens on each of the 5 activities. I’m struggling to represent this in a sequence diagram form. All the sequence diagram examples I see dont have an external database involved in every class/activity and my diagram only moves forward, most diagrams have methods moving back and forth.

## Weird character sequence in email subject

I’ve noticed that the subject in one of the spam emails looks like this in source:

``Subject: Offe=?UTF-8?Q?=EF=BB=BF?=r fr=?UTF-8?Q?=EF=BB=BF?=om C=?UTF-8?Q?=EF=BB=BF?=redi=?UTF-8?Q?=EF=BB=BF?=t On=?UTF-8?Q?=EF=BB=BF?=e Ba=?UTF-8?Q?=EF=BB=BF?=nk=?UTF-8?Q?=EF=BB=BF?==?UTF-8?Q?=EF=BB=BF?= ``

but in web it looks normal

``Offe﻿r fr﻿om C﻿redi﻿t On﻿e Ba﻿nk ``

The only thing I recognize is `0xEF, 0xBB, 0xBF`, which is the UTF-8 BOM.

Which interpreter recognizes this character sequence `=?UTF-8?Q?=EF=BB=BF?=` ?

Is there a vulnerability around email subjects? What are they trying to do?