text:
Q: How do I prove $x \vee \neg x$ in Hilbert system? How to prove $x \vee \neg x$ using the following axioms?

*

*$A \rightarrow (B \rightarrow A)$

*$(A \rightarrow (B \rightarrow
    C)) \rightarrow ((A \rightarrow B) \rightarrow (A \rightarrow C))$

*$(A \wedge B) \rightarrow A$

*$(A \wedge B) \rightarrow B$

*$(A \rightarrow B) \rightarrow ((A \rightarrow C) \rightarrow (A \rightarrow B \wedge C))$

*$A \rightarrow A \vee B$

*$B \rightarrow A \vee B$

*$(A \rightarrow C) \rightarrow ((B \rightarrow C) \rightarrow (A \vee B \rightarrow C))$

*$A \rightarrow \neg \neg A$

*$\neg \neg A \rightarrow A$

*$(A \rightarrow B) \rightarrow (\neg B \rightarrow \neg A)$

What I'm thinking is that using 6 or 7, I'd first have to prove $x$, which is not a tautology and using 8, I could prove $x \vee \neg x \rightarrow C$ but no matter what I put instead of $C$, I won't be able to reverse the arrow. Can some statement be impossible to prove? Is it a bad set of axioms that I'm using?

A: *

*Prove $\lnot (x \land \lnot x)$. This is easy in natural deduction but in a Hilbert system somewhat more effort is required. (Or, cheat and use the deduction theorem.) You will not need to use double negation elimination here.

*Prove de Morgan's law in the form $\lnot (p \land q)$ implies $\lnot p \lor \lnot q$.

*Put the above two steps together to get $\lnot x \lor \lnot \lnot x$, then apply double negation elimination.

A: I would like to give a new proof, I hope a little bit "more readable".
I refer to Elliott Mendelson, Introduction to Mathematical Logic (4th ed - 1997).
The 11-axioms OP's axiom sytem is like the 10-axioms system $\mathsf L_4$ discussed in Mendelson [page 46], derived from Kleene  [1952 - Introduction to Metamathematics] with a "variant" in Ax5, and Ax9 and Ax11 in place of the Kleene's 10th axiom : $\vdash (B \rightarrow C) \rightarrow ((B \rightarrow \lnot C) \rightarrow \lnot C)$.
Ax1 and Ax2 are also used in Mendelson [as (A1) and (A2)].

Lemma 0 : $\vdash A \rightarrow A$ [Self-Imp - see Mendelson : Lemma 1.8, page 36]

(1) $\vdash [A \rightarrow ((B \rightarrow A) \rightarrow A)] \rightarrow [(A \rightarrow (B \rightarrow A)) \rightarrow (A \rightarrow A)]$ --- Ax2
(2) $\vdash A \rightarrow ((B \rightarrow A) \rightarrow A)$ --- Ax1
(3) $\vdash (A \rightarrow (B \rightarrow A)) \rightarrow (A \rightarrow A)$ --- from (1) and (2) by modus ponens
(4) $\vdash A \rightarrow (B \rightarrow A)$ --- Ax1
(5) $\vdash A \rightarrow A$ --- from (3) and (4) by modus ponens.
With Ax1, Ax2 and Lemma 0, we may prove the Deduction Theorem [see Mendelson : Prop 1.9, page 37].

Lemma 1 : $A \rightarrow B, B \rightarrow C \vdash A \rightarrow C$ [Syllogism - see Mendelson : Coroll 1.10a, page 38]

(1) $A \rightarrow B$ --- assumed
(2) $B \rightarrow C$ --- assumed
(3) $\vdash (B \rightarrow C) \rightarrow (A \rightarrow (B \rightarrow C))$ --- Ax1
(4) $A \rightarrow (B \rightarrow C)$ --- from (2) and (3) by modus ponens
(5) $\vdash [A \rightarrow (B \rightarrow C)] \rightarrow [(A \rightarrow B) \rightarrow (A \rightarrow C)]$ --- Ax2
(6) $(A \rightarrow B) \rightarrow (A \rightarrow C)$ --- from (4) and (5) by modus ponens
(7) $A \rightarrow C$ --- from (1) and (6) by modus ponens.

Lemma 2 : $\vdash (\lnot A \rightarrow \lnot B) \rightarrow (B \rightarrow A)$ [Transposition]

(1) $\vdash (\lnot A \rightarrow \lnot B) \rightarrow (\lnot \lnot B \rightarrow \lnot \lnot A)$ --- Ax11
(2) $\lnot A \rightarrow \lnot B$ --- assumed
(3) $\lnot \lnot B \rightarrow \lnot \lnot A$ --- from (1) and (2) by modus ponens
(4) $\vdash B \rightarrow \lnot \lnot B$ --- Ax9
(5) $B \rightarrow \lnot \lnot A$ --- from (3) and (4) by Syll
(6) $\vdash \lnot \lnot A \rightarrow A$ --- Ax10
(7) $B \rightarrow A$ --- from (5) and (6) by Syll
(8) $\vdash (\lnot A \rightarrow \lnot B) \rightarrow (B \rightarrow A)$ --- by Deduction Theorem, discharging (2).

Lemma 3 : $\vdash \lnot A \rightarrow (A \rightarrow B)$

(1) $\vdash \lnot A \rightarrow (\lnot B \rightarrow \lnot A)$ --- Ax1
(2) $\vdash (\lnot B \rightarrow \lnot A) \rightarrow (A \rightarrow B)$ --- Lemma 2
(3) $\vdash \lnot A \rightarrow (A \rightarrow B)$ --- from (1) and (2) by Syll.

Lemma 4 : $\vdash (\lnot A \rightarrow A) \rightarrow (B \rightarrow A)$

(1) $\vdash \lnot A \rightarrow (A \rightarrow \lnot B)$ --- Lemma 3
(2) $\vdash [\lnot A \rightarrow (A \rightarrow \lnot B)] \rightarrow [(\lnot A \rightarrow A) \rightarrow (\lnot A \rightarrow \lnot B)]$ --- Ax2
(3) $\vdash (\lnot A \rightarrow A) \rightarrow (\lnot A \rightarrow \lnot B)$ --- from (1) and (2) by modus ponens
(4) $\vdash (\lnot A \rightarrow \lnot B) \rightarrow (B \rightarrow A)$ --- Lemma 2
(5) $\vdash (\lnot A \rightarrow A) \rightarrow (B \rightarrow A)$ --- from (3) and (4) by Syll.

Lemma 5 : $\vdash (\lnot A \rightarrow A) \rightarrow A$

(1) $\vdash (\lnot A \rightarrow A) \rightarrow ((\lnot A \rightarrow A) \rightarrow A)$ --- Lemma 4
(2) $\vdash [(\lnot A \rightarrow A) \rightarrow ((\lnot A \rightarrow A) \rightarrow A)] \rightarrow [ ((\lnot A \rightarrow A) \rightarrow (\lnot A \rightarrow A)) \rightarrow ((\lnot A \rightarrow A) \rightarrow A) ]$ --- Ax2
(3) $\vdash ((\lnot A \rightarrow A) \rightarrow (\lnot A \rightarrow A)) \rightarrow ((\lnot A \rightarrow A) \rightarrow A)$ --- from (1) and (2) by modus ponens
(4) $\vdash (\lnot A \rightarrow A) \rightarrow (\lnot A \rightarrow A)$ --- Lemma 0
(5) $\vdash (\lnot A \rightarrow A) \rightarrow A$ --- from (3) and (4) by modus ponens.

Lemma 6 : $A \rightarrow B, \lnot A \rightarrow B \vdash B$

(1) $A \rightarrow B$ --- assumed
(2) $\vdash (A \rightarrow B) \rightarrow (\lnot B \rightarrow \lnot A)$ --- Ax11
(3) $\lnot B \rightarrow \lnot A$ --- from (1) and (2) by modus ponens
(4) $\lnot A \rightarrow B$ --- assumed
(5) $\lnot B \rightarrow B$ --- from (3) and (4) by Syll
(6) $\vdash (\lnot B \rightarrow B) \rightarrow B$ --- Lemma 5
(7) $B$ --- from (5) and (6) by modus ponens.
Finally, we have our main result :

Theorem [Excluded Middle] : $\vdash A \lor \lnot A$

(1) $\vdash A \rightarrow (A \lor \lnot A)$ --- Ax6
(2) $\vdash \lnot A \rightarrow (A \lor \lnot A)$ --- Ax7

(3) $\vdash A \lor \lnot A$ --- from (1) and (2) by Lemma 6.

Notes
(A) We have used the Deduction Theorem only in the proof of Lemma 2; with a little additional effort we may avoid it at all.
(B) We have used only Ax1, Ax2, Ax6, Ax7, Ax9, Ax10, Ax11.

A: Lemma 1: $(P \rightarrow Q) \rightarrow ((R \rightarrow P) \rightarrow (R \rightarrow Q))$

*

*$(R \rightarrow (P \rightarrow Q)) \rightarrow ((R \rightarrow P) \rightarrow (R \rightarrow Q))$  Axiom 2

*$((R \rightarrow (P \rightarrow Q))\rightarrow ((R \rightarrow P) \rightarrow (R \rightarrow Q))) \rightarrow ((P \rightarrow Q) \rightarrow ((R \rightarrow (P \rightarrow Q)) \rightarrow ((R \rightarrow P) \rightarrow (R\rightarrow Q))))$  Axiom 1

*$(P \rightarrow Q) \rightarrow ((R \rightarrow (P \rightarrow Q)) \rightarrow ((R \rightarrow P) \rightarrow (R \rightarrow Q)))$  1,2 MP

*$((P \rightarrow Q) \rightarrow ((R \rightarrow (P \rightarrow Q)) \rightarrow ((R \rightarrow P) \rightarrow (R\rightarrow Q))))\rightarrow (((P \rightarrow Q) \rightarrow (R \rightarrow (P \rightarrow Q))) \rightarrow ((P \rightarrow Q) \rightarrow ((R \rightarrow P) \rightarrow (R \rightarrow Q))))$  Axiom 2

*$((P \rightarrow Q) \rightarrow (R \rightarrow (P \rightarrow Q))) \rightarrow ((P \rightarrow Q) \rightarrow ((R \rightarrow P) \rightarrow (R \rightarrow Q)))$  3,4 MP

*$(P \rightarrow Q) \rightarrow (R \rightarrow (P \rightarrow Q))$  Axiom 1

*$(P \rightarrow Q) \rightarrow ((R\rightarrow P) \rightarrow (R \rightarrow Q))$  5,6 MP

Lemma 2: $(P \rightarrow (P \rightarrow Q)) \rightarrow (P \rightarrow Q)$

*

*$((P \rightarrow (P \rightarrow Q)) \rightarrow ((P \rightarrow P) \rightarrow (P \rightarrow Q))) \rightarrow (((P \rightarrow (P \rightarrow Q)) \rightarrow (P \rightarrow P)) \rightarrow ((P\rightarrow (P \rightarrow Q)) \rightarrow (P \rightarrow Q)))$  Axiom 2

*$(P \rightarrow (P \rightarrow Q)) \rightarrow ((P \rightarrow P) \rightarrow (P \rightarrow Q))$  Axiom 2

*$((P \rightarrow (P \rightarrow Q)) \rightarrow (P \rightarrow P)) \rightarrow ((P \rightarrow (P \rightarrow Q)) \rightarrow (P \rightarrow Q))$  1,2 MP

*$P \rightarrow ((P \rightarrow P) \rightarrow P)$  Axiom 1

*$(P \rightarrow ((P \rightarrow P) \rightarrow P)) \rightarrow ((P \rightarrow (P \rightarrow P)) \rightarrow(P \rightarrow P))$  Axiom 2

*$(P \rightarrow (P \rightarrow P)) \rightarrow (P \rightarrow P)$  4,5 MP

*$P \rightarrow (P \rightarrow P)$  Axiom 1

*$P \rightarrow P$  6,7 MP

*$(P \rightarrow P) \rightarrow ((P \rightarrow (P \rightarrow Q)) \rightarrow (P \rightarrow P))$  Axiom 1

*$(P \rightarrow (P \rightarrow Q)) \rightarrow (P \rightarrow P)$  8,9 MP

*$(P \rightarrow (P \rightarrow Q)) \rightarrow (P \rightarrow Q)$  3,10 MP

Lemma 3: $P \rightarrow ((P \rightarrow Q) \rightarrow Q)$

*

*$(P \rightarrow Q) \rightarrow (((P \rightarrow Q) \rightarrow (P \rightarrow Q)) \rightarrow (P \rightarrow Q))$  Axiom 1

