Which is more motivating to continue a process until completion: a percentage, or the number of steps?

I’m working on a set of guides to help users learn how to use our app. We want to show which guides are available and some data with each guide indicating how far you’ve gotten. The idea is that if we show this information and constantly remind you of it, you’ll be more motivated to complete each one and learn more things about the app.

What we disagree on is how to format that information. Which is better: “You have completed 4/7 steps” vs “You have completed 57%”? Looking for data/metrics, not opinions.

How to figure out the scroll percentage of an element on a page


Do you know of some tool where I can check at what percentage of the vertical scroll a certain web element is located?

For example, I have a page where I have a button somewhere near the bottom. How can I find at what % of the page scroll exactly is this button located?

Ideally, I would prefer if there is an online tool or software that can tell as I scroll a page how much percent of it I have gone.

I am not much into coding so I wouldn't like to install any code on the site….

How to figure out the scroll percentage of an element on a page

percentage of X.509 certs using rsaEncryption as signature algorithm

Quoting 2017_TLS_Telemetry_Report.pdf:

Not surprisingly, 2048-bit keys now protect 90% of the world’s TLS hosts. The use of 4096-bit keys have quadrupled, as a share of hosts, but we expect it to start shrinking again as Elliptic Curve Digital Signature Algorithm (ECDSA) gains favor.

That report was issued in 2017 however and I can find no newer report.

My question is… is there a more recent report that has more up-to-date stats?

Automatically limit (stop) battery charging at a given percentage

Device : Moto X Play ( Rooted, Stock, Android 6.0.1, msm8916 Board, XT1562)

Why do I want to limit charging ?

( Let’s leave out whether my reasons are valid or not and accept that I want to, if you disagree with my reasons)

To improve the longevity of battery , I wish to limit charging when it reaches 90%, as explained here Ideal charging / discharging percentage for maximum battery life?

Is it possible?

Yes, at least on my previous device Honor 6, as brought out here How do I override charging current on Huawei Honor 6?, with two different ways of doing it

I have tried unsuccessfully to identify the file responsible in which changing values would limit charging

I am looking for the system file responsible for stopping charging, with it’s true path (without symlinks)

(as I saw on on my previous device, locating the path of file was a big challenge after identifying it)

Edit: Found the file(s) but the question is still open for better ways ( compared to my solution) . Exemplary answers would be considered for bounty of a minimum of 100

How do i make a percentage based loot system C#

so i have been trying to figure this one out on my own for a little while now for my game i am creating, but i am not able to get my head around it. I basically would like too know how to create a simple percentage system that will drop items more frequent if they have a higher percentage assigned too them, if you are able to show me a code that is compatible with Unity that will help. but if you can just show me the basics on this question with numbers showing more frequent like 1, 1, 1, 3, 1, 1, and so on that is fine, i will be able to configure it for items, thank you in advanced 🙂

Add a new column to a dataframe with the percentage of every value of this dataframe

I have the dataframe below and I would to add a new column with the percentage of every value of this dataframe. Something like:

name<-c("asdad","dssdd") number<-c(5,5) df<-data.frame(name,number)  for (i in 1:nrow(df)){ percentage<-df[i,1]/sum(df$  number) }  new<-cbind(df, percentage) 

but I get NAs instead of percentages.

How can I round up percentage to two decimals?

I’m looking for a way to round the percentage from Drupal 8 Commerce Shipping Price Matrix module to cents in USD. Is this possible?

I found this function in the commerce_shipping_price_matrix/src/ Plugin/Commerce/ShippingMethod/ShippingMethodBase.php file:

