Passing an expression to the Plot Function does not Work

Solving a differential equation I found that its solution was analytic, and I stored it as an expression from the default rule output of the DSolve[] function:

soleq2 = y[x] /. soleq2[[1, 1]]

Which has output:

Sqrt[x] BesselJ[Sqrt[13]/2, x] C[1] + Sqrt[x] BesselY[Sqrt[13]/2, x] C[2]

I then plotted this:

Manipulate[Plot[soleq2, {x, 0, 10}], {C[1], 0, 10}, {C[2], 0, 10}]

but the plot does not show anything, only the sliders for the modulation of C[1] and C[2]. I tried substituting these constants with other letters thinking their format might interfere with the kernel, but to no avail.

OOP: Instantiate plugin, passing parameters and accessing super class properties from sub class object

I would like to know the "best" – OOP-way – and WP-compatible – format for instantiating an object, while passing arguments ( which are defined as properties in the parent class ) – which are then cleanly and correctly available to all sub classes, which extend the parent.

I would like to know how to make $ this->slug ( the parent prop ) available cleanly within the sub class, without having to pass the arguments to this class constructor.

The example code concept below works, but something smells wrong:

<?php  // plugin.php  namespace Q\Plugin;  // If this file is called directly, Bulk! if ( ! defined( 'ABSPATH' ) ) {     return; }  // autoloader ## require_once __DIR__ . '/autoload.php';  // Define Class ## class Plugin {      // class properties ##     protected $  slug     = false;      // construct ##     public function __construct( Array $  args = [] ) {          // set class props, if defined - check using null coalescing operator ##         $  this->slug     = $  args['slug'] ?? false ;      }      // public init callback ##     public function init() {          // setup CPT ##         $  cpt = new \Q\Plugin\CPT([             'slug'      => $  this->slug,         ]);         $  cpt->init();      }  }  // instantiate the plugin class and make the returned object available as a (optional) global variable  ## global $  q_plugin; $  q_plugin = new Plugin([     'slug'      => 'q_cpt', // cpt slug -- singular ## ]); $  q_plugin->init();  // NAMESPACE/cpt.php  namespace Q\Plugin\CPT;  class CPT extends \Q\Plugin {      // construct ##     public function __construct( Array $  args = [] ) {          // store passed args ##         $  this->args = $  args;      }      // public init callback ##     public function init() {          // sanity ##         if(              ! isset( $  this->args['slug'] )          ){              error_log( 'Error in params passed to '.__CLASS__ );              return false;          }          // $  this->args['slug'] is now available to use in register_post_type function         // BUT, I would like to know how to make $  this->slug ( the parent prop ) available cleanly, without having to pass the arguments to this class constructor      }  } 

Thanks!

as a Sorcerer, given that I can’t multiclass or take feats, how successful can I be at passing concentration checks starting at level 15 [closed]

I’m doing a melee sorcerer, but I’m afraid of losing my concentration in combat because in the higher levels the damage is too big and the concentration check is too difficult.
My campaign dosen’t allow feats and multiclassing, only ASI.
Is the haste spell worth it at higher levels?

not worth it to cast only to lose it in one round because I was hit and lost concentration – that’s what I mean by "Is it worth it?"

dex- (+2) str- (+2) / int – (0) / wis- (-1) / const (+5)

prof- (+5)

How do I model time passing differently for different characters?

I am the DM in this situation and a character has wandered into a small area which links to another plane. In this plane time passes differently, so 1 minute in that plane would be 1 hour in the real world.

Normally I would make sure the players just get equal screen time to ensure they all feel included, but this is complicated by the fact that the players in normal time are in combat, and the character inside the distorted time area is not.

If the player inside the time bubble were to immediately walk straight out, they would have been gone for a full minute, at which point combat would have likely finished.

How can I best play this at the table without making the player in the time bubble just sit around while everyone else fights?

I would also like to keep it vague, so the players outside of the time bubble don’t know if it is safe or dangerous inside it (IE: they worry for the character trapped inside), but the only way I can see this being accomplished is to deal with combat first, and anyone in the time bubble gets to sit out of the game until either combat is over, or everyone is in the bubble.

