text:
Q: Gradle test fails using the JaCoCo plugin with Java 15? This problem appears to be mentioned in https://github.com/gradle/gradle/issues/15038, but it is unclear from that thread how to fix it so posting it here. I'm running Java 15:
> java --version
openjdk 15.0.2 2021-01-19

and Gradle 6.6.1:
> gradle --version

------------------------------------------------------------
Gradle 6.6.1
------------------------------------------------------------

Build time:   2020-08-25 16:29:12 UTC
Revision:     f2d1fb54a951d8b11d25748e4711bec8d128d7e3

Kotlin:       1.3.72
Groovy:       2.5.12
Ant:          Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM:          14.0.1 (Oracle Corporation 14.0.1+14)
OS:           Mac OS X 10.16 x86_64

I've started a test project selecting Application as its type, and added the jacoco plugin:
plugins {
    // Apply the java plugin to add support for Java
    id 'java'

    // Apply the application plugin to add support for building a CLI application.
    id 'application'

    id 'jacoco'
}

However, if I try to ./gradlew test I get the following error:
> ./gradlew test

> Task :test
java.lang.instrument.IllegalClassFormatException: Error while instrumenting sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo.
        at org.jacoco.agent.rt.internal_43f5073.CoverageTransformer.transform(CoverageTransformer.java:94)
        at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246)
        at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
        at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:563)
        at java.base/java.lang.ClassLoader.defineClass2(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1108)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:183)
        at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:784)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClassInModuleOrNull(BuiltinClassLoader.java:705)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClass(BuiltinClassLoader.java:586)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:634)
        at java.base/java.lang.Class.forName(Class.java:546)
        at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:854)
        at java.base/java.util.ServiceLoader$ModuleServicesLookupIterator.hasNext(ServiceLoader.java:1078)
        at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1301)
        at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1386)
        at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:89)
        at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:86)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
        at java.base/sun.util.cldr.CLDRLocaleProviderAdapter.<init>(CLDRLocaleProviderAdapter.java:86)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
        at java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(LocaleProviderAdapter.java:188)
        at java.base/sun.util.locale.provider.LocaleProviderAdapter.findAdapter(LocaleProviderAdapter.java:287)
        at java.base/sun.util.locale.provider.LocaleProviderAdapter.getAdapter(LocaleProviderAdapter.java:258)
        at java.base/java.util.Calendar.createCalendar(Calendar.java:1693)
        at java.base/java.util.Calendar.getInstance(Calendar.java:1661)
        at java.base/java.text.SimpleDateFormat.initializeCalendar(SimpleDateFormat.java:677)
        at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:621)
        at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:600)
        at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.getLastResortErrorLogFile(SystemApplicationClassLoaderWorker.java:162)
        at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:111)
        at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71)
        at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
        at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Caused by: java.io.IOException: Error while instrumenting sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo.
        at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrumentError(Instrumenter.java:159)
        at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrument(Instrumenter.java:109)
        at org.jacoco.agent.rt.internal_43f5073.CoverageTransformer.transform(CoverageTransformer.java:92)
        ... 37 more
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 59
        at org.jacoco.agent.rt.internal_43f5073.asm.ClassReader.<init>(ClassReader.java:195)
        at org.jacoco.agent.rt.internal_43f5073.asm.ClassReader.<init>(ClassReader.java:176)
        at org.jacoco.agent.rt.internal_43f5073.asm.ClassReader.<init>(ClassReader.java:162)
        at org.jacoco.agent.rt.internal_43f5073.core.internal.instr.InstrSupport.classReaderFor(InstrSupport.java:280)
        at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrument(Instrumenter.java:75)
        at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrument(Instrumenter.java:107)
        ... 38 more

BUILD SUCCESSFUL in 1s
3 actionable tasks: 3 executed

The aforementioned GitHub issues page seems to say that it's possible to solve this error by specifying the toolVersion of the jacoco project extension (https://docs.gradle.org/6.7/userguide/jacoco_plugin.html#sec:configuring_the_jacoco_plugin), but it's unclear to me which tool version to choose; I've tried
jacoco {
    toolVersion "0.8.5"
}

but with the same error result. Any idea how to fix this error?

A: A search for "jacoco java 15" brought up the changelog as the first result.

Snapshot Build 0.8.7.202101150304 (2021/01/15)
...

*

*JaCoCo now officially supports Java 15

Experimental support for Java 15 is listed for JaCoCo 0.8.6.


text:
Q: Прокрутка к якорю, но немного выше Приветствую.
Прокрутка к якорю на jQuery - очень популярная тема и у меня как раз вопрос по этому. Есть код:
        $('a[href^="#"]').bind('click.smoothscroll',function (e) {
        e.preventDefault();
        var target = this.hash,
        $target = $(target);
        $('html, body').stop().animate({
        'scrollTop': $target.offset().top
        }, 500, 'swing', function () {
        window.location.hash = target;
        });
        });

Он работает, все отлично, все прекрасно.
Но как сделать так, чтобы при нажатии осуществилась прокрутка к якорю, но чтобы до якоря не "доставало" 50рх например?
Есть пример рабочего кода, как добавлять значения к прокрутке, но мне наоборот нужно немного уменьшить. Плюс на минус я поменять смогу, но вот отредактировать первый код - врятли.
        $(".scroll_down_1").click(function() {
            $('body').animate({ scrollTop: '+=' + 55 }, 'fast');
        });

Это из-за того, что в Bootstrap navbar с фиксированным позиционированием и когда производится прокрутка к якорю сам якорь не виден, он закрывается navbar'ом. В Google MDL более продумано сделали. Они сделали header вне прокрутки основного контента и если даже кликнуть по якорю он никогда не будет закрыт header'ом.
Надеюсь на понимание. Буду очень благодарен за помощь.

A: $('a[href^="#"]').bind('click.smoothscroll',function (e) {
  e.preventDefault();
  var target = this.hash,
  $target = $(target);
  $('html, body').stop().animate({
    'scrollTop': $target.offset().top - 50
  }, 500, 'swing', function () {
    window.location.hash = target;
  });
});

A: Если якорь на input можно сделать так, тогда фокус будет на вашем input и поднимет выше инпута.

$('a.клас[href^="#якорь"]').bind('click.smoothscroll', function() {
  var target = this.hash,
    $target = $(target);
  $('html, body').stop().animate({
    'scrollTop': $target.offset().top - 350 // высота на которую нужно поднять выше
  }, 500, 'swing', function() {
    window.location.hash = target;
  });
});

redpajama_set_name: RedPajamaStackExchange


text:
Q: How to get all fingerprints for .ssh/authorized_keys(2) file Is there a simple way to get a list of all fingerprints entered in the .ssh/authorized_keys || .ssh/authorized_keys2 file?
ssh-keygen -l -f .ssh/authorized_keys

will only return fingerprint of first line / entry / publickey
hack with awk:
awk 'BEGIN {
    while (getline < ".ssh/authorized_keys") {
        if ($1!~"ssh-(r|d)sa") {continue}
        print "Fingerprint for "$3
        system("echo " "\""$0"\"> /tmp/authorizedPublicKey.scan; \
            ssh-keygen -l -f /tmp/authorizedPublicKey.scan; \
            rm /tmp/authorizedPublicKey.scan"
        )
    }
}'

but is there an easier way or ssh command I didn't find?

A: Here's a portable way to show all key fingerprints for a given file, tested on Mac and Linux:
#!/bin/bash

