text:
Q: Numering of longtable and normal table I have two tables: one normal table, and one longtable.
The normal table comes first in my code and referencing, and the longtable comes after. However, the longtable appears first than the table. How can I change this?
I want the normal table to appear smoothly first, and then the longtable.
Compilable code: https://codeshare.io/aVdxY8
   \documentclass[12pt]{article}
%\usepackage[margin=20mm]{geometry}
\usepackage{ragged2e}
\usepackage{booktabs, makecell, tabularx}
\renewcommand\theadfont{\small\bfseries}
\renewcommand\theadgape{}
\newcolumntype{L}{>{\RaggedRight}X}
\usepackage{siunitx}
\usepackage{enumitem}
\usepackage{float}
%% To allow tables collumns auto newline
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\usepackage{multirow, caption}
\usepackage{booktabs}    % Beautiful simple tables
\usepackage{paralist}    % To enable customizble enumerates
\usepackage{ragged2e}
\usepackage{hyperref}
\usepackage{booktabs,eqparbox,tabularx}
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{capt-of}% or use the larger `caption` package
\usepackage{amsmath,calc}
\usepackage{bm}
\usepackage{cleveref}
%\usepackage[table,xcdraw]{xcolor}
\usepackage{longtable}

\begin{document}

\subsubsection{Linear variability}

Significant results obtained when testing the linear variability metrics are presented in Table \ref{table:linear_var_POAF_results}. Briefly, the variability in both time and morphological features were significantly different between POAF and controls far away from the arrhythmia (at least 18 hours away), while only variability in P-wave time features were significant as the arrhythmia onset got closer. The POAF group had higher median variability for all the presented timestamps, and showed increasing variability (slope) in all timestamps except 18 hours before the arrhythmia onset. In contrast, controls presented decreasing variability in the majority of variability regression slope results. The PQ interval (duration and level) was the only feature which had metrics significant after correction for multiple comparisons at 6 and 48 hours before the arrhythmia onset.

\begin{table}[!htp]
    \caption[Significant results obtained when using linear variability metrics to predict postoperative atrial fibrillation.]{Significant results (uncorrected $p<0.01$) obtained when using the linear variability metrics. Results significant after correction for multiple corrections (corrected $p<0.05$) are shaded in grey. The median value (and the first/ third quartiles) of each group are presented.}
    \label{table:linear_var_POAF_results}
    \small
    \centering
    \renewcommand{\arraystretch}{1.3}
    \resizebox{\textwidth}{!}{
        \begin{tabular}{lcccc}
            \hline
            \textbf{Metrics}                                                    & \textbf{Controls}                 & \textbf{POAF}                    & \textbf{P-value} & \textbf{AUC} \\ \hline
            \multicolumn{5}{c}{\textbf{1 hour before POAF} ($S=5$)}                                                                                \\ \hline
            \textbf{\textit{m}(PQ\textsubscript{on RRnorm})}  \begin{footnotesize}[a.u.]\end{footnotesize}        & 4.8$\times10^{-2}$ (4.0$\times10^{-2}$ / 5.7$\times10^{-2}$)    & 5.8$\times10^{-2}$ (5.0$\times10^{-2}$ / 7.6$\times10^{-2}$)    & 4.1$\times10^{-3}$        & 0.74       \\

            \textbf{\textit{m}(PR\textsubscript{peak RRnorm})} \begin{footnotesize}[a.u.]\end{footnotesize}       & 1.5$\times10^{-2}$ (1.2$\times10^{-2}$ / 2.2$\times10^{-2}$)    & 2.2$\times10^{-2}$ (2.0$\times10^{-2}$ / 4.0$\times10^{-2}$)    & 3.9$\times10^{-3}$        & 0.74       \\ \hline
            \multicolumn{5}{c}{\textbf{2 hours before POAF} ($S=10$)}                                                                                \\ \hline
            \textbf{\textit{m}(P\textsubscript{dur. RRnorm})} \begin{footnotesize}[a.u.]\end{footnotesize} & 5.5$\times10^{-2}$ (4.6$\times10^{-2}$ / 6.5$\times10^{-2}$)    & 7.2$\times10^{-2}$ (5.8$\times10^{-2}$ / 8.1$\times10^{-2}$)    & 2.9$\times10^{-3}$        & 0.75       \\
            \textbf{\textit{m}(PQ\textsubscript{on RRnorm})} \begin{footnotesize}[a.u.]\end{footnotesize}        & 5.1$\times10^{-2}$ (4.3$\times10^{-2}$ / 6.1$\times10^{-2}$)    & 7.6$\times10^{-2}$ (5.7$\times10^{-2}$ / 8.4$\times10^{-2}$)    & 1.1$\times10^{-3}$        & 0.78       \\
            \textbf{\textit{m}(PR\textsubscript{on RRnorm})} \begin{footnotesize}[a.u.]\end{footnotesize}       & 4.0$\times10^{-2}$ (3.6$\times10^{-2}$ / 5.1$\times10^{-2}$)    & 6.5$\times10^{-2}$ (4.8$\times10^{-2}$ / 7.3$\times10^{-2}$)    & 4.1$\times10^{-3}$        & 0.75       \\
            \textbf{\textit{m}(PR\textsubscript{peak RRnorm})} \begin{footnotesize}[a.u.]\end{footnotesize}      & 1.7$\times10^{-2}$ (1.3$\times10^{-2}$ / 3.0$\times10^{-2}$)    & 3.5$\times10^{-2}$ (2.2$\times10^{-2}$ / 4.6$\times10^{-2}$)    & 3.9$\times10^{-3}$        & 0.75       \\ \hline
            \multicolumn{5}{c}{\textbf{4 hours before POAF} ($S=10$)}                                                                                \\ \hline
            \textbf{\textit{m}(PR\textsubscript{peak RRnorm})} \begin{footnotesize}[a.u.]\end{footnotesize}      & 1.7$\times10^{-2}$ (1.3$\times10^{-2}$ / 2.4$\times10^{-2}$)    & 2.8$\times10^{-2}$ (1.9$\times10^{-2}$ / 4.1$\times10^{-2}$)    & 8.2$\times10^{-3}$        & 0.73       \\ \hline
            \multicolumn{5}{c}{\textbf{6 hours before POAF} ($S=10$)}                                                                                \\ \hline
            \textbf{\textit{m}(P\textsubscript{fin. dur.})} \begin{footnotesize}[ms]\end{footnotesize}   & 24.0 (16.0 / 30.0)             & 28.0 (24.0 / 37.0)             & 5.7$\times10^{-3}$        & 0.73       \\
            \textbf{\textit{m}(P\textsubscript{dur. RRnorm})} \begin{footnotesize}[a.u.]\end{footnotesize} & 5.9$\times10^{-2}$ (5.3$\times10^{-2}$ / 6.3$\times10^{-2}$)    & 7.1$\times10^{-2}$ (6.1$\times10^{-2}$ / 9.2$\times10^{-2}$)    & 2.2$\times10^{-3}$        & 0.76       \\
            \textbf{\textit{m}(PQ\textsubscript{on})} \begin{footnotesize}[ms]\end{footnotesize}                & 38.0 (32.0 / 44.0)             & 44.0 (36.0 / 58.0)             & 5.4$\times10^{-3}$        & 0.73       \\

            \textbf{\textit{m}(PQ\textsubscript{on RRnorm})} \begin{footnotesize}[a.u.]\end{footnotesize}        & 5.6$\times10^{-2}$ (4.4$\times10^{-2}$ / 6.2$\times10^{-2}$)    & 7.9$\times10^{-2}$ (6.0$\times10^{-2}$ / 9.0$\times10^{-2}$)    & 2.9$\times10^{-4}$        & 0.80       \\
            \textbf{\textit{m}(PR\textsubscript{peak})} \begin{footnotesize}[ms]\end{footnotesize}             & 8.0 (8.0 / 12.0)               & 16.0 (11.0 / 21.0)             & 1.6$\times10^{-3}$        & 0.75       \\
            \textbf{\textit{m}(PR\textsubscript{on RRnorm})} \begin{footnotesize}[a.u.]\end{footnotesize}       & 4.8$\times10^{-2}$ (3.7$\times10^{-2}$ / 5.4$\times10^{-2}$)    & 6.9$\times10^{-2}$ (4.8$\times10^{-2}$ / 8.7$\times10^{-2}$)    & 5.3$\times10^{-3}$        & 0.73       \\
            \textbf{\textit{m}(PR\textsubscript{peak RRnorm})} \begin{footnotesize}[a.u.]\end{footnotesize}     & 1.5$\times10^{-2}$ (1.3$\times10^{-2}$ / 2.5$\times10^{-2}$)    & 3.3$\times10^{-2}$ (1.9$\times10^{-2}$ / 5.4$\times10^{-2}$)    & 4.5$\times10^{-3}$        & 0.74       \\ \hline
            \multicolumn{5}{c}{\textbf{12 hours before POAF} ($S=5$)}                                                                                \\ \hline
            \textbf{$\boldsymbol{\alpha}$(Q\textsubscript{on amp.})} \begin{footnotesize}[mV]\end{footnotesize}                       & -2.0$\times10^{-6}$ (-6.1$\times10^{-6}$ / -3.0$\times10^{-6}$)  & 6.8$\times10^{-6}$ (-1.1$\times10^{-6}$ / 1.1$\times10^{-5}$)    & 5.2$\times10^{-3}$        & 0.72       \\ \hline
            \multicolumn{5}{c}{\textbf{18 hours before POAF} ($S=10$)}                                                                                \\ \hline
            \textbf{$\boldsymbol{\alpha}$(PQ\textsubscript{on})} \begin{footnotesize}[ms]\end{footnotesize}      & 9.9$\times10^{-4}$ (-8.9$\times10^{-3}$ / 6.9$\times10^{-3}$)   & -9.5$\times10^{-3}$ (-2.4$\times10^{-2}$ / -2.0$\times10^{-3}$) & 1.4$\times10^{-3}$        & 0.76       \\
            \textbf{$\boldsymbol{\alpha}$(PQ\textsubscript{level, Pnorm})} \begin{footnotesize}[mV]\end{footnotesize}                     & 2.5$\times10^{-4}$ (-7.2$\times10^{-5}$ / 1.5$\times10^{-3}$)   & -4.1$\times10^{-4}$ (-1.1$\times10^{-2}$ / 8.1$\times10^{-5}$)  & 1.3$\times10^{-3}$        & 0.78       \\
            \textbf{$\boldsymbol{\alpha}$(PR\textsubscript{on})} \begin{footnotesize}[ms]\end{footnotesize}                             & -1.7$\times10^{-4}$ (-8.5$\times10^{-3}$ / 7.0$\times10^{-3}$)  & -7.1$\times10^{-3}$ (-2.8$\times10^{-2}$ / -1.7$\times10^{-3}$) & 4.8$\times10^{-3}$        & 0.73       \\
            \textbf{$\boldsymbol{\alpha}$(PR\textsubscript{peak})} \begin{footnotesize}[ms]\end{footnotesize}                            & 2.5$\times10^{-4}$ (-3.5$\times10^{-3}$ / 4.4$\times10^{-3}$)   & -5.5$\times10^{-3}$ (-1.5$\times10^{-2}$ / -1.7$\times10^{-4}$) & 8.1$\times10^{-3}$        & 0.71       \\ \hline
            \multicolumn{5}{c}{\textbf{36 hours before POAF} ($S=30$)}                                                                                \\ \hline
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{min. vel.})}  \begin{footnotesize}[mV]\end{footnotesize}                     & -7.7$\times10^{-7}$ (-5.7$\times10^{-6}$ / 9.5$\times10^{-6}$)  & 1.9$\times10^{-5}$ (7.9$\times10^{-7}$ / 4.3$\times10^{-5}$)    & 7.7$\times10^{-3}$        & 0.72       \\
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{vel. disp.})} \begin{footnotesize}[mV]\end{footnotesize}                     & -1.1$\times10^{-6}$ (-1.1$\times10^{-5}$ / 1.6$\times10^{-5}$)  & 2.7$\times10^{-5}$ (2.4$\times10^{-6}$ / 6.2$\times10^{-5}$)    & 9.2$\times10^{-3}$        & 0.71       \\
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{energy})} \begin{footnotesize}[$\mu V^2$]\end{footnotesize}                        & -7.1$\times10^{-10}$ (-6.3$\times10^{-9}$ / 7.4$\times10^{-9}$)  & 1.1$\times10^{-8}$ (3.0$\times10^{-9}$ / 2.3$\times10^{-8}$)    & 3.4$\times10^{-3}$        & 0.74       \\
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{energy norm.})} \begin{footnotesize}[V/s]\end{footnotesize}                  & -1.1$\times10^{-10}$ (-6.9$\times10^{-10}$ / 4.7$\times10^{-10}$)  & 1.1$\times10^{-9}$ (5.1$\times10^{-10}$ / 1.8$\times10^{-9}$)    & 1.6$\times10^{-3}$        & 0.76       \\
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{gauss. error})} \begin{footnotesize}[a.u.]\end{footnotesize}             & -5.1$\times10^{-8}$ (-3.8$\times10^{-6}$ / 2.4$\times10^{-6}$)  & 4.5$\times10^{-6}$ (-7.1$\times10^{-8}$ / 7.9$\times10^{-6}$)   & 4.9$\times10^{-3}$        & 0.73       \\
            \textbf{\textit{m}(P\textsubscript{fin. dur.})} \begin{footnotesize}[ms]\end{footnotesize}   & 24.0 (16.0 / 28.0)             & 32.0 (24.0 / 37.0)             & 6.7$\times10^{-3}$        & 0.72       \\ \hline

            \multicolumn{5}{c}{\textbf{42 hours before POAF} ($S=5$)}                                                                                \\ \hline
            \textbf{\textit{m}(P\textsubscript{fin. dur.})} \begin{footnotesize}[ms]\end{footnotesize}   & 16.0 (16.0 / 24.0)             & 24.0 (24.0 / 32.0)             & 8.8$\times10^{-3}$        & 0.72       \\
            \textbf{\textit{m}(PQ\textsubscript{off})} \begin{footnotesize}[ms]\end{footnotesize}               & 24.0 (16.0 / 24.0)             & 24.0 (24.0 / 32.0)             & 1.0$\times10^{-2}$        & 0.72       \\
            \textbf{\textit{m}(PQ\textsubscript{on RRnorm})} \begin{footnotesize}[a.u.]\end{footnotesize}        & 4.1$\times10^{-2}$ (3.6$\times10^{-2}$ / 5.4$\times10^{-2}$)    & 5.6$\times10^{-2}$ (4.4$\times10^{-2}$ / 6.9$\times10^{-2}$)    & 6.9$\times10^{-3}$        & 0.74       \\
            \textbf{\textit{m}(PQ\textsubscript{off RRnorm})} \begin{footnotesize}[a.u.]\end{footnotesize}        & 3.1$\times10^{-2}$ (2.0$\times10^{-2}$ / 4.1$\times10^{-2}$)    & 4.2$\times10^{-2}$ (3.3$\times10^{-2}$ / 5.2$\times10^{-2}$)    & 4.8$\times10^{-3}$        & 0.75       \\
            \textbf{\textit{m}(PR\textsubscript{off RRnorm})} \begin{footnotesize}[a.u.]\end{footnotesize}       & 2.4$\times10^{-2}$ (1.4$\times10^{-2}$ / 3.5$\times10^{-2}$)    & 3.5$\times10^{-2}$ (3.0$\times10^{-2}$ / 4.3$\times10^{-2}$)    & 7.7$\times10^{-3}$        & 0.73       \\

            \hline

            \multicolumn{5}{c}{\textbf{48 hours before POAF} ($S=10$)}                                                                                \\ \hline
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{magn.})} \begin{footnotesize}[mV]\end{footnotesize}                           & -1.4$\times10^{-5}$ (-3.4$\times10^{-5}$ / -8.1$\times10^{-7}$) & 6.7$\times10^{-6}$ (-5.2$\times10^{-6}$ / 1.6$\times10^{-5}$)   & 2.1$\times10^{-3}$        & 0.78       \\
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{rms norm.})} \begin{footnotesize}[mV]\end{footnotesize}                      & -6.3$\times10^{-7}$ (-1.5$\times10^{-6}$ / -4.1$\times10^{-9}$) & 2.7$\times10^{-7}$ (7.8$\times10^{-8}$ / 6.4$\times10^{-7}$)    & 9.3$\times10^{-3}$        & 0.73       \\
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{energy})} \begin{footnotesize}[$\mu V^2$]\end{footnotesize}                        & -4.7$\times10^{-9}$ (-1.8$\times10^{-8}$ / 1.3$\times10^{-9}$)  & 2.0$\times10^{-9}$ (1.5$\times10^{-10}$ / 9.2$\times10^{-9}$)    & 7.0$\times10^{-3}$        & 0.74       \\
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{energy norm.})} \begin{footnotesize}[V/s]\end{footnotesize}                  & -4.1$\times10^{-10}$ (-1.2$\times10^{-9}$ / 4.1$\times10^{-11}$)  & 2.1$\times10^{-10}$ (9.6$\times10^{-12}$ / 1.6$\times10^{-9}$)    & 3.9$\times10^{-3}$        & 0.76       \\

            \textbf{$\boldsymbol{\alpha}$(PQ\textsubscript{level, Pnorm})} \begin{footnotesize}[mV]\end{footnotesize}                   & -3.7$\times10^{-3}$ (-7.0$\times10^{-2}$ / -6.6$\times10^{-4}$) & 3.0$\times10^{-5}$ (-2.1$\times10^{-4}$ / 1.8$\times10^{-3}$)   & 7.4$\times10^{-4}$        & 0.86       \\
            \textbf{\textit{m}(P\textsubscript{eucl. dist.})} \begin{footnotesize}[a.u.]\end{footnotesize}       & 9.3$\times10^{-2}$ (7.3$\times10^{-2}$ / 1.2$\times10^{-1}$)    & 1.4$\times10^{-1}$ (9.6$\times10^{-2}$ / 1.9$\times10^{-1}$)    & 6.6$\times10^{-3}$        & 0.74       \\ \hline
    \end{tabular}}
