State: when there are two buttons, how do I correctly indicate that one is active without being ambiguous?

I'm a little unsure of whether you intend to use these buttons as buttons or as tabs (for navigation).

If you are using them as buttons, indicating that "one is active" implies that the other is disabled. The key is to make the active button visible with a click / tappable and the opposite for the disabled button. In your example, both buttons look active. To make the disabled button appear less clickable / interchangeable, especially compared to the active button, try to set its opacity to be erased, but still readable. You may also want to consider adding information about tools (when moving the mouse) or a dialog box (when clicking or touching) that explains to the user why the button is disabled.

If you are using them as tabs, they are not exactly buttons. The tabs (or the segmented controllers in iOS) help the navigation since they remain static, with only a change of state, which I assume is the "state response" to which you refer? If this is your use case, many visual attributes are opened without buttons that can be applied to solve your problem.

jsf – when adding omniface library I get WELD-001318: Unable to resolve an ambiguous dependency

I'm using JSF 6.2 in eclipse, I have a p: dataTable that I want the filters to be preserved during the session

Reloading the page in the table does not appear filtered until you click on update to the table by means of a button. What I'm trying to do is make an update to the table when loading the page

import org.omnifaces.util.Ajax;
@ManagedBean (name = "myBean")
public class myBean {
List of fix list

public void init () {
list = listObjects ()
Ajax.update ("form: table");

In faces config add this:


Add the project to the omnifaces-2.6.1 library which is what makes it listen, if you like the library, even if you do not add the Ajax line in the bean or the change in faces-config the result is the same

javax.servlet.ServletException: WELD-001318: Unable to resolve an ambiguous dependency between: - Managed bean [class myBean] with qualifiers [@Any @Default], - Handled Bean [class otroBean] with qualifiers [@Any @Default]
javax.faces.webapp.FacesServlet.service (
io.undertow.servlet.handlers.ServletHandler.handleRequest ( (
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest ( (
io.undertow.server.handlers.PredicateHandler.handleRequest ( ( (
io.undertow.server.handlers.PredicateHandler.handleRequest ( ( ( ( ( ( (
io.undertow.server.handlers.PredicateHandler.handleRequest ( (
io.undertow.server.handlers.PredicateHandler.handleRequest (
io.undertow.server.handlers.PredicateHandler.handleRequest (
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest (
io.undertow.servlet.handlers.ServletInitialHandler.access $ 100 (
io.undertow.servlet.handlers.ServletInitialHandler $ (
io.undertow.servlet.handlers.ServletInitialHandler $ (
io.undertow.servlet.core.ServletRequestContextThreadSetupAction $ (
io.undertow.servlet.core.ContextClassLoaderSetupAction $ (
io.undertow.servlet.api.LegacyThreadSetupActionWrapper $ (
io.undertow.servlet.api.LegacyThreadSetupActionWrapper $ (
io.undertow.servlet.api.LegacyThreadSetupActionWrapper $ (
io.undertow.servlet.api.LegacyThreadSetupActionWrapper $ (
io.undertow.servlet.api.LegacyThreadSetupActionWrapper $ (
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest (
io.undertow.servlet.handlers.ServletInitialHandler.access $ 000 (
io.undertow.servlet.handlers.ServletInitialHandler $ 1.handleRequest (
io.undertow.server.Connectors.executeRootHandler (
io.undertow.server.HttpServerExchange $ (
java.util.concurrent.ThreadPoolExecutor.runWorker (
java.util.concurrent.ThreadPoolExecutor $ ( ( 

trace – Are these expressions not the same? The output of Mathematica is ambiguous.

The following graph indicates that the first expression is equal to the second. But how can I use Mathematica to prove it's true?

Plot[(-(Log[(1 - P)/P]/Log in[10])) - (Log in[-(P/(-1 + P))]/Log in[10]), {P, 0, 1}]

An attempt to simplify indicates that the expressions are not the same:

FullSimplify[(-(Log[(1 - P)/P]/Log in[10])) - (Log in[-(P/(-1 + P))]/Log in[10])]

That gives the following answer:

(Log in[-1 + 1/P] + Log[-(P/(-1 + P))])/Log in[10]

enter the description of the image here

automaton – automaton that recognizes ambiguous accepted words of another automaton

Build an NFA that simulates (in a decisive way) two executions of the original NFA in the entry. The NFA also remembers a bit, whether the two races have diverged so far or not. If the bit is disabled and the NFA chooses two different transitions, then it turns it on. The NFA accepts if both executions accept and the bit is activated.

If the original NFA has $ k $ States, then the new NFA will have $ 2k ^ 2 $ You can convert it into a DFA with $ 4 ^ {k ^ 2} $ state

We can reduce the number of states in the corresponding DFA by building the power set directly. In each step, we will remember, for each step, if (i) it is impossible to be in that state, (ii) it is possible to be in that state, but there is a single execution of this type, (iii) it is possible to be in the state , and there are at least two of these executions. A state is accepting if there is an acceptance status of type (iii), or at least two acceptance states of type (ii). This construction uses only $ 3 ^ k $ states, and so it matches your suggestion.

Does the compiler analysis phase ever use ambiguous grammars other than operator grammars to make analysis trees?

The operator precedence analyzer is a bottom-up analyzer that uses even ambiguous grammars in the form of operator grammars to analyze a sequence of tokens.

But is there any analyzer that can use ambiguous grammars (of intrinsically ambiguous languages) that is not an operator language to make analysis trees?

P.S: Motivation of this question to know the nature of other languages ‚Äč‚Äčother than $ DCFL $ Used by the syntax phase of the compiler. And also to understand how the analyzer handles. inherently ambiguous $ DCFL $.

automatons – LR analyzers and ambiguous and non-deterministic grammars

The book of the dragon says:

An ambiguous grammar can never be LR.

And then immediately more says:

For example, consider the grammar of if not:

$ begin {align} stmt rightarrow & textbf {if} expr textbf {then} stmt \
& | textbf {if} expr textbf {then} stmt textbf {else} stmt \
& | textbf {other} end {align} $

If we have a shift we reduce the analyzer in the configuration.

begin {matrix}
… textbf {if} expr textbf {then} stmt & textbf {else …}
end {matrix}

we can not say if $ textbf {if} expr textbf {then} stmt $ It is the handle, no matter what appears below it on the stack. Here is a change that reduces the conflict. Depending on what follows $ textbf {else} $** at the entrance, it could be correct to reduce $ textbf {if} expr textbf {then} stmt $, or it could be correct to change $ textbf {else} $ and then look for another $ stmt $
complete the alternative $ textbf {if} expr textbf {then} stmt textbf {else} stmt $.

My question is quite simple. The author starts by saying the fact about the grammar "ambiguous", but then gives an example of a problem with the same prefix of the right sides of two productions (for example, non-deterministic grammar), but it is not really related to the ambiguity of the grammar.

I'm right. Also, what does that mean? The LR grammar can not work with both: non-deterministic and ambiguous grammar?