*$((P \rightarrow Q) \rightarrow (((P\rightarrow Q) \rightarrow (P \rightarrow Q)) \rightarrow (P \rightarrow Q))) \rightarrow (((P \rightarrow Q) \rightarrow ((P \rightarrow Q) \rightarrow (P \rightarrow Q))) \rightarrow ((P \rightarrow Q) \rightarrow (P \rightarrow Q)))$  Axiom 2

*$((P \rightarrow Q) \rightarrow ((P \rightarrow Q) \rightarrow (P \rightarrow Q))) \rightarrow ((P\rightarrow Q)\rightarrow (P \rightarrow Q))$  1,2 MP

*$(P\rightarrow Q) \rightarrow ((P \rightarrow Q) \rightarrow (P \rightarrow Q))$  Axiom 1

*$(P \rightarrow Q) \rightarrow (P \rightarrow Q)$  3,4 MP

*$((P \rightarrow Q) \rightarrow (P \rightarrow Q)) \rightarrow (((P \rightarrow Q) \rightarrow P) \rightarrow ((P\rightarrow Q) \rightarrow Q))$  Axiom 2

*$((P\rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) \rightarrow Q)$  5,6 MP

*$P \rightarrow ((P\rightarrow Q) \rightarrow P)$  Axiom 1

*$((P \rightarrow (((P \rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) > Q))) \rightarrow ((P \rightarrow ((P \rightarrow Q) \rightarrow P)) \rightarrow (P \rightarrow ((P \rightarrow Q) \rightarrow Q)))) \rightarrow ((((P \rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) \rightarrow Q)) \rightarrow ((P \rightarrow (((P \rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) \rightarrow Q))) \rightarrow ((P \rightarrow ((P \rightarrow Q) \rightarrow P)) \rightarrow (P \rightarrow ((P \rightarrow Q) \rightarrow Q)))))$  Axiom 1

*$(P \rightarrow (((P \rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) \rightarrow Q))) \rightarrow ((P \rightarrow ((P \rightarrow Q) \rightarrow P)) \rightarrow (P \rightarrow ((P \rightarrow Q) \rightarrow Q)))$  Axiom 2

*$(((P \rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) \rightarrow Q)) \rightarrow ((P \rightarrow (((P \rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) \rightarrow Q))) \rightarrow ((P \rightarrow ((P \rightarrow Q) \rightarrow P)) \rightarrow (P \rightarrow ((P \rightarrow Q) \rightarrow Q))))$  9,10 MP

*$((((P \rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) \rightarrow Q)) \rightarrow ((P \rightarrow (((P \rightarrow Q) \rightarrow P) \rightarrow ((P\rightarrow Q) \rightarrow Q))) \rightarrow ((P \rightarrow ((P \rightarrow Q) \rightarrow P)) \rightarrow (P \rightarrow ((P \rightarrow Q) \rightarrow Q))))) \rightarrow (((((P \rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) \rightarrow Q)) \rightarrow (P \rightarrow (((P\rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) \rightarrow Q)))) \rightarrow ((((P \rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) \rightarrow Q)) \rightarrow ((P \rightarrow ((P \rightarrow Q) \rightarrow P)) \rightarrow (P \rightarrow ((P \rightarrow Q) \rightarrow Q)))))$  Axiom 2

*$((((P \rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) \rightarrow Q)) \rightarrow (P \rightarrow (((P \rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) \rightarrow Q)))) \rightarrow ((((P \rightarrow Q) \rightarrow P) > ((P \rightarrow Q) \rightarrow Q)) \rightarrow ((P \rightarrow ((P \rightarrow Q) \rightarrow P)) \rightarrow (P \rightarrow ((P \rightarrow Q) \rightarrow Q))))$  11,12 MP

*$(((P \rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) \rightarrow Q)) \rightarrow (P \rightarrow (((P \rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) \rightarrow Q)))$  Axiom 1

*$(((P \rightarrow Q) \rightarrow P) \rightarrow ((P \rightarrow Q) \rightarrow Q)) \rightarrow ((P \rightarrow ((P \rightarrow Q) \rightarrow P)) \rightarrow (P \rightarrow ((P \rightarrow Q) \rightarrow Q)))$  13,14 MP

*$(P\rightarrow ((P \rightarrow Q) \rightarrow P)) \rightarrow (P \rightarrow ((P \rightarrow Q) \rightarrow Q))$  7,15 MP

*$P \rightarrow ((P \rightarrow Q) \rightarrow Q)$  8,16 MP

Main Theorem: $P \vee \neg P$

*

*$P \rightarrow (P \vee \neg P)$  Axiom 6

*$(P \rightarrow (P \vee \neg P)) \rightarrow (\neg (P \vee \neg P) \rightarrow \neg P)$  Axiom 11

*$\neg (P \vee \neg P) \rightarrow \neg P$  1,2 MP

*$\neg P \rightarrow (P \vee \neg P)$  Axiom 7

*$(\neg P \rightarrow (P \vee \neg P)) \rightarrow ((\neg (P \vee \neg P) \rightarrow \neg P) \rightarrow (\neg (P \vee \neg P) \rightarrow (P \vee \neg P)))$  Lemma 1

*$(\neg (P \vee \neg P) \rightarrow \neg P) \rightarrow (\neg (P \vee \neg P) \rightarrow (P \vee \neg P))$  4,5 MP

*$\neg (P \vee \neg P) \rightarrow (P \vee \neg P)$  3,6 MP

*$\neg (P \vee \neg P) \rightarrow ((\neg (P \vee \neg P) \rightarrow (P \vee \neg P)) \rightarrow (P \vee \neg P))$  Lemma 3

*$((\neg (P \vee \neg P) \rightarrow (P \vee \neg P)) \rightarrow (P \vee \neg P)) \rightarrow (\neg (P \vee  \neg P) \rightarrow \neg (\neg (P \vee \neg P) \rightarrow (P \vee \neg P)))$  Axiom 11

*$(((\neg (P \vee \neg P) \rightarrow (P \vee \neg P)) \rightarrow (P \vee \neg P)) \rightarrow (\neg (P \vee \neg P) \rightarrow \neg (\neg (P \vee \neg P) \rightarrow (P \vee \neg P)))) \rightarrow ((\neg (P \vee \neg P) \rightarrow ((\neg (P \vee \neg P) \rightarrow (P \vee \neg P)) \rightarrow (P \vee \neg P))) \rightarrow (\neg (P \vee \neg P) \rightarrow (\neg (P \vee \neg P) \rightarrow \neg (\neg (P \vee \neg P) \rightarrow (P \vee \neg P)))))$  Lemma 1

*$(~(P \vee \neg P) \rightarrow ((\neg (P \vee \neg P) \rightarrow (P \vee \neg P)) \rightarrow (P \vee \neg P))) \rightarrow (\neg (P \vee \neg P) \rightarrow (\neg (P \vee \neg P) \rightarrow \neg (\neg (P \vee \neg P) \rightarrow (P \vee \neg P))))$  9,10 MP

*$\neg (P \vee \neg P) \rightarrow (\neg (P \vee \neg P) \rightarrow \neg (\neg (P \vee \neg P) \rightarrow (P \vee \neg P)))$  8,11 MP

*$(\neg (P \vee \neg P) \rightarrow (\neg (P \vee \neg P) \rightarrow \neg (\neg (P \vee \neg P) \rightarrow (P \vee \neg P)))) \rightarrow (\neg (P \vee \neg P) \rightarrow \neg (\neg (P \vee \neg P) \rightarrow (P \vee \neg P)))$  Lemma 2

*$~(P \vee \neg P) \rightarrow \neg (\neg (P \vee \neg P) \rightarrow (P \vee \neg P))$  12,13 MP

*$(\neg (P \vee \neg P) \rightarrow \neg (\neg (P \vee \neg P) \rightarrow (P \vee \neg P))) \rightarrow (\neg\neg(\neg (P \vee \neg P) \rightarrow (P \vee \neg P)) \rightarrow \neg \neg(P \vee \neg P)) $ Axiom 11

*$\neg\neg(\neg (P \vee \neg P) \rightarrow (P \vee \neg P)) \rightarrow \neg\neg(P \vee \neg P)$  14,15 MP

*$(\neg (P \vee\neg P) \rightarrow (P \vee \neg P)) \rightarrow \neg\neg (\neg(P \vee \neg P) \rightarrow (P \vee \neg P))$  Axiom 9

*$\neg \neg (\neg (P \vee \neg P) \rightarrow (P \vee \neg P))$  7,17 MP

*$\neg\neg (P \vee \neg P)$  16,18 MP

*$\neg\neg (P \vee \neg P) \rightarrow (P \vee \neg P)$  Axiom 10

*$P \vee \neg P$  19,20 MP


text:
Q: How can I select only hours I am looking for some help with the mysql function date_format
SELECT * FROM bids
WHERE bid_date = DATE_FORMAT('2014-07-13 00:00:00','%Y-%m-%d %H:%i:%s')

I have tried the following
SELECT * FROM bids
WHERE bid_date = DATE_FORMAT('00:00:00','%H:%i:%s')

but it didn't work

A: Try
%T Time, 24-hour (hh:mm:ss)

Example:
DATE_FORMAT(NOW(),'%T')

Output: 11:45:34

Source: http://www.w3schools.com/sql/func_date_format.asp

A: You can just use HOUR:
  SELECT HOUR(Date) from table

A: try this
The EXTRACT() function is used to return a single part of a date/time, such as year, month, day, hour, minute, etc.
select EXTRACT(HOUR FROM bid_date) from bids
units:
    MICROSECOND
    SECOND
    MINUTE
    HOUR
    DAY
    WEEK
    MONTH
    QUARTER
    YEAR
    SECOND_MICROSECOND
    MINUTE_MICROSECOND
    MINUTE_SECOND
    HOUR_MICROSECOND
    HOUR_SECOND
    HOUR_MINUTE
    DAY_MICROSECOND
    DAY_SECOND
    DAY_MINUTE
    DAY_HOUR
    YEAR_MONTH

A: SELECT * FROM bids WHERE DATE_FORMAT (bid_date,'%H:%i:%s') = DATE_FORMAT('00:00:00','%H:%i:%s')

redpajama_set_name: RedPajamaStackExchange


text:
Q: sms using clickatell, code not working I have signed up for clickatell service to send sms.  They have given me the following code for vb.net and said they do not know if this is right or wrong.
Dim client As WebClient = New WebClient
' Add a user agent header in case the requested URI contains a query.
client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)")
client.QueryString.Add("user", "myusername")
client.QueryString.Add("password", "mypwd")
client.QueryString.Add("api_id", "myid")
client.QueryString.Add("to", "009232XXXXXXX")
client.QueryString.Add("text", "This is an example message using my vb.net code")
Dim baseurl As String = "http://api.clickatell.com/http/sendmsg"
Dim data As Stream = client.OpenRead(baseurl)
Dim reader As StreamReader = New StreamReader(data)
Dim s As String = reader.ReadToEnd()
data.Close()
reader.Close()
Return

I tried the code, it did not give any error but sms was not received too.
Please help.

A: Your destination mobile number also should not have the leading zero's.
If you use the leading zero's, then the API will return this error: ERR: 105, Invalid Destination Address
You really need to log the API responses, otherwise you do not know if the gateway accepted your message.


text:
Q: Databricks Delta Table Schema mismatch Say I created an external Delta table with the following Schema

*

*product_cd : INTEGER

*product_dsc: VARCHAR(128)

I inserted some data and then, for whatever reason, I decided to drop the metadata whilst retaining the data.
When I try to recreate the table, I get a Schema mismatch error which says product_dsc is a STRING.
This has been wracking my brain for days.
I've read a bit about schema enforcing and evolution in Delta Lake, although I'm more confused now than when I started.
Another strange thing is that I'm unable to cast a spark dataframe column to VARCHAR. I've tried that while troubleshooting the aforementioned problem, to no avail. It seems spark does not want me to use the VARCHAR data type at all. This is bugging me because during all my professional life I've used VARCHAR(max length) data types and now I can't do it anymore. It's unnatural to me.
Thanks in advance.

A: I try to reproduce the same thing in my environment. I got the same error.
Sometimes columns in your table are different from the columns that you have in your data frame. Because of that, you are getting the schema mismatch error.

Note: string | char() | varchar() -> StringType

I created a delta table with the name emp_dem.
Table 1:

Created the same schema of another table just add one column name as additional column.

Now, if I insert a newly created schema into the delta table, I got the same error. This is the reason, if columns in your table are different from the columns that you have inserted in your data frame then you got this error.

