---
abstract: 'Crosstalk, also known by its Chinese name [*xiangsheng*]{}, is a traditional Chinese comedic performing art featuring jokes and funny dialogues, and one of China’s most popular cultural elements. It is typically in the form of a dialogue between two performers for the purpose of bringing laughter to the audience, with one person acting as the leading comedian and the other as the supporting role. Though general dialogue generation has been widely explored in previous studies, it is unknown whether such entertaining dialogues can be automatically generated or not. In this paper, we for the first time investigate the possibility of automatic generation of entertaining dialogues in Chinese crosstalks. Given the utterance of the leading comedian in each dialogue, our task aims to generate the replying utterance of the supporting role. We propose a humor-enhanced translation model to address this task and human evaluation results demonstrate the efficacy of our proposed model. The feasibility of automatic entertaining dialogue generation is also verified.'
author:
- |
    Shikang Du, Xiaojun Wan, Yajie Ye\
    Institute of Computer Science and Technology, The MOE Key Laboratory of Computational Linguistics\
    Peking University, Beijing 100871, China\
    {dusk, wanxiaojun, yeyajie}@pku.edu.cn\
bibliography:
- 'aaai18.bib'
title: Towards Automatic Generation of Entertaining Dialogues in Chinese Crosstalks
---

[UTF8]{}[gbsn]{}

Introduction
============

Crosstalk, also known by its Chinese name *相声/xiangsheng*, is a traditional Chinese comedic performing art, and one of China’s most popular cultural elements. It is typically in the form of a dialogue between two performers, but much less often can also be a monologue by a solo performer, or even less frequently, a group act by multiple performers. The crosstalk language, rich in puns and allusions, is delivered in a rapid, bantering style. The purpose of Xiangsheng is to bring laughter to the audience, and the crosstalk language features humorous dialogues [@link1979genie; @moser1990reflexivity; @terence2013china; @mackerras2013performing].

The language style of crosstalk is just like chatting or gossip, but is more funny and humorous, especially in crosstalks given by two performers. It would be an ideal resource for studying humor in dialogue system.

However, there are some special rules in crosstalks. For the crosstalk between two performers, one person acts as the leading comedian (or [*逗哏/dougen*]{} in Chinese) and the other as the supporting role (or [*捧哏/penggen*]{}). The two performers usually stand before an audience and deliver their lines in rapid fire by turn. They echo each other in the crosstalk performance. In each turn, the leading role usually tells stories and jokes, or does some sound imitation in his utterance, and the supporting role points out the humorous point in the leading role’s performance, or even adds fuel to the leading role’s performance, making it funnier. For example,

  -------- -------------------------------------------------
  **A**:   楚国大夫屈原，五月初五死的，我们
           应该永远怀念屈原。要是没有屈原，
           我们怎么能有这三天假期呢？
           The mid-autumn festival is in memory of Qu
           Yuan. We should keep him in mind forever,
           because his death brings us this 3-day holiday.
  **B**:   这个，代价大点儿。
           It costs him a lot (to have a holiday).
  **A**:   我觉得应该再多放几天假。
           I think it would be better with more holidays.
  **B**:   那得死多少人啊。
           How many people would die then!
  -------- -------------------------------------------------

In this example, B acts as the supporting role. His last response unexpectedly links the number of holiday with the number of people died, which makes the whole dialogue more funny. But in many cases, the supporting one acts as a go-between, gives positive response (such as “当然/Of course” or “这样/That’s why”) or negative response (such as “啊？/Ah?”), and sometimes repeats key points in the leading role’s utterance, making the narration given by the leading role go smoothly (e.g. A: 虽然道路崎岖，所幸还有蒙蒙月色/ Although the road is rough, the moonlight is bright. B:还能看见点/ We can still see things on the road.) In brief, the crosstalk between two performers can be considered a special and challenging dialogue form - the entertaining dialogue.

Though general dialogue generation has been widely explored and achieved great success in previous studies [@li-EtAl:2016:EMNLP20162; @sordoni-EtAl:2015:NAACL-HLT; @ritter2011data], it is unknown whether such entertaining dialogues can be automatically generated or not. If computers can generate entertaining dialogues well, the AI ability of computer will be further validated. The function of generating entertaining dialogues is also very useful in many interactive products, making them more appealing. In this study, we for the first time investigate the possibility of automatic generation of entertaining dialogues in Chinese crosstalks. Given the utterance of the leading comedian in each dialogue, our task aims to generate the replying words of the supporting role.

We propose a humor-enhanced translation model to address this special and challenging task, and the model explicitly leverages a sub-model to measure the humorous characteristic of a dialogue. Human evaluation results on a real Chinese crosstalk dataset demonstrate the efficacy of our proposed model, which can outperform several retrieval based and generation based baselines. The feasibility of automatic entertaining dialogue generation is also verified.

The contributions of this paper are summarized as follows:

1\) We are the first to investigate the new task of entertaining dialogue generation in Chinese crosstalks.

2\) We propose a humor-enhanced translation model to address this challenging task by making use of a sub-model to measure the humorous characteristic of a dialogue.

3\) Manual evaluation is performed to verify the efficacy of our proposed model and the feasibility of automatic entertaining dialogue generation.

In the rest of this paper, we will first describe the details of our proposed model and then present and discuss the evaluation results. After that, we introduce the related work. Lastly, we conclude this paper.

Our Generation Method
=====================

Given an utterance $\mathbf{s}$ of the leading role (i.e. *dougen*) in Chinese crosstalks, our task aims to generate the replying utterance $\mathbf{r}$ of the supporting role (i.e. [*penggen*]{}), which is called crosstalk response generation (CRG). The generated utterance needs to be fluent and related to the leading role’s utterance. Moreover, it is also expected that the generated utterance can make the dialogue more funny and entertaining.

As mentioned earlier, our task is a special form of dialogue generation. In recent years, there are many methods proposed for dialogue generation based on a large set of training data, including the deep learning methods (especially sequence-to-sequence models) [@li-EtAl:2016:EMNLP20162]. However, deep learning methods usually require a large training set to achieve good performance in dialogue generation tasks, which is hard to obtain for our task. So, we choose a more traditional but effective way based on machine translation to address the new task of crosstalk response generation.

*penggen* often gives comments on *dougen*’s utterance, sometimes *penggen* even retells the *dougen*’s words but in a more humorous way. We believe that the *dougen*’s response has some potential patterns according to the utterance given by *penggen*, and treat response generation as a monolingual translation problem, in which the given input (utterance given by *dougen*) is treated as the foreign language and the humorous response as the source language. Machine translation (MT) has already been successfully used in response generation [@ritter2011data], in which input post was seen as a sequence of words, and word or phrase based translation was made to generate another sequence of words as response. If we simply treat crosstalk response generation as a general dialogue generation problem, we can apply statistical machine translation (SMT) model [@koehn2003statistical] to generate responses accordingly, ignoring the entertaining characteristic of crosstalk. In machine translation, beam search is used in decoding process, which could generate multiple candidates with scores. Usually only the candidate with the highest score could be accepted. These scores reflects the similarity of the candidate and reference. However, just like that some question may have many different answers, there might still be acceptable, or even unexpected but wonderful candidates with lower scores. It’s a pity to get these good response ignored just because they shares little similarity with the references in a limited training dataset. To exploit them, and also to address the crosstalk generation problem, we propose a humor-enhanced machine translation model to generate response utterance in crosstalk. Our proposed model leverages a sub-model to explicitly model the degree of humor of a dialogue, and integrate it with other sub-models, as illustrated in **Figure \[fig:sys\]**.

![\[fig:sys\] General architecture of our system](xiangsheng_high_level.pdf){width="80mm"}

Response Generation Model
-------------------------

We get pairs of aligned utterance and response from the dialogue fragments in Chinese crosstalks, which are considered monolingual parallel data. The two performers echo each other in a crosstalk, and their roles keep consistent in the whole crosstalk, and the leading role and the supporting role of each utterance can be easily identified. Then we segment the utterances into words. Each pair consists of a sequence of words $\mathbf{s} (\{s_1, s_2, ..., s_l\})$ spoken by the leading role, and a sequence of words $\mathbf{ref}$ replied by the supporting role, while the response we generated is denoted as $\mathbf{r} (\{r_1, r_2, ..., r_l\})$.

Given the leading role’s utterance $\mathbf{s}$, we aim to generate the best response utterance $\mathbf{r}$ by using our proposed generation model. The proposed generation model has three sub-models(M1, M2, M3): translation model, language model and humor model. We will introduce each sub-model and then introduce the framework of model combination.

### Translation Model (M1)

The translation model translates the given leading role’s utterance $\mathbf{s}$ into a sequence of words $\mathbf{r}$, which is treated as the response. Let $({s}_i, {r}_i)$ be a pair of translation units, we can compute the word translation probability distribution $\phi_{tm}({s}_i, {r}_i)$ , which is defined in [@koehn2003statistical]. Each word $s_i$ in input utterance is translated to a word in response $r_i$, and the word in response would be reordered.

Reordering of generated response is modeled by a relative distortion probability distribution $d(a_i - b_{i-1})$, where $a_i$ is the starting position of the word in the input utterance $\mathbf{s}$ translated to the $i$-th word in generated response $\mathbf{r}$, and $b_{i-1}$ denotes the end position of the word in the input utterance translated into the $(i-1)$-th word in the response. We use $d=\alpha^{|x-1|}$ as implementation.

Thus, the translation score between the leading role’s utterance $\mathbf{s}$ and generated response $\mathbf{r}$ is: $$%   p_{tm}\left( \mathbf{s}, \mathbf{r} \right) = D(\mathbf{s}, \mathbf{r}) \prod_{i=1}^{l}\phi_{tm}({s}_i, {r}_i)
    p_{tm}\left( \mathbf{r}, \mathbf{s} \right) = \prod_{i=1}^{l}\phi_{tm}({s}_i, {r}_i) d(a_i - b_{i-1})$$

