python kivy button and triggering a function

i m relatively new to kivy and i wanted to make a app but i m stuck at how to call a function by clicking on a button but i seem to face many problems .After hours of googling i still couldn t come up with a working code . i want to display the button first and then on click the button disappears and the function is executed.

import kivy
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.gridlayout import GridLayout   
from kivy.uix.textinput import TextInput  
from kivy.uix.button import Button
from kivy.uix.widget import Widget


class maingame(GridLayout):
  def __init__(self, **kwargs):
    super().__init__(**kwargs)
    self.cols = 1
    self.rows = 1 
  def potato(self):
  
    self.add_widget(Label(text="potato is great")



class myApp(App):

  def build(self):
    cake = maingame()
    btn = Button(text="start " ,size=(90,90))
    btn.bind(on_press=cake.potato)
    cake.add_widget(btn)
    return maingame()

        

if __name__ == "__main__":

  myApp().run()

Magento2: magento rest api not triggering my custom plugin and observer?

I have created an observer “checkout_cart_save_before” and plugin Addproduct.

It is working perfectly for the website but not triggering for API while hitting on the postman.

Any suggestions about how to make this work.

Any help would be appreciated.

Magento 2.3.3 : Triggering error report.php / report.phtml

I need to test the customization of the puberrorsdefaultreport.phtml template. I need ways to trigger the report error and land on report.phtml page.

I found other posts where we can trigger 404, 503, 500 but not report error.

9.0 pie – What are the alternatives for Xposed framework on Pie? Preferably without triggering Safety Net?

Alternatives to Xposed (rovo89) are:

  • Virtual Xposed – a rootless Xposed and therefore far less capable. I didn’t investigate further for this reason but I read that development on this has stopped (unconfirmed).

  • Tai-Chi Xposed by the same developer of Virtual Xposed and supports Android Pie. Said to be close sourced and likely to be paid module per some reports.

  • Edxposed. This is the alternative I chose.

Disclaimer: I am not a developer nor am I affiliated to any app or module.

Yes

For an average user like me, two factors help decide:

  • Open Source Vs Close Source Edxposed is Open source. I have no understanding of code and cannot draw any conclusion from looking at code. But yes, being open source means it is subject to scrutiny by knowledgeable folks and therefore safer (Please don’t drag me into open source discussion, rather post an alternative answer :).

  • Provenance or trust attached

    • The last Xposed update by rovo89 is also close sourced (as against earlier versions which are open source). This being close source would not have detracted people from using it purely based on developer’s reputation.

    • In the case of Edxposed, my trust lies with Marcel (aka M66B) who has developed several privacy centered modules / apps such as NetGuard, Xprivacy, XprivacyLua and FairEmail. For me, when a staunch privacy advocate like Marcel starts development using EdXposed(edit-completed development), that’s pretty much sovereign guarantee despite some warnings about close source (Incidentally, this claim is incorrect and a Reddit user informed XDA portal. To clarify again, it is open source)

  • It is not (yet) as powerful as Xposed because it lacks support at this stage for resource hooks but it may get added hopefully.

  • It is still in beta stage but a lot of modules work already. See (Updated) List of Xposed modules for Android Pie working with Ed Xposed Framework for a list of working and non-working modules which is being updated. Take this list with a pinch of salt – it may mean anything from doesn’t crash and works partially to fully works. See last question below.

  • For me XPrivacy Lua works and works far better on EdXposed than on the beta version of Xposed on Oreo. Another must module for me is Maxlock which works fine. Only one I want is GravityBox and C3C076 , developer of GravityBox is considering development for EdXposed and it is likely others follow suit.

Yes 🙂

Check for updates from corresponding links below as they would change being a beta. Valid as on 12 Feb 19 and will not be updated in this answer. See How to install EdXposed on Android 10 without triggering safety net for a more recent method

Source Android 9.0 uses xposed solutions as updated

Use Magisk order to install these modules in the same order ( You won’t find them in the magisk repo. Download them and from Magisk Downloads option click on the + to install and they will appear as Magisk Modules)

  1. Magisk-riru-core-arm-arm64-v10.zip

  2. Magisk-EdXposed-arm-arm64-v x.x_beta-release.zip

  3. Don’t reboot yet , install XposedInstaller_by_dvdandroid_19_10_18. apk or from XDA

magisk-EdXposed-v0.2.9.8_beta1-release.zip (check for updates in subsequent releases)

  1. Reboot.

Traditionally XPosed always had a problem with such devices but EdXposed seems to fare better. Issues with some devices are reported so YMMV (check out the linked XDA thread)

Developers would need to upgrade their modules for working with Pie AND EdXposed. As of now, the following modules meet these requirements

Notes

  • You may need multiple reboots.

  • Ignore the warning on the installer Xposed not yet compatible …with SDK 28…or your Android architecture (see pic below).

  • You may find at times that installer is disabled – reinstall and reboot to fix. For some , soft reboot from installer fixes the problem (root permission needs to be given for installer).

  • Whenever Installer is upgraded, it is better in my experience to uninstall the earlier installer and install the newer one to prevent instability

  • Your device may be noticeably slower to respond – that’s a price to pay till things stabilize.

  • Some modules may work with earlier versions of Edxposed and not with later versions or vice-versa.

  • Pro-tip Just in case you land up installing a module that ends up in a boot loop or creates some other problem , it is handy to have (Tool)(2018.8.1) Magisk Manager for Recovery Mode (mm) installed so that you can disable or uninstall the Xposed modules from Magisk.

Screenshots are from my MiA1 (Android one) running stock OS with latest Magisk 18.1

IMG:
IMG:
IMG:
IMG:

(Click to enlarge)

Happy Xposing !

dnd 5e: Does Absorb Elements resist damage from the triggering attack?

That's the interpretation that makes sense, yes.

Since there is no demarcation between lint and creak in spells, the everything spell effect are the rules. The effect says it decreases the effect of the triggering damage; when you ask "how?" the effect provides the answer: you have resistance.

D&D 5e is somewhat resistant to fine-grained timing analysis, and doesn't seem to try to pin down a precise, step-by-step order to things that could be solved simply by the DM saying, "Yes, it does what it says on the tin." As any other interpretation causes the spell not to do what its effect says it does, the interpretation that lacks internal contradiction is correct.

If it helps, Jeremy Crawford has tweeted about this, once:

Q: Does Absorb Elements resist damage from the triggering attack?

So.

AND twice:

Q: When someone casts Absorb Elements, does he take full damage from the attack he's reacting to?

A: The absorb elements spell works against the spell that activates it.

dnd 5e – Can the reaction attack from the third benefit of the Sentinel feat interrupt the triggering attack by the enemy?

RAW is NO, but their intent may have been YES.

How is that for confusing? Stay with me, there is a great moral at the end of this, too!

Starting with the RAW

Adam's answer covers the DMG (pp 252) for Adjudicating Reaction Timings and comparing the wording of Sentinel against Shield and Counterspell which together are an excellent argument for the Sentinel attack occurring after the enemy attack has been resolved (hit or miss).

Jeremy Crawford also confirms this in his Sage Advice Tweets.

Despite the desire to have Sentinel preempt an attack, that's not how the feat is written. A DM can override that.

By default, a reaction occurs after its trigger. Opportunity attacks and the shield spell are example exceptions.

Intent was possibly, maybe, could have been Yes. By at least one of the devs.

However, the conversation with the developers didn't start with Crawford, it began with Mike Mearls. And he, not being the official Sage Advisor, does not give rulings, but talks about he generally plays it or intended it. What he said was:

I'd say it's before – it's similar to an opportunity attack; that triggers before the creature leaves your reach

sentinel's design intent is to protect other PCs, so in that case should be before

Concept vs RAW

This is an excellent example of the intent vs the rules conundrum. Try can mean the developers beliefs in how the ability works OR the Player's vision of what their character is doing. And when the rules aren't explicit (although beware of adding benefits just because the rule doesn't prohibit them) about when the attack occurs, that interpretation becomes more valid.

Jeremy Crawford ended his remarks with something we often forgot – and we should remember this:

To be clear, Twitter is a way to be in touch with you, our fellow players and DMs. The upcoming FAQ is official.

dnd 5e – How does reaction time work for Wrath of the Storm? Can it potentially prevent damage from the triggering attack?

In general, reactions interrupt whatever action they are reacting to, but only once that action has been resolved:

Reactions

Certain special abilities, spells, and situations allow you to perform a special action called a reaction. A reaction is an instantaneous response to a trigger of some kind, which can occur on your or someone else's turn. The attack of opportunity, described later in this chapter, is the most common type of reaction.
When you take a reaction, you cannot take another until the start of your next turn. If the reaction interrupts another creature's turn, that creature can continue its turn right after the reaction.

In the case of Storm's Wrath It happens when you choose to react to this:

When a creature 5 feet from you that you can see hits you with a
attack

This triggers your reaction, and the enemy's attack has yet to be resolved. Since the trigger occurs before damage (on hit), it immediately interrupts the enemy's turn, including resolving attack damage. This is in line with how the reactions are described above. Thematically, think of it as the cleric who explodes with electricity as an immediate response to being hit, regardless of the damage the cleric suffers in the process.

Keep in mind that even if this kills the enemy, The damage from the blow that caused the storm's wrath is still calculated.

The spell To protect it is a reaction you take when you are hit by an attack. It has additional special properties in the spell description:

An invisible barrier of magic force appears and protects you. Until the beginning of your next turn, you have a +5 bonus to AC, even against the triggering attack, and you take no damage from the magic missile.

So in this case it's a specific exception to the rule that occurs in reaction to an attack hitting it, and it retroactively increases its AC against the triggering attack, so if the attack originally hit it, it could now fail.

Triggering Events [pendente]

Is it possible to somehow shoot events in multiple windows using JS?

For example: I have 2 pages with their different htmls, can I click a button on one and activate an event on the other? If so, how?

Plotting: solution of nonlinear coupled equations through the use of triggering, blocking and initial initial conditions.

My code is not putting. Also, I don't know how to copy paste this code from my notebook. Is there an easier way to paste here? I am drawing a graph for the different values ​​of R. I also have to draw for the different values ​​of epsilon ……… can we predict the values ​​given in block? ………………………………………….. ………………………………………….. ………………………………………….. ………………………………………….. ………………………………………….. ………………………………………….. ………………………………………….. ………………………………………….. …………………………………….. friendly guide

eqn1=(1+1/(Beta))((1+(Epsilon)-(Epsilon) (Theta)(y)) f''''(y)-(Epsilon) f''(y) (Theta)''(y)-2 (Epsilon) f'''(y) (Theta)'(y))+(Alpha) (y f'''(y)+3 f''(y))+R (f(y) f'''(y)-f'(y) f''(y))- M^2 f''(y)==0;
eqn2=(1+NN)(Theta)''(y)+Pr  ((Alpha)(m (Theta)(y)+y (Theta)'(y))+ R(f(y) (Theta)'(y)-m f'(y) (Theta)(y)))==0;
bcs1={f(-1)==A,f'(-1)==0, f(1)==1, f'(1)==0 };
bcs2={(Theta)(-1)==1, (Theta)(1)==0};
f1=Block ({(Beta)=0.5, (Epsilon)=1.5, Pr=1, M=1,NN=2,R=-5,m=1, (Alpha)=0.5,A=-0.2},
First(NDSolve({eqn1, eqn2, bcs1, bcs2},
{f((Eta)),f'((Eta)), f''((Eta)),f'''((Eta)), (Theta)((Eta)), 
(Theta)'((Eta))}, {(Eta),-1,1},
Method->{"Shooting",  "StartingInitialConditions" -> 
{{f(-1)==A,f(-1)==0,f'(-1)==0, f''(-1)==0,f'''(-1)==0,(Theta)(-1)==1, 
(Theta)(-1)==0,(Theta)'(-1)==0}}}
))
);
TableForm(
Table({(Eta),{f((Eta))/.f1}, {f'((Eta))/.f1}, {f''((Eta))/.f1},{(Theta) 
((Eta))/.f1},{(Theta)'((Eta))/.f1}},{(Eta),-1,1,0.2}), TableAlignments-> 
{Center,Center},
TableHeadings->{None,{"(Eta)","f((Eta))","f'((Eta))","f''((Eta))"," 
(Theta)((Eta))","(Theta)'((Eta))"}},TableSpacing->{1,5})
f2=Block ({(Beta)=0.5, (Epsilon)=1.5, Pr=1, M=1,NN=2,R=-2.5,m=1,  
(Alpha)=0.5,A=-0.2},
First(NDSolve({eqn1, eqn2, bcs1, bcs2},
{f((Eta)),f'((Eta)), f''((Eta)),f'''((Eta)), (Theta)((Eta)), 
(Theta)'((Eta))}, {(Eta),-1,1},
Method->{"Shooting",  "StartingInitialConditions" -> 
{{f(-1)==A,f(-1)==0,f'(-1)==0, f''(-1)==0,f'''(-1)==0,(Theta)(-1)==1, 
(Theta)(-1)==0,(Theta)'(-1)==0}}}
))
 );
 TableForm(
 Table({(Eta),{f((Eta))/.f2}, {f'((Eta))/.f2}, {f''((Eta))/.f2},{ 
 (Theta)((Eta))/.f2},{(Theta)'((Eta))/.f2}},{(Eta),-1,1,0.2}), 
 TableAlignments->{Center,Center},
 TableHeadings->{None,{"(Eta)","f((Eta))","f'((Eta))","f''((Eta))"," 
 (Theta)((Eta))","(Theta)'((Eta))"}},TableSpacing->{1,5})
 f3=Block ({(Beta)=0.5, (Epsilon)=1.5, Pr=1, M=1,NN=2,R=0,m=1,  
 (Alpha)=0.5,A=-0.2},
 First(NDSolve({eqn1, eqn2, bcs1, bcs2},
 {f((Eta)),f'((Eta)), f''((Eta)),f'''((Eta)), (Theta)((Eta)), 
 (Theta)'((Eta))}, {(Eta),-1,1},
 Method->{"Shooting",  "StartingInitialConditions" -> 
 {{f(-1)==A,f(-1)==0,f'(-1)==0, f''(-1)==0,f'''(-1)==0,(Theta)(-1)==1, 
 (Theta)(-1)==0,(Theta)'(-1)==0}}}
 ))
 );
 TableForm(
 Table({(Eta),{f((Eta))/.f3}, {f'((Eta))/.f3}, {f''((Eta))/.f3},{ 
(Theta) 
((Eta))/.f3},{(Theta)'((Eta))/.f3}},{(Eta),-1,1,0.2}), TableAlignments-> 
{Center,Center},
TableHeadings->{None,{"(Eta)","f((Eta))","f'((Eta))","f''((Eta))"," 
(Theta)((Eta))","(Theta)'((Eta))"}},TableSpacing->{1,5})
f4=Block ({(Beta)=0.5, (Epsilon)=1.5, Pr=1, M=1,NN=2,R=2.5,m=1,  
(Alpha)=0.5,A=-0.2},
First(NDSolve({eqn1, eqn2, bcs1, bcs2},
{f((Eta)),f'((Eta)), f''((Eta)),f'''((Eta)), (Theta)((Eta)), 
(Theta)'((Eta))}, {(Eta),-1,1},
Method->{"Shooting",  "StartingInitialConditions" -> 
{{f(-1)==A,f(-1)==0,f'(-1)==0, f''(-1)==0,f'''(-1)==0,(Theta)(-1)==1, 
(Theta)(-1)==0,(Theta)'(-1)==0}}}
))
);
TableForm(
Table({(Eta),{f((Eta))/.f4}, {f'((Eta))/.f4}, {f''((Eta))/.f4},{(Theta) 
((Eta))/.f4},{(Theta)'((Eta))/.f4}},{(Eta),-1,1,0.2}), TableAlignments-> 
{Center,Center},
TableHeadings->{None,{"(Eta)","f((Eta))","f'((Eta))","f''((Eta))"," 
(Theta)((Eta))","(Theta)'((Eta))"}},TableSpacing->{1,5})
f5=Block ({(Beta)=0.5, (Epsilon)=1.5, Pr=1, M=1,NN=2,R=5,m=1,  
(Alpha)=0.5,A=-0.2},
First(NDSolve({eqn1, eqn2, bcs1, bcs2},
{f((Eta)),f'((Eta)), f''((Eta)),f'''((Eta)), (Theta)((Eta)), 
(Theta)'((Eta))}, {(Eta),-1,1},
Method->{"Shooting",  "StartingInitialConditions" -> 
{{f(-1)==A,f(-1)==0,f'(-1)==0, f''(-1)==0,f'''(-1)==0,(Theta)(-1)==1, 
(Theta)(-1)==0,(Theta)'(-1)==0}}}
))
);
TableForm(
Table({(Eta),{f((Eta))/.f5}, {f'((Eta))/.f5}, {f''((Eta))/.f5},{(Theta) 
((Eta))/.f5},{(Theta)'((Eta))/.f5}},{(Eta),-1,1,0.2}), TableAlignments-> 
{Center,Center},
 TableHeadings->{None,{"(Eta)","f((Eta))","f'((Eta))","f''((Eta))"," 
(Theta)((Eta))","(Theta)'((Eta))"}},TableSpacing->{1,5})
Needs("PlotLegends`")
Plot(Evaluate({{f((Eta))}/.f1,f((Eta))/.f2,f((Eta))/.f3,f((Eta))/.f4,f( 
(Eta))/.f5}),
{(Eta),-1,1},ImageSize->500,PlotRange->All,
PlotStyle->{{Dotted,Black},{DotDashed,Red},{Dashed,Green},{Blue}},Axes-> 
{False,False},
Frame->True,FrameLabel->{Style("(Eta)",Italic,Black),Style("f( 
(Eta))",Italic,Black)},
PlotLegend->{"R=-5","R=-2.5", "R=0","R=2.5","R=5"},LegendPosition-> 
{-0.1,-0.0},
LegendShadow->{0,0},LegendBackground->White,LegendSize->{0.3,0.4})
Plot(Evaluate({{f'((Eta))}/.f1,f'((Eta))/.f2,f'((Eta))/.f3,f'( 
(Eta))/.f4,f'((Eta))/.f5}),
{(Eta),-1,1},ImageSize->500,PlotRange->All,
PlotStyle->{{Dotted,Black},{DotDashed,Black},{Dashed,Brown},{Gray}},Axes-> 
{False,False},
Frame->True,FrameLabel->{Style("(Eta)",Italic,Black),Style("f'( 
(Eta))",Italic,Black)},
PlotLegend->{"R=-5","R=-2.5", "R=0","R=2.5","R=5"},LegendPosition-> 
{-0.1,-0.0},
LegendShadow->{0,0},LegendBackground->White,LegendSize->{0.3,0.4})
Plot(Evaluate({{(Theta)((Eta))}/.f1,(Theta)((Eta))/.f2,(Theta)( 
(Eta))/.f3,(Theta)((Eta))/.f4,(Theta)((Eta))/.f5}),
{(Eta),-1,1},ImageSize->500,PlotRange->All,
PlotStyle->{{Dotted,Black},{DotDashed,Black},{Dashed,Brown},{Gray}},Axes-> 
{False,False},
Frame->True,FrameLabel->{Style("(Eta)",Italic,Black),Style("(Theta)( 
(Eta))",Italic,Black)},
PlotLegend->{"R=-5","R=-2.5", "R=0","R=2.5","R=5"},LegendPosition-> 
{-0.1,-0.0},
LegendShadow->{0,0},LegendBackground->White,LegendSize->{0.3,0.4})

The previous code is giving a message that my dependent variables are more than equations. here is the copied message
NDSolve :: underdet

dnd 5e – War Caster, a whip and triggering opportunity attacks

This is a follow up of War Caster, a whip and a dagger, and provoking attacks of opportunity, but without the dagger part.

Question: If I have a whip but no other melee weapon, can I cast a spell as a reaction when an adjacent enemy moves 5 feet away from me?

The logic here is that you could use a Disarmed Attack to make an Opportunity Attack. Therefore, I am allowed to replace that attack of opportunity with a spell.

Is my logic correct?