## c++ – Which non-standard C features can I use?

C and C++ have standards, but support isn’t perfect, the only available copies on the internet are drafts, and there are immensely useful things that aren’t standard, such as `__attribute__((cleanup))`. Apparently the glib authors feel that’s sufficiently ubiquitous even though it’s a GCC extension.

Then there are other GCC extensions (such as empty `__VA_ARGS__` in macros and the ability to token-paste away superfluous commas when `__VA_ARGS__` is empty) which clang has decided should throw a warning.

In the web development world, there’s caniuse, which tells you specifically which versions of each browser you’re supporting if you use a particular language feature. Is there any equivalent service for C++ compilers, that would give me a quick way to search for e.g. `__attribute__((cleanup))` and get a list of compilers that support it?

## Why were custom scripts made non-standard except if they’re P2SH?

Custom script = nonstandard

P2SH custom script = standard

Why?

## dplyr – can not use Non-standard evaluation in self-define function in r

I want to write a function that extracts some information from `gam` model.
I can do this without self-define function (`df` is what I wanted):

``````library(mgcv)
library(tidyverse)
model = gam(mpg ~ cyl, data = mtcars)

result = summary(model)\$p.table

estimate = result(2,1)
se = result(2,2)

df = data.frame(estimate = estimate, se = se)
df
``````

Then I wrapped it with a self-define function:

``````my_gam <- function(y, x, data){

model = gam(y ~ x, data = data)

result = summary(model)\$p.table

estimate = result(2,1)
se = result(2,2)

df = data.frame(estimate = estimate, se = se)
df
}

``````

But I can not use my function correctly.

``````my_gam(y = mpg, x = cyl, data = mtcars)
``````

``````my_gam(y = 'mpg', x = 'cyl', data = mtcars)
``````

Error in gam(y ~ x, data = data) :
Not enough (non-NA) data to do anything meaningful

Is that a way I can get the `df` just as the first code block when I run `my_gam(y = mpg, x = cyl, data = mtcars)`.

Any help will be highly appreciated!!

## docker – Traefik SSL for a service that runs on non-standard port

Disclaimer: My Docker and my Traefik knowledge is weak. I have several times tried following the Traefik docs and I usually just get confused, possibly because I want to tackle more than the simplest of cases but also, I’m sure I am missing some fundamentals.

In my current setup, I can create a web-based (port 80) Docker service that Traefik v2 picks up, creates a LE cert, redirects from http:80 to https:443, and exposes. Below is my `docker-compose.yml` for Traefik and also one for a sample service that works.

Let’s say, however, that my web-based service really wants to run on a port other than 80. For instance, I want to run statping, which runs on port 8080. Is it possible, given the SSL setup that I currently have, to wire it up such that I can expose the entry point http://statping.MYTLD and rely on Traefik to: 1. redirect to https://statping.MYTLD, 2. obtain the certificate, and 3. expose my statping Docker container? Can Traefik handle the Acme http challenge even though the underlying service is not running on port 80? I figure it can, since my working sample isn’t even exposing a port past the container level.

Note: I am most familiar with Docker Compose but perhaps for a service like statping, I need to figure out how to write my own DOCKERFILE so that I can cajole it into running on port 80 instead of port 8080?

Thanks for any insight!

Traefik `docker-compose.yml`:

``````version: "3.3"

networks:
traefik:
external: true

services:

traefik:
image: "traefik:v2.3"
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.web.http.redirections.entrypoint.permanent=true"

- "--certificatesresolvers.myresolver.acme.httpchallenge=true"
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"

# FOR TESTING.
#- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"

- "--certificatesresolvers.myresolver.acme.email=craig@wereallconnected.ca"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"

ports:
- "80:80"
- "443:443"
- "8080:8080"

volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
``````

Sample service `docker-compose.yml`:

``````version: "3.3"

networks:
traefik:
external: true

services:

whoami2:
image: "traefik/whoami"
container_name: "simple-service2"
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami2.rule=Host(`whoami2.MYTLD`)"
- "traefik.http.routers.whoami2.entrypoints=websecure"
- "traefik.http.routers.whoami2.tls.certresolver=myresolver"

