text
stringlengths
1
1.04M
language
stringclasses
25 values
<filename>_api/algoLang/Interpolation_Search-JavaScript.json { "mainALGO": "// Function for Interpolation search\nfunction Interpolation_Search(array, search_item)\n{\n var low = 0;\n var high = array.length - 1;\n var pos;\n\n while (low <= high && search_item >= array[low] && search_item <= array[high])\n {\n var rise = high - low;\n var run = array[high] - array[low];\n var x = search_item - array[low];\n\n pos = low + Math.floor(rise / run) * x;\n\n if (array[pos] === search_item)\n return pos;\n\n else if (search_item < array[pos])\n high = pos - 1;\n\n else if (search_item > array[pos])\n low = pos + 1;\n }\n\n return -1;\n}\n\nvar array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\n\nvar search_item = 5;\n\nvar index = Interpolation_Search(array, search_item);\n\nif (index !== -1)\n console.log(\"found at position \" + (index + 1));\nelse\n console.log(\"Not found\");\n\n\n\n/* Output\n\nFound at position 5\n\n*/" }
json
<filename>islam_fitz/survey/migrations/0005_auto_20210712_2132.py<gh_stars>0 # Generated by Django 3.1.12 on 2021-07-12 19:32 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('survey', '0004_lastpage_whatsapp_button'), ] operations = [ migrations.RemoveField( model_name='lastpage', name='whatsapp_button', ), migrations.AddField( model_name='lastpage', name='whatsapp_number', field=models.CharField(default=1, max_length=50), preserve_default=False, ), ]
python
<gh_stars>0 use raytracing::checkerboard::Checkerboard; use raytracing::primitives::{Light, Material}; use raytracing::render::{render, RenderParams}; use raytracing::scene::{Renderable, Scene}; use raytracing::sphere::Sphere; use raytracing::vec::Vec3f; fn main() -> std::io::Result<()> { let ivory = Material { albedo: [0.6, 0.3, 0.1, 0.0], diffuse_color: Vec3f::new(0.4, 0.4, 0.3), spectacular_component: 50.0, refractive_index: 1.0, }; let glass = Material { albedo: [0.0, 0.5, 0.1, 0.8], diffuse_color: Vec3f::new(0.6, 0.7, 0.8), spectacular_component: 125.0, refractive_index: 1.5, }; let red_rubber = Material { albedo: [0.9, 0.1, 0.0, 0.0], diffuse_color: Vec3f::new(0.3, 0.1, 0.1), spectacular_component: 10.0, refractive_index: 1.0, }; let mirror = Material { albedo: [0.0, 10.0, 0.8, 0.0], diffuse_color: Vec3f::new(1.0, 1.0, 1.0), spectacular_component: 1425.0, refractive_index: 1.0, }; let objects: Vec<Box<dyn Renderable>> = vec![ Box::new(Sphere { center: Vec3f::new(-3.0, 0.0, -16.0), radius: 2.0, material: ivory, }), Box::new(Sphere { center: Vec3f::new(-1.0, -1.5, -12.0), radius: 2.0, material: glass, }), Box::new(Sphere { center: Vec3f::new(1.5, -0.5, -18.0), radius: 3.0, material: red_rubber, }), Box::new(Sphere { center: Vec3f::new(7.0, 5.0, -18.0), radius: 4.0, material: mirror, }), Box::new(Checkerboard), ]; let lights = vec![ Light { position: Vec3f::new(-20.0, 20.0, 20.0), intensity: 1.5, }, Light { position: Vec3f::new(30.0, 50.0, -25.0), intensity: 1.8, }, Light { position: Vec3f::new(30.0, 20.0, 30.0), intensity: 1.7, }, ]; let scene = Scene { objects, lights, background_color: Vec3f::new(0.2, 0.7, 0.8), }; let params = RenderParams { field_of_view: std::f32::consts::PI / 2.0, width: 1024, height: 768, depth: 4, }; render(&scene, params) }
rust
Are you a selenophile who also loves flowers? Then check out this amazing list of moon with flower tattoo designs curated just for you. Selenophile is the term used to refer to people who love the moon and can connect to it. The flower moon tattoo has gained popularity recently and everyone seems to like the ideas of these tattoos. People have their choice of flowers and the phase of the moon they can connect to. Similar to the moon, people go through many phases in their lives, but just like the phases of the moon, they are complete and whole. Flowers like Datura, Night Jasmine, Moonflower, etc. bloom only in the moonlight. Therefore, getting the moon tattoo with flowers will definitely add a deeper meaning to your tattoo. If you are someone who connects with the celestial body, you should definitely try getting beauty tattoos on your skin. If you are someone who loves the moon and flowers, this list is made especially for you. This tattoo features a crescent moon with wildflowers. The symbolism of spring is heavily present in this tattoo. There is an uplifting meaning attached to this tattoo. The creativity behind tattooing this idea is remarkable. Moon phases can be enjoyed for eternity, for life. The upper part as well as the lower part of this tattoo also features buds and the middle part is filled with blooming flowers. The shading on both sides of the moon adds an aesthetic look to the tattoo. The leaves in this tattoo are also inked in a minimalist way, giving the tattoo a neat appearance. This tattoo is a symbol of magic. A person who loves wildflowers and the moon should definitely get a tattoo. This crescent moon tattoo features a moon with three flowers and a quote that says “be the best version of you.” There are many elements in this tattoo that make it magical. The tattoo artist has inked this tattoo beautifully. You may notice that one of the flowers is facing upwards while the other two are facing forwards. The shading at the ends of the moon, the flowers and the leaves make the tattoo beautiful. The quote in this tattoo makes the tattoo more unique in its own way and has a very deep meaning. Out of all the phases of the moon, if the crescent moon is your favorite, then this tattoo is definitely ideal for you. This tattoo features a crescent moon and roses with a hanging star connected in dots. There are two roses in full bloom in this rosebud tattoo. The two rose petals next to the tattoo make the tattoo look extraordinarily magical. The tattoo artist used red and green ink in this tattoo but the shading of this tattoo makes the color pastel and beautiful too. The artist has used several thin lines in this tattoo which also makes the tattoo look like a sketch. At one end of the moon there are also lines and dots to add more essence to the tattoo. If you love roses and the moon, this tattoo is absolutely one you should consider getting. The crescent moon shape in this tattoo is done perfectly with the blend of colors. The tattoo artist used a mixture of several colors in this tattoo and all the colors complement each other. The color of the moon is made similar to that of the sun. The beautiful shade gives the colors a pastel look, which has a calming effect on the tattoo. The different colors used on the flowers in this tattoo make the tattoo more beautiful. This tattoo is the ultimate symbol of grace. If you are interested in colorful tattoos, you should totally consider getting this tattoo. This tattoo features a beautiful bluish and purple crescent moon. The colors used in this tattoo make the moon magical. The symbolism of this tattoo is fertility and it is conveyed in a minimalist yet elegant way. The blending of the separate colors on the two halves of the moon looks flawless. The colors of the flowers in this tattoo complement each other perfectly and make the tattoo more attractive. The shading of this tattoo gives the tattoo a pixelated look. This tattoo definitely has a magical fairy tale vibe to it. If you are interested in minimalist body art, this tattoo will look stunning on your skin. This crescent moon tattoo features the moon and a branch filled with blooming flowers, leaves, and flower buds. This tattoo is a perfect depiction of nature in the best way. The artist has placed the moon in the background and the branch of flowers in front which makes the tattoo stand out. The shading of the tattoo also highlights the fine details of the moon as well as the branch filled with flowers. This tattoo can inspire you to bloom and it is exactly what you need if you like simple monochrome tattoos. This tattoo would also look great on women. This tattoo depicts the crescent moon and inside the moon the artist has incorporated the night sky filled with stars. This tattoo looks bold and dark because of the ink used here. The use of black, white, green and red ink makes the tattoo very aesthetic. The dark color of the sky makes the tattoo look like a mystery. The flowers are contained within the moon, and the moon also acts as a border. The idea of this tattoo makes it unique. The shading of this tattoo is also remarkable. The details of the flowers and stars inside the tattoo are also interesting. This tattoo is a symbol of female power. This tattoo would look great on all women who have strong and fierce personalities. This beautiful crescent moon tattoo perfectly showcases the crescent shaped moon. It has a flower with several leaves on the moon. The artist used thin lines for this tattoo. The shading on both ends of the moon makes it look great. The single flower blooming in this tattoo symbolizes independence. The shading on the leaves and the flower is remarkable. The flower used in this tattoo is a starflower with five petals. The thin line of the branch placed slightly outside the moon makes the tattoo appealing to the eyes. You can incorporate your birth flower according to the month of your birth and customize the moon tattoo according to your personal choice. This crescent moon tattoo with roses is beautiful and magical. The inspiration for this tattoo is the original dreamcatcher and the artist combined it with the moon and the flowers. This tattoo is the ultimate symbol of beauty. The essence of daydreaming is also perfectly captured in this tattoo. The strings of the dreamcatcher are loosely wrapped with the moon. The beads on the strings are tattooed using multiple dots. There are three large feathers hanging from the end of the tattoo which give the tattoo an ethereal look. The shading and details of the tattoo are also wonderful. If you want a body art or a tattoo that will look like a dream, then you should definitely get this dreamcatcher moon tattoo on your body. This amazing crescent moon tattoo is the epitome of fertility. The shading and details in this tattoo make it look like art. There are two flowers placed slightly in the lower part of the moon. If you notice, you can visualize that one flower is slightly larger than the other, which makes the tattoo look contrasting. The leaves are also placed and designed in such a way to bring out the charm of this tattoo. The placement of this monochrome tattoo is also very appealing. This tattoo will have a symbolic look on your skin. This tattoo of the moon with the flowers would also look divine on all women who are planning to get it. If you want to explore other suggestions besides these, you can also check out the list below: - Moon Mandala Tattoo. - Full moon with flowers and stars tattoo on the wrist. - Mandala moon tribal tattoo. - Black cat sitting on the full moon with a tattoo of flowers and stars on the wrist. - Sun And Moon Tattoo With Flowers On The Finger. Disclaimer: Curated and re-published here. We do not claim anything as we translated and re-published using google translator. All images and Tattoo Design ideas shared only for information purpose.
english
<gh_stars>1-10 --- layout: post title: Neural Arithmetic Units author: <NAME>, <u><NAME></u> year: 2020 key: 2019.13 journal: ICLR (Spotlight) link: https://openreview.net/forum?id=H1gNOeHKPS image: /media/publications/NAU/image.png bibtex: /media/publications/NAU/bibtex.txt website: https://github.com/AndreasMadsen/stable-nalu pdf: https://openreview.net/pdf?id=H1gNOeHKPS type: paper ---
markdown
1 Jesús, jãa cʉ̃ buerã pʉa amo peti, dʉpore pʉaga penituaro ca niirãre wede majio yapano, too ca niiricʉ Galilea yepa macã macãripʉ cʉ̃jare bue majio, añurije quetire wede, tii yujugʉ waacoawi. 2 Uwo Coeri majʉ Juan tia cũurica wiipʉ niigʉ, Cristo cʉ̃ ca tii niirijere queti tʉori, cʉ̃ buerã mena macãrã pʉarãre: 3 —¿Mʉra mʉ niiti, “Mesías doorucumi” cʉ̃ja ca ĩiricʉ? ¿Ména apĩre jãa yuerãtiqué? —ĩi jãiña dotigʉ tiicojo cojoupi. 4 To biro cʉ̃ja ca ĩiro, Jesús pea o biro cʉ̃jare ĩi yʉʉwi: —Waari, mʉja ca ĩarijere, mʉja ca tʉorijere, Juan're wede dooya. 5 Ca ĩatirã ĩama; upa yuriri cãa waa majima; ca cami boamiricarã cʉ̃ja diariquere ametʉene ecoma; ca tʉotirã cãa tʉocoama; ca bii yairicarã cãa cati tuama; ñucã ca boo pacarã cãa, añurije quetire wede ecoma. 6 ¡Ʉjea niiña, yʉ yee jʉori ca tʉgoeña maa wijiatigʉa! Cʉ̃re ĩi wede dooya —ĩiwi Jesús. 7 Juan buerã cʉ̃ja ca waaro jiro, Juan yee maquẽre bojocare o biro ĩi wede jʉo waawi Jesús: —¿Ñeere ĩarã waarã, ca yucʉ maniri yepapʉ mʉja waari? ¿Jĩcã wãjo wino ca paa puurije mena ca yugui nucũri wãjore ĩarã waarã mʉja biiri? 8 Tee méére ĩarã mʉja ca biijata, ¿Ñeere ĩarã waarã mʉja biiri? ¿Jĩcʉ̃, añurije ca juti jãñagʉre ĩarã waarã mʉja waari? Mʉja maji. Bojoca añurije ca juti jãñarã, wiorã yaa wiijeripʉ niima. 9 To docare ¿ñee peere ĩarã waarã mʉja waari? ¿Jĩcʉ̃ Ʉmʉreco Pacʉ yee quetire wede jʉgueri majʉre ĩarã waarã mʉja biiri? Cʉ̃ petire ĩarã waarã mʉja biijacupa. Ʉmʉreco Pacʉ yee quetire wede jʉgueri majʉ ametʉenero ca niigʉre ĩarã mʉja biijacupa. 10 Ʉmʉreco Pacʉ wederiquepʉ: “Yʉ yee quetire wederi majʉre mʉ jʉguero cʉ̃re yʉ tiicojo, mʉre cʉ̃ maa queno yuejato ĩigʉ,”* 11.10 Mal 3.1. cʉ̃ja ca ĩi owaquĩricʉra niimi Juan. 11 ”Yee méé mʉjare yʉ ĩi: Jĩcʉ̃ ʉnopeera ati yepapʉ ca baʉaricʉ, Uwo Coeri majʉ Juan ametʉenero ca nii majuropeegʉ maniupi. To ca bii pacaro, Ʉmʉreco Pacʉ cʉ̃ ca doti niiri tabepʉra watoa macʉ̃ ca niigʉra, Juan ametʉenero ca nii majuropeegʉ niimi. 12 Uwo Coeri majʉ Juan cʉ̃ ca niirica tabe mena, to biri mecʉ̃pʉ mena Ʉmʉreco Pacʉ cʉ̃ ca doti niirije, ñañaro ca tamʉorije watoara bii nʉnʉa waa. Teere ca tʉorʉgatirã, teere tii yaiorʉgamima. 13 Ʉmʉreco Pacʉ yee quetire wede jʉgueri maja niipetirã, to biri doti cũurique, cʉ̃ja ca wede jʉguerique Juan menara bii yapano eaupa. 14 Yʉ ca ĩirijere díámacʉ̃ mʉja ca tʉorʉgajata, Juan, Ʉmʉreco Pacʉ yee quetire wede jʉgueri majʉ, “Elías doorucumi” cʉ̃ja ca ĩiricʉra niimi. 15 Ca amoperi cʉtirã tʉoya yʉ ca ĩirijere. 16 ”¿Ñee mena ati cuu macãrã bojocare yʉ ĩi cõoñabogajati? Wimarã macã yepapʉ† 11.16 Macã decomacã macã yepa, apeye noniri maja cʉ̃ja ca niiri tabe. epe duwirã, cʉ̃ja mena macãrãre o biro ca ĩi acaro bui duwirãre biro niima: 17 “Tõrogare jãa putimijãwʉ, mʉja pea mʉja bajatijãwʉ; boori bajare jãa bajamijãwʉ, ca ĩi ameri acaro bui duwi yujurãre biro niima. 18 Juan baati, ʉje ocore‡ 11.18a Vino. jiniti, ca biigʉ dooupi.§ 11.18b Lc 1.21. Teerena cʉ̃ja pea “Ca wãtĩ jãa ecoricʉ niimi,” cʉ̃re ĩima. 19 Jiro yʉ, Ca Nii Majuropeegʉ Macʉ̃, baa, jini ca tiigʉ yʉ doowʉ. Teerena cʉ̃ja pea, “Ca baa pacagʉ, ca cũmu paigʉ, ñañarã mena macʉ̃, ñucã Roma maquẽre wapa jee bojari maja mena macʉ̃ niimi,” yʉre ĩima. Biiropʉa, Ʉmʉreco Pacʉ cʉ̃ ca majirijea tee ca tii niirije menapʉ bii bau nii ĩño —ĩiwi Jesús. 20 To cõrora Jesús, paʉ peti ca ĩa ñaaña manirije cʉ̃ ca tii bau nii ĩñorica macãri macãrã, teere ĩa pacarã tʉgoeña yeri wajoari, Ʉmʉreco Pacʉre cʉ̃ja ca tʉo nʉnʉjeetirije jʉori, o biro ĩi tuti jʉo waawi: 21 —¡Abé nija, Corazín, Betsaida ñañaro peti mʉja biirucu! Mʉja watoare, ca ĩa ñaaña manirije yʉ ca tii bau niiriquere Tiro, Sidón macãri macãrã peere yʉ ca tii bau nii ĩñojata, mee tĩrʉmʉpʉra ñañaro cʉ̃ja ca tiiriquere, ñañaro bii tʉgoeñarique pai, tʉgoeña yeri wajoa, biibojacupa. 22 “Ʉmʉreco Pacʉ cʉ̃ ca ĩa bejeri rʉmʉ ca niiro, Tiro, Sidón macãrã ametʉenero ñañaro mʉja tamʉorucu,” mʉjare yʉ ĩi. 23 Mʉja Capernaúm macãrã, ¿“Ʉmʉreco tutipʉ jãa ami mʉa waa ecorucu,” mʉja ĩi tʉgoeñati? “Ca ʉ̃cʉ̃ari opere ca ʉ̃cʉ̃a majuropeeri tabepʉ mʉja cõa duwio ecorucu. Mʉja watoare ca ĩa ñaaña manirije yʉ ca tii bau niiriquere, Sodoma macãrã peere tii bau nii ĩñorique to ca niijata, ati rʉmʉripʉ cãare niicãbocuma. 24 Ʉmʉreco Pacʉ cʉ̃ ca ĩa bejeri rʉmʉ ca niiro, Sodoma yepa macãrã ametʉenero, ñañaro mʉja tii ecorucu,” mʉjare yʉ ĩi —ĩiwi Jesús. 25 Tii rʉmʉrire o biro ĩiwi Jesús: —Añuro mʉre yʉ ĩi nʉcʉ̃ bʉo Cáacʉ, ati ʉmʉreco, ati yepa Ʉpʉre, ca majirãre, ca tʉgoeña puorãre, mʉ ca yaioriquere watoa macãrã peere mʉ ĩño. 26 Ʉ̃gjá, Cáacʉ, o birora ca biiro mʉ boowʉ. 27 ”Yʉ Pacʉ, niipetirijepʉrena yʉre tiicojowi. Jĩcʉ̃ ʉno peera, cʉ̃ Macʉ̃ yʉ ca niirijere majitima. Yʉ Pacʉ wado majimi. Ñucã jĩcʉ̃ ʉno peera, yʉ Pacʉ cʉ̃ ca niirijere majitimi. Yʉ cʉ̃ Macʉ̃, to biri cʉ̃ Macʉ̃ yʉ ca boorã wadore cʉ̃ja ca majiro yʉ ca tiirã wado, majima. 28 ”Yʉ mena pee dooya mʉja niipetirã, mʉja paderiquere juti, tʉgoeñarique pai, ca biirã. Yʉ, mʉja ca yerijãaro mʉjare yʉ tiirucu. 29 Yʉ ca dotirijere tii nʉnʉjee, yʉ ca biirique cʉtirijere ĩa cõo, tiiya. Yʉa, ca bojoca añugʉ, ca yeri pato wãcãtigʉ, yʉ nii. To biro biirã, mʉja ca cati niirijepʉ yerijãarique mʉja bʉarucu. 30 Yʉ ca dotirijea, yʉ ca biirore biro mʉjare yʉ ca bii dotirijea, popiye méé nii —ĩiwi Jesús. †11:16 11.16 Macã decomacã macã yepa, apeye noniri maja cʉ̃ja ca niiri tabe.
english
When an employee is looking to advance in their career, where they work might have a kind of strict hierarchical path for the role they’re in and what titles come next — but there’s a good chance that employee might want to try something new without leaving their company. Instead of going from just an agent to a manager of agents, or following some existing promotion line, a company that’s large enough probably has plenty of other opportunities within it across many different divisions — each with either a directly-comparable skillset, or one that might need some slight additions. That’s where Degreed, an online service for identifying those skill gaps and how to pick them up, as well as track them, comes. Instead of locking employees into a single trajectory, Degreed hopes to give employers tools to help employees improve their skills even more, and in the end become much more valuable to the employer. Degreed today said it has raised $42 million in a venture financing round co-led by Owl Ventures and Jump Capital, with Founders Circle Capital and existing investors participating. The service launches inside an organization, identifies the content that offers an opportunity to work on skills like project management (often made by the company itself), and then shows employees how to start working on those skills. And those skill gaps between roles might actually be much smaller than those employees think, and it’s just a matter of identifying what they need to work on in order to grow within their company. After that, it identifies the best ways to get those skills, which can come in the form of content or potentially other avenues, and helps employees figure out how far along their progression path they are. McCarthy said even though the employers are helping their employees learn new skills, which might even help them get jobs elsewhere, they aren’t having an issues signing up potential clients. That’s because in the end, employers are going to see more value in helping those employees grow and learn new skills, and that might provide its own feedback loop where employees feel like they are getting the most from their company and want to stick around. Of course, one of the big challenges for Degreed is not only identifying content that can serve as a barometer for learning a new skill, but also gauging its quality. For example, an online MIT course on Linear Algebra — just a series of videos and problem sets — could potentially end up superior to the other online course next to it on some well-known online course service. While Degreed may have initially served as a kind of hub or aggregation point for educational content initially — or at least, that’s what people thought it was, McCarthy said — all that information coming in has helped it create a robust data set that it can use going forward to further help employees figure out what skills they need to learn, or even skills they didn’t realize they want to learn. When an employee comes in the door for the first time, the hope is that Degreed will have enough information for what’s inside the company and what the employee is interested in to gauge right away what they might want to learn. That, in the end, provides a neat feedback loop. A tool like Degreed gets used to what employees want to learn, and starts to spot skills gaps inside a company that need to be filled. If all that plays out the way you might expect, then the whole notion of a hierarchy in a company might be a thing that might not exist for much longer — and employees, who are hopefully digging up the skills they want and would be good at, are the ones that chart out the real progression path inside a company as it tries to achieve its goals. There is definitely a lot of interest in the employee learning space, especially as it makes sense for larger companies who are increasingly aching for niche talent like machine learning are looking to find the best people — who might even be at their own company. Grovo, for example, raised $40 million about two years ago. But as is the case with any platform looking to win, it’s going to be a race to get the best (and most) data to convince employers that they can quickly and efficiently identify the best people to learn a skill, something McCarthy hopes Degreed has with a million licensed users.
english
G. Sathiyan, India’s highest ranked player, is all set to make his debut appearance at the International Table Tennis Federation (ITTF) Men’s World Cup when he will take on France’s Simon Gauzy in the first match of the 2019 edition. The world No. 30 finished sixth at the Asian Cup in Yokohama, Japan, in April to qualify for the World Cup for the first time, and the Chennai lad practised with a separate sparring partner, Shen Yaohuan from China, to focus on his individual training. Later on Friday, Sathiyan will take on Jonathan Groth of Sweden in his second Group D match of the preliminary round. The 40th edition of the World Cup, which begins on Friday at the Olympic Square, Sichuan Provincial Gymnasium, Chengdu, will feature 20 paddlers, including wild card entries and alternates. The finals will be held on Sunday. Invitations were sent according to the August world rankings and the players had to go through qualification tournaments – the Pan America Cup in Puerto Rico, the Asian Cup, the Europe Top 16 Cup in Switzerland, the Oceania Cup in French Polynesia and the Africa Cup in Lagos, Nigeria. The winner of the tournament, the second most prestigious event after the World Championships, will take home $60,000, while the runner-up will get $40,000. Asian paddlers have been the most dominant force in the tournament winning 24 titles combined. Fan Zhendong : The defending champion starts as one of the favourites. The world No. 1 is a two-time World Cup champion, with his maiden crown arriving in Saarbrücken, Germany, in 2016. The Chinese paddler is coming off the back of back-to-back tournament wins at the Austrian Open and the German Open, and the 22-year-old has a chance to become only the third player to win consecutive World Cups after Ma Lin (2003-04) and Wang Hao (2007-08). Ma Long : The 31-year-old Chinese is a veteran of the sport and also a two-time World Cup champion (2012, 2015). The world No. 4 started the year with titles at the Qatar Open and the China Open before finishing runner-up in Korea. With a win percentage of 80 in the tournament, he is touted as the biggest threat to Fan’s defence campaign. Timo Boll: Aged 38 and with a win record-loss of 49-21 at the tournament, the German is the second-most experienced player at this year’s edition. The world No. 8 has lifted the title in 2002 and 2005 and holds the distinction of recording the joint most, with Wang Hao, appearances in the final – six. Though Boll hasn’t won a tournament in 2019, he has been consistent with either top-four or top-eight finishes. Vladimir Samsonov : The most successful current player with three World Cup titles in 1999, 2001 and 2009, Samsonov has a win-loss record of 52-27 at the tournament. The 43-year-old is also the most experienced player in the world, but his last World Tour title dates back to the Australian Open in 2017. Should Samsonov win on December 1, he will tie China’s Ma Lin for the most World Cup titles - four.
english
<reponame>JeongJaeWook/python-for-text-analysis {"published": "2015-09-29T09:03:34Z", "media-type": "Blog", "title": "'Fierce Determination' Fueled Fiorina In 2010 Bid, As It Does Now", "id": "1c2027d5-5b19-4933-8268-f6a4a939d2d7", "content": "Fiorina lost out on going to the Senate five years ago but, as a former adviser said, \"she gave <NAME> a huge run for her money.\" Her rise in this year's race is reminiscent of that run. \n\n\u00bb E-Mail This", "source": "U.S. : NPR"}
json
<filename>postfix/help/opt_default_transport.nl.html<gh_stars>1000+ <header>Standaard berichten aflevering transport</header> <center><tt>default_transport</tt></center> <hr> Deze parameter specificeert het standaard berichten aflever transport die word gebruikt indien er niets expliciet is bepaald in de optionele <a href=transport>transport</a> tabel. Algemene waardes zijn <tt>uucp</tt> of <tt>smtp</tt>. <hr>
html
Hyderabad FC had a great start to the Indian Super League season but soon found themselves dropping points. Despite the slip-ups, they go into the business end of the season still in the top four. As they take on Bengaluru FC at the Tilak Maidan on Thursday, coach Manuel Marquez knows that a win will go a long way in helping them stay there. “Yes, I think at this moment, the competition is equal. There are a lot of draws and it’s difficult because practically all the teams are fighting to get into the top four. I think all the teams have a possibility,” Marquez said. In their last three games, the Nizams managed to keep two clean sheets and the coach said that that more of these could win matches for the team. “We play (according to) our styles. When we concede goals, people say we lose the ball because we play in transition too much. With clean sheets, you don’t lose games,” said Marquez. Despite Bengaluru not having registered a win for a while, Marquez still expects a tough test. “I think we play against strong teams. When we have the ball, we try to arrive with the maximum players possible in the Bengaluru box. And when they have the ball, we will have to avoid them arriving in our box with danger,” added Marquez. Bengaluru, meanwhile, are winless in their last seven games and their hopes of a revival are fading fast. They have also failed to keep a clean sheet in their last ten games and find themselves in an unfamiliar seventh spot. Despite all their problems, the fact that they are still only four points away from a top-four spot will give interim coach Naushad Moosa hope. However, he has also focussed on giving opportunities to youngsters in his brief stint so far. “We are trying to balance things,” he said. “We have not given up (our hopes) for the play-offs. But we are giving them (the young players) time to prepare for next season. So, the idea is there to prepare our team for the next season also. It is important for them to understand the level of ISL as it’s totally different. So, we’re giving them 20-to-30 minutes to understand the pressure and level of the game,” said Moosa.
english
Google's hardware event Oct. 15, dubbed Made by Google, will highlight the Pixel 4, Pixel 4 X, and other devices, but the real challenge will be positioning its lineup vs. Apple, Amazon, and Microsoft. Relative to Apple, Amazon, and Microsoft, Google's hardware unit resembles more of a hobby. Apple is clearly all about hardware and the iPhone 11. Amazon's hardware strategy revolves around Alexa but features a wide variety of devices including smart frames and even a smart ring to complement an army of smart speakers. And then there's Microsoft, which highlighted its roadmap and the Surface Neo and Duo, two foldable devices due holiday 2020. Microsoft's Surface revenue for fiscal 2019 was $5.71 billion. Simply put, Amazon and Microsoft, two companies with hardware units that rhyme with what Google is trying to do, have more scale. For Microsoft, Surface hardware is about showing what the Windows platform and assorted productivity apps can do. Amazon is about carpet-bombing consumers with devices powered by Alexa, which ultimately leads to more e-commerce. Google CEO Sundar Pichai said on its second-quarter earnings conference call that the company has "continued to invest in our hardware business." He added that Pixel unit sales in the second quarter grew 2x year over year due to the Pixel 3A launch. Google Home products will be moved under the Nest brand, which is expanding globally. Google's hardware unit fits in the company's "other revenue" category, which is powered by Google Cloud, apps and in-app purchases and YouTube subscriptions. For the six months ending June 30, Google's other revenue was $11.6 billion. Hardware is a small part of that mix. Forrester analyst Frank Gillett said: Google's devices team needs keep up with competition from Amazon, whose Echo and Ring products lines now cover a wide swath of the smart home. And Microsoft's new Surface line of products has put Google on notice that Microsoft is back in the smartphone race (using Android!) and doubling down on thought leadership for laptops and tablets. With that backdrop, it's clear that Google's hardware event will have to address the following issues as I see them. Will Pixel smartphones evolve from a showcase for Android to devices that will compete with Samsung and Apple? The Wall Street reports of late highlight that Apple iPhone 11 sales appear to be stronger than expected. T. Michael Walkley, an analyst at Canaccord Genuity, said that surveys and Apple supply chain checks indicate that the iPhone 11 is selling well despite the inevitable wait for 5G devices. Samsung's Note 10 just launched and can deliver solid average selling prices. Google does appear to have its price points covered with the Pixel 3A and now the Pixel 4. Can Google's computational photography knowhow put the Pixel into the big leagues? Given Google's camera and photography software (AI and machine learning fueled), Pixel 4 can push demand. Why? The camera is fueling iPhone 11 demand. Google's Pixel franchise could gain from camera advances. I've tried out a bevy of mid-tier devices and most of the cameras were lacking due to software, not hardware. Google can push more Pixels with a balance of pricing and camera performance. (See: Artificial intelligence and the future of smartphone photography) Is the Google Home to Nest branding effective and does it matter given the sheer volume of Amazon Echo and Alexa enabled devices? Google will reportedly launch more smart speakers under the Nest brand and that's promising, but the reality is Amazon commands the market. Google is making Google Assistant far more nimble than Alexa, but it's unclear that the hardware can compete with Amazon's lineup. (See: Google is a bald-faced IoT liar and its Nest pants are on fire) And will there be a 2020 roadmap from Google? Microsoft's announcement of Surface Neo and Duo landed more than a year ahead of time. Microsoft said it wanted to get developers involved to develop the apps and concept. The Duo is even Android-powered, with allegedly the best of Microsoft and Google. Typically, a product announcement more than a year out is a bad move. Somehow it worked for Microsoft and put rivals on notice. Google's roadmap for its hardware may have to note something about foldable devices.
english
import { Component, OnInit, Injectable } from '@angular/core'; import { HttpService } from '../../services/http.service'; import { Router } from '@angular/router'; import { CustomAuthService } from '../../services/custom.auth.service'; import { NotificationsService } from '../../services/notifications.service'; import {HttpClient, HttpParams} from '@angular/common/http'; import {Observable, of} from 'rxjs'; import {catchError, debounceTime, distinctUntilChanged, map, tap, switchMap, merge} from 'rxjs/operators'; import { FilterPipe } from '../../filter.pipe'; const WIKI_URL = 'https://en.wikipedia.org/w/api.php'; const PARAMS = new HttpParams({ fromObject: { action: 'opensearch', format: 'json', origin: '*' } }); export class WikipediaService { constructor(private http: HttpClient) {} search(term: string) { if (term === '') { return of([]); } return this.http .get(WIKI_URL, {params: PARAMS.set('search', term)}).pipe( map(response => response[1]) ); } } @Component({ selector: 'app-friends', templateUrl: './friends.component.html', styleUrls: ['./friends.component.css'] }) export class FriendsComponent implements OnInit { private friends: any; private activities: any; private click: boolean; private showHide: any; searching = false; searchFailed = false; hideSearchingWhenUnsubscribed = new Observable(() => () => this.searching = false); constructor(private httpClient: HttpService, private router: Router, private authService: CustomAuthService, private _service: WikipediaService, private _Messages: NotificationsService, private filterPipe: FilterPipe) { } ngOnInit() { if (this.authService.getAuth()) { const reqObj = { uri: '/friends', }; this.httpClient.get(reqObj) .subscribe(friends => { for (let i = 0; i < friends.length; i++) { friends[i].isOpen = false; } this.friends = friends; }); } else { this.router.navigate(['login']); } } getActivities(friend:any, index: number) { let url; if(this.authService.getUser()===friend.email){ url=`/activities?email=${friend.email}`; }else{ let isPrivate=false; url=`/activities?email=${friend.email}&isPrivate=${isPrivate}` } const actObj = { uri: url, }; for (let i = 0; i < this.friends.length; i++) { this.friends[i].isOpen = false; } this.httpClient.get(actObj) .subscribe(activities => { if (activities.length > 0) { this.activities = activities; this.friends[index].isOpen = true; this.showHide = !this.showHide; } }); } search(term: string) { if (term === '') { return of([]); } const reqObj = { uri:WIKI_URL, }; this.httpClient.get(reqObj) .subscribe(friends => { for (let i = 0; i < friends.length; i++) { this.httpClient.get(reqObj) .subscribe(friends => { for (let i = 0; i < friends.length; i++) { friends[i].isOpen = false; } this.friends = friends; }); } } } // search(){ // let searchText: any; // return this.filterPipe.transform(this.friends, searchText) // }
typescript
THE MUMBAI Congress on Saturday celebrated party MP Rahul Gandhi’s 51st birthday by announcing that it will adopt 1,000 malnourished children and donate 1,000 bottles of blood. City Congress president Bhai Jagtap said blood donation camps will be organised in various areas, including Colaba and Chembur. AICC Maharashtra in charge, H K Patil – who is on a five-day tour of Mumbai – was the chief guest at the function also attended by Cabinet ministers Varsha Gaikwad, Aslam Shaikh and Yashomati Thakur as well as Mumbai Congress working president Charan Singh Sapra, among others. Jagtap said that Congress has identified 1,000 malnourished children from the slums of Mumbai and tribal hamlets in surrounding districts. “We have appointed 200 party workers to take care of five children each,” he added. “The third Covid-19 wave is likely to hit children more than any other age group. Malnourished children are likely to be more vulnerable,” he added.
english
<reponame>iltempe/osmosi<filename>sumo/src/microsim/devices/MSDevice_Tripinfo.cpp /****************************************************************************/ /// @file MSDevice_Tripinfo.cpp /// @author <NAME> /// @author <NAME> /// @author <NAME> /// @author <NAME> /// @date Fri, 30.01.2009 /// @version $Id$ /// // A device which collects info on the vehicle trip /****************************************************************************/ // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ // Copyright (C) 2009-2017 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. // SUMO is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // /****************************************************************************/ // =========================================================================== // included modules // =========================================================================== #ifdef _MSC_VER #include <windows_config.h> #else #include <config.h> #endif #include <microsim/MSGlobals.h> #include <microsim/MSNet.h> #include <microsim/MSLane.h> #include <microsim/MSEdge.h> #include <microsim/MSVehicle.h> #include <utils/options/OptionsCont.h> #include <utils/iodevices/OutputDevice.h> #include <utils/xml/SUMOSAXAttributes.h> #include "MSDevice_Tripinfo.h" #define NOT_ARRIVED TIME2STEPS(-1) // =========================================================================== // static members // =========================================================================== MSDevice_Tripinfo::DeviceSet MSDevice_Tripinfo::myPendingOutput; double MSDevice_Tripinfo::myVehicleCount(0); double MSDevice_Tripinfo::myTotalRouteLength(0); SUMOTime MSDevice_Tripinfo::myTotalDuration(0); SUMOTime MSDevice_Tripinfo::myTotalWaitingTime(0); SUMOTime MSDevice_Tripinfo::myTotalTimeLoss(0); SUMOTime MSDevice_Tripinfo::myTotalDepartDelay(0); int MSDevice_Tripinfo::myWalkCount(0); double MSDevice_Tripinfo::myTotalWalkRouteLength(0); SUMOTime MSDevice_Tripinfo::myTotalWalkDuration(0); // =========================================================================== // method definitions // =========================================================================== // --------------------------------------------------------------------------- // static initialisation methods // --------------------------------------------------------------------------- void MSDevice_Tripinfo::buildVehicleDevices(SUMOVehicle& v, std::vector<MSDevice*>& into) { if (OptionsCont::getOptions().isSet("tripinfo-output") || OptionsCont::getOptions().getBool("duration-log.statistics")) { MSDevice_Tripinfo* device = new MSDevice_Tripinfo(v, "tripinfo_" + v.getID()); into.push_back(device); myPendingOutput.insert(device); } } // --------------------------------------------------------------------------- // MSDevice_Tripinfo-methods // --------------------------------------------------------------------------- MSDevice_Tripinfo::MSDevice_Tripinfo(SUMOVehicle& holder, const std::string& id) : MSDevice(holder, id), myDepartLane(""), myDepartSpeed(-1), myDepartPosLat(0), myWaitingTime(0), myArrivalTime(NOT_ARRIVED), myArrivalLane(""), myArrivalPos(-1), myArrivalPosLat(0), myArrivalSpeed(-1), myMesoTimeLoss(0) { } MSDevice_Tripinfo::~MSDevice_Tripinfo() { // ensure clean up for vaporized vehicles which do not generate output myPendingOutput.erase(this); } bool MSDevice_Tripinfo::notifyMove(SUMOVehicle& veh, double /*oldPos*/, double /*newPos*/, double newSpeed) { if (veh.isStopped()) { return true; } if (newSpeed <= SUMO_const_haltingSpeed) { myWaitingTime += DELTA_T; } return true; } void MSDevice_Tripinfo::notifyMoveInternal(const SUMOVehicle& veh, const double /* frontOnLane */, const double timeOnLane, const double /* meanSpeedFrontOnLane */, const double meanSpeedVehicleOnLane, const double /* travelledDistanceFrontOnLane */, const double /* travelledDistanceVehicleOnLane */, const double /* meanLengthOnLane */) { // called by meso const double vmax = veh.getEdge()->getVehicleMaxSpeed(&veh); if (vmax > 0) { myMesoTimeLoss += TIME2STEPS(timeOnLane * (vmax - meanSpeedVehicleOnLane) / vmax); } myWaitingTime += veh.getWaitingTime(); } bool MSDevice_Tripinfo::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { if (reason == MSMoveReminder::NOTIFICATION_DEPARTED) { if (!MSGlobals::gUseMesoSim) { myDepartLane = static_cast<MSVehicle&>(veh).getLane()->getID(); myDepartPosLat = static_cast<MSVehicle&>(veh).getLateralPositionOnLane(); } myDepartSpeed = veh.getSpeed(); } return true; } bool MSDevice_Tripinfo::notifyLeave(SUMOVehicle& veh, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { if (reason >= MSMoveReminder::NOTIFICATION_ARRIVED) { myArrivalTime = MSNet::getInstance()->getCurrentTimeStep(); if (!MSGlobals::gUseMesoSim) { myArrivalLane = static_cast<MSVehicle&>(veh).getLane()->getID(); myArrivalPosLat = static_cast<MSVehicle&>(veh).getLateralPositionOnLane(); } // @note vehicle may have moved past its arrivalPos during the last step // due to non-zero arrivalspeed but we consider it as arrived at the desired position // However, vaporization may happen anywhere (via TraCI) if (reason == MSMoveReminder::NOTIFICATION_VAPORIZED) { myArrivalPos = veh.getPositionOnLane(); } else { myArrivalPos = myHolder.getArrivalPos(); } myArrivalSpeed = veh.getSpeed(); } return true; } void MSDevice_Tripinfo::computeLengthAndDuration(double& routeLength, SUMOTime& duration) const { SUMOTime finalTime; double finalPos; double finalPosOnInternal = 0; if (myArrivalTime == NOT_ARRIVED) { finalTime = MSNet::getInstance()->getCurrentTimeStep(); finalPos = myHolder.getPositionOnLane(); if (!MSGlobals::gUseMesoSim) { const MSLane* lane = static_cast<MSVehicle&>(myHolder).getLane(); if (lane->getEdge().isInternal()) { finalPosOnInternal = finalPos; finalPos = myHolder.getEdge()->getLength(); } } } else { finalTime = myArrivalTime; finalPos = myArrivalPos; } const bool includeInternalLengths = MSGlobals::gUsingInternalLanes && MSNet::getInstance()->hasInternalLinks(); routeLength = myHolder.getRoute().getDistanceBetween(myHolder.getDepartPos(), finalPos, myHolder.getRoute().begin(), myHolder.getCurrentRouteEdge(), includeInternalLengths) + finalPosOnInternal; duration = finalTime - myHolder.getDeparture(); } void MSDevice_Tripinfo::generateOutput() const { const SUMOTime timeLoss = MSGlobals::gUseMesoSim ? myMesoTimeLoss : static_cast<MSVehicle&>(myHolder).getTimeLoss(); updateStatistics(timeLoss); if (!OptionsCont::getOptions().isSet("tripinfo-output")) { return; } myPendingOutput.erase(this); double routeLength; SUMOTime duration; computeLengthAndDuration(routeLength, duration); // write OutputDevice& os = OutputDevice::getDeviceByOption("tripinfo-output"); os.openTag("tripinfo").writeAttr("id", myHolder.getID()); os.writeAttr("depart", time2string(myHolder.getDeparture())); os.writeAttr("departLane", myDepartLane); os.writeAttr("departPos", myHolder.getDepartPos()); if (MSGlobals::gLateralResolution > 0) { os.writeAttr("departPosLat", myDepartPosLat); } os.writeAttr("departSpeed", myDepartSpeed); os.writeAttr("departDelay", time2string(myHolder.getDepartDelay())); os.writeAttr("arrival", time2string(myArrivalTime)); os.writeAttr("arrivalLane", myArrivalLane); os.writeAttr("arrivalPos", myArrivalPos); if (MSGlobals::gLateralResolution > 0) { os.writeAttr("arrivalPosLat", myArrivalPosLat); } os.writeAttr("arrivalSpeed", myArrivalSpeed); os.writeAttr("duration", time2string(duration)); os.writeAttr("routeLength", routeLength); os.writeAttr("waitSteps", myWaitingTime / DELTA_T); os.writeAttr("timeLoss", time2string(timeLoss)); os.writeAttr("rerouteNo", myHolder.getNumberReroutes()); const std::vector<MSDevice*>& devices = myHolder.getDevices(); std::ostringstream str; for (std::vector<MSDevice*>::const_iterator i = devices.begin(); i != devices.end(); ++i) { if (i != devices.begin()) { str << ' '; } str << (*i)->getID(); } os.writeAttr("devices", str.str()); os.writeAttr("vType", myHolder.getVehicleType().getID()); os.writeAttr("speedFactor", myHolder.getChosenSpeedFactor()); os.writeAttr("vaporized", (myHolder.getEdge() == *(myHolder.getRoute().end() - 1) ? "" : "0")); // cannot close tag because emission device output might follow } void MSDevice_Tripinfo::generateOutputForUnfinished() { while (myPendingOutput.size() > 0) { const MSDevice_Tripinfo* d = *myPendingOutput.begin(); if (d->myHolder.hasDeparted()) { d->generateOutput(); if (!OptionsCont::getOptions().isSet("tripinfo-output")) { return; } // @todo also generate emission output if holder has a device OutputDevice::getDeviceByOption("tripinfo-output").closeTag(); } else { myPendingOutput.erase(d); } } } void MSDevice_Tripinfo::updateStatistics(SUMOTime timeLoss) const { double routeLength; SUMOTime duration; computeLengthAndDuration(routeLength, duration); myVehicleCount++; myTotalRouteLength += routeLength; myTotalDuration += duration; myTotalWaitingTime += myWaitingTime; myTotalTimeLoss += timeLoss; myTotalDepartDelay += myHolder.getDepartDelay(); } void MSDevice_Tripinfo::addPedestrianData(double walkLength, SUMOTime walkDuration) { myWalkCount++; myTotalWalkRouteLength += walkLength; myTotalWalkDuration += walkDuration; } std::string MSDevice_Tripinfo::printStatistics() { std::ostringstream msg; msg.setf(msg.fixed); msg.precision(gPrecision); msg << "Statistics (avg):\n" << " RouteLength: " << getAvgRouteLength() << "\n" << " Duration: " << getAvgDuration() << "\n" << " WaitingTime: " << getAvgWaitingTime() << "\n" << " TimeLoss: " << getAvgTimeLoss() << "\n" << " DepartDelay: " << getAvgDepartDelay() << "\n"; if (myWalkCount > 0) { msg << "Pedestrian Statistics (avg of " << myWalkCount << " walks):\n" << " RouteLength: " << getAvgWalkRouteLength() << "\n" << " Duration: " << getAvgWalkDuration() << "\n"; } return msg.str(); } double MSDevice_Tripinfo::getAvgRouteLength() { if (myVehicleCount > 0) { return myTotalRouteLength / myVehicleCount; } else { return 0; } } double MSDevice_Tripinfo::getAvgDuration() { if (myVehicleCount > 0) { return STEPS2TIME(myTotalDuration / myVehicleCount); } else { return 0; } } double MSDevice_Tripinfo::getAvgWaitingTime() { if (myVehicleCount > 0) { return STEPS2TIME(myTotalWaitingTime / myVehicleCount); } else { return 0; } } double MSDevice_Tripinfo::getAvgTimeLoss() { if (myVehicleCount > 0) { return STEPS2TIME(myTotalTimeLoss / myVehicleCount); } else { return 0; } } double MSDevice_Tripinfo::getAvgDepartDelay() { if (myVehicleCount > 0) { return STEPS2TIME(myTotalDepartDelay / myVehicleCount); } else { return 0; } } double MSDevice_Tripinfo::getAvgWalkRouteLength() { if (myWalkCount > 0) { return myTotalWalkRouteLength / myWalkCount; } else { return 0; } } double MSDevice_Tripinfo::getAvgWalkDuration() { if (myWalkCount > 0) { return STEPS2TIME(myTotalWalkDuration / myWalkCount); } else { return 0; } } void MSDevice_Tripinfo::saveState(OutputDevice& out) const { out.openTag(SUMO_TAG_DEVICE); out.writeAttr(SUMO_ATTR_ID, getID()); std::vector<std::string> internals; internals.push_back(myDepartLane); internals.push_back(toString(myDepartPosLat)); internals.push_back(toString(myDepartSpeed)); out.writeAttr(SUMO_ATTR_STATE, toString(internals)); out.closeTag(); } void MSDevice_Tripinfo::loadState(const SUMOSAXAttributes& attrs) { std::istringstream bis(attrs.getString(SUMO_ATTR_STATE)); bis >> myDepartLane; bis >> myDepartPosLat; bis >> myDepartSpeed; } /****************************************************************************/
cpp
Amount = float BenefitName = str Email = str Donor = Email PaymentId = str def isnotemptyinstance(value, type): if not isinstance(value, type): return False # None returns false if isinstance(value, str): return (len(value.strip()) != 0) elif isinstance(value, int): return (value != 0) elif isinstance(value, float): return (value != 0.0) else: raise NotImplementedError
python
<gh_stars>0 [{"id":"2001","provinceId":"12","regencyId":"07","districtId":"07","name":"Aji Baho"},{"id":"2002","provinceId":"12","regencyId":"07","districtId":"07","name":"Biru-biru"},{"id":"2003","provinceId":"12","regencyId":"07","districtId":"07","name":"Candi Rejo"},{"id":"2004","provinceId":"12","regencyId":"07","districtId":"07","name":"Kuta Mulyo"},{"id":"2005","provinceId":"12","regencyId":"07","districtId":"07","name":"Kuala Dekah"},{"id":"2006","provinceId":"12","regencyId":"07","districtId":"07","name":"Mbaruai"},{"id":"2007","provinceId":"12","regencyId":"07","districtId":"07","name":"Mardinding Julu"},{"id":"2008","provinceId":"12","regencyId":"07","districtId":"07","name":"Namo Suro Baru"},{"id":"2009","provinceId":"12","regencyId":"07","districtId":"07","name":"Peria-ria"},{"id":"2010","provinceId":"12","regencyId":"07","districtId":"07","name":"Penen"},{"id":"2011","provinceId":"12","regencyId":"07","districtId":"07","name":"Rumah Gerat"},{"id":"2012","provinceId":"12","regencyId":"07","districtId":"07","name":"Sidodadi"},{"id":"2013","provinceId":"12","regencyId":"07","districtId":"07","name":"Sidomulyo"},{"id":"2014","provinceId":"12","regencyId":"07","districtId":"07","name":"Selamat"},{"id":"2015","provinceId":"12","regencyId":"07","districtId":"07","name":"Sarilaba Jahe"},{"id":"2016","provinceId":"12","regencyId":"07","districtId":"07","name":"<NAME>"},{"id":"2017","provinceId":"12","regencyId":"07","districtId":"07","name":"<NAME>"}]
json
I was on ebay to buy an item.But the problem is that it is asking for my card no.,verification code and expiry date.I have a State Bank Cash Debit card which is of Maestro and it doesnt have any verification code printed on it.Also the validity of that card is unlimited and so what should i type in the expiry date field?
english
A shocking video of two little girls dropped over a border barrier in New Mexico is fueling criticism of the Biden administration’s handling of the crisis at the southern border -- with critics saying the administration is encouraging smugglers and illegal immigrants. The video, released by El Paso Sector Chief Patrol Agent Gloria Chavez on Wednesday, shows what she said was two smugglers scaling the fence and dropping each child, a 5-year-old and a 3-year-old, onto the ground and harsh surface, before tossing what appears to be some belongings down. The two smugglers then are seen fleeing from the southern side of the fence. Chavez said the little girls were left "miles from the nearest residence. " They were picked up by agents after they were spotted via surveillance technology. "I was really horrified and appalled and worried when I first saw the images come through from my staff," Chavez told 'Your World' host Neil Cavuto. "When I saw that first child dropped to the ground and then not see her move for a few seconds, I honestly thought this child just probably hit her head and is unconscious. And then I see the second child and immediately DHS, obviously, within a few minutes responded to that area to rescue them. " The video quickly caused outrage at the smugglers who dumped the sisters down the fence, but it has also increased criticism of the Biden administration’s handling of the crisis. "The reason why we’re seeing the Biden border crisis is because Joe Biden said to the world, if you’re a kid or teenager or you purport to be a teeenager or you show up with a kid, we’ll let you into our country -- what did he expect would happen? " Sen. Tom Cotton, R-Ark. , said on "America’s Newsroom. " "There’s nothing virtuous or moral about inducing hundreds of thousands of migrants to make the journey, sometimes very dangerous, to our country even when they don’t have a legal right to be here," he said. Cotton’s comments came as multiple outlets, including Fox News, reported that Customs and Border Protection (CBP) is on pace to have encountered more than 171,000 migrants in March -- a significant increase from January and February and a sign that the migrant surge at the border is not slowing down. Earlier Friday, Fox confirmed that CBP is projecting that as many as 184,000 unaccompanied children could reach the border this fiscal year. The Biden administration has refused to call the increase in numbers a crisis, although it has admitted it is a "challenge" and has blamed the Trump administration for dismantling legal pathways for asylum. White House Press Secretary Jen Psaki on Thursday said the administration is focused on sending a "clear message" to migrants. "That this is not the time to come. You should not send your kids on this treacherous journey," she said. "That these smugglers are preying on vulnerabilities in these communities. There’s a lot of issues and steps we need to take to address root causes. " However, Mark Morgan, acting CBP commissioner during the Trump administration, told Fox News the picture of the two little girls suggests that the Biden administration is sending the wrong message to people south of the border. "It represents that now Moms and Dads are saying ‘It’s worth it, it’s worth it to hand my child over to the cartels and risking their lives, I’m going to intentionally separate my child from myself and hand them over to the smugglers and the traffickers because this administration will let them in," he said. Morgan cited the Biden administration’s decision not to apply Title 42 public health protections, which allow the quick removal of single adults and some migrant families, to unaccompanied children (UACs), as the Trump administration sought to do. "Smugglers saw that as their opening and that's what drove the UAC numbers right now," he said. He said that until that move, as well as other long-standing laws -- like a 2008 human trafficking law that limits the U. S. ability to return unaccompanied children to Northern Triangle countries -- are fixed, messages from the Biden administration telling migrants not to come would fall on deaf ears. "They continue to lie and spin and misdirect what actually happens and actually factually happens in the minds of these individuals, and what happens with the cartels that's motivating everybody -- that’s the truth," he said. Texas Gov. Greg Abbott on Thursday linked Biden’s policies to the increase in numbers, saying that "open border policies have created an open season for human traffickers, for drug smugglers, for cartels and gangs. " "The most evil, heartless, vicious people in the entire Western Hemisphere are the people in the Mexican drug cartels that control the human smuggling over our Southern Border," he tweeted. "The ‘Biden effect’ is a bonanza for them, not so much for everyone else. " Republicans like Sen. Cotton have called on Biden to extend Title 42 to unaccompanied children and reinstate Trump-era policies like the Migrant Protection Protocols (MPP), which kept migrants in Mexico and the Biden administration abolished after entering office. Morgan was very clear about what he believed the solution is to the woes at the border. "We should be securing the border, shutting down illegal immigration, because then we're taking billions of dollars out of the hands of cartels, of human smuggling organizations, we’re going to reduce human suffering, reduce human trafficking and reduce the abuse of the vulnerable population looking for a better life," he said. "If you really care about them, you’ll shut that sh-- down," he said. Fox News' Griff Jenkins and Samuel Chamberlain contributed to this report.
english
<filename>vulnerabilities/69fc18e2-4591-11e9-9173-0800277f0571_NL.json<gh_stars>1-10 {"code": "483", "description": "", "label": "De veiligheidsverantwoordelijkheden betreffende het beheer van de bevoegdheden zijn niet geformaliseerd", "language": "NL", "uuid": "69fc18e2-4591-11e9-9173-0800277f0571"}
json
Feedback (2) Factory Cheap Hot Surgical Instrument Basic - Orthopedic Implant Spinal Pedicle Screw Fixation System – XC Medico Detail: 2.Colorful Design–Different color corresponds to different diameter. Doctors can pick the right screw up very easily during the operation. 3.6.0/5.5 mm rods provide long-term stability and maintain deformity correction. 4.The surface is oxidized and has longer service life. 5.Low-profile and high biocompatibility design minimize anatomical interference. 6.The integral forming process makes sure there’s no error. 7.Two series: 5.5 mm system & 6.0 mm system for choose. 6.0 mm system: widely-used around the world. Rounded tip with quick initial grip and for safe bicortical placement. 5.5 mm system: double-threaded–cortical thread and cancellous thread, make the product more in line with the anatomical principle of pedicle and thoracolumbar spine. 8.Could customize the specifications. 9.OEM & ODM available. 10.Matched instrument set available. Spinal internal fixation system is suitable for thoracolumbar posterior internal fixation in orthopedic spine surgery. The specific indications include: severe spondylolisthesis (grade 3 and 4) and autogenous bone graft fusion; degenerative spondylolisthesis with neurological deficit objective signs (fracture; dislocation; scoliosis; kyphosis; spinal tumor) and fusion failure (pseudarthrosis); non cervical degenerative disc disease (discogenic low back pain), lumbar spondylolisthesis (fracture and / or dislocation), Spinal stenosis (scoliosis, lordosis and / or kyphosis). Product detail pictures: Related Product Guide: Using a complete scientific high quality management program, superior high quality and superior faith, we acquire great reputation and occupied this industry for Factory Cheap Hot Surgical Instrument Basic - Orthopedic Implant Spinal Pedicle Screw Fixation System – XC Medico, The product will supply to all over the world, such as: Russia, Mexico, Jordan, Honest to every customers are our requested! First-class serve, best quality, best price and fastest delivery date is our advantage! Give every customers good serve is our tenet! This makes our company get the favour of customers and support! Welcome all over the world customers send us enquiry and looking forward your good co-operation !Please your inquiry for more details or request for dealership in selected regions. This is a very professional and honest Chinese supplier, from now on we fell in love with the Chinese manufacturing.
english
New details have dropped for World of Warcraft's next big patch, and it looks like developer Blizzard Entertainment has some ambitious plans for this next phase in developing one of the best MMO games of all time. In a blog post on the Blizzard website, the developer shone a spotlight on five new features, which will be coming in patch 10.2.5, also known as Seeds of Renewal. Perhaps the most exciting of these is the unlocking of the popular Dragonriding mechanic across the entire game world. For those not in the know, Dragonriding is a twist on the game's traditional traversal mechanics, requiring players to soar and dive as they fly above World of Warcraft's expansive landscapes. Previously limited to the new zones in the Dragon Isles, players will be able to enjoy Dragonriding across "all old-world continents wherever flying is available." The new patch will also introduce the Azerothian Archives, which will allow you to "discover the history of the Dragon Isles[,] meet a unique cast of characters, hear stories of old, and witness the iconography of a time before." This will include solo and group activities alongside a Weekly Public Event and opportunities for new pets, mounts, and armor sets. The Gilneas Reclamation is also underway and will allow players to assist King Greymane in reclaiming the ancestral home of his people. Given how the Gilneans were first chased out of the city back in 2010's Cataclysm expansion, this return has been a long time coming. In much the same vein as acclaimed fantasy MMO Final Fantasy 14, World of Warcraft is also introducing a system in Seeds of Renewal that will allow players to tackle dungeons alongside NPC companions. Called 'Follower Dungeons', this feature "will allow players to learn about Dragonflight dungeons at their own pace and provide the freedom to experiment and customize their party makeup." Last but not least, Seeds of Renewal will be adding new customization options for characters Trolls, Draenei, and Warlock minions. All in all, there's plenty here to keep Warcraft fans happy while we await more news about the recently announced The War Within expansion, as well as the rest of the Worldsoul Saga. Want to save money this Black Friday? Our roundups of the top Black Friday gaming deals and the best Black Friday video game deals will help you get the most from your cash this winter. Get the hottest deals available in your inbox plus news, reviews, opinion, analysis, deals and more from the TechRadar team. Cat Bussell is a Staff Writer at TechRadar Gaming. Hailing from the crooked spires of London, Cat is an experienced writer and journalist. As seen on Wargamer.com, TheGamer.com, and Superjumpmagazine.com, Cat is here to bring you coverage from all corners of the video game world. An inveterate RPG maven and strategy game enjoyer, Cat is known for her love of rich narratives; both story-driven and emergent. Before migrating to the green pastures of games journalism, Cat worked as a political advisor and academic. She has three degrees and has studied and worked at Cambridge University, University College London, and Queen Mary University of London. She's also been an art gallery curator, an ice cream maker, and a cocktail mixologist. This crash course in NPC lifestyles uniquely qualifies her to pick apart only the juiciest video games for your reading pleasure. Cat cut her teeth on MMOs in the heyday of World of Warcraft before giving in to her love of JRPGs and becoming embedded in Final Fantasy XIV. When she's not doing that, you might find her running a tabletop RPG or two, perhaps even voluntarily.
english
{ "Name": "ASh-12 için 12.7x55 şarjör, 20-mermi kapasiteli", "ShortName": "ASh-12", "Description": "12.7x55 ASh-12 için 20-mermilik şarjör." }
json
<filename>src/functions/index.js<gh_stars>100-1000 import React from 'react'; import * as PkgTextAreaAutosize from 'react-textarea-autosize'; import * as DraftJs from 'draft-js'; import * as draftToHtml from 'draftjs-to-html'; import { Editor } from 'react-draft-wysiwyg'; import ID from '../UUID'; const generateUUID = () => ID.uuid(); const TextAreaAutosize = (props) => <PkgTextAreaAutosize {...props} />; export { generateUUID, TextAreaAutosize, DraftJs, draftToHtml, Editor, };
javascript
<reponame>rxmicro/rxmicro<filename>rxmicro-common/src/main/java/io/rxmicro/common/util/GeneratedClassRules.java /* * Copyright (c) 2020. https://rxmicro.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * 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. */ package io.rxmicro.common.util; /** * Defines the rules for generated classes by the {@code RxMicro Annotation Processor}. * * @author nedis * @since 0.1 */ @SuppressWarnings("JavaDoc") public final class GeneratedClassRules { /** * Each generated class by the {@code RxMicro Annotation Processor} starts with {@value #GENERATED_CLASS_NAME_PREFIX} prefix. * * <p> * This prefix allow differing generated class from the class written by human. */ public static final String GENERATED_CLASS_NAME_PREFIX = "$$"; /** * For the injected primitive parameters to the HTTP request handler methods the {@code RxMicro Annotation Processor} * generates virtual classes. * * <p> * These classes contain sub prefix: {@value #GENERATED_VIRTUAL_CLASS_SUB_PREFIX} */ public static final String GENERATED_VIRTUAL_CLASS_SUB_PREFIX = "Virtual"; /** * Returns {@code true} if the tested class is generated by the {@code RxMicro Annotation Processor}. * * @param clazz the tested class * @return {@code true} if the tested class is generated by the {@code RxMicro Annotation Processor} */ public static boolean isGeneratedClass(final Class<?> clazz) { return clazz.getSimpleName().startsWith(GENERATED_CLASS_NAME_PREFIX); } private GeneratedClassRules() { } }
java
<gh_stars>1-10 {"pos":"proper","translits":{"ham·miṣ·pāh":{"1sa.7.11|4":["from","Mizpah、","and pursued"],"1sa.7.12|6":["between","Mizpah","and"],"1sa.10.17|6":["Yahweh","at Mizpah–",null],"1ki.15.22|24":["and","Mizpah.",null],"jdg.20.1|15":["Yahweh","at Mizpah.",null],"jdg.20.3|7":["of Israel","to Mizpah","and said"],"jdg.11.34|2":["Jephthah","at Mizpah","to"],"jdg.21.8|10":["Yahweh","to Mizpah","and in fact、"],"jdg.21.5|22":["Yahweh","at Mizpah、","saying、"],"neh.3.19|7":["the leader","of Mizpah、","section"],"neh.3.15|9":["of the district","of Mizpah–","he"],"jos.11.3|12":["in the land","of Mizpah.",null],"jer.41.16|20":["from","Mizpah、","after"],"jer.41.6|6":["from","Mizpah","as"],"jer.41.14|7":["from","Mizpah","and came back、"],"2ki.25.23|15":["Gedaliah","at Mizpah、","and Ishmael"],"2ch.16.6|19":["and","Mizpah.",null]},"wə·ham·miṣ·pāh":{"1sa.7.16|7":["and Gilgal、","and Mizpah、","and judged"],"neh.3.7|9":["of Gibeon、","and Mizpah、","the residence"],"gen.31.49|0":[null,"and also Mizpah、","because"]},"bam·miṣ·pāh":{"1sa.7.6|19":["of Israel","at Mizpah.",null],"jdg.11.11|18":["Yahweh","in Mizpah.",null],"jdg.10.17|9":["and encamped","in Mizpah.",null],"jdg.21.1|3":["had sworn an oath","at Mizpah、","saying、"],"jer.41.1|25":["together","in Mizpah.",null],"jer.41.10|7":["who [were]","in Mizpah、","-"],"jer.41.10|15":["who remained","in Mizpah、","whom"],"jer.41.3|8":["Gedaliah、","at Mizpah、","and"],"jer.40.10|3":["will dwell","at Mizpah","and serve"],"jer.40.15|7":["secretly、","in Mizpah","saying、"],"2ki.25.25|25":["with him","at Mizpah.",null]},"lə·miṣ·pāh":{"hos.5.1|14":["you have been","to Mizpah、","and a net"]}},"meanings":{"mizpah":32},"meaningsCount":1,"occurences":32}
json
<reponame>CSBP-CPSE/lode-viewer-dev Facility_Name,Index,ODCAF_Facility_Type,Street_No,Street_Name,Postal_Code,City,Prov_Terr Bibliothèque De Bouchette,1050,library or archives,47,rue principale,J0X 1E0,saint-clement,qc
json
<filename>src/components/QuizResult.js import { number, string } from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { View, StyleSheet, Platform } from 'react-native'; import { Text } from 'react-native-elements'; import AnimateNumber from 'react-native-animate-number'; import Button from './Button'; import StartQuizButton from './StartQuizButton'; import { silverColor, neutreLightColor, lightColor, primaryColor, negativeColor, darkGreen } from '../utils/colors'; import { SCREENS } from '../utils/screens'; import { score as calculateScore } from '../utils/helpers'; import navHeader from '../utils/navHeader'; import { Ionicons } from '@expo/vector-icons'; class QuizResult extends Component { static propTypes = { deck: string.isRequired, correctAnswer: number.isRequired, wrongAnswer: number.isRequired }; get score() { return calculateScore(this.props.correctAnswer, this.props.wrongAnswer); } scoreFormatter = score => { const percent = score === this.score && parseInt(score, 10) === parseFloat(score) ? this.score : parseFloat(score).toFixed(2); return `${percent} %`; }; renderBody() { const { correctAnswer, worngAnswer, deck, navigation } = this.props; return ( <View style={styles.container}> <View style={{ flex: 1, justifyContent: 'center' }}> <Text style={{ color: correctAnswer < worngAnswer ? negativeColor : primaryColor }} h1 > <AnimateNumber value={this.score} formatter={this.scoreFormatter} /> </Text> </View> {this.score >= 50 && <View style={{ flex: 1, alignItems: 'center' }}> <Ionicons name={Platform.OS === 'ios' ? 'ios-happy-outline' : 'md-happy'} size={100} /> <Text style={styles.notification}> Woow! Congratulations you passed your quiz on "{deck}" deck. </Text> </View>} {this.score < 50 && <View style={{ flex: 1, alignItems: 'center' }}> <Ionicons name={Platform.OS === 'ios' ? 'ios-sad-outline' : 'md-sad'} size={100} /> <Text style={styles.notification}> Oh! Sorry you need to repeat your quiz on "{deck}" deck. </Text> <StartQuizButton title="Restart quiz" deck={deck} navigate={navigation.navigate} /> </View>} <View style={{ flex: 1, justifyContent: 'flex-end' }}> <Button onPress={() => navigation.navigate(SCREENS.DECK_BOARD, { deck })} backgroundColor={lightColor} color={primaryColor} containerViewStyle={{ marginBottom: Platform.OS === 'ios' ? 20 : 0 }} title={`${deck.toUpperCase()} DECK`} icon={{ type: 'ionicon', name: Platform.OS === 'ios' ? 'ios-home' : 'md-home', color: primaryColor }} /> </View> </View> ); } render() { const { correctAnswer, wrongAnswer } = this.props; return ( <View style={styles.container}> <View style={styles.header}> <Text style={styles.headerText} h2> Quiz Results for {this.props.deck} </Text> </View> <View style={styles.cardsContainer}> {this.renderBody()} </View> <Notes correctAnswer={correctAnswer} wrongAnswer={wrongAnswer} /> </View> ); } } function Notes({ correctAnswer, wrongAnswer }) { return ( <View style={styles.notes}> <View style={[ styles.container, styles.note, { backgroundColor: negativeColor } ]} > <Text style={styles.notesText}>Worng Answer</Text> <Text style={styles.notesText} h1> {wrongAnswer} </Text> </View> <View style={[ styles.container, styles.note, { backgroundColor: darkGreen } ]} > <Text style={styles.notesText}>Correct Answer</Text> <Text style={styles.notesText} h1> {correctAnswer} </Text> </View> </View> ); } const styles = StyleSheet.create({ header: { flex: 1, alignItems: 'center', justifyContent: 'center' }, headerText: { textAlign: 'center', padding: 20 }, container: { flex: 1, flexDirection: 'column', justifyContent: 'space-around', alignItems: 'center' }, cardsContainer: { flex: 4, backgroundColor: neutreLightColor, padding: 10, alignSelf: 'stretch' }, notes: { flex: 1, flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'space-around', alignSelf: 'stretch', padding: 2 }, note: { backgroundColor: neutreLightColor, margin: 10 }, notesText: { color: lightColor }, notesImageContainer: { flex: 1, flexDirection: 'row', backgroundColor: 'rgba(0,0,0,.6)' }, notesImage: { flex: 1, width: null, height: null }, notification: { color: silverColor, textAlign: 'center', padding: 13 } }); function mapStateToProps(state, ownProps) { return ownProps.navigation.state.params; } function mapNavOptions({ navigation: { navigate, state: { params } } }) { return { headerTitle: 'Results', headerLeft: null }; } export default navHeader(mapNavOptions)( connect(mapStateToProps)(QuizResult) );
javascript
package qub; public class GitHubUser extends JSONObjectWrapperBase { private static final String loginPropertyName = "login"; protected GitHubUser(JSONObject json) { super(json); } public static GitHubUser create() { return GitHubUser.create(JSONObject.create()); } public static GitHubUser create(JSONObject json) { return new GitHubUser(json); } /** * Get the login associated with this user. * @return The login associated with this user. */ public String getLogin() { return this.toJson().getString(GitHubUser.loginPropertyName) .catchError() .await(); } /** * Set the login associated with this user. * @param login The login associated with this user. * @return This object for method chaining. */ public GitHubUser setLogin(String login) { PreCondition.assertNotNullAndNotEmpty(login, "login"); this.toJson().setString(GitHubUser.loginPropertyName, login); return this; } }
java
The St. Louis Blues head to Philadelphia to take on the Philadelphia Flyers for their eleventh game of the season on Tuesday. St. Louis come into this one on a seven-game losing streak; they have been absolutely terrible. Every game the Blues have lost in this stretch were by two goals or more -- they haven't even been competitive. After a hot start to the season, the Flyers have cooled off, losing four of their last six, and those two weren't impressive either. Philly beat a lowly Ottowa team and a struggling Florida team. Both teams will be looking to get right in this game. Ryan O'Reilly needs to get going for St. Louis to get back on track. He is the lifeblood of this team's offense, and they cannot play well if he's not playing well. Bettors can expect him to get a few shots off to try and turn things around for St. Louis. Ryan O'Reilly Over 2.5 Shots on Goal (+126) Defenseman Justin Faulk is a guy who can produce offense. This team needs to try a few different things if they want to pick up a win. Faulk ripping some shots from the blue line may be a way to change things up. A few shots from Faulk should be guaranteed tonight. Justin Faulk Over 2.5 Shots on Goal (+100) This game could easily go either way, and one of these teams will break out of their funk. While Philadelphia is certainly the better team on paper, St. Louis desperately needs a win. St. Louis have the privilege of playing this struggling Philly team; they need to turn things around and see if they can start a winning streak of their own. However, Carter Hart is in net for Philly, and although he has yet to lose in regulation this season, he has two overtime losses. This man is a brick wall, and he should take care of business for the home club.
english
{ "type": "service_account", "project_id": "shashi-339605", "private_key_id": "80f9ac43a2edc18ec643f9feaef177bf1bec857f", "private_key": "-----<KEY>", "client_email": "<EMAIL>", "client_id": "110250881037152832271", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/mfc-kp1fmn8rpmiy6ek7ht0cpg9bc4%40shashi-339605.iam.gserviceaccount.com" }
json
<filename>articles/012-object-spread.md Here's the setup: you have an object and you want to assign a new property on that object to some value. Here's the vanilla JS way to go about it: ```js function setBar(obj) { obj.bar = 'bar'; return obj; } var obj = { foo: 'foo' }; setBar(obj); // { // foo: 'foo', // bar: 'bar', // } ``` This isn't perfect though, as it's best practice for functions to have no side effects; when you call a function, it should do what it explicitly states that it does and _nothing else_. In JS, objects are passed by reference, so when you call a function with an object as a parameter, you're just passing a reference to that object to the function - this means that any modifications you make to the object from within the function will modify the original object, which can lead to some unintended consequences down the road. ```js function setBar(obj) { obj.bar = 'bar'; return obj; } var obj = { foo: 'foo' }; setBar(obj); // obj.bar === 'bar' ``` ## Avoiding Side Effects If we want to avoid this, we need to create a _copy_ of the object parameter(s) inside the function body and return that instead of mutating the argument object directly. The modern JS spec has introduced `Object.assign` to assist with this process: ```js function setBar(obj) { const copy = Object.assign({}, obj); copy.bar = 'bar'; return copy; } var obj = { foo: 'foo' }; var newObj = setBar(obj); // newObj.bar === 'bar' // obj.bar === undefined ``` Object assignment enumerates over all the instance properties of each argument in sequence and applies them to the first argument (if you aren't assigning to an existing object, just pass an empty object `{}` as the first argument). ```js const obj = { foo: 'foo' }; const mod = Object.assign({}, obj); // { foo: 'foo' } console.log(obj === mod); // false (mod is a new instance) Object.assign({}, { foo: 'foo' }, { bar: 'bar' }, { baz: 'baz' }); // { // foo: 'foo', // bar: 'bar', // baz: 'baz', // } // properties later in sequence will overwrite previous argument properties Object.assign({}, { foo: 'foo' }, { foo: 'bar' }); // { // foo: 'bar', // } ``` ## ES Object Spread Operator ECMAScript introduces the object spread operator `...` to allow for enumerating over an object's properties inline. There are a few different ways to make use of it, from simple to a bit more complex. ### Shallow Copy It may be used to create a **shallow copy** of an object a la `Object.assign`: ```js const obj = { foo: 'foo' }; const mod = { ...obj }; ``` A shallow copy will duplicate an object's values by reference, which means that mutating object values on a copy will still mutate the original object's properties as well: ```js const obj = { foo: { bar: 'bar' } }; const mod = { ...obj }; console.log(obj.foo.bar); // bar mod.foo.bar = 'foo'; console.log(obj.foo.bar); // foo ``` If you want to instead create a completely independent copy of an object, you'll need to perform a **deep copy**, which you can either perform yourself or pull from a package such as [deep-copy](https://www.npmjs.com/package/deep-copy). ### Inline Array Map We can utilize the object spread operator to write a very minimal array mapping (when returning an object from an arrow function, make sure to wrap the object in parentheses to assert that it's not a function body like `() => ({})`): ```js const users = [ { id: 1, first: 'Jane', last: 'Doe' }, { id: 2, first: 'John', last: 'Doe' }, { id: 3, first: 'Foo', last: 'Bar' }, ]; console.log( users.map(user => ({ ...user, name: `${user.first} ${user.last}`, })), ); // [ // { id: 1, first: 'Jane', last: 'Doe', name: '<NAME>' }, // { id: 2, first: 'John', last: 'Doe', name: '<NAME>' }, // { id: 3, first: 'Foo', last: 'Bar', name: 'Foo Bar' }, // ]; ``` ### Variable Key Assignment Varible key assignment allows setting an object property value inline. Traditionally this couldn't be accomplished inline and required using string-indexed array access syntax: #### Traditional Method ```js // traditional method const three = 3; const calc = {}; calc[parseInt('1')] = 'one'; calc[1 + 1] = 'two'; calc[three] = 'three'; // calc === { // 1: 'one', // 2: 'two', // 3: 'three', // } ``` #### ES Method ```js // ES method const three = 3; const calc = { [parseInt('1')]: 'one', [1 + 1]: 'two', [three]: 'three', }; // calc === { // 1: 'one', // 2: 'two', // 3: 'three', // } ``` By combining object spread and variable key assignment, we can create very powerful mapping functions in just a few lines (you'll recognize `keyBy` from the previous article about [Reducers](/articles/reducers)): ```js function keyBy(arr, key) { return arr.reduce( (map, obj) => ({ ...map, [obj[key]]: obj, }), {}, ); } const users = [{ id: 1, name: '<NAME>' }, { id: 2, name: '<NAME>' }]; keyBy(users, 'id'); // { // 1: { id: 1, name: '<NAME>' }, // 2: { id: 2, name: '<NAME>' }, // } ``` ### Guarded / Conditional Key Assignment Occasionally we want to assign one or more properties if a condition is true, or optionally a different one or more properties if the condition is false. Let's look at the traditional and ES methods of accomplishing this: #### Traditional Method ```js const obj = {}; // guarded assignment if (someCondition) { obj.foo = 'foo'; } // conditional assignment if (anotherCondition) { obj.bar = 'bar'; } else { obj.quz = 'quz'; } ``` #### ES Method ```js // guarded assignment const obj = { ...(someCondition && { foo: 'foo', }), }; // conditional assignment const obj = { ...(anotherCondition ? { bar: 'bar', } : { quz: 'quz', }), }; ``` ## Conclusion Object spread assignment is a great tool for expressing routine assignment logic in an idiomatic and concise way. Tomorrow we'll look at the other use case for `...`, the parameter spread operator.
markdown
<gh_stars>1-10 {"resourceType":"ValueSet","id":"UKCore-AllergyExposureRoute","url":"https://fhir.nhs.uk/R4/ValueSet/UKCore-AllergyExposureRoute","version":"1.0.0","name":"UKCoreAllergyExposureRoute","title":"UK Core Allergy Exposure Route","status":"draft","date":"2019-11-05T00:00:00+00:00","publisher":"HL7 UK","contact":[{"name":"HL7 UK","telecom":[{"system":"email","value":"<EMAIL>","use":"work","rank":1}]},{"name":"NHS Digital","telecom":[{"system":"email","value":"<EMAIL>","use":"work","rank":2}]}],"description":"A code from the SNOMED Clinical Terminology UK coding system that describes the e-Prescribing route of administration. Any code from the SNOMED CT UK 'NHS e-Prescribing route of administration subset' with subset original id 30201000001137; the corresponding SNOMED CT UK Refset FSN is 'ePrescribing route of administration simple reference set (foundation metadata concept)' with Refset Id 999000051000001100.","copyright":"Copyright © 2020 HL7 UK Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 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. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at https://www.hl7.org/fhir/license.html.","compose":{"include":[{"system":"http://snomed.info/sct","filter":[{"property":"constraint","op":"=","value":"^999000051000001100 |ePrescribing route of administration simple reference set|"}]}]}}
json
import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; const NodeStateBar = ({ barWidth, fillColor, percentText, x, textX, textY, barX, barY, height, width, onDoubleClick, }) => ( <Fragment> <rect x={barX} y={barY} height={height} width={barWidth} fill={fillColor} /> <text x={textX} y={textY} height={height} fontSize="14px" alignmentBaseline="rigth" stroke="black" strokeWidth="1.1" > {percentText} </text> <rect x={x} y={barY} height={height} width={width} fill="transparent" stroke="#333" strokeWidth="1" onDoubleClick={onDoubleClick} > <title> {percentText} </title> </rect> </Fragment> ); NodeStateBar.propTypes = { barWidth: PropTypes.number.isRequired, fillColor: PropTypes.string.isRequired, percentText: PropTypes.string.isRequired, textX: PropTypes.number.isRequired, textY: PropTypes.number.isRequired, barX: PropTypes.number.isRequired, barY: PropTypes.number.isRequired, x: PropTypes.number.isRequired, height: PropTypes.number.isRequired, width: PropTypes.number.isRequired, onDoubleClick: PropTypes.func.isRequired, }; export default NodeStateBar;
javascript
<reponame>dailc/dd-application-template<gh_stars>1-10 { "pluginComponentName": "插件中导出的组件英文名,例如 component-template", "name": "组件模板", "icon": "组件的icon地址", "previewUrl": "组件的预览图CDN地址", "previewHeight": 100, "setters": [{ "propName": "marginBottom", "setterName": "SliderSetter", "props": { "label": "下间距", "min": 0, "max": 32 } }, { "propName": "gateWayApi", "setterName": "SelectApiSetter", "props": { "label": "数据来源" } }], "props": { "marginBottom": 0, "gateWayApi": {} } }
json
<reponame>recoveryrecord/SurveyAndroid<filename>surveyandroid/src/main/java/com/recoveryrecord/surveyandroid/question/QuestionsWrapper.java package com.recoveryrecord.surveyandroid.question; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.ArrayList; @JsonIgnoreProperties(ignoreUnknown = true) public class QuestionsWrapper { public ArrayList<Question> questions; public SubmitData submit; public static class SubmitData { @JsonProperty("button_title") public String buttonTitle; public String url; } }
java
Why this website? Who owns the Media? What is the value of a book that will be outdated before you can say Nokia? India’s coverage of ‘international’ news needs to go beyond North America, Europe and the Middle East. In-depth, comprehensive reporting on international issues is needed. It can be argued, cynically perhaps, that this was not really an exclusively Asian tragedy at all, hence the intense coverage. Where have all the science writers gone? Hardly a handful of major newspapers in India have weekly pages or sections devoted to science. From across the border, science writers in Pakistan seem to have similar experiences. Media imagination ran riot from the day she was sentenced. What escaped the media in its frenzy was the issue of proportionality. After the media overkill of the hanging of Dhananjoy Chatterjee, which spurred a rash of play time hangings by children in West Bengal, popular folk opera plans to exploit the story. It is precisely this increasingly advertisement-driven and commercialised media that must also play a crucial role if global attempts to defeat AIDS are to succeed. The exit polls on the average have given 68 more seats to NDA than it got and consequently 36 seats less to Congress and 32 seats less to Others.
english
Free Fire Incubator is one of the more popular methods by which players can get special bundles. Mobile gamers have to spin the Incubator wheel using diamonds and hope to get lucky. Players require 40 diamonds to spin the wheel once and 180 diamonds to spin the wheel five times. These spins will give players Blueprints and Evolution Stone Tokens that they can convert to get Incubator bundles. The following are the best incubator bundles for Free Fire right now. This is one of the most common Incubator bundles in Free Fire. There are four criminals, Yellow, Red, Blue and Green; Green is one of the rarest bundles available. The Green Criminal bundle was re-introduced as a part of the 4th-anniversary update celebrations. Dino Rangers are one of the rarest bundles in Free Fire and one of the first to be introduced in the game. There are six Dino bundles available, and each of them has to be equipped as a complete set. Players needed seven Evolution Stones and three Dino Blueprints to get one Dino. Players can get three tattoo bundles in this Incubator bundle that was introduced a long time back. There was a total of three costumes, each for male and female. The bundle is rare and one of the most extraordinary bundles a player can acquire in Free Fire. This is one of the rare horror-themed Incubator bundles in the game. Players will find similarities between the clown in the famous horror movie IT with the Jestor Manor bundle. There are three types of creepy costumes that players can buy – Red, Gold, and Black. There are six bundles that players can win via this Incubator bundle set. These are the Star Crystal bundle, Star’s Core bundle, Silvery Beast bundle, Pure White bundle, Star Beast bundle, and Inner Galaxy bundle. Players will need to accumulate Evolution Stone and Blueprint: Galaxy to buy the Galaxy Trooper set. Disclaimer: This article reflects the opinion of the writer. Check out the latest Free Fire MAX redeem codes here.
english
--- title: What's new in .NET Core 3.0 description: Dowiedz się więcej o nowych funkcjach w programie .NET Core 3.0. dev_langs: - csharp - vb author: thraka ms.author: adegeo ms.date: 12/04/2018 ms.openlocfilehash: 3ca833031eb8bb0f43a334f833f2e0075842d57d ms.sourcegitcommit: ccd8c36b0d74d99291d41aceb14cf98d74dc9d2b ms.translationtype: MT ms.contentlocale: pl-PL ms.lasthandoff: 12/10/2018 ms.locfileid: "53155481" --- # <a name="whats-new-in-net-core-30-preview-1"></a>What's new in .NET Core 3.0 (wersja zapoznawcza 1) W tym artykule opisano nowości w programie .NET Core 3.0 (wersja zapoznawcza 1). Jedną z największych ulepszenia to obsługa aplikacji klasycznych Windows (tylko Windows). Przy użyciu platformy .NET Core 3.0 to składnik o nazwie Windows Desktop, można przenosić aplikacje Windows Forms Windows Presentation Foundation (WPF). Aby być niejasne, składnik Windows Desktop jest obsługiwana tylko na Windows. Aby uzyskać więcej informacji, zobacz sekcję [pulpitu Windows](#windows-desktop) poniżej. .NET core 3.0 dodaje obsługę C# 8.0. [Pobierz i rozpoczynanie pracy z usługą .NET Core 3 (wersja zapoznawcza) 1](https://aka.ms/netcore3download) teraz na Windows, Mac i Linux. Można wyświetlić szczegółowe informacje o wersji w [informacje o wersji platformy .NET Core 3 (wersja zapoznawcza) 1](https://aka.ms/netcore3releasenotes). Aby uzyskać więcej informacji, zobacz [ogłoszenie .NET Core 3.0 w wersji zapoznawczej 1](https://blogs.msdn.microsoft.com/dotnet/2018/12/04/announcing-net-core-3-preview-1-and-open-sourcing-windows-desktop-frameworks/). ## <a name="net-standard-21"></a>.NET standard 2.1 .NET core 3.0 implementuje platformy .NET Standard 2.1. ## <a name="default-executables"></a>Domyślne pliki wykonywalne .NET core będzie teraz tworzyć pliki wykonywalne domyślnie. Jest to nowość w aplikacji, które używają globalnie zainstalowaną wersję platformy .NET Core. Do tej pory tylko [niezależna wdrożeń](../deploying/index.md#self-contained-deployments-scd) miał plików wykonywalnych. Podczas `dotnet build` lub `dotnet publish`, plik wykonywalny jest tworzony, pod warunkiem, które odpowiadają środowisko i platforma używasz zestawu SDK. Mogą spodziewać się tego samego rzeczy, korzystając z tych plików wykonywalnych, tak jak w innych natywnych plików wykonywalnych, takich jak: * Możesz kliknąć dwukrotnie plik wykonywalny. * Można uruchomić aplikacji z poziomu wiersza polecenia, takie jak `myapp.exe` na Windows, i `./myapp` w systemie Linux i macOS. > [!NOTE] > Określanie określonego środowiska uruchomieniowego za pomocą `dotnet publish -r` lub `dotnet build -r` argumentów w innych środowiskach środowisko uruchomieniowe nie jest obsługiwane. ## <a name="build-copies-dependencies"></a>Kopiuje zależności kompilacji `dotnet build` teraz kopiuje zależności NuGet dla aplikacji z pamięcią podręczną programu NuGet do folderu wyjściowego kompilacji. Wcześniej zależności zostały skopiowane tylko jako część `dotnet publish`. Istnieją pewne operacje takie jak łączenie i razor strony publikowania, który nadal będzie wymagać publikowania. ## <a name="local-dotnet-tools"></a>Narzędzia do lokalnego dotnet .NET Core 2.1 obsługiwana globalnego narzędzia, .NET Core 3.0 to ma teraz lokalne narzędzia. Lokalne narzędzia są podobne do narzędzia globalnych, ale są skojarzone z określonej lokalizacji na dysku. Dzięki temu projektów i narzędzi na repozytorium. Wszystkie zainstalowane lokalnie narzędzie nie jest globalnie dostępna. Lokalne narzędzia opierają się na nazwę pliku manifestu `dotnet-tools.json` w bieżącym katalogu. Ten plik manifestu definiuje narzędzia, które mają być dostępne. Ten plik manifestu są tworzone w katalogu głównym repozytorium, możesz upewnij się, każdy klonowania kodu można przywrócić i korzystania z narzędzi, które są niezbędne do pomyślnie pracę z kodem. Po udostępnieniu pliku manifestu lokalne narzędzia, użyj następującego polecenia do automatycznego pobierania i instalowania tych narzędzi lokalnie: ```console dotnet tool restore ``` Uruchom narzędzie lokalnych za pomocą następującego polecenia: ```console dotnet tool run <tool-command-name> ``` Po wywołaniu lokalne narzędzie dotnet wyszukuje manifest się struktury katalogów. W przypadku odnalezienia pliku manifestu narzędzie przeszukiwany jest dla żądanego narzędzia. Jeśli narzędzie zostanie znaleziony, zawiera informacje dotyczące znajdowania narzędzia w lokalizacji globalnymi pakietami NuGet. Jeśli narzędzie zostanie znaleziony w manifeście, ale nie pamięci podręcznej, zostanie wyświetlony błąd. Zostanie on ulepszony komunikat po 1 (wersja zapoznawcza), aby poprosić użytkownika Uruchom `dotnet tool restore`. Dodawanie lokalnych narzędzi do katalogu, należy najpierw utworzyć plik manifestu narzędzia. Po 1 (wersja zapoznawcza) oferujemy mechanizm służący do tworzenia plików manifestu, takie jak nowy szablon dotnet narzędzia. W przypadku 1 (wersja zapoznawcza), musisz utworzyć plik o nazwie `dotnet-tools.json` z następującą zawartością: ```json { "version": 1, "isRoot": true, "tools": {} } ``` Po utworzeniu manifestu, lokalnego narzędzia można dodać do niego przy użyciu: ```console dotnet tool install <toolPackageId> ``` To polecenie instaluje najnowszą wersję narzędzia, chyba że określono inną wersję. Nawet jeśli automatycznie wybrano najnowszą wersję, wersję narzędzia są zapisywane w pliku manifestu narzędzia, aby umożliwić poprawną wersję narzędzia go przywrócić lub uruchom. Plik manifestu narzędzia zaprojektowano w celu Zezwól na edytowanie strony — co może zrobić, aby zaktualizować wersję wymagane do pracy z repozytorium. Oto przykład `dotnet-tools.json` pliku: ```json { "version": 1, "isRoot": true, "tools": { "dotnetsay": { "version": "2.1.4", "commands": [ "dotnetsay" ] }, "t-rex": { "version": "1.0.103", "commands": [ "t-rex" ] } } } ``` Aby usunąć narzędzie z pliku manifestu narzędzia, uruchom następujące polecenie: ```console dotnet tool uninstall <toolPackageId> ``` Globalne i lokalne narzędzi zgodna wersja środowiska uruchomieniowego jest wymagana. Wiele narzędzi, obecnie w witrynie NuGet.org docelowej platformy .NET Core środowiska uruchomieniowego 2.1. Aby zainstalować te globalnie lub lokalnie, czy nadal należy zainstalować [środowisko uruchomieniowe programu NET Core 2.1](https://dotnet.microsoft.com/download/dotnet-core/2.1). Aby uzyskać więcej informacji, zobacz [lokalne narzędzia wczesne dokumentacja w wersji zapoznawczej](https://github.com/dotnet/cli/issues/10288). ## <a name="windows-desktop"></a>Pulpit systemu Windows Począwszy od programu .NET Core 3.0 w wersji zapoznawczej 1, możesz tworzyć aplikacje pulpitu Windows przy użyciu WPF i Windows Forms. Następujące struktury obsługi, za pomocą nowoczesnych kontrolek i Fluent stylów z biblioteki XAML interfejsu użytkownika systemu Windows (WinUI) za pośrednictwem [Wyspy XAML](/windows/uwp/xaml-platform/xaml-host-controls). Składnik Windows Desktop jest częścią Windows zestaw SDK programu .NET Core 3.0. Można utworzyć nowej aplikacji WPF i Windows Forms z następującymi `dotnet` poleceń: ```console dotnet new wpf dotnet new winforms ``` Można również otworzyć, uruchomić i debugowania projektów .NET Core 3.0 WPF i Windows Forms w programie Visual Studio 2019 r w wersji zapoznawczej 1. Obecnie można otwierać te projekty w programie Visual Studio 2017 15.9, jednak nie jest obsługiwanym scenariuszem (i należy [Włącz podglądy](https://blogs.msdn.microsoft.com/dotnet/2018/11/13/net-core-tooling-update-for-visual-studio-2017-version-15-9/)). Nowe projekty są takie same jak istniejących projektów .NET Core z dodatkami kilka. Oto porównanie podstawowy projekt konsoli .NET Core i podstawowy projekt Windows Forms i WPF. W projekcie konsoli .NET Core, projekt korzysta z `Microsoft.NET.Sdk` zestawu SDK ale deklaruje zależności na .NET Core 3.0 to za pośrednictwem `netcoreapp3.0` platformy docelowej. Aby utworzyć aplikację pulpitu Windows, należy użyć `Microsoft.NET.Sdk.WindowsDesktop` zestawu SDK i wybierz polecenie struktury interfejsu użytkownika, których można użyć: ```diff -<Project Sdk="Microsoft.NET.Sdk"> +<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp3.0</TargetFramework> + <UseWPF>true</UseWPF> </PropertyGroup> </Project> ``` Aby wybrać Windows Forms w WPF, należy ustawić `UseWindowsForms` zamiast `UseWPF`: ```diff <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp3.0</TargetFramework> - <UseWPF>true</UseWPF> + <UseWindowsForms>true</UseWindowsForms> </PropertyGroup> </Project> ``` Zarówno `UseWPF` i `UseWindowsForms` można ustawić `true` Jeśli aplikacja korzysta z obu platform, na przykład gdy okno dialogowe Windows Forms jest hosting kontrolki WPF. Podziel się swoją opinię na [dotnet/winforms](https://github.com/dotnet/winforms/issues), [dotnet/wpf](https://github.com/dotnet/wpf/issues) i [dotnet/core](https://github.com/dotnet/core/issues) repozytoriów. ## <a name="fast-built-in-json-support"></a>Szybkie wbudowanej obsługi formatu JSON `System.Text.Json.Utf8JsonReader` jest o wysokiej wydajności, niski alokacji, tylko do przodu czytnik UTF-8 kodowany w formacie JSON tekst odczytywane `ReadOnlySpan<byte>`. `Utf8JsonReader` Jest typem podstawowe, niskiego poziomu, który można wykorzystać do tworzenia niestandardowych analizatory i deserializers. Odczytywanie za pośrednictwem ładunek w formacie JSON za pomocą nowego `Utf8JsonReader` wynosi 2 x szybciej niż przy użyciu czytnika, z [Json.NET](https://www.newtonsoft.com/json). Nie przydziela do czasu konieczne actualize tokenów JSON jako ciągi (UTF-16). Ten nowy interfejs API obejmuje następujące składniki: * W wersji zapoznawczej 1: Czytnik JSON (dostępu sekwencyjnego) * Dodana w następnej kolejności: Moduł zapisujący JSON, modelu DOM (dostępu swobodnego) obiektów poco elementu serializującego obiektów poco Deserializator Oto pętli czytnika podstawowego `Utf8JsonReader` mogą służyć jako punkt początkowy: ```csharp using System.Text.Json; public static void Utf8JsonReaderLoop(ReadOnlySpan<byte> dataUtf8) { var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); while (json.Read()) { JsonTokenType tokenType = json.TokenType; ReadOnlySpan<byte> valueSpan = json.ValueSpan; switch (tokenType) { case JsonTokenType.StartObject: case JsonTokenType.EndObject: break; case JsonTokenType.StartArray: case JsonTokenType.EndArray: break; case JsonTokenType.PropertyName: break; case JsonTokenType.String: string valueString = json.GetStringValue(); break; case JsonTokenType.Number: if (!json.TryGetInt32Value(out int valueInteger)) { throw new FormatException(); } break; case JsonTokenType.True: case JsonTokenType.False: bool valueBool = json.GetBooleanValue(); break; case JsonTokenType.Null: break; default: throw new ArgumentException(); } } dataUtf8 = dataUtf8.Slice((int)json.BytesConsumed); JsonReaderState state = json.CurrentState; } ``` Ekosystemu .NET opierało się na [Json.NET](https://www.newtonsoft.com/json) i innych popularnych bibliotek JSON, które nadal dobrych wyborów. Program JSON.NET używa ciągów .NET jako jego podstawowy datatype kulisy używanej na UTF-16. W programie .NET Core 2.1 i 3.0, dodaliśmy nowe interfejsy API, który sprawia, że można pisać interfejsy API w formacie JSON (takich jak `Utf8JsonReader`) wymagających znacznie mniej pamięci, oparte na użyciu `Span<T>` i ciągi znaków UTF-8 i lepsze potrzebami aplikacji o wysokiej przepływności, takich jak Kestrel, ASP. Serwer sieci web .NET Core. ## <a name="ranges-and-indices"></a>Zakresy i indeksy Nowy `Index` typ może być używany do indeksowania. Można utworzyć jeden z `int` , jest liczona od początku lub z prefiksem `^` — operator (C#), jest liczona od końca: ```csharp Index i1 = 3; // number 3 from beginning Index i2 = ^4; // number 4 from end int[] a = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; Console.WriteLine($"{a[i1]}, {a[i2]}"); // "3, 6" ``` Istnieje również `Range` typ, który składa się z dwóch `Index` wartości, jeden dla początkowego i jeden dla elementu end i mogą być zapisywane z `x..y` zakres wyrażenia (C#). Następnie można zaindeksować z `Range` w celu tworzenia wycinka: ```csharp var slice = a[i1..i2]; // { 3, 4, 5 } ``` > [!NOTE] > Tylko [ C# 8.0](https://blogs.msdn.microsoft.com/dotnet/2018/11/12/building-c-8-0/) obsługuje składnię `Range` i `Index`. ## <a name="async-streams"></a>Asynchroniczne strumienie `IAsyncEnumerable<T>` Typu jest nowa wersja asynchroniczne `IEnumerable<T>`. Język umożliwia `await foreach` za pośrednictwem tych zasobów w celu korzystania z ich elementów i `yield return` do ich do produkcji elementów. Poniższy przykład ilustruje środowiska produkcyjnego i zużycia strumieni asynchronicznych. `foreach` Instrukcja jest asynchroniczne, a sam używa `yield return` do produkcji strumienia asynchronicznego dla obiektów wywołujących. Ten wzorzec (przy użyciu `yield return`) to zalecany model do produkcji strumieni asynchronicznych. ```csharp async IAsyncEnumerable<int> GetBigResultsAsync() { await foreach (var result in GetResultsAsync()) { if (result > 20) yield return result; } } ``` > [!WARNING] > .NET core 3.0 w wersji zapoznawczej 1 ma obecnie usterki, przy użyciu `await foreach`. Zamiast tego należy użyć `GetEnumerator` i `MoveNext` elementy procesu. Aby uzyskać więcej informacji, zobacz [roslyn / #31268](https://github.com/dotnet/roslyn/issues/31268). Oprócz możliwości `await foreach`, można również utworzyć async Iteratory, na przykład iterator, który zwraca `IAsyncEnumerable/IAsyncEnumerator` można zarówno `await` i `yield` w. W przypadku obiektów, które muszą zostać zlikwidowany, można użyć `IAsyncDisposable`, który implementuje różnych typów BCL, takich jak `Stream` i `Timer`. > [!NOTE] > Tylko [ C# 8.0](https://blogs.msdn.microsoft.com/dotnet/2018/11/12/building-c-8-0/) obsługuje `await foreach` składni. ## <a name="type-sequencereader"></a>Wpisz: SequenceReader W programie .NET Core 3.0 `System.Buffers.SequenceReader` dodano, który może służyć jako czytnik `ReadOnlySequence<T>`. Umożliwia to łatwe w użyciu o wysokiej wydajności, niski alokacji analizowanie `System.IO.Pipelines` dane, które mogą przechodzić przez kilka buforów zapasowy. Poniższy przykład dzieli dane wejściowe `Sequence` na prawidłowe `CR/LF` rozdzielonych wiersze: ```csharp private static ReadOnlySpan<byte> CRLF => new byte[] { (byte)'\r', (byte)'\n' }; public static void ReadLines(ReadOnlySequence<byte> sequence) { SequenceReader<byte> reader = new SequenceReader<byte>(sequence); while (!reader.End) { if (!reader.TryReadToAny(out ReadOnlySpan<byte> line, CRLF, advancePastDelimiter:false)) { // Couldn't find another delimiter // ... } if (!reader.IsNext(CRLF, advancePast: true)) { // Not a good CR/LF pair // ... } // line is valid, process ProcessLine(line); } } ``` ## <a name="type-metadataloadcontext"></a>Wpisz: MetadataLoadContext `MetadataLoadContext` Typ został dodany, który umożliwia odczytywanie zestawu metadanych, bez wywierania wpływu na domeny aplikacji obiektu wywołującego. Zestawy są odczytywane jako dane, w tym zestawy stworzona z myślą o różnych architektur oraz platformach niż bieżącego środowiska. `MetadataLoadContext` nakłada się na <xref:System.Reflection.Assembly.ReflectionOnlyLoad*>, która jest dostępna tylko w programie .NET Framework. `MetdataLoadContext` jest dostępna w [pakietu System.Reflection.MetadataLoadContext](https://www.nuget.org/packages/System.Reflection.MetadataLoadContext). To pakiet .NET Standard 2.0. `MetadataLoadContext` Udostępnia interfejsy API, podobnie jak <xref:System.Runtime.Loader.AssemblyLoadContext> typu, ale nie zależy od tego typu. Podobnie jak <xref:System.Runtime.Loader.AssemblyLoadContext>, `MetadataLoadContext` umożliwia ładowanie zestawów w zestawie izolowane ładowania wszechświat. `MetdataLoadContext` Interfejsy API zwracają <xref:System.Reflection.Assembly> obiektów, umożliwiające użycie odbicia dobrze znanych interfejsów API. Wykonanie zorientowane na interfejsy API, takich jak [MethodBase.Invoke](https://github.com/dotnet/corefx/blob/master/src/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Methods/RoMethod.cs#L127), nie są dozwolone i będzie zgłaszać wyjątek InvalidOperationException. W poniższym przykładzie pokazano, jak znaleźć konkretne typy w zestawie, który implementuje danego interfejsu: ```csharp var paths = new string[] {@"C:\myapp\mscorlib.dll", @"C:\myapp\myapp.dll"}; var resolver = new PathAssemblyResolver(paths); using (var lc = new MetadataLoadContext(resolver)) { Assembly a = lc.LoadFromAssemblyName("myapp"); Type myInterface = a.GetType("MyApp.IPluginInterface"); foreach (Type t in a.GetTypes()) { if (t.IsClass && myInterface.IsAssignableFrom(t)) Console.WriteLine($"Class {t.FullName} implements IPluginInterface"); } } ``` Scenariusze dotyczące `MetadataLoadContext` obejmują funkcje czasu projektowania, narzędzi, czas kompilacji i środowiska uruchomieniowego światła w górę funkcje wymagające sprawdzanie zbiór zestawów danych i ma blokady wszystkich plików i pamięć zwolniona po kontroli jest wykonywane. `MetadataLoadContext` Przeszła klasy programu rozpoznawania nazw dla jego konstruktora. Zadanie programu rozpoznawania nazw ma ładować `Assembly` biorąc pod uwagę jej `AssemblyName`. Klasa rozpoznawania pochodzi z abstrakcyjnej `MetadataAssemblyResolver` klasy. Implementacja programu rozpoznawania nazw dla scenariuszy opartych na ścieżkach jest dostarczana z `PathAssemblyResolver`. [Testy MetadataLoadContext](https://github.com/dotnet/corefx/tree/master/src/System.Reflection.MetadataLoadContext/tests/src/Tests) pokazują wielu przypadków użycia. [Zestawu testów](https://github.com/dotnet/corefx/blob/master/src/System.Reflection.MetadataLoadContext/tests/src/Tests/Assembly/AssemblyTests.cs) są dobrym miejscem do rozpoczęcia. ## <a name="tls-13--openssl-111-on-linux"></a>TLS 1.3 & OpenSSL 1.1.1 w systemie Linux .NET core będą teraz korzystać z [Obsługa protokołu TLS 1.3 w OpenSSL 1.1.1](https://www.openssl.org/blog/blog/2018/09/11/release111/), gdy będzie ona dostępna w danym środowisku. Istnieją różne korzyści 1.3 protokołu TLS na [zespołu OpenSSL](https://www.openssl.org/blog/blog/2018/09/11/release111/): * Czas połączenia ulepszona z powodu ograniczenia liczby rund między klientem a serwerem. * Ulepszone zabezpieczenia z powodu usunięcia rozmaite algorytmy kryptograficzne przestarzały i niezabezpieczone i szyfrowania większej uzgadniania połączenia. .NET core 3.0 w wersji zapoznawczej 1 jest w stanie wykorzystujących **OpenSSL 1.1.1**, **OpenSSL 1.1.0**, lub **OpenSSL 1.0.2** (niezależnie od znaleziono wersji najlepiej jest, w systemie Linux). Podczas **OpenSSL 1.1.1** jest dostępna będzie używać typów SslStream i HttpClient **TLS 1.3** korzystając z `SslProtocols.None` (protokołów domyślne systemu), zakładając, że klient i serwer obsługi **TLS 1.3**. W poniższym przykładzie pokazano .NET Core 3.0 w wersji zapoznawczej 1 na 18.10 Ubuntu nawiązywania połączenia z <https://www.cloudflare.com>: ```csharp using System; using System.Net.Security; using System.Net.Sockets; using System.Threading.Tasks; namespace tlstest { class Program { static async Task Main() { using (TcpClient tcpClient = new TcpClient()) { string targetHost = "www.cloudflare.com"; await tcpClient.ConnectAsync(targetHost, 443); using (SslStream sslStream = new SslStream(tcpClient.GetStream())) { await sslStream.AuthenticateAsClientAsync(targetHost); await Console.Out.WriteLineAsync($"Connected to {targetHost} with {sslStream.SslProtocol}"); } } } } } ``` ```console user@comp-ubuntu1810:~/tlstest$ dotnet run Connected to www.cloudflare.com with Tls13 user@comp-ubuntu1810:~/tlstest$ openssl version OpenSSL 1.1.1 11 Sep 2018 ``` >[!IMPORTANT] >Windows i macOS nie jest jeszcze obsługiwany **TLS 1.3**. .NET core 3.0 to będzie obsługiwać **TLS 1.3** w tych systemach operacyjnych po udostępnieniu Pomocy technicznej. ## <a name="cryptography"></a>Kryptografia Dodano obsługę dla **AES-GCM** i **AES-CCM** szyfrów, wdrożone za pośrednictwem `System.Security.Cryptography.AesGcm` i `System.Security.Cryptography.AesCcm`. Te algorytmy są [uwierzytelnione szyfrowanie za pomocą algorytmów skojarzenia danych (AEAD)](https://en.wikipedia.org/wiki/Authenticated_encryption)i pierwszy algorytmów szyfrowania uwierzytelniony (AE) dodane do platformy .NET Core. Poniższy kod demonstruje użycie **AesGcm** szyfrowania do szyfrowania i odszyfrowywania danych losowych. Kod **AesCcm** będzie wyglądała niemal identyczne (tylko nazwy zmiennych klasy może się różnić). ```csharp // key should be: pre-known, derived, or transported via another channel, such as RSA encryption byte[] key = new byte[16]; RandomNumberGenerator.Fill(key); byte[] nonce = new byte[12]; RandomNumberGenerator.Fill(nonce); // normally this would be your data byte[] dataToEncrypt = new byte[1234]; byte[] associatedData = new byte[333]; RandomNumberGenerator.Fill(dataToEncrypt); RandomNumberGenerator.Fill(associatedData); // these will be filled during the encryption byte[] tag = new byte[16]; byte[] ciphertext = new byte[dataToEncrypt.Length]; using (AesGcm aesGcm = new AesGcm(key)) { aesGcm.Encrypt(nonce, dataToEncrypt, ciphertext, tag, associatedData); } // tag, nonce, ciphertext, associatedData should be sent to the other part byte[] decryptedData = new byte[ciphertext.Length]; using (AesGcm aesGcm = new AesGcm(key)) { aesGcm.Decrypt(nonce, ciphertext, tag, decryptedData, associatedData); } // do something with the data // this should always print that data is the same Console.WriteLine($"AES-GCM: Decrypted data is{(dataToEncrypt.SequenceEqual(decryptedData) ? "the same as" : "different than")} original data."); ``` ## <a name="cryptographic-key-importexport"></a>Kryptograficznych kluczy importu/eksportu .NET core 3.0 w wersji zapoznawczej 1 obsługuje importowanie i eksportowanie kluczy asymetrycznych publicznych i prywatnych z standardowych formatów, bez konieczności korzystania z certyfikatu X.509. Wszystkie klucza Obsługa typów (RSA, DSA, ECDsa, ECDiffieHellman) **X.509 SubjectPublicKeyInfo** format kluczy publicznych i **PKCS #8 PrivateKeyInfo** i **PKCS #8 EncryptedPrivateKeyInfo** formatów dla kluczy prywatnych. Dodatkowo obsługuje RSA **PKCS #1 RSAPublicKey** i **PKCS #1 RSAPrivateKey**. Wszystkie metody eksportowania generuje dane binarne zakodowane w formacie DER i metod import oczekiwać takie same. Jeśli klucz jest przechowywany w formacie PEM przyjaznego tekstu, obiekt wywołujący, będą musieli base64 — dekodowanie zawartości przed wywołaniem metody importu. ```csharp using System; using System.IO; using System.Security.Cryptography; namespace rsakeyprint { class Program { static void Main(string[] args) { using (RSA rsa = RSA.Create()) { byte[] keyBytes = File.ReadAllBytes(args[0]); rsa.ImportRSAPrivateKey(keyBytes, out int bytesRead); Console.WriteLine($"Read {bytesRead} bytes, {keyBytes.Length-bytesRead} extra byte(s) in file."); RSAParameters rsaParameters = rsa.ExportParameters(true); Console.WriteLine(BitConverter.ToString(rsaParameters.D)); } } } } ``` ```console user@comp-ubuntu1810:~/rsakeyprint$ echo Making a small key to save on screen space. Making a small key to save on screen space. user@comp-ubuntu1810:~/rsakeyprint$ openssl genrsa 768 | openssl rsa -outform der -out rsa.key Generating RSA private key, 768 bit long modulus (2 primes) ..+++++++ ........+++++++ e is 65537 (0x010001) writing RSA key user@comp-ubuntu1810:~/rsakeyprint$ dotnet run rsa.key Read 461 bytes, 0 extra byte(s) in file. 0F-D0-82-34-F8-13-38-4A-7F-C7-52-4A-F6-93-F8-FB-6D-98-7A-6A-04-3B-BC-35-8C-7D-AC-A5-A3-6E-AD-C1-66-30-81-2C-2A-DE-DA-60-03-6A-2C-D9-76-15-7F-61-97-57- 79-E1-6E-45-62-C3-83-04-97-CB-32-EF-C5-17-5F-99-60-92-AE-B6-34-6F-30-06-03-AC-BF-15-24-43-84-EB-83-60-EF-4D-3B-BD-D9-5D-56-26-F0-51-CE-F1 user@comp-ubuntu1810:~/rsakeyprint$ openssl rsa -in rsa.key -inform der -text -noout | grep -A7 private privateExponent: 0f:d0:82:34:f8:13:38:4a:7f:c7:52:4a:f6:93:f8: fb:6d:98:7a:6a:04:3b:bc:35:8c:7d:ac:a5:a3:6e: ad:c1:66:30:81:2c:2a:de:da:60:03:6a:2c:d9:76: fc00:db20:35b:7399::5:45:62:c3:83:04:97:cb: 32:ef:c5:17:5f:99:60:92:ae:b6:34:6f:30:06:03: fc00:e968:6179::de52:7100:60:ef:4d:3b:bd:d9:5d: 56:26:f0:51:ce:f1 ``` Pliki PKCS #8 mogą być kontrolowane za pomocą `System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo` klasy. Pliki PFX/PKCS #12, które mogą być kontrolowane i modyfikować za pomocą `System.Security.Cryptography.Pkcs.Pkcs12Info` i `System.Security.Cryptography.Pkcs.Pkcs12Builder`, odpowiednio. ## <a name="serialport-for-linux"></a>Portu SerialPort dla systemu Linux .NET core 3.0 obsługuje teraz <xref:System.IO.Ports.SerialPort?displayProperty=nameWithType> w systemie Linux. Wcześniej, .NET Core obsługiwana tylko przy użyciu `SerialPort` typu na Windows. ## <a name="more-bcl-improvements"></a>Więcej udoskonaleń BCL `Span<T>`, `Memory<T>`, I w środowisku .NET Core 3.0 zostały zoptymalizowane powiązanych typów, które zostały wprowadzone w programie .NET Core 2.1. Typowe operacje takie jak span konstrukcji, dzielenie, analizowania i formatowanie teraz działać lepiej. Ponadto takie jak typy `String` przejrzane czyni je bardziej efektywnymi, gdy jest używana jako klucze o ulepszenia w obszarze cover `Dictionary<TKey, TValue>` i innych kolekcji. Bez zmian w kodzie są wymagane do korzystania z tych ulepszeń. Następujące ulepszenia również są nowe w .NET Core 3 (wersja zapoznawcza) 1: * Obsługa Brotli wbudowanej w HttpClient * ThreadPool.UnsafeQueueWorkItem(IThreadPoolWorkItem) * Unsafe.Unbox * CancellationToken.Unregister * Złożone operatory arytmetyczne * Podtrzymywania API gniazda TCP * StringBuilder.GetChunks * IPEndPoint analizy * RandomNumberGenerator.GetInt32 ## <a name="tiered-compilation"></a>Warstwowe kompilacji [Warstwowe kompilacji](https://blogs.msdn.microsoft.com/dotnet/2018/08/02/tiered-compilation-preview-in-net-core-2-1/) jest domyślnie przy użyciu platformy .NET Core 3.0. Jest funkcją, która umożliwia bardziej adaptacyjnie Użyj kompilator just in Time (JIT), aby uzyskać lepszą wydajność, zarówno podczas uruchamiania i w celu zmaksymalizowania wydajności. Ta funkcja została dodana jako funkcja opcjonalna w [platformy .NET Core 2.1](https://blogs.msdn.microsoft.com/dotnet/2018/05/30/announcing-net-core-2-1/) i następnie została włączona domyślnie w [.NET Core 2.2 w wersji zapoznawczej 2](https://blogs.msdn.microsoft.com/dotnet/2018/09/12/announcing-net-core-2-2-preview-2/). Następnie został on przywrócony do zoptymalizowany pod kątem się przy użyciu wersji platformy .NET Core 2.2. ## <a name="arm64-linux-support"></a>Obsługa systemu Linux ARM64 Dodajemy obsługę tej wersji systemu Linux dla architektury ARM64. Kontekst Dodaliśmy obsługę ARM32 dla systemu Linux przy użyciu platformy .NET Core 2.1 i Windows przy użyciu platformy .NET Core 2.2. Głównym zastosowaniem dla architektury ARM64 jest obecnie używany w scenariuszach IoT. Firma Alpine, Debian i Ubuntu [obrazów platformy Docker są dostępne dla platformy .NET Core dla architektury ARM64](https://hub.docker.com/r/microsoft/dotnet/). Sprawdź, czy [stanu programu .NET Core ARM64](https://github.com/dotnet/announcements/issues/82) Aby uzyskać więcej informacji. >[!NOTE] > **ARM64** pomocy technicznej Windows nie jest jeszcze dostępna.
markdown
ring_buffers = [] max_iteration = 10 channel_data = ""
python
<filename>easy-cloud-core-parent/easy-cloud-core/src/main/java/com/easy/cloud/core/generator/code/java/pojo/bo/EcGenerateJavaInfBO.java<gh_stars>1-10 package com.easy.cloud.core.generator.code.java.pojo.bo; import com.easy.cloud.core.generator.code.base.pojo.desc.EcTemplateDesc; import com.easy.cloud.core.generator.code.base.pojo.rule.EcGenerateRule; import com.easy.cloud.core.generator.code.java.constant.EcCodeGenerateJavaConstant.EcModifierMappingEnum; import com.easy.cloud.core.generator.code.java.pojo.dto.EcGenerateJavaBaseDTO; public abstract class EcGenerateJavaInfBO extends EcGenerateJavaBaseBO { public EcGenerateJavaInfBO(EcGenerateJavaBaseDTO generateJavaBaseDTO, EcTemplateDesc templateDesc, EcGenerateRule generateRule) { super(generateJavaBaseDTO, templateDesc, generateRule); } public EcGenerateJavaInfBO(EcGenerateJavaBaseDTO generateJavaBaseDTO, EcGenerateRule generateRule) { super(generateJavaBaseDTO, generateRule); } @Override protected void buildModifiers() { javaClassContentDesc.addModifier(EcModifierMappingEnum.PUBLIC); javaClassContentDesc.addModifier(EcModifierMappingEnum.INTERFACE); } }
java
In-form wicket-keeper-batsman Ishan Kishan would be the cynosure of all eyes when India Red lock horns against India Green in the final of the Duleep Trophy, beginning at the M Chinnaswamy stadium here on Wednesday. The five-day final, to be telecast live, will be played with the pink ball and under lights. The 21-year old Jharkhand cricketer, who is among the wicket-keepers in focus for national duty, has been in impressive form in recent times. He shone for India ‘A’ in the first three matches of the unofficial ODI series against the visiting South Africa ‘A’ team. Kishan’s performance will be watched with interest, especially after the national selectors have hinted at managing Rishabh Pant’s workload with a long international season at home ahead. After featuring in three matches for India ‘A’ vs South Africa ‘A’, Kishan will be joining India Red for the summit clash. The Red team, led by prolific Gujarat opener Priyank Panchal, has been well served by out-of-favour India batsman Karun Nair, who has a ton and two 90-plus scores while the talented, young Rajasthan batter Mahipal Lomror cracked a ton in the final league encounter against India Green. Himachal batsman Ankit Kalsi too scored a ton in the game against India Blue and would look to continue his good form. Panchal will be expecting all his in-form batsmen to score big runs in the summit clash. Avesh Khan did the star turn in the encounter against India Green, though with the bat, as his blistering knock helped the team secure a one-run lead. The 22-year old Madhya Pradesh pacer had taken four wickets to help India Red gain the crucial lead against India Blue in their previous game. And along with the experienced Jaydev Unadkat, Kerala pacer Sandeep Warrier and Varun Aaron, on a comeback trail, Avesh will pose a stiff challenge to the India Green batting line-up. For India Green, led by Vidarbha’s two-time Ranji Trophy-winning skipper Faiz Fazal, Akshath Reddy has been among runs but others would have to step up if the team has to put up a challenge against a strong India Red side. Leg-spinner Mayank Markande has replaced Rahul Chahar for the final and he will be part of an attack that would include the ever-improving Ankit Rajpoot, Tanveer ul-Haq and off-spinner Akshay Wakhare. The weather hasn’t been so kind in these part of India so far, with the first two matches being affected by rain. Teams: India Red: Priyank Panchal (captain), Abhimanyu Easwaran, Axar Patel, Mahipal Lomror, Karun Nair, Akshay Wakhare, Varun Aaron, Aditya Sarvate, Harpreet Singh Bhatia, Avesh Khan, Ankit R Kalsi, Sandeep Warrier, Jaydev Unadkat, Ishan Kishan (WK). India Green: Faiz Fazal (captain), Akshath Reddy, Dhruv Shorey, Siddhesh Lad, Dharmendrasinh Jadeja, Tanveer ul-Haq, Milind Kumar, Priyam Garg, Akshdeep Nath, Ankit Rajpoot, Akshath Reddy, Akshay Wadkar (WK), Rajesh Mohanty, Mayank Markande, Jayant Yadav. (This story has not been edited by News18 staff and is published from a syndicated news agency feed - PTI)
english
from __future__ import annotations import argparse import json import logging import os from datetime import datetime from datetime import timedelta import git import humanfriendly from datalad.plugin import export_archive from github import Github from scripts.datalad_utils import get_dataset from scripts.datalad_utils import install_dataset from scripts.datalad_utils import uninstall_dataset from scripts.log import get_logger from tests.functions import get_proper_submodules logger = get_logger( "CONP-Archive", filename="conp-archive.log", file_level=logging.DEBUG ) class ArchiveFailed(Exception): pass def parse_args(): example_text = """Example: PYTHONPATH=$PWD python scripts/auto_archive.py <out_dir> """ parser = argparse.ArgumentParser( description="Archiver for the CONP-datasets.", epilog=example_text, formatter_class=argparse.RawDescriptionHelpFormatter, ) parser.add_argument( "--out_dir", "-o", type=str, help="Path to store the archived datasets." ) parser.add_argument( "--max-size", type=float, help="Maximum size of dataset to archive in GB.", ) group = parser.add_mutually_exclusive_group() group.add_argument( "--all", action="store_true", help="Archive all the datasets rather than those modified since the last time.", ) group.add_argument( "--dataset", "-d", type=str, nargs="+", help="Restrict the archive to the specified dataset paths.", ) return parser.parse_args() def get_datasets_path(): return { os.path.basename(submodule.path): submodule.path for submodule in git.Repo().submodules if submodule.path.startswith("projects") } def get_modified_datasets( *, since: datetime | None = None, until: datetime | None = None, ) -> set[str]: """Retrieve the modified datasets. Requires to set GITHUB_ACCESS_TOKEN as an environment variable. Parameters ---------- since : Optional[datetime], optional Start date from which commits are retrieved, by default date of the previous crawl, if never crawled set to one week ago. until : Optional[datetime], optional Latest date at which commit are retrieved, by default `now` Returns ------- set[str] Path of the dataset folders. """ now = datetime.now().astimezone() if since is None: if os.path.exists(".conp-archive"): with open(".conp-archive") as fin: since = datetime.fromisoformat(fin.read()) else: since = now - timedelta(weeks=1) if until is None: until = now try: gh_access_token = os.environ.get("GITHUB_ACCESS_TOKEN", None) if gh_access_token is None: raise OSError("GITHUB_ACCESS_TOKEN is not defined.") except OSError as e: # The program is not stopped since GitHub allows 60 query per hours with # authentication. However the program will most likely fail. logger.critical(e) logger.info(f"Retrieving modified datasets since {since}") repo = Github(gh_access_token).get_repo("CONP-PCNO/conp-dataset") commits = repo.get_commits(since=since, until=until) with open(".conp-archive", "w") as fout: fout.write(now.isoformat()) modified_datasets: set[str] = { os.path.basename(file_.filename) for commit in commits for file_ in commit.files if file_.filename.startswith("projects/") } return modified_datasets def archive_dataset( dataset_path: str, out_dir: str, archive_name: str, version: str ) -> None: os.makedirs(out_dir, mode=0o755, exist_ok=True) out_filename = os.path.join(out_dir, f"{archive_name}_version-{version}.tar.gz") logger.info(f"Archiving dataset: {dataset_path} to {out_filename}") cwd = os.getcwd() try: datalad_archiver = export_archive.ExportArchive() dataset_repo = git.Repo(dataset_path) with open(os.path.join(dataset_path, ".git.log"), "w") as fout: fout.write(dataset_repo.git.log(pretty="format:%H %s")) # Export is performed from the dataset root. # This is to avoid failure when a submodule is not downloaded; e.g. for parent # dataset in dataset derivative. os.chdir(os.path.join(cwd, dataset_path)) datalad_archiver(".", filename=out_filename) except Exception as e: raise ArchiveFailed( f"FAILURE: could not archive dataset: {dataset_path} to {out_filename}\n{e}" ) finally: os.chdir(cwd) if __name__ == "__main__": args = parse_args() # Only archive the datasets available locally. datasets_path = get_datasets_path() datasets = datasets_path.keys() if args.dataset: target_datasets = {os.path.basename(os.path.normpath(d)) for d in args.dataset} logger.warning( f"The following dataset were not found locally: {target_datasets - datasets}" ) datasets &= target_datasets elif not args.all: modified_datasets = get_modified_datasets() logger.warning( f"The following dataset were not found locally: {modified_datasets - datasets}" ) datasets &= modified_datasets for dataset_name in datasets: dataset = datasets_path[dataset_name] try: logger.info(f"Installing dataset: {dataset}") install_dataset(dataset) is_public = False version = "" dataset_size = 0.0 with open(os.path.join(dataset, "DATS.json")) as fin: metadata = json.load(fin) is_public = ( metadata.get("distributions", [{}])[0] .get("access", {}) .get("authorizations", [{}])[0] .get("value") == "public" ) version = metadata.get("version") for distribution in metadata.get("distributions", list()): dataset_size += humanfriendly.parse_size( f"{distribution['size']} {distribution['unit']['value']}", ) dataset_size //= 1024 ** 3 # Convert to GB # Only archive public dataset less than a specific size if one is provided to the script if is_public: if args.max_size is None or dataset_size <= args.max_size: logger.info(f"Downloading dataset: {dataset}") get_dataset(dataset) for submodule in get_proper_submodules(dataset): get_dataset(submodule) archive_name = "__".join( os.path.relpath(dataset, "projects").split("/") ) archive_dataset( dataset, out_dir=args.out_dir, archive_name=archive_name, version=version, ) # to save space on the VM that archives the dataset, need to uninstall # the datalad dataset. `datalad drop` does not free up enough space # unfortunately. See https://github.com/datalad/datalad/issues/6009 uninstall_dataset(dataset) logger.info(f"SUCCESS: archive created for {dataset}") else: logger.info(f"SKIPPED: {dataset} larger than {args.max_size} GB") else: logger.info( f"SKIPPED: archive not needed for {dataset}. Non-public dataset." ) except Exception as e: # TODO implement notification system. # This will alert when a dataset fails the archiving process. logger.exception( f"FAILURE: could not archive dataset: {dataset} to {args.out_dir}.tar.gz\n{e}" ) logger.info("Done archiving the datasets.")
python
Randy Zellea of Back Sports Page recently interviewed Chris Jericho, who was promoting his latest book. Below are some highlights: How much involvement he has in his storylines: "You could read about that in Best in the World. When you read it you could see how much involvement and input I had with my programs with Shawn Michaels, Rey Mysterio and CM Punk. I was involved with the creative aspect as they used my ideas, not all of them but I was very involved with them. When I came in to the WWE in 1999 I helped write my own stuff, but over time we bought in more writers. I work with the writers in collaboration. Nobody ever gives me a piece of paper and tell me to say things on the air. For other guys they do that and it works for them. They have to gain a trust on what they do between them and the company. You are able to work out and gain the experience to know what you are doing and know who you are. It takes experience on what you can get across as a performer in your promo and the storyline. Sometimes the boss will go with your suggestions and sometimes he won't and if he doesn't want to do it then there is not thing you could do. The more I could interject more of my ideas into my character and add my own personality into my storyline and in my promo the better it's gonna be. Everybody is in their own case by case basis but in my case everything is in collaboration and it has to be. I cannot do any other way. How the business has changed and how he stays motivated: "Back during that time period we took the attitude of you work with who you work with and you do your best to make it good. I had nine years experience before I came to the WWE and that's something a lot of people seem to forget about. No matter what obstacles are thrown at me, I have been through it before so I know how to make it good. So even though it took a while in my mind I had nowhere to go but up. Things were going to be good because that was the way I was trained. I was never given anything in the wrestling business from the day I started. When you don't have things handed to you, you have to work harder to get the spot. I just did my thing and sometimes it went my way and sometimes it didn't but I knew in the long run it was going to be good because that is how I was trained. " His Undisputed book including a disclaimer about Chris Benoit: "It was chosen by me personally. There was no real push back from the book company. It was all me. I had to put a little bit of a forward in there because Chris (Benoit) is talked about so much in the book in a favorable way. I had to put a little something in. This wasn't a major thing to hold the book back. When book one did well, we got the offer from them to do book two and when book two did well then we got an offer for book three. There is no way I can begin the process for another two years for a fourth book. When I wrote the Best in the World I could tell you that I just didn't have enough stories to write within the year time frame. Then I realized I have too many stories and I have to put some aside for a fourth book. That's why I am so proud of book three because it happened in the shortest of time. It's the most suffice and story wise the strongest because of things that happened in that time frame. " Jericho also discussed the process of writing his latest book, his character getting dark, working with so many all time greats, if talent can be creatively involved in their angles, the difference between the WWE and WCW ring style and more. You can check out the full interview by clicking here.
english
<gh_stars>0 {"PackageId":"Microsoft.Rest.ClientRuntime","PackageVersion":"2.3.21.0","PreRelease":false,"ReflectorEngineVersion":"1.10.0.0","NetFrameworkDone":true,"Net5Done":false,"Net6Done":true}
json
<filename>application/third_party/discussions/52413.json [ { "Id": "176124", "ThreadId": "52413", "Html": "I'm sorry to say this about such a promising project, but you guys really need to figure out this excessive memory usage problem.<br>\r\n<br>\r\nI attempted to use your library in a project of mine with a test data set of 1000 rows and about 49 columns.&nbsp; I was using no formatting, no styling, no special data types (only string), and trying to output in Excel 2007.&nbsp; I used the sample code for setting up the writer factories etc.&nbsp; The memory usage was horrible, between the writing data to the sheet and ouputting it, I used 48 megabytes.&nbsp;&nbsp; I switched all my project code out to use the Pear Spreadsheet_Writer and now memory usage is about 1.2 megabytes.&nbsp; The net effect is now I can output much larger spreadsheets.<br>\r\n<br>\r\nI couldn't even use this library on data-sets larger than 3k rows, it would blow up with out of memory errors at 228 megabytes.&nbsp; That is just ridiculous.&nbsp; <br>\r\n<br>\r\nI could not find the wasteful memory usage, although I traced and traced.<br>\r\n", "PostedDate": "2009-04-06T07:29:08.433-07:00", "UserRole": null, "MarkedAsAnswerDate": null }, { "Id": "176145", "ThreadId": "52413", "Html": "I have to agree 100%.&nbsp; I've been working on a project that requires MUCH larger files than thetazzbot is referring to, but I don't see why the class (designed my Microsoft, no less) doesn't even allow you to write a basic spreadsheet with a large number of rows.&nbsp; I've been looking around at your code and it has occurred to me that this isn't going to be a simple task to fix, because the entire design of your app rest on creating that PHP Excel object and then passing it to a writer.&nbsp; That object is obviously huge.&nbsp; Reguardless of how it is implemented, and at this point a completely seperate object/library might be neccessary, the community needs the ability to write data in a way that doesn't consume so much memory.<br>\r\n", "PostedDate": "2009-04-06T07:54:51.617-07:00", "UserRole": null, "MarkedAsAnswerDate": null }, { "Id": "176206", "ThreadId": "52413", "Html": "It's not written &quot;by microsoft&quot;.&nbsp; This is just a service Microsoft provides, they do not &quot;own&quot; all of the projects hosted here.<br>\r\n<br>\r\nNonethess, this bug has to by fixed else this is not production ready code and should be tagged as Beta.<br>\r\n", "PostedDate": "2009-04-06T10:08:34.3-07:00", "UserRole": null, "MarkedAsAnswerDate": null }, { "Id": "176230", "ThreadId": "52413", "Html": "We are not a Microsoft project. Codeplex is just a project hosting website that is provided by Microsoft, but they have nothing to do with the projects themselves.<br>\r\n<br>\r\nFor our 1.6.7 release (we hope to get it in in time), we are doing some investments in reducing memory usage and improving speed. This is mainly caused by circular references in PHP not being handled correctly by the parser. We are now working on a rewrite of the PHPExcel_Style_* classes to prevent this behaviour from happening, sharing styles between multiple cells automatically.<br>\r\n<br>\r\nRelated work item: <a href=\"http://phpexcel.codeplex.com/WorkItem/View.aspx?WorkItemId=6857\">http://phpexcel.codeplex.com/WorkItem/View.aspx?WorkItemId=6857</a><br>\r\n<br>\r\nAnother thing we are working on is an improved version of the formula parser, providing faster and more accurate results for formula calculation. Related work items can be found here: <a href=\"http://phpexcel.codeplex.com/WorkItem/AdvancedList.aspx\">http://phpexcel.codeplex.com/WorkItem/AdvancedList.aspx</a>\r\n", "PostedDate": "2009-04-06T11:23:34.263-07:00", "UserRole": null, "MarkedAsAnswerDate": null } ]
json
/****************************************************************************** ** ** Copyright (C) 2009-2011 <NAME> <<EMAIL>> ** All rights reserved. ** ** This file is a part of the chemkit project. For more information ** see <http://www.chemkit.org>. ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in the ** documentation and/or other materials provided with the distribution. ** * Neither the name of the chemkit project nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** ******************************************************************************/ #include "oplsatomtyper.h" // --- Construction and Destruction ---------------------------------------- // OplsAtomTyper::OplsAtomTyper(const chemkit::Molecule *molecule) : chemkit::AtomTyper("opls") { setMolecule(molecule); } OplsAtomTyper::~OplsAtomTyper() { } // --- Properties ---------------------------------------------------------- // void OplsAtomTyper::setMolecule(const chemkit::Molecule *molecule) { chemkit::AtomTyper::setMolecule(molecule); if(!molecule){ m_typeNumbers.resize(0); return; } m_typeNumbers = std::vector<int>(molecule->atomCount()); for(size_t index = 0; index < molecule->atomCount(); index++){ const chemkit::Atom *atom = molecule->atom(index); // hydrogen if(atom->is(chemkit::Atom::Hydrogen)){ if(atom->isTerminal()){ const chemkit::Atom *neighbor = atom->neighbor(0); if(neighbor->is(chemkit::Atom::Oxygen)){ if(neighbor->neighborCount() == 2 && neighbor->neighborCount(chemkit::Atom::Hydrogen) == 2){ setTypeNumber(index, 76); // SPC hydrogen in water (HW) } else{ setTypeNumber(index, 94); // hydrogen in alcohol (HO) } } else if(neighbor->is(chemkit::Atom::Carbon)){ setTypeNumber(index, 82); // alkane C-H } else if(neighbor->is(chemkit::Atom::Nitrogen)){ if(neighbor->neighborCount(chemkit::Atom::Hydrogen) == 3){ setTypeNumber(index, 70); // hydrogen in ammonia (H) } } } } // helium else if(atom->is(chemkit::Atom::Helium)){ setTypeNumber(index, 43); // helium atom } // lithium else if(atom->is(chemkit::Atom::Lithium)){ setTypeNumber(index, 345); // lithium 1+ ion (Li) } // carbon else if(atom->is(chemkit::Atom::Carbon)){ if(atom->neighborCount() == 4){ if(atom->neighborCount(chemkit::Atom::Carbon) == 2){ setTypeNumber(index, 78); // alkane -CH2- } else if(atom->neighborCount(chemkit::Atom::Carbon) == 1 && atom->neighborCount(chemkit::Atom::Hydrogen) == 3){ setTypeNumber(index, 77); // alkane -CH3 } else if(atom->neighborCount(chemkit::Atom::Oxygen) == 1){ setTypeNumber(index, 96); // alcohol CH3OH } } else if(atom->neighborCount() == 3){ if(atom->isAromatic()){ setTypeNumber(index, 87); // aromatic carbon } } } // nitrogen else if(atom->is(chemkit::Atom::Nitrogen)){ if(atom->neighborCount() == 3){ if(atom->neighborCount(chemkit::Atom::Hydrogen) == 3){ setTypeNumber(index, 69); // nitrogen in ammonia (NT) } } } // oxygen else if(atom->is(chemkit::Atom::Oxygen)){ if(atom->neighborCount() == 1){ const chemkit::Atom *neighbor = atom->neighbor(0); const chemkit::Bond *neighborBond = atom->bonds()[0]; if(neighbor->is(chemkit::Atom::Carbon) && neighborBond->order() == chemkit::Bond::Double){ setTypeNumber(index, 220); // ketone C=O (O) } } else if(atom->neighborCount() == 2){ if(atom->neighborCount(chemkit::Atom::Hydrogen) == 2){ setTypeNumber(index, 75); // SPC oxygen in water (OW) } else if(atom->neighborCount(chemkit::Atom::Hydrogen) == 1){ setTypeNumber(index, 93); // oxygen in alcohol (OH) } } } // fluorine else if(atom->is(chemkit::Atom::Fluorine)){ if(atom->formalCharge() < 0){ setTypeNumber(index, 340); // fluoride ion (F) } } // neon else if(atom->is(chemkit::Atom::Neon)){ setTypeNumber(index, 44); // neon atom } // sodium else if(atom->is(chemkit::Atom::Sodium)){ setTypeNumber(index, 346); // sodium ion } // magnesium else if(atom->is(chemkit::Atom::Magnesium)){ setTypeNumber(index, 350); // magnesium ion (Mg) } // phosphorus else if(atom->is(chemkit::Atom::Phosphorus)){ if(atom->neighborCount() == 4){ if(atom->neighborCount(chemkit::Atom::Oxygen) > 0){ setTypeNumber(index, 378); // phosphate P } } } // sulfur else if(atom->is(chemkit::Atom::Sulfur)){ if(atom->neighborCount() == 2){ if(atom->neighborCount(chemkit::Atom::Hydrogen) == 1){ setTypeNumber(index, 139); // sulfur in thiol (SH) } else if(atom->neighborCount(chemkit::Atom::Hydrogen) == 2){ setTypeNumber(index, 140); // sulfur in hydrogen sulfide (SH) } else if(atom->neighborCount(chemkit::Atom::Sulfur) == 1){ setTypeNumber(index, 142); // disulfide -S-S- (S) } else{ setTypeNumber(index, 141); // sulfide -S- (S) } } } // chlorine else if(atom->is(chemkit::Atom::Chlorine)){ if(atom->formalCharge() < 0){ setTypeNumber(index, 341); // chloride ion (Cl) } } // argon else if(atom->is(chemkit::Atom::Argon)){ setTypeNumber(index, 45); // argon atom } // potassium else if(atom->is(chemkit::Atom::Potassium)){ setTypeNumber(index, 347); // potassium 1+ ion (K) } // calcium else if(atom->is(chemkit::Atom::Calcium)){ setTypeNumber(index, 351); // calcium 2+ ion (Ca) } // zinc else if(atom->is(chemkit::Atom::Zinc)){ if(atom->formalCharge() == 2){ setTypeNumber(index, 834); // zinc 2+ ion (Zn) } } // bromine else if(atom->is(chemkit::Atom::Bromine)){ if(atom->formalCharge() < 0){ setTypeNumber(index, 342); // bromide ion (Br) } } // krypton else if(atom->is(chemkit::Atom::Krypton)){ setTypeNumber(index, 46); // krypton atom } // iodine else if(atom->is(chemkit::Atom::Iodine)){ setTypeNumber(index, 343); // iodide ion (I) } // xenon else if(atom->is(chemkit::Atom::Xenon)){ setTypeNumber(index, 47); // xenon atom } } } // --- Types --------------------------------------------------------------- // std::string OplsAtomTyper::type(const chemkit::Atom *atom) const { return boost::lexical_cast<std::string>(m_typeNumbers[atom->index()]); } void OplsAtomTyper::setTypeNumber(int index, int typeNumber) { m_typeNumbers[index] = typeNumber; } int OplsAtomTyper::typeNumber(const chemkit::Atom *atom) const { return m_typeNumbers[atom->index()]; }
cpp
# useRequest 一个 Http Request React Hook. ## 安装 ```bash npm install @prequest/use-request ``` ## 初始化 ```ts import requestHook from '@prequest/use-request' import { create, PreQuest, Request, Response } from '@prequest/xhr' const prequest = create({ baseURL: 'http://localhost:3001', }) const useRequest = requestHook<Request, Response>(prequest) ``` 同时你也可以不受影响的使用 PreQuest 的能力。 ```ts import { create, PreQuest } from '@prequest/xhr' PreQuest.defaults.baseURL = 'http://localhost:3000' const prequest = create({ baseURL: 'http://localhost:3001', }) prequest.use(async (ctx, next) => { console.log('---request log', ctx.request) await next() console.log('---response log', ctx.response) }) ``` ## 使用 ### 基本使用 ```ts // 组件 props interface UserProps { id: number } // 接口响应的数据类型 interface UserRes { id: number name: string age: number } const User: FC<UserProps> = ({ id }) => { const { data, loading, error } = useRequest<UserRes>({ path: '/user', params: { id }, }) return ( <div> {loading && <div>加载中</div>} {data && <div>姓名:{data?.name}</div>} {error && <div>{error}</div>} </div> ) } ``` ### 校验参数 当 useRequest 请求参数不确定时,可以传入函数参数,进行请求参数校验 ```tsx interface UserProps { id?: number } const User: FC<UserProps> = ({ id }) => { const { data, loading, error } = useRequest(() => { if (!id) throw new Error() return { path: '/user', params: { id }, } }) return ( <div> {loading && <div>加载中</div>} {data && <div>{data}</div>} {error && <div>{error}</div>} </div> ) } ``` ### 延迟请求 由事件触发请求。需要配置 `lazy` 为 `true`。进行调用时,使用导出的 `request` 进行调用 ```tsx interface UserProps { id: number } const User: FC<UserProps> = ({ id }) => { const { data, loading, error, request } = useRequest( { path: '/user', params: { id } }, { lazy: true } ) async function onClick() { // request 可直接拿到 res, onClick 方法里需要用到 data 数据时,建议从 res 中取,因为 data 经过 setState, 是"异步"的 const res = await request(prev => { // prev 为 useRequest 配置的参数 const { params } = prev return { ...prev, params: { id: 2, }, } }) console.log(res) } return ( <div> <div onClick={onClick}>点击请求</div> {loading && <div>加载中</div>} {data && <div>{data}</div>} {error && <div>{error}</div>} </div> ) } ``` ### 循环请求 传参 `loop` 即可开启循环请求 ```tsx interface UserProps { id: number } const User: FC<UserProps> = ({ id }) => { const { data, loading, error, clearLoop } = useRequest( { path: '/user', params: { id } }, { loop: 1000 } ) function onClick() { clearLoop() } return ( <div> <div onClick={onClick}>点击停止</div> {loading && <div>加载中</div>} {data && <div>{data}</div>} {error && <div>{error}</div>} </div> ) } ``` ### Loading 状态与分页更新 ```tsx const Users = () => { const { data, loading, loadingRef, error, request } = useRequest( { path: '/users', params: { page: 1 }, }, { onUpdate(prevData, data) { if (!prevData) return data return prevData.concat(data) }, } ) function onScrollToLower() { if (loadingRef.current) return request(prev => { const { params } = prev const { page } = params return { ...prev, params: { page: page + 1, }, } }) } return ( <ScrollView onScrollToLower={onScrollToLower}> {loading && <div>加载中</div>} {data && <div>{data}</div>} {error && <div>{error}</div>} </ScrollView> ) } ``` ## 参数列表 useRequest 支持两个对象参数。 在上面 [初始化](#初始化) 一节中,我们从 `@prequest/xhr` 请求库中导出的 `Request` 类型,在 requestHook 中进行了初始化,useRequest 函数的第一个对象参数,即为这里初始化的类型参数。 第二个对象参数,支持设置 `lazy` 与 `loop`
markdown
With there being intense talks about his future, Mahendra Singh Dhoni has always preferred to avoid talks about his retirement. However, on Wednesday, after the launch of a special edition of the luxury watch brand Paneria, he hinted upon a ‘final decision’ over his future by January. The cricketer also talked about the fondest memories in the India jersey. “There are two incidents I would like to mention over here. After the 2007 (T20) World Cup, we came back to India and had an open bus trip and we were standing at the Marine Drive (in Mumbai). It was jam-packed all around and people had come out of their cars. So, I felt good after seeing the smile on everyone’s face. Because, there could have been so many people in the crowd, who might have missed their flights, perhaps they were going important work or at some office. The kind of reception we got, the entire Marine Drive was full from one end to the other,” the 38-year-old said. MS Dhoni last appeared on the field back in July in India’s World Cup semi-final defeat against New Zealand. Having not featured in any game ever since there have been thick speculations over the cricketer’s future in international cricket. Although he will very much be a part of the Indian Premier League (IPL) next year, not much can be said about his international career. On one hand, chief selector MSK. Prasad said earlier last month that the selection panel has apparently “moved on” from Dhoni. Contrastingly, head coach Ravi Shastri on Monday hinted that the cricketer could still come on board in the next year’s T20 World Cup.
english
{"evaporate.js":"sha256-D6t66Cmd2bD+YCbigDK2yM1vqvZgD/PlbKLE9QPBE6M=","evaporate.min.js":"sha256-OdPRfFLajweLQCybbPL7Q9AQV7L75oikNkt9YVcSdv4="}
json
<gh_stars>0 { "componentChunkName": "component---src-templates-post-js", "path": "/story/mom-makes-spiderman-challenge-to-keep-kid-busy", "result": {"data":{"cms":{"CMS_Story":{"id":"249","title":"Mom Makes Spiderman Challenge To Keep Kid Busy","pub_date":"Thu, 23 Apr 2020 11:23:10 +0000","image":"https://thenerdseries.com/wp-content/uploads/2020/04/New-Project-14.jpg"}}},"pageContext":{"slug":"249"}}, "staticQueryHashes": []}
json
package org.cloudbus.cloudsim.container.resourceAllocatorMigrationEnabled; import org.cloudbus.cloudsim.container.core.*; import org.cloudbus.cloudsim.container.hostSelectionPolicies.HostSelectionPolicy; import org.cloudbus.cloudsim.container.vmSelectionPolicies.PowerContainerVmSelectionPolicy; import java.util.*; /** * Created by sareh on 17/11/15. */ public class PowerContainerVmAllocationPolicyMigrationAbstractHostSelection extends PowerContainerVmAllocationPolicyMigrationAbstract { private HostSelectionPolicy hostSelectionPolicy; private double utilizationThreshold = 0.9; private double underUtilizationThreshold = 0.7; /** * Instantiates a new power vm allocation policy migration abstract. * * @param hostSelectionPolicy * @param hostList the host list * @param vmSelectionPolicy the vm selection policy */ public PowerContainerVmAllocationPolicyMigrationAbstractHostSelection(List<? extends ContainerHost> hostList, PowerContainerVmSelectionPolicy vmSelectionPolicy, HostSelectionPolicy hostSelectionPolicy, double OlThreshold, double UlThreshold) { super(hostList, vmSelectionPolicy); setHostSelectionPolicy(hostSelectionPolicy); setUtilizationThreshold(OlThreshold); setUnderUtilizationThreshold(UlThreshold); } @Override /** * Find host for vm. * * @param vm the vm * @param excludedHosts the excluded hosts * @return the power host */ public PowerContainerHost findHostForVm(ContainerVm vm, Set<? extends ContainerHost> excludedHosts) { PowerContainerHost allocatedHost = null; Boolean find = false; Set<ContainerHost> excludedHost1 = new HashSet<>(); excludedHost1.addAll(excludedHosts); while (!find) { ContainerHost host = getHostSelectionPolicy().getHost(getContainerHostList(), vm, excludedHost1); if (host == null) { return allocatedHost; } if (host.isSuitableForContainerVm(vm)) { find = true; allocatedHost = (PowerContainerHost) host; } else { excludedHost1.add(host); if (getContainerHostList().size() == excludedHost1.size()) { return null; } } } return allocatedHost; } public HostSelectionPolicy getHostSelectionPolicy() { return hostSelectionPolicy; } public void setHostSelectionPolicy(HostSelectionPolicy hostSelectionPolicy) { this.hostSelectionPolicy = hostSelectionPolicy; } /** * Checks if is host over utilized. * * @param host the _host * @return true, if is host over utilized */ @Override protected boolean isHostOverUtilized(PowerContainerHost host) { addHistoryEntry(host, getUtilizationThreshold()); double totalRequestedMips = 0; for (ContainerVm vm : host.getVmList()) { totalRequestedMips += vm.getCurrentRequestedTotalMips(); } double utilization = totalRequestedMips / host.getTotalMips(); return utilization > getUtilizationThreshold(); } @Override protected boolean isHostUnderUtilized(PowerContainerHost host) { return false; } /** * Sets the utilization threshold. * * @param utilizationThreshold the new utilization threshold */ protected void setUtilizationThreshold(double utilizationThreshold) { this.utilizationThreshold = utilizationThreshold; } /** * Gets the utilization threshold. * * @return the utilization threshold */ protected double getUtilizationThreshold() { return utilizationThreshold; } public double getUnderUtilizationThreshold() { return underUtilizationThreshold; } public void setUnderUtilizationThreshold(double underUtilizationThreshold) { this.underUtilizationThreshold = underUtilizationThreshold; } @Override /** * Gets the under utilized host. *Checks if the utilization is under the threshold then counts it as underUtilized :) * @param excludedHosts the excluded hosts * @return the under utilized host */ protected PowerContainerHost getUnderUtilizedHost(Set<? extends ContainerHost> excludedHosts) { List<ContainerHost> underUtilizedHostList = getUnderUtilizedHostList(excludedHosts); if (underUtilizedHostList.size() == 0) { return null; } ContainerHostList.sortByCpuUtilizationDescending(underUtilizedHostList); // Log.print(String.format("The under Utilized Hosts are %d", underUtilizedHostList.size())); PowerContainerHost underUtilizedHost = (PowerContainerHost) underUtilizedHostList.get(0); return underUtilizedHost; } /** * Gets the under utilized host. * * @param excludedHosts the excluded hosts * @return the under utilized host */ protected List<ContainerHost> getUnderUtilizedHostList(Set<? extends ContainerHost> excludedHosts) { List<ContainerHost> underUtilizedHostList = new ArrayList<>(); for (PowerContainerHost host : this.<PowerContainerHost>getContainerHostList()) { if (excludedHosts.contains(host)) { continue; } double utilization = host.getUtilizationOfCpu(); if (!areAllVmsMigratingOutOrAnyVmMigratingIn(host) && utilization < getUnderUtilizationThreshold() && !areAllContainersMigratingOutOrAnyContainersMigratingIn(host)) { underUtilizedHostList.add(host); } } return underUtilizedHostList; } @Override public void setDatacenter(ContainerDatacenter datacenter) { } }
java
<reponame>dldevinc/django-flatly import posixpath import django from django.template.exceptions import TemplateDoesNotExist from django.urls import Resolver404, ResolverMatch, URLPattern from django.urls.resolvers import RegexPattern from . import conf from .helpers import get_template_by_name, safe_join from .views import serve class FlatlyURLPattern(URLPattern): def resolve(self, path): match = self.pattern.match(path) if match: new_path, args, kwargs = match path = kwargs.get('path') path = posixpath.normpath(path).lstrip('/') path = path.replace('-', '_') if conf.TEMPLATE_ROOT: template_name = safe_join(path, conf.TEMPLATE_ROOT) else: template_name = path try: template = get_template_by_name(template_name) except TemplateDoesNotExist: raise Resolver404({}) if django.VERSION >= (2, 2): return ResolverMatch( self.callback, (template,), {}, route=str(self.pattern) ) else: return ResolverMatch(self.callback, (template,), {}) def flatly_path(route, view): pattern = RegexPattern(route, name=None, is_endpoint=True) return FlatlyURLPattern(pattern, view, None, None) app_name = 'flatly' urlpatterns = [ flatly_path(r'^(?P<path>.*)/$', serve) ]
python
I’m an American who’s too busy educating myself as well as trying to educate white people that I *actually know (& in a few cases, am related to) & can influence* to worry about what a Canadian ice dancer thinks. And that’s coming from someone who likes said Canadian ice dancer. I taught in a predominantly black school district for 9yrs, which included countless hours of PD, book studies, & discussions on culturally responsive teaching. I also live less than 15 miles from Ferguson. And I’m STILL learning how to check my privilege & advocate for BIPOC. And I’m STILL learning how to check my privilege & advocate for BIPOC. I don’t expect ice dancers to be experts or to give an instant take on current events, nor do I feel that the world is now magically healed because T has weighed in. We’re all human. We’re ALL imperfect. We’re all (hopefully) learning & doing what we can in times like these. But if we’re constantly looking for (or demanding) moral guidance, sermons, or hot takes from a Canadian ice dancer (or any other celeb) that we don’t personally know... it feels like that energy could be better channeled toward those closest to us & our own communities.
english
(From 2012–2016) GUWAHATI, Aug 28: At a time when courts in Assam are weighed down with thousands of pending cases, a steep fall in the conviction rate related to cases of illegal arms possession has raised questions over the way investigations are being conducted in the State. Under the Arms Act, 1959, 1,642 cases were registered during 2012–2014 in various police stations across the State, but the rate of conviction is abysmal. The police have failed to file charge–sheet in courts in 50 per cent of cases related to illegal possession of arms. In the last few years, availability of illegal arms and the use of the same have increased in the State, of which anti–social elements are taking full advantage. Though the police have seized several licensed arms in different parts of the State in the last few years, the availability of illegal arms is yet to be dealt with. According to government records, during 2012–2014, out of 1,642 cases registered, there were convictions in 61 cases; 86 persons were convicted out of 2,301 persons arrested. Out of 1,642 registered cases, charge–sheets in 891 cases were filed by the police. In 2014, a total of 423 arms (322 unlicensed, 73 licensed and 22 other types of arms) and 3,279 ammunition were seized by the police in different parts of the State. Due to non–filing of charge–sheets in many such cases, the persons involved got bail easily and now have a free run. In various police stations, according to records, 62,000 cases including possession of illegal arms and ammunition have been pending for long. Sources say that such cases are continuing to pile up in police stations across the State. The police, however, have stated that most of their time is spent in maintaining law and order, so they get less time to do investigations. The earlier State government once proposed to separate investigation from law and order part so that the huge backlog of cases could be cleared, but the proposal didn’t become a reality. Now, it will be a great challenge for the new BJP government in the State to tackle the problem effectively.
english
<reponame>jsdelivr/api {"name":"jquery.toolbar","assets":[{"files":["jquery.toolbar.js","jquery.toolbar.min.js","jquery.toolbars.css"],"version":"1.0.1","mainfile":"jquery.toolbar.min.js"}],"versions":["1.0.1"],"zip":"jquery.toolbar.zip","author":"<NAME>","github":"https://github.com/paulkinzett/toolbar","homepage":"http://paulkinzett.github.com/toolbar/","description":"A jQuery plugin that creates tooltip style toolbars.","mainfile":"jquery.toolbar.min.js","lastversion":"1.0.1"}
json
The six-day Urdu Drama Festival-2019 organised by Urdu Academy, Delhi at Shri Ram Centre, which ended recently attracted a large number of theatre lovers as well as young actors in the quest of improving their skill of Urdu accent. Adapted by Ranjit Kapoor, eminent theatre and film personality, from Nikolai Gogol’s classic “The Government Inspector” as “Chainpur Ki Dastaan” was presented at the festival by Saksham Society of Art and Culture under the direction of Sunil Rawat. The play is a comic exposure of rampant corruption in administrative machinery at various levels of a state. Kapoor’s adaptation is set in an imaginary small town administered by a group of unscrupulous and corrupt officials. In the original, the element of satire is strong. Kapoor’s adaptation is essentially comic. He has created a character of dacoit to make his play hilarious. Despite rough edges here and there, Rawat’s production amuses the audience bringing to the fore the contemporary relevance of the play. Kapil Pal as Daku Lakhan Singh and Vikram Aditya Pandey as Khan, who is constantly nagged by his young second wife, give creditable performances as comic actors. Prolific director Dr. M. Sayeed Alam has produced a number of plays which are remarkable for delivery of dialogue in chaste Urdu and aesthetically conceptualised productions. His Pierrot’s Trope under his direction presented “Sir Iqbal” at the festival. The play opens with a poetic symposium in which Sir Iqbal recites his immensely popular poem “Saare Jahan Se Achchha Hindustan Hamara” which is heard by a group of poets in rapt attention setting the tone of the production, projecting the multi-faceted protagonist of the play. His personal life is unfolded against the background of the tumultuous political movements in which Iqbal plays vital role. Despite the serious tone of the production, the audience is offered some light-hearted moments. Dr. Alam as Sir Iqbal gives an outstanding performance. Anju Chhabra as narrator speaks in Punjabi in a lively style punctuated with serious tone to convey the struggle Sir Iqbal faces in his public and domestic life. The members of the cast are warmly applauded by the audience when they took curtain call.
english
<reponame>urbas/CoAPthon3 from coapthon.resources.resource import Resource __author__ = '<NAME>' class RemoteResource(Resource): def __init__(self, name, remote_server, remote_path, coap_server=None, visible=True, observable=True, allow_children=True): super(RemoteResource, self).__init__(name, coap_server, visible=visible, observable=observable, allow_children=allow_children) self.remote_path = remote_path self.remote_server = remote_server
python
<filename>data_collection/English/layer3/EN111364.json { "authors": [ { "author": "<NAME>" }, { "author": "<NAME>" }, { "author": "<NAME>" }, { "author": "<NAME>" } ], "doi": "10.1155/2019/1724083", "publication_date": "2020-01-25", "id": "EN111364", "url": "https://pubmed.ncbi.nlm.nih.gov/31976096", "source": "Case reports in immunology", "source_url": "", "licence": "CC BY", "language": "en", "type": "pubmed", "description": "", "text": "This is the case of a 29-year-old female who presented with a recurrent significant lymphoid hyperplasia in the adenoid and tongue base region as well as a right cervical lymph node. After repeated adenoidectomies and tonsillectomies, and based on pathological and clinical findings she was diagnosed with iT-LBP. Trials of radiotherapy and immunotherapy with cyclosporine and rituximab all failed to control the progression of the disease. Sirolimus was finally able to restrict the growth and improve her symptoms." }
json
Does Gandhi really need such protection? Mahatma Gandhi's life invites scrutiny. His writing facilitates it. Innocent unconcern about likely distortions makes his letters and speeches peculiarly charming. Gopalkrishna Gandhi writes. Mahatma Gandhi's life invites scrutiny. His writing facilitates it. Innocent unconcern about likely distortions makes his letters and speeches peculiarly charming. It also makes tendentious mutilations of the story of his life particularly easy. I have not read Joseph Lelyveld's book. And so I ought not to — and will not — comment on it. But the media excitement in India, we should realise, has not been generated by a book but by a review of the book. Lelyveld has, in a riposte, said the review does not quote him right. Should we get shocked, one way or the other, by what a review says a book says when the author of the book maintains he doesn't? We should not. But there is something else fit for our contemplation in this event. Gandhi has had so huge an impact on human thought (though nowhere near as huge on human action) that those uncomfortable with his 'way', have sought to counter his impact by strenuous attempts to locate flaws in his personality. His 'fads' and his fetishes, his frankly unorthodox and — to all 'normal' sensibilities — his bizarre experiments in brahmacharya, his 'inner voice' and outer appearance, have all been found handy by demolition squads. He has, of course, collaborated in the proceedings most generously by his self-excoriating candour and by his lavish use of phrases and gestures of trust in fellow-beings. Despite this, Gandhiphile thinking and writing continues to grow and continues to dwarf the Gandhiphobic. This is not just because of what Tara Ali Baig once described as "Gandhi's shining veracity" but because the shape of human experience from Hiroshima to Fukushima, from global terror to global warming, from Hitler, Mussolini and Stalin to Pol-Pot, Idi Amin and Mubarak points to its wisdom. The Gandhi-Kallenbach story, as given in the review, should help us place tendentious newspaper reviews where they belong, namely, the green bin for bio-degradables. It should also lead us to three things: One, to a study of the remarkable career of that German architect of Jewish descent, Hermann Kallenbach, whom Gandhi helped transform from a high-living urbanite in Johannesburg to a 'New Age' comrade in ecologically intelligent living but with whom Gandhi differed seriously, in later years, on the question of Palestine. Two, to a self-examination by ourselves (and the media) on the jumpiness over intellectual non-events and non-sequiturs. Three, it should alert us to the folly of banning books not because we respect the subject of their scrutiny but because it pays to appear as its protector. Gandhi, least interested in self-protection, is best protected by the strength of his own words and the wordlessness of his own strength. Gopalkrishna Gandhi has edited Gandhi Is Gone. Who Will Guide Us Now? He is also a grandson of Mahatma Gandhi. The views expressed by the author are personal.
english
{"template":{"small":"https://static-cdn.jtvnw.net/emoticons/v1/{image_id}/1.0","medium":"https://static-cdn.jtvnw.net/emoticons/v1/{image_id}/2.0","large":"https://static-cdn.jtvnw.net/emoticons/v1/{image_id}/3.0"},"channels":{"hoochrrr":{"title":"hoochRRR","channel_id":38341628,"link":"http://twitch.tv/hoochrrr","desc":null,"plans":{"$4.99":"6448","$9.99":"40535","$24.99":"40536"},"id":"hoochrrr","first_seen":null,"badge":"https://static-cdn.jtvnw.net/badges/v1/54721a39-327d-4748-89ed-cd844aea86f9/1","badge_starting":"https://static-cdn.jtvnw.net/badges/v1/54721a39-327d-4748-89ed-cd844aea86f9/3","badge_3m":null,"badge_6m":null,"badge_12m":null,"badge_24m":null,"badges":[{"image_url_1x":"https://static-cdn.jtvnw.net/badges/v1/54721a39-327d-4748-89ed-cd844aea86f9/1","image_url_2x":"https://static-cdn.jtvnw.net/badges/v1/54721a39-327d-4748-89ed-cd844aea86f9/2","image_url_4x":"https://static-cdn.jtvnw.net/badges/v1/54721a39-327d-4748-89ed-cd844aea86f9/3","description":"Subscriber","title":"Subscriber","click_action":"subscribe_to_channel","click_url":""}],"bits_badges":null,"cheermote1":null,"cheermote100":null,"cheermote1000":null,"cheermote5000":null,"cheermote10000":null,"set":6448,"emotes":[{"code":"hoochrFace","image_id":23528,"set":6448},{"code":"hoochrLEV","image_id":23529,"set":6448},{"code":"hoochrBonya","image_id":23530,"set":6448},{"code":"hoochrOskar","image_id":23531,"set":6448}]}}}
json
/** * This file demonstrates gravity compensation behavior by commanding torques * equal to the force from gravity on the links and joints of an arm. * Note that this only approximately balances out gravity, as imperfections in * the torque sensing and modeled system can lead to "drift". Also, the * particular choice of PID control gains can affect the performance of this * demo. */ #include "group.hpp" #include "group_command.hpp" #include "group_feedback.hpp" #include "util/grav_comp.hpp" #include "arm_container.hpp" #include <chrono> #include <thread> int main(int argc, char* argv[]) { // Note: this demo is written for a simple 3DOF arm with the kinematics // given below. You can adapt to other systems by creating the correct // robot_model object and mass vector. std::unique_ptr<hebi::ArmContainer> arm = hebi::ArmContainer::create3Dof(); if (!arm) return -1; hebi::GroupCommand cmd(arm->getGroup().size()); Eigen::Vector3d gravity(0, 0, -1); // Respond to every feedback packet with an effort command to cancel the // force due to gravity at this pose. arm->getGroup().addFeedbackHandler( [&arm, &gravity, &cmd](const hebi::GroupFeedback& feedback)->void { Eigen::VectorXd effort = hebi::util::GravityCompensation::getEfforts( arm->getRobotModel(), arm->getMasses(), feedback); cmd.setEffort(effort); arm->getGroup().sendCommand(cmd); }); // Run for 60 seconds std::this_thread::sleep_for(std::chrono::seconds(60)); arm->getGroup().clearFeedbackHandlers(); return 0; }
cpp
Hero Srikanth is going through a rough patch for more than a decade. Barring Mahatma, none of his films in the last 10 years has clicked at the box-office. In the meantime, he also tried out doing supporting and antagonist roles in the films like Sarrainodu and Yuddham Sharanam, but even those attempts gave him the mixed results. Now, he is testing his luck in the webspace.
english
<filename>backend/core/migrations/0010_auto_20200707_1237.py # Generated by Django 3.0.7 on 2020-07-07 12:37 import core.utils import core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0009_auto_20200702_1928'), ] operations = [ migrations.AddField( model_name='raffle', name='finalized', field=models.BooleanField(default=False, verbose_name='finalized'), ), migrations.AlterField( model_name='resultstableentry', name='participant', field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='entries', to='core.Participant', verbose_name='participant'), ), migrations.AlterField( model_name='resultstableentry', name='results_table', field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='entries', to='core.ResultsTable', verbose_name='results_table'), ), migrations.AlterField( model_name='texteditorimage', name='location', field=models.ImageField(upload_to=core.utils.GenerateUniqueFilename('text_editor_images/'), validators=[core.validators.validate_image_size]), ), ]
python
Cannes, for years has been the hub to celebrate not only films but iconic fashion moments too. The most prestigious film festival in the world this year saw Indian stars putting their most fashionable foot forward. There were a plethora of debutants, one being the glamorous Esha Gupta. Over the years her style picks have only gone on to be superior, in perfect tandem with the ongoing trends. She has lived up to the expectations by acing noteworthy looks and making fashionistas take notes too. The actress sure made heads turn as she opted for some of the most sartorial choices that featured midi dresses, dreamy gowns, bodycon numbers - to name a few. Her wardrobe picks had high-end International brands ranging from Nicolas Jebran for her Cannes red carpet appearances. Her other picks included elite designers such as Galvan London, Fendi, Magda Butrym and Julfermilano. Soon after Cannes, she headed to IIFA Awards and she didn’t disappoint there either. Her IIFA look featured a Tony Ward stunning black cut-out gown. Hopping onto the bandwagon of risqué slits, the gown had gorgeous encrustments in gold and the silhouette looked appealing as she carried off the look effortlessly. Esha Gupta has always been known for making some noteworthy fashion choices. As fit and fabulous as she looks, it takes every ounce of confidence to flaunt curated looks that are rounded off with utmost panache. In the last few days, she has indeed proved that her style statements are one to bookmark and it has left fashion critics’ mighty impressed, to say the least.
english
French Prime Minister Édouard Philippe on Wednesday announced an international architects’ competition to rebuild the spire of Notre Dame Cathedral, reported BBC. A massive fire engulfed the historic cathedral in Paris on Monday while renovation work was under way. The cathedral’s spire collapsed under the fire. Philippe said the competition would give the 850-year-old building “a spire suited to the techniques and challenges of our time”. The spire was added to the cathedral during a 19th Century restoration project led by architect Eugène Viollet-le-Duc. Several people, including billionaires, have so far raised €880m (approximately Rs 6,896 crore) to restore the Unesco heritage site. Prime Minister Philippe said the government would present a bill next week to ensure “transparency and good management” during the reconstruction project. French President Emmanuel Macron had on Tuesday promised to rebuild the cathedral within five years. However, experts have expressed their doubts about the time span. French conservation architect Pierluigi Pericolo said it was “a colossal task” that would take “no less than 15 years”.
english
One of the best things to witness in football is the emergence of young talent. What makes it even more special is when they have come through the youth ranks at the same club and then go on to play international football. In the last year, Koke’s emergence at Atletico Madrid and selection for the Spanish national team has matched this progression. Atletico have made a superb start to the season and the young Koke has been integral to this. His form has resulted in a continual run in the Spanish squad which will only aid his development. Playing with the likes of Alonso, Busquets and Iniesta (one could go on) will enhance him as a player and will improve his skills. So far this season he has played eight times for Diego Simeone’s side and he has scored twice and assisted six times. This kind of form for a 21 year old is exceptional and his performance in the derby against Real Madrid made everyone sit up and take note. The departure of star striker Radamel Falcao during the summer was expected to weaken Atletico, but if anything the side maybe even better this season. Their new goal machine Diego Costa has been in scintillating form and the club have made a brilliant start both domestically and in Europe. It was indeed Koke who supplied the pass to Costa for the winner in the derby and it meant that 11 of Costa’s 17 goals have been supplied by the youngster. When Simeone initially took over last season it was clear that the Argentine had seen his talent. However, rather than allow him to display his full array of ability he got him to concentrate on learning about the game. His ‘modus operandi’ was clearly that as part of his development he needed to play deeper; coincidently in the position Simeone played throughout his career. Whilst his creative mindset was not withheld altogether, he appeared to be more of a combative player rather than the assist machine he has been thus far. With the confidence he gained playing under his new coach last season, he is now able to demonstrate to everyone watching what his potential is and could be. If he continues developing under the guidance of Simeone for another few seasons, he will be an exceptional player. It can be haphazard on occasions to give too much positive press to young players, but Koke’s form thoroughly deserves the praise. He has been instrumental in Atletico’s superb start to the season and with the competition for places in Spain’s midfield being so fierce his continual improvement looks a good bet. At 21 years old, the futures of both his club and national side look to be in very safe hands.
english
Malice in Wonderland, a 1982 animation by Vince Collins that will just melt your brain as nude grimalkins do perpetual somersaults and Cheshire grins evolve into the toothy vertical smile of a vagina dentata. To call it surreal would be an understatement: this is what you see after taking the brown acid. I was curious about Vince after watching this, so I googled him up, and lo and behold, he's got a MySpace profile. He's 62 now and here's a shock: he never made it in mainstream Hollywood. He's also a highly entertaining ranter. He's also got one of the best FAQs I've ever seen, filled with perplexed quotes from friends, acquaintances and industry big-wigs who don't get him at all. "Are these pieces examples of malappropisms or are they non-sequiturs??" — George Lucas, Multi-Billionaire. I love this guy. Maybe I should do something on him for Wired.
english
<gh_stars>1-10 import numpy as np import numba ################### numeric data ######################### @numba.njit(fastmath=True) def euclidean(x, y): """Standard euclidean distance. l2 distance ..math:: D(x, y) = \sqrt{\sum_i (x_i - y_i)^2} """ result = 0.0 for i in range(x.shape[0]): result += (x[i] - y[i]) ** 2 return np.sqrt(result) @numba.njit() def manhattan(x, y): """Manhatten, taxicab, or l1 distance. ..math:: D(x, y) = \sum_i |x_i - y_i| """ result = 0.0 for i in range(x.shape[0]): result += np.abs(x[i] - y[i]) return result @numba.njit() def canberra(x, y): result = 0.0 for i in range(x.shape[0]): denominator = np.abs(x[i]) + np.abs(y[i]) if denominator > 0: result += np.abs(x[i] - y[i]) / denominator return result @numba.njit() def chebyshev(x, y): """Chebyshev or l-infinity distance. ..math:: D(x, y) = \max_i |x_i - y_i| """ result = 0.0 for i in range(x.shape[0]): result = max(result, np.abs(x[i] - y[i])) return result ############### binary data ################ @numba.njit() def jaccard(x, y): num_non_zero = 0.0 num_equal = 0.0 for i in range(x.shape[0]): x_true = x[i] != 0 y_true = y[i] != 0 num_non_zero += x_true or y_true num_equal += x_true and y_true if num_non_zero == 0.0: return 0.0 else: return float(num_non_zero - num_equal) / num_non_zero @numba.njit() def rogers_tanimoto(x, y): num_not_equal = 0.0 for i in range(x.shape[0]): x_true = x[i] != 0 y_true = y[i] != 0 num_not_equal += x_true != y_true return (2.0 * num_not_equal) / (x.shape[0] + num_not_equal) @numba.njit() def hamming(x, y): result = 0.0 for i in range(x.shape[0]): if x[i] != y[i]: result += 1.0 return float(result) / x.shape[0] @numba.njit() def dice(x, y): num_true_true = 0.0 num_not_equal = 0.0 for i in range(x.shape[0]): x_true = x[i] != 0 y_true = y[i] != 0 num_true_true += x_true and y_true num_not_equal += x_true != y_true if num_not_equal == 0.0: return 0.0 else: return num_not_equal / (2.0 * num_true_true + num_not_equal) @numba.njit() def kulsinski(x, y): num_true_true = 0.0 num_not_equal = 0.0 for i in range(x.shape[0]): x_true = x[i] != 0 y_true = y[i] != 0 num_true_true += x_true and y_true num_not_equal += x_true != y_true if num_not_equal == 0: return 0.0 else: return float(num_not_equal - num_true_true + x.shape[0]) / ( num_not_equal + x.shape[0] ) @numba.njit() def sokal_sneath(x, y): num_true_true = 0.0 num_not_equal = 0.0 for i in range(x.shape[0]): x_true = x[i] != 0 y_true = y[i] != 0 num_true_true += x_true and y_true num_not_equal += x_true != y_true if num_not_equal == 0.0: return 0.0 else: return num_not_equal / (0.5 * num_true_true + num_not_equal) ################### both ############# @numba.njit() def bray_curtis(x, y): numerator = 0.0 denominator = 0.0 for i in range(x.shape[0]): numerator += np.abs(x[i] - y[i]) denominator += np.abs(x[i] + y[i]) if denominator > 0.0: return float(numerator) / denominator else: return 0.0 @numba.njit() def cosine(x, y): result = 0.0 norm_x = 0.0 norm_y = 0.0 for i in range(x.shape[0]): result += x[i] * y[i] norm_x += x[i] ** 2 norm_y += y[i] ** 2 if norm_x == 0.0 and norm_y == 0.0: return 0.0 elif norm_x == 0.0 or norm_y == 0.0: return 1.0 else: return 1.0 - (result / np.sqrt(norm_x * norm_y)) @numba.njit() def correlation(x, y): mu_x = 0.0 mu_y = 0.0 norm_x = 0.0 norm_y = 0.0 dot_product = 0.0 for i in range(x.shape[0]): mu_x += x[i] mu_y += y[i] mu_x /= x.shape[0] mu_y /= x.shape[0] for i in range(x.shape[0]): shifted_x = x[i] - mu_x shifted_y = y[i] - mu_y norm_x += shifted_x ** 2 norm_y += shifted_y ** 2 dot_product += shifted_x * shifted_y if norm_x == 0.0 and norm_y == 0.0: return 0.0 elif dot_product == 0.0: return 1.0 else: return 1.0 - (dot_product / np.sqrt(norm_x * norm_y)) descriptors_dist = [(euclidean,'euclidean'), (manhattan,'manhattan'), (canberra,'canberra'), (chebyshev,'chebyshev'), (cosine,'cosine'), (correlation,'correlation'), (bray_curtis,'braycurtis')] fingerprint_dist = [(jaccard, 'jaccard'), (rogers_tanimoto, 'rogerstanimoto'), (hamming,'hamming'), (dice, 'dice'), (kulsinski, 'kulsinski'), (sokal_sneath,'sokal_sneath'), (cosine,'cosine'), (correlation,'correlation'), (bray_curtis,'braycurtis')] def GenNamedDist(descriptors_dist, fingerprint_dist): _dist_fuc = {} _all = descriptors_dist.copy() _all.extend(fingerprint_dist) for i in _all: _dist_fuc[i[1]] = i[0] return _dist_fuc named_distances = GenNamedDist(descriptors_dist, fingerprint_dist) if __name__ == '__main__': import pandas as pd x = np.random.random_sample(size=(100,2)) x1 = x.round() res = {} for f,k in descriptors_dist: ks = 'descriptors-' + k res.update({ks:f(x[:,0], x[:,1])}) for f,k in fingerprint_dist: ks = 'fingerprint-' + k res.update({ks :f(x1[:,0], x1[:,1])}) print(pd.Series(res))
python
<filename>src/main/java/com/queekus/pizzachef/data/models/ModBlockStateProvider.java package com.queekus.pizzachef.data.models; import java.util.Collections; import com.queekus.pizzachef.PizzaChef; import com.queekus.pizzachef.blocks.CropBlockMultiHeight; import com.queekus.pizzachef.blocks.ModBlocks; import net.minecraft.data.DataGenerator; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.CropBlock; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraftforge.client.model.generators.BlockStateProvider; import net.minecraftforge.client.model.generators.VariantBlockStateBuilder; import net.minecraftforge.common.data.ExistingFileHelper; public class ModBlockStateProvider extends BlockStateProvider { public ModBlockStateProvider(DataGenerator gen, ExistingFileHelper exFileHelper) { super(gen, PizzaChef.MOD_ID, exFileHelper); } @Override protected void registerStatesAndModels() { growingCrop(ModBlocks.crop_tomato, "crop_tomato"); String localGranitePizzaSlabId = ModBlocks.granite_pizza_slab.getRegistryName().getPath(); simpleBlock(ModBlocks.granite_pizza_slab, models().carpet(localGranitePizzaSlabId, blockTexture(Blocks.POLISHED_GRANITE))); simpleBlockItem(ModBlocks.granite_pizza_slab, models().getExistingFile(modLoc("block/" + localGranitePizzaSlabId))); } private void growingCrop(CropBlock block, String name) { VariantBlockStateBuilder builder = getVariantBuilder(block); for(int i = 0; i <= Collections.max(BlockStateProperties.AGE_7.getPossibleValues()); i++) { for(int j = 0; j <= Collections.max(CropBlockMultiHeight.HEIGHT_2.getPossibleValues()); j++) { String cropFileName = "crop_tomato_" + j + "_" + i; builder.partialState() .with(CropBlock.AGE, i) .with(CropBlockMultiHeight.HEIGHT_2, j) .modelForState().modelFile(models().crop(cropFileName, modLoc("block/" + cropFileName))).addModel(); } } } }
java
Few teams have more to play for in Week 18 than the Miami Dolphins and the Buffalo Bills. Tua Tagovailoa and the Dolphins have faltered of late and now need to win to secure the AFC East. Josh Allen and the Bills control their destiny; if they win, they make playoffs. If they lose, they're outta there. Everyone has to set their lineups with that and all the other Week 18 matchups in mind, especially with this being championship week for some leagues. We've got you covered on that front — check out our full fantasy football rankings below: Best of luck in your Week 18 matchups!
english
Argentina might be getting ever closer to a place in the World Cup final but, on a purely personal level, the tournament has been nothing much to laugh about for Dybala. The Roma playmaker hasn’t played a minute in Qatar, despite the injuries afflicting Argentina on its turbulent run to the quarterfinals and the declining form of forward Lautaro Martinez. So what’s the deal with Dybala, a player affectionately known as La Joya (or “The Jewel”) and a standout in Italian soccer at his best? His biggest impediment is Lionel Messi himself. Dybala’s preferred position is in the No. 10 position or the roving role off the striker -- which happens to be where Argentina’s superstar is best deployed. Given there’s no way a healthy Messi is getting dropped, Dybala has to be moved into another position that doesn’t necessarily suit his game. Then there’s the thigh injury that almost cost him a place in Argentina coach Lionel Scaloni’s squad for the World Cup. It was sustained when he converted a late, winning penalty for Roma in early October and led to him missing eight games for his club. Dybala returned for Roma’s last game before the World Cup, convincing Scaloni that he was healthy enough to be included in the 26-man squad. The coach insists that fitness problems aren’t the reason why Dybala has yet to play at the World Cup. That much can be said about his overall international career. Dybala is 29 and has played 34 games — often as a substitute — for Argentina since his debut in 2015, which doesn’t seem many for a player of his talent. The last of his three goals for the Albiceleste came as a late substitute in the 3-0 win over Italy in the Finalissima — a game between the European and South American champions — in London in June. And his only game time at a World Cup was in 2018, as a 68th-minute substitute in the 3-0 loss to Croatia in the group stage. Argentina eventually exited in the round of 16 against France. There is a chance Dybala could see some action against the Netherlands in the quarterfinals on Friday, though. Ángel Di María was injured against Poland in the final group game and Papu Gómez, who replaced Di Maria in the 2-1 win over Australia in the round of 16, came off in that match with some discomfort in his ankle. According to Argentine media, neither Di María nor Gómez trained with the rest of the squad on Monday, instead doing recovery work separately. That might leave a place in the front three up for grabs against the Dutch. Quoted in Italian newspaper Gazzetta Dello Sport on Monday, Dybala spoke of the “sacrifice” he made to get healthy again after the pre-tournament injury. Collecting a World Cup winner’s medal would make that sacrifice worthwhile. Dybala, one of three outfield players yet to feature so far in the tournament, would just like to play an active role along the way.
english
import React, {PropTypes, Component} from 'react' import {Button, Modal, Form, Select, Input, Upload, Icon, message} from 'antd' const Dragger = Upload.Dragger; import { DATA_SOURCE_PRE_PROCESS_API } from '@/app/containers/ResourceManage/api' import {FormattedMessage} from 'react-intl' // 导入样式 import styles from './res/styles/index.less' const FormItem = Form.Item const Option = Select.Option const TextArea = Input.TextArea @Form.create() export default class DataSourceManageBatchAddTableModal extends Component { constructor(props) { super(props) this.state = { } } render() { const {visible, key, onClose} = this.props const jarUploadProps = { name: 'templateFile', multiple: false, action: `${DATA_SOURCE_PRE_PROCESS_API}/1`, data: { }, headers: { 'Authorization': window.localStorage.getItem('TOKEN') }, onChange(info) { console.info('info', info) const status = info.file.status; if (status === 'done') { if (info.file.response instanceof Object) { message.warn(info.file.response.message) } else { const url = window.URL.createObjectURL(new Blob([info.file.response])); const link = document.createElement('a'); link.href = url; link.setAttribute('download', 'checkResult.zip'); document.body.appendChild(link); link.click(); } } else if (status === 'error') { message.error("文件上传失败!"); } } } return ( <Modal className="top-modal" visible={visible} maskClosable={false} key={key} onCancel={onClose} width={600} title='加表预处理' footer={[<Button type="primary" onClick={onClose}> 返 回 </Button>]} > <form id="preProcessForm" className={styles.preProcessForm} action={`${DATA_SOURCE_PRE_PROCESS_API}/1?token=${window.localStorage.getItem('TOKEN')}`} method="post" encType="multipart/form-data" target="hidden_frame" onChange={() => document.getElementById("preProcessForm").submit()}> <a className={styles.preProcessA} href='###' onClick={() => { document.getElementById("preProcessForm").reset() document.getElementById("preProcessFile").click() }}> 上传Excel文件 <input id="preProcessFile" className={styles.preProcessFile} type="file" name="templateFile"/> </a> </form> </Modal> ) } } DataSourceManageBatchAddTableModal.propTypes = {}
javascript
<reponame>VincentUCLA/mobility-database-catalogs<gh_stars>0 { "mdb_source_id": 447, "data_type": "gtfs", "provider": "Cape Ann Transportation Authority (CATA)", "location": { "country_code": "US", "subdivision_name": "Massachusetts", "bounding_box": { "minimum_latitude": 42.5419781, "maximum_latitude": 42.68462803, "minimum_longitude": -70.9430737, "maximum_longitude": -70.5986306, "extracted_on": "2022-03-16T15:34:34+00:00" } }, "urls": { "direct_download": "http://data.trilliumtransit.com/gtfs/capeann-ma-us/capeann-ma-us.zip", "latest": "https://storage.googleapis.com/storage/v1/b/mdb-latest/o/us-massachusetts-cape-ann-transportation-authority-cata-gtfs-447.zip?alt=media" } }
json
{ "variants": { "": [ { "model": "terrestria:block/rubber_leaves1" }, { "model": "terrestria:block/rubber_leaves2" }, { "model": "terrestria:block/rubber_leaves3" }, { "model": "terrestria:block/rubber_leaves4" }, { "model": "terrestria:block/rubber_leaves5" }, { "model": "terrestria:block/rubber_leaves6" }, { "model": "terrestria:block/rubber_leaves7" }, { "model": "terrestria:block/rubber_leaves8" } ] } }
json
<reponame>eid101/InjazErp /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an 'AS IS' * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2012 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ /* ob-myopenbravo-styles.css */ .OBMyOBLeftColumnLink { text-align: right; } .OBMyOBRecentViews { padding: 10px 4px 0px 0px; text-align: right; } .OBMyOBRecentViewsEntry { text-align: right; } /* ob-widget-styles.css */ .OBWidgetHeaderText { padding: 4px 5px 0px 0px; } .OBWidgetIconMinimize, .OBWidgetIconMinimizeOver, .OBWidgetIconMinimizeDown, .OBWidgetIconMinimizeDisabled { margin: 0px 0px 0px 4px; } .OBWidgetIconMaximize, .OBWidgetIconMaximizeOver, .OBWidgetIconMaximizeDown, .OBWidgetIconMaximizeDisabled { margin: 0px 0px 0px 4px; } .OBWidgetIconRestore, .OBWidgetIconRestoreOver, .OBWidgetIconRestoreDown, .OBWidgetIconRestoreDisabled { margin: 0px 0px 0px 4px; } .OBWidgetIconClose, .OBWidgetIconCloseOver, .OBWidgetIconCloseDown, .OBWidgetIconCloseDisabled { margin: 0px 0px 0px 4px; } .OBWidgetMenuCell, .OBWidgetMenuCellSelected, .OBWidgetMenuCellOver, .OBWidgetMenuCellDisabled, .OBWidgetMenuCellSelectedOver, .OBWidgetMenuCellTitleField, .OBWidgetMenuCellTitleFieldDisabled, .OBWidgetMenuCellTitleFieldDark, .OBWidgetMenuCellTitleFieldSelectedDark, .OBWidgetMenuCellTitleFieldOver, .OBWidgetMenuCellTitleFieldOverDark, .OBWidgetMenuCellTitleFieldSelectedOver, .OBWidgetMenuCellTitleFieldSelectedOverDark { padding: 0px 4px 0px 0px; } .OBWidgetMenuButton img, .OBWidgetMenuButtonOver img, .OBWidgetMenuButtonDown img, .OBWidgetMenuButtonDisabled img, .OBWidgetMenuButtonFocused img, .OBWidgetMenuButtonFocusedOver img { margin: 0px 0px 1px 2px; }
css
{ "private": true, "name": "proposal-hack-pipelines", "description": "Draft specification for Hack-style pipelines.", "author": "xixixao", "license": "MIT", "repository": "xixixao/proposal-hack-pipelines", "scripts": { "spec": "ecmarkup spec.html docs/index.html --assets inline --contributors \"<NAME> (original by <NAME>), Ecma International\" --copyright true --title \"Hack Pipelines\" --status \"proposal\" --stage 0", "watch": "npm run spec -- --watch" }, "devDependencies": { "ecmarkup": "^3.5.1" } }
json
The social network pushes forward with its VR efforts. Facebook is still betting that virtual reality will be the next big computing platform, and part of that plan involves getting developers to create more content to attract more users. "We need to build a lot of technology that's going to help advance and deliver this feeling of presence. The second thing that we need to do is build an ecosystem of all the experiences that needs to be delivered here," Facebook CEO Mark Zuckerberg said at Oculus Connect, its sixth annual virtual reality conference that kicked off at the San Jose McEnery Convention Center on Wednesday. Users have spent more than $100 million on Oculus content, he said. Zuckerberg also unveiled hand tracking for the Oculus Quest and a way for users to access content from the higher-end Rift. Facebook purchased Oculus in 2014 for more than $2 billion. The social network envisions a future in which people will share important moments like their baby's first steps in a way that makes it feel like you're there in person. But Facebook's efforts to make VR mainstream have been bumpy. Oculus has faced shipping delays of its VR headsets, accusations of intellectual property theft from Zenimax, the ousting of founder Palmer Luckey after revelations surfaced he donated to a pro-Trump group and a string of executive departures. Then there are all the data privacy concerns surrounding the world's largest social network that have heightened scrutiny from lawmakers and regulators around the world. To get VR headsets into the hands of more people, Facebook's Oculus has been giving users cheaper options and trying to make the headsets easier to use. The VR company has released a series of headsets, including the lower-end $199 Oculus Go and the higher-end $399 Oculus Quest, that don't require users to connect the device to a computer. The Oculus Rift S is also $399 but needs to be linked to a high-powered computer. The company has also been partnering with creators to release more content in VR, including games that let you explore the world of Star Wars' Darth Vader, slash blocks representing musical beats or feel like you're in the animated show Rick and Morty. You can also watch Netflix shows and YouTube videos in VR. The company is also building a new social VR experience called Horizon. Oculus hasn't released user or sales numbers. Zuckerberg has said he wants to get a billion people into virtual reality.
english
<gh_stars>0 # coding=utf-8 # date: 2018/12/20, 14:23 # name: smz import torch as th import numpy as np import torch.autograd.variable as Variable import torch.nn as nn def demo_one(): grads = [] def hook_grad(grad_in): grads.append(grad_in.data) # x = Variable(th.from_numpy(np.array([1, 2]).astype(np.float32)), requires_grad=True) x = th.tensor([1, 2], dtype=th.float32, requires_grad=True) y = x.pow(2) + 1 z = th.mean(y, dim=0) # z = 1/2 * y || z = 1/2 * (x1^2 + x2^2) || dz/dy1 = 0.5, dz/dy2=0.5, dz/dx1 = 1 * x1, dz/dx2 = 1 * x2 y.register_hook(hook_grad) z.backward() print("x:{}\n".format(x)) print("z:{}\n".format(z)) print("x.grad:{}\n".format(x.grad)) print("y.grad:{}".format(y.grad)) print("z.grad:{}\n".format(z.grad)) print("grads:{}\n".format(grads)) def demo_two(): x = th.tensor([-1, 0, 1, 2], dtype=th.float32, requires_grad=True) x = x.cuda() # 这里不能放到GPU上,否则算出来的梯度为None relu_layer = nn.ReLU() res = relu_layer(x) loss = th.sum(res, dim=0) loss.backward() print("x:{}\n".format(x)) print("x.grad:{}\n".format(x.grad)) if __name__ == "__main__": demo_two()
python
India's pub and bar scene is undergoing significant growth, with niche cocktail bar concepts emerging in smaller towns. Delhi's Sidecar has seen a 60% increase in revenues between 2021 and 2023, while profits have risen by 35-45%. The market is also seeing a rise in niche concepts in Jaipur, such as the Native Cocktail Room, which ranked number one in Bar Wars 2023 and featured in the 50 Best Bars India list. Joshi, who studied at Le Cordon Bleu London and Ferriers in France, set up her pasta business, Casarecce Artisanal Pasta, in the capital city in March as the second wave of Covid-19 was rearing its head. Even the virus could not stop her from kneading— and making dough —ever since. Your local bar probably doesn’t have the money right now to bring in a more-than-$100,000 robot, either. And big-ticket customers like cruise lines, which have been anchored for months, are stuck in a pandemic-induced financial pinch.
english
NAIROBI, Kenya, March 15 – The High Court has now directed 10 suspects in the National Youth Service scam to answer to money laundering charges. Justice Joseph Onguto on Wednesday clarified that order barring plea taking applied only to one of the accused who had challenged the charges. The judge said only Patrik Ogolla will not plead to the charges until a constitutional case he has filed contesting the charges is determined. The prosecution had sought for more time to move to the High Court to seek interpretation of the High Court order after all the suspects failed to appear in court to answer to the charges on claims that the case against all of them was stopped. The case will now be mentioned on March 18 before Chief Magistrate Daniel Ogembo. The 10 suspects include businessman Benson Gethi, Josephine Irungu, John Kago, Charity Wangoi and Paul Kinuthia. Others are Samwel Wachenje alias Sam Mwadime, Antony Gethi, John Hope, Martin Gachara and Jedida Wangari. Last year, the Directorate of Criminal Investigations recommended that 21 officers in the Devolution Ministry be charged with fraud after it found that they had conspired to defraud the ministry. The DCI recommended that the 21 officers to be charged alongside four suppliers whom they paid Sh791,385,000 for the supply of road construction and building materials between December 2014 and April last year. Family Bank was also caught up in the NYS scandal prompting DPP Keriako Tobiko to order a probe of its top managers. Anne Waiguru resigned as Devolution Cabinet Secretary amid the scandal, citing health reasons. In November last year, Josephine Kabura in whose account Sh791 million NYS cash was deposited and redistributed denied charges of embezzling funds when she appeared before chief magistrate Daniel Ogembo. The amount was deposited into the accounts of Kabura’s three companies – Form Home Builders, Reinforced Concrete Technology and Roof and All Trading.
english
Imagine a device that can read your emotions while you navigate your way in heavy traffic? Researchers have developed an emotion detector that can analyse facial expressions and identify which of the seven universal emotions a person is feeling. This technology can be useful in the fields of video gaming, medicine, marketing and also in driver safety, where in addition to fatigue, the emotional state of the driver is also a risk factor. It is not easy to measure emotions within the confines of a car. The solution thus explored by scientists at Swiss Federal Institute of Technology at Lausanne - who specialise in facial detection, monitoring and analysis - was to get drivers' faces do the job. In collaboration with PSA Peugeot Citroen, the scientists adapted a facial detection device for use in a car using an infrared camera placed behind the steering wheel. The problem was to get the device to recognise irritation on the face of a driver. To simplify the task at this stage, researchers Hua Gao and Anil Yuce chose to track only two expressions - anger and disgust. The system 'learned' to identify the two emotions using a series of photos and videos. The detector worked well and irritation could be accurately detected in the majority of cases. When the test failed, it was usually because these emotions varied from individual to individual. "This is where the difficulty would always lie, given the diversity of how we express anger," Gao said. "Additional research aims to explore updating the system in realtime - to complement the static database - a self-taught human-machine interface or a more advanced facial monitoring algorithm," Gao explained.
english
<filename>src/test/java/com/hdh/lifeup/util/ResultTest.java package com.hdh.lifeup.util; import com.fasterxml.jackson.databind.ObjectMapper; import com.hdh.lifeup.model.enums.CodeMsgEnum; import com.hdh.lifeup.model.vo.ResultVO; import org.junit.Test; import java.util.HashMap; public class ResultTest { @Test public void success() throws Exception { ObjectMapper objectMapper = new ObjectMapper(); ResultVO<Object> result = Result.success(); System.out.println(objectMapper.writeValueAsString(result)); } @Test public void success1() throws Exception { ObjectMapper objectMapper = new ObjectMapper(); ResultVO<Object> result = Result.success(new HashMap<String, Object>() { private static final long serialVersionUID = 5593375536518920044L; { put("nick_name", "hdonghong"); put("password", "<PASSWORD>"); } }); System.out.println(objectMapper.writeValueAsString(result)); } @Test public void error() throws Exception { ObjectMapper objectMapper = new ObjectMapper(); ResultVO<Object> result = Result.error(CodeMsgEnum.PARAMETER_ERROR); System.out.println(objectMapper.writeValueAsString(result)); } }
java
{"name":"decamelize","version":"1.1.2","description":"Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/decamelize.git"},"author":{"name":"<NAME>","email":"<EMAIL>","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["decamelize","decamelcase","camelcase","lowercase","case","dash","hyphen","string","str","text","convert"],"dependencies":{"escape-string-regexp":"^1.0.4"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"82c87d3382126375ab0c3b7f5438bfd5eccb18c3","bugs":{"url":"https://github.com/sindresorhus/decamelize/issues"},"homepage":"https://github.com/sindresorhus/decamelize","_id":"decamelize@1.1.2","_shasum":"dcc93727be209632e98b02718ef4cb79602322f2","_from":"decamelize@>=1.0.0 <2.0.0","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"sindresorhus","email":"<EMAIL>"},"dist":{"shasum":"dcc93727be209632e98b02718ef4cb79602322f2","tarball":"http://registry.npmjs.org/decamelize/-/decamelize-1.1.2.tgz"},"maintainers":[{"name":"sindresorhus","email":"<EMAIL>"}],"directories":{},"_resolved":"https://registry.npmjs.org/decamelize/-/decamelize-1.1.2.tgz","readme":"ERROR: No README data found!"}
json
Mumbai, July 22: Superstar Shah Rukh Khan says that he is a struggling writer, who has not taken his calling very seriously, but penned a poem, inspired from "One Direction" star Zayn Malik, for women. Addressing a gathering at the launch of Gunjan Jain's book, Shah Rukh, just before reading from a letter he had written for Jain, said" "I'm also a struggling writer; I have not been able to take my calling very seriously. " During the course of reading the letter, he said, "There was an amazing quote about girls by Zayn Malik that I read. I'd really tried to be with it because of my daughter. So when I met him in London, inspired by his thoughts and his writing, I penned a poem for tonight or at least some rhyming lines that I felt about girls all around the world. "So his quote was more or less this, I've tried to rhyme it. I hope it works. " Shah Rukh's poem: "This is for girls who stay up all night, this is for you who is willing to fight. For hidden fears, hurt, pain and tears, under the smiles, laughs, and giggles we hear. Let your hair down, straight or curls, you're beautiful because you fight like a girl. For girls who wear short skirts, and their heart on their sleeve, for girls who know how difficult it is to believe. The girls who scream and cry to the pillows and tell them their goals, for girls who have a secret, but can't tell a soul. Let your eyes be your diamonds, make them your pearls, you're beautiful because you fight like a girl. For girls who have made mistakes and have regrets galore, for girls that may not win, but always get up from the floor. The girls who take life as comes, the girl who have broken the code, for the girls who hope, that they'll get better somewhere down the road. Let your steps be a dance and jump and do the swirl, you're beautiful because you fight like a girl. For the girls who love with all their heart, although sometimes gets broke, to girls who think it's over, to real girls, all girls, who have tears to soak. You throw, you pick up and fall. But just tell the world I'm beautiful because I fight like a girl. " Shah Rukh's selfie with Zayn Malik from the Asian Awards in London last year had gone viral with Twitter terming it the most retweeted tweet ever in India at that time. He had also reportedly invited Malik for a screening of his last film "Fan".
english
<reponame>lanshanxiang/CMSys<gh_stars>0 package com.feiyue.entiy; public class CommentBean { private String commentId, contents, extent; private String createTime; private UserBean userModel; private NoticeBean noticeModel; public CommentBean() { super(); // TODO Auto-generated constructor stub } public CommentBean(String commentId, String contents, String extent, String createTime, UserBean userModel, NoticeBean noticeModel) { super(); this.commentId = commentId; this.contents = contents; this.extent = extent; this.createTime = createTime; this.userModel = userModel; this.noticeModel = noticeModel; } public String getCommentId() { return commentId; } public void setCommentId(String commentId) { this.commentId = commentId; } public String getContents() { return contents; } public void setContents(String contents) { this.contents = contents; } public String getExtent() { return extent; } public void setExtent(String extent) { this.extent = extent; } public String getCreateTime() { return createTime; } public void setCreateTime(String createTime) { this.createTime = createTime; } public UserBean getUserModel() { return userModel; } public void setUserModel(UserBean userModel) { this.userModel = userModel; } public NoticeBean getNoticeModel() { return noticeModel; } public void setNoticeModel(NoticeBean noticeModel) { this.noticeModel = noticeModel; } }
java
<filename>odoo-13.0/addons/website_forum/tests/__init__.py # -*- coding: utf-8 -*- from . import common from . import test_forum from . import test_forum_process
python
<gh_stars>1-10 # Spring JDBC Postgresql Lob handling sample [![Build Status](https://travis-ci.org/ingogriebsch/sample-spring-jdbc-postgresql-lob-handling.svg?branch=master)](https://travis-ci.org/ingogriebsch/sample-spring-jdbc-postgresql-lob-handling) [![Codecov Status](https://codecov.io/gh/ingogriebsch/sample-spring-jdbc-postgresql-lob-handling/branch/master/graph/badge.svg)](https://codecov.io/gh/ingogriebsch/sample-spring-jdbc-postgresql-lob-handling) [![Codacy Status](https://api.codacy.com/project/badge/Grade/c42734a79fb649be8c35b01fd6d17c7f)](https://www.codacy.com/app/ingo.griebsch/sample-spring-jdbc-postgresql-lob-handling?utm_source=github.com&utm_medium=referral&utm_content=ingogriebsch/sample-spring-jdbc-postgresql-lob-handling&utm_campaign=Badge_Grade) [![DepShield Status](https://depshield.sonatype.org/badges/ingogriebsch/sample-spring-jdbc-postgresql-lob-handling/depshield.svg)](https://depshield.github.io) [![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) This sample shows you how to handle PostgreSQL lobs with Spring JDBC. ## Used frameworks Collection of the mainly used frameworks in this project. There are more, but they are not that present inside the main use case therefore they are not listed here. * [PostgreSQL JDBC](https://jdbc.postgresql.org/documentation/94/index.html) * [Spring JDBC](https://docs.spring.io/spring/docs/4.3.x/spring-framework-reference/html/jdbc.html) * [Spring Boot](https://docs.spring.io/spring-boot/docs/1.5.10.RELEASE/reference/htmlsingle/) * [Testcontainers](https://www.testcontainers.org/) ## License This code is open source software licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0.html).
markdown
A video that has gone viral on social media shows an Eden's whale's unique feeding strategy. The drone footage, captured in the Gulf of Thailand, shows how the whale manages to trap fish in its mouth in behaviour that experts have called "extraordinary". According to the Smithsonian Museum's educational website, Eden's whales (currently the subspecies Balaenoptera edeni edeni) only live along the coast in Indo-Pacific waters and can grow up to 38 feet in length. In this footage - part of an episode on the BBC documentary 'A Perfect Planet' - a huge Eden's whale is seen treading water and keeping its mouth open to create a flow that pulls fish into its mouth. Posted online by wildlife filmmaker Bertie Gregory, the clip shows a number of fish disappearing into the whale's mouth. "By treading water and keeping the corners of their mouth below the surface, a flow is created pulling the fish into the whale's mouth. In the panic, some of the fish also seem to jump out the water and into the whale's mouth! " Mr Gregory while sharing the video on Instagram last week, where it has been viewed over 8 lakh times. The video also made its way to other social media platforms, leaving millions on viewers stunned. On Twitter, it has racked up nearly 4 million views. Indian Forest Service officer Parveen Kaswan termed it an example of "awe inspiring nature". According to Mr Gregory, while the video shows extraordinary behaviour from a whale, this behaviour developed out of the problem of ocean pollution. "This extraordinary behaviour (where the whale treads water! ) is thought to have developed because pollution has made the Gulf of Thailand a hypoxic environment," he wrote. Sewage flow into the ocean has depleted oxygen levels in water to the point where fish can only live on the surface.
english
Oluoch told Capital FM News on Monday that the party supporters must be allowed to pick the most suitable candidate who will guarantee victory in the poll that came about after the Court of Appeal nullified George Wanjohi’s (TNA) March 2013 victory. He dismissed the pronouncement made by the party’s Nairobi MPs and Executive Director Magerer Langat arguing it was not approved by the party’s top decision making organs. “ODM has not formally issued a certificate, so the pronouncement that was made that a decision had been reached at the very best would amount to an intention by the party or a decision that would be subject to the ratification by the Party Leader (who is away in the US for a month) and other organs of the ODM,” he said during interview with Capital FM News at his office. Party members led by, Ababu Namwamba and Nairobi County Governor Evans Kidero have assured Kariuki of a direct nomination from the party as well as their unwavering support. Kidero was picked chairman of a 12 member campaign steering committee which was set up last week. Kariuki, who is a son to Bishop Margaret Wanjiru, was handed the certificate after the General Election but it was recalled 48 hours later by the returning officer and handed to his main challenger, Wanjohi. Kariuki then lodged a petition at the High Court but the election of Wanjohi was upheld, a decision he appealed. Now, Oluoch has declared he will not leave the party should it hand Kariuki direct nomination. The ODM Legal Affairs Secretary disagreed with Namwamba’s assessment that it will be unjust to hold party nominations to pick the flag bearer for Mathare Constituency. “A little bit of respect ought to be accorded to the wishes of the people (of Mathare) so that there is a balance between what is being called a tradition of the party,” Oluoch continued. IEBC confirmed receiving the certificate nullifying the election of Wanjohi as the Mathare MP on March 26. The IEBC is now awaiting National Assembly Speaker Justin Muturi to declare the seat vacant, so that the election will be conducted within 90 days as required by the law.
english
C (deşik aralygy) L (Jemi Uzynlyk) W (ini) H (beýiklik) Faceüzüň reňki: 1. MB / GP (gara reňkli + altyn reňklenen);2.SS / CP (atlas + hrom);3. MB / GB (mat gara + ýarag gara) Funksiýa: çekmäni, şkafyň gapysyny we bezegini we ş.m. Elýeterli: dürli mebel, şkaf, geýimçi, şkaf, aşhana we ş.m.
english
What Is the Most Widely Practiced Religion in the World? Plato and Aristotle: How Do They Differ? Why Was Frederick Douglass’s Marriage to Helen Pitts Controversial? Is It ISIS or ISIL? style, India. in these related Britannica articles:
english
import React, { useRef, useState } from "react"; import { storiesOf } from "@storybook/react"; import useFullscreen from "@rooks/use-fullscreen"; import README from "@rooks/use-mouse/README.md"; const styles = { html: { fontFamily: "'Helvetica Neue', Helvetica, Arial, sans-serif", padding: "30px 10px 0 0", fontSize: "20px", lineHeight: "1.4", color: "#737373", background: "#f0f0f0", WebkitFontSmoothing: "antialiased" }, hr: { border: "none", borderTop: "1px solid #e6e6e6", margin: "20px 0" }, a: { color: "#666" }, h1: { margin: "0", fontSize: "40px", textAlign: "center" }, ul: { padding: "0 0 0 40px", margin: "1em 0", padding: "0", margin: "40px 0 0 0", listStyle: "none" }, button: { fontSize: "13px" }, container: { width: "500px", padding: "30px 20px", margin: "0 auto 50px auto", background: "#fcfcfc", textAlign: "center", border: "1px solid #b3b3b3", borderRadius: "4px", boxShadow: "0 1px 10px #a7a7a7, inset 0 1px 0 #fff" }, demo_img: { cursor: "pointer" }, header_p: { fontSize: "17px" } }; storiesOf("useFullscreen", module) .addParameters({ readme: { sidebar: README } }) .add("basic example", () => <FullscreenDemo />); function FullscreenDemo() { const container = useRef(); const { isEnabled, toggle, onChange, onError, request, exit, isFullscreen, element } = useFullscreen(); const [changeCount, setChangeCount] = useState(0); const [errorCount, setErrorCount] = useState(0); onChange(() => { setChangeCount(changeCount + 1); }); onError(() => { setErrorCount(errorCount + 1); }); return ( <div id="document" style={styles.html}> <section ref={container} id="container" style={styles.container}> <header> <h1 styles={styles.h1}>useFullscreen</h1> <p style={styles.header_p}> Simple react hook for cross-browser usage of the JavaScript{" "} <a style={styles.a} href="https://developer.mozilla.org/en/DOM/Using_full-screen_mode" > Fullscreen API </a> , which lets you bring the page or any element into fullscreen. Smoothens out the browser implementation differences, so you don't have too. </p> </header> <hr style={styles.hr} /> <section> <p>Try out the Fullscreen API</p> <button style={styles.button} onClick={() => { request(container.current); }} > Request </button> <button style={styles.button} onClick={() => { exit(); }} > Exit </button> <button style={styles.button} onClick={() => { toggle(); }} > Toggle </button> <button style={styles.button} onClick={() => request()}> Request document </button> </section> <section> <ul style={styles.ul}> <li id="supported"> Supported/allowed: {JSON.stringify(isEnabled)} </li> <li id="status">Is fullscreen: {JSON.stringify(isFullscreen)}</li> <li> Changed {changeCount} {changeCount !== 1 ? "times" : "time"} </li> <li> {errorCount} {errorCount !== 1 ? "errors" : "error"} </li> <li id="element"> Element:{" "} {element ? `${element.tagName.toLowerCase()} ${element.id}` : "null"} </li> </ul> </section> <input placeholder="Keyboard test" /> <hr style={styles.hr} /> <section> <p>Click the image to make it fullscreen</p> <img id="demo-img" src="https://sindresorhus.com/unicorn" width="500" style={styles.demo_img} onClick={e => { toggle(e.target); }} /> </section> </section> </div> ); }
javascript
After having dreamed of the presidential candidates as little cats (awwww too cute), now they are being nightmared as Disney villains (brrrrrh). At the same time, it must be said that the similarities are rather striking! In your opinion, what is the scariest between Zemmour president AND Zemmour as the villain of Monster and Company? (The answer is... Both! Hihi. Did you find it??) 1. Zemmour / Leon (Monster & Cie) Leon is sneaky, cunning and would do anything to crush others. He blends into the background to secretly prepare a diabolical plan and achieve his ends. Their biggest common point: they are scary and they know it. 2. Le Pen / The Cheshire Cat (Alice in Wonderland) Le Pen loves cats, Cheshire IS a cat. Already, it’s quite convincing, but that’s not all: the Cheshire cat takes malicious pleasure in playing tricks on Alice before seeing her return to her country... You see where I’m coming from? Finally, are we ok that this forced smile in all circumstances, except for a few teeth, is exactly the same on the photos on the left and on the right? 3. Macron / Hans (the Snow Queen) Hans and Macron are two men, relatively young and not disgusting at first sight. In the Snow Queen, this handsome prince who we all trusted from the start, ultimately does not keep any of his promises and turns it upside down to everyone! I’m not saying it’s the same person, I’m just saying we’ve never seen them in the same place at the same time. 4. Jadot / Anton Ego (Ratatouille) Their common point? Bah... The dress and the clear eyes, to begin with! They also share an unusual passion: vegetables. Yes, yes, remember: in Disney, it’s a ratatouille that comes to touch the heart of the terrible food critic. And, in your opinion, what appeases an ecologist more than good organic vegetables? Nothing. CQFD. Yeah, I took the cabbage to find, yeah! Always a perfect blow-dry, a very right look, but above all an aversion to dogs... I don’t have proof that Pécresse doesn’t like these little balls of hair, but wouldn’t it be a form of torture to vote one for her? To meditate. 6. Jean Lassalle / Monsieur Fly (Peter Pan) Monsieur Mouche is: interventions that are not always easy to understand, a whelk charisma, and good wine with friends! Do you see a difference between these two guys? Everything is in the eyes. 8. Roussel / Lyle Tyberius Rourke (Atlantis) It’s all in the attitude this time. They would not have the same hairdresser, these two? In any case, it might not be easy for Roussel to have fun aboard Tyberius Rourke’s ship... Yeah, there’s no hunting at sea! But hey, there’s at least fishing. We do what we can, with what we have, huh. 9. Dupont-Aignan / Judge Claude Frollo (Hunchback of Notre-Dame) Judge is definitely one of Disney’s worst villains. In the cartoon, he accuses the Bohemians of perverting the population and does absolutely everything to expel them from Paris. In short, if he were here today, he wouldn’t be against a little reestablishment of the borders, would he? 10. Arthaud / Yzma (Kuzco) Basically, Yzma wasn’t that bad, but... She got fired and it freaked her out! THE FUCK WORKERS RIGHT. 11. Hidalgo / Mother Gothel (Rapunzel) Mother Gothel is a pretty brunette (when she’s not turning into an old witch) who would rather walk for two days to buy paint than pollute the planet with rotten transport. She lives in the middle of nature, in a tower visibly devoid of any electricity. Apart from the magic side of Disney, I don’t really see any difference between the two women. 12. Poutou / His Candy (Ralph’s World) In addition to the physical resemblance which is quite impressive, we can imagine the scenario very well: Poutou drives Ford cars in a car racing video game. He is too strong and everything is going for the best. AND BAM Ford turns him upside down, releases a new game with a more powerful car, kicks him out, and threatens to fire him. Hit in the heart, he tries to short-circuit the opposing game to regain the upper hand... BUT THIS FILM WAS DIRECTLY INSPIRED BY HIM, IN FACT. It’s all fantasy. But the thing that is neither a joke nor a dream (quite the contrary): it is today that you have to go vote (please). So, to help you, we also made you an honest version of their programs. In all objectivity of course, you know us!
english
<reponame>cabarius/DataViewer # Data Viewer for Pathfinder: Kingmaker ## Download https://www.nexusmods.com/pathfinderkingmaker/mods/106 ## Compile This project depends on [ModMaker](https://github.com/hsinyuhcan/KingmakerModMaker), you need both repos in the same folder, and a folder called `KingmakerLib` including the Dll files. The folder structure should look like: ``` Repos │ ├── KingmakerLib │ ├── UnityModManager │ │ ├── 0Harmony12.dll │ │ └── UnityModManager.dll │ └── *.dll │ ├── KingmakerModMaker │ ├── ModMaker │ │ └── ModMaker.shproj │ └── ModMaker.sln │ └── KingmakerDataViewer ├── DataViewer │ └── DataViewer.csproj └── DataViewer.sln ```
markdown
The Brezza is sold with a 1. 5l petrol in mild hybrid form while it gets a 6-speed automatic or a 5-speed manual gearbox. ( Image Source : Twitter/@SomChaterji ) SUVs are continuing to find favour with Indian car buyers with February 2023 sales indicating that the new Brezza is now India's highest-selling SUV selling nearly 16,000 units at 15,787 units. The Brezza is sold with a 1. 5l petrol in mild hybrid form while it gets a 6-speed automatic or a 5-speed manual gearbox. Following the Brezza, the Nexon continues its strong show with 13,914 units being sold in the same month. The Nexon continues to be the best seller for Tata and is an important car with the EV version also being popular. That said, not just the Nexon but the Tata Punch is also closely following its big brother as it has done 11,169 units in February. The Punch is a smaller SUV positioned below the Nexon and has been a popular choice. In the sub 4m category, you then have the Hyundai Venue and the Kia Sonet which are closely matched in terms of numbers with the Venue being slightly ahead at 9,997 units followed by the Sonet at 9,836 units. However, if we are talking about bigger 4m plus compact SUVs then the Hyundai Creta maintains its lead with sales of 10,421 units and it is the best-selling 4m plus compact SUV. Its closest competitor is the Maruti Grand Vitara which sold 9,183 units. The Creta for long has been the best-selling SUV despite new competition though the Grand Vitara has increased its share over time. After the Grand Vitara, it is the Kia Seltos and the Mahindra Scorpio N which come in next at 8,012 and 6,950 units. The Scorpio N is the most expensive SUV which features amongst the highest-selling SUVs in India and the N version has indeed increased its popularity. Car loan Information:
english
{ "BitsPerSample": 8, "ColorComponents": 3, "EncodingProcess": "Baseline DCT, Huffman coding", "ExifByteOrder": "Little-endian (Intel, II)", "ImageHeight": 1, "ImageSize": "1x1", "ImageWidth": 1, "JFIFVersion": 1.01, "ResolutionUnit": "inches", "Software": "Paint.NET v3.5.8", "XResolution": 96, "YCbCrSubSampling": "YCbCr4:2:0 (2 2)", "YResolution": 96 }
json
<gh_stars>10-100 {"title": "Cumulon: optimizing statistical data analysis in the cloud.", "fields": ["execution model", "computational statistics", "software deployment", "data parallelism", "provisioning"], "abstract": "We present Cumulon, a system designed to help users rapidly develop and intelligently deploy matrix-based big-data analysis programs in the cloud. Cumulon features a flexible execution model and new operators especially suited for such workloads. We show how to implement Cumulon on top of Hadoop/HDFS while avoiding limitations of MapReduce, and demonstrate Cumulon's performance advantages over existing Hadoop-based systems for statistical data analysis. To support intelligent deployment in the cloud according to time/budget constraints, Cumulon goes beyond database-style optimization to make choices automatically on not only physical operators and their parameters, but also hardware provisioning and configuration settings. We apply a suite of benchmarking, simulation, modeling, and search techniques to support effective cost-based optimization over this rich space of deployment plans.", "citation": "Citations (67)", "year": "2013", "departments": ["Duke University", "Duke University", "Duke University"], "conf": "sigmod", "authors": ["<NAME>.....http://dblp.org/pers/hd/h/Huang:Botong", "<NAME>.....http://dblp.org/pers/hd/b/Babu:Shivnath", "Jun Yang.....http://dblp.org/pers/hd/y/Yang_0001:Jun"], "pages": 12}
json
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package poker; /** * * @author <NAME> */ public enum CardSuit { DIAMOND, HEARTS, SPADES, CLUBS; }
java
from db import get_connection, get_from_datamaster from db.tables import traits requirements = [traits] def build(): datamaster = get_from_datamaster("EquipTraits.csv") trait_rows_with_stats_by_text = { row["Text"]: row for row in datamaster if row["TraitPropertyName"] == "Stat"} with get_connection() as con: cur = con.cursor() cur.execute("SELECT StatName, Id FROM Stats") stat_ids_by_name = {cur_row[0]: cur_row[1] for cur_row in cur.fetchall()} cur.execute("DROP TABLE IF EXISTS TraitStats") cur.execute("CREATE TABLE TraitStats(" "Id INTEGER PRIMARY KEY AUTOINCREMENT, " "Trait INTEGER, " "Stat INTEGER, " "FOREIGN KEY(Trait) REFERENCES Traits(Id) ," "FOREIGN KEY(Stat) REFERENCES Stats(Id))") for trait in traits.read(): text = trait["text"] trait_row_from_datamaster = trait_rows_with_stats_by_text.get(text) if trait_row_from_datamaster: trait_id = trait["id"] stat_id = stat_ids_by_name[ trait_row_from_datamaster[ "TraitPropertyValue"]] cur.execute("INSERT INTO TraitStats (" "Trait, Stat) " "VALUES (\"{}\", \"{}\")".format( trait_id, stat_id))
python