text:
Q: Jmeter graph interpretation I am very new at Jmeter and am trying to get an idea of how to interprete the graphs below. The test i performed used 1 thread group with 3600 user ramped up ever .1 seconds. 2 images are attached to this question to better explain myself. The first shows the summary of the test and the second shows the average response time.  As I said I am super green at this and would just like some insight on how to interprate these graphs.  Since there are no huge spikes does this mean the server/website can handle this load without issue?  What would a graph look like if the server was not able the handle the load?   Also, is 3600 user count with .1 second rampup the best way to try to put load on the site? thank you for all your guidance
Test Summary number image:

Average Response graph image:

A: 90% of response times above 40 seconds is a little bit high for me. If it is "normal" web application - no one will wait for 40 seconds for the page to load. Moreover it seems you test has some errors like 4xx and 5xx HTTP response codes and even non-HTTP responses
Also you report is missing some major points like:

*

*Total number of errors and percentage compared to all executed tests. If it something like statistical noise it can be ignored, but even 1 percent of 100k transactions is 1000 failed requests

*There is no information about cause of the errors, i.e. what is the bottleneck. You should be also measuring main health metrics on application under test side like CPU, RAM, Swap, Disk, Network usage as well as application and database-specific metrics if any. See How to Monitor Your Server Health & Performance During a JMeter Load Test for details.

*There is no information about virtual users so you cannot correlate the increasing load with the other metrics.

*1 second ramp-up is not the best way to simulate the load on your server as initially you should be adding more virtual users gradually in order to see how does your application behave when more and more virtual users arrive. So given your scenario you can say something like: "my application cannot handle 3600 users, response time is very high and there are errors", but you don't know how many users can be handled, when response time starts exceeding reasonable thresholds, and why. Your test is something like Stress Test which is also important, but normally people start with the load testing when anticipated load is being simulated.


text:
Q: Prevent vertical touchmove event, but leave horizontal touch and scroll opportunity via buttons I have an iPad app with jQuery widget. Widget can be scrolled horizontally and vertically. I need to prevent vertical scroll via touch event, but leave opportunity to scroll via buttons (like slider).
Needs just remove user vertical touch, but leave horizontal touch. Ideas?

A: mainContainer.on('touchmove', function(e) {

    var xStart, yStart = 0;

    xStart = e.touches[0].screenX;
    yStart = e.touches[0].screenY;

    var xMovement = Math.abs(e.touches[0].screenX - xStart);
    var yMovement = Math.abs(e.touches[0].screenY - yStart);
    if (friendsList.has($(e.target)).length
        || msgContainer.has($(e.target)).length) {

        if ((yMovement * 3) > xMovement) {
            e.preventDefault();
        }

    }

});

This code inside 'touchmove' event prevents vertical scroll by user touching, but allows scroll as it is.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Why is the product of two tridiagonal matrix is a pentadiagonal matrix? How can I show that the product of two tridiagonal matrix results in a pentadiagonal matrix?

A: See the following paper: M. Capovani. Su alcune proprietà delle matrici tridiagonali e pentadiagonali.
Su alcune proprietà delle matrici tridiagonali e pentadiagonali.
Capovani proves that the inverse of a nonsymmetric tridiagonal matrix with the super and subdiagonal elements different from zero, also has as inverse a generator representable matrix, where the upper and lower triangular part have different generators. Using these results the author proves that a pentadiagonal matrix can be written as the product of two tridiagonal matrices, for which one of them is symmetric.


text:
Q: Issue with overflow:hidden with transform:skewY I'm having an issue where overflow:hidden doesn't seem to be working on a skewed container. I have an issue that requires a box shadow on the outer container with an inner image that extends to the top and bottom of the outer container.
For some reason placing the overflow:hidden on the .skew-container doesn't seem to be hiding the top of the image as expected.
.skew-container {
   position: relative;
}

.skew-container:before {
  -webkit-transform: skewY(-2.3deg);
  -moz-transform: skewY(-2.3deg);
  -ms-transform: skewY(-2.3deg);
  -o-transform: skewY(-2.3deg);
  transform: skewY(-2.3deg);
  position: absolute;
  outline: 1px solid transparent;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  top: 0;
  content: "";
  left: 0;
  bottom: 0;
  right: 0;
  overflow: hidden;
}

.skew-container:after {
  content: "";
  display: block;
  position: relative;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 10px;
  outline: 1px solid transparent;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: rotate(-2.3deg);
  -webkit-box-shadow: inset 0px -9px 29px -13px rgba(0, 0, 0, 0.75);
  -moz-box-shadow: inset 0px -9px 29px -13px rgba(0, 0, 0, 0.75);
  box-shadow: inset 0px -9px 29px -13px rgba(0, 0, 0, 0.75);
}

.level-container {
  background-color: green;
}

I have attached a jsfiddle below:
https://jsfiddle.net/eilawen/yy7pL7by/
If anyone could provide any solutions or alternative solutions to the issue it would be appreciated. I have tried using clip-path but unfortunately came across issues applying a box shadow along with positioning the skewed containers right next to each other on the top and bottom.
Thanks in advance.


text:
Q: Android draw/add graphical border around a view I'm not sure if I have the correct query and that's why I can't seem to find anything on this topic, but I am trying to add a graphical border to a view, let's say textView or button or even a progressBar.
To my knowledge you're supposed to take a texture or a small piece of the overall border and then draw it onto or near the view so you don't have to save 100 different sizes of the image (is this correct)?
It's a pretty simple border, so I might be able to get away with just drawing it with colors (which I know how to do), but I would like to know how I would apply a texture like this to a view.
Any help is appreciated - even a related query/tutorial that I can go follow!


text:
Q: gridview height changes based on image i am trying to create a gridview, where image size is always different. I want grid col height to be same and image to shrink and fit inside grid
below is a image of what i want:

below is my grid code
<Grid VerticalOptions="FillAndExpand">
    <Grid.RowDefinitions>
        <RowDefinition Height="33*" />
        <RowDefinition Height="67*" />
     </Grid.RowDefinitions>
         <StackLayout Grid.Row="0" Grid.Column="0" BackgroundColor="Red">
             <Image x:Name="ImageURLFront" VerticalOptions="FillAndExpand"  Aspect="Fill"></Image>
            </StackLayout>
            <StackLayout Grid.Row="0" Grid.Column="1" BackgroundColor="Pink">
                <Image x:Name="ImageURLBack" VerticalOptions="FillAndExpand" Aspect="Fill"></Image>
            </StackLayout>
       </Grid>

issue: what i can tell is that, right image is expanding vertically full screen bc its a long picture
code out put grid height chances based on image

A: worked for me
 <Grid VerticalOptions="FillAndExpand">
                <Grid.RowDefinitions>
                    <RowDefinition Height="45*" />
                    <RowDefinition Height="65*" />
                </Grid.RowDefinitions>
                <Image Grid.Row="0" Grid.Column="0"  x:Name="ImageURLFront" VerticalOptions="FillAndExpand" Aspect="Fill"></Image>
                <Image Grid.Row="0" Grid.Column="1" x:Name="ImageURLBack" VerticalOptions="FillAndExpand" Aspect="Fill"></Image>
                <StackLayout Grid.Row="1" Grid.Column="0" BackgroundColor="Green"></StackLayout>
                <StackLayout Grid.Row="1" Grid.Column="1" BackgroundColor="Blue"></StackLayout>
            </Grid>


text:
Q: Example of a ring of infinite uniform dimension I'm trying to find an example of a ring of infinite uniform dimension. We say that a ring has uniform dimension $n$ if there exists $n$ non-zero ideals $I_{i}$ of $R$ such that
$$ \bigoplus_{i=1}^{n} I_{i},$$
and every direct sum of ideals of $R$ has at most $n$ summands. Otherwise, we say that the ring has infinite uniform dimension.
Any help?

A: If you need a commutative example, then any infinite product of fields will do.
If you need a domain, it's well-known that a domain $R$ is right Ore iff $R_R$ has finite uniform dimension.
Such rings are easy to construct as skew polynomial rings.


text:
Q: SQLZoo Nobel Quiz #3—What's the difference between these statements? https://sqlzoo.net/wiki/Nobel_Quiz
The table in question is displayed at the top of the page.
Two answer choices for Question 3, "Pick the code that shows the amount of years where no Medicine awards were given," are as follows:
SELECT COUNT(DISTINCT yr) FROM nobel
WHERE yr IN (SELECT DISTINCT yr FROM nobel WHERE subject <> 'Medicine')

and
SELECT COUNT(DISTINCT yr) FROM nobel
WHERE yr NOT IN (SELECT DISTINCT yr FROM nobel WHERE subject = 'Medicine')

SQLZoo only takes the second option as a correct answer, but, to me, these answers look like they'd return the same results. Could someone give some insight as to why the first option is incorrect? Thanks.

A: The first answers the question:

How many years had a Nobel prize in a field other than medicine?

The second attempts to answer:

How many years did not have a Nobel price in medicine?

These are different questions and would normally have two different answers.
There are other important differences.  The second query returns no rows if any value of yr is NULL on a medicine prize (that is why I say "attempts to answer").  NULL values have no such global effect on the first query.
The set-based logic that SQL is based on is legitimate logic.  But it requires a bit more thought than handling basic boolean expressions.


text:
Q: Could not find default endpoint element that references contract I'm try to add web services.
This is my config file
 <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="Service1Soap" closeTimeout="00:01:00" openTimeout="00:01:00"
          receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
          bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:51272/Service1.asmx" binding="basicHttpBinding"
        bindingConfiguration="Service1Soap" contract="ServiceReference1.Service1Soap"
        name="Service1Soap"  />
    </client>
  </system.serviceModel>

This is my controller where I call the web services.
 ServiceReference1.Service1Soap hs = new ServiceReference1.Service1SoapClient();
 int aa = hs.getStockQty(66);

But there is error..

How can I solve it??
Thanks.

A: I think the endpoint has more than one references , could you please delete the reference and add it again with a different name.
if not the solution is simple. Copy the endpoint definitions from the config file ) of the class library to the config file of the application.
also check the namespace of this contract "Service1Soap"


text:
Q: Patrick Morandi- Field and Galois Theory- Section 4- Exercise 11 Let $K=k(x)$ be the rational function field over a perfect field $k$ of  characteristic $p > 0$. Let $F = k(u)$ for some $u$ in $K$, and write $u = \frac {f(x)}{g(x)}$ with $f$ and  $g$ relatively prime. Show that $K$ is  separable over $F$ if and only if $u$ is not in $K^p$.

A: It is necessary to assume that $u \in K \setminus k$. If $u \in k$, then $K/F$ is not an algebraic extension, so it does not make sense to ask whether $K$ is separable over $F$.