\end{table}

\subsubsection{Non-linear variability}

Non-linear CTM was found to significantly differ between POAF patients and controls in all the tested timestamps (Table \ref{table:CTM_results_POAF}). Controls were associated with higher CTM in the great majority of features and timestamps. However, CTM applied over the features P\textsubscript{vel. disp.}, P\textsubscript{fin. dur}, P\textsubscript{magn.}, PQ\textsubscript{level}, PQ\textsubscript{level Pnorm} and P\textsubscript{off amp.} was sometimes higher in POAF patients. Finally, several P-wave time- and morphological metrics were significant after correction for multiple comparisons 1, 12, 18, 42 and 48 hours before the arrhythmia onset, all of them showing higher CTM in controls.

\begin{small}

    \begin{longtable}{llllll}
        \caption[Significant results obtained when using non-linear variability metrics to predict postoperative atrial fibrillation.]{Significant results (uncorrected $p<0.01$) obtained when testing the non-linear variability results. The presented values of optimal $\rho$ correspond to the number of multiples of the standard deviation which minimised the \textit{p}-value for the correspondent feature. Results significant after correction for multiple corrections (corrected $p<0.05$) are shaded in grey. The median value (and the first/ third quartiles) of each group are presented (in arbitrary units).}
        \label{table:CTM_results_POAF} \\
        \hline \multicolumn{1}{c}{\textbf{Metrics}} & \multicolumn{1}{c}{$\boldsymbol{\rho}$} & \multicolumn{1}{c}{\textbf{Controls}} & \multicolumn{1}{c}{\textbf{POAF}} & \multicolumn{1}{c}{\textbf{P-values}} & \multicolumn{1}{c}{\textbf{AUC}} \\ \hline
        \endfirsthead

        \multicolumn{3}{c}%
        {{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
        \hline \multicolumn{1}{c}{\textbf{Metrics}} & \multicolumn{1}{c}{$\boldsymbol{\rho}$} & \multicolumn{1}{c}{\textbf{Controls}} & \multicolumn{1}{c}{\textbf{POAF}} & \multicolumn{1}{c}{\textbf{P-values}} & \multicolumn{1}{c}{\textbf{AUC}} \\ \hline
        \endhead

        \hline \multicolumn{6}{r}{{Continued on next page}} \\ \hline
        \endfoot

        \endlastfoot

        \multicolumn{6}{c}{\textbf{1 hour before POAF} (lag$=5$)}                                                                                \\ \hline
        \textbf{PQ\textsubscript{off RRnorm}}          & 3.0                      & 0.8944 (0.8751 / 0.9085)            & 0.9089 (0.8996 / 0.9367)        & 2.7$\times10^{-3}$                              & 0.75                           \\
        \textbf{PR\textsubscript{off RRnorm}}         & 8.0                      & 1.0000 (0.9994 / 1.0000)            & 0.9994 (0.9979 / 1.0000)        & 6.0$\times10^{-3}$                              & 0.71                           \\

        \textbf{PR\textsubscript{on RRnorm}}          & 4.0                      & 0.9863 (0.9791 / 0.9931)            & 0.9741 (0.9554 / 0.9814)       & 3.1$\times10^{-4}$                              & 0.80                           \\

        \textbf{PR\textsubscript{peak RRnorm}}        & 3.5                   & 0.9849 (0.9677 / 0.9942)            & 0.9529 (0.9303 / 0.9735)        & 5.4$\times10^{-4}$                              & 0.79                           \\

        \textbf{P\textsubscript{area}}               & 13.0                     & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9999 / 1.0000)        & 1.2$\times10^{-3}$                              & 0.62                           \\

        \textbf{P\textsubscript{dur. RRnorm}}   & 4.0                      & 0.9822 (0.9758 / 0.9884)            & 0.9714 (0.9637 / 0.9767)        & 3.3$\times10^{-4}$                              & 0.80                           \\

        \textbf{P\textsubscript{eucl. dist.}}         & 4.0                      & 0.9906 (0.9822 / 0.9930)            & 0.9754 (0.9658 / 0.9834)        & 3.1$\times10^{-5}$                              & 0.85                           \\
        \textbf{P\textsubscript{gauss. A}}             & 6.0                      & 0.9981 (0.9958 / 0.9990)            & 0.9947 (0.9907 / 0.9977)        & 3.9$\times10^{-3}$                              & 0.74                           \\

        \textbf{P\textsubscript{magn.}}               & 4.0                      & 0.9826 (0.9770 / 0.9896)            & 0.9721 (0.9564 / 0.9816)        & 9.2$\times10^{-4}$                              & 0.78                           \\

        \textbf{P\textsubscript{area norm.}}         & 4.0                      & 0.9776 (0.9687 / 0.9843)            & 0.9647 (0.9560 / 0.9724)        & 4.8$\times10^{-4}$                              & 0.79                           \\
        \textbf{P\textsubscript{rms norm.}}          & 5.0                      & 0.9912 (0.9855 / 0.9935)            & 0.9842 (0.9787 / 0.9896)        & 5.0$\times10^{-3}$                              & 0.73                           \\
        \textbf{P\textsubscript{vel. disp.}}          & 4.0                      & 0.9821 (0.9781 / 0.9870)            & 0.9764 (0.9726 / 0.9816)        & 3.5$\times10^{-3}$                              & 0.74                           \\

        \textbf{CCI}          & 10.5                      & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9993 / 1.0000)        & 3.5$\times10^{-3}$                              & 0.74                           \\

        \hline \multicolumn{6}{c}{\textbf{2 hours before POAF} (lag$=8$)}   \\ \hline
        \textbf{PQ\textsubscript{off}}                 & 8.5                   & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9987 / 1.0000)        & 2.8$\times10^{-3}$                              & 0.67                           \\
        \textbf{PR\textsubscript{on}}                  & 11.0                     & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9992 / 1.0000)        & 5.2$\times10^{-3}$                              & 0.65                           \\
        \textbf{PR\textsubscript{peak}}                & 14.0                     & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9991 / 1.0000)        & 5.9$\times10^{-3}$                              & 0.67                           \\
        \textbf{PQ\textsubscript{off RRnorm}}   & 9.5                   & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9991 / 1.0000)        & 6.7$\times10^{-3}$                              & 0.65                          \\
        \textbf{P\textsubscript{eucl. dist.}}         & 4.5                   & 0.9952 (0.9892 / 0.9968)            & 0.9884 (0.9756 / 0.9942)        & 2.8$\times10^{-3}$                              & 0.76                           \\
        \textbf{P\textsubscript{gauss. C}}             & 14.5                  & 1.0000 (0.9992 / 1.0000)            & 0.9991 (0.9986 / 0.9997)        & 7.1$\times10^{-3}$                              & 0.71                           \\
        \textbf{P\textsubscript{area norm.}}         & 3.5                   & 0.9593 (0.9466 / 0.9684)            & 0.9372 (0.9327 / 0.9548)        & 5.3$\times10^{-3}$                              & 0.74                           \\
        \textbf{P\textsubscript{fin. dur.}}     & 6.0                      & 0.9994 (0.9981 / 1.0000)            & 1.0000 (0.9998 / 1.0000)        & 2.7$\times10^{-3}$                              & 0.75                           \\

        \hline \multicolumn{6}{c}{\textbf{4 hours before POAF} (lag$=6$)}    \\ \hline
        \textbf{P\textsubscript{dur RRnorm}}               & 6.0                     & 0.9995 (0.9988 / 1.0000)            & 0.9982 (0.9957 / 0.9995)        & 4.6$\times10^{-3}$                              & 0.75                           \\
        \textbf{PR\textsubscript{on RRnorm}}               & 4.5                     & 0.9928 (0.9882 / 0.9966)            & 0.9856 (0.9667 / 0.9913)        & 4.4$\times10^{-3}$                              & 0.75                           \\

        \textbf{P\textsubscript{area}}               & 13.0                     & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9995 / 1.0000)        & 1.5$\times10^{-3}$                              & 0.65                           \\
        \hline \multicolumn{6}{c}{\textbf{6 hours before POAF} (lag$=6$)}     \\ \hline
        \textbf{P\textsubscript{energy}}             & 11.5                  & 0.9991 (0.9981 / 0.9997)            & 0.9980 (0.9961 / 0.9987)        & 8.3$\times10^{-3}$                              & 0.72                           \\
        \textbf{P\textsubscript{eucl. dist.}}         & 4.5                   & 0.9941 (0.9895 / 0.9968)            & 0.9911 (0.9816 / 0.9922)        & 4.8$\times10^{-3}$                              & 0.74                           \\
        \textbf{P\textsubscript{fin. dur.}}     & 6.0                      & 0.9993 (0.9976 / 1.0000)            & 1.0000 (0.9994 / 1.0000)        & 5.9$\times10^{-3}$                              & 0.72                           \\

        \hline \multicolumn{6}{c}{\textbf{12 hours before POAF} (lag$=4$)}    \\ \hline

        \textbf{PQ\textsubscript{off}}                 & 13.0                     & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9990 / 1.0000)        & 5.2$\times10^{-4}$                              & 0.65                           \\
        \textbf{PQ\textsubscript{off RRnorm}}                 & 9.5                     & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9991 / 1.0000)        & 2.2$\times10^{-4}$                              & 0.64                           \\

        \textbf{PQ\textsubscript{on}}                  & 7.5                   & 1.0000 (1.0000 / 1.0000)            & 0.9998 (0.9990 / 1.0000)        & 7.6$\times10^{-4}$                              & 0.71                           \\

        \textbf{P\textsubscript{gauss. W}}             & 20.0                     & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9989 / 1.0000)        & 9.9$\times10^{-3}$                              & 0.66                           \\
        \textbf{P\textsubscript{magn.}}               & 2.5                   & 0.9210 (0.8766 / 0.9576)            & 0.8810 (0.8358 / 0.9132)        & 7.4$\times10^{-3}$                              & 0.74                           \\

        \textbf{P\textsubscript{area norm.}}         & 2.0                      & 0.8111 (0.7547 / 0.8485)            & 0.7089 (0.6585 / 0.7424)        & 1.5$\times10^{-4}$                              & 0.84                           \\

        \textbf{P\textsubscript{rms norm.}}          & 2.0                      & 0.7889 (0.7472 / 0.8466)            & 0.6877 (0.6503 / 0.7236)        & 1.2$\times10^{-3}$                              & 0.79                           \\
        \textbf{P\textsubscript{off amp.}}           & 8.0                      & 0.9971 (0.9952 / 0.9986)            & 0.9992 (0.9980 / 1.0000)        & 2.3$\times10^{-3}$                              & 0.77                           \\
        \textbf{P\textsubscript{fin. dur.}}     & 5.5                   & 0.9988 (0.9962 / 0.9995)            & 0.9997 (0.9993 / 1.0000)        & 9.3$\times10^{-3}$                              & 0.73                           \\
        \textbf{WI$_t$}                        & 2.5                   & 0.8301 (0.8163 / 0.8425)            & 0.8083 (0.8008 / 0.8246)        & 3.7$\times10^{-3}$                              & 0.76         \\ \hline
    \end{longtable}