networks:
- traefik

restart: unless-stopped
``````

I have modem ZTE F609 (Software Version V7.0.10P7N1) and I can’t telnet it because of wrong login/password. I tried many different variants (all that Google and my imagination provided me:D), like root/Zte521, root/root, root/admin, root/Telkom135 and another – noone worked. If I type login ‘root’ – system demands a password. If I type any other login – system returns an error and says that login is incorrect. So at least I know that login ‘root’ is right:D
Reset doesn’t help. Modem configuration file is encrypted (AES + zlib) so I can’t just get xml-file (but I’m trying:D) and look what correct login/password are.
Has anyone encountered a similar problem? Maybe someone knows which login/password could be correct?
Sorry if this topic is not quite suitable for ‘Information Security’ theme. Thank you:)

## Is it possible to book a non-standard Russia-Poland border crossing?

Is there any bureau or agency that can allow crossing the border from Russia to Poland on a given time outside of the standard checkpoints? My idea is sending a formal request, paying some fee and receiving some kind of notarized approval for a given time and place. The on-site guards would probably need to be informed about this too.

But is it even possible to arrange it like this? I mean after getting a proper visa and everything and entering Russia through an official checkpoint.

The goal here is to go cross the border at the Vistula Spit as a tourist (no business travel) on foot or on a bicycle.

## dg.differential geometry – Complexification of a map under nonstandard complexifications of vector spaces

I started studying the book of Daniel Huybrechts, Complex Geometry An Introduction. I tried studying backwards as much as possible, but I have been stuck on the concepts of almost complex structures and complexification. I have studied several books and articles on the matter including ones by Keith Conrad, Jordan Bell, Gregory W. Moore, Steven Roman, Suetin, Kostrikin and Mainin, Gauthier

I have several questions on the concepts of almost complex structures and complexification. Here are some:

Definitions, Assumptions, Notations

Let $$V$$ be $$mathbb R$$-vector space, possibly infinite-dimensional.

Complexification of space definition: Its complexification can be defined as $$V^{mathbb C} := (V^2,J)$$ where $$J$$ is the almost complex structure $$J: V^2 to V^2, J(v,w):=(-w,v)$$ which corresponds to the complex structure $$s_{(J,V^2)}: mathbb C times V^2 to V^2, s_{(J,V^2)}(a+bi,(v,w)):=s_{V^2}(a,(v,w))+s_{V^2}(b,J(v,w))=a(v,w)+bJ(v,w)$$ where $$s_{V^2}$$ is the real scalar multiplication on $$V^2$$ extended to $$s_{(J,V^2)}$$. In particular, $$i(v,w)=(-w,v)$$.

Note on Complexification of space definition: The above definition however depends on $$J$$, so to denote this dependence, we may write $$V^{(mathbb C,J)}=V^{mathbb C}$$. We could have another definition replacing $$J$$ with any other almost complex structure $$K$$ which necessarily relates to $$J$$ by $$K = S circ J circ S^{-1}$$ for some $$S in Aut_{mathbb R}(V^2)$$. For example with $$K = – J$$ (I think $$S$$ would be $$S(v,w):=(v,-w)$$, which is $$mathbb C$$-antilinear with respect to $$J$$, and even to $$K=-J$$ I think), we get $$i(v,w)=(w,-v)$$.

Complexification of map definition: Based on Conrad, Bell, Suetin, Kostrikin and Mainin (12.10-11 of Part I) and Roman (Chapter 2), it looks like we can define the complexification (with respect to $$J$$) $$f^{mathbb C}: V^{mathbb C} to V^{mathbb C}$$ of $$f: V to V$$, $$f in End_{mathbb R}V$$ as any of the following equivalent, I think, ways (Note: we could actually have different vector spaces such that $$f: V to U$$, but I’ll just talk about the case where $$V=U$$)

Definition 1. $$f^{mathbb C}(v,w):=(f(v),f(w))$$

• I think ‘$$mathbb C$$-linear (with respect to $$J$$)’ isn’t part of this definition but is deduced anyway.

