Pick out elements from a list of lists using criteria

Consider a list of lists in this form (with a shape $ m \times n \times 3 $ ):

{  {{a1, R1, c11}, {a2, R1, c12}, {a3, R1, c13}, ..., {an, R1, c1n}},  {{a1, R2, c21}, {a2, R2, c22}, {a3, R2, c23}, ..., {an, R2, c2n}},  ...,  {{a1, Rm, cm1}, {a2, Rm, cm2}, {a3, Rm, cm3}, ..., {an, Rm, cmn}} } 

where in each outer list, the 2nd element $ R_i $ is fixed ($ i = 1, 2, …, m $ ), and the 1st element changes from $ a_1 $ to $ a_n $ , the 3rd element $ c_{ij} $ is normally a complex and its imaginary part can change from positive to negative or from negative to positive for several times. Here is a sample data for test.

I want to pick out the neighbor lists whenever the imaginary part of $ c_{ij} $ changes its sign, say, for $ R_2 $ , the selected lists are something like $ \{a_j, R_2, c_{2j}\} $ and $ \{a_{j+1}, R_2, c_{2,j+1}\} $ , where $ \text{Im} c_{2,j} < 0 $ and $ \text{Im} c_{2,j+1} > 0 $ . More generally, for $ R_p $ I pick out $ \{a_j, R_p, c_{pj}\} $ and $ \{a_{j+1}, R_p, c_{p,j+1}\} $ , and then to plot a curve with ListLinePlot[{{R1, a01}, {R2, a02}, ..., {Rp, a0p}, ..., {Rm, a0m}}], in which $ a_{0j} = (a_j + a_{j+1}) / 2 $ . In other words, I what to plot a parameter curve w.r.t the 1st and 2nd elements, across which the imaginary part of the 3rd element changes sign.

I tried Cases, Select and ParametricPlot, but I am still having trouble to find all the pairs of the neighboring lists when the imaginary part of $ c_{ij} $ changes its sign.

Criteria based estimation of a task’s due date

Basically we have a ticket system, each day we get multiple tickets with different categorization (Question,Change,Error) and importance (High,Mid,Low) for different customers (A,B,C). My job is to create some kind of a system determining the due date of these “tasks” based on

  • The state of the previous ones, completed or not.
  • The availability of the developers.
  • A criteria of the previously mentioned attributes (categorization,importance and customer type).

How can one achieve that?

How to get the index of List with Criteria API JPA

I need to get the first component of the Object2 List using a Query of Criteria API.

public class Object1 implements Serializable {     private static final long serialVersionUID = 1L;      @Id     private Integer id;      @Column(name="column1")     private Integer column1;      @OneToMany(mappedBy="object2")     private List<Object2> object2; } 

I have thought something similiar to this:

            CriteriaBuilder cb = entityManager.getCriteriaBuilder();             CriteriaQuery<Object1> query =              cb.createQuery(Object1.class);             Root<Object1> object1 = query.from(Object1.class);              List<Predicate> predicates = new ArrayList<Predicate>();              Path<List<Object2>> path =              object1.get("Object2").get(0).get(....)                   predicates.add(cb.equal(placeIdPath, placeId)); 

I would appreciate an answer…


How to Filter More than 10 Criteria Using Calculated Fields

Sorry but I’m not too familiar with SharePoint so hopefully my terminology is correct. From our Document Library we are trying to create two separate Lists, that will display various documents. These two Lists will each have 4 Subjects with various sub-Categories (no more than 3). I thought I found a solution by modifying the view of the page and using the Filter option. The problem was that I needed a few more lines of Filters. I did find this post that sounds like Option 1 of ECM4D’s answer would suit our needs:

“1. Simplify your filter query with calculated fields. When you have complex queries it is good practice to create calculated columns with formula which has some boolean logic of the view and returns TRUE or FALSE results, and then you can create views using these calculated column(s). This technique is highly recommended because can help you to strongly simplify your queries and improve performance.”

Can someone provide a few more details or an example of how this would be done? Or point me in the right direction? Thanks! 🙂

How to use multiple criteria for -find

I have a folder where my untagged music is where I want to launch a script to delete all the .png and .jpg except those beginning by the word ‘cover’. Here’s what I tried:

find . -name '*.jpg' -or -name '*.png' -not - -name 'cover.*' 
find . (-name '*.jpg' -or -name '*.png'\) -not - -name '*.png' 

And other variation of the two, none worked. (I didn’t included the -delete at the end on purpose)

Move Item from Drop Off Library to Destination Library and create folder structure in Destination Library based on certain criteria

The project i started with SharePoint from my previous question has moved to the second stage. The documents added to our Drop Off Library, after I manually run the workflow to strip the document name to its respective columns, will need another workflow to move the items from the Drop Off library to a destination library called “Employee Files” in the format below enter image description here

The Drop Off Library list has the following fields enter image description here

The workflow has to create a Root folder for example A (based on the last name index on Drop Off), then create sub-folder (a.) with last name, first name (emp ID) and sub-folder within (a.) based on the HR Employee File Category. I am able to come up with creating a folder in Employee Files library based on Last Name Index, or move just the document from Drop Off to Employee Files, but have no idea how to do all the necessary actions i.e create the complex sub folder structure, move to Employee Files and copy the document (there is an attached pdf before Name)inside one of these folders based on the HR category and the Payroll folder. Is the workflow in SP Designer 2013 doable?

Thanks again for all your help!