### Language Model (M2)

We use a 4-gram language model in this work. The language model based score is computed as:

$$p_{lm}({\mathbf r}) = \prod_j p(r_j|r_{j-3}r_{j-2}r_{j-1})$$

where $r_j$ is the $j$-th element of $\mathbf r$.

### Humor Model (M3)

We want to build a model to measure the degree of humor of a dialogue. However, humor is very complex. In Chinese crosstalks, humor can be expressed by the actors’ tone, body language and verbal language. In this study, we mainly focus on modeling the verbally expressed humor in crosstalks.

We build a classifier to determine the probability of being humorous for each response candidate in the context of the input utterance. In this model, we evaluate humor in 4 dimensions, just as the same as [@yang2015humor] : (a) Incongruity, (b) Ambiguity, (c) Interpersonal Effect, and (d) Phonetic Style.

Incongruity structure plays an important role in verbal humor, as stated in [@lefcourt2001humor] and [@paulos2008mathematics]. Although it is hard to determine incongruity, it is relatively easier to calculate the semantic disconnection in a sentence. We use Word2vec to derive the word embeddings and then compute the distances between word vectors.

When a listener expects one meaning, but is forced to use another meaning [@yang2015humor], there is ambiguity. This distraction often makes people laugh. To measure the ambiguity in the sentence, we collect a number of antonyms and synonyms for feature extraction. Note that antonyms are used as as an important feature in humor detection in [@mihalcea2005making]. Using Chinese WordNet [@huang2010infrastructure], we get the pairs of antonyms and synonyms.

Interpersonal effect is associated with sentimental effect [@zhang2014recognizing]. A word with sentimental polarity reflects the emotion expressed by the writer. We use a dictionary in [@Xu2008] to compute the sentimental polarity of each word, and add them up as the overall sentimental polarity of a sentence.

Many humorous texts play with sounds, creating incongruous sounds or words. Homophonic words have more potential to be phonetically funny. We count the number of homophonic words and words with the same rhyme, with the help of pypinyin[^1] .

Furthermore, adult slang is described in [@mihalcea2005making] as a key feature to recognize jokes, so we count the number of slangs.

Note that we extract features from the response alone and also extract features from the whole turn of dialogue consisting of both the given input utterance and the response. To summarize, the features we use are listed below:

-   minimum and maximum distances of each pair of word vectors in the response;

-   minimum and maximum distances of each pair of word vectors in the whole turn of dialogue (including the given input utterance and the response);

-   number of pairs of antonyms in the response;

-   number of pairs of antonyms in the whole turn of dialogue;

-   number of pairs of synonyms in the response;

-   number of pairs of synonyms in the whole turn of dialogue;

-   sentimental polarity in the response;

-   sentimental polarity in the whole turn of dialogue;

-   number of homophonic words in the response;

-   number of homophonic words in the whole turn of dialogue;

-   number of the words with same rhyme in the response;

-   number of the words with same rhyme in the whole turn of dialogue;

-   number of slangs in the response.

We choose the random forest classifier [@Liaw2002] because it generally outperforms other classifiers based on our empirical analysis.

The output probability for $\mathbf{r}$ is used as the humor model score $p_{hm}({\mathbf r})$.

### Model Combination

We use a log-linear framework to combine the above three sub-models and get our response generation model. Note that the translation model corresponds to two parts.

$$\begin{split}
        p({\mathbf r}|{\mathbf s})
        &= \lambda_{tm} \sum_i \log \phi_{tm}(s_i, r_i)\\
        &+ \lambda_{ds} \sum_i \log d(a_i - b_{i-1})\\
        &+ \lambda_{lm} \sum_j \log p(r_j|r_{j-3}r_{j-2}r_{j-1})\\
        &%+ \lambda_{crm} \log p_{crm}({\mathbf r})
        + \lambda_{hm} \log p_{hm}({\mathbf r})
    \end{split}$$

where $\lambda_{tm}$, $\lambda_{ds}$, $\lambda_{lm}$and $\lambda_{hm}$ are weight parameters of the sub-models and can be learned automatically.

Learning and Decoding
---------------------

In the model M1, we use relative frequency to estimate the word translation probability distribution $\phi_{tm}({s}_i, {r}_i)$, and no smoothing is performed.

$$\phi_{tm}(s, r) = \frac{\mathrm{count}(s,r)}{\sum_s (s,r)}$$

A special token NULL is added to each utterance and aligned to each unaligned foreign word.

The training process is similar to that in [@ritter2011data]. We use the widely used toolkit Moses [@koehn2007moses] to train the translation model.

The scikit-learn toolkit[^2] is used and the probability of prediction is acquired through the API function of [predict\_proba]{}.

In order to estimate weight parameters in the combined model, we apply the minimum error rate training (MERT) algorithm [@Och:2003:MER:1075096.1075117], which has been broadly used in SMT. The most common optimization objective function is BLEU-4 [@papineni2002bleu], which requires human references. We take the original human response derived from our parallel corpus as the single reference. We use the tool Z-MERT [@zaidan2009z] for estimation. The weight parameter values that lead to the highest BLEU-4 scores on the development set are finally selected.

In the decoding process, we use the beam search algorithm to generate the top-100 best response candidates for each input utterance based on M1 and M2. Then we obtain the score of M3 of each candidate, rank the candidates according to the combined model and select the best candidate as output.

Final Reranking with the Humor Model
------------------------------------

Note that the above combined model is optimized for the BLEU-4 score, but the BLEU-4 score cannot well reflect the humorous aspect of generated responses, so in order to improve the humor level of a dialogue, we further select the top-five best response candidates generated by the above combined model and rerank them according to the score of the humor model (M3), and finally use the top-ranked one as the output. Note that We use only top five candidates in this step because it is more efficient and effective to rerank a small number of high-quality candidates, while the readability and relevance of other candidates with low ranks cannot be guaranteed. The number of five is determined based on the development set.

Experiment Setup
================

Experiment Data
---------------

We collect the crosstalk data from multiple sources: (a) published books[^3]; (b) websites[^4] , where Chinese crosstalk fans collect and collate existing famous crosstalk masterpieces. (c) records of crosstalk play. The dataset we collect consists of over $173,000$ pairs of utterances, from $1,551$ famous excerpts of crosstalks. Since long sentences would slow down our training process, we filtered out responses longer than 60 words. In order to improve qualty, we also filtered out very short responses that are usually 1 modal particles. Over $150,000$ utterances was used in our dataset after this process. We divide the pairs of utterances and responses in the dataset into three parts, and we randomly select $2000$ pairs as the test set, $4000$ pairs as the development set for weight parameter estimation, and the rest as the training set for translation model.

Since training language model requires a large-scale dataset, which could hardly be offered in the domain of crosstalks, we add Chinese microblog messages from Sina Weibo[^5] to enlarge the corpus for language model training. The language styles in Weibo and Chinese crosstalks are quite similar in that the sentences in Weibo messages and crosstalks are usually short and informal. We collect 6 million pieces of Weibo messages and comments from Sina Weibo.

Not all utterances in Chinese crosstalks are humorous, because there are many utterances serving as go-betweens, so we have to manually build the training data for humor model learning. Because of the lack of Chinese humorousness dataset, we randomly collect $6000$ pairs of utterances in Chinese crosstalks, and manually label them into two classes: [*humorous*]{} or [*not humorous*]{}. $348$ pairs are marked as [*humorous*]{}, and we replicate the minor class instances and remove some major class instances to make the class distribution more balanced.

Then we use the labeled data for training the random forest classifier in the humor model.

Comparison Methods
------------------

We implement retrieval based methods for comparison:

-   [**Seq2Seq**]{}: Treat this problem as translation problem with <span style="font-variant:small-caps;">Seq2Seq</span> model with attention. GRU cells are used in RNN, and number of cells are 256.

-   [**Ir-Ur**]{}: Retrieve the response which is most similar to the input utterance from both the development set and the training set.

-   [**Ir-Uu**]{}: Retrieve the most similar utterance to the input utterance, and then return the response associated with the retrieved utterance;

-   [**Ir-Cxt**]{}: Retrieve the response which is most similar to the input utterance and three previous utterances of the input utterance;

Similarity was calculated by comparing word-level cosine similarity.

Our proposed method consists of all the three sub-models (including the final selection step), named as [**Smt-H**]{}. We further compare our method with the basic machine translation method considering two sub-models M1, M2, named as [**Smt**]{}.

Note that in our method, the humor model is used in both the combined model and the final reranking process.

Evaluation Metrics
------------------

We adopt human evaluation to verify the effectiveness of our system. We also report automatic evaluation results with BLEU [@papineni2002bleu]. But in the dataset only one reference response is provided for each given utterance, and the humor aspect cannot be well captured by the BLEU metrics. So we rely both on automatic and human evaluation results for this special task.

We employ two human judges to rate each generated response in three aspects:

**Readability**: It reflects the grammar correctness and fluency;

**Entertainment**: It reflects the level of humor of the response;

**Relevance**: It reflects the semantic relevance between the input utterance and the response generated. It also reflects logic and sentimental consistency.

Each judge is asked to assign an integer score in the range of 0 $\sim$ 2 to each generated response with respect to each aspect. The score $0$ means “poor” or “not at all”, $2$ means “good” or “very well”, and $1$ means “partially good” or “acceptable”. For example, In readability, $1$ means that there are some grammar mistakes but human evaluator can still understand the meaning of the response.

To help human raters to determine whether the generated response is relevant to the input utterance, we also provide previous two rounds of dialogues of the input utterance to the raters.

Result and Analysis
===================

Automatic Evaluation Results
----------------------------