Definition 2. $$f^{mathbb C}$$ the unique $$mathbb C$$-linear (with respect to $$J$$) map such that $$f^{mathbb C} circ cpx = cpx circ f$$, where $$cpx: V to V^{mathbb C}$$ is the complexification map, as Roman (Chapter 1) calls it, or the standard embedding, as Conrad calls it. (Note: I think $$cpx$$ doesn’t depend on $$J$$.)

Definition 3. $$f^{mathbb C}$$ the unique $$mathbb C$$-linear (with respect to $$J$$) map such that $$(f^{mathbb C})_{mathbb R} = f oplus f$$

Definition 4. $$f^{mathbb C} := (f oplus f)^J$$ and again ‘$$mathbb C$$-linear (with respect to $$J$$)’ isn’t part of this definition but is deduced anyway. Here, the notation $$(cdot)^I$$ is:

• Complex structure on map definition: The operator ‘$$(cdot)^I$$‘ is supposed to be something like an inverse of the realification functor $$(cdot)_{mathbb R}$$ (see Jordan Bell and Suetin, Kostrikin and Mainin). If $$(cdot)^I$$ is some kind of functor, then $$W^I := (W,I)$$.

• I couldn’t find any book that uses this kind of notation, but the point of this ‘$$g^I$$‘ is mainly to be specific and allow shortcuts. Example: The statement ‘$$g$$ is $$mathbb C$$-linear with respect to $$I$$‘ becomes just ‘$$g^I$$ is $$mathbb C$$-linear’. Another example: For any almost complex structure $$K$$ on $$W$$, $$K^K$$ is $$mathbb C$$-linear, but $$I^K$$ and $$K^I$$ are not necessarily $$mathbb C$$-linear. However, with $$-I$$ as another almost complex structure on $$W$$, I think $$I^{-I}$$and $${-I}^{I}$$ are $$mathbb C$$-linear.

• Proposition: $$g^I$$ is $$mathbb C$$-linear if and only if $$g$$ is $$mathbb R$$-linear and $$g$$ ‘commutes with scalar multiplication by i (with respect to $$I$$)’, meaning $$g circ I = I circ g$$.

• We can also extend to defining maps like $$g^{(I,H)}: (W,I) to (U,H)$$ and saying $$g^{(I,H)}$$ is $$mathbb C$$-linear if and only if $$g$$ is $$mathbb R$$-linear and $$g circ I = H circ g$$. In this notation and for the case of $$W=U$$, $$g^{(I,I)}=g^I$$.

Regardless of the definition, we end up with the formula given in Definition 1 (Even if the definitions aren’t equivalent, whichever definitions are correct, I think will give this formula in Definition 1).

Note on Complexification of map definition: The above definition/s however depends on $$J$$, so to denote this dependence, we may write $$f^{(mathbb C,J)}=f^{mathbb C}$$.

Questions:

Question 1: What is the formula for $$f^{(mathbb C,K)}$$ for any almost complex structure $$K$$ on $$V^2$$, assuming it exists, whether uniquely or not?

• Note: I actually didn’t think $$f^{(mathbb C,K)}$$ wouldn’t be unique or even exist until mid way through typing this (so I added 2 more questions below), so there might be kind of a definition issue here, but I guess it’s ok to define $$f^{(mathbb C,K)}$$ as any $$mathbb C$$-linear (with respect to $$K$$) map such that $$f^{(mathbb C,K)} circ cpx = cpx circ f$$

• Example: For $$K=-J$$, I think we get still $$f^{(mathbb C,-J)}(v,w)=(f(v),f(w))$$ (I derived this in a similar way that Conrad derived the formula for $$K=J$$).

• Example: Suppose $$V$$ in turn has an almost complex structure $$k$$. Then $$k oplus k$$ is an almost complex structure on $$V^2$$. For $$K=k oplus k$$, I don’t know how to get the formula for $$f^{(mathbb C,k oplus k)}(v,w)$$, similar to the cases of $$K= pm J$$. Maybe it doesn’t exist.

Question 2: Does $$f^{(mathbb C,K)}$$ always exist even if not uniquely?

Question 3: Whenever $$f^{(mathbb C,K)}$$ exists, is $$f^{(mathbb C,K)}$$ unique?

