Need help tracking down the cause of a Jquery/JS Error in Magento 2

I tried to include a Jquery lightbox script (Ekko Lightbox) in one of my Magento 2 CMS pages. But when I click on the trigger links to display a video, nothing seems to happen in the browser, but looking at the console, I see the following error: “No template was found by selector: null”.

As far as I can tell, the appropriate JQuery and lightbox scripting is being loaded correctly so I think the problem is with how I’m calling the script in the CMS page:

<script> require(["jquery","ekkolightbox","domReady!"], (function($  ){     $  (document).on('click', '[data-toggle="lightbox"]', function(event) {         event.preventDefault();         $  (this).ekkoLightbox();     }); })); </script> 

…and then, in the content of the page, the script is called with this kind of markup:

<a class="btn btn-sm btn-outline-secondary stretched-link" href="xxxx" target="_blank" data-toggle="lightbox">View</a> 

I don’t understand this error or what I might do to fix it. What is going on here and how can I troubleshoot?

As the dungeon master, how do I handle a player that insists on a specific class when I already know that choice will cause issues?

I agreed to DM Dragon Heist for a group of my friends. One of them wants to play a wizard. Based on past experience, I know that she will ignore the prepared spells and just cast anything she wants. Our previous DM attempted to keep her to the rules, but she wore him down and eventually he caved on multiple occasions. Because of this, I recommended she play a sorcerer. While I don’t think this will stop them from trying to cheat, I’m hoping it will at least help with the type of issues she caused in the previous campaign. She’s also the least experienced player in our group, doesn’t usually play attention, and rarely even remembers to bring her character sheet. She is ignoring my recommendation, though, and insists on playing a wizard. I’m not really sure why, other than she knows that I don’t want her to play one.

How can I best handle this situation? I would love to exclude her from the game, but I already know that the remainder of my friends would be unhappy. I can allow her to play a wizard, but based on prior experience I know that she bends the rules and I really don’t want to DM a campaign where one or more players are cheating. I know that eventually she’ll lose interest and stop showing up to the game, but I would prefer to deal with the issue now. Also I’d rather address it now, than have to argue with her every single session. I’m worried about setting the precedent that her player can do absolutely anything that she wants.

I offered to let someone else DM, but no one appears willing to. The previous DM seems to need a break, and will only be a player in this campaign.

Based on the comments, I get the impression that the general advice is that I should just stop worrying and let my players have fun even when that means ignoring the rules.

TLDR: One of my players chose a certain class, but I am concrened that allowing them to play the class will create problems and drag the game down.

Upgrade our Operating System from 2008 R2 to 2012 R2 for sharepoint 2010 and 2013, can it cause issues

We have 2 sharepoint on-premises farms 2010 & 2013,which have the following architecture:-

  • 2 SharePoint application servers (2010 & 2013) which are installed on Windows server 2008 R2
  • 2 SQl servers 2008 R2 installed on Windows server 2008 R2.

now since windows 2008 R2 will have its end of life on January 2020. so we are planning to upgrade the OS for the sharepoint application servers (2010 & 2013) and thier database server from windows 2008 R2 to windows 2012 or 2016 R2. but i am not sure if this will be a straight formawrdward task? or we need to reconfigure or re-install the sharepoint? our on-premises farms have site collections (mainly enterprise wiki + team site), sub-sites and some farm solutions for server-side event recievers.

so i am not sure if upgrading the OS will affect the 2 sharepoint on-premises farms (2010 & 2013) ? or things on paper should work well out of the box?

Does a wizard need their hands free in order to cause their familiar from the Find Familiar spell to reappear?

Recently, in the first session of a new campaign, my level 1 wizard found himself held captive with his hands and feet tied by rope. The DM made it clear that I could not cast spells/cantrips that required a Somatic component.