As shown in \[res-auto\], we found the BLEU score of our <span style="font-variant:small-caps;">Smt-H</span> is higher than baselines in the $2000$ utterances test set, which can be simply explained since more global features could be accessed in our <span style="font-variant:small-caps;">Smt-H</span> model. *t*-test results on BLEU scores of the two model show that their difference is significant ($p< 1\times 10{-5}$).

                                                          BLEU-4      BLEU-3      BLEU-2      BLEU-1
  ------------------------------------------------------- ----------- ----------- ----------- -----------
  <span style="font-variant:small-caps;">Smt-H</span>     **16.62**   **18.99**   **22.41**   **29.57**
  <span style="font-variant:small-caps;">Smt</span>       15.13       17.39       20.62       27.39
  <span style="font-variant:small-caps;">Seq2Seq</span>   16.03       17.76       20.63       27.66
  <span style="font-variant:small-caps;">Ir-Uu</span>     2.6         3.51        5.52        12.53
  <span style="font-variant:small-caps;">Ir-Ur</span>     4.4         5.15        6.83        13.13
  <span style="font-variant:small-caps;">Ir-Cxt</span>    3.14        4.17        6.34        13.76
  <span style="font-variant:small-caps;">Rnd</span>       0.00        0.00        1.65        9.73

  : Automatic Evaluation Result of <span style="font-variant:small-caps;">Smt</span>, <span style="font-variant:small-caps;">Smt-H</span> and <span style="font-variant:small-caps;">Seq2Seq</span>[]{data-label="res-auto"}

As expected, the <span style="font-variant:small-caps;">Seq2Seq</span> model could get better scores in our automatic test than ordinary <span style="font-variant:small-caps;">Smt</span> model, but not better than our <span style="font-variant:small-caps;">Smt-H</span> model. A larger training set might help improve performance of the deep learning based model. BLEU scores of all <span style="font-variant:small-caps;">Ir</span> based models are lower than $5\%$ One possible reason is that the crosstalk dataset is not very large, and the utterances in the dataset are very diversified, so it is hard for retrieval based methods to find proper responses from the dataset directly. While generation based methods are more flexible and they can generate new responses for input utterances. For the retrieval based methods, IR-UR performs better than IR-UU, which is contrary to our intuition. This phenomenon has been discussed in [@ritter2011data].

Human Evaluation Results
------------------------

We randomly selected $150$ input utterances in the test set and asked two raters to label the responses generated by retrieval based methods and machine translation based methods. The percentage of each rating level is calculated for each method with respect to each aspect, as shown in **Figure \[fig:score\]**. Since retrieval based methods extract existing utterances directly from the dataset, the readability of the retrieved responses is usually very good and thus we do not need to label the readability of these responses. We further compute the relative ratio of the average rating score of each method to the average rating score of the basic [Smt]{} model with respect to each aspect, as shown in **Table \[res-relative\]**, and a ratio score larger than 100% means the corresponding method performs better than the basic [Smt]{} model, while a ratio score lower than 100% means the corresponding method performs worse than the basic [Smt]{} model.

                  <span style="font-variant:small-caps;">Smt</span>   <span style="font-variant:small-caps;">Smt-H</span>   <span style="font-variant:small-caps;">Seq2Seq</span>   <span style="font-variant:small-caps;">Ir-Uu</span>   <span style="font-variant:small-caps;">Ir-Ur</span>   <span style="font-variant:small-caps;">Ir-Cxt</span>
  --------------- --------------------------------------------------- ----------------------------------------------------- ------------------------------------------------------- ----------------------------------------------------- ----------------------------------------------------- ------------------------------------------------------
  Readability     100.00%                                             100.41%                                               110.74%                                                 -                                                     -                                                     -
  Entertainment   100.00%                                             120.59%                                               69.12%                                                  4.47%                                                 8.94%                                                 13.41%
  Relevance       100.00%                                             98.42%                                                99.74%                                                  28.69%                                                58.97%                                                39.84%

As can be seen from the human evaluation results, the responses generated by machine translation based methods are much more entertaining and relevant than retrieval based methods. We also find that that [Ir-Ur]{} returns more relevant responses than [Ir-Uu]{}. It also reveal that the translation model could generate more entertaining but less fluent response than <span style="font-variant:small-caps;">Seq2Seq</span> model. It could be explained that the responses generated by <span style="font-variant:small-caps;">Seq2Seq</span> model are too ordinary to get people feel amused. Comparing [Smt]{} with [Smt-H]{}, we can see that [Smt-H]{} receives higher rating scores than [Smt]{} with respect to fluency and entertainment. The comparison results demonstrate that the use of the humor model can indeed make the generated responses more entertaining, which is very important for Chinese crosstalks. An auxiliary effect by using the humor model is to improve the readability of the generated responses.

Now we show two examples of input utterances and different responses generated by [Ir-Uu]{}, [Smt]{} and [Smt-H]{} as follows:

  --------------------------------------------------------------- -------------------------------------
  **A**:                                                          躲？我把扁担一横，立托千斤
  *(context)*                                                     闸，迎着他的铁棍——咔！ /Hide?
                                                                  I bravely used my shoulder pole to
                                                                  meet against his iron bar... Crack!
  **B**:                                                          铁棍飞 。/His iron bar dropped?
  **A(input)**:                                                   扁担折了。 /No, my shoulder pole
                                                                  was fractured.
  **B(<span style="font-variant:small-caps;">Smt</span>)**:       搁在一块儿说个绕嘴的折了拿
                                                                  什么打？ /Put them together
                                                                  and tell me a tongue twister,
                                                                  what else could be used to meet
                                                                  against his weapon?
  **B(<span style="font-variant:small-caps;">Smt-H</span>)**:     好 — 折啦 ？
                                                                  /What? It was fractured?
  **B(<span style="font-variant:small-caps;">Seq2Seq</span>)**:   这回该二朝的关系? /
                                                                  (*Broken sentences*)
  **B(<span style="font-variant:small-caps;">Ir-Uu</span>)**:     都知道。
                                                                  /We all know that.
  --------------------------------------------------------------- -------------------------------------

  **B***(context)*:                                               老乡们 / My Fellow villagers
  --------------------------------------------------------------- -------------------------------
  **A(input)**:                                                   猪尾巴 / The pork tail
  **B(<span style="font-variant:small-caps;">Smt</span>)**:       噢！才生下来的？你？
                                                                  /Were just born? You? Are you
                                                                  kidding me?
  **B(<span style="font-variant:small-caps;">Smt-H</span>)**:     注意吧 / Pay attention
  **B(<span style="font-variant:small-caps;">Seq2Seq</span>)**:   注意吧 / Pay attention
  **B(<span style="font-variant:small-caps;">Ir-Uu</span>)**:     嗬 / Ho

In the first example, the response generated by <span style="font-variant:small-caps;">Smt-H</span> is more related to the input utterance. In the second example, the Chinese phrase 猪尾巴/“pork tail” has the same pronunciation with 注意吧/“pay attention” in the response generated by <span style="font-variant:small-caps;">Smt-H</span>. It is laughable since the supporting role (B) distorts A’s utterance’s meaning with a skill of homophonic, while the responses generated by <span style="font-variant:small-caps;">Smt</span> and <span style="font-variant:small-caps;">Ir-Uu</span> are totally irrelevant.

Discussion
----------

Our method works well with short input. It can generate appropriate responses which act as go-between in narration. For example,

**A**: 你爸爸穿衣裳也讲究。/ Your father is dainty about his dress.

**B**(<span style="font-variant:small-caps;">Smt-H</span>): 怎么讲究？/ Dainty? How ?

Some responses generated by our method are entertaining. For example,

**A**: 龙生龙, 凤生凤, 老鼠的儿子会打洞/Dragon born dragon, chicken born chicken, mouse’s son could only make hole. (*You are just like a mouse.*)

**B**(<span style="font-variant:small-caps;">Smt-H</span>): 你不是后继无鼠了吗这代, 您这套我都会了。/ You even don’t have a mouse-like successor! I’ve found out your strategy.

With the use of the humor model in the combined model and the use of it in the final reranking process, our method can generate better response. For example,

**A**: 比如说我是天上的一颗星星。/ For example, I am a star in the heaven.

**B**(<span style="font-variant:small-caps;">Smt-H</span>): 噢这是不是。 / Oh, is it this one?

**B**(<span style="font-variant:small-caps;">Smt</span>): 是噢是你。 / Well, it’s you.

**B**(<span style="font-variant:small-caps;">Seq2Seq</span>): 可不对。 / That’s right.

However, there are still several shortcomings for our method:

1\) Some generated responses are not fluent and the readability is not good. Some responses are broken sentences. For example,

**A**: 好，新春进步！/Well, hope you make progress in new spring.

**B**(<span style="font-variant:small-caps;">Smt-H</span>): 不春进步了。/Not spring progress.

The reason may be that the current crosstalk corpus is not adequate for training a high-quality language model, but unfortunately it is hard to obtain a large crosstalk corpus because fewer and fewer people still work on this performing art and create new crosstalks.

2\) In some cases, our method will only give the input words back without translation and rewriting (e.g. 八匹马呀/Ah, there are eight horses). This may be caused by the data sparsity problem in the dataset. If the words or expressions do not or seldom appear in the training corpus, our method cannot find any “translations” to them and can only return them back directly.

Related Work
============

The most closely related work is dialogue generation Previous work in this field relies on rule-based methods, from learning generation rules from a set of authored labels or rules [@Oh:2000:SLG:1117562.1117568; @banchs2012iris] to building statistical models based on templates or heuristic rules [@levin2000stochastic; @pieraccini2009we]. li-EtAl:2017:EMNLP20175 After the explosive growth of social networks, the large amount of conversation data enables the data-driven approach to generate dialogue. Research on statistical dialogue systems fall into two categories: 1) information retrieval (IR) based methods [@ji2014information], 2) the statistical machine translation (SMT) based methods [@ritter2011data]. IR based methods aim to pick up suitable responses by ranking candidate responses. But there is an obvious drawback for these methods that the responses are selected from a fixed response set and it is not possible to produce new responses for special inputs. SMT based methods treat response generation as a SMT problem on post-response parallel data. These methods are purely data-driven and can generate new responses.

