How come there are two King of Diamonds entries for the Curse of Strahd tarokka card readings?

In Curse of Strahd, p. 15, it shows two entries for “Broken One (King of Diamonds)”, one after the other (I’m not using spoiler tags because they only work without line breaks, and that makes the below look like a mess):

A. Broken One (King of Diamonds) Your greatest ally will be a wizard. His mind is broken, but his spells are strong.

This card refers to the Mad Mage of Mount Baratok (see chapter 2, area M).

B. Broken One (King of Diamonds) I see a man of faith whose sanity hangs by a thread. He has lost someone close to him.

This card refers to Donavich, the priest in the village of Barovia (see chapter 3, area ES). He will not accompany the characters until his son, Doru, is dead and buried.

Is there errata for this? Or have I missed something?

Actually, I’ve just noticed that there are other duplicate entries, so maybe I’ve missed the point. Am I supposed to pick whichever one I, as DM, think would be more interesting? I’d still appreciate some clarification on this, despite the fact that I might be missing the point.

Iterate cartesian product (cross product) of sorted lists of positive numbers in order of decreasing product of entries (MVCE of a stub included)

Suppose I have several sorted lists of positive numbers, like so for example:

double[] a1 = new double[]{0.70, 0.20, 0.10}; double[] a2 = new double[]{0.80, 0.10, 0.05, 0.05}; double[] a3 = new double[]{0.60, 0.15, 0.14, 0.10, 0.01}; 

I want to iterate Cartesian product of these arrays in the order of decreasing product of entries, like so:

0000: Combo[product=3.36e-01, vals=[0.70, 0.80, 0.60], indexes=[0, 0, 0]] 0001: Combo[product=9.60e-02, vals=[0.20, 0.80, 0.60], indexes=[1, 0, 0]] 0002: Combo[product=8.40e-02, vals=[0.70, 0.80, 0.15], indexes=[0, 0, 1]] 0003: Combo[product=7.84e-02, vals=[0.70, 0.80, 0.14], indexes=[0, 0, 2]] 0004: Combo[product=5.60e-02, vals=[0.70, 0.80, 0.10], indexes=[0, 0, 3]] 0005: Combo[product=4.80e-02, vals=[0.10, 0.80, 0.60], indexes=[2, 0, 0]] ... 

E.g. in the example above the first entry is obvious (as arrays are sorted) and it is a combination of the first values: [0.70, 0.80, 0.60] with product 0.70*0.80*0.60 = 3.36e-01 and corresponding value indexes in arrays a1, a2, a3 are [0, 0, 0]. Now the second entry is less obvious, should we change 0.70 to 0.20? Or 0.60 to 0.15? Or 0.80 to 0.10? The second should be [0.20, 0.80, 0.60]with product 9.60e-02, indexes [1, 0, 0].

Here is a program in java to generate/print them: https://repl.it/repls/FilthyGreatRotation (all the logic is in printWholeCartesianProduct() method)
This program generates them in lexicographic order and then sorts the whole set by product.

Question: Is there an easy way to actually generate the combos in correct order in the first place?

The reason for this: I don’t have the lists in the first place, only iterators over some sorted collections of numbers. Possibly veeery long, length not known ahead of time, but it is known that the numbers in each iterator are sorted.

