DÚVIDA URGENTE Como fazer um Criteria query no JPA & JSF?

Estou querendo listar o alguns atendimentos com o valor do atendimento, ou seja, listar os atendimento com maior valor ou igual, ou ainda atendimentos com o valor menor.
como devo listar esta criteria?
public List listarAtendimentosOrdenadosPorValoresMaiores(Double valordigitado){
final CriteriaBuilder criteriaBuilder = getEntityManager().getCriteriaBuilder();
final CriteriaQuery criteriaQuery = criteriaBuilder.createQuery(Atendimento.class);
final Root atendimentoRoot = criteriaQuery.from(Atendimento.class);

        Expression<Double> preExp = atendimentoRoot.get("valor");
        //if(){} maior
                atendimentoRoot.<Double>get("valor"), valordigitado));
        //else menor
        List<Atendimento> resultado = getEntityManager().createQuery(criteriaQuery).
        return resultado;

8 – Modify sorting criteria using views_query_alter

I have a view for the content type events with fields event_name, description, summary, event_start_date, etc.
What my requirement is:

  1. Sort the events in ascending order of event_date equal or greater than the current date (upcoming events)
  2. Sort the events in descending order of event_date less than the current date (past events)

NOTE: the upcoming data should come first and then the past data.

enter image description here

enter image description here

Through the normal view UI settings, I couldn’t achieve this. so I tried the views_query_alter hook to modify the sorting criteria. but I couldn’t achieve this. Any help?

 * Implements hook_views_query_alter
function news_t1_views_query_alter(ViewExecutable $view, QueryPluginBase $query) {
  if($view->id() == 'events'){
    $query->orderby(0)('field') = "CASE node__field_st_field_st_value WHEN DATE(node__field_st_field_st_value) >= CURDATE()  END";
    $query->orderby(0)('direction') = "ASC";
    $query->orderby(1)('field') = "CASE node__field_st_field_st_value WHEN DATE(node__field_st_field_st_value) < CURDATE()  END";
    $query->orderby(1)('direction') = "DESC";

node__field_st is the event_date field name.

formulas – Return a list if 2 criteria match in Google Sheets

In an effort to organize staff training: So far I’ve made the pivot table, but I’d like for the pivot table to extract who needs which training, as a list in one cell. I tried using =JOIN, but I have no idea what else.

On sheet 1:

  • Row 2: Staff (who need the training), They enter “NEED” in the row of the column for that training.
  • Column D: The Names of Trainings
  • Column E: Trainers/Staff who are providing the training
    Sheet 1 Data

On Pivot Table


  • A: Trainer
  • B: What modules they’re teaching
  • C: How long the training is
  • D: A cell that lists who requested the training (who entered “NEED” into Sheet 1)

I’m trying to tell it simply:

  • Look for the name of THIS training over in sheet 1, AND if the value of a cell in that row is “NEED”, Return the Name of person/people and list it in one cell next to this pivot table……(lollll I will not cry).

The formula would be something like:

  • Pull the name of the people from Sheet1!F1:Z if (Training names) Sheet1!D:D match Pivot table B:B AND there’s a “NEED” in the row of that training….then list those names in ONE CELL.

  • I’m over explaining I think, but this has taken all day and my brain simply cannot any longer and my own formulas sheet is not helping, Please help if you can.

Pivot Table

I have tried: =JOIN mixed with Match, then Filter… Idk what i’m doing. And the pivot table has no option to filter “NEEDS” from the whole data set. Instead it makes me filter the “NEEDS” of a Name/Column, but if i do that, it will filter out everyone elses data. Basically it forces me to make a custom formula, which is great because I can learn, but… I really hope all of this made sense :(. Any help would be heavenly.

Need help filtering entire rows from reference sheet to master sheet where column text meets criteria

I feel like this should be a relatively simple issue but everything I write is clearly incorrect or leaves me needing to do work manually every time new data is made.

Basically I have a series of sheets that I want to import/filter all rows where Column C/3 matches a certain name.

Master sheet = WO#32456
Want to pull all rows from a large reference log of all my data where Column C/3 = WO#32456

Any help is appreciated!

magento2 – Products Search Criteria

I am building catalog of my site. I have medicines with generic and brand names like below

enter image description here

Generic Name is an attribute name and it’s searchable.
when I search Sildenafil it shows all products having the same attribute value(Viagra and Sildenafil).

How can I search products on the basis of product names so that when I search Viagra it should returns Viagra as well as Sildenafil and vice versa since both have the same Generic Name?

Excel – How to Do an IF Case in Excel / Toggling On and Off a Criteria

I am wondering how I can do an IF case in Excel. More precisely I would like to do something like

myCriteria = true
c = 10
c = 20

y = 10 * c

Ideally I would like to have myCriteria in one cell and true/false in another so I can toggle it on and off.

Can someone tell me how to approach this in Excel?

Thank you and kind regards, Timon

common criteria – Can a software application / OS get past EAL4 if no source code is available

The EAL for Common Criteria are described briefly as:

EAL1: Functionally Tested. ...
EAL2: Structurally Tested. ...
EAL3: Methodically Tested and Checked. ...
EAL4: Methodically Designed, Tested, and Reviewed. ...
EAL5: Semi-Formally Designed and Tested. ...
EAL6: Semi-Formally Verified Design and Tested. ...
EAL7: Formally Verified Design and Tested.

Does “Formally Verified Design” refer to the source code undergoing static code analysis? Thus meaning that the source code would have to be disclosed to gain EAL > 4?

google sheets – Sum values to the right of criteria in multicolumn range

I apologize in advance because I don’t even know how to describe this best.

But, I have 3 2-column ranges in which the left column is a unique identifier (ID) and the right column is quantity I’d like to sum up.

There is some overlap between ID’s in left columns.

I created a column of sorted unique ID’s but could not come up with a formula that would check each ID column for a criterion and then sum the values directly to the right of the match.

Ideally, the formula would also work with “arrayformula” as the columns may get very lengthy.

Here’s an example spreadsheet