Can anyone help me out with this,   This is from a custom object " Quotation", The look up field " Main Driver" is a look up to Personal account object. The below fields are as well exists in the personal account. I need whatever value would be choosen in the main driver, automatically the below values will get pop up on below fields. I need to write a trigger for this ( I cant use formula field, as its depends upon another criteria field, so somtimes the user need to enter values manually in these fields , Process builder also doesnt worked). I tried to write a trigger, but its not working , showing issue as " Error: Compile Error: IN operator must be used with an iterable expression at line 12 column 104 " Can anyone plz rectify my trigger to make it work. Thnx .( I just have taken two fields below for test)  trigger MainDriverRelatedFields on Quotation__c (before insert,before update) {  Quotation__c newQuote=new Quotation__c();  for(Quotation__c obj : Trigger.new){ newQuote=obj ;     }     List&lt;Account&gt; Acc= [SELECT id,Age__c, Acccidents_in_the_last_12_mnths__c FROM Account WHERE Id IN: newQuote.Main_Driver__r];       if(newQuote.Main_Driver__c!=null) {        newQuote.AgeMainD__c=Acc.Age__c;         newQuote.Accidents_in_the_last_12_mnthsMainD__c= Acc.Acccidents_in_the_last_12_mnths__c;          } }
Can anyone help me out with this,    This is from a custom object " Quotation", The look up field " Main Driver" is a look up to Personal account object. The below fields are as well exists in the personal account. I need whatever value would be choosen in the main driver, automatically the below values will get pop up.  I amm trying to write a trigger for this, but just got stuck, Error showing as,      Error: Compile Error: Variable does not exist: Account.Age__c at line   7 column 17   How can i define the Account variable in the Quotation object trigger ?  trigger MainDriverRelatedFields on Quotation__c (before insert,before update) {      for(Quotation__c obj : Trigger.new){          if(obj.Main_Driver__c!=null) {              obj.AgeMainD__c=Account.Age__c;              obj.GenderMainD__c=Account.Contact_Individual_Gender__c;          }      }  }
How to find out if a file exists in C# / .NET? I would like to test a string containing a path to a file for existence of that file (something like the -e test in Perl or the os.path.exists() in Python) in C#. Headphone jack not working? Firstly, how do I read it? Is below right? With braces   $$p \vdash (q \Rightarrow p)$$  The given proof is:    ${p}$, premise ${q}$, assumption  $p$ by (1) // what???  ${q} \Rightarrow p$ by implication introduction with 2 and 2.1 QED...    I can't really get the link between $p$ and $q$ in 2.1 ... No Dialect mapping for JDBC type: -9 with Hibernate 4 and SQL Server 2012 What is DOCTYPE? What is DOCTYPE and why do I want to use it? What are the different DOCTYPEs I can use? What is the difference between standards and quirks mode, and what are some quirks I may run into with differently set DOCTYPEs?   Lastly, what is the proper DOCTYPE that I should be using? Can you launch Remote Desktop via URL? Was The Empire in Star Wars inspired by Nazi Germany? These HDDs will be used mostly for backups and data-storage (pictures, movies) which aren't often read. The price difference is 1.5 Euros in the case of these two:   HDD Western Digital Caviar Green Power 500GB, 7200rpm, 32MB, SATA2 HDD Western Digital Caviar SE16 500GB, 7200rpm, 16MB, SATA2   The only difference is the buffer size (16MB vs. 32MB). Is the larger buffer size worth the extra money? SharePoint online REST: Get users profile properties I'm looking for some help with a REST call I'm attempting to make in SharePoint Online.  I'm doing an add-in that gives me the name, birhday and photo property of all user in user profiles    I tried with this code   var siteUrl = _spPageContextInfo.siteAbsoluteUrl;     Console.log(siteUrl);     $.ajax({         url: siteUrl + "/_api/SP.UserProfiles.PeopleManager/GetMyProperties",         method: "GET",         headers: { "Accept": "application/json; odata=verbose" },         success: function (data) {             console.log(data);         },         error: function(error) {             console.log(error);         }     });   but I only get current user profile properties, what I need is all user profiles properties for all users, how can i achieve that?  Thanks in advance! Reverse Cauchy Schwarz for integrals Let $f,g$ be two continuous positive functions over $[a,b]$ Let $m_1$ and $M_1$ be the minimum and maximum of $f$ Let $m_2$ and $M_2$ be the minimum and maximum of $g$ Prove that $$\sqrt{\int_a^bf^2 \int_a^b g^2}\leq \frac{1}{2}\left(\sqrt{\frac{M_1M_2}{m_1m_2}}+\sqrt{\frac{m_1m_2}{M_1M_2}}\right)\int_a^bfg$$  I can't make any significant progress on this one... Thanks for any hint. I have two sites that were originally migrated from SPS2003.  It worked well in SharePoint 2007 and even on SharePoint 2010,  however when we migrated it to SharePoint 2013,  the home page throws following errors on the ULS Log.     5/24/2013 09:57:46.62  w3wp.exe (0x0D50)   0x1D24  SharePoint Foundation   Files   ak8dj   High   UserAgent not available, file operations may not be optimized.    at Microsoft.SharePoint.SPFileStreamManager.CreateCobaltStreamContainer(SPFileStreamStore spfs, ILockBytes ilb, Boolean copyOnFirstWrite, Boolean disposeIlb)     at Microsoft.SharePoint.SPFileStreamManager.SetInputLockBytes(SPFileInfo&amp; fileInfo, SqlSession session, PrefetchResult prefetchResult)        05/24/2013 09:57:46.62 w3wp.exe (0x0D50)   0x1D24  SharePoint Foundation   Cobalt  ajoii   Medium   Mapping Store error to Cobalt error. [Store Error: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.CoordinatedStreamBuffer.SPCoordinatedStreamBufferFactory.CreateFromDocParams(SqlSession session, Guid guidSiteId, Int32 cbContent, Nullable1 parentId, Guid docId, Nullable1 level, SPChunkedArray`1 rgbContent, Byte[] rgbRbsId, Int64 bsn, Byte partition, Int32 pageSize, Boolean bStartFilling)        05/24/2013 09:57:46.62 w3wp.exe (0x0D50)   0x1D24  SharePoint Foundation   Cobalt  aintx   High    Failed in CobaltStream.LockBytes: ErrorException --- Error: Unknown (Win32=0x80004003) --- Error message: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.CoordinatedStreamBuffer.SPCoordinatedStreamBufferFactory.CreateFromDocParams(SqlSession session, Guid guidSiteId, Int32 cbContent, Nullable1 parentId, Guid docId, Nullable1 level, SPChunkedArray`1 rgbContent, Byte[] rgbRbsId, Int64 bsn, Byte partition, Int32 pageSize, Boolean bStartFilling)     at         05/24/2013 09:57:46.64 w3wp.exe (0x0D50)   0x1D24  SharePoint Foundation   Files   ak8dj   High    UserAgent not available, file operations may not be optimized.    at Microsoft.SharePoint.SPFileStreamManager.CreateCobaltStreamContainer(SPFileStreamStore spfs, ILockBytes ilb, Boolean copyOnFirstWrite, Boolean disposeIlb)     at Microsoft.SharePoint.SPFileStreamManager.SetInputLockBytes(SPFileInfo&amp; fileInfo, SqlSession session, PrefetchResult prefetchResult)     at         05/24/2013 09:57:46.64 w3wp.exe (0x0D50)   0x1D24  SharePoint Foundation   Database    ab1a9   High    Failed to get document content data. System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.CoordinatedStreamBuffer.SPCoordinatedStreamBufferFactory.CreateFromDocParams(SqlSession session, Guid guidSiteId, Int32 cbContent, Nullable1 parentId, Guid docId, Nullable1 level, SPChunkedArray`1 rgbContent, Byte[] rgbRbsId, Int64 bsn, Byte partition, Int32 pageSize, Boolean bStartFilling)     at   I could not find any materials related to this on the internet,  I am not even sure if it has to do something with SPS2003 compatibility.  Any help pointers? Connect to Linux by name rather than IP I'm setting up an online ordering system but I'm in Australia and for international customers I'd like to show prices in US dollars or Euros so they don't have to make the mental effort to convert from Australian dollars.  Does anyone know if I can pull up to date exchange rates off the net somewhere in an easy-to-parse format I can access from my PHP script ?    UPDATE: I have now written a PHP class which implements this. . Inverse of sum of exponential random variables (mean and variance) Assume $X_1,X_2, \dots , X_n$ following the exponential distribution with mean $\theta &gt; 0 $ and the statistic: $$ T = \sum\limits_{i = 1}^n X_i $$  I know that the sum of exponential random variables follows the Gamma distribution, but I cannot infer anything about the inverse of the sum $\frac{1}{T}$. My guess would be that: $$ E\left[\frac{1}{T}\right] = \frac{1}{\theta} \quad \text{and} \quad V\left[ \frac{1}{T} \right] = \frac{1}{\theta^2} $$ but why? Use Cauchy-Schwarz inequality to show series convergence Mean absolute error OR root mean squared error? Why use Root Mean Squared Error (RMSE) instead of Mean Absolute Error (MAE)??    Hi  I've been investigating the error generated in a calculation - I initially calculated the error as a Root Mean Normalised Squared Error.  Looking a little closer, I see the effects of squaring the error gives more weight to larger errors than smaller ones, skewing the error estimate towards the odd outlier. This is quite obvious in retrospect.   So my question - in what instance would the Root Mean Squared Error be a more appropriate measure of error than the Mean Absolute Error? The latter seems more appropriate to me or am I missing something?  To illustrate this I have attached an example below:                    The scatter plot shows two variables with a good correlation,  the two histograms to the right chart the error between Y(observed ) and Y(predicted) using normalised RMSE (top) and MAE (bottom).     There are no significant outliers in this data and MAE gives a lower error than RMSE. Is there any rational, other than MAE being preferable, for using one measure of error over the other? How to draw commutative diagrams? Can anyone help me in giving commands for commutative diagrams in LaTeX ? It doesn't seem to appear properly in the LaTeX guides that I have. A command for a simple triangular diagram with arrows associated to maps would be good enough, or maybe some appropriate reference. Can different gauge wiring be used in the same circuit? What is involved in moving over to Lightning Web Components? I am drawing some graphs with tangents. I calculated the tangent should be centered at x=57/27 which is approximately x=2.11. I'm currently using the pos and sloped keys for nodes to draw tangents, but I'm not happy about the result; the tangents don't really align.   I think this is because the pos key calculates the actual length of the graph while the graphs don't have the same length.  I'm sure I can somehow let LaTeX do the calculations for me so as to align the slopes vertically at an x value of my choice. But how?  PS: The below document requires a working installation of gnuplot to compile.    \documentclass{standalone}   \usepackage{pgfplots} \pgfplotsset{compat=1.10} \usetikzlibrary{arrows, decorations.markings,intersections}  \makeatletter \tikzset{     nomorepostaction/.code=\makeatletter\let\tikz@postactions\pgfutil@empty,      my axis/.style={         postaction={             decoration={                 markings,                 mark=at position 1 with {                     \arrow[ultra thick]{latex}                 }             },             decorate,             nomorepostaction         },         thin,         -,         every path/.append style=my axis     } } \makeatother  \definecolor{headtitle}{RGB}{167,63,63}  \begin{document} \begin{tikzpicture}   \begin{axis}[%       axis line style={my axis},       xlabel = $U_A$,       ylabel = $S$,       xmin = 0, xmax = 3.25,       ymin = 0,       xtick={1,1.5},       xticklabels={$U_{B,\mathrm{initial}}$,$U_{A,\mathrm{initial}}$},       xticklabel style={             inner sep=0pt,             anchor=north east,             rotate=35         },       ytick=\empty,       height=.66\linewidth, width=\linewidth-4.5\tabcolsep,       axis lines*=left,       every axis y label/.style={at=(current axis.above origin),anchor=east},       every axis x label/.style={at=(current axis.right of origin),anchor=west}]%     \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%       set samples 51;       plot [0:3] log(3*(3-x)+1);       } node[sloped,above,pos=.63333,       minimum height=1cm,minimum width=1cm] (SB) {} node[pos=0.6,pin=45:{\color{black}{$S_B$}}] {};      \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%       set samples 51;       plot [0:3] log(9*x^2+6*x+1);       } node[sloped,above,pos=.83333,       minimum height=1cm,minimum width=1cm] (SA) {} node[pos=0.25,pin=-15:{\color{black}{$S_A$}}] {};       \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%       set samples 51;       plot [0:3] log(9*x^2+6*x+1)+log(3*(3-x)+1);       } node[sloped,above,pos=.775,       minimum height=1cm,minimum width=1cm] (St) {} node[pos=0.525,pin=165:{\color{black}{$S_\mathrm{total}$}}] {};      \path (SB.south east) edge[headtitle,very thick] node {} (SB.south west);      \path (SA.south east) edge[headtitle,very thick] node {} (SA.south west);      \path (St.south east) edge[headtitle,very thick] node {} (St.south west);   \end{axis}% \end{tikzpicture}% \end{document}