public function selectRate(ShipmentInterface $  shipment, ShippingRate $  rate) {     // Plugins can override this method to store additional information     // on the shipment when the rate is selected (for example, the rate ID).     $  shipment->setShippingService($  rate->getService()->getId());     $  shipment->setAmount($  rate->getAmount());   } 

This function in the commerce_shipping_price_matrix/src/Plugin/Commerce/ShippingMethod/ PriceMatrix.php file:

 protected function resolveMatrix(array $  matrix, $  price) {     $  price_currency_code = $  price->getCurrencyCode();     $  price_number = $  price->getNumber();      // The price matrix must be in the same currency as the order.     // We currently disable the check until we have added the currency code in     // the configuration form.     // if ($  matrix['currency_code'] !== $  price_currency_code) {     //   throw new \Exception('The shipping price matrix must be at the same currency as the order total for calculating the shipping costs.');     // }      // We detect which matrix entry the price falls under. It should be larger     // or equal than the entry's threshold and smaller than the next entry's     // threshold. Only larger or equal then the entry's threshold in the case of     // the last entry.     foreach ($  matrix['values'] as $  key => $  value) {       $  bigger_than_current = Calculator::compare($  price_number, $  value['threshold']) !== -1;        if (isset($  matrix['values'][$  key+1])) {         $  smaller_than_next = Calculator::compare($  price_number, $  matrix['values'][$  key+1]['threshold']) === -1;       }       else {         $  smaller_than_next = TRUE;       }        // Doesn't match the current entry, move on to the next one.       if (!($  bigger_than_current && $  smaller_than_next)) {         continue;       }        // If the type of the matched entry is 'fixed_amount', the cost is fixed       // and it equals the entry's value.       if ($  value['type'] === 'fixed_amount') {         return $  value['value'];       }        // Throw an exception if the type is neither 'fixed_amount' nor       // 'percentage'.       if ($  value['type'] !== 'percentage') {         throw new \Exception(           sprintf('Unsupported price matrix item "%s", \'fixed_amount\' or \'percentage\' expected.'),           $  value['type']         );       }        // If the type of the matched entry is 'percentage', the cost is the given       // price multiplied by the percentage factor i.e. the entry's value.       $  cost = Calculator::multiply($  price_number, $  value['value']);        // Check minimum and maximum constraints.       if (!empty($  value['min']) && Calculator::compare($  cost, $  value['min']) === -1) {         $  cost = $  value['min'];       }       elseif (!empty($  value['max']) && Calculator::compare($  cost, $  value['max']) === 1){         $  cost = $  value['max'];       }        return $  cost;     }   } 

And this in the commerce_shipping/src/ShippingRate.php file:

class ShippingRate {    /**    * The ID.    *    * @var string    */   protected $  id;    /**    * The shipping service.    *    * @var \Drupal\commerce_shipping\ShippingService    */   protected $  service;    /**    * The amount.    *    * @var \Drupal\commerce_price\Price    */   protected $  amount;    /**    * The delivery date.    *    * @var \Drupal\Core\Datetime\DrupalDateTime    */   protected $  deliveryDate;    /**    * The delivery terms.    *    * @var string    */   protected $  deliveryTerms;    /**    * Constructs a new ShippingRate instance.    *    * @param string $  id    *   The ID.    * @param \Drupal\commerce_shipping\ShippingService $  service    *   The shipping service.    * @param \Drupal\commerce_price\Price $  amount    *   The amount.    * @param \Drupal\Core\Datetime\DrupalDateTime $  delivery_date    *   The delivery date.    * @param string $  delivery_terms    *   The delivery terms.    */   public function __construct($  id, ShippingService $  service, Price $  amount, DrupalDateTime $  delivery_date = NULL, $  delivery_terms = NULL) {     $  this->id = $  id;     $  this->service = $  service;     $  this->amount = $  amount;     $  this->deliveryDate = $  delivery_date;     $  this->deliveryTerms = $  delivery_terms;   }    /**    * Gets the ID.    *    * @return string    *   The ID.    */   public function getId() {     return $  this->id;   }    /**    * Gets the shipping service.    *    * The shipping service label is meant to be displayed when presenting rates    * for selection.    *    * @return \Drupal\commerce_shipping\ShippingService    *   The shipping service.    */   public function getService() {     return $  this->service;   }    /**    * Gets the amount.    *    * @return \Drupal\commerce_price\Price    *   The amount.    */   public function getAmount() {     return $  this->amount;   }    /**    * Gets the delivery date, if known.    *    * @return \Drupal\Core\Datetime\DrupalDateTime|null    *   The delivery date, or NULL.    */   public function getDeliveryDate() {     return $  this->deliveryDate;   }    /**    * Gets the delivery terms, if known.    *    * Example: "Delivery in 1 to 3 business days."    * Can be displayed to the end-user, if no translation is required.    *    * @return string|null    *   The delivery terms, or NULL.    */   public function getDeliveryTerms() {     return $  this->deliveryTerms;   }  } 

I don’t know if I’m on the right track and I don’t know how to write a hook function for this.

My example is this:

Price matrix set-up: For any amount over $ 40, charge 17% shipping.

If I have 3 products at $ 19.99 ea., my subtotal is $ 59.97. The shipping at 17% is $ 10.1949. My order currently is showing all the decimals. But I need it to round the shipping to $ 10.19. If it were $ 10.1959, I would need it to round to $ 10.20.

Any help would be greatly appreciated. Thanks.