I need to send some data to API when APEX execute success. When I put a callout method inside the finish method of the batch. There is always error shown: Too many future calls: 1 Example code: global with sharing class MyBatch implements  Database.Batchable&lt;sObject&gt;, Database.AllowsCallouts, Database.Stateful {          List&lt;string&gt; lines = new List&lt;string&gt;{'BuildingName'};      global Iterable&lt;sObject&gt; start(Database.BatchableContext bc) {         return [SELECT Id, BuildingName__c, Exported__c  FROM Account WHERE Exported__c = false AND LastModifiedDate = TODAY];     }      global void execute(Database.BatchableContext bc, List&lt;Account&gt; records){         for(Account cp : records) {            string row = cp.BuildingName__c ;            cp.Exported__c  = true;                       lines.add(row);         }         if(records.size() &gt; 0) {             update records;         }     }          global void finish(Database.BatchableContext bc){         string result  = JSON.serialize(lines);        lines = null; //free memory        BE_Config__c beConfig = BE_Config__c.getInstance();        string url = beConfig.Url__c  + 'api/export/';        HttpRequest req = new HttpRequest();        req.setEndpoint(url);        req.setMethod('POST');        req.setBody(result);        HttpResponse res = http.send(req);      }     }
I got a situation where i need to invoke future method from batch class. And i know that it is not possible to do. But there might be some workarounds to achieve it, right? And i dont want to invoke future method using shedule apex as my requirement will hit governor limits of "Total number of schedule jobs exceed". So i tried in below ways, but still fighting with same issue.  My design is  Scenario 1 :   Schedule Apex ===> 2. BatchClass (Runs every hour) (Generates a map with "N" records for every batch context, and passes it to Future method in an apex class)  ===> 3. Future method ( then it will login to a salesforce account and generates an attachment and sends an email to a corresponding email address) .   Scenario 2 :  Since, It is not possible to invoke future method from batch, i tried implementing an apex class with a normal static method  invoking future method and in a batch class, for every context i.e., execute() method, it will invoke a normal method which in turn invokes future method, but still got the same error      FATAL ERROR: Future method cant be called from future or Batch   ie.,   global class BatchClass implements Database.batachable&lt;Sobject&gt; {    global Iterable&lt;ScheduledReport__c&gt; start(Database.BatchableContext BC)  {         query=[];        return query;  }  global void execute(Database.BatchableContext BC, List&lt;ScheduledReport__c&gt; scope) {      FutureClass.normalMethod(mapRecords);   }    global void finish(Database.BatchableContext BC){   }  }   Future Class:   global class FutureClass {  global static void normalMethod(Map&lt;&gt; mapR) {      futureMethod(mapR);  }  @future(callout=true)  global static void futureMethod(Map&lt;&gt; m) {      //some code;   }  }   Scenario 3 :  Instead of invoking future class method from batch i tried updating list of records and done checkbox value to true and i've implemented after update event trigger to get the all the records in which checkbox values are true and from trigger i tried invoking future method , still didnt work , i got an error      FATAL ERROR: Future method cant be called from future or Batch   Please help me out.   Thanks !
Overstayed my US visa for over 9 years, never got deported, can I return as a tourist? drawing at least 90% of colors from urn with large populations Windows losing IPv6 address after ~10 minutes When I initially connect to my home network my windows PC is assigned an IPv6 address - however after a few minutes it loses this address! I seem to have similar behaviour on multiple hosts using both wireless and wired connections.  My router is an Asus RT-AC87U.  How could it be losing the IPv6 address? How can I mintor / diagnose this issue?  Update:  Based on @grawity's suggestion below I ran wireshark on this. Sure enough I see a Router Solicitation message and a Router Advertisment message with a Router lifetime of 600 seconds. After 600 seconds my computer drops its Ipv6 address.  What is supposed to happen? Should my host send another Router Solicitation message? Or should the router periodically resend the Router Advertisment message?  Update 2:    says that Router Adverticement messages should be sent periodically. Debian : Verify disk encryption password for already mounted system If I do the following:  import subprocess from cStringIO import StringIO subprocess.Popen(['grep','f'],stdout=subprocess.PIPE,stdin=StringIO('one\ntwo\nthree\nfour\nfive\nsix\n')).communicate()[0]   I get:  Traceback (most recent call last):   File "&lt;stdin&gt;", line 1, in ?   File "/build/toolchain/mac32/python-2.4.3/lib/python2.4/subprocess.py", line 533, in __init__     (p2cread, p2cwrite,   File "/build/toolchain/mac32/python-2.4.3/lib/python2.4/subprocess.py", line 830, in _get_handles     p2cread = stdin.fileno() AttributeError: 'cStringIO.StringI' object has no attribute 'fileno'   Apparently a cStringIO.StringIO object doesn't quack close enough to a file duck to suit subprocess.Popen.  How do I work around this? Algebraic proof of $\sum_{i=0}^k{{n \choose i}{m \choose {k-i}}}= {{m+n}\choose k}$ I can't figure out an algebraic proof for the following identity:  $$\sum_{i=0}^k{{n \choose i}{m \choose {k-i}}}= {{m+n}\choose k}$$  Combinatorical solution:  We can see that as choosing some from $n$ and the rest of $k$ from $m$, thus $k$ in total.  Or we could just choose $k$ from the union. Very strange error suddenly appeared running Biber I am on a Mac with MacTex 2020 and ran into a strange problem with Biber. Working on a document all was fine, I did not change the bibliography (says my git) and only fixing typos (not even adding cites) and suddenly latexmk stopped working after a Biber run, while that looked like  INFO - This is Biber 2.14 INFO - Logfile is 'doc.blg' INFO - Reading 'doc.bcf' INFO - Found 31 citekeys in bib section 0 INFO - Processing section 0 INFO - Globbing data source 'literature.bib' INFO - Globbed data source 'literature.bib' to literature.bib INFO - Looking for bibtex format file 'literature.bib' for section 0 INFO - LaTeX decoding ... INFO - Found BibTeX data source 'literature.bib'   so harmless in my view. Then with --debug I additionally get in the end.  INFO - LaTeX decoding ... warning: overriding existing definition of macro "jun" warning: overriding existing definition of macro "jul" warning: overriding existing definition of macro "sep" warning: overriding existing definition of macro "jan" [...] warning: overriding existing definition of macro "nov" INFO - Found BibTeX data source 'literature.bib' Unicode::UCD: failed to find unicore/version in /var/folders/hm/gt63cn0j2r7bwbzw7c1hww1r0000gn/T/par-626572676d616e6e/cache-2f8a664c3c933a44d096bcc8d018a5e92bced897/inc/lib /var/folders/hm/gt63cn0j2r7bwbzw7c1hww1r0000gn/T/par-626572676d616e6e/cache-2f8a664c3c933a44d096bcc8d018a5e92bced897/inc CODE(0x7fd026aeb5a8) CODE(0x7fd026aebb90) at /var/folders/hm/gt63cn0j2r7bwbzw7c1hww1r0000gn/T/par-626572676d616e6e/cache-2f8a664c3c933a44d096bcc8d018a5e92bced897/inc/lib/Biber/Input/file/bibtex.pm line 1011.   It seems unrelated to the library itself since deleting a few entries (going through deleting one half, then the other), the problem persists. It does not happen for an empty literature, but as soon as a first entry is added (just author/journal/title/year/volume/pages - no utf8-only chars) this error message appears.  what does this last error message mean?  How can I solve this? What is that component from the ADP5091 Schematic? I am looking for an explanation what that component does inside of that circuit.  It can be found on page 3 of the Datasheet of ADP5091:   It would help me out a lot. Thank you in advance! Found the alternative form: $\sum _{k=1}^\infty ((1-\frac{1}{k})^{k})^k$. Tried various criteria, no luck so far. Where do students who don't get into Hogwarts go? infinite monoid H that is not a free monoid and contains a free monoid as a submonoid Let $H= \langle h_1, \ldots , h_n \rangle$ ($n&gt;1$) be an infinite monoid that is not a free monoid. Does $H$ contain an isomorphic copy of a free monoid as a submonoid? EDIT. It is a natural question. The corresponding question for groups is the Burnside problem. I want to find questions within the C++ tag but with zero answers. How can I do that? If $f:\mathbb{R}\to\mathbb{R}$ is continuous and $$\lim_{x\to\infty}f(x)=\lim_{x\to-\infty}f(x)=\infty$$  Prove that $f$ has a minimum on $\mathbb{R}$; that is, there is an $x_m\in\mathbb{R}$ such that $$f(x_m)=\inf_{x\in\mathbb{R}}f(x)&lt;\infty$$  I think the best approach would be to prove the existence of a lower bound, that is $\exists M\in\mathbb{R}:M&lt;f(x),\forall x\in\mathbb{R}$, but I don't know how to do this. I am probably supposed to use the extreme value theorem or the intermediate value theorem, but I don't know how to do that. Obviously, this suggested edit should never have been approved. Because it's very, very minor.  Is it acceptable for me to "rollback" this edit? Does the suggested editor lose the +2 rep when I roll it back? Should I comment on one of his questions, explaining not to make too minor edits like this?  Is there anything I should do to notify the reviewers that approved  too minor suggested edit? How to get the current date/time in Java How to pass parameters to an alias? Is there any way to distribute spacing equally in every object?    Is there any option to do? I want 2MM spacing in every geometrical shape.  Thanks in advance. I am considering buying my first DSLR.  How do I know whether I need a 18-200 lens, 17-85, or 18-55? Or something else? Where did they go / do they went? Where did they go?   Where do they went?   Can you please advise which of above forms is correct?  I'm pretty sure that first one is fine but wondering about second one.   Can I use a second form as well or it's incorrect? Repeating "to" and "will" in enumerations of verbs Should I use the second "will" in constructions like this one: "it will definitely help you and will make the text more readable"  And should I write "to" before every infinitive in enumeration, or only before the first one, e.g. "it helps to develop and test" or "it helps to develop and to test"? Could this example be influenced by the fact that "help" can go with to-invinitive and bare infinitive, and with other verbs the rule would be different?