646
questions
0
votes
0
answers
19
views
copy elements between dataframes on condition of equality of other dataframe elements
To simplify, I have two similar dataframes:
df1 <- data.frame(a=seq(0, 100, by=5), b=rep(NA, times = 21))
df2 <- data.frame(a=seq(0, 100, by=10), b=seq(0, 10, by=1))
I wnat to assign df2$b ...
2
votes
1
answer
95
views
Update a polygon that have intersections in two or more polygons
I have 2 tables, table #1 contains a square polygon/grid, table #2 contains the polygon of an administrative area. I updated table #1 with data from table #2 with the ST_Intersects() function. Here's ...
2
votes
3
answers
101
views
count values in one dataframe in another dataframe
Assume I have a dataframe like this:
df <- data.frame(
D = c('A', 'B', 'C'),
Q = c('asd', 'reg', 'rt'),
id = I(list(c(124, 532, 78), c(1, 3, 532), c(2, 3, 78, 124, 1)))
)
and another one ...
0
votes
1
answer
47
views
c# Some elements not show at the list intersection
I am trying to get the common elementes of two lists. The example is as follows:
var control = "F, H, S, W".Split(',').ToList();
var drives = new List<string> {"C", "D&...
0
votes
2
answers
85
views
Looping though list rows and pulling column data to populate a schedule on another worksheet
I need to iterate though each row within a table ("DataTable") and leverage different data points across columns to:
Locate worksheet.name ("A:A" / "Quarter Schedule");
...
0
votes
1
answer
30
views
Power Bi - Intersect function to return qty
Consider the raw data below
opptyID
Account ID
Product
Close
Start
End
Qty
12
1
A
01-Jan-23
01-Jan-23
01-Feb-23
10.00
13
1
A
01-Feb-23
01-Feb-23
10-Sep-23
2.00
17
2
A
01-Feb-23
01-Feb-23
10-Sep-23
...
0
votes
1
answer
52
views
Calculating Time Difference between two rows while resetting for a group - Hot, and Thank you Community
In my case, I have different Partners (ENCOUNTER_ID). Each one can have one or multiple assessments.
I need to calculate the time difference between each each one of their assessments. With time ...
1
vote
0
answers
21
views
In Typescript, how to check that if a key is present in an object, so should another one [duplicate]
This seems really silly and basic but for some reason I can't get it to work.
I want a type for a function argument to be an object that always has a key a of type string. This object can also have a ...
0
votes
1
answer
254
views
Crop a polygon to a bounding box without losing box edge
I am trying to crop polygons to a box
The function I got so far is:
import numpy as np
def crop_polygon(x, y, xmin, xmax, ymin, ymax):
# Create a mask to identify points inside the bounding box
...
0
votes
3
answers
655
views
Excel SUMIF formula for cells that fall in column has "Total" and row has "Commissionable" and and row has Non-Commissionable
I'm looking for some help in writing a SUMIF formula or a better alternative. The idea is the Grand Total in cell I20 will automatically
sum up cells that intersect rows with Non-Commissionable in it ...
0
votes
2
answers
88
views
How to do arrange data of 2 tables in descending order and then intersect two tables?
Question: Check which subject is among the top 3 scoring subjects for Rahul in Term-1 and Term-2 using mssql?
If I use order by before intersect the code is not working. But if I don't sort data of ...
0
votes
1
answer
272
views
Redshift SQL array intersect
Is there an array intersect function in Redshift, or a good way it can be done?
For example in Snowflake it is:
SELECT array_intersection(ARRAY_CONSTRUCT('A', 'B'), ARRAY_CONSTRUCT('B', 'C'));
...
0
votes
1
answer
53
views
How to automatize comparison of values in two columns of two different data.frames in r?
I'm trying to automatize the following function for all columns of two data frames.
I have the data.frames position_sc and position_hit. Both have 18 columns (each column represents a subject ("...
-1
votes
2
answers
110
views
SQL Intersection with group by a column values
I want to intersect between values of one column based on another column. I mean if I have three different values in Id column, I want the values of LineGroupBy column to be assumed as one group(Id=1) ...
-1
votes
2
answers
179
views
Is it the right way to use 2 IN in one SQL-query instead of INTERSECT?
I have a product filter based on data from multiple tables.
I make query using IN 2 and more times in one query. This works great and only selects products that have
and needed attributes
and needed ...
-1
votes
1
answer
200
views
How to find intersection point from several line in a single plot in R?
Sample code:
m=matrix(1:54,nrow=9)
l=1:6
plot(l,m[1,],type="l",xlim=1:6)
lines(l,m[2,])
lines(l,m[3,])
legend(2,3,legend=c("m1","m2","m3")))
Now, how can I ...
0
votes
0
answers
77
views
Python script to check if ellipse and rectangle intersect
I need a python script to check if ellipse and rectangle intersect. If they intersect plot the ellipse in green color else plot in red color.
I am using matplotlib's path.intersects_bbox and path....
0
votes
1
answer
520
views
Spotfire on function - Create new calculated column with difference between different table rows
I would like to calculate a difference in value between a line that is from column D (end date) with the line below but wuth data form column C (start date).
Tried the following custom expression but ...
1
vote
1
answer
287
views
LINQ Group By and Intersection between groups C#
I have the following list into C#:
table_schema | table_name | field_name | field_type
public tableA fieldA character varying
public tableA fieldB timestamp
...
0
votes
1
answer
215
views
Python Intersection function doesn't work when lines share just one common endpoint
I have these endpoints for function for line 1 (1,1) (4,1) line 2 (4,1) (8,1).
Output is empty because div becomes 0 , how to handle this case in this function so that they are not treated as ...
0
votes
2
answers
215
views
Use jq to remove key/value pairs based on other file
I have 2 json files containing translations for my app:
en-US.json:
{
"car": "car",
"bike": "bike",
"tree": "tree",
}
nl-NL....
3
votes
2
answers
123
views
Intersect on HashSet results in compile error
I've been trying to write a program, in which I want to use the intersection of two HashSets. Therefore I wrote the following code (for test purposes):
HashSet<int> test1 = new HashSet<int>...
2
votes
4
answers
120
views
Microsoft Excel VBA Intersect with Rename Sheet
I'm trying to change the name of a sheet after it is created under and Intersect method. The code I have below give Error 424. The code works when only creating a new sheet.
Private Sub ...
1
vote
2
answers
99
views
C# Intersect Two Dictionaries and Store The Key and The Two Values in a List
I want to intersect the 2 dictionaries, but I am not sure how to store historicalHashTags[x] too, I managed to store only the key and value of 1 dictionary.
var intersectedHashTags = currentHashTags....
1
vote
1
answer
217
views
Auto cell update with use of intersect
So basically I have a column in my spreadsheet that tracks the status of bearing conditions. 800+ bearings spread across 8 or so sheets (different areas of a facility) and will continue to increase in ...
0
votes
0
answers
145
views
How to automatically update the date in cell in one columns when a change is made to a cell in a another column
So basically I have a column in my spreadsheet that tracks the status of bearing conditions. 800+ bearings spread across 8 or so sheets (different areas of a facility) and will continue to increase in ...
0
votes
1
answer
344
views
Filtering JSON Array
Any guidance or reference is appreciated.
Using javascript's (map reduce and filter), I am trying to get a collection of all available rooms across multiple vendors in the given JSON array. The logic ...
0
votes
0
answers
50
views
How to compare plain array with array of object in JavaScript
I wanted the result like "11" only , i wanted to compare array of object with plain array
whenever am trying to use filter it's show blank result. wanted to avoid map or loops. if that ...
3
votes
1
answer
66
views
How can do subscription between two SELECT set?
SELECT field1
FROM tbl1
WHERE conditionsx
...?
SELECT field2
FROM tbl2
WHERE conditionsy
I Want return same below↓
What is superscription between two SELECT results.
0
votes
1
answer
930
views
C# LINQ Intersect 2 Different Type Lists and Return one Type
I am trying to find common rows in 2 lists as follows:
public class ListA
{
public string Id { get; set; }
public string Name { get; set; }
}
List<ListA> listA = new List<...
0
votes
1
answer
46
views
VBA Error with intersect over 2 separate columns
I have an issue where when using the following line of code for a Worksheet_Change sub -
If Intersect(Target, ActiveSheet.Columns(7)) Or Intersect(Target, ActiveSheet.Columns(11)) Is Nothing Then
...
0
votes
1
answer
44
views
Code that finds list intersection (using mapply) works for same values but not others
I am trying to find the intersect between two list columns in a data.table object which I import into R. I replicate the data.table below, with the exact same values:
DT_1 <- data.table(
ego = as....
0
votes
1
answer
117
views
bash loop file in one folder against all files in another folder
I am trying to do a (bedtools) intersect. Anyone see what is wrong with my bash code here?
#!/bin/bash
dir=$(pwd)
query=$dir/query_beds
pgs=$dir/pgs_beds
for file in $query/*; do
bedtools ...
1
vote
1
answer
225
views
Find the intersection of all combination of list of list
My ultimate goal is to have alluvial plots in R. However, my data is big and is not stored in a way that can be used for direct input, I have:
4 groups (they will be axes of the alluvial plot)
In ...
1
vote
1
answer
37
views
.NET replacing values where keys match
This is a simple question. I have two lists ListA and ListB they are both full of the same type of objects with keys, but everything else (besides key) can be different, the size the values etc..... I ...
0
votes
1
answer
55
views
Mysql showing data constains two type of animals using intersect
TheAnimals Table :
|Aname|Sex |Type|Country|yearOfBirth| cNum |
|-----|-----|----|------ |-----------| ---- |
|Charly|male|Lion|Kenya|1990|12|
|Arthur|male|Bear|France|1980|1|
|Chloe|female|Magpie|...
1
vote
1
answer
610
views
Excel VBA: Change cell value based on other cell value changed
I am writing the VBA that about change the cell (E19:E24) value if cell D18 value changed and change the cell D18 value if E19: E24 all or anyone cell value changed.
I want to fulfil below scenario:
...
0
votes
2
answers
59
views
Filter a 2d array by a static value and a column in another 2d array
I have 2 arrays where they have some common id values, but the keys for these id keys differ slightly.
$comps = [
[
'c_id' => '123',
'status' => 'active'
],
[
'c_id' => '456'...
0
votes
1
answer
102
views
fabricjs Polygon Redundant Area
2https://i.sstatic.net/2aZm2.png
1https://codepen.io/1gelistirici/pen/KKRjgoj[enter image description here]
// Initiate a Canvas instance
var canvas = new fabric.Canvas("canvas");
...
1
vote
1
answer
64
views
Adding value to a cell (within a specified range) populates an adjacent cell
My table has a column for Date & Time where a current timestamp is added, and another column recording the observed Number of Events for that time. I have to fill Number of Events quickly, so need ...
1
vote
1
answer
89
views
SQL Server Geography Data Type - why do two separate Polygons Intersect?
I have two geometry variables and I want to find out if they intersect.
My first variable is called @orderBounds2.
DECLARE @orderBounds2 geography
I set it to a value
set @orderBounds2 = ...
0
votes
1
answer
62
views
MariaDB - Conjunction-Search in Many-to-Many
I have problems to implement an "and-concatenated" search with many-to-many tables. I tried to present a simple example below. I use MariaDB.
I have a table with process. To the process a ...
1
vote
0
answers
2k
views
How to properly use intersection observer in Vue? Writing it in onUpdated() correct?
I have an issue using intersect observer with vue3. I want to have the intersect shown and being activated with a v-if. Unfortunately it only works if I write the intersect Observer code in the ...
0
votes
1
answer
122
views
Calculate a plot and intersect on a curve in an excel chart based on a single value
I have some data that I'm using to plot a curve in excel. It uses a non-linear calculation.
The calculation is called the rule of twelfths - it is used to calculate changes in tidal height between a ...
0
votes
0
answers
62
views
Intersect does not retrieve list as expected
I have two lists, the first one contains a lot of items, and the second one contains one item that also exists on first list.
And I was wrote code to check if the first list contains all second list ...
-2
votes
1
answer
52
views
how to filter a dataframe column based on intersected values from another column in dataframe
I have two dataframe. I want to filter gene ID from expr_df dataframe based on the intersected values from another data frame gene_Annot.Basically i want to keep genes in expr_df that intersects with ...
0
votes
1
answer
208
views
Find Intersect of a Vector and List of Vectors
I have a vector of various foods that I need to sort, as follows:
myVector <- c("Banana", "Apple", "Spinach", "Lettuce", "Candy", "Soda")
...
1
vote
1
answer
46
views
Apache spark : How deep is the comparison of rows in RDD or DF
I want to understand the behavior of DF.intersect().
so the question came to mind, especially when we have complex Rows having complex fields. (deep tree)
1
vote
1
answer
325
views
Looking for an equivalent to INTERSECT ALL in sqlite
I have a database which allows duplicates where the key is a string and the values are URLs. Here's the schema:
CREATE TABLE Tags (p_tags TEXT, p_urls LONGVARCHAR);
I would like to do a command like ...
0
votes
1
answer
81
views
SQL sum between dates
I need to sum values in intersect of range dates.
sample of source data
person
item
start_date
end_date
value
a
apple
08.03.2018
29.03.2018
3
a
apple
01.01.2019
08.08.2021
2
a
apple
01.01.2019
09....