Following is my code and contact's first and last name is not displayed:  HTML:  &lt;template&gt;     &lt;lightning-card title="Datatable Example" icon-name="custom:custom63"&gt;          &lt;div class="slds-m-around_medium"&gt;             &lt;template if:true={contact.data}&gt;                 &lt;lightning-datatable                     key-field="Id"                     record-id={recordId}                     data={contact.data}                     columns={columns}                     onsave={handleSave}                     draft-values={draftValues}&gt;                 &lt;/lightning-datatable&gt;             &lt;/template&gt;             &lt;template if:true={contact.error}&gt;                 &lt;!-- handle Apex error --&gt;             &lt;/template&gt;         &lt;/div&gt;     &lt;/lightning-card&gt; &lt;/template&gt;   JS:  import { LightningElement, wire, track, api } from 'lwc'; import getContactList from '@salesforce/apex/ContactController1.getContactList'; const COLS = [     { label: 'Status', fieldName: 'Status', editable: true },     { label: 'First Name', fieldName: 'Contact.FirstName', editable: true },     { label: 'Last Name', fieldName: 'contact.lastName', editable: true },     { label: 'Email', fieldName: 'Email', type: 'email' } ]; export default class DatatableUpdateExample extends LightningElement {     @track error;     @track columns = COLS;     @track draftValues = [];      @api recordId;      @api conWrapper = [];       @wire(getContactList, {pRecId: '$recordId'})     contact; }   Controller:  public with sharing class ContactController1 {     @AuraEnabled(cacheable=true)     public static List&lt;campaignmember&gt; getContactList(string pRecId) {         return [select id, contactid, Status, contact.firstname, contact.lastname, Email from campaignmember where Campaignid =: pRecId]; }
I am testing the new  &lt;lightning:datatable&gt;, it is really good, and is a good replacement for most of my use cases which today I use a custom list component that I have developed.  I am getting data from my server through apex method, to populate it into the &lt;lightning:datatable&gt; component. I can bind the returned list directly to the data attribute and if the column names are same as the field names, all data is bound correctly.  The problem occurs when I get data from a parent record. For example - I want the Account name of my contact.  This example can show the problem:  Component Markup    &lt;aura:handler name="init" value="{!this}" action="{!c.doInit}"/&gt;  &lt;aura:attribute name="mydata" type="Object"/&gt; &lt;aura:attribute name="mycolumns" type="List"/&gt; &lt;aura:attribute name="sortedBy" type="String"/&gt; &lt;aura:attribute name="sortedDirection" type="String"/&gt;  &lt;lightning:datatable data="{! v.mydata }"                      columns="{! v.mycolumns }"                      keyField="Id"                      onrowselection="{! c.getSelectedName }"                      onsort="{!c.updateColumnSorting}"                      sortedBy="{!v.sortedBy}"                      sortedDirection="{!v.sortedDirection}"                      hideCheckboxColumn="{!false}" /&gt;        Component Controller  ({     doInit: function (component, event, helper) {         component.set('v.mycolumns', [                     {label: 'Id', fieldName: 'Id', type: 'id', sortable:"true"},                     {label: 'First Name', fieldName: 'FirstName', type: 'text', sortable:"true"},                     {label: 'Last Name', fieldName: 'LastName', type: 'text', sortable:"true"},                     {label: 'First Name Hebrew', fieldName: 'First_name_Hebrew__c', type: 'text', sortable:"true"},                     {label: 'Last Name Hebrew', fieldName: 'Last_name_Hebrew__c', type: 'text', sortable:"true"},                     {label: 'Account', fieldName: 'Account.Name', type: 'text', sortable:"true"},                     {label: 'Email', fieldName: 'Email', type: 'email', sortable:"true"},                     {label: 'Phone', fieldName: 'Phone', type: 'phone', sortable:"true"}                 ]);          var action = component.get("c.getRecordsFromDb");         action.setParams({             sObjectName: "Contact",             commaDelimitedFieldNames: "Id,FirstName,LastName,First_name_Hebrew__c,Last_name_Hebrew__c,Account.Name,Email,Phone",             filter: ""         });         action.setCallback(this, function(response){             var state = response.getState();             if (component.isValid() &amp;&amp; state === "SUCCESS") {                 var data = response.getReturnValue();                  component.set("v.mydata", data);             }         });         $A.enqueueAction(action);     } })   APEX Aura Enabled Method  @AuraEnabled public static List&lt;sObject&gt; getRecordsFromDb(String sObjectName,         String commaDelimitedFieldNames,         String filter) {      system.debug('\n\n\n\ngetRecordsFromDb sObjectName: ' + sObjectName + ', commaDelimitedFieldNames: ' + commaDelimitedFieldNames + ', filter: ' + filter + '\n\n\n\n');      // create a dynamic soql to get the value of the field     String sql = 'SELECT ' + commaDelimitedFieldNames + ' FROM ' + sObjectName;      if (!String.isBlank(filter))         sql += ' WHERE ' + filter;      system.debug('\n\n\n\ngetRecordsFromDb sql: ' + sql + '\n\n\n\n');     List&lt;sObject&gt; records = Database.query(sql);     system.debug('\n\n\n\ngetRecordsFromDb: ' + records + '\n\n\n\n');      return records; }   The problem is with the Account.Name field - the &lt;lightning:datatable&gt; component does not display the column data.   I know that the data is returned ok, and I know that in the object that is returned, the Account is contained like an object (probably this is the problem):    Is there a good way to show parent record data with this component?
How do electric currents make light? In an incandescent light bulb, electrons flow through wires to the bulb, where is passes through a filament, and the filament lights up.  Does this work because of several high energy electrons losing some of their energy to disturb the electromagnetic field, creating photons? The electrons just leave the filament afterward and are replaced by more high-energy electrons from the negative terminal. Or does it work differently?  As a secondary question, is there a type of light bulb that directly converts electron flow to photons? Name for categorical product inside a monoid If a monoid is a category with a single object, is there a "monoid-theoretical" concept that the categorical product translates to? As an analogue, in a poset the product translates to the notion of meet (and the coproduct to its dual, the join).  Just by unwinding the definition one can see that this boils down to the existence of two monoid elements $p_1$ and $p_2$ such that for every $x$ and $y$ in the monoid there's a unique element $\langle x,y \rangle$ that factors as $x = p_1\langle x,y \rangle$ and $y = p_2\langle x,y \rangle$; the question is whether the concept is a known and/or useful one.  Incidentally, if the monoid in question is a group then the existence of a product makes the whole thing collapse into the trivial group; this might or not hint that the concept I'm looking for is "too boring" to have a name. In fact it suffices for one of the projections to be right cancellable, or for the pair $\langle x,x\rangle$ to be left cancellable for some $x$, to make the whole thing collapse. Convergence test of the series $\sum\sin100n$ I need to prove that $$\sum_{n=1}^{\infty} {\sin{100n}} \; \text{diverges}$$ I think the best way to do it is to show that $\lim_{n\to \infty}{\sin{100n}}\not=0$. But how do I prove it? I have two LED lamps in my corridor, and when I switch them off, they keep emitting light (not very strong, but it's annoying at night).  What can it be? How can I fix it? View a man page in a specific section I wanted to access man pages for command chmod.  Command whatis chmod gave this output:  chmod (2)            - change permissions of a file  chmod (1)            - change file mode bits  But I was actually looking for chmod(2).  When I type man chmod, man pages for chmod(1) appears.   Both man chmod(2) and man 'chmod(2)' commands show error.   I tried running info coreutils 'chmod invocation', but output is some kind of documentation which doesn't look like a typical man page. What does $$ mean in the shell? Why does my Mac OS X 10.6 kernel run in 32-bit mode? I have a MacBook Pro (5,1) with 4GB of memory running 10A432 - but it's running the 32-bit kernel.  Any ideas why it wouldn't be running in 64-bit mode, and how I can get it to do so? Can't restart nginx, bind() failed (98: Address already in use) OR-ing power supplies (diode or mosfet) I have got two power supply options on my board:   USB 5.0V DC Power Jack of 5.0V   My intention is to design a or-ing power supply option, as either of them will be used at a time. Possible solutions are shown below:    Using oring diodes   or using two p-mos    Possible issues observed with the above options:   Using diode is cheap and good option but an ordinary diode gives a drop of 0.7V and a schottky diode will give a drop of 0.16 to 0.20 volts, which is also not acceptable because my processor  recommended operating power supply is 5.0V and minimum supply voltage is 4.75. With a 0.2V with schottky diode the 5.0V comes down to 4.80V and the space between recommended and supply fed is very less. Then I thought to use p-mosfets which serves the purpose of oring along with reverse polarity protection, but assume a case when both the supplies are fed together by mistake and there is minor difference between USB supply and DC jack say 4.9V for USB and 5.10V for DC Jack. Then, the DC jack supply may pump the current in USB Jack, which may damage USB.   Is there any other better and cheap option I should use for or-ing supply, or is there something wrong with my analysis? How can I vertically align elements in a div? Many to Many and Weak Entities I have an entity that cannot exist without being defined by another, and I want this entity to participate in a many-to-many relationship.  Example: An artist has an album (the album cannot exist without an artist), the album also has many tracks, but the same track can exist in many albums.  So we have a many-to-many relationship between the album and the tracks.  If the album is a weak entity, then its primary key is a foreign key referencing the artist, thus it cannot be a foreign key to another table representing a many-to-many relationship.  The question is: is it possible to have this kind of relationship in SQL, and if so, how do I express it? How long does it take for badges to be awarded? How are they generated? Do badges get calculated in real time, or do they get calculated by an external service? How long does it take for a badge to be awarded, once its requirements are met?  Does Stack Overflow use any external services to do things, like maintenance, e-mailing or badge calculation? Unable to uninstall Wine apps How to perform a logistic regression for more than 2 response classes in R I want to predict the impact of oil price over a Colombian oil company's stock price. I plan to use a logistic regression for this with a categorical variable (Up or Down given the direction of the stock price). Here is part of my dataset:  Minute  ecopet  profit  sum_profit   direccion  cl1_chg   sum_cl1    direccion_cl1 571     2160     0       10           Up         -0.03     0.00      Down 572     2160     0        0           Neutral     0.07    -0.03      Down 573     2160     0       -5           Down       -0.08     0.04      Up 574     2160     0       -5           Down       -0.07    -0.04      Down 575     2160     5       -5           Down       -0.08    -0.11      Down 576     2165     0       -25          Down        0.00    -0.19      Down 577     2165     0       -25          Down       -0.05    -0.19      Down 578     2165     0       -15          Down       -0.17    -0.24      Down 579     2165     5       -15          Down       -0.06    -0.41      Down 580     2170     0       -20          Down        0.03    -0.47      Down 581     2170    -10       0           Neutral     0.04    -0.44      Down   My dependent variable is 'direccion'. But as you can see it has 3 response classes. I know that to implement a binary logistic regression in R the code is:  glm.fit=glm(direccion~direccion_cl1, data=datos, family=binomial)   I am working with intraday information and plan to predict what happens when the oil moves up/ down (in the previous 10 minutes) and how it impacts the stock price in the next 10 minutes.  Could anyone tell me how could I perform this? I don't really know how to perform the logistic regression with 3 response classes. Thanks! What should the standard spelling be - British or US? Getting an error in W3C Markup Validation when trying to get a whole  element as a link in a page Android Min SDK Version vs. Target SDK Version What is better to have? A pokemon with higher IV but lower CP or vice versa? Me and my friends have encountered this situation many times. We need to decide which Pokemon to evolve. Take the following scenario:   Growlithe A: 20% more CP than Growlithe B. (898 instead of 743). Growlithe B: 26% more IV than Growlithe A. (87 instead of 69 in this case).   I didn't give more details about each Pokemon because I'd like a general answer that others can use.  Thank you kind folks!  P.S this is not a duplicate, since I understand what a higher IV interprets into.  Yes, a higher IV will define the MAX CP, but it's not the only thing to consider. A higher IV also means better chance of better moves for the evolved pokemon - and those are much more important than a high CP. Also consider that I have many Arcanines and I don't have the stardust to max them out (that is a different question). How to get into Walker in the Wastes as a level 3 Wizard I am building a Wizard character that focuses on using Greater Drought from the Walker in the Wastes prestige class.  The campaign is starting at level 12, so I need to figure out a way to build a Wizard 3/Walker in the Wastes 9.  I am planning on using Southern Magician and Extra Spell to get around the spell requirement, but I'm having trouble qualifying for Heat Endurance by level 3.  We are using a variant rule where, at every level divisible by 3, we get 3 feats instead of 1. At level 3, I'll have 1 feat from level 1, and 3 feats from level 3.  How can I build a character with 11 total levels of Wizard spellcasting and the Greater Drought Walker in the Wastes ability by level 12?  My current character sheet can be found . Are there rules about using "that" to join two clauses?