How do I prove or disprove the following statements?

I have to prove or disprove the following statements.

a) ≈(L(X)) ⊆ ≈(L(Y)) ⇒ ~(X) ⊆ ~(Y)

b) L(X) ⊆ L(Y) ⇒ ~(X) ⊆ ~(Y)

Definitions:  DFA:M=(K,Σ,q0,δ,F) x~y : ∃q∈Q (q0,x) |-- (q,λ) and (q0,y) |-- (q,λ) x≈y : ∀z∈Σ* xz∈L ⇔ yz∈L 

My problem is the formal proof.

I could show that L(X) ⊆ L(Y) ⇒ ~(X) ⊆ ~(Y) with the help of an exmaple, but that doesn’t show that it applies to all.

And the main problem is to show ~(X) ⊆ ~(Y) or ≈(L(X)) ⊆ ≈(L(Y)), because I don’t really get what that means and when or why it is a subset.

Maybe on of you has an idea to prove or disprove the statements.

Bypass prepared statements

I know that prepared statements are used to handle input at the front end. However I was wondering how do you bypass a prepared statement? I have seen some people talk about string concentration but I’m not sure.

The language I’m using is java so I was wondering how someone can bypass a prepared statement. I know it’s possible but not sure how exactly. An example would be nice to clarify.


Scaffold context efcore does not generate .HasIndex statements

Given any schema (here’s one below). When running efcore scaffold-context, all goes well but the HasIndex statements are missing. Why ? Also, if efcore does not have those .HasIndex() will run queries differently ?

Scaffold-DbContext "Server=$  YourServer;Database=ContosoUniversity1;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Force   CREATE TABLE [Instructor] (     [ID] int NOT NULL IDENTITY,     [LastName] nvarchar(50) NOT NULL,     [FirstMidName] nvarchar(50) NOT NULL,     [HireDate] datetime2 NOT NULL,     CONSTRAINT [PK_Instructor] PRIMARY KEY ([ID]) ); 

Are there rules (or at least relevant statements) in 5e about conservation of mass with magic?

Since some spells (such as enlarge/reduce) seem to reduce or increase the amount of mass that is present in game-play with no explanation as to how this happens, some interpret that to mean that conservation of mass is “thrown out the window” in 5e.

However, another view is that the RAW is silent on how those spells work, which leaves it up to the DM to either enforce or discard conservation of mass. The detailed mechanics of enlarge, for example, might be that it draws molecular matter from deep within the earth and/or from the environment or atmosphere, or even from another plane, such that conservation of mass holds true. Or then again, it might not. The spell description doesn’t say.

In a couple of answers about 3.5e (such as this one and this one), it has been softly asserted that conservation of mass is not really respected in D&D, and the topic was touched upon in comments to an answer to a 5e question, but the issue has not been definitively put to rest, that I can see.

Is this indeed ambiguous according to RAW, perhaps intentionally (perhaps the rules authors are avoiding over-managing the campaign settings of various tables)? To put it differently: Is the RAW silent on conservation of mass? Or is there a definitive RAW answer to this somewhere that I have not come across?

Prepared statements and terrible performances

There was an application that was changed, so that all queries are performed using prepared statements, rather than regular statements. What happens is that, for every query, the prepared statement is created, used once, dumped.
This is obviously bad for performances, but it is much worse than I could expect.
Please tell me why this query takes 12 seconds on average to execute as prepared statement:

select top 1 * from Object1 where (Column1 = ?) 

You can see the plan here:

The table is about one million rows, a few kbytes every row, has a PK and only 4 indexes, including a non-clustered, non-unique index on Column1

What can I do to improve the performances, without returning to regular statements?

How to use case statements in BASH?

I have code which extracts the time stamping’s by matching a key word/sentence of a .log file which is existing in several folders of the form log_Job_*. It calculates time duration’s of different processes and write the output to a .CSV file.

What columns I want to have in my .csv:

  1. FileName
  2. ProcessType
    • Import
    • Validate
  3. . .
  4. MainPartionDuration

Now the problem is, I have 2 types of process under 2. Process Type. So, thought of using case statements here. And did as following:

#!/bin/bash  Header="Filename1,ProcessType1,TotalDuration1,Initialization1,MPEProcessDuration1,TotalPartitionDuration1,WaitPartitionDuration1,MainPartionDuration1" echo $  Header >>OutputFile_Validate.csv  cd /path/to/manoj/version_2019_logs/ for file in log_Job_*/manoj.log; do     ProcessType1="$  (grep -F 'Running process mpeXbrlImport.xml' "$  file" | awk '{print $  5}' | cut -c 4-)" #echo "$  ProcessType" ProcessType2="$  (grep -F 'Running process mpeXbrlValidate.xml' "$  file" | awk '{print $  5}' | cut -c 4-)" #echo "$  ProcessType" ProcessType="$  ProcessType1","$  ProcessType2" case $  ProcessType in  $  ProcessType1)  set of commands to get other variaqbles  Var="$  Filename","$  ProcessType","$  TotalDuration","$  Initialization","$  MPEProcessDuration","$  TotalPartitionDuration","$  WaitPartitionDuration","$  MainPartionDuration" echo $  Var >>OutputFile_Import.csv ;; *)  repeat the set of commands and this time save with different variable names Var1="$  Filename1","$  ProcessType1","$  TotalDuration1","$  Initialization1","$  MPEProcessDuration1","$  TotalPartitionDuration1","$  WaitPartitionDuration1","$  MainPartionDuration1" echo $  Var1 >>OutputFile_Validate.csv ;; esac     done 

With this my plan is to create two seperate .CSV files based on the Processtype and then concatenate both the files.

Problem: The script is getting executed successfully, but at the end it is generating only one file i.e. OutputFile_Validate.csv

I have verified the script carefully, am not using any variables repeatedly. Can someone tell me, what could be the reason for this!!

How to hide field on editform.aspx using conditional statements?

I have a column name “Order” and if order is equal to “Car” then show the “Warranty” field, else hide it. I am using script editor for this and here is my code and someone it is not working. Can you point me to a right direction.

<script src="" type="text/javascript"></script> <script>  if ($  ("select[title='Order']").val() != "Car") { $  (document).ready(function(){ $  ("nobr:contains('Warranty')").closest('tr').hide(); });  }  else  { $  (document).ready(function(){ $  ("nobr:contains('Warranty')").closest('tr').hide(); });  } </script> 

Why inner UDF can’t be called on select statements in same Store Procedure?

I really like inner UDF to calculate or get something special and calling it in a Store Procedure(SP). But, in Oracle, can’t call inner UDF in select statement. It doesn’t build by giving reason PLS-00231: Function may not be used in SQL error.

When I search this error code, they suggest to create UDF separately here.

I know I can create UDF separately and use it but I should create and define each SP in main system in my company. It hurts when there are many object should be created.

Also someone add comment to same question as:

Your function is privately declared within your anonymous block, so any queries you run (including any queries in your block) will not be able to see it. This is one of those cases where we see the the separation between the SQL and PL/SQL contexts.

But in my case, all is in same SP. Even that, there could be private reason?

So, what is the main reason? Because of select statements getting async and inner UDF doesn’t support async? Or any other reason ? And is there anyway to achieve this?

Here is my sample SP:

CREATE OR REPLACE PROCEDURE SEL_GETTASKUSER_SP(RC1 IN OUT SYS_REFCURSOR) AS     FUNCTION USERFULLNAME_UDF(p_UserCode NUMBER) RETURN VARCHAR2 IS       v_UserFullName VARCHAR2(500);    BEGIN       SELECT || ' ' || y.surname         INTO v_UserFullName         FROM users y        WHERE y.userCode = p_UserCode;        RETURN v_UserFullName;    END;  BEGIN     OPEN RC1 FOR            SELECT               -- can't call this USERFULLNAME_UDF here because of PLS-00231 reason              USERFULLNAME_UDF(T.USERCODE) "FULLNAME",               T.USERCODE,              T.TASKNAME          FROM tasks T;  END SEL_GETTASKUSER_SP; 

Note: Someone voted to close question because of thinking it belongs to stackoverflow not here. But, I want to point that, I don’t want to learn just how I can do it. I want to learn why this limitation exists in deed.

Avoiding if statements in Nested FOR loops

Please pardon me if this is a duplicate question. I have two nested for loops which will iteration for around mn times (the complexity is around 3k).

Inside these for loops, I have 3 If conditions based on what I do certain operations. I am trying to see if there are any ways to avoid these if conditions inside the for loop as these will be executed for mn times.

Below is the skeletal of existing implementation:

var conditionA = <set conditions for A> var conditionB = <set conditions for B> var conditionC = <set conditions for C>  foreach (var x in X) {   foreach (var y in Y)   {     if (conditionA)     {       //computeA ..makes use of x and y     }     if (conditionB)     {       //computeB..makes use of x and y     }     if (conditionC)     {       //computeC..makes use of x and y     }   } //end of inner foreach }  

As you can see that all the 3 conditions are determined before foreach, is there any way I can get rid of redundant IF statements at each iteration?