Note: This question might be answered by the answer, that I’m still analysing, to another question I posted.

More thoughts based on these:

It appears that:

1. complexification relies not only on an almost complex structure $$K$$ on $$V^2$$ but also on a choice of subspace $$A$$ of $$V^2$$, where $$A$$ is not $$V^2$$ or $$0$$. This $$A$$ is what we use to identify $$V$$ as an embedded $$mathbb R$$-subspace of $$V^2$$

2. For any subspace $$A$$ of $$V^2$$, except $$V^2$$ and $$0$$, and for any almost complex structure $$K$$ on $$V^2$$, there exists a unique involutive $$mathbb R$$-linear map $$sigma_{A,K}$$, on $$V^2$$, such that $$sigma_{A,K}$$ anti-commutes with $$K$$ and the set of fixed points of $$sigma_{A,K}$$ is equal to $$A$$.

• 2.1. For example, $$sigma_{V times 0,J} = chi$$, where $$chi(v,w):=(v,-w)$$
1. Therefore, I should ask about $$f^{(mathbb C,K,A)}$$, not $$f^{(mathbb C,K)}$$.

## relay – OP_CHECKLOCKTIMEVERIFY generates a non-standard transaction

I create a transaction in my most recent environment with `OP_CHECKLOCKTIMEVERIFY`
are my transaction details:

``````0200000001b949410322a4af7c5b24d367aad9ac186902d4aa15b79ced3f821ae772aaabf70000000085483045022100ded7ee34b12e829a0957a852049546ff909d33129c8c1d3769db227cafffcbdd022033b1e9ed37682470b77450d791c8b5dde67f4de2d14b772d2bbcfbe22b3a453b012103f99b855c961eb142cc237d37db22ae67b4a80f2d2f178762110087c1e54f90c51976a914d1d03865cf22d10d9d1ed68889be6bc99513cd6d88ACfeffffff016036f829010000001E04ACFCD95EB175a9141a759e10e92cd4d855ba8bee9cd4f4a276033d1087ACFCD95E
{
"version": 2,
"size": 223,
"vsize": 223,
"weight": 892,
"locktime": 1591344300,
"vin": [
{
"vout": 0,
"scriptSig": {
"asm": "3045022100ded7ee34b12e829a0957a852049546ff909d33129c8c1d3769db227cafffcbdd022033b1e9ed37682470b77450d791c8b5dde67f4de2d14b772d2bbcfbe22b3a453b[ALL] 03f99b855c961eb142cc237d37db22ae67b4a80f2d2f178762110087c1e54f90c5 76a914d1d03865cf22d10d9d1ed68889be6bc99513cd6d88ac",
"hex": "483045022100ded7ee34b12e829a0957a852049546ff909d33129c8c1d3769db227cafffcbdd022033b1e9ed37682470b77450d791c8b5dde67f4de2d14b772d2bbcfbe22b3a453b012103f99b855c961eb142cc237d37db22ae67b4a80f2d2f178762110087c1e54f90c51976a914d1d03865cf22d10d9d1ed68889be6bc99513cd6d88ac"
},
"sequence": 4294967294
}
],
"vout": [
{
"value": 49.991,
"n": 0,
"scriptPubKey": {
"asm": "1591344300 OP_CHECKLOCKTIMEVERIFY OP_DROP OP_HASH160 1a759e10e92cd4d855ba8bee9cd4f4a276033d10 OP_EQUAL",
"hex": "04acfcd95eb175a9141a759e10e92cd4d855ba8bee9cd4f4a276033d1087",
"type": "nonstandard"
}
}
]
}
``````

Is it normal that if I use `OP_CHECKLOCKTIMEVERIFY` Do I receive a non-standard transaction? I am able to retransmit it if I change `acceptnonstdtxn=1` But it is not my purpose.

## Is it possible to edit Bitcoin Core to transmit non-standard transactions?

You can change your node to transmit a non-standard transaction, but other nodes that follow the consensus rules will not transmit your transaction. The only way to include a non-standard transaction in the blockchain is to contact a miner and ask them to include it in a block.

The Bitcoin testnet has IsStandard disabled. If you are trying to test scripts, it is recommended to do it in testnet or regtest.