sql server – Updating column based on conditions from another table – SQL

Flagging existing INITIAL_MARGIN_FLAG column in Cache for CSA.

Using BNS.LEI and Counterparty.LEI combination, lookup cache table’s matching record. If ALL of the following conditions are met then set cache table INITIAL_MARGIN_FLAG to TRUE. If not, set it to FALSE.

  1. ISL_Initial_Margin_CSA. CSA_EFFective should be less than or equal to Cache Table. Trade Date
  2. ISL_Initial_Margin_CSA.DocumentSubtype should not be equal to “Placeholder IM CSA”
  3. ISL_Initial_Margin_CSA..BNS.lei equal to Cache Table. .Party1LEI
  4. ISL_Initial_Margin_CSA.Counterparty.lei equal to Cache Table. .Party2LEI

enter image description here

c# – How do i set conditions for an IF statement as the game progress through “difficulty”?

This is code that I wanted to put in my IF statement

    public GameObject fallingRockPrefab;
public Vector2 spawnsMinMax;
float randX;
float randY;

//Spawn Positions
Vector2 SpawnPosition;
float nextSpawnTime;

void Update()
{
    if (Time.time > nextSpawnTime)
    {
        float SpawningInBetween = Mathf.Lerp(spawnsMinMax.y, spawnsMinMax.x, Difficulty.GetDifficultyPercent());
        print(SpawningInBetween);
        nextSpawnTime = Time.time + SpawningInBetween;

        randX = Random.Range(-5.6f, 5.6f);
        randY = 5.57f;
        SpawnPosition = new Vector2(randX, randY);
        Instantiate(fallingRockPrefab, SpawnPosition, Quaternion.identity);

    }

}

This is the code from my “Difficulty.GetDifficultyPercent”

    public static class Difficulty{
static float secondsToMaxDifficulty = 30;

public static float GetDifficultyPercent()
{
    return Mathf.Clamp01(Time.timeSinceLevelLoad / secondsToMaxDifficulty);
}}

I’m planning to make a certain event happen when my game bypass a certain stage of a difficulty as it progress but I just don’t know what to put it as.

My guess is this,

if(Time.time > Difficulty(25))

but didn’t work.

java – Many DB queries and conditions

I don’t know it is some design pattern for it or I can’t do it in a different way the code looks like this:

Iteam iteam = itemRepository.findByNameAndNoAndCountryCodeAndCurrencyCode(name, countryCode, currencyCode);
    if(item == null){
        item = itemRepository.findByNameAndNoAndCountryCodeAndCurrencyCode(name, "US", currrencyCode)
    }
    if(item == null){
        item = itemRepository.findByNameAndNoAndCountryCodeAndCurrencyCode(name, countryCode, "USD")
    }
    if(item == null){
        item = itemRepository.findByNameAndCountryCode(name, countryCode)
    }
    if(item == null){
        item = itemRepository.findByNameAndCurrencyCode(name, currrencyCode)
    }

And I have a lot of this (like 15) kind of queries with the condition it is possible to do not make to many conditions and use some trick for this code?

depth of field – Canon 70D – shooting video interviews in bright conditions with low aperture

I’m trying to shoot an interview in the middle of the, in the outdoors – which means, it’s very bright.
While keeping the aperture low – to keep the interviewee’s face in focus, with narrow depth of field (2.8f) – and lowering the ISO as much as my Canon 70D allows (100), the image is extremely bright. In fact, the image looks just like a big bright spot, I’m not able to focus on the subject at all.

Which other setting/mode can help me to be able to shoot video interviews with bright daylight, while keeping depth of field?

I’m using a “pancake” lens (Canon EF-S 24mm f/2.8 STM Lens) and in accordance with the “180° law” – keeping the shutter speed to 1/50s because I’m shooting 24fps.

depth of field – Canon 70D shooting video in bright conditions with low aperture

I’m trying to shoot an interview in the middle of the, in the outdoors – which means, it’s very bright.
While keeping the aperture low – to keep the interviewee’s face in focus, with great depth of field (2.8f) – and lowering the ISO as much as my Canon 70D allows (100), the image is extremely bright. In fact, the image looks just like a big bright spot, I’m not able to focus on the subject at all.

Which other setting/mode can help me to be able to shoot video interviews with bright daylight, while keeping depth of field?

I’m using a “pancake” lens (Canon EF-S 24mm f/2.8 STM Lens) and in accordance with the “180° law” – keeping the shutter speed to 1/50s because I’m shooting 24fps.

oracle – Selecting a record based off conditions CLOB

I have a table with a column storing JSON data as a CLOB. The JSON has a ‘miscData’ field that is made up of an array of JSON objects. Each object has 2 keys which are always the same, but the values are different.

.
.
.
"otherKeys" : "otherValues",
"miscData": [
        {
            "miscType": "date",
            "miscText": "2020-07-09T10:01:10.450Z"
        },
        {
            "miscType": "Comment",
            "miscText": "Comment body"
        },
        {
            "miscType": "CORRECT_TYPE",
            "miscText": "SELECT_ME"
        }
    ],
"confirmationNumber" : "123456789qwerty",
.
.
.

I need to

SELECT 
    CLOB_COL.miscData.miscText 
WHERE
    CLOB_COL.miscData.miscType = 'CORRECT_TYPE' 
AND 
    CLOB_COL.confirmationNumber = 'xxxx';

But I am having trouble since miscData is an array of objects which all contain miscType and miscData keys and I can’t guarantee the array will be the same size, or in the same order.

Google sheets Conditional formatting on multiple ranges with multiple conditions

I would like to format Google sheet ranges like this;

Setup:

Date in A1

Day of the week formula in A2 (IF(WEEKDAY(A1)=1,Settings!$B$8,...) //Settings contains the text for the day

Range1 C5:O15

If A2 = “Monday”
Cells C6,C8,C9 background should be “black”
Cells C10, C11, C12 background should be “white”
Cells C13, C14, C15 background should be “black”

If A2 = “Tuesday”
Cells C6,C8,C9, C10, C11 background should be “white”
Cells C12, C13, C14 background should be “black”
Cells C15 background should be “white”

The premise is as follows;

If the cells are white, a time slot is available, if they are black, it is not. Depending on the day, working hours are different so on Mondays one would not be able to make appointments at certain times and when the day changes those times would become available and others would not.

Graphically;

Day1 X X X O O O X X X

Day2 O O O O O X X X O

The available times never change themselves, they are constant. Day and date change. I can make this if I make separate ranges for each day in question but it is not practical. Not sure how to do it dynamically.

differential equations – Dsolve and initial conditions

Take some simple function of 2 variables, e.g. f[x_,y_]:=x+y and try to solve a PDE of it for the general solution:

DSolve[{Derivative[1,0][f][x,y]==1,Derivative[0,1][f][x,y]==1},f,{x,y}]

This works as expected. However, if you try to give a boundary condition for a specific solution, MMA is no more able to solve it:

DSolve[{Derivative[1, 0][f][x, y] == 1, 
  Derivative[0, 1][f][x, y] == 1, f[x, 0] == 0}, f, {x, y}]

Has anyone an explanation?