Note that $F(x) = K$, so by Corollary 4.10(2) it suffices to show that $x$ is separable over $F$ if and only if $u \not\in K^p$. In Example 1.17, it was discussed that $p(t) = ug(t) - f(t) \in F[t]$ is an irreducible polynomial satisfied by $x$, so it is a scalar multiple of $\min(F,x)$.
Suppose $u \in K^p$. Then, $u = \left( \frac{f_1(x)}{g_1(x)} \right)^p$ for some $f_1,g_1 \in k[x]$ that are relatively prime. Since $k[x]$ is a UFD, $f(x) = f_1(x)^p$ and $g(x) = g_1(x)^p$. Let $u_1 = \frac{f_1(x)}{g_1(x)} \in K$. Then,
$$
ug(t) - f(t) = (u_1 g_1(t) - f_1(t))^p.
$$
This shows that $x$ is a repeated root of its minimal polynomial over $F$, and so $x$ is not separable over $F$.
Conversely, suppose that $x$ is not separable over $F$. Let
\begin{align}
f(x) &= a_0 + a_1 x + \dots + a_n x^n, \quad \text{and}\\
g(x) &= b_0 + b_1 x + \dots + b_n x^n.
\end{align}
We do not assume that $a_n$ and $b_n$ are nonzero. By Proposition 4.6(2), there is an irreducible separable polynomial $h(t) \in F[t]$ such that $h(t^{p^m}) = p(t)$ for some $m \geq 0$.
Since $x$ is assumed to not be separable over $F$, $m$ is in fact strictly greater than $0$.
This implies that $f(t),g(t) \in F[t^p]$. For, if $0 \leq l \leq n$ and $p \nmid l$, then the coefficient of $t^l$ in $h(t^{p^m})$ is zero. So, the coefficient of $t^l$ in $p(t)$ is zero. This coefficient is $$ub_l - a_l,$$ and $ub_l - a_l = 0 \iff u \in k$, whereas $u \not\in k$. So, $f(t),g(t) \in F[t^p]$.
Finally, since $k$ is perfect, there are polynomials
$f_1(t),g_1(t) \in k[t]$ such that $f(t) = f_1(t)^p$ and $g(t) = g_1(t)^p$. Let $u_1 = \frac{f_1(x)}{g_1(x)} \in K$. Then,
$$
u = u_1^p \in K^p.
$$

Proposition 4.6(2). Let $f(x) \in F[x]$ be a nonconstant irreducible polynomial. If $\mathrm{char}(F) = p > 0$, then $f(x) = g(x^{p^m})$ for some integer $m \geq 0$ and some $g(x) \in F[x]$ that is irreducible and separable over $F$.
Corollary 4.10(2). Let $L$ be a finite extension of $F$. If $L = F(\alpha_1,\dots,\alpha_n)$ with each $\alpha_i$ separable over $F$, then $L$ is separable over $F$.


text:
Q: sqlpackage exception: Unrecognized command line argument BlockOnPossibleDataLoss I'm running the below command in my CMD:
sqlpackage /action:Publish /SourceFile:"Database Services\bin\Release\Database Services.dacpac" /TargetConnectionString:"Data Source=TEST05,123;Integrated Security=True;Persist Security Info=False;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=60;Encrypt=False;TrustServerCertificate=False;Initial catalog=test" /p:BlockOnPossibleDataLoss=False

but getting this exception:
*** Unrecognized command line argument 'p:BlockOnPossibleDataLoss=False'.

What is wrong with the syntax? I followed the official documentation

A: Very simple solution :) I had to run the CMD as administrator


text:
Q: How to make sure two thread access same resource and make them Thread safe? I'm new to multithreading and I have some basic question for which I could not get answers for. Let's say I have a class named BankTransaction and I want to handle multithreading case in there.
CASE 1 (Application based singleton)
@Singleton (Application based singleton)
class BankTransaction {
    synchronized void doSomeTransaction() {
        // write operation
    }
}

Case 2 (Request based singleton)
@Singleton (Request based singleton)
class BankTransaction{
    synchronized void doSomeTransaction() {
        // write operation
    }
}

Questions
Please bear with me and explain me in layman terms as I need to get things cleared.

*

*In Case 1, if 1000 users are making use of the same instance (as it is application based singleton) of class BankTransaction and use the method doSomeTransaction(), the requests for each of the 1000 users be slow? because it is synchronized and will work Thread-safe. So, it is bad approach right. Is my understanding correct?

*In Case 2, if the same 1000 users are making use of doSomeTransaction() method of class BankTransaction, each will get their own instances of class BankTransaction and it will be never slow for any one of them. But how do I handle race condition when say for example out of those 1000 users, 2 of them are closely related (husband and wife) and are accessing same bank account and doing doSomeOperation() method at the same time. How do I handle this? because both of them again have 2 different instances of class BankTransaction and data inconsistency would occur.

A: *

*In the first Case the 1000 users (or their threads) would wait a long time because only one can get access to the method at a time. All others will have to wait for the lock to get the access to this method. So, yes, it would be slow.

*If every user has his own instance of the class BankTransaction it will NOT be slow, because the lock on the method is for an object (the lock object would be "this" in this implementation). So the users (or their threads) only wait if there is another user that wants to use the same method of exactly the same object (what should not be the case if every user has his own instance).

A: *

*Yes. Your understanding is correct. You should make a method synchronized if somehow you don't want to allow multiple users to change the state of an object. The example could be application level configuration object.

*Now, there are many solutions for this. Easiest could be to defer this problem to some ORM solution which can further use record level lock technique or anything.  However, if you want to handle this manually, easiest way to do this is to maintain a column in db. Now, every time you modify the record, you should increment that value. And before committing your record, you should check if the value is same as that of the record you fetched from db. If its same, then you can be sure that no one has modified it since you started your transaction. However, if the value is not same, you can thow an error to the user saying record has been modified by other user.


text:
Q: Fitting function to multiple datasets in SciPy I am having a problem where I have dataset A and dataset B, and I know that the data in A obeys, say f(a,b,c), while the data in B obeys g(a,b,d) and I want to fit the data so that I obtain the best fit for my parameters. Unfortunately I could not find a function in SciPy to do this.
For context I have data for T(N) and T(r) and both obey some T(a,b,c,r,N) but I can't fit my data as I can't fit them separetely as I would get different results that way, however scipy.optimize.curve_fit only takes one set of data.

A: I just realised I was looking at it the wrong way. Solution can be found here: Fit plane to a set of points in 3D: scipy.optimize.minimize vs scipy.linalg.lstsq


text: Q: How can we show year and quarter wise data in the same visualization in tableau I have quarter and year wise data when we visualize quarterly data it's showing exactly the same and when we selected year data it's combining all the data


text:
Q: error on passing from controller to views in codeigniter? i want to passing data from model to controller then to view
this code explain it.

the model

public function get_all_college_name() {
    $q = $this -> db -> query('select * from college');
    if ($q -> num_rows() > 0) {
        foreach ($q->result() as $row) {
            $data[] = $row;
        }
        return $data;
    }
}

the controller code

public function index() {
    $this -> load -> model('retriver_data');
    $data['rows'] = $this -> retriver_data -> get_all_college_name();

    $this -> load -> view('home', $data);

    //$this -> view_something('home', $data);
}

the view code

<body>
    <?php
    foreach ($rows as $r) {
        echo $r -> name;
    }
    ?>
</body>

the error appears

A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: views/home.php
Line Number: 8

A: For CI, in my models I usually use:
if ($query->num_rows() == 0)
    return FALSE;

return $query->result_array();

then if your view you'll check if the array is false before displaying
<body>
    <?php if ( ! $rows) : ?>
        no data
    <?php else: ?>
        <?php foreach ($rows as $row): ?>
            <?php print $row->name; ?>
        <?php endforeach;?>
    <?php endif; ?>
</body>


text:
Q: How Can I Best Guess the Encoding when the BOM (Byte Order Mark) is Missing? My program has to read files that use various encodings. They may be ANSI, UTF-8 or UTF-16 (big or little endian).
When the BOM (Byte Order Mark) is there, I have no problem. I know if the file is UTF-8 or UTF-16 BE or LE.
I wanted to assume when there was no BOM that the file was ANSI. But I have found that the files I am dealing with often are missing their BOM. Therefore no BOM may mean that the file is ANSI, UTF-8, UTF-16 BE or LE.
When the file has no BOM, what would be the best way to scan some of the file and most accurately guess the type of encoding? I'd like to be right close to 100% of the time if the file is ANSI and in the high 90's if it is a UTF format.
I'm looking for a generic algorithmic way to determine this. But I actually use Delphi 2009 which knows Unicode and has a TEncoding class, so something specific to that would be a bonus.

Answer:
ShreevatsaR's answer led me to search on Google for "universal encoding detector delphi" which surprised me in having this post listed in #1 position after being alive for only about 45 minutes! That is fast googlebotting!! And also amazing that Stackoverflow gets into 1st place so quickly.
The 2nd entry in Google was a blog entry by Fred Eaker on Character encoding detection that listed algorithms in various languages.
I found the mention of Delphi on that page, and it led me straight to the Free OpenSource ChsDet Charset Detector at SourceForge written in Delphi and based on Mozilla's i18n component.
Fantastic! Thank you all those who answered (all +1), thank you ShreevatsaR, and thank you again Stackoverflow, for helping me find my answer in less than an hour!

A: Maybe you can shell out to a Python script that uses Chardet: Universal Encoding Detector. It is a reimplementation of the character encoding detection that used by Firefox, and is used by many different applications. Useful links: Mozilla's code, research paper it was based on (ironically, my Firefox fails to correctly detect the encoding of that page), short explanation, detailed explanation.

A: Here is how notepad does that
There is also the python Universal Encoding Detector which you can check.

A: My guess is:

*

*First, check if the file has byte values less than 32 (except for tab/newlines). If it does, it can't be ANSI or UTF-8. Thus - UTF-16. Just have to figure out the endianness. For this you should probably use some table of valid Unicode character codes. If you encounter invalid codes, try the other endianness if that fits. If either fit (or don't), check which one has larger percentage of alphanumeric codes. Also you might try searchung for line breaks and determine endianness from them. Other than that, I have no ideas how to check for endianness.

*If the file contains no values less than 32 (apart from said whitespace), it's probably ANSI or UTF-8. Try parsing it as UTF-8 and see if you get any invalid Unicode characters. If you do, it's probably ANSI.

*If you expect documents in non-English single-byte or multi-byte non-Unicode encodings, then you're out of luck. Best thing you can do is something like Internet Explorer which makes a histogram of character values and compares it to histograms of known languages. It works pretty often, but sometimes fails too. And you'll have to have a large library of letter histograms for every language.

A: ASCII? No modern OS uses ASCII any more. They all use 8 bit codes, at least, meaning it's either UTF-8, ISOLatinX, WinLatinX, MacRoman, Shift-JIS or whatever else is out there.
The only test I know of is to check for invalid UTF-8 chars. If you find any, then you know it can't be UTF-8. Same is probably possible for UTF-16. But when it's no Unicode set, then it'll be hard to tell which Windows code page it might be.
Most editors I know deal with this by letting the user choose a default from the list of all possible encodings.
There is code out there for checking validity of UTF chars.


text:
Q: Is there any way let SSRS show the result that NOT included in the last run? For example:
I preview the report now at 3:00 pm, I want SSRS to show the result that does not show up when I previewed at 2:00pm(last run), and only those records. Thanks

A: If your dataset is stored procedure based AND your data is time based you could save the last report run time every time it is called in a table. You could then use that value to determine when to start for the next report run. You may need to take into account the user running the report if more than one person will be running it and store a separate last run time for each user.


text:
Q: TensorFlowOpLayer messes up the TensorBoard graphs This question is about TensorFlow (and TensorBoard) version 2.2rc3, but I have experienced the same issue with 2.1. It is a continuation of the question 'Messed up TensorBoard graphs due to Python operations'.
Consider the following code:
from datetime import datetime
import tensorflow as tf
from tensorflow import keras

inputs = keras.layers.Input(shape=(784, ))

outputs = tf.zeros([32, 10], tf.float32)

for i in range(0, 3):
    x = keras.layers.Dense(32, activation='relu', name='Model/Block' + str(i) + '/relu')(inputs)
    x = keras.layers.Dropout(0.2, name='Model/Block' + str(i) + '/dropout')(x)
    x = keras.layers.Dense(10, activation='softmax', name='Model/Block' + str(i) + '/softmax')(x)
    outputs = keras.layers.Lambda(lambda x: x[0] + x[1], name='Model/add/add' + str(i))([outputs, x])

model = tf.keras.Model(inputs=inputs, outputs=outputs)
model.summary(line_length=100, positions=[.45, .58, .67, 1.])