fingerprint_keys()
{
    if (( $# != 1 )); then
        echo "Usage: ${FUNCNAME} <authorized keys file>" >&2
        return 1
    fi

    local file="$1"
    if [ ! -r "$file" ]; then
        echo "${FUNCNAME}: File '${file}' does not exist or isn't readable." >&2
        return 1
    fi

    # Must be declared /before/ assignment, because of bash weirdness, in
    # order to get exit code in $?.
    local TMPFILE

    TEMPFILE=$(mktemp -q -t "$0.XXXXXXXXXX")
    if (( $? != 0 )); then
        echo "${FUNCNAME}: Can't create temporary file." >&2
        return 1
    fi

    while read line; do
        # Make sure lone isn't a comment or blank.
        if [[ -n "$line" ]] && [ "${line###}" == "$line" ]; then
            # Insert key into temporary file (ignoring noclobber).
            echo "$line" >| "$TEMPFILE"

            # Fingerprint time.
            ssh-keygen -l -f "$TEMPFILE"

            # OVerwrite the file ASAP (ignoring noclobber) to not leave keys
            # sitting in temp files.
            >| "$TEMPFILE"
        fi
    done < "$file"

    rm -f "$TEMPFILE"
    if (( $? != 0 )); then
        echo "${FUNCNAME}: Failed to remove temporary file." >&2
        return 1
    fi
}

Example Usage:
bash $ fingerprint_keys ~/.ssh/authorized_keys
2048 xx:xx:xx:xx:xx:xx:xx:xx:bb:xx:xx:xx:xx:xx:xx:xx  x@x.local (RSA)
bash $

A: Here's another hack using plain bash without temporary files:
while read l; do
  [[ -n $l && ${l###} = $l ]] && ssh-keygen -l -f /dev/stdin <<<$l;
done < .ssh/authorized_keys

You can easily make it a function in your .bashrc:
function fingerprints() {
  local file="${1:-$HOME/.ssh/authorized_keys}"
  while read l; do
    [[ -n $l && ${l###} = $l ]] && ssh-keygen -l -f /dev/stdin <<<$l
  done < "${file}"
}

and call it with:
$ fingerprints .ssh/authorized_keys

A: ssh-keygen -l -f - <authorized_keys

produces a nice listing for you:
# ssh-keygen -l -f - <authorized_keys
2048 SHA256:GzZ7.................................RqTEag foo (RSA)
2048 SHA256:/y0.......................................4 bar (RSA)
2048 SHA256:p.........................................k bleech (RSA)

A: A one-liner based on the /dev/stdin trick from ℝaphink's answer and man xargs → EXAMPLES:
egrep '^[^#]' ~/.ssh/authorized_keys | xargs -n1 -I% bash -c 'ssh-keygen -l -f /dev/stdin <<<"%"'

A: And should anyone need to do it on Windows / in PowerShell:
gc authorized_keys | foreach {$_ |ssh-keygen -l -f -}

or the fully-blown version without aliases looking for your user profile directory:
(Get-Content ((Get-Content env:/userprofile)+"/.ssh/authorized_keys")) | foreach {$_ |ssh-keygen -l -f -}

A: If and when reading from /dev/stdin it's an issue you may want to use process redirection without temporary files:
while read -r l; do
  [[ -n "$l" && ${l###} = "$l" ]] && ssh-keygen -l -f <(echo "$l");
done < .ssh/authorized_keys

A: This is a version of ℝaphink's answer that will work on all sh-compatible shells.
fingerprints() {
    _fingerprints_file="${1:-$HOME/.ssh/authorized_keys}"
    while read -r l; do
        [ -n "$l" ] && [ "${l###}" = "$l" ] && printf '%s\n' "$l" | ssh-keygen -l -f /dev/stdin
    done < "${_fingerprints_file}"
    unset _fingerprints_file
}


text:
Q: How to access my computer's locale settings in the wpf app I have a WPF(Windows) App for which I need to get the locale of the user or the system where application is running. I have changed the locale of my system to French as shown in the image and in the code I call "CultureInfo.CurrentCulture.Name", which is returning en-US always even though I change the locale of the system. Am I missing something here? Or is this not the right API to be used?

A: To solve your problem you need to use Windows Sensor API
https://code.msdn.microsoft.com/windowsapps/Windows-7-Geolocation-API-25585fac


text:
Q: Как отключить heading для всех запросов firebird Есть запрос на firebird с конкатенацией и использованием вложенных select и list(), это все пишется потом в файл. Вначале стоит команда SET HEADING OFF;
SET HEADING OFF;
SELECT DISTINCT '"' || REPLACE(TRIM(COALESCE(x.column, '')), '"', '""')
|| '"; "' || REPLACE(TRIM(COALESCE(x.column2, '')), '"', '""')
|| '"; "' || REPLACE(TRIM(COALESCE(list(DISTINCT x.column3, ','), '')), '"', '""')
|| '";'
FROM (
     SELECT ycolumn AS column, ycolumn1 AS column1, ycolumn2 AS column2, list(DISTINCT ycolumn3, ',') AS column3
FROM (
     SELECT d.column AS ycolumn, c.column1 AS ycolumn1, dc.column2 AS ycolumn2, ws.column3 AS ycolumn3
     FROM ...
     )y
     GROUP BY ycolumn, ycolumn1, ycolumn2
) x
GROUP BY x.column, x.column1, x.column3
;

Проблема в том, что не отключаются заголовки для вложенных SELECT и получается на выходе в файле такое:
==============================================================================
            0:218
==============================================================================
CONCATENATION:
"field"; "field1"; "field2"; "field3";

Подскажите, возможно ли отключить заголовки для такого запроса? Или придется вручную убирать?


text:
Q: How to exclude a js file from a view- asp.net mvc I'm developing an asp.net mvc application in which I use a _Layout file to contain all references of js files and css file. But I have only one view which I need to exclude a js file from it's references. What I can do is I dont put this file on _Layout and manually put it on all views except the view mentioned above. But I think it's too cumbersome. Is there any better approach to solve this issue?

A: You should include the necessary (page specific) js files in each view which needs them. You should include all common js (Ex :jQuery,bootstrap etc ) files in Layout.
When you include page specific js files in views, make sure you do that in the scripts section
@section Scripts
{
  <script src="~/js/pageSepcificScript.js"></script>
}

Assuming you have a section called Scripts definied in your layout
@RenderSection("Scripts", required: false)


text:
Q: Bolding Numbers in Data Frame I have the following dataset (a sample of a large dataset)

          VARIABLES         1         2         3         4
            DEGREE
       EIGENVECTOR  0.80***
       BETWEENNESS  0.75***   0.64***
         CLOSENESS  0.88***   0.90***   0.75***
 OVERALLCENTRALITY  0.64***   0.55***   0.62***   0.64***

I want to BOLD the numbers in the data frame that has asterisk and get rid of asterisk from the BOLDED numbers.
In this dataset all numbers have asterisk(*), but in main dataset, some numbers have one asterisk, or two asterisks, or three asterisks, or no asterisk. I want to BOLD those numbers if they have at least one asterisk - meaning that I do not want to bold those numbers that do not have any asterisk.
My ultimate purpose is to use this dataset in stargazer function to product a latex output in pdf.
full data here-
dput(df)

structure(list(VARIABLES = c("DEGREE", "EIGENVECTOR", "BETWEENNESS",
"CLOSENESS", "OVERALLCENTRALITY", "LNASSETS", "LEVERAGE", "INVREC",
"LOSS", "ROA", "ZSCORE", "MERGER", "MTB", "FOREIGN", "EXTRAORDINARY",
"SEGMENT", "SPECIALIZED", "RESTATEMENT", "BIGN", "GOINGCONCERN",
"CALENDARYEAR", "LNNONAUDFEES", "LNAUDFEES", "AUDTURNOVER", "RESTRUCTURE",
"LITIGATE", "AGE", "AUDITLAG", "UNQUALIFIED", "MATERIALWEAKNESS",
"AUDITORTENURE", "LOGEAL", "FILINGLAG", "OPERATINGCFO"), `1` = structure(c(DEGREE = 1L,
EIGENVECTOR = 31L, BETWEENNESS = 30L, CLOSENESS = 32L, OVERALLCENTRALITY = 29L,
LNASSETS = 28L, LEVERAGE = 23L, INVREC = 9L, LOSS = 7L, ROA = 17L,
ZSCORE = 16L, MERGER = 18L, MTB = 14L, FOREIGN = 21L, EXTRAORDINARY = 13L,
SEGMENT = 22L, SPECIALIZED = 20L, RESTATEMENT = 4L, BIGN = 26L,
GOINGCONCERN = 6L, CALENDARYEAR = 15L, LNNONAUDFEES = 25L, LNAUDFEES = 27L,
AUDTURNOVER = 8L, RESTRUCTURE = 2L, LITIGATE = 5L, AGE = 19L,
AUDITLAG = 11L, UNQUALIFIED = 3L, MATERIALWEAKNESS = 5L, AUDITORTENURE = 24L,
LOGEAL = 12L, FILINGLAG = 10L, OPERATINGCFO = 17L), .Label = c("",
"-0.01    ", "-0.03*** ", "-0.04*** ", "-0.06*** ", "-0.09*** ",
"-0.11*** ", "-0.12*** ", "-0.17*** ", "-0.22*** ", "-0.30*** ",
"-0.33*** ", " 0.02*** ", " 0.04*** ", " 0.05*** ", " 0.10*** ",
" 0.11*** ", " 0.12*** ", " 0.15*** ", " 0.16*** ", " 0.17*** ",
" 0.18*** ", " 0.20*** ", " 0.23*** ", " 0.36*** ", " 0.37*** ",
" 0.48*** ", " 0.50*** ", " 0.64*** ", " 0.75*** ", " 0.80*** ",
" 0.88*** "), class = "factor"), `2` = structure(c(DEGREE = 1L,
EIGENVECTOR = 1L, BETWEENNESS = 29L, CLOSENESS = 30L, OVERALLCENTRALITY = 28L,
LNASSETS = 27L, LEVERAGE = 22L, INVREC = 9L, LOSS = 6L, ROA = 16L,
ZSCORE = 19L, MERGER = 17L, MTB = 14L, FOREIGN = 18L, EXTRAORDINARY = 13L,
SEGMENT = 20L, SPECIALIZED = 21L, RESTATEMENT = 4L, BIGN = 25L,
GOINGCONCERN = 5L, CALENDARYEAR = 15L, LNNONAUDFEES = 24L, LNAUDFEES = 26L,
AUDTURNOVER = 8L, RESTRUCTURE = 2L, LITIGATE = 7L, AGE = 18L,
AUDITLAG = 12L, UNQUALIFIED = 3L, MATERIALWEAKNESS = 4L, AUDITORTENURE = 23L,
LOGEAL = 11L, FILINGLAG = 10L, OPERATINGCFO = 16L), .Label = c("",
"-0.01    ", "-0.02*** ", "-0.05*** ", "-0.06*** ", "-0.08*** ",
"-0.09*** ", "-0.11*** ", "-0.17*** ", "-0.19*** ", "-0.27*** ",
"-0.28*** ", " 0.01*   ", " 0.02*** ", " 0.04*** ", " 0.06*** ",
" 0.08*** ", " 0.12*** ", " 0.14*** ", " 0.15*** ", " 0.16*** ",
" 0.20*** ", " 0.22*** ", " 0.30*** ", " 0.33*** ", " 0.42*** ",
" 0.43*** ", " 0.55*** ", " 0.64*** ", " 0.90*** "), class = "factor"),
    `3` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L, BETWEENNESS = 1L,
    CLOSENESS = 24L, OVERALLCENTRALITY = 23L, LNASSETS = 21L,
    LEVERAGE = 17L, INVREC = 7L, LOSS = 3L, ROA = 11L, ZSCORE = 15L,
    MERGER = 14L, MTB = 12L, FOREIGN = 16L, EXTRAORDINARY = 10L,
    SEGMENT = 16L, SPECIALIZED = 14L, RESTATEMENT = 3L, BIGN = 19L,
    GOINGCONCERN = 4L, CALENDARYEAR = 13L, LNNONAUDFEES = 20L,
    LNAUDFEES = 22L, AUDTURNOVER = 5L, RESTRUCTURE = 9L, LITIGATE = 3L,
    AGE = 14L, AUDITLAG = 8L, UNQUALIFIED = 2L, MATERIALWEAKNESS = 2L,
    AUDITORTENURE = 18L, LOGEAL = 8L, FILINGLAG = 6L, OPERATINGCFO = 11L
    ), .Label = c("", "-0.02*** ", "-0.03*** ", "-0.04*** ",
    "-0.08*** ", "-0.16*** ", "-0.17*** ", "-0.22*** ", " 0.00    ",
    " 0.01    ", " 0.02**  ", " 0.03*** ", " 0.05*** ", " 0.10*** ",
    " 0.13*** ", " 0.15*** ", " 0.19*** ", " 0.20*** ", " 0.28*** ",
    " 0.30*** ", " 0.37*** ", " 0.38*** ", " 0.62*** ", " 0.75*** "
    ), class = "factor"), `4` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L,
    BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 25L,
    LNASSETS = 23L, LEVERAGE = 19L, INVREC = 8L, LOSS = 6L, ROA = 12L,
    ZSCORE = 15L, MERGER = 14L, MTB = 13L, FOREIGN = 18L, EXTRAORDINARY = 11L,
    SEGMENT = 18L, SPECIALIZED = 17L, RESTATEMENT = 4L, BIGN = 22L,
    GOINGCONCERN = 5L, CALENDARYEAR = 13L, LNNONAUDFEES = 21L,
    LNAUDFEES = 24L, AUDTURNOVER = 7L, RESTRUCTURE = 2L, LITIGATE = 4L,
    AGE = 16L, AUDITLAG = 10L, UNQUALIFIED = 3L, MATERIALWEAKNESS = 5L,
    AUDITORTENURE = 20L, LOGEAL = 10L, FILINGLAG = 9L, OPERATINGCFO = 12L
    ), .Label = c("", "-0.01    ", "-0.01**  ", "-0.05*** ",
    "-0.06*** ", "-0.07*** ", "-0.12*** ", "-0.19*** ", "-0.23*** ",
    "-0.32*** ", " 0.01    ", " 0.05*** ", " 0.06*** ", " 0.11*** ",
    " 0.13*** ", " 0.15*** ", " 0.17*** ", " 0.19*** ", " 0.21*** ",
    " 0.27*** ", " 0.36*** ", " 0.37*** ", " 0.48*** ", " 0.49*** ",
    " 0.64*** "), class = "factor"), `5` = structure(c(DEGREE = 1L,
    EIGENVECTOR = 1L, BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 26L, LEVERAGE = 22L, INVREC = 9L, LOSS = 3L, ROA = 13L,
    ZSCORE = 19L, MERGER = 18L, MTB = 16L, FOREIGN = 23L, EXTRAORDINARY = 6L,
    SEGMENT = 20L, SPECIALIZED = 17L, RESTATEMENT = 7L, BIGN = 24L,
    GOINGCONCERN = 5L, CALENDARYEAR = 15L, LNNONAUDFEES = 25L,
    LNAUDFEES = 27L, AUDTURNOVER = 8L, RESTRUCTURE = 2L, LITIGATE = 3L,
    AGE = 21L, AUDITLAG = 12L, UNQUALIFIED = 22L, MATERIALWEAKNESS = 4L,
    AUDITORTENURE = 28L, LOGEAL = 10L, FILINGLAG = 11L, OPERATINGCFO = 14L
    ), .Label = c("", "-0.01    ", "-0.02*** ", "-0.03*** ",
    "-0.04*** ", "-0.05*** ", "-0.06*** ", "-0.10*** ", "-0.15*** ",
    "-0.20*** ", "-0.24*** ", "-0.33*** ", " 0.02**  ", " 0.02*** ",
    " 0.05*** ", " 0.06*** ", " 0.07*** ", " 0.09*** ", " 0.12*** ",
    " 0.13*** ", " 0.16*** ", " 0.18*** ", " 0.19*** ", " 0.20*** ",
    " 0.27*** ", " 0.39*** ", " 0.40*** ", " 0.42*** "), class = "factor"),
    `6` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L, BETWEENNESS = 1L,
    CLOSENESS = 1L, OVERALLCENTRALITY = 1L, LNASSETS = 1L, LEVERAGE = 23L,
    INVREC = 7L, LOSS = 11L, ROA = 23L, ZSCORE = 17L, MERGER = 18L,
    MTB = 3L, FOREIGN = 19L, EXTRAORDINARY = 15L, SEGMENT = 22L,
    SPECIALIZED = 20L, RESTATEMENT = 4L, BIGN = 25L, GOINGCONCERN = 9L,
    CALENDARYEAR = 16L, LNNONAUDFEES = 26L, LNAUDFEES = 27L,
    AUDTURNOVER = 8L, RESTRUCTURE = 2L, LITIGATE = 10L, AGE = 21L,
    AUDITLAG = 13L, UNQUALIFIED = 5L, MATERIALWEAKNESS = 6L,
    AUDITORTENURE = 24L, LOGEAL = 14L, FILINGLAG = 12L, OPERATINGCFO = 22L
    ), .Label = c("", "-0.01    ", "-0.02*** ", "-0.04*** ",
    "-0.06*** ", "-0.07*** ", "-0.11*** ", "-0.17*** ", "-0.20*** ",
    "-0.22*** ", "-0.33*** ", "-0.35*** ", "-0.48*** ", "-0.54*** ",
    " 0.06*** ", " 0.12*** ", " 0.16*** ", " 0.22*** ", " 0.23*** ",
    " 0.24*** ", " 0.30*** ", " 0.34*** ", " 0.35*** ", " 0.37*** ",
    " 0.55*** ", " 0.63*** ", " 0.84*** "), class = "factor"),
    `7` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L, BETWEENNESS = 1L,
    CLOSENESS = 1L, OVERALLCENTRALITY = 1L, LNASSETS = 1L, LEVERAGE = 1L,
    INVREC = 11L, LOSS = 14L, ROA = 10L, ZSCORE = 22L, MERGER = 12L,
    MTB = 4L, FOREIGN = 3L, EXTRAORDINARY = 13L, SEGMENT = 15L,
    SPECIALIZED = 16L, RESTATEMENT = 2L, BIGN = 19L, GOINGCONCERN = 19L,
    CALENDARYEAR = 18L, LNNONAUDFEES = 20L, LNAUDFEES = 21L,
    AUDTURNOVER = 5L, RESTRUCTURE = 11L, LITIGATE = 9L, AGE = 15L,
    AUDITLAG = 7L, UNQUALIFIED = 7L, MATERIALWEAKNESS = 12L,
    AUDITORTENURE = 17L, LOGEAL = 6L, FILINGLAG = 5L, OPERATINGCFO = 8L
    ), .Label = c("", "-0.01    ", "-0.01*   ", "-0.04*** ",
    "-0.05*** ", "-0.06*** ", "-0.09*** ", "-0.10*** ", "-0.13*** ",
    "-0.15*** ", " 0.00    ", " 0.02*** ", " 0.04*** ", " 0.05*** ",
    " 0.07*** ", " 0.09*** ", " 0.10*** ", " 0.14*** ", " 0.18*** ",
    " 0.24*** ", " 0.34*** ", " 0.49*** "), class = "factor"),
    `8` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L, BETWEENNESS = 1L,
    CLOSENESS = 1L, OVERALLCENTRALITY = 1L, LNASSETS = 1L, LEVERAGE = 1L,
    INVREC = 1L, LOSS = 9L, ROA = 23L, ZSCORE = 12L, MERGER = 17L,
    MTB = 7L, FOREIGN = 21L, EXTRAORDINARY = 2L, SEGMENT = 22L,
    SPECIALIZED = 4L, RESTATEMENT = 13L, BIGN = 10L, GOINGCONCERN = 6L,
    CALENDARYEAR = 11L, LNNONAUDFEES = 5L, LNAUDFEES = 6L, AUDTURNOVER = 16L,
    RESTRUCTURE = 3L, LITIGATE = 6L, AGE = 20L, AUDITLAG = 19L,
    UNQUALIFIED = 15L, MATERIALWEAKNESS = 17L, AUDITORTENURE = 8L,
    LOGEAL = 14L, FILINGLAG = 18L, OPERATINGCFO = 19L), .Label = c("",
    "-0.01    ", "-0.01*   ", "-0.02**  ", "-0.03*** ", "-0.04*** ",
    "-0.05*** ", "-0.06*** ", "-0.09*** ", "-0.11*** ", "-0.16*** ",
    "-0.28*** ", " 0.00    ", " 0.02**  ", " 0.02*** ", " 0.04*** ",
    " 0.05*** ", " 0.06*** ", " 0.09*** ", " 0.10*** ", " 0.12*** ",
    " 0.13*** ", " 0.15*** "), class = "factor"), `9` = structure(c(DEGREE = 1L,
    EIGENVECTOR = 1L, BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 12L,
    ZSCORE = 21L, MERGER = 7L, MTB = 13L, FOREIGN = 4L, EXTRAORDINARY = 2L,
    SEGMENT = 7L, SPECIALIZED = 5L, RESTATEMENT = 13L, BIGN = 8L,
    GOINGCONCERN = 19L, CALENDARYEAR = 14L, LNNONAUDFEES = 10L,
    LNAUDFEES = 9L, AUDTURNOVER = 15L, RESTRUCTURE = 3L, LITIGATE = 17L,
    AGE = 10L, AUDITLAG = 20L, UNQUALIFIED = 3L, MATERIALWEAKNESS = 16L,
    AUDITORTENURE = 6L, LOGEAL = 22L, FILINGLAG = 18L, OPERATINGCFO = 11L
    ), .Label = c("", "-0.01*   ", "-0.04*** ", "-0.07*** ",
    "-0.08*** ", "-0.12*** ", "-0.14*** ", "-0.17*** ", "-0.20*** ",
    "-0.21*** ", "-0.48*** ", "-0.63*** ", " 0.00    ", " 0.04*** ",
    " 0.05*** ", " 0.10*** ", " 0.18*** ", " 0.19*** ", " 0.21*** ",
    " 0.23*** ", " 0.27*** ", " 0.31*** "), class = "factor"),
    `10` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L, BETWEENNESS = 1L,
    CLOSENESS = 1L, OVERALLCENTRALITY = 1L, LNASSETS = 1L, LEVERAGE = 1L,
    INVREC = 1L, LOSS = 1L, ROA = 1L, ZSCORE = 9L, MERGER = 18L,
    MTB = 11L, FOREIGN = 17L, EXTRAORDINARY = 12L, SEGMENT = 20L,
    SPECIALIZED = 15L, RESTATEMENT = 2L, BIGN = 19L, GOINGCONCERN = 10L,
    CALENDARYEAR = 3L, LNNONAUDFEES = 21L, LNAUDFEES = 22L, AUDTURNOVER = 3L,
    RESTRUCTURE = 13L, LITIGATE = 6L, AGE = 20L, AUDITLAG = 7L,
    UNQUALIFIED = 14L, MATERIALWEAKNESS = 4L, AUDITORTENURE = 16L,
    LOGEAL = 8L, FILINGLAG = 5L, OPERATINGCFO = 23L), .Label = c("",
    "-0.01    ", "-0.06*** ", "-0.07*** ", "-0.18*** ", "-0.20*** ",
    "-0.23*** ", "-0.32*** ", "-0.36*** ", "-0.41*** ", " 0.00    ",
    " 0.02**  ", " 0.06*** ", " 0.07*** ", " 0.08*** ", " 0.12*** ",
    " 0.14*** ", " 0.16*** ", " 0.17*** ", " 0.20*** ", " 0.21*** ",
    " 0.23*** ", " 0.83*** "), class = "factor"), `11` = structure(c(DEGREE = 1L,
    EIGENVECTOR = 1L, BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 8L, MTB = 9L, FOREIGN = 10L, EXTRAORDINARY = 14L,
    SEGMENT = 6L, SPECIALIZED = 3L, RESTATEMENT = 13L, BIGN = 2L,
    GOINGCONCERN = 18L, CALENDARYEAR = 20L, LNNONAUDFEES = 15L,
    LNAUDFEES = 17L, AUDTURNOVER = 12L, RESTRUCTURE = 12L, LITIGATE = 9L,
    AGE = 7L, AUDITLAG = 17L, UNQUALIFIED = 5L, MATERIALWEAKNESS = 15L,
    AUDITORTENURE = 4L, LOGEAL = 19L, FILINGLAG = 16L, OPERATINGCFO = 11L
    ), .Label = c("", "-0.01    ", "-0.02*** ", "-0.03*** ",
    "-0.06*** ", "-0.09*** ", "-0.10*** ", "-0.14*** ", "-0.15*** ",
    "-0.23*** ", "-0.32*** ", " 0.00    ", " 0.01    ", " 0.02*** ",
    " 0.04*** ", " 0.05*** ", " 0.07*** ", " 0.15*** ", " 0.16*** ",
    " 0.19*** "), class = "factor"), `12` = structure(c(DEGREE = 1L,
    EIGENVECTOR = 1L, BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 1L, MTB = 9L, FOREIGN = 17L, EXTRAORDINARY = 8L,
    SEGMENT = 16L, SPECIALIZED = 10L, RESTATEMENT = 2L, BIGN = 13L,
    GOINGCONCERN = 5L, CALENDARYEAR = 4L, LNNONAUDFEES = 15L,
    LNAUDFEES = 18L, AUDTURNOVER = 4L, RESTRUCTURE = 2L, LITIGATE = 4L,
    AGE = 11L, AUDITLAG = 6L, UNQUALIFIED = 3L, MATERIALWEAKNESS = 3L,
    AUDITORTENURE = 12L, LOGEAL = 7L, FILINGLAG = 5L, OPERATINGCFO = 14L
    ), .Label = c("", "-0.01    ", "-0.03*** ", "-0.05*** ",
    "-0.08*** ", "-0.12*** ", "-0.14*** ", " 0.01*   ", " 0.02**  ",
    " 0.07*** ", " 0.08*** ", " 0.09*** ", " 0.15*** ", " 0.16*** ",
    " 0.24*** ", " 0.27*** ", " 0.28*** ", " 0.30*** "), class = "factor"),
    `13` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L, BETWEENNESS = 1L,
    CLOSENESS = 1L, OVERALLCENTRALITY = 1L, LNASSETS = 1L, LEVERAGE = 1L,
    INVREC = 1L, LOSS = 1L, ROA = 1L, ZSCORE = 1L, MERGER = 1L,
    MTB = 1L, FOREIGN = 13L, EXTRAORDINARY = 2L, SEGMENT = 5L,
    SPECIALIZED = 10L, RESTATEMENT = 2L, BIGN = 12L, GOINGCONCERN = 3L,
    CALENDARYEAR = 11L, LNNONAUDFEES = 11L, LNAUDFEES = 10L,
    AUDTURNOVER = 4L, RESTRUCTURE = 2L, LITIGATE = 14L, AGE = 5L,
    AUDITLAG = 7L, UNQUALIFIED = 10L, MATERIALWEAKNESS = 4L,
    AUDITORTENURE = 12L, LOGEAL = 8L, FILINGLAG = 6L, OPERATINGCFO = 9L
    ), .Label = c("", "-0.01    ", "-0.02**  ", "-0.02*** ",
    "-0.04*** ", "-0.06*** ", "-0.08*** ", "-0.10*** ", " 0.01    ",
    " 0.02*** ", " 0.03*** ", " 0.04*** ", " 0.06*** ", " 0.12*** "
    ), class = "factor"), `14` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L,
    BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 1L, MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 2L,
    SEGMENT = 17L, SPECIALIZED = 11L, RESTATEMENT = 4L, BIGN = 14L,
    GOINGCONCERN = 5L, CALENDARYEAR = 4L, LNNONAUDFEES = 15L,
    LNAUDFEES = 16L, AUDTURNOVER = 5L, RESTRUCTURE = 3L, LITIGATE = 10L,
    AGE = 12L, AUDITLAG = 7L, UNQUALIFIED = 2L, MATERIALWEAKNESS = 9L,
    AUDITORTENURE = 13L, LOGEAL = 8L, FILINGLAG = 6L, OPERATINGCFO = 12L
    ), .Label = c("", "-0.01    ", "-0.03*** ", "-0.04*** ",
    "-0.07*** ", "-0.12*** ", "-0.19*** ", "-0.23*** ", " 0.01*   ",
    " 0.06*** ", " 0.10*** ", " 0.15*** ", " 0.18*** ", " 0.22*** ",
    " 0.31*** ", " 0.43*** ", " 0.49*** "), class = "factor"),
    `15` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L, BETWEENNESS = 1L,
    CLOSENESS = 1L, OVERALLCENTRALITY = 1L, LNASSETS = 1L, LEVERAGE = 1L,
    INVREC = 1L, LOSS = 1L, ROA = 1L, ZSCORE = 1L, MERGER = 1L,
    MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L, SEGMENT = 11L,
    SPECIALIZED = 11L, RESTATEMENT = 7L, BIGN = 12L, GOINGCONCERN = 7L,
    CALENDARYEAR = 10L, LNNONAUDFEES = 13L, LNAUDFEES = 14L,
    AUDTURNOVER = 2L, RESTRUCTURE = 7L, LITIGATE = 4L, AGE = 10L,
    AUDITLAG = 11L, UNQUALIFIED = 6L, MATERIALWEAKNESS = 10L,
    AUDITORTENURE = 5L, LOGEAL = 3L, FILINGLAG = 8L, OPERATINGCFO = 9L
    ), .Label = c("", "-0.01    ", "-0.02**  ", "-0.02*** ",
    "-0.05*** ", "-0.11*** ", " 0.00    ", " 0.01*   ", " 0.02**  ",
    " 0.02*** ", " 0.03*** ", " 0.04*** ", " 0.05*** ", " 0.06*** "
    ), class = "factor"), `16` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L,
    BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 1L, MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L,
    SEGMENT = 1L, SPECIALIZED = 11L, RESTATEMENT = 2L, BIGN = 13L,
    GOINGCONCERN = 6L, CALENDARYEAR = 4L, LNNONAUDFEES = 15L,
    LNAUDFEES = 16L, AUDTURNOVER = 5L, RESTRUCTURE = 3L, LITIGATE = 8L,
    AGE = 14L, AUDITLAG = 8L, UNQUALIFIED = 5L, MATERIALWEAKNESS = 10L,
    AUDITORTENURE = 12L, LOGEAL = 9L, FILINGLAG = 7L, OPERATINGCFO = 12L
    ), .Label = c("", "-0.01    ", "-0.01**  ", "-0.02**  ",
    "-0.07*** ", "-0.09*** ", "-0.11*** ", "-0.15*** ", "-0.21*** ",
    " 0.01    ", " 0.13*** ", " 0.19*** ", " 0.20*** ", " 0.35*** ",
    " 0.37*** ", " 0.46*** "), class = "factor"), `17` = structure(c(DEGREE = 1L,
    EIGENVECTOR = 1L, BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 1L, MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L,
    SEGMENT = 1L, SPECIALIZED = 1L, RESTATEMENT = 3L, BIGN = 17L,
    GOINGCONCERN = 5L, CALENDARYEAR = 11L, LNNONAUDFEES = 15L,
    LNAUDFEES = 16L, AUDTURNOVER = 7L, RESTRUCTURE = 2L, LITIGATE = 6L,
    AGE = 13L, AUDITLAG = 9L, UNQUALIFIED = 6L, MATERIALWEAKNESS = 4L,
    AUDITORTENURE = 14L, LOGEAL = 10L, FILINGLAG = 8L, OPERATINGCFO = 12L
    ), .Label = c("", "-0.01*   ", "-0.02**  ", "-0.03*** ",
    "-0.04*** ", "-0.05*** ", "-0.08*** ", "-0.09*** ", "-0.13*** ",
    "-0.15*** ", " 0.05*** ", " 0.07*** ", " 0.09*** ", " 0.13*** ",
    " 0.19*** ", " 0.27*** ", " 0.30*** "), class = "factor"),
    `18` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L, BETWEENNESS = 1L,
    CLOSENESS = 1L, OVERALLCENTRALITY = 1L, LNASSETS = 1L, LEVERAGE = 1L,
    INVREC = 1L, LOSS = 1L, ROA = 1L, ZSCORE = 1L, MERGER = 1L,
    MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L, SEGMENT = 1L,
    SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 5L, GOINGCONCERN = 2L,
    CALENDARYEAR = 9L, LNNONAUDFEES = 7L, LNAUDFEES = 7L, AUDTURNOVER = 11L,
    RESTRUCTURE = 10L, LITIGATE = 6L, AGE = 3L, AUDITLAG = 13L,
    UNQUALIFIED = 4L, MATERIALWEAKNESS = 11L, AUDITORTENURE = 8L,
    LOGEAL = 12L, FILINGLAG = 12L, OPERATINGCFO = 3L), .Label = c("",
    "-0.01    ", "-0.01*   ", "-0.01**  ", "-0.02*** ", "-0.03*** ",
    "-0.04*** ", "-0.05*** ", " 0.00    ", " 0.01    ", " 0.03*** ",
    " 0.05*** ", " 0.06*** "), class = "factor"), `19` = structure(c(DEGREE = 1L,
    EIGENVECTOR = 1L, BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 1L, MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L,
    SEGMENT = 1L, SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 1L,
    GOINGCONCERN = 6L, CALENDARYEAR = 12L, LNNONAUDFEES = 15L,
    LNAUDFEES = 16L, AUDTURNOVER = 8L, RESTRUCTURE = 2L, LITIGATE = 3L,
    AGE = 11L, AUDITLAG = 9L, UNQUALIFIED = 4L, MATERIALWEAKNESS = 5L,
    AUDITORTENURE = 14L, LOGEAL = 10L, FILINGLAG = 7L, OPERATINGCFO = 13L
    ), .Label = c("", "-0.02**  ", "-0.04*** ", "-0.08*** ",
    "-0.09*** ", "-0.12*** ", "-0.24*** ", "-0.25*** ", "-0.34*** ",
    "-0.41*** ", " 0.09*** ", " 0.10*** ", " 0.18*** ", " 0.38*** ",
    " 0.40*** ", " 0.59*** "), class = "factor"), `20` = structure(c(DEGREE = 1L,
    EIGENVECTOR = 1L, BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 1L, MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L,
    SEGMENT = 1L, SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 1L,
    GOINGCONCERN = 1L, CALENDARYEAR = 8L, LNNONAUDFEES = 4L,
    LNAUDFEES = 5L, AUDTURNOVER = 10L, RESTRUCTURE = 9L, LITIGATE = 12L,
    AGE = 3L, AUDITLAG = 14L, UNQUALIFIED = 6L, MATERIALWEAKNESS = 11L,
    AUDITORTENURE = 2L, LOGEAL = 15L, FILINGLAG = 13L, OPERATINGCFO = 7L
    ), .Label = c("", "-0.06*** ", "-0.07*** ", "-0.10*** ",
    "-0.13*** ", "-0.21*** ", "-0.38*** ", " 0.02*** ", " 0.03*** ",
    " 0.04*** ", " 0.06*** ", " 0.07*** ", " 0.12*** ", " 0.15*** ",
    " 0.16*** "), class = "factor"), `21` = structure(c(DEGREE = 1L,
    EIGENVECTOR = 1L, BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 1L, MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L,
    SEGMENT = 1L, SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 1L,
    GOINGCONCERN = 1L, CALENDARYEAR = 1L, LNNONAUDFEES = 9L,
    LNAUDFEES = 10L, AUDTURNOVER = 3L, RESTRUCTURE = 8L, LITIGATE = 6L,
    AGE = 7L, AUDITLAG = 5L, UNQUALIFIED = 3L, MATERIALWEAKNESS = 3L,
    AUDITORTENURE = 9L, LOGEAL = 2L, FILINGLAG = 4L, OPERATINGCFO = 5L
    ), .Label = c("", "-0.01*   ", "-0.02*** ", "-0.03*** ",
    "-0.05*** ", "-0.07*** ", "-0.12*** ", " 0.01    ", " 0.04*** ",
    " 0.11*** "), class = "factor"), `22` = structure(c(DEGREE = 1L,
    EIGENVECTOR = 1L, BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 1L, MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L,
    SEGMENT = 1L, SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 1L,
    GOINGCONCERN = 1L, CALENDARYEAR = 1L, LNNONAUDFEES = 1L,
    LNAUDFEES = 13L, AUDTURNOVER = 6L, RESTRUCTURE = 2L, LITIGATE = 5L,
    AGE = 11L, AUDITLAG = 8L, UNQUALIFIED = 4L, MATERIALWEAKNESS = 3L,
    AUDITORTENURE = 12L, LOGEAL = 9L, FILINGLAG = 7L, OPERATINGCFO = 10L
    ), .Label = c("", "-0.01    ", "-0.04*** ", "-0.07*** ",
    "-0.11*** ", "-0.14*** ", "-0.20*** ", "-0.28*** ", "-0.36*** ",
    " 0.21*** ", " 0.23*** ", " 0.25*** ", " 0.66*** "), class = "factor"),
    `23` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L, BETWEENNESS = 1L,
    CLOSENESS = 1L, OVERALLCENTRALITY = 1L, LNASSETS = 1L, LEVERAGE = 1L,
    INVREC = 1L, LOSS = 1L, ROA = 1L, ZSCORE = 1L, MERGER = 1L,
    MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L, SEGMENT = 1L,
    SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 1L, GOINGCONCERN = 1L,
    CALENDARYEAR = 1L, LNNONAUDFEES = 1L, LNAUDFEES = 1L, AUDTURNOVER = 5L,
    RESTRUCTURE = 2L, LITIGATE = 4L, AGE = 11L, AUDITLAG = 7L,
    UNQUALIFIED = 3L, MATERIALWEAKNESS = 9L, AUDITORTENURE = 12L,
    LOGEAL = 8L, FILINGLAG = 6L, OPERATINGCFO = 10L), .Label = c("",
    "-0.02*** ", "-0.10*** ", "-0.12*** ", "-0.20*** ", "-0.27*** ",
    "-0.41*** ", "-0.46*** ", " 0.00    ", " 0.24*** ", " 0.27*** ",
    " 0.37*** "), class = "factor"), `24` = structure(c(DEGREE = 1L,
    EIGENVECTOR = 1L, BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 1L, MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L,
    SEGMENT = 1L, SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 1L,
    GOINGCONCERN = 1L, CALENDARYEAR = 1L, LNNONAUDFEES = 1L,
    LNAUDFEES = 1L, AUDTURNOVER = 1L, RESTRUCTURE = 5L, LITIGATE = 6L,
    AGE = 2L, AUDITLAG = 9L, UNQUALIFIED = 6L, MATERIALWEAKNESS = 7L,
    AUDITORTENURE = 4L, LOGEAL = 9L, FILINGLAG = 8L, OPERATINGCFO = 3L
    ), .Label = c("", "-0.04*** ", "-0.06*** ", "-0.33*** ",
    " 0.01    ", " 0.02*** ", " 0.08*** ", " 0.13*** ", " 0.16*** "
    ), class = "factor"), `25` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L,
    BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 1L, MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L,
    SEGMENT = 1L, SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 1L,
    GOINGCONCERN = 1L, CALENDARYEAR = 1L, LNNONAUDFEES = 1L,
    LNAUDFEES = 1L, AUDTURNOVER = 1L, RESTRUCTURE = 1L, LITIGATE = 4L,
    AGE = 4L, AUDITLAG = 4L, UNQUALIFIED = 3L, MATERIALWEAKNESS = 4L,
    AUDITORTENURE = 4L, LOGEAL = 5L, FILINGLAG = 4L, OPERATINGCFO = 2L
    ), .Label = c("", "-0.02**  ", "-0.02*** ", " 0.00    ",
    " 0.01*   "), class = "factor"), `26` = structure(c(DEGREE = 1L,
    EIGENVECTOR = 1L, BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 1L, MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L,
    SEGMENT = 1L, SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 1L,
    GOINGCONCERN = 1L, CALENDARYEAR = 1L, LNNONAUDFEES = 1L,
    LNAUDFEES = 1L, AUDTURNOVER = 1L, RESTRUCTURE = 1L, LITIGATE = 1L,
    AGE = 3L, AUDITLAG = 7L, UNQUALIFIED = 6L, MATERIALWEAKNESS = 6L,
    AUDITORTENURE = 2L, LOGEAL = 5L, FILINGLAG = 7L, OPERATINGCFO = 4L
    ), .Label = c("", "-0.05*** ", "-0.16*** ", "-0.18*** ",
    " 0.00    ", " 0.02**  ", " 0.06*** "), class = "factor"),
    `27` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L, BETWEENNESS = 1L,
    CLOSENESS = 1L, OVERALLCENTRALITY = 1L, LNASSETS = 1L, LEVERAGE = 1L,
    INVREC = 1L, LOSS = 1L, ROA = 1L, ZSCORE = 1L, MERGER = 1L,
    MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L, SEGMENT = 1L,
    SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 1L, GOINGCONCERN = 1L,
    CALENDARYEAR = 1L, LNNONAUDFEES = 1L, LNAUDFEES = 1L, AUDTURNOVER = 1L,
    RESTRUCTURE = 1L, LITIGATE = 1L, AGE = 1L, AUDITLAG = 4L,
    UNQUALIFIED = 6L, MATERIALWEAKNESS = 2L, AUDITORTENURE = 8L,
    LOGEAL = 5L, FILINGLAG = 3L, OPERATINGCFO = 7L), .Label = c("",
    "-0.04*** ", "-0.14*** ", "-0.18*** ", "-0.22*** ", " 0.00    ",
    " 0.18*** ", " 0.37*** "), class = "factor"), `28` = structure(c(DEGREE = 1L,
    EIGENVECTOR = 1L, BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 1L, MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L,
    SEGMENT = 1L, SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 1L,
    GOINGCONCERN = 1L, CALENDARYEAR = 1L, LNNONAUDFEES = 1L,
    LNAUDFEES = 1L, AUDTURNOVER = 1L, RESTRUCTURE = 1L, LITIGATE = 1L,
    AGE = 1L, AUDITLAG = 1L, UNQUALIFIED = 2L, MATERIALWEAKNESS = 5L,
    AUDITORTENURE = 4L, LOGEAL = 6L, FILINGLAG = 7L, OPERATINGCFO = 3L
    ), .Label = c("", "-0.08*** ", "-0.22*** ", "-0.33*** ",
    " 0.19*** ", " 0.60*** ", " 0.86*** "), class = "factor"),
    `29` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L, BETWEENNESS = 1L,
    CLOSENESS = 1L, OVERALLCENTRALITY = 1L, LNASSETS = 1L, LEVERAGE = 1L,
    INVREC = 1L, LOSS = 1L, ROA = 1L, ZSCORE = 1L, MERGER = 1L,
    MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L, SEGMENT = 1L,
    SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 1L, GOINGCONCERN = 1L,
    CALENDARYEAR = 1L, LNNONAUDFEES = 1L, LNAUDFEES = 1L, AUDTURNOVER = 1L,
    RESTRUCTURE = 1L, LITIGATE = 1L, AGE = 1L, AUDITLAG = 1L,
    UNQUALIFIED = 1L, MATERIALWEAKNESS = 2L, AUDITORTENURE = 6L,
    LOGEAL = 4L, FILINGLAG = 3L, OPERATINGCFO = 5L), .Label = c("",
    "-0.06*** ", "-0.08*** ", " 0.00    ", " 0.06*** ", " 0.13*** "
    ), class = "factor"), `30` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L,
    BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 1L, MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L,
    SEGMENT = 1L, SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 1L,
    GOINGCONCERN = 1L, CALENDARYEAR = 1L, LNNONAUDFEES = 1L,
    LNAUDFEES = 1L, AUDTURNOVER = 1L, RESTRUCTURE = 1L, LITIGATE = 1L,
    AGE = 1L, AUDITLAG = 1L, UNQUALIFIED = 1L, MATERIALWEAKNESS = 1L,
    AUDITORTENURE = 3L, LOGEAL = 4L, FILINGLAG = 5L, OPERATINGCFO = 2L
    ), .Label = c("", "-0.06*** ", "-0.08*** ", " 0.18*** ",
    " 0.20*** "), class = "factor"), `31` = structure(c(DEGREE = 1L,
    EIGENVECTOR = 1L, BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 1L, MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L,
    SEGMENT = 1L, SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 1L,
    GOINGCONCERN = 1L, CALENDARYEAR = 1L, LNNONAUDFEES = 1L,
    LNAUDFEES = 1L, AUDTURNOVER = 1L, RESTRUCTURE = 1L, LITIGATE = 1L,
    AGE = 1L, AUDITLAG = 1L, UNQUALIFIED = 1L, MATERIALWEAKNESS = 1L,
    AUDITORTENURE = 1L, LOGEAL = 3L, FILINGLAG = 2L, OPERATINGCFO = 4L
    ), .Label = c("", "-0.24*** ", "-0.27*** ", " 0.11*** "), class = "factor"),
    `32` = structure(c(DEGREE = 1L, EIGENVECTOR = 1L, BETWEENNESS = 1L,
    CLOSENESS = 1L, OVERALLCENTRALITY = 1L, LNASSETS = 1L, LEVERAGE = 1L,
    INVREC = 1L, LOSS = 1L, ROA = 1L, ZSCORE = 1L, MERGER = 1L,
    MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L, SEGMENT = 1L,
    SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 1L, GOINGCONCERN = 1L,
    CALENDARYEAR = 1L, LNNONAUDFEES = 1L, LNAUDFEES = 1L, AUDTURNOVER = 1L,
    RESTRUCTURE = 1L, LITIGATE = 1L, AGE = 1L, AUDITLAG = 1L,
    UNQUALIFIED = 1L, MATERIALWEAKNESS = 1L, AUDITORTENURE = 1L,
    LOGEAL = 1L, FILINGLAG = 3L, OPERATINGCFO = 2L), .Label = c("",
    "-0.30*** ", " 0.52*** "), class = "factor"), `33` = structure(c(DEGREE = 1L,
    EIGENVECTOR = 1L, BETWEENNESS = 1L, CLOSENESS = 1L, OVERALLCENTRALITY = 1L,
    LNASSETS = 1L, LEVERAGE = 1L, INVREC = 1L, LOSS = 1L, ROA = 1L,
    ZSCORE = 1L, MERGER = 1L, MTB = 1L, FOREIGN = 1L, EXTRAORDINARY = 1L,
    SEGMENT = 1L, SPECIALIZED = 1L, RESTATEMENT = 1L, BIGN = 1L,
    GOINGCONCERN = 1L, CALENDARYEAR = 1L, LNNONAUDFEES = 1L,
    LNAUDFEES = 1L, AUDTURNOVER = 1L, RESTRUCTURE = 1L, LITIGATE = 1L,
    AGE = 1L, AUDITLAG = 1L, UNQUALIFIED = 1L, MATERIALWEAKNESS = 1L,
    AUDITORTENURE = 1L, LOGEAL = 1L, FILINGLAG = 1L, OPERATINGCFO = 2L
    ), .Label = c("", "-0.17*** "), class = "factor")), row.names = c(NA,
-34L), class = "data.frame")

