text
stringlengths 0
128k
|
---|
User:Srtellis4585/Sandbox
This was for testing for The Mole pages which have since been updated. I'll find another use for this later.
|
Wikipedia:Articles for deletion/Stig Olai Kapskarmo
Stig Olai Kapskarmo
Does not qualify for notability. Being elected as #17 for hos party in the local municipality council, and having been member of a school board or two is not reason for inclusion in Wikipedia. (If it were, then >10.000 people from Norway alone would qualify). -- Egil 20:50, 3 Jan 2005 (UTC)
* Delete, nn. Wyss 03:16, 5 Jan 2005 (UTC)
* Keep. This article ended up on vfd a while ago (there's a copy here) and the consensus was to keep at that point. I don't think anything has changed since then. --DMG413 02:49, 7 Jan 2005 (UTC)
* This is madness. There was no consensus at all. Does the Wikipedia community understand what a consenus means? Most people said delete. Also: DO people know what they are letting themselves into here? There is no way whatsoever that Wikipedia can maintain biographies of all council members of reasonably size towns. We are probably talking millions of people on an international scale. Heck, most members of parliament are pretty un-notable. The only reason this article is here is that the guy wrote an auto-biography (an anon, the IP is to an ISP in his municipality). Nobody else in their right mind would write this biography. Egil 02:58, 10 Jan 2005 (UTC)
* Keep, a city councillor in a major town. - SimonP 05:58, Jan 19, 2005 (UTC)
* Delete. Someone is having fun with Wikipedia. Mahlum 21:24, 17 July 2005 (UTC)
|
Effectiveness of 2 % peracetic acid for the disinfection of gutta-percha cones
The aim of this study was to evaluate the effectiveness of 2% peracetic acid for the disinfection of gutta-percha cones contaminated in vitro with Escherichia coli, Staphylococcus aureus, Streptococcus mutans, Candida albicans and Bacillus subtilus (in spore form). Two hundred and twenty-five gutta-percha cones were contaminated with standardized suspensions of each microorganism and incubated at 37°C for 24 h. The cones were divided into 10 experimental groups (n = 15), according to the microorganism tested and disinfection testing times. The disinfection procedure consisted of immersing each cone in a plastic tube containing the substance. The specimens remained in contact with the substance for 1 or 2.5 minutes. Afterwards, each cone was transferred to a 10% sodium thiosulphate solution (Na2S2O3) to neutralize the disinfectant. Microbial biofilms adhering to the cones were dispersed by agitation. Aliquots of 0.1 ml of the suspensions obtained were plated on Sabouraud dextrose agar, or brain and heart infusion agar, and incubated at 37°C for 24 h. The results were expressed in colony forming units (CFU/ml) and the data were submitted to the Wilcoxon Signed Rank Test (level of significance at 0.05). A significant reduction was observed, after 1 minute of exposure, in the test solution for C. albicans (p = 0.0190), S. aureus (p = 0.0001), S. mutans (p = 0.0001), B. subtilis (p = 0.0001), and E. coli (p = 0.0001). After 2.5 minutes of exposure, 100% of the microbial inocula were eliminated. It was concluded that the 2% peracetic acid solution was effective against the biofilms of the tested microorganisms on gutta-percha cones at 1 minute of exposure. Descriptors: Disinfection; Endodontics; Microbiology. Introduction Microorganisms play a fundamental role in the etiology of pulpar and periapical diseases, and their elimination from the root canal by chemical and mechanical procedures is one of the essential steps to secure successful treatment.1,2,3,4,5,6 In clinical practice, the dentist is occasionally faced with the problem of re-infection after endodontic treatment. Moreover, penetration of bacteria into the blood stream of systemically compromised patients should be prevented because of the risk of infective endocarditis.1 One possible explanation for this phenomenon may be the introduction of contaminated gutta-percha cones into the root canal.2 Therefore, much care must be taken during this procedure to prevent contamination of filling materials.3,7 Effectiveness of 2% peracetic acid for the disinfection of gutta-percha cones Braz Oral Res. 2011 Jan-Feb;25(1):23-7 24 Gutta-percha cones are the most commonly used material for filling the root canal. They are biocompatible, dimensionally stable, radiopaque, thermoplastic and easily removed from the root canal. Even though gutta-percha cones are produced under aseptic conditions and have potentially antimicrobial properties, especially owing to their zinc oxide component, they can be contaminated by handling and also by aerosols and physical sources during the storage process.2,3,8,9 Therefore, the handling of gutta-percha cones must follow the basic principles of infection control. In addition, gutta-percha cones that have been in contact with patients should be discarded.1 Owing to the thermoplastic characteristic of gutta-percha cones, they may not be sterilized by the conventional process in which moist or dry heat is used, because this may cause alteration to the gutta-percha structure.2,3,4,6,8,10 For this reason, previous studies suggested that several different chemical agents could be used for the rapid decontamination of gutta-percha cones in dentistry. Peracetic acid has been cited in the literature as a promising alternative for disinfection due to its antimicrobial efficiency. However, the use of peracetic acid has not been reported in the literature as a gutta-percha cone disinfectant. Therefore, the purpose of this study was to evaluate in vitro the effectiveness of peracetic acid for the rapid decontamination of gutta-percha cones. Material and Methods The following microorganisms were used for this study: Escherichia coli (ATCC 23922), Staphylococcus aureus (ATCC 6538), Streptococcus mutans (ATCC 35688), Candida albicans (ATCC 18804) and Bacillus subtilus (ATCC 19659) (spore form). Two hundred and twenty-five #70 Tanari R8 gutta-percha cones (Tanariman Industrial, Manacapurú, AM, Brazil) were sterilized by cobalt-60 gamma radiation (25 kGy/6 h; Embrarad, Cotia, SP, Brazil). Isolated 24-h colonies of pure cultures of each microorganism were grown on brain heart infusion agar plates (Difco, Detroit, MI, USA) or, in the case of C. albicans, Sabouraud dextrose agar plates (Difco, Detroit, MI, USA). The plates were incubated aerobically at 37°C, and in an atmosphere of 5% CO2 for S. mutans, for 24 hours. The cones were divided into 10 experimental groups (n = 15) and 5 control groups (n = 15). Then, the cones were contaminated by immersion in tubes containing 10 ml of brain heart infusion broth or Sabouraud dextrose broth (for C. albicans) inoculated with 0.1 ml of standardized suspensions containing 1x106 cells/ml of each microorganism obtained by spectrophotometry (Shinadzu model UV-1203, Kyoto, Japan) in sterile saline solution (0.9% NaCl). The parameters adopted for each microorganism were previously standardized: Candida albicans, 530 nm, OD = 0.284; S. mutans, 398 nm, OD = 0.620; S. aureus, 490 nm, OD = 0.374; E. coli, 590 nm, OD = 0.324; B. subtilis spores, 307 nm, OD = 0.178. The methodology used to obtain the B. subtilis spore suspension was that described by Kuroiwa et al.11 The cones were incubated at 37°C for 24 h (and 5% CO2 for S. mutans) for the purpose of promoting surface contamination. Afterwards, they were briefly dried in a sterile paper filter and then disinfected. The disinfection procedure consisted of immersing each gutta-percha cone in a plastic tube (Eppendorf) containing the 2% peracetic acid solution (Sekusept aktiv Fórmula & Ação, São Paulo, SP, Brazil), making sure to cover the cone’s entire surface. The solution was prepared according to the manufacturer’s instructions. The specimens remained in contact with the substance for 1 or 2.5 minutes. Afterwards, each cone was transferred to a tube containing a 10% sodium thiosulphate solution (Na2S2O3), and remained there for 4 minutes to neutralize the activity of the peracetic acid solution. The cones of the control group (n = 15) were immersed in sterile distilled water for 1 or 2.5 minutes, following the same procedures described above. All the cones (including those of the control group) were then immersed in tubes containing sterile physiologic solution (0.9% NaCl), and vortexed for 30 seconds to detach any remaining microbial cells. Next, 10-1 and 10-2 dilutions were obtained in 0.85% NaCl, and 0.1-ml aliquots of all suspensions obtained were double-plated on Sabouraud dextrose agar or brain heart infusion agar and incubated at Salvia ACRD, Teodoro GR, Balducci I, Koga-Ito CY, Oliveira SHG Braz Oral Res. 2011 Jan-Feb;25(1):23-7 25 37°C (and 5% CO2 for S. mutans) for 24 h. The results were expressed in colony forming units per milliliter (CFU/ml), and the data were compared by the Wilcoxon Signed Rank test (level of significance set at 0.05). Results The values of percentage reduction in microorganism counts after exposure to peracetic acid are shown in Table 1. A significant reduction in microbial counts was observed after 1 minute of exposure to the peracetic acid solution for all the microorganisms tested. All microorganisms were completely eliminated after 2.5 minutes of exposure. Discussion Peracetic acid-based disinfectants have been used in the food industry and by water or sewage treatment companies, and also for the decontamination and sterilization of thermosensitive medical and hospital equipment and devices. This substance works quickly and is effective against bacteria, fungi, viruses and spores.12,13 Unlike most chemical disinfectants, it is not inactivated in the presence of organic material,12,14 does not leave residues and does not produce byproducts harmful to the environment, because its mechanism of action involves the release of free oxygen and hydroxyl radicals decomposing in oxygen, water and acetic acid.12,13,14,15 It can be utilized over a broad temperature spectrum (0 to 40°C), with hard water, and is effective in the 3.0 to 7.5 pH range.14 These features of peracetic acid raised the hypothesis that it could be a valid alternative for the disinfection of gutta-percha cones. The S. aureus, S. mutans, E. coli and C. albicans species were selected for this study with the aim of including Gram-positive and Gram-negative bacterial species, and a fungal species as well. Moreover, sporulated bacilli were also included owing to this form’s high resistance to disinfection methods. Several substances have already been tested for gutta-percha cone disinfection; however, the high toxicity of some substances and the deleterious effects of others call for alternative methods. In fact, both aqueous and detergent solutions of 2% chlorhexidine were reported to be effective in decontaminating gutta-percha cones contaminated by Staphylococcus aureus, Enterococcus faecalis, Escherichia coli, Candida albicans and spores of Bacillus subtilis after 5 minutes of exposure.3 Cardoso et al.10 also reported that gutta-percha cone decontamination may be achieved with 2% chlorhexidine after 1 minute. On the other hand, Gomes et al.8 showed that 0.2%, 1%, and 2% chlorhexidine, in either liquid or gel form, were not effective for the high disinfection requirements of gutta-percha cones contaminated with spores of B. subtilis, even after 72 hours of contact. Sodium hypochlorite solutions at concentrations of 1%, 2.5% and 5.25% have also proven effective in disinfecting gutta-percha cones.10,16 Nevertheless, Isci et al.9 showed that a 5.25% NaOCl solution caused ph
Introduction
Microorganisms play a fundamental role in the etiology of pulpar and periapical diseases, and their elimination from the root canal by chemical and mechanical procedures is one of the essential steps to secure successful treatment. 1,2,3,4,5,6In clinical practice, the dentist is occasionally faced with the problem of re-infection after endodontic treatment.Moreover, penetration of bacteria into the blood stream of systemically compromised patients should be prevented because of the risk of infective endocarditis. 1One possible explanation for this phenomenon may be the introduction of contaminated gutta-percha cones into the root canal. 2 Therefore, much care must be taken during this procedure to prevent contamination of filling materials. 3,7utta-percha cones are the most commonly used material for filling the root canal.They are biocompatible, dimensionally stable, radiopaque, thermoplastic and easily removed from the root canal.Even though gutta-percha cones are produced under aseptic conditions and have potentially antimicrobial properties, especially owing to their zinc oxide component, they can be contaminated by handling and also by aerosols and physical sources during the storage process. 2,3,8,9Therefore, the handling of gutta-percha cones must follow the basic principles of infection control.In addition, gutta-percha cones that have been in contact with patients should be discarded. 1Owing to the thermoplastic characteristic of gutta-percha cones, they may not be sterilized by the conventional process in which moist or dry heat is used, because this may cause alteration to the gutta-percha structure. 2,3,4,6,8,10For this reason, previous studies suggested that several different chemical agents could be used for the rapid decontamination of gutta-percha cones in dentistry.
Peracetic acid has been cited in the literature as a promising alternative for disinfection due to its antimicrobial efficiency.However, the use of peracetic acid has not been reported in the literature as a gutta-percha cone disinfectant.Therefore, the purpose of this study was to evaluate in vitro the effectiveness of peracetic acid for the rapid decontamination of gutta-percha cones.
Isolated 24-h colonies of pure cultures of each microorganism were grown on brain heart infusion agar plates (Difco, Detroit, MI, USA) or, in the case of C. albicans, Sabouraud dextrose agar plates (Difco, Detroit, MI, USA).The plates were incubat-ed aerobically at 37°C, and in an atmosphere of 5% CO 2 for S. mutans, for 24 hours.
The cones were divided into 10 experimental groups (n = 15) and 5 control groups (n = 15).Then, the cones were contaminated by immersion in tubes containing 10 ml of brain heart infusion broth or Sabouraud dextrose broth (for C. albicans) inoculated with 0.1 ml of standardized suspensions containing 1x10 6 cells/ml of each microorganism obtained by spectrophotometry (Shinadzu model UV-1203, Kyoto, Japan) in sterile saline solution (0.9% NaCl).The parameters adopted for each microorganism were previously standardized: Candida albicans, 530 nm, OD = 0.284; S. mutans, 398 nm, OD = 0.620; S. aureus, 490 nm, OD = 0.374; E. coli, 590 nm, OD = 0.324; B. subtilis spores, 307 nm, OD = 0.178.The methodology used to obtain the B. subtilis spore suspension was that described by Kuroiwa et al. 11 The cones were incubated at 37°C for 24 h (and 5% CO 2 for S. mutans) for the purpose of promoting surface contamination.Afterwards, they were briefly dried in a sterile paper filter and then disinfected.
The disinfection procedure consisted of immersing each gutta-percha cone in a plastic tube (Eppendorf) containing the 2% peracetic acid solution (Sekusept aktiv -Fórmula & Ação, São Paulo, SP, Brazil), making sure to cover the cone's entire surface.The solution was prepared according to the manufacturer's instructions.The specimens remained in contact with the substance for 1 or 2.5 minutes.Afterwards, each cone was transferred to a tube containing a 10% sodium thiosulphate solution (Na 2 S 2 O 3 ), and remained there for 4 minutes to neutralize the activity of the peracetic acid solution.The cones of the control group (n = 15) were immersed in sterile distilled water for 1 or 2.5 minutes, following the same procedures described above.
All the cones (including those of the control group) were then immersed in tubes containing sterile physiologic solution (0.9% NaCl), and vortexed for 30 seconds to detach any remaining microbial cells.Next, 10 -1 and 10 -2 dilutions were obtained in 0.85% NaCl, and 0.1-ml aliquots of all suspensions obtained were double-plated on Sabouraud dextrose agar or brain heart infusion agar and incubated at 37°C (and 5% CO 2 for S. mutans) for 24 h.
The results were expressed in colony forming units per milliliter (CFU/ml), and the data were compared by the Wilcoxon Signed Rank test (level of significance set at 0.05).
Results
The values of percentage reduction in microorganism counts after exposure to peracetic acid are shown in Table 1.A significant reduction in microbial counts was observed after 1 minute of exposure to the peracetic acid solution for all the microorganisms tested.All microorganisms were completely eliminated after 2.5 minutes of exposure.
Discussion
Peracetic acid-based disinfectants have been used in the food industry and by water or sewage treatment companies, and also for the decontamination and sterilization of thermosensitive medical and hospital equipment and devices.This substance works quickly and is effective against bacteria, fungi, viruses and spores. 12,13Unlike most chemical disinfectants, it is not inactivated in the presence of organic material, 12,14 does not leave residues and does not produce byproducts harmful to the environment, because its mechanism of action involves the release of free oxygen and hydroxyl radicals decomposing in oxygen, water and acetic acid. 12,13,14,15It can be utilized over a broad temperature spectrum (0 to 40°C), with hard water, and is effective in the 3.0 to 7.5 pH range. 14These features of peracetic acid raised the hypothesis that it could be a valid alternative for the disinfection of gutta-percha cones.
The S. aureus, S. mutans, E. coli and C. albicans species were selected for this study with the aim of including Gram-positive and Gram-negative bacterial species, and a fungal species as well.Moreover, sporulated bacilli were also included owing to this form's high resistance to disinfection methods.
Several substances have already been tested for gutta-percha cone disinfection; however, the high toxicity of some substances and the deleterious effects of others call for alternative methods.In fact, both aqueous and detergent solutions of 2% chlorhexidine were reported to be effective in decontaminating gutta-percha cones contaminated by Staphylococcus aureus, Enterococcus faecalis, Escherichia coli, Candida albicans and spores of Bacillus subtilis after 5 minutes of exposure. 3Cardoso et al. 10 also reported that gutta-percha cone decontamination may be achieved with 2% chlorhexidine after 1 minute.On the other hand, Gomes et al. 8 showed that 0.2%, 1%, and 2% chlorhexidine, in either liquid or gel form, were not effective for the high disinfection requirements of gutta-percha cones contaminated with spores of B. subtilis, even after 72 hours of contact.
Sodium hypochlorite solutions at concentrations of 1%, 2.5% and 5.25% have also proven effective in disinfecting gutta-percha cones. 10,16Nevertheless, Isci et al. 9 showed that a 5.25% NaOCl solution caused physical alterations on resilon cones after 5 minutes.Moreover, Valois et al. 6 observed aggressive deteriorative effects on gutta-percha cone elasticity for 5.25% NaOCl at 1 minute.Some studies reported that a 2% glutaraldehyde solution was unable to decontaminate gutta-percha cones inoculated with B. subtilis, even after 15 minutes of contact. 2,17On the other hand, another study showed that the same concentration was bactericidal at 1 minute and sporicidal after 15 minutes of exposure. 10Despite its benefits, glutaraldehyde releases toxic vapors which can cause eye, nose and throat irritation, allergy, contact dermatitis, asthma and rhinitis.In addition, it should be used in well-ventilated places and requires the use of masks, gloves and eyeglasses.Because of glutaraldehyde toxicity, items immersed in this solution, especially those made with porous materials, must be washed thor- oughly in running water to avoid the release of toxic product residues. 12revious studies reported that immersion in a 10% polyvinylpyrrolidone-iodine aqueous solution (10% PVP-I alone or combined with 96º GL alcohol) was effective for gutta-percha cone disinfection. 4,10Cardoso et al. 18 also reported that 0.3, 1, 2 and 3% iodine alcohol destroyed all the bacterial cells (S. aureus, E. faecalis, E. coli) after 1 minute, without sporicidal activity after 15 minutes.Nevertheless, alcohol tends to dry gutta-percha cones. 18he present study showed that the use of a 2% peracetic acid solution resulted in a significant reduction in the growth of microorganisms tested after 1 minute of exposure, with low counts of remaining C. albicans.The persistence of this yeast may be explained by its complex, eukaryotic organization.Previous studies reported the effectiveness of peracetic acid for the disinfection of other materials.Similarly to other disinfectants, peracetic acid solution has been found to be more effective against microorganisms in suspension than against bacterial biofilms on stainless steel and glass surfaces. 14A 0.2% peracetic acid-based disinfectant promoted a high level of disinfection of heat-polymerized, chemically-activated and microwave-polymerized acrylic resins contaminated with either human saliva or Bacillus subtilis after 5 minutes. 12A 60-mg/l peracetic acid solution at 25°C promoted an 8.0 log-cycle reduction of E. coli and S. aureus on a stainless steel device in 3.1 minutes of contact. 12On the other hand, Marques et al. 19 stated that a 0.3% peracetic acid solution was unable to completely eliminate S. aureus cells clinging to stainless steel and glass surfaces.
Despite the good performance of peracetic acid for the disinfection of gutta-percha cones, Bounoure et al. 20 reported that repeated exposure to peracetic acid is toxic.Animals chronically exposed to this substance have shown weight loss, an increase in mortality, and skin, mucous membrane, and respiratory irritations.Currently, no standards regulate the amount of peracetic acid to which someone can be exposed.Therefore, more studies on the toxicity of this material are required to allow its safe use.
Conclusion
Based on the results obtained in this study, it can be concluded that the 2% peracetic acid solution was effective against the tested microorganisms after 1 minute of exposure, and may be a valid alternative for the disinfection of gutta-percha cones.
Table 1 -
Percentage reduction in microbial counts for C. albicans, S. aureus, S. mutans, B. subtilis, and E. coli after 1 minute of exposure to peracetic acid.
|
BISH AND ATIS. 117
Whether the Indian Bish ever reached the drug-shops of Europe until quite recently is very doubtful. It is true that Mathaeus Sylvaticus of Salerno (about 1300) has « Bissum i. Napellus” and “Bix i. Napellus” in his Liber Pandectorum, but the paragraph is merely an abridged version of Avicenna’s chapter on “Bis” Then it is lost sight of, and the herbalists of the 15th and the following centuries do not seem to have known it at all. Yet ic was in the 16th century that the drug was rediscovered by two European travellers in the East, independently of each other. Christobal Acosta, who travelled in India about the middle of the 16th century and was much associated with the celebrated Garcia d'Orto, mentions the Bish root in his “ Tractads” (Tract. Drog. y Medic. Ind. Orient., 1578, p. 90) as an ingredient of certain pills prepared by the Brahman doctors with these words: “Y rayz de Bisa (que es una rays, que viene de las sierras de Bengala y Pattane),” the first direct reference to the Central Himalaya as the home of the Bish plant; but he does not seem to have seen the root itself, nor to have clearly connected it with Ларейиз, although in speaking of the poisons used by the doctors of the East, he mentions JVapelius on p.180: “Y tambien usan por veneno del Anapelo? (for “ Anapelo” stands “ХареПо” in the Italian edition) There is, however, another reference to the same article in Acosta’s Tracíads on p. 179. Criticising Laguna’s statement (in his Commentary of Dioscorides, libr. i, cap. vi) that there existed a suspicious kind of Spica Nardi in India, he says: “Y que la Spica Nardi es sospechosa en la India, porque della se haze une suerte da veneno mortifero llamado Piso; el qual no solamente bevido pero tambien aplicado a un hombre quando suda le mata. Por lo qual el uso del Nardo en aquellas partes es tenido por sospechoso . , . ni veneno que se llame Piso nunca el Doctor Orta con su diligencia lo pudo saber en la India, ni yo por aquellas partes, aunque lo pregunti a muchos." This deadly poison <“ Piso 7 is certainly nothing but “bis ” or “bisl” in disguise, and Laguna’s strange association of it with the spikenard may perhaps be due to a misunderstanding cf the statement of the Arab writers, already referred to, that the “bish” grows by the side of the spikenard. 1% is not to be wondered that Acosta and Orta failed to trace the poisonous Spica nardi, called “Piso.” About the same time (1549 or 1550), the French traveller Belon visited the bazaars of Alexandria, and this is what he relates in his * Orservations” (Lat, Transl. in Clus. Hist. Ezet. Plant. p. 98): “Inter singularia quae nobis Florentinus Consul ostendit, cum aromata nos requirere animadvertisset, degustandam dedit radicem Arabibus Bisch nominatam: ea nobis tantum calorem in ore per integrum biduum excitavit, ut flagrare videretur . . . Exigua est, parvi nspi instar (alii Napellum vocant) et adeo vulgaris Turcicis aromataris ut nullus eorum venalem non habeat." This is unmistakably the “bish? of India, Belon's account seems, however, to have been overlooked entirely by later writers, and the only reference to Acosta’s “bish?” which I find is іп Bauhinus’ Pinas Theatri (1623), p. 259, under Symphytum: “VI. Symphyto viribus affinis: Bisa radix que ех Bengale et Patane montibus adfertur; Acosta сар. de Datura; sed quid?” Whilst in the. West, after the downfal of the Arab civilisation, the knowledge of the Bish of India was soon lost, ccnservatism and a pious regard for the authority of the Arab writers secured the drug а safe place in the Persian Pharmacopeas; put nothing was added that might have thrown further light on it. There is, however, a strange paanga in the Labo зым which а French Carmelite monk, Frater Angelus, gave of a Persian Pharmacopoa in 1681, recalling to some extent the fabulous account of Ebn Samhun's “halahil” Бө). He tells us (1. с., pp. 858 and 929) Axx Roy. Bor. Garp Catc., Vor. X.
|
Diamine vapor treatment of viscoelastic graphene oxide liquid crystal for gas barrier coating
A layered graphene oxide/ethylenediamine (GO/EDA) composite film was developed by exposing aqueous GO liquid crystal (GOLC) coating to EDA vapor and its effects on the gas barrier performance of GO film were systematically investigated. When a GO/EDA coating with a thickness of approximately 1 μm was applied to a neat polyethylene terephthalate (PET) film, the resultant film was highly impermeable to gas molecules, particularly reducing the gas permeance up to 99.6% for He and 98.5% for H2 in comparison to the neat PET film. The gas barrier properties can be attributed to the long diffusion length through stacked GO nanosheets. The EDA can crosslink oxygen-containing groups of GO, enhancing the mechanical properties of the GO/EDA coating with hardness and elastic modulus values up to 1.14 and 28.7 GPa, respectively. By the synergistic effect of the viscoelastic properties of GOLC and the volatility of EDA, this coating method can be applied to complex geometries and EDA intercalation can be spontaneously achieved through the scaffold of the GOLC.
www.nature.com/scientificreports/ aligned GO nanosheets, and can be applied to complex geometries with excellent gas barrier performances [32][33][34] . However, the fabrication procedure is laborious, therefore, the development of an efficient fabrication procedure is imperative to meet the industry requirements 35 . Herein, a layered GO/EDA composite coating with gas barrier properties was achieved by exposing aqueous GO liquid crystal (GOLC) coating to EDA vapor, utilizing the volatility of EDA. The diffusion of EDA was highly facilitated into the interlayer and scaffold of GOLC and the amounts of intercalated EDA molecules can be precisely controllable by adjusting the exposure time. The intercalation mechanism and the EDA structure between GO nanosheets were thoroughly examined to the exposure time of EDA vapor. In addition, we performed a systematic analysis of the changes in mechanical properties and gas permeation of the GO/EDA coatings according to the amount of EDA in the designed film.
Results and discussion
The procedure for GO/EDA coating on a target surface is portrayed in Fig. 1A and the corresponding photographic images are shown in Supplementary Fig. S1. GOLC with a concentration of 30 mg/mL was prepared by dispersing GO in water via sonication, which is a typical method to induce the lyotropic LC phase of GO in an aqueous solvent 36 . The gel-like GO solution was distributed on a target substrate using a bar-coater. The thickness of GOLC is adjustable by changing the gap between the bar and the substrate. In this study, the thickness of the GOLC coating was fixed at 180 μm. A porous nylon substrate (pore size of 0.1 μm) was used as a substrate to demonstrate the feasibility of our coating method on surfaces with complex structures. A 75-μm-thick PET film was used for the gas permeation test (Supplementary Fig. S2). The GOLC coated substrate was placed in the center of a petri dish and 0.5 mL of 75% EDA aqueous solution was spread around it. Then, it was kept in an oven at 50 °C for the desired time. Higher temperatures are inappropriate because the water in the GOLC coating may dry too quickly. After a certain time under EDA vapor treatment, the GO/EDA coated substrate was dried at 25 °C to remove excess water, resulting in the formation of a dense GO/EDA coating. The GO/ EDA coating can be applied to various objects, such as a more complex object like a school souvenir as shown in Fig. 1B. We also want to emphasize the advantage of using EDA vapor for the treatment of GOLC. While our previous work based on the EDA solution immersion is effective for the treatment of flat type coating or small www.nature.com/scientificreports/ objective, using EDA solution treatment has the limitation in applying the coating in large-size objects such as hydrogen cylinders owing to the possibility of the GOLC coating delamination during the immersion process 33 . Therefore, EDA vapor treatment was chosen for the crosslinking reagent, because it is beneficial for applying in scale-up coating and reducing laborious and time-consuming process.
To verify the feasibility of our method to produce a uniform GO/EDA coating layer, SEM images were acquired from the GO/EDA coating with 1 h exposure to the EDA vapor (Fig. 1C,D). A uniform GO/EDA coating layer was observed on the nylon substrate (Fig. 1C). The GO sheets were stacked parallel to the substrate (Fig. 1D,E) because the shear coating process aligned the GOLC scaffold in parallel with the substrate 33 . The EDS mapping of nitrogen marked with red color showed the homogeneous distribution of amine groups, indicating uniform diffusion of EDA molecules into the inner regions of the GOLC. A round morphology was observed between the GO sheets in the magnified cross-sectional SEM images of GO/EDA (Fig. 1E), while the edge of neat GO sheets was sharp ( Supplementary Fig. S3). This denoted the presence of EDA surrounding each GO layer, which is stably adhered to the graphene surface even in the high vacuum conditions during the SEM measurements. As shown in the bending test, the GO/EDA coating on the nylon substrate was highly bendable and could be bent to the 5.7 mm diameter of a glass rod (Fig. 1F). This is due to the intrinsic flexible nature of graphene, and this flexibility could be critical in applications such as flexible electronics, food packaging, and gas storage.
The viscoelastic rheological properties are essential for uniform coating of GOLC on complex geometries by using the shear-coating method and to preserve the shape of the GOLC coating during EDA vapor exposure 33,36,37 . Primarily, the viscoelastic properties of GOLC were investigated by measuring the GOLC viscosity as a function of the shear rate and concentration ( Fig. 2A). The viscosity of GOLC gradually increased with the concentration from 1 to 40 mg/mL. Particularly, the viscosity of GOLC reached 1 × 10 3 and 3 × 10 3 Pa•s for 20 and 40 mg/ mL, respectively, in static conditions. However, the viscosity of 40 mg/mL GOLC spontaneously decreased to 9 × 10 -1 Pa•s at a shear rate of 100 s −1 , indicating gel-like and shear-thinning viscoelastic behavior; therefore, the viscosity is highly influenced by the shear rate 33,38,39 .
The coating process was also conducted with GO solutions of 10, 20, and 40 mg/mL (Fig. 2B). The photographic images of the vials containing the GO solutions show that the 10 mg/mL solution was watery, while GO solutions of 20 mg/mL and 40 mg/mL adhered to the wall of the vials even after turning the vial upside down. This indicates that a solid-like behavior of the GO solutions can be observed at the higher concentrations, as demonstrated by the rheology study shown in Fig. 2A. To reveal the importance of a high viscosity GOLC, the nylon substrates with GOLC coating were tilted at 45° as shown in the second row of the images of Fig. 2B. As expected, the GOLC coating was only preserved for the 40 mg/mL solution, while for lower concentrations the coating flowed to the bottom. Therefore, a higher concentration of GOLC produces better quality GO/EDA films by preserving the shape of the GOLC coating during EDA exposure (the third row of the images of Fig. 2B). This observation is particularly important when GO/EDA coating is applied to objects with a three-dimensional morphology and tilted surfaces such as gas storage tanks.
XRD analysis was conducted to examine the intercalation of EDA into the GOLC scaffold and its interlayer structure (Fig. 3, Supplementary Fig. S4). Figure 3A displays the XRD patterns of GO/EDA coating and Fig. 3B summarizes the corresponding interlayer distance. The interlayer distance of GO was 7.95 Å, which is in agreement with the literature 23 . The interlayer distance of the GO/EDA coating was 8.24 Å after 5 min of EDA www.nature.com/scientificreports/ exposure, indicating the spontaneous intercalation of EDA into the GOLC scaffold. The value increased to 9.24 Å after 1 h of EDA exposure and further increased to 13.7 Å after exposure for 3 h. We want to emphasize that the expanded interlayer spacing is not by the presence of water because all samples were fully dried at 60 °C for 24 h before XRD measurement and neat GO did not show similar expansion of interlayer spacing. The interlayer distance was reduced to 13.1 Å after 1 d of exposure. After 3 d of exposure, the interlayer distance was further decreased and saturated to 11.0 Å at a longer EDA exposure time of 72 h, which is the typical interlayer distance of GO cross-linked with EDA 40 . Considering the length of an EDA molecule (around 3.7 Å) and the thickness of a graphene layer (3.4 Å) 21 , it can be assumed that a double layer of EDA molecules exists between the GO sheets at the low EDA exposure times as described in the inserted scheme of Fig. 3B because excessive EDA can diffuse into the scaffold of GOLC spontaneously. The rearrangement of the EDA molecules may occur at exposure times over 3 h as some of the EDA is possibly consumed in the formation of crosslinking with oxygen-containing groups of GO or unreacted EDA molecules are removed from the composite system with time 33,40 . We believe the reduction of GO is not the main reason for the thickness decrease because most of the oxygen-containing groups are detected by XPS even after EDA treatment, which we will deliberate in detail below. Similarly, the increasing thickness of the GO/EDA coating with increased EDA exposure time was observed in the SEM images of the GO/EDA coating ( Supplementary Fig. S3). The influence of EDA exposure time on the mechanical and gas barrier properties of the GO/EDA coating will be discussed later.
The chemical structure of the GO/EDA coating was examined using water contact angle measurements, XPS, FT-IR (Fig. 4), and Raman spectroscopy ( Supplementary Fig. S5). The water contact angle of GO was 55° and gradually decreased to 39° with increasing EDA exposure time (Fig. 4A). The more hydrophilic surface of the GO/EDA coating can be ascribed to the amine groups of EDA molecules that are bonded to the surface of GO as considering the protonation of amine groups in the presence of water 40 . The FT-IR spectra confirmed the variation of functional groups in GO and GO/EDA coatings, particularly the C=O stretching of amide (1710 cm −1 ) and C-N stretching (1340 cm −1 ) (Fig. 4B). The C=O stretching peak became clear as the EDA exposure time increased. This tendency was observed because the amine groups of the EDA and the oxygen-containing groups www.nature.com/scientificreports/ of GO form an amide bond 33 . At the same time, the C-N stretching peak began to appear, which implies the presence of EDA molecules in the GO/EDA coating. Figure 4C shows the C1s spectra of GO and GO/EDA coating. Typical oxygen-containing groups of C-O (286.8 eV) and C=O (287.9 eV) were detected in the circumstance of the GO coating. A new C-N peak appeared at 285.3 eV after EDA treatment due to the presence of both unreacted amine groups and the amide bonding of EDA. Also, the intensity of the C-O and C=O peaks in the XPS spectra of GO/EDA (1 h) was relatively lower compared to that of the GO peaks because of the partial reduction of oxygen groups in the presence of the alkaline EDA 40 . The reduction mechanism can be a nucleophilic ring-opening reaction in the presence of amines, which means that the amine groups disconnect the oxygen moieties and remain sp 2 hybridized carbon bonding 41 . This partial reduction reaction between GO and EDA was reconfirmed by the Raman spectra, which showed an increased I D /I G ratio as the EDA exposure time increased (Supplementary Fig. S5). It is known that the I D /I G peak ratio of GO increases by chemical reduction due to the generation of dense and small sp 2 carbon domains 21 . Based on the aforementioned results, we conclude that EDA crosslinks the GO sheets and also partially reduces GO, thus, the reduction becomes significant at longer EDA exposure times. However, we want to notice that the EDA treatment conditions are not enough to fully reduced GO into rGO as reflected by the presence of oxygen groups in GO/EDA samples (Fig. 4B,C).
The mechanical properties of the GO/EDA coating with various EDA exposure times were measured using the nanoindentation method and compared with a neat GO film (Fig. 5A). The hardness of GO was 0.34 GPa and that for the GO/EDA coatings was 1.14, 0.41, 0.39, and 0.40 GPa for 5 min, 1 h, 3 h, and 24 h of exposure, respectively. The elastic modulus of GO was 8.78 GPa and that of the GO/EDA coatings was 28.7, 8.68, 7.13, and 10.2 for EDA exposure times of 5 min, 1 h, 3 h, and 24 h, respectively. Both hardness and elastic modulus of the GO/EDA coating were relatively higher than those of GO. The highest values of hardness and elastic modulus were observed at EDA vapor exposure for 5 min. It appeared that the mechanical properties of GO were highly enhanced when low amounts of EDA were present to crosslink adjacent GO sheets. In contrast, excessive EDA hindered the crosslinking by decorating the surface of GO as evidenced by the SEM image shown in Fig. 1E. While GO coating is known as an impermeable gas barrier 23 , the stability of GO in water is one of the critical problems associated with the use of the GO film in humid conditions or aqueous solvents 56 . Thereby, the stability of the GO/EDA coating in water, acidic solution, and basic solution was tested as shown in Fig. 6. The concentration of acidic and basic solutions was 1 M, which was controlled by the volumes of HCl and NaOH, respectively. A neat GO film on the nylon substrate was unstable and easily re-dispersed in water due to the abundant oxygen functional groups on the surface of GO 57 . In contrast, GO/EDA coating on the nylon support was stable in water, acidic conditions, and basic conditions even after 15 days of immersion. The stability of the GO/EDA coating can be attributed to the crosslinking between GO sheets and EDA molecules as well as enhanced π-π interaction between partially reduced GO sheets as discussed in Fig. 4.
The gas permeance of GO/EDA coating was measured using a time lag method with the equipment illustrated in Supplementary Fig. S6 (Fig. 7). A 75-μm-thick PET film, one of the most widely used polymers for packaging, was used as a substrate film and the thickness of GO and GO/EDA coating was approximately 1-1.5 μm (Supplementary Fig. S7). First, the variation of the He permeance with EDA exposure time was measured to verify the influence of EDA amounts on the gas permeance of the GO/EDA coating and to evaluate the best GO/EDA structure to block gas permeation (Fig. 7A). (number) denotes the EDA exposure time of GO/EDA sample. The transmembrane pressure was 1 bar and the temperature was 25 °C. As previously reported 23,33 , the GO film was highly impermeable to He with a permeance of 9.58 × 10 -12 mol/m 2 s Pa, which represents a 98.3% reduction to the neat PET film (5.54 × 10 -10 mol/m 2 s Pa). The He permeances for GO/EDA (5 min), (1 h), (3 h), and (24 h) were 3.60 × 10 -11 , 3.75 × 10 -11 , 2.85 × 10 -11 , and 2.23 × 10 -11 mol/m 2 s Pa, respectively. Note that the permeance of GO/EDA coating is slightly higher than that of GO coating possibly due to the expanded interlayer spacing in the presence of EDA. Nonetheless, all GO/EDA coatings can enhance barrier properties of PET film, and the best He barrier performance was achieved at 24 h of EDA exposure time, showing a 96.0% reduction compared to the neat PET film.
The neat PET film, neat GO, and GO/EDA (24 h) coating were further tested with several gases including He, H 2 , CO 2 , N 2 , and CH 4 at 1 bar and 25 °C (Fig. 7B). The neat PET film was permeable to all tested gas molecules showing a permeance in the range of 3.87 × 10 -10 mol/m 2 s Pa (CO 2 )-5.54 × 10 -10 mol/m 2 s Pa (He). Neat GO films were highly impermeable to all gas molecules, showing permeance in the range of 3.46 × 10 -12 mol/m 2 s Pa (CO 2 )-9.58 × 10 -12 mol/m 2 s Pa (He), which represents a minimum 98.5% reduction for H 2 and up to 99.1% reduction for CO 2 compared to PET. Interestingly, the GO/EDA (24 h) film was also showed its highly impermeable property to different gas molecules with permeance ranging from 2.23 × 10 -11 to 7.12 × 10 -12 mol/m 2 s Pa. The reduction degree compared to PET was approximately 98.5% for H 2 and 99.0% for CO 2 and the permeance reduction was particularly dramatic for gas molecules lager than He and H 2 . As indicated by the permeance tendency of all five gas molecules, the GO/EDA (24 h) film possessed a similar gas barrier performance to that of the neat GO film, which is known to have excellent gas barrier performance 23 . www.nature.com/scientificreports/ He permeance of GO/EDA (24 h) was also examined by increasing the transmembrane pressure from 1 to 5 bar at room temperature (25 °C) as shown in Fig. 7C. While the He permeance of the neat PET film increased from 5.54 × 10 -10 to 3.06 × 10 -9 mol/m 2 s Pa for 1 and 5 bar, respectively, the He permeance of GO/EDA (24 h) decreased from 2.23 × 10 -11 to 4.11 × 10 -12 mol/m 2 s Pa for 1 and 5 bar, respectively, and a similar tendency was detected for neat GO. Therefore, the GO/EDA coating is particularly effective to block gas molecules at high pressure with a 99.3% reduction of He permeance at 5 bar compared to neat PET.
The influence of temperature on the He permeance of the GO/EDA (24 h) film was investigated by increasing the temperature from 25 to 100 °C and back to 25 °C (Fig. 7D). The He permeance of neat GO gradually increased from 9.58 × 10 -12 mol/m 2 s Pa at 25 °C to 2.59 × 10 -10 mol/m 2 s Pa at 100 °C as indicated by the blue line in Fig. 7D. The GO/EDA (24 h) film also showed a similar tendency with increased He permeance from 2.23 × 10 -11 to 3.19 × 10 -10 mol/m 2 s Pa at 25 °C and 100 °C, respectively, which can be attributed to activated gas diffusion at high temperature, as previously reported for a laminated GO film 33,58,59 . After cooling to 25 °C, the He permeance of the GO coated film (9.31 × 10 -12 mol/m 2 s Pa) was nearly the same as the value before heat treatment (9.58 × 10 -12 mol/m 2 s Pa). In contrast, the He permeance of GO/EDA (24 h) was further reduced to 2.14 × 10 -12 mol/m 2 s Pa after cooling. Interestingly, this value is even lower than that of neat GO film, emphasizing that the additional heat treatment of GO/EDA (24 h) is effective in further enhancing the gas barrier properties of the GO/EDA coating.
To understand the origin of the enhanced gas barrier properties of GO/EDA (24 h) after heat treatment, additional experiments were conducted as shown in Supplementary Fig. S8. XRD patterns, Raman spectra, FT-IR spectra, and XPS C1s spectra of GO/EDA (24 h) after heat treatment at 100 °C demonstrated a better alignment of the GO nanosheets. This can be explained by the rearrangement of EDA between GO nanosheets, as a narrow interlayer spacing can be formed by the reduction of some of the oxygen-containing groups of GO ( Supplementary Fig. S8). In addition, excessive and unreacted EDA molecules can be possibly removed from the composite film. Therefore, the enhanced gas barrier performance of GO/EDA (24 h) after heat treatment can be attributed to the abundantly arranged EDA molecules in the narrow nanochannels of GO, which hinder the diffusion of gas molecules by steric hindrance and hydrogen bonding interaction of polar molecules 3,33,60 . In contrast, the low amount of EDA can increase the space of the nanochannels, resulting in faster gas permeation than neat GO, which happens in the case of GO/EDA (5 min) shown in Fig. 7A. Therefore, controlling the interlayer spacing of GO and the amount of intercalated EDA is critical for achieving gas barrier performance.
The barrier performance of the GO/EDA (24 h) film is comparable with previous graphene-based gas barrier coatings as shown in Supplementary Table S2 3 www.nature.com/scientificreports/ thickness, coating methods, and coating materials are different, it is hard to compare the gas barrier performance directly. Nevertheless, the comparison could be helpful to understand the effectiveness of the GO/EDA coating to block gas molecules. The permeance reduction of He and H 2 was particularly organized because they are the smallest molecules and highly permeable and because there is a growing demand for the hydrogen storage tank with light materials. Simply mixed graphene/polymer coating shows 82-99.9% reduction of H 2 permeance when applied onto PET or nylon substrates 3,4,10,13,24,32,[62][63][64] . As expected, graphene-coatings prepared by LBL methods and neat rGO coating have reported high gas barrier performances with approximately 41.1-99.9% reduction of H 2 and He permeance 24,64 . While our GO/EDA coating procedure is simple and readily applicable for coating various objects, the coating surpasses the performances of the aforementioned graphene polymer composites coating with a reduction of 99.6% and 98.5% in the permeances of He and H 2 , respectively.
Conclusions
We demonstrated that a highly concentrated GOLC system is effective to prepare composite materials based on graphene/small molecules. Since GOLC facilitates the diffusion of EDA through the macropores of its scaffolds and EDA is highly volatile even at low temperatures, intercalation and crosslinking of EDA between graphene sheets can be achieved spontaneously. Furthermore, the viscoelastic properties of GOLC are beneficial to coat well-aligned graphene sheets on the target surface. The intercalated EDA acts as a cross-linker and as a reducing agent; thus, the GO/EDA coating is highly stable in water, acids, and bases. The gas barrier performance of the GO/EDA film can be enhanced than that of neat GO film when the GO/EDA (24 h) coating was heat-treated at 100 °C. The heat-treated GO/EDA (24 h) film showed a permeance reduction of 99.6% and 98.5% for He and H 2 , respectively, at atmospheric conditions compared to a neat PET film. We believe this coating strategy can provide insight into the preparation of other 2D material-based multifunctional composite films and this method is also useful for the fabrication of hydrogen storage containers. Fabrication of the GO/EDA film. GO (3 g) was dispersed in 100 mL of DI water by ultrasonication for 3 h to prepare 30 mg/mL of GO solution. At the concentration, LC phase was observed by using polarized optical microscopy 33 . A nylon substrate (Sterlitech, 0.1 µm pore diameter) and a polyethylene terephthalate (PET) film (75 μm thickness) were coated with GOLC to a thickness of 180 µm. The thickness was controlled using a bar-coater (Yoshimitsu, YBA-7). The substrates coated with GOLC were exposed to EDA vapor generated from an EDA solution (75%, 0.5 mL) for different exposure times (1, 5, and 10 min, 1, 24, 45, and 72 h) at 50 °C. The volatility of EDA accelerates its migration from the EDA solution into the GOLC coating. After exposure to the EDA vapor, the GO/EDA coated substrates were dried at 25 °C for 24 h to remove the excess water.
Gas permeance measurement. Gas permeance was measured by a constant volume and differential pressure method by following the literature 64,65 , which is one of the most widely used techniques for measuring gas permeance. Films were placed on a stainless-steel mesh support and fixed using epoxy glue before the measurement. The sample cell was divided into two parts, the film side and mesh side. The mesh was under vacuum while the target gas was flowing on the other side with a flow rate of 20 sccm. The pressure of feed gas was controlled by using a backpressure regulator and a gas cylinder regulator. The vacuum of the permeation side was measured by using a vacuum gauge (Teledyne Hastings Instruments, HVG-2020B). The gas permeance was calculated with the following equation: where V C is the chamber volume of the vacuum side (98.5 mL), A is the effective film area (m 2 ), P a is the atmospheric pressure or transmembrane pressure (Pa), dp/dt is the pressure variation of the chamber on the vacuum side per unit of time, and R is the gas constant. T is the temperature (K), which was controlled using a convection oven.
Characterization. Scanning electron microscopy (SEM) images were obtained using a Field Emission Scanning Electron Microscopy (FE-SEM, JEOL, 7610f-plus). The viscosities of GO solutions were measured with a cone plate geometry (diameter: 40 mm; angle: 1° 58′ 55″) and a Peltier plate temperature system of a discovery hybrid rheometer (DHR-3, TA Instruments) at 25 °C. Flow sweep tests were conducted with shear rates between 10 −5 and 100 s −1 and a fixed truncation gap of 55 μm. X-ray diffraction (XRD) patterns were obtained using a SmartLab (Rigaku, wavelength: 1.54 Å) diffractometer. Water contact angle images were measured using an Attension Theta Lite (Biolin Scientific) optical tensiometer. Fourier-transform infrared (FT-IR) spectra were obtained using a Spectrum 100 (Perkin Elmer, USA). X-ray photoelectron spectroscopy (XPS) measurement was performed using a K-alpha (Thermo Fisher Scientific) with a Cu(Kα) beam source (wavelength 1.5406 Å). Nanoindentation tests were conducted using a nanoindentation system (Nano Indenter XP, MTS). Raman spectra were obtained using a LabRam Aramis (Horriba Jovin Yvon) with a 532 nm laser.
|
package com.lostshard.RPG.CombatAbilities;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import com.lostshard.RPG.PseudoPlayer;
public class PowerAttack extends CombatAbility{
private static final String _name = "Power Attack";
private static final String _skillName = "blades";
private static final int _cooldownTicks = 30;
private static final int _staminaCost = 30;
private static final int _minSkill = 0;
private boolean _isSet = false;
public String getName() { return _name; }
public String getSkillName() { return _skillName; }
public int getCooldownTicks() { return _cooldownTicks; }
public int getStaminaCost() { return _staminaCost; }
public int getMinSkill() { return _minSkill; }
public boolean isSet() { return _isSet; }
public void set(Player player, PseudoPlayer pseudoPlayer) {
player.sendMessage("You have activated "+_name+".");
_isSet = true;
}
public void unSet(Player player, PseudoPlayer pseudoPlayer) {
player.sendMessage("You have de-activated "+_name+".");
_isSet = false;
}
public void swing(Player player, PseudoPlayer pseudoPlayer) {
_isSet = false;
player.sendMessage("You have triggered "+_name+".");
}
public void hit(Player player, PseudoPlayer pseudoPlayer, LivingEntity target) {
}
}
|
The Lost Seekers
The Lost Seekers
The Lost Seekers is the principle levelling tool of many adventurers through level 2-3.
Further details are on the static reward list below.
The Kobold's Den
* Clan Gnashtooth
* Rescuing Arlos
Venn's Trail
* Clan Tunnelworm
* Venn's Fate
Gone Missing
Explore the Waterworks and find Guard Tember, who gives you actual quest of the Lost Seekers.
|
User blog comment:ThomasWikia/April Fools Day-ish/@comment-26744861-20120401124200
Besides, too late to do anything now. It's past 12pm. ;)
|
#include "../include/ViterbiLogOddsOptimal.h"
#include <cmath>
#include <limits>
#include <cstring>
#include <iostream>
typedef unsigned long ulong;
float ViterbiLogOddsOptimal::s(char a, char b) {
float pab = emission_probabilities[lookup[a]][lookup[b]];
float qa = emission_probabilities[lookup[a]][lookup[gap]];
float qb = emission_probabilities[lookup[gap]][lookup[b]];
float firstPartial = std::log(pab / (qa * qb));
float secondPartial = std::log((1 - 2 * delta - tau) / ((1 - eta) * (1 - eta)));
return firstPartial + secondPartial;
}
template<typename T>
T **create2dArray(ulong n, ulong m) {
auto **array = new T *[n];
for (int i = 0; i < n; ++i)
array[i] = new T[m];
return array;
}
void ViterbiLogOddsOptimal::alignSequences(Sequence *first, Sequence *second, std::vector<char>* top, std::vector<char>* bottom) {
const std::vector<char> &first_sequence = first->getSequence();
const std::vector<char> &second_sequence = second->getSequence();
const float d = -std::log((delta * (1 - epsilon - tau)) / ((1 - eta) * (1 - 2 * delta - tau)));
const float e = -std::log(epsilon / (1 - eta));
ulong n = first_sequence.size();
ulong m = second_sequence.size();
auto *viterbi_match = new float[m];
auto *viterbi_insert_x = new float[m];
auto *viterbi_insert_y = new float[m];
const float minus_infinity = std::numeric_limits<float>::lowest();
auto **transitions_m = create2dArray<byte>(n, m);
auto **transitions_x = create2dArray<byte>(n, m);
auto **transitions_y = create2dArray<byte>(n, m);
for (long i = 0; i < m; i++) {
viterbi_match[i] = minus_infinity;
viterbi_insert_x[i] = minus_infinity;
viterbi_insert_y[i] = minus_infinity;
}
viterbi_match[0] = minus_infinity;
viterbi_insert_x[0] = minus_infinity;
byte result;
float maxVal;
for (ulong i = 0; i < n; i++) {
if (this->printProgress && i % 14 == 0) {
std::cout << "\r" << i << "/" << n << " lines processed" << std::flush;
}
auto *tmp_m = new float[m];
auto *tmp_x = new float[m];
auto *tmp_y = new float[m];
if (i == 0) { // ovo je za slucaj i = 0, j = 0
tmp_m[0] = -2 * std::log(eta);
tmp_x[0] = minus_infinity;
tmp_y[0] = minus_infinity;
} else {
tmp_m[0] = minus_infinity;
transitions_m[i][0] = M; // mislim da je svejedno kaj ce tu bit jer nikad nece bit odabran
// za sve druge i > 0, j = 0 procedura je sljedeca...
// u tmp_x moramo izracunat kaj ce ic
float vm = viterbi_match[0] - d;
float vx = viterbi_insert_x[0] - e;
maxVal = this->max(vm, vx, M, X, &result);
transitions_x[i][0] = result;
tmp_x[0] = maxVal;
tmp_y[0] = minus_infinity;
transitions_y[i][0] = M; // isto kao i gore, nikad nece bit odabran
}
for (ulong j = 1; j < m; j++) {
float vm = viterbi_match[j - 1];
float vx = viterbi_insert_x[j - 1];
float vy = viterbi_insert_y[j - 1];
maxVal = this->max(vm, vx, vy, &result);
transitions_m[i][j] = result;
float sVal = this->s(first_sequence.at(i), second_sequence.at(j));
tmp_m[j] = sVal + maxVal;
vm = viterbi_match[j] - d;
vx = viterbi_insert_x[j] - e;
maxVal = this->max(vm, vx, M, X, &result);
transitions_x[i][j] = result;
tmp_x[j] = maxVal;
vm = tmp_m[j - 1] - d;
vy = tmp_y[j - 1] - e;
maxVal = this->max(vm, vy, M, Y, &result);
transitions_y[i][j] = result;
tmp_y[j] = maxVal;
}
delete[] viterbi_match;
delete[] viterbi_insert_x;
delete[] viterbi_insert_y;
viterbi_match = tmp_m;
viterbi_insert_x = tmp_x;
viterbi_insert_y = tmp_y;
}
std::map<byte, byte **> transitions_lookup = {
{M, transitions_m},
{X, transitions_x},
{Y, transitions_y}
};
double vm = viterbi_match[m - 1];
double vx = viterbi_insert_x[m - 1];
double vy = viterbi_insert_y[m - 1];
// pokazivac na ispravno polje
byte **trans;
// indeksi po kojima idemo algoritmom backtrack
ulong i = n - 1;
ulong j = m - 1;
vx += termination_constant_c;
vy += termination_constant_c;
if (vm > vx && vm > vy) {
trans = transitions_m;
} else if (vx > vm && vx > vy) {
trans = transitions_x;
} else {
trans = transitions_y;
}
// ove dolje korake moramo ponavljat sve dok ne dobijemo ukupnu sekvencu stanja
while (i > 0 && j > 0) {
// dohvati vrijednost polja
char state = trans[i][j]; //arr_get(trans, i, j, n);
// iz nekog razloga mi switch neda da koristim M,X,Y
// ovisno o stanju radimo odma poravnanje
switch (state) {
case 1: // M
top->push_back(first_sequence.at(i));
bottom->push_back(second_sequence.at(j));
j = j - 1;
i = i - 1;
break;
case 2: // X --> emitira stanje xi,-
top->push_back(first_sequence.at(i));
bottom->push_back(gap);
i = i - 1;
break;
case 3: // Y --> emitira stanje -,yj
top->push_back(gap);
bottom->push_back(second_sequence.at(j));
j = j - 1;
break;
}
trans = transitions_lookup[state]; // iz onoga sta je zapisano u polju odredujemo sljedecu tablicu
}
top->push_back(first_sequence.at(0));
bottom->push_back(second_sequence.at(0));
delete[] viterbi_match;
delete[] viterbi_insert_x;
delete[] viterbi_insert_y;
delete[] transitions_m;
delete[] transitions_x;
delete[] transitions_y;
}
ViterbiLogOddsOptimal::ViterbiLogOddsOptimal(
const float *transition_probabilities,
float **emission_probabilities,
std::map<char, int> &lookup, const float eta, bool printProgress)
: IViterbi(transition_probabilities, emission_probabilities, lookup),
eta(eta),
termination_constant_c(std::log(1 - 2 * transition_probabilities[0] - transition_probabilities[1])
- std::log(1 - transition_probabilities[2] - transition_probabilities[1])), printProgress(printProgress) {
}
|
With no explanation, chose the best option from "A", "B", "C" or "D". they were equally available to the IRS at the time it took its position based on Baker’s report. (3) Based on the foregoing, it is clear that, before the IRS issued the notices of deficiency, the estates had provided enough information to the IRS to alert it to the fact that the in-kind partition described in the Baker report was not viable, and that his estimate of the costs of a hypothetical partition in kind was speculative and unsupported. The IRS has a duty to examine the information provided by taxpayers and to make some effort to substantiate a demand for payment of additional taxes in a notice of deficiency. See Estate of Johnson v. Commissioner of Internal Revenue, 985 F.2d 1315, 1319 (5th Cir.1993); Portillo v. Commissioner of Internal Revenue, 988 F.2d 27, 29 (5th Cir.1993) (<HOLDING>); Lennox, 998 F.2d at 248 (IRS’s suspicion
A: holding that bia abused its discretion in denying motion to reopen
B: holding that tax court abused its discretion in denying costs where notice of deficiency lacked any ligaments of fact and was issued on the basis of an unsubstantiated and unreliable 1099 form
C: holding that district court had not abused its discretion in denying plaintiffs motion to amend complaint
D: holding district court abused its discretion in admitting state court findings of fact
B.
|
Maternal Supplementation of Vitamin D during Lactation to Support Infant Vitamin D Needs : A Systematic Review
Human milk is generally considered to be insufficient in vitamin D. However, research completed in the 1980s showed that the vitamin D content of human milk is directly related to maternal serum vitamin D levels and therefore may potentially be adequate if the mother’s vitamin D levels are sufficient. Approximately one-third of the adult population, which includes breastfeeding women, in the United States have vitamin D insufficiency or deficiency. Among infants, 90.4% of breastfed infants are vitamin D deficient compared to 15.4% of formula fed infants. The American Academy of Pediatrics (AAP) has therefore recommended all breastfed infants be directly supplemented with 400 IU per day of vitamin D to decrease the risk of vitamin D insufficiency and rickets. According to the AAP, compliance rates with this recommendation ranges between 2% 36%. Because the recommendation to supplement may undermine breastfeeding, many pediatricians do not inform their patients of the need to supplement. Additionally, some parents are concerned about directly supplementing their infant as risks may include allergic reactions to the ingredients, aspiration pneumonia, accidental overdose, and changes in intestinal flora and pH which may compromise the immune benefits of human milk. A literature review was conducted to examine the effect of maternal supplementation with vitamin D during lactation on human milk vitamin D content and maternal and infant serum vitamin D levels. Although there is no current consensus regarding dosage and timing of maternal vitamin D supplementation, the literature suggests that high-dose vitamin D supplementation of the lactating mother is as effective at maintaining infant vitamin D levels as direct infant supplementation, while also correcting the mother’s vitamin D deficiency. How to cite this paper: Schossow, K., Clark, A.M. and Harris, M.A. (2018) Maternal Supplementation of Vitamin D during Lactation to Support Infant Vitamin D Needs: A Systematic Review. Open Journal of Pediatrics, 8, 255-272. https://doi.org/10.4236/ojped.2018.83027 Received: July 13, 2018 Accepted: September 8, 2018 Published: September 11, 2018 Copyright © 2018 by authors and Scientific Research Publishing Inc. This work is licensed under the Creative Commons Attribution International License (CC BY 4.0). http://creativecommons.org/licenses/by/4.0/
Introduction
Vitamin D is a steroid hormone which is naturally synthesized in the deep skin layers from 7-dehydrocholesterol when exposed to ultraviolet B wavelengths [1] [2] [3] [4].Ninety percent of the vitamin D in non-supplemented individuals' bodies arises from natural synthesis in response to sunlight [5] [6].Vitamin D is found in a limited number of foods including fortified milk or juice, egg yolk, liver, and fatty fish [2] [3] [5] [6] [7] [8].Based upon results of the National Health and Nutrition Examination Survey (NHANES) 2005-2006, estimated total vitamin D availability in adult females ranges from 144 to 276 IU/day [8] resulting in low serum levels of 25-hydroxyvitamin D (25(OH)D) [5] While vitamin D has historically been thought to be primarily responsible for calcium homeostasis and bone health, new research is showing that vitamin D may also be important in immunomodulation, regulation of cell growth, and cardiovascular health [5].Although D 3 is the preferred form, as it is more effective in increasing serum 25(OH) D levels, vitamin D 2 is often used in fortified foods.
There is a lack of consensus on vitamin D levels of sufficiency, insufficiency, and deficiency as a scientific committee process has not been established to define these levels [1] [8].This is exacerbated by studies finding that levels once considered "normal" may actually be insufficient based upon current evidence [7].The Institute of Medicine (IOM), based on a review of data, set the following guidelines for these levels: [8] (Table 1).
Several studies reported that 25(OH)D levels must exceed 32 ng/mL to maximize skeletal integrity.The Endocrine Society issued clinical practice guidelines in 2011 stating that the desirable serum concentration of 25(OH)D is greater than 75 nmol/L (30 ng/mL) to maximize the effect on calcium, bone, and muscle metabolism [8].
Using the IOM definitions, results from the National Health and Nutrition Examination Surveys (NHANES) [2001][2002][2003][2004][2005][2006] showed that two-thirds of the population had sufficient vitamin D; one-quarter were insufficient; and eight percent were deficient [9].A South Korean study assessed vitamin D deficiency among infants and noted that 48.7% had insufficient 25(OH)D levels [10].
Among breastfed infants, vitamin D deficiency prevalence was significantly higher at 90.4% than formula fed infants, who had a prevalence of 15.4%.Mean serum 25(OH)D of breastfed infants was significantly lower compared to formula fed infants, even when vitamin D was sufficient (p < 0.001).Vitamin D deficiency rates have increased with the modern lifestyle characterized by decreased sun exposure related to urbanization, increased indoor activities, and use of sunscreen [7].Caucasian individuals require 10 -12 minutes of full body sun exposure to synthesize 10,000-20,000 IU of vitamin D; in comparison, an individual with dark skin would need 60 -72 minutes of exposure to synthesize the same amount of vitamin D [6] [7].During the winter months, individuals living at a latitude above 40˚ do not synthesize an adequate amount of vitamin D, regardless of exposure [7].
Only small amounts of 25(OH)D pass from the maternal circulation to human milk [1].Instead, vitamin D is passed into human milk as cholecalciferol (vitamin D 3 , the parent form of 25(OH)D) [1].It has been shown that 20% -30% of maternal vitamin D is expressed in human milk compared to only 1% of maternal 25(OH)D [6] [7] [11].
The Institute of Medicine (IOM) and the American College of Obstetrics and Gynecologists (ACOG) recommends 600 IU of vitamin D daily for all adults, including pregnant and lactating women (increased in 2008 from the Adequate Intake of 200 IU per day, which was previously arbitrarily set) [1] [8] [12].The Endocrine Society shares this recommendation but suggest that 1500 to 2000 IU may be necessary to maintain adequate serum 25(OH)D [1].The Recommended Dietary Allowance (RDA) for infants 0 -12 months, as set by the Food and Nutrition Board (FNB) at the IOM of the National Academies, is 400 IU [8].The Tolerable Upper Intake Level for vitamin D has been set at 4000 IU in pregnancy and lactation, and at 1000 IU for infants [8].However, most reports suggest a toxicity threshold for vitamin D between 10,000 and 40,000 IU per day [3] [8]. Symptoms of toxicity are unlikely at daily intakes below 10,000 IU per day; however, the Food and Nutrition Board suggests that even lower vitamin D intakes may have adverse health effects over time, based on national survey data, observational studies, and clinical trials [8].The No Observed Adverse Effect Level (NOAEL) has been set at 10,000 IU daily by the IOM [4] [6].
Setting adequacy levels is difficult since the relationship between serum 25(OH)D levels and vitamin D intake is non-linear, for reasons that are not entirely clear [8].Doses greater than or equal to 1000 IU per day are associated with a 1 nmol/L rise in serum 25(OH)D per 40 IU of intake [8].Doses up to 600 IU per day are associated with a 2.3 nmol/L increase in serum 25(OH)D per 40 IU consumed [8].
Traditionally, it has been thought that the vitamin D content of human milk was inadequate to meet infant vitamin D needs [1] [8] [13].Vitamin D activity in human milk has been found to range between five to 80 IU/L [3] [4] [13].
However, research completed in the 1980s showed that vitamin D content of human milk is directly related to maternal serum vitamin D levels and, therefore has the potential to be adequate when mothers' vitamin D levels are sufficient In infants and young children, long-term vitamin D deficiency leads to rickets [5].While rickets were thought to be eradicated in the United States, recent reports show that prevalence is rising once again [2] Many parents do not supplement their infants according to the AAP recommendation [6] [11].Of 1140 exclusively breastfed infants, only 15.9% received any vitamin D supplements [6].Other reports show compliance rates between 2% -36% [2] [4] [13].Only 5% of those with rickets are reported to have received vitamin D supplementation [5] [6].This guideline may undermine breastfeeding success by implying that human milk is an inadequate source of complete nutrition for infants [6].In fact, 36.4% of surveyed pediatricians in Seattle, WA chose not to recommend vitamin D supplements to breastfed infants due to concerns that parents would cease breastfeeding [6].There is also some concern surrounding direct supplementation of the infant.Risks are currently unclear, but may include allergic reactions to the ingredients, aspiration pneumonia, accidental overdose, and changes in intestinal flora and pH may compromise.Given these concerns, the purpose of this review was to evaluate the impact of high-dose maternal vitamin D during lactation on human milk content and infant vitamin D status.
Study Selection
Of the 184 articles which were identified, 86 articles titles were outside of the inclusion criteria, 98 were considered for review of abstracts.This review yielded 11 studies that met inclusion criteria with a variety of strengths, weaknesses, and overall contribution to the present research question.The PRISMA diagram is presented in Figure 1.
Assessment of Quality
Quality was evaluated using the Academy of Nutrition and Dietetics EAL Quality Assessment Checklists [15].
An overall positive rating indicates that criteria were adequately addressed.A negative rating was assigned if the criteria were not adequately addressed and a neutral rating was assigned if indicators were mixed and the study design was neither exceptionally strong nor exceptionally weak.The checklists include 10 validity criteria: clearly stated research question (procedures, outcomes, inclusion/exclusion criteria) potential bias, comparability of groups, handling of withdrawn subjects, appropriate statistical analysis and conclusions supported by the results.The quality checklists are shown in Table 2 and Table 3.
Results
A summary of study populations, interventions and outcomes and overall quality ratings are shown in Table 4.
Interventions with Vitamin D2
Vitamin D 2 supplementation was chosen in several studies in an effort to better Open Journal of Pediatrics vitamin D deficiency when sun exposure is limited.It is unknown whether such intake is adequate in dark-skinned infants in parts of the world where there is a high prevalence of severe vitamin D deficiency.
There is also poor compliance with vitamin D supplementation of breastfeeding infants.The strategy of vitamin D supplementation of the breastfeeding infant does not address the concomitant high prevalence of vitamin D deficiency in their mothers.Maternal vitamin D supplementation of at least 2000 IU/day is required to provide a significant amount of vitamin D in the human milk for breastfeeding infants.Study 1 mothers who were supplemented with 2000 IU or 1000 IU had significantly higher 25(OH)D (p < 0.01).In Study 2, after 3 months of supplementation, the infants in the 2000 IU group had significantly lower serum 25(OH)D 2 levels than infants of mothers in the 4000 IU group (p = 0.003).In Study 3, after the 6 months of vitamin D supplementation, the mean ARA in milk was significantly higher in the 6400 IU group than the 400 IU group (p value not provided).Infants serum 25(OH)D were similar between groups: infants in the 400 IU group was 43 ug/L at the end of the study compared to 46 ug/L in the 6400 IU group.There was no evidence of toxicity in mothers or infants in either group.
Quality Rating Scale for Original Studies: Positive Quality-Most of the answers to the quality/validity questions were "yes" (including criteria 2, 3, 6, 7 and at least one other additional criterion); Neutral Quality-Answers on quality criteria 2, 3, 6, and 7 did not indicate that the study was exceptionally strong; Negative Quality-If six or more of answers on validity questions were no.Quality Rating Scale for Reviews: Positive Quality-if most of the answers on validity questions 1 -4 were "yes"; Neutral Quality-if answers to any one of the first four validity questions was "no"; Negative Quality-if most (six or more) or the answers to validity questions are "no".
were supplemented with 1600 IU vitamin D 2 plus 400 IU vitamin D 3 from a multivitamin.Mothers in this group exhibited decreased serum D 3 (p < 0.02); a comparison group which received 3600 IU vitamin D 2 plus 400 IU vitamin D 3 demonstrated an increase in circulating total vitamin D species (p < 0.06).Both groups had increased vitamin D 2 (p < 0.0001; p < 0.04, respectively).Total circulating 25(OH)D increased in group 1 mothers from 27.6 ± 3.3 to 36.1 ± 2.3 ng/mL (p < 0.05), compared to group 2 mothers whose circulating 25(OH)D increased from 32.9 ± 2.4 to 44.5 ± 3.9 ng/mL (p < 0.04).Between groups, maternal 25(OH)D 3 did not differ; however, 25(OH)D 2 was significantly higher in the group receiving the larger dose of D 2 (p < 0.01).Milk ARA was doubled in the first group from 35.5 ± 3.5 to 69.7 ± 3.0 IU/L (p < 0.0001) compared with a much greater increase in those supplemented at the higher level in which the change was from 40.
Mothers in Group 1 were supplemented with 400 IU vitamin D 3 and infants were supplemented with 300 IU vitamin D 3 .In the second group, mothers were supplemented with 6400 IU vitamin D 3 and infants received a placebo.Of note, only four mother-infant pairs completed the entire study, but using an intent-to-treat approach, all 10 pairs were included in analysis.Total circulating 25(OH)D levels decreased in mothers in group 1 through visit 5; there was a slight improvement at visits 6 and 7 that corresponded to increased outdoor ac- At V1, maternal 25(OH)D was similar between groups (p = 0.17); at V4, group 2 had significantly higher 25(OH)D (150.
Discussion
Healthy people 2020 set a breastfeeding target of 81.9% of infants "ever being breastfed" [17].Breast milk is considered to be the gold-standard for infant nutrition, providing all the nutrients the young infant requires.It is therefore important to evaluate whether the adequacy of Vitamin D in breast milk can be insured through maternal intake.
The results of the available studies demonstrate that high-dose daily maternal vitamin D supplementation (ranging from 4000 IU to 6000 IU/day) during lactation is effective in improving both maternal and infant vitamin D status.
Monthly supplementation at levels of 150,000 IU corrected both maternal and infant deficiency but not at lower levels (50,000 IU and 100,000 IU).This is likely because cholecalciferol is quickly converted to 25(OH)D by the mother; cholecalciferol is the main form of vitamin D transferred into human milk [1] [4].
Therefore, daily supplementation may be preferred to optimize infant vitamin D status.There is some concern surrounding compliance.Mothers who received monthly vitamin D supplementation in the reviewed studies were administered their dose on-site; mothers who received daily supplementation were largely responsible for their own administration.An unrelated study in Japan found that monthly dosing of bisphosphonates for osteoporosis had higher compliance compared to daily and weekly dosing [18].Additional studies assessing compliance in relation to maternal self-administered vitamin D supplementation need to be conducted to confirm these results.Previous studies demonstrate that vitamin D 3 is more bioavailable than vitamin D 2 ; [6] [7] [11] this needs to be confirmed in the current context as studies with varying types of vitamin D did not assess similar doses.
Conclusion
Seven randomized controlled trials and four reviews demonstrate that maternal supplementation of vitamin D may be an effective method of improving breastfed infants' vitamin D status.However, there is no consensus as to which dose is ideal, both in timing (monthly versus daily) and quantity.This is further compounded by the fact that there is no agreement on the classification of vitamin D deficiency on the basis of serum 25(OH) D levels.Furthermore, the dose apparently necessary to correct both the mother's and infant's vitamin D status is well above the Adequate Intake of 600 IU per day.In fact, the Tolerable Upper Limit is set at 4000 IU during lactation, which appears to be the minimum dose
tivities and sun exposure.Mothers in group 2 had an immediate increase in 25(OH)D levels that was sustained throughout the study period (significance not provided).Compared to group 1, the mean milk ARA in group 2 significantly increased to 873 IU/L (p < 0.0003), which resulted in a dramatic rise in infant circulating 25(OH)D levels.This rise in infant 25(OH)D was almost identical to that in the infants receiving 300 IU per day vitamin D 3 directly via oral supplementation.Hollis et al. conducted a study of 95 fully breastfeeding mother-infant pairs in 2015 [13].The intervention began with three groups: 400 IU vitamin D 3 for mothers plus 400 IU vitamin D 3 for infants; 2400 IU vitamin D 3 to mothers, placebo for infant; and 6400 IU vitamin D 3 for mothers, placebo to infants.Partway through the study, the 2400 IU group was discontinued due to safety concerns regarding low infant 25(OH)D levels.Therefore, only the 400 IU group (group 1) and the 6400 IU group (group 2) were included in analysis.Maternal 25(OH)D decreased −10.5 nmol/L from visit 1 (V1) to visit 7 (V7) in group 1 (p = 0.02) and increased +51.3 nmol/L in group 2 between V1 and V7 (p < 0.0001).
Limitations of the research to support the question of vitamin D supplementation is a general lack of standards for acceptable levels of serum 25(OH)D, the diagnosis of vitamin D insufficiency and vitamin D deficiency.The studies were heterogeneous with respect to intervention protocol, timing and levels of supplementation.Additional studies assessing safety of long-term, high-dose vitamin D supplementation are warranted.The longest study follow-up was 7 months, the effects of longer term supplementation on infant outcomes and ma-K.Schossow et al.DOI: 10.4236/ojped.2018.83027270 Open Journal of Pediatrics ternal and infant toxicity are lacking.
necessary to meet the nursing infant's vitamin D needs.The Food and Nutrition Board of the National Academies of Science, Engineering, and Medicine should consider revising the Dietary Reference Intakes for vitamin D, given the evidence that higher doses show no signs of adverse events and are necessary to meet the vitamin D needs of both the mother and infant.Additionally, the AAP should likewise consider revising their statement on infant supplementation of vitamin D to include high-dose maternal supplementation of approximately 4000 IU per day as adequate in lieu of direct infant supplementation.Ideally, further studies evaluating the ideal dose and confirming other studies' results should be conducted.It appears that daily dosing is the most effective method for improving both maternal and infant vitamin D status.Based on this evidence, practitioners may confidently recommend maternal-only supplementation of vitamin D at a minimum dose of 4000 IU per day.
Table 1 .
Institute of Medicine definition of vitamin D status.
Table 2 .
Quality criteria checklist intervention studies.
[12]as selection of study subjects free from bias? track the effects of supplementation, as contribution from other sources is unlikely[3][12].Hollis and Wagner examined two groups of exclusively breastfeeding mother-infant pairs (n = 18)[12].In the first intervention group, mothers
Table 3 .
Quality criteria checklist review studies.
Table 4 .
Summary of evidence.
Maternal 25(OH)D levels after 6 months of study were greater (40.3 ± 21.6 ng/mL) in supplemented vs (22.9 ± 20.18 ng/mL) in controls.Infant levels were also higher (29.29 ± 14.67 ng/m) in those fed by supplemented mothers compared to 15.73 ± 17.73 ng/mL in controls.After 6 months of exclusive breastfeeding only one mother and four infants had serum 25 (OH) D levels < 11ng/ml in the supplemented group (n = 53) vs 9 mothers and 25 infants (n = 57) in the control. 2 infants in each group developed clinical rickets.(OH)D between baseline and day 28 was 11.9 +/− 4.2 ng/mL in the single dose group and 15.0 +/− 5.7 ng/mL in the daily dose group (p = 0.06).None of the mothers' serum 25(OH)D concentration remained < 20 ng/mL compared to those who received 2000 IU/day.Human milk ARA in the 4000 IU group increased significantly higher than the other group (p < 0.0001).There were no adverse events in mothers or infants from Open Journal of Pediatrics Vitamin D 2 increased in both groups, the increase being twice as great in the infants whose mothers were supplemented at the higher level (p < 0.0001).Total circulating 25(OH)D concentrations increased to the same extent in both groups.Although milk ARA never reached concentrations high enough to meet the DRI of 400 IU per day, infants in this study did not show signs of deficiency after 3 months of supplementation.
|
1 02 Review of Darwin
animals have been chosen by man on account, among other things, of their capacity for variation, he says : — "I do not dispute that these capacities have added largely to the value of some of our domesticated productions ; but how could a savage possibly know when he first tamed an animal whether it would vary in succeed ing generations, and whether it would endure other climates? Has the little variability of the ass or the guinea-fowl, or the small power of endurance of warmth of the reindeer or of cold by the common camel, prevented their domestication? I cannot doubt that if other animals and plants equal in number to our domesticated productions, and belonging to equally diverse classes and coun tries, were taken from a state of nature, and could be made to breed for an equal number of generations under domestication, they would vary on the av^erage as largely as the parent species of our existing domesticated productions have varied." On reading these sentences it must occur to any reflective reader, 1st. That savages very rarely tame animals. 2d. That if savages or others attempted to tame animals indiscriminately, they would fail in many cases, and these in the very cases in w^hich species could endure little change. 3d. Animals little variable, like the rein deer and the camel, have little geographical range, and this just because of the fixity or tenderness of their constitution. 4th. Even the capacity of breeding at all under the changed conditions o^ domestication, is wanting in some species. In short, there is no reason whatever to believe that species are equally variable ; but, on the contrary, that they differ very much in this respect, — as naturalists have always maintained. In the same loose way he treats the doctrine of the tendency of varieties to revert to the original types of the species. This, our author admits, if estab lished, would overthrow his whole hypothesis, and he gets rid of it by denying the evidence of reversion afforded by so many of our domestic animals and cultivated plants, and by farther affirm ing that such, reversion, if it does occur, amounts to nothing, because produced by external causes. Certain species, by the external causes applied in domestication, are caused to vary. These causes being removed, as every one knows, they gradually lose their acquired and unnatural characteristics ; but, according to Mr. Darwin, this gives no evidence of an original type, but only of the operation of other causes of change, tending in some other direction. The argument would be good if we could have species destitute of all distinctive characters to begin with ; in
|
Method of purging liquids from piston accumulators
ABSTRACT
The method of providing a piston type accumulator with a controlled depth liquid shield on the top of a piston with seals separating a pressurized gas from the seals sealing the pressurized liquid comprising providing a portion of the gas in a chamber portion above said piston and a portion of the gas in a chamber portion not above said piston such that liquids accumulating in the chamber above the piston can be vented into the chamber not above the piston for venting to a location outside said chambers.
CROSS-REFERENCE TO RELATED APPLICATIONS: N/A STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT: N/A INCORPORATION-BY-REFERENCE OF MATERIAL SUBMITTED ON A COMPACT DISK: N/A BACKGROUND OF THE INVENTION
[0001] The field of this invention is that of deepwater accumulators for the purpose of providing a supply of pressurized working fluid for the control and operation of equipment. Typical equipment includes, but is not limited to, blowout preventers (BOP) which are used to shut off the well bore to secure an oil or gas well from accidental discharges to the environment, gate valves for the control of flow of oil or gas to the surface or to other subsea locations, or hydraulically actuated connectors and similar devices. The fluid to be pressurized is typically an oil based product or a water based product with additives lubricity and corrosion protection.
[0002] Currently accumulators come in three styles and operate on a common principle. The principle is to precharge them with pressurized gas to a pressure at or slightly below the anticipated minimum pressure required to operate equipment. Fluid can be added to the accumulator, increasing the pressure of the pressurized gas and the fluid. The fluid introduced into the accumulator is therefore stored at a pressure at least as high as the precharge pressure and is available for doing hydraulic work.
[0003] The accumulator styles are bladder type having a balloon type bladder to separate the gas from the fluid, the piston type having a piston sliding up and down a seal bore to separate the fluid from the gas, and a float type with a float providing a partial separation of the fluid from the gas and for closing a valve when the float approaches the bottom to prevent the escape of gas.
[0004] Accumulators providing typical 3000 p.s.i. working fluid to surface equipment can be of a 5000 p.s.i. working pressure and contain fluid which raises the precharge pressure from 3000 p.s.i. to 5000 p.s.i.
[0005] As accumulators are used in deeper water, the efficiency of conventional accumulators is decreased. In 1000 feet of seawater the ambient pressure is approximately 465 p.s.i. For an accumulator to provide a 3000 p.s.i. differential at 1000 ft. depth, it must actually be pre charged to 3000 p.s.i. plus 455 p.s.i. or 3465 p.s.i.
[0006] At slightly over 4000 ft. water depth, the ambient pressure is almost 2000 p.s.i., so the precharge would be required to be 3000 p.s.i. plus 2000 p.s.i. or 5000 p.s.i. This would mean that the precharge would equal the working pressure of the accumulator. Any fluid introduced for storage would cause the pressure to exceed the working pressure, so the accumulator would be non-functional.
[0007] Another factor which makes the deepwater use of conventional accumulators impractical is the fact that the ambient temperature decreases to approximately 35 degrees F. If an accumulator is pre charged to 5000 p.s.i. at a surface temperature of 80 degrees F., approximately 416 p.s.i. precharge will be lost simply because the temperature was reduced to 35 degrees F. Additionally, the rapid discharge of fluids from accumulators and the associated rapid expansion of the pressurizing gas causes a natural cooling of the gas. If an accumulator is quickly reduced in pressure from 5000 p.s.i. to 3000 p.s.i. without chance for heat to come into the accumulator (adiabatic), the pressure would actually drop to 2012 p.s.i.
[0008] A fourth type accumulator has been developed which is one which is pressure compensated for depth, and is illustrated in the U.S. Pat. No. 6,202,753. This style operates effectively like a summing relay to add the nitrogen precharge pressure plus the ambient seawater pressure to the working fluid. This means that irrespective of the seawater depth (pressure), the working fluid will always have a greater pressure available for work by the amount of the nitrogen precharge.
[0009] This “pressure compensated” style has numerous advantages in addition to the pressure compensation. It allows lower gas pressures with associated safety, eliminates the need to recharge the system for differing operational depths, and eliminates expensive mistakes in setting the charge pressures.
[0010] The pressure compensated type has exhibited two disadvantages. First it has required a relatively high pressure seal between the nitrogen chamber and the working fluid chamber. Very smooth seal surfaces are required to seal the nitrogen at relatively high pressures, and nitrogen still will tend to leak past the seals during dynamic movement. Secondly, there is some chance that the liquids will go past the seals and into the nitrogen chamber on one end and into the vacuum chamber on the opposite end and prevent effective performance of the accumulator.
BRIEF SUMMARY OF THE INVENTION
[0011] The object of this invention is to provide a pressure compensated accumulator for deepwater ocean service which does not require a high pressure gas seal between a nitrogen chamber and an oil chamber..
[0012] A second object of the present invention is to provide a pressure compensated accumulator for deepwater ocean service which can prevent the accumulation of liquids in the vacuum chamber.
[0013] A third object of the present invention is to provide a pressure compensated accumulator for deepwater ocean service which can prevent the accumulation of liquids in the nitrogen chamber.
BRIEF DESCRIPTION OF SEVERAL VIEWS OF THE DRAWINGS
[0014]FIG. 1 is a partial section thru a subsea blowout preventer stack showing applications of principles of this invention.
[0015]FIG. 2 is a half section of an accumulator of the present invention.
[0016]FIG. 3 is a partial section of the top portion of the accumulator of this invention.
[0017]FIG. 4 is a partial section of the accumulator of this invention showing means to exhaust accumulated liquids from the nitrogen chamber.
[0018]FIG. 5 is a partial section of the accumulator of this invention showing the lower portion of the vacuum portion of the accumulator.
DETAILED DESCRIPTION OF THE INVENTION
[0019] Referring now to FIG. 1, a blowout preventer (BOP) stack 10 is landed on a subsea wellhead system 11, which is supported above mud line 12. The BOP stack 10 is comprised of a wellhead connector 14 which is typically hydraulically locked to the subsea wellhead system 1 1, multiple ram type blowout preventers 15 and 16, an annular blowout preventer 17 and an upper mandrel 18. A riser connector 19, and a riser 20 to the surface are attached for communicating drilling fluids to and from the surface.
[0020] Blowout preventer 16 shows that an accumulator 40 of this invention being connected to one of the outer cavities 41 thru line 42 and valve 43. If the valve 43 is opened, fluid pressure from accumulator 40 will move the ram 45 toward the center of the vertical bore (and seal against an opposing ram similarly moved). Accumulator 40 can be any of the types described in the description above.
[0021] Referring now to FIG. 2, accumulator 50 has an upper plate 51, a lower plate 52, a first cylinder 53, a second cylinder 54, a third cylinder 55, a fourth cylinder 56, connecting bolts 57, connecting nuts 58, and lifting eye 59.
[0022] First cylinder 53 has an upper bore 70, a lower bore 71, a bulkhead 72, a cylinder rod 73, an upper piston 74, and a lower piston 75. Fourth cylinder 56 has an upper bore 80, a lower bore 81, a bulkhead 82, a cylinder rod 83, an upper piston 84, and a lower piston 85.
[0023] Second cylinder 54 is empty except for pressurized gas and a valve assembly 90 near the bottom. Third cylinder 55 is empty except for pressurized gas.
[0024] Chambers 100, 101, 102, and 103 are pressurized with a gas such as nitrogen or helium. Chambers 115 and 116 contain a working fluid accessible thru ports 117 and 118.
[0025] Chambers 120 and 121 contain sea water and the resultant sea water pressure which comes in thru ports 122 and 123, respectively.
[0026] Chambers 130 and 131 contain a vacuum or may simply be allowed to have atmospheric pressure at the surface at assembly which will effectively be a vacuum in deep water.
[0027] Referring now to FIG. 3, upper plate 51 has port 140 communicating the top of first cylinder 53 with second cylinder 54, port 141 communicating fourth cylinder 56 with second cylinder 54, and port 142 communicating third cylinder 55 with second cylinder 54. As the top of all four cylinders are interconnected, the volumes of top of the four cylinders are combined to provide a gas spring on the top of the two pistons 74 and 84.
[0028] Pistons 74 and 84 contains seals 152 and 153 respectively to seal between the gas chamber 100 and 103 and the working fluid chambers 115 and 116.
[0029] Recesses 160 and 161 on the upper sides of pistons 74 and 84 serve to hold fluid 165 and 166. The retention of the fluid 165 and 166 in the recesses 160 and 161 serves to prevent the pressurized gas at 100 and 103 from tending to leak past the seals 152 and 153. As liquids are characteristically easier to seal than gasses, the insurance of liquids on both sides of the seal will improve the quality of the sealing.
[0030] If not for the recess, as piston 74 goes to the top of the stroke of cylinder 53, all of the liquid might be expelled thru port 140 and dumped into second cylinder 54. Likewise the liquid in the top portion of fourth cylinder 54 might be expelled thru port 141 into second cylinder 54.
[0031] Alternately, if during the service life of the accumulator, an excess amount of liquid from chamber 115 passes by seal 152 into chamber 100, the excess amount of liquid will be expelled into the second chamber 54 and excess liquids from fourth cylinder 56 will also be expelled into second cylinder 54.
[0032] Referring now to FIG. 4 a lower portion of second cylinder 54 is shown. When excess amount of fluid is vented into second cylinder 54, float 170 is raised pulling pin 171, link 172, and pin 173 up while pivoting up on shoulder 174. As pin 173 is pulled up valve 175 moves up and opens against spring 177. At this time the high gas pressure in chamber 101 pushes the excess liquid out until the float 170 lowers and allows the valve 175 to close. The excess liquid move out through check 180 to vent out port 182 to the ocean. The check 180 will then be closed by spring 181. In this way, a single valve assembly 90 can remove any excess fluids which may be vented past the seals on either piston 74 or 84.
[0033] Referring now to FIG. 5, a partial section of the bottom of cylinder 56 is shown. In this case a check valve 190 is provided with a spring 191. If the piston 192 is simply lowered to the bottom of the stroke by the pressure of the gas from the top of the upper piston 74, a high pressure will be generated in any liquid trapped at the bottom of the cylinder. The pressure will approximately be the sum of the pressure of the seawater entering port 122 plus the pressure of the gas in chamber 100. As the total pressure will exceed the seawater pressure (i.e. at port 122), any liquids in chamber 131 will be expelled past check valve 190.
[0034] In this way, the manufacturing convenience of a four cylinder accumulator bank is complimented with the ability to remove any collection of liquids by a single valve assembly 90, and each of the lower vacuum chambers can be purged by a simple check valve assembly.
[0035] The foregoing disclosure and description of this invention are illustrative and explanatory thereof, and various changes in the size, shape, and materials as well as the details of the illustrated construction may be made without departing from the spirit of the invention.
1. The method of providing a piston type accumulator with compressed gas in a first chamber on one side of a piston and hydraulic fluid in a second chamber on the opposite side of said piston and with a controlled depth liquid shield on the top of a piston separating said pressurized gas from the seals on said piston comprising providing a portion of the gas in a first portion of said first chamber above said piston and a portion of the gas in a second portion of said first chamber not above said piston such that excess liquids accumulating said first portion of said first chamber above the piston can be vented into said second portion of said second chamber for venting to a location outside of said first chamber.
2. The method of claim 1, further comprising the pressure in the gas above said piston is lower than the pressure of the liquids below said piston
3. The method of claim 1, using the gas pressure in said second portion of said first chamber to expel a portion of the excess liquids from said second portion of said first chamber.
4. The method of claim 3, using the level of the excess liquids in said second portion of said first chamber to raise a float to open a valve to allow the gas pressure in said second portion of said first chamber to expel the excel liquids from said second portion of said first chamber.
5. The method of claim 4, further comprising that before the level of the liquid is lowered enough to allow gas to be vented from said second portion of said first chamber, said float is lowered and allows said valve to close.
6. In an accumulator with compressed gas in a first chamber on one side of a piston and hydraulic fluid in a second chamber on the opposite side of said piston, the method of providing the accumulation of a desired amount of liquids on the compressed gas side of said piston to isolate the seals on said piston from direct contact with gas pressure, comprising providing a supply of liquids on top of said piston between said piston and said compressed gas, and providing a vent path which directs any excess accumulation of liquids out of said first chamber.
7. The method of claim 6, further comprising the pressure in the gas above said piston is lower than the pressure of the liquids below said piston
8. The method of claim 6, further comprising said first chamber being separated into a first portion of said first chamber above said piston and a second portion of said first chamber not above said piston.
9. The method of claim 8, using the gas pressure in said second portion of said first chamber to expel a portion of the excess liquids from said second portion of said first chamber.
10. The method of claim 9, using the level of the excess liquids in said second portion of said first chamber to raise a float to open a valve to allow the gas pressure in said second portion of said first chamber to expel the expel liquids from said second portion of said first chamber.
11. The method of claim 10, further comprising that before the level of the liquid is lowered enough to allow gas to be vented from said second portion of said first chamber, said float is lowered and allows said valve to close.
12. In an accumulator with compressed gas in a first chamber on one side of a piston and hydraulic fluids in a second chamber on the opposite side of said piston, the method of preventing the accumulation of liquid in excess of a predetermined amount on the compressed gas side of said piston, comprising providing a valve which opens in response to a fluid level in said first chamber being in excess of a predetermined level, and using the pressure of said compressed gas to purge said liquids from said first chamber through said valve to a location outside of said first chamber.
13. The method of claim 12, further comprising the pressure in the gas above said piston is lower than the pressure of the liquids below said piston
14. The method of claim 12, further comprising said first chamber being separated into a first portion of said first chamber above said piston and a second portion of said first chamber not above said piston.
15. The method of claim 14, wherein said valve is a float operated valve.
16. The method of claim 15, further comprising that before the level of the liquid is lowered enough to allow gas to be vented from said second portion of said first chamber, said float is lowered and allows said valve to close.
17. The method of claim 14, wherein said valve is operated by electricity, air pressure, or hydraulic pressure.
18. The method of claim 17, wherein said electricity, air, or hydraulic pressure provided to operate said valve is in response to a measure of the depth of the liquid in said second portion of said first chamber.
19. The method of claim 18 wherein said measure of depth is done acoustically.
20. The method of claim 18 wherein said measure of depth is done with a laser.
|
Justin Lawson
Profile
In the Line of Fire
In the Name of the Father
Let Her Eat Cake
Case appearances
* In the Line of Fire (Case #3 of Mysteries of the Past)
* In the Name of the Father (Case #6 of Mysteries of the Past)
* Let Her Eat Cake (Case #10 of Mysteries of the Past)
* Behind the Mask (Case #12 of Mysteries of the Past)
|
Kitchen from ChefDk 0.12 can't find chef-solo on OpenStack
$ kitchen converge
-----> Starting Kitchen (v1.6.0)
-----> Creating <server-centos-6>...
OpenStack instance with ID of <21117129-601c-4b5c-9927-eb816f3f9859> is ready.
Attaching floating IP from <ext-net> pool
Attaching floating IP <xxxxx>
Waiting for server to be ready...
Waiting for SSH service on xxxxxx:22, retrying in 3 seconds
....
Waiting for SSH service on xxxxxx:22, retrying in 3 seconds
[SSH] Established
Adding OpenStack hint for ohai
Finished creating <server-centos-6> (1m25.33s).
-----> Converging <server-centos-6>...
Preparing files for transfer
Preparing dna.json
Resolving cookbook dependencies with Berkshelf 4.3.0...
Removing non-cookbook files before transfer
Preparing environments
Preparing solo.rb
Transferring files to <server-centos-6>
sudo: /bin/chef-solo: command not found
>>>>>> Converge failed on instance <server-centos-6>.
>>>>>> Please see .kitchen/logs/server-centos-6.log for more details
Kitchen is looking for /bin/chef-solo, but it is /usr/bin/chef-solo:
$ kitchen login server-centos-6
Last login: Thu Apr 14 14:00:29 2016 from <IP_ADDRESS>
[centos@artem-pqlgbfav ~]$ whereis chef-solo
chef-solo: /usr/bin/chef-solo /opt/chef/bin/chef-solo
[centos@artem-pqlgbfav ~]$ rpm -qa | grep chef
chef-12.9.38-1.el6.x86_64
I see this problem only on Centos 6, Centos 7 works fine.
Used software versions:
$ dpkg -l | grep chefdk
ii chefdk 0.12.0-1 amd64 The full stack of chefdk
$ chef exec gem list | grep openstack
kitchen-openstack (3.0.0)
$ chef exec gem list | grep test-kitchen
test-kitchen (1.6.0)
Kitchen yml looks like this:
driver:
name: openstack
driver_config:
openstack_username: <%= ENV['OS_USERNAME'] %>
....
require_chef_omnibus: false
....
platforms:
- name: centos-6
driver_config:
image_ref: <%= ENV['CI_KITCHEN_SNAP'] || 'chef6-test' %>
transport:
username: <%= ENV['CI_KITCHEN_SNAP_USER'] || 'centos' %>
provisioner:
name: chef_solo
environments_path: test/environments
solo_rb:
environment: kitchen
suites:
....
Interesting thing, it was working with ChefDK 0.10 but with same gem versions:
....
Installing test-kitchen 1.6.0
....
Installing kitchen-openstack 3.0.0
....
Finished creating <server-centos-6> (1m2.88s).
-----> Converging <server-centos-6>...
Preparing files for transfer
Preparing dna.json
Resolving cookbook dependencies with Berkshelf 4.3.0...
Removing non-cookbook files before transfer
Preparing environments
Preparing solo.rb
Transferring files to <server-centos-6>
Starting Chef Client, version 12.2.1
....
@jjasghar any idea from your side?
If it's isolated to CentOS 6 in his environment, what version of CentOS 6 is it? 6.5? 6.7?
This would be a huge issue if it was global, but being only reported here, I'd like to rule out his specific image first before going any farther.
@jjasghar its the latest CentOS 6.7 with all updates (but custom built)
@artem-sidorenko What if you follow the instructions in chef shell-init to set up the paths for ChefDK usage? Do you still get the same issues?
@tyler-ball yes, I get the same issue
I can't reproduce it on virtualbox with Centos 6 and I see this problem now only on CentOS 6 within OpenStack. So I can't completely exclude some problem within our OpenStack image, still if it was working with chefdk 0.10. I have no further idea for troubleshooting, any hints/ideas?
As a workaround I simply repackaged the image with a symlink from /bin/chef-solo and it works.
I'm closing this one given the time passed and that it's most likely an issue with the base image - either way, most likely not a DK specific issue.
|
package com.ruoyi.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
/**
* 验证码表 sys_verification_code
*
* @author Li Dehuan
* @date 2019-07-10
*/
public class VerificationCode extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 验证码 */
private String veriCode;
/** 创建时间 */
private Date createTime;
/** 用户名 */
private String username;
/** 邮箱 */
private String email;
/** 有效时间 */
private Date vaildTime;
/** 有效值 */
private Integer vaild;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setVeriCode(String veriCode)
{
this.veriCode = veriCode;
}
public String getVeriCode()
{
return veriCode;
}
public void setCreateTime(Date createTime)
{
this.createTime = createTime;
}
public Date getCreateTime()
{
return createTime;
}
public void setUsername(String username)
{
this.username = username;
}
public String getUsername()
{
return username;
}
public void setEmail(String email)
{
this.email = email;
}
public String getEmail()
{
return email;
}
public void setVaildTime(Date vaildTime)
{
this.vaildTime = vaildTime;
}
public Date getVaildTime()
{
return vaildTime;
}
public void setVaild(Integer vaild)
{
this.vaild = vaild;
}
public Integer getVaild()
{
return vaild;
}
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("veriCode", getVeriCode())
.append("createTime", getCreateTime())
.append("username", getUsername())
.append("email", getEmail())
.append("vaildTime", getVaildTime())
.append("vaild", getVaild())
.toString();
}
}
|
Talk:Barbarians/@comment-30496115-20161222165320
Who removed the elixir cost?Just so you know:The Barbarians card costs 5 elixir to deploy.
|
# AVT-341-AirSim
Modified AVT-341 autonomy stack to be comptabile with AirSim simulation environment.
# How to buid?
To see all the dependecies and how to build please check out the main repo of AVT-341 at (https://github.com/CGoodin/avt_341).
# How to run?
Run AirSim using Unitiy Editor (Tested on UE4) with Lidar/Odometry data published with topic name as described in the main branch and then run the example.launch
|
stable/chartmuseum: Fix condition for setting schedulerName
What this PR does / why we need it:
Fixes configuring schedulerName for chartmuseum
Checklist
[x] DCO signed
[x] Chart Version bumped
[x] Title of the PR starts with chart name (e.g. [stable/mychartname])
thanks!
/lgtm
/ok-to-test
ICYMI keep an eye on https://github.com/kubernetes/autoscaler/pull/3403 and related. This chart will be moving upstream before too long.
|
These digger-wasps are of medium size. Some of them are remarkable for their close resemblance in form and mark ings to true wasps of the family Eumenidae ; but they do not plait their wings like the true wasps. Little is recorded re garding their habits ; some species provision their nests with nymphs of leaf-hoppers, others with spittle-insects (Homop tera). It is said that the species of the typical genus Nysson (Nys'son) have the habit of feigning death and dropping to the ground when alarmed.
of Cerceris (Cer-ce'ris) and shows the typical venation. The males are peculiar in having a fringe of hairs resembling a mustache on the free edge of the clypeus on each side.
The Philanthids burrow in the earth. Some provision their nests with bees ; others with beetles. The family con tains about seventy-five North American species.
|
Method of forming an ultra-uniform silicon-on-insulator layer
ABSTRACT
A method of forming a thin semiconductor layer having ultra-high thickness uniformity and upon which semiconductor structures can subsequently be formed is disclosed. The method comprises providing a primary substrate having a prescribed total thickness variation (TTV). A stack is formed upon the primary substrate for compressing thickness variation to be transferred into the thin semiconductor layer. An epitaxial silicon layer of a desired SOI thickness is formed upon the stack. The epitaxial silicon layer is then bonded to a mechanical substrate to form a bonded substrate pair, the mechanical substrate having a prescribed TTV and the bonded substrate pair having a combined TTV equal to the sum of the T TVs of the primary and mechanical substrates, respectively. The primary substrate is subsequently removed, wherein the combined TTV of the bonded substrate pair is transferred and compressed into the stack by a first compression amount. The stack is thereafter removed, wherein the combined TTV of the bonded substrate pair is further transferred and compressed a second compression amount into said epitaxial silicon layer, whereby said epitaxial silicon layer remains on said mechanical substrate to form the semiconductor layer of ultra-high thickness uniformity, the thickness uniformity being a controlled function of the first and second compression amounts.
BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to a method of forming a silicon-on-insulator structure, and more particularly, an ultra-uniform bond and etch back silicon-on-insulator semiconductor layer.
2. Discussion of the Related Art
Silicon-on-insulator (SOI) technology provides a promising method for fabrication of very large scale integration (VLSI) integrated circuits, in which the dimensions of transistors and other semiconductor structures are below one micrometer. SOI technology addresses a host of problems associated with VLSI, for example, providing greater isolation between devices. For CMOS applications, this isolation must prevent latch-up and at the same time, must not be provided at the expense of available chip space. Furthermore, the threshold voltage of CMOS devices critically depends on the thickness and uniformity of the SOI layer. New high performance CMOS device and circuit designs are based upon SOI material which is not only exceedingly thin, i.e., 100-200 nm thick, but also exceedingly uniform, i.e., within a few nanometers, across a silicon wafer of 4-8" in diameter.
One method of forming an SOI substrate includes bond and etch back silicon-on-insulator (BESOI) technology. A BESOI substrate is formed by oxidizing a handle wafer and/or a seed wafer, followed by bonding the two wafers. The active device region is generated on the seed wafer by lapping and etching to the desired silicon film thickness. BESOI technology thus provides a clean oxide/silicon interface with a minimal amount of defects and charge trapping states in the buried oxide. While this technology is suitable for the fabrication of 600 nm SOI, the presence of an etch stop is required to achieve SOI wafers with a nominal thickness of 500 nm or less.
Another method for producing a thin SOI semiconductor layer from a wafer structure comprising a silicon layer, an oxide isolation layer, and a handle wafer, is to etch trenches through the silicon layer down to the underlying oxide isolation layer. Polish stop pads (or etch stop pads) of a desired thickness are then formed or deposited within the trenches. The thickness of the polish stop pads corresponds to the desired resultant SOI semiconductor layer thickness. The silicon layer is then polished down, the polishing being stopped at the polish stop pads. The remaining silicon positioned between polish stop pads forms the SOI semiconductor layer of desired thickness upon which semiconductor device may subsequently be formed. Disadvantages of this method include the need for optimizing the pattern factor associated with the locations of the polish stop pads in the silicon layer. The pattern factor is critical. For example, spacing of polish stop pads too far from one another can cause dish-out or non-uniformity effects in the polished silicon. Such dish-out or non-uniformity is highly undesirable. On the other hand, having too large a pattern factor, i.e., too many polish stop pads, reduces the amount of available SOI semiconductor layer. In the latter instance, thin uniform SOI is obtainable, but not over the entire area of the wafer.
Another example of an etch stop for achieving SOI wafers with a nominal thickness of 500 nm or less has been providing a heavily doped boron region placed by diffusion or implantation into the silicon. Most of the silicon substrate underlying the boron doped etch stop region is removed by grinding and polishing and a remainder portion thereof is selectively etched using an etchant consisting of ethylene diamine and pyrocatechol. With this etchant, nominal selectivity ratios of 1000:1 are reported for etch rates of undoped silicon compared to the etch rate of the very heavily doped boron etch stop region. A disadvantage of using a heavily doped boron region however is that boron is a p-type dopant in silicon. Additionally, both implantation and diffusion of boron results in residual p-type doping of the silicon film. Still further, boron incorporated by ion implantation and annealing results in the generation of threading dislocations in the device region. Performance of devices made from these SOI materials is undesirably compromised thereby. Most of all, the etch stop layer or region created by diffusion or implantation is by its creation, broad and diffuse, and, when used as described above, results in an SOI layer which is neither thin nor uniform across the entire silicon wafer.
Another method of forming a thin SOI semiconductor layer involving the use of an etch stop layer is disclosed in U.S. Pat. No. 5,013,681 issued to Godbey et al. on May 7, 1991. The method of the '681 patent includes forming a strained silicon germanium (SiGe) etch-stop layer upon a silicon substrate, forming a silicon cap layer upon the strained etch-stop layer, and bonding the silicon cap layer to a mechanical substrate. The silicon substrate and the strained etch stop layer are then removed without removing underlaying portions of the silicon cap layer, whereby the underlaying portions of the silicon cap layer remain on the mechanical substrate to form the thin SOI layer. A disadvantage of using the strained SiGe etch stop layer is that the selectivity of strain sensitive etchants is small and ultra-uniform SOI is thereby not obtainable.
Additionally, the '681 patent teaches a method of using a strained SiGe etch stop layer on top of an ion implanted boron etch stop layer to cap and prevent boron diffusion into the SOI layer, thus enabling higher selectivity etchants, available for boron etch stop layers, to be used. Because of the ion implanted nature of the boron etch stop layer, the etch stop is broad and diffuse, and thus the resulting SOI layer is not exceedingly uniform. Furthermore, the ion implanted layer has dislocations and defects which ultimately get transferred into the SOI layer.
The major inadequacy of the methods of the '681 patent and earlier methods in attaining ultra thin and extremely uniform SOI arises from the fact that commercially available silicon wafers used as the starting substrates are not of exactly uniform thickness across their diameters, typically varying by 10 to 20 microns across a five inch diameter wafer with a nominal thickness of 600 microns. This initial thickness variation is disadvantageously transferred into the silicon cap layer. For example, with an etch rate selectivity ratio of 1:1000 and an initial thickness variation in a bonded silicon wafer pair of 20 microns, the final SOI thickness variation may be theoretically expected to be no better than 20 nm (i.e., 20 μm/1000=20 nm). For ultra-thin SOI thicknesses of 0.1 μm or less, this final thickness variation of 20 nm is unacceptable.
While use of such highly selective etchants seems desirable in actual practice, there are drawbacks associated with them. The highly selective etchants are invariably anisotropic and often produce faceted or rough surfaces. Rough surfaces are highly undesirably for CMOS applications. Furthermore, highly selective etchants, such as ethylene diamine and pryocatechol have been judged to be unduly hazardous. Ethylene diamine is reported to cause allergic respiratory sensitization and pyrazine is described as a toxic corrosive. The use of these etchants in a high volume manufacturing process creates undue risk during their use and subsequent disposal thereof.
It is therefore desirable to provide a method of producing an SOI layer using etchants such as potassium hydroxide (KOH) or ammonium hydroxide (NH₄ OH) which have lower etch selectivities in the range of 500:1 to 100:1 and which do not pose significant health and environmental hazards.
It is further desirable to provide a method for forming an SOI semiconductor layer which is highly uniform and suitable for ultra-thin SOI structures. Such a method should provide for good thickness control for producing an SOI semiconductor layer having a thickness variation of a few nanometers. Such a method should also be suitable for use in large scale manufacturing of SOI wafers using commercially available silicon substrates and environmentally compatible etch chemistries.
SUMMARY OF THE INVENTION
An object of the present invention is to provide an improved silicon-on-insulator (SOI) process.
Another object of the present invention is to provide a silicon-on-insulator process by which the thickness of the SOI semiconductor layer is substantially uniform, having a thickness variation of less than 10 nm.
Yet another object of the present invention is to provide a process that is well suited for large scale manufacturing of SOI wafers.
According to the invention, a method of forming a thin SOI semiconductor layer having ultra-high thickness uniformity, and upon which semiconductor structures can subsequently be formed, comprises the following. A primary substrate having a total thickness variation within a specified range is provided. A thickness variation compression stack is formed upon said primary substrate, the thickness variation compression stack comprising a first strain-free etch stop layer and at least one intermediate layer pair formed upon the first strain-free etch stop layer, each of the at least one intermediate layer pair comprising a spacer layer and a subsequent strain-free etch stop layer formed upon the spacer layer. An epitaxial silicon layer of a desired thickness is formed upon the stack. The epitaxial silicon layer of the primary substrate is then bonded to a mechanical substrate to form a bonded substrate pair, the mechanical substrate having a prescribed total thickness variation within a specified range and the bonded substrate pair having a combined total thickness variation equal to the sum of the total thickness variations of the primary and mechanical substrates, respectively. The primary substrate is then removed, wherein the combined total thickness variation of the bonded substrate pair is transferred by a first compression amount into the stack. The stack is then removed, wherein the combined thickness variation of the bonded substrate pair is further transferred and compressed a second compression amount into the epitaxial silicon layer, whereby the epitaxial silicon layer remains on the mechanical substrate to form the SOI semiconductor layer of ultra-high thickness uniformity, the thickness uniformity being a function of the first and second compression amounts.
BRIEF DESCRIPTION OF THE DRAWINGS
The foregoing and other structures and teachings of the present invention will become more apparent upon a detailed description of the best mode for carrying out the invention as rendered below. In the description to follow, reference will be made to the accompanying drawings, in which:
FIG. 1 is a cross-sectional view of a primary wafer used in accordance with the method of the present invention, the primary wafer comprising a primary silicon substrate having a thickness variation compression stack and an epitaxial layer thereon;
FIG. 2 is a cross-sectional view of the primary wafer of FIG. 1 positioned above a mechanical support substrate or handle wafer prior to being bonded to the same;
FIG. 3 is a cross-sectional view of the primary wafer of FIG. 1 bonded to the mechanical support;
FIG. 4 is a cross-sectional view of the mechanical support substrate with the primary silicon substrate substantially removed;
FIG. 5 is a cross-sectional view of the mechanical support substrate with the primary silicon substrate completely removed;
FIG. 6 is a cross-sectional view of the mechanical support substrate with an uppermost strain-free etch stop layer removed;
FIG. 7 is a cross-sectional view of the mechanical support substrate with an uppermost spacer layer removed; and
FIG. 8 is a cross-sectional view of the mechanical support substrate with the overlaying portions of the epitaxial layer removed.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
As explained in the background section, the thickness uniformity and integrity of a thin SOI layer is effected by the method of making the same. In addition, the method of producing a thin SOI layer should be highly suitable for high volume manufacturing. Because bond and etch back techniques are known in the art, the present description will be directed in particular to elements and processes forming part of, or cooperating directly with, the novel method according to the present invention. Elements and processes not specifically shown or described herein may be selected from those known in the art.
Referring now to FIG. 1, the method of the present invention begins with the processing of a primary wafer 100 comprising a first semiconductor substrate or primary silicon substrate 10. Primary substrate 10 can comprise, for example, a P⁻ or an N⁻, 5 inch diameter silicon substrate, such as commercially available from Shin-Etsu Handotai (S.E.H.) of Tokyo, Japan. Such a commercially available substrate is of a desired thickness, for example 500-600 μm, with a typical or nominal thickness uniformity tolerance of 10 to 20 μm. In other words, the total thickness variation (TTV) of primary substrate 10 can be as much as 20 μm, as shown representatively in FIG. 1 by the non-horizontal surface 11 of primary substrate 10. Substantial reduction of this TTV in the primary substrate 10 cannot be accomplished by commercially available techniques of grinding and polishing, since grinding typically introduces the thickness non-uniformity of 10 to 20 μm.
As will be further understood herein below, a mechanical substrate 30 is provided, as shown in FIG. 2, for subsequent wafer bonding with the primary substrate 10. Mechanical substrate 30 preferably comprises an original silicon substrate 30, similar to primary substrate 10, for example, a P⁻ or an N⁻, 5 inch diameter silicon substrate, such as commercially available from S.E.H. of Tokyo, Japan. Substrate 30 is of a desired thickness on the order of 500-650 μm with a typical or nominal thickness uniformity tolerance of 10 to 20 μm. In other words, the total thickness variation (TTV) of handle substrate 30 can be as much as 20 μm, as shown representatively in FIG. 2 by the non-horizontal surface 31 of substrate 30. Substrate 30 may likewise comprise an original germanium substrate or any other suitable substrate.
The TTV of primary substrate 10 and the TTV of mechanical substrate 30 must be compensated for, particularly, in the manufacture of an ultra-thin SOI silicon layer, and at the same time, keep defects to a minimum. Uniform thickness and minimal defects in the SOI silicon layer are not only highly desirable, but necessary for optimal device performance of the sub-half micron devices manufactured therewith.
In accordance with the present invention, a thickness variation compression stack 12 is formed upon the primary substrate 10 for compressing thickness variation introduced into semiconductor layer 14, the thickness variation being attributable to a combined total thickness variation of primary substrate 10 and mechanical substrate 30. Thickness variation compression stack 12 comprises a first strain-free etch stop layer 20 formed upon a top surface of primary substrate 10. At least one intermediate layer pair 22, comprising a spacer layer 24 and a strain-free etch stop layer 26, is formed upon the first strain-free etch stop layer 20. While only one intermediate layer pair 22 is shown, it will be understood that more than one intermediate layer pair 22 may be included in the thickness variation compression stack 12, as desired, for achieving a particular thickness uniformity.
In further detail of the formation of thickness variation compression stack 12, a first strain-free etch stop layer 20 is formed upon a top surface of primary substrate 10. Strain-free etch stop layer 20 comprises an abrupt, well-defined, etch stop layer which is epitaxially grown by low temperature techniques known in the art, such as, gas source molecular beam epitaxy (MBE), ultra high vacuum chemical vapor deposition (UHVCVD), or low temperature atmospheric pressure (AP) CVD. For example, layer 20 is grown at temperatures between 500° C. to 650° C. Layer 20 is further highly doped with boron but is made strain-free by co-doping with germanium. Additionally, layer 20 is of highly uniform thickness.
Strain-free etch stop layer 20 contains minimal defects. Preferably, first strain-free etch stop layer 20 comprises a boron/germanium strain compensated etch stop layer. Boron dopant in epitaxial silicon compresses the epitaxial silicon while germanium dopant in epitaxial silicon expands the same. To achieve a strain-free or strain compensated etch stop layer, the boron/germanium dopant concentration of strain-free etch stop layer 20 preferably comprises boron in the range of 1×10²⁰ atoms/cm³ to 5×10²⁰ atoms/cm³ compensated by 0.5% to 2.5% germanium, respectively.
Such a strain-free etch stop layer 20 is to be contrasted and distinguished from a "strained" silicon/germanium etch stop layer. A disadvantage of "strained" etch stop layers is that they cannot be used as a superlattice or in a sequence of multiple etch stop layers, since the "strained" etch stop layers, when stacked and if the total thickness exceeds a certain critical thickness, break down and result in defects and dislocations. For Si₀.7 Ge₀.3, the critical thickness is only about 60 nm. "Strain-free" etch stop layers, on the other hand, can be used in a sequence of multiple etch stop layers without any limit to their thickness or number.
As will be further understood from the discussion to follow herein below, the thickness of strain-free etch stop layer 20 is chosen to be at least thick enough to compensate for the effect of the combined total thickness variation of the primary substrate 10 and mechanical substrate 30 bonded pair, and further in light of the selectivity of the etchant chosen for use in the subsequent removal of the primary substrate 10. In other words, the subsequent removal of the primary substrate 10 will cause the combined total thickness variation of the primary substrate 10 and mechanical substrate 30 bonded pair to be transferred into the strain-free etch stop layer 20 by a certain amount, resulting in an introduced thickness variation into layer 20. Thus, according to the present invention, the thickness of strain-free etch stop layer 20 is, at a minimum, equal to the combined total thickness variation of the primary substrate 10 and mechanical substrate 30 bonded pair divided by the selectivity of the etchant used for subsequent etching of primary substrate 10. In practice, the thickness of strain-free etch stop layer 20 is greater than or equal to the above minimum thickness, and more preferably, greater than the minimum thickness by a factor of 3 to 5 to allow for variations of etch conditions and for smoothing of surfaces, to be discussed further herein below.
Upon a top surface of strain-free etch stop layer 20 is formed at least one intermediate layer pair 22 as indicated above, each intermediate layer pair 22 comprising a spacer layer 24 and a strain-free etch stop layer 26. Spacer layer 24 preferably comprises an intrinsic silicon layer and is formed by any suitable method known in the art. The thickness of spacer layer 24 is selected to be at least thick enough to compensate for the effects of the introduced thickness variation of the strain-free etch stop layer 20 and further in light of the subsequent removal of strain-free etch stop layer 20. The thickness of spacer layer 24, at a minimum, is equal to the introduced thickness variation of strain-free etch stop layer 20 divided by the selectivity of the etchant used for subsequent removal of strain-free etch stop layer 20. In other words, the subsequent removal of the layer 20 will cause the introduced thickness variation of layer 20 to be transferred into the spacer layer 24 by a certain amount, resulting in an introduced thickness variation into layer 24. In practice, the thickness of spacer layer 24 is selected to be 1 to 5 times the thickness of the first strain-free etch stop layer 20 to compensate for any effects of a dopant tail, typically on the order of 25 nm, extending into spacer layer 24 resulting from etch stop layer 20, to be discussed further herein below.
The thickness of strain-free etch stop layer 26 is similarly chosen, in that, it is to be at least thick enough to compensate for the effects of the introduced thickness variation of spacer layer 24 and further in light of the selectivity of the etchant chosen for use in the subsequent removal of the spacer layer 24. The thickness of strain-free etch stop layer 26, at a minimum, is equal to the total thickness variation of spacer layer 24 divided by the selectivity of the etchant used for subsequent removal of spacer layer 24. In practice, the thickness of strain-free etch stop layer 26 is greater than or equal to the above minimum thickness, and more preferably, greater than the minimum thickness by a factor of 3 to 5 to allow for variations of etch conditions and for smoothing of surfaces as a result of etchant roughening, to be discussed further herein below. Should the minimum thickness be chosen, however, a critical etch would be necessary in the subsequent removal of the etch stop layer 26.
Upon a top surface of the at least one intermediate layer pair 22 of thickness variation compression stack 12 is formed silicon layer 14 of a desired SOI thickness. Silicon layer 14 is epitaxially grown by similar low temperature epitaxial techniques as used to grow the strain-free etch stop layers.
Primary wafer 100 is then flipped over and wafer bonded to a secondary or handle wafer 110 as shown in FIGS. 2 and 3. Wafer bonding is well known in the art and only briefly discussed herein. Handle wafer 110 preferably comprises substrate 30, as previously discussed, and further having an oxide layer 32 formed on a top surface of substrate 30. Primary wafer 100 is placed in contact with handle wafer 110 such that silicon layer 14 is in intimate contact with oxide layer 32. Wafers 100 and 110 are then subjected to a heat treatment for a predetermined period of time until the oxide layer 32 and the silicon layer 14 bond together, as shown in FIG. 3 to form bonded wafer pair 120. This heat treatment should be at temperatures low enough to prevent significant thermal diffusion of boron from the strain-free etch stop layers. The temperatures are no more than 800° C., and more preferably below 700° C. The resultant TTV of the bonded wafer pair 120, comprising primary wafer 100 and handle wafer 110, is the sum of the individual T TVs of primary substrate 10 and handle substrate 30, as shown representatively in FIG. 3 by the non-horizontal surface 33.
Subsequent to bonding the primary wafer 100 to handle wafer 110, the primary substrate 10 is removed. Removal of primary substrate 10 is accomplished in preferably two steps, that is, grinding approximately 80 to 90 percent of the primary substrate 10 and thereafter selectively etching a remaining portion of the primary substrate 10. Removal of a substantial portion of primary substrate 10 can be accomplished by subjecting the structure as shown in FIG. 3 to a conventional sequence of grinding, lapping, wet etching, and/or chemical mechanical polishing to substantially reduce the thickness of primary substrate 10 preferably by 80-90% of the original thickness. The remainder portion of substrate 10, as shown in FIG. 4, preferably comprises a thickness of at least equal to approximately twice the total thickness variation of the bonded wafer pair 120 of primary substrate 10 and handle substrate 30. In this manner, grinding into the first strain-free etch stop layer 20 is advantageously avoided. For example, if primary substrate 10 comprises a substrate having an original thickness of 600 μm with a total thickness variation of ±20 μm and handle substrate 30 has a total thickness variation of ±20 μm, then it is desirable to grind at most 560 μm. In this manner, a remainder portion of substrate 10 comprises at least 40 μm±40 μm, thereby avoiding grinding into the underlying layer. Total thickness variation in the remainder portion of primary substrate 10 thus comprises the TTV of the bonded wafer pair 120, as represented by the dashed line identified by the numeral 40 in FIG. 4.
As indicated above, the remainder portion of primary substrate 10 is selectively etched to remove the same. The etch preferably comprises an etchant having an etch selectivity of 500:1 or below (e.g., 500:1, 200:1, 100:1, 50:1). Additionally, the etch is chosen, in part, according to the design of the compression stack 12 (i.e., the number of intermediate layer pairs and the selectivity of etchants to be used in the removal of the layers of stack 12) and the desired resultant total thickness variation in the SOI silicon layer. According to the above example, for a TTV of the bonded wafer pair of 40 μm and an etch selectivity of 100:1, the amount by which the TTV of the bonded wafer pair will be transferred and compressed into stack 12, and more particularly, strain-free etch stop layer 20, is an amount equal to approximately 400 nm (i.e., 40 μm/100). In this example, the thickness of strain-free etch stop layer 20 must have been selected to be greater than or equal to the above noted transferred and compressed amount of 400 nm. In regards to the earlier discussion of the formation of etch stop layer 20, it is preferable to select the thickness of etch stop layer 20 to be 3 to 5 times this amount of 400 nm to allow for variations of etch conditions and for smoothing of the etched surface. Thus, etch stop layer 20 is 1200 to 2000 nm thick. The transferred and compressed thickness variation amount into stack 20 and, more particularly, strain-free etch stop layer 20 is shown representatively in FIG. 5 by the dashed lined indicated by numeral 42.
The thickness variation compression stack 12 is thereafter removed, wherein the total thickness variation 40 of the bonded wafer pair 120 is transferred and compressed a compression amount into the epitaxial silicon layer 14. The compression amount representative of the thickness variation in the silicon layer 14 is shown in FIG. 8 as indicated by the dashed line numbered 48.
Referring now to FIG. 5, removal of stack 12 begins with the removal of first strain-free etch stop layer 20. Preferably, strain-free etch stop layer 20 is removed by a low-selectivity etch having a selectivity of 10:1 or below, further characterized by leaving the etched surface smooth, wherein the thickness variation 40 of the bonded wafer pair 120 is further transferred and compressed an amount into the at least one intermediate layer pair 22, and more particularly, an uppermost spacer layer 24. According to the above example, for a TTV of 400 nm in the layer 20 and an etch selectivity of 10:1, the amount by which the TTV will be transferred and compressed into layer 24 is an amount equal to approximately 40 nm (i.e., 400 nm/10). This transferred and compressed thickness variation amount is shown representatively in FIG. 6 by the dashed line indicated by numeral 44.
Referring to FIG. 6, removal of the at least one intermediate layer pair 22 comprises for each layer pair, the removal of spacer layer 24 followed by the removal of underlying strain-free etch stop layer 26. Removal of spacer layer 24 preferably comprises selectively etching spacer layer 24 to remove the same with an etchant having an etch selectively of 500:1 or below. Removal of spacer layer 24 causes the thickness variation 40 of the bonded wafer pair 120 to be further transferred and compressed an amount into the underlying strain-free etch stop layer 26. Following the above example, for a TTV of 40 nm in the spacer layer 24 and an etch selectivity of 100:1, the amount by which the TTV will be transferred an into layer 26 is an amount equal to approximately 0.4 nm (i.e., 40 nm/100). This transferred and compressed thickness variation amount is shown representatively in FIG. 7 by the dashed line indicated by numeral 46.
Strain-free etch stop layer 26 of the at least one intermediate layer pair 12 is then removed by a low-selectivity etch having a selectivity of 10:1 or below, wherein the TTV 40 of the bonded wafer pair 120 is yet still further transferred and compressed an amount into the SOI epitaxial silicon layer 14. In following the example presented above, for a TTV of 0.4 nm in layer 26 and an etch selectivity of 10:1, the amount by which the TTV will be transferred and compressed into silicon layer 14 is an amount equal to approximately 0.04 nm (i.e., 0.4 nm/10). This transferred and compressed thickness variation amount is shown representatively in FIG. 8 by the dashed line indicated by numeral 48. The resultant silicon layer 14 produced thereby forms the SOI layer of ultra-high thickness uniformity.
In an alternate embodiment, the method comprises similar steps as in the preferred embodiment with the following difference in that the strain-free etch stop layers 20 and 26 are removed non-selectively. Non-selective removal of the strain-free etch stop layers 20 and 26 can be by high pressure oxidation and stripping techniques, known in the art. For example, strain-free etch stop layers 20 and 26 may be exposed to suitable oxygen and pressure conditions to oxidize the same and then be dipped in a stripping hydrofluoric (HF) acid solution for removal of the oxidized layers.
There is thus provided a novel method for forming an SOI layer having ultra-high thickness uniformity, crystal perfection, and integrity. The present method utilizes selective etchants suitable for the use in high volume manufacturing. In addition, a desired thickness uniformity can be obtained by an appropriate formulation of the thickness variation compensation stack (i.e., selection of strain-free etch stop layer and spacer layer thicknesses and the number of intermediate layer pairs) and the etchants selected for removal of the same.
While the invention has been particularly shown and described with reference to the preferred embodiment thereof, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention. For instance, bonding of the primary wafer to the handle wafer may include forming a thin oxide layer upon a top surface of SOI silicon layer 14. The oxide layer can comprise a pyrolytically deposited, CVD oxide, or sputtered oxide, upon silicon layer 14, thus eliminating silicon consumption.
What is claimed is:
1. A method of forming a semiconductor layer having ultra-high thickness uniformity and upon which semiconductor structures can subsequently be formed, comprising the steps of:a) providing a primary substrate having a prescribed total thickness variation; b) forming a stack upon said primary substrate for compressing thickness variation to be transferred into the semiconductor layer, said thickness variation compression stack comprising a first strain-free etch stop layer and at least one intermediate layer pair formed upon said first strain-free etch stop layer, said at least one intermediate layer pair each comprising a spacer layer and a subsequent strain-free etch stop layer formed upon said spacer layer; c) forming an epitaxial silicon layer of a desired thickness upon said stack; d) bonding said epitaxial silicon layer to a mechanical substrate to form a bonded substrate pair, said mechanical substrate having a prescribed total thickness variation and said bonded substrate pair having a combined total thickness variation equal to the sum of the respective total thickness variations of said primary and said mechanical substrates; e) removing said primary substrate, wherein the combined thickness variation of said bonded substrate pair is transferred and compressed into said stack a first compression amount; and f) removing said stack, wherein the combined thickness variation of said bonded substrate pair is further transferred and compressed a second compression amount into said epitaxial silicon layer, whereby said epitaxial silicon layer remains on said mechanical substrate to form the semiconductor layer of ultra-high thickness uniformity, the thickness uniformity being a controlled function of said first and second compression amounts.
2. The method of claim 1, wherein said first strain-free etch stop layer comprises a boron/germanium strain compensated etch stop layer, said spacer layer of each said at least one intermediate layer pair comprises an intrinsic silicon layer, and said strain-free etch stop layer of each said at least one intermediate layer pair comprises a boron/germanium strain compensated etch stop layer.
3. The method of claim 1, wherein said first strain-free etch stop layer comprises a boron/germanium strain compensated etch stop layer having a dopant concentration of boron in the range of 1×10²⁰ atoms/cm³ to 5×10²⁰ atoms/cm³ compensated by 0.5% to 2.5% germanium, respectively, and said stain-free etch stop layer of each said at least one intermediate layer pair comprises a boron/germanium strain compensated etch stop layer having a dopant concentration of boron in the range of 1×10²⁰ atoms/cm³ to 5×10²⁰ atoms/cm³ compensated by 0.5% to 2.5% germanium, respectively.
4. The method of claim 1, wherein step e) comprises grinding approximately 80 to 90 percent of said primary substrate to provide a remainder portion thereof and thereafter selectively etching the remainder portion of said primary substrate with an etch having a selectivity of 500:1 or below.
5. The method of claim 1, wherein step f) comprises f₁) removing said first strain-free etch stop layer with a low-selectivity etch having a selectivity of 10:1 or below, followed by f₂) removing said at least one intermediate layer pair, the removal of said at least one intermediate layer pair comprising, for each intermediate layer pair, the steps of f₂ a) removing said spacer layer and f₂ b) etching said strain-free etch stop layer with a low-selectivity etch having a selectivity of 10:1 or below.
6. The method of claim 5, further wherein the step f₂ a) of removing said spacer layer of each said at least one intermediate layer pair comprises selectively etching said spacer layer with an etch having a selectivity of 500:1 or below.
7. The method of claim 1, wherein step f) comprises f₁) removing said first strain-free etch stop layer with a non-selective etch followed by f₂) removing said at least one intermediate layer pair, the removal of said at least one intermediate layer pair comprising, for each intermediate layer pair, the steps of f₂ a) removing said spacer layer and f₂ b) etching said strain-free etch stop layer with a non-selective etch.
8. The method of claim 7, further wherein the step f₂ a) of removing said spacer layer of each said at least one intermediate layer pair comprises selectively etching said spacer layer with an etch having a selectivity of 500:1 or below.
9. The method of claim 7, further wherein the steps of f₁) and f₂ b) comprise non-selectively etching by high pressure oxidation and stripping.
10. The method of claim 1, wherein said at least one intermediate layer pair of step b) comprises one pair.
11. A method of forming a Silicon-On-Insulator (SOI) semiconductor layer having ultra-high thickness uniformity and upon which semiconductor structures can subsequently be formed, comprising the steps of:a) providing a primary substrate having a prescribed total thickness variation; b) forming a stack upon said primary substrate for compressing thickness variation to be transferred into the SOI semiconductor layer, said thickness variation compression stack comprising a first strain-free etch stop layer having a dopant concentration of boron in the range of 1×10²⁰ atoms/cm³ to 5×10²⁰ atoms/cm³ compensated by 0.5% to 2.5% germanium, respectively, and at least one intermediate layer pair formed upon said first strain-free etch stop layer, said at least one intermediate layer pair each comprising a spacer layer and a subsequent strain-free etch stop layer having a dopant concentration of boron in the range of 1×10²⁰ atoms/cm³ to 5×10²⁰ atoms/cm³ compensated by 0.5% to 2.5% germanium, respectively, formed upon said spacer layer; c) forming an epitaxial silicon layer of a desired SOI thickness upon said stack; d) bonding said epitaxial silicon layer to a mechanical substrate to form a bonded substrate pair, said mechanical substrate having a prescribed total thickness variation and said bonded substrate pair having a combined total thickness variation equal to the sum of the respective total thickness variations of said primary and said mechanical substrates; e) removing said primary substrate, wherein the combined thickness variation of said bonded substrate pair is transferred and compressed into said stack a first compression amount; and f) removing said stack, wherein the combined thickness variation of said bonded substrate pair is further transferred and compressed a second compression amount into said epitaxial silicon layer, whereby said epitaxial silicon layer remains on said mechanical substrate to form the SOI semiconductor layer of ultra-high thickness uniformity, the thickness uniformity being a controlled function of said first and second compression amounts.
12. The method of claim 11, wherein step e) comprises grinding approximately 80 to 90 percent of said primary substrate to provide a remainder portion thereof and thereafter selectively etching the remainder portion of said primary substrate with an etch having a selectivity of 500:1 or below; and step f) comprises f₁) removing said first strain-free etch stop layer with a low-selectivity etch having a selectivity of 10:1 or below, followed by f₂) removing said at least one intermediate layer pair, the removal of said at least one intermediate layer pair comprising, for each intermediate layer pair, the steps of f₂ a) removing said spacer layer and f₂ b) etching said strain-free etch stop layer with a low-selectivity etch having a selectivity of 10:1 or below.
13. The method of claim 12, further wherein the step f₂ a) of removing said spacer layer of each said at least one intermediate layer pair comprises selectively etching said spacer layer with an etch having a selectivity of 500:1 or below.
14. The method of claim 11, wherein step e) comprises grinding approximately 80 to 90 percent of said primary substrate to provide a remainder portion thereof and thereafter selectively etching the remainder portion of said primary substrate with an etch having a selectivity of 500:1 or below; and step f) comprises f₁) removing said first strain-free etch stop layer with a non-selective etch followed by f₂) removing said at least one intermediate layer pair, the removal of said at least one intermediate layer pair comprising, for each intermediate layer pair, the steps of f₂ a) removing said spacer layer and f₂ b) etching said strain-free etch stop layer with a non-selective etch.
15. The method of claim 14, further wherein the step f₂ a) of removing said spacer layer of each said at least one intermediate layer pair comprises selectively etching said spacer layer with an etch having a selectivity of 500:1 or below.
16. The method of claim 14, further wherein the steps of f₁) and f₂ b) comprise non-selectively etching by high pressure oxidation and stripping.
17. The method of claim 11, wherein said at least one intermediate layer pair of step b) comprises one pair.
|
Remove gcc checking for the vte package
Remove gcc checking for the vte package. Change targeted adding qemu to the build.
This change is related with adding qemu to the SpectrumOS build under the same branch name on the spectrum repo. It's designated for development purposes only, not for the release build.
|
Custom validator, not being executed when used in a form
i have created a custom validator but when I want to use it, it seems that it is never executed!
the validator :
class sfTestUrlValidator extends sfValidatorUrl {
public function initialize($context, $parameters = null) {
// Initialize parent
parent::initialize($context);
}
public function execute(&$value, &$error) {
if($value == "http://www.librosweb.es/")
{
//$error = "noooooooooooooo";
return true;
}
else return false;
}
}
in the configure method of a form, i do like that :
public function configure() {
.....
....
'url' => new sfTestUrlValidator(),
it seems you missed a space between "sfTestUrlValidator" and "extends". Make sure you use copy/paste and don't rewrite everthing by hand when you share some code.
You need to override sfValidatorBase::doClean method and not some not-existent execute method and throw exception intead of returning true/false. Have a look at any validator class, e.g. sfValidatorString. However in your case, I would simply use sfValidatorChoice with one choice
public function configure()
{
'url' => new sfValidatorChoice(array('choices' => array(
'your.website.url',
)));
}
if i use the doClean() method, i will not use the sfValidatorUrl functionality, for example in this case(with doClean) if i answer a "non url" string, it will be accepted! which is WRONG, You see?
and for the choicevalidator , the code i listed is just an example, my url test will be executed on several servers and then if it doesn't exist on any of them, it wont allow to insert it(cause later it will fire exceptions)
I used the doClean method and added the protected function doClean($value) { $value = parent::doClean($value); ....
|
Talk:Dark Solar Manipulation/@comment-910220-20121216082646
Amaterasu users in Naruto is considered, right? The black flames are said to be as hot as the sun.
|
[Congressional Record (Bound Edition), Volume 155 (2009), Part 4]
[Senate]
[Pages 5445-5446]
TRIBUTE TO WILLIAM ``BILL'' RAGGIO
Mr. REID. Mr. President, I rise today to honor my longtime colleague
in Nevada government, State senator William ``Bill'' Raggio, for his
extensive record of public service and community activism.
At this year's Governor's Points of Light Award Dinner, Senator
Raggio will be honored with the inaugural ``Governor's Choice Award.''
This award, which will be formally presented by Governor Jim Gibbons on
February 26, recognizes Senator Raggio for his commitment to community
improvement through volunteerism and philanthropy.
A longtime resident of Nevada, Bill has been a devoted and active
member of his community. As a young man during World War II, Senator
Raggio served his community and his country honorably as a second
lieutenant in the U.S. Marine Corps Reserve. Upon return, he graduated
from the University of Nevada at Reno before pursuing a law degree.
Since that time, Bill has been a tireless advocate for the people of
Nevada. He has served on the ninth Circuit U.S. Court of Appeals and
also as the district attorney for Washoe County. In 1973, Bill made the
jump to the State senate, where his career has flourished and continues
today. He has worked in various capacities in the State's legislative
body, and is currently the minority leader of the senate.
I can think of no better recipient of the ``Governor's Choice Award''
than Senator Raggio. His 36 years of public service and selfless
sacrifice are an example of how a single person can be an overwhelming
influence for good in his community. There is no doubt that his wife
Dale and their children are extremely proud of him. Indeed, all
Nevadans have reason to be proud of Senator Raggio.
I congratulate Senator Raggio upon receiving this tremendous honor,
and wish him all the best in his future undertakings.
Mr. DURBIN. Mr. President, strong leadership at the Department of
Labor is essential as the economy continues to worsen.
Workers who are struggling need leaders who have been there, who know
what it is like to grow up in a working class household. Hilda Solis is
the right person to run the most important federal agency for workers
who need a helping hand. I strongly support her nomination.
Congresswoman Solis grew up in southern California and has for
decades fought for the rights of working men and women.
While a member of the California State Senate she led the fight in
1996 to increase the State minimum wage.
Since her election to Congress in 2000, she has cochaired the
bipartisan Congressional Caucus for Women's Issues and played a key
role in the reauthorization of the Violence Against Women Act in 2006.
Last year she helped lead the effort to provide workforce training
for ``green collar'' jobs.
She is also a nationally recognized leader on the environment, and
for that she became the first woman to receive the John F. Kennedy
Profile in Courage Award in 2000.
Congresswoman Solis has articulated a strong vision for the
Department. She is ready to lead the Department's efforts in: training
and job placement for unemployed workers; building career ladders for
at-risk youth, and expanding opportunities for our military heroes
returning from combat.
Over 2.6 million workers have lost their jobs since this recession
began, and the end is not yet in sight.
America needs an active Department of Labor to help these workers
retrain for the economy of the 21st century and find new work.
America needs Hilda Solis to take charge of the Labor Department and
to get to work today.
I urge my colleagues to support her nomination.
____________________
|
package com.bitty.history.examples;
import com.bitty.history.BHistory;
import com.bitty.history.HistoryEntry;
import java.util.Iterator;
/**
* Created by julianliebl on 07.02.15.
*/
public class GetHistoryData {
public static void main(String[] args) {
BHistory bHistory = new BHistory("krakenEUR");
bHistory.addStatusListener(new BHistory.BHistoryStatusListener() {
@Override
public void onUpdate() {
}
@Override
public void onFinish() {
Iterator<HistoryEntry> historyEntries = bHistory.getHistoryEntries();
historyEntries.forEachRemaining(entry -> System.out.println(entry.toString()));
}
@Override
public void onError() {
}
});
}
}
|
Leading zeros in the Cluster Chain Run of an NTFS MFT record?
I have an example pulled from a hard disk at my house where the NTFS $MFT file contains zeros in the least-significant places of the Cluster Chain Run. Interpreted little-endian, this doesn't make any sense and I'm confused. Can someone explain why these bytes would be here since the field could simply be shorter without them?
In the image below, the large outlines are the FILE header and the Attribute Blocks. In teal, I've highligted the fixup values. In yellow, I've highlighted the pieces of the Cluster Chain Run of the Data attribute block. In red, I've circled two bytes that don't make sense being zeros. Can this be explained?
Caveat: The reason I got into this is because this hard disk experienced thousands of bad sectors. I'm sluething around trying to learn about how a person might recover data. So, if your answer is "you have corruption on the disk", technically that could be a valid answer, but it doesn't seem likely since the fixup values are correct.
I believe the reason is that those numbers are signed. If the leading zeros were missing, they could be interpreted as negative numbers, because their first bit is 1.
For example, in your first red circle, we have the beginning of the number 0x00cc1b1d which is equal to 13,376,285 decimal.
If you removed the leading zeros, you would get 0xcc1b1d, and since it's signed, its value would be -3,400,931. When you have a signed number, by adding leading zeros, you can essentially unsign it.
Another way to put it is that with 3 bytes, you can represent values from 0 to 16,777,215. But if it's signed, the values you can represent are from -8,388,608 to 8,388,607 so the value 13,376,285 we need in this example can not be represented unless you add a 4th byte.
|
Jason Riech
Jason Riech is a character in Season One of the Showtime series DEXTER.
He was a teenager that fell victim to Jeremy Downs.
History
* "Popping Cherry."
Dexter spares a young murderer named Jeremy Downs, believing it unlikely that he will kill again.
Summary
* "Circle of Friends"
Lieutenant Maria LaGuerta later confirms that Jason's parents are high profile.
Quotes
Related Pages
* Jeremy Downs
* Valedictorian Murder Case
Trivia
|
package com.github.thorbenkuck.netcom2.network.shared.cache;
public abstract class AbstractCacheObserver<T> implements CacheObserver<T> {
private final Class<T> type;
public AbstractCacheObserver(Class<T> type) {
this.type = type;
}
@Override
public boolean accept(Object o) {
return o != null && type.equals(o.getClass());
}
}
|
[HUDI-819] Fix a bug with MergeOnReadLazyInsertIterable.
What is the purpose of the pull request
Variable declared here [1] masks protected statuses variable. So although hoodie writes data, will not include WriteStatus in the completed section. This can cause duplicates being written
[1] https://github.com/apache/incubator-hudi/blob/master/hudi-client/src/main/java/org/apache/hudi/execution/MergeOnReadLazyInsertIterable.java#L53
Brief change log
Delete MergeOnReadLazyInsertIterable because it is exact same as COW except for the type of handle created (HoodieCreateHandle vs HoodieAppendHandle)
Added new 'HandleCreator' classes and reuse code in COWLazyInsertIterable
Let me know if you have any other suggestions to improve this code. This refactoring also helps me with implementation of 'insert overwrite' features.
Verify this pull request
This pull request is already covered by existing tests in hudi-client
Committer checklist
[ ] Has a corresponding JIRA in PR title & commit
[ ] Commit message is descriptive of the change
[ ] CI is green
[ ] Necessary doc changes done or have another open PR
[ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
+1 on the change itself.. For completeness let's also bring MergeHandle under the same factory implementation?
I tried to fit in MergeHandle. But it doesn't seem to fit the pattern because constructor args requires recordItr at construction time. Other handles don't deal with recordItr directly. LazyInsertIterable deals with recordItr for these handles.
We need to make major changes to move recordItr from MergeHandle into UpdateHandler to fit it into the pattern. If you agree this is the right approach, I can implement it.
What do you think? Let me know if you have other suggestions.
@satishkotha let's then break that up into a separate JIRA (tagged with Code Cleanup component). We can limit scope to these insert related handles and move on.. wdyt
@satishkotha let's then break that up into a separate JIRA (tagged with Code Cleanup component). We can limit scope to these insert related handles and move on.. wdyt
@vinothchandar Sure. that sounds good. I created HUDI-835 for this. Let me know if you have any other comments on create/append part
@vinothchandar addressed your review comments. please take another look.
|
Windows Longhorn build 4038
Setup
New features and changes
DCE
Bugs
* The preview pane may not show the common task options.
Installation
Desktop Composition Engine
Safe mode
|
package com.so;
import org.junit.Test;
/**
* 第8题
* 输入一个非递减排序数组的一个旋转,输出旋转数组的最小元素。
*
* @author qgl
* @date 2019/02/22
*/
public class Test8 {
@Test
public void test8() throws Exception {
int[] array = {6, 7, 9, 1, 3, 5, 5};
System.out.println("旋转数组的最小元素:" + MinNumber8.minInReversingList(array));
}
}
|
Image processing apparatus, data registration method, and data registration program
ABSTRACT
An information processing apparatus includes: an imaging unit configured to capture an image of a subject; an image extraction unit configured to extract an image of a predetermined shape from a captured image being the image of the subject captured and output by the imaging unit; and a registration unit configured to, upon the image extraction unit extracting a first image identifying input data and a second image identifying a storage area, store the input data identified by the first image in the storage area identified by the second image.
The entire disclosure of Japanese Patent Application No. 2014-250308 filed on Dec. 10, 2014 including description, claims, drawings, and abstract are incorporated herein by reference in its entirety.
BACKGROUND OF THE INVENTION
Field of the Invention
The present invention relates to an image processing apparatus, a data registration method, and a data registration program, and particularly relates to an image processing apparatus having an imaging function such as a camera, and a data registration method and a data registration program that are executed by the image processing apparatus.
Description of the Related Art
In recent years, a technology related to augmented reality has been developed. For example, JP 2000-082107 A describes an image processing apparatus including an image acquisition unit that acquires a target image, an identification information recognition unit that recognizes identification information corresponding to a predetermined image pattern from the target image acquired by the image acquisition unit, and an activation unit that activates a predetermined process corresponding to the identification information recognized by the identification information recognition unit, among a plurality of preregistered processes, and starts execution of the process.
However, in the known image processing apparatus, a process to be executed on identification information corresponding to a predetermined image pattern is fixed. Therefore, there is a problem that one type of process can be performed on the predetermined image pattern.
SUMMARY OF THE INVENTION
The present invention has been made to solve the above-mentioned problem, and one object of the present invention is to provide an information processing apparatus where data registration is facilitated.
Another object of the present invention is to provide a data registration method where data registration is facilitated.
Still another object of the present invention is to provide a data registration program where data registration is facilitated.
To achieve at least one of the abovementioned objects, according to an aspect, an information processing apparatus reflecting one aspect of the present invention comprises: an imaging unit configured to capture an image of a subject; an image extraction unit configured to extract an image of a predetermined shape from a captured image being the image of the subject captured and output by the imaging unit; and a registration unit configured to, upon the image extraction unit extracting a first image identifying input data and a second image identifying a storage area, store the input data identified by the first image in the storage area identified by the second image.
According to the aspect, if the first image identifying input data and the second image identifying a storage area are extracted from a captured image being the image of the subject captured and output, the input data identified by the first image is stored in the storage area identified by the second image. When the first and second images are captured, the input data is stored in the storage area. Accordingly, an information processing apparatus where data registration is facilitated can be provided.
The registration unit preferably acquires first item information related to a plurality of items of a first type constituting the input data identified by the first image, acquires second item information related to a plurality of items of a second type constituting data to be stored in the storage area identified by the second image, associates each of the plurality of items of the second type with any of the plurality of items of the first type based on the first item information and the second item information, generates registration data being the converted input data, identified by the first image, into data of a corresponding item of the plurality of items of the second type, and stores the generated registration data in the storage area.
According to the aspect, the first item information related to the plurality of items of the first type constituting the input data is acquired. The second item information related to the plurality of items of the second type constituting data to be stored in the storage area is acquired. Each of the plurality of items of the second type is associated with any of the plurality of items of the first type. The input data is converted into data of the corresponding item of the plurality of items of the second type. Hence, the input data can be registered in agreement with the configuration of the data to be stored in the storage area.
The registration unit preferably acquires, as partial data, data of items associated respectively with the plurality of items of the second type, among the plurality of items of the first type of the input data identified by the first image, and converts data of at least one item included in the acquired partial data into data of a corresponding item of the plurality of items of the second type.
According to the aspect, data of items associated respectively with the plurality of items of the second type, among the plurality of items of the first type of the input data, is acquired as the partial data. Data of at least one item included in the partial data is converted into data of a corresponding item of the plurality of items of the second type. Hence, only a part necessary to be stored in the storage area is acquired from the input data. Therefore, the processing can be simplified.
The registration unit preferably uses a first association table that associates each of the plurality of items of the first type with any of a plurality of basic items, and a second association table that associates each of the plurality of items of the second type with any of the plurality of basic items to associate each of the plurality of items of the second type with any of the plurality of items of the first type.
According to the aspect, the first association table and the second association table are used to associate each of the plurality of items of the second type with any of the plurality of items of the first type. Accordingly, even if the input data is different in configuration from the data to be stored in the storage area, the input data can be stored in the storage area.
The registration unit preferably compares an item name of each of the plurality of items of the first type included in the first item information with an item name of each of the plurality of items of the second type included in the second item information.
According to the aspect, an item name of each of the plurality of items of the first type is compared with an item name of each of the plurality of items of the second type. Accordingly, each of the plurality of items of the second type can be associated with any of the plurality of items of the first type.
The information processing apparatus further preferably comprises an activation unit configured to, upon the image extraction unit extracting a third image providing a predetermined process, in addition to the first image and the second image, execute the process provided by the third image.
According to the aspect, if the third image is extracted, the process provided by the third image is executed. Hence, another process, in addition to the process of storing the input data in the storage area, can be executed by capturing the first, second, and third images.
The predetermined process preferably includes a process targeting the input data identified by the first image for processing.
According to the aspect, the process targeting the input data for processing, in addition to the process of storing the input data in the storage area, can be executed by capturing the first, second, and third images.
The predetermined process preferably includes a process targeting the registration data to be stored by the registration unit for processing.
According to the aspect, the process targeting the data to be stored in the storage area for processing, in addition to the process of storing the input data in the storage area, can be executed by capturing the first, second, and third images.
The image extraction unit preferably extracts the first and second images from a single captured image being an image of subjects captured and output by the imaging unit.
According to the aspect, the input data can be stored in the storage area in single image capture.
The image extraction unit preferably extracts the first and second images respectively from a plurality of captured images being images of subjects captured and output by the imaging unit.
According to the aspect, the input data can be stored in the storage area from the plurality of captured images captured at different times.
The first and the second image are preferably two-dimensional barcodes, the first image preferably includes location information indicating the location of the input data, and the second image preferably includes location information indicating the location of the storage area.
The information processing apparatus further preferably comprises: an operation acceptance unit configured to accept a user's operation; and a display unit configured to display an image, and the registration unit preferably displays the registration data on the display unit, edits the registration data, and stores the registration data on the condition that the operation acceptance unit accepts the user's permission operation.
According to the aspect, the data edited by the user can be stored in the storage area.
To achieve at least one of the abovementioned objects, according to an aspect, a data registration method to be executed by an information processing apparatus including an imaging unit configured to capture an image of a subject, the method reflecting one aspect of the present invention comprises: an image extraction step of extracting an image of a predetermined shape from a captured image being the image of the subject captured and output by the imaging unit; and a registration step of, upon extracting a first image indicating a code identifying input data and a second image identifying a storage area in the image extraction step, storing the input data identified by the first image in the storage area identified by the second image.
According to the aspect, the data registration method where data registration is facilitated can be provided.
To achieve at least one of the abovementioned objects, according to an aspect, a non-transitory recording medium storing a computer readable data registration program to be executed by a computer controlling an information processing apparatus including an imaging unit configured to capture an image of a subject, the program reflecting one aspect of the present invention causes the computer to execute: an image extraction step of extracting an image of a predetermined shape from a captured image being the image of the subject captured and output by the imaging unit; and a registration step of, upon extracting a first image identifying input data and a second image identifying a storage area in the image extraction step, storing the input data identified by the first image in the storage area identified by the second image.
According to the aspect, the data registration program where data registration is facilitated can be provided.
BRIEF DESCRIPTION OF THE DRAWINGS
The above and other objects, advantages and features of the present invention will become more fully understood from the detailed description given hereinbelow and the appended drawings which are given by way of illustration only, and thus are not intended as a definition of the limits of the present invention, and wherein:
FIG. 1 is a diagram illustrating an example of a general outline of a data registration system according to an embodiment of the present invention;
FIG. 2 is a block diagram illustrating an example of a hardware configuration of a HMD according to the embodiment;
FIG. 3 is a block diagram illustrating an example of an outline of a hardware configuration of a mobile information apparatus according to the embodiment;
FIG. 4 is a block diagram illustrating an example of a hardware configuration of a server according to the embodiment;
FIG. 5 is a block diagram illustrating an example of a hardware configuration of a MFP according to the embodiment;
FIG. 6 is a diagram illustrating an example of a data structure of a first table;
FIG. 7 is a diagram illustrating an example of a data structure of a second table;
FIG. 8 is a diagram schematically illustrating a scene where a user A visits a user B;
FIG. 9 is a block diagram illustrating an example of an outline of functions of a CPU included in the HMD;
FIG. 10 is a diagram illustrating an example of a basic item table;
FIG. 11 is a first diagram illustrating an example of a captured image captured by a camera of the HMD;
FIG. 12 is a diagram illustrating an example of an edit screen displayed on the HMD;
FIG. 13 is a second diagram illustrating an example of a captured image captured by the camera of the HMD;
FIG. 14 is a diagram illustrating an example of the flow of a data registration process;
FIG. 15 is a flowchart illustrating an example of the flow of a two-dimensional barcode classification process;
FIG. 16 is a flowchart illustrating an example of the flow of a registration record generation process;
FIG. 17 is a flowchart illustrating an example of the flow of a registration record addition process; and
FIG. 18 is a diagram illustrating an example of the flow of a table management process.
DESCRIPTION OF THE PREFERRED EMBODIMENTS
Hereinafter, an embodiment of the present invention will be described with reference to the drawings. However, the scope of the invention is not limited to the illustrated examples. The same reference numerals are assigned to the same components in the following description. Their names and functions are also the same. Therefore, their detailed descriptions are not repeated.
FIG. 1 is a diagram illustrating an example of a general outline of a data registration system according to an embodiment of the present invention. With reference to FIG. 1, a data registration system 1 includes an MFP (Multi Function Peripheral) 100, a mobile information apparatus 200, a personal computer (hereinafter referred to as “PC”) 300, a head mounted display (hereinafter referred to as “HMD”) 400, and servers 500 and 500A.
The head mounted display (hereinafter referred to as “HMD”) 400 has an eyeglasses-shape, and is used worn by a user. The HMD 400 functions as an image processing apparatus, and has an imaging function that captures an image of a subject, a function of storing data, a display function of displaying images on lens portions of the eyeglasses, and a communication function using a wireless LAN. The user wearing the HMD 400 can visually recognize images displayed on the lenses simultaneously with visually recognizing a subject through the lenses.
The mobile information apparatus 200 is another example of the image processing apparatus. The mobile information apparatus 200 is used carried by a user, for example, a PDA (Personal Digital Assistants) or smartphone, and has an imaging function of capturing an image of a subject, a function of storing data, a display function of displaying an image, and a communication function using a wireless LAN. Moreover, an application program can be installed on the mobile information apparatus 200.
The MFP 100 has a document reading function of reading a document, an image forming function of forming an image on a recording medium such as paper based on image data, and a facsimile transmitting/receiving function of transmitting/receiving facsimile data.
The PC 300 and the servers 500 and 500A are general computers. Their hardware configurations and functions are known. Therefore, their descriptions are not repeated here.
A wireless station 3, the MFP 100, the PC 300, and the server 500 are respectively connected to a network 2. The network 2 is a local area network (LAN). It does not matter whether the connection mode is wired or wireless. Moreover, the network 2 is not limited to a LAN, and may be, for example, a network using the public switched telephone networks. Furthermore, the network 2 may be a wide area network (WAN) such as the Internet.
Furthermore, the network 2 is connected to an Internet 5. The server 500A is connected to the Internet 5. Hence, the wireless station 3, the MFP 100, the PC 300, and the server 500 can communicate with each other via the network 2, and can communicate respectively with the server 500A via the Internet 5. The wireless station 3 is a relay device on the network 2, and communicates with the mobile information apparatus 200 and the HMD 400, which have the communication function using a wireless LAN, to connect the mobile information apparatus 200 and the HMD 400 to the network 2. Hence, each of the mobile information apparatus 200 and the HMD 400 can mutually communicate with the MFP 100, the PC 300, and the servers 500 and 500A.
FIG. 2 is a block diagram illustrating an example of a hardware configuration of a HMD according to the embodiment. With reference to FIG. 2, the HMD 400 according to the embodiment includes a CPU 401 for controlling the entire HMD 400, a camera 402, a flash memory 403 that stores data in a nonvolatile manner, a display unit 404 that displays information, a wireless LAN I/F 405, and an operating unit 406.
The camera 402 includes a lens and a photoelectric conversion device, and forms an image of light condensed by the lens on the photoelectric conversion device. The photoelectric conversion device photo electrically converts the received light, and outputs the image data to the CPU 401. The photoelectric conversion device is a CMOS (Complementary Metal Oxide Semiconductor) sensor, a CCD (Charge Coupled Device) sensor, or the like. The camera 402 is described here taking an example of capturing a still image. However, a videocamera that captures a moving image may be used. If a videocamera is used, one of a plurality of frames included in a moving image is required to be handled as a still image.
The display unit 404 is a liquid crystal display (LCD) made of a transparent member, and is embedded in surfaces of the lenses of the HMD 400. A display surface of the display unit 404 is placed in such a manner as to have the same field of view as that of a case where the user is wearing the HMD 400. Hence, an image can be displayed at an arbitrary position in the user's field of view. The optical axis and the imaging area of the camera 402 are placed at positions that are determined relative to the display surface of the display unit 404. Specifically, the optical axis and the imaging area of the camera 402 are set in such a manner as to have the same field of view as that of the case where the user is wearing the HMD 400. Hence, an image captured and obtained by the camera 402 is substantially the same as an image in the user's actual field of view.
The wireless LAN I/F 405 is an interface for communicating with the wireless station 3, and connecting the HMD 400 to the network 2. IP (Internet Protocol) addresses of the mobile information apparatus 200, the servers 500 and 500A, the MFP 100, and the PC 300 are preregistered in the HMD 400. Accordingly, the wireless LAN I/F 405 can communicate with the mobile information apparatus 200, the servers 500 and 500A, the MFP 100, and the PC 300 to enable the transmission and receipt of data. The embodiment is described taking, as an example, a case where the HMD 400 uses the wireless LAN I/F 405 to communicate with the MFP 100, the PC 300, the HMD 400, and the servers 500 and 500A. However, another communication method may be used for communications. Specifically, if a short-range wireless device with, for example, Bluetooth (registered trademark) is mounted on the mobile information apparatus 200, the MFP 100, the PC 300, the HMD 400, and the server 500, the HMD 400 may communicate one-on-one with any of the MFP 100, the PC 300, the mobile information apparatus 200, and the server 500. Moreover, the HMD 400 may be connected to any of the MFP 100, the PC 300, the mobile information apparatus 200, and the server 500 in a wired manner such as a USB (Universal Serial Bus) cable to communicate one-on-one with the MFP 100, the PC 300, the mobile information apparatus 200, and the server 500.
A program to be executed by the CPU 401, or data necessary to execute the program, is stored in the flash memory 403. The CPU 401 loads the program recorded in the flash memory 403 into RAM equipped with the CPU 401 to execute the program. In this case, another computer connected to the network 2 or the Internet 5 may rewrite the program stored in the flash memory 403, or add and write a new program. Furthermore, the HMD 400 may download the program from another computer connected to the network 2 or the Internet 5 to store the program in the flash memory 403. The program here includes not only a program that can be executed directly by the CPU 401 but also a source program, a compressed program, and an encoded program.
The operating unit 406 includes a microphone, collects a voice emitted by the user with the microphone, recognizes the collected voice, and accordingly accepts the user's instruction. For example, a command name corresponding to each of a plurality of operations is predetermined. If there is the same command name as character information obtained by recognizing the voice, the operating unit 406 accepts an operation that instructs the execution of a command corresponding to the command name. Moreover, the character information obtained by the voice recognition is accepted as an input value, for example, a character string or numerical sequence. Moreover, the operating unit 406 includes a line-of-sight detection sensor that detects the user's line of sight, and identifies a portion that the user is visually recognizing from the line of sight detected by the line-of-sight detection sensor and a portion displayed on the display unit 404 to accept an operation that specifies a processing target portion. For example, a button for accepting permission is displayed on the display unit 404. If the line of sight detected by the line-of-sight detection sensor is located on the button, the operating unit 406 accepts the user's permission operation.
FIG. 3 is a block diagram illustrating an example of an outline of a hardware configuration of a mobile information apparatus according to the embodiment. With reference to FIG. 3, the mobile information apparatus 200 includes a CPU 201 for controlling the entire mobile information apparatus 200, a camera 202, a flash memory 203 where data is stored in a nonvolatile manner, a wireless communication unit 204 connected to a calling unit 205, a display unit 206 that displays information, an operating unit 207 that accepts the user's operation, a wireless LAN I/F 208, a location detection unit 209, a direction detection unit 210, and an external storage device 211.
The wireless communication unit 204 communicates wirelessly with a base station for mobile phones connected to a telephone communication network. The wireless communication unit 204 connects the mobile information apparatus 200 to the telephone communication network to enable a call using the calling unit 205. The wireless communication unit 204 decodes a voice signal obtained by demodulating a wireless signal received from the base station for mobile phones to output it to the calling unit 205. Moreover, the wireless communication unit 204 encodes a voice input from the calling unit 205 and transmits it to the base station for mobile phones. The calling unit 205 is provided with a microphone and a speaker, outputs, from the speaker, a voice input from the wireless communication unit 204, and outputs, to the wireless communication unit 204, a voice input from the microphone. Furthermore, the wireless communication unit 204 is controlled by the CPU 201, connects the mobile information apparatus 200 to an electronic mail server to transmit and receive electronic mails.
The camera 202 includes a lens and a photoelectric conversion device, and forms an image of light condensed by the lens on the photoelectric conversion device. The photoelectric conversion device photo electrically converts the received light, and outputs the image data to the CPU 201. The photoelectric conversion device is a CMOS (Complementary Metal Oxide Semiconductor) sensor, a CCD (Charge Coupled Device) sensor, or the like.
The display unit 206 is a display device such as a liquid crystal display (LCD) or organic ELD, and displays an instruction menu for the user, and information related to the acquired image data, and the like. The operating unit 207 includes a plurality of keys, and accepts inputs of data such as various instructions, characters, and numerics based on the user's operations corresponding to the keys.
Moreover, the operating unit 207 includes a touchscreen. The touchscreen detects a position instructed by the user on a display surface of the display unit 206. The touchscreen is provided on the upper or lower surface of the display unit 206 and outputs, to the CPU 201, coordinates of the position instructed by the user. The touchscreen is provided superimposed on the display unit 206. Accordingly, when the user gives instructions on the display surface of the display unit 206, the touchscreen outputs, to the CPU 201, one or more sets of coordinates corresponding respectively to one or more positions instructed by the user on the display surface of the display unit 206. The touchscreen can use, for example, a resistive system, surface acoustic wave system, infrared system, electromagnetic induction system, or capacitive system. Its system is not limited.
The wireless LAN I/F 208 is an interface for communicating with the wireless station 3, and connecting the mobile information apparatus 200 to the network 2. IP addresses of the HMD 400, the servers 500 and 500A, the MFP 100, and the PC 300 are preregistered in the mobile information apparatus 200. Accordingly, the mobile information apparatus 200 can communicate with the HMD 400, the servers 500 and 500A, the MFP 100, and the PC 300 to enable the transmission and receipt of data. The embodiment is described taking, as an example, a case where the mobile information apparatus 200 uses the wireless LAN I/F 208 to communicate with the MFP 100, the PC 300, the HMD 400, and the servers 500 and 500A. However, another communication method may be used for communications. Specifically, if a short-range wireless device with, for example, Bluetooth (registered trademark) is mounted on the mobile information apparatus 200, the MFP 100, the PC 300, the HMD 400, and the server 500, the mobile information apparatus 200 may communicate one-on-one with any of the MFP 100, the PC 300, the HMD 400, and the server 500. Moreover, the mobile information apparatus 200 may be connected to any of the MFP 100, the PC 300, the HMD 400, and the server 500 in a wired manner such as a USB (Universal Serial Bus) cable to communicate one-on-one with any of the MFP 100, the PC 300, the HMD 400, and the server 500.
A program to be executed by the CPU 201, or data necessary to execute the program, is stored in the flash memory 203. The CPU 201 loads the program recorded in the flash memory 203 into RAM equipped with the CPU 201 to execute the program. In this case, another computer connected to the network 2 or the Internet 5 may rewrite the program stored in the flash memory 203, or add and write a new program. Furthermore, the mobile information apparatus 200 may download the program from another computer connected to the network 2 or the Internet 5 to store the program in the flash memory 203. The program here includes not only a program that can be executed directly by the CPU 201 but also a source program, a compressed program, and an encoded program.
The location detection unit 209 detects the current location of the mobile information apparatus 200. Specifically, the location detection unit 209 is a Global Positioning System receiver. The location detection unit 209 receives radio waves from a plurality of GPS satellites to determine the current location. The location detection unit 209 outputs, to the CPU 201, a value indicating the determined current location, for example, latitude and longitude.
The direction detection unit 210 detects the direction in which the camera 202 of the mobile information apparatus 200 faces. Specifically, the direction detection unit 210 is a magnetometer that measures the Earth's magnetic field. The direction detection unit 210 outputs the detected direction to the CPU 201. The direction detection unit 210 is installed in the mobile information apparatus 200 in such a manner as to be able to detect the imaging direction of the camera 202, in other words, the direction in which the optical axis of the lens of the camera 202 points. The direction detection unit 210 is not limited to the magnetometer and may use a gyroscope or the like.
The external storage device 211 is detachable from the mobile information apparatus 200. A CD-ROM 211A where a remote control program is stored can be inserted into the external storage device 211. The CPU 201 can access the CD-ROM 211A via the external storage device 211. The CPU 201 can load, into the RAM equipped with the CPU 201, the remote control program recorded in the CD-ROM 211A inserted into the external storage device 211 to execute the remote control program.
The program recorded in the flash memory 203 or the CD-ROM 211A has been described as the program to be executed by the CPU 201. However, it may be a program obtained by another computer connected to the network 2 rewriting the program stored in the flash memory 203, or a new program added and written. Furthermore, it may be a program downloaded by the mobile information apparatus 200 from another computer connected to the network 2. The program here includes not only a program that can be executed directly by the CPU 201 but also a source program, a compressed program, and an encoded program.
The medium where the program to be executed by the CPU 201 is stored is not limited to the CD-ROM 211A, and may be an optical disc (MO/MD/DVD), IC card, optical memory card, or semiconductor memory such as Mask ROM, EPROM, or EEPROM.
The hardware configurations of the server 500 and the server 500A are the same. The hardware configuration of the server 500 is described here. When each member of the server 500A is indicated hereinafter, if it is the same member as one included in the server 500, it is indicated by a reference numeral to which a letter “A” is added to a reference numeral assigned to the member included in the server 500.
FIG. 4 is a block diagram illustrating an example of a hardware configuration of a server according to the embodiment. With reference to FIG. 4, the server 500 includes a CPU 501 for controlling the entire server 500, a ROM 502 in which a program to be executed by the CPU 501 is stored, a RAM 503 used as a work area of the CPU 501, a HDD 504 in which data is stored in a nonvolatile manner, a communication unit 505 that connects the CPU 501 to the network 2, a display unit 506 that displays information, an operating unit 507 that accepts an input of the user's operation, and an external storage device 508.
The CPU 501 loads, into the RAM 502, the program stored in the ROM 502 or the HDD 504 to execute the program. A CD-ROM 509 where a program is stored can be inserted into the external storage device 508. The CPU 501 can access the CD-ROM 509 via the external storage device 508. The CPU 501 can load, into the RAM 502, the program recorded in the CD-ROM 509 to execute the program.
The program recorded in the ROM 502, the HDD 504, or the CD-ROM 509 has been described as the program to be executed by the CPU 501. However, it may be a program obtained by another computer connected to the network 2 rewriting the program stored in the HDD 504, or a new program added and written. Furthermore, it may be a program downloaded by the server 500 from another computer connected to the network 2. The program here includes not only a program that can be executed directly by the CPU 501 but also a source program, a compressed program, and an encoded program.
The medium where the program to be executed by the CPU 501 is stored is not limited to the CD-ROM 509, and may be an optical disc (MO/MD/DVD), IC card, optical memory card, or semiconductor memory such as Mask ROM, EPROM, or EEPROM.
FIG. 5 is a block diagram illustrating an example of a hardware configuration of a MFP according to the embodiment. With reference to FIG. 5, the MFP 100 includes a main circuit 110, a document reading unit 130 for reading a document, an automatic document feeder 120 for feeding a document to the document reading unit 130, an image forming unit 140 for forming an image on a sheet or the like based on image data output after the document reading unit 130 reading the document, a paper feeding unit 150 for feeding sheets to the image forming unit 140, a postprocessing unit 155 that processes the sheet on which the image has been formed, and an operation panel 160 as a user interface.
The postprocessing unit 155 executes a sorting process of sorting one or more sheets on which an image has been formed by the image forming unit 140, and ejecting the sheet(s), a punching process of punching holes, and a stapling process of driving staples.
The main circuit 110 includes a CPU 111, a communication interface (I/F) unit 112, a ROM 113, a RAM 114, a hard disk drive (HDD) 115 as a mass storage device, a facsimile unit 116, and an external storage device 117 into which a CD-ROM 118 is inserted. The CPU 111 is connected to the automatic document feeder 120, the document reading unit 130, the image forming unit 140, the paper feeding unit 150, the postprocessing unit 155, and the operation panel 160, and controls the entire MFP 100.
A program to be executed by the CPU 111, or data necessary to execute the program, is stored in the ROM 113. The RAM 114 is used as a work area when the CPU 111 executes the program. Moreover, read data (image data) consecutively transmitted from the document reading unit 130 is temporarily stored in the RAM 114.
The operation panel 160 is provided on an upper surface of the MFP 100, and includes a display unit 161 and an operating unit 163. The display unit 161 is a display device such as a liquid crystal display (LCD) or an organic ELD (Electro-Luminescence Display), and displays an instruction menu for the user, and information related to acquired image data, and the like. The operating unit 163 includes a hard key unit 167 formed with a plurality of keys, and accepts inputs of data such as various instructions, characters, and numerics based on the user's operations corresponding to the keys. The operating unit 163 further includes a touchscreen 165 provided on the display unit 161.
The communication I/F unit 112 is an interface for connecting the MFP 100 to the network 2. The CPU 111 communicates, via the communication I/F unit 112, with the mobile information apparatus 200, the PC 300, the HMD 400, and the server 500 to transmit and receive data. Moreover, the communication I/F unit 112 can communicate with the server 500A connected to the Internet 5, via the network 2.
The facsimile unit 116 is connected to the public switched telephone network (PSTN) to transmit facsimile data to the PSTN or to receive facsimile data from the PSTN. The facsimile unit 116 stores the received facsimile data in the HDD 115 or outputs it to the image forming unit 140. The image forming unit 140 prints, on a sheet, the facsimile data received by the facsimile unit 116. Moreover, the facsimile unit 116 converts data stored in the HDD 115 into facsimile data to transmit the facsimile data to a facsimile machine connected to the PSTN.
A CD-ROM (Compact Disk ROM) 118 is inserted into the external storage device 117. The CPU 111 can access the CD-ROM 118 via the external storage device 117. The CPU 111 loads, into the RAM 114, a program recorded in the CD-ROM 118 inserted into the external storage device 117 to execute the program. The medium where the program to be executed by the CPU 111 is stored is not limited to the CD-ROM 118, and may be an optical disc (MO (Magnetic Optical Disc)/MD (Mini Disc)/DVD (Digital Versatile Disc)), IC card, optical memory card, or semiconductor memory such as Mask ROM, EPROM (Erasable Programmable ROM), or EEPROM (Electrically EPROM).
Moreover, the program to be executed by the CPU 111 is not limited to the program recorded in the CD-ROM 118. A program stored in the HDD 115 may be loaded into the RAM 114 to be executed. In this case, another computer connected to the network 2 may rewrite the program stored in the HDD 115 of the MFP 100, or add and write a new program. Furthermore, the MFP 100 may download the program from another computer connected to the network 2 to store the program in the HDD 115. The program here includes not only a program that can be executed directly by the CPU 111 but also a source program, a compressed program, and an encoded program.
In the data registration system 1, data is transmitted and received between the MFP 100, the mobile information apparatus 200, the PC 300, the HMD 400, and the servers 500 and 500A. Any protocol can be used as a protocol for transmitting and receiving data as long as it can identify the source in an apparatus on a receiving side. For example, HTTP (HyperText Transfer Protocol), FTP (File Transfer Protocol), SMTP (Simple Mail Transfer Protocol), and POP (Post Office Protocol) are used as the protocol for transmitting and receiving data.
In the data registration system 1 according to the embodiment, the server 500 stores a first table in a predetermined storage area of the HDD 504. The first table can be viewed by a user A, but cannot be viewed by a user B. The first table includes a plurality of records that provides personal information of a plurality of users including the user A. Moreover, the server 500A stores a second table in a predetermined storage area of a HDD 504A. The second table can be viewed by the user B, but cannot be viewed by the user A. The second table includes a plurality of records containing personal information of the plurality of users.
Each of the plurality of records included in the first table includes a plurality of items of a first type, and is provided in a format of the first table. The format of the first table provides an item name of each of the plurality of items of the first type constituting a record included in the first table, and the data format and the size of a value set in the item.
Each of the plurality of records included in the second table includes a plurality of items of a second type, and is provided in a format of the second table. The format of the second table provides an item name of each of the plurality of items of the second type constituting a record included in the second table, and the data format and the size of a value set in the item.
The first table format and the second table format can be the same, but are different in some cases. A description is given here taking, as an example, a case where the first and second table formats are partly different from each other. The case where the first and second table formats are partly different from each other includes a case where the number of items of the first type is different from the number of items of the second type, a case where the arrangement order of the plurality of items of the first type is different from the arrangement order of the plurality of items of the second type, and a case where an item of the first type is different in item name, or data format and size of a value to be set, from its corresponding item of the second type.
FIG. 6 is a diagram illustrating an example of a data structure of the first table. With reference to FIG. 6, the data structure of the first table includes items under first item name, items under second item name, items under data format, items under size. The items under first item name include name, date of birth, gender, blood type, home, job, and educational background. The first item name “name” includes second item names “last name” and “first name.” The first item name “date of birth” includes second item names “anno Domini” and “era name.” Moreover, the first item names “gender” and “blood type” include no second item name. Furthermore, the first item name “home” includes second item names “zip code,” “address,” “telephone number,” “mobile phone,” and “electronic mail address.” The first item name “job” includes second item names “company name,” “department name,” “title,” “zip code,” “address,” “telephone number,” “mobile phone,” and “electronic mail address.” Moreover, the first item name “educational background” includes second item names “elementary school,” “junior high school,” “high school,” and “university.” Moreover, the data format and the size are provided for each second item name.
FIG. 7 is a diagram illustrating an example of a data structure of the second table. With reference to FIG. 7, the data structure of the second table includes items under item name, items under data format, and items under size. The items under item name includes name, date of birth (anno Domini), gender, zip code, address 1, address 2 (lot/house number), address 3 (building), telephone number, mobile phone, electronic mail address. Moreover, the data format and the size are provided for each item name.
A description is given here taking, as an example, a case where personal information related to the user A registered in the first table registered in the server 500 is registered in the second table viewable by the user B and registered in the server 500A.
FIG. 8 is a diagram schematically illustrating a scene where the user A visits the user B. With reference to FIG. 8, a state is illustrated where the user A is visually recognizing a first card 601 and a second card 602 via the HMD 400, wearing the HMD 400. The user B may visually recognize the first card 601 and the second card 602 via the HMD 400, wearing the HMD 400.
The first card 601 is a card possessed by the user A, on which an image 601A is depicted. The second card 602 is a card possessed by the user B, on which an image 602A is depicted. The images 601A and 602A are, for example, two-dimensional barcodes such as QR codes (registered trademark), and have a predetermined shape. For example, business cards can be used for the first card 601 and the second card 602.
The image 601A is a first image identifying input data. The input data here is a record related to the user A among a plurality of records included in the first table stored in the server 500. The image 601A includes record determination information for identifying the record related to the user A, and attribute information indicating that the record is input data. The record determination information includes a network address being location information of the first table on a network, and record identification information for identifying one of the plurality of records included in the first table. For example, a URL can be used for the network address. A record number assigned to the record, or user identification information if the record includes an item of user identification information for identifying the user A, can be used for the record identification information.
The image 602A is a second image identifying a storage area. The storage area here is the second table stored in the server 500A. The image 602A includes table determination information for identifying the second table stored in the server 500A, and attribute information indicating that the table is a storage area. The table determination information includes a network address indicating a location of the second table on the network.
When the user A sees the first card 601 and the second card 602, the imaging area of the camera 402 of the HMD 400 includes the image 601A depicted on the first card 601A at a time, and the image 602A depicted on the second card 602. When the user A causes the HMD 400 to capture the images 601A and 602A with the camera 402, the HMD 400 registers a record of the first table identified by the image 601A, in the second table identified by the image 602A. This is described in more detail below.
FIG. 9 is a block diagram illustrating an example of an outline of functions of the CPU included in the HMD. The functions illustrated in FIG. 9 are functions formed in the CPU 401 included in the HMD 400 by the CPU 401 executing a data registration program stored in the flash memory 403. With reference to FIG. 9, the CPU 401 includes an imaging control unit 451 that controls the camera 402, an image extraction unit 453, a registration unit 455, and an activation unit 457.
The imaging control unit 451 controls the camera 402, and acquires a captured image obtained by the camera 402 capturing an image of a subject and outputting it. When the operating unit 406 has accepted an image-capture instruction from the user, the imaging control unit 451 causes the camera 402 to capture an image of the subject. The imaging control unit 451 outputs the captured image to the image extraction unit 453. If the camera 402 sets the first card 601 and the second card 602 as subjects, the captured image output by the camera 402 includes the image 601A being the first image and the image 602A being the second image.
The image extraction unit 453 extracts a plurality of images of a predetermined shape from the captured image input from the imaging control unit 451. The images targeted by the image extraction unit 453 for extraction here are two-dimensional barcodes. The image extraction unit 453 extracts, from the captured image, images of the shape predetermined for two-dimensional barcodes. The image extraction unit 453 outputs the plurality of extracted two-dimensional barcode images to the registration unit 455 and the activation unit 457. The image extraction unit 453 outputs nothing to the registration unit 455 and the activation unit 457 if not extracting two or more images of the shape predetermined for two-dimensional barcodes.
The image extraction unit 453 includes a single extraction unit 477 and a consecutive extraction unit 479. The single extraction unit 477 extracts a plurality of two-dimensional barcodes from one captured image. For example, if an image of the first card 601 of the user A and an image of the second card 602 of the user B are captured as subjects, the single extraction unit 477 extracts the images 601A and 602A as two-dimensional barcodes from the captured image input from the imaging control unit 451. In this case, the images 601A and 602A can be extracted in single image capture with the camera 402.
The consecutive extraction unit 479 extracts one or more two-dimensional barcodes respectively from a plurality of captured images. For example, if the imaging control unit 451 captures an image of the first card 601 of the user A as a subject, and then captures an image of the second card 602 of the user B as a subject, the consecutive extraction unit 453 extracts the image 601A as a two-dimensional barcode from the captured image input from the imaging control unit 451, and then extracts the image 602A as a two-dimensional barcode from the captured image input from the imaging control unit 451. Moreover, the consecutive extraction unit 478 may extract the images 601A and 602A respectively from at least two of a plurality of captured images input from the imaging control unit 451. In this case, a plurality of captured images captured at different times can be used. For example, captured images obtained by capturing the images 601A and 602A at different places can be used.
The registration unit 455 includes a first item information acquisition unit 461, a second item information acquisition unit 463, an association unit 465, a partial data acquisition unit 467, a registration record generation unit 469, a registration record addition unit 471, a display control unit 473, an edition unit 475, and a permission acceptance unit 479.
The first item information acquisition unit 461 identifies a two-dimensional barcode corresponding to input data from a plurality of two-dimensional barcodes input from the image extraction unit 453. Specifically, a two-dimensional barcode including attribute information indicating to be input data is identified. The first item information acquisition unit 461 acquires first item information related to the plurality of items of the first type constituting the input data identified by the two-dimensional barcode corresponding to input data. A specific description is given here taking, as an example, a case of identifying the image 601A being the first image as the two-dimensional barcode corresponding to input data. The first item information acquisition unit 461 acquires the first item information of the first table including a record identified by the record determination information included in the identified image 601A. The first item information indicates a format of the first table. The format of the first table includes an item name of each of the plurality of items of the first type constituting a record included in the first table, and the data format and the size of a value set in the item.
Specifically, the first item information acquisition unit 461 identifies the server 500 from a network address of the first table included in the record determination information. The first item information acquisition unit 461 then controls the wireless LAN I/F 405 to transmit a first item information transmission request to the server 500 and receive the first item information transmitted by the server 500. In response to the receipt of the first item information, the first item information acquisition unit 461 outputs the first item information to the association unit 465, and outputs the record determination information to the partial data acquisition unit 467.
The second item information acquisition unit 463 identifies a two-dimensional barcode corresponding to a storage area from a plurality of two-dimensional barcodes input from the image extraction unit 453. Specifically, a two-dimensional barcode including attribute information indicating to be a storage area is identified. The second item information acquisition unit 463 acquires second item information related to the plurality of items of the second type constituting data to be stored in the storage area identified by the two-dimensional barcode corresponding to the storage area. A specific description is given here taking, as an example, a case of identifying the image 602A being the second image as the two-dimensional barcode corresponding to a storage area. The second item information acquisition unit 463 acquires the second item information of the second table identified by the table determination information included in the identified image 602A. The second item information indicates a format of the second table. The format of the second table includes an item name of each of the plurality of items of the second type constituting a record included in the second table, and the data format and the size of a value set in the item.
Specifically, the second item information acquisition unit 463 identifies the server 500A from a network address of the second table, which is the table determination information. The second item information acquisition unit 463 then controls the wireless LAN I/F 405 to transmit a second item information transmission request to the server 500A and receive the second item information transmitted by the server 500A. In response to the receipt of the second item information, the second item information acquisition unit 463 outputs the second item information to the association unit 465, and outputs the table determination information to the registration record addition unit 471.
The association unit 465 receives an input of the first item information from the first item information acquisition unit 461, and an input of the second item information from the second item information acquisition unit 463. The association unit 465 associates each of the plurality of items of the second type with any of the plurality of items of the first type based on the first item information and the second item information. For example, a basic item table including basic items to be a reference, a first table-specific conversion table that provides items corresponding between the basic item table and the first table, and a second table-specific conversion table that provides items corresponding between the basic item table and the second table are prepared in advance.
FIG. 10 is a diagram illustrating an example of the basic item table. With reference to FIG. 10, the basic item table includes, as item names, “name,” “date of birth (anno Domini),” “gender,” “zip code,” “address,” “telephone number,” “mobile phone,” “electronic mail address.” In the first table-specific conversion table corresponding to the first table illustrated in FIG. 6, the second item name “last name” and the second item name “first name” of the first item name “name” of the first table are associated with the item name “name” of the basic item table. Moreover, the second item name “anno Domini” of the first item name “date of birth” of the first table is associated with the item name “date of birth (anno Domini)” of the basic item table. Moreover, the first item name “gender” of the first table is associated with the item name “gender” of the basic item table. Furthermore, the second item name “zip code,” the second item name “address,” the second item name “telephone number,” the second item name “mobile phone,” and the second item name “electronic mail address” for the first item name “home” or “job” of the first table are respectively associated with the item name “zip code” of the basic item table, the item name “address” of the basis item table, the item name “telephone number” of the basic item table, the item name “mobile phone” of the basic item table, and the item name “electronic mail address” of the basis item table.
In the second table-specific conversion table corresponding to the second table illustrated in FIG. 8, the item name “name” of the second table is associated with the item name “name” of the basic item table. Moreover, the item name “date of birth (anno Domini)” of the second table is associated with the item name “date of birth (anno Domini)” of the basic item table. Moreover, the item name “gender” of the second table is associated with the item name “gender” of the basic item table. Furthermore, the item name “zip code” of the second table is associated with the item name “zip code” of the basic item table, the item names “address 1,” “address 2 (lot/house number),” and “address 3 (building)” of the second table with the item name “address” of the basic item table, the item name “telephone number” of the second table with the item name “telephone number” of the basic item table, the item name “mobile phone” of the second table with the item name “mobile phone” of the basic item name, and the item name “electronic mail address” of the second table with the item name of “electronic mail address” of the basic item table.
Returning to FIG. 9, the association unit 465 determines a basic item associated with an item of the second type in the second table-specific conversion table, for each of the plurality of items of the second type, and associates the determined basic item with an item of the first type associated with the determined basic item in the first table-specific conversion table. The association unit 465 generates association information where the plurality of items of the second type is associated with the plurality of items of the first type, and outputs the first item information, the second item information, and the association information to the partial data acquisition unit 467 and the registration record generation unit 469.
If the above-mentioned first table-specific conversion table and second table-specific conversion table are used, the item name “name” of the second table is associated with the second item name “last name” and the second item name “first name” of the first item name “name” of the first table. The item name “date of birth (anno Domini)” of the second table is associated with the second item name “anno Domini” of the first item name “date of birth” of the first table. The item name “gender” of the second table is associated with the first item name “gender” of the first table. The item name “zip code” of the second table is associated with the second item name “zip code” of the first item name “home” of the first table. The item name “address 1” of the second table is associated with the second item name “address” of the first item name “home” of the first table. The item name “telephone number” of the second table is associated with the second item name “telephone number” of the first item name “home” of the first table. The item name “mobile phone” of the second table is associated with the second item name “mobile phone” of the first item name “home” of the first table. The item name “electronic mail address” of the second table is associated with the second item name “electronic mail address” of the first item name “home” of the first table.
Part of the plurality of items of the second type may not be associated with any of the plurality of items of the first type. In the above-mentioned example, the item name “address 2 (lot/house number)” and the item name “address 3 (building)” of the second table are not associated with any item of the first table. Moreover, part of the plurality of items of the first type may not be associated with any of the plurality of items of the second type. In the above-mentioned example, the second item name “era name” of the first item name “date of birth” of the first table, the first item name “blood type,” all the second item names of the first item name “job,” and all the second item names of the first item name “educational background” are not associated with any item of the second table.
The partial data acquisition unit 467 receives an input of the record determination information from the first item information acquisition unit 461, and inputs of the first item information, the second item information, and the association information from the association unit 465. The association information associates each of the plurality of items of the second type with any of the plurality of items of the first type. The first item information is information related to the plurality of items of the first type constituting the input data identified by the first image, here, the record received from the server 500. The second item information is information related to the plurality of items of the second type constituting the data registered in the storage area identified by the second image, here, the record registered in the second table stored in the server 500A. The partial data acquisition unit 467 controls the wireless LAN I/F 405 and uses the network address of the first table included in the record determination information to transmit a record transmission request to the server 500. The record transmission request includes the record determination information.
When having received the record transmission request, the server 500 extracts a record identified by the record determination information from a plurality of records included in the first table, and replies with the record. When the wireless LAN I/F 405 has received the record with which the server 500 replied, the partial data acquisition unit 467 converts the record to partial data, and outputs the partial data to the registration record generation unit 469. Specifically, the partial data acquisition unit 467 identifies a target item from the plurality of items of the first type constituting the record acquired from the server 500, based on the first item information and the association information. Specifically, the partial data acquisition unit 467 refers to the association information, and sets, as the target item(s), one or more items of the first type associated with any of the plurality of items of the second type among the plurality of items of the first type. The partial data acquisition unit 467 then generates partial data composed of a value(s) set in the target item(s) in the record received from the server 500.
The registration record generation unit 469 receives inputs of the first item information, the second item information, and the association information from the association unit 465, and receives an input of the partial data from the partial data acquisition unit 467. The registration record generation unit 469 generates a registration record based on the partial data and the association information in response to the input of the partial data from the partial data acquisition unit 467. The registration record is data obtained by converting the data set in the one or more target items included in the partial data into data of the corresponding item(s) of the second type. Specifically, the registration record generation unit 469 converts the data set in the target item of the partial data into the data format and the size of an item of the second type corresponding to the target item, based on the data format and the size provided by the first item information for the target item, and the data format and the size provided by the second item information for an item of the second type corresponding to the target item. The registration record generation unit 469 outputs the generated registration record to the registration record addition unit 471 and the display control unit 473. Moreover, the registration record generation unit 469 further outputs the second item information to the registration record addition unit 471.
The display control unit 473 controls the display unit 404 in response to the input of the registration record from the registration record generation unit 469, and displays the registration record on the display unit 404.
The registration record addition unit 471 receives inputs of the registration record and the second item information from the registration record generation unit 469. The registration record addition unit 471 outputs the registration record to the edition unit 475 in response to the input of the registration record.
The edition unit 475 edits the registration record input from the registration record addition unit 471 based on the user's instruction. The edition of the registration record includes change or deletion of part of the registration record, and addition of part of the registration record. The edition unit 475 edits the registration record in accordance with an editing operation accepted by the operating unit 406. The edition unit 475 outputs the edited registration data to the registration record addition unit 471.
The permission acceptance unit 479 controls the operating unit 406 to accept the user's permission operation after the display control unit 473 displays the registration data on the display unit 404. The permission acceptance unit 479 outputs a permission signal to the registration record addition unit 471 in response to the acceptance of the user's permission operation.
The registration record addition unit 471 receives an input of the table determination information from the second item information acquisition unit 463, and inputs of the registration data and the second item information from the registration record generation unit 469. After having received the inputs of the registration data and the second item information from the registration record generation unit 469, the registration record addition unit 471 adds and stores the registration record input from the registration record generation unit 469, or the edited registration record if the edited registration data has been input from the edition unit 474, in the storage area in response to the input of the permission signal from the permission acceptance unit 479. Specifically, the registration record addition unit 471 identifies the server 500A where the second table is stored, based on the table determination information, and controls the wireless LAN I/F 405 to transmit an addition request. The addition request includes the registration record or edited registration record, and the table determination information.
In the server 500A, which receives the addition request, when the addition request is received, the registration record included in the addition request is added to the second table identified by the table determination information included in the addition request.
The image extraction unit 453 may extract a third image in addition to the image 601A being the first image and the image 602A being the second image. The third image includes a command indicating a predetermined process, and attribute information indicating to be a command. The command includes an input record control command that provides a process targeting input data for processing, and a registration record control command that provides a process targeting a registration record for processing.
The input record control command provides a process for the input data identified by the first image. For example, the input record control command provides a process of restricting the output of part of the input data. Moreover, the input record control command provides a process of notifying that the input data has been output to the outside. Moreover, the input record control command provides a process of dividing the input data into pieces. Furthermore, the input record control command provides a process of combining the plurality of pieces of input data into one.
Moreover, the registration record control command provides a process for data to be stored in the storage area identified by the second image. For example, the registration record control command provides a process of notifying that data has been added in the storage area identified by the second image.
The activation unit 457 identifies a two-dimensional barcode providing a command, as the third image, from a plurality of two-dimensional barcodes input from the image extraction unit 453. Specifically, a two-dimensional barcode including attribute information indicating to be a command is identified. The activation unit 457 uses the command included in the identified two-dimensional barcode to execute the process.
The activation unit 457 includes an input record control unit 481 and a registration record control unit 483. If the command included in the two-dimensional barcode identified as the third image among the plurality of two-dimensional barcodes input from the image extraction unit 453 is the input record control command, the input record control unit 481 executes a process specified by the input record control command, on the input data identified by the first image. The input record control unit 481 causes a computer that stores the record identified by the first image to execute the input record control command. Hence, the input record control unit 481 outputs the input record control command to the partial data acquisition unit 467 to cause the computer that stores the input data identified by the first image to execute the input record control command.
If having received an input of the input record control command from the input record control unit 481, the partial data acquisition unit 467 transmits, to the server 500, a record transmission request including the input record control command. If the record transmission request includes the input record control command, the server 500 executes the input record control command, and executes a process provided by the input record control command on the extracted record. For example, if the input record control command provides a process of restricting the output of one or more items of the plurality of items of the first type constituting a plurality of records included in the first table, the server 500 generates and replies with a record excluding data of the restricted one or more items. Moreover, if the input record control command includes an electronic mail address, and provides a process of notifying that the record identified by the record determination information has been output to the outside, the server 500 generates and transmits an electronic mail including a message that notifies that the record has been output to the outside, the electronic mail having the electronic mail address set as the destination. Moreover, if the input record control command provides a process of dividing the plurality of items constituting a record included in the first table into a first record including only a plurality of first items, and a second record including only a plurality of second items, the record is divided into the first record including only the plurality of first items, and the second record including only the plurality of second items. For example, the record of the first table illustrated in FIG. 6 is divided into the first record including only “name,” “date of birth,” “gender,” “blood type,” “home,” and “educational background” under first item, and the second record including only “name,” “date of birth,” “gender,” “blood type,” “company,” and “educational background” under first item. The first and second records are different in a point that while the first record does not include the first item “company” but includes the first item “home,” the second record does not include the first item “home” but includes the first item “company.” Furthermore, if the input record control command provides a process of converting a plurality of records into one combined record with a plurality of items, one record is generated where a common value among the plurality of records is set in items having the same set value among the plurality of records, the same items having different set values are added as separate items, and the values set respectively in the plurality of records are set in the added separate items.
The input record control unit 481 may execute the input record control command. In this case, the partial data acquisition unit 467 is required to acquire, from the server 500, the input data identified by the first image, here, the record included in the first table, and the input record control unit 481 is required to execute the input record control command on the acquired record. In this case, the partial data acquisition unit 467 does not need to set the input record control command in the record transmission request.
If the command included in the two-dimensional barcode identified as the third image among the plurality of two-dimensional barcodes input from the image extraction unit 453 is the registration record control command, the registration record control unit 483 executes a process identified by the registration record control command, on data to be registered in the storage area identified by the second image. The registration record control unit 483 causes a computer that stores the storage area identified by the second image to execute the registration record control command. Hence, the registration record control unit 483 outputs the registration record control command to the registration record addition unit 471 in order to cause the computer that stores the storage area identified by the second image to execute the registration record control command.
If having received the input of the registration record control command from the registration record control unit 483, the registration record addition unit 471 transmits an addition request including the registration record control command to the server 500A.
If the addition request includes the registration record control command, the server 500A adds the registration record and then executes the registration record control command. For example, if the registration record control command includes an electronic mail address and provides a process of notifying that the registration record has been added, the server 500A generates and transmits an electronic mail including a message notifying that the registration record has been added, the electronic mail having the electronic mail address set as the destination.
The registration record control unit 483 may execute the registration record control command. In this case, the registration record addition unit 471 does not need to include the registration record control command in the addition request.
FIG. 11 is a first diagram illustrating an example of a captured image captured by the camera of the HMD. With reference to FIG. 11, the captured image includes the first card 601 and the second card 602. The first card 601 includes the image 601A being the first image. The second card 602 includes the image 602A being the second image.
FIG. 12 is a diagram illustrating an example of an edit screen displaced on the HMD. Here, an example is illustrated of the edit screen displayed on the display unit 404 if the captured image illustrated in FIG. 11 is output from the camera 402. With reference to FIG. 12, the edit screen includes an area 711 indicating a process content, an area 713 indicating the current status, and an area 715 displaying a registration record. The area 711 includes a message indicating the content of a process to be executed by the HMD 400. The message is created by the edition unit 475 using a name “registration destination list (type. B_*)” assigned to the second table, and a name “database (type. A_*)” assigned to the first table. The message is “Data of the database (type. A_*) is registered in the registration destination list (type. B_*).” The user can recognize the process to be executed by the HMD 400 by looking at the message displayed in the area 711.
The area 713 includes a message indicating the status of the process to be executed by the HMD 400. The message includes the message: “The registration record can be edited.” “Do you want to register it?” The user who reads the messages displayed in the area 713 can recognize that the HMD 400 is on standby for the input of the user's operation.
A registration record is displayed in the area 715. The user can edit the registration record with the operating unit 406. If the user edits the registration record, the edited registration record is displayed in the area 715. Consequently, the user can check the edition content by looking in the area 715.
FIG. 13 is a second diagram illustrating an example of a captured image captured by the camera of the HMD. With reference to FIG. 13, the captured image includes the first card 601, the second card 602, and a third card 603. The first card 601 includes the image 601A being the first image. The second card 602 includes the image 602A being the second image. The third card 603 includes an image 603A being the third image. The image 603A being the third image includes a command indicating a predetermined process, and attribute information indicating to be a command. A description is given here taking, as an example, a case where the command is the input record control command that provides a process targeting input data for processing. For example, in a case of outputting any of the second item names “zip code,” “address,” “telephone number,” “mobile phone,” and “electronic mail address” in the first table illustrated in FIG. 6, the input record control command provides a process of outputting the first item name “job” on a priority basis. In this case, in the first table-specific conversion table, the second item name “zip code,” the second item name “address,” the second item name “telephone number,” the second item name “mobile phone,” and the second item name “electronic mail address” for the first item name “job” of the first table are respectively associated with the item name “zip code” of the basic item table, the item name “address” of the basic item table, the item name “telephone number” of the basic item table, the item name “mobile phone” of the basic item table, and the item name “electronic mail address” of the basic item table.
<Modification of the Association Unit 465>
The association unit 465 in a modification compares the item names of the plurality items of the second types with the item names of the plurality of items of the first type, and associates the items of the first and second types, the items having the same or similar item name. Moreover, a group of a plurality of the same or similar item names may be predetermined to associate items of the first and second types, the items belonging to the same group.
FIG. 14 is a diagram illustrating an example of the flow of a data registration process. The data registration process is a process to be executed by the CPU 401 included in the HMD 400 by the CPU 401 executing the program stored in the flash memory 403. With reference to FIG. 14, the CPU 401 sets “0” being an initial value for each of variables M, N, P, and Q (Step S01). The variable M is a variable for counting the first images. The first image identifies input data. Accordingly, the variable M is also a variable for counting the number of pieces of input data. The variable N is a variable for counting the second images. The second image identifies a storage area. Accordingly, the variable N is also a variable for counting the number of storage areas. The variable P is a variable for counting the input record control commands. The variable Q is a variable for counting the number of the registration record control commands.
In the next Step S02, the camera 402 is controlled to capture an image of a subject. The processing is advanced to Step S03. In Step S03, it is determined whether or not a two-dimensional barcode has been extracted from the captured image obtained by the camera 402 capturing and outputting the image of the subject. If a two-dimensional barcode has been extracted, the processing is advanced to Step S04. If not, the processing is returned to Step S02.
In Step S04, a two-dimensional barcode classification process is executed to advance the processing to Step S05. Although the details of the two-dimensional barcode classification process are described later, it is a process of classifying the two-dimensional barcode extracted in Step S02 as any of the first, second, and third images, and counting the number of each of pieces of input data, storage areas, input record control commands, and registration record control commands.
In Step S05, it is determined whether or not the number M of first images and the number N of second images are respectively one or more. If there are at least one first image and one second image, the processing is advanced to Step S06. If not, the processing is returned to Step S02. If at least one first image and one second image have not been extracted, the processing of Step S04 and later is not executed. In other words, the processing of Step S04 or later is executed if at least one piece of input data and one storage area are provided.
In Step S06, an initial value “1” is set for a variable j. The processing is advanced to Step S07. The variable j is a variable for identifying a second image targeted for processing. In Step S07, the j-th second image is selected as the processing target. The processing is advanced to Step S08.
In Step S08, a registration record generation process is executed. The processing is advanced to Step S09. Although the details of the registration record generation process are described later, it is a process of generating a registration record based on the j-th second image and the first to the M-th first images.
In Step S09, the registration record generated in Step S08 is displayed on the display unit 404. The processing is advanced to Step S10. In Step S10, it is determined whether or not to have accepted an edition instruction. It is determined whether or not the operating unit 406 has accepted the user's edition instruction. If the edition instruction has been accepted, the processing is advanced to Step S11. If not, the processing is advanced to Step S12. In Step S11, the registration record is edited following the edition instruction. The processing is returned to Step S10.
In Step S12, it is determined whether or not to have accepted the user's permission. It is determined whether or not the operating unit 406 has accepted the user's permission. If the user's permission has been accepted, the processing is advanced to Step S13. If not, the processing is returned to Step S10. In Step S13, a registration record addition process is executed. The processing is advanced to Step S14. Although the details of the registration record addition process are described later, it is a process of storing the registration record generated in Step S08, or the edited registration record if the registration record has been edited in Step S11, based on the j-th second image.
In Step S14, the variable j is incremented to advance the processing to Step S15. This is for changing the processing target second image. In Step S15, it is determined whether or not the variable j is greater than the variable N. If the variable j is greater than the variable N, it is determined that the process that targets all the second images for processing has been executed. The processing is then ended. If not, the processing is returned to Step S07.
FIG. 15 is a flowchart illustrating an example of the flow of the two-dimensional barcode classification process. The two-dimensional barcode classification process is the process executed in Step S04 of FIG. 14. At the step before the execution of the two-dimensional barcode classification process, one or more two-dimensional barcodes have been extracted. With reference to FIG. 15, the CPU 401 selects one of the one or more two-dimensional barcodes as the processing target (Step S21). It is determined whether or not the two-dimensional barcode selected as the processing target in Step S21 is the first image (Step S22). Specifically, it determined whether or not the attribute information included in the selected two-dimensional barcode indicates input data. If the attribute information indicates input data, the selected two-dimensional barcode is determined to be the first image. The processing is advanced to Step S23. If not, the processing is advanced to Step S25. In Step S23, the variable M indicating the number of pieces of input data is incremented. The processing is advanced to Step S24. In Step S24, the two-dimensional barcode is set as the M-th first image. The processing is advanced to Step S25.
In Step S25, it is determined whether or not the two-dimensional barcode selected as the processing target in Step S21 is the second image. Specifically, it is determined whether or not the attribute information included in the selected two-dimensional barcode indicates a storage area. If the attribute information indicates a storage area, the selected two-dimensional barcode is determined to be the second image. The processing is advanced to Step S26. If not, the processing is advanced to Step S28. In Step S26, the variable N indicating the number of storage areas is incremented. The processing is advanced to Step S27. In Step S27, the two-dimensional barcode is set as the N-th second image. The processing is advanced to Step S28.
In Step S28, it is determined whether or not the two-dimensional barcode selected as the processing target in Step S21 is the third image. Specifically, it is determined whether or not the attribute information included in the selected two-dimensional barcode indicates a command. If the attribute information indicates a command, the selected two-dimensional barcode is determined to be the third image. The processing is advanced to Step S29. If not, the processing is advanced to Step S35. In Step S29, it is determined whether or not the command included in the two-dimensional barcode is the input record control command. If the two-dimensional barcode includes the input record control command, the processing is advanced to Step S30. If not, the processing is advanced to Step S32. In Step S30, the variable P indicating the number of input record control commands is incremented. The processing is advanced to Step S31. In Step S31, the input record control command included in the two-dimensional barcode is set as the P-th input record control command. The processing is advanced to Step S35.
In Step S32, it is determined whether or not the command included in the two-dimensional barcode is the registration record control command. If the two-dimensional barcode includes the registration record control command, the processing is advanced to Step S33. If not, the processing is advanced to Step S35. In Step S33, the variable Q indicating the number of registration record control commands is incremented. The processing is advanced to Step S34. In Step S34, the registration record control command included in the two-dimensional barcode is set as the Q-th registration record control command. The processing is advanced to Step S35.
In Step S35, it is determined whether or not there is a two-dimensional barcode that has not been selected as the processing target. If there is an unprocessed two-dimensional barcode, the processing is returned to Step S21. If not, the processing is returned to the data registration process.
FIG. 16 is a flowchart illustrating an example of the flow of the registration record generation process. At the step before the execution of the registration record generation process, one i-th first image and one j-th second image have been selected. Moreover, if the variable P is one or greater, P input record control commands have been determined. For the sake of description, a description is given here taking, as an example, of a case where the first first image and the first second image have been selected. Furthermore, a description is given taking, as an example, a case where: The first first image includes the record determination information for identifying a record; The record determination information includes the network address of the first table stored in the server 500, and the user identification information for identifying the user A as the record identification information; The first second image includes the table determination information for identifying a storage destination; The table determination information is the network address of the second table stored in the server 500A. The first first image is hereinafter simply referred to as the first image, and the first second image as the second image.
With reference to FIG. 16, the CPU 401 acquires the first item information based on the first image (Step S41). The server 500 is identified based on the network address of the first table included in the record determination information included in the first image. The wireless LAN I/F 405 is controlled to transmit a first item information transmission request to the server 500 and receive the first item information transmitted by the server 500. The first item information indicates a format of the first table, and includes an item name of each of the plurality of items of the first type constituting a record included in the first table, and the data format and the size of a value set in the item.
In the next Step S42, the initial value “1” is set for a variable i. The processing is advanced to Step S43. The variable i is a variable for identifying a first image targeted for processing. In Step S43, the i-th first image is selected as the processing target. The processing is advanced to Step S43.
In the next Step S44, the record determination information included in the first image selected as the processing target is set in a record transmission request. The processing is advanced to Step S45. In Step S45, the variable i is incremented. The processing is advanced to Step S46. This is for changing the processing target first image. In Step S46, it is determined whether or not the variable i is greater than the variable M. If the variable i is greater than the variable M, it is determined that the processing of Step S44 has been executed targeting all the first images for processing. The processing is advanced to Step S47. If not, the processing is returned to Step S43. If the processing is advanced to Step S47, M pieces of record determination information included respectively in the first to the M-th first images are set in the record transmission request.
In Step S47, the second item information is acquired based on the second image. The server 500A is identified based on the network address of the second table, which is the table determination information included in the second image. The wireless LAN I/F 405 is controlled to transmit a second item information transmission request to the server 500A and receive the second item information transmitted by the server 500A. The second item information indicates a format of the second table, and includes an item name of each of the plurality of items of the second type constituting a record included in the second table, and the data format and the size of a value set in the item.
In the next Step S48, association information is generated. Association information where each of the plurality of items of the second type is associated with any of the plurality of items of the first type is generated based on the first item information acquired in Step S41, and the second item information acquired in Step S47. For example, the first table-specific conversion table that provides items corresponding between the basic item table and the first table and the second table-specific conversion table that provides items corresponding between the basic item table and the second table are used to determine a basic item associated with an item of the second type in the second table-specific conversion table, for each of the plurality of items of the second type, and associate the determined basic item with an item of the first type associated with the determined basic item in the first table-specific conversion table. Accordingly, the association information is generated.
In the next Step S49, the first item information and the association information is used to determine a target item. The processing is advanced to Step S50. Specifically, with reference to the association information, one or more items of the first type associated with any of the plurality of items of the second type among the plurality of items of the first type are set as the target item(s). In the next Step S50, the one or more target items are set in a record transmission request.
In Step S51, the initial value “1” is set for a variable k. The variable k is a variable that identifies an input record control command targeted for processing. In the next Step S52, it is determined whether or not the variable k is greater than the variable P. The variable P is a value set in the above-mentioned two-dimensional barcode classification process, and indicates the number of input record control commands. If the variable k is greater than the variable P, the processing is advanced to Step S55. If not, the processing is advanced to Step S53. In Step S53, the k-th input record control command is set in the record transmission request. The processing is advanced to Step S54. In Step S54, the variable k is incremented. The processing is returned to Step S52. This is for changing the processing target input record control command.
In Step S55, the record transmission request is transmitted. The processing is advanced to Step S56. Specifically, the server 500 is identified based on the network address of the first table included in the record determination information included in each of the first to the M-th first images. The wireless LAN I/F 405 is controlled to transmit the record transmission request to the server 500. The record transmission request includes the record determination information set in Step S44, item identification information for identifying the one or more target items set in Step S50, and the input record control command set in Step S53 if Step S53 is executed.
The server 500, which receives the record transmission request, extracts a record identified by the record determination information from the plurality of records included in the first table, and replies with the extracted record. Hence, in the next Step S55, it is determined whether or not the wireless LAN I/F 405 has received the record with which the server 500 replied. If it is in a standby status until receipt of the record from the server 500 (NO in Step S55), and then the record is received from the server 500 (YES in Step S55), the processing is advanced to Step S56.
In Step S56, partial data composed of the values set in the target items identified in Step S49 among the plurality of items of the first type is generated for the record received in Step S55. The processing is advanced to Step S57.
In Step S57, the partial data is converted into a registration record. The processing is returned to the data registration process. Specifically, a registration record is generated based on the partial data generated in Step S56, the association information generated in Step S48, and the second item information. The registration record is data obtained by converting data set in the one or more target items included in the partial data into data of the corresponding items of the second type. Specifically, the values set in the target items of the partial data are in the data format and the size that are provided in the first item information. Accordingly, the values set in the target items of the partial data are converted into the data format and the size that are provided in the second item information for the items of the second type associated by the association information with the target items. Accordingly, the registration record is generated.
In Step S56, a plurality of pieces of partial data is received in a case where there is a plurality of first images, and a case where even if there is one first image, the input record control command provides a process of dividing the record identified by the record determination information into a plurality of records. In Step S56, if a plurality of records is received from the server 500 in Step S55, a plurality of pieces of partial data is respectively generated based on the plurality of received records. Moreover, in Step S57, the plurality of pieces of partial data is converted into a plurality of registration records.
Moreover, FIG. 16 illustrates the case where all of the plurality of records identified respectively by the first to the M-th first images are registered in the same table, here, the first table. However, if the plurality of records identified respectively by the first to the M-th first images is registered in different tables, the first to the M-th first images are required to be grouped according to the tables where they are registered and execute the registration record generation process illustrated in FIG. 16 according to the plurality of groups.
FIG. 17 is a flowchart illustrating an example of the flow of the registration record addition process. The registration record addition process is the process executed in Step S15 of FIG. 14. At the step before the execution of the registration record addition process, a second image targeted for processing has been determined, and a registration record has been generated. Moreover, if the variable Q is one or greater, Q registration record control commands have been determined. With reference to FIG. 17, the CPU 401 sets second table determination information included in the second image, in an addition request (Step S61). In the next Step S62, the registration record is set in the addition request.
In the next Step S63, the initial value “1” is set for a variable l. The variable l is a variable that identifies a registration record control command targeted for processing. In the next Step S64, it is determined whether or not the variable l is greater than the variable Q. The variable Q is a value set in the above-mentioned two-dimensional barcode classification process, and indicates the number of registration record control commands. If the variable l is greater than the variable Q, the processing is advanced to Step S67. If not, the processing is advanced to Step S65. In Step S65, the l-th registration record control command is set in the addition request. The processing is advanced to Step S66. In Step S66, the variable l is incremented. The processing is returned to Step S64. This is for changing the processing target registration record control command.
In Step S67, the addition request is transmitted based on the second image. The processing is returned to the data registration process. Specifically, the server 500A is identified based on the network address of the first table, which is the table determination information included in the second image. The wireless LAN I/F 405 is controlled to transmit the addition request to the server 500A. The addition request includes the table determination information set in Step S61, the registration record set in Step S62, and the registration record control command set in Step S65 if Step S65 is executed. In the server 500A, which receives the addition request, the registration record included in the addition request is added to the second table identified by the table determination information included in the addition request after the receipt of the addition request.
FIG. 18 is a diagram illustrating an example of the flow of a table management process. The table management process is a process to be executed by the CPU 501 included in the server 500 by the CPU 501 executing the program stored in the ROM 502, the HDD 504, or the CD-ROM 509. Moreover, it is a process to be executed by the CPU 501A included in the server 500A by the CPU 501A executing the program stored in the ROM 502A, the HDD 504A, or the CD-ROM 509A. A description is given here taking, as examples, a case where the CPU 501 included in the server 500 executes Steps S101 to S109, and a case where the CPU 501A included in the server 500A executes Steps S110 to S115.
With reference to FIG. 18, the CPU 501 included in the server 500 determines whether or not to have received a record transmission request (Step S101). It is determined whether or not the communication unit 505 has received a record transmission request from the HMD 400 being the information processing apparatus. If a record transmission request has been received, the processing is advanced to Step S102. If not, the processing is advanced to Step S110.
In Step S102, the record determination information is extracted from the received record transmission request. A first table stored in the HDD 504 is identified based on the network address of the first table included in the record determination information (Step S103). A record where user identification information same as the user identification information included in the record determination information is set from a plurality of records included in the identified first table (Step S104).
In the next Step S105, it is determined whether or not the record transmission request received in Step S101 includes the input record control command. If the input record control command is included, the processing is advanced to Step S106. If not, the processing is advanced to Step S107. In Step S106, the input record control command is executed. The processing is advanced to Step S107. For example, if the input record control command provides a process of restricting the output of part of the plurality of items constituting a record included in the first table, when the record extracted in Step S104 includes the restricted item, the value set in the restricted item is erased from the record. Moreover, if the input record control command includes an electronic mail address, and provides a process of notifying that the record identified by the record determination information has been output to the outside, an electronic mail is generated and transmitted which includes a message notifying that the record extracted in Step S104 has been output to the outside, and has the electronic mail address set as the destination address. Moreover, if the input record control command provides a process of dividing the record into a plurality of records, the record extracted in Step S104 is divided into a plurality of records. For example, if the input record control command provides a process of making a division into a first record including only a plurality of first items and a second record including only a plurality of second items, the record extracted in Step S104 is divided into the first record including only the plurality of first items and the second record including only the plurality of second items. Furthermore, if the input record control command provides a process of converting a plurality of records into one combined record including a plurality of items, the record transmission request received in Step S101 includes a plurality of pieces of record determination information, and a plurality of records identified respectively by the plurality of pieces of record determination information is extracted in Step S104. Hence, a new record is generated which includes a plurality of new items corresponding respectively to items having the same set value among the plurality of records extracted in Step S104, and to items having different set values among the plurality of records. Common values among the plurality of records are set in the items of the generated record, the items having the same set values among the plurality of records. A plurality of values set in the items having different set values among the plurality of records is respectively set in the plurality of new items. Accordingly, one record is generated.
In Step S107, the record extracted in Step S104, or the record on which the input record control command has been executed in Step S106 if Step S106 is executed, is returned, via the communication unit 505, to an apparatus that transmitted the record transmission request. The processing is advanced to Step S110.
The CPU 501A included in the server 500A determines whether or not to have received an addition request in Step S110. It is determined whether or not the communication unit 505 has received an addition request from the HMD 400 being the information processing apparatus. If an addition request has been received, the processing is advanced to Step S111. If not, the processing is returned to Step S101.
In Step S111, the registration record is extracted from the received addition request. The second table stored in the HDD 504 is identified based on the table determination information included in the addition request (Step S112). The registration record is added to the identified second table (Step S113). The processing is advanced to Step S114.
In the next Step S114, it is determined whether or not the received addition request includes the registration record control command. If the registration record control command is included, the processing is advanced to Step S115. If not, the processing is returned to Step S101. The registration record control command is executed in Step S115. The processing is returned to Step S101. For example, if the registration record control command includes an electronic mail address, and provides a process of notifying that a registration record has been added, an electronic mail is generated and transmitted which includes a message notifying that a registration record has been added, and has the electronic mail address set as the destination address.
The above-mentioned embodiment has been described taking the HMD 400 as an example of the information processing apparatus. However, the mobile information apparatus 200 may be caused to function as the information processing apparatus. In this case, the CPU 201 included in the mobile information apparatus 200 has similar functions to those illustrated in FIG. 9, and executes the data registration process illustrated in FIGS. 14 to 17.
<First Modification>
The above-mentioned embodiment has illustrated, as an example, the case where the second table being a storage area is stored in the server 500A. The MFP 100 may store the second table being a storage area in the HDD 115. In this case, it is so configured that the second image 602A is displayed on the display unit 161 included in the operation panel 160 of the MFP 100, and the second image 602A displayed on the display unit 161, and the first image 601A depicted in the first card 601 are captured by the HMD 400 or the mobile information apparatus 200 that is the information processing apparatus. Furthermore, the HMD 400 or the mobile information apparatus 200 that is the information processing apparatus may capture the second image 602A displayed on the display unit 161, the first image 601A depicted on the first card 601, and the third image 603A depicted on the third card 603. The third image 603A may be displayed on the display unit 161 of the MFP 100. In this case, the CPU 111 included in the MFP 100 executes the table management process illustrated in FIG. 18.
<Second Modification>
The input data may be personal information stored by the mobile information apparatus 200 in the flash memory 203. The first table may be an address book stored by the mobile information apparatus 200 in the flash memory 203. In this case, it is so configured that in response to that the user of the mobile information apparatus 200 designates personal information or one record of the address book, the mobile information apparatus 200 displays, on the display unit 206, the two-dimensional barcode being the first image 601A including information identifying the designated personal information, or the record determination information of the record, and the HMD 400 being the information processing apparatus captures the first image 601A displayed on the display unit 206 of the mobile information apparatus 200, and the second image 602A depicted on the second card 602. Furthermore, the HMD 400 being the information processing apparatus may capture the first image 601A displayed on the display unit 206 of the mobile information apparatus 200, the second image 602A depicted on the second card 602, and the third image 603A depicted on the third card 603. The third image 603A may be displayed on the display unit 206 of the mobile information apparatus 200. Moreover, the CPU 201 included in the mobile information apparatus 200 executes the table management process illustrated in FIG. 18.
<Third Modification>
The input data may be personal information stored by the mobile information apparatus 200 in the flash memory 203. The first table may be an address book stored by the mobile information apparatus 200 in the flash memory 203. The MFP 100 may store the second table being a storage area in the HDD 115. In this case, it is so configured that in response to that the user of the mobile information apparatus 200 designates personal information or one record of the address book, the mobile information apparatus 200 displays, on the display unit 206, the two-dimensional barcode being the first image 601A including information identifying the designated personal information or the record determination information of the record. Moreover, it is so configured that the second image 602A is displayed on the display unit 161 included in the operation panel 160 of the MFP 100. The HMD 400 being the information processing apparatus is required to capture the first image 601A displayed on the display unit 206 of the mobile information apparatus 200, and the second image 602A displayed on the display unit 161 of the MFP 100. Furthermore, the HMD 400 being the information processing apparatus is required to capture the first image 601A displayed on the display unit 206 of the mobile information apparatus 200, the second image 602A displayed on the display unit 161 of the MFP 100, and the third image 603A depicted on the third card 603. The third image 603A may be displayed on the display unit 206 of the mobile information apparatus 200 and/or on the display unit 161 of the MFP 100. In this case, the CPU 111 included in the MFP 100 and the CPU 201 included in the mobile information apparatus 200 each execute the table management process illustrated in FIG. 18.
As described above, the HMD 400 according to the embodiment functions as the information processing apparatus, extracts the image 601A being the first image and the image 602A being the second image from a captured image obtained by the camera 402 capturing an image of the first card 601 and the second card 602 and outputting it, and stores a record of the first table stored in the server 500 identified by the image 601A being the first image, in the second table stored in the server 500A identified by the image 602A being the second image. Hence, a record included in the first table stored in the server 500A is added to the second table stored in the server 500A with a simple operation to capture the image 601A being the first image and the image 602A being the second image. Accordingly, it is possible to facilitate data registration.
Moreover, the first item information is acquired which relates to the plurality of items of the first type constituting a record of the first table stored in the server 500. The second item information is acquired which relates to the plurality of items of the second type constituting a record of the second table stored in the server 500A. Each of the plurality of items of the second type is associated with any of the plurality of items of the first type. The record of the first table is converted into data of corresponding items among the plurality of items of the second type. Hence, the record of the first table can be stored in the second table in agreement with the configuration of a record stored in the second table.
Moreover, data of items associated respectively with the plurality of items of the second type among the plurality of items of the first type of the record of the first table is acquired as partial data. Data of at least one item included in the partial data is converted into data of a corresponding item among the plurality of items of the second type of the record of the second table. Hence, only a part necessary to be stored in the second table is acquired from the record of the first table. Accordingly, the processing can be simplified.
Moreover, the first association table and the second association table are used to associate each of the plurality of items of the second type with any of the plurality of items of the first type. Accordingly, even if a record of the first table is different in configuration from a record to be stored in the second table, the record of the first table can be stored in the second table.
Moreover, an item name of each of the plurality of items of the first type constituting a record of the first table is compared with an item name of each of the plurality of items of the second type constituting a record of the second table. The same or similar items are associated. Accordingly, each of the plurality of items of the second type can be associated with any of the plurality of items of the first type.
Moreover, if the image 603A being the third image is extracted, the process provided by the image 603A being the third image is executed. Therefore, another process, in addition to the process of storing a record of the first table in the second table, can be executed by capturing the image 601A being the first image, the image 602A being the second image, and the image 603A being the third image.
If the third image 603A provides the input data control command providing a process that targets, for processing, the input data identified by the image 603A being the first image, a process that targets a record of the first table for processing can be executed.
Moreover, if the image 603A being the third image provides the registration data control command providing a process that targets, for processing, a record registered in the second table, a process that targets, for processing, a record registered in the second table can be executed.
Moreover, the image 601A being the first image and the image 602A being the second image are extracted from a single captured image obtained by the camera 402 capturing an image of subjects and outputting it. Accordingly, a record of the first table can be stored in the second table in single image capture.
Moreover, the image 601A being the first image and the image 602A being the second image are extracted from a plurality of captured images obtained by the camera 402 capturing an image of a subject several times and outputting them. Accordingly, the plurality of captured images captured at different times is used to enable the storage of a record of the first table in the second table.
In the above-mentioned embodiment, the data registration system 1 has been described. However, it is needless to say that in the present invention, the data registration process illustrated in FIGS. 14 to 17 can be interpreted as a data registration method to be executed by the HMD 400 or the mobile information apparatus 200, or the data registration program to cause the CPU 401 included in the HMD 400 or the CPU 201 included in the mobile information apparatus 200 to execute the data registration method.
One or more first images and one or more second images are required to be captured. If the number of first images is set to more than one, a plurality of pieces of input data identified respectively by the plurality of first images can be stored in a storage area identified by the second image. Moreover, if the number of second images is set to more than one, input data identified by the first image can be stored in a plurality of storage areas identified respectively by the second images.
Furthermore, if the third image, in addition to one or more first images and one or more second images, is captured, the number of third images may be more than one. A plurality of processes identified by the plurality of third images can be executed on each of one or more pieces of input data identified respectively by the one or more first images. The plurality of processes identified respectively by the plurality of third images can be executed on each of one or more pieces of data stored respectively in one or more storage areas identified respectively by the one or more second images.
Although the present invention has been described and illustrated in detail, it is clearly understood that the same is by way of illustrated and example only and is not to be taken byway of limitation, the scope of the present invention being interpreted by terms of the appended claims. The scope of the present invention is intended to include equivalent meanings to the claims, and all changes within the scope of the claims.
What is claimed is:
1. An information processing apparatus comprising: an imaging device including an image sensor configured to capture an image of a subject; and a processor configured to: extract a first image and a second image of a predetermined shape from the captured image of the subject captured and output by the imaging device, the first image identifying input data stored in a first storage area, and the second image identifying a second storage area which is different from the first storage area; and upon extracting the first image and the second image, acquire the input data identified by the first image from the first storage area, and store the input data identified by the first image in the second storage area identified by the second image, wherein the input data identified by the first image is different from the first image itself.
2. The information processing apparatus according to claim 1, wherein the processor: acquires first item information related to a plurality of items of a first type constituting the input data identified by the first image, acquires second item information related to a plurality of items of a second type constituting data to be stored in the second storage area identified by the second image, associates each of the plurality of items of the second type with any of the plurality of items of the first type based on the first item information and the second item information, generates registration data by converting the input data, identified by the first image, into data of a corresponding item of the plurality of items of the second type, and stores the generated registration data in the second storage area.
3. The information processing apparatus according to claim 2, wherein the processor: acquires, as partial data, data of items associated respectively with the plurality of items of the second type, among the plurality of items of the first type of the input data identified by the first image, and converts data of at least one item included in the acquired partial data into data of a corresponding item of the plurality of items of the second type.
4. The information processing apparatus according to claim 2, wherein the processor uses a first association table that associates each of the plurality of items of the first type with any of a plurality of basic items, and a second association table that associates each of the plurality of items of the second type with any of the plurality of basic items to associate each of the plurality of items of the second type with any of the plurality of items of the first type.
5. The information processing apparatus according to claim 2, wherein the processor compares an item name of each of the plurality of items of the first type included in the first item information with an item name of each of the plurality of items of the second type included in the second item information.
6. The information processing apparatus according to claim 1, wherein the processor is further configured to, upon extracting a third image in addition to the first image and the second image, the third image providing a predetermined process, execute the process provided by the third image.
7. The information processing apparatus according to claim 6, wherein the predetermined process includes a process targeting the input data identified by the first image for processing.
8. The information processing apparatus according to claim 6, wherein the processor: acquires first item information related to a plurality of items of a first type constituting the input data identified by the first image, acquires second item information related to a plurality of items of a second type constituting data to be stored in the second storage area identified by the second image, associates each of the plurality of items of the second type with any of the plurality of items of the first type based on the first item information and the second item information, generates registration data by converting the input data, identified by the first image, into data of a corresponding item of the plurality of items of the second type, and stores the generated registration data in the second storage area; and wherein the predetermined process includes a process targeting the registration data to be stored for processing.
9. The information processing apparatus according to claim 1, wherein the processor extracts the first and second images from a single captured image captured and output by the imaging device.
10. The information processing apparatus according to claim 1, wherein the processor extracts the first and second images respectively from a plurality of captured images captured and output by the imaging device.
11. The information processing apparatus according to claim 1, wherein: the first and the second image are two-dimensional barcodes, the first image includes location information indicating a location of the input data, and the second image includes location information indicating a location of the second storage area.
12. The information processing apparatus according to claim 1, further comprising: a display configured to display an image, wherein the processor is further configured to: accept a user's permission operation, display the registration data on the display, edit the registration data, and store the registration data on the condition that the processor accepts the user's permission operation.
13. A data registration method to be executed by an information processing apparatus including an imaging device which includes an image sensor and is configured to capture an image of a subject, the method comprising: extracting a first image and a second image of a predetermined shape from the captured image of the subject captured and output by the imaging device, the first image identifying input data stored in a first storage area, and the second image identifying a second storage area which is different from the first storage area; and upon extracting the first image and the second image, acquiring the input data identified by the first image from the first storage area, and storing the input data identified by the first image in the second storage area identified by the second image, wherein the input data identified by the first image is different from the first image itself.
14. A non-transitory recording medium storing a computer readable data registration program to be executed by a computer controlling an information processing apparatus including an imaging device which includes an image sensor and is configured to capture an image of a subject, the program causing the computer to execute functions comprising: extracting a first image and a second image of a predetermined shape from the captured image of the subject captured and output by the imaging device, the first image identifying input data stored in a first storage area, and the second image identifying a second storage area which is different from the first storage area; and upon extracting the first image and the second image, acquiring the input data identified by the first image from the first storage area, and storing the input data identified by the first image in the second storage area identified by the second image, wherein the input data identified by the first image is different from the first image itself.
15. An information processing apparatus comprising: an imaging device including an image sensor configured to capture an image of a subject; and a processor configured to: extract an image of a predetermined shape from the captured image of the subject captured and output by the imaging device; and upon extracting a first image identifying input data and a second image identifying a storage area, store the input data identified by the first image in the storage area identified by the second image, wherein the processor is further configured to: acquire first item information related to a plurality of items of a first type constituting the input data identified by the first image, acquire second item information related to a plurality of items of a second type constituting data to be stored in the storage area identified by the second image, associate each of the plurality of items of the second type with any of the plurality of items of the first type based on the first item information and the second item information, generate registration data by converting the input data, identified by the first image, into data of a corresponding item of the plurality of items of the second type, and store the generated registration data in the storage area.
16. The information processing apparatus according to claim 15, wherein the processor: acquires, as partial data, data of items associated respectively with the plurality of items of the second type, among the plurality of items of the first type of the input data identified by the first image, and converts data of at least one item included in the acquired partial data into data of a corresponding item of the plurality of items of the second type.
17. The information processing apparatus according to claim 15, wherein the processor uses a first association table that associates each of the plurality of items of the first type with any of a plurality of basic items, and a second association table that associates each of the plurality of items of the second type with any of the plurality of basic items to associate each of the plurality of items of the second type with any of the plurality of items of the first type.
18. The information processing apparatus according to claim 15, wherein the processor compares an item name of each of the plurality of items of the first type included in the first item information with an item name of each of the plurality of items of the second type included in the second item information.
|
Talk:Qalamoun offensive (May–June 2015)
Battle over?
Its Over or not. Some articles claims fighting its still taking place. http://www.dailystar.com.lb/News/Lebanon-News/2015/May-17/298261-army-pounds-militant-positions-outside-arsal.ashx Mr.User200 (talk) 22:09, 18 May 2015 (UTC)
* The article talks about Lebanese Army artillery strikes against the rebels. I remind the Lebanese Army was not involved in this offensive. EkoGraf (talk) 22:43, 18 May 2015 (UTC)
Victory?
I notice that the sole citation given for the result in the infobox is to a speech by Hassan Nasrallah—a wonderfully impartial source in this matter, I'm sure. Meanwhile, the FP article cited at the very end of the main battle section seems to tell a slightly different tale: "with the battle still unfinished and the sound of explosions continuing to ring in the air"; "Islamic State fighters remain in the northern part of the mountain range, where the battle has yet to come"; "Qalamoun is not Hezbollah’s only ongoing battleground". Comparing this to e.g. 2015 Idlib offensive, where the capture of a provincial capital is qualified as a "partial" victory on the grounds that a nearby area was not captured, one wonders why such "nuance" is not found here. For consistency's sake at least, this should also be called a "partial victory", as there is obviously more to come in this saga. Lothar von Richthofen (talk) 07:19, 4 June 2015 (UTC)
* This article was about the offensive to clear out strongpoints of al-Nusra forces on the Syrian side of the border which all sources confirm at this point (check the latest pro-opposition maps of the area). This was the aim of this specific offensive - al-Nusra; ISIS-held areas were not the target at this time. A separate offensive to clear out ISIS on the Lebanese side of the border, as well as Nusra holdouts near Arsal, is yet to come and has been announced to happen at a point in the near future. The sole citation as you put it does talk about a speech by Hassan Nasrallah where he said they captured most of the mountains, however the source also has a paragraph where it itself confirms most of the area has been captured, regardless of what Nasrallah is saying. Also, something being described as an ongoing battleground does not mean there is an ongoing military operation. However, so there wouldn't be only one source, I will add a few more that are more recent. EkoGraf (talk) 15:48, 4 June 2015 (UTC)
* I have added a source confirming that after capturing dozens of rebel bases Hezbollah managed to push the rebels to the outskirts of Arsal, which is across the border in Lebanon. EkoGraf (talk) 16:03, 4 June 2015 (UTC)
* There is this new source which describes the current fighting at Arsal as a first phase in an assault to clear out rebels from near Arsal. Which means a separate operation from the one that took place across the border in Syria has started. We may create a new article to cover the current Arsal offensive if it becomes notable enough. EkoGraf (talk) 16:04, 4 June 2015 (UTC)
* Fighting has not subsided at all. There are reported battles and advances for the Syrian Arab Army and Hezbollah on an almost daily basis by SOHR, Lebanese news sources, etc. For example, just today I propose we change the tone of the article into ongoing and continue coverage of the operation. - Fedayee (talk) 00:38, 8 June 2015 (UTC)
* Like I said, 90 percent of the current fighting is reported to be on the Lebanese side of the border at Arsal. The previous advances on the Syrian side of the border were part of an operation officially declared to be over and sources even call this new round of fighting a first phase, which means they consider it a new operation. EkoGraf (talk) 11:44, 8 June 2015 (UTC)
* After more operations took place today I have reopened the article. EkoGraf (talk) 19:45, 8 June 2015 (UTC)
I'm quite sure, we shouldn't close the Qalamun offensive with "Hezbollah-led victory". Altough Hezbollah managed to expel the rebels/ISIS from north of the mountains, they have switched to Zabadani which is in this region. Logic ?
* It's a new and separate offensive for which we will most likely create a new article. EkoGraf (talk) 11:31, 7 July 2015 (UTC)
External links modified
Hello fellow Wikipedians,
I have just added archive links to 5 one external links on Qalamoun offensive (May–June 2015). Please take a moment to review my edit. If necessary, add after the link to keep me from modifying it. Alternatively, you can add to keep me off the page altogether. I made the following changes:
* Added archive https://web.archive.org/20150509165329/http://www.syriahr.com:80/en/2015/05/6-fighters-from-the-rebels-and-islamist-groups-killed-in-al-qalamoun-and-information-about-advancement-for-the-battalions-in-the-area/ to http://www.syriahr.com/en/2015/05/6-fighters-from-the-rebels-and-islamist-groups-killed-in-al-qalamoun-and-information-about-advancement-for-the-battalions-in-the-area/
* Added archive https://web.archive.org/20150518095655/http://www.syriahr.com/en/2015/05/hezbollah-advances-in-al-qalamoun-area-while-the-clashes-re-erupt-in-al-yarmouk-camp/ to http://www.syriahr.com/en/2015/05/hezbollah-advances-in-al-qalamoun-area-while-the-clashes-re-erupt-in-al-yarmouk-camp/
* Added archive https://web.archive.org/20150518095658/http://www.syriahr.com/en/2015/05/8-militiamen-of-hezbollah-killed-in-al-qalamoun-in-the-last-48-hours-and-shells-land-on-al-yarmouk-camp/ to http://www.syriahr.com/en/2015/05/8-militiamen-of-hezbollah-killed-in-al-qalamoun-in-the-last-48-hours-and-shells-land-on-al-yarmouk-camp/
* Added archive https://web.archive.org/20150515021051/http://www.syriahr.com:80/en/2015/05/85-killed-during-clashes-in-qalamoun/ to http://www.syriahr.com/en/2015/05/85-killed-during-clashes-in-qalamoun/
* Added archive https://web.archive.org/20150518100643/http://www.syriahr.com/en/2015/05/clashes-air-strikes-and-human-losses-in-reef-dimashq/ to http://www.syriahr.com/en/2015/05/clashes-air-strikes-and-human-losses-in-reef-dimashq/
Cheers.—cyberbot II Talk to my owner :Online 20:34, 26 February 2016 (UTC)
|
devicemapper: create device before inject files
only for dm, this is an issue introduced by #445
Signed-off-by: Wang Xu<EMAIL_ADDRESS>
I suspect there are some other issue with dm, and will push other commits here.
Dont't merge now
Now the dm issues found in the tests are all fixed
|
Style/minor fixes
:rocket: Welcome to Baloise ChatOps based GitOps Bot :tada:
- If you want to enable preview environments for this PullRequest, comment with `/preview`.
- If you want to disable the preview environment for this PR, comment with `/undeploy`.
- If you need help or want to see the docs, comment with `/help`.
Make sure to refresh this page after submitting a command.
Preview environments can be redeployed automatically if you enable the webhook for updates to the source branch. :new:
Have fun building awesome apps! :hammer: :whale2: :truck: :ship:
|
User:Itzz mannish
Itzz Mannish is a student. He is a also software engineer. He was born on unnao Uttar Pradesh in 15 Aug 2002.he is a professional football player & software engineer. He is an influencer and content creator.
The greatest leader is not necessarily the one who does the greatest things. He is the one that gets people to do the greatest things.
|
do u already Play csr2?...
ive seen Commercials about this game...
is it better than asphalt8 ?....comparable?
actually more important is for me now....if their behave is FAIR & HONEST! ....???
Do they care about their customers and dont try to steal their Money with cheap tricks?
what about BUGS?...like this is the main question by now....
|
Image forming apparatus with detection and indication of defective image data
ABSTRACT
An image forming apparatus including a circuit for sequentially generating bit-image data in units of predetermined portions of image data, a circuit for forming an image on an image recording medium using the bit-image data generated by the generating circuit, a circuit for judging whether or not generation of the bit-image data by the generating circuit is performed within a predetermined period of time, and a circuit for, when the judging circuit determines that the generation of the bit-image data is not performed within the predetermined period of time, adding data indicating a detective image to the bit-image data, so that the image forming circuit produces an image on the image recording medium on the basis of the obtained bit-image data.
BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to an image forming apparatus, such as a laser printer, for receiving image data from, e.g., an external apparatus, and printing a recording image on a paper sheet on the basis of received data.
2. Description of the Related Art
Image formation in an image forming apparatus such as a laser printer is attained via, e.g., electrification, exposure, developing, copy, peeling, cleaning, and fixing processes. In such an image forming apparatus, an electrification unit, an exposure unit, a developing unit, a copy unit, a peeling unit, a cleaning unit, and the like are sequentially arranged around a photosensitive drum, and the apparatus also comprises a fixing unit for receiving a paper sheet from the peeling unit. These units are driven upon rotation of the photosensitive drum, thereby executing the above-mentioned image formation processes. In this manner, an image can be formed on a paper sheet.
In a laser printer of this type, a control system is divided into an engine control section for controlling the above-mentioned units to control operations for attaining the image formation processes and a printer control section for controlling operations of the engine control section. The engine and printer control sections are connected by exchanging commands and status data. The printer control section expands image information in units of pages supplied from an external equipment onto a partial memory to generate bit-image data, and then outputs the bit-image data to the engine control section.
In the laser printer, when the printer control section detects, based on the fact that a time required for expanding and generating the bit-image data on the partial memory exceeds a predetermined allowable time, that a defective image is formed, an alarm message for a user is transmitted outside a printer using a display unit incorporated in the printer.
When a continuous print operation including various print contents in units of print pages is performed, the following problem arises. More specifically, even when a time required for expanding and generating bit-image data of a print content of a given page on the partial memory exceeds the allowable time, and a defective image is formed, an alarm message transmitted outside the printer merely indicates that a defective image is formed on a certain page or pages during the continuous print operation, and a page/pages on which a defective image is formed cannot be specified.
SUMMARY OF THE INVENTION
It is an object of the present invention to provide an image forming apparatus which can specify a page or pages on which a defective image is formed when a defective image or images is or are formed on a certain page or pages.
The image forming apparatus of the present invention comprises a circuit for sequentially generating bit-image data in units of predetermined portions of image data; a circuit for forming an image on an image recording medium using the bit-image data generated by the generating circuit; a circuit for judging whether or not generation of the bit-image data by the generating circuit is performed within a predetermined period of time; and a circuit for, when the judging circuit determines that the generation of the bit-image data is not performed within the predetermined period of time, adding data indicating a defective image to the bit-image data, so that the image forming circuit produces an image on the image recording medium on the basis of the obtained bit-image data.
According to the present invention, when continuous image formation is performed on the pages of the image recording medium, if it is determined that generation of bit-image data of a given page is not performed within a predetermined period of time, an image indicating an "image defect" is formed on the page where the image defect occurred.
BRIEF DESCRIPTION OF THE DRAWINGS
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate presently preferred embodiments of the invention, and together with the general description given above and the detailed description of the preferred embodiments given below, serve to explain the principles of the invention.
FIG. 1 is a sectional view showing an internal structure of a laser printer;
FIG. 2 is a block diagram showing an arrangement of main part of an engine control section;
FIG. 3 is a block diagram showing an arrangement of an engine controller;
FIG. 4 is block diagram showing the of main part of the printer control section;
FIGS. 5A to 5C are flow charts showing the operation of the printer controller; and
FIG. 6 shows the state of a paper sheet when a defective image is printed.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
An embodiment of the present invention will be described below with reference to the accompanying drawings.
FIG. 1 shows a structure of an image forming apparatus of the present invention, e.g., an image forming unit apparatus as a laser printer comprising optional equipments.
More specifically, in the image forming unit apparatus, optional equipments such as multi-cassette feeder 2 for feeding paper sheets (normal paper sheets) P having a predetermined thickness, e.g., cut sheets as image recording media into printer 1, envelope feeder 3 for feeding paper sheets (thick sheets) A thicker than the normal sheets such as envelopes as recording media, a jogger as a selector device for distributing paper sheets P or A after image formation in units of predetermined number of sheets, and the like, are connected to laser printer 1.
Multi-cassette feeder 2, envelope feeder 3, and the jogger are connected to a control section (not shown) in the main body of laser printer 1 in an on-line manner. Operation panel 100 (FIG. 2) is arranged on the upper surface of laser printer 1.
In laser printer 1, paper feed cassette 22, feed roller 23, aligning roller pair 25, convey belt 36, gate 38, paper discharge roller pairs 39 and 42, and the like are arranged in addition to a process system, such as laser optical system 12, photosensitive drum 17, electrification unit 18, developing unit 19, copy unit 20, discharging unit 21, peeling unit 35, fixing unit 37, cleaning unit 45, and the like.
Laser optical system 12 comprises a semiconductor laser oscillator (not shown) for generating a laser beam, a collimator lens (not shown) for collimating the laser beam, polygonal mirror (rotary mirror) 13 as a rotary member having an octahedral mirror portion for reflecting the laser beam from the lens for each scanning line, fθ lens 14, mirrors 15 and 16, mirror motor 60 for rotating (driving) polygonal mirror 13, and the like.
In the image forming operation, a laser beam from laser optical system 12 corresponding to an image signal from an external piece of equipment (not shown) (or operation panel 100) is focused on a surface of photosensitive drum 17. Photosensitive drum 17 is rotated in a direction of an arrow in FIG. 1. The surface of drum 17 is charged by electrification unit 18, and then exposed by laser optical system 12 in correspondence with the image signal. More specifically, the laser beam emitted from the semiconductor laser oscillator is scanned at a predetermined speed from the left to the right of photosensitive drum 17 upon rotation of polygonal mirror 13 by mirror motor 60, thereby forming an electrostatic latent image o the surface of drum 17. The latent image is developed by a toner by developing unit 19, thus forming a visual image.
On the other hand, paper sheets P as image recording media in paper feed cassette 22 are picked up one by one by feed roller 23. Each sheet is guided to aligning roller pair 25 via paper guide path 24, and is then fed to a copy section by roller pair 25.
Paper sheet P picked up from paper feed cassette 30 in multi-cassette feeder 2 one by one by feed roller 32 and guided to aligning roller pair 25 via paper guide paths 34 and 29; paper sheet P picked up from paper feed cassette 31 one by one by feed roller 33 and guided to aligning roller pair 25 via paper guide paths 34 and 29; paper sheet A picked up from stacker 26 in envelope feeder 3 one by one by feed roller 27 and guided to aligning roller pair 25 via paper guide paths 28 and 29; or paper sheet P fed from manual paper feed unit 44 and guided to aligning roller pair 25 via paper guide path 29 is fed to the copy section in accordance with an instruction from external equipment or operation panel 100.
Paper sheet P or A fed to the copy section is brought into tight contact with the surface of photosensitive drum 17 on copy unit 20, and the toner image on photosensitive drum 17 is copied onto the sheet upon operation of copy unit 20. Paper sheet P or A on which the toner image is copied is peeled from photosensitive drum 17 upon operation of peeling unit 35, and is fed to fixing unit 37 by convey belt 36. The copied image is thermally fixed on the paper sheet by heat roller 371 for generating heat for a fixing operation. Heat roller 37₁ incorporates heater lamp 37a used for heating.
Paper sheet P or A after the fixing operation is fed onto paper discharge tray 40 by paper discharge roller pair 39 via gate 38. Alternatively, paper sheet A is fed to upper convey path 41 by gate 38, and is exhausted on paper discharge tray 43 movably supported by the jogger by paper discharge roller pair 42.
After the copy operation, any residual toner is removed from photosensitive drum 17 by cleaning unit 45, and any after image erased by discharging unit 21. In this manner, drum 17 is ready for the next image forming operation.
Note that fixing unit 37 has a unit structure (fuser unit), and is independently detachable from printer 1. Aligning switch 48 for detecting a paper feed error to the copy section side is arranged in front of aligning roller pair 25, and paper discharge switches 49a and 49b, for detecting a paper discharge error, are arranged in front of paper discharge roller pairs 39 and 42, respectively.
Paper sensors 50, 51, and 52 for detecting paper sheets P are respectively arranged above paper feed cassettes 22, 30, and 31, thereby detecting the presence/absence of paper sheets P in paper feed cassettes 22, 30, and 31.
An engine control circuit board carrying engine controller 70 for controlling electrical units arranged in printer main body 1 to control operations for executing electrophotographic processes, and a circuit board carrying printer controller 71 for controlling operations of engine controller 70 are arranged above laser optical system 12.
A maximum of three circuit boards for printer controller 71 can be loaded in accordance with a degree of addition of functions (e.g., kinds of fonts, kanji, and the like are expanded). Functions can be further added by inserting IC cards 517 for adding functions in three IC card connectors 72 arranged at the front edge portion of the circuit board for printer controller 71. A connector (not shown) to be connected to host apparatus 409 (to be described later) as an external output unit such as an electronic computer, a word processor or the like is arranged at the left end face portion of the circuit board for printer controller 71.
Operation panel 100 comprises liquid crystal display 100a for displaying a sheet count, a mode, a guide message, and the like, LED indicator 100b for indicating various operating states by turning on LEDs, switch 100c for instructing various operations, and on-line key 100d for switching an on-line/off-line mode.
The arrangement of the engine control section will be described below.
FIG. 2 is a block diagram showing an arrangement of the main part of engine control section 300. In FIG. 2, reference numeral 302 denotes a power supply unit which outputs power supply voltages of +5 V and +24 V when main switch 301 is turned on. The +5 V power supply voltage is supplied to engine controller 70, and is supplied to printer controller 71 via engine controller 70. The +24 V power supply voltage is supplied to engine controller 70 via cover switches 303 and 304 in turn. The power supply voltage is then supplied to scanner controller 101, high voltage power source 305, and mechanism controller 306 via engine controller 70. Scanner controller 101 then supplies the power supply voltage to semiconductor laser 90 and mirror motor 92, and mechanism controller 306 supplies the power supply voltage to pre-exposure unit 21X, main motor 307, manual feed solenoid 308, cassette paper feed solenoid 309, aligning solenoid 310, toner supply solenoid 311, cooling fan 500, and the like as their driving power source.
Power supply unit 302 includes a zero-crossing switch type heater lamp controller (not shown), comprising, e.g., a photo triac coupler and a triac, for driving heater lamp 37a in fixing unit 3. The +24 V voltage is used as a driving power source for a light-emitting LED of the photo triac coupler. In the heater lamp controller with this arrangement, when the light-emitting LED is turned on/off, the light-emitting photo triac is turned on/off at a zero crossing point of an AC power source, thereby turning on/off a triac as a main switch element at the next stage. In this manner, AC power source S1 is supplied to or cut from heater lamp 37a. Heater control signal S2 for turning on/off the light-emitting LED is supplied from engine controller 70 to power supply unit 302, and a temperature signal detected by thermistor 37b arranged in fixing unit 37 is supplied to engine controller 70.
Cover switch 303 is turned off when a top cover (not shown) is pivoted upward, and cover switch 304 is turned off when a rear cover (not shown) is opened. Therefore, when the top or rear cover is opened, the +24 V voltage is cut off by switch 303 or 304, so that operations of semiconductor laser 90, mirror motor 60, high voltage power source 305, main motor 307, solenoids 308, 309, 310, and 311, cooling fan 500, heater lamp 37a, and the like are stopped. As a result, an operator can safely touch the interior of printer main body 1.
FIG. 3 is a block diagram showing the arrangement of engine controller 70. In FIG. 3, CPU 350 controls entire engine control section 300, and is operated in accordance with a control program stored in ROM 351. RAM 352 is used as a working buffer for CPU 350. E² PROM 353 stores a total print count, and the like. Printer interface 354 interfaces exchange of interface signal S3 with printer controller 71.
Laser modulation controller 355 periodically and forcibly turns on semiconductor laser 90 in order to generate laser beam detection signal S4, and modulates semiconductor laser 90 in accordance with image data sent from printer controller 71 in response to interface signal S3. In this case, controller 355 outputs laser modulation signal S5 to scanner controller 101.
Output register 356 outputs control signals S6, S7, S8, and S2 for respectively controlling mechanism controller 306, high voltage power source 305, scanner controller 101, and the heater lamp controller. A/D converter 357 receives voltage signals S9 and S10 generated by thermistor 37b and toner sensor 324, and converts these voltage values into digital values. Input register 358 receives state signals S11, S12, S13, S14, S15, and S17 from paper empty switch 320, manual feed switch 321, paper discharge switch 49a and 49b, mount switch 323, aligning switch 48, and paper sensors 50, 51, 52, and 53, and ON/OFF state signal S16 of the +24 V voltage.
Internal bus 359 is used for exchanging data among CPU 350, ROM 351, RAM 352, E² PROM 353, printer interface 354, laser modulation controller 355, output register 356, A/D converter 357, and input register 358.
Mechanism controller 306 includes drivers for driving various motors, clutches, and solenoids. These drivers are ON/OFF-controlled in accordance with binary control signal S6 output from output register 356. More specifically, each driver is turned on when signal S6 is "1", or is turned off when it is "0", thereby supplying or cutting off the +24 V voltage to or from pre-exposure unit 21X, main motor 307, solenoids 308 to 311, and cooling fan 500.
Scanner controller 101 includes drivers for semiconductor laser 90 and mirror motor 60. Semiconductor laser 90 is ON/OFF-controlled by laser modulation signal S5 output from laser modulation controller 355. Mirror motor 60 is ON/OFF-controlled by control signal S8 output from output register 356.
Laser beam detection sensor 312 comprises a PIN diode. When laser beam a passes through laser beam detection sensor 312, a current proportional to its light energy flows through the PIN diode. This current signal is sent to laser modulation controller 355 as laser beam detection signal S4.
High voltage power source 305 outputs developing bias, electrification, and copy high voltage signals S20, S22, and S24 to a developing bias power supply unit (not shown), electrification unit 18, and a wire high voltage supply unit (not shown) of copy unit 20. These signals are ON/OFF-controlled by "1" or "0" level of control signal S7 output from output register 356.
As described above, in engine control section 300, a power supply voltage is supplied to electrical circuits via engine controller 70, and respective units are controlled by binary control signals output from engine controller 70. Engine control section 300 is coupled to printer control section 400 (to be described later) via interface signal S3.
The arrangement of printer control section 400 will be described below.
FIG. 4 is a block diagram showing an arrangement of main part of printer control section 400. In FIG. 4, CPU 401 controls the entire printer control section 400. CPU 401 is connected to timer 401T via internal bus 412. This timer is used for the timing control of respective processing operations to be executed by CPU 401. ROM 402 stores a control program. CPU 401 is operated in accordance with the program stored in ROM 02. ROM 402 also stores an identification number which is verified when data is altered, data associated with paper sheet P such as a top margin, a left margin, a paper type, and the like, message information to be informed to an operator, bit-image data for indicating a defective image, and the like.
RAM 403 is used as a page buffer for temporarily storing image data sent from host apparatus 409. Expansion memory 404 is a large-capacity memory used when RAM 403 cannot store data for one page when image data sent from host apparatus 409 has a large data volume, such as bit map data.
Video RAM 405 stores image data expanded to bit image, and its output is supplied to serial/parallel converter 406. Serial/parallel converter 406 converts image data expanded to bit-image data in video RAM 405 and sent as parallel data into serial data, and supplies the serial data to engine controller 70.
Video RAM 405 is used as a scan buffer (partial memory) for storing bit-image data expanded to bit-image data. The scan buffer stores bit-image data in units of 64 lines (one band unit). Note that the partial memory may be arranged in RAM 403 or 404.
Host interface 408 is used for exchanging data between host apparatus 409 comprising an electronic computer or an image reading apparatus (image scanner) and printer control section 400. It comprises two kinds of transfer lines, i.e., serial transfer line 410a and parallel transfer line 410b. These lines can be selectively used in accordance with a kind of data transferred between host apparatus 409 and printer control section 400.
Engine interface the 411 interfaces exchange of interface signal S3 between printer controller 71 and engine controller 70. Each of connection circuits 413 cuts off a power supply voltage to be supplied to IC card 517 and signal lines, when IC board 517 is inserted in or removed from a connector (not shown), thereby preventing data stored in IC card 517 from being destroyed by noise generated when the card is inserted or removed.
Operation panel controller 407 performs display control of a guide message on liquid crystal display 100a on operation panel 100, ON/OFF/flashing control of LED indicator 100b, control for sending data input from switch 100c to CPU 401, and the like. Internal bus 412 is used for exchanging data among CPU 401, ROM 402, RAM 403, expansion memory 404, video RAM 405, operation panel controller 407, host interface 408, engine interface 411, and connection circuits 413.
IC card 517 comprises a nonvolatile memory, such as a battery backup static RAM, an EPROM, an EPROM, a mask ROM, or the like. Each IC card 517 stores character fonts, an emulation program, and the like.
The operation of printer control section 400 (in particular, CPU 401) shown in FIG. 4 will be described below with reference to the flow charts shown in FIGS. 5A, 5B, and 5C.
For example, if the laser printer shown in FIG. 1 is set in an off-line state, and CPU 401 detects this off-line state (NO in ST1), it is checked if print processing of previous data received from host apparatus 409 is completed (ST2). If it is determined that print processing is being executed (YES in ST2), the flow branches to step ST12 in FIG. 5B to continue the print processing. On the other hand, if it is determined that processing of printer control section 400 itself is not completed yet (NO in ST35) although the print processing has been completed (NO in ST2), steps ST1 and ST2 are repetitively executed to establish an idling state, thus waiting for an on-line state of the laser printer.
If it is determined that the laser printer is set in the on-line state (YES in ST1), it is checked if data sent from host apparatus 409 is a command. If it is determined that the received data is a command (YES in ST3), the received command is executed (ST4); otherwise, the flow skips command execution step ST4, and advances to step ST5. For example, the command defines attributes of data following the command, and controls the printer without exchanging data.
It is then checked if the page buffer arranged as a buffer for receiving data in RAM 403 is full. If it is determined that the buffer is not full (NO in ST5), it is checked if data sent from host apparatus 409 is image data (VD). If it is determined that the received data is not image data (NO in ST6), the flow returns to step ST1, and the series of steps described above are repetitively executed to wait for reception of a command or image data. If it is detected in this state that image data is received (YES in ST6), the received image data is sequentially stored in the above-mentioned page buffer (RAM 403) (ST7).
Subsequently, it is checked if a print request is issued. If it is determined that no print request is issued (NO in ST30), it is determined that the engine side is not ready for printing. In this case, the flow returns to step ST1, and the series of steps described above are executed again to wait for a print request. If the print request is detected (YES in ST30), it is determined that engine control section 300 is ready for printing, and CPU 401 out a print command (ST31).
It is then checked if the storage of image data for one page is completed. If it is determined that the storage operation is not completed (NO in ST8), a "data" lamp of LED indicator 100b arranged in operation panel 100 begins to flash (ST10). In this manner, during the data reception operation, the "data" lamp is flashed to inform the current state to an operator. The flow returns to step ST1, and the series of steps described above are executed to wait until image data for one page is stored in the page buffer (403).
If it is determined that storage of image data of one page is completed upon repetitive execution of the series of steps (YES in ST8), the "data" lamp is turned off (ST9), and data reception processing is ended. The control advances to print processing in step ST12 and subsequent steps.
If it is determined in step ST5 that the page buffer (403) is full (YES in ST5), the data reception operation is interrupted (ST11), and the control also advances to print processing in step ST12 and subsequent steps.
Upon completion of storage of image data for one page in the page buffer (403), it is checked if the scan buffer allocated on video RAM 405 is full (ST12 in FIG. 5B). If it is determined that the scan buffer is not full (NO in ST12), CPU 401 converts image data corresponding to 64 lines of image data stored in the page buffer into bit-image data, and stores the bit-image data in video RAM 405, serving as the scan buffer (ST13). On the other hand, if it is determined that the scan buffer is full (YES in ST12), the flow skips step ST13.
If it is determined that bit image expanding processing is normally completed (YES in ST32), it is checked if a VSYNC command has already been output (ST20). If it is determined that the VSYNC command is not output yet (NO in ST20), it is checked if a VSYNC request is issued from the engine side (ST21). If no VSYNC request is detected (NO in ST21), the flow returns to step ST1, and the controls wait for the VSYNC request while executing the series of steps. If it is determined that a VSYNC request is issued (YES in ST21), the VSYNC command is output to the engine side (ST22), and the flow returns to step ST1 to wait until horizontal sync signal HSYNC0 and video clock VCLK0 are input.
If it is determined that the VSYNC command has already been output (YES in ST20), it is checked if transfer of image data for one page is completed (ST26). If it is determined that transfer of image data is not completed yet (NO in ST26), bit-image data for 64 lines stored in the scan buffer (403) is output to the engine side (70) in synchronism with horizontal sync signal HSYNC0 and video clock VCLK0 (ST25). Thereafter, the flow returns to step ST13, and CPU 401 waits for completion of transfer of image data for one page while executing the series of steps again.
In this manner, when transmission of image data for one page is completed, the flow returns to step ST1, and printer controller 71, is reset to an initial state, so that it is ready for the transfer of image data of the next page.
If it is determined that expanding processing to bit-image data in step ST13 is not completed within a predetermined allowable time (i.e., image expanding processing cannot be normally executed) (ST32), CPU 401 interrupts bit-image expanding, generation, and transfer processing operations of image data stored in the page buffer (403), and outputs a convey command for paper sheet P. In addition, CPU 401 reads out bit-image data of NG indication (e.g., black pattern data used as an "NG" mark) from ROM 402, and stores it in video RAM 405 (ST33). Judgment in step ST32 is made by measuring a time from when image expanding processing is started in the scan buffer until the processing is completed using timer 401T. When image data for an end portion of paper sheet P is output, CPU 401 outputs the bit-image data of NG indication to the engine side in synchronism with horizontal sync signal HSYNC0 and video clock VCLK0 (ST34). After the bit-image data of NG indication is output, CPU 401 causes liquid crystal display 100a of operation panel 100 to set off an alarm indicating the information of a defective image. The flow then returns to step ST1, and processing for the following page is continued.
In step ST32 shown in FIG. 5B, once an expanding processing time exceeds the allowable time, the corresponding print page is processed as a defective page. Alternatively, once the expanding processing is unsuccessful, it may be tried once more. The sequence in this case is shown in FIG. 5C.
More specifically, if a time-over occurs due to overflow of the scan buffer in image expanding processing in step ST13 before completion of the image expanding processing (NO in ST32), CPU 401 sets a storage area (free area) of a portion of, e.g., RAM 403 as a second scan buffer area (ST36).
Bit-image data is expanded again to the scan buffer whose area is increased, since the second scan buffer is added to the original scan buffer (ST37).
If the re-expanding processing of bit-image data is normally performed, i.e., if the re-expanding processing is completed within a predetermined period of time (YES in ST38), this means that a defective image can be removed, and the flow advances to step ST20.
On the other hand, if the re-expanding processing of bit-image data cannot be normally performed, i.e., if the re-expanding processing cannot be completed within the predetermined period of time (NO in ST38), this means that a defective image cannot be removed, and the flow advances to step ST33. Thereafter, the same processing as in FIG. 5B is executed.
A toner image formed on photosensitive drum 17 by developing unit 19 is copied by copy unit 20 on paper sheet P. In this case, when bit-image data of NG indication is supplied from print control section 400, a bar (black portion) of NG indication is copied, i.e., printed as an NG mark on a lower portion of paper sheet P, as shown in FIG. 6. In this case, a copy count (e.g., "008") extracted from a copy counter (not shown) may be added on a portion of an NG indication bar.
When continuous print operations are performed for a plurality of paper sheets upon reception of image data from the host apparatus, if it is detected that a defective image is formed, an image corresponding to bit-image data for NG indication (black portion) is formed on a paper sheet with the defective image. Thus, a page of the defective image during the continuous print operations can be specified by a mark (black portion) indicating that the defective image is formed on the page. Thereafter, a print content of the specified page is changed so as not to generate a defective image, and only the page is printed again, thus obtaining a necessary print result. As a result, time and paper sheets can be saved.
As described above, according to the present invention, an image forming apparatus which can specify a certain page or pages on which a defective image or images is or are formed can be provided.
Additional advantages and modifications will readily occur to those skilled in the art. Therefore, the invention in its broader aspects is not limited to the specific details, and representative devices, shown and described herein. Accordingly, various modifications may be made without departing from the spirit or scope of the general inventive concept as defined by the appended claims and their equivalents.
What is claimed is:
1. An image forming apparatus comprising:means for receiving data to be printed from a host apparatus; means for sequentially forming bit-image data in units of predetermined portions based on data received by said receiving means; means for detecting the formed bit-image data when said forming means cannot form the bit-image data within a predetermined period of time; means, responsive to said detecting means, for generating a pattern representing that the bit-image data is defective; and means for printing the formed bit-image data on an image recording medium.
2. An apparatus according to claim 1, further comprising means for storing bit-image data including no defective indication pattern and bit-image data including the defective indication pattern, and said forming means includes means for sequentially forming bit patterns corresponding to bit-image data in said storing means on said image recording medium.
3. An apparatus according to claim 2, wherein said forming means includes means for holding the defective indication pattern in advance.
4. An apparatus according to claim 2, wherein said image recording medium includes a paper, andthe defective indication pattern is formed on an end portion of the paper.
5. An apparatus according to claim 1, further comprising a partial memory in which bit-image data generated from the received data is expanded, and said detecting means includes: means for measuring an expansion time of the bit-image data expanded in said partial memory; and means for comparing the expansion time with a predetermined time limit, and for, when the expansion time exceeds the time limit, detecting that the bit-image data is defective.
6. An apparatus according to claim 2, wherein said storing means includes a partial memory in which bit-image data generated from the received data is expanded, and said detecting means includes: means for measuring an expansion time of the bit-image data expanded in said partial memory; and means for comparing the expansion time with a predetermined time limit, and for, when the expansion time exceeds the time limit, detecting that the bit-image data is defective.
7. An apparatus according to claim 1, further including a scan buffer in which bit-image data generated from the received data is expanded, and said detecting means includes: means for measuring an expansion time of the bit-image data to be expanded in said scan buffer; and means for comparing the expansion time with a predetermined time limit, and for, when the expansion time exceeds the time limit, increasing a storage capacity of said scan buffer.
8. An apparatus according to claim 2, wherein said storing means includes a scan buffer in which bit-image data generated from the received data is expanded, and said detecting means includes: means for measuring an expansion time of the bit-image data to be expanded in said scan buffer; and means for comparing the expansion time with a predetermined time limit, and for, when the expansion time exceeds the time limit, increasing a storage capacity of said scan buffer.
9. An image forming apparatus comprising:means for receiving from a host apparatus data to be printed; means for forming bit-image data from data received by the receiving means; means for detecting if the formed bit-image data is defective; means, responsive to the detecting means, for printing on an image recording medium the formed bit-image data and a pattern representing that the data is defective; and a scan buffer in which bit-image data generated from predetermined image data is expanded; wherein said detector means further includes: means for measuring an expansion time of the bit-image data to be expanded in the scan buffer; and means for comparing the expansion time with a predetermined time limit and for increasing storage capacity of the scan buffer when the expansion time exceeds the time limit.
10. An apparatus according to claim 9, wherein said detecting means further includes:means for measuring a second expansion time of the bit-image data to be expanded in said scan buffer whose storage capacity is increased; and means for, when the second expansion time does not exceed the predetermined time limit, stopping addition of the defective indication pattern.
11. An apparatus according to claim 10, wherein said detecting means further includes:means for, when the second expansion time exceeds the predetermined time limit, detecting that the bit-image data is defective.
12. An image forming apparatus comprising:means for receiving data to be printed from a host apparatus; means for forming bit-image data from data received from the receiving means; means for detecting if the formed bit-image data is defective; means, responsive to the detecting means, for printing the formed bit-image data nd a pattern representing that the data is defective on an image recording medium; and a partial memory in which bit-image data generated from predetermined image data is expanded; wherein, said detecting means further includes; means for measuring expansion time of the bit-image data expanded in the partial memory; and means for comparing the expansion time with a predetermined time limit, and, when the expansion time exceeds the time limit, for detecting that the bit-image data is defective.
|
Marketplace talk:Post Trade Requests/@comment-5447697-20120908185916
selling 2 cards R+ Alligator+ lvl 1 and lvl 7, 4 brains for both. MW 7962
|
#![allow(unused_imports)]
#![allow(dead_code)]
mod diff;
mod macros;
use nom::types::CompleteStr;
use wayfinder::*;
include!(concat!(env!("OUT_DIR"), "/cases.rs"));
fn get_method_cases() -> Vec<(Method, &'static str)> {
vec![
(Method::Get, "GET"),
(Method::Post, "POST"),
(Method::Put, "PUT"),
(Method::Delete, "DELETE"),
]
}
#[test]
fn test_method_display() {
for (method, expected) in get_method_cases().into_iter() {
let actual = format!("{}", method);
assert_eq!(actual, expected);
}
}
#[test]
fn test_method_parse() {
for (expected, text) in get_method_cases().into_iter() {
let actual = parse::method(CompleteStr(text)).unwrap();
assert_eq!(actual.1, expected);
assert_eq!(actual.0, CompleteStr(""));
}
}
fn get_param_cases() -> Vec<(Param, &'static str)> {
vec![
(Param::new("id", "Uuid"), "id: Uuid"),
(Param::new("x", "isize"), "x: isize"),
(Param::new("name", "String"), "name: String"),
]
}
#[test]
fn test_param_display() {
for (param, expected) in get_param_cases().into_iter() {
let actual = format!("{}", param);
assert_eq!(actual, expected);
}
}
#[test]
fn test_param_parse() {
for (expected, text) in get_param_cases().into_iter() {
let actual = parse::param(CompleteStr(text)).unwrap();
assert_eq!(actual.1, expected);
assert_eq!(actual.0, CompleteStr(""));
}
}
fn get_path_segment_static_cases() -> Vec<(PathSegment, &'static str)> {
vec![
(PathSegment::from("people"), "people"),
(PathSegment::from("accounts"), "accounts"),
(PathSegment::from("posts"), "posts"),
]
}
#[test]
fn test_path_segment_static_display() {
let cases = get_path_segment_static_cases();
for (path_segment, expected) in cases.into_iter() {
let actual = format!("{}", path_segment);
assert_eq!(actual, expected);
}
}
#[test]
fn test_path_segment_static_parse() {
let cases = get_path_segment_static_cases();
for (expected, text) in cases.into_iter() {
let text = format!(" {}", text);
let actual = parse::path_segment(CompleteStr(&text), 1).unwrap();
assert_eq!(actual.1, expected);
assert_eq!(actual.0, CompleteStr(""));
}
}
#[test]
fn test_path_segment_dynamic_display() {
let cases = get_param_cases();
for (param, expected) in cases.into_iter() {
let path_segment = PathSegment::from(param);
let actual = format!("{}", path_segment);
assert_eq!(actual, expected);
}
}
#[test]
fn test_path_segment_dynamic_parse() {
let cases = get_param_cases();
for (param, text) in cases.into_iter() {
let text = format!(" {{{}}}", text);
let expected = PathSegment::from(param);
let actual = parse::path_segment(CompleteStr(&text), 1).unwrap();
assert_eq!(actual.1, expected);
assert_eq!(actual.0, CompleteStr(""));
}
}
#[test]
fn test_query_parameter_parse() {
let cases = get_param_cases();
for (expected, text) in cases.into_iter() {
let text = format!(" [{}]", text);
let actual = parse::query_parameter(CompleteStr(&text), 1).unwrap();
assert_eq!(actual.1, expected);
assert_eq!(actual.0, CompleteStr(""));
}
}
fn get_resource_cases() -> Vec<(Resource, &'static str)> {
vec![
(
Resource {
method: Method::Get,
modules: vec!["person".to_string()],
name: "show".to_string(),
is_redirect: false,
query_parameters: vec![],
},
"GET person::show\n",
),
(
Resource {
method: Method::Get,
modules: vec!["person".to_string()],
name: "show".to_string(),
is_redirect: true,
query_parameters: vec![],
},
"GET -> person::show\n",
),
(
Resource {
method: Method::Get,
modules: vec!["person".to_string()],
name: "show".to_string(),
is_redirect: false,
query_parameters: vec![Param::new("id", "usize")],
},
"GET person::show\n [id: usize]\n",
),
(
Resource {
method: Method::Get,
modules: vec![],
name: "index".to_string(),
is_redirect: false,
query_parameters: vec![],
},
"GET index\n",
),
(
Resource {
method: Method::Get,
modules: vec!["admin".to_string(), "person".to_string()],
name: "show".to_string(),
is_redirect: false,
query_parameters: vec![],
},
"GET admin::person::show\n",
),
]
}
#[test]
fn test_resource_stringify() {
for (resource, expected) in get_resource_cases().into_iter() {
let actual = resource.stringify(0);
assert_eq!(actual, expected);
}
}
#[test]
fn test_resource_parse() {
for (expected, text) in get_resource_cases().into_iter() {
let text = str::replace(text, "\n", "\n ");
let text = format!(" {}", text);
let actual = parse::resource(CompleteStr(&text), 1).unwrap();
assert_eq!(actual.1, expected);
assert_eq!(actual.0, CompleteStr(" ")); // trailing newline
}
}
fn get_routes_cases() -> Vec<(Routes, &'static str)> {
vec![
(
Routes {
resources: vec![
Resource {
method: Method::Get,
modules: vec!["People".to_string()],
name: "Index".to_string(),
is_redirect: false,
query_parameters: vec![],
},
Resource {
method: Method::Post,
modules: vec!["People".to_string()],
name: "New".to_string(),
is_redirect: false,
query_parameters: vec![],
},
],
routes: vec![],
query_parameters: vec![],
},
"GET People::Index\nPOST People::New\n",
),
(
Routes {
resources: vec![Resource {
method: Method::Get,
modules: vec!["People".to_string()],
name: "Index".to_string(),
is_redirect: false,
query_parameters: vec![],
}],
routes: vec![],
query_parameters: vec![Param::new("lang", "String")],
},
"[lang: String]\nGET People::Index\n",
),
(
Routes {
resources: vec![Resource {
method: Method::Get,
modules: vec!["People".to_string()],
name: "Index".to_string(),
is_redirect: false,
query_parameters: vec![],
}],
routes: vec![NestedRoutes {
path_segment: PathSegment::from(Param::new("id", "Uuid")),
routes: Routes {
resources: vec![Resource {
method: Method::Get,
modules: vec!["People".to_string()],
name: "Show".to_string(),
is_redirect: false,
query_parameters: vec![],
}],
routes: vec![],
query_parameters: vec![],
},
}],
query_parameters: vec![],
},
"GET People::Index\n{id: Uuid}\n GET People::Show\n",
),
]
}
#[test]
fn test_routes_stringify() {
for (routes, expected) in get_routes_cases().into_iter() {
let actual = routes.stringify(0);
assert_eq!(actual, expected);
}
}
#[test]
fn test_routes_parse() {
for (expected, text) in get_routes_cases().into_iter() {
let text = str::replace(text, "\n", "\n ");
let text = format!(" {}", text);
let actual = parse::routes(CompleteStr(&text), 1).unwrap();
assert_eq!(actual.1, expected);
assert_eq!(actual.0, CompleteStr(" ")); // trailing newline
}
}
fn get_nested_routes_cases() -> Vec<(NestedRoutes, &'static str)> {
vec![
(
NestedRoutes {
path_segment: PathSegment::from("people"),
routes: Routes {
resources: vec![Resource {
method: Method::Get,
modules: vec!["People".to_string()],
name: "Index".to_string(),
is_redirect: false,
query_parameters: vec![],
}],
routes: vec![],
query_parameters: vec![],
},
},
"people\n GET People::Index\n",
),
(
NestedRoutes {
path_segment: PathSegment::from(Param::new("id", "Uuid")),
routes: Routes {
resources: vec![
Resource {
method: Method::Get,
modules: vec!["People".to_string()],
name: "Show".to_string(),
is_redirect: false,
query_parameters: vec![],
},
Resource {
method: Method::Put,
modules: vec!["People".to_string()],
name: "Update".to_string(),
is_redirect: false,
query_parameters: vec![Param::new("name", "String")],
},
],
routes: vec![],
query_parameters: vec![],
},
},
"{id: Uuid}\n GET People::Show\n PUT People::Update\n [name: String]\n",
),
]
}
#[test]
fn test_nested_routes_stringify() {
for (nested_routes, expected) in get_nested_routes_cases().into_iter() {
let actual = nested_routes.stringify(0);
assert_eq!(actual, expected);
}
}
#[test]
fn test_nested_routes_parse() {
for (expected, text) in get_nested_routes_cases().into_iter() {
let text = str::replace(text, "\n", "\n ");
let text = format!(" {}", text);
let actual = parse::nested_routes(CompleteStr(&text), 1).unwrap();
assert_eq!(actual.1, expected);
assert_eq!(actual.0, CompleteStr(" ")); // trailing newline
}
}
fn get_route_config_cases() -> Vec<(RouteConfig, &'static str)> {
vec![
(
RouteConfig {
headers: vec![Header {
text: "use uuid::Uuid;".to_string(),
}],
routes: Routes {
resources: vec![],
routes: vec![NestedRoutes {
path_segment: PathSegment::from("people"),
routes: Routes {
resources: vec![Resource {
method: Method::Get,
modules: vec!["People".to_string()],
name: "Index".to_string(),
is_redirect: false,
query_parameters: vec![],
}],
routes: vec![NestedRoutes {
path_segment: PathSegment::from(Param::new("id", "Uuid")),
routes: Routes {
resources: vec![
Resource {
method: Method::Get,
modules: vec!["People".to_string()],
name: "Show".to_string(),
is_redirect: false,
query_parameters: vec![],
},
Resource {
method: Method::Put,
modules: vec!["People".to_string()],
name: "Update".to_string(),
is_redirect: false,
query_parameters: vec![Param::new("name", "String")],
},
],
routes: vec![],
query_parameters: vec![],
},
}],
query_parameters: vec![],
},
}],
query_parameters: vec![Param::new("lang", "String")],
},
},
"use uuid::Uuid;
/
[lang: String]
people
GET People::Index
{id: Uuid}
GET People::Show
PUT People::Update
[name: String]
",
),
(
RouteConfig {
headers: vec![],
routes: Routes {
resources: vec![],
routes: vec![
NestedRoutes {
path_segment: PathSegment::from("one"),
routes: Routes {
resources: vec![
Resource {
method: Method::Get,
modules: vec!["One".to_string()],
name: "Show".to_string(),
is_redirect: false,
query_parameters: vec![],
},
Resource {
method: Method::Post,
modules: vec!["One".to_string()],
name: "Make".to_string(),
is_redirect: false,
query_parameters: vec![],
},
],
routes: vec![],
query_parameters: vec![],
},
},
NestedRoutes {
path_segment: PathSegment::from("two"),
routes: Routes {
resources: vec![
Resource {
method: Method::Get,
modules: vec!["Two".to_string()],
name: "Show".to_string(),
is_redirect: false,
query_parameters: vec![],
},
Resource {
method: Method::Post,
modules: vec!["Two".to_string()],
name: "Make".to_string(),
is_redirect: false,
query_parameters: vec![],
},
],
routes: vec![],
query_parameters: vec![],
},
},
],
query_parameters: vec![],
},
},
"/
one
GET One::Show
POST One::Make
two
GET Two::Show
POST Two::Make
",
),
]
}
#[test]
fn test_route_config_stringify() {
for (route_config, expected) in get_route_config_cases().into_iter() {
let actual = route_config.stringify();
assert_eq!(actual, expected);
}
}
#[test]
fn test_route_config_parse() {
for (expected, text) in get_route_config_cases().into_iter() {
let actual = parse::route_config(text).unwrap().1;
assert_eq!(actual, expected);
}
}
|
#pragma once
#include "definiciones.h"
#include "tipos.h"
namespace Imagen
{
class Nodo
{
//Atributos
public:
Linea linea;
Palabra palabra;
Caracter caracter;
Coordenada coordenada;
Nodo *nodo_siguiente;
//Métodos
public:
Nodo(Linea linea, Nodo *nodo_siguiente);
Nodo(Palabra palabra, Nodo *nodo_siguiente);
Nodo(Caracter caracter, Nodo *nodo_siguiente);
Nodo(Coordenada coordenada, Nodo *nodo_siguiente);
~Nodo(void);
};
}
|
# Grid
Proof of concept for python based GRID edge nodes.
## Running
```sh
python setup.py install
```
# Running with PUBSUB
### Running `ipfs_grid_worker_daemon.py`
Grid worker daemon requires an IPFS daemon to be running with pubsub support
turned on.
```sh
ipfs daemon --enable-pubsub-experiment
```
You can then run the worker daemon
```sh
python ipfs_gif_worker_daemon.py
```
Start Jupyter
```sh
jupyter notebook
```
navigate to `notebooks/pubsub/` and open `Keras Grid Client and Worker.ipynb` and
follow along in that notebook.
|
import pytest
from happybase import Table
from machine.storage.backends.hbase import bytes_to_float, float_to_bytes, HBaseStorage
_VAL = b'values:value'
_EXP = b'values:expires_at'
_COLS = [_VAL, _EXP]
@pytest.fixture
def table(mocker):
table = mocker.MagicMock(spec=Table)
ConnectionCls = mocker.patch('machine.storage.backends.hbase.Connection', autospec=True)
instance = ConnectionCls.return_value
instance.table.return_value = table
return table
@pytest.fixture
def hbase_storage(table):
return HBaseStorage({'HBASE_HOST': 'foo', 'HBASE_TABLE': 'bar'})
def test_float_conversion():
assert bytes_to_float(float_to_bytes(3.14159265359)) == 3.14159265359
def test_get(table, hbase_storage):
hbase_storage.get('key1')
table.row.assert_called_with('key1', _COLS)
def test_has(table, hbase_storage):
hbase_storage.has('key1')
table.row.assert_called_with('key1', _COLS)
def test_delete(table, hbase_storage):
hbase_storage.delete('key1')
table.delete.assert_called_with('key1')
def test_set(table, hbase_storage):
hbase_storage.set('key1', 'val1')
table.put.assert_called_with('key1', {b'values:value': 'val1'})
|
Page:Village life in Korea (1911).djvu/243
Rh fetich for the images ordered by Rome, but the change in the life of the convert is not so apparent. They now claim something more than fifty thousand converts.
This chapter is not intended to be a history of the rise and growth of Protestant missions in Korea. And yet, for the benefit of those who have not followed this modern miracle of missions, a few facts of history are here given. It was in September, 1884, the 22d day, that Horace N. Allen, M.D., who has the honor of being the first Protestant missionary to the Hermit Kingdom, arrived in Seoul. He was transferred from China by the Board of Missions of the Presbyterian Church (North), and he had no little part in founding our village Church. Not only in the capacity of a skilled physician did he take part in laying the foundations of the Church, but in after years, when he entered the consular service of the United States and rose from Secretary to the Legation to Minister of the United States, he was always the friend of the missionary and the cause he represents. And I may truthfully add that he was the friend of every one who had truth and right on his side. In the spring of 1885 Rev. H. G. Underwood, of the Presbyterian Church, and W. B. Scranton, M.D., with his wife and mother, and Rev. H. G. Appenzeller and wife, of the Methodist Episcopal Church, arrived in Korea and began their work as missionaries. From that time to this the eyes of the Church in Christian lands have been turned toward this country, and the growth in the force of missionaries has been steady. Since the coming of the above-named missionaries the
|
Karl Ahrens
Karl Ahrens (13 March 1924 – 6 March 2015) was a German Social Democratic Party politician who served as member of the German Bundestag from 1969 to 1990. He had a doctorate in law and was an assistant secretary of the Lower-Saxon ministry of the interior. As a member of the Bundestag, he worked mainly in the committee on economic affairs. Ahrens was president of the Association of European Border Regions from 1984 to 1996. He served as president of the Parliamentary Assembly of the Council of Europe from 1983 to 1986 and was the first German to do so.
|
import { UserId } from '../value-object/UserId'
import { FirstName } from '../value-object/FirstName'
import { LastName } from '../value-object/LastName'
import { Password } from '../value-object/Password'
import { Signature } from '../value-object/Signature'
import { EnterpriseAccount } from '../value-object/EnterpriseAccount'
import { Email } from '../value-object/Email'
export class RegisterUser {
private readonly userId: UserId
private readonly email: Email
private readonly firstName: FirstName
private readonly lastName: LastName
private readonly password: Password
private readonly signature: Signature
private readonly _isEnterpriseAccount: EnterpriseAccount
constructor(
userId: UserId,
email: Email,
firstName: FirstName,
lastName: LastName,
password: Password,
signature: Signature,
isEnterpriseAccount: EnterpriseAccount
) {
this.userId = userId
this.email = email
this.firstName = firstName
this.lastName = lastName
this.password = password
this.signature = signature
this._isEnterpriseAccount = isEnterpriseAccount
}
public getId(): UserId {
return this.userId
}
public getEmail(): Email {
return this.email
}
public getFirstName(): FirstName {
return this.firstName
}
public getLastName(): FirstName {
return this.lastName
}
public getPassword(): Password {
return this.password
}
public getSignature(): FirstName {
return this.signature
}
public isEnterpriseAccount(): EnterpriseAccount {
return this._isEnterpriseAccount
}
public isAccountVerified(): boolean {
return !this._isEnterpriseAccount.getValue()
}
}
|
Pan/Scale/Navigation Buttons Disappearing
I am working on an OpenLayers 2.10 map using Internet Explorer 8 (used by work), and am encountering some issues with the pan/navigation buttons disappearing after sepcific events:
If I change the layer to another background, the pan/navigation panel buttons lose their picture
If I resize the browser window, the pan/navigation panel buttons lose their picture
When one of these events occurs, the buttons show the broken image link icon. If I refresh the page, the buttons come back.
After perusing some answers, the only similar solutions I came up with were at OpenLayers - redrawing map after container resize using the map.updatesize command. These commands did not seem to work, though I am not entirely sure where to place them. Also, I just started using OpenLayers a couple months ago, and a solution may exist using terminology I am not aware of.
I would like a solution that keeps the pan/navigation/zoom panel buttons constantly displayed, even if layers are changed or if the page is resized. It is also acceptable for the buttons to refresh after an event that will cause the button to no longer load. Thanks in advance for any guidance.
I've used a javascript/jquery solution to fix the issue with the navigation buttons disappearing when the window has resized. In the section, I have incorporated the following function:
<script>
$(window).bind('resize', function(e)
{
this.location.reload(false);
});
</script>
The code above was modified from the solution found here.
This still does not refresh the page when a new layer has been selected, but I am looking into using the onFeatureSelect functionality with some of the code mentioned above.
|
comparing two variables returns false result
Why does this always return true:
$s = '334rr';
$i = (int)$s;
if ($i == $s) {
echo true;
} else {
echo false;
}
If I echo $i it gives the value of 334, which is different from $s which is 334rr.
From the manual:
If you compare a number with a string or the comparison involves numerical strings, then each string is converted to a number and the comparison performed numerically.
So: ($i == $s) is the same as ($i == (int)$s) for the values you've given.
Use === to avoid type-juggling.
When compare string with integer using ==, string will try to case into integer.
Try this
$s = '334rr';
$i = intval($s);
if ($i == $s) {
echo true;
} else {
echo false;
}
Comparing strings to an int is not recommended. You should use the === instead which will verify the same data type as well as the same value.
PHP converts the $s string to an integer when comparing to another integer ($i).
It basically does this (well, i don't know what it does internally, but it boils down to this):
if($i == (int) $s)
Which makes the statement true
|
Color theory
Categorization
Additive and subtractive colors
Color models
RYB and CMYK are both subtractive color systems while RGB is an additive color system.
Relationship between colors
Analogous color scheme
Complementary color scheme
Colors and the human mind
Warm and cool colors and depth perception
<p class="MsoNormal">
Contrast
<h2 class="MsoNormal">See also [Will be added soon]
|
HTML instead of URI encoding in regard to XSS?
I'm inserting untrusted data into a href attribute of an tag.
Based on the OWASP XSS Prevention Cheat Sheet, I should URI encode the untrusted data before inserting it into the href attribute.
But would HTML encoding also prevent XSS in this case? I know that it's an URI context and therefore I should use URI encoding, but are there any security advantages of URI encoding over using HTML encoding in this case?
The browser will render the link properly in both cases as far as I know.
I'm assuming this is Rule #5:
URL Escape Before Inserting Untrusted Data into HTML URL Parameter
Values
(Not rule #35.)
This is referring to individual parameter values:
<a href="http://www.example.com?test=...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...">link</a >
URL and HTML encoding protect against different things.
URL encoding prevents a parameter breaking out of a URL parameter context:
e.g. ?firstname=john&lastname=smith&salary=20000
Say this is a back-end request made by an admin user. If john and smith aren't correctly URL encoded then a malicious front-end user might enter their name as john&salary=40000 which would render the URL as
?firstname=john&salary=40000&lastname=smith&salary=20000
and say the back-end application takes the first parameter value in the case of duplicates. The user has successfully doubled their salary. This attack is known as HTTP Parameter Pollution.
So if you're inserting a parameter into a URL which is then inserted into an HTML document, you technically need to URL encode the parameter, then HTML encode the whole URL. However, if you follow the OWASP recommendation to the letter:
Except for alphanumeric characters, escape all characters with ASCII
values less than 256 with the %HH escaping format.
then this will ensure no characters with special meaning to HTML will be output, therefore you can skip the HTML encoding part, making it simpler.
Example - If user input is allowed to build a relative link (to http://server.com/), and javascript:alert(1) is provided by the user.
URL-encoding: <a href="javascript%3Aalert%281%29"> - Link will lead to http://server.com/javascript%3Aalert%281%29
Entity-encoding only: <a href="javascript:alert;(1)"> - Click leads to javascript execution
|
Ku-Tsung
Moves
* Basic Attack: He hits one party member with his sword. Medium damage.
* Gunpowder Bomb: Hits three people, Med dmg.
* Pure Hatred: A vicious body charge. High dmg. Deals 1/2 of the damage dealt back to Tsung.
* Gong of Battle: Raises defense for Tsung/Embra by a LOW amount.
* Rice Ration: Tsung heals for low health.
* Dragon Spark: Hits three people. Medium/High damage.
Quotes
* At Ayuthay:
* Soldier: "Excuse me...? Generals?"
* Ku-Tsung: "We're busy right now!" / Ku-Embra: "We must purge the evil spirits!"
* Ku-Tsung: "But the letter IS from King Wo. His Majesty cannot be wrong."
* Ku-Tsung: "We've found you, vile traitors!"
* Ku-Tsung: "They have made a mockery of the Kaocho military, General Ku-Embra!"
I cannot tolerate this insolence!"
* Ku-Tsung: "Nor I." / Ku-Embra: "Now take your punishment, you mongrels!"
|
Talk:Gene structure
Spelling and Grammar
This article was very well written. The topics and the content were relatively relevant to the topic. The only issues with this topic were that there were quite a few spelling errors. For example "Organisation" was spelled wrong. It should be spelled as "Organization." (Yp2h (talk) 01:00, 15 September 2018 (UTC)Yamini Patel)
Definition of a gene
I'd like to start a discussion on the definition of a gene. Many textbooks define a gene as a DNA sequence that's transcribed to produce a functional RNA. This means that there are two types of genes: protein-coding genes and noncoding genes. It also means that the gene is just the DNA that's found between the transcription start site and the transcription termination site. Thus, regulatory sequences are defined as elements that control the expression of genes but they are not part of genes.
I've been discussing this issue on my blog for many years ....
What Is a Gene? https://sandwalk.blogspot.com/2007/01/what-is-gene.html
and Kostas Kampourakis has written a whole book about it (Kampourakis, K. (2017). Making Sense of Genes. Cambridge Univesity Press. Cambridge, UK). He defines a gene as ...
* "...DNA sequences encoding information for functional products, be it proteins or RNA molecules. With 'encoding information,' I mean that the DNA sequence is used as a template for the production of an RNA molecule or a protein that performs some function." (p. 87)
I think we should adopt this definition, one that doesn't include regulatory sequences.
I also think we need to address some of the misinformation that's out there. For example. reference #2 (Polyak and Meyerson, 2003) says,
* "According to the “central dogma” of molecular biology, a gene exerts its effects by having its DNA transcribed into an mRNA, which is, in turn, translated into a protein, the final effector of the gene's action."
That statement if flawed for several reasons but it reflects a common (mistaken) view that needs to be discussed in this article. Genome42 (talk) 23:01, 1 June 2022 (UTC)
* I think you make a reasonable point and I agree that this article could do with updated info. It might also be worth looking back at Gene. Would it be better to move the discussion over to talk:Gene for a broader audience? Either way, I'm generally of the opinion that definitions often draw arbitrary boundaries (I'm thinking about whether introns are 'part of the gene' or cases where regulatory sequences are also part of the coding sequence) and it's definitely worth hilighting on this page that the definition of "which part is the gene" isn't so simple. T.Shafee(Evo & Evo)talk 02:01, 13 July 2022 (UTC)
Continued at talk:gene and talk:gene - T.Shafee(Evo & Evo)talk 04:04, 2 March 2023 (UTC)
|
Update library.json
Fix:
For Philips Hue dimmer switch V2 rename manufacturer from Philips to Signify Netherlands B.V.
Add:
Roborock S7
Added back the Philips Dimmer, different integrations (Hue, Z2M, ZHA) will show them differently.
Thanks for the additions though.
|
Replace mailchimp-api-v3 with mailchimp-marketing package
mailchimp-marketing is a library package provided by Mailchimp's team for interacting with the marketing APIs.
This is maintained better than the existing package for this purpose, mailchimp-api-v3.
Hear, hear. I'm completely bemused by all this. Firebase functions provide a Node.js server environment and yet const mailchimp = require("@mailchimp/mailchimp_marketing") is rejected by Firebase deployment with a 'couldn't find module' error. Why? The mailchimp-api-v3 approach described here is extremely unattractive
I think this is the correct package: @mailchimp/mailchimp_marketing
Resolved by #66
|
EVERYMAN’S LIBRARY
EDITED BY ERNEST RHYS
BIOGRAPHY
VOLTAIRE’S HISTORY
OF CHARLES TWELFTH
INTRODUCTORY NOTE BY
RT. HON. JOHN BURNS, M.P.
THE PUBLISHERS OF _EVERYMAN’S LIBRARY_ WILL BE PLEASED TO SEND
FREELY TO ALL APPLICANTS A LIST OF THE PUBLISHED AND PROJECTED VOLUMES
TO BE COMPRISED UNDER THE FOLLOWING THIRTEEN HEADINGS:
TRAVEL SCIENCE FICTION
THEOLOGY & PHILOSOPHY
HISTORY CLASSICAL
FOR YOUNG PEOPLE
ESSAYS ORATORY
POETRY & DRAMA
BIOGRAPHY
REFERENCE
ROMANCE
IN FOUR STYLES OF BINDING: CLOTH,
FLAT BACK, COLOURED TOP; LEATHER,
ROUND CORNERS, GILT TOP; LIBRARY
BINDING IN CLOTH, & QUARTER PIGSKIN
LONDON: J. M. DENT & SONS, LTD.
NEW YORK: E. P. DUTTON & CO.
[Illustration: A GOOD BOOK IS THE PRECIOUS LIFE-BLOOD OF A MASTER
SPIRIT, EMBALMED & TREASURED UPON PURPOSE TO A LIFE BEYOND LIFE
MILTON]
VOLTAIRE’S
HISTORY of
CHARLES XII
KING OF
SWEDEN
Translated by
WINIFRED
TODHUNTER
LONDON: PUBLISHED
by J·M·DENT·&·SONS·L^{TD}
AND IN NEW YORK
BY E·P·DUTTON & CO
FIRST ISSUE OF THIS EDITION 1908
REPRINTED 1912
CONTENTS
PAGE
PREFATORY NOTE vii
INTRODUCTION ix
TRANSLATOR’S NOTE xxi
BOOK I
Outline of Swedish history up to the time of Charles XI--Charles’s
education--His enemies--Character-sketch of the Czar, Peter
Alexiowitz--His peculiarities--Alliance of Russia, Poland, Denmark
against Charles XII. 3
BOOK II
Sudden and extraordinary transformation in the character of Charles
XII--At the age of eighteen he carries on war with Denmark, Poland
and Russia--He concludes the war with Denmark in six weeks--Beats
an army of 80,000 Russians with 8,000 Swedes, and proceeds to
Poland--Description of Poland and its Government--Charles wins
several victories, and conquers Poland, where he makes preparations
to nominate a king. 37
BOOK III
Stanislas Leczinski chosen King of Poland--Death of the
Cardinal-Primate--Great retreat of General Schullemburg--Exploits
of the Czar--Foundation of Petersburg--Charles’s entry into
Saxony--The peace of Altranstadt--Augustus abdicates in favour of
Stanislas--General Patkul, the Czar’s plenipotentiary, is broken on
the wheel, and quartered--Charles receives the ambassadors of
foreign princes in Saxony--He also goes to Dresden to see Augustus
before his departure. 97
BOOK IV
Charles leaves Saxony--Pursues the Czar--Advances into Ukrania--His
losses and wounds, and the battle of Pultowa--The consequences of
the battle--Charles forced to escape into Turkey--His reception in
Bessarabia. 147
BOOK V
The state of the Ottoman Porte--Charles retires to Bender--His
occupations--His intrigues at the Porte--His plans--Augustus
restored--The King of Denmark attacks Sweden--All the King’s other
territories are invaded--The Czar keeps festival at Moscow--The
affair of Pruth--History of the Czarina. 187
BOOK VI
Intrigues at the Porte--The Kan of Tartary and the Pasha of Bender try
to force Charles to depart--He defends himself with forty servants
against their whole army. 229
BOOK VII
The Turks remove Charles to Demirtash--King Stanislas is seized at
the same time--Bold action of M. de Villelongue--Revolutions in the
seraglio--Battles in Pomerania--Altena is burnt by the
Swedes--Charles returns to his kingdom--His strange method of
travelling--His arrival at Stralsund--The state of Europe at that
time--The losses of King Charles--The successes of Peter the
Great--His triumphal entry into Petersburg. 267
BOOK VIII
Charles marries his sister to the Prince of Hesse--He is besieged
in Stralsund and escapes to Sweden--The enterprise of Baron Gortz
his premier--Plans of reconciliation with the Czar--An attack on
England--Charles besieges Frederickshal in Norway--He is killed--His
character--Gortz is beheaded. 301
INDEX 339
PREFATORY NOTE
“_To Charles the Twelfth of Sweden I owe much of what has stood me
in best stead all my life. It was nearly thirty years ago, when but a
boy, that I bought his Life for a penny in the New Cut. I took it home
and devoured it. It made a great impression on me. Not his wars, but
the Spartan heroism of his character. He inspired me with the idea of
triumphing over physical weakness, weariness and pain. To inure his
body to bear all manner of hardships indifferently, to bathe in ice,
or face the torrid rays of the sun, to discipline his physical powers
by gymnastics, to despise the niceties of food and drink, to make his
body an instrument as of tempered steel, and at the same time to have
that body absolutely at the disposition of the mind, that seemed to
me conduct worthy of a hero. And so, boylike, I tried to imitate him,
and succeeded at least so far as to be happily indifferent to the
circumstances of my personal environment._”
JOHN BURNS.
“Och än är det likt det slägte som bor
Bland Nordiska fjellar och dalar,
Och ännu på Gud och på Stålet det tror,
An fädernas kärnspråk det talar.”
“And still as of old are the folk that abide
‘Mid northerly mountain and valley;
In God and their weapons they ever confide,
To voice of their fathers they rally.”
INTRODUCTION
THE “Life of Charles XII” that Mr. John Burns once bought for a penny
in the New Cut--an incident in itself historical if one looks at it in
the right way--was, he writes to say, an English version of Voltaire’s
book. The “Histoire de Charles XII, Roi de Suède,” was first published
at Rouen in 1731, first freely translated into English by Alexander
Henderson in 1734, and soon afterwards reduced into a chap-book, which
made the King a proverbial hero in English fairs and market-places.
There have been other translations since Henderson’s, and it is now
retranslated by Miss Todhunter with a closer correspondence than his to
Voltaire’s original.
The book may claim a particular right to an English hearing, apart from
the main interest of its subject. It was in England that the life of
Charles XII was written by Voltaire, when he was on a visit of exigency
there after the Rohan escapade and his second Bastille imprisonment.
The effect of this stay in England was that of a determining event
in his career. “Voltairism,” writes Mr. John Morley, “may be said to
have begun from the flight of its founder from Paris to London. This,
to borrow a name from the most memorable instance of outward change
marking inward revolution, was the decisive ‘hegira,’ from which the
philosophy of destruction in a formal shape may be held seriously
to date.” We may supplement this passage from the criticism of a
French critic of another school, who says, “England at this time was
worked by a spirit of dogmatic irreligion which based itself on a
false erudition, a bold criticism and an insidious metaphysic. It was
the time of Woolston, of Toland, of Tindal, of Chubb, of Collins, of
Bolingbroke. Until then, an _insouciant_ disciple and imitator
of the epicureans of the Temple and the _roués_ of the Regency,
Voltaire had only ventured on impiety by sallies; dogmas and mysteries
had so far only inspired him with _bon mots_. In the school of the
English philosophers he learnt to reason out his incredulity.”
Voltaire had had time by this to mend his youth and find his
intellectual stature. Born in 1694, he was now a man approaching
thirty-three. He had written plays, for his love for the theatre, as
it lasted late in him, began early; he had completed his epic, “la
Henriade”; he had used his wit irresponsibly, and, thanks to it, had
twice been in the Bastille. In England he learnt, if one may say so, to
take his wit seriously, that is, to realize it as a decisive weapon in
his inevitable revolt and warfare. Similarly he was to use some of his
other faculties in their most adroit perfection. If in the “Henriade”
the epic method had failed him, considered by the side of other poems
as ambitious and as long, he was able to sit down on his return from
his English exile and complete this rapid piece of biography, in
effect a short prose epic, which shows us the narrative art used by a
consummate master in that art.
More than this we need not claim for him. If we admit Carlyle’s stigma
of “persifleur” as applying to his first period, we need not go on
to write him down now philosopher, by way of compensation, because
he had studied for a brief period under certain notorious English
philosophers. He was neither a persifleur nor a philosopher: he was a
militant scribe and hyper-critic with a master bias, anti-religious or
anti-Catholic, and an inimitable gift of expression. We see his gift in
a very luminous special form in his “Charles XII,” which luckily need
offend no man’s susceptibilities.
We do not know whether that extraordinarily long indicative nose of his
was at this time as telling a sign of his character, backed by his keen
twinkling black eyes, as it became later? The two best pen-portraits
of Voltaire we have belong to a later day than 1728, when “Charles
XII” was written. The first takes us to the year when his “Sémiramis”
was produced, when he appears in a strange disguise among the casual
nightly apparitions of the Café de Procope.
“M. de Voltaire, who always loved to correct his works, and perfect
them, became desirous to learn, more specially and at first hand, what
good or ill the public were saying of his Tragedy; and it appeared
to him that he could nowhere learn it better than in the Café de
Procope, which was also called the Antre (Cavern) de Procope, because
it was very dark even in full day, and ill-lighted in the evenings;
and because you often saw there a set of lank, sallow poets, who had
somewhat the air of apparitions. In this café, which fronts the Comédie
Française, had been held, for more than sixty years, the tribunal of
those self-called Aristarchs, who fancied they could pass sentence
without appeal, on plays, authors and actors. M. de Voltaire wished
to compear there, but in disguise and altogether incognito. It was
on coming out from the playhouse that the judges usually proceeded
thither, to open what they called their great sessions. On the second
night of ‘Sémiramis’ he borrowed a clergyman’s clothes; dressed
himself in cassock and long cloak; black stockings, girdle, bands,
breviary itself; nothing was forgotten. He clapt on a large peruke,
unpowdered, very ill combed, which covered more than the half of
his cheeks, and left nothing to be seen but the end of a long nose.
The peruke was surmounted by a large three-cornered hat, corners
half bruised-in. In this equipment, then, the author of ‘Sémiramis’
proceeded on foot to the Café de Procope, where he squatted himself
in a corner; and waiting for the end of the play, called for a
_bavaroise_, a small roll of bread, and the Gazette. It was
not long till those familiars of the Parterre and tenants of the
café stept in. They instantly began discussing the new Tragedy. Its
partisans and its adversaries pleaded their cause with warmth; each
giving his reasons. Impartial persons also spoke their sentiment;
and repeated some fine verses of the piece. During all this time, M.
de Voltaire, with spectacles on nose, head stooping over the Gazette
which he pretended to be reading, was listening to the debate;
profiting by reasonable observations, suffering much to hear very
absurd ones and not answer them, which irritated him. Thus, during an
hour and a half, had he the courage and patience to hear ‘Sémiramis’
talked of and babbled of, without speaking a word. At last, all these
pretended judges of the fame of authors having gone their ways, without
converting one another, M. de Voltaire also went off; took a coach in
the Rue Mazarine, and returned home about eleven o’clock. Though I knew
of his disguise, I confess I was struck and almost frightened to see
him accoutred so. I took him for a spectre, or shade of Ninus, that
was appearing to me; or, at least, for one of those ancient Irish
debaters, arrived at the end of their career, after wearing themselves
out in school-syllogisms. I helped him to doff all that apparatus,
which I carried next morning to its true owner--a Doctor of the
Sorbonne.”
Another cartoon, still better known, is that of the familiar scene of
his apotheosis at the Comédie Française. A briefer sketch of that same
year of his death, 1778, may be given, because it contrasts with his
sharp sketch of Charles XII at Adrianople, carried on a sofa from his
carriage, when, to avoid been seen, the King covered his face with a
cushion--
“M. de Voltaire appeared in full dress on Tuesday, for the first time
since his arrival in Paris. He had on a red coat lined with ermine; a
large peruke, in the fashion of Louis XIV, black, unpowdered; and in
which his withered visage was so buried that you saw only his two eyes
shining like carbuncles. His head was surmounted by a square red cap in
the form of a crown, which seemed only laid on. He had in his hand a
small nibbed cane; and the public of Paris, not accustomed to see him
in this accoutrement, laughed a good deal.”
One interesting point about Voltaire’s English associations, in so far
as they prepare the way for the writing of his “Charles XII,” has not
hitherto been pointed out. It is this: that a history of the “Wars of
Sweden,” written by no less a hand than Defoe’s, was in existence when
Voltaire was studying English literature in London. The work, or at
any rate its first part, was anonymously published, like Voltaire’s,
in 1715; a continuation was added, and the two parts were then issued
together in 1720. Between these two dates, let us note, or in 1719,
“Robinson Crusoe” had appeared. Defoe’s career has some incidents of
prison and persecution that are like enough to Voltaire’s to warrant
a fanciful apposition of the two rebel authors. He was in severe
straits when he wrote the first part of his Wars of Charles XII; deeply
involved in political intrigues. He had had, too, a severe illness--a
violent fit of apoplexy--at the end of the previous year; and his trial
for libelling Lord Annesley in the whig “Flying Post” was impending.
His sentence, and curious escape from being imprisoned, and his “Hymn
to the Mob,” have at best a remote bearing on the present book. But one
notes these ironical lines to the Mob as having an added irony, when
read in the light of his “Charles XII” and Voltaire’s interest in his
writings--
“Thou art the Essence of the War;
Without thee who wou’d in the Field appear?
’Tis all thy own, whoever gets the Praise--
Thy Hands that fight, and ’tis thy purse that pays.
How partial is the common state of things,
And how unjust the Fame of Emperors and Kings!”
Defoe’s “History of the Wars” is written as “by a Scots gentleman in
the Swedish service.” It is a more documentary book than Voltaire’s, to
all outward appearance; and in it he has written with characteristic
fidelity to the make-believe of his literary double the pseudo “Scots
gentleman.” It has much the air of the off-hand, matter-of-fact
military narrator, who does not look for rhetorical openings, or
greatly trouble himself to make the most of his subject.
In his preface he says of Charles XII: “He has done Actions that
Posterity will have room to Fable upon, till they make his History
Incredible, and turn it into Romance.” The romance is already in
process in Defoe’s pages. The following passage in the text may be
quoted to give an idea of his Scots gentleman’s estimate of the King--
“And such as these were his Discourses to us, who were his Servants,
which so effectually convinc’d us, that his Cause was just, and his
Foundations right, that however black the Prospect was, which we had
before us; for we could see nothing attending us in the Process of the
War, but Death, or being made Prisoners of War, which among Northern
Princes especially, is but one Degree less in its Nature to a Soldier;
and yet it must be said, in Honour of his _Swedish_ Majesty’s
Service, and of his Servants too; that not an Officer of Note deserted
him to the Day of his Death, or quitted his Service, tho’ always
unfortunate; nay, even the foreign Officers did not desert him; for
we all thought, so much Virtue, such personal Bravery, such gallant
Principles, such immoveable Steadiness, could not fail, but _one Time
or other_ must necessarily have a Turn of Fortune in the World, must
_some Time or other_ find Friends to support it: For who could
imagine, that so gallant a Prince should at once be abandon’d of all
the Princes of the Earth, from whom any Assistance could be expected;
and that he, whose Ancestors had been the Refuge and Sanctuary of
all the Protestant Powers and Princes in _Germany_, in their
Distress, should at last receive Help from none of the Successors of
those very Princes, who were establish’d by the Blood and Power of
_Sweden_; nay, to apply it nearer, should at last be driven out of
his Possessions by those very Powers, whose Ancestors ow’d the Being
of their Government, to the Gallantry and Friendship of the King of
_Sweden’s_ Predecessors.”
Other extracts might be made which would show that Defoe was writing at
his utmost stretch of speed when he wrote the “History.” This, too, is
proved by the occasional gaps, dates left blank, and uncorrected errors
of fact, or of the press.
Voltaire’s book, on the other hand, though it repeats some of Defoe’s
errors, is an admirably adroit, and a well-poised and considered
biography: one of the best biographies of great soldiers ever given
to the world. We may conclude, if we will, that Voltaire’s English
experiences in the decisive years of the writing of the book, which
undoubtedly gave a new force and impulse to his genius, helped him
also to his particular mastery in this vein. His tribute to England in
his “Lettres Philosophiques sur les Anglais” is an indirect testimony
to his intellectual expatriation; and with these two books and his
tragedy, “Zaïre,” which followed in 1732, Voltaire may be said to have
attained his brilliant majority.
The students of history who wish to collate Voltaire’s book with later
authorities may be recommended to turn to Mr. Nisbet Bain’s volume
on Charles XII, in the “Heroes of the Nations” series, Mr. Oscar
Browning’s monograph, and Schuyler’s “History of Peter the Great.”
E. R.
The following are the works of Voltaire--
Dramatic Works:--Œdipe, 1718; Artémire, 1720; Mariamne, 1724; Zaïre,
1732; Samson (opera), 1732; L’Enfant Prodigue, 1736; Mahomet, ou le
Fanatisme, 1742; Mérope, 1743; Sémiramis, 1748; Nanine, 1749; Oreste,
1750; L’Orpheline de la Chine, 1755; Tancrède, 1760; L’Ecossaise,
1760; Le Dépositaire, 1772; Irène, 1778; Agathoclès, 1779 (performed
on the anniversary of the poet’s death). Other dramas and operas.
Poems:--La Bastille, 1717; La Henriade (fraudulently published as
La Ligue, 1723-4) 1728; Mort de Mlle. Lecouvreur, 1730; Temple
du Goût, 1733 (prose and verse); Le Mondain, 1736; Discours sur
l’homme (Épîtres sur le Bonheur, 1738-9); Sur les Événements de 1744;
Fontenoi, 1745; Temple de la Gloire, 1745; La Pucelle d’Orléans, 1755
(some of the “Chants” had been in circulation since 1735), in twenty
Chants, 1762; a supplemental one, “La Capilotade,” appeared separately
in 1760; Sur le désastre de Lisbonne, 1756; Sur la Loi Naturelle,
1756; La Vanité, Le Pauvre Diable, Le Russe à Paris, 1760; Contes
de Guillaume Vadé (with prose, 1764); La Guerre Civile de Génève
(burlesque poem), 1768; Les Trois Empereurs en Sorbonne, 1768; Épître
à Boileau, 1769; Les Systèmes, Les Cabales, 1772; La Tactique, 1773;
and others.
Prose Tales:--Le Monde comme il va (or Babouc), 1746; Zadig, 1748
(published in 1747 as “Memnon, Histoire Orientale”); Memnon, ou la
Sagesse Humaine, 1749; Micromégas, 1750; L’Histoire d’un Bon Bramin,
1759; Candide, 1759; Le Blanc et Le Noir, 1764; Jeannot et Colin,
1764; L’Homme aux Quarante Écus, 1767; L’Ingénu, 1767; La Princesse de
Babylone, 1768; Histoire de Jenny, 1769; Lettres d’Amabed, 1769; Le
Taureau Blanc, 1774; Les Oreilles du Comte de Chesterfield, 1774; and
others.
Historical Works:--Histoire de Charles XII, 1731; Siècle de Louis
XIV, 1751; enlarged edition 1753 (two chapters had been printed and
suppressed in 1739); Abrégé de l’Histoire Universelle, vols. i and
ii, 1753; vol. iii, 1754; complete edition, 1756 (fragments had
appeared in 1745); Annales de l’Empire, 1753; Précis du Siècle de
Louis XV, published in part 1755 and 1763, with additional chapters,
1769; Essai sur l’Histoire Générale et sur les Mœurs et l’Esprit des
Nations depuis Charlemagne jusqu’à nos jours, five vols, 1756, given
in vol. vii of Siècle de Louis XIV (some chapters had appeared in
the “Mercure” in 1745-6); Histoire de Russie sous Pierre le Grand:
first part, 1759; second part, 1763; La Philosophie de l’Histoire,
1765 (later the “Discours préliminaire” to “Essai sur les Mœurs”);
La Défense de mon Oncle (in reply to an adverse criticism on the
above work), 1767; Le Pyrrhonisme de l’Histoire, 1768; Fragments sur
l’Histoire Générale (Pyrrhonism and Tolerance), 1773.
Works on Philosophy and Religion:--Épître philosophique à Uranie,
1732; Lettres sur les Anglaises (twenty-four letters), 1733, 1734
(also published as “Lettres Philosophiques”); Traité de Métaphysique,
1734; Éléments de la Philosophie de Newton, 1738; Métaphysique de
Newton, 1740; Articles for the Encyclopédie, 1757; Dictionnaire
Philosophique Portatif, 1764; Catéchisme de l’Honnête Homme, 1763; Le
Philosophe Ignorant, 1766; La Raison par Alphabet (new edition of the
Dictionnaire Philosophique), 1769; Lettres de Memmius, 1771; Questions
sur l’Encyclopédie par des Amateurs, 1770-2; Lettres Chinoises,
Indiennes, et Tartares par un Bénédictin, 1776; Mémoires pour servir à
la vie de M. Voltaire (printed 1784); and others.
Critical Works:--Essai sur la Poésie, 1726; Utile Examen des Épîtres
de J. J. Rousseau, 1736; Lettres sur la “Nouvelle Héloïse,” 1761;
Appel à toutes les Nations de l’Europe des Jugements d’un écrivain
Anglais (later known as “Du Théâtre Anglais”), 1761; Éloge de M.
de Crébillon, 1762; Idées Républicaines (in the “Contrat Social”),
1762; Théâtre de Corneille (with translation of Shakespeare’s
“Julius Cæsar”), 1764; Examen Important de Milord Bolingbroke, 1767;
Commentaire Historique sur les Œuvres de l’auteur de la Henriade,
1776; Éloge et Pensées de Pascal (corrected and enlarged edition),
1776; Commentaire sur l’Esprit des Lois de Montesquieu, 1777; and
others.
Miscellaneous Writings:--Épîtres aux Manes de Genonville, 1729;
Épître des Vous et des Tu, 1732; Sur la Calomnie, 1733; Anecdotes
sur Pierre le Grand, 1748; Mensonges Imprimés (on Richelieu’s Will),
1749; Des Embellissements de Paris, 1750; Remerciement sincère à
un Homme Charitable, 1750; Diatribe du Doctor Akakia, 1752; Les
Quand, 1760; Writings for the rehabilitation of Jean Calas, who had
been unjustly executed, 1762; Traité sur la Tolérance à l’occasion
de la Mort de Jean Calas, 1763; Le Sentiment des Citoyens (attack
on Rousseau), 1764; Discours aux Welches, 1764; Les Anciens et les
Modernes, ou la Toilette de Mme. de Pompadour, 1765; Commentaires sur
le livre des délits et des peines, 1766; Le Cri des Nations (against
Papal domination), 1769; De la Paix Perpétuelle (on fanaticism and
tolerance), 1769; La Méprise d’Arras (on another judicial mistake),
1771; Éloge de Louis XV; de la Mort de Louis XV et de la Fatalité,
1774; and other works.
Editions of Voltaire’s works include a few works on physics and an
enormous correspondence.
Chief General Editions of Works:--Ed. Beaumarchais, etc., 70 vols.
8°, 1784; 92 vols. 12°, 1785-90; Beuchot, 70 vols., 1828, etc.; Ed.
du Siècle, 8 vols., 1867-70; Moland, 50 vols., 1877-83; with “Table
Générale et Analytique,” by Charles Pierrot, 1885; Selections have
been published, and separate volumes of letters.
Bibliography:--G. Bengesco, 1882-90.
Life, etc.:--Condorcet, 1787; G. Desnoireterres, “Voltaire et la
Société Française au XVIII^{me} Siècle,” 1871-76; Longchamp et
Wagnière, “Mémoires sur Voltaire, et ses ouvrages,” 1825; Bersot,
Études sur le XVIII^{me} Siècle, 1855; A. Pierron, “Voltaire et ses
Maîtres,” 1866; Maynard, “Voltaire; sa vie et ses œuvres,” 1867; D. F.
Strauss, 1870; J. Morley, 1872, 1886; James Paston, 2 vols., 1881; G.
Maugras, “Voltaire et Jean Jacques Rousseau,” 1886; E. Faguet, 1895;
E. Champion, “Voltaire: Études Critiques,” 1897; L. Cronslé, 1899;
G. Lanson, 1907; and in Sainte-Beuve, “Causeries du Lundi,” vol. ii;
Brunetière, “Études Critiques,” vols. i, iii, iv.
TRANSLATOR’S NOTE
“CHARLES XII” was written during the years 1727 and 1728. It is more
than 170 years since it was first translated into English. Opinions
of its merits differ widely. Macaulay, classing it with Boswell’s
“Johnson” and Marmontel’s “Mémoires,” says that it “may be perused with
delight by the most frivolous and the most indifferent.” Carlyle goes
even further: “‘Charles XII,’” he writes, “may still pass for a model
in that oft-attempted species of biography; the clearest details are
given in the fewest words; we have sketches of strange men and strange
countries, of wars, adventures, negotiations, in a style which for
graphic brevity rivals Sallust. It is a line engraving on a reduced
scale of that Swede and his mad life, without colours, yet not without
the foreshortenings and perspectives of a true picture. In respect of
composition, whatever may be said of its accuracy and worth otherwise,
we cannot but reckon it as greatly the best of Voltaire’s histories.”
Adverse criticism, on the other hand, began as early as 1732, when La
Mottraye, who had lived on terms of intimacy with the King, wrote a
scathing criticism of Voltaire’s work. Voltaire succeeded in making
a laughing-stock of this gentleman, but the publication of the works
of Nordberg, the King’s chaplain, and of Adlerfelt, his chamberlain,
shortly afterwards, did bring discredit on some of Voltaire’s details.
Of the modern school of critics, Mr. Nisbet Bain, who has made a
special study of original authorities, does not hesitate to call the
book a “romance.”
Underlying this difference of opinion is the time-honoured question
of the “scientific” as opposed to the “epical” treatment of the lives
of the great. The history of any great man’s career is a kind of epic
poem, and, to borrow Mr. Birrell’s words, “I do not see why we children
of a larger growth may not be interested in the annals of mankind
simply as a story.”
It must, indeed, be admitted that Voltaire is no precise or scientific
historian; but, in the portrayal of the life of a man of action,
rapidity and charm of style is surely as important as the careful
tracing of cause and effect.
Voltaire’s literary style is famous; but work of high literary merit
always suffers in translation; so that any roughness in the present
rendering must be attributed to the translator and not to the author.
“Ett vet jag som aldrig dör--
Det är dom öfver död man.”
One thing I know that never dies--
The verdict passed upon the dead.
“The history of Sweden is the history of her kings,” and of those kings
the most striking is undoubtedly Charles XII, the Lion of the North.
One of the few heroic figures in a prosaic age, he seems to belong
rather to the times of Alfred the Great and Charlemagne than to those
of Richelieu and Louis XIII. He has well been called “the last of the
Vikings,” for the extraordinary nature of his adventures no less than
his dauntlessness and endurance make him a kind of Saga-hero. The
stories told of his childhood show the beginnings of those Spartan
powers of enduring hardship which made him the idol of his “brave blue
boys” in later life.
It is said that at the age of six he almost killed himself by leaving
his bed in a Swedish mid-winter to “harden himself” by sleeping on the
bare boards. The obstinacy which was the most marked characteristic of
his boyhood developed in after years into the resolution with which as
a mere youth he faced the treachery of his neighbours. “I am resolved,”
he said in his first speech to his Parliament, “never to begin an
unrighteous war, but I am also resolved never to finish a righteous war
until I have completely humbled my enemies.”
In all matters of convention he was “in his simplicity sublime.” He
cared nothing for the pomp of sovereignty, and always wore a soldier’s
plain buff coat; he took his meals standing, spreading the bread and
butter, which was his usual fare, with his thumbs. His letters to his
sister (whom he addresses as “mon cœur”) are full of real affection,
and a glance at them dispels the popular illusion that he was cold and
heartless, just because he could resist the blandishments of Anna von
Königsmarck!
Apart from occasional lapses into the fatalism characteristic of his
race, he seems to have been devout. Shortly after his accession he
ordered the titles “Our Most Gracious Majesty” to be removed from
the liturgy, on the ground that “Almighty God is not appeased by
high-sounding titles but by the prayers of humble and faithful hearts.”
He was the last to lose heart in adversity; he lost his Empire with
as good a grace as he won it. “It is only requisite,” he wrote after
Pultawa, where all was lost but honour, “not to lose courage, or let
go the conduct of affairs.”
His early death was a disaster not only for Sweden but for the whole of
Europe, for he was the first to realize and check the growing power of
Russia.
BOOK I
HISTORY OF CHARLES XII
KING OF SWEDEN
BOOK I
Outline of Swedish history up to the time of Charles XI--Charles’s
education--His enemies--Character-sketch of the Czar, Peter
Alexiowitz--His peculiarities--Alliance of Russia, Poland, Denmark
against Charles XII.
THE kingdom which is made up of Sweden and Finland is, according to our
measurement, about 200 leagues broad and 300 long, and stretches from
south to north as far as the 55th degree or thereabouts. The climate
is severe; there is scarcely any spring or autumn, but there are nine
months of winter in the year, and the heat of summer follows hard upon
the excessive cold of winter. Frost from the month of October onwards
is continuous, nor are there any of those imperceptible gradations
between the seasons which, in other countries, render changes less
trying. In compensation Nature has endowed the Swedes with clear sky
and pure air. The summer sunshine, which is almost continuous, ripens
fruit and flowers very rapidly. The long winter nights are shortened
by the twilight evenings and dawns, which last in proportion to the
sun’s distance from Sweden; and the light of the moon, unveiled by any
clouds, and intensified by reflection from the snow-clad ground, and
often, too, by lights like the Aurora Borealis, makes travelling in
Sweden as easy by night as by day.
The fauna are smaller than in the more central parts of Europe, on
account of the poor pastures. The people are well developed; the purity
of the air makes them healthy, and the severity of the climate hardens
them. They live to a good old age when they do not undermine their
constitutions by the abuse of strong drink, which Northern nations seem
to crave the more because they have been denied them by Nature.
The Swedes are well built, strong and active, and capable of undergoing
the most arduous labours, hunger and want; they are born fighters, high
spirited and daring rather than industrious. They have long neglected
commerce and are still poor business men, though commerce alone can
supply their country’s wants.
Tradition says that it was chiefly from Sweden (a part of which is
still called Gothland) that there poured those hordes of Goths who
overran Europe and wrested it from the sway of Rome, who for the past
500 years had played the rôle of tyrant, usurper and lawgiver in that
country. The Northern countries were at that time far more populous
than they are to-day; there was no religious restraint preventing the
citizens from polygamy; the only reproach known to the womenfolk was
that of sterility or of idleness, and as they were both as industrious
and as strong as the men, the period of maternity was of longer
duration.
In spite of this, Sweden, together with what remains to it of Finland,
has not above 4,000,000 inhabitants. The soil is sterile and poor,
and Scania is the only district which produces barley. There is not
more than four millions current money in the whole land. The public
bank, the oldest in Europe, was established to meet a want, because,
as payments are made in brass and iron coin, difficulties of transport
arose.
Sweden enjoyed freedom until the middle of the fourteenth century;
during this long period several revolutions occurred, but all
innovations were in the direction of liberty.
The chief magistrate had the title King, which in different countries
involves very different degrees of power. Thus in France and Spain it
implies an absolute monarchy, while in Poland, Sweden and Finland it
stands for a representative or limited monarchy. In Sweden the King
was powerless without the Council, and the Council in turn derived
its powers from the Parliament, which was frequently convened. In
these great Assemblies the nation was represented by the nobility,
the bishops, and deputies from the towns. In course of time even the
peasantry, that section of the community which had been unjustly
despised and enslaved throughout almost the whole of North Europe, was
admitted to the Parliament.
In about 1492 this nation, essentially liberty-loving, and never
forgetful of the fact that she had conquered Rome thirteen centuries
before, was brought into subjection by a woman and a nation weaker than
the Swedes. Margaret of Valdemar, the Sémiramis of the North, Queen of
Denmark and Norway, conquered Sweden partly by force of arms and partly
by means of diplomacy, and united her vast estates into one kingdom.
After her death Sweden was rent by civil war; she alternately shook
off and submitted to the Danish yoke, and was ruled by kings and
ministers alternately. In about 1520 she passed through a period of
cruel oppression at the hands of two tyrants: one was Christian II,
King of Denmark, a monarch with all the vices, and no one redeeming
feature; the other, Archbishop of Upsala, and Primate of the kingdom,
was as cruel as the former. One day these two, acting in concert, had
the consuls, the magistrates of Stockholm and ninety-four senators
seized and massacred by the executioners, on the ground that they had
been excommunicated by the Pope for having defended the State against
the Archbishop. Whilst these two men, united in oppression, but
opposed when it was a question of dividing the spoil, were exercising
the utmost tyranny and the cruelest vengeance, a new event changed the
whole aspect of affairs in the North.
Gustavus Vasa, a youth descended from the old line of kings, issued
from the depths of the forest of Delecarlia, where he had been in
hiding, and appeared as the deliverer of Sweden. He was one of those
rare products of Nature, a great genius with all the qualities of a
commander of men. His noble stature and an air of distinction brought
him adherents the moment he appeared. His eloquence, reinforced by his
good looks, was all the more persuasive because it was unassumed. His
genius led to the conception of great undertakings, which ordinary
people deemed foolhardy, but which, in the eyes of the great, were
simply brave. His never-failing courage carried him through all
difficulties. He combined valour with discretion, was essentially
gentle in an age of savagery, and had a reputation for uprightness, as
far as that is possible for a party leader.
Gustavus Vasa had been a hostage of Christian, and kept prisoner
contrary to the laws of nations. Having escaped from prison he had
wandered, disguised as a peasant, in the mountains and woods of
Delecarlia; there, to provide himself both with a livelihood and with
a hiding-place, he found himself forced to work in the copper-mines.
While buried in these vaults he dared to form the project of dethroning
the tyrant. He revealed himself to the peasants, and impressed them as
a man of extraordinary gifts, whom ordinary men instinctively obey.
In a short time he turned these barbarians into veterans. He attacked
Christian and the Archbishop, gained several victories over them, and
drove them both from Sweden. Then the States duly elected him King of
the country which he had liberated.
Scarcely was he firmly seated on the throne before he embarked on an
enterprise of greater difficulty than his conquests. The real tyrants
of the State were the bishops, who, possessing nearly all the wealth of
Sweden, employed it to oppress the people and to make war on the kings.
This power was all the more terrible because, in their ignorance, the
people regarded it as sacred. Gustavus punished the Catholic Church
for the crimes of her priests. In less than two years he introduced
Lutheranism into Sweden, using as a means diplomacy rather than force.
Having thus, as he put it, wrested the kingdom from the Danes and the
clergy, he reigned in prosperity and absolutism, and died at the age
of seventy, leaving his dynasty securely seated on the throne, and his
form of faith firmly established.
One of his descendants was that Gustavus Adolphus who is called the
Great. This king conquered Livonia, Ingria, Bremen, Verden, Vismar,
Pomerania, besides more than a hundred towns in Germany, given up
by Sweden after his death. He shook the throne of Ferdinand II, and
protected the Lutherans in Germany, his efforts in that direction being
furthered by the intrigues of Rome herself, who stood more in awe of
the power of the Emperor than of heresy itself. He it was who, by his
victories, contributed to the downfall of the House of Austria, an
undertaking accredited to Cardinal Richelieu, who was past master in
the art of gaining a reputation for himself, while Gustavus contented
himself with great deeds. He was on the point of carrying war across
the Danube, with the possibility of dethroning the Emperor, when, at
the age of thirty-seven, he was killed in the battle of Lutzen, where
he defeated Valstein. He carried with him to the grave the title of
“Great,” the regrets of the North, and the esteem of his enemies.
His daughter Christine, an extremely gifted woman, preferred
disputations with savants to the government of a people whose knowledge
was confined to the art of war.
She won as great a reputation for resigning the throne as her ancestors
had gained in winning and securing it. The Protestants have defamed
her, as if Lutherans have the monopoly of all the virtues; and the
Papists exulted too much in the conversion of a woman who was a mere
philosopher. She retired to Rome, where she passed the rest of her
life surrounded by the arts which she loved, and for the sake of which
she had renounced an empire at the age of twenty-seven. After her
abdication she induced the States of Sweden to elect as her successor
her cousin Charles Gustavus, the tenth of that name, son of the Count
Palatinate, Duke of Deux Ponts. This king added new conquests to those
of Gustavus Adolphus. First he invaded Poland, where he gained the
celebrated three days’ battle of Warsaw; for some time he waged war
successfully against the Danes, besieged their capital, re-united
Scania to Sweden, and secured the tenure of Sleswick to the Duke of
Holstein. Then, having met with reverses, and made peace with his
enemies, his ambition turned against his own subjects.
He conceived the idea of establishing absolutism in Sweden, but, like
Gustavus the Great, died at the age of thirty-seven, before having
achieved the establishment of that despotism which his son, Charles
XI, completed. The latter, a warrior, like all his ancestors, was more
absolute than them all. He abolished the authority of the Senate,
which was declared to be a royal and not a national assembly. He was
economical, vigilant, and hard-working--in fact, such a king as would
have been popular had not fear dominated all other sentiments in the
hearts of his subjects. He married, in 1680, Ulrica Eleanora, daughter
of Ferdinand, King of Denmark, a virtuous princess worthy of more
confidence than her husband gave her; the offspring of this marriage
was Charles XII, perhaps the most extraordinary man ever born--a
hero who summed up in his personality all the great qualities of his
ancestors, and whose only fault and only misfortune was that he carried
them all to excess. It is of him, and all that is related of his
actions and person, that we now purpose writing.
The first book they gave him to read was _Samuel Puffendorf_,
in order that he might become early acquainted with his own and
neighbouring States. He then learned German, which he henceforward
spoke as fluently as his mother tongue. At seven years old he could
manage a horse. Violent exercise, in which he delighted and which
revealed his martial inclinations, early laid the foundation of a
strong constitution equal to the privations to which his disposition
prompted him.
Though gentle enough in early childhood he was unconquerably obstinate;
the only way to manage him was to appeal to his honour--he could be
induced to do anything in the name of honour. He had an aversion to
Latin, but when he was told that the Kings of Poland and Denmark
understood it, he learned it quickly, and for the rest of his days
remembered enough to speak it. Recourse was had to the same means to
induce him to learn French, but he was so obstinately determined
against it that he could not be prevailed upon to use it even with
French ambassadors who knew no other language. As soon as he had some
knowledge of Latin they made him translate Quintus Curtius; he took a
liking to the book rather for the subject than the style. The tutor who
explained this author to him asked him what he thought of Alexander. “I
think,” said the Prince, “that I would like to be like him.” “But,” was
the answer, “he only lived thirty-two years.” “Ah!” replied the Prince,
“and is not that long enough when one has subdued kingdoms?” These
answers were reported to the King his father, who exclaimed, “That
child will excel me and he will even excel Gustavus the Great.”
One day he was amusing himself in the King’s room by looking over some
geographical plans, one of a town in Hungary taken by the Turks from
the Emperor, and the other of Riga, capital of Livonia, a province
conquered by the Swedes a century earlier. At the foot of the map
of the Hungarian town was this quotation from the Book of Job, “The
Lord gave, and the Lord hath taken away; blessed be the name of the
Lord.” The young Prince read these words, then took a pencil and wrote
beneath the map of Riga, “The Lord gave thee to me, and the devil shall
not take thee from me.” Thus, in the most insignificant acts of his
childhood, his resolute disposition revealed traits characteristic of
greatness, showing what he was one day to be.
He was eleven years old when he lost his mother; she died from an
illness brought on by the anxiety caused her by her husband and by
her own efforts to conceal it. By means of a kind of court called the
Chamber of Liquidation, Charles XI had robbed many of his subjects of
their property. A crowd of citizens ruined by this court--merchants,
farmers, widows and orphans--filled the streets of Stockholm, and daily
poured forth their useless lamentations at the gate of the Palace. The
Queen gave all her substance to help these poor wretches: her money,
jewels, furniture and even her clothes. When she had nothing left to
give them she threw herself weeping at her husband’s feet, praying
him to have compassion on his subjects. The King answered sternly,
“Madam, we have taken you that you may give us children, not advice.”
Henceforward he is reported to have treated her with such severity
that he shortened her life. He died four years after her, in the
fifty-second year of his age and the thirty-seventh of his reign, just
as the Empire, Spain and Holland on the one hand, and France on the
other, had referred the decision of their quarrels to his arbitration,
and when he had already begun the work of peace-making between these
powers.
To his son of fifteen he left a kingdom secure at home and respected
abroad. His subjects were poor, but brave and loyal; the treasury
in good order and managed by able ministers. Charles XII, on his
accession, not only found himself absolute and undisturbed master
of Sweden and Finland, but also of Livonia, Carelia and Ingria; he
possessed Wismar, Wibourg, the Isles of Rügen, Oesel, and the most
beautiful part of Pomerania and the Duchy of Bremen and Verden, all
conquests of his ancestors, assured to the crown by long tenure and by
the solemn treaties of Munster and Oliva, strengthened by the prestige
of Swedish arms. The peace of Ryswick, begun under the auspices of the
father, was completed by the son; who was thus arbiter of Europe from
the beginning of his reign.
Swedish law fixes the age of the King’s majority at fifteen years; but
Charles XI, who exercised absolute power in all points, deferred that
of his son, by will, to the age of eighteen. By this will he favoured
the ambitious views of his mother, Edwiga Eleanora of Holstein, widow
of Charles X.
This Princess was nominated by Charles XI guardian of her grandson
and, in conjunction with a Council of six persons, regent of the
kingdom. The regent had taken part in politics during the reign of
the King her son. She was old, but her ambition, greater than her
strength and ability, made her hope to enjoy the sweets of authority
long during the minority of the King, her grandson. She kept him away
from public business as far as possible; the young Prince passed his
time hunting, or busied himself with reviewing his troops. Sometimes
he even went through their exercises with them. These pursuits seemed
the natural outcome of the vivacity of youth, and there was nothing in
his conduct to alarm the regent. Then, too, she flattered herself that
the dissipation of these exercises made him unable to apply himself,
and so gave her the opportunity of a longer regency. One November day,
the very year of his father’s death, after he had reviewed several
regiments accompanied by the State-councillor Piper, he was standing
plunged apparently in deep thought. “May I take the liberty,” said the
latter to him, “of asking your Majesty of what you are thinking so
seriously?” “I am thinking,” answered the Prince, “that I feel worthy
of the command of those fine fellows, and that it is not my will that
either they or I should receive our orders from a woman.” Piper at
once seized the chance of making his fortune, and realizing that his
own influence was not strong enough for him to venture on so dangerous
an enterprise as depriving the Queen of the regency, and declaring
the King of age, he proposed the matter to the Count Axel Sparre,
an ambitious and aspiring man, pointing to the King’s confidence as
a likely reward. Sparre was credulous, undertook the business, and
worked hard in Piper’s interests. The Councillors of the Regency were
drawn into the scheme, and vied with one another in hastening the
execution of it in order to gain the King’s favour. They went in a body
to propose it to the Queen, who did not in the least expect such a
declaration.
The States-General were then assembled, the Councillors of the Regency
laid the matter before them, and they voted unanimously for it. The
affair was hastened on with a rapidity which nothing could check; so
that Charles XII merely expressed a wish to rule, and within three days
the States handed over the government to him. The power and influence
of the Queen melted away at once. Henceforth she lived in private, a
life more suited to her age, but less to her taste.
The King was crowned on the following 24th of December. He made his
entry into Stockholm on a sorrel horse, shod with silver, with a
sceptre in his hand, and amid the acclamations of a whole nation--a
nation always extravagantly fond of novelty and full of great
expectations of a young Prince.
The right of consecrating and crowning the King belongs to the
Archbishop of Upsala, and is almost the only privilege remaining to him
from among a number claimed by his predecessors. After having anointed
the Prince according to custom, he was holding the crown ready to put
on his head, when Charles seized it from his hands, and, with a proud
glance at the Prelate, crowned himself. The mob, always impressed by
a touch of majesty, applauded the King’s action; even those who had
suffered most from the tyranny of the father could not refrain from
praising the pride which was the inauguration of their servitude.
As soon as Charles was master, he took Councillor Piper into his
confidence, and handed over the direction of affairs to him, so that
he was soon Premier in all but name. A few days later he made him
Count, a title of distinction in Sweden, and not, as in France, an
empty title to be assumed at will. The first period of the King’s rule
did not give people a good impression of him; it looked as if he had
been rather impatient of rule than deserving of it. As a matter of
fact, he indulged no dangerous passions, and the only remarkable thing
about him seemed to be youthful fits of rage and a settled obstinacy.
He seemed proud and unable to apply himself. Even the ambassadors to
his court took him for a second-rate genius, and so described him to
their masters. The Swedish people had the same opinion of him; no one
understood his character; he himself had not realized it, when storms
arising in the North suddenly gave his hidden talents an opportunity of
displaying themselves.
Three strong princes, taking advantage of his extreme youth, made
simultaneous plans for his ruin. The first was Ferdinand IV, King of
Denmark, his cousin; the second Augustus, Elector of Saxony and King of
Poland; the third, and most dangerous, was Peter the Great, Czar of
Russia. It is necessary to explain the beginning of these wars, which
had such great results. We will begin with Denmark.
Of the two sisters of Charles XII, the elder had married the Duke of
Holstein, a young prince of great courage and kindliness. The Duke,
oppressed by the King of Denmark, came to Stockholm with his consort,
in order to put himself under the King’s protection, and ask his help,
not only as a brother-in-law, but also as King of a people which
nourishes an undying hatred for the Danes.
The ancient house of Holstein, merged with that of Oldenburg, was
elected to the throne of Denmark in 1449. All the Northern kingdoms
were at that time elective, but that of Denmark shortly after became
hereditary. One of its kings, Christian III, had an affection for his
brother Adolphus for which there are few parallels in history. He
neither wished to leave him powerless, nor could he dismember his own
States. By an extraordinary arrangement he shared with him the duchies
of Holstein-Gottorp and Sleswick. The descendants of Adolphus should,
in future, rule Holstein in conjunction with the kings of Denmark, so
that the two duchies should be common property, and the King could
do nothing in Holstein without the sanction of the Duke, and _vice
versa_. This extraordinary union, of which there had, however, been
a parallel instance a few years previously, was, for more than eighty
years, a source of quarrels between the Denmark and Holstein branches
of the dynasty, since the kings always made it their policy to oppress
the dukes, and the dukes were equally determined on independence. The
struggle had cost the last Duke his liberty and his supremacy. He
had regained both at the Conference of Altena in 1689, through the
mediation of Sweden, Holland and England, the guarantors of the treaty.
But as a treaty between princes is often only a temporary makeshift,
until the stronger is able to oppress the weaker, the quarrel between
the new Danish King and the young Duke began again more violently than
ever. While the Duke was at Stockholm, the Danes had already begun
hostilities in the district of Holstein, and had made a secret alliance
with the King of Sweden himself.
Frederic Augustus, Elector of Saxony, whom neither the eloquence and
schemes of the Abbé de Polignac, nor the great qualifications of the
Prince of Conti, his competitor for the throne, had been able to
deprive of election as King of Poland, was a prince still more famed
for his courage and chivalrous ideals, than for his incredible physical
strength. His court, after that of Louis XII, was second to none in
Europe in distinction. There was never a prince more generous or
liberal, nor one who gave with so good a grace.
He had bought half the votes of the Polish nobility, and gained the
other half by force on the approach of a Saxon army. He considered it
better to keep a standing army to strengthen himself on the throne; but
he wanted a pretext for keeping it in Poland. He had, in fact, planned
to send it against the King of Sweden, on the occasion we are now going
to relate.
Livonia, the most beautiful and fertile province of the North, had once
belonged to the Knights of the Teutonic order. The Russians, Poles,
and Swedes had since severally disputed their claim to it. Sweden had
enjoyed it for nearly one hundred years, and was solemnly confirmed in
possession of it by the Peace of Oliva.
The late King Charles XI, in his severity to his subjects, had not
spared the Livonians. He robbed them of their privileges and part of
their estates. Patkul, who from his unhappy death has since gained
the notoriety of misfortune, was deputed by the nobility of Livonia
to lay their grievances before the King. His speech to his master was
respectful, but strong and full of the rugged eloquence begotten of
calamity and courage. But kings too often regard public speeches as
vain ceremonies, which they must endure without paying attention to.
But Charles XI, who, when he did not give way to transports of rage,
knew how to act a part, patted Patkul gently on the shoulder and said,
“You have spoken for your country like a brave man; I honour you for
it. Proceed.” But a few days after he had Patkul declared guilty of
high treason and condemned to death.
Patkul, who had hidden, took to flight, and carried his resentment to
Poland. Some time after he was admitted to the court of King Augustus.
Charles XI was dead, but the sentence of Patkul was not annulled, and
he was still most resentful. He pointed out to the King of Poland
how easily Livonia could be conquered; the people were in despair,
and eager to shake off the Swedish yoke; the King was only a child,
and unable to defend himself. These proposals were well received by
a prince who had long meditated this conquest. Preparations were
immediately made for a sudden invasion of Sweden, empty formalities of
ultimata and manifestoes being dispensed with.
At the same time the storm darkened on the Russian frontier. Peter
Alexiowitz, Czar of Russia, had already made his name feared by the
battle in which he defeated the Turks in 1697, and by the conquest of
Azov, which gave him the control of the Black Sea. But the actions
which won him the title of “The Great” were far more glorious than
conquests.
Russia occupies the whole of Northern Asia and Europe, and from the
frontiers of China extends 1,500 leagues to the borders of Poland and
Sweden. Yet the existence of this immense country was not even realized
by Europe before the time of the Czar Peter. The Russians were less
civilized than the Mexicans at the time of their discovery by Cortez;
born the slaves of masters as barbarous as themselves, they were sunk
deep in ignorance, and unacquainted with the arts and sciences, and so
insensible of their use that they had no industry. An old law, held
sacred among them, forbade them, on pain of death, to leave their
own country without the permission of their Patriarch. Yet this law,
avowedly enacted to prevent them from realizing their state of bondage,
was agreeable to a people who, in the depths of their ignorance and
misery, disdained all commerce with foreign nations.
The era of the Russians began with the creation of the world; they
reckoned up 7,207 years at the beginning of the last century, without
being able to give any reason why they did so. The first day of the
year corresponded to our 13th of September. The reason they gave for
this was that it was probable that God created the world in autumn, in
a season when the fruits of the earth are in full maturity!
Thus the only traces of knowledge found among them were founded on
gross mistakes; not one of them suspected that autumn in Russia might
be spring in another country in the antipodes. Not long before, the
people were for burning the secretary of the Persian ambassador,
because he had foretold an eclipse of the sun. They did not even know
the use of figures, but in all their calculations made use of little
beads strung on wire; and this was their method of reckoning in all
their counting-houses, and even in the treasury of the Czar.
Their religion was, and still is, that of the Greek Church, but
intermingled with superstitions, to which they firmly adhered in
proportion to their absurdity and their exacting nature. Few Russians
dare eat a pigeon, because the Holy Ghost is portrayed in form of a
dove. They regularly kept four Lents a year, and during that time
might eat neither eggs nor milk. God and St. Nicholas were the objects
of their worship, and next to them the Czar and the Patriarch. The
authority of the latter was as boundless as the people’s ignorance. He
had power of life and death, and inflicted the cruelest punishments,
from which there was no appeal. Twice a year he rode in solemn
procession, ceremoniously attended by all the clergy; and the people
prostrated themselves in the streets before him, like the Tartars
before their Grand Lama.
They practised confession, but only in the case of the greatest crimes;
and then absolution was held necessary, but not repentance; they
believed themselves purified in God’s sight as soon as they received
the priest’s benediction. Thus they passed without remorse straight
from confession to theft or murder; so that a practice which, in the
case of other Christians, acts as a deterrent, was, in their case,
only an incentive to crime. They scrupled to drink milk on a fast-day,
but on festivals fathers of families, priests, matrons and maids got
inebriated with brandy. As in other countries they had religious
differences among themselves, but the most important cause of dispute
was whether laymen should make the sign of the cross with two fingers
or with three, and a certain Jacob Nursoff had, during a previous
reign, raised a rebellion on this question.
The Czar, in his vast kingdom, had many subjects who were not
Christians; the Tartars, on the west coast of the Caspian, and the
Palus Mæotis were Mahometans; while the Siberians, Ostiacs and
Samoides, who live near the Baltic, were pagans. Some of these were
idolators, and some were without God in the world; still, in spite of
that, the Swedes, who were sent as prisoners among them, report more
favourably of their manners than those of the ancient Russians.
Peter Alexiowitz had received an education which tended to increase
the barbarity of his part of the world. His disposition led him to
like strangers before he knew they could be useful to him. Le Fort
was the first instrument that he made use of to change the face of
Russia. Peter’s mighty genius, checked but not destroyed by a barbarous
education, suddenly broke out; he resolved to act a man’s part, to
hold command of men and to create a new nation. Several princes before
him had renounced their thrones, from distaste for public business,
but there was no instance of a prince resigning that he might learn to
rule better, as Peter the Great did. He left Russia in 1698, before
the completion of the second year of his reign, and took a journey
into Holland, under an ordinary name, as if he were the domestic
servant of M. le Fort, whom he appointed ambassador-extraordinary to
the States-General. When he reached Amsterdam he entered his name on
the list of ships’-carpenters to the Indian Admiralty, and worked in
the dockyard like other carpenters. In his leisure time he learned
those branches of mathematics which might prove useful to a prince,
_e. g._ such as related to fortifications, navigation, and the
making of plans. He went into the workmen’s shops, examined all their
manufactures, and let nothing escape his notice. Thence he passed to
England, where he perfected himself in the science of ship-building,
and, returning to Holland, carefully investigated everything which
might be of use in his own country.
At last, after two years of travel and labour which nobody else would
have willingly undergone, he reappeared in Russia, bringing thither
with him the arts of Europe. A band of artists of all kinds followed
him, and then for the first time great Russian vessels were to be seen
on the Black Sea, the Baltic, and even on the ocean. Imposing buildings
of architectural merit were set up amidst the Russian huts. He founded
colleges, academies, printing-houses and libraries. The great towns
were civilized; and gradually, though not without difficulty, the dress
and customs of the people were changed, so that the Russians learned
by degrees what social life really is. Even their superstitions were
abolished, the Czar declared head of the Church, and the influence of
the Patriarch suppressed. This last undertaking would have cost a less
absolute Prince his throne and his life, but in the case of Peter not
only succeeded, but assured his success in all his other innovations.
Peter, having subdued the ignorant and barbarous clerical orders, dared
to venture to educate them, and so ran the risk of making them a power
in the State--but he believed that he was strong enough to take this
risk.
In the few monasteries which remained he had philosophy and theology
taught; though this theology was only a survival of the age of
barbarity from which Peter had rescued his country. A credible witness
assured the writer that he had been present at a public debate, where
the question was whether the use of tobacco was a sin; the proposer
argued that it was lawful to intoxicate oneself with brandy, but not to
smoke, because the Holy Scriptures say that, “Not that which goeth into
the mouth defileth a man; but that which cometh out of the mouth, this
defileth a man.”
The monks were not content with the reform. Scarcely had the Czar
set up printing-presses than they made use of them to abuse him.
They called him Antichrist, because he had the men’s beards cut off,
and because post-mortem dissection was practised in his academy. But
another monk, who wanted to make his fortune, wrote refuting this
argument, and proving that Peter was not Antichrist because the number
666 was not included in his name! The author of the libel was broken on
the wheel, and his opponent made Bishop of Rezan.
The Reformer of Russia carried a law which puts to shame many a
civilized state; by this law no member of the civil service, no
“bourgeois” with an established position, and no minor, might enter a
monastery. Peter quite grasped the importance of not allowing useful
subjects to take up idleness as a profession, nor those who had not yet
command of the least part of their fortune to renounce liberty for ever.
The Czar not only, after the example of the Turkish Sultans, subjected
the Church to the State, but, by a greater stroke of policy, he
destroyed a band of troops like the Janissaries; and that which the
Ottoman Emperors failed to do, he succeeded in very rapidly; he
disbanded the Russian Janissaries, called Strelitz, who had dominated
the Czars. This band, feared rather by its masters than its neighbours,
consisted of about 30,000 infantry, half stationed at Moscow, and the
other half at various points on the frontier; a member of the Strelitz
only drew pay at the rate of four roubles a year, but privileges and
abuses amply made up for this.
Peter at first formed a band of mercenaries, in which he had himself
enrolled, and was not too proud to begin as drummer-boy, so much were
the people in need of good example. He became officer by degrees, made
new regiments from time to time, and at last, finding himself at the
head of disciplined troops, broke up the Strelitz, who were afraid to
disobey him.
The cavalry resembled that of Poland, and that of France in the days
when France was only a collection of fiefs. Russian noblemen took
the field at their own expense, and engaged without discipline, and
sometimes unarmed but for a sabre and a quiver; they were quite unused
to discipline, and so were always beaten.
Peter the Great taught them to obey, both by example and by punishment.
For he himself served as a soldier and subordinate officer, and as
Czar severely punished the “boyards,” as the noblemen were called, who
argued that the privilege of the nobility was to serve the State in
their own way. He instituted a regular corps of artillery, and seized
500 church bells to cast cannon. By the year 1714 he had 13,000 brass
cannon. He also formed a corps of dragoons, a form of arm both suited
to Russian capacity and for which their horses, which are small, are
particularly fit.
Russia has, at the present day (1738), thirty well-equipped regiments
of dragoons of 1,000 men each.
He it was, too, who established the hussars in Russia; he even got a
school of engineers in a country where he was the first to understand
the elements of geometry.
He was a good engineer himself; but he excelled especially in
seamanship. As he was born with an extreme fear of the sea, it is all
the greater credit to him that he was a good captain, a skilful pilot,
a good seaman, and a clever carpenter. Yet in his young days he could
not cross a bridge without a shudder; and he had the wooden shutters
of his carriage closed on these occasions. It was his courage and will
which led him to overcome this constitutional weakness.
He had built on the Gulf of Tanais, near Azov, a fine port; his idea
was to keep a fleet of galleys there, and as he considered that these
long, flat, light craft would be successful in the Baltic, he had
300 of them built in his favourite town of Petersburg. He taught his
subjects how to construct them from ordinary fir, and then how to
manage them.
The revenue of the Czar was inconsiderable, compared with the immense
size of his empire. It never exceeded twenty-four millions, reckoning
the mark as £50, as we do at the present moment; but, after all, only
he is rich who can do great deeds. Russia is not densely populated,
though the women are prolific and the men are strong. Peter himself,
by the very civilization of his empire, contributed to its population.
The causes of the fact that there are still vast deserts in this great
stretch of the continent are to be sought in frequent recruiting for
unsuccessful wars, the transporting of nations from the Caspian to
the Baltic, the destruction of life in the public works, the ravages
wrought by disease (three-quarters of the children dying of small-pox),
and the sad result of a means of government long savage, and barbarous
even in its civilization. The present population of Russia consists of
500,000 noble families, 200,000 lawyers, rather more than 5,000,000
“bourgeois” and peasants paying a kind of poll-tax, and 600,000 men in
the provinces conquered from the Swedes; so that this immense realm
does not contain more than 14,000,000 men; that is to say, two-thirds
of the population of France.
The Czar Peter, having transformed the manners, laws, militia, and
the very face of his country, wished also to take a prominent part
in commerce, which brings both riches to a State and advantages to
the whole world. He intended to make Russia the centre of Asian and
European trade. The Volga, Tanais, and Duna were to be united by
canals, of which he drew the plans, and new ways were to be opened
from the Baltic to the Euxine and the Caspian, and from these to the
Northern Ocean.
In the year 1700 he decided to build on the Baltic a port which should
be the mart of the North, and a town which should be the capital
of his empire, because the port of Archangel, ice-bound for nine
months in the year, and the access to which necessitated a long and
dangerous circuit, did not seem to him convenient. Already he was
seeking a passage to China through the seas of the north-east, and the
manufactures of Paris and of Pekin were to enrich his new town.
A road of 754 versts, made across marshes which had to be first filled,
led from Moscow to his new town. Most of his projects were carried
out by his own hand, and two Empresses who succeeded him successively
carried out his policy whenever practicable, and only abandoned the
impossible.
He made tours throughout his empire whenever he was not engaged in
active warfare. But he travelled as lawgiver and natural philosopher.
He carefully investigated natural conditions everywhere, and tried
to correct and to perfect. He himself plumbed rivers and seas, had
locks made, visited the timber-yards, examined mines, assayed metals,
planned accurate maps, and worked at them with his own hand.
He built, in a desolate district, the imperial town of Petersburg,
which, at the present day, contains 60,000 houses, and where there has
arisen in our day a brilliant Court, and where the greatest luxury is
to be had. He built the port of Cronstadt on the Neva, Sainte-Croix on
the frontiers of Persia, and forts in the Ukraine and in Siberia, docks
at Archangel, Petersburg, Astrakan, and at Azov; besides arsenals and
hospitals. His own residences he built small and in bad style, but his
public buildings were magnificent and imposing. The sciences, which in
other parts have been the slow product of centuries, were, by his care,
introduced into his empire in full perfection. He made an academy,
modelled on the famous institutions of Paris and London; at great
expense men like Delisle, Bilfinger, Hermann, Bernoulli, were summoned
to Petersburg. This academy is still in existence, and is now training
Russian scholars.
He compelled the younger members of the nobility to travel to gain
culture, and to return to Russia polished by foreign good breeding.
I have met young Russians who were quite men of the world, and
well-informed to boot.
It is shocking to realize that this reformer lacked the cardinal virtue
of humanity. With so many virtues he was yet brutal in his pleasures,
savage in his manner, and barbarous in seeking revenge. He civilized
his people, but remained savage himself. He carried out his sentences
with his own hands, and at a debauch at table he displayed his skill
in cutting off heads. There are in Africa kings who shed the blood
of their subjects with their own hands, but these monarchs pass for
barbarians. The death of one of his sons, who ought to have been
punished or disinherited, would make his memory odious, if the good he
did his subjects did not almost atone for his cruelty to his own family.
Such a man was Peter the Czar, and his great plans were only sketched
in outline when he united with the kings of Poland and Denmark against
a child whom they all despised.
The founder of Russia resolved to be a conqueror; he believed the task
an easy one, and felt that a war so well launched would help him in all
his projects. The art of war was a new art in which his people needed
lessons.
Besides, he wanted a port on the east side of the Baltic for the
execution of his great plans. He needed Ingria, which lies to the
north-east of Livonia. The Swedes possessed it, and it must be seized
from them. His ancestors, again, had had rights over Ingria, Estonia,
and Livonia; it seemed the right time to revive these claims, which not
only dated from a hundred years back, but had also been annulled by
treaties. He therefore concluded a treaty with the King of Poland to
take from Sweden the districts which lie between the Gulf of Finland,
the Baltic, Poland and Russia.
BOOK II
BOOK II
Sudden and extraordinary transformation in the character of Charles
XII--At the age of eighteen he carries on war with Denmark, Poland
and Russia--He concludes the war with Denmark in six weeks--Beats
an army of 80,000 Russians with 8,000 Swedes, and proceeds to
Poland--Description of Poland and its Government--Charles wins
several victories, and conquers Poland, where he makes preparations
to nominate a king.
THUS three powerful kings were threatening the throne of the boy-king,
Charles XII. Rumours of these preparations dismayed the people, and
alarmed the King’s Council. The great generals were dead; everything
was to be feared under a young king who had so far made a bad
impression on people. He was hardly ever present at the Council without
crossing his legs on the table; he seemed too absent-minded and callous
to take part in any business.
The dangerous position of affairs was deliberated by the Council in his
presence, and, as some Councillors were proposing to divert the storm
by means of negotiation, Charles suddenly rose from his seat with the
determined air of a man of resolution who has decided on a course of
action. “Gentlemen,” he said, “I have resolved never to engage in an
unjust war, but, on the other hand, never to conclude a just war but
by the ruin of my foes. I have made up my mind. I intend to attack
the first who declares war against me, and when I have conquered him
I hope to strike terror into the rest.” This speech amazed the old
Councillors; they exchanged glances without venturing a reply, and
finally, astonished at this revelation of their king’s courage, and
ashamed to show less courage than he, they received his orders for the
war cordially.
They were still more surprised when they observed that he suddenly
renounced all the most innocent, youthful pleasures. From the moment
that he began to prepare for war he entered on a new mode of life, from
which he never afterwards departed in one particular. With Alexander
and Cæsar as his ideals, he set himself the task of imitating those
conquerors in everything but their vices.
He renounced all magnificence, pastimes and recreations, and reduced
his menu to the utmost frugality. He had affected display in dress, but
in future wore the uniform of a common soldier. There had been a rumour
that he had entertained a passion for a lady of the Court. But whether
this was true or not, it is certain that he abstained from the society
of women for ever after, not only to avoid coming too much under their
influence, but that he might prove to his soldiers his determination to
live under the severest discipline; possibly, too, he wished to pose as
the only Prince who had conquered so difficult a temptation. He also
resolved to abstain from wine for the rest of his life. Some people say
that he made this resolve in order to curb nature in every particular,
and to add a new virtue to his heroism; but the majority say that he
took this means of punishing himself for an excess which he had once
committed, leading to an insult offered to a lady at table in the
presence of his mother. If that was so, his self-condemnation and the
life-long deprivation which he imposed on himself are none the less to
be admired.
He began operations by a promise of relief to his brother-in-law,
the Duke of Holstein. Eight thousand men were immediately sent to
Pomerania, a province bordering on Holstein, to protect the Duke
against the attacks of the Danes. The Duke certainly needed them; his
dominions were already ravaged, his castle at Gottorp taken and the
town of Tonning closely besieged, the King of Denmark being there
in person, to enjoy a conquest of which he felt certain. This spark
enflamed the empire. On one side the Saxon troops of the King of Poland
and those of Brandenburg, Volfenbuttel and Hesse-Cassel marched to join
the Danes. On the other the King of Sweden’s 8,000 men, the troops of
Hanover and Zell, and three Dutch regiments came to the help of the
Duke.
While the little country of Holstein was thus made the theatre of war
two squadrons, one from England and the other from Holland, appeared in
the Baltic.
These two States were guarantors of the treaty of Altena, which the
Danes had broken, and they were all the more eager to relieve the
oppressed Duke, as it was to the interest of their trade to prevent
the growth of the power of the King of Denmark. For they knew that the
Danes, when they once had control of the Sound, would lay heavy dues on
the trading nations, as soon as they were strong enough to do so.
The English and the Dutch had, for this reason, kept, as far as
possible, the balance of power equal between the princes of the North;
they joined the King of Sweden, who seemed on the point of being
overwhelmed by many enemies acting in concert, and helped him for the
same reason that the others attacked him, viz. because they thought him
incapable of self-defence.
He was bear-hunting when he got news of the invasion of Livonia by the
Saxons. He was conducting the hunt in a way as dangerous as novel; the
only arms used were forked cudgels, behind a net stretched between
trees; a bear of enormous size rushed straight at the King, who, after
a long struggle, brought it to the ground, with the help of his net and
cudgel.
He started for his first campaign on the 8th of May, new style, in the
year 1700. He left Stockholm never to return.
An immense crowd of people went with him as far as Carlscroon,
praying for him and weeping and praising him. Before he left Stockholm
he established a Council of Defence, composed of Senators. This
commission was to have charge of all that concerned the fleet, the
troops and fortifications. The Senate was to provisionally regulate
all other internal affairs. Having thus arranged all securely within
his dominions he concentrated entirely on the war. His fleet consisted
of forty-three vessels, that in which he embarked, called the King
Charles, was the largest they had ever seen, and carried 120 guns;
Count Piper, his Prime Minister, and General Renschild embarked with
him. He joined the squadron of the allies; the Danish fleet refused an
engagement, and gave the united fleets the opportunity of coming so
near Copenhagen that they could throw some bombs into the town.
There is no doubt that it was the King himself who then proposed to
General Renschild that they should disembark and besiege Copenhagen
by land while it was invested by sea. Renschild was astonished at a
proposal which displayed in a young and inexperienced Prince as much
skill as courage. Soon all was ready for the disembarkment; orders were
given for the embarkation of 3,000 men who were stationed on the coast
of Sweden, and who were added to the men they had on board. The King
left his large ship and embarked on a lighter frigate; then they sent
300 grenadiers in small vessels along the coast. Among these vessels
were small, flat-bottomed boats, which carried the fagots, _chevaux
de frise_ and the weapons of the pioneers.
Five hundred picked men followed in other shallops. Then came the
King’s men-of-war with two English and two Dutch frigates, whose
cannon were to cover the landing of the troops. Copenhagen, the
capital of Denmark, is situated in the island of Zeeland, in the midst
of a beautiful plain, which has the Sound on the north-west and the
Baltic on the east, where the King of Sweden then had his position.
At the unexpected movement of the vessels which threatened invasion,
the inhabitants, dismayed by the inactivity of their own fleet and
by the motion of the Swedish ships, looked round in terror to see
on what point the storm would burst. Charles’s fleet stopped before
Humblebek, seven miles from Copenhagen. The Danes immediately drew
up their cavalry on this spot. The infantry were placed behind deep
entrenchments, and all the artillery forthcoming was directed against
the Swedes.
The King then left his frigate to embark on the first boat at the
head of his guards. The ambassador of France was constantly at his
elbow. “Sir,” said the King to him in Latin, for he never would speak
French, “you have no quarrel with the Danes, and must now oblige me
by retiring.” “Sir,” answered the Count de Guiscard, in French, “the
King my master has commanded me to attend your Majesty; and I flatter
myself that you will not banish me from your Court, which has never
been so brilliant as to-day.” With these words he gave his hand to
the King, who leapt into the boat, followed by Count Piper and the
ambassador.
They advanced supported by the broadsides of the vessels which were
covering the descent. The small boats were within a hundred yards
of the shore when Charles, impatient of the delay in landing, threw
himself from the boat into the sea, sword in hand, and with the water
up to his waist, and in spite of a shower of musket-shot, discharged by
the Danes, his ministers, the ambassador of France, and officers and
soldiers followed his example. The King, who had never before heard a
discharge of loaded muskets, asked Major Stuart, who stood next to him,
what that whistling was in his ears. “It is the sound of the muskets
they are firing at you,” said the Major. “Ah!” remarked the King, “that
shall henceforth be my band.” At that very moment the Major, who had
explained the noise to him, was shot in the shoulder, and a lieutenant
fell dead at the other side of the King.
Troops attacked in entrenchments are generally beaten, because the
attacking party has an impetus which defenders cannot have; besides,
waiting for the enemy in one’s lines is often a confession of
inferiority.
After a faint resistance the Danish horse and foot fled. As soon as
the King had seized their entrenchments he fell on his knees to thank
God for the first success of his arms. He immediately had redoubts
formed in the direction of the town, and himself marked out the line of
the encampment. At the same time he sent his fleet back to Scania, a
part of Sweden not far from Copenhagen, to get reinforcements of 9,000
men. Everything conspired to second Charles’s energetic efforts; the
9,000 men were on the shore ready to embark, and the very next day a
favourable wind brought them to him.
All this happened within sight of the Danish fleet, which had not dared
to advance. Copenhagen, in consternation, sent deputies to the King to
ask him not to bombard the town. He received them on horseback at the
head of his regiment of guards, and the deputies fell on their knees
before him. He demanded of the town four hundred thousand dollars,
with all sorts of provisions for the camp, for which he gave his word
of honour to pay. They brought him the provisions, because they dare
not refuse, but did not expect that the conquerors would condescend
to pay for them; and those who brought them were astonished to find
that they were paid generously by the humblest soldier in the army.
The Swedish troops had long been accustomed to the strict discipline
which contributed not a little to their victories, but the young
King increased its severity. A soldier would not have dared to refuse
payment for what he bought, much less maraud, or even go out of the
camp. He even easily brought his troops to keep his rule that the dead
should not be stripped after a victory without his permission. Prayers
were said in camp twice a day, at seven in the morning and five in the
afternoon, and he never failed to be present at them himself and to
give his soldiers an example of piety as well as of valour.
His camp, which was far better governed than Copenhagen, had everything
in abundance; and the country folk preferred to sell their goods to
their enemies the Swedes than to their own countrymen, who did not pay
so good a price for them. So it happened that the townsmen were often
obliged to fetch goods, which were unobtainable in their own markets,
from the King of Sweden’s camp.
The King of Denmark was then in Holstein, whither he seems to have
marched only to raise the siege of Tonning. He saw the Baltic covered
with his enemies’ ships, and a young conqueror already master of
Zeeland and ready to take possession of the capital. He published a
declaration that whoever took up arms against the Swedes should gain
their liberty. This declaration had great influence in a country which
had once enjoyed freedom, but where all the peasants and many even of
the townsmen were then serfs. Charles sent word to the King of Denmark
that he must make up his mind either to do justice to the Duke of
Holstein, or have his kingdom laid waste with fire and sword.
The Danes were, indeed, fortunate in dealing with a conqueror who
prided himself on his justice. A congress was summoned to meet in
the town of Tevendal on the frontiers of Holstein. The Swedish King
would not allow diplomacy on the part of the ministers to lengthen the
proceedings; he wanted the treaty settled with the same rapidity with
which he had invaded Zeeland. As a matter of fact it was concluded on
the 5th of August to the advantage of the Duke of Holstein, who was
indemnified for all the expenses of the war and freed from oppression.
The King of Sweden would make no claims on his own behalf, being
satisfied with having helped his ally and humbled his enemy. Thus
Charles XII, at eighteen years old, began and ended this war in less
than six weeks.
Just at the same time the King of Poland laid siege in person to the
town of Riga, the capital of Livonia, and the Czar was marching from
the East at the head of 100,000 men. Riga was defended by the old
Count D’Alberg, a Swedish general who, at the age of eighty, combined
the enthusiasm of youth with the experience of sixty campaigns. Count
Fleming, afterwards minister for Poland, a man great both in the field
and at the council board, together with M. Patkul, carried on the
siege under the directions of the King; in spite of several advantages
gained by the besiegers the experience of the old Count D’Alberg
counteracted all their efforts, and the King of Poland despaired of
gaining the town. At last he got an honourable pretext for raising
the siege; Riga was full of merchandise belonging to the Dutch; the
States-General ordered their ambassador at the Court of Augustus to
make representations to him on the subject. The King of Poland did
not require much pressing, but consented to raise the siege rather
than occasion the least inconvenience to his allies, who were not much
surprised at his ready compliance, as they knew the cause of it.
The only thing left to Charles to complete his first campaign was to
march against his rival for glory, Peter Alexiowitz. He was the more
angry with him because there were at Stockholm three ambassadors who
had just sworn to an inviolable peace: he who prided himself on his
probity could not understand how a legislator like the Czar could make
light of what should be held sacred. The young and honourable Prince
never dreamed that there might be one code of morality for princes
and another for private individuals. The Russian Emperor published a
manifesto which he had much better have suppressed: he gave as reason
for war that he had not been sufficiently honoured when he passed
incognito to Riga, and also that provisions were sold too dear to his
ambassadors. These were the grievances for which he ravaged Ingria with
80,000 men.
It was on the 1st of October, a month in which the weather is more
severe in that climate than is January in Paris, that he appeared
before Narva. The Czar, who in such weather would often ride 400
leagues to see a mine or a canal, spared his men no more than himself.
Besides, he knew that the Swedes, ever since the time of Gustavus
Adolphus, fought in the depth of winter as well as in summer, and he
wanted to accustom his Russians not to care about the seasons, so that
some day they might at least equal the Swedes. So at a time when frost
and snow force nations in temperate climates to suspend hostilities
Peter was besieging Narva, thirty degrees from the Pole, and Charles
was advancing to its relief. The Czar had no sooner arrived before the
place than he hastened to put into practice all that he had lately
learned on his travels: he drew out his camp, fortified it on all
sides, built walls at intervals, and opened the trench with his own
hands. He had given the command of the army to the Duke of Croy, a
German, and a clever general, who got little support from the Russian
officers.
The Czar himself had only the ordinary rank of lieutenant in his own
army. He thought it necessary to give an example of military obedience
to his nobility, who up till then had been undisciplined and accustomed
to lead bands of ill-armed slaves without experience or order. There
is nothing surprising in the fact that he who at Amsterdam turned
carpenter to procure fleets for himself should at Narva turn lieutenant
in order to teach his people the art of war.
The Russians are strong and indefatigable, and perhaps as brave as the
Swedes, but it requires time to make veterans, and discipline to make
them invincible. The only fairly reliable regiments were commanded by
German officers, but there were very few of them; the rest were savages
torn from their forests, clothed in the skins of wild beasts, some
armed with arrows and others with clubs. Few had muskets, none had seen
a regular siege, there was not one good gunner in the whole army.
A hundred and fifty cannon, which ought to have reduced the little
town of Narva to ashes, hardly made a breach, while every moment the
artillery of the town were destroying whole lines at work in the
trenches. Narva was practically unfortified, and Count Horn, who was in
command, had not a thousand regular troops, and yet this immense army
was not able to reduce it in ten weeks.
On the 15th of November the Czar heard that the King of Sweden had
crossed the sea with 200 transports and was on his way to the relief
of Narva. There were not more than 20,000 Swedes, but superiority of
numbers was the Czar’s only advantage. He was far, therefore, from
despising his enemy, and used all his skill to crush him; and not
content with 100,000 men he levied another army to oppose him and
harass him in his advance. He had already sent for 30,000 men who were
advancing from Plescow by forced marches. He then took a step which
would render him contemptible if so great a legislator could be so. He
left his camp, where his presence was necessary, to go to meet these
reinforcements, which could quite well reach the camp without his
aid; this step made it appear that he was afraid of fighting, in an
entrenched camp, a young and inexperienced prince, who might attack him.
However that may be, his plan was to hem in the King between two
armies. Nor was this all: a detachment of 30,000 men from the camp
before Narva was posted at a league’s distance from the town, on the
King of Sweden’s route, 20,000 Strelitz were further off on the same
route, and 5,000 others formed an advanced guard. Charles would have to
force his way through all these troops before he could reach the camp,
which was fortified by a rampart and a double ditch. The King of Sweden
had landed at Pernaw, on the Gulf of Riga, with about 15,000 foot and
more than 4,000 horse. From Pernaw he made a forced march to Revel,
followed by all his horse and only 4,000 of his foot. He continually
advanced without waiting for the rest of his troops.
Soon he found himself, with only 8,000 men, in presence of the enemy’s
outposts. He did not hesitate to attack them one after the other,
without giving them time to find out with how small a number they had
to contend. The Russians, when they saw the Swedes advancing against
them, took it for granted that they had a whole army to encounter, and
the advanced guard of 5,000 men, who were holding a pass between the
hills where 100 men of courage might have barred the passage of a whole
army, fled at the first approach of the Swedes. The 20,000 men behind
them, terrified at the flight of their countrymen, were overcome by
fear and caused panic in the camp to which they fled. All the posts
were carried in three days and a half, and what would have been on
other occasions reckoned three distinct victories did not delay the
King an hour. At last he appeared with his 8,000 men, wearied with
the fatigues of so long a march, before a camp of 80,000 Russians,
protected by 150 cannon. He hardly allowed them time for rest before he
gave orders for an instant attack.
The signal was two musket-shots, and the word in German, “With God’s
help.” A general officer pointed out to him the greatness of the
danger. “Surely you have no doubt,” he replied, “but that I with my
8,000 brave Swedes shall trample down 80,000 Russians!” Then a moment
after, fearing that his speech was boastful, he ran after the officer.
“Do you not agree with me,” he said, “that I have a double advantage
over the enemy? First because their horse will be useless to them, and
secondly because, as the position is cramped, their numbers will only
incommode them, so that I shall really possess the advantage.” The
officer thought it best not to differ from him, and so they attacked
the Russians about noon, on the 30th November.
As soon as the cannon of the Swedes had made a breach in the
entrenchments they advanced with fixed bayonets, having the snow,
which drove full in the face of the enemy, behind them. The Russians
stood the fire for half-an-hour without quitting their posts. The King
attacked the Czar’s quarters, on the other side of the camp, and hoped
to meet him in person, for he was ignorant of the fact that he had gone
to meet his 40,000 reinforcements who were expected shortly. At the
first discharge the King received a ball in the shoulder; but it was a
spent ball which rested in the folds of his black cravat and did him no
harm.
His horse was killed under him, and it is said that the King leapt
nimbly on another, exclaiming, “These fellows make me take exercise.”
Then he continued to advance and give orders with the same presence
of mind as before. Within three hours the entrenchments were carried
on all sides: the King chased the enemy’s right as far as the river
Narva with his left, if one may speak of “chasing” when 4,000 men
are in pursuit of nearly 50,000. The bridge broke under them as they
fled; in a moment the river was full of dead bodies; the rest in
despair returned to their camp without knowing the direction in which
they were going. They found some huts behind which they stationed
themselves; there they defended themselves for a time because they had
no mean of escape; but finally their generals, Dolgorouky, Gollofkin
and Federowitz surrendered to the King and laid down their arms at
his feet. Just then the Duke of Croy arrived to surrender with thirty
officers.
Charles received all these prisoners with as charming and engaging a
manner as if he were feting them in his own Court. He only put the
general officers under a guard; all the under officers and soldiers
were disarmed and taken to the river Narva, where they were provided
with boats to convey them to their own country. In the meantime night
came on, and the right wing of the Russian force was still fighting.
The Swedes had not lost 1,500 men; 18,000 Russians had been killed in
their entrenchments, many had been drowned, many had crossed the river;
but still there remained enough to entirely exterminate the Swedes.
But it is not the number lost, but the panic of survivors which spells
defeat in war. The King made haste to seize the enemy’s artillery
before nightfall. He took up an advantageous position between their
camp and the town, and there got some hours’ sleep on the ground,
wrapped in his cloak, waiting till at daybreak he could fall on the
enemy’s left wing, which was not yet completely routed.
At two o’clock in the morning General Wade, who was in command of
that wing, having heard of the King’s gracious reception of the other
generals and his sending home of the subalterns and soldiers, asked
the same favour of him. The conqueror sent him word that he need
only approach at the head of his troops and surrender his arms and
standards. Soon the general appeared with his Russians, to the number
of about 30,000. Soldiers and officers marched bare-headed in front of
less than 7,000 Swedes. As the soldiers passed before him they threw
down their muskets and swords; the officers surrendered their ensigns
and colours.
He let the whole band cross the river without keeping one single
prisoner. Had he put them under guard the number of prisoners would
have been at least five times that of the conquerors.
He then victoriously entered Narva, attended by the Duke of Croy and
the other Russian officers; he ordered their swords to be restored to
them, and when he heard that they wanted money, because the tradesmen
of Narva refused to trust them, he sent the Duke of Croy 1,000 ducats,
and 500 to every Russian officer, who were full of admiration for this
treatment, which they had never conceived possible. An account of the
victory was at once drawn up to send to Stockholm, and to the allies,
but the King erased with his own hands whatever redounded too much to
his own credit or to the discredit of the Czar. His modesty could not
hinder them from striking several medals to commemorate the event at
Stockholm. One of these represented him, on one face, standing on a
pedestal, to which a Russian, Dane and Pole were chained; and on the
reverse a Hercules, armed with a club, trampling a Cerberus, and the
inscription, “Tres uno contudit ictu.”
Among the prisoners made on the day of the battle of Narva was one who
was typical of the revolutions of fortune. He was the eldest son and
heir of the King of Georgia. He was called the “Czarafis,” a name which
means son of the Czar among all the Tartars as well as in Russia; for
the word Czar meant King among the ancient Scythians, from whom all
these peoples are descended, and is not derived from the name of the
Cæsars, so long unknown to these barbarians. His father, Mitelleski,
who was master of the most beautiful part of the country between the
mountains of Ararat and the eastern extremity of the Black Sea, had
been driven from his kingdom by his own subjects in 1688, and preferred
throwing himself on the mercy of the Emperor of Russia, to applying to
the Turks. This king’s son, at the age of nineteen, helped Peter the
Great in his expedition against the Swedes, and was taken in battle
by some Finnish soldiers, who had already stripped him, and were on
the point of killing him, when Count Renschild rescued him from their
hands, supplied him with clothes, and presented him to his master.
Charles sent him to Stockholm, where the wretched prince died shortly
after. When he took leave, the King made aloud a natural reflection on
the strangeness of the fate of an Asiatic prince, born at the foot of
the Caucasus, and going to live a prisoner among the snows of Sweden:
“It is just,” he said, “as if I were to be one day prisoner among the
Tartars of the Crimea.” At that time these words made no impression,
but afterwards, when the prediction had been justified in the event,
there was but too much reason to remember them.
The Czar was advancing by long marches with a force of 40,000 Russians,
expecting to surround his enemy on all sides. When he had got half-way
he heard of the battle of Narva, and the dispersal of his whole camp.
He thought it best not to attack a victor who had shortly before
destroyed 100,000 entrenched troops, with a force of 40,000 raw
and undisciplined men. He retraced his steps, hoping to discipline
his troops at the same time as civilize his subjects. “I know,” he
remarked, “that the Swedes will long beat us, but in time they will
teach us to beat them.” Moscow, his capital, was terror-stricken to
hear of this defeat. So great was the pride and ignorance of the people
that they were convinced they had been conquered by superhuman agency,
and that the Swedes had secured their victory by magic. This opinion
was so widespread that a public prayer to Saint Nicholas, patron saint
of Russia, was ordered. This prayer is too singular to be omitted. It
runs thus--
“O thou, our perpetual consolation in all our adversities, great
Saint Nicholas, of infinite power, how have we offended thee in our
sacrifices, our genuflections, our bowings, our thanksgivings, that
thou hast thus forsaken us? We have implored thine assistance against
these terrible, insolent, savage, dreadful, invincible destroyers,
when, like lions and bears who have lost their young, they have
fallen upon us, terrified us, wounded us, slain us by thousands, who
are thy people. As it is impossible that this should have happened
without sorcery and witchcraft, we beseech thee, O great Nicholas,
to be our champion and standard-bearer, to deliver us from this band
of sorcerers, and to drive them from our coasts with the reward they
deserve.”
While the Russians were thus complaining of their defeat to St.
Nicholas, Charles XII returned thanks to God, and prepared himself for
fresh victories.
The King of Poland fully expected that his enemy, who had conquered
the Danes and Russians, would next turn his arms against him. He
made a firmer alliance with the Czar, and the two princes arranged
an interview at which they could agree on some policy. They met at
Brizen, a small town in Lithuania, without any of the formalities which
only delay business, and for which they were in no humour under the
circumstances. The princes of the North met with a familiarity which is
not yet the fashion in the south of Europe. Peter and Augustus passed
fifteen days together in pleasures which passed all bounds; for the
Czar, who had set himself to reform his kingdom, could not restrain his
own dangerous inclination to riotous living.
The King of Poland promised to furnish the Czar with 50,000 German
troops, which were to be hired from several princes, and which the
Czar was to pay. He, on the other hand, was to send 50,000 Russians to
Poland to be trained in the art of war, and was also to pay the King
of Poland 3,000,000 rixdollars within two years. Had this treaty been
carried out it might have been fatal to the King of Sweden. It was a
ready and sure way of making good soldiers of the Russians, and might
perhaps have forged irons for half Europe.
Charles XII set himself to prevent the King of Poland from getting the
benefit of this treaty. After passing the winter in Narva, he marched
into Livonia, to the very town of Riga which King Augustus had failed
to take. The Saxon troops were posted along the river Dwina, which is
very broad at this spot, and their task was to dispute the passage with
Charles, who lay on the other bank. The Saxons were not then commanded
by their Prince, who was at that time ill; but their leader was Marshal
Stenau, who was general; under him commanded Prince Ferdinand, Duke of
Courland, and the same Patkul, who, after having maintained his rights
on paper, defended his country against Charles sword in hand at the
peril of his life.
The King of Sweden had great boats made, after a new model, so that the
sides were far higher than ordinary, and could be let down and drawn up
like a drawbridge. When raised they protected the troops they carried,
and when let down they formed a bridge to land by.
He also employed another artifice. Having noticed that the wind blew
straight from the north, where his troops lay, to the south, where his
enemies were encamped, he fired a large heap of wet straw, which spread
a thick smoke over the river and prevented the Saxons from seeing his
troops, or guessing at his actions. Under cover of this cloud he sent
out boats filled with smoking straw, so that the cloud increased, and
being right in the enemy’s face, prevented them from knowing whether
the King had started on the passage or not. Meanwhile, he himself led
the execution of his scheme; and when he was in the middle of the
river, “Well,” he said, “the Dwina is going to be as kind to us as the
sea of Copenhagen; take my word for it, General, we shall beat them.”
He got to the other side in a quarter of an hour, and was vexed to see
three people leap to shore before him. He had his cannon landed at
once, and drew up his line without any opposition from the enemy, who
were blinded by the smoke. When the wind dispersed the smoke the Saxons
saw the King of Sweden already on his march against them. Marshal
Stenau lost not a moment, but at the first appearance of the Swedes
fell furiously upon them with the best part of his horse. The violent
shock coming upon the Swedes just as they were forming, threw them into
disorder. They gave way, were broken, and pursued up to the river. The
King of Sweden rallied them instantly in the midst of the stream, with
as much ease as if he were holding a review. Then his troops, marching
in closer formation than before, beat back Marshal Stenau, and advanced
into the plain. Stenau felt that his men were beginning to waver, and,
like a skilful commander, drew them off into a dry place flanked by
a marsh, and a wood where his artillery were posted. The advantage
of their position, and the time they had to recover their spirits,
restored the Swedes’ courage. Charles attacked at once with 15,000
men, while the Duke had about 12,000. The battle was hard fought
and bloody; the Duke had two horses killed under him; he three times
penetrated into the centre of the King’s guards, but at last, having
been unhorsed by a musket blow, his army fell into confusion, and he
disputed the field no longer. His cuirassiers carried him off from the
thick of the battle with difficulty, all bruised, and half dead, from
the horses’ feet, as they were trampling him.
After the victory the King of Sweden hastened to Mittau, the capital
of Courland, and took it. All the towns of the Duchy surrendered at
discretion; it was rather a triumphal passage than a conquest. He
passed rapidly on to Lithuania, and conquered wherever he passed. And
he acknowledged that it was a great satisfaction to him to enter in
triumph the town of Birzen, where the King of Poland and the Czar had
plotted his ruin. It was here that he planned to dethrone the King of
Poland by the agency of the Poles themselves. When one day he was at
table, quite absorbed in the thought of his enterprise, and observing
his usual rule of abstinence in the midst of a profound silence,
appearing engrossed in his great plans, a German colonel, who was
present, said loud enough for the King to hear, that the meals which
the Czar and the King of Poland had made in the same place were very
different from these.
“Yes,” said the King, rising, “and I shall the more easily disturb
their digestions.” In fact, using a little diplomacy to assist his
arms, he did not delay to prepare for the event about which he had been
busy thinking.
The Government of Poland is an almost exact image of the old Celtic and
Gothic Government, which has been altered almost everywhere else. It is
the only state which has retained the name “republic,” with the royal
dignity.
Every nobleman has the right to vote at the election of the king, and
to stand for election himself. These fine privileges have corresponding
abuses; the throne is almost always put up for sale, and as a Pole
is seldom rich enough to buy it, it is often sold to foreigners. The
nobility defend their liberty against the king, and tyrannize over the
rest of the nation. The body of the people are slaves; such is the fate
of mankind, that the great majority are, in some way or another, kept
under by the minority. There the peasant does not sow his crops for
himself but for his lord, to whom he and his land and his very work
belong, and who can sell him, or cut his throat as if he were a beast
of the field. A lord is answerable to none but himself. Judgment can
only be given against him for a criminal action by an assembly of the
whole nation.
Nor can he be arrested until after his condemnation, so that he is
hardly ever punished. Many among them are poor, in which case they let
themselves out to the richer, and do the basest duties for a salary.
They would rather serve their equals than engage in trade, and while
taking care of their masters’ horses they call themselves electors of
kings and destroyers of tyrants.
Whoever saw a King of Poland in the pomp of his majesty, would think
him the most absolute prince in Europe; yet he is certainly the least
so. The Poles really make with him the same contract which is supposed
to exist between a sovereign and his subjects. The King of Poland at
the moment of his consecration, and when he swears to keep the “pacta
conventa,” releases his subjects from their oath of allegiance if he
should break the laws of the republic. He nominates to all public
offices, and confers all honours. Nothing is hereditary in Poland,
except estates and noble rank. The sons of a count or of a king have
no claim to the dignities of their father. But there is this great
difference between the king and a republic, that he cannot deprive of
any office after having conferred it, and that the republic may depose
him if he breaks the constitution.
The nobility, jealous of their liberty, often sell their votes and
seldom their affections. They have scarcely elected a king before they
fear his ambition and make plots against him. The great men whose
fortunes he has made, and whom he cannot degrade, often become his
enemies instead of remaining his favourites; and those who are attached
to the Court, become objects of hatred to the rest of the nobility.
This makes the existence of two parties the rule among them; a
condition which is inevitable, and even a necessity, in countries where
they will have kings and at the same time preserve their liberty. What
concerns the nation is regulated by the States-General, which they call
Diets. These Diets are by the law of the kingdom to be held alternately
in Poland and Lithuania. The deputies do business there with sword in
hand, like the old Sarmatæ, from whom they are descended; and sometimes
too in a state of intoxication, a vice to which the Sarmatæ were
strangers. Every nobleman deputed to these States-General has the right
the Roman tribunes had of vetoing the laws of the Senate. One nobleman,
by saying “I protest,” can put a stop to the unanimous resolutions of
all the rest; and if he leaves the place where the Diet is held they
are obliged to separate.
To the disorders arising from this law they apply a remedy still more
dangerous. There are almost always two factions in Poland; as unanimity
in the Diet is almost impossible, each party forms confederacies, in
which decisions are made by the majority’s votes, without regard to the
minority.
These assemblies, which are unconstitutional but authorized by
precedent, are held in the king’s name, though often without his
consent and against his interests, much in the same way as the League
in France made use of Henry III’s name to undermine his power, or as
the Parliament in England, which executed Charles I, began by putting
the King’s name at the head of all the Acts they passed to destroy him.
When the troubles are ended, then it is the function of the General
Diets to annul the acts of these cabals; any Diet can also repeal the
acts of its predecessors, because one king can abolish the laws of his
predecessors, or his own laws.
The nobility which makes the laws for the State is also its defence.
They muster on horseback on great occasions, and can make a corps of
more than 100,000 men. This great body, called “Pospolite,” moves
with difficulty, and is ill-governed. Difficulties of provisions and
forage make it impossible for them to keep together long; they lack
discipline, experience and obedience, but their strong love of liberty
makes them always formidable. They may be conquered, dispersed, or
even kept for a time in bonds, but they soon shake off the yoke; they
compare themselves to reeds, which a storm will bend to the ground, and
which will rise when the wind drops. It is for this reason that they
have no fortified towns--they themselves are to be the only bulwarks of
the State; they never let their king build fortresses, lest he should
use them rather for their oppression than for their defence; their
country is quite open, except for two or three frontier towns, and
if in any of their wars, civil or foreign, they resolve to sustain a
siege, they are obliged to hastily raise earth fortifications, repair
old half-ruined walls, and enlarge the half-choked ditches; then the
town is taken before the entrenchments are finished.
The Pospolite is not always on horses to guard the country; they only
form by order of the Diet, or, in times of great danger, by that of the
king.
The ordinary protection of Poland is in the hands of a force which the
State is obliged to support. It is composed of two bodies independent
of each other under two different generals. The two generals are
independent of each other, and though they are nominated by the king,
are responsible to the State alone and have supreme authority over
their troops. The colonels are absolute masters of their regiments,
and it is their affair to get them what sustenance they can, and to
pay them; but as they are seldom paid themselves, they ravage the
country, and ruin the farmers to satisfy their own rapacity, and that
of their soldiers. The Polish lords appear in these armies with more
magnificence than in civil life, and their tents are finer than their
houses. The cavalry, which makes up two-thirds of the army, is almost
entirely composed of noblemen, and is remarkable for the gracefulness
of the horses and the richness of the accoutrements.
Their men-at-arms especially, who are called either hussars or
pancernes, are always attended by several valets, who lead their
horses, which have ornamented bridles with plates of silver and silver
nails, embroidered saddles, saddle-bows and gilt stirrups, sometimes
made of massive silver, with saddle-cloth trailing in the fashion of
the Turks, whose magnificence the Poles imitate as nearly as possible.
But though the cavalry is so gorgeous the foot are wretched, ill-clad,
ill-armed, without uniform clothes or anything regular; at least
that is how they were up to 1710. These foot-soldiers, who are like
wandering Tartars, bear hunger, cold, fatigue, and all the hardship
of war with incredible endurance. The characteristics of the ancient
Sarmatæ, their ancestors, can still be seen in the Poles; the same lack
of discipline, the same fury in assault, the same readiness to run away
and to return to the field, the same mad fury of slaughter when they
are victorious.
The King of Poland at first consoled himself with the idea that these
two armies would fight for him, that the Polish Pospolite would arm at
his orders, and that all these forces, united with his Saxon subjects
and his Russian allies, would make up a multitude before whom the small
Swedish force would not dare to appear. But he saw himself suddenly
deprived of this means of succour through the very pains which he had
taken to have them all at once.
Accustomed in his hereditary dominions to absolute power, he was
perhaps too confident that he could govern Poland like Saxony.
The beginning of his reign raised malcontents, his very first acts
irritated the party which was opposed to his election, and alienated
almost all the rest. The Poles resented the fact that their towns
were filled with Saxon garrisons and their frontiers with troops. The
nation, far more anxious to maintain their own liberties than to attack
their neighbours, did not consider the king’s attack on Sweden and
his invasion of Livonia as advantageous to the State. It is difficult
to deceive a free nation concerning its interests. The Poles saw that
if this war, undertaken against their wishes, was unsuccessful, their
country, unprotected on every side, would fall a prey to the King of
Sweden, and that if it succeeded they would be subdued by their own
king, who as soon as he was master of Livonia as well as Saxony would
be able to hem in Poland between these two countries.
In the face of this alternative, of either being enslaved by the king
whom they had elected, or of having their land ravaged by Charles who
was justly enraged, they raised a great outcry against a war which
they believed was rather declared against themselves than against
Sweden. They regarded the Saxons and the Russians as the instruments
of their bondage. And when the King of Sweden had overcome all that
opposed him, and was advancing with a victorious army into the heart of
Lithuania, they opposed the King violently, and with the more freedom
because they were in misery.
Lithuania was then divided into two parties, that of the Princess
Sapieha, and that of Oginski. These two factions had begun by private
quarrels, and degenerated into civil war.
The King of Sweden was on the side of the Princess Sapieha; and
Oginski, ill supported by the Saxons, found his party almost destroyed.
The Lithuanian army, which these troubles and lack of money was
reducing to a small number, was partly dispersed by the conqueror. The
few who sided with the King of Poland were small bodies of wandering
troops, who lived by spoil. So that Augustus found nothing in Lithuania
but the weakness of his own party, the hate of his subjects, and a
foreign army led by an offended, victorious and implacable king.
There was certainly an army in Poland, but instead of 38,000 men, the
number prescribed by law, there were not 18,000. Then it was not only
ill-armed and ill-paid, but the generals were undecided on any course
of action. The King’s best course was to command the nobility to follow
him; but he dare not run the risk of a refusal, which would increase
his weakness by disclosing it.
In this state of trouble and uncertainty, all the counts and dukes
demanded a Parliament of the King, just as in England, in times of
crisis, the different bodies of the State present addresses to the King
beseeching him to call a Parliament. Augustus was more in need of an
army than of a Parliament where the actions of kings are criticized.
But he was forced to call one, that he might not provoke the nation
irretrievably. A Diet was therefore summoned to meet at Warsaw, on
the 2nd of December, 1701. He soon saw that Charles XII had as much
influence in the Assembly as he had himself. The party of the Sapieha,
the Lubomirski, and their friends, Count Leczinski, treasurer of
the crown, who owed his fortune to King Augustus, and above all the
partisans of the Sobieski, were all secretly for the King of Sweden.
The most influential of them, and the most dangerous enemy that the
King of Poland had, was Cardinal Radjouski, archbishop of Gnesna,
primate of the kingdom and president of the Diet; his conduct was
full of duplicity and artifice, and he was entirely dominated by an
ambitious woman whom the Swedes called Madame la Cardinale, and who
never ceased to urge him to intrigue and faction. King John Sobieski,
Augustus’s predecessor, had first made him archbishop of Varmia and
vice-chancellor of the kingdom. By favour of the same Prince, the
Bishop got a Cardinal’s hat; this dignity soon opened his way to the
primacy, and thus uniting in his person all that impresses people, he
was able to undertake great enterprises with impunity.
On the death of John he exerted his interest to place Jacques Sobieski
on the throne; but the great hate they bore the father, great as he
was, led to the rejection of the son. Then the Cardinal-Primate united
with the Abbé Polignac, ambassador from France, to give the crown to
the Prince of Conti, who actually was elected.
But the money and the troops of the Saxons got the better of him.
At last he allowed himself to be drawn into the party which crowned
the Elector of Saxony, and waited impatiently for a chance of sowing
dissension between the nation and the new king.
The victories of Charles XII, protector of Prince James Sobiesky, the
civil war in Lithuania, the general dissatisfaction of all his people
with King Augustus, made the Cardinal-Primate hope that the time had
come when he might send Augustus back into Saxony, and open the way
to the throne for Prince John. This Prince, who had formerly been the
innocent object of the Poles’ hatred, was beginning to be their idol,
in proportion as King Augustus lost their favour; but he dare not even
conceive such a revolution, of which the Cardinal had insensibly laid
the foundations.
At first he seemed to wish to reconcile the King with the republic. He
sent circular letters apparently dictated by the spirit of concord and
charity, a common and well-known snare, but one by which men are always
caught; he wrote a touching letter to the King of Sweden, imploring
him, in the name of Him whom all Christians adore, to give peace to
Poland and her King. Charles XII answered the Cardinal’s intentions
rather than his words, for he remained with his victorious army in the
Grand Duchy of Lithuania, declaring that he had no desire to disturb
the Diet, that he was making war on Augustus and the Saxons, and not on
Poland, and that far from attacking the State he had come to save it
from oppression. These letters and answers were for public perusal. The
springs which made the Diet act were the emissaries, who continually
came and went between the Cardinal and Count Piper, and the private
meetings held at this prelate’s house. They proposed to send an embassy
to Charles XII, and were unanimous in their demands that their King
should not call in the aid of any more Russians, and that he should
send his Saxon troops away.
Augustus’s bad luck had already brought about what the Diet asked him.
The treaty made secretly with the Russians at Birzen had turned out to
be as useless as it had seemed formidable. He was far from being able
to send the Czar the 15,000 men he had promised to raise in the Empire.
The Czar himself, a dangerous enemy of Poland, was not at all anxious
at that time to help a divided kingdom, hoping to have some share
in the spoils. He contented himself with sending 20,000 Russians
into Lithuania, and they did more mischief than the Swedes, fleeing
continually before the conqueror, and ravaging Polish territory, till
at last, being chased by the Swedish generals and finding nothing else
to ravage, they returned in bands to their own country. As to the
scattered remains of the Saxon army which had been beaten at Riga, King
Augustus sent them to winter and recruit in Saxony, that this sacrifice
might regain him the affections of the Polish nation in his present
difficult position.
Then the war was abandoned for a series of intrigues, and the Diet
divided into almost as many factions as there were dukedoms. One day
the interests of King Augustus were paramount, the next they were
rejected. Everybody clamoured for liberty and justice, yet they had no
conception of either; the time was spent in secret cabals and public
debate. The Diet knew nothing about what they might or should do; great
assemblies seldom agree on good measures in time of civil uproar,
because bold men in such assemblies are generally factious, while more
reliable men are usually timid.
The Diet broke up in disorder on the 17th of February, 1702, after
three months’ plotting and irresolution. The senators, that is, the
dukes and the bishops, remained at Warsaw. The Polish Senate has the
right of making laws provisionally, which the Diets seldom disannul;
this body, much less cumbrous and more used to business, was far less
disturbed, and quickly came to a resolution.
They agreed to send the embassy proposed in the Diet to the King of
Sweden, and also that the Pospolite should mount and hold themselves
ready for any emergency. They also made several regulations to appease
the troubles in Lithuania, and still more to diminish the King’s
authority, though it was less to be feared than Charles’s.
Augustus preferred to receive hard conditions from his conqueror than
from his subjects; he therefore determined to sue for peace with the
King of Sweden, and was on the point of negotiating with him. He was
obliged to keep this step secret from the Senate, whom he regarded as a
still more implacable foe. As the affair was difficult he intrusted it
to the Countess of Königsmarck, a Swedish lady of high rank to whom he
was then attached. This lady, who was celebrated throughout the world
for her wit and beauty, was more capable than any minister of bringing
a negotiation to a successful issue. Besides, as she had some property
in Charles’s dominions, and had been long a member of his Court, she
had a plausible reason for waiting on the Prince. She came then to the
Swedish camp in Lithuania, and first applied to Count Piper, who too
lightly promised her an audience of his master.
The Countess, among the talents which made her one of the most
delightful persons in Europe, had a gift for speaking several languages
like a native, and would sometimes amuse herself by making French
verses which might have been written at Versailles. She made some
for Charles XII. She introduced the gods of antiquity, praising his
different virtues, and ended as follows--
“Enfin chacun des Dieux discourant à sa gloire,
Le plaçait par avance au temple de mémoire:
|
Research Interests
Throughout my Ph.D., I conduct research on the
Sensing and Computing for Edge AI Systems. My research involves the following three directions:
-
Sensor-Specific Data Processing
I have been working on the data processing algorithms on a variety of sensors, including RGB-D cameras, IMUs, and mmWave radars. Applications include object detection, object tracking, activity recognition and vital sign sensing.
-
Machine Learning Algorithms for Real-World Data
Due to the imbalanced data distribution, data insufficiency and domain shift, machine learning using the real-world data is highly challenging. I have been working on corresponding solutions on federated learning, long-tailed learning, few-shot learning and domain adaptation, etc.
-
High-Performance Inference on the Edge
The deployment of the deep learning models on edge devices is the last mile of building an AIoT application. My studies aim to accelerate the on-device inference of neural networks via hardware-aware tensor program generation using both intra-operator and inter-operator optimizations.
|
# Vcypher [](https://travis-ci.com/WTroll/Vcypher)
*Simple algorithm for deterministic number generation from input.*
This algorithm can be used while learning a new language as it utilizes multiple basic concepts.
This repo contains implementation in Python, Rust, Java and Dart.
## How does vcypher work
<ol>
<li>Get binary representation of each character in input with at least 8 bits.</li>
<li>Count 0s separated by 1s and add previous count to it (ignore if first count).</li>
<li>Count all 1s per character, multiple them together, remove trailing 0s. Append it to the end.</li>
<li>Reverse every number.</li>
<li>Move last number to the start.</li>
<li>*Repeat until all numbers moved* Move first 2 then last 2.</li>
<li>Concatenate everything together.</li>
</ol>
#### Example
Input: ABC
<ol>
<li> 01000001 01000010 01000011 </li>
<li> 1 5 1 4 2 4 -> 1 6 7 11 13 17 </li>
<li> 2 2 3 -> 12 </li>
<li> 1 6 7 11 13 17 12 -> 1 6 7 11 31 71 21 </li>
<li> 21 1 6 71 31 7 11 -><PHONE_NUMBER>1 </li>
</ol>
## Getting started
* Python
> *Python 3.8 or higher is required*
> ```sh
> python3 main.py <your input> (--base64)
> ```
* Java
> *Java 11 or higher is required*\
>
> Building:
> ```sh
> ./gradlew build
> ```
> Running:
> ```sh
> java -jar /path/to/jar/Vcypher-<$version>.jar <your input>
> ```
* Rust
> *Rust 1.47.0 has been tested but other versions might work*
> Building:
> ```sh
> cargo build (--release)
> ```
> Running:
> ```sh
> ./path/to/bin/vcypher(.exe) <your input> (--base64)
> ```
## Problems
Collisions are common.
## Contribution
Any contributions are welcome.
|
import { PRNG } from './index'
test('0 <= PRNG.prototype.unit() < 1', () => {
const prng = new PRNG('test')
for (let i = 0; i < 100; i++) {
expect(prng.unit()).toBeGreaterThanOrEqual(0)
expect(prng.unit()).toBeLessThan(1)
}
})
|
import {Component, Input, EventEmitter, Output, OnChanges, OnInit, SimpleChange, ViewChild} from '@angular/core';
import {IONIC_DIRECTIVES, ModalController, Nav} from 'ionic-angular';
import {TaskDetailsDomainComponent} from '../task-details/task-details';
import {DomainService} from '../../../../pages/products/domain/domain.service';
import {WidgetsService} from '../../widgets.service';
import {WidgetHeaderComponent} from '../../../widget-header/widget-header';
import {categoryEnum} from '../../../../config/constants';
import 'rxjs/add/operator/toPromise';
@Component({
selector: 'domain-widget-content',
templateUrl: 'build/components/widgets/domain-widget/content/domain-widget-content.html',
directives: [IONIC_DIRECTIVES, TaskDetailsDomainComponent, WidgetHeaderComponent],
providers: [DomainService, WidgetsService]
})
export class DomainWidgetContentComponent implements OnChanges, OnInit {
@Input() serviceName: string;
@Input() collapsed: boolean;
@Input() reload: boolean;
@Input() showWorks: boolean = false;
@Output() collapsedChange: EventEmitter<any> = new EventEmitter();
@ViewChild(Nav) nav: Nav;
viewMode: string = 'general';
loading: boolean;
tasksLoaded: boolean = false;
emptyTasks: boolean = true;
domain: any = {};
error: any;
tasks: Array<any> = [];
constants = categoryEnum.DOMAIN;
constructor(private domainService: DomainService, private widgetsService: WidgetsService, private modalCtrl: ModalController) {
}
ngOnInit(): void {
this.getInfos();
}
getInfos(): void {
this.loading = true;
Promise.all([this.domainService.getInfos(this.serviceName).toPromise(),
this.domainService.getServiceInfos(this.serviceName)])
.then(resp => {
this.domain = Object.assign({}, resp[0], resp[1]);
this.loading = false;
})
.catch(err => {
this.error = err;
this.loading = false;
});
}
getTasks(): void {
if (!this.tasksLoaded) {
this.loading = true;
this.domainService.getTasks(this.serviceName).toPromise()
.then(tasks => {
this.emptyTasks = !tasks.length;
this.tasks = tasks;
this.loading = false;
this.tasksLoaded = true;
}, err => {
this.error = err;
this.loading = false;
});
}
}
ngOnChanges(changes: { [propName: string]: SimpleChange }): void {
if (changes['reload'] && changes['reload'].currentValue !== changes['reload'].previousValue) {
this.getInfos();
this.tasksLoaded = false;
if (this.viewMode === 'tasks') {
this.getTasks();
}
}
}
updateCollapse(): void {
this.collapsed = !this.collapsed;
this.collapsedChange.emit(this.collapsed);
}
changeTransferLockStatus(): void {
this.domain.transferLockStatus = this.domain.transferLockStatus === 'locked' ? 'unlocked' : 'locked';
this.domainService.putInfos(this.serviceName, { transferLockStatus: this.domain.transferLockStatus })
.subscribe(null, () => {
this.domain.transferLockStatus = this.domain.transferLockStatus === 'locked' ? 'unlocked' : 'locked';
});
}
}
|
# Copyright (c) 2018 The Regents of the University of Michigan
# and the University of Pennsylvania
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""
Utility functions for replication of Mi and Yeung (2015).
"""
import pandas as pd
import os
def aggregate_session_input_data(file_type, course, input_dir = "/input"):
"""
Aggregate all csv data files matching pattern within input_dir (recursive file search), and write to a single file in input_dir.
:param type: {"labels" or "features"}.
:param dest_dir:
:return:
"""
valid_types = ("features", "labels")
course_dir = os.path.join(input_dir, course)
if file_type not in valid_types:
print("[ERROR] specify either features or labels as type.")
return None
else:
df_out = pd.DataFrame()
for root, dirs, files in os.walk(course_dir, topdown=False):
for session in dirs:
session_csv = "{}_{}_{}.csv".format(course, session, file_type)
session_feats = os.path.join(root, session, session_csv)
print(session_feats)
session_df = pd.read_csv(session_feats)
df_out = pd.concat([df_out, session_df])
# write single csv file
outfile = "{}_{}.csv".format(course, file_type)
outpath = os.path.join(input_dir, outfile)
df_out.to_csv(outpath, index = False)
return outpath
def fetch_test_features_path(dir = "/input"):
"""
Fetch path to features csv.
:param dir: dir to search.
:return: path to features csv (string).
"""
feature_file = None
for root, dirs, files in os.walk(dir):
for file in files:
p = os.path.join(root, file)
if p.endswith("features.csv"):
feature_file = p
return feature_file
def fetch_trained_model_path(input_dir = "/input"):
# find files inside dir ending with "_model"
for root, dirs, files in os.walk(input_dir):
for file in files:
p = os.path.join(root, file)
print(p)
if p.endswith("_model") and not p.startswith("."):
model_file = p
print("[INFO] loading model file: {}".format(model_file))
return model_file
|
Sketching Outfits of all kinds. Tube Colorgy, Water Colors, Crayons, Drawing Paper, Canvas, Brushes, Oily and Mediums. Mathematical Instfuments.
number. Address:
Pror. JOHN M. COULTER, Crawfordsville, Ind. Pror. CHARLES R. BARNES, Madison, Wis. Pror. J. C. ARTHUR, LaFayette, Ind. ESTABLISHED 1860.
SOLE AGENT FOR
JOSEPH ZENTMAYER’S MICROSCOPES, ETC. We also carry a stock of Photographic Goods. Lenses of all makers. Send four cent stamp for our large illustrated catalogue of cameras and supplies. | 53 Nassau Street, New York.
|
Yichang Yangtze River Highway Bridge
The Yichang Yangtze River Highway Bridge is a suspension bridge that crosses the Yangtze River some 20 km downstream from the center city of Yichang, China. It is located within the prefecture-level city of Yichang, and carries the G50 Shanghai–Chongqing Expressway.
The construction of the bridge started on 19 February 1998., and it was open for traffic on 19 September 2001.
It has a main span of 960 m., it is among the 30 longest suspension bridges, based on the length of the main span.
The cost of building the bridge was reported as 895 million yuan.
|
Find Fish API
The perfect API should include:
Name
Photo
Max weight
Ideal water temp
Habitat location
Water parameters
Level of difficulty of owning
Type of fish
Level of aggression
May look into web scraping this site, and creating my own api
|
Thread:<IP_ADDRESS>/@comment-1698069-20130521082623
Hi, welcome to ! Thanks for your edit to the Rarity page.
Please leave me a message if I can help with anything!
|
Split NeoVim window above others
Let's say I've split the screen into 3 vertical windows using :vs twice.
Now, to open a terminal, I use :sp to split horizontally, but it only splits in the window it's currently in.
I'd like to however split it so that it stretches from left to right. The behavior is similar to VSCode, where the console pops up from the bottom.
Is this possible without going for :sp at the beginning?
How about :bo 20sp (change 20 with how many number of lines you want)
|
How to use stings as ticks on plots?
If both the x and y axis are numbers, I can display text on the plot by using the functions num2str, cellstr, and strtrim. These functions format the coordinate values into a cell array of strings, which can then be displayed with the function text:
strValues = strtrim(cellstr(num2str(
[X(:) Y(:)],
'(%d,%d)'
)));
text(
X,
Y,
strValues,
'VerticalAlignment',
'bottom'
);
But what if the x axis contains strings instead of numbers?
X=['john' 'jack' 'mary'.....]
Y=[0 1 2 3]
How do I then show the y values on all of the data plots?
You can create the plot with categoricals...
X = categorical( {'john','jack','mary','jack'} );
Y = [1 2 3 3];
figure;
plot( X, Y, '.', 'markersize', 20 );
You can then place text the same as with numeric data
text( categorical({'jack'}), 2, 'test' )
To add the value as a label to all the points, you can use X directly:
text( X, Y + 0.2, cellstr( num2str( Y(:) ) ) )
1st way:
Juse normal plotting (you may need to enumerate your categories first though) and than set the ticks of your axis. This allows maximum flexiblity at the cost of a potential mix-up
set(gca, 'xTick',1:length(X), 'xTickLabel',X)
The first ensures that all ticks are plottet while the second name-value-pair renames those ticks. When it comes to names or longer strings, you may also want to rotate the ticks labels with 'xtickangle'.
The MathWorks uses this workaround even in its examples:
x = linspace(-10,10,200);
y = cos(x);
plot(x,y)
xticks([-3*pi -2*pi -pi 0 pi 2*pi 3*pi])
xticklabels({'-3\pi','-2\pi','-\pi','0','\pi','2\pi','3\pi'})
2nd way: If you have categorial data, you can plot it right away. Have a look at the doc here.
The question is slightly ambiguous, but I believe it is about adding text to a plot with non-numeric X data, rather than just being able to plot non-numeric X labels. The actual "I can do this" example by the OP is talking about using text. This is why I rejected your question edit, as it frames the question to more closely reflect your answer, which isn't necessarily the original intent
@Wolfie no problem; that is what I commented in the edit summary. I just wasn't sure what exactly the question is so my edit had to be biased
|
# -*- coding: utf-8 -*-
"""
FHWwallDesignSCR
This script finds the value of the force required to mantain stability of a
slope (Preqd), maximizing the failure surface's angle (alpha) and the d/H
relation (xi). Additionally, calculates the safety factor of the sliding
wedge that was found by the FHWA's simplified method.
Created on Mon Sep 21 09:05:48 2020
Copyright (R) 2020 E. Jaramillo-Rincon & Universidad Nacional de Colombia.
License BSD-2
"""
## Force Preqd
# Los parámetros que utiliza la función son:
# gm = Peso unitario del suelo [kN/m3]
# H = Altura, con respecto a la superficie del terreno de confinamiento
# pasivo, de la pared de retención [m]
# d = Distancia debajo de la superficie del terreno por donde pasa la
# superficie de falla [m]
# xi = Relación d/H [ad]
# beta = Ángulo en radianes de la superficie del terreno detrás de la
# estructura de retención
# kp = Coeficiente de presión pasiva [ad]
# delta = Ángulo de fricción en la interface [rad]
# phi = Ángulo de fricción interna del suelo [rad]
import numpy as np
import scipy.optimize as opt
import sympy as sym
import shapely.geometry as shp
import matplotlib.pyplot as plt
# Constant parameters:
# gm = Unit weight of soil [kN/m3]
gm = 22;
print("-The unit weight of soil (\u03B3) is %.6s [kN/m^3]" % (gm))
# H = Height of the retaining wall [m]
H = 2;
print("-The height of the retaining wall (H) is %.6s [m]" % (H))
# beta = Angle respect of the horizontal of the land's surface behind the
# retaining wall [rad]
beta = np.deg2rad(22);
print("-The angle of the land's surface behind the wall (\u03B2) is %.6s [rad]" % (beta))
# kp = Passive earth pression coefficient [ad] took from Kerisel y ABSI's values
kp = 7;
print("-The passive earth pression coefficient (Kp) is %.6s" % (kp) )
# delta = Friction angle at the soil-wall interface {rad}
delta = np.deg2rad(23);
print("-The soil-wall interface friction angle (\u03B4) is %.6s [rad]" % (delta))
# phi = Internal friction angle of the soil [rad]
phi = np.deg2rad(23);
print("-The internal friction angle of the soil (\u03C6) is %.6s [rad]" % (phi))
# Cohesion of the soil [kPa]
c = 5
print("-The cohesion of the soil (c) is %.6s [kPa]" % (c))
def preqd(x):
# The fuction preqd return the value of the force required [kN/m]
# for the retaining wall's equilibrium.
# Entry is a 2x1 vector containing the value of xi (x[0]) and alpha (x[1])
fn = 0.5 * gm * (H**2) * \
((((1 + x[0])**2) / (np.tan(x[1]) - np.tan(beta))) - kp * \
(x[0]**2) * (np.sin(delta) + (np.cos(delta) / (np.tan((x[1]) - phi))))) *\
np.tan(x[1] - phi);
return fn
def objective(x):
# This function defines the function "predq" as the objective fuction
# The return is negative so that it can be a maximization problem
return -preqd(x)
# Bounds for xi
supBoundxi = np.inf
infBoundxi = 0
# Bounds for alpha
supBoundalpha = np.deg2rad(90)
infBoundalpha = phi
# Error function
erf = 0.01
# Define the inferior and superior bound of the variables xi and alpha
varbounds = opt.Bounds([infBoundxi + erf, infBoundalpha + erf],\
[supBoundxi, supBoundalpha])
# Initial assumptions
x0xi = 0.01
x0alpha = 0.2
x0 = np.array([x0xi, x0alpha])
# Solve the optimization problem
res = opt.minimize(objective, x0, bounds=varbounds)
xi = res.x[0]
alpha = res.x[1]
PreqdMax = preqd(res.x)
print("-The values of xi=%.6s and alpha=%.6s [rad] maximize the value of the force\
required to stabilize the wall, Preqd = %.6s [kN/m]" % (xi, alpha,PreqdMax))
## Safety factor
# Wedge's dimensions
# Total Height with embedment [m]
Ht = H * (1 + xi)
dEmp = H * xi
print("-The total height with the embedment (d) is %.6s [m]" % (Ht))
# Intersection between failure surface and land's surface
xeq=sym.Symbol('xeq')
# Land's surface line
yterreno = np.tan(beta) * xeq + Ht;
# Failure surface line
yfalla = np.tan(alpha) * xeq;
# Find the abscissa of the intersection point
xint = sym.solve(np.tan(beta) * xeq + Ht - (np.tan(alpha) * xeq), xeq)
# The ordinate of the intersection point [m]
yint = yterreno.evalf( subs={xeq:xint[0]})
# Lenght of land's surface [m]
lterreno = xint/np.cos(beta)
# Lenght of failure surface [m]
lfalla = xint/np.cos(alpha)
# Height of the triangle defined by the wedge [m]
hcuna = Ht * np.sin((np.pi/2) - alpha)
# Area of the sliding wedge [m^{2}]
AreaCuna = hcuna * lfalla/2
# Angle between Preqd and the perpendicular line to the failure surface
thetat = (np.pi/2) - alpha;
# Weight of the sliding wedge [kN/m]
W = AreaCuna*gm
# Safety factor
FS = (c * lfalla + np.tan(phi) * (W * np.cos(alpha) + PreqdMax * np.cos(thetat)))/\
(W * np.sin(alpha) - PreqdMax * np.sin(thetat))
print("-The factor of safety is %.6s" % (FS[0]))
# Drawing with Shapely
Wedge = shp.Polygon([(0,0), (0,round(Ht,2)), (round(xint[0],2),round(yint,2)), (0,0)])
GroundSurface = shp.LineString([(-10 , dEmp) , (0 , dEmp)])
# Separate de values of wedge's abscissas and ordinates
x,y = Wedge.exterior.xy
x1,y1 = GroundSurface.coords.xy
plt.fill(x,y,'lightgray')
# Plot the values of wedge's abscissas and ordinates
plt.plot(x,y, "gray", x1, y1, 'gray')
# Labelling the graphic
labels = Wedge.exterior.coords
for label, x, y in zip(labels, x, y):
plt.annotate(
label,
xy=(x, y), xytext=(0, 0),
textcoords='offset pixels', ha='right', va='center')
# Define the limits of the plotting space
plt.xlim([-5,15])
plt.ylim([-1,7])
ax = plt.gca() #you first need to get the axis handle
ax.set_aspect('equal')
textGamma = r'$\gamma = %.2s$' % (gm)
textPhi = r'$\varphi = %.2s$°' % (np.rad2deg(phi))
textDelta = r'$\delta = %.2s°$' % (np.rad2deg(delta))
textAlpha = r'$\alpha = %.2s°$' % (np.rad2deg(alpha))
plt.text(10, 5, textGamma, fontsize=12)
plt.text(10,4, textPhi, fontsize=12)
plt.text(10,3, textDelta, fontsize=12)
plt.text(10,2, textAlpha, fontsize=12)
plt.show()
|
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
#
# 1.4.Finding_the_Largest_or_Smallest_N_Items.py
# ch01
#
# 🎂"Here's to the crazy ones. The misfits. The rebels.
# The troublemakers. The round pegs in the square holes.
# The ones who see things differently. They're not found
# of rules. And they have no respect for the status quo.
# You can quote them, disagree with them, glority or vilify
# them. About the only thing you can't do is ignore them.
# Because they change things. They push the human race forward.
# And while some may see them as the creazy ones, we see genius.
# Because the poeple who are crazy enough to think thay can change
# the world, are the ones who do."
#
# Created by Chyi Yaqing on 01/25/19 10:47.
# Copyright © 2019. Chyi Yaqing.
# All rights reserved.
#
# Distributed under terms of the
# MIT
# heapq -- Heap queue algorithm
import heapq
nums = [1, 8, 2, 23, 7, -4, 18, 23, 42, 37, 2]
print("{} the Largest is {}".format(nums, heapq.nlargest(3, nums)))
print("{} the Smallest is {}".format(nums, heapq.nsmallest(3, nums)))
# nlargest, nsmallest accept a key parameter
portfolio = [
{'name': 'IBM', 'shares': 100, 'price': 91.1},
{'name': 'AAPL', 'shares': 50, 'price': 543.22},
{'name': 'FB', 'shares': 200, 'price': 21.09},
{'name': 'HPQ', 'shares': 35, 'price': 31.75},
{'name': 'YHOO', 'shares': 45, 'price': 16.35},
{'name': 'ACME', 'shares':75, 'price': 115.65}
]
cheap = heapq.nsmallest(3, portfolio, key=lambda s: s['price'])
print("{} price cheap smallest : {}".format(portfolio, cheap))
expensive = heapq.nlargest(3, portfolio, key=lambda s: s['price'])
print("{} price cheap largest : {}".format(portfolio, expensive))
|
Lu Huinan
Lu Huinan (412 – 24 February 466 ), formally Empress Dowager Zhao (昭太后, literally "accomplished empress dowager"), semi-formally Empress Dowager Chongxian (崇憲太后), was an empress dowager of the Chinese Liu Song dynasty. She had been a concubine of Emperor Wen, and she became empress dowager because her son Liu Jun later became emperor (as Emperor Xiaowu).
As imperial consort
Lu Huinan came from a humble background, and her father appeared to have been a servant to the powerful Wang clan (descendants of the Jin prime minister Wang Dao). Her brother Lu Daoqing (路道庆) definitely was a Wang clan servant. She grew up in the Jin and Liu Song capital Jiankang, and she was selected as an imperial consort for Emperor Wen, for her beauty. She had one son, Liu Jun the Prince of Wuling, but was not otherwise favored by Emperor Wen, and as Liu Jun grew and became rotated as a provincial governor throughout his father's reign, Consort Lu often accompanied Liu Jun to the provinces rather than stay in the palace. She also raised another son of Emperor Wen, Liu Yu the Prince of Xiangdong, whose mother Shen Rongji (沈容姬) had died early. After she had given birth to Liu Jun, she carried the rank of Shuyuan (淑媛), the fifth rank for imperial consorts.
As empress dowager
In 453, after Emperor Wen's oldest son Liu Shao, the Crown Prince had assassinated Emperor Wen and taken the throne himself, Liu Jun rose against his brother from his defense post at Jiang Province (江州, modern Jiangxi and Fujian) and headed east to attack the capital Jiankang. Consort Lu remained at the capital of Jiang Province, Xunyang (尋陽, in modern Jiujiang, Jiangxi) and did not accompany her son on his campaign. Later in the year, after he had defeated and killed Liu Shao and taken the throne himself as Emperor Xiaowu, he had his brother Liu Hong (劉宏) the Prince of Jianping escort both her and his wife Princess Wang Xianyuan to Jiankang. Emperor Xiaowu honored his mother as empress dowager. Because Emperor Xiaowu often stayed in his mother's bedchambers, rumors grew that he was having an incestuous affair with his mother, but there was no conclusive evidence of such an affair.
Empress Dowager Lu occasionally involved herself in her son's administration, and her nephews Lu Qiongzhi (路瓊之), Lu Xiuzhi (路休之), and Lu Maozhi (路茂之) became honored, although not particularly powerful, officials. On one occasion in 458, Lu Qiongzhi visited the noble Wang Sengda (王僧達), a descendant of Wang Dao, and he sat on Wang's bench—which Wang then ordered thrown out, because he felt dishonored that Lu Qiongzhi, a son of one of the Wangs' servants, would sit on his bench. Lu Qiongzhi informed Empress Dowager Lu of this and, angry that her family was being disrespected, she told her son to punish Wang. At this time, there was a rebellion led by Gao Du (高闍), and Emperor Xiaowu therefore falsely accused Wang of being Gao's supporter, and had him arrested and forced to commit suicide.
There were only two additional historical references to Empress Dowager Lu during her son's reign. In 460, when her daughter-in-law Empress Wang presided over a ceremony where Empress Wang personally fed mulberry leaves to silkworms to show the imperial household's attention to farming, Empress Dowager Lu was present. In 461, when Emperor Xiaowu toured South Yu Province (南豫州), she accompanied him.
As grand empress dowager and Empress Dowager Chongxian
In July 464, Emperor Xiaowu died and was succeeded by his son Liu Ziye, who took the throne as Emperor Qianfei. He honored his grandmother as grand empress dowager, and made her niece Lady Lu empress on 16 December 465. She did not appear to have much influence over her impulsive and cruel grandson, who was assassinated in a coup d'etat in January 466. The mutineers supported Emperor Xiaowu's younger brother Liu Yu, whom Empress Dowager Lu had raised, as Emperor Ming.
Initially, the imperial officials, who apparently viewed Empress Dowager Lu in low esteem, wanted to have her empress dowager title stripped, and for her to be moved out of the palace. Because Liu Yu was raised by her, however, he instead had her be given the title Empress Dowager Chongxian (because she lived at Chongxian Palace) and continued to have her treated as empress dowager. She died in February 466.
However, how Empress Dowager Lu died is a matter of controversy. Historical accounts indicate that there was a rumor, allegedly from reliable sources but not conclusive, that after her grandson Liu Zixun, the Prince of Jin'an had been declared emperor in early 466 at his defense post at Jiang Province in competition with Emperor Ming, Empress Dowager Lu was secretly pleased. On a feast she hosted for Emperor Ming, she spiked the wine with poison and intended to kill Emperor Ming. However, Emperor Ming's attendants realized this and warned him, and he instead offered the wine back to her. She could not refuse it, so she drank the wine and died.
Empress Dowager Lu was buried with honors due an empress dowager. However, after her burial, her body was disinterred as a magical means of cursing her grandson Liu Zixun. It was only in 468, long after Liu Zixun had been defeated, that she was reburied.
|
Facebook Connect - displaying profile pictures the best way
I have a site set up with Facebook connect. I also have profile pages, which show users Facebook profile pictures. If users are not connected via Facebook they still have the option to use a profile picture by entering the url of it.
The Facebook images are using the type=large so they are the true Facebook size (I think). Now the problem I have is, what if someone uses such a large image? And it ruins the UI of the page? I cannot set the size of the image (via HTML) as it will not look right for the Facebook profile images.
What's the best way of going about this? By the way I'm using php.
Thanks
If you have a fixed width/height for your image holder, you can set ONLY the width or height of the image via HTML in your <img> (preserves aspect ratio), then set overflow:hidden on it to preserve your UI. Depending on the design of your page you might also want to add a background color or image to it.
|
/**
* A player of the Spin-the-Wheel Coin Matching Game.
*<br><br>
* Strategy for a 4 coin, 2 reveal game: <br>
* The player will first request that two adjacent coins are revealed,
* which will be "??--". If these two coins are the same, getNewCoinStates
* will flip both of them. Since the game cannot begin with a winning
* spin, this gives us an immediate 1/3 chance of victory if the two
* hidden coins are the same. If they are not the same, it ensures that
* at least 3 of the coins now match.<br>
* If the coins are not the same, getNewCoinStates will flip one so that
* the pattern is "HH". This ensures that at least 2 coins match in the
* worst case scenario, and has a 1/4 chance of victory.<br>
* For the second move, the player will request that two opposite coins
* are revealed in the pattern "?-?-". This ensures, in the worst case
* scenario, that three coins match, and has a 1/2 chance of victory.
* For all subsequent moves, the same "?-?-" pattern will be requested,
* which gives each of these moves a 1/2 chance of victory. <br>
* This strategy does not guarantee a victory, but does ensure a
* geometric probability of victory, which is fairly reliable. <br>
* The probability for success for this strategy in the event that the
* first two coins match is: P=1/3 for the first move, and P=1-(1/2)^n,
* where n equals the number of moves after the first one, for all
* subsequent moves.<br>
* The probability for success for this strategy when the first two
* coins do not match is: P=1/4 for the first move, and P=1-(1/2)^n,
* where n equals the number of moves after the first one, for all
* subsequent moves.<br>
*
* @author CS4250 Fall 2018
* @version 1.2.2 (20181004)
*/
public class Player implements StrategicPlayer {
private int coinsPerWheel;
private int revealsPerSpin;
private int maxNumSpins;
private boolean newGameGetSlotsToReveal = false;
private boolean newGameGetNewCoinStates = false;
private char winSide='R';
/**
* Establishes that the player is beginning a new game.
* @param coinsPerWheel the number of coins in the wheel
* @param revealsPerSpin the number of coins revealed per turn/spin
* @param maxNumSpins the maximum number of spin allowed for the game
*/
public void beginGame(int coinsPerWheel, int revealsPerSpin, int maxNumSpins){
this.coinsPerWheel = coinsPerWheel;
this.revealsPerSpin = revealsPerSpin;
this.maxNumSpins = maxNumSpins;
newGameGetSlotsToReveal = true;
newGameGetNewCoinStates = true;
}
/**
* Provides the request pattern for the current turn.
* The returned pattern is of proper length, contains only
* '?' and '-', and has exactly the number of '?'
* as the permitted reveals per spin.
* @return a proper reveal-pattern consisting of '-' and '?' with
* exactly the number of '?' as permitted by reveals-per-spin
*/
public CharSequence getSlotsToReveal(){
int count = revealsPerSpin;
StringBuilder stringBuilder = new StringBuilder();
// 4 coins 2 reveals strategy
if (coinsPerWheel == 4 && revealsPerSpin == 2) {
if (newGameGetSlotsToReveal) {
stringBuilder.append("??--");
newGameGetSlotsToReveal = false;
}
else
stringBuilder.append("?-?-");
}
// any other game strategy
else {
for (int i = 0; i < coinsPerWheel; i++) {
if (count > 0) {
stringBuilder.append('?');
count--;
} else
stringBuilder.append('-');
}
}
return stringBuilder.toString();
}
/**
* Provides the coin-state set pattern for the current turn.
* The returned pattern is a copy of the parameter
* in which all '-' are preserved and each location of
* 'H' and 'T' may be replaced by either 'H' or 'T'.
* @param revealedPattern a proper-length pattern
* consisting of '-', 'H', and 'T'
* @return a proper set-pattern consisting of '-', 'H', and 'T'
*/
public CharSequence getNewCoinStates(CharSequence revealedPattern){
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(revealedPattern);
// 4 coins 2 reveals strategy
if (coinsPerWheel == 4 && revealsPerSpin == 2) {
if (newGameGetNewCoinStates && revealedPattern == "HH--") {
for (int i = 0; i < coinsPerWheel; i++) {
if (stringBuilder.charAt(i) == 'H')
stringBuilder.replace(i, (i + 1), "T");
}
newGameGetNewCoinStates = false;
winSide = 'T';
}
else if (newGameGetNewCoinStates && revealedPattern == "TT--") {
for (int i = 0; i < coinsPerWheel; i++) {
if (stringBuilder.charAt(i) == 'T')
stringBuilder.replace(i, (i + 1), "H");
}
newGameGetNewCoinStates = false;
winSide = 'H';
} else {
if (winSide == 'T'){
for (int i = 0; i < coinsPerWheel; i++) {
if (stringBuilder.charAt(i) == 'H')
stringBuilder.replace(i, (i + 1), "T");
}
}else{
for (int i = 0; i < coinsPerWheel; i++) {
if (stringBuilder.charAt(i) == 'T')
stringBuilder.replace(i, (i + 1), "H");
}
}
}
}
// any other game strategy
else {
for (int i = 0; i < revealedPattern.length(); i++) {
if (stringBuilder.charAt(i) == 'T')
stringBuilder.replace(i, (i + 1), "H");
}
}
return stringBuilder.toString();
}
}
|
import { ScrollToService } from '../../utils/scrollTo/scrollTo.service';
export interface IModalWizardPageState {
done: boolean;
blocked: boolean;
rendered: boolean;
current: boolean;
dirty: boolean;
markCleanOnView: boolean;
markCompleteOnView: boolean;
required: boolean;
}
export interface IModalWizardPage {
state: IModalWizardPageState;
key: string;
label: string;
}
export class ModalWizard {
public static renderedPages: IModalWizardPage[] = [];
public static pageRegistry: IModalWizardPage[] = [];
public static currentPage: IModalWizardPage;
public static heading: string;
public static setHeading(heading: string): void {
this.heading = heading;
}
public static getPage(key: string): IModalWizardPage {
return this.pageRegistry.find((p) => p.key === key);
}
public static markDirty(key: string): void {
this.getPage(key).state.dirty = true;
}
public static markClean(key: string): void {
this.getPage(key).state.dirty = false;
}
public static markComplete(key: string): void {
this.getPage(key).state.done = true;
}
public static markIncomplete(key: string): void {
this.getPage(key).state.done = false;
}
public static setCurrentPage(page: IModalWizardPage, skipScroll?: boolean): void {
this.pageRegistry.forEach((test) => (test.state.current = test === page));
this.currentPage = page;
if (page.state.markCleanOnView) {
this.markClean(page.key);
}
if (page.state.markCompleteOnView) {
this.markComplete(page.key);
}
if (!skipScroll) {
ScrollToService.scrollTo(`[waypoint="${page.key}"]`, '[waypoint-container]', 143);
}
}
public static registerPage(key: string, label: string, state?: IModalWizardPageState): void {
state = state || {
done: false,
blocked: true,
rendered: true,
current: false,
dirty: false,
markCleanOnView: true,
markCompleteOnView: false,
required: false,
};
this.pageRegistry.push({ key, label, state });
this.renderPages();
}
public static renderPages(): void {
const renderedPages: IModalWizardPage[] = this.pageRegistry.filter((page) => page.state.rendered);
this.renderedPages = renderedPages;
if (renderedPages.length === 1) {
this.setCurrentPage(renderedPages[0]);
}
}
public static isComplete(): boolean {
return this.renderedPages
.map((p) => p.state)
.filter((s) => s.rendered && s.required)
.every((s) => s.done && !s.dirty);
}
public static allPagesVisited(): boolean {
return this.renderedPages
.map((p) => p.state)
.filter((s) => s.rendered && s.required)
.every((s) => s.done);
}
public static setRendered(key: string, rendered: boolean): void {
this.pageRegistry.filter((page) => page.key === key).forEach((page) => (page.state.rendered = rendered));
this.renderPages();
}
public static includePage(key: string): void {
this.setRendered(key, true);
}
public static excludePage(key: string): void {
this.setRendered(key, false);
}
public static resetWizard(): void {
this.renderedPages.length = 0;
this.pageRegistry.length = 0;
this.currentPage = null;
this.heading = null;
}
}
|
#!/usr/bin/env bash
if [ $# -ne "1" ]; then
echo 1>&2 "Searches log for completed funcs.
Usage: $0 logfile"
exit 127
fi
# find a file that doesn't exist, to direct the output
i=0
while [ -f done_funcs$i ]
do
i=`expr $i + 1`
done
# Search through the log (assuming all summaries are in a fixed directory..)
sed -n '
s/Summary for function: \([_a-zA-Z]*\) : \(.*\)/\1$\2$\\home\\jan\\research\\relay-race\\scc_sum/p' < $1 > done_funcs$i
echo output is in file done_funcs$i
|
Demo
I don't find demo about your bundle?
Hi @ArmandArthur, there is no demo. Why do you need a demo?
I don't understand what do your bundle.
"Symfony Bundle to create HTML tables with bootstrap-table for Doctrine Entities."
What kind of table?
|
Globally two billion individuals were infected with intestinal parasites; out of these majorities were children in resource-poor settings \[[@B1]\]. Particularly in Sub-Saharan Africa, parasitic infections are the major public health problem. Apart from causing morbidity and mortality, infections with intestinal parasites have been associated with stunting, physical weakness and low educational performance of schoolchildren \[[@B2],[@B3]\]. Furthermore, chronic intestinal parasitic infections have become the subject of speculation and investigation in relation to the spreading and severity of other infectious diseases such as HIV/AIDS and leprosy \[[@B4],[@B5]\].
Parasitic infections are governed by behavioral, biological, environmental, socioeconomic and health systems factors. Local conditions such as quality of domestic and village infrastructure; economic factors such as monthly income, employment and occupation and social factors such as education influence the risk of infection, disease transmission and associated morbidity and mortality \[[@B6],[@B7]\]. These infections are more prevalent among the poor segments of the population. They are closely associated with low household income, poor personal and environmental sanitation, and overcrowding, limited access to clean water, tropical climate and low altitude. Intestinal parasitic infections such as amoebiasis, ascariasis, hookworm infection and trichiuriasis are among the ten most common infections in the world \[[@B8]\].
Prevalence of intestinal helminths and other intestinal parasites have been studied in different areas of the tropics and subtropics \[[@B9]\]. Decades ago, a number of studies focusing on intestinal parasites were done in different community groups such as preschool children, schoolchildren, camps and refugees in Northwest Ethiopia \[[@B9]-[@B11]\]. In line with this, interventions were undertaken to minimize the burden. Although it is not regularly implemented, there is a deworming program in schools and villages in the study area. However, assessing the effects of interventions taken and trends in the prevalence of intestinal parasites among schoolchildren in Northwest Ethiopia seems sidelined. Therefore, the aim of this study was to determine the prevalence and risk factors of intestinal parasites among schoolchildren. The findings of this study might help in strengthening the information available so far and encourage policy makers to design effective strategies to combat intestinal parasitic infections in the study area.
Study area, design and period
A cross-sectional study was conducted at the University of Gondar Community School in Gondar town from April 2012 to June 2012. The town is located 730 km from Addis Ababa to the Northwest. Gondar is situated at an altitude of 2,185m above sea level. It has a total population of 138,000 and the majority of the population is Amhara by ethnicity. This community school is found 6 km from the center of Gondar town to the Southwest. The school offers education from kindergarten to high school level. There were seven hundred thirty students enrolled during the study period. These students are from families with different economic backgrounds.
Sample size and sampling technique
The sample size (n) was estimated using the single population proportion formula Z^2^ p (1-p) / d^2^. Where P = prevalence of intestinal parasites from previous study, d = margin of error and Z = standard score corresponds to 1.96. This gave a sample size of 310. The prevalence rate (p) of intestinal parasites from previous study in the area was 72% \[[@B10]\]. For the calculation, a 95% confidence interval and a 5% margin of error were used. To minimize errors arising from the likelihood of non-compliance, five percent of the sample size was added giving a final sample size of 326.
To select the children, the students were stratified according to their educational level (grade 1 to grade 8). A quota was then allocated for each grade with proportional allocation according to the number of students in each grade. Finally, the participating children were selected using systematic random sampling technique by using class rosters as a sample frame.
Data collection and laboratory processing
Based on the possible risk factors the questionnaire was developed. This questionnaire was tested for validity by interviewing ten students from Mesert Elementary School. Two senior laboratory technologists who were trained for this purpose collected the data. To ensure the reliability of the information, the children were interviewed in their mother tongue. The interview included information such as age, sex, religion, hands washing habit, ways of transportation, family monthly income and swimming habit. At the time of conversation, interviewers also inspected whether the fingernails of the students were trimmed and their feet were covered with shoes. All the questionnaires were checked for accuracy and completeness.
After proper instruction, the children were given labelled collection cups and applicator sticks. From each student, about 2g of fresh stool was collected. Each of the specimens was checked for its label, quantity and procedure of collection. A portion each of the stool samples was processed with a direct microscopic technique to detect cysts, trophozoites, eggs and larva of intestinal parasites immediately. The remaining part of the samples were preserved in 10% formalin solution and transported to the University of Gondar Research Laboratory. Stool examinations were performed using the formol-ether concentration technique \[[@B12]\]. Two trained senior medical laboratory technologists examined the samples microscopically. Both the 10× and 40× objectives were used for detection of eggs and larvae of helminth and cysts and trophozoites of protozoan parasites. Iodine solution was used to detect and identify cysts of protozoan parasites.
Data management and analysis
The data were entered and analyzed using the SPSS statistical software version 16. In all cases, *P*-values less than 0.05 were considered statistically significant. Initially the association between each exposure and the presence of infection was assessed using the Chi-squared test. Odds ratios were computed to measure the strength of association. To determine independent risk factors for infection, logistic regression analysis was employed.
This study was approved by the ethical review committee of the School of Biomedical and Laboratory Sciences, University of Gondar. Official letter was submitted to the University of Gondar community school. Informed verbal consent was obtained from parents/guardians of the students. The purpose and the importance of the study were explained and permission was obtained from the Director of the school. A medical doctor from the University of Gondar treated those schoolchildren who were positive for intestinal parasites based on the national protocol.
Socio demographic characteristics
A total of 326 students were selected for investigation. Of these 22 (6.75%) were excluded because of production of insufficient specimens. For this reason, only 304 students were ultimately included in the study. Of these, 170 (55.9%) were males and the rest 134 (44.1%) were females. The mean age of the study participants was 9.5 years (Table [1](#T1){ref-type="table"}).
::: {#T1 .table-wrap}
Socio-demographic characteristics of children at the University of Gondar Community School, Gondar town, Northwest Ethiopia, April- June 2012
**Socio-demographic characteristics** **Number of students** **Percentage**
--------------------------------------- ------------------------ ----------------
Male 170 55.9
Female 134 44.1
≤9 132 43..4
10-12 118 38.8
≥13 54 17.8
Christian 272 89.5
Muslim 32 10.5
Level of education (Grade)
1 37 12.2
2 38 12.5
3 40 13.2
4 38 12.5
5 36 11.7
6 38 12,5
7 37 12.2
8 40 13.2
Prevalence of intestinal parasites
Various types of intestinal parasites including protozoans, trematodes, cestodes and nematodes were detected. The prevalence of *Hymenolepis nana* infection was 42 (13.8%) followed by 28 (9.2%) of *Entamoeba histolytica/dispar. Hymenolepis nana*, *Entamoeba histolytica/dispar* and *Ascaris lumbricoides* were detected as single infections in 35 (11.5%), 22 (7.2%), and 12 (3.9%) individuals, respectively. For both sexes, the proportion of infections was higher for helminths compared to protozoa, i.e. about 1.64 times (Table [2](#T2){ref-type="table"} and [3](#T3){ref-type="table"}). Overall, one-third, (104 (34.2%)) of the students were infected with intestinal parasites and 88 (28.9%), 8 (2.6%) and 6 (2.0%) of the students had single, double and triple infections, respectively. *Trichuris trichiura* with *Hymenolepis nana*, *Ascaris lumbricoides* with *Hymenolepis nana*, *Ascaris lumbricoides* with *hookworm* and *Giardia intestinalis* with *Entamoeba histolytica/dispar* comprised 4 (1.3%), 3 (1.0%), 3 (1.0%) and 4 (1.3%) of the double infections, respectively. *Ascaris lumbricoides* and *Trichuris trichiura* were found with *Hymenolepis nana* and *Entamoeba histolytica/dispar* as triple infections. In all age groups, the predominant intestinal parasite detected was *Entamoeba histolytica/dispar*, followed by *Hymenolepis nana* and *Ascaris lumbricoides* (Table [2](#T2){ref-type="table"}).
::: {#T2 .table-wrap}
Distribution of intestinal parasites among schoolchildren at the Gondar University Community School, Northwest Ethiopia, April- June 2012
**Types of parasite** **Male** **(n = 170)** **Female** **(n = 134)** **Total (n = 304) N[o]{.underline}(%)**
--------------------------- ---------- --------------- ------------ --------------- -----------------------------------------
**Protozoa** **20** **11.8** **20** **14.9** **40 (13.2)**
*E. histolytica/dispar* 12 7.1 16 12.0 28 (9.2)
*G. intestinalis* 8 4.7 4 3.0 12 (3.9)
**Helminthes** **54** **31.8** **28** **20.9** **82 (26.9)**
*A.lumbricoides* 10 5.9 8 6.0 18 ( 5.9)
*T. trichiura* 6 8.6 4 3.0 10 (3.2)
*S. stercoralis* 2 1.2 0 0 2 (0.7)
*Hookworm* 4 2.4 2 1.4 6 (2)
*H. nana* 28 16.5 14 10.4 42 (13.8)
*S. mansoni* 4 2.4 0 0 4 (1.3)
**Total** **61** **35.9** **43** **32.1** **104 (34.2)**
NB: The sum of the columns is greater than the total because of the coinfection of some of the students.
::: {#T3 .table-wrap}
Distribution of intestinal parasites by age among children at the University of Gondar Community School, Gondar town, Northwest Ethiopia, April - June 2012
**Type of parasite** **Age group in years** **Total ( n = 304) N[o]{.underline}(%)**
---------------------------------- ------------------------ ------------------------------------------ --------------- ----------------
**Helminthes** **28 (21.2)** **34 (24.6)** **23 (42.6)** **82 (26.9)**
*H. nana* 18 (13.6) 16 (13.6) 8 (14.8) 42 (13.8)
*A.lumbricoides* 4 (3.0) 10 (8.5) 4 (7.4) 18 (5.9)
*S. mansoni* 0 (0) 2 (1.7) 2 (3.7) 4 (1.3)
*S. stercoralis* 0 (0) 1 (0.8) 1 (1.8) 2 (0.7)
*T. trichiura* 5 (3.8) 3 (2.5) 2 (3.7) 10 (3.3)
*Hookworm* 1 (0.8) 3 (2.5) 2 (3.7) 6 (2.0)
**Protozoans** **16 (12.1)** **17 (14.4)** **9 (16.7)** **40 (13.2)**
*G. intestinalis* 4 (3.0) 5 (3.9) 3 (3.6) 12 (3.9)
*Entamoeba histolytica/dispar* 12 (9.1) 12 (10.2) 4 (7.4) 28 (9.2)
**Total** **39 (29.5)** **50 (42.3)** **13 (24.1)** **104 (34.2)**
NB: The sum of the columns is greater than the total because of the coinfection of some of the students.
Intestinal parasite and possible risk factors
The demographics and risk factors of the study subjects are shown in Table [4](#T4){ref-type="table"}. One hundred twenty four (40.8%) of the children reported hand washing with soap and water before meals and after defecation. The odds of intestinal parasitic infection in children who do not practice hand washing before eating is 6.45 times higher than those who practice it (p = 0.0076, 95% CI = 4.55-11.90). Children in grade one to grade three had a higher prevalence of intestinal helminthic infections than those in grades four to eight (p = 0.031). The prevalence of intestinal parasitic infection was not significantly related to, family monthly income and swimming habits (p \> 0.05). Further analyses of the data showed that intestinal parasitic infection was independent of family size, religion, or gender of the children (p \> 0.05). In the univariate analyses, no statistically significant associations were observed between male versus female (p = 0.301). Although there was no statistically significant association between age and parasitic infection, the age group 10--12 years had a high proportion of parasitic infection compared to other age groups. Variable that appeared to be associated with the outcome variable during bivariate analysis was taken in to multivariate logistic regression for further analysis. In multivariate analysis, none of the observed risk factors was statistically associated with parasitic infection.
::: {#T4 .table-wrap}
Univariate analysis of intestinal parasitic infections and potential risk factors among children at the University of Gondar Community School, Northwest Ethiopia, April-June 2012
**Risk factor** **Parasite status**
------------------------------- --------------------- ------------ ------------- -------- --------------------
Female 43 (32.1) 91 (67.9) 134 (44.1) 0.431 1.11 (0.49 - 2.50)
Male 61 (35.9) 109 (64.1) 170 (55.9)
≤ 9 41 (31.1) 91 (68.9) 132 (43..4) 0.460 1.91 (0.54 -7.52)
10-12 50 (42.4) 68 (57.6) 118 (38.8)
≥ 13 13 (24.1) 41 (75.9) 54 (17.8)
Level of education
Grade 1-3 74 (64.3) 41 (35.7) 115 (37.3) 0.031 4.20 (3.34 - 8.50)
Grade 4-8 30 (15.9) 159 (84.1) 189 (62.7)
Number of siblings
≤ 2 66 (38.4) 106 (61.6) 172 (56.6) 0.081 2.60 (1.12 - 6.06)
≥ 3 38 (28.9) 94 (71.1) 132 (43.4)
Hand washing habit
Yes 28 (25.5) 82 (74.5) 110 (36.2) 0.0076 6.45 (4.55- 11.90)
No 76 (39.2) 118 60.8) 194 (63.8)
Family monthly income (ETB\*)
\<1000 46 (38.3) 74 (61.7) 120 (39.5) 0.420 1.59 (0.26-1.36)
1000-2000 39 (32.8) 80 (67.2) 119 (39.1)
\>2000 19 (29.2) 46 (70.8) 65 (21.4)
Type of transportation
By car 44 (21.8) 158 (78.2) 202 (66.4) 0.0001 5.3 (2.62- 8.45)
On foot 60 (58.8) 42 (41,2) 102 (33.6)
Yes 21 (32.3) 44 (67.7) 65 (21.4) 0.925 1.03 (0.51- 2.09)
Never swim 83 (34.7) 156 (65.3) 239 (78.6)
Christian 90 (33.3) 182 (67.7) 272 (89.5) 0.795 1.76 (0.85- 3.65)
Muslim 14 (43.8) 18 (56.2) 32 (10.5)
\* Ethiopian Birr.
Epidemiological studies on the prevalence with infection of intestinal parasites in different localities have as a primary objective to identify high-risk communities and formulate appropriate interventions. In line with this view, the present study attempted to assess the prevalence of different intestinal parasitic infections in schoolchildren in a private community school in Gondar town, Northwest Ethiopia, The results of the study showed the occurrence of several intestinal parasites of public health importance among schoolchildren.
The observed prevalence of intestinal parasites of 104 (34.2%) was lower compared with reports of other similar studies, 72.9% in Gondar, Azezo \[[@B10]\], 83% in Jimma \[[@B11]\] and 83.8% in South East of Lake Langano \[[@B13]\]. On the other hand, the prevalence observed in this study was higher than a study conducted in Babile (27.2%) \[[@B14]\]. These variations in prevalence might be due to differences in climatic conditions, environmental sanitation, economic and educational status of parents and study subjects, and previous control efforts.
According to the present study, the prevalence of *Hymenolepis nana, Entamoeba histolytica/dispar,* and *Ascaris lumbricoides* were 13.8%, 9.2%, and 5.9%, respectively. Infections with *Entamoeba histolytica/dispar* was more prevalent among the female population, while *Hymenolepis nana* affected more males but the association was not statistically significant (p \> 0.05). These three parasites are prevalent among lower age groups. This finding is in line with a study conducted in Metema District Hospital \[[@B15]\]. On the other hand, the prevalence of *Ascaris lumbricoides, hookworm* and *Schistosoma mansoni* were lower compared to a school-based study done in Azezo, Gondar \[[@B10]\]. This difference might be due to improved environmental sanitation in the community school as compared to Azezo elementary school, regular wearing of shoes and better family income among the study participants.
In this study, multiple infections (polyparasitism) occurred in 14 individuals or 4.6% of the total examined subjects and 13.5% of those who had intestinal parasites. This prevalence is lower compared with similar studies in Gondar, Azezo \[[@B10]\]. Double infections were seen in six study subjects with intestinal parasites. The prevalence of multiple infections was very low compared to previous studies \[[@B13],[@B16]\]. Sample size, study population and the methods used could attribute to this observed difference in detections of various parasites.
In this study, 36.2% of the study participants practice good hand washing before eating and after toilet using soap and water. Intestinal parasitic infections were significantly associated with poor hand washing practice (p \< 0.05). The likelihood of acquiring infections among students who do not practice hand washing was 6.45 (95% CI = 4.55- 11.90) times higher than among those who had good hand washing practice. Similarly, ways of transportation to the school had statistically significant association with parasitic infections. This finding is consistent with a study conducted in Babile town \[[@B14]\]. Similar to a report in Zarima town \[[@B17]\], the level of education of the study participants was significantly associated with intestinal parasitic infections. However, family monthly income, number of siblings, religion and swimming habit did not show statistically significant associations with intestinal parasitic infections (P \> 0.05) (Table [4](#T4){ref-type="table"}).
In this study, protozoan infections were more prevalent in schoolchildren especially in those under 12 years of age while there was reduction as age increased. The reason could be due to the slow development of immunity in adults to protozoan parasites and better awareness in washing hands and other personal hygiene measures. On the other hand, there was no significant difference in the rate of infection due to helminths in relation to the age of students. This might be due to different evasion mechanisms to immunity by helminths.
The present study was subjected to the following limitations. The study was non-blinded. Due to lack of antigen tests, *Entamoeba histolytica* and *Entamoeba dispar* were not separated. As the collection period was short, potential seasonal fluctuations might have affected the actual prevalence. Modified acid-fast staining technique was not used to detect *Cryptosporidium species.*
This study showed that intestinal parasites were prevalent in varying magnitude among the schoolchildren. The proportions of infection were higher for helminths compared to protozoa. *Hymenolepis nana* among the helminths and *Entamoeba histolytica/dispar* among the protozoans were predominant. Poor hand washing practices and ways of transportation were statistically associated with intestinal parasitic infections. The findings showed that much work remains to be done to improve the health of the students. Measures including education on personal hygiene and environmental sanitation, water supply and treatment should be taken into account to reduce the prevalence.
The authors declare that they have no competing interests.
AG, AY, BS MA, and ME conceived the idea for this study. AG, BA, BN, AY, BS, MA and participated in the design and conduct of the study. AG, BG and BA were responsible for the accuracy of the data. AG, BA and ME drafted the manuscript. BN, AY, BS and MA guarantee the statistical analysis. BA, BN, AY, BS, BG and MA interpreted the findings. All authors read and approved the final manuscript.
The pre-publication history for this paper can be accessed here:
We thank the School of Biomedical and Laboratory Sciences for providing materials and reagents to examine the stool samples. Our warmest gratitude also goes to the Director and teachers of University of Gondar Community School for their participation, assistance and cooperation in doing this research. We are also indebted to the study participants and data collectors.
|
VBA Error (Type MIsmatch) when create a pivot table
Hi I'm working on my VBA code to set a range based on the last row in my source data and then create a pivot table on that range. The messagebox gives me the right last row number in source data. However the last line here goes wrong when I run the code with error (Error type mismatch).Could you please help me to fix? thanks.
Dim PvtTbl As pivotTable
Dim wsData As Worksheet
Dim rngData As Range
Dim PvtTblCache As PivotCache
Dim wsPvtTbl As Worksheet
Dim pvtFld As PivotField
Set wsData = Worksheets("Task List Data Export")
Set wsPvtTbl = Worksheets("Summary")
wsPvtTbl.Cells.Clear
wsPvtTbl.Cells.ColumnWidth = 10
For Each PvtTbl In wsPvtTbl.PivotTables
If MsgBox("Delete existing PivotTable!", vbYesNo) = vbYes Then
PvtTbl.TableRange2.Clear
End If
Next PvtTbl
Dim last As Long
With Worksheets("Task List Data Export")
last = .Cells(.Rows.Count, "A").End(xlUp).Row
End With
MsgBox last
Set rngData = Nothing
With wsData
Set rngData = wsData.Range(.Cells(1, 1), .Cells(last, 15))
End With
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=rngData, Version:=xlPivotTableVersion12).CreatePivotTable TableDestination:=wsPvtTbl.Range("B25"), TableName:="PivotTable1", DefaultVersion:=xlPivotTableVersion12
This code worked perfectly with my original data source. However I generated the source file today (updated) and then the code is no longer working. I don't think there is a big problem with the source data because I can still create pivot table manually with defined range.
Any ideas? Thanks
Try THIS Specally how you change it to R1C1 MyPivotRangeName = "'" & ws.Name & "'!" & MyPivotRange.Address(ReferenceStyle = xlR1C1) and then use that
Code runs fine here, the above as well as the reference style that Siddarth suggests. See https://msdn.microsoft.com/en-us/library/aa264979(v=vs.60).aspx for Type Mismatch error generic info.
|
User:Gérard007
Welcome on my user page. Although I don't have much time to contribute much within Wikipedia, and then mainly within the German Wiki, you may see some pages edited by me.
Fields of Interest
* Chemistry
* Semiconductor Technology
* Mathematics
* Physics
* Astronomy
* Chess
--Gérard007 (talk) 20:34, 22 February 2009 (UTC)
|
Thread:Homocat/@comment-22439-20141005145827
Hi, welcome to ! Thanks for your edit to the User:Homocat page.
Please leave me a message if I can help with anything!
|
User:Facmarlo
FAC Marlo (FAC stands for Family Always Counts) is a talented hip-hop/rapper, songwriter, and engineering producer, hailing from Pittsburgh, PA. He writes about his trials and tribulations while allowing fans to see what life was like for him growing up through his music videos. Life hasn't been easy for the rapper and he has had to learn things the hard way, but he puts that all into his raw lyrics. Rapper FAC Marlo is known for such songs as "Momma Pray", "After Life", and "11 years".
FAC Marlo was only a kid when he started writing and recording songs. His career reached new heights when he got the opportunity to open up for Project Pat, part of the rap group Three 6 Mafia in Akron, OH. FAC Marlo is rising above some of the trials and tribulations he's faced and he learned that with every circumstance we gain strength to rebuild. He has grown from his bad boy ways and is focused on his music.
Twitter: @FacMarlo IG: @FAMILYALWAYSCOUNTS
|
Elevator system and method for operating same
ABSTRACT
A method for operating an elevator including operating the elevator in a pre-programmed sequence to stop at pre-designated floors in a predetermined order, upon receipt of an indication that a user at a given floor wishes to ride the elevator, temporarily not performing part of the pre-programmed sequence in order to arrive at the given floor with minimum delay and thereafter, in the absence of another indication that a user wishes to ride the elevator, continuing to temporarily not perform part of the pre-programmed sequence in order to arrive at a pre-designated egress floor with minimum delay and thereafter operating the elevator in the pre-programmed sequence including performing the part of the pre-programmed sequence to stop at pre-designated floors at pre-programmed times until receipt of an indication that a user at a given floor wishes to ride the elevator.
FIELD OF THE INVENTION
The present invention relates to elevators and more particularly to specialized elevator controls.
BACKGROUND OF THE INVENTION
Various types of elevator controls are known in the art. These include elevator controls which are particularly suitable for Sabbath observers, who do not operate electrical devices on the Sabbath.
SUMMARY OF THE INVENTION
The present invention seeks to provide an improved elevator system and improved elevator controls for use in operating existing elevators.
There is thus provided in accordance with a preferred embodiment of the present invention a method for operating an elevator including operating the elevator in a pre-programmed sequence to stop at pre-designated floors in a predetermined order, upon receipt of an indication that a user at a given floor wishes to ride the elevator, temporarily not performing part of the pre-programmed sequence in order to arrive at the given floor with minimum delay and thereafter, in the absence of another indication that a user wishes to ride the elevator, continuing to temporarily not perform part of the pre-programmed sequence in order to arrive at a pre-designated egress floor with minimum delay and thereafter operating the elevator in the pre-programmed sequence including performing the part of the pre-programmed sequence to stop at pre-designated floors at pre-programmed times until receipt of an indication that a user at a given floor wishes to ride the elevator.
In accordance with a preferred embodiment of the present invention the pre-programmed sequence includes a main routine wherein the elevator car moves upward floor by floor and downward floor by floor in a predetermined sequence and a subroutine wherein the elevator car stops at a pre-designated floor, opens its doors, waits and then closes its doors. Additionally, the part of the pre-programmed sequence includes at least part of the subroutine. Alternatively, the part of the pre-programmed sequence includes all of the subroutine.
In accordance with a preferred embodiment of the present invention in the presence of another indication that a user wishes to ride the elevator at a different floor, the elevator car stops at the additional floor.
Preferably, the indication that a user at a given floor wishes to ride the elevator is generated by sensing the presence of a person in predetermined propinquity to the elevator at the given floor. Additionally or alternatively, the indication that a user at a given floor wishes to ride the elevator is generated by sensing an optical code in predetermined propinquity to the elevator at the given floor. Alternatively or additionally, the indication that a user at a given floor wishes to ride the elevator is generated by sensing an RFID tag in predetermined propinquity to the elevator at the given floor. In accordance with a preferred embodiment of the present invention the indication that a user at a given floor wishes to ride the elevator is generated by the user operating an elevator call switch at the given floor.
Preferably, the predetermined egress floor is selectably pre-programmed. Alternatively, the predetermined egress floor is indicated by the optical code. In accordance with a preferred embodiment of the present invention the predetermined egress floor is indicated by the RFID tag. Alternatively, the predetermined egress floor is indicated by the user.
In accordance with a preferred embodiment of the present invention in the presence of an indication that an additional user wishes to ride the elevator, the method also includes continuing to temporarily not perform part of the pre-programmed sequence in order to arrive at a floor at which the additional user is present with minimum delay, without departing from the predetermined order.
There is also provided in accordance with another preferred embodiment of the present invention an elevator system including an elevator car arranged in an elevator shaft and having access to a plurality of pre-designated floors in a building, an elevator car driving mechanism, at least one user presence sensor arranged to sense the presence of a user at at least one of the plurality of pre-designated floors and a computerized elevator controller, the computerized elevator controller being configured to operate the elevator in a pre-programmed sequence to stop at the pre-designated floors in a predetermined order, upon receipt of an indication that a user at a given floor wishes to ride the elevator, temporarily not performing part of the pre-programmed sequence in order to arrive at the given floor with minimum delay, thereafter, in the absence of another indication that a user wishes to ride the elevator, continuing to temporarily not perform part of the pre-programmed sequence in order to arrive at a pre-designated egress floor with minimum delay and thereafter operating the elevator in the pre-programmed sequence including performing the part of the pre-programmed sequence to stop at pre-designated floors at pre-programmed times until receipt of an indication that a user at a given floor wishes to ride the elevator.
In accordance with a preferred embodiment of the present invention the pre-programmed sequence includes a main routine wherein the elevator car moves upward floor by floor and downward floor by floor in a predetermined sequence and a subroutine wherein the elevator car stops at a pre-designated floor, opens its doors, waits and then closes its doors.
Preferably, the part of the pre-programmed sequence includes at least part of the subroutine. In accordance with a preferred embodiment of the present invention the part of the pre-programmed sequence includes all of the subroutine.
In accordance with a preferred embodiment of the present invention in the presence of another indication that a user wishes to ride the elevator at a different floor, the computerized elevator controller is operative to stop the elevator car at the additional floor.
In accordance with a preferred embodiment of the present invention the indication that a user at a given floor wishes to ride the elevator is generated using the at least one user presence sensor to sense the presence of a person in predetermined propinquity to the elevator at the given floor. Additionally or alternatively, the indication that a user at a given floor wishes to ride the elevator is generated using the at least one user presence sensor to sense an optical code in predetermined propinquity to the elevator at the given floor. In accordance with a preferred embodiment of the present invention the indication that a user at a given floor wishes to ride the elevator is generated using the at least one user presence sensor to sense an RFID tag in predetermined propinquity to the elevator at the given floor. Additionally or alternatively, the indication that a user at a given floor wishes to ride the elevator is generated by the user operating an elevator call switch at the given floor.
Preferably, the predetermined egress floor is selectably pre-programmed. Alternatively, the predetermined egress floor is indicated by at least one of the optical code, the RFID tag or by the user.
In accordance with a preferred embodiment of the present invention in the presence of an indication that an additional user wishes to ride the elevator, the computerized elevator controller is operative to continue to temporarily not perform part of the pre-programmed sequence in order to arrive at a floor at which the additional user is present with minimum delay, without departing from the predetermined order.
BRIEF DESCRIPTION OF THE DRAWINGS
The present invention will be understood and appreciated more fully from the following detailed description, taken in conjunction with the drawings in which:
FIGS. 1A-1H are together a simplified pictorial illustration of the operation an elevator constructed and operative in accordance with a preferred embodiment of the present invention;
FIG. 2A-2K are together a simplified pictorial illustration of the operation an elevator constructed and operative in accordance with another preferred embodiment of the present invention;
FIGS. 3A-3K are together a simplified pictorial illustration of the operation an elevator constructed and operative in accordance with another preferred embodiment of the present invention;
FIGS. 4A-4D are simplified pictorial illustrations of four alternative embodiments of generating an indication that a user at a given floor wishes to ride the elevator;
FIG. 5 is a simplified flow chart illustrating the operation of the elevator shown in FIGS. 1A-1H;
FIGS. 6A and 6B, are, taken together, a simplified flow chart illustrating the operation of the elevator shown in FIGS. 2A-2K; and
FIG. 7 is a simplified flow chart illustrating the operation of the elevator shown in FIGS. 3A-3K.
DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS
Reference is now made to FIGS. 1A-1H and to FIG. 5, which illustrate an elevator system, an elevator control and elevator operation in accordance with a preferred embodiment of the present invention. The present invention relates to an improvement in conventional operation of an elevator in a Sabbath mode. Conventional operation of an elevator in a Sabbath mode involves pre-programmed movement and operation of the elevator, typically in the following sequence:
The elevator goes up from a base floor, stopping at predesignated floors. At each floor at which the elevator stops, the elevator doors are opened and kept open for a predesignated time duration and then closed. The elevator then moves up to the next predesignated floor. When the elevator reaches the highest designated floor, it moves downward to one or more predesignated floors. It is appreciated that the predesignated floors may be every floor or only some floors. It is also appreciated that the same or different floors may be designated floors during upward movement of the elevator and downward movement of the elevator.
It is appreciated that the foregoing sequence is somewhat time consuming for users and inconvenient for users who are not Sabbath observers. Often a separate elevator is provided for use by non-Sabbath observers, so as to avoid this inconvenience.
The present invention seeks to make the operation of an elevator in a Sabbath mode more time efficient and to avoid much of the inconvenience to non-Sabbath observers.
As seen in FIGS. 1A-1H, there is shown a typical building having a ground floor and 8 floors above the ground floor. An elevator is provided and has a selectably openable door 100 at each floor. A user presence sensor 110 is provided in the vicinity of each selectably openable door 100 for sensing the presence of a user.
Reference is additionally made to FIGS. 4A-4D, which are simplified pictorial illustrations of four alternative embodiments of generating an indication that a user at a given floor wishes to ride the elevator. As seen in FIGS. 4A-4D, user presence sensor 110 may be one of a number of possible sensors.
As seen in FIG. 4A, the user presence sensor 110 may be a camera 112, which views the face of a user. In such a case, the output of the camera 112 may be supplied to face recognition software, residing on a computer 120, which recognizes the user and, employing a database 130, associates the user with a pre-designated user-specific egress floor, such as the floor on which the user lives.
As seen in FIG. 4B, an alternative user presence sensor 110 may be a bar-code reader 140, which reads a tag 142, including a barcode, worn by a user. In such a case, the output of the reader may be supplied to a computer 150 which recognizes the barcode of tag 142 and, employing a database 160, associates the user, wearing the tag 142, with a pre-designated user-specific egress floor, such as the floor on which the user lives.
As seen in FIG. 4C, a further alternative user presence sensor 110 may be an RFID communicator 170, which reads an RFID tag 172 worn by a user. In such a case, the output of the communicator may be supplied to a computer 174 which recognizes the tag 172 and, employing a database 176, associates the user, wearing the tag 172, with a pre-designated user-specific egress floor, such as the floor on which the user lives. The RFID tag 172 may be an active or passive RFID tag.
It is appreciated that any other suitable user presence sensor 110 may alternatively be employed. It is also appreciated that alternatively, the user presence sensor need not provide designation of a user-specific egress floor. In such a case, the elevator will automatically stop at one or more pre-designated egress floors, such as the ground floor.
Optionally, as seen in FIG. 4D, yet another user presence sensor 110 may be a conventional elevator floor selector, which is normally not used by Sabbath observing users on the Sabbath but may be used by non-Sabbath observing users. In such a case, the output of the floor selector may designate a user-specific egress floor in a conventional manner.
Returning now to FIGS. 1A-1H and 5, it is seen that in the absence of a sensed user, the elevator system stops at each sequential floor, opens the elevator doors, waits with the elevator doors open and then closes the elevator doors. The elevator operation takes place in accordance with main routine “A” shown in FIG. 5 and also performs the subroutine “B” shown in FIG. 5 and is illustrated in FIGS. 1A, 1B and 1C.
FIG. 1D shows sensing of the presence of a user on the seventh floor, while the elevator car is between the second and the third floors. In accordance with an embodiment of the present invention, upon sensing the presence of a user on the seventh floor, the elevator car proceeds directly to the seventh floor in accordance with the main routine “A” in FIG. 5. As it passes the third, fourth, fifth and sixth floors, it omits subroutine “B” at each floor in order to save time.
FIG. 1E shows that when the elevator car reaches the seventh floor, the “given floor” referenced in FIG. 5, it performs subroutine “B” at the seventh floor, allowing the user to enter the elevator car.
FIG. 1F shows that the elevator car proceeds to the eighth floor in accordance with the main routine “A” but omits subroutine “B” at the eighth floor.
FIG. 1G shows that the elevator car descends from the eighth floor but omits subroutine “B” at each floor until it reaches the ground floor.
FIG. 1H shows that when the elevator car reaches the ground floor, it performs subroutine “B” and thus allows egress of the user.
It is appreciated that the embodiment of FIGS. 1A-1H need not provide designation of a user-specific egress floor. In such a case, the elevator will automatically stop at one or more pre-designated egress floors, such as the ground floor.
Reference is now made to FIGS. 2A-2K and to FIGS. 6A and 6B, which illustrate an elevator system, an elevator control and elevator operation in accordance with another preferred embodiment of the present invention. This embodiment also relates to an improvement in conventional operation of an elevator in a Sabbath mode, which conventional operation involves pre-programmed movement and operation of the elevator, typically in the following sequence:
The elevator goes up from a base floor, stopping at predesignated floors. At each floor at which the elevator stops, the elevator doors are opened and kept open for a predesignated time duration and then closed. The elevator then moves up to the next predesignated floor. When the elevator reaches the highest designated floor, it moves downward to one or more predesignated floors. It is appreciated that the predesignated floors may be every floor or only some floors. It is also appreciated that the same or different floors may be designated floors during upward movement of the elevator and downward movement of the elevator.
As seen in FIGS. 2A-2K, there is shown a typical building having a ground floor and 8 floors above the ground floor. An elevator is provided and has a selectably openable door 100 at each floor. A user presence sensor 110 is provided in the vicinity of each selectably openable door 100 for sensing the presence of a user. User presence sensor 110 may be one of a number of possible sensors as described hereinabove with reference to FIGS. 4A-4D.
It is seen that in the absence of a sensed user, the elevator system stops at each sequential floor, opens the elevator doors, waits with the elevator doors open and then closes the elevator doors. The elevator operation takes place in accordance with main routine “A” shown in FIG. 6A and also performs the subroutine “B” shown in FIG. 6A and is illustrated in FIGS. 2A, 2B and 2C.
FIG. 2D shows sensing of the presence of a user on the seventh floor, while the elevator car is between the second and the third floors. In accordance with an embodiment of the present invention, upon sensing the presence of a user on the seventh floor, the elevator car proceeds directly to the seventh floor in accordance with the main routine “A” in FIG. 6A. As it passes the third, fourth and fifth floors, it omits subroutine “B” at each floor in order to save time.
FIG. 2E shows that when the elevator car reaches the sixth floor, a second user, who has employed a conventional floor selection switch, is sensed at the fourth floor. The elevator omits subroutine “B” at the sixth floor and proceeds to the seventh floor.
FIG. 2F shows that when the elevator car reaches the seventh floor, the “first given floor” referenced in step C of FIG. 6B, it performs subroutine “B” at the seventh floor, allowing the first user to enter the elevator car.
FIG. 2G shows that the elevator car then proceeds to the eighth floor in accordance with the main routine “A” but omits subroutine “B” at the eighth floor.
FIG. 2H shows that the elevator car descends from the eighth floor but omits subroutine “B” at each floor until it reaches the fourth floor.
FIG. 2I shows that when the elevator car reaches the fourth floor, it performs subroutine “B” and thus allows the second user to enter the elevator car.
FIG. 2J shows that the elevator car descends from the fourth floor but omits subroutine “B” at each floor until it reaches the ground floor.
FIG. 2K shows that when the elevator car reaches the ground floor, it performs subroutine “B” and thus allows egress of the user.
It is appreciated that the embodiment of FIGS. 2A-2K need not provide designation of a user-specific egress floor. In such a case, the elevator will automatically stop at one or more pre-designated egress floors, such as the ground floor.
As seen in FIG. 6A, upon sensing a first user at a first given floor, the elevator proceeds according to routine “A” and omits subroutine “B” until it reaches the first given floor. After performing subroutine “B” at the first given floor, in the absence of sensing the presence of a second user, the elevator proceeds, as shown in FIG. 6A, according to routine “A” until reaching one or more pre-designated egress floors, such as the ground floor, where the elevator will automatically perform subroutine “B”.
It is appreciated that in the event that the presence of a second user is sensed, at a second given floor, when the elevator car is already downstream of the second given floor on the way down to the one or more pre-designated egress floors, the elevator proceeds, as shown in FIG. 6A, according to routine “A” until reaching one or more pre-designated egress floors, such as the ground floor, where the elevator will automatically perform subroutine “B”. Following the completion of routine “A”, by the performance of subroutine “B” at the last predesignated egress floor, the elevator will then respond to the sensing of the presence of the second user, who will now be considered a first user, and proceeding as described above with reference to FIG. 6A.
As seen in step C in FIG. 6B, when the presence of a second user at a second given floor is sensed prior to the elevator car reaching the floor where the first user has been sensed, if the second given floor is above the first given floor or if the elevator car is already above the second given floor, then the elevator continues to proceed with routine “A” until reaching the floor where the first user has been sensed, as shown in the illustrated embodiment of FIGS. 2D-2K. As seen further in step C in FIG. 6B, upon reaching the first given floor, the elevator performs subroutine “B” at the first given floor and then proceeds with routine “A” until reaching the second given floor. The elevator performs subroutine “B” at the second given floor and then proceeds with routine “A” until reaching one or more pre-designated egress floors, such as the ground floor, where the elevator will automatically perform subroutine “B”.
It is also appreciated that the above sequence, shown in step C of FIG. 6B, is also performed when the presence of a second user, at the second given floor, is sensed after the elevator car has reached the first given floor but has not yet reached the second given floor, at least on the way down to the one or more pre-designated egress floors.
If the presence of a second user is sensed, at the second given floor, prior to the elevator car reaching the first given floor and prior to reaching the second given floor, that the elevator continues to proceed with routine “A” until reaching the second given floor, where the second user has been sensed, as seen in step D in FIG. 6B. As seen further in step D in FIG. 6B, upon reaching the second given floor, the elevator performs subroutine “B” at the second given floor and then proceeds with routine “A” until reaching the first given floor. The elevator performs subroutine “B” at the first given floor and then proceeds with routine “A” until reaching one or more pre-designated egress floors, such as the ground floor, where the elevator will automatically perform subroutine “B”.
Reference is now made to FIGS. 3A-3K and to FIG. 7, which illustrate an elevator system, an elevator control and elevator operation in accordance with another preferred embodiment of the present invention. This embodiment also relates to an improvement in conventional operation of an elevator in a Sabbath mode, which conventional operation involves pre-programmed movement and operation of the elevator, typically in the following sequence:
The elevator goes up from a base floor, stopping at predesignated floors. At each floor at which the elevator stops, the elevator doors are opened and kept open for a predesignated time duration and then closed. The elevator then moves up to the next predesignated floor. When the elevator reaches the highest designated floor, it moves downward to one or more predesignated floors. It is appreciated that the predesignated floors may be every floor or only some floors. It is also appreciated that the same or different floors may be designated floors during upward movement of the elevator and downward movement of the elevator.
As seen in FIGS. 3A-3K, there is shown a typical building having a ground floor and 8 floors above the ground floor. An elevator is provided and has a selectably openable door 100 at each floor. A user presence sensor 110 is provided in the vicinity of each selectably openable door 100 for sensing the presence of a user. User presence sensor 110 may be one of a number of possible sensors as described hereinabove with reference to FIGS. 4A-4D.
In this example, as in the examples described above with reference to FIGS. 1A-2K, it is appreciated that in the absence of a sensed user, the elevator system stops at each sequential pre-designated floor, opens the elevator doors, waits with the elevator doors open and then closes the elevator doors. The elevator operation takes place in accordance with main routine “A” shown in FIG. 7 and also performs the subroutine “B” shown in FIG. 7.
In this example, as seen in FIG. 3A, while the elevator car is descending, the presence of three individuals at the ground floor is sensed. A pre-designated egress floor of a first one of the individuals is sensed by face recognition, as explained hereinabove with reference to FIG. 4A, a pre-designated egress floor of a second one of the individuals is sensed by bar code reading or RFID tag reading, as explained hereinabove with reference to FIG. 4B or FIG. 4C, and a pre-designated egress floor of a third one of the individuals is sensed by operation of a egress floor selection switch, as explained hereinabove with reference to FIG. 4D.
As shown in FIG. 3B, the elevator performs subroutine “B” when the elevator car is located at the ground floor. The elevator then proceeds with main routine “A”, but does not perform subroutine “B” as illustrated in FIG. 3C, until it reaches the fourth floor, which is the pre-designated egress floor associated with the third user. When the elevator car reaches the fourth floor, the elevator performs subroutine “B”, as illustrated in FIG. 3D.
The elevator then proceeds with main routine “A”, but does not perform subroutine “B”, as illustrated in FIG. 3E, until the elevator car reaches the sixth floor, which is the pre-designated egress floor associated with the second user. When the elevator car reaches the sixth floor, the elevator performs subroutine “B”, as illustrated in FIG. 3F.
The elevator then proceeds with main routine “A”, and reaches the seventh floor, which is the pre-designated egress floor associated with the first user. When the elevator car reaches the seventh floor, the elevator performs subroutine “B”, as illustrated in FIG. 3G.
Following the egress of the last of the passengers in the elevator car, the elevator returns to normal Sabbath mode operation, continuing with main routine “A” and performing subroutine “B” at every pre-designated floor. FIG. 3H shows the elevator car at the eighth floor during performance of subroutine “B” thereat. As long as no user presence is sensed, elevator operation continues in the normal Sabbath mode, as illustrated in FIG. 3I, which shows performance of subroutine “B” at the seventh floor; FIGS. 3J and 3K which shows performance of subroutine “B” at subsequent pre-designated floors, the second floor and the ground floor, respectively.
It will be appreciated by persons skilled in the art that the present invention is not limited by what has been described hereinabove. Rather the present invention includes both combinations and sub-combinations of features described hereinabove as well as modifications thereof which are not in the prior art.
1. A method for operating an elevator comprising: operating said elevator in a pre-programmed sequence to stop at pre-designated floors in a predetermined order; upon receipt of an indication that a user at a given floor wishes to ride the elevator, temporarily not performing part of said pre-programmed sequence in order to arrive at the given floor with minimum delay; and thereafter, in the absence of another indication that a user wishes to ride the elevator, continuing to temporarily not perform part of said pre-programmed sequence in order to arrive at a pre-designated egress floor with minimum delay; and thereafter operating said elevator in said pre-programmed sequence including performing said part of said pre-programmed sequence to stop at pre-designated floors at pre-programmed times until receipt of an indication that a user at a given floor wishes to ride the elevator.
2. A method for operating an elevator according to claim 1 and wherein said pre-programmed sequence includes: a main routine wherein the elevator car moves upward floor by floor and downward floor by floor in a predetermined sequence; and a subroutine wherein the elevator car stops at a pre-designated floor, opens its doors, waits and then closes its doors.
3. A method for operating an elevator according to claim 2 and wherein said part of said pre-programmed sequence includes at least part of said subroutine.
4. A method for operating an elevator according to claim 2 and wherein said part of said pre-programmed sequence includes all of said subroutine.
5. A method for operating an elevator according to claim 1 and wherein in the presence of another indication that a user wishes to ride the elevator at a different floor, the elevator car stops at said additional floor.
6. A method for operating an elevator according to claim 1 and wherein said indication that a user at a given floor wishes to ride the elevator is generated by at least one of: sensing at least one of the presence of a person, an optical code and an RFID tag in predetermined propinquity to said elevator at said given floor; and the user operating an elevator call switch at said given floor.
7. A method for operating an elevator according to claim 1 and wherein said predetermined egress floor is selectably pre-programmed.
8. A method for operating an elevator according to claim 6 and wherein: said indication that a user at a given floor wishes to ride the elevator is generated by sensing at least one of said optical code and said RFID tag in predetermined propinquity to said elevator at said given floor; and said predetermined egress floor is indicated by said at least one of said optical code and said RFID tag.
9. A method for operating an elevator according to claim 6 and wherein: said indication that a user at a given floor wishes to ride the elevator is generated by the user operating an elevator call switch at said given floor; and said predetermined egress floor is indicated by said user.
10. A method for operating an elevator according to claim 1 and wherein, in the presence of an indication that an additional user wishes to ride the elevator, said method also comprises continuing to temporarily not perform part of said pre-programmed sequence in order to arrive at a floor at which the additional user is present with minimum delay, without departing from said predetermined order.
11. An elevator system comprising: an elevator car arranged in an elevator shaft and having access to a plurality of pre-designated floors in a building; an elevator car driving mechanism; at least one user presence sensor arranged to sense the presence of a user at at least one of said plurality of pre-designated floors; and a computerized elevator controller, said computerized elevator controller being configured to: operate said elevator in a pre-programmed sequence to stop at said pre-designated floors in a predetermined order; upon receipt of an indication that a user at a given floor wishes to ride the elevator, temporarily not performing part of said pre-programmed sequence in order to arrive at the given floor with minimum delay; thereafter, in the absence of another indication that a user wishes to ride the elevator, continuing to temporarily not perform part of said pre-programmed sequence in order to arrive at a pre-designated egress floor with minimum delay; and thereafter operating said elevator in said pre-programmed sequence including performing said part of said pre-programmed sequence to stop at pre-designated floors at pre-programmed times until receipt of an indication that a user at a given floor wishes to ride the elevator.
12. An elevator system according to claim 11 and wherein said pre-programmed sequence includes: a main routine wherein the elevator car moves upward floor by floor and downward floor by floor in a predetermined sequence; and a subroutine wherein the elevator car stops at a pre-designated floor, opens its doors, waits and then closes its doors.
13. An elevator system according to claim 12 and said part of said pre-programmed sequence includes at least part of said subroutine.
14. An elevator system according to claim 12 and said part of said pre-programmed sequence includes all of said subroutine.
15. An elevator system according to claim 11 and wherein, in the presence of another indication that a user wishes to ride the elevator at a different floor, the computerized elevator controller is operative to stop the elevator car at said additional floor.
16. An elevator system according to claim 11 and wherein said indication that a user at a given floor wishes to ride the elevator is generated by at least one of: using said at least one user presence sensor to sense at least one of the presence of a person, an optical code and an RFID tag in predetermined propinquity to said elevator at said given floor; and the user operating an elevator call switch at said given floor.
17. An elevator system according to claim 11 and wherein said predetermined egress floor is selectably pre-programmed.
18. An elevator system according to claim 16 and wherein: said indication that a user at a given floor wishes to ride the elevator is generated by using said at least one user presence sensor to sense at least one of said optical code and said RFID tag in predetermined propinquity to said elevator at said given floor; and said predetermined egress floor is indicated by said at least one of said optical code and said RFID tag.
19. An elevator system according to claim 16 and wherein: said indication that a user at a given floor wishes to ride the elevator is generated by the user operating an elevator call switch at said given floor; and said predetermined egress floor is indicated by said user.
20. An elevator system according to claim 11 and wherein, in the presence of an indication that an additional user wishes to ride the elevator, said computerized elevator controller is operative to continue to temporarily not perform part of said pre-programmed sequence in order to arrive at a floor at which the additional user is present with minimum delay, without departing from said predetermined order.
|
$(function() {
var width = 960,
height = 136,
cellSize = 17;
var month_init = 20;
var month_arr = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var week_init = 20;
var week_arr = ['Mon', 'Web', 'Fri']
var formatPercent = d3.format(".1%");
var color = d3.scaleQuantize()
// .domain([-0.05, 0.05])
// .range(["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#d9ef8b", "#a6d96a", "#66bd63",
// "#1a9850", "#006837"
// ]);
.domain([1, 5])
.range(["#ebedf0", "#c6e48b", "#7bc96f", "#239a3b", "#196127"]);
var svg = d3.select("#" + "fault-body")
.selectAll("svg")
// .data(d3.range(1990, 2011))
.data([2018])
.enter().append("svg")
.attr("width", width)
.attr("height", height)
.append("g")
.attr("transform", "translate(" + ((width - cellSize * 53) / 2) + "," + (height - cellSize * 7 - 1) + ")");
// svg.append("text")
// .attr("transform", "translate(-6," + cellSize * 3.5 + ")rotate(-90)")
// .attr("font-family", "sans-serif")
// .attr("font-size", 10)
// .attr("text-anchor", "middle")
// .text(function(d) {
// return d;
// });
// add 月份
month_arr.forEach(function(e) {
svg.append("text")
.text(e)
.attr("font-family", "sans-serif")
.attr("font-size", 12)
.attr("fill", "#767676")
.attr("transform", "translate(" + month_init + "," + cellSize * -0.3 + ")")
month_init += 75;
})
// add 星期
week_arr.forEach(function(e) {
svg.append("text")
.text(e)
.attr("font-family", "sans-serif")
.attr("font-size", 9)
.attr("fill", "#767676")
.attr("transform", "translate(-6 ," + (cellSize + week_init) + ")rotate(-90)")
week_init += 31;
})
var rect = svg.append("g")
// .attr("fill", "none")
.attr("fill", "rgb(235, 237, 240)")
// .attr("stroke", "#ccc")
.attr("stroke", "#FFFFFF")
.attr("stroke-width", "3")
// .attr("stroke", "#000")
.selectAll("rect")
.data(function(d) {
return d3.timeDays(new Date(d, 0, 1), new Date(d + 1, 0, 1));
})
.enter().append("rect")
.attr("width", cellSize)
.attr("height", cellSize)
.attr("x", function(d) {
return d3.timeWeek.count(d3.timeYear(d), d) * cellSize;
})
.attr("y", function(d) {
return d.getDay() * cellSize;
})
.datum(d3.timeFormat("%Y-%m-%d"));
// 月份实线
// svg.append("g")
// .attr("fill", "none")
// // .attr("stroke", "#000")
// .attr("stroke", "#ffffff")
// .attr("fill", "rgb(235, 237, 240)")
// .selectAll("path")
// .data(function(d) {
// return d3.timeMonths(new Date(d, 0, 1), new Date(d + 1, 0, 1));
// })
// .enter().append("path")
// .attr("d", pathMonth);
d3.csv("dji.csv", function(error, csv) {
if (error) throw error;
var data = d3.nest()
.key(function(d) {
return d.Date;
})
.rollup(function(d) {
return (d[0].Close - d[0].Open) / d[0].Open;
})
.object(csv);
rect.filter(function(d) {
return d in data;
})
.attr("fill", function(d) {
return color(data[d]);
})
.append("title")
.text(function(d) {
return d + ": " + formatPercent(data[d]);
});
});
function pathMonth(t0) {
var t1 = new Date(t0.getFullYear(), t0.getMonth() + 1, 0),
d0 = t0.getDay(),
w0 = d3.timeWeek.count(d3.timeYear(t0), t0),
d1 = t1.getDay(),
w1 = d3.timeWeek.count(d3.timeYear(t1), t1);
return "M" + (w0 + 1) * cellSize + "," + d0 * cellSize +
"H" + w0 * cellSize + "V" + 7 * cellSize +
"H" + w1 * cellSize + "V" + (d1 + 1) * cellSize +
"H" + (w1 + 1) * cellSize + "V" + 0 +
"H" + (w0 + 1) * cellSize + "Z";
}
})
|
User:Walkazo
Walkazo's Portion of the Page
Comming soon, Walkazo is on vacation
Spritework
My lifes troubles
More Spritework
Trivia
This User was the 100,002nd viewer of Shaymin's article on Bulbapedia,
This User is the 1000th viewer of Paper Jorge's page, happy wiki birthday Paper Jorge!
This User's 1st Page crated other than the Userpage is Fish Bones
And now for something completely diffrent
http://i170.photobucket.com/albums/u249/Dean430/donkeyhomer.gif WOOHOO! HOMER IS KILLING MARIO!
|
we shall discuss today public relations writing. Public relations writing, as the name suggests, is writing primarily meant for consumption of the public, that is, the general people. According to the Webster's dictionary, publicity is information with a news value. Designed to advance the interest of a place, person, cause or institution, usually appearing in public print. To carry out a successful public relations exercise, it is important to know and understand its possibilities and limitations. Basically, it is the process of transferring information of interest to the organization or cause to be publicized into information that will be of interest to the particular segments of the public to which it is directed. Among the public relations writings, we shall now discuss the press release. As you know, a press release is one of the sources of news. Media organizations depend on press releases for a large chunk of their news. As it is not possible for a news organization to send its reporters to cover each and every news event, press releases act as a convenient alternative whereby organizers of events can write down the highlights and send it for publication. Press releases are also a convenient medium through which an organization can make an important announcement. The advantages of a press release is that the facts are placed in writing and dispatched to the media houses. As there is no scope for direct interaction between the media and the party concerned, it can be described as a one-way traffic. Press releases relating to events may be written in the inverted pyramid style of writing. It saves the time of the sub-editor in the news decks from rewriting it in the news format that is in the inverted pyramid style. However, one cannot expect every organizer to write in the inverted pyramid style because we can't expect all organizers to be trained in journalism and all. They might be common people. So mostly you will be finding the press releases coming in the pyramid style. That is they will be writing it as it happened. So the sub-editor or the news person will have to again process it, edit it and put it in the news format that is in the inverted pyramid style of writing. As press releases serve as documentary evidence of the source of the news contained in it. It must be written in official letter heads of the organization concerned and must be signed by the authorized person. This is important as the news organization will have to defend the publication of the news on the basis of the press release. You see since the newspaper is not sending its own reporters to coveted news so it has to depend on the press release for whatever is stated about that event. So if there is any problem after publication of the news then the newspaper will have to defend itself on the basis of the press release and so it is a written legal document. However this does not mean that anything written in a press release will be published. The press release must fall within the journalistic ethics and norms for publication. So what this means is that that whatever is given in a press release will not be just you know automatically published in the newspaper. The editorial decks will go through the merit of the press release and if it is found suitable for publication and if it meets the norms and ethics of journalism then only it will be published. So no any type of slander or no anything libelous will not be published. Significantly the press releases are authorized documentary presentation of happening events that is hard news. Hence the language should be inactive voice which reflect a sense of immediacy. The language should be simple and direct. Technical jargons and uncommon expressions should be avoided. So we should not you see this as you say the news is for the common reader it must be reader friendly. So we should not complicate matters by using very ornamental language or difficult words or some technical jargons which the common reader might find difficult to understand. It must be kept in mind that the press release should attract the sub editor in the news decks to take it as a news item. Long press releases should be avoided and also the press releases should be devoid of flourished literary ornamental languages as we have already said should be avoided. As you know the sub editor is a very busy person. There will be a lot of press releases or other news items which he has to process. So if possible the press release should be to the point and should be short so that it helps the sub editor to go through it and to process the sub press release as a news item. Next we now come to the backgrounder the material that the PR people use as a backgrounder. This is one of the important functions of a public relations team and it provides supporting data and subject material to the media to write stories from different angles. The PR team has to compile comprehensive data under different heads so that the media gets a clear idea. For example a PR team preparing for a company's press conference or a media team's visit has to make elaborate preparation in the form of background material. Starting from a brief history of the company's profile the PR team has to branch out in different directions projecting the progress, product profile, production growth, future plans etc. A trip and lucid presentation of these materials are provided to the media members as press kit to help them in preparing their stories. A professional journalist with a nose for news may find in an innocuous looking data in the background material the lead for an interesting story. So you see sometimes a piece of item or data which someone might overlook might turn out to be a very interesting angle for a story. Presentation of background material should be made in an interesting way with a literary flourish to help the journalist in writing attractive soft stories. Interesting quotes and observations of high-profile dignitaries may be included in the material for use by the media. In preparing background materials the PR team should keep in mind that the materials provided to the media are to be used for preparation for news stories. Hence all efforts should be made to make the material media friendly as far as possible. Highly technical jargons that is terms used in specialized fields like law, medicine, engineering etc. should be avoided as far as possible so that the message is coached in a language which could be understood by the average reader. Finally we will now conclude with the press note. This is also an important accessory of a press conference or press meet. Any individual or organization holding a press conference does so to convey their point of view on a subject for which preparation is made beforehand. The speaker at the press conference usually prepares his speech to be delivered before the media. Copies of the speech are distributed among the media representatives as press note. It helps the media to get a word-by-word account of the speaker's speech which helps to remove any misunderstanding besides the exact words could be used as quotes. It is not possible for a reporter to note down word-by-word all that the speaker says at a press conference. Moreover tape recorder facilities may not be available with all the media representatives. Distribution of press notes before the beginning of the press conference also gives an opportunity to the reporters to go through the speech and prepare them to ask questions on the important points of the subject matter. With this we conclude for today. Thank you.
|
How do we get it pulled into HA?
@uvjustin I just tested it out and everything works great!
How do we get it pulled into HA?
BTW, I also pointed this thread to this version.
The PR for HA is at https://github.com/home-assistant/core/pull/32939
Cool. Thanks!
@aechelon
@aechelon Looks like they don't want any webscraping in HA going forward...we'll have to make this a custom component.
@aechelon I put the custom component here https://github.com/uvjustin/alarmdotcomajax
@uvjustin Great. Thank you!
|
Sean Schoyen
Sean Schoyen is a character of the Horizon series.
Appearance
Personality
He always works hard and aims for perfection on almost everything.
Background
Lucy di Meihan
Miya Tsubasa
Abilities and Equipment
Sean currently isn't playing Horizon, although it is implied that he has an account in the game.
Trivia
* Sean is able to speak at least four languages (English, Norwegian, Japanese and Mandarin).
|
package language.search;
import java.util.function.BiFunction;
/**
*
* Maintains the best (min or max) object based on the number associated with the object.
*
* @author Antonin Pavelka
*/
public class Best<T> {
private T object;
private double property;
private final BiFunction<Double, Double, Boolean> isFirstBetter;
private Best(BiFunction<Double, Double, Boolean> comparison) {
this.isFirstBetter = comparison;
}
public static <T> Best createSmallest() {
BiFunction<Double, Double, Boolean> isSmaller = (x, y) -> {
return x < y;
};
Best<T> best = new Best(isSmaller);
return best;
}
public static <T> Best createGreatest() {
BiFunction<Double, Double, Boolean> isSmaller = (x, y) -> {
return x > y;
};
Best<T> best = new Best(isSmaller);
return best;
}
public void update(T otherObject, double otherProperty) {
if (object == null) {
object = otherObject;
property = otherProperty;
} else {
if (isFirstBetter.apply(otherProperty, property)) {
object = otherObject;
property = otherProperty;
}
}
}
public T getBestObject() {
return object;
}
public double getBestProperty() {
return property;
}
}
|
SARAH A. LYMAN, W. W. LYMAN and Others, Ex Parte, v. SOUTHERN COAL COMPANY.
(Filed 24 May, 1922.)
1. Partition — Sales for Division — Commissioners—Contracts of Sale— Purchasers — Wrong Reports — Motion in Canse — Statutes.
A commissioner appointed for the sale of land in proceedings for partition, after confirmation of sale to a private purchaser, filed a petition in the cause after notice alleging in effect that in addition to the purchase price he had reported, the purchaser had agreed to pay a larger sum to include his commission, etc., and had paid only the smaller sum, reported and confirmed, and refused to pay the balance, as agreed after having received the deed from the clerk’s office, where it had been deposited: Held, upon demurrer, the allegations of the petition must be considered as true, and it was reversible error for the trial judge to sustain the demurrer, and not require an answer to be -filed to set the matters at issue for the purpose of proceeding to determine the controversy. C. S., 621.
2. Same — Judgments—Imposition on the Courts.
Where thé commissioner for the private sale of lands for division has withheld from the knowledge of the court the actual price the purchaser .has agreed to pay, and reported a lesser sum, which the court has confirmed by final judgment, it is an imposition on the court, and will not conclude it from reopening the case on the petition of the commissioner in the cause, after notice, and affording the proper relief.
3. Partition — Sales for Division — Commissioners—Commissions—Agreement of Parties — Courts—Reports.
The court will not permit the commissioner and parties in interest in proceedings to sell land for division among tenants in common, to fix among themselves without its knowledge the compensation of the commissioner, especially where the interests of minors are involved, and impose upon the court by the commissioner’s reporting the purchase price in a net sum after deducting the agreed commissions, it being within the province of the court to allow such commissions as it may deem right and proper, and pass upon the sufficiency of the purchase price of the lands with all the facts before it.
Appeal by petitioners from McElroy, J., 21 December, 1921, from BuNCOMBE. ,
This is a petition in the above entitled cause, it being a proceeding before the clerk of the Superior Court for partition*, in the following terms :
The petition alleges that William W. Lyman, the father of the petitioner, W. W. -Lyman, Jr., owned the land mentioned in the petition since the death of his father, on 13 December, 1893. From that date till W. W. Lyman’s death, on 7 February, 1921, he having always been a resident of California, his brother, the petitioner, A. J. Lyman, had looked after his interests in regard to the property, paying the taxes, etc., conducting a large amount of correspondence, etc., for which he had received no compensation. On tbe death of W. W. Lyman tbe property descended to tbe petitioners, W. W. Lyman, Jr., a son, and tbe petitioners, Theodore B., et al., children of a deceased son, Theodore B. Lyman, subject to the dower of bis widow, tbe petitioner, Sarab A. Lyman. On 15 July, 1921, the petitioners (other than A. J. Lyman), the widow and heirs of W. W. Lyman, filed their petition with the clerk of the Superior Court of Buncombe County for a sale of the property for partition. The petitioner, Sarab A. Lyman, tbe widow, was over 80 years of age, and the children of Theodore B. Lyman, deceased, were under age, and W. W. Lyman, Jr., who was 36 years of age, was tbe only one of the owners of said property who was of sufficient business experience to transact business in regard thereto. He and A. J. Lyman conducted tbe correspondence stated in the petition, from which it appears that W. W. Lyman, Jr., on behalf of himself and his coowners, agreed to receive net for the property $21,000, and to allow A. J. Lyman, in-view of tbe long period of gratuitous service rendered^ by him to his brother, as above stated, $2,000 of the $23,500 hereinafter mentioned, A. J. Lyman agreeing not to deduct any part of the $21,000 for his compensation. A. J. Lyman secured the assistance of J. O. Penland, a real estate broker, agreeing to pay Penland $500; and as a result of their cooperation the appellee, the Southern Coal Company, offered by letter to pay $23,500 for the property, “$5,500 to be paid on the delivery of the deed, the remainder of the purchase price‘to be paid in three equal installments of $6,000 each, evidenced by notes.” Thereupon A. J. Lyman, on 23 August, 1921, wrote W. W. Lyman, Jr., advising him that he had “got the coal people up to $23,000” for the lots, and saying that,. “In view of my marked success in securing this fine figure, I want you to allow me $2,000 as compensation, which I feel is but fair and just. Had I closed for the $21,000 you would have received less than $20,000.” To which W. W. Lyman, Jr., replied, on 14 September, 1921, “We have agreed to accept your figure for the commission. Tour proposition is not beyond reason.” It will be observed that A. J. Lyman in his letter stated $23,000 as the purchase price, instead of $23,500. The reason for doing this was that he regarded the agreement between him and Penland as to the $500 as personal, and therefore did not think it necessary to go- into an explanation of that in his correspondence with W. W. Lyman, Jr. As to the latter, the proposition was correctly stated in A. J. Lyman’s letter to him, that is, that tbe purchase price would be $23,000, out of which the owners, represented by W. W. Lyman, Jr., agreed to pay him $2,000. This $500 tbe coal company bas paid (to Penland), in addition to the $21,000 mentioned in the decree of sale. Thereupon A. J. Lyman reported to the Superior Court that he had received an offer of $21,000 for tbe property, $3,000 of said $21,000 to be paid in cash, the balance in equal installments of $6,000 each, it being his understanding that the additional $2,500 to be paid by the Southern Goal Company would be paid by it to him, and that he would receive $2,000 of it for himself, pursuant to his agreement to that effect with "W. W. Lyman, Jr., and the other $500 he would pay to Penland, not intending, as has heretofore been stated, to ask for any allowance for his services as commissioner out of the $21,000. The clerk, on 23 September, 1921, made a decree authorizing A. J. Lyman, as commissioner, “to sell said lots at private sale for not less than said sum ($21,000) on the terms stated in his report.” The Southern Goal Company was not named as the prospective purchaser either in the report of A. J. Lyman, commissioner, or in the decree of sale just mentioned. The decree of sale provided that, “Upon the payment into office of the clerk of this court of the cash payment of $3,000, and the execution by the purchaser of notes for the deferred payments, and a deed in trust in form satisfactory to the commissioner, and said clerk securing the payment of said notes, the commissioner aforesaid is hereby authorized to execute a deed conveying said property to the purchaser in fee simple. And this proceeding is retained for further directions.”
A. J. Lyman, as commissioner, then executed a deed, 26 October, 1921, conveying the property to the Southern Goal Company, who paid to the clerk of the court $2,500, and A. J. Lyman also paid to the clerk the $500 which he received from the coal company with its letter of 23 August, 1921, and the coal company deposited with the clerk its notes for $18,000. The manner by which this deed came into the possession of the Southern Coal Company is stated in paragraphs 12, 13, and 14 of the petition, as follows:
“12. It was not the intention of the said A. J. Lyman to deliver the said deed until the Southern Coal Company had paid in cash, in addition to said $500, the further sum of $5,000, $3,000 of which was to be paid to the clerk and the other $2,500 to A. J. Lyman, $500 of the same to be paid to J. O. Penland and $2,000 to himself, as hereinbefore set forth.
“13. That when the said A. J. Lyman tendered the deed to the party who was acting in the matter as attorney for the Southern Coal Company, the latter informed A. J. Lyman that the matter could not be closed because of the absence of Bernard Elias, the secretary of the Southern Coal Company, and suggested that Lyman deposit the deed with the clerk, who would deliver the same to the Southern Coal Company upon its compliance with the 'said decree.
“14. A. J". Lyman complied with this suggestion, and left the deed with the clerk, and thereafter the Southern Coal Company received the ■deed from the clerk.”
The coal company, having thus secured possession of the deed, refused to pay the additional $2,500 — which would make the $5,500 to be paid on the delivery of the deed, according to their agreement — but it did, after thus getting possession of the deed, pay, on 8 November, 1921, $250 to Penland, and later paid Penland an additional $250, but it has refused to pay the additional $2,000 which it is necessary for it to pay in order to comply with its agreement for the payment of “$5,500 to be paid on the delivery of the deed.” The owners of the'property, in consequence of this refusal on the part of the coal company, on 7 December, 1921, filed their petition in which they set forth the facts and asked the court “to make such order herein as may be according to justice and right, and that the unpaid part, to wit, $2,250, of the $5,500 to be paid on the delivery of the deed be paid as’the court may direct by the Southern Coal Company either to A. J. Lyman, or else into the office of the clerk of the court for the benefit of the owners of said real estate; and that said real estate be charged with a lien for the payment thereof, with interest from 26 October, 1921, and be sold by decree of this court if said sum be not paid”; $250 was paid to Penland by the coal company after the filing of this petition.
The agreement between the parties as to the sale and the division of the proceeds was not reported to the court or known to it, and it was kept in ignorance of it.
The Southern Coal Company, by leave of the court, entered a special appearance, and moved to dismiss the petition upon several grounds stated in the written motion. :
The clerk allowed the motion, and dismissed the petition, whereupon the petitioners appealed to the court in term, which affirmed the judgment of the clerk, the material part of the judgment being as follows:
“1. That the said A. J. Lyman agreed with the parties who owned the real estate mentioned in the record that he would not ask for any commission for his services as commissioner out of the $21,000 mentioned in the said petition — see paragraphs 9 and 10 thereof — and the entire $21,000 goes to the owners of the real estate mentioned in said petition. Unless the Southern Coal Company is required to pay the additional $2,500, as prayed for in said petition, said A. J. Lyman will get no compensation for his services herein as commissioner. No part of the $3,000 (part of said $21,000) already paid by the Southern Coal Company has been paid to A. J. Lyman, nor has any order been made by the court for the payment of any part thereof to him, and A. J. Lyman does not intend to ask the court to allow him any part of said $21,000, it being understood between him and W. W. Lyman, Jr., the latter acting in behalf of himself and his coowners of said real estate, as shown by tbe correspondence set forth, in said petition, tbat none of tbe $21,000 would be used for tbe payment to A. J. Lyman of any commission.
“2. Tbat tbe Southern Goal Company bas, since 8 November, 1921, paid to J. 0. Penland $250, in addition to tbe $250 paid by it to said Penland, as stated in paragraph 6 of tbe petition, herein verified 7 December, 1921.
“Upon consideration of tbe record, and- on tbe facts therein appearing and herein found, tbe motion of tbe Southern Goal Company to dismiss tbe petition, verified 7 December, 1921, is sustained, and tbe clerk’s order of 20 December, 1921, in tbat behalf is hereby affirmed.”
Tbe petitioners duly excepted and appealed to this Court.
F. W. Thomas for plaintiffs.
■J. W. Haynes for defendant.
Walker, J.,
after stating tbe case: There was error in dismissing tbe proceeding, upon the special appearance. Tbe court should have ordered tbe money to be paid into court, or to tbe commissioner appointed to make tbe sale,' unless tbe petition was answered and tbe allegations thereof denied, which tbe respondents may now be allowed by tbe court to do. When tbe facts are ascertained in some way, according to tbe course and practice of tbe court, tbe latter may then proceed to declare tbe rights of tbe parties and enter judgment accordingly. If the bid for tbe land at tbe sale was $23,500, tbe purchaser -was liable for tbat amount upon a confirmation of tbe sale, tbe question of commissions for making tbe sale being one for tbe court and not for tbe parties to determine. Tbe court, speaking of tbe summary remedy against purchasers at public sales, under tbe statute (Rev. Code., cb. 31, sec. 129), said in Ex parte Cotten, 62 N. C., 81: “Tbe Declaration ■ of Rights provides tbat in all controversies at law respecting property, tbe ancient mode of trial by jury is one of tbe best securities of tbe people, and ought to remain sacred and inviolable. What controversy did tbe petitioner have which be bad tbe right to have determined by a jury? In a proper proceeding for tbe purpose, tbe court of equity bad ordered tbe sale of property, and be became tbe purchaser at a certain price, and promised to pay tbe amount at a given- day. He failed to pay, and tbe court bad tbe power to attach him for a contempt for not paying. Tbe proceedings of tbe court could be obstructed without end if, in attempting to enforce its judgments and decrees, tbe person against wbopi they are to be enforced could stop tbe proceedings until be could make up a controversy with tbe court, and have it tried by a jury. So, in this case, certain persons sought tbe aid of tbe court of equity to sell their property ; tbe court ordered tbe sale, and tbe petitioner bought, and now seeks to stay tbe proceedings of tbe court of equity in tbat case until another suit can be instituted against him, in which, a jury can determine whether he ought to pay. The constitutional provision was certainly never intended to apply to a case like this. As a substitute for an attachment by which a court of equity can enforce all its decrees, a milder remedy is provided in the aforesaid statute, by notice and judgment on motion. And that statute is not unconstitutional.” The provision of the Rev. Code, cited above, has been brought forward in the Code (sec. 941), in the Revisal of 1905 (sec. 1524), and in Consolidated Statutes (sec. 621). Lackey v. Pearson, 101 N. C., 651, where Chief Justice Smith discusses very fully the procedure in such cases, citing Ex parte Gotten, supra; Lord v. Meroney, 79 N. C., 14, and other cases. Hudson v. Coble, 97 N. C., 260, where the same Chief Justice again states the proper practice, citing Rogers v. Holt, 62 N. C., 108; Singletary v. Whitaker, ibid., 77; Ex parte Cotten, supra; Council v. Rivers, 65 N. C., 54, and he then says: “These cases assert the power of the court of equity; upon petition for the sale of land for the benefit of infants, to compel the purchaser by orders made in the cause to perform specifically his contract of purchase.” He further says: “The orderly mode of proceeding was for the court to accept the bid of Ooffield and Barnhill, by confirming the contract of sale, and then, upon the matter set out in the report, to enter a rule against them to show cause why they should not be required to comply with the terms of sale.” The court then proceeds to suggest, with reference to the correct procedure, that the purchasers may be decreed, (1) to specifically perform their contract; or (2) the land may be ordered to be sold and the purchaser released; or (3) without releasing the purchaser, such second sale may be directed, the purchasers undertaking, as a condition precedent to such order, to pay the additional costs and make good any deficiency produced thereby, citing Council v. Rivers, 65 N. C., 54. The Court, in Hudson v. Coble, supra, closes with this language: “The form of the present proceedings is essentially equitable, and must involve, when necessary to accomplish its purpose, the exercise of similar powers. It could never have been intended by the Legislature to confer the jurisdiction and leave the court without the means of making it effectual and complete. The application is in the Superior Court, the clerk exercises jurisdiction, and any question of law or fact may be referred to the judge or jury. There is no impediment suggested in the way of the exercise of all the functions pertinent to the case, and to a full and final determination.” 24 Cyc., 52 and 53.
But counsel for respondents, while conceding this to be the general rule here and elsewhere, contend that there was a final judgment in this case; and, therefore, the remedy ordinarily available by motion in the pending cause is not open to petitioners. The answer to the position is that even though the judgment was final, the allegations here are that the court was imposed upon, and important knowledge of the facts, as to the amount of the bid at the sale and as to certain transactions relating to it, were withheld from the court, and that it was deceived thereby, and induced to enter a judgment which it would not have rendered if it had possessed proper and requisite information of the facts and circumstances of the sale, which was wrongfully suppressed. Whether this is so or not must be ascertained by the court when an answer is filed, raising material issues. But until this is done, we must assume the facts to be as alleged in the .petition, there being no answer, but merely a motion to dismiss the proceeding, which requires us to consider the facts, as alleged, to be established, at least for the present, and for the purpose of deciding upon the motion. This being so, the case is brought directly within the principles stated in Roberts v. Pratt, 152 N. C., 731; Massie v. Hanie, 165 N. C., 174, and Moody v. Wike, 170 N. C., 731. It was held in Roberts v. Pratt, supra: “While it is very generally recognized that a final judgment can only be impeached for fraud by means of an independent action, this position does not necessarily prevail when a judgment has been procured by imposition on the court as to the rendition, or where it has been entered contrary to the course and practice of the court. In such case, relief may ordinarily be obtained by motion in the cause, and this procedure, as a rule, is proper and allowable in--all cases where courts of the common law would correct their judgments by writs of error coram nobis or coram vobisj and this is especially true under our present system, combining legal and equitable procedure in one and the same jurisdiction.” The question is fully discussed by Justice PLoTce in the Roberts case, supra, and in Massie v. Hanie, supra, and further consideration of it we deem to be unnecessary.
If the facts are, as set out in the petition, and upon the motion to dismiss, in the nature of a demurrer, we must so hold, the petitioners have proceeded properly, and are entitled to be heard, and to have the court ascertain the facts by some appropriate procedure, and pass upon the rights of the parties.
We can never lend our approval to a practice by which parties stipulate as to the distribution ■ of the proceeds of a judicial sale, affecting their own interests and for their own benefit, without the full knowledge and consent of the court. The facts must be disclosed in the report and submitted to the court, for its approval in proper cases. There are infants in this case whose rights may be seriously affected and prejudiced by such an agreement, and their interests must be protected. What was done in this particular matter may have been caused by ignorance of the law and of correct legal procedure, but the fact still remains that according to the allegations of the petitioners, the court was deprived of that knowledge of the transaction to which it was entitled, and that it acted, and passed the decree, because of it, or, at least, without being aware of the agreement between the parties, or of any of its terms.
It may be that the facts will appear to be quite different from those alleged by petitioners, but however this may be, they are entitled to relief, and to substantial relief if they are successful in establishing their case.
The judgment will be set aside and further proceedings had in the court below, as indicated.
Reversed.
|
Fordham University Press
Bestselling List
Greek: An Intensive Course by Hardy Hansen and Gerald Quinn
Autobiography of St. Ignatius Loyola by John C. Olin
Deconstruction in a Nutshell by John D. Caputo
Giving an Account of Oneself by Judith Butler
Love of Learning and Desire for God by Jean Leclercq, O.S.B.
Red Tail Captured, Red Tail Free by Alexander Jefferson
Under the Sidewalks of New York by Brian Cudahy
Byzantine Theology by John Meyendorff
Irish Brigade and Its Campaign by David P. Conyngham
An Aquinas Reader Edited by Mary T. Clark
The Street Book by Henry Moscow
The Search for Major Plagge by Michael Good
American Philosophy
Forms of Living
Edited by Stefanos Geroulanos, New York University, and Todd E. Meyers, Wayne State University
The Future of the Religious Past
Edited by Hent de Vries, The Johns Hopkins University and University of Amsterdam
International Humanitarian Affairs
Edited by Kevin M. Cahill, M.D., Fordham University
Just Ideas
The McGannon Center Everett C. Parker Book Series
Edited by Philip Napoli, Fordham University
Medieval Philosophy: Texts and Studies
Edited by Gyula Klima, Fordham University
Moral Philosophy and Moral Theology
Edited by Romanus Cessario, O.P, St. John's Seminary, and Joseph Koterski, S.J., Fordham University
The North's Civil War
Edited by Paul A. Cimbala, Fordham University
Orthodox Christianity and Contemporary Thought
Edited by George Demacopoulos and Aristotle Papanikolaou, (both Fordham University)
People and the Environment
Edited by Paolo Galizzi, Fordham University Law School
Associate Editor, Alena Herklotz, Fordham University Law School
Perspectives in Continental Philosophy
Edited by John D. Caputo, Villanova University and Syracuse University
Poets Out Loud
Edited by Elisabeth Frost, Fordham University
Reconstructing America
Edited by Paul A. Cimbala, Fordham University
World War II: The Global, Human, and Ethical Dimension
Edited by G. Kurt Piehler, University of Tennessee
The American Literatures Initiative
The Modern Language Initiative
|
All-Star Battle R/Diavolo
"I, Diavolo, am the Emperor! This fact remains unchanged! (「帝王」はこのディアボロだッ!! 依然変わりなくッ!)"
Gameplay
Dialogue
All-Star Battle Mode
All missions in starring Diavolo as either the Player or Enemy, in order of appearance.
Music
1.3.0
* "Reversal Assist"
* Decreased stocks from two to one.
1.4.0
* "This is the end!" skill
* Adjusted hitbox to fix issue of move not hitting when opponent was against a wall.
* Fixed bug where King Crimson would occasionally attack in the wrong direction.
|
vuln.yml with latest and stable Go version compatibility
Signed-off-by: nitinmewar<EMAIL_ADDRESS>What issue is this addressing?
Closes #2573
What type of issue is this addressing?
feature - get stable go versions for vuln.yml
@hajimehoshi .
https://github.com/hajimehoshi/ebiten/actions/runs/4199772403
The workflow is not valid. .github/workflows/vuln.yml (Line: 6, Col: 16): Unrecognized named-value: 'steps'. Located at position 1 within expression: steps.get_go_version.outputs.versions .github/workflows/vuln.yml (Line: 13, Col: 13): Unrecognized named-value: 'env'. Located at position 1 within expression: env.GO_VERSIONS
https://github.com/hajimehoshi/ebiten/actions/runs/4199772403
The workflow is not valid. .github/workflows/vuln.yml (Line: 6, Col: 16): Unrecognized named-value: 'steps'. Located at position 1 within expression: steps.get_go_version.outputs.versions .github/workflows/vuln.yml (Line: 13, Col: 13): Unrecognized named-value: 'env'. Located at position 1 within expression: env.GO_VERSIONS
is it because my get_go_versions.sh should be sourced first? or something else?
Still the same error.
is it because my get_go_versions.sh should be sourced first? or something else?
TBH I don't know. Please try it with your repository before updating this PR.
Let me close this.
|
All relevant data are within the paper and its Supporting Information files.
Obesity is widely recognized as a chronic disease associated with many serious health problems including type 2 diabetes, cardiovascular disease, hypertension and at least a dozen of cancers<EMAIL_ADDRESS><EMAIL_ADDRESS>In the past three decades, the prevalence of obesity and overweight has risen substantially and affects over 600 million people globally<EMAIL_ADDRESS>Due to the high prevalence of obesity and its associated health consequences, effective weight reduction and maintenance strategies are needed. Excessive weight gain is influenced by a range of factors including genetic predisposition, improper nutrition, individual behaviour, environmental and social factors<EMAIL_ADDRESS>The role of nutrients in diet, especially micronutrients in obesity has been long debated \[[<EMAIL_ADDRESS>Choline and betaine are quaternary ammonium compounds, which are obtained from diet or by de novo synthesis in tissues. Both of them are found in a wide variety of foods. Among the most concentrated sources of dietary choline are eggs, beef, pork, liver, seafood and milk, whereas betaine is mainly obtained from grains, cereal, beets and spinach \[[<EMAIL_ADDRESS>Choline is recognized as an essential nutrient and plays an important role in neurotransmitter synthesis, cell-membrane signaling, lipid transport in lipoproteins and methyl-group metabolism by serving as a precursor for acetylcholine, sphingolipid and phospholipids head groups, and the methyl donor betaine<EMAIL_ADDRESS><EMAIL_ADDRESS>Betaine serves as a compatible osmolyte and a methyl donor in many pathways, including the side-chain methylation of the homocysteine sulfhydryl to form methionine<EMAIL_ADDRESS>Growing evidence shows that choline and betaine are involved in the pathogenies of various diseases, including fatty liver<EMAIL_ADDRESS>cardiovascular diseases<EMAIL_ADDRESS>metabolic syndrome<EMAIL_ADDRESS>and various cancers<EMAIL_ADDRESS>The beneficial effect of choline and betaine on reducing body fat has been demonstrated in animals, including rats<EMAIL_ADDRESS>pigs<EMAIL_ADDRESS><EMAIL_ADDRESS>chickens<EMAIL_ADDRESS><EMAIL_ADDRESS>Choline and betaine are widely used as dietary additives to promote growth and to improve carcass characteristics (reducing percentage body fat and increasing relative lean mass) in livestock industry<EMAIL_ADDRESS><EMAIL_ADDRESS>However, studies on the effect of dietary choline and betaine intakes on body composition and furthermore on the development of obesity in humans are scarce, and the limited results are contradictory as well. A cross sectional study in examining Norwegian middle aged and elderly men and women showed that plasma betaine was inversely associated with body mass index (BMI), body fat percentage and waist circumference (WC), while plasma choline had the opposite effect<EMAIL_ADDRESS>Similarly, a recent study found that higher serum concentration of betaine rather than choline was associated with better profiles of body fat and fat distribution in Chinese adults<EMAIL_ADDRESS>Few studies have investigated the effect of betaine supplementation on body weight and body composition in small samples. A study consisting of 23 lean males reported that, 11 of whom received a 2.5 g/day betaine supplementary with simultaneous 6-week progressive resistance training program significantly improved their body composition by both increasing lean mass and reducing fat mass compared with placebo treatment subjects<EMAIL_ADDRESS>However, another study in 42 obese subjects with 12 weeks of 6 g/day betaine supplementation did not improve body composition<EMAIL_ADDRESS>Similarly, no change of body composition was found in a study involving 34 young males after 10 days of 2 g/day betaine supplementation<EMAIL_ADDRESS>To the best of our knowledge, there is no previous study examining the effects of dietary choline and betaine intakes on body composition in a large general population. Therefore, the current cross-sectional study was designed to investigate the association of dietary choline and betaine intakes with body composition in the general Newfoundland population after controlling for potential confounding factors such as age, sex, total calorie intake and physical activity level.
Materials and Methods {#sec007}
Study population {#sec008}
All participants were from the CODING (Complex Diseases in the Newfoundland population: Environment and Genetics) study \[[<EMAIL_ADDRESS>Eligibility of participants for the CODING study was based upon the following inclusion criteria: 1) ≥19 years of age; 2) at least a third generation Newfoundlander; and 3) without serious metabolic, cardiovascular, or endocrine diseases. A total of 3214 participants (2295 females and 919 males) were employed. Among them, 160 individuals were excluded for having incomplete data, including: 8 individuals missed weight and height, 38 individuals missed waist and hip circumference, 12 individuals missed the results of body scan, 156 individuals missed the results of Food Frequency Questionnaire (FFQ), and 69 individuals missed physical activity questionnaire. All participants provided written and informed consent and the study received ethics approval from the Health Research Ethics Authority (HREA), Memorial University, St. John's, Newfoundland, Canada, with Project Identification Code \#10.33 (latest date of approval: 21 January 2015).
Anthropometric and body composition measurements {#sec009}
Anthropometrics, body composition measurements were collected following a 12-hour fast. Trained personnel conducted the anthropometric measurements of each subject using standard procedures. Standing height was measured using a fixed stadiometer (to the nearest 0.1 cm). After urinating to empty their bladders, subjects wore standard hospital gowns for all weight measurements using a platform manual scale balance (Health O Meter, Bridgeview, IL; to the nearest 0.1 kg). BMI (kg/m^2^) was calculated as weight in kilograms divided by height squared in meters. WC was defined as the midway point between the iliac crest and the lower rib, and hip by the maximum circumference over the buttocks below the iliac crest. Waist-to-hip ratio (WHR) was division of WC by hip circumference.
Dual Energy X-Ray Absorptiometry (DXA; Lunar Prodigy; GE Medical Systems, Madison, WI) was used for the measurement of percent trunk fat (%TF), percent android fat (%AF), percent gynoid fat (%GF), total percent body fat (%BF) and total percent lean mass (%LM). The Lunar Prodigy software system determines automatically the regions. Trunk fat region is from the top of the shoulders to the top of the iliac crest, while the android fat region is the top of the second lumbar vertebra to the top of the iliac crest and the gynoid fat region extends down iliac crest twice the height of the android area. The enCORE (Ver 12.2, 2008, GE Medical Systems, Madison, WI) software package was used for DXA data acquisition. Quality assurance was performed on the DXA scanner daily and the typical CV during the study period was 1.3%<EMAIL_ADDRESS><EMAIL_ADDRESS>Lifestyle and dietary assessment {#sec010}
Information regarding lifestyles of participants was collected through a self-administered screening questionnaire. The questions were related to demographics (age and gender), disease status, smoking status, alcohol consumption, and medication use. A separate questionnaire was administered to women with relation to their menopausal status. Physical activity patterns were measured using the ARIC Baecke Questionnaire, which consists of a Work Index, Sports Index, and Leisure Time Activity Index<EMAIL_ADDRESS>Dietary intake of each participant was assessed using a 124 item semi-quantitative Willett FFQ<EMAIL_ADDRESS><EMAIL_ADDRESS>The Willett FFQ requires subjects reporting the number of weekly servings consumed of common food items over the past 12 months. NutriBase Clinical Nutrition Manager (version 8.2.0; Cybersoft Inc, Phoenix, AZ) software package was used to convert weekly intakes into mean daily intakes of calorie (kcal/day), choline and betaine (mg/day) for each individual<EMAIL_ADDRESS><EMAIL_ADDRESS>Dietary choline and betaine intakes per kilogram body weight (mg/kg/day) were calculated as daily intakes of choline and betaine (mg/day) divided by body weight in kilogram.
Data analysis {#sec011}
All data are presented as mean ± standard deviation (SD). To perform effective statistical analysis, total calorie intake, dietary choline, betaine intakes per person per day, and dietary choline, and betaine intakes per kilogram body weight per day were log-transformed to normalize the data distributions. Differences in anthropometrics, body composition measurements and dietary choline and betaine intakes between females and males were assessed with independent Student's *t* test.
Statistical interaction between dietary choline, betaine intakes and gender on the main outcomes was tested by analysis of covariance (ANCOVA). Partial correlation analysis controlling for age, total calorie intake, and physical activity level was used to evaluate the correlations of dietary choline, betaine intakes with weight, BMI, WC, WHR, %TF, %AF, %GF, %BF and %LM within female and male groups. To overcome the possible influence of smoking, medication use, drinking and menopausal status, participants were also divided into subgroups according to smoking status (yes or no), medication use (yes or no) and alcohol consumption (yes or no). Women were further divided into pre- or post-menopausal groups according to their menopausal status.
According to the criteria recommended by World Health Organization (WHO<EMAIL_ADDRESS>obesity status was categorized based on BMI into normal weight (18.5--24.9 kg/m^2^), overweight (25.0--29.9 kg/m^2^) and obese groups (≥30.0 kg/m^2^). As the number of underweight subjects (BMI\<18.5 kg/m^2^) was too small (n = 35, female/male = 33/2) to perform any effective statistical analysis, they were excluded from analyses. Obesity status was also categorized by percent body fat according to age and gender specific criteria recommended by Bray<EMAIL_ADDRESS>Subjects less than 20 years old were excluded due to unavailability of criteria for this age group by Bray criteria. Dietary choline, betaine intakes and body composition measurements were compared among adiposity groups by using ANCOVA controlling for age, total calorie intake and physical activity level. In order to further explore the relationship between dietary choline, betaine intakes and obesity phenotypes, participants were divided into tertiles (low, medium, or high) based upon dietary choline or betaine intakes expressed in mg/kg/day. Differences of obesity measurements, such as weight, BMI, WC, WHR, %TF, %AF, %GF, %BF and %LM among the three groups of choline or betaine intakes were assessed using ANCOVA controlling for age, total calorie intake and physical activity level.
All statistical analyses were performed using SPSS 20.0 (SPSS Inc., Chicago, IL). All tests were two sided and a p\<0.05 was considered to be statistically significant.
Physical parameters and dietary characteristics {#sec013}
Demographic, physical and dietary characteristics of the entire population and different gender groups are presented in [Table 1](#pone.0155403.t001){ref-type="table"}. Female subjects were on average 3.4 years older than male subjects. Weight, BMI, WC, WHR, %LM and physical activity were significantly higher in males than females (p\<0.001). %TF, %AF, %GF, and %BF were significantly lower in males as compared to females (p\<0.001). In terms of dietary intake, male participants consumed significantly higher daily calorie (kcal/day) and choline intake (mg/day) than females (p\<0.001), while there was no significant difference for daily betaine intake (mg/day) between different gender groups. When daily choline and betaine intakes were expressed in per kilogram body weight (mg/kg/day), female participants consumed significantly more betaine than males but there was no significant difference for choline intake.
::: {#pone.0155403.t001 .table-wrap}
###### Obesity indexes and dietary choline, betaine intakes by gender [^1^](#t001fn001){ref-type="table-fn"}.
Entire cohort Female Male *p*[^3^](#t001fn003){ref-type="table-fn"}
--------------------------- ---------------- ---------------- ----------------- -------------------------------------------
Age (year) 42.74±13.02 43.72±12.52 40.28±13.90 \<0.001
Weight (kg) 74.65±16.64 69.68±14.22 87.07±15.77 \<0.001
BMI (kg/m^2^) 26.79±5.08 26.36±5.15 27.86±4.72 \<0.001
WC (cm) 92.21±14.23 89.92±13.97 97.96±13.22 \<0.001
WHR 0.92±0.07 0.89±0.07 0.98±0.06 \<0.001
Trunk fat (%) 36.28±9.96 38.65±9.02 30.34±9.74 \<0.001
Android fat (%) 41.35±11.54 43.44±10.83 36.10±11.60 \<0.001
Gynoid fat (%) 40.03±10.08 44.57±6.73 28.63±7.85 \<0.001
Total body fat (%) 33.93±9.62 37.36±7.89 25.33±8.10 \<0.001
Total lean (%) 62.39±9.36 59.02±7.55 70.82±8.04 \<0.001
Calorie intake (kcal/day) 1985.08±905.30 1870.80±815.18 2295.39±1053.57 \<0.001
Physical activity 8.25±1.56 8.16±1.54 8.50±1.61 \<0.001
Choline (mg/day) 313.82±237.82 292.34±212.80 372.12±287.36 \<0.001
Choline (mg/kg/day) 4.39±3.50 4.37±3.48 4.45±3.57 0.660
Betaine (mg/day) 110.10±90.15 108.45±87.58 114.61±96.70 0.230
Betaine (mg/kg/day) 1.55±1.32 1.62±1.36 1.37±1.21 \<0.001
^*1*^All values are mean ± SDs. BMI, body mass index; WC, waist circumference; WHR, waist-to-hip rate.
^*2*^Sample size range in each study group.
^*3*^Significant differences between female and male groups, based on independence sample [*Student\'s t-test*](http://www.baidu.com/link?url=7vvNS9bE0p4C3xNhiR2C2XJpVuG1E6PRTbwAcQt5ut_08T_K_ROTKvknlovBkn77Q5pD8njwQlAjGMntgIU_R_), Statistical significance was set to p\<0.05.
Correlation between dietary choline, betaine intakes and obesity measurements {#sec014}
Significant interactions between dietary choline, betaine intakes and gender on weight, BMI, WC, WHR, %TF, %AF, %GF, %BF and LM% were found (p\<0.05 for all). The correlations between dietary choline, betaine intakes and weight, BMI, WC, WHR, %TF, %AF, %GF, %BF and %LM in different gender groups are presented in [Table 2](#pone.0155403.t002){ref-type="table"}. In both female and male subjects, dietary choline, betaine intakes (mg/kg/day) were negatively correlated with weight, BMI, WC, WHR, %TF, %AF, %GF, %BF and positively correlated with %LM. The correlations remained significant after adjusting for age, total calorie intake, and physical activity level. Dietary choline intake had the most pronounced correlation with body weight among all measures in females (r = -0.47, p\<0.001), while with %AF in males (r = -0.35, p\<0.001). However, the association between dietary betaine intake and BMI was the most pronounced in females (r = -0.25, p\<0.001), while TF% had the most prominent correlation with dietary betaine intake in males (r = -0.26, p\<0.001).
::: {#pone.0155403.t002 .table-wrap}
###### Correlations between dietary choline and betaine intakes (mg/kg/day) with body composition[^1^](#t002fn001){ref-type="table-fn"}.
-------------------- ----------------------------------------- ------------------------------------------ -------------------------------------------------- ----------------------------------------- ------------------------------------------ --------------------------------------------------
Choline intake Female (n = 2232) Male (n = 822)
(mg/kg/day) r[^2^](#t002fn002){ref-type="table-fn"} r'[^2^](#t002fn002){ref-type="table-fn"} *p* for r'[^3^](#t002fn003){ref-type="table-fn"} r[^2^](#t002fn002){ref-type="table-fn"} r'[^2^](#t002fn002){ref-type="table-fn"} *p* for r'[^3^](#t002fn003){ref-type="table-fn"}
Weight (kg) -0.35 -0.47 \<0.001 -0.31 -0.30 \<0.001
BMI (kg/m^2^) -0.34 -0.44 \<0.001 -0.36 -0.30 \<0.001
WC (cm) -0.36 -0.45 \<0.001 -0.42 -0.31 \<0.001
WHR -0.11 -0.14 \<0.001 -0.23 -0.13 \<0.001
Trunk fat (%) -0.35 -0.37 \<0.001 -0.46 -0.33 \<0.001
Android fat (%) -0.34 -0.37 \<0.001 -0.47 -0.35 \<0.001
Gynoid fat (%) -0.30 -0.31 \<0.001 -0.35 -0.29 \<0.001
Total body fat (%) -0.36 -0.38 \<0.001 -0.44 -0.33 \<0.001
Total lean (%) 0.36 0.38 \<0.001 0.44 0.33 \<0.001
Betaine intake Female (n = 2232) Male (n = 822)
(mg/kg/day) r[^2^](#t002fn002){ref-type="table-fn"} r'[^2^](#t002fn002){ref-type="table-fn"} *p* for r'[^3^](#t002fn003){ref-type="table-fn"} r[^2^](#t002fn002){ref-type="table-fn"} r'[^2^](#t002fn002){ref-type="table-fn"} *p* for r'[^3^](#t002fn003){ref-type="table-fn"}
Weight (kg) -0.23 -0.24 \<0.001 -0.24 -0.20 \<0.001
BMI (kg/m^2^) -0.24 -0.25 \<0.001 -0.28 -0.22 \<0.001
WC (cm) -0.24 -0.24 \<0.001 -0.29 -0.21 \<0.001
WHR -0.09 -0.09 \<0.001 -0.22 -0.17 \<0.001
Trunk fat (%) -0.26 -0.23 \<0.001 -0.35 -0.26 \<0.001
Android fat (%) -0.25 -0.23 \<0.001 -0.34 -0.25 \<0.001
Gynoid fat (%) -0.20 -0.16 \<0.001 -0.23 -0.15 \<0.001
Total body fat (%) -0.26 -0.23 \<0.001 -0.34 -0.24 \<0.001
Total lean (%) 0.26 0.22 \<0.001 0.34 0.25 \<0.001
-------------------- ----------------------------------------- ------------------------------------------ -------------------------------------------------- ----------------------------------------- ------------------------------------------ --------------------------------------------------
^*1*^Partial correlations between dietary choline, betaine (mg/kg/day) intakes and obesity related indexes were controlling for age, total calorie intake, physical activity level. BMI, body mass index; WC, waist circumference; WHR, waist-to-hip ratio.
^*2*^r: correlation coefficient; r': partial correlation coefficient.
^*3*^Statistical significance was set to p\<0.05.
Comparison of dietary choline and betaine intakes among different adiposity groups {#sec015}
Subjects were divided into three adiposity groups by gender: normal weight, overweight and obese groups according to BMI recommended by WHO and according to %BF by Bray criteria.
According to BMI, as shown in [Table 3](#pone.0155403.t003){ref-type="table"} and [S1 Fig](#pone.0155403.s001){ref-type="supplementary-material"}, weight, BMI, WC, WHR, %TF, %AF, %GF and %BF were significantly higher, while %LM was significantly lower in obese and overweight subjects than normal weight subjects (p\<0.001). Dietary choline and betaine intakes expressed in mg/kg/day were significantly lower as adiposity status increased. Compared to the normal weight female and male groups, dietary choline intake (mg/kg/day) was significantly lower by 21.4%, 35.8%, 27.6%, and 44.2% in female overweight, female obese, male overweight and male obese groups, respectively. In addition, dietary betaine intake (mg/kg/day) was similarly lower by 22.8%, 36.0%, 21.6%, and 46.6% in female overweight, female obese, male overweight and male obese groups, respectively, compared to normal weight female and male groups. However, there is no significant difference among the three groups when dietary choline and betaine intakes were expressed as mg/day.
::: {#pone.0155403.t003 .table-wrap}
###### Comparison of body composition and dietary choline, betaine intakes in different obesity status defined by BMI [^1^](#t003fn001){ref-type="table-fn"}.
Normal weight[^3^](#t003fn003){ref-type="table-fn"} Overweight[^3^](#t003fn003){ref-type="table-fn"} Obese[^3^](#t003fn003){ref-type="table-fn"} *p*[^4^](#t003fn004){ref-type="table-fn"}
-------- ---------------------------------------------- ----------------------------------------------------- -------------------------------------------------- --------------------------------------------- -------------------------------------------
Female Number[^2^](#t003fn002){ref-type="table-fn"} 1021 731 447
Age (year) 41.44±13.05 45.39±11.94 46.64±11.02 -[^5^](#t003fn005){ref-type="table-fn"}
Calorie intake (kcal/day) 1889.94±790.16 1830.36±753.61 1882.86±914.92 -[^5^](#t003fn005){ref-type="table-fn"}
Physical activity 8.51±1.55 8.05±1.44 7.55±1.43 -[^5^](#t003fn005){ref-type="table-fn"}
**Choline (mg/day)** 298.85±221.11 281.24±169.26 289.19 ±224.96 0.815
**Choline (mg/kg/day)** 5.05±3.87 3.97±2.46 3.24±2.41 \<0.001
Decline (To Normal weight) 21.4% 35.8%
**Betaine (mg/day)** 112.27±87.19 103.72±84.28 107.34±93.88 0.219
**Betaine (mg/kg/day)** 1.89±1.50 1.46±1.20 1.21±1.05 \<0.001
Decline (To Normal weight) 22.8% 36.0% \<0.001
Male Number[^2^](#t003fn002){ref-type="table-fn"} 241 357 222
Age (year) 35.71±15.25 42.07±13.53 43.86±11.71 -[^5^](#t003fn005){ref-type="table-fn"}
Calorie intake (kcal/day) 2512.09±1056.22 2212.11±920.05 2106.55±1038.91 -[^5^](#t003fn005){ref-type="table-fn"}
Physical activity 9.09±1.48 8.44±1.62 8.14±1.62 -[^5^](#t003fn005){ref-type="table-fn"}
**Choline (mg/day)** 422.85±326.87 358.08±267.35 341.49±268.27 0.818
**Choline (mg /kg/day)** 5.84±4.42 4.23±3.18 3.26±2.47 \<0.001
Decline (To Normal weight) 27.6% 44.2%
**Betaine (mg/day)** 126.48±97.24 117.12±103.36 97.26±82.29 0.135
**Betaine (mg/kg/day)** 1.76±1.37 1.38±1.32 0.94±0.81 \<0.001
Decline (To Normal weight) 21.6% 46.6%
^*1*^All values are mean ± SDs. BMI, body mass index; WC, waist circumference; WHR, waist-to-hip rate.
^*2*^Sample size of study group.
^*3*^The following subdivision is used as normal-weight (18.5--24.9 kg/m^2^), overweight (25.0--29.9 kg/m^2^), obese class (≥30.0 kg/m^2^) according to criteria of the WHO.
^*4*^Significant differences between intervention groups. Data were assessed with ANCOVA controlling for age, total caloric intake, physical activity level. Statistical significance was set to p\<0.05.
^*5*^As controlling factor, their differences were not analyzed.
When subjects were divided by %BF, as shown in [Table 4](#pone.0155403.t004){ref-type="table"} and [S1 Fig](#pone.0155403.s001){ref-type="supplementary-material"}, similar significant relationship was found among these three adiposity groups as seen in BMI groups. Compared to normal weight female and male groups, dietary choline intake (mg/kg/day) was significantly lower by 17.9%, 32.9%, 29.3%, and 38.6% in female overweight, female obese, male overweight and male obese groups, respectively. Correspondingly dietary betaine intake (mg/kg/day) was significantly lower by 13.3%, 33.0%, 29.7%, and 41.7% in female overweight, female obese, male overweight and male obese groups, respectively, compared to normal weight groups. Furthermore, betaine intake expressed as mg/day was also significantly lower with the increase of %BF in both female and male subjects (p\<0.05) but significant difference was not found for choline.
::: {#pone.0155403.t004 .table-wrap}
###### Composition of body composition and dietary choline, betaine intakes in different obesity status defined by BF%[^1^](#t004fn001){ref-type="table-fn"}.
Normal weight[^3^](#t004fn003){ref-type="table-fn"} Overweight[^3^](#t004fn003){ref-type="table-fn"} Obese[^3^](#t004fn003){ref-type="table-fn"} *p*[^4^](#t004fn004){ref-type="table-fn"}
-------- ---------------------------------------------- ----------------------------------------------------- -------------------------------------------------- --------------------------------------------- -------------------------------------------
Female Number[^2^](#t004fn002){ref-type="table-fn"} 669 634 797
Age (year) 42.75±12.72 46.09±11.21 45.09±11.54 -[^5^](#t004fn005){ref-type="table-fn"}
Calorie intake (kcal/day) 1896.10 ± 795.20 1788.57±727.19 1845.31±801.47 -[^5^](#t004fn005){ref-type="table-fn"}
Physical activity 8.63±1.52 8.05±1.42 7.63±1.37 -[^5^](#t004fn005){ref-type="table-fn"}
**Choline (mg/day)** 298.74±215.54 276.06±167.50 272.55 ±192.23 0.187
**Choline (mg /kg/day)** 5.04±3.98 4.14±2.47 3.38±2.25 \<0.001
Decline (To Normal weight) 17.9% 32.9%
**Betaine (mg/day)** 112.70 ± 83.91 108.40±84.14 101.03±87.19 0.018
**Betaine (mg /kg/day)** 1.88 ± 1.41 1.63±1.25 1.26±1.10 \<0.001
Decline (To Normal weight) 13.3% 33.0%
Male Number[^2^](#t004fn002){ref-type="table-fn"} 253 207 296
Age (year) 38.26 ± 14.75 45.32±12.63 41.13±11.10 -[^5^](#t004fn005){ref-type="table-fn"}
Calorie intake (kcal/day) 2472.08±1076.60 2060.74±809.53 2152.54±1018.52 -[^5^](#t004fn005){ref-type="table-fn"}
Physical activity 9.15±1.51 8.34±1.48 7.84±1.46 -[^5^](#t004fn005){ref-type="table-fn"}
**Choline (mg/day)** 417.63±328.69 322.11±183.07 322.57±225.43 0.134
**Choline (mg/kg/day)** 5.42±4.06 3.83±2.22 3.33±2.51 \<0.001
Decline (To Normal weight) 29.3% 38.6%
**Betaine (mg/day)** 133.88±107.55 104.36±78.83 98.94±86.13 0.025
**Betaine (mg/kg/day)** 1.75±1.42 1.23±0.90 1.02±0.90 \<0.001
Decline (To Normal weight) 29.7% 41.7%
^*1*^All values are mean ± SDs. BMI, body mass index; WC, waist circumference; WHR, waist-to-hip rate.
^*2*^Sample size of study group.
^*3*^Subgroups were created by percent of body fat according to the age and gender specific criteria recommended by Bray.
^*4*^Significant differences between intervention groups. Data were assessed with ANCOVA controlling for age, total calorie intake and physical activity level. Statistical significance was set to p\<0.05.
^*5*^As controlling factor, their differences were not analyzed.
Comparison of body composition in different dietary choline and betaine intakes groups {#sec016}
Subjects were divided into tertiles (low, medium, or high) according to dietary choline and betaine intakes (mg/kg/day). As shown in Tables [5](#pone.0155403.t005){ref-type="table"}, [6](#pone.0155403.t006){ref-type="table"} and [S2 Fig](#pone.0155403.s002){ref-type="supplementary-material"}, a significant 'dose-dependent' declining in weight, BMI, WC, WHR, %TF, %AF, %GF and %BF was found with the increase of dietary choline and betaine intakes in both females and males after controlling for age, total calorie intake, and physical activity. %LM presented a significantly 'dose dependent' increasing trend. Compared to low dietary choline intake group, female subjects of high dietary intake group had significantly lower weight, BMI, WC, WHR (-11.85 kg, -4.24 kg/m^2^, -11.79 cm, -0.02), and %TF, %AF, %GF, %BF(-7.59%, -8.89%, -4.65%, -6.75%) but higher %LM (6.30%). Male subjects of high dietary choline intake group had significantly lower weight (-11.19 kg), BMI (-3.87 kg/m^2^), WC (-12.82 cm), WHR (-0.03), %TF (-10.56%), %AF (-12.66%), %GF (-5.94%), %BF (-8.35%), but higher %LM (8.25%) compared with low choline intake group. While, the average differences of obesity measures between high and low dietary betaine intake (mg/kg/day) groups were -7.42 kg (weight), -2.77 kg/m^2^ (BMI), -7.31 cm (WC), -0.02 (WHR), -6.19% (%TF), -6.24% (%AF), -3.13 (%GF), -4.55% (%BF), 4.00% (%LM) in females, and -8.60 kg (weight), -3.01 kg/m^2^ (BMI), -8.81 cm (WC), -0.03 (WHR), -7.77% (%TF), -8.92% (%AF), -4.19% (%GF), -6.19% (%BF), 6.19 (%LM) in males.
::: {#pone.0155403.t005 .table-wrap}
###### Comparison of obesity indexes according to dietary choline (mg/kg/day) intake[^1^](#t005fn001){ref-type="table-fn"}.
Choline (mg/kg/day) Low[^2^](#t005fn002){ref-type="table-fn"} Medium[^2^](#t005fn002){ref-type="table-fn"} High[^2^](#t005fn002){ref-type="table-fn"} *p*[^3^](#t005fn003){ref-type="table-fn"}
-------- --------------------------- ------------------------------------------- ---------------------------------------------- -------------------------------------------- -------------------------------------------
Female Number 744 744 744
Age (year) 44.56±11.48 44.37±11.95 42.16±13.77 -[^4^](#t005fn004){ref-type="table-fn"}
Weight (kg) 75.95±16.39 68.93±12.30 64.10±10.58 \<0.001
BMI (kg/m^2^) 28.59±5.74 26.15±4.67 24.35±4.02 \<0.001
WC (cm) 96.03±15.02 89.49±12.80 84.24±11.31 \<0.001
WHR 0.90±0.07 0.89±0.07 0.88±0.06 \<0.001
Trunk fat (%) 42.31±7.94 38.89±8.32 34.72±9.10 \<0.001
Android fat (%) 47.72±9.38 43.79±10.00 38.83±11.14 \<0.001
Gynoid fat (%) 46.67±6.37 45.01±6.30 42.02±6.69 \<0.001
Total body fat (%) 40.59±7.08 37.61±7.17 33.84±7.87 \<0.001
Total lean (%) 56.00±6.72 58.76±6.89 62.30±7.66 \<0.001
Calorie intake (kcal/day) 1346.45±476.78 1826.96±538.96 2435.87±935.54 -[^4^](#t005fn004){ref-type="table-fn"}
Physical activity 7.77±1.46 8.07±1.46 8.64±1.56 -[^4^](#t005fn004){ref-type="table-fn"}
Choline (mg/day) 162.82±50.16 251.21±50.02 463.21±288.89 \<0.001
Choline (mg/kg/day) 2.17±0.55 3.66±0.44 7.30±4.69 \<0.001
(0.36\~2.94) (2.95\~4.51) (4.52\~51.27)
Betaine (mg/day) 68.70±59.41 107.95±75.97 148.46±102.77 \<0.001
Betaine (mg/kg/day) 0.92±0.75 1.579±1.06 2.35±1.67 \<0.001
Male Number 274 274 274
Age (year) 45.11±12.61 41.66±12.90 34.81±14.42 -[^4^](#t005fn004){ref-type="table-fn"}
Weight (kg) 92.07±16.42 86.87±14.56 80.88±13.30 \<0.001
BMI (kg/m^2^) 29.66±4.89 27.71±4.28 25.79±3.73 \<0.001
WC (cm) 103.49±12.50 97.84±11.65 90.67±11.53 \<0.001
WHR 0.99±0.05 0.98±0.05 0.96±0.06 0.002
Trunk fat (%) 34.99±7.34 30.80±8.14 24.43±10.31 \<0.001
Android fat (%) 41.81±8.60 36.38±9.64 29.15±12.60 \<0.001
Gynoid fat (%) 31.32±7.14 28.48±6.73 25.38±8.35 \<0.001
Total body fat (%) 29.07±6.67 25.38±6.72 20.72±8.30 \<0.001
Total lean (%) 67.11±7.20 70.74±6.43 75.36±8.12 \<0.001
Calorie intake (kcal/day) 1606.82±553.64 2170.41±616.33 3117.72±1.22 -[^4^](#t005fn004){ref-type="table-fn"}
Physical activity 7.90±1.50 8.54±1.44 9.20±1.68 -[^4^](#t005fn004){ref-type="table-fn"}
Choline (mg/day) 185.84±54.77 308.54±64.53 622.54±374.07 \<0.001
Choline (mg/kg/day) 2.04±0.53 3.56±0.48 7.73±4.51 \<0.001
(0.51\~2.77) (2.77\~4.49) (4.49\~35.90)
Betaine (mg/day) 73.98±63.15 110.24±73.23 160.29±122.86 \<0.001
Betaine (mg/kg/day) 0.82±0.72 1.29±0.87 2.01±1.56 \<0.001
^*1*^All values are mean ± SDs. BMI, body mass index; WC, waist circumference; WHR, waist-to-hip ratio.
^*2*^The subjects were divided to low, medium and high choline intake groups based on mg/kg/day.
^*3*^Significant differences between intervention groups. Data were assessed with ANCOVA controlling for age, total caloric intake, physical activity level. Statistical significance was set to p\<0.05.
^*4*^As controlling factor, their differences were not analyzed.
::: {#pone.0155403.t006 .table-wrap}
###### Comparison of obesity indexes according to dietary betaine (mg/kg/day) intake[^1^](#t006fn001){ref-type="table-fn"}.
Betaine (mg/kg/day) Low[^2^](#t006fn002){ref-type="table-fn"} Medium[^2^](#t006fn002){ref-type="table-fn"} High[^2^](#t006fn002){ref-type="table-fn"} *p*[^3^](#t006fn003){ref-type="table-fn"}
-------- --------------------------- ------------------------------------------- ---------------------------------------------- -------------------------------------------- -------------------------------------------
Female Number 744 744 744
Age (year) 44.10±11.75 43.36±12.60 43.61±13.04 -[^4^](#t006fn004){ref-type="table-fn"}
Weight (kg) 73.78±15.76 68.72±13.29 66.36±11.92 \<0.001
BMI (kg/m^2^) 27.91±5.56 25.97±4.88 25.14±4.53 \<0.001
WC (cm) 94.08±14.86 88.78±13.28 86.77±12.52 \<0.001
WHR 0.90±0.07 0.89±0.07 0.88±0.06 0.004
Trunk fat (%) 41.47±8.16 38.14±8.84 36.28±9.24 \<0.001
Android fat (%) 46.90 ± 9.59 42.72±10.70 40.66±11.14 \<0.001
Gynoid fat (%) 46.28±6.25 44.24±6.62 43.15±6.92 \<0.001
Total body fat (%) 39.83±7.21 36.91±7.67 35.28±8.06 \<0.001
Total lean (%) 56.80±6.79 59.42±7.29 60.80±7.66 \<0.001
Calorie intake (kcal/day) 1558.28±714.21 1871.16±815.45 2189.17±789.94 -[^4^](#t006fn004){ref-type="table-fn"}
Physical activity 7.85±1.54 8.17±1.47 8.67±l.53 -[^4^](#t006fn004){ref-type="table-fn"}
Choline (mg/d) 230.22±177.08 294.10±221.97 353.87±218.41 \<0.001
Choline (mg/kg/day) 3.27±2.99 4.38±3.32 5.49±3.73 \<0.001
Betaine (mg/d) 37.13±18.49 86.93±23.64 201.37±89.07 \<0.001
Betaine (mg/kg/day) 0.51±0.23 1.27±0.25 3.08±1.39 \<0.001
(0.03\~0.88) (0.89\~1.77) (1.78\~12.73).
Male Number 274 274 274
Age (year) 43.15±13.40 39.47±13.76 39.02±14.49 -[^4^](#t006fn004){ref-type="table-fn"}
Weight (kg) 90.95±17.09 86.61±14.34 82.35±13.71 \<0.001
BMI (kg/m^2^) 29.19±4.89 27.82±4.36 26.18±4.05 \<0.001
WC (cm) 101.54±13.45 97.78±11.71 92.73±12.32 \<0.001
WHR 0.99±0.06 0.98±0.05 0.96±0.06 \<0.001
Trunk fat (%) 33.51±8.82 31.08±8.11 25.74±10.40 \<0.001
Android fat (%) 39.69±10.28 36.98±9,81 30.77±12.76 \<0.001
Gynoid fat (%) 29.98±7.58 29.48±6.79 25.79±8.32 \<0.001
Total body fat (%) 27.79±7.72 25.86±6.78 21.60±8.32 \<0.001
Total lean (%) 68.30±8.15 70.36±6.50 74.49±8.06 \<0.001
Calorie intake (kcal/day) 1867.65±860.72 2242.66±925.86 2724.76±1.03 -[^4^](#t006fn004){ref-type="table-fn"}
Physical activity 8.17±1.61 8.39±1.54 9.05±1.60 -[^4^](#t006fn004){ref-type="table-fn"}
Choline (mg/day) 282.73±218.72 352.91±234.20 466.45±324.37 \<0.001
Choline (mg/kg/day) 3.19±2.45 4.15±2.79 5.77±4.10 \<0.001
Betaine (mg/day) 38.74±19.13 88.10±20.28 217.06±101.67 \<0.001
Betaine (mg/kg/day) 0.43±0.19 1.02±0.19 2.67±1.28 \<0.001
(0.03\~0.73) (0.74\~1.43) (1.44\~10.99)
^*1*^All values are mean ± SDs. BMI, body mass index; WC, waist circumference; WHR, waist-to-hip ratio.
^*2*^The subjects were divided to low, medium and high choline intake groups based on mg/kg/day.
^*3*^Significant differences between intervention groups. Data were assessed with ANCOVA controlling for age, total caloric intake, physical activity level. Statistical significance was set to p\<0.05.
^*4*^As controlling factor, their differences were not analyzed.
To the best of our knowledge, this is the first large cross-sectional study specifically designed to investigate the association between dietary choline, betaine intakes and DXA-derived body composition. We found significant associations of higher dietary choline and betaine intakes with better body composition profile (lower %BF, higher %LM). Furthermore, the inverse correlation of dietary choline intake with obesity measures was stronger than that of betaine.
Association study is relatively easy to do but hard to do well, especially in large population based study. The first challenge is the accurate measurement of physiological and biological markers because sophisticated equipment is required, and long period of time is needed to recruit large number of subjects. In the present study, body composition in all subjects was measured using the same DXA system by certified technicians over 12 years. DXA produces accurate measurement of adipose tissue in the body with a low margin of error and is considered to be one of the most reliable measurements of adiposity<EMAIL_ADDRESS>The second challenge lies in the identification and measurements of numerous confounding factors that can potentially affect the relationship of the major factors under investigation. In most studies, unfortunately, information on these confounding factors is largely unavailable<EMAIL_ADDRESS><EMAIL_ADDRESS>There is no doubt that age is a primary important factor that affects the development of obesity<EMAIL_ADDRESS>Total dietary calorie intake is a critical factor in maintaining energy balance<EMAIL_ADDRESS>In addition, physical activity level is likely the most important non-dietary factor that can influence energy consumed, amount of choline and betaine intakes and ultimately body composition<EMAIL_ADDRESS><EMAIL_ADDRESS>In the present study, all of these confounding factors have been properly adjusted. The beneficial effect of dietary choline and betaine intakes on obesity was demonstrated in every obesity measurement in both women and men independent of these factors. Other confounding factors, menopause, smoking, medication and alcohol consumption were taken into consideration as well. Menopause is an important factor related to changes in body composition as menopause is usually accompanied by dramatic changes in sex hormones that can predispose women to weight gain<EMAIL_ADDRESS>We found that the associations between dietary choline, betaine intakes and body composition are equally profound in both pre- and post-menopausal women ([S1 Table](#pone.0155403.s003){ref-type="supplementary-material"}). Smoking status, medication use and alcohol consumption are potentially important covariates known to affect appetite and body weight regulation \[[<EMAIL_ADDRESS>After separating subjects according to these covariates, the beneficial association remained significant ([S2](#pone.0155403.s004){ref-type="supplementary-material"}--[S4](#pone.0155403.s006){ref-type="supplementary-material"} Tables).
We used the unit of mg/kg/day to express choline and betaine intakes in all analyses because dietary intake of both is highly correlated with body weight. It would be physiologically inappropriate not to account for body mass when comparing dietary intake among subjects with large difference of body weight. Physiological dynamics of nutritive intake is in many ways similar to that of pharmacodynamics where in the case of choline and betaine, the same dose may be adequate for a person with 60 kg body weight, but insufficient for a person with a body weight of 100 kg or more. The use of mg/kg/day in the present study eliminates the bias of body weight variation in the population and reveals the true relationship between dietary choline, betaine intakes and body composition. Otherwise, we also analyzed the data for mg/day and the negative associations were also significant but not strong ([S5 Table](#pone.0155403.s007){ref-type="supplementary-material"}). Furthermore, same findings were obtained when obesity status was classified according to either BMI or %BF by Bray criteria. Obese subjects had the lowest dietary choline and betaine intakes. Vice versa, subjects with the highest dietary choline or betaine intakes had the lowest obesity measurements. And the associations were stronger with dietary choline than dietary betaine. Moreover, the associations seem different among fat distribution. The associations were stronger between dietary choline and betaine intakes with %TF, %AF than %GF. Similar findings were reported on the association of serum rather than dietary betaine with body fat percentage and fat distribution<EMAIL_ADDRESS><EMAIL_ADDRESS>However, an opposite relationship between plasma choline and obesity measurements was reported<EMAIL_ADDRESS>while chen *et al* found a negative association between serum choline and body weight and BMI<EMAIL_ADDRESS>The relationship between dietary intakes and serum levels of choline and betaine is not clear. A small study consisting of children with autism reported a positive correlation between dietary intakes and plasma levels of the nutrients<EMAIL_ADDRESS>It is reported that the serum choline level is lower than betaine, although dietary choline intake is higher than betaine in the general populations<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>This difference between dietary intakes and serum levels highlights the importance to perform independent studies and suggesting that relationship between dietary choline and betaine with obesity might differ from that with serum levels.
To date, a few small interventional studies have examined the effect of betaine supplementation on body fat but no study is available on the effect of choline supplementation in humans. A significant decrease in fat mass and percent body fat was observed among 11 male participants received a periodical training program<EMAIL_ADDRESS>However, the positive effect may have been due to the greater physical activity levels of participants. Two other studies failed to replicate the results<EMAIL_ADDRESS><EMAIL_ADDRESS>Animal studies have provided the main evidence of the beneficial effect of dietary choline and betaine on body fat and muscle. Choline or betaine supplementation on the growth performance and carcass characteristics of gilts, other pigs, meat ducks, chickens and mice were well examined \[[<EMAIL_ADDRESS>These studies have generally indicated that choline and betaine supplementation can promote growth and reduce fat deposition in various animals. Our findings have filled the knowledge gap of the relationship between dietary choline, betaine intakes and body composition in humans. The effect of dietary choline might be more complex. Jacobs *et al* found that a choline-deficient diet decreased fat mass in mice with high fat diet or genetic defect induced obesity<EMAIL_ADDRESS><EMAIL_ADDRESS>Another study showed that high fat feeding led to weight gain in choline-replete mice, whereas choline deficiency did not affect body or adipose depot weights<EMAIL_ADDRESS>However, these animal experiments were performed under extreme condition: choline depletion which virtually does not exist in general human population.
The exact mechanisms by which choline and betaine improve body composition are unclear, while several mechanisms have been suggested. It has been postulated that choline and betaine supplementation could promote fatty acid β-oxidation in pigs and humans by enhancing muscle carnitine accretion and thereby increase carnitine palmitoyl transferase I-mediated free fat acid translocation into the mitochondria \[[<EMAIL_ADDRESS>Choline can also be metabolized to betaine and plays a role in altering body composition. The betaine-related methylation of homocysteine to methionine may reduce the availability of substrate (acetyl-coenzyme A) for fatty acid synthesis<EMAIL_ADDRESS>Betaine supplementation could decrease the capacity for fatty acid and triglyceride synthesis by decreasing the activity of acetyl-CoA carboxylase, fatty acid synthase and malic enzyme and their mRNA expression in abdominal adipose tissue<EMAIL_ADDRESS><EMAIL_ADDRESS>Betaine may also reduce uptake of triglycerides from circulating lipoproteins by decreasing the mRNA expression of lipoprotein lipase<EMAIL_ADDRESS>Dietary betaine in pigs mobilized fat degradation in adipose tissue by increasing hormone sensitive lipase activity<EMAIL_ADDRESS>Betaine supplementation may promote protein synthesis by stimulating growth hormone secretion and improving insulin and IGF-1 receptor signaling \[[<EMAIL_ADDRESS>Accumulation of betaine in cells resulting in increased sarcoplasmic osmolality may also contribute to the increase in muscle mass<EMAIL_ADDRESS><EMAIL_ADDRESS>Although our study provides clear evidence on association of increased dietary choline and betaine intakes with favorable body composition, a number of limitations of the work should be considered. Our use of FFQ to evaluate patterns of dietary intake raises the possibility of recall bias by subjects<EMAIL_ADDRESS>However, FFQ is the most widely used questionnaire for the assessment of dietary intake at the population level and has been successfully validated and used in a Canadian populations \[[<EMAIL_ADDRESS>including in the Newfoundland population<EMAIL_ADDRESS>Thus, we consider the Willett FFQ to be a reasonable method for the assessment of dietary intake patterns in this study. Another potential weakness in the present study is related to its cross-sectional design. Cross sectional study alone does not establish a cause effect relationship. Direct intervention studies or clinical trials with reasonable sample size and well matched subjects between treatment and control groups are warranted. Finally, although multiple factors, including socio-demographic characteristics, lifestyle habits, physical activities and energy intake were comprehensively adjusted in our analysis, genetic factors, dietary nutrient factors absorbed when consuming choline or betaine-rich foods and unknown or poorly measured factors could not be completely ruled out.
In conclusion, the present study provides solid evidence for the first time, in the large Newfoundland population, that higher dietary choline and betaine intakes were associated with a more favorable body composition (lower body fat and higher lean body mass) in both women and men. In addition, this favorable association was independent of age, gender, total calorie intake, physical activity level, menopausal status, smoking status, medication use, and alcohol consumption. The beneficial correlation for choline seems better than betaine.
Supporting Information {#sec019}
###### Variations of dietary choline, betaine intakes (mg/kg/day) in different obesity status.
A. variations of dietary choline intake (mg/kg/day) in different obesity status grouped based on BMI criteria; B. variations of dietary betaine intake (mg/kg/day) in different obesity status grouped based on BMI criteria; C. variations of dietary choline intake (mg/kg/day) in different obesity status grouped based on %BF recommended by Bray; D. variations of dietary betaine intake (mg/kg/day) in different obesity status grouped based on %BF recommended by Bray; \*\*p\<0.01 compared with normal weight group, \#\#p\<0.01 compared with overweight group.
Click here for additional data file.
###### Variations of total percent body fat and lean mass among subjects with low, medium and high dietary choline and betaine intakes (mg/kg/day).
A. variations of total body fat according to dietary choline intake; B. variations of total lean mass according to dietary choline intake; C. variations of total body fat according to dietary betaine intake; D. variations of total lean mass according to dietary betaine intake. \*\*p\<0.01 compared with low dietary choline or betaine intakes; \#\#p\< 0.01 compared with medium dietary choline or betaine intakes.
Click here for additional data file.
###### Partial correlations between dietary choline, betaine intakes (mg/kg/day) and body composition variables in females based on menopausal status.
Click here for additional data file.
###### Partial correlations between dietary choline, betaine intakes (mg/kg/day) and body composition variables for Newfoundland population based on medication use.
Click here for additional data file.
###### Partial correlations between dietary choline, betaine intakes (mg/kg/day) and body composition variables for Newfoundland population based on smoking status.
Click here for additional data file.
###### Partial correlations between dietary choline, betaine intakes (mg/kg/day) and body composition variables for Newfoundland population based on alcohol status.
Click here for additional data file.
###### Correlations between dietary choline and betaine intakes (mg/day) with body composition.
Click here for additional data file.
We would like to thank all of the volunteers who participated in this present study. We also wish to thank Hongwei Zhang and our research collaborators.
[^1]: **Competing Interests:**The authors have declared that no competing interests exist.
[^2]: Conceived and designed the experiments: GS XG. Performed the experiments: XG. Analyzed the data: XG. Contributed reagents/materials/analysis tools: XG YW YY. Wrote the paper: XG YW ER PP WG GS.
|
#!/bin/sh
#
# QEMU build script for Eclipser's instrumentation
#
# Modified codes from AFL's QEMU mode (original license below).
# --------------------------------------
#
# Written by Andrew Griffiths <[email protected]> and
# Michal Zalewski <[email protected]>
#
# Copyright 2015, 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
QEMU_URL="https://download.qemu.org/qemu-2.3.0.tar.bz2"
QEMU_SHA384="7a0f0c900f7e2048463cc32ff3e904965ab466c8428847400a0f2dcfe458108a68012c4fddb2a7e7c822b4fd1a49639b"
echo "========================================="
echo "Chatkey instrumentation QEMU build script"
echo "========================================="
echo
echo "[*] Performing basic sanity checks..."
if [ ! "`uname -s`" = "Linux" ]; then
echo "[-] Error: QEMU instrumentation is supported only on Linux."
exit 1
fi
if [ ! -f "patches-pathcov/chatkey.cc" -o ! -f "patches-syscall/chatkey.c" -o ! -f "patches-feedback/chatkey.c" ]; then
echo "[-] Error: key files not found - wrong working directory?"
exit 1
fi
for i in libtool wget python automake autoconf sha384sum bison iconv; do
T=`which "$i" 2>/dev/null`
if [ "$T" = "" ]; then
echo "[-] Error: '$i' not found, please install first."
exit 1
fi
done
if [ ! -d "/usr/include/glib-2.0/" -a ! -d "/usr/local/include/glib-2.0/" ]; then
echo "[-] Error: devel version of 'glib2' not found, please install first."
exit 1
fi
echo "[+] All checks passed!"
ARCHIVE="`basename -- "$QEMU_URL"`"
CKSUM=`sha384sum -- "$ARCHIVE" 2>/dev/null | cut -d' ' -f1`
if [ ! "$CKSUM" = "$QEMU_SHA384" ]; then
echo "[*] Downloading QEMU 2.3.0 from the web..."
rm -f "$ARCHIVE"
wget -O "$ARCHIVE" -- "$QEMU_URL" || exit 1
CKSUM=`sha384sum -- "$ARCHIVE" 2>/dev/null | cut -d' ' -f1`
fi
if [ "$CKSUM" = "$QEMU_SHA384" ]; then
echo "[+] Cryptographic signature on $ARCHIVE checks out."
else
echo "[-] Error: signature mismatch on $ARCHIVE (perhaps download error?)."
exit 1
fi
echo "[*] Uncompressing archive (this will take a while)..."
rm -rf "qemu-2.3.0" || exit 1
rm -rf "qemu-2.3.0-pathcov" || exit 1
rm -rf "qemu-2.3.0-syscall" || exit 1
rm -rf "qemu-2.3.0-feedback" || exit 1
rm -rf "qemu-2.3.0-bbcount" || exit 1
rm -rf "qemu-2.3.0-pathcov-x86" || exit 1
rm -rf "qemu-2.3.0-pathcov-x64" || exit 1
rm -rf "qemu-2.3.0-syscall-x86" || exit 1
rm -rf "qemu-2.3.0-syscall-x64" || exit 1
rm -rf "qemu-2.3.0-feedback-x86" || exit 1
rm -rf "qemu-2.3.0-feedback-x64" || exit 1
rm -rf "qemu-2.3.0-bbcount-x86" || exit 1
rm -rf "qemu-2.3.0-bbcount-x64" || exit 1
tar xf "$ARCHIVE" || exit 1
echo "[+] Unpacking successful."
echo "[*] Backup target files of patches-common/ (for later use)"
cp qemu-2.3.0/linux-user/elfload.c qemu-2.3.0/linux-user/elfload.c.orig
cp qemu-2.3.0/linux-user/linuxload.c qemu-2.3.0/linux-user/linuxload.c.orig
cp qemu-2.3.0/linux-user/signal.c qemu-2.3.0/linux-user/signal.c.orig
cp qemu-2.3.0/translate-all.c qemu-2.3.0/translate-all.c.orig
cp qemu-2.3.0/scripts/texi2pod.pl qemu-2.3.0/scripts/texi2pod.pl.orig
cp qemu-2.3.0/user-exec.c qemu-2.3.0/user-exec.c.orig
cp qemu-2.3.0/configure qemu-2.3.0/configure.orig
cp qemu-2.3.0/include/sysemu/os-posix.h qemu-2.3.0/include/sysemu/os-posix.h.orig
echo "[*] Applying common patches..."
patch -p0 <patches-common/elfload.diff || exit 1
patch -p0 <patches-common/linuxload.diff || exit 1
patch -p0 <patches-common/signal.diff || exit 1
patch -p0 <patches-common/translate-all.diff || exit 1
patch -p0 <patches-common/texi2pod.diff || exit 1
patch -p0 <patches-common/user-exec.diff || exit 1
patch -p0 <patches-common/os-posix.diff || exit 1
patch -p0 <patches-common/configure.diff || exit 1
cp -r "qemu-2.3.0" "qemu-2.3.0-pathcov"
cp -r "qemu-2.3.0" "qemu-2.3.0-syscall"
cp -r "qemu-2.3.0" "qemu-2.3.0-feedback"
cp -r "qemu-2.3.0" "qemu-2.3.0-bbcount"
### Patch for pathcov tracer
echo "[*] Applying patches for pathcov..."
patch -p0 <patches-pathcov/syscall.diff || exit 1
patch -p0 <patches-pathcov/cpu-exec.diff || exit 1
patch -p0 <patches-pathcov/exec-all.diff || exit 1
patch -p0 <patches-pathcov/translate.diff || exit 1
patch -p0 <patches-pathcov/makefile-target.diff || exit 1
cp patches-pathcov/chatkey.cc qemu-2.3.0-pathcov/
cp patches-pathcov/afl-qemu-cpu-inl.h qemu-2.3.0-pathcov/
cp patches-pathcov/chatkey-utils.h qemu-2.3.0-pathcov/
echo "[+] Patching done."
### Patch for syscall tracer
echo "[*] Applying patches for syscall..."
patch -p0 <patches-syscall/cpu-exec.diff || exit 1
patch -p0 <patches-syscall/syscall.diff || exit 1
patch -p0 <patches-syscall/makefile-objs.diff || exit 1
cp patches-syscall/chatkey.c qemu-2.3.0-syscall/linux-user/
echo "[+] Patching done."
### Patch for feedback tracer
echo "[*] Applying patches for feedback..."
patch -p0 <patches-feedback/cpu-exec.diff || exit 1
patch -p0 <patches-feedback/syscall.diff || exit 1
patch -p0 <patches-feedback/makefile-target.diff || exit 1
patch -p0 <patches-feedback/translate.diff || exit 1
patch -p0 <patches-feedback/tcg-target.diff || exit 1
patch -p0 <patches-feedback/tcg-op.diff || exit 1
patch -p0 <patches-feedback/tcg-opc.diff || exit 1
patch -p0 <patches-feedback/tcg.diff || exit 1
patch -p0 <patches-feedback/optimize.diff || exit 1
cp patches-feedback/chatkey.c qemu-2.3.0-feedback/tcg/
cp patches-feedback/afl-qemu-cpu-inl.h qemu-2.3.0-feedback/
echo "[+] Patching done."
### Patch for basic block count tracer
echo "[*] Applying patches for bbcount..."
patch -p0 <patches-bbcount/syscall.diff || exit 1
patch -p0 <patches-bbcount/cpu-exec.diff || exit 1
patch -p0 <patches-bbcount/makefile-target.diff || exit 1
patch -p0 <patches-bbcount/makefile-objs.diff || exit 1
patch -p0 <patches-bbcount/main.diff || exit 1
cp patches-bbcount/chatkey.cc qemu-2.3.0-bbcount/linux-user/
echo "[+] Patching done."
### Copy directories, one for x86 and the other for x64
cp -r "qemu-2.3.0-pathcov" "qemu-2.3.0-pathcov-x86"
mv "qemu-2.3.0-pathcov" "qemu-2.3.0-pathcov-x64"
cp -r "qemu-2.3.0-syscall" "qemu-2.3.0-syscall-x86"
mv "qemu-2.3.0-syscall" "qemu-2.3.0-syscall-x64"
cp -r "qemu-2.3.0-feedback" "qemu-2.3.0-feedback-x86"
mv "qemu-2.3.0-feedback" "qemu-2.3.0-feedback-x64"
cp -r "qemu-2.3.0-bbcount" "qemu-2.3.0-bbcount-x86"
mv "qemu-2.3.0-bbcount" "qemu-2.3.0-bbcount-x64"
|
Semiconductor device and a method of manufacturing a semiconductor device
ABSTRACT
This disclosure relates to a semiconductor device including a device with high clamping voltage (HVC device), and an OTS device. Such a semiconductor device provides very advantageous ESD protection. The semiconductor device can be realized in two ways: an OTS device and a device with high clamping voltage can be realized as discrete, independent devices that are combined in one semiconductor package, or an OTS device can be integrated into interconnect layers of a device with high clamping voltage by integration.
CROSS-REFERENCE TO RELATED APPLICATIONS
This application claims the benefit under 35 U.S.C. § 119(a) of European Application No. 21218429.5 filed Dec. 31, 2021, the contents of whichare incorporated by reference herein in their entirety.
BACKGROUND 1. Field of the Disclosure
The present disclosure relates to a semiconductor device. The disclosure also relates to a method of manufacturing a semiconductor device.
2. Description of the Related Art
A semiconductor device known in the art is shown in FIGS. 1 a, 1 b and 1c .
In FIG 1 a , a semiconductor integrated circuit device is illustrated,wherein the semiconductor integrated circuit device has an electrostatic discharge (ESD) protection circuit.
The semiconductor integrated circuit device 100 includes a data pad I/O,a first ESD protecting circuit 110, a second ESD protecting circuit 120,and an internal circuit 200.
The data pad I/O is an interface that is used to input data from an external device to the internal circuit 200 and/or output data from the internal circuit 200 to the external device.
The first ESD protecting circuit 110 and the second ESD protecting circuit 120 are arranged between the data pad I/O and the internal circuit 200 so to protect the internal circuit 200 from an ESD surge that may flow through the data pad I/O coupled to terminals of a power voltage and a ground voltage.
The first ESD protecting circuit 110 is connected between the data padI/O and a power voltage line VDD connected to a power voltage pad P1.The second ESD protecting circuit 120 is connected between the first ESD protecting circuit 110 and a ground voltage line VSS connected to aground voltage pad P2. As shown in FIG. 1 a , a node A may be a connection node that connects the data pad I/O, the first ESD protecting circuit 110, and the second ESD protecting circuit 120 to each other.
The first ESD protecting circuit 110 includes at a resistance changeable device. The resistance changeable device is an ovonic threshold switch(OTS) device. As shown in FIG. 1 b , a first ESD protecting circuit 110a includes a plurality of OTS devices 111, 112, and 113 connected between the power voltage line VDD and the node A in series.
As shown in FIG. 1 c , the first ESD protecting circuit 110 b includes the OTS devices 111, 112, and 113, a resistor R1, and an NMOS transistorN1. The OTS devices 111, 112 and 113 are connected between the power voltage line VDD and the resistor R1. The resistor R1 is connected between an output node B of the OTS devices 111, 112, and 113 and the node A. The node A is connected to the data pad I/O. The NMOS transistorN1 connects the power voltage line VDD to the node A in response to a voltage from the output node B of the OTS devices 111, 112, and 113.
It is also known in the prior art to use semiconductor structures only,thus no use of ovonic switching.
An example of this kind of prior art is a well-known combination of forward diodes in series with a high clamping device.
It is also known in the prior art to use a bipolar junction transistor(BJT) in a two pin configuration, where the emitter base diode provides the small capacitance, and the base collector junction gives the high clamping voltage. The disadvantage of the semiconductor devices as described above is that it has a non-symmetrical behaviour. To make thesystem symmetrical, more structures have to be added.
SUMMARY
Various example embodiments are directed to the disadvantage as described above and/or others which may become apparent from thefollowing disclosure.
According to an embodiment of the present disclosure a semiconductordevice comprises a device with high clamping voltage (HVC device), and an OTS device.
The HVC device and the OTS device can be connected in series.
The HVC device and the OTS device can be combined in a package. The OTS device can be integrated in a metal stack of the HVC device.
According to an embodiment of the present disclosure a semiconductordevice further comprises a first external pin and a second external pin.
According to an embodiment of the present disclosure a semiconductordevice comprises an HVC device and OTS device. The HVC device comprises a p-n-junction with a high breakdown voltage, a first metallizationlayer and a second metallization layer. The OTS device is positioned between the first metallization layer and the second metallization layer of the HVC device. In this way the OTS device is integrated within theHVC device. The semiconductor device further comprises a first external pin and a second external pin.
According to an embodiment of the present disclosure a semiconductordevice comprises an HVC device and OTS device. The HVC device comprises two p-n-junctions, wherein a first p-n junction is realized by a first player and a n layer, and wherein a second p-n junction is realized by a second p layer and the n layer. The HVC device further comprises a firstmetallization layer, a second metallization layer, a third metallizationlayer and a fourth metallization layer. The OTS device comprises a first OTS layer and a second OTS layer. The first metallization layer ispositioned on the top of the first p layer, the first OTS layer ispositioned on the top of the first metallization layer, and the secondmetallization layer is positioned on the top of the first OTS layer, sothat the first OTS layer is sandwiched between the first metallizationlayer and the second metallization layer. The third metallization layer is positioned on the top of the second p layer, the second OTS layer ispositioned on the top of the third metallization layer, and the fourthmetallization layer is positioned on the top of the second OTS layer, sothat the second OTS layer is sandwiched between the third metallizationlayer and the fourth metallization layer. The semiconductor device further comprises a first external pin and a second external pin.
According to an embodiment of the present disclosure a semiconductordevice comprises an HVC device and an OTS device. The HVC device comprises a p-n-junction with a high breakdown voltage. The HVC device further comprises a first metallization layer and a second metallizationlayer. The OTS device is positioned between the first metallizationlayer and the second metallization layer of the HVC device. The OTS device comprises multiple OTS layers that are positioned between thefirst metallization layer and the second metallization layer of the HVCdevice. The HVC device further comprises a first external pin and a second external pin.
According to an embodiment of the present disclosure a HVC device comprises two p-n-junctions, a first p-n junction and a second p-n junction. The first p-n junction is realized by a first layer of a first polarity and a second layer of a second polarity. The second p-n junction is realized by the second layer and a third layer of the first polarity.
The OTS device as described in the previous embodiments is preferably tuned so that the robustness of the OTS device mirrors the robustness ofthe HVC device. This mirroring of the robustness secures achieving a lowest capacitance per robustness ratio for the semiconductor device comprising said HVC device and OTS device.
The high voltage clamp within the HVC device can be also realized by aB JT device, a MOS device or any other applicable semiconductor structure with a sufficiently high clamping voltage.
The high voltage clamp of the HVC device has preferably a symmetrical electrical characteristic. In this way the series connection of an OTS device and a HVC device is symmetrical too.
The semiconductor device as described in the above embodiments provide san advantageous ESD protection wherein the semiconductor device has botha low capacitance and a high breakdown voltage.
The present disclosure also related to a method of producing a semiconductor device as described in the above embodiments.
BRIEF DESCRIPTION OF DRAWINGS
So that the manner in which the features of the present disclosure canbe understood in detail, a more particular description is made with reference to embodiments, some of which are illustrated in the appended figures. It is to be noted, however, that the appended figures illustrate only typical embodiments and are therefore not to be considered limiting of its scope. The figures are for facilitating an understanding of the disclosure and thus are not necessarily drawn to scale. Advantages of the subject matter claimed will become apparent to those skilled in the art upon reading this description in con junction with the accompanying figures, in which like reference numerals havebeen used to designate like elements, and in which:
FIGS. 1 a, 1 b and 1 c show a known semiconductor device.
FIGS. 2 a and 2 b illustrate semiconductor devices according to embodiments of the present disclosure.
FIGS. 3 a, 3 b and 3 c illustrate semiconductor devices according to embodiments of the present disclosure.
DETAILED DESCRIPTION
According to an embodiment of the present disclosure, a semiconductordevice with an ESD protection is provided, which semiconductor device comprises an OTS device and a device with high clamping voltage.
Such a semiconductor device solves the problems that are present in the known semiconductor devices. The known semiconductor devices with a high clamping voltage have to be relatively big, since there is a large amount of power to be dissipated. Accordingly these devices that are relatively big, have a high capacitance. This makes them unsuitable for high speed data lines.
Known ESD protection devices with a relatively small capacitance have a small holding voltage, making them unsuitable for the high voltage applications.
This is also true for the known OTS devices that are known to be used asa part of on-chip ESD protection structures. These OTS devices can offer a relatively low capacitance, low trigger and low holding voltages.
The semiconductor device according to an embodiment of the present disclosure, the semiconductor device comprising an OTS device and a device with high clamping voltage, does not have the above mentioned problems known in the prior art.
The OTS device has a low capacitance which compensates for the high capacitance of the device with high clamping voltage.
The device with high clamping voltage has a high clamping voltage, which adds to a relatively small clamping voltage of the OTS device.
Therefore, the semiconductor device according to the embodiment of the present disclosure, which is a combination the OTS device and the device with high clamping voltage, is a semiconductor device with both a relatively small capacitance and a relatively high clamping voltage.
According to an embodiment of the disclosure a semiconductor device which is a combination of an OTS device and a device with high clamping voltage may be realized in at least two ways:
an OTS device and a device with high clamping voltage can be realized as discrete, independent devices that are combined in one semiconductor package, or
an OTS device can be integrated into interconnect layers of a device with high clamping voltage by integration.
A semiconductor device according to an embodiment of the present disclosure is shown in FIG. 2 a . The semiconductor device 200 comprises an OTS device 202 and a device with high clamping voltage 204 connected in series. The device with high clamping voltage 204 is also called ahigh voltage clamp (HVC) device.
The connection 206 between the OTC device and the HVC device can be realized by a bond-wire, a leadframe, or similar.
A semiconductor device according to an embodiment of the present disclosure is shown in FIG. 2 b . The semiconductor device 220 comprises an OTS device 222 and a HVC device 224 combined within one package. Sucha package can have two external pins, a first external pin 226 and a second external pin 228. In this exemplary embodiment shown in FIG. 2 b, the first external pin 226 is connected to the left side of the OTS device 222 and the second external pin 228 is connected to the rightside of the HVC device 224. In this case the OTS device can be integrated in a metal stack of the HVC device.
In an embodiment of the present disclosure a semiconductor device comprises an OTS device and an HVC device, wherein the OTS device ispositioned between two interconnect layers of the HVC device.
Three exemplary embodiments of the present disclosure are shown in FIGS.3 a, 3 b and 3 c.
In an exemplary embodiment of the present disclosure shown in FIG. 3 a ,a semiconductor device 300 comprises:
a HVC device, which HVC device comprises a p-n-junction 304, 306 with ahigh breakdown voltage, a first metallization layer 308 and a secondmetallization layer 310, and
an OTS device 302 which is positioned between the first metallizationlayer 308 and the second metallization layer 310 of the HVC device.
The HVC device further comprises a first external pin 312 and a second external pin 314.
The present disclosure includes all variations of the above described embodiment. For example, the semiconductor device can comprise more than two metallization layers, and the OTS device can be position between two of any of these multiple metallization layers, e.g. between the third and the fourth metallization layers in case that there are fourmetallization layers. Moreover, the present disclosure also includes all polarization combinations, e.g. the junction can be also a n-p-junction,etc. The junction can be positioned deep in the silicon, it comprises a stack of junctions, etc.
In an exemplary embodiment of the present disclosure shown in FIG. 3 b ,a semiconductor device 330 comprises:
a HVC device, which HVC device comprises a first metallization layer342, a second metallization layer 346, a third metallization layer 344and a fourth metallization layer 348, and
an OTS device 332, 334, which OTS device comprises a first OTS layer 332and a second OTS layer 334,
wherein the first metallization layer 342 is positioned on the top ofthe first p layer 336, the first OTS layer 332 is positioned on the top of the first metallization layer 342, and the second metallization layer346 is positioned on the top of the first OTS layer 332, so that thefirst OTS layer 332 is sandwiched between the first metallization layer342 and the second metallization layer 346, and
wherein the third metallization layer 344 is positioned on the top ofthe second p layer 338, the second OTS layer 334 is positioned on thetop of the third metallization layer 344, and the fourth metallizationlayer 348 is positioned on the top of the second OTS layer 334, so thatthe second OTS layer 334 is sandwiched between the third metallizationlayer 344 and the fourth metallization layer 348.
According to an embodiment of the present disclosure a HVC device can further comprise two p-n-junctions, a first p-n junction and a second p-n junction. The first p-n junction is realized by a first layer of a first polarity and a second layer of a second polarity. The second p-n junction is realized by the second layer and a third layer of the first polarity.
In exemplary embodiment shown in FIG. 3 b , a HVC device comprises twop-n-junctions 336, 338, 340, wherein a first p-n junction is realized bya first p layer 336 and a n layer 340, and wherein a second p-n junction is realized by a second p layer 338 and the n layer 340.
The semiconductor device can further comprise a first external pin 350and a second external pin 352.
This exemplary embodiment shown in FIG. 3 b is an anti-serial connection of two semiconductor devices shown in FIG. 2 b.
In an exemplary embodiment of the present disclosure shown in FIG. 3 c ,a semiconductor device 360 comprises:
a HVC device, which HVC device comprises a p-n-junction 364, 366 with ahigh breakdown voltage, a first metallization layer 368 and a secondmetallization layer 370, and
an OTS device 362 which is positioned between the first metallizationlayer 368 and the second metallization layer 370 of the HVC device,wherein the OTS device 362 comprises multiple OTS layers 362 that are positioned between the first metallization layer 368 and the secondmetallization layer 370 of the HVC device.
The HVC device further comprises a first external pin 372 and a second external pin 374.
As shown in the previous embodiments of the present disclosure, thesandwiching of the OTS device between two metal layers of the HVC device may be a full area or locally only.
The OTS area of the OTS device would preferably be tuned so that the robustness of the OTS device mirrors the robustness of the HVC device,which secures achieving a lowest capacitance per robustness ratio forthe semiconductor device comprising said HVC device and OTS device.
The high voltage clamp within the HVC device might be realized as ap-n-junction, as shown in the exemplary embodiments shown in FIGS. 3 a,3 b and 3 c , but it could be also realized by a BJT device, a MOS device or any other semiconductor structure with a sufficiently high clamping voltage and sufficiently high robustness.
Preferably the high voltage clamp has a symmetrical electrical characteristic, because then the series connection of an OTS device anda HVC device is symmetrical too.
A big advantage of integrating the OTS device into the interconnect layers of the
HVC device is that existing clamp concepts and diffusion processes canbe re-used with changes only in the back end that does not change the principal clamp behaviour.
The semiconductor devices as described in the previous embodiments provide very advantageous ESD protection.
Particular and preferred aspects of the disclosure are set out in the accompanying independent claims. Combinations of features from the dependent and/or independent claims may be combined as appropriate andnot merely as set out in the claims.
The scope of the present disclosure includes any novel feature or combination of features disclosed therein either explicitly or implicitly or any generalization thereof irrespective of whether or not it relates to the claimed disclosure or mitigate against any or all ofthe problems addressed by the present disclosure. The applicant hereby gives notice that new claims may be formulated to such features during prosecution of this application or of any such further application derived therefrom. In particular, with reference to the appended claims,features from dependent claims may be combined with those of the independent claims and features from respective independent claims maybe combined in any appropriate manner and not merely in specific combinations enumerated in the claims.
Features which are described in the context of separate embodiments may also be provided in combination in a single embodiment. Conversely,various features which are, for brevity, described in the context of asingle embodiment, may also be provided separately or in any suitable sub combination.
The term “comprising” does not exclude other elements or steps, the term“a” or “an” does not exclude a plurality. Reference signs in the claims shall not be construed as limiting the scope of the claims.
What is claimed is:
1. A semiconductor device comprising: a device with high clamping voltage (HVC device), and an OTS device.
2. The semiconductor device as claimed in claim 1, wherein the HVC device andthe OTS device are connected in series.
3. The semiconductor device as claimed in claim 1, wherein the HVC device and the OTS device are combined in a package.
4. The semiconductor device as claimed in claim1, wherein the OTS device is integrated in a metal stack of the HVCdevice.
5. The semiconductor device as claimed in claim 1, wherein the semiconductor device further comprises a first external pin and a second external pin.
6. The semiconductor device as claimed in claim 1, wherein the HVC device comprises: at least one p-n-junction with a high breakdown voltage; a first metallization layer; a second metallizationlayer; and wherein the OTS device is positioned between the firstmetallization layer and the second metallization layer the HVC device.7. The semiconductor device as claimed in claim 1, wherein the HVCdevice comprises: a first metallization layer, a second metallizationlayer, a third metallization layer and a fourth metallization layer;wherein the OTS device comprises a first OTS layer and a second OT Slayer; wherein the first metallization layer is positioned on the top ofa first p layer, the first OTS layer is positioned on the top of thefirst metallization layer, and the second metallization layer ispositioned on the top of the first OTS layer, so that the first OT Slayer is sandwiched between the first metallization layer and the secondmetallization layer; and wherein the third metallization layer ispositioned on the top of a second p layer, the second OTS layer ispositioned on the top of the third metallization layer, and the fourthmetallization layer is positioned on the top of the second OTS layer, sothat the second OTS layer is sandwiched between the third metallizationlayer and the fourth metallization layer.
8. The semiconductor device as claimed in claim 1, wherein the HVC device comprises: two p-n-junctions,a first p-n junction and a second p-n junction, wherein the first p-n junction is realized by a first layer of a first polarity and a second layer of a second polarity, and wherein the second p-n junction is realized by the second layer and a third layer of the first polarity. 9.The semiconductor device as claimed in claim 1, wherein the OTS device is tuned so that the robustness of the OTS device mirrors the robustness of the HVC device.
10. The semiconductor device as claimed in claim 1,wherein the high voltage clamp within the HVC device is realized by aB JT device, a MOS device or any other applicable semiconductor structure with a sufficiently high clamping voltage.
11. The semiconductor device as claimed in claim 1, wherein the high voltage clamp of the HVC device has a symmetrical electrical characteristic.
12. A method of producing a semiconductor device as claimed in claim
1. 13. The semiconductor device as claimed in claim 2, wherein the HVC device and the OTS device are combined in a package.
14. The semiconductor device as claimed in claim2, wherein the OTS device is integrated in a metal stack of the HVCdevice.
15. The semiconductor device as claimed in claim 2, wherein the semiconductor device further comprises a first external pin and a second external pin.
16. The semiconductor device as claimed in claim 2,wherein the HVC device comprises: at least one p-n-junction with a high breakdown voltage; a first metallization layer; a second metallizationlayer; and wherein the OTS device is positioned between the firstmetallization layer and the second metallization layer the HVC device.17. The semiconductor device as claimed in claim 2, wherein the OTS device is tuned so that the robustness of the OTS device mirrors the robustness of the HVC device.
18. The semiconductor device as claimed in claim 2, wherein the high voltage clamp within the HVC device is realized by a BJT device, a MOS device or any other applicable semiconductor structure with a sufficiently high clamping voltage. 19.The semiconductor device as claimed in claim 3, wherein the OTS device is integrated in a metal stack of the HVC device.
20. The semiconductordevice as claimed in claim 3, wherein the semiconductor device further comprises a first external pin and a second external pin.
|
var CILJS;
(function (ciljs) {
ciljs.nop = function nop() { };
ciljs.next_hash = 1;
ciljs.entry_point = function () {
var a = 0;
var result = null;
while (window["asm" + a])
{
if (typeof window["asm" + a].entryPoint == 'function')
result = window["asm" + a].entryPoint;
a++;
}
if (result != null)
result.apply(null, arguments);
}
ciljs.declare_type = function declare_type(name, genericArgs, baseType, init) {
var isGeneric = genericArgs && genericArgs.length > 0;
var cacheTree = isGeneric ? {} : null;
var gA = isGeneric ? genericArgs.join(",") : "";
var gAmD = isGeneric ? genericArgs.map(function (a) { return a + ".GenericTypeMetadataName"; } ).join(",") : "";
var s = "" +
"function t(" + gA + ") {\n" +
" var cachedType = " + (isGeneric ? "ciljs.tree_get([" + gAmD + "], cacheTree)" : "cacheTree") + ";\n" +
" if (cachedType) return cachedType;\n" +
" \n" +
" eval('function " + name + "() { cachedType.init(); this.constructor = cachedType; }');\n" +
" cachedType = " + name + ";\n" +
" " + (isGeneric ? "ciljs.tree_set([" + gAmD + "], cacheTree, cachedType);" : "cacheTree = cachedType;") + "\n" +
" \n" +
" cachedType.init = init.bind(cachedType" + (isGeneric ? (", " + gA) : "") + ");\n" +
" var baseCtor = baseType(" + gA + ");\n" +
" cachedType.prototype = (typeof baseCtor === 'function') ? (new baseCtor()) : baseCtor;\n" +
" return cachedType;\n" +
"}";
eval(s);
return t;
}
ciljs.init_base_types = function init_base_types()
{
asm0['System.Object']().init();
asm0['System.ValueType']().init();
asm0['System.Array']().init();
asm0['System.String']().init();
asm0['System.Delegate']().init();
asm0['System.Exception']().init();
asm0['System.Enum']().init();
asm0['System.Type']().init();
asm0['System.Boolean']().init();
asm0['System.Char']().init();
asm0['System.Byte']().init();
asm0['System.SByte']().init();
asm0['System.Int16']().init();
asm0['System.UInt16']().init();
asm0['System.Int32']().init();
asm0['System.UInt32']().init();
asm0['System.Int64']().init();
asm0['System.UInt64']().init();
asm0['System.Single']().init();
asm0['System.Double']().init();
}
ciljs.init_type = function init_type(type, assembly, fullname, isValueType, isPrimitive, isInterface, isGenericTypeDefinition, isNullable, customAttributes, methods, baseType, isInst, arrayType, metadataName) {
type.FullName = fullname;
type.Assembly = assembly;
type.IsValueType = isValueType;
type.IsPrimitive = isPrimitive;
type.IsInterface = isInterface;
type.IsGenericTypeDefinition = isGenericTypeDefinition;
type.IsNullable = isNullable;
type.CustomAttributes = customAttributes;
type.Methods = methods;
type.BaseType = baseType;
type.IsInst = isInst;
type.ArrayType = arrayType;
type.MetadataName = metadataName;
type.Interfaces = [];
type.GenericArguments = {};
type.prototype.vtable = {};
type.prototype.ifacemap = {};
}
ciljs.implement_interface = function implement_interface(type, iface, implementation) {
type.Interfaces.push(iface[0]);
if (implementation !== null)
ciljs.tree_set(iface, type.prototype.ifacemap, implementation);
}
ciljs.declare_virtual = function declare_virtual(type, slot, target) {
type.prototype.vtable[slot] = new Function("return " + target + ";");
}
ciljs.is_inst_interface = function is_inst_interface(interfaceType) {
return function (t) { try { return (t.type || t.constructor).Interfaces.indexOf(interfaceType) !== -1 ? t : null; } catch (e) { return null; } };
}
ciljs.is_inst_primitive = function is_inst_primitive(primitiveType) {
return function (t) { try { return t.type === primitiveType ? t : null; } catch (e) { return null; } }
}
ciljs.is_inst_array = function is_inst_array(T) {
return function (t) { return t instanceof asm0['System.Array']() && (t.etype === T || T === asm0['System.Object']() || t.etype.prototype instanceof T) ? t : null; };
}
ciljs.is_inst_default = function is_inst_default(type) {
return function (t) { return t instanceof type ? t : null; };
}
ciljs.is_inst_value_type = function is_inst_value_type(type) {
return function (t) { return (t != null && t.boxed instanceof type) ? t : t instanceof type ? t : null; };
}
ciljs.is_inst_delegate = function is_inst_delegate(delegateType) {
return function (t) { return (t && typeof t._methodPtr === 'function') ? t : null; };
}
ciljs.clone_value = function clone_value(v) {
if (v === null) return v;
if (typeof v === "number") return v;
if (typeof v === "function") return v;
if (!v.constructor.IsValueType) return v;
var result = new v.constructor();
for (var p in v) {
if (v.hasOwnProperty(p))
result[p] = ciljs.clone_value(v[p]);
}
return result;
}
ciljs.value_equals = function value_equals(a, b) {
if (typeof a !== typeof b)
return 0;
if (a === null)
return b === null ? 1 : 0;
if (typeof a === "object" && typeof a.constructor !== "undefined" && a.constructor.IsValueType) {
for (var p in a) {
var av = a[p];
var bv = b[p];
if (!ciljs.value_equals(av, bv))
return 0;
}
return 1;
}
else {
return a === b ? 1 : 0;
}
}
ciljs.unsigned_value = function unsigned_value(a) {
if (a < 0)
return 0xffffffff + a + 1;
else
return a;
}
ciljs.box = function box(v, type) {
if (v === null)
return v;
if (type.IsNullable) {
if (v.has_value)
return ciljs.box(v.value, type.GenericArguments[type.MetadataName][0]);
else
return null;
}
if (!type.IsValueType)
return v;
if (!type.IsPrimitive)
v = ciljs.clone_value(v);
return ciljs.make_box(v, type);
}
ciljs.make_box = function (v, type) {
return {
'boxed': v,
'type': type,
'vtable': type.prototype.vtable,
'ifacemap': type.prototype.ifacemap
};
}
ciljs.unbox = function unbox(o, type) {
if (o === null) {
var t = asm0['System.InvalidCastException']();
var e = new t();
e.stack = new Error().stack;
throw e;
}
return ciljs.cast_class(o, type).boxed;
}
ciljs.unbox_any = function unbox_any(o, type) {
if (type.IsNullable) {
var result = new type();
if (o !== null) {
result.value = ciljs.cast_class(o.boxed, type.GenericArguments[type.MetadataName][0]);
result.has_value = true;
}
return result;
}
if (type.IsValueType) {
if (o === null) {
var t = asm0['System.InvalidCastException']();
throw new t();
}
return ciljs.cast_class(o, type).boxed;
}
else
return ciljs.cast_class(o, type);
}
ciljs.stelem_ref = function stelem_ref(array, index, element) {
var castedElement = ciljs.cast_class(element, array.etype);
array.jsarr[index] = castedElement;
}
ciljs.ldelem_ref = function ldelem_ref(array, index) {
return ciljs.box(array.jsarr[index], array.etype);
}
ciljs.convert_box_to_pointer_as_needed = function convert_box_to_pointer_as_needed(o) {
if (typeof o.boxed !== "undefined" &&
typeof o.type !== "undefined" &&
o.type.IsValueType) {
return {
'r': function () { return o.boxed; },
'w': function (v) { return o.boxed = v; }
};
}
else {
return o;
}
}
ciljs.dereference_pointer_as_needed = function(p) {
if (typeof p.r === "function" &&
typeof p.w === "function") {
var v = p.r();
if (typeof v !== 'number' && !v.constructor.IsValueType) {
return v;
}
}
return p;
}
ciljs.tree_get = function tree_get(a, s) {
var c = s;
for (var i = 0; c && i < a.length; i++)
c = c[a[i]];
return c;
}
ciljs.tree_set = function tree_set(a, s, v) {
if (a.length === 1) {
s[a[0]] = v;
}
else {
var c = s[a[0]];
if (!c) s[a[0]] = c = {};
ciljs.tree_set(a.slice(1), c, v);
}
}
ciljs.new_string = function new_string(jsstr) {
var r = new (asm0['System.String']())();
r.jsstr = jsstr;
return r;
}
ciljs.new_handle = function new_handle(type, value) {
var r = new type();
r.value = value;
return r;
}
ciljs.new_array = function new_array(type, length) {
var ctor = type.ArrayType || Array;
var r = new (asm0['System.Array`1'](type))();
r.etype = type;
r.jsarr = new ctor(length);
var i;
if (type.IsValueType === false) {
for (i = 0; i < length; i++)
r.jsarr[i] = null;
}
else if (type.IsPrimitive === false) {
for (i = 0; i < length; i++)
r.jsarr[i] = new type();
}
else if (type.FullName === "System.Int64" || type.FullName === "System.UInt64") {
for (i = 0; i < length; i++)
r.jsarr[i] = [0, 0];
}
else {
for (i = 0; i < length; i++)
r.jsarr[i] = 0;
}
return r;
}
ciljs.newobj = function newobj(type, ctor, args) {
var result = new type();
if (type.IsValueType)
args[0] = {
w: function (a) { result = a; },
r: function () { return result; }
};
else
args[0] = result;
ctor.apply(null, args);
return result;
}
ciljs.cast_class = function cast_class(obj, type) {
if (type.IsInst(obj) || (!type.IsValueType && obj === null)) {
return obj;
}
else if (type.IsPrimitive) {
if (typeof obj === 'undefined' || obj === null) {
}
else if (typeof obj === 'number') {
return obj;
}
else if (typeof obj.length === 'number' && obj.length === 2) {
return obj; /* this is for (u)int64 */
}
}
else if (
(type === asm0['System.Object']() || type === asm0['System.ValueType']()) &&
(typeof obj.boxed !== 'undefined'))
{
return obj;
}
ciljs.throw_invalid_cast();
}
ciljs.throw_invalid_cast = function throw_invalid_cast() {
var t = asm0['System.InvalidCastException']();
var e = new t();
e.stack = new Error().stack;
throw e;
}
ciljs.conv_u8 = function conv_u8(n) {
if (n < 0) {
/* signed 32 bit int that need to be converted to 32 bit unsigned before 64 bit conversion */
n = 0x100000000 + n;
}
return ciljs.make_uint64(n);
}
ciljs.conv_i8 = function conv_i8(n) {
if (n < 0) {
/* signed 32 bit int */
n = 0x100000000 + n;
/* here, n should be positive and less than 0xffffffff, otherwise, input would not have fit in 32 bit */
return new Uint32Array([n | 0, 0xffffffff]);
}
return ciljs.make_uint64(n);
}
ciljs.make_uint64 = function make_uint64(n) {
var bits32 = 0xffffffff;
var floorN = Math.floor(n);
var low = floorN | 0;
var high = (floorN / 0x100000000) | 0;
low = low & bits32;
high = high & bits32;
return new Uint32Array([low, high]);
}
ciljs.to_number_signed = function to_number_signed(n) {
if (asm0.Int64_isNegative(n)) {
n = asm0.Int64_UnaryNegation(n);
return -ciljs.to_number_unsigned(n);
}
return ciljs.to_number_unsigned(n);
}
ciljs.to_number_unsigned = function to_number_unsigned(n) {
return n[1] * 4294967296 + n[0];
}
ciljs.array_set_value = function array_set_value(dest, value, pos) {
// value is either an object or a boxed value type.
var etype = dest.etype;
var vtype = value != null ? (value.constructor || value.type) : null;
if (dest.etype.IsNullable) {
throw "not implemented";
return;
}
if (value == null) {
// Null is the universal zero...
if (!etype.IsValueType)
dest.jsarr[pos] = null; // reference type
else if (etype.Is64BitPrimitive)
dest.jsarr[pos] = [0, 0];
else if (etype.IsPrimitive)
dest.jsarr[pos] = 0
else // value type
dest.jsarr[pos] = new etype();
}
else if (etype == asm0['System.Object']()) {
// Everything is compatible with Object
dest.jsarr[pos] = value;
}
else if (!etype.IsValueType) {
dest.jsarr[pos] = ciljs.cast_class(value, etype)
}
else {
if (etype.IsInst(value)) {
dest.jsarr[pos] = value.boxed;
}
else {
if (!etype.IsPrimitive || !vtype.IsPrimitive) {
ciljs.throw_invalid_cast();
}
dest.jsarr[pos] = value;
}
}
}
ciljs.delegate_invoke = function (self) {
var m = self._methodPtr;
var t = self._target;
if (t != null)
arguments[0] = t;
else
arguments = Array.prototype.slice.call(arguments, 1);
return m.apply(null, arguments);
}
ciljs.delegate_begin_invoke = function (self /* , [delegate arguments], callback, state */) {
var asyncResult = asm0.CreateAsyncResult(self);
asyncResult.result = ciljs.delegate_invoke.apply(null, arguments);
asyncResult.asyncState = arguments[arguments.length - 1];
var asyncCallback = arguments[arguments.length - 2];
if (asyncCallback != null)
{
ciljs.delegate_invoke(asyncCallback, asyncResult);
}
return asyncResult;
}
ciljs.delegate_end_invoke = function (self, asyncResult) {
return asyncResult.result;
}
ciljs.delegate_ctor = function (self, target, methodPtr) {
self._methodPtr = methodPtr;
self._target = target;
}
ciljs.console_write_line = function (managedStr) {
console.log(managedStr.jsstr);
}
})(CILJS || (CILJS = {}));var asm0;(function (asm)
{
asm.FullName = "mscorlib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null";
/* static System.String Locale.GetText(String)*/
asm.x6000001 = function GetText(arg0)
{
var loc0;
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: stloc.0 */
loc0 = arg0;
/* IL_05: ldloc.0 */
/* IL_06: ret */
return loc0;
};;
/* static System.Object Activator.CreateInstance(Type)*/
asm.x6000002 = function CreateInstance(arg0)
{
var loc0;
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: call Object CreateInstanceImpl(System.Type) */
/* IL_07: stloc.0 */
loc0 = (new (arg0.ctor)());
/* IL_0A: ldloc.0 */
/* IL_0B: ret */
return loc0;
};;
/* static T Activator.CreateInstance<T>()*/
asm.x6000003 = function (T)
{
return function CreateInstance()
{
var t0;
var loc0;
t0 = T;
/* IL_00: nop */
/* IL_01: ldtoken T */
/* IL_06: call Type GetTypeFromHandle(System.RuntimeTypeHandle) */
/* IL_0B: call Object CreateInstance(System.Type) */
/* IL_10: unbox.any T */
/* IL_15: stloc.0 */
loc0 = CILJS.unbox_any(asm0.x6000002(asm0.x6000147(CILJS.new_handle((asm0)["System.RuntimeTypeHandle"](),t0))),t0);
/* IL_18: ldloc.0 */
/* IL_19: ret */
return loc0;
};
};;
/* System.Boolean Predicate`1.Invoke(T)*/
asm.x6000006 = CILJS.delegate_invoke;;
/* System.IAsyncResult Predicate`1.BeginInvoke(T,AsyncCallback,Object)*/
asm.x6000007 = CILJS.delegate_begin_invoke;;
/* System.Boolean Predicate`1.EndInvoke(IAsyncResult)*/
asm.x6000008 = CILJS.delegate_end_invoke;;
/* Predicate`1..ctor(Object,IntPtr)*/
asm.x6000005 = CILJS.delegate_ctor;;
/* System.Int32 Array.get_Length()*/
asm.x6000009 = function get_Length(arg0)
{
var loc0;
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: call Int32 GetLengthImpl(System.Object) */
/* IL_07: stloc.0 */
loc0 = asm0.x600000b(arg0);
/* IL_0A: ldloc.0 */
/* IL_0B: ret */
return loc0;
};;
/* System.Int64 Array.get_LongLength()*/
asm.x600000a = function get_LongLength(arg0)
{
var loc0;
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: call Int32 get_Length() */
/* IL_07: conv.i8 */
/* IL_08: stloc.0 */
loc0 = CILJS.conv_i8(asm0.x6000009(arg0));
/* IL_0B: ldloc.0 */
/* IL_0C: ret */
return loc0;
};;
/* static System.Int32 Array.GetLengthImpl(Object)*/
asm.x600000b = function(o) { return o.jsarr.length; };;
/* static System.Object Array.GetValueImpl(Object,Int32)*/
asm.x600000c = function(o, i) { return CILJS.box(o.jsarr[i], o.etype); };;
/* static T[] Array.FromJsArray<T>(Object)*/
asm.x600000d =
function (T) {
return function FromJsArray(arr) {
var r = new (asm0['System.Array`1'](T))();
r.etype = T;
r.jsarr = arr;
return r;
};
};;
/* System.Object Array.GetValue(Int32)*/
asm.x600000e = function GetValue(arg0, arg1)
{
var loc0;
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldarg.1 */
/* IL_03: call Object GetValueImpl(System.Object, System.Int32) */
/* IL_08: stloc.0 */
loc0 = asm0.x600000c(arg0,arg1);
/* IL_0B: ldloc.0 */
/* IL_0C: ret */
return loc0;
};;
/* System.Collections.IEnumerator Array.GetEnumerator()*/
asm.x600000f = function GetEnumerator(arg0)
{
var loc0;
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: callvirt IEnumerator GetEnumeratorImpl() */
/* IL_07: stloc.0 */
loc0 = ((arg0.vtable)["asm0.x6000010"]())(arg0);
/* IL_0A: ldloc.0 */
/* IL_0B: ret */
return loc0;
};;
/* static System.Void Array.Clear<T>(T[],Int32,Int32)*/
asm.x6000011 = function (T)
{
return function Clear(arg0, arg1, arg2)
{
var t0;
var loc0;
var in_block_0;
var __pos__;
var loc1;
var loc2;
var loc3;
t0 = T;
loc0 = ((T.IsValueType) ? (((T.IsPrimitive) ? (0) : (new T()))) : (null));
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldloca.s 0 */
/* IL_04: initobj T */
loc0 = ((t0.IsValueType) ? (((t0.IsPrimitive) ? ((0|0)) : (new t0()))) : (null));
/* IL_09: ldarg.1 */
/* IL_0A: stloc.1 */
loc1 = arg1;
/* IL_0B: br.s IL_1B */
__pos__ = 0x1B;
continue;
case 0xD:
/* IL_0D: ldarg.0 */
/* IL_0E: ldloc.1 */
/* IL_0F: ldloc.0 */
/* IL_10: stelem T */
(arg0.jsarr)[loc1] = loc0;
/* IL_15: ldloc.1 */
/* IL_16: stloc.2 */
loc2 = loc1;
/* IL_17: ldloc.2 */
/* IL_18: ldc.i4.1 */
/* IL_19: add */
/* IL_1A: stloc.1 */
loc1 = (loc2 + (1|0)) | (0|0);
case 0x1B:
/* IL_1B: ldloc.1 */
/* IL_1C: ldarg.0 */
/* IL_1D: ldlen */
/* IL_1E: conv.i4 */
/* IL_20: clt */
/* IL_21: stloc.3 */
loc3 = ((loc1 < (arg0.jsarr.length | (0|0))) ? (1) : (0));
/* IL_22: ldloc.3 */
/* IL_23: brtrue.s IL_0D */
if (loc3){
__pos__ = 0xD;
continue;
}
/* IL_25: ret */
return ;
}
}
};
};;
/* static System.Int32 Array.IndexOf<T>(T[],T,Int32,Int32)*/
asm.x6000012_init = function (T)
{
return function ()
{
((asm0)["System.Collections.IEqualityComparer"]().init)();
asm.x6000012 = asm.x6000012_;
};
};;
asm.x6000012 = function (T)
{
return function (arg0, arg1, arg2, arg3)
{
(asm.x6000012_init(T).apply)(this,arguments);
return (asm.x6000012_(T).apply)(this,arguments);
};
};;
asm.x6000012_ = function (T)
{
return function IndexOf(arg0, arg1, arg2, arg3)
{
var t0;
var t1;
var t2;
var st_14;
var in_block_0;
var __pos__;
var loc2;
var loc3;
var loc0;
var loc1;
var loc4;
var loc5;
var loc6;
var loc7;
var loc8;
t0 = (asm0)["System.Exception"]();
t1 = T;
t2 = (asm0)["System.Collections.IEqualityComparer"]();
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldnull */
/* IL_04: ceq */
/* IL_05: stloc.2 */
loc2 = ((arg0 === null) ? (1) : (0));
/* IL_06: ldloc.2 */
/* IL_07: brfalse.s IL_14 */
if ((!(loc2))){
__pos__ = 0x14;
continue;
}
/* IL_09: ldstr array */
/* IL_0E: newobj Void .ctor(System.String) */
/* IL_13: throw */
throw CILJS.newobj(t0,asm0.x6000077,[null, CILJS.new_string("array")]);
case 0x14:
/* IL_14: ldarg.3 */
/* IL_15: ldc.i4.0 */
/* IL_16: blt.s IL_2A */
if (arg3 < (0|0)){
__pos__ = 0x2A;
continue;
}
/* IL_18: ldarg.2 */
/* IL_19: ldc.i4.0 */
/* IL_1A: blt.s IL_2A */
if (arg2 < (0|0)){
__pos__ = 0x2A;
continue;
}
/* IL_1C: ldarg.2 */
/* IL_1D: ldc.i4.1 */
/* IL_1E: sub */
/* IL_1F: ldarg.0 */
/* IL_20: ldlen */
/* IL_21: conv.i4 */
/* IL_22: ldc.i4.1 */
/* IL_23: sub */
/* IL_24: ldarg.3 */
/* IL_25: sub */
/* IL_27: cgt */
st_14 = ((((arg2 - (1|0)) | (0|0)) > (((((arg0.jsarr.length | (0|0)) - (1|0)) | (0|0)) - arg3) | (0|0))) ? (1) : (0));
/* IL_28: br.s IL_2B */
__pos__ = 0x2B;
continue;
case 0x2A:
/* IL_2A: ldc.i4.1 */
st_14 = (1|0);
case 0x2B:
/* IL_2B: stloc.3 */
loc3 = st_14;
/* IL_2C: ldloc.3 */
/* IL_2D: brfalse.s IL_35 */
if ((!(loc3))){
__pos__ = 0x35;
continue;
}
/* IL_2F: newobj Void .ctor() */
/* IL_34: throw */
throw CILJS.newobj(t0,asm0.x6000076,[null]);
case 0x35:
/* IL_35: ldarg.2 */
/* IL_36: ldarg.3 */
/* IL_37: add */
/* IL_38: stloc.0 */
loc0 = (arg2 + arg3) | (0|0);
/* IL_39: ldtoken T */
/* IL_3E: call Type GetTypeFromHandle(System.RuntimeTypeHandle) */
/* IL_43: call IEqualityComparer GetDefaultEqualityComparer(System.Type) */
/* IL_48: stloc.1 */
loc1 = asm1.GetDefaultEqualityComparer(asm0.x6000147(CILJS.new_handle((asm0)["System.RuntimeTypeHandle"](),t1)).ctor)();
/* IL_49: ldarg.2 */
/* IL_4A: stloc.s 4 */
loc4 = arg2;
/* IL_4C: br.s IL_7F */
__pos__ = 0x7F;
continue;
case 0x4E:
/* IL_4E: nop */
/* IL_4F: ldloc.1 */
/* IL_50: ldarg.0 */
/* IL_51: ldloc.s 4 */
/* IL_53: call T UnsafeLoad[T](T[], System.Int32) */
/* IL_58: box T */
/* IL_5D: ldarg.1 */
/* IL_5E: box T */
/* IL_63: callvirt Boolean Equals(System.Object, System.Object) */
/* IL_68: stloc.s 5 */
loc5 = (((loc1.ifacemap)[t2].x60001b6)())(CILJS.convert_box_to_pointer_as_needed(loc1),CILJS.box((arg0.jsarr[loc4]),t1),CILJS.box(arg1,t1));
/* IL_6A: ldloc.s 5 */
/* IL_6C: brfalse.s IL_74 */
if ((!(loc5))){
__pos__ = 0x74;
continue;
}
/* IL_6E: ldloc.s 4 */
/* IL_70: stloc.s 6 */
loc6 = loc4;
/* IL_72: br.s IL_8F */
__pos__ = 0x8F;
continue;
case 0x74:
/* IL_74: nop */
/* IL_75: ldloc.s 4 */
/* IL_77: ldc.i4.1 */
/* IL_78: add */
/* IL_79: stloc.s 7 */
loc7 = (loc4 + (1|0)) | (0|0);
/* IL_7B: ldloc.s 7 */
/* IL_7D: stloc.s 4 */
loc4 = loc7;
case 0x7F:
/* IL_7F: ldloc.s 4 */
/* IL_81: ldloc.0 */
/* IL_83: clt */
/* IL_84: stloc.s 8 */
loc8 = ((loc4 < loc0) ? (1) : (0));
/* IL_86: ldloc.s 8 */
/* IL_88: brtrue.s IL_4E */
if (loc8){
__pos__ = 0x4E;
continue;
}
/* IL_8A: ldc.i4.m1 */
/* IL_8B: stloc.s 6 */
loc6 = (-1|0);
case 0x8F:
/* IL_8F: ldloc.s 6 */
/* IL_91: ret */
return loc6;
}
}
};
};
/* static System.Exception Array.GetException(String)*/
asm.x6000013 =
function (classname) {
var t = asm1[classname]();
return new t();
};;
/* static System.Void Array.Copy(Array,Int32,Array,Int32,Int32)*/
asm.x6000014 = function Copy(arg0, arg1, arg2, arg3, arg4)
{
var st_2E;
var in_block_0;
var __pos__;
var loc0;
var loc1;
var loc2;
var loc3;
var loc4;
var loc5;
var loc6;
var loc7;
var loc8;
var loc9;
var loc10;
var loc11;
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldnull */
/* IL_04: ceq */
/* IL_05: stloc.0 */
loc0 = ((arg0 === null) ? (1) : (0));
/* IL_06: ldloc.0 */
/* IL_07: brfalse.s IL_14 */
if ((!(loc0))){
__pos__ = 0x14;
continue;
}
/* IL_09: ldstr System.ArgumentNullException */
/* IL_0E: call Exception GetException(System.String) */
/* IL_13: throw */
throw asm0.x6000013(CILJS.new_string("System.ArgumentNullException"));
case 0x14:
/* IL_14: ldarg.2 */
/* IL_15: ldnull */
/* IL_17: ceq */
/* IL_18: stloc.1 */
loc1 = ((arg2 === null) ? (1) : (0));
/* IL_19: ldloc.1 */
/* IL_1A: brfalse.s IL_27 */
if ((!(loc1))){
__pos__ = 0x27;
continue;
}
/* IL_1C: ldstr System.ArgumentNullException */
/* IL_21: call Exception GetException(System.String) */
/* IL_26: throw */
throw asm0.x6000013(CILJS.new_string("System.ArgumentNullException"));
case 0x27:
/* IL_27: ldarg.1 */
/* IL_28: ldc.i4.0 */
/* IL_2A: clt */
/* IL_2B: stloc.2 */
loc2 = ((arg1 < (0|0)) ? (1) : (0));
/* IL_2C: ldloc.2 */
/* IL_2D: brfalse.s IL_3A */
if ((!(loc2))){
__pos__ = 0x3A;
continue;
}
/* IL_2F: ldstr System.ArgumentOutOfRangeException */
/* IL_34: call Exception GetException(System.String) */
/* IL_39: throw */
throw asm0.x6000013(CILJS.new_string("System.ArgumentOutOfRangeException"));
case 0x3A:
/* IL_3A: ldarg.3 */
/* IL_3B: ldc.i4.0 */
/* IL_3D: clt */
/* IL_3E: stloc.3 */
loc3 = ((arg3 < (0|0)) ? (1) : (0));
/* IL_3F: ldloc.3 */
/* IL_40: brfalse.s IL_4D */
if ((!(loc3))){
__pos__ = 0x4D;
continue;
}
/* IL_42: ldstr System.ArgumentOutOfRangeException */
/* IL_47: call Exception GetException(System.String) */
/* IL_4C: throw */
throw asm0.x6000013(CILJS.new_string("System.ArgumentOutOfRangeException"));
case 0x4D:
/* IL_4D: ldarg.1 */
/* IL_4E: ldarg.0 */
/* IL_4F: callvirt Int32 get_Length() */
/* IL_54: ldarg.s 4 */
/* IL_56: sub */
/* IL_58: cgt */
/* IL_59: stloc.s 4 */
loc4 = ((arg1 > ((asm0.x6000009(arg0) - arg4) | (0|0))) ? (1) : (0));
/* IL_5B: ldloc.s 4 */
/* IL_5D: brfalse.s IL_6A */
if ((!(loc4))){
__pos__ = 0x6A;
continue;
}
/* IL_5F: ldstr System.ArgumentException */
/* IL_64: call Exception GetException(System.String) */
/* IL_69: throw */
throw asm0.x6000013(CILJS.new_string("System.ArgumentException"));
case 0x6A:
/* IL_6A: ldarg.3 */
/* IL_6B: ldarg.2 */
/* IL_6C: callvirt Int32 get_Length() */
/* IL_71: ldarg.s 4 */
/* IL_73: sub */
/* IL_75: cgt */
/* IL_76: stloc.s 5 */
loc5 = ((arg3 > ((asm0.x6000009(arg2) - arg4) | (0|0))) ? (1) : (0));
/* IL_78: ldloc.s 5 */
/* IL_7A: brfalse.s IL_88 */
if ((!(loc5))){
__pos__ = 0x88;
continue;
}
/* IL_7C: nop */
/* IL_7D: ldstr System.ArgumentException */
/* IL_82: call Exception GetException(System.String) */
/* IL_87: throw */
throw asm0.x6000013(CILJS.new_string("System.ArgumentException"));
case 0x88:
/* IL_88: ldarg.0 */
/* IL_89: ldarg.2 */
/* IL_8A: bne.un.s IL_92 */
if (CILJS.unsigned_value(arg0) != CILJS.unsigned_value(arg2)){
__pos__ = 0x92;
continue;
}
/* IL_8C: ldarg.1 */
/* IL_8D: ldarg.3 */
/* IL_8F: cgt */
st_2E = ((arg1 > arg3) ? (1) : (0));
/* IL_90: br.s IL_93 */
__pos__ = 0x93;
continue;
case 0x92:
/* IL_92: ldc.i4.1 */
st_2E = (1|0);
case 0x93:
/* IL_93: stloc.s 6 */
loc6 = st_2E;
/* IL_95: ldloc.s 6 */
/* IL_97: brfalse.s IL_CF */
if ((!(loc6))){
__pos__ = 0xCF;
continue;
}
/* IL_99: nop */
/* IL_9A: ldc.i4.0 */
/* IL_9B: stloc.s 7 */
loc7 = (0|0);
/* IL_9D: br.s IL_C0 */
__pos__ = 0xC0;
continue;
case 0x9F:
/* IL_9F: nop */
/* IL_A0: ldarg.2 */
/* IL_A1: ldarg.0 */
/* IL_A2: ldarg.1 */
/* IL_A3: ldloc.s 7 */
/* IL_A5: add */
/* IL_A6: callvirt Object GetValue(System.Int32) */
/* IL_AB: ldarg.3 */
/* IL_AC: ldloc.s 7 */
/* IL_AE: add */
/* IL_AF: callvirt Void SetValue(System.Object, System.Int32) */
asm0.x600002d(arg2,asm0.x600000e(arg0,(arg1 + loc7) | (0|0)),(arg3 + loc7) | (0|0));
/* IL_B4: nop */
/* IL_B5: nop */
/* IL_B6: ldloc.s 7 */
/* IL_B8: stloc.s 8 */
loc8 = loc7;
/* IL_BA: ldloc.s 8 */
/* IL_BC: ldc.i4.1 */
/* IL_BD: add */
/* IL_BE: stloc.s 7 */
loc7 = (loc8 + (1|0)) | (0|0);
case 0xC0:
/* IL_C0: ldloc.s 7 */
/* IL_C2: ldarg.s 4 */
/* IL_C5: clt */
/* IL_C6: stloc.s 9 */
loc9 = ((loc7 < arg4) ? (1) : (0));
/* IL_C8: ldloc.s 9 */
/* IL_CA: brtrue.s IL_9F */
if (loc9){
__pos__ = 0x9F;
continue;
}
/* IL_CC: nop */
/* IL_CD: br.s IL_108 */
__pos__ = 0x108;
continue;
case 0xCF:
/* IL_CF: nop */
/* IL_D0: ldarg.s 4 */
/* IL_D2: ldc.i4.1 */
/* IL_D3: sub */
/* IL_D4: stloc.s 10 */
loc10 = (arg4 - (1|0)) | (0|0);
/* IL_D6: br.s IL_F9 */
__pos__ = 0xF9;
continue;
case 0xD8:
/* IL_D8: nop */
/* IL_D9: ldarg.2 */
/* IL_DA: ldarg.0 */
/* IL_DB: ldarg.1 */
/* IL_DC: ldloc.s 10 */
/* IL_DE: add */
/* IL_DF: callvirt Object GetValue(System.Int32) */
/* IL_E4: ldarg.3 */
/* IL_E5: ldloc.s 10 */
/* IL_E7: add */
/* IL_E8: callvirt Void SetValue(System.Object, System.Int32) */
asm0.x600002d(arg2,asm0.x600000e(arg0,(arg1 + loc10) | (0|0)),(arg3 + loc10) | (0|0));
/* IL_ED: nop */
/* IL_EE: nop */
/* IL_EF: ldloc.s 10 */
/* IL_F1: stloc.s 8 */
loc8 = loc10;
/* IL_F3: ldloc.s 8 */
/* IL_F5: ldc.i4.1 */
/* IL_F6: sub */
/* IL_F7: stloc.s 10 */
loc10 = (loc8 - (1|0)) | (0|0);
case 0xF9:
/* IL_F9: ldloc.s 10 */
/* IL_FB: ldc.i4.0 */
/* IL_FD: clt */
/* IL_FE: ldc.i4.0 */
/* IL_100: ceq */
/* IL_101: stloc.s 11 */
loc11 = ((((loc10 < (0|0)) ? (1) : (0)) === (0|0)) ? (1) : (0));
/* IL_103: ldloc.s 11 */
/* IL_105: brtrue.s IL_D8 */
if (loc11){
__pos__ = 0xD8;
continue;
}
/* IL_107: nop */
case 0x108:
/* IL_108: ret */
return ;
}
}
};;
/* static System.Int32 Array.GetIndex<T>(T[],Int32,Int32,Predicate`1)*/
asm.x6000015 = function (T)
{
return function GetIndex(arg0, arg1, arg2, arg3)
{
var in_block_0;
var __pos__;
var loc0;
var loc1;
var loc2;
var loc3;
var loc4;
var loc5;
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.1 */
/* IL_02: ldarg.2 */
/* IL_03: add */
/* IL_04: stloc.0 */
loc0 = (arg1 + arg2) | (0|0);
/* IL_05: ldarg.1 */
/* IL_06: stloc.1 */
loc1 = arg1;
/* IL_07: br.s IL_28 */
__pos__ = 0x28;
continue;
case 0x9:
/* IL_09: nop */
/* IL_0A: ldarg.3 */
/* IL_0B: ldarg.0 */
/* IL_0C: ldloc.1 */
/* IL_0D: ldelem T */
/* IL_12: callvirt Boolean Invoke(T) */
/* IL_17: stloc.2 */
loc2 = arg3._methodPtr.apply(null,((arg3._target) ? ([
arg3._target,
(arg0.jsarr)[loc1]
]) : ([
(arg0.jsarr)[loc1]
])));
/* IL_18: ldloc.2 */
/* IL_19: brfalse.s IL_1F */
if ((!(loc2))){
__pos__ = 0x1F;
continue;
}
/* IL_1B: ldloc.1 */
/* IL_1C: stloc.3 */
loc3 = loc1;
/* IL_1D: br.s IL_36 */
__pos__ = 0x36;
continue;
case 0x1F:
/* IL_1F: nop */
/* IL_20: ldloc.1 */
/* IL_21: stloc.s 4 */
loc4 = loc1;
/* IL_23: ldloc.s 4 */
/* IL_25: ldc.i4.1 */
/* IL_26: add */
/* IL_27: stloc.1 */
loc1 = (loc4 + (1|0)) | (0|0);
case 0x28:
/* IL_28: ldloc.1 */
/* IL_29: ldloc.0 */
/* IL_2B: clt */
/* IL_2C: stloc.s 5 */
loc5 = ((loc1 < loc0) ? (1) : (0));
/* IL_2E: ldloc.s 5 */
/* IL_30: brtrue.s IL_09 */
if (loc5){
__pos__ = 0x9;
continue;
}
/* IL_32: ldc.i4.m1 */
/* IL_33: stloc.3 */
loc3 = (-1|0);
case 0x36:
/* IL_36: ldloc.3 */
/* IL_37: ret */
return loc3;
}
}
};
};;
/* static System.Int32 Array.GetLastIndex<T>(T[],Int32,Int32,Predicate`1)*/
asm.x6000016 = function (T)
{
return function GetLastIndex(arg0, arg1, arg2, arg3)
{
var st_06;
var st_07;
var st_08;
var st_09;
var st_0A;
var st_0B;
var in_block_0;
var __pos__;
var loc0;
var loc2;
var loc1;
var loc3;
var loc4;
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.1 */
/* IL_02: ldarg.2 */
/* IL_03: add */
/* IL_04: stloc.0 */
loc0 = (arg1 + arg2) | (0|0);
/* IL_05: br.s IL_24 */
__pos__ = 0x24;
continue;
case 0x7:
/* IL_07: nop */
/* IL_08: ldarg.3 */
st_09 = arg3;
/* IL_09: ldarg.0 */
st_07 = arg0;
/* IL_0A: ldloc.0 */
/* IL_0B: ldc.i4.1 */
/* IL_0C: sub */
/* IL_0D: stloc.2 */
loc2 = (loc0 - (1|0)) | (0|0);
/* IL_0E: ldloc.2 */
st_06 = loc2;
/* IL_0F: stloc.0 */
loc0 = st_06;
/* IL_10: ldloc.2 */
st_08 = loc2;
/* IL_11: ldelem T */
st_0A = (st_07.jsarr)[st_08];
/* IL_16: callvirt Boolean Invoke(T) */
st_0B = st_09._methodPtr.apply(null,((st_09._target) ? ([
st_09._target,
st_0A
]) : ([
st_0A
])));
/* IL_1B: stloc.1 */
loc1 = st_0B;
/* IL_1C: ldloc.1 */
/* IL_1D: brfalse.s IL_23 */
if ((!(loc1))){
__pos__ = 0x23;
continue;
}
/* IL_1F: ldloc.0 */
/* IL_20: stloc.3 */
loc3 = loc0;
/* IL_21: br.s IL_35 */
__pos__ = 0x35;
continue;
case 0x23:
/* IL_23: nop */
case 0x24:
/* IL_24: ldloc.0 */
/* IL_25: ldarg.1 */
/* IL_27: ceq */
/* IL_28: ldc.i4.0 */
/* IL_2A: ceq */
/* IL_2B: stloc.s 4 */
loc4 = ((((loc0 === arg1) ? (1) : (0)) === (0|0)) ? (1) : (0));
/* IL_2D: ldloc.s 4 */
/* IL_2F: brtrue.s IL_07 */
if (loc4){
__pos__ = 0x7;
continue;
}
/* IL_31: ldc.i4.m1 */
/* IL_32: stloc.3 */
loc3 = (-1|0);
case 0x35:
/* IL_35: ldloc.3 */
/* IL_36: ret */
return loc3;
}
}
};
};;
/* static System.Int32 Array.LastIndexOf<T>(T[],T,Int32,Int32)*/
asm.x6000017_init = function (T)
{
return function ()
{
((asm0)["System.Collections.IEqualityComparer"]().init)();
asm.x6000017 = asm.x6000017_;
};
};;
asm.x6000017 = function (T)
{
return function (arg0, arg1, arg2, arg3)
{
(asm.x6000017_init(T).apply)(this,arguments);
return (asm.x6000017_(T).apply)(this,arguments);
};
};;
asm.x6000017_ = function (T)
{
return function LastIndexOf(arg0, arg1, arg2, arg3)
{
var t0;
var t1;
var st_1A;
var in_block_0;
var __pos__;
var loc1;
var loc2;
var loc0;
var loc3;
var loc4;
var loc5;
var loc6;
var loc7;
t0 = T;
t1 = (asm0)["System.Collections.IEqualityComparer"]();
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldnull */
/* IL_04: ceq */
/* IL_05: stloc.1 */
loc1 = ((arg0 === null) ? (1) : (0));
/* IL_06: ldloc.1 */
/* IL_07: brfalse.s IL_14 */
if ((!(loc1))){
__pos__ = 0x14;
continue;
}
/* IL_09: ldstr System.ArgumentNullException */
/* IL_0E: call Exception GetException(System.String) */
/* IL_13: throw */
throw asm0.x6000013(CILJS.new_string("System.ArgumentNullException"));
case 0x14:
/* IL_14: ldarg.3 */
/* IL_15: ldc.i4.0 */
/* IL_16: blt.s IL_3A */
if (arg3 < (0|0)){
__pos__ = 0x3A;
continue;
}
/* IL_18: ldarg.2 */
/* IL_19: ldarg.0 */
/* IL_1A: ldc.i4.0 */
/* IL_1B: callvirt Int32 GetLowerBound(System.Int32) */
/* IL_20: blt.s IL_3A */
if (arg2 < asm0.x6000025(arg0,(0|0))){
__pos__ = 0x3A;
continue;
}
/* IL_22: ldarg.2 */
/* IL_23: ldarg.0 */
/* IL_24: ldlen */
/* IL_25: conv.i4 */
/* IL_26: ldc.i4.1 */
/* IL_27: sub */
/* IL_28: bgt.s IL_3A */
if (arg2 > (((arg0.jsarr.length | (0|0)) - (1|0)) | (0|0))){
__pos__ = 0x3A;
continue;
}
/* IL_2A: ldarg.2 */
/* IL_2B: ldarg.3 */
/* IL_2C: sub */
/* IL_2D: ldc.i4.1 */
/* IL_2E: add */
/* IL_2F: ldarg.0 */
/* IL_30: ldc.i4.0 */
/* IL_31: callvirt Int32 GetLowerBound(System.Int32) */
/* IL_37: clt */
st_1A = ((((((arg2 - arg3) | (0|0)) + (1|0)) | (0|0)) < asm0.x6000025(arg0,(0|0))) ? (1) : (0));
/* IL_38: br.s IL_3B */
__pos__ = 0x3B;
continue;
case 0x3A:
/* IL_3A: ldc.i4.1 */
st_1A = (1|0);
case 0x3B:
/* IL_3B: stloc.2 */
loc2 = st_1A;
/* IL_3C: ldloc.2 */
/* IL_3D: brfalse.s IL_4A */
if ((!(loc2))){
__pos__ = 0x4A;
continue;
}
/* IL_3F: ldstr System.ArgumentOutOfRangeException */
/* IL_44: call Exception GetException(System.String) */
/* IL_49: throw */
throw asm0.x6000013(CILJS.new_string("System.ArgumentOutOfRangeException"));
case 0x4A:
/* IL_4A: ldtoken T */
/* IL_4F: call Type GetTypeFromHandle(System.RuntimeTypeHandle) */
/* IL_54: call IEqualityComparer GetDefaultEqualityComparer(System.Type) */
/* IL_59: stloc.0 */
loc0 = asm1.GetDefaultEqualityComparer(asm0.x6000147(CILJS.new_handle((asm0)["System.RuntimeTypeHandle"](),t0)).ctor)();
/* IL_5A: ldarg.2 */
/* IL_5B: stloc.3 */
loc3 = arg2;
/* IL_5C: br.s IL_8B */
__pos__ = 0x8B;
continue;
case 0x5E:
/* IL_5E: nop */
/* IL_5F: ldloc.0 */
/* IL_60: ldarg.0 */
/* IL_61: ldloc.3 */
/* IL_62: ldelem T */
/* IL_67: box T */
/* IL_6C: ldarg.1 */
/* IL_6D: box T */
/* IL_72: callvirt Boolean Equals(System.Object, System.Object) */
/* IL_77: stloc.s 4 */
loc4 = (((loc0.ifacemap)[t1].x60001b6)())(CILJS.convert_box_to_pointer_as_needed(loc0),CILJS.box((arg0.jsarr)[loc3],t0),CILJS.box(arg1,t0));
/* IL_79: ldloc.s 4 */
/* IL_7B: brfalse.s IL_82 */
if ((!(loc4))){
__pos__ = 0x82;
continue;
}
/* IL_7D: ldloc.3 */
/* IL_7E: stloc.s 5 */
loc5 = loc3;
/* IL_80: br.s IL_A1 */
__pos__ = 0xA1;
continue;
case 0x82:
/* IL_82: nop */
/* IL_83: ldloc.3 */
/* IL_84: stloc.s 6 */
loc6 = loc3;
/* IL_86: ldloc.s 6 */
/* IL_88: ldc.i4.1 */
/* IL_89: sub */
/* IL_8A: stloc.3 */
loc3 = (loc6 - (1|0)) | (0|0);
case 0x8B:
/* IL_8B: ldloc.3 */
/* IL_8C: ldarg.2 */
/* IL_8D: ldarg.3 */
/* IL_8E: sub */
/* IL_8F: ldc.i4.1 */
/* IL_90: add */
/* IL_92: clt */
/* IL_93: ldc.i4.0 */
/* IL_95: ceq */
/* IL_96: stloc.s 7 */
loc7 = ((((loc3 < ((((arg2 - arg3) | (0|0)) + (1|0)) | (0|0))) ? (1) : (0)) === (0|0)) ? (1) : (0));
/* IL_98: ldloc.s 7 */
/* IL_9A: brtrue.s IL_5E */
if (loc7){
__pos__ = 0x5E;
continue;
}
/* IL_9C: ldc.i4.m1 */
/* IL_9D: stloc.s 5 */
loc5 = (-1|0);
case 0xA1:
/* IL_A1: ldloc.s 5 */
/* IL_A3: ret */
return loc5;
}
}
};
};
/* static System.Void Array.Sort<T>(T[],Object)*/
asm.x6000018 = function (T) {
return function Sort(array, comparison) {
function swap(items, firstIndex, secondIndex){
var temp = items[firstIndex];
items[firstIndex] = items[secondIndex];
items[secondIndex] = temp;
}
function partition(items, left, right) {
var pivot = items[Math.floor((right + left) / 2)],
i = left,
j = right;
while (i <= j) {
while (comparison(items[i], pivot) < 0)
i++;
while (comparison(items[j], pivot) > 0)
j--;
if (i <= j) {
swap(items, i, j);
i++;
j--;
}
}
return i;
}
function quickSort(items, left, right) {
var index;
if (items.length > 1) {
index = partition(items, left, right);
if (left < index - 1)
quickSort(items, left, index - 1);
if (index < right)
quickSort(items, index, right);
}
return items;
}
quickSort(array.jsarr, 0, array.jsarr.length - 1);
} }
;;
/* static System.Void Array.Sort<T>(T[],Int32,Int32)*/
asm.x6000019_init = function (T)
{
return function ()
{
((asm0)["System.Collections.Generic.IComparer`1"](T).init)();
((asm0)["System.InvalidOperationException"]().init)();
};
};;
asm.x6000019 = function (T)
{
return function (arg0, arg1, arg2)
{
(asm.x6000019_init(T).apply)(this,arguments);
return (asm.x6000019_(T).apply)(this,arguments);
};
};;
asm.x6000019_ = function (T)
{
return function Sort(arg0, arg1, arg2)
{
var t0;
var t1;
var t2;
var in_block_0;
var __pos__;
var loc0;
var __error_handled_1__;
var loc1;
t0 = T;
t1 = (asm0)["System.Collections.Generic.IComparer`1"](t0);
t2 = (asm0)["System.InvalidOperationException"]();
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
try {
/* IL_01: nop */
/* IL_02: ldtoken T */
/* IL_07: call Type GetTypeFromHandle(System.RuntimeTypeHandle) */
/* IL_0C: call IComparer GetComparer(System.Type) */
/* IL_11: call IComparer`1 UnsafeCast[System.Collections.Generic.IComparer`1[T]](System.Object) */
/* IL_16: stloc.0 */
loc0 = asm1.GetDefaultComparer(asm0.x6000147(CILJS.new_handle((asm0)["System.RuntimeTypeHandle"](),t0)).ctor)();
/* IL_17: ldarg.0 */
/* IL_18: ldc.i4.0 */
/* IL_19: ldarg.2 */
/* IL_1A: ldloc.0 */
/* IL_1B: call Void Sort[T](T[], System.Int32, System.Int32, System.Collections.Generic.IComparer`1[T]) */
(asm0.x600001c(T))(arg0,(0|0),arg2,loc0);
/* IL_20: nop */
/* IL_21: nop */
/* IL_22: leave.s IL_32 */
__pos__ = 0x32;
}
catch (__error__) {
__error_handled_1__ = false;
if ((!(__error_handled_1__)) && (__error__ instanceof (asm0)["System.Exception"]())){
st_08 = __error__;
__error_handled_1__ = true;
/* IL_24: stloc.1 */
loc1 = st_08;
/* IL_25: nop */
/* IL_26: ldstr Failed to sort the array. */
/* IL_2B: ldloc.1 */
/* IL_2C: newobj Void .ctor(System.String, System.Exception) */
/* IL_31: throw */
throw CILJS.newobj(t2,asm0.x60000c6,[null, CILJS.new_string("Failed to sort the array. "), loc1]);
}
if ((!(__error_handled_1__))){
throw __error__;
}
}
break;
case 0x32:
/* IL_32: ret */
return ;
}
}
};
};
/* static System.Void Array.Sort<T>(T[],IComparer`1)*/
asm.x600001a = function (T)
{
return function Sort(arg0, arg1)
{
var t0;
t0 = T;
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldc.i4.0 */
/* IL_03: ldarg.0 */
/* IL_04: ldlen */
/* IL_05: conv.i4 */
/* IL_06: ldarg.1 */
/* IL_07: call Void Sort[T](T[], System.Int32, System.Int32, System.Collections.Generic.IComparer`1[T]) */
(asm0.x600001c(T))(arg0,(0|0),arg0.jsarr.length | (0|0),arg1);
/* IL_0C: nop */
/* IL_0D: ret */
return ;
};
};;
/* static System.Void Array.SortImpl<T>(T[],Int32,Comparison`1)*/
asm.x600001b = function (T)
{
return function SortImpl(arg0, arg1, arg2)
{
var t0;
var in_block_0;
var __pos__;
var loc0;
var loc1;
t0 = T;
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldlen */
/* IL_03: conv.i4 */
/* IL_04: stloc.0 */
loc0 = arg0.jsarr.length | (0|0);
/* IL_05: ldarg.1 */
/* IL_06: ldloc.0 */
/* IL_08: clt */
/* IL_09: stloc.1 */
loc1 = ((arg1 < loc0) ? (1) : (0));
/* IL_0A: ldloc.1 */
/* IL_0B: brfalse.s IL_1C */
if ((!(loc1))){
__pos__ = 0x1C;
continue;
}
/* IL_0D: nop */
/* IL_0E: ldarg.0 */
/* IL_0F: ldarg.1 */
/* IL_10: ldarg.0 */
/* IL_11: ldlen */
/* IL_12: conv.i4 */
/* IL_13: ldarg.1 */
/* IL_14: sub */
/* IL_15: call Void Splice(System.Object, System.Int32, System.Int32) */
asm0.x600001e(arg0,arg1,((arg0.jsarr.length | (0|0)) - arg1) | (0|0));
/* IL_1A: nop */
/* IL_1B: nop */
case 0x1C:
/* IL_1C: ldarg.0 */
/* IL_1D: ldarg.2 */
/* IL_1E: call Object GetJsFunction(System.Delegate) */
/* IL_23: call Void Sort[T](T[], System.Object) */
(asm0.x6000018(T))(arg0,asm0.x6000066(arg2));
/* IL_28: nop */
/* IL_29: ret */
return ;
}
}
};
};;
/* static System.Void Array.Sort<T>(T[],Int32,Int32,IComparer`1)*/
asm.x600001c_init = function (T)
{
return function ()
{
((asm0)["System.Array+<>c__DisplayClass23_0`1"](T).init)();
((asm0)["System.NotImplementedException"]().init)();
((asm0)["System.Comparison`1"](T).init)();
};
};;
asm.x600001c = function (T)
{
return function (arg0, arg1, arg2, arg3)
{
(asm.x600001c_init(T).apply)(this,arguments);
return (asm.x600001c_(T).apply)(this,arguments);
};
};;
asm.x600001c_ = function (T)
{
return function Sort(arg0, arg1, arg2, arg3)
{
var t0;
var t1;
var t2;
var t3;
var in_block_0;
var __pos__;
var loc0;
var loc1;
t0 = T;
t1 = (asm0)["System.Array+<>c__DisplayClass23_0`1"](t0);
t2 = (asm0)["System.NotImplementedException"]();
t3 = (asm0)["System.Comparison`1"](t0);
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: newobj Void .ctor() */
/* IL_05: stloc.0 */
loc0 = CILJS.newobj(t1,asm0.x60001f0,[null]);
/* IL_06: ldloc.0 */
/* IL_07: ldarg.3 */
/* IL_08: stfld IKVM.Reflection.GenericFieldInstance */
loc0.comparer = arg3;
/* IL_0D: nop */
/* IL_0E: ldarg.1 */
/* IL_0F: ldc.i4.0 */
/* IL_11: cgt.un */
/* IL_12: stloc.1 */
loc1 = ((CILJS.unsigned_value(arg1) > CILJS.unsigned_value((0|0))) ? (1) : (0));
/* IL_13: ldloc.1 */
/* IL_14: brfalse.s IL_1C */
if ((!(loc1))){
__pos__ = 0x1C;
continue;
}
/* IL_16: newobj Void .ctor() */
/* IL_1B: throw */
throw CILJS.newobj(t2,asm0.x60000d8,[null]);
case 0x1C:
/* IL_1C: ldarg.0 */
/* IL_1D: ldarg.2 */
/* IL_1E: ldloc.0 */
/* IL_20: ldftn Int32 <Sort>b__0(T, T) */
/* IL_25: newobj Void .ctor(System.Object, System.IntPtr) */
/* IL_2A: call Void SortImpl[T](T[], System.Int32, System.Comparison`1[T]) */
(asm0.x600001b(T))(arg0,arg2,CILJS.newobj(t3,asm0.x6000055,[null, loc0, asm0.x60001f1]));
/* IL_2F: nop */
/* IL_30: ret */
return ;
}
}
};
};
/* static System.Void Array.Combine(Object,Object)*/
asm.x600001d =
function (a, b) {
a.jsarr = a.jsarr.concat(b);
}
;;
/* static System.Void Array.Splice(Object,Int32,Int32)*/
asm.x600001e =
function (array, index, howMany) {
array.jsarr.splice(index, howMany);
}
;;
/* static System.Void Array.Reverse(Array,Int32,Int32)*/
asm.x6000020 = function Reverse(arg0, arg1, arg2)
{
var st_04;
var in_block_0;
var __pos__;
var loc0;
var loc1;
var loc2;
var loc3;
var loc4;
var loc5;
var loc6;
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.1 */
/* IL_02: brtrue.s IL_0F */
if (arg1){
__pos__ = 0xF;
continue;
}
/* IL_04: ldarg.2 */
/* IL_05: ldarg.0 */
/* IL_06: callvirt Int32 get_Length() */
/* IL_0C: clt */
st_04 = ((arg2 < asm0.x6000009(arg0)) ? (1) : (0));
/* IL_0D: br.s IL_10 */
__pos__ = 0x10;
continue;
case 0xF:
/* IL_0F: ldc.i4.1 */
st_04 = (1|0);
case 0x10:
/* IL_10: stloc.0 */
loc0 = st_04;
/* IL_11: ldloc.0 */
/* IL_12: brfalse.s IL_62 */
if ((!(loc0))){
__pos__ = 0x62;
continue;
}
/* IL_14: nop */
/* IL_15: ldarg.1 */
/* IL_16: stloc.1 */
loc1 = arg1;
/* IL_17: ldarg.1 */
/* IL_18: ldarg.2 */
/* IL_19: add */
/* IL_1A: ldc.i4.1 */
/* IL_1B: sub */
/* IL_1C: stloc.2 */
loc2 = (((arg1 + arg2) | (0|0)) - (1|0)) | (0|0);
/* IL_1D: br.s IL_55 */
__pos__ = 0x55;
continue;
case 0x1F:
/* IL_1F: nop */
/* IL_20: ldarg.0 */
/* IL_21: ldloc.1 */
/* IL_22: callvirt Object GetValue(System.Int32) */
/* IL_27: stloc.3 */
loc3 = asm0.x600000e(arg0,loc1);
/* IL_28: ldarg.0 */
/* IL_29: ldloc.2 */
/* IL_2A: callvirt Object GetValue(System.Int32) */
/* IL_2F: stloc.s 4 */
loc4 = asm0.x600000e(arg0,loc2);
/* IL_31: ldarg.0 */
/* IL_32: ldloc.s 4 */
/* IL_34: ldloc.1 */
/* IL_35: callvirt Void SetValue(System.Object, System.Int32) */
asm0.x600002d(arg0,loc4,loc1);
/* IL_3A: nop */
/* IL_3B: ldarg.0 */
/* IL_3C: ldloc.3 */
/* IL_3D: ldloc.2 */
/* IL_3E: callvirt Void SetValue(System.Object, System.Int32) */
asm0.x600002d(arg0,loc3,loc2);
/* IL_43: nop */
/* IL_44: ldloc.1 */
/* IL_45: stloc.s 5 */
loc5 = loc1;
/* IL_47: ldloc.s 5 */
/* IL_49: ldc.i4.1 */
/* IL_4A: add */
/* IL_4B: stloc.1 */
loc1 = (loc5 + (1|0)) | (0|0);
/* IL_4C: ldloc.2 */
/* IL_4D: stloc.s 5 */
loc5 = loc2;
/* IL_4F: ldloc.s 5 */
/* IL_51: ldc.i4.1 */
/* IL_52: sub */
/* IL_53: stloc.2 */
loc2 = (loc5 - (1|0)) | (0|0);
/* IL_54: nop */
case 0x55:
/* IL_55: ldloc.1 */
/* IL_56: ldloc.2 */
/* IL_58: clt */
/* IL_59: stloc.s 6 */
loc6 = ((loc1 < loc2) ? (1) : (0));
/* IL_5B: ldloc.s 6 */
/* IL_5D: brtrue.s IL_1F */
if (loc6){
__pos__ = 0x1F;
continue;
}
/* IL_5F: nop */
/* IL_60: br.s IL_6B */
__pos__ = 0x6B;
continue;
case 0x62:
/* IL_62: nop */
/* IL_63: ldarg.0 */
/* IL_64: call Void Reverse(System.Array) */
(Array.prototype.reverse.apply(arg0.jsarr));
/* IL_69: nop */
/* IL_6A: nop */
case 0x6B:
/* IL_6B: ret */
return ;
}
}
};;
/* static System.Void Array.Copy<T>(T[],T[],Int32)*/
asm.x6000024 = function (T)
{
return function Copy(arg0, arg1, arg2)
{
var in_block_0;
var __pos__;
var loc0;
var loc1;
var loc2;
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldc.i4.0 */
/* IL_02: stloc.0 */
loc0 = (0|0);
/* IL_03: br.s IL_1B */
__pos__ = 0x1B;
continue;
case 0x5:
/* IL_05: nop */
/* IL_06: ldarg.1 */
/* IL_07: ldloc.0 */
/* IL_08: ldarg.0 */
/* IL_09: ldloc.0 */
/* IL_0A: ldelem T */
/* IL_0F: stelem T */
(arg1.jsarr)[loc0] = (arg0.jsarr)[loc0];
/* IL_14: nop */
/* IL_15: ldloc.0 */
/* IL_16: stloc.1 */
loc1 = loc0;
/* IL_17: ldloc.1 */
/* IL_18: ldc.i4.1 */
/* IL_19: add */
/* IL_1A: stloc.0 */
loc0 = (loc1 + (1|0)) | (0|0);
case 0x1B:
/* IL_1B: ldloc.0 */
/* IL_1C: ldarg.2 */
/* IL_1E: clt */
/* IL_1F: stloc.2 */
loc2 = ((loc0 < arg2) ? (1) : (0));
/* IL_20: ldloc.2 */
/* IL_21: brtrue.s IL_05 */
if (loc2){
__pos__ = 0x5;
continue;
}
/* IL_23: ret */
return ;
}
}
};
};;
/* System.Int32 Array.GetLowerBound(Int32)*/
asm.x6000025 = function GetLowerBound(arg0, arg1)
{
var loc0;
/* IL_00: nop */
/* IL_01: ldc.i4.0 */
/* IL_02: stloc.0 */
loc0 = (0|0);
/* IL_05: ldloc.0 */
/* IL_06: ret */
return loc0;
};;
/* System.Int32 Array.get_Rank()*/
asm.x6000026 = function get_Rank(arg0)
{
var loc0;
/* IL_00: nop */
/* IL_01: ldc.i4.1 */
/* IL_02: stloc.0 */
loc0 = (1|0);
/* IL_05: ldloc.0 */
/* IL_06: ret */
return loc0;
};;
/* static System.Void Array.Resize<T>(T[]&,Int32)*/
asm.x6000027 = function (T)
{
return function Resize(arg0, arg1)
{
var t0;
var t1;
var in_block_0;
var __pos__;
var loc4;
var loc5;
var loc0;
var loc1;
var loc6;
var loc2;
var loc3;
var loc7;
var loc8;
var loc9;
t0 = (asm0)["System.Exception"]();
t1 = T;
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.1 */
/* IL_02: ldc.i4.0 */
/* IL_04: clt */
/* IL_05: stloc.s 4 */
loc4 = ((arg1 < (0|0)) ? (1) : (0));
/* IL_07: ldloc.s 4 */
/* IL_09: brfalse.s IL_16 */
if ((!(loc4))){
__pos__ = 0x16;
continue;
}
/* IL_0B: ldstr Argument out of range */
/* IL_10: newobj Void .ctor(System.String) */
/* IL_15: throw */
throw CILJS.newobj(t0,asm0.x6000077,[null, CILJS.new_string("Argument out of range")]);
case 0x16:
/* IL_16: ldarg.0 */
/* IL_17: ldind.ref */
/* IL_18: ldnull */
/* IL_1A: ceq */
/* IL_1B: stloc.s 5 */
loc5 = ((arg0.r() === null) ? (1) : (0));
/* IL_1D: ldloc.s 5 */
/* IL_1F: brfalse.s IL_2C */
if ((!(loc5))){
__pos__ = 0x2C;
continue;
}
/* IL_21: nop */
/* IL_22: ldarg.0 */
/* IL_23: ldarg.1 */
/* IL_24: newarr T */
/* IL_29: stind.ref */
arg0.w(CILJS.new_array(t1,arg1));
/* IL_2A: br.s IL_7C */
__pos__ = 0x7C;
continue;
case 0x2C:
/* IL_2C: ldarg.0 */
/* IL_2D: ldind.ref */
/* IL_2E: stloc.0 */
loc0 = arg0.r();
/* IL_2F: ldloc.0 */
/* IL_30: ldlen */
/* IL_31: conv.i4 */
/* IL_32: stloc.1 */
loc1 = loc0.jsarr.length | (0|0);
/* IL_33: ldloc.1 */
/* IL_34: ldarg.1 */
/* IL_36: ceq */
/* IL_37: stloc.s 6 */
loc6 = ((loc1 === arg1) ? (1) : (0));
/* IL_39: ldloc.s 6 */
/* IL_3B: brfalse.s IL_3F */
if ((!(loc6))){
__pos__ = 0x3F;
continue;
}
/* IL_3D: br.s IL_7C */
__pos__ = 0x7C;
continue;
case 0x3F:
/* IL_3F: ldarg.1 */
/* IL_40: newarr T */
/* IL_45: stloc.2 */
loc2 = CILJS.new_array(t1,arg1);
/* IL_46: ldarg.1 */
/* IL_47: ldloc.1 */
/* IL_48: call Int32 Min(System.Int32, System.Int32) */
/* IL_4D: stloc.3 */
loc3 = Math.min(arg1, loc1);
/* IL_4E: ldc.i4.0 */
/* IL_4F: stloc.s 7 */
loc7 = (0|0);
/* IL_51: br.s IL_6E */
__pos__ = 0x6E;
continue;
case 0x53:
/* IL_53: ldloc.2 */
/* IL_54: ldloc.s 7 */
/* IL_56: ldloc.0 */
/* IL_57: ldloc.s 7 */
/* IL_59: call T UnsafeLoad[T](T[], System.Int32) */
/* IL_5E: call T UnsafeStore[T](T[], System.Int32, T) */
/* IL_63: pop */
(loc2.jsarr[loc7] = (loc0.jsarr[loc7]));
/* IL_64: ldloc.s 7 */
/* IL_66: ldc.i4.1 */
/* IL_67: add */
/* IL_68: stloc.s 8 */
loc8 = (loc7 + (1|0)) | (0|0);
/* IL_6A: ldloc.s 8 */
/* IL_6C: stloc.s 7 */
loc7 = loc8;
case 0x6E:
/* IL_6E: ldloc.s 7 */
/* IL_70: ldloc.3 */
/* IL_72: clt */
/* IL_73: stloc.s 9 */
loc9 = ((loc7 < loc3) ? (1) : (0));
/* IL_75: ldloc.s 9 */
/* IL_77: brtrue.s IL_53 */
if (loc9){
__pos__ = 0x53;
continue;
}
/* IL_79: ldarg.0 */
/* IL_7A: ldloc.2 */
/* IL_7B: stind.ref */
arg0.w(loc2);
case 0x7C:
/* IL_7C: ret */
return ;
}
}
};
};;
/* static System.Int32 Array.BinarySearch<T>(T[],Int32,Int32,T)*/
asm.x600002a = function (T)
{
return function BinarySearch(arg0, arg1, arg2, arg3)
{
var t0;
var loc0;
t0 = T;
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldarg.1 */
/* IL_03: ldarg.2 */
/* IL_04: ldarg.3 */
/* IL_05: ldnull */
/* IL_06: call Int32 BinarySearch[T](T[], System.Int32, System.Int32, T, System.Collections.Generic.IComparer`1[T]) */
/* IL_0B: stloc.0 */
loc0 = (asm0.x600002b(T))(arg0,arg1,arg2,arg3,null);
/* IL_0E: ldloc.0 */
/* IL_0F: ret */
return loc0;
};
};;
/* static System.Int32 Array.BinarySearch<T>(T[],Int32,Int32,T,IComparer`1)*/
asm.x600002b_init = function (T)
{
return function ()
{
((asm0)["System.Collections.Generic.IComparer`1"](T).init)();
};
};;
asm.x600002b = function (T)
{
return function (arg0, arg1, arg2, arg3, arg4)
{
(asm.x600002b_init(T).apply)(this,arguments);
return (asm.x600002b_(T).apply)(this,arguments);
};
};;
asm.x600002b_ = function (T)
{
return function BinarySearch(arg0, arg1, arg2, arg3, arg4)
{
var t0;
var t1;
var t2;
var in_block_0;
var __pos__;
var loc3;
var loc4;
var loc5;
var loc6;
var loc7;
var loc0;
var loc1;
var loc2;
var in_block_1;
var loc8;
var loc9;
var loc10;
var loc11;
var loc12;
var __error_handled_1__;
var loc13;
t0 = (asm0)["System.Exception"]();
t1 = T;
t2 = (asm0)["System.Collections.Generic.IComparer`1"](t1);
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldnull */
/* IL_04: ceq */
/* IL_05: stloc.3 */
loc3 = ((arg0 === null) ? (1) : (0));
/* IL_06: ldloc.3 */
/* IL_07: brfalse.s IL_14 */
if ((!(loc3))){
__pos__ = 0x14;
continue;
}
/* IL_09: ldstr array */
/* IL_0E: newobj Void .ctor(System.String) */
/* IL_13: throw */
throw CILJS.newobj(t0,asm0.x6000077,[null, CILJS.new_string("array")]);
case 0x14:
/* IL_14: ldarg.1 */
/* IL_15: ldc.i4.0 */
/* IL_17: clt */
/* IL_18: stloc.s 4 */
loc4 = ((arg1 < (0|0)) ? (1) : (0));
/* IL_1A: ldloc.s 4 */
/* IL_1C: brfalse.s IL_29 */
if ((!(loc4))){
__pos__ = 0x29;
continue;
}
/* IL_1E: ldstr index is less than the lower bound of array. */
/* IL_23: newobj Void .ctor(System.String) */
/* IL_28: throw */
throw CILJS.newobj(t0,asm0.x6000077,[null, CILJS.new_string("index is less than the lower bound of array.")]);
case 0x29:
/* IL_29: ldarg.2 */
/* IL_2A: ldc.i4.0 */
/* IL_2C: clt */
/* IL_2D: stloc.s 5 */
loc5 = ((arg2 < (0|0)) ? (1) : (0));
/* IL_2F: ldloc.s 5 */
/* IL_31: brfalse.s IL_3E */
if ((!(loc5))){
__pos__ = 0x3E;
continue;
}
/* IL_33: ldstr Value has to be >= 0. */
/* IL_38: newobj Void .ctor(System.String) */
/* IL_3D: throw */
throw CILJS.newobj(t0,asm0.x6000077,[null, CILJS.new_string("Value has to be >= 0.")]);
case 0x3E:
/* IL_3E: ldarg.1 */
/* IL_3F: ldarg.0 */
/* IL_40: ldlen */
/* IL_41: conv.i4 */
/* IL_42: ldarg.2 */
/* IL_43: sub */
/* IL_45: cgt */
/* IL_46: stloc.s 6 */
loc6 = ((arg1 > (((arg0.jsarr.length | (0|0)) - arg2) | (0|0))) ? (1) : (0));
/* IL_48: ldloc.s 6 */
/* IL_4A: brfalse.s IL_57 */
if ((!(loc6))){
__pos__ = 0x57;
continue;
}
/* IL_4C: ldstr index and length do not specify a valid range in array. */
/* IL_51: newobj Void .ctor(System.String) */
/* IL_56: throw */
throw CILJS.newobj(t0,asm0.x6000077,[null, CILJS.new_string("index and length do not specify a valid range in array.")]);
case 0x57:
/* IL_57: ldarg.s 4 */
/* IL_59: ldnull */
/* IL_5B: ceq */
/* IL_5C: stloc.s 7 */
loc7 = ((arg4 === null) ? (1) : (0));
/* IL_5E: ldloc.s 7 */
/* IL_60: brfalse.s IL_78 */
if ((!(loc7))){
__pos__ = 0x78;
continue;
}
/* IL_62: ldtoken T */
/* IL_67: call Type GetTypeFromHandle(System.RuntimeTypeHandle) */
/* IL_6C: call IComparer GetComparer(System.Type) */
/* IL_71: call IComparer`1 UnsafeCast[System.Collections.Generic.IComparer`1[T]](System.Object) */
/* IL_76: starg.s 4 */
arg4 = asm1.GetDefaultComparer(asm0.x6000147(CILJS.new_handle((asm0)["System.RuntimeTypeHandle"](),t1)).ctor)();
case 0x78:
/* IL_78: ldarg.1 */
/* IL_79: stloc.0 */
loc0 = arg1;
/* IL_7A: ldarg.1 */
/* IL_7B: ldarg.2 */
/* IL_7C: add */
/* IL_7D: ldc.i4.1 */
/* IL_7E: sub */
/* IL_7F: stloc.1 */
loc1 = (((arg1 + arg2) | (0|0)) - (1|0)) | (0|0);
/* IL_80: ldc.i4.0 */
/* IL_81: stloc.2 */
loc2 = (0|0);
try {
in_block_1 = true;
__pos__ = 130;
while (in_block_1){
switch (__pos__){
case 0x82:
/* IL_82: nop */
/* IL_83: br.s IL_C7 */
__pos__ = 0xC7;
continue;
case 0x85:
/* IL_85: nop */
/* IL_86: ldloc.0 */
/* IL_87: ldloc.1 */
/* IL_88: ldloc.0 */
/* IL_89: sub */
/* IL_8A: ldc.i4.2 */
/* IL_8B: div */
/* IL_8C: add */
/* IL_8D: stloc.s 8 */
loc8 = (loc0 + ((((loc1 - loc0) | (0|0)) / (2|0)) | (0|0))) | (0|0);
/* IL_8F: ldarg.s 4 */
/* IL_91: ldarg.0 */
/* IL_92: ldloc.s 8 */
/* IL_94: ldelem T */
/* IL_99: ldarg.3 */
/* IL_9A: callvirt Int32 Compare(T, T) */
/* IL_9F: stloc.2 */
loc2 = ((((arg4.ifacemap)[t2])[t1].x60001bf)())(CILJS.convert_box_to_pointer_as_needed(arg4),(arg0.jsarr)[loc8],arg3);
/* IL_A0: ldloc.2 */
/* IL_A1: ldc.i4.0 */
/* IL_A3: ceq */
/* IL_A4: stloc.s 9 */
loc9 = ((loc2 === (0|0)) ? (1) : (0));
/* IL_A6: ldloc.s 9 */
/* IL_A8: brfalse.s IL_B0 */
if ((!(loc9))){
__pos__ = 0xB0;
continue;
}
/* IL_AA: ldloc.s 8 */
/* IL_AC: stloc.s 10 */
loc10 = loc8;
/* IL_AE: leave.s IL_ED */
in_block_1 = false;
__pos__ = 0xED;
break;
case 0xB0:
/* IL_B0: ldloc.2 */
/* IL_B1: ldc.i4.0 */
/* IL_B3: cgt */
/* IL_B4: stloc.s 11 */
loc11 = ((loc2 > (0|0)) ? (1) : (0));
/* IL_B6: ldloc.s 11 */
/* IL_B8: brfalse.s IL_C1 */
if ((!(loc11))){
__pos__ = 0xC1;
continue;
}
/* IL_BA: ldloc.s 8 */
/* IL_BC: ldc.i4.1 */
/* IL_BD: sub */
/* IL_BE: stloc.1 */
loc1 = (loc8 - (1|0)) | (0|0);
/* IL_BF: br.s IL_C6 */
__pos__ = 0xC6;
continue;
case 0xC1:
/* IL_C1: ldloc.s 8 */
/* IL_C3: ldc.i4.1 */
/* IL_C4: add */
/* IL_C5: stloc.0 */
loc0 = (loc8 + (1|0)) | (0|0);
case 0xC6:
/* IL_C6: nop */
case 0xC7:
/* IL_C7: ldloc.0 */
/* IL_C8: ldloc.1 */
/* IL_CA: cgt */
/* IL_CB: ldc.i4.0 */
/* IL_CD: ceq */
/* IL_CE: stloc.s 12 */
loc12 = ((((loc0 > loc1) ? (1) : (0)) === (0|0)) ? (1) : (0));
/* IL_D0: ldloc.s 12 */
/* IL_D2: brtrue.s IL_85 */
if (loc12){
__pos__ = 0x85;
continue;
}
/* IL_D4: nop */
/* IL_D5: leave.s IL_E7 */
in_block_1 = false;
__pos__ = 0xE7;
break;
}
}
}
catch (__error__) {
__error_handled_1__ = false;
if ((!(__error_handled_1__)) && (__error__ instanceof (asm0)["System.Exception"]())){
st_4D = __error__;
__error_handled_1__ = true;
/* IL_D7: stloc.s 13 */
loc13 = st_4D;
/* IL_D9: nop */
/* IL_DA: ldstr Comparer threw an exception. */
/* IL_DF: ldloc.s 13 */
/* IL_E1: newobj Void .ctor(System.String, System.Exception) */
/* IL_E6: throw */
throw CILJS.newobj(t0,asm0.x6000078,[null, CILJS.new_string("Comparer threw an exception."), loc13]);
}
if ((!(__error_handled_1__))){
throw __error__;
}
}
break;
case 0xE7:
/* IL_E7: ldloc.0 */
/* IL_E8: not */
/* IL_E9: stloc.s 10 */
loc10 = (~(loc0));
case 0xED:
/* IL_ED: ldloc.s 10 */
/* IL_EF: ret */
return loc10;
}
}
};
};
/* static System.Array Array.CreateInstance(Type,Int32)*/
asm.x600002c = function (elementType, length) { return CILJS.new_array(elementType.ctor, length); };;
/* System.Void Array.SetValue(Object,Int32)*/
asm.x600002d = CILJS.array_set_value;;
/* Array..ctor()*/
asm.x600002e = function _ctor(arg0)
{
/* IL_00: ldarg.0 */
/* IL_01: call Void .ctor() */
/* IL_06: nop */
/* IL_07: ret */
return ;
};;
/* System.Collections.Generic.IEnumerator`1[T] Array`1.GetEnumerator()*/
asm.x6000030_init = function ()
{
((asm0)["System.Array`1+ArrayEnumerator"]((((arguments)[0].constructor.GenericArguments)["asm0.t2000006"])[0]).init)();
};;
asm.x6000030 = function (arg0)
{
asm.x6000030_init.apply(this,arguments);
return asm.x6000030_.apply(this,arguments);
};;
asm.x6000030_ = function GetEnumerator(arg0)
{
var t0;
var t1;
var loc0;
t0 = (((arguments)[0].constructor.GenericArguments)["asm0.t2000006"])[0];
t1 = (asm0)["System.Array`1+ArrayEnumerator"](t0);
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: newobj Void .ctor(System.Array`1[T]) */
/* IL_07: stloc.0 */
loc0 = CILJS.newobj(t1,asm0.x60001f2,[null, arg0]);
/* IL_0A: ldloc.0 */
/* IL_0B: ret */
return loc0;
};
/* System.Collections.IEnumerator Array`1.GetEnumeratorImpl()*/
asm.x6000031 = function GetEnumeratorImpl(arg0)
{
var loc0;
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: call IEnumerator`1 GetEnumerator() */
/* IL_07: stloc.0 */
loc0 = asm0.x6000030(arg0);
/* IL_0A: ldloc.0 */
/* IL_0B: ret */
return loc0;
};;
/* System.Int32 Array`1.System.Collections.Generic.ICollection<T>.get_Count()*/
asm.x6000032 = function System_Collections_Generic_ICollection_T__get_Count(arg0)
{
var loc0;
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: call Int32 get_Length() */
/* IL_07: stloc.0 */
loc0 = asm0.x6000009(arg0);
/* IL_0A: ldloc.0 */
/* IL_0B: ret */
return loc0;
};;
/* System.Boolean Array`1.System.Collections.Generic.ICollection<T>.get_IsReadOnly()*/
asm.x6000033 = function System_Collections_Generic_ICollection_T__get_IsReadOnly(arg0)
{
var loc0;
/* IL_00: nop */
/* IL_01: ldc.i4.1 */
/* IL_02: stloc.0 */
loc0 = (1|0);
/* IL_05: ldloc.0 */
/* IL_06: ret */
return loc0;
};;
/* System.Void Array`1.System.Collections.Generic.ICollection<T>.Add(T)*/
asm.x6000034_init = function ()
{
((asm0)["System.NotSupportedException"]().init)();
asm.x6000034 = asm.x6000034_;
};;
asm.x6000034 = function (arg0, arg1)
{
asm.x6000034_init.apply(this,arguments);
return asm.x6000034_.apply(this,arguments);
};;
asm.x6000034_ = function System_Collections_Generic_ICollection_T__Add(arg0, arg1)
{
var t0;
t0 = (asm0)["System.NotSupportedException"]();
/* IL_00: nop */
/* IL_01: newobj Void .ctor() */
/* IL_06: throw */
throw CILJS.newobj(t0,asm0.x60000d9,[null]);
};
/* System.Void Array`1.System.Collections.Generic.ICollection<T>.Clear()*/
asm.x6000035_init = function ()
{
((asm0)["System.NotSupportedException"]().init)();
asm.x6000035 = asm.x6000035_;
};;
asm.x6000035 = function (arg0)
{
asm.x6000035_init.apply(this,arguments);
return asm.x6000035_.apply(this,arguments);
};;
asm.x6000035_ = function System_Collections_Generic_ICollection_T__Clear(arg0)
{
var t0;
t0 = (asm0)["System.NotSupportedException"]();
/* IL_00: nop */
/* IL_01: newobj Void .ctor() */
/* IL_06: throw */
throw CILJS.newobj(t0,asm0.x60000d9,[null]);
};
/* System.Boolean Array`1.System.Collections.Generic.ICollection<T>.Contains(T)*/
asm.x6000036_init = function ()
{
((asm0)["System.Array`1"]((((arguments)[0].constructor.GenericArguments)["asm0.t2000006"])[0]).init)();
};;
asm.x6000036 = function (arg0, arg1)
{
asm.x6000036_init.apply(this,arguments);
return asm.x6000036_.apply(this,arguments);
};;
asm.x6000036_ = function System_Collections_Generic_ICollection_T__Contains(arg0, arg1)
{
var t0;
var t1;
var loc0;
t0 = (((arguments)[0].constructor.GenericArguments)["asm0.t2000006"])[0];
t1 = (asm0)["System.Array`1"](t0);
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: castclass T[] */
/* IL_07: ldarg.1 */
/* IL_08: ldc.i4.0 */
/* IL_09: ldarg.0 */
/* IL_0A: call Int32 get_Length() */
/* IL_0F: call Int32 IndexOf[T](T[], T, System.Int32, System.Int32) */
/* IL_14: ldc.i4.m1 */
/* IL_16: ceq */
/* IL_17: ldc.i4.0 */
/* IL_19: ceq */
/* IL_1A: stloc.0 */
loc0 = (((((asm0.x6000012((((arguments)[0].constructor.GenericArguments)["asm0.t2000006"])[0]))(CILJS.cast_class(arg0,t1),arg1,(0|0),asm0.x6000009(arg0)) === (-1|0)) ? (1) : (0)) === (0|0)) ? (1) : (0));
/* IL_1D: ldloc.0 */
/* IL_1E: ret */
return loc0;
};
/* System.Void Array`1.System.Collections.Generic.ICollection<T>.CopyTo(T[],Int32)*/
asm.x6000037_init = function ()
{
((asm0)["System.Array`1"]((((arguments)[0].constructor.GenericArguments)["asm0.t2000006"])[0]).init)();
};;
asm.x6000037 = function (arg0, arg1, arg2)
{
asm.x6000037_init.apply(this,arguments);
return asm.x6000037_.apply(this,arguments);
};;
asm.x6000037_ = function System_Collections_Generic_ICollection_T__CopyTo(arg0, arg1, arg2)
{
var t0;
var t1;
var in_block_0;
var __pos__;
var loc2;
var loc0;
var loc1;
var loc3;
var loc4;
var loc5;
var loc6;
t0 = (((arguments)[0].constructor.GenericArguments)["asm0.t2000006"])[0];
t1 = (asm0)["System.Array`1"](t0);
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.2 */
/* IL_02: ldarg.0 */
/* IL_03: call Int32 get_Length() */
/* IL_08: ldarg.1 */
/* IL_09: ldlen */
/* IL_0A: conv.i4 */
/* IL_0B: sub */
/* IL_0D: clt */
/* IL_0E: stloc.2 */
loc2 = ((arg2 < ((asm0.x6000009(arg0) - (arg1.jsarr.length | (0|0))) | (0|0))) ? (1) : (0));
/* IL_0F: ldloc.2 */
/* IL_10: brfalse.s IL_1D */
if ((!(loc2))){
__pos__ = 0x1D;
continue;
}
/* IL_12: ldstr System.ArgumentException */
/* IL_17: call Exception GetException(System.String) */
/* IL_1C: throw */
throw asm0.x6000013(CILJS.new_string("System.ArgumentException"));
case 0x1D:
/* IL_1D: ldarg.0 */
/* IL_1E: call Int32 get_Length() */
/* IL_23: stloc.0 */
loc0 = asm0.x6000009(arg0);
/* IL_24: ldarg.0 */
/* IL_25: castclass T[] */
/* IL_2A: stloc.1 */
loc1 = CILJS.cast_class(arg0,t1);
/* IL_2B: ldc.i4.0 */
/* IL_2C: stloc.3 */
loc3 = (0|0);
/* IL_2D: ldarg.2 */
/* IL_2E: stloc.s 4 */
loc4 = arg2;
/* IL_30: br.s IL_55 */
__pos__ = 0x55;
continue;
case 0x32:
/* IL_32: nop */
/* IL_33: ldarg.1 */
/* IL_34: ldloc.s 4 */
/* IL_36: ldloc.1 */
/* IL_37: ldloc.3 */
/* IL_38: ldelem T */
/* IL_3D: stelem T */
(arg1.jsarr)[loc4] = (loc1.jsarr)[loc3];
/* IL_42: nop */
/* IL_43: ldloc.s 4 */
/* IL_45: stloc.s 5 */
loc5 = loc4;
/* IL_47: ldloc.s 5 */
/* IL_49: ldc.i4.1 */
/* IL_4A: add */
/* IL_4B: stloc.s 4 */
loc4 = (loc5 + (1|0)) | (0|0);
/* IL_4D: ldloc.3 */
/* IL_4E: stloc.s 5 */
loc5 = loc3;
/* IL_50: ldloc.s 5 */
/* IL_52: ldc.i4.1 */
/* IL_53: add */
/* IL_54: stloc.3 */
loc3 = (loc5 + (1|0)) | (0|0);
case 0x55:
/* IL_55: ldloc.3 */
/* IL_56: ldloc.0 */
/* IL_58: clt */
/* IL_59: stloc.s 6 */
loc6 = ((loc3 < loc0) ? (1) : (0));
/* IL_5B: ldloc.s 6 */
/* IL_5D: brtrue.s IL_32 */
if (loc6){
__pos__ = 0x32;
continue;
}
/* IL_5F: ret */
return ;
}
}
};
/* System.Boolean Array`1.System.Collections.Generic.ICollection<T>.Remove(T)*/
asm.x6000038_init = function ()
{
((asm0)["System.NotSupportedException"]().init)();
asm.x6000038 = asm.x6000038_;
};;
asm.x6000038 = function (arg0, arg1)
{
asm.x6000038_init.apply(this,arguments);
return asm.x6000038_.apply(this,arguments);
};;
asm.x6000038_ = function System_Collections_Generic_ICollection_T__Remove(arg0, arg1)
{
var t0;
t0 = (asm0)["System.NotSupportedException"]();
/* IL_00: nop */
/* IL_01: newobj Void .ctor() */
/* IL_06: throw */
throw CILJS.newobj(t0,asm0.x60000d9,[null]);
};
/* Array`1..ctor()*/
asm.x6000039 = function _ctor(arg0)
{
/* IL_00: ldarg.0 */
/* IL_01: call Void .ctor() */
asm0.x600002e(arg0);
/* IL_06: nop */
/* IL_07: ret */
return ;
};;
/* System.Void AsyncCallback.Invoke(IAsyncResult)*/
asm.x600003b = CILJS.delegate_invoke;;
/* System.IAsyncResult AsyncCallback.BeginInvoke(IAsyncResult,AsyncCallback,Object)*/
asm.x600003c = CILJS.delegate_begin_invoke;;
/* System.Void AsyncCallback.EndInvoke(IAsyncResult)*/
asm.x600003d = CILJS.delegate_end_invoke;;
/* AsyncCallback..ctor(Object,IntPtr)*/
asm.x600003a = CILJS.delegate_ctor;;
/* Attribute..ctor()*/
asm.x600003e = function _ctor(arg0)
{
/* IL_00: ldarg.0 */
/* IL_01: call Void .ctor() */
/* IL_06: nop */
/* IL_07: ret */
return ;
};;
/* System.AttributeTargets AttributeUsageAttribute.get_ValidOn()*/
asm.x6000040 = function get_ValidOn(arg0)
{
/* IL_00: ldarg.0 */
/* IL_01: ldfld AttributeTargets <ValidOn>k__BackingField */
/* IL_06: ret */
return (arg0)["SystemAttributeUsageAttribute<ValidOn>k__BackingField"];
};;
/* System.Void AttributeUsageAttribute.set_ValidOn(AttributeTargets)*/
asm.x6000041 = function set_ValidOn(arg0, arg1)
{
/* IL_00: ldarg.0 */
/* IL_01: ldarg.1 */
/* IL_02: stfld AttributeTargets <ValidOn>k__BackingField */
(arg0)["SystemAttributeUsageAttribute<ValidOn>k__BackingField"] = arg1;
/* IL_07: ret */
return ;
};;
/* System.Boolean AttributeUsageAttribute.get_Inherited()*/
asm.x6000042 = function get_Inherited(arg0)
{
/* IL_00: ldarg.0 */
/* IL_01: ldfld Boolean <Inherited>k__BackingField */
/* IL_06: ret */
return (arg0)["SystemAttributeUsageAttribute<Inherited>k__BackingField"];
};;
/* System.Void AttributeUsageAttribute.set_Inherited(Boolean)*/
asm.x6000043 = function set_Inherited(arg0, arg1)
{
/* IL_00: ldarg.0 */
/* IL_01: ldarg.1 */
/* IL_02: stfld Boolean <Inherited>k__BackingField */
(arg0)["SystemAttributeUsageAttribute<Inherited>k__BackingField"] = arg1;
/* IL_07: ret */
return ;
};;
/* System.Boolean AttributeUsageAttribute.get_AllowMultiple()*/
asm.x6000044 = function get_AllowMultiple(arg0)
{
/* IL_00: ldarg.0 */
/* IL_01: ldfld Boolean <AllowMultiple>k__BackingField */
/* IL_06: ret */
return (arg0)["SystemAttributeUsageAttribute<AllowMultiple>k__BackingField"];
};;
/* System.Void AttributeUsageAttribute.set_AllowMultiple(Boolean)*/
asm.x6000045 = function set_AllowMultiple(arg0, arg1)
{
/* IL_00: ldarg.0 */
/* IL_01: ldarg.1 */
/* IL_02: stfld Boolean <AllowMultiple>k__BackingField */
(arg0)["SystemAttributeUsageAttribute<AllowMultiple>k__BackingField"] = arg1;
/* IL_07: ret */
return ;
};;
/* AttributeUsageAttribute..ctor(AttributeTargets)*/
asm.x600003f = function _ctor(arg0, arg1)
{
/* IL_00: ldarg.0 */
/* IL_01: call Void .ctor() */
asm0.x600003e(arg0);
/* IL_06: nop */
/* IL_07: nop */
/* IL_08: ldarg.0 */
/* IL_09: ldarg.1 */
/* IL_0A: call Void set_ValidOn(System.AttributeTargets) */
asm0.x6000041(arg0,CILJS.clone_value(arg1));
/* IL_0F: nop */
/* IL_10: ret */
return ;
};;
/* System.String Boolean.ToString()*/
asm.x6000046 = function ToString(arg0)
{
var st_02;
var in_block_0;
var __pos__;
var loc0;
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldind.u1 */
/* IL_03: brtrue.s IL_0C */
if (arg0.r()){
__pos__ = 0xC;
continue;
}
/* IL_05: ldstr False */
st_02 = CILJS.new_string("False");
/* IL_0A: br.s IL_11 */
__pos__ = 0x11;
continue;
case 0xC:
/* IL_0C: ldstr True */
st_02 = CILJS.new_string("True");
case 0x11:
/* IL_11: stloc.0 */
loc0 = st_02;
/* IL_14: ldloc.0 */
/* IL_15: ret */
return loc0;
}
}
};;
/* System.Int32 Boolean.GetHashCode()*/
asm.x6000047 = function GetHashCode(arg0)
{
var st_02;
var in_block_0;
var __pos__;
var loc0;
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldind.u1 */
/* IL_03: brtrue.s IL_08 */
if (arg0.r()){
__pos__ = 0x8;
continue;
}
/* IL_05: ldc.i4.0 */
st_02 = (0|0);
/* IL_06: br.s IL_09 */
__pos__ = 0x9;
continue;
case 0x8:
/* IL_08: ldc.i4.1 */
st_02 = (1|0);
case 0x9:
/* IL_09: stloc.0 */
loc0 = st_02;
/* IL_0C: ldloc.0 */
/* IL_0D: ret */
return loc0;
}
}
};;
/* System.Boolean Boolean.Equals(Boolean)*/
asm.x6000048 = function Equals(arg0, arg1)
{
var loc0;
var loc1;
var loc2;
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldind.u1 */
/* IL_03: stloc.0 */
loc0 = arg0.r();
/* IL_04: ldarg.1 */
/* IL_05: stloc.1 */
loc1 = arg1;
/* IL_06: ldloc.0 */
/* IL_07: ldloc.1 */
/* IL_09: ceq */
/* IL_0A: stloc.2 */
loc2 = ((loc0 === loc1) ? (1) : (0));
/* IL_0D: ldloc.2 */
/* IL_0E: ret */
return loc2;
};;
/* System.Boolean Boolean.Equals(Object)*/
asm.x6000049 = function Equals(arg0, arg1)
{
var t0;
var in_block_0;
var __pos__;
var loc0;
var loc1;
t0 = (asm0)["System.Boolean"]();
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.1 */
/* IL_02: isinst System.Boolean */
/* IL_07: ldnull */
/* IL_09: cgt.un */
/* IL_0A: ldc.i4.0 */
/* IL_0C: ceq */
/* IL_0D: stloc.0 */
loc0 = ((((t0.IsInst(arg1) !== null) ? (1) : (0)) === (0|0)) ? (1) : (0));
/* IL_0E: ldloc.0 */
/* IL_0F: brfalse.s IL_15 */
if ((!(loc0))){
__pos__ = 0x15;
continue;
}
/* IL_11: ldc.i4.0 */
/* IL_12: stloc.1 */
loc1 = (0|0);
/* IL_13: br.s IL_24 */
__pos__ = 0x24;
continue;
case 0x15:
/* IL_15: ldarg.0 */
/* IL_16: ldarg.1 */
/* IL_17: unbox.any System.Boolean */
/* IL_1C: call Boolean Equals(System.Boolean) */
/* IL_21: stloc.1 */
loc1 = asm0.x6000048(arg0,CILJS.unbox_any(arg1,t0));
case 0x24:
/* IL_24: ldloc.1 */
/* IL_25: ret */
return loc1;
}
}
};;
/* System.Int32 Boolean.CompareTo(Object)*/
asm.x600004a = function CompareTo(arg0, arg1)
{
var loc0;
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldarg.1 */
/* IL_03: unbox.any System.Boolean */
/* IL_08: call Int32 CompareTo(System.Boolean) */
/* IL_0D: stloc.0 */
loc0 = asm0.x600004b(arg0,CILJS.unbox_any(arg1,(asm0)["System.Boolean"]()));
/* IL_10: ldloc.0 */
/* IL_11: ret */
return loc0;
};;
/* System.Int32 Boolean.CompareTo(Boolean)*/
asm.x600004b = function CompareTo(arg0, arg1)
{
var in_block_0;
var __pos__;
var loc0;
var loc1;
var loc2;
var loc3;
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldind.u1 */
/* IL_03: stloc.0 */
loc0 = arg0.r();
/* IL_04: ldloc.0 */
/* IL_05: ldarg.1 */
/* IL_07: ceq */
/* IL_08: stloc.1 */
loc1 = ((loc0 === arg1) ? (1) : (0));
/* IL_09: ldloc.1 */
/* IL_0A: brfalse.s IL_10 */
if ((!(loc1))){
__pos__ = 0x10;
continue;
}
/* IL_0C: ldc.i4.0 */
/* IL_0D: stloc.2 */
loc2 = (0|0);
/* IL_0E: br.s IL_20 */
__pos__ = 0x20;
continue;
case 0x10:
/* IL_10: ldloc.0 */
/* IL_11: ldc.i4.0 */
/* IL_13: ceq */
/* IL_14: stloc.3 */
loc3 = ((loc0 === (0|0)) ? (1) : (0));
/* IL_15: ldloc.3 */
/* IL_16: brfalse.s IL_1C */
if ((!(loc3))){
__pos__ = 0x1C;
continue;
}
/* IL_18: ldc.i4.m1 */
/* IL_19: stloc.2 */
loc2 = (-1|0);
/* IL_1A: br.s IL_20 */
__pos__ = 0x20;
continue;
case 0x1C:
/* IL_1C: ldc.i4.1 */
/* IL_1D: stloc.2 */
loc2 = (1|0);
case 0x20:
/* IL_20: ldloc.2 */
/* IL_21: ret */
return loc2;
}
}
};;
/* System.String Byte.ToString()*/
asm.x600004c = function ToString(arg0)
{
var t0;
var loc0;
t0 = (asm0)["System.Byte"]();
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldind.u1 */
/* IL_03: box System.Byte */
/* IL_08: ldc.i4.8 */
/* IL_09: call String UnsignedPrimitiveToString(System.Object, System.Int32) */
/* IL_0E: stloc.0 */
loc0 = asm0.x60000c1(CILJS.make_box(arg0.r(),t0),(8|0));
/* IL_11: ldloc.0 */
/* IL_12: ret */
return loc0;
};;
/* System.Int32 Byte.CompareTo(Object)*/
asm.x600004d = function CompareTo(arg0, arg1)
{
var loc0;
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldarg.1 */
/* IL_03: unbox.any System.Byte */
/* IL_08: call Int32 CompareTo(System.Byte) */
/* IL_0D: stloc.0 */
loc0 = asm0.x600004e(arg0,CILJS.unbox_any(arg1,(asm0)["System.Byte"]()));
/* IL_10: ldloc.0 */
/* IL_11: ret */
return loc0;
};;
/* System.Int32 Byte.CompareTo(Byte)*/
asm.x600004e = function CompareTo(arg0, arg1)
{
var in_block_0;
var __pos__;
var loc0;
var loc1;
var loc2;
var loc3;
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldind.u1 */
/* IL_03: stloc.0 */
loc0 = arg0.r();
/* IL_04: ldloc.0 */
/* IL_05: ldarg.1 */
/* IL_07: clt */
/* IL_08: stloc.1 */
loc1 = ((loc0 < arg1) ? (1) : (0));
/* IL_09: ldloc.1 */
/* IL_0A: brfalse.s IL_10 */
if ((!(loc1))){
__pos__ = 0x10;
continue;
}
/* IL_0C: ldc.i4.m1 */
/* IL_0D: stloc.2 */
loc2 = (-1|0);
/* IL_0E: br.s IL_20 */
__pos__ = 0x20;
continue;
case 0x10:
/* IL_10: ldloc.0 */
/* IL_11: ldarg.1 */
/* IL_13: cgt */
/* IL_14: stloc.3 */
loc3 = ((loc0 > arg1) ? (1) : (0));
/* IL_15: ldloc.3 */
/* IL_16: brfalse.s IL_1C */
if ((!(loc3))){
__pos__ = 0x1C;
continue;
}
/* IL_18: ldc.i4.1 */
/* IL_19: stloc.2 */
loc2 = (1|0);
/* IL_1A: br.s IL_20 */
__pos__ = 0x20;
continue;
case 0x1C:
/* IL_1C: ldc.i4.0 */
/* IL_1D: stloc.2 */
loc2 = (0|0);
case 0x20:
/* IL_20: ldloc.2 */
/* IL_21: ret */
return loc2;
}
}
};;
/* System.Boolean Byte.Equals(Byte)*/
asm.x600004f = function Equals(arg0, arg1)
{
var loc0;
var loc1;
var loc2;
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldind.u1 */
/* IL_03: stloc.0 */
loc0 = arg0.r();
/* IL_04: ldarg.1 */
/* IL_05: stloc.1 */
loc1 = arg1;
/* IL_06: ldloc.0 */
/* IL_07: ldloc.1 */
/* IL_09: ceq */
/* IL_0A: stloc.2 */
loc2 = ((loc0 === loc1) ? (1) : (0));
/* IL_0D: ldloc.2 */
/* IL_0E: ret */
return loc2;
};;
/* System.Boolean Byte.Equals(Object)*/
asm.x6000050 = function Equals(arg0, arg1)
{
var t0;
var in_block_0;
var __pos__;
var loc0;
var loc1;
t0 = (asm0)["System.Byte"]();
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.1 */
/* IL_02: isinst System.Byte */
/* IL_07: ldnull */
/* IL_09: cgt.un */
/* IL_0A: ldc.i4.0 */
/* IL_0C: ceq */
/* IL_0D: stloc.0 */
loc0 = ((((t0.IsInst(arg1) !== null) ? (1) : (0)) === (0|0)) ? (1) : (0));
/* IL_0E: ldloc.0 */
/* IL_0F: brfalse.s IL_15 */
if ((!(loc0))){
__pos__ = 0x15;
continue;
}
/* IL_11: ldc.i4.0 */
/* IL_12: stloc.1 */
loc1 = (0|0);
/* IL_13: br.s IL_24 */
__pos__ = 0x24;
continue;
case 0x15:
/* IL_15: ldarg.0 */
/* IL_16: ldarg.1 */
/* IL_17: unbox.any System.Byte */
/* IL_1C: call Boolean Equals(System.Byte) */
/* IL_21: stloc.1 */
loc1 = asm0.x600004f(arg0,CILJS.unbox_any(arg1,t0));
case 0x24:
/* IL_24: ldloc.1 */
/* IL_25: ret */
return loc1;
}
}
};;
/* System.Int32 Byte.GetHashCode()*/
asm.x6000051 = function GetHashCode(arg0)
{
var loc0;
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldind.u1 */
/* IL_03: stloc.0 */
loc0 = arg0.r();
/* IL_06: ldloc.0 */
/* IL_07: ret */
return loc0;
};;
/* System.String Char.ToString()*/
asm.x6000052 = function ToString(arg0)
{
var t0;
var loc0;
t0 = (asm0)["System.Char"]();
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldind.u2 */
/* IL_03: box System.Char */
/* IL_08: call String ToStringImpl(System.Object) */
/* IL_0D: stloc.0 */
loc0 = asm0.x6000053(CILJS.make_box(arg0.r(),t0));
/* IL_10: ldloc.0 */
/* IL_11: ret */
return loc0;
};;
/* static System.String Char.ToStringImpl(Object)*/
asm.x6000053 = function(o) { return CILJS.new_string(String.fromCharCode(o.boxed)); };;
/* static System.Boolean Char.IsDigit(Char)*/
asm.x6000054 = function(o) { return (48 <= o.boxed && o.boxed <= 57) ? 1 : 0; };;
/* System.Int32 Comparison`1.Invoke(T,T)*/
asm.x6000056 = CILJS.delegate_invoke;;
/* System.IAsyncResult Comparison`1.BeginInvoke(T,T,AsyncCallback,Object)*/
asm.x6000057 = CILJS.delegate_begin_invoke;;
/* System.Int32 Comparison`1.EndInvoke(IAsyncResult)*/
asm.x6000058 = CILJS.delegate_end_invoke;;
/* Comparison`1..ctor(Object,IntPtr)*/
asm.x6000055 = CILJS.delegate_ctor;;
/* static System.Void Console.WriteLine(Object)*/
asm.x600005a = function WriteLine(arg0)
{
var t0;
var in_block_0;
var __pos__;
var loc0;
t0 = (asm0)["System.String"]();
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldnull */
/* IL_04: ceq */
/* IL_05: stloc.0 */
loc0 = ((arg0 === null) ? (1) : (0));
/* IL_06: ldloc.0 */
/* IL_07: brfalse.s IL_16 */
if ((!(loc0))){
__pos__ = 0x16;
continue;
}
asm0.x6000142();
/* IL_09: ldsfld String Empty */
/* IL_0E: call Void WriteLineImpl(System.String) */
CILJS.console_write_line(t0.Empty);
/* IL_13: nop */
/* IL_14: br.s IL_22 */
__pos__ = 0x22;
continue;
case 0x16:
/* IL_16: ldarg.0 */
/* IL_17: callvirt String ToString() */
/* IL_1C: call Void WriteLineImpl(System.String) */
CILJS.console_write_line(((arg0.vtable)["asm0.x60000ed"]())(CILJS.convert_box_to_pointer_as_needed(arg0)));
/* IL_21: nop */
case 0x22:
/* IL_22: ret */
return ;
}
}
};;
/* static System.Void Console.WriteLine(String,Object[])*/
asm.x600005b = function WriteLine(arg0, arg1)
{
var t0;
var in_block_0;
var __pos__;
var loc0;
t0 = (asm0)["System.String"]();
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldnull */
/* IL_04: ceq */
/* IL_05: stloc.0 */
loc0 = ((arg0 === null) ? (1) : (0));
/* IL_06: ldloc.0 */
/* IL_07: brfalse.s IL_16 */
if ((!(loc0))){
__pos__ = 0x16;
continue;
}
asm0.x6000142();
/* IL_09: ldsfld String Empty */
/* IL_0E: call Void WriteLineImpl(System.String) */
CILJS.console_write_line(t0.Empty);
/* IL_13: nop */
/* IL_14: br.s IL_23 */
__pos__ = 0x23;
continue;
case 0x16:
/* IL_16: ldarg.0 */
/* IL_17: ldarg.1 */
/* IL_18: call String Format(System.String, System.Object[]) */
/* IL_1D: call Void WriteLineImpl(System.String) */
CILJS.console_write_line(asm0.x6000139(arg0,arg1));
/* IL_22: nop */
case 0x23:
/* IL_23: ret */
return ;
}
}
};;
/* Console..ctor()*/
asm.x600005c = function _ctor(arg0)
{
/* IL_00: ldarg.0 */
/* IL_01: call Void .ctor() */
/* IL_06: nop */
/* IL_07: ret */
return ;
};;
/* static System.Delegate Delegate.Combine(Delegate,Delegate)*/
asm.x600005d = function Combine(arg0, arg1)
{
var t0;
var in_block_0;
var __pos__;
var loc0;
var loc1;
var loc2;
var loc3;
var loc4;
t0 = (asm0)["System.Exception"]();
in_block_0 = true;
__pos__ = 0;
while (in_block_0){
switch (__pos__){
case 0x0:
/* IL_00: nop */
/* IL_01: ldarg.0 */
/* IL_02: ldnull */
/* IL_04: ceq */
/* IL_05: stloc.0 */
loc0 = ((arg0 === null) ? (1) : (0));
/* IL_06: ldloc.0 */
/* IL_07: brfalse.s IL_1A */
if ((!(loc0))){
__pos__ = 0x1A;
continue;
}
/* IL_09: nop */
/* IL_0A: ldarg.1 */
/* IL_0B: ldnull */
/* IL_0D: ceq */
/* IL_0E: stloc.1 */
loc1 = ((arg1 === null) ? (1) : (0));
/* IL_0F: ldloc.1 */
/* IL_10: brfalse.s IL_16 */
if ((!(loc1))){
__pos__ = 0x16;
continue;
}
/* IL_12: ldnull */
/* IL_13: stloc.2 */
loc2 = null;
/* IL_14: br.s IL_52 */
__pos__ = 0x52;
continue;
case 0x16:
/* IL_16: ldarg.1 */
/* IL_17: stloc.2 */
loc2 = arg1;
|
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {
menuItems = [
{
label: "Home",
href: ""
},
{
label: "New activity",
href: "/new"
}
];
}
|
Infertility is typically defined as a failure to conceive with unprotected sex after at least 12 months.^[@zoi200988r1]^ A previous study reported that the 12-month prevalence of infertility was 3.5% to 16.7% in higher-income nations and 6.9% to 9.3% in lower-income nations. The estimated overall median prevalence was 9%.^[@zoi200988r2]^ In Taiwan, the prevalence of infertility was estimated to be 10% to 15% according to the National Health Insurance Research Database (NHIRD).^[@zoi200988r3]^ Levine et al^[@zoi200988r4]^ conducted a systematic review and meta-regression analysis that presented evidence of a decline in sperm quality over the past decades worldwide. The male factor was estimated to be present in about 50% of infertility cases.^[@zoi200988r5]^
Although approximately 50% of patients in 1 study were labeled as having idiopathic male infertility, the known etiologic factors were congenital and acquired.^[@zoi200988r6]^ Obesity and metabolic syndrome have been recognized as factors in idiopathic male infertility.^[@zoi200988r7],[@zoi200988r8]^ Obstructive sleep apnea (OSA) has been proposed as a modulating factor in obesity and infertility.^[@zoi200988r9],[@zoi200988r10]^ The severity of OSA also correlated with the reproductive hormone after adjustment for obesity.^[@zoi200988r10],[@zoi200988r11]^ The association between OSA and testosterone has been studied previously.^[@zoi200988r11],[@zoi200988r12],[@zoi200988r13]^ The association of OSA therapy with reproductive hormones has also been investigated, but conflicting results were found.^[@zoi200988r13],[@zoi200988r14],[@zoi200988r15]^ However, to date, the association between OSA and male infertility has not been examined in a population-based study. Thus, using a large data set available in Taiwan, we conducted a nationwide nested case-control study to investigate the hypothesis that OSA is a risk factor in male infertility.
The institutional review board of the Tri-Service General Hospital approved this study and waived the requirement of individual written consent for the purpose of medical research and anonymous analysis (TSGHIRB No. B-109-09). All analyses were performed according to the Declaration of Helsinki,^[@zoi200988r16]^ and reporting followed the Strengthening the Reporting of Observational Studies in Epidemiology ([STROBE](https://www.equator-network.org/reporting-guidelines/strobe/)) guideline.^[@zoi200988r17]^
Data Sources, Study Design, and Population {#H2-1-ZOI200988}
This study collected data from the Longitudinal Health Insurance Database, a subset of the NHIRD, that are representative of the entire population of Taiwan.^[@zoi200988r18],[@zoi200988r19]^ This registry contains wide-ranging data from the National Health Insurance system in Taiwan, which was introduced in 1995 to provide comprehensive population coverage, including demographic characteristics, clinical visiting times, and disease diagnoses. The *International Classification of Diseases, Ninth Revision, Clinical Modification* (*ICD-9-CM*) diagnosis codes are used in the National Health Insurance program.
Male patients with a diagnosis of infertility (*ICD-9-CM* code 606) between January 1, 2000, and December 31, 2013, were included in the study. However, patients with azoospermia, erectile dysfunction, early ejaculation, and infertility with extratesticular causes were excluded. The *ICD-9-CM* codes that we used are summarized in eTable 1 in the [Supplement](#note-ZOI200988-1-s){ref-type="supplementary-material"}. The index date was defined as the date of infertility diagnosis. The specific exclusion criteria were age younger than 18 years; a history of underlying drug exposure, including alkylating agents, platinum, and antiepileptic medications; and a diagnosis of any of the following conditions before the index date: (1) infertility; (2) genital warts, chlamydia, gonorrhea, syphilis, and HIV; (3) epididymitis, orchitis, and mumps orchitis; (4) varicocele; (5) genital tuberculosis; (6) alcohol abuse or dependence syndrome and drug abuse or dependence; and (7) endocrine disorders, hypogonadotropic hypogonadism, cryptorchidism, testicular hypofunction, adrenogenital disorders, and thyroid disorders. We randomly selected individuals without an infertility diagnosis as the control group, and they were matched with the patient group by age, sex, and index date using a 4-fold propensity score matching. Among these control patients, those younger than 18 years and with a medical history as indicated in the exclusion criteria were excluded. The flowchart of patients is shown in eFigure 1 in the [Supplement](#note-ZOI200988-1-s){ref-type="supplementary-material"}.
A primary outcome was the risk factor of OSA. Patients with OSA were diagnosed after polysomnography and had at least 3 outpatient visits or 1 hospitalization according to the medical records between January 1, 2000, and December 31, 2013. In Taiwan, continuous positive airway pressure (CPAP) is a suggested treatment for patients with 1 of the following indications: apnea-hypopnea index higher than 40, respiratory disturbance index of 40 or higher, or persistent severe oxygen desaturation (≤85%) for more than 1 hour.
A secondary outcome was the association of OSA treatment with the risk of male infertility. The patients with OSA were divided into 4 treatment groups: (1) without management, (2) with uvulopalatopharyngoplasty (UPPP), (3) with CPAP, and (4) with both UPPP and CPAP. The OSA exposure time interval to infertility diagnosis was divided into less than 1 year (short-term interval), 1 to less than 5 years (middle-term interval), or 5 or more years (long-term interval). These exposure time intervals represent the association of OSA with male infertility.
Propensity Score Matching and Comorbidities {#H2-2-ZOI200988}
We used 1:4 propensity score matching to reduce the selection bias. The propensity score was calculated with a multivariate conditional logistic regression analysis to estimate the probability of treatment assignment according to baseline variables and comorbidities, including age, obesity, diabetes, hyperlipidemia, chronic kidney disease, hypertension, coronary artery disease, congestive heart failure, chronic obstructive pulmonary disease, cerebrovascular accident, hepatitis B virus, hepatitis C virus, liver cirrhosis, epilepsy, cancer, anxiety disorders, and depressive disorders. This approach is in accordance with that used in a previous study.^[@zoi200988r20]^
Statistical Analysis {#H2-3-ZOI200988}
All statistical analyses were performed from October 22, 2018, to April 22, 2019, using IBM SPSS Statistics, version 22 (IBM Corp). We used a 2-tailed, unpaired *t* test to analyze continuous data and a χ^2^ test to analyze categorical data for baseline characteristics. Continuous data were presented as means with SD, whereas categorical data were presented as frequencies with percentages for baseline characteristics. The multivariate conditional logistic regression model was used to investigate the odds ratio (OR) with 95% CI of patients with OSA for developing male infertility after adjusting for demographic data and medical comorbidities. Two-sided *P* \< .05 was considered to indicate statistical significance.
A total of 4607 patients (mean \[SD\] age, 34.18 \[5.44\] years) with a diagnosis of male infertility (*ICD-9-CM* code 606.x) were included in this study. A matched group of 18 428 patients (mean \[SD\] age, 34.28 \[5.81\] years) was randomly selected as the control group (eFigure 1 in the [Supplement](#note-ZOI200988-1-s){ref-type="supplementary-material"}). [Table 1](#zoi200988t1){ref-type="table"} describes the baseline characteristics of participants with or without male infertility. The substantial differences in the prevalence of hypertension, diabetes, hyperlipidemia, chronic obstructive pulmonary disease, chronic kidney disease, coronary artery disease, stroke, obesity, anxiety, and depression are noted between the study and control groups. For example, compared with the control group, the study group had a higher prevalence of OSA (3.17 vs 2.59; *P* = .02).
::: {#zoi200988t1 .table-wrap}
###### Baseline Characteristics in Participants With or Without Male Infertility
Variable No. (%) *P* value[^**a**^](#zoi200988t1n1){ref-type="table-fn"}
------------------- --------------- --------------------------------------------------------- --------------- --------
Total 23 035 (100) 4607 (20) 18 428 (80)
Age, mean (SD), y 34.26 (5.74) 34.18 (5.44) 34.28 (5.81) .31
Age group, y
18-24 725 (3.2) 145 (3.2) 580 (3.2) \>.99
25-29 4315 (18.7) 863 (18.7) 3452 (18.7)
30-34 8640 (37.5) 1728 (37.5) 6912 (37.5)
35-39 6130 (26.6) 1226 (26.6) 4904 (26.6)
40-44 2345 (10.2) 469 (10.2) 1876 (10.2)
≥45 880 (3.8) 176 (3.8) 704 (3.8)
Without 22 424 (97.4) 4461 (96.8) 17 963 (97.5) .02
With 611 (2.7) 146 (3.2) 465 (2.5)
Without 21 170 (91.9) 4167 (90.5) 17 003 (92.3) \<.001
With 1865 (8.1) 440 (9.6) 1425 (7.7)
Without 21 746 (94.4) 4292 (93.2) 17 454 (94.7) \<.001
With 1289 (5.6) 315 (6.8) 974 (5.3)
Without 22 277 (96.7) 4411 (95.8) 17 866 (97.0) \<.001
With 758 (3.3) 196 (4.3) 562 (3.1)
Without 22 594 (98.1) 4431 (96.2) 18 163 (98.6) \<.001
With 441 (1.9) 176 (3.8) 265 (1.4)
Without 22 633 (98.3) 4495 (97.6) 18 138 (98.4) \<.001
With 402 (1.8) 112 (2.4) 290 (1.6)
Without 22 381 (97.2) 4445 (96.5) 17 936 (97.3) .002
With 654 (2.8) 162 (3.5) 492 (2.7)
Without 22 832 (99.1) 4563 (99.0) 18 269 (99.1) .55
With 203 (0.9) 44 (1.0) 159 (0.9)
Without 22 502 (97.7) 4504 (97.8) 17 998 (97.7) .69
With 533 (2.3) 103 (2.2) 430 (2.3)
Without 22 612 (98.2) 4471 (97.1) 18 141 (98.4) \<.001
With 423 (1.8) 136 (3.0) 287 (1.6)
Without 21 566 (93.6) 4315 (93.7) 17 251 (93.6) .90
With 1469 (6.4) 292 (6.3) 1177 (6.4)
Without 22 870 (99.3) 4548 (98.7) 18 322 (99.4) \<.001
With 165 (0.7) 59 (1.3) 106 (0.6)
Without 22 816 (99.1) 4563 (99.0) 18 253 (99.1) .97
With 219 (1.0) 44 (1.0) 175 (1.0)
Without 22 343 (97.0) 4466 (96.9) 17 877 (97.0) .80
With 692 (3.0) 141 (3.1) 551 (3.0)
Without 22 854 (99.2) 4565 (99.1) 18 289 (99.3) .28
With 181 (0.8) 42 (0.9) 139 (0.8)
Without 22 818 (99.1) 4510 (97.9) 18 308 (99.4) \<.001
With 217 (0.9) 97 (2.1) 120 (0.7)
Without 22 694 (98.5) 4482 (97.3) 18 212 (98.8) \<.001
With 341 (1.5) 125 (2.7) 216 (1.2)
Abbreviations: CAD, coronary artery disease; CHF, congestive heart failure; CKD, chronic kidney disease; COPD, chronic obstructive pulmonary disease; HBV, hepatitis B virus; HCV, hepatitis C virus; OSA, obstructive sleep apnea.
*P* values were calculated using χ^2^ or Fisher exact test for categorical variables and *t* test for continuous variables.
In the multivariate conditional logistic regression analysis, a significantly higher risk of infertility was observed in patients with comorbidities, including hypertension (adjusted OR, 1.40; 95% CI, 1.09-2.70; *P* = .001), diabetes (adjusted OR, 2.01; 95% CI, 1.21-3.15; *P* \< .001), hyperlipidemia (adjusted OR, 1.80; 95% CI, 1.25-2.80; *P* \< .001), chronic obstructive pulmonary disease (adjusted OR, 2.13; 95% CI, 1.14-3.30; *P* \< .001), chronic kidney disease (adjusted OR, 1.70; 95% CI, 1.01-2.76; *P* = .04), coronary artery disease (adjusted OR, 1.56; 95% CI, 1.01-2.13; *P* = .04), liver cirrhosis (adjusted OR, 1.56; 95% CI, 1.09-1.99; *P* = .001), obesity (adjusted OR, 3.01; 95% CI, 1.76-8.34; *P* \< .001), anxiety (adjusted OR, 1.99; 95% CI, 1.10-3.00; *P* \< .001), and depression (adjusted OR, 2.16; 95% CI, 1.34-3.02; *P* \< .001). Patients younger than 40 years had a statistically significantly higher risk of infertility (eg, 18-24 years adjusted OR, 2.86; 95% CI, 1.87-4.26; *P* \< .001; 40-44 years adjusted OR, 1.09; 95% CI, 0.97-1.50; *P* = .16) than those aged 45 years or older (reference). Obstructive sleep apnea appeared to be an independent risk factor in infertility (adjusted OR, 1.24; 95% CI, 1.10-1.64; *P* = .003). The absolute risk was 0.204 (95% CI, 0.092-0.391). These findings are shown in [Table 2](#zoi200988t2){ref-type="table"}.
::: {#zoi200988t2 .table-wrap}
###### Factors of Infertility
Variable Crude OR (95% CI) *P* value[^**a**^](#zoi200988t2n1){ref-type="table-fn"} Adjusted OR (95% CI) *P* value[^**a**^](#zoi200988t2n1){ref-type="table-fn"}
----------------- ------------------- --------------------------------------------------------- ---------------------- ---------------------------------------------------------
Without 1 \[Reference\] 1 \[Reference\]
With 1.26 (1.16-1.69) .001 1.24 (1.10-1.64) .003
Age group, y
18-24 3.06 (1.90-5.98) \<.001 2.86 (1.87-4.26) \<.001
25-29 1.45 (1.10-2.05) \<.001 1.60 (1.10-1.90) \<.001
30-34 1.19 (1.00-1.98) .045 1.57 (1.10-1.86) .002
35-39 1.09 (0.98-1.34) .17 1.13 (1.00-1.57) .049
40-44 1.01 (0.88-1.21) .22 1.09 (0.97-1.50) .16
≥45 1 \[Reference\] 1 \[Reference\]
Without 1 \[Reference\] 1 \[Reference\]
With 1.54 (1.15-2.98) \<.001 1.40 (1.09-2.70) .001
Without 1 \[Reference\] 1 \[Reference\]
With 2.16 (1.45-3.01) \<.001 2.01 (1.21-3.15) \<.001
Without 1 \[Reference\] 1 \[Reference\]
With 1.91 (1.31-2.90) \<.001 1.80 (1.25-2.80) \<.001
Without 1 \[Reference\] 1 \[Reference\]
With 2.54 (1.60-3.80) \<.001 2.13 (1.14-3.30) \<.001
Without 1 \[Reference\] 1 \[Reference\]
With 2.11 (1.47-3.15) \<.001 1.70 (1.01-2.76) .04
Without 1 \[Reference\] 1 \[Reference\]
With 2.14 (1.24-2.99) \<.001 1.56 (1.01-2.13) .04
Without 1 \[Reference\] 1 \[Reference\]
With 1.09 (0.72-1.85) .36 1.01 (0.42-1.56) .67
Without 1 \[Reference\] 1 \[Reference\]
With 1.35 (1.01-1.57) .04 1.56 (1.09-1.99) .001
Without 1 \[Reference\] 1 \[Reference\]
With 1.01 (0.60-1.77) .49 1.12 (0.99-1.96) .06
Without 1 \[Reference\] 1 \[Reference\]
With 1.16 (1.00-1.76) .053 0.95 (0.70-1.42) .18
Without 1 \[Reference\] 1 \[Reference\]
With 4.49 (2.45-9.80) \<.001 3.01 (1.76-8.34) \<.001
Without 1 \[Reference\] 1 \[Reference\]
With 0.00 \>.99 0.00 \>.99
Without 1 \[Reference\] 1 \[Reference\]
With 1.15 (0.74-1.68) .24 1.24 (0.89-1.86) .12
Without 1 \[Reference\] 1 \[Reference\]
With 1.35 (1.06-1.80) .002 1.23 (0.91-1.75) .33
Without 1 \[Reference\] 1 \[Reference\]
With 3.72 (1.69-5.13) \<.001 1.99 (1.10-3.00) \<.001
Without 1 \[Reference\] 1 \[Reference\]
With 3.98 (1.88-5.98) \<.001 2.16 (1.34-3.02) \<.001
Abbreviations: CAD, coronary artery disease; CHF, congestive heart failure; CKD, chronic kidney disease; COPD, chronic obstructive pulmonary disease; HBV, hepatitis B virus; HCV, hepatitis C virus; OR, odds ratio; OSA, obstructive sleep apnea.
*P* values were calculated using χ^2^ or Fisher exact test for categorical variables and *t* test for continuous variables.
We used a stratified logistic regression analysis to evaluate the association of OSA with each variable. Obstructive sleep apnea appeared to be associated with an increased risk of infertility in all 13 age groups, except in those aged 40 years or older (adjusted OR, 1.09; 95% CI, 0.97-1.44; *P* = .12). Men with OSA and comorbidities had a statistically significantly increased risk of infertility ([Table 3](#zoi200988t3){ref-type="table"}). For example, among patients with OSA and infertility, compared with those without infertility, hypertension was a statistically significant risk factor (adjusted OR, 1.73; 95% CI, 1.45-2.30; *P* \< .001). Furthermore, we analyzed the joint outcome of OSA, obesity, and cardiometabolic disease. The association between OSA and male infertility was statistically significant in patients without obesity (adjusted OR, 2.94; 95% CI, 2.10-6.11; *P* \< .001) or cardiometabolic diseases (adjusted OR, 1.89; 95% CI, 1.30-2.89; *P* \< .001) after adjustment (eFigures 2 and 3 in the [Supplement](#note-ZOI200988-1-s){ref-type="supplementary-material"}).
::: {#zoi200988t3 .table-wrap}
###### Factors of Infertility Stratified by Variables
Variable Infertility Adjusted OR (95% CI) *P* value[^**a**^](#zoi200988t3n1){ref-type="table-fn"}
----------------- ------------- ---------------------- --------------------------------------------------------- -------- ------------------ --------
Overall 146 (3.2) 4607 465 (0.7) 18 428 1.24 (1.10-1.64) .003
Age group, y
18-24 5 (3.5) 145 6 (57.5) 580 3.29 (2.93-4.36) \<.001
25-29 25 (2.9) 863 80 (3.6) 3452 1.23 (1.10-1.94) .001
30-34 58 (3.4) 1728 179 (1.9) 6912 1.28 (1.14-1.85) \<.001
35-39 39 (3.2) 1226 131 (2.4) 4904 1.17 (1.05-1.56) .03
40-44 16 (3.4) 469 58 (5.9) 1876 1.09 (0.97-1.44) .12
≥45 3 (1.7) 176 11 (15.5) 704 1.08 (0.95-1.40) .25
Without 113 (2.7) 4167 404 (0.7) 17 003 1.13 (1.00-1.49) .04
With 33 (7.5) 440 61 (12.3) 1425 1.73 (1.45-2.30) \<.001
Without 125 (2.9) 4292 439 (0.7) 17 454 1.14 (1.02-1.56) .03
With 21 (6.7) 315 26 (25.6) 974 2.46 (2.11-3.27) \<.001
Without 128 (2.9) 4411 442 (0.7) 17 866 1.16 (1.03-1.53) .04
With 18 (9.2) 196 23 (39.9) 562 2.12 (1.88-3.03) \<.001
Without 125 (2.8) 4431 454 (0.6) 18 163 1.23 (1.03-1.69) .02
With 21 (11.9) 176 11 (108.5) 265 2.84 (2.02-4.99) \<.001
Without 139 (3.1) 4495 458 (0.7) 18 138 1.21 (1.08-1.60) .008
With 7 (6.3) 112 7 (89.3) 290 2.55 (1.99-3.88) \<.001
Without 131 (3.0) 4445 447 (0.7) 17 936 1.17 (1.04-1.53) .02
With 15 (9.3) 162 18 (51.4) 492 2.5 (1.99-3.40) \<.001
Without 143 (3.2) 4563 457 (0.7) 18 269 1.24 (1.12-1.69) \<.001
With 3 (6.8) 44 8 (85.2) 159 1.34 (1.19-1.70) \<.001
Without 144 (3.2) 4504 460 (0.7) 17 998 1.23 (1.10-1.70) .001
With 2 (1.9) 103 5 (38.8) 430 1.65 (1.47-2.05) \<.001
Without 143 (3.2) 4471 460 (0.7) 18 141 1.24 (1.11-1.69) \<.001
With 3 (2.2) 136 5 (44.1) 287 1.25 (1.11-1.70) \<.001
Without 141 (3.3) 4315 451 (0.7) 17 251 1.23 (1.10-1.64) .02
With 5 (1.7) 292 14 (12.2) 1177 1.42 (1.24-1.87) \<.001
Without 120 (2.6) 4548 447 (0.6) 18 322 1.07 (0.95-1.47) .27
With 26 (44.1) 59 18 (244.8) 106 2.96 (1.27-6.13) \<.001
Without 146 (3.2) 4563 465 (0.7) 18 253 1.24 (1.10-1.64) .003
With 0 (0) 44 0 (0) 175 NA NA
Without 143 (3.2) 4466 458 (0.7) 17 877 1.23 (1.10-1.64) .007
With 3 (2.1) 141 7 (30.4) 551 1.65 (1.47-2.19) \<.001
Without 145 (3.2) 4565 463 (0.7) 18 289 1.24 (1.10-1.63) .006
With 1 (2.4) 42 2 (119.1) 139 1.63 (1.43-2.19) \<.001
Without 142 (3.2) 4510 463 (0.7) 18 308 1.23 (1.06-1.63) .02
With 4 (4.1) 97 2 (206.2) 120 2.44 (1.57-3.98) \<.001
Without 138 (3.1) 4482 460 (2.5) 18 212 1.2 (1.00-1.60) .048
With 8 (6.4) 125 5 (2.3) 216 2.77 (1.41-3.91) \<.001
Abbreviations: CAD, coronary artery disease; CHF, congestive heart failure; CKD, chronic kidney disease; COPD, chronic obstructive pulmonary disease; HBV, hepatitis B virus; HCV, hepatitis C virus; NA, not applicable; OR, odds ratio; OSA, obstructive sleep apnea.
*P* values were calculated using χ^2^ or Fisher exact test for categorical variables and *t* test for continuous variables.
We divided the OSA exposure time interval into less than 1 year (short term), 1 to less than 5 years (middle term), and 5 or more years (long term) before infertility diagnosis. We found a pattern of an increasing risk of infertility associated with the increasing exposure time interval of OSA ([Table 4](#zoi200988t4){ref-type="table"}). In the exposure time interval of more than 5 years, the risk of infertility was higher in patients with OSA than in those without (adjusted OR, 1.86; 95% CI, 1.23-2.21; *P* \< .001).
::: {#zoi200988t4 .table-wrap}
###### Obstructive Sleep Apnea (OSA) Exposure Period Before Infertility Diagnosis
Exposure time interval With OSA vs without OSA \[Reference\]
------------------------ --------------------------------------- --------
Overall 1.24 (1.10-1.64) .003
\<1 y 1.17 (1.08-1.57) .02
≥1 to \<5 y 1.26 (1.12-1.67) \<.001
≥5 y 1.86 (1.23-2.21) \<.001
Abbreviation: OR, odds ratio.
ORs adjusted for the variables listed in [Table 2](#zoi200988t2){ref-type="table"}.
We evaluated the association of OSA management, including UPPP and CPAP treatment, with the subsequent development of infertility. Approximately 50% of the patients with OSA received OSA treatment in the group with infertility (n = 60) and the group without infertility (n = 246) ([Table 5](#zoi200988t5){ref-type="table"}). The patients with OSA who did not receive any treatment had a statistically significantly higher risk of infertility (adjusted OR, 1.80; 95% CI, 1.56-2.07; *P* \< .001).
::: {#zoi200988t5 .table-wrap}
###### Factors of Infertility Stratified by Treatment Type
Treatment group OSA, No. (%) With OSA vs without OSA \[Reference\]
-------------------- -------------- --------------------------------------- ------------------ --------
Overall 146 (3.2) 465 (2.5) 1.24 (1.10-1.64) .003
Without management 86 (1.9) 219 (1.2) 1.80 (1.56-2.07) \<.001
CPAP only 37 (0.8) 149 (0.8) 0.99 (0.86-1.20) .14
UPPP only 20 (0.4) 83 (0.5) 0.98 (0.84-1.13) .27
CPAP and UPPP 3 (0.1) 14 (0.1) 0.98 (0.84-1.10) .39
Abbreviations: CPAP, continuous positive airway pressure; OR, odds ratio; OSA, obstructive sleep apnea; UPPP, uvulopalatopharyngoplasty.
Obstructive sleep apnea is a common sleep disorder caused by repetitive pharyngeal collapse during sleep. This case-control study demonstrated that patients with OSA had a 1.24-fold greater risk of infertility than the control group. Young age (\<40 years) and other comorbidities, including diabetes, hypertension, hyperlipidemia, chronic obstructive pulmonary disease, coronary artery disease, chronic kidney disease, liver cirrhosis, obesity, anxiety, and depression, were independent factors in infertility. The risk of infertility increased statistically significantly with the exposure time interval of OSA. Furthermore, the patients with OSA who did not receive treatment for OSA had an increased risk of infertility.
In reviews of the existing literature, the prevalence of OSA was reported to be 4% in middle-aged (30-60 years) men and 2% in middle-aged women.^[@zoi200988r21]^ A higher prevalence in high-income countries (10% in women and 20% in men) was also reported.^[@zoi200988r9]^ Obesity was found to be the most critical risk factor,^[@zoi200988r22]^ and male sex was the second most important risk factor.^[@zoi200988r21]^ Many studies have elucidated the association between OSA and male infertility, and an analysis of polysomnography using an apnea index has been conducted.^[@zoi200988r10]^
Obstructive sleep apnea may play an important role in oxygen desaturation, hypercapnia, and sleep fragmentation, which were associated with cardiovascular, metabolic, and neurocognitive complications.^[@zoi200988r23]^ Palnitkar et al^[@zoi200988r10]^ proposed that OSA and other sleep disorders may lead to infertility through increasing oxidative stress, insulin resistance, systemic inflammation, and aberrant reproductive hormone secretion.^[@zoi200988r10]^ Previous studies have suggested several explanatory mechanisms. Nocturnal hypoxemia-related changes in the hypothalamic-pituitary-gonadal axis and sleep fragmentation were among the suggested mechanisms.^[@zoi200988r24],[@zoi200988r25]^ Several studies have also found an association between OSA and low testosterone levels.^[@zoi200988r11],[@zoi200988r12],[@zoi200988r13]^ High levels of sperm DNA fragmentation were found to be a novel factor in male infertility,^[@zoi200988r26]^ which has been associated with oxidative stress.^[@zoi200988r27]^ The high oxidative stress may have a direct association with sperm quality and fertility in patients with OSA.^[@zoi200988r27]^ In an animal model, Torres et al^[@zoi200988r28]^ indicated that chronic, high-frequency, intermittent hypoxia mimicking OSA reduced male fertility and testicle antioxidant capacity in middle-aged mice. Moreover, increased levels of proinflammatory cytokines may be associated with spermatogenesis, sperm quality, and fertility.^[@zoi200988r29],[@zoi200988r30]^ The escalation of inflammatory cytokines, including interleukin 6, tumor necrosis factor, and C-reactive protein, was reported in patients with OSA.^[@zoi200988r31]^ Findings of the previous research and the present study provide evidence that OSA is a substantial risk factor in infertility. In addition, this study observed an association between increasing exposure time interval of OSA and increased risk of infertility.
Continuous positive airway pressure is reportedly the first choice of treatment for OSA, although surgical interventions such as UPPP may be advantageous for certain groups of patients.^[@zoi200988r32]^ In this study, only approximately 50% of patients with OSA received treatment, and those who did not receive treatment had a markedly increased risk of infertility. The risk of infertility was increased without CPAP, surgical treatment, or both. However, previous studies on the treatment of OSA and reproductive hormones, such as testosterone and prolactin, had conflicting results.^[@zoi200988r14],[@zoi200988r15],[@zoi200988r32]^ These studies had limited sample size and examined different CPAP treatment durations. Therefore, results of this study support the hypothesis that the treatment of OSA decreases the risk of infertility.
Obesity and metabolic syndrome have been recognized as risk factors of male infertility.^[@zoi200988r7],[@zoi200988r8]^ In addition, OSA has been proposed as a modulating factor in obesity, metabolic syndrome, and infertility.^[@zoi200988r33]^ Because obesity-related treatment is not reimbursed in Taiwan, the true incidence of obesity might be underestimated through records of *ICD-9-CM* codes. However, it was noteworthy that, in this research, obesity was an independent risk factor in infertility after the multivariate conditional logistic regression analysis. No single *ICD-9-CM* code for metabolic syndrome was found; therefore, the association between metabolic syndrome and infertility was not evaluated in this study.
This study showed that younger age (\<40 years) was an independent risk factor in male infertility compared with age 45 years or older. In men with OSA, those younger than 40 years were more likely to become infertile. A previous study showed that young female patients had a higher risk of infertility because of higher stress levels.^[@zoi200988r20]^ A higher prevalence of anxiety and depression was found in the younger age group than in the general population.^[@zoi200988r20]^ Therefore, we applied the same model; however, we observed no statistically significant pattern in the prevalence of anxiety and depression between the age groups (eTable 2 in the [Supplement](#note-ZOI200988-1-s){ref-type="supplementary-material"}). A possible reason for this pattern might be that younger male patients compared with older men pay more attention to issues of infertility and visit the outpatient andrology clinic more often. Thus, the higher prevalence of infertility in young patients might be associated with the *ICD-9-CM* diagnosis codes used in the NHIRD.
As for the use of a health insurance database for tracking the prevalence of disease diagnoses, all cases included in this study had long-term follow-up data, rather than short-term causality data, which are often used in cross-sectional studies. Therefore, this study may support physicians by further elucidating the association between OSA and male infertility.
This study has some limitations. First, the NHIRD did not provide laboratory data and comprehensive information, including blood pressure, body mass index, work shift, family history, smoking habit, alcohol consumption, and medications or treatments at the outpatient department. The lack of these data and information might be confounding factors, which could have affected the results of this study. Second, the NHIRD did not provide data on the parameters of male infertility, such as sperm motility, sperm counts, sperm DNA fragmentation, reproductive hormone levels, or genetic karyotyping. Third, the polysomnographic data were not available. We could not associate the disease severity with the occurrence of infertility or examine the association between the degree of hypoxemia or sleep fragmentation and infertility. Fourth, although the actual exposure time to OSA was unknown, long-term exposure to OSA was definitely associated with male infertility, according to the diagnosis codes in the NHIRD. Fifth, the outcome of treatment was not evaluated because it was difficult to assess the implication of the intervention for male infertility just by using NHIRD data. We analyzed only the CPAP and UPPP treatment modalities, which were the commonly used therapies for OSA in Taiwan. A further prospective study with comprehensive information is necessary to elucidate the association of OSA treatments with male infertility in patients with OSA.
Sleep disturbance, including OSA, appeared to be associated with metabolic and neurocognitive functions, and this problem seems to be increasing in the modern era. Findings from this study appear to support the hypothesis that OSA increases the risk of infertility in male patients, and the risk is associated with the OSA exposure time interval. Moreover, OSA without management is associated with an increased risk of infertility. Early recognition of OSA and its interventions may decrease the risk of subsequent complications, including infertility.
**eTable 1.** The ICD-9-CM Codes
**eTable 2.** Percentage of Anxiety and Depression in Different Age Groups Among the Study and the Control Group
**eFigure 1.** The Flowchart of Study Design (Nested Case-Control Study) From National Health Insurance Research Database in Taiwan
**eFigure 2.** Factors of Infertility Stratified by OSA and Obesity by Using Conditional Logistic Regression
**eFigure 3.** Factors of Infertility Stratified by OSA and Cardiometabolic Disease by Using Conditional Logistic Regression
Click here for additional data file.
|
Method of photographing by varying flash trigger time and camera adopting the same
ABSTRACT
Provided herein is a method of photographing in a camera having a flash and a distance measurement unit to measure a distance from the camera to the object, which includes determining whether instructions to perform consecutive photograph are given, measuring a distance from the camera to the object, if consecutive shooting instructions are given, and determining a flash trigger time according to the result of measuring the distance, emitting a flash for the determined flash trigger time while photographing is performed, and performing the measurement and determination operation, if consecutive shooting is not completed.
CROSS-REFERENCE TO RELATED APPLICATIONS
This application claims priority to Korean Patent Application No.2003-35898 filed on Jun. 4, 2003, and Korean Patent Application No.2003-37130 filed on Jun. 10, 2003, in the Korean Intellectual Property Office, the disclosure of which are incorporated herein by reference intheir entirety.
TECHNICAL FIELD
The present invention relates generally to flash photography and, more particularly, to varying the flash trigger time of a camera based on thedistance to an object being photographed.
BACKGROUND
In general, conventional photometric methods for controlling the level of illumination for cameras can be classified into two categories:external photometric methods that use an additional photoreceivingdevice located near the camera's lens to measure brightness intensity and “through the lens” (TTL) methods in which the camera has a complex circuit and an additional viewfinder to observe an object. TTL methods are often used in single lens reflex cameras.
When photographing with a flash in a consecutive shooting mode (i.e.taking multiple photos in succession), the conventional methods have problems in that overexposure (when the distance to the subject is short) or underexposure (when the distance to the subject is long) may occur.
SUMMARY OF THE INVENTION
To solve the above and/or other problems, the present invention provides a method of photographing an object in consecutive shooting mode inwhich the level of illumination is varied according to the distance between the camera and an object being photographed.
According to an embodiment of the invention, the method comprises determining whether the camera is being instructed to take consecutive shots, measuring a distance from the camera to the object, and determining a flash trigger time according to the distance measured. The method also comprises emitting a flash for the determined flash triggertime, and repeating the steps of measuring the distance and determining the flash trigger time until instructions for taking consecutive shots are no longer being given. The method may further comprise determiningwhether photography is occurring in a low brightness environment and, ifit is determined that photography is occurring in a low brightness environment, performing the steps of measuring the distance and determining the flash trigger time.
According to an aspect of the invention, the flash trigger time may be calculated as a step function of the distance measured. The flashtrigger time may also be determined by applying a predetermined function to the measured distance.
In another embodiment of the invention, a method for photographing in a consecutive mode is provided, in which a flash trigger time varies according to whether the distance from the camera to the object is thesame in a preceding frame and a present frame. The method may include determining whether instructions to photograph are being given,photographing while emitting a flash during a predetermined flashtrigger time T1, if instructions to photograph are given, determiningwhether consecutive shooting is being performed, determining whether a flash trigger time T2 should be corrected according to a change in thedistance from the camera to the object, photographing while emitting a flash during the flash trigger time T2, and repeating the step of determining whether consecutive shooting is being performed.
According to various embodiments of the invention, a distance L1 is measured from the camera to the object, and a flash trigger time T1 is determined according to the measured distance L1. There are a variety of ways to determine the flash trigger time T1, including calculating it asa step function of the distance L1 or applying some other predetermined function to the distance L1.
In another embodiment of the invention, a corrected flash trigger timeT2 may be determined according to a change in the distance from thecamera to the object. In this embodiment, there is a method that comprises continuously determining whether photographing instructions are being given, if the camera is in a consecutive shooting mode,measuring a distance L2 from the camera to the object, if photographing instructions are being given, determining whether the distance L2 is thesame as the distance L1 in the preceding frame and, if the distance L2is not the same as the distance L1 in the preceding frame, photographing while emitting a flash during a predetermined flash trigger time T1, and correcting the flash trigger time, if the distance L2 is the same as the preceding frame.
In various embodiments of the invention, a corrected flash trigger timeT2 is determined as a step function of the distance L2 or by applying some other function to the distance L2. The corrected flash trigger timeT2 may also be calculated by increasing a CCD sensitivity gain width byΔEV, if the distance L2 is the same as the preceding frame.
In yet another embodiment of the invention, a determination is made regarding whether photography is occurring in a low brightness environment. A determination may also be made regarding whether consecutive photography is being performed. A flash is emitted during apredetermined flash trigger time T1 if photography is occurring in a low brightness environment. Otherwise, no flash is emitted.
According to another embodiment of the invention, a camera comprises a photographing mode selection unit operated by a user to generate and output a consecutive shooting mode signal, a release switch operated bythe user to generate and output a photographing instruction signal, a distance measurement unit to measure a distance L1 from the camera to anobject, a control unit to determine a flash trigger time T1 according tothe measured distance L1 and output a flash trigger signal according tothe flash trigger time T1 in response to the consecutive shooting mode signal, an illumination unit, a flash capacitor, a flash that emits a flash in response to the flash trigger signal, and an image photographing unit to photograph an object. The camera may further comprise a brightness measurement unit to measure the brightness of the environment and output a brightness signal, wherein the control unit determines the flash trigger time T1 according to the distance L1 in response to the brightness signal and outputs a flash trigger signal according to the flash trigger time T1.
According to another embodiment of the invention, a camera comprises a release switch operated by a user to generate and output a photographing instruction signal, a mode selection unit operated by the user to generate and output a consecutive shooting mode signal, a distance measurement unit to measure a distance from the camera to an object, a control unit to determine a flash trigger time according to the measured distance, compare the distances measured in a present frame and a preceding frame in response to the consecutive shooting mode signal,determine a flash trigger time corrected according to the result of the comparison, and output a flash trigger signal according to the determined flash trigger time. The camera also includes an illumination unit, a flash capacitor, and a flash, to emit flash in response to theflash trigger signal, and an image photographing unit to photograph the object.
The camera further comprises a brightness measurement unit to measure a brightness of an environment in which photographing is performed and output a brightness signal, wherein the control unit determines theflash trigger time according to the measured distance, compares the distances measured in the present frame and the preceding frame in response to the brightness signal, determines the flash trigger time corrected according to the result of comparison, and outputs a flashtrigger signal according to the determined flash trigger time.
BRIEF DESCRIPTION OF THE DRAWINGS
The above and other features and advantages of the present invention will become more apparent by describing in detail preferred embodiments thereof with reference to the attached drawings in which:
FIG. 1 is a flow chart illustrating a method of photographing accordingto an embodiment of the invention;
FIG. 2 is a flow chart illustrating Step S106 of FIG. 1 according to an embodiment of the invention;
FIG. 3 is a flow chart illustrating a method of determining the flashtrigger time T1 shown in FIG. 2 according to an embodiment of the invention;
FIG. 4 is a flow chart illustrating a method for determining the flashtrigger time T1 shown in FIG. 2 according to another embodiment of the invention;
FIG. 5 is a flow chart illustrating Step S106 of FIG. 1 according to another embodiment of the invention;
FIGS. 6 a and 6 b show a flow chart illustrating a method of photographing according to another embodiment of the invention;
FIG. 7 is a flow chart illustrating Step S120 of FIG. 6 according to an embodiment of the invention;
FIG. 8 is a flow chart illustrating a method for determining a flashtrigger time T2 shown in FIG. 7 according to an embodiment of the invention;
FIG. 9 is a flow chart illustrating Step S120 of FIG. 6 b according to another embodiment of the invention; and
FIG. 10 is a block diagram illustrating the structure of a camera adopting a photographing method of an embodiment of the invention.
DETAILED DESCRIPTION OF THE INVENTION
Referring to FIG. 1, a method of photographing according to an embodiment of the present invention includes steps S100 through S112.The method is carried out on a camera that is in a consecutive shooting mode, and varies the flash trigger time according to the measured distance between a camera and an object.
First, the camera determines whether instructions to perform consecutive shooting have been given (S100). The instructions to perform consecutive shooting can be given by a release switch included in the camera or a remote control. When the instructions to perform consecutive shooting have been given, then the camera determines whether photography is occurring in a low brightness environment (S102). If it is determined that photography is not occurring in a low brightness environment, then the camera proceeds with the photography without emitting a flash(S112).
If the camera determines that photography is occurring in a low brightness environment, it measures the distance L1 between the camera and the object (S104). After Step S104, the camera determines a flashtrigger time T1 based on the measured distance L1 (S106). After StepS106, the camera emits the flash for the time T1 while it photographs the object (S108). After Step S108, if consecutive shooting is not completed, steps S104 and S106 are repeated. Once consecutive shooting is completed, process is terminated (S110).
FIG. 2 illustrates how Step S106 of FIG. 1 may be implemented accordingto an embodiment of the invention. In this implementation, Step S106 is made up of Steps 200 through 208 in which the camera determines theflash trigger time T1 using a step function of the distance L. The step function has n steps, where n≧2. The camera compares L1 with benchmarks,referred to as 11 and 12. When the distance L1 is less than 11 (S200),the camera sets the flash trigger time T1 equal to t1 (S202). When thedistance L1 is not less than 11 and less than 12 (S204), the camera sets the flash trigger time T1 equal to t2 (S206). Once the flash triggertime T1 is determined according to the distance L1, the camera proceeds to Step S108 of FIG. 1.
Table 1 and Table 2 show embodiments of the invention in which the flashtrigger time T is determined according to a step function of thedistance L between the camera and the object. Tables 1 and 2 show values for two possible step functions, which have 4 and 3 steps, respectively.It should be noted that L and T are generic. For example, L1 or L2 canbe substituted for L, and T1 or T2 can be substituted for T. It should also be noted that the step function may be represented in a memory ofthe camera as a lookup table
TABLE 1 Dis- Shortest Short Distance Intermediate Long tance Distance(0.5 ≦ Distance (1.0 ≦ Distance L (L < 0.5 m) L < 1.0 m) L < 3.0 m) (L ≧3.0 m) Trigger 30 μs 80 μs 300 μs 4 ms Time T
TABLE 2 Intermediate Short Distance Distance Long Distance Distance L (L< 1.0 m) (1.0 ≦ L < 3.0 m) (L ≧ 3.0 m) Trigger Time T 30 μs 80 μs 300 μs
FIG. 3 is a flow chart for illustrating a method for determining theflash trigger time T based on Table 1 according to an embodiment of the invention. When the distance L1 is less than 0.5 m (S300), the camera sets the flash trigger time T1 to 30 μs (S302). When the distance L1 is less than 1 m (S304), the camera sets the flash trigger time T1 to 80 μs(S306). When the distance L1 is less than 3 m (S308), the camera sets the flash trigger time T1 to 300 μs (S310). When the distance L1 is not less than 3 m, the camera sets the flash trigger time T1 to 4 ms (S312).After performing Step S312, the camera proceeds to Step S108 of FIG. 1.
FIG. 4 is a flow chart illustrating a method of determining the flashtrigger time T based on Table 2 according to another embodiment of the present invention. When the distance L1 is less than 1 m (S400), thecamera sets the flash trigger time T1 to 60 μs (S402). When the distanceL1 is less than 3 m (S404), the camera sets the flash trigger time T1 to300 μs (S406). When the distance L1 is not less than 3 m, the camera sets the flash trigger time T1 to 4 ms (S408). After performing StepS408, the camera proceeds to Step S108 of FIG. 1.
FIG. 5 is a flow chart illustrating another way in which Step S106 of FIG. 1 may be implemented. The camera generates the flash trigger timeT1 as a predetermined function f(L) based the distance L1 measured between the camera and the object (S500). After Step S500, the camera performs Step S108 of FIG. 1. The function may be implemented in a variety of ways, and does not necessarily have to be a step function such as those illustrated in Table 1 and Table 2. The function f(L) maybe a continuous function, for example.
Referring to FIGS. 6 a and 6 b, a method of photographing according to another embodiment of the present invention includes Steps S100 throughS124, in which the camera varies a flash trigger time based on a determination regarding whether the distance between the camera and anobject is the same in the present frame as it was in the preceding frame. This method may be performed in a camera having a flash and anobject distance measurement unit. According to this embodiment, thecamera continuously checks to determine whether instructions to take a photograph have been given (S100). An instruction to take a photograph can be made by a release switch included in the camera or by a remotecontrol. When the instructions to take a photograph have been input, thecamera determines whether there is a low brightness environment (S102).If the camera determines that there is not a low brightness environment,it takes the photograph without emitting a flash (S112).
If, in contrast, the camera determines that there is not a low brightness environment, the camera measures a distance L1 between itself and the object (S104). After Step S104, the camera determines a flashtrigger time T1 based on the measured distance L1 (S106). Also afterStep S106, the camera emits a flash for the duration of time T1 while it photographs the object (S108). After Step S108 or S112, the camera determines whether consecutive shooting has been completed (S114). If consecutive shooting is completed, the camera terminates the process of FIGS. 6 a and 6 b.
But if consecutive shooting is not completed, then the camera determines whether there is a low brightness environment (S116) (FIG. 6 b). If thecamera determines that the there is not a low brightness environment,then camera photographs the object without emitting a flash (S124). It should be noted that the brightness of the lighting may have changed from the previous frame, and that, for example, the flash may have been emitted on the previous frame, but will not be emitted for the present frame. If there is a low brightness environment, the camera measures a distance L2 from itself to the object for the present frame (S118).
After Step S118, the camera compares the distance L1 of the preceding frame and the distance L2 of the present frame and determines a corrected flash trigger time T2 according to the result of comparison(S120). When the photographing method shown in FIGS. 6 a and 6 b is performed in a digital camera, in Step S120, a CCD (charge coupled device) sensitivity gain width can be corrected as much as apredetermined ΔEV, which will be described in a following description of Step S718 of FIG. 7.
Referring again to FIG. 6 b, following Step S120, the camera emits a flash for the corrected trigger time T2 while photographing the object(S122). After Step S122 or 124, the camera returns to Step S114.
FIG. 7 is a flow chart illustrating a possible implementation of StepS120 of FIG. 6 b according to an embodiment of the invention. Referring to FIG. 7, Step S120 may be implemented as Steps S700 through S718 inwhich the camera calculates a corrected flash trigger time T2 as a step function of the distance L2. The step function has n steps, where n≧2.Then, the camera determines whether the distance L1 of the preceding frame and the distance L2 of the present frame are the same (S700). Ifthe distance L1 and the distance L2 are not the same, the cameraoverwrites the distance L1 with the distance L2 and then performs StepS106 shown in FIG. 6 a. If the distance L1 of the preceding frame andthe distance L2 of the present frame are the same, the camera corrects the flash trigger time according to Steps S7014 S716. When FIG. 7 and FIG. 2 are compared, it can be seen that the time T2 according to thedistance L2 shown in FIG. 7 is shorter than the time T1 according to thedistance L1 shown in FIG. 2, except when the distance L2 is less than11.
When implemented on a digital camera, Step S718 (FIG. 7) is also performed, in which the corrected flash trigger time T2 is determined,and the CCD sensitivity gain width is increased by a predetermined ΔEV.Since the flash trigger time T2 is corrected to decrease in Steps S700through S716, the time T2 is corrected by ΔEV, for example, +1 EV, to increase the CCD sensitivity gain width. In other words, for a digitalcamera, the decrease in the flash trigger time T2 is compensated by increasing the CCD sensitivity gain width. However, when the distance L2is less than 11, since the time T2 is determined to be the minimum flashtrigger time, correction of the CCD sensitivity gain width is not needed. After the CCD sensitivity gain width is corrected, Step S122shown in FIG. 6 b is performed.
Referring to FIG. 8, a flow chart is shown that illustrates a method of determining the flash trigger time T2 shown in FIG. 7 according to an embodiment of the invention. First, is the camera determines whether thedistance L2 of the present frame is the same as the distance L1 of the preceding frame (S800). If the distances L1 and L2 are not the same, thecamera overwrites the distance L1 with the distance L2 and Step S106shown in FIG. 6 a is performed.
When the distance L2 of the present frame is the same as the distance L1of the preceding frame, the flash trigger time is corrected (S804through S812). When FIG. 8 and FIG. 3 are compared, it can be seen thatthe time T2 according to the distance L2 shown in FIG. 8 is shorter thanthe time T1 according to the distance L1 shown in FIG. 3 except when thedistance L2 is less than 11. Step S814 is performed if the camera is a digital camera. After the corrected flash trigger time T2 is determined,the CCD sensitivity gain width is increased by +1 EV. However, when thedistance L2 is less than 11, since the time T2 is determined to be the minimum flash trigger time of 60 μs, correction of the CCD sensitivity gain width is not needed. After the CCD sensitivity gain width is corrected, Step S122 shown in FIG. 6 b is performed.
FIG. 9 is a flow chart illustrating a way of implementing Step S120 of FIG. 6 b according another embodiment of the invention. This implementation of Step S120 includes Steps S900 through S906 in whichthe camera determines the corrected flash trigger time T2 by applying apredetermined function to the distance L2. First, the camera determines whether the distance L1 of the preceding frame is the same as thedistance L2 of the present frame (S900). If the distances L1 and L2 arenot the same, the camera overwrites the distance L1 with the distance L2and then performs Step S106 of FIG. 6 a (Step S906). If the camera is a digital camera, then it also performs Step S902. At Step S902, when thedistance L1 of the preceding frame is the same as the distance L2 of the present frame, the CCD sensitivity gain width is corrected by applying apredetermined function of ΔEV to the distance L2. After Step S902, thecamera determines the corrected flash trigger time T2 T1−ΔT(L2) by applying a predetermined function of ΔT(L2) to the distance L2 (S904).
FIG. 10 is a block diagram illustrating the structure of a camera configured according to an embodiment of the invention. The camera includes a release switch 100, a mode selection unit 102, a distance measurement unit 104, a brightness measurement unit 606, a control unit108, an illumination unit 110, and an image photographing unit 112. The mode selection unit 102 generates a consecutive shooting mode signal produced from the operation of a user. The release switch 100 generate sand outputs a photographing instruction signal produced from the operation of the user, to perform Step S100 of FIG. 1 and FIG. 6 a. The distance measurement unit 104 measures the distance L1 between thecamera and the object to perform Step S104 of FIG. 1. And the distance measurement unit 104 measures the distances L1 and L2 between the camera and the object, to perform Steps S104 and S118 of FIGS. 6 a and 6 b.
To perform Step S106, the control unit 108, determines the flash triggertime T1 according to the measured distance L1 and generates a flashtrigger signal. And the control unit 108, to perform Step S120 of FIG.6, compares the results of measuring the distances L1 and L2 of the present frame and the preceding frame in response to the brightness signal, determines the flash trigger time T2 corrected according to the result of comparison, and outputs a flash trigger signal according tothe determined flash trigger time T2.
The illumination unit 110 includes a power unit 110 a, a flash capacitor110 b, and a flash 110 c and a emits flash in response to the flashtrigger signal, to perform Steps S108 of FIG. 1, and Steps S108, S122 of FIGS. 6 a and 6 b. The flash 110 c can be implemented as a xenon (Xe)tube, for example.
The brightness measurement unit 106 measures the brightness of a photographing environment and outputs a brightness signal, to perform Steps S102 and S116. In a low brightness environment, the control unit108 determines the flash trigger time T1 according to the distance L1and outputs a flash trigger signal according to the time T1 to perform Step S104 of FIG. 1 and FIG. 6 a. In a low brightness environment, the control unit 108, to perform Step S120 of FIG. 6 b, compares the measured distances L1 and L2 of the present frame and the preceding frame in response to the brightness signal, determines the flash triggertime T2 corrected according to the result of the comparison, and output sa flash trigger signal according to the determined flash trigger timeT2.
The image photographing unit 112 photographs an image of the object to perform Steps S108, S112, S122, and S124.
It can be seen from the foregoing that, in the various embodiments ofthe invention that have been described, the level of illumination can be controlled according to the change in the distance between the camera and the object. Thus, when the distance with respect to the object varies continuously, in particular, when consecutive shooting is performed in a dark place, overexposure or underexposure due to short or long distances can be prevented. Also, when consecutive shooting is performed at a far distance, since the flash trigger time is corrected to be shorter, complete discharge of the flash capacitor is prevented and charging time is reduced.
While this invention has been particularly shown and described with reference to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
1. A method for taking photographs, the method comprising: determiningwhether consecutive photographs are to be taken; if it is determined that consecutive photographs are to be taken, performing further steps comprising measuring a distance from the camera to the object,determining a flash trigger time based on the measured the distance;emitting a flash for the determined flash trigger time while photographing the object; and repeating the steps of measuring a distance and determining a flash trigger time until there are no further consecutive photographs to be taken.
2. The method of claim 1, further comprising: determining whether there is a low brightness environment;and performing the steps of measuring a distance and determining a flashtrigger time based on the low brightness environment determination. 3.The method of claim 2, wherein the step of determining a flash triggertime comprises determining the flash trigger time based on a step function of the measured distance, wherein the step function includes atleast two steps.
4. The method of claim 1, wherein, the step of determining a flash trigger time comprises determining the flash triggertime by applying a predetermined function to the measured distance.
5. A method of photographing in a consecutive mode by using a flash in a camera having the flash and a distance measurement unit to measure a distance from the camera to an object, the method comprising:determining the distance from the camera to the object in a first frame;determining the distance from the camera to the object in a second frame; and varying the flash trigger time according to whether thedistance from the camera to the object is the same in first frame andthe second frame.
6. The method of claim 5, further comprising:determining whether instructions to take a photograph have been given;if it is determined that instructions to take a photograph have been given, taking a first photograph while emitting a flash during a flashtrigger time T1; determining whether a consecutive shooting is to be performed; if it is determined that consecutive shooting is to be performed, determining a flash trigger time T2 corrected according to a change in the distance from the camera to the object; and taking a second photograph while emitting a flash during the flash trigger timeT2.
7. The method of claim 6, further comprising: measuring a distanceL1 from the camera to the object; and determining the flash trigger timeT1 according to the measured distance L1.
8. The method of claim 7,wherein the flash trigger time T1 is determined based on a step function of the measured distance L1, the step function having at least two steps.
9. The method of claim 7, wherein the flash trigger time T1 is determined by applying a predetermined function to the distance L1. 10.The method of claim 6, further comprising: continuously determiningwhether photographing instructions are given; measuring a distance L2from the camera to the object; determining whether the distance L2 isthe same as the distance L1 in the preceding frame; if the distance L2is not the same as the distance L1 in the preceding frame, photographing while emitting a flash during a predetermined flash trigger time T1; and correcting the flash trigger time, if the distance L2 is the same as the preceding frame.
11. The method of claim 10, wherein the corrected flashtrigger time T2 is determined as a step function of the distance L2. 12.The method of claim 10, wherein the corrected flash trigger time T2 is determined by applying a predetermined function to the distance L2. 13.The method of claim 10, further comprising increasing a CCD sensitivity gain width by ΔEV, if the distance L2 is the same as the preceding frame.
14. The method of claim 6, further comprising: determiningwhether photographing instructions have been given; if it is determined that photographing instructions have been given, determining whether there is a low brightness environment; if it is determined that there isa low brightness environment, photographing while emitting a flash during a predetermined flash trigger time T1; if it is determine that there is not a low brightness environment, photographing without emitting a flash; and determining whether consecutive shooting is to be performed.
15. The method of claim 14, further comprising: determiningwhether consecutive shooting is to be performed; if it is determined that consecutive shooting is to be performed, determining whether thereis a low brightness environment; if it is determined that there is a low brightness environment, photographing while emitting a flash during apredetermined flash trigger time T1; if it is determine that there isnot a low brightness environment, photographing without emitting a flash; and determining whether consecutive shooting is to be performed.16. A camera comprising; a photographing mode selection unit operated bya user to generate and output a consecutive shooting mode signal; a release switch operated by the user to generate and output a photographing instruction signal; a distance measurement unit to measure a distance L1 from the camera to an object; a control unit to determine a flash trigger time T1 according to the measured distance L1 and output a flash trigger signal according to the flash trigger time T1 in response to the consecutive shooting mode signal; an illumination unit having a predetermined power, a flash capacitor, and a flash and emitting a flash in response to the flash trigger signal; and an image photographing unit to take a photograph.
17. The camera of claim 16,further comprising a brightness measurement unit to measure the brightness of an environment in which photographing is performed and output a brightness signal, wherein the control unit determines theflash trigger time T1 according to the distance T1 in response to the brightness signal and outputs a flash trigger signal according to theflash trigger time T1.
18. A camera comprising: a release switch operated by a user to generate and output a photographing instruction signal; a mode selection unit operated by the user to generate and output a consecutive shooting mode signal; a distance measurement unit to measure a distance from the camera to an object; a control unit to determine a flash trigger time according to the result of measuring thedistance, compare the results of measuring the distances in a present frame and a preceding frame in response to the consecutive shooting mode signal, determine a flash trigger time corrected according to the result of comparison, and output a flash trigger signal according to the determined flash trigger time; an illumination unit having apredetermined electric power, a flash capacitor, and a flash, to emit flash in response to the flash trigger signal; and an image photographing unit to photograph the object.
19. The camera of claim 18,further comprising a brightness measurement unit to measure a brightness of an environment in which photographing is performed and output a brightness signal, wherein the control unit determines the flash triggertime according to the result of measuring the distance, compares the results of measuring the distances in the present frame and the preceding frame in response to the brightness signal, determines theflash trigger time corrected according to the result of comparison, and outputs a flash trigger signal according to the determined flash triggertime.
|
ment given above.
Regarding bees possessing proper instinct for self-preservation at all times, when left entirely under the care of " Dame Xature," she either "forgot "to endow them with it. or did not care for their failure, or her self made a failure ; for they do not at all times succeed any better than the tender plant against the drouth, the beautiful shrub against the frost of winter, the sparrow against the hawk, the minnow against the shark, the gazelle against the anaconda, or even man against the myriad forms of michrocoxi which attack him on all sides. Only that higher philosophy can protect us. and he who lays down his Reason, relying upon her weaker sister. lustnict, will be left far be hind in the race for success.
J. F. LATHAM.
As the correspondent, under the caption of '■ Mr. Heddon's Report," on page 471, asserts that a condition favoring a semi-dormant repose, is the normal condition in which a col ony of bees must exist in order to winter successfully ; and claimed to be original in calling the attention of bee-keepers to the new (to liim) theory, perhaps a few words from some of the other " inexperienced " may not be out of place.
Without a desire to make any ad vances of a controversial character, I feel like submitting the assertion that there are few, if any ideas embodied in his article that support an origi nality of conception. Although but a 6-year-old bee-keeper, the fact that a colony of bees should be so prepared as to favor a semi-dormant or somno lent repose during winter confine ment, has not been absent from my thoughts while preparing my colonies for winter.
The first impress of the knowledge was imparted to me by an aged dame, while enjoying the whilom luxury of an open. New England, primitive tire place on a blustering winter evening. " Are the bears out to night, grand ma ? No ; the bears are some of the of the ' seven sleepers." What are the seven sleepers, grandma? The bears, the raccoons, the woodchucks (a favorite personation), the bees, the ants, the frogs, and the snakes. Do they sleep all winter, grandma ¥ No; they wake up sometimes when we
lady's classification may not be scien tifically complete, here we have the whole theory of hibernation in a nut shell without evolution or sleepy awake cogitations.
proach of cold weather, the final re quirements for their winter's suste nance are completed, and those ani mals and insects subject to such requirements by nature, retire to their dormatories to enjoy the sweets
of semi-consciousness until the re turning sun, by its genial warmth, arouses them to activity, is old. It is not apparent that the hollow tree trunk, or its similtude is indispensa ble in producing conditions necessary for hibernation. I have had strong colonies, which, judging from the quantity of fhhris on the bottom boards, scarcely broached their stores for two months in mid-winter ; and came out strong in the spring with clean combs, and with the loss of very few bees. In fact, observation thus far in my experience, has led me to the belief that such colonies pass the winter in the very best condition, the condition which our best bee-keepers are striving to attain ; and from what has just been said, the object sought can be accomplished by using the present style ot frame hives. A con dition which provokes restlessness is one serious obstacle to a favorable result. Another obstacle exists in the characteristics of the bees — idiosyn cracies, if I may be allowed to so ap ply the term.
Last winter was a severe one for bees in this vicinity ; and on prepar ing my colonies for winter, I gave them extra care, treating all alike as nearly as possible. They all (20 colo nies) passed the winter safely, and the most of them in prime condition. In a few of tlie colonies the combs had some mold on them, and a slight evidence of bee-diarrhft-a was observ able for the first time in my experi ence. Those which remained the most quiet, came through the best. As the object sought in ray winter preparations (as noted heretofore) has always been to attain a condition favoring a somnolent repose, I believe the result of my efforts have been manifested in the conduct of my bees while in winter quarters, and the gen eral satisfactory condition in which they have passed our trying (to them) spring months.
Compactness being one of first
principles of hibernation, it is as sumed by a colony of bees in repose, whether their resting place be on the " fine twig," or within the walls of the movable-frame hive ; and could a proper condition of warmth be main tained at all times, it would be a mat ter of little importance whether they occupied a partitioned half, or were allowed to roam the whole hive at will. Albeit, 1 cannot see anything original in my treatment, as the hints promoting it were culled from Prof. Cook's Manual of the Apiary, and more recently from the columns of the Bee Journal.
Again, the attitude of one claiming, at this advanced hour, the ripening fruits of so many others' culture, looks a " leetle " suspicious ; and when the mountain was delivered of the mouse, it seems that had the declaration of the wise man. that "there is nothingnew under the sun.'' received a merited notice, the claim would not have been promulgated — or at least not with such evidence of confidence in its merits as a valuable discovenj. "■ Ilonor to whom honor is due."
Keepers' Association met in Covinu; tou, on Aug. 13, 18.S4, in Walker's Hall, witli the President. Peter Me "\'ean, in the chair. This was the largest and most interesting meeting that has been held since its organiza tion. There were members present from both near and far.
After reading and approving the minutes of the previous meeting, the regular routine of business was taken up and disposed of. The President then called on the 'Vice-Presidents for essays.
The Rev. L. .Johnson, of Walton, Boone county, then read an essay on " Bees, Honey, and their General Management," which was very inter esting and beneficial to all.
Mr. Beach, of Kenton county, also read an essay entitled " Queen Rear ing," which was criticised severely. It was a very able and masterly pro duction.
There were several samples of- very fine comb and extracted honey on the table — especially the comb honey. Several parties bad some nice Italian queens for exhibition and sale ; also a one-frame observatory hive.
When the question-box was opened, we had quite a discussion, especially when the question about the pollen theory was reached. This question was asked, " Is sound pollen deleteri ous to bees in winter?" Mr. J. T. Conley, of Gallatin county, seemed to think that it was ; but with that ex ception it received a pretty severe overhauling.
Other questions were asked, such as : " How many colonies can be kept in one place with profit':'" "Is wired foundation a success for use in the brood-chamber?" " Are winter passages in the combs necessary ?" " What material is the best absorb ent ?" " How can we winter our bees the most successfully?'' "Are the Italians the best bees for profit, all things considered ?" " Which are the best bees to create a stampede, Cyp rian or Syrian ?" These questions and many others were discussed at some length, and duly considered.
On motion, a delegation of three members of this Association were appointed to attend the State Conven tion which meets at Eminence, Ky.. on Sept. 2 and 3, 1884, an adjourned meeting of which will be held at the Exposition in Louisville on Sept. 5.
The President called for reports, which resulted as follows : Kinds of bees kept, Italians principally ; kind of hives, Langsa-oth ; number of col onies, spring count, 608; natural swarms, 125, and swarms by division, 140 ; present number of colonies, 873 ; amount of comb honey, 3.792 pounds, and of extracted honey, 20,224 ; con dition the bees are in now, fair.
Several new members were added. A motion was made and carried that this convention extend to Mr. J. T. Wilson and family its sympathy in the loss of his property by fire on the night of A\ig. .5 ; and that a copv of the resolutions be forwarded to him.
|
<?php
function validarDatosUsuario($nuevoUsuario){
$errores=array();
//Validación NIF
if($nuevoUsuario["dniUsuario"]=="")
$errores[] = "El NIF no puede estar vacío.";
else if(!preg_match("/^[0-9]{8}[A-Z]$/", $nuevoUsuario["dniUsuario"])){
$errores[] = "El NIF debe contener 8 números y una letra mayúscula: " . $nuevoUsuario["dniUsuario"]. ".";
}
//Validación Nombre
if($nuevoUsuario["nombreCompletoUsuario"]=="")
$errores[] = "El nombre no puede estar vacío.";
//Validación Nick
if($nuevoUsuario["nickUsuario"]=="")
$errores[] = "El nick no puede estar vacío.";
//Validación Email
if($nuevoUsuario["emailUsuario"]==""){
$errores[] = "El email no puede estar vacío.";
}else if(!filter_var($nuevoUsuario["emailUsuario"], FILTER_VALIDATE_EMAIL)){
$errores[] = "El email es incorrecto: " . $nuevoUsuario["emailUsuario"]. ".";
}
//Validación Fecha Nacimiento
$fechaNacimiento = getFechaFormateada($nuevoUsuario["fechaNacimientoUsuario"]);
$fechaActual = getFechaFormateada('now');
if($nuevoUsuario["fechaNacimientoUsuario"]==""){
$errores[] = "La fecha de nacimiento no puede estar vacía.";
}else if($fechaNacimiento > $fechaActual){
$errores[] = "La fecha de nacimiento " . $fechaNacimiento. " no puede ser posterior a la fecha actual ". $fechaActual . ".";
}
//Validación Número Telefónico
if($nuevoUsuario["numTelefonoUsuario"]==""){
$errores[] = "El número de teléfono no puede estar vacío.";
}else if(!preg_match('/^[0-9]{9}$/', $nuevoUsuario["numTelefonoUsuario"])){
$errores[] = "El número de teléfono es incorrecto: " . $nuevoUsuario["numTelefonoUsuario"]. ".";
}
//Validación Contraseña
if(!isset($nuevoUsuario["passUsuario"]) || strlen($nuevoUsuario["passUsuario"]) < 8){
$errores [] = "Contraseña no válida: debe tener al menos 8 caracteres.";
}else if(!preg_match("/[a-z]+/", $nuevoUsuario["passUsuario"]) ||
!preg_match("/[A-Z]+/", $nuevoUsuario["passUsuario"]) || !preg_match("/[0-9]+/", $nuevoUsuario["passUsuario"])){
$errores[] = "Contraseña no válida: debe contener letras mayúsculas y minúsculas y dígitos.";
//Validación Confirmación contraseña
}else if($nuevoUsuario["passUsuario"] != $nuevoUsuario["confirmPassUsuario"]){
$errores[] = "La confirmación de contraseña no coincide con la contraseña.";
}
return $errores;
}
function getFechaFormateada($fecha){
$fechaNacimientoUsuario = date('Y/m/d', strtotime($fecha));
return $fechaNacimientoUsuario;
}
function validarOpinion($opinion){
$errores=array();
if($opinion=="" || $opinion==" "){
$errores[] = "La opinion no puede ser vacía.";
}else if(!preg_match("/^[^$%&|<>#()¬·{}~;ºª]*$/", $opinion)){
$errores[] = "La opinion no debe contener caracteres especiales: " . $opinion. ".";
}
return $errores;
}
function validarPass($passUsuario){
$errores=array();
if(!isset($passUsuario) || strlen($passUsuario) < 8){
$errores [] = "Contraseña no válida: debe tener al menos 8 caracteres.";
}else if(!preg_match("/[a-z]+/", $passUsuario) ||
!preg_match("/[A-Z]+/", $passUsuario) || !preg_match("/[0-9]+/", $passUsuario)){
$errores[] = "Contraseña no válida: debe contener letras mayúsculas y minúsculas y dígitos.";
}
return $errores;
}
function validarPerfil($nombreUsuario, $nickUsuario, $emailUsuario, $telefonoUsuario){
$errores=array();
if($nombreUsuario=="")
$errores[] = "El nombre no puede estar vacío.";
if($nickUsuario=="")
$errores[] = "El nick no puede estar vacío.";
if($emailUsuario==""){
$errores[] = "El email no puede estar vacío.";
}else if(!filter_var($emailUsuario, FILTER_VALIDATE_EMAIL)){
$errores[] = "El email es incorrecto: " . $emailUsuario. ".";
}
if($telefonoUsuario==""){
$errores[] = "El número de teléfono no puede estar vacío.";
}else if(!preg_match('/^[0-9]{9}$/', $telefonoUsuario)){
$errores[] = "El número de teléfono es incorrecto: " . $telefonoUsuario. ".";
}
return $errores;
}
?>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.