More recently, neural network based methods are being applied in this field . In particular, <span style="font-variant:small-caps;">Seq2Seq</span> model and reinforcement learning are used to improve the quality of generated responses [@li-EtAl:2016:EMNLP20162]. Adversarial learning are also applied in this field in recent years [@li-EtAl:2017:EMNLP20175]. [@serban2017hierarchical] introduced stochastic latent variable into RNN model into the response generation problem. Neural network based methods are promising for dialogue generation. However, as mentioned in section 2, training a neural network model requires a large corpus. Sometimes it is hard to obtain a large corpus in a specific domain, which limits their performance. Another kind of related work is computational humor. Humor recognition or computation in natural language is still a challenging task. Although understanding universal humor characteristics is almost impossible, there are many attempts to capture latent structure behind humor. Taylor used ontological semantics to detect humor. Yang identified several semantic structures behind humor and employed a computational approach to recognizing humor. Other studies also investigate humor with spoken or multimodal signals [@purandare2006humor]. But none of these works provide a systematical explanation of humor, not to mention recognizing humor in Chinese crosstalks.

Moreover, there are several studies attempting to generate puns and jokes. For example, The JAPE system was developed to automatically generate punning riddles [@binsted1994implemented; @binsted1997computational], and it relies on a template-based NLG system, combining fixed text with slots. Following the seminal work of Binsted and Ritchie, the HAHAcronym system was developed to produce humorous acronyms [@stock2005act] and the subsequent system of [@binsted2003pun] focuses on the generation of referential jokes. More recently, an interesting unsupervised alternative to this earlier work was offered [@petrovic2013unsupervised], and it does not require labeled examples or hard-coded rules. It starts from a template involving three slots and then finds funny triples. However, the task of entertaining dialogue generation has not been investigated.

Conclusions and Future Work
===========================

In this paper, we investigate the possibility of automatic generation of entertaining dialogues in Chinese crosstalks. We proposed a humor-enhanced translation model to generate the replying utterance of the supporting role, given the utterance of the leading comedian in Chinese crosstalks. Evaluation results on a real Chinese crosstalk dataset verify the efficacy of our proposed model, especially the usefulness of the humor model.

In future work, we will try to enlarge the dataset by exploiting dialogue data in other similar domains, aiming at further improving the performance. We will also investigate generating the utterance of the leading role in the crosstalks, given the context utterances in several previous turns of dialogues.

[^1]: http://pypi.python.org/pypi/pypinyin

[^2]: http://scikit-learn.org/stable/index.html

[^3]: (1)Liu Yingnan. [*A Complete Collection of China Traditional Cross Talks 5 Vols.*]{}, Culture and Art Publishing House, 2010.   (2)Wang Wenzhang. [*Famous Crosstalk Actor’s Masterpiece Series*]{}, Culture and Art Publishing House, 2004. et,al.

[^4]: \(1) http://www.xiangsheng.org; (2) http://www.tquyi. com; et, al.

[^5]: http://weibo.com


Prevalent SLC26A4 mutations in patients with enlarged vestibular aqueduct and/or Mondini dysplasia: a unique spectrum of mutations in Taiwan, including a frequent founder mutation.
The purpose of the study is to elucidate the mutation spectrum of SLC26A4 among patients with enlarged vestibular aqueduct and/or Mondini dysplasia in Taiwan and to explore the origin of the most common mutation, IVS7-2A>G. The correlation between the genotypes and the phenotypes is also investigated, with special emphasis placed on comparison between the genotypes and hearing levels. A 3-year prospective clinical genetic study at a tertiary care university hospital. Mutations on SLC26A4 were screened in 38 families that fulfilled the criteria of enrollment, and single nucleotide polymorphisms (SNPs) in the vicinity of IVS7-2A>G were typed. The presence of goiter, radiologic findings, and audiologic results of the probands were then compared according to the genotypes. A total of eight mutations were detected in 33 families, and IVS7-2A>G accounted for 84% (48/57) of the mutated alleles. SNP analysis confirmed the founder effect of IVS7-2A>G. Meanwhile, no obvious correlation was observed between SLC26A4 genotypes and phenotypes. The present study disclosed the unique SLC26A4 mutation spectrum in Taiwan, confirmed that IVS7-2A>G arose from a common ancestor, and demonstrated the lack of correlation between genotypes and phenotypes. High prevalence of certain SLC26A4 mutations in East Asians, as revealed here and previously, might largely facilitate mutation screening and genetic counseling in these areas.


Defender denies Reds talk

Cesar Azpilicueta says there has been no contact from Manchester United boss Jose Mourinho and insists he is happy at Chelsea.

Reports are rife that Mourinho is keen to return to Stamford Bridge and swoop for the Spain international, who has been a revelation since joining the Blues, but there has been no contact as yet.

Azpilicueta is currently at Euro 2016 with the rest of the Spain squad, but was quick to deny United had been in touch when quizzed by a local radio station.

When asked if Mourinho had been in touch, he replied: “No. [You can] Believe me or not.”

The defender then revealed he is aware of interest in him with Athletic Bilbao also known to be keen, but reaffirmed his commitment to Chelsea ahead of the new season.

“It’s always a compliment that you are wanted, I’ve heard highly about Valverde [Bilbao’s manager], but I’m focused on the national team and Chelsea, I’ve been there for four years, I am very happy and I feel highly valued,” he added.

Mourinho has also been linked with Chelsea midfielder Nemanja Matic, and he looks sure to attempt some kind of raid on Stamford Bridge over the summer.


[/caption]

Mars is not the dead world we once thought it was, and these images portray that fact. Stuart Atkinson (not a relative, but a good pal) is part of the UnmannedSpaceflight.com crew, the folks who have created fantastic visual treats from raw images sent back from our space exploring robots. Stu also has his own website, Cumbrian Sky . Today, Stu posted some pictures on his website, along with his story of how he came to create an utterly fantastic image from a rather ordinary-looking picture from the HiRISE camera on the Mars Reconnaisaince Orbiter. After seeing Stu’s handiwork today, I asked him if he wouldn’t mind sharing his story on Universe Today of how he came to make an amazing discovery on Mars. (Click on the image above for a larger version.)

Stu said he found the image above on the “dangerously addictive” Mars Global Data website. The image, of the Aram Chaos region, didn’t look very interesting at first. But then he zoomed in to get a better look at the “slumpy” feature in the middle of the image, and then zoomed in some more. “It looked like a section of the valley wall had come loose and slid down to the lower ground below,” Stu said as he raised a Spock-like eyebrow…

There, he discovered the track of a huge boulder that had “fallen from the valley wall and tumbled down, bouncing and rolling and boinging along for a long, long way.”

Adding color to the image really highlighted the tracks left by the bouncing boulder, and a few other tracks showed up as well, creating an absolutley awesome image and discovery!

“You know what I love about these images?,” Stu wrote on his blog. “They show movement, they show that things are moving on Mars right now. It’s not the dead, lifeless, corpse of a world I grew up with; it’s a world – we now know – where dust devils whirl and twirl across the plains… where clouds drift through the pale pink sky… and where huge stones fall from high cliff face, fall to the ground below, then bounce and roll and crash over it… unseen by anyone.”

“For now.”

Great detective work, Stu! I propose that this region should be named after Stuart Atkinson (at least the boulders, if nothing else!)

Also, check out Stu’s pictoral history of the International Space Station, starting from when it was a wee infant back in 1998 to the great images we’ve seen of the ISS this past week.


Are You Setting Yourself Up for Burnout?

Physician burnout appears to be on the rise. Here’s why, along with some ideas on how to get better control.

While physician burnout has always been a problem, today’s doctors have more on their plates than doctors of previous generations, and they seem to be more affected by burnout than professionals in other fields.

A recent survey compared burnout and satisfaction with work/home life balance among physicians and those employed in other professions.1 The study included 7,288 physicians who completed surveys. When assessed using the Maslach Burnout Inventory, researchers found that 45.8 percent of physicians reported at least one symptom of burnout. Compared with a probability-based sample of 3,442 adults working in other professions, physicians were more likely to have symptoms of burnout (37.9 percent compared with 27.8 percent) and to be dissatisfied with their work/life balance (40.2 percent compared with 23.2 percent).

Why Do Physicians Burn Out?

“There are concerns that the ever-increasing pace of practice might be contributing to burnout because physicians are being asked to see more and more patients in less and less time,” says Colin P. West, MD, PhD, FACP, from the Divisions of General Internal Medicine and Biomedical Statistics and Informatics, Departments of Internal Medicine and Health Sciences Research, at the Mayo Clinic, in Rochester, Minn. “That sort of treadmill effect may play a role. There is also concern about what will happen if the practice of medicine continues to go in those directions while social structures are changing. For example, it is much more common to have dual-career households. Fifty years ago, stereotypically, the physician might work 60 hours a week while his wife was the homemaker. There was often a more starkly defined division of responsibilities. These days, spouses and partners don’t want that, and physicians themselves don’t want that. Today, there is the shared family model that I think is a societal change as well. That makes work/life balance that much more challenging.”

Additionally, there is much less division between work life and home life. With computers and smartphones, physicians may feel like they are always on call. It can be difficult to prevent work issues from invading home time. “One of my colleagues says that physicians can never disconnect from the grid,” Dr. West says. “We are connected with our smartphones, and we can remotely access into our patients’ data. There has always been some of that—physicians being on their pagers, etc.—but I think the volume may have increased.”

The Internet may also play a role. While there are benefits to seeing better-educated patients, some patients may present to the office with specific expectations based on their Internet research. “Some patients may view their relationship with the physician not as a partnership but more as the patient hiring the physician as a consultant and wanting to tell the physician what should be done instead of coming to a mutually agreed-upon decision that involves both of them working together,” Dr. West notes.

