How could I match my line-of-sight with Theta star? How could I fix my below problem?

I’m trying to implement my Theta star algorithm, but first I need to implement the line-of-sight algorithm. I have implemented below my lineOFsight algorithm in Python, I don’t know how accurate it is. But when I call this function of line of sight in my program, I got the below error:

    sight = lineOfsight(elevation1,drone_height,y1,x1,y2,x2) NameError: name 'lineOfsight' is not defined 

How could I fix this error?… And Is it ture what I have coded?

My Python code below for line-of-sight Algorithm:

from Thetastar import * def lineOfsight(elevation1,drone_height,y1,x1,y2,x2):     y_size = len(elevation1)     x_size = len(elevation1[0])      #Distance     dy=y2-y1;     dx=x2-x1;      if dy < 0:         dy=-dy         sy=-1     else:         sy=1      if dx < 0:         dx=-dx         sx=-1     else:         sx=1      f=0     if dy >= dx:         while y1 != y2:             f = f + dx             if f>=dy and 0<y1+(sy-1)/2 and y1+(sy-1)/2<y_size and 0<x1+(sx-1)/2 and x1+(sx-1)/2<x_size:                  if elevation1(y1+(sy-1)/2,x1+(sx-1)/2)> drone_height:                      sight = 0                     return sight                 x1 = x1 + sx                 f = f - dy                 if 0<y1+(sy-1)/2 and y1+(sy-1)/2<y_size and 0<x1+(sx-1)/2 and x1+(sx-1)/2<x_size:                     if f !=0 and elevation1(y1+(sy-1)/2,x1+(sx-1)/2)> drone_height:                         sight = 0                         return sight                  if 0<y1+(sy-1)/2 and y1+(sy-1)/2<y_size and 1<x1 and x1<x_size:                            if dx==0 and elevation1(y1+(sy-1)/2,x1)>h and E(y1+(sy-1)/2,x1-1) > drone_height:                         sight=0                         return sight                  y1=y1+sy      else:         while x1 != x2:                      f=f+dy;             if f>=dx and 0<y1+(sy-1)/2 and y1+(sy-1)/2<y_size and 0<x1+(sx-1)/2 and x1+(sx-1)/2<x_size:                 if elevation1(y1+(sy-1)/2,x1+(sx-1)/2) > drone_height:                     sight=0                     return sight                 y1=y1+sy                 f=f-dx              if 0<y1+(sy-1)/2 and y1+(sy-1)/2<y_size and 0<x1+(sx-1)/2 and x1+(sx-1)/2<x_size:                 if f != 0 and elevation1(y1+(sy-1)/2,x1+(sx-1)/2) > drone_height:                     sight=0                     return sight              if 1<y1 and y1<y_size and 0<x1+(sx-1)/2 and x1+(sx-1)/2<x_size:                 if dy==0 and elevation1(y1,x1+(sx-1)/2)>h and E(y1-1,x1+(sx-1)/2)> drone_height:                     sight=0                     return sight             x1=x1+sx     sight = 1     return sight  

How can I match handwritten character segments (including the direction they are written)?

I am trying to test Chinese character production by having users draw the characters on their device. There are plenty of data models that include the character information already, so I will have that. My question is, how do I check if the user drew the stroke that is expected (with some sort of threshold value). Some of these segments may have curves in them, which makes it a little more difficult than just line matching. I have a video here demonstrating what I’d like to achieve. Notice how if I draw the wrong segment, or in the wrong direction, it is not accepted.

Can DFA with output (definition?) match expressiveness of NFA with unique output?

For a deterministic finite automaton (DFA), some output tasks are easy when done in one direction, but difficult (or impossible?) when done in the reverse direction. Let’s take a simple example of outputting a word lower-case, or upper-case, depending on a control sequence included in the input. So the task

  • l:aNNa should become anna
  • u:aNNa should become ANNA

(where aNNa could be an arbitrary long word) seems to be quite easy for a DFA with output. The task in the reverse direction

  • aNNa:l should become anna
  • aNNa:u should become ANNA

however seems to be impossible for a DFA with output, at least for the commonly encountered definitions of DFA with output. On the other hand, a nondeterministic finite automaton (NFA) with unique output has no problems doing a task in the reverse direction, if it can do it in one direction.

  1. Is the observation correct that a DFA with output can’t do the task in the reverse direction, if it is forced to consume its input one symbol at a time?

  2. Would it be possible to relax the restrictions for DFA and NFA, such that a NFA (with unique output) would not gain any additional expressiveness from the relaxed restrictions, but the DFA with output (for the relaxed restrictions) would be able to match the expressiveness of a NFA with unique output?

