Do I just put the html in a page when enqueueng or do I also have to reference js file from the html page

I am trying to get my javascript to work in my page, but I have always just put the html on the actual page, but now am wondering if I am supposed to put the <script src before the html as well to make the code work in order to reference the javascript. I have enqueued everything, the js and css from the functions.php Here it is:

<script src='https://artandleatherspencer.local/wp-content/themes/twentythirteen-child/js/myscript.js)  <div id="clockContainer">  <div id="hour"></div>  <div id="minute"></div>  <div id="second"></div>  </div> 

here is the code in the functions.php:

function childtheme_parent_styles() {     wp_enqueue_style('parent', get_template_directory_uri().'/css/style.css' );     wp_enqueue_style('mytheme_main_style', get_stylesheet_uri());     wp_register_script('main-js', get_stylesheet_directory_uri() . '/js/main.js');     if( is_page(507) ) {         wp_enqueue_script( 'main-js');     } }  add_action( 'wp_enqueue_scripts', 'childtheme_parent_styles'); 

and here the javascript in main.js in js folder

console.log('executing scripts.js');  setInterval(() => {     d = new Date(); //object of date()     hr = d.getHours();     min = d.getMinutes();     sec = d.getSeconds();     hr_rotation = 30 * hr + min / 2; //converting current time     min_rotation = 6 * min;     sec_rotation = 6 * sec;       hour.style.transform = `rotate($  {hr_rotation}deg)`;     minute.style.transform = `rotate($  {min_rotation}deg)`;     second.style.transform = `rotate($  {sec_rotation}deg)`; }, 1000);       

css: in style.css file

#clockContainer {     position: relative;     margin: auto;     height: 40vw;     /*to make the height and width responsive*/     width: 40vw;     background: url(clock.png) no-repeat;     /*setting our background image*/     background-size: 100%; }    #hour, #minute, #second {     position: absolute;     background: black;     border-radius: 10px;     transform-origin: bottom; }    #hour {     width: 1.8%;     height: 25%;     top: 25%;     left: 48.85%;     opacity: 0.8; }    #minute {     width: 1.6%;     height: 30%;     top: 19%;     left: 48.9%;     opacity: 0.8; }    #second {     width: 1%;     height: 40%;     top: 9%;     left: 49.25%;     opacity: 0.8; } 

Can a MySQL FOREIGN KEY CONSTRAINT reference a column value rather than a column name?

I have a child table whose rows are related to various parent tables by parent_table_name, and parent_id columns.

Can I set up a foreign key constraint for these relationships?

In the tables below, I can run queries such as SELECT * FROM parent_1 p1 JOIN child c ON p1.id = c.parent_id AND c.parent_table_name = 'parent_1'; to get a row from parent_1 and any related rows from child.

CREATE TABLE parent_1 (       id INT NOT NULL AUTO_INCREMENT     , PRIMARY KEY(id) );  INSERT INTO parent_1 VALUES(1);  CREATE TABLE parent_2 (       id INT NOT NULL AUTO_INCREMENT     , PRIMARY KEY(id) );  INSERT INTO parent_2 VALUES(1);  CREATE TABLE child (       id INT NOT NULL AUTO_INCREMENT     , parent_table_name VARCHAR(16) NOT NULL     , parent_id INT NOT NULL     , some_interesting_value VARCHAR(255) NOT NULL     , PRIMARY KEY(id)     , KEY (parent_table_name, parent_id) );  INSERT INTO child VALUES(NULL, 'parent_1', 1, 'Hello world'); INSERT INTO child VALUES(NULL, 'parent_2', 1, 'Goodbye world'); 

I have tried adding a constraint as below, but got a 1064 error.

ALTER TABLE parent_1 ADD CONSTRAINT p1_children FOREIGN KEY ("parent_1", id)     REFERENCES child (parent_table_name, parent_id);  ERROR 1064 (42000): You have an error in your SQL syntax;     check the manual that corresponds to your MySQL server version     for the right syntax to use near '"parent_1", id) REFERENCES     child (parent_table_name, parent_id)' at line 1 

Is there some way to set up this sort of constraint? Or is the only way to have a third table that has the primary keys from the parent and child table?

Cannot find Wood Harness reference

In the The Dark Eye Aventuria Compendium, page 215 has a break down of the stats and equipment for the Dajin-Buskur template.

Its equipment section makes a mention of a Wood Harness as the first item. Now the only wooden item in the Armor section of Aventuria Compendium is Wooden Armor on page 230.

The Aventuria Armory book has no reference to either Wooden Armor or Wood Harness.

So, is there a book that talks about difference in materials being used to create the armors or is this just not reference yet?

How do i make a reference to another game manager? Not game object

I made a reference here but the drop down list in script seems to not contain the variables from another script

 [SerializeField] private gm MainPlatform;  public Transform SidePlatform; private Vector3 NextSpawnSidePlatform; void Start() {     MainPlatform = GameObject.FindWithTag("gameManager").GetComponent<gm>();     NextSpawnSidePlatform.x = 30.5f;     StartCoroutine(SpawnSidePlatform()); } 

How can I use .txt or .xml reference file to slice up spritesheets in Lua?

I’ve been learning to code games in Lua, and I’ve recently started on my own project. I wanted to use the following spritesheet from Kenney.nl, as well as a few other spritesheets from them

enter image description here

but I’m a little confused as to how to cut it up. Some of the sprites are irregularly sized from the normal 70×70, and there’s a 2px gap between each one, so my current understanding of how to generate quads from a spritesheet doesn’t seem to apply

Thankfully, the spritesheets each come with an associated .txt or .xml file (it varies, not sure why) that gives the top left x/y coordinates, as well as the width and height of each sprite. This seems like it would make the job of creating a reference table of sprites really easy, but I can’t figure out how to include something like

<SubTexture name="box.png" x="0" y="864" width="70" height="70"/> <SubTexture name="boxAlt.png" x="0" y="792" width="70" height="70"/> <SubTexture name="boxCoin.png" x="0" y="720" width="70" height="70"/> <SubTexture name="boxCoinAlt.png" x="0" y="576" width="70" height="70"/> 

or

fishSwim1 = 76 0 66 42 fishSwim2 = 73 43 62 43 flyDead = 143 0 59 33 flyFly1 = 0 32 72 36 flyFly2 = 0 0 75 31 

as a reference file in my Lua code. Everything I’ve seen online has been guides on chopping up spritesheets with uniform width and height, or using some website or service to create a spritesheet/reference file, which I don’t need to do (and I’d rather do as much as possible within my code)

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.

Looking for a 3.5 reference to a Monster Harvester’s Handbook

Back in the day, someone had created a handbook for harvesting parts from monsters. They went through every monster in the SRD and chose parts (and fairly reasonable prices for those parts). I was wondering if anyone knew of a link to the old material. I can only find links to 5e versions, which is not what I am looking for.

I believe there were multiple versions, and the one I vaguely recollect was a Word document. I also think there was an Excel version, IIRC, I was not as fond of that one (I do not recall why, as this was many years ago).

relocation error: symbol SSL_trace version OPENSSL_1_1_0 not defined in file libssl.so.1.1 with link time reference

I compiled libssl.so and libcrypto.so using openssl1.1.1d using command ./config -d enable-ssl-trace. when i use libssl.so and libcrypto.so and run my the apps. it show me this relocation error. i checked libssl.map and found SSL_trace is it OPENSSL_1_1_0 global feature. May I know how can I make it defined in file libssl.so.1.1?