## Node form that defines fields based on another node

I have two content types (Unit and Scheme of Works). In Unit, I have a field (field_lo) that allows the user to create an unlimited number of entries.

In Scheme of Works, I need to associate other field values related to the field_lo entries from Unit. Effectively, in Scheme of Works, I need to be able to dynamically add a number of fields to match the quantity of the field_lo entries in Unit.

Is this possible? If so, how?

Thanks

## What defines robust code?

My professor keeps referring to this Java example when he speaks of “robust” code:

if (var == true) {     ... } else if (var == false) {     ... } else {     ... } 

He claims that “robust code” means that your program takes into account all possibilities, and that there is no such thing as an error – all situations are handled by the code and result in valid state, hence the “else”.

I am doubtful, however. If the variable is a boolean, what is the point of checking a third state when a third state is logically impossible?

“Having no such thing as an error” seems ridiculous as well; even Google applications show errors directly to the user instead of swallowing them up silently or somehow considering them as valid state. And it’s good – I like knowing when something goes wrong. And it seems quite the claim to say an application would never have any errors.

So what is the actual definition of “robust code”?

## The code defines the number of M-digit natural numbers whose sum of digits in odd digits is equal to N. Using associative arrays

Enter n and m in the text field. Next, when you click on the “Решение” in the function PrintSolve() is determined by the number (variable kol) M-digit natural numbers, in which the sum of digits, standing in odd digits, equal to N. Then you need to print kol in textarea.

For Example, N = 14, M = 6. This means that I will iterate over the numbers from 100,000 to 999999 and look for the numbers whose sum of digits standing in odd digits will be equal to 14. The number of these numbers will be written to the variable – kol.

N and M are entered on the html page. The digits of each number are written to the associative array: chisla = {}, where the key is the digit number and the value is the digit itself.

Next in this section of code I walk through the odd bits (keys) and see if the sum of the values N:

  for (i=1;i<=parseInt(M. value);i++){    if (i%2==1){     sum = sum+chisla.i;    }   }   if (sum==parseInt(N. value)){    kol=kol+1;    } 

If Yes, then kol is increased by one, otherwise the array of digits is removed and move on to the next number.

But I have a problem. The variable – kol is not output to textarea. Whether to use this:

   var N = document.getElementById ("n");    var M = document.getElementById ("m"); 

to handle these variables in script???

<!DOCTYPE html> <html> <head>  <META http-equiv="Content-Type" content="text/html; charset=windows-1251"/>  <title></title> </head> <body>  <p>Введите число N - сумма чисел в нечетных разрядах:</p> <input type="text" id="n" size="10" maxlength="15" value=""/> <p>Введите число M (M-значные числа):</p> <input type="text" id="m" size="10" maxlength="15" value=""/> <p onclick="PrintSolve()">Решение</p> <p><textarea id="solve" rows="15" cols="40"></textarea></p>  <script type="text/javascript"> var N = document.getElementById("n"); var M = document.getElementById("m");  function PrintSolve(){  var sum=0, kol=0;  for (k=Math.pow(10,parseInt(M.value)-1);k<=Math.pow(10,parseInt(M.value))-1;k++){   var chisla = {};   var S = parseInt(M.value);   for (i=1;i<=parseInt(M.value);i++){    chisla['i'] = k/Math.pow(10,S-1);    k = k % Math.pow(10,S-1);    S = S-1;   }   for (i=1;i<=parseInt(M.value);i++){    if (i%2==1){     sum = sum+chisla.i;    }   }   if (sum==parseInt(N.value)){    kol=kol+1;    }   delete chisla;  }  document.getElementById("solve").value = kol;   }   </script> </body> </html> 

## Why each functor defines an invariant, but not every invariant is functorial ? Examples?

In Category Theory each functor defines an invariant, but not every invariant is functorial

Why ?

Can you provide some examples when

• a functor is an invariant
• a invariant is a functorial
• a invariant is not functorial

I need also another example:

– a functor is not an invariant $$=>$$ this is absurd and false but I need that you show me the underlying contradiction

Idea

For $$A$$ a monoid equipped with an action on an object $$V$$, an invariant of the action is an generalized element of $$V$$ which is taken by the action to itself, hence a fixed point for all the operations in the monoid..

An action of a category $$C$$ on a set $$S$$ is nothing but a functor $$\rho : C \to$$ Set.

## Verifying that the given map defines a Lie algebra

I am given a matrix $$A =(a,b;c,d)$$ in $$GL(2,\mathbb{C})$$ and a real algebra say, $$V$$ with basis $$X,Y,Z$$ such that $$[X,Y]=0, [X,Z]=aX+bY, [Y,Z]=cX+dY$$ I have to show that $$V$$ is a real Lie Algebra.

My attempt: it’s vector space over $$\mathbb{R}$$ (duh!) I think we first need to find $$[X,X], [Y,Y], [Z,Z]$$ which I don’t know how…and then use it to show bilinearity. Similarly, first somehow find $$[Y,X], [Z,Y], [Z,X]$$ to verify anti symmetry.

Assuming both bilinearity and anti symmetry, it’s sufficient to verify Jacobi Identity for elements $$\alpha, \beta, \gamma$$ where $$\alpha, \beta, \gamma \in {X,Y,Z}$$.

Consider the three cases when each of these three elements are different from one another, all are the same,two of them are same and one different from the other two. Now, using anti symmetry and above computed values of lie bracket helps us verify the Jacobi Identity.

But as trivial as it seems, I don’t seem to have a clue about how to show bilinearity and compute lie brackets $[X,X],… I’d appreciate any hint/s. Please do not post a solution. Thank you very much! ## What is the list of elements that defines a programming language? Is there a formal (or informal) definition for this? I’m pretty sure it would include: 1. syntax 2. execution method (compiled/interpreted) 3. memory management But what about: 1. packaging (e.g. jar for java) 2. package managers 3. build systems Trying to figure this out for a documentation project I’m starting 🙂 ## How to prove that$A^T y=0\implies y=0$if and only if$A\$ defines a surjective linear transformation?

I know that in vector spaces, the cokernel of a linear transformation $$f$$ is isomorphic to the set of all $$y$$ such that $$f^T(y)=0.$$ (This is the transpose of $$f$$.) Then, how can I prove that $$\text{coker} f=\{0\}$$ if and only if $$f$$ is surjective?

I would apreciate a proof without any heavy machinery (that is, without something that is not taught in a linear algebra course).

Thank you

## How to set row height and column width in Google sheets exactly as Excel defines it

I am editing spreadsheets in Google sheets which I have to save in Excel format (.xlsx) and then send to someone (the boss). The person who receives them needs the row height as reported by Excel to be exactly 100pt and the column width to be exactly 25. Google sheets seems to only have pixels for these measurements and these have to be in whole numbers. 133 pixels is just a little under 100pt for example. For the column width Excel uses a formula that relates to character width (I am using 11pt Calibri font) and Google sheets has no equivalent it seems.

Is there any way to set the row height and column width as I need them without having a copy of Excel?