Thanks


text:
Q: ASP.NET 4.0 How to return a 401 with a view All I want to do is when a user fails to login correctly, my controller picks this us and sends the user back to the login view in the controller with a message that their log in has failed and they should try again. However, I have some scripts that also use this system, and it would be very helpful to them if this returned a 401.Unfortunately setting a Response.StatusCode=401; at the end just before I return the ActionResult doesn't work.
I'm not using any form of windows authentication, I need authenticate against an Active Directory server from mono. I'm developing on windows, but deploying on Linux/mono.
tl;dr Return page with a user defined status code.


text:
Q: How to do batch insert using neo4j cypher and java I am performing single insert using for each loop for each value.
How can we do batch insert using cypher queries.
Here is my code...
Controller
@PostMapping("/geohash")
public Set<String>  create(@RequestParam String name, @RequestBody LatLng[] latLngs) {
    double[][] polygonPoints = convertTo2dArrayOfLatLng(latLngs);
    Set<String> geoHashesForPolygon = GeoHashUtils.geoHashesForPolygon(6, polygonPoints);
    for (String geohash : geoHashesForPolygon) {
        min = Math.min(min, geohash.length());
        geohashes = neoService.create(name, geohash);
    }
    return geoHashesForPolygon;
}

I want to insert each geoHashesForPolygon as single node..
Cypher query
@Query("MATCH (c:C) WHERE c.name = {name} CREATE (g: G{name : {geohash}} )<-[:cToG]-(c) RETURN c,g")
public GeohashOfCluster create(@Param("name") String name,@Param("geohash") String geohash);