To resolve this error, you need to use the merge operation.
df.write.option("mergeSchema","true").format("delta").mode("append").saveAsTable("emp_dem")

For more information refer this link.


text:
Q: Using Media Fragments and preventing the browser from reloading the targeted HTMLMediaElement I am working on a program, were i have to use media fragment to keep the user within a particular starting and ending time frame. And the user will be able to set the start time and the end time.
const path = require("path");

const createFragment = (startEnd,location) => {
    const fragmentEl = document.createElement("div");
    fragmentEl.setAttribute("data-fragment", startEnd);
    fragmentEl.classList.add("akara-media-fragment");
    fragmentEl.style.left = `${location}px`;
    akaraTimeIndicator.appendChild(fragmentEl);
    if ( startEnd === "start" ) {
       const reg = new RegExp(`${path.extname(video.src)}$`);

       // how can i prevent the browser from reloading the video element, i want the fragment to work on the fly
       video.src = video.src.replace(reg, `${path.extname(video.src)}#t=the time frame goes here`);
    }
};

akaraTimeIndicator.addEventListener("contextmenu", evt => {

    const { left , right } = akaraTimeIndicator.getBoundingClientRect();

    const firstFragment = akaraTimeIndicator.querySelector("[data-fragment=start]");
    const lastFragment = akaraTimeIndicator.querySelector("[data-fragment=end]");

    // * 100 to get calculation
    const XAxis = (evt.clientX / 1000) * 100;

    if ( ! firstFragment ) {
        createFragment("start", evt.clientX);
        return;
    }

    const firstFrag = parseInt(firstFragment.style.left);
    const lastFrag = lastFragment ? parseInt(lastFragment.style.left) : null;

    if ( evt.clientX <  firstFrag ) {
        firstFragment.remove();
        createFragment("start", evt.clientX);
        return;
    }

    if ( lastFrag &&
         (evt.clientX > lastFrag
          || evt.clientX < lastFrag
         )
       ) {
        lastFragment.remove();
        createFragment("end", evt.clientX);
        return;
    }

    if ( evt.clientX === firstFrag ) {
        if ( lastFrag ) lastFragment.setAttribute("data-fragment", "start");
        firstFragment.remove();
        akara_emit.emit("akara::fragment:removed", "first");
        return;
    }

    if ( lastFrag && ( evt.clientX === lastFrag ) ) {
        lastFragment.remove();
        akara_emit.emit("akara::fragment:remove", "last");
        return;
    }

    createFragment("end", evt.clientX);
    return;
});

The process for setting the media fragment is a little bit more involved, but the major question is is there any possible way to set the fragment without the browser reloading the HTMLMediaElement element


text:
Q: JavaScript Split string by multiple occurrences of letters I am trying to split a string by a single or multiple occurrence of letters.
For example:
aaabbcapppp, would yield the array, ["aaa", "bb", "c", "a", "pppp"]
The most-Inefficient idea I had was to just utilize, newArray = str.split(""); and rebuild the array to my needs.  I assume there is a much more efficient solution.

A: Something like this would work:
"aaabbcapppp".match(/(.)\1*/g) // ["aaa", "bb", "c", "a", "pppp"]

The (.) matches any single character, captured in group 1, followed by that same character repeated zero or more times (\1 is a backreference which matches exactly what was matched in group 1).
To match only Latin letters, consider using [a-z], for example:
"aaa-bbca!!pppp".match(/([a-z])\1*/g) // ["aaa", "bb", "c", "a", "pppp"]

Here, the - and !! are not included in the result array.

A: The regex solution is probably the way to go, but if for some reason you want to do it manually, something like this would work
function charSplit(str) {
    var arr = [], l, j = -1;
    for (var i=0; i<str.length; i++) {
        var c = str.charAt(i);
        l==c ? arr[j] += c : arr[++j] = c;
        l=c;
    }
    return arr;
}

FIDDLE


text:
Q: KeyError: "Stemming algorithm not found" using Snowballstemmer for Arabic I installed this stemmer for arabic language Here. I was running it with this code :
from snowballstemmer import stemmer
ar_stemmer = stemmer("arabic")
ar_stemmer.stemWord(u"فسميتموها")

And when I run it, I get this :
Traceback (most recent call last):
File "C:\Users\CLIENT\Desktop\snowballstemmer-1.1.0.tar\snowballstemmer-   1.1.0\stemmer.py", line 9, in <module>
ar_stemmer = stemmer("arabic")
File "C:\Anaconda2\lib\site-packages\snowballstemmer\__init__.py", line 57,   in stemmer
raise KeyError("Stemming algorithm '%s' not found" % lang)
KeyError: "Stemming algorithm 'arabic' not found"

A: Don't install the version of snowballstemmer from PyPi cause it doesn't support Arabic yet. Install the version provided in the link. It has this Arabic stemmer inside. You can do this by downloading the tarball and execute the setup.py:
sudo python setup.py install

Here is an example:
>>> from snowballstemmer import stemmer
>>> ar_stemmer = stemmer("arabic")
>>> stem = ar_stemmer.stemWord(u"فسميتموها")
>>> print stem
سمي
>>> stem
u'\u0633\u0645\u064a'

A: I once worked with SnowballStemmer,
this was the way it worked for me:
>>> from nltk.stem import SnowballStemmer
>>> print(" ".join(SnowballStemmer.languages)) # See which languages are supported
danish dutch english finnish french german hungarian
italian norwegian porter portuguese romanian russian
spanish swedish
>>> stemmer = SnowballStemmer("german") # Choose a language
>>> stemmer.stem("Autobahnen") # Stem a word
'autobahn'

I'm not sure if arabic works here


text:
Q: Como fazer variação inter-semanal no R Tenho uma base de dados no formato longo e necessito fazer a variação inter-semanal, ou seja, o dado de hoje / dado 7 dias atrás - 1.
Código que utilizei, mas está fazendo a variação do dia anterior:
library(readr)

dados <- read_delim("~/Downloads/arquivo_geral.csv",
                                        ";", escape_double = FALSE, trim_ws = TRUE)

dados[["variacaoCasos"]] <- ((dados$casosAcumulados/lag(dados$casosAcumulados, k = 7))-1)

Base de dados que estou utilizando: https://covid.saude.gov.br/
Obrigado.

A: Você pode usar as funções dplyr::lag() e base::diff().
A função diff(x, n) vai retornar a diferença dos valores de n dias atras.
A função lag(x, n) vai retornar os valores de n dias atras.
Assim, com o código abaixo temos uma taxa de crescimento semanal.
library(tidyverse)

dados <- read_delim("~/Downloads/arquivo_geral.csv",
                    ";", escape_double = FALSE, trim_ws = TRUE)

dados %>%
  group_by(regiao, estado) %>%
  mutate(dif_semanal = c(rep(NA, 7), diff(casosAcumulados, 7)),
         percentual_dif = dif_semanal / lag(casosAcumulados, 7)) %>%
  select(-ends_with("os")) %>%
  tail()
#> # A tibble: 6 x 5
#> # Groups:   regiao, estado [1]
#>   regiao       estado data       dif_semanal percentual_dif
#>   <chr>        <chr>  <date>           <dbl>          <dbl>
#> 1 Centro-Oeste DF     2020-04-18         183          0.316
#> 2 Centro-Oeste DF     2020-04-19         213          0.347
#> 3 Centro-Oeste DF     2020-04-20         234          0.367
#> 4 Centro-Oeste DF     2020-04-21         230          0.353
#> 5 Centro-Oeste DF     2020-04-22         264          0.387
#> 6 Centro-Oeste DF     2020-04-23         247          0.345

Created on 2020-04-24 by the reprex package (v0.3.0)


text:
Q: How to remove elements from a vector in a fast way in Clojure? I'm trying to remove elements from a Clojure vector:

Note that I'm using Clojure's operations from Kotlin

val set = PersistentHashSet.create("foo")
val vec = PersistentVector.create("foo", "bar")
val seq = clojure.`core$remove`.invokeStatic(set, vec) as ISeq
val resultVec = clojure.`core$vec`.invokeStatic(seq) as PersistentVector

This is the equivalent of the following Clojure code:
(remove #{"foo"} ["foo" "bar"])

The code works fine but I've noticed that creating a vector from the seq is extrmely slow. I've written a benchmark and these were the results:
| Item count | Remove ms | Remove with converting back to vector ms|
-----------------------------------------------------------------
| 1000       | 51        | 1355                                 |
| 10000      | 71        | 5123                                 |

Do you know how I can convert the seq resulting from the remove operation back to a vector without the harsh performance penalty?
If it is not possible is there an alternative way to perform the remove operation?

A: You could try the complementary operation to remove that returns a vector:
(filterv (complement #{"foo"})
         ["foo" "bar"])

Note the use of filterv. The v indicates that it uses a vector from the start, and returns a vector, so no conversion is required. It uses a transient vector behind the scenes, so it should be pretty fast.
I'm negating the predicate using complement so I can use filterv, since there is no removev. remove is just defined as the complement of filter anyway though, so it's basically what you were already doing, just strict.

A: What you are trying to do fundamentally performs badly. Vectors are for fast indexed read/write, and O(1) access to the right end. To do anything else you must tear the vector apart and rebuild it again, an O(N) operation. If you need an operation like this to be efficient, you must use a different data structure.

A: Why not a PersistentHashSet? Fast removal, though not ordered. I do vaguely recall Clojure also having a sorted set in case that's needed.

A: You have made an error of accepting the lazy result of remove as equivalent to the concrete result of converting back to a vector.  Compare the lazy result of (remove ...) with the concrete result implied by (count (remove ...)).  You will see that it is slightly slower than just doing (vec (remove ...)).    Also, for real speed-critical applications, there is nothing like using a native Java ArrayList:
(ns tst.demo.core
  (:require
    [criterium.core :as crit]    )
  (:import [java.util ArrayList]))

(def N 1000)
(def tgt-item (/ N 2))

(def pred-set #{ (long tgt-item) })
(def data-vec (vec (range N)))

(def data-al (ArrayList. data-vec))
(def tgt-items (ArrayList. [tgt-item]))

(println :lazy)
(crit/quick-bench
  (remove pred-set data-vec))

(println :lazy-count)
(crit/quick-bench
  (count (remove pred-set data-vec)))

(println :vec)
(crit/quick-bench
  (vec (remove pred-set data-vec)))

(println :ArrayList)
(crit/quick-bench
  (let [changed? (.removeAll data-al tgt-items)]
    data-al))

with results:
:lazy           Evaluation count : 35819946     time mean :    10.856 ns
:lazy-count     Evaluation count :     8496     time mean : 69941.171 ns
:vec            Evaluation count :     9492     time mean : 62965.632 ns
:ArrayList      Evaluation count :   167490     time mean :  3594.586 ns


text:
Q: How to pass custom enum in @Query via Retrofit? I have a simple enum:
public enum Season {
    @SerializedName("0")
    AUTUMN,
    @SerializedName("1")
    SPRING;
}

Starting some version, GSON became able to parse such enums. To make sure, I did this:
final String s = gson.toJson(Season.AUTUMN);

It works as I expected. Output is "0". So, I tried use it in my Retrofit services:
@GET("index.php?page[api]=test")
Observable<List<Month>> getMonths(@Query("season_lookup") Season season);
/*...some files later...*/
service.getMonths(Season.AUTUMN);

And also added logging to be really certain about its result:
HttpLoggingInterceptor httpLoggingInterceptor = new HttpLoggingInterceptor();
httpLoggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);

OkHttpClient httpClient = new OkHttpClient.Builder()
        .addInterceptor(httpLoggingInterceptor)
        .build();

But it failed. @Query totally ignored @SerializedName and used .toString() instead, so the log shown me .../index.php?page[api]=test&season_lookup=AUTUMN.
I traced Retrofit sources and found file RequestFactoryParser with lines :
Converter<?, String> converter =
    retrofit.stringConverter(parameterType, parameterAnnotations);
action = new RequestAction.Query<>(name, converter, encoded);

It seems, like it doesn't care at all about enums. Before these lines, it tested rawParameterType.isArray() to be an array or Iterable.class.isAssignableFrom() and nothing more.
Retrofit instance creation is:
retrofit = new Retrofit.Builder()
                .baseUrl(ApiConstants.API_ENDPOINT)
                .client(httpClient)
                .addConverterFactory(GsonConverterFactory.create(gson))
                .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
                .build();

gson is GsonBuilder().create(). I peeked at sources, there is predefined ENUM_TypeAdapters.ENUM_FACTORY in it for enums, so I leave it as it is.

The question is what can I do, to prevent using toString() on my enums and use @SerializedName? I use toString() for other purposes.

A: As @DawidSzydło mentioned, I misunderstood Gson usage in the Retrofit. It is used only for response/request decoding/encoding, but not for @Query/@Url/@Path e.t.c. For them, Retrofit uses Converter.Factory to convert any type to String.
Here is code for auto using @SerializedName as value of any Enum when passing it to Retrofit services.
Converter:
public class EnumRetrofitConverterFactory extends Converter.Factory {
    @Override
    public Converter<?, String> stringConverter(Type type, Annotation[] annotations, Retrofit retrofit) {
        Converter<?, String> converter = null;
        if (type instanceof Class && ((Class<?>)type).isEnum()) {
            converter = value -> EnumUtils.GetSerializedNameValue((Enum) value);
        }
        return converter;
    }
}

EnumUtils:
public class EnumUtils {
    @Nullable
    static public <E extends Enum<E>> String GetSerializedNameValue(E e) {
        String value = null;
        try {
            value = e.getClass().getField(e.name()).getAnnotation(SerializedName.class).value();
        } catch (NoSuchFieldException exception) {
            exception.printStackTrace();
        }
        return value;
    }
}

Retrofit creation:
retrofit = new Retrofit.Builder()
        .baseUrl(ApiConstants.API_ENDPOINT)
        .client(httpClient)
        .addConverterFactory(GsonConverterFactory.create(gson))
        .addConverterFactory(new EnumRetrofitConverterFactory())
        .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
        .build();

08.18 update added kotlin analog:
class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        val httpLoggingInterceptor = HttpLoggingInterceptor()
        httpLoggingInterceptor.level = HttpLoggingInterceptor.Level.BODY

        val httpClient = OkHttpClient.Builder()
                .addInterceptor(httpLoggingInterceptor)
                .build()

        val gson = GsonBuilder().create()

        val retrofit = Retrofit.Builder()
                .baseUrl(Api.ENDPOINT)
                .client(httpClient)
                .addConverterFactory(GsonConverterFactory.create(gson))
                .addConverterFactory(EnumConverterFactory())
                .build()

        val service = retrofit.create(Api::class.java)
        service.getMonths(Season.AUTUMN).enqueue(object : Callback<List<String>> {
            override fun onFailure(call: Call<List<String>>?, t: Throwable?) {
                /* ignore */
            }

            override fun onResponse(call: Call<List<String>>?, response: Response<List<String>>?) {
                /* ignore */
            }
        })
    }
}

