Situation is I have simple mechanism, which sends messages from apex trigger to our processing server. My trigger framework creates object for every change and save it to the WorkflowQueue__c. There is job running which periodically withdraws items from WorkflowQueue__c table and sends them asynchronously outside SF.   Issue: When change on User object occurs, there is supposed to be inserted new object to the given table, but I get such message:     System.DmlException: Insert failed. First exception on row 0; first error: MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): WorkflowQueue__c, original object: User: []   Why is this happening? WorkflowQueue__c contains only some string and original User object is not edited/update. I cannot see why apex prevents me from inserting such unrelated object. I would by grateful for explanation. Thank you
I need an approach to allow delegated admins (i.e., non-Administators) to add members to Public Groups and Collaboration Groups (the GroupMember and CollaborationGroupMember objects).  I added a custom object (UserGroupRequest__c) to capture which Users should be added/removed to which Groups.    I've also built a batchable class to process the requests.  However, GroupMember is a Setup object, and CollaborationGroupMember is not.  So this doesn't work if I combine the operations in a single batchable class.  Should I instead be using 2 batch classes, calling one from the finish method of the other?    Any recommendations on how best to proceed?  Am I way off base?    Would a trigger on the Request object perhaps be better? I'm guessing that there may be a permission problem if this is attempted via a trigger as the delegated admins won't be able to add users to public Groups.  Also, I'm guessing the trigger approach would run into the same mixed DML issue - on Insert of the Custom object, I would need to Insert/Delete from GroupMember and from CollaborationGroupMember, and then perform a 2nd update on the Custom object to indicate that processing was completed...
I have a Python function that takes a numeric argument that must be an integer in order for it behave correctly. What is the preferred way of verifying this in Python?  My first reaction is to do something like this:  def isInteger(n):     return int(n) == n   But I can't help thinking that this is 1) expensive 2) ugly and 3) subject to the tender mercies of machine epsilon.   Does Python provide any native means of type checking variables? Or is this considered to be a violation of the language's dynamically typed design?  EDIT: since a number of people have asked - the application in question works with IPv4 prefixes, sourcing data from flat text files. If any input is parsed into a float, that record should be viewed as malformed and ignored. Can I install Windows OS (Windows 7) on a removable USB hard drive? I wanted to take a sneak peek at Windows 7 so I thought of installing it. I have Windows Vista on my laptop which came pre-installed with it. I didn't want to mess with it.  So I created a partition (20 GB) in my USB external hard disk and tried to install Windows 7 on that partition. But when I booted from a Windows 7 DVD and selected the target partition on USB hard disk, it said it cannot be installed.  Is there any way to install Windows on an external USB hard disk? Is char *envp[] as a third argument to main() portable Format a date in XML via XSLT What is the difference between `grep`, `egrep`, and `fgrep`? Can anyone tell me the technical differences between grep, egrep, and fgrep and provide suitable examples?  When do I need to use grep over egrep and vice versa? What happens to the view.frame.size attribute after a CGAffineTransform (Rotate)? How to loop over the lines of a file? Say I have this file:  hello world hello world   This program  #!/bin/bash  for i in $(cat $1); do     echo "tester: $i" done   outputs  tester: hello tester: world tester: hello tester: world   I'd like to have the for iterate over each line individually ignoring whitespaces though, i.e. the last two lines should be replaced by  tester: hello world   Using quotes for i in "$(cat $1)"; results in i being assigned the whole file at once. What should I change? Can I mask an input text in a bat file? Maximum and minimum of of $f(x)=|x-1|+|x-2|+|x-3|$ Did Emperor Palpatine know about Luke and Leia from the beginning? Did Emperor Palpatine know that Padme had given birth to twins while it was happening?  Was it his long-term goal to have Vader only discover his offspring later, at some "correct" moment? I recall having heard somewhere that the only 1-manifolds (second countable, Hausdorff, connected spaces locally homeomorphic to $\mathbb R$) are $\mathbb R$ and $S^1$. Is this true? If so, is there a reasonably elementary proof? How do you reverse a string in place in C or C++? How do you reverse a string in C or C++ without requiring a separate buffer to hold the reversed string? Using first person or third person in papers? Are there written or unwritten rules for avoiding the use of first-person while writing research papers? I was advised at the beginning of my grad school to avoid use of first person - but I still don't know why I should do this.  I have seen that, at many places, authors refer to themselves are "the authors" and not "we". At the same time, I have also seen use of first-person to a good extent.    Do these things differ in different Journals and Conferences (and in different disciplines as well - mine happens to be CS)? Can I buy a plane ticket from A-B-C but get on the plane at B? If $aRb \land bRc$ never occurs, is a relation considered transitive? For years I've been trying to find this movie I saw on TV once.  I only saw the end.  It featured a teenage boy (about 18 years old) and his family hiding out in a cabin.  The kid is making molotov cocktails and preparing for something.  Sure enough two bad guys show up and I think one of them had a golden pistol.  They start fighting and one of the guys turns into a werewolf type creature.  The kid wounds it and tracks it through the woods to finish it off with his lever action rifle.  Anyone know the name of this movie?  I saw this probably mid to late 90s.  I'm guessing it was an 80's American film. It was live action. Cannot find Underground Jungle Temple Determine Whether Two Date Ranges Overlap Given two date ranges, what is the simplest or most efficient way to determine whether the two date ranges overlap?  As an example, suppose we have ranges denoted by DateTime variables StartDate1 to EndDate1 and StartDate2 to EndDate2. Catalan numbers and triangulation Assume $C_n$ is the number of triangulations of a polygon with $n+2$ sides. Using a combinatorial proof, show that $(4n+2)C_n=(n+2)C_{n+1}$.  I don't even know where to start with this one. I understand the triangulation after doing some googling, but I don't know where to go from here to prove the above using just a combinatorial formula. How to catch the "Login Failed" event? I want to show a custom block, only when log in has failed. So from visibility settings I have to put a PHP code that returns TRUE only when the login has failed.  But how could I "catch" that event? Do I have to use variable_get(..)? And if yes, how could I use that?with what attributes?  Thank you.