A: You can have the params in a list and unwind it to create nodes. Your query would be like WITH [{name:'',geohash:''},{name:'',geohash:''},{name:'',geohash:''}] as data UNWIND data as d MATCH (c:C) WHERE c.name = d.name CREATE (g: G{name :d.geohash} )<-[:cToG]-(c) RETURN c,g
Hope this helps!


text:
Q: Using php include with a echo value I asked a question late last night and trying to work out a way to fix my issue
here
I included the link to the question encase it was relevant to this question
I am trying to display data from a file named example.php
in example.php i have the following code
<?php

//include database connection
include 'db_connect.php';

$query = "select id, name, surname
        from contacts
        where id='".$mysqli->real_escape_string($_REQUEST['id'])."'
        limit 0,1";

$result = $mysqli->query( $query );
$row = $result->fetch_assoc();

$id = $row['id'];
$name = $row['name'];
$surname = $row['surname'];

?>
<?php echo$name; ?><br>
<?php echo$surname; ?>

so if i visited my page by going to example.php?id=100 it would display the client with the id off 100
but what i am trying to do is display this file depending on another table.
i have a table named repairs and in there is a column named client_id with is the same as the id of the contacts table.
I have tried to display the file by doing this.
<?php include'example.php?id=echo$client_id;'?>