Request does not match any route guest route

Im getting error 500 in checkout cart

The url requested are: mydomain.com/rest/default/V1/guest-carts/erzNxLfciUtMNiN5SCnjs5Nu3jl1Pr64/shipping-address

I really don’t know what is the problem

In error.log i see:

Cannot Instantiate Interface Swissup\Firecheckout\Api\GuestShippingMethodManagementInterface

In my dev. enviroment all work fine but in production no.

Magento 2.3.0

Thanks

Evince and fc-match think Windows 8.1 courbd.ttf is worse match than DejaVu Sans Book font

I have invoice PDF where the shop’s software uses Courier New and Courier New Bold fonts. However, both Evince and fc-match decide (assuming through Fontconfig) that my Windows 8.1 original Courier New Bold in courbd.ttf is not the best match and it decides to use DejaVu Sans Book instead. This completely breaks the PDF rendering in Evince.

This is best demonstrated using fc-match "Courier New Bold":

/usr/share/fonts> fc-match  "Courier New Bold"          DejaVuSans.ttf: "DejaVu Sans" "Book" 

If I up the debugging output for Fontconfig using FC_DEBUG=2 environment variable I can see it looking at my courbd.ttf but somehow it rejects it in favour of DejaVu Sans.

This is all on Ubuntu/Xubuntu 19.04.

Q: Avoid SharePoint 2016 search to match URL

Is there any way to not match users’ keywords to pages’ URL?

If users try to search using domain name, the whole site will be returned in result.

e.g.

Keywords: abc-sharepoint

Results: http://abc-sharepoint/unrealted_listsordocument/…

Is there anyway to configure the crawler or search web part such that SharePoint won’t match users’ keyword to any URLs?

SharePoint 2013 -Compare values in list to see if all column values match- dashboard

I want to create a dashboard indicating when all items in a list are equal to “Yes”. For testing I am innerHtmling Done/Not Done. The logic seems to work , but I am afraid the code is testing the list as a whole and not the individual items. I am using choice columns.

Am I missing a loop?

$  (document).ready(function() {     arrayIn_OutItems();     

});

function arrayIn_OutItems(){ var siteUrl = “https:xxx/_api/web/lists/GetByTitle(‘listName’)/items?$ select=”Title,Office,HR,Accounting; var array = []

$  .ajax({     url: siteUrl,     type: "GET",     async: false,     headers: {         "accept": "application/json;odata=verbose"     },     success: function (data) {         array = data.d.results;         console.log(array);         var isYes =          for(var i = 0;array[i].length < 0;i++{             array.every(function (e) {       return e  == "Yes"       });         }         if(isYes == true){           document.getElementById('yes/no').innerHTML = "Done";         }else{           document.getElementById('yes/no').innerHTML = "Not Done";         }      },     error: function (err) {         console.log(err);     } }); 

}

How to use grep to match a string with spaces in it?

Can anyone help me with this:

I am trying to extract a time stamp, by matching a string. For this am using combination of grep/awk commands. As the sting has 4 spces before [1] and one after, am confused how to work around it. Am new to programming, so need some help here.

IS="$  (grep 'Starting    [1] TaskInit' process.log |  awk '{print $  4}')" echo "$  IS" 

Aim: It should match the string in the process.log file and should print out the time stamp related to that row.

How to split 2 teams for a FPS deatch match game in Unity?

I’m making a playable one level only FPS death match game in Unity. I’m in the part where the AIs now can find and shoot their own target and keep looping to find targets until nothing left. Every AIs and including player were tagged with tag “Target” for the AIs to randomly find their target. (I already excluded self finding).

Now I want to split them in 2 teams. And here is the thing that I keep wondering. Should I use 2 tags for 2 teams (like team red, team blue for ex) then make and attach 2 scripts separately for each AI in the team (the logic in the script will be like “team red” will find game object with tag “team blue” and vice versa). Is that how it works? Is there more efficient way or should I say, “smarter” way to work around this problem?

Here is the script if you need to know more about what I am trying to say https://github.com/Bezari0us/FPS_AI_Behaviour