text
stringlengths
1
1.04M
language
stringclasses
25 values
<reponame>LouisRenWeiWei/JXADF package com.jxtech.action; import com.jxtech.common.JxActionSupport; import com.jxtech.util.StrUtil; /** * * @author <EMAIL> * @date 2013.07 * */ public class TestAction extends JxActionSupport { private static final long serialVersionUID = 1L; private String app; private String pagenum;// 当前页号 public String getApp() { return app; } public void setApp(String app) { this.app = app; } @Override public String execute() throws Exception { if (!StrUtil.isNull(app)) { app = StrUtil.getSplitFirst(app).toLowerCase(); return app; } return super.execute(); } public String getPagenum() { return pagenum; } public void setPagenum(String pagenum) { this.pagenum = pagenum; } }
java
Roseanne Barr, the controversial former reality star and comedian, has once again found herself at the center of a storm. Her recent comments about the Holocaust on comedian Theo Von's podcast, This Past Weekend, have sparked widespread outrage and condemnation across social media platforms. Roseanne Barr is not only known for her comedic stint but also for her many controversial remarks, adding to it her recent statement on the Von's podcast deemed "reprehensible and irresponsible," have drawn fierce criticism from fans and the public alike. One even wrote: The reason behind "She's Jewish" is trending on Twitter is the one and only Roseanne Barr. In a recent episode of This Past Weekend with Theo Von, while talking about the recent political and social climate, Barr commented "Nobody died in the Holocaust. " The 70-year-old who got cancelled in 2018 because of her racial tweets went on to state: "Six million Jews should die right now because they cause all the problems in the world. But, it never happened. It never happened. " Roseanne's comments caused a raging storm on social media as fans took to Twitter to express their anger. Some felt that "she has lost her mind": While there were some netizens who defended her by pointing out that the comments were meant to be sarcasm and it has been taken out of context, as some wrote: In her tirade during the podcast, she expressed her frustration with what she perceives as the suppression of truth by social media platforms. Barr's comments took a shocking turn when she mentioned the Holocaust, using its denial as a means to support her argument against what she called "mandated truths. " She explained: People not only came for Barr, but also for the podcast host, Theo Von who enabled her comments during the episode. Roseanne confirmed on the podcast she is "100% Jewish" has previously received backlash for her controversial views on Jews and Israel. In 2009, for the magazine cover of Heeb magazine she dressed as Adolf Hitler pulling people-shaped cookies out of the oven. In defense her son, Jake Pentland on Tuesday told TMZ: "We are embarrassed that people are stupid enough not to recognize Roseanne is being sarcastic. We think it's funny that people are so stupid. Let's stop doing this clickbait s**t, we need to focus on big problems in America. Focusing on out-of-context clips is what morons do. " Roseanne Barr gained fame as a renowned comedian and was given her own show, "Roseanne," in 1988. The program enjoyed immense success on ABC, running for a decade before a brief revival in 2018. However, the network made the decision to cancel the show in May of the same year due to Barr's racially insensitive post about a Black political advisor and her endorsement of conspiracy theories like QAnon and Pizzagate. Barr in response to all the hatred received says she will address it on her upcoming episode of The Roseanne Barr podcast on Thursday.
english
An Ulta Beauty store in Northern Illinois was robbed in broad daylight over the weekend and a stupefied customer caught the whole thing on video. The video shows at least three culprits wearing masks as they stuff beauty products into black bags. A man filming the heist on his phone is clearly shocked at the scene unfolding before him. "Look at this! Wow. Insane," the man says. "This is in the middle of Ulta, right now! " Other customers can be seen milling about in the background not interfering with the robbery underway. A high-pitched security alarm can be heard overhead. The self-appointed chronicler of the robbery films the suspects bolting out of the store with their bags in hand. "Look at this! Insane! " he says. The store where the robbery took place is located in Norridge, Illinois – about 15 miles northwest of Chicago. Norridge police were not available for comment. A manager for the store refused to comment when reached by Fox News. She referred all questions to a media spokesperson. "At Ulta Beauty, the safety of our associates and guests is our highest priority," Eileen Ziesemer, vice president of public relations for Ulta, told Fox News. "We are aware of the criminal activity at our Norridge store over the weekend and are fully cooperating with local police as they conduct the investigation. " Ziesemer said no one was injured in the robbery.
english
<reponame>smronju/vue-dropzone { "name": "vue-dropzone", "version": "1.0.4", "description": "A vue wrapper component for dropzone.", "main": "VueDropzone.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [ "vue", "component", "dropzone", "drag", "drop", "drag n drop", "drag and drop" ], "author": "<NAME>", "license": "MIT", "peerDependencies": { "vue": "^1.0.26" }, "dependencies": { "dropzone": "^4.3.0" } }
json
AEW star Jungle Boy made his first entrance as a heel tonight for his FTW Championship match against Hook. He rocked new gear and debuted a new theme song; however, the theme song drew mixed reviews. For the longest time, 'Jungle Boy' Jack Perry has had a theme song fans can chant and sing along to. This helped him draw positive reactions over the years, with many saying that his theme song is the main reason. But a new persona meant that he needed a new entrance. Today, Jungle Boy debuted his new theme song as a heel at AEW Dynamite: Blood and Guts. To the surprise of many, he came out to Beethoven's Symphony No. 5. This was the instrumental itself, with no remix or edits – just the raw classical masterpiece. Fans have provided different reactions to the theme song, with most on the negative side. Fans likened Jungle Boy's new theme to Gunther's first entrance music on WWE's main roster. Gunther and Imperium made heads turn with their entrance as they came out to Dvořák's Symphony No. 9 in E Minor. The AEW star was coined as a "wannabe" Gunther, entering with a classical piece but not being nearly as menacing as the Austrian star. Other fans have simply reacted to the song choice and garb alone, but it still received mixed reactions. One fan reacted optimistically, saying that the redeeming factor for this is the fact that Symphony No. 5 was used. Another suggested that this combination for Jungle Boy's entrance may have been done on purpose. For several weeks, AEW stars Jungle Boy and Hook have had a number of backstage scuffles. After being betrayed at AEW x NJPW: Forbidden Door, the Cold-Hearted Handsome Devil did all he could to get his hands on Jack Perry. After several cat-and-mouse chases, Jungle Boy stepped away from the promotion, saying he'll go on vacation until he gets a shot at the FTW Championship. He posted a picture of himself on Twitter, saying that this was his much-needed away time from Hook. "Having a nice time far away from that thug Hook. " Check out the tweet here. Fans may need to get used to Jungle Boy's new theme song. He has just won the FTW Championship, so everyone can expect more appearances from him and his new belt. What are your reactions to Jungle Boy's new heel theme song? Let us know your thoughts in the comments section below.
english
Earlier this year, HTC launched the public beta for a virtual reality (VR) video conferencing platform called Vive Sync. It’s similar in many ways to Zoom and Microsoft Teams, both of which have become mainstays of working life during the pandemic, but with one key difference - Sync meetings quite literally have an extra dimension. The Taiwanese company - maker of the popular HTC Vive range of VR headsets - invited TechRadar Pro to sample the Vive Sync experience, hosted by President and GM EMEA Graham Wheeler. Less than an hour inside the headset was enough to show us precisely why HTC is so enthusiastic about the fledgling service and its place in the future of work. The platform remains in beta, so is naturally lacking in polish in some areas, but we didn’t need bells and whistles to grasp the core concept: with virtual reality, remote working need not feel quite so remote. What is Vive Sync? Vive Sync is HTC’s first foray into the world of collaboration tools, although TechRadar Pro can confirm it won’t be the company’s last. Sync has all the same features as a regular video conferencing service, but eschews the traditional grid of faces in favor of a three dimensional arena, where attendees are joined by the avatars of up to 30 fellow participants. You can move about the generous space, turn your body and head to listen directly to whomever is speaking and also gesticulate with your arms, which are tracked by hand controllers. Wheeler was even sporting additional peripherals that tracked his eye and mouth movement, which further added to the sense that we were having a genuine person-to-person interaction. Crucially, Vive Sync is cross-platform service (unlike many virtual reality tools), meaning attendees can join via their PC or laptop too - just with limited functionality. This will be the key to making virtual reality ubiquitous in enterprise. Of course not every business will have the depth of resources to arm all employees with VR equipment, but the cross-platform nature of Vive Sync means that’s not an insurmountable problem. According to Wheeler, the arrival of the platform has coincided happily with a fundamental shift in the world of work, brought about by the pandemic. “VR gives teams the flexibility to work successfully from anywhere in the world - an advancement that is prompting companies to rethink the way they operate,” he said. We joined our Sync meeting using the Vive Pro, HTCs premium enterprise-focused headset, which delivers the greatest performance available, but is also on the expensive side and requires a little more setup than some other headsets. Our reviewer described it as “the best VR headset for the ultra-discerning, financially well-off VR enthusiast,” which rather hits the nail on the head. Anyone that has ever rigged a tethered virtual reality system like this one will know it involves at least a measure of faff. You have to get the headset out, connect the various cables with both your PC and the headset, turn on the lighthouses (which track your position in the room), load up the application etc. For some remote workers (especially those living in small city apartments), space will prove prohibitive, because you need at least a spare 2 x 1.5 meters spare for room-scale VR. Others might argue that the effort it takes to set up outweighs the benefits of joining a meeting in virtual reality. The alternative, for anyone that falls into the above categories, would be to opt for the all-in-one Vive Cosmos, which at least handles its own tracking (although still needs to be connected to a PC) or, even better, the totally untethered Vive Focus Plus. Before you join a meeting, you’ll also need to create and synchronize your avatar, which currently feels more convoluted than it needs to be. You’ll need to download HTC’s standalone avatar builder mobile app, take a selfie to use as the basis for your character and then then fine-tune by tweaking various parameters - be that eyebrow bushiness, nose sharpness or eye bulginess. Once you’re happy with your creation, the app will provide you with a code, which you then need to attach to your account via the Vive Sync website. We’d like to see this whole process streamlined and shifted into the virtual reality application in future builds. There’s no reason you shouldn’t be able to create your avatar inside the headset. Once set-up and avatar creation has been taken care of, however, joining a Vive Sync meeting is as easy as on any other platform. All you need is a room code and password. In terms of core functionality, Vive Sync delivers everything you might expect from a video conferencing or collaboration software - perhaps with the exception of text chat. Participants can communicate over mic, record sessions, pull in documents and presentations, take screenshots, share their PC screen and more. Where Vive Sync differs from traditional conferencing platforms, though, is in its use of three dimensional space. Attendees can sit or stand as they please (though we recommend coming armed with a swivel chair), which could help break up a long day of sitting down at a desk. They can also move across the meeting space, either by physically walking around or via teleportation - a common method of locomotion in VR. Presenters can also import 3D assets into the meeting room, which can be manipulated, annotated and resized on the fly. In our meeting, for example, Wheeler pulled up a model of a phone, circling different elements of the design with a virtual pen as he spoke and rotating the model to inspect each side. If an attendee likes what they see, Sync also offers the ability to react with an animated emoji (to save interrupting verbally) - or even high five the presenter, triggering fireworks. The most striking feature, however, is the floor-to-ceiling cinema screen that rises dramatically at the front of the conference arena when a participant shares a web page, document or presentation. The ability to share your screen is not incredible in itself, but screen-sharing on a display of these proportions certainly is. Even the most dry and incomprehensible graph or pie-chart is made more compelling when blown up to this scale - and that isn’t possible without virtual reality. The main issue we foresee, in terms of functionality, is with taking efficient notes during a Sync meeting. While you have the option to record a meeting and watch back afterwards, that’s not exactly an efficient way to spend your working hours and defeats the object somewhat. The closest feature to a physical notebook and pen is Sync’s voice-to-text audio note facility, which allows users to take both private and public notes mid-meeting. But doing so while continuing to listen to the presenter is near enough impossible. While we had a great time with Sync overall, that’s not to say it doesn’t suffer from any issues - some of which, in fairness, can be attributed to the fact the service remains in beta. Firstly, the current iteration of the PC application is temperamental. It was slow to launch and even slower to log us into our account, sometimes even demanding a restart. We also experienced a slight audio delay (of roughly one or two seconds) during the meeting itself, which made jumping in on the conversation somewhat awkward and served as an unwelcome reminder that the meeting wasn’t actually in-person. Our voice also dropped out at one point, forcing us to communicate with Wheeler using emojis alone, until the issue was resolved by exiting and reentering the meeting. If Vive Sync is to carve out a space for itself in the highly competitive video conferencing market, it will need to get these kinds of fundamentals right first. However, Wheeler is as equally unconcerned about the skeptics and dissenters as he is convinced of the merits of VR in the workplace. Asked what he thought of the idea that platforms like Sync represent a dystopian future for work, he had the following to say: Vive Sync, Wheeler told TechRadar Pro, will remain in beta for the time being while the team continues to deliver regular new updates and fine tune the experience. He was tight-lipped about when the service might launch in full, but we’ll be back with a full review whenever that may be. Sign up to the TechRadar Pro newsletter to get all the top news, opinion, features and guidance your business needs to succeed! Joel Khalili is the News and Features Editor at TechRadar Pro, covering cybersecurity, data privacy, cloud, AI, blockchain, internet infrastructure, 5G, data storage and computing. He's responsible for curating our news content, as well as commissioning and producing features on the technologies that are transforming the way the world does business.
english
<gh_stars>0 @import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;700&display=swap'); * { box-sizing: border-box; } html, body { height: 100%; } body { margin: 0; background-color: #292929; } /*NAVBAR*/ nav { position: absolute; top: 5%; right: 0; left: 0; width: 319px; display: table; margin: 0 auto; transform: translateY(-50%); } nav a { position: relative; width: 33.333%; display: table-cell; text-align: center; color: #949494; text-decoration: none; font-family: Lato, sans-serif;; font-weight: bold; padding: 10px 20px; transition: 0.2s ease color; } nav a:before, nav a:after { content: ""; position: absolute; border-radius: 50%; transform: scale(0); transition: 0.2s ease transform; } nav a:before { top: 0; left: 10px; width: 6px; height: 6px; } nav a:after { top: 5px; left: 18px; width: 4px; height: 4px } nav a:nth-child(1):before { background-color: yellow; } nav a:nth-child(1):after { background-color: red; } nav a:nth-child(2):before { background-color: #00e2ff; } nav a:nth-child(2):after { background-color: #89ff00; } nav a:nth-child(3):before { background-color: purple; } nav a:nth-child(3):after { background-color: palevioletred; } #indicator { position: absolute; left: 5%; bottom: 0; width: 30px; height: 3px; background-color: #fff; border-radius: 5px; transition: 0.2s ease left; } nav a:hover { color: #fff; } nav a:hover:before, nav a:hover:after { transform: scale(1); } nav a:nth-child(1):hover ~ #indicator { background: linear-gradient(130deg, yellow, red); } nav a:nth-child(2):hover ~ #indicator { left: 34%; background: linear-gradient(130deg, #00e2ff, #89ff00); } nav a:nth-child(3):hover ~ #indicator { left: 70%; background: linear-gradient(130deg, purple, palevioletred); } #ytd-url { display: block; position: fixed; right: 0; bottom: 0; padding: 10px 14px; margin: 20px; color: #fff; font-family: Arial; font-size: 14px; text-decoration: none; background-color: #000; border-radius: 4px; box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3); z-index: 125; } /* ABOUT ME */ .container { margin-top: 30%; text-align: center; } .img-profile .circular-img { width: auto; height: 300px; border-radius: 50%; } .main-text { font-family: 'Lato', sans-serif; font-weight: bold; color: white; } .description { color:rgba(255, 255, 255, 0.589); font-family:'Roboto Mono', monospace; font-size: 16px; line-height: 23px; } .description a { text-decoration: none; color:#198f15; } .description a:hover { color:#136910; } .description strong { color:#198f15; } .skill-icons { display: inline-block; padding-bottom: 15px; } .skill-icons i { padding: 10px; font-size: 25px; } @media (min-width:641px){ .container { margin-top: 20%; } .main-text { font-size: 25px; } .description { font-size: 25px; line-height: 30px; padding-left: 30px; padding-right: 30px; } .skill-icons i { font-size:50px; padding-bottom: 20px; } } @media (min-width:801px){ .img-profile .circular-img { height: 400px; } .main-text{ font-size: 35px; } .description { font-size: 25px; } .skill-icons i { font-size:60px; padding-bottom: 20px; } } @media (min-width:1025px) { .container { margin-top: 10%; padding: 0 100px; } .description { line-height: 35px; } }
css
Saturday June 18, 2022, Launched in 2014, PhotoSparks is a weekly feature from YourStory, with photographs that celebrate the spirit of creativity and innovation. In the earlier 620 posts, we featured an art festival, cartoon gallery. world music festival, telecom expo, millets fair, climate change expo, wildlife conference, startup festival, Diwali rangoli, and jazz festival. Treasure Art Gallery in New Delhi is host the month to the unique exhibition, Codes of a future, Traces of the ancient by contemporary artist Anni Kumari. Curated by Sanjana Shah, the solo show combines themes from mathematics and cosmology. The 10 large distinct works fill the carefully designed and lit space, with the black-and-white images profiled in stark contrast. Conveyed with a compelling experience for the audience, the artist connects past and future, material and spiritual. The grids exhibit geometrical precision, capturing intriguing patterns, ratios, and duality. Anni’s previous works included Algorithms and Blurring Boundaries. She has won a range of awards and grants from India and the US. Originally from Jamshedpur, she is a visiting professor at the Department of Visual Arts, Ashoka University. The two-floor gallery was founded by Tina Chandroji, a graduate of the J.J. School of Applied Art. It also hosts seminars, workshops, lectures, discussions, and talk sessions to build communities and conversations around art. The painting series is titled Intersections, Echo, Bluff Point, and Some Equations Have Multiple Identities. The acrylic and oil works on canvas were completed in the period 2018-2022. They are priced from Rs 3.75 lakh to Rs 9 lakh. In this extended interview, Anni shares her artistic journey, creative process, and tips for audiences and artists. Edited excerpts below: Anni Kumari [AK]: For me, art is a constant search to know and experience how we are connected to the cosmos. [AK]: I think my style is a combination of two aspects—functional logic and aesthetics. So if I were to describe it in a (hyphenated) word, I would say “functional aesthetics”. My style developed very gradually after I graduated from art school when I began thinking about my interest in mathematics as a universal language and exploring ritualistic traditions and folk art that have a strong basis in geometry and mathematical logic. Then I did several experiments to devise a methodology that allowed me to work with only one pigment (black) and achieve a form that was dense and nebulous, and had both centripetal and centrifugal properties. What I intend to convey to the audience is the experience of looking at a form that has spatial/cosmic relevance and to allow them to think of the labour and the time involved in the process of creation. [AK]: I usually take different approaches for different works, but mostly it all begins with an observation that I then develop by researching and reading about it. Then follows a series of small-scale drawings, mostly based on memory and intuition. I then look through several visual references in an attempt to decide how I would go about creating large-size drawings involving precise geometrical forms with lots of minute details. Once the structural aspect of my drawing is clear to me, then begins the laborious process of precise brushwork that continues for several weeks and months before the work is ready. [AK]: I think the best way to learn, grow and to move ahead is to keep making and displaying works. Because that is the only way we can understand how scale, materials, space, and light play a very important role in the way the work is viewed and experienced. [AK]: My journey has been slow but consistent. I have had two solo shows and three curated group shows in India in the past one year. I have created about 20 large-scale works in the past two and half years. [AK]: I have taught both theory and practice courses at various institutions in India and currently I am a visiting faculty in the Department of Visual Arts at Ashoka University, Sonipat. I have also conducted several workshops, especially for children as part of two fellowship programmes by ArtReach India. [AK]: For me success means sustenance. As long as I can sustain my practice and can touch the life of another person in some way through art-making or teaching, I feel successful. [AK]: By bringing in structural and policy change in art education with more grants, scholarships and fellowships for art projects, exhibition-making, research, writing and dissemination of knowledge on art practices through collaborations between institutions, organisations, and individuals. [AK]: I created a series of three works, each 7X5 feet, with acrylic and oil on canvas, called Intersections. These works were created through a laborious process involving a precise construction of vertical, horizontal and spiral grids using beam compass, protractors and scales of different kinds. Natural numbers between 1 and 1,00,000 were plotted onto the spiral grids. I then selected prime numbers and a combination of prime and composite numbers from the rest of the numbers. This led to the creation of unique mathematical patterns that have a close connection with the calculation of days, months and the occurrence of cosmic phenomena such as the eclipses followed in the ancient Luni-solar calendars called Panchang. [AK]: I am working on a series of large-scale collages and a set of multiple drawings based on ancient astronomical instruments, known as yantras. [AK]: There is a renewed interest in my works post the opening of the show. Most people have appreciated the way the works have been displayed. I have got critical responses in terms of what other materials I could use for my works and the way I could divide my works into parts. For me, this was an opportunity to see how a body of my works came together and also to be able to view past and more recent works simultaneously. This has given me new ideas about revisiting some of the projects that I had initiated earlier but have not taken them ahead. I also realised the importance of documenting the different stages of my process. Hopefully, I plan to display fragments of the making of the works for my forthcoming shows. [AK]: I think it has allowed me to slow down and to devote myself more fully to art-making and gardening. The focus of my practice remains unchanged but there is an element of mortality that is gradually entering my works. [AK]: I would say that the audience needs to encounter the works with fresh eyes, without thinking too much about the message or the meaning behind the works. We have a real need to be surrounded by beauty and this joy of seeing something beautiful is in itself the message. [AK]: Work hard, be patient and trust your intuition! Now, what have you done today to pause in your busy schedule and find new avenues to apply your creativity? (All exhibition photographs were taken by Madanmohan Rao on location at Treasure Art Gallery.) See also the YourStory pocketbook ‘Proverbs and Quotes for Entrepreneurs: A World of Inspiration for Startups,’ accessible as apps for Apple and Android devices.
english
# [Repositório público de Marcio Coelho](https://github.com/coelhomarcio/) [<img align="right" src="img/bg/logo.png" width="200">](https://coelhomarcio.github.io/si-1st-ccw-bg/) ## [Blind Guardian](https://coelhomarcio.github.io/si-1st-ccw-bg/) Projeto da disciplina _Criação de Conteúdo na Web_ realizado no 1º Ciclo do Curso de _Sistemas para Internet_ pela **Fatec Rubens Lara**. ### Integrantes - <NAME> [✉️](mailto:<EMAIL>) - <NAME> [✉️](mailto:<EMAIL>) - <NAME> [✉️](mailto:<EMAIL>) - <NAME> [✉️](mailto:<EMAIL>) - <NAME> [✉️](mailto:<EMAIL>) - <NAME> [✉️](mailto:<EMAIL>) Profa. Dra. <NAME> [<img align="right" src="img/po/logo.svg" width="200">](https://coelhomarcio.github.io/si-1st-ppsi-i-po/) ## [Projeto Orientado](https://coelhomarcio.github.io/si-1st-ppsi-i-po/) Projeto da disciplina _Padrões de Projeto de Sítios Internet I_ realizado no 1º Ciclo do Curso de _Sistemas para Internet_ pela **Fatec Rubens Lara**. ### Integrantes - <NAME> [✉️](mailto:<EMAIL>) - <NAME> [✉️](mailto:<EMAIL>) - <NAME> [✉️](mailto:<EMAIL>) Prof. Me. <NAME> [<img align="right" src="img/a01/logo-fatec.png" width="200">](https://coelhomarcio.github.io/si-2nd-ppsi-ii-a01/) ## [Avaliação 01](https://coelhomarcio.github.io/si-2nd-ppsi-ii-a01/) ### [Descrição](https://coelhomarcio.github.io/si-2nd-ppsi-ii-a01/readme/) --- > "... the total was greater than the sum of the parts." - _<NAME>_
markdown
When you think of Hollywood’s most versatile and captivating actresses, Sanaa Lathan inevitably comes to mind. Known for her riveting performances and stunning beauty, Sanaa has carved a niche for herself in an industry that’s as competitive as it gets. Well, grab a cup of coffee, sit back, and let’s unravel this intriguing tale together. Table of Information about Sanaa Lathan: |$5 million (as of 2023) Who is Sanaa Lathan? Born on September 19, 1971, in New York City, Sanaa McCoy Lathan had the arts in her blood. Her father, Stan Lathan, is a well-known television director, and her mother, Eleanor McCoy, was an actress and dancer. With such a rich artistic background, it’s no surprise that Sanaa was destined for the limelight. Sanaa Lathan is not just another name in Hollywood; she’s a brand, a force to be reckoned with. She made her acting debut in a 1996 episode of the television show “In The House,” but it was her role as Monica Wright in “Love & Basketball” that catapulted her to stardom. Over the years, she’s given us memorable performances in movies like “The Best Man,” “Alien vs. Predator,” and “The Perfect Guy,” to name a few. When it comes to accolades, Sanaa’s trophy cabinet is far from empty. She’s been honored with prestigious awards like the NAACP Image Award and the Black Reel Award. Her performances have not only been critically acclaimed but have also won her a massive fan following. Is Sanaa Lathan Married? The internet has been abuzz with rumors and speculations about Sanaa Lathan’s marital status for years. From alleged secret weddings to sightings of her wearing what appeared to be a wedding ring, the rumor mill has been in overdrive. But what’s the truth? Sanaa Lathan is notoriously private about her personal life. She’s one of those celebrities who prefer to keep their private matters just that—private. In various interviews, she’s been quite coy about her relationship status, often diverting the conversation back to her career or other interests. As of now, there’s no concrete evidence to suggest that Sanaa Lathan is married. Unless the actress herself comes forward to confirm or deny these rumors, it’s all just speculation. But that doesn’t mean we can’t delve into her past relationships to get a clearer picture, can we? Sanaa Lathan’s love life has been as diverse and interesting as her filmography. In her early years in the industry, she was linked to several co-stars, although nothing was ever confirmed. It’s often said that Hollywood romances are hard to keep track of, and Sanaa’s early relationships are a testament to that. Over the years, Sanaa has been linked to some of the most eligible bachelors in and out of Hollywood. One of her most talked-about relationships was with NFL star Colin Kaepernick. When she posted a date-night photo with him on Instagram, the internet went into a frenzy. Sanaa’s name has also been linked with other celebrities like Tyrese Gibson, French Montana, and Omar Epps. While some of these relationships were confirmed by either party, others remain in the realm of speculation. But one thing’s for sure: Sanaa’s love life has never been dull. In a world that often equates a woman’s worth with her relationship status, Sanaa Lathan stands as a beacon of self-love and independence. She has often spoken about the joys and challenges of being a single woman in Hollywood. In interviews, she’s emphasized that being single is not a status but a word that describes a person who’s strong enough to live and enjoy life without depending on others. While Sanaa relishes her single status, she’s also expressed a desire for companionship. In a candid interview, she once mentioned that she looks forward to finding her life partner but is in no rush. For her, it’s about the journey, not the destination. She believes in letting love happen organically, without forcing it or setting timelines. Sanaa Lathan is a strong advocate for self-worth. She believes that one should be complete within oneself before entering into a relationship. Her philosophy is that you don’t need someone to complete you; you only need someone to accept you completely. This refreshing perspective on relationships sets her apart in an industry where fairy-tale romances are often glorified. With a career that spans over two decades and includes a variety of roles in both film and television, Sanaa Lathan has built quite the financial empire. As of 2023, her estimated net worth stands at a whopping $5 million. Her earnings come from a mix of acting gigs, brand endorsements, and other business ventures. Don’t Miss: Nia Long Net Worth: How She Earned Her $10 Million Fortune? Sanaa enjoys a luxurious lifestyle, thanks to her hard-earned money. From owning a beautiful home in Los Angeles to driving high-end cars, she lives life on her terms. But don’t mistake her for just another spendthrift Hollywood star; Sanaa is known for her philanthropic efforts and believes in giving back to society. While details about her investments are scant, it’s clear that Sanaa is not just an actress but also a savvy businesswoman. She’s been involved in various ventures outside of acting, which contribute to her impressive net worth. This multi-faceted approach to her career makes her one of the most financially stable actresses in Hollywood. Beyond her life on screen, Sanaa Lathan is deeply committed to making a difference in the lives of others. She founded the Sanaa Lathan Foundation with the aim of helping young women who are aging out of the foster care system. The foundation provides these young women with emotional support, educational opportunities, and the life skills needed to navigate adulthood successfully. Sanaa’s philanthropic efforts don’t end with her foundation. She’s been actively involved in various causes, including mental health awareness and women’s rights. She uses her platform to shed light on issues that are often overlooked, making her a true role model in every sense of the word. The impact of Sanaa’s charitable efforts is far-reaching. Through her foundation and activism, she’s touched the lives of countless individuals, providing them with hope and opportunities for a better future. It’s this commitment to social causes that sets her apart from many of her contemporaries in Hollywood. Sanaa Lathan is a name that commands respect and admiration, not just for her incredible talent but also for the person she is off-screen. Whether she’s lighting up the screen with her performances or making a difference through her philanthropic efforts, Sanaa is a force to be reckoned with. As for the question that sparked this deep dive—Is Sanaa Lathan married?—the answer remains elusive. But does it really matter? Sanaa Lathan is a remarkable woman who has achieved so much, both professionally and personally. Her relationship status doesn’t define her; her actions do. So, let’s celebrate Sanaa Lathan for the incredible, multi-faceted woman she is. Whether she’s single or secretly married, one thing is for sure: Sanaa Lathan will continue to captivate us, both on and off the screen, for years to come. Who is Sanaa Lathan’s Husband? The million-dollar question! While the rumor mill has been churning out various theories, there’s no definitive answer to this. Sanaa Lathan has not confirmed being married, so as of now, the actress appears to be single. Is Sanaa Lathan Currently Dating Anyone? Another question that has fans and the media alike buzzing. Sanaa Lathan is notoriously private about her personal life, and as of 2023, she has not confirmed being in a relationship. What is Sanaa Lathan’s Net Worth? As of 2023, Sanaa Lathan’s estimated net worth is around $5 million. Her earnings come from a successful career in acting, brand endorsements, and other business ventures. Has Sanaa Lathan Won Any Awards? Yes, she has! Sanaa Lathan has been honored with several awards, including the NAACP Image Award and the Black Reel Award, among others. What Are Some of Sanaa Lathan’s Most Notable Roles? Sanaa Lathan has given us some iconic performances in movies like “Love & Basketball,” “The Best Man,” “Alien vs. Predator,” and “The Perfect Guy,” to name a few. How Does Sanaa Lathan View Relationships and Marriage? Sanaa has a refreshing perspective on relationships. She believes in self-worth and is in no rush to get married. She’s expressed that she’s open to finding a life partner but wants it to happen organically.
english
package com.teamacronymcoders.contenttweaker.modules.vanilla.fluids; import com.teamacronymcoders.base.blocks.BlockFluidBase; import com.teamacronymcoders.contenttweaker.ContentTweaker; import net.minecraft.block.state.IBlockState; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; public class BlockFluidContent extends BlockFluidBase { private FluidRepresentation fluidRepresentation; public BlockFluidContent(FluidRepresentation fluidRepresentation) { super(fluidRepresentation.getUnlocalizedName(), getFluidContent(fluidRepresentation), fluidRepresentation.getMaterial().getInternal()); this.fluidRepresentation = fluidRepresentation; } @Override public ResourceLocation getResourceLocation(IBlockState blockState) { return new ResourceLocation(ContentTweaker.MOD_ID, this.fluidRepresentation.getUnlocalizedName()); } private static Fluid getFluidContent(FluidRepresentation representation) { Fluid fluid = new FluidContent(representation); FluidRegistry.registerFluid(fluid); FluidRegistry.addBucketForFluid(fluid); return fluid; } }
java
Jon Gruden is fighting the NFL in a lawsuit for leaking emails that led to his resignation as the Las Vegas Raiders head coach back in October 2021. The Super Bowl-winning head coach found himself kind of coaching recently with Derek Carr, who joined the Saints this offseason. Carr was Gruden's quarterback for over seven seasons with the Raiders. Mike Florio of Pro Football Talk noted that helping his former quarterback doesn't help in becoming a head coach again. He added that both he and league were wrong when it came to the emails: "Gruden remains radioactive, both for NFL and college jobs. Of course, the problem traces not to the alleged misconduct of the NFL but the emails he sent. "Someone, however, weaponized those emails with the apparent goal of taking Gruden out. Gruden was wrong, but whoever used those emails against him was wrong, too. " The emails in question were uncovered by the Wall Street Journal three days before his resignation as the Las Vegas Raiders head coach. It contained racist, anti-gay and misogynistic language. His lawsuit claimed "tortious interference" by the league and commissioner Roger Goodell. Gruden asserts that they selectively leaked his emails to push him out as head coach. The lawsuit contends that the NFL had the emails since June 2021. The emails came up in an investigation into workplace conditions with the Washington Commanders as Gruden was communicating with then-Washington executive Bruce Allen. Jon Gruden will have to triumph in his attempt to keep the lawsuit from being sent to arbitration. Currently, that matter is pending in front of the Nevada Supreme Court. The NFL is trying to shield themselves with the commissioner’s authority to handle issues concerning conduct detrimental to the league. Will Jon Gruden ever coach again in the NFL? This question is heavily dependent upon the outcome of the lawsuit as Florio states that Gruden's behavior and the league's behavior are the greater concern: "Regardless of whether Gruden does or doesn’t get another job, the question at trial will be whether a jury can compartmentalize Gruden’s behavior and the league’s behavior. Or the behavior of whoever it was who leaked the emails with the apparent goal of derailing his career. " Jon Gruden started his head coaching career when the Raiders were back in Oakland before being traded to the Tampa Bay Buccaneers ahead of the 2002 season. After seven seasons in Tampa Bay, he took his talents to ESPN for a decade before returning back to Las Vegas in 2018. We'll see if he gets another shot at coaching following the conclusion of his lawsuit against the league. If you use any of the above quotes, please credit Pro Football Talk and H/T Sportskeeda. . Top 5 players BANNED from the NBA for drug use! Shocking names ahead!
english
<filename>sections/1-350.02.json {"text":"","historical":"Legislative History of Laws\n\nFor history of Law 19-168, see notes under § 1-350.01.\n\nDC CODE § 1-350.02\n\nCurrent through December 11, 2012","credits":"(Sept. 20, 2012, D.C. Law 19-168, § 1043, 59 DCR 8025.)","sections":[{"prefix":"a","text":" Notwithstanding any other provision of law, regulation, or Mayor's order, each District agency shall transfer and refer delinquent debts to the Central Collection Unit within 60 days after a financial obligation owed by a person to the District becomes a delinquent debt."},{"prefix":"b","text":" A transfer and referral of a delinquent debt to the Central Collection Unit shall include all documentation and information relating to the delinquent debt, including:"},{"prefix":"1","text":" Documents that verify the existence and amount of the delinquent debt;"},{"prefix":"2","text":" The name and last known address of the delinquent debtor; and"},{"prefix":"3","text":" Any notices issued to the delinquent debtor demanding payment."},{"prefix":"c","text":" The procedure for transfer and referral of delinquent debt by each District agency to the Central Collection Unit, including the format and means of delivery of the information, shall be established by the Central Collection Unit within 120 days of September 20, 2012."}],"division":{"identifier":"I","text":"Government of District."},"title":{"identifier":"1","text":"Government Organization. (Refs & Annos)"},"chapter":{"identifier":"3","text":"Specified Governmental Authority."},"subchapter":{"identifier":"XVII","text":"Delinquent Debt Recovery."},"heading":{"title":"1","chaptersection":"350","identifier":"1-350.02","catch_text":"Responsibility of District agencies to transfer and refer delinquent debt to the Central Collection Unit for collection."}}
json
Australian captain Michael Clarke has praised the efforts of team’s lower-order batsmen to help Australia garner crucial runs in both innings. Australian captain Michael Clarke has praised the efforts of team’s lower-order batsmen to help Australia garner crucial runs in both innings. Clarke was quoted in BCCI. com as saying,” Crucial runs [were scored] in both innings [by the bowlers]. We are calling James Pattinson, Mathew Hayden these days, the way he is batting. Despite a thumping victory in the first Test, Clarke believes the Test series is still wide open and the home side should not underestimate India ahead of the Sydney Test. He said,” It’s a great start to the series. India are a fantastic team [and] we enjoy having them here in Australia and playing against them.
english
<section class="partners"> <div class="container"> <div class="partners__inner inner"> <div class="partners__content content"> <div class="partners__header wrapper"> <h2 class="partners__title title"> Наши партнеры <span aria-hidden="true" class="section-inscription"> партнеры </span> </h2> <p class="wrapper__text text"> Сотрудничаем с более чем 40-а ведущих компаний России и это не все! </p> </div> <div class="partners__slider"> <div class="partners__slider-wrapper"> <a href="#!" class="partners__slide"> <img src="img/svg/twitter.svg" alt="Твиттер" class="partners__slide-image"> <div class="partners__slide-hover"> <p class="partners__slide-description"> <strong class="partners__slide-description-marked">Социальная сеть</strong> для публичного обмена сообщениями при помощи веб-интерфейса </p> </div> </a> <a href="#!" class="partners__slide"> <img src="img/svg/skype.svg" alt="Скайп" class="partners__slide-image"> <div class="partners__slide-hover"> <p class="partners__slide-description"> Бесплатное <strong class="partners__slide-description-marked">проприетарное программное обеспечение</strong> с закрытым кодом, обеспечивающее текстовую, голосовую и видеосвязь. </p> </div> </a> <a href="#!" class="partners__slide"> <img src="img/svg/cocacola.svg" alt="Кока-кола" class="partners__slide-image"> <div class="partners__slide-hover"> <p class="partners__slide-description"> <strong class="partners__slide-description-marked">Американская пищевая компания</strong>, крупнейший мировой производитель и поставщик концентратов, сиропов и безалкогольных напитков. </p> </div> </a> <a href="#!" class="partners__slide"> <img src="img/svg/mts.svg" alt="МТС" class="partners__slide-image"> <div class="partners__slide-hover"> <p class="partners__slide-description"> Разработка <strong class="partners__slide-description-marked">рекламных креативов</strong> для рекламной кампании в instagram </p> </div> </a> <a href="#!" class="partners__slide"> <img src="img/svg/nvidia.svg" alt="Енвидиа" class="partners__slide-image"> <div class="partners__slide-hover"> <p class="partners__slide-description"> Американская технологическая компания, <strong class="partners__slide-description-marked">разработчик графических процессоров и систем</strong> на чипе (SoC). </p> </div> </a> <a href="#!" class="partners__slide"> <img src="img/svg/google.svg" alt="Гугл" class="partners__slide-image"> <div class="partners__slide-hover"> <p class="partners__slide-description"> Американская <strong class="partners__slide-description-marked">транснациональная корпорация</strong>, в составе холдинга Alphabet, инвестирующая в интернет-поиск, облачные вычисления и рекламные технологии. </p> </div> </a> <a href="#!" class="partners__slide"> <img src="img/svg/mts2.svg" alt="МТС" class="partners__slide-image"> <div class="partners__slide-hover"> <p class="partners__slide-description"> Разработка <strong class="partners__slide-description-marked">рекламных креативов</strong> для рекламной кампании в instagram </p> </div> </a> <a href="#!" class="partners__slide"> <img src="img/svg/ikea.svg" alt="Икеа" class="partners__slide-image"> <div class="partners__slide-hover"> <p class="partners__slide-description"> Одна из крупнейших в мире <strong class="partners__slide-description-marked">торговых сетей</strong> по продаже мебели и товаров для дома. </p> </div> </a> </div> </div> </div> <div class="partners__parallax parallax__scene"> <div data-depth="0.4" class="parallax__scene-item partners__parallax-item partners__parallax-item--bucket-first for-desktop"> <img src="img/decoration/bucket.png" alt="Ведро с желтой клейкой жидкостью" /> </div> <div data-depth="0.55" class="parallax__scene-item partners__parallax-item partners__parallax-item--bucket-second for-desktop"> <img src="img/decoration/bucket.png" alt="Ведро с желтой клейкой жидкостью" /> </div> </div> </div> </div> </section>
html
<filename>src/lib.rs pub mod graphics; pub mod scene;
rust
neyo said: i can post it anywhere becos its a combination or both. but why argue over it. well this forum is here to help people nor argue abt it. got it. By the way ur talking it seems this forum made a mistake having two diff sections as every s/w is used with comp h/w..so both r interalated ...is'nt it??
english
D. K. Shivakumar lands in Delhi alone on High Command’s call; Siddharamaiah camping at a hotel with his loyalist MLAs; Sonia Gandhi expected to take final decision later today Bengaluru/New Delhi: As the dilemma over the next Chief Minister of Karnataka continues for consecutive fourth day, with both former Chief Minister Siddharamaiah and KPCC President D. K…. KPCC President D. K. Shivakumar speaks tough making the process of selecting new CLP leader difficult, with Siddharamaiah too sounding adamant Bengaluru: The Congress High Command has found itself in a fix over electing the new leader of Congress Legislature Party (CLP), as both former Chief Minister Siddharamaiah and Karnataka Pradesh Congress Committee (KPCC) President D. K…. Congress Legislature Party meeting at 5 pm today; both leaders lobby for top post Bengaluru: The newly-elected Congress MLAs in Karnataka (Congress Legislature Party – CLP) are meeting at the Conference Hall of the Vidhana Soudha at 5 pm today to discuss the Government formation with leaders eliciting their views on the Chief Ministerial candidate….
english
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content=""> <meta name="author" content=""> <title>Brooks Brown House LLC</title> <!-- Bootstrap core CSS --> <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <!-- Custom fonts for this template --> <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"> <link href='https://fonts.googleapis.com/css?family=Kaushan+Script' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700' rel='stylesheet' type='text/css'> <!-- Custom styles for this template --> <link href="css/agency.css" rel="stylesheet"> </head> <body id="page-top"> <!-- Navigation --> <nav class="navbar navbar-expand-lg navbar-dark fixed-top" id="mainNav"> <div class="container"> <a class="navbar-brand js-scroll-trigger" href="#page-top">Brooks Brown House</a> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"> Menu <i class="fas fa-bars"></i> </button> <div class="collapse navbar-collapse" id="navbarResponsive"> <ul class="navbar-nav text-uppercase ml-auto"> <li class="nav-item"> <a class="nav-link js-scroll-trigger" href="#services">Services</a> </li> <li class="nav-item"> <a class="nav-link js-scroll-trigger" href="#portfolio">Houses</a> </li> <li class="nav-item"> <a class="nav-link js-scroll-trigger" href="#about">About</a> </li> <li class="nav-item"> <a class="nav-link js-scroll-trigger" href="#team">Team</a> </li> <li class="nav-item"> <a class="nav-link js-scroll-trigger" href="#how">Details</a> </li> <li class="nav-item"> <a class="nav-link js-scroll-trigger" href="#contact">Contact</a> </li> </ul> </div> </div> </nav> <!-- Header --> <header class="masthead"> <div class="container"> <div class="intro-text"> <div class="feature-title"> <div class="intro-heading text-uppercase">Brooks<span> Brown </span>House</div> <div class="intro-lead-in text-uppercase">Housing & Community Development</div> </div> <a class="btn btn-primary btn-xl text-uppercase js-scroll-trigger" href="#services">Tell Me More</a> </div> </div> </header> <!-- Services --> <section class="page-section" id="services"> <div class="container"> <div class="row"> <div class="col-lg-12 text-center"> <h2 class="section-heading text-uppercase">Services</h2> <h3 class="section-subheading services-heading text-muted">Assisting families in their transition to build generational wealth through homeownership.</h3> </div> </div> <div class="row text-center"> <div class="how-circle col-md-4"> <!-- added --> <a class="services-link js-scroll-trigger" href="#first-time-hb"> <span class="fa-stack fa-4x"> <i class="fas fa-circle fa-stack-2x text-primary"></i> <i class="fas fa-home fa-stack-1x fa-inverse"></i> </span> </a> <h4 class="service-heading">First-Time Homebuyer</h4> <p class="text-muted">Sit down with a BBH consultant and build a plan that's right for you. Discuss the tools needed to become self sufficient and learn how to get on track to acquiring your first property today! </p> </div> <div class="how-circle col-md-4"> <!-- Added --> <a class="services-link js-scroll-trigger" href="#tenant-hb"> <span class="fa-stack fa-4x"> <i class="fas fa-circle fa-stack-2x text-primary"></i> <i class="fas fa-road fa-stack-1x fa-inverse"></i> </span> </a> <h4 class="service-heading">Tenant to Homebuyer</h4> <p class="text-muted">Rent, restore credit, and learn to earn! Talk with BBH consultants today to find the perfect option for your family while you work to restore credit or save for the future. </p> </div> <div class="how-circle col-md-4"> <a class="services-link js-scroll-trigger" href="#supporter"> <span class="fa-stack fa-4x"> <i class="fas fa-circle fa-stack-2x text-primary"></i> <i class="fas fa-seedling fa-stack-1x fa-inverse"></i> </span> </a> <h4 class="service-heading">Supporter</h4> <p class="text-muted">Chat with us now to find out how to become a supporter! We'll help you find the right price, square footage, and location for your new property. We even help find reliable tenants and replace them when they leave!</p> </div> </div> </div> </section> <!-- Portfolio: Houses Grid --> <section class="bg-light page-section" id="portfolio"> <div class="container"> <div class="row"> <div class="col-lg-12 text-center"> <h2 class="section-heading text-uppercase">Houses</h2> <h3 class="section-subheading text-muted">All homes are situated close to other investors like yourself. Knowing that your neighborhood is safe means peace of mind. </h3> </div> </div> <div class="row"> <div class="col-md-4 col-sm-6 portfolio-item"> <a class="portfolio-link" data-toggle="modal" href="#portfolioModal1"> <div class="portfolio-hover"> <div class="portfolio-hover-content"> <i class="fas fa-plus fa-3x"></i> </div> </div> <img class="img-fluid rotate-90" src="img/portfolio1/01-IMG_1305.JPG" alt="Rooms"> </a> <div class="portfolio-caption"> <h4>Rooms (or House by House)</h4> <p class="text-muted">Description</p> </div> </div> <div class="col-md-4 col-sm-6 portfolio-item"> <a class="portfolio-link" data-toggle="modal" href="#portfolioModal2"> <div class="portfolio-hover"> <div class="portfolio-hover-content"> <i class="fas fa-plus fa-3x"></i> </div> </div> <img class="img-fluid rotate-90" src="img/portfolio1/02-IMG_1306.JPG" alt="bathrooms"> </a> <div class="portfolio-caption"> <h4>Bathrooms</h4> <p class="text-muted">Description</p> </div> </div> <div class="col-md-4 col-sm-6 portfolio-item"> <a class="portfolio-link" data-toggle="modal" href="#portfolioModal3"> <div class="portfolio-hover"> <div class="portfolio-hover-content"> <i class="fas fa-plus fa-3x"></i> </div> </div> <img class="img-fluid" src="img/portfolio1/03-IMG_1534-thumbnail.png" alt="Kitchens"> </a> <div class="portfolio-caption"> <h4>Kitchens</h4> <p class="text-muted">Description</p> </div> </div> <div class="col-md-4 col-sm-6 portfolio-item"> <a class="portfolio-link" data-toggle="modal" href="#portfolioModal4"> <div class="portfolio-hover"> <div class="portfolio-hover-content"> <i class="fas fa-plus fa-3x"></i> </div> </div> <img class="img-fluid" src="img/portfolio1/04-IMG_1536-thumbnail.jpg" alt="Basements"> </a> <div class="portfolio-caption"> <h4>Basements & Living Rooms</h4> <p class="text-muted">Description</p> </div> </div> <div class="col-md-4 col-sm-6 portfolio-item"> <a class="portfolio-link" data-toggle="modal" href="#portfolioModal5"> <div class="portfolio-hover"> <div class="portfolio-hover-content"> <i class="fas fa-plus fa-3x"></i> </div> </div> <img class="img-fluid" src="img/portfolio1/04-IMG_1311.JPG" alt="wide views"> </a> <div class="portfolio-caption"> <h4>Wide Views</h4> <p class="text-muted">Description</p> </div> </div> <div class="col-md-4 col-sm-6 portfolio-item"> <a class="portfolio-link" data-toggle="modal" href="#portfolioModal6"> <div class="portfolio-hover"> <div class="portfolio-hover-content"> <i class="fas fa-plus fa-3x"></i> </div> </div> <img class="img-fluid" src="img/portfolio1/05-IMG_1286-thumbnail.jpg" alt="Full renovations"> </a> <div class="portfolio-caption"> <h4>House #</h4> <p class="text-muted">Description</p> </div> </div> </div> </div> </section> <!-- About --> <section class="page-section" id="about"> <div class="container"> <div class="row"> <div class="col-lg-12 text-center"> <h2 class="section-heading text-uppercase">About</h2> <h3 class="section-subheading text-muted">Our Humble Beginnings</h3> </div> </div> <div class="row"> <div class="col-lg-12"> <ul class="timeline"> <li> <div class="timeline-image"> <img class="rounded-circle img-fluid" src="img/about/01-renata-adrienn-ebvCsRypmxM-unsplash.jpg" alt="Plan"> </div> <div class="timeline-panel"> <div class="timeline-heading"> <h4>March 2018</h4> <h4 class="subheading">PLAN</h4> </div> <div class="timeline-body"> <p class="text-muted">Akim and Mona build a personal plan to acquire two rental properties in 1 year with NO credit or savings.</p> </div> </div> </li> <li class="timeline-inverted"> <div class="timeline-image"> <img class="rounded-circle img-fluid" src="img/about/02-sebastian-mantel-M1qSY_IuF4c-unsplash.jpg" alt="Learn"> </div> <div class="timeline-panel"> <div class="timeline-heading"> <h4>May 2018</h4> <h4 class="subheading">LEARN</h4> </div> <div class="timeline-body"> <p class="text-muted">As Akim's credit improves, he continues to build momentum towards his first home.</p> </div> </div> </li> <li> <div class="timeline-image"> <img class="rounded-circle img-fluid" src="img/about/03-evie-s-zn4Pl32WgWM-unsplash.jpg" alt="Grow"> </div> <div class="timeline-panel"> <div class="timeline-heading"> <h4>August 2018</h4> <h4 class="subheading">GROW</h4> </div> <div class="timeline-body"> <p class="text-muted">Romona's debt decreases as she continues to learn on the road to self sufficiency.</p> </div> </div> </li> <li class="timeline-inverted"> <div class="timeline-image"> <img class="rounded-circle img-fluid" src="img/about/04-cosmic-timetraveler-zh_ofCt2r9c-unsplash.jpg" alt="Earn"> </div> <div class="timeline-panel"> <div class="timeline-heading"> <h4>October 2018</h4> <h4 class="subheading">EARN</h4> </div> <div class="timeline-body"> <p class="text-muted">Romona purchases her first rental property!</p> </div> </div> </li> <li> <div class="timeline-image"> <img class="rounded-circle img-fluid" src="img/about/05-kimson-doan-NmVnsp13JYc-unsplash.jpg" alt="Save"> </div> <div class="timeline-panel"> <div class="timeline-heading"> <h4>May 2019</h4> <h4 class="subheading">SAVE</h4> </div> <div class="timeline-body"> <p class="text-muted">Akim purchases his first rental property!</p> </div> </div> </li> <li class="timeline-inverted"> <div class="timeline-image"> <h4>Be Part <br>Of Our <br>Story!</h4> </div> </li> </ul> </div> </div> </div> </section> <!-- Team --> <section class="bg-light page-section" id="team"> <div class="container"> <div class="row"> <div class="col-lg-12 text-center"> <h2 class="section-heading text-uppercase">Our Amazing Team</h2> <h3 class="section-subheading text-muted">The people who make it happen</h3> </div> </div> <div class="row"> <div class="col how-center"> <div class="team-member"> <img class="mx-auto rounded-circle" src="img/team/portrait-mona2.png" alt="Meet <NAME>"> <h4><NAME></h4> <p class="text-muted">Lead Consultant</p> <ul class="list-inline social-buttons"> <li class="list-inline-item"> <a href="#"> <i class="fab fa-twitter"></i> </a> </li> <li class="list-inline-item"> <a href="#"> <i class="fab fa-facebook-f"></i> </a> </li> <li class="list-inline-item"> <a href="#"> <i class="fab fa-linkedin-in"></i> </a> </li> </ul> </div> </div> <div class="col how-center"> <div class="team-member"> <img class="mx-contain rounded-circle" src="img/team/portrait-akim2.png" alt="Meet Akim"> <h4><NAME></h4> <p class="text-muted">Lead Consultant</p> <ul class="list-inline social-buttons"> <li class="list-inline-item"> <a href="#"> <i class="fab fa-twitter"></i> </a> </li> <li class="list-inline-item"> <a href="#"> <i class="fab fa-facebook-f"></i> </a> </li> <li class="list-inline-item"> <a href="#"> <i class="fab fa-linkedin-in"></i> </a> </li> </ul> </div> </div> </div> <div class="row"> <div class="col-lg-8 mx-auto text-center"> <p class="large text-muted">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut eaque, laboriosam veritatis, quos non quis ad perspiciatis, totam corporis ea, alias ut unde.</p> </div> </div> </div> </section> <!-- How It Works / Details --> <section class="py-5"> <div class="container transparent"> <div id="how" class="bg-fixed how-bg"> <h2 class="how-section-header section-heading text-uppercase">How it Works</h2> <div class="row text-center"> <div class="how-circle col-md-4"> <a class="services-link js-scroll-trigger" href="#first-time-hb"> <span class="fa-stack fa-4x"> <i class="fas fa-circle fa-stack-2x text-secondary"></i> <i class="fas fa-home fa-stack-1x fa-inverse"></i> </span> <h4 class="service-heading service-heading2">First-Time Homebuyer</h4> </a> </div> <div class="how-circle col-md-4"> <a class="services-link js-scroll-trigger" href="#tenant-hb"> <span class="fa-stack fa-4x"> <i class="fas fa-circle fa-stack-2x text-secondary"></i> <i class="fas fa-road fa-stack-1x fa-inverse"></i> </span> <h4 class="service-heading service-heading2">Tenant to Homebuyer</h4> </a> </div> <div class="how-circle col-md-4"> <a class="services-link js-scroll-trigger" href="#supporter"> <span class="fa-stack fa-4x"> <i class="fas fa-circle fa-stack-2x text-secondary"></i> <i class="fas fa-seedling fa-stack-1x fa-inverse"></i> </span> <h4 class="service-heading service-heading2">Supporter</h4> </a> </div> </div> </div> </div> </section> <!-- First Time Homebuyer --> <section class="how-sections py-5" id="first-time-hb"> <div class="container"> <!-- ROW --> <div class="row"> <div class="col-lg-12 text-center"> <h2 class="how-h2 section-heading text-uppercase"> First Time Homebuyer </h2> </div> </div> <!-- ROW --> <div class="row"> <!-- COL-1: HOW --> <div class="col how-1"> <h4 class="how-h4 section-heading text-uppercase">Program</h4> <div class="center-align"> <p> Do you see yourself as a First-Time Homebuyer, but don't know how to navigate the real estate landscape? The journey to home-ownership can be stressful. With our free 30 minute consultation you will talk to a Housing Consultant about your real estate goals. We're here to listen to your needs and work with you every step of the way. </p> </div> </div> <!-- COL-2: Consultation --> <div class="col how-2"> <h4 class="how-h4 section-heading text-uppercase">Consultation</h4> <div class="center-align"> <div class="box-model"> <h6>Step 1</h6> <p> </p> </div> <div class="box-model"> <h6>Step 2</h6> <p> </p> </div> <div class="box-model"> <h6>Step 3</h6> <p> </p> </div> <div class="box-model"> <h6>Step 4</h6> <p> </p> </div> </div> </div> </div> <!-- ROW --> <div class="row"> <!-- COL-1: SEMINAR --> <div class="col how-3"> <h4 class="how-h4 section-heading text-uppercase">Seminar</h4> <div class="center-align"> <!-- <h6></h6> --> <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Magni tempore officia sit nostrum repellendus? Adipisci architecto aspernatur, eius quibusdam exercitationem voluptatum. Voluptatibus voluptate voluptatem, quibusdam aperiam praesentium consequatur earum fugiat!</p> </div> </div> <!-- COL-1: Financial Coaching --> <div class="col how-4"> <h4 class="how-h4 section-heading text-uppercase">Financial Coaching</h4> <div class="center-align"> <h6>Where you are in life?</h6> <ul class="list"> <li>Financial Journey Map</li> <li>Budget Expectations</li> <li>Debt to Income Ratio</li> </ul> <h6>Where do you see yourself & your family in 5 years?</h6> <ul class="list"> <li>Homeownership</li> <li>Life Insurance</li> <li>Passive</li> </ul> </div> </div> </div> <!-- ROW --> <div class="row wide"> <div class="col"> <a class="action btn btn-primary btn-xl text-uppercase js-scroll-trigger" href="#contact">Take Action</a> </div> </div> </div> </section> <!-- Tenant to Homebuyer --> <section class="how-sections py-5 bg-light" id="tenant-hb"> <div class="container"> <!-- ROW --> <div class="row"> <div class="col-lg-12 text-center"> <h2 class="how-h2 section-heading text-uppercase"> Tenant to Homebuyer </h2> </div> </div> <!-- ROW --> <div class="row"> <!-- COL-1: HOW --> <div class="col"> <h4 class="how-h4 section-heading text-uppercase">Program</h4> <div class="center-align"> <p> Do you see yourself as a First-Time Homebuyer, but don't know how to navigate the real estate landscape? The journey to home-ownership can be stressful. With our free 30 minute consultation you will talk to a Housing Consultant about your real estate goals. We're here to listen to your needs and work with you every step of the way. </p> </div> </div> <!-- COL-2: MODEL --> <div class="col model-2"> <h4 class="how-h4 section-heading text-uppercase">Model</h4> <div class="center-align"> <div class="box-model"> <h6>Step 1</h6> <p> Apply for our Homeownership Seminar. </p> </div> <div class="box-model"> <h6>Step 2</h6> <p> Register for the First–Time Homeownership Process. </p> </div> <div class="box-model"> <h6>Step 3</h6> <p> Schedule a consultation with one of our experts. </p> </div> <div class="box-model"> <h6>Step 4</h6> <p> Sit down with a Brooks Brown House consultant to find the right plan to fit your life! </p> </div> </div> </div> <!-- COL-3: CONSULTATION --> <div class="col"> <h4 class="how-h4 section-heading text-uppercase">Consultation</h4> <div class="center-align"> <h6>Where you are in life?</h6> <ul class="list"> <li>Financial Journey Map</li> <li>Budget Expectations</li> <li>Debt to Income Ratio</li> </ul> <h6>Where do you see yourself & your family in 5 years?</h6> <ul class="list"> <li>Homeownership</li> <li>Life Insurance</li> <li>Passive</li> </ul> </div> </div> </div> <!-- ROW --> <div class="row wide"> <div class="col"> <a class="action btn btn-primary btn-xl text-uppercase js-scroll-trigger" href="#contact">Take Action</a> </div> </div> </div> </section> <!-- Supporter --> <section class="how-sections py-5" id="supporter"> <div class="container"> <div class="row"> <div class="col-lg-12 text-center"> <h2 class="how-h2 section-heading text-uppercase"> Supporter </h2> </div> </div> <div class="row"> <!-- COL-1: HOW --> <div class="col"> <h4 class="how-h4 section-heading text-uppercase">Program</h4> <div class="center-align"> <p>By becoming a Supporter you are helping a family build generational wealth.</p> <h6>Benefits:</h6> <ul class="list"> <li>Monthly passive income</li> <li>Wide selection of homes or we build it in your image</li> <li>Continuous tenants who will leave your house in good standing</li> <li>1 year free maintenance on all properties</li> <li>Assistance in growing your wealth in real estate</li> <li>All houses will be on the same block as investors like yourself which means safe streets and control of traffic in the area</li> </ul> </div> </div> <!-- COL-2: MODEL --> <div class="col"> <h4 class="how-h4 section-heading text-uppercase">Model</h4> <div class="center-align"> <div class="box-model"> <h6>Step 1</h6> <p> Supporter sits down with Brooks Brown House consultant to find the right price, square footage, and locations for porperty.</p> </div> <div class="box-model"> <h6>Step 2</h6> <p> Suporter waits 30 days to 3 months for Brooks Brown House complete investment property and return.</p> </div> <div class="box-model"> <h6>Step 3</h6> <p> Brooks Brown House will qualify eligible families for the <span class="bold">Tenant to Homebuyer</span> program, after apporval the family will sign to be placed in <span class="bold">Supporters Property</span>. </p> </div> <div class="box-model"> <h6>Step 4</h6> <p> After Tenant completes one year and is in good standing with the Landlord, tenants will qualify for <span class="bold">BBH Tenant to Homebuyer</span> program. BBH will replace your tenant when they transition. <span class="bold">Experience less turnover risk with our program!</span> </p> </div> </div> </div> </div> <!-- ROW --> <div class="row wide"> <div class="col"> <a class="action btn btn-primary btn-xl text-uppercase js-scroll-trigger" href="#contact">Take Action</a> </div> </div> </div> </section> <!-- Contact --> <section class="page-section" id="contact"> <div class="container"> <div class="row"> <div class="col-lg-12 text-center"> <h2 class="section-heading text-uppercase">Contact Us</h2> <h3 class="section-subheading text-muted">Lorem ipsum dolor sit amet consectetur.</h3> </div> </div> <div class="row"> <div class="col-lg-12"> <form id="contactForm" name="sentMessage" novalidate="novalidate"> <div class="row"> <div class="col-md-6"> <div class="form-group"> <input class="form-control" id="name" type="text" placeholder="Your Name *" required="required" data-validation-required-message="Please enter your name."> <p class="help-block text-danger"></p> </div> <div class="form-group"> <input class="form-control" id="email" type="email" placeholder="Your Email *" required="required" data-validation-required-message="Please enter your email address."> <p class="help-block text-danger"></p> </div> <div class="form-group"> <input class="form-control" id="phone" type="tel" placeholder="Your Phone *" required="required" data-validation-required-message="Please enter your phone number."> <p class="help-block text-danger"></p> </div> </div> <div class="col-md-6"> <div class="form-group"> <textarea class="form-control" id="message" placeholder="Your Message *" required="required" data-validation-required-message="Please enter a message."></textarea> <p class="help-block text-danger"></p> </div> </div> <div class="clearfix"></div> <div class="col-lg-12 text-center"> <div id="success"></div> <button id="sendMessageButton" class="btn btn-primary btn-xl text-uppercase" type="submit">Send Message</button> </div> </div> </form> </div> </div> </div> </section> <!-- Footer --> <footer class="footer"> <div class="container"> <div class="row align-items-center"> <div class="col-md-4"> <span class="copyright">Copyright &copy; Brooks Brown House LLC 2019</span> </div> <div class="col-md-4"> <ul class="list-inline social-buttons"> <li class="list-inline-item"> <a href="#"> <i class="fab fa-twitter"></i> </a> </li> <li class="list-inline-item"> <a href="#"> <i class="fab fa-facebook-f"></i> </a> </li> <li class="list-inline-item"> <a href="#"> <i class="fab fa-linkedin-in"></i> </a> </li> </ul> </div> <div class="col-md-4"> <ul class="list-inline quicklinks"> <li class="list-inline-item"> <a href="#">Privacy Policy</a> </li> <li class="list-inline-item"> <a href="#">Terms of Use</a> </li> </ul> </div> </div> </div> </footer> <!-- Portfolio Modals --> <!-- Modal 1 --> <div class="portfolio-modal modal fade" id="portfolioModal1" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="close-modal" data-dismiss="modal"> <div class="lr"> <div class="rl"></div> </div> </div> <div class="container"> <div class="row"> <div class="col-lg-8 mx-auto"> <div class="modal-body"> <!-- Project Details Go Here --> <h2 class="text-uppercase">1706 E Federal St.</h2> <p class="item-intro text-muted">Townhouse - $ Price range</p> <!-- IMGS --> <img class="rotate-90 img-fluid d-block mx-auto" src="img/portfolio1/01-IMG_1305.JPG" alt="Living Room"> <img class="rotate-270 img-fluid d-block mx-auto" src="img/portfolio1/01-IMG_1316.JPG" alt="Living Room"> <img class="rotate-90 img-fluid d-block mx-auto" src="img/portfolio1/01-IMG_1320.JPG" alt="Living Room"> <!-- --> <p>Use this area to describe your project. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Est blanditiis dolorem culpa incidunt minus dignissimos deserunt repellat aperiam quasi sunt officia expedita beatae cupiditate, maiores repudiandae, nostrum, reiciendis facere nemo!</p> <ul class="list-inline"> <li>Date: January 2017</li> <li>Client: Threads</li> <li>Category: Illustration</li> </ul> <button class="btn btn-primary" data-dismiss="modal" type="button"> <i class="fas fa-times"></i> Close Project</button> </div> </div> </div> </div> </div> </div> </div> <!-- Modal 2 --> <div class="portfolio-modal modal fade" id="portfolioModal2" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="close-modal" data-dismiss="modal"> <div class="lr"> <div class="rl"></div> </div> </div> <div class="container"> <div class="row"> <div class="col-lg-8 mx-auto"> <div class="modal-body"> <!-- Project Details Go Here --> <h2 class="text-uppercase">Project Name</h2> <p class="item-intro text-muted">Lorem ipsum dolor sit amet consectetur.</p> <!-- --> <img class="rotate-90 img-fluid d-block mx-auto" src="img/portfolio1/02-IMG_1306.JPG" alt=""> <img class="img-fluid d-block mx-auto" src="img/portfolio1/02-IMG_1309.JPG" alt=""> <img class="rotate-90 img-fluid d-block mx-auto" src="img/portfolio1/02-IMG_1314.JPG" alt=""> <img class="rotate-90 img-fluid d-block mx-auto" src="img/portfolio1/02-IMG_1324.JPG" alt=""> <img class="img-fluid d-block mx-auto" src="img/portfolio1/02-IMG_1537.jpg" alt=""> <img class="img-fluid d-block mx-auto" src="img/portfolio1/02-IMG_1538.jpg" alt=""> <!-- --> <p>Use this area to describe your project. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Est blanditiis dolorem culpa incidunt minus dignissimos deserunt repellat aperiam quasi sunt officia expedita beatae cupiditate, maiores repudiandae, nostrum, reiciendis facere nemo!</p> <ul class="list-inline"> <li>Date: January 2017</li> <li>Client: Explore</li> <li>Category: Graphic Design</li> </ul> <button class="btn btn-primary" data-dismiss="modal" type="button"> <i class="fas fa-times"></i> Close Project</button> </div> </div> </div> </div> </div> </div> </div> <!-- Modal 3 --> <div class="portfolio-modal modal fade" id="portfolioModal3" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="close-modal" data-dismiss="modal"> <div class="lr"> <div class="rl"></div> </div> </div> <div class="container"> <div class="row"> <div class="col-lg-8 mx-auto"> <div class="modal-body"> <!-- Project Details Go Here --> <h2 class="text-uppercase">Project Name</h2> <p class="item-intro text-muted">Lorem ipsum dolor sit amet consectetur.</p> <!-- --> <img class="img-fluid d-block mx-auto" src="img/portfolio1/03-IMG_1327.JPG" alt=""> <img class="img-fluid d-block mx-auto" src="img/portfolio1/03-IMG_1328.JPG" alt=""> <img class="img-fluid d-block mx-auto" src="img/portfolio1/03-IMG_1534.jpg" alt=""> <!-- --> <p>Use this area to describe your project. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Est blanditiis dolorem culpa incidunt minus dignissimos deserunt repellat aperiam quasi sunt officia expedita beatae cupiditate, maiores repudiandae, nostrum, reiciendis facere nemo!</p> <ul class="list-inline"> <li>Date: January 2017</li> <li>Client: Finish</li> <li>Category: Identity</li> </ul> <button class="btn btn-primary" data-dismiss="modal" type="button"> <i class="fas fa-times"></i> Close Project</button> </div> </div> </div> </div> </div> </div> </div> <!-- Modal 4 --> <div class="portfolio-modal modal fade" id="portfolioModal4" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="close-modal" data-dismiss="modal"> <div class="lr"> <div class="rl"></div> </div> </div> <div class="container"> <div class="row"> <div class="col-lg-8 mx-auto"> <div class="modal-body"> <!-- Project Details Go Here --> <h2 class="text-uppercase">Project Name</h2> <p class="item-intro text-muted">Lorem ipsum dolor sit amet consectetur.</p> <!-- --> <img class="img-fluid d-block mx-auto" src="img/portfolio1/04-IMG_1533.PNG" alt=""> <img class="img-fluid d-block mx-auto" src="img/portfolio1/04-IMG_1536.jpg" alt=""> <!-- --> <p>Use this area to describe your project. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Est blanditiis dolorem culpa incidunt minus dignissimos deserunt repellat aperiam quasi sunt officia expedita beatae cupiditate, maiores repudiandae, nostrum, reiciendis facere nemo!</p> <ul class="list-inline"> <li>Date: January 2017</li> <li>Client: Lines</li> <li>Category: Branding</li> </ul> <button class="btn btn-primary" data-dismiss="modal" type="button"> <i class="fas fa-times"></i> Close Project</button> </div> </div> </div> </div> </div> </div> </div> <!-- Modal 5 --> <div class="portfolio-modal modal fade" id="portfolioModal5" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="close-modal" data-dismiss="modal"> <div class="lr"> <div class="rl"></div> </div> </div> <div class="container"> <div class="row"> <div class="col-lg-8 mx-auto"> <div class="modal-body"> <!-- Project Details Go Here --> <h2 class="text-uppercase">Project Name</h2> <p class="item-intro text-muted">Lorem ipsum dolor sit amet consectetur.</p> <!-- --> <img class="img-fluid d-block mx-auto" src="img/portfolio1/04-IMG_1311.JPG" alt=""> <!-- --> <p>Use this area to describe your project. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Est blanditiis dolorem culpa incidunt minus dignissimos deserunt repellat aperiam quasi sunt officia expedita beatae cupiditate, maiores repudiandae, nostrum, reiciendis facere nemo!</p> <ul class="list-inline"> <li>Date: January 2017</li> <li>Client: Southwest</li> <li>Category: Website Design</li> </ul> <button class="btn btn-primary" data-dismiss="modal" type="button"> <i class="fas fa-times"></i> Close Project</button> </div> </div> </div> </div> </div> </div> </div> <!-- Modal 6 --> <div class="portfolio-modal modal fade" id="portfolioModal6" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="close-modal" data-dismiss="modal"> <div class="lr"> <div class="rl"></div> </div> </div> <div class="container"> <div class="row"> <div class="col-lg-8 mx-auto"> <div class="modal-body"> <!-- Project Details Go Here --> <h2 class="text-uppercase">Project Name</h2> <p class="item-intro text-muted">Lorem ipsum dolor sit amet consectetur.</p> <img class="img-fluid d-block mx-auto" src="img/portfolio1/05-IMG_1286.jpg" alt=""> <p>Use this area to describe your project. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Est blanditiis dolorem culpa incidunt minus dignissimos deserunt repellat aperiam quasi sunt officia expedita beatae cupiditate, maiores repudiandae, nostrum, reiciendis facere nemo!</p> <ul class="list-inline"> <li>Date: January 2017</li> <li>Client: Window</li> <li>Category: Photography</li> </ul> <button class="btn btn-primary" data-dismiss="modal" type="button"> <i class="fas fa-times"></i> Close Project</button> </div> </div> </div> </div> </div> </div> </div> <!-- Bootstrap core JavaScript --> <script src="vendor/jquery/jquery.min.js"></script> <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <!-- Plugin JavaScript --> <script src="vendor/jquery-easing/jquery.easing.min.js"></script> <!-- Contact form JavaScript --> <script src="js/jqBootstrapValidation.js"></script> <script src="js/contact_me.js"></script> <!-- Custom scripts for this template --> <script src="js/agency.min.js"></script> </body> </html>
html
17 “Never sacrifice a sick or defective ox or sheep to the Lord your God. He doesn’t feel honored by such gifts! 2-3 “If anyone, whether man or woman, in any village throughout your land violates your covenant with God by worshiping other gods, the sun, moon, or stars—which I have strictly forbidden— 4 first check the rumor very carefully; if there is no doubt it is true, 5 then that man or woman shall be taken outside the city and shall be stoned to death. 6 However, never put a man to death on the testimony of only one witness; there must be at least two or three. 7 The witnesses shall throw the first stones, and then all the people shall join in. In this way you will purge all evil from among you. 8 “If a case arises that is too hard for you to decide—for instance, whether someone is guilty of murder when there is insufficient evidence, or whether someone’s rights have been violated—you shall take the case to the sanctuary of the Lord your God, 9 to the priests and Levites, and the chief judge on duty at the time will make the decision. 10 His decision is without appeal and is to be followed to the letter. 11 The sentence he imposes is to be fully executed. 12 If the defendant refuses to accept the decision of the priest or judge appointed by God for this purpose, the penalty is death. Such sinners must be purged from Israel. 13 Then everyone will hear about what happened to the man who refused God’s verdict, and they will be afraid to defy a court’s judgment. 14 “When you arrive in the land the Lord your God will give you, and have conquered it, and begin to think, ‘We ought to have a king like the other nations around us’— 15 be sure that you select as king the man the Lord your God shall choose. He must be an Israelite, not a foreigner. 16 Be sure that he doesn’t build up a large stable of horses for himself, nor send his men to Egypt to raise horses for him there, for the Lord has told you, ‘Never return to Egypt again.’ 17 He must not have too many wives, lest his heart be turned away from the Lord, neither shall he be excessively rich. 18 “And when he has been crowned and sits upon his throne as king, then he must copy these laws from the book kept by the Levite-priests. 19 That copy of the laws shall be his constant companion. He must read from it every day of his life so that he will learn to respect the Lord his God by obeying all of his commands. 20 This regular reading of God’s laws will prevent him from feeling that he is better than his fellow citizens. It will also prevent him from turning away from God’s laws in the slightest respect and will ensure his having a long, good reign. His sons will then follow him upon the throne. The Living Bible copyright © 1971 by Tyndale House Foundation. Used by permission of Tyndale House Publishers Inc., Carol Stream, Illinois 60188. All rights reserved.
english
<reponame>platinum-fund/platinum-landings { "immediateLaunchOfSecurityToken": "Immediate launch of security token", "aFreeOpenStandardSecurity": "A free open standard “Security Token” provides the directions how to implement transfer restricted security tokens on the Ethereum blockchain. Most tokens don’t use any limitations on receivers or participants of the token sale, unlike them Security Token limits token transfers to verified investors only.", "launchSTO": "Launch SECURITY TOKEN" }
json
package com.github.pmoerenhout.jsmppmodem; import java.io.IOException; import java.time.Instant; import java.util.List; import java.util.Optional; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.stream.IntStream; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.event.EventListener; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import com.github.pmoerenhout.atcommander.api.InitException; import com.github.pmoerenhout.atcommander.api.SerialException; import com.github.pmoerenhout.atcommander.basic.exceptions.ResponseException; import com.github.pmoerenhout.atcommander.basic.exceptions.TimeoutException; import com.github.pmoerenhout.atcommander.module._3gpp.EtsiModem; import com.github.pmoerenhout.atcommander.module._3gpp.RegistrationState; import com.github.pmoerenhout.atcommander.module._3gpp.commands.NetworkRegistrationResponse; import com.github.pmoerenhout.atcommander.module._3gpp.commands.SubscriberNumberResponse; import com.github.pmoerenhout.atcommander.module._3gpp.exceptions.CmeErrorException; import com.github.pmoerenhout.atcommander.module._3gpp.types.IndexPduMessage; import com.github.pmoerenhout.atcommander.module._3gpp.types.PduMessage; import com.github.pmoerenhout.atcommander.module.v250.enums.OperatorSelectionMode; import com.github.pmoerenhout.atcommander.module.v250.enums.PinStatus; import com.github.pmoerenhout.atcommander.module.v250.exceptions.RegistrationFailedException; import com.github.pmoerenhout.jsmppmodem.events.MessageTerminatingIndicationEvent; import com.github.pmoerenhout.jsmppmodem.events.ReceivedPduEvent; import com.github.pmoerenhout.jsmppmodem.events.ReceivedSmsDeliveryPduEvent; import com.github.pmoerenhout.jsmppmodem.events.ReceivedSmsStatusReportPduEvent; import com.github.pmoerenhout.jsmppmodem.util.Util; import com.github.pmoerenhout.pduutils.gsm0340.Pdu; import com.github.pmoerenhout.pduutils.gsm0340.PduParser; import com.github.pmoerenhout.pduutils.gsm0340.SmsDeliveryPdu; import com.github.pmoerenhout.pduutils.gsm0340.SmsStatusReportPdu; import com.github.pmoerenhout.pduutils.gsm0340.SmsSubmitPdu; import lombok.extern.slf4j.Slf4j; @Slf4j @Service public class ModemService { private static final int REGISTRATION_TIMEOUT = 300; private final CountDownLatch latch = new CountDownLatch(1); private final List<Modem> modems; private final StorageService storageService; private final ApplicationEventPublisher applicationEventPublisher; private String manufacturerIdentification; private String revisionIdentification; private String serialNumber; private String productSerialNumberIdentification; private String imsi; private RegistrationState registrationState; @Autowired public ModemService(final List<Modem> modems, final StorageService storageService, final ApplicationEventPublisher applicationEventPublisher) { this.modems = modems; this.storageService = storageService; this.applicationEventPublisher = applicationEventPublisher; log.info("Found {} serial connection(s) configurations", modems.size()); } public List<Modem> getModems() { return modems; } public Modem getFirstModem() { return modems.get(0); } public void init() { log.info("Initialize all modems"); modems.forEach(modem -> { try { final Sim kpnSim = new Sim(); kpnSim.setIccid("8931089118051240341"); kpnSim.setPin1("0000"); modem.setSim(kpnSim); init(modem); modem.setInitialized(true); } catch (InitException e) { log.error("Modem {} at port {} speed {} could not be initialised: {}", modem.getId(), modem.getPort(), modem.getSpeed(), e.getMessage()); } }); latch.countDown(); } public boolean waitForInitialisation(final long millies) throws InterruptedException { return latch.await(millies, TimeUnit.MILLISECONDS); } public void init(final Modem modem) throws InitException { final Sim sim = modem.getSim(); final EtsiModem etsiModem = modem.get3gppModem(); log.info("Initialize 3GPP modem (27.007)"); // final EtsiModem modem = new EtsiModem( // new JsscSerial(port, speed, FLOWCONTROL_RTSCTS_IN | FLOWCONTROL_RTSCTS_OUT, // new UnsolicitedCallback())); try { etsiModem.init(); //etsiModem.getSimpleCommand(new String(new byte[]{ (byte) 0x1a })); etsiModem.getAttention(); // etsiModem.getI manufacturerIdentification = etsiModem.getManufacturerIdentification(); final boolean isSonyEricsson = (manufacturerIdentification.contains("SONY ERICSSON")); final boolean isQuectel = (manufacturerIdentification.contains("Quectel")); revisionIdentification = etsiModem.getRevisionIdentification(); if (!isSonyEricsson) { serialNumber = etsiModem.getSerialNumber(); } productSerialNumberIdentification = etsiModem.getProductSerialNumberIdentification(); etsiModem.setMobileEquipmentError(2); if (isSonyEricsson) { etsiModem.setCellularResultCodes(true); } log.info("Phone activity status: {}", etsiModem.getPhoneActivityStatus()); log.info("Manufacturer: {}", manufacturerIdentification); log.info("Revision identification: {}", revisionIdentification); log.info("Serial number: {}", serialNumber); log.info("Product serial number identification: {}", productSerialNumberIdentification); log.info("Phone activity status: {}", etsiModem.getPhoneActivityStatus()); final PinStatus pinStatus = etsiModem.getPinStatus(); switch (pinStatus) { case READY: break; case SIM_PIN: final String pin1 = sim.getPin1(); if (StringUtils.isBlank(pin1)) { throw new RuntimeException("The PIN1 is needed"); } etsiModem.setPin(sim.getPin1()); break; case SIM_PUK: final String puk1 = sim.getPuk1(); if (StringUtils.isBlank(puk1)) { throw new RuntimeException("The PUK1 is needed"); } throw new RuntimeException("PUK not implemented"); // etsiModem.setPuk(puk); } log.info("Phone activity status: {}", etsiModem.getPhoneActivityStatus()); if (isSonyEricsson) { // +CMER=[<mode>[,<keyp>[,<disp>[,<ind>[,<bfr>]]]]] // +CMER: (0,3),(0,2),0,(0-1),0 etsiModem.getSimpleCommand("AT+CMER=3,0,0,0,0").set(); } else { etsiModem.getSimpleCommand("AT+CMER=2").set(); } while (StringUtils.isBlank(imsi)) { try { imsi = etsiModem.getInternationalMobileSubscriberIdentity(); log.info("IMSI: {}", imsi); sim.setImsi(imsi); } catch (final CmeErrorException e) { log.info("Error reading IMSI: {}", e.getMessage()); Thread.sleep(500); } } final Optional<String> subscriberNumber = getSubscriberNumberE164(etsiModem); subscriberNumber.ifPresent(s -> { log.info("Subscriber number: {}", s); sim.setSubscriberNumber(s); }); log.info("Phone activity status: {}", etsiModem.getPhoneActivityStatus()); // etsiModem.getSimpleCommand("AT#SELINT=2").set(); // etsiModem.getSimpleCommand("AT#SMSMODE=2").set(); if (isSonyEricsson) { etsiModem.setNetworkRegistration(1); } else { etsiModem.setNetworkRegistration(2); } if (isQuectel) { log.info("Set Quectel URC to USB AT"); var r = etsiModem.getSimpleCommand("AT+QURCCFG=\"urcport\",\"usbat\"").set(); } // etsiModem.setNewMessageIndications(2, 3, 2, 2, 0); // etsiModem.setNewMessageIndications(1, 2, 0, 0, 0); if (isSonyEricsson) { // +CNMI: (2),(0,1,3),(0,2),(0),(0) // AT+CNMI=2,3,0,0,0 etsiModem.setNewMessageIndications(2, 1, 0, 0, 0); } else { // Quectel: +CNMI: (0-2),(0-3),(0,2),(0-2),(0,1) // Use just indications etsiModem.setNewMessageIndications(2, 2, 2, 1, 0); } // USSD enable the result code presentation to the TE etsiModem.setUssd(1); // modem.setOperatorSelection(OperatorSelectionMode.AUTOMATIC); waitForAutomaticRegistration(etsiModem); log.info("Network registration state: {}", etsiModem.getNetworkRegistration().getRegistrationState()); final int serviceForMoSmsMessages = etsiModem.getServiceForMoSmsMessages(); final List<Integer> servicesForMoSmsMessages = etsiModem.getServicesForMoSmsMessages(); log.info("Service for MO SMS message is {}, possible values are {}", serviceForMoSmsMessages, servicesForMoSmsMessages); final MessageService messageService = new MessageService(etsiModem); modem.setMessageService(messageService); // messageService.setTextMessageMode(); messageService.setPduMessageMode(); // messageService.showCurrentTeCharacterSet(); messageService.setIraTeCharacterSet(); // messageService.showAllMessages(); messageService.showSelectMessageService(); messageService.showServiceCentreAddress(); messageService.showPreferredMessageStorage(); messageService.showNewMessageIndications(); /* mode 2: Buffer unsolicited result codes in the TA when TA-TE link is reserved (e.g. in data mode) and flush them to the TE after reservation. Otherwise forward them directly to the TE. */ /* mt 1: SMS-DELIVERs (except class 2) are routed directly to the TE using unsolicitedresult code: +CMT: [<alpha>],<length><CR><LF><pdu>(PDU modeenabled) or +CMT:<oa>,[<alpha>],<scts>[,<tooa>,<fo>,<pid>,<dcs>,<sca>,<tosca>,<length>]<CR><LF><data>(text mode enabled; about the parameters in italics, please refer to AT+CSDHcommand) or ^HCMT:<oa>,<scts>,<lang>,<fmt>,<length>,<prt>,<prv>,<type>,<stat><CR><LF><data>(text mode for CDMA SMS). Class 2 messages result in indication as defined in <mt>=1. */ log.info("Possible services for MO SMS messages: {}", messageService.getServicesForMoSmsMessages()); log.info("Service for MO SMS messages: {}", messageService.getServiceForMoSmsMessages()); messageService.setServiceForMoSmsMessages(3); // modems.forEach(m -> { // try { // messageService.sendAllMessagesViaSmpp(m.getId()); // } catch (Exception e) { // log.error("Could not send all messages", e); // } // }); modem.set3gppModem(etsiModem); log.info("Send with {}", sim.getSubscriberNumber()); messageService.sendAllMessagesViaSmpp(modem.getId(), sim.getSubscriberNumber()); } catch (final InterruptedException e) { Thread.currentThread().interrupt(); } catch (final Exception e) { log.error("Init error", e); throw new InitException("Could not initialise the modem", e); } } public void close() { modems.forEach(m -> { m.get3gppModem().close(); log.info("3GPP modem {} is closed", m.getId()); }); } @Async @EventListener public void handleReceivedMessageIndication(final MessageTerminatingIndicationEvent event) throws Exception { log.debug("Received MTI: {} {}", event.getStorage(), event.getIndex()); // final Modem modem = modems.stream().filter(m -> m.getId() == connectionId).findFirst().orElseThrow(() -> new RuntimeException("modem not found")); final Modem modem = event.getModem(); final PduMessage message = modem.getMessageService().readSms(event.getIndex()); applicationEventPublisher.publishEvent(new ReceivedPduEvent(this, modem, Util.hexToByteArray(message.getPdu()))); } public void send(final Modem modem, final String destination, final int numberOfSms) { log.info("Send {} messages to {}", numberOfSms, destination); try { IntStream.rangeClosed(1, numberOfSms).forEach(i -> { try { modem.getMessageService().sendPduMessage(destination, i); Thread.sleep(500); } catch (Exception e) { log.info("Could not send short message", e); } }); } catch (final Exception e) { log.error("The modem had an error", e); } } public void sendText(final Modem modem, final String destination, final String text) { log.info("Send text message to {}: {}", destination, text); try { modem.getMessageService().sendTextMessage(destination, text); } catch (Exception e) { log.info("Could not send short message", e); } } public void sendBinary(final Modem modem, final List<String> destinations) { log.info("Send 1 binary message to {} destinations", destinations.size()); try { destinations.forEach(d -> { try { final byte[] data = Util.hexToByteArray("08411181BC3048320035A001AD800D1454EDFD95C0"); modem.getMessageService().sendBinaryPduMessage(d, data); Thread.sleep(500); } catch (Exception e) { log.info("Could not send short message", e); } }); } catch (final Exception e) { log.error("The modem had an error", e); } } public void showAllMessages(final Modem modem) throws ResponseException, SerialException, TimeoutException { modem.getMessageService().showAllMessages(); } public void sendAllMessagesViaSmpp(final Modem modem) throws ResponseException, SerialException, TimeoutException { modem.getMessageService().sendAllMessagesViaSmpp(modem.getId(), modem.getSim().getSubscriberNumber()); } public void storeAllMessages(final Modem modem) throws ResponseException, SerialException, TimeoutException { final List<IndexPduMessage> messages = modem.getMessageService().getAllMessages(); // messages.stream().findFirst().ifPresent(m -> { // final PduParser pduParser = new PduParser(); // final Pdu pdu = pduParser.parsePdu(m.getPdu()); // if (pdu instanceof SmsDeliveryPdu) { // log.debug("DELIVERY:{} SCTS:{} SMSC:{} ADDRESS:{} DCS:{}/{} TEXT:'{}'", // ((SmsDeliveryPdu) pdu).getServiceCentreTimestamp(), // pdu.getSmscAddress(), pdu.getAddress(), pdu.getDataCodingScheme(), pdu.getProtocolIdentifier(), // pdu.getDecodedText()); // } // }); messages.forEach(m -> { try { final PduParser pduParser = new PduParser(); log.info("PDU: {}", m.getPdu()); final Pdu pdu = pduParser.parsePdu(m.getPdu()); if (pdu instanceof SmsDeliveryPdu) { log.debug("DELIVERY:{} SCTS:{} SMSC:{} ADDRESS:{} DCS:{}/{} TEXT:'{}'", ((SmsDeliveryPdu) pdu).getServiceCentreTimestamp(), pdu.getSmscAddress(), pdu.getAddress(), pdu.getDataCodingScheme(), pdu.getProtocolIdentifier(), pdu.getDecodedText()); } } catch (Exception e) { log.error("Error in parsing PDU", e); } }); messages.stream().findFirst().ifPresent(m -> storageService.save(Instant.now().toEpochMilli(), modem.getId(), Util.hexToByteArray(m.getPdu())) ); } public void deleteAllMessage(final Modem modem) throws ResponseException, SerialException, TimeoutException { log.info("Delete all messages"); modem.getMessageService().deleteAllMessages(); } private void waitForAutomaticRegistration( final EtsiModem modem) throws SerialException, RegistrationFailedException, ResponseException, TimeoutException, InterruptedException { log.info("Waiting for registered network"); // modem.setOperatorSelection(OperatorSelectionMode.AUTOMATIC); if (!waitForAutomaticNetworkRegistration(modem, REGISTRATION_TIMEOUT)) { //final int error = modem.getExtendedNumericErrorReport(); //final int networkRejectError = getExtendedNumericErrorReportForNetworkReject(); throw new RegistrationFailedException(String.format("No network registration in %d seconds", REGISTRATION_TIMEOUT)); } } private boolean waitForAutomaticNetworkRegistration(final EtsiModem modem, final int seconds) throws SerialException, ResponseException, TimeoutException, InterruptedException { final int interval = 5; final int iterations = (seconds / interval) + (seconds % interval == 0 ? 0 : 1); registrationState = null; for (int i = 0; i < iterations; i++) { final NetworkRegistrationResponse response = modem.getNetworkRegistration(); registrationState = response.getRegistrationState(); if (isRegistered(registrationState)) { return true; } log.debug("Network Registration is {}, waiting...", registrationState); if (i == 0) { log.debug("Request automatic operator selection"); modem.setOperatorSelection(OperatorSelectionMode.AUTOMATIC); } registrationState = modem.getNetworkRegistration().getRegistrationState(); Thread.sleep(interval * 1000); } return false; } private boolean isRegistered(final RegistrationState state) { if (state == RegistrationState.REGISTERED_HOME_NETWORK || state == RegistrationState.REGISTERED_ROAMING) { return true; } return false; } @EventListener public void handleReceivedPdu(final ReceivedPduEvent event) throws Exception { final Modem modem = event.getModem(); log.info("MODEM: {} {}", modem.getId(), modem.getSim().getSubscriberNumber()); final PduParser pduParser = new PduParser(); log.info("PDU: {}", Util.bytesToHexString(event.getPdu())); final Pdu pdu = pduParser.parsePdu(Util.bytesToHexString(event.getPdu())); if (pdu instanceof SmsDeliveryPdu) { log.info("DELIVERY: SCTS:{} SMSC:{} ADDRESS:{} DCS:{} PID:{} TEXT:'{}'", ((SmsDeliveryPdu) pdu).getServiceCentreTimestamp(), pdu.getSmscAddress(), pdu.getAddress(), pdu.getDataCodingScheme(), pdu.getProtocolIdentifier(), pdu.getDecodedText()); applicationEventPublisher.publishEvent(new ReceivedSmsDeliveryPduEvent(this, modem.getId(), modem.getSim().getSubscriberNumber(), event.getPdu())); } else if (pdu instanceof SmsStatusReportPdu) { log.info("STATUS-REPORT: SMSC:{} ADDRESS:{} DCS:{} PID:{}", pdu.getSmscAddress(), pdu.getAddress(), pdu.getDataCodingScheme(), pdu.getProtocolIdentifier()); applicationEventPublisher.publishEvent(new ReceivedSmsStatusReportPduEvent(this, modem.getId(), event.getPdu())); } else if (pdu instanceof SmsSubmitPdu) { log.info("SUBMIT: SMSC:{} ADDRESS:{} DCS:{} PID:{} TEXT:'{}'", pdu.getSmscAddress(), pdu.getAddress(), pdu.getDataCodingScheme(), pdu.getProtocolIdentifier(), pdu.getDecodedText()); log.info("SMS-SUBMIT is not handled"); } else { throw new IllegalArgumentException("The class " + pdu.getClass().getName() + " is unknown"); } } private Optional<String> getSubscriberNumberE164(final EtsiModem etsiModem) throws SerialException, IOException, ResponseException { final SubscriberNumberResponse subscriberNumberResponse = etsiModem.getSubscriberNumber(); return Optional.ofNullable(StringUtils.stripStart(subscriberNumberResponse.getNumber(), "+")); } }
java
<reponame>Skycelot/plicanterra<gh_stars>1-10 package ru.skycelot.plicanterra.crud.persist; import java.util.Iterator; import java.util.LinkedList; import java.util.List; /** * */ public class InsertQuery extends Query { private final String tableName; private final List<String> columns = new LinkedList<>(); private final List<String> values = new LinkedList<>(); public InsertQuery(String tableName) { this.tableName = tableName.toUpperCase(); } public void addInlineColumn(String columnName, Object value) { columns.add(columnName); values.add(value.toString()); } public void addParameterColumn(String columnName, String value) { columns.add(columnName); values.add("?"); parameters.add(value); } @Override public String toString() { StringBuilder queryBody = new StringBuilder(); queryBody.append("insert into "); queryBody.append(tableName); queryBody.append(" ("); Iterator<String> columnsIterator = columns.iterator(); while (columnsIterator.hasNext()) { queryBody.append(columnsIterator.next()); if (columnsIterator.hasNext()) { queryBody.append(", "); } } queryBody.append(") "); queryBody.append("values ("); Iterator<String> valuesIterator = values.iterator(); while (valuesIterator.hasNext()) { queryBody.append(valuesIterator.next()); if (valuesIterator.hasNext()) { queryBody.append(", "); } } queryBody.append(")"); return queryBody.toString(); } }
java
Today Aquarius Horoscope, May 21, 2023: Maintain a sense of respect and hospitality! Aquarius Horoscope Today for May 21: Create a harmonious atmosphere and contribute to a culture of kindness and understanding. Check the full predictions here. By Arunesh Kumar Sharma: What will your day look like in terms of health, romance, finance and fortune? Read everything here. Monetary gains- Discussions and dialogues regarding work will be effective. There will be an increase in financial gains. Develop an interest in personal matters. Attaining desired objectives is possible. There will be good financial benefits. Proceed in collaboration with professionals. Adhere to policies and regulations. There will be support from friends. Love life- Respect and honor everyone. Maintain a sense of respect and hospitality. Patience will prevail in personal matters. Surprise your loved ones. Enhance control over behavior. Listen attentively to the words of elders. Stay alert during meetings with responsible individuals. Emphasize emotional balance. Maintain humility in relationships. Health- Control emotions. Dietary habits will have a significant impact. Pay attention to the family. Maintain regular health check-ups. Keep the morale high. It will help in improving personality. "
english
A phenomenon that causes the delayed return of spontaneous circulation of blood in the heart after a brief halt – known as Lazarous Syndrome is unusual and rare. It makes it seems like a person comes back to life after death, but in fact, they hadn’t died. This is a rare situation is one of the biggest medical mysteries and healthcare providers do not know the exact cause. Read on to know more about it. New Delhi: There are many unusual phenomena associated with the heart that may sound unreal but do happen in rare cases across the world. Lazarus syndrome refers to your blood circulation returning spontaneously after the heart stops beating. According to health experts, it is a condition in which you return to life after you may have died. Named after Lazarus, a character in the Bible who emerged from his tomb alive and well after four days after his death, the syndrome causes your blood circulation spontaneously to restart. What happens in Lazarus syndrome? According to studies 1 , in this phenomenon, when your stops beating, the blood circulation also halts and other organs begin to fail as they do not get any oxygen. Even though the reason your heart stops can’t be corrected or reversed, death soon follows despite CPR . Sometimes, CPR is successful and restarts your heart, especially if the cause is a reversible problem. According to Harvard Health, only 32 cases of Lazarus syndrome have been reported across the world between 1982 and 2008. The most documented case of Lazarus syndrome has reported that blood circulation in the heart returned within 10 minutes of stopping a CPR effort to revive the person whose heart stopped. The doctors, do not declare a person dead immediately when the heart stops beating and breathing ceases. What causes Lazarus syndrome? A few of the many possibilities that may cause Lazarus syndrome are: According to health experts, air trapping happens when you mostly suffer from chronic obstructive lung diseases when the air in your lungs gets pushed too rapidly during CPR and is not exhaled. While it causes pressure that leads to the heart not being able to pump blood out to your body, causing: If blood circulation to the heart stops and the person is being given CPR, the medications need to reach the heart immediately to work. As air trapping stops blood from returning to your heart, even the medicines do not get there. Once air trapping gets resolved and the pressure eases, blood will flow restart carrying the medication with it. While providing CPR, a defibrillator is used to send an electrical shock to your heart to try to restart it. Whenever there is a delay between the shock and its effect, circulation might return. Disclaimer: Tips and suggestions mentioned in the article are for general information purposes only and should not be construed as professional medical advice. Always consult your doctor or a dietician before starting any fitness programme or making any changes to your diet.
english
Bengaluru: India all-rounder Hardik Pandya has picked his all-time IPL XI “completely based on IPL records”. Speaking to Cricbuzz on Wednesday (June 3), the Mumbai Indians (MI) all-rounder made his choices but did not reveal who the captain of the side would be. In IPL, Pandya plays under Rohit Sharma's captaincy. Here is Pandya’s all-time IPL XI. Rohit is also the most successful captain in the history of IPL with four titles. 6. MS Dhoni (wicketkeeper)
english
use ast::*; use namespace::Namespace; use super::internal::*; use line_info::LineInfo; pub fn eval_program<'a>(stack: &mut Stack, program: &Program) -> Result<Option<RcValue>, ExecErr> { for stmt in program.iter() { match eval_stmt(stack, stmt)? { ExecSignal::Return(ret) => return Ok(ret), ExecSignal::Continue => panic!("Bad continue in eval_program. Should return error"), ExecSignal::Break => panic!("Bad break in eval_program. Should return error"), ExecSignal::NextInstruction(_) => (), } } Ok(None) } pub fn eval_stmt<'a, 'b, 'c:'a>(stack: &'a mut Stack<'c>, stmt: &'b Statement) -> Result<ExecSignal, ExecErr> { let reduced_cmd = { let reducer = Reducer::new(stmt, stack, stmt); match reducer.reduce()? { ReduceResult::Return(value) => return Ok(ExecSignal::Return(value)), ReduceResult::Continue(vec) => vec, } }; let executor = Executor::new(stmt, stack, reduced_cmd); executor.run() } enum ReduceResult { Return(Option<RcValue>), Continue(Vec<CIR>) } struct Executor<'a, 'b, 'c:'b> { root_stmt: &'a Statement, stack: &'b mut Stack<'c>, cmd: Vec<CIR>, cmd_span: LineInfo, } impl<'a, 'b, 'c:'b> Executor<'a, 'b, 'c> { fn new(root_stmt: &'a Statement, stack: &'b mut Stack<'c>, cmd: Vec<CIR>) -> Executor<'a, 'b, 'c> { Executor { root_stmt: root_stmt, stack: stack, cmd_span: { assert!(cmd.len() > 0); LineInfo::collapse(&cmd.iter().map(|cir| cir.dinfo.segment_span.clone()) .collect::<Vec<_>>()) }, cmd: { cmd }, } } fn run(mut self) -> Result<ExecSignal, ExecErr> { assert!(self.cmd.len() > 0); let cir = self.cmd.remove(0); let value = cir.value; let borrow = value.borrow(); let cmd_obj: Box<Cmd> = match &*borrow { &Value::String(ref cmd_name) => { let cmd: RcValue = { let mut rcmd = Err(ExecErr::NotCmd(cmd_name.to_string(), cir.dinfo.clone())); if let Some(module) = self.stack.get_local_module() { match module.get(&cmd_name.inner()) { Ok(rc) => { if rc.borrow().is_cmd() == true { rcmd = Ok(rc); } }, _ => (), } } if rcmd.is_err() { //rcmd.is_err() == true => no local command w/ cmd_name match self.stack.get_module().get(&cmd_name.inner()) { Ok(rc) => { if rc.borrow().is_cmd() == true { rcmd = Ok(rc); } }, _ => (), } } rcmd }?; let borrow = cmd.borrow(); if let &Value::Cmd(ref boxed) = &*borrow { boxed.clone() } else { return Err(ExecErr::NotCmd(cmd_name.to_string(), cir.dinfo.clone())); } }, &Value::Cmd(ref cmd) => { cmd.clone() }, val @ _ => return Err(ExecErr::NotCmd(val.to_string(), cir.dinfo.clone())), }; let common = self.info(); let args = self.cmd; let debug_info = args.iter().map(|cir| cir.dinfo.clone()).collect::<Vec<DebugInfo>>(); let debug_info = dcmd_exec!(Box::new(cir.dinfo.clone()), debug_info, cir.dinfo.segment_span.clone(), common); cmd_obj.execute(self.stack, args).map_err(|cmd_e| ExecErr::CmdErr(cmd_e, debug_info)) } } impl<'a, 'b, 'c:'b> InfoGenerator for Executor<'a, 'b, 'c> { fn info(&self) -> CommonInfo { CommonInfo { root_stmt_span: self.root_stmt.line_info.clone(), cmd_span: self.cmd_span.clone(), original_string: self.root_stmt.original_string.clone(), } } } struct Reducer<'a, 'b, 'c, 'd:'b> { root_stmt: &'a Statement, stack: &'b mut Stack<'d>, to_reduce: &'c Statement, reduction_span: LineInfo, } impl<'a, 'b, 'c, 'd:'c> Reducer<'a, 'b, 'c, 'd> { fn new(root_stmt: &'a Statement, stack: &'b mut Stack<'d>, to_reduce: &'c Statement) -> Reducer<'a, 'b, 'c, 'd> { Reducer { root_stmt: root_stmt, stack: stack, reduction_span: LineInfo::collapse(&to_reduce.get_all().iter() .map(|word| word.line_info.clone()) .collect::<Vec<_>>() ), to_reduce: to_reduce, } } fn reduce(mut self) -> Result<ReduceResult, ExecErr> { let mut reduction = Vec::new(); let common = self.info(); for word in self.to_reduce.words.iter() { match word.kind { WordKind::StrSub(ref sub) => { let str_subber = StrSubber::new(self.root_stmt, self.stack, self.to_reduce, sub, word.line_info.clone(), ); let sub_result = str_subber.str_sub()?; reduction.push(sub_result); } WordKind::CmdSub(ref cmd) => { let cmd_dinfo; let arg_dinfo; let reduced_cmd = { let reducer = Reducer::new(self.root_stmt, self.stack, cmd); match reducer.reduce()? { signal @ ReduceResult::Return(_) => return Ok(signal), ReduceResult::Continue(vec) => vec, } }; { let mut info = reduced_cmd.iter().map(|cir| cir.dinfo.clone()).collect::<Vec<DebugInfo>>(); cmd_dinfo = Box::new(info.remove(0)); arg_dinfo = info; } let executor = Executor::new(self.root_stmt, self.stack, reduced_cmd); match executor.run()? { ExecSignal::Return(val) => { return Ok(ReduceResult::Return(val)); //vec![CIR::from(val.clone())] //TODO: is this ^ an error? //A command is telling the executor to alter program flow and return during //an argument reduction }, ExecSignal::NextInstruction(Some(val)) => { reduction.push(CIR::new(val.clone().into(), dcmd_sub!(cmd_dinfo, arg_dinfo, word.line_info.clone(), common.clone() ) ) ); }, ExecSignal::Continue => return Err(ExecErr::BadContinue(dcmd_sub!(cmd_dinfo, arg_dinfo, word.line_info.clone(), common.clone() ))), ExecSignal::Break => return Err(ExecErr::BadBreak(dcmd_sub!(cmd_dinfo, arg_dinfo, word.line_info.clone(), common.clone() ))), ExecSignal::NextInstruction(None) => return Err(ExecErr::NoRet(word.kind.to_string(), dcmd_sub!(cmd_dinfo, arg_dinfo, word.line_info.clone(), common.clone() ) )), } } WordKind::VarSub(ref path, ref namespace) => { let mut var_subber = VarSubber::new(self.root_stmt, self.stack, self.to_reduce, path, namespace.clone()); let sub_result = var_subber.var_sub()?; reduction.push(sub_result); }, _ => reduction.push(try_from_word(&word, self.info()) .expect(&format!("If {:?} is not handled by the match, it NEEDS to be directly convertable to CIR", word.kind))), } } Ok(ReduceResult::Continue(reduction)) } } impl<'a, 'b, 'c, 'd:'c> InfoGenerator for Reducer<'a, 'b, 'c, 'd> { fn info(&self) -> CommonInfo { CommonInfo { root_stmt_span: self.root_stmt.line_info.clone(), cmd_span: self.reduction_span.clone(), original_string: self.root_stmt.original_string.clone(), } } } struct VarSubber <'a, 'b, 'c, 'd:'b, 'e> { root_stmt: &'a Statement, stack: &'b mut Stack<'d>, cur_stmt: &'e Statement, var_sub: &'c Path, namespace: Namespace, sub_span: LineInfo, } impl<'a, 'b, 'c, 'd:'b, 'e> VarSubber<'a, 'b, 'c ,'d, 'e> { fn new(root_stmt: &'a Statement, stack: &'b mut Stack<'d>, cur_stmt: &'e Statement, to_reduce: &'c Path, namespace: Namespace) -> VarSubber<'a, 'b, 'c, 'd, 'e> { VarSubber { root_stmt: root_stmt, stack: stack, cur_stmt: cur_stmt, var_sub: to_reduce, namespace: namespace, sub_span: LineInfo::collapse(&to_reduce.0.iter() .map(|segment| segment.line_info.clone()) .collect::<Vec<_>>() ), } } fn var_sub(&mut self) -> Result<CIR, ExecErr> { assert!(self.var_sub.0.len() > 0); let mut path_iter = self.var_sub.0.iter(); let first_name = path_iter.next().unwrap(); let common = self.info(); let first_obj: RcValue = if let Namespace::Args = self.namespace { let value: Option<RcValue> = self.stack.get_args() .ok_or(ExecErr::VarSubErr(VarSubErr::NoArgs, dvar_sub!( self.namespace.clone(), self.var_sub.clone(), first_name.line_info.clone(), common.clone() ) ) )? .get(&***first_name) .map(|cir| cir.value.clone()); let value: Result<RcValue, ExecErr> = value.ok_or(ExecErr::VarSubErr(VarSubErr::UnknownBinding( first_name.to_string(), Namespace::Args), dvar_sub!(self.namespace.clone(), self.var_sub.clone(), first_name.line_info.clone(), common.clone()) ) ); value? } else { let namespace = self.namespace.clone(); let var_sub = self.var_sub.clone(); let module = match self.namespace { Namespace::Local => { let local = self.stack.get_local_module(); local .ok_or(ExecErr::VarSubErr(VarSubErr::NoLocalModule, dvar_sub!( namespace.clone(), var_sub.clone(), first_name.line_info.clone(), common.clone()) ) )? }, Namespace::Module => self.stack.get_module(), Namespace::Args => panic!("Tring to get env of Namespace::Args"), }; module.get(&***first_name) .map_err(|oerr| ExecErr::ObjectErr(oerr, dvar_sub!(namespace, var_sub, first_name.line_info.clone(), common) ) )? }; self.walk_obj(first_obj, &mut path_iter) } fn walk_obj<'f, 'g, I>(&mut self, obj: RcValue, iter: &'g mut I) -> Result<CIR, ExecErr> where I: Iterator<Item = &'f PathSegment> { let segment = iter.next(); let common = self.info(); match segment { Some(segment) => { match &*obj.borrow() { &Value::Object(ref object) => { let value = object.get(&segment.segment.to_string()) .map_err(|oerr| ExecErr::ObjectErr(oerr, dvar_sub!( self.namespace.clone(), self.var_sub.clone(), segment.line_info.clone(), common) ) )?; self.walk_obj(value, iter) }, &Value::Module(ref module) => { let value = module.get(&segment.segment.to_string()) .map_err(|oerr| ExecErr::ObjectErr(oerr, dvar_sub!( self.namespace.clone(), self.var_sub.clone(), segment.line_info.clone(), common ) ) )?; self.walk_obj(value, iter) }, _ => Err(ExecErr::VarSubErr(VarSubErr::NonobjectFieldAccess( segment.segment.to_string() ), dvar_sub!(self.namespace.clone(), self.var_sub.clone(), segment.line_info.clone(), common) ) )?, } } None => { let line_info = self.var_sub.0.last().unwrap().line_info.clone(); Ok(CIR::new(obj, dvar_sub!(self.namespace.clone(), self.var_sub.clone(), line_info, common) ) ) } } } } impl<'a, 'b, 'c, 'd:'b, 'e> InfoGenerator for VarSubber<'a, 'b, 'c ,'d, 'e> { fn info(&self) -> CommonInfo { CommonInfo { root_stmt_span: self.root_stmt.line_info.clone(), cmd_span: self.cur_stmt.line_info.clone(), original_string: self.root_stmt.original_string.clone(), } } } pub struct StrSubber<'a, 'b, 'c, 'd:'b, 'e> { root_stmt: &'a Statement, stack: &'b mut Stack<'d>, cur_stmt: &'e Statement, str_sub: &'c StrSub, sub_span: LineInfo, } impl<'a, 'b, 'c, 'd:'b, 'e> StrSubber<'a, 'b, 'c ,'d, 'e> { fn new(root_stmt: &'a Statement, stack: &'b mut Stack<'d>, cur_stmt: &'e Statement, to_reduce: &'c StrSub, sub_span: LineInfo) -> StrSubber<'a, 'b, 'c, 'd, 'e> { StrSubber { root_stmt: root_stmt, stack: stack, cur_stmt: cur_stmt, str_sub: to_reduce, sub_span: sub_span } } fn str_sub(self) -> Result<CIR, ExecErr> { let mut result = String::new(); for data in self.str_sub.0.iter() { match data { &StrData::String(ref s) => result.push_str(s), &StrData::VarSub(ref path, ref namespace) => { let mut var_subber = VarSubber::new(self.root_stmt, self.stack, self.cur_stmt, path, namespace.clone()); let sub_result = var_subber.var_sub()?; let borrow = sub_result.value.borrow(); match *borrow { Value::Number(ref num) => result.push_str(&num.to_string()), Value::String(ref s) => result.push_str(&s.inner()), Value::Bool(ref b) => result.push_str(&b.to_string()), Value::Cmd(_) => result.push_str(&path.to_string()), Value::List(_) => unimplemented!(), Value::Object(ref obj) => result.push_str(&obj.to_string()), Value::Module(_) => unimplemented!(), } } &StrData::CmdSub => unimplemented!(), } } Ok(CIR::new(result.into(), dstr_sub!(self.sub_span.clone(), self.info()) ) ) } } impl<'a, 'b, 'c, 'd:'b, 'e> InfoGenerator for StrSubber<'a, 'b, 'c ,'d, 'e> { fn info(&self) -> CommonInfo { CommonInfo { root_stmt_span: self.root_stmt.line_info.clone(), cmd_span: self.cur_stmt.line_info.clone(), original_string: self.root_stmt.original_string.clone(), } } } pub fn try_from_word(word: &Word, common: CommonInfo) -> Option<CIR> { match &word.kind { &WordKind::Atom(ref s) => Some(CIR::new(s.to_string().into(), dliteral!(word.line_info.clone(), common) ) ), &WordKind::Number(n) => Some(CIR::new(n.into(), dliteral!(word.line_info.clone(), common) ) ), &WordKind::Bool(b) => Some(CIR::new(b.into(), dliteral!(word.line_info.clone(), common) ) ), &WordKind::Untouched(ref s) => Some(CIR::new(s.to_string().into(), dliteral!(word.line_info.clone(), common) ) ), _ => None, } }
rust
{ "title":"<NAME>", "genre":"Cooking show", "creators":[], "cast":["<NAME>"], "country_of_origin":"United Kingdom", "seasons":2, "episodes":12, "start_date":"Tue Mar 03 00:00:00 EST 2009", "end_date":"Tue May 18 00:00:00 EDT 2010" }
json
Product features: Baby silicone soft spoon is soft and does not wound, especially for infants and young children, suitable for babies over 4 months old. IDE is the best carefully selected food-grade silicone without BPA, soft and easy to use Bite-resistant, all-silicone wrapping is soft and elastic, allowing the baby to enjoy every bite. Heat Resistant Rubber Hose, Rubber Extrusion Seal Strip, Door Rubber Seal Bottom, As an experienced group we also accept customized orders. The main goal of our company is to build up a satisfying memory for all customers, and establish a long-term win-win business relationship. High Quality Cups Silicone Cake Molds - High Quality BPA Free FDA Custom Silicone Bowl – Zichen Detail: Silicone materials meet FDA requirements per FDA 21 CFR 177.2600 for use with food contact surfaces. Free of BPA, latex and phthalates,LFGB、REACH and RoHS compliant. Not only is it heat-resistant but you can also use it in the fridge, freezer and microwave, which means that it has great versatility – think molding frozen desserts among other uses. Silicone can either be thrown into the dishwasher or washed by hand in hot soapy water – just don’t use abrasive cleaners or scorers. silicone has shown that it is particularly suitable for baking small/individual cakes and those that are quite delicate in nature (such as flourless cakes) as the flexibility of the pans allows you to easily ‘push’ the cake out or peel the silicone away once they are baked. Silicone trays are perfect for Ice cubes, soap, baking, candy molding and chocolate molding. |100% Pure, Professional Quality Food-Grade Silicone. Meets US FDA and European LFGB Safety Standards. |1) Free sample for our stock samples, but the freight should be paid by customers.2) For customized sample, we would charge you a set-up fee. Product detail pictures: Related Product Guide: Shenzhen Zichen Rubber & Plastic Co., Ltd. was established in 2002. The factory is located in Jinmeiwei Industrial Park, Xingye West Road, Baoan District, Shenzhen, South China. It is only half an hour's drive from Shenzhen Airport. We specialize in the production of rubber, silicone and plastic products, including daily necessities, kitchen utensils, health products, sex toys and children's toys, as well as custom parts for electrical, automotive and aerospace industries. The factory has 200 employees and 20 R&D departments. employees. We work together to establish good business relationship with customers from all over the world. We have obtained ISO9001:2000 quality system certification. Fifty percent of our products are exported to the United States and Europe, Japan and South Asia. We also provide OEM services to help customers design and produce customized products according to customer requirements. High Quality Cups Silicone Cake Molds - High Quality BPA Free FDA Custom Silicone Bowl – Zichen , The product will supply to all over the world, such as: Rotterdam, Peru, Armenia, "Good quality and reasonable price" are our business principles. If you are interested in our products or have any questions, make sure you feel free to contact us. We hope to establish cooperative relationships with you in the near future.
english
<gh_stars>10-100 { "$schema": "http://json-schema.org/schema#", "type": "object", "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", "$ref": "_definitions.json#/definitions/io.k8s.api.core.v1.NodeSelectorRequirement" }
json
Two coaches of the Shivnath Express derailed at Chhattisgarh’s Dongargarh town on Tuesday morning. The railway officials said the incident occurred at around 3:50am when two coaches of 18239 Ghevra-Itwari Shivnath Express derailed at Dongargarh yard. However, no casualties were reported in the incident. The passengers of the train were provided with food and refreshments. The train then started for Nagpur three hours after the accident. The train was coming from the industrial city of Korba in Chhattisgarh to Nagpur. The railway officials said relief trains from Gondia and Itwari in Nagpur were sent to the accident spot and affected coaches were removed and the train re-started its onward journey to Itwari in Nagpur. The chief public relations officer of Bilaspur zone of SE-Central Railway, Saket Ranjan stated that senior railway officials reached the spot from Nagpur to take stock of the situation. According to Ranjan, the reasons behind the accident could not be ascertained immediately. This is the second such incident in the past few days that has occurred in the South-Eastern Central Railway near Nagpur. Earlier, around 25 passengers were injured when a bogie of a passenger train -- Bhagat Ki Kothi Express – coming from Bilaspur to Nagpur collided with a goods train near Gondia on August 17.
english
<reponame>DM5PortfolioProj/Dev-Mountain-Emplyement-Portal <div class="container-fluid"> <div class="frontcontainer"> <div class="welcomelanding col-md-12"> <div class="wow fadeIn textanimate" data-wow-duration="3s" data-wow-duration="2s"> <fade-font><strong>WELCOME TO DEVMOUNTAIN'S <br> STUDENT PORTFOLIO WEBSITE</strong></fade-font> <h1>We have the <span class="update-box">Developers</span> that you're looking for.</a></h1> </div> </div> </div> <div class="contact col-md-12"> <div class="hiring"> <h4>Are you hiring software engineers?</h4> <h5>Gain access to our accomplished devs and let us help build your team.</h5> <p>Contact us <a href="mailto:<EMAIL>?subject=I would like to attend a DevMountain hiring event" target="blank"> To find out when our next hiring event is.</a> </p> </div> </div> </div> <script src="typed.js"></script>
html
Opposition DMK on Saturday made yet another complaint of violation of model code of conduct against ruling AIADMK with the Election Commission of India, charging a state government employee with canvassing for votes in the bypoll-bound Yercaud (ST) constituency in Salem. In a petition to Tamil Nadu Chief Electoral office Praveen Kumar, DMK Organising Secretary T. K. S. Elangovan charged Loganathan, a government noon meal scheme co-ordinator at a local school, with canvassing for AIADMK candidate P. Saroja along with the Highways Minister Edappadi Palanisamy. A section of local media had reported this alongside photographs, he said, recalling that the party had been repeatedly taking up cases of violation of model code of conduct against AIADMK. “Until and unless stringent action is taken against the said Loganathan, co-ordinator of government noon meal scheme at Kakkampadi Village Primary School, there will not be any moral fear of the Election Commission for the government officials who are campaigning for the ruling AIADMK candidate throwing the rules and Model Code of Conduct of the Election Commission in the air,” he said. Arch rivals DMK and AIADMK are locked in a bitter battle in the December 4 Assembly bypoll, which was necessitated following the death of AIADMK’s C. Perumal. DMK’s V. Marana and AIADMK’s P. Saroja, Perumal’s wife, are in the fray.
english
#pragma once #include "./base.hpp" #include <cassert> #include <iostream> #include <string> namespace tools { namespace int128 { __int128_t parse(const string &s) { __int128_t res = 0; for (char c: s) { if (isdigit(c)) res = res * 10 + (c - '0'); } if (s[0] == '-') res *= -1; return res; } istream &operator>>(istream &is, __int128_t &v) { string s; is >> s; v = parse(s); return is; } ostream &operator<<(ostream &os, const __int128_t &v) { if (!ostream::sentry(os)) return os; char buf[64]; char *d = end(buf); __uint128_t tmp = (v < 0 ? -v : v); do { d--; *d = char(tmp % 10 + '0'); tmp /= 10; } while (tmp); if (v < 0) { d--; *d = '-'; } int len = end(buf) - d; if (os.rdbuf()->sputn(d, len) != len) { os.setstate(ios_base::badbit); } return os; } __int128_t gcd(__int128_t a, __int128_t b) { __int128_t tmp; while (b > 0) { tmp = a; a = b; b = tmp % b; } return a; } __int128_t lcm(__int128_t a, __int128_t b) { return a * b / gcd(a, b); } namespace template_internal_math { __int128_t extgcd(__int128_t a, __int128_t b, __int128_t &x, __int128_t &y) { if (b == 0) { x = 1; y = 0; return a; } __int128_t d = extgcd(b, a % b, y, x); y = y - (a / b) * x; return d; } } // namespace template_internal_math __int128_t power(__int128_t a, __int128_t e, __int128_t p = -1) { assert(p != 0); assert(p >= -1); if (e < 0) { assert(p != -1 and gcd(a, p) == 1); __int128_t x, y; template_internal_math::extgcd(a, p, x, y); a = (x % p + p) % p; e *= -1; } __int128_t res = 1; while (e > 0) { if (e & 1) { res *= a; if (p != -1) res %= p; } a *= a; if (p != -1) a %= p; e >>= 1; } return res; } } // namespace int128 using namespace int128; using i128 = __int128_t; } // namespace tools
cpp
<gh_stars>0 /** @format */ import { ISvgIconProps, IconWrapper } from '../runtime'; export default IconWrapper( 'byted-pivot-table', false, (props: ISvgIconProps) => ( <svg width={props.size} height={props.size} viewBox="0 0 48 48" fill="none"> <path d="M42.0004 4H6.00005C4.89546 4 4.00002 4.89546 4.00005 6.00005L4.00104 42.0001C4.00107 43.1046 4.8965 44 6.00104 44H42.0004C43.105 44 44.0004 43.1046 44.0004 42V6C44.0004 4.89543 43.105 4 42.0004 4Z" fill={props.colors[1]} stroke={props.colors[0]} stroke-width={props.strokeWidth} /> <path d="M20.0088 34.0083H33.5005V20.0083" stroke={props.colors[2]} stroke-width={props.strokeWidth} stroke-linecap={props.strokeLinecap} stroke-linejoin={props.strokeLinejoin} /> <path d="M24.5 38.5L23 37L20 34L23 31L24.5 29.5" stroke={props.colors[2]} stroke-width={props.strokeWidth} stroke-linecap={props.strokeLinecap} stroke-linejoin={props.strokeLinejoin} /> <path d="M29 24.5L30.5 23L33.5 20L36.5 23L38 24.5" stroke={props.colors[2]} stroke-width={props.strokeWidth} stroke-linecap={props.strokeLinecap} stroke-linejoin={props.strokeLinejoin} /> <path d="M14 4L14 44" stroke={props.colors[2]} stroke-width={props.strokeWidth} stroke-linecap={props.strokeLinecap} /> <path d="M4 14.0378L44 14" stroke={props.colors[2]} stroke-width={props.strokeWidth} stroke-linecap={props.strokeLinecap} /> <path d="M8 4H28" stroke={props.colors[0]} stroke-width={props.strokeWidth} stroke-linecap={props.strokeLinecap} stroke-linejoin={props.strokeLinejoin} /> <path d="M8 44H28" stroke={props.colors[0]} stroke-width={props.strokeWidth} stroke-linecap={props.strokeLinecap} stroke-linejoin={props.strokeLinejoin} /> <path d="M44 8V18" stroke={props.colors[0]} stroke-width={props.strokeWidth} stroke-linecap={props.strokeLinecap} /> <path d="M4 8L4 18" stroke={props.colors[0]} stroke-width={props.strokeWidth} stroke-linecap={props.strokeLinecap} /> </svg> ), );
typescript
/*++ Copyright (C) Microsoft Corporation Module Name: cfolder.cpp Abstract: This module implements CFolder and its releated classes. Author: <NAME> (williamh) created Revision History: --*/ #include "devmgr.h" #include "clsgenpg.h" #include "devgenpg.h" #include "devdrvpg.h" #include "devpopg.h" #include "devdetpg.h" #include "hwprof.h" #include "devrmdlg.h" #include "printer.h" #include <devguid.h> #include <initguid.h> #include <oleacc.h> const TCHAR* OCX_TREEVIEW = TEXT("{CD6C7868-5864-11D0-ABF0-0020AF6B0B7A}"); const MMCMENUITEM ViewDevicesMenuItems[TOTAL_VIEWS] = { {IDS_VIEW_DEVICESBYTYPE, IDS_MENU_STATUS_DEVBYTYPE, IDM_VIEW_DEVICESBYTYPE, VIEW_DEVICESBYTYPE}, {IDS_VIEW_DEVICESBYCONNECTION, IDS_MENU_STATUS_DEVBYCONNECTION, IDM_VIEW_DEVICESBYCONNECTION, VIEW_DEVICESBYCONNECTION}, {IDS_VIEW_RESOURCESBYTYPE, IDS_MENU_STATUS_RESBYTYPE, IDM_VIEW_RESOURCESBYTYPE, VIEW_RESOURCESBYTYPE}, {IDS_VIEW_RESOURCESBYCONNECTION, IDS_MENU_STATUS_RESBYCONNECTION, IDM_VIEW_RESOURCESBYCONNECTION, VIEW_RESOURCESBYCONNECTION} }; const RESOURCEID ResourceTypes[TOTAL_RESOURCE_TYPES] = { ResType_Mem, ResType_IO, ResType_DMA, ResType_IRQ }; /////////////////////////////////////////////////////////////////// /// CScopeItem implementations /// BOOL CScopeItem::Create() { m_strName.LoadString(g_hInstance, m_iNameStringId); m_strDesc.LoadString(g_hInstance, m_iDescStringId); return TRUE; } HRESULT CScopeItem::GetDisplayInfo( LPSCOPEDATAITEM pScopeDataItem ) { if (!pScopeDataItem) { return E_INVALIDARG; } if (SDI_STR & pScopeDataItem->mask) { pScopeDataItem->displayname = (LPTSTR)(LPCTSTR)m_strName; } if (SDI_IMAGE & pScopeDataItem->mask) { pScopeDataItem->nImage = m_iImage; } if (SDI_OPENIMAGE & pScopeDataItem->mask) { pScopeDataItem->nOpenImage = m_iOpenImage; } return S_OK; } BOOL CScopeItem::EnumerateChildren( int Index, CScopeItem** ppScopeItem ) { if (!ppScopeItem || Index >= m_listChildren.GetCount()) { return FALSE; } POSITION pos = m_listChildren.FindIndex(Index); *ppScopeItem = m_listChildren.GetAt(pos); return TRUE; } HRESULT CScopeItem::Reset() { // // We have not enumerated! // m_Enumerated = FALSE; // // If there are folders created from this scope item, // walk through all of them and tell each one // to reset the cached machine object // HRESULT hr = S_OK; if (!m_listFolder.IsEmpty()) { CFolder* pFolder; POSITION pos = m_listFolder.GetHeadPosition(); while (NULL != pos) { pFolder = m_listFolder.GetNext(pos); hr = pFolder->Reset(); } } return hr; } CCookie* CScopeItem::FindSelectedCookieData( CResultView** ppResultView ) { CFolder* pFolder; CResultView* pResultView; // // This routine returns the Selected Cookie in the result view if it has // the focus. This is done by locating the folder from the scopeitem. // If the folder is not selected, the current result view is accessed to // get the current selected cookie. If any of these fail a NULL value is // returned. Optionally the current CResultView class is returned. // POSITION pos = m_listFolder.GetHeadPosition(); while (NULL != pos) { pFolder = m_listFolder.GetNext(pos); if (this == pFolder->m_pScopeItem) { if (!pFolder->m_bSelect && (pResultView = pFolder->GetCurResultView()) != NULL) { if (ppResultView) { *ppResultView = pResultView; } return pResultView->GetSelectedCookie(); } } } return NULL; } CScopeItem::~CScopeItem() { if (!m_listChildren.IsEmpty()) { CScopeItem* pChild; POSITION pos; pos = m_listChildren.GetHeadPosition(); while (NULL != pos) { pChild = m_listChildren.GetNext(pos); delete pChild; } m_listChildren.RemoveAll(); } if (!m_listFolder.IsEmpty()) { POSITION pos; pos = m_listFolder.GetHeadPosition(); while (NULL != pos) { // // DO NOT delete it!!!! // (m_listFolder.GetNext(pos))->Release(); } m_listFolder.RemoveAll(); } } CFolder* CScopeItem::CreateFolder( CComponent* pComponent ) { ASSERT(pComponent); CFolder* pFolder; pFolder = new CFolder(this, pComponent); if (pFolder) { m_listFolder.AddTail(pFolder); pFolder->AddRef(); } else { SetLastError(ERROR_NOT_ENOUGH_MEMORY); } return pFolder; } HRESULT CScopeItem::AddMenuItems( LPCONTEXTMENUCALLBACK pCallback, long* pInsertionAllowed ) { CCookie* pSelectedCookie; CResultView* pResultView; if ((pSelectedCookie = FindSelectedCookieData(&pResultView)) != NULL) { // // Add menu items for the Action menu. // return pResultView->AddMenuItems(pSelectedCookie, pCallback, pInsertionAllowed, FALSE); } else { return S_OK; } } HRESULT CScopeItem::MenuCommand( long lCommandId ) { CCookie* pSelectedCookie; CResultView* pResultView; if ((pSelectedCookie = FindSelectedCookieData(&pResultView)) != NULL) { // // Handle menu requests for the Action menu. // return pResultView->MenuCommand(pSelectedCookie, lCommandId); } else { return S_OK; } } HRESULT CScopeItem::QueryPagesFor() { // // We do not have property pages for scope item // CCookie* pSelectedCookie; if ((pSelectedCookie = FindSelectedCookieData(NULL)) != NULL) { return S_OK; } else { return S_FALSE; } } HRESULT CScopeItem::CreatePropertyPages( LPPROPERTYSHEETCALLBACK lpProvider, LONG_PTR handle ) { CCookie* pSelectedCookie; CResultView* pResultView; if ((pSelectedCookie = FindSelectedCookieData(&pResultView)) != NULL) { return pResultView->CreatePropertyPages(pSelectedCookie, lpProvider, handle); } else { return S_OK; } } /////////////////////////////////////////////////////////////////// /// CFolder implementations /// CFolder::CFolder( CScopeItem* pScopeItem, CComponent* pComponent ) { ASSERT(pScopeItem && pComponent); m_pScopeItem = pScopeItem; m_pComponent = pComponent; m_Show = FALSE; m_pMachine = NULL; m_bSelect = FALSE; m_pOleTaskString = NULL; m_Ref = 0; m_FirstTimeOnShow = TRUE; m_Signature = FOLDER_SIGNATURE_DEVMGR; m_pViewTreeByType = NULL; m_pViewTreeByConnection = NULL; m_pViewResourcesByType = NULL; m_pViewResourcesByConnection = NULL; m_CurViewType = VIEW_DEVICESBYTYPE; m_pCurView = m_pViewTreeByType; m_ShowHiddenDevices = FALSE; } CFolder::~CFolder() { if (m_pViewTreeByType) { delete m_pViewTreeByType; } if (m_pViewTreeByConnection) { delete m_pViewTreeByConnection; } if (m_pViewResourcesByType) { delete m_pViewResourcesByType; } if (m_pViewResourcesByConnection) { delete m_pViewResourcesByConnection; } } HRESULT CFolder::Compare( MMC_COOKIE cookieA, MMC_COOKIE cookieB, int nCol, int* pnResult ) { UNREFERENCED_PARAMETER(cookieA); UNREFERENCED_PARAMETER(cookieB); UNREFERENCED_PARAMETER(nCol); ASSERT(pnResult); // // We do not have anything in the result pane, thus // comparision makes no sense. // *pnResult = 0; return S_OK; } HRESULT CFolder::GetDisplayInfo( LPRESULTDATAITEM pResultDataItem ) { if (!pResultDataItem) { return E_POINTER; } ASSERT(m_pScopeItem); // // This only take care of scope pane item (displaying scope pane node // on the result pane). The derived classes should take care of // result items. // if (RDI_STR & pResultDataItem->mask) { if (0 == pResultDataItem->nCol) { if (m_pOleTaskString) FreeOleTaskString(m_pOleTaskString); m_pOleTaskString = AllocOleTaskString(m_pScopeItem->GetNameString()); if (m_pOleTaskString) { pResultDataItem->str = m_pOleTaskString; } else { m_strScratch = m_pScopeItem->GetNameString(); pResultDataItem->str = (LPTSTR)(LPCTSTR)m_strScratch; } } else if (2 == pResultDataItem->nCol) { if (m_pOleTaskString) { FreeOleTaskString(m_pOleTaskString); } m_pOleTaskString = AllocOleTaskString(m_pScopeItem->GetDescString()); if (m_pOleTaskString) { pResultDataItem->str = m_pOleTaskString; } else { m_strScratch = m_pScopeItem->GetDescString(); pResultDataItem->str = (LPTSTR)(LPCTSTR)m_strScratch; } } else { return S_FALSE; } } if (RDI_IMAGE & pResultDataItem->mask) { pResultDataItem->nImage = m_pScopeItem->GetImageIndex(); } return S_OK; } HRESULT CFolder::AddMenuItems( CCookie* pCookie, LPCONTEXTMENUCALLBACK pCallback, long* pInsertionAllowed ) { ASSERT(pCookie); HRESULT hr = S_OK; // // If the cookie points to a scope item, add view menu items // if (NULL == pCookie->GetResultItem()) { ASSERT(m_pScopeItem == pCookie->GetScopeItem()); if (*pInsertionAllowed & CCM_INSERTIONALLOWED_VIEW) { long Flags; for (int i = 0; i < TOTAL_VIEWS; i++) { if (m_CurViewType == ViewDevicesMenuItems[i].Type) { Flags = MF_ENABLED | MF_CHECKED | MFT_RADIOCHECK; } else { Flags = MF_ENABLED; } hr = AddMenuItem(pCallback, ViewDevicesMenuItems[i].idName, ViewDevicesMenuItems[i].idStatusBar, ViewDevicesMenuItems[i].lCommandId, CCM_INSERTIONPOINTID_PRIMARY_VIEW, Flags, 0); if (FAILED(hr)) { break; } } // // Add "Show hidden devices" menu item // if (SUCCEEDED(hr)) { hr = AddMenuItem(pCallback, 0, 0, 0, CCM_INSERTIONPOINTID_PRIMARY_VIEW, MF_ENABLED, CCM_SPECIAL_SEPARATOR); if (SUCCEEDED(hr)) { if (m_ShowHiddenDevices) { Flags = MF_ENABLED | MF_CHECKED; } else { Flags = MF_ENABLED; } hr = AddMenuItem(pCallback, IDS_SHOW_ALL, IDS_MENU_STATUS_HIDDEN_DEVICES, IDM_SHOW_ALL, CCM_INSERTIONPOINTID_PRIMARY_VIEW, Flags, 0); } } } } else { if (m_pCurView) { // // Add menu items for the Context menu in the result pane. // hr = m_pCurView->AddMenuItems(pCookie, pCallback, pInsertionAllowed, TRUE); } else { hr = S_OK; } } return hr; } HRESULT CFolder::MenuCommand( CCookie* pCookie, long lCommandId ) { if (NULL == pCookie->GetResultItem()) { ASSERT(m_pScopeItem == pCookie->GetScopeItem()); // // Convert menu id to view type; // VIEWTYPE ViewType = m_CurViewType; BOOL fShowHiddenDevices = m_ShowHiddenDevices; switch (lCommandId) { case IDM_VIEW_DEVICESBYTYPE: ViewType = VIEW_DEVICESBYTYPE; break; case IDM_VIEW_DEVICESBYCONNECTION: ViewType = VIEW_DEVICESBYCONNECTION; break; case IDM_VIEW_RESOURCESBYTYPE: ViewType = VIEW_RESOURCESBYTYPE; break; case IDM_VIEW_RESOURCESBYCONNECTION: ViewType = VIEW_RESOURCESBYCONNECTION; break; case IDM_SHOW_ALL: fShowHiddenDevices = !fShowHiddenDevices; break; default: //not view menu. do nothing return S_OK; break; } if (!SelectView(ViewType, fShowHiddenDevices)) { return HRESULT_FROM_WIN32(GetLastError()); } // // Reselect the scopeitem // return m_pComponent->m_pConsole->SelectScopeItem(*m_pScopeItem); } else { if (m_pCurView) { // // Handle menu requests for the Context menu in the result pane. // return m_pCurView->MenuCommand(pCookie, lCommandId); } else { return S_OK; } } } HRESULT CFolder::QueryPagesFor( CCookie* pCookie ) { // // We do not have property pages for scope item // if (NULL == pCookie->GetResultItem()) { ASSERT(m_pScopeItem == pCookie->GetScopeItem()); return S_FALSE; } // // The cookie points to result item, let the current // view handle it // if (m_pCurView) { return m_pCurView->QueryPagesFor(pCookie); } else { return S_FALSE; } } HRESULT CFolder::CreatePropertyPages( CCookie* pCookie, LPPROPERTYSHEETCALLBACK lpProvider, LONG_PTR handle ) { if (NULL == pCookie->GetResultItem()) { ASSERT(m_pScopeItem == pCookie->GetScopeItem()); return S_OK; } if (m_pCurView) { return m_pCurView->CreatePropertyPages(pCookie, lpProvider, handle); } else { return S_OK; } } BOOL CFolder::SelectView( VIEWTYPE ViewType, BOOL fShowHiddenDevices ) { CResultView* pNewView; if (m_CurViewType == ViewType && m_ShowHiddenDevices == fShowHiddenDevices && m_pCurView) { return TRUE; } switch (ViewType) { case VIEW_DEVICESBYTYPE: if (!m_pViewTreeByType) { m_pViewTreeByType = new CViewTreeByType(); if (m_pViewTreeByType) { m_pViewTreeByType->SetFolder(this); } } pNewView = m_pViewTreeByType; break; case VIEW_DEVICESBYCONNECTION: if (!m_pViewTreeByConnection) { m_pViewTreeByConnection = new CViewTreeByConnection(); if (m_pViewTreeByConnection) { m_pViewTreeByConnection->SetFolder(this); } } pNewView = m_pViewTreeByConnection; break; case VIEW_RESOURCESBYTYPE: if (!m_pViewResourcesByType) { m_pViewResourcesByType = new CViewResourceTree(IDS_STATUS_RESOURCES_BYTYPE); if (m_pViewResourcesByType) { m_pViewResourcesByType->SetFolder(this); } } pNewView = m_pViewResourcesByType; break; case VIEW_RESOURCESBYCONNECTION: if (!m_pViewResourcesByConnection) { m_pViewResourcesByConnection = new CViewResourceTree(IDS_STATUS_RESOURCES_BYCONN); if (m_pViewResourcesByConnection) { m_pViewResourcesByConnection->SetFolder(this); } } pNewView = m_pViewResourcesByConnection; break; default: pNewView = NULL; break; } if (pNewView) { // // Let the view know that it is being diselected. // if (m_pCurView) { if (m_CurViewType != ViewType) { m_pComponent->SetDirty(); } } // // Let the new active view know that it is being selected. // m_pCurView = pNewView; m_CurViewType = ViewType; m_ShowHiddenDevices = fShowHiddenDevices; } return TRUE; } HRESULT CFolder::OnShow( BOOL fShow ) { if (fShow && !m_pMachine) { ASSERT(m_pComponent); if (!m_pComponent->AttachFolderToMachine(this, &m_pMachine)) { return HRESULT_FROM_WIN32(GetLastError()); } } m_Show = fShow; if (m_pMachine) { if (!SelectView(m_CurViewType, m_ShowHiddenDevices)) { return E_UNEXPECTED; } if (m_pCurView) { if (m_FirstTimeOnShow && m_Show) { int ReturnValue; // // Subsequent calls are not the first time anymore. // m_FirstTimeOnShow = FALSE; // // This is the first time we show the folder. // Put up a message box to warn user if // (1) The machine is a remote machine or // (2) The user does not have the Adminstator privilege. // (3) We can not connect to the remote machine // ASSERT(m_pComponent && m_pComponent->m_pConsole); // // Connect to a remote machine // if (!m_pMachine->IsLocal()) { if (!VerifyMachineName(m_pMachine->GetRemoteMachineFullName())) { // // Display a warning if we cannot connect to the remote machine // String strWarningFormat; String strWarningMsg; LPVOID lpLastError = NULL; if (strWarningFormat.LoadString(g_hInstance, IDS_INVALID_COMPUTER_NAME) && FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&lpLastError, 0, NULL)) { strWarningMsg.Format((LPTSTR)strWarningFormat, m_pMachine->GetMachineDisplayName(), lpLastError); m_pComponent->m_pConsole->MessageBox((LPTSTR)strWarningMsg, (LPCTSTR)g_strDevMgr, MB_ICONERROR | MB_OK, &ReturnValue); } if (lpLastError) { LocalFree(lpLastError); } } else { // // Otherwise display a warning that we are connect to a remote machine and // device manager will run in a neutered mode. // String strMsg; String strWarningMsg; if (strMsg.LoadString(g_hInstance, IDS_REMOTE_WARNING2) && strWarningMsg.LoadString(g_hInstance, IDS_REMOTE_WARNING1)) { strWarningMsg += strMsg; m_pComponent->m_pConsole->MessageBox((LPCTSTR)strWarningMsg, (LPCTSTR)g_strDevMgr, MB_ICONEXCLAMATION | MB_OK, &ReturnValue); } } } else if (!g_IsAdmin) { // // If we are running locally but the user does not have // sufficient privileges then tell the user we will run // in read-only mode. // String strWarningMsg; strWarningMsg.LoadString(g_hInstance, IDS_NOADMIN_WARNING); m_pComponent->m_pConsole->MessageBox(strWarningMsg, (LPCTSTR)g_strDevMgr, MB_ICONEXCLAMATION | MB_OK, &ReturnValue); } } return m_pCurView->OnShow(fShow); } } return S_OK; } HRESULT CFolder::OnRestoreView( BOOL* pfHandled ) { ASSERT(pfHandled); if (!pfHandled) { return E_INVALIDARG; } HRESULT hr = OnShow(TRUE); if (SUCCEEDED(hr)) { *pfHandled = TRUE; } return hr; } HRESULT CFolder::GetResultViewType( LPOLESTR* ppViewType, long* pViewOptions ) { ASSERT(pViewOptions); if (!SelectView(m_CurViewType, m_ShowHiddenDevices)) { return E_UNEXPECTED; } if (m_pCurView) { return m_pCurView->GetResultViewType(ppViewType, pViewOptions); } *pViewOptions = MMC_VIEW_OPTIONS_NONE; return S_FALSE; } HRESULT CFolder::Reset() { // // Delete all views so that we will create new ones // when OnShow is called. // if (m_pViewTreeByType) { delete m_pViewTreeByType; m_pViewTreeByType = NULL; } if (m_pViewTreeByConnection) { delete m_pViewTreeByConnection; m_pViewTreeByConnection = NULL; } if (m_pViewResourcesByType) { delete m_pViewResourcesByType; m_pViewResourcesByType = NULL; } if (m_pViewResourcesByConnection) { delete m_pViewResourcesByConnection; m_pViewResourcesByConnection = NULL; } m_pCurView = NULL; m_FirstTimeOnShow = TRUE; m_pMachine = NULL; return S_OK; } HRESULT CFolder::MachinePropertyChanged( CMachine* pMachine ) { // // Ignore the tvNotify(SELCHANGED) messages while the tree is changed. // if (m_pCurView) { m_pCurView->SetSelectOk(FALSE); } if (pMachine) { m_pMachine = pMachine; } if (m_pViewTreeByType) { m_pViewTreeByType->MachinePropertyChanged(pMachine); } if (m_pViewTreeByConnection) { m_pViewTreeByConnection->MachinePropertyChanged(pMachine); } if (m_pViewResourcesByType) { m_pViewResourcesByType->MachinePropertyChanged(pMachine); } if (m_pViewResourcesByConnection) { m_pViewResourcesByConnection->MachinePropertyChanged(pMachine); } if (m_pCurView) { m_pCurView->SetSelectOk(TRUE); } if (m_Show && pMachine) { OnShow(TRUE); } return S_OK; } HRESULT CFolder::GetPersistData( PBYTE pBuffer, int BufferSize ) { DEVMGRFOLDER_STATES states; states.Type = COOKIE_TYPE_SCOPEITEM_DEVMGR; states.CurViewType = m_CurViewType; states.ShowHiddenDevices = m_ShowHiddenDevices; if (BufferSize && !pBuffer) { return E_INVALIDARG; } if (BufferSize >= sizeof(states)) { ::memcpy(pBuffer, &states, sizeof(states)); return S_OK; } return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); } HRESULT CFolder::SetPersistData( PBYTE pData, int Size ) { if (!pData) { return E_POINTER; } if (!Size) { ASSERT(FALSE); return E_INVALIDARG; } PDEVMGRFOLDER_STATES pStates = (PDEVMGRFOLDER_STATES)pData; if (COOKIE_TYPE_SCOPEITEM_DEVMGR == pStates->Type) { if ((VIEW_DEVICESBYTYPE == pStates->CurViewType) || (VIEW_DEVICESBYCONNECTION == pStates->CurViewType) || (VIEW_RESOURCESBYTYPE == pStates->CurViewType) || (VIEW_RESOURCESBYCONNECTION == pStates->CurViewType)) { m_CurViewType = pStates->CurViewType; if (m_pCurView) { m_pCurView->OnShow(TRUE); } m_ShowHiddenDevices = pStates->ShowHiddenDevices; return S_OK; } } return E_UNEXPECTED; } HRESULT CFolder::tvNotify( HWND hwndTV, CCookie* pCookie, TV_NOTIFY_CODE Code, LPARAM arg, LPARAM param ) { if (m_pCurView) { return m_pCurView->tvNotify(hwndTV, pCookie, Code, arg, param); } else { return S_FALSE; } } HRESULT CFolder::OnOcxNotify( MMC_NOTIFY_TYPE event, LPARAM arg, LPARAM param ) { if (m_pCurView) { return m_pCurView->OnOcxNotify(event, arg, param); } return S_OK; } ///////////////////////////////////////////////////////////////////// //// CResultView implementations //// CResultView::~CResultView() { if (m_pCookieComputer) { if (m_pIDMTVOCX) { m_pIDMTVOCX->DeleteAllItems(); } delete m_pCookieComputer; } if (m_pIDMTVOCX) { m_pIDMTVOCX->Release(); } DestroySavedTreeStates(); } HRESULT CResultView::OnShow( BOOL fShow ) { if (!fShow) { return S_OK; } SafeInterfacePtr<IUnknown> pUnk; HRESULT hr; CComponent* pComponent = m_pFolder->m_pComponent; ASSERT(pComponent); ASSERT(pComponent->m_pConsole); hr = S_OK; if (NULL == m_pIDMTVOCX) { hr = pComponent->m_pConsole->QueryResultView(&pUnk); if (SUCCEEDED(hr)) { // // Get our OCX private interface // hr = pUnk->QueryInterface(IID_IDMTVOCX, (void**)&m_pIDMTVOCX); } if (SUCCEEDED(hr)) { m_pIDMTVOCX->Connect(pComponent, (MMC_COOKIE)this); m_hwndTV = m_pIDMTVOCX->GetWindowHandle(); m_pIDMTVOCX->SetActiveConnection((MMC_COOKIE)this); // // Set up the annotation map for screen readers. // IAccPropServices *pAccPropSvc = NULL; hr = CoCreateInstance(CLSID_AccPropServices, NULL, CLSCTX_SERVER, IID_IAccPropServices, (void**)&pAccPropSvc); if ((hr == S_OK) && pAccPropSvc) { pAccPropSvc->SetHwndPropStr(m_hwndTV, (DWORD)OBJID_CLIENT, 0, PROPID_ACC_DESCRIPTIONMAP, (LPTSTR)m_stringAnnotationMap); pAccPropSvc->Release(); } DisplayTree(); String strStartupCommand; String strStartupDeviceId; strStartupCommand = GetStartupCommand(); strStartupDeviceId = GetStartupDeviceId(); if (!strStartupCommand.IsEmpty() && !strStartupDeviceId.IsEmpty() && !strStartupCommand.CompareNoCase(DEVMGR_COMMAND_PROPERTY)) { hr = DoProperties(m_hwndTV, m_pSelectedCookie); } } } else { m_pIDMTVOCX->SetActiveConnection((MMC_COOKIE)this); if (!DisplayTree()) { hr = HRESULT_FROM_WIN32(GetLastError()); } } return hr; } inline LPCTSTR CResultView::GetStartupDeviceId() { return m_pFolder->m_pComponent->GetStartupDeviceId(); } inline LPCTSTR CResultView::GetStartupCommand() { return m_pFolder->m_pComponent->GetStartupCommand(); } // // This function is called when machine states have changed. // // INPUT: // pMachine -- if NULL, the machine is being destroy. // // OUTPUT: // stanard OLE return code HRESULT CResultView::MachinePropertyChanged( CMachine* pMachine ) { if (pMachine) { m_pMachine = pMachine; } else { // // pMachine is NULL, the CMachine we associated with is being destroyed. // if (m_pCookieComputer) { ASSERT(!m_pSelectedItem && m_listExpandedItems.IsEmpty()); // // Save the expanded states // SaveTreeStates(m_pCookieComputer); m_pIDMTVOCX->DeleteAllItems(); m_pIDMTVOCX->SetImageList(TVSIL_NORMAL, NULL); delete m_pCookieComputer; // // Reset these because they are no longer valid. // m_pCookieComputer = NULL; } } return S_OK; } // // This function saves the subtree states rooted by pCookieStart. // It creates an identifier for each expanded node and inserts // the identifier to the class memember, m_listExpandedItems. // // It also saves the selected cookie by creating an identifier and // saving it in m_pSelectedItem. // // This function may throw CMemoryException // // INPUT: // pCookieStart -- subtree root // OUTPUT: // NONE void CResultView::SaveTreeStates( CCookie* pCookieStart ) { CItemIdentifier* pItem; // // If we have a selected item, create an identifier for it // if (m_pSelectedCookie) { m_pSelectedItem = m_pSelectedCookie->GetResultItem()->CreateIdentifier(); m_pSelectedCookie = NULL; } while (pCookieStart) { if (pCookieStart->IsFlagsOn(COOKIE_FLAGS_EXPANDED)) { pItem = pCookieStart->GetResultItem()->CreateIdentifier(); m_listExpandedItems.AddTail(pItem); } if (pCookieStart->GetChild()) { SaveTreeStates(pCookieStart->GetChild()); } pCookieStart = pCookieStart->GetSibling(); } } void CResultView::DestroySavedTreeStates() { if (!m_listExpandedItems.IsEmpty()) { POSITION pos; pos = m_listExpandedItems.GetHeadPosition(); while (NULL != pos) { delete m_listExpandedItems.GetNext(pos); } m_listExpandedItems.RemoveAll(); } if (m_pSelectedItem) { delete m_pSelectedItem; m_pSelectedItem = NULL; } } // // This function restores the expanded and selected state for the cookie. // // INPUT: // pCookie -- cookie to restore states for // OUTPUT: // NONE void CResultView::RestoreSavedTreeState( CCookie* pCookie ) { // // If the cookie was expanded before, mark it so that DisplayTree // will expand it. // if (!m_listExpandedItems.IsEmpty()) { POSITION pos = m_listExpandedItems.GetHeadPosition(); CItemIdentifier* pItem; while (NULL != pos) { pItem = m_listExpandedItems.GetNext(pos); if (*pItem == *pCookie) { pCookie->TurnOnFlags(COOKIE_FLAGS_EXPANDED); break; } } } if (m_pSelectedItem && (*m_pSelectedItem == *pCookie)) { m_pSelectedCookie = pCookie; } } BOOL CResultView::DisplayTree() { BOOL Result = FALSE; ASSERT(m_pIDMTVOCX); ::SendMessage(m_hwndTV, WM_SETREDRAW, FALSE, 0L); // // Ignore the tvNotify(SELCHANGED) messages while the tree is changed. // SetSelectOk(FALSE); m_pIDMTVOCX->DeleteAllItems(); // // Only display the tree if there is something to display // if (m_pCookieComputer) { m_pIDMTVOCX->SetImageList(TVSIL_NORMAL, m_pMachine->DiGetClassImageList()); m_pIDMTVOCX->SetStyle(TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT); BOOL HasProblem = FALSE; // // Walks down the tree started from m_pCookieComputer // Result = DisplaySubtree(NULL, m_pCookieComputer, &HasProblem); if (HasProblem && Result) { m_pIDMTVOCX->Expand(TVE_EXPAND, (HTREEITEM)m_pCookieComputer->m_lParam); } // // If we have a pre-selected item, use it. Otherwise, use computer // as the selected node. // HTREEITEM hSelectedItem = (m_pSelectedCookie && m_pSelectedCookie->m_lParam) ? (HTREEITEM)m_pSelectedCookie->m_lParam : (HTREEITEM)m_pCookieComputer->m_lParam; SetSelectOk(TRUE); if (hSelectedItem) { m_pIDMTVOCX->SelectItem(TVGN_CARET, hSelectedItem); m_pIDMTVOCX->EnsureVisible(hSelectedItem); } } ::SendMessage(m_hwndTV, WM_SETREDRAW, TRUE, 0L); InvalidateRect(m_hwndTV, NULL, TRUE); return Result; } // // This function walks through the given cookie subtree rooted by pCookie // and insert each node into the TreeView OCX. // INPUT: // htiParent -- HTREEITEM for the new cookie to be inserted // if NULL is given, TVI_ROOT is assumed. // pCookie -- the subtree root cookie to be displayed. // OUTPUT: // none. // BOOL CResultView::DisplaySubtree( HTREEITEM htiParent, CCookie* pCookie, BOOL* pReportProblem ) { TV_INSERTSTRUCT ti; CResultItem* pRltItem; HTREEITEM hti; BOOL bResource; BOOL fShowHiddenDevices = m_pFolder->ShowHiddenDevices(); while (pCookie) { pRltItem = pCookie->GetResultItem(); ti.item.state = INDEXTOOVERLAYMASK(0); bResource = FALSE; // // The cookie is not yet in the treeview. // pCookie->m_lParam = 0; if (COOKIE_TYPE_RESULTITEM_DEVICE == pCookie->GetType()) { CDevice* pDevice = (CDevice*)pRltItem; // // This is a hidden device and we are not showing hidden devices // // Note that we need to special case these devices because they // are not shown in the tree view, but their visible children are shown. // if (!fShowHiddenDevices && pDevice->IsHidden()) { // // If the cookie has children, display them // CCookie* pCookieChild = pCookie->GetChild(); BOOL ChildProblem = FALSE; if (pCookieChild) { DisplaySubtree(htiParent, pCookieChild, &ChildProblem); } // // Continue on with the next device. This will skip all of the display // code below. // pCookie = pCookie->GetSibling(); continue; } // // If the device is disabled then set the OVERLAYMASK to the Red X // if (pDevice->IsDisabled()) { ti.item.state = INDEXTOOVERLAYMASK(IDI_DISABLED_OVL - IDI_CLASSICON_OVERLAYFIRST + 1); *pReportProblem = TRUE; } // // If the device has a problem then set the OVERLAYMASK to the Yellow ! // else if (pDevice->HasProblem()) { ti.item.state = INDEXTOOVERLAYMASK(IDI_PROBLEM_OVL - IDI_CLASSICON_OVERLAYFIRST + 1); *pReportProblem = TRUE; } // // if the device does not present, then set the state to TVIS_CUT. This grays out // the icon a bit so it looks like a ghost icon. // else if (pDevice->IsPhantom()) { ti.item.state = TVIS_CUT; } } else if (COOKIE_TYPE_RESULTITEM_CLASS == pCookie->GetType()) { CClass* pClass = (CClass*)pRltItem; // // If we don't have any devices to show for this class, or this // is a NoDisplayClass and we are not showing hidden devices, // then just get our next sibling and continue without showing // this class. // if ((0 == pClass->GetNumberOfDevices(fShowHiddenDevices)) || (!fShowHiddenDevices && pClass->NoDisplay())) { // // Continue on with the next device. This will skip all of the display // code below. // pCookie = pCookie->GetSibling(); continue; } } // // Is this a resource? // else if (COOKIE_TYPE_RESULTITEM_RESOURCE_MEMORY == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_IO == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_DMA == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_IRQ == pCookie->GetType()) { bResource = TRUE; // // If this is a FORCED CONFIG resource then overlay the forced // config icon // if (((CResource*)pCookie->GetResultItem())->IsForced()) { ti.item.state = INDEXTOOVERLAYMASK(IDI_FORCED_OVL-IDI_CLASSICON_OVERLAYFIRST+1); } } ti.hParent = (htiParent != NULL) ? htiParent : TVI_ROOT; ti.hInsertAfter = TVI_SORT; ti.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE; ti.item.iImage = ti.item.iSelectedImage = pRltItem->GetImageIndex(); if (bResource) { ti.item.pszText = (LPTSTR)((CResource*)pRltItem)->GetViewName(); } else { ti.item.pszText = (LPTSTR)pRltItem->GetDisplayName(); } ti.item.lParam = (LPARAM)pCookie; ti.item.stateMask = TVIS_OVERLAYMASK | TVIS_CUT; hti = m_pIDMTVOCX->InsertItem(&ti); // // Save the HTREEITEM // pCookie->m_lParam = (LPARAM)hti; if (NULL != hti) { // // If the cookie has children, display them // CCookie* pCookieChild = pCookie->GetChild(); BOOL ChildProblem = FALSE; if (pCookieChild) { if (bResource && htiParent && GetDescriptionStringID() == IDS_STATUS_RESOURCES_BYTYPE) { // // This is a child of a resource being viewed by type, // so the tree needs to be flattened. This is done by // using the same parent. // DisplaySubtree(htiParent, pCookieChild, &ChildProblem); } else { DisplaySubtree(hti, pCookieChild, &ChildProblem); } } // // If any of the device's children have a problem, or if // it was previously expanded, then expand it. // if (ChildProblem || pCookie->IsFlagsOn(COOKIE_FLAGS_EXPANDED)) { m_pIDMTVOCX->Expand(TVE_EXPAND, hti); } // // Propogate the child's problem state back to the parent // *pReportProblem |= ChildProblem; } pCookie = pCookie->GetSibling(); } return TRUE; } HRESULT CResultView::GetResultViewType( LPOLESTR* ppViewType, long* pViewOptions ) { ASSERT(ppViewType && pViewOptions); // // The caller is responsible for freeing the memory we allocated. // LPOLESTR polestr; polestr = AllocOleTaskString(OCX_TREEVIEW); if (!polestr) { return E_OUTOFMEMORY; } *ppViewType = polestr; // // We have not list view options // *pViewOptions = MMC_VIEW_OPTIONS_NOLISTVIEWS; return S_OK; } HRESULT CResultView::AddMenuItems( CCookie* pCookie, LPCONTEXTMENUCALLBACK pCallback, long* pInsertionAllowed, BOOL fContextMenu // True if for result view context menu ) { HRESULT hr = S_OK; CDevice* pDevice = NULL; if (CCM_INSERTIONALLOWED_TOP & *pInsertionAllowed) { switch (pCookie->GetType()) { case COOKIE_TYPE_RESULTITEM_DEVICE: case COOKIE_TYPE_RESULTITEM_RESOURCE_IRQ: case COOKIE_TYPE_RESULTITEM_RESOURCE_DMA: case COOKIE_TYPE_RESULTITEM_RESOURCE_IO: case COOKIE_TYPE_RESULTITEM_RESOURCE_MEMORY: if (m_pMachine->IsLocal() && g_IsAdmin) { if (COOKIE_TYPE_RESULTITEM_DEVICE == pCookie->GetType()) { pDevice = (CDevice*) pCookie->GetResultItem(); } else { // // This is a resource item, get the pointer for the device // object from the resource object. // CResource* pResource = (CResource*) pCookie->GetResultItem(); if (pResource) { pDevice = pResource->GetDevice(); } } if (pDevice == NULL) { break; } CClass* pClass = pDevice->GetClass(); // // All devices can have their driver's updated except for legacy devices. // if (!IsEqualGUID(*pClass, GUID_DEVCLASS_LEGACYDRIVER)) { hr = AddMenuItem(pCallback, IDS_UPDATEDRIVER, IDS_MENU_STATUS_UPDATEDRIVER, IDM_UPDATEDRIVER, CCM_INSERTIONPOINTID_PRIMARY_TOP, MF_ENABLED, 0); } // // Only show the Enable/Disable menu item if the device // can be disabled. // if (pDevice->IsDisableable()) { if (pDevice->IsStateDisabled()) { hr = AddMenuItem(pCallback, IDS_ENABLE, IDS_MENU_STATUS_ENABLE, IDM_ENABLE, CCM_INSERTIONPOINTID_PRIMARY_TOP, MF_ENABLED, 0); } else { hr = AddMenuItem(pCallback, IDS_DISABLE, IDS_MENU_STATUS_DISABLE, IDM_DISABLE, CCM_INSERTIONPOINTID_PRIMARY_TOP, MF_ENABLED, 0); } } // // Only show the uninstall menu item if the device can be // uninstalled. // if (SUCCEEDED(hr) && pDevice->IsUninstallable()) { hr = AddMenuItem(pCallback, IDS_REMOVE, IDS_MENU_STATUS_REMOVE, IDM_REMOVE, CCM_INSERTIONPOINTID_PRIMARY_TOP, MF_ENABLED, 0); } } // FALL THROUGH........ case COOKIE_TYPE_RESULTITEM_CLASS: if (g_IsAdmin) { if (SUCCEEDED(hr)) { hr = AddMenuItem(pCallback, 0, 0, 0, CCM_INSERTIONPOINTID_PRIMARY_TOP, MF_ENABLED, CCM_SPECIAL_SEPARATOR); } if (SUCCEEDED(hr)) { hr = AddMenuItem(pCallback, IDS_REFRESH, IDS_MENU_STATUS_SCAN_CHANGES, IDM_REFRESH, CCM_INSERTIONPOINTID_PRIMARY_TOP, MF_ENABLED, 0); } } if (fContextMenu) { if (SUCCEEDED(hr)) { hr = AddMenuItem(pCallback, 0, 0, 0, CCM_INSERTIONPOINTID_PRIMARY_TOP, MF_ENABLED, CCM_SPECIAL_SEPARATOR); } if (SUCCEEDED(hr)) { hr = AddMenuItem(pCallback, IDS_PROPERTIES, IDS_MENU_STATUS_PROPERTIES, IDM_PROPERTIES, CCM_INSERTIONPOINTID_PRIMARY_TOP, MF_DEFAULT, CCM_SPECIAL_DEFAULT_ITEM); } } break; case COOKIE_TYPE_RESULTITEM_COMPUTER: case COOKIE_TYPE_RESULTITEM_RESTYPE: if (g_IsAdmin) { hr = AddMenuItem(pCallback, IDS_REFRESH, IDS_MENU_STATUS_SCAN_CHANGES, IDM_REFRESH, CCM_INSERTIONPOINTID_PRIMARY_TOP, MF_ENABLED, 0); } break; default: break; } } return hr; } // This function handles menu command for the device tree. // // INPUT: pCookie -- the cookie // lCommandId -- the command. See AddMenuItems for valid command // id for each type of cookie. // // OUTPUT: HRESULT S_OK if succeeded. // S_XXX error code. HRESULT CResultView::MenuCommand( CCookie* pCookie, long lCommandId ) { HRESULT hr = S_OK; //TRACE1(TEXT("Menu command, commandid = %lx\n"), lCommandId); ASSERT(pCookie); CResultItem* pResultItem = pCookie->GetResultItem(); ASSERT(pResultItem); CDevice* pDevice = NULL; switch (pCookie->GetType()) { case COOKIE_TYPE_RESULTITEM_DEVICE: pDevice = (CDevice*)pResultItem; break; case COOKIE_TYPE_RESULTITEM_RESOURCE_IRQ: case COOKIE_TYPE_RESULTITEM_RESOURCE_DMA: case COOKIE_TYPE_RESULTITEM_RESOURCE_IO: case COOKIE_TYPE_RESULTITEM_RESOURCE_MEMORY: CResource* pResource = (CResource*)pResultItem; if (pResource) { pDevice = pResource->GetDevice(); } break; } switch (lCommandId) { case IDM_UPDATEDRIVER: if (pDevice) { BOOL Installed; DWORD RestartFlags = 0; DWORD Status = 0, Problem = 0; // // If the device has the DN_WILL_BE_REMOVED flag set and the user is // attempting to update the driver then we will prompt them for a // reboot and include text in the prompt that explains this device // is in the process of being removed. // if (pDevice->GetStatus(&Status, &Problem) && (Status & DN_WILL_BE_REMOVED)) { PromptForRestart(m_hwndTV, DI_NEEDRESTART, IDS_WILL_BE_REMOVED_NO_UPDATE_DRIVER); } else { // // Disable Refreshing while the Update Driver Wizard is up. // pDevice->m_pMachine->EnableRefresh(FALSE); HCURSOR hCursorOld = SetCursor(LoadCursor(NULL, IDC_WAIT)); Installed = pDevice->m_pMachine->InstallDevInst(m_hwndTV, pDevice->GetDeviceID(), TRUE, &RestartFlags); if (hCursorOld) { SetCursor(hCursorOld); } // // Prompt for a restart if one is needed. If the user does NOT answer // YES to the restart dialog then schedule a refresh since we might not // get one from a WM_DEVICECHANGE. // if (m_pMachine->IsLocal()) { if (PromptForRestart(NULL, RestartFlags) == IDNO) { pDevice->m_pMachine->ScheduleRefresh(); } } // // Enable Refreshing now that we are done updating the driver. // pDevice->m_pMachine->EnableRefresh(TRUE); } } break; case IDM_ENABLE: case IDM_DISABLE: if (pDevice) { DWORD RestartFlags = 0; DWORD Status = 0, Problem = 0; // // If the device has the DN_WILL_BE_REMOVED flag set and the user is // attempting to enable/disable the driver then we will prompt them for a // reboot and include text in the prompt that explains this device // is in the process of being removed. // if (pDevice->GetStatus(&Status, &Problem) && (Status & DN_WILL_BE_REMOVED)) { PromptForRestart(m_hwndTV, DI_NEEDRESTART, IDS_WILL_BE_REMOVED_NO_CHANGE_SETTINGS); } else { RestartFlags = pDevice->EnableDisableDevice(m_hwndTV, (lCommandId == IDM_ENABLE)); // // Update the toolbar buttons since the device just changed. // m_pFolder->m_pComponent->UpdateToolbar(pCookie); // // Prompt for a Restart if we are running locally. // The PromptForRestart() API checks the flags to determine // if a restart is actually needed. // if (m_pMachine->IsLocal()) { if (PromptForRestart(NULL, RestartFlags) == IDNO) { m_pMachine->ScheduleRefresh(); } } } } break; case IDM_REMOVE: if (pDevice) { hr = RemoveDevice(pDevice); } break; case IDM_REFRESH: // // This will force every attached folder to recreate // its machine data // ASSERT(m_pMachine); if (!m_pMachine->Reenumerate()) { hr = HRESULT_FROM_WIN32(GetLastError()); } break; case IDM_PROPERTIES: hr = DoProperties(m_hwndTV, pCookie); break; default: hr = S_OK; break; } return hr; } // This function reports if property pages are available for the // given cookie. Returning S_FALSE, the cookie's "properties" menu // item will not displayed. // // INPUT: pCookie -- the cookie // // OUTPUT: HRESULT S_OK if pages are available for the cookie. // S_FALSE if no pages are available for the cookie. HRESULT CResultView::QueryPagesFor( CCookie* pCookie ) { ASSERT(pCookie); if (COOKIE_TYPE_RESULTITEM_RESOURCE_IRQ == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_DMA == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_IO == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_MEMORY == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_CLASS == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_DEVICE == pCookie->GetType()) { return S_OK; } return S_FALSE; } // This function creates property page(s) for the given cookie. // // INPUT: pCookie -- the cookie // lpProvider -- interface pointer to IPROPERTYSHEETCALLBACK // used to add HPROPSHEETPAGE to the property sheet. // handle -- handle for property change notification // The handle is required for MMCPropertyChangeNotify // API. // OUTPUT: HRESULT S_OK if succeeded. // S_FALSE if no pages are added. // S_XXX error code. HRESULT CResultView::CreatePropertyPages( CCookie* pCookie, LPPROPERTYSHEETCALLBACK lpProvider, LONG_PTR handle ) { // // Design issue: // We depend on the general page to do some houeskeeping works on the // property sheet which is owned and controlled by MMC running in a // separate thread. General page is always the first page and its window // is always created. If we need to subclass the property sheet someday, // having our own General page always assure that we will get the window // handle to the property sheet. // // The most important housekeeping work the General page does is to inform the // associate device or class when a property sheet is being created // or destroyed. A device can not be removed if it has a property sheet // running. The machine can not refresh the device tree if there are property // sheet(s) running on any devices/classes it contains. Property sheets // created by a folder should be canceled when the folder is being // destroyed. // // So far, no class installers have attempted to add their own General // page and I believe it will be true in the future because 1). the page // is too complicated and overloaded with features(and hard to implement) and // 2). no major gains can be obtained by implementing a new one. // To warn the developers who does their own General page,we will have a // message box warn them about this and proceed with OUR general page. // ASSERT(pCookie); CPropSheetData* ppsd = NULL; CMachine* pNewMachine = NULL; switch (pCookie->GetType()) { case COOKIE_TYPE_RESULTITEM_CLASS: CClass* pClass; pClass = (CClass*) pCookie->GetResultItem(); ASSERT(pClass); // // Create a new CMachine object that just contains this specific device // and it's class. We need to do this since the CDevice and CClass of // the cookie that was passed into this API will get destroyed whenever // we get a WM_DEVICECHANGE notification. // PVOID Context; pNewMachine = new CMachine(m_pMachine->GetMachineFullName()); CClass* pNewClass; if (pNewMachine->Initialize(NULL, NULL, *pClass) && pNewMachine->GetFirstClass(&pNewClass, Context) && pNewClass) { pNewMachine->m_ParentMachine = m_pMachine; m_pMachine->AttachChildMachine(pNewMachine); pNewMachine->SetPropertySheetShouldDestroy(); ppsd = &pNewClass->m_psd; if (ppsd->Create(g_hInstance, m_hwndTV, MAX_PROP_PAGES, handle)) { CDevInfoList* pClassDevInfo; // // The CDevInfoList object is maintained by the CClass // object. // pClassDevInfo = pNewClass->GetDevInfoList(); if (pClassDevInfo && pClassDevInfo->DiGetClassDevPropertySheet(NULL, &ppsd->m_psh, MAX_PROP_PAGES, pNewMachine->IsLocal() ? DIGCDP_FLAG_ADVANCED : DIGCDP_FLAG_REMOTE_ADVANCED)) { if (pClassDevInfo->DiGetFlags(NULL) & DI_GENERALPAGE_ADDED) { TCHAR szText[MAX_PATH]; LoadResourceString(IDS_GENERAL_PAGE_WARNING, szText, ARRAYLEN(szText)); int ReturnValue; m_pFolder->m_pComponent->m_pConsole->MessageBox( szText, pNewClass->GetDisplayName(), MB_ICONEXCLAMATION | MB_OK, &ReturnValue); // // fall through to create our general page. // } SafePtr<CClassGeneralPage> GenPagePtr; CClassGeneralPage* pGenPage; pGenPage = new CClassGeneralPage; if (pGenPage) { GenPagePtr.Attach(pGenPage); HPROPSHEETPAGE hPage = pGenPage->Create(pNewClass); // // General page has to be the first page // if (ppsd->InsertPage(hPage, 0)) { GenPagePtr.Detach(); } else { ::DestroyPropertySheetPage(hPage); } } } } } break; case COOKIE_TYPE_RESULTITEM_RESOURCE_IRQ: case COOKIE_TYPE_RESULTITEM_RESOURCE_DMA: case COOKIE_TYPE_RESULTITEM_RESOURCE_IO: case COOKIE_TYPE_RESULTITEM_RESOURCE_MEMORY: case COOKIE_TYPE_RESULTITEM_DEVICE: CDevice* pDevice; CDevice* pNewDevice; pNewDevice = NULL; if (COOKIE_TYPE_RESULTITEM_DEVICE == pCookie->GetType()) { pDevice = (CDevice*) pCookie->GetResultItem(); } else { // // This is a resource item, get the pointer for the device // object from the resource object. // CResource* pResource = (CResource*) pCookie->GetResultItem(); ASSERT(pResource); pDevice = pResource->GetDevice(); } ASSERT(pDevice); // // Create a new CMachine object that just contains this specific device // and it's class. We need to do this since the CDevice and CClass of // the cookie that was passed into this API will get destroyed whenever // we get a WM_DEVICECHANGE notification. // PVOID DeviceContext; pNewMachine = new CMachine(m_pMachine->GetMachineFullName()); if (pNewMachine->Initialize(NULL, pDevice->GetDeviceID()) && pNewMachine->GetFirstDevice(&pNewDevice, DeviceContext) && pNewDevice) { pNewMachine->m_ParentMachine = m_pMachine; m_pMachine->AttachChildMachine(pNewMachine); pNewMachine->SetPropertySheetShouldDestroy(); ppsd = &pNewDevice->m_psd; if (ppsd->Create(g_hInstance, m_hwndTV, MAX_PROP_PAGES, handle)) { // // Add any class/device specific property pages // pNewMachine->DiGetClassDevPropertySheet(*pNewDevice, &ppsd->m_psh, MAX_PROP_PAGES, pNewMachine->IsLocal() ? DIGCDP_FLAG_ADVANCED : DIGCDP_FLAG_REMOTE_ADVANCED); // // Add the general tab // DWORD DiFlags = pNewMachine->DiGetFlags(*pNewDevice); SafePtr<CDeviceGeneralPage> GenPagePtr; if (DiFlags & DI_GENERALPAGE_ADDED) { TCHAR szText[MAX_PATH]; LoadResourceString(IDS_GENERAL_PAGE_WARNING, szText, ARRAYLEN(szText)); int ReturnValue; m_pFolder->m_pComponent->m_pConsole->MessageBox( szText, pNewDevice->GetDisplayName(), MB_ICONEXCLAMATION | MB_OK, &ReturnValue); // // fall through to create our general page. // } CDeviceGeneralPage* pGenPage = new CDeviceGeneralPage; if (pGenPage) { GenPagePtr.Attach(pGenPage); HPROPSHEETPAGE hPage = pGenPage->Create(pNewDevice); if (hPage) { // // General page has to be the first page // if (ppsd->InsertPage(hPage, 0)) { GenPagePtr.Detach(); } else { ::DestroyPropertySheetPage(hPage); } } } // // Add the driver tab // SafePtr<CDeviceDriverPage> DrvPagePtr; if (!(DiFlags & DI_DRIVERPAGE_ADDED)) { CDeviceDriverPage* pPage = new CDeviceDriverPage; if (pPage) { DrvPagePtr.Attach(pPage); HPROPSHEETPAGE hPage = pPage->Create(pNewDevice); if (hPage) { if (ppsd->InsertPage(hPage)) { DrvPagePtr.Detach(); } else { ::DestroyPropertySheetPage(hPage); } } } } // // add the details tab // // If the environment variable DEVMGR_SHOW_DETAILS does exist and it // is not 0 then we will show the details tab // TCHAR Buffer[MAX_PATH]; DWORD BufferLen; if (((BufferLen = ::GetEnvironmentVariable(TEXT("DEVMGR_SHOW_DETAILS"), Buffer, ARRAYLEN(Buffer))) != 0) && ((BufferLen > 1) || (lstrcmp(Buffer, TEXT("0"))))) { SafePtr<CDeviceDetailsPage> DetailsPagePtr; CDeviceDetailsPage* pDetailsPage = new CDeviceDetailsPage; DetailsPagePtr.Attach(pDetailsPage); HPROPSHEETPAGE hPage = pDetailsPage->Create(pNewDevice); if (hPage) { if (ppsd->InsertPage(hPage)) { DetailsPagePtr.Detach(); } else { ::DestroyPropertySheetPage(hPage); } } } // // Add the resource tab // if (pNewDevice->HasResources() && !(DiFlags & DI_RESOURCEPAGE_ADDED)) { pNewMachine->DiGetExtensionPropSheetPage(*pNewDevice, AddPropPageCallback, SPPSR_SELECT_DEVICE_RESOURCES, (LPARAM)ppsd ); } #ifndef _WIN64 DWORD DiFlagsEx = pNewMachine->DiGetExFlags(*pNewDevice); // // Add the power management tab // if (pNewMachine->IsLocal() && !(DiFlagsEx & DI_FLAGSEX_POWERPAGE_ADDED)) { // // Check if the device support power management // CPowerShutdownEnable ShutdownEnable; CPowerWakeEnable WakeEnable; if (ShutdownEnable.Open(pNewDevice->GetDeviceID()) || WakeEnable.Open(pNewDevice->GetDeviceID())) { ShutdownEnable.Close(); WakeEnable.Close(); SafePtr<CDevicePowerMgmtPage> PowerMgmtPagePtr; CDevicePowerMgmtPage* pPowerPage = new CDevicePowerMgmtPage; if (pPowerPage) { PowerMgmtPagePtr.Attach(pPowerPage); HPROPSHEETPAGE hPage = pPowerPage->Create(pNewDevice); if (hPage) { if (ppsd->InsertPage(hPage)) { PowerMgmtPagePtr.Detach(); } else { ::DestroyPropertySheetPage(hPage); } } } } } #endif // // Add any Bus specific property pages if this is the local machine // if (pNewMachine->IsLocal()) { CBusPropPageProvider* pBusPropPageProvider = new CBusPropPageProvider(); if (pBusPropPageProvider) { SafePtr<CBusPropPageProvider> ProviderPtr; ProviderPtr.Attach(pBusPropPageProvider); if (pBusPropPageProvider->EnumPages(pNewDevice, ppsd)) { ppsd->AddProvider(pBusPropPageProvider); ProviderPtr.Detach(); } } } } } break; default: break; } if (ppsd && ppsd->m_psh.nPages) { PROPSHEETHEADER& psh = ppsd->m_psh; for (UINT Index = 0; Index < psh.nPages; Index++) { lpProvider->AddPage(psh.phpage[Index]); } return S_OK; } // // If we didn't add any pages then we need to delete the new CMachine we // created. // if (pNewMachine) { delete pNewMachine; } // // No pages are added, return S_FALSE so that the responsible // Component can do its clean up // return S_FALSE; } // This function handles notification codes from the TV OCX. // // INPUT: // hwndTV -- the Window handle of the TV OCX. // pCookie -- the cookie // Code -- notification code. // arg -- argument to the given notification code. // param -- another parameter to the given notificaton code. // // OUTPUT: // HRESULT -- S_OK if this function has processed the notification // and the caller should not do any further processing. // S_FALSE if the caller should do more processing. HRESULT CResultView::tvNotify( HWND hwndTV, CCookie* pCookie, TV_NOTIFY_CODE Code, LPARAM arg, LPARAM param ) { HRESULT hr; UNREFERENCED_PARAMETER(arg); if (m_hwndTV != hwndTV) { return S_FALSE; } // // Presume that we do not handle the notification // hr = S_FALSE; switch (Code) { case TV_NOTIFY_CODE_DBLCLK: if ((TVHT_ONITEM & param) && (COOKIE_TYPE_RESULTITEM_RESOURCE_IRQ == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_DMA == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_IO == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_MEMORY == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_DEVICE == pCookie->GetType())) { if (SUCCEEDED(DoProperties(hwndTV, pCookie))) hr = S_OK; } break; case TV_NOTIFY_CODE_CONTEXTMENU: if (SUCCEEDED(DoContextMenu(hwndTV, pCookie, (POINT*)param))) hr = S_OK; break; case TV_NOTIFY_CODE_EXPANDED: if (TVE_EXPAND & param) { pCookie->TurnOnFlags(COOKIE_FLAGS_EXPANDED); } else if (TVE_COLLAPSE & param) { pCookie->TurnOffFlags(COOKIE_FLAGS_EXPANDED); } ASSERT(S_FALSE == hr); break; case TV_NOTIFY_CODE_FOCUSCHANGED: // gaining the focus, set the console verbs and toolbar buttons if (param) { UpdateConsoleVerbs(pCookie); m_pFolder->m_pComponent->UpdateToolbar(pCookie); } break; case TV_NOTIFY_CODE_SELCHANGED: if (m_SelectOk) { // These messages are ignored while the tree is being changed. m_pSelectedCookie = pCookie; UpdateConsoleVerbs(pCookie); m_pFolder->m_pComponent->UpdateToolbar(pCookie); } break; case TV_NOTIFY_CODE_KEYDOWN: if (VK_RETURN == param) { if (COOKIE_TYPE_RESULTITEM_RESOURCE_IRQ == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_DMA == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_IO == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_MEMORY == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_DEVICE == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_CLASS == pCookie->GetType()) { if (SUCCEEDED(DoProperties(hwndTV, pCookie))) hr = S_OK; } } else if (VK_DELETE == param && COOKIE_TYPE_RESULTITEM_DEVICE == pCookie->GetType()) { // // Remove the selected device // CDevice* pDevice = (CDevice*)pCookie->GetResultItem(); RemoveDevice(pDevice); } break; case TV_NOTIFY_CODE_RCLICK: case TV_NOTIFY_CODE_CLICK: if (pCookie && pCookie->m_lParam) { m_pIDMTVOCX->SelectItem(TVGN_CARET, (HTREEITEM)pCookie->m_lParam); } case TV_NOTIFY_CODE_GETDISPINFO: default: ASSERT(S_FALSE == hr); break; } return hr; } // // This function updates console verbs based on the selected cookie type. // HRESULT CResultView::UpdateConsoleVerbs( CCookie* pCookie ) { BOOL bPropertiesEnabled = FALSE; BOOL bPrintEnabled = FALSE; if (!m_pFolder->m_bSelect) { switch (pCookie->GetType()) { case COOKIE_TYPE_RESULTITEM_RESOURCE_IRQ: case COOKIE_TYPE_RESULTITEM_RESOURCE_DMA: case COOKIE_TYPE_RESULTITEM_RESOURCE_IO: case COOKIE_TYPE_RESULTITEM_RESOURCE_MEMORY: case COOKIE_TYPE_RESULTITEM_CLASS: case COOKIE_TYPE_RESULTITEM_DEVICE: bPropertiesEnabled = TRUE; bPrintEnabled = TRUE; break; case COOKIE_TYPE_RESULTITEM_COMPUTER: bPrintEnabled = TRUE; break; default: break; } } // // Only show the Print button/Action menu item when a something is selected. // if (bPrintEnabled) { m_pFolder->m_pComponent->m_pConsoleVerb->SetVerbState(MMC_VERB_PRINT, HIDDEN, FALSE); m_pFolder->m_pComponent->m_pConsoleVerb->SetVerbState(MMC_VERB_PRINT, ENABLED, TRUE); } else { m_pFolder->m_pComponent->m_pConsoleVerb->SetVerbState(MMC_VERB_PRINT, HIDDEN, TRUE); } // // Only show the properties button/Action menu item when a device/class is selected. // if (bPropertiesEnabled) { m_pFolder->m_pComponent->m_pConsoleVerb->SetVerbState(MMC_VERB_PROPERTIES, HIDDEN, FALSE); m_pFolder->m_pComponent->m_pConsoleVerb->SetVerbState(MMC_VERB_PROPERTIES, ENABLED, TRUE); m_pFolder->m_pComponent->m_pConsoleVerb->SetDefaultVerb(MMC_VERB_PROPERTIES); } else { m_pFolder->m_pComponent->m_pConsoleVerb->SetVerbState(MMC_VERB_PROPERTIES, HIDDEN, TRUE); m_pFolder->m_pComponent->m_pConsoleVerb->SetDefaultVerb(MMC_VERB_NONE); } return S_OK; } HRESULT CResultView::OnOcxNotify( MMC_NOTIFY_TYPE event, LPARAM arg, LPARAM param ) { HRESULT hr = S_OK; TV_ITEM TI; UNREFERENCED_PARAMETER(arg); switch (event) { case MMCN_BTN_CLICK: if ((MMC_CONSOLE_VERB)param == MMC_VERB_PROPERTIES) { ASSERT(m_pIDMTVOCX); TI.hItem = m_pIDMTVOCX->GetSelectedItem(); if (TI.hItem) { TI.mask = TVIF_PARAM; hr = m_pIDMTVOCX->GetItem(&TI); if (SUCCEEDED(hr)) { hr = DoProperties(m_hwndTV, (CCookie*)TI.lParam); } } } break; case MMCN_PRINT: hr = DoPrint(); break; case MMCN_SELECT: ASSERT(m_pIDMTVOCX); TI.hItem = m_pIDMTVOCX->GetSelectedItem(); if (TI.hItem) { TI.mask = TVIF_PARAM; hr = m_pIDMTVOCX->GetItem(&TI); if (SUCCEEDED(hr)) { hr = UpdateConsoleVerbs((CCookie*)TI.lParam); } } break; default: break; } return hr; } // This function creates the propperty sheet for the given cookie. // INPUT: // hwndTV -- the window handle to the TV OCX, used as the parent // window of the property sheet. // pCookie -- the cookie. // OUTPUT: // HRESULT S_OK if the function succeeded. // S_FALSE if no property sheet will be created. // S_XXXX other error. HRESULT CResultView::DoProperties( HWND hwndTV, CCookie* pCookie ) { HRESULT hr; // // If a property sheet is aleady up for the node, bring the // property sheet to the foreground. // HWND hWnd = NULL; if (COOKIE_TYPE_RESULTITEM_DEVICE == pCookie->GetType()) { CDevice* pDevice = (CDevice*)pCookie->GetResultItem(); ASSERT(pDevice); hWnd = pDevice->m_pMachine->GetDeviceWindowHandle(pDevice->GetDeviceID()); } else if (COOKIE_TYPE_RESULTITEM_RESOURCE_IRQ == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_DMA == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_IO == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_MEMORY == pCookie->GetType()) { // // This is a resource item, get the pointer for the device // object from the resource object. // CResource* pResource = (CResource*) pCookie->GetResultItem(); ASSERT(pResource); CDevice* pDevice = pResource->GetDevice(); ASSERT(pDevice); hWnd = pDevice->m_pMachine->GetDeviceWindowHandle(pDevice->GetDeviceID()); } else if (COOKIE_TYPE_RESULTITEM_CLASS == pCookie->GetType()) { CClass* pClass = (CClass*)pCookie->GetResultItem(); ASSERT(pClass); hWnd = pClass->m_pMachine->GetClassWindowHandle(*pClass); } if (hWnd) { // // Notify the property sheet that it should go to foreground // Do not call SetForegroundWindow here because the subclassed // treeview control will grab the focus right after // we have brought the property sheet to foreground. // ::PostMessage(hWnd, PSM_QUERYSIBLINGS, QSC_TO_FOREGROUND, 0L); return S_OK; } // // No property sheet is up for this cookie, create a brand new property // sheet for it. // SafeInterfacePtr<IComponent> pComponent; SafeInterfacePtr<IPropertySheetProvider> pSheetProvider; SafeInterfacePtr<IDataObject> pDataObject; SafeInterfacePtr<IExtendPropertySheet> pExtendSheet; pComponent.Attach((IComponent*) m_pFolder->m_pComponent); if (FAILED(pComponent->QueryInterface(IID_IExtendPropertySheet, (void**) &pExtendSheet)) || FAILED(pComponent->QueryDataObject((MMC_COOKIE)pCookie, CCT_RESULT, &pDataObject)) || FAILED(m_pFolder->m_pComponent->m_pConsole->QueryInterface(IID_IPropertySheetProvider, (void**) &pSheetProvider)) || S_OK == pSheetProvider->FindPropertySheet((MMC_COOKIE)pCookie, pComponent, pDataObject) || S_OK != pExtendSheet->QueryPagesFor(pDataObject)) { return S_FALSE; } hr = pSheetProvider->CreatePropertySheet( pCookie->GetResultItem()->GetDisplayName(), TRUE, // not wizard (MMC_COOKIE)pCookie, pDataObject, MMC_PSO_NOAPPLYNOW // do not want the apply button ); if (SUCCEEDED(hr)) { HWND hNotifyWindow; if (!SUCCEEDED(m_pFolder->m_pComponent->m_pConsole->GetMainWindow(&hNotifyWindow))) hNotifyWindow = NULL; hNotifyWindow = FindWindowEx(hNotifyWindow, NULL, TEXT("MDIClient"), NULL); hNotifyWindow = FindWindowEx(hNotifyWindow, NULL, TEXT("MMCChildFrm"), NULL); hNotifyWindow = FindWindowEx(hNotifyWindow, NULL, TEXT("MMCView"), NULL); hr = pSheetProvider->AddPrimaryPages(pComponent, TRUE, hNotifyWindow, FALSE); if (SUCCEEDED(hr)) { pSheetProvider->AddExtensionPages(); hr = pSheetProvider->Show((LONG_PTR)hwndTV, 0); } else { // // Failed to add primary Component's property page, destroy // the property sheet // pSheetProvider->Show(-1, 0); } } return hr; } // This function creates a context menu for the given cookie // INPUT: // hwndTV -- the TV OCX window, as the window the context menu to be // attached to. // pCookie -- the cookie // pPoint -- the location where the context menu should anchor in // screen coordinate. HRESULT CResultView::DoContextMenu( HWND hwndTV, CCookie* pCookie, POINT* pPoint ) { HRESULT hr = S_FALSE; CMachine *pMachine = NULL; // // ISSUE: JasonC 8/14/99 // // If we have a valid cookie then we need to get the CMachine for the given // cookie if there is one. Then we need to disable refreshing while the // context menu is being displayed. The reason for this is that if we // refresh while the menu is displayed but before the user chooses an option // then the cookie is no longer valid. The real problem here is that we rebuild // all of the classes on a refresh which makes any cookie floating around invalid. // I am sure that there is more of these bugs lurking around in the code and this // needs to be addressed by a better overall change after NT 5.0. // if (pCookie) { CDevice *pDevice; CResource *pResource; CClass *pClass; switch (pCookie->GetType()) { case COOKIE_TYPE_RESULTITEM_DEVICE: pDevice = (CDevice*)pCookie->GetResultItem(); if (pDevice) { pMachine = pDevice->m_pMachine; } break; case COOKIE_TYPE_RESULTITEM_RESOURCE_IRQ: case COOKIE_TYPE_RESULTITEM_RESOURCE_DMA: case COOKIE_TYPE_RESULTITEM_RESOURCE_IO: case COOKIE_TYPE_RESULTITEM_RESOURCE_MEMORY: pResource = (CResource*)pCookie->GetResultItem(); if (pResource) { pDevice = pResource->GetDevice(); if (pDevice) { pMachine = pDevice->m_pMachine; } } break; case COOKIE_TYPE_RESULTITEM_CLASS: pClass = (CClass*)pCookie->GetResultItem(); if (pClass) { pMachine = pClass->m_pMachine; } break; default: pMachine = NULL; } } // // Disable Refreshing while the context menu is up. // if (pMachine) { pMachine->EnableRefresh(FALSE); } SafeInterfacePtr<IDataObject> pDataObject; SafeInterfacePtr<IContextMenuProvider> pMenuProvider; SafeInterfacePtr<IComponent> pComponent; pComponent.Attach((IComponent*)m_pFolder->m_pComponent); m_hwndTV = hwndTV; if (FAILED(pComponent->QueryDataObject((MMC_COOKIE)pCookie, CCT_RESULT, &pDataObject)) || FAILED(m_pFolder->m_pComponent->m_pConsole->QueryInterface(IID_IContextMenuProvider, (void**)&pMenuProvider))) { hr = S_FALSE; goto clean0; } pMenuProvider->EmptyMenuList(); CONTEXTMENUITEM MenuItem; MenuItem.strName = NULL; MenuItem.strStatusBarText = NULL; MenuItem.lCommandID = CCM_INSERTIONPOINTID_PRIMARY_TOP; MenuItem.lInsertionPointID = 0; MenuItem.fFlags = 0; MenuItem.fSpecialFlags = CCM_SPECIAL_INSERTION_POINT; if (SUCCEEDED(pMenuProvider->AddItem(&MenuItem)) && SUCCEEDED(pMenuProvider->AddPrimaryExtensionItems(pComponent, pDataObject)) && SUCCEEDED(pMenuProvider->AddThirdPartyExtensionItems(pDataObject))) { long Selected; pMenuProvider->ShowContextMenu(hwndTV, pPoint->x, pPoint->y, &Selected); hr = S_OK; goto clean0; } clean0: // // Enable Refreshing again now that the context menu is gone // if (pMachine) { pMachine->EnableRefresh(TRUE); } return hr; } HRESULT CResultView::DoPrint() { DWORD ReportTypeEnableMask; ReportTypeEnableMask = REPORT_TYPE_MASK_ALL; HTREEITEM hSelectedItem; CCookie* pCookie = NULL; m_pMachine->EnableRefresh(FALSE); if (m_pIDMTVOCX) { hSelectedItem = m_pIDMTVOCX->GetSelectedItem(); if (hSelectedItem) { TV_ITEM TI; TI.hItem = hSelectedItem; TI.mask = TVIF_PARAM; if (SUCCEEDED(m_pIDMTVOCX->GetItem(&TI))) { pCookie = (CCookie*)TI.lParam; } } } if (!pCookie || (COOKIE_TYPE_RESULTITEM_RESOURCE_IRQ != pCookie->GetType() && COOKIE_TYPE_RESULTITEM_RESOURCE_DMA != pCookie->GetType() && COOKIE_TYPE_RESULTITEM_RESOURCE_IO != pCookie->GetType() && COOKIE_TYPE_RESULTITEM_RESOURCE_MEMORY != pCookie->GetType() && COOKIE_TYPE_RESULTITEM_DEVICE != pCookie->GetType() && COOKIE_TYPE_RESULTITEM_CLASS != pCookie->GetType())) { ReportTypeEnableMask &= ~(REPORT_TYPE_MASK_CLASSDEVICE); } if (!g_PrintDlg.PrintDlg(m_pMachine->OwnerWindow(), ReportTypeEnableMask)) { m_pMachine->EnableRefresh(TRUE); return S_OK; } if (!g_PrintDlg.HDC()) { m_pMachine->EnableRefresh(TRUE); return E_OUTOFMEMORY; } // // Create the printer // CPrinter ThePrinter(m_pMachine->OwnerWindow(), g_PrintDlg.HDC()); TCHAR DocTitle[MAX_PATH]; LoadString(g_hInstance, IDS_PRINT_DOC_TITLE, DocTitle, ARRAYLEN(DocTitle)); int PrintStatus = 0; switch (g_PrintDlg.ReportType()) { case REPORT_TYPE_SUMMARY: PrintStatus = ThePrinter.StartDoc(DocTitle); if (PrintStatus) { ThePrinter.SetPageTitle(IDS_PRINT_SUMMARY_PAGE_TITLE); PrintStatus = ThePrinter.PrintResourceSummary(*m_pMachine); } break; case REPORT_TYPE_CLASSDEVICE: ASSERT(pCookie); PrintStatus = ThePrinter.StartDoc(DocTitle); if (PrintStatus) { ThePrinter.SetPageTitle(IDS_PRINT_CLASSDEVICE_PAGE_TITLE); if (COOKIE_TYPE_RESULTITEM_CLASS == pCookie->GetType()) { PrintStatus = ThePrinter.PrintClass((CClass*)pCookie->GetResultItem()); } else { CDevice* pDevice; if (COOKIE_TYPE_RESULTITEM_DEVICE == pCookie->GetType()) { pDevice = (CDevice*) pCookie->GetResultItem(); } else { // // This is a resource item, get the pointer for the // device object from the resource object. // CResource* pResource = (CResource*) pCookie->GetResultItem(); ASSERT(pResource); pDevice = pResource->GetDevice(); } ASSERT(pDevice); PrintStatus = ThePrinter.PrintDevice(pDevice); } } break; case REPORT_TYPE_SUMMARY_CLASSDEVICE: PrintStatus = ThePrinter.StartDoc(DocTitle); if (PrintStatus) { ThePrinter.SetPageTitle(IDS_PRINT_SUMMARY_CLASSDEVICE_PAGE_TITLE); PrintStatus = ThePrinter.PrintAll(*m_pMachine); } break; default: ASSERT(FALSE); break; } // // Flush the last page // ThePrinter.FlushPage(); if (PrintStatus) { ThePrinter.EndDoc(); } else { ThePrinter.AbortDoc(); } m_pMachine->EnableRefresh(TRUE); return S_OK; } HRESULT CResultView::RemoveDevice( CDevice* pDevice ) { // // Must be an admin and on the local machine to remove a device. // if (!m_pMachine->IsLocal() || !g_IsAdmin) { return S_FALSE; } // // Make sure the device can be uninstalled // if (!pDevice->IsUninstallable()) { return S_FALSE; } // // Make sure there is no property sheet up for this device. // If it does exist, show a message box for the user and bring up // the property sheet to the foreground if the user // agree to do so. // HWND hwndPropSheet; hwndPropSheet = pDevice->m_psd.GetWindowHandle(); int MsgBoxResult; TCHAR szText[MAX_PATH]; if (hwndPropSheet) { LoadResourceString(IDS_PROPSHEET_WARNING, szText, ARRAYLEN(szText)); MsgBoxResult = m_pFolder->m_pComponent->MessageBox(szText, pDevice->GetDisplayName(), MB_ICONEXCLAMATION | MB_OKCANCEL); if (IDOK == MsgBoxResult) { SetForegroundWindow(hwndPropSheet); } // // Can not wait for the property sheet because it is running // in a separate thread. // return S_OK; } BOOL Refresh = (pDevice->IsPhantom() || pDevice->HasProblem() || !pDevice->IsStarted()); CRemoveDevDlg TheDlg(pDevice); // // Before removing device, disable refresh. This effectively disables // device change notification processing. While we are in the middle // of removing device, it is not a good idea to process any // device change notification. When the removal is done, // we will re-enable the refresh. // m_pMachine->EnableRefresh(FALSE); if (IDOK == TheDlg.DoModal(m_hwndTV, (LPARAM) &TheDlg)) { DWORD DiFlags; DiFlags = m_pMachine->DiGetFlags(*pDevice); // // We don't check to see if we are running locally at this // point because we won't let the user remove the device in // the first place if we are not running locally. // if (PromptForRestart(NULL, DiFlags, IDS_REMOVEDEV_RESTART) == IDNO) { Refresh = TRUE; } // // Enable refresh since we disabled it in the beginning. // // We only need to force a refresh here if the device that // was removed was a Phantom device or a device that is not // started. This is because Phantom devices don't have kernel // devnodes and so they won't generate a WM_DEVICECHANGE like // live started devnodes will. // if (Refresh) { m_pMachine->ScheduleRefresh(); } m_pMachine->EnableRefresh(TRUE); } else { m_pMachine->EnableRefresh(TRUE); } return S_OK; } ///////////////////////////////////////////////////////////////////// //// CViewDeviceTree implementations //// HRESULT CViewDeviceTree::OnShow( BOOL fShow ) { if (!fShow) { return S_OK; } if (!m_pCookieComputer) { CreateDeviceTree(); } return CResultView::OnShow(fShow); } // This function creates a the root device for the device tree. // INPUT: // NONE. // OUTPUT: // TRUE if the device is created(Rooted at m_pCookieComputer). // FALSE if the device is not created. BOOL CViewDeviceTree::CreateDeviceTree() { ASSERT(NULL == m_pCookieComputer); m_pMachine = m_pFolder->m_pMachine; // // We shouldn't be here if there is not a machine created. // ASSERT(m_pMachine); CComputer* pComputer = m_pMachine->m_pComputer; // // Make sure there is at least a computer // if (pComputer) { m_pCookieComputer = new CCookie(COOKIE_TYPE_RESULTITEM_COMPUTER); if (m_pCookieComputer) { m_pCookieComputer->SetResultItem(pComputer); m_pCookieComputer->SetScopeItem(m_pFolder->m_pScopeItem); // // Make sure that the computer is expanded and selected. // m_pCookieComputer->TurnOnFlags(COOKIE_FLAGS_EXPANDED); // // If there was no selection, choose the computer // if (!m_pSelectedItem || (*m_pSelectedItem == *m_pCookieComputer)) { m_pSelectedCookie = m_pCookieComputer; } return TRUE; } } return FALSE; } ///////////////////////////////////////////////////////////////////// //// CViewTreeByType implementations //// // This function creates a "view-by-type: device tree rooted at // m_pCookieComputer. // // INPUT: // NONE. // OUTPUT: // TRUE if the tree is created successfully. // FALSE if tree is not created. BOOL CViewTreeByType::CreateDeviceTree() { if (!CViewDeviceTree::CreateDeviceTree()) { return FALSE; } ASSERT(m_pCookieComputer); CClass* pClass; CDevice* pDevice; CCookie* pCookieClass; CCookie* pCookieClassParent; CCookie* pCookieClassSibling; CCookie* pCookieDevice; CCookie* pCookieDeviceParent; CCookie* pCookieDeviceSibling; // // Do not have sibling at this moment; // pCookieClassSibling = NULL; // // All classes are children of computer // pCookieClassParent = m_pCookieComputer; pCookieDeviceParent; pCookieDeviceSibling; String strStartupDeviceId; strStartupDeviceId = GetStartupDeviceId(); PVOID ContextClass, ContextDevice; if (m_pMachine->GetFirstClass(&pClass, ContextClass)) { do { // // We do not display a class if it does not have any // devices in it. // if (pClass->GetNumberOfDevices(TRUE)) { pCookieClass = new CCookie(COOKIE_TYPE_RESULTITEM_CLASS); pCookieClass->SetResultItem(pClass); pCookieClass->SetScopeItem(m_pFolder->m_pScopeItem); // // If the class was expanded before, mark it // so that DisplayTree will expand it // RestoreSavedTreeState(pCookieClass); // // No sibling: this is the first child // if (pCookieClassParent && !pCookieClassSibling) { pCookieClassParent->SetChild(pCookieClass); } pCookieClass->SetParent(pCookieClassParent); if (pCookieClassSibling) { pCookieClassSibling->SetSibling(pCookieClass); } pCookieClassSibling = pCookieClass; // // Classes are parent of devices // pCookieDeviceParent = pCookieClass; pCookieDeviceSibling = NULL; if (pClass->GetFirstDevice(&pDevice, ContextDevice)) { do { pCookieDevice = new CCookie(COOKIE_TYPE_RESULTITEM_DEVICE); pCookieDevice->SetResultItem(pDevice); pCookieDevice->SetScopeItem(m_pFolder->m_pScopeItem); if (!strStartupDeviceId.IsEmpty() && !strStartupDeviceId.CompareNoCase(pDevice->GetDeviceID())) { m_pSelectedCookie = pCookieDevice; } else { if (m_pSelectedItem && (*m_pSelectedItem == *pCookieDevice)) { m_pSelectedCookie = pCookieDevice; } } // // No sibling: this is the first child // if (pCookieDeviceParent && !pCookieDeviceSibling) { pCookieDeviceParent->SetChild(pCookieDevice); } pCookieDevice->SetParent(pCookieDeviceParent); if (pCookieDeviceSibling) { pCookieDeviceSibling->SetSibling(pCookieDevice); } pCookieDeviceSibling = pCookieDevice; } while (pClass->GetNextDevice(&pDevice, ContextDevice)); } } } while (m_pMachine->GetNextClass(&pClass, ContextClass)); } DestroySavedTreeStates(); return TRUE; } ///////////////////////////////////////////////////////////////////// //// CViewTreeByConnection implementations //// BOOL CViewTreeByConnection::CreateDeviceTree() { if (!CViewDeviceTree::CreateDeviceTree()) { return FALSE; } ASSERT(m_pCookieComputer); CComputer* pComputer = (CComputer*)m_pCookieComputer->GetResultItem(); CDevice* pDeviceStart = pComputer->GetChild(); ASSERT(pDeviceStart); // // Collect all the normal devices. // CreateSubtree(m_pCookieComputer, NULL, pDeviceStart); // // Add phantom devices to m_pCookieComputer subtree. // PVOID Context; if (m_pMachine->GetFirstDevice(&pDeviceStart, Context)) { // // Locate the end of the CookieComputer Sibling list to add the // phantom devices to. // CCookie* pCookieSibling = NULL; CCookie* pNext = m_pCookieComputer->GetChild(); while (pNext != NULL) { pCookieSibling = pNext; pNext = pCookieSibling->GetSibling(); } do { if (pDeviceStart->IsPhantom()) { CCookie* pCookie; pCookie = new CCookie(COOKIE_TYPE_RESULTITEM_DEVICE); pCookie->SetResultItem(pDeviceStart); pCookie->SetScopeItem(m_pFolder->m_pScopeItem); if (pCookieSibling) { pCookieSibling->SetSibling(pCookie); } else { m_pCookieComputer->SetChild(pCookie); } pCookie->SetParent(m_pCookieComputer); pCookieSibling = pCookie; // // See if we have to expand the node // RestoreSavedTreeState(pCookie); } } while (m_pMachine->GetNextDevice(&pDeviceStart, Context)); } DestroySavedTreeStates(); return TRUE; } // //This function creates a cookie subtree by walking down the //a device subtree led by the given pDeviceStart //INPUT: // pCookieParent -- the parent of the newly created subtree // pCookieSibling -- the sibling of the newly create subtree // pDeviceStart -- the device to start with // //OUTPUT: // TRUE if the subtree is created and inserted successfully. // // This function may throw CMemoryException // BOOL CViewTreeByConnection::CreateSubtree( CCookie* pCookieParent, CCookie* pCookieSibling, CDevice* pDeviceStart ) { CCookie* pCookie; CDevice* pDeviceChild; String strStartupDeviceId; CClass* pClass; strStartupDeviceId = GetStartupDeviceId(); while (pDeviceStart) { pClass = pDeviceStart->GetClass(); pCookie = new CCookie(COOKIE_TYPE_RESULTITEM_DEVICE); if (pCookie) { pCookie->SetResultItem(pDeviceStart); pCookie->SetScopeItem(m_pFolder->m_pScopeItem); if (!strStartupDeviceId.IsEmpty() && !strStartupDeviceId.CompareNoCase(pDeviceStart->GetDeviceID())) { m_pSelectedCookie = pCookie; } // // No sibling: this is the first child // if (pCookieParent && !pCookieSibling) { pCookieParent->SetChild(pCookie); } pCookie->SetParent(pCookieParent); if (pCookieSibling) { pCookieSibling->SetSibling(pCookie); } // // See if we have to expand the node // RestoreSavedTreeState(pCookie); pDeviceChild = pDeviceStart->GetChild(); if (pDeviceChild) { CreateSubtree(pCookie, NULL, pDeviceChild); } pCookieSibling = pCookie; } pDeviceStart = pDeviceStart->GetSibling(); } return TRUE; } ///////////////////////////////////////////////////////////////////// //// CViewResourceTree implementations //// CViewResourceTree::~CViewResourceTree() { int i; // // Destroy all the CResource objects // for (i = 0; i < TOTAL_RESOURCE_TYPES; i++) { if (m_pResourceList[i]) { delete m_pResourceList[i]; m_pResourceList[i] = NULL; } if (m_pResourceType[i]) { delete m_pResourceType[i]; m_pResourceType[i] = NULL; } } } // // This functions handle MMC standard MMCN_SHOW command // // This function may throw CMemoryException // HRESULT CViewResourceTree::OnShow( BOOL fShow ) { if (!fShow) { return S_OK; } if (!m_pCookieComputer) { CreateResourceTree(); } return CResultView::OnShow(fShow); } // // This function creates resource lists and cookie trees. // The resources are recorded in the member m_pResourceList[] // and the cookie tree is rooted at m_pCookieComputer[]; // // This function may throw CMemoryException // void CViewResourceTree::CreateResourceTree() { int i; CCookie* pCookieTypeSibling = NULL; ASSERT(!m_pCookieComputer); m_pMachine = m_pFolder->m_pMachine; ASSERT(m_pMachine); // // Make sure there is at least a computer. // if (!m_pMachine->m_pComputer) { return; } m_pCookieComputer = new CCookie(COOKIE_TYPE_RESULTITEM_COMPUTER); if (!m_pCookieComputer) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); return; } m_pCookieComputer->SetResultItem(m_pMachine->m_pComputer); m_pCookieComputer->SetScopeItem(m_pFolder->m_pScopeItem); m_pCookieComputer->TurnOnFlags(COOKIE_FLAGS_EXPANDED); // // If no selected item recorded, default to the computer node // if (!m_pSelectedItem || (*m_pSelectedItem == *m_pCookieComputer)) { m_pSelectedCookie = m_pCookieComputer; } // // Check each resource type (mem, io, dma, irq) and create a result item // if resources exist for the resource type. // for (i = 0; i < TOTAL_RESOURCE_TYPES; i++) { RESOURCEID ResType = ResourceTypes[i]; // // If there is an existing m_pResourceList then delete it. // if (m_pResourceList[i]) { delete m_pResourceList[i]; } m_pResourceList[i] = new CResourceList(m_pMachine, ResType); PVOID Context; CResource* pRes; if (m_pResourceList[i] && m_pResourceList[i]->GetFirst(&pRes, Context)) { // // Resource items exist, create the resource type result item. // CCookie* pCookieFirst = NULL; // // If there is an existing m_pResourceType then delete it. // if (m_pResourceType[i]) { delete m_pResourceType[i]; } m_pResourceType[i] = new CResourceType(m_pMachine, ResType); CCookie* pCookieType = new CCookie(COOKIE_TYPE_RESULTITEM_RESTYPE); if (pCookieType) { pCookieType->SetResultItem(m_pResourceType[i]); pCookieType->SetScopeItem(m_pFolder->m_pScopeItem); pCookieType->SetParent(m_pCookieComputer); if (pCookieTypeSibling) { pCookieTypeSibling->SetSibling(pCookieType); } else { m_pCookieComputer->SetChild(pCookieType); } pCookieTypeSibling = pCookieType; RestoreSavedTreeState(pCookieType); // // Create the resource result item for each resource. // while (pRes) { CCookie* pCookie = new CCookie(CookieType(ResType)); pCookie->SetResultItem(pRes); pCookie->SetScopeItem(m_pFolder->m_pScopeItem); if (pCookieFirst) { InsertCookieToTree(pCookie, pCookieFirst, TRUE); } else { pCookieFirst = pCookie; pCookieType->SetChild(pCookie); pCookie->SetParent(pCookieType); } RestoreSavedTreeState(pCookie); // // Get the next resource item. // m_pResourceList[i]->GetNext(&pRes, Context); } } } } // // The saved tree states have been merged into the newly // create cookie tree. destroy the states // DestroySavedTreeStates(); } // // This function insert the given cookie into a existing cookie subtree // rooted at pCookieRoot. If the resource is I/O or MEMORY then the cookie is // inserted as a child of any resource it is enclosed by. // //INPUT: // pCookie -- the cookie to be inserted. // pCookieRoot -- the subtree root cookie // ForcedInsert -- TRUE to insert the cookie as the sibling of // of pCookieRoot. //OUTPUT: // None BOOL CViewResourceTree::InsertCookieToTree( CCookie* pCookie, CCookie* pCookieRoot, BOOL ForcedInsert ) { CResource* pResRef; CResource* pResThis = (CResource*)pCookie->GetResultItem(); CCookie* pCookieLast = NULL; while (pCookieRoot) { // // Only check for enclosed resources for I/O and MEMORY. // if (COOKIE_TYPE_RESULTITEM_RESOURCE_IO == pCookie->GetType() || COOKIE_TYPE_RESULTITEM_RESOURCE_MEMORY == pCookie->GetType()) { pResRef = (CResource*)pCookieRoot->GetResultItem(); if (pResThis->EnclosedBy(*pResRef)) { // // This cookie is either the pCookieRoot child or grand child // figure out which one it is // if (!pCookieRoot->GetChild()) { pCookieRoot->SetChild(pCookie); pCookie->SetParent(pCookieRoot); } else if (!InsertCookieToTree(pCookie, pCookieRoot->GetChild(), FALSE)) { // // The cookie is not a grand child of pCookieRoot. // search for the last child of pCookieRoot // CCookie* pCookieSibling; pCookieSibling = pCookieRoot->GetChild(); while (pCookieSibling->GetSibling()) { pCookieSibling = pCookieSibling->GetSibling(); } pCookieSibling->SetSibling(pCookie); pCookie->SetParent(pCookieRoot); } return TRUE; } } pCookieLast = pCookieRoot; pCookieRoot = pCookieRoot->GetSibling(); } if (ForcedInsert) { if (pCookieLast) { // // When we reach here, pCookieLast is the last child // pCookieLast->SetSibling(pCookie); pCookie->SetParent(pCookieLast->GetParent()); } return TRUE; } return FALSE; } ///////////////////////////////////////////////////////////////////// //// CBusPropPageProvider implementations //// // // This function loads the bus property sheet pages provider // to enumerate pages for the device // INPUT: // pDevice -- object represents the device // ppsd -- object represents where property pages should be added // OUTPUT: // TRUE if succeeded. // FLASE if no pages are added. BOOL CBusPropPageProvider::EnumPages( CDevice* pDevice, CPropSheetData* ppsd ) { ASSERT(!m_hDll); // // Enum bus property pages if there are any // if the a bus guid can not be found on the device, no bus property pages // String strBusGuid; if (pDevice->m_pMachine->CmGetBusGuidString(pDevice->GetDevNode(), strBusGuid)) { CSafeRegistry regDevMgr; CSafeRegistry regBusTypes; CSafeRegistry regBus; if (regDevMgr.Open(HKEY_LOCAL_MACHINE, REG_PATH_DEVICE_MANAGER) && regBusTypes.Open(regDevMgr, REG_STR_BUS_TYPES) && regBus.Open(regBusTypes, strBusGuid)) { String strEnumPropPage; if (regBus.GetValue(REGSTR_VAL_ENUMPROPPAGES_32, strEnumPropPage)) { PROPSHEET_PROVIDER_PROC PropPageProvider; if (LoadEnumPropPage32(strEnumPropPage, &m_hDll, (FARPROC*)&PropPageProvider)) { SP_PROPSHEETPAGE_REQUEST PropPageRequest; PropPageRequest.cbSize = sizeof(PropPageRequest); PropPageRequest.DeviceInfoSet = (HDEVINFO)*(pDevice->m_pMachine); PropPageRequest.DeviceInfoData = *pDevice; PropPageRequest.PageRequested = SPPSR_ENUM_ADV_DEVICE_PROPERTIES; if (PropPageProvider(&PropPageRequest, (LPFNADDPROPSHEETPAGE)AddPropPageCallback, (LPARAM)ppsd )) return TRUE; } } } } return FALSE; }
cpp
/** * Copyright 2013-2019 the original author or authors from the Jeddict project (https://jeddict.github.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.github.jeddict.orm.generator.service; import io.github.jeddict.jpa.spec.EntityMappings; import io.github.jeddict.jpa.spec.MappedSuperclass; import io.github.jeddict.jpa.spec.extend.IPrimaryKeyAttributes; import io.github.jeddict.orm.generator.compiler.def.MappedSuperClassDefSnippet; import static java.util.Objects.nonNull; import static io.github.jeddict.util.StringUtils.isNotBlank; public class MappedSuperClassGenerator extends IdentifiableClassGenerator<MappedSuperClassDefSnippet> { private final MappedSuperclass mappedSuperclass; public MappedSuperClassGenerator(MappedSuperclass parsedMappedSuperclass, String packageName) { super(new MappedSuperClassDefSnippet()); this.mappedSuperclass = parsedMappedSuperclass; this.rootPackageName = packageName; this.packageName = mappedSuperclass.getAbsolutePackage(rootPackageName); } @Override public MappedSuperClassDefSnippet getClassDef() { classDef.setNoSQL(mappedSuperclass.getNoSQL()); if (!classDef.isNoSQL()) { //Classlevel annotations processIdClass(mappedSuperclass.getIdClass()); processEntityListeners(mappedSuperclass.getEntityListeners()); processDefaultExcludeListeners( mappedSuperclass.getExcludeDefaultListeners()); processExcludeSuperclassListeners( mappedSuperclass.getExcludeSuperclassListeners()); //Queries processNamedQueries(mappedSuperclass.getNamedQuery()); processNamedNativeQueries(mappedSuperclass.getNamedNativeQuery()); //StoredProcedures processNamedStoredProcedureQueries((EntityMappings) mappedSuperclass.getRootElement(), mappedSuperclass.getNamedStoredProcedureQuery()); } //Attributes -- Method level annotations IPrimaryKeyAttributes parsedAttributes = mappedSuperclass.getAttributes(); if (nonNull(parsedAttributes)) {//#ATTRIBUTE_SEQUENCE_FLOW# processEmbeddedId(mappedSuperclass, parsedAttributes.getEmbeddedId()); if (parsedAttributes.getEmbeddedId() == null) { parsedAttributes.getId().forEach(this::processId); } parsedAttributes.getBasic().forEach(this::processBasic); parsedAttributes.getElementCollection().forEach(this::processElementCollection); parsedAttributes.getEmbedded().forEach(this::processEmbedded); parsedAttributes.getOneToOne().forEach(this::processOneToOne); parsedAttributes.getManyToOne().forEach(this::processManyToOne); parsedAttributes.getOneToMany().forEach(this::processOneToMany); parsedAttributes.getManyToMany().forEach(this::processManyToMany); parsedAttributes.getVersion().forEach(this::processVersion); parsedAttributes.getTransient().forEach(this::processTransient); } //Class decorations classDef = initClassDef(packageName,mappedSuperclass); if (isNotBlank(mappedSuperclass.getDescription())) { classDef.setDescription(mappedSuperclass.getDescription()); } classDef.setAuthor(mappedSuperclass.getAuthor()); classDef.setXmlRootElement(mappedSuperclass.getXmlRootElement()); return classDef; } }
java
Three years ago Bangalore-based travel information and review portal HolidayIQ announced a merger with Singapore-based OTA (online travel agent) Wego. The merger came unstuck last week and HolidayIQ went on to scoop another round of venture capital funding from existing investors Accel Partners and Tiger Global. Techcircle.in caught up with HolidayIQ founder and CEO Hari Nair to talk about the merger and demerger, what is the firm going to do with the new round of funding and more. Excerpts: Why did you merge with Wego in 2010 and what prompted the demerger? Is it linked to Wego launching its own India site? Well, there were two reasons for the merger. As we know, travel industry needs fair amount of capital to operate. When we merged with Wego, both the firms were relatively smaller and we felt it was necessary to stay together to get substantial size. We found some areas where we could work together to grow further. We were significant in terms of reach and audience in India, whereas Wego had a software solution that enabled it to compare prices of various travel destinations in the markets. We decided to tap the capabilities of each other. We had the advantage of Wego's technology while Wego utilised our vast Indian audience base. Hence the merger. Now, both companies have grown big and found their own spaces in the market. So we demerged. It was a strategic call, as both thefirms are capable of independently reaching the scale and gaining traction. However, we would continue the collaboration through contracts. Wego had already launched its Indian site about six months ago. Why would a holiday information site need the kind of money you have raised in the latest round? Where are you going to use the fund if you are not getting into your own transaction-based online OTA? We are going to use the funds in four key areas – marketing, product development, scaling of our recently launched 'hiq!PAD' programme and talent acquisition. We get around 4.5 million visits per month and we reached this scale with very little marketing initiatives, as major part of the site traffic came through direct marketing, word of mouth referrals, etc. Now, over the next 24 months, we will aggressively look to market our products to become a stronger player in the industry, leveraging mainly the online marketing platform. Two months ago, we launched an innovative transportation product that provides information regarding various mode of transportation to Indian travellers. India is a very large country so it is hard to find a suitable mode of transportation to certain remote tourist destinations. Our new product can suggest the mode of transportation. All these contents come from our users. We will also use a part of the fund to scale our hiq!PAD programme launched recently. This is aimed at encouraging and increasing Indian travellers to post hotel reviews on the device. We target 5000 hotels pan-India by April 2015. We are already running a pilot with 100 hotels in Goa. hiq!PAD is a tablet device provided to the hotels wherein the guests can post their reviews. The reviews will immediately reach us. The cost of installation of device per hotel is between Rs 15,000-Rs 20,000. We are also ramping up our employee base soon. What is your revenue model? How much revenue have you generated so far? We bring consumers who want to travel to various destinations across the globe to our site and convert them to the customers of our partners. Our revenues come mainly from online travel agencies, traditional travel agencies and hotels. When a user comes to our site and if he/she likes some hotel, then they can compare the prices of that hotel with multiple travel agencies, such as MakeMyTrip, Expedia etc. Travellers can do the price comparison through our portal and also book tickets. We have tied up with 50 travel agencies in India and globally. We can't disclose the revenue figures. However, we double our revenue every year and have doubled it in the last five months. Our position is very simple. We focus only on day-to-day travellers. We build all pieces of information regarding holiday destinations and hotels in India and abroad, and bring that to our users. We have significant amounts of definite requirement in India itself. Besides, our new transportation product is our differentiator. What are the other new features or additions that you are working on? We have more content on domestic tourist destinations. Now, for the next 12 months we will do international content. We also see Singapore and Indonesia sites of HolidayIQ. When were they launched and what's the traction from there? Is it also one of the reasons for breaking off from Wego? We wanted to understand what capabilities we can do outside India. There is a significant market in emerging countries, like Indonesia and Singapore, similar to India. We launched our Singapore and Indonesian sites a few months ago. The response is so good so far. However, we haven't done any marketing initiatives. What next for HolidayIQ? Any new revenue streams are you looking at? Where do we see the firm 2-3 years down the line? We have just launched a hotel advertising product. Typically, hotels spend a lot of money on advertising and still it doesn't reach the target audience. Now, we have come up with a solution for them to advertise with lesser cost. The ad will be delivered only to those who are going to a tourist destination where this particular hotel is situated. This way, they can reach their target audience with less advertising cost. We want to become the advisor of choice for every Indian traveller in the next couple of years. (Edited by Prem Udayabhanu)
english
import React, { useLayoutEffect, useRef, useState } from "react"; import { CircularProgress } from "@material-ui/core"; import { Check, LocalOffer, Settings, VisibilityOff } from "@material-ui/icons"; import useMeasure from "react-use-measure"; import { useRecoilState, useRecoilValue } from "recoil"; import styled from "styled-components"; import { canTag } from "./utils"; import Tagger from "./Tagger"; import Selector from "./Selected"; import Coloring from "./Options"; import { PillButton } from "../utils"; import * as atoms from "../../recoil/atoms"; import * as selectors from "../../recoil/selectors"; import { useOutsideClick, useTheme } from "../../utils/hooks"; const ActionDiv = styled.div` position: relative; `; const Tag = ({ modal }) => { const [open, setOpen] = useState(false); const selected = useRecoilValue( modal ? selectors.selectedLabelIds : atoms.selectedSamples ); const tagging = useRecoilValue(selectors.anyTagging); const theme = useTheme(); const ref = useRef(); useOutsideClick(ref, () => open && setOpen(false)); const [mRef, bounds] = useMeasure(); const close = useRecoilValue(selectors.selectedLoading); const disabled = tagging; useLayoutEffect(() => { close && setOpen(false); }, [close]); return ( <ActionDiv ref={ref}> <PillButton style={{ cursor: disabled ? "default" : "pointer" }} icon={ disabled ? ( <CircularProgress style={{ padding: 2, height: 22, width: 22, color: theme.font }} /> ) : ( <LocalOffer /> ) } open={open} onClick={() => !disabled && setOpen(!open)} highlight={Boolean(selected.size) || open} ref={mRef} /> {open && !close && ( <Tagger modal={modal} bounds={bounds} close={() => setOpen(false)} /> )} </ActionDiv> ); }; const Selected = ({ modal, frameNumberRef }) => { const [open, setOpen] = useState(false); const selectedSamples = useRecoilValue(atoms.selectedSamples); const selectedObjects = useRecoilValue(selectors.selectedLabels); const ref = useRef(); useOutsideClick(ref, () => open && setOpen(false)); const [mRef, bounds] = useMeasure(); const numItems = modal ? Object.keys(selectedObjects).length : selectedSamples.size; if (numItems < 1 && !modal) { return null; } return ( <ActionDiv ref={ref}> <PillButton icon={<Check />} open={open} onClick={() => setOpen(!open)} highlight={numItems > 0 || open} text={`${numItems}`} ref={mRef} /> {open && ( <Selector modal={modal} close={() => setOpen(false)} frameNumberRef={frameNumberRef} bounds={bounds} /> )} </ActionDiv> ); }; const Options = ({ modal }) => { const [open, setOpen] = useState(false); const ref = useRef(); useOutsideClick(ref, () => open && setOpen(false)); const [mRef, bounds] = useMeasure(); return ( <ActionDiv ref={ref}> <PillButton icon={<Settings />} open={open} onClick={() => setOpen(!open)} highlight={open} ref={mRef} /> {open && <Coloring modal={modal} bounds={bounds} />} </ActionDiv> ); }; const ShowJSON = () => { const [showJSON, setShowJSON] = useRecoilState(atoms.showModalJSON); return ( <PillButton open={false} onClick={() => setShowJSON(!showJSON)} highlight={showJSON} text={"JSON"} /> ); }; const Hidden = () => { const [hiddenObjects, setHiddenObjects] = useRecoilState(atoms.hiddenLabels); const count = Object.keys(hiddenObjects).length; if (count < 1) { return null; } return ( <PillButton icon={<VisibilityOff />} open={true} onClick={() => setHiddenObjects({})} highlight={true} text={`${count}`} /> ); }; const ActionsRowDiv = styled.div` display: flex; justify-content: ltr; margin-top: 2.5px; scrollbar-width: none; @-moz-document url-prefix() { padding-right: 16px; } ::-webkit-scrollbar { width: 0px; background: transparent; display: none; } ::-webkit-scrollbar-thumb { width: 0px; display: none; } & > div { margin-right: 0.5rem; } `; type ActionsRowProps = { modal: boolean; frameNumberRef?: any; children: any; }; const ActionsRow = ({ modal, frameNumberRef }: ActionsRowProps) => { const style = modal ? { overflowX: "auto", overflowY: "hidden", margin: "0 -1em", padding: "0 1em", } : {}; return ( <ActionsRowDiv style={style}> {modal && <ShowJSON />} <Options modal={modal} /> <Tag modal={modal} /> {modal && <Hidden />} <Selected modal={modal} frameNumberRef={frameNumberRef} /> </ActionsRowDiv> ); }; export default React.memo(ActionsRow);
typescript
The party may have violated the Representation of the People Act, CBDT chief Sushil Chandra told the poll panel head in a letter. The Central Board of Direct Taxes has pointed out to the Election Commission the alleged discrepancies in the Aam Aadmi Party’s actual and reported donations, The Indian Express reported on Tuesday. The tax body’s chief Sushil Chandra wrote in a letter to Chief Election Commissioner AK Joti on January 3, saying that this violates the Representation of the People Act of 1951. Chandra told Joti that that an assessment of the party’s finances for the 2014-’15 financial year showed that it had contravened the provisions of the act’s Section 29(C). The provision mandates all political parties to inform tax authorities of details of donations of more than Rs 20,000. Parties found violating this provision are barred from receiving any tax relief. In a notice to the AAP on November 27, 2017, the Income Tax Department had claimed that the party had not disclosed income worth Rs 13 crore and had also not recorded the details of 462 donors. These donors, Chandra said, gave Rs 6.26 crore. During its assessment, the tax authority is believed to have discovered that Rs 2 crore of hawala entries was reported as voluntary donations. The AAP is also accused of not reporting donations worth Rs 29.13 crore from donors contributing more than Rs 20,000 each in its report submitted to the Election Commission in 2015, The Indian Express reported.
english
Reaching Wayanad is easy as it is connected to all the major cities of the world and the cities within the country through various modes of transport. One can reach Wayanad through airways, railways and roadways. The Karipur international airport at Kozhikode is the only airport situated within the vicinity of Wayanad. It is located at a distance of 100 km from the city. The airport has access to many international and domestic flights. Tourists from Delhi, Mumbai and Chennai along with Oman, Qatar, Kuwait and Saudi can reach Wayanad easily. The Kozhikode Railway Station is the nearest railway station to Wayanad. It is located at a distance of 110 km from the city. There are frequent and good connectivity of train services to Trivandrum, Kochi, Chennai and Bangalore. The railway station has access to trains connecting the city with other major cities of the country. Wayanad has a good network of KSRTC buses to the nearby cities. There are super fast buses running between Wayanad and Bangalore, Trivandrum, Mangalore and Kochi. Private and public buses, taxis, cabs, motorcycles, autos and rickshaws are the various vehicles seen on the roads of Wayanad. One can move around the city using any of these modes of transport. Note: One can hire taxis or cabs to reach their desired destination from Airport/Railway Station.
english
package tech.mhuang.ext.kafka.springboot.configuration; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import tech.mhuang.core.check.CheckAssert; import tech.mhuang.ext.kafka.admin.KafkaFramework; import tech.mhuang.ext.kafka.admin.external.IKafkaExternal; import tech.mhuang.ext.spring.start.SpringContextHolder; import tech.mhuang.ext.springboot.context.SpringBootExtAutoConfiguration; /** * kafka配置类 * * @author mhuang * @since 1.0.0 */ @Configuration @ConditionalOnClass(KafkaFramework.class) @EnableConfigurationProperties(value = {KafkaProperties.class,KafkaThreadPool.class}) @ConditionalOnProperty(prefix = "mhuang.kafka", name = "enable", havingValue = "true", matchIfMissing = true) @AutoConfigureAfter({SpringBootExtAutoConfiguration.class}) @Slf4j public class KafkaAutoConfiguration { private final KafkaProperties kafkaProperties; private final KafkaThreadPool kafkaThreadPool; public KafkaAutoConfiguration(KafkaProperties kafkaProperties, KafkaThreadPool kafkaThreadPool) { this.kafkaProperties = kafkaProperties; this.kafkaThreadPool = kafkaThreadPool; } @Bean @ConditionalOnMissingBean public IKafkaExternal springKafkaExternal(){ return new SpringKafkaExternal(); } @Bean @ConditionalOnMissingBean public KafkaFramework kafkaFramework(IKafkaExternal kafkaExternal,SpringContextHolder springContextHolder) { CheckAssert.check(springContextHolder, "SpringContextHolder不存在、请设置mhuang.holder.enable=true"); CheckAssert.check(this.kafkaProperties, "KafkaProperties不存在、请设置mhuang.kafka.enable=true"); KafkaFramework framework = new KafkaFramework(this.kafkaProperties); kafkaThreadPool.initialize(); framework.executorService(this.kafkaThreadPool); framework.kafkaExternal(kafkaExternal); framework.start(); return framework; } }
java
<filename>blog/views.py<gh_stars>0 from django.views.generic import DetailView, ListView from blog.models import Post class CommonListView(ListView): """ListViewのテンプレート""" model = Post template_name = "post_list.html" paginate_by = 10 def get_context_data(self, **kw): # 下書き以外で最新の10件を表示 context = super().get_context_data(**kw) context['posts_all'] = Post.objects.order_by( '-created_at').exclude(category__name='Draft') return context class PostListView(CommonListView): def get_context_data(self, **kw): # 下書き以外で最新の10件を表示 context = super().get_context_data(**kw) context['posts'] = Post.objects.order_by( '-created_at').exclude(category__name='Draft') context['title'] = "TOP" return context class BlogListView(CommonListView): def get_context_data(self, **kw): context = super().get_context_data(**kw) context['posts'] = Post.objects.order_by( '-created_at').filter(category__name='Blog') context['title'] = "Blog" return context class NewsListView(CommonListView): def get_context_data(self, **kw): context = super().get_context_data(**kw) context['posts'] = Post.objects.order_by( '-created_at').filter(category__name='News') context['title'] = "News" return context class PostDetailView(DetailView): model = Post pk_url_kwarg = "post_id" template_name = "post_detail.html" # postはこちらで持っておく context_object_name = "post" def get_context_data(self, **kwargs): # 下書き以外で最新の10件を表示 context = super().get_context_data(**kwargs) context['posts_all'] = Post.objects.order_by( '-created_at').exclude(category__name='Draft') return context class AboutView(CommonListView): model = Post template_name = "about.html" def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['title'] = "About" return context
python
<filename>services/HistoryUI/HistoryUI.cpp<gh_stars>1-10 /* * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * 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. */ #include <Elementary.h> #include <boost/concept_check.hpp> #include <boost/format.hpp> #include <vector> #include <string> #include <string.h> #include <AbstractMainWindow.h> #include "app_i18n.h" #include "HistoryUI.h" #include "ServiceManager.h" #include "BrowserLogger.h" #include "Tools/EflTools.h" #include "Tools/GeneralTools.h" #include "HistoryDaysListManager/HistoryDaysListManagerMob.h" #include "services/HistoryService/HistoryItem.h" #include "HistoryDeleteManager.h" namespace tizen_browser{ namespace base_ui{ // TODO History needs solid refactoring. A lot of features are not used in any place. using namespace services; EXPORT_SERVICE(HistoryUI, "org.tizen.browser.historyui") HistoryUI::HistoryUI() : m_parent(nullptr) , m_main_layout(nullptr) , m_buttonClose(nullptr) , m_buttonClear(nullptr) , m_daysList(nullptr) , m_historyDaysListManager(nullptr) , m_naviframe(nullptr) , m_modulesToolbar(nullptr) { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); m_edjFilePath = EDJE_DIR; m_edjFilePath.append("HistoryUI/History.edj"); if (!m_historyDaysListManager) m_historyDaysListManager = std::make_shared<HistoryDaysListManagerMob>(); m_historyDaysListManager->signalHistoryItemClicked.connect(signalHistoryItemClicked); m_historyDaysListManager->signalDeleteHistoryItems.connect(signalDeleteHistoryItems); m_historyDaysListManager->setRightButtonEnabledForHistory.connect( boost::bind(&HistoryUI::setRightButtonEnabled, this, _1)); m_historyDaysListManager->setSelectedItemsCount.connect([this](auto count){ m_naviframe->setTitle((boost::format(_("IDS_BR_HEADER_PD_SELECTED_ABB")) % count).str()); }); } HistoryUI::~HistoryUI() { } void HistoryUI::showUI() { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); M_ASSERT(m_main_layout); m_naviframe->show(); evas_object_show(m_main_layout); } void HistoryUI::hideUI() { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); M_ASSERT(m_main_layout); evas_object_hide(m_main_layout); clearItems(); m_naviframe->hide(); } void HistoryUI::setRightButtonEnabled(bool enable) { BROWSER_LOGD("[%s:%d] %d", __PRETTY_FUNCTION__, __LINE__, enable); m_naviframe->setRightButtonEnabled(enable); } void HistoryUI::init(Evas_Object* parent) { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); M_ASSERT(parent); m_parent = parent; } Evas_Object* HistoryUI::getContent() { M_ASSERT(m_parent); createHistoryUILayout(); return m_naviframe->getLayout(); } void HistoryUI::createHistoryUILayout() { elm_theme_extension_add(nullptr, m_edjFilePath.c_str()); if (!m_naviframe) m_naviframe = std::make_shared<NaviframeWrapper>(m_parent); m_main_layout = elm_layout_add(m_naviframe->getLayout()); m_naviframe->setContent(m_main_layout); elm_layout_file_set(m_main_layout, m_edjFilePath.c_str(), "history-layout"); evas_object_size_hint_weight_set(m_main_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(m_main_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); m_daysList = createDaysList(m_main_layout); clearItems(); createTopContent(); elm_object_signal_emit(m_naviframe->getLayout(), "show_toolbars", "ui"); } void HistoryUI::createTopContent() { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); M_ASSERT(m_naviframe->getLayout()); m_naviframe->addPrevButton(_close_clicked_cb, this); m_naviframe->setPrevButtonVisible(true); m_naviframe->setTitle(_("IDS_BR_TAB2_HISTORY")); } Evas_Object* HistoryUI::createDaysList(Evas_Object* parent, bool isRemoveMode) { M_ASSERT(history_layout); auto list = m_historyDaysListManager->createDaysList(parent, isRemoveMode); evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL); return list; } void HistoryUI::removeSelectedHistoryItems() { if (!m_historyDaysListManager) { BROWSER_LOGD("[%s:%d] No selected elements to delete"); return; } if (m_historyDaysListManager->isSelectAllChecked()) clearHistoryClicked(); m_historyDaysListManager->removeSelectedItems(); } void HistoryUI::_close_clicked_cb(void * data, Evas_Object*, void*) { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); if (!data) { BROWSER_LOGW("[%s] data = nullptr", __PRETTY_FUNCTION__); return; } auto self = static_cast<HistoryUI*>(data); self->closeHistoryUIClicked(); } void HistoryUI::addHistoryItems( std::shared_ptr<HistoryItemVector> items, HistoryPeriod period) { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); if (items->size() == 0) return; m_historyDaysListManager->addHistoryItems(items, period); } void HistoryUI::clearItems() { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); m_historyDaysListManager->clear(); } } }
cpp
from collections import defaultdict class Graph: def __init__(self): self.graph = defaultdict(list) def addEdge(self, starting_vertex, end_vertex): self.graph[starting_vertex].append(end_vertex) def printAllPaths(self, starting_vertex, target_vertex): visitedVertices = defaultdict(bool) self.resultPaths = [] self.dfsUtil(starting_vertex, visitedVertices, target_vertex, "") return self.resultPaths def dfsUtil(self, current_vertex, visitedVertices, target_vertex, output_string): visitedVertices[current_vertex] = True if output_string == "": output_string = current_vertex else: output_string = output_string + "->" + current_vertex if current_vertex == target_vertex: self.resultPaths.append(output_string) return for vertex in self.graph[current_vertex]: if visitedVertices[vertex] == False: self.dfsUtil(vertex, visitedVertices, target_vertex, output_string) visitedVertices[vertex] = False if __name__ == "__main__": g = Graph() g.addEdge("A", "B") g.addEdge("B", "D") g.addEdge("A", "D") g.addEdge("C", "A") g.addEdge("C", "B") g.addEdge("A", "C") paths = g.printAllPaths("A", "B") print(paths)
python
<gh_stars>0 { "quarry": { "index": 4, "isReplica": false, "mergePool": "E2C3QAG1rQeckHQHpsZiKu7a7sEHXBX8z74s3ceaFZwu", "primaryQuarries": [], "primaryToken": { "decimals": 6, "mint": "<KEY>" }, "primaryTokenInfo": { "address": "<KEY>", "chainId": 103, "decimals": 6, "name": "Token CmcF", "symbol": "CmcFM" }, "quarry": "4S4Shcrttrb9rFoEz6N1x9nvkKZomHBkcV6B4UohLayi", "replicaMint": "<KEY>", "replicaQuarries": [], "slug": "cmcfm", "stakedToken": { "decimals": 6, "mint": "<KEY>" } }, "rewarder": { "authority": "<KEY>", "mintWrapper": "<KEY>", "rewardsToken": { "decimals": 6, "mint": "<KEY>" }, "rewardsTokenInfo": { "address": "<KEY>", "chainId": 103, "decimals": 6, "name": "Token Gv4B", "symbol": "Gv4BC" }, "slug": "Hb7fAVvhrAczt354jVyroFYiZAyBX6f6fU8jxAoxbeNZ" }, "rewardsToken": { "address": "<KEY>", "chainId": 103, "decimals": 6, "name": "Token Gv4B", "symbol": "Gv4BC" }, "stakedToken": { "address": "<KEY>", "chainId": 103, "decimals": 6, "name": "Token CmcF", "symbol": "CmcFM" }, "underlyingTokens": [] }
json
'use strict'; export default ` type FiscalYear { id : String, active : String, created : String, createdBy : User, description : String, notes : [Note], start : String, end : String, updated : String, updatedBy : User, } `; export const fiscalYearQueries = ` fiscalYearFindAll(id: [String]): [FiscalYear] fiscalYearFindById(id: String): FiscalYear `; export const fiscalYearMutations = ` fiscalYearCreate( id : String, active : Boolean, description : String, start : String, end : String notes : [String] ): FiscalYear fiscalYearUpdate( id : String, active : Boolean, description : String, start : String, end : String notes : [String] ): FiscalYear fiscalYearRemove( id : String ): FiscalYear `;
javascript
Android fragmentation is a huge problem. The fact that there are hundreds of different hardware devices running over half a dozen different versions of Google’s OS makes it annoying for users, but makes it an especially devastating issue for developers trying to make a business out of the Android ecosystem. This was highlighted by the recent release of Temple Run on the Android platform. A previously (very) successful game on iOS, it was brought over to Android in order to take advantage of the huge number of devices that run the OS. And it has already hit 1 million downloads in just 3 days, good, even for a free app. But very quickly, the developers of the app discovered the pitfalls of fragmentation: 99.9% of support emails are complaining their device isn’t supported. We currently support 707 devices. Mindblowing. Natalia Luckyanova of Imangi tweeted out that most of their 1200 emails over the past 12 hours of release had been devoted to the fact that the app just didn’t work on one of the hundreds of devices owned by those users. But then Developer David Smith replied to her, saying that he had some 1443 unique devices on the logs for his Android app Audiobooks (also Free). We contacted Smith to chat with him a bit about whether the fragmentation of Android software and devices had affected the process of making software for the platform. What he shared with us was shocking. Smith confirmed for us that his Audiobooks app has been run on 1443 different Android devices by its users. This makes it absolutely impossible to determine whether an app will run without problems for all of your customers. To drive home how ridiculously shattered the Android landscape is, check out this list of the most used single devices based on 1.3M downloads of his app: - Droid X (7.8% of users) - Samsung Galaxy S2 (4.3%) - HTC Desire HD (4%) - Droid incredible (2.3%) This is insanity when you look at it from the standpoint of an iOS developer, who has to support only a handful of hardware varietals. Of course, Android’s very nature causes this. It is designed to work on an enormous array of hardware with all kinds of different components and feature sets. The way Android is designed to be used means that developers will likely always have to deal with this kind of fractured hardware landscape, it’s a fact of life on the platform. All of this leads to low reviews of the app, an enormous volume of support email dedicated to errors due to versioning or hardware flukes and lost revenue for the developer. This is especially important because the Android platform is generally far less profitable than Apple’s iOS. People expect to pay less for Android apps and they’re vocal about it. Check out this thread on Reddit about the recently released (and incredibly beautiful) doubleTwist Alarm app for an example of the way that some Android users view paying even $1 for an arguably AAA title. The chart on the right shows how Smith’s apps were performing on the App Store, Amazon and Google markets last July. Note that his apps are actually ranked higher on Android than they are on iOS. This is a systemic problem and one that makes the additional headache of supporting hundreds of devices running aging versions of Android even less worthwhile for developers. Especially those with limited resources. In a report today, Flurry Analytics paints a slightly more optimistic picture of the Amazon App Store, which it says generates $0.89 for every $1 that the App Store makes, but the Google Play market still comes in a dismal third at $0.23 . I asked Smith if he thought that there was any practical solution to the problem of having to support so many versions of an app. Due to its approach, Apple’s ecosystem offers many benefits for developers. There are only two screen sizes in the entire pantheon of Apple’s mobile products and as many as 75% of users are already upgraded to iOS 5, allowing developers to support newer features and phase out older versions of iOS quicker. In the case of hardware, Apple’s path has been one of restraint and focus. The business model of Google is an antithesis to this kind of thinking, which is fine. It’s great to give consumers more options and to have a strong alternative to iOS. Android fills a necessary role in many embedded systems and unique devices. And Ice Cream Sandwich is a bold step in a very good direction, not compromising the original vision of Android as a more customizable and flexible OS, while injecting it with more polish and logic. But a platform does not exist on first party apps and a polished OS alone. If it did, then Windows Phone would be destroying Android in adoption and not just in users satisfaction surveys. A platform needs developers and it needs them to be able to please their customers. Apps are the key to any successful platform and if Google doesn’t work to improve the very real fragmentation issues, it will continue to be a less attractive option for the very people Android needs to survive. See also: Zipline CEO: Stop whining about Android fragmentation and do some damn QA! Get the most important tech news in your inbox each week.
english
package me.saket.dank.cache; import android.app.Application; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; import com.danikula.videocache.HttpProxyCacheServer; import com.jakewharton.disklrucache.DiskLruCache; import com.nytimes.android.external.cache3.Cache; import com.nytimes.android.external.cache3.CacheBuilder; import com.nytimes.android.external.fs3.filesystem.FileSystem; import java.io.File; import java.io.IOException; import java.util.concurrent.Executors; import javax.inject.Named; import javax.inject.Singleton; import dagger.Module; import dagger.Provides; import io.reactivex.Scheduler; import io.reactivex.exceptions.Exceptions; import io.reactivex.schedulers.Schedulers; import me.saket.dank.BuildConfig; import me.saket.dank.data.AppInfo; import me.saket.dank.data.FileSize; import me.saket.dank.urlparser.Link; import me.saket.dank.utils.DeviceInfo; import me.saket.dank.utils.FileSizeUnit; @Module public class CacheModule { @Provides @Singleton FileSystem provideCacheFileSystem(StoreLruFileSystem lruFileSystem) { return lruFileSystem; } @Provides DiskLruCache diskLruCache(Application appContext, AppInfo appInfo) { FileSize maxCacheSize = FileSize.create(100, FileSizeUnit.MB); File cacheDirectory = new File(appContext.getCacheDir(), "disk_lru_cache"); try { int valuesPerCacheEntry = 1; // No idea what this means. Glide uses 1. return DiskLruCache.open(cacheDirectory, appInfo.appVersionCode(), valuesPerCacheEntry, (long) maxCacheSize.bytes()); } catch (IOException e) { throw Exceptions.propagate(e); } } /** * Used for caching videos. */ @Provides @Singleton HttpProxyCacheServer provideHttpProxyCacheServer(Application appContext) { return new HttpProxyCacheServer(appContext); } @Provides @Named("cache_pre_filling") Scheduler cachePreFillingScheduler() { return Schedulers.from(Executors.newCachedThreadPool()); } @Provides BitmapPool provideBitmapPool(Application appContext) { // Not adding Glide to the dagger graph intentionally. Glide objects // should be created in Activity, Fragment and View contexts instead. return Glide.get(appContext).getBitmapPool(); } @Provides @Singleton @Named("url_parser") Cache<String, Link> provideUrlParserCache(DeviceInfo deviceInfo) { if (BuildConfig.DEBUG && deviceInfo.isRunningOnEmulator()) { return CacheBuilder.newBuilder() .maximumSize(0) .build(); } return CacheBuilder.newBuilder() .maximumSize(100) .build(); } }
java
<filename>f3dasm/abaqus/post_processing/get_data.py ''' Created on 2020-04-15 14:50:02 Last modified on 2020-05-07 21:21:10 Python 2.7.16 v0.1 @author: <NAME> (<EMAIL>) Main goal --------- Develop functions to get data from odb files. ''' #%% history outputs def get_xydata_from_nodes_history_output(odb, nodes, variable, directions=(1, 2, 3), step_name=None): ''' Given a node array, returns the values for time and the given variable. Assumes the variable was requested in history outputs. Parameters ---------- odb : Abaqus odb object nodes : array-like of Abaqus OdbMeshNode objects variable : str It only works for vector-like variables. e.g. 'U' and 'RF' directions : array Directions for which to extract values. step_name : str If None, it uses the last step. Returns ------- y : array-like, shape = [n_nodes x [n_increments x n_directions]] Notes ----- -Assumes all the nodes have history output and the array contains each node only once. ''' # initialization if not step_name: step_name = odb.steps.keys()[-1] step = odb.steps[step_name] # collect data y = [] for node in nodes: instance_name = node.instanceName if node.instanceName else 'ASSEMBLY' name = 'Node ' + instance_name + '.' + str(node.label) historyOutputs = step.historyRegions[name].historyOutputs node_data = [] for direction in directions: node_data.append([data[1] for data in historyOutputs['%s%i' % (variable, direction)].data]) y.append(node_data) return y #%% field outputs def get_ydata_from_nodeSets_field_output(odb, nodeSet, variable, directions=(1, 2, 3), step_name=None, frames=None): ''' Given a node set, returns the values for the given variable. It may take a while to run. Parameters ---------- odb : Abaqus odb object nodeSet : Abaqus nodeSet object variable : str It only works for vector-like variables. e.g. 'U' and 'RF' directions : array Directions for which to extract values. The value will be subtracted by 1 when accessing abaqus data. frames : array-like of Abaqus OdbFrame objects If frames are available from outside, use it because it may significantly decreases the computational time. step_name : str If None, it uses the last step. Only required if frames=None. Returns ------- values : array-like, shape = [n_increments x n_directions x n_nodes]] ''' # TODO: extend to scalar and tensor like variables # TODO: change name to accept also elements (position should be an input) # access frames if not frames: if not step_name: step_name = odb.steps.keys()[-1] frames = [frame for frame in odb.steps[step_name].frames] # collect data values = [] for frame in frames: varFieldOutputs = frame.fieldOutputs[variable] outputs = varFieldOutputs.getSubset(region=nodeSet).values output_frame = [] for direction in directions: output_frame.append([output.data[direction - 1] for output in outputs]) values.append(output_frame) return values #%% other def get_eigenvalues(odb, frames=None, step_name=None): ''' Parameters ---------- odb : Abaqus odb object frames : array-like of Abaqus OdbFrame objects step_name : str If None, it uses the last step. Only required if frames=None. ''' # access frames if not frames: if not step_name: step_name = odb.steps.keys()[-1] frames = [frame for frame in odb.steps[step_name].frames] # get eigenvalues eigenvalues = [float(frame.description.split('EigenValue =')[1]) for frame in list(frames)[1:]] return eigenvalues
python
- Step 6: Absorb excess moisture. Discover the best techniques and DIY solutions to effectively remove Sweat Stains from your mattress. Follow our step-by-step guide and restore your mattress to its pristine condition. Visit Bedsland.co.uk for more helpful tips and insights on mattress care. Sweat stains on a mattress can be unsightly and can lead to unpleasant odors over time. Whether it’s due to hot summer nights or an active lifestyle, it’s essential to know how to remove sweat stains effectively. In this blog post, we will provide you with expert tips and DIY solutions to help you tackle sweat stains on your mattress. By following our step-by-step guide, you can restore your mattress to its original freshness and ensure a clean and comfortable sleep environment. Read on to learn more! Before we dive into the removal methods, it’s crucial to understand why sweat stains occur on mattresses. Sweat is a combination of water, salt, and other bodily fluids, and it can leave behind unsightly marks on your mattress fabric. Over time, these stains can become stubborn and challenging to remove. However, with the right techniques and products, you can effectively eliminate sweat stains and maintain a clean sleeping surface. Before you begin the stain removal process, it’s important to gather the necessary supplies. Here are the items you’ll need: · Ensure you have these supplies ready before proceeding with the steps outlined below. Follow these steps to effectively remove sweat stains from your mattress: Start by removing all bedding, including sheets, pillowcases, and mattress covers. These should be washed separately using the appropriate instructions. Using a vacuum cleaner with an upholstery attachment, carefully vacuum the entire surface of the mattress. This step helps remove any loose debris and prepares the mattress for the cleaning process. Mix equal parts of water and upholstery cleaner or mild detergent in a spray bottle. Spray the solution onto the sweat stains and let it sit for about 10 minutes. This will help break down the stain and loosen it from the fabric. Using a clean cloth or sponge, gently blot the sweat stains in a circular motion. Continue blotting until the stain begins to fade. Fill a spray bottle with white vinegar and spritz it lightly over the previously stained area. Allow the vinegar to sit for a few minutes before proceeding to the next step. Step 6: Absorb excess moisture. Baking soda acts as an absorbent and helps eliminate any remaining moisture or odors. Using the upholstery attachment on your vacuum cleaner, thoroughly vacuum the mattress to remove the baking soda residue. This will leave your mattress smelling fresh and clean. To prevent sweat stains from recurring on your mattress, consider the following tips: · Use a mattress protector: Invest in a waterproof and breathable mattress protector to shield your mattress from sweat and other liquids. It will also protect against dust mites and allergens. · Wash bedding regularly: Ensure you wash your bedding, including sheets, pillowcases, and mattress covers, at least once a week. This will help maintain a clean sleeping environment and reduce the chance of sweat stains. Air out your mattress: Occasionally, remove the bedding and allow your mattress to air out. This helps in moisture evaporation and reduces the risk of odor buildup. Sweat stains on a mattress can be a nuisance, but with the right techniques, they can be easily removed. By following our step-by-step guide and implementing preventive measures, you can keep your mattress clean, fresh, and free from unsightly stains. Remember to use the proper cleaning supplies and take care when treating your mattress. For more helpful tips and insights on mattress care, visit Bedsland.co.uk, your trusted source for all things sleep-related. Sleep well and wake up to a clean and comfortable mattress every day! Sweat stains on a mattress are caused by perspiration that seeps into the fabric or upholstery. As we sleep, our bodies naturally release sweat, and over time, this can accumulate and leave visible stains on the mattress surface. Once you notice sweat stains on your mattress, it’s important to act quickly. Follow these immediate steps: Blot the stain: Use a clean cloth or paper towels to gently blot the affected area. Avoid moisture: Prevent the stain from spreading by keeping the affected area as dry as possible. If necessary, use a fan or open windows to facilitate air circulation. To prevent sweat stains from recurring, consider these preventive measures: Mattress protector: Invest in a waterproof mattress protector. This will create a barrier between your body and the mattress, preventing sweat from seeping into the fabric. Regular cleaning: Clean your mattress regularly by vacuuming it to remove dust, dead skin cells, and any accumulated sweat. Good ventilation: Ensure proper airflow in your bedroom. Use a fan, open windows, or install an air purifier to keep the air fresh and reduce moisture buildup. The post How to Remove Sweat Stains From Mattress appeared first on Bedsland Furniture.
english
<filename>bower.json { "name": "angular-md-toast-helper", "authors": [ "verebelyicsaba <<EMAIL>>", "verebelyibertalan <<EMAIL>>" ], "description": "A wrapper service for Angular Material Toast service.", "main": "dist/wb-toaster.js", "moduleType": [], "keywords": [ "angular", "material", "toast" ], "license": "MIT", "homepage": "", "ignore": [ "**/.*", "node_modules", "bower_components", "test", "tests" ], "dependencies": { "angular-material": "^1.0.6" } }
json
<reponame>yaph/traste import {select as D3Select} from 'd3-selection'; import {noteAtPosition, noteColor, noteIndex, noteLabel} from './notes'; function drawCircle(parent, cx, cy, radius, fill='#cccccc', stroke=null, stroke_width=null, title=null) { const circle = parent.append('svg:circle') .attr('cx', cx) .attr('cy', cy) .attr('r', radius) .style('fill', fill); if (stroke) circle.style('stroke', stroke); if (stroke_width) circle.style('stroke-width', stroke_width); if (title) circle.attr('title', title); } export function drawFretboard(selector, instrument, notes, width=null) { const tuning = instrument.tuning; const string_gauges = instrument.string_gauges; const fret_count = instrument.fret_count; const svg = D3Select(selector); svg.selectAll('*').remove(); if (width === null) { const bbox = svg.node().parentElement.getBoundingClientRect(); width = bbox.width * 0.95; } // Readjust width so the fretboard works for different screen sizes and fret counts const min_fret_distance = 26; const min_width = min_fret_distance * (fret_count + 1); width = Math.max(min_width, width); // Calculate fret and string distances based on container width const fret_distance = width / (fret_count + 1); const string_distance = fret_distance * 0.65; // Calculate paddings and margins based on fret and string distances const string_padding = string_distance * 0.1; const fret_padding = fret_distance * 0.01; const margin_horizontal = fret_distance * 0.8; const margin_vertical = string_distance * 0.5; const height = string_distance * tuning.length + margin_vertical; const string_width = width - margin_horizontal * 1.2; const fret_height = string_distance * (tuning.length - 1); const fret_width = fret_distance * 0.06; const note_radius = fret_distance * 0.23; const note_stroke_width = note_radius * 0.1; const note_font_size = note_radius * 1.05; const fret_marker_radius = note_radius * 0.3; // Setup SVG svg.attr('width', width).attr('height', height); const transform = `translate(${margin_horizontal}, ${margin_vertical})`; const g_frets = svg.append('g').attr('class', 'frets').attr('transform', transform); const g_fret_markers = svg.append('g').attr('class', 'fret-markers').attr('transform', transform); const g_strings = svg.append('g').attr('class', 'strings').attr('transform', transform); const g_notes = svg.append('g').attr('class', 'notes').attr('transform', transform); // draw frets for (let i = 0; i <= fret_count; i++) { let offset = i * fret_distance; // make nut a little wider let stroke_width = fret_width; if (0 == i) stroke_width *= 1.5; g_frets.append('svg:line') .attr('x1', offset) .attr('y1', -string_padding / 2) .attr('x2', offset) .attr('y2', fret_height + string_padding) .style('stroke', '#222222') .style('stroke-width', stroke_width) .append('title').text(i); } // draw fret markers for (let i of instrument.fret_markers) { if (i > fret_count) { break; } let cx = i * fret_distance - fret_distance / 2; let cy = height - margin_vertical - fret_marker_radius * 3; if (0 == i % 12) { const offset = fret_marker_radius * 1.3; drawCircle(g_fret_markers, cx + offset, cy, fret_marker_radius); // make sure the next circle is offset in the other direction cx -= offset; } drawCircle(g_fret_markers, cx, cy, fret_marker_radius); } // draw strings for (let i = 0; i < tuning.length; i++) { const root = tuning[i]; const offset = i * string_distance; g_strings.append('svg:line') .attr('x1', -fret_padding / 2) .attr('y1', offset) .attr('x2', string_width + fret_padding) .attr('y2', offset) .style('stroke', '#444444') .style('stroke-width', string_gauges[i] * string_distance) .append('title').text(root); } // draw notes for (let string_idx = 0; string_idx < tuning.length; string_idx++) { const root_idx = noteIndex(tuning[string_idx]); for (let fret_idx = 0; fret_idx <= fret_count; fret_idx++) { const note = noteAtPosition(root_idx, fret_idx, notes); if (!note) continue; const label = noteLabel(note); // Adjust font size based on label length to better fit sharps and flats. const reduce = 5 * (1 - 1 / label.length); const font_size = note_font_size - reduce; const cx = fret_idx * fret_distance - fret_distance * 0.5; const cy = string_idx * string_distance; drawCircle(g_notes, cx, cy, note_radius, noteColor(note), '#999999', note_stroke_width, note); g_notes.append('svg:text') .attr('x', cx) .attr('y', cy) .attr('dy', '0.38em') .attr('fill', '#000000') .style('text-anchor', `middle`) .style('font-size', `${font_size}px`) .style('font-family', 'Roboto,Ubuntu,Helvetica,Arial,sans-serif') .text(label); } } }
javascript
Lewis Hamilton said he had been moved by a letter from the son of a man facing the death penalty in Bahrain and assured activists on Saturday he would not let human rights issues go unnoticed. Campaigners sent letters to the seven-times Formula One world champion last month before the first of two Grands Prix in Bahrain. Hamilton had said then that he needed time to digest the content. Asked for an update ahead of the season-ending Abu Dhabi Grand Prix, Hamilton said he had hoped to meet Bahrain's Crown Prince but testing positive for COVID-19 had ruled that out. It had given him more time to read the letters, however. "Ultimately, it isn't necessarily my responsibility to speak out on the places that I don't know everything about but I think we together always have to work to push for change and improvements," he said. "I think the saddest thing for me was that there is a young man on death row and it's not clear... when his son writes me a letter, that really hits home. All lives matter. I think there's definitely work to be done in the background. "I definitely won't let it go unnoticed," he added. "When I get some time now, I will definitely try and speak to those (people) and see how I can positively impact that (race) weekend (in future)." Sayed Alwadaei, director of the London-based Bahrain Institute for Rights and Democracy (BIRD), said 11-year-old Ahmed Ramadhan had written to Hamilton for help. His father Mohammed, a security guard, was sentenced in 2014 over the death of a policeman. Human rights groups say the conviction was based on confessions extracted through torture. Bahrain’s government has said the case met all requirements of a fair trial, and the initial judgment was followed by a second trial that looked into the allegations of abuse. Hamilton was also sent a photograph, through the Mercedes team, of Ahmed holding a drawing of his racing car. Hamilton has urged Formula One to do more to push for human rights, saying the issue was a "massive problem" in some of the sport's host countries. Bahrain's 2011 race was called off due to civil unrest in the island kingdom and the grand prix, the country's biggest sporting event, regularly draws criticism from rights campaigners. The sport is also set to race in neighbouring Saudi Arabia for the first time next year, a move criticised by Amnesty International. Formula One chairman Chase Carey said before the Bahrain Grand Prix that the sport was a "force for good" in the countries it visits. Campaigners have accused the government of using the positive publicity surrounding the race to 'sportswash' the situation. Alwadaei said Hamilton's latest words were a "watershed moment for international sport. "When world champions like Lewis Hamilton choose to speak out, lives can change forever," he said. Silverstone will rename its International Pits Straight after seven-times Formula One world champion Lewis Hamilton, the home of the British Grand Prix announced on Saturday. Hamilton this year became the most successful Formula One driver of all time after beating Michael Schumacher's wins record and equalling the retired Ferrari great's seven championships. Silverstone said in a statement that the stretch of track, flanked by the Wing building, would become Hamilton Straight. "It is the first time in Silverstone’s history that a part of the circuit has been named after any individual," said British Racing Drivers' Club president David Coulthard in a statement ahead of the season-ending Abu Dhabi Grand Prix. "Lewis has become a huge part of this history and the directors of the Club and I felt there was no better way to mark this than to rename the iconic pits straight in recognition of his record-breaking achievements." Hamilton has won his home grand prix seven times. US based investment group MSP Sports Capital are taking a significant minority stake in the McLaren Formula One team, McLaren Racing said in a statement on Sunday. The deal, for an initial 15 per cent holding that will rise to a maximum 33% by the end of 2022, will value the British racing outfit at 560 million pounds ($740.49 million), it added. Under the deal, MSP will put 185 million pounds into McLaren Racing over a two-year period. The consortium members include The Najafi Companies, a private investment firm, and UBS O'Connor, a hedge fund subsidiary of Swiss investment banking firm UBS. Jahm Najafi will become a vice-chairman of McLaren Racing, while Jeff Moorad of MSP and Rodrigo Trelles Zabala of UBS O'Connor will join the McLaren Racing board. Bahrain's Mumtalakat holding company is the majority shareholder in McLaren Group. The Woking-based outfit have won the F1 constructors' championship eight times. ($1 = 0.7563 pounds)
english
The Indian men’s team on Thursday secured qualification in the elite team sprint event at the UCI Track Cycling World Championships, which is set to be held in Berlin next year. This is the first time that the men’s team has qualified for the senior World Championship, where the top 18 teams take part. This will be the last event where athletes can vie for points which will help them qualify for the Tokyo Olympics. A young contingent comprising of Esow Alben , Jemsh Singh, Rojit Singh, and Ronaldo Singh will be participating in the team sprint event. The tournament will be held in Berlin, Germany from February 26 to March 1, 2021. Time Trial, Madison, Individual Pursuit, Team Pursuit, Scratch Race, Sprint, Team Sprint, Omnium, Keirin, and Points Race are the other events where athletes can hope to secure Olympic qualification. (more to follow)
english
As social distancing and quarantine become part of our new reality, a lot of real-life action has now gone virtual. NEW DELHI: As social distancing and quarantine become part of our new reality, a lot of real-life action has now gone virtual. From unending Zoom calls to online workout sessions to even virtual dates all the while being stuck at home — the list only goes on. In such trying times, it's important to not only care for those around you but also indulge in the right self care. In fact, the need for self-care to ensure mental and physical well-being is being increasingly recognised as a potent tool to dealing with our demanding lifestyle today. Moving away from the conventional association of self-care with women, it's now well acknowledged that self-care knows no gender — because it is the art and act of consciously putting yourself first. So, how does one get started with self-care? Rachit Mehra, Senior Marketing Manager, Phy, PurePlay Skin Sciences Ltd, guides you how. Gyms across cities might be temporarily shut, but what's stopping you from setting up a makeshift gym in a corner of your room or balcony! If working out in isolation without a trainer feels unfamiliar, start off with one of those online training sessions on fitness apps. Working out releases endorphins that bring a natural glow to your skin while lowering your stress levels. And who doesn't enjoy a refreshing shower after a fun workout. A sulphate-free bodywash infused with natural ingredients might just be what you're looking for to take on the day recharged. WFH has blurred the lines between office and home schedules. However, it is important to follow a schedule to take time out for yourself. Make sure to follow a schedule, eat your meals on time and most importantly, sign off from work on time. Catch an episode of your favourite series on Netflix, watch reruns of Friends if you need to blow off some steam laughing. Let's face it — in between our busy schedules we barely get time to wash our faces twice a day, let alone use a moisturizer. Why not use this isolation period as some downtime for your skin! Maintaing a basic skincare routine like washing your face in the morning and before going to bed, applying a moisturizer, using a good, fragrant bodywash to calm your senses, a body mist to quickly hit refresh doesn't take a lot of effort and is definitely not time consuming. Isolation can be challenging and as individuals are separated from regular (read social) lives they are bound to go through a myriad of emotions — anxiety, loneliness, stress, or feeling overwhelmed. But with some basics one can make the best use of these times. Skipping meals is a no-no just how drinking water to stay hydrated is a big yes-yes. Listen to music, pursue a hobby and try to look at the brighter side of things, like not getting stuck in hours of work commute, being able to spend more time with friends, working out of your home in your pajamas; you get the drift! Self-care need not be an elaborate process or a ritual that needs to be saved for the weekend or a special day. And if anxiety or stress seem to be getting the better of you, reach out to a friend, family or a mental health expert and talk. In the end as they say, this too shall pass. (IANS)
english
Manchester United forward Cristiano Ronaldo has spoken fondly of his respect for former manager Ole Gunnar Solskjaer. In an interview with Piers Morgan on TalkTV, the Portuguese forward was asked for his opinion on his time playing under Solskjaer. The Norweigan was in charge when Ronaldo, 37, returned to Old Trafford in 2021. However, he was sacked in November of that year after a poor run of form in the league. The Red Devils suffered a 5-0 defeat to Liverpool at Old Trafford, a 2-0 loss away at Manchester City, and an embarrassing 4-1 humbling by Watford. Ronaldo has respect for Solskjaer and feels he did a good job: "I love Solskjær. I think he was a top person, because what I keep inside my heart, it's the heart of the persons. And Ole for me, is a top person. It's hard to assume [the role] after Sir Alex Ferguson, but I think he did a good job." Manchester United replaced Solskjaer with interim coach Ralf Rangnick, who Ronaldo does not hold in high regard. The Red Devils forward made his feelings clear when Morgan asked him for his thoughts over Rangnick being Solskjaer's replacement (via Fabrizio Romano): “When you sack Ole Gunnar Solskjær, you should bring a top manager, not a sports director...I love Solskjær - I never saw Rangnick as the boss because I saw some points that I never agreed." Rangnick took over United with the club sitting in eighth in the league and with players' confidence at rock bottom. The Red Devils went five games unbeaten at the start of the German's tenure, but the wheels started falling off. Rangnick ended his time with United, having overseen 11 wins, nine draws, and as many defeats in 29 fixtures. He took over a Red Devils side that had made it to the final of the Europa League and finished second in the league under Solskjaer the previous season. However, Rangnick could only lead United to sixth, and they finished the campaign trophyless. Cristiano Ronaldo also claimed that he was bemused by the appointment of Rangnick because he is not a coach. The German had been working as Lokomotiv Moscow's managing director before he headed to Old Trafford. Cristiano Ronaldo told Morgan: Austria national team manager Rangnick responded when asked for his thoughts on the comments: Rangnick is leading Austria into the 2022 FIFA World Cup. Before temporarily coaching Manchester United, he managed the likes of Hoffenheim, Schalke, and RB Leipzig.
english
The finance minister has delivered a Jai Kisan, Jai Swasthya, Jai Bharat Budget. The holistic approach to address critical sectors including agriculture, food processing, infrastructure, healthcare and human capital, which follows a slew of transformative reforms like GST undertaken earlier, will go a long way in fostering inclusive growth and strengthening the competitiveness of the Indian economy. The landmark announcement to create the world’s largest government funded healthcare programme is indeed path-breaking and will benefit millions of households. The substantive thrust provided to the agri and food sectors through a razorsharp focus on promoting efficiency, increasing productivity, enabling market linkages and raising farmer incomes is indeed laudable. Food processing, which lies at the intersection of agriculture and industry, adds tremendous value to agricultural produce, raising farmer incomes besides combating agri-wastage and generating largescale employment. The move to create institutional mechanisms for forecasting prices and demand through the use of futures and options, expansion of warehouse depository system, and specific measures to boost exports will transform Indian agriculture into a demand-driven competitive value chain that will benefit both farmers and consumers. The creation of Gramin Agricultural Markets (GrAMs), electronically linking to e-NAM (National Agriculture Market) and exempting this system from APMC regulations, is a very forward-looking intervention and will meet the critical need to bring farmers closer to markets. The institutional credit of over Rs 11 lakh crore to agriculture, the cluster-model approach, and increasing the minimum support price by 1.5x for kharif crops will enhance farm incomes and contribute toward realising the Prime Minister’s vision of doubling farmer incomes. Rural growth will in turn fuel consumption demand and enable an uptake in private investment, thereby creating a virtuous cycle of demand-consumption-investment-led growth that will add value across the three sectors of the economy. ITC’s e-Choupal which empowers over 4 million farmers, its food processing investments and rural social programmes, will indeed support the vision of Budget 2018. Download The Economic Times News App to get Daily Market Updates & Live Business News. Subscribe to The Economic Times Prime and read the ET ePaper online.
english
Two persons of a family, including a five-year-old child, were killed and five others critically injured in a collision between a rickshaw and a truck near Padamla in Vadodara district on Thursday evening. The family was returning after offering prayers at the Ghadiyali baba dargah when the truck rammed into their rickshaw on the Padamla bridge. The deceased have been identified as Gulu Ali Ahmed Pathan (47) and Adiba Mutyaz Pathan (5). Five others, who were injured, are Danish Pathan (12), Sayma Pathan (14), Sabreen Pathan (20), Tabssum Pathan (26) and Nashirbegam Pathan (5). While the Vadodara Police has begun a probe, the injured are undergoing treatment at SSG hospital.
english
Google is set to launch a dedicated, native Gmail application for the iPhone, according to MG Siegler. The app, which has long been desired by a great many iPhone users, is thought to have already been submitted to Apple for review, suggesting that it may be released publicly very soon. The upcoming native app is rumoured to be considered to be “pretty fantastic” by those who have seen it, according to Siegler. Undoubtedly the star attraction is the introduction of push-notifications — at long last for many iPhone owning Gmail users — alongside classic Google email features like message threading, priority inbox and starring. Given the long delay without a native application for the iPhone you would expect that both Google and Apple would wait for the right solution and not rush the job with a half baked version. But, while the potential of the app will delight iPhones users across the world, and a native gmail iPhone app is fantastic in theory, there may yet be frustration until Apple allows users to change the default email client on the handset. Could this be a case of two sets forward and one step back? Only time will tell as we wait to see if the rumours of the upcoming app are accurate. Google took a significant step last year when it introduced push notifications for its web-based Gmail app and Google calendar for iPhone, but the prospect of a native application would be the company’s greatest stride on the flagship Apple device. In related news, Google has just rolled out a revamped Android app for Google+. Get the most important tech news in your inbox each week.
english
The Andhra Pradesh government’s decision to have three capitals — Visakhapatnam as an executive capital, whileAmaravatiand Kurnool as legislative and judicial capitals, respectively — brought the development of Amaravati to a grinding halt three years ago. Farmers who gave lands for it allege that Chief Minister Y. S. Jagan Mohan Reddy has been desperate to shift to Visakhapatnam just because he is loath to continue what his predecessor N. Chandrababu Naidu had initiated in Amaravati. They insist that the three capitals are a failed experiment. As a consequence of the decentralisation move which is intended to achieve balanced development of all regions, the infrastructure created at a huge cost in Amaravati, including villas for High Court judges and senior IAS officers, most of which neared completion during the Telugu Desam Party (TDP) regime, is now lying in the dumps. What happens to this massive investment in the event of the government getting the clearance by courts to shift to the port city and the impact of such a shift on future land acquisitions are questions that are difficult to answer. Given the government’s refusal to budge from its stand on the three capitals, the fate of Amaravati appears to be all but sealed. The story of ‘three capitals’ started in 2019 when Mr. Reddy made the proposal in the Legislative Assembly much to the chagrin of about 25,000 farmers who gave 34,400 acres under the land pooling scheme (LPS) for the development of Amaravati. Before this, in 2014, the stage for Amaravati was set by Mr. Naidu, who wasted no time in shifting from the common capital of Hyderabad to Andhra Pradesh soon after the bifurcation of the unified State. By choosing the Vijayawada-Guntur region as the location of State capital, Mr. Naidu went on to create infrastructure on a large-scale, starting with the laying of arterial roads and the construction of the Interim Government Complex (IGC). Within no time, Amaravati caught global attention due to some hard-selling by Mr. Naidu, who got the master planning done by U. K. - based Foster + Partners. The Amaravati project was going on full steam till the 2019 elections when Mr. Reddy’s Yuvajana Shramika Rythu (YSR) Congress Party stormed to power and soon after the change of guard came the idea of three capitals. It came as a shocker to the multitude of farmers who approached the High Court for justice. The HC delivered its verdict in their favour in March 2022. However, the farmers’ joy was shortlived as instead of implementing the writ of mandamus passed by the HC, the State government sought at least five years to complete the development of Amaravati by citing various excuses and went on to challenge the HC’s judgment in the Supreme Court. The case is posted for a fresh hearing on July 11. This is where the development of Amaravati is stuck as there is no change in the government’s stand in favour of decentralisation, while the legal battle continues to rage in the top court. If the government gets to move to Visakhapatnam, it has to put the infrastructure in Amaravati to use to not waste the money spent on it and may also have to pay a massive compensation to farmers for violating the agreements entered with them. Against this backdrop, Mr. Reddy keeps making statements that he will start functioning from Visakhapatnam in a few months. Even as the whole project is entangled in the Supreme Court and the High Court, the government is providing house sites to economically weaker sections (EWS) in about 1,200 acres in the proposed R-5 zone in Amaravati. This is notwithstanding the High Court judgment dated March 3, 2022 in the three capitals case that no third-party interest can be created on lands given for development of the capital city. After the High Court refused to impose a stay on the EWS housing scheme in Amaravati, the farmers filed a special leave petition (SLP) in the apex court, challenging the allotment of house sites to beneficiaries from the EWS hailing from across the State. The government is going by its hunch that the people will reward it for taking up decentralisation in the form of votes next year. Clearly, garnering votes is the underlying objective of the ‘three capitals’ plan and the government is sounding pretty confident about it. Will it actually pay off remains a million-dollar question.
english
package com.example.hades.dagger2._8_provider_2._live_together; import com.example.hades.dagger2.Log; import dagger.ObjectGraph; import javax.inject.Inject; import javax.inject.Inject1; public class TestProviderActivity { private static final String TAG = TestProviderActivity.class.getSimpleName(); @Inject @Inject1 Subject mSubject; protected void onCreate() { inject1(); inject2(); click(); } private void inject1() { ObjectGraph.create(new TestProviderActivityModule()).inject(this); } private void inject2() { DaggerTestProviderActivityComponent4Dagger2.builder().build().inject(this); } private void click() { Log.d(TAG, mSubject.setNum(5)); Log.d(TAG, mSubject.setNum(10)); } }
java
import styled from 'styled-components'; const StyledSearchSection = styled.main` display: flex; justify-content: center; align-items: center; flex-direction: column; .searchSection { display: flex; align-items: center; justify-content: center; span { margin-left: 20px; } } .categorySection { margin: 30px 0; } `; export default StyledSearchSection;
javascript
To ask Michael C. Perkins questions, please sign up. Michael Perkins and 27 other people liked Dmitri's review of Heart of a Dog: Michael Perkins and 123 other people liked Murray's review of War and Peace: Michael Perkins and 41 other people liked Paul Weiss's review of The Big Sleep (Philip Marlowe, #1): "A more appropriate title might have been THE BIG SNOOZE! by Amor Towles (Goodreads Author) Let's start with a common fallacy that the author carefully parses and rebuts. The Treaty of Versailles did not lead to the rise of Hitler or the onset of WW II. (Other details in the last section below) When Let's start with a common fallacy that the author carefully parses and rebuts. The Treaty of Versailles did not lead to the rise of Hitler or the onset of WW II. (Other details in the last section below) When Marshal Foch heard of the signing of the Peace Treaty of Versailles he observed with singular accuracy: 'This is not Peace. It is an Armistice for twenty years.' (Winston S. Churchill) Marshall Foch also forecast, in 1919, that next time Germany would break through into Northern France and seize the Channel ports as a base of operations against England. Hitler did precisely that 20 years later. The author (a Canadian), is a very good writer and does separate portraits of the main players in Paris, as well as several others, who played some part in the conference. Wilson remains puzzling in a way that Lloyd George and Clemenceau, his close colleagues in Paris, do not. What is one to make of a leader who drew on the most noble language of the Bible yet was so ruthless with those who crossed him? Who loved democracy but despised most of his fellow politicians? Who wanted to serve humanity but had so few personal relationships? Like Wilson, his second wife, Edna Boiling, came from the South. She did not want to spoil her Black maid by taking her to London, she told a fellow American, because the British treated blacks too well. Wilson had always insisted on the United States being an Associate and not an Ally and that the United States generally acted unselfishly, in its occupation of Cuba, for example. “We had gone to war with Spain,” he insisted, “not for annexation but to provide the helpless colony with the opportunity of freedom. Of course, no mention of the more disastrous situation in the Philippines, where the American military ruthlessly crushed a Filipino insurgency, largely to hold on to Manila as a port for U.S. warships and as a base for trading with China (thwarted by the Boxer Rebellion). Sound familiar? He was clear in his own mind that he meant well. Even established facts were ignored if they did not fit in with this intuitive sense, this semi-divine power to select the right. Like Napoleon, Lloyd George had an uncanny ability to sense what other people were thinking. He told Frances Stevenson that he loved staying in hotels: “I am always interested in people— wondering who they are— what they are thinking about— what their lives are like— whether they are enjoying life or finding it a bore. Although he was a wonderful conversationalist, he was also a very good listener. From the powerful to the humble, adults to children, everyone who met him was made to feel that he or she had something important to say. One of the most admirable traits in Mr. Lloyd George’s character, in Churchill’s view, “was his complete freedom at the height of his power, responsibility and good fortune from any thing in the nature of pomposity or superior airs. He was always natural and simple. He was always exactly the same to those who knew him well: ready to argue any point, to listen to disagreeable facts even when controversially presented.” His famous charm was rooted in this combination of curiosity and attention. Certainly they were more appealing than the personalities of Wilson and Clemenceau. However, many believed that the Russian Bolsheviks would eventually settle down and become bourgeois. Atatürk was a complicated, brave, determined and dangerous man.....Early on Atatürk developed a contempt for religion that never left him. Islam— and its leaders and holy men— were “a poisonous dagger which is directed at the heart of my people.” From the evening when, as a student, he saw sheikhs and dervishes whipping a crowd into a frenzy, he loathed what he saw as primitive fanaticism. Of course, today in Turkey under Erdogan, we see everything going in the opposite direction. The British and French governments, in a declaration that was circulated widely in Arabic, conveniently discovered that their main goal in the war on Ottomans had been “the complete and definite emancipation of the peoples so long oppressed by the Turks and the establishment of national governments and administrations deriving their authority from the initiative and free choice of the indigenous populations.” Words were cheap. The British were confident that Arabs would willingly choose Britain’s protection. The French did not take Arab nationalism seriously at all. At the end of November 1918, a dark, handsome young man who claimed, with some justification, to speak for the Arabs boarded a British warship in Beirut bound for Marseille and the Paris Peace Conference. Feisal, descendant of the Prophet and member of the ancient Hashemite clan, was clever, determined and very ambitious. He was also dazzling. he was everyone’s image of what a noble desert Arab should be. He suggested the calmness and peace of the desert, the meditation of one who lives in the wide spaces of the earth, the solemnity of thought of one who often communes alone with nature. Feisal had declared himself king of the Arabs. Riding at Feisal’s side was his fair-haired, blue-eyed British liaison officer, later to become even more famous as Lawrence of Arabia. A distinguished scholar and a man of action, a soldier and a writer, a passionate lover of both the Arabs and the British empire, T. E. Lawrence was, in Lloyd George’s words, “a most elusive and unassessable personality.” He remains a puzzle, surrounded by legend, some based in reality, some created by himself. It is true that he did brilliantly at Oxford, that he could have been a great archaeologist and that he was extraordinarily brave. His impressions at the time give a more human Feisal: “He is hot tempered, proud, and impatient, sometimes unreasonable, and runs off easily at tangents. Possesses far more personal magnetism and life than his brothers, but less prudent. Obviously very clever, perhaps not overscrupulous.” That last was equally true of Lawrence. In 1919 there was no Iraqi people; history, religion, geography pulled the people apart, not together. Basra looked south, toward India and the Gulf; Baghdad had strong links with Persia; and Mosul had closer ties with Turkey and Syria. Putting together the three Ottoman provinces and expecting to create a nation was, in European terms, like hoping to have Bosnian Muslims, Croats, and Serbs make one country. As in the Balkans, the clash of empires and civilizations had left deep fissures. The population was about half Shia Muslim and a quarter Sunni, with other minorities from Jews to Christians, but another division ran across the religious one: while half the inhabitants were Arab, the rest were Kurds (mainly in Mosul), Persians or Assyrians. Britain did not foresee the problems of throwing such a diverse population into a single state. They were paternalists who thought the British would remain for generations. Another fascinating portrait in the book is of Getrude Bell (although with some surprises). And, of course, the story of Zionism, the scourge of anti-semitism, and Palestine. When historians look, as they have increasingly been doing, at the other details, the picture of a Germany crushed by a vindictive peace cannot be sustained. Despite its losses Germany remained the largest country in Europe west of the Soviet Union between the wars. Its strategic position was significantly better than it had been before 1914. In the west, Germany also faced an advantageous situation. France was gravely depleted by the war, unwilling and, by the 1930s, increasingly unable to summon up the determination to oppose Germany. The guarantee from the United States and Britain was worthless after the failure of the American Senate to ratify it. The Treaty of Versailles is not to blame. It was never consistently enforced, or only enough to irritate German nationalism without limiting German power to disrupt the peace of Europe. With the triumph of Hitler and the Nazis in 1933, Germany had a government that was bent on destroying the Treaty of Versailles. "Wilson, bypassed and humiliated Italy’s representatives, even addressed the Italian people through a long letter published in a French newspaper, in which he explained the reasons for his double refusal: neither Dalmatia nor Fiume to be part of Italy. What prevailed over the whole affair was contempt. A contempt that oozed from the paternalistic tone in his letter to the Italians." "In just over a month Fiume has already become a world of worlds, a free port for rebellion of all political sides, nationalist and internationalist, monarchist and republican, conservative and syndicalist, clerical and anarchist, imperialist and communist. Political, social and artistic avant-gardes throughout Europe are flocking to the wonderland of wonders: dreamers, libertarians, idealists, revolutionaries, nonconformists, adventurers, a horde of heroes and misfits, restless, eccentric talents, men of action and ascetics, down-and-outers with nothing to lose and millionaires in search of passion, violent youths and Parisian-style writers, vegetarian artists and reformed priests, Amazonians in military uniform and servicemen dressed up like ballerinas, Casanovas looking for female conquests." by Amor Towles (Goodreads Author) by Rachel Maddow (Goodreads Author) Quotes by Michael C. Perkins (?) Quotes are added by the Goodreads community and are not verified by Goodreads. (Learn more) “What Orwell feared were those who would ban books. What Huxley feared was that there would be no reason to ban a book, for there would be no one who wanted to read one. Orwell feared those who would deprive us of information. Huxley feared those who would give us so much that we would be reduced to passivity and egoism. Orwell feared that the truth would be concealed from us. Huxley feared the truth would be drowned in a sea of irrelevance. Orwell feared we would become a captive culture. Huxley feared we would become a trivial culture, preoccupied with some equivalent of the feelies, the orgy porgy, and the centrifugal bumblepuppy. As Huxley remarked in Brave New World Revisited, the civil libertarians and rationalists who are ever on the alert to oppose tyranny "failed to take into account man's almost infinite appetite for distractions." Each month we shall read an epic poem together. Each month we shall read an epic poem together. This group is about the book you like most. This group is about the book you like most. Anna wrote: "Thank you for the invite Michael. Your review av Insatiability pushed it from residing on my shelves for far too long, to the very top of my reading list!" Thank you for the invite Michael. Your review av Insatiability pushed it from residing on my shelves for far too long, to the very top of my reading list!
english
Traffic issues are rife in Chennai where youngsters drive bike at top speed and a lot of races take place within the city during peak hours. Chennai Traffic Police have associated themselves with singer Gana Bala to make a music video. The video which runs for a whole four minutes and twenty six seconds is well made as it focuses on all the wrong things people do on the road. Right from skipping traffic lights to racing on road, triple ride and so on, every burning issue has been discussed in the most creative manner to create awareness.
english
A shooting at a nightclub in Mexico’s east has killed at least four people and led to the death of another person during a crush caused by the rush of panicked people. The incident happened at the Blue Parrot Club (BMP) in the town of Playa del Carmen, a popular tourist spot on the Caribbean coastline, early Monday. Quintana Roo State Attorney General Miguel Angel Pech said a Canadian, an Italian — possible tourists — and a Mexican were among the dead. But there are conflicting reports about the death toll and the nationality of the victims. The club said in a statement that “a lone shooter” had shot four people dead outside the night club but that three of them had been security members. them being in critical condition. The shooting took place near one of the club’s exits, prompting people to escape over a fence behind the night club as they heard screaming and gunshots. One woman died in the rush. Some people hid under tables or behind walls for protection. The gunman fled after the attack. Pech, the attorney general, said that shooting first started outside of the club as the gunman exchanged fire with another individual before entering the venue. The state governor, Carlos Joaquin, separately said the shootout may have been due to a personal conflict between the two who exchanged gunfire. Some reports pointed to the fact that drug gang violence, a major plague in Mexico, also exists in the resort city where the massacre took place. Gang-related shootings are fairly common in Mexican clubs. No Comments For This Post, Be first to write a Comment.
english
<reponame>Costallat/hunter<filename>examples/tvm/boo.cpp<gh_stars>1000+ #include <nnvm/op.h> int main() { }
cpp
{ "id": 578715, "title": "เพิ่งรู้มีญาติเป็นโจรใต้ หลังโยนอาก้าฝากให้เก็บไว้ | เดลินิวส์", "description": "ตำรวจ\u0027ระแงะ\u0027 ยึดปืนอาร์ก้าพร้อมกระสุน หลังตรวจพบเคยยิงก่อคดีมาแล้ว 4 ครั้ง คาดผู้ก่อความไม่สงบ นำมาฝากบ้านญาติก่อนเผ่นหนี รอเรื่องเงียบค่อยไปขอคืนใช้ก่อเหตุใหม่ ด้านญาติเซ็ง ไม่อยากยุ่งเกี่ยวกลัวครอบครัวไม่ปลอดภัย", "keywords": "โจรใต้,แสบ,ฝาก,ปืนอาก้า,ให้ญาติ,เก็บ,ไว้ก่อนเผ่นหนี,เดลินิวส์,เดลินิวส์ออนไลน์,เดลินิวส์,เดลินิวส์ออนไลน์,เดลินิวส์วันนี้,ข่าวเดลินิวส์ออนไลน์,ข่าวเดลินิวส์ล่าสุด,ข่าว,ข่าวด่วน,ข่าววันนี้,ข่าวร้อน,ข่าวบันเทิง,ข่าวเด่นวันนี้,ข่าวดารา,ข่าวล่าสุด,คลิป,คลิปด่วน,คลิปข่าว,คลิปร้อน,คลิปฮอต,ท่องเที่ยว,สกู๊ปพิเศษ,ไลฟ์สไตล์,lifestyle,ความงาม,เรื่องย่อละคร,เทคนิค,ดวง,ตรวจหวย,special scoop,dailynews,เซ็กซ์,ไอที,ทิป,ยานยนตร์,หนังสือพิมพ์,สาระน่ารู้,ข่าวล่าสุด,สุขภาพ,แต่งบ้าน,อาหาร,แฟชั่น", "category": "regional", "content": "เมื่อวันที่ 9 มิ.ย. ที่ห้องสืบสวน-สอบสวน สถานีตำรวจภูธร อ.ระแงะ จ.นราธิวาส พ.ต.อ.สุรพงษ์ ชาตสุทธิ์ ผกก.สภ.ระแงะ กำลังสืบสวนในสังกัด และเจ้าหน้าที่ทหารพราน ที่ 45 อ.ระแงะ ร่วมกันแถลงผลเข้าตรวจค้นบ้านพักของ นายเอ (นามสมมุติ)อายุ 53 ปี ชาวจ.นราธิวาส ภายหลังพบอาวุธปืนสงคราม อาร์ก้า 47 พร้อมเครื่องกระสุน 15 นัด และ แม็กกาซีน 1 อัน จากการสอบสวนนายเอ ให้การว่า กลางดึกคืนที่ผ่านมา มีญาติคนหนึ่งของตนขี่จักรยานยนต์(จยย.)มาที่บ้านพัก ก่อนจะโยนกระสอบปุ๋ยไว้หน้าบ้าน พร้อมกับบอกว่าขอฝากไว้ก่อนไว้วันหลังจะมาเอาคืน จากนั้นก็ขี่จยย.หายไปอย่างรวดเร็ว เมื่อตนเปิดกระสอบดูถึงกับผงะเพราะมีอาวุธสงครามดังกล่าวซุกซ่อนอยู่ ด้วยความกลัวจึงนำไปทิ้งไว้ในบ่อน้ำใกล้บ้าน เนื่องจากไม่อยากมีปัญหากับฝ่ายใด กระทั่งเจ้าหน้าที่มาตรวจสอบดังกล่าว   ด้าน พ.ต.อ.สุรพงษ์ กล่าวว่า ได้พยายามติดตามหาอาวุธปืนกระบอกนี้มาโดยตลอด เนื่องจากผู้ก่อความไม่สงบเคยนำไปใช้ก่อเหตุยิงชาวบ้าน อ.ระแงะ และพื้นที่ใกล้เคียงมาแล้ว 4 คดี ก่อนจะนำมาฝากไว้กับนายเอ ดังกล่าว เบื้องต้นเจ้าหน้าที่คาดว่า ผู้ก่อความไม่สงบนำปืนมาฝากญาติเพราะต้องการหลบหนี สลับสับเปลี่ยนที่ซ่อนเพื่ออำพรางไม่ให้เจ้าหน้าที่ติดตาม หรือ อาจต้องการเตรียมก่อเหตุในพื่นที่แล้วค่อยย้อนกลับมาเอาปืนดังกล่าวก็เป็นได้.  ", "url": "https://www.dailynews.co.th/regional/578715", "date": "2017-06-09T10:07:07.211Z" }
json
The committee on Ministry of External Affairs also expressed its displeasure over the government not yet having an authentic database of the Indian diaspora, and said Indian missions abroad should play a more proactive role in developing closer contact with the community. The Lok Sabha will meet as scheduled, from April 20, and wrap up the Session on May 8. In 2005, Mukhtar Abbas Naqvi had said it is a serious concern that instead of excellence, some madrasas are producing extremists. Chatterjee said the Supreme Court,too,is not in favour of linking Aadhaar card to disbursement of benefits under various government schemes. The Winter Session normally lasts a month from the third week of November to the third week of December. The session began on August 5 and was slated to conclude on August 30. Pawan Kumar Bansal,Minister for Parliamentary Affairs and Water Resource Management laid the foundation for the IND-SWIFT Auditorium at IMA Complex,Sector 35,Chandigarh. The adjournment minutes after the Speaker terminated membership of Congress MLAs Chaudhary Rakesh Singh and Kalpana Parulekar. A two-day National Conference on Changing Facets of Business & Commercial Law started at the Army Institute of Law (AIL),Mohali. Union Minister for Parliamentary Affairs & Water Resources,Pawan Kumar Bansal was the chief guest on the occasion. Instead,it has decided to conduct elections for all the vacancies,including 33 per cent seats reserved for women. New Delhi, Feb 22 (ANI): Minister of State (MoS) for Parliamentary Affairs Venkaiah Naidu on Monday asserted that the government is waiting for a calm atmosphere in order to come to a conclusion on the ongoing Jat community protests. He further stated that committee formation on the issue reflects government’s desire to come to a conclusion on the demands raised by the Jats. The Jat community is demanding reservations in government jobs and institutions. New Delhi, Feb 17 (ANI): In the row of unending protests all over the nation, Bharatiya Janata Party (BJP) staged a protest at Jantar Mantar in New Delhi on Wednesday. Union Minister of State for Parliamentary Affairs and Minority Affairs Mukhtar Abbas Naqvi also joined the protest. The protestors carried placards showing anguish against the ongoing protests at various educational institutions. New Delhi, Jan 22 (ANI): Reacting to Karan Johar's remark that freedom of expression in India is the 'biggest joke' Minister of State for Minority Affairs and BJP leader Mukhtar Abbas Naqvi on Friday said those questioning tolerance are ignorant and have no knowledge of Indian culture. He said India is the only country where the intolerance power is so high and whosoever is raising questions has no knowledge about county's rituals. Minister of State for Culture and Tourism and Civil Aviation Mahesh Sharma said no country is as tolerant as India. Meanwhile, Congress leader Manish Tewari said ever since BJP has come into power, everyone thinks they are not allowed to speak their ”Mann Ki Baat”. He added that except Bollywood actor Anupam Kher, who is supporting BJP, all the artists are against BJP's theory. New Delhi, Jan 19 (ANI): Congress leader Sandeep Dikshit on Tuesday alleged that Union Minister Bandaru Dattatreya was somewhere "anti-Dalit" in nature. He said the reason behind the Dalit student suicide has not been clearly stated. He added that the Congress has always tried to be with the downtrodden at large and would continue to do so. Meanwhile, commenting on the issue, Minister of State for Parliamentary Affairs Mukhtar Abbas Naqvi said the incident that happened in the Hyderabad University was unfortunate and offenders would be punished soon. He added that Bandaru Dattatreya is a person who is compassionate about Dalits and targeting him for political gain is not fair. New Delhi, Jan 17 (ANI): Minister of State for Parliamentary Affairs Mukhtar Abbas Naqvi on Sunday took a dig at West Bengal Chief Minister Mamata Banerjee after posters praising West Bengal were seen in New Delhi on Sunday. He said that instead of pasting posters in the national capital, Trinamool Congress (TMC) should paste them in Malda or in places where communal clashes are taking place. He added that TMC should stop taking advantage of communal tensions. New Delhi, Jan 15 (ANI): With the debate on intolerance refusing to subdue, Minister of State for Parliamentary Affairs Mukhtar Abbas Naqvi on Friday added fuel to the fire by welcoming Bharatiya Janata Party (BJP) leader Ram Madhav's remark asking Bollywood star Aamir Khan to preach to his wife about India's prestige. Naqvi said that Madhav has given a good suggestion. He added that with the political battle over tolerance and intolerance being waged, some advice has been given. New Delhi, Jan 14 (ANI): Minister of State for Parliamentary Affairs Mukhtar Abbas Naqvi on Thursday said that the communal card would no longer help the ruling Trinamool Congress (TMC) in the upcoming polls in West Bengal, adding that the Malda incident will backfire on Chief Minister Mamata Banerjee government. Ranchi, Jan 11 (ANI): Minister of State for Parliamentary Affairs Mukhtar Abbas Naqvi on Monday said the Ram Mandir construction is only possible with the court's decision or with mutual consent. Asserting that one must respect the court's decision, Naqvi further said the government or Bharatiya Janata Party does not do anything deliberately. New Delhi, Jan 11 (ANI): Describing the riot in Malda district as an act of communal violence, Minister of State for Parliamentary Affairs Mukhtar Abbas Naqvi on Monday asked why secular leaders are silent on the incident. Naqvi further said the way communalisation is done under the protection of the West Bengal government is unfortunate and condemnable. He also alleged that the state government is playing vote bank politics on the incident. Vijayawada, Jan 11 (ANI): Union Home Minister Rajnath Singh said only 'Smart Cities' won't help and thus the government has embarked on to make villages 'smart' as well. He was speaking at NGO Swarna Bharath Trust's inaugural function in Vijayawada. The function was also attended by Union Parliamentary Affairs Minister M. Venkaiah Naidu.
english
{ "name": "tau-pact-nodejs-course", "version": "1.0.0", "description": "A simple Nodejs + jest project configuring contract tests with PactJS", "main": "src/index.js", "scripts": { "consumer": "node src/consumerService.js", "provider": "node src/providerService.js", "test:consumer": "jest __tests__/contract/consumer --runInBand --setupFiles ./__tests__/contract/helpers/pactSetup.js --setupTestFrameworkScriptFile=./__tests__/contract/helpers/pactTestWrapper.js", "test:provider": "jest __tests__/contract/provider --runInBand --force-exit", "publish:contract": "node ./__tests__/contract/helpers/publish.js" }, "repository": { "type": "git", "url": "https://github.com/rafaelaazevedo/tau-pact-nodejs-course.git" }, "keywords": [ "nodejs", "contract-tests", "pactjs", "pact", "tutorial", "course", "tau" ], "author": "<NAME>", "license": "MIT", "bugs": { "url": "https://github.com/rafaelaazevedo/tau-pact-nodejs-course/issues" }, "homepage": "https://github.com/rafaelaazevedo/tau-pact-nodejs-course#readme", "devDependencies": { "axios": "^0.19.0", "body-parser": "^1.19.0", "cors": "^2.8.5", "eslint": "^6.8.0", "express": "^4.17.1", "jest": "^25.1.0" }, "jest": { "testEnvironment": "node" } }
json
<reponame>shyams2/pychebfun #!/usr/bin/env python # coding: UTF-8 from __future__ import division from pychebfun import Chebfun import operator import unittest import pytest from . import tools import numpy as np import numpy.testing as npt #------------------------------------------------------------------------------ # Unit test for arbitrary interval Chebfuns #------------------------------------------------------------------------------ class TestDomain(unittest.TestCase): def test_mismatch(self): c1 = Chebfun.identity() c2 = Chebfun.from_function(lambda x:x, domain=[2,3]) for op in [operator.add, operator.sub, operator.mul, operator.truediv]: with self.assertRaises(Chebfun.DomainMismatch): op(c1, c2) def test_restrict(self): x = Chebfun.identity() with self.assertRaises(ValueError): x.restrict([-2,0]) with self.assertRaises(ValueError): x.restrict([0,2]) @pytest.mark.parametrize("ufunc", tools.ufunc_list, ids=tools.name_func) def test_init(ufunc): xx = Chebfun.from_function(lambda x: x,[0.25,0.75]) ff = ufunc(xx) assert isinstance(ff, Chebfun) result = ff.values() expected = ufunc(ff._ui_to_ab(ff.p.xi)) npt.assert_allclose(result, expected) #------------------------------------------------------------------------------ # Test the restrict operator #------------------------------------------------------------------------------ from . import data @pytest.mark.parametrize('ff', [Chebfun.from_function(tools.f,[-3,4])]) @pytest.mark.parametrize('domain', data.IntervalTestData.domains) def test_restrict(ff, domain): ff_ = ff.restrict(domain) xx = tools.map_ui_ab(tools.xs, domain[0],domain[1]) tools.assert_close(tools.f, ff_, xx) #------------------------------------------------------------------------------ # Add the arbitrary interval tests #------------------------------------------------------------------------------ @pytest.fixture(params=list(range(5))) def tdata(request): index = request.param class TData(): pass tdata = TData() tdata.function = data.IntervalTestData.functions[0] tdata.function_d = data.IntervalTestData.first_derivs[0] tdata.domain = data.IntervalTestData.domains[index] tdata.roots = data.IntervalTestData.roots[0][index] tdata.integral = data.IntervalTestData.integrals[0][index] tdata.chebfun = Chebfun.from_function(tdata.function, tdata.domain) return tdata class TestArbitraryIntervals(object): """Test the various operations for Chebfun on arbitrary intervals""" def test_evaluation(self, tdata): xx = tools.map_ui_ab(tools.xs, tdata.domain[0], tdata.domain[1]) tools.assert_close(tdata.chebfun, tdata.function, xx) def test_domain(self, tdata): assert tdata.chebfun._domain[0] == tdata.domain[0] assert tdata.chebfun._domain[1] == tdata.domain[1] def test_first_deriv(self, tdata): xx = tools.map_ui_ab(tools.xs, tdata.domain[0], tdata.domain[1]) tools.assert_close(tdata.chebfun.differentiate(), tdata.function_d, xx) def test_definite_integral(self, tdata): actual = tdata.integral npt.assert_allclose(tdata.chebfun.sum(), actual, rtol=1e-12) def test_roots(self, tdata): actual = tdata.roots npt.assert_allclose(np.sort(tdata.chebfun.roots()), actual, rtol=1e-12)
python
Mahima Makwana desire a deeper connection and emotional bonding with Mahima Makwana's family, exploring the ideas Mahima Makwana have learned from Mahima Makwana's parents. Harmony in family life is assured. Having high personal values, and being very idealistic, are just some of the reasons why Mahima Makwana attract so many gifts and blessing from others. So much of Mahima Makwana's energy will be giving more to Mahima Makwana's personal relationships and partnerships. The changes Mahima Makwana experience in Mahima Makwana's life will be deeply felt and lasting. Mahima Makwana will come into contact with higher officials and authorities. Mahima Makwana's fame and reputation will be on an increase. Mahima Makwana may trade Mahima Makwana's vehicle for a better one or for the profit. Some restlessness is likely, mainly because of a deep feeling of wanderlust. Mahima Makwana don't like to get backed into a corner, so this can cause some strain. The period will begin with a phase of volatility and pressure in career. New project and risks should be avoided. Mahima Makwana need to curb new investments and commitment. There are chances of gain but swings in work environment which will not be entirely comfortable. This period is not good as far as worldly comforts are concerned, religious and spiritual deeds can get Mahima Makwana out of troubles. Mahima Makwana may face sorrow through Mahima Makwana's relatives. Sudden accidents and losses are also possible. This is a period of mixed results for Mahima Makwana. Mahima Makwana will put Mahima Makwana's best in professional field. Mahima Makwana's fixity of purpose will remain intact and Mahima Makwana will not abandon work once undertaken or lose determination. There is danger of developing egoistic temperament in Mahima Makwana's personality. This attitude of yours can lead Mahima Makwana towards unpopularity. Try to be more flexible and gentle while dealing with people. Mahima Makwana will support Mahima Makwana's brothers and sisters. There will be problems to Mahima Makwana's relatives. Mahima Makwana should work on keeping a stable and steady nature for better results. There will be dynamism & growth. Mahima Makwana will share good rapport with Mahima Makwana's colleagues and seniors. Income sources are very fine for Mahima Makwana and Mahima Makwana will enjoy Mahima Makwana's family life. Spiritually, Mahima Makwana will be very sound. If Mahima Makwana are looking for promotion Mahima Makwana will definitely going to get it. Mahima Makwana's friend circle will also increase. Sudden travel will also bring good luck for Mahima Makwana. Mahima Makwana will donate for charitable deeds and will prosper during this period. What will you get in 250+ pages Colored Brihat Horoscope. Are money matters a reason for the dark-circles under your eyes? Is there any question or problem lingering. Worried about your career? don't know what is. AstroSage Yearbook is a channel to fulfill your dreams and destiny. The CogniAstro Career Counselling Report is the most comprehensive report available on this topic. Buy Genuine Gemstones at Best Prices. Energised Yantras for You. Original Rudraksha to Bless Your Way. Bring Good Luck to your Place with Feng Shui. Praise the Lord with Divine Energies of Mala. Jadi (Tree Roots) Keep Your Place Holy with Jadi.
english
The Carolina Panthers will play the New Orleans Saints on Sunday (September 25) in NFL action. This will be New Orleans' third NFC South opponent, having split their games against the Atlanta Falcons and Tampa Bay Buccaneers. Last week, they were bested by the Bucs 20-10 in a game where they committed five turnovers. Meanwhile, the Panthers have played two non-division opponents so far, losing both matchups. Last Sunday, they were beaten by the Giants 19-16 in a back-and-forth contest. Last year, these two NFC South foes split their season series, with both games going well under the game total. The Panthers will return home this week and will look to pick up their first win in a long time. They're on a nine-game losing streak dating back to last season. Quarterback Baker Mayfield hasn't been that great so far with his new team entering Sunday, completing just 53. 6% of his passes for 8. 6 yards per attempt. Star running back Christian McCaffrey did have a solid Week 2 performance after a quiet opener, which is a good sign going forward. The Stanford alum recorded 102 yards on only 15 attempts but didn't score. Nevertheless, if he can rack up similar stats this week, Carolina will gladly take that. Saints QB Jameis Winston had a rough game last week, tossing three picks. Winston is a solid QB, but his undoing has always been his interceptions. A couple years ago in Tampa Bay, Winston threw a league-leading 30 interceptions. Since then he hasn't played a full season, but New Orleans will roll with him under center if he's upgraded from questionable to available ahead of Sunday's matchup. Pro-bowl running back Alvin Kamara is also listed as questionable with a ribs injury, so if one or both are ruled out, the Saints could struggle to put points on the board. Both teams had the under hit in their respective games last week. Following the Saints' last four losses, the total has gone under all four times. This is the best bet today, especially with several key players in New Orleans' injury report.
english
<reponame>jwflory/publicgoods-candidates { "name": "VRapeutic", "aliases": [ "" ], "description": "VRapeutic develops virtual reality software modules specially tailored to instill cognitive, social, academic, and motor skills in children and young adults. Our ever-growing library of modules empowers therapists with unlimited virtual rehabilitation scenarios, in addition to providing them cutting-edge technologies to track children’s performance and design data-driven rehabilitation plans. VRapeutic's vision is to develop the largest science-backed VR curricula for essential life skills worldwide.", "website": "https://myvrapeutic.com/", "license": [ { "spdx": "GPL-3.0", "licenseURL": "https://github.com/vrapeutic/Rodja-webXR/blob/main/LICENSE" }, { "spdx": "CC-BY-NC-SA-4.0", "licenseURL": "https://github.com/vrapeutic/Ellie-Tale#readme" } ], "SDGs": [ { "SDGNumber": 3, "evidenceText": "The solutions provided by VRapeutic aim at realizing effective and science-backed that address diverse neuro-developmental challenges, which is envisaged to empower children and young adults to lead a healthy life.", "evidenceURL": "https://www.unicef.org/innovation/innovation-fund-vrapeutic" }, { "SDGNumber": 4, "evidenceText": "As much as it addresses well being, VRapeutic also addresses the quality of education delivered to children and young adults on the different spectra of learning difficulties. By realizing cutting-edge, tech-enabled solutions that empower learners with engaging learning environments, we help achieve a quality of education that wouldn't have been possible otherwise.", "evidenceURL": "https://www.unicef.org/innovation/innovation-fund-vrapeutic" }, { "SDGNumber": 10, "evidenceText": "Building on our contribution to SDG 4, we believe in the considerable role of quality education and healthcare to the equality of access to opportunities. The better the healthcare, early intervention, and education for atypical children and young adults, the bigger the gap we are able to fill, for example, in job opportunities." } ], "sectors": [ "Health", "Education" ], "type": [ "software", "content" ], "repositories": [ { "name": "main", "url": "https://github.com/vrapeutic/Rodja-webXR" } ], "organizations": [ { "name": "VRapeutic, Inc", "website": "https://myvrapeutic.com/", "org_type": "owner", "contact_name": "<NAME>", "contact_email": "<EMAIL>" }, { "name": "UNICEF Ventures Fund", "website": "https://unicefinnovationfund.org/", "org_type": "funder" } ], "stage": "DPG" }
json
Wish you all a very happy Ganesh Chaturthi. We all love our dear Ganesha a lot and whenever Bappa comes, he brings a smile on the face of all his devotees. Being a true devotee, it's our duty to make Bappa also smile and feel him proud. He definitely gets happy to see all the devotion and celebration but he will be truly elated if we could follow his teachings, comprehend their real meaning, and try to become like our ideal Ganesha instead of just worshipping his idol. There are many stories we have heard about Lord Ganesha and every story teaches us salient lessons of life. Today, I would like to share some of them and pray that Lord Ganesha bestows us with wisdom to understand the true essence of these stories and his attributes. We all must have heard the story about Lord Ganesha's birth. Mata Parvati asked her son Ganesha to guard and not allow anyone to enter. But Shivji, unaware of the fact that Ganesha had been created by Parvatiji, in the wrath of his anger and fury, beheaded him when Ganesha tried to stop him. But after realizing his mistake, he brought back his life and accepted him as his own son. This story taught us three important things - to be loyal to your loved ones, anger will cause only harm to you and your family, and lastly, accept your mistakes and try to rectify it. Another story which is very famous and always is told for Bappa's intelligence is when Ganeshji and his younger brother Karthikeyaji had been asked to circumvent their world 3 times by Shivji to settle down a dispute between them, then Ganeshji decided to take 3 rounds around his parents and said that they are his universe. What we learned from this story is that sometimes a difficult task can be handled smartly with wisdom and presence of mind so we should not give up. Another important lesson is to always love and respect your parents. They make you their world so why not make them yours. We all are aware that Shivji announced that before starting any new endeavor, it would be auspicious to worship Ganpatiji and take his blessings. And we follow it along, be it a personal, social, or any kind of function or beginning of any new work. It is believed that Ganpatiji makes sure that our work gets completed without any obstacles. This gives us another important learning that when someone gives us any responsibility keeping trust on us, consider it as your own and try to complete it by giving your 100%. We call Lord Ganesha as "Vighnaharta" and pray to him to take away all our worries and problems. Similarly, we should also try to be other's Vighnaharta by not creating problems for anyone and try to help someone in difficulty and free them from their worries. Lord Ganesha's long ears signify that we should listen more, small-mouth denotes to speak less, and big belly symbolizes to digest anything, be it good or bad. There is so much to learn from Bappa and just by following his teachings and attributes can certainly make our lives happy and peaceful. If we could try to absorb even a little bit out of it, that would be the real worship of Ganpati Bappa.
english
{"id_1255":{"title":"History of England, from the Accession of James II - (Volume 3, Chapter 12)","language":"English","totaltime":"4:04:48","url_librivox":"http://librivox.org/history-of-england-chapter-12-thomas-macaulay/","url_iarchive":"http://www.archive.org/details/histofengch12","readers":["1065","1121","1401","1535","1536","1636","167","19"],"authors":"802","genres":"*Non-fiction"}}
json
NewZNew (Chandigarh) : Bihar’s CM Shri Jitan Ram Manjhi inaugurated the Additional Primary Health Centre located at Mehkar, Distt. Gaya at the event held at Mehkar, Gaya District yesterday. This primary Health centre has been built by ACME in a short span of just 3 months using the novel Prefabrication technology. This technology will help the state to not only to strengthen its infrastructure facilities but also help to showcase its efforts of bringing down the carbon-footprint and adoption of environmental-friendly technologies for nation building. This Mehkar APHC will serve as a model infrastructure to the country that is earnestly looking forward to give strong impetus on development of its much-needed rural infrastructure as well as cut down its carbon footprint. The state of Bihar aims to develop 7,138 new health sub-centres and 1,483 additional primary health centers using the prefabricated technology, EOI for which was issued by BMSICL under the Department of Health, Govt. of Bihar. ACME is enthusiastic to take up more projects on construction of healthcare facilities and related infrastructure/buildings in the State which are already in pipeline and for which the Corporation is working through tendering. The highlight of this APHC is that it has been erected using the prefabrication technology that is green and viable solution that helps save money in terms of construction cost and time taken in all terrain and weather conditions. Prefabrication technology is the ideal technology for construction and the need of the hour.
english
<reponame>Hegdahl/inf101v2022 import com.github.hegdahl.inf101v2022.Game; import com.github.hegdahl.inf101v2022.ScreenBuffer; import com.googlecode.lanterna.input.KeyStroke; import com.googlecode.lanterna.input.KeyType; import java.util.function.Supplier; /** * Tic Tac Toe, * also known as three in a row. * * <p>A game for two players about * filling complete row or column * or diagonal with their own tokens. */ public class TicTacToe extends Game { @Override public int minPlayers() { return 2; } @Override public int maxPlayers() { return 2; } class Model implements Game.Model { enum PlayerTag { X, O, NONE } PlayerTag[][] board; Model(int numberOfPlayers) { assert numberOfPlayers == 2; board = new PlayerTag[3][3]; for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { board[i][j] = PlayerTag.NONE; } } } private boolean checkWon(PlayerTag player) { outer: for (int row = 0; row < 3; ++row) { for (int col = 0; col < 3; ++col) { if (board[row][col] != player) { continue outer; } } return true; } outer: for (int col = 0; col < 3; ++col) { for (int row = 0; row < 3; ++row) { if (board[row][col] != player) { continue outer; } } return true; } boolean diag = true; for (int i = 0; i < 3; ++i) { diag &= board[i][i] == player; } if (diag) { return true; } diag = true; for (int i = 0; i < 3; ++i) { diag &= board[i][3 - i - 1] == player; } if (diag) { return true; } return false; } private PlayerTag winner() { boolean playerXWon = checkWon(PlayerTag.X); boolean playerOWon = checkWon(PlayerTag.O); if (playerXWon && playerOWon) { throw new IllegalStateException("Both players completed 3 in a row."); } if (playerXWon) { return PlayerTag.X; } if (playerOWon) { return PlayerTag.O; } return PlayerTag.NONE; } boolean myTurn(int userIndex) { if (winner() != PlayerTag.NONE) { return false; } int emptyCount = 0; for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { if (board[i][j] == PlayerTag.NONE) { emptyCount += 1; } } } if (emptyCount == 0) { return false; } return (3 * 3 - emptyCount) % 2 == userIndex; } public boolean attemptTurn(int userIndex, int row, int column) { if (!myTurn(userIndex)) { return false; } if (board[row][column] != PlayerTag.NONE) { return false; } board[row][column] = PlayerTag.values()[userIndex]; return true; } } class View extends Game.View { private Model model; View(Model model, int userIndex) { super(userIndex); this.model = model; } @Override public void paint(ScreenBuffer canvas) { canvas.clearAndResize(10, 15); Model.PlayerTag winner = model.winner(); ScreenBuffer.Color white = new ScreenBuffer.Color(255, 255, 255); ScreenBuffer.Color black = new ScreenBuffer.Color(0, 0, 0); ScreenBuffer.Color red = new ScreenBuffer.Color(255, 50, 50); ScreenBuffer.Color green = new ScreenBuffer.Color(50, 255, 50); ScreenBuffer.Color blue = new ScreenBuffer.Color(50, 50, 255); if (winner == Model.PlayerTag.NONE) { if (model.myTurn(userIndex)) { canvas.write(0, 0, " Your turn ", white, black); } else if (model.myTurn(userIndex ^ 1)) { canvas.write(0, 0, "Opponent's turn", black, white); } else { canvas.write(0, 0, " DRAW ", black, white); } } else { if (winner.ordinal() == userIndex) { canvas.write(0, 0, " YOU WON! ", black, green); } else { canvas.write(0, 0, " YOU LOST! ", black, red); } } for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { int cellIndex = j + 9 - 2 - 3 * i; canvas.write(i * 3 + 1, 5 * j, "┏━━━┓", white, black); canvas.write(i * 3 + 2, 5 * j, "┃ " + cellIndex + " ┃", white, black); canvas.write(i * 3 + 3, 5 * j, "┗━━━┛", white, black); switch (model.board[i][j]) { case X: canvas.write(i * 3 + 2, 5 * j + 2, "X", red, black); break; case O: canvas.write(i * 3 + 2, 5 * j + 2, "O", blue, black); break; default: break; } } } } } class Controller extends Game.Controller { private Model model; private class AttemptTurn implements Supplier<Boolean> { int row; int column; AttemptTurn(int row, int column) { this.row = row; this.column = column; } @Override public Boolean get() { return model.attemptTurn(userIndex, row, column); } } Controller(Model model, int userIndex) { super(userIndex); this.model = model; registerKeybind(KeyStroke.fromString("7"), new AttemptTurn(0, 0)); registerKeybind(KeyStroke.fromString("8"), new AttemptTurn(0, 1)); registerKeybind(KeyStroke.fromString("9"), new AttemptTurn(0, 2)); registerKeybind(KeyStroke.fromString("4"), new AttemptTurn(1, 0)); registerKeybind(KeyStroke.fromString("5"), new AttemptTurn(1, 1)); registerKeybind(KeyStroke.fromString("6"), new AttemptTurn(1, 2)); registerKeybind(KeyStroke.fromString("1"), new AttemptTurn(2, 0)); registerKeybind(KeyStroke.fromString("2"), new AttemptTurn(2, 1)); registerKeybind(KeyStroke.fromString("3"), new AttemptTurn(2, 2)); } } @Override protected Game.Model makeModel(int numberOfPlayers) { return new Model(numberOfPlayers); } /** * Wrapper for the View constructor. * The cast is safe because the given * model is guaranteed to be made from `makeModel`. * * @param model Model created by `makeModel`. * @param userIndex Which user will use the created view. */ @Override protected Game.View makeView(Game.Model model, int userIndex) { return new View(Model.class.cast(model), userIndex); } /** * Wrapper for the Controller constructor. * The cast is safe because the given * model is guaranteed to be made from `makeModel`. * * @param model Model created by `makeModel`. * @param userIndex Which user will use the created controller. */ @Override protected Game.Controller makeController(Game.Model model, int userIndex) { return new Controller(Model.class.cast(model), userIndex); } }
java
Digital entertainment and technology company JetSynthesys said it has acquired Chennai-based Skyesports, one of India’s largest e-sports organisations with a grassroots play. The firm has created a new entity called Jet Skyesports Gaming Pvt Ltd with a vision to build e-sports at the grassroot level in India ahead of the Asian Games 2022, which will include e-sports as a medal event for the first time in the history of all such tournaments. The company did not provide a deal size for the transaction. TO READ THE FULL STORY, SUBSCRIBE NOW NOW AT JUST RS 249 A MONTH. What you get on Business Standard Premium? - Unlock 30+ premium stories daily hand-picked by our editors, across devices on browser and app. - Pick your 5 favourite companies, get a daily email with all news updates on them. - Full access to our intuitive epaper - clip, save, share articles from any device; newspaper archives from 2006. - Preferential invites to Business Standard events. - Curated newsletters on markets, personal finance, policy & politics, start-ups, technology, and more.
english
The curiosity surrounding Jigyasa finally came to an end yesterday. The film premiered at Cinemax cinema Andheri yesterday. Most of the cast of the film was present at the venue. The film revolves around a north Indian small town girl who comes to Mumbai with an aspiration to become a superstar. The story is woven around a couple of characters that resemble some real life personalities. For instance the character Aruna Kapoor is a character that resembles TV queen Ekta Kapoor. The story is about the real hardships a girl has to go through when she aspires to become a film star. The film has Hrishita Bhatt in the lead. She has been missing in action for a long time. This is her first release in the last 6 months or so. The entire team hopes the film becomes a box office success. Faisal Saif has directed the film. This is his first Hindi commercial film, though he has made an English film of a small budget before this. The other cast includes Varsha Usgaokar, Milind Gunaji, Rakesh Bedi, Kader Khan, Naseer Abdullah and some new faces too. Follow us on Google News and stay updated with the latest!
english
NTA has released the UGC NET December Session 2022 subject wise exam schedule today, February 11, 2023. Candidates who have registered for the UGC NET 2023 exam can now check the detailed datesheet for their exams on the official website – ugcnet. nta. nic. in. Details shared below. National Testing Agency, NTA has released the UGC NET December Session 2022 subject wise exam schedule today, February 11, 2023. Candidates who have registered for the UGC NET 2023 exam can now check the detailed datesheet for their exams on the official website – ugcnet. nta. nic. in. As per the notice released, the UGC NET 2023 exam schedule has been released for the exams on February 21, 22, 23 and 24, 2023. NTA has further stated that the details regarding the release of the UGC NET 2023 Exam city slip would be released soon on the official website. As per the exam calendar, the UGC NET Exam city slip is scheduled for release in the 1st week of February. The UGC NET Admit Card would be released for candidate in the 2nd week of February. The detailed exam schedule for other dates and subjects would be issued by NTA and UGC in due course of time. Keep a check here for the latest updates. Breaking News | Speeding Car Rams Into Morning Walkers In Hyderabad; Kills 2 Women & Child | Watch!
english
Here are 4 signs of the zodiac that lack logic. People are unreasonable and lack logical thinking because they place a high priority on their emotions compared to all other things in life. It makes people highly value their viewpoint over reality only because their opinions are influenced by their feelings. Anyone can benefit from having the ability to reason rationally in order to organize their emotions and produce favourable results. However, some people become skewed because they place a far higher importance on their belief than the reality. They are therefore unreasonable because being biased entails ignoring reason and evidence in order to accept whatever you wish to assume. Here are four zodiac signs that lack logic and consistently prioritize their emotions above truth. Aries lack patience and self-control due to their anger problems, intolerance, and impetuous nature, which frequently puts them in difficult situations where they can't think clearly. Aries' restlessness frequently interferes with their ability to make rational decisions. These people are more self-centered and don't take things too seriously. Since Taurus is one of the most sensitive signs, they cannot be more realistic in their approach to life. When feeling emotional, a Taurus has a tendency to avoid reality and needs time to completely accept their emotions. They are unable to move past the hurt, which causes them to make poor decisions in life by placing their emotions above reality. Of all the zodiac signs, the Cancer sign is considered to be the most emotional. Although it is impossible to tell if they are really affected. When they are hurt, they tend to isolate themselves and scream out in private rather than confronting a matter clearly and constructively. Most of the time, they prioritize their emotions over logic and truth, which results in them taking things emotionally or misreading other people's behaviours. Even when they are on the incorrect track, Leo seeks to show their own righteousness. This zodiac sign's members frequently bounce between being significant and being ridiculous. A typical Leo defies logic in the majority of his life decisions because he dislikes it when something that belongs to him is noticed by someone else, even if it harms him. The aforesaid zodiacs will struggle with practicality and lack awareness; as a result, learning how to play cleverly will be of utmost importance to them.
english
- Kids Nutrition (2-15 Yrs) Atorvastatin+Fenofibrate is used in the treatment of high cholesterol and Heart attack. Side Effects of Atornip F are Nausea, Stomach pain, Constipation, Flatulence, Headache, Muscle pain, Increased liver enzymes, Increased glucose level in blood. Atorvastatin + Fenofibrate is a combination of two lipid-lowering medicines: Atorvastatin and fenofibrate. Atorvastatin prevents your body from making "bad" cholesterol (LDL), while fenofibrate works by lowering the levels of triglycerides in your blood. Both raise the levels of “good” cholesterol (HDL). Q. Can Atornip F 10mg/160mg Tablet cause liver damage? Atornip F 10mg/160mg Tablet contains Atorvastatin and Fenofibrate. A very rare (1 in 10000 patient) side effect of this medicine is liver damage. Use of this medicine should be avoided in patients with underlying liver disease. Contact your doctor immediately if you notice any early signs and symptoms of liver damage. These symptoms may include fever, rash, loss of appetite, nausea, vomiting, fatigue, stomach pain, dark urine, yellow skin or eyes, or abnormal liver enzymes. Q. Can Atornip F 10mg/160mg Tablet cause muscle pain? Yes, Atornip F 10mg/160mg Tablet can cause muscle pain by injuring the muscles. Talk to your doctor as soon as possible if you experience muscle pain, weakness or muscle cramps. It can be a sign of any muscle injury caused due to Atornip F 10mg/160mg Tablet. Q. What lifestyle changes should be adopted while taking Atornip F 10mg/160mg Tablet? Making lifestyle changes can boost your health while taking Atornip F 10mg/160mg Tablet. Stop smoking, as smoking increases your risk of having a heart attack and stroke. If you are overweight or obese, try to lose weight. You should maintain a healthy diet by including fruits and vegetables in your meals. Regular exercise can make your heart strong and decrease your risk of heart attack. Q. What medicines should I avoid while taking Atornip F 10mg/160mg Tablet? The use of Atornip F 10mg/160mg Tablet along with certain medicines can cause serious problems. Consult your doctor before taking any prescription or non-prescription medicine along with Atornip F 10mg/160mg Tablet.
english
MG Motor India has today announced the Car-as-a-Platform (CAAP) subscription model for its recently launched SUV, Astor. The SUV will feature on-demand in-car services and subscriptions in the areas of utility, entertainment, security, consumer payment, and more in near future. MG has partnered with Jio for embedded sim and technology to provide high-speed in-car connectivity. Jio’s eSIM and IoT solutions will enable MG users to access real-time connectivity, infotainment, and telematics. Customers can enjoy the music streaming service JioSaavn, which gives access to 60 million Bollywood, English, Hindi, and Indian regional tracks on the go, including podcasts. Customers will get a free 4GB monthly internet pack in the SUV, which can be further customized up to 9 GB and 14GB at an additional cost. Additionally, MG has partnered with Park+ to bolster the driving experience for MG Astor. With this association, users will leverage its tech-backed value proposition to pre-book and pre-pay for parking slots before reaching their destinations. The in-car feature is available in three cities – NCR, Mumbai, and Bangalore and will expand to nine cities in near future. To enable a more value-added experience for the customers, MG has partnered with KoineArth to create India’s first-of-its-kind vehicle digital passport. Secured by blockchain, KoineArth ensures data privacy and facilitates customers sharing their digital passports with third parties like insurance partners or used car portals. This could benefit customers in getting higher resale value and a better insurance premium based on their driving behaviour and service adherence. As an inaugural offer, the digital passport can be availed for ₹1000 for the first year. Rajeev Chaba, President and MD, MG Motor India, said, “Staying ahead of the innovation curve in the automobile industry in India, MG continues to introduce industry-first features in the Auto-tech segment with Car-as-a-Platform. We announced the CAAP vision in August and now we are incorporating the subscription-based model in Astor. Our constant endeavour is to evolve CAAP for providing innovative services in line with fast changing requirements of new age consumers by collaborating with more ecosystem partners." Unlock a world of Benefits! From insightful newsletters to real-time stock tracking, breaking news and a personalized newsfeed – it's all here, just a click away! Login Now!
english
While cricket may be a team sport, there are a lot of individual battles within every game that goes on to decide the fate of both teams. It’s obvious that the team which makes the least mistakes has a better chance of winning. There’s a firm opinion that goes around in cricket, which says in order to win games, teams should ideally bat well. However, in truth, it’s the bowlers that make or break a team’s fortune. While batsmen continue to reign supreme in cricket, more so in the limited-overs formats, history speaks for itself, every ‘great’ cricket team of the past, have had bowlers contributing to the cause. Take Australia’s triumph at the World Cup 2015 for example, when Mitchell Stark picked up 22 wickets en route to his country’s title run. And even though every dismissal is important for a team, ask any bowler, when they bowl out a batsman by taking his stumps, there’s no better confidence boost for them. It’s a totally different kind of accomplishment than an lbw or even a stumping. With that said, today we will take a look at some lethal bowlers in international cricket, who have the highest percentage of ‘bowled’ wickets to their name in ODIs. This list includes only those bowlers who have taken a minimum of 100 wickets. The Pakistan cricket team has produced many great bowlers over the years, Wasim Akram belongs at the top of that list. In his prime, the ‘Sultan of Swing’ was unplayable at times. Akram played 356 ODI matches for Pakistan and amassed a haul of 502 wickets during his playing career, with an average of 23.52 and an astonishing economy rate of 3.89. Of these, a staggering 176 times, he bowled out the opposition batsman, which means the 53-year-old has a percentage of 35.06%. Therefore, Akram stands at number four on despite having the highest number of wickets among all bowlers on this list.
english
[{"ligne":[{"nomCommercial":"36","libCommercial":"LAMAR","mnemo":"36","couleur":"#ff0000","itineraire":[],"messageIVExiste":null,"idLigne":56239}],"message":"Route 36 Disabled","libelleCE":"MATA","importanceMessage":"Normal"},{"ligne":[{"nomCommercial":"69","libCommercial":"WINCHESTER","mnemo":"69","couleur":"#ff0000","itineraire":[],"messageIVExiste":null,"idLigne":56220}],"message":"Route 69 Disabled","libelleCE":"MATA","importanceMessage":"Normal"},{"ligne":[{"nomCommercial":"30","libCommercial":"BROOKS","mnemo":"30","couleur":"#4080ff","itineraire":[],"messageIVExiste":null,"idLigne":56222}],"message":"Route 30 In Service Service Airways Transit Center","libelleCE":"MATA","importanceMessage":"Normal"}]
json
President Droupadi Murmu pays tribute at Raj Ghat in Delhi on Mahatma Gandhi's death anniversary. (Image Credit: ANI | Twitter) President Murmu is also attending Sarva Dharma Prarthana Sabha at Rajghat on Martyrs’ Day (Image Credit: ANI | Twitter) Vice President Jagdeep Dhankhar pays floral tribute at Raj Ghat in Delhi to mark the occasion of Mahatma Gandhi's death anniversary. (Image Credit: ANI | Twitter) The Vice President remembered Mahatma Gandhi and martyrs of the country. (Image Credit: ANI | Twitter) Prime Minister Narendra Modi pays tribute at Raj Ghat in Delhi on Mahatma Gandhi's death anniversary. (Image Credit: ANI | Twitter) Remembering 'Father of the Nation', PM Modi said in a tweet, "I bow to Bapu on his Punya Tithi and recall his profound thoughts. " (Image Credit: ANI | Twitter) PM Modi also remembered the martyrs of the country and said, "I also pay homage to all those who have been martyred in the service of our nation. Their sacrifices will never be forgotten and will keep strengthening our resolve to work for a developed India. " (Image Credit: ANI | Twitter) Defence Minister Rajnath Singh pays tribute at Raj Ghat in Delhi on Mahatma Gandhi's death anniversary. (Image Credit: ANI | Twitter) Rajnath Singh said, "I bow down to respected Bapu on his death anniversary and pay my humble tribute. The path shown by him for world peace and India's progress is very relevant even today. Due to his inspiration, the construction of a new and self-reliant India is progressing today. " (Image Credit: ANI | Twitter) Mahatma Gandhi Death Anniversary: Lok Sabha Speaker Om Birla pays respect at Raj Ghat in Delhi. Om Birla also took to Twitter to remember Bapu. He said, "Bapu's thoughts strengthened the spirit of Sarvodaya. The welfare of all was inherent in his philosophy, which gave a new direction to humanism at the global level. " (Image Credit: ANI | Twitter) Mahatma Gandhi Death Anniversary:Delhi Lieutenant Governor Vinay Kumar Saxena pay floral tribute at Raj Ghat. The LG said in a tweet, "Following Gandhi's principles of truth and non-violence is our true tribute to him. His eternal thoughts will always continue to inspire the new generation. " (Image Credit: ANI | Twitter)
english
#tbl_list-users .mt-4 { margin: 0!important; } #tbl_list-users { text-align: center; } #tbl_list-users td { padding: .2rem; }
css
#!/usr/bin/env python3 import argparse from pathlib import Path module_info = { # Name of the module (should be the same as the filename) 'name': 'lightsail__download_ssh_keys', # Name and any other notes about the author 'author': '<NAME> of Rhino Security Labs', # Category of the module. Make sure the name matches an existing category. 'category': 'EXPLOIT', # One liner description of the module functionality. This shows up when a user searches for modules. 'one_liner': 'Downloads Lightsails default SSH key pairs.', # Description about what the module does and how it works 'description': 'This module downloads the accounts default public and private SSH keys for AWS Lightsail.', # A list of AWS services that the module utilizes during its execution 'services': ['Lightsail'], # For prerequisite modules, try and see if any existing modules return the data that is required for your module before writing that code yourself, that way, session data can stay separated and modular. 'prerequisite_modules': [], # Module arguments to autocomplete when the user hits tab 'arguments_to_autocomplete': [], } parser = argparse.ArgumentParser(add_help=False, description=module_info['description']) def main(args, pacu_main): ###### Don't modify these. They can be removed if you are not using the function. session = pacu_main.get_active_session() args = parser.parse_args(args) print = pacu_main.print get_regions = pacu_main.get_regions ###### summary_data = {'region_key_pairs': []} regions = get_regions('lightsail') dl_path = Path.cwd() / 'sessions' / session.name / 'downloads' / 'download_lightsail_ssh_keys' if not dl_path.exists(): dl_path.mkdir() summary_data['dl_path'] = str(dl_path.relative_to(Path.cwd() / 'sessions' / session.name)) for region in regions: print(' Downloading default keys for {}...'.format(region)) cur_path = dl_path / region if not cur_path.exists(): cur_path.mkdir() client = pacu_main.get_boto3_client('lightsail', region) downloaded_keys = client.download_default_key_pair() restructured_keys = { 'publicKey': downloaded_keys['publicKeyBase64'], 'privateKey': downloaded_keys['privateKeyBase64'] } private_path = cur_path / 'default' with private_path.open('w', encoding='utf-8') as key_file: key_file.write(restructured_keys['privateKey']) public_path = cur_path / 'default.pub' with public_path.open('w', encoding='utf-8') as key_file: key_file.write(restructured_keys['publicKey']) summary_data['region_key_pairs'].append(region) print('\n{} completed.\n'.format(module_info['name'])) return summary_data def summary(data, pacu_main): out = ' Keys downloaded to:\n' out += ' ' + data['dl_path'] + '\n' out += ' Downloaded Key Pairs for the following regions: \n' for region in sorted(data['region_key_pairs']): out += ' {}\n'.format(region) return out
python
extern crate serde; extern crate serde_derive; extern crate serde_json; use self::serde_derive::{Deserialize, Serialize}; use std::collections::HashMap; use std::convert::From; /// Request struct corresponding to the [Alexa spec](https://developer.amazon.com/docs/custom-skills/request-and-response-json-reference.html#request-body-parameters) #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Request { pub version: String, pub session: Option<Session>, #[serde(rename = "request")] pub body: ReqBody, pub context: Context, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Session { pub new: bool, #[serde(rename = "sessionId")] pub session_id: String, pub attributes: Option<HashMap<String, String>>, pub application: Application, pub user: User, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Application { #[serde(rename = "applicationId")] pub application_id: String, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct User { #[serde(rename = "userId")] pub user_id: String, #[serde(rename = "accessToken")] pub access_token: Option<String>, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Device { #[serde(rename = "deviceId")] pub device_id: String, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct ReqBody { #[serde(rename = "type")] pub reqtype: String, #[serde(rename = "requestId")] pub request_id: String, pub timestamp: String, pub locale: String, pub intent: Option<Intent>, pub reason: Option<String>, #[serde(rename = "dialogState")] pub dialog_state: Option<String>, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Context { #[serde(rename = "System")] pub system: System, #[serde(rename = "AudioPlayer")] pub audio_player: Option<AudioPlayer>, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct System { #[serde(rename = "apiAccessToken")] pub api_access_token: Option<String>, pub device: Option<Device>, pub application: Option<Application>, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct AudioPlayer { pub token: Option<String>, #[serde(rename = "offsetInMilliseconds")] pub offset_in_milliseconds: Option<u64>, #[serde(rename = "playerActivity")] pub player_activity: Option<String>, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Intent { pub name: String, #[serde(rename = "confirmationStatus")] pub confirmation_status: Option<String>, pub slots: Option<HashMap<String, Slot>>, } impl Intent { fn get_slot(&self, name: &str) -> Option<&Slot> { self.slots.as_ref()?.get(name) } } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Slot { pub name: String, pub value: String, #[serde(rename = "confirmationStatus")] pub confirmation_status: Option<String>, pub resolutions: Option<Resolution>, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Resolution { #[serde(rename = "resolutionsPerAuthority")] pub resolutions_per_authority: Vec<ResolutionsPerAuthority>, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct ResolutionsPerAuthority { pub authority: String, pub status: Status, pub values: Vec<ValueWrapper>, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Status { pub code: String, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct ValueWrapper { pub value: Value, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Value { pub name: String, pub id: String, } /// Enumeration of Alexa request types /// Not comprehensive, ones not defined are put into the Other `String` value #[derive(Debug, PartialEq)] pub enum ReqType { LaunchRequest, IntentRequest, SessionEndedRequest, CanFulfillIntentRequest, Other(String), } impl<'a> From<&'a str> for ReqType { fn from(s: &'a str) -> ReqType { match s { "LaunchRequest" => ReqType::LaunchRequest, "IntentRequest" => ReqType::IntentRequest, "SessionEndedRequest" => ReqType::SessionEndedRequest, "CanFulfillIntentRequest" => ReqType::CanFulfillIntentRequest, _ => ReqType::Other(s.to_string()), } } } impl From<String> for ReqType { fn from(s: String) -> ReqType { ReqType::from(s.as_str()) } } /// Enumeration of Alexa intent types /// Custom intents will be User enum values discrimiated by the `String` value #[derive(Debug, PartialEq)] pub enum IntentType { None, Help, Cancel, Fallback, LoopOff, LoopOn, NavigateHome, Next, No, Pause, Previous, Repeat, Resume, Select, ShuffleOn, ShuffleOff, StartOver, Stop, Yes, User(String), } /// Alexa standard locales #[derive(Debug, PartialEq)] pub enum Locale { Italian, German, AustralianEnglish, CanadianEnglish, BritishEnglish, IndianEnglish, AmericanEnglish, Japanese, Unknown, } impl Locale { /// returns true for all English speaking locals pub fn is_english(&self) -> bool { match *self { Locale::AmericanEnglish => true, Locale::AustralianEnglish => true, Locale::CanadianEnglish => true, Locale::BritishEnglish => true, Locale::IndianEnglish => true, _ => false, } } } impl<'a> From<&'a str> for Locale { fn from(s: &'a str) -> Locale { match s { "it-IT" => Locale::Italian, "de-DE" => Locale::German, "en-AU" => Locale::AustralianEnglish, "en-CA" => Locale::CanadianEnglish, "en-GB" => Locale::BritishEnglish, "en-IN" => Locale::IndianEnglish, "en-US" => Locale::AmericanEnglish, "ja-JP" => Locale::Japanese, _ => Locale::Unknown, } } } impl From<String> for Locale { fn from(s: String) -> Locale { Locale::from(s.as_str()) } } impl Request { /// Extracts the request type from the request pub fn reqtype(&self) -> ReqType { ReqType::from(&*self.body.reqtype) } /// Extracts the locale from the request pub fn locale(&self) -> Locale { Locale::from(&*self.body.locale) } /// Extracts the intent from the request pub fn intent(&self) -> IntentType { if let Some(ref i) = self.body.intent { match i.name.as_str() { "AMAZON.HelpIntent" => IntentType::Help, "AMAZON.CancelIntent" => IntentType::Cancel, "AMAZON.FallbackIntent" => IntentType::Fallback, "AMAZON.LoopOffIntent" => IntentType::LoopOff, "AMAZON.LoopOnIntent" => IntentType::LoopOn, "AMAZON.NavigateHomeIntent" => IntentType::NavigateHome, "AMAZON.NextIntent" => IntentType::Next, "AMAZON.NoIntent" => IntentType::No, "AMAZON.PauseIntent" => IntentType::Pause, "AMAZON.PreviousIntent" => IntentType::Previous, "AMAZON.RepeatIntent" => IntentType::Repeat, "AMAZON.ResumeIntent" => IntentType::Resume, "AMAZON.SelectIntent" => IntentType::Select, "AMAZON.ShuffleOffIntent" => IntentType::ShuffleOff, "AMAZON.ShuffleOnIntent" => IntentType::ShuffleOn, "AMAZON.StartOverIntent" => IntentType::StartOver, "AMAZON.StopIntent" => IntentType::Stop, "AMAZON.YesIntent" => IntentType::Yes, _ => IntentType::User(i.name.clone()), } } else { IntentType::None } } /// retrieves the string value of named slot from the request, if it exists pub fn slot_value(&self, slot: &str) -> Option<String> { Some( self.body .intent .as_ref()? .get_slot(slot) .as_ref()? .value .clone(), ) } /// retrieves the attribute value with the given key, if it exists pub fn attribute_value(&self, key: &str) -> Option<&String> { self.session.as_ref()?.attributes.as_ref()?.get(key) } /// returns whether or not this is a new request pub fn is_new(&self) -> bool { match &self.session { Some(s) => s.new, None => false, } } } #[cfg(test)] mod tests { use super::*; #[test] fn test_version() { let p: Result<Request, serde_json::Error> = self::serde_json::from_str(default_req()); match p { Ok(req) => assert_eq!(req.version, "1.0"), Err(e) => panic!(e.to_string()), } } #[test] fn test_locale() { let p: Result<Request, serde_json::Error> = self::serde_json::from_str(default_req()); match p { Ok(req) => assert_eq!(req.locale(), Locale::AmericanEnglish), Err(e) => panic!(e.to_string()), } } #[test] fn test_is_english() { let p: Result<Request, serde_json::Error> = self::serde_json::from_str(default_req()); match p { Ok(req) => assert!(req.locale().is_english()), Err(e) => panic!(e.to_string()), } } #[test] fn test_intent() { let p: Result<Request, serde_json::Error> = self::serde_json::from_str(default_req()); match p { Ok(req) => assert_eq!(req.intent(), IntentType::User(String::from("hello"))), Err(e) => panic!(e.to_string()), } } #[test] fn test_slot() { let p: Result<Request, serde_json::Error> = self::serde_json::from_str(req_with_slots()); match p { Ok(req) => assert_eq!(req.slot_value("name"), Some(String::from("bob"))), Err(e) => panic!(e.to_string()), } } #[test] fn test_attribute() { let p: Result<Request, serde_json::Error> = self::serde_json::from_str(default_req()); match p { Ok(req) => { assert!(req.session.is_some()); assert!(req.session.unwrap().attributes.is_some()); } Err(e) => panic!(e.to_string()), } } #[test] fn test_attribute_val() { let p: Result<Request, serde_json::Error> = self::serde_json::from_str(default_req()); match p { Ok(req) => assert_eq!( req.attribute_value("lastSpeech"), Some(&String::from( "Jupiter has the shortest day of all the planets" )) ), Err(e) => panic!(e.to_string()), } } fn default_req() -> &'static str { r#"{ "version": "1.0", "session": { "new": true, "sessionId": "amzn1.echo-api.session.abc123", "application": { "applicationId": "amzn1.ask.skill.myappid" }, "attributes": { "lastSpeech": "Jupiter has the shortest day of all the planets" }, "user": { "userId": "amzn1.ask.account.theuserid" } }, "context": { "System": { "application": { "applicationId": "amzn1.ask.skill.myappid" }, "user": { "userId": "amzn1.ask.account.theuserid" }, "device": { "deviceId": "amzn1.ask.device.superfakedevice", "supportedInterfaces": {} }, "apiEndpoint": "https://api.amazonalexa.com", "apiAccessToken": "5<PASSWORD>" }, "Viewport": { "experiences": [ { "arcMinuteWidth": 246, "arcMinuteHeight": 144, "canRotate": false, "canResize": false } ], "shape": "RECTANGLE", "pixelWidth": 1024, "pixelHeight": 600, "dpi": 160, "currentPixelWidth": 1024, "currentPixelHeight": 600, "touch": [ "SINGLE" ] } }, "request": { "type": "IntentRequest", "requestId": "amzn1.echo-api.request.b8b49fde-4370-423f-bbb0-dc7305b788a0", "timestamp": "2018-12-03T00:33:58Z", "locale": "en-US", "intent": { "name": "hello", "confirmationStatus": "NONE" } } }"# } fn req_with_slots() -> &'static str { r#"{ "version": "1.0", "session": { "new": true, "sessionId": "amzn1.echo-api.session.blahblahblah", "application": { "applicationId": "amzn1.ask.skill.testappliction" }, "user": { "userId": "amzn1.ask.account.longstringuseridentifier" } }, "context": { "Display": {}, "System": { "application": { "applicationId": "amzn1.ask.skill.tehappz" }, "user": { "userId": "amzn1.ask.account.longstringuseridentifier" }, "device": { "deviceId": "amzn1.ask.device.testdevice", "supportedInterfaces": { "Display": { "templateVersion": "1.0", "markupVersion": "1.0" } } }, "apiEndpoint": "https://api.amazonalexa.com", "apiAccessToken": "<PASSWORD>" }, "Viewport": { "experiences": [ { "arcMinuteWidth": 246, "arcMinuteHeight": 144, "canRotate": false, "canResize": false } ], "shape": "RECTANGLE", "pixelWidth": 1024, "pixelHeight": 600, "dpi": 160, "currentPixelWidth": 1024, "currentPixelHeight": 600, "touch": [ "SINGLE" ] } }, "request": { "type": "IntentRequest", "requestId": "amzn1.echo-api.request.id", "timestamp": "2018-12-08T05:37:32Z", "locale": "en-US", "intent": { "name": "hello", "confirmationStatus": "NONE", "slots": { "name": { "name": "name", "value": "bob", "confirmationStatus": "NONE", "source": "USER" } } } } }"# } }
rust
It’s a sad time for anyone who loves Vine’s quirky six-second videos. I know that I’ve spent way too much time staring at a lot of the beautifully-crafted short videos, and now that era is coming to an end. In the three years that it has been around, it created a beautiful mix of comedy gold, brilliant dancing and funny animals. But now, Twitter is killing the social network, and all we can do is reflect. I dove into the deep, dark depths of Vine and hand-picked the 100 best, splitting them up into three categories: Music & Dancing, Weird and Animals. Make sure you don’t need to do anything for the coming hour, and follow along for a look into a piece of the internet that will be sorely missed. Get the most important tech news in your inbox each week.
english
Josh Kelly had three touchdown receptions, Cameron Ward passed for 404 yards and accounted for five scores, and No. 21 Washington State withstood a late rally to upend No. 14 Oregon State 38-35 in the Pac-12 Conference opener for both teams. Washington State quarterback Cameron Ward throws a pass during the first half of an NCAA college football game against Oregon State, Saturday, Sept. 23, 2023, in Pullman, Wash. (AP Photo/Young Kwak)2 of 12Washington State wide receiver Kyle Williams (2) celebrates his touchdown during the first half of an NCAA college football game against Oregon State, Saturday, Sept. 23, 2023, in Pullman, Wash. (AP Photo/Young Kwak)3 of 12From second to left, Washington State University students Carson Braddock, Samantha Ulsund, Baryan Bowles and Guthrie Kuester boo with a “Pac-2" sign as Oregon State players enter the field during warmups before an NCAA college football game against Washington State, Saturday, Sept. 23, 2023, in Pullman, Wash. The two schools are the only ones remaining in the Pac-12 after the 2023-2024 academic year after the other schools in the conference announced plans to leave. (AP Photo/Young Kwak)4 of 12Washington State University student Michael Smith holds a “Pac-2" sign during warmups before an NCAA college football game between Washington State and Oregon State, Saturday, Sept. 23, 2023, in Pullman, Wash.Read more: Oregon State vs. Washington State predictions: Odds, picks, best bets and promos for Sept. 23Check out our predictions for Oregon State vs. Washington State this college football Saturday. Oregon State Beavers vs Washington State Cougars - September 23, 2023View the Oregon State Beavers vs Washington State Cougars football game played on September 23, 2023. Box score, stats, odds, highlights, play-by-play, social & more. Oregon State Beavers vs Washington State Cougars Line MovementCollege Football line and odds movement for Oregon State Beavers vs Washington State Cougars on Sep 23, 2023. Oregon State vs Washington State Stats & Past Results - NCAAF Game on September 23, 2023Oregon State vs Washington State in NCAAF History: Check Past Results And Stats For Insights On The Game - September 23, 2023! Oregon State vs. Washington State prediction: College football odds, picksUSC, Oregon, Washington, and Colorado get the bulk of the national attention, but don’t sleep on Oregon State. Washington State quarterback Cameron Ward throws a pass during the first half of an NCAA college football game against Oregon State, Saturday, Sept. 23, 2023, in Pullman, Wash. (AP Photo/Young Kwak)
english
Tata Harrier is the best ever SUV in India. With all new Tata OMEGA ARC platform. I hope Tata will give Panoramic sunroof on Harrier very soon. Tata Harrier is also a beast. Thnkx Tata for this beautiful Premium SUV. Harrier's music system is unique and stylish with 9 speakers n woofer. - Performance (303) - Interior (374)
english
export * from './bookmark'; export * from './reverse-hike-button';
typescript
<filename>allure-results/ec671d9b-3f31-44c4-8d5b-09cc2de9c8b9-container.json {"uuid":"ec671d9b-3f31-44c4-8d5b-09cc2de9c8b9","name":"Scenario: To delete workforce","children":["b7a97be1-ab38-475e-8d84-3a9bcceb47dd"],"befores":[{"name":"steps.Hooks.runsBeforeAnyScenario()","status":"passed","stage":"finished","steps":[],"attachments":[],"parameters":[],"start":1629366750605,"stop":1629366750606}],"afters":[{"name":"steps.Hooks.runsAfterAnyscenario()","status":"passed","stage":"finished","steps":[],"attachments":[],"parameters":[],"start":1629366765769,"stop":1629366765769}],"links":[],"start":1629366750605,"stop":1629366765775}
json
<gh_stars>1-10 {"AudienceWhatAudience": ["MediumAwareness", "BreakingTheFourthWall", "Cloudcuckoolander", "PlayedForLaughs", "PlayedForDrama", "ScoldingTheFourthWallBreaker", "NoFourthWall", "WhoWouldWantToWatchUs", "CassandraTruth", "TheCuckoolanderWasRight", "ThisIsReality", "StudentCouncilPresident", "OnlySaneMan", "PlayedForLaughs", "FourthWallObserver", "OutOfFocus", "OrdinaryHighSchoolStudent", "GuileHero", "RebelPrince", "OnlySaneMan", "NakedPeopleAreFunny", "HandOrObjectUnderwear", "MediumAwareness", "FlatWhat", "FourthWallPsych", "MindScrew", "FridgeLogic", "PlayedForLaughs", "DamageControl", "MediumAwareness", "ParanoiaFuel", "GoMadFromTheRevelation", "CanonDiscontinuity", "FridgeLogic", "FridgeHorror", "TheMultiverse", "YouCannotGraspTheTrueForm", "BreakingTheFourthWall", "MetaFiction", "NoFourthWall", "PostModernism", "ElmuhFuddSyndwome", "AsideGlance", "FourthWallPsych", "MindScrew", "FridgeLogic", "ParanoiaFuel", "GoMadFromTheRevelation", "CanonDiscontinuity", "FridgeLogic", "FridgeHorror", "TheMultiverse", "YouCannotGraspTheTrueForm", "BreakingTheFourthWall", "MetaFiction", "Cloudcuckoolander", "TheBridge", "RageAgainstTheAuthor", "TheFourthWallWillNotProtectYou", "NoFourthWall", "RageAgainstTheAuthor", "TheFourthWallWillNotProtectYou", "InvokedTrope", "UnusuallyUninterestingSight", "AsideGlance", "HolyGrail", "NonPlayerCharacter", "OpeningMonologue", "RageAgainstTheAuthor", "NoFourthWall", "SubvertedTrope", "TheHero", "TokenEvilTeammate", "WebcomicTime", "NoFourthWall", "NoFourthWall", "RabidCop", "BreakingTheFourthWall", "AsideGlance", "ThisIsReality", "AsideGlance", "ConfessionCam", "BlackComedy", "FishPeople", "TheEeyore", "GentlemanandaScholar", "MyBrainIsBig", "SarcasmMode", "DangerMouse", "AnAesop", "AvengersAssemble", "CompanionCube", "AsideGlance", "FourthWallObserver", "TalkativeLoon", "ParodyEpisode", "FakeInteractivity"]}
json
package com.sheena.playground.api.users; import static org.assertj.core.api.Assertions.assertThat; import java.io.IOException; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import javax.annotation.PostConstruct; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.client.HttpClientErrorException; import org.springframework.web.client.RestTemplate; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.sheena.playground.api.NewUserForm; import com.sheena.playground.api.UserTO; import com.sheena.playground.logic.users.UserEntity; import com.sheena.playground.logic.users.UsersService; import com.sheena.playground.logic.users.exceptions.UserDoesNotExistException; import com.sheena.playground.logic.users.exceptions.CodeDoesNotExistException; import com.sheena.playground.logic.users.exceptions.RoleDoesNotExistException; import com.sheena.playground.logic.users.exceptions.UserAlreadyExistsException; import com.sheena.playground.logic.users.exceptions.UserAlreadyVerifiedException; import com.sheena.playground.logic.users.exceptions.VerificationCodeMismatchException; @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT) public class UsersTests { private static final String PREFIX_URL = "/{playground}/{email}"; private static final String LOGIN_URL = "/login/{playground}/{email}"; private static final String CONFIRM_URL = "/confirm/{playground}/{email}/{code}"; private final int numCases = 9; @LocalServerPort private int port; private String url; private RestTemplate restTemplate; private ObjectMapper jsonMapper; private Comparator<UserTO> userTOComparator; @Autowired private UsersService usersService; @Value("${playground.name:defaultPlayground}") private String playground; private final String verificationCodeSuffix = "code"; //Data attributes for test suite private final String emailDomain = <EMAIL>"; private final String userName = "user"; private final String avatar = "lion"; private final String playerRole = "player"; private List<NewUserForm> newUserForms; @PostConstruct public void init() { this.restTemplate = new RestTemplate(); this.userTOComparator = new UserTOComparator(); this.url = "http://localhost:" + port + "/playground/users"; this.jsonMapper = new ObjectMapper(); System.err.println(this.url); } @Before public void setup() { this.newUserForms = this.generateNewUserForms(this.numCases); } @After public void teardown() { this.usersService.cleanup(); } @Rule public ExpectedException exception = ExpectedException.none(); @Test public void testServerIsBootingCorrectly() throws Exception { } @Test public void testRegisterNewUser() throws JsonParseException, JsonMappingException, IOException { UserTO expectedUserTO = new UserTO(this.newUserForms.get(0)); UserTO actualReturnedValue = this.restTemplate.postForObject(this.url, this.newUserForms.get(0), UserTO.class); assertThat(actualReturnedValue) .isNotNull() .usingComparator(this.userTOComparator).isEqualToIgnoringNullFields(expectedUserTO); } @Test public void testRegisterNewUserWithUndefinedRole() throws JsonParseException, JsonMappingException, IOException { NewUserForm newUserWithUndefinedRole = this.newUserForms.get(1); newUserWithUndefinedRole.setRole("admin"); this.exception.expect(HttpClientErrorException.class); this.exception.expectMessage("404"); //When this.restTemplate.postForObject(this.url, newUserWithUndefinedRole, UserTO.class); //Then //An HttpClientErrorException is caught with status code 404 } @Test public void testVerifyNewUserAccount() throws JsonParseException, JsonMappingException, IOException, UserAlreadyExistsException, RoleDoesNotExistException { NewUserForm newUser = this.newUserForms.get(2); UserTO expectedUserTO = new UserTO(this.usersService.createNewUser( new UserTO(newUser).toEntity())); //When UserTO returnedAnswer = this.restTemplate.getForObject( this.url + CONFIRM_URL, UserTO.class, this.playground, newUser.getEmail(), newUser.getEmail() + this.verificationCodeSuffix); //Then assertThat(returnedAnswer) .isNotNull() .isEqualToIgnoringNullFields(expectedUserTO); } @Test public void testVerifyNewUserAccountWithWrongCode() throws JsonParseException, JsonMappingException, IOException, UserAlreadyExistsException, RoleDoesNotExistException { //Given NewUserForm newUser = this.newUserForms.get(3); this.usersService.createNewUser(new UserTO(newUser).toEntity()); String wrongCode = newUser.getEmail() + this.verificationCodeSuffix + "NOPE"; this.exception.expect(HttpClientErrorException.class); this.exception.expectMessage("404"); //When this.restTemplate.getForObject( this.url + CONFIRM_URL, UserTO.class, this.playground, newUser.getEmail(), wrongCode); //Then //An HttpServerErrorException is caught with status code 404 } @Test public void testUserSuccessfulLogin() throws JsonParseException, JsonMappingException, IOException, UserAlreadyExistsException, RoleDoesNotExistException, UserDoesNotExistException, CodeDoesNotExistException, UserAlreadyVerifiedException, VerificationCodeMismatchException { //Given NewUserForm newUser = this.newUserForms.get(4); UserEntity newUserEntity = this.usersService.createNewUser( new UserTO(newUser).toEntity()); this.usersService.verifyUserRegistration( playground, newUserEntity.getEmail(), newUserEntity.getEmail() + this.verificationCodeSuffix); UserTO expectedUserTO = new UserTO(newUserEntity); //When UserTO returnedAnswer = this.restTemplate.getForObject( this.url + LOGIN_URL, UserTO.class, this.playground, newUser.getEmail()); //Then assertThat(returnedAnswer) .isNotNull() .isEqualToIgnoringNullFields(expectedUserTO); } @Test public void testUserLoginWithUnknownEmail() throws JsonParseException, JsonMappingException, IOException, UserDoesNotExistException, CodeDoesNotExistException, UserAlreadyVerifiedException, VerificationCodeMismatchException, UserAlreadyExistsException, RoleDoesNotExistException { //Given NewUserForm newUser = this.newUserForms.get(5); UserEntity newUserEntity = this.usersService.createNewUser( new UserTO(newUser).toEntity()); this.usersService.verifyUserRegistration( playground, newUserEntity.getEmail(), newUserEntity.getEmail() + this.verificationCodeSuffix); this.exception.expect(HttpClientErrorException.class); this.exception.expectMessage("404"); //When the unverified user tries to login this.restTemplate.getForObject( this.url + LOGIN_URL, UserTO.class, this.playground, newUser.getEmail() + "NOPE"); //Then //An HttpClientErrorException is caught with status code 404 } @Test public void testUnverifiedUserLogin() throws UserAlreadyExistsException, RoleDoesNotExistException, UserDoesNotExistException, CodeDoesNotExistException, UserAlreadyVerifiedException, VerificationCodeMismatchException { //Given there is a sign up request NewUserForm newUser = this.newUserForms.get(6); this.usersService.createNewUser(new UserTO(newUser).toEntity()); this.exception.expect(HttpClientErrorException.class); this.exception.expectMessage("404"); //When the unverified user tries to login this.restTemplate.getForObject( this.url + LOGIN_URL, UserTO.class, this.playground, newUser.getEmail()); //Then //An HttpClientErrorException is caught with status code 404 } @Test public void testUpdateUserDetailsSuccessfully() throws JsonParseException, JsonMappingException, IOException, UserDoesNotExistException, UserAlreadyExistsException, RoleDoesNotExistException, CodeDoesNotExistException, UserAlreadyVerifiedException, VerificationCodeMismatchException { //Given NewUserForm newUser = this.newUserForms.get(7); UserEntity newUserEntity = this.usersService.createNewUser( new UserTO(newUser).toEntity()); this.usersService.verifyUserRegistration( playground, newUserEntity.getEmail(), newUserEntity.getEmail() + this.verificationCodeSuffix); UserTO userWithUpdate = new UserTO(newUser); userWithUpdate.setUsername("leon"); userWithUpdate.setAvatar("giraffe"); userWithUpdate.setRole("manager"); //When this.restTemplate.put( this.url + PREFIX_URL, userWithUpdate, this.playground, userWithUpdate.getEmail()); //Then UserEntity actualEntity = usersService.getUserByEmail(userWithUpdate.getEmail()); assertThat(new UserTO(actualEntity)) .isNotNull() .isEqualToIgnoringNullFields(userWithUpdate); } @Test public void testUpdateUserDetailsThatAreNotAllowed() throws JsonParseException, JsonMappingException, IOException, UserDoesNotExistException, UserAlreadyExistsException, RoleDoesNotExistException, CodeDoesNotExistException, UserAlreadyVerifiedException, VerificationCodeMismatchException { //Given NewUserForm newUser = this.newUserForms.get(8); UserEntity newUserEntity = this.usersService.createNewUser( new UserTO(newUser).toEntity()); this.usersService.verifyUserRegistration( playground, newUserEntity.getEmail(), newUserEntity.getEmail() + this.verificationCodeSuffix); UserTO userWithUnAllowedUpdate = new UserTO(newUser); userWithUnAllowedUpdate.setPoints(1250L); this.exception.expect(HttpClientErrorException.class); this.exception.expectMessage("404"); //When this.restTemplate.put(this.url + PREFIX_URL, userWithUnAllowedUpdate, this.playground, userWithUnAllowedUpdate.getEmail()); //Then //An HttpClientErrorException is caught with status code 404 } private List<NewUserForm> generateNewUserForms(int numCases) { List<NewUserForm> newUserForms = new ArrayList<>(); for (int i = 0; i < numCases; i++) { newUserForms.add(new NewUserForm( this.userName + "_" + i + "_" + this.emailDomain ,this.userName + "_" + i + "_" ,this.avatar ,this.playerRole)); } return newUserForms; } }
java
from flask import Flask, render_template, request, redirect, url_for from os.path import join from stego import Steganography app = Flask(__name__) UPLOAD_FOLDER = 'static/files/' app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg'} @app.route("/") def home(): return render_template('home.html') @app.route("/encrypt", methods=['GET', 'POST']) def get_image(): if request.method == 'GET': return render_template('encrypt.html') # Check if the user has entered the secret message if 'file' in request.files and 'Secret' in request.values: uploaded_image = request.files['file'] message = request.values.get('Secret') password = <PASSWORD>("key") filepath = join(app.config['UPLOAD_FOLDER'], "cover_image.png") uploaded_image.save(filepath) im = Steganography(filepath=app.config['UPLOAD_FOLDER'], key=password) im.encode(message=message) return render_template('encrypt.html', value=filepath, image_flag=True, secret_flag=True) return redirect(url_for('encrypt')) @app.route("/decrypt", methods=['GET', 'POST']) def get_image_to_decrypt(): if request.method == 'GET': return render_template('decrypt.html') if 'key' in request.values: password = request.values.get('key') filepath = join(app.config['UPLOAD_FOLDER'], "stego_image.png") im = Steganography(filepath=app.config['UPLOAD_FOLDER'], key=password) message = im.decode() return render_template('decrypt.html', value=filepath, message=message) if 'file' in request.files: uploaded_image = request.files['file'] filepath = join(app.config['UPLOAD_FOLDER'], "stego_image.png") uploaded_image.save(filepath) return render_template('decrypt.html', value=filepath) if __name__ == '__main__': app.run(debug=True)
python
India has a clearly stated policy against expansionism and terrorism, Lok Sabha Speaker Om Birla said on Tuesday at an event to welcome the president of the International Parliamentary Union (IPU). Addressing members from both houses of Parliament in the presence of IPU President Durate Pacheco, the speaker also said no parliament should debate laws passed by the legislatures of other nations and issues related to their sovereignty. His remarks came days after British lawmakers discussed the farmers' protest in India. Underlining that India has always worked for global peace and tranquillity, Birla said India, under the leadership of Prime Minister Narendra Modi, has clearly stated its policy against global terrorism and expansionism. Pacheco, a member of Portugal's parliament, described India as a special friend of IPU and said it has played an important in parliamentary diplomacy. Emphasising that India should get its due place in global order, Pacheto said, "Portugal supports India's claim for permanent member of the Security Council. " Hailing Modi, Pacheco said India has made huge strides in economic and social development and reduced poverty under his leadership. . Read all the Latest News, Breaking News and Coronavirus News here(This story has not been edited by News18 staff and is published from a syndicated news agency feed - PTI)
english
Expanding delivery networks and incorporating advanced technologies like AI for predictive analytics in medicine, along with enhanced government support, are set to redefine the healthcare landscape in India in the coming years. Despite a significant presence of female workers in entry level roles, the report showed a significant under-representation of women in leadership roles, especially at the executive and board levels, across healthcare sub-sectors. Most women are focused on the frontline in low-paying jobs and women across the healthcare workforce, on average, earn 34% less than their male counterparts. The committee, in its report, said it was submitted before the panel that unlike in any other professions, healthcare professionals are vulnerable to "violent attacks" by relatives of patients, in cases where patients die during treatment. Focusing on empowering the poor, and treating them as a homogeneous group, enables policymakers to dive deeper into their socioeconomic status and plan appropriate interventions. Instead of applying the complicated and ambiguous parameters to measure the economic status of the poor, let's consider the Bottom of the Pyramid (BoP) concept. In the Skilled Worker category, there was a modest 9% increase in visas granted, with Indian nationals leading the pack. Notably, the 'Skilled Worker – Health and Care' visas witnessed a substantial surge, more than doubling with a 135% increase to reach 143,990 grants. The largest spikes on this visa were seen among Indian, Nigerian, and Zimbabwean nationals. Finland has established itself as a center of possibilities for students, researchers, and innovators, actively inviting global workers to tackle the growing labor challenges. The country aims to draw in 15,000 international students annually by 2030 and elevate work-based migration to 30,000 individuals per year. Kilitch Healthcare India Limited has recalled 27 types of eye drops sold in the U.S. due to safety concerns arising from insanitary conditions found by FDA investigators. The FDA had previously warned consumers about eyedrops from major retailers without disclosing Kilitch as the manufacturer. "The general level of awareness and compliance related to EHS (Environment Health & Safety) norms in case of manufacturing companies requires drastic improvement and urgent attention" said Nagaraj Krishnan, managing director, Aparajitha Corporate Services, a tech firm providing compliance solutions to over 2000 companies in India. WisdomCircle, a technology enabled platform that connects senior experienced professionals (typically above 50, retired or soon to retire) with organizations looking for specialized, senior talent had some insights from their work with 100+ organizations across sectors where they have helped these professionals find roles as advisers, subject matter experts, senior consultants, mentors, coaches, board members and more. India ranks low in the Global Remote Work Index (GRWI) due to poor digital and physical infrastructure and social safety. Its e-infrastructure is one of the worst globally, and the internet connection is neither affordable nor of good quality. In terms of cyber and economic safety, India performs mediocre. The Indian government is considering providing incentives to ASHA health activists to encourage them to mobilize individuals for sickle cell disease screening and distribution of sickle cell cards. Sickle cell disease is a group of inherited blood disorders, and the government has launched a mission to eliminate the disease by 2047. The mission includes screening the population, providing genetic counseling, and offering care for those with the disease. The country needs to attract more foreign clinicians to fill the gaps, but it faces challenges such as low salaries, burnout, and bureaucratic procedures. Italy has historically been reluctant to hire from abroad, unlike other wealthy nations. The COVID-19 pandemic has further exposed the shortcomings of Italy's healthcare system. The annual Goalkeepers Report published by the Gates foundation reveals that global public health challenges have worsened due to Covid-related disruptions, leading to additional financial burden and spending cuts on public health infrastructure. The report highlights the need to refocus attention on maternal and child health and suggests new interventions that can make a transformative difference. In an interview with ET's Deborshi Chaki, Mark Suzman, CEO of the Bill & Melinda Gates Foundation, laid down the key issues highlighted this year. It's undeniable that the condition of India's labour force has improved, lifting millions out of poverty. But if the government wants to expand this large population base into a skilled and sustainable workforce, it must improve their skill sets and provide them access to affordable medical, housing and educational infrastructure. The Diploma in Rural Health Care is a one-year program that equips students with the necessary skills in healthcare, first aid, sanitation, and patient education to address the healthcare needs of rural communities in India. A healthcare inspector ensures that healthcare businesses adhere to safety and health standards set by the government. They conduct inspections and assess all aspects of medical facilities to ensure compliance with regulations. The role requires empathy and a commitment to improving public health. Healthcare inspectors may work for municipal or state governments and inspect various establishments such as hospitals, schools, restaurants, and nursing homes. Healthcare management scientists are professionals in the medical and research fields who focus on expanding their understanding of the health sector through research. They work on various research projects, including data collection, disease study, genetic predisposition analysis, and the development of new medical equipment. After completing health science coursework, individuals can pursue careers as home health aides, surgical technologists, human service assistants, radiologic specialists, or community health specialists. Healthcare scientists can work in hospitals, clinics, pharmaceutical companies, government agencies, consulting firms, and insurance companies. The salary for healthcare scientists varies based on experience and job category. The comprehensive strategy involves public awareness campaigns, the screening of 7 crore individuals aged 0-40 in affected tribal areas, and counselling. This collaborative effort will unite central ministries and state governments. Prime Minister Narendra Modi formally launched the mission on July 1 in Madhya Pradesh's Shahdol district. The move is aimed at allowing direct entry of Indian workers into Australia instead of the current practice under which skilled workers are often routed through GCC nations or the UK, Ireland or New Zealand before they land up in Australia. The Indian Institute of Management (IIM) Kozhikode is offering a 12-month, part-time Senior Management Programme in Business Analytics certification course. This course aims to challenge misconceptions about business analytics and provide a combination of academic and practical techniques for utilizing data analytics for corporate growth. It covers topics such as statistics for analysis, data sources, and experimentation, and includes case studies from various regions. The course is suitable for senior managers and professionals in IT and provides knowledge and skills in decision-making models, data analytics, and global perspectives of data analysis. The Indian government is developing a training program under its 'Heal by India' initiative to meet the rising global demand for nurses and healthcare professionals. The aim is to create a pool of skilled workers and make India the "care capital" of the world. India reported 706 heatwave incidents from 1971-2019 which claimed more than 17,000 lives, according to a paper authored by M Rajeevan, former secretary of the Ministry of Earth Sciences, along with scientists Kamaljit Ray, S S Ray, R K Giri and A P Dimri. A study by the Indian Institute of Technology-Gandhinagar says India could witness a staggering 30-fold increase in severe heat waves by 2100. A 75-fold rise is predicted under a business-as-usual scenario. The German government has eased visa regulations and streamlined the recognition process for foreign qualifications. This move is aimed at simplifying the entry and integration of skilled professionals, making it more appealing for Indian nurses to consider working in Germany. India's informal workforce, particularly Gen Z employees, are now looking beyond just high wages when seeking professional opportunities. A study by staffing company Quess showed that 93% of informal employees surveyed would choose a job that offered a formal health benefit agreement rather than a higher-paying one without any guarantees. "The Finnish society is ageing; therefore, the country needs more young people to join the labour market. There are open positions across many sectors, for example, the healthcare and elderly care is on a lookout for workers. Similarly, several manufacturing industries is hoping to get international skilled labour," Glenn Gassen, Director of Immigration Affairs, Helsinki, said. India is at a “tipping point,” he went on to say on a call with analysts after his visit. It was that same month when India also earned a new title as the world’s most populous nation, burnishing the appeal of sectors that cater to a burgeoning middle class and young consumers. The Covid pandemic has demonstrated that health threats are not confined to national borders and require a coordinated global response, Union Health Minister Mansukh Mandaviya has said. In this context, India has been supporting by capacity building of healthcare workers, coupled with harnessing digital technology as the way forward, he said in his keynote address at a session on "Heal in India and Heal by India" at the 76th World Health Assembly in Geneva on Tuesday.
english