A good answer will draw from experience of similar situations, and ensure that everyone at the table feels like they are getting to do something. My players can be pretty slow in combat (and even slower out of it!) so sitting for a full combat might mean not doing anything for over an hour (actually worst in this situation because the nature of the combat in this area could well take the full session).

Addendum: The time distortion effect isn’t mandatory, and if I can’t figure out a way to deal with it properly I will just drop it for an easier to work effect, so frame challenges are not needed.

Analyzing space complexity of passing data to function by reference

I have some difficulties with understanding the space complexity of the following algorithm. I’ve solved this problem subsets on leetcode. I understand why solutions’ space complexity would be O(N * 2^N), where N – the length of the initial vector. In all those cases all the subsets (vectors) are passed by value, so we contain every subset in the recursion stack. But i passed everything by reference. This is my code:

class Solution { public: vector<vector<int>> result; void rec(vector<int>& nums, int &position, vector<int> &currentSubset) {     if (position == nums.size()) {         result.push_back(currentSubset);         return;     }          currentSubset.push_back(nums[position]);     position++;     rec(nums, position, currentSubset);     currentSubset.pop_back();     rec(nums, position, currentSubset);     position--; }  vector<vector<int>> subsets(vector<int>& nums) {     vector <int> currentSubset;     int position = 0;     rec(nums, position, currentSubset);     return result; } }; 

Would the space complexity be O(N)? As far as i know, passing by reference doesn’t allocate new memory, so every possible subset would be contained in the same vector, which was created before the recursion calls.

I would also appreciate, if you told me how to estimate the space complexity, when working with references in general. Those are the only cases, where i hesitate about the correctness of my reasonings.

Thank you.

Passing plain text password over HTTPS

My login for POST is over HTTPS. Therefore, I don’t do anything to the provided password before submitting. And I don’t see an issue there unless someone is watching your browser’s developer console. (Tested the Google login. They also share the same approach.)

But I’ve received a concern asking "malicious user succeeds in session hijacking in someway will be able to access the end user credentials". Is this a valid argument? if so, how can I act?

Passing the session source to a hidden field of an unbounce form

It works fine if you go directly to to the form with a campaign link. But if you go to the website first and then click the button to get to the form – the source is gone from the url and so doesn’t get added to the field.

I came up with a solution that rewrote the button link on dom load to append with a new parameter name whatever campaign parameters they arrive with. However – that will only work if they land on one page and go to the form. I could keep making the tag more complicated to cover more situations and that might be the right path.

But I would like to know if there is an easier solution at the source by adding a tag that only triggers when the form loads and pulls the referrer or utm_source and puts it into the hidden field.

Does this make sense what I’m trying to do?

Thank you

McNaughton-Yamada Algotihm (1960) Regular Expression to DFA without passing through NFA

I have a homework problem here. It asks me to use the McNaughton-Yamada algorithm to first convert a regular expression to a DFA, and then minimize this using a partition argument. I can do the latter. My problem is that I cannot access any actual reference on the algorithm. Their original paper is behind a paywall at IEEE that my university does not have access to.

The algorithm went something like this: 1. For each symbol in the expression, given them a subscript from left to right increasing by one for each instance of that symbol. For example, the expression, aa* would receive a_1 a_2^*.

  1. We proceed to construct a diagram based on the possible lengths of words.

If done appropriately, this produces a DFA. I think the labeling in (1) is to help label the states.

Feel free to come up with your own example if you decide to give an answer. I won’t provide any problem here because there is no guarantee that it isn’t actually my homework exercise.

What’s the point of passing by value?

I am being told that I need to make the definitions of the int and the string up in the above function then pass by value. Why won’t my way work however?

void boardFunc(Game &game) {      game.board.numSquares = totSquare();  }  int totSquare() {      int tot = 0;     string what = "";      ifstream readBrd;     readBrd.open("board.txt");      readBrd >> what;     readBrd >> tot;      cout << what;      return tot;  }