text stringlengths 1 1.04M | language stringclasses 25 values |
|---|---|
The Uttar Pradesh government on Friday constituted a committee to look into the recruitment process for filling up vacant posts of teachers in a time-bound manner. The decision comes after completing the recruitment process of over 1. 25 lakh teachers in government schools of the Basic Shiksha Parishad.
The three-member committee will seek details of vacant posts in state-run primary and upper primary schools and will also work for the creation of new posts.
The committee is headed by the chairman of the Revenue Board and will include Secretary, Basic Shiksha and Secretary, Basic Shiksha Parishad as members.
The chief minister also inquired about the teaching and learning activities in schools as normal classes for students from class 1 to 5 have resumed from September 1, the official said.
Emphasising the need for proper use of the talent of the new teachers posted in the schools, he directed officials to maintain the teacher-student ratio ideally, he said. In this connection, along with the appointment of teachers on vacant posts in schools, the chief minister called for creating new posts, according to the official. | english |
New Delhi, 13th May: The Athletics Federation of India (AFI) would like to bring to the notice of all its affiliated State Units, Departmental Sports Boards, Technical Officials, Athletes, all the Road Races (Marathon, Half-marathon, 10km, 5km etc.) organisers, sponsors and running enthusiasts that AFI has not identified, recognised or permitted any organisation, race organiser or an individual to conduct COURSE MEASUREMENT WORKSHOP under its banner.
It is informed that AFI is the apex body recognised by International Association of Athletics Federations (IAAF), Asian Athletics Association (AAA), Indian Olympic Association (IOA) and the Ministry of Youth Affairs & Sports- Government of India, for promotion, development, management and implementation of Rules & Regulations of IAAF for all athletics related activities in India.
It is noticed that some race organisers and individuals with vested commercial interests are conducting unauthorised Course Measurement Workshops by charging hefty fees from the participants.
For the benefit of public at large, especially those associated with the road races in India, the AFI strongly cautions not to fall victim or lured to such organisations/individuals who are conducting such courses for their commercial interests. The AFI considers all such workshops and course measurement workshops unauthorised and do not recognise any official trained by such organisation/individual.
| english |
Continuously stirred tank reactors (CSTR) are widely applied for various chemical reactions including catalysis, emulsion chemistry, polymerization, synthesis, extraction and crystallization. Slow reaction kinetics is a common problem in CSTR, which can easily be overcome by the application of power-ultrasonication. The intense mixing, agitation and the sonochemical effects of power-ultrasound accelerate reaction kinetics and improve the conversion rate significantly. Ultrasonicators can be easily integrated into CSTRs of any volume.
Why Applying Power-Ultrasound to a Continuously Stirred Tank Reactor?
A Continuously Stirred Tank Reactor (CSTR, or simply stirred tank reactor (STR)) is in its principal characteristics quite similar to the batch reactor. The major important difference is that, for the continuous stirred tank reactor (CSTR) setup the feed of material must be provided in continuous flow into and out of the reactor. Feeding the reactor can be achieved by gravity flow or forced-circulation flow using a pump. The CSTR is sometimes called a back-mixed flow reactor (BMR).
CSTRs are commonly used when agitation of two or more liquids is required. CSTRs can be used as single reactor or be installed as a series of configurations for different concentration streams and reaction steps. Besides the use of a single tank reactor, the serial installation of various tanks (one after each other) or the cascade setup are commonly used.
Why Ultrasonication? Ultrasonic mixing and agitation as well as the sonochemical effects of power ultrasound are well known to contribute to the efficiency of chemical reactions. The improved mixing and particle size reduction due to ultrasonic vibrations and cavitation provide a significantly accelerated kinetics and enhanced conversion rate. Sonochemical effects can deliver the necessary energy to initiate chemical reactions, switch chemical pathways, and give higher yields due to a more complete reaction.
Ultrasonically-intensified CSTR can be used for applications such as:
High-speed synthetic chemistry is a novel reaction technique used to initiate and intensify chemical synthesis. In comparison to traditional reaction pathways, which need several hours or days under reflux, ultrasonically-promoted synthesis reactors can minimize reaction duration to a few minutes resulting in a significant accelerated synthesis reaction. Ultrasonic synthesis intensification is based on the working principle of acoustic cavitation and its related forces including locally confined superheating. Learn more about ultrasound, acoustic cavitation and sonochemistry in the next section.
Ultrasonic (or acoustic) cavitation occurs when power ultrasound is coupled into liquids or slurries. Cavitation is the transition from a liquid phase into a vapour phase, which occurs due to a pressure drop down to the level of the vapour tension of the fluid.
Ultrasonic cavitation creates very high shear forces and liquid jets with up to 1000m/s. These liquid jets accelerate particle and cause inter-particle collisions thereby reducing the particle size of solids and droplets. Additionally – localized within and in close proximity of the imploding cavitation bubble – extremely high pressures on the order of hundreds of atmospheres and temperatures on the order of thousands of degrees Kelvin are generated.
Although ultrasonication is a purely mechanical processing method, it can produce a locally confined extreme temperature rise. This is due to the intense forces generated within and in close proximity to the collapsing cavitation bubbles, where easily temperatures of several thousands of degrees Celsius can be reached. In the bulk solution, the temperature increase resulting from a single bubble implosion is almost negligible, but the heat dissipation from numerous cavitation bubbles as observed in cavitation hot-spots (as generated by sonication with high-power ultrasound) can finally cause a measurable temperature increases in the bulk temperature. The advantage of ultrasonication and sonochemistry lies in the controllable temperature effects during processing: Temperature control of the bulk solution can be achieved by using tanks with cooling jackets as well as pulsed sonication. Hielscher Ultrasonics’ sophisticated ultrasonicators can pause the the ultrasound when an upper temperature limit is reached and continue with the ultrasonication as soon as the lower value of a set ∆T is reached. This is especially important when heat-sensitive reactants are used.
Since sonication generates intense vibrations and cavitation, chemical kinetics are affected. The kinetics of a chemical system correlates closely with the cavitation bubble expansion and implosion, whereby impacting the dynamics of bubble motion significantly. Dissolved gases in the chemical reaction solution affect the characteristics of a sonochemical reaction via both, thermal effects and chemical effects. The thermal effects influence the peak temperatures which are reached during bubble collapse within the cavitation void; the chemical effects modifies the effects of gases, which are directly involved in a reaction.
Heterogeneous and homogeneous reactions with slow reaction kinetics including Suzuki coupling reactions, precipitation, crystallization and emulsion chemistry are predestined to be initiated and promoted through power-ultrasound and its sonochemical effects.
For instance, for the synthesis of ferulic acid, low-frequency (20kHz) sonication at a power of 180 W gave a 94% ferulic acid yield at 60°C in 3 h. These results by Truong et al. (2018) demonstrate that the use of low frequency (horn type and high-power irradiation) improved the conversion rate significantly giving yields higher than 90%.
Heterogeneous reactions such as emulsion chemistry benefits significantly from the application of power ultrasound. Ultrasonic cavitation diminished and distributed the droplets of each phase homogeneously within each other creating a sub-micron or nano-emulsion. Since the nano-sized droplets offer a drastically increased surface area to interact with different droplets, mass transfer and reaction rate are significantly improved. Under sonication, reactions known for their typically slow kinetics show dramatically improved conversion rates, higher yields, less by-products or waste and better overall efficiency. Ultrasonically improved emulsion chemistry is often applied for emulsions polymerization, e.g., to produce polymer blends, water-borne adhesives and specialty polymers.
When you choose a chemical reactor for a chemical process there are many factors to that influence the optimum chemical reactor design. If your chemical process involves multi-phase, heterogeneous chemical reactions and has slow reaction kinetics, reactor agitation and process activation are essential influencing factors for successful chemical conversion and for economical (operational) costs of the chemical reactor.
Ultrasonication improves the reaction kinetics of liquid-liquid and liquid-solid chemical reactions in chemical batch reactors and inline reaction vessels significantly. Hence, the integration of ultrasonic probes in a chemical reactor can reduce reactor costs and improve overall efficiency and the quality of the final product.
Very often, chemical reactor engineering lacks the knowledge about ultrasonically-assisted process enhancement. Without profound knowledge about the influence of power ultrasound, ultrasonic agitation, acoustic cavitation and sonochemical effects on chemical reactor performance, chemical reactor analysis and conventional design fundamentals can produce only inferior results. Below, you will get an overview over the fundamental benefits of ultrasonics for chemical reactor design and optimization.
The Advantages of Ultrasonically Intensified Continuous Stirred Tank Reactor (CSTR)
- Ultrasonically enhanced reactors for lab and production:
Capacity and reaction speed: ultrasonically intensified reactions are faster and thereby more economical (lower costs)
- Ultrasonically enhanced reactors for lab and production:
– purging (e.g., nitrogen blanket)
- Simple cleaning: self cleaning (CIP – clean-in-place)
- Synergistic effect with other technologies, e.g., electrochemistry (sono-electrochemistry), catalysis (sono-catalysis), crystallization (sono-crystallization) etc.
- Sonication is ideal to enhance bioreactors, e.g., fermentation.
- Dissolution / Dissolving: In dissolution processes, particles pass from one phase to the other, e.g. when solid particles dissolve in a liquid. It is found that the degree of agitation influences the speed of the process. Many small crystals dissolve much faster under ultrasonic cavitation than one in conventionally stirred batch reactors. Here, too, the reason for different speeds lies in the different mass transfer rates at particle surfaces. For instance, ultrasonication is successfully applied to create supersaturated solutions, e.g., in crystallization processes (sono-crystallization).
- Ultrasonically-promoted chemical Extraction:
– Liquid-Liquid: When ultrasound is applied to a liquid–liquid extraction system, an emulsion of one of the phases in the other is created. This formation of emulsion leads to increased interfacial areas between the two immiscible phases resulting in an enhanced mass transfer flux between the phases.
How Does Sonication Improve Chemical Reactions in Stirred Tank Reactors?
- Larger Contact Surface Area: In reactions between reactants in heterogeneous phases, only the particles that collide with each other at the interface can react. The larger the interface, the more collisions can occur. As a liquid or solid portion of a substance is broken into smaller droplets or solid particles suspended in a continuous phase liquid, the surface area of this substance increases. Furthermore, as a result of the size reduction, the number of particles increases and therefore the average distance between these particles decreases. This improves the exposure of the continuous phase to the dispersed phase. Therefore, the reaction rate increases with the degree of fragmentation of the disperse phase. Many chemical reactions in dispersions or emulsions show drastic improvements in reaction speed as a result of ultrasonic particle size reduction.
- Catalysis (Activation Energy): Catalysts are of great importance in many chemical reactions, in lab development and in industrial production. Often catalysts are in solid or liquid phase and immiscible with one reactant or all reactants. Hence, more often than not, catalysis is a heterogeneous chemical reaction. In the production of the most important basic chemicals such as sulfuric acid, ammonia, nitric acid, ethene and methanol, catalysts play an important role. Large areas of environmental technology are based on catalytic processes. A collision of particles leads to a chemical reaction, i.e. a regrouping of atoms, only if the particles collide with sufficient kinetic energy. Ultrasonication is a highly efficient means to increase the kinetics in chemical reactors. In a heterogeneous catalysis process, the addition of ultrasonics to a chemical reactor design can lower the requirement for a catalyst. This can result in the use of less catalyst or inferior, less noble catalysts.
- Higher frequency of contact / Improved mass transfer: Ultrasonic mixing and agitation is a highly efficacious method to generate minute droplets and particles (i.e., sub-micron and nano-particles), which offer a higher active surface for reactions. Under the additional intense agitation and micro-movement caused by power-ultrasound, the frequency of inter-particle contact is drastically increased resulting in a significantly improved conversion rate.
- Compressed plasma: For many reactions, a 10 Kelvin increase in reactor temperature causes the reaction rate to roughly double. Ultrasonic cavitation produces localized highly reactive hotspots of up to 5000K within the liquid, without substantial heating of the overall liquid volume in the chemical reactor.
- Thermal energy: Any ultrasonic energy that you add to a chemical reactor design, will finally be converted into thermal energy. Therefore, you can reuse the energy for the chemical process. Instead of a thermal energy input by heating elements or steam, ultrasonication introduces a process activating mechanical energy by means of high-frequency vibrations. In the chemical reactor, this produces ultrasonic cavitation that activated the chemical process on multiple levels. Finally the immense ultrasonic shearing of the chemicals results the conversion to thermal energy, i.e. heat. You can use jacketed batch reactors or inline reactors for cooling in order to maintain a constant process temperature for your chemical reaction.
Hielscher Ultrasonics designs, manufactures and distributes high-performance ultrasonic homogenizers and dispersers for the integration into continuous stirred tank reactors (CSTR). Hielscher ultrasonicators are used world-wide to promote, intensify, accelerate and improve chemical reactions.
Hielscher Ultrasonics’ ultrasonic processors are available at any size from small lab devices to large industrial processors for flow chemistry applications. Precise adjustment of the ultrasonic amplitude (which is the most important parameter) allows to operate Hielscher ultrasonicators at low to very high amplitudes and to fine-tune the amplitude exactly to the required ultrasonic process conditions of the specific chemical reaction system.
Hielscher’s ultrasonic generator feature a smart software with automatic data protocolling. All important processing parameters such as ultrasonic energy, temperature, pressure and time are automatically stored onto a built-in SD-card as soon as the device is switched on.
Process monitoring and data recording are important for continuous process standardization and product quality. By accessing the automatically recorded process data, you can revise previous sonication runs and evaluate the outcome.
Another user-friendly feature is the browser remote control of our digital ultrasonic systems. Via remote browser control you can start, stop, adjust and monitor your ultrasonic processor remotely from anywhere.
Contact us now to learn more about our high-performance ultrasonic homogenizers can improve your continuously stirred tank reactor (CSTR)!
The table below gives you an indication of the approximate processing capacity of our ultrasonicators:
Contact Us! / Ask Us!
- Suslick, Kenneth S.; Didenko, Yuri ; Fang, Ming M.; Hyeon, Taeghwan; Kolbeck, Kenneth J.; McNamara, William B.; Mdleleni, Millan M.; Wong, Mike (1999): Acoustic cavitation and its chemical consequences. In: Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences Vol. 357, No. 1751, 1999. 335-353.
- Hoa Thi Truong, Manh Van Do, Long Duc Huynh, Linh Thi Nguyen, Anh Tuan Do, Thao Thanh Xuan Le, Hung Phuoc Duong, Norimichi Takenaka, Kiyoshi Imamura, Yasuaki Maeda (2018): Ultrasound-Assisted, Base-Catalyzed, Homogeneous Reaction for Ferulic Acid Production from γ-Oryzanol. Journal of Chemistry, Vol. 2018.
- Pollet, Bruno (2019): The Use of Power Ultrasound and Sonochemistry for the Production of Energy Materials. Ultrasonics Sonochemistry 64, 2019.
- Ádám, Adél; Szabados, Márton; Varga, Gábor; Papp, Ádám; Musza, Katalin; Kónya, Zoltán; Kukovecz, A.; Sipos, Pál; Palinko, Istvan (2020): Ultrasound-Assisted Hydrazine Reduction Method for the Preparation of Nickel Nanoparticles, Physicochemical Characterization and Catalytic Application in Suzuki-Miyaura Cross-Coupling Reaction. Nanomaterials 2020.
Ultrasonic agitation in chemical reactors produces better results than a conventional continuous stirred tank reactor or batchmix reactor. The ultrasonic agitation produces more shear and more reproducible results than jet stirred reactors, due to better liquid mixing and processing in the reactor tank or in the flow reactor.
Click here to learn more about the working principle, applications, and scale-up of ultrasonic homogenizers!
| english |
<reponame>raviranjan0631/SppechToText
{
"speech_to_text": {
"version": "v1",
"url": "https://stream.watsonplatform.net/speech-to-text/api",
"username": "Your Username here",
"password": "<PASSWORD>"
}
}
| json |
<gh_stars>0
#include "Duree.h"
#include "Duree.cpp"
#include <iostream>
#include <string>
int main()
{
Duree duree1(0,10,20), duree2(0,10,20);
if(duree1 == duree2)
{
std::cout << "Les deux durées sont égales" << std::endl;
}
else
{
std::cout << "Les deux durées sont différentes" << std::endl;
}
if(duree1<duree2)
{
std::cout << "Elle est plus petite" << std::endl;
}
else
{
std::cout << "Elle est plus grande" << std::endl;
}
if(duree1<=duree2)
{
std::cout << "Elle est plus petite ou égale" << std::endl;
}
else
{
std::cout << "Elle est plus grande" << std::endl;
}
if(duree1>duree2)
{
std::cout << "Elle est plus grande vraie" << std::endl;
}
else
{
std::cout << "Elle est plus petite" << std::endl;
}
if(duree1>=duree2)
{
std::cout << "Elle est plus grande vraie2" << std::endl;
}
else
{
std::cout << "Elle est plus petite 2" << std::endl;
}
duree1+=duree2;
duree1.afficher();
Duree duree3 = duree1 + duree2;
duree3.afficher();
return 0;
} | cpp |
Jonathan Frye Motorcycle Accident West Virginia: In loving memory of Jonathan Frye.
A daring team rescued a hiker and his dog after being lost in Harpers Ferry National Historical Park in West Virginia on Saturday.
Looking for the best and fun things to do in Davis, WV? There are quite some cool Davis attractions and activities to give you a fun vacation time.
| english |
India Cricket Team ace pacer Mohammed Shami is set to miss at least the first 2 Tests of the IND vs ENG Test series. Shami who suffered an ankle injury hasn’t played a game for India post the ODI World Cup final. The dependable bowler is yet to resume bowling in the nets and is therefore unlikely to be available for the opening 2 Test matches against England.
Mohammed Shami has been India’s best bowler in the ODI World Cup after being the highest wicket taker despite playing 4 matches less. But with his injury, he missed out the entire tour of South Africa.
- Why return of Virat Kohli-Rohit Sharma in T20Is could be a step backward?
But the delay continues. Shami is yet to be fit. In fact as per the latest reports, Shami is yet to start bowling in the nets. The veteran pacer will have to report to the National Cricket Academy (NCA) and prove his fitness.
“Shami hasn’t even started to bowl, he will have to go to NCA and prove his fitness. He looks doubtful for the first two Tests against England,” a source from the Indian board informed The Indian Express.
The BCCI is unwilling to Fasttrack Mohammed Shami’s recovery. Previously the BCCI announced that Shami will be available for the SA tour only if he gets fit. But now, the apex body is unwilling to risk an early comeback. India already has 2 veteran pacers for the IND vs ENG Test series in the form of Bumrah and Siraj.
With India’s preferring turning pitches in home, there is no absolute necessary for a hushed comeback for Shami. As a result, Shami when fit can get into the squad, but is most likely to miss the first 2 matches.
| english |
Bangalore: A Billion-rupee Question - Kaun Banega 'Mukhya Mantri' ?
for Daijiworld Media Network - Bangalore (MB)
Bangalore, Jun 21: For the past few days, the political circles here have been gripped by suspense and curiosity, because of several unexpected turn of events.
The handing over of the chief minister's 'gaddi' from the JD(S) to the BJP is to take place in the first week of October, 2007, in accordance with the coalition agreement reached between the two parties in early 2006.
The present CM Kumaraswamy coming out of his office in Vidhana Soudha on Thursday, June 21 - Is he counting his days, or will he get an extension of lease?
Already enough feathers have been ruffled by statements made by JD(S) supremo and former prime minister H D Deve Gowda in the past six months. First, he said B S Yediyurappa, current dyCM, or anyone else in the BJP was not mature enough to take on the mantle of chief ministership. Next he said that the hand-over would be a reality only 'Raj Dharma' - whatever that means in his dictionary - was followed by the BJP.
Then came the now-famous Iqbal Ansari bombshells during the Ullal by-election near Mangalore. Ansari, a JD(S) minister holding a prominent portfolio in the current coalition, kept on parroting that Kumaraswamy would continue to the CM even after October and that he had the support of over 100 MLAs including those from Congress and the BJP.
Ansari's statements made major headlines because on one occasion he said so during an election campaign in Ullal while the CM himself shared the dais. The CM did not respond nor did he snub Ansari for making such an explosive statement, which was likely to upset the applecart of the delicate coalition.
It embarrassed the BJP so much, yet they did not react very forcefully until the Ullal election got over. Once the result was announced, the BJP leaders blamed Ansari's statements for its defeat. Deve Gowda made a cosmetic damage control by getting a letter from Ansari undertaking not to issue statements on future leadership and related matters, and released the copies of the letter to the media. That prevented the BJP from making an issue of the matter.
However, a few latest developments have created further confusion and curiosity in the political circles in the state capital. First, K S Eswarappa, a senior BJP minister, himself a contender for the CM's post in the October switchover, and a few other ministers and dissident BJP MLAs joined a dinner meeting in a posh hotel. The state BJP leadership has reportedly taken the matter seriously, on suspicion of its being a dissidents' meet. But Eswarappa and Co have denied there being any motives behind the meeting.
Secondly, JD(S) supremo Deve Gowda paid a widely-publicized visit to the residence of 'Mukhya Mantri' Chandru on Wednesday, purportedly for breakfast. The visit almost coincided with the visit of former union minister and BJP functionary in charge of Karnataka Yashwant Sinha to Bangalore.
Chandru, a former Sandalwood actor, earned the epithet 'Mukhya Mantri' because of a role of a chief minister he had played in a Kannada movie of the same name. He has reportedly felt having been cornered in the party for too long and was disappointed when he was not made a minister in the coalition government in February 2006 nor in the process of expansion on two occasions.
During Sharma's visit, some ministers and MLAs are understood to have represented to him against election of Yediyurappa to the CM's post in October. Interestingly, one of the reasons cited by them is Yediyurappa's decision to put his protege, MLC Shobha Karandlaje, in charge of the campaign in Ullal. Her very presence spoilt the party for the BJP in the election equations, feels the anti-Yediyurappa camp.
It is an open secret that two strong factions have been operatiing within the BJP in the state. One is of Yediyurppa and other is under the leadership of MP Anant Kumar from Bangalore. Yediyurappa belongs to the politically powerful community of Lingayats, while Anant Kumar is a Brahmin. So the caste factor is also very powerful.
The Anant Kumar faction has openly expressed dissatisfaction over Yediyurappa's style of functioning as deputy chief minister. His camp has reportedly submitted enough charges against Yediyurappa to Yashwant Sinha on June 21, said a party insider to this correspondent. Sources said that Anant Kumar is sparing no effort in ensuring that Yediyurappa is deprived of the CM's post. Sources close to him said Kumar himself would not be averse to the idea of becoming a compromise candidate for chief ministership. At least 20 BJP MLAs have expressed their opposition to Yediyurappa's ascent to the CM's gaddi. However, Yediyurappa and Kumar showed a semblance of unity in the presence of Sinha on Thursday.
Some of them are said to have demanded to change the party leadership from the hands of D V Sadananda Gowda, who is a staunch supporter of Yediyurappa. In all this muddle, many JD(S) leaders are said to be not in favour of transfer of power to the BJP and hence trying to win over the disgruntled members the BJP to form a fresh government under H D Revanna, another son of H D Deve Gowda and a present minister in the coalition government.
The smart operator and manipulator that he is, H D Deve Gowda, may himself be not in favour of transfer of power, feel many BJP insiders.
Congress cannot do much in the situation, but would definitely gleefully welcome the fall of the present government, which could ultimately pave the way for fresh, mid-term elections. Even if that happens, the JD(S) camp would still be happy, since Kumaraswamy could still continue as the caretaker CM until the elections.
All said and done, the question still making rounds in the political circles is - Kaun Banega Mukhya Mantri, Yediyurappa, Anant Kumar, Eswarappa or Revanna? Or would a dark horse like Chandru, who could be reel-life-to-real-life Mukhya Mantri, emerge, perhaps with the support of H D Deve Gowda?
Let's keep our fingers crossed. | english |
<reponame>manulera/YeastDatabase<filename>public/data/genes_json/SPBC17D1.05.json
{"other_ids": [], "mRNA_sequence": [{"index": 0, "type": "five_prime_UTR", "sequence": "CACAATTGGCAGGAAATTTTTTTTGAAGTAAACAACGTTTGGTTAAAACTTTGAAAATAGGCCAATTTCAAAAAAACAACGAGTTGTCTTT"}, {"index": 1, "type": "CDS", "sequence": "ATGTCGTTTGTAGATGGAGTCAACAGTTGGTTTTCGGCCGCTTCTTATTGGGATGGGCTCGGTCCAACAAATGTTGTTCAGCCAGAGGACGATTTGGCTTTTGTAAGTCAATTTGAAGAAGTTGAATCGGCTTATGACAATCTCGTAAAAAATGGTATGATTGCACCTCGTCGAAAAAATAGTTTTGCCTCCTCAGTGAACAACCCCTTTTCGACGAGTGCATTGAGCGAAGCCTTAAATGGCAGTGTTTCAATGAGTCATGTTCCCAGCTCTGGTTTGTTAAAAAGCACACTTTCGAGCACCCCTACTGCAGGCTCTAATCTGCTGGGTACGTCTCCTGCTGAACCGGCAAGTGGTTTGGTCGGTTCTAGTGGTTTTGGTTCCAGCATGCTCGGAAGCTCGTTACCAGGTAATGCTACTTCCAATTTCGGTTCACAAGCTAGTACCTCATTACTACATCCCAGGAGATCCACAACGTCTTTGCTCTCTAGTAGTGCTCATCATTCACGTTCTTCGTATTATGATCTTGCTACTCCGACACGCTCCTCCTTTTCTTACAATACTGTCGGTGCTGCTAGTTTACCATCTGGTGGGCTTTCTAATCTCTCCTCTTCATTGCGTTCTTCTTCAAAATCGGCTGGGTTTTCGTTGTTTGAATCTGCTTCAAATAGCTTTACGCCCTCTTCTTTCATAGAGTCCGCTAACATGGAATCTTTATCGATTCCTTCTCGTCGTCGACCTTCATCGATAGCTCCGATCGGTACGCGTCCTTCTCGTAAAGAGATCGCATTCAGTAATAGTTCTACTCCTACTGACCAAACGCTGAGGCCTCCAAATCCACCGGCTGCCAATGGAAATGCCACACCAGTTACAGCAGTGAACAATGTTTCTGCTGTTGCTGATTCTCCGCAGTCCACTGGCTCTTCTGTTTCTTCTTCACTACCAACACTAAGTTTGGACTTCAAGCAAGAATACAGCGGGAACAATCATGATATGTCTGGATTGTCTTCCTCTCTATCTAAATCTCATAACTCAACTTCTGCTTTAAGTTCTCAGATTTGGTCTTCTCCCTGTGCCAGTACTCTTGGAGGTGTCAACGTGTGGTAA"}, {"index": 2, "type": "three_prime_UTR", "sequence": "TTGCTACATTTTCTTGATGCGGAACTTTCTTGGACACGGAATAGTATTTTATTTATAGGTTGAGCTTTGAAGGTTGTGATCTATTACTTTATAATTTTAATTCTTTTGCATTTGTGGGCATTCTGTTGTTTTAAAGCGCTCATTGGAAACTTATTCGAATAAGATAAGGAAATCTAATATTGGTGCTGATGATTTCTATCCTAATATTGTGAGCATAAGATATTTCTTTATTTTCTAAAAATGGAAAACAGAAAAATTGTAACTTTTTTGTTAAATAAGTTGCCGGCAATTTTTTAATTCGCTTTCACTTTTATGTTTTTTAAAAGTGTTTCACGAATTGTCGACGTTGCTTAAAGGTATGGTTTTTTTTCCTAAGAACTTTTGAGTGTGGGAAGGGTTTTTGCTTGGTTGAATAGTTTGTTTTGTGAGAAGGTTCTGGATTGAAGAAAATGTCAAGTTACTTGACTATTACTTTCGGCACATAGGTTTATGGTGATAAATCTTTGCATTTTCTTGACAAAAGAGAGGACAGTGGTTAAAAATGGGAGAGTTAGATATTTCTATTGGTATTTAGTTTGAACTATCAAAGTTAGGGGATTCTTATCGTACATGGGTATACTACTCTTGAGTGCATCGCATGCTTCTTGTCACAGCAAACGGCATGGTCAATCGCATTTGAGTCTAGGTTGTTGGTTTTTATGATATTACGTCTGTGCAGAAGTTTTGTCTTTCACAGGCCATCGTGCTCTTTATCTGGATTTATTTCAGGGGGGTGAATCAACAGCATAAAGATGTAAATATTTTTTTAAAATTTTAAGTAGCCAAATTTCAAAATCAATTTTATTTTACTTGATAAACTAGATTTGGTTAGAAATTATTTTTTTTATTAATAATTTATAGTATTTAATTCACATATATAAAGCAAACCTGGAC"}], "other_names": [], "id": "SPBC17D1.05", "name": ""} | json |
from django.shortcuts import get_object_or_404
from slack_bot.models import SlackUser
def bot_info_api(query):
user = get_object_or_404(SlackUser, uid=query.upper())
username = user.user_name
name = user.name
eno = user.eno
room_no = user.room_no
bhawan = user.get_bhawan_display()
phone_no = user.phone_no
phone_no_alt = user.phone_no_alt
email = user.email
email2 = user.email2
user_tuple = (username, name, eno, room_no, bhawan, phone_no, email)
user_data = \
""" \
Username: %s
Name: %s
E. No.: %s
Room No: %s
Bhawan: %s
Phone No: %s
Email: %s
""" % user_tuple
return user_data
| python |
<reponame>Toska12138/xeokit-bim-viewer<filename>app/data/projects/HDB/models/design/objects/2gn2DrlTDFbvAkYqzdTmr0.json<gh_stars>1-10
{"id": "2gn2DrlTDFbvAkYqzdTmr0", "name": "M_Transition - Generic1:Standard 3:443816", "type": "IfcFlowFitting", "parent": "3bursSwfT1t8la7q8Hwx98", "info": ""} | json |
Angry Barcelona fans chanted for the resignation of the club president Josep Maria Bartomeu after captain Lionel Messi announced on Tuesday that he wished to leave the Catalan side.
"We love you, Messi stay, Messi stay!" and "Bartomeu resign!" chanted several hundred fans outside Barcelona's Camp Nou stadium on Tuesday night.
The decision by the Argentine forward has thrown the club into turmoil less than two weeks after their humiliating 8-2 Champions League defeat by Bayern Munich.
"It's a huge outrage. I never thought this would ever happen ... you can take defeats in sports but I can't handle Messi leaving," said Oriol, 40. "We will defend him until death. He is not the one to blame. The blame is on (Barcelona's) board."
Messi, who has been named world's best player of the year a record six times, has grown increasingly unhappy over the last 12 months on how the club is being run under Bartomeu. He criticised club officials for forcing players to take a pay cut to cope with the financial hit of the coronavirus pandemic.
Albert, 28, another disgruntled Barca fan, said while wearing a face mask: "They have been doing things badly for a long time and this guy (Messi) has got tired of not having a project, of not keeping the philosophy we used to have ... and he said enough is enough."
"The only situation available right now is for him (Bartomeu) to resign."
After Barca surrendered the Spanish La Liga title to Real Madrid in July, Messi slammed the team as "weak" and "vulnerable" during an uncharacteristically fiery post-match interview.
Barca are in the midst of overhauling their squad following the Champions League defeat, and some Spanish media have reported that new coach Ronald Koeman told Messi's close friend and strike partner, Luis Suarez, that he does not wish the Uruguayan to stay at the club.
| english |
package com.commercetools.sunrise.httpauth.basic;
import com.commercetools.sunrise.httpauth.HttpAuthentication;
import org.junit.Test;
import play.Application;
import play.inject.guice.GuiceApplicationBuilder;
import play.libs.ws.WS;
import play.libs.ws.WSAuthScheme;
import play.libs.ws.WSClient;
import play.libs.ws.WSResponse;
import play.mvc.Http;
import play.routing.Router;
import play.routing.RoutingDsl;
import play.test.WithServer;
import static org.assertj.core.api.Assertions.assertThat;
import static play.inject.Bindings.bind;
import static play.mvc.Results.ok;
public class BasicHttpAuthenticationFilterTest extends WithServer {
private static final String USERNAME = "username";
private static final String PASSWORD = "password";
private static final String REALM = "My Realm";
private static final String URI = "/";
@Override
protected Application provideApplication() {
final Router router = new RoutingDsl()
.GET(URI).routeTo(() -> ok())
.build();
return new GuiceApplicationBuilder()
.configure("play.http.filters", "com.commercetools.sunrise.httpauth.basic.BasicHttpAuthenticationFilters")
.overrides(
bind(HttpAuthentication.class).toInstance(new BasicHttpAuthentication(REALM, USERNAME + ":" + PASSWORD)),
bind(play.api.routing.Router.class).toInstance(router.asScala()))
.build();
}
@Test
public void authorizedWhenEnabledAndCredentialsProvided() throws Exception {
try (WSClient wsClient = WS.newClient(testServer.port())) {
final WSResponse response = wsClient
.url(URI)
.setAuth(USERNAME, PASSWORD, WSAuthScheme.BASIC)
.get().toCompletableFuture().get();
assertThat(response.getStatus()).isEqualTo(Http.Status.OK);
}
}
@Test
public void unauthorizedWhenEnabledAndWrongCredentialsProvided() throws Exception {
try (WSClient wsClient = WS.newClient(testServer.port())) {
final WSResponse response = wsClient
.url(URI)
.setAuth(USERNAME, "wrong", WSAuthScheme.BASIC)
.get().toCompletableFuture().get();
assertThat(response.getStatus()).isEqualTo(Http.Status.UNAUTHORIZED);
assertThat(response.getHeader(Http.HeaderNames.WWW_AUTHENTICATE)).isNull();
}
}
@Test
public void unauthorizedWhenEnabledAndNoCredentialsProvided() throws Exception {
try (WSClient wsClient = WS.newClient(testServer.port())) {
final WSResponse response = wsClient
.url(URI)
.get().toCompletableFuture().get();
assertThat(response.getStatus()).isEqualTo(Http.Status.UNAUTHORIZED);
assertThat(response.getHeader(Http.HeaderNames.WWW_AUTHENTICATE)).contains(REALM);
}
}
}
| java |
<filename>kirppu/migrations/0023_box_bundle_size.py
# -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-08-05 11:13
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('kirppu', '0022_separate_vendor_person'),
]
operations = [
migrations.AddField(
model_name='box',
name='bundle_size',
field=models.IntegerField(default=1, help_text='How many items are sold in a bundle'),
),
]
| python |
The second part of Mani Ratnam's high budget epic retelling of Kalki's 'Ponniyin Selvan' is all set to release worldwide on April 28th. A week prior to that on the 21st 'Yaathisai' comes to the big screen creating a social media debate as to which is more authentic in bringing Tamil culture on screen. Will the film made by a rank new team with a miniscule fraction of the budget of 'PS-2' strike a chord with the audience remains to be seen.
Set in the 7th century the Einar clan that has lost its kingdom years back is living in the forests leading a near barbaric life. On the other hand the valiant Pandyan king Ranadheeran (Shakthi Mithran) has decimated the Cheras, Cholas and the smaller clans. The Pandyas are ruling the entire Thamilagam with the reputation of being unconquerable. Kothi (Seyon) is a young Einar warrior who dreams of fathering a child who would be king right when he is born. There is a Devadasi (Rajalakshmi) living in the Madurai palace who yearns for her Kannan to come and rescue her. The rest of 'Yaathisai' is whether Kothi can vanquish Ranadheeran and regain lost glory of his clan or not.
The entire cast consists of actors with ordinary faces that suit the vision of the filmmaker. Shakthi Mithran may be diminutive but makes up for it with his beefed up physique and majestic body language in bringing to life the role of the all conquering warrior ruler. Seyon who can be termed as the protagonist Kothi is very convincing as the ambitious warrior who brings to the fore his primal instincts during the killings and in handling the women. Both of them have given their all in the one on one fight to death in the climax and deserve high praise for their hard work. Rajalakshmi as the devadasi is also aptly cast considering the tone of the film. Guru Somasundram lives the part of the Einar talisman hiding under the hideous makeup for the role with his voice dominating in those scenes. The rest of the cast have all done a good job, most notably the mute friend of Kothi who sacrifices his life for him.
What works best in 'Yaathisai' is the detailing that has gone into reimagining the 7th century Tamilakam, right from the barbaric rituals to appease the goddess Kotravai to the feasting on raw meat and solid milk discarded by cows that have lost their calves. The team has worked real hard in making the cast speak ancient Tamil. Showing the dance form Dasiyattam (that inspired Bharatanatyam) and the ritual of recording marriages on leaves (Olai chuvadi) lends even more authenticity to the depictions. Through Kothi the film questions why only certain clans are privileged to rule, the dominance of the Aryans in temples and the devadasi system. At the same time it also does not shy away from pointing out the patriarchal mindset of both Ranadheeran and Kothi who see women as nothing more than objects that give them bodily pleasure and beget children. The emphasis of the entire film is on authority which was and is the order of the day and one who has it gets all that he wants.
On the flip side, since both Ranadheeran and Kothi have very similar characterisation the audience are unable to empathise with either. The devadasi heroine could have had more space in the writing and the screenplay could have been from her perspective to balance that gaping flaw. After a point the novelty in the fights wear off and the constant warring between the two sides brings fatigue. There is also confusion in who is fighting whom in several instances.
Stunt choreographer Om Siva Prakash has made heads turn with his variety of fight sequences from brutal bludgeoning with ancient weapons to the savage one on one at the end. Akilesh Kathamuthu the cinematographer has not only made the film look grand with his wides of the forests and the hilltops but also in getting close with the riveting action. The editing, art direction, costume design and other technicalities are all top notch. Producer K.J.Ganesh deserves first honors for believing in such an ambitious project from a team that has no credentials. Dharani Rasendran has come up with a masterclass in how to make a world class historical movie with a small budget. His authority over the subject matter that clearly came from extensive and painstaking research shows on screen. Kudos.
Verdict : Go for this well crafted historical fantasy that deserves to be lauded for sheer hard work in all aspects.
| english |
{"fits": "/home/fphysics/edelen/20211210/saved_fits/", "images": "/home/fphysics/edelen/20211210/saved_images/", "monitoring": "/home/fphysics/edelen/20211210/monitoring/", "summaries": "/home/fphysics/edelen/20211210/summaries/", "raw_saves": "/home/fphysics/edelen/20211210/raw_saves/", "emit_saves": "/home/fphysics/edelen/20211210/emit_saves/", "mon_saves": "/home/fphysics/edelen/20211210/mon_saves/", "xopt_saves": "/home/fphysics/edelen/20211210/xopt_saves/"} | json |
# Manuscript
The peer-reviewed manuscript is
> <NAME>, <NAME>, <NAME>. (2017) Atropos: specific, sensitive, and speedy trimming of sequencing reads. PeerJ 5:e3720 https://doi.org/10.7717/peerj.3720
See the [manuscript folder](manuscript/README.md) for details on how the manuscript was created.
The version of Atropos used in the peer-reviewed manuscript can be found at: https://github.com/jdidion/atropos/releases/tag/1.1.5. Note that additional tools have been added, tool versions (including Atropos) have been updated, and the workflow has been modified since publication. These changes will eventually be refelected in an updated preprint on BioRxiv.
# Overview
The scripts in this directory will enable you to re-run the analyses in the Atropos paper. The workflows defined here run the benchmarks and generate the figures and tables shown in the paper.
We have created [Docker](https://www.docker.com/) images for all of the software tools used, as well as data volumes containing all the raw data and resources. These images can be used directly on Mac, Windows, and some linux platforms using the Docker engine. On unsupported linux platforms (namely RedHat and derivatives, such as Scientific Linux), [Singularity](http://singularity.lbl.gov/) or [Udocker](https://github.com/indigo-dc/udocker) can be used to execute the containers directly from Docker Hub. The versions of the tools used in the paper are noted in the Dockerfile headers, and also in the supplementary data.
Our workflows are written in [Nextflow](https://www.nextflow.io/index.html), primarily because it supports Docker, Singularity, and Udocker, which we need to run benchmarks on both desktop and RedHat-based HPC cluster. We also provide [CWL](http://www.commonwl.org/) tool definitions to simplify the development of alternate workflows.
Each workflow (.nf file) runs the analysis for one data type (RNA-Seq, WGBS, or simulated DNA-Seq). We provide a configuration file with profiles we used for both the local and cluster executions. Our cluster runs SGE, so you may need to alter the cluster configuration files for your environment.
# 1. Install software
* You will need a [Docker](https://www.docker.com/) engine if you want to build the containers yourself. If you only want to run the containers, you can use either Docker, [Singularity](http://singularity.lbl.gov/), or [Udocker](https://github.com/indigo-dc/udocker).
* [Nextflow](https://www.nextflow.io/index.html), which requires Java 7+.
# 2. Build containers
All of the containers defined in the 'containers' subdirectory have already been built and pushed to Docker Hub, with two exceptions: the data containers for the STAR indexes (data/hg37/star-index and data/hg38/star-index) are too large to be pushed to Docker Hub or Quay.io. Thus, you will unfortunately need to build at least one of them yourself. We use GRCh38 in the paper, so to build that container, clone data/hg38/star-index and run the build.sh script in that directory.
First, the default Docker repository size (32G) is too small to build the star index containers, so you need to increase the repository size. This requires that you're running the [Docker "Edge" build](https://store.docker.com/editions/community/docker-ce-desktop-mac). Now increase the disk size following the instructions [here](https://forums.docker.com/t/increase-docker-container-disk-space-on-os-x/26725/2).
For full reproducibility, you are free to build the containers yourself, but you'll need to create your own account on Docker Hub, and you'll need to update the scripts to push/pull containers from your own repository. Build all the tool containers, then build all the data containers.
In general, for each tool container, run the following sequence of commands:
# Build the container
docker build -f Dockerfile -t <your repo>/<tool name> .
# Upload the container to your Docker Hub repo
docker push <your repo>/<tool name>
For each data container, run the following sequence of commands:
# Download the data and build the docker container
./build.sh
# Upload the container to your Docker Hub repo
docker push <your repo>/<data name>
Note that you can create a .tar archive of any container using the `docker save` command, and you can load a saved container using the `docker load` command. This is especially useful for the star index container(s).
On a technical note, we use Phusion (https://hub.docker.com/r/phusion/baseimage/) as the base image for the containers for the tools we benchmark. This is primarily for convenience and comparability (i.e. removing base image as a variable); you could build smaller images using Alpine with a little extra work.
# 3. Run the workflows
Clone the files in the 'workflow' directory, including the 'bin' subdirectory. In the 'workflow' directory, first edit the nextflow.config file and customize it to your own computing environment.
On our cluster, we run the scripts from a subdirectory under /scratch. At runtime, /scratch is replaced with /spin1/scratch, hence the beforeScript command to cd back to /scratch to avoid confusing Nextflow.
If you are running Docker, you'll likely need to increase the number of CPUs and memory limit to match what you've configured. This can be found in the Docker preferences on the "Advanced" tab.
Now run:
./run-workflows.sh <env>
Where <env> is either 'local' or 'cluster'. Note that the first time you run this it will download several Docker images requiring ~[XX] GB of disk space.
All results will be placed in the 'results' subdirectory (unless you change the path in nextflow.config).
Note that when re-running the workflow and comparing the results to those shown in the manuscript, there will be some variability in the performance metrics, but the relative rankings of the tools should not change significantly -- please let us know if you find otherwise!
# Non-Docker Systems
Unfortunately, the ideals of easily reproducible research don't yet match up with reality. Ideally, if you wanted to run this workflow on a system that doesn't support Docker (which includes any RedHat-based Linux system and most HPC environments), you could use transparently use Singularity. In reality, Nextflow doesn't support Singularity's ability to automatically pull and convert images from a Docker Hub. Nor would you want it to; Singularity does not use a daemon or other caching system, and would thus fetch a separate copy of every image for every process instance. This will be addressed in Singularity v2.3, but for now you need to manually convert all the Docker images to Singularity images on a computer running Docker, then copy them to the HPC environment. We expect, but can't guarantee, that this had minimal effect on the measurement of relative performance between the desktop and cluster.
## 1. Fix docker2singularity bug and build container
First you need to clone the docker2singularity repository (https://github.com/singularityware/docker2singularity) and edit the docker2singularity.sh file to change the 'if' statement on/around line 178 to:
```
buildname=$(head -n 1 /etc/issue)
if [[ $buildname =~ Buildroot|Alpine ]] ; then
```
Now build the container:
```
docker build -f Dockerfile -t <docker2singulariy container_name> .
```
## 2. Convert and transfer images
Make sure you've manually built the star index container as described in #2 above, and that it shows up when you run
```
docker images
```
From the 'containers' directory, run:
```
./docker2singularity.sh \
<docker2singulariy container_name> <remote host> <remote dir>
```
# TODO
* Update #3 with an estimate of the total disk space requirement.
* Use [docker-builder](https://pypi.python.org/pypi/docker_builder) to auto-update containers when dependencies change.
* Look at using TopHat2 or Kallisto pseudo-alignment rather than STAR for RNA-Seq benchmarks. This would enable the RNA-Seq benchmark to be run on our desktop with 32 GB RAM.
* These papers do a nice job of benchmarking trimmers. Consider adding some more benchmarks.
* http://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-16-S1-S2
* https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-015-0454-y
* Make machine info work on OSX (currently requires /proc/cpuinfo and /proc/meminfo) | markdown |
{
"title": "Shadows of Saturn at Equinox",
"credit": "Cassini Imaging Team, ISS, JPL, ESA, NASA",
"explanation": "Unusual shadows and dark rings appeared around Saturn near its equinox last month. At that time -- early August -- Saturn's ring plane pointed directly at the Sun. Visible above, Saturn's moon Tethys casts a shadow visible only on the far right. Saturn's own shadow blacks out a large swath of rings on the right. The night side of Saturn glows with ringshine -- sunlight reflected by ring particles back onto Saturn. Images near equinox at Saturn are giving astronomers a chance to search for unexpected shadows that may illuminate previously unknown features of Saturn's complex ring system. Cassini, the robotic spacecraft orbiting Saturn that took this image, is not expected to survive to the next Saturnian equinox in 15 years.",
"date": "2009-09-01",
"hdurl": "https://apod.nasa.gov/apod/image/0909/saturnequinoxshadows_cassini_big.jpg",
"service_version": "v1",
"media_type": "image",
"url": "https://apod.nasa.gov/apod/image/0909/saturnequinoxshadows_cassini.jpg"
} | json |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>84_14417335.java</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
<!--
function ZweiFrames(URL1,F1,URL2,F2)
{
parent.frames[F1].location.href=URL1;
parent.frames[F2].location.href=URL2;
}
//-->
</script>
</HEAD>
<BODY BGCOLOR="#ffffff">
<HR>
<H3><CENTER>84_14417335.java</CENTER></H3><HR>
<PRE>
<A NAME="0"></A><FONT color="#0000ff"><A HREF="javascript:ZweiFrames('match8-1.html#0',3,'match8-top.html#0',1)"><IMG SRC="forward.gif" ALT="other" BORDER="0" ALIGN="right"></A><B>class Solution {
public int[] countSubTrees(int n, int[][] edges, String labels) {
List<List<Integer>> g = new ArrayList<>();
for (int i = 0; i != n; i++)
g.add(new ArrayList<>());
for (int[] e : edges) {
<A NAME="1"></A> g.get(e[0]).add(e[1]);
g.get(e[1]).add(e[0]);
}
int[] res = <FONT color="#f63526"><A HREF="javascript:ZweiFrames('match8-1.html#1',3,'match8-top.html#1',1)"><IMG SRC="forward.gif" ALT="other" BORDER="0" ALIGN="right"></A><B>new int[n]</B></FONT>;
helper(g, 0, -1, labels, res);
return res;
}
private int[] helper(List<List<Integer>> g, int now, int from, String labels, int[] res) {
int[] counts = new</B></FONT> int[26];
for (int next : g.get(now)) {
if (next == from)
<A NAME="2"></A> continue;
int[] kidz = helper(g, next, now, labels, res);
for (int i = 0; i != 26; i++)
counts[i] += kidz[i]<FONT color="#77bfc7"><A HREF="javascript:ZweiFrames('match8-1.html#2',3,'match8-top.html#2',1)"><IMG SRC="forward.gif" ALT="other" BORDER="0" ALIGN="right"></A><B>;
}
res[now] = ++counts[labels.charAt(now) - 'a'];
return counts;
}
}</B></FONT>
</PRE>
</BODY>
</HTML>
| html |
<reponame>lee4138/6d-pose-estimation-with-ml-in-ar
import glob, os, shutil
if not os.path.exists('./converted'):
os.makedirs('./converted')
os.chdir('./labels')
for file in glob.glob("*.txt"):
f = open(file, "r")
line = f.read()
lineVals = line.split()
if (len(lineVals) > 19):
newLine = lineVals[0] + ' ' + lineVals[1] + ' ' + lineVals[2] + ' ' + lineVals[19] + ' ' + lineVals[20]
else:
newLine = ' '
with open('../converted/' + file, 'w') as file:
file.write(newLine)
os.chdir('../')
# delete all files in labels
shutil.rmtree('./labels')
# move converted to labels
os.rename('./converted', './labels')
# fix train and test
cwd = os.getcwd()
with open('./train_new.txt', 'w') as file:
f = open('./train.txt', "r")
for x in f:
file.write(x.replace('sspdFormat', cwd).replace('g ', 'g'))
f.close()
with open('./test_new.txt', 'w') as file:
f = open('./test.txt', "r")
for x in f:
file.write(x.replace('sspdFormat', cwd).replace('g ', 'g'))
f.close()
os.remove('./train.txt')
os.remove('./test.txt')
os.rename('./train_new.txt', './train.txt')
os.rename('./test_new.txt', './test.txt')
| python |
The Minister of State (Independent Charge) for Skill Development and Entrepreneurship Shri Rajiv Pratap Rudy has said that the government has initiated a skills development and certification initiative for the purpose of skills up-gradation of workers in the construction sector based on the concept of Recognition of Prior Learning (RPL). Beneficiaries of the scheme are the construction workers registered with State Labour Welfare Department. Expenses incurred towards training, assessment and wage compensation of the workers are to be met from the Building and Other Construction Worker’s (BOCWs) Cess. The workers are pre-assessed as per the pre-determined criteria on the basis of which they are provided skill gap training. Training Providers are reimbursed the training cost @ Rs. 30/- per hour per trainee and workers are given Wage compensation at the rate of Rs. 35/- per hour per person to compensate wages during training and assessment. The scheme is operational in the States of Delhi, Haryana, Telangana, Odisha and Chhattisgarh and Himachal Pradesh.
In a written reply in the Lok Sabha today the Minister said, further, Government has launched Pradhan Mantri Kaushal Vikas Yojana (PMKVY) on 15th July, 2015 across the Country which has the target to benefit 24 lakh persons with training of 14 lakh fresh entrants and certification of 10 lakh person under RPL within one year. Certification of formal and conventionally skilled workers is done under RPL of the scheme. As on 30th November, 2015, 5,289 candidates have been enrolled in 65 training centres under PMKVY-RPL for 27 job roles developed by 17 Sector Skill Councils (SSCs) in 17 States and 01 Union-Territory with coverage of 50 Districts.
| english |
package com.xiaomaigou.mapper;
import com.xiaomaigou.pojo.TbAddress;
import com.xiaomaigou.pojo.TbAddressExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TbAddressMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tb_address
*
* @mbg.generated Fri Aug 17 13:48:27 CST 2018
*/
long countByExample(TbAddressExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tb_address
*
* @mbg.generated Fri Aug 17 13:48:27 CST 2018
*/
int deleteByExample(TbAddressExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tb_address
*
* @mbg.generated Fri Aug 17 13:48:27 CST 2018
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tb_address
*
* @mbg.generated Fri Aug 17 13:48:27 CST 2018
*/
int insert(TbAddress record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tb_address
*
* @mbg.generated Fri Aug 17 13:48:27 CST 2018
*/
int insertSelective(TbAddress record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tb_address
*
* @mbg.generated Fri Aug 17 13:48:27 CST 2018
*/
List<TbAddress> selectByExample(TbAddressExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tb_address
*
* @mbg.generated Fri Aug 17 13:48:27 CST 2018
*/
TbAddress selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tb_address
*
* @mbg.generated Fri Aug 17 13:48:27 CST 2018
*/
int updateByExampleSelective(@Param("record") TbAddress record, @Param("example") TbAddressExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tb_address
*
* @mbg.generated Fri Aug 17 13:48:27 CST 2018
*/
int updateByExample(@Param("record") TbAddress record, @Param("example") TbAddressExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tb_address
*
* @mbg.generated Fri Aug 17 13:48:27 CST 2018
*/
int updateByPrimaryKeySelective(TbAddress record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tb_address
*
* @mbg.generated Fri Aug 17 13:48:27 CST 2018
*/
int updateByPrimaryKey(TbAddress record);
} | java |
import React from "react";
import Layout from "../components/layout";
import SEO from "../components/seo";
import { graphql } from "gatsby";
import WorkList from "../components/WorkList";
const WorkPage = ({ data: { prismicWork } }) => {
const { data } = prismicWork;
return (
<Layout>
<SEO
title="Home"
keywords={[
`<NAME>`,
`web developer`,
`web designer`,
`react`,
`gatsby`
]}
/>
<div className={`container`}>
<div className="row justify-content-lg-center">
<div
className="col-9 offset-2 offset-lg-0 col-lg-6"
style={{ position: "static" }}
>
<div className="richtext">
{/* <div dangerouslySetInnerHTML={{ __html: data.page_content.html }} /> */}
</div>
</div>
</div>
<WorkList items={data.body[0].items}></WorkList>
</div>
</Layout>
);
};
export default WorkPage;
export const pageQuery = graphql`
query {
prismicWork {
data {
body {
slice_type
items {
work_item {
document {
data {
main_image {
url
dimensions {
height
width
}
alt
}
title {
text
}
brand_color {
text
}
client {
text
}
agency {
text
}
skills {
skill {
document {
data {
skill_name {
text
}
category {
document {
data {
skill_category {
text
}
}
}
}
}
}
}
}
}
uid
}
}
}
}
}
}
}
`;
| javascript |
The most important concern of any expectant mother is her baby’s health. During pregnancy certain basic investigation such as routine urine examination, ultrasound, blood examination for hemoglobin, blood grouping and typing, for infections such as syphilis are done in all women. These tests are done to ensure overall well being of the mother and the fetus. Women with gestational diabetes need more frequent antenatal checkups as compared to a woman with normal pregnancy especially in the last three months of pregnancy. If you have gestational diabetes your doctor may recommend additional tests to assess the condition of the fetus before birth.
Tests that may be done include:
- Ultrasound helps to determine the growth and development of the baby, position of the placenta, amount of amniotic fluid. It can provide an accurate gestational age and due date as well.
- Nonstress test evaluates change of fetal heart rate with fetal movement. If the heart rate fails to increase then the fetus may not be receiving enough oxygen.
- Biophysical profile (BPP): In this both nonstress test and fetal ultrasound are done. The baby's movements, breathing and the amount of amniotic fluid are assessed.
- Fetal movement counting: Your doctor may advise you to count the number of times your baby kicks within a certain time frame. If the movements are less then it may indicate that the baby isn't getting enough oxygen.
- Stress test or oxytocin challenge test: If the non-stress test is abnormal, this test is done to assess if the baby is well. If the baby is not healthy enough to handle the stress of decrease in blood supply and oxygen when the uterus contracts an abnormal heart rate pattern is observed.
- Amniocentesis: In this test a small amount of fluid is taken from the amniotic sac for analysis. It is used to test for genetic abnormalities such as Down syndrome, maturity of the lungs in late pregnancy. | english |
<filename>wwwroot/bctos.cn/public/kod/static/js/lib/city-picker/demo.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="A simple jQuery plugin for picking provinces, cities and districts of China.">
<meta name="author" content="<NAME>">
<title>city-picker</title>
<link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.css" rel="stylesheet">
<link href="./css/city-picker.css" rel="stylesheet">
</head>
<style>
body{
font-family: "Helvetica Neue", Helvetica, "Microsoft Yahei", 微软雅黑, "Lantinghei SC", STXihei;
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;
-webkit-font-smoothing: antialiased;
}
</style>
<body>
<!-- header -->
<header class="navbar navbar-static-top docs-header" id="top">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle" data-target="#navbar-collapse-1" data-toggle="collapse" type="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<nav class="collapse navbar-collapse" id="navbar-collapse-1" role="navigation">
<ul class="nav navbar-nav navbar-right">
<li><a href="http://tshi0912.github.io/city-picker/" target="_blank">Docs</a></li>
</ul>
</nav>
</div>
</header>
<!-- Content -->
<div class="container" style="margin-bottom:300px;">
<h1 class="page-header" id="getting-started">使用说明</h1>
<pre class="prettyprint">
<script src="/path/to/city-picker.data.js"></script>
<script src="/path/to/city-picker.js"></script>
<input readonly id="city-picker1" type="text" placeholder="请选择省/市" data-level="[province|city|district]" data-simple="true" >
$('#city-picker1').citypicker();
</pre>
<h3>自定义初始数据</h3>
<pre class="prettyprint"><div style="position: relative;"><!-- container -->
<input readonly type="text" data-toggle="city-picker" value="北京市/北京市/海淀区">
</div></pre>
<h5>Demo:</h5>
<form class="form-inline">
<div style="position: relative;">
<input class="form-control" readonly type="text" data-toggle="city-picker" value="北京市/北京市/海淀区">
</div>
</form>
<h3>定义选择到层级</h3>
<pre class="prettyprint"><div style="position: relative;"><!-- container -->
<input readonly type="text" data-toggle="city-picker" placeholder="请选择省/市" data-level="province" >
</div></pre>
<h5>Demo:</h5>
<form class="form-inline">
<div style="position: relative;">
<input class="form-control" readonly type="text" data-toggle="city-picker" data-level="province"
placeholder="请选择省份">
</div>
</form>
<h3>精简版地址</h3>
<pre class="prettyprint"><div style="position: relative;"><!-- container -->
<input readonly type="text" data-toggle="city-picker" data-simple="true" >
</div></pre>
<h5>Demo:</h5>
<form class="form-inline">
<div style="position: relative;">
<input class="form-control" readonly type="text" data-toggle="city-picker" data-simple="true" placeholder="请选择省份">
</div>
</form>
</div>
<!-- Scripts -->
<script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.js"></script>
<script src="./city-picker.data.js"></script>
<script src="./city-picker.js"></script>
<script>
$(function () {
$('#city-picker1').citypicker();
});
</script>
</body>
</html>
| html |
/*
* for Agile Lite 2.5.0 beta
* */
/*******************全局样式global-start*******************/
*{
margin:0;
padding:0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
summary {
display: block;
}
html {
/*禁用文字自适应,防止横屏时文字变大*/
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
/*禁止ios用_self打开时弹出对话框*/
-webkit-touch-callout:none;
-ms-touch-action: none;
}
body {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
font-size: 14px;
font-family: ubuntu, helvetica, arial;
}
a {
background: transparent;
text-decoration:none;
}
a:active,
a:hover {
outline: 0;
}
button {
cursor: pointer;
}
a,button,input{
-webkit-tap-highlight-color:rgba(255,0,0,0);
}
ul,li,dl,dt,dd {
list-style: none;
}
img {
border: 0;
}
.relative {
position: relative;
}
.absolute{
position:absolute;
}
.opacity6 {
opacity:0.6;
filter:Alpha(opacity=60);
}
.opacity3{
opacity:0.3;
filter:Alpha(opacity=30);
}
.hide{
display:none;
}
.hidden{
visibility:hidden
}
abbr[title] {
border-bottom: 1px dotted;
}
dfn {
font-style: italic;
}
small {
font-size: 80%;
}
/*对齐*/
.left{
float:left;
}
.right{
float:right;
}
.vmiddle{
vertical-align:middle;
}
.middle{
position:absolute;
top:50%;
-webkit-transform:translateY(-50%);
}
.center{
position:absolute;
left:50%;
-webkit-transform:translateX(-50%);
}
.text-center{
text-align:center;
}
.box{
display:-webkit-box;
display: box;
}
.box-center{
box-pack:center;
-webkit-box-pack:center;
text-align:center;
}
.box-middle{
box-align:center;
-webkit-box-align:center;
}
.box-vertical{
-webkit-box-orient:vertical;
box-orient:vertical;
}
.box-horizontal{
-webkit-box-orient:horizontal;
box-orient:horizontal;
}
/*清除浮动*/
.clearfix:before, .clearfix:after {
display: table;
content: " ";
}
.clearfix:after {
clear: both;
}
.clearfix{
zoom:1;
}
.clr{
clear:both;
}
/*边框*/
.border-inner{
-webkit-box-sizing:border-box;
}
.noborder{
border:none !important;
}
hr{
height:1px;
border:none;
clear:both;
}
/*效果*/
.rect{
-webkit-border-radius:0;
-moz-border-radius:0;
border-radius:0;
}
.round{
-webkit-border-radius:40px;
-moz-border-radius:40px;
border-radius:40px;
}
.shadow{
-webkit-box-shadow:0 2px 3px 0 rgba(0, 0, 0, 0.2);
-moz-box-shadow:0 2px 3px 0 rgba(0, 0, 0, 0.2);
box-shadow:0 2px 3px 0 rgba(0, 0, 0, 0.2);
}
/*文字*/
.nowrap{
white-space:nowrap;
}
.nowrap,.ellipsis{
overflow:hidden;
text-overflow:ellipsis;
}
.iconfont{
font-size:16px;
}
.black{
color:#000 !important;
}
.white{
color:#fff !important;
}
.section-title {
font-size:14px;
line-height:40px;
margin-bottom:8px;
}
/*间距与布局*/
.rowspace{
height:4px;
border:none;
clear:all;
}
.rowspace-small{
height:1px;
border:none;
clear:all;
}
.rowspace-large{
height:20px;
border:none;
clear:all;
}
.width-full{
width:100%;
}
.height-full{
height:100%;
}
.nopadding{
padding:0 !important;
}
.nomargin{
margin:0 !important;
}
.margin-4{
margin:4px;
}
.margin-8{
margin:8px;
}
.noclick{
background-color:transparent !important;;
}
.noclick:active{
background-color:transparent !important;;
}
/*******************全局样式global-end*******************/
/*******************布局样式layout-start*******************/
/* 提供固定布局:header、footer、wrapper和控件:titlebar、tabbar、menubar */
header{
position:absolute;
top:0;
width:100%;
z-index:999;
}
footer{
position:absolute;
bottom:0;
width:100%;
z-index:999;
}
#wrapper {
position: absolute;
z-index: 1;
top: 44px;
bottom: 44px;
left: 0;
width: 100%;
overflow: hidden;
}
/*头部栏*/
.titlebar{
position:relative;
min-height:44px;
}
.titlebar h1{
position: absolute;
display: block;
padding: 0;
font-size: 17px;
font-weight: 500;
left:50%;
top:50%;
-webkit-transform: translateX(-50%) translateY(-50%);
white-space:nowrap;
/*width:80%;*/
text-align:center;
text-overflow:ellipsis;
overflow:hidden;
}
.titlebar a{
position: absolute;
display:block;
height:32px;
line-height:32px;
min-width:32px;
top:50%;
-webkit-transform: translateY(-50%);
font-size:14px;
}
.titlebar a:active{
color:rgba(0,0,0,.3);
}
.titlebar a:first-child{
left:8px;
}
.titlebar a:last-child{
right:8px;
}
.titlebar .iconfont{
height:24px;
line-height:24px;
display:inline-block;
overflow:hidden;
float:left;
position:relative;
top:50%;
-webkit-transform: translateY(-50%);
}
.titlebar .iconfont{
font-size:24px;
width:24px;
}
/*页签菜单栏*/
.tabbar{
display: table;
overflow: hidden;
font-size: 12px;
font-weight: 400;
min-height:44px;
}
.tab{
display: table-cell;
width: 1%;
padding-top: 14px;
padding-bottom: 16px;
/*height:42px;
line-height: 42px; */
overflow: hidden;
line-height: 1;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
}
.tab:active,.tab.active{
-webkit-box-sizing:border-box;
}
.tab .iconfont{
top: 3px;
width: 24px;
height: 24px;
padding-top: 0;
padding-bottom: 0;
}
.tabbar-slider{
position:relative;
overflow:hidden;
width:100%;
}
.tab-more{
position:absolute;
right:0;
top:50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
font-size:20px;
width:44px;
text-align:center;
display:block;
}
/*底部菜单栏*/
.menubar{
position: relative;
display: table;
overflow: hidden;
font-size: 12px;
font-weight: 400;
min-height:44px;
}
.menubar .menu{
display: table-cell;
width: 1%;
padding-top: 8px;
padding-bottom: 8px;
overflow: hidden;
line-height: 1;
text-align: center;
text-overflow: ellipsis;
}
.menubar .menu:active,.menubar .menu.active{
color:white;
}
.menubar .menu .menu-icon{
width: 32px;
height: 32px;
font-size:24px;
}
.menubar .menu .menu-text{
display: block;
font-size: 12px;
margin-top:4px;
}
.menubar .menu .menu-icon+.menubar .menu-text{
margin-top:6px;
}
/*标题*/
p.title{
margin:8px;
}
/*九宫控件*/
.grid{
display:block;
}
/*九宫控件-单元格*/
.grid-cell{
position:relative;
width:25%;
margin:8px 0;
text-align:center;
display:block;
float:left;
font-size:14px;
}
.grid[data-col="2"] .grid-cell{
width:50%;
}
.grid[data-col="3"] .grid-cell{
width:33.33%;
}
.grid[data-col="4"] .grid-cell{
width:25%;
}
.grid[data-col="5"] .grid-cell{
width:20%;
}
/*九宫控件-大图*/
.grid-thumbnail{
position:relative;
display:block;
width:64px;
margin:0px auto;
text-align:center;
}
.grid-thumbnail img{
width:50px;
}
/*九宫控件-图片*/
.grid-img{
position:relative;
display:block;
width:64px;
height:64px;
margin:0px auto;
border-radius:4px;
text-align:center;
}
.grid-img .iconfont,.grid-img img{
position:absolute;
vertical-align:middle;
left:50%;
top:50%;
-webkit-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
.grid-img .iconfont{
font-size:32px;
width:32px;
height:32px;
color:white;
}
.grid-img img{
width:50px;
height:50px;
}
.grid-img .tip,.grid-thumbnail .tip{
position:absolute;
display:block;
top:0px;
right:0px;
width:20px;
height:20px;
line-height:20px;
text-align:center;
border-radius:20px;
}
/*九宫控件-文字*/
.grid-label{
display:block;
width:80%;
height:30px;
margin:0px auto;
line-height:26px;
text-align:center;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
/*矩形框*/
.card{
border-radius:4px;
margin:8px;
overflow:hidden;
}
/*******************布局样式layout-end*******************/
/*******************表单元素form-start*******************/
[data-role="date"],
[data-role="time"],
[data-role="checkbox"],
[data-role="radio"],
[data-role="select"],
[data-role="file"],
[data-role="date"],
[data-role="time"],
[data-role="barcode"],
[data-role="qrcode"]{
position:relative;
display:block;
overflow:hidden;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="tel"],
input[type="week"],
input[type="month"],
input[type="time"],
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="search"],
input[type="file"],
input[type="color"],
select{
display:inline-block;
height: 35px;
-webkit-appearance: none;
padding: 0 8px;
border-radius:4px;
outline: none;
}
input[type="number"],
input[type="tel"],
input[type="week"],
input[type="month"],
input[type="time"],
input[type="date"],
input[type="datetime"],
input[type="datetime-local"]{
height:auto;
}
textarea{
width:100%;
border-radius:4px;
outline:none;
}
input[type="checkbox"],input[type="radio"]{
border:none;
outline: none;
background:transparent;
vertical-align:middle;
/*不使用系统默认样式*/
-webkit-appearance: none;
height:20px;
width:20px;
}
input[type="checkbox"]:after,input[type="radio"]:after{
font-family:"iconform";
font-style:normal;
/*设置文字平滑度antialiased反锯齿 */
-webkit-font-smoothing: antialiased;
/*边缘模糊0.2px */
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
font-size:20px;
}
input[type="checkbox"]:after{
content: "\e203";
}
input[type="checkbox"]:checked::after{
content: "\e205";
}
input[type="radio"]:after{
content: "\e210";
}
input[type="radio"]:checked::after{
content: "\e211";
}
/*自定义表单元素*/
/*开关控件toggle-默认风格*/
/*关闭状态*/
.toggle {
position: relative;
display: inline-block;
height: 30px;
width: 60px;
background-color:transparent;
border-radius: 30px;
-webkit-transition-duration: .2s;
-moz-transition-duration: .2s;
transition-duration: .2s;
-webkit-transition-property: background-color, border;
-moz-transition-property: background-color, border;
transition-property: background-color, border;
}
/*关闭状态圆点*/
.toggle .toggle-handle{
position: absolute;
left:0;
top:50%;
-webkit-transform:translate(4px,-50%);
-ms-transform:translate(4px,-50%);
transform:translate(4px,-50%);
width: 20px;
height: 20px;
border-radius: 100px;
-webkit-transition-duration: .2s;
-moz-transition-duration: .2s;
transition-duration: .2s;
-webkit-transition-property: -webkit-transform, border, width;
-moz-transition-property: -moz-transform, border, width;
transition-property: transform, border, width;
z-index: 2;
}
/*关闭状态文字off*/
.toggle:after{
position: absolute;
right: 11px;
top:50%;
-webkit-transform:translateY(-50%);
-ms-transform:translateY(-50%);
transform:translateY(-50%);
content: attr(data-off);
}
/*打开状态*/
.toggle.active {
background-color:transparent;
}
/*打开状态小圆点*/
.toggle.active .toggle-handle{
left:0;
top:50%;
-webkit-transform: translate(34px,-50%);
-ms-transform: translate(34px,-50%);
transform: translate(34px,-50%);
}
/*打开状态文字on*/
.toggle.active:after{
right: auto;
left: 11px;
content: attr(data-on);
}
/*开关控件toggle-无文字*/
.notext.toggle{
width: 50px;
}
.notext.toggle:after{
content:none;
}
.notext.toggle.active .toggle-handle{
-webkit-transform: translate(24px,-50%);
-ms-transform: translate(24px,-50%);
transform: translate(24px,-50%);
}
/*开关控件toggle-经典风格*/
.classic.toggle{
border:none;
}
.classic.toggle .toggle-handle{
width: 26px;
height: 26px;
-webkit-transform: translate(2px,-50%);
-ms-transform: translate(2px,-50%);
transform: translate(2px,-50%);
}
.classic.toggle:after{
}
.classic.toggle.active{
}
.classic.toggle.active .toggle-handle{
-webkit-transform: translate(32px,-50%);
-ms-transform: translate(32px,-50%);
transform: translate(32px,-50%);
}
.classic.toggle.active:after{
}
/*无文字状态*/
.notext.classic.toggle.active .toggle-handle{
-webkit-transform: translate(22px,-50%);
-ms-transform: translate(22px,-50%);
transform: translate(22px,-50%);
}
/*开关控件toggle-ios风格*/
.ios.toggle {
border-radius:30px;
}
.ios.toggle .toggle-handle {
background-color:white;
border-radius:30px;
width:28px;
height:28px;
top:0px;
left:0px;
-webkit-transform: translateX(0px);
-ms-transform: translateX(0px);
transform: translateX(0px);
-webkit-box-shadow: 0 3px 3px rgba(0, 0, 0, .08);
box-shadow: 0 3px 3px rgba(0, 0, 0, .08);
}
.ios.toggle.active {
}
.ios.toggle.active:after{
}
.ios.toggle.active .toggle-handle {
-webkit-transform: translateX(30px);
-ms-transform: translateX(30px);
transform: translateX(30px);
}
/*无文字状态*/
.notext.ios.toggle.active .toggle-handle{
-webkit-transform: translateX(20px);
-ms-transform: translateX(20px);
transform: translateX(20px);
}
/*其它表单控件*/
[data-role]{
/*
position:relative;
display:block;
overflow:hidden;*/
}
[data-role="select"],
[data-role="file"],
[data-role="date"],
[data-role="time"],
[data-role="barcode"],
[data-role="qrcode"]
{
overflow:hidden;
}
[data-role="select"] select{
border:none;
background-color:transparent;
height:40px;
padding-left:0;
}
[data-role="file"]:active,
[data-role="date"]:active,
[data-role="time"]:active,
[data-role="barcode"]:active,
[data-role="qrcode"]:active,
[data-role="checkbox"]:active,
[data-role="radio"]:active
{
}
[data-role="file"] > label,
[data-role="date"] > label,
[data-role="time"] > label,
[data-role="barcode"] > label,
[data-role="qrcode"] > label
{
display:block;
width:100%;
padding-right:20px;
white-space: nowrap;
text-overflow:ellipsis;
overflow:hidden;
}
[data-role="select"]:after,
[data-role="file"]:after,
[data-role*="file-"]:after,
[data-role="date"]:after,
[data-role="time"]:after,
[data-role="barcode"]:after,
[data-role="qrcode"]:after,
[data-role="checkbox"] input[type="checkbox"],
[data-role="radio"] input[type="radio"]{
position: absolute;
clear:both;
top: 50%;
display: inline-block;
text-decoration: none;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
-webkit-font-smoothing: antialiased;
right: 15px;
font-size:20px;
font-family:"iconform";
}
[data-role="file-native"]{
position:relative;
}
[data-role="file-native"] input[type="file"]{
-webkit-appearance: initial;
padding: initial;
background-color: initial;
border: initial;
width:100%;
height:100%;
}
[data-role="select"]:after{
content: "\e216";
z-index: 1;
}
[data-role="file"]:after, [data-role="file-native"]:after{
content: "\e209";
pointer-events:none;
}
[data-role="date"]:after{
content: "\e201";
}
[data-role="time"]:after{
content: "\e217";
}
[data-role="barcode"]:after{
content: "\e200";
}
[data-role="qrcode"]:after{
content: "\e20f";
}
/*******************表单元素form-end*******************/
/*******************表单布局formlayout-start*******************/
/*由于手机上checkbox与radio难选中,故对此进行的特殊处理方法*/
.form-common [data-role="checkbox"],.form-common [data-role="radio"],.form-square [data-role="checkbox"],.form-square [data-role="radio"]{
display:inline-block;
float:left;
}
.form-common [data-role="checkbox"]>label,.form-common [data-role="radio"]>label,.form-square [data-role="checkbox"]>label,.form-square [data-role="radio"]>label{
padding-left:24px;
padding-right:8px;
}
.form-common [data-role="checkbox"] input[type="checkbox"],.form-common [data-role="radio"] input[type="radio"],.form-square [data-role="checkbox"] input[type="checkbox"],.form-square [data-role="radio"] input[type="radio"]{
left:0;
right:auto;
}
/*普通表单*/
.form-common{
margin:8px;
}
.form-common .label-left,.form-common .label-right{
float:left;
line-height:40px;
margin:0;
vertical-align: middle;
display:block;
}
.form-common .label-left{
width: 30%;
font-size:12px;
text-indent:12px;
}
.form-common .label-right{
width:70%;
font-size:14px;
border:none;
padding-left:8px;
}
.form-common .label-right input{
font-size:14px;
padding:0;
border:none;
}
/*矩形表单*/
.form-square{
margin:8px;
}
.form-square .label-left,.form-square .label-right{
float:left;
height:40px;
line-height:40px;
margin:0;
vertical-align: middle;
display:block;
margin:8px 0;
}
.form-square .label-left{
width: 30%;
font-size:12px;
text-indent:12px;
border-width:1px;
border-style:solid;
border-radius:4px 0 0 4px;
-webkit-box-sizing:border-box;
box-sizing:border-box;
}
.form-square .label-right{
width:70%;
font-size:14px;
border:none;
padding-left:8px;
border-width:1px;
border-style:solid;
border-radius:0 4px 4px 0;
border-left:0;
-webkit-box-sizing:border-box;
}
.form-square .label-right input{
font-size:14px;
padding:0;
border:none;
}
.form-square .label-left.hint,.form-square .label-left.hint + .label-right{
height:30px;
line-height:30px;
margin:0;
margin-top:-8px;
border:none;
}
/*分组表单*/
.form-group [data-role]{
height:40px;
line-height:40px;
padding-left:12px;
}
/*******************表单布局formlayout-end*******************/
/*******************按钮button-start*******************/
/*按钮-普通按钮*/
button,input[type="button"],a.button{
border: 0;
font-size: 14px;
border-radius:4px;
padding: 0px 8px;
height:40px;
min-width:40px;
line-height:40px;
overflow:hidden;
display:inline-block;
/*清除文本选择与外框*/
outline:none;
-moz-user-select: none; /*火狐*/
-webkit-user-select: none; /*webkit浏览器*/
-ms-user-select: none; /*IE10*/
-khtml-user-select: none; /*早期浏览器*/
user-select: none;
/*动画*/
-webkit-transition: all;
-moz-transition: all;
transition: all;
-webkit-transition-timing-function: linear;
-moz-transition-timing-function: linear;
transition-timing-function: linear;
-webkit-transition-duration: .2s;
-moz-transition-duration: .2s;
transition-duration: .2s;
}
button.outline,input[type="button"].outline,a.button.outline{
background-color:transparent;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
button:active,input[type="button"]:active,a.button:active{
}
/*图标按钮*/
button .iconfont,a.button .iconfont{
display:inline-block;
-webkit-transform:translateY(4px);
-ms-transform:translateY(4px);
transform:translateY(4px);
font-size:20px;
}
/*按钮-禁用按钮*/
button.disable,input[type="button"].disable,a.button.disable{
}
button.disable.outline,input[type="button"].disable.outline,a.button.disable.outline{
background-color:transparent;
}
/*按钮-取消按钮*/
button.cancel,input[type="button"].cancel,a.button.cancel{
}
button.cancel.outline,input[type="button"].cancel.outline,a.button.cancel.outline{
background-color:transparent;
}
button.cancel:active,input[type="button"].cancel:active,a.button.cancel:active{
}
/*按钮-提交按钮*/
button.submit,input[type="submit"],a.button.submit{
}
button.submit.outline,input[type="submit"].outline,a.button.submit.outline{
background-color:transparent;
}
button.submit:active,input[type="submit"]:active,a.button.submit:active{
}
/*按钮-链接*/
button.link,input[type="button"].link,a.button.link{
background-color:transparent;
}
button.link.outline,input[type="button"].link.outline,a.button.link.outline{
}
button.link:active,input[type="button"].link:active,a.button.link:active{
background-color:transparent;
}
/*按钮-气泡*/
button .tip,input[type="button"] .tip,a.button .tip{
display: inline-block;
padding: 2px 9px 3px;
font-size: 12px;
line-height: 1;
border-radius: 100px;
}
button.outline .tip,input[type="button"].outline .tip,a.button.outline .tip{
}
/*按钮-大按钮*/
button.block,input[type="button"].block,a.button.block{
display: block;
width: 100%;
margin-bottom:10px;
}
/*按钮-仅图标按钮*/
button.onlyicon{
width:48px;
height:48px;
}
button.onlyicon .iconfont{
font-size:24px;
}
/*按钮-投影图标*/
.btn-3dshadow {
-webkit-box-shadow:0 2px 3px 0 rgba(0, 0, 0, 0.2);
-moz-box-shadow:0 2px 3px 0 rgba(0, 0, 0, 0.2);
box-shadow:0 2px 3px 0 rgba(0, 0, 0, 0.2);
}
.btn-3dshadow:active {
-webkit-box-shadow:0 0 0 0 rgba(0, 0, 0, 0.2);
-moz-box-shadow:0 0 0 0 rgba(0, 0, 0, 0.2);
box-shadow:0 0 0 0 rgba(0, 0, 0, 0.2);
margin:2px 0 -2px 0;
}
/*******************按钮button-end*******************/
/*******************列表样式list-start*******************/
/*列表样式*/
.listitem{
}
.listitem li{
position: relative;
padding:12px;
overflow:hidden;
}
.listitem li.row-large{
padding:20px 12px;
}
.listitem li:active,.listitem li.active{
}
.listitem li small{
display:block;
}
.listitem li .iconfont{
}
/*列表样式-文字区域*/
.listitem li .text{
overflow: hidden;
}
.listitem li .text small{
margin-top:4px;
}
/*列表样式-左侧图*/
.listitem li .img{
margin-right: 10px;
float:left;
}
/*列表样式-右侧图*/
.listitem li .rimg{
margin-left: 10px;
float:right;
}
/*列表样式-左侧图标*/
.listitem li .icon , .listitem li .ricon{
position: absolute;
top: 50%;
display: inline-block;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
.listitem li .icon{
left:8px;
}
.listitem li .icon~.text{
padding-left:20px;
}
/*列表样式-右侧图标*/
.listitem li .ricon{
right:10px;
}
.listitem li button.ricon{
}
.listitem li .ricon~.text{
padding-right:20px;
}
.listitem li .ricon.iconfont{
font-size:12px;
}
/*列表样式-方块图标*/
.square{
width:36px;
height:36px;
border-radius:4px;
position:relative;
}
.square .square-icon,.square i.iconfont,.square img{
color:white;
font-size:24px;
height:24px;
width:24px;
position:absolute;
top:50%;
left:50%;
-webkit-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
.square .tip{
width:16px;
height:16px;
line-height:16px;
font-size:9px;
display:block;
border-radius:8px;
font-weight:normal;
text-align:center;
position:absolute;
top:-6px;
right:-6px;
}
/*列表样式-右侧文字*/
.listitem li .rcaption{
position:absolute;
bottom:6px;
right:6px;
}
.listitem li.sliver{
font-size:12px;
}
.listitem li.title{
}
| css |
<filename>src/simannealing.cpp
// MIT License
//
// Copyright (c) 2021 mkbhs
//
// 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.
#include <iostream>
#include <stdio.h>
#include <cmath>
#include <random>
#include <chrono>
#include <string>
#include <bits/stdc++.h>
#include "simannealing.h"
using namespace std;
namespace nptm
{
SimAnnealing::SimAnnealing(int _num_dim, double* ptr_constrains, int _max_iter, double _i_temp, double _f_temp, double _beta, double _sigma, int _num_workers)
{
setNumDim(_num_dim);
setConstrains(ptr_constrains);
setMaxIter(_max_iter);
setInitialTemp(_i_temp);
setFinalTemp(_f_temp);
setBeta(_beta);
setSigma(_sigma);
setNumWorkers(_num_workers);
}
void SimAnnealing::setNumDim(int _num_dim) { num_dim = _num_dim; }
int SimAnnealing::getNumDim() { return num_dim; }
void SimAnnealing::setMaxIter(int _max_iter) { max_iter = _max_iter; }
int SimAnnealing::getMaxIter() { return max_iter; }
void SimAnnealing::setInitialTemp(double _i_temp) { i_temp = _i_temp; }
double SimAnnealing::getInitialTemp() { return i_temp; }
void SimAnnealing::setFinalTemp(double _f_temp) { f_temp = _f_temp; }
double SimAnnealing::getFinalTemp() { return f_temp; }
void SimAnnealing::setCurrentTemp(double _c_temp) { c_temp = _c_temp; }
double SimAnnealing::getCurrentTemp() { return c_temp; }
void SimAnnealing::setSigma(double _sigma) { sigma = _sigma; }
double SimAnnealing::getSigma() { return sigma; }
void SimAnnealing::setBeta(double _beta) { beta = _beta; }
double SimAnnealing::getBeta() { return beta; }
void SimAnnealing::setNumWorkers(int _num_workers) { num_workers = _num_workers; }
int SimAnnealing::getNumWorkers() { return num_workers; }
void SimAnnealing::setDefFitness(double _def_fitness) { def_fitness = _def_fitness; }
double SimAnnealing::getDefFitness() { return def_fitness; }
void SimAnnealing::setConstrains(double* ptr_constrains)
{
for(unsigned int i=0; i < getNumDim()*2; i++)
{
constrains.push_back(ptr_constrains[i]);
cout << "constrains[" << i << "] = " << constrains.at(i) << "\t" << endl;
}
for(unsigned int i=0; i < getNumDim(); i++)
{
dim_ranges.push_back(constrains.at(2*i+1) - constrains.at(2*i));
cout << "range in dimension " << i << ": " << dim_ranges.at(i) << "\t" << endl;
}
}
void SimAnnealing::displayConstrains()
{
for(int i=0; i < getNumDim(); i++)
{
cout << "dimension " << i << ":" << endl;
cout << "x" << i << "_min = " << constrains.at(2*i) << "\t";
cout << "x" << i << "_max = " << constrains.at(2*i+1) << endl;
}
}
double SimAnnealing::computeCost(double* x)
{
return cost_func(x);
}
void SimAnnealing::initSolution()
{
for(unsigned int i = 0; i < getNumWorkers(); i++)
{
// init definitive solution
def_solution.push_back(0.0);
// init fitness for each worker
fitness.push_back(100000.0);
// init the solution for each worker
vector<double> temp;
for(unsigned int j = 0; j < getNumDim(); j++)
{
unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
default_random_engine generator(seed);
uniform_real_distribution<double> distribution(0.0, 1.0);
temp.push_back(distribution(generator)*dim_ranges.at(j) + constrains.at(2*j));
}
solution.push_back(temp);
}
}
void SimAnnealing::updateSolution()
{
for(unsigned int i = 0; i < getNumWorkers(); i++)
{
for(unsigned int j=0; j < getNumDim(); j++)
{
unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
default_random_engine generator(seed);
uniform_real_distribution<double> distribution(0.0, 1.0);
solution[i][j] = solution[i][j] + distribution(generator)*getSigma(); //*getCurrentTemp();
}
}
}
bool SimAnnealing::checkRangeSolution(double* x)
{
for(unsigned int i=0; i < getNumDim(); i++)
{
// test if solution in dimension i is smaller than the minimum
// or if the solution in dimension i is larger than the maximum
if((x[i] < constrains.at(2*i)) || (x[i] > constrains.at(2*i+1)))
{
return false;
}
}
return true;
}
void SimAnnealing::displaySolution(int _iter)
{
// first display the current iteration plus the columns of the data
cout << "Iteration " << _iter << " #################################" << endl;
cout << "Worker Id" << "\t" << "Fitness" << "\t";
for(unsigned int j=0; j < getNumDim(); j++)
{
cout << "x" << j << "\t";
}
cout << endl;
// now display the current values for the iteration
for(unsigned int i=0; i < getNumWorkers(); i++)
{
cout << i << "\t" << fitness[i] << "\t";
for(unsigned int j=0; j < getNumDim(); j++)
{
cout << solution[i][j] << "\t";
}
cout << endl;
}
}
void SimAnnealing::retrieveBestSolutionGlobal()
{
int idx_min = 0;
double min_cost = 10000000.0;
double current_cost = 0.0;
for(unsigned int i=0; i < getNumWorkers(); i++)
{
double best_solution[getNumDim()] = {0.0};
for(unsigned int j=0; j < getNumDim(); j++)
{
best_solution[j] = solution[i][j];
}
// check the cost
current_cost = computeCost(best_solution);
if(current_cost < min_cost)
{
min_cost = current_cost;
idx_min = i;
}
}
// update the definitive solution
for(unsigned int i=0; i < getNumDim(); i++)
{
def_solution[i] = solution[idx_min][i];
}
setDefFitness(min_cost);
}
void SimAnnealing::displayGlobalSolution()
{
cout << "Best Solution" << endl;
for(unsigned int i=0; i < getNumDim(); i++)
{
cout << "x" << i << "\t";
}
cout << endl;
for(unsigned int i=0; i < getNumDim(); i++)
{
cout << def_solution[i] << "\t";
}
cout << endl;
cout << "with a cost = " << getDefFitness() << endl;
}
void SimAnnealing::optimizeSolution()
{
// INITIALIZATION /////////////////////////////////////////////////////////
initSolution();
//initBestSolution();
setCurrentTemp(getInitialTemp());
double x_1[getNumWorkers()][getNumDim()] = {0.0};
double x_2[getNumWorkers()][getNumDim()] = {0.0};
for(unsigned int i=0; i < getNumWorkers(); i++)
{
for(unsigned int j=0; j < getNumDim(); j++)
{
x_1[i][j] = solution[i][j];
}
}
// OPTIMIZATION LOOP
for(unsigned int i=0; i < getMaxIter(); i++)
{
double E_old[getNumWorkers()] = {0.0};
for(unsigned int j=0; j < getNumWorkers(); j++)
{
double current_worker_solution[getNumDim()];
for(unsigned int k=0; k < getNumDim(); k++)
{
current_worker_solution[k] = x_1[j][k];
}
E_old[j] = computeCost(current_worker_solution);
}
updateSolution();
for(unsigned int j=0; j < getNumWorkers(); j++)
{
for(unsigned k=0; k < getNumDim(); k++)
{
x_2[j][k] = solution[j][k];
}
}
double E_new[getNumWorkers()] = {0.0};
for(unsigned int j=0; j < getNumWorkers(); j++)
{
double current_worker_solution[getNumDim()];
for(unsigned int k=0; k < getNumDim(); k++)
{
current_worker_solution[k] = x_2[j][k];
}
E_new[j] = computeCost(current_worker_solution);
}
// compute deltas
double delta[getNumWorkers()] = {0.0};
for(unsigned int j=0; j < getNumWorkers(); j++)
{
// if cost is smaller than second solution, accept it directly
delta[j] = E_new[j] - E_old[j];
if(delta[j] < 0)
{
for(unsigned int k=0; k < getNumDim(); k++)
{
x_1[j][k] = x_2[j][k];
solution[j][k] = x_1[j][k];
}
fitness[j] = E_new[j];
} else {
for(unsigned int k=0; k < getNumDim(); k++)
{
solution[j][k] = x_1[j][k];
}
fitness[j] = E_old[j];
}
// if the cost is not smaller, check the acceptance probability
unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
default_random_engine generator(seed);
uniform_real_distribution<double> distribution(0.0, 1.0);
if((delta[j] >= 0) && (exp(delta[j]/getCurrentTemp()) < distribution(generator)))
{
for(unsigned int k=0; k < getNumDim(); k++)
{
x_1[j][k] = x_2[j][k];
solution[j][k] = x_1[j][k];
}
fitness[j] = E_new[j];
} else {
for(unsigned int k=0; k < getNumDim(); k++)
{
solution[j][k] = x_1[j][k];
}
fitness[j] = E_old[j];
}
}
// Display the solutions for each iteration
//displaySolution(i);
// UPDATE THE CURRENT TEMPERATURE
double current_temp = getBeta()*getCurrentTemp();
if(current_temp <= getFinalTemp())
{
setCurrentTemp(getFinalTemp());
} else {
setCurrentTemp(current_temp);
}
//cout << "current teperature = " << getCurrentTemp() << endl;
} // END OF OPTIMIZATION LOOP
// Retrieve the best solution among all workers
retrieveBestSolutionGlobal();
// display best solution
displayGlobalSolution();
}
}
| cpp |
<reponame>DimmKG/butane
use super::connmethods::ConnectionMethodWrapper;
use super::*;
use crate::Result;
/// R2D2 support for Butane. Implements [`r2d2::ManageConnection`].
pub struct ConnectionManager {
spec: ConnectionSpec,
}
impl ConnectionManager {
pub fn new(spec: ConnectionSpec) -> Self {
ConnectionManager { spec }
}
}
impl r2d2::ManageConnection for ConnectionManager {
type Connection = Connection;
type Error = crate::Error;
fn connect(&self) -> Result<Self::Connection> {
crate::db::connect(&self.spec)
}
fn is_valid(&self, conn: &mut Self::Connection) -> Result<()> {
conn.execute("SELECT 1")
}
fn has_broken(&self, conn: &mut Self::Connection) -> bool {
conn.is_closed()
}
}
impl ConnectionMethodWrapper for r2d2::PooledConnection<ConnectionManager> {
type Wrapped = Connection;
fn wrapped_connection_methods(&self) -> Result<&Connection> {
Ok(self.deref())
}
}
connection_method_wrapper!(r2d2::PooledConnection<ConnectionManager>);
| rust |
Raipur: A 10-year-old girl was raped and killed during a wedding function in a village in Kabirdham district of Chhattisgarh on Wednesday. Police said the 25-year-old accused, who has been arrested, admitted to have raped and killed the child by smashing her head with a stone.
The 10-year-old was related to the bridegroom, who was a friend of the accused, Uttam Sahu, police said.
Police said Sahu is a resident of Rehauta village in Kunda police station area and had gone to the village as a part of the marriage procession.
Finding everyone involved in the wedding, he lured the girl away and committed the crime. The body of the child was found dumped in a dry riverbed in the village on Thursday morning. | english |
<reponame>jorge0136/gooseify
function initialGooseXPosition(x_bounds_width) {
return Math.floor(x_bounds_width * 0.3);
}
function determineDirection(x, oldX) {
return (x > oldX) ? 0 : 1;
}
function handleXOutOfBounds(x, spriteFrameW, boundsWidth) {
if(x < 0) {
x = 0;
} else if(x + spriteFrameW > boundsWidth){
x = boundsWidth - spriteFrameW;
}
return x;
}
function leftArrowTransform(x, moveSpeed, spriteFrameW, boundsWidth) {
return handleXOutOfBounds(x - moveSpeed, spriteFrameW, boundsWidth);
}
function rightArrowTransform(x, moveSpeed, spriteFrameW, boundsWidth) {
return handleXOutOfBounds(x + moveSpeed, spriteFrameW, boundsWidth);
}
function downArrowTransform(y, moveSpeed) { return y + moveSpeed; }
function upArrowTransform(ascend, jumpHeight) {
ascend.height = jumpHeight;
ascend.spriteIndex = -1;
return ascend;
}
function randomizeStationaryAnimation(step, stationarystep) {
const stationaryPauseLength = 20;
// Random jumps between the stationary goose frames. Uses stationaryStep as a timer.
if(stationarystep <= 0) {
stationarystep = Math.floor(Math.random() * stationaryPauseLength) + stationaryPauseLength;
step = Math.floor(Math.random() * 100000);
} else {
stationarystep--;
}
return [ step, stationarystep ];
}
function nextStationarySpriteIndex(stationarySpriteIndexes, step) {
const stationaryAnimationFrameCount = stationarySpriteIndexes.length;
return step % stationaryAnimationFrameCount;
}
function nextAscendSpriteIndex(directionalascendSpriteIndexes, step) {
const directionalAscendAnimationFrameCount = directionalascendSpriteIndexes.length;
return directionalascendSpriteIndexes[step % directionalAscendAnimationFrameCount];
}
function nextDescendSpriteIndex(directionaldescendSpriteIndexes, step) {
const descendAnimationFrameCount = directionaldescendSpriteIndexes.length;
return directionaldescendSpriteIndexes[step % descendAnimationFrameCount];
}
function nextRunningSpriteIndex(directionalrunningSpriteIndexes, step) {
const stepsPerFrame = 2;
const runningAnimationFrameCount = directionalrunningSpriteIndexes.length;
return directionalrunningSpriteIndexes[Math.floor(step / stepsPerFrame) % runningAnimationFrameCount];
}
function ascendGooseY(goose, ascendHeight, boundsHeight, spriteFrameH) {
goose.y = goose.y - ascendHeight;
goose.y = handleYOutOfBounds(goose.y, boundsHeight, spriteFrameH);
return goose.y;
}
function handleYOutOfBounds(y, boundsHeight, spriteFrameH) {
if(y + 1 > boundsHeight) {
y = boundsHeight - 1;
} else if(y - spriteFrameH < 0) {
y = spriteFrameH;
}
return y;
}
export {
initialGooseXPosition,
determineDirection,
leftArrowTransform,
rightArrowTransform,
downArrowTransform,
upArrowTransform,
ascendGooseY,
randomizeStationaryAnimation,
nextStationarySpriteIndex,
nextAscendSpriteIndex,
nextDescendSpriteIndex,
nextRunningSpriteIndex,
handleXOutOfBounds
};
| javascript |
use uuid::Uuid;
use chrono::{DateTime, Utc};
#[derive(Serialize, Deserialize, PartialEq, Debug)]
pub struct Session {
pub user_id: Uuid,
pub expires: DateTime<Utc>,
}
impl Session {
pub fn to_json(&self) -> String {
serde_json::to_string(self).expect("Unable to convert session to json")
}
pub fn parse(json: &str) -> Session {
serde_json::from_str(json).expect("Unable to parse session from json")
}
}
#[cfg(test)]
mod tests {
use super::*;
use std::str::FromStr;
#[test]
fn serialize_to_json() {
let session = Session {
user_id: Uuid::from_str("b044210a-2186-4369-bf55-c4310c342fce").unwrap(),
expires: DateTime::parse_from_rfc3339("2019-09-20T15:23:47.435840Z").unwrap().with_timezone(&Utc),
};
let json = session.to_json();
assert_eq!(r#"{"user_id":"b044210a-2186-4369-bf55-c4310c342fce","expires":"2019-09-20T15:23:47.435840Z"}"#, json);
}
#[test]
fn deserialize_from_json() {
let json = r#"{"user_id":"b044210a-2186-4369-bf55-c4310c342fce","expires":"2019-09-20T15:23:47.435840Z"}"#;
let session = Session::parse(json);
assert_eq!(session, Session {
user_id: Uuid::from_str("b044210a-2186-4369-bf55-c4310c342fce").unwrap(),
expires: DateTime::parse_from_rfc3339("2019-09-20T15:23:47.435840Z").unwrap().with_timezone(&Utc),
});
}
}
| rust |
{
"app": "npx ts-node bin/sdlc-organization.ts",
"context": {
"@aws-cdk/core:enableStackNameDuplicates": "true",
"aws-cdk:enableDiffNoFail": "true",
"@aws-cdk/core:stackRelativeExports": "true",
"@aws-cdk/core:newStyleStackSynthesis": true,
"github_alias": "awslabs",
"email": "<EMAIL>"
}
}
| json |
HG Rapid Test FPV nigikoresho cya chromatografique immunoassay kit kugirango hamenyekane byihuse kandi byujuje ubuziranenge virusi ya feline panleukopenia antigen mumyanda ya feline. Indwara ya nitrocellulose yibikoresho byandujwe na antibody yihariye ya FPV kumurongo wibizamini hamwe na antibodiyite zirwanya imbeba kumurongo wo kugenzura. Kandi na none, antibody yihariye ya FPV ihujwe nuduce twa zahabu ya colloidal.Iyi conjugate ishyirwa kuri polyester cyangwa fibre yikirahure nka padi ya conjugate.Iyo icyitegererezo kijugunywe mucyitegererezo neza ku gikoresho, conjugate ya solubilize yimuka hamwe nicyitegererezo ikwirakwizwa rya pasiporo kandi conjugate hamwe nicyitegererezo byombi bihura na antibody yanduye kuri nitrocellulose.Niba icyitegererezo kirimo antigen ya FPV, ibisubizo igaragara nkumurongo utukura muminota ~ 10 muri testline kuri membrane. Igisubizo gikomeje kwimuka kugirango uhure na reagent igenzura ihuza conjugate, bityo ikabyara undi murongo utukura.
Ubunebwe no kwiheba.
Kurya kumunwa cyangwa kuruka.
Gusohora amazi mumazuru.
Umuriro mubyiciro byambere, ukurikirwa nubushyuhe buke bwumubiri.
Impiswi, ishobora kuba amazi cyangwa maraso.
Kudashobora kurya no kunywa.
1 Iki gicuruzwa gikoresha ihame rya colloidal zahabu immunochromatography kugirango tumenye vuba FPV Antigen.
2 Iki gicuruzwa ntigisaba ibikoresho byihariye, kandi birashobora gushyirwa mubikorwa byihuse kandi byoroshye kugenzurwa kurubuga.
3 Ukoresheje ibikoresho fatizo byera cyane nibikoresho byujuje ubuziranenge, byerekana ibyiyumvo bihanitse cyane kandi byihariye.
Shira ingero zose, ibikoresho byo gupima, hamwe na Assay igisubizo hanyuma ubemere kubushyuhe bwicyumba mbere yo kwipimisha (15 ~ 30 min).
Kuraho igikoresho cyo kwipimisha mumufuka ufunze, hanyuma ubishyire ahantu hasukuye kandi horoheje.
Kusanya ingero z'intebe ku ngingo 4 zitandukanye cyangwa ufate mu buryo butaziguye urugero rwa kine.
Shyiramo kandi uvange swab hamwe nigisubizo cyibisubizo muri tube kugeza ingero zimaze guseswa.Noneho, fata swab hanyuma usubiremo inzira kuri buri sample.
Ongeramo ibitonyanga 3 ~ 4 (hafi 100µL) yumuti wafashwe nigitonyanga gishobora gukoreshwa murugero rwiza.
Mu minota 10, sobanura ibisubizo by'ibizamini.Ntugasome nyuma yiminota 10.
Iki gicuruzwa kigamije korohereza ikigo nderabuzima rusange ku isi kongerera ubushobozi bwo gusuzuma igihe bahuye n’ikibazo cy’ubuzima bwa Canine Heartworm Virus kigaragara, bigatuma igisubizo cy’ubuzima rusange kandi cyihuse mu gihe habaye icyorezo.
| english |
{
"id": 4186,
"name": "<NAME>",
"incomplete": false,
"members": true,
"tradeable": false,
"tradeable_on_ge": false,
"stackable": false,
"stacked": null,
"noted": false,
"noteable": false,
"linked_id_item": null,
"linked_id_noted": null,
"linked_id_placeholder": 17565,
"placeholder": false,
"equipable": false,
"equipable_by_player": false,
"equipable_weapon": false,
"cost": 1,
"lowalch": null,
"highalch": null,
"weight": 0.005,
"buy_limit": null,
"quest_item": true,
"release_date": "2005-01-31",
"duplicate": false,
"examine": "Upon close examination, this seems to be a key.",
"icon": "iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAABFElEQVR4Xu3UsQrCQAwG4PYBHAXHTg4O0kWKoiAWnLSDCHXQpa/g+3PlPI5Lk7SIXBOH/pDBai+fMTZJpkyBSQ0ttaTmdi5IKaF4jK3FfCaN6scooXgQvm5f51kmgaKNfb2bqy4IYqpyQ6ACINfcN7W7cixWBCMAcpBndTDN/USaczUiyE3kcdmTplx5vMVEBvG7MVQQEhHjIOVuTRriKeCKCAmHbvMlAWAInAIufPIPSc2rrj+FAUMQfErEuGYcShhi033qepQtcQjGYJQH4TtHCA+BPxGcDr47cvoxEKWOwe+5KY2afowSioLgYocFVkRBRHdn6Oe650QN34wusOi/LaDClGgEH4o2Yt/++/wVZgpIC6L539V5x/oGAAAAAElFTkSuQmCC",
"wiki_name": "Shed key",
"wiki_url": "https://oldschool.runescape.wiki/w/Shed_key",
"wiki_exchange": null,
"equipment": null,
"weapon": null
} | json |
<reponame>lucam03/discordBot
package dao;
import dao.entities.ReportEntity;
import java.time.LocalDateTime;
public class ImageQueue {
private final long queuedId;
private final String url;
private final long artistId;
private final long uploader;
private final String artistName;
private final LocalDateTime localDateTime;
private final int userReportCount;
public ImageQueue(long queuedId, String url, long artistId, long uploader, String artistName, LocalDateTime localDateTime, int userReportCount) {
super();
this.queuedId = queuedId;
this.url = url;
this.artistId = artistId;
this.uploader = uploader;
this.artistName = artistName;
this.localDateTime = localDateTime;
this.userReportCount = userReportCount;
}
public long getQueuedId() {
return queuedId;
}
public String getUrl() {
return url;
}
public long getArtistId() {
return artistId;
}
public long getUploader() {
return uploader;
}
public String getArtistName() {
return artistName;
}
public LocalDateTime getLocalDateTime() {
return localDateTime;
}
public int getUserReportCount() {
return userReportCount;
}
}
| java |
The film releases on March 8.
The film releases on March 8.
You're doing amazing sweetie!
The announcement that Mr India 2 was in the works with Ali Abbas Zafar and Zee Studios was announced just days ago. But now, the original Mr India director Shekhar Kapur has denied being informed about it, and Shah Rukh Khan has reportedly declined Mogambo's role.
20 years ago, Shah Rukh Khan, Juhi Chawla and Aziz Mirza's Phir Bhi Dil Hai Hindustani showcased a checklist of events/phenomena that we have now positively seen unfold in our country. And maybe we're finally understand the damage that commercialisation of media can do to our democracy.
Yes, it is time to have this conversation about sequels being better than their predecessors.
It's been 30 years since Ajay Devgn, striding two motorcycles, entered Bollywood. Now, with Tanhaji: The Unsung Warrior, he completes 100 films. And Shah Rukh Khan, Kajol are congratulating him by sharing the film's poster.
You have reached the last page. If you are looking for an older article try searching by keyword or URL.
| english |
<filename>sql-database-recon/src/main/java/org/itzstonlex/recon/sql/event/ReconSqlEventListenerAdapter.java
package org.itzstonlex.recon.sql.event;
import org.itzstonlex.recon.sql.ReconSqlConnection;
public abstract class ReconSqlEventListenerAdapter implements ReconSqlEventListener {
@Override
public void onConnected(ReconSqlConnection connection) {
// override me.
}
@Override
public void onReconnect(ReconSqlConnection connection) {
// override me.
}
@Override
public void onDisconnect(ReconSqlConnection connection) {
// override me.
}
@Override
public void onExecute(ReconSqlConnection connection, String sql) {
// override me.
}
}
| java |
Saturday November 25, 2017,
While we are used to Bollywood casting people with disabilities in poor light, there are some films that stand out for their compassionate and realistic portrayal of disabled people.
More often than not, Bollywood fails to capture the life of a specially-abled person in its true sense. Many movies end up portraying ‘disability’ either in a stereotypical manner or use them for comic relief.
However, there are a few Bollywood films that have not only managed to capture their life realistically but also changed the perspective of the audience towards the disabled in a positive manner. Here is a list of 10 movies that have successfully brought this out.
In this movie, Naseeruddin Shah portrays a blind school’s principal who is suffering from visual impairment, and Shabana Azmi takes on the role of one of the school teachers. The movie explores the lives and emotions of the students in the school. With the two characters falling in love with each other, the insecurities and complexities of a blind person is brought out beautifully.
This movie directed by Gulzar stars Sanjeev Kumar and Jaya Bachchan as a deaf and mute couple. Koshish effectively portrays the hardships a person with disability has to endure while living amidst a desensitised society. The movie won Sanjeev Kumar a national award.
Considered as one of the finest performances of Sridevi, the movie also stars Kamal Haasan. The film, directed by Balu Mahendra, shows a young woman whose mind regresses to that of a six-year-old’s after sustaining a head injury in a car accident. Unfortunately, she gets trapped in a brothel and is rescued by a lonely teacher played by Kamal Haasan.
Directed by Nagesh Kukunoor, this movie shows a deaf and mute boy played by Shreyas Talpade embark a journey to become a cricketer in the Indian team. Along his journey, he meets a retired alcoholic cricketer played by Naseeruddin Shah who helps him achieve his goal. Despite the many obstacles Iqbal faces, he fulfils his dream giving a ray of hope to many.
Inspired by Hellen Keller’s struggles and life, Black showed the relationship of a blind, deaf and mute girl, played by Rani Mukherjee, with her mentor, portrayed by Amitabh Bachchan. Directed by Sanjay Leela Bhansali, this movie bagged national awards for best actor and best feature film.
Acting as an eye-opener, this film made many aware and take notice of an eight-year-old boy who suffers from dyslexia but is unfortunately considered to be just lazy. Initially rejected by all, this boy, portrayed by Darsheel Safary, meets a passionate art teacher in his new boarding school. Played by Aamir Khan, the teacher shows compassion towards the boy and begins understanding the real reason behind his problem. The beautiful depiction of how this teacher works closely with the lost boy to help him won the hearts of many.
Directed by Anurag Basu, this movie depicts the relationship of a deaf and mute boy, played by Ranbir Kapoor, with two women. One of the women, portrayed by Priyanka Chopra, suffers from autism. Though light-hearted, this movie never compromised on the sensitivity a movie on this subject requires.
Made by Shonali Bose, this movie sees Kalki Koechlin take up the role of a teenager afflicted by cerebral palsy. The movie shows the journey of this women to discover herself, and was also applauded for exploring the sexual desires of a specially-abled person.
| english |
<gh_stars>0
{"caseSensitive":true,"concept":[{"code":"active","definition":"The device is still being used.","display":"Active"},{"code":"completed","definition":"The device is no longer being used.","display":"Completed"},{"code":"entered-in-error","definition":"The statement was recorded incorrectly.","display":"Entered in Error"},{"code":"intended","definition":"The device may be used at some time in the future.","display":"Intended"},{"code":"stopped","definition":"Actions implied by the statement have been permanently halted, before all of them occurred.","display":"Stopped"},{"code":"on-hold","definition":"Actions implied by the statement have been temporarily halted, but are expected to continue later. May also be called \"suspended\".","display":"On Hold"}],"contact":[{"telecom":[{"system":"url","value":"http://hl7.org/fhir"},{"system":"email","value":"<EMAIL>"}]}],"content":"complete","date":"2018-12-10T22:44:54+00:00","description":"A coded concept indicating the current status of the Device Usage.","experimental":false,"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-wg","valueCode":"oo"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"trial-use"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm","valueInteger":0}],"id":"device-statement-status","identifier":[{"system":"urn:ietf:rfc:3986","value":"urn:oid:2.16.840.1.113883.4.642.1.215"}],"meta":{"lastUpdated":"2018-12-10T22:44:54.265+00:00"},"name":"DeviceUseStatementStatus","publisher":"HL7 (FHIR Project)","resourceType":"CodeSystem","status":"draft","text":{"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><h2>DeviceUseStatementStatus</h2><div><p>A coded concept indicating the current status of the Device Usage.</p>\n</div><p>This code system http://hl7.org/fhir/device-statement-status defines the following codes:</p><table class=\"codes\"><tr><td style=\"white-space:nowrap\"><b>Code</b></td><td><b>Display</b></td><td><b>Definition</b></td></tr><tr><td style=\"white-space:nowrap\">active<a name=\"device-statement-status-active\"> </a></td><td>Active</td><td>The device is still being used.</td></tr><tr><td style=\"white-space:nowrap\">completed<a name=\"device-statement-status-completed\"> </a></td><td>Completed</td><td>The device is no longer being used.</td></tr><tr><td style=\"white-space:nowrap\">entered-in-error<a name=\"device-statement-status-entered-in-error\"> </a></td><td>Entered in Error</td><td>The statement was recorded incorrectly.</td></tr><tr><td style=\"white-space:nowrap\">intended<a name=\"device-statement-status-intended\"> </a></td><td>Intended</td><td>The device may be used at some time in the future.</td></tr><tr><td style=\"white-space:nowrap\">stopped<a name=\"device-statement-status-stopped\"> </a></td><td>Stopped</td><td>Actions implied by the statement have been permanently halted, before all of them occurred.</td></tr><tr><td style=\"white-space:nowrap\">on-hold<a name=\"device-statement-status-on-hold\"> </a></td><td>On Hold</td><td>Actions implied by the statement have been temporarily halted, but are expected to continue later. May also be called "suspended".</td></tr></table></div>","status":"generated"},"title":"DeviceUseStatementStatus","url":"http://hl7.org/fhir/device-statement-status","valueSet":"http://hl7.org/fhir/ValueSet/device-statement-status","version":"3.6.0"} | json |
UGC NET 2023 Phase 2 Admit Card Direct Link: The National Testing Agency (NTA) has released the admit card for the University Grants Commission National Eligibility Test (UGC NET) Phase 2 examination. According to the official notification, NTA will conduct the UGC NET June 2023 Phase – II examinations from June 19 to June 22, 2023. Aspirants can download the NTA UGC NET June 2023 Phase II Admit Card at — ugcnet. nta. nic. in. Candidates are advised to download their hall ticket using their Application No. and Date of Birth. Check exam day guidelines, the official website, and the steps to check the admit card.
Candidates will be permitted to carry only the following items with them into the examination venue:
Personal hand sanitizer(50ml)
No candidate is allowed to enter the Centre wearing his/her own mask.
PwD certificate issued by the Competent Authority, if claiming the relaxation under PwD category.
The candidates must report at the Examination Centre two hours before the commencement of the examination so as to complete the frisking and registration formalities well before time. Registration desk will be closed 30 minutes prior to the examination.
Candidates must not be permitted to enter in the Examination Centre after 8. 30 am in First Shift and after 2. 30 pm in Second Shift.
Candidates are also advised to report at the Examination Hall/Room in the Examination Centre by 8. 45 am in the First Shift and by 2. 45 pm in the Second Shift.
The candidate must show, on demand, the Admit Card downloaded/printed from the NTA website for admission in the examination room/hall.
Unfair Means Practice is an activity that allows a candidate to gain an unfair advantage over other candidates. It includes, but is not limited to: Being in possession of any item or article which has been prohibited or can be used for Unfair Practices including any stationery item, communication device, accessories, eatable items, ornaments or any other material or information relevant or not relevant to the Examination in the paper concerned. | english |
.TodoList {
width: 100%;
height: 70%;
margin-bottom: 20px;
overflow-y: scroll;
}
/* .TodoList:hover {
cursor: pointer;
} */
.TodoList::-webkit-scrollbar {
-webkit-appearance: none;
}
.TodoList::-webkit-scrollbar:vertical {
width:15px;
}
.TodoList::-webkit-scrollbar-button:increment,.TodoList::-webkit-scrollbar-button {
display: none;
}
.TodoList::-webkit-scrollbar:horizontal {
height: 10px;
}
.TodoList::-webkit-scrollbar-thumb {
background-color: var(--shadow);
border-radius: 20px;
border: 4px solid var(--background);
}
.TodoList::-webkit-scrollbar-track {
border-radius: 10px;
} | css |
#include <iostream>
#include <vector>
using std::vector;
using std::cin;
using std::endl;
using std::cout;
int
dfs(int a, int b, int loc, int i, vector<int>& sentence)
{
int d{0};
if (loc == 1) {
d += std::max(d, dfs(sentence[i], b, loc+1, i+1, sentence));
} else if (loc == 2) {
d += std::max(d, std::max(dfs(a, b, loc, i+1, sentence), dfs(a, b, loc+1, i+1, sentence)));
if (b > 0) {
d = std::max(d, dfs(a, b, loc, i+1, sentence));
}
}
}
int
main()
{
} | cpp |
IPL 2021 resumed recently after being on a hiatus for a few months owing to the second wave of COVID-19. The second leg of the Indian Premier League 2021, aka Vivo IPL 2021, is being played in the United Arab Emirates (UAE). The IPL 20201 final match will be held today at 7:30pm IST. You can watch the match live online from the comfort of your home through Disney+ Hostar on mobile, desktop, or a smart TV, or any television set on Star India's sports channels.
The final match of IPL 2021 will be held between Chennai Super Kings (CSK) and Kolkata Knight Riders (KKR). The toss between the finalists is scheduled for 7pm IST and the first ball is to be bowled at 7:30pm IST. The IPL 2021 final will be played at the Dubai International Stadium in Dubai, UAE.
Disney+ Hotstar has the rights to telecast the final match of IPL 2021 in India. Annual subscription for Disney+ Hostar Super is available for Rs. 899 and for Disney+ Hostar Premium is available for Rs. 1,499. The subscription for Disney+ Hostar Mobile is available for Rs. 499 a year for Android and iOS devices. There are various plans offered by Airtel, VI (Vodafone India, and Jio that come bundled with Disney+ Hotstar Mobile membership for users to watch the Vivo IPL 2021 matches live.
IPL 2021 final between CSK and KKR can also be viewed live on television through Star India's sports catalogue and Star Sports 1 HD and Star Sports 1 channels in English, Hindi, Tamil, Telugu, and Kannada.
YuppTV has the exclusive rights for global broadcast of this year's IPL matches. This will let viewers in Australia, Bhutan, Sri Lanka, Nepal, the Maldives, and through Europe, South and Central America, as well as South East Asia — except Singapore and Malaysia — watch IPL 2021 matches live.
The subscription for YuppTV costs Rs. 49 per month and brings access to 160 channels including NDTV, NDTV India, Aaj Tak, Zoom, Times Now, and many others, in 14 languages in India. However, YuppTV won't broadcast the IPL 2021 Final in India as Disney+ Hostar has the exclusive rights in the country.
Cricket fans in Australia can watch the livestream of Vivo IPL 2021 final match via Kayo Sports, and in the US via Willow TV.
Catch the latest from the Consumer Electronics Show on Gadgets 360, at our CES 2024 hub.
| english |
More about my job as a compliance officer at a marijuana cultivation site in the USA:
Even in the USA, if you drove drunk and arrested 3 times for it, you’re a felon. You’re fucked. And alcohol is still a big problem here, not marijuana. It’s sad to see people dying because of drunk people in Malaysia though.
And for an Islamic country to not have super strong alcohol regulations? It baffles me. That’s why I think it should be illegal because it’s the root of all evil.
| english |
<filename>json4img-rest/src/main/java/com/github/vitalz/jrest/json4img/api/ImageApi.java<gh_stars>1-10
package com.github.vitalz.jrest.json4img.api;
import ch.qos.logback.core.util.FileUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.vitalz.jrest.json4img.model.Image;
import com.github.vitalz.jrest.json4img.model.JsonToImage;
import com.github.vitalz.jrest.json4img.service.file.FileStorage;
import com.github.vitalz.jrest.json4img.service.image.ImageFactory;
import com.github.vitalz.jrest.json4img.service.image.PixelPredicate;
import com.google.inject.Inject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.imageio.ImageIO;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
@Path("/image")
public final class ImageApi {
private static final Logger log = LoggerFactory.getLogger(ImageApi.class);
@Inject
private FileStorage fileStorage;
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.TEXT_PLAIN)
public Response jsonToImage(String json) {
try {
ObjectMapper objectMapper = new ObjectMapper();
JsonToImage json2Img = objectMapper.readValue(json, JsonToImage.class);
String toRelativePath = json2Img.getToRelativePath();
Image model = json2Img.getImage();
BufferedImage bufferedImage = new ImageFactory().createImage(model.getWidth(), model.getHeight(), Color.decode(model.getBackgroundColor()));
model.getPixels()
.stream()
.filter(new PixelPredicate(model.getWidth(), model.getHeight()))
.forEach(p -> bufferedImage.setRGB(p.getX(), p.getY(), Color.decode(p.getColor()).getRGB()));
File file = new File(fileStorage.getOutputDir().get(), toRelativePath);
FileUtil.createMissingParentDirectories(file);
log.info("Writing an image into a file: {}", file.getAbsolutePath());
ImageIO.write(bufferedImage, "png", file);
return Response.ok().build();
} catch (Throwable t) {
log.error("Server error has occurred.", t);
return Response.serverError()
.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), t.getLocalizedMessage())
.build();
}
}
}
| java |
<reponame>Monkey8bit/django-basics<filename>shop/mainapp/json/categories.json
[{"model": "mainapp.productcategory", "pk": 1, "fields": {"name": "Chairs", "description": "", "is_active": true}}, {"model": "mainapp.productcategory", "pk": 2, "fields": {"name": "Tables", "description": "", "is_active": true}}, {"model": "mainapp.productcategory", "pk": 3, "fields": {"name": "Lamps", "description": "", "is_active": true}}] | json |
How and for what are the analogues of Actovegin used?
Actovegin is a drug that is obtained from calf blood by the method of ultrafiltration (for the preparation it is used exclusively the blood of calves that are not yet eight months old), which is why it has practically no contraindications to use. Actovegin and its analogs are available in the form of injection solutions, in the form of dragees, 20% gel, 5% ointment, 10% cream, 10% and 20% solution for infusion.
What are the analogues of Actovegin used for?
Analogues of Actovegin and the original drug improve blood circulation, which is why they are most often used in a variety of brain disorders, in particular, they are used after a stroke. Drugs are often prescribed to patients with diabetes mellitus and with vascular disorders, particularly with trophic ulcers, because it is absolutely certain that the drug has insulin-like activity. Actovegin promotes regeneration and renewal of tissues, which leads to an improvement in blood circulation in tissues.
How do Actovegin analogs work on the human body?
It is proved that the Actovegin analogues have the best effect on anaerobic respiration, which subsequently helps the vital activity of tissues that experience metabolic insufficiency. Actovegin perfectly stimulates metabolic processes in the body and has a positive effect on patients with cerebrovascular disorders. In addition, Actovegin analogs have an immunomodulatory effect, it has an indirect effect on the synthesis of cells and reduces the effect of ischemic tissue damage. Actovegin (a substitute) helps to improve the quality of life of patients with heart disorders, helps with systemic scleroderma, systemic lupus erythematosus and rheumatoid arthritis.
What are the benefits of the analogues of Actovegin for athletes?
Since Actovegin analogs have an insulin-like action and stimulate the transport of oxygen and glucose in the body, strengthening their intracellular utilization, this makes them absolutely indispensable for athletes. Drugs increase the effectiveness of sports and training in general, however, due to their abuse of cycling athletes, Actovegin's analogues have been included in the list of prohibited preparations of the International Olympic Committee. However, subsequently Actovegin was excluded from the blacklist, due to a lack of information about the drug.
Is Actovegin and its analogs safe?
The safety of Actovegin can be determined by several important signs.
- Use of animal raw materials from individuals grown in ecologically clean areas.
- All animal raw materials in terms of infectivity are divided into four categories. The blood of the calves from which Actovegin's analogs are made belongs to the fourth, the most secure degree.
- The age of calves is of no small importance, the younger the individual, the less likely that they are infected with infections.
When taking Actovegin, in some cases, allergic reactions may occur (edema, urticaria, fever). In such cases, the drug is canceled and antihistamine, hormonal drugs are prescribed, especially in severe cases, corticosteroids, plasma substitutes and catecholamines are used to remove allergy symptoms. Any analogue of Actovegin tablets is not recommended for the treatment of pregnant women and children under six years of age, as well as patients with individual intolerance to the components of the drug. Drugs Actovegin should be used with caution and patients with diabetes.
Analogues of Actovegin are a great tool for improving the quality of life of many patients! | english |
<filename>ide/projectapi/src/org/netbeans/spi/project/package.html
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html>
<body>
Support for defining project types.
<p>Each kind of project in the system needs to be loaded by a
{@link org.netbeans.spi.project.ProjectFactory}, which defines how to recognize
projects on disk, load their metadata into memory, and save their metadata back
to disk. {@link org.netbeans.spi.project.ProjectState} is used to let the
factory mark a project as being modified in memory.</p>
<p>Projects will normally put implementations of several interfaces such as
{@link org.netbeans.spi.project.ActionProvider} into their lookup.</p>
</body>
</html>
| html |
NASA and SpaceX have set a specific date and time target for their historic first astronaut launch aboard a private spacecraft from U.S. soil, with a planned date of May 27 and a target liftoff time of 4:32 PM EDT (1:32 PM PDT) from Kennedy Space Center, at SpaceX’s Launch Complex 39A (LC-39). The mission had been previously announced to be tracking toward a mid to late-May launch time frame, but now we know exactly when the agency and SpaceX hope to launch astronauts Bob Behnken and Doug Hurley for this inaugural trip to the International Space Station.
The launch is the first crewed mission in NASA’s Commercial Crew program, which seeks to return American launch capabilities to U.S. soil through private partnerships, with both SpaceX and Boeing taking part and developing their own separate launch vehicles and crew craft. SpaceX has taken all the steps necessary to get to this stage ahead of Boeing, and this flight, called Demo-2, while still technically part of the test program, will see NASA’s astronauts visit the space station for “an extended stay,” with a full duration yet to be determined.
This final test will validate each aspect of the Crew Dragon and Falcon 9 launch system, including the pad from which the rocket takes off, the operational facilities on the ground, orbital systems and astronaut procedures. Pending successful completion of all those elements, Crew Dragon should be set for full operational certification, after which time it can begin regularly scheduled service of delivering astronauts to and from the ISS.
For the mission, Crew Dragon will launch with Behnken and Hurley, then enter orbit and rendezvous with the ISS, which should occur around 24 hours after liftoff. The spacecraft is designed to dock fully autonomously with the station (and has done so on a previous occasion during an uncrewed demo mission), then Behnken and Hurley will disembark and join as members of the ISS crew, performing research on the orbital science platform.
The Crew Dragon flying this mission is designed to stay on orbit for around 110 days, but its actual length of stay will be decided by how ready the commercial crew mission to follow is at the time of launch. That Crew Dragon, which is the fully operational version, is designed for stays of at least 210 days, and the crew complement of four astronauts, including three from NASA and one from Japan’s space agency, is already determined. If all goes well, it’ll happen sometime later this year.
Crew Dragon from Demo-2 will perform an automated undocking from the ISS with Behnken and Hurley on board when it is ready to leave, and then they’ll re-enter Earth’s atmosphere and have a controlled splashdown landing in the Atlantic Ocean, where a SpaceX ship will pick them up and bring them back to Florida.
Obviously, NASA and SpaceX are facing challenges, along with everyone else, with the global COVID-19 crisis ongoing, but the agency has taken extra precautions to ensure this mission continues, since NASA Administrator Jim Bridenstine notes that continued U.S. access to, and presence within the ISS is critical.
| english |
<gh_stars>1-10
// Place your settings in this file to overwrite default and user settings.
{
"editor.renderWhitespace": "all"
}
// Controls how the editor should render whitespace characters,
// posibilties are 'none', 'boundary', and 'all'.
// The 'boundary' option does not render single spaces between words. | json |
/* eslint-disable no-unused-vars */
/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable react/no-array-index-key */
import React from "react";
import { HandlerFunction } from "@storybook/addon-actions";
import { tasks } from "./data";
import { EmptyData, Loading } from "../../atoms";
import Task from "../../atoms/Task";
interface IProps {
loading?: boolean;
empty?: boolean;
Tasks?: tasksProps[];
}
interface tasksProps {
task: { id: any; title: string; state: any; updatedAt?: Date };
onArchiveTask: HandlerFunction;
onPinTask: HandlerFunction;
}
const TaskList: React.FC<IProps> = props => {
const { loading, empty, Tasks } = props;
const newTasks = Tasks
? [
...Tasks.filter(item => item.task.state === "TASK_ARCHIVED"),
...Tasks.filter(item => item.task.state !== "TASK_ARCHIVED"),
]
: [];
const newtasks = [
...tasks.filter(item => item.task.state === "TASK_ARCHIVED"),
...tasks.filter(item => item.task.state !== "TASK_ARCHIVED"),
];
const showData = () => {
if (empty) {
return <EmptyData description="Yay You Have no Tasks!! Sit back and relax" />;
}
if (loading) {
return <Loading type="skeleton" />;
}
if (Tasks) {
return (
<>
{newTasks.map((item: tasksProps, index: number) => {
return (
<Task
key={index}
task={item.task}
onArchiveTask={item.onArchiveTask}
onPinTask={item.onPinTask}
/>
);
})}
</>
);
}
return (
<>
{newtasks.map((item: tasksProps, index: number) => {
return (
<Task
key={index}
task={item.task}
onArchiveTask={item.onArchiveTask}
onPinTask={item.onPinTask}
/>
);
})}
</>
);
};
return <div>{showData()}</div>;
};
export default TaskList;
| typescript |
<filename>kiwi-pycon-2016/videos/use-workflow-as-a-service-without-writing-python-code.json
{
"copyright_text": "Creative Commons Attribution license (reuse allowed)",
"description": "Lingxian Kong\nhttps://kiwi.pycon.org/schedule/presentation/120/\nThings will be in a mess if you want to implement a program that have a lot of tasks running in any language, including Python. Most of complicated processes consist of lots of steps, which should be executed in particular sequence. Mistral(implemented in Python) can automate such orchestration of steps and provide many other features, leave things to Mistral without writing your own Python code.",
"duration": 2016,
"language": "eng",
"recorded": "2016-09-11",
"related_urls": [
"https://kiwi.pycon.org/schedule/presentation/120/"
],
"speakers": [
"<NAME>"
],
"tags": [],
"thumbnail_url": "https://i.ytimg.com/vi/pLV_JQVTn2g/maxresdefault.jpg",
"title": "Use Workflow-as-a-Service without writing python code",
"videos": [
{
"type": "youtube",
"url": "https://www.youtube.com/watch?v=pLV_JQVTn2g"
}
]
}
| json |
If you have a budget of around ₹1. 5 lakh and are on the lookout for a powerful streetfighter then Bajaj Pulsar NS200 is most likely to be on your list. This is because the NS200 is the most powerful motorcycle in the segment; it is propelled by a 199. 5 cc liquid-cooled engine which delivers 24 bhp and 19 Nm of peak torque. But does that mean you should simply go ahead and book it? Well, we'd recommend that you take a look at some other bikes in the segment before you make your decision. There are many bikes in under ₹1. 5 lakh price bracket that offer a better value-for-money proposition and may even offer a better balance between performance, handling, and comfort. So, here are some other bikes that you can consider instead of the Bajaj Pulsar NS200.
For reference, the Pulsar NS200 will set you back by ₹1. 43 lakh (ex-showroom, Delhi)
.
Bajaj Dominar 250 has recently received a massive price cut, making it an attractive purchase. The tourer is propelled by a 248. 77 cc liquid-cooled, single-cylinder engine that puts out 26. 6 bhp, 23. 5 Nm, and is paired with a six-speed gearbox. The highlight of this bike is its hardware; the Dominar 250 rides on 37 mm inverted forks with mono-shock while the braking force comes from 300 mm front and 230 mm rear disc brakes with dual-channel ABS as standard.
Bajaj Dominar 250 price: ₹1. 54 lakh (ex-showroom, Delhi)
Yamaha MT-15 is not as powerful as Bajaj Pulsar NS200 but its lightweight frame makes it an agile and easy-to-handle bike. This naked streetfighter is powered by a 155 cc, liquid-cooled unit that puts out 18 bhp and 14 Nm. This engine is coupled to a six-speed gearbox with slip and assist clutch. The bike uses 41 mm telescopic forks with mono-shock and the stopping force comes from 282 mm front disc brake with 220 mm rear disc brake and single-channel ABS. And most will agree that the MT-15 looks more stylish than Pulsar NS200.
Yamaha MT-15 price: ₹1. 46 lakh (ex-showroom, Delhi)
Yamaha FZ25 is the Japanese brand's 250 cc bike that received a massive price cut some weeks ago. This naked streetfighter makes use of a 249 cc, air-cooled, single-cylinder engine that puts out 20. 5 bhp and 20 Nm of peak torque. This engine is offered in combination with a five-speed gearbox. This means that FZ25 is less powerful than the NS200. However, the 250 cc engine on this bike offers better levels of refinement as opposed to Pulsar NS200's powerplant. The suspension setup on Yamaha FZ25 twins include 41 mm telescopic forks with 7-step adjustable mono-shock while the braking hardware includes a 282 mm front disc brake with 220 mm rear disc brake and dual-channel ABS.
Yamaha FZ25 price: ₹1. 35 lakh to ₹1. 37 lakh (ex-showroom, Delhi)
TVS Apache RTR 200 4V is undoubtedly the most feature-rich bike in the segment. It gets three riding modes -- Urban, Rain, and Sport. Each of these modes adjusts the ABS response for an altered riding experience. The bike also gets Bluetooth for smartphone connectivity and GTT (Glide Through Traffic) feature that lets the bike crawl in bumper to bumper traffic without throttle input. The Apache 200 is propelled by a 197. 75 cc oil-cooled engine that puts out 20. 5 bhp and 17. 25 Nm of peak torque in Sport mode. The naked streetfighter is available with a five-speed gearbox with a slipper clutch. It also gets Showa telescopic forks with preload adjustment and mono-shock while the braking duties are tended to by 270 mm front and 240 mm rear petal disc brakes with single-channel ABS as standard. The customers, however, can also opt for a dual-channel ABS variant, albeit at some premium.
TVS Apache RTR 200 4V price: ₹1. 33 lakh to ₹1. 38 lakh (ex-showroom, Delhi)
Honda Hornet 2. 0 is another naked streetfighter that you can consider instead of the Bajaj Pulsar NS200. It is powered by a 184 cc air-cooled engine that makes 17 bhp and 16 Nm of peak torque. This engine is paired to a five-speed gearbox and uses PGM-Fi (fuel injection) system with 8 onboard sensors. Honda Hornet 2. 0 gets a slight edge over its rivals in the hardware department; it is equipped with gold-finished inverted forks with mono-shock, making it the only bike in the segment to get this provision. The braking duties, on the other hand, are tended to by 276 mm front and 220 mm rear petal disc brakes with single-channel ABS.
Honda Hornet 2. 0 price: ₹1. 31 lakh (ex-showroom, Delhi) | english |
In view of the ever-increasing cases of corona and the threat of new variants Omicron, the state governments have become alert. After the weekend lockdown in Delhi, it has now been decided to close schools and colleges in the neighboring state of Haryana.Schools closed till 26 JanuaryHaryana government has decided to keep all schools and colleges closed till 26 January. Chief Minister Manohar Lal Khattar said that online classes will continue to run smoothly during this period.There was a rapid increase in corona cases in Haryana on Sunday and a total of 5,166 new cases were reported. According to the state government, 2,338 of these cases were from Gurugram district alone. On Sunday, 13 new cases of infection from Omicron variants were reported in Haryana.Omicron raises concernAs of Monday, out of a total of 4,033 patients of Omicron in the country, 1,552 have recovered or have left the country. At the same time, Maharashtra has the highest number of 1,216 cases of Omicron. After this, 529 cases have been registered in Rajasthan, 513 in Delhi, 441 in Karnataka, 333 in Kerala and 236 in Gujarat.In view of the increasing cases of corona not only in Haryana, it has been announced to close the school in Rajasthan too. Expanding the scope of restrictions, the Rajasthan government announced the closure of schools up to 12th in all urban areas of the state till January 30, as well as curfew on Sunday, limiting market hours and limiting the seating capacity of restaurants. Was.
| english |
<filename>data/scraped_data/coreNLP_output_2015_guardian/science.life.and.physics.2015.jan.17.a.selfish.turn.around.cern.txt.json
version https://git-lfs.github.com/spec/v1
oid sha256:83cc1f5a93c4e71e0f61d261557663efe1f0e13dcc86df309a426b4b2bb14949
size 1266283
| json |
<filename>src/generated/resources/data/c/tags/blocks/emerald_ores.json
{
"replace": false,
"values": [
"#c:emerald_stone_ores",
"#c:emerald_deepslate_ores",
"#c:emerald_asteroid_ores"
]
} | json |
import { Component, OnInit } from '@angular/core';
import { AccessTokenService } from '../@core/apicore/apiservice/accesstoken.service';
import { AccessToken, AccessTokenResponse } from '../@core/apicore/apimodel/accesstoken.model';
import { URL_CONSTANTS as urlc } from '../url.constants';
import { FormGroup, FormBuilder } from '@angular/forms';
import { AuthgaurdService } from '../@core/apicore/gaurds/authgaurd.service';
import { CommonService } from '../@core/apicore/apiservice/common.service';
import { ProvidersModel } from '../@core/apicore/apimodel/common.model';
import { LinodePricingModel } from '../@core/apicore/apimodel/linodelist.model';
@Component({
selector: 'app-accesstoken',
templateUrl: './accesstoken.component.html',
styleUrls: ['./accesstoken.component.css']
})
export class AccesstokenComponent implements OnInit {
accessTokenForm: FormGroup;
accessTokenResponse: AccessTokenResponse;
providersModel: ProvidersModel;
linodePricingModel: LinodePricingModel[];
constructor(private accessTokenService: AccessTokenService,
private authgaurdService: AuthgaurdService,
private commonService: CommonService,
private fb: FormBuilder) { }
ngOnInit() {
let isAuthorized = this.authgaurdService.isAuthorized();
if (!isAuthorized) {
this.accessTokenForm = this.fb.group({
email: [urlc.SECURE_API_EMAIL],
api_key: [urlc.SECURE_API_KEY]
});
this.accessTokenService.getAccessToken(this.accessTokenForm.value).subscribe((data: any) => {
this.accessTokenResponse = data;
this.authgaurdService.login(this.accessTokenResponse);
});
}
this.commonService.getProvidersList().subscribe((data: any) => {
this.providersModel = data.providers;
});
this.commonService.getLinodeServerList().subscribe((data: any) => {
debugger;
this.linodePricingModel = data.data;
});
}
}
| typescript |
LAKE BUENA VISTA, Fla. (AP) — Jamal Murray scored 33 of his 42 points in a second half where he played every minute and the Denver Nuggets avoided elimination by beating the Utah Jazz 117-107 on Tuesday night in Game 5.
The Nuggets trail the sixth-seeded Jazz 3-2 with Game 6 on Thursday.
Murray was unstoppable down the stretch in nearly matching his 50-point effort in Game 4. He hit 17 of 26 shots and had eight assists, including a pass to Nikola Jokic for a 3-pointer with 23.6 seconds remaining that sealed the win.
The dynamic tandem of Murray and Jokic clearly weren't ready to leave the NBA bubble just yet. Jokic had it going early as he scored 21 of his 31 points in the the first quarter.
Murray took over late after his team fell behind by as many as 15 points in the third quarter.
“We’ve all got a will to win. Simple as that,” explained Murray, who played through a bruise on his knee. “That can carrying you. That can take you places."
With the game tied at 101, Murray scored nine straight for Denver to put the Nuggets up by nine with 1:20 to go.
Donovan Mitchell finished with 30 points while wearing a pair of bright, multicolored shoes. The sharpshooter is averaging 37.6 points over the five games.
Reserve Jordan Clarkson added 17 points and Joe Ingles found his rhythm with 13. Ingles had a combined two points in the previous two games.
The Nuggets turned in their best third period of the series when they needed it most. Trailing 63-54 at halftime, they outscored the Jazz 28-23. Utah has dominated the third quarter by a 142-92 margin before Tuesday.
Jazz: Before the game, C Rudy Gobert had his two-year reign as the NBA’s Defensive Player of the Year come to an end with Milwaukee’s Giannis Antetokounmpo winning the award. Gobert had 11 points and 12 rebounds.
Nuggets: F Michael Porter Jr. had 15 points and F Jerami Grant chipped in 13. ... Although G Gary Harris was upgraded to “questionable” for Game 5, that balky right hip sidelined him again. His last NBA game was March 11.
Mike Conley said there's a lesson to be learned after the Jazz lost some of their focus with the lead.
Jokic hit all five 3-pointers he took in the first quarter. He’s the third player in the series to have five in a quarter, joining Murray (fourth quarter in Game 4) and Mitchell (third in Game 2).
According to Basketball Reference, the playoff record for 3-pointers in a quarter is held by Antoine Walker. He had six by in the second quarter on April 28, 2002.
Murray and Mitchell keep turning in big performances. Mitchell has a pair of games in the series where he went for 50 or more points.
Before their walk-through Tuesday morning, Malone and the Nuggets talked about the situation with Jacob Blake, a Black man whose shooting by police in Kenosha, Wisconsin, on Sunday has roiled the nation.
“I am wearing a Black Lives Matter T-shirt. Black Lives Matter is on the courts. But a T-shirt and a slogan on a court is obviously not doing anything to stop the vicious cycle that we’ve seen time and time again,” Malone said.
| english |
<reponame>marvindanig/hamlet<filename>manuscript/page-223/body.html
<div class="leaf "><div class="inner justify"><blockquote><p>Enter King, Queen, Laertes, Lords, Osric and Attendants with foils &c. </p></blockquote><p>KING.
Come, Hamlet, come, and take this hand from me.
[The King puts Laertes’s hand into Hamlet’s.]</p><p class=" stretch-last-line ">HAMLET.
Give me your pardon, sir. I have done you wrong;
But pardon’t as you are a gentleman.
This presence knows, and you must needs have heard,
How I am punish’d with sore distraction.
What I have done
That might your nature, honour, and exception
Roughly awake, I here proclaim was madness.
Was’t Hamlet wrong’d Laertes? Never Hamlet.
If Hamlet from himself be ta’en away,
And when he’s not himself does wrong Laertes,
Then Hamlet does it not, Hamlet denies it.
Who does it, then? His madness. If’t be</p></div> </div> | html |
<filename>data/en/lucee6.json
{
"related":["stringEach","stringEvery","stringFilter","stringMap","stringReduce","stringSome","stringSort"],
"name":"Lucee 6 New Functions and Tags","type":"listing","description":"List of tags and functions added in Lucee 6"
} | json |
Tehran, May 3- At least 70 coal miners were trapped after an explosion in northern Iran on Wednesday, Iranian media said.
The mine in Golestan province collapsed when trapped methane gas exploded as workers tried to jump-start a locomotive engine, according to reports.
“Forty workers are trapped in one part of the mine and another 30 to 40 are trapped in another part,” the Fars and ISNA news agencies quoted the head of Iran’s emergency services, Pir Hossein Kolivand, as saying.
Twelve injured miners were pulled out alive, he said.
A local official said the tunnels were filled with gas, making rescue work difficult.
“Work to remove the rubble and drilling for a side tunnel has begun to access the trapped workers in the Zemestan Yort mine,” the official said.
Another official who did not want to be named told state news agency IRNA that several workers probably died in the blast, but there was no official casualty toll.
The mine has 500 workers and the explosion happened during a change of shift, state media said.
Emergency teams and sniffer dogs have been dispatched to the mine and work to remove the rubble has begun. | english |
The teaser of tvN's upcoming K-Drama, Bad and Crazy was released by the broadcast network on November 18 (KST). The trailer features some brilliant moments with lead actors Lee Dong Wook and Wi Ha Joon.
This Korean show is directed by Yoo Sun Dong, who also helmed the shows Uncanny Encounter and Vampire Prosecutor 2.
Lee Dong Wook is introduced as the bad guy while Wi Ha Joon is introduced as the crazy one in the first teaser for the show. The scenes featured in the teaser captured the essence of the show's title.
Bad and Crazy is expected to portray complex characters that do not neatly fit into the categories of good and evil. Lee Dong wook will play a police officer who is ambitious and has no ethical code. He puts all his effort into succeeding, and receives multiple promotions in a short amount of time.
Wi Ha Joon, on the other hand, is crazy but still upholds the law. So in Bad and Crazy, he faces injustice head on and brings chaos into the police officer's life.
Since the release of the tvN show's teaser, fans have shared their thoughts on Twitter. For the most part, they love the raw nature in which both Lee Dong Wook and Wi Ha Joon have been portrayed.
Many also claimed that they couldn't take their eyes off the two actors. Some also explained that they forgot about the other cast members of the K-Drama as they watched the teaser. The powerful performances by the two lead actors impressed fans, and this has resulted in huge anticipation for the show.
Bad and Crazy is scheduled to release on tvN on December 17 and will take over the slot currently occupied by Happiness. The show can be steamed by international audiences on iQiyi. | english |
Rumour has it that actor Sivakarthikeyan will soon be seen headlining a film directed by Venkat Prabhu. Reportedly, AGS Entertainment will bankroll the new project. The production house is planning to produce it with Sivakarthikeyan in the lead under the direction of Venkat Prabhu.
According to sources close to the industry, Sivakarthikeyan and Venkat Prabhu have been given an advance for the film by the production house. In a recent interview, Venkat Prabhu said that he will soon be directing his next Telugu film, and after wrapping up that project, he may direct a film starring Sivakarthikeyan. However, no official announcement has been made by the makers.
Speaking of director Venkat Prabhu, his previous 2021 sci-fi film Maanaadu had a strong run in theatre even 50 days after the release. In mid-January, the director also released the first look of his next film titled Manmatha Leelai. Like most of Venkat Prabhu films, Manmatha Leelai starring Ashok Selvan is said to have a promising generous dose of humour in it.
The director also has a few projects in the pipeline with Prabhu Deva, Sudeep, Arvind Swamy, and a few other films in Telugu, Hindi, and Malayalam film industries.
Coming to Sivakarthikeyan, he has become a leading actor in a short period. His previous film Doctor had grossed over Rs 100 crore worldwide. He is currently busy shooting for his Tamil and Telugu bilingual film directed by Anudeep.
On the professional front, Sivakarthikeyan has multiple projects lined up. His upcoming Don helmed by Cibi Chakravarthy will be released soon. Meanwhile, his Ayalaan directed by R. Ravikumarin is in the post-production stage.
Further, Sivakarthikeyan will be teaming up with director Rajkumar Periyasamy. The project is bankrolled by Kamal Haasan’s Raaj Kamal Films International in association with Sony Pictures Films India. | english |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Tutorial: Defining-the-command-function - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="App.html">App</a><ul class='methods'><li data-type='method'><a href="App.html#addCommand">addCommand</a></li><li data-type='method'><a href="App.html#isCliSentence">isCliSentence</a></li><li data-type='method'><a href="App.html#parseInput">parseInput</a></li></ul></li><li><a href="Command.html">Command</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-Defining-the-command-function.html">Defining-the-command-function</a></li><li><a href="tutorial-Overriding-the-default-help-generators.html">Overriding-the-default-help-generators</a></li><li><a href="tutorial-Working-with-contexts.html">Working-with-contexts</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>
<div id="main">
<h1 class="page-title">Tutorial: Defining-the-command-function</h1>
<section>
<header>
<h2>Defining-the-command-function</h2>
</header>
<article>
<h1>Defining the command function</h1><p>The documentation shows a very basic example of what a command is: when the user executes <code>foo</code>, <code>console.log('foo was executed');</code>. However, there's two parameters that Clapp passes back to your command:</p>
<ul>
<li><code>argv</code> contains the arguments and flags, and</li>
<li><code>context</code> contains your own information. See "working-with-contexts" for further info about contexts.</li>
</ul>
<h2>The <code>argv</code> object</h2><p>The <code>argv</code> object contains two children:</p>
<ul>
<li><code>argv.args</code>, and</li>
<li><code>argv.flags</code>.</li>
</ul>
<p>Both objects contain children objects with your data. So if you define the following flag:</p>
<pre class="prettyprint source lang-javascript"><code>var flag = {
name: 'limit',
desc: 'The number of items that will be shown. Can\'t be higher than 50',
type: 'number',
alias: 'l',
default: 10
}</code></pre><p>And the user runs:</p>
<pre class="prettyprint source lang-javascript"><code>app.parseInput('/testapp foo -l 25');</code></pre><p>Then you get:</p>
<pre class="prettyprint source lang-javascript"><code>// Command function
function(argv, context) {
console.log(argv.flags.limit); // 25
}</code></pre><p>If the user ran:</p>
<pre class="prettyprint source lang-javascript"><code>app.parseInput('/testapp foo');</code></pre><p>Then you'd get:</p>
<pre class="prettyprint source lang-javascript"><code>// Command function
function(argv, context) {
console.log(argv.flags.limit); // 10, because it's the default value.
}</code></pre><h2>Returning data</h2><p>Generally, you want to return a message to the user with the feedback about the operation they just did.</p>
<h4>Returning a message</h4><p>In your command function, you can <code>return</code> a <code>string</code> that will be redirected to your <code>onReply</code> function (in the <code>msg</code> parameter), using the same context that was passed into your command function. For instance:</p>
<pre class="prettyprint source lang-javascript"><code>// Command function
function(argv, context) {
if (argv.flags.limit < 50) {
doTheThing();
return 'Operation successful!';
} else {
return 'The limit can\'t be higher than 50, sorry!';
}
}</code></pre><h4>Modifying the context</h4><p>If you also need to pass your own data to your <code>onReply</code> function, you can modify the context, and <code>return</code> an <code>object</code> containing two properties: <code>message</code> and <code>context</code>. For instance:</p>
<pre class="prettyprint source lang-javascript"><code>// Command function
function(argv, context) {
if (argv.flags.limit < 50) {
doTheThing();
return {
message: 'Operation successful!',
context: {
operation_complete: true
}
};
} else {
return {
message: 'The limit can\'t be higher than 50, sorry!',
context: {
operation_complete: false
}
};
}
}</code></pre><p>You may omit the <code>message</code> param, though it is not recommended. If you do it, your <code>onReply</code>'s <code>msg</code> will be <code>undefined</code>, wich may cause unexpected behaviour. So you should probably prepare your function for that scenario.</p>
<p>To learn more about contexts, see <a href="tutorial-Working-with-contexts.html">Working with contexts</a>.</p>
<h4>Not doing anything</h4><p>If you don't want to send a message, just return something that is neither <code>string</code> nor <code>object</code> or don't return nothing at all.</p>
</article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Sun Oct 09 2016 16:33:01 GMT+0200 (Hora de verano romance) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html> | html |
Lewis Hamilton almost got himself in massive trouble for allegedly disobeying double-waved yellow flags at the end of FP3. Going into the 2021 Saudi Arabian Grand Prix, he was summoned by stewards for a brief hearing that lasted 15 minutes. However, the Briton faces no further action over the incident.
He also had an incident with Nikita Mazepin after the latter nearly ran into the back of the Mercedes car as Hamilton failed to move out of his way.
No penalty will be welcomed by the team as the British driver currently trails Max Verstappen by eight points as we go into the penultimate Grand Prix.
The FIA rules and regulations state that drivers are required to reduce their speed significantly and are not allowed to overtake under double-waved yellow flags.
The yellow lights, which denote the yellow flags, apparently flashed by accident, without any incident having occurred. An official statement by the FIA said:
"The Race Director reported to the Stewards that the double yellow flag warning on the FIA Marshalling System was activated at Light Panel Number 6 accidentally, for less than one second"
At the Qatar Grand Prix earlier this year, Max Verstappen was found guilty of disobeying double-waved yellow flags at the end of the qualifying session. He was subsequently awarded a five-place grid penalty for his actions. Lewis Hamilton and Mercedes seemed to have dodged this bullet going into the qualifying session.
The stewards also made an official statement regarding Lewis Hamilton's alleged impediment to Nikita Mazepin, who was on a hot lap when the Briton failed to move out of his way. Hamilton received a reprimand and Mercedes have a €25000 fine for the Mazepin incident. This will be his second reprimand of the season.
Lewis Hamilton seems to be the fastest Mercedes on track, outperforming teammate Valtteri Bottas in all practice sessions. The 36-year-old driver beat rival Max Verstappen at the end of FP1 and FP2, while managing to come in P2 behind Verstappen during the final practice session. It must be noted that the Briton was on the hard tire compound, while the Dutchman was on the soft tire compound.
Catch the action live as Lewis Hamilton looks to clinch his record-breaking eighth world title.
| english |
Apple Fitness Plus has received a major update, with new playlist-focused workouts from big name artists, plus a fresh batch of celebrity-led Time to Walk stories.
There's no shortage of on-demand workout services available now, but Apple has always been able to set itself apart thanks to its existing deals with record labels for iTunes. Rival service Peloton found itself in serious trouble with music publishers last year for its unlicensed use of tunes (a matter that was settled out of court), and Les Mills works around the problem by combining licensed music with covers and original tracks to cut costs.
Apple, on the other hand, simply needs to renegotiate its existing deals with the labels to cover Fitness Plus, giving it some of the best workout soundtracks around.
Its latest update adds a new Artist Spotlight Series, with workouts featuring whole playlists by individual artists. The first batch includes sessions soundtracked by Lady Gaga, Alicia Keys, Keith Urban, and Jennifer Lopez.
If none of those take your fancy, we expect many more artists and genres will be added to the mix over the coming months.
Time to Walk, which launched earlier this year, is an app that encourages you to make time for a stroll, while listening to personal stories from celebrities. The idea is to give you a walking companion, so you can get out of the house and stretch your legs without feeling lonely. It's available as an Apple Watch app to Fitness Plus subscribers.
Apple has now launched its second series of Time to Walk stories, with tales from boxer and Olympic gold medalist Anthony Joshua; model Naomi Campbell; actress, singer, songwriter and producer Cynthia Erivo; winner of the first ever women's Olympic marathon Joan Benoit Samuelson; comedian and writer Stephen Fry; and many more.
You can download these new stories to your Apple Watch through the Fitness app on your iPhone, and listen with Bluetooth headphones as you stroll.
Get the hottest deals available in your inbox plus news, reviews, opinion, analysis, deals and more from the TechRadar team.
Cat is the editor of TechRadar's sister site Advnture. She’s a UK Athletics qualified run leader, and in her spare time enjoys nothing more than lacing up her shoes and hitting the roads and trails (the muddier, the better)
| english |
<gh_stars>1-10
{
"id": 8798,
"source": "clarke",
"verse_id": 18733,
"verse_count": 1,
"reference": "54:9",
"title": "",
"html": " <p> <em>For this is as the waters of Noah unto me \"The same will I do now, as in the days of Noah\"\u2014 <\/em> <span class=\"greek-hebrew\">,\u05db\u05d9\u05de\u05d9 <\/span> <span class=\"translit\">, kimey<\/span>, in one word, in a MS., and some editions; and so the Syriac, Chaldee, Vulgate, Symmachus, Theodotion, Abarbanel, Sal. ben Melec, and Kimchi acknowledge that their copies vary in this place. <\/p>\n\n <p>It is certain that these two words <span class=\"greek-hebrew\">,\u05de\u05d9 \u05db\u05d9 <\/span> <span class=\"translit\">, ki mey<\/span>, were written formerly as one. Taken as two <span class=\"greek-hebrew\">,\u05de\u05d9 \u05db\u05d9 <\/span> <span class=\"translit\">, ki mey<\/span>, they signify for as the waters\u2014when as one, <span class=\"greek-hebrew\">,\u05db\u05d9\u05de\u05d9 <\/span> <span class=\"translit\">, kimey<\/span>, they signify as the days. This latter reading is found in about four of Kennicott's and De Rossi's MSS. In one of my own it appears to have been intended as one word: but he who added the points, which are by a much later hand than the MS. itself, has pointed the letters so as to make the two words which are commonly found in the text. For the waters, Symmachus, Theodotion, the Syriac, Vulgate, and Arabic have days. The former seems to make the best sense; and the ancient Versions, except the Septuagint, support it. <\/p>",
"audit": null
} | json |
import { ChargingStationModels, EvModels } from './ev-popup.typings';
export const availableChargingStationModels: ChargingStationModels = {
'Charging Station 3kW': {
max_charging_power_kW: 3,
charging_efficiency: 95
},
'Charging Station 22kW': {
max_charging_power_kW: 22,
charging_efficiency: 95
}
};
export const availableEvModels: EvModels = {
'Volskwagen e-Up': {
battery_capacity_kWh: 18.7,
consumption_in_kW_pro_100_km: 16.8
},
'<NAME>': {
battery_capacity_kWh: 44.1,
consumption_in_kW_pro_100_km: 15.8
}
};
| typescript |
package com.example.niklaus.networkrequest;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Niklaus on 2017/8/4.
*/
public class DTO {
/**
* id : 20790
* type :
* type_id :
* title : 大家都在买「第80期」
* pic : http://bt.img.17gwx.com/topic/2/7/cFFZbVE/800x440?v=2
* is_recommend : true
* is_show_like : true
* islike : false
* ispraise : false
* views : 16114
* praises : 2222
* likes : 2172
* comments : 2
* items : 7
* update_time : 1501243200
* dateline : 1501243200
* create_time_str : 07月28日
* datestr : 07月28日
* pics : []
* user : {"user_id":"1","nickname":"小糖君","avatar":"http://7te7t9.com2.z0.glb.qiniucdn.com/000/00/00/01.jpg?v=4","is_official":1,"article_topic_count":"","post_count":""}
* video : {}
* channel : {}
*/
public DataBean data;
public static class DataBean implements Transform<List<VO>> {
public List<TopicList> topic;
@Override
public List<VO> trasform() {
List<VO> datas = new ArrayList<>();
for (int i = 0; i < topic.size(); i++) {
datas.add(topic.get(i).trasform());
}
return datas;
}
public static class TopicList implements Transform<VO> {
public String id;
public String type;
public String type_id;
public String title;
public String pic;
public boolean is_recommend;
public boolean is_show_like;
public boolean islike;
public boolean ispraise;
public String views;
public String praises;
public String likes;
public String comments;
public String items;
public String update_time;
public String dateline;
public String create_time_str;
public String datestr;
public UserBean user;
@Override
public VO trasform() {
VO vo = new VO();
vo.id = id;
vo.type = type;
vo.type_id = type_id;
vo.title = title;
vo.pic = pic;
vo.is_recommend = is_recommend;
vo.is_show_like = is_show_like;
vo.islike = islike;
vo.ispraise = ispraise;
vo.views = views;
vo.praises = praises;
vo.likes = likes;
vo.comments = comments;
vo.items = items;
vo.update_time = update_time;
vo.dateline = dateline;
vo.create_time_str = create_time_str;
vo.datestr = datestr;
vo.user = user.trasform();
return vo;
}
public static class UserBean implements Transform<VO.UserBean> {
/**
* user_id : 1
* nickname : 小糖君
* avatar : http://7te7t9.com2.z0.glb.qiniucdn.com/000/00/00/01.jpg?v=4
* is_official : 1
* article_topic_count :
* post_count :
*/
public String user_id;
public String nickname;
public String avatar;
public int is_official;
public String article_topic_count;
public String post_count;
@Override
public VO.UserBean trasform() {
VO.UserBean userBean = new VO.UserBean();
userBean.user_id = user_id;
userBean.nickname = nickname;
userBean.is_official = is_official;
userBean.avatar = avatar;
userBean.article_topic_count = article_topic_count;
userBean.post_count = post_count;
return userBean;
}
}
}
}
}
| java |
package ch.droduit.bookstore.web;
import ch.droduit.bookstore.domain.Book;
import ch.droduit.bookstore.domain.BookRepository;
import ch.droduit.bookstore.domain.CategoryRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
@Controller
public class BookController {
@Autowired
private BookRepository bookRepository;
@Autowired
private CategoryRepository categoryRepository;
@RequestMapping("login")
public String login() {
return "login";
}
@PostMapping("logout")
public String postLogout() {
return "login";
}
@GetMapping("index")
public String index() {
return "index";
}
@GetMapping("bookList")
public String bookList(Model model) {
model.addAttribute("books", bookRepository.findAll());
return "bookList";
}
@GetMapping("add")
public String addBook(Model model) {
model.addAttribute("book", new Book());
model.addAttribute("categories", categoryRepository.findAll());
return "addBook";
}
@PostMapping("save")
public String saveBook(@ModelAttribute Book book) {
System.out.println(book);
bookRepository.save(book);
return "redirect:bookList";
}
@GetMapping("edit/{id}")
public String editBook(@PathVariable("id") long bookId, Model model) {
Optional<Book> book = bookRepository.findById(bookId);
if (book.isPresent()) {
model.addAttribute("book", book.get());
model.addAttribute("categories", categoryRepository.findAll());
return "editBook";
}
return "redirect:../bookList";
}
@GetMapping("delete/{id}")
@PreAuthorize("hasAuthority('ADMIN')")
public String deleteBook(@PathVariable("id") long bookId) {
bookRepository.deleteById(bookId);
return "redirect:../bookList";
}
@GetMapping("api/books")
@ResponseBody
public List<Book> getBooks() {
Iterable<Book> booksIterable = bookRepository.findAll();
List<Book> bookList = new ArrayList<>();
booksIterable.forEach(bookList::add);
return bookList;
}
@GetMapping("api/books/{id}")
@ResponseBody
public ResponseEntity<Book> getBookById(@PathVariable("id") long bookId) {
Optional<Book> book = bookRepository.findById(bookId);
if (book.isEmpty()) {
return new ResponseEntity<>(null, HttpStatus.NO_CONTENT);
}
return new ResponseEntity<>(book.get(), HttpStatus.OK);
}
}
| java |
Los Angeles: 'A Separation' won the Oscar for best foreign language film on Sunday, becoming the first Iranian movie to clinch the honor.
Directed by Asghar Farhadi, the film focuses on a couple going through a divorce and touches on traditions, justice and male-female relationships in modern Iran.
'A Separation' was regarded as the front-runner for the foreign language Oscar after sweeping the awards circuit in Europe and the United States.
It was the second Iranian film to be nominated for an Oscar and the first to win.
####(This story has not been edited by News18 staff and is published from a syndicated news agency feed - Reuters) | english |
<reponame>Movilizer/movilizer-external-events-android<filename>app/src/main/java/com/movilizer/eedemo/MainActivity.java
package com.movilizer.eedemo;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.text.InputType;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.TextView;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
public class MainActivity extends ActionBarActivity implements View.OnClickListener {
public final static String EVT_SOURCE_ID_KEY = "evtSrcId";
public static final String JSON_PLACEHOLDER_KEY = "JSON";
private static int EVT_SOURCE_ID = 123;
private EditText _sendMessage;
private Spinner _spinnerEventType;
private Spinner _appIdSpinner;
private ArrayList<String> _appIdList;
private TextView _lastSentEvent;
private Button _sendButton;
private EditText _eventSourceId;
private ArrayList<String> _eventTypeList;
private Messenger messenger = null; //used to make an RPC invocation
private Messenger replyTo = null; //invocation replies are processed by this Messenger
private boolean isBound = false;
private ServiceConnection connection; //receives callbacks from bind and unbind invocations
private Message message;
private int counter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
_sendMessage = (EditText) findViewById(R.id.sendMessage);
_eventSourceId = (EditText) findViewById(R.id.eventSourceId);
_eventSourceId.setInputType(InputType.TYPE_CLASS_NUMBER);
_eventSourceId.setSelectAllOnFocus(true);
_eventSourceId.clearFocus();
_lastSentEvent = (TextView) findViewById(R.id.lastEventInfo);
_sendButton = (Button) findViewById(R.id.sendButton);
_sendButton.setOnClickListener(this);
_appIdSpinner = (Spinner) findViewById(R.id.appIdSpinner);
_appIdList = new ArrayList<String>();
// Add two app Ids - Pro and Demo apps
_appIdList.add("com.movilizer.client.android.app");
_appIdList.add("com.movilizer.client.android.app.demo");
_appIdList.add("com.movilizer.client.android.app.d");
final ArrayAdapter<String> appIdDataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, this._appIdList);
appIdDataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
_appIdSpinner.setAdapter(appIdDataAdapter);
_appIdSpinner.setSelection(1);
_spinnerEventType = (Spinner) findViewById(R.id.eventTypeSpinner);
_eventTypeList = new ArrayList<String>();
// 3 different types of events
_eventTypeList.add("0 - Synchronous");
_eventTypeList.add("1 - Asynchronous Guaranteed");
_eventTypeList.add("2 - Asynchronous");
final ArrayAdapter<String> eventTypeDataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, this._eventTypeList);
eventTypeDataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
_spinnerEventType.setAdapter(eventTypeDataAdapter);
counter = 0;
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.sendButton:
doSendMessage();
break;
default:
break;
}
}
/**
* Method to fetch the UI data and send the message to Movilizer
* using Intent
*/
private void doSendMessage() {
this.connection = new RemoteServiceConnection();
this.replyTo = new Messenger(new IncomingHandler());
message = Message.obtain();
Intent serviceIntent = new Intent("com.movilizer.client.android.EXT_EVENT");
serviceIntent.setPackage((String) this._appIdSpinner.getSelectedItem());
final String eventSourceIdString = this._eventSourceId.getText().toString();
int evntSrcId = EVT_SOURCE_ID;
if (!eventSourceIdString.isEmpty())
{
evntSrcId = Integer.valueOf(eventSourceIdString);
serviceIntent.putExtra(EVT_SOURCE_ID_KEY, Integer.valueOf(evntSrcId));
}
else
{
this._eventSourceId.setText(evntSrcId);
serviceIntent.putExtra(EVT_SOURCE_ID_KEY, evntSrcId);
}
final String val = (String) _spinnerEventType.getSelectedItem();
final byte evtType = Byte.parseByte(val.substring(0, 1));
//Set the ReplyTo Messenger for processing the invocation response
final Bundle data = new Bundle();
data.putString(JSON_PLACEHOLDER_KEY, _sendMessage.getText().toString());
message.what = evntSrcId;
message.arg1 = counter++;
message.arg2 = evtType;
message.replyTo = replyTo;
message.setData(data);
_lastSentEvent.setText("EventSourceID=" + message.what + " EventID=" + message.arg1 + " EventType=" + message.arg2 + " JSONString=" + _sendMessage.getText().toString());
this.bindService(serviceIntent, this.connection, Context.BIND_AUTO_CREATE);
}
private class RemoteServiceConnection implements ServiceConnection
{
@Override
public void onServiceConnected(ComponentName component, IBinder binder)
{
messenger = new Messenger(binder);
isBound = true;
//Make the invocation
try {
messenger.send(message);
} catch (RemoteException e) {
_lastSentEvent.setText("Exception occured:" + e.getMessage());
}
}
@Override
public void onServiceDisconnected(ComponentName component)
{
messenger = null;
isBound = false;
}
}
private class IncomingHandler extends Handler
{
@Override
public void handleMessage(Message msg)
{
int what = msg.what;
_lastSentEvent.setText("EventID=" + msg.arg1 + " StatusCode=" + msg.arg2);
}
}
}
| java |
package com.xyzc.gemini.controller;
import com.xyzc.gemini.login.service.LoginService;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Created by xyzc on 2016/9/27.
*/
@Controller
public class LoginController {
private static Logger logger = Logger.getLogger(LoginController.class);
@Resource
LoginService loginService;
@RequestMapping(value = "/addUser")
public String addUser(
@RequestParam(required = false) String userName,
@RequestParam(required = false) String password,
HttpServletRequest request, HttpServletResponse response) {
if (StringUtils.isEmpty(userName) || StringUtils.isEmpty(password)) {
return "regFail";
}
loginService.addUser(userName, password);
return "regSucc";
}
}
| java |
Nassau County Police Commissioner Patrick Ryder said on “Fox & Friends” on Tuesday that New York's newly enacted bail reform law makes it impossible for him and other members of law enforcement to do their job.
“Now we’re seeing the same thing, those we lock up, those that are going to jail are coming out the same day,” he said.
Under previous New York law, prosecutors would determine whether to make a bail recommendation or agree to have the defendant released on their own recognizance. The case judge would then make a determination. Defense attorneys would typically make arguments that bail would be inappropriate, or should be set at a low amount, which judges would take into consideration.
Under the new law, courts are now prohibited from setting any monetary bail or keeping defendants in custody before trial in almost every type of misdemeanor case, and for a long list of felonies as well.
Ryder also brought up an example of what is happening in Nassau County because of the new law.
“We had two individuals that came in on a 90-day visa from Chile,” he said. “They committed havoc on the North Shore. They did about a dozen burglaries [amounting to] well over $1 million in assets.
Anchor Brian Kilmeade then listed some crimes that no longer require bail in New York, including criminally negligent homicide, second-degree manslaughter, third-degree assault, burglary and stalking.
“Bail reform, justice reform it's not a bad thing,” Ryder said. “You need to look at certain items.
“You can't have an 18-year-old kid sitting in jail for marijuana for a week because he couldn't come up with the $500 worth of bail, but we don't let the same person walk out that commits a burglary in Nassau County, steals over $1 million, puts fear into an entire community and walks out,” he continued.
Ryder also referenced the fact that the top Democrat in the State Assembly said on Thursday that he wants to let the reforms play out without changes. The state assembly speaker Carl Heastie urged people last week to have patience with the newly implemented bail law.
“We want safe communities, but it is important to have a criminal justice system that treats everybody fairly,” Heastie told reporters on Thursday.
Heastie’s colleague in the state Senate, Majority Leader Andrea Stewart-Cousins, said Democrats are watching to see if any “tweaks” are needed to the new bail reform law. But she maintained that Democrats don't want to criminalize poverty or continue with a broken system.
Fox News’ Ronn Blitzer and the Associated Press contributed to this report. | english |
South Indian star actor Vikram-starrer Cobra is finally hitting screens worldwide on August 31, 2022. Directed by Ajay Gnanamuthu, the action drama has Srinidhi Shetty as the female lead.
Cobra marks the actress’ debut in Kollywood. Today, she along with Vikram and others attended the press meet in Hyderabad. During the meet, she addressed the media in Telugu and continued her speech in the same language. Everyone was surprised by her fluency.
She said that after 3 years of hard work Cobra is finally coming to theaters on August 31 and requested everyone to watch the film in theaters only. Srinidhi also expressed her happiness about acting with Vikram in her first Tamil movie. She also thanked producer Lalith Kumar for giving her the chance to act in Cobra.
Mrinalini Ravi, Meenakshi, Irfan Pathan, Roshan Mathew, and others played key roles in this flick, produced by Silver Screen Studio. Popular tunesmith AR Rahman provided soundtracks for this movie.
Articles that might interest you:
| english |
package com.hyh.plg.core;
import android.app.Application;
import java.util.Map;
/**
* @author Administrator
* @description
* @data 2018/3/16
*/
public interface IBlock {
boolean prepare(Application application, ClassLoader hostClassLoader, Map<String, Object> params);
boolean attachBaseContext(boolean isIndependentProcess);
void onApplicationCreate();
void setInnerProtocolInterfaceMap(Map<String, String> interfaceMap);
Object command(String command, Map<String, Object> params, Object... masterClients);
Object getInnerBlockProxy(String proxyKey, Map<String, Object> params, Object... masterClients);
Object getBlockProxy(String proxyKey, Map<String, Object> params, Object... masterClients);
} | java |
In a bid to reduce the amount of spam that Gmail users receive, Google has announced a major crackdown on spammers. Beginning in February 2024, bulk email senders—those who send more than 5,000 messages to Gmail addresses a day—will be required to strongly authenticate their email addresses along with few more actions detailed by Google in its blog post.
“Gmail’s AI-powered defenses stop more than 99.9% of spam, phishing and malware from reaching inboxes and block nearly 15 billion unwanted emails every day. But now, nearly 20 years after Gmail launched, the threats we face are more complex and pressing than ever. So today, we’re introducing new requirements for bulk senders — those who send more than 5,000 messages to Gmail addresses in one day — to keep your inbox even safer and more spam-free,” Neil Kumaran, group product manager at Gmail Security & Trust wrote in the blog post.
Google, from next year, will require bulk email senders to strongly authenticate their email addresses using established best practices as it will help to prevent spammers from spoofing the email addresses of legitimate businesses and organisations.
To make unsubscription easier, email senders will have to provide Gmail recipients the ability to unsubscribe from commercial email in one click, and that they process unsubscription requests within two days. Also the sender have to process unsubscribe requests within two days. This will ensure that Gmail users are not bombarded with unwanted emails for long periods of time.
Google will also enforce a clear spam rate threshold that senders must stay under to ensure Gmail recipients aren’t bombarded with unwanted messages. The tech giant says that these new requirements will help to make Gmail a safer and more secure place for users to communicate online.
Follow FE Tech Bytes on Twitter, Instagram, LinkedIn, Facebook.
| english |
Pandemic. Heat Waves. Humidity. Health Threats. State of Emergency. Was there anything left to make it the most difficult Olympics ever? One might argue that there are issues and concerns at every Olympic game and the pandemic is the only extraordinary happening but when all the natural catastrophes combine to threaten the very happening of a quadrennial multi-national sports event, it becomes dangerous.
Another hurdle is hovering over the organizers of the Tokyo Olympics which is the possibility of a typhoon.
With a year of postponement, the Tokyo Olympics are going to be declared open tomorrow. The excitement and craze amongst the fans are halted by some grave news every day.
The typhoon mode is predicted because the western pacific has a hurricane season which refers to their tropical systems as typhoons. It is the most active basin for typhoons and is thought to hit Tokyo early next week.
The National Hurricane Centre of the western pacific, Joint Typhoon Warning Center, has monitored two active tropical systems but they are not heading towards Japan.
This comes as a sign of relief as typhoons are a constant happening in Tokyo and the chances during the Olympics is just 1% (1 in 100) as per a probability. But the problem comes because of the fact that the storm expected to disrupt the Tokyo Olympics hasn't even been created yet, making it difficult to track.
The possible hit days of the typhoon could be Sunday or Monday in the coming week. Though predicting the exact direction, intensity and impact have been far from possible due to the non-formation of the potential storm. There is even worse news circling the Games that due to these factors, the Summer Olympics could even get canceled.
The organization committee is taking all precautionary measures to avoid any disaster but it depends on these natural forces to predict the future of these games. Until then, we can only pray and hope that the ambitions of our players do not get destroyed and they get to compete at the event of their lives.
| english |
<gh_stars>1-10
{
"filename": "concurrency-control.md",
"__html": "<h1>并发控制</h1>\n<h2>配置样例</h2>\n<h3>样例 1</h3>\n<p>限制 <code>com.foo.BarService</code> 的每个方法,服务器端并发执行(或占用线程池线程数)不能超过 10 个:</p>\n<pre><code class=\"language-xml\"><span class=\"hljs-tag\"><<span class=\"hljs-name\">dubbo:service</span> <span class=\"hljs-attr\">interface</span>=<span class=\"hljs-string\">\"com.foo.BarService\"</span> <span class=\"hljs-attr\">executes</span>=<span class=\"hljs-string\">\"10\"</span> /></span>\n</code></pre>\n<h3>样例 2</h3>\n<p>限制 <code>com.foo.BarService</code> 的 <code>sayHello</code> 方法,服务器端并发执行(或占用线程池线程数)不能超过 10 个:</p>\n<pre><code class=\"language-xml\"><span class=\"hljs-tag\"><<span class=\"hljs-name\">dubbo:service</span> <span class=\"hljs-attr\">interface</span>=<span class=\"hljs-string\">\"com.foo.BarService\"</span>></span>\n <span class=\"hljs-tag\"><<span class=\"hljs-name\">dubbo:method</span> <span class=\"hljs-attr\">name</span>=<span class=\"hljs-string\">\"sayHello\"</span> <span class=\"hljs-attr\">executes</span>=<span class=\"hljs-string\">\"10\"</span> /></span>\n<span class=\"hljs-tag\"></<span class=\"hljs-name\">dubbo:service</span>></span>\n</code></pre>\n<h3>样例 3</h3>\n<p>限制 <code>com.foo.BarService</code> 的每个方法,每客户端并发执行(或占用连接的请求数)不能超过 10 个:</p>\n<pre><code class=\"language-xml\"><span class=\"hljs-tag\"><<span class=\"hljs-name\">dubbo:service</span> <span class=\"hljs-attr\">interface</span>=<span class=\"hljs-string\">\"com.foo.BarService\"</span> <span class=\"hljs-attr\">actives</span>=<span class=\"hljs-string\">\"10\"</span> /></span>\n</code></pre>\n<p>或</p>\n<pre><code class=\"language-xml\"><span class=\"hljs-tag\"><<span class=\"hljs-name\">dubbo:reference</span> <span class=\"hljs-attr\">interface</span>=<span class=\"hljs-string\">\"com.foo.BarService\"</span> <span class=\"hljs-attr\">actives</span>=<span class=\"hljs-string\">\"10\"</span> /></span>\n</code></pre>\n<h3>样例 4</h3>\n<p>限制 <code>com.foo.BarService</code> 的 <code>sayHello</code> 方法,每客户端并发执行(或占用连接的请求数)不能超过 10 个:</p>\n<pre><code class=\"language-xml\"><span class=\"hljs-tag\"><<span class=\"hljs-name\">dubbo:service</span> <span class=\"hljs-attr\">interface</span>=<span class=\"hljs-string\">\"com.foo.BarService\"</span>></span>\n <span class=\"hljs-tag\"><<span class=\"hljs-name\">dubbo:method</span> <span class=\"hljs-attr\">name</span>=<span class=\"hljs-string\">\"sayHello\"</span> <span class=\"hljs-attr\">actives</span>=<span class=\"hljs-string\">\"10\"</span> /></span>\n<span class=\"hljs-tag\"></<span class=\"hljs-name\">dubbo:service</span>></span>\n</code></pre>\n<p>或</p>\n<pre><code class=\"language-xml\"><span class=\"hljs-tag\"><<span class=\"hljs-name\">dubbo:reference</span> <span class=\"hljs-attr\">interface</span>=<span class=\"hljs-string\">\"com.foo.BarService\"</span>></span>\n <span class=\"hljs-tag\"><<span class=\"hljs-name\">dubbo:method</span> <span class=\"hljs-attr\">name</span>=<span class=\"hljs-string\">\"sayHello\"</span> <span class=\"hljs-attr\">actives</span>=<span class=\"hljs-string\">\"10\"</span> /></span>\n<span class=\"hljs-tag\"></<span class=\"hljs-name\">dubbo:service</span>></span>\n</code></pre>\n<p>如果 <code><dubbo:service></code> 和 <code><dubbo:reference></code> 都配了actives,<code><dubbo:reference></code> 优先,参见:<a href=\"../configuration/xml.md#%E9%85%8D%E7%BD%AE%E8%A6%86%E7%9B%96%E5%85%B3%E7%B3%BB\">配置的覆盖策略</a>。</p>\n<h2>Load Balance 均衡</h2>\n<p>配置服务的客户端的 <code>loadbalance</code> 属性为 <code>leastactive</code>,此 Loadbalance 会调用并发数最小的 Provider(Consumer端并发数)。</p>\n<pre><code class=\"language-xml\"><span class=\"hljs-tag\"><<span class=\"hljs-name\">dubbo:reference</span> <span class=\"hljs-attr\">interface</span>=<span class=\"hljs-string\">\"com.foo.BarService\"</span> <span class=\"hljs-attr\">loadbalance</span>=<span class=\"hljs-string\">\"leastactive\"</span> /></span>\n</code></pre>\n<p>或</p>\n<pre><code class=\"language-xml\"><span class=\"hljs-tag\"><<span class=\"hljs-name\">dubbo:service</span> <span class=\"hljs-attr\">interface</span>=<span class=\"hljs-string\">\"com.foo.BarService\"</span> <span class=\"hljs-attr\">loadbalance</span>=<span class=\"hljs-string\">\"leastactive\"</span> /></span>\n</code></pre>\n",
"link": "/zh-cn/docs/user/demos/concurrency-control.html",
"meta": {}
} | json |
Boris is the wise ol’ CEO of TNW who writes a weekly column on everything about being an entrepreneur in tech — from managing stress to embracing awkwardness. You can get his musings straight to your inbox by signing up for his newsletter!
Last week I wrote about how to “get to no.” Basically, how to find out if you’re wrong, who to ignore, and who to listen to. This week I’ll give you some tips on what to do once you come to terms with being wrong.
Steve Jobs was famous for being extraordinarily determined, but also being able to change his mind on the fly. Curiously enough, he would fight someone to prove point A, and not listen to any arguments for point B.
But the next day, he might come in and argue for point B as if he had come up with the idea. It drove people crazy and has often been explained as a case of extreme arrogance and idea-appropriation. And it probably was.
What I like though and find inspiring was his ability to just “switch.” He could take one position and almost seamlessly switch to another position, without a deflated ego, loss of enthusiasm, or a sense of shame that he was once wrong.
The overwhelming emotion I feel when I first find out I’m wrong (trust me, it happens often) is a feeling of shame and inadequacy. I wish I was smarter, knew more, and that I had come better prepared. But then I have to concede failure on my part, that I was on the wrong side of the argument.
All of that goes through my mind, in just a few milliseconds (sometimes hours).
This feeling of shame does fade away in the end though, and then it’s time for celebration. Fitness fans like to say that pain is just weakness leaving the body. Well, being wrong, and finding out what’s right is misinformation and ignorance leaving your body.
Is that a pleasant experience? Hell no. It hurts and can be humiliating, and I’d rather avoid it. But... like fitness, you do feel better after a while. Actually, you ARE better after a while. You’ve improved something about yourself. You’ve gained knowledge!
The trick now is to minimize the awkward transition period between being wrong, finding out you were wrong, and becoming right. The shorter, the better.
Ideally, in the middle of a discussion, you just blurt out, “Oh shit, I was wrong!” — and then celebrate immediately. Give people a hug, open the champagne, high five like a madman. Feel free to become ecstatic in the knowledge that the world is now a better place, and you’re a better person.
There’s no need to endlessly mull over the fact you were wrong, and in what way, and about how stupid that was.
You’re still free to analyze how you came to the wrong conclusion. That’s actually useful as it’ll help you recognize mistakes faster in the future.
But the main thing you can train yourself in is to wonder what else you’re wrong about and look forward to being proven wrong in more areas. Not to dread it.
Can’t get enough of Boris? Check out his older stories here, and sign up for TNW’s newsletters here.
Get the most important tech news in your inbox each week.
| english |
England are in a good position on Day 5 of the third Test match at Southampton. India were 112 for four at stumps on Day 4, and require the likes of Ajinkya Rahane, Rohit Sharma and MS Dhoni to bat for a long time in order to save the match.
England have performed exceptionally well in the match, with centuries by Gary Ballance and Ian Bell in the first innings. James Anderson impressed too, and took a five-wicket haul to restrict the Indians to just 330. Alastair Cook, who was having a woeful run of form prior to this match, scored 95 in the first innings and 70 in the second innings.
With the advent of the digital age, one can watch a cricket match live from literally any corner of the planet with at least some network coverage. Gone are the days when one would be entirely dependent on the television or radio coverage, with several websites streaming the matches at the time of occurrence for no fee whatsoever.
Catch Live Streaming of Day 4 of 3rd Test at starsports. com and live telecast of the match on Star Sports. | english |
use finchers::endpoint::syntax;
use finchers::prelude::*;
use finchers::test;
use matches::assert_matches;
#[test]
fn test_or_1() {
let mut runner = test::runner({
let e1 = syntax::segment("foo").and(endpoint::value("foo"));
let e2 = syntax::segment("bar").and(endpoint::value("bar"));
e1.or(e2)
});
assert_matches!(runner.apply("/foo"), Ok(..));
assert_matches!(runner.apply("/bar"), Ok(..));
}
#[test]
fn test_or_choose_longer_segments() {
let mut runner = test::runner({
let e1 = syntax::segment("foo") //
.and(endpoint::value("foo"));
let e2 = syntax::segment("foo")
.and(syntax::segment("bar"))
.and(endpoint::value("foobar"));
e1.or(e2)
});
assert_matches!(runner.apply("/foo"), Ok(..));
assert_matches!(runner.apply("/foo/bar"), Ok(..));
}
| rust |
{
"predicate_mlp_size": 256,
"role_mlp_size": 256,
"predicate_pred_mlp_size": 256,
"linear_aggregation_scorer_mlp_size": 50,
"class_mlp_size": 100,
"attn_mlp_size": 500,
"hparams": {
"label_smoothing": 0.1,
"input_dropout": 0.8,
"mlp_dropout": 0.9,
"bilinear_dropout": 0.9,
"attn_dropout": 0.9,
"ff_dropout": 0.9,
"prepost_dropout": 0.8,
"moving_average_decay": 0.0,
"gradient_clip_norm": 1.0,
"learning_rate": 0.04,
"decay_rate": 1.5,
"warmup_steps": 8000,
"beta1": 0.9,
"beta2": 0.98,
"epsilon": 1e-12,
"use_nesterov": true,
"batch_size": 5000,
"is_token_based_batching": true,
"special_attention_mode": "my_discounting"
},
"layers": {
"type": "transformer",
"num_heads": 8,
"head_dim": 64,
"ff_hidden_size": 1024
},
"embeddings": {
"word_type": {
"embedding_dim": 200,
"pretrained_embeddings": "embeddings/glove.6B.200d.txt"
}
},
"inputs": {
"word_type": "embeddings"
}
} | json |
#include "SpringCamera.h"
#include <engine/ecs/EntityManager.h>
#include <engine/geometry/Transform.h>
#include <engine/util/Timer.h>
void SpringCameraSystem::update(EntityManager& entityManager)
{
for (Entity entity : entityManager.getEntitiesWithComponents<Transform, SpringFreeLookCamera>())
{
auto transform = entity.getComponent<Transform>();
auto camera = entity.getComponent<SpringFreeLookCamera>();
float x = camera->horizontal;
float y = camera->vertical;
camera->m_elevation = glm::clamp(camera->m_elevation + y * camera->m_rotationSpeed,
-math::TO_RAD * camera->m_minElevation, math::TO_RAD * camera->m_maxElevation);
camera->m_azimuth += x * camera->m_rotationSpeed;
glm::vec3 polar = math::polarToVector(camera->m_actualDistance, camera->m_elevation, camera->m_azimuth);
camera->m_targetPos = camera->target->getPosition() + camera->m_targetOffset;
camera->m_cameraDestination = camera->target->getPosition() + polar + camera->m_targetOffset;
updatePosition(camera, transform);
updateLookAt(camera, transform);
}
}
void SpringCameraSystem::updateLookAt(ComponentPtr<SpringFreeLookCamera> camera, ComponentPtr<Transform> transform)
{
glm::vec3 lookAccel = computeSpringAccel(camera, camera->m_curLookAtPos, camera->m_targetPos, camera->m_lookVelocity);
camera->m_lookVelocity += lookAccel * Time::deltaTime();
camera->m_curLookAtPos += camera->m_lookVelocity * Time::deltaTime();
transform->lookAt(camera->m_curLookAtPos);
}
void SpringCameraSystem::updatePosition(ComponentPtr<SpringFreeLookCamera> camera, ComponentPtr<Transform> transform)
{
glm::vec3 accel = computeSpringAccel(camera, transform->getPosition(), camera->m_cameraDestination, camera->m_curVelocity);
camera->m_curVelocity += accel * Time::deltaTime();
transform->setPosition(transform->getPosition() + camera->m_curVelocity * Time::deltaTime());
}
// Computes the acceleration using a critical damping spring model
glm::vec3 SpringCameraSystem::computeSpringAccel(ComponentPtr<SpringFreeLookCamera> camera,
const glm::vec3& pos, const glm::vec3& target, const glm::vec3& velocity)
{
float dampingCoefficient = 2.0f * sqrtf(camera->m_distSpringConstant);
glm::vec3 deltaAccel = (target - pos) * camera->m_distSpringConstant;
glm::vec3 dampingAccel = -velocity * dampingCoefficient;
return deltaAccel + dampingAccel;
}
| cpp |
<gh_stars>100-1000
{"nom":"Florimont","dpt":"Territoire de Belfort","inscrits":322,"abs":68,"votants":254,"blancs":28,"nuls":8,"exp":218,"res":[{"panneau":"2","voix":122},{"panneau":"1","voix":96}]} | json |
<reponame>racarvalho1987/goss<filename>system/group.go
package system
import (
"github.com/aelsabbahy/goss/util"
"github.com/opencontainers/runc/libcontainer/user"
)
type Group interface {
Groupname() string
Exists() (bool, error)
GID() (int, error)
}
type DefGroup struct {
groupname string
}
func NewDefGroup(groupname string, system *System, config util.Config) Group {
return &DefGroup{groupname: groupname}
}
func (u *DefGroup) Groupname() string {
return u.groupname
}
func (u *DefGroup) Exists() (bool, error) {
_, err := user.LookupGroup(u.groupname)
if err != nil {
return false, nil
}
return true, nil
}
func (u *DefGroup) GID() (int, error) {
group, err := user.LookupGroup(u.groupname)
if err != nil {
return 0, err
}
return group.Gid, nil
}
| go |
{"all_contexts":[
{"num_warnings": 1,
"context":[{"lineno": -1, "instr": " %5 = alloca i8*, align 8"}],
"warnings":[{"warn_data": {"at_line": 1870, "warn_str": "Non-constant size used in copy_to(or from)_user function.", "at": "MVM_DEBUGFS_READ_WRITE_FILE_OPS(prph_reg, 64);", "inst_trace": [], "at_file": "drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c", "by": "TaintedSizeDetector says:", "at_func": "_iwl_dbgfs_prph_reg_write"}, "warn_no": 1}]},
{"num_warnings": 1,
"context":[{"lineno": -1, "instr": " %5 = alloca i8*, align 8"}, {"lineno": 1870, "file": "drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c", "instr": "MVM_DEBUGFS_READ_WRITE_FILE_OPS(prph_reg, 64);"}, {"lineno": 1730, "file": "drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c", "instr": "ret = iwl_mvm_ref_sync(mvm, IWL_MVM_REF_PRPH_WRITE);"}, {"lineno": 288, "file": "drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c", "instr": "iwl_mvm_ref(mvm, ref_type);"}, {"lineno": 221, "file": "drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c", "instr": "IWL_DEBUG_RPM(mvm, \"Take mvm reference - type %d\\n\", ref_type);"}, {"lineno": 127, "file": "drivers/net/wireless/intel/iwlwifi/iwl-debug.c", "instr": "trace_iwlwifi_dbg(level, in_interrupt(), function, &vaf);"}],
"warnings":[{"warn_data": {"at_line": 56, "warn_str": "Trying to use a global variable without locking.", "at": " %262 = load i8, i8* @trace_iwlwifi_dbg.__warned, align 1, !dbg !508450", "inst_trace": [{"instr_func": "_iwl_dbgfs_prph_reg_write", "instr_loc": -1, "instr": " %5 = alloca i8*, align 8"}, {"instr_func": "_iwl_dbgfs_prph_reg_write", "instr_loc": 1870, "instr_file": "drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c", "instr": "MVM_DEBUGFS_READ_WRITE_FILE_OPS(prph_reg, 64);"}, {"instr_func": "iwl_dbgfs_prph_reg_write", "instr_loc": 1730, "instr_file": "drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c", "instr": "ret = iwl_mvm_ref_sync(mvm, IWL_MVM_REF_PRPH_WRITE);"}, {"instr_func": "iwl_mvm_ref_sync", "instr_loc": 288, "instr_file": "drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c", "instr": "iwl_mvm_ref(mvm, ref_type);"}, {"instr_func": "iwl_mvm_ref", "instr_loc": 221, "instr_file": "drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c", "instr": "IWL_DEBUG_RPM(mvm, \"Take mvm reference - type %d\\n\", ref_type);"}, {"instr_func": "__iwl_dbg", "instr_loc": 127, "instr_file": "drivers/net/wireless/intel/iwlwifi/iwl-debug.c", "instr": "trace_iwlwifi_dbg(level, in_interrupt(), function, &vaf);"}], "at_file": "drivers/net/wireless/intel/iwlwifi/iwl-devtrace-msg.h", "by": "GlobalVariableRaceDetector says:", "at_func": "trace_iwlwifi_dbg"}, "warn_no": 1}]}]} | json |
Ric Flair believes Vince McMahon might be reduced to tears when he inducts The Undertaker into the WWE Hall of Fame.
McMahon recently revealed that he will induct the WWE icon into the elite group of legends in Dallas, Texas on Friday, April 1. The WWE Chairman has only previously inducted three people into the Hall of Fame: James Dudley (1994), Steve Austin (2009), and Donald Trump (2013).
Flair, a two-time Hall of Famer, spoke on his Wooooo Nation Uncensored podcast about the possibility of McMahon getting emotional during his speech:
WWE has confirmed that Queen Sharmell and Vader will also be among the Class of 2022 Hall of Fame inductees.
Steve Austin is widely regarded as one of the greatest superstars in WWE history. His rivalry with Vince McMahon is also considered to be among the best wrestling storylines of all time.
Given their success in WWE, Ric Flair is not surprised that McMahon decided to induct Austin and The Undertaker himself:
The Undertaker retired from in-ring competition in 2020 after 30 years in WWE and 34 years in the wrestling business. His final match came at WrestleMania 36 when he defeated AJ Styles in a cinematic Boneyard match.
Please credit Wooooo Nation Uncensored and give a H/T to Sportskeeda Wrestling for the transcription if you use quotes from this article.
| english |
#include <iostream>
#include <vector>
#include <map>
using namespace std;
int firstMissingPositive(vector<int>& nums) {
// num, idx?, shown
//map<int, pair<int, bool>> table;
map<int, int> table;
for (int i = 0; i < nums.size(); ++i) {
if (nums[i] > 0) {
//table[i] = nums[i];
table[nums[i]]++;
}
}
int res = 1;
while (true) {
if (table[res] == 0) return res;
res++;
}
return res;
}
int main(void)
{
vector<int> input{ 1,2,0 };
cout << firstMissingPositive(input) << endl;
return 0;
} | cpp |
/**
* Welcome to Pebble.js!
*
* This is where you write your app.
*/
var UI = require('ui');
var Vector2 = require('vector2');
var ajax = require('ajax');
var Vibe = require('ui/vibe');
var timeline = require('timeline');
var destinations = [
{
title: "<NAME>",
latitude: 52.376862,
longitude: 4.922077
},
{
title: "Amsterdam RAI",
latitude: 52.3441698,
longitude: 4.889183
}
];
var menu = new UI.Menu({
sections: [{
items: destinations
}]
});
menu.on('select', function(e) {
Vibe.vibrate('short');
console.log("Vibrate short");
var item = destinations[e.itemIndex];
console.log("To: " + item.title + ", Lat: " + item.latitude + ", Long: " + item.longitude);
var card = new UI.Card({
/*
titleColor: 'white',
subtitleColor: 'white',
bodyColor: 'white',
backgroundColor: 'blue'
*/
});
card.title(item.title);
ajax({ url: 'http://link0.net/uber/?start=' + '' + '&stop=' + item.latitude + ',' + item.longitude, type: 'json' },
function(data) {
console.log('Received data.');
card.subtitle(data[0].low + '-' + data[0].high + ' ' + data[0].currency_code);
card.body("\nOrder?");
card.show();
card.on('click', 'select', function(e) {
console.log("Order call received");
foo = new UI.Card();
foo.title("Ordering...");
foo.show();
console.log("foo showed");
ajax({
url: 'http://link0.net/uber/req.php?',
type: 'json'
}, function(requestData) {
var eta = requestData.eta * 60;
function translateEta(eta) {
var minutes;
var seconds;
if(eta > 60) {
seconds = eta % 60;
minutes = (eta - seconds) / 60;
} else {
minutes = 0;
seconds = eta;
}
return "ETA: " + minutes + ":" + seconds;
}
requestCompleted = new UI.Card();
requestCompleted.title(data[0].service);
requestCompleted.subtitle(translateEta(eta));
requestCompleted.body(requestData.vehicle.make + ' ' + requestData.vehicle.model + "\n" + requestData.vehicle.license_plate);
requestCompleted.show();
/*setTimeout(function() {
console.log(eta);
requestCompleted.subtitle(translateEta(eta));
requestCompleted.show();
eta--;
}, 1000);*/
});
});
}, // End of success callback
function(error) {
console.log('Error receiving uber data.');
main.body("Could not download posts.\n\nShake to try refreshing again.");
} // End of error callback
);
});
menu.show();
/*main.on('click', 'up', function(e) {
var menu = new UI.Menu({
sections: [{
items: [{
title: 'Pebble.js',
icon: 'images/menu_icon.png',
subtitle: 'Can do Menus'
}, {
title: 'Second Item',
subtitle: 'Subtitle Text'
}]
}]
});
menu.on('select', function(e) {
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex);
console.log('The item is titled "' + e.item.title + '"');
});
menu.show();
});*/
/*
main.on('click', 'select', function(e) {
var wind = new UI.Window({
fullscreen: true,
});
var textfield = new UI.Text({
position: new Vector2(0, 65),
size: new Vector2(144, 30),
font: 'gothic-24-bold',
text: 'Text Anywhere!',
textAlign: 'center'
});
wind.add(textfield);
wind.show();
});
main.on('click', 'down', function(e) {
var card = new UI.Card();
card.title('A Card');
card.subtitle('Is a Window');
card.body('The simplest window type in Pebble.js.');
card.show();
});
*/
| javascript |
CHANGELOG
=========
0.7.3 <small>(2016-04-26)</small>
------------------------------
* Add a new option for customizing the color palette used in the theme.
* Internal: Make the whole configuration in one file.
------------------------------
0.7.2 <small>(2016-03-20)</small>
------------------------------
* Add more colors to Agit
* Add a theme for Lightline
* Internal: Some code cleaning
------------------------------
0.7.1 <small>(2016-03-06)</small>
------------------------------
* Add custom colors for the plugin signjk-motion
* Internal: Minor refactoring
* Rename jade to pug
* Add airline_error colors to airline themes
------------------------------
0.7.0 <small>(2016-02-05)</small>
------------------------------
* Add possibility to enable/disable custom colors for plugins
* Add custom colors for the plugin Unite
------------------------------
0.6.4 <small>(2016-01-24)</small>
------------------------------
* Add more diff colors
* Set better colors to quickfix & location list windows
------------------------------
0.6.3 <small>(2016-01-13)</small>
------------------------------
* A better diff colors
* Add custom colors for the plugin agit
* Internal: Add links for used plugins
------------------------------
0.6.2 <small>(2016-01-11)</small>
------------------------------
* Fix name of airline theme.
------------------------------
0.6.1 <small>(2016-01-09)</small>
------------------------------
* Update airline themes:
- Add warningmsg colors
- Fix insert_paste cterm colors
* Add new screens to the README
------------------------------
0.6.0 <small>(2016-01-08)</small>
------------------------------
* Add a global variable `g:yowish` for user configuration
* Add a new airline theme called *yowishU*
* Small refactoring and code cleaning
------------------------------
v0.5.5 <small>(2015-11-21)</small>
------------------------------
* Add jade support
------------------------------
v0.5.4 <small>(2015-10-17)</small>
------------------------------
* Add colors to ColorColumn group
------------------------------
v0.5.3 <small>(2015-10-16)</small>
------------------------------
* Better javascript support
* Better ruby support
* Update screens
------------------------------
v0.5.1 <small>(2015-10-05)</small>
------------------------------
* More refactoring
* Some changes in vimHelp colors
------------------------------
v0.5 <small>(2015-10-04)</small>
------------------------------
* Modify airline theme in NORMAL mode
* Remove autoloaded files (colors & hi fun)
* Refactoring
* More screens in the README
* Add a CHANGELOG
------------------------------
| markdown |
Former champions India and West Indies arrived in Kolkata this morning amid tight security ahead of their World T20 warm-up fixture on March 10.
The Darren Sammy-led West Indies team, which was camping in UAE, was the first to check in early this morning followed by Mahendra Singh Dhoni’s triumphant group that flew in from Dhaka hours after clinching the Asia Cup title, its sixth in the continental tournament.
West Indies all-rounder Dwayne Bravo did not accompany his team to the hotel as he boarded a New Delhi flight moments after landing here. “He has some personal commitments in New Delhi, he will return in time,” the team’s local manager said. It was a rest day for both the teams.
World No.1 India, champion of inaugural edition in 2007, will take on the 2012 winner in a warm-up match at Eden Gardens on March 10.
India will then travel to Mumbai where it faces South Africa in a second warm-up game on March 12 before launching its campaign against New Zealand in Nagpur on March 15.
The West Indies will camp in Kolkata and face Australia in its second warm-up on March 13.
The Pakistan team, which is scheduled to arrive on March 9, will also camp here and play two warm-ups — against Bengal (March 12) and defending champions Sri Lanka (March 14).
Besides the four warm-up matches, the Eden will host four games in the main fixtures including the marquee men and women finals on April 3.
| english |
<gh_stars>1-10
{
"publisher_name": "Revue Sante Mentale au Quebec",
"journals": 1,
"scihub": 957,
"crossref_open_access": 0,
"crossref_active": 1561,
"crossref": 1561,
"coverage": 0.61306855,
"publisher_slug": "revue-sante-mentale-au-quebec",
"access_logs": {
"downloads": 0.0,
"visitors": 0.0,
"countries": 0.0,
"days": 0.0,
"months": 0.0,
"n_articles_requested": 0,
"n_articles": 105
}
} | json |
import sys
sys.path.insert(0, '.')
import os
import argparse
import torch
import torch.nn as nn
from PIL import Image
import numpy as np
import cv2
import time
import lib.transform_cv2 as T
from lib.models import model_factory
from configs import cfg_factory
from lib.cityscapes_labels import trainId2color
torch.set_grad_enabled(False)
np.random.seed(123)
# args
parse = argparse.ArgumentParser()
parse.add_argument('--cfg-file', dest='cfg_file', type=str, default='bisenetv2', help="specify the name without suffix of config file",)
parse.add_argument('--weight-path', type=str, default='./res/model_final.pth',)
parse.add_argument('--img-path', dest='img_path', type=str, default='./example.png',)
parse.add_argument('--save-path', dest='save_path', type=str, default='./res.jpg',)
args = parse.parse_args()
cfg = cfg_factory[args.cfg_file]
if os.path.exists(args.save_path):
os.path.makedirs(args.save_path)
palette = np.random.randint(0, 256, (256, 3), dtype=np.uint8)
# define model
net = model_factory[cfg.model_type](19)
net.load_state_dict(torch.load(args.weight_path, map_location='cpu'))
net.eval()
net.cuda()
# prepare data
to_tensor = T.ToTensor(
mean=(0.3257, 0.3690, 0.3223), # city, rgb
std=(0.2112, 0.2148, 0.2115),
)
# im = cv2.imread(args.img_path)[:, :, ::-1]
im = cv2.imread(args.img_path)
im = cv2.resize(im, (1024,512))[:, :, ::-1]
# im = cv2.resize(im, (1024,1024))[:, :, ::-1]
#im = cv2.resize(im, (1920,1024))[:, :, ::-1]
im = to_tensor(dict(im=im, lb=None))['im'].unsqueeze(0).cuda()
# inference
start = time.time()
out = net(im)[0].argmax(dim=1).squeeze().detach().cpu() # .numpy()
end = time.time()
# pred = palette[out]
color_map = torch.ones((out.shape[0], out.shape[1], 3))* 255
for id in trainId2color:
color_map[out == id] = torch.tensor(trainId2color[id]).float()
color_map = color_map.numpy()
cv2.imwrite(args.save_path, color_map)
print("total time:", end - start) | python |
<filename>AlchemyInsights/reset-favorites-edge.md<gh_stars>1-10
---
title: Tilbakestille favoritter i Microsoft Edge
ms.author: pebaum
author: pebaum
manager: scotv
ms.date: 07/23/2021
audience: Admin
ms.topic: article
ms.service: o365-administration
ROBOTS: NOINDEX, NOFOLLOW
localization_priority: Priority
ms.collection: Adm_O365
ms.custom:
- "11937"
- "9007099"
ms.openlocfilehash: a76234d17e39c7122fc5eedcb5a08df5af6d4197f71168434806ebd9f2a92346
ms.sourcegitcommit: b5f7da89a650d2915dc652449623c78be6247175
ms.translationtype: HT
ms.contentlocale: nb-NO
ms.lasthandoff: 08/05/2021
ms.locfileid: "57813113"
---
# <a name="reset-favorites-in-microsoft-edge"></a>Tilbakestille favoritter i Microsoft Edge
Hvis du vil tilbakestille eller flytte data i Edge, velger du fra følgende. Disse gjelder for versjon 88, med mindre annet er angitt:
- [Sikkerhetskopiere favorittene dine i Edge](/deployedge/edge-learnmore-reset-data-in-cloud#back-up-your-favorites)
- [Tilbakestill for å løse et synkroniseringsproblem](/deployedge/edge-learnmore-reset-data-in-cloud#perform-a-reset-to-fix-a-synchronization-problem)
- [Tilbakestille eller fjerne dataene fra Microsoft-skyen](/deployedge/edge-learnmore-reset-data-in-cloud#perform-a-reset-to-remove-your-data-from-microsofts-cloud) | markdown |
The Currency was released in theaters on 30 Apr 2009.
Movies like Jeenthoal, Madhura Manohara Moham, Anveshippin Kandethum and others in a similar vein had the same genre but quite different stories.
The soundtracks and background music were composed by Siddharth for the movie Currency.
The movie Currency belonged to the Action, genre. | english |
Ranchi: A Muslim cleric has convinced his community against offering namaz on roads in Ranchi henceforth.
“We stopped people from offering namaz on roads as it is incorrect to do so in Islam. There were some people who stood in queues on road to offer namaz but from now onwards it will be done inside mosques and space available besides it,” Maulana Ubaidullah of Ekra Mosque told reporters.
So far, traffic on Ranchi’s several roads, including Mahatma Gandhi Road, had to be diverted for namaz every Friday leading to massive jams. However, this Friday, hundreds of Muslims offered namaz inside Ekra Mosque situated near Ratan Talkies.
“The main road is an important route of the city as school buses, ambulances and important vehicles pass through it. Disturbing others in the name of offering namaz is not permitted in Islam,” said Maulana Ubaidullah.
He said a meeting of the clerics of all mosques in the city will now be convened to stop the practice. The decision has been welcomed by the residents of Ranchi.
| english |
<reponame>Ducane/dotfiles<filename>scripts/kodify/get_files_with_missing_subs.py
import os
from helpers import getters
def main():
path = os.getcwd()
files = getters.get_all_files(path, [])
for file in files:
file = file.replace(path + '/', '')
if file.endswith('.mkv'):
info = getters.get_mkvmerge_info_alt(file)
if len(info['tracks']) > 3:
continue
print(str(len(info['tracks'])) + ' -> ' + file)
if __name__ == '__main__':
main()
| python |
<reponame>versedi/PoE-Overlay-Community-Fork<gh_stars>1-10
import { Injectable } from '@angular/core';
import { CacheService } from '@app/service';
import * as PoE from '@data/poe';
import { Language, League } from '@shared/module/poe/type';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
const CACHE_EXPIRY = 1000 * 60 * 60;
@Injectable({
providedIn: 'root'
})
export class LeaguesProvider {
constructor(
private readonly tradeHttpService: PoE.TradeHttpService,
private readonly cache: CacheService) { }
public provide(language: Language): Observable<League[]> {
const key = `leagues_${language}`;
return this.cache.proxy(key, () => this.fetch(language), CACHE_EXPIRY);
}
private fetch(language: Language): Observable<League[]> {
return this.tradeHttpService.getLeagues(language).pipe(
map(response => response.result.map(league => {
const result: League = {
id: league.id,
text: league.text
};
return result;
})),
);
}
}
| typescript |
<gh_stars>0
{"yield": "makes 2 cups", "nutritionEstimates": [], "totalTime": "1 hr", "images": [{"hostedSmallUrl": "https://lh3.googleusercontent.com/V3dxHyofh8HBtOegG19ri83f8KUDWoRXH0JCsuUvI2QUYKM2_94a6ahzd29hCe1WW1UP5206yIg6lMvtoqw_fA=s90", "hostedMediumUrl": "https://lh3.googleusercontent.com/V3dxHyofh8HBtOegG19ri83f8KUDWoRXH0JCsuUvI2QUYKM2_94a6ahzd29hCe1WW1UP5206yIg6lMvtoqw_fA=s180", "hostedLargeUrl": "https://lh3.googleusercontent.com/V3dxHyofh8HBtOegG19ri83f8KUDWoRXH0JCsuUvI2QUYKM2_94a6ahzd29hCe1WW1UP5206yIg6lMvtoqw_fA=s360", "imageUrlsBySize": {"90": "https://lh3.googleusercontent.com/l6HSMTz635I0trLb5BAZsdI8g9NPLjkCeKiq1LUz2p8g7scqmOo7hg-4WGICY3qea8P8q4IoGYycYi1mKf-A=s90-c", "360": "https://lh3.googleusercontent.com/l6HSMTz635I0trLb5BAZsdI8g9NPLjkCeKiq1LUz2p8g7scqmOo7hg-4WGICY3qea8P8q4IoGYycYi1mKf-A=s360-c"}}], "name": "menchi katsu kare/ hamburger croquette w Japanese curry sauce", "source": {"sourceDisplayName": "Lady and Pups", "sourceSiteUrl": "ladyandpups.com", "sourceRecipeUrl": "http://ladyandpups.com/2014/08/27/minchi-katsu-kare-hamburger-croquette-w-japanese-curry-sauce/"}, "id": "menchi-katsu-kare_-hamburger-croquette-w-Japanese-curry-sauce-1574776", "ingredientLines": ["1/2 of a large onion, diced", "5 cloves of garlic, smashed", "1 tsp of ginger", "1/2 of a medium-size apple or pear (65 grams) or a mixture of both, diced", "1 1/2 tbsp of unsalted butter", "1 tbsp of curry powder", "1/4 tsp of ground cumin", "2 cups (500 ml/500 grams) of chicken or beef stock", "1/4 cup (65 ml/65 grams) of whole milk", "3.5 oz (100 grams) of Japanese curry cubes (such as this one)", "0.5 oz (15 grams) of bittersweet chocolate, or 2 tsp of coco powder", "0.5 oz (15 grams) of bittersweet chocolate, or 2 tsp of coco powder", "0.5 oz (15 grams) of bittersweet chocolate, or 2 tsp of coco powder", "17.6 oz (500 grams) of ground beef, or a mixture of ground beef and pork", "1/2 medium-sized onion, very finely diced", "2 tsp of worcestershire sauce", "1 tsp of sea salt", "1/2 tsp of freshly ground black pepper", "2 cups (112 grams) of Japanese panko breadcrumbs (or see instruction on how to make your own)", "4 tbsp of peanut oil ONLY if pre-baking", "1/2 tsp of sea salt", "1/4 tsp of freshly ground black pepper", "1/2 cup (65 grams) of all-purpose flour, seasoned with a bit of salt\u2019n pepper", "2 large eggs, beaten and seasoned with a bit of salt\u2019n pepper", "Vegetable oil for frying", "1/2 Asian green cabbage", "2 tbsp of toasted white sesame", "2 tbsp of toasted black sesame", "1 tbsp of sesame paste (preferably Japanese-type that\u2019s lightly toasted, but tahini could probably work too)", "1 tbsp of light soy sauce", "1/2 tbsp of mayonnaise", "1/2 tbsp of rice vinegar", "1 tsp of toasted sesame oil", "1 tsp of sugar", "1 tsp of grated ginger", "1 ~ 2 tbsp of water to dilute"], "attribution": {"html": "<a href='http://www.yummly.co/recipe/menchi-katsu-kare_-hamburger-croquette-w-Japanese-curry-sauce-1574776'>menchi katsu kare/ hamburger croquette w Japanese curry sauce recipe</a> information powered by <img alt='Yummly' src='https://static.yummly.co/api-logo.png'/>", "url": "http://www.yummly.co/recipe/menchi-katsu-kare_-hamburger-croquette-w-Japanese-curry-sauce-1574776", "text": "menchi katsu kare/ hamburger croquette w Japanese curry sauce recipes: information powered by Yummly", "logo": "https://static.yummly.co/api-logo.png"}, "numberOfServings": 2, "totalTimeInSeconds": 3600, "attributes": {"course": ["Main Dishes"], "cuisine": ["Japanese"]}, "flavors": {}, "rating": 4} | json |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.