package com.example.shubhraj.notesp;  import android.content.Context; import android.database.Cursor; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.CursorAdapter; import android.widget.SimpleCursorAdapter; import android.widget.TextView;  import com.example.shubhraj.notesp.data.NoteContract.NoteEntry;  /**  * {@link NoteCursorAdapter} is an adapter for a list or grid view  * that uses a {@link Cursor} of pet data as its data source. This adapter knows  * how to create list items for each row of pet data in the {@link Cursor}.  */ public class NoteCursorAdapter extends CursorAdapter {      /**      * Constructs a new {@link NoteCursorAdapter}.      *      * @param context The context      * @param c       The cursor from which to get the data.      */     public NoteCursorAdapter(Context context, Cursor c) {         super(context, c,0);     }     /**      * Makes a new blank list item view. No data is set (or bound) to the views yet.      *      * @param context app context      * @param cursor  The cursor from which to get the data. The cursor is already      *                moved to the correct position.      * @param parent  The parent to which the new view is attached to      * @return the newly created list item view.      */     @Override     public View newView(Context context, Cursor cursor, ViewGroup parent) {         // Inflate a list item view using the layout specified in list_item.xml         LayoutInflater inflater = LayoutInflater.from(context);         return inflater.inflate(R.layout.fragment_note_list, parent, false);         //return LayoutInflater.from(context).inflate(R.layout.fragment_note_list, parent, false);     }      /**      * This method binds the pet data (in the current row pointed to by cursor) to the given      * list item layout. For example, the name for the current pet can be set on the name TextView      * in the list item layout.      *      * @param view    Existing view, returned earlier by newView() method      * @param context app context      * @param cursor  The cursor from which to get the data. The cursor is already moved to the      *                correct row.      */     @Override     public void bindView(View view, Context context, Cursor cursor)     {         // Find individual views that we want to modify in the list item layout         TextView nameTextView = (TextView) view.findViewById(R.id.note);          // Find the columns of pet attributes that we're interested in         int nameColumnIndex = cursor.getColumnIndex(NoteEntry.COLUMN_NOTE_CONTENT);          // Read the pet attributes from the Cursor for the current pet         String noteContent = cursor.getString(nameColumnIndex);          // Update the TextViews with the attributes for the current pet         nameTextView.setText(noteContent);     } }   EXCEPTION:-FATAL EXCEPTION: main                                                                                  Process: com.example.shubhraj.notesp, PID: 22020                                                                           java.lang.NullPointerException at com.example.shubhraj.notesp.NoteCursorAdapter.bindView(NoteCursorAdapter.java:70) The error is showing at nameTextView.setText(noteContent);
129
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
9399
I make that script (Copy a piece from template UIList) Now i can draw My box with inside the active object material but i want to populate that with all material in scene, i not undertand , how to. Part of my script:  class MATERIAL_UL_extreme_matslot(bpy.types.UIList):      def draw_item(self, context, layout, data, item, icon, active_data, active_propname):         ob = data         slot = item         ma = slot.material          if self.layout_type in {'DEFAULT', 'COMPACT'}:             if ma:                                layout.prop(ma, "name", text= "", emboss=False, icon_value=icon)             else:                                layout.label(text="", translate=False, icon_value=icon)                 elif self.layout_type in {'GRID'}:                      layout.alignment = 'CENTER'                     layout.label(text="", icon_value=icon)   Then for draw in panel:  class MY_PT_Panel(bpy.types.Panel):      bl_label = "My label"     bl_idname = "MY_ID_NAME"     bl_space_type = "VIEW_3D"     bl_region_type = "UI"     bl_category = "My Category"     def draw(self, context):      def draw(self, context):          obj = context.object           layout = self.layout         row = layout.row()         row.template_list("MATERIAL_UL_extreme_matslot", "", obj, "material_slots", obj, "active_material_index")   Im not sure if that is the best solution because i want to select material slot from that UIList panel.
17824
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
56910
The function of this apex code is when Account has no Contacts the first contact created become the primary contact and when there is existing primary contact it cannot assign a other primary contact on account. Please help to optimized my code to easy understand.Thanks for the help.  public class CreatePrimaryContactHandler {     public static void createPrimary(List&lt;Contact&gt; contactList)     {        Set&lt;Id&gt; accountId = new Set&lt;Id&gt;();         for(Contact c : contactList)         {             accountId.add(c.AccountId);         }         List&lt;Contact&gt; allContact = [SELECT Id, Account.Id, Primary_Contact__c FROM Contact WHERE (Account.Id IN : accountId)];         Map&lt;Id, List&lt;Contact&gt;&gt; acctContactMap = new Map&lt;Id, List&lt;Contact&gt;&gt;();             for(Id aId : accountId)             {              List&lt;Contact&gt; conList = new List&lt;Contact&gt;();                 for(Contact allcont : allContact)                 {                     if(allcont.AccountId == aId)                     {                     conList.add(allcont);                     }                 }                 acctContactMap.put(aId, conList);             }             for(Id accId : acctContactMap.keySet())             {                 Integer count = 0;                 for(Contact c : contactList)                 {                     if(c.AccountId == accId &amp;&amp; c.Primary_Contact__c)                     {                         count++;                     }                 }                 if(count &lt;= 1)                 {                     List&lt;Contact&gt; cList = acctContactMap.get(accId);                     Contact primary;                     Boolean isPrimary = false;                     for(Contact cont : cList)                     {                         if(cont.Primary_Contact__c)                         {                             isPrimary = true;                         }                     }                     for(Contact cont : contactList)                     {                         if(cont.AccountId == accId)                         {                             if(cont.Primary_Contact__c)                             {                                 if(primary != null)                                 {                                     primary.Primary_Contact__c = false;                                      isPrimary = false;                                 }                                 else if(isPrimary)                                 {                                 cont.addError('Invalid Primary Contact. This Account has already an existing Primary Contact.');                                 }                                     else                                     {                                         cont.Primary_Contact__c = true;                                         isPrimary = true;                                     }                             }                                    else if(!isPrimary)                                 {                                     cont.Primary_Contact__c = true;                                     isPrimary = true;                                     primary = cont;                                 }                         }                     }                 }                 else                 {                     contactList.get(0).addError('Invalid Primary Contact. This Account has already an existing Primary Contact.');                 }         }       } }   This is the Trigger  trigger CheckPrimaryContact on Contact (before insert,after update,before update){     if(trigger.IsInsert &amp;&amp; trigger.IsBefore){         CreatePrimaryContactHandler.createPrimary(trigger.new);     }     if(trigger.IsBefore &amp;&amp; trigger.IsUpdate){         CreatePrimaryContactHandler.createPrimary(trigger.new);     } }
111890
I am a complete JSP beginner.  I am trying to use a java.util.List in a JSP page.  What do I need to do to use classes other than ones in java.lang?
96271
I have a requirement for a custom app I am building to open an attachment on the parent record in a new window on create of a child record.  I have parent object Quality_Assessment__c with child object Chart_Review__c. Quality_Assessment__c has a PDF attached to it in the Notes &amp; Attachments section. When a user clicks to create a new Chart_Review__c record I need to have the PDF attachment on the Quality_Assessment__c record open in a new tab as well as the record create page for the Chart_Review__c record. Looking for help in generating the needed javascript for a custom button to accomplish this.  The 'Quality_Assessment__c' record will have a PDF file attached to it prior to the user clicking the 'New Chart Review' button.  My use case is to have users open the 'Quality_Assessment__c' record and perform what we call a Chart Review. To perform the Chart Review the user would click on a custom button called 'New Chart Review' which would do two things.   create a new 'Chart_Review__c' record displaying the new record edit page  open the PDF attachment from the related 'Quality_Assessment__c' record.    Preferably on click of the button the new record page would open in existing tab and a new tab with the PDF would open simultaneously.
73868
I need help. I am currently trying to test this code before uploading  public class CoreValuesExt { ApexPages.StandardController sc; public boolean readonly {get; set;} public Core_Values__c cv {get; set;} public integer countEdit = 1; public string buttonValue {get; set;} public integer recordScan;  public CoreValuesExt(ApexPages.StandardController sc) {     this.sc = sc;     cv = new Core_Values__c();     cv.Account__c = sc.getid();      readonly = true;     buttonValue = 'Edit';     recordScan = [SELECT COUNT() FROM Core_Values__c WHERE Account__c = :cv.Account__c];    if (recordScan != 0){    cv = [SELECT id, HSE__c, Professionalism_Integrity__c, Quality_Accuracy__c, Technology_Innovation__c, Timeliness__c, Value_for_money__c FROM Core_Values__c WHERE Account__c = :cv.Account__c];     }  }  public ApexPages.PageReference Save() {     return sc.Save(); }  public void ApplyAction() {     countEdit++;     Integer modolus = Math.mod(countEdit, 2);     String total = cv.HSE__c + cv.Professionalism_Integrity__c + cv.Quality_Accuracy__c + cv.Technology_Innovation__c + cv.Value_for_Money__c + cv.Timeliness__c;     if(modolus == 0)     {         readonly = false;         buttonValue = 'Save';     }     else     {         if(total != 'nullnullnullnullnullnull')            {         if (recordScan == 0){         insert cv;         readonly = true;         buttonValue = 'Edit';         }         else         {         update cv;         readonly = true;         buttonValue = 'Edit';         }         }     }    }   }  With this trigger.  trigger CoreValuesTrigger on Core_Values__c (before insert) {  Core_Values__c cvs = Trigger.new; CoreValuesExt.ApplyAction(cvs);  }   But when I try to save, I get a message saying:      Illegal assignment from List to   CoreValuesExt__Core_Values__c at line 3 column 1   "  How do I go through with this? I need help. Thanks
109534
I am trying to write a test class.  My Apex class has the following constructor:  public NController(ApexPages.StandardController controller) {      cas =  (Case) controller.getRecord();     csId = cas.Id;     owner = cas.OwnerId;      N_SSettings__c nhdsms = N_SSettings__c.getValues('Int');     rate=nhdsms.Rate_Code__c;     accId=nhdsms.Acc_Id__c;  }   Here N_SSettings__c is a custom settings which has two fields Rate_Code__c and Acc_Id__c. It has a record called 'Int' with both Rate_Code__c and Acc_Id__c field values populated.  I am using the following test class method:  @isTest public class NHSsendSMSController_Test {     public static testMethod void NHSsendSMSControllerTest()     {         Case caseObj = new Case();         insert caseObj;         ApexPages.StandardController sc = new ApexPages.standardController(caseObj);         NController nControllerObj = new NController(sc);         nControllerObj.methodName();     } }   When I run the test method, it is throwing a null pointer exception on the line :  rate = nhdsms.Rate_Code__c;   The custom setting is definitely present with the required values of both the fields of Int.
11092
\documentclass[oneside,12pt]{article} \usepackage{geometry} \usepackage{microtype} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern}  \usepackage{enumitem} \setlist[enumerate,1]{label=\bfseries\Alph*,align=left,leftmargin=*,   labelsep=1.5em} \setlist[enumerate,2]{label=\arabic*.,labelindent=1em,labelsep=1.5em,   leftmargin=*}  \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm} \theoremstyle{definition} \newtheorem*{sol}{Solution}  \usepackage{forest} \forestset{   ass/.append style={     before computing xy={l=\baselineskip},     no edge   },   prooftree/.style={     for tree={       child anchor=north,       parent anchor=south     }   } }  \begin{document} \subsection*{Exercises 29} \begin{enumerate} \item Use QL trees to evaluate the entailment claims (1) to (10) in Exercises   28A.   \begin{enumerate}   \item $\forall x(Fx\supset Gx)\vDash\forall x(Gx\supset Fx)$      \begin{forest}       prooftree       [$\forall x(Fx\supset Gx)$       [$\neg\forall x(Gx\supset Fx)\checkmark$,ass       [$\exists x\neg(Gx\supset Fx)\checkmark$,ass       [$\neg(Ga\supset Fa)\checkmark$,ass       [$Ga$,ass       [$\neg Fa$,ass       [$(Fa\supset Ga)\checkmark$,ass       [$\neg Fa$] [$Ga$]]]]]]]]     \end{forest}      $\neg Fa$ and $Ga$ make the premisses and the negation of conclusion true.     Thus, the entailment is invalid.   \item $\forall x(Fx\supset Gx)\vDash\forall x(\neg Gx\supset\neg Fx)$      \begin{forest}       prooftree       [$\forall x(Fx\supset Gx)$       [$\neg\forall x(\neg Gx\supset\neg Fx)\checkmark$,ass       [$\exists x\neg(\neg Gx\supset\neg Fx)\checkmark$,ass       [$\neg(\neg Ga\supset\neg Fa)\checkmark$,ass       [$\neg Ga$,ass       [$\neg\neg Fa$,ass       [$(Fa\supset Ga)\checkmark$,ass       [$\neg Fa$ [*,ass]] [$Ga$ [*,ass]]]]]]]]]     \end{forest}      Since the tree closes, the entailment is valid.   \item $\forall x\exists yLxy\vDash\forall y\exists xLyx$      \begin{forest}       prooftree       [$\forall x\exists yLxy$       [$\neg\forall y\exists xLyx\checkmark$,ass       [$\exists y\neg\exists xLyx\checkmark$,ass       [$\neg\exists xLax\checkmark$,ass       [$\forall x\neg Lax$,ass       [$\exists yLay\checkmark$,ass       [$Lab$,ass]]]]]]]     \end{forest}      \begin{forest}       prooftree       [$\neg Lab$,ass [*,ass]]     \end{forest}   \item $\forall x((Fx\wedge Gx)\supset Hx)\vDash\forall     x(Fx\supset(Gx\supset Hx))$   \item $(\forall xFx\vee\forall xGx)\vDash\forall(Fx\vee Gx)$   \item $\forall x(Fx\supset Gx),\forall x(\neg Gx\supset Hx)\vDash     \forall x(Fx\supset\neg Hx)$   \item $\exists x(Fx\wedge Gx),\forall x(\neg Hx\supset\neg Gx)\vDash     \exists x(Fx\wedge Hx)$   \item $\forall x\exists y(Fy\supset Gx)\vDash\forall y\exists x(Gx\supset     Fy)$   \item $\forall x\forall y(Lxy\supset Lyx)\vDash\forall xLxx$   \item $\forall x(\exists yLxy\supset\forall zLzx)\vDash\forall x\forall y     (Lxy\supset Lyx)$   \end{enumerate} \end{enumerate} \end{document}   Usually, I have to manually split a forest tree into two to emulate page breaking in a forest tree. However, the second tree doesn't vertically align with the first as in the picture below. How can I vertically align them together? @cfr
17059
Consider the following minimal example:  \documentclass{article}  \setlength{\parindent}{0mm}  \usepackage{paralist} \usepackage{tabto}  \begin{document}  \NumTabs{3} \begin{inparaenum} \item text \tab\item text \tab\item text \tab\item text \tab\item text \tab\item text    \end{inparaenum}  \end{document}   Which results in:    It does exactly what I want, but I was wondering whether it was possible to create an environment, say tabbedEnum so that we can eliminate the use of the \tab, in particular, that the first case doesn't need a tab but all others do. Something of the form:   \begin{tabbedEnum}[3] \item text \item text \item text \item text \item text \item text \end{tabbedEnum}
15466
&lt;apex:page standardController="Employee__c" extensions="testPage" id="p"&gt; &lt;apex:form id="f"&gt;        &lt;div&gt;         &lt;input type="radio" name="acc" value="Existing" checked="checked"                 onclick="show(true, false);"&gt;Existing&lt;/input&gt;         &lt;input type="radio" name="acc" value="NEWAcc"                 onclick="show(false, true);"&gt;New&lt;/input&gt;     &lt;/div&gt;     &lt;apex:pageBlock id="pb1" title="Pg Block 1"&gt;     &lt;apex:pageBlockButtons &gt;  &lt;apex:commandButton value="save" action="{!saving}"/&gt;    &lt;/apex:pageBlockButtons&gt;     &lt;apex:pageBlockSection columns="1"&gt;    &lt;apex:inputField value="{!pme.Name}" /&gt;    &lt;apex:inputField value="{!pme.Address__c}"/&gt;       &lt;apex:inputField value="{!pme.Phone__c}"/&gt; &lt;apex:inputField value="{!pme.type__c}"/&gt;     &lt;/apex:pageBlockSection&gt;     &lt;/apex:pageBlock&gt;     &lt;apex:pageBlock id="pb2" title="Pg Block 2"&gt;     &lt;apex:pageBlockButtons &gt;  &lt;apex:commandButton value="save" action="{!saving}"/&gt;   &lt;/apex:pageBlockButtons&gt;     &lt;apex:pageBlockSection columns="1"&gt;    &lt;apex:inputField value="{!pme.Name}" /&gt; &lt;apex:inputField value="{!pme.Job_Title__c}"/&gt;    &lt;apex:inputField value="{!pme.Salary__c}"/&gt;    &lt;apex:inputField value="{!pme.type__c}"/&gt;     &lt;/apex:pageBlockSection&gt;     &lt;/apex:pageBlock&gt; &lt;/apex:form&gt;    &lt;script&gt; function show(showPb1, showPb2) {     // Match Visualforce's prefixing pattern     document.getElementById('p:f:pb1').style.display = showPb1 ? 'block' : 'none';     document.getElementById('p:f:pb2').style.display = showPb2 ? 'block' : 'none'; } show(true, false); &lt;/script&gt; &lt;/apex:page&gt;   Controller  public with sharing class testPage { public string Existing{get; set;} public string NEWAcc{get; set;} public Boolean radioexisting{get; set;} public Boolean radionew{get; set;} public Employee__c pmepme{get;set;} List&lt;SelectOption&gt; ownershipValues;     public Employee__c emp{get;set;}     public Employee__c pme{get;set;}     public Employee__c emplist{get;set;}     public String var {get;set;}         public boolean editSection {get;set;}          public testPage(ApexPages.StandardController controller) {         radioexisting=true;         radionew=false;             Employee__c emp=new Employee__c();             pme=(Employee__c )controller.getRecord();             editSection =true;             var= ApexPages.currentPage().getParameters().get('Id');              system.debug('erecrrrtrtrt');                  system.debug('erecrrrtrtrt'+NEWAcc);             if(var!=null){             emplist=[select Name,Address__c,Phone__c,Job_Title__c,Salary__c,type__c  From Employee__c where id=:var];             }             }          public PageReference saving(){                         system.debug('erecrrrtrtrt'+Existing);                  system.debug('erecrrrtrtrt'+NEWAcc);             upsert pme;             PageReference p=new PageReference ('/'+pme.id);             p.setRedirect(true);             return p;             }     public PageReference pbBlockRender() {     return null;     }     public PageReference EdittheSection (){ editSection = true; PageReference pf=new PageReference('https://c.ap2.visual.force.com/apex/test6');  pf.setredirect(true); return pf;           }      public String mypbBlock { get; set; } }   iam getting the following please help to fix it     System.SObjectException: SObject row was retrieved via SOQL without   querying the requested field: Employee__c.Name
21759
I have a Visualforce page that renders perfectly as a PDF that I'd like to attach to an opportunity record and to attach to an email.  Whenever the code gets to getContent(), I keep getting an error saying      Too many nested getContent calls   Below, you can see the code is very simple.  Just pulls data to fit into the VF page in the substitution blanks then tries to create the PDF.  Looking at the debug log, the call to getContent() only happens once.  I'm stumped!  Thanks for your ideas...  public with sharing class GenerateThankYouLetterAsPDF {   // a handful of fields that are {!field} substitutions on the VF page     public id oppID {get; set;}     public string giftAmount {set; get;}     public string giftDate {set; get;}     //  etc...       public GenerateThankYouLetterAsPDF() {         id oppID = id.valueof( ApexPages.currentPage().getParameters().get('id') );               // set the values of field substituions           string filename = 'donation.pdf';          // Generate the PDF          PageReference pdf = ApexPages.currentPage();         system.debug ('calling getContent...');         blob b = pdf.getContent();   }                 }
70423
I have a list of Line_item__c which is storing my line items as  List&lt;Line_Item__c&gt; toInsertList = new List&lt;Line_Item__c&gt;();   I am inserting these records in database using the below statement :  List&lt;Database.Saveresult&gt; insertResults=Database.insert(toInsertList, false);   Now the result is stored in insertResults which is of Database.Saveresult type but i want the result in a list of Line_Item__c. How do i do this. If anyone has a idea, it will be of great use.
112290
This code throws a NullReferenceException when it calls ExecuteScalar:  selectedPassengerID = 0;  //SqlCommand command = GenericDataAccess.CreateCommand();   // 2nd test string connectionString = ""; SqlConnection conn;  connectionString = ConfigurationManager.     ConnectionStrings["ConnST-MHM"].ConnectionString; conn = new SqlConnection(connectionString); SqlCommand command = new SqlCommand(); command.CommandType = CommandType.StoredProcedure ; command.Connection = conn; command.CommandText = "SearchForPassenger";  SqlParameter param;  param = command.CreateParameter(); param.ParameterName = "@name"; param.Value = pName; // Session[""]; param.DbType = DbType.String; command.Parameters.Add(param);  param = command.CreateParameter(); param.ParameterName = "@flightDate"; param.Value = date;  param.DbType = DbType.String; command.Parameters.Add(param);  param = command.CreateParameter(); param.ParameterName = "@ticketNo"; param.Value = ticketNumber;  param.DbType = DbType.Int32; command.Parameters.Add(param);  int item;  command.Connection.Open(); item = (int)command.ExecuteScalar();
122089
I try to add an item to my sharepoint list from a custom web part. Is there any mistake in my code?  [WebMethod]         public static string AjouterDemande()         {             SPList ListeDemandeConge = SPContext.Current.Site.RootWeb.Lists["DEMANDE CONGÉ"];             SPListItem ListItem = ListeDemandeConge.Items.Add();             ListItem["CODE"] = code;             ListItem["DEMANDEUR"] = Utilisateur.LoginName;             ListItem["DATE DEMANDE"] = DateTime.Today.Date;             ListItem["DATE FIN"] = EndDateD;             ListItem["DATE DEPART"] = StartDateD;             ListItem["DUREE"] = int.Parse(DayCount);             ListItem["PREMIER RESPONSABLE"] = Employe.FirstSuperior.LoginName;             ListItem["DEUXIEME RESPONSABLE"] = Employe.SecondSuperior.LoginName;             ListItem["PRESENCE PRES"] = Boolean.Parse(FirstRespPresent);             ListItem["SOLDE CONGE"] = Conge.SoldeAnneeConge;             ListItem["MOIS"] = int.Parse(StartDateTab[1]);             ListItem["ANNEE"] = int.Parse(StartDateTab[0]);             ListItem["JOURS APPROUVEES"] = 0;             ListItem.Update();             ListeDemandeConge.Update();             return "true";          }   When I use F10 to process debugging step by step and get to my listitem.update(), it went out without giving any error.
20064
I have written below Wrapper class.  global class BI_VA_AutomationWrapper {      global class BI_VA_AutomationRequest {      webservice String userName;     webservice String emailId;     webservice String buinessUnit;     webservice String orgName;     webservice String country;     webservice String environment;     webservice String myShopNumber;     webservice String BidsId;//for testing     webservice String Type; //for testing  }  global class BI_VA_AutomationResponse {      webservice String responseStatus;     webservice String myShopNumber;     //webservice list&lt;Error&gt; errorMessages;     webservice String  errorMessages;//for testing   } global class BI_VA_Error {      webservice String type;     webservice String message;    }}   And test class is,  @isTest public class BI_VA_AutomationWrapperTestClass  { public static testMethod void unitTest(){      BI_VA_AutomationWrapper.BI_VA_AutomationRequest wrap= new BI_VA_AutomationWrapper.BI_VA_AutomationRequest();        wrap.userName='Test@test.com';     wrap.emailId='Test@test11.com';     wrap.buinessUnit='AH';     wrap.orgName='ORD';     wrap.country='US';     wrap.environment='QA';     wrap.myShopNumber='123456789';     wrap.BidsId='123';     wrap.Type='ResetPassword';              BI_VA_AutomationWrapper.BI_VA_AutomationResponse res= new BI_VA_AutomationWrapper.BI_VA_AutomationResponse();     res.responseStatus = 'Success';     res.myShopNumber = '987654321';     res.errorMessages = 'Test error';      BI_VA_AutomationWrapper.BI_VA_Error error = new BI_VA_AutomationWrapper.BI_VA_Error();     error.type = 'Test';     error.message = 'Test';  }}   Code coverage is 0% only.
54412
My code are as follows:   \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{lipsum}     \usepackage{booktabs}     \input{insbox}     \makeatletter     \@InsertBoxMargin = 12pt     \makeatother     \usepackage{nccmath}     \usepackage[showframe, nomarginpar]{geometry}     \usepackage{etoolbox} \usepackage{graphicx}     \newcommand*{\wrapitem}{\apptocmd{\labelenumi}{\hskip\leftmargin}{}{}\item\apptocmd{\labelenumi}{\hskip-\leftmargin}{}{}}     %     \newcommand{\InsertListL}[3][]{%     \setlength{\leftskip}{\leftmargin}\mbox{}\vspace*{-\baselineskip}%     \InsertBoxL{#2}{#3}[#1]\par \hspace{\itemindent}     }%     \newcommand{\InsertListR}[3][]{%     \mbox{}\vspace*{-\baselineskip}\setlength{\leftskip}{\leftmargin}%     \InsertBoxR{#2}{\hskip-\leftmargin#3\hskip\leftmargin}[#1]     }%      \begin{document}      \begin{enumerate}%      \wrapitem%     \InsertListL[2]{2}{\includegraphics{./images/c01uf006.pdf}}%     \lipsum[1]       \item     \InsertListR[12]{-40}{\includegraphics{./images/c01uf007.pdf}}     \lipsum[2]      \wrapitem%     \InsertListL[2]{2}{\includegraphics{./images/c01uf006.pdf}}%     \lipsum[1]      \end{enumerate}      \end{document}   Please suggest the below:   How can I move the wrap images vertically (upper and down movement)? How can I control unnecessary vertical white spaces?   Also, please correct any errors in coding.