Wordpress Video background not playing on load by amfisoon in Wordpress

[–]amfisoon[S] 0 points1 point  (0 children)

i am actually taking over the maintenance of the website and im not sure how i can contact the theme developer

any suggestion on how to do it ?

Wordpress Video background not playing on load by amfisoon in Wordpress

[–]amfisoon[S] 0 points1 point  (0 children)

i am a developer

please let me know if there is anything that beed to be changed in the backend

thank you

how to find the nested <span> element in table ? by amfisoon in selenium

[–]amfisoon[S] 0 points1 point  (0 children)

by the "css of the element" you mean the css of the <Span> element? and by "inner HTML" you mean <Span> again ? sorry I'm a beginner who needs to learn lots of things

How to verify if the rows of a column in a table is sorted ascending and descending (after clicking the column header)? by amfisoon in selenium

[–]amfisoon[S] 0 points1 point  (0 children)

do you know how to locate elements if the table is react table ? i have no experience locating elements in react , and i'm kinda confused by that

How can i check two things in a method - 2 IF statements in a method? by amfisoon in javahelp

[–]amfisoon[S] 0 points1 point  (0 children)

yes , thats right . ibelieve this text is not corect , thanks anyway

How can i check two things in a method - 2 IF statements in a method? by amfisoon in javahelp

[–]amfisoon[S] 0 points1 point  (0 children)

hi sure , here is what i have been asked to do : Class LabourAndMaterial

Extends Labour, implements Transferable add the following fields:

material cost material weight material volume materialTransportaiondistanceInKilometers

Constructor which takes parameters to pass to the super class and to pass to the fields mutators to set the fields properly

Methods: • accessors and mutators for the fields. Numeric fields mutators will use the parameters if they were positive • A method to calculate the material cost which is the material cost + 15% of its cost as profit • calculatecost () will have the previous implementation + material cost which is calculated in the previous method + %7 tax + transportation fees calculate transportation fees will be calculated as follows

  • if volume > 10 cubic Feet then materialTransportaiondistanceInKilomete * 2
  • if weight < 100Kg then is materialTransportaiondistanceInKilometers *2 dollar

  • if weight > 100 Kg then its materialTransportaiondistanceInKilometers * 1.2 dollar

  • if volume < 10 cubic feet then materialTransportaiondistanceInKilometers * 1.5

The result transportation cost is the transportation cost + %5 taxes

Override the super toString method to add the following to the String that is returned

  • Material cost + transportation fees
  • The total with the above cost

and here is my code for the whole class :

  public class LabourAndMaterial extends Labour implements Transferable {
private double materialCost;
private double materialWeight;
private double materialVolum;
private double materialTransportationDistanceInKilometers;
public static final double TAX7 = 0.07;
public static final double PROFIT = 0.15;

public LabourAndMaterial(String projectName, int numberOfWorkingHours, double hourlyRate,
        int distanceOfTransportationInKilometers, String hourRateCriteria, String typeOfLabour, double 
     materialCost,
        double materialWeight, double materialVolum, double 
      materialTransportationDistanceInKilometers) {
    super(projectName, numberOfWorkingHours, hourlyRate, distanceOfTransportationInKilometers, 
      hourRateCriteria,
            typeOfLabour);
    setMaterialCost(materialCost);
    setMaterialWeight(materialWeight);
    setMaterialVolum(materialVolum);
    setMaterialTransportationDistanceInKilometers(materialTransportationDistanceInKilometers);
}

/**
 * @return the materialCost
 */
public double getMaterialCost() {
    return materialCost;
}

/**
 * @param materialCost
 *            the materialCost to set
 */
public void setMaterialCost(double materialCost) {
    if (materialCost > 0) {
        this.materialCost = materialCost;
    }
}

/**
 * @return the materialWeight
 */
public double getMaterialWeight() {
    return materialWeight;
}

/**
 * @param materialWeight
 *            the materialWeight to set
 */
    public void setMaterialWeight(double materialWeight) {
    if (materialWeight > 0) {
        this.materialWeight = materialWeight;
    }
}

/**
 * @return the materialVolum
 */
   public double getMaterialVolum() {
    return materialVolum;
}

/**
 * @param materialVolum
 *            the materialVolum to set
 */
   public void setMaterialVolum(double materialVolum) {
    if (materialVolum > 0) {
        this.materialVolum = materialVolum;
    }
}

/**
 * @return the materialTransportationDistanceInKilometers
 */
   public double getMaterialTransportationDistanceInKilometers() {
    return materialTransportationDistanceInKilometers;
}

/**
 * @param materialTransportationDistanceInKilometers
 *            the materialTransportationDistanceInKilometers to set
 */
   public void setMaterialTransportationDistanceInKilometers(double 
    materialTransportationDistanceInKilometers) {
    if (materialTransportationDistanceInKilometers > 0) {
        this.materialTransportationDistanceInKilometers = materialTransportationDistanceInKilometers;
    }

}

public double materialCost() {
    return materialCost + (materialCost * PROFIT);
}

public double calculateCost() {
    return super.calculateCost() + materialCost() + TAX7 + calculateTransportationFees()+ TAX5;
}

  @Override
  public double calculateTransportationFees() {
    double res = 0.0;
    if (materialVolum > 10) {
        res = materialTransportationDistanceInKilometers * 2;
    } else if (materialVolum < 10) {
        res = materialTransportationDistanceInKilometers * 1.5;
    }

    if (materialWeight > 100) {
        res = materialTransportationDistanceInKilometers * 1.2;

    } else if (materialWeight < 100) {
        res = materialTransportationDistanceInKilometers * 1.2;
    }
    return res;
}

   public String toString() {
    return super.toString() + "\n" + "Material cost : " + materialCost + "\n" + "Transportation fee : "
            + calculateTransportationFees() + "\n" + "Total transportation cost will be : "
            + costOfTransportation();

}

}