Helen Meldrum, EdD, an associate professor of psychology in the Program of Health Sciences and Industry at Bentley University in Waltham, Mass., agrees. “It’s only in recent times when a physician gives the patient a treatment option, and the patient says, ‘that’s not what I Googled.’ Physicians used to be able to count on a certain amount of authority, but their authority is at an all-time low because patients feel like they are well-educated by the Internet,” she says.

The business side of medicine may also be partly to blame. “When doctors go to medical school, they are looking forward to the chance to have relationships with patients,” Dr. West says. “Anything that gets in the way of those relationships can contribute to dissatisfaction and burnout. We have focused our work in the past decade on trying to document the problem, and it has been a really interesting transition in recent years. When we first started our group’s work, we would receive comments that people didn’t believe it was a significant issue. Now, we are getting a lot more acceptance that this is a pervasive problem.”

A recent study found that surgeons in private practice were more likely to experience burnout than their colleagues in academic practice.2 The study compared distress parameters and career satisfaction from survey results of surgeons in 14 specialties. It found that academic surgeons were less likely to screen positive for depression or to have suicide ideation. They were also more likely to experience career satisfaction and to recommend a medical career to their children.

For academic surgeons, the most significant positive associations with burnout were being a trauma surgeon, number of nights on call and hours worked. For private practice surgeons, the most significant associations with burnout were being a urologic surgeon, having 31 percent to 50 percent time for nonclinical activities, incentive-based pay, nights on call and hours worked.

Additionally, physicians may be putting unnecessary pressure on themselves because of their personality types. “There have been a couple of articles written over the years on the compulsive personality type and the contribution of perfectionism and excessive sense of responsibility of physicians,” Dr. West says. “The people who are selected to go to medical school and self-select to go into medical school are people who tend to have perfectionist tendencies. One definition of burnout that I heard is the distance between what a person is able to do and what he feels he should be doing. Because the bar is very high for doctors, in terms of their own bar and society’s bar, it makes it difficult for doctors to live up to their own high expectations as well as the external expectations. As the number of patients increases and the amount of things the doctor feels like she needs to be doing increases, the possibility of living up to her own high expectations becomes smaller, and that creates conditions for burnout as well.”

Dr. Meldrum adds that debt may be a contributing factor because many physicians are taking on consulting jobs to pay off their medical school debt. “Many physicians are taking on extra consulting jobs just because they are so saddled with debt,” she says. “If you work inhuman hours, where are your friends and family in the picture? They are unhappier with you than ever. When doctors are home, they are often cranky and overstressed and tired.”

Dr. West and his colleagues conducted a study to evaluate the relationship between well-being and demographics, educational debt and medical knowledge.3 The study included 16,187 residents. In this study, sub-optimal quality-of-life and symptoms of burnout were common, and higher debt (more than $200,000) was associated with symptoms of burnout.

“Then, there are the physicians who are older in a supervising role and their direct reports have staff to manage,” Dr. Meldrum says. “The stress of not having a support staff that has good interpersonal skills means that more and more things get bumped upstairs. Additionally, patients are more demanding, so physicians are hearing more complaints than they did in the past.”

Prevention Strategies

Fortunately, there are many things physicians can do to prevent burnout or to turn things around once they start feeling burned out.

Dr. Meldrum conducted a study on physicians’ strategies for avoiding burnout and found that some helpful techniques for avoiding burnout included setting limits, sharing issues with friends and family, physical exercise, cultivating relaxation and humor.4

Matthew J. Goodman, MD, an internist and co-director of the University of Virginia’s Mindfulness-Based Stress Reduction Program in Charlottesville, Va., recommends the following:

•
Foster healthy family relationships and friendships.

•
Keep hobbies alive.

•
Have a religious or spiritual affiliation.

•
Look to find meaning in your work.

•
Find a mentor.

Dr. Goodman notes that, because there is growing awareness about physician burnout, there are groups of physicians who are looking at ways to get together. “Physicians rarely talk to each other except about medicine and patients, but it can be helpful to become part of a group of like-minded physicians who can serve as a support group or share experiences.”

Dr. Goodman and his colleagues have done some work with teaching mindfulness to physicians, and data is becoming available on mindfulness classes to help with physician self-awareness and developing the ability to maintain a sense of calm or to be in difficult circumstances and not get carried away by them.5

Dr. Goodman’s study included 93 health-care providers, including physicians from multiple specialties, nurses, psychologists and social workers who practice in both university and community settings. The health-care providers attended a continuing-education course based on mindfulness-based stress reduction. The course met 2.5 hours a week for eight weeks plus a seven-hour retreat. The classes included training in four types of formal mindfulness practices, including the body scan, mindful movement, walking meditation and sitting meditation. Providers’ Maslach Burnout Inventory scores improved significantly from before to after the course for both physicians and other health-care providers for the Emotional Exhaustion, Depersonalization and Personal Accomplishment scales. Mental well-being also improved significantly.

He notes that, while mid-career physicians are at risk, burnout can happen at any age or career stage. “Mid-career physicians have been practicing medicine long enough that some of the novelty has worn off,” Dr. Goodman says. “Some of their idealism is being challenged by what they are expected to do. This is a group that is really is need of self-renewal. In our classes, we have had physicians from all stages. There is a certain amount of burnout even among residents.”

Dr. Meldrum recommends keeping close tabs on your office environment and quickly addressing any conflicts that arise. “A lot of times, I get called in because the collegial relationships have gotten so petty that it’s causing burnout in the office,” she says. “People are negatively complaining behind other people’s backs about certain staff being treated better than other staff members. If you notice that you are getting up later and later and are not looking forward to going to work, you know that there is growing resistance. When people ‘clock watch’ in pairs and packs in the practice setting, that’s another sign of toxicity. If the office has become a toxic environment, physicians really need to invest in some additional training for everyone at all levels.”

Other important ways to avoid burnout are to maintain a healthy work/home life balance and to spend as much work time as possible treating patients, rather than performing administrative tasks. “We know that if you take away autonomy and control from physicians, they do worse,” Dr. West says. “So, the idea that physicians should be told when to see patients and how much time they get with each patient doesn’t work well. We know that physicians who work themselves into the ground don’t have anything left for their patients, so workload is part of this. We know that things that distract physicians from the interpersonal relationships, such as excessive paperwork and excessive administrative burdens, are not good for physician well-being. We know that physicians who work to the point that it detracts from their home lives develop problems. I don’t know that anyone has the magic solution to work/personal life balance, but physicians need to be aware of where they are on their own stress curves.”

Additionally, physicians need to remember that by taking care of themselves, they are actually caring for their patients. REVIEW


Q:

Use Ctrl Alt Num Pad to position Windows on Screen not desktop

So far I could position any window using the Ctrl + Alt + [num-pad-key] on the screen. Even with multiple presses I could change the size in the corner/side.
Now with 17.10 on Xorg the Ctrl + Alt + [num-pad-key] positions the window on the whole desktop rather than a single screen. That is very useless to me with a 3 screen setup.
Any idea how to make these shortcuts work per screen and that they scale the window?

A:

The same question is discussed here:
How do I restore the Unity 7 Ctrl-Alt-Numpad combination behaviour on Gnome 3?
Basically, what I have tried from this thread (and that worked) is this:

unset the problematical keybindings from gnome:
gsettings set org.gnome.desktop.wm.keybindings move-to-side-n "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings move-to-corner-ne "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings move-to-side-e "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings move-to-corner-se "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings move-to-side-s "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings move-to-corner-sw "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings move-to-side-w "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings move-to-corner-nw "['disabled']"

with sw, nw, ne, se for corners, and n, e, s, w for sides.