\end{small}

\end{document}

A:
This avoids the floats going out of order and avoids scaling tables
  \documentclass[12pt]{article}
%\usepackage[margin=20mm]{geometry}
\usepackage{lmodern}
\usepackage{ragged2e}
\usepackage{booktabs, makecell, tabularx}
\renewcommand\theadfont{\small\bfseries}
\renewcommand\theadgape{}
\newcolumntype{L}{>{\RaggedRight}X}
\usepackage{siunitx}
\usepackage{enumitem}
\usepackage{float}
%% To allow tables collumns auto newline
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\usepackage{multirow, caption}
\usepackage{booktabs}    % Beautiful simple tables
\usepackage{paralist}    % To enable customizble enumerates
\usepackage{ragged2e}
\usepackage{hyperref}
\usepackage{booktabs,eqparbox,tabularx}
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{capt-of}% or use the larger `caption` package
\usepackage{amsmath,calc}
\usepackage{bm}
\usepackage{cleveref}
%\usepackage[table,xcdraw]{xcolor}
\usepackage{longtable}

\begin{document}

\subsubsection{Linear variability}

Significant results obtained when testing the linear variability metrics are presented in Table \ref{table:linear_var_POAF_results}. Briefly, the variability in both time and morphological features were significantly different between POAF and controls far away from the arrhythmia (at least 18 hours away), while only variability in P-wave time features were significant as the arrhythmia onset got closer. The POAF group had higher median variability for all the presented timestamps, and showed increasing variability (slope) in all timestamps except 18 hours before the arrhythmia onset. In contrast, controls presented decreasing variability in the majority of variability regression slope results. The PQ interval (duration and level) was the only feature which had metrics significant after correction for multiple comparisons at 6 and 48 hours before the arrhythmia onset.

\begin{table}[!htbp]
    \caption[Significant results obtained when using linear variability metrics to predict postoperative atrial fibrillation.]{Significant results (uncorrected $p<0.01$) obtained when using the linear variability metrics. Results significant after correction for multiple corrections (corrected $p<0.05$) are shaded in grey. The median value (and the first/ third quartiles) of each group are presented.}
    \label{table:linear_var_POAF_results}
    \tiny
   \setlength\tabcolsep{3pt}
    \renewcommand\bfdefault{b}
    \centering
    \renewcommand{\arraystretch}{1.3}

        \begin{tabular}{@{}lcccc@{}}
            \hline
            \textbf{Metrics}                                                    & \textbf{Controls}                 & \textbf{POAF}                    & \textbf{P-value} & \textbf{AUC} \\ \hline
            \multicolumn{5}{c}{\textbf{1 hour before POAF} ($S=5$)}                                                                                \\ \hline
            \textbf{\textit{m}(PQ\textsubscript{on RRnorm})}  [a.u.]        & 4.8$\times10^{-2}$ (4.0$\times10^{-2}$ / 5.7$\times10^{-2}$)    & 5.8$\times10^{-2}$ (5.0$\times10^{-2}$ / 7.6$\times10^{-2}$)    & 4.1$\times10^{-3}$        & 0.74       \\

            \textbf{\textit{m}(PR\textsubscript{peak RRnorm})} [a.u.]       & 1.5$\times10^{-2}$ (1.2$\times10^{-2}$ / 2.2$\times10^{-2}$)    & 2.2$\times10^{-2}$ (2.0$\times10^{-2}$ / 4.0$\times10^{-2}$)    & 3.9$\times10^{-3}$        & 0.74       \\ \hline
            \multicolumn{5}{c}{\textbf{2 hours before POAF} ($S=10$)}                                                                                \\ \hline
            \textbf{\textit{m}(P\textsubscript{dur. RRnorm})} [a.u.] & 5.5$\times10^{-2}$ (4.6$\times10^{-2}$ / 6.5$\times10^{-2}$)    & 7.2$\times10^{-2}$ (5.8$\times10^{-2}$ / 8.1$\times10^{-2}$)    & 2.9$\times10^{-3}$        & 0.75       \\
            \textbf{\textit{m}(PQ\textsubscript{on RRnorm})} [a.u.]        & 5.1$\times10^{-2}$ (4.3$\times10^{-2}$ / 6.1$\times10^{-2}$)    & 7.6$\times10^{-2}$ (5.7$\times10^{-2}$ / 8.4$\times10^{-2}$)    & 1.1$\times10^{-3}$        & 0.78       \\
            \textbf{\textit{m}(PR\textsubscript{on RRnorm})} [a.u.]       & 4.0$\times10^{-2}$ (3.6$\times10^{-2}$ / 5.1$\times10^{-2}$)    & 6.5$\times10^{-2}$ (4.8$\times10^{-2}$ / 7.3$\times10^{-2}$)    & 4.1$\times10^{-3}$        & 0.75       \\
            \textbf{\textit{m}(PR\textsubscript{peak RRnorm})} [a.u.]      & 1.7$\times10^{-2}$ (1.3$\times10^{-2}$ / 3.0$\times10^{-2}$)    & 3.5$\times10^{-2}$ (2.2$\times10^{-2}$ / 4.6$\times10^{-2}$)    & 3.9$\times10^{-3}$        & 0.75       \\ \hline
            \multicolumn{5}{c}{\textbf{4 hours before POAF} ($S=10$)}                                                                                \\ \hline
            \textbf{\textit{m}(PR\textsubscript{peak RRnorm})} [a.u.]      & 1.7$\times10^{-2}$ (1.3$\times10^{-2}$ / 2.4$\times10^{-2}$)    & 2.8$\times10^{-2}$ (1.9$\times10^{-2}$ / 4.1$\times10^{-2}$)    & 8.2$\times10^{-3}$        & 0.73       \\ \hline
            \multicolumn{5}{c}{\textbf{6 hours before POAF} ($S=10$)}                                                                                \\ \hline
            \textbf{\textit{m}(P\textsubscript{fin. dur.})} [ms]   & 24.0 (16.0 / 30.0)             & 28.0 (24.0 / 37.0)             & 5.7$\times10^{-3}$        & 0.73       \\
            \textbf{\textit{m}(P\textsubscript{dur. RRnorm})} [a.u.] & 5.9$\times10^{-2}$ (5.3$\times10^{-2}$ / 6.3$\times10^{-2}$)    & 7.1$\times10^{-2}$ (6.1$\times10^{-2}$ / 9.2$\times10^{-2}$)    & 2.2$\times10^{-3}$        & 0.76       \\
            \textbf{\textit{m}(PQ\textsubscript{on})} [ms]                & 38.0 (32.0 / 44.0)             & 44.0 (36.0 / 58.0)             & 5.4$\times10^{-3}$        & 0.73       \\

            \textbf{\textit{m}(PQ\textsubscript{on RRnorm})} [a.u.]        & 5.6$\times10^{-2}$ (4.4$\times10^{-2}$ / 6.2$\times10^{-2}$)    & 7.9$\times10^{-2}$ (6.0$\times10^{-2}$ / 9.0$\times10^{-2}$)    & 2.9$\times10^{-4}$        & 0.80       \\
            \textbf{\textit{m}(PR\textsubscript{peak})} [ms]             & 8.0 (8.0 / 12.0)               & 16.0 (11.0 / 21.0)             & 1.6$\times10^{-3}$        & 0.75       \\
            \textbf{\textit{m}(PR\textsubscript{on RRnorm})} [a.u.]       & 4.8$\times10^{-2}$ (3.7$\times10^{-2}$ / 5.4$\times10^{-2}$)    & 6.9$\times10^{-2}$ (4.8$\times10^{-2}$ / 8.7$\times10^{-2}$)    & 5.3$\times10^{-3}$        & 0.73       \\
            \textbf{\textit{m}(PR\textsubscript{peak RRnorm})} [a.u.]     & 1.5$\times10^{-2}$ (1.3$\times10^{-2}$ / 2.5$\times10^{-2}$)    & 3.3$\times10^{-2}$ (1.9$\times10^{-2}$ / 5.4$\times10^{-2}$)    & 4.5$\times10^{-3}$        & 0.74       \\ \hline
            \multicolumn{5}{c}{\textbf{12 hours before POAF} ($S=5$)}                                                                                \\ \hline
            \textbf{$\boldsymbol{\alpha}$(Q\textsubscript{on amp.})} [mV]                       & -2.0$\times10^{-6}$ (-6.1$\times10^{-6}$ / -3.0$\times10^{-6}$)  & 6.8$\times10^{-6}$ (-1.1$\times10^{-6}$ / 1.1$\times10^{-5}$)    & 5.2$\times10^{-3}$        & 0.72       \\ \hline
            \multicolumn{5}{c}{\textbf{18 hours before POAF} ($S=10$)}                                                                                \\ \hline
            \textbf{$\boldsymbol{\alpha}$(PQ\textsubscript{on})} [ms]      & 9.9$\times10^{-4}$ (-8.9$\times10^{-3}$ / 6.9$\times10^{-3}$)   & -9.5$\times10^{-3}$ (-2.4$\times10^{-2}$ / -2.0$\times10^{-3}$) & 1.4$\times10^{-3}$        & 0.76       \\
            \textbf{$\boldsymbol{\alpha}$(PQ\textsubscript{level, Pnorm})} [mV]                     & 2.5$\times10^{-4}$ (-7.2$\times10^{-5}$ / 1.5$\times10^{-3}$)   & -4.1$\times10^{-4}$ (-1.1$\times10^{-2}$ / 8.1$\times10^{-5}$)  & 1.3$\times10^{-3}$        & 0.78       \\
            \textbf{$\boldsymbol{\alpha}$(PR\textsubscript{on})} [ms]                             & -1.7$\times10^{-4}$ (-8.5$\times10^{-3}$ / 7.0$\times10^{-3}$)  & -7.1$\times10^{-3}$ (-2.8$\times10^{-2}$ / -1.7$\times10^{-3}$) & 4.8$\times10^{-3}$        & 0.73       \\
            \textbf{$\boldsymbol{\alpha}$(PR\textsubscript{peak})} [ms]                            & 2.5$\times10^{-4}$ (-3.5$\times10^{-3}$ / 4.4$\times10^{-3}$)   & -5.5$\times10^{-3}$ (-1.5$\times10^{-2}$ / -1.7$\times10^{-4}$) & 8.1$\times10^{-3}$        & 0.71       \\ \hline
            \multicolumn{5}{c}{\textbf{36 hours before POAF} ($S=30$)}                                                                                \\ \hline
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{min. vel.})}  [mV]                     & -7.7$\times10^{-7}$ (-5.7$\times10^{-6}$ / 9.5$\times10^{-6}$)  & 1.9$\times10^{-5}$ (7.9$\times10^{-7}$ / 4.3$\times10^{-5}$)    & 7.7$\times10^{-3}$        & 0.72       \\
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{vel. disp.})} [mV]                     & -1.1$\times10^{-6}$ (-1.1$\times10^{-5}$ / 1.6$\times10^{-5}$)  & 2.7$\times10^{-5}$ (2.4$\times10^{-6}$ / 6.2$\times10^{-5}$)    & 9.2$\times10^{-3}$        & 0.71       \\
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{energy})} [$\mu V^2$]                        & -7.1$\times10^{-10}$ (-6.3$\times10^{-9}$ / 7.4$\times10^{-9}$)  & 1.1$\times10^{-8}$ (3.0$\times10^{-9}$ / 2.3$\times10^{-8}$)    & 3.4$\times10^{-3}$        & 0.74       \\
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{energy norm.})} [V/s]                  & -1.1$\times10^{-10}$ (-6.9$\times10^{-10}$ / 4.7$\times10^{-10}$)  & 1.1$\times10^{-9}$ (5.1$\times10^{-10}$ / 1.8$\times10^{-9}$)    & 1.6$\times10^{-3}$        & 0.76       \\
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{gauss. error})} [a.u.]             & -5.1$\times10^{-8}$ (-3.8$\times10^{-6}$ / 2.4$\times10^{-6}$)  & 4.5$\times10^{-6}$ (-7.1$\times10^{-8}$ / 7.9$\times10^{-6}$)   & 4.9$\times10^{-3}$        & 0.73       \\
            \textbf{\textit{m}(P\textsubscript{fin. dur.})} [ms]   & 24.0 (16.0 / 28.0)             & 32.0 (24.0 / 37.0)             & 6.7$\times10^{-3}$        & 0.72       \\ \hline

            \multicolumn{5}{c}{\textbf{42 hours before POAF} ($S=5$)}                                                                                \\ \hline
            \textbf{\textit{m}(P\textsubscript{fin. dur.})} [ms]   & 16.0 (16.0 / 24.0)             & 24.0 (24.0 / 32.0)             & 8.8$\times10^{-3}$        & 0.72       \\
            \textbf{\textit{m}(PQ\textsubscript{off})} [ms]               & 24.0 (16.0 / 24.0)             & 24.0 (24.0 / 32.0)             & 1.0$\times10^{-2}$        & 0.72       \\
            \textbf{\textit{m}(PQ\textsubscript{on RRnorm})} [a.u.]        & 4.1$\times10^{-2}$ (3.6$\times10^{-2}$ / 5.4$\times10^{-2}$)    & 5.6$\times10^{-2}$ (4.4$\times10^{-2}$ / 6.9$\times10^{-2}$)    & 6.9$\times10^{-3}$        & 0.74       \\
            \textbf{\textit{m}(PQ\textsubscript{off RRnorm})} [a.u.]        & 3.1$\times10^{-2}$ (2.0$\times10^{-2}$ / 4.1$\times10^{-2}$)    & 4.2$\times10^{-2}$ (3.3$\times10^{-2}$ / 5.2$\times10^{-2}$)    & 4.8$\times10^{-3}$        & 0.75       \\
            \textbf{\textit{m}(PR\textsubscript{off RRnorm})} [a.u.]       & 2.4$\times10^{-2}$ (1.4$\times10^{-2}$ / 3.5$\times10^{-2}$)    & 3.5$\times10^{-2}$ (3.0$\times10^{-2}$ / 4.3$\times10^{-2}$)    & 7.7$\times10^{-3}$        & 0.73       \\

            \hline

            \multicolumn{5}{c}{\textbf{48 hours before POAF} ($S=10$)}                                                                                \\ \hline
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{magn.})} [mV]                           & -1.4$\times10^{-5}$ (-3.4$\times10^{-5}$ / -8.1$\times10^{-7}$) & 6.7$\times10^{-6}$ (-5.2$\times10^{-6}$ / 1.6$\times10^{-5}$)   & 2.1$\times10^{-3}$        & 0.78       \\
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{rms norm.})} [mV]                      & -6.3$\times10^{-7}$ (-1.5$\times10^{-6}$ / -4.1$\times10^{-9}$) & 2.7$\times10^{-7}$ (7.8$\times10^{-8}$ / 6.4$\times10^{-7}$)    & 9.3$\times10^{-3}$        & 0.73       \\
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{energy})} [$\mu V^2$]                        & -4.7$\times10^{-9}$ (-1.8$\times10^{-8}$ / 1.3$\times10^{-9}$)  & 2.0$\times10^{-9}$ (1.5$\times10^{-10}$ / 9.2$\times10^{-9}$)    & 7.0$\times10^{-3}$        & 0.74       \\
            \textbf{$\boldsymbol{\alpha}$(P\textsubscript{energy norm.})} [V/s]                  & -4.1$\times10^{-10}$ (-1.2$\times10^{-9}$ / 4.1$\times10^{-11}$)  & 2.1$\times10^{-10}$ (9.6$\times10^{-12}$ / 1.6$\times10^{-9}$)    & 3.9$\times10^{-3}$        & 0.76       \\

            \textbf{$\boldsymbol{\alpha}$(PQ\textsubscript{level, Pnorm})} [mV]                   & -3.7$\times10^{-3}$ (-7.0$\times10^{-2}$ / -6.6$\times10^{-4}$) & 3.0$\times10^{-5}$ (-2.1$\times10^{-4}$ / 1.8$\times10^{-3}$)   & 7.4$\times10^{-4}$        & 0.86       \\
            \textbf{\textit{m}(P\textsubscript{eucl. dist.})} [a.u.]       & 9.3$\times10^{-2}$ (7.3$\times10^{-2}$ / 1.2$\times10^{-1}$)    & 1.4$\times10^{-1}$ (9.6$\times10^{-2}$ / 1.9$\times10^{-1}$)    & 6.6$\times10^{-3}$        & 0.74       \\ \hline
    \end{tabular}
