How to create and add custom fields to existing custom object programmatically using apex? I've looked around for this and there seem to be a couple of different ways on how to do this.     However, all of these seem to be old ways (I might be completely wrong here and those methods can be totally valid today) but I'd like to make sure I'm using the latest method for doing this and avoid making a request like it's suggested in one of the StackExchange answers in the link above (The tooling API method). I also don't want to implement this in a Visual Force or any UI pages, I'd like to create custom fields on an existing object based on a received post request. A simple example for what I'm trying to do: for (String fieldName : fieldNameList) {    Existing_Custom_Object__c.CreateNewCustomField(name = fieldName, type = checkbox, ...);    // Upload/Push this change to the org }
Create custom fields with apex Anybody knows how to create custom text fields on salesforce.com objects using apex?
Let $a$ be an element of a group G. Prove that $a$ commutes with each of its conjugates in $G$ iff $a$ belongs to an abelian normal subgroup of $G$.   My Try:  I proved the backward direction. For forward one, given $g\in G, a(gag^{-1})=(gag^{-1})a$. I was trying to prove that $a\in Z(G)$. In order to prove that, I must show that $ag=ga$. But failed. Am I on the right track? Can anybody please give me a hint? I want to try it myself. Find all functions $f(x)$ such that $f\left(x^2+f(y)\right)$=$y+(f(x))^2$ Add markdown support for hidden-until-you-click text (aka spoilers) Install 0bda:f179 Realtek Semiconductor Corp. (rtl8188fu), or Netgear rtl8812au USB WiFi adapters 19 DEC 2019 - I really, really wanted to use the Cinnamon desktop to set up a new system my 83-year-old Dad could navigate. I struggled to get any USB WiFi device working with Debian using Cinnamon, gave up and installed Ubuntu, but still struggled (I think) because I had immediately changed to the Cinnamon desktop before attempting to get the WiFi device set up.  It just kept prompting for the password, no matter what fixes I tried. Not sure if Cinnamon was the problem, or if I just hadn't found the right solution online. Can anybody explain the UNABLE_TO_LOCK_ROW error? Error Message:     Developer script exception from Nicomatic : quotepotential :   quotepotential: execution of AfterUpdate caused by:   System.DmlException: Update failed. First exception on row 0 with id   a0Q90000005PoxtEAC; first error: UNABLE_TO_LOCK_ROW, unable to obtain   exclusive access to this record: [] Trigger.quotepotential: line 14,   column 1      Apex script unhandled trigger exception by user/organization:   00590000001A6jh/00D90000000bovq      quotepotential: execution of AfterUpdate      caused by: System.DmlException: Update failed. First exception on row   0 with id a0Q90000005PoxtEAC; first error: UNABLE_TO_LOCK_ROW, unable   to obtain exclusive access to this record: []      Trigger.quotepotential: line 14, column 1   these mails are getting to my mail..........  trigger quotepotential on Quote_Line_Item__c (after insert,after update) {     Set&lt;Id&gt; quoteIds = new Set&lt;Id&gt;();     List&lt;Quote__c&gt; quotes = new List&lt;Quote__c&gt;();     for (Quote_Line_Item__c record: Trigger.new) {         if (record.Quote1__c != null){             quoteIds.add(record.Quote1__c);         }     }     for(AggregateResult ar:[                 SELECT                      Quote1__c,                      SUM(Max_Batch__c)sumMax                  FROM Quote_Line_Item__c                  WHERE Quote1__c=:quoteIds                  GROUP BY Quote1__c                 ]) {          quotes.add(new Quote__c(              Id=(Id) ar.get('Quote1__c'),              Potential__c = (Decimal) ar.get('sumMax')              ));     }     if (quotes.isempty() == false) {         update quotes;     } } Including package to create MATLAB labels using LaTeX Wi-Fi not working on Lenovo ThinkPad E570 (Realtek RTL8821CE) We just bought a Lenovo  (which is supposed to have the Intel 8265 for wireless). This laptop was bought in part because it is certified to run Ubuntu and as such to me at least it would make sense for things to work out of the box... but no such luck.  First, I installed Ubuntu 17.10 and after installation realised Wi-Fi was not working. I also tried Ubuntu 16.04 from a USB drive since that is the version of Ubuntu it is certified for, but no luck there either.  The wireless chip is not detected by lshw (or even lspci by the looks of it), ip link does not show a wireless interface, and the iwlwifi kernel module is not loaded at boot (I can load this myself using modprobe iwlwifi but this does not make Wi-Fi work). I think it is a combined Wi-Fi/Bluetooth chip, and Bluetooth does appear to work (or at least Bluetooth shows up in Gnome and rfkill list).  modinfo iwlwifi | grep 8265 shows me a file ending in -34 is supposedly loaded but only a file ending in -33 (and some other lower numbers) is present in /lib/firmware, if that helps).  I have also installed the Linux 4.14.9 kernel in an attempt to get things to work, but this did not resolve the issue either.  Further information  root@ThinkPad-E570:~# modinfo iwlwifi | grep 8265 firmware:       iwlwifi-8265-34.ucode root@ThinkPad-E570:~# rfkill list all 0: tpacpi_bluetooth_sw: Bluetooth     Soft blocked: no     Hard blocked: no 1: hci0: Bluetooth     Soft blocked: no     Hard blocked: no root@ThinkPad-E570:~# dmesg | grep iwl root@ThinkPad-E570:~# lspci -nnk | grep 0280 -A3 05:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:c821]     Subsystem: Lenovo Device [17aa:c024]   Update  I just noticed that the laptop does not have an Intel wireless chip at all, but in fact has a Realtek one... which means that the  of the shop I bought this laptop at were not accurate... Sigh. Same problem stands, however, just with a crappier wireless chip. When "etc." is at the end of a phrase, do you place a period after it? Example:     It's all about apples, oranges, bananas, etc.   VS.     It's all about apples, oranges, bananas, etc..   Update  What happens if the abbreviation is inside parentheses, do you place a dot after and before the closing parenthesis?     It's all about fruit (apples, bananas, etc.). How do I know I have the correct exposure when shooting in manual mode? I have a Canon XTI which I've been using for a few years now. Most of the time I'm been shooting in one of the "semi-manual" modes like aperture priority or shutter priority, but now I'd like to try using full manual mode. I should have a new EF-S 17-55 f/2.8 delivered when I get home today. Before I was using a variable aperture Sigma 17-70 which made manual mode more difficult with the aperture changing arbitrarily.  I understand the effect of changing aperture and shutter speed, but right now I'm accustomed  to only controlling one at a time. The camera is usually setting the other to get the right exposure automatically for me. So if I'm controlling both how do I know I have the correct exposure? I understand I need to use the metering in my camera but I'm not sure exactly how do do that.   First when should I be using each of the metering modes (Evaluative, Partial, Center weighted, or Spot)? These just change the area of the scene which is metered correct?  How do I know what the meter should read off a specific object? Obviously if I just happen to be shooting a 18% gray wall then it should be at zero, but that can't apply to everything? If I'm shooting a black cat and take a spot meter reading off of the cat then the meter should read less then zero right? But how do I know how much less then zero? Are there rules of thumb I can follow? I've ordered a couple gray cards with my new lens. So experimenting with those should help.  How often should I be changing these settings? Say I'm at a party indoors which is consistently lit. I should be able to set the aperture, shutter speed, and ISO and just forget about it unless the lighting changes correct? Does the same apply to outdoor scenes? I've been hesitant to use manual mode in the past because I felt like I was spending a lot of times messing with settings before each shot. But not I'm realizing that this is really only the case when the lighting changes, or I want a different style of photo such as a different depth of field.  Finally, does exposure change with distance to the subject? For example say I want to take a picture of a statue with correct exposure using a gray card. I'd place the card on the statue, and while being careful not the block the light on the card find the correct exposure by spot metering the card. If I were then to step back 20' to get the whole statue in frame would I still have the correct exposure? What is a decoupling capacitor (or smoothing capacitor as referred to in the link below)?  How do I know if I need one and if so, what size and where it needs to go?    mentions many chips needing one between VCC and GND; how do I know if a specific chip is one?   Would an  4-bit parallel access shift register used with an Arduino need one? (To use my current project as an example) Why or why not?  I feel like I'm starting to understand the basics of resistors and some places they're used, what values should be used in said places, etc, and I'd like to understand capacitors at the basic level as well. I recently bought one of these ESR meters, a 'MESR-100':       It claims to be able to test capacitor ESR with the caps left in-circuit.  It appears to work well from my tests so far.  However, how much can I trust the in-circuit readings?  Are they going to be less accurate?  Are there certain circuit configurations where it wouldn't be possible to measure ESR in-circuit accurately?  [EDIT: Added the model as requested] : SPSite and SPWeb object dispose inside foreach loop Is there a regular expression to detect a valid regular expression? How do I remove repeated elements from ArrayList? I have an ArrayList&lt;String&gt;, and I want to remove repeated strings from it. How can I do this? What is polymorphism, what is it for, and how is it used? Continuity $\iff$ Preimage is closed whenever set is closed I'm trying to do the following:     Prove that a function $f : S\rightarrow T$ between two topological spaces is continuous iff $f^{-1}(C)$ is closed whenever $C\subset T$ is closed.   To show that the closed-set relationship implies continuity, notice that $T-C$ is open. The preimage of this open set is $f^{-1}\left(T-C\right)=S-f^{-1}(C)$, which is open by assumption ($f^{-1}(C)$ is closed). Of course, any open set $G\subset T$ can be written in the form $T-C$ by letting $C=T-G$. Thus, for every open set $G\subset T$, the preimage is open.  To show the implication in the other way, consider a closed set $C\subset T$. $T-C$ is open, so $f^{-1}(T-C)=S-f^{-1}(C)$ is open as well ($f$ is continuous), which means that $f^{-1}(C)$ is closed. A better serial voting trap Currently we capture fanatic, voting ring or rage-type activities, by measuring the number of up-votes or down-votes between the same two users in a certain (relatively short) time period. When this is detected by the system, the votes are reversed, and I've never bothered to investigate what else happens after that - though I'm sure some form of wrist-slapping ensues.  While it is intended to be well-guarded for obvious reasons, the algorithm used is not exactly a secret, and I am sure there are plenty of examples where people are dangling (maybe intentionally, or maybe by dumb luck) just on the safe side of getting caught.  Personally I believe there are active, intentional, long-term vendettas in operation right now where users either:   blindly up-vote every answer from a user; or, down-vote a particular user once or twice a day, regardless of topic or quality.   Now, maybe the first one is valid - if I'm operating in the same tag-sphere as some smart person, it may just be that I'm constantly enthralled with their answers, and I'm not even noticing who they're written by. (Though, even Skeet isn't perfect, and I haven't up-voted every answer I've seen him post.)  But still, can we do a better job of catching - or at least noticing - this activity over the long term in addition to the short term?  The behavior is the same, and shouldn't be tolerated, regardless of the time frame - vengeful rage serial voting, blind staker crush serial voting, and painstakingly patient serial voting are all undesirable behaviors IMHO.  I'm not saying it has to do anything automatically, as I'm well aware of the possibility of false positives. And I'm not even sure what to propose as a time frame or a vote threshold.      But if a large percentage of my up-votes or down-votes are against a particular user, and especially if on a majority of those posts I am the only one voting in that direction, I think it should at least be raised as some kind of flag to moderators.   This would work much like how other suspicious activity is highlighted (but also not dealt with automatically). If a pattern becomes obvious and persists, then they can intervene in some way (or not, but at least they were provided with the information - just like they can reject and ignore manual flags). Today, all I can do is e-mail team@stackoverflow.com, and unless I know exactly which person(s) are involved, there is not much they can do about it.  And you're thinking, "Meh, let some hater down-vote you once or twice a day. Unless all you're posting is utter crap, it should be statistically insignificant." You're right. But reputation is not the point, and is not the motivation behind my request. What I'd like to see curtailed is the tendency for folks to down-vote a question or answer because of who posted it, not because of what it said or didn't say. When a down-vote is personal it can leave a person second-guessing the quality of their post. Which isn't necessarily a bad thing, except when it happens repeatedly.  Sorry for the essay but I wanted to try to anticipate and cover all the objections and hole-poking. It's been some weeks now, whenever I try to used my Youtube app, it tells me it's impossible to connect to Youtube. Since it's an iPad 1, I have had trouble finding information online.  Did Google or Apple stop supporting the app? Is it finally obsolete? Is there another app I could use that works on iOS 5?  Just to be clear, I did not tinker with my device. I did not change its parameters, I did not jailbreak it, it connects to the Internet just fine and I've tried the app on different Internet connections. Also, this is not a login problem, the app just refuses to let me browse videos, whether I'm logged in or not.  Thanks for your help. When documenting a style file, it would be nice to be able to easily put side by side different examples of code, side-by-side with the output they produce.  What recommendations to people have to do this efficiently, and &aelig;sthetically? Does $\sum_{n=1}^{\infty} \sin(\pi(2+\sqrt{3})^n)$ converge? Converge absolutely? Per the title, does $\displaystyle\sum_{n=1}^{\infty} \sin(\pi(2+\sqrt{3})^n)$ converge? Converge absolutely?   I'm stuck on this question, not sure how to approach it.  Thank you!