How do I generate GUID in apex class in salesforce in the following format mentioned(16 bytes or 128 bits)?  BA8D6569-9208-4DBB-9357-A4500838101E  Any suggestions will be appreciated. Thanks in advance
What is the best way to generate a GUID/UUID from Apex code (such as a trigger)? Preferably in the following format:     nnnnnnnn-nnnn-nnnn-nnnnnnnnnnnnnnnnn   Example:     13219ec0-3a81-44c5-a300-de14b7d0235f
Can $\frac{\sqrt{3}}{\sin20^{\circ}}-\frac{1}{\cos20^{\circ}}$ have two values? How does deleting work? What can cause a post to be deleted, and what does that actually mean? What are the criteria for deletion? Common lines between two files I have the following code that I run on my Terminal.  LC_ALL=C &amp;&amp; grep -F -f  genename2.txt hg38.hgnc.bed &gt; hg38.hgnc.goi.bed   This doesn't give me the common lines between the two files. What am I missing there? Is it possible to prevent LUDecomposition from pivoting? Is it really possible to break the speed of light by flicking your wrist with a laser pointer? Minutephysics has a popular  called "How to break the speed of light". In the video it states that if you flick your wrist while pointing a laser that reaches the moon, that the spot of light on the moon will travel 20 times the speed of light. Now don't get me wrong, I do like their videos, just this one seemed a bit fishy to me. At first I thought it all practically made sense, then I realised something...  In my mind, I would think that light particles (photons) travel from the laser to the moon and bounces off the moon and back to your eye (it doesn't just stay there, in place, so you can't move it around). Now, what he is stating is that if you flick your wrist these photons that have travelled to the moon will move along with your wrist. Wouldn't these photons be bouncing off of other objects or still travelling to the moon by the time you flick your wrist? i.e. dissipating, therefore new photons will be travelling to the moon (from the laser directly).  For example: let's say you point the laser at the moon, and once it reaches the moon, you wait a couple of seconds and then flick your wrist. The laser that you have flicked will emit photons in every direction that your wrist was in, correct? i.e. The photons would shoot out in a straight line (unless disrupted) continuously, with your wrist taking no affect on the speed of the photons.  So back to the question, is this video wrong? The question is pretty straight forward. I can get the exit code of the previous command by using $?. But what exactly is it?  I don't think it is a variable, because you can't have any special characters in the name of variable other than _.  foo?foo=10   will result in the error: foo?foo=10: command not found  So if it is not a variable, what is it? Are there others like it? Past tense and the phrase "who knows what" Can a person negotiate with banks on CD interest rates? I use a brick and mortar bank for some of my savings. I’d love to get a CD interest rate closer to what Ally or other online banks offer.   Are brick and mortar banks will to negotiate with customers on interest rates? For instance, if I went into a branch and said I’m moving my money to Ally unless the bank matches Ally’s rates, do I have any chance of getting them to? derivative of cost function for Logistic Regression I am going over the lectures on Machine Learning at Coursera.   I am struggling with the following. How can the partial derivative of   $$J(\theta)=-\frac{1}{m}\sum_{i=1}^{m}y^{i}\log(h_\theta(x^{i}))+(1-y^{i})\log(1-h_\theta(x^{i}))$$  where $h_{\theta}(x)$ is defined as follows  $$h_{\theta}(x)=g(\theta^{T}x)$$ $$g(z)=\frac{1}{1+e^{-z}}$$  be $$ \frac{\partial}{\partial\theta_{j}}J(\theta) =\sum_{i=1}^{m}(h_\theta(x^{i})-y^i)x_j^i$$  In other words, how would we go about calculating the partial derivative with respect to $\theta$ of the cost function (the logs are natural logarithms):  $$J(\theta)=-\frac{1}{m}\sum_{i=1}^{m}y^{i}\log(h_\theta(x^{i}))+(1-y^{i})\log(1-h_\theta(x^{i}))$$ Can I travel in UK before switching to a study visa? As I read in general visitor visa Terms &amp; Condition, I would only be granted to stay up to 6 months in UK. However I am planning to apply for General Student Visa to further my studies. Would it be possible for me to enter UK as visitor for first 6 months/less before I apply for student visa in the same year if I want to travel and study on the same year? After a lot of messing around today I curiously observed that $a^2+b^2$ is only divisible by 3 when both $a$ and $b$ contain factors of 3.  I am trying to prove it without using modular arithmetic (because that would be way too easy), but finding it very difficult to do so.  Is there an easy way to prove this without using modular arithmetic?  I am also interested in a more general statement.  Namely, I want to find the values of $Z$ for which $Z \mid \left( a^2+b^2 \right)$ necessarily implies that $Z \mid \gcd \left( a,b\right)$.  We know that $Z$ cannot be 5, because $3^2+4^2=5^2$.  More generally, if $Z$ is the largest element of a pythagorean triple then the above implication does not hold. Word to describe the fear of unknown future How can I disable the "Welcome, Name!" banner notification for Game Center? ACPI PPC Probe failed. Starting version 219 NVIDIA How do I enumerate the properties of a JavaScript object? Why can't energy be created or destroyed? 403 error after upgrading to apache2.4 Height of an HTML select box (dropdown) Are C-style macro names subject to the same naming rules as identifiers?  After a compiler upgrade, it is now emitting this warning for a legacy application:  warning #3649-D: white space is required between the macro name "CHAR_" and its replacement text   #define         CHAR_&amp;        38   This line of code is defining an ASCII value constant for an ampersand.  #define   DOL_SN        36 #define   PERCENT       37 #define   CHAR_&amp;        38 #define   RT_SING       39 #define   LF_PAR        40   I assume that this definition (not actually referenced by any code, as far as I can tell) is buggy and should be changed to something like "CHAR_AMPERSAND"? How to hide a(n) (NTFS) partition from ubuntu I need to hide an NTFS partition from listing in the nautilus. How can I achieve that?   Is there any tool to do that?   And how can I hide files in ubuntu (except . operator)