\end{table}

\clearpage
\subsubsection{Non-linear variability}

Non-linear CTM was found to significantly differ between POAF patients and controls in all the tested timestamps (Table \ref{table:CTM_results_POAF}). Controls were associated with higher CTM in the great majority of features and timestamps. However, CTM applied over the features P\textsubscript{vel. disp.}, P\textsubscript{fin. dur}, P\textsubscript{magn.}, PQ\textsubscript{level}, PQ\textsubscript{level Pnorm} and P\textsubscript{off amp.} was sometimes higher in POAF patients. Finally, several P-wave time- and morphological metrics were significant after correction for multiple comparisons 1, 12, 18, 42 and 48 hours before the arrhythmia onset, all of them showing higher CTM in controls.

\begin{footnotesize}
\setlength\tabcolsep{1.5pt}

    \begin{longtable}{@{}llllll@{}}
        \caption[Significant results obtained when using non-linear variability metrics to predict postoperative atrial fibrillation.]{Significant results (uncorrected $p<0.01$) obtained when testing the non-linear variability results. The presented values of optimal $\rho$ correspond to the number of multiples of the standard deviation which minimised the \textit{p}-value for the correspondent feature. Results significant after correction for multiple corrections (corrected $p<0.05$) are shaded in grey. The median value (and the first/ third quartiles) of each group are presented (in arbitrary units).}
        \label{table:CTM_results_POAF} \\
        \hline \multicolumn{1}{c}{\textbf{Metrics}} & \multicolumn{1}{c}{$\boldsymbol{\rho}$} & \multicolumn{1}{c}{\textbf{Controls}} & \multicolumn{1}{c}{\textbf{POAF}} & \multicolumn{1}{c}{\textbf{P-values}} & \multicolumn{1}{c}{\textbf{AUC}} \\ \hline
        \endfirsthead

        \multicolumn{3}{c}%
        {{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
        \hline \multicolumn{1}{c}{\textbf{Metrics}} & \multicolumn{1}{c}{$\boldsymbol{\rho}$} & \multicolumn{1}{c}{\textbf{Controls}} & \multicolumn{1}{c}{\textbf{POAF}} & \multicolumn{1}{c}{\textbf{P-values}} & \multicolumn{1}{c}{\textbf{AUC}} \\ \hline
        \endhead

        \hline \multicolumn{6}{r}{{Continued on next page}} \\ \hline
        \endfoot

        \endlastfoot

        \multicolumn{6}{c}{\textbf{1 hour before POAF} (lag$=5$)}                                                                                \\ \hline
        \textbf{PQ\textsubscript{off RRnorm}}          & 3.0                      & 0.8944 (0.8751 / 0.9085)            & 0.9089 (0.8996 / 0.9367)        & 2.7$\times10^{-3}$                              & 0.75                           \\
        \textbf{PR\textsubscript{off RRnorm}}         & 8.0                      & 1.0000 (0.9994 / 1.0000)            & 0.9994 (0.9979 / 1.0000)        & 6.0$\times10^{-3}$                              & 0.71                           \\

        \textbf{PR\textsubscript{on RRnorm}}          & 4.0                      & 0.9863 (0.9791 / 0.9931)            & 0.9741 (0.9554 / 0.9814)       & 3.1$\times10^{-4}$                              & 0.80                           \\

        \textbf{PR\textsubscript{peak RRnorm}}        & 3.5                   & 0.9849 (0.9677 / 0.9942)            & 0.9529 (0.9303 / 0.9735)        & 5.4$\times10^{-4}$                              & 0.79                           \\

        \textbf{P\textsubscript{area}}               & 13.0                     & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9999 / 1.0000)        & 1.2$\times10^{-3}$                              & 0.62                           \\

        \textbf{P\textsubscript{dur. RRnorm}}   & 4.0                      & 0.9822 (0.9758 / 0.9884)            & 0.9714 (0.9637 / 0.9767)        & 3.3$\times10^{-4}$                              & 0.80                           \\

        \textbf{P\textsubscript{eucl. dist.}}         & 4.0                      & 0.9906 (0.9822 / 0.9930)            & 0.9754 (0.9658 / 0.9834)        & 3.1$\times10^{-5}$                              & 0.85                           \\
        \textbf{P\textsubscript{gauss. A}}             & 6.0                      & 0.9981 (0.9958 / 0.9990)            & 0.9947 (0.9907 / 0.9977)        & 3.9$\times10^{-3}$                              & 0.74                           \\

        \textbf{P\textsubscript{magn.}}               & 4.0                      & 0.9826 (0.9770 / 0.9896)            & 0.9721 (0.9564 / 0.9816)        & 9.2$\times10^{-4}$                              & 0.78                           \\

        \textbf{P\textsubscript{area norm.}}         & 4.0                      & 0.9776 (0.9687 / 0.9843)            & 0.9647 (0.9560 / 0.9724)        & 4.8$\times10^{-4}$                              & 0.79                           \\
        \textbf{P\textsubscript{rms norm.}}          & 5.0                      & 0.9912 (0.9855 / 0.9935)            & 0.9842 (0.9787 / 0.9896)        & 5.0$\times10^{-3}$                              & 0.73                           \\
        \textbf{P\textsubscript{vel. disp.}}          & 4.0                      & 0.9821 (0.9781 / 0.9870)            & 0.9764 (0.9726 / 0.9816)        & 3.5$\times10^{-3}$                              & 0.74                           \\

        \textbf{CCI}          & 10.5                      & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9993 / 1.0000)        & 3.5$\times10^{-3}$                              & 0.74                           \\

        \hline \multicolumn{6}{c}{\textbf{2 hours before POAF} (lag$=8$)}   \\ \hline
        \textbf{PQ\textsubscript{off}}                 & 8.5                   & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9987 / 1.0000)        & 2.8$\times10^{-3}$                              & 0.67                           \\
        \textbf{PR\textsubscript{on}}                  & 11.0                     & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9992 / 1.0000)        & 5.2$\times10^{-3}$                              & 0.65                           \\
        \textbf{PR\textsubscript{peak}}                & 14.0                     & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9991 / 1.0000)        & 5.9$\times10^{-3}$                              & 0.67                           \\
        \textbf{PQ\textsubscript{off RRnorm}}   & 9.5                   & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9991 / 1.0000)        & 6.7$\times10^{-3}$                              & 0.65                          \\
        \textbf{P\textsubscript{eucl. dist.}}         & 4.5                   & 0.9952 (0.9892 / 0.9968)            & 0.9884 (0.9756 / 0.9942)        & 2.8$\times10^{-3}$                              & 0.76                           \\
        \textbf{P\textsubscript{gauss. C}}             & 14.5                  & 1.0000 (0.9992 / 1.0000)            & 0.9991 (0.9986 / 0.9997)        & 7.1$\times10^{-3}$                              & 0.71                           \\
        \textbf{P\textsubscript{area norm.}}         & 3.5                   & 0.9593 (0.9466 / 0.9684)            & 0.9372 (0.9327 / 0.9548)        & 5.3$\times10^{-3}$                              & 0.74                           \\
        \textbf{P\textsubscript{fin. dur.}}     & 6.0                      & 0.9994 (0.9981 / 1.0000)            & 1.0000 (0.9998 / 1.0000)        & 2.7$\times10^{-3}$                              & 0.75                           \\

        \hline \multicolumn{6}{c}{\textbf{4 hours before POAF} (lag$=6$)}    \\ \hline
        \textbf{P\textsubscript{dur RRnorm}}               & 6.0                     & 0.9995 (0.9988 / 1.0000)            & 0.9982 (0.9957 / 0.9995)        & 4.6$\times10^{-3}$                              & 0.75                           \\
        \textbf{PR\textsubscript{on RRnorm}}               & 4.5                     & 0.9928 (0.9882 / 0.9966)            & 0.9856 (0.9667 / 0.9913)        & 4.4$\times10^{-3}$                              & 0.75                           \\

        \textbf{P\textsubscript{area}}               & 13.0                     & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9995 / 1.0000)        & 1.5$\times10^{-3}$                              & 0.65                           \\
        \hline \multicolumn{6}{c}{\textbf{6 hours before POAF} (lag$=6$)}     \\ \hline
        \textbf{P\textsubscript{energy}}             & 11.5                  & 0.9991 (0.9981 / 0.9997)            & 0.9980 (0.9961 / 0.9987)        & 8.3$\times10^{-3}$                              & 0.72                           \\
        \textbf{P\textsubscript{eucl. dist.}}         & 4.5                   & 0.9941 (0.9895 / 0.9968)            & 0.9911 (0.9816 / 0.9922)        & 4.8$\times10^{-3}$                              & 0.74                           \\
        \textbf{P\textsubscript{fin. dur.}}     & 6.0                      & 0.9993 (0.9976 / 1.0000)            & 1.0000 (0.9994 / 1.0000)        & 5.9$\times10^{-3}$                              & 0.72                           \\

        \hline \multicolumn{6}{c}{\textbf{12 hours before POAF} (lag$=4$)}    \\ \hline

        \textbf{PQ\textsubscript{off}}                 & 13.0                     & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9990 / 1.0000)        & 5.2$\times10^{-4}$                              & 0.65                           \\
        \textbf{PQ\textsubscript{off RRnorm}}                 & 9.5                     & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9991 / 1.0000)        & 2.2$\times10^{-4}$                              & 0.64                           \\

        \textbf{PQ\textsubscript{on}}                  & 7.5                   & 1.0000 (1.0000 / 1.0000)            & 0.9998 (0.9990 / 1.0000)        & 7.6$\times10^{-4}$                              & 0.71                           \\

        \textbf{P\textsubscript{gauss. W}}             & 20.0                     & 1.0000 (1.0000 / 1.0000)            & 1.0000 (0.9989 / 1.0000)        & 9.9$\times10^{-3}$                              & 0.66                           \\
        \textbf{P\textsubscript{magn.}}               & 2.5                   & 0.9210 (0.8766 / 0.9576)            & 0.8810 (0.8358 / 0.9132)        & 7.4$\times10^{-3}$                              & 0.74                           \\

        \textbf{P\textsubscript{area norm.}}         & 2.0                      & 0.8111 (0.7547 / 0.8485)            & 0.7089 (0.6585 / 0.7424)        & 1.5$\times10^{-4}$                              & 0.84                           \\

        \textbf{P\textsubscript{rms norm.}}          & 2.0                      & 0.7889 (0.7472 / 0.8466)            & 0.6877 (0.6503 / 0.7236)        & 1.2$\times10^{-3}$                              & 0.79                           \\
        \textbf{P\textsubscript{off amp.}}           & 8.0                      & 0.9971 (0.9952 / 0.9986)            & 0.9992 (0.9980 / 1.0000)        & 2.3$\times10^{-3}$                              & 0.77                           \\
        \textbf{P\textsubscript{fin. dur.}}     & 5.5                   & 0.9988 (0.9962 / 0.9995)            & 0.9997 (0.9993 / 1.0000)        & 9.3$\times10^{-3}$                              & 0.73                           \\
        \textbf{WI$_t$}                        & 2.5                   & 0.8301 (0.8163 / 0.8425)            & 0.8083 (0.8008 / 0.8246)        & 3.7$\times10^{-3}$                              & 0.76         \\ \hline
    \end{longtable}