(x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data()
x_train = x_train.reshape(60000, 784).astype('float32') / 255
x_test = x_test.reshape(10000, 784).astype('float32') / 255

model.compile(loss=keras.losses.SparseCategoricalCrossentropy(from_logits=True),
              optimizer=keras.optimizers.RMSprop(),
              metrics=['accuracy'])

logdir = "logs/" + datetime.now().strftime("%Y%m%d-%H%M%S")
tensorboard_callback = keras.callbacks.TensorBoard(log_dir=logdir)
model.fit(x_train, y_train,
          batch_size=32,
          epochs=5,
          validation_split=0.2,
          callbacks=[tensorboard_callback])

When run, it prints the following summary:
____________________________________________________________________________________
Layer (type)                          Output Shap Param  Connected to
====================================================================================
input_1 (InputLayer)                  [(None, 784 0
____________________________________________________________________________________
Model/Block0/relu (Dense)             (None, 32)  25120  input_1[0][0]
____________________________________________________________________________________
Model/Block0/dropout (Dropout)        (None, 32)  0      Model/Block0/relu[0][0]
____________________________________________________________________________________
Model/Block1/relu (Dense)             (None, 32)  25120  input_1[0][0]
____________________________________________________________________________________
Model/Block0/softmax (Dense)          (None, 10)  330    Model/Block0/dropout[0][0]
____________________________________________________________________________________
Model/Block1/dropout (Dropout)        (None, 32)  0      Model/Block1/relu[0][0]
____________________________________________________________________________________
Model/Block2/relu (Dense)             (None, 32)  25120  input_1[0][0]
____________________________________________________________________________________
tf_op_layer_AddV2 (TensorFlowOpLayer) [(32, 10)]  0      Model/Block0/softmax[0][0]
____________________________________________________________________________________
Model/Block1/softmax (Dense)          (None, 10)  330    Model/Block1/dropout[0][0]
____________________________________________________________________________________
Model/Block2/dropout (Dropout)        (None, 32)  0      Model/Block2/relu[0][0]
____________________________________________________________________________________
Model/add/add1 (Lambda)               (32, 10)    0      tf_op_layer_AddV2[0][0]
                                                         Model/Block1/softmax[0][0]
____________________________________________________________________________________
Model/Block2/softmax (Dense)          (None, 10)  330    Model/Block2/dropout[0][0]
____________________________________________________________________________________
Model/add/add2 (Lambda)               (32, 10)    0      Model/add/add1[0][0]
                                                         Model/Block2/softmax[0][0]
====================================================================================

Note the strange entry tf_op_layer_AddV2 (TensorFlowOpLayer). This kind of entry makes the TensorBoard graphs very messy. It turns out that when avoiding the use of the tf.zeros(), this strange tf_op_layer_AddV2 element is not added. So the following code will not generate any tf_op_layer element:
from datetime import datetime
import tensorflow as tf
from tensorflow import keras

inputs = keras.layers.Input(shape=(784, ))

x = keras.layers.Dense(32, activation='relu', name='Model/Block0/relu')(inputs)
x = keras.layers.Dropout(0.2, name='Model/Block0/dropout')(x)
outputs = keras.layers.Dense(10, activation='softmax', name='Model/Block0/softmax')(x)

for i in range(1, 3):
    x = keras.layers.Dense(32, activation='relu', name='Model/Block' + str(i) + '/relu')(inputs)
    x = keras.layers.Dropout(0.2, name='Model/Block' + str(i) + '/dropout')(x)
    x = keras.layers.Dense(10, activation='softmax', name='Model/Block' + str(i) + '/softmax')(x)
    outputs = keras.layers.Lambda(lambda x: x[0] + x[1], name='Model/add/add' + str(i))([outputs, x])

model = tf.keras.Model(inputs=inputs, outputs=outputs)
model.summary(line_length=84, positions=[.46, .60, .69, 1.])

(x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data()
x_train = x_train.reshape(60000, 784).astype('float32') / 255
x_test = x_test.reshape(10000, 784).astype('float32') / 255

model.compile(loss=keras.losses.SparseCategoricalCrossentropy(from_logits=True),
              optimizer=keras.optimizers.RMSprop(),
              metrics=['accuracy'])

logdir = "logs/" + datetime.now().strftime("%Y%m%d-%H%M%S")
tensorboard_callback = keras.callbacks.TensorBoard(log_dir=logdir)
model.fit(x_train, y_train,
          batch_size=32,
          epochs=5,
          validation_split=0.2,
          callbacks=[tensorboard_callback])

There are many more complex examples where the tf_op_layer_ elements are created. It will be appreciated if it is exaplained why they are created and how to avoid them.


text:
Q: Uncheck all other checkboxes I need to clear all other checkboxes when a user clicks a checkbox. Pretty much the same behavior as a radio button. User clicks checkbox 'A' and checkboxes 'B' and 'C' are both unchecked. I am using jquery but I can't figure out how to accomplish this. Any ideas?
Here are how the checkboxes are set u:

<input type="checkbox" value="1" id="exopt10i11553501716" name="optset[0][id]" />Test  + £100.00
<input type="checkbox" value="2" id="exopt11i21553501716" name="optset[1][id]" />Test  + £ 200.00
<input type="checkbox" value="3" id="exopt12i31553501716" name="optset[2][id]" />Test 3 + £400.00

A: if all the checkboxes are siblings, it's just like this,
$(':checkbox').change(function(){

   if (this.checked) {
      $(this).siblings(':checkbox').attr('checked',false);
   }

});

crazy demo
Well, if you really want to copy the behavior of the radio button, simple as this,
$(':checkbox').change(function(){
      this.checked = true;
      $(this).siblings(':checkbox').attr('checked',false);
});

crazy demo

siblings is when the elements has one same parent/container.
sample

<input type="checkbox" />A
<input type="checkbox" />B
<input type="checkbox" />C
<input type="checkbox" />D

in that, <input>s and s are siblings.

In your case, which it's not siblings, you can do it this way,
$('.sales_block_one :checkbox').change(function() {
    var $self = this; // save the current object - checkbox that was clicked.
    $self.checked = true; // make the clicked checkbox checked no matter what.
    $($self).closest('span') // find the closest parent span...
        .siblings('span.sales_box_option_set') // get the siblings of the span
        .find(':checkbox').attr('checked',false); // then find the checbox inside each span and then uncheck it.
});

crazy demo
more about traversing

A: $("#checkboxA").click(function() {
    var checkedStatus = this.checked;
    $("#checkboxB_And_C_Selector").each(function() {
        this.checked = !checkedStatus;
    });
});


text:
Q: Powershell Silent Install in Nano Server with Docker My docker file gets a Nano Server container and it adds Java automatically.
# Get nano server
FROM microsoft/nanoserver

# Download file and set in docker container
ADD http://javadl.oracle.com/webapps/download/AutoDL?BundleId=225355_090f390dda5b47b9b721c7dfaa008135 \
    'C:\\java\jre-8u151-windows-x64.exe'

# Silent install and delete install file
RUN powershell Start-Process -filepath C:\java\jre-8u151-windows-x64.exe -ArgumentList '/s,INSTALLDIR=c:\Java\jre1.8.0_151' -Passthru -Wait; \
    Remove-Item C:\\java\jre-8u151-windows-x64.exe -Force

CMD powershell

The process works correctly but in Nano Server it does not install anything without showing any error. However, with Core Server it does install it.
The result of the silent installation is:
Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
              3      476       1464               596   1 jre-8u151-windows-x64

But then, when I check if it is installed with dir command, I see the following result:
Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       12/21/2017  11:04 AM                Program Files
d-----        7/16/2016   2:09 PM                Program Files (x86)
d-r---        11/3/2017   8:44 PM                Users
d-----       12/21/2017  11:05 AM                Windows
-a----        7/24/2017   6:05 PM       65365056 jre-8u151-windows-x64.exe
-a----       11/20/2016  12:32 PM           1894 License.txt

How could I make this process work correctly or what alternative can I use?

A: Windows nano server does not support MSI based installation. It supports WSA. Please refer to:
https://blogs.technet.microsoft.com/nanoserver/2015/11/18/installing-windows-server-apps-on-nano-server/


text:
Q: I am terribly lost with this SQL project. Sales Order for a burger joint So I'm taking this SQL class in college and I am just lost. I need to make a sales order DB that displays items sold, guest id, address, price, etc...
Now, thisenter image description here is what I have so far:
create table buyer (Guest int not NULL AUTO_INCREMENT,

buyer_first_name varchar(30) not null,

buyer_middle_name varchar(30) not null,

buyer_last_name varchar(30) not null,

address_street varchar(50) not null,

address_apt_num varchar(100) not null,

phone_home varchar(15) not null,

phone_mobile varchar(15) not null,

email varchar(50),

PRIMARY KEY (Guest));

create table item (ProductID int not NULL AUTO_INCREMENT,

PerUnit varchar(50) not null,

Product varchar(50) not null,

Details varchar(200),

PRIMARY KEY (ProductID));

create table sales_order (OrderID int not NULL AUTO_INCREMENT,

Guest int not null,

Date varchar(20),

SpecialInstructions varchar(200),

PRIMARY KEY (OrderID),

FOREIGN KEY (Guest) REFERENCES buyer(Guest)

)ENGINE=INNODB;

create table order_line (OrderID int not null,

ProductID int not null,

Amount int,

PRIMARY KEY (OrderID,ProductID),

FOREIGN KEY (OrderID) REFERENCES sales_order(OrderID),

FOREIGN KEY (ProductID) REFERENCES item(ProductID)

)ENGINE=INNODB;

insert into buyer(buyer_first_name,

buyer_middle_name ,

buyer_last_name ,

address_street ,

address_apt_num ,

phone_home ,

phone_mobile ,

email) values ('Naruto','Ninja','Uzumaki','1234 HokageDrive','1A', '1234567890', '1233126540','naruto@hotmail.com');

INSERT INTO item(Product,Details,PerUnit)

VALUES

('Big Burger Deluxe','Single Patty with Cheese','$1.99'),

('Double Big','2 Patties on a Bun','$2.99'),

('Happy Size Fries','10oz Fries w/ Seasoning','$0.99'),

('Chocolate Shake','Thick Chocolate Shake','$1.49'),

('Strawberry Shake','Thick Strawberry Shake','$1.49'),

('Cherry Pie','Deep-fried cherry Pie with Cream Cheese Icing.','$1.29');

INSERT INTO sales_order(SpecialInstructions,Guest,Date)

VALUES

('Please double bag the order.',1,'Sept. 2, 2015');

INSERT INTO order_line(OrderID,ProductID,Amount) VALUES (1,1,2);

Now I'm terrible with SQL and would like friendly 'Nudge' into the correct direction. I really do love doing this stuff! :)
When I run:
select * from buyer a

join sales_order b on

a.Guest=b.Guest

join order_line c on

b.OrderID=c.OrderID

Join item d on

c.ProductID=d.ProductID

I do not get the expected output of something along these lines:https://ibb.co/h0nP9J (without line totals)
Where can I start?
P.S. I'm using SQL Fiddle for this assignment.
UPDATE:
My Instructions: Provide the SQL code for a complex join query to display all of the information contained in the attached "Receipt" with the
exception of the calculated attributes (Line Total, Subtotal,
Sales Tax and Total).
So from what I understand they want all the information at 1 time? I'll request clarification form instructors.
Expected Output:
enter image description here
Guest ID    Order ID    FN  MI  LN  Address APT#    Home    Cell    Email   Product ID  Per/Unit    Product Details Amount
1   1   Naruto  Ninja   Uzumaki 1234 Hokage Dr  1A  123 123 narutouzumaki@hotmail.com   1   1.99    Big Burger Deluxe   Single patty with Cheese    2
1   1   Naruto  Ninja   Uzumaki 1234 Hokage Dr  1A  123 123 narutouzumaki@hotmail.com   2   2.99    Double Big  2 Patties on a Bun  2
1   1   Naruto  Ninja   Uzumaki 1234 Hokage Dr  1A  123 123 narutouzumaki@hotmail.com   3   0.99    Happy Size Fries    10oz Fries w/ Seasoning 4
1   1   Naruto  Ninja   Uzumaki 1234 Hokage Dr  1A  123 123 narutouzumaki@hotmail.com   4   1.49    Chocolate Shake Thick Chocolate Shake   1
1   1   Naruto  Ninja   Uzumaki 1234 Hokage Dr  1A  123 123 narutouzumaki@hotmail.com   5   1.49    Strawberry Shake    Thick Strawberry Shake  3
1   1   Naruto  Ninja   Uzumaki 1234 Hokage Dr  1A  123 123 narutouzumaki@hotmail.com   6   1.29    Cherry Pie  Deep-fried cherry Pie with Cream Cheese Icing.  2

******Follow link 2 for what I believe is the expected output.**
UPDATE
My data was fine and I was able to get that working with an inner join query!
select
b.Guest,
b.buyer_first_name,
b.buyer_middle_name,
b.buyer_last_name,
b.address_street,
b.address_apt_num,
b.phone_home,
b.phone_mobile,
b.email,
s.OrderID,
s.`Date`,
o.ProductID,
i.PerUnit,
i.Product,
i.Details,
s.SpecialInstructions,
o.Amount
from buyer b
inner join sales_order s on b.Guest = s.Guest
inner join order_line o on s.OrderID = o.OrderID
inner join item i on o.ProductID = i.ProductID;

A: EDIT: Took the time to play with it on DB-Fiddle;
The data itself is fine, it's the select statement that's going to give you grief.
Your current statement is SELECT * with a join on several tables, that means that it will pull all the columns from all the tables. Looking at the example image you've provided, you don't need to present everything in one query.
For instance, the order grid doesn't require buyer_first_name, but the select statement includes it, whereas the Guest information doesn't require PerUnit from the item table. If I were you, I'd break the SELECT * statement into several smaller ones where you specify explicitly what columns you want to include.
As an aside: "INNER JOIN" is clearer to read than "JOIN" especially since they mean the same thing and you'll likely need to be able to easily differentiate the various types of JOIN queries. Likewise, buyer.buyer_middle_name probably shouldn't be set to NOT NULL. not everyone has a middle name. Same thing with AptNumber.
Hopefully this sets you in the right direction.


text:
Q: ksoap2 Sending array of complex objects to WCF service I'm trying to send an array of complex objects from android client to my WCF service.
I used http://seesharpgears.blogspot.ru/2010/10/web-service-that-returns-array-of.html as an example for receiving an array of complex objects and that works fine. But I can't understand how to send this array.
I'm using kmvserializable for object:
public class RatingHttps implements KvmSerializable {
public int CIsso;

public int RatingIsso;

public long RatingDate;

public String RatingExt;

public RatingHttps() {super();}

public RatingHttps(int CIsso, int RatingIsso, long RatingDate, String RatingExt) {
    this.CIsso = CIsso;
    this.RatingIsso = RatingIsso;
    this.RatingDate = RatingDate;
    this.RatingExt = RatingExt;
}

@Override
public Object getProperty(int i) {
    Object property = null;
    switch (i) {
        case 0:
            property = this.CIsso;
            break;
        case 1:
            property = this.RatingDate;
            break;
        case 2:
            property = this.RatingExt;
            break;
        case 3:
            property = this.RatingIsso;
            break;
    }
    return property;
}

@Override
public int getPropertyCount() {
    return 4;
}

@Override
public void setProperty(int i, Object o) {
    switch (i) {
        case 0:
            this.CIsso = Integer.parseInt(o.toString());
            break;
        case 1:
            this.RatingDate = Long.parseLong(o.toString());
            break;
        case 2:
            this.RatingExt = o.toString();
            break;
        case 3:
            this.RatingIsso = Integer.parseInt(o.toString());
            break;

    }
}
private static final String NAMESPACE = "http://schemas.datacontract.org/2004/07/Ais7UpdateServer";

@Override
public void getPropertyInfo(int i, Hashtable hashtable, PropertyInfo propertyInfo) {
    switch (i) {
        case 0:
            propertyInfo.type = PropertyInfo.INTEGER_CLASS;
            propertyInfo.name = "CIsso";
            propertyInfo.setNamespace(NAMESPACE);
            break;
        case 1:
            propertyInfo.type = PropertyInfo.LONG_CLASS;
            propertyInfo.name = "RatingDate";
            propertyInfo.setNamespace(NAMESPACE);
            break;
        case 2:
            propertyInfo.type = PropertyInfo.STRING_CLASS;
            propertyInfo.name = "RatingExt";
            propertyInfo.setNamespace(NAMESPACE);
            break;
        case 3:
            propertyInfo.type = PropertyInfo.INTEGER_CLASS;
            propertyInfo.name = "RatingIsso";
            propertyInfo.setNamespace(NAMESPACE);
            break;
        default: break;
    }
}

This is how I use it:
List<RatingHttps> ratings = new ArrayList<>();
        RatingHttps rating = new RatingHttps();
        rating.CIsso = 1;
        rating.RatingIsso = 2;
        rating.RatingExt = "LOL";
        rating.RatingDate = 3;
        ratings.add(rating);
        rating = new RatingHttps();
        rating.CIsso = 10;
        rating.RatingIsso = 20;
        rating.RatingExt = "OLOLO";
        rating.RatingDate = 30;
        ratings.add(rating);
            //cr.moveToNext();

        //request = GetSoapObject(METHOD_NAME[2]);
        request = new SoapObject(NAMESPACE, METHOD_NAME[2]);

        //envelope = GetEnvelope(request);
        request.addProperty("id", resultId.toString());
        //PropertyInfo pi = new PropertyInfo();
        //pi.setName("ratings");
        //pi.setValue(ratings);
        //pi.setType(ratings.getClass());

        //request.addProperty(pi);
        request.addProperty("ratings", ratings);

        //envelope.addMapping(NAMESPACE, ratings.getClass().getSimpleName(), ratings.getClass());
        envelope.addMapping(NAMESPACE, "ArrayOfRatingHttps", RatingHttps.class);
        SoapObject count = (SoapObject) SecureConnect(SOAP_ACTION[2], request, envelope);

SecureConnect:
private Object SecureConnect(String soapAction, SoapObject request, SoapSerializationEnvelope envelope) {
    try {
        if(request != null) {
            envelope.setOutputSoapObject(request);
            envelope.dotNet = true;
        }
        HttpsTransportSE androidHttpsTransport = new HttpsTransportSE(host, port, subFile, 20000);
        androidHttpsTransport.call(soapAction, envelope);
        return envelope.getResponse();
    } catch (Exception e) {
        result = e.toString();
        Log.d("Tag", "Ошибка: " + e.toString());
        return null;
    }
}

I tried with Arrays, like Rating[].. And with Vector, but this won't work.
I don't know what to do! Maybe anyone has some examples how to do it? Please help.

A: After many hours of searching through the Internet, I've finally found working example. If you would have the same problem, please make sure, that you send correct xml file. Firstly I matched xml file, that I had to receive, with xml file on server. When I found out, that they were the same, I found a mistake in tags, and I'll show how I did it in code:
My RatingHttps class is the same as in my question;
Init my class for example:
List<RatingHttps> rating = new ArrayList<>();
        RatingHttps ratings = new RatingHttps();
        ratings.CIsso = 1;
        ratings.RatingIsso = 2;
        ratings.RatingExt = "LOL";
        ratings.RatingDate = 3;
        rating.add(ratings);

Next, the request:
request = new SoapObject(NAMESPACE, METHOD_NAME[2]);
        SoapObject ratingRequest = new SoapObject(NAMESPACE, "ArrayOfRatingHttps");
        request.addProperty("id", resultId.toString());
        PropertyInfo pi = new PropertyInfo();
        pi.setName("ratings");
        pi.setValue(ratingRequest);
        pi.setType("ArrayOfRatingHttps");
        request.addProperty(pi);

        for(int i = 0; i < rating.size(); i++) {
            SoapObject rate = new SoapObject(RatingHttps.NAMESPACE, RatingHttps.class.getSimpleName());

            //Добавляем значения RatingHttps в xml запрос
            rate.addProperty(getPropInfo(rating.get(i).getAttributeName(0), rating.get(i), rating.get(i).getAttributeType(0)));
            rate.addProperty(getPropInfo(rating.get(i).getAttributeName(1), rating.get(i), rating.get(i).getAttributeType(1)));
            rate.addProperty(getPropInfo(rating.get(i).getAttributeName(2), rating.get(i), rating.get(i).getAttributeType(2)));
            rate.addProperty(getPropInfo(rating.get(i).getAttributeName(3), rating.get(i), rating.get(i).getAttributeType(3)));

            ratingRequest.addSoapObject(rate);
        }
        envelope.addMapping(NAMESPACE, RatingHttps.class.getSimpleName(), RatingHttps.class);
HttpsTransportSE androidHttpsTransport = new HttpsTransportSE(host, port, subFile, 20000);
        androidHttpsTransport.call(soapAction, envelope);

where "ArrayOfRatingHttps" I found for array in my xsd file. If you have wcf service, you can find it in you address "https://your_address?xsd=xsd2". Also I realized a function getPropInfo, here is the code:
private PropertyInfo getPropInfo(String name, RatingHttps rating, Object type) {
    PropertyInfo pi = new PropertyInfo();
    pi.setName(name);
    pi.setValue(rating.getCIsso());
    pi.setType(type);
    pi.setNamespace(RatingHttps.NAMESPACE);
    return pi;
}

where NAMESPACE I found also in xsd file for my service as a targetNamespace. so that's it, now I can send an Array of complex objects. Hope it will help somebody oneday...


text:
Q: Custom Interface Implementation and interface c# I have a problem that I have two types, and the difference is just in a signiture of a method. My 'Plan-B' is that forget this difference and I handle it in the concrete implementation, but for 'Plan-A' I want the following:
public interface MyInterface
{
    int property;
    void MyMethod();
    ICollection<int> MyMethod();
}

public interface A : MyInterface
{
    void MyMethod();
}

public class AClass : A
{
    public void MyMethod() { ... }
}

public interface B : MyInterface
{
    ICollection<int> MyMethod();
}

public class BClass : B
{
    public ICollection<int> MyMethod() { ... }
}

So I want that AClass has to be implement methods from A, and do not have to implement ICollection MyMethod from MyInterface.
I hope I wrote it clear.
Is it possible?
Thank you!

A: Not sure I understand precisely, but try this:
public interface MyInterface
{
    int property;
}

public interface A : MyInterface
{
    void MyMethod();
}

public class AClass : A
{
    public void MyMethod() { ... }
    int property;
}

public interface B : MyInterface
{
    ICollection<int> MyMethod();
}

public class BClass : B
{
    public ICollection<int> MyMethod() { ... }
    int property;
}

In other words, interface A adds the method void MyMethod() to interface MyInterface, and interface B adds the method ICollection<int> MyMethod() to interface MyInterface.
Note that you still won't be able to call e.g.
MyInterface object = new AClass();
object.MyMethod();

as MyMethod() won't be a member of MyInterface.

A: Simply remove the part where interface A and B implement MyInterface.  What's the point of MyInterface if you state you don't want to use it?

A: 1) Use abstract class, so you can delegate implementation of particular method/property to the nested classes:
public abstract class AClass : A
{
    public void MyMethod() { ... }
    public abstract ICollection<int> MyMethod();
}

2) Or extract ICollection<int> MyMethod() in another interface which is not part of A inheritance tree

A: Remember that interfaces are contracts to a concrete implementation and that for it to make sense architecturally, any and all implementations should logically make use of the outlined properties and functions in the contract. Having 3 interfaces will give you what you're looking for and make more sense than trying to stretch 1.

A: No, you can't do that. The return type is part of the method signature. So if you don't implement ICollection MyMethod() you're not fulfilling the contract defined by MyInterface. Why can't you simply implement MyMethod in AClass as returning null?
I feel you'r going against what polymorphism is there for. You want to be able to use the interface, and call polimorphically on the classes, but you want that to return different things. How do you plan to deal with the difference in returns? If the signature is different you have to manually adjust either before or after the call.
If you return a null from AClass then you can adjust after the call. And if you want to return a void, then I'd rather move the MyMethod out of MyInterface down to B and A, and do an AS A / B cast and do whatever you need to do in either case.


text:
Q: How to change the value in specific rows based on a given condition in R? I hope I can explain this properly but essentially, I am trying to organize some data that I have that is censored. Say, for example I have people who are still alive ("."), people who died (1), people who stopped responding to the study (0). I currently have a dataframe that looks like this:
T1 <- c(".",".",".",".",".")
T2 <- c(".",".",".",".",".")
T3 <- c(".",1,".",NA,".")
T4 <- c(NA,NA,".",NA,1)
T5 <- c(NA,NA,".", NA,NA)
df <- data.frame(T1,T2,T3,T4,T5)

  T1 T2   T3   T4   T5
1  .  .    . <NA> <NA>
2  .  .    1 <NA> <NA>
3  .  .    .    .    .
4  .  . <NA> <NA> <NA>
5  .  .    .    1 <NA>

So basically, for those who were censored, which are essentially anyone who didn't die, I want the first "NA" value to be "0" because right now, I can't distinguish who has been censored.
Essentially, I am hoping to identify a code that will allow me to change the first "NA" value of any row without a "1" in it into a "0". I'm hoping for the output to look something like this:
  T1 T2 T3   T4   T5
1  .  .  .    0 <NA>
2  .  .  1 <NA> <NA>
3  .  .  .    .    .
4  .  .  0 <NA> <NA>
5  .  .  .    1 <NA>

I may be having issues because I believe "." wouldn't be numeric so if that is the case and it's easier to have a number, I would prefer to use "99" just to keep things straight. Any suggestions would be appreciated, thank you!

A: By rowwise, an easier option is
df[] <- t(apply(df, 1, function(x) if(!1 %in% x)
        replace(x, is.na(x) & !duplicated(x), 0) else x))

-output
> df
  T1 T2 T3   T4   T5
1  .  .  .    0 <NA>
2  .  .  1 <NA> <NA>
3  .  .  .    .    .
4  .  .  0 <NA> <NA>
5  .  .  .    1 <NA>

Or use a vectorized approach
j1 <- max.col(is.na(df), "first")
i1 <- seq_len(nrow(df))
 df[cbind(i1, j1)][!!rowSums(is.na(df)) &
        !rowSums(df == 1, na.rm = TRUE)] <- "0"

-output
> df
  T1 T2 T3   T4   T5
1  .  .  .    0 <NA>
2  .  .  1 <NA> <NA>
3  .  .  .    .    .
4  .  .  0 <NA> <NA>
5  .  .  .    1 <NA>


text:
Q: Taylor expansion of a square root I was trying to understand the solution of an exercise, when I read this passage. The book is able to expand:
$$
\frac{1}{\sqrt{1+(y'(x)+y''(x)dx)^2}}
$$
in
$$
\frac{1}{\sqrt{1+y'(x)^2}}\left(1-\frac{y'(x)y''(x)dx}{1+y'(x)^2}\right)
$$
Where $y$ is a function of $x$ and $dx$ is the differential of $x$.
It only says: "Expanding the square root to first order in $dx$".
I don't understand how.
Can someone explain this passage to me?
Thanks a lot
Dave!
Here are all the references:
The problem is from "David, Morin, Introductory classical mechanics", page I-19, that is problem 8 of chapter 1.
The text of the problem:
(https://i.stack.imgur.com/n6GXR.png)
The solution of the problem:
(https://i.stack.imgur.com/XJNrQ.png)(https://i.stack.imgur.com/KugIo.png)
(https://i.stack.imgur.com/xx4AW.png)
However, I don't need someone explaining me the problem, but only the central passage of the expansion to the first order. I hope the pictures I added will be helpful.

A: You can manually compute the series for $f(u) = \frac{1}{\sqrt{a + u}}$ to first order:
$$f(u) \sim f(0) + f'(0) u + O(u^2) = \frac{1}{\sqrt{a}} \left(1 - \frac{u}{2 a} + O(u^2) \right).$$
This is just the first-order truncation of the binomial series for $f$ (for appropriate choices of $a$ and $u$).


text: Q: I want to know: what is the principle that causes this phenomenon? The effect of fractal fingering can be observed if a droplet of an ink-alcohol mixture is deposited onto diluted acrylic paint. How are the geometry and dynamics of the fingers influenced by relevant parameters?


text:
Q: Where can I find source code of physics glossary android application? I am new in android application development. I have basic knowledge in java. I want to develop an app of glossary of terms with figures. How should I approach? Shall I use SQLite Database for this? Where can i find the Sqlite database application examples with source code.
thanx.

A: Did you look at http://developer.android.com/resources/tutorials/notepad/index.html ?
For a dictionary app, see: http://developer.android.com/resources/samples/SearchableDictionary/index.html


text:
Q: CKEditor error: Attempted import error: 'ckeditor4-react' does not contain a default export (imported as 'CKEditor') I am trying to use the CKEditor in my react app. I don't know why this error is occurring.
This is how I've imported the CKEditor:
import CKEditor from 'ckeditor4-react';
This is how I've used it:
<CKEditor
    onChange={evt => console.log( evt )}
/>

This is the error I keep getting:
Attempted import error: 'ckeditor4-react' does not contain a default export (imported as 'CKEditor').

A: you should write
import {CKEditor} from 'ckeditor4-react';
because of default export you should use {}

A: In case anyone else is having this issue - for us it was because with ckeditor4-react < 2.0.0, there was no native TypeScript support, so we introduced our own index.d.ts types file. After upgrading however, our file was no longer compatible. We simply removed our index.d.ts types file, updated some of the props (e.g. we were using data instead of initData) and everything worked after that.


text:
Q: Outbound Message Error: SOAP response was a nack I've been setting up an outbound message web service listener, I've not done this before and haven't worked with Tomcat either so this is all very new to me.  I followed the instructions here wiki.developerforce.com/page/Creating_an_Outbound_Messaging_Notification_Service_with_Eclipse_3.2 and managed to get something together despite the instructions being a bit out of date.
Now, everything works fine if I run Tomcat through eclipse, it also works OK if I export the project as a WAR file and run tomcat through the command line, however both of these methods have the disadvantage of needing an application to be running.  I set up the Tomcat service and got it running, however I now get "SOAP response was a nack" in Salesforce and my web service isn't working.  I don't know what this message means and I don't understand why I only get it when tomcat runs as a service, because it only runs the WAR file and that works when I run through the command line.  I should also add that I've not done anything related to responses in the code, so its set up  however eclipse sets it up by following the instructions on the link I've provided, which is just a boolean I think.
Why am I now getting this error and how do I solve it?  As I say I'm new to this kind of thing so instructions will have to be clear.
Thanks!

A: First make sure that your webservice itself is working correctly.
Try by calling the webservice from a tool like SOAP UI and see if you get the response you expect. If not, you should first make sure your webservice functions correctly.
If your webservice is working correctly, it could be that your webservice is behind a firewall that is blocking Salesforce from calling the webservice.
If that is the case, your IT will have to whitelist the Salesforce IP's.

A: Found the solution.  Everything was fine, the issue was the running user of the Windows Service.  I'm logged into the server as administrator so it didn't cross my mind that the service would have any rights issues, however when I entered the admin login details onto the service, suddenly everything started working!


text:
Q: How do I invoke non-default constructor for a member variable? I have a class which is something like this:
template<int SIZE>
class MyClass{
public:
    MyClass(int a, int b){}
}

and I want another class to have an instance of MyClass:
class X{
    MyClass<10>??   // How do I pass values to constructor args a and b?
}

but I am unsure how to pass the arguments in to the two-argument constructor when declaring the object as a member variable?

A: If you are using C++11 or later, you can write
class X{
    MyClass<10> mcTen = {1, 5};
}

Demo 1.
Prior to C++11 you would need to do it in a constructor's initializer list:
class X{
    MyClass<10> mcTen;
    X() : mcTen(1, 5) {
    }
}

Demo 2.


text:
Q: Python--How do I write the value of a variable into the pasteboard in iPhone (iOS 4)/ I am running iOS 4 on a jailbroken iPhone 3GS.  Before I upgraded to iOS 4, I had installed Python on the iPhone and had found the following snippet of Python code to copy a variable (key in this case) to the pasteboard.  I then was able to open another application and paste the value into a text field.
out = os.popen('\usr\bin\pbcopy', 'w')
out.write(key)
out.close()

Since upgrading to iOS 4, this code no longer works.  I receive the following error message:

sh: pbcopy: command not found

I looked in the \usr\bin\ directory, and there is no pbcopy (or pbpaste) command listed.
Does anyone know of another way that I can use Python to copy the value of a variable into the pasteboard?
I'd greatly appreciate any help that anyone can provide.

A: You need to install the package "Erica Utilities" available in the modmyi repository (enabled by default) in Cydia.


text:
Q: How to add popup when clicking on layer using Vue3 and leaflet I am building a web app using Vue 3 and Leaflet. I use the vue-leaflet plugin.
I have a background map and overlay layers, namely WMS tile layers served by Geoserver.
Now I want a popup to open at the location(lat, long) where I click on the layer. For the vue-leaflet plugin I could only find examples for adding a popup to markers, circles or geometries but no example for popups on layers.
To start off, I tried defining a leaflet function that adds a popup to the map when a click event is executed. but that throws me an error. The relevant code snippet and error log attached.
How can I approach this using either the vue-leaflet plugin or a pure leaflet script?
// HTML

    <l-map
      ref="map"
      v-model="zoom"
      v-model:zoom="zoom"
      :center="center"
      :options="{zoomControl:false, attributionControl:false}"
      :minZoom="minzoom"
      @click="addPopUp"
    >

    <l-wms-tile-layer
      v-for="wmsLayer in getCheckedLayers"
      :key="wmsLayer.path"
      :layers="wmsLayer.path"
      :format="format_tile"
      :transparent="true"
      :tiled="true"
      :zIndex="wmsLayer.zindex"
      :base-url="wmsurl"
      :visible="true"
      :opacity="wmsLayer.opacity"
    >
    </l-wms-tile-layer>

// JS
methods: {

    addPopUp(e) {
      const map = this.$refs.map.leafletObject;
      var popLocation = e.latlng;
      var popup = new L.popup()
      .setLatLng(popLocation)
      .setContent('
 Hello popup
')
      .openOn(map)
    },

// error log
Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
    at NewClass._updateContent (leaflet-src.esm.js?6bb3:9617:1)
    at NewClass.update (leaflet-src.esm.js?6bb3:9528:1)
    at NewClass.onAdd (leaflet-src.esm.js?6bb3:9465:1)
    at NewClass.onAdd (leaflet-src.esm.js?6bb3:9751:1)
    at NewClass._layerAdd (leaflet-src.esm.js?6bb3:6561:1)
    at Proxy.whenReady (leaflet-src.esm.js?6bb3:4422:1)
    at Proxy.addLayer (leaflet-src.esm.js?6bb3:6623:1)
    at Proxy.openPopup (leaflet-src.esm.js?6bb3:9975:1)
    at NewClass.openOn (leaflet-src.js?e11e:9752:1)
    at Proxy.addPopUp (BGMap.vue?112f:315:1)

A: I ended up with a workaround solution: By setting an invisible marker when clicking at any point of the map. The marker has an open popup by default. In the end it looks like a popup opens when clicking the map.
// HTML
Call the addMarker method when clicking on the map. Marker component with popup

    <l-map
      ref="map"
      v-model="zoom"
      v-model:zoom="zoom"
      :center="center"
      :options="{zoomControl:false, attributionControl:false}"
      :minZoom="minzoom"
      @click="addMarker"
    >

    <l-marker ref="marker" :lat-lng="marker" :options="markerOptions">
      <l-icon :icon-size= [1,1] icon-url="icon.png"> </l-icon>
      <l-popup ref="popup">
       Popup content
      </l-popup>
    </l-marker>

// JS
export default {
   data(){
      return {
         marker: [0,0], # default lat-lng for marker
         markerOptions: {opacity: 0, width:"1px", height:"1px"}, #marker icon is small and invisible
      }
   },
   methods: {
      addMarker(e) {

      // set marker at latlng position
      this.marker = e.latlng;

      // open popup on marker with a delay of 100 ms
      setTimeout(() =>
        this.$refs.marker.leafletObject.openPopup(), 100);
      }
   }
}


text:
Q: Multiple git repositories with 1 main repository I'm using my own admin panel for multiple websites.
I have a git repository for just the admin panel, and a seperate git repository for every website.
So my question is: How can I update my admin panel easily. When I commit something to the admin panel repository, how can I automatically merge the new feature into the websites that are using that admin panel.
Do I need a plugin on my server for it or can I run some commands on the server every time something gets commited in the admin panel it merges with the other repositories.

A: You can use git submodules.
In every repository that depends on the admin panel repository, you should add a submodule. Say repo1 and repo2 depend on the admin panel.
 cd repo1/
 git submodule add <admin_panel_repository_url>

And that's it. If the admin panel repository has changed, you can update repo1 and repo2:
cd repo1/
git submodule update

Hope that helps.


text:
Q: pthreads broadcast when waiting in while I have multiple (say T) threads that wait as follows (pseudocode)
while (a == 1)
    pthread_cond_wait(cv, mutex);

Another thread which currently has the mutex does the following
a = 0;
pthread_cond_broadcast(cv);

What happens after the broadcast? Will all the T threads eventually (depending on the scheduler) exit the while loop or will more signal/broadcasts be required after?


text:
Q: Find max difference between two adjacent numbers in an unordered array I am looking for an algorithm solves the following in O(n) time:

*

*Given an unordered array of n integers (e.g. {3, 5, 1}).

*"Adjacent" means 2 numbers are picked from the ordered array {1, 3, 5}, and they are adjacent.

Find the max difference between any pair of numbers that would be adjacent if the array were sorted.  It's not required to identify which elements were chosen, where they are, or actually sort the array.
I could only find one way that needs huge memory for a huge bitmap.  Mark all numbers in the input in it, then scan the bitmap for the biggest run of zeros.  (This is a Counting Sort with duplicate elimination, thus only requiring a one-bit saturating counter for every possible input number.)
This bitmap solution is more properly O(n+m), where m is the size of the needed bitmap = largest input - smallest input.  A small input array containing INT_MAX and INT_MIN is the worst case for this approach.
If necessary or helpful, assume the integers are all machine word ints, rather than arbitrary integers.

A: Under the further assumption that the size of the integers in the array is bounded, one could do for instance:

*

*radix sort of the array -> O(n)

*find the max difference -> O(n)

or

*

*find the min and max integer in the array -> O(n)

*allocate a bit vector of size max - min + 1 -> O(1) since the size is bounded

*set all the bits corresponding to a number in the array -> O(n)

*find the max distance in the bit vector -> O(1) since the size is bounded


text:
Q: Person Segmentation on iPhone XR with ARKit 3.0 The following piece of code returns false on iPhone XR even-though it person segmentation is working on XR.
ARConfiguration.supportsFrameSemantics(.personSegmentation)

I want to know if it does officially supports person segmentation and person segmentation with depth on XR. Just to point out I have got iOS 13.1.2 on the XR.

A: Try this variation:
override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)

    let config = ARWorldTrackingConfiguration()

    if ARWorldTrackingConfiguration.supportsFrameSemantics(.personSegmentationWithDepth) {
        config.frameSemantics = .personSegmentationWithDepth
    }
    arView.session.run(config)
}

And make sure that your Xcode version is 11.2.1 and iOS version is 13.2.3.


text:
Q: Ffmpeg change resolution h.264 I need to add a option to ffmpeg command to change the video resolution to 5760x2880 with keeping the right aspect ratio so the video isn't distorted my current command is
 -i {INPUTFILE} -c:v libx264 -preset ultrafast -crf 0 -r:v 30 -c:a copy {OUTPUTFILE}

Thank you


text:
Q: How to copy files from Azure File Storage to Azure VM in release pipeline TFS? Is there any built-in TFS build task or PowerShell script to copy files from Azure File Storage to Azure VM via release deployment pipeline in TFS. I tried looking a bit on internet but didn't get anything fruitful.

A: No, we do not have this kind of build-in task. We have a Azure File Copy task which use it copy application files and other artifacts to Microsoft Azure storage blobs or virtual machines (VMs).

When the target is Azure VMs, the files are first copied to an
  automatically generated Azure blob container and then downloaded into
  the VMs. The container is deleted after the files have been
  successfully copied to the VMs.

You could use AzCopy command on the VM to copy/download data from blob to local driver.

*

*Install AzCopy from http://aka.ms/downloadazcopy

*Read docs from: https://learn.microsoft.com/en-us/azure/storage/storage-use-azcopy

*cd "C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy"

*Get Blob Storage (Secondary) Key

*Powershell: Blob Upload single file
    .\AzCopy /Source:C:\myfolder /Dest:https://myaccount.blob.core.windows.net/mycontainer/myfolder/ /DestKey:key /Pattern:abc.txt

*Logon to Remote VM

*Powershell: Blob Download single file
    .\AzCopy /Source:https://myaccount.file.core.windows.net/myfileshare/myfolder/ /Dest:C:\myfolder /SourceKey:key /Pattern:abc.txt
For PowerShell, you need to use PowerShell Core 6.x and later on all platforms. It works with Windows and Linux virtual machines using Windows PowerShell 5.1 (Windows only) or PowerShell 6 (Windows and Linux).
You can find the PowerShell commands in this document: Quickstart: Upload, download, and list blobs by using Azure PowerShell


text:
Q: How to import variables from a module given its name as string? My question combines
How to import a module given its name as string?
and
Importing variables from another file?
:
I'd like the user of my Python program specify a file from which variables can be read to override variables of the same name in the program. For example, my program program.py has
DEBUG_MODE = False
ITERATION_COUNT = 9
WINDOW_COUNT = 2
...

If run without arguments, these variables will have above values. If instead, when run as ./program.py debug
and file debug.py contains
DEBUG_MODE = True
ITERATION_COUNT = 4

only these variables should be overridden.
Basically, I wish to do something like
from $(sys.argv[1]) import *

but don't know the syntax for $( ). Please help.


text:
Q: Android ContentProvider and Service in Multi-User Devices In a multi-user Android device and when we switch to other secondary user (either using Ui or programmatically), does Android keep any of Primary user components alive , for example started ContentProviders or background Services

A: The main thing to know is that Android users can run in the background (at least until Android 10). If you start user A and then switch to user B, the user B will become the active one but user A will still run in the background until Android decides to stop it because resources are low.
It's especially true for the Primary user because by default it will never be stopped by Android (as it is merged with the System user under which run all the system services of Android).
It means that when you switch to a Secondary user, the Primary user will still continue to run in the background, hence the applications of the Primary user will continue to run in the background (so also most of their Android components). At some point, if Android needs resources, it can decide to stop applications of the any Android user or even completely stop any Secondary Android user running in the background.


text:
Q: How to run to parallel terminal windows? Linux I'm looking to run two independent parallel gnome-terminal windows with some parameters, from 1 shell script.
so far I've got this:
#!/bin/sh
disown gnome-terminal -e window1.sh &
disown gnome-terminal -e window2.sh &
exit

Any ideas?
I've tried nohup too without success.
FYI
Window[x].sh
#!/bin/sh
echo window
read -p

A: #!/bin/sh
#bin/bash

prog="disown gnome-terminal -e window1.sh"
max=2
for i in $(seq $max); do
    if [ $i -lt $max ]; then
        exec $prog &> /dev/null &
    else
        exec $prog
    fi
done


text:
Q: What syntax allows the condition in OpenOffice's SUMIF function to match a regular expression in a different cell? What syntax allows the condition in OpenOffice's SUMIF function to match a regular expression in a different cell?
For example, suppose the cell A1 contains a regular expression. How must the question marks in the example below be replaced so that the condition for summing up uses the regex in A1?
SUMIF(A23:A240,??,B23:B240)

A: SUMIF(test_range; condition; sum_range) supports regular expressions if you have enabled that option. See Regular expressions in Calc

If the cell A1 contains a regular expression, then you can simply use:
SUMIF(A23:A240, A1, B23:B240)

The condition parameter can be cell reference, a number or string to match or an expression to match its value. It can also be a string that starts with a comparison operator.
SUMIF(A23:A240, "<0", B23:B240)

would sum the numbers in the second range for corresponding cells in the first range that are less than zero.
SUMIF(A23:A240, "truck", B23:B240)

would sum the numbers in the second range for corresponding cells in the first range that are less than zero.
Please see Conditional Counting and Summation in Calc for more information.


text:
Q: Overwrite category head title Is there any way to overwrite a <head><title>Category title</title></head> tag?
Let's say i have a "Videos" category, when user point's his browser to www.website.com/category/videos/, the page title (this one in head section) is Videos. What i need to do is to somehow overwrite it to display Archive string (without changing this category title), it can be hardcoded in some way cause i have just this one single category.
Any help would be appreciated.

A: You can use the wp_title filter to modify the output of the wp_title function.
quick example based on the example from Codex:
add_filter( 'wp_title', 'wpa66574_title_filter', 10, 3 );

function wpa66574_title_filter( $title, $sep, $seplocation ) {
    // account for $seplocation
    $left_sep = ( $seplocation != 'right' ? ' ' . $sep . ' ' : '' );
    $right_sep = ( $seplocation != 'right' ? '' : ' ' . $sep . ' ' );

    $page_type = '';

    // get special page type (if any)
    if( is_category( 'videos' ) ) $page_type = $left_sep . 'Archive' . $right_sep;

    // get the page number
    if( get_query_var( 'paged' ) ) $page_num = $left_sep. get_query_var( 'paged' ) . $right_sep; // on index
    elseif( get_query_var( 'page' ) ) $page_num = $left_sep . get_query_var( 'page' ) . $right_sep; // on single
    else $page_num = '';

    // concoct and return title
    return $page_type . $title . $page_num;
}

A: Depending on your theme, in the header.php template, just find the line with the <title> tag, something like this:
<title><?php wp_title( '' ); ?></title>

Then check which page type you're on and edit as necessary:
<title>
    <?php if ( is_category( 'video' ) ) echo 'Archive: '; ?>
    <?php wp_title( '' ); ?>
</title>

Keep in mind that themes and plugins mess with the <title> tag all the time, so you might run into conflicts. If you don't want to mess with your theme directly, try a plugin that can handle this, like WordPress SEO.


text:
Q: Cannot save modifications made in xlsx file I read a .xlsx file, update it but Im not able to save it
from xml.dom import minidom as md
        [... some code ....]
        sheet = workDir + '/xl/worksheets/sheet'
        sheet1 = sheet + '1.xml'
        importSheet1 = open(sheet1,'r')
        whole_file= importSheet1.read()
        data_Sheet = md.parseString(whole_file)
        [... some code ....]
            self.array_mem_name = []
            y = 1
            x = 5 #first useful row
            day = int(day)
            found = 0
            while x <= len_array_shared:
                readrow = data_Sheet.getElementsByTagName('row')[x]
                c_data = readrow.getElementsByTagName('c')[0]
                c_attrib = c_data.getAttribute('t')
                if c_attrib == 's':
                    vName = c_data.getElementsByTagName('v')[0].firstChild.nodeValue
                    #if int(vName) != broken:
                    mem_name = self.array_shared[int(vName)]
                    if mem_name != '-----':
                        if mem_name == old:
                            c_data = readrow.getElementsByTagName('c')[day]
                            c_attrib = c_data.getAttribute('t')
                            if (c_attrib == 's'):
                                v_Attrib = c_data.getElementsByTagName('v')[0].firstChild.nodeValue
                                if v_Attrib != '':
                                    #loc = self.array_shared[int(v_Attrib)]
                                    index = self.array_shared.index('--')
                                    c_data.getElementsByTagName('v')[0].firstChild.nodeValue = index

                                    with open(sheet1, 'w') as f:
                                        f.write(whole_file)

As you can see I use f.write(whole_file) but whole_file has not the changes made with index.
Checking the debug I see that the new value has been added to the node, but I can't save sheet1 with the modified value

A: I switched to using openpyxl instead, as was suggested in a comment by Lei Yang. I found that this tool worked better for my jobs. With openpyxl, reading cell values is much easier than with xml.dom.minidom.
My only concern is that openpyxl seems really slower than the dom to load the workbook. Maybe the memory was overloaded. But, I was more interested in using something simpler than this minor performance issue.


text:
Q: Prove $\int_0^{\pi/2}{\frac{1+2\cos 2x\cdot\ln\tan x}{1+\tan^{2\sqrt{2}} x}}\tan^{1/\sqrt{2}} x~dx=0$ I'm curious, how one can prove the following integral
$$
\int_0^{\pi/2}{\frac{1+2\cos 2x\cdot\ln\tan x}{1+\tan^{2\sqrt{2}} x}}\tan^{1/\sqrt{2}} x~dx=0
$$
Here is the Wolfram Alpha computation which shows that it is correct to at least 45 digits.
My attempt: I knew the integral
$$
\int_0^{\pi/2}\frac{1}{1+\tan^\alpha\phi}d\phi=\int_0^{\pi/4}\frac{1}{1+\tan^\alpha\phi}d\phi+\int_0^{\pi/4}\frac{\tan^\alpha\phi}{1+\tan^\alpha\phi}d\phi=\frac{\pi}{4}
$$
which can be calculated for all values of $\alpha$. I tried to find an analogous symmetry that will allow me to cancel all the terms also in this case, but so far no luck. I also suspect that this integral might be related to derivative of Herglotz integral. Herglotz showed that
$$
\int_{0}^{1}
\frac{\ln\left(1 + t^{\,{\large\alpha}}\right)}{1 + t}\,{\rm d}t
$$
can be computed for some algebraic values of $\alpha$, e.g. $\alpha=4+\sqrt{5}$.
If we take derivative of this integral with respect to $\alpha$ then we get
$$
\int_{0}^{1}
\frac{t^\alpha\ln t}{(1 + t)(1+t^\alpha)}\,{\rm d}t
$$
Change of variables $t=\tan^2\phi$ gives
$$
4\int_{0}^{\pi/4}
\frac{\tan^{2\alpha+1}\phi\cdot\ln \tan\phi}{1+\tan^{2\alpha}\phi}\,{\rm d}\phi
$$
which looks quite similar to the integral under consideration.

A: Disclaimer. This is not an answer! But I hope the following transformations and numerical experiments can be useful in finding the solution.
First, we will get rid of trigonometric functions. Setting $t=\tan \phi$ we obtain:
$$\int_0^\infty \frac{t^a [1+t^2+2(1-t^2) \ln t]}{(1+t^b)(1+t^2)^2}dt$$
Here $a=\frac{1}{2}\sqrt{2}$, $b=2\sqrt{2}$. It makes sense to pose a more general problem with $a=\frac{1}{2}c$, $b=2c$ for some real parameter $c$.
Thus we have:

$$I(c)=\int_0^\infty \frac{t^{c/2} [1+t^2+2(1-t^2) \ln t]}{(1+t^{2c})(1+t^2)^2}dt$$

Here is a plot of $I(c)$. There appear to be only two roots $c= \pm \sqrt{2}$ - the function appears to be even.

It's easy to prove that $I(c)=I(-c)$. Let's set $t=\frac{1}{u}$:
$$I(c)=-\int_\infty^0 \frac{u^{-c/2} [1+u^{-2}-2(1-u^{-2}) \ln u]}{u^2(1+u^{-2c})(1+u^{-2})^2}du$$
Multiplying both sides by $u^2$ we obtain:

$$I(c)=\int_0^\infty \frac{u^{-c/2} [1+u^2+2(1-u^2) \ln u]}{(1+u^{-2c})(1+u^2)^2}du=I(-c)$$

Let's separate the integral into to parts: $$I=\int_0^\infty=\int_0^1+\int_1^\infty$$
Making the substitution $t=\frac{1}{u}$ we obtain:
$$\int_1^\infty \frac{t^{c/2} [1+t^2+2(1-t^2) \ln t]}{(1+t^{2c})(1+t^2)^2}dt=\int_0^1 \frac{u^{3c/2} [1+u^2+2(1-u^2) \ln u]}{(1+u^{2c})(1+u^2)^2}du$$
Thus, we can introduce another form of the integral with finite limits:

$$I(c)=\int_0^1 \frac{t^{c/2}(1+t^c) [1+t^2+2(1-t^2) \ln t]}{(1+t^{2c})(1+t^2)^2}dt$$

The plot of the integrand is presented below:

Because now $0<t<1$ we can expand a part of the integrand into a series:
$$I(c)=\sum_{k=0}^\infty (-1)^k \int_0^1 \frac{t^{(2k+1/2)c}(1+t^c) [1+t^2+2(1-t^2) \ln t]}{(1+t^2)^2}dt$$
Expanding the numerator we obtain $8$ integrals in the form:
$$\int_0^1 \frac{t^\alpha}{(1+t^2)^2} dt \quad \text{and} \quad \int_0^1 \frac{t^\alpha \ln t}{(1+t^2)^2} dt$$
The first integral can be evaluated using the digamma function while the second integral can be obtained by differentiating the first w.r.t. $\alpha$.
Thus, the integral is equal to the following series:
$$I(c)=\frac{1}{16} \sum_{k=0}^\infty (-1)^k \times$$
$$ \times \left[ 4 \left(\psi\left(\frac{c (4 k+1)+2}{8}\right)-\psi \left(\frac{c (4 k+1)+2}{8}+\frac{1}{2}\right)\right)+ \\ +4 \left(\psi \left(\frac{c (4 k+3)+2}{8}\right)-\psi \left(\frac{c (4 k+3)+2}{8}+\frac{1}{2}\right)\right)+ \\ +c (4 k+1) \left(\psi ^{(1)}\left(\frac{c (4 k+1)+2}{8}\right)-\psi ^{(1)}\left(\frac{c (4 k+1)+2}{8}+\frac{1}{2}\right)\right)+ \\ +c (4 k+3) \left(\psi ^{(1)}\left(\frac{c (4 k+3)+2}{8}\right)-\psi ^{(1)}\left(\frac{c (4 k+3)+2}{8}+\frac{1}{2}\right)\right) \right]$$
This seems too complicated, but I have hope that some properties of the digamma function can help in showing that $I(\sqrt{2})=0$.

A little more generalization. Consider the integral with two parameters:
$$I(a,b)=\int_0^\infty \frac{t^a [1+t^2+2(1-t^2) \ln t]}{(1+t^b)(1+t^2)^2}dt=$$
$$=\int_0^1 \frac{(t^a+t^{b-a}) [1+t^2+2(1-t^2) \ln t]}{(1+t^b)(1+t^2)^2}dt$$

$$I(a,b)=I(b-a,b)$$

The curve $I(a,b)=0$ is represented below:

We see it has two branches. So far I haven't been able to find other algebraic pairs on it except for:
$$I \left(\frac{1}{2} \sqrt{2},2\sqrt{2} \right)=0 \\ I \left(\frac{3}{2} \sqrt{2},2\sqrt{2} \right)=0$$
And the trivial one:
$$I(1,2)=0$$

Update:
The integral can be simplified in the following way:
$$\int_0^\infty \frac{t^a [1+t^2+2(1-t^2) \ln t]}{(1+t^b)(1+t^2)^2}dt=\frac{1}{2} \int_0^\infty \frac{t^{a-1} [1+t^2+2(1-t^2) \ln t]}{(1+t^b)(1+t^2)^2}dt^2$$
Introducing $v=t^2$, $\alpha=\frac{a-1}{2}$ and $\beta=\frac{b}{2}$ we need to investigate:

$$J(\alpha,\beta)=\int_0^\infty \frac{v^{\alpha} [1+v+(1-v) \ln v]}{(1+v^\beta)(1+v)^2}dv=\int_0^1 \frac{(v^{\alpha}+v^{\beta-\alpha-1}) [1+v+(1-v) \ln v]}{(1+v^\beta)(1+v)^2}dv$$
$$J(\alpha,\beta)=J(\beta-\alpha-1,\beta)$$

This integral seems much better. We now need to prove that:
$$J\left(\frac{\sqrt{2}-2}{4},\sqrt{2} \right)=0$$ or $$J\left(\frac{3\sqrt{2}-2}{4},\sqrt{2} \right)=0$$

Update 2:
Some further work on the integral. From the comment of @user90369 we introduce a new form of the integral:
$$Y(A):=\int_0^\infty \frac{\cosh Ax}{\cosh 2Ax} \frac{\cosh x-2x \sinh x}{\cosh^2 x} dx$$
Setting $t=e^x$ we obtain:
$$Y(A)=2 I(2A)$$
Separating the integral into two parts and introducing a new parameter $P$ we have:
$$Y_1(A,P):=\int_0^\infty \frac{\cosh Ax}{\cosh 2Ax} \frac{1}{\cosh P x} dx$$
$$Y_2(A,P):=-2\int_0^\infty \frac{\cosh Ax}{\cosh 2Ax} \frac{x \sinh P x}{\cosh^2 P x} dx=2\frac{\partial}{\partial P} Y_1(A,P)$$
Thus, we can work with $Y_1$ first:
$$Y_1(A,P)=\frac{1}{A} \int_0^\infty \frac{\cosh y}{\cosh 2y} \frac{1}{\cosh p y} dy$$
Here $p=P/A$. Setting $e^y=z$ we obtain:
$$Y_1(p):=\int_0^\infty \frac{\cosh y}{\cosh 2y} \frac{1}{\cosh p y} dy=2 \int_0^1 \frac{1+z^2}{1+z^4} \frac{z^p}{1+z^{2p}} dz=\int_0^\infty \frac{1+z^2}{1+z^4} \frac{z^p}{1+z^{2p}} dz$$
Despite @Lucian's comment, I can't represent $Y_1(p)$ in terms of Beta function in closed from, only as a series, but it might be possible. I would wager a closed form in terms of hypergeometric functions.
For particular values of $p$ there are closed forms. So far I've found closed forms for $p=(0,1/4,1/3,1/2,2/3,1,2,3,4,5)$. They are all algebraic multiples of $\pi$. But to evaluate the original integral, we need the closed form for general $p$. Seethis question.

Update 3:
If we allow double sums we can express the problem in a compact and almost symmetrical way:

Prove that for $B=\sqrt{2}$: $$\sum_{k,n=0}^\infty (-1)^{k+n} \frac{4k+1-(2n+1)B}{(4k+1+(2n+1)B)^2}=-\sum_{k,n=0}^\infty (-1)^{k+n} \frac{4k+3-(2n+1)B}{(4k+3+(2n+1)B)^2}$$

A: This answer builds on observations made by user90369 and Yuriy S. They define the functions
$$
Y_1(A,P):=\int_0^\infty \frac{\cosh Ax}{\cosh 2Ax} \frac{1}{\cosh P x} dx,\tag{1}
$$
$$
Y_2(A,P):=-2\int_0^\infty \frac{\cosh Ax}{\cosh 2Ax} \frac{x \sinh P x}{\cosh^2 P x} dx=2\frac{\partial}{\partial P} Y_1(A,P),\tag{2}
$$
and then note that OPs conjecture is equivalent to $Y_1(1/\sqrt2,1)+Y_2(1/\sqrt2,1)=0$.
I happened to notice that $(1)$ is an integral of a product of two self-reciprocal functions $\sqrt{\frac{2}{\pi}}\int_0^\infty f(x)\cos ax dx=f(a)$ (functions 3 and 4 in this list):
$$
f_1(x)=\frac{1}{\cosh\sqrt{\frac{\pi}{2}}x},\quad f_2(x)=\frac{\cosh \frac{\sqrt{\pi}x}{2}}{\cosh \sqrt{\pi}x}.\tag{3}
$$
For any such two functions Ramanujan shows that (simple proof is outlined in this answer)
$$
\int_0^\infty f_1(x)f_2(\alpha x) dx=
\frac{1}{\alpha}\int_0^\infty f_1(x)f_2(x/\alpha) dx.\tag{4}
$$
Substituting $(3)$ in $(4)$ one obtains
$$
\int_0^\infty \frac{1}{\cosh\sqrt{\frac{\pi}{2}}\alpha x}\frac{\cosh \frac{\sqrt{\pi}x}{2}}{\cosh \sqrt{\pi}x} dx=
\frac{1}{\alpha}\int_0^\infty \frac{1}{\cosh\sqrt{\frac{\pi}{2}}x/\alpha}\frac{\cosh \frac{\sqrt{\pi}x}{2}}{\cosh \sqrt{\pi}x} dx,
$$
and after trivial algebra
$$
\int_0^\infty \frac{1}{\cosh\alpha x}\frac{\cosh \frac{x}{\sqrt{2}}}{\cosh \sqrt{2}x} dx=
\frac{1}{\alpha}\int_0^\infty \frac{1}{\cosh x/\alpha}\frac{\cosh \frac{x}{\sqrt{2}}}{\cosh \sqrt{2}x} dx.
$$
This gives the functional equation
$$Y_1(1/\sqrt{2},P)=\frac{1}{P}Y_1(1/\sqrt{2},1/P).$$
Differentiating this functional equation with respect to $P$ one obtains
$$
\frac12 Y_2(1/\sqrt{2},P)=-\frac{1}{P^2}Y_1(1/\sqrt{2},1/P)-\frac{1}{2P^3}Y_2(1/\sqrt{2},1/P),
$$
which gives at $P=1$ the required relation
$$
Y_1(1/\sqrt2,1)+Y_2(1/\sqrt2,1)=0.
$$

A: This is not a complete answer, but I think this is a possible solution. If you apply the change of variable $t=\tan(x)$, the original integral can be writen as
$$\int_{0}^{\infty}\frac{1 + 2\left(\frac{1-t^{2}}{1+t^{2}}\right)\log(t)}{1+t^{2\sqrt{2}}}t^{1/\sqrt{2}}\frac{dt}{t^{2} + 1} = \int_{0}^{\infty}\frac{t^{1/\sqrt{2}}}{(t^{2} + 1)(1+t^{2\sqrt{2}})}dt + \int_{0}^{\infty}\frac{2(1-t^{2})\log(t)}{(t^{2} + 1)^{2}(1+t^{2\sqrt{2}})}t^{1/\sqrt{2}}dt,$$
and this integral would be solved by the method of residues for Mellin Transformations.
Checks Pags. 60-62 of http://jacobi.fis.ucm.es/artemio/Notas%20de%20curso/VC.pdf (I couldn't find an english version)


text:
Q: Atualizar table html após cadastrar usuário usando ajax Olá, tenho um seguinte código js para cadastrar um usuário.
$(function() {

    $('#cadastrar_usuario').submit(function(event) {
        event.preventDefault();
        var formDados = new FormData($(this)[0]);

        $.ajax({
            url: 'func_cadastrar_usuario.php',
            type: 'POST',
            data: formDados,
            cache: false,
            contentType: false,
            processData: false,
            success: function(data) {
                $('#resultado').html(data);

            },

            complete: function(data) {
                $('#cadastrar_usuario').each(function() {
                    this.reset();
                });

            },

            dataType: 'html'
        });
        return false;
    });
});

e tenho uma tabela html onde eu listo os usuários cadastrados no banco com PHP.
gostaria de saber como fazer com que após o cadastro do usuário, essa tabela de usuários seja atualizada sem refresh ou reload, como eu faço na hora de cadastrar. Tipo, no complete da função de cadastrar, eu atualizar a tabela.
OBS: no arquivo func_cadastrar_usuario.php, eu apenas recebo os dados do formulário de cadastro, ai faço o insert e cadastro no banco. Se der para fazer por lá também serve.
Agradeço de coração por qualquer ajuda.
Estarei deixando aqui o meu arquivos usuarios.php, onde tem um div com a tabelas de listagem de usuários do banco, e uma div com um formulário para cadastro de usuários.

        ID
        NOME
        E-MAIL
        SEXO
        LOGIN
        AÇÔES

        <?php
            include("conexao.php");
            $sql = mysql_query("SELECT * FROM usuarios ORDER BY id ASC");

            $c = 2;
            $cores = array("#FFFFFF","#EAF4FF");

            while($coluna = mysql_fetch_array($sql)){
                $id    = $coluna["id"];
                $nome  = $coluna["nome"];
                $email = $coluna["email"];
                $sexo  = $coluna["sexo"];
                $login = $coluna["login"];

                $index = $c % 2;
                $c++;
                $cor = $cores[$index];

         ?>
              <tr id="lista" bgcolor="<?=$cor?>">
                <?php echo $id;?>
                <?php echo $nome;?>
                <?php echo $email;?>
                <?php echo $sexo;?>
                <?php echo $login;?>
                Alterar<a href="" id="<?php echo $id;?>" class="excluir">Excluir

          <?php
          }
          ?>

CADASTRO DE USUÁRIOS

        <form id="cadastrar_usuario" action="" method="post" class="form_group">

                    Nome:
                    <input type="text" class="txt" name="nome" id="nome" maxlength="30" placeholder="Insira um Nome" />

                    E-mail:
                    <input type="email" class="txt" name="email" id="email" maxlength="30" placeholder="Insira um E-mail"/>

                    Sexo:
                    <input type="radio" name="sexo" id="masc" value="masculino" checked/> Masculino
                        <input type="radio" name="sexo" id="fem" value="feminino"/> Feminino

                    Login:
                    <input type="text" class="txt" name="login" id="login" maxlength="15" placeholder="Insira um login" />

                    Senha:
                    <input type="password" class="txt" name="senha" id="senha" maxlength="8" placeholder="8 dígitos" />

                    <button type="submit">Cadastrar</button>

         </form>

Arquivo func_cadastrar_usuario.php, onde eu cadastro o usuários
<?php
include("conexao.php");

@$nome  = $_POST["nome"];
@$email = $_POST["email"];
@$sexo  = $_POST["sexo"];
@$login = $_POST["login"];
@$senha = md5($_POST["senha"]);

if(empty($nome)){

    echo"";

}elseif(empty($email)){

    echo"";

}elseif(empty($login)){

    echo"";

}elseif($senha == 'd41d8cd98f00b204e9800998ecf8427e'){

    echo"";

}else{

    $consuta = mysql_num_rows(mysql_query("SELECT * FROM usuarios WHERE login = '$login'"));

    if($consuta == 1){

        echo"";

    }else{

        mysql_query("INSERT INTO usuarios (nome, email, sexo, login, senha) VALUES ('". $nome ."','". $email ."', '". $sexo ."', '". $login ."', '". $senha ."')");
        echo"";
    }
}

}
?>

A: Sugiro que cries um template no lado do servidor. No fundo é um pedaço que podes copiar, inserir os novos dados e colocar na tabela.
Assim no servidor gera isto quando a página gerada:
<template>

        AlterarExcluir

</template>

Depois no JavaScript vais buscar essa tr cloná-la e inserir os dados novos:
$('#cadastrar_usuario').submit(function(event) {
    event.preventDefault();
    var form = this;
    var formDados = new FormData(form);

    $.ajax({
        url: 'func_cadastrar_usuario.php',
        type: 'POST',
        data: formDados,
        cache: false,
        contentType: false,
        processData: false,
        success: function(data) {
            $('#resultado').html(data);
            var tr = document.querySelector('template').content.querySelector("tr");
            var clone = document.importNode(tr, true);
            $(clone).find('td').each(function() {
                var type = this.dataset.type;
                if (type) {
                    this.innerTHML = form.querySelector('[name="' + type + '"]').value;
                } else {
                    // caso da ultima td
                    $(this).find('a').last().attr('id', form.querySelector('[name="id"]').value);
                }
            });
            $('#exibir_dados').append(clone);
        },

Nota:

*

*no teu código há vários erros, é possivel que a minha solução não funcione à primeira, mas mostra-te o caminho a seguir.

*desaconselho usar CSS em atributos, inline, como <td width="30". Isso dificulta muito a manutenção do código.

*os IDs têm de ser únicos. Nenhum elemento da página pode ter o mesmo ID que um outro. Essa é a diferença fundamental entre class e id.


text:
Q: Как работать с мултитач на Unity? Например так: нажал на левую сторону экрана - вывелось "Hi", а на правую - "Bye". Когда обе нажал - "Good". Некоторые советуют количество пальцев считать, а мне надо чтобы в определенных участках были нажатия. Если два пальца с правой стороны экрана тапнуть, всё равно "Bye" должно вывести. Это как пример. Мне нужно понять как реализуется.

A: Попробуйте использовать зоны и интерфейсы IPointerDownHandler и IPointerUpHandler. (для их работы на сцене должен быть скрипт EventSystem - он создаётся автоматически при создании первого Canvas)
Первый срабатывает, когда произошло нажатие на объект, на котором висит скрипт, а второй, когда оно закончилось.
Условно, самая простая реализация следующая - делаете две прозрачные картинки в нужных вам местах. Вешаете на них скрипты, которые реализуют эти два интерфейса. Делаете общий класс отвечающий за выведение вашего текста и имеющий две bool переменные - isLeft и isRight.
Когда IPointerDownHandler срабатывает - меняете соответствующий стороне срабатывания bool на true, после чего проверяете оба bool и выводите соответствующий текст.
Соответственно при срабатывании IPointerUpHandler - меняете соответствующий bool на false и опять проверяете переменные и меняете текст.


text:
Q: How to redirect with a variable path segment? I spent some minutes to try to resolve this but I can't.
I would like to make a redirection rule that redirects:
https://www.example.com/membres/XXX/participations/

To:
https://www.example.com

Whatever the value of XXX as long as the URL has the same pattern (begins with "membres" and finish with "participations").
This is the code I wrote before but it did not work, please explain to me what's wrong:
RewriteRule ^membres/(.*)/participations/$ /

A:
RewriteRule ^membres/(.*)/participations/$ /

Assuming this directive is near the top of you config file and providing you also included an R (redirect) flag to trigger an external redirect, and possibly included the L (last) to prevent later directives (if any) from rewriting the URL then this directive should have redirected the example URL given in your question.
If you omit the R flag then it will trigger an internal rewrite. No external redirect will occur.
The only real difference with the directive suggested in comments, is that it makes the trailing slash optional. So, if that enabled the redirection to work then it would imply that the requested URL did not contain a trailing slash.
The capturing backreference (ie. (.*)) is not required. And you should consider making this pattern more restrictive to only match a single path segment, rather than anything?
If you have no other mod_rewrite directives in your .htaccess then you should consider using a mod_alias RedirectMatch directive instead, which is arguably more efficient:
RedirectMatch ^/membres/.*/participations/?$ /