Then I have tried installing the gnome extension called Put Windows.
Using this extension options (refresh page if you don't see the option button next to the on/off button), I was able to set the correct keybindings I wanted.
If some keybindings still do not work (that was my case for the move-windows-monitor-left/right commands), you can try to install ccsm :
sudo apt install compizconfig-settings-manager

And set the remaining keybindings under the "Window Management" section, in "Grid".


Q:

how todays google doogle World's Fair is implemented?

I wanna know is it using the power of HTML5 and jquery any sample example can i get for this ?

A:

When examining the code, you will actually see that the doodle consists of multiple images:

http://www.google.com/logos/2011/worldsfair11-hp-1.gif
http://www.google.com/logos/2011/worldsfair11-hp-2.gif
http://www.google.com/logos/2011/worldsfair11-hp-3.gif
http://www.google.com/logos/2011/worldsfair11-hp-4.gif
http://www.google.com/logos/2011/worldsfair11-hr.jpg - the actual static Doogle
http://www.google.com/logos/2011/worldsfair11-hp.png

The beautified JavaScript is here: http://pastebin.com/r8s9H2jA
It seems to use JavaScript to create the loupe and uses a combination of CSS / JavaScript to position the animating elements at the right position.
So in short:

HTML5: It's JavaScript combined with CSS. This, by itself, is not limited to the HTML5 spec, so no.
jQuery: no.


package sample.httpjs;

import io.undertow.server.HttpServerExchange;
import io.undertow.util.Headers;
import org.nustaq.kontraktor.*;
import org.nustaq.kontraktor.annotations.Local;
import org.nustaq.kontraktor.impl.SimpleScheduler;
import org.nustaq.kontraktor.util.Log;

import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * Created by ruedi on 29/05/15.
 *
 * Example Single Page Server with actors talking to JavaScript.
 *
 * This class provides the stateless server API exposed to JS. By calling login,
 * the client can authenticate and instantiate a dedicated SessionActor instance
 * which then expose per-client api and server side state. (see ../../web/index.html)
 *
 */
public class MyHttpApp extends Actor<MyHttpApp> {

    public static final int CLIENT_QSIZE = 1000; // == preallocate a queue of CLIENT_QSIZE/10 for each session

    private Scheduler clientThreads[];
    private int sessionCount = 0;

    public IPromise<String> getServerTime() {
        return new Promise<>(new Date().toString());
    }

    @Local
    public void init() {
        // you won't need many threads. If there is heavy computing or you do blocking operations (hint: don't)
        // inside a session actor, increase this. It will still work with hundreds of threads (but then you get jee ;) )
        clientThreads = new Scheduler[]{
            new SimpleScheduler(CLIENT_QSIZE,true), // only two session processor threads should be sufficient for small apps.
            new SimpleScheduler(CLIENT_QSIZE,true),
        };
        Thread.currentThread().setName("MyHttpApp Dispatcher");
    }

    public IPromise<MyHttpAppSession> login( String user, String pwd ) {
        Promise result = new Promise<>();
        if ( "admin".equals(user) ) {
            // deny access for admin's
            result.reject("Access denied");
        } else {
            // create new session and assign it a random scheduler (~thread). Note that with async nonblocking style
            MyHttpAppSession sess = AsActor(MyHttpAppSession.class,clientThreads[((int) (Math.random() * clientThreads.length))]);
            sess.init( self(), Arrays.asList("procrastinize", "drink coffee", "code", "play the piano", "ignore *") );
            result.resolve(sess);
            sessionCount++;
        }
        return result;
    }

    public IPromise<Integer> getNumSessions() {
        return resolve(sessionCount);
    }

    @Local
    public void clientClosed(MyHttpAppSession session) {
        sessionCount--;
        System.out.println("client closed "+session);
    }

    /**
     * inlink e.g. from a mail sent ..
     * @param exchange
     */
    public void handleDirectRequest(HttpServerExchange exchange) {
        Log.Info(this,"direct link path:"+exchange.getRelativePath());
        exchange.setResponseCode(200);
        exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/html; charset=utf-8");
        exchange.getResponseSender().send( "Hello there, "+exchange.getRequestPath() );
    }
}


Q:

How to monitor a spring-boot application via JMX?

I'm trying to set up a JMX monitoring for a comand line app build with spring-boot.
According to https://github.com/spring-projects/spring-boot/tree/master/spring-boot-actuator I just have to add the dependency:
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

Now I start my app, open VisualVM and I already see my application PID.
But how can I now access the metrics like /health etc that are mentioned on the actuator page? As this is a comand line app, I don't have any HTTP path that I can execute.
How can I see those metrics via JXM?

A:

If you want to access JMX beans with JVisualVM, you need to install the VisualVM-MBeans plugin (go to Tools -> Plugins -> Available Plugins). You can also use JConsole, which can access JMX beans by default.


1. Technical Field
The present invention relates to a biomagnetic measurement apparatus, including a SQUID (Superconducting Quantum Interference Device) fluxmeter that measures weak magnetic signals generated from the heart, the brain, etc. of adults, children, fetuses, or the like. In particular, the present invention relates to the biomagnetic measurement apparatus having means for detecting and avoiding a condition of saturation, when an integrator of a fluxmeter operation circuit is saturated with noise and thereby magnetic measurements cannot be conducted.
2. Background Art
The SQUID fluxmeter has experienced problems such as magnetic field measurement errors, which are caused by changes of output signals of an integrator when phase changes or amplitude changes of amplifier outputs occur due to variations of temperature, power source, or other factors. In order to solve this problem, JP Patent Publication (Kokai) No. 9-257895 A (1997) discloses, in a fluxmeter using SQUID, a magnetometer comprising a comparator that compares an output from a SQUID with preset upper and lower limits. This magnetometer notifies the SQUID or a drive circuit of abnormalities when the output is beyond the upper or lower limits.
In addition to phase changes and amplitude changes of amplifier outputs, which are regarded as problems according to JP Patent Publication (Kokai) No. 9-257895 A (1997), when the SQUID fluxmeter detects further noise greater than a biomagnetic signal, an integrator of a fluxmeter operation circuit becomes saturated and a problem arises wherein a magnetic field lock of a magnetic sensor is released. When the magnetic field lock is released, the output of the fluxmeter does not revert back, even after the causative noise for releasing the lock disappears, and it is impossible to continue the measurement. Therefore, it is necessary to discover that the magnetic field lock is released as early as possible, to notify an operator of the above saturated state (detection of the release of the magnetic field lock), to take required measures to resolve the saturated state, for example, manually or automatically, and to conduct operations for the magnetic field lock again, thereby creating a state for enabling magnetic measurements.


By now, just about everybody in Central Florida who loves Pizza and just loves good food in general, has heard about or has been to Pizza Bruno.

If you have not been yet, or are in the minority of people who don't know about one of Orlando’s best pizza places, then this article is for you.

Pizza Bruno was opened as a Neapolitan style pizzeria that is a hidden gem off the beaten path where tradition meets creativity. Pizza Bruno isn't just a pizza place, it's a passion with Italian roots and family traditions from Chef/Owner, Bruno Zacchini who developed a passion and philosophy for great food.

Although Pizza Bruno is wildly popular, it has for the most part, remained relatively underground in the Orlando area, but that is part of the craze and lure of such an establishment. Often times places like this become the stuff of legends and folklore, and when you finally get to try it, you are let down. That is not the case here. Chef Bruno and his team are doing their best to keep the food and experience magical.

The Neapolitan style pizzas are made with a simple dough, fermented at cold temperatures for up to 48 hours, topped with the best ingredients and cooked in 90 seconds at temperatures of up to 1000 degrees. The base dough and sauce are both vegan, and they also offer Daiya Vegan mozzarella as well as a gluten free crust for a $2.00 up charge.

Just as Italian food has always emphasized a simplicity in flavors and ingredient driven dishes, Pizza Bruno treats their pizzas the same. From the delicious California tomatoes & sea salt they use in the sauce to the locally sourced Italian sausage they use, they pride themselves on letting the ingredients shine and the food speak for itself.

The Pies here are baked in a wood fired oven that is fed with kiln dried red oak that helps the food take on a beautiful leopard spotted char and get that unique wood fired flavor. They do serve more than pizza at Pizza Bruno, and the garlic knots have become legendary...if you can get them, as they are made in limited batches. Other items include, Octopus, Wood Fired Cauliflower, Charcuterie and Cheese boards, Meatballs and salads.

Beer, Wine, and Amaro cocktails are served up at Pizza Bruno. They have a $20 corkage fee per 750ml of wine or beer. This is my favorite local craft brewery Crooked Can with Cloud Chaser.

The Heirloom Caprese with local heirloom tomatoes, fresh Mozzarella, basil and balsamic glaze is a great way to start your visit, and it’s big enough to share.

Wood Fired Cauliflower is served in a hazelnut romesco sauce and topped with golden raisin agrodolce and Pecorino Romano, and it is simply amazing.

Quite simply one of the best Octopus dishes I have ever had. The octopus at Pizza Bruno is wine braised, wood-fire roasted and served with a seasonal vegetable accompaniment.

This Blanca Pizza with Mozzarella, Lemon Ricotta, Garlic, Rosemary, Arugula, and Pecorino Romano is just fantastic and full of great flavors.

Do not miss out on any of the Cannoli’s served up at Pizza Bruno, they are all next level delicious. This is a Nutella Cannoli with nutella, chocolate chips and sliced almonds.

This is a Classic Cannoli with a classic Cannoli filling, chocolate chips and powdered sugar.

I saved the best for last, with this Caramel Delight Cannoli that is out of this world wonderfully delicious with coconut mascarpone, chocolate covered cannoli shell, toasted coconut and caramel sauce..,it’s pretty much a cannoli from heaven above.

Chef Bruno and his staff strives to push creativity & raise the bar for the food they serve up here, to bring Orlando something different & unique and keep up a cult like following. This place is just plain good and you will not regret anything on the menu.

Pizza Bruno does not have a phone line, so they do not deliver, nor can you call ahead and place a take out order. They do however, allow for you to order to go with in house takeout, online ordering, and they will deliver via Uber Eats only. And yes, I went later in the evening on a Saturday night, and they were out of the legendary garlic knots...It happens, so I'll Be Back...Soon!


Student-athletes are more comfortable approaching informal sources of help rather than professional mental health practitioners. Informal sources such as parents, close friends, and siblings are their primary preferred helpers. The least likely to be approached for help are professional help-givers like faculty, religious members, and counselors.

The barriers to help-seeking for student-athletes are more internal (e.g., win-at-all- cost philosophy, time management, social stigma, debasing potential concerns, lack of transportation to the counseling venue) than external (e.g., barriers created by the athletic department and the University).

PROBLEM STATEMENT

This study explored the help-seeking behavior of male college basketball players, the context in which it takes place, the process involved in seeking help, the specific barriers to help-seeking and the possible intervention that would facilitate help-seeking. Specifically, this study answered the following questions:

What is the context in which help-seeking behavior occurs among male college basketball players? (Concept of help-seeking; Typical problems; Frequency of seeking help; Preferred helpers and their qualities; and Venue for help-seeking)

What is the process involved in seeking help?

What are the barriers to seeking help? (Internal and External barriers)

Based on the responses, what intervention can be introduced to facilitate help-seeking behavior among student-athletes?

What is the result of the pilot run of the intervention to promote help-seeking behavior? (Barriers to help-seeking before and after; Feedback of participants)

THEORY

This study looked into the help-seeking behavior of male basketball players from different colleges and universities in Metro Manila. Specifically, it looked into the context, process, barriers, and interventions in help-seeking behavior.

It was guided by the help- seeking model originally proposed by Srebnik, Cauce, and Baydar (1996). For the purpose of this study, modifications were introduced to include context, barriers, and interventions.

Help-Seeking Behavior

Cauce et al. (2002) defined help-seeking as a process that “is most likely to occur when a mental health problem is recognized as undesirable and when it is deemed not apt to go way on its own.”

It is a three-stage interchangeable process, which involves problem recognition, the decision to seek help, and the selection of the help provider, since each step in this model can be influenced by culture and context.

The help-seeking pathways model of Srebnik, Cauce, and Baydar (1996) was inspired by the earlier work of Anderson and Newman (1973), Goldsmith, Jackson, and Hough (1988), and Pescosolido (1992).

Cauce et al. (2002) believed that the key to understanding the needs of a client should start at the onset of the help-seeking process.

Context

Defined as the background stimuli that accompany some kind of foreground event. In this study, it pertains to the concept of help-seeking among the student-athletes; their problems, which prompt them to seek help; preferred helpers and qualities; frequency of seeking help; and venue for seeking help.

Process

Process is operationally defined in this study as the procedure involved in seeking help. The three-stage interchangeable process proposed by Cauce et al. (2002) was used in this study.

Barriers in Help-Seeking Behavior

The working definition and description of barriers were adapted from Mansfield et al. (2005) for this study. The authors described barriers as “the variables, which are identified as obstacles to seeking help for physical or mental health problems.” In this study, barriers were classified into two categories: internal and external.

Intervention

Describes the proposed program that will facilitate help-seeking behavior for either the student-athlete or preferred helper based on the study’s findings.

RESULTS

Concept of Help Seeking Behavior

Definition: “Seeking help for a problem that cannot be individually solved.” (N = 58; 53%)

3 of the 5 factors received mean ratings of 2 plus which means that they are fairly important reasons not to seek help.

Factor 4: Privacy, with a mean score of 2.115, was seen as the primary barrier, Factor 2: Minimizing Problem and Resignation (2.086), and Factor 1: Need for Control and Self-Reliance (2.012).

Suggestions to Encourage Student-Athletes to Seek Help

Encourage them not to be too proud, shy, or scared in approaching others (33%/16%)

Give advice and encouragement (20%/11%)

Have a program on communicating/counseling athletes (0%/21%).

DISCUSSION

Process: Help-Seeking Behavior

Cauce, et al. (2002) defined help-seeking as a process that “is most likely to occur when a mental health problem is recognized as undesirable and when it is deemed not apt to go way on its own.”

It is a three-stage interchangeable process, which involves problem recognition (PR), the decision to seek help (DTSH), and the selection of the help provider (SS) as each step in this model can be influenced by culture and context.

The authors developed items based on literature in the areas of gender-role strain and gender-role conflict. Based on these findings, an inventory of potential barriers to help-seeking was constructed to identify the “reason a person might choose not to seek help for a problem.”

UNIQUE CONTRIBUTION

Working Definition

Concept of help-seeking; Typical problems; Frequency of seeking help; Preferred helpers and their qualities; and Venue for help-seeking.

Program Manual

Program was designed to enhance help-seeking behavior and practices among collegiate basketball student-athletes who participate in the UAAP and NCAA tournaments.

Program focuses on reducing deterrent help-seeking behavior through the use of psychoeducation and role induction (anticipatory socialization).

Reduce inhibitions by providing the student-athletes with knowledge of the subject, communication skills, and time management strategies.


Project Summary/Abstract Improving Patient-Centered Communication in Breast Cancer: A RCT of a Shared Decision Engagement System (ShaDES) The diagnosis of breast cancer triggers a cascade of decisions as patients consider multiple treatment modalities navigated by different specialists. Precise evaluative treatment algorithms have better individualized treatment recommendations, [yet sifting through the complexity of the test information and treatment options can be often challenging to patients and can often cause anxiety]. Thus, the advances of precision medicine cannot be realized without parallel advances in patient-centered communication (PCC). This rapidly evolving decision context has fueled a pressing need for more patient-centered communication to address the full breadth of issues?both cognitive and emotional?faced by patients in making breast cancer treatment decisions. There is a critical need for tools that can engage the patient both emotionally and cognitively and be integrated into the breast oncology care clinical workflow. This project is a multi-level, factorial study that crosses a patient-level RCT of 700 newly-diagnosed breast cancer patients within 25 breast surgical oncology practices to evaluate a shared decision engagement system (ShaDES) to support PCC. The system links an emotional support-enhanced version of the research group?s previously developed iCanDecide patient-facing decision tool with a clinic level trial of a Clinician Dashboard to help clinicians address remaining cognitive and emotional needs in their patients. In collaboration with the Alliance NCORP Research Base and its Statistics and Data Core, the trial will: 1) evaluate the impact of the emotional support enhancements to iCanDecide on primary and secondary outcomes measuring patient appraisal of PCC, 2) evaluate the impact of the Clinician Dashboard on patient appraisal of PCC, 3) examine potential mediators of the patient and clinic interventions, and 4) conduct a process evaluation of the two intervention components to inform revision and future widespread implementation of ShaDES. [The results will lay the groundwork for broad implementation of a shared decision engagement system to improve patient-centered communication in breast cancer.]


