## Relationship between an existing Household and a new Individual not added using civicrm webform

When trying to add a new CiviCRM Contact of type Individual through a webform to a existing Household, the required Relationship is not created, although it is set up on the CiviCRM setting of the webform. The existing Household is selected using the “Existing Contact” field of the civicrm webform.

When trying for the second time, the relationship between the Household and the Individual is correctly added.

Any idea what might be happening? I’m working with Drupal 7.80 and CiviCRM 5.36.1.

Posted on Categories Articles

## at.algebraic topology – Relationship Between Hausdorff Convergence of Sets and Indicator Functions

Let $${K_n}_n$$ be a sequence of compact subsets of a metric space $$X$$, and $$Ksubset X$$ be compact. If $$K_n$$ Hausdorff converges to $$K$$, i.e.:
$$limlimits_{ntoinfty} d_{mathrm H}(K_n,K) = maxleft{,sup_{x in K_n} d(x,K),, sup_{y in K} d(K_n,y) ,right} = 0 ,$$
then what can be said of the convergence of $$I_{K_n}$$ to $$I_K$$?

What I know:
Indeed, since Hausdorff convergence strictly implies convergence of the upper Kuratowski limits then this post we know that $$I_{K_n}$$ converges to $$I_K$$ in $$C(X,{0,1})$$ for the compact-open topology if $${0,1}$$ has the Sipersinki topology.

What I expect: Since the Hausdorff topology is strictly finer than the Sierpinski topology then, is there a topology $$tau$$ on $$C(X,{0,1})$$ for which:
$$I_{K_n} overset{tau}{to} I_K Leftrightarrow K_n overset{d_H}{to} K.$$

Posted on Categories Articles

## The relationship between the first eigenfuntions and the second eigenfuntions on sphere

Recently I considered the following question: If we give a second eigenfuntions $$g$$ on sphere, then can we construct a first eigenfuntions $$f$$ by $$g$$? Is there any relationship between the first eigenfuntions and the second eigenfuntions on sphere?

Posted on Categories Articles

## rotation – What is the relationship between gimbals and Euler angles?

The definition of Euler angles inherently includes gimbals.

Let’s use Unity’s convention as one arbitrary example (technically they’re a related convention called Tait-Bryan angles, but nobody calls them that).

An Euler angle triplet `(pitch, yaw, roll)` means…

1. Rotate the outermost gimbal, with its axis parallel to the world y axis, by `yaw` degrees.

2. Rotate the middle gimbal, with its axis perpendicular to the outer gimbal and parallel to the world x axis when `yaw` is zero, by `pitch` degrees.

3. Rotate the inner gimbal, with its axis perpendicular to the middle gimbal and parallel to the world z axis when `yaw` and `pitch` are both zero, by `roll` degrees.

The net orientation of the object is then the orientation of this inner gimbal, stacking up the individual rotations of the middle and outer gimbals.

There are other Euler angle / Tait-Bryan angle conventions, but they all share this pattern where an arbitrary orientation is built-up from a sequence of rotations about particular axes. As I explain in this answer, when you compose two rotations in sequence, the angle of one changes the axis of the second – and that makes the chained rotation behave like two linked gimbals.

To emphasize: any rotation scheme that tries to decompose an orientation into multiple angles is inherently modelling a set of linked gimbals. That means it will have situations where it loses a degree of freedom because two of its gimbal axes become parallel – gimbal lock – and you need a correspondingly larger change to your angle triplet to get to a nearby orientation in some direction.

To escape this, you need to leave behind the idea of chaining separate rotations with different axes/angles entirely. Instead we can use…

• Angle-axis representations, where we express a particular orientation as a single rotation around one axis by a particular angle. By allowing arbitrary diagonal axes, we can still reach any orientation we choose this way, without composing multiple rotations in sequence.

• Quaternions, which are really a special kind of angle-axis representation, dressed up in 4D space with 3 imaginary dimensions. This might seem like a strange choice, but it lets us take advantage of patterns in the multiplication of these imaginary units to compose and interpolate rotations much more easily than other methods.

• Matrices, which can express any arbitrary affine transformation, including rotations.

All of these methods let us express an orientation “all at once” rather than as a sequence of rotations with different angles around different axes, so they let us break out of the gimbal paradigm that comes with that sequencing.

Posted on Categories Articles

## Why hasn’t my facebook relationship change posted to my newsfeed?

I accepted a relationship request from my partner today and it shows on my page under the info bit. I changed this to public in hope it would show on my timeline or news feed but it hasn’t. I always does for anyone else. It’s also my job, i updated a promotion a few weeks ago and have just realised this wasn’t shared to newsfeed or my page either, but does show under “about me”.

It’s all set to public! When i go to edit any of them. It also shows me this message:

Details that you select will be public and won’t be posted to News Feed.”

It’s driving me insane from not understanding why. I looked into activity log and when i searched relationships it showed it but had “only me”, although everything is set to public. Don’t understand and I’ve been Googling all morning. Thanks.

Posted on Categories Articles

## 8 – Views custom relationship joined by plain text field

Let’s say I have a node type named ‘Book’.
‘Book’ nodes have ‘publisher’ field.
I want to create a node view which displays these two columns:

• book title Desired results is like this. The problem is I cannot use entity reverse relationship which is normally used to connect entities because ‘publisher’ field is not entity reference field.

So I added the code to `my_module.views.inc`.

