. The class is global without sharing . Not able to figure  out what the issue is any help is appreciated
Im creating a community user from an Apex code. When our internal users (non-admins) run the code they are getting following error. (This was working fine when we test the feature in sandbox)     SObjectException: Field is not writeable: User.ProfileId   The code is       //Grab Community User Profile     Profile p = [Select Id, Name from Profile where Name = :COMMUNITY_PROFILE LIMIT 1];       User PortalUser = new User();          PortalUser.UserName = Con.Email+'-POC';         PortalUser.ContactId = Con.Id;         PortalUser.ProfileId = p.id;         PortalUser.Email = Con.Email;         PortalUser.EmailEncodingKey = 'UTF-8';         PortalUser.FirstName = Con.FirstName;         PortalUser.LastName = Con.LastName;         PortalUser.TimeZoneSidKey = 'America/Los_Angeles';         PortalUser.LocaleSidKey = 'en_US';         PortalUser.LanguageLocaleKey = 'en_US';          if (Con.LastName.length() &gt;= 8){             PortalUser.Alias = Con.LastName.substring(0, 7);             }else{             PortalUser.Alias = Con.LastName;         }             SObjToInsert.add(PortalUser);
I've already defeated the Big Bug.   I see the hint that the small bugs disguised as cursors are vulnerable to the three words "Charity", "Uganda", and "Bram".  I think I have all keys available, I've tried undoing with the bugs on the three words, I've tried motions which include the three words in their range, I have each of the three words stored in a named register, but I haven't figured out how to defeat the three small bug minions underground in Level 14 of Vim Adventures.  I suspect I should have defeated them before defeating Big Bug, maybe even before finding 'undo'. Is there instead something I should do in the 'lorem' buffer where I found the three cursors (Blue, White, and Pink) at the beginning of the level?  How does one defeat the three small bug minions in Level 14? Deleting (Erasing) all Data from Failed SanDisk MicroSD Card I've had two 32GB SanDisk MicroSD cards go bad recently.  One I was able to temporarily revive using the kind advice offered in this thread:   When I insert the other into a reader, it registers as 30.6MB (that's MB, not GB).  I've tried all sorts of software and other techniques to revive this card and retrieve the important data off of it (including FindAndMount and TestDisk).  Nothing has worked.  So I'm thinking of returning the card for a refund.  But first, I would like to make it unreadable by someone more skilled than myself.  Is there any way to do this, given that I cannot even format the card or get it to be recognized as more than 30.6MB?  I am looking for a method that does not entail the kind of obvious physical destruction that would jeopardize obtaining a refund from the retailer.  If Costco (where the card was purchased) accepts physically destroyed cards for return, then physical destruction is acceptable (but please have knowledge that they do).  Given two failures, I don't really want to send the card to SanDisk for replacement, because I no longer trust the reliability of their products. I have two disks in my system:   Non-UEFI windows 10 install UEFI kubuntu 16.10   This system is my home server. I'm migrating from Windows to Kubuntu, but it will take a while since I can't yet duplicate the entire functionality. In the mean time I want to run dual boot so that I can run the server as was (windows) while I'm setting up the Kubuntu deploy in any spare time I get. So:  I'd like to add windows boot to grub's target list, however update-grub does not find my Windows bootloader.  I'm guessing the problem is that it's searching for an EFI boot while there is only a legacy BIOS one.  Is there a way I can add my Windows install as a grub target? Why $\sqrt{-1 \times -1} \neq \sqrt{-1}^2$? We know $$i^2=-1 $$then why does this happen? $$ i^2 = \sqrt{-1}\times\sqrt{-1} $$ $$ =\sqrt{-1\times-1} $$ $$ =\sqrt{1} $$ $$ = 1 $$  EDIT: I see this has been dealt with before but at least with  I'm not making the fundamental mistake of assuming an incorrect definition of $i^2$. Why doesn't a commutator cause the rotation to reverse periodically or stop? I understand the field magnets attracting/repelling the armature/coil so that it turns one half-turn and then, because the commutator is turned, its contact with the brushes has switched sides, and the current goes in the opposite direction, reversing the electromagnetic polarity. Then, because the polarity is swapped, it attracts/repels to complete the second half-turn. The thing is, isn't it a bit of a gamble that it will turn in the same direction? Couldn't the it just be pulled/pushed back, more or less undoing the half-turn?  I'm also a bit confused how the rotation doesn't just stop once the commutator is oriented so that the brushes are contacting both sides of the commutator. In other words, there's a brief period just as the commutator switches the current directions where each both the brushes are in contact with both sides of the commutator where the current is neutralized. Shouldn't this stop the motor?    For reference, I'm just talking about a simple DC motor. The current is maximum through those segments of a circuit that offer the least resistance. But how do electrons know beforehand that which path will resist their drift the least? I have a LaTeX editing environment that does some assistive stuff such as auto-indenting, closing parentheses, etc.  However, one of the things that it does is unknown to me, and is difficult to search for. If I type an empty set of braces, it replaces them with  {}&lt;++&gt;   If I type two empty sets, for example when I'm setting up a fraction \frac{}{} what I actually get is  \frac\left\{ } \right\}&lt;++&gt;}&lt;++&gt;   Is this a problem? What does &lt;++&gt; do?  Edit: This is using All-in-One Event Calendar: Custom Query - Getting each event Instance Official ESTA application website and are the others scams? A quick search for ESTA application returned many results. According to , the official site to apply for an ESTA is .  Are the others scams, legitimate third party resellers or "added value" services?    (defunct - domain is for sale circa 2020)     Can anyone confirm either way?  Updated 2020: The above have better "not affiliated with the U.S. Government" warnings now, but beware there are newer more sneaky sites starting all the time:        And fortunately more official guidance about this issue: What is a tty, and how do I access a tty? I have a small Problem that occurs from time to time.   Sometimes, when I copy things or when I put an object from the symbol library on my page, the whole file gets messed up. The screenshot shows it. I make the graphic on the right, Illustrator the ones on the left.   I have pixel snapping checked. Is there a way to tell Illustrator to align everything to pixels no matter what? I am using the below script to move two days back when script runs at starting two days of the year and also check first and second days of every month and move two days back. if [$month=&quot;01&quot;] &amp;&amp; [$day=&quot;01&quot;]; then         date=&quot;$last_month/$yes_day/$last_year&quot;         fulldate=&quot;$last_month/$yes_day/$last_year&quot; else         if [$month=&quot;01&quot;] &amp;&amp; [$day=&quot;02&quot;]; then                 date=&quot;$last_month/$yes_day/$last_year&quot;                 fulldate=&quot;$last_month/$yes_day/$last_year&quot;         else                 if [ $day = &quot;01&quot; ]; then                         date=&quot;$last_month/$yes_day/$year&quot;                         fulldate=&quot;$year$last_month$yes_day&quot;                 else                         if [ $day = &quot;02&quot; ]; then                                 date=&quot;$last_month/$yes_day/$year&quot;                                 fulldate=&quot;$year$last_month$yes_day&quot;                         else                                 date=&quot;$month/$yes_day/$year&quot;                                 fulldate=&quot;$year$month$yes_day&quot;                         fi                 fi         fi fi  But my bad am getting the below error message Etime_script.sh: line 19: [06=01]: command not found Etime_script.sh: line 24: [06=01]: command not found How to understand Cauchy's proof of AM-GM inequality(the last step) Speed of object towards a point not in the object's trajectory? I remember being taught that the correct order of adjectives in English was something along the lines of "Opinion-Size-Age-Color-Material-Purpose."  However, it's been a long time and I'm pretty sure I've forgotten a few categories (I think there were eight or nine). Can anyone fill them in? I'm looking for a way to prove $$\sum_{n=0}^\infty\frac{(-1)^n}{(2n+1)^{2m+1}}=\frac{(-1)^m E_{2m}\pi^{2m+1}}{4^{m+1}(2m)!}$$ I know that $$\sum_{n=0}^\infty\frac{(-1)^n}{(2n+1)^{2m+1}}=\frac{1}{4^{2m+1}}\left(\zeta\left(2m+1,\frac14\right)-\zeta\left(2m+1,\frac34\right)\right)$$ so maybe I could simplify the above more? Safety of installing Ubuntu alongside Windows Is it really safe to choose the "Install Ubuntu alongside Windows" option from the Ubuntu installation program?  I never used that option, instead I used other tools such as partition magic or windows 7's disk tool to resize my partitions.  Since I'm going to install Ubuntu across a lot windows (XP, Vista and 7) machines. It would not be nice to damage those Windows partitions.  What is your experience? Can I use this feature without concerns? For every $c\in [0;2]$ determine whether the sequence $\{a_n\}_{n\geq 1}$ which is defined as follows:  $a_1=c$, $a_{n+1}=1+\frac{(a_n-1)^2}{17}$ for $n\geq 1$  is monotonic for sufficiently large $n$, and determine whether its limit exits and if it exists, give its value.  I have no idea what to do with this problem. I was able to see that $a_{n+1}-a_n$ is a quadratic function and I also found ot that limit, if exists, is equal to either $1$ or $18$ (that's beacause if $a_n$ id convergent to $g$ then every subsequence is also convergent to $g$). So how to determine the limit for every $c\in [0;2]$? I stumbled upon an example, which needed to be compiled with the additional option --shell-escape. Using this option it worked just fine, but I'm curious:     Why or when is this option needed and what does it actually do? How to search for list of papers citing both papers A and B? For given papers A and B, I would like to search for all papers that cite both A and B. I guess one can generalize to papers {A,B,C,...} and find all papers that cite all of them.   A quick Google Scholar and Web of Science search revealed nothing. Google Scholar has a "cite=..." thing in the URL, which I messed with a bit to no avail.