During transportation, etc. of frozen or refrigerated foods, if these foods accidentally meet a temperature of the predetermined temperature or over, these frozen or refrigerated foods could inadvertently be deteriorated or decomposed. Therefore, strict temperature control management should be carried out to preserve the frozen or refrigerated foods. In the field of medical care, temperature control in preserving particular kind of medicinal drugs, blood, specimen, etc. play an important role. These products could deteriorate rapidly when the temperature rises, and such products may not be used if things go wrong.
For controlling such temperature, heat-sensitive indicators that irreversibly indicate a signal in a case where a temperature rises to or over a predetermined temperature, have been used so far. Checking these heat-sensitive indicators allows us to know whether or not the storage temperature during transportation exceeded the upper limit of a temperature control range. Such heat-sensitive indicators are disclosed in Patent Documents 1-3 described below. The heat-sensitive indicator disclosed in Patent Documents 1-3 comprises: a colored hot-meltable substance which melts at a predetermined temperature; an absorber which absorbs or is permeated with the melt of the colored hot-meltable substance; and a separating member such as separating membrane, etc. which maintains the colored hot-meltable substance away from the absorber without contacting to each other. At the time the heat-sensitive indicator is used, the separating member is broken under a temperature lower than the melting temperature of the colored hot-meltable substance, bringing the colored hot-meltable substance into contact with the absorber. When the colored hot-meltable substance is melted by raising the temperature of an environment in which the heat-sensitive indicator is placed, then the molten material of the colored hot-meltable substance is absorbed into the absorber, thereby the absorber is colored. The color on the absorber does not disappear even when the temperature of the environment is brought down to a temperature lower than the melting point of the colored hot-meltable substance.