But this did not work please advise me what the right code is and why this is wrong.

A: try:
<?php
$_REQUEST['id'] = $client_id;
 include'example.php';

?>


text:
Q: javascript object delete element I have a question about delete object propery,for examble:

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>test</title>
</head>

<body>
  <script type="text/javascript">
    var tmp = {
      x: 1,
      y: 2,
      z: 3
    };
    var tmp1 = {
      x: 1
    };

    for (pro in tmp) {
      console.log("get tmp <<" + pro + ">> property!!");

      if (!tmp1.hasOwnProperty(pro)) {
        console.log("we will delete <<" + pro + ">> property");
        delete tmp.pro; // or delete tmp[pro];
      }
    }

    console.log("--------------");
    for (p in tmp)
      console.log(p);
    console.log("--------------");

    for (p in tmp)
      document.write(p + "--" + tmp[p] + '<br>');
  </script>
</body>

</html>

if i use delete tmp.pro the result:x=1 y=2 z=3 (is dosn't work!!), but when i use delete tmp[pro] the result is x=1 (delete is ok!!),why ??

A: pro is a string, otherwise the JavaScript is interpreting it as a pro property that exists on tmp. When you use square brackets, it is another way to refer to the property by name.
These are equivalent:
// #1
bar['baz']

// #2
bar.baz

// #3
var prop = 'baz';
bar[prop]


text:
Q: MySQL - Can we use the same temporary table name in different stored procedure? In our database, we generate statistics by periodically calling a large number of stored procedures in the event.
Considering there are two SP

*

*auto_update_daily_users

*auto_update_daily_orders
Is there a conflict when using the same temporary table name (lets say temp1)in both stored procedures?
I checked Q&A on Stack Overflow, they say the temporary table's scope is the current session. I think it means when we connect the db server with clients.
But in my case all the sp are running on the server side. So could anyone explain this?
Will the temporary table be automatically destroyed after one SP is finished? What if two SPs are running at the same time? Aren't they running in the same session?

A:
in my case all the sp are running on the server side

Any case the SP is executed using some client connection (from Event Scheduler, for example). If they are called one-by-one from some outer SP/UDF - they are executed in the same connection, and temp table created by 1st SP exists when 2nd starts. If they are executed independently (for example, as/from 2 separate event procedures) - they are executed in different connections, and each have its own independent (local) temp table.
Server only accept queries and returns its results. Anything that sends queries and receives its results is client. See SHOW PROCESSLIST - you will see all client connections, including Event Scheduler service connection and executed events connections, separate connection for each separate event.

Will the temporary table be automatically destroyed after one SP is finished?

Temporary tables have a connection scope. If you execute 2 SPs in two different connections, each have its own temp table with its own structure and data despite the fact that their names are the same.
If you execute one SP then another, but close connection after executing 1st and create new for executing 2nd - each SP will have its own temp table again.
But if you execute one SP then another in the same connection then temptable created by 1st will exist while 2nd start, with the data inserted by 1st. - akina

A: Plan A: Use different temp table names in different EVENTs.
Plan B: Fabricate the temp table name using connection_id():
mysql> SELECT @tmp := CONCAT("_T_", connection_id());
+----------------------------------------+
| @tmp := CONCAT("_T_", connection_id()) |
+----------------------------------------+
| _T_453                                 |
+----------------------------------------+

Then prepare & execute the queries in question.
Plan C:  Use GET_LOCK(..) (etc) to prevent one Event from using another Event's temp table.


text:
Q: How to parse mathematical expressions I'd like to understand how a Java program like GeoGebra can read a mathematical expression like exp(z^2) from a textbox and then evaluate it. For those familiar with MatLab: How do you implement function handles in Java?

A: If it is like evaluating mathematical expressions (INFIX), using java, I would recommend a simple approach by first converting the expression to POSTFIX notation and then following the basic algorithm for evaluating POSTFIX.
Take a look here

*

*Expression is A*B+C

*POSTFIX will be AB*C+

*Read the postfix string, if operand, push it into stack. (IN stack -> A,B)

*If operator(*), pop out the two operands, perform the calculation (A*B = E,say).

*PUSH the result E in stack

*Goto step 3.

The End result in the stack would be your answer.


text:
Q: Avoid localized resources overhead I have an app that is localized in 24 languages.
When I build the app with English-only resources, the app is 1.6MB.
When I build the app with all languages resources, the app is 2.5MB.
Language-dependent resources are a couple of HTML files, and strings.xml.
Since the app is running a background service, it is annoying to get it killed due to memory pressure. It seems to be more frequent when it is 2.5MB than when it is only 1.6MB.
Therefore I want to decrease the app size by avoiding to ship all languages in the APK when only one is really needed.
I'm considering making an APK with almost English only and the possibility for the user to download language files from the app at runtime.
Are there frameworks for doing this in Android, or maybe at least patterns or best practices?
Any suggestion is warmly welcome.

A: You wouldn't see memory issues due to the size of your APK.  This would only effect the ability to install the app on a device if the user doesn't have enough space to install it.  I think you probably have a different memory issue that you are incorrectly blaming for your memory issues (did a little deeper to see if you can correct the issue).
You can use Proguard to eliminate resources from your final APK, but I don't think this is a wise approach.  Link: http://developer.android.com/tools/help/proguard.html
I also think it is not a good idea to create separate APKs for each language (and in fact, this is against the terms of service for the Play Market).
Bottom line, check your app again, and fix your memory issues - you are likely going down the wrong path trying to blame your problems on your localized resources.


text:
Q: Late 80's book about kids surviving on another planet without any supplies (not Tunnel in the Sky) I have done lots of searching and never found it. This site pointed me to Tunnel in the Sky but that isn't it. I have very vague memories of the book and heck it might have been terrible but I know I liked it in the 6th or 7th grade!
I remember that it involved a class or group of kids having to take a final on another planet by surviving without any supplies. The environment I don't think was supposed to actually kill anyone but it did with lethal animals and such. The hero kid managed to survive and some foil the plot. As sad as this is I do remember something about him and the girl that fought with him making love in zero g as one of the lines near the end or at the end.

A: It sounds a bit like Rite of Passage by Alexei Panshin. First published in 1968.
from the Amazon link:

In 2198, one hundred and fifty years after the desperate wars that
  destroyed an overpopulated Earth, Man lives precariously on a hundred
  hastily-established colony worlds and in the seven giant Ships that
  once ferried men to the stars. Mia Havero's Ship is a small closed
  society. It tests its children by casting them out to live or die in a
  month of Trial in the hostile wilds of a colony world. Mia Havero's
  Trial is fast approaching and in the meantime she must learn not only
  the skills that will keep her alive but the deeper courage to face
  herself and her world.

A: I remembering reading a book written by Monica Hughes in 1990 called Invitation to the Game that sounds similar.

Lisse and her seven friends are unemployed after graduating from a respected private school, and are assigned to live as a group in an abandoned warehouse in a Designated Area (DA)....
One day the group get invited to "The Game", which turns out to be a virtual-reality full-world simulation .... This simulation is based in an outdoor environment and the aim seems to be survival in this different climate....
They realize that The Game was a kind of training program meant to prepare the group- and others like them- for an off-world colony project ....


text:
Q: Is this specific path concatenation in Perl code exploitable? Assume that an attacker controls the variable $untrusted_user_supplied_path. Is the following Perl code exploitable?
my $untrusted_user_supplied_path = ...
if ($untrusted_user_supplied_path =~ /\.\./) {
  die("Tries to escape homedir.");
}
my $base_path = "/home/username/";
my $full_path = "${base_path}${untrusted_user_supplied_path}";
if (-e $full_path) {
  open(FILE, "<", $full_path) || die("File not accessible.");
  while (<FILE>) {
    # present the content to the user
  }
  close(FILE);
}

The code is defined as exploitable if an attacker can choose a value of $untrusted_user_supplied_path such that he/she can read a file that resides in a directory that is not a sub-directory of $base_path (say /etc/passwd)?
You can assume that the code is running under Linux. Furthermore, you can assume that no additional flaws are introduced in the code which presents the file to the user.
Please note that the question is about whether or not the code is
exploitable, not how to make the code more secure. There are numerous
ways to make the code more secure (think chroot, etc.) but that is
beyond the scope of this question.  Just state in your answer if you
believe that the code is exploitable or not. And of course, please
provide supporting argumentation.

A: If a symlink exists inside the homedir to somewhere outside, you're still in trouble.

A: You're asking if your code is exploitable. Yes. All code is exploitable. You might not think it is because you think you've covered the situations that you can think about, but the other side typically finds a situation you haven't thought about. But then, I always say all guns are loaded too.
Security is more than just the code. You have to consider the environment it runs it, what else the user was allowed to do before he ran your code, etc. etc.
If you're truly worried about what might happen with this code, create a risk matrix. Start with the part that you're worried about and list all of its assumptions. For instance, in your case you might start with:

*

*/home/username is the directory I think it is (i.e. not a mount point, symlink, fake user, etc)

*the supplied path is one I expect and is allowed to exist

*the path is a regular file (e.g. not a special device)

*the path has a certain owner, group, or mode

*I'm running the perl I think I am (no path attack in finding executable)

*PERL5LIB, PERL5OPT, or -I did not front-load module load paths (no path attack in finding modules)

And so on and so on. Once you develop all of your assumptions, you ensure that they are valid by locking down those cases. You also find all of their assumptions, and lock down those, and so on. Perl's taint checking will help with some of those (and I talk about it in more depth in Mastering Perl).
Successful attacks are often indirect ones. For instance, I was part of a job to secure some data in a very rich and paranoid bank. We did all the computery stuff we could do, and one of my co-workers, in idle conversation, asked how they did the task before we installed the server. They said, "Oh, the data is on a binder on so-and-so's desk". Despite all of our work, their pay, and everyone's time and effort, anyone on the inside who wanted the data could quite literally walk off with it no matter what we did with the server.
Now that you have your risk matrix, you start developing your risk tolerance. Nothing is ever going to be perfect, and you could work to the heat death of the universe locking everything down. Instead of being perfect, you settle for how much risk you're willing to take on for each part of the code. You figure out what could happen if one part is compromised and how much that would cost you (in dollars, reputation, whatever) and figure out how much work that is worth to you (or your employers). You do just enough work to be below your risk tolerance.
The problem is that even the best people will miss something. Small cracks in security might not seem that important, but if you put enough together you can eventually bootstrap yourself into an exploitable situation. Security is holistic.

A: It looks reasonable to me, although your test is a little draconian. You might want to consider replacing:
/\.\./

with:
m{/\.\./}

to allow access to files and directories containing two dots. It still wouldn't allow convoluted but potentially valid accesses like dir1/../dir2/filename, although you might not be too worried about that.

A: I'm going to violate your house rules and suggest that you do it like this:
use Cwd;
my $full_path = "${canonical_base_path}${untrusted_user_supplied_path}";
my $canonical_full_path = abs_path($full_path);
if (substr($canonical_full_path, 0, length($base_path)) != $base_path) {
      die("Tries to escape homedir.");
}

This should be watertight. It does require $base_path to be canonical, though.

A: Whether it is exploitable or not depends on the code which presents the file to the user. There don't have to be "flaws" in that code so much as opportunities for doing things you haven't thought of.


text:
Q: Text mistakenly indented after ending landscape section For some reason LaTeX indents the text right after the end of a "landscape" section of my DVI output, even though I don't want it to do so.  Any thoughts on how I can fix this?

A: You can use \noindent to prevent indentation.

A: What is happening is that after the \end{landscape} a new paragraph is started. LaTeX adds an indent to the beginning of the paragraph unless you have globally disabled this.
So, you could either add \noindent immediately after the \end{landscape} (as per @GonzaloMedina's solution), or modify the \end{landscape} to always add a \noindent for you:
\begin{document}

\let\OldEndLandscape\endlandscape
\def\endlandscape{\OldEndLandscape\noindent}

\begin{landscape}
\lipsum[1]
\end{landscape}
\lipsum[2]
\end{document}

As per the comments, you need to ensure that there is no space after \end{landscape}, or use a % to terminate any blank lines as in:
...
\end{landscape}
   %
\lipsum[2]

If you desire an automated solution that enforces no indentation after \end{landscape}, perhaps you can use the solution at Looking for an \ignorespacesandpars.


text:
Q: What's this thing in a peltier cooler?
I've taken apart a peltier cooling box to salvage the peltier element and also found this thing. The block seems to be plain aluminum, I'm interested in the cylindrical thing at the bottom.
The peltier element was placed on top of the block, the inside of the fridge was below. The heat shrink on the left of the block is just isolation, there is no wire going in or out.

A: I think Bimetallic Thermostat is the proper term. These use two metals with different expansion, so the bands made from these bend at certain temperatures. I guess this part is cylindrical because the band is rolled up inside. But it's hard to tell from this picture.

A: It's a thermostat, originally known by the Klixon (now Sensata) name. They are based on a bimetallic disk, which is why they are cylindrical.
Some types have a reset switch (a button in the center of the hidden side in your photo) and do not automatically reset, but most are simple thermostats with a fairly wide (maybe 5 to 15 degrees C) hysteresis. Below is a photo of a resettable type with mounting ears from this website:

They are rather common in consumer appliances- cheap, simple and rugged.


text:
Q: How to abort a thread started inside another function? Monitor moni = new Monitor();
Thread t = new Thread(() => moni.CurrUsage(nics,200));
t.Start();

I start a thread named 't' inside the 'Form1_Load' function. I have added a button. When click on that button the thread 't' should stop executing and create a new thread with these parameters.
Monitor moni = new Monitor();
Thread t = new Thread(() => moni.CurrUsage(nics,950));
t.Start();

I know in the form_load event i can use the
t.Abort();

A: By making t a member of the form, you can reference it later on in the button-click event handler.
Graceful Abort.
Although t.Abort() gets the job done, you might be left with half-processed data in the thread t. You can catch the ThreadAbortException in thread t to gracefully end processing.
Beware of overlap.
The second problem is that your thread might not have aborted yet while your new thread has started already. You can prevent that by calling t.Join() after calling t.Abort().
Hope this helps.

A: Make Thread t a private member of your form.
public partial class MainForm : Form
{
    private Thread t;
}

A: One way is to make Thread t a global variable (place outside of Form_Load). Then it can be accessed and modified from any method in that class.
To instantiate the thread, use t = new Thread(.....
Before aborting the thread, make sure it is not null.

A: You need to make the Thread object accessable in both places that you need to access it.
In this case, making it a private varaible would work.
e.g.
public class MyClass
{
  private Thread MyThread
  {
    get;
    set;
  }

  private void myfunc1()
  {
    MyThread = new Thread(() => moni.CurrUsage(nics,200));
    MyThread.Start();
  }

  private void myfunc2()
  {
    MyThread.Abort();

    //  I really need to wait until this thread has stopped...
    MyThread.Join();
  }

}

A: Adding to the already given answers:
Note that .Join() will block your current (UI) thread, leaving your application unresponsive to the user.
Just as another take: avoid using .Abort() by using a flag in your Monitor class to exit the task you are doing if possible. You can then still wait for .Join(), but you have full control of the state in the background thread.
public class Monitor
{
    private bool _cancel = false;

    public void Cancel()
    {
        _cancel = true;
    }

    public void CurrUsage(Nics nics, int n)
    {
        _cancel = false;
        // ...
        while (!_cancel)
        {
        // do some stuff
        }
    }
}

in your Form
private Monitor _monitor { get; set; }
private Thread _t;
public void Button_Click(...)
{
    _monitor.Cancel()
    _t.Join()       // will return as your background thread has finished cleanly
    _t = new Thread(() => _monitor.CurrUsage(nics,950));
    t.Start();
}

A: As others have pointed out, all you need in order to call Abort is a reference to the thread (just like any other object in .NET).
However
You should seriously consider rethinking this approach. In general, calling Abort is discouraged, as it does not give the target thread sufficient opportunity to reach a stopping point. While it's sometimes appropriate (or the only option), it's almost always a better idea to ask the target thread to stop (usually through a volatile bool rather than forcing it like this.
For example,
public class ThreadClass
{
    private volatile bool stopRequested;
    private Thread thread;

    public void Start()
    {
        stopRequested = false;
        thread = new Thread(ThreadMethod);

        thread.Start();
    }

    public void Stop()
    {
        stopRequested = true;

        if(!thread.Join(5000)) thread.Abort(); // forcefully abort if not
                                               // completed within 5 seconds
    }

    private void ThreadMethod()
    {

    }
}

Your code then goes into ThreadMethod. Within the method, periodically check the value of stopRequested. If it's true, perform whatever cleanup is necessary (if any) and gracefully return out of the thread. If the content is a loop, the general practice is to place the check at the start of the loop (assuming that the loop is sufficiently tight) and exit early if the value is true. The exact placement is really dependent upon the code, but the general idea is that it should be checked often enough to make the thread exit fairly quickly after it gets set, regardless of when that happens.


text:
Q: clear memory allocated by R session (gc() doesnt help !) I am doing machine learning in large scale but after while my compute getting so slow because of R memory occupation.
I cleared my objects and also I tried gc() and the result:
           used  (Mb) gc trigger   (Mb)  max used   (Mb)
Ncells  4460452 231.5   15288838 1116.6  36599071 1954.7
Vcells 29572776 349.4  324509788 2712.9 350796378 3376.4

My task manager shows R session still allocated over 3GB of my memory and my computer is still slow.
How can I release the memory taken by R? (I don't want restart the pc)

A: you need to follow two steps.
First, run rm(list = ls())
However, though it removes all the objects in ls(), you need to restart R
using .rs.restartR()
This will effectively clear the memory completely.

A: best solution i found is restarting R session.
in R studio ctr+shft+f10
and if you dont want to save workspace
makeActiveBinding("refresh", function() { system(paste0(R.home(),"/bin/i386/R")); q("no") }, .GlobalEnv)

paste0(R.home(),"/bin/i386/R --no-save") #--save will save workspace

cheers.

A: As in this answer - https://stackoverflow.com/a/8813862/2602477 - "gc does not delete any variables that you are still using- it only frees up the memory for ones that you no longer have access to".
You could remove (almost) everything in the working environment using rm function:
rm(list = ls())

Note that if you want to remove hidden objects as well you need to use
rm(list = ls(all.names = TRUE))


text:
Q: Как отметить первый элемент в списке (Windows Forms) Для того чтобы автоматически выбрать первый элемент в списке можно исполжьзовать
this.listView1.Items[0].Selected = true;

но эта этот метод выбирает и переходит в следующую форму. А как просто отметить элемент и все.


text:
Q: hex literal too big in sqlite So I wanted to convert msyql query to sqlite where in it has images in hex code,when I run the same query in sqlite browser  it is giving me an error, what is the correct way of doing it.
Result: hex literal too big: 0x73616666726f6e2e6a7067
At line 1:
INSERT INTO `test` (`id`, `yeild`, `image`, `city`, `info`, `fertilizer`) VALUES
(9, 'Wheat', 0x77686561742e6a7067, 'Bangalore', 'Weather that is comfortable for humans is also good for wheat. Wheat needs 12\r\nto 15 inches (31 to 38 centimetres) of water to produce a')

CREATE TABLE IF NOT EXISTS `test` (
  `id` int(11) NOT NULL PRIMARY KEY,
  `yeild` varchar(40) NOT NULL,
  `image` blob NOT NULL,
  `city` varchar(50) NOT NULL,
  `info` varchar(60000) NOT NULL,
  `fertilizer` varchar(5000) NOT NULL);

A: You want to insert a blob literal, not a number:
X'77686561742e6a7067'

From the documentation:

Hexadecimal integer literals are interpreted as 64-bit two's-complement integers and are thus limited to sixteen significant digits of precision.

and

BLOB literals are string literals containing hexadecimal data and preceded by a single "x" or "X" character. Example: X'53514C697465'

A:  INSERT INTO `test` (`id`, `yeild`, `image`, `city`, `info`, `fertilizer`) VALUES
(9, 'Wheat', '0x77686561742e6a7067', 'Bangalore', 'Weather that is comfortable for humans is also good for wheat. Wheat needs 12\r\nto 15 inches (31 to 38 centimetres) of water to produce a', 'My fertilizser');

Your hex value should be in quotes.
Also, you are passing only 5 input values but the table have 6 fields.
Demo


text:
Q: The character freezes near the wall unity3d Please tell me, when I move the character with the joystick, the character will get stuck in a regular wall. What could be the problem?
Below is a video demonstration.
When moving with the buttons, the character does not get stuck.
https://www.youtube.com/watch?v=9SiQzLAq-kU
Thanks in advance)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MovePersonal : MonoBehaviour
{
    public float speedMove;
    public float jumpPower;

    private float gravityForce;
    private Vector3 moveVector;

    private CharacterController ch_controller;
    private Animator ch_animator;
    private MobileController mContr;

    // Start is called before the first frame update
    private void Start()
    {
        ch_controller = GetComponent<CharacterController>();
        ch_animator = GetComponent<Animator>();
        mContr = GameObject.FindGameObjectWithTag("joy").GetComponent<MobileController>();
    }

    // Update is called once per frame
    private void Update()
    {
        CharacterMove();
        GamingGravity();
    }

    private void CharacterMove() {
        if (ch_controller.isGrounded) {
            moveVector = Vector3.zero;
            moveVector.x = mContr.Horizontal() * speedMove;
            moveVector.z = mContr.Vertical() * speedMove;

            if(Vector3.Angle(Vector3.forward, moveVector)>1f || Vector3.Angle(Vector3.forward, moveVector) == 0) {
                Vector3 direct = Vector3.RotateTowards(transform.forward, moveVector, speedMove, 0.0f);
                transform.rotation = Quaternion.LookRotation(direct);
            }
        }
        else {
        }

        moveVector.y = gravityForce;
        ch_controller.Move(moveVector * Time.deltaTime);
    }

    private void GamingGravity() {
        if (!ch_controller.isGrounded) gravityForce -=20f * Time.deltaTime;
        else gravityForce = -1f;
        if(Input.GetKeyDown(KeyCode.Space) && ch_controller.isGrounded) gravityForce = jumpPower;
    }
}


text:
Q: Comparing two date objects in Python: TypeError: '<' not supported between instances of 'datetime.date' and 'method' This shouldn't be too difficult but I can't seem to get it to work.
I want to compare two datetime.date types in Python but I keep getting a Type Error:
from datetime import date

class Vacancy(object):
    def __init__(self, date): #date is a datetime string of format 2017-13-03T00.00.000Z
        self.date = datetime.strptime(date[:-1], '%Y-%m-%dT%H:%M:%S.%f').date()

    def getDate(self):
         return self.date

all_objects = [o1, o2, o3, o4, ...] #contains objects of type Vacancy
for o in all_objects:
    earliestDate = date(2020, 1, 1)
    if o.getDate() < earliestDate:
        earliestDate = o.getDate()

print(earliestDate)

TypeError: '<' not supported between instances of 'datetime.date' and 'method'
Which doesn't make sense to me because:
    print(type(earliestDate)) and print(type(o.getDate()))  both give
<class 'datetime.date'>
What could I be doing wrong?
EDIT: added class sample code for the objects in all_objects
EDIT2: As many of you pointed out it is indeed a missing '()'. In my actual code I was assigning the method instad of the value by doing earliestDate = o.getDate. Next time I'll try to be more truthful to my code. Thank you all for the insight you provided as I indeed come from Java and I don't fully comprehend Python yet.

A: You overwritten the definition of date, try this (maintaining the datetime namespace with an alias: dt). A good practice would be to not name local or member variables with the same name of functions and objects of the libraries you import (you imported date from datetime and then use date as the argument of the init).
import datetime as dt

class Vacancy(object):
    def __init__(self, date):
        self.date = date

    def getDate(self):
         return self.date

all_objects = [o1, o2, o3, o4, ...] #contains objects of type Vacancy
for o in all_objects:
    earliestDate = dt.date(2020, 1, 1)
    if o.getDate() < earliestDate:
        earliestDate = o.getDate()

print(earliestDate)

An extra observation is that in python there is no need of defining getters and setters, since the variables are public. It is better if you just:
import datetime as dt

class Vacancy(object):
    def __init__(self, date):
        self.date = date

all_objects = [o1, o2, o3, o4, ...] #contains objects of type Vacancy
for o in all_objects:
    earliestDate = dt.date(2020, 1, 1)
    if o.date < earliestDate:
        earliestDate = o.date

And if you want to be sure the date member variable is  not modified, you can do something like this:
class Vacancy(object):
    def __init__(self, date):
        self.date = date

    def getMinDate(self, other_date):
        if self.date < other_date:
            return dt.date(self.date)
        else:
            return other_date

all_objects = [o1, o2, o3, o4, ...] #contains objects of type Vacancy
earliestDate = dt.date(2020, 1, 1)
for o in all_objects:
    earliestDate = o.getMinDate(earliestDate)

A: The TypeError should give you all information you need to solve this problem. Here's how to interpret it:
TypeError: '<' not supported between instances of 'datetime.date' and 'method'

*

*The '<' not supported means that you got the error when using the < operator, as you already know.

*The comparison doesn't work because one of the things you are comparing is not a datetime.date instance. You already got this, too.

*The method type is what you get if you would use o.getDate instead of o.getDate(). In Python you can pass around methods as values if you like, just like lambdas or functions. This is not what you want in this case however, so make sure you use () everywhere you want to call a method, even if it doesn't take any arguments.

*The order of the types in the error message is also interesting. That datetime.date comes before method mean that the date was on the left side and the problematic value was on the right side. In your case, the earliestDate is holding a method instead of a datetime.date.

*Now that we know that earliestDate is the problem, where is it updated? earliestDate = date(2020, 1, 1) is clearly a date, but how about earliestDate = o.getDate()? It's using parentheses, so o.getDate() must be returning a method.

*Given your code, the Vacancy will always have self.date set to a date, or an exception will be thrown (something like ValueError: time data 'xxx' does not match format '%Y-%m-%dT%H:%M:%S.%f'). I'm guessing your code looks different and the initialization for Vacancy is wrong somehow. This is the benefit of providing a MCVE :)

A: This error is also thrown when trying to apply the condition to NULL values in the column.
To solve this:

*

*Add a condition to only perform the condition when the values are NOT null.

*Remove the null values
from datetime import date

class Vacancy(object):
    def __init__(self, date): #date is a datetime string of format 2017-13-03T00.00.000Z
        self.date = datetime.strptime(date[:-1], '%Y-%m-%dT%H:%M:%S.%f').date()

    def getDate(self):
         return self.date

all_objects = [o1, o2, o3, o4, ...] #contains objects of type Vacancy
for o in all_objects:
    earliestDate = date(2020, 1, 1)

    # NOT Null condition
    if (o != None) and (earliestDate != None):
        if o.getDate() < earliestDate:
            earliestDate = o.getDate()

print(earliestDate)


text:
Q: Populate default values during record creation - LWC quick action vs defaultFieldValues button/link In terms of prepopulating values on a record creation modal, I'm wondering what advantage, if any, the LWC quick action technique has over the much easier button/link technique.
LWC quick action technique:
https://blog.salesforcecasts.com/navigate-to-a-new-record-with-default-values-in-lwc/
Button/link technique:
https://help.salesforce.com/s/articleView?id=sf.links_useful_custom_buttons_create_record_dfv.htm&type=5

A: LWCs will let you do more than just a button, such as querying additional information that isn't available on the record or taking user input but if all you need is to launch the new record page with default values set which you have easy access to, the button/link should be easier.


text:
Q: Posting JSON with PHP CURL I'm tasked with Posting to an API that only accepts JSON. I am using PHP's CURL to accomplish this.
I have posted to API's before with no issue, but never with JSON, something I am not familiar with, I have tried to research this on my own and solve the problem, but I'm not having any luck.
When talking with someone at the company I am trying to post to, I was told that my server is hitting their server, the only thing wrong is the body of my post is not properly formatted JSON.. (no one at this company knows php :( so no help there)
Here is my code:
$jarr = array("ProviderID" => "L005A", "FirstName" => $first,
           "LastName" => $last, "PhoneNumber" => $PhoneNumber,
           "PhoneNumberType" => $PhoneNumberType);

$content = json_encode($jarr);

$curl_handle = curl_init("URL Im posting to");
 curl_setopt($curl_handle, CURLOPT_HTTPHEADER, array(
'Accept: application/json;charset=utf-8',
    'Content-Type: application/json;charset=utf-8',
    'Expect: 100-continue',
    'Connection: Keep-Alive'));
    curl_setopt($curl_handle, CURLOPT_HEADER, 1);
    curl_setopt($curl_handle, CURLOPT_POST, 0);
    curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $content);
    curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, 0);
    curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
    $first = curl_exec($curl_handle);
    curl_close($curl_handle);
    echo "Result ";
    echo $first;

From the documentation I was given, the only parameters I must follow are:
Method: Post
Headers:
Accept: application/json;charset=utf-8
Content-Type: application/json;charset=utf-8
Expect: 100-continue
Connection: Keep-Alive
Currently, when I execute the script, I get a return of:

Result HTTP/1.1 100 Continue HTTP/1.1 400 Bad Request Cache-Control:
  no-cache Pragma: no-cache Content-Type: application/json;
  charset=utf-8 Expires: -1 Server: Microsoft-IIS/7.5 X-AspNet-Version:
  4.0.30319 X-Powered-By: ASP.NET Date: Thu, 01 Nov 2012 15:43:18 GMT Content-Length: 26  {"record.ProviderID":[""]}

So the 400 error is caused because my body is not properly formatted. My question, how would I format the data I need to send in proper JSON format?
From what I have read, this code should do it, but it does not:
$jarr = array("ProviderID" => "L005A", "FirstName" => $first,
           "LastName" => $last, "PhoneNumber" => $PhoneNumber,
           "PhoneNumberType" => $PhoneNumberType);

$content = json_encode($jarr);

A: I faced the same problem. After debugging, found out that while sending JSON string, not quoting or double quoting the Integer values were the culprit. You need to send double quoted integer values as a string.
Eg:
{"PhoneNumber":9876543210}

or
{"PhoneNumber":"9876543210"}

will not work.
but
{"PhoneNumber":"N_9876543210"}

will work.
Will update as soon as I figure it out what exactly is the root cause of this problem. If someone knows, please update soon.
Edit: The problem solved by URL Encoding. I hope it solves in your case also.


text:
Q: What is the correct way to center a menu? I am adding a responsive navigation bar to a website, closely based on a w3 school tutorial (https://www.w3schools.com/howto/howto_js_topnav_responsive.asp).
All is working fine, except that I am trying to center the menu links on the page (for the desktop version), instead of having it on the left side like the tutorial explains.
I tried modifying the value of each property, including float, but without success so far. It must be extremely simple, but what am I missing?
html:

    Home
    About
    Menu
    Drinks
    Values
    Gallery
    Booking

css:
.nav {
  background-color: gold;
  overflow: hidden;
}
.nav a {
  float: left;
  display: block;
  color: black;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}
.nav a:hover {
  background-color: pink;
  color: green;
}
.nav .icon {
  display: none;
}

I saw that this question has already been asked with bootstrap, but as a beginner, I am only using plain css here.

A: you can use flex with center layout, give it a try
.topnav {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #333;
}

A: Another approach if you wanted to avoid using flexbox for whatever reason would be to set the menu items to display: inline-block instead of using floating. Then a simple text-align: center on the nav wrapper will be sufficient.
On a side note, it would make more sense semantically to use the  element as a wrapper and put the menu items in a
 list as
 elements.

.nav {
  background-color: gold;
  overflow: hidden;
  text-align: center;
}

.nav a {
  display: inline-block;
  color: black;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}

.nav a:hover {
  background-color: pink;
  color: green;
}

.nav .icon {
  display: none;
}

  Home
  About
  Menu
  Drinks
  Values
  Gallery
  Booking


text:
Q: How to differentiate two users in Microsoft Teams? If I have the two users in the Microsoft Teams with the same name like "John Smith" .we can add two users with same name but different email id. Now in the API to get the channel messages the response will be its part of response like:
"mentions": [
            {
                "id": 0,
                "mentionText": "John Smith",
                "mentioned": {
                    "application": null,
                    "device": null,
                    "conversation": null,
                    "user": {
                        "id": "5fc21b65-9c9b-4b73-ac2c-d5dafe1cf08f",
                        "displayName": "John Smith",
                        "userIdentityType": "aadUser"
                    }
                }
            }

but in this response I am not getting the email id to verify from which user we got the response if I have two John smith.How to tackle this situation

A: @NDD Once you get the id of the user you could use that id to make an api call to fetch users profile. There you could get the email id of the user.


text:
Q: not able to run "show dbs" on mongodb on Bitnami image instance from aws ec2 instance Below is the error I get if I start mongo shell and try to see which dbs are there, tried using both bitnami as well as ubuntu as users, also what is root pwd for bitnami root user so i can try using that as well.
MongoDB shell version v3.4.2
connecting to: mongodb:///opt/bitnami/mongodb/tmp/mongodb-27017.sock/
MongoDB server version: 3.4.2
> show dbs;
2017-11-08T07:14:01.123+0000 E QUERY    [thread1] Error: listDatabases
failed:{
    "ok" : 0,
    "errmsg" : "not authorized on admin to execute command {
listDatabases: 1.0 }",
"code" : 13,
"codeName" : "Unauthorized"
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
Mongo.prototype.getDBs@src/mongo/shell/mongo.js:62:1
shellHelper.show@src/mongo/shell/utils.js:755:19
shellHelper@src/mongo/shell/utils.js:645:15
@(shellhelp2):1:1


text:
Q: How to get updated data after editing through post request in angular 2 I have searched a lot on this but cannot understand how to get updated data from database. I am learning angular 2 and my situation is that I am fetching the data from table named branches using php in angular 2. Here is my Service in angular 2 project
import { Injectable } from '@angular/core';
import {Http, Headers, Response} from "@angular/http";
import "rxjs/add/operator/map";
import "rxjs/add/operator/catch";
import "rxjs/add/observable/throw";
import { Observable } from "rxjs/Observable";

@Injectable()
export class BranchesService {

  constructor(private _http: Http){}
  _errorHandler(error: Response){
    console.error(error);
    return Observable.throw(error || "Internal server error");
  }

  getBranches(limit, offset){
    console.log("I am called");
    return this._http.get("http://localhost/churchDb/api/v1/branches/"+limit+"/"+offset)
                .map((response: Response) => response.json())
                .catch(this._errorHandler);
  }

  updateBranch(value){
    let headers = new Headers();
    headers.append("Content-Type","application/json; charset=utf-8");
    return this._http.post("http://localhost/churchDb/api/v1/update-branch", value , headers )
      .map((response: Response) =>
        response.json()
      )
      .catch(this._errorHandler);
  }

}

And in my branches Component I am subscribing to getBranches in branches service
branches=[];
ngOnInit() {
    this.branches=[];
    this.sub=this._branchesService.getBranches(this.limit,this.offset)
      .subscribe(
        (resBranchesData)=> {
          this.errorMsg=resBranchesData.message;
          this.branches=resBranchesData.data;
          console.log("Updated : " + JSON.stringify(resBranchesData));
        },
        (resBranchesError)=>{
          console.log(resBranchesError)
        }
      );
  }

And displaying branches in my View

          #
          First Name
          Address
          City
          Actions

          {{ branch.id }}
          {{ branch.name }}
          {{ branch.address }}

              {{ city.name }}

          <button class="btn btn-default" (click)="edit(branch)" >edit</button><button class="btn btn-danger" (click)="openModal()" style="margin-left: 10px">delete</button>

On clicking edit I display a pre-filed form in modal in the same view
<modal [animation]="animation" [keyboard]="keyboard" [backdrop]="backdrop" [cssClass]="cssClass" #modal>
  <form #branchEditForm="ngForm"  (ngSubmit)="updateBranch(branchEditForm.value)">
    <modal-header [show-close]="true">

Add Church Branch

    </modal-header>
    <modal-body>

        <input type="hidden" class="form-control" required name="id" id="id" ngModel="{{branch.id}}">
        Church Name
        <input type="text" class="form-control" required name="name" id="name" ngModel="{{branch.name}}">

        Address
        <input type="text" class="form-control" required name="address" id="address" ngModel="{{branch.address}}">

        Address
        <select class="form-control" name="city" ngModel="{{branch.city}}">
            <option *ngFor="let city of cities" value="{{city.id}}" [attr.selected]="city.id == branch.city ? '' : selected" >{{city.name}}</option>
        </select>

    </modal-body>
    <modal-footer>
      <button type="button" class="btn btn-default" data-dismiss="modal" (click)="modal.dismiss()">Cancel</button>

      <input type="submit" class="btn btn-primary" [disabled]="!branchEditForm.valid" value="Update" />
    </modal-footer>
  </form>
</modal>

Upon submitting the form in branches Component
updateBranch(value:any){
    console.log(value);
    this._branchesService.updateBranch(value)
      .subscribe(
        (response)=>{
          if(response.code == "200"){
            this.modal.close();
            this._router.navigate(['branches']);
          }else{
            // this.showFlag=true;
            // this.loadingFlag=false;
            // this.error=response.message;
          }
        },
        (error) =>{ this.error=error }
      )
  }

The above function successfully updates the data in database table but I cant get the updated data in branches Service.
I see the updated data only after clearing the cache of my browser.
I have also tried navigating from a different component with no luck.
I have also figured if the url in post request is changed, it gets me updated data.
What am I doing wrong? I am new to angular 2 and cannot figure the reason. Any help is much appreciated.

A: I am not fixing your code, instead I'm showing you the principles.
Consider this:
Service method:
updateBranch(branch: IBranch): Observable<IBranch> {
    return this.http.post(this.YOUR_URL, branch)
        .map(resp => resp.json() as IBranch);
}

updateBranch method will return an observable of IBranch type (you can also use "any" if you want, without using the interface)
            On your server side of course, you need to send back the updated model in the json format. This data will be mapped to the IBranch
            model (or any) once the request is done.
IBranch interface:
interface IBranch {
    Id: number;
    Name: string;
    Address: string;
 }

IBranch Component model:
branchModel: IBranch;

Now when you subscribe to the updateBranch method, updated model that server returned will be assigned to
        your branchModel.
Component's update method:
updateBranch(branch: IBranch): void {
    this.branchService.updateBranch(branch)
      .subscribe(response => this.branchModel = response);
 }

A: There are two ways to achieve this.
Method 1: Return updated records in your updateBranch service.
This means, in your server-side api call, return the updated list from the database, so that every time you call your update service, the updated list is returned:
this._branchesService.updateBranch(value)
    .subscribe(
        (response) => {
            this.modal.close();
            //this will only work if your server return the updated list.
            this.branches=response.data;
        })

Suggestion: You do not need to check the response.code anywhere in your service or component, if you are using observables. Angular2 automatically wraps any response status code in between 200 to 300 as error, and you can handle them at .error()
Method 2: use .flatMap() to get the updated list, right after update.
In the event you have no control over the API implementation, aka they can't give you the response directly in the update service, then you will need to manually call getBranches again right after the update.
So what you can do is you use a .flatMap(). flatMap will wait for the previous Observables to finish executing, and then proceed to execute the next one (think .then() in promise):
updateBranch(value: any) {
    this._branchesService.updateBranch(value)
        .flatMap((response) => {
                if (response.code == "200") {
                    this.modal.close();
                    return this._branchesServcice.getBranches(this.limit, this.offset);
                } else {
                    // this.showFlag=true;
                    // this.loadingFlag=false;
                    // this.error=response.message;
                    //return Observable.empty if fails
                    return Observable.empty();
                }
            }
        )
        .subscribe((resBranchesData)=>{
            //do whatever you want after retrieving the branches
        })

}


text:
Q: Contention issues due to indexing "_expires" property - Sessions on Google App Engine [Java] I've noticed that the _expires property of _ah_SESSION is indexed. This surely comes handy when querying for expired sessions. But there seems to be a downside to this. The _expires property contains monotonically increasing values. Which means that index records for this property will most likely end up on a single tablet server. I am concerned that such tablet server could be easily overloaded by applications which update session data often. Is there a way of telling App Engine NOT to index the _expires property? Perhaps something along the lines of adding a rule to appengine-web.xml, for example:
<session-index-expiration>false</session-index-expiration>

To the best of my knowledge, answer to my question is "no". I am thinking of submitting a feature request. But maybe I am missing something. Your input will be much appreciated.
Update 1: I filed a feature request for this. Please consider giving it a vote by "starring" it: https://issuetracker.google.com/issues/71583968
Update 2: The feature request was noticed by Google and "a solution is currently being investigated". In the issue tracker discussion, there is a post saying that it may be possible to prevent the _expires property from being indexed by means of datastore-indexes.xml configuration file. However, since this file seems to deal exclusively with declaring custom indexes, I fail to see how it can be used to disable a single property index. Any ideas?
PS: I originally believed the somewhat widespread myth that _ah_SESSION entities are automatically rewritten after every request merely to update the expiration timestamp. But this is not true. According to the actual implementation of SessionManager, such rewrites are enforced only when the session is at least 25% expired. Which significantly reduces the risk of contention caused by indexing the _expires property. At least for applications which use sessions mainly to keep track of logged in/out users.