MVCE to play with (same as in https://repl.it link above):

import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.StringJoiner; import java.util.function.Consumer; import java.util.stream.Collectors;  public class Main {      public static void main(String[] args) {         List<List<Double>> data = createData();         printWholeCartesianProduct(data);     }      public static List<List<Double>> createData() {         double[] a1 = new double[]{0.70, 0.20, 0.10};         double[] a2 = new double[]{0.80, 0.10, 0.05, 0.05};         double[] a3 = new double[]{0.60, 0.15, 0.14, 0.10, 0.01};         return createData(a1, a2, a3);     }      public static void  printWholeCartesianProduct(List<List<Double>> data) {         final DecimalFormat df = new DecimalFormat("0.00");          // print input data         String matrix = data.stream()             .map(l -> l.stream().map(df::format).collect(Collectors.joining(", ")))             .map(row -> "[" + row + "]")             .collect(Collectors.joining("\n"));         System.out.println("Input data:\n" + matrix);          // collect combos as they are generated         final List<Combo> combos = new ArrayList<>();         Consumer<int[]> callback = indexes -> {             double[] v = new double[indexes.length];             double prod = 1;             for (int i = 0; i < indexes.length; i++) {                 List<Double> col = data.get(i);                 int index = indexes[i];                 v[i] = col.get(index);                 prod *= v[i];             }             combos.add(new Combo(prod, v, indexes.clone()));         };          // generate combos         int[] c = new int[data.size()];         int ptr = c.length - 1;         while (ptr >= 0) {             callback.accept(c);             c[ptr]++; // increment             if (c[ptr] == data.get(ptr).size()) { // carry                 do {                     ptr--;                 } while(ptr >= 0 && c[ptr] == data.get(ptr).size() - 1);                 if (ptr < 0) {                     break;                 }                 c[ptr]++;                 // zero out                 while (++ptr <= c.length - 1) {                     c[ptr] = 0;                 }                 ptr = c.length - 1;             }         }          // cheating - sort after generation and print result         combos.sort((o1, o2) -> Double.compare(o2.product, o1.product));         StringBuilder sb = new StringBuilder();         double totalP = 0;         for (int i = 0; i < combos.size(); i++) {             sb.append(String.format("%04d: ", i)).append(combos.get(i)).append("\n");             totalP += combos.get(i).product;         }         System.out.printf("Cartesian product in descending product (total p=%.3e):\n%s", totalP, sb.toString());     }      public static List<Double> asList(double[] a) {         return Arrays.stream(a).boxed().collect(Collectors.toList());     }      public static List<List<Double>> createData(double[]... arrays) {         final List<List<Double>> vals = new ArrayList<>();         Arrays.stream(arrays).forEachOrdered(a -> vals.add(asList(a)));         return vals;     }      static class Combo {         final double product;         final double[] vals;         final int[] indexes;          Combo(double product, double[] vals, int[] indexes) {             this.product = product;             this.vals = vals;             this.indexes = indexes;         }          @Override         public String toString() {             return new StringJoiner(", ", Combo.class.getSimpleName() + "[", "]")                 .add("product=" + String.format("%.2e", product))                 .add("vals=[" + Arrays.stream(vals).boxed().map(v -> String.format("%.2f", v)).collect(                     Collectors.joining(", ")) + "]")                 .add("indexes=" + Arrays.toString(indexes))                 .toString();         }     } } ``` 

Timesheet Entries UX

How to distinguish new time entries

I have a timesheet that looks like this: Timesheet

Which works well. the customers can see all their time entries on one screen and works well reading the times across the week at a glance.

However the issue comes when a user has to enter their timesheets and can be working on up to 5 different assignments, that need to be added via the ‘Add in time’ drop down.

User story:

As a user i fill out my timesheet at the end of the week, and it totals to 34.5 hours

Then 2 days later i need to go back in the add additional time for another assignment that i worked on which i forgot about. So the weeks total hours is now 42 hours.

34.5 hours – Assignment 1

7.5 hours – Assigment 2

However i do not know which project the total time has been allocated to.


What is the best way to distinguish this new information that has been added

  • New time added from different assignments
  • How to tell at a glance which time has been allocated to what assignment

Hope this is clear..

List all entries in the current directory whose names contain only uppercase letters

In one of my lab questions I was asked to list all entries(both files and folders) in the current directory whose names contain only uppercase letters using piping and grep command. Folders must have a forward slash displayed. Initially, my solution looked like this:

ls -p | grep -e "^[[:upper:]]*\/?$  " 

I thought that I can protect the ‘/’ sign with the backward slash(as in echo \* vs echo *). However, it doesn’t work as intended. One of my friends suggested the following solution:

ls -p | grep -e '^[[:upper:]]*/\?$  ' 

I have no idea why the backward slash is used like this. What is even more weird,for me, that it actually produces the right result. I was wondering if someone could explain where the mistake in my solution is and why the second version actually works.

update entry with a different form entries in gravity forms

i need to update a gravity form student information entries. my problem is that i registered student in two different forms. now i want to update the student information and i can’t. i’m using this guide.

forms structures:

  • form 1: regular registration.
  • form 2: registration in middle of the course.
  • form 3: this is the forms that is on /edit-student/.

form 3 is populated with the entry data set as default values to each field:

$  edit_form["fields"][1]["defaultValue"] = $  cvalue["21"];  

but the entries are not being updated and i feels like it’s really bed code (im a new programmer. this is my code:

 add_action("gform_pre_submission_15", "edit_form_pre_submission_handler"); function edit_form_pre_submission_handler($  form) {     // //Get original entry id     $  r = 5;     $  a = 12;     $  form_5 = GFAPI::get_entries($  r);     $  form_12 = GFAPI::get_entries($  a);      $  student_id = $  form["fields"][9]["defaultValue"];     if (is_array($  student_id))         $  marged_entries = array_merge($  form_5, $  form_12);     if (is_array($  form)) {         if (is_array($  entry)) {             foreach ($  marged_entries as  $  entry) {                 if ($  entry["post_id"] == $  student_id) {                     $  entry_id = $  entry['id'];                     $  editentry = GFAPI::get_entry($  entry_id);                     // save values                     $  editentry["21"] = $  _POST["input_11"];                     //  parent Last name                     $  editentry["20"] = $  _POST["input_13"];                     //  student first name                     $  editentry["26"] = $  _POST["input_14"];                     //  student Last name                     $  editentry["25"] = $  _POST["input_15"];                     // email and post title                     $  editentry["22"] = $  _POST["input_6"];                     // Address                     $  editentry["23"] = $  _POST["input_8"];                     //  Student Age                      $  editentry["27"] = $  _POST["input_10"];                     //  Student Phone                      $  editentry["24"] = $  _POST["input_5"];                     //   update entry                     $  updateit = GFAPI::update_entry($  editentry);                     // die();                     if (is_wp_error($  updateit)) {                         echo "Error.";                     } else {                         //success                         echo 'student updated';                     }                 }             }         }     } }  

question: 1) is there a better way to update GF entries with entries from another form? 2) way when i remove the comment from die() the site get stoke? i cant stom form 3 from getting submitted with out this function. 3) way the form is not getting updated?. on its on all of the values are working.

workflow – remove duplicate entries

i have 3 list. Input list, reference table list and transfer. list. I want to remove all related entries in reference table if a certain product is chosen

example reference table product a – category 1 product a – category 2 product b – category 1

so if i go to the input list and added product a – category 1 in the list, what i would like to do is remove all “product a’ from the reference table and copy to transfer list, then delete them from reference table. I tried creating a workflow but only the current list is deleted from. the reference table.

Do directory submition upto 1000 entries for $5

I will improve link quality of your website by HIGH PR Directory Submission. Great Gig from Smart SEO done only with MANUAL work.Best Gig for new sites!In this Gig I will submit your site to Directory sites, which are the best SEO to drive traffic in your website! Features and Effects from this gig:Faster Indexing, Higher Link Popularity, More Pages Indexed Better Rankings, Effective Keyword Targeting, Higher Page Rank, Brand Building ,More Customers Drive premium quality traffic, Increased Visibility ,Good for new sites,Manual work ,As a proof of submission i will give you screenshot when i submit your website on directory.Please First Order me…..Thank you.

by: akhilmurali212
Created: —
Category: Directory Submission
Viewed: 287


How can JSON column formatting be used to highlight duplicate entries in a list?

Column formatting is used in SharePoint Online to customize how fields in lists are displayed. Microsoft provide documentation regarding the use of JSON for column formatting.

As is described in the documentation, this works well for basic things such as adding a class depending on the name of the current field. For example:

  "attributes": {     "class": "=if(@currentField == 'Done', 'sp-field-severity--good', if(@currentField == 'In progress', 'sp-field-severity--low', if(@currentField == 'In review', 'sp-field-severity--warning', if(@currentField == 'Has issues', 'sp-field-severity--severeWarning', 'sp-field-severity--blocked')))) + ' ms-fontColor-neutralSecondary'"   }, 

The end result being:

Column formatting on the status of a column

However, is there a way to check values in the current column and apply a class or color to duplicate entries in that column?

For example, if there is a Person column entitled Participants. One list entry has the value, Smith, John. If another entry gets created and Smith, John is added again, both of these values would be highlighted or have a class applied.

How Can I Delete These Ubuntu Boot Entries

Long story short, tried to install Ubuntu on my new PC but ran into two huge bugs with the installer that almost broke my computer. Asked for help on here and whilst someone did spend some of their time trying to help me, we couldn’t fix it.

So I’m done, I’m going back to Windows. I’ve tried to follow other guides on this site, but the commands needed for my use case seem to be different and I don’t know what they are.

I’m using efibootmgr to remove the boot entries and this is what I get back with:

sudo efibootmgr

BootCurrent: 0007 Timeout: 2 seconds BootOrder: 0004 Boot0000* Windows Boot Manager Boot0001* UEFI: PXE IP4 Realtek PCIe GBE Family Controller Boot0002* UEFI: PXE IP6 Realtek PCIe GBE Family Controller Boot0003* Hard Drive Boot0004* ubuntu Boot0005* Windows Boot Manager Boot0006* ubuntu Boot0007* UEFI: Lexar JumpDrive 1100, Partition 1 Boot0008* USB 

I want to remove the two Ubuntu entries and the duplicate Windows Boot Manager entry at Boot0005. Any help is very much appreciated.