``````funciton my_module_views_data() {
// it seems first node's 'node__field_publisher' is already loaded, so join second node's node_field_data directly.
\$data('node__field_publisher')('node_field_data') = (
'title' => t('Same publisher books'),
'help' => t('Get books sharing publisher'),
'relationship' => (
'id' => 'standard',
'label' => 'Same publisher books',
'left_table' => 'node__field_publisher',
'field' => 'entity_id',
'base' => 'node_field_data',
'base field' => 'nid',
),
);
}
``````

It created join and relationship ‘Same publisher books’ became available.

``````LEFT JOIN {node_field_data} node_field_data_node__field_publisher ON node__field_publisher.entity_id = node_field_data_node__field_publisher.nid
``````

If I click ‘Add’ in ‘field section’, select ‘Title’, set ‘Same publisher books’ as ‘relationship’, it adds query to SELECT statement like this

``````node_field_data_node__field_publisher.nid AS node_field_data_node__field_publisher_nid
``````

But no titles.

I thought if I make a relationship to other node, it automatically loads field values belonging to the node(e.g. title), but is it a misconception?
How to get titles in this case?

Posted on Categories Articles

## data structures – Is there a relationship between visitor pattern and DeMorgan’s Law?

Visitor Pattern enables mimicking sum types with product types. Where does the “sum”-iness come from?

For example, in OCaml one could define `type my_bool = True | False`

Or encode with visitor pattern:

``````type 'a bool_visitor = {
case_true: unit -> 'a;
case_false: unit -> 'a;
}

let t visitor = visitor.case_true ()
let f visitor = visitor.case_false ()

let visitor = {
case_true = (fun () -> "true");
case_false = (fun () -> "true");
}

let () = print_endline (t visitor) (* prints "true" *)
``````

What’s the best way of explaining the sum-type-to-visitor-pattern transformation? Is it:

• Of course + and * are interdefinable, what did I expect?
• Or is it that the left side of `->` is the “negative” position and that this leads to a DeMorgan-law-like flip of sum and product?

I also wonder if this question is related to how one can use universally-quantified types to mimic existential types.

Posted on Categories Articles

## mysql – Entity Relationship Diagram for Grade Calculator

I was wondering if anyone would be able to review my Grade Calculator for a course ERD? I’m looking for ways to improve the current design (if any improvements need to be made that is) and if anyone could review the current MySQL query which is there. In order for this to be reviewed I was told I needed an SQL query to accompany it. ``````SELECT
`yearGroup`.`id` AS `year_group_id`,
`yearGroup`.`year` AS `year_group`,
CONCAT(
TRUNCATE
(
COALESCE(
SUM(
`assignment`.`percentage_achieved` *(
`assignment`.`percentage_weighting` / 100
)
),
0
) /(
SELECT
COUNT(*)
FROM
`unit`
WHERE
`unit`.`year_group_id` = `yearGroup`.`id`
),
2
),
'%'
FROM
`assignment`
RIGHT JOIN `unit` ON `unit`.`id` = `assignment`.`unit_id`
RIGHT JOIN `yearGroup` ON `yearGroup`.`id` = `unit`.`year_group_id`
WHERE
`yearGroup`.`course_id` = 1
GROUP BY
`yearGroup`.`id`
``````

Posted on Categories Articles

## exponentiation – Compound interest – relationship between \$frac{r}{n}\$ and \$r\$?

The compound interest formula $$A=Pleft(1+frac{r}{n}right)^{nt}$$ is usually used in examples where you are given a nominal annual rate and then calculate the accrued amount, where $$frac{r}{n}$$ is the “monthly” rate.

e.g. nominal interest rate $$= 5% ,,text{p.a}, P = 100$$ and this is compounded monthly.

So we say $$A= 100left(1+frac{0.05}{12}right)^{12}=105.116…$$

We have in fact earned $$approx5.116%$$ interest. This is what is called the “effective interest rate”.

So which is the “correct” annual rate and what has $$frac{r}{n}$$ got to do with $$r$$? Why do we say $$frac{r}{n}$$ is the monthly rate when the “true” monthly rate would be in this example $$sqrt(12){1.05}-1$$, giving us an annual interest of $$5%$$. $$textbf{I guess my question is really what logic would lead you to divide r by the number of compounding periods?}$$ I can’t seem to understand the reasoning behind that. As in the example, the effective rate seems unrelated or somehow arbitrary compared to the nominal rate.

The naive answer would be if you have $$5%$$ interest per year, you will get $$frac{1}{12}$$ of this rate every month, but given that you know this will be compounded, why would you do this?

Apologies if this has been asked before, this is a question that has occasionally bothered me and I have never found an answer.

Posted on Categories Articles

## tls – Relationship between DoT / DoH and HTTPS

I’m trying to understand the different roles that DoT / DoH and HTTPS are playing when it comes to protecting sensitive data in the internet. I spend the day reading a lot of stuff about DoT, HTTPS, TCP and IP.

But there is one thing that doesn’t become clear to me: say I want to surf to `https://www.myForbiddenSite.org` and download an image from there. At first, my device has to retrieve the IP address for `myForbiddenSite.org` (e. g. `1.2.3.4`). When using DoT / DoH, any third party (e. g. my ISP) does not know that I want to access `myForbiddenSite.org`.

Now my browser will do the TCP handshake and TLS handshake with `1.2.3.4` and I can start communicating with the website via `HTTPS`. The image I want to download will be encrypted.

But isn’t my public IP address part of all IP packages that are send across the wire? So basically every node between my router and `myForbiddenSite.org` sees my public IP address and `1.2.3.4`? If this is the case, are there any projects that address that issue? And if not, why? Is it related to the fact the resolving the IP address for a DNS name is easy, but not vice versa?