class EnumConverterFactory : Converter.Factory() {
    override fun stringConverter(type: Type?, annotations: Array<out Annotation>?,
                                 retrofit: Retrofit?): Converter<*, String>? {
        if (type is Class<*> && type.isEnum) {
            return Converter<Any?, String> { value -> getSerializedNameValue(value as Enum<*>) }
        }
        return null
    }
}

fun <E : Enum<*>> getSerializedNameValue(e: E): String {
    try {
        return e.javaClass.getField(e.name).getAnnotation(SerializedName::class.java).value
    } catch (exception: NoSuchFieldException) {
        exception.printStackTrace()
    }

    return ""
}

enum class Season {
    @SerializedName("0")
    AUTUMN,
    @SerializedName("1")
    SPRING
}

interface Api {
    @GET("index.php?page[api]=test")
    fun getMonths(@Query("season_lookup") season: Season): Call<List<String>>

    companion object {
        const val ENDPOINT = "http://127.0.0.1"
    }
}

In logs you will see this:
D/OkHttp: --> GET http://127.0.0.1/index.php?page[api]=test&season_lookup=0
D/OkHttp: --> END GET
D/OkHttp: <-- HTTP FAILED: java.net.ConnectException: Failed to connect to /127.0.0.1:80

Used dependencies are:
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'

A: If you don't need it for all enums, I guess you can also skip the Converter.Factory setup and just add a toString method:
enum class Season {
    @SerializedName("0")
    AUTUMN,
    @SerializedName("1")
    SPRING;

    override fun toString(): String {
        return javaClass
                .getField(name)
                .getAnnotation(SerializedName::class.java)
                .value
    }
}

Or, if you need it for more than one:
val <E : Enum<E>> Enum<E>.serializedName: String
    get() = javaClass
            .getField(name)
            .getAnnotation(SerializedName::class.java)
            .value

enum class Season {
    @SerializedName("0")
    AUTUMN,
    @SerializedName("1")
    SPRING;

    override fun toString() = serializedName
}


text:
Q: ?: ternary conditional operator behaviour when leaving one expression empty I was writing a console application that would try to "guess" a number by trial and error, it worked fine and all but it left me wondering about a certain part that I wrote absentmindedly,
The code is:
#include <stdio.h>
#include <stdlib.h>

int main()
{
    int x,i,a,cc;
    for(;;){
    scanf("%d",&x);
    a=50;
    i=100/a;
for(cc=0;;cc++)
{
    if(x<a)
    {
        printf("%d was too big\n",a);
        a=a-((100/(i<<=1))?:1);

    }
    else if (x>a)
    {
        printf("%d was too small\n",a);
        a=a+((100/(i<<=1))?:1);

    }
    else
    {
        printf("%d was the right number\n-----------------%d---------------------\n",a,cc);
        break;
    }
}
}
return 0;
}

More specifically the part that confused me is
a=a+((100/(i<<=1))?:1);
//Code, code
a=a-((100/(i<<=1))?:1);

I used ((100/(i<<=1))?:1) to make sure that if 100/(i<<=1) returned 0 (or false) the whole expression would evaluate to 1 ((100/(i<<=1))?:***1***), and I left the part of the conditional that would work if it was true empty ((100/(i<<=1))?  _this space_    :1), it seems to work correctly but is there any risk in leaving that part of the conditional empty?

A: This is a GNU C extension (see ?: wikipedia entry), so for portability you should explicitly state the second operand.
In the 'true' case, it is returning the result of the conditional.
The following statements are almost equivalent:
a = x ?: y;
a = x ? x : y;

The only difference is in the first statement, x is always evaluated once, whereas in the second, x will be evaluated twice if it is true. So the only difference is when evaluating x has side effects.
Either way, I'd consider this a subtle use of the syntax... and if you have any empathy for those maintaining your code, you should explicitly state the operand. :)
On the other hand, it's a nice little trick for a common use case.

A: This is a GCC extension to the C language.  When nothing appears between ?:, then the value of the comparison is used in the true case.

The middle operand in a conditional expression may be omitted. Then if the first operand is nonzero, its value is the value of the conditional expression.
Therefore, the expression
    x ? : y
has the value of x if that is nonzero; otherwise, the value of y.
This example is perfectly equivalent to
    x ? x : y
In this simple case, the ability to omit the middle operand is not especially useful. When it becomes useful is when the first operand does, or may (if it is a macro argument), contain a side effect. Then repeating the operand in the middle would perform the side effect twice. Omitting the middle operand uses the value already computed without the undesirable effects of recomputing it.


text:
Q: How to fix vector not printing values from file I am trying to get some values line by line from a text file:
17.09 284.60 486.01 34.12 12.04 1.20 2.33 36.85 73.44
31.25 196.09 323.26 69.76 47.33 79.82 11.42 27.97 66.61
28.76 41.45 992.29 1.29 42.33 10.83 19.16 5.86 1.88

Taking these values and putting it into a vector. Each row has values to be used in a calculation.
My code:
#include <iostream>
#include <fstream>
#include <string>
#include <iterator>
#include <vector>
using namespace std;

int main() {

    ifstream xfile;
    string input;
    double num=0;
    int count = 0;
    vector <double> myvector;
    cout << "Input the file: ";
    cin >> input;

    xfile.open(input);

    if (xfile.is_open()) {
        cout << "File accessed!" << endl;
        while (getline(xfile, input)) {
            count++;
            myvector.push_back(num);
        }

    }

    else {

        cout << "File opening failed!"<<endl;
    }

    cout << "Numbers of lines in the file : " << count << endl;

    for (int i = 0; i < myvector.size(); i++) {

            cout << myvector[i] << "\t";

        }
    cin.fail();
    return 0;
}

My output is somewhat correct, only that it is printing out just zeroes:
https://ibb.co/xqwT1hR
EDIT: the input is for the name of file. "ahu_long.txt"

A: You never used your num variable.
double num=0;
....
....
size_t pos = 0;
std::string token;
while (getline(xfile, input)) {
            count++;
            // you need convert your "input" to a double and save it to "num"
            while ((pos = input.find(" ")) != std::string::npos) {
                token = input.substr(0, pos);
                // std::cout << token << std::endl;
                num = atof(token.c_str());
                myvector.push_back(num);
                input.erase(0, pos + delimiter.length());
            }
        }

Change your variable with what you read from the file.


text:
Q: Strong approximation and class number in the adelic setting $\DeclareMathOperator{\GL}{GL}\DeclareMathOperator{\ord}{ord}\DeclareMathOperator{\SL}{SL}$I have a question about a proposition from Daniel Bump's book, Automorphic Forms and Representations.  Here $A = \mathbb A$ is the adeles of $F$, and $A_f = \prod\limits_{v < \infty}' F_v$ are the finite adeles.

