All relevant data are within the paper.

Introduction {#sec001}
============

Lampreys are modern representatives of the jawless vertebrate lineage that diverged from the jawed vertebrate lineage some 500 million years ago \[[@pone.0157494.ref001]\]. In addition to occupying an important phylogenetic position, lampreys possess a unique adaptive immune system that is based on variable lymphocyte receptors rather than antibodies \[[@pone.0157494.ref002], [@pone.0157494.ref003]\]. Therefore, lampreys can be of both evolutionary and immunological interest. There are more than 40 lamprey species separated into three families, including Petromyzonidae, Mordaciidae and Geotriidae \[[@pone.0157494.ref004]\]. Petromyzonidae includes the most species and is distributed in the northern hemisphere, whereas the other two families live in the southern hemisphere \[[@pone.0157494.ref004]\].

Robinson et al. evaluated the DNA values for somatic (erythrocyte) 2C nuclei of nine different lamprey species, which lie between 2.2 and 2.6 pg, with *Petromyzon marinus* as an exception (3.6 pg) \[[@pone.0157494.ref005]\]. Recently, it has been shown that the estimated DNA content of germline (sperm) 2C nuclei in *P*. *marinus* is approximately 4.6 pg, which is \~20% higher than that of the somatic nuclei \[[@pone.0157494.ref006]\]. This deficit turns out to be due to programmed genome rearrangement during early embryogenesis in *P*. *marinus*, which results in approximately 20% germline DNA loss in somatic tissues \[[@pone.0157494.ref006]--[@pone.0157494.ref008]\]. Germline DNA loss has also been observed in somatic cells in hagfish, another lineage of jawless vertebrates \[[@pone.0157494.ref009]\]. Karyotype has been analyzed in lamprey species from all three families \[[@pone.0157494.ref004], [@pone.0157494.ref010]--[@pone.0157494.ref012]\]. The chromosomes of Petromyzonidae and Geotriidae are mostly acrocentric and range between 0.5--5 μm, with a modal diploid number of 154--178 \[[@pone.0157494.ref013]\], whereas the chromosomes of Mordaciidae are mainly metacentric or submetacentric with a modal diploid number of 76, probably due to chromosome fusions \[[@pone.0157494.ref011], [@pone.0157494.ref014]\]. The genomes of both northern and southern hemisphere lamprey species exhibit high GC content, as revealed by high levels of four-fold degenerate sites (70--90%) \[[@pone.0157494.ref015], [@pone.0157494.ref016]\]. Different molecular markers have been developed in lamprey for population and evolutionary genetic studies. Filcek et al. utilized 7 microsatellite markers to evaluate the genetic variation between four lamprey species, identifying lamprey larvae to species \[[@pone.0157494.ref017]\]. Mejia et al. developed 88 random amplification polymorphic DNA (RAPD) markers in the Mexican lamprey *Lampetra geminis* and observed a low heterozygosity of 0.21--0.25 \[[@pone.0157494.ref018]\]. It is also reported that the outbred sea lamprey *P*. *marinus* exhibits high sequence disparity (\~2%) between alleles at most genomic loci \[[@pone.0157494.ref019]\].

The complete mitochondrial genomes of several lamprey species have been published. The gene order and contents of lamprey mitochondrial genomes are basically identical to those of other chordate mtDNAs, which indicates that the common vertebrate mitochondrial gene organization had already been established before the split of jawless and jawed vertebrates \[[@pone.0157494.ref020]--[@pone.0157494.ref023]\]. The nuclear genome of the sea lamprey *P*. *marinus* was sequenced and assembled; it was generated from liver cells and thus does not include the \~20% germline genomic content \[[@pone.0157494.ref019]\]. This draft genome spans 0.816 Gb, which is approximately half of the estimated haploid somatic genome size (1.76 Gb), and exhibits high proportions of repetitive elements and GC content \[[@pone.0157494.ref019]\]. The draft genome of the Japanese lamprey, *Lethenteron japonicum*, has also been published, and it spans 1.03 Gb \[[@pone.0157494.ref024]\].

There are three lamprey species distributed in the northeast of China, *Lampetra morii*, *Lethenteron reissneri* and *Lethenteron japonicum*, and they are often used for research. Here, we profiled the overall genetic and genomic characteristics of *L*. *morii*. We showed that *L*. *morii* has a relatively small genome, fewer chromosomes and lower heterozygosity compared to *P*. *marinus* and other lampreys.

Results {#sec002}
=======

The nuclear DNA content of *L*. *morii* {#sec003}
---------------------------------------

Using flow cytometry methods with chicken erythrocytes (2C = 2.50 pg DNA) as well as zebrafish erythrocytes (2C = 3.22 pg DNA) as internal reference standards, the nuclear DNA content of different tissues of *L*. *morii* was evaluated, the values of which were highly reproducible across individuals and preparations. Our result shows that the DNA content of different tissues is not always the same in *L*. *morii*. The DNA content of sperm nuclei (1C = 1.618 ± 0.001 pg) ([Fig 1A and 1B](#pone.0157494.g001){ref-type="fig"}), which represents germline tissue, is almost 15% more than that of somatic tissues such as erythrocytes (1C = 1.376 ± 0.026 pg), gill (1C = 1.385 ± 0.009 pg), kidney (1C = 1.406 ± 0.012 pg), and heart (1C = 1.402 ± 0.015 pg) ([Fig 1C and 1D](#pone.0157494.g001){ref-type="fig"}). This coincides with findings in *P*. *marinus* that the genome size of the germline is \>20% larger than soma \[[@pone.0157494.ref006]\]. The somatic DNA content of *L*. *morii* is close to that of most lampreys (2C = 2.2--2.6 pg) but 23% less than *P*. *marinus\'* (2C = 3.6 pg) \[[@pone.0157494.ref006]\]. The germline genome size of *L*. *morii*, as inferred from the nuclear DNA content, is 1.582 Gb (haploid), which is relatively small among vertebrates.

![The nuclear DNA content of *L*. *morii*.\
Nuclei from each tissue were isolated from the same three individuals, propidium iodide-stained and analyzed by flow cytometry. Chicken erythrocytes (2C = 2.50 pg DNA) and zebrafish erythrocytes (2C = 3.223 pg DNA) served as independent internal reference standards. (A, B) Sperm nuclear DNA content with chicken erythrocytes (A) and zebrafish erythrocytes (B). An asterisk marks a peak corresponding to spermatogonia or sperm doublets. (C, D) Erythrocyte nuclear DNA content with chicken erythrocytes (C) and zebrafish erythrocytes (D). The horizontal axis represents the fluorescence value of cells, which is directly proportional to DNA content within the same sample. The vertical axis represents the number of single cells detected.](pone.0157494.g001){#pone.0157494.g001}

Karyotype analysis {#sec004}
------------------

To analyze the chromosomal characteristics of *L*. *morii*, we injected colchicine into adult fish to obtain single metaphase cells, followed by Giemsa staining and microscopic observation. Analysis of three gill karyotypes and three intestine karyotypes from the same individual gave a modal number of 2n = 132 chromosomes ([Fig 2A and 2B](#pone.0157494.g002){ref-type="fig"}). Preparation artifacts caused by the high number of small-sized chromosomes might have led to small differences between the tests. The chromosome number of *L*. *morii* is lower than that of both *P*. *marinus* (2n = 164) \[[@pone.0157494.ref025]\] and almost all of the northern hemisphere lamprey species whose chromosomes have been counted \[[@pone.0157494.ref004], [@pone.0157494.ref013]\]. The chromosomes of *L*. *morii* were found to be approximately 0.5 μm, similar to other Petromyzonidae species \[[@pone.0157494.ref013]\], but no bi-armed chromosomes were found under high magnification oil microscopy, suggesting no obvious chromosome fusion events.

![Karyotype analysis of *L*. *morii*.\
Colchicine was injected into adult *L*. *morii* to arrest cell division at metaphase. The gills and intestine were separated, Giemsa stained and observed through high magnification microscopy. The gill (A) and intestine (B) chromosome numbers were 2n = 132 and 2n = 131, respectively. Two more individuals were tested, and the chromosome numbers ranged from 130 to 132.](pone.0157494.g002){#pone.0157494.g002}

AFLP profiles {#sec005}
-------------

To generate AFLP fingerprints for *L*. *morii*, we followed the protocol described by Vos et al. \[[@pone.0157494.ref026]\] in 1995 to design and screen primer pairs. According to band numbers and the clarity and distribution range of each band ([Fig 3](#pone.0157494.g003){ref-type="fig"}), seven primer combinations were selected to analyze polymorphism in *L*. *morii*, and five randomly chosen *L*. *morii* individuals were used. For each of the seven primer combinations, the total number of bands and polymorphism bands ranged from 92--122 and 9--16, respectively ([Table 1](#pone.0157494.t001){ref-type="table"}), and was very close between primer pairs. The average AFLP rate of *L*. *morii* was found to be 11.83%, which is lower than that of cattle \[[@pone.0157494.ref027]\].

![Amplification of 96 pairs of *Eco*RI-*Mse*I fragments.\
According to the number, clarity and distribution range of the bands, we screened 7 primer combinations (with an asterisk) to analyze polymorphism: E01/M12 (*Eco*RI+AAC/*Mse*I+CCT), E05/M04 (*Eco*RI+AGA/*Mse*I+CAT), E02/M01 (*Eco*RI+AAC/*Mse*I+CAA), E06/M01 (*Eco*RI+AGT/*Mse*I+CAA), E03/M06 (*Eco*RI+ACA/*Mse*I+CCT), E07/M01 (*Eco*RI+ATC/*Mse*I+CAA), E04/M01 (*Eco*RI+ACT/*Mse*I+CAA). The primer pairs are listed in [Table 2](#pone.0157494.t002){ref-type="table"}. The molecular weight size range of the fingerprints is from 20 to 500 nucleotides.](pone.0157494.g003){#pone.0157494.g003}

10.1371/journal.pone.0157494.t001

###### AFLP polymorphism rates for *L*. *morii*.

![](pone.0157494.t001){#pone.0157494.t001g}

  Primer combination   Samples   Total number of bands   Polymorphism
  -------------------- --------- ----------------------- -------------- -------
  E01/M12              5         116                     15             12.93
  E05/M04              5         92                      9              9.78
  E02/M01              5         110                     14             12.73
  E06/M01              5         108                     11             10.19
  E03/M06              5         117                     13             11.11
  E07/M01              5         113                     14             12.39
  E04/M01              5         122                     16             13.11
  Total                35        778                     92             11.83

10.1371/journal.pone.0157494.t002

###### Adapters and primers used in AFLP analysis.

![](pone.0157494.t002){#pone.0157494.t002g}

  Adapters/primers   Sequence
  ------------------ -----------------------------
  *Eco*RI adapter    `5′-CTCGTAGACTGCGTACC-3′`
                     `3′-CATCTGACGCATGGTTAA-5′`
  *Mse*I adapter     `5′-GACGATGAGTCCTGAG-3′`
                     `3′-TGCTACTCAGGACTCAT-5′`
  Primers *Mse*I
   M01               `5′-GATGAGTCCTGAGTAACAA-3′`
   M04               `5′-GATGAGTCCTGAGTAACAT-3′`
   M06               `5′-GATGAGTCCTGAGTAACCT-3′`
   M12               `5′-GATGAGTCCTGAGTAACTT-3′`
  Primers *Eco*RI
   E01               `5′-GACTGCGTACCAATTCAAC-3′`
   E02               `5′-GACTGCGTACCAATTCAAG-3′`
   E03               `5′-GACTGCGTACCAATTCACA-3′`
   E04               `5′-GACTGCGTACCAATTCCAT-3′`
   E05               `5′-GACTGCGTACCAATTCCCA-3′`
   E06               `5′-GACTGCGTACCAATTCCCT-3′`
   E07               `5′-GACTGCGTACCAATTCCGA-3′`

SNP analysis of selected gene fragments {#sec006}
---------------------------------------

We chose five housekeeping genes, including actin-like 6B (*ACTL6B*), glyceraldehyde-3-phosphate dehydrogenase (*GAPDH*), heat shock protein (*HSP*), phosphoglycerate kinase 1 (*PGK1*) and ribosomal protein L32 (*RPL32*), to analyze the SNP rates in *L*. *morii*. The amphioxus *Branchiostoma belcheri* was used for comparison. For each gene, one intron with a suitable length was amplified via PCR. Three isolated adult individuals from each of *L*. *morii* and *B*. *belcheri* were tested. The polymorphism rate for SNPs in *B*. *belcheri* was 9.327% for the limited samples and the selected fragment, consistent with the 5--15% SNP rates in the outbred amphioxus \[[@pone.0157494.ref028]\]. The rate in *L*. *morii* was 0.145% based on the examined intronic sequences ([Table 3](#pone.0157494.t003){ref-type="table"}), which was far lower than *B*. *belcheri*. In addition, we found that the indels of *L*. *morii* were fewer and shorter than those of *B*. *belcheri*. These data suggest that the heterozygosity of *L*. *morii* is much lower than the genome-wide average allelic polymorphism rate (\~2%) of *P*. *marinus* \[[@pone.0157494.ref029]\].

10.1371/journal.pone.0157494.t003

###### SNPs in five selected introns of *L*. *morii* and *B*. *belcheri*.

![](pone.0157494.t003){#pone.0157494.t003g}

  Species           Gene       Length (bp)   SNP   Indel   Polymorphism rate for SNPs (%)   Average rate for SNPs (%)
  ----------------- ---------- ------------- ----- ------- -------------------------------- ---------------------------
  *L*. *morii*      *ACTL6B*   800           1     1       0.125                            0.145
                    *GAPDH*    531           1     0       0.188
                    *HSP*      551           1     0       0.181
                    *PGK1*     795           1     1       0.126
                    *RPL32*    950           1     0       0.105
  *B*. *belcheri*   *ACTL6B*   552           20    3       3.623                            9.327
                    *GAPDH*    858           123   21      14.336
                    *HSP*      1398          17    2       1.216
                    *PGK1*     554           74    14      13.357
                    *RPL32*    546           77    13      14.103

Noncoding region of the *L*. *morii* mitochondrial genome {#sec007}
---------------------------------------------------------

We amplified the noncoding region of *L*. *morii* mitochondria genome via PCR, which is flanked by the NADH dehydrogenase 6 *(ND6*) and cytochrome b (*CYTB*) genes. This noncoding region was found to be 891 bp in length and separated by the *tRNA-Thr* and *tRNA-Glu* genes ([Fig 4A](#pone.0157494.g004){ref-type="fig"}), coinciding with early findings in other lamprey species \[[@pone.0157494.ref020]--[@pone.0157494.ref023], [@pone.0157494.ref030]\]. *L*. *morii* contains four tandem copies of a 39 bp repeat (`5′-TATGCCTCTATGGCATAGGTATATATAATGACATAGGTA-3′`), more than the three copies in *P*. *marinus* \[[@pone.0157494.ref022]\]. A 26 bp repeat region is the most diverse region of the *L*. *morii* mitochondria genome and is composed of 7\~9 tandem repeat copies (`5′-TTGTAATTTTAAAATTTCTTTTTTAA-3′`), coupled with SNPs and small indels between copies. The conserved sequence block, CSB-II and CSB-III, is conserved with other lamprey species. The SNP rate of the noncoding region of *L*. *morii* mitochondria, excluding the 26 bp repeat region, was found to be 0.146%, a very low level and consistent with the above estimation with nuclear gene fragments. A phylogenetic tree was constructed with other lamprey mitochondria noncoding regions ([Fig 4B](#pone.0157494.g004){ref-type="fig"}), and it suggests a closer relationship among *Lampetra*, *Lethenteron* and *Petromyzon*.

![Structure of the *L*. *morii* mitochondrial noncoding region (A) and a phylogenetic tree based on this region (B).\
The tree was constructed using the maximum likelihood method with the Tamura---Nei substitution model. The mitochondrial noncoding region sequences of *P*. *marinus*, *Lethenteron reissneri*, *Lethenteron japonicum*, *Lampetra fluviatilis*, *Lampetra aepyptera*, *Lampetra appendix*, *Ichthyomyzon unicuspis*, *Ichthyomyzon fossor*, and *Geotria australis* were obtained from the NCBI database with accession numbers NC_001626.1, KC353466.1, KC353468.1, Y18683.1, NC_026917.1, NC_025583.1, NC_025553.1, NC_025552.1, and NC_029404.1, respectively.](pone.0157494.g004){#pone.0157494.g004}

Discussion {#sec008}
==========

Lamprey is an important model organism for evolutionary and immunological studies. Analysis of its noncoding mitochondrial sequence confirms that *L*. *morii* is related to *P*. *marinus* and *L*. *japonicum*, both of which have a published draft genome \[[@pone.0157494.ref024], [@pone.0157494.ref029]\]. Similar to *P*. *marinus* \[[@pone.0157494.ref006]\], the genetic material of *L*. *morii* had experienced germline DNA loss in soma (approximately 15% loss). The genome size of *L*. *morii* is similar to that of *L*. *japonicum* (\~1.6 Gb) but is only \~70% of *P*. *marinus\'*, suggesting a potentially large difference between the genomes of *L*. *morii* and *P*. *marinus*. The modal number of *L*. *morii* chromosomes (2n = 132) is less than those of other Petromyzontids and Geotriinae but more than that of Mordaciidae \[[@pone.0157494.ref004], [@pone.0157494.ref011], [@pone.0157494.ref013], [@pone.0157494.ref014]\]. We failed to observe bi-armed chromosomes, suggesting that the lower chromosome number of *L*. *morii* did not derive from centric fusions. This chromosome number is coincidentally close to that predicted for the last common vertebrate ancestor (2n = 136) \[[@pone.0157494.ref014], [@pone.0157494.ref031]\], which is worth further exploration for possible connections. More importantly, based on sequence analysis of several nuclear and mitochondrial DNA fragments, we show that *L*. *morii* appears to have very low heterozygosity (\~0.14%), much lower than *P*. *marinus*. This low heterozygosity may indicate a small effective population size for *L*. *morii*, which probably reflects its relatively limited habitat in fresh water. Taken together, our data provide overall background information for further phylogenetic and population genetic research.

Materials and Methods {#sec009}
=====================

Animals {#sec010}
-------

Adult lampreys (*L*. *morii*) collected from different locations were obtained from local fishermen, Lei Zhao, of the Yalu River, China (around E 126.96°, N 41.80°). Adult *B*. *belcheri* were obtained from local fishermen, Hui Liu, of Zhanjiang, China (E 110.43°, N 21.18°). Zebrafish specimens were obtained from the Fish market of Guangzhou, China (E 113.24°, N 23.09°). Twenty randomly selected individuals of each species were maintained under standard husbandry conditions and supplied with aeration, food and circulating filtered water at the School of Life Science, Sun Yat-Sen University.

No special permits were required for the fishermen to collect the animals. The animal collection and experiments were approved by the Animal Care and Ethics Committee of Sun Yat-Sen University (Permit Number: 20140573). All animals were anesthetized with tricaine methanesulfonate (MS-222) before euthanasia. Lampreys were sacrificed by decollation to obtain erythrocytes and tissues. Adult *B*. *belcheri* were quick frozen and ground in liquid nitrogen for genome extraction. Zebrafish were euthanized by a high dose of anesthesia and tail cutting to collect erythrocytes.

Single-cell suspension preparation {#sec011}
----------------------------------

Fresh chicken blood was obtained from the Poultry market of Guangzhou (E 113.29°, N 23.24°), and EDTA (to 1 mg/mL) was added for anticoagulation immediately. Erythrocytes were centrifugally collected and washed twice in PBS with 50 mM EDTA. The spermary of the lamprey were cut and filtered to obtain sperm. Other tissues (heart, liver, gills, kidneys and intestine) were digested with trypsin at room temperature for 4 hours and then filtered. A single-cell suspension of each tissue was observed with a microscope and diluted to 10^6^ cells per milliliter.

Flow cytometry {#sec012}
--------------

Single-cell suspensions were centrifuged at 300 × *g* for 5 min and resuspended in 10 mM CMF-EDTA \[[@pone.0157494.ref032]\]. These cell suspensions were adjusted to 75% ethanol and fixed for 30 min on ice. The fixed cells were washed twice in PBS with 0.1% BSA at room temperature and pelleted. Then, the cell pellet was resuspended in propidium iodide staining solution and incubated on ice for 30 min. Fluorescence due to PI staining was measured in a FACSCalibur flow cytometer (Becton Dickinson). Five tissues from each of three adult *L*. *morii* were measured. Erythrocytes from both chicken and zebrafish were used as the internal reference standard.

Karyotype analysis {#sec013}
------------------

Adult *L*. *morii* were injected with 1 mL colchicine solution (0.26%) and maintained in fresh water for 15 hours to arrest cells at metaphase. Then, the individuals were dissected to obtain gills and intestine. The tissues were cut into small pieces and immersed in hypotonic solution (0.46% KCl), which was removed 50 min later. Fresh Carnoy\'s fluid was added twice, each for 30 min, to fix the cells. To dissociate cells from the epidermis of tissues, 60% acetic acid was added for 5 min. Then, the cell suspensions were dropped onto glass slides, Giemsa-stained after drying, and observed under a high magnification oil microscope. Three randomly chosen adult individuals were tested.

AFLP protocol {#sec014}
-------------

The design and screening principle of the primers and adapters is from Vos et al. \[[@pone.0157494.ref026]\]. We followed their AFLP protocol with modifications of some parameters to make it suitable for our practical situation. After preliminary experiments, 7 primer combinations were selected to analyze the AFLPs in five randomly chosen adult individuals.

Amplification of nuclear and mitochondrial genomic fragments {#sec015}
------------------------------------------------------------

To sample the genetic diversity at the nucleotide level, we cloned one intron from each of five housekeeping genes (ACTL6B, GAPDH, HSP, PGK1 and RPL32). These five genes are conserved between *B*. *belcheri* and lamprey. We also designed a pair of primers to clone the noncoding mitochondrial sequence located between the ND6 and CYTB genes from *L*. *morii*. The primers used to amplify each fragment are listed in [Table 4](#pone.0157494.t004){ref-type="table"}. The amplified fragments were cloned into the pGEM-T vector (Promega) and were sequenced to analyze the differences between individuals. Three randomly chosen adult individuals were used in each test.

10.1371/journal.pone.0157494.t004

###### Primers used to amplify genomic and mitochondrial fragments.

![](pone.0157494.t004){#pone.0157494.t004g}

  Species           Gene                                       Forward primer (5′ to 3′)   Reverse Primer (5′ to 3′)
  ----------------- ------------------------------------------ --------------------------- ---------------------------
  *L*. *morii*      *ACTL6B*                                   `CGGAGCGACGCACACTACGG`      `GGCGATCATGTAGGGAGGGA`
                    *GAPDH*                                    `TGCGCCAATGTTCGTGATG`       `CCCTCCACGATGCCGAAGT`
                    *HSP*                                      `TCGCCCAGTTGATGTCCCTC`      `CATTTTGCTGGGGTCTGTCA`
                    *PGK1*                                     `GGGAGACATCTACGTGAACG`      `AACGGTCTCTCGGGCTTCTC`
                    *RPL32*                                    `GTCCCCTCGTGAAGCCCAAG`      `GCCTCACGCGGTTGTCAATG`
                    NC[^a^](#t004fn001){ref-type="table-fn"}   `ACCAAGCCTAAAGCAGAAAA`      `TTAGCAGGAGAAGGAAGATC`
  *B*. *belcheri*   *ACTL6B*                                   `CCCCGCCGGTCTGGAAAAAG`      `CGCCTGGAAATCTCGCAACA`
                    *GAPDH*                                    `ACCCATGAAGTCCGAGGA`        `TGGTGAAGGCTGCATCTG`
                    *HSP*                                      `AGCCCATCTGGACCCGTAAC`      `GATCCCCAGACCCAGCTTGA`
                    *PGK1*                                     `TGGCCTGTTGGGATTCTGCA`      `CTTCCGGGCATCTCTGACCA`
                    *RPL32*                                    `GAAATTCATCCGCCATCAGA`      `TTTTTGCTTCTTGCCCACTG`

^a^ noncoding region of lamprey mitochondria genome.

[^1]: **Competing Interests:**The authors have declared that no competing interests exist.

[^2]: Conceived and designed the experiments: XY SH. Performed the experiments: XY WM. Analyzed the data: XY SH. Contributed reagents/materials/analysis tools: FW AX SC. Wrote the paper: XY SH.


Q:

How to put a POST response in a tab of String?

I am using retrofit2 and I am getting a POST response in a format stated bellow. I am trying to put every line in its own tab bracket.
This is a response format:
aaaa
bb
cc
dd
I am trying to make it like this:
String[] tab = {"aaaa", "bb", "cc", "dd"};

This is my code:
protected void onActivityResult(int requestCode, int resultCode, Intent data){
    IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);
    if(result != null){
        if(result.getContents()==null){ //ce prekinemo skeniranje
            Toast.makeText(this, "Scann canceled!", Toast.LENGTH_LONG).show();
        }
        else{
            ...//here I want to put response into my tab

A:

This is the line of code you are looking for!
String[] tab = result.getContents().split(System.getProperty("line.separator"));


Q:

Is there a way to find an element in a linked-list by its index from the end of it

I have a non-cyclic linked list data structure. Like this:
public class LinkLst<T>{
    private Node<T> first;

    public LinkLst(T t){
        first = new Node(t);
    }
}

public class Node<T>{
    private T t;
    private Node<T> next;

    public Node(T t){
        this.t = t;
    }

    public void setNext(Node<T> n){
         this.next = next;
    }
}

So we know by default the List contains no cycles. Is there a way to find a n-th element from the end of LinkLst<T> lst with only one iteration if n <= size(lst) and throw IndexOutOfBoundException if n > size(lst).
public <T> T fromTheEnd(LinkLst<T> lst, int n){
   //...?
}

The only thing I could find is to reverse it and then find the desired element, but it requires 2 iterations. One for reverse and one to find the desired element. Also memory overhead.

A:

public <T> T fromTheEnd(LinkList<T> ts, int idx) {
    Node<T> follower, leader;
    // We iterate until the leader hits the end of the list. follower follows leader
    // idx steps behind, so when leader.next = [], follower is the desired node.
    follower = leader = ts.first;
    for(int j = 0; j < idx; j++) {
        leader = leader.next;
    }
    // leader is now idx steps ahead
    while(leader.next != null) {
      leader = leader.next;
      follower = follower.next;
    }
    // leader has hit the end (next is null)
    // follower has your data
    return follower.t;
}

In essence, this is a single iteration with two "heads."
Example of indexing 2 into [1, 2, 3, 4, 5], from the end.
Setup:
[1, 2, 3, 4, 5]
 ^ Leader
 ^ Follower

First loop:
[1, 2, 3, 4, 5]
 ^ F   ^ L

Second loop round 0:
[1, 2, 3, 4, 5]
    ^ F   ^ L

Second loop round 1:
[1, 2, 3, 4, 5]
       ^ F   ^ L

Loop ends: next(leader) = []
deref(follower) = 3

You'll probably want to factor out the method <T> LinkList<T> last(LinkList<T>,  int) that returns the suffix of the list with the given length, which lets you express fromTheEnd as just last(ts, n).first.t.

A:

If you don't want to iterate twice, you'd have to remember n values, which requires memory. Whether that's better than iterating twice is for you to decide.
Create an array of size n, and add values to array in a cyclic manner as you iterate the list.
When reaching end of list, and at least n elements have been iterated, the nth-from-last element is in the next position of the cyclic array.
This sacrifices memory for performance.


So LSU is officially rolling, the Saints are officially done with the preseason, and I am officially struggling to make sense of words. I may soon be spouting gibberish like Holtz.

It looks like MSU's quarterback Henig has blood all over his arm. Given the beating he has taken tonight, it's probably his.

Chris Fowler just went off on the MSU fans for leaving early. Attention Fowler: It's 31-0 in the 4th quarter. I think one team in history has overcome a similar deficit. Seriously, one. That is an absurd statement by a college analyst I usually find little fault with.

So what does one make of the Saints' fastest preseason game in NFL history (not sure about that one, but it sure felt that way). I think it says a lot for both coaching staffs, doing their best to end the preseason as quickly as possible for their players and their fans. Bravo!

The guys who impressed included Pierre Thomas (who else?) and Chris Reis, who came out of nowhere with two interceptions in the defensive backfield. Both guys could still get squeezed in the final roster countdown, so that is worth watching. I'm pulling for both to make it.

Martin proved himself capable of handling the No. 2 job while Palko made at least this observer wonder if he'll make the roster.

Are fans still myopic about Mare's kickoffs? He's just not an accurate kicker. Maybe that will be good enough.

Can it get any clearer than that? This has become a one-sided affair. Actually, that's an understatement. This has become as lopsided as Happy Gilmore vs. Bob Barker.

I just realized: Chris Fowler and Craig James are in the booth together for this game. Unless I'm mistaken, that's the first time they've worked together since the old days of College Gameday (James preceded Herbstreit as Corso's foil). It's kind of nice to see them together again, if only for nostalgia's sake.

So with LSU winning 45-0, it's time to wrap this thing up.

What can be learned from tonight? Not a whole lot. LSU was asleep most of this game, so that's something Miles will have to watch. If his boys coast against better opponents, they'll lose.

So what you will about the numbers, Flynn impressed me. He made the throws he had to and didn't make any mistakes. He's the sort of player that can steady the ship in tough times.

The defense was dominant, but it should have been. I think they'll probably have even better nights against better opponents the rest of the way.

And so ends my night of crazy amounts of blogging. I shall now go pass out from sheer exhaustion and dream of a better world, a world where LSU can focus for four quarters and the Saints can score more than 7. Hooray!


Q:

How to have javascript multi array?

I need multidimensional array, like this:
var myarray = [ ['username1', 10], ['username2', 20] ];

This array I need In (classical) ASP page (Default.asp), on other ASP page (generate.asp) I have MS SQL commands. So Idea for AJAX sending string from generate.asp to Default.asp is:
username1,10;username2,20

And in Default.asp build array someting like that:
var data="username1,10;username2,20";
data.split(';').each(function(){
//current ITEM. data.split(',')
new Array(item[0], item[1])
});

Please help me with syntax.

A:

I think you will have to use JSON, like this:
var myarray = [{username1 : 10}, {username2 : 20}]


Effect of Carbohydrate and Caffeine Ingestion on Badminton Performance.
To investigate the effect of ingesting carbohydrate and caffeine solutions on measures that are central to success in badminton. Twelve male badminton players performed a badminton serve-accuracy test, coincidence-anticipation timing (CAT), and a choice reaction-time sprint test 60 min before exercise. Participants then consumed 7 mL/kg body mass of either water (PLA), 6.4% carbohydrate solution (CHO), a solution containing a caffeine dose of 4 mg/kg, or 6.4% carbohydrate and 4 mg/kg caffeine (C+C). All solutions were flavored with orange-flavored concentrate. During the 33-min fatigue protocol, participants were provided with an additional 3 mL/kg body mass of solution, which was ingested before the end of the protocol. As soon as the 33-min fatigue protocol was completed, all measures were recorded again. Short-serve accuracy was improved after the ingestion of CHO and C+C compared with PLA (P = .001, η(p)(2) = .50). Long-serve accuracy was improved after the ingestion of C+C compared with PLA (P < .001, η(p)(2) = .53). Absolute error in CAT demonstrated smaller deteriorations after the ingestion of C+C compared with PLA (P < .05; slow, η(p)(2) = .41; fast, η(p)(2) = .31). Choice reaction time improved in all trials with the exception of PLA, which demonstrated a reduction (P < .001, η(p)(2) = .85), although C+C was faster than all trials (P < .001, η(p)(2) = .76). These findings suggest that the ingestion of a caffeinated carbohydrate solution before and during a badminton match can maintain serve accuracy, anticipation timing, and sprinting actions around the court.


Q:

Split string has symbols(many pipes) with regex

I have string word1|word2||||word3||word4| , i tried line.split("\\|"); but this will split just one pipe what's the regex that can handle my case.

A:

You can use "\\|+" to match multiple (1 or more) pipes.
line.split("\\|+");

Ideone Demo


Q:

How to get count of grouped rows

I need to get dealers ids, which have multiple car's vendors.
By example tables, I need to get id 3.
I'm stuck on this query:
SELECT COUNT(car.id), dealers2cars.dealer_id, car.vendor_id FROM car, dealers2cars
WHERE
dealers2cars.`car_id` = car.id
GROUP BY car.vendor_id, dealers2cars.`dealer_id`

But it get wrong result (all dealers and count of their cars grouped by vendor).
count dealer_id vendor_id
2,1,1
1,3,1
3,2,2
1,3,2

This is example database tables:
CREATE TABLE `car` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vendor_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `car` */

insert  into `car`(`id`,`title`,`vendor_id`) values
(1,'F1',1),
(2,'480 Italia',1),
(3,'New Beatle',2),
(4,'Scirocco',2),
(5,'Golf',2);

/*Table structure for table `dealers2cars` */

CREATE TABLE `dealers2cars` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `dealer_id` int(11) DEFAULT NULL,
  `car_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `dealers2cars` */

insert  into `dealers2cars`(`id`,`dealer_id`,`car_id`) values
(1,1,1),
(2,1,2),
(3,2,3),
(4,2,4),
(5,2,5),
(6,3,1),
(7,3,5);

A:

If I understood the question correctly, this should do the trick for you:
SELECT
  count(vendor_id)
, dealers2cars.dealer_id
FROM dealers2cars JOIN car ON dealers2cars.dealer_id = car.id
GROUP BY dealer_id
HAVING COUNT(vendor_id) > 1

Output:
COUNT(VENDOR_ID)    DEALER_ID
2                   1
3                   2
2                   3

Update: This is most likely the qudery you need:
SELECT
COUNT(DISTINCT(vendor_id)),dealer_id
FROM dealers2cars JOIN car ON dealers2cars.car_id = car.id
GROUP BY dealer_id
HAVING COUNT(DISTINCT(vendor_id)) > 1

It pulls the dealers that have cars from more than 1 unique vendor.


1. Field of the Invention
The present invention relates to an image generation method and an apparatus, and more particularly to an image generation method and an apparatus comprising a plurality of DRAMs for storing data separately corresponding to respective pixels on a screen.
2. Description of the Invention
Hitherto, an image generation apparatus of this kind has a memory for storing data which correspond to respective pixels, and competence of memory interface for transferring the pixel data controls mainly the speed of the image generation. Therefore, from one aspect, it has been necessary to use the memory of a high transfer rate, but due to an expensive cost of the high speed memory, it has been required to use such as a DRAM which can be obtained at a lower price.
However, since the access speed of these DRAMs are slow, a new method is employed to meet the problem such that a screen is divided into rectangular areas to be obtained through 2.sup.x by 2.sup.y division of longitudinal and lateral ways, and assigns consecutive address numbers for pixels in the same low within a block, data corresponding to respective pixels are distributed to a plurality of DRAMs corresponding to a least significant bit of its low order address and then stored.
FIG. 1 is a partial block diagram showing an example of a structure of a conventional image generation apparatus at the write control time of the memory.
The conventional image generation apparatus comprises pixel processing unit 1, memories consisting of DRAMs 7 and 8, address FIFOs 3 and 4, data FIFOs 5 and 6, and memory controller 9, and memory controller 9 operates at the write control time of the memory.
Pixel processing unit 1 generates address signal 50 and data signal 51 for each block corresponding to each pixel in an image on a screen, and outputs thus generated signals pixel by pixel together with write request signal 52, and also outputs block processing completion signal 63 when the processing of one block is finished. DRAMs 7 and 8 receive address signals 59, 60 and data signals 61, 62 from address FIFOs 3, 4 and data FIFOs 5, 6, and then these signals are write-controlled at the same timing in accordance with DRAM control signals 57, 58.
Address FIFOs 3, 4 divide and temporarily hold address signal 50 in accordance with input control signals 54, 55, and output address signals 59, 60 to DRAMs 7, 8 at the same timing in accordance with output control signal 56 from memory controller 9.
Data FIFOs 5, 6 divide and temporarily hold data signal 51 in accordance with input control signals 54, 55, and output data signals 61, 62 to DRAMs 7, 8 in accordance with output control signal 56 from memory controller 9.
Memory controller 9 receives address signal 50 and write request signal 52, and outputs input control signal 54 when the least significant bit of address signal 50 is 0 and write request signal 52 becomes effective. On the other hand, memory controller 9 outputs input control signal 55 when the least significant bit of address signal 50 is 1 and write request signal 52 becomes effective. Memory controller 9 also outputs output control signal 56 and DRAM control signals 57, 58 when address FIFOs 3, 4 have data held therein and DRAMs 7, 8 are in writable conditions. Further, memory controller 9 outputs output control signal 56 and DRAM control signals 57, 58 so that data remained in address FIFOs 3, 4 and data FIFOs 5, 6 may be outputted to DRAMs 7, 8 when block processing completion signal 63 becomes effective.
The operation of the conventional image generation apparatus at the write control time of the memory is described hereinafter.
FIG. 2 is an arrangement diagram showing column-address arrangement example 1 in a block of the conventional image generation apparatus shown in FIG. 1. Here, a block is divided into rectangular segments through 2.sup.3 by 2.sup.3 division of longitudinal and lateral ways, a column address of the block has bus width of 3+3=6 bits, bisecting to a high order 3 bits and a low order 3 bits and they are assigned to a longitudinal address and a lateral address, respectively, and the least significant bit (the first bit) of the lateral address of the block is used as discrimination bit (the low order address) which selects DRAM 7 or 8. For explanation of the operation, we assume a case where address data of each segment of block 17 included in superposed image 16 are written on DRAMs 7, 8.
First, in pixel processing unit 1, address signals 50 which correspond to pixels in image 16 on the screen are produced from upper left in the order of 05h, 06h, 0Dh, 0Eh, 0Fh, 15h, 16h, - - - , 37h, 3Dh, 3Eh, 3Fh and are outputted pixel by pixel together with data signal 51 and write request signal 52.
At this time, in memory controller 9, input control signal 54 is outputted when the lateral least significant bit (the first bit) of address signal 50 is 0 such as 06h, 0Eh, - - - , 3Eh and also write request signal 52 becomes effective. Then address signal 50 and data signal 51 are temporarily retained in address FIFO 3, data FIFO 5 in the address order such as 06h, 0Ch, - - - , 3Eh. On the other hand, when the lateral least significant bit (the first bit) of address signal 50 is 1 such as 05h, 0Dh, 0Fh, - - - , 3Fh and also write request signal 52 becomes effective, input control signal 55 is outputted and address signal 50 and data signal 51 are temporarily held in address FIFO 4 and data FIFO 6 in the order of the address such as 05h, 0Dh, 0Fh, - - - , 3Fh.
Next, in memory controller 9, when there are data in FIFOs 3, 4 and at the same time DRAMs 7, 8 are in writable conditions, output control signal 56 and DRAM control signals 57, 58 are outputted. Now, when there is data in one of FIFOs 3, 4, then only one of DRAM control signals 57, 58 is outputted. Then, in accordance with output control signal 56, address signal 59 and data signal 61 are outputted in order from address FIFO 3 and data FIFO 5 to DRAM 7, and concurrently address signal 60 and data signal 62 are outputted in order from address FIFO 4 and data FIFO 6 to DRAM 8, and also DRAMs 7, 8 are write-controlled at the same timing according to DRAM control signals 57, 58.
Subsequently, in pixel processing unit 1, block processing completion signal 63 is outputted when the processing of one block is finished. When this block processing completion signal 63 becomes effective, output control signal 56 and DRAM control signals 57, 58 are outputted from memory controller 9, and data remained in address FIFOs 3, 4 and data FIFOs 5, 6 are outputted to DRAMs 7, 8 to be stored.
FIG. 3 is an explanation diagram showing an example of write access operation conducted to DRAMs 7, 8 under the column-address arrangement shown in FIG. 2, illustrating write access order to each DRAM 7, 8 and a column address of each DRAM 7, 8. Here, although columns for write access to DRAM 7 in ninth to fifteenth times are recorded as unused, this means that DRAM control signal 57 is not issued and any write operation is not conducted to DRAM 7 at the corresponding time.
FIG. 4 is an arrangement diagram showing column-address arrangement example 2 in a block of the conventional image generation apparatus of FIG. 1.
The image area is divided into rectangular areas through 2.sup.3 by 2.sup.3 division in longitudinal and lateral ways and column address of a lateral order address in a block has bus width of 3+3=6 bits, bisecting to the high order 3 bits and the low order 3 bits and they are assigned to a longitudinal address bits and a lateral address bits, respectively, and the least significant bit (the first bit) of the lateral address bits is used as discrimination bit (the low order address) which selects DRAM 7 or 8.
For explanation of the operation, we assume a case where address data of each pixel of block 19 included in superposed image 18 are written on DRAMs 7, 8.
First, in pixel processing unit 1, address signals 50 which correspond to pixels in image 18 on the screen are produced from upper left in the order of 01h, 02h, 03h, 04h, 05h, 06h, 07h, 08h, - - - , 14h, 15h, 16h, 17h and are outputted pixel by pixel together with data signal 51 and write request signal 52.
At this time, in memory controller 9, input control signals 54 are outputted when the longitudinal least significant bit (the fourth bit) of address signal 50 is 0 such as 01h, 02h, - - - , 06h, 07h, 10h, - - - , 17h and also write request signal 52 becomes effective. Then address signal 50 and data signal 51 are temporarily held in address FIFO 3, data FIFO 5 in the address order such as 01h, 02h, 03h, 04h, - - - , 17h. On the other hand, when the longitudinal least significant bit (the fourth bit) of address signal 50 is 1 such as 09h, 0Ah, 0Bh, - - - , 0Fh and also write request signal 52 becomes effective, input control signal 55 is outputted and address signal 50 and data signal 51 are temporarily held in address FIFO 4 and data FIFO 6 in the order of the address such as 09h, 0Ah, 0Bh, - - - , 0Fh.
Next, in memory controller 9, when there are data in FIFOs 3, 4 and at the same time DRAMs 7, 8 are in writable conditions, output control signal 56 and DRAM control signals 57, 58 are outputted. Now, when there is data in one of FIFOs 3, 4, then only one of DRAM control signals 57, 58 is outputted. Then, in accordance with output control signal 56, address signal 59 and data signal 61 are outputted in order from address FIFO 3 and data FIFO 5 to DRAM 7, and concurrently address signal 60 and data signal 62 are outputted in order from address FIFO 4 and data FIFO 6 to DRAM 8, and also DRAMs 7, 8 are write-controlled at the same timing according to DRAM control signals 57, 58.
Subsequently, in pixel processing unit 1, block processing completion signal 63 is outputted when the processing of one block is finished. When this block processing completion signal 63 becomes effective, output control signal 56 and DRAM control signals 57, 58 are outputted from memory controller 9, and data remained in address FIFOs 3, 4 and data FIFOs 5, 6 are outputted to DRAMs 7, 8 to be stored.
FIG. 5 is an explanation diagram showing an example of write access operation conducted to DRAMs 7, 8 under the column-address arrangement shown in FIG. 4, illustrating write access order to each DRAM 7, 8 and a column address of each DRAM 7, 8. Here, although columns for write access to DRAM 8 are recorded as unused in ninth to fifteenth times, this means that DRAM control signal 58 is not issued and any write operation is not conducted to DRAM 8 at the corresponding time.
In the conventional image generation apparatus, a longitudinal and a lateral address in a block are assigned to a column address of DRAM 7, DRAM 8, and according to the least significant bit of the longitudinal address or the lateral address, it is determined which of DRAM 7 or DRAM 8 is to be selected and assigned. Therefore, on the boundary of the block, there reside pixels which perform one-side access to either of DRAM 7 or DRAM 8, and hence some of columns of DRAM 7 or DRAM 8 remain unused. Consequently, when an image is produced on the address space on the DRAM demarcated by the block, a number of one-side access to DRAM 7 or DRAM 8 are generated resulting in a problem of unbalanced access frequency so that it makes a slow image generation during an extended time period.


cannabisnews.com: Cannabis: The Final Word
Cannabis: The Final Word
Posted by CN Staff on December 05, 2005 at 07:27:54 PT
By Barbara Lantin
Source: Daily Telegraph
United Kingdom -- Why can't people make up their minds about cannabis? A recent issue of a tabloid newspaper carried news of an Australian study that showed that four out of five people with severe schizophrenia had been regular marijuana smokers in their youth. A few pages later, it included an article extolling the virtues of a cannabis-derived medicine for multiple sclerosis (MS) patients.
The Home Office insists that cannabis "is still a controlled drug, and possession, production and supply are still illegal", but last week, it published proposals that mean anybody carrying enough to make up to 500 joints is likely to escape trafficking charges. What are we to make of these apparent contradictions?The 'good' news about cannabis...Last month, the Government announced that Sativex - an oral spray derived from cannabis that is licensed in Canada but not yet in the UK - could be prescribed on a "named patient" basis for pain relief in patients with MS. Sativex, which is the only medicine in the world derived from the cannabis plant, works by influencing the way pain messages are transmitted through the body. "It's not that patients get high and stop caring about their pain," emphasises Mark Rogerson, spokesman for the manufacturers, GW Pharmaceuticals. "A person taking a normal dose will receive only a fraction of the tetrahydrocannabinol (THC) - the active ingredient in cannabis that causes a high - of a recreational user." A recent trial in the journal Neurology showed that Sativex was significantly better than a placebo at reducing pain and sleep disturbances in MS patients.... and the 'bad' Two pieces of research published last week have added to the growing body of evidence that, when smoked by vulnerable, young people, cannabis can lead to serious mental illness. A Danish study in the British Journal of Psychiatry found that almost half of patients treated for a cannabis-related mental disorder go on to develop a schizophrenic illness. People who had used the drug developed schizophrenia earlier than those with the illness who had not smoked marijuana.The researchers emphasised that the study did not show that cannabis caused psychosis, because factors such as heredity, other drug use and socio-economic status had not been taken into account. However, an American study using sophisticated imaging techniques found similar abnormalities in the brains of adolescents with schizophrenia, and those who use cannabis daily, but no such abnormalities in healthy teenagers."These findings suggest that, in addition to interfering with normal brain development, heavy marijuana use in adolescents may also lead to an earlier onset of schizophrenia in individuals who are genetically predisposed to the disorder," says Dr Sanjiv Kumra, assistant professor of psychiatry at the Albert Einstein College of Medicine, New York, who worked on the study.According to Robin Murray, professor of psychiatry at the Institute of Psychiatry in London, one person in four has the genes that make them susceptible to developing cannabis-induced psychosis.Are patients who take cannabis-derived drugs at risk?"There is a distinct difference between using a drug therapeutically, under medical supervision, and taking it recreationally," says Prof Murray. "Cannabis is a mixture of substances; when it is used in medicine, the aim is to have less of the hallucinogenic components, and more of those that have an effect on muscle tension."Also, if you smoke a joint, you get high levels of these components in the blood, and they decrease quite rapidly; whereas in pharmaceutical use, you have slow absorption, and levels remain fairly constant, so the psychotropic effects are likely to be fewer."According to one survey, around 16 per cent of people with MS smoke cannabis to help relieve their symptoms. However, because of their age, this group is less likely to be at risk of schizophrenia. "Psychosis is a disorder of youth," says Prof Murray.According to Rogerson of GW Pharmaceuticals: "We have found no evidence that Sativex causes psychosis. Such side effects as there are - and no drug is without them - are generally mild, reversible and well tolerated. There may be a temporary intoxication-like reaction, and, for this reason, we have always excluded people with serious mental illness from our trials." What is the Government's attitude to cannabis?Having downgraded the drug from class-B to class-C, the Government has asked its advisory council on the misuse of drugs to review the possible links between cannabis and mental illness. Its report is due by the end of the year, but leaks suggest that it will recommend no change in the law."I don't care about the classification of cannabis," says Prof Murray. "But the Government has made a major error in accompanying the reclassification with reassurance that the drug is not harmful. What is needed now is education. The Americans are tackling it very well. What is our Government doing?"Note: A risk to mental health, or a boon for people with MS? Both, says Barbara Lantin.Source: Daily Telegraph (UK)Author: Barbara LantinPublished: December 5, 2005Copyright: 2005 Telegraph Group LimitedContact: dtletters telegraph.co.ukWebsite: http://www.telegraph.co.uk/Related Articles:Official Questions Linking Pot with Schizophreniahttp://cannabisnews.com/news/thread21347.shtmlHeavy Marijuana Use Damages Adolescent Brainshttp://cannabisnews.com/news/thread21343.shtml
Home Comment Email Register Recent Comments Help
Comment #7 posted by cannabliss on December 06, 2005 at 16:34:15 PT
Proven: Cannabis *DOES* cause psychotic behavior
After a long day working a relatively demanding job in a technical profession, a man comes home and unwinds by having a bong hit, listening to some music, and reading some news sites.This affects the mental state of a large number of people.So much so, that they are willing to tolerate the following:- Decimation of the Bill of Rights (due process, search and seizure, C&U punishment, speech, arms, devolution of power to states, possibly religion, etc)- Wholescale lying to young impressionable children - Increase in police corruption- Increase in likelihood of early release of murderers- Loss of (conservatively) $10s of Billions of economic activity- Increased damage to health and evironment- (fill in your personal favorite)in order to prevent said man from doing so.Truly psychotic behavior.
[ Post Comment ]
Comment #6 posted by cornoir on December 05, 2005 at 19:40:37 PT
Cut to the Chase
Mind altering drugs affect the mind of young growing people!Okay that we already know if you studied biology.Mind altering drugs most commonly used= Alcohol, Cannabis, not too sure on Nicotine being mind altering, but I bet it is.So keeping it illegal means no quality control, no checking for kid's ID by dealers, disagreements being resolved by violence since it is illegal to go to the police.Not to mention that the "drug warriors" are still harping on the "smoking cannabis is bad", well what about vaporizing or eating/drinking it?An open appeal to whomever: Collaborate with NORML, MPP, hell even George Soros and sue the current White House Administration, the DEA, ODCNP, FDA and even Congress. Most of us already know the whole Cannabis Prohibition is scientifically baseless, a scare tactic based upon control and by ever definition of the legal word, a conspiracy.Protests/Petitions/Arguements will not really get anything done in our lifetime. Go to the top and the rest will crumble. The UN drug policies were pushed by Anslinger who lied out his teeth, so if the USA repeals Cannabis prohibition so will the UN follow too.The people who are controlling this hate the discerning public eye, so publicize the trials as well as never stop. Hell if OJ can get off can't there be a "Dream Team of Canabis" lawyers (10+) as vicious as the ones the government has? If I ever win the lottery, so help me.
[ Post Comment ]
Comment #5 posted by FoM on December 05, 2005 at 16:57:59 PT
Related Article from DGDispatch
Marijuana Use, Schizophrenia Show Similar Patterns in Developing Adolescent Brains: Presented at RSNABy Ed SusmanCHICAGO, IL -- December 5, 2005 -- Studies using brain diffusion tensor imaging appear to show similar developmental delays or deficits in scans of teenagers who are heavy users of marijuana as in teenagers who have schizophrenia."The worst developmental deficit is seen in schizophrenics who are marijuana smokers." said Manzar Ashtari, PhD, Researcher, Zucker Hillside Hospital, Glen Oaks, New York, United States.In a presentation here at the 91st scientific assembly and annual meeting of the Radiological Society of North America (RSNA), Dr. Ashtari described her examination of several small groups of subjects in late adolescence -- healthy, non-drug users; teens who had been using marijuana daily for at least 1 year; and schizophrenics.Diffusion tensor imaging depicts the motion of water molecules in the brain, and Dr. Ashtari and colleagues looked specifically at the arcuate fasciculus, a bundle of fibers in the left frontal lobe.Her work revealed that repeated exposure to marijuana was related to abnormalities in the development of the fiber pathway, she said in a press briefing on November 30th. "Because this language/auditory pathway continues to develop during adolescence, it is most susceptible to the neurotoxins introduced into the body through marijuana use," she explained.The researchers compared the arcuate fasciculus development in the brains of 12 healthy, early adolescents with 12 later adolescents; 11 schizophrenic patients with 17 matched controls; 15 schizophrenic patients who smoke marijuana with 17 matched controls; and 15 marijuana smokers with 15 matched non-drug users.Complete Article: http://tinyurl.com/bb47k
[ Post Comment ]
Comment #4 posted by FoM on December 05, 2005 at 16:53:25 PT
Cannabis Almost Doubles Risk Of Fatal Crashes
December 06, 2005 Driving under the influence of cannabis almost doubles the risk of a fatal road crash, finds a study published online by the BMJ today. However its share in fatal crashes is significantly lower than those involving alcohol. The study took place in France and involved 10,748 drivers who were involved in fatal crashes from October 2001 to September 2003. All drivers underwent compulsory tests for drugs and alcohol. A total of 681 drivers tested positive for cannabis (7%) and 2096 for alcohol (21.4%), including 285 for both (2.9%). Men were more often involved in crashes than women, and were also more often positive for both cannabis and alcohol, as were the youngest drivers, and users of mopeds and motorcycles. The risk of being responsible for a fatal crash increased as the blood concentration of cannabis increased (known as a dose effect). The odds increased from 1.9 at a concentration of 0-1 ng/ml to 3.1 at or above 5 ng/ml. Click here to view full paper:
http://press.psprings.co.uk/bmj/december/cannabis.pdfComplete Article: http://tinyurl.com/bqs9b
[ Post Comment ]
Comment #3 posted by Richard Zuckerman on December 05, 2005 at 14:46:59 PT:
MARIJUANA "USE AND ABUSE"
The U.S. Navy psychiatrist diagnosed me as "manic depressive psychosis Manic type 296.1", with "Marijuana use and abuse" in the diagnosis. He said I am not schizophrenic.After I mail threatened the federal judge over the pot and gun laws, Butner Federal Correctional Facility Chief Forensic Psychiatrist Dr. Sally Johnson diagnosed me as "Paranoid Schizophrenic", which psychiatrists have used as "...a long history of mental illness dating back to 1977."Read the article critical of psychotherapy and psychiatry in this month's issue of Paranoia Magazine? Read the literature by Dr. Thomas S. Szasz, M.D., Psychiatrist? Read the late David L. Bazelon's chapter entitled THE SOVIET PARALLEL, in his book entitled QUESTIONING AUTHORITY? He failed to mention his quote in U.S. v. Wright, 627 F.2d 1300, 1311 (D.C. Cir. 1980):
"We know the danger of a Big Brother state that treats its critics as mentally ill."Wait until the weather and economic disasters hit this country! We'll see much more "mental illness"!
[ Post Comment ]
Comment #2 posted by legalizeit on December 05, 2005 at 09:37:00 PT
"The Americans are tackling it very well." ??
"I don't care about the classification of cannabis," says Prof Murray. "But the Government has made a major error in accompanying the reclassification with reassurance that the drug is not harmful. What is needed now is education. The Americans are tackling it very well. What is our Government doing?"Americans are tackling it very well? How? By regulating and allowing its legal sale only to adults, as with cigarettes and booze, so that the adolescents she claims are adversely affected don't use cannabis? NOT!!This professor should keep her trap shut. Does she ever read the American news? The complete disaster that is cannabis prohibition proves itself again and again. If her supposedly analytical mind thinks the Americans are "tackling it very well," how are we supposed to trust her research?No one has ever said that cannabis is completely harmless, or that kids or adolescents should be granted open access to it. But it rings true again and again that the current, draconian prohibition of cannabis does far more harm, and causes many more problems, than using it can.
[ Post Comment ]
Comment #1 posted by FoM on December 05, 2005 at 09:07:32 PT
Press Release from MPP
Medical Marijuana Bill Introduced in Michigan House of Representatives***Measure by Rep. LaMar Lemmons III Builds on Strong Support for Local InitiativesDecember 5, 2005 LANSING, MICHIGAN — Building on the strong voter support for medical marijuana initiatives over the last 16 months, Rep. LaMar Lemmons III (D-Wayne County) and a bipartisan group of cosponsors have introduced a bill to protect medical marijuana patients from arrest statewide.Rep. Lemmons' bill, HB 5470, would allow seriously ill patients to use and possess a limited amount of medical marijuana if their doctor has recommended it. The bill is similar to medical marijuana laws now in force in Alaska, California, Colorado, Hawaii, Maine, Montana, Nevada, Oregon, Vermont, and Washington."Patients battling cancer, multiple sclerosis, AIDS, or other terrible illnesses should not have to risk arrest and jail for using medical marijuana if their doctor believes it may help them," Rep. Lemmons said. "Science, compassion and common sense say that we should protect medical marijuana patients from arrest, and the voters in four Michigan communities have resoundingly agreed.."State voters have overwhelmingly endorsed a series of local laws to protect medical marijuana patients, beginning with passage of Detroit's Proposal M by a 60 percent to 40 percent margin in August 2004. This was followed by an even larger victory in Ann Arbor that November. In November of this year, medical marijuana initiatives passed in Ferndale and Traverse City by 61 percent to 39 percent and 63 percent to 27 percent, respectively."In Michigan and around the U.S., voters want to protect medical marijuana patients," said Michael McKey, legislative analyst with the Marijuana Policy Project in Washington, D.C. "The overwhelming votes in support of local medical marijuana initiatives in Detroit, Traverse City, Ferndale, and Ann Arbor sent a clear message to legislators, and Rep. Lemmons deserves credit for listening. We are hopeful that his fellow legislators will join him in passing this sensible, humane legislation."With more than 18,000 members and 100,000 e-mail subscribers nationwide, the Marijuana Policy Project is the largest marijuana policy reform organization in the United States. MPP believes that the best way to minimize the harm associated with marijuana is to regulate marijuana in a manner similar to alcohol. For more information, please visit http://MarijuanaPolicy.org
[ Post Comment ]
Post Comment


Q:

How to set C++ standard in QtCreator with ClangCodeModel plugin?

Sorry if this is a dumb question, but I have already tried almost everything and am banging my head against a wall right now..
The problem is, QtCreator 4.8.0-beta for Windows with Clang Code Model plugin parses my project
as C++98 whereas in fact it is C++17. However specifying the standard version explicitly in the settings dialog is not allowed ("Option "-std=c++17" is invalid").
So, how do I tell ClangCodeModel that it should parse code as C++17?
I use CMake for building the project and have set (CMAKE_CXX_STANDARD 17) in the top-level CMakeLists.txt file.
Thanks!

A:

I think your question is similar to
This one, According to the link, dated October 2018, it is an issue of QtCreator and does not seem to have been solved. However I would suggest you to test yourself the solution proposed in the link, infact it may work on your pc.
If you are still stuck into this problem, try to install the latest version of Qt 5


403 F.2d 49
Willie Gray DIXON, Jr., Appellant,v.STATE OF FLORIDA, Appellee.
No. 26127.
United States Court of Appeals Fifth Circuit.
November 12, 1968.

Willie Gray Dixon, Jr., pro se.
Earl Faircloth, Atty. Gen., Tallahassee, Fla., Robert R. Crittenden, Asst. Atty. Gen., Lakeland, Fla., for appellee.
Before DYER and SIMPSON, Circuit Judges, and CABOT, District Judge.
PER CURIAM:

1
This is an appeal from a denial of habeas corpus relief to Willie Gray Dixon, Jr., who is serving a Florida state sentence for possession of narcotics. We affirm the judgment of the District Court.

2
Upon a previous appeal, we remanded for a determination whether the appellant had exhausted his available state remedies. Dixon v. State, 5 Cir. 1968, 388 F.2d 424. The District Court held that the remedies have been exhausted and conducted an evidentiary hearing on the merits of the petition.

3
The appellant was present and participated in the hearing but did not testify. He and his counsel expressly waived all contentions of the habeas petition except those concerning the validity of the search warrant.

4
Appellant contends that the search warrant was invalid because:

5
1. There was no time stated in the affidavit when the informants observed appellant's premises.

6
2. There was no showing of probable cause, i. e., that the informants were reliable.

7
3. The warrant was issued by a judge of a juvenile court.

8
4. The trial court refused to require the prosecution to reveal the identity of the two informants mentioned in the search warrant prior to trial.

9
Appellant also contends that it was error to admit the search warrant in evidence. At the trial by the court sitting without a jury, however, the appellant's counsel acquiesced in the search warrant's inclusion in the record, reserving his objections that the warrant was invalid. The warrant was admitted as an exhibit of the court.

10
At the hearing in the District Court, Deputy Sheriff Pendarvis, the officer who made the affidavit and obtained and executed the search warrant, testified. Pendarvis testified that the two confidential informants mentioned in his affidavit were personally known to him as reliable informants. The court refused to require Pendarvis to reveal their names.

11
The appellant's former counsel, a Mr. Goldburg, testified that he thought one of the informants was a man named Lara, who had been at the appellant's home on the date the warrant was issued and executed. Lara's attorney had advised appellant's counsel that Lara refused to cooperate in appellant's defense. In Mr. Goldburg's personal opinion, Lara was not a reliable informant, but he did not know whether the police had found Lara reliable or not. The appellant had stated to Attorney Goldburg that Lara left the narcotics at his home on the date the police found them wrapped in a sock in the appellant's pocket.

12
We observe at this point that the appellant was not charged with sale of the narcotics to the informant as was the case in Roviaro v. United States, 353 U.S. 53, 77 S.Ct. 623, 1 L.Ed.2d 639 (1957). If he had been, Roviaro would be inapplicable since the appellant concededly knew Lara's identity, in the event that he desired to present a defense based, e. g., on entrapment. No such defense was alleged at the trial at which the appellant presented no evidence.

13
The testimony of Deputy Pendarvis that his two informants were known by him to be reliable was uncontradicted. Under the applicable law, the trial court was not required to order the prosecution to reveal their identity. See McCray v. Illinois, 386 U.S. 300, 87 S.Ct. 1056, 18 L.Ed.2d 62 (1967); Aguilar v. Texas, 378 U.S. 108, 114, 84 S.Ct. 1509, 12 L.Ed.2d 723 (1964); Jones v. United States, 362 U.S. 257, 80 S.Ct. 725, 4 L.Ed. 2d 697 (1960).

14
The First Circuit has held that an affidavit for a search warrant which was stated in the present tense was defective for failure to allege the time when the affiant received information from an anonymous informant or the time when the affiant detected the odor of mash outside the premises, in a prosecution for operation of an illegal still. Rosencranz v. United States, 1 Cir. 1966, 356 F.2d 310. In the case at bar, however, the affidavit states the dates on which the relevant information was received from each of the two informants and one of the three dates on which the affiant personally observed known narcotics addicts going in and out of the described premises. We hold this is sufficient. It is significant that the reports of the informants bracketed the dates of June 1 and June 11, 1964, and on the latter date the warrant was issued and served. The fair inference from this together with Pendarvis' observation demonstrates the existence of probable cause.

15
If the teachings of the Court's cases are to be followed and the constitutional policy served, affidavits for search warrants, such as the one involved here, must be tested and interpreted by magistrates and courts in a commonsense and realistic fashion. They are normally drafted by nonlawyers in the midst and haste of a criminal investigation. Technical requirements of elaborate specificity once exacted under common law pleadings have no proper place in this area. A grudging or negative attitude by reviewing courts toward warrants will tend to discourage police officers from submitting their evidence to a judicial officer before acting.

16
United States v. Ventresca, 380 U.S. 102, 108, 85 S.Ct. 741, 746, 13 L.Ed.2d 684, 689 (1965).

17
Appellant's contention that the juvenile judge was incompetent to issue the search warrant has not been presented to any state court for exhaustion of state remedies, and so need not be considered by us in this appeal, 28 U.S.C.A. § 2254. We note in passing that § 39.02 (4), Florida Statutes, F.S.A., provides that a juvenile court judge has the jurisdiction of a committing magistrate, and that § 933.01, Florida Statutes, F.S.A., provides that a search warrant can be issued by a committing magistrate.

18
We find no reversible error in the proceedings below, including the District Court's holding that the search warrant was valid. Accordingly, the judgment is

19
Affirmed.


Q:

How to tune a violin in a proper way?

First of all, is the G string the shortest among the 4 strings?
Also, does applying graphite on the groove always works?
I'm traumatised by E string as it's very easy to snap. Do you guys have any useful tips when tuning the E string? Especially when a new E string is installed, and it tends to go flat, and the other strings go a bit lower too. FYI, I have fine tuner for the E string. When I am 3 semitones away from reaching up to E5, should I use the peg or fine tuners? May I get suggestions from experienced violin players, or even luthiers? Thanks

A:

Yes the G string is the shortest because of the arrangement of the tuning pegs.  It's a good idea to apply graphite so that the strings can slide over the nut more easily.
It does feel like the E string might snap when tuning it up but if it is a good quality string then it won't.  They are made to cope with being that tight when up to pitch.  Just be careful not to over tighten it past the E.  You should be able to get it up to pitch with the tuning peg, but if you feel nervous then do the last bit with the fine tuner.  Just be sure that you unscrew the fine tuner first so you have plenty of room to tighten the string up to pitch.  Hope that makes sense.
New strings will go flat for a while, but will settle if you keep tuning them up again.


1. Field of the Invention
The present invention relates to a sheet processor for the sorting, binding, and loading of sheets discharged from an image forming apparatus after formation of an image thereon, and, more particularly, to a sheet processor with a punching means for punching out a hole in a sheet. The present invention also relates to an image forming apparatus including such a sheet processor.
2. Description of the Related Art
A conventional sheet processor performs post-processing operations (such as sorting, binding, loading, and punching operations) on sheets to be discharged from an image forming apparatus after formation of an image thereon.
In such a sheet processor, a known punching method for punching out a hole in a sheet is used. In this punching method, holes are punched in a batch of sheets on a processing tray. However, because holes are formed in a batch of sheets, the next sheet cannot be transported during a punching operation. In addition, depending on the capacity of the punching means, it may be necessary to temporarily stop the sheets from being transported from an image forming apparatus and perform punching operations separately a number of times, making it difficult to increase processing speed.
To overcome the above-described problems, two known methods have been used. In the first method, a hole is formed in the sheets one sheet at a time, as the sheets are continuously discharged at predetermined intervals from an image forming apparatus. In the second method, a punching means comprising a punch and a die is disposed in a sheet transporting path. The transportation of sheets and punching operations are synchronized, so that punching operations can be performed without temporarily stopping sheet transportation. Therefore, sheet processing time is not increased by punching operations.
In the above-described conventional example, two methods of adjusting punching positions are used. In the first method, the front edge or the back edge of a sheet being transported in a sheet transporting direction is detected, and, based on the detection results, the timing of punching a hole is changed to adjust the punching position. In the second method, in a direction transverse to the sheet transporting direction (i.e., the sheet width direction), an edge of a sheet being transported is detected, and, based on the detection results, the punching means is moved in the transverse direction to adjust the punching position.
In such a sheet processor in which sheets are transported and punching operations are performed in synchronism without temporarily stopping sheet transportation, when the punching position is adjusted with respect to the sheet width (transverse) direction, the edge portion of the next sheet is detected after the driving of the punch motor is completed. In order to detect the edge of the next sheet, the sheet edge detecting means starts to move to a sheet edge detection standby position. Therefore, time is required to perform operations on the next sheet being transported. Consequently, compared to sheet processors in which the punching position is not adjusted in the sheet width direction, this method has lower sheet processing capacity.
Accordingly, in view of the above-described problems, it is an object of the present invention to provide a sheet processor which allows a punching means to be set at the punching position more precisely, and which can perform a larger number of punching operations.
To this end, according to a first aspect of the invention, there is provided a sheet processor comprising:
a sheet transportation path for transporting sheets in a sheet transportation direction;
punching means provided in the sheet transportation path for performing a punching operation on the sheets, the punching means comprising a punch slide having a punch mechanism thereon;
moving means for moving the punch slide from a sheet punching operation position to a punch slide home position in a direction transverse to the sheet transportation direction; and
detecting means for detecting completion of the punching operation by the punching means;
wherein when the detecting means detects the completion of the punching operation, the moving means moves the punch slide to the punch slide home position.
According to a second aspect of the present invention, there is provided a sheet processor comprising:
a sheet transportation path for transporting sheets in a sheet transportation direction;
punching means provided in the sheet transportation path for performing a punching operation on the sheets, as a result of rotation of the punching mechanism;
moving means for moving the punch slide from a sheet punching operation position to a punch slide home position in a direction transverse to the sheet transportation direction;
detecting means for detecting completion of the punching operation, before the punch mechanism rotates back to a punching operation home position; and
movement controlling means for starting movement of the punch slide by the moving means when the detecting means detects completion of the punching operation.
According to a third aspect of the present invention, there is provided a sheet processor comprising:
a sheet transportation path for transporting sheets in a sheet transportation direction;
punching means for performing a punching operation on the sheets;
moving means for moving the punch slide between a sheet punching operation position and a punch slide home position in a direction transverse to the sheet transportation direction;
edge detecting means for detecting an edge, in the sheet transporting direction, of each of the sheets; and
punching operation completion detecting means for detecting that the punching means has completed the punching operation;
wherein when the edge of each of the sheets is detected by the edge detecting means, the moving means causes the punch slide to move to the sheet punching operation position; and
wherein when the punching operation completion detecting means detects the completion of the punching operation, the moving means causes the punch slide to move to the punch slide home position.
According to a fourth aspect of the present invention, there is provided a sheet processor comprising:
a sheet transportation path for transporting sheets in a sheet transportation direction;
punching means for performing a punching operation on the sheets, as a result of rotation of the punch mechanism;
punch moving means for moving the punch slide between a sheet punching operation position and a punch slide home position in a direction transverse to the sheet transportation direction;
edge detecting means for detecting an edge, in the sheet transporting direction, of each of the sheets;
punching operation completion detecting means for detecting completion of the punching operation, before the punch mechanism rotates back to the punching operation home position; and
movement controlling means which causes the punch moving means to move the punch slide to the sheet punching operation position when the edge of each of the sheets is detected by the edge detecting means, the movement controlling means causing the punch moving means to move the punch slide to the punch slide home position when the completion detecting means detects completion of the punching operation performed on each of the sheets.
According to a fifth aspect of the present invention, there is provided an image forming apparatus including any one of the above-described sheet processors.
By virtue of the above-described structures, the punch moving means causes the punch slide to move from home position HP, in a direction transverse to the sheet transporting direction, to a predetermined position in order to punch a hole in the back end portion of the sheet. When a detecting means detects that the punch mechanism has completed a punching operation on the sheet, the punch mechanism rotates back to a punching operation home position HP, while simultaneously moving the punch slide to the punch slide home position HP in a direction transverse to the sheet transporting direction, that is, to a standby position. This shortens the time required to punch a hole in a sheet.


using System;
using System.IO;
using System.Reflection.Metadata;
using System.Reflection.PortableExecutable;
using InlineIL.Fody;
using InlineIL.Tests.Support;
using Xunit;

namespace InlineIL.Tests
{
    public class AssemblyTests
    {
        [Fact]
        public void should_not_reference_value_tuple()
        {
            // System.ValueTuple may cause issues in some configurations, avoid using it.

            using var fileStream = File.OpenRead(typeof(ModuleWeaver).Assembly.Location);
            using var peReader = new PEReader(fileStream);
            var metadataReader = peReader.GetMetadataReader();

            foreach (var typeRefHandle in metadataReader.TypeReferences)
            {
                var typeRef = metadataReader.GetTypeReference(typeRefHandle);

                var typeNamespace = metadataReader.GetString(typeRef.Namespace);
                if (typeNamespace != typeof(ValueTuple).Namespace)
                    continue;

                var typeName = metadataReader.GetString(typeRef.Name);
                typeName.ShouldNotContain(nameof(ValueTuple));
            }
        }
    }
}


Percutaneous endoscopic gastrostomy.
The many variations of surgical gastrostomy for nutritional support or for long-term gastric decompression all have a significant morbidity and mortality. An 'incisionless' technique under local anaesthesia, namely percutaneous endoscopic gastrostomy, was described in 1980. A review of the literature shows that the percutaneous technique is safer for the patient, easier and faster to perform and considerably cheaper than surgical gastrostomy. As the few complications usually require surgical management, percutaneous endoscopic gastrostomy should be considered a surgical technique. Few patients are unsuitable for the percutaneous endoscopic technique and this route should be considered for all patients referred for a gastrostomy.


Lowden-Miller State Forest

Lowden-Miller State Forest is a conservation area on  in Ogle County, Illinois, United States. The state acquired a  parcel of land for the forest in 1992, and the remainder of the land was acquired in 1993.

External links
DNR Lowden-Miller State Forest site

Category:Illinois state forests
Category:Protected areas of Ogle County, Illinois
Category:Protected areas established in 1992
Category:1992 establishments in Illinois


Q:

Task WhenAll combined with ContinueWith not work as expected

I have a Winform project that inside of the winform class I have a property called DataBindingTasks like so.
// create a task list to determine when tasks have finished during load
protected List<Task> DataBindingTasks = new List<Task>();

I have several async void methods that I am calling in the winform "Load" event that are all similar to the following.
private async void BindSomething(int millSecToWait)
{
    var someTask = Task.Factory.StartNew(() =>
    {
        // do some work
        System.Threading.Thread.Sleep(millSecToWait);

        // return some list for binding
        return new List<int>();
    });
    // add the task to the task list
    DataBindingTasks.Add(someTask);

    // wait until data has loaded
    var listToBind = await someTask;

    // bind the data to a grid
}

I am calling the BindSomething methods on load.
I say methods because there are several of these binding types of methods that are called on load.
private void Form_Load(object sender, EventArgs e)
{
    // async bind something and let UI continue
    // fire and forget
    BindSomething(5000);
    BindSomething(8000);
    BindSomething(2000);
    BindSomething(2000);

    // code to execute when all data binding tasks have completed
    Task.WhenAll(DataBindingTasks).ContinueWith((x) =>
    {
        // Do something after all async binding tasks have completed
    });
}

EXCEPT the ContinueWith code is executing even though all the tasks have not completed.
Here is a screen shot showing that all task are not complete.

UPDATED 10/29
The problem is obviously deeper than the sample code above and the sample code above does not fully explain the true scenario.
I will try to explain in greater detail but try to not make it to long.
This is a Winform application.
We have created a base winform "BaseForm" that all other winforms will inherit from.
We have overridden the "OnLoad" event in the "BaseForm" so that we can call a new method that all inherited forms will have called "LoadData".
Since "LoadData" can have async method calls, the base form needs to know when the "LoadData" method is finished.
So in the base form was have some of the following:
protected List<Task> DataBindingTasks = new List<Task>();

public event EventHandler DataBindingTasksComplete;
protected void OnDataBindingTasksComplete(EventArgs e)
{
    if (DataBindingTasksComplete != null)
    {
        DataBindingTasksComplete(this, e);
    }
    // now clear the list
    DataBindingTasks.Clear();
}

// NOTE: this is inside the OnLoad called before base.OnLoad(e)
Task.WhenAll(DataBindingTasks).ContinueWith((x) =>
{
    OnDataBindingTasksComplete(EventArgs.Empty);
});

The hope was that all inherited forms would add any of their "async" tasks to this list so that the base form could fire the "DataBindingTasksComplete" event so they would know that form has finished loading.
The problem "as perceived to us at the time of the issue" was that the "WhenAll().ContinueWith" was not waiting until all the tasks on the list had completed.
BUT as someone noted, the list might have changed.
So here is most likely what happened.
There are 4 "BindSomething" methods that are marked async all called from the Form_Load
The 2nd or so line down inside the "BindSomething" method is used to add a task to the "BaseForm.DataBindingTasks" list.
Since each of these calls are marked async, the Form_Load continues to call all 4 as a "fire and forget".
After that, it returns back to the BaseForm OnLoad which then looks at the "DataBindingTasks" list to see if all tasks have completed.
My best guess is that one of the "BindSomething" methods was in the middle of adding its task to the list yet the Base.OnLoad has already started looking at the list.
I could add 4 "fake" tasks (like thread sleep) to the list even before calling the "BindSomething" methods as "place holders" and then inside the "BindSomething" methods swap out the "fake" tasks with the "real" tasks.
This seams messy and most likely will cause other issues.
The most likely fix is to not use a task list / WhenAll.ContinueWith and instead call the load data with "await" and then raise the event on the next line.

A:

The async void methods are called as fire-and-forget, and there is no way to wait for them, that's why your delegate don't wait properly - it simply can't do that. So you need some changes in your code.
Update: @Servy noted the main problem in your code which I've missed, thanks for him:
DataBindingTasks.Add(someTask);

This operation isn't thread-safe! You simply losing some of your tasks during parallel calls for Add method. You need to change this: by using lock, by using ConcurrentCollection or by using data separation: assign a task to array by different indexes so parallel tasks aren't intersect each other.
First of all, you shouldn't use the StartNew in this case, use the Task.Run, otherwise you can met some problems in your app.
Second thing is that you can make the Load method async and await it, so your UI wouldn't freeze, and you can switch the signature for your BindSomething methods to became awaitable, as @digimunk mentioned:
// note that we return the task here
private async Task BindSomething(int millSecToWait)
{
    // use Task.Run in this case
    var someTask = Task.Run(() =>
        {
            // Some work
            System.Threading.Thread.Sleep(millSecToWait);
            // return some list for binding
            return new List<int>();
        });

    DataBindingTasks.Add(someTask);

    // wait until data has loaded
    var listToBind = await someTask;

    // bind the data to a grid
}

// async void for the event handler
private async void Load()
{
    // start tasks in fire-and-forget fashion
    BindSomething(5000);
    BindSomething(8000);
    BindSomething(2000);

    // code to execute when all data binding tasks have completed
    await Task.WhenAll(DataBindingTasks);

    // Do something after all binding is complete
}

In this case you can await the Load method safely.


The Supernatural

The moon on Musashi Plain. From the series 'One hundred aspects of the moon'

On a night of the full moon, a fox is seated on the bank of a river, admiring its reflection in the water. The fox is one of the most important magical animals in Japanese mythology and folklore. It is believed to possess supernatural powers and have both benevolent and malevolent characteristics.

After living to the age of 50 or a 100, it can transform itself into a beautiful woman.

Here it is striking the pose of an alluring courtesan, as if about to reveal its power of transformation.


The relationship between oral spelling and phonological breakdown in a conduction aphasic.
Unsolicited oral spelling has been observed in conduction aphasics during word-production difficulty (Kohn, 1985), but has never been examined systematically. In the present study, the possible role of oral spelling in the word-production process of a conduction aphasic (JM) is explored. Oral spelling occurred much more frequently during picture naming than during either oral reading or repetition, and it seemed to be operating as a strategy to lessen the phonemic output deficit often observed in this syndrome.


Maya Morsy

Maya Morsy () is an Egyptian political scientist and specialist in public policy. She is an elected President of Egypt's National Council for Women (NCW) on 1 February 2016 to Date as the third and the youngest President of the NCW since it was established in 2000 (Ministerial Decree). The National Women Machinery of Egypt an independent body by law and constitution reporting to the President of Egypt, since February 2016. Before she was elected to lead the NCW, Morsy served as regional gender team leader for the Regional bureau of United Nations Development Programme in New York and  Regional Center in Amman before she served as the Country Manager for the United Nations Development Fund for Women. She has been described as "one of the best public policy experts on social gender in Egypt, and perhaps even in all of the Arab world".

The NCW was created in 2000 by Egypt's former president, Hosni Mubarak, and led by Suzanne Mubarak. Its board was restructured after the Egyptian revolution of 2011 and reorganized in 2012.
Mrs. Morsy lost her son "Amin" in January 2020 in an accident.

Education
Morsy obtained a BA in political science from the American University in Cairo in 1995, an MBA from the City University of Seattle in 1997, and an MA in public administration from Seattle in 1998. In 2008 she received a PhD in public policy from the Institute of Arab Research and Studies in Cairo.

Career
For more than 23 years, Morsy has been working for national, regional and international organizations, including the National Council for Women, the United Nations, USAID, academic institutions, and the private sector.  The work experience has strengthened the strategic partnership with the League of Arab States, European Union, Organization of Islamic Cooperation, African Union, Union for the Mediterranean, government organizations, civil society, academic institutions and private sector.

Morsy worked as a project officer in Egypt in the Sustainable Human Development Platform for Action and Monitoring (1995–1998), and as an academic facilitator for the City University of Seattle and the Arab Academy of Science and Technology (1997–1998). She was a consultant for the Girls Education and Empowerment Project of the Egyptian Ministry of Education (1998–1999); a project coordinator for the United Nations Development Fund for Women (UNIFEM) (1999–2000); and UNIFEM's country program manager (2000–2013). In 2014–2015 she served as the United Nations Development Programme's regional gender team leader for the Arab Region.

Morsy also managed and led more than 50 programs and authored more than 40 training manuals, books, articles, research and policy papers in areas of public policy, development, gender equality and women’s empowerment, peace and security, human security, finance for development.

See also
Women in Egypt

References

Further reading
"Maya Morsi", Enigma magazine.

Category:American University in Cairo alumni
Category:City University of Seattle alumni
Category:Egyptian women in politics
Category:Living people
Category:Year of birth missing (living people)


Mechanisms of 4-quinolone resistance in quinolone-resistant and methicillin-resistant Staphylococcus aureus isolates from Japan and China.
Ninety-two and 33 methicillin-resistant Staphylococcus aureus (MRSA) strains were isolated in Japan and China respectively. They were categorised as ofloxacin-susceptible (MIC < 12.5 mg/L), moderately (MIC 12.5-25 mg/L) or highly (MIC > or = 50 mg/L) ofloxacin-resistant. 4-Quinolone concentrations required to inhibit purified DNA gyrase from the moderately and highly quinolone-resistant MRSA were at least 20 times higher than those required to inhibit the equivalent enzyme from quinolone-susceptible strains. Reconstitution assays demonstrated that the 4-quinolone-resistant MRSA had a mutation in subunit A of DNA gyrase. A portion of the gyrA gene from amino acids codons 40-115 was sequenced. Four moderately resistant and seven highly resistant MRSA contained a Ser-->Leu substitution at amino acid 84; one moderately and one highly resistant MRSA and one moderately resistant methicillin-susceptible S. aureus (MSSA) strain contained a Glu-->Lys substitution at amino acid 88. Eight MRSA, including one quinolone-susceptible strain and one MSSA contained a silent mutation at amino acid 86. Uptake of ofloxacin in moderately resistant strains was almost the same in the presence or absence of carbonyl cyanide m-chlorophenylhydrazone (CCCP), whereas in highly resistant strains, uptake increased when CCCP was added. Restriction fragment length analysis of the norA gene with the restriction endonuclease SfcI showed a mutation of nucleotide position 1085 in all MRSA strains tested except for one highly quinolone-resistant strain. Thus the mechanisms of 4-quinolone-resistance in these MRSA isolates involved alterations in both DNA gyrase and antimicrobial uptake and efflux.


1. Field of the Invention
In general, this invention relates to a rail fastening system, and in particular, to a method and device for securing a rail to a concrete rail tie.
2. Description of the Related Art
Conventional fastening systems for concrete rail ties generally have a cast shoulder, an elastic rail spring clip, and a rail insulator. In this conventional system, the tie is formed with a portion of the cast shoulder imbedded into the tie. To secure the rail to the tie, the elastic rail spring clip is applied to the cast shoulder such that spring arms of the elastic spring clip press the insulator downwardly against a top portion of the rail flange to exert a rail hold down force. At the same time, the body or base of the elastic rail spring clip is secured to the cast shoulder to prevent movement of the rail flange.
This conventional system requires the loose components such as the insulator and the elastic rail spring clip to be wholly installed at the construction site. This process requires a large labor force and considerable time to place the components into a working position. Accordingly, the handling and application of the loose rail fastening components typically comprises a significant part of the overall cost of the installation of concrete railroad ties and rails. Moreover, the loose parts can be easily lost, misplaced or stolen.
In addition to the labor cost of installation, the rail fastening assembly may need to be removed after the rail has been installed to allow the rail to be serviced. Currently, the conventional method requires the elastic rail spring clip element to be xe2x80x9csprayedxe2x80x9d completely out of the cast shoulder to release the other components. After servicing the rail, additional effort must be invested to reset and secure the spring clip, similar to the effort required to mount the spring clip originally.
Thus, there is a need for a rail fastening system which facilitates the installation of the rail fastening components, reduces the cost of installing rails on concrete ties and facilitates and reduces the cost of post-installation rail servicing.
The present invention satisfies the above-described need by providing a method and device for coupling a rail to a railroad tie including a cast shoulder and an elastic spring clip which can be pre-assembled together to reduce the work required at the track site and minimize loss of parts.
Generally described, the present invention provides a fastening system for mounting a rail to a rail tie which includes a spring clip having a pair of arms that can be deflected toward one another from a normal non-deflected position wherein the arms define a normal width of the spring clip. The fastening system also includes a shoulder having an anchoring portion adapted to be anchored to the rail, a receiving portion for receiving the spring clip, and a notch. The receiving portion includes a pair of opposing sides angled to converge as they extend toward the rail and providing a throat location at which the distance between the opposing sides is less than the normal width of the spring clip. The notches provide a width greater than the distance between the opposing sides at the throat location to thereby provide a catch structure which prevents movement of the spring clip out of the receiving portion in a direction away from the rail.
In another aspect of the present invention, the invention provides a method for pre-assembling an elastic rail spring clip to a shoulder. The elastic spring clip includes a substantially horizontal base as well as the two spring arms. The method involves application of the elastic rail spring clip to the receiving portion of the shoulder and movement of the clip into the receiving portion until the spring clip arms reach and pass the throat. The elastic rail spring clip arms compress as they move along the converging sides toward the throat, and the arms thereafter spring outwardly and are caught in the notches.
By providing the converging sides and the notches adjacent to the throat location of the sides, the present invention allows the spring clip and cast shoulder to be pre-assembled prior to the on-site final installation of the rail to the rail tie, thereby reducing the amount of field labor required to install the rail tie. Additionally, the notch prevents a complete decoupling of the spring clip from the cast shoulder thereby reducing the labor required to remove and reattach the spring clip once the rail is installed.