However, my familiar was already summoned and was temporarily dismissed using the action specified in the find familiar spell (PHB pg. 240). I wanted to have my familiar reappear within 30 ft. of me as per the reappear action specified in this spell (I wanted it to help me get out of my binds). The DM told me that since the ritual/spell required somatic components, and even though I wasn’t casting it again, if I wanted my familiar to reappear I would need to be able to make a somatic movement (thus I could not make my familiar reappear and help).

Does using the reappear action in find familiar require the use of my hands, or is it purely telepathic?

One of my primary reasons for picking find familiar as a spell was its ability to help escapes by reappearing and disappearing, which is a lot less doable if it requires somatic movement.

Cannot find the cause of Memory Leak in C# Winforms Application

I have a program that processes multiple images.The memory spikes from 70MB to 300-400-600Mb and comes down when processing a large number of high resolution images. I have disposed of all Bitmaps,used the using statment wherever possible,but the memory leak cannot be fixed.Can someone please help me out

The coremethod called is this

Boolean batchprocess(Image<Bgr, byte> img, Bitmap bit, Bitmap orgbitmap, string file) {     try     {         pictureBox5.Controls.Clear();         pictureBox5.Invalidate();           if (pixdatas.Length != 0)         {              var pixdata = pixdatas.Last();             Point cpoint = getcenter(pixdata);             // foreach (var pixdata in pixdatas)             //  {             Rectangle newpixdataRect = new Rectangle();             newpixdataRect.Location = pixdata.Location;                //-------->>>>>>>>>>>>>>>>>>>>>>>>> Running Normal Code                   newpixdataRect.Y = (int)(pixdata.Y - pixdata.Height / 1.8);                    Rectangle ResizedRect;                 Rectangle originalrect = newpixdataRect;                 newpixdataRect = ConvertToLargeRect(newpixdataRect, orgbitmap.Size, bit.Size);                 if (cropmode == 3 && ismastercropset)                 {                      Size tsize = new Size((int)(mastercropsize.Width), (int)(mastercropsize.Height));                     ResizedRect = new Rectangle(newpixdataRect.Location, tsize);                       ResizedRect.Location = new Point(newpixdataRect.X + (newpixdataRect.Width - ResizedRect.Width) / 2,                                      newpixdataRect.Y + (newpixdataRect.Height - ResizedRect.Height) / 2);                      if (ResizedRect.X + ResizedRect.Width > orgbitmap.Width)                     {                          int temp = ResizedRect.X + ResizedRect.Width - orgbitmap.Width;                         ResizedRect.Width -= temp;                         if (cropmode == 2)                         {                             ResizedRect.Height -= temp;                         }                     }                       if (ResizedRect.Y + ResizedRect.Height > orgbitmap.Height)                     {                          int temp = ResizedRect.Y + ResizedRect.Height - orgbitmap.Height;                         ResizedRect.Height -= temp;                         if (cropmode == 2)                         {                             ResizedRect.Width -= temp;                         }                     }                       if (ResizedRect.X <= 0)                     {                         ResizedRect.X = 1;                     }                     if (ResizedRect.Y <= 0)                     {                         ResizedRect.Y = 1;                     }                     if (ResizedRect.Height > orgbitmap.Height)                     {                         ResizedRect.Height = orgbitmap.Height;                     }                     if (ResizedRect.Width > orgbitmap.Width)                     {                         ResizedRect.Width = orgbitmap.Width;                     }                     if(target!=null)                     {                         target.Dispose();                     }                     target = new Bitmap(ResizedRect.Width, ResizedRect.Height);                    }                 else                 {                      ResizedRect = new Rectangle(newpixdataRect.Location, newpixdataRect.Size);                     if (target != null)                     {                         target.Dispose();                     }                     target = new Bitmap(ResizedRect.Width, ResizedRect.Height);                 }                   using (Graphics g = Graphics.FromImage(target))                 {                     g.SmoothingMode = SmoothingMode.HighQuality;                     g.DrawImage(orgbitmap, new Rectangle(0, 0, target.Width, target.Height),                                 ResizedRect, GraphicsUnit.Pixel);                     if (this.tflag2 == true)                     {                         StringFormat stringFormat = new StringFormat();                         stringFormat.Alignment = StringAlignment.Center;                         stringFormat.LineAlignment = StringAlignment.Center;                         g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;                          Font goodFont = FindFont(g, "test", target.Size, cfont);                            g.DrawString("test, goodFont, Brushes.White, new PointF(target.Width / 2, target.Height / 2), stringFormat);                     }                 }                  if (displaybitmap != null)                 {                     displaybitmap.Dispose();                 }                 displaybitmap = img.ToBitmap();                  using (Graphics tempg = Graphics.FromImage(displaybitmap))                 {                      using (var p = new Pen(Color.LightGreen, 2))                     {                         p.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;                         //Checking if Master Crop is Set and resizing and shifting the rectangle                          if (ismastercropset && cropmode == 3)                         {                             using (Bitmap tmp = new Bitmap(file))                             {                                    float xfactor = (float)tmp.Width / (float)bit.Width;                                 float yfactor = (float)tmp.Height / (float)bit.Height;                                 Size tsize = new Size((int)(mastercropsize.Width / xfactor), (int)(mastercropsize.Height / yfactor));                                 ResizedRect = new Rectangle(originalrect.Location, tsize);                                 ResizedRect.Location = new Point(originalrect.X + (originalrect.Width - ResizedRect.Width) / 2,                                                  originalrect.Y + (originalrect.Height - ResizedRect.Height) / 2);                             }                           }                         else                         {                             //Used to draw rectangle on picturebox if cropmode is not manual                             ResizedRect = originalrect;                          }                         tempg.DrawRectangle(p, ResizedRect);                      }                 }                  pictureBox5.InitialImage = null;                 pictureBox5.Image = new Bitmap(displaybitmap);                 txt_filename.Text = Path.GetFileName(file);                 txt_width.Text = orgbitmap.Width.ToString();                 txt_height.Text = orgbitmap.Height.ToString();                   crop_width.Text = newpixdataRect.Width.ToString();                 crop_height.Text = newpixdataRect.Height.ToString();                      if (resize == true)                 {                     if (hardresize == true)                     {                         target = HardResize(target, rwidth, rheight);                     }                     else                     {                         target = resizeImage(target, new SizeF(rwidth, rheight));                     }                 }                 saveJpeg(outdir + "\" + Path.GetFileNameWithoutExtension(file), target, quality);                 target.Dispose();                 img.Dispose();                 orgbitmap.Dispose();                 bit.Dispose();                 displaybitmap.Dispose();                 System.GC.Collect();                 System.GC.WaitForPendingFinalizers();                 return true;              }         }         else         {             if (target != null)             {                 target.Dispose();             }             bit.Dispose();             orgbitmap.Dispose();             // img.Dispose();             GC.Collect();             return false;         }       }     catch (Exception error)     {         bit.Dispose();         return false;     }  } 

This method is called from a Backgroundworker

    private void aicropper_DoWork(object sender, DoWorkEventArgs e)     {          pictureBox5.Controls.Clear();         successcounter = 0;         errorcounter = 0;          //  ----------------- Initially processing custom crop images         foreach (var v in modifiedimages)         {             mylist.RemoveAll(x => x == v.Filename);         }         foreach(var v in modifiedimages)         {             //Checking if the user pressed the cancel button             if (stopprocess)             {                 break;             }              using (Bitmap b = new Bitmap(v.Filename))             {                   Rectangle xrect = ConvertToLargeRect(v.translatedrect,b.Size,v.imgsize);                 using (Bitmap tempbmp = new Bitmap(cropImage(b, xrect)))                 {                     pictureBox5.Image = resizeImage(b, pictureBox5.Size);                     using (var p = new Pen(Color.LightGreen, 2))                     {                         using (Graphics g = Graphics.FromImage(pictureBox5.Image))                         {                             p.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;                             g.DrawRectangle(p,new Rectangle(v.Location,v.Size));                         }                     }                     saveJpeg(outdir + "\" + Path.GetFileNameWithoutExtension(v.Filename), tempbmp, quality);                     successcounter++;                     progressBarControl1.PerformStep();                     progressBarControl1.Update();                 }             }         }         //------------------------------------------------------------                     for (int count = 0; count < mylist.Count; count++)               {                 try                 {                 //Checking if the user pressed the cancel button                 if (stopprocess)                 {                     stopprocess = false;                     break;                  }                 //MessageBox.Show(mylist.Count)                 using (Bitmap x = FixImageOrientation(new Bitmap(mylist[count])))                 {                     try                     {                          Bitmap y = new Bitmap(x);                         if (stop == false)                         {                                if (y.Width > 1000 || y.Height > 1000)                             {                                 // y = ResizekeepAspectRatio(y, 1000, 1000);                                  // y = Crop(y);                                 y = UpdatedResizeImage(y, new Size(pictureBox5.Width, pictureBox5.Height));                                 //y.Save("xfxf.png");                             }                               using (Image<Bgr, byte> image = new Image<Bgr, byte>(y))                             {                                   if (batchprocess(image, y, x, mylist[count]) == false)                                 {                                     //  multipixdatadetection = false;                                     // if (detect(image, x, mylist[count]) == false)                                     //{                                     errorcounter++;                                     errorlist.Add(mylist[count]);                                     //}                                     //else                                     //  {                                     //    successcounter++;                                     //}                                     // multipixdatadetection = backupboolean;                                 }                                 else                                 {                                     successcounter++;                                 }                                     progressBarControl1.PerformStep();                                 progressBarControl1.Update();                                 x.Dispose();                                 y.Dispose();                               }                         }                     }                     catch (Exception err)                     {                         if (err.Message == "A Graphics object cannot be created from an image that has an indexed pixel format.")                         {                                //Catching index exception and converting bitmap to usable format by using temporary file                             string temppath = Path.GetTempPath();                             try                             {                                 if (Directory.Exists(temppath + @"\MYAPP\indexerror\") == false)                                 {                                     Directory.CreateDirectory(temppath + @"\MYAPP\indexerror\");                                 }                              }                             catch (Exception)                             {                              }                              using (Bitmap tempx = new Bitmap(mylist[count]))                             {                                 try                                 {                                     //CorRecting the Bitmap,Saving temporarly and Adding it to Process List                                     Bitmap temp = new Bitmap(tempx);                                      temp.Save(temppath + @"\MYAPP\indexerror\" + Path.GetFileName(mylist[count]));                                     mylist.Add(temppath + @"\MYAPP\indexerror\" + Path.GetFileName(mylist[count]));                                     temp.Dispose();                                  }                                 catch (Exception)                                 {                                  }                                }                         }                         else if (err.Message == "Out of memory.")                         {                             //Handling Corrupt Images that is not auto screened when addimagesworker is not allowed to complete.                         }                         else if (err.Message == "A generic error occurred in GDI+.")                         {                             XtraMessageBox.Show("You cannot overwrite Files.\nPlease select a different Ouput Location", "MYAPP");                             break;                         }                          else                         {                               //batcherror=true;                             continue;                             //   break;                         }                     }                  }             }             catch (Exception error)             {                 errorcounter++;                 continue;             }         }          } 

Will letting my players take enemy weapons cause balance issues?

My players are very much of the “kill a monster and take their stuff” mentality. They have acquired a veritable collection of daggers, javelins, short swords, and so on, from all the monsters they’ve killed. This doesn’t seem like it should cause balance issues, because the weapons are not necessarily stronger than the players’ original weapons, and the weapons they find aren’t magic items (because I want to make sure to keep within the treasure parcel guidelines).

Will I run into any serious problems if my characters take weapons from enemies? If it does cause problems, is there a way around those problems?

Cause of disparity between methods of calculation of specific angular momentum?

I’m trying to numerically solve for the delta-V cost of a transfer between two close elliptic orbits which are inclined relative to each other. The method I’m using essentially calculates the velocity vectors of the initial orbit at one node, the final orbit at the opposing node, and then calculates the transfer orbit from initial flight path angle, initial radius, and final radius.

One key step is to calculate the specific angular momentum vector and eccentricity vector of the transfer orbit, in order to calculate the perifocal-to-inertial direction cosine matrix for the transfer orbit. However, when I calculate the angular momentum vector h of the transfer orbit in the inertial frame from the cross product of the position and velocity vectors in the inertial frame, I find significant error (relative error is -3.9521e-8) between the magnitude of this vector and the scalar specific angular momentum calculated earlier in the code.

This is strange to me because that scalar angular momentum is used to calculate the velocity vector. I’m confused as to where the loss of precision is occurring.

I’ve tried providing inputs with greater precision, specifically the mu value I have been using, but this did not shift the relative error at all. When I use the same cross product method to calculate specific angular momentum of orbits 1 and 2, the error is on the order of machine precision.


    mu = 3.98600437823e+14;      thetaNT = -55.1582940061466; % deg     eT = 0.022905923178296;     aT = 7.243582592195826e+06; % m      r1A = 7.146263097977215e+06; % m     v1RA = -1.390985544431790e+02; % m/s     v1ThetaA = 7.494958913236144e+03; % m/s      eR1 = [0.355828643065080;-0.934551216774375;0];     eTheta1 = [0.934551216774375;0.355828643065080;0];      nCpf1 = [0.263190394679355,-0.840751409136755,0.473146789255815;         0.880932410956014,0.00949753358184791,-0.473146789255815;         0.393305102275257,0.541338032000730,0.743144825477394];     nCpf2 = [0.107314578042381,-0.875080710676727,0.471929370924401;         0.879361618777851,-0.137938482815824,-0.455736896003458;         0.463903788257849,0.463903788257849,0.754709580222772];       v1A = sqrt(v1RA^2 + v1ThetaA^2); % Total speed of orbit 1 at A     r1A = K1;      hT = sqrt(aT*mu*(1-eT^2)); % Specific angular momentum of transfer orbit      eRTB = [-cosd(thetaNT);sind(thetaNT+180);0];     eThetaTB = [-sind(thetaNT+180);-cosd(thetaNT);0];      % Calculation of radial speed and tangential speed     vTRA = mu/hT*eT*sind(thetaNT);     vTThetaA = mu/hT*(1+eT*cosd(thetaNT));      vTA = sqrt(vTRA^2+vTThetaA^2);      vTRB = mu/hT*eT*sind(thetaNT+180);     vTThetaB = mu/hT*(1-eT*cosd(thetaNT));      % Conversion of radius and speeds into radius and velocity vectors     % in perifocal frames     r1APF1 = r1A.*eR1;     v1APF1 = v1RA.*eR1 + v1ThetaA.*eTheta1;      vTBPFT = vTRB.*eRTB + vTThetaB.*eThetaTB;      v2BPF2 = v2RB.*eR2 + v2ThetaB.*eTheta2;      % Conversion to inertial reference frame     r1AN = nCpf1*r1APF1;     v1AN = nCpf1*v1APF1;      v2BN = nCpf2*v2BPF2;      rTAN = r1AN;     vTAN = v1AN.*(vTA/v1A);      % Calculation of angular momentum and eccentricity vectors in     % inertial frame     hTN = cross(rTAN, vTAN);     diff = (norm(hTN)-hT)/hT 


I would expect diff to be on the order of machine precision, roughly 2.2e-16, but it is instead on the order of 1e-8, 8 orders of magnitude larger than it should be.