java – Given an unordered symbol table(array based) Is there an advantage to using a contains method that returns the index?

I am working on an assignment and was curious about a potential real world application. Would it be more efficient to use a contains method that returns the index of the key or -1 if not found. This I imagine would allow the programmer the ability to save double calls to get and contains within a method. Both methods have O(n) time complexity worst case. Is there a reason not to do it? The only reason why I could imagine not doing so is because it could confuse the client.

plotting – How to properly write multiline text with LaTeX symbol in a frame and with background

I wanted to include a number of text-box with background color white inside a plot. The text inside the box will also have LaTex expressions as well as multiple lines.

Is there any way to include multiline text (including LaTeX symbol) inside a plot?

In addition I want to set frame and background color for the box.
I am currently using Epilog and Prolog to include such text.

  PDF(BinomialDistribution(50, p), k)}, {p, {0.3, 0.5, 0.8}}, {k, 0,50}), 
  Filling -> Axis, 
  FillingStyle -> Automatic,
  Epilog -> Text(Style(ToExpression("\text{E}_{x} \n text2", TeXForm, HoldForm),Bold),{30, 0.13}),
  Prolog -> {Inset(Framed( "E_{x}ntext2" , RoundingRadius -> 5,Background -> White), {45, 0.13})}
(*Prolog -> {Inset(Framed( MaTeX("E_{x}\n text2" ) , RoundingRadius -> 5,Background ->White),{45,0.13})}*)

Option-1 fails writing E_{x} as well as breaking line.
Option-2 fails writing E_{x} but breaks line.
Option-3 is the one I wanted but it fails in breaking line.

Is there any way to achieve this.

Moreover I also wanted to ask, what should one do if one has to include say more that two text boxes?

What is the meaning of the small blinking camera symbol in my Canon 70D viewfinder?

This is the electronic level indicator. It indicates that you’re not holding the camera parallel to the ground but instead have tilted it. The specific configuration indicates that you’ve got a tilt of greater than 2°.

From page 66 of the manual:

enter image description here

Note that this is configurable — you can turn it off if you don’t like it. It’s also available on the rear LCD during Live View shooting (where it’s maybe a little more obvious as a level).

Also note the manual’s warning of a 1° margin of error (or even greater when the camera is far from level).

ms office – hat{} symbol “^” in a LaTeX equation in Pages disappears after being exported to a MS Word file

I use Pages 10.2 (7028.0.88) on macOS 10.15.7. As I finished editing my Pages file and exported it to a .docx file for my colleagues, all the equations in it were successfully passed to the new file and became editable in MS Word, except that all the hat{}‘s “^” were missing. I also tried widehat{} but encountered the same problem.

Is there any other LaTeX symbol that looks like hat{} “^” and can stay in the equations after being exported to .docx?