\end{footnotesize}

\end{document}


text:
Q: Difficulty with the chain rule: unable to confirm that the sum $\frac {dx^u} {dt} \frac {d\vec V} {dx^u}$ equals $\frac {d\vec V} {dt}$ My book Tensors made easy by Giancarlo Bernacci makes the following claim:
$\frac {D \vec V} {d \tau}$ is referred to as the covariant derivative along a line ... It can be expressed as:
$\frac {D V^b} {d \tau} := U^a \nabla_a V^b = U^a (\frac {\partial V^b} {\partial x^a} + \Gamma _{a \lambda} ^b V^\lambda) = \frac {d V^b} {d x^a} \frac {d x^a} {d \tau} + \Gamma _{a \lambda} ^b V^\lambda U^a = \frac {d V^b} {d \tau} + \Gamma _{a \lambda} ^b V^\lambda U^a$
End quote.
Here the covariant derivative of $\vec V$ is being taken along a line parameterized as $x^a = x^a(\tau)$ with tangent $\vec U = \frac {d x^a} {d \tau} \vec e_a$.
What I don't understand is how it is that the chain rule gives $\frac {d V^b} {d x^a} \frac {d x^a} {d \tau} = \frac {d V^b} {d \tau}$ since the LHS is a sum over the abstract index $a$ and the RHS appears to be obtained by canceling abstract indices.
(My naive expectation would be that the sum expands as follows: $\frac {d V^b} {d x^a} \frac {d x^a} {d \tau} = \frac {d V^b} {d x^1} \frac {d x^1} {d \tau} + ... + \frac {d V^b} {d x^n} \frac {d x^n} {d \tau} = n \frac {d V^b} {d \tau} $ which differs by a factor of $n$ from what the book claims)

That should be all that is needed to explain to me how the book's definition actually works and how I am misunderstanding it.  However, here is some more information that may come in useful.  I'm doing problem 38:
A particle follows a helical path on the surface of a cylinder parameterized as:
$l = \begin{cases} x = \rho \space cos \space \omega t \\
y = \rho \space sin \space \omega t \\
z = h t
\end{cases}$
Compute:
a) the vector tangent to the path
b) the derivative along the line of the tangent vector itself
My answer to a) is
$\vec T = (\frac {d x} {d t}, \frac {d y} {d t}, \frac {d z} {d t}) = (-\rho \omega \space sin \space \omega t, \rho \omega \space cos \space \omega t, h)$
My answer to b) is
$\frac {d \vec T} {d t} = <\tilde\nabla \vec T, \vec T> = \nabla _\vec T \vec T \rightarrow ^{comp} T^a \nabla_a T^b = T^a \partial_a T^b$
(last equality holds because $\Gamma$ are all zero in the standard Euclidean basis of $\mathbb{R}^3$)
With $b=x$ we have $T^a \nabla_a T^x = T^x \partial_x T^x + T^y \partial_y T^x + T^z \partial_z T^x$
Now $\partial_x T^x = - \partial_x \rho \omega \space sin \space \omega t$
$= - \partial_x (\sqrt{x^2 + y^2} \rho \omega \space sin \space \omega t$ (using the identity that $\rho = \sqrt{x^2 + y^2}$)
$= - \omega \space cos \space \omega t \space sin \space \omega t$ (differentiating with respect to $x$ and substituting again)
Likewise $\partial_y T^x = -\omega \space sin^2 \space \omega t$
And $\partial_z T^x = 0$
With that we can find the $x$ coordinate of the derivative along the line of $\vec T$
$T^x \partial_x T^x + T^y \partial_y T^x + T^z \partial_z T^x = \rho \omega^2 \space cos \space \omega t \space sin^2 \space \omega t - \rho \omega^2 \space cos \space \omega t \space sin^2 \space \omega t = 0$
The correct $x$ coordinate is $-\rho \omega^2 \space cos \space \omega t$.  The two ways of solving the problem (expanding and summing over abstract indices v.s. canceling them via the chain rule) should yield the same result, but they do not.  What gives?

redpajama_set_name: RedPajamaStackExchange


text:
Q: Linear gradient brush with c# on windows phone 8.0 I am creating a linear gradient on left mouse button up. This is the code which
which I am trying to implement the above linear gradient brush
 private void r10_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            r10.Background = new LinearGradientBrush(Colors.Purple, Colors.Gray, 90);
        }

If you have got any idea please help

A: The constructor you're using doesn't exist in Silverlight. You can rewrite your code this way:
var gradients = new GradientStopCollection
{
    new GradientStop {Color = Colors.Purple, Offset = 0},
    new GradientStop {Color = Colors.Gray, Offset = 1}
};

r10.Background.Background = new LinearGradientBrush(gradients, 90);


text:
Q: Is there a way to simulate a network outage for running VMs VirtualBox? I have several guest VMs configured to use internal networking.
Is there a way to simulate a network outage on specific VM interfaces while the guests are running?
Edit: I really need a command line way to do this, I have more than 4 NICs to toggle (GUI supports only the first 4). More details, windows host running VirtualBox 4.2.4 r81684. E.g., trying to use vboxmanage modifyvm IMAGE_NAME --cableconnect5 off while the guest is running yields the error:
VBoxManage.exe: error: The machine 'IMAGE_NAME' is already locked for a session (or being unlocked)

If I shutdown the VM, I'm able to toggle the connectivity with this command.

A: Yes. While having the VM running, you still have some options to change on the network, e.g. disconnect cable, connect to another network.
See the sceenshot below. This was done using VirtualBox 4.2.4 (virtualbox.org) on Ubuntu 12.04.

Update (command-line)
It's possible to do this command-line using the subcommand controlvm. See the section VBoxManage modifyvm in the VirtualBox documentation:

This command changes the properties of a registered virtual machine
  which is not running. [...]
These commands require that the machine is powered off (neither
  running nor in "saved" state). Some machine settings can also be
  changed while a machine is running; those settings will then have a
  corresponding subcommand with the VBoxManage controlvm subcommand (see
  the section called "VBoxManage controlvm").

The command
VBoxManage controlvm "Windows XP" setlinkstate1 off

worked for me. I suppose this works for other NICs as well.


text:
Q: Is there an option to get the TFS changeset number automatically? I would like to present in my GUI the changeset number in the TFS that compiled into that code version without hard-coding it each time I update something in the code, check-in, and re-compile.
Is there a way to do that?

A: Where do you need this? In MSBuild there is a property called GetVersion, which has the changeset of the build in the format Cxxxxx.
If you need the actual changeset from API in C#, you can use this:
VersionControlServer vcs = (VersionControlServer)tfsTeamProjectCollection.GetService(typeof(VersionControlServer));
int latestId = vcs.GetLatestChangesetId();


text:
Q: Why __doPostBack doesn't work properly? I have a page with a link for exit.(when user click the exit, clear all session).

 <form runat="server">
  <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

صفحه اصلی

ثبت نام

ورود

تماس با ما

درباره ما

خروج

and use javascript in head tag
 function ClearSession() {
  __doPostBack('__Page', 'ClearSession');
 };

and in code behind
 if (IsPostBack)
    {
        string _eventArg = Request["__EVENTARGUMENT"];
        if (_eventArg == "ClearSession")
        {
            Session.Clear();
        }
    }

but don't PostBack.

A: The javascript function shoud be included between


text:
Q: Replace all characters after the first in a string I was wondering if there was a way to use gsub to remove all characters except for the first one from a given string.
So if I had hello, I would end up with h.
Thanks!

