Categories

## family tree in SWI PROLOG

there is some error with the grandma , cousin, brother, uncle rules i tried so many rules but still could not find the correct one it returns false , please helpppppppppp /*rules*/ male(james). male(charles). male(william). female(megan). male(george). female(catherine). female(diana). female(elizabith). parent(james, charles). parent(james, elizabeth). parent(charles, catherine). parent(charles, william). parent(charles, megan). parent(elizabeth, diana). parent(diana, george). /*rules*/ […]

Categories

## cleaning up table data from a webscraper

I have a webscraper that pulls table data and sometimes it’s uneven in the data it gets, it pulls the data into a table like so from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC url5001= "https://matrix.heartlandmls.com/Matrix/Public/Portal.aspx?L=1&k=990316X949Z&p=DE-77667588-490" new_set5001 = [] driver = webdriver.Firefox() driver.get(url5001) driver.find_element_by_xpath("/html/body/form/div[3]/div/div/div[5]/div[3]/span[2]/div/div/div[2]/div[1]/div/div/div[2]/div[2]/div[1]/span/a").click() time.sleep(5) […]

Categories

## Create new arrays from nested arrays based on corresponding indexes

I have an array of nested arrays, I need to create new arrays made up of the elements in corresponding index positions. Kind of hard to explain but here is what I’m starting with and what I need to produce: arrays = [ [["ab", "cd", "ef", "gh"], ["ik", "lm", "no", "pq"], ["rs", "tu", "vw", "xy"]], […]

Categories

## How to plot several columns of a matrix in the same plot in R?

I have a matrix called XY with the following entries: 0 1 1 3 2 4 2 3 4 2 3 5 6 2 5 6 I want to plot (in the same graph) columns 1 and 2 as the x and y axes respectively and columns 3 and 4 being the x and y […]

Categories

## Template matching – drawing shape on matching on GUI

I’m working on template matching Using implemented function to make a match space between them and getting local maxima of the expected matches in the original photo now, I have the local maxima points x , y displayed in a list in my GUI I want to draw a rectangle or a circle around the […]

Categories

## Extract specific values from xml format to a comma separated value format (csv) with Notepad++

I need to extract specific values from XML format to a comma-separated value format (CSV) with Notepad++ The XML source file looks like:source file GRID id=”301019″ x=”**328.217224**” y=”**543.844177**” z=”**0.000000**” rx=”**0.000000** **-1.000000 0.000000**” ry=”**1.000000 0.000000 0.000000**” rz=”**0.000000 0.000000 1.000000**”/ GRID id=”303001″ x=”328.217224″ y=”518.844177″ z=”0.000000″ rx=”0.000000 -1.000000 0.000000″ ry=”1.000000 0.000000 0.000000″ rz=”0.000000 0.000000 1.000000″/ GRID id=”303002″ x=”328.217224″ […]

Categories

## Merging dataframes based on conditions

I have two dataframes, a = {‘SEX’:[…], ‘ENT’:[…], ‘XY’:[…], ‘RZD’:[…], ‘TOT’:[…]} with shape 769, 5 and b = {‘K’:[…], ‘NOM’:[…], ‘M’:[…], SEX’:[…], ‘ENT’:[…], ‘POB’:[…], ‘RZD’:[…], ‘%A’:[…], ‘%B’:[…]} with shape 34398, 9. I need to merge these dataframes based on ‘SEX’, ‘ENT’, ‘RZD’. Once merged, I fill with zeros wherever values do not match. Finally, I […]

Categories

## Clarification in Eisenbud and Harris

This is from page 59 in the text: Let $X_{\alpha,\beta}=\text{Spec } k[x,y]/(x^2,xy,y^2,\alpha x+ \beta y)\hookrightarrow \mathbb{A}^2_k$. The subscheme $X_{\alpha,\beta}$ can be characterized as the image of the subscheme $\text{Spec }k[x]/(x^2) \subset \mathbb{A}^1_k$ under the inclusion of $\mathbb{A}^1_k$ in $\mathbb{A}^2_k$ given by $x\mapsto (\beta x, -\alpha x)$. I do not understand this inclusion of $\mathbb{A}^1_k$ in […]

Categories

## How to design a table in servicenow

I am new to front end designing, I want to design a table as shown below in Servicenow Service portal: I am trying from my side but I am not getting the correct design <div class=”panel panel-body”> <h2>Book Rooms v1</h2> <table border=”2″ class=”table table-striped m-b-lg”> <tr> <th>Country</th> <th>Title</th> <th>End Date</th> </tr> </table> I want to […]

Categories

## Is there a theorem in universal algebra that states this?

If $A$ and $B$ are structures of some kind, then two elements $x,y\in A$ are equal, $x=y$, if for every homomorphism $f:A\to B$ it’s $f(x)=f(y)$. Or the converse: if $x\neq y$ then exists a homomorphism $f$ such that $f(x)\neq f(y)$. It’something like completeness theorem, but I only need an example of a theorem that states […]