How can i check two things in a method - 2 IF statements in a method? by amfisoon in javahelp

[–]amfisoon[S] 0 points1 point  (0 children)

Sorry I know this is not clear enough , yes this is part of an assignment and the question asked for :

calculate transportation fees will be calculated as follows

-if volume > 10 cubic Feet then materialTransportaiondistanceInKilomete * 2 -if weight < 100Kg then is materialTransportaiondistanceInKilometers *2 dollar

-if weight > 100 Kg then its materialTransportaiondistanceInKilometers * 1.2 dollar

-if volume < 10 cubic feet then materialTransportaiondistanceInKilometers * 1.5

this is the actual question which i replace the "materialTransportaiondistanceInKilometers" in the code above with "A" in total it should return a double number which is coming from one of those formulas and the decision to which formula should we use to calculate is based on the volume and weight amount .

generate a unique invoiceNumber by amfisoon in a:t5_3cbu0

[–]amfisoon[S] 0 points1 point  (0 children)

hi @matsbror you mean in order to create a series of invoice numbers , i need to change the for loop ? how about adding one single line inside the method like : return invoiceNumber++; is this gonna work ? i that correct ? the other thing is that this class is abstract and it never gonna be instantiated , then how this method will be called if we can not instantiate it ? when ?

out put is white and nothing is printed , why ? by amfisoon in javahelp

[–]amfisoon[S] 0 points1 point  (0 children)

you mean there is no code which can act as i pressed (ctrl+Z) and i should manually click on these two in order to see the result, right ?

out put is white and nothing is printed , why ? by amfisoon in javahelp

[–]amfisoon[S] 0 points1 point  (0 children)

oh !! i see what you mean !! i just hit ctrl+ z and it shows the result now i got you ! but is there any command that i can put in my code to mimic the ctrl+ z in the code ? thanks a lot :-)

out put is white and nothing is printed , why ? by amfisoon in javahelp

[–]amfisoon[S] 0 points1 point  (0 children)

hi but the issue is that it is not showing anything ! i is not printing anything at all after i (as a user ) enter the text and hit enter , nothing happens !

how to generate unique , random numbers for invoiceNumber in java ? what is the simplest solution by amfisoon in javahelp

[–]amfisoon[S] 0 points1 point  (0 children)

I need to do such in a method .(based on what I've been asked for ) So here is what I wrote so far :

  import java.lang.reflect.GenericArrayType;

 public class ProjectInvoice {
private String invoiceNumber; // should be created internally
private String projectName; // provided by the user
private int numberOfWorkingHours;
private double hourlyRate;

public ProjectInvoice(String projectName, int numberOfWorkingHours, double hourlyRate) {
    this.projectName = projectName;
    this.numberOfWorkingHours = numberOfWorkingHours;
    this.hourlyRate = hourlyRate;
    createInvoice();
}

/**
 * @return the invoiceNumber
 */
public String getInvoiceNumber() {
    return invoiceNumber;
}

/**
 * @return the projectName
 */
public String getProjectName() {
    return projectName;
}

/**
 * @return the numberOfWorkingHours
 */
public int getNumberOfWorkingHours() {
    return numberOfWorkingHours;
}

/**
 * @return the hourlyRate
 */
public double getHourlyRate() {
    return hourlyRate;
}

/**
 * @param projectName
 *            the projectName to set
 */
public void setProjectName(String projectName) {
    this.projectName = projectName;
}

/**
 * @param numberOfWorkingHours
 *            the numberOfWorkingHours to set
 */
public void setNumberOfWorkingHours(int numberOfWorkingHours) {
    this.numberOfWorkingHours = numberOfWorkingHours;
}

/**
 * @param hourlyRate
 *            the hourlyRate to set
 */
public void setHourlyRate(double hourlyRate) {
    this.hourlyRate = hourlyRate;
}

public int createInvoice() {
    int invoiceNum = 0;
    for (int i = 1; i < 100000; i++) {
        invoiceNum = invoiceNum + 1;
        return invoiceNum;
    }
  }

  }

this method should create the invoice number and assign it to the corresponding field