A: I could not find an exact dupe for this so here you go,
sub('(.).*', '\\1', c('hello'))
#[1] "h"

For other methods of extracting the first letter, you can refer to this question

A: I think this would work for you:
> substring("hello", 1, 1)
[1] "h"


text:
Q: response.redirect and throw in catch block What will happen in the following scenario? Will it throw work after response.redirect?
Or do I need to use Response.Redirect in catch block of main method where it throws exception call stack....
try
{
//code
}
catch(Exception ex)
{
Response.Redirect("Error.aspx");
throw;
}

A: Since you aren't supplying the parameter to indicate whether the current page should continue executing, it will automatically terminate the page by calling End().  Using the method with a single parameter is the same as calling the method with two parameters, with the second (endResponse) set to true. Since End() results in an exception being thrown, it won't ever reach your throw statement.
Reference: http://msdn.microsoft.com/en-us/library/a8wa7sdt.aspx

When you use this method in a page
  handler to terminate a request for one
  page and start a new request for
  another page, set endResponse to true
  or call the Redirect method overload.
  This method calls End for the original
  request, which throws a
  ThreadAbortException exception upon
  completion.

If you want the page to continue executing you need to use the signature with two parameters and set the endResponse parameter to false.

A: If you call Response.Redirect (without the overload) then it should immediately stop execution and so the throw won't be raised.
However, if you use the overload and pass in false eg. Response.Redirect("Error.aspx", false) then it will continue execution of the page and then redirect.
(At least, that is my understanding from the documentation).


text:
Q: Outputfield font size change I am binding product description in outputfield but I can't able to change the font size.I am having description type as rich text area to enter bullet points description. If I use Outputtext I lam not getting the product description format correctly.So how to change the font size of outputfield as CSS style not working.See my sample below.
<apex:outputField  VAlue="{!line.Product2.Extended_Sales_Description__c}" style="font-size:10px;"/>

Also with outputText as follows
<apex:outputText  VAlue="{!line.Product2.Extended_Sales_Description__c}" style="font-size:10px;" escape="false"/>

If I remove escape="false" then font size is reduced however description forma is not retrieved correcty. How to resolve this?

A: Try to use this :
<apex:outputText value="{!myOppDescrp}" style="white-space: pre;font-size:15px;" escape="false"/>

This may solve your problem .

A: The style used to display the output field component, used primarily for adding inline CSS styles. This attribute may not work for all values. If your text requires a class name, use a wrapping span tag.
Refer this https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_outputField.htm


text:
Q: Автоматическое исполнение кода Здравствуйте. Мне необходимо реализовать автоматическое исполнение кода. Имеется какая-то задача (например, программа должна вывести сумму чисел, которые поданы на вход как параметры). Пользователь вводит код на Java в input (textarea) поле. Нажимает выполнить и должно происходить сначала проверка на корректность кода, автоматическое исполнение и тестирование этого кода. (Как, например, на www.codecademy.com).
Какие у Вас могут быть предложения по этому поводу?


text:
Q: Unity 3D not supported in VirtualBox when installing Guest Additions via command line As I understand VirtualBox Guest Additions can be installed via command line as:
apt-get install build-essential linux-headers-$(uname -r) virtualbox-guest-x11

Although there seems to be differences of opinion about what exactly is to be installed but my understanding is that these are the necessary and sufficient components. Different advice here, here, here, here, here and here and pretty much everywhere.
However this seem to install version 4.3.36.
This way Unity 3D is not supported which causes lagging. This can be verified by the following command:
/usr/lib/nux/unity_support_test -p

(For the record I went through all other recommendation to make it work such as this and that which include allocating more VRAM, enabling 3D acceleration in VirtualBox, etc.)
Via the Oracle iso file version 5.1.18 is installed. With that Unity 3D works fine. I also understand that these packages are different as the iso is shipped by Oracle and the ones installed via command line are shipped by Ubuntu but in most threads they are treated as if they were the same.
So my questions:
What is the difference if any between these packages?
How can I install the latest version via command line? || How can I install a version that supports Unity 3D?
Currently using Ubuntu 14.04 and Virtual 5.1.18 but experienced this on many other setups as well.

A: The only appropriate guest additions running the most recent fully updated Virtual Box is those you get with the package from the Oracle repositories. The versions we can install from the Ubuntu repositories only meets those of the Virtual Box release version provided there. These usually are many versions behind (14.04 ships 4.3.36, 16.10 ships 5.1.16).
Depending on how you had installed Virtual Box the guest additions CD ISO image will be in /usr/share/virtualbox/VBoxGuestAdditions.iso or in /opt/virtualbox/VBoxGuestAdditions.iso. Usually you can mount this CD by selecting Devices > Insert Guest Additions CD image from the graphical VirtualBox Manager interface or using VBoxManage storageattach (see manual for details on syntax).
The guest additions will install in the guest after running the installer from the mounted CD in the guest either by auto-run or in a terminal afte cd to the mountpoint:
sudo ./VBoxLinuxAdditions.run

After that the Virtual Box graphic driver will make use of the host GPU for 3D graphic acceleration and Unity will be fully supported if the host graphics driver is capable of providing the hardware acceleration needed.
Often newer Ubuntu releases also need a new release of Virtual Box for installing as a guest. Therefore we can not install Ubuntu 16.10 as a guset in a VirtualBox 4.3. from Ubuntu 14.04 host.


text:
Q: How can I execute an EXE file in asp.net website? I have a website in asp.net with VB, and I have a link to a medical program that is installed in PC, when I click the link I want to execute the .exe for this program. I found this code but it´s works only when my project is locally:
 System.Diagnostics.Process.Start("C:\Windows\System32\MiProgram.exe")

I also tried with this code:
 Dim OpenDoc As ProcessStartInfo = New ProcessStartInfo
 Dim stPath As String = "C:\Windows\System32\MiProgram.exe"
 OpenDoc.FileName = stPath
 OpenDoc.Verb = "open"
 OpenDoc.WindowStyle = ProcessWindowStyle.Normal
 Process.Start(OpenDoc)

Both codes works locally, but when I get my project to the web, does nothing
I also read that I can enable de IIS Service, I follow the steps of this page, but is not use to me.
Is there any solution to this problem?
I accept suggestions.
Thanks.

A: Unfortunately, it is not possible to run a program on the client from server-side.
There is already some discussions about that, here is some links :
How to execute an application on the client from a website?
Run an exe in client machine from a website
Executing exe on client side using C#