I am trying to understand why (ii) is true in the case $K_0 = \prod\limits_{v < \infty} \GL_n(\mathcal O_v)$.  If $\operatorname{Id}(F)$ is the group of fractional ideals of $F$, and $P(F)$ is the group of principal ideals, I want to say that the surjective homomorphism $$\GL_n(\mathbb A) \rightarrow \operatorname{Id}(F)/P(F)$$
$$ x \mapsto \prod\limits_{\mathfrak p < \infty} \mathfrak p^{\ord_{\mathfrak p}(\det(x_{\mathfrak p}))}P(F)$$
induces a bijection of sets
$$\GL_n(F) \GL_n(F_{\infty})\backslash \GL_n(\mathbb A)/K_0 \rightarrow \operatorname{Id}(F)/P(F)$$
I've checked that this map is well defined and surjective.  For injectivity, I suppose $g, g' \in \GL_n(\mathbb A_f)$ (I may assume from the beginning that $g,g' \in \GL_n(\mathbb A)$ each have trivial infinite part, since if not then I can modify by multiplication from $\GL(F_{\infty})$) with
$$\prod\limits_{\mathfrak p}\mathfrak p^{\ord_{\mathfrak p}(\det(g_{\mathfrak p}))} \equiv \prod\limits_{\mathfrak p}\mathfrak p^{\ord_{\mathfrak p}(\det(g'_{\mathfrak p}))} $$
Then there must exist an $\alpha \in \GL_n(F)$ such that for each (finite) prime $\mathfrak p$,
$$\ord_{\mathfrak p}(\det(\alpha g_{\mathfrak p})) = \ord_{\mathfrak p}(\det( g'_{\mathfrak p})) $$
Then for each prime $\mathfrak p$, $\det(\alpha g_{\mathfrak p})$ and $\det( g'_{\mathfrak p})$ generate the same fractional ideal in $F_{\mathfrak p}$, so there exists a $k_{\mathfrak p} \in \GL_n(\mathcal O_{\mathfrak p})$ such that $\det(\alpha g_{\mathfrak p}k_{\mathfrak p})$ and $\det( g'_{\mathfrak p})$.  If we set $k = (k_{\mathfrak p}) \in K_0$, then we have shown that
$$\alpha g k g'^{-1} \in \operatorname{SL}_n(\mathbb A)$$
This doesn't quite give me what I want.  I need to further multiply $g$ on the left by $\GL_n(F)$ and on the right by $K_0$ to make it actually equal to $g'$.  Any idea?
One way I thought was to let $j$ be the embedding $\SL_n(F) \rightarrow \SL_n(\mathbb A_f)$.  By (i), the image of $j$ is dense in $\SL_n(\mathbb A_f)$.  Also, $K_0 \cap \SL_n(\mathbb A_f)$ is open in $\SL_n(\mathbb A_f)$, so the product set
$$g'^{-1}j\big(\SL_n(F) \big) \alpha g k\bigg( K_0 \cap \SL_n(\mathbb A_f) \bigg) \subset \SL_n(\mathbb A_f)$$
being open and dense, must equal to $\SL_n(\mathbb A_f)$.  So there exists a $\beta \in \SL_n(F)$ and $k' \in K_0 \cap \SL_n(\mathbb A_f)$ such that
$$g'^{-1} \beta^{-1} \alpha gkk'^{-1} = 1$$
which implies $\alpha gk = \beta g'k'$.  Unfortunately, this is circular since apparently what I want to prove is used to prove (i).


text:
Q: add attribute to asp generated html elements - don't have code it was compiled from If I have two inputs in a file I've received which are "put together" with aspx

        <asp:Label ID="Label1" runat="server" Text="User Name:" CssClass="login_label"></asp:Label>

        <asp:TextBox ID="txtUserName" runat="server" TabIndex="1" Width="200px"></asp:TextBox>

        <asp:RequiredFieldValidator ID="rfvUserName" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="txtUserName">Required</asp:RequiredFieldValidator>

        <asp:Label ID="Label2" runat="server" Text="Password:" CssClass="login_label"></asp:Label>

        <asp:TextBox ID="txtPassword" runat="server" TabIndex="2" Width="200px" TextMode="Password"></asp:TextBox>

        <asp:RequiredFieldValidator ID="rfvPassword" runat="server" ControlToValidate="txtPassword" ErrorMessage="Required">Required</asp:RequiredFieldValidator>

How can I add autocapitalize="off" attribute to the inputs? Whenever I try to add something to this code——well, most of the time——it just totally breaks. But I would like it to be usable on mobile devices. Thanks for your help!

A: in the code behind:
NameOfInput.Attributes.Add('autocapitalize','off')

that is how you add an attribute to an html element visible by the server.
javascript: be wary this may not work right in all versions of IE. This should be in the document load event
document.getElementById('<%txtUserName.ClientID%>').setAttribute('autocapitalize','off');

jQuery: same warning as above.
also this should be in $(docuemnt).ready() function or load event.
$('#<%txtUserName.ClientID%>').attr('autocapitalize','off');

see this question for a better reason why you can't do what  you want to here:
Autocapitalize attribute on input element (used for iOS) breaks validation
one last edit:
Apparently from the IOS development docs there is an example where you can add the attribute to your form element.
http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/DesigningForms/DesigningForms.html
So maybe you can add it to the form element, which is not an asp namespace control. the validator may cry but you might not get a compile error.


text:
Q: C++ Confusing scope of redeclared variables in for loop The following while loop does not terminate. This is because the variable x is being re-declared inside the while loop. But I don't understand why in the second iteration onward, the statements x<10 and y=x considers the x defined in the outer scope and not the x defined in the block scope in the following statement.
Is this because once the first iteration ends, the x defined in the block scope is destroyed and the loop begins to execute fresh?
#include<iostream>
int main () {
  int x = 0, y;
  while(x <10 ){
    y = x;
    std::cout<<"y is :"<< y <<std::endl;
    int x = y + 1;
    std::cout<<"x is :"<< x <<std::endl;
  }
  std::cout<<"While loop is over"<<std::endl;
}

A: Every iteration the while loop evaluates the outer scope x and y is assigned the value of the outer scope x. After that another x is defined in the inner scope which is what the second std::cout uses, but the program makes no other use of the inner x
In the code below I replaced the inner x with z but otherwise the behavior is identical. The only difference is that there is not a second x within a more inner scope to hide the outer one:
#include<iostream>

int main () {
    int x = 0, y;
    while(x <10 ){
        y = x;
        std::cout<<"y is :"<< y <<std::endl;
        int z = y + 1;
        std::cout<<"z is :"<< z <<std::endl;
    }
    std::cout<<"While loop is over"<<std::endl;
}

Below I have an example that is intended to clear the confusion. In the inner scope x is not being "re-declared", a new x is being declared and it goes out of scope after the }:
#include<iostream>

int main () {
    int x = 1;
    {
        int x = 2;
        std::cout << x << '\n'; // 2
    }
    std::cout << x << '\n'; // 1
}

A: Yes, you understand it correctly. So every time when compare in while, it is using the outer x.
while (x < 10) {
    y = x; //Here the x is the outer one. The inner one does not exist yet.
    std::cout << "y is :" << y << std::endl;
    int x = y + 1; // From here, x will refer to the inner one.
    std::cout << "x is :" << x << std::endl;
    // inner x is destroyed.
}


text:
Q: Flutter ios does not scroll properly to the end I have some scrolls in my app and they work perfectly in the android but in the ios they don't work properly when they are scrolled to the end.

it should be like this:

screen code:
the 85 bottom padding is for bottom navigation.
ListView.separated(
                        padding: EdgeInsets.only(
                            bottom: constraints.maxHeight > (size.height - 70)
                                ? 85
                                : 0),
                        itemBuilder: (context, index) {
                          ListModel list = bookProvider.lists[index];
                          return HorizontalList(
                            list: list,
                            itemOnTap: (index) => Navigator.push(
                                context,
                                MaterialPageRoute(
                                  builder: (context) => BookDetailsScreen(
                                      book: list.books[index]),
                                )),
                          );

A: Try to add physics in Listview as below
ListView.separated(
           physics: const AlwaysScrollableScrollPhysics(), // <-- Add this
               padding: EdgeInsets.only(
                  bottom: constraints.maxHeight > (size.height - 70)
                        ? 85
                        : 0),
                    itemBuilder: (context, index) {
                      ListModel list = bookProvider.lists[index];
                      return HorizontalList(
                        list: list,
                        itemOnTap: (index) => Navigator.push(
                            context,
                            MaterialPageRoute(
                              builder: (context) => BookDetailsScreen(
                                  book: list.books[index]),
                            )),
                      );


text:
Q: Android Studio Cannot validate breakpoints I have SomeActivity that extends BaseActivity that extends Activity.
When I put breakpoints into Android Studio, it keeps them red with no either cross or checkmark.
EDIT: The breakpoints are not validated, but they work when the activity comes to that point.

A: Seems like the issue is with proguard.
The solution was to put one debug point into onCreate method, and then other debug points will be validated.


text:
Q: Disadvantages of linux kernel module? I am trying to understand the disadvantages of using Linux kernel modules. I understand the benefits of using them: the ability to dynamically insert code into a running system without having to recompile and reboot the base system. Given this strong advantage, I was guessing most of kernel code should then be in kernel modules instead as part of base kernel, but that does not seem to be the case -- a good number of core subsystems (like memory management) still go into the base kernel.
One reason I can think of is that kernel modules are loaded very late in the boot process and hence core functionality has to go in the base kernel. Another reason I read was about fragmentation.
I didn't really understand why kernel modules cause memory fragmentation, can someone please explain? Are there any other downsides of using kernel modules?

A: Yes, the reason that essential components (such as mm) cannot be loadable modules is because they are essential -- the kernel will not work without them.
I can't find any references claiming the effects of memory fragmentation with regard to loadable modules is significant, but this part of the LLKM how-to might be interesting reading for you.
I think the question is really part and parcel of the issue of memory fragmentation generally, which happens on two levels: the fragmentation of real memory, which the kernel mm subsystem manages, and the fragmentation of virtual address space which may occur with very large applications (which I'd presume is mostly the result of how they are designed and compiled).
With regard to the fragmentation of real memory, I do not think this is possible at finer than page size (4 KB) granularity.  So if you were reading 1 MB of virtually contiguous space that is actually 100% fragmented into 1024 pages, there may be 1000 extra minor operations involved.  In that bit of the how-to we read:

The base kernel contains within its prized contiguous domain a large
  expanse of reusable memory -- the kmalloc pool. In some versions of
  Linux, the module loader tries first to get contiguous memory from
  that pool into which to load an LKM and only if a large enough space
  was not available, go to the vmalloc space. Andi Kleen submitted code
  to do that in Linux 2.5 in October 2002. He claims the difference is
  in the several per cent range.

Here the vmalloc space, which is where userspace applications reside, would be that which is potentially prone to fragment into pages.  This is simply the reality of contemporary operating systems (they all manage memory via virtual addressing).  We might infer from this that virtual addressing  could represent a performance penalty of "several percent" in userland as well, but in so far as virtual addressing is necessary and inescapable in userland, it is only in relation to something completely theoretical.
There is the possibility for further compounding fragmentation by the fragmentation of a process's virtual address space (as opposed to the real memory behind it), but this would never apply to kernel modules (whereas the last paragraph apparently could).
If you want my opinion, it is not worth much contemplation. Keep in mind that even with a highly modular kernel, the most used components (fs, networking, etc) will tend to be loaded very early and remain loaded, hence they will certainly be in a contiguous region of real memory, for what it is worth (which might be a reason to not pointlessly load and unload modules).

A: With a monolithic kernel, in theory a single contiguous block of memory can be allocated for the kernel. If modules are loaded (and unloaded) on demand, then it's improbable that all kernel memory will be contiguous, and hence by definition it will be fragmented. The trade off is that a modular kernel will usually use far less memory that a monolithic kernel. This is certainly true with a default distro monolithic kernel, which likely has many unused drivers, though less true if you build your own monolithic kernel.
Some subsystems simply don't lend themselves to being modular, memory management is clearly one, SMP another. Process scheduling isn't modular, but I/O scheduling strategy is. Other subsystems aren't modular likely because of complex interdependencies, like TCP/IP.
Another problem with modules is that they're not so good if they drive the device you need to boot from, solutions like initrd work around this.
A final consideration is security, allowing loadable modules is a potential risk, e.g. kernel loadable rootkit like knark. See http://www.la-samhna.de/library/rootkits/index.html and http://www.sans.org/security-resources/malwarefaq/Ptrace.php . You can reduce this risk by enforcing signed modules (since kernel 3.7), loading a lockdown module last, or other hardening.

A: I don't know what other disadvantages there might be to compiling code as a loadable kernel module rather than directly into the kernel image, but to use your particular example, suppose that memory management was built as a kernel module rather than built into the kernel binary image itself.

*

*How would the kernel allocate the memory for an initial RAM disk?

*How would the kernel allocate the memory for the structures necessary to mount a file system?

*How would the kernel allocate the memory in which to load the memory management module?

*How would the memory management module know what memory has already been claimed by other parts of the kernel (possibly other loadable kernel modules which were needed to access the memory management module)?

As you can see, this immediately opens a whole potential can of worms. Task scheduling is another similarly core kernel concept.
From another perspective, what useful work could the kernel do without the memory management module? It's not like a hardware driver which can simply be disabled if the hardware isn't installed on the system; it's a basic feature that the kernel itself needs to even bootstrap.
While true microkernels have certain benefits from a separation of concern and code readability/understandability point of view, even they need certain things inside the kernel itself to work at all. Memory and task handling are among the core concepts of a multitasking operating system kernel -- and as is illustrated by the above list, are for all intents and purposes required for anything to work at all. Trying to separate it into a separately loaded component would, if nothing else, add a large amount of complexity for absolutely no gain (since everyone would be loading that module anyway).

A: I think the most important side effect of LKM-s is the speed.
When you use LKMs, you can delay loading them, thus resulting an earlier appear of the login prompt. (over serial, for ex.)
But this is a downside too. If you store your modules on a filesystem not available during boot, loading them is impossible before mounting that filesystem, thus resulting a later availability and device initialization.
Otherwise, as mr.spuratic pointed out, you shouldn't compile your HDD and filesystem drivers as modules, or it's maybe impossible to reach the modules (if you store them on the HDD in my example).
A related advantage of using LKMs is that the compiled kernel blob won't be so big: You should have a large boot partition available before the kernel start's operating.

A: Linux kernel module code is allocated using vmalloc().  vmalloc() has no issue with fragmentation, because it is virtual memory.  Memory is divided into pages, usually 4Kb, and virtual memory allows remapping fragmented physical pages as a contiguous virtual block.

In the other corner is vmalloc(), which allocates virtually contiguous (but physically dispersed) pages in a separate virtual address space. vmalloc() is relatively slow, but it can perform large allocations that look contiguous to the kernel. It is thus used, for example, to allocate space for code from loadable modules.
https://lwn.net/Articles/57800/


text:
Q: Novel about a sorceress called Rumour who has spells woven into her hair Novel about a sorceress called Rumour who has spells woven into her hair. Her hair is long and black. Her hair is cut off for some reason and her friends are tortured by being roasted in a cage over a fire with a really graphic description of cooking them. Fat sizzling as they were slow cooked and the skin split which made the meat tender.
I read it in the mid to late 90s but I think it's from the 80s.
There was a character called the Fisher King who everyone was afraid of. He had a barbed penis.
It has a medieval vibe in terms of clothing, weapons and social structure.

A: This is Sorceress by Sarah Rayne. It features a character named Rumour who's a sorceress and who weaves spells into her hair.

'Better,' said Rumour and, slowly and deliberately, every movement
  studied, she began to dance, shaking her hair out so that it whirled
  about her head, silken and perfumed. The feel of it brushing her
  shoulders gave her courage, for she had twined into her hair a great
  deal of strength and a great many subtle spells.

In a later scene, various characters are roasted in a cage.


text:
Q: SQLite vertical stack I have two tables:
data1
A B
0 1
0 1

data2
A B
2 3
2 3

I want to create a 4th table which is a vertical stack of the above:
data3
A B
0 1
0 1
2 3
2 3

I am unfamiliar with SQLite, and am currently using SAS, where this can be done using a DATA step query:
data data3;
set data1 data2;
run;

How can I do this in SQLite?

A: You can use union all:
create table data3
    select A, B from data1 union all
    select A, B from data2;

Note that in SQL, you don't need to create a new table to do this.  You can just put the union all in a subquery:
select d.*
from (select A, B from data1 union all
      select A, B from data2
     ) d;

This is often a better idea than creating another table.

A: You could use CREATE TABLE ... AS SELECT and  INSERT INTO table SELECT ... queries, like:
CREATE TABLE data3 AS SELECT * FROM data1;
INSERT INTO data3 SELECT * FROM data2;


text:
Q: How to fix the maxlistenersexceeded warning in nodejs On my studoes with NodeJS I've found an issue/warning the is getting me a bit worried because I would like to avoid memory leaks, but since this language is a bit new to me, I can't find which of my code is doing it.
const MongoClient = require('mongodb').MongoClient;
const assert = require('assert');
const fs = require("fs");

const conversor = require("./converterSiteEmObjeto");

// Connection URL
const url = 'mongodb://localhost:27017';

// Database config
const client = new MongoClient(url, { useNewUrlParser: true, useUnifiedTopology: true });

async function salvarBanco(listaLinks) {
    try {
        await client.connect();

        console.log("Connected successfully to server");

        const db = client.db('consultadados');

        // Iterates through the list of links
        for (link of listaLinks) {
            // scrape data from link and return a JS object
            let resultado = await conversor(link);

            // insert object into DB and asserts
            let r = await db.collection('cnpjs').insertOne(resultado);
            assert.equal(1, r.insertedCount);
        }
    } catch (err) {
        console.log(err.stack);
    }

    client.close();
    console.log("Done...");
};

function converterSitemapEmListaLinks() {
    // Reads file containing links
    fs.readFile('links/sitemap.txt', 'utf8', function (err, contents) {
        //creates a array of links (100+ links)
        let listaLinks = contents.split("\n");

        //saves to database
        salvarBanco(listaLinks);
    });
}

converterSitemapEmListaLinks();

It runs just fine, but after a few dozen iteractions on listaLinks (list of links) I get the following message:
" MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added to [process]. Use emitter.setMaxListeners() to increase limit "
I know what it means, what I would like is to know how to fix it instead of simply setting the listeners to a higher max value.


text:
Q: How to turn a hex grid into a squished hex grid? I have these functions for a hex grid.  They work great for a regular hex grid.  What would these functions be for a squished hex grid.  By squished hex grid I mean a grid where each hex is wider than it is tall.
coordinates_to_pixel = function(x, y) {
    var pixel_x = s_hex_size * 3/2 * x
    var pixel_y = s_hex_size * Math.sqrt(3) * (y + x/2)
    return { x: pixel_x, y: pixel_y }
}

pixel_to_coordinates = function(x, y) {
    var q = 2/3 * x / s_hex_size
    var r = (1/3 * Math.sqrt(3) * y - 1/3 * x) / s_hex_size
    var cube = convert_axial_to_cube_coordinates(q,r)
    var round = round_cube_coordinates(cube.x, cube.y, cube.z)
    var axial = convert_cube_to_axial_coordinates(round.x, round.y, round.z)
    return { x:axial.x, y:axial.y }
}

hex_points = function(x, y) {
    var pixel = coordinates_to_pixel(x,y)

    var points = ''
    for (var i = 0; i < 6; i++) {
        var angle = 2 * Math.PI / 6 * i

        var point_x = (hex_size * Math.cos(angle)) + pixel.x + canvas_width/2
        var point_y = (hex_size * Math.sin(angle)) + pixel.y + canvas_height/2

        if (i != 0) { points = points + ' '; }
        points = points + point_x.toString() + ',' + point_y.toString()
    }
    return points
})

Here's an image of what I mean by squished hex grid. hex grid image
Here are the conversion and rounding functions.
convert_axial_to_cube_coordinates = function(q,r) {
    return {
        x: q,
        y: -1 * q - r,
        z: r
    }
}

convert_cube_to_axial_coordinates = function(x,y,z) {
    return {x: x, y: z}
}

round_cube_coordinates = function(x,y,z) {
    var rx = Math.round(x)
    var ry = Math.round(y)
    var rz = Math.round(z)

    var x_diff = Math.abs(rx - x)
    var y_diff = Math.abs(ry - y)
    var z_diff = Math.abs(rz - z)

    if (x_diff > y_diff && x_diff > z_diff) {
        rx = -1 * ry - rz
    } else if (y_diff > z_diff) {
        ry = -1 * rx - rz
    } else {
        rz = -1 * rx - ry
    }

    return {x: rx, y: ry, z: rz}
}

A: Figured it out.  coordinates_to_pixel is Math.sqrt(3) * squish factor.  Pixel_to_coordinates is Math.sqrt(3) / squish_factor.  One is multiply the other is divide.


text:
Q: Taxonomies в WorldPress или ЧПУ Всем привет! Два дня мучаюсь с данной проблемой:
Имеется таксономия с таким выводом:
www.mydomian.ru/escort-cat/brunette/
Нужно поменять ссылку на такой вид:
www.mydomian.ru/brunette-escort
Много перерыл материала, очень много вариантов но никакой не работает. Точнее работает, но не так как нужно, сразу пропадают другие настройки. Нашел данный пункт в таксономии связанный с путями, помогите настроить. Или хотя бы дайте подсказку в какую сторону копать..
настройка ЧПУ таксономии

A: Попробуйте плагин Redirection, он как раз для таких задач предназначен.

A: В общем нагугил как убрать slug посредством вставки кода в function.php, может кому-нибудь в будущем понадобиться, оставляю тут:
// смена запроса
 add_filter('request', 'true_smenit_request', 1, 1 );

function true_smenit_request( $query ){
$taxonomia_name = 'escort-cat'; // укажите название таксономии здесь, это также могут быть рубрики category или метки post_tag

// запросы для дочерних элементов будут отличаться, поэтому нам потребуется дополнительная проверка
if( $query['attachment'] ) :
    $dochernia = true; // эту переменную задаём для себя, она нам потребуется дальше
    $urlyarlyk = $query['attachment']; // это ярлык данного термина/рубрики/метки
else:
    $dochernia = false;
    $urlyarlyk = $query['name']; // как видите, здесь ярлык хранится в другой переменной запроса
endif;

$termin = get_term_by('slug', $urlyarlyk, $taxonomia_name); // получаем элемент таксономии по ярлыку

if ( isset( $urlyarlyk ) && $termin && !is_wp_error( $termin )): // если такого элемента не существует, прекращаем выполнение кода

    // для страниц дочерних элементов код немного отличается
    if( $dochernia ) {
        unset( $query['attachment'] );
        $parent = $termin->parent;
        while( $parent ) {
            $parent_term = get_term( $parent, $taxonomia_name);
            $urlyarlyk = $parent_term->slug . '/' . $urlyarlyk; // нам нужно получить полный путь, состоящий из ярлыка текущего элемента и всех его родителей
            $parent = $parent_term->parent;
        }
    } else {
        unset($query['name']);
    }

    switch( $taxonomia_name ): // параметры запроса для рубрик и меток отличаются от других таксономий
        case 'category':{
            $query['category_name'] = $urlyarlyk;
            break;
        }
        case 'post_tag':{
            $query['tag'] = $urlyarlyk;
            break;
        }
        default:{
            $query[$taxonomia_name] = $urlyarlyk;
            break;
        }
    endswitch;

endif;

return $query;

}

// смена самой ссылки
add_filter( 'term_link', 'true_smena_permalink', 10, 3 );

function true_smena_permalink( $url, $term, $taxonomy ){

$taxonomia_name = 'escort-cat'; // название таксономии, тут всё понятно
$taxonomia_slug = 'escort-cat'; // ярлык таксономии - зависит от параметра rewrite, указанного при создании и может отличаться от названия,
// как например таксономия меток это post_tag, а ярлык по умолчанию tag

// выходим из функции, если указанного ярлыка таксономии нет в URL или если название таксономии не соответствует
if ( strpos($url, $taxonomia_slug) === FALSE || $taxonomy != $taxonomia_name ) return $url;

$url = str_replace('/' . $taxonomia_slug, '', $url); // если мы ещё тут, выполняем замену в URL

return $url;
 }

add_action('template_redirect', 'true_delaem_redirect');

 function true_delaem_redirect() {

// указываем здесь свои значения
$taxonomia_name = 'escort-cat';
$taxonomia_slug = 'escort-cat';

// выходим из функции, если ярлыка таксономии нет в URL
if( strpos( $_SERVER['REQUEST_URI'], $taxonomia_slug ) === FALSE)
    return;

// делаем суперскую проверку, чтобы случайно не редиректнуть страницы, которые не следует
if( ( is_category() && $taxonomia_name=='category' ) || ( is_tag() && $taxonomia_name=='post_tag' ) || is_tax( $taxonomia_name ) ) :

        wp_redirect( site_url( str_replace($taxonomia_slug, '', $_SERVER['REQUEST_URI']) ), 301 ); // сам редирект
    exit();

endif;

 }


text:
Q: MathJS parse values from input field I'm trying to parse some values like x^2 and x from an input field, then dividing them using mathjs
This is my JS
function LDivide() {
            ldft = document.getElementById("LD1").value;
            ldst = document.getElementById("LD2").value;

            var LDans = math.simplify(math.parse(ldft / ldst));
            document.getElementById("LDansBox").innerHTML = LDans;
            document.getElementById("LDansBox").style.display = "inline"
        }

html as follows. I'd put x^2 in the first field and x in the second, for example, in order to get x as an answer because x^2/x = x
<input type="text" id="LD1" placeholder="First Term"> | <input type="text" id="LD2" placeholder="Second Term">

<button id="LDSubmit" class="btn btn-success" onclick="LDivide()">=</button>

It simply says NaN.
I've tried searching for a solution to no success.


text:
Q: Iterating (non-simultaneously) over multiple lists using purrr? I want to create several data frames that are filtered using three variables in my dataset:
state is a categorical variable with two possible values -- va and az;
log_aa_3r and log_lat_3r are both continuous numeric variables.
I want to end up with 4 data frames: 2 for each state, and the dfs for each state will be filtered so that one has all cases where log_aa_3r is finite, and the other will have all cases where log_lat_3r is finite.
I can do this manually as follows:
library(tidyverse)
az_aa <- combine_dat %>%
  filter(state == "az" & is.finite(log_aa_3r))

az_lat <- combine_dat %>%
  filter(state == "az" & is.finite(log_lat_3r))

va_aa <- combine_dat %>%
  filter(state == "va" & is.finite(log_aa_3r))

va_lat <- combine_dat %>%
  filter(state == "va" & is.finite(log_lat_3r))

However, I'd like to figure out how to do this iteratively.
I feel like I need to use nested map statements to solve this problem, but I can't quite seem to get the code right. I've tried the following, and it produces the output structure I expect, but all of the dfs in the outputs have 0 observations:
states <- list('az', 'va')
use_vars <- list('log_aa_3r', 'log_lat_3r')

dfs <- map(states, function(x)
           {map(use_vars,
                function(y) {comb_test %>%
                 filter(state == x & is.finite(y))}
                )}
           )

Here's a small set of data to help with the problem:
comb_test <- structure(list(state = c("az", "az", "va", "az", "az", "va",
"va", "az", "va", "va", "az", "az", "az", "va", "az", "az", "va",
"az", "az", "va"), log_aa_3r = c(0.122043015617762, NaN, 0.418616817019589,
NaN, -0.237849698703905, 0.11553768471152, NA, -Inf, 0.253046912790677,
0.71751672463271, -Inf, -Inf, -Inf, 0.125839047001367, -Inf,
0.372823951010564, 0.43784426926065, -Inf, -Inf, NA), log_lat_3r = c(0.0393482723090127,
-0.352428653057281, -0.0641399653902218, -0.306485199414877,
-0.696871579650928, -0.191460177039553, NA, -0.361114213161674,
-0.0786756534620034, 0.216382765848136, 0.0344915670084646, 0.00130866713103227,
0.756875541289108, NA, -0.216873938300614, -0.0627820764799239,
0.261387831919094, -0.018314845703395, -0.161990655409072, NA
)), row.names = c(NA, -20L), class = c("tbl_df", "tbl", "data.frame"
))

Any help would be greatly appreciated!
EDIT:
I got it to work using the following code. It's maybe not the most elegant because I ended up having tbl names that were identical to variable names, but it does what I was trying to do.
df2 <-
  map(states, function(x)
{map_at(combine_test, c("log_aa_3r", "log_lat_3r"), function(y)
{combine_test %>%
    filter(state == x & is.finite(y))})}
  )

df_list <- list(az_aa = df2[[1]]$log_aa_3r, az_lat = df2[[1]]$log_lat_3r,
                va_aa = df2[[2]]$log_aa_3r, va_lat = df2[[2]]$log_lat_3r)

A: Here's one way to do this. First, you can generate all your conditions with tidyr::crossing
states <- c('az', 'va')
use_vars <- c('log_aa_3r', 'log_lat_3r')
conditions <- tidyr::crossing(states, use_vars)

Then you can use purrr::pmap to iterate over those two lists
purrr::pmap(conditions, function(states, use_vars) {
  comb_test %>% filter(state==!!(states) & is.finite(!!sym(use_vars)))
})

Here we use splicing (!!) to interject the values and use sym() to turn the string version of the variable name into a symbol


text:
Q: ASP.NET with Window Form Application I am a beginner in the Dot NET environment and not really happy with it from what I have read and done with Dot NET so far.
I need to migrate or write a program that will utilize ASP.NET with window Form Application. For whatever reason, I can't create this program as a single project. Am I miss understanding what Dot NET is or is that how Dot NET designed to be?
I have Delphi Prism(DP), which is based on Visual Studio 2010. Under DP, I can only create separate projects for ASP.NET and/or Windows Form Application. I can not seem to use little bit of both world under a single project. Is it even possible to do that?
My Delphi Prism Dot NET program is supposed to be part window based and part web-based. As a window based program, it is supposed to send and receive data on the serial port and network. As a web-based, it is supposed to give the user access to the window-based (server side) of the program on the Internet or LAN or Intranet.
I ran all their demos and searched online for help. Still, I am having hard time with it.
I am getting frustrated. I thought, programming in Dot NET was going to be a breeze, but it is turning out to be a problem. I should know this by now for Dot NET being Microsoft.
If anyone can give me hints or more information to help me understand Dot NET little better, I would appreciate it. Thank you.

A: They are separate projects for separate problem domains. You would not and can not intermingle an ASP.NET project and a Windows Forms project.
Choose a project type and build out something simple. After you have crossed that bridge move that concept to another project type (WPF, Silverlight, ASP.NET MVC, etc...) and note the differences.
The underlying language will carry across projects such as C#, VB, etc...however the project type/framework will not.

A: They are designed to do two completely different things. Windows Forms, or just Winforms, is a .NET 2.0 technology designed to create executable applications that run in Windows. ASP.NET is designed to use the basic .NET Framework as a server-side engine behind a web application that serves up HTML pages to a web browser.
There are ways to use HTML within a Winforms app, and ways to invoke .NET winforms apps from HTML, but traditionally they are two uses of the basic .NET Framework to target two different end-user experiences.

A: I think you'll have to create two separate projects. The problems and especially their platforms are completely different.


text:
Q: How can I match a string with a regex in Bash? I am trying to write a bash script that contains a function so when given a .tar, .tar.bz2, .tar.gz etc. file it uses tar with the relevant switches to decompress the file.
I am using if elif then statements which test the filename to see what it ends with and I cannot get it to match using regex metacharacters.
To save constantly rewriting the script I am using 'test' at the command line, I thought the statement below should work, I have tried every combination of brackets, quotes and metacharaters possible and still it fails.
test sed-4.2.2.tar.bz2 = tar\.bz2$; echo $?
(this returns 1, false)

I'm sure the problem is a simple one and I've looked everywhere, yet I cannot fathom how to do it.  Does someone know how I can do this?

A: A Function To Do This
extract () {
  if [ -f $1 ] ; then
      case $1 in
          *.tar.bz2)   tar xvjf $1    ;;
          *.tar.gz)    tar xvzf $1    ;;
          *.bz2)       bunzip2 $1     ;;
          *.rar)       rar x $1       ;;
          *.gz)        gunzip $1      ;;
          *.tar)       tar xvf $1     ;;
          *.tbz2)      tar xvjf $1    ;;
          *.tgz)       tar xvzf $1    ;;
          *.zip)       unzip $1       ;;
          *.Z)         uncompress $1  ;;
          *.7z)        7z x $1        ;;
          *)           echo "don't know '$1'..." ;;
      esac
  else
      echo "'$1' is not a valid file!"
  fi
}

