I have simple requirement to insert number of Accounts. Now what I noticed to call the following I have to pass SOQL which is irrelevant since there will be no use of the result of this query  Please suggest how can I call batch apex without passing SOQL.  Database.executeBatch(new BatchAccountsProcess('Select id from Account limit 1'));   global class BatchAccountsProcess .... {    global BatchAccountsProcess(String qryStr)  {      Query = qryStr;  }    global Database.QueryLocator start(Database.BatchableContext BC)  {      return Database.getQueryLocator(query);  }  global void execute(Database.BatchableContext BC,List&lt;sObject&gt; scope)  {        for(integer iAcc = 0 ;iAcc &lt; 5000 ; iAcc++) {         Account accObj =  new Account(name='Arijit_batch_'+iAcc);         lstAccount.add(accObj);     }                Database.insert(lstAccount);   }   }
I had one batch class in which i am passing some data required for creating object record.But when i call that batch class from parent class variables are initialized but start method are not called as there is no record to query i also tried with iterable object but not able to do that.My code is as below  global class testBatchClass implements Database.Batchable&lt;SObject&gt;,Database.Stateful{     public List&lt;sObject&gt; sObjectList;     public string objectName;     public String dataList;      public testBatchClass(String objectName,String inputdata){          String listType = 'List&lt;'+objectName+'&gt;';         system.debug('list type value is'+listType);         List&lt;SObject&gt; castRecords = (List&lt;SObject&gt;)Type.forName(listType).newInstance();         this.sObjectList = castRecords;         this.objectName = objectName;         this.dataList = inputdata;      }     global Iterable&lt;SObject&gt; start(Database.BatchableContext batchableContext) {         return new sObjectList{};     }     global void execute(Database.BatchableContext batchableContext, List&lt;sobject&gt; scope){          List&lt;OpportunityRenewal__mdt&gt; mdtList = new List&lt;OpportunityRenewal__mdt&gt;([Select id,Api_Name_of_Fields__c,Sobject_Name__c from TestFileUploadCustomSetting1__mdt where Sobject_Name__c=:objectName]);         List&lt;String&gt; fieldName = new List&lt;String&gt;();         for(OpportunityRenewal__mdt md : mdtList){             if(md.Sobject_Name__c == objectName){                 fieldName = md.Api_Name_of_Fields__c.Split(',');                 break;             }         }         List&lt;String&gt; dataRowsSplit= dataList.split(',');         dataRowsSplit.remove(0);         for(String eachRow: dataRowsSplit){             List&lt;String&gt; splitString = eachRow.Split(',');             sObject sobj = Schema.getGlobalDescribe().get(objectName).newSObject();             for(Integer i=0; i &lt;= splitString.Size(); i++){                 sobj.put(fieldName[i],splitString[i]);             }             scope.add(sobj);         }         if(scope != Null &amp;&amp; scope.Size() &gt; 0){             upsert scope;         }     }      global void finish(Database.BatchableContext batchableContext) {} }   Thanks
How to redirect entire phone traffic (including all apps) to a proxy (with out rooting the phone)  We are developing a parental control app for Android, in that we have requirement to capture all out going traffic from Android phone for categorization. Is there a way to achieve this in Android with out rooting the phone.  Thanks, Gopi. Example of vector space such that $cv = 0$ where $c \ne 0$ and $v \ne \vec{0}$ Is there an example of a vector space $V/F$ such that $0 \ne c \in F$, $\vec{0} \ne v \in V$, but $c \cdot v = 0 $?  I couldn't think of an example. Show that one-sided limits always exist for a monotone function (on an interval) Show that one-sided limits always exist for a monotone function on an interval $[a,b]$.  Me attempt:  1) If a function is monotone on an interval $[a,b]$, then $f(a)\le f(x) \le f(b)$ for $x\in[a,b]$. Therefore if there exists left-hand (right-hand) limit of this function at a given point, then it must be finite. Now we must show that a both left-hand and right=hand limits exist. We use the fact that if we take a sequence $(x_n)\rightarrow c^{+} \in [a,b]$ then $f(x_n)$ is bounded and monotone and therefore it is convergent. Ubuntu Server 20.04 Nvidia Driver Dependencies I had a hard time installing Nvidia drivers in a fresh install of Ubuntu 20.04.  Installing via sudo apt install nvidia-driver-430 resulted in a list of 542 packages to install.  I ended up spending a bit of manual effort to get the Nvidia-provided driver installed without nearly so many dependencies (only had to install gcc and make).  Is this massive number of dependencies normal for Ubuntu Server?  I did a very vanilla install without the GUI.  Reddit suggested I ask here, as their opinion is that I should just install from the default repos, but I felt that so many packages was absurd just to install a driver.  Edit for clarity: installing the nvidia-driver-430 package appears to install the entire Gnome shell, which I feel is unnecessary on a server. How to re-index the values of an array in PHP? Irreducible Components of the Prime Spectrum of a Quotient Ring and Primary Decomposition Which way is up? (electric outlet) My house has electric outlets in both orientations.  Which one is correct?  Should the ground hole be at the bottom or the top?    OR I got  question in review. First sentence is:     I know there is a  question, but no answers.   And indeed the two questions are virtually identical. I started to flag as duplicate - but the original question had no answer at the time, so it wouldn't be correct and apparently . (I didn't go so far as to try to submit the flag).  What is the proper action here? How do we want such a question to be handled? Should both (or more) questions stay open indefinitely until either is answered and somebody gets the good idea to do the duplicate linking?   As the new question is essentially a bump to the front page (perhaps with re-tagging), especially in the case where the OP knows that a previous question exist, perhaps something should be done to enable bumping re-emphasizing without writing the new question.  As I wrote this,  actually got an answer. So the old one should now be closed as a duplicate of the new - but my question remains for the case where all known/found duplicate questions have no answer?  Ironically, just before asking this, the "Questions that may already have your answer" gave me ... (Although the suggestion has no answer). So it has been asked before - the comment there even suggest the ability to re-emphasize. How do I build a loop in JavaScript? How can I build a loop in JavaScript? Does SOQL join not respect OWD /sharing settings? A->B are two objects connected using lookup relationships. If somehow, I get read only access to child record but do not have access on parent record then still i am able to see data from parent record through formula fields. Similarly will SOQL in Apex also allow me to fetch fields from parent record regardless of using 'WITH Sharing ' keyword at class level? Windows 7, any way to sort folders and files all mixed together? Is there a way to sort folders and files by their name all mixed together in Windows 7?  It would be easier to understand if you .  I want my folders and files arranged like the BEFORE situation of the first screenshot.  If there is no way to do that with Windows Explorer, is there any file management programs that I should try?  I've already tried Total Commander. Variance of dot product When reading a proof I came across the following step:  $$\operatorname{Var}(x^Ty) = x^T\operatorname{Var}(y)x$$ $x$ and $y$ are column vectors. How can you derive this? Prove $\sin^2\theta + \cos^2\theta = 1$ How do you prove the following trigonometric identity: $$ \sin^2\theta+\cos^2\theta=1$$  I'm curious to know of the different ways of proving this depending on different characterizations of sine and cosine. Is there a fairly simple way to divide a circle into equal parts using Adobe Illustrator CC? How can PPAs be removed? I've added many PPAs using the add-apt-repository command. Is there a simple way to remove these PPAs? I've checked in /etc/apt/sources.list for the appropriate deb lines but they aren't there.   This is on a server system so a command line solution would be great! $M + N$ and $M \cap N$ are finitely generated $A$-modules implies $M$ and $N$ finitely generated using exact sequences Let $0 \to M_1 \to M \to M_2 \to 0$ be an exact sequence of $A$-modules.  i) Prove: If $M_1$ and $M_2$ are finitely generated, then $M$ is too.  ii) Let $M$ and $N$ be sub-modules of an $A$-module $L$. Assume that $M+N$ and $M\cap N$  are finitely generated $A$-modules. Prove that $M$ and $N$ are finitely generated $A$-modules.  If have proved the first part, but i don't see how to do the second part. I tried to use the first part, so to find an exact sequence with $M$ in the middle and finitely generated modules in place of $M_1$ and $M_2$, but I can't find a surjective map $M \to P$ (for some f.g. $A$-module) in the sequence:  $$0 \to M\cap N \to M \to P \to 0$$  any hints/help would be appreciated. How variance is defined? Block network access of a process? Is it possible to block the (outgoing) network access of a single process? 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. What is recursion and when should I use it? One of the topics that seems to come up regularly on mailing lists and online discussions is the merits (or lack thereof) of doing a Computer Science Degree. An argument that seems to come up time and again for the negative party is that they have been coding for some number of years and they have never used recursion.  So the question is:   What is recursion? When would I use recursion? Why don't people use recursion?