Scala Programming: Normalizing a 3D vector with length 0
How do you normalize a zero vector
What is the difference between $* and $@? Pushforward of inverse map at the identity? Let $G$ be a Lie group and $i:G \rightarrow G$ denote the inversion map $i(x) = x^{-1}$. (Notation: $f_*$ is the pushforward map $F_*:T_pG \rightarrow T_{i(p)}G$ which takes $(F_{*}X)(f)=X(f\circ F)$ and $X$ is a tangent vector, $X\in T_pG$.) I wish to show that $i_{*}:T_{e}G\rightarrow T_{e}G$  is given by $i_{*}(X)=-X$ As a first step, it is trivial to prove that $i_*$ is an involution as $\mbox{Id}_{*}=(i\circ i)_{*}=i_{*}\circ i_{*}$ but I can't seem to make any further progress. Any help would be appreciated. Why every polynomial over the algebraic numbers $F$ splits over $F$? How to test apex classes with Pagereference? I'm struggling to test a class with pagereference. Following is the class...  public with sharing class redirectOrderPartner{  public String currentRecordId {get;set;} public orders__c orderId {get;set;}  public redirectOrderPartner(ApexPages.StandardController controller) {      }     Public Pagereference go(){      currentRecordId  = ApexPages.CurrentPage().getparameters().get('orderid');      system.debug('---currentRecordId  ---'+currentRecordId  );     orderId = [select id from orders__c where name =: currentRecordId limit 1];      system.debug('---orderid---'+orderId);      PageReference pageRef = new PageReference('/apex/OrderTrackingClass?id='+orderId.id);     pageRef.setRedirect(true);     return pageRef;    }   }   Following is what I tried....    @isTest  public class redirectOrderPartner_TEST  {             static testMethod void Test(){            Account acc = new Account(Name='ABC Corp.');           insert acc;            orders__c tempOrder = new orders__c(name = '0001234567', account__c = acc.id );           insert tempOrder;            Test.startTest();            PageReference pageRef = Page.redirectOrderPartner;           Test.setCurrentPage(pageRef);            ApexPages.Standardcontroller sc = new ApexPages.Standardcontroller(tempOrder);           ApexPages.currentPage().getParameters().put('Id',tempOrder.name);           PW_redirectOrderPartner ec = new redirectOrderPartner(sc);           ec.go();                                   Test.stopTest();       }   } I get the following error message on testing..     System.QueryException: List has no rows for assignment to SObject   What am I missing? Thanks Shorten title on each beamer slide In a beamer presentation the title is long but ok for the first slide. The problem is that when the title appears below on each slide it is very long and I would like to use here some sort of running or shorter title, how can this be done? why does fdisk add one additional sector when creating partitions? I'm playing around with fdisk and I tried to create a partition on an empty USB drive. Here's how that went: Command (m for help): n Partition number (1-128, default 1): 1 First sector (34-61187102, default 2048): 2048 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-61187102, default 61187102): +30000000           Created a new partition 1 of type 'Linux filesystem' and of size 14,3 GiB.  so just one partition with 30 million sectors. However, when I check how many sectors it contains I get:  I'm checking with a different program and I see again that additional sector:  Sorry for the pettiness :) I'm learning. How can I get file extensions with JavaScript? Parse a Json Array in to a class in c# How to use a decimal range() step value? cardinality of all real sequences I was wondering what the cardinality of the set of all real sequences is. A random search through this site says that it is equal to the cardinality of the real numbers. This is very surprising to me, since the cardinality of all rational sequences is the same as the cardinality of reals, and it seemed fairly intuitive to me that if cardinality of a set $A$ is strictly greater than the cardinality of the set $B$, then cardinality of $A^{\mathbb{N}}$ should be strictly greater than cardinality of $B^{\mathbb{N}}$. It turns out to be false.  Some technical answers have appeared in this forum elsewhere but I do not understand them. As I am not an expert in this topic, could some one explain me in simple terms why this is happening?  Also is the cardinality of all functions from reals to reals also the same as the cardinality of reals? Relation between magnetic moment and angular momentum -- classic theory How do I prove the relation between the vectors of magnetic moment $\vec\mu$ and angular momentum $\vec L$, $$\vec\mu=\gamma\vec L$$  ?  Many text books and lecture notes about the principles of magnetism show the relation of $\mu$ and $L$ as scalars only and then just state that the relation holds also for the vectors. An example:   $$\mu=I\cdot A = \frac{q}{t}\pi r^2 = \frac{qv}{2\pi rm}m\pi r^2$$  ($I=q/t$: current, $A$: area of a loop, $q$ charge, $t=2\pi r/v$: time of 1 rotation, $v$: velocity of particle, $m$: mass )  The angular momentum is $\vec L = \vec r\times\vec p$ or $L=mrv$ and therefore $$\Rightarrow \mu = {\frac{q}{2m}} L = \gamma L.$$  Why is this also true for the vectors? Is there a general explication by classical physics without the need of quantum theory? In the android app, looking at bounty details using the i button, the bounty reasons are not shown:        The bounty message can provide important information as to the setter's requirements (who may not be the OP and therefore does not wish to edit the question to do so). Dust on Sensor After Many Cleanings DSLR Show that there is no solution to the congruence $x^2\equiv3\bmod5$.   I'm not sure if the fact that the only numbers divisible by $5$ are those ending in $0$ or $5$ will help&hellip; Setting a document in MS Word-12pt (12bp) Warning  If you're looking for advice how to make your document look like it's been written in Word, this is most likely not the question you're looking for. This question is mostly of theoretical nature, as it results in tiny differences, which will most likely not be noticed by someone who doesn't allow the use of LaTeX.  Questions that might be more helpful for this matter are:           Question  I learned that MS Word uses a slightly different version of the unit "point" (pt) than TeX does:     The 12 point of Word will be PostScript point, which in TeX would be called 12bp. A TeX pt is slightly smaller: it's 1/72.27 inch, while a bp/PostScript point is 1/72 inch. See also    ( in )  I'm writing a paper that would usually be expected to be "typeset" in MS Word, thus I want to use the same font size as Word would.  How do I set a document e.g. in the "12pt" font size that MS Word would use?  In case it matters, I'm using the article document class, Latin Modern (lmodern) as a font with the T1 font encoding and compile with pdfLaTeX, but input on different set-ups is more than welcome. Just installed Ubuntu for the first time... Is there any simple way to browse installed programs?  On Mac there is the Applications top-level folder... here I see Desktop, Documents, Downloads etc but no Apps? That'd be a good idea, no? (is there some way to create this myself?)  On Windows there is the Start menu...  Here it seems like I have to click the 'Dash Home' and then I can see 'Recent Apps' ... I can search for them (I'd rather not)  ...or I can click the ruler/pencil icon at the bottom and see 'Recent Apps' and click to expand 'Installed Apps' ...ok that's all of them - is it possible to get a straight list view instead of the hard-to-scan wrapped rows?  Also, is there any way to get rid of the pointless random selection of 'Apps available for download' at the bottom? I've lost my original power adapter, and I can't find the proper one in any of the stores currently available.  I've HP Compaq 6730b, and as per  it outputs 18.5V 3.5A. However, I've found an older power adapter I have which outputs 19.5V 4.62 A.  So, my question is: how much of a difference between those two it really is, and more importantly, how much of a risk would it be if I tried the power adapter I already have.  P.S. I know pretty much nothing about electricity/electronics. What should I do when my neural network doesn't generalize well? I'm training a neural network and the training loss decreases, but the validation loss doesn't, or it decreases much less than what I would expect, based on references or experiments with very similar architectures and data. How can I fix this?    As for question        to which this question is inspired, the question is intentionally left general so that other questions about how to reduce the generalization error of a neural network down to a level which has been proved to be attainable, can be closed as duplicates of this one.  See also dedicated thread on Meta: How did Luke know where to land on Dagobah? How do I create a dynamic key to be added to a JavaScript object variable