Other Note
In response to Aquarius Power in the comment above, We need to store the regex on a var
The variable BASH_REMATCH is set after you match the expression, and ${BASH_REMATCH[n]} will match the nth group wrapped in parentheses ie in the following ${BASH_REMATCH[1]} = "compressed" and ${BASH_REMATCH[2]} = ".gz"
if [[ "compressed.gz" =~ ^(.*)(\.[a-z]{1,5})$ ]];
then
  echo ${BASH_REMATCH[2]} ;
else
  echo "Not proper format";
fi

(The regex above isn't meant to be a valid one for file naming and extensions, but it works for the example)

A: To match regexes you need to use the =~ operator.
Try this:
[[ sed-4.2.2.tar.bz2 =~ tar.bz2$ ]] && echo matched

Alternatively, you can use wildcards (instead of regexes) with the == operator:
[[ sed-4.2.2.tar.bz2 == *tar.bz2 ]] && echo matched

If portability is not a concern, I recommend using [[ instead of [ or test as it is safer and more powerful. See What is the difference between test, [ and [[ ? for details.

A: shopt -s nocasematch
if [[ sed-4.2.2.$LINE =~ (yes|y)$ ]]
 then exit 0
fi

A: if [[ $STR == *pattern* ]]
then
    echo "It is the string!"
else
    echo "It's not him!"
fi

Works for me! GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)

A: I don't have enough rep to comment here, so I'm submitting a new answer to improve on dogbane's answer. The dot . in the regexp
[[ sed-4.2.2.tar.bz2 =~ tar.bz2$ ]] && echo matched
will actually match any character, not only the literal dot between 'tar.bz2', for example
[[ sed-4.2.2.tar4bz2 =~ tar.bz2$ ]] && echo matched
[[ sed-4.2.2.tar§bz2 =~ tar.bz2$ ]] && echo matched

or anything that doesn't require escaping with '\'.
The strict syntax should then be
[[ sed-4.2.2.tar.bz2 =~ tar\.bz2$ ]] && echo matched

or you can go even stricter and also include the previous dot in the regex:
[[ sed-4.2.2.tar.bz2 =~ \.tar\.bz2$ ]] && echo matched

A: Since you are using bash, you don't need to create a child process for doing this. Here is one solution which performs it entirely within bash:
[[ $TEST =~ ^(.*):\ +(.*)$ ]] && TEST=${BASH_REMATCH[1]}:${BASH_REMATCH[2]}

Explanation: The groups before and after the sequence "colon and one or more spaces" are stored by the pattern match operator in the BASH_REMATCH array.


text:
Q: MySQL WHERE clause with JOIN I've got a SQL query which joins columns from three different tables and works fine. I only want this query to run if Room_ID is in an array I've got. The two queries work fine separately but I can't get them working together. This is what I'd like to run, if this condition is met:
SELECT message.Message, message.Period, message.Date, teacher.Firstname, teacher.Lastname, rooms.Room_ID, rooms.Description
FROM message JOIN
teacher
ON teacher.Teacher_ID = message.Teacher_ID JOIN
rooms
ON message.Room_ID = rooms.Room_ID

And this is the condition:
WHERE message.Room_ID IN myArray

I've tried brackets and putting the WHERE clause in different places but to no avail.

A: You could try this:
Say, $array is your array.
$sql = "SELECT message.Message, message.Period, message.Date, teacher.Firstname, teacher.Lastname, rooms.Room_ID, rooms.Description
FROM message LEFT JOIN teacher ON teacher.Teacher_ID = message.Teacher_ID LEFT JOIN rooms ON message.Room_ID = rooms.Room_ID WHERE message.Room_ID IN ".$array;

Hope this helps.
Peace! xD

A: $sql = "
    SELECT message.Message, message.Period, message.Date, teacher.Firstname, teacher.Lastname, rooms.Room_ID, rooms.Description
    FROM message
    LEFT JOIN teacher ON teacher.Teacher_ID = message.Teacher_ID
    LEFT JOIN rooms ON message.Room_ID = rooms.Room_ID
    WHERE message.Room_ID IN (".implode(",", $myArray).")";


text:
Q: Styling HTML/CSS to Achieve the Given Effect I'm using fancyBox3 in a project and I want to achieve the following:

I wanted to know if there is a CSS trick to achieve it or if it requires some math and calculation to make it fit perfectly?

A: Have a look at masonry.js - it does all the calculations for you to make your images tesselate as you resize the screen etc.

A: Basically, there are two ways - using JS (there are ton of scripts, for example https://github.com/brunjo/rowGrid.js, https://haltu.github.io/muuri/, https://github.com/kombai/freewall, http://miromannino.github.io/Justified-Gallery/) or CSS.
The problem with CSS is that it is still not possible to create true "masonry style layout", but you can archive something similar, try googling for "masonry using css", you will find many articles and examples about this topic, for example, this one - https://medium.com/@andybarefoot/a-masonry-style-layout-using-css-grid-8c663d355ebb


text:
Q: Cannot create service: service port not found when create treafik ingress route When I am create treafik ingress,it throw this error:
{"ingress":"kubernetes-dashboard-route","level":"error","msg":"Cannot create service: service port not found","namespace":"kube-system","providerName":"kubernetescrd","serviceName":"kubernetes-dashboard","servicePort":8443,"time":"2020-01-30T18:12:15Z"}
{"ingress":"kubernetes-dashboard-route","level":"error","msg":"Cannot create service: service port not found","namespace":"kube-system","providerName":"kubernetescrd","serviceName":"kubernetes-dashboard","servicePort":8443,"time":"2020-01-30T18:12:17Z"}

this is the treafik define kubernetes-dashboard-route.yaml file:
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: kubernetes-dashboard-route
spec:
  entryPoints:
    - websecure
  tls:
    secretName: cloud-mydlq-tls
  routes:
    - match: Host(`kubernetes.balabala.com`)
      kind: Rule
      services:
        - name: kubernetes-dashboard
          port: 8443

this is the kubernetes dashboard file:
{
  "kind": "Pod",
  "apiVersion": "v1",
  "metadata": {
    "name": "kubernetes-dashboard-6466b68b-mrrs9",
    "generateName": "kubernetes-dashboard-6466b68b-",
    "namespace": "kube-system",
    "selfLink": "/api/v1/namespaces/kube-system/pods/kubernetes-dashboard-6466b68b-mrrs9",
    "uid": "fafd91a2-6e49-4f09-8479-b593f3f1d005",
    "resourceVersion": "12218565",
    "creationTimestamp": "2020-01-25T16:51:10Z",
    "labels": {
      "k8s-app": "kubernetes-dashboard",
      "pod-template-hash": "6466b68b"
    },
    "annotations": {
      "scheduler.alpha.kubernetes.io/critical-pod": "",
      "seccomp.security.alpha.kubernetes.io/pod": "docker/default"
    },
    "ownerReferences": [
      {
        "apiVersion": "apps/v1",
        "kind": "ReplicaSet",
        "name": "kubernetes-dashboard-6466b68b",
        "uid": "3d8e2739-5113-4398-b7b8-28bda186b15e",
        "controller": true,
        "blockOwnerDeletion": true
      }
    ]
  },
  "spec": {
    "volumes": [
      {
        "name": "kubernetes-dashboard-certs",
        "secret": {
          "secretName": "kubernetes-dashboard-certs",
          "defaultMode": 420
        }
      },
      {
        "name": "tmp-volume",
        "emptyDir": {}
      },
      {
        "name": "kubernetes-dashboard-token-pmxpf",
        "secret": {
          "secretName": "kubernetes-dashboard-token-pmxpf",
          "defaultMode": 420
        }
      }
    ],
    "containers": [
      {
        "name": "kubernetes-dashboard",
        "image": "gcr.azk8s.cn/google_containers/kubernetes-dashboard-amd64:v1.10.1",
        "args": [
          "--auto-generate-certificates",
          "--token-ttl=43200"
        ],
        "ports": [
          {
            "containerPort": 8443,
            "protocol": "TCP"
          }
        ],
        "resources": {
          "limits": {
            "cpu": "100m",
            "memory": "300Mi"
          },
          "requests": {
            "cpu": "50m",
            "memory": "100Mi"
          }
        },
        "volumeMounts": [
          {
            "name": "kubernetes-dashboard-certs",
            "mountPath": "/certs"
          },
          {
            "name": "tmp-volume",
            "mountPath": "/tmp"
          },
          {
            "name": "kubernetes-dashboard-token-pmxpf",
            "readOnly": true,
            "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
          }
        ],
        "livenessProbe": {
          "httpGet": {
            "path": "/",
            "port": 8443,
            "scheme": "HTTPS"
          },
          "initialDelaySeconds": 30,
          "timeoutSeconds": 30,
          "periodSeconds": 10,
          "successThreshold": 1,
          "failureThreshold": 3
        },
        "terminationMessagePath": "/dev/termination-log",
        "terminationMessagePolicy": "File",
        "imagePullPolicy": "IfNotPresent"
      }
    ],
    "restartPolicy": "Always",
    "terminationGracePeriodSeconds": 30,
    "dnsPolicy": "ClusterFirst",
    "serviceAccountName": "kubernetes-dashboard",
    "serviceAccount": "kubernetes-dashboard",
    "nodeName": "azshara-k8s01",
    "securityContext": {},
    "schedulerName": "default-scheduler",
    "tolerations": [
      {
        "key": "CriticalAddonsOnly",
        "operator": "Exists"
      },
      {
        "key": "node.kubernetes.io/not-ready",
        "operator": "Exists",
        "effect": "NoExecute",
        "tolerationSeconds": 360
      },
      {
        "key": "node.kubernetes.io/unreachable",
        "operator": "Exists",
        "effect": "NoExecute",
        "tolerationSeconds": 360
      }
    ],
    "priorityClassName": "system-cluster-critical",
    "priority": 2000000000,
    "enableServiceLinks": true
  },
  "status": {
    "phase": "Running",
    "conditions": [
      {
        "type": "Initialized",
        "status": "True",
        "lastProbeTime": null,
        "lastTransitionTime": "2020-01-25T16:51:10Z"
      },
      {
        "type": "Ready",
        "status": "True",
        "lastProbeTime": null,
        "lastTransitionTime": "2020-01-25T16:51:24Z"
      },
      {
        "type": "ContainersReady",
        "status": "True",
        "lastProbeTime": null,
        "lastTransitionTime": "2020-01-25T16:51:24Z"
      },
      {
        "type": "PodScheduled",
        "status": "True",
        "lastProbeTime": null,
        "lastTransitionTime": "2020-01-25T16:51:10Z"
      }
    ],
    "hostIP": "172.19.104.231",
    "podIP": "172.30.224.9",
    "startTime": "2020-01-25T16:51:10Z",
    "containerStatuses": [
      {
        "name": "kubernetes-dashboard",
        "state": {
          "running": {
            "startedAt": "2020-01-25T16:51:23Z"
          }
        },
        "lastState": {},
        "ready": true,
        "restartCount": 0,
        "image": "gcr.azk8s.cn/google_containers/kubernetes-dashboard-amd64:v1.10.1",
        "imageID": "docker-pullable://gcr.azk8s.cn/google_containers/kubernetes-dashboard-amd64@sha256:0ae6b69432e78069c5ce2bcde0fe409c5c4d6f0f4d9cd50a17974fea38898747",
        "containerID": "docker://07ab8a9e93cb2f9a27194f73094ce77cb8938edf32a36fe6962737bfd16c3c38"
      }
    ],
    "qosClass": "Burstable"
  }
}

what is wrong with my config,the kubernetes dashboard config is in 8443 port? and in the same namespace,why it give port not found exception?

A: The port 8443 is container port,could not access outside the container.You should using this command to find the cluster service port:
kubectl get svc --namespace=kube-system

NAME                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                   AGE
kube-dns               ClusterIP   10.254.0.2      <none>        53/UDP,53/TCP,9153/TCP    131d
kubernetes-dashboard   NodePort    10.254.75.193   <none>        443:31085/TCP             131d
traefik                ClusterIP   10.254.169.66   <none>        80/TCP,443/TCP,8080/TCP   2d4h

the port 443 is the cluster port treafik could access. change container port 8443 to port 443.


text:
Q: PowerShell: Grep through object string representation How can I query the textual output of an cmdlet, if I don't know the exact member/ property I am interested in?
For example, when I use the cmdlet Get-ComputerInfo, a 184 lines table of the format Property: Value is printed, an excerpt being:
...
CsNumberOfLogicalProcessors      : 20
CsNumberOfProcessors             : 1
CsProcessors                     : {Intel(R) Core(TM) i9-10850K CPU @ 3.60GHz}
CsOEMStringArray                 : {To Be Filled By O.E.M.}
CsPartOfDomain                   : False
CsPauseAfterReset                : -1
CsPCSystemType                   : Desktop
...

How can I query this textual representation, i.e. search through all property names and their respective values in a convenient way? Basically, if I am searching for the specific type of my intel processor, I want the output of
Get-ComputerInfo > temp.txt
Select-String -Path temp.txt -Pattern intel

but without the workaround of writing everything to a file.
I understand that Get-ComputerInfo | Select-String -Pattern intel doesn't work, because the return type of Get-ComputerInfo is an object. Neither does Get-ComputerInfo | Write-Output | Select-String intel.


text:
Q: I need to show different inputs with every different choices and need to the others to remain hidden I need to show a combo box and hide other inputs and show them only when I select one of the options.
I tried this, but they don't show at all when I select something.
Tried all the thing I saw online, but they didn't solve my problem at all, I don't know why;

function showDiv() {
  getSelectValue = document.getElementById("hidden").value;
  if (getSelectValue == "1") {
    document.getElementById("hidden").style.display = "block";
  } else {
    document.getElementById("hidden").style.display = "none";
  }
}
<select id="select-styled">
  <option selected value="">Nessuna selezione</option>
  <option value="ds">Disposizioni semplici</option>
  <option value="dr">Disposizioni ripetizione</option>
  <option value="cs">Combinazoni semplici</option>
  <option value="cr">Combinazoni ripetizione</option>
  <option value="ps">Permutazioni semplici</option>
  <option value="pr">Permutazioni ripetizione</option>
  <option value="gs">Gestione stringa</option>
</select>

  Inserire n

  <input type="text" name="textField" class="textField" id="nTextField">

  Inserire k

  <input type="text" name="textField" class="textField" id="kTextField">

  Ecco la risposta

  <input type="text" name="textField" class="textField" id="answerTextField">

  <input type="text" name="textField" class="stringManagement" id="stringManagement">

A: You need to add onchange function on the select tag, not the div

function showDiv() {
  var x = document.getElementById("select-styled").value;
  if(x != "") {
    document.getElementById("myDiv").style.display = "block";

    // or any desired code...
  }
}
<select id="select-styled" onchange="showDiv()">
    <option selected value="">Nessuna selezione</option>
    <option value="ds">Disposizioni semplici</option>
    <option value="dr">Disposizioni ripetizione</option>
    <option value="cs">Combinazoni semplici</option>
    <option value="cr">Combinazoni ripetizione</option>
    <option value="ps">Permutazioni semplici</option>
    <option value="pr">Permutazioni ripetizione</option>
    <option value="gs">Gestione stringa</option>
</select>

      Inserire n

      <input type="text" name="textField" class="textField" id="nTextField" >

      Inserire k

      <input type="text" name="textField" class="textField" id="kTextField" >

      Ecco la risposta

      <input type="text" name="textField" class="textField" id="answerTextField" >

      <input type="text" name="textField" class="stringManagement" id="stringManagement">

A: <select id="select-styled" onchange="showDiv()">
        <option selected value="">Nessuna selezione</option>
        <option value="ds">Disposizioni semplici</option>
        <option value="dr">Disposizioni ripetizione</option>
        <option value="cs">Combinazoni semplici</option>
        <option value="cr">Combinazoni ripetizione</option>
        <option value="ps">Permutazioni semplici</option>
        <option value="pr">Permutazioni ripetizione</option>
        <option value="gs">Gestione stringa</option>
    </select>

        Inserire n

        <input type="text" name="textField" class="textField" id="nTextField" >

        Inserire k

        <input type="text" name="textField" class="textField" id="kTextField" >

        Ecco la risposta

        <input type="text" name="textField" class="textField" id="answerTextField" >

        <input type="text" name="textField" class="stringManagement" id="stringManagement">


text:
Q: Is there a fixed-point theorem that can be applied to a ring endomorphism of $k[x,y]$? Let $k$ be a field of characteristic zero (I do not mind to assume that $k \in \{\mathbb{R},\mathbb{C}\}$), and let $R=k[x,y]$ be the $k$-algebra of polynomials in two variables $x,y$.
Let $f$ be a $k$-algebra endomorphism of $R$.

(I) Is there a fixed-point theorem that can be applied to $f$? (II) If so, then is it possible to obtain a fixed point $\in R-k$? (the elements of $k$ are always fixed points for a $k$-algebra endomorphism $f$).

Remarks:
(1) I have tried to consider $k[x,y]$ as a complete metric space,
see this question, but I guess that $f$ is not a contraction in that metric. So, is there another metric that makes $f$ a contraction? (probably yes? But it may be difficult to guarantee that $f$ has a fixed point $\in R-k$).
(2) The answer probably depends on the given $f$, since, for example,
it seems that $f:(x,y) \mapsto (x^2,y^2)$ does not have fixed points other than the elements of $k$.
(3) Here is a list of fixed point theorems.
(4) The following questions seem relevant: a and b (what if we consider our given endomorphism as a multiplicative group morphism?).
(5) A similar question of mine is this (the fourth remark there says that the existence of such a fixed point implies the two-dimensional Jacobian Conjecture).
Thank you very much!

A: I very much doubt you can approach it in this fashion.
If there is a fixed point, then the fixed set would have to be a subalgebra, so in particular, a vector subspace, and this endomorphism of course respects this structure so you probably want a metric that also respects this.
In particular, you want proper vector subspaces to be closed and nowhere dense.  But this yields a contradiction when you demand the metric to be complete, because we can write $k[x,y]$ as a countable union of proper (hence closed nowhere dense) subspaces
$$
k[x,y]=\bigcup_{d=0}^\infty \operatorname{span}_k\{x^iy^j\mid i+j\leq d\}
$$
but Baire category theorem says a complete metric space is not meagre.
A few words about the formal power series ring
If you decide to work with the formal power series ring $k[[x,y]]$ instead, then obviously your endomorphism $f$ must send the nilpotent $x,y$ to some nilpotent elements.  This means in particular that we can reduce to looking at fixed elements of each $(x,y)/(x,y)^m$ and patching each graded piece together, like in Hansel's lemma.


text:
Q: Azure portal Web Service PHP Monitoring I wrote a simple Application in HTML with a form. I submit the form into a PHP file and insert the data into a database.
I created an App Service on Azure Portal + MySQL database
It took me a while to get the git Pipeline going (So Git - Azure Portal - deploying into a Webservice)
If I submit my form, the data will go to the database just fine.
Now I wanted to extend everything with a monitoring tool. So I tried Application Insights. But unfortunately, that doesn't work. If I understand it correctly it's because of the PHP file or to be exact the Php Stackruntime on Azure.
Is it possible to the monitoring anyway somehow? I only have experience in Php and Html a little bit of Java and Javascript.
Thanks.

A: I have deployed sample PHP App to Azure App Service.

So I tried Application Insights. But unfortunately, that doesn't work.

I have checked with both PHP 8.0 and 8.1 runtime version. The Application Insights option is disabled for PHP.

Thanks @Dmitry-Matveev  for the Application Insights SDK.

Is it possible to the monitoring anyway somehow?
Check the below steps to Monitor Azure PHP App Service.

Way 1:
Check the Logs under Monitoring.

Way 2:

*

*Enable Application logging (File System).

*

*Navigate to the Log stream to check the Live metrics.

Also, we can check the metrics section to monitor the App.


text:
Q: I can't add column of type geography in oracle 11 g I want to add a column of type geography in  oracle 11 g when I create the table and add a column I can found the data type geography
enter image description here

A: That's SDO_GEOMETRY data type you're looking for, I presume.
SQL> create table test (id number,
  2                     geo sdo_geometry);

Table created.

SQL>

More about it in Spatial Data types and Metadata.