In electrophotographic and electrostatic printing processes (collectively electrographic processes), an electrostatic image is formed on the surface of a photoreceptive element or dielectric element, respectively. The photoreceptive element or dielectric element may be an intermediate transfer drum or belt or the substrate for the final toned image itself, as described by Schmidt, S. P. and Larson, J. R. in Handbook of Imaging Materials Diamond, A. S., Ed: Marcel Dekker: New York; Chapter 6, pp 227–252, and U.S. Pat. Nos. 4,728,983, 4,321,404, and 4,268,598.
In electrostatic printing, a latent image is typically formed by (1) placing a charge image onto a dielectric element (typically the receiving substrate) in selected areas of the element with an electrostatic writing stylus or its equivalent to form a charge image, (2) applying toner to the charge image, and (3) fixing the toned image. An example of this type of process is described in U.S. Pat. No. 5,262,259.
In electrophotographic printing, also referred to as xerography, electrophotographic technology is used to produce images on a final image receptor, such as paper, film, or the like. Electrophotographic technology is incorporated into a wide range of equipment including photocopiers, laser printers, facsimile machines, and the like.
Electrophotography typically involves the use of a reusable, light sensitive, temporary image receptor, known as a photoreceptor, in the process of producing an electrophotographic image on a final, permanent image receptor. A representative electrophotographic process, discharged area development, involves a series of steps to produce an image on a receptor, including charging, exposure, development, transfer, fusing, cleaning, and erasure.
In the charging step, a photoreceptor is substantially uniformly covered with charge of a desired polarity to achieve a first potential, either negative or positive, typically with a corona or charging roller. In the exposure step, an optical system, typically a laser scanner or diode array, forms a latent image by selectively discharging the charged surface of the photoreceptor to achieve a second potential in an imagewise manner corresponding to the desired image to be formed on the final image receptor. In the development step, toner particles of the appropriate polarity are generally brought into contact with the latent image on the photoreceptor, typically using a developer electrically-biased to a potential of the same polarity as the toner polarity and intermediate in potential between the first and second potentials. The toner particles migrate to the photoreceptor and selectively adhere to the latent image via electrostatic forces, forming a toned image on the photoreceptor.
In the transfer step, the toned image is transferred from the photoreceptor to the desired final image receptor; an intermediate transfer element is sometimes used to effect transfer of the toned image from the photoreceptor with subsequent transfer of the toned image to a final image receptor. The image may be transferred by physical pressure and contact of the toner, with selective adhesion to a target intermediate or final image receptor as compared to the surface from which it is transferred. Alternatively, the toner may be transferred in a liquid system optionally using an electrostatic assist as discussed in more detail below. In the fusing step, the toned image on the final image receptor is heated to soften or melt the toner particles, thereby fusing the toned image to the final receptor. An alternative fusing method involves fixing the toner to the final receptor under pressure with or without heat. In the cleaning step, residual toner remaining on the photoreceptor is removed.
Finally, in the erasing step, the photoreceptor charge is reduced to a substantially uniformly low value by exposure to light of a particular wavelength band, thereby removing remnants of the original latent image and preparing the photoreceptor for the next imaging cycle.
Two types of toner are in widespread, commercial use: liquid toner and dry toner. The term “dry” does not mean that the dry toner is totally free of any liquid constituents, but connotes that the toner particles do not contain any significant amount of solvent, e.g., typically less than 10 weight percent solvent (generally, dry toner is as dry as is reasonably practical in terms of solvent content), and are capable of carrying a triboelectric charge. This distinguishes dry toner particles from liquid toner particles.
A typical liquid toner composition generally includes toner particles suspended or dispersed in a liquid carrier. The liquid carrier is typically nonconductive dispersant, to avoid discharging the latent electrostatic image. Liquid toner particles are generally solvated to some degree in the liquid carrier (or carrier liquid), typically in more than 50 weight percent of a low polarity, low dielectric constant, substantially nonaqueous carrier solvent. Liquid toner particles are generally chemically charged using polar groups that dissociate in the carrier solvent, but do not carry a triboelectric charge while solvated and/or dispersed in the liquid carrier. Liquid toner particles are also typically smaller than dry toner particles. Because of their small particle size, ranging from sub-micron to about 5 microns, liquid toners are capable of producing very high-resolution toned images.
A typical toner particle for a liquid toner composition generally comprises a visual enhancement additive (for example, a colored pigment particle) and a polymeric binder. The polymeric binder fulfills functions both during and after the electrophotographic process. With respect to processability, the character of the binder impacts charging and charge stability, flow, and fusing characteristics of the toner particles. These characteristics are important to achieve good performance during development, transfer, and fusing. After an image is formed on the final receptor, the nature of the binder (e.g. glass transition temperature, melt viscosity, molecular weight) and the fusing conditions (e.g. temperature, pressure and fuser configuration) impact durability (e.g. blocking and erasure resistance), adhesion to the receptor, gloss, and the like.
In addition to the polymeric binder and the visual enhancement additive, liquid toner compositions can optionally include other additives. For example, charge directors can be added to impart an electrostatic charge on the toner particles. Dispersing agents can be added to provide colloidal stability, aid fixing of the image, and provide charged or charging sites for the particle surface. Dispersing agents are commonly added to liquid toner compositions because toner particle concentrations are high (inter-particle distances are small) and electrical double-layer effects alone will not adequately stabilize the dispersion with respect to aggregation or agglomeration. Release agents can also be used to help prevent the toner from sticking to fuser rolls when those are used. Other additives include antioxidants, ultraviolet stabilizers, fungicides, bactericides, flow control agents, and the like.
U.S. Pat. No. 4,547,449 to Alexandrovich, et al. discloses liquid electrographic developers comprising an electrically insulating liquid carrier, toner, a charge-control agent and a charging agent. The charge-control agent is a carrier-soluble, addition copolymer of a quaternary ammonium salt monomer, a monomer having —COOH, —SO3H or —PO3HR acidic function wherein R is hydrogen or alkyl, and a solubilizing monomer. The charging agent is a carrier-soluble, addition polar copolymer. The disclosed developers are stated to exhibit improved replenishability as evidenced by reduced buildup of charge in the developers during the course of use and repeated replenishment. Specifically, this patent noted that the prior art exhibited drawbacks relating to the stability of their charge as they are used through a number of copy sequences. In particular, the charge of the developer per unit of mass of dispersed toner of the prior art increases, indicating that the quaternary ammonium charge-control copolymer deposits on an electrostatic image at a lower rate than the toner. This uneven depletion rate and consequential increase in charge per unit mass in the developer presents difficulty in developer replenishment and causes nonuniform image density from copy to copy. The invention as described therein is asserted to stabilize the charge of the developer per unit mass of toner is so that, after a period of use, the buildup of charge per unit of mass is significantly reduced. Such stability is stated to be achieved when the quaternary ammonium salt charge-control polymer in the developer composition contains an insolubilizing monomer having an acidic function selected from the group consisting of —COOH, —SO3H or —PO3HR acidic function wherein R is hydrogen or alkyl.
Charge directors, including certain quaternary ammonium salts, are disclosed in Beyer, U.S. Pat. No. 3,417,019 and Tsuneda, U.S. Pat. No. 3,977,983 for liquid developers.
U.S. Pat. No. 5,627,002 to Pan, et al. discloses a positively charged liquid developer comprised of a nonpolar liquid, thermoplastic resin particles, pigment, a charge control agent, and a charge director comprised of a cyclodextrin or a cyclodextrin derivative containing one or more organic basic amino groups. This patent states that the hollow interiors provide these cyclic molecules with the ability to complex and contain, or trap a number of molecules or ions, such as positively charged ions like benzene ring containing hydrophobic cations, which are known to insert themselves into the cyclodextrin cavities.
U.S. Pat. No. 5,411,834 to Fuller discloses a negatively charged liquid developer comprised of thermoplastic resin particles, optional pigment, a charge director, and an insoluble charge adjuvant comprised of a copolymer of an alkene and an unsaturated acid derivative. The acid derivative contains pendant fluoroalkyl or pendant fluoroaryl groups, and the charge adjuvant is associated with or combined with said resin and said optional pigment. In certain embodiments, it is stated that “it is important that the thermoplastic resin, copolymers with pendant fluorinated groups as illustrated herein, and the optional second charge adjuvant be sufficiently compatible that they do not form separate particles, and that the charge adjuvant be insoluble in the hydrocarbon to the extent that no more than 0.1 weight percent be soluble in the nonpolar liquid.” See column 8, lines 44–50.
U.S. Pat. No. 6,018,636 to Caruthers discloses an imaging system wherein changes in toner developability of toners in a liquid toner system are determined and compensated for by sensing the toner concentration and liquid toner volume in a tank, based on changes in the toner concentration and toner mass in the tank. Based on measurements made of the toner and/or a test printed image, adjustments can be made, such as creating a new voltage differential or adding toner and/or liquid carrier material to the tank.
U.S. Pat. No. 5,722,017 to Caruthers discloses a liquid developing material replenishment system wherein an apparatus for developing an electrostatic latent image with a liquid developing material includes a liquid developing reservoir for providing a supply of operative liquid developing material to the developing apparatus, and a liquid developing material supply is coupled to the liquid developing material reservoir for providing a supply of liquid developing concentrate to the liquid developing material reservoir for replenishing the supply of operative liquid developing material in the liquid developing reservoir. A developed image having a large proportion of printed image area or having substantially a single color will cause a greater depletion of marking particles and/or charge director in the liquid developing material supply tank as compared to a developed image with a small amount of printed image area or of a single color. This patent explains that                while the rate of the replenishment of the liquid developing material may be controlled by simply monitoring the level of liquid developer in the supply reservoir 116, in advanced systems the rate of replenishment of the liquid carrier, the marking particles, and/or the charge director components of the liquid developing material is controlled in a more sophisticated manner to maintain a predetermined concentration of the marking particles and the charge director in the operative solution stored in the supply reservoir 116. One exemplary replenishment systems of this nature include systems which measure the conductivity of the operative liquid developing material and add selective amounts of charge director compound to the reservoir as a function of the measured a conductivity, as disclosed in detail in U.S. Pat. No. 4,860,924, incorporated by reference herein. Another system of this nature is disclosed in commonly assigned U.S. patent application Ser. No. 08/551,381, also incorporated by reference herein, which describes control of the amount of carrier liquid, charge director and/or marking particles in a liquid developing material reservoir in response to the amount of each component depleted therefrom as a function of the number of pixels making up each developed image.See column 14, line 48 to column 15, line 3.
U.S. Pat. No. 4,860,924 to Simms, et. al. discloses a copier wherein charge director is supplied to a liquid developer in response to a conductivity measurement thereof. Toner concentrate deficient in charge director is supplied to the liquid developer in response to an optical transmissivity measurement thereof. Conductivity is measured by a pair of spaced electrodes immersed in the developer and through which a variable alternating current is passed. A variable capacitor neutralizes the inherent capacitance of the electrodes. A phase sensitive detector is provided with a reference voltage having the same phase shift as that caused by capacitive effects. The conductivity measurement is corrected in response to a developer temperature measurement.
U.S. Pat. No. 4,935,328 to El-Sayed discloses an electrostatic liquid developer stated to have improved negative charging characteristics consisting essentially of (A) nonpolar liquid having a Kauri-butanol value of less than 30, present in a major amount, (B) thermoplastic resin particles having an average by area particle size of less than 10 μm, (C) charge director compound, and (D) at least one soluble solid or liquid organic monofunctional amine compound of the formula: Rn NH3-n wherein R is alkyl, cycloalkyl or alkylene, or substituted alkyl, the alkyl, cycloalkyl, alkylene or substituted alkyl group being of 1 to 50 carbon atoms, and n is an integer of 1 to 3. The electrostatic liquid developer is useful in copying, making proofs including digital color proofs, lithographic printing plates, and resists.


Q:

Making TodoList in React, how to cross out item when finished (not using index)?

I'm new to React and learning how to make a Todo App. I need to know how to cross out a todo once the checkbox input is clicked, and uncrossed once clicked again (toggle) in a controlled environment. I've put in my research; the thing is, everyone seems to be using index, while I have heard not to use index as it leads towards problems. Any help would be greatly appreciated; here's my code below:
App (parent component)
// dependencies
import React from 'react';
// local files
import './App.css';
import List from '../components/List';

class App extends React.Component {
  // state
  state = {
    todos: [
      {key: 0, text: "Go shopping", isCompleted: false},
      {key: 1, text: "Lift", isCompleted: false},
      {key: 2, text: "Go for walk", isCompleted: false}
    ],
    currentTodo: {
      key: "",
      text: "",
      isCompleted: false
    }
  };

  // event handlers

  // JSX
  render() {
    return (

          TodoList

        <List todos={this.state.todos} />

    );
  };
};

export default App;

List Component:
// dependencies
import React from 'react';
// local files

const List = (props) => {
  const TodoList = props.todos.map((todo) => {
    return (

          {todo.key} {todo.text}
          <input type="checkbox" />

    );
  });

  return (

      {TodoList}

  );
};

export default List;

A:

For update operation you can use index, there is no issue
A unique key is required for list of items, so that react can React identify which items have changed

Keys help React identify which items have changed, are added, or are
  removed. Keys should be given to the elements inside the array to give
  the elements a stable identity ( Ref )

Hope the below code snippet help you:
const TodoList = props.todos.map((todo.index) => {
    return (
      // index is not a good option here, here you should use unique key only

          {todo.key} {todo.text}

          // but here you can use the index, so you can update the todo easily
          // as you are just using it to get access of specific todo
          <input type="checkbox" checked={todo.isCompleted} onChange={() => props.handleCheck(index)}/>

    );
});

WORKING DEMO :