text:
Q: How to automatically generate data summary at the beginning of the document? Within my report I want do define several structural damages and I want to automatically generate a summary table at the beginning of the document.
Here is an example of how far I have come so far and what I want to achieve.
\documentclass{article}

\usepackage{etoolbox}
\usepackage{pgffor}

\parindent=0pt

\newcounter{cntClassA}\newcounter{cntClassB}\newcounter{cntClassC}\newcounter{cntAddTmp}

\makeatletter

\newcommand\defineDamageKey[4] { \expandafter\edef\csname damage.#1.#2.#3\endcsname{#4} }

\newcommand{\addDamage}[3]{%
%
    \ifstrequal{#1}{A}{\stepcounter{cntClassA} \setcounter{cntAddTmp}{\thecntClassA} }{}%
    \ifstrequal{#1}{B}{\stepcounter{cntClassB} \setcounter{cntAddTmp}{\thecntClassB} }{}%
    \ifstrequal{#1}{C}{\stepcounter{cntClassC} \setcounter{cntAddTmp}{\thecntClassC} }{}%
%
    \defineDamageKey{#1}{\thecntAddTmp}{description}{#2}%
    \defineDamageKey{#1}{\thecntAddTmp}{solution}{#3}%
    \defineDamageKey{#1}{\thecntAddTmp}{ID}{#1-\thecntAddTmp}%
%
    \printDamage{#1}{\thecntAddTmp}%
}

\newcommand{\printDamage}[2]{%
    \textbf{ID:} \@nameuse{damage.#1.#2.ID}\\%
    \textbf{Damage class:} #1\\%
    \textbf{Description:} \@nameuse{damage.#1.#2.description}\\%
    \textbf{Solution:} \@nameuse{damage.#1.#2.solution}\\%
}

\newcommand{\damageSummary}[1]{%
    \newcount\damageCountForClass
%
    \ifstrequal{#1}{A}{ \damageCountForClass=\thecntClassA }{}%
    \ifstrequal{#1}{B}{ \damageCountForClass=\thecntClassB }{}%
    \ifstrequal{#1}{C}{ \damageCountForClass=\thecntClassC }{}%
%
    \foreach \n in {1,...,\damageCountForClass}%
    {%
        \textbf{\@nameuse{damage.#1.\n.ID}:} \@nameuse{damage.#1.\n.description}\\
    }%
}

\makeatother

\begin{document}

\section{Building 1}

\addDamage{A}{Broken window}{Fix window}

\addDamage{B}{Wrong wall paint}{Repaint}

\section{Building 2}

\addDamage{C}{Leaky windows}{Seal windows}

\addDamage{A}{Defective electrics}{Fix electrics}

\section{Summary}

\damageSummary{A}
\damageSummary{B}
\damageSummary{C}

\end{document}

My basic idea was to define my data as key/value pairs with structured named macros:
\@namedef{damage.A.1.description}{description damage A-1}
\@namedef{damage.A.1.solution}{solution damage A-1}
\@namedef{damage.A.2.description}{description damage A-2}

But now I want to have the summary table at the beginning of the document! Am I right that this only works with AUX files?
I've just started with low level TeX / macro writing and tried to figure out how to do this by examining the todonotes package (as the \todo and \listoftodos would possible a similar mechanism). But I dont get it.
So is my current solution actual a good starting point or do I need a different approach? Could anyone give me a hint how to achieve this?

A: Edit: hyperref-support is added in case you wish hyperlinks from the summary to the place of the document where the damage is described.
If you don't mind having an auxiliary-file whose name is of pattern ⟨expansion of jobname⟩.Damageclass⟨name of damage-class⟩ for each damage-class, then you can probably do with LaTeX 2ε's \addtocontents-\@starttoc-meachanism. I used description-environments for listing the items. How to tweak the description-environment depends on the documentclass in use and may turn out tricky.
The example needs to be compiled three times without having auxiliary-files deleted between runs until everything matches out correctly. (First run creates auxiliary files. Second run creates description-item-labes of summaries and stores measurements in the aux-file. Third run uses measurements from aux-file.)
\documentclass{article}
\usepackage{hyperref}

\makeatletter
\newcommand\maxIDwidth{0pt}%
\AtBeginDocument{\providecommand\r@maxIDwidthpreviousrun{0pt}}%
\AtEndDocument{%
  \protected@write\@auxout{}{\string\newlabel{maxIDwidthpreviousrun}{\maxIDwidth}}%
}%
\DeclareRobustCommand\damageSummaryItem[3]{%
  \item[%
    \setbox\scratchbox\hbox{#1}%
    \ifdim\maxIDwidth<\wd\scratchbox\xdef\maxIDwidth{\the\wd\scratchbox}\fi
    \rlap{\hbox{\@ifundefined{hyperlink}{\@secondoftwo}{\hyperlink}{#3}{#1}}}%
    \hbox to\r@maxIDwidthpreviousrun{\hfill}%
  ]%
  #2%
}%
\newbox\scratchbox
\newcommand\addDamage[3]{%
   %#1 - Damage class
   %#2 - Damage description
   %#3 - Fix/Solution description
   \@ifundefined{c@Damageclass@#1}{%
     \newcounter{Damageclass@#1}%
     \expandafter\gdef\csname theDamageclass@#1\endcsname{#1\mbox{-}\arabic{Damageclass@#1}}%
   }{}%
   \begingroup
   \begin{description}%
   \itemsep=0pt
   \parskip=0pt
   \item[{\refstepcounter{Damageclass@#1}ID:%
     \addtocontents{Damageclass#1}{%
       \damageSummaryItem{\csname theDamageclass@#1\endcsname:}{#2}{\@ifundefined{@currentHref}{}{\@currentHref}}\protected@file@percent
     }%
   }]\csname theDamageclass@#1\endcsname
   \item[{Damage class:}]#1%
   \item[{Description:}]#2%
   \item[{Solution:}]#3%
   \end{description}%
   \endgroup
}%
\newcommand\damageSummary[1]{%
  \begingroup
  \IfFileExists{\jobname.Damageclass#1}{%
    \@ifundefined{hyperlink}{\@firstoftwo}{%
      {\expandafter}\expandafter\ifx\csname hyper@last\endcsname\relax
      \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
    }%
  }{\@secondoftwo}%
  {%
    \begin{description}%
    \itemsep=0pt
    \parskip=0pt
    \@starttoc{Damageclass#1}%
    \par\vskip-\@topsepadd\vskip-\parskip
    \end{description}%
  }{\@starttoc{Damageclass#1}}%
  \endgroup
}%
\makeatother

\begin{document}

\section{Summary}
\damageSummary{A}
\damageSummary{B}
\damageSummary{C}

\section{Building 1}

\addDamage{A}{Broken window}{Fix window}

\addDamage{B}{Wrong wall paint}{Repaint}

\section{Building 2}

\addDamage{C}{Leaky windows}{Seal windows}

\addDamage{A}{Defective electrics}{Fix electrics}

\end{document}

The question "Use LaTeX to produce parts lists?" and the answers to it might be of interest to you— a similar problem is addressed there. In the answers you find a different approach which is based on the package datatool and a .csv-file.

A: You're right: you need an auxiliary file.
The following code will warn if the .dam file differs from the preceding run and tell you to rerun LaTeX.
\documentclass{article}

\ExplSyntaxOn

% the user interface
\NewDocumentCommand{\addDamage}{mmm}
 {% #1 = class, #2 = type, #3 = action
  \cryptkeeper_damage_add:nnn { #1 } { #2 } { #3 }
 }
\NewDocumentCommand{\printDamageSummary}{}
 {
  \section*{Summary}
  \cryptkeeper_damage_print:
 }
% the auxiliary command
\NewDocumentCommand{\damageSummary}{mmm}
 {
  \cryptkeeper_damage_add_summary:nnn { #1 } { #2 } { #3 }
 }

% the lower level code

% variables
\iow_new:N \g_cryptkeeper_damage_iow
\prop_new:N \g_cryptkeeper_damage_prop
\str_new:N \g_cryptkeeper_damage_hash_str
\int_new:N \g_cryptkeeper_damage_class_A_int
\int_new:N \g_cryptkeeper_damage_class_B_int
\int_new:N \g_cryptkeeper_damage_class_C_int
\seq_new:N \g_cryptkeeper_damage_id_seq

% actions for setup
\AtBeginDocument
 {
  \file_if_exist:nT { \c_sys_jobname_str.dam }
   {% the file exists, save its hash and input it
    \str_gset:Nx \g_cryptkeeper_damage_hash_str
     {
      \file_mdfive_hash:n { \c_sys_jobname_str.dam }
     }
    \file_input:n { \c_sys_jobname_str.dam }
   }
  \iow_open:Nn \g_cryptkeeper_damage_iow { \c_sys_jobname_str.dam }
 }
\AtEndDocument
 {
  \iow_close:N \g_cryptkeeper_damage_iow
  \str_if_eq:eeF
   { \g_cryptkeeper_damage_hash_str } % saved hash
   { \file_mdfive_hash:n { \c_sys_jobname_str.dam } } % new hash
   {% if differ, issue a message
    \msg_warning:nn { cryptkeeper/damage } { file differ }
   }
 }

% messages
\msg_new:nnn { cryptkeeper/damage } { file differ }
 {
  .dam~file~modified.~Rerun~LaTeX.
 }

\cs_new_protected:Nn \cryptkeeper_damage_add:nnn
 {
  % increment the counter
  \int_gincr:c { g_cryptkeeper_damage_class_#1_int }
  % write a the .dam file
  \iow_now:Nx \g_cryptkeeper_damage_iow
   {
    \exp_not:N \damageSummary % the command
    {#1} % the class
    { \int_use:c { g_cryptkeeper_damage_class_#1_int } } % the number
    { \exp_not:n { #2 } } % the damage
   }
  % print the data
  \par\addvspace{\topsep}
  \noindent
  \textbf{ID:}~#1-\int_use:c { g_cryptkeeper_damage_class_#1_int } \\*
  \textbf{Damage~class:}~#1 \\*
  \textbf{Description:}~#2 \\*
  \textbf{Solution:}~#3
  \par\addvspace{\topsep}
 }

\cs_new_protected:Nn \cryptkeeper_damage_add_summary:nnn
 {
  % save the ID in the form {1|2|3}000+damage number
  % class A is 1, and so on
  % the sequence will be sorted by \printSummary
  \seq_gput_right:Nx \g_cryptkeeper_damage_id_seq
   { \int_eval:n { \int_from_alph:n { #1 } * 1000 + #2 } }
  % save the data in a property list
  \prop_gput:Nen \g_cryptkeeper_damage_prop
   { \int_eval:n { \int_from_alph:n { #1 } * 1000 + #2 } }
   {
    \noindent\textbf{#1-#2:}~#3\par
   }
 }
\cs_generate_variant:Nn \prop_gput:Nnn { Ne }

\cs_new_protected:Nn \cryptkeeper_damage_print:
 {
  % sort the sequence
  \seq_sort:Nn \g_cryptkeeper_damage_id_seq
   {
    \int_compare:nTF { ##1 > ##2 } { \sort_return_swapped: } { \sort_return_same: }
   }
  % map the sequence and print the data stored in the property list
  \seq_map_inline:Nn \g_cryptkeeper_damage_id_seq
   {
    \prop_item:Nn \g_cryptkeeper_damage_prop { ##1 }
   }
 }

\ExplSyntaxOff

\begin{document}

\printDamageSummary

\section{Building 1}

\addDamage{A}{Broken window}{Fix window}

\addDamage{B}{Wrong wall paint}{Repaint}

\section{Building 2}

\addDamage{C}{Leaky windows}{Seal windows}

\addDamage{A}{Defective electrics}{Fix electrics}

\end{document}

Note that \printSummary can go anywhere.

A: Using memory package to store arbitrary free-form n-dimensional data, using tocloft package to collect the summary info on disk via \addtocontents command (although \addcontentsline also works and gives TOC page numbers), and creating the summary by using really simplistic expl3 syntax to do nested loops through the classes, class counters and todos (for the sorting):

Currently hard-coded in places, but can be made dynamically extendable (e.g. creating fresh class counters, or calculating loop end-points).
And with memory package, adding extra dimensions, like a building field, becomes trivial.
MWE
\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{tocloft}
\newlistof{todos}{ltd}{Summary}
\usepackage{memory}
\usepackage{etoolbox}
\usepackage{xparse}

\newcounter{todoitem}
\newcounter{classcounterA}
\newcounter{classcounterB}
\newcounter{classcounterC}
\newcounter{classcounterZ}
\newcounter{classcountertemp}

\ExplSyntaxOn

\int_new:N \l_myclassfirst_int
\int_new:N \l_myclasslast_int
\int_new:N \l_myclasscountmax_int
\int_new:N \l_mytempc_int
\int_new:N \l_mytempd_int

\int_new:N \l_myloopcount_int
\int_new:N \l_myloopcountcc_int
\int_new:N \l_mytodoloopcount_int
\int_new:N \l_mytodocountmax_int

\str_new:N \l_mytemp_str
\str_new:N \l_mytempb_str
\str_new:N \l_mytempc_str
\str_new:N \l_mytempd_str
\str_new:N \l_mytodototal_str

\NewDocumentCommand { \summarytodos } { } {

  %
    \int_set:Nn \l_myclassfirst_int {
                                                                \int_from_alph:n { A }
                                                                                }

    \int_set:Nn \l_myclasslast_int {
                                                                \int_from_alph:n { Z }
                                                                                }

   %
   \int_set:Nn \l_myloopcount_int { \c_zero_int }

   % loop through the classes (A-Z)
   \int_do_while:nNnn
                    { \l_myloopcount_int } <  { \l_myclasslast_int }
                    {
                        \int_set:Nn
                                    \l_myloopcount_int
                                    { \l_myloopcount_int + 1 }

                 {
                   % loop through the class counters
                   \int_set:Nn \l_myloopcountcc_int { \c_one_int }
                   \int_set:Nn \l_myclasscountmax_int { 15 } %
                   \int_do_while:nNnn
                                    { \l_myloopcountcc_int } <  { \l_myclasscountmax_int }
                                    {
                                     {

%--------------- loop through all the todo items
%--------------- if there is a match on class + classcounter
%---------------    then print
%                   \alltodos[total]
                    \str_set:Nx \l_mytofototal_str {
                                        \cs:w @alltodos@total@memory\cs_end:
                                                            }

                    \int_set:Nn \l_mytodoloopcount_int { \c_one_int }
                    \int_set:Nn \l_mytodocountmax_int { \l_mytofototal_str + 1}
                   \int_do_while:nNnn
                                    { \l_mytodoloopcount_int }
                                    <
                                    { \l_mytodocountmax_int }
                                    { %true

                                    %match on class:
\str_set:Nx \l_mytemp_str {
                    \cs:w @blist@\int_use:N\l_mytodoloopcount_int,\lbdimb @memory\cs_end:
                                        }

\str_set:Nx \l_mytempb_str {
                                                    \int_to_Alph:n { \l_myloopcount_int }
                                                }

  %
\str_if_eq:NNTF
                                     \l_mytempb_str
                                     \l_mytemp_str
                {
                                    %match on class counter:
                    \str_set:Nx \l_mytempc_str {
                                        {\cs:w @blist@\int_use:N\l_mytodoloopcount_int,\lbdimc @memory\cs_end:}
                                                            }

                    \str_set:Nx \l_mytempd_str {
                                                                        { \int_eval:n { \l_myloopcountcc_int } }
                                                                    }

                      %
                    \str_if_eq:NNTF
                                                         \l_mytempc_str
                                                         \l_mytempd_str
        {

                        % add to summary
            \addtocontents{ltd}{%
%                           List:
                    {\bfseries
%%              :\cs:w
%%                      @blist@\int_use:N\l_mytodoloopcount_int,\lbdima @memory
%%                      \cs_end:
                \cs:w
                        @blist@\int_use:N\l_mytodoloopcount_int,\lbdimb @memory
                        \cs_end:
                        -
                \cs:w
                        @blist@\int_use:N\l_mytodoloopcount_int,\lbdimc @memory
                        \cs_end:
                        }%end bfseries
                        :~~ % space
                \cs:w
                        @blist@\int_use:N\l_mytodoloopcount_int,\lbdimd @memory
                        \cs_end:
%%%%                :\cs:w
%%%                     @blist@\int_use:N\l_mytodoloopcount_int,\lbdime @memory
%%%                     \cs_end:
%%%             :\cs:w
%%%                     @blist@\int_use:N\l_mytodoloopcount_int,\lbdimf @memory
%%%                     \cs_end:
                    \par
                    }% end addtocontens
                        }{}% end match on class counter
                        }{}% end match on class
                        \int_set:Nn
                                    \l_mytodoloopcount_int
                                    { \l_mytodoloopcount_int + \c_one_int }

                                            }{}% todo loop

                                                }{}% class counter loop

                        \int_set:Nn
                                    \l_myloopcountcc_int
                                    { \l_myloopcountcc_int + \c_one_int }

                                }% class counter loop
                 }
                 {  }

                    } % end class loop

                        \addtocontents{ltd}{\protect\mbox{}\protect\hrulefill\par}

}

\ExplSyntaxOff

\newcommand\lbdimbuilding{building}
\newcommand\lbdimdclass{dclass}
\newcommand\lbdimdclasscounter{dclasscounter}
\newcommand\lbdimdescription{description}
\newcommand\lbdimsolution{solution}
\newcommand\lbdimstatus{status}

\newdata*{blist}
\newdata{alltodos}
\newdata{tempblist}

%-------------------------------
\newcommand\lbdima{\lbdimbuilding}
\newcommand\lbdimb{\lbdimdclass}
\newcommand\lbdimc{\lbdimdclasscounter}
\newcommand\lbdimd{\lbdimdescription}
\newcommand\lbdime{\lbdimsolution}
\newcommand\lbdimf{\lbdimstatus}

\newcommand\lbclasscountername{}

%-------------------------------
\newcommand\addtodo[4]{%
    \stepcounter{todoitem}
\blist[\thetodoitem,\lbdima]={#1}
\blist[\thetodoitem,\lbdimb]={#2}
\expandafter\renewcommand\expandafter\lbclasscountername{classcounter#2}
%\lbclasscountername
\stepcounter{\lbclasscountername}
\setcounter{classcountertemp}{\value{\lbclasscountername}}
\blist[\thetodoitem,\lbdimc] := {\theclasscountertemp}%{\lbclasscountername}
\blist[\thetodoitem,\lbdimd]={#3}
\blist[\thetodoitem,\lbdime]={#4}
\blist[\thetodoitem,\lbdimf]={To do}
\alltodos[total]=\thetodoitem
\printtodoitem{\thetodoitem}
}

%-------------------------------
\newcommand\printtodoitem[1]{%
\begin{tabular}{ll}
\rowcolor{blue!20}
{\Large {\phantom{L}}} Item & \\
\hline
%\blist[\thetodoitem,\lbdima]
\bfseries ID & \blist[\thetodoitem,\lbdimb]-\blist[\thetodoitem,\lbdimc] \\
\bfseries Class & \blist[\thetodoitem,\lbdimb]\\
\bfseries Description & \blist[\thetodoitem,\lbdimd]\\
\bfseries Solution & \blist[\thetodoitem,\lbdime]
%\blist[\thetodoitem,\lbdimf]
\end{tabular}
\hspace{1in}
%\par
%\bigskip
}

%-------------------------------
\newcommand\showalltodostotal{\alltodos[total]\ items in total.}

\begin{document}
\listoftodos

\section{b1}

\addtodo{(b1)}{A}{Broken window}{Fix window}
\addtodo{(b1)}{B}{Wrong wall paint}{Repaint}

\section{b2}

\addtodo{(b2)}{C}{Leaky windows}{Seal windows}
\addtodo{(b2)}{A}{Defective electrics}{Fix electrics}

\section{b3}

\addtodo{(b3)}{Z}{Too sunny}{Put sunshade up}
\addtodo{(b3)}{Z}{No solar panels}{Install solar panels}

\section{b4}

\showalltodostotal
\summarytodos

\end{document}

redpajama_set_name: RedPajamaStackExchange


This is Buddy of Mine, happy and healthy and oh so clever, today at 6 1/2 years of age. He was born on December 19, 2005. His mother is named Sophie and his father is named Buca. He became ill during April 2007. He was listless, vomiting and had diarrhea. He couldn't jump off beds and chairs. We went to the vet. The vet could feel a mass in his abdomen. He felt the intestines were infected. He was put on antibiotics. By May 3, 2007, the antibiotics were finished and his stools were normal but he still wouldn't jump on and off furniture. On May 6 diarrhea started again. We gave him a special diet of rice in chicken broth and chopped chicken to entice him but he had no appetite. We went back to the vet where x-rays and blood tests were done.
He was already scheduled for a barium x-ray, ultrasound and then surgery on May 17. On May 16 the blood test showed Cryptococcus. It was immeasurable because it was so high; it was off the chart. He had the surgery which showed inoperable growths all around his intestines. That was the mass the vet could feel. He started medication on May 20 called itraconazole. He continued to vomit and have diarrhea. The vet reported his bowel was empty. We began to force-feed him Hills Prescription. By the 25th we discovered the turkey baster works as a force feeder for 30 g of Hill's and 10 g of warm water. That was done 3 times a day. We also offered him cooked rice, about an ice cube size, with chopped chicken. He started to eat a little. Two days later we increased the force feeding to 50 g of Hill's and 20 g of warm water plus anything he'd eat on his own. His vomit lessened but his diarrhea was severe. We gave his medication by syringe down his throat. On May 31 we took a stool sample to the vet because there were medication particles in it. The vet agreed that the medication was not being absorbed and the pharmacy tried a different preparation of the medication.
He was having his medication about 7:00 a.m., 3mL by syringe. He was force-fed slurry of Hills Prescription with a turkey baster, warm water and bran (for diarrhea). He was given it again at noon and at 5:00 p.m. He also was offered rice and chicken broth and tiny shreds of chicken or pork.
June 4 was the first GOOD day. His eyes were sparkly again and he jumped off the bed. He ate a rice/chicken cube on his own. He was given a teaspoon of butter once a day as his medication required fat. He loved that.
We continued to force-feed him with the turkey baster three times a day. By the 6th of June he had his first somewhat-formed stool. We added a small amount of kibble called "Go" to his rice dish. As his appetite increased over June and July we decreased the forced feed. July we force-fed him once in morning and for dinner we gave him two rice cubes, 2/3 cup of Go and chicken chopped fine, about a tablespoon to get his interest. The bran was increased and decreased by the formation of the stool. We had lots of substitutions going on to get his appetite going, e.g. beef broth instead of chicken broth, "Go" as treats instead of with meals.
In mid-August 2007 we had a blood test done, the titer count was still off the chart so there was no way of comparing the improvement. But we know he is now bright and jumping on and off things and swimming and is having solid stools. The vet says by feel he knows the size of the growth has decreased. Buddy has gone through a lot. The vet's advice is to try to keep his stress to the minimum which is not always easy. Buddy continues to have occasional diarrhea and the vet suggested a diet change.
He is currently fed 1/4 cup of Go kibble, 1/4 cup slurried sweet potato (the consistency of mashed potatoes) and a tablespoon of chopped chicken twice a day. He loves it; his stools are perfect and nearly the same time every day.
On September 5, 2008 a blood test showed the Cryptococcus was now on the chart so the titer count had come way down. The vet can't find the growth by touch. We have had a blood test done yearly and it has continued to come down. It was what they called "a weak one of 100" the last time. The lab in Vancouver says their advice is to continue medication for his lifetime as the testing may not be accurate enough to know when it has completely left his system. They have no previous experience to go by.
My advice would be, if your dog is ill and they do blood tests, ask them to include the testing for crypto. If we had missed it, the medicine wouldn't have been prescribed in time to save him. We are so grateful! Buddy is our miracle dog!


Check out my narrative & comedy reels here!
I was honored in November in Hollywood as an "Exceptional Woman in Production" by Studiodaily for my directing. Other honorees include Producers, Editors and DPs from Marvel, Universal and Netflix, among others. Women rock!
Copyright © 2019 Victoria Larimore - All Rights Reserved.


text:
Launch of The Crossing - A Unique Five Day Flotilla Event
British Waterways Scotland announced the full details of 'The Crossing' on Wednesday, 6 May. This unique five day flotilla event, celebrating the Caledonian Canal, runs from 16 – 20 June and is part of Homecoming Scotland 2009.
Following a Flotilla of boats making their journey from Neptune's Staircase at Banavie (West) to Muirtown Basin in Inverness (East), the event will host a cultural feast of music, dance, story-telling and much more along the way.
Celebrating the vibrant and colourful 200 year history of the Caledonian Canal, The Crossing pays homage to the world famous culture of the local Highland communities which stretch along the 60 miles of canal.
Paul Bush OBE, chief operating officer, EventScotland, said: "Events like The Crossing showcase Scotland's unique and vibrant heritage and the nation's spectacular scenic landscape while also driving domestic and international tourism. The event also fits perfectly with the Homecoming Scotland 2009 programme which aims to welcome back many of the millions of people around the world who have a Scottish ancestry or a love for our country.
"We are delighted to be supporting British Waterways Scotland both through EventScotland's Regional Events Programme and through Homecoming Scotland's national programme of celebratory events and look forward to one of the highlights of the year."

redpajama_set_name: RedPajamaCommonCrawl


This gastronomic designer den serves international fare in plush surrounds. The opulent décor, marble pillars and chandeliers are reminiscent of Hotel Costes in Paris. The French influence is obvious and the fusion of modern cuisine is outstanding.


(VOVworld) – Brazilian police launched a new round of arrests Monday as part of a corruption investigation into the state-run oil firm Petrobras, a day after massive nationwide demonstrations protesting Brazil's economic decline.
Federal police said they had warrants for the arrest of 18 people in connection with a 10-year scheme of kickbacks and political payoffs that allegedly siphoned off 3.8 billion USD from Petrobras. The warrants are being carried out in São Paulo and Rio de Janeiro.
Among those targeted for arrest was Petrobras's former director of services, Renato Duque, allegedly a key figure in the scheme. None of those arrested Monday is a public servant.
The list of 49 politicians under investigation is headed by Senate president Renan Calheiros and Speaker of the Chamber of Deputies Eduardo Cunha. 13 senators, 22 deputies, and two governors have been placed under investigation.


Composed and Conducted By John Gruntfest. Live at the Fourth Annual Free Music Festival, Metropolitan Art Center, San Francisco, March 24. 1979.
Musicians (A Partially Reconstructed Listing): Saxophones / John Gruntfest, Larry Ochs, Bruce Ackley, Andrew Voigt, Robert Bluewater Haven, Kersti Arbams, Genevieve Boulet de Monrel, Harvey Varga, Steve Deutdch, Jim Warshour, Hal Richards, Alfonso Texidor, Jim Schwartz, Henry Kuntz, Asil Lasi, Phillip Friend, Niel Barkley, Ben Bossi, Henry Peters, Kirk Allen, Weldon McCarty, Dennis Saputelli; Flutes/Clarinets / Albert Kovitz, Patrick Wallace, Edward Ache, Richard Dworkin, Gail Edwards, Tim Lambert, Eugene Cash, Marcia Smith, France Fortier; Brass / Bobby Bueghler, Ron Heglin, Hal Hughes, Lea Merrick, Loren Means. And many others for now and forever Mystery Guests.
Cover: Dori Seda's playful drawing, elephants roaring and raging above the orchestra, was made immediately following the performance. An artist of many talents, Dori left this planet some years ago at age 38. The whereabouts of her various paintings are unknown.
In a time before this time, in our same physical space, there was a musical era connected to our own but of another character and dimension. In calendar time, it was about 25 years ago. In musical time, it was like the day before yesterday; but it could also have been tomorrow, because its sound was the sound of tomorrow.
The music of this era strove to be larger than itself. Its musical freedom was no mere technical achievement but an open-ended exploration that had to do with the very fabric and freedom of life. This freedom was both invigorating and frightening: invigorating in its realization, frightening in its practical implications. For the logic of liberation is such that the established ground of being of every single orthodoxy, musical or not, must fundamentally be called into question.
There was, as well, an inherently spiritual dimension to this new music: spiritual in the broadest sense of the word, nothing to do with religion. Music was not only music; it was a spiritual journey, a spiritual quest. And though it may seem amazing now, a wide spectrum of players of this period more or less accepted a vision such as this as a starting point for what their music was about. Many quite willingly and openly gave utterance to this vision, a vision most pointedly personified in the music and writings of John Gruntfest.
As a musician, on alto saxophone, John was the wildest sounding, hardest blowing, and yet one of the most disciplined players around. The weight of his music lent weight to his words.
Free music, then, while it may happen to take place in a performance space (or not!) or to provide entertainment to those hearing it (or not!), contained within itself a deeper ritual necessity and impulse which was the essence and truth of its being.
Such was the context in which John's grandiose "Piece for Forty Horns" (four versions of which appear on this CD), the amazing centerpiece of the 1979 Fourth Annual San Francisco Free Music Festival, took place. A review I wrote of it at the time noted the instrumentation as John Gruntfest, alto saxophone, composer and conductor; plus 23 saxophones, 4 clarinets, 4 trombones, 3 trumpets, 2 flutes, 1 oboe, sackbut, and tuba. This may well have been only the publicized or projected instrumentation, however, as John informs me that, in fact, between 50 and 70 musicians participated.
The spacious (and on this particular evening, well packed) Metropolitan Art Center was a perfect venue for the orchestra's performance, with its golden wood floors and lively acoustics, around the perimeters of which the players formed a giant circle.
The basic instructions for the piece (as published along with the score in the July-Aug 1979 issue of EAR) were as follows: 1.	The idea is to create a physical wave in the space which will hopefully establish a feeling of warmth, unity, and spirituality: SACRED SPACE, SACRED TIME 2.	Repetition and speed are two keys to setting up the waves, As is playing with the totality of your whole being. Lots of Heart. 3.	Each idea within the repeats should be repeated many times. 4.	You may move from idea to idea in any order. 5.	Create your own idea within the harmonic-spiritual framework. 6.	USE THE HARMONIC SPRINGBOARD TO ACHIEVE ESCAPE VELOCITY AND FREEDOM.
This CD is the first public release of those four versions of the "Piece for Forty Horns," the fourth being the one from the evening performance and the other three being the "rehearsal" realizations in the order they were played. It's the first time I've heard a recording of this music in its entirety, and the first time I've heard any of it in 24 years.
The sheer massiveness of the music is astonishing, even now. Each version of the piece is special, but the first and fourth are classic.
The fourth version, brimming with confidence, sends sparks flying off its edges. It perhaps best balances the boisterous mix of heady freedom and tonal reality. The mix shines bright, with a topping of brass on the reedy surface. The Venda finish spins triumphantly out of the colossal ensemble, most fully calling to mind its African origins. And the Shintaido dancers, in landing their high, leaping jumps, interpolate some occasional, just audible, thumping percussion.
The first, on the other hand — yet to have a precedent for itself — opens like a rocket hurling headlong through space. That rocket is an immense wall of sound whose tonal centers, when contacted, act like smaller booster rockets to propel it even further into the stratosphere. The Venda duet begins to try to assert itself just past the seventh minute, but this spaceship does not really want to ground, and it struggles mightily against the pull of the land dance. Gravity at last asserts itself; and slowly, gradually, the piece fixates on the lights of a runway. It finishes its flight of glory as softly as it began raucously.
The second and third versions are shorter, more ostensibly yin-and-yang in quality. In these renditions there is virtually no transition between the piece's freer beginnings and the ensuing Venda conclusion; rather they coexist with each other, side by side. Yet while the opening portion of the second version nearly rivals the power of the first, the opening of the third is the slowest in tempo, with its tonal centers the most firmly established. Parts of that version are fantasia-like, rather like giddily floating in space.
This is stupendous music from another dimension, a dimension not so far away from ours, and yet light years away. The CD is a fundamental and essential document of the history of improvised music in the San Francisco Bay Area.
Available online from CD Baby or directly from WAVEMAN, 2156 Encinal Ave; Alameda, CA 94501.


STAAR® Surgical Company began feasibility studies for treating vision disorders with an implantable contact lens (ICL) in 1993. By 1997, the company received approval to supply its ICL vision correction device to European markets. In 2005, the U.S. Food and Drug Administration (FDA) approved the Visian ICL (Implantable Collamer Lens) for the reduction and treatment of nearsightedness (myopia). Most recently the FDA approved the Visian Toric ICL for the correction of both nearsightedness and astigmatism in one simple procedure.
The Visian ICL is sometimes referred to as an implantable contact lens, because it is added to the eye to correct common visual problems, like myopia and astigmatism. Unlike IOLs that are used during cataract surgery, the Visian ICL does not replace the eye's natural lens, instead it is placed between the iris and the natural lens.
The Visian ICL gives another option for treating myopia. Now, patients who are seeking the latest approved procedures for vision correction or who want to avoid the permanence of laser vision correction have another choice for correction of nearsightedness.
Although the Visian ICL is often informally defined as an "implantable contact lens," in the United States, the "ICL" in the Visian ICL stands for "implantable Collamer lens." This designation acknowledges the unique material that comprises the lens.
The Visian ICL is made from Collamer, a unique, collagen lens material designed to work in harmony with eye. This proprietary lens material has greater biocompatibility than acrylic and silicone lenses 1. The Visian ICL is also foldable, requiring a smaller incision during the surgical procedure than other available lenses.
The safety and effectiveness of the Visian ICL implantation procedure has been proven with over 950,000 implants worldwide as well as recent US FDA approvals. Unlike corneal refractive surgery, the Visian ICL does not permanently alter the structure of the eye. Instead, the lens is added to the eye where it works with the natural lens to correct vision. Learn more about the Visian ICL vision correction procedure and how the ICL takes refractive surgery beyond the limits of LASIK.
The Visian ICL is foldable. This feature allows physicians to implant the lens using a smaller incision. The small incision procedure is a technique that is familiar to eye surgeons. The Visian ICL requires a 2.8mm to 3.0mm incision as opposed to the 6.0mm incision required by other FDA-approved phakic IOLs. This smaller incision is seen as less invasive and will not induce astigmatism in the cornea.
The Visian ICL is meant to stay in the eye indefinitely. However, if overcorrection or undercorrection occurs, a complication develops, or a patient's vision changes, the Visian ICL can be removed or exchanged by an experienced ophthalmic surgeon.
What will vision correction cost me?
Laser Vision Correction – LASIK surgery, Lens Replacement, or Cataract surgery procedures have varying prices based on a number of factors. During your consultation and complete eye exam, the Key-Whitman Eye Center will offer the best recommendation for vision correction based upon your results. We want to help you make the best, informed decision for eye surgery to reduce your dependency on glasses and contacts.
At Key-Whitman, our goal is to provide to you, as a lifelong patient, the very best in care and results. We offer advanced technology, tested and proven to be the safest and most effective. Our caring surgeons and professional staff are recognized throughout the Metroplex for their exceptional skills, credentials and training. You will feel the warmth and concern of healthcare providers who will make your experience pleasant and rewarding.
Watch our informative video on Implantable Contact Lens.
Schedule an appointment with us today if you are ready to take the first step.


The arrival of spring has been accompanied by (slightly) sunnier weather in the UK - but it's not warm enough just yet for those looking to try out their new swimming costumes.
If you can't wait for your dose of sunshine, this fantastic competition offers you the chance to hop on a plane and jet off to one of Europe's most popular destinations.
As part of its 'Discover Your Summer' campaign, Exeter Airport is offering you and a person of your choice the chance to fly to Faro in Portugal for free with flybe.
The capital of The Algarve region is the southernmost city in Portugal, and has long been the go-to location for Brits thanks to its wonderful beaches, rich history and fantastic nightlife.
And its amazing Mediterranean climate is comfortable all year-round, so you're almost guaranteed warm weather whenever you decide to visit!
All you need to do to be in with a chance of winning this amazing prize is answer the simple question and enter your details in the form below before the closing date of Friday, April 19, 2019.


text:
Intro to Modern World History
10 The Global Human Rights System
This module considers the emergence of the international system of human rights after World War II. Historian Jean Quataert contextualizes this moment in Advocating Dignity: "Armed with the full weight of what history had just revealed about the human capacity for evil, this system commanded great moral authority, which its authors were able to translate in a few years into three components: (1) A permanent U.N. committee structure of oversight and norm-setting, (2) authority to codify new international human rights and criminal law and make it binding on the ratifying states, and (3) a willingness to respond to – if not mobilize – international public opinion that was becoming invested in halting grave injustices and abuses abroad." (2009) We will discuss it here between the end of World War II and the advent of the Cold War world in order to see how the concept of human rights both shaped, and was influenced by the historical context.
After completing Chapter 10, you will be able to
Define human rights.
Provide and explain the use of human rights language at an individual and institutional level.
Understand the history of human rights as a dynamic and non-linear narrative.
Evaluate the influence of human rights language in the international order after 1945.
Read historian Jussi M. Hanhimäki, "The best hope of mankind? A brief history of the UN," in The United Nations: A Very Short Introduction.
Primary Source: Avalon Project, "Universal Declaration of Human Rights"
Previous: War, Consumption, & Radical Politics
Next: Three World Order


"Since the advent of the Inter-American Commission of Human Rights (IACHR/ "the Commission") and the Inter-American Court of Human Rights (IACtHR/ "the Court"), these two organs of the Organization of American States (OAS) have addressed human rights promotion and protection in the member States of the OAS. Together, the IACHR and the IACtHR comprise the Inter-American System (IAS). For over twenty years they have been developing legal theories focused on the plight of indigenous populations within the region of the American States. While the IACtHR has found in claimants' favor in indigenous claims of property rights, protection under the law, and right to life, the history of reparations reveals an inconsistency in the provision of adequate compensation for these claims.
Currently, the IAS faces difficulties ensuring justice for indigenous claimants. Often, the IAS responds to claims in an untimely fashion and the abuses in the original claim generally continue to occur even after favorable judgments. The IAS needs new strategies in order to address these two threats to indigenous claimants' access to justice.
At the same time, the IAS recognizes that the influx of new claims has hampered the adjudicative bodies' effectiveness to address the claims. One proposal to deal with this problem is the increased use of friendly settlement mechanisms. A variety of factors suggest that such mechanisms will become important tools for improving the effectiveness of all regional human rights bodies, including the IAS. While the IAS has yet to decide on a comprehensive settlement mechanism, improving the use of indigenous reparations claims by borrowing aspects of other settlement techniques provides one avenue for better efficiency and justice.
Part I of this Note describes the hurdles facing indigenous claimants in the IAS, while Part II introduces tools of international dispute resolution. Part III of this Note lays out the broad foundations for using such tools to transform indigenous reparations into a type of friendly settlement mechanism and explains how such a mechanism provides a better method of resolving indigenous property rights claims in the IAS than the current system."


Once again the stout folk of the Innsmouth Gold Archaeological and Anthropological Institute have journeyed far and near to capture these recordings….from Atlantic depths to Antarctic heights….
They have dared the Court of the Yellow King and the corridors of Arkham Asylum. They even persuaded Dr Phibes and Erich Zann to play a little duet for you!


Cold, Clear, and Deadly is both a mystery and the story of the evolution of its author: from a chemical and bioprocess scientist to the vice president in charge of a major company's corporate environmental division; to engaging in international research and travel to discover the source of persistent organic pollutants (POPs) in cold northern waters ranging from the Great Lakes to the Arctic.
POPs —PCBs and chlorinated pesticides such as DDT, toxaphene, and chlordane that came into use following World War II— were used in a wide range of seemingly benign scientific enhancements of modern life, from increasing crop yields to preventing fires. Initially, they were used in the West with abandon. However, pesticide POPs and industrial PCBs (polychlorinated biphenyls) were banned when they were found to cause cancer in humans and to devastate wildlife near their areas of application. Yet, to this day they remain in the environment at dangerous levels. The question of why that is has occupied Visser for more than a decade.
The attempts of Visser and other international environmental scientists to understand POP contamination in the far north, where the POP content of whale blubber would classify it as hazardous waste, leads to unraveling the mystery of continuing contamination of the Great Lakes. Scientists discovered that the POPs ban was not global and that POPs evaporating from agricultural and industrial uses in developing countries were circling the globe and traveling north. Air sweeping North America and Europe is contaminated with more than 100 million POPs molecules per adult human breath, a toxic blanket that keeps our waters dangerous to man and wildlife. This devastating toxicity and the fact that our current efforts to clean up POPs residues in developed countries— "Thinking Globally and Acting Locally" will not solve the problem— makes Cold, Clear and Deadly a must-read for anyone concerned about the silent but deadly persistence of toxic chemicals in our food and water.
Melvin J. Visser had a distinguished thirty-five year career with the Upjohn Company in Kalamazoo, Michigan. Early retirement allowed him to pursue a solution to the mystery described in Cold, Clear, and Deadly. Visser received his chemical engineering degree from Michigan Technological University in 1959 and spent a career manufacturing pharmaceutical chemicals at The Upjohn Company in Kalamazoo. In 1980, he assumed environmental responsibility for the corporation. Mel's environmental chemical education came when he was appointed to co chair the Great Lakes Regional Corporate Environmental Council, an association of U.S. and Canadian industrial and environmental leaders formed to discuss their differences in a collegial setting. Mel retired in 1995 wondering why PCB concentrations in Lake Superior remained stagnant years after their banning. Volunteering in state and federal efforts did not bring answers. Two trips to the Canadian High Arctic and the assimilation of international research studies and business practices led to surprising answers. His search is chronicled in Cold, Clear, and Deadly: Unraveling a Toxic Legacy.


Under the Affordable Care Act, certain employers — known as applicable large employers — are subject to the employer shared responsibility provisions. You might be thinking about these topics as you make plans about 2017 health coverage for your employees.
If you are an employer that is subject to the employer shared responsibility provisions, you may choose either to offer affordable minimum essential coverage that provides minimum value to your full–time employees and their dependents, or to potentially owe an employer shared responsibility payment to the IRS.
Affordable coverage: If the lowest-cost self-only only health plan is 9.5 percent or less of your full–time employee's household income, then the coverage is considered affordable. Because you likely will not know your employee's household income, for purposes of the employer shared responsibility provisions, you can determine whether you offered affordable coverage under various safe harbors based on information available to you as the employer.
See IRS.gov/aca for more information on the employer shared responsibility provisions.


text:
El Paso County Board of Health waives 2021 retail food establishment license fees for full-service restaurants, bars, and taverns
El Paso County, CO – In an effort to provide economic relief to local restaurants impacted by the COVID-19 pandemic, the El Paso County Board of Health voted unanimously at its meeting this morning to waive 2021 license fees for full-service retail food establishments (RFE), bars, and taverns in El Paso County.
The Board's action was made possible by Senate Bill 20B-001, which was signed into law in December 2020 and aims to help alleviate the financial impacts of COVID-19 on the restaurant industry. With the passing of this bill, the Colorado Department of Public Health and Environment directed local counties to waive the license renewal fee for specific license types to include full-service restaurants (zero to 200+ seats), bars, and taverns.
This bill provides financial assistance to 1,568 (57%) of the 2,733 RFEs in El Paso County, resulting in over $620,000 in waived fees.
RFEs that were not included in this waiver include grocery stores, convenience stores, mobile units, and businesses with limited food preparation that are not bars or taverns. The state legislature had determined that these types of businesses were less likely to suffer critical negative impacts from the capacity and indoor dining restrictions imposed by state public health orders.
Background and additional information
Retail food licenses are renewed annually with fee amounts determined by their license category.
License categories are established at the time of original licensing.
Reduced seating capacity due to COVID-19 does not result in a license change.
Timelines and next steps
Establishments that have received fee waivers will receive a letter outlining this information along with their license by April.
For establishments that have not received fee waivers and must pay their license renewal, the payment deadline has been extended to March 31, 2021, and these establishments have been sent notification letters.
All 2020 licenses have been extended to cover the delay in license distribution.
More detailed information on this process can be found on El Paso County Public Health's website under the retail food establishment page.
NEWS RELEASE - El Paso County Board of Health waives 2021 retail food establishment license fees for full-service restaurants, bars, and taverns.pdf
Michelle Hewitt
Public Health Information Officer
El Paso County, CO


S19 Sneydes Pty Ltd is a limited by shares, Australian proprietary company. This corporation was registered on 2012-05-17 and was issued with the 158420814 ACN. Its Australian Business Number is 11158420814. Since 2015-08-26, the company is headquartered in VIC, post code 3205. The previous headquarters were located in VIC 3011 (from 2014-09-20 to 2015-08-26), VIC 3011 (from 2012-05-17 to 2014-09-20). S19 Sneydes Pty Ltd was registered for the GST on 2013-09-03. The above data comes from the ABN database which was updated on 2015-08-26.


Corsair has announced three new variants to the Vengeance LPX DRAM Series: Vengeance LPX 32GB, 64GB and 128GB DRR4 kits, which corsair describes as the fastest it has ever made. The new Vengeance LPX additions does bring plenty of features that might be jaw-dropping to some.
For starters, the Vengeance LPX 32GB (4x8GB) DRAM kit has a frequency of 3,600MHz and runs at 1.35V with CL 16-19-19-39 timings (explained here). Next, the Vengeance LPX 64GB (4x16GB) DRAM kit variant has an impressive frequency speed of 3,333MHz and a power consumption of 1.35V along with CL16-18-18-36 timings. Both DRAM variants come in either a red or black colour option.
Now for the cream of the crop, the Vengeance LPX 128GB (8x16GB) DRAM kit variant. This massive DRAM kit comes with frequency speeds of 3,000MHz and is capable of going faster. In addition to that, the LPX 128GB kit has a power consumption of 1.35V with CL-16-18-18-36 low latency timings. Ever wondered how to push Intel's X99 quad-channel memory layout to the limit? This is it.
Corsair mentioned that all three DRAM kits will be made available worldwide immediately via its retailers and distributors. Price-wise, the Vengeance LPX 32GB DRAM kit will be retailing for US$350 (about RM1,535), while the 64GB variant will be sold for US$550 (around RM2,410). The 128GB variant will cost a whopping US$1,175 (approximately RM5,150). But, then again, aside from enterprise usage, who needs 128GB of RAM anyway?


The UK is officially on the road to Brexit. After all the build-up, the impact of the activation of Article 50 on the currency market was rather muted.
GBP/EUR actually gained slightly on the euro, rising from €1.1479 to €1.1553, while GBP/USD clung to the $1.2424 level. Sterling failed to hold its own against the commodity currencies however, with GBP racking up a hat trick of losses against CAD, AUD and NZD. The pound lost around a cent against all three currencies.
Yesterday all eyes were on the UK and a moment over nine months in the making – the activation of Article 50.
While the pound initially declined after Prime Minister Theresa May signed the letter that would kick start two years of intensive Brexit negotiations, the currency later recovered ground against currencies like the euro and US dollar.
The tone of May's letter and the speech she offered up in the wake of its delivery lent the pound support, with the PM proclaiming that she would be seeking a special relationship with the EU.
May stated; 'The Article 50 process is now underway. And in accordance with the wishes of the British People, the United Kingdom is leaving the European Union.


Fewer people think about water damage restoration after a disaster in their home and yet it could make the difference between keeping a home in one piece or it be labeled 'uninhabitable'. However, what do you know about water damage in general? The problem for most homeowners is that they know very little about water damage and it's causing them dearly. It's time you learned a few things about water damage. Here are five facts you need to know.
You have category 1, 2 and 3; and each of these categories will mean a different hazard level to the water within the home. For example, category 3 is the worst; it's contaminated and could be potentially deadly to those who drink it. Category 2 can be dangerous but not usually deadly; it may have bacteria so it's more likely someone who consumes the water here would become ill to some degree. However, category 1 water is essentially clean water that comes from the water line within the home and isn't usually going to cause serious health concerns. Of course, any level of water damage within the home may require water damage restoration nonetheless.
What you might not be aware of is that even though you have home insurance, some water damage may not be covered. For example, flooding of a home may be covered if it's from a water pipe within the home or something similar but a natural disaster flood may not be covered. Some policies will have this cover and others won't. If you live somewhere which is prone to localized flooding then it's very unlikely you'll be covered. You should check your policies beforehand before getting water damage restoration carried out. Checking your policies will make a real difference when it comes to knowing what's covered and what isn't. Also, additional cover can be arranged.
While you might not have lots of standing water throughout the home that doesn't mean to say there aren't any further complications past all that. You need to understand water damage can be really tricky at the best of times and even though it doesn't look bad, it might be far worse than you thought. That's why it's vital to inspect the home or have a qualified individual inspect the home for further water damage. In some cases, water damage restoration may be necessary. Learn more.
As soon as you can contact the company you have your home insurance with or indeed flood insurance. The quicker you can contact them and let them know what's going on the faster they can process the claim and get things in order. A lot of the time, water damage restoration may be needed and when that is the case, insurers may say you need to use a list of our recommended restorers in order to get the damage covered. It's very important to do so.
The longer you leave the water damage, the more problems you will have. If you have water damage within the home you ideally need to get it sorted out very, very quickly. You have literally two days before mold starts and in truth, the longer there is water damage, the tougher it'll be to repair the home and anything within it. Water damage restoration needs to be dealt with now rather than waiting another two weeks. You really have to deal with the problems today and not next week, even tomorrow could be too late. Today is when you need to take decisive action.


text:
Q: Run a SQL subquery based on results of the main query Is there a better way to do this?
The SQL Server 2008 R2 table-valued function below runs a query to determine how many records there are that match a specific criteria and then performs another query based on the results of the first query.
Is this the right approach? Or is there a better way to achieve the same result?
USE [My_MSSQL_Database]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[GetActiveProfileIDForSystemID](@SystemID NVARCHAR(10))
RETURNS @retActiveProfileID TABLE
(
    ActiveUserProfile NVARCHAR(10)
)
AS
BEGIN
    DECLARE @ProfileCount NVARCHAR(50);
    DECLARE @ProfilesLookup NVARCHAR(50);

    SELECT @ProfileCount = COUNT(mdl_user.id)
    FROM mdl_user
    INNER JOIN mdl_user_info_data ON mdl_user.id = mdl_user_info_data.userid
    WHERE (mdl_user_info_data.fieldid = 2)
    AND (mdl_user_info_data.data LIKE @SystemID)
    AND mdl_user.id NOT IN (
        SELECT mdl_user.id
        FROM mdl_user
        INNER JOIN mdl_user_info_data ON mdl_user.id = mdl_user_info_data.userid
        WHERE (mdl_user_info_data.fieldid = 4)
        AND (mdl_user_info_data.data LIKE 'Yes')
        AND (mdl_user.deleted = 0)
    )
    AND (mdl_user.deleted = 0);

    IF (@ProfileCount > 0)
    BEGIN
        SELECT @ProfilesLookup = mdl_user.id
        FROM mdl_user
        INNER JOIN mdl_user_info_data ON mdl_user.id = mdl_user_info_data.userid
        WHERE (mdl_user_info_data.fieldid = 2)
        AND (mdl_user_info_data.data LIKE @SystemID)
        AND mdl_user.id NOT IN (
            SELECT mdl_user.id
            FROM mdl_user
            INNER JOIN mdl_user_info_data ON mdl_user.id = mdl_user_info_data.userid
            WHERE (mdl_user_info_data.fieldid = 4)
            AND (mdl_user_info_data.data LIKE 'Yes')
            AND (mdl_user.deleted = 0)
        )
        AND (mdl_user.deleted = 0)
    END
    ELSE
    BEGIN
        SELECT @ProfilesLookup = mdl_user.id
        FROM mdl_user
        INNER JOIN mdl_user_info_data ON mdl_user.id = mdl_user_info_data.userid
        WHERE (mdl_user_info_data.fieldid = 2)
        AND (mdl_user_info_data.data LIKE @SystemID)
        AND (mdl_user.deleted = 0)
    END

    IF @ProfilesLookup IS NOT NULL
    BEGIN
        INSERT @retActiveProfileID
        SELECT @ProfilesLookup;
    END
    RETURN
END

mdl_user_info_data.userid is an implied FK on mdl_user.id
(mdl_user.id = mdl_user_info_data.userid)
Essentially, what I want to do is:
Run a query that will COUNT how many rows/records there are in the mdl_user_info_data table
WHERE (mdl_user_info_data.fieldid = 4)
AND (mdl_user_info_data.data LIKE 'Yes')

and
    WHERE (mdl_user_info_data.fieldid = 2)
    AND (mdl_user_info_data.data LIKE @SystemID)
If there are no rows (COUNT = 0) then I want to:
SELECT id
FROM mdl_user_info_data
WHERE mdl_user_info_data.userid = @SystemID

where @SystemID is the @SystemID value passed to the GetActiveProfileIDForSystemID(@SystemID) function when it is called.
The
mdl_user_info_data.fieldid = 2 and
mdl_user_info_data.fieldid = 4
rows are "user profile" fields in the application (Moodle).
The mdl_user_info_data table definition is:
CREATE TABLE [dbo].[mdl_user_info_data](
 [id] [bigint] IDENTITY(1,1) NOT NULL,
 [userid] [bigint] NOT NULL,
 [fieldid] [bigint] NOT NULL,
 [data] [ntext] NOT NULL,
 [dataformat] [smallint] NOT NULL,
 CONSTRAINT [mdl_userinfodata_id_pk] PRIMARY KEY CLUSTERED
)

A: It depends on what you mean by "better".
From the point of view of ease of understanding and maintenance the current variant could be OK.
From the point of view of performance it most likely can be improved, because you execute the same query twice.
Here is one possible way. This is my understanding of the logic behind this function.
There are two possibly intersecting sets of IDs.
A:
SELECT ID
FROM T
WHERE <ExpressionA>

SELECT mdl_user.id
FROM mdl_user
INNER JOIN mdl_user_info_data ON mdl_user.id = mdl_user_info_data.userid
WHERE (mdl_user_info_data.fieldid = 2)
AND (mdl_user_info_data.data LIKE @SystemID)
AND (mdl_user.deleted = 0)

B:
SELECT ID
FROM T
WHERE <ExpressionB>

SELECT mdl_user.id
FROM mdl_user
INNER JOIN mdl_user_info_data ON mdl_user.id = mdl_user_info_data.userid
WHERE (mdl_user_info_data.fieldid = 4)
AND (mdl_user_info_data.data LIKE 'Yes')
AND (mdl_user.deleted = 0)

If set A minus set B has any rows then we return one random row
  from the difference ELSE return one random row from set A.

This is how both sets look like:
A: |........................|
B:                  |,,,,,,,,,,,,,,,,,,,,,,,,|

   |................|;;;;;;;|,,,,,,,,,,,,,,,,|
         A - B        A x B       B - A

If A-B is not empty return A-B ELSE return A or AxB (if A-B
  is empty, then A = AxB)

We want to return only one row, not the whole set. So, we can return ordered union of A-B plus AxB and take the first row of the result.
WITH
CTE_A
AS
(
    SELECT ID
    FROM T
    WHERE <ExpressionA>
)
,CTE_B
AS
(
    SELECT ID
    FROM T
    WHERE <ExpressionB>
)
,CTE_OrderedA
AS
(
    -- A - B
    SELECT 1 AS SortOrder, ID
    FROM CTE_A
    WHERE ID NOT IN
    (
        SELECT ID
        FROM CTE_B
    )

    UNION ALL

    -- A x B
    SELECT 2 AS SortOrder, ID
    FROM CTE_A
    WHERE ID IN
    (
        SELECT ID
        FROM CTE_B
    )
)
SELECT TOP(1) ID
FROM CTE_OrderedA
ORDER BY SortOrder
;

This query eliminates the need for explicit IF. Now you can simplify the function itself and make it an inline TVF.
It should be more efficient than the current variant, but you should measure actual performance with your real data.
Actually, it could be said that a single query variant is better from the maintenance point of view as well, because the code for the query is not repeated.
But logic behind this could be not obvious.
In any case there should be proper comments explaining the logic.


How to redeem Higgs & Higgs discount codes 2019?
Discover our free and latest Higgs & Higgs discount codes, including 6 Higgs & Higgs promo codes and 30 deals. Make the best of our Higgs & Higgs voucher codes to get 50% off. Never miss the chance to save a penny.


text:
Ге́рман І́горович Соловйо́в (1994—2019) — солдат Збройних сил України, учасник російсько-української війни.

Життєпис
Народився 1994 року в місті Кам'янське (Дніпропетровська область); мешкав у місті Дніпро.

З вересня 2018 року — в лавах ЗС України. Був високого зросту — через що мав позивний «Маяк». Солдат, механік-водій БМП механізованого відділення 93-ї бригади. Виконував завдання поблизу смт Верхньоторецьке Ясинуватського району.

22 грудня 2019-го загинув у передобідню пору від кульових поранень у груди та потилицю під час перестрілки з проросійськими бойовиками на позиції поблизу села Кримське. Останні вели обстріл з гранатометів, великокаліберних кулеметів та іншої стрілецької зброї.

26 грудня 2019 року похований у Кам'янському, на Алеї Слави військового цвинтаря Соцміста.

Без Германа лишилися батьки.

Нагороди та вшанування
 Указом Президента України № 50/2020 від 11 лютого 2020 року за «особисту мужність і самовіддані дії, виявлені у захисті державного суверенітету та територіальної цілісності України» нагороджений орденом «За мужність» III ступеня (посмертно)
 Вшановується в меморіальному комплексі «Зала пам'яті», в щоденному ранковому церемоніалі 22 грудня.

Примітки

Джерела
 Соловйов Герман Ігорович // Книга пам'яті

Уродженці Кам'янського
Померли в Новоайдарському районі
Поховані в Кам'янському

redpajama_set_name: RedPajamaWikipedia


Explore 2019 Chrysler 300, performance and technology features. We reviews the 2019 Chrysler 300 Release Date where consumers can find detailed information on specs, fuel economy, transmission and safety.
Explore the design, performance and technology features of the 2019 Chrysler 300. See models and pricing, as well as photos and videos. The 2019 Chrysler 300 Review goes to excess the right kinds of excess to preserve its best-of status. Find out if the new 2019 Chrysler 300 coupe takes a step forward in our first-drive review. See photos and get the story at Car and Driver.
Reviews, videos, latest news, specs and road tests on the 2019 Chrysler 300. Top Gear reviews the Price. Terrific refinement, class-leading technology, and incredible interior quality. Want to know more? Read more.
Now we have one of many air vents twisting it would shut and open it which is a nicelittle contact coming alongside the sprint has a nice aggressive bezel above the gauges very clean looking – super minimalistic you have got some black leather-based and some gray stitching alongside the dash as wellthen coming to the touch display navigation system hitting the house button.
We have now many alternative settings your apple carplay and android auto of course your audio controls Wi-Fi after which you may scroll over to your climate and see totally different settings like you could see the place all of the air is directed what is on and off more controls beneath that and then all of your local weather controls are located proper right here really cool actually this you spin left and rightand that actually changes the temperature you even have an LCD display screen to correspond to that and then over on the suitable facet this is how you alter your fan speed you get a bit of display as well and your analysis a see all the different buttons your defogger you're the Alcantara on the shift knob as properly asthe shifter boot very easy to have interaction you to gear brief shifter extraordinarily sighs nice weighted shift knob to offer 2019 Chrysler 300.


text:
Our Very Own Dirty War
In Argentina, during the "Dirty War" in the mid-seventies, the military
used to load tortured university students into helicopters and push
them into the stormy South Atlantic.
We have not yet come to that, thank god. But the statistics are
mounting, as almost every week now, activists and journalists are
murdered or abducted. The dirty war is a grim reality that is
unfolding, especially in the countryside.
Like many institutions, the University of the Philippines as a community has been slow in reacting to the spread of the dirty war. But when its very own were swept up in the dragnet, it finally reacted. Sherlyn Cadapan, an outstanding athlete, is with the College of Human Kinetics. Karen Empeno is a student at my unit, the Department of Sociology of the College of Social Sciences and Philosophy. Both were picked up by masked men with long firearms at 2 am in Hagonoy, Bulacan, along with a male companion from the same area.
In a letter to Ronaldo Puno, Secretary of the Department of Interior and Local Government, UP President Emerlinda Roman requested the assistance of government authorities in locating the two students. In the letter the president reminded Puno: "We know that you share with us a commitment to the spirit of the UN General Assembly's 'Declaration on the Protection of all Persons from Enforced Disappearance… We also know that the acts done by masked armed men are criminally punishable under our laws."
Ten days after President Roman's letter, with still no word from the military or any other government agency on the whereabouts of the two students, the University Council approved with no negative votes a resolution reiterating her request for information and asking the government to "provide [the students] with medical and legal assistance and release them to the care of the University as soon as possible." The July 13 resolution added: "We consider the continuing silence of the authorities in this matter of life and death to be inexcusable and a betrayal of the public trust."
The university community's reaction, along with the recent Catholic Bishops Conference Pastoral Statement of July 11, which condemned the spate of killings, was an important step in the awakening of civic consciousness over the grave danger to the liberal democratic regime posed by the rampant assassinations and abductions.
But the protests from these two institutions are far from turning the black tide of state and paramilitary terrorism.
In contrast to the waning years of the Marcos regime and the early years of the Aquino presidency, there has yet been no mass outrage at the systematic assassination of activists and media people. It could be that people have become cynical about the ability of the justice system to bring the perpetrators of such deeds to justice. This is understandable since none of the perpetrators of the killings of high-profile figures—Benigno Aquino, the student leader Lean Alejandro, labor leader Rolando Olalia—have been brought to justice, much less identified. This cynicism about the justice system is part of the general disillusionment with the institutions of the unraveling EDSA liberal democratic state that replaced the Marcos regime.
Lack of faith in mass actions, profound skepticism that the vote can change anything, a withdrawal into the private sphere, general dispiritedness—these are the elements of the miserable political context in which the killings are taking place.
The systematic assassinations and abductions are part of an anti-communist campaign that has run out of control. They are being perpetrated by elements of the security and defense establishment, along with private landed armies, and these forces are encouraged by the unwillingness of civilian authorities to check them. For the civilian authorities—in this case, Malacanang—are not only weak; they depend for their survival on the support of the military. This symbiosis between a corrupt and weak civilian regime and a strong and reckless military is what is stripping the EDSA state of its last liberal features.
For all intents and purposes, we are living in a repressive, post-liberal, post-democratic state.
It is estimated that at least 15,000 young people were assassinated in the dirty war in Argentina. It will never get that bad here, some say. Well, let me tell these people that this is no longer a far-fetched scenario, and the only thing that will prevent it from transpiring is a mobilized civil society that says enough, and is angry enough to bring back the rule of law.
Can we turn the tide? Yes, but that will take a lot of determination and a lot of courage.