A: You can do this with a work around..
You create a running Windows Forms application, on that application you host a wcf services, check this link as sample.
Expose a method like `RunApplication' put the same code their, where you can call it from your website, this will 100% work.

A: You can try by implementing this settings:

In IIS 7/8 go Control Panel / Program And Features / Turn Windows
  features on or off, and check all items from: Web Managment Tools,
  (it's include: IIS Managment Service, II 6 Managment Compatibility)


text:
Q: SSIS - cast a date to use in an expression I want to cast a date into ISO format, and use it as a string in an expression in SSIS.
This is what I type in T-SQL
select convert(varchar(8), GetDate(), 112)

and this is what I get back
20100630

My goal - is to create an archive folder based on the date. I have the File System Task part of creating a folder sorted, I can do that ... I just need to be able to Cast the date to a string, so I can use that.
Thanks in advance.

A: Old question, better-er answer, from Adrian's comment here:

Try an intermediate cast to type DT_DBDATE. Casting to WSTR gives a
  string in format "YYYY-MM-DD", which is easily tidied up:
REPLACE((DT_WSTR,200)(DT_DBDATE)GETUTCDATE(),"-","")

Or use without the REPLACE to get the YY-MM-DD

A: You'll need to add an expression:
RIGHT((DT_WSTR, 4) DATEPART("yyyy", GetDate()), 4) +
RIGHT("0" + (DT_WSTR,2)DatePart("mm", GetDate()), 2) +
RIGHT("0" + (DT_WSTR,2)DatePart("dd", GetDate()), 2)

This expression will create the result that you are after.

A: In SSIS you would use the DT_STR or DT_WSTR cast to accomplish. A few examples are
(DT_STR, 4, 1252)YEAR(GETDATE()) +
RIGHT("0" + (DT_STR, 2, 1252)MONTH(GETDATE()), 2) +
RIGHT("0" + (DT_STR, 2, 1252)DAY(GETDATE()), 2)

or
(DT_WSTR, 4)YEAR(GETDATE()) +
RIGHT("0" + (DT_WSTR, 2)MONTH(GETDATE()),2) +
RIGHT("0" + (DT_WSTR, 2)DAY(GETDATE()), 2)

See the MSDN documentation for more information.

A: To add to the other answers, here is a reference guide I use frequently:
http://sqlis.com/sqlis/post/Expression-Date-Functions.aspx


text:
Q: Can I iterate over columns of a composite type? Let's say I have the following table named bar:
key    | columnA   | columnB   | columnC
A      | B         | C         | D
E      | F         | G         | H

I want to write a function taking a key and a string and doing the following (best described by examples):

*

*Input: ('A', '${columnB} - ${columnA}') / Output : 'C - B'

*Input: ('B', 'Hello ${columnC}') / Output: 'Hello H'
For the moment, I have this implementation:
CREATE OR REPLACE FUNCTION foo
( param_key IN VARCHAR2
, format_string IN VARCHAR2
)
RETURN VARCHAR2
IS
    my_row bar%ROWTYPE;
    retval VARCHAR2(4000);
BEGIN
    BEGIN SELECT * INTO my_row FROM bar WHERE "key" = param_key;
    EXCEPTION WHEN NO_DATA_FOUND THEN RETURN NULL;
    END;

    retval := format_string;
    retval := REPLACE(retval, '${columnA}', my_row.columnA);
    retval := REPLACE(retval, '${columnB}', my_row.columnB);
    retval := REPLACE(retval, '${columnC}', my_row.columnC);

    RETURN retval;
END;
/

I would like to avoid enumerating all columns one by one in the last part, because the structure of my table can change (new columns for instance). Is there a way to iterate on all columns of my_row, and to replace ${the column name} with the value stored in that column, in a generic way?
Thank you

A: Another way to achieve this.
Create xmltype from table row.
Create xsl-transform from format_string.
Transform xml using xsl
declare
v_string_format varchar2(200) := '{columnA} + {columnB} + {columnA}{columnB}';
v_key varchar2(10) := 'A';
v_cursor sys_refcursor;
l_xml xmltype;
v_xslt VARCHAR2(500):='<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/ROWSET/ROW">{patern}</xsl:template></xsl:stylesheet>';
begin
-- create xsl transform
v_string_format :=  upper(v_string_format);
v_string_format := REPLACE(v_string_format,'{','<xsl:value-of select="');
v_string_format := REPLACE(v_string_format,'}','"/>');
v_xslt := replace(v_xslt,'{patern}',v_string_format);
dbms_output.put_line(v_string_format);
-- open cursor for table
 open v_cursor for select * from bar where key = v_key;
-- get v_cursor as xmltype.
 l_xml := xmltype(v_cursor);
 -- print xml
 dbms_output.put_line(l_xml.getClobVal());
 -- tranform xml and print result
 dbms_output.put_line(l_xml.transform(xmltype(v_xslt)).getClobVal());
 close v_cursor;
end;

A: You can get the result you are after using dynamic queries...
CREATE OR REPLACE FUNCTION foo
( param_key IN VARCHAR2
, format_string IN VARCHAR2
)
RETURN VARCHAR2
IS
    retval VARCHAR2(4000) := format_string;
    cols SYS.ODCIVARCHAR2LIST;
BEGIN
    SELECT  COLUMN_NAME
    BULK COLLECT INTO cols
    FROM    USER_TAB_COLUMNS
    WHERE   TABLE_NAME = 'bar'
    ORDER BY COLUMN_ID;

    FOR i IN 1 .. cols.COUNT LOOP
      EXECUTE IMMEDIATE 'SELECT REPLACE( :1, ''${' || cols(i) || '}'', ' || cols(i) || ' ) FROM bar WHERE key = :2'
      INTO retval
      USING retval, param_key;
    END LOOP;

    RETURN retval;
EXCEPTION
  WHEN NO_DATA_FOUND THEN
    RETURN NULL;
END;
/

... but:

*

*This uses dynamic SQL to query the table directly and does not use a %ROWTYPE record.

*You may not have access to USER_TAB_COLUMNS (or may need ALL_TAB_COLUMNS) and the DBA might not want you to have access to the data dictionary tables.

*It is probably (almost certainly) very inefficient.

*I've seen this done before and never let it pass a code review (writing out the explicit column names has always seemed preferable).

So, while it is possible, I would say don't do this.

A: A more efficient solution is this one. For sure you have to write more code and it uses the full scope of dynamic SQL.
CREATE OR REPLACE FUNCTION foo (param_key IN VARCHAR2, format_string IN VARCHAR2)
RETURN VARCHAR2 IS

    retval VARCHAR2(4000) := format_string;

    cur SYS_REFCURSOR;
    curId  INTEGER;

    descTab DBMS_SQL.DESC_TAB;
    colCnt NUMBER;

    numvar NUMBER;
    datevar DATE;
    namevar VARCHAR2(4000);
    tsvar TIMESTAMP;

BEGIN

    OPEN cur FOR SELECT * FROM bar WHERE "key" = param_key;
    curId := DBMS_SQL.TO_CURSOR_NUMBER(cur);

    DBMS_SQL.DESCRIBE_COLUMNS(curId, colCnt, descTab);
    -- Define columns
    FOR i IN 1..colcnt LOOP
        IF desctab(i).col_type = DBMS_TYPES.TYPECODE_NUMBER THEN
            DBMS_SQL.DEFINE_COLUMN(curid, i, numvar);
        ELSIF desctab(i).col_type = DBMS_TYPES.TYPECODE_DATE THEN
            DBMS_SQL.DEFINE_COLUMN(curid, i, datevar);
        ELSIF desctab(i).col_type = DBMS_TYPES.TYPECODE_TIMESTAMP THEN
            DBMS_SQL.DEFINE_COLUMN(curid, i, tsvar);
        ELSIF desctab(i).col_type = DBMS_TYPES.TYPECODE_VARCHAR2 THEN
            DBMS_SQL.DEFINE_COLUMN(curid, i, namevar, 4000);
        --ELSIF desctab(i).col_type = ... THEN
            --DBMS_SQL.DEFINE_COLUMN(curid, i, ...);
        END IF;
    END LOOP;

    -- Fetch Rows
    IF DBMS_SQL.FETCH_ROWS(curid) > 0 THEN
        -- Fetch only the first row and do not consider if further rows exist,
        -- otherwise use WHILE DBMS_SQL.FETCH_ROWS(curid) > 0 LOOP
        FOR i IN 1..colcnt LOOP
            IF desctab(i).col_type = DBMS_TYPES.TYPECODE_VARCHAR2 THEN
                DBMS_SQL.COLUMN_VALUE(curid, i, namevar);
                retval := REPLACE(retval, '${'||desctab(i).col_name||'}', namevar);
            ELSIF desctab(i).col_type = DBMS_TYPES.TYPECODE_NUMBER THEN
                DBMS_SQL.COLUMN_VALUE(curid, i, numvar);
                retval := REPLACE(retval, '${'||desctab(i).col_name||'}', numvar);
            ELSIF desctab(i).col_type = DBMS_TYPES.TYPECODE_DATE THEN
                DBMS_SQL.COLUMN_VALUE(curid, i, datevar);
                retval := REPLACE(retval, '${'||desctab(i).col_name||'}', datevar);
            ELSIF desctab(i).col_type = DBMS_TYPES.TYPECODE_TIMESTAMP THEN
                DBMS_SQL.COLUMN_VALUE(curid, i, tsvar);
                retval := REPLACE(retval, '${'||desctab(i).col_name||'}', tsvar);
            --ELSIF desctab(i).col_type = ... THEN
                --DBMS_SQL.COLUMN_VALUE(curid, i, ...);
                --retval := REPLACE(retval, '${'||desctab(i).col_name||'}', ...);
            END IF;
        END LOOP;
    ELSE
        retval := NULL;
    END IF;
    DBMS_SQL.CLOSE_CURSOR(curId);

    RETURN retval;

END;


text:
Q: Add Line items button is not showing up on contract line items in lightning How can we enable add contract line items button in lightning.In classic i am able to see the button but in lightning it is not showing up.Any help will be much appreciated
Thank you

A:
The button is available in both classic and Lightning. Their is little
  difference in their name. In classic, it is called Add line item and
  in Lightning it is called New line Items.

On service Contract page, you need to add both the buttons on the layout for contract line item related list.
To check the button, you need to look into related list on the service contract record page.


text:
Q: Distinct Count Multiple Columns MS Access I am wanting to find a way to use the following table and write a distinct count query:
Unique Number | Name  | Number | ID
1             | James | 1      | 456
2             | John  | 2      | 456
2             | John  | 3      | 456
2             | John  | 4      | 456
2             | John  | 5      | 457
1             | James | 3      | 457
1             | James | 4      | 456
3             | Ted   | 3      | 457
3             | Ted   | 4      | 456

And would like the following query result when the ID is 456
Unique  | Name  | Number Count
1       | James | 2
2       | John  | 3
3       | Ted   | 1

A: A simple aggregate query will get the count of Number by name and ID.
SELECT [Unique Number], [Name], ID, Count(*) AS CountNum FROM table GROUP BY [Unique Number], [Name], ID;'
Counting how many unique ID per name requires two queries. First have to do a query that returns DISTINCT IDs for each Name.
SELECT DISTINCT [Unique Number], [Name], ID FROM tablename;
Then use that query to calculate aggregate count.
SELECT [Unique Number], [Name], Count(ID) AS CountID FROM Query1 GROUP BY [Unique Number], [Name];
Can nest the 2 queries.
SELECT [Unique Number], [Name], Count(ID) AS CountID FROM (SELECT DISTINCT [Unique Number], [Name], ID FROM tablename) AS Query1 GROUP BY [Unique Number], [Name];


text:
Q: expand 1 dim vector by using taylor series of log(1+e^x) in python I need to non-linearly expand on each pixel value from 1 dim pixel vector with taylor series expansion of specific non-linear function (e^x or log(x) or log(1+e^x)), but my current implementation is not right to me at least based on taylor series concepts. The basic intuition behind is taking pixel array as input neurons for a CNN model where each pixel should be non-linearly expanded with taylor series expansion of non-linear function.
new update 1:
From my understanding from taylor series,  taylor series is written for a function F of a variable x in terms of the value of the function F and it's derivatives in for another value of variable x0. In my problem, F is function of non-linear transformation of features (a.k.a, pixels), x is each pixel value, x0 is maclaurin series approximation at 0.
new update 2
if we use taylor series of log(1+e^x) with approximation order of 2, each pixel value will yield two new pixel by taking first and second expansion terms of taylor series.
graphic illustration
Here is the graphical illustration of the above formulation:

Where X is pixel array, p is approximation order of taylor series, and α is the taylor expansion coefficient.
I wanted to non-linearly expand pixel vectors with taylor series expansion of non-linear function like above illustration demonstrated.
My current attempt
This is my current attempt which is not working correctly for pixel arrays. I was thinking about how to make the same idea applicable to pixel arrays.
def taylor_func(x, approx_order=2):
    x_ = x[..., None]
    x_ = tf.tile(x_, multiples=[1, 1, approx_order+ 1])
    pows = tf.range(0, approx_order + 1, dtype=tf.float32)
    x_p = tf.pow(x_, pows)
    x_p_ = x_p[..., None]
    return x_p_

x = Input(shape=(4,4,3))
x_new = Lambda(lambda x: taylor_func(x, max_pow))(x)

my new updated attempt:
x_input= Input(shape=(32, 32,3))

def maclurin_exp(x, powers=2):
    out= 0
    for k in range(powers):
        out+= ((-1)**k) * (x ** (2*k)) / (math.factorial(2 * k))
    return res

x_input_new = Lambda(lambda x: maclurin_exp(x, max_pow))(x_input)

This attempt doesn't yield what the above mathematical formulation describes. I bet I missed something while doing the expansion. Can anyone point me on how to make this correct? Any better idea?
goal
I wanted to take pixel vector and make non-linearly distributed or expanded with taylor series expansion of certain non-linear function. Is there any possible way to do this? any thoughts? thanks

A: This is a really interesting question but I can't say that I'm clear on it as of yet. So, while I have some thoughts, I might be missing the thrust of what you're looking to do.
It seems like you want to develop your own activation function instead of using something RELU or softmax. Certainly no harm there. And you gave three candidates: e^x, log(x), and log(1+e^x).

Notice log(x) asymptotically approaches negative infinity x --> 0. So, log(x) is right out. If that was intended as a check on the answers you get or was something jotted down as you were falling asleep, no worries. But if it wasn't, you should spend some time and make sure you understand the underpinnings of what you doing because the consequences can be quite high.
You indicated you were looking for a canonical answer and you get a two for one here. You get both a canonical answer and highly performant code.
Considering you're not likely to able to write faster, more streamlined code than the folks of SciPy, Numpy, or Pandas. Or, PyPy. Or Cython for that matter. Their stuff is the standard. So don't try to compete against them by writing your own, less performant (and possibly bugged) version which you will then have to maintain as time passes. Instead, maximize your development and run times by using them.
Let's take a look at the implementation e^x in SciPy and give you some code to work with. I know you don't need a graph for what you're at this stage but they're pretty and can help you understand how they Taylor (or Maclaurin, aka Euler-Maclaurin) will work as the order of the approximation changes. It just so happens that SciPy has Taylor approximation built-in.
import scipy
import numpy as np
import matplotlib.pyplot as plt

from scipy.interpolate import approximate_taylor_polynomial

x = np.linspace(-10.0, 10.0, num=100)

plt.plot(x, np.exp(x), label="e^x", color = 'black')

for degree in np.arange(1, 4, step=1):

    e_to_the_x_taylor = approximate_taylor_polynomial(np.exp, 0, degree, 1, order=degree + 2)

    plt.plot(x, e_to_the_x_taylor(x), label=f"degree={degree}")

plt.legend(bbox_to_anchor=(1.05, 1), loc='upper left', borderaxespad=0.0, shadow=True)

plt.tight_layout()
plt.axis([-10, 10, -10, 10])
plt.show()

That produces this:

But let's say if you're good with 'the maths', so to speak, and are willing to go with something slightly slower if it's more 'mathy' as in it handles symbolic notation well. For that, let me suggest SymPy.
And with that in mind here is a bit of SymPy code with a graph because, well, it looks good AND because we need to go back and hit another point again.
from sympy import series, Symbol, log, E
from sympy.functions import exp
from sympy.plotting import plot
import matplotlib.pyplot as plt
%matplotlib inline

plt.rcParams['figure.figsize'] = 13,10
plt.rcParams['lines.linewidth'] = 2

x = Symbol('x')

def taylor(function, x0, n):
    """ Defines Taylor approximation of a given function
    function -- is our function which we want to approximate
    x0 -- point where to approximate
    n -- order of approximation
    """
    return function.series(x,x0,n).removeO()

# I get eyestain; feel free to get rid of this
plt.rcParams['figure.figsize'] = 10, 8
plt.rcParams['lines.linewidth'] = 1

c = log(1 + pow(E, x))

plt = plot(c, taylor(c,0,1), taylor(c,0,2), taylor(c,0,3), taylor(c,0,4), (x,-5,5),legend=True, show=False)

plt[0].line_color = 'black'
plt[1].line_color = 'red'
plt[2].line_color = 'orange'
plt[3].line_color = 'green'
plt[4].line_color = 'blue'
plt.title = 'Taylor Series Expansion for log(1 +e^x)'
plt.show()

I think either option will get you where you need go.
Ok, now for the other point. You clearly stated after a bit of revision that log(1 +e^x) was your first choice. But the others don't pass the sniff test. e^x vacillates wildly as the degree of the polynomial changes. Because of the opaqueness of algorithms and how few people can conceptually understand this stuff, Data Scientists can screw things up to a degree people can't even imagine. So make sure you're very solid on theory for this.
One last thing, consider looking at the CDF of the Erlang Distribution as an activation function (assuming I'm right and you're looking to roll your own activation function as an area of research). I don't think anyone has looked at that but it strikes as promising. I think you could break out each channel of the RGB as one of the two parameters, with the other being the physical coordinate.

A: You can use tf.tile and tf.math.pow to generate the elements of the series expansion. Then you can use tf.math.cumsum to compute the partial sums s_i. Eventually you can multiply with the weights w_i and compute the final sum.
Here is a code sample:
import math
import tensorflow as tf

x = tf.keras.Input(shape=(32, 32, 3))  # 3-channel RGB.

# The following is determined by your series expansion and its order.
# For example: log(1 + exp(x)) to 3rd order.
# https://www.wolframalpha.com/input/?i=taylor+series+log%281+%2B+e%5Ex%29
order = 3
alpha = tf.constant([1/2, 1/8, -1/192])  # Series coefficients.
power = tf.constant([1.0, 2.0, 4.0])
offset = math.log(2)

# These are the weights of the network; using a constant for simplicity here.
# The shape must coincide with the above order of series expansion.
w_i = tf.constant([1.0, 1.0, 1.0])

elements = offset + alpha * tf.math.pow(
    tf.tile(x[..., None], [1, 1, 1, 1, order]),
    power
)
s_i = tf.math.cumsum(elements, axis=-1)
y = tf.math.reduce_sum(w_i * s_i, axis=-1)


text:
Q: Chrome - when i open a link from outlook chrome opens 4 extra tabs when i open a link from outlook, chrome opens 4 extra tabs!
1 --extensions-on-chrome-urls/
2 --test-type/
3 --load-extension%3Dc/Program%20Files/Google/Chrome/Application/Extensions/chrome/app/37.1329.17.34
4 --load-component-extension%3Dc/Program%20Files/Google/Chrome/Application/Extensions/chrome/man
sorry cant post picture as i am new to this site.

A: I was having the same problem.  I was finally able to get rid of those extra tabs by:

*

*Go to Chrome Task Manager

*Find suspicious running extension (like TremendousSales)

*End that process

*Go to Chrome Extensions

*Find the Extension just killed

*Remove that extension

No more pesky tabs!


text:
Q: How to use string variable value in a command for a label named after that string? I'm making an iOS app in Swift. My goal is to write something like:
i = 2
txt1 = "team\(i)ScoreLabel"
txt1.text = "Something"

But obviously this doesn't work. How can I accomplish this?

A: I think the closest and simplest way is to give your UILabel a tag. Then in it's vc call
 ( self.view.viewWithTag(2) as! UILabel).text = "Something"


text:
Q: How to show an object value in for loop in java script I need to print all datas in an object in a for loop but I don't know how to access to their index.
For example I have an object like this (this is an example ,but the real one is very big)
a = { name : richard ,last_name : stallman };

I can do this :
cnosole.log(a.name);
cnosole.log(a.last_name);

But the object is too big.How can I do this?

A: Our you could do it like this:
a = { name : 'richard' ,last_name : 'stallman' };

for( key in a){
    console.log(a[key]);
}

A: You can convert an object to a string with JSON.stringify.
console.log(JSON.stringify(a));

should print something like:
{"name": "richard", "last_name": "stallman"}


text:
Q: Unable to get external maven dependencies for Junit and Selenium in IntelliJ I'm not sure if the issue of not being able to sync the dependencies is to do with proxy or firewall.
I have been trying to make it work but no joy.
Is there any solution for someone in my situation?
I have, reinstall, imported project, run maven clean and install in cmd but still no dependency has been imported.
Message displays 'Dependency "org.seleniumhq.selenium-java:2.53.0" not found'

A: I believe I found the answer. The issue is indeed proxy and by adding those lines in the settings.xml between  with your/company proxy details it should work.
<proxies>
<proxy>
    <id>myproxy</id>
    <active>true</active>
    <protocol>http</protocol>
    <host>xx.xx.x.xxx</host>
    <port>1234</port>
    <nonProxyHosts></nonProxyHosts>
</proxy>
</proxies>

In some instances you may need to add the username and password to make it work.
<username></username>
<password></password>


text:
Q: Strange Gridline Behavior Dashboard 1: https://bl.ocks.org/diggetybo/073f2f9b4b9a0c88211c9c643e47e9a9
Dashboard 2: https://bl.ocks.org/diggetybo/c16c1168705ea18b7d8711c15e90f8ec
I would love if someone could explain why the gridlines in the second link on the bottom right-hand graph are of a higher tick interval (or whatever you want to call it) than the ones in the first link. The d3 template is one I made a few weeks ago and it's just something I'm copying and pasting to use with different data sets. However, despite hours of double checking everything, I'm still not sure why it's doing that.
The only thing that's different is the data, but they are of very similar types of data, the domains should be similar. For example, the bottom right hand graph is all positive number for both dashboards. Maybe it's being parsed differently for some strange reason?
Let me know how you did it, whether you brute forced the styling of the gridlines, or if you found the trigger of the problem. That is to say, why it chose to add so many more gridlines on that graph but none of the others.
Thank you

A: To regulate the number of ticks use ticks(4)
read here this will generate 4 ticks in x axis.
var xGridlineNodes = svg.append('g')
        .attr('transform', 'translate(' + margins.left + ',' + (totalHeight - margins.bottom + axisPadding) + ')')
        .call(xGridlinesAxis.tickSize(-graphHeight - axisPadding, 0, 0).tickFormat("").ticks(4));

The reason why there are more ticks in dashboard2 than in dashboard1 is because of the different data sets (there is no css tricks in that). May be some expert can throw some light on why more ticks.
Here is a working plunk in which i have regulated the number of ticks
If you know what the tick values will be then use tickValues read here


text:
Q: Perl SV value from pointer without copy How I could create SV value from null terminated string without copy? Like newSVpv(const char*, STRLEN) but without copy and with moving ownership to Perl (so Perl must release that string memory). I need this to avoid huge memory allocation and copy.
I found following example:
SV *r = sv_newmortal();
SvPOK_on(r);
sv_usepvn_mg(r, string, strlen(string) + 1);

But I don't have deep knowledge of XS internals and have some doubts.

A: If you want Perl to manage the memory block, it needs to know how to reallocate it and deallocate it. The only memory it knows how to reallocate and deallocate is memory allocated using its allocator, Newx. (Otherwise, it would have to associate a reallocator and deallocator with each memory block.)
If you can't allocate the memory block using Newx, then your best option might be to create a read-only SV with SvLEN set to zero. That tells Perl that it doesn't own the memory. That SV could be blessed into a class that has a destructor that will deallocate the memory using the appropriate deallocator.
If you can allocate the memory block using Newx, then you can use the following:
SV* newSVpvn_steal_flags(pTHX_ const char* ptr, STRLEN len, const U32 flags) {
#define newSVpvn_steal_flags(a,b,c) newSVpvn_steal_flags(aTHX_ a,b,c)
    SV* sv;

    assert(!(flags & ~(SVf_UTF8|SVs_TEMP|SV_HAS_TRAILING_NUL)));

    sv = newSV(0);
    sv_usepvn_flags(sv, ptr, len, flags & SV_HAS_TRAILING_NUL);
    if ((flags & SVf_UTF8) && SvOK(sv)) {
        SvUTF8_on(sv);
    }

    SvTAINT(sv);

    if (flags & SVs_TEMP) {
        sv_2mortal(sv);
    }

    return sv;
}

Note: ptr should point to memory that was allocated by Newx, and it must point to the start of the block returned by Newx.
Note: Accepts flags SVf_UTF8 (to specify that ptr is the UTF-8 encoding of the string to be seen in Perl), SVs_TEMP (to have sv_2mortal called on the SV) and SV_HAS_TRAILING_NUL (see below).
Note: Some code expects the string buffer of scalars to have a trailing NUL (even though the length of the buffer is known and even though the buffer can contain NULs). If the memory block you allocated has a trailing NUL beyond the end of the data (e.g. a C-style NUL-terminated string), then pass the SV_HAS_TRAILING_NUL flag. If not, the function will attempt to extend the buffer and add a NUL.


text:
Q: error vendor\laravel\framework\src\Illuminate\Container\Container.php:833 in laravel please help me, I'm learning and using Laravel 8.x . I don't know what is my error in this case.
...
vendor\laravel\framework\src\Illuminate\Container\Container.php:833

...
this is my controller
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class AdminController extends Controller
{
    public function index(){
        echo'admin';
    }
}

and this is my web.php
<?php

use Illuminate\Support\Facades\Route;

Route::get('/admin','AdminController@index');

A: Since Laravel 8 default namespace App\Http\Controllers is not registered by default in RouteServiceProvider
So you need to use FQCN for the controller in the routes file other wise you will get the container binding resolution exception as you are getting
<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\AdminController;

Route::get('/admin', [AdminController::class, 'index']);

A: This happens from Laravel 8, since the App\Http\Controllers namespace isn't registered by default. You can register it in the corresponding service provider:
# app/Providers/RouteserviceProvider.php

// Uncomment this line
protected $namespace ='App\\Http\\Controllers';


text:
Q: how to check stdin in C# while doing something I have a program like this:
Class a
{
    main()
    {
        while(abc)
        {
            f(a);
            g(b);
        }
    }
}

but I need to check stdin for some important command. The programm should work will I receive a command from stdin. and after the command I should decide to continue execution or doing something else.
What should I do?

A: Execute f and g in different threads with some sort of variable accessed by both to propagate the state change.
Class Program
{
  public static void Main()
  {
    ThreadPool.QueueUserWorkItem(() => f(a));
    ThreadPool.QueueUserWorkItem(() => g(b));

    while(true)
    {
      if(Console.Readline() == "something")
        //do something
    }
  }

  private static void f (param)
  {
    while(abc)
      //do work
  }
}

A: This will work if your commands are single characters.
Class a
{
    main()
    {
        bool done = false;
        Console.CancelKeyPress += (s, e) => { done = true; e.Cancel = true; };
        while(!done)
        {
            f(a);
            g(b);
            if (Console.KeyAvailable)
            {
                switch(Console.ReadKey().KeyChar)
                {
                    case 'i':
                    case 'I':
                        DoSomethingImportant();
                        break;
                    case 'E':
                    case 'e':
                        done = true;
                        break;
                }
            }
        }
    }
}

If the commands are longer than a single character, then you could store the keys in a buffer and look for completed commands at each keystroke.
There are other, more complicated, solutions involving threading, but if you don't need to go that direction, then you shouldn't.
(I added the CTRL-C handling in the above code, so it will exit cleanly if the user tries to stop the program. That part is optional.)

A: From what I understand, you would need another Thread started before the while loop, which can take commands from the stdin.


text:
Q: How to solve $y = \ln\frac{1+x}{1-x}$? Can the following equation be solved for x?
$$
y=  \ln\frac{1+x}{1-x}
$$
*This is not actually homework - it comes from part of the rate law for a particular chemical reaction I am studying - but like a homework question, I'd be happy with pointers / strategies for the solution. I ought to be able to do this on my own, but today I'm making no progress!

A: $$e^y=\frac{1+x}{1-x}$$
$$e^y-1=(e^y+1)x$$
$$x=\frac{e^{y}-1}{e^{y}+1}$$

A: There is the "special" function
$$\tanh^{-1} x = \frac 1 2 \log \frac{1+x}{1-x}$$
which is the inverse of
$$\tanh x = \frac{e^{x}-e^{-x}}{e^x+e^{-x}}$$
So what you want is
$$2\tanh^{-1} x =y$$
or
$$x=\tanh \frac{y}{2}$$

A: Just consider the inverse function of $\frac{1+x}{1-x}$ that is $\frac{x-1}{x+1}$. After taking exponential of both sides, place each of the sides in the inverse function and get the final result.
$$ \frac{e^y - 1}{e^y+1} = x $$
The proof is complete.

A: Taking the exponential, we have
$$\begin{align*}
y &= \ln\left(\frac{1+x}{1-x}\right)\\
e^y &= \frac{1+x}{1-x}\\
e^y(1-x) &= 1+x\\
e^y -1 &= x + e^yx\\
e^y - 1 &= x(1+e^y)\\
\frac{e^y - 1}{e^y+1} &= x.
\end{align*}$$


text:
Q: using windbg to on multiple .net framework versions I am responsible for debuggin minidumps from Windows Error Reporting on a .Net based shrink-wrapped desktop application installed on almost half a million PC's world wide, all running different OS versions and different patched versions of the .Net framework. To do this requires the matching version of the following 3 files
sos.dll
Mscorwks.dll
Mscordacwks.dll

I have had moderate success in the past downloading .msu files and extracting these files from them, but I am sure there must be an easier way.
My question is, is there a single repository where I can download the correct versions of these files so that I can debug the minidumps?

A: You need many more files that just those three to reliably debug / reproduce / analyze issues from the field. Basically, you need all of them (Windows, CLR, and (managed) .NET framework).
I'm not aware of any repository for just some files. You'd have to install the respective versions.
While you can install multiple versions of .NET CLR (1.1, 2.0, 4.0) on same box, and load the correct SOS.dll into WinDBG via the .loadby command, you would probably have to have multiple Windows installations for those Versions you support.
In addition, you also need the (public) symbols for those components, including the (private) symbols for your own application, to do any meaningful debugging.
Considering you have 3 versions of your application shipped and still supported, running on 4 operating system versions still supported by you (say Windows Vista SP1, Windows 7, Windows 7 SP1 and Windows 8), that gives you 12 combinations to have symbols for.
That is what symbol servers are for. You could use the public microsoft symbol server, but that (of course) doesn't contain symbols for your very own application.
Given the scope/size of the application you describe, I'd say it would be well in order to set up an in-house symbol server. That can keep all the symbols of the different versions of your app that are still in use by customers (a task not to take lightly).
Suggested reading:

*

*Setting up a symbol server

*What does setting up a symbol server give me (SO)

*Symbol servers and symbol stores (MSDN)

*Use the Microsoft Symbol Server to obtain debug symbol files
You could also consider setting up a source server to allow you fetching the correct version of your sources, inside a debugging session, from source control.

A: As no one has been able to give me a real answer to this question, I will offer my "work-around". What I have been doing to date is to search the Microsoft support site to find the ms update package for the version of the framework, download it, and extract it using expand.exe. It is then possible to connect WinDbg to this version instead of the one that is running the machine you are debugging on. Here is a blogpost that explains the process in full detail http://sjbdeveloper.blogspot.com.au/2012/10/getting-correct-versions-of-net.html