text
stringlengths
1
1.04M
language
stringclasses
25 values
import React from 'react'; import { PropTypes } from 'prop-types'; import Todo from './Todo'; const TodoList = ({todos, handleToggleTodo, handleDeleteTodo}) => <ul> {todos.map((todo) => <Todo key={todo.id} {...todo} handleToggleTodo={handleToggleTodo} handleDeleteTodo={handleDeleteTodo} />)} </ul>; TodoList.propTypes = { todos: PropTypes.arrayOf(PropTypes.shape({ title: PropTypes.string.isRequired, id: PropTypes.number.isRequired, done: PropTypes.bool, })), handleToggleTodo: PropTypes.func.isRequired, handleDeleteTodo: PropTypes.func.isRequired }; export default TodoList;
javascript
Nivin Pauly shared a new poster of his upcoming film Padavettu on Wednesday. He looks intense as he portrays a man who’s got a strong stomach for violence and fighting. Billed as a political drama, the film will be hitting the screens in 2022. “Story of Conflict… Struggle… Survival… As long as there are humans, the fight will continue,” tweeted Nivin, while sharing the poster. Written and directed by Liju Krishna, Nivin expressed confidence that Padavettu will successfully click with the audience. “Padavettu is a story that impacted me hugely when it was first narrated. It’s a story of second chances and finding the inner mettle to stand up against the wrong. I strongly believe that the storyline, emotions, and the beautiful portrayal of characters will connect well with the audience and earn the film a great reception widely,” Nivin added.
english
A gaming PC's performance does not solely rely on powerful hardware; the software it utilizes plays a vital role in shaping your overall experience. Therefore installing the right software is essential whether you're a casual or a hardcore user. These programs optimize performance, facilitate smooth multiplayer interactions, and enhance gameplay recording and sharing. This article delves into 10 software every gamer should have in their toolkit to ensure an optimized and immersive gaming experience. Note: This article is subjective and reflects the writer's views. Steam, featuring over 50,000 games, is the largest digital game-distribution platform. Its diverse library spans from AAA titles to indie gems, and frequent sales facilitate discovering discounted games. The vibrant community fosters game discussions, technical help, and multiplayer connections. With a workshop for user-generated content and Steam Broadcasting for game streaming, it ensures a comprehensive experience. Some concerns persist regarding customer support and refund policies. However, Steam remains a must-have software for PC gamers, delivering a secure and feature-packed gaming experience. Discord, gamers' favored chat app, offers a seamless, user-friendly interface with useful features. Its secure encryption, excellent voice chat, high-quality video chat, and fast text chat enhance the gaming experience. And yet, Discord extends beyond gaming as it fosters connections, facilitates collaboration, and serves as a versatile communication hub. Players can embrace the boundless potential of Discord. They can become a part of a vast global community that relies on it for unmatched communication and unparalleled opportunities in gaming and social interactions. Opera GX, tailored for gamers, offers various unique features to enhance gaming performance and minimize distractions. There is an option to limit CPU and RAM usage, making it ideal for multitasking gamers. Its built-in ad blocker optimizes system resources, boosting overall performance. Furthermore, Opera GX integrates Twitch, provides a gaming news feed, and allows interface customization with various themes. While perfect for gamers seeking improved performance and focus, non-gamers searching for a lightweight browser may find alternative options more suitable. MSI Afterburner is a quintessential software that unleashes your gaming PC's full potential. This free overclocking utility boasts an intuitive interface catering to beginners and experts. The customization options allow various overclocking methods and personalized game-specific profiles. Additionally, it offers hardware monitoring, on-screen display, and benchmarking features, optimizing your graphics card's performance. With its user-friendly UI, flexibility, and rich features, MSI Afterburner is indispensable software to optimize your gaming experience. OBS Studio, a robust free and open-source software, excels in recording and livestreaming. Its versatility caters to game streaming, video conferencing, and tutorial creation needs. Offering multiple source recordings, scene management, and various audio/video filters, it boasts a comprehensive feature set. While it may require some learning, its active community and customizable interface appeal to novices and experts alike. OBS Studio provides its users with powerful recording and streaming capabilities. Razer Cortex is a software suite for PCs that improves the gaming experience with its features. The Game Booster optimizes performance by halting needless background processes and enabling CPU overclocking. Moreover, it offers system optimization tools, freeing up RAM and streamlining startup programs. Its game library management feature simplifies organization and installation. With the advantage of discovering the best deals on titles, Razer Cortex is a must-have for gamers seeking enhanced performance and seamless game management. GeForce Experience holds significant importance for Nvidia graphics card users. This free software provides essential features like game optimization, automatic driver updates, recording, streaming, and the impressive Ansel photo mode. Its user-friendly interface simplifies maximizing game performance, making it a fantastic application to optimize your gaming PC. From streamlining settings to capturing breathtaking screenshots, this tool enhances your experience with simple and valuable functions. LogMeIn Hamachi is an outstanding VPN (virtual private network) service designed for gamers and other users. Its effortless setup and user-friendly interface enable secure gaming or remote access networks with ease. Further, employing AES 256-bit encryption guarantees data security and privacy. The software's versatility extends to file sharing, remote access, and dedicated gaming networks, making it integral for any gaming PC. LogMeIn Hamachi has become the go-to choice for gamers, remote workers, and anyone seeking a reliable VPN solution, as it establishes secure and private networks effortlessly. CPU-Z is an essential tool for gaming PCs, offering detailed CPU, memory, motherboard, and graphics card information. Its user-friendly interface automatically scans and presents hardware details in a clear format through CPU, memory, mainboard, and graphics tabs, providing crucial component insights. Moreover, CPU-Z offers benchmarking, sensor monitoring, and frequency analysis, enabling users to optimize their PC performance. With comprehensive hardware insights and convenient functionalities, this software proves invaluable for players seeking to enhance their gaming experience. Malwarebytes is an amazing software that offers robust malware detection and removal capabilities. Its power lies in identifying and eliminating malware threats effectively. With real-time protection, a browser extension for blocking malicious websites, a privacy-focused VPN, system vulnerability scanning, and efficient hard drive cleanup, it provides all-around defense. Whether opting for the free or paid version, gamers find a practical and user-friendly solution in Malwarebytes. It will help them safeguard their gaming PCs for uninterrupted gameplay and peace of mind. In conclusion, these 10 software are necessary for any gaming PC, enhancing performance, optimizing settings, and providing essential features for seamless experiences.
english
- Movies Tamannaah Bhatia Grooves To Kaavaalaa Song With Fan At Mumbai Airport; Says 'He Is Doing Better Than Me' - Travel Have you been to Vishveshwaraya Falls in Mandya yet? If not, this is the best time! Anushka Sharma with Shahrukh Khan went to Benaras for the promotion of their next movie, Jab Harry Met Sejal. The Imtiaz Ali movie features these powerful actors who are also equally very stylish. Anushka is someone in the Bollywood industry who is hard to compete with when it comes to fashion statement. For this promotional event, Anushka was decked up in a traditional attire by celebrity designer Manish Malhotra. The beautiful glossy green salwar suit from Manish Creations beautified Anushka's look, including the classy jewellery, the jootis and not to forget, the tiny bindi. Shahrukh's look was not too special, who was seen wearing a grey shirt with black trousers. - fashionCannes 2023: Anushka Sharma Stuns In White Off-Shoulder Gown, Pics! - fashionAnushka Sharma & Mouni Roy Are Set To Mark Their Presence At Cannes 2023! - fashionCannes 2023: Anushka Sharma, Vijay Varma And Others Will Attend The Film Festival! - fashionAnushka Sharma Elevates The Black Ensemble With Jimmy Choo Shoes, Pics! GET THE BEST BOLDSKY STORIES!
english
let start = 1; let moves = []; let winner = false; let piece = function() { let piece = 'X'; if (start % 2 === 0) { piece = 'O'; } start += 1; return piece; } let winConditions = [ [1, 2, 3], [4, 5, 6], [7, 8, 9], [1, 4, 7], [2, 5, 8], [3, 6, 9], [1, 5, 9], [3, 5, 7] ]; document.addEventListener('click', function() { if (event.target.id !== 'reset' && event.target.id) { if (!moves.includes(event.target.id)) { document.getElementById(event.target.id).innerHTML = piece() moves.push(event.target.id); checkWinner(Number(event.target.id)); } else { console.log('Illegal Move'); } if (moves.length === 9 && !winner) { setTimeout(() => { alert('NOBODY WINS') }, 200) } } else if (event.target.id === 'reset') { start = 1; moves = []; let winner = false; winConditions = [ [1, 2, 3], [4, 5, 6], [7, 8, 9], [1, 4, 7], [2, 5, 8], [3, 6, 9], [1, 5, 9], [3, 5, 7] ]; let obj = document.getElementsByClassName('square'); for (var i = 0; i < obj.length; i++) { if (obj.item(i)) { obj.item(i).innerHTML = ''; } } } }); let checkWinner = function(id) { let player; if (start % 2 === 0) { player = 'X' } else { player = 'O' } winConditions.forEach((arr) => { for (var i = 0; i < arr.length; i++) { if (arr[i] === id) { arr.splice(i, 1, player) } } let winning = (typeof arr[0] !== 'number') && (arr[0] === arr[1]) && (arr[1] === arr[2]); if (winning) { winner = true; setTimeout(() => { alert(`${player} wins`)}, 200) } }) };
javascript
{ "714544f-a": { "width": 403, "thumb_url": "http://oldnyc-assets.nypl.org/thumb/714544f-a.jpg", "image_url": "http://oldnyc-assets.nypl.org/600px/714544f-a.jpg", "title": "", "date": "", "text": "450 East 78th Street, adjoining the S.W. corner of York Ave. Building shown, is a 2-story frame house.\nSeptember 25, 1935.\nP. L. Sperr.\n", "folder": "78th Street (East) & York Avenue, Manhattan, NY", "height": 600, "original_title": "Manhattan: 78th Street (East) - York Avenue", "years": [ "" ] } }
json
/* * Copyright 2021 Collate * 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. */ import { useOktaAuth } from '@okta/okta-react'; import React, { forwardRef, Fragment, ReactNode, useImperativeHandle, } from 'react'; import { useHistory } from 'react-router-dom'; import { useAuthContext } from '../auth-provider/AuthProvider'; import { AuthenticatorRef } from '../auth-provider/AuthProvider.interface'; import { ROUTES } from '../constants/constants'; interface Props { children: ReactNode; onLogoutSuccess: () => void; } export type Ref = ReactNode | HTMLElement | string; const OktaAuthenticator = forwardRef<AuthenticatorRef, Props>( ({ children, onLogoutSuccess }: Props, ref) => { const { oktaAuth } = useOktaAuth(); const { setIsAuthenticated } = useAuthContext(); const history = useHistory(); const login = async () => { oktaAuth.signInWithRedirect(); }; const logout = async () => { const basename = window.location.origin + history.createHref({ pathname: ROUTES.SIGNIN }); setIsAuthenticated(false); try { if (localStorage.getItem('okta-token-storage')) { await oktaAuth.signOut({ postLogoutRedirectUri: basename }); } localStorage.removeItem('okta-token-storage'); onLogoutSuccess(); } catch (err) { // TODO: Handle error on logout failure // eslint-disable-next-line no-console console.log(err); } }; useImperativeHandle(ref, () => ({ invokeLogin() { login(); }, invokeLogout() { logout(); }, })); return <Fragment>{children}</Fragment>; } ); OktaAuthenticator.displayName = 'OktaAuthenticator'; export default OktaAuthenticator;
typescript
After a few weeks of rumors, Google just announced the latest device in its Chromebook lineup: the Chromebook Pixel. Unlike previous Chromebook versions, the Pixel is aimed at power users who fully live in the cloud. The device features an impressive array of hardware specs. It has a 12.85 inch high-density 2560×1700 screen (that’s 4.3 million pixels) with a 3:2 aspect ratio, an Intel Core i5 processor and a whopping 1 terabyte of free storage on Google Drive for three years. Google will also soon launch a version with a built-in LTE radio and has partnered with Verizon to offer 100 MB/month for two years of mobile broadband and with GoGo to offer 12 free in-flight Wi-Fi sessions. The basic Wi-Fi version of the Pixel will retail for $1,299 in the U.S. and £1,049 in the U.K. The Pixel is now available on Google Play and will also be available at select Best Buy locations in the U.S. and Currys PC World in the U.K. tomorrow. The LTE version ($1,449) will ship in the U.S. in April. The other difference between the LTE and Wi-Fi models is that the LTE version will ship with a 64GB solid-state drive and the Wi-Fi version will only have 32GB. Google did not disclose who its hardware partners are, but the company did say that the device is being assembled in Taiwan. “I think the hardware shines,” Google VP Sundar Pichai said at a press event in San Francisco today. Google, Pichai stressed, wanted to build a device for power users who live in the cloud. “There’s a set of users who are really committed to living completely in the cloud,” he said, and Google wanted to build the perfect laptop for them. The first thing users will definitely notice when they first open the Pixel is the screen. Not only does it have a very high resolution, but it also features a relatively unusual aspect ration of 3:2. According to Pichai, the reason for this was that Google looked at what people would do with this device, and given that the web still focuses on content that is meant to be displayed horizontally, the design team decided to discard the idea of a screen with the more typical 16:10 resolution and went with 3:2. The screen, Google says, includes a 0.55mm layer of touch-enabled Gorilla Glass fused directly to the screen. Google says this screen “gives you smooth interactions while preserving picture clarity” and after some hands-on time with the device, Google definitely isn’t exaggerating the quality of the screen, which definitely measures up to Apple’s Retina displays. Google also stressed that this is a very premium device (something that’s obviously reflected in the price). Pichai, for example, noted that the piano hinge has the feel of a “very premium car door” and the team added rounded corners to the aluminum body to make it feel better when you hold it. Google also stressed that it redesigned numerous components and often had to resort to designing its own parts to meet its specs. The team, for example, added a third microphone to the device so it not only cancels out background noise, but also the noise you make yourself when you type on the keyboard (the Pixel has a 720p webcam for Google Hangouts and other video chats, too). Chrome itself, of course, has also been optimized for touch, which Pichai believes will soon be on every laptop. The menus are now larger and easier to click on with your fingers. Asked about how the Pixel compares to the Macbook Air, Pichai noted that the Pixel has a higher resolution and a touch screen, something Apple doesn’t currently offer – especially on a 12-inch device. The price, of course, definitely puts the Pixel in a premium category and it remains to be seen how the market will react to it. It is, no doubt, the best Chromebook on the market today and the hardware, including the fit and finish of the device, is very impressive. At $1,299 for the basic version, though, some potential buyers may decide to opt for a premium Apple laptop or Ultrabook instead. Here are the full hardware specs: Intel® CoreTM i5 processor (Dual Core 1.8GHz) Intel® HD Graphics 4000 (Integrated) Up to 5 hours of active use (59 Wh battery)
english
It’s sometimes hard to tell the difference between boldness and arrogance. That’s true whether you’re the actor or the audience. I believe Microsoft’s motives were sincere, but their decision was mistaken. So, how would you characterize the Microsoft Windows Division under the leadership of Steven Sinofsky? Bold and decisive, or arrogant and stubborn? Maybe both? Your answer to that question colors how you feel about Windows 8. And the fact that I even have to ask the question explains the passionate reaction to this polarizing product. The naysayers are probably overrepresented in the final tally from this week's Great Debate between me and my ZDNet colleague, Steven J. Vaughan-Nichols, Can Windows 8 be saved? But there’s no question that a lot of smart people have serious problems with the initial release of Windows 8. Great Debate: Can Windows 8 be saved? Microsoft has indeed done many bold things in Windows 8. No one in their right mind would accuse this release of Windows of being timid or overly cautious. It represents a big technological bet that one OS family can scale across an extraordinarily wide range of device form factors and sizes. On the other hand, plenty of perfectly sane critics have attacked Microsoft for being arrogant, stubborn, and dismissive of legitimate complaints about the user experience with Windows 8 on systems that lack touchscreens and are primarily running desktop programs. I believe Microsoft’s motives were sincere, but their decision was mistaken. In the desire to take a bold and determined step into the future, Windows 8 eliminates some of the touchstones of the Windows 7 desktop interface, while still leaving most of that desktop intact. That decision alienated many desktop users and created a wedge issue that has distracted from the many impressive accomplishments in Windows 8. I know some people (myself included) who have adapted to the new ways and even prefer them. Those who would rather stick with the old paradigms can't catch a break from Microsoft, though. They need to tweak the system extensively and use third-party utilities to achieve the desired result. Microsoft had the ability to include at least some options in Windows 8 so that upgraders could get the many benefits of the new Windows while still keeping those familiar touchstones. They chose not to. That decision is widely perceived as arrogant. As a result, people who should be happily using an upgrade that’s filled with genuine goodness are clinging bitterly to the previous version. And they're telling their friends. Microsoft got a lot of things right with Windows 8. I’m very impressed by the internals. On new UEFI-based hardware, performance (both in operation and especially in terms of startup and shutdown times) is excellent. There are small but meaningful improvements in Task Manager, File Explorer, and other little stuff that Windows power users will love. The ability to sync settings and files (with SkyDrive integration) is downright magical. If your only experience with Windows 8 is poking around at a copy running in a virtual machine on a Linux box with a local user account, you can’t appreciate this sea change in how Windows works. But when you switch from a Windows 8 desktop PC to a tablet to an Ultrabook or a Surface Pro and your files and settings just roam with you, that’s very cool. The inclusion of Hyper-V virtualization in the Pro edition is awesome. Big improvements in the BitLocker experience make it easy to encrypt a whole drive so your data stays safe if your device is stolen. Connecting to wireless networks is easier and faster. And just about all of your Windows 7 software works on the Windows 8 desktop. Everyone I know who has used Windows 8 on a touch-enabled device likes it a lot. (Even dyed-in-the-wool iPad fanatics admire it and quickly learn how to use it, in my experience.) The problems appear when you run Windows 8 on a PC that doesn’t have a touchscreen. My debate opponent might have gone slightly overboard with his hammering on what’s wrong with the modern/Metro UI, but he speaks for a lot of people. If most of the things you do with a PC involve Windows desktop programs driven by a keyboard and a mouse, many of the new mouse gestures are unfamiliar and awkward to execute. If most of the things you do with a PC involve Windows desktop programs driven by a keyboard and a mouse, many of the new mouse gestures are unfamiliar and awkward to execute. People learn them eventually, some even do so quickly. But if your first hour or day or week with a product involves frustration as you try to figure out how to switch to a program or why your browser is using the full screen and you can’t find the tabs...? Well, first impressions last. Partly this is people just grumbling about change. People complained about Windows XP’s “Fisher-Price” interface when it was first released. People complained about Windows 95. (How many times did you hear critics joke about having to click the Start button to shut down?) Hey, the guy who designed Apple’s first human interface and wrote eight editions of the Apple Human Interface Guidelines complained bitterly for years about OS X and why its signature interface change, the Dock, sucked. Microsoft has very sophisticated, very wide reaching tools to monitor sentiment among their customers, including on social media, so they should have known this. They should have expected that people would complain when they took away the Start menu and reworked several small but important parts of the UI while leaving other parts unchanged. Switching between two Control Panels, for example, can be jarring, with one group of settings in a modern/Metro app and a bunch more settings still in the desktop Control Panel. They should have anticipated confusion when people have desktop and immersive versions of Internet Explorer that behave in different ways. I can share a web page easily on Twitter from the immersive one, but the Share charm just laughs at me from the desktop browser. From the leaked previews of Windows 8.1, we know that Microsoft is moving more stuff from the desktop Control Panel to the modern/Metro PC Settings app. In other words, the Windows road map assumed that this transition was going to take multiple releases over an unknown period and require some patience on our part as we worked in the construction zone. So why couldn’t they allow users some opportunities to avoid the transitional parts? One UI change that would help tremendously, in my opinion, is the ability to pin the Charms bar to the Start screen so that you can always see those five charms: the Windows flag icon that takes you to the Start screen; the gear icon that takes you to the PC Settings page and the Shut Down command; and the Search icon. If you set a beginning user in front of that screen and those five charms are visible, they will figure things out quickly just by clicking. I suggested that option shortly after Windows 8 was made public, and my feedback was dismissed completely. We already know that the Start screen will get some fine-tuning in Windows 8.1. You can already see some slight rethinking of the way apps work with the latest refreshes of the Mail and Music apps. But there’s definitely room for improvement in the way that Windows 8 introduces itself to new users, especially those without a touchscreen. Any observer who’s been paying attention knows that the PC market was poised to decline and that mobile devices represent the future. Almost exactly two years ago, I noted the stunning rise in mobile web traffic and wrote “As Microsoft's monopoly crumbles, its mobile future is crucial”: For the first time since I’ve been recording this data, Microsoft’s share of web usage has dropped below the 90 percent mark—to 88.88 percent in April 2011. That’s a reflection of the decline of the traditional PC and the increasing importance of mobile devices. People aren’t abandoning Windows for other traditional operating systems—OS X usage is flat, too, and desktop Linux still can’t crack the 1 percent level. No, people are turning to mobile devices to do tasks that used to require a PC, and the iPad has been the biggest success in that role. In just over a year, it has grown from a microscopic market share to nearly 1% of all web traffic. Obviously, Microsoft had seen this inflection point coming. That’s why Windows 8 makes such investments in touch, power management, and connectivity. With Windows 8, Microsoft is unifying its user experience across an entire range of devices, including traditional PCs, ARM-based tablets, smartphones, and the Xbox 360. The stakes are incredibly high, and there’s really only one chance to get it right. if Windows 8 flops on phones and tablets, Microsoft’s future is very dim indeed. So, here it is two years later. The economy sucks worldwide, PCs are better built and therefore lasting longer, and what people really want are light, portable, personal devices that they can use for work (to handle a variety of communication and creative and collaborative tasks) and for play (as consumption devices for reading, listening to music, watching videos, and looking stuff up online). The dismal recent numbers for worldwide PC shipments are evidence that we in the early stages of a fundamental transformation in PC form factors. Consumers and businesses are buying fewer “heavy” PCs and holding on to them longer. I might quibble with the projections from IDC and Gartner, but I think Gartner is basically right to see huge growth potential in “ultramobile” devices (which can act like a tablet or a full-strength PC) as well as lower-powered tablets designed primarily for media consumption and light computing tasks. If you look at Windows 8, you can see that it’s aimed at both of those segments, which are primed to grow at very high rates over the next few years. One big change that would help make Windows 8 more popular is the appearance of small tablets at low price tags. For holiday season this year, Microsoft and its hardware partners (who should have gotten the point by now that those tired old designs won’t sell anymore) need to have lots and lots of touchscreen devices on the shelves, at a broad range of price points and form factors. Windows 8 is more like a living organism, made partly from familiar bits that have evolved over the last two decades, with several new strands of DNA tossed in. But let’s not overestimate the importance of the holiday season. The fourth quarter is important for consumer devices, but businesses will continue to have a big say in Windows’ growth, and they tend to buy on a schedule that is not seasonal. The good news is that enterprises always resist new Windows versions. (See history lessons here and here and here.) So most of them will be able to watch from the sidelines for the next few years and see how early adopters fare with the first wave of updates to Windows 8. Microsoft can capture the revenue from those Windows 7 licenses for several years to come. It’s tempting to compare Windows 8 to its predecessors. But I really see it as the first Windows release in a new generation. I believe Windows 7 was the last big, monolithic release from Microsoft, the end of the line for static code on a shiny disc in a shrink-wrapped box, like Windows XP or Vista. Windows 8 is more like a living organism, made partly from familiar bits that have evolved over the last two decades, with several new strands of DNA tossed in. It’s due to be updated for more often, and it’s part of a much larger hardware-apps-services ecosystem that is also changing quickly. It’s terribly short-sighted to focus only on the flaws with the interface, which can be easily tweaked. Windows 8 lays the groundwork for some other huge long-term changes as part of Microsoft’s transformation to a “devices and services” company. An impressive collection of cloud services are evolving along with Windows 8, including SkyDrive and Office 365. Windows 8 has deep connections to those services, which work across devices, and even across platforms. The end-to-end experience, the collective impact of all those devices and services, is the really big bet. Those services have evolved significantly since Windows 8 launched six months ago. Windows itself will make another big set of changes this summer with Windows 8.1 (Blue), which is much more than a service pack. New Office apps designed specifically for the modern/Metro side of Windows 8 will arrive this year as well. Those are big changes. But the Windows 8 system you use today will include all of them by the end of the year. Microsoft’s biggest failure was falling behind in the middle of the last decade, first fighting a successful but costly battle to secure the underpinnings of Windows and then cleaning up the mess of Longhorn and Vista. The scope of change in Windows 8 (and its successors) is so great that it was inevitable it would be released in phases, with the early phases that we’re in now causing some confusion. But Windows 8 isn’t broken, like Windows Vista was. It doesn’t need a service pack to fix fundamental performance and compatibility problems, like Vista did. It just needs to grow up and for the ecosystem around it to evolve. The good news is that Microsoft can afford a year (maybe two) of transition in the Windows Client division, which is only one of a dozen billion-dollar businesses in the company’s portfolio right now. The Windows desktop market is not small, but it’s a small percentage of Microsoft’s overall business. Meanwhile, there’s a list of things Microsoft needs to do quickly and confidently, and there’s not a lot of margin for screwing up. The built-in apps desperately need improvement, especially the Mail and Music apps, which are still a mess despite recent improvements. And Microsoft also needs to acknowledge more fully that the new user experience is confusing and frustrating for some people. Oddly, this is a case where I think Microsoft gave too much credit to its user base in terms of their willingness to adapt to change. Adding some tools and options to create a Windows 7 Legacy Desktop mode will inspire plenty of “Microsoft admits it screwed up” blog posts, but users will appreciate it. Unike Vista, Windows 8 is solid at its core, and Microsoft today is far more disciplined than in the Vista era. Six years ago, my opponent in the just-concluded debate called Windows Vista “the walking dead.” This time around, he called Windows 8 “a dead OS walking.” But in his eagerness to pronounce things dead, he’s inadvertently called attention to a perfect example of how Microsoft responded in a similar previous crisis. The Aero interface he loves so much debuted in Vista. Windows 7 was "Vista, fixed" and much more. Unike Vista, Windows 8 is solid at its core, and Microsoft today is far more disciplined than in the Vista era. It’s also capable of working much more quickly, which means that improvements to the OS and its apps can and should arrive in a cadence that’s measured in months, not years. The real wild card is the OEM community, which needs to step up and build products that people want to buy, not just produce incremental updates to the same tired old designs. Microsoft’s role as the kingpin of computing is long gone and some already consider it irrelevant or obsolete. Windows 8 and its ecosystem have all the ingredients to change that perception and make the next generation of computing devices very interesting. But even with flawless execution there’s no guarantee of success. See also:
english
<reponame>chenhongqiao/OI-Solutions #include <iostream> #include <algorithm> using namespace std; char ma[105][105]; bool u[105][105]; bool bad_way[105][105]; int n, m; string dfs(int x, int y) { if (x < 0 || y < 0 || x >= n || y >= m) { return ""; } if (ma[x][y] == '#') { return ""; } if (bad_way[x][y]) { return ""; } if (ma[x][y] == 'F') { return "g0ld"; } if (!u[x + 1][y]) { u[x + 1][y] = true; string s = dfs(x + 1, y); u[x + 1][y] = false; if (s.size() > 0) { if (s == "g0ld") { s = ""; } return s + "D"; } else { bad_way[x + 1][y] = true; } } if (!u[x - 1][y]) { u[x - 1][y] = true; string s = dfs(x - 1, y); u[x - 1][y] = false; if (s.size() > 0) { if (s == "g0ld") { s = ""; } return s + "U"; } else { bad_way[x - 1][y] = true; } } if (!u[x][y + 1]) { u[x][y + 1] = true; string s = dfs(x, y + 1); u[x][y + 1] = false; if (s.size() > 0) { if (s == "g0ld") { s = ""; } return s + "R"; } else { bad_way[x][y + 1] = true; } } if (!u[x][y - 1]) { u[x][y - 1] = true; string s = dfs(x, y - 1); u[x][y - 1] = false; if (s.size() > 0) { if (s == "g0ld") { s = ""; } return s + "L"; } else { bad_way[x][y - 1] = true; } } return ""; } string solve() { cin >> n >> m; int sx, sy; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { cin >> ma[i][j]; if (ma[i][j] == 'S') { sx = i; sy = j; } } } cout << sx << " " << sy << endl; u[sx][sy] = true; string s = dfs(sx, sy); reverse(s.begin(), s.end()); return s; } int main() { cout << solve() << endl; }
cpp
Foreign Minister Dr AK Abdul Momen has said Bangabandhu corners at home and abroad should be vibrant places for educating people on the life and principles of Father of the Nation Bangabandhu Sheikh Mujibur Rahman and the dynamic economic development of Bangladesh. "You will be happy to know that I have set up Bangabandhu corners in all Bangladesh missions abroad. They are not just rooms with pictures and books; they will organise seminars, and workshops on Bangabandhu throughout the year," he said. The minister was speaking at a function marking the formal inauguration of a Bangabandhu corner at the Sylhet Chamber of Commerce and Industry Monday. "I am very impressed with the Bangabandhu Corner. However, it needs more resources, more books and videos on Bangabandhu," Momen said. Directors and members of the Sylhet Chamber of Commerce and Industry were present at the function presided over by its President Tahmin Ahmed.
english
Jan. 2—LIMA — The target is back at Lima Central Catholic, and the Thunderbirds couldn't be happier. LCC beat previously unbeaten Ottawa-Glandorf on its home court on Saturday afternoon, 56-54, on Willie Foster's drive to the basket in the closing seconds. Now the T-birds know they're the team to beat in the area. "I love it because in junior high, we were always that team with the target on our backs," said Carson Parker, a senior forward with the T-birds. "These last three years, we've dealt with injuries and some other stuff. It's a lot of fun to get that target back on our back, knowing every game that we're the team to beat." The Thunderbirds have a proud basketball tradition, with nine trips to the state basketball tournament. They had a three-year stretch of making it to the state championship game, winning state titles in 2014 and 2016. They'd suffered a bit of a downturn since then, including an 11-13 season last year. That stumbling appears to be in the past, though, and the Thunderbirds (7-0) are looking for better things. They're just learning how to play together after a late start caused by the LCC football team's success. The football team advanced to the regional semifinals with several starters from the basketball team playing on the gridiron too. "For us, we got our football players about a week before our first game," LCC coach Sean Powell said after the win against Ottawa-Glandorf. "For them to go out there and execute in a hostile environment like that is amazing this early in the season. We still have a lot of work to do." Powell, a Shawnee graduate, has enjoyed great success in his first year with the Thunderbirds. He replaced a successful coach in Frank Kill, who decided to resign after last season. Powell previously spent two years coaching Bath after winning a state championship at Botkins in 2018. LCC has four players averaging double-figure production so far this year. Jordan Priddy, a sophomore, leads the way with 20.2 points per game, including 14 against the Titans on Saturday. Willie Foster Jr., a sophomore, had a breakout game against O-G, scoring 26 points and boosting his season average to 16 points per game. He hit 58% of his shots in the victory, often driving to the basket with authority. "I was going all game; I was feeling it," Foster said after that game. "All my hard work and dedication paid off. You just have to live in the moment. Every time I shoot the ball, I know it's going in." Parker averages 12 points per game, while DeMarr Foster, a senior, averages 10 per game. Add to that the rebounding prowess of senior Billy Bourk, who averages 8.5 rebounds per game this year, and you can see reasons for optimism from the undefeated Thunderbirds. "You hear people talk a lot about team rebounding," Bourk said. "It all comes down to five guys boxing out and crashing the board. I just happened to be on the good end of it. If everybody boxes out, the ball is going to bounce to somebody. You just have to be in the right spot for it." They're still learning who they are as a team, but thus far the results have been spectacular. They'll continue to have big games along the way, playing the difficult schedule of an independent, including games at Elida on Jan. 20 and at home against Lima Senior on Feb. 17 for the Lima Cup. From there, there's no telling how far they can go in the Division IV tournament. "This was a tournament-type atmosphere," Powell said after the win against Ottawa. "So to have one of those types of things under our belt is just sort of a big step that we can continue to grow." Reach David Trinko at 567-242-0467 or on Twitter @Lima_Trinko.
english
Thapa (63. 5kg) who is representing Assam hardly had to break a sweat in his quarters bout against Ashutosh Kumar of Punjab. HISAR: The record six-time Asian medalist Shiva Thapa and 2019 World Championships bronze winner Manish Kaushik produced power packed performances on the fifth day and will face each other in the semi-finals of the 6th Elite Men's National Boxing Championships here on Wednesday. Thapa (63. 5kg) who is representing Assam hardly had to break a sweat in his quarters bout against Ashutosh Kumar of Punjab. The pugilist who also has the 2015 World Championships bronze to his name was at his attacking best and put up a sensational display of skill and strength to secure a 5:0 victory by unanimous decision against his opponent. Kaushik (63. 5kg) on the other hand, is representing Services Sports Control Board (SSCB) and was facing Rohit Ningehougan Singh of Manipur in his bout. Thapa, the 2018 Commonwealth Games silver medalist also portrayed his attacking dominance by blanking his opponent to win by unanimous decision. Thapa and Kaushik will take to the ring against each other in a highly anticipated semi-final encounter and give it their all to secure their berth in the final. Meanwhile, Railway Sports Promotion Board's (RSPB) Varinder Singh (60kg) squared off against the 2018 Commonwealth Games champion Gaurav Solanki of Haryana in what was a high-profile clash. Showcasing brilliant technical ability, Varinder was able to outperform Solanki with ease and managed to secure a dominant 5:0 win. The 2021 Asian Championships bronze medalist will take on Sunil Chouhan of Uttar Pradesh in his semis bout. Also Watch:
english
## Name jp - pretty-print a JSON file with syntax-coloring and indentation ## Synopsis ```**sh $ jp [options...] [path...] ``` ## Description `jp` pretty-prints a JSON file with syntax-coloring and indentation. If no *path* argument is provided stdin is used. ## Options * `--help`: Display this message * `-i`, `--indent-size`: Size of indentations in spaces ## Arguments * `path`: file to pretty-print ## Examples ```sh # Pretty-print stdin $ cat /proc/all | jp # Pretty-print a file $ jp json-data.json # Pretty-print a file with two spaces per indent $ jp -i 2 json-data.json ```
markdown
# Tiny Massive Processing template ![pde-window.png](pde-window.png) ![visualiser.png](visualiser.png) Just a simple Processing starter file for the Tiny Massive festival (https://tinymassive.io/). I am not in any way related to the festival organization. I did this for my own use and thought it might help others. ## Listeners ``` W, A, S, D (joystick 1 up/left/down/right) I, J, K, L (joystick 2 up/left/down/right) Q, E (2 generic buttons mounted next to joystick 1 ) U, O (2 generic buttons mounted next to joystick 2 ) 0 (Important: this button (numpad 0) should reset the game state.) ```
markdown
<gh_stars>1-10 import FaTag from "react-icons/lib/fa/tag"; import FaTwitter from "react-icons/lib/fa/twitter"; import FaLinkedin from "react-icons/lib/fa/linkedin"; import FaGithub from "react-icons/lib/fa/github"; import FaRssSquare from "react-icons/lib/fa/rss-square"; import PropTypes from "prop-types"; import React from "react"; import { ThemeContext } from "../../layouts"; import Article from "../Article/"; import Headline from "../Article/Headline"; import Link from "gatsby-link"; const _ = require("lodash"); const Social = props => { const { groups } = props; return ( <React.Fragment> <ThemeContext.Consumer> {theme => ( <div id={"social"}> <header> {/* <Headline title="Follow" theme={theme} /> */} <h1>Follow</h1> </header> <div className="social-btns"> <a className="btn twitter" href="https://twitter.com/agrenpoint" target="_blank" rel="noopener" > <FaTwitter /> </a> <a className="btn linkedin" href="https://www.linkedin.com/in/simonaagren" target="_blank" rel="noopener" > <FaLinkedin /> </a> <a className="btn github" href="https://github.com/simonagren" target="_blank" rel="noopener" > <FaGithub /> </a> <a className="btn rss" href="/rss"> <FaRssSquare /> </a> </div> <style jsx>{` #social { padding: ${theme.space.inset.default}; margin: 0 auto; } @from-width tablet { #social { padding: 10px 20px; max-width: ${theme.text.maxWidth.tablet}; } } @from-width desktop { #social { padding: 10px 0 10px; max-width: ${theme.text.maxWidth.desktop}; } } h1 { font-size: 2.25em; padding: 20px 0; } h2 { margin: 0 0 0.5em; } h2 :global(svg) { height: 0.8em; fill: ${theme.color.brand.primary}; } .social-btns .btn { display: inline-block; background-color: #fff; width: 40px; height: 40px; line-height: 40px; margin: 0 3px; text-align: center; position: relative; overflow: hidden; -webkit-box-shadow: 0 0 3px 1px rgba(95, 93, 138, 0.15); box-shadow: 0 0 3px 1px rgba(95, 93, 138, 0.15); opacity: 0.99; padding: 0; } .social-btns .btn:after { content: ""; width: 200%; height: 350%; position: absolute; -webkit-transform: rotate(45deg); transform: rotate(45deg); top: 165%; left: -140%; } .social-btns .btn:hover { color: #fff; -webkit-transform: scale(1.2); transform: scale(1.2); } .social-btns .btn { font-size: 20px; vertical-align: middle; } .twitter svg { color: lighten(#3cf, 10%); } .github i { color: lighten(#000, 10%); } .rss i { color: lighten(#ff6501, 20%); } .social-btns .btn:focus:after, .social-btns .btn:hover:after { top: -100%; left: -100%; z-index: -1; } .social-btns .btn.twitter:after { background-color: #3cf; } .social-btns .btn.twitter { color: #3cf; } .social-btns .btn.twitter:hover, .social-btns .btn.linkedin:hover, .social-btns .btn.github:hover, .social-btns .btn.rss:hover { color: #fff; -webkit-transform: scale(1.2); transform: scale(1.2); } .social-btns .btn.linkedin:after { background-color: #4875b4; } .social-btns .btn.linkedin { color: #4875b4; } .social-btns .btn.github:after, .social-btns .btn.medium:after { background-color: #000; } .social-btns .btn.github { color: #000; } .social-btns .btn.rss:after { background-color: #ff6501; } .social-btns .btn.rss { color: #ff6501; } `}</style> </div> )} </ThemeContext.Consumer> </React.Fragment> ); }; export default Social;
javascript
<filename>src/main/resources/static/mas_json/2018_asplos_-1822678086748012419.json {"title": "SmoothOperator: Reducing Power Fragmentation and Improving Power Utilization in Large-scale Datacenters.", "fields": ["workload", "limiting factor", "dynamic demand", "power budget", "provisioning"], "abstract": "With the ever growing popularity of cloud computing and web services, Internet companies are in need of increased computing capacity to serve the demand. However, power has become a major limiting factor prohibiting the growth in industry: it is often the case that no more servers can be added to datacenters without surpassing the capacity of the existing power infrastructure. In this work, we first investigate the power utilization in Facebook datacenters. We observe that the combination of provisioning for peak power usage, highly fluctuating traffic, and multi-level power delivery infrastructure leads to significant power budget fragmentation problem and inefficiently low power utilization. To address this issue, our insight is that heterogeneity of power consumption patterns among different services provides opportunities to re-shape the power profile of each power node by re-distributing services. By grouping services with asynchronous peak times under the same power node, we can reduce the peak power of each node and thus creating more power head-rooms to allow more servers hosted, achieving higher throughput. Based on this insight, we develop a workload-aware service placement framework to systematically spread the service instances with synchronous power patterns evenly under the power supply tree, greatly reducing the peak power draw at power nodes. We then leverage dynamic power profile reshaping to maximally utilize the headroom unlocked by our placement framework. Our experiments based on real production workload and power traces show that we are able to host up to 13% more machines in production, without changing the underlying power infrastructure. Utilizing the unleashed power headroom with dynamic reshaping, we achieve up to an estimated total of 15% and 11% throughput improvement for latency-critical service and batch service respectively at the same time, with up to 44% of energy slack reduction.", "citation": "Not cited", "year": "2018", "departments": ["University of Michigan", "Facebook", "University of Michigan", "University of Michigan"], "conf": "asplos", "authors": ["<NAME>.....http://dblp.org/pers/hd/h/Hsu:Chang=Hong", "<NAME>.....http://dblp.org/pers/hd/d/Deng:Qingyuan", "J<NAME>.....http://dblp.org/pers/hd/m/Mars:Jason", "Lingjia Tang.....http://dblp.org/pers/hd/t/Tang:Lingjia"], "pages": 14}
json
<reponame>DopplerMarket/dvm<filename>cli/__main__.py<gh_stars>0 #!/usr/bin/env python3 from __future__ import absolute_import from cement.core.foundation import CementApp from cement.core.controller import CementBaseController, expose from cement.core.exc import CaughtSignal import threading, traceback from cli.utils.store import store from cli.controllers import BaseController from cli.controllers.auth import AuthController from cli.controllers.provider import ProviderController from cli.controllers.provider import ProviderController from cli.controllers.upgrade import UpgradeController class App(CementApp): class Meta: label = 'app' base_controller = 'base' extensions = ['colorlog', 'tabulate'] log_handler = 'colorlog' output_handler = 'tabulate' handlers = [ BaseController, AuthController, ProviderController, UpgradeController ] store = store def main(args=None): try: app = App() app.setup() app.run() except CaughtSignal as e: for thread in threading.enumerate(): className = thread.__class__.__name__ if className == "Timer": thread.cancel() app.close() except Exception as e: print(traceback.format_exc()) if __name__ == "__main__": main()
python
<reponame>anilpank/ojblabs<filename>terms-of-use.html <!DOCTYPE html> <!-- Transit by TEMPLATED templated.co @templatedco Released for free under the Creative Commons Attribution 3.0 license (templated.co/license) --> <html lang="en"> <head> <meta charset="UTF-8"> <title>Web App Developers for Enterprise</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="description" content="" /> <meta name="keywords" content="" /> <!--[if lte IE 8]><script src="js/html5shiv.js"></script><![endif]--> <script src="js/jquery.min.js"></script> <script src="js/skel.min.js"></script> <script src="js/skel-layers.min.js"></script> <script src="js/init.js"></script> <noscript> <link rel="stylesheet" href="css/skel.css" /> <link rel="stylesheet" href="css/style.css" /> <link rel="stylesheet" href="css/style-xlarge.css" /> </noscript> </head> <body> <!-- Header --> <header id="header"> <h1> <a href="index.html">Web App Developers for Enterprise</a> </h1> <nav id="nav"> <ul> <li><a href="index.html">Home</a></li> <li><a href="blog">Blog</a></li> </ul> </nav> </header> <!-- Main --> <section id="main" class="wrapper"> <div class="container"> <header class="major"> <h2>OjbLabs Terms of Use</h2> <p>Please take some time to read through.</p> </header> <p>Terms of Use for www.ojblabs.com</p> <p>The use of any product, service or feature (the "Materials") available through the internet websites accessible at OjbLabs.com (collectively, the "Website") by any user of the Website ("You" or "Your" hereafter) shall be governed by the following terms of use:</p> <p>This Website is provided by OjbLabs Limited (hereinafter referred to as "OjbLabs" ), a company incorporated under the Companies Act, 1956 of India, having its registered office at Electronics City, Hosur Road, Bangalore 560 100, India and shall be used for informational purposes only. By using the Website or downloading Materials from the Website, You hereby agree to abide by the terms and conditions set forth in this Terms of Use. In the event of You not agreeing to these terms and conditions, You are requested by OjbLabs not to use the Website or download Materials from the Website.</p> <p>This Website, including all Materials present (excluding any applicable third party materials), is the property of OjbLabs and is copyrighted and protected by worldwide copyright laws and treaty provisions. You hereby agree to comply with all copyright laws worldwide in Your use of this Website and to prevent any unauthorized copying of the Materials. OjbLabs does not grant any express or implied rights under any patents, trademarks, copyrights or trade secret information. OjbLabs has business relationships with thousands of customers, suppliers, governments, and others. For convenience and simplicity, words like joint venture, partnership, and partner are used to indicate business relationships involving common activities and interests, and those words may not indicate precise legal relationships. LIMITED LICENSE:</p> <p>Subject to the terms and conditions set forth in these Terms of Use, OjbLabs grants You a non-exclusive, non-transferable, limited right to access, use and display this Website and the Materials thereon. You agree not to interrupt or attempt to interrupt the operation of the Website in any manner. Unless otherwise specified, the Website is for Your personal and non-commercial use. You shall not modify, copy, distribute, transmit, display, perform, reproduce, publish, license, create derivative works from, transfer, or sell any information, software, products or services obtained from this Website.</p> <p> <strong>BLOGS:</strong> </p> <p>This is to inform and clarify that individuals (including but not limited to employees of OjbLabs and referred to as “Individuals” hereafter) may contribute articles and opinions on this Website entirely at the sole discretion of OjbLabs, in the form of “blogs”, as such term is generally understood. You hereby acknowledge and agree that these blogs constitute the opinion of the Individuals in their personal capacity, and may not represent official positions of OjbLabs in any manner. OjbLabs retains all copyright to these blogs. </p> <p>You may be permitted to post comments and feedback to these blogs. By doing so, You expressly agree and acknowledge to abide by the following:</p> <p>You shall not defame, abuse, harass or threaten OjbLabs or any third party, or otherwise violate the legal rights of OjbLabs or any third party.</p> <p>You shall not contribute any content or take any action that may in any manner adversely affect the reputation of OjbLabs, or that is otherwise detrimental to OjbLabs.</p> <p>You shall not in any manner publish or post any inappropriate, defamatory, infringing, obscene, racist, terrorist, politically slanted, indecent or unlawful topic, name, material or information. </p> <p>You shall not use profane and objectionable language or abbreviations. You shall not use any character(s) as a substitute for objectionable language.</p> <p>You shall not in any manner reveal confidential or proprietary information of any third party. Specifically, You shall not post any material for which You do not have requisite and applicable right(s) under law.</p> <p>You shall not conduct any contests or publish or propagate any forwards.</p> <p>You shall not defame, abuse, harass, stalk, threaten or otherwise violate the legal rights (such as rights of privacy and publicity but not limited to the foregoing) of any other party including OjbLabs.</p> <p>You shall not publish, post, upload, distribute or disseminate any inappropriate, profane, defamatory, obscene, indecent or unlawful topic, name, material or information.</p> <p>You shall not upload or otherwise make available, files that contain images, photographs, software or other material protected by intellectual property laws, including, by way of example, and not as limitation, copyright or trademark laws (or by rights of privacy or publicity) unless You own or control the rights thereto or have received all necessary consent to do the same.</p> <p>You shall not upload files that contain viruses, trojan horses, worms, time bombs, cancelbots, corrupted files, or any other similar software or programs that may damage the operation of another's computer or property of another.</p> <p>You shall not advertise or offer to sell or buy any goods or services for any business purpose</p> <p>You shall not download any file posted that You know, or reasonably should know, cannot be legally reproduced, displayed, performed, and/or distributed in such manner.</p> <p>You shall not falsify or delete any copyright management information, such as author attributions, legal or other proper notices or proprietary designations or labels of the origin or source of software or other material contained in a file that is uploaded.</p> <p>You shall not create a false identity for the purpose of misleading others.</p> <p>You shall not in any way deface or vandalize this Website, or prevent or restrict others from using this Website.</p> <p>You shall indemnify and hold harmless OjbLabs from any claims and loss incurred by OjbLabs as a result of Your violation of these Terms of Use.</p> <p>You acknowledge that OjbLabs may, at its sole discretion, monitor, remove or edit any content that You contribute. OjbLabs may also pursue remedies available to it under law for any violation of these terms and conditions.</p> <p> <strong>THIRD PARTY CONTENT:</strong> </p> <p>The Website makes information of third parties available, including articles, analyst reports, news reports, tools to facilitate calculation, company information and data about financial markets, including any regulatory authority and other financial markets and other data from external sources (the "Third Party Content"). You acknowledge and agree that the Third Party Content is not created or endorsed by OjbLabs. The provision of Third Party Content is for general informational purposes only and does not constitute a recommendation or solicitation to purchase or sell any securities or shares or to make any other type of investment or investment decision. In addition, the Third Party Content is not intended to provide tax, legal or investment advice. You acknowledge that the Third Party Content provided to You is obtained from sources believed to be reliable, but that no guarantees are made by OjbLabs or the providers of the Third Party Content as to its accuracy, completeness, timeliness. You agree not to hold OjbLabs, any business offering products or services through the Website or any provider of Third Party Content liable for any investment decision or other transaction You may make based on Your reliance on or use of such data, or any liability that may arise due to delays or interruptions in the delivery of the Third Party Content for any reason</p> <p>By using any Third Party Content, You may leave this Website and be directed to an external website, or to a website maintained by an entity other than OjbLabs. If You decide to visit any such site, You do so at Your own risk and it is Your responsibility to take all protective measures to guard against viruses or any other destructive elements. OjbLabs makes no warranty or representation regarding, and does not endorse, any linked Websites or the information appearing thereon or any of the products or services described thereon. Links do not imply that OjbLabs or this Website sponsors, endorses, is affiliated or associated with, or is legally authorized to use any trademark, trade name, logo or copyright symbol displayed in or accessible through the links, or that any linked site is authorized to use any trademark, trade name, logo or copyright symbol of OjbLabs or any of its affiliates or subsidiaries. You hereby expressly acknowledge and agree that the linked sites are not under the control of OjbLabs and OjbLabs is not responsible for the contents of any linked site or any link contained in a linked site, or any changes or updates to such sites. OjbLabs is not responsible for webcasting or any other form of transmission received from any linked site. OjbLabs is providing these links to You only as a convenience, and the inclusion of any link shall not be construed to imply endorsement by OjbLabs in any manner of the website.</p> <p> <strong>NO WARRANTIES:</strong> </p> <p>This website, the information and materials on the site, and any software made available on the Website, are provided "as is" without any representation or warranty, express or implied, of any kind, including, but not limited to, warranties of merchantability, non-infringement, or fitness for any particular purpose. There is no warranty of any kind, express or implied, regarding third party content. In spite of OjbLabs’ best endeavors, there is no warranty on behalf of OjbLabs that this Website will be free of any computer viruses. Some jurisdictions do not allow for the exclusion of implied warranties, so the above exclusions may not apply to you.</p> <p> <strong>LIMITATION OF DAMAGES:</strong> </p> <p>In no event shall OjbLabs or any of its subsidiaries or affiliates be liable to any entity for any direct, indirect, special, consequential or other damages (including, without limitation, any lost profits, business interruption, loss of information or programs or other data on your information handling system) that are related to the use of, or the inability to use, the content, materials, and functions of this Website or any linked Website, even if OjbLabs is expressly advised of the possibility of such damages.</p> <p> <strong>DISCLAIMER:</strong> </p> <p>The website may contain inaccuracies and typographical and clerical errors. OjbLabs expressly disclaims any obligation(s) to update this website or any of the materials on this website. OjbLabs does not warrant the accuracy or completeness of the materials or the reliability of any advice, opinion, statement or other information displayed or distributed through the Website. You acknowledge that any reliance on any such opinion, advice, statement, memorandum, or information shall be at your sole risk. OjbLabs reserves the right, in its sole discretion, to correct any errors or omissions in any portion of the Website. OjbLabs may make any other changes to the Website, the materials and the products, programs, services or prices (if any) described in the Website at any time without notice. This Website is for informational purposes only and should not be construed as technical advice of any manner. </p> <p> <strong>POSTING ON THE OjbLabs WEBSITE:</strong> </p> <p>OjbLabs does not claim ownership of the materials You provide to OjbLabs (including feedback and suggestions) or post, upload, input or submit to any section of the Website, (each a "Submission" and collectively "Submissions"). However, by posting, uploading, inputting, providing or submitting ("Posting") Your Submission You are granting OjbLabs, its affiliated companies and necessary sub-licensees permission to use Your Submission in connection with the operation of their Internet businesses (including, without limitation, all services offered by OjbLabs), including, without limitation, the license rights to: copy, distribute, transmit, publicly display, publicly perform, reproduce, edit, translate and reformat Your Submission; to publish Your name in connection with Your Submission; and the right to sublicense such rights to any other party.</p> <p>You hereby acknowledge and agree that no compensation shall be paid or no future commercial consideration has accrued with respect to the use of Your Submission by OjbLabs, as provided herein. OjbLabs shall be under no obligation to post or use any Submission You may provide and OjbLabs shall remove any Submission at any time at its own sole discretion.</p> <p>By Posting a Submission You hereby warrant and represent that You own or otherwise control all of the rights required under worldwide law for Your Submission as described in these Terms of Use including, without limitation, all the rights necessary for You to provide, post, upload, input or submit the Submissions.</p> <p> <strong>LAWFUL AND / OR PROHIBITED USE OF THE WEBSITE:</strong> </p> <p>As a condition of Your use of the Website, You shall not use the Website for any purpose(s) that is unlawful or prohibited by the Terms of Use. You shall not use the Website in any manner that could damage, disable, overburden, or impair any OjbLabs server, or the network(s) connected to any OjbLabs server, or interfere with any other party's use and enjoyment of any services associated with the Website. You shall not attempt to gain unauthorized access to any section of the Website, other accounts, computer systems or networks connected to any OjbLabs server or to any of the services associated with the Website, through hacking, password mining or any other means. You shall not obtain or attempt to obtain any Materials or information through any means not intentionally made available through the Website.</p> <p> <strong>INDEMNITY:</strong> </p> <p>You agree to indemnify and hold harmless OjbLabs, its subsidiaries and affiliates from any claim, cost, expense, judgment or other loss relating to Your use of this Website in any manner, including without limitation of the foregoing, any action You take which is in violation of the terms and conditions of these Terms of Use and against any applicable law.</p> <p> <strong>CHANGES:</strong> </p> <p>OjbLabs reserves the rights, at its sole discretion, to change, modify, add or remove any portion of these Terms of Use in whole or in part, at any time. Changes in these Terms of Use will be effective when notice of such change is posted. Your continued use of the Website after any changes to these Terms of Use are posted will be considered acceptance of those changes. OjbLabs may terminate, change, suspend or discontinue any aspect of the Website, including the availability of any feature(s) of the Website, at any time. OjbLabs may also impose limits on certain features and services or restrict Your access to certain sections or all of the Website without notice or liability. You hereby acknowledge and agree that OjbLabs may terminate the authorization, rights and license given above at any point of time at its own sole discretion and upon such termination; You shall immediately destroy all Materials.</p> <p> <strong>INTERNATIONAL USERS AND CHOICE OF LAW:</strong> </p> <p>This Site is controlled, operated and administered by OjbLabs from its offices within India. OjbLabs makes no representation that Materials on this Website are appropriate or available for use at any other location(s) outside India. Any access to this Website from territories where their contents are illegal is prohibited. You may not use the Website or export the Materials in violation of any applicable export laws and regulations. If You access this Website from a location outside India, You are responsible for compliance with all local laws.</p> <p>These Terms of Use shall be governed by the laws of India, without giving effect to its conflict of laws provisions. You agree that the appropriate court(s) in Bangalore, India, will have the exclusive jurisdiction to resolve all disputes arising under these Terms of Use and You hereby consent to personal jurisdiction in such forum.</p> <p>These Terms of Use constitutes the entire agreement between OjbLabs and You with respect to Your use of the Website. Any claim You may have with respect to Your use of the Website must be commenced within one (1) year of the cause of action. If any provision(s) of this Terms of Use is held by a court of competent jurisdiction to be contrary to law then such provision(s) shall be severed from this Terms of Use and the other remaining provisions of this Terms of Use shall remain in full force and effect.</p> <p>TweetShare on FacebookShare on LinkedInGoogle+ Contact us Subscribe Write to us OjbLabs – Reshaping the World</p> <p>Let’s connect: OjbLabs FoundationOjbLabs Leadership InstituteOjbLabs Science FoundationSustainabilityTerms of UsePrivacy StatementSafe Harbor ProvisionTrademarksSite MapCopyright © 2015 OjbLabs LimitedThe website is best experienced on the following version (or higher) of Chrome 31, Firefox 26, Safari 6 and Internet Explorer 9 browsers</p> </div> </section> <!-- Footer --> <footer id="footer"> <div class="container"> <section class="links"> <div class="row"> <section class="3u 6u(medium) 12u$(small)"> <h3></h3> <ul class="unstyled"> <li><a href="contact-us.html">Contact Us</a></li> <li><a href="privacy-policy.html">Privacy Policy</a></li> <li><a href="terms-of-use.html">Terms and Conditions</a></li> </ul> </section> </div> </section> <div class="row"> <div class="8u 12u$(medium)"> <ul class="copyright"> <li>&copy; Untitled. All rights reserved.</li> <li>Design: <a href="http://templated.co">TEMPLATED</a></li> <li>Images: <a href="http://unsplash.com">Unsplash</a></li> </ul> </div> <div class="4u$ 12u$(medium)"> <ul class="icons"> <li><a class="icon rounded fa-facebook"><span class="label">Facebook</span></a></li> <li><a class="icon rounded fa-twitter"><span class="label">Twitter</span></a></li> <li><a class="icon rounded fa-google-plus"><span class="label">Google+</span></a></li> <li><a class="icon rounded fa-linkedin"><span class="label">LinkedIn</span></a></li> </ul> </div> </div> </div> </footer> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-72149815-1', 'auto'); ga('send', 'pageview'); </script> </body> </html>
html
Charity begins at home and so does favouritism. Most of us have probably experienced the feeling at some point in our lives when our parents love our older or younger siblings more than us. We might wonder why – maybe they’re talented in a particular field, maybe they’re accomplished in their chosen career, etc. It’s no secret that families don’t provide an equal playing field for their children and we all have experienced obvious favouritism firsthand. The impact of favouritism on mental health was masterfully and flawlessly depicted in the Pakistani TV drama Razia, which deviates from the conventional saas-bahu narrative. Razia represents any girl who has experienced favouritism at her own home only due to the patriarchal culture. In one of the episodes, Razia’s mother requested her to put aside the chicken leg piece she had chosen for herself at dinner because it was meant for her father and brother. Children who receive a lot of petting often tend to turn into spoilt brats. They can act aggressively from an early age or throw uncalled-for tantrums. Favoured kids could feel superior and think they can flout the rules. This may have a negative impact on their capacity to maintain relationships as well as on how they behave at work, in school, and even with their friends. Often parents label their kids as “talented” and “black sheep of the family” and the latter could make children develop animosity towards their parents, engage in attention-seeking behaviour, indulge in oppositional behaviour, have low self-esteem, feel unworthy, and begin to harbour resentment towards the preferred siblings, all of which could influence how they behave as adults. In addition, these kids frequently exhibit intense reassurance-seeking conduct and are more sensitive. They are more violent, and depressed, perform worse in school, and have worse self-esteem as they are constantly trying just to please people – parents, friends and teachers. A majority of students feel discriminated against or alienated from teachers because of their partial nature, which can lead to students feeling demotivated, discouraged, or underconfident in comparison to those pupils who have this advantage. It was shown that pupils prefer teachers who are personally close to them. Favouritism is an unfair practise in schools that leads to and influences a student’s failure or success. Education disparities and unfair benefits occur when teachers get along better with some pupils than others and provide them additional privileges as a result. Did you feel that your hard work more than often goes unappreciated and yet a colleague is praised or given special treatment for that same equal workload? Here favouritism is apparent which can lead to an experience of difficulty in focusing and one might become disinterested in their work. ‘I work in a team of four with similar daily workloads, however, my manager frequently praises a team member who not only engaged in unethical workplace practices but also displayed polarising behaviour. They are always given preferential treatment over others, which has significantly changed the entire workplace‘, according to Saima, a senior marketing manager at a reputable company. A manager can undermine employee motivation and weaken team unity by treating people unequally. The effects of a company’s management treating some people better than others are not limited to those who are in the spotlight. It may have a knock-on impact that ruins team harmony, reduces morale, and affects output in general. This ripple affects every area of the work – team unity gets disrupted, resentment among team members develops and enthusiasm for team tasks drops down excruciatingly. Due to the perception that their work isn’t valued or that they won’t be able to grow within the organisation, favouritism may result in greater employee turnover. It is often known that favouritism leads to poor economic progress, violent political opposition, and economic inefficiency. The quality of service provided to the public may suffer when someone is hired based on relationships rather than qualifications and expertise. Additionally, the confidentiality that ought to accompany government recruiting and contracting procedures is compromised by favouritism, which is often concealed. Favouritism – at home, work, schools/colleges- can be readily eliminated with correct education and by unlearning prejudiced behaviour. To ensure better practises in the future, one can take the essential action by being able to recognise it. As Infosys co-founder N R Narayana Murthy rightly said ‘India needs a culture of honesty and no favoritism.’ Hence, treating everyone equally is not only the right thing to do – it is a smart thing to do.
english
/* 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 v1 import ( conditions "github.com/openshift/custom-resource-status/conditions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. // SidecarBSpec defines the desired state of SidecarB type SidecarBSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "make" to regenerate code after modifying this file // Image is the sidecar's container image. // +kubebuilder:validation:Optional Image string `json:"image,omitempty"` } // SidecarBStatus defines the observed state of SidecarB type SidecarBStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "make" to regenerate code after modifying this file // +kubebuilder:validation:Optional // +patchMergeKey=type // +patchStrategy=merge Conditions []conditions.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } // +kubebuilder:object:root=true // +kubebuilder:subresource:status // SidecarB is the Schema for the sidecarbs API type SidecarB struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec SidecarBSpec `json:"spec,omitempty"` Status SidecarBStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true // SidecarBList contains a list of SidecarB type SidecarBList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []SidecarB `json:"items"` } func init() { SchemeBuilder.Register(&SidecarB{}, &SidecarBList{}) }
go
'use strict'; import DlimitsMiddleware from '@compropago-dev/dlimits/dlimits-express-middleware'; import redis from './../../connections/redis_ratelimit'; import config from './../../config'; let keyHandler = (req, res, cb) => { cb(null, req.connection.remoteAddress); }; let limitHandler = (req, res) => { return res.io({ status: 'error', code: 429, message: `API rate limit exceeded for ${req.connection.remoteAddress}`, data: null }); }; let middleware = DlimitsMiddleware( config.ratelimit.hostname.tries, config.ratelimit.hostname.time, redis, keyHandler, limitHandler, { minWait: config.ratelimit.hostname.minWait, maxWait: config.ratelimit.hostname.maxWait, }); export default middleware;
javascript
<reponame>Peter-G-Stone/proj-photo-feed {"ast":null,"code":"\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n/**\n * Safe chained function\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n *\n * @param {function} functions to chain\n * @returns {function|null}\n */\n\nfunction createChainedFunction() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n return funcs.filter(function (f) {\n return f != null;\n }).reduce(function (acc, f) {\n if (typeof f !== 'function') {\n throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');\n }\n\n if (acc === null) return f;\n return function chainedFunction() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n acc.apply(this, args);\n f.apply(this, args);\n };\n }, null);\n}\n\nvar _default = createChainedFunction;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","map":null,"metadata":{},"sourceType":"script"}
json
<gh_stars>0 /* * This file and its contents are supplied under the terms of the * Common Development and Distribution License ("CDDL"), version 1.0. * You may only use this file in accordance with the terms of version * 1.0 of the CDDL. * * A full copy of the text of the CDDL should have accompanied this * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* * Copyright 2021 <contributor> */ /* * Document the purpose of the file here. */
java
const { remote } = require('electron'); var fs = require('fs'); var server = sessionStorage.getItem('server'); var http = require('http'); const { info } = require('console'); const app = remote.app; let documents = app.getPath('documents'); $('#server-name').text(server) $('#state-box').hover(function(){ $('#state').text('On ?'); }, function (){ $('#state').text('Off'); }); $('#num-players').text('/50'); fs.readFile(documents+'/MCSM/'+sessionStorage.getItem('server')+'/mcsm.json', (err, data) =>{ if (err) throw err; $('#mc-version').text(JSON.parse(data).version) }); var options = { host: 'ipv4bot.whatismyipaddress.com', port: 80, path: '/' }; http.get(options, function(res){ res.on("data", function(chunk) { $('#ip').text(chunk); $('#loader').remove(); }); }); var player = { host: 'localhost', port: 8081, path: '/players' }; http.get(player, function(res){ res.on("data", function(chunk) { $('#num-players').text(JSON.parse(chunk.toString()).count); }); }); $(document).on('click', '#ip-box', (e) =>{ copyToClipboard($('#ip')); $('#ip-box [data-toggle="tooltip"]').attr('data-original-title', 'Copied !') $('#ip-box [data-toggle="tooltip"]').tooltip('hide') $('[data-toggle="tooltip"][id="ip-box"]').tooltip('show') $('#ip-box').css('transform', 'scale(1.2)') setTimeout( function() { $('#ip-box').css('transform', 'scale(1)') }, 80); }) function copyToClipboard(element) { var $temp = $("<input>"); $("body").append($temp); $temp.val($(element).text()).select(); document.execCommand("copy"); $temp.remove(); } $(document).ready(function(){ $('[data-toggle="tooltip"]').tooltip() }) $(document).ready(function(){ $('#search').on("keyup", function() { var value = $(this).val().toLowerCase(); $('[role=main] div').filter(function() { if (!($(this).text().toLowerCase().indexOf(value) > -1)){ $(this).css('opacity', 0.5) } else{ $(this).css('opacity', 1) } }); }); });
javascript
<gh_stars>0 {"variants":{"axis\u003dy":{"model":"conquest:block/mixed_slate_wall_balustrade_base","uvlock":true},"axis\u003dz":{"model":"conquest:block/mixed_slate_wall_balustrade","uvlock":true},"axis\u003dx":{"model":"conquest:block/mixed_slate_wall_balustrade","y":90,"uvlock":true}}}
json
{ "actors": [ "Alliance of Small Island States", "European Union", "Independent association of Latin America and the Caribbean", "Group of 77" ], "countries": [ "United States", "Jamaica", "Saudi Arabia", "China", "Chile", "Bolivia" ], "enb_end_date": "02-Jun-15", "enb_long_title": "Bonn Climate Change Conference - June 2015", "enb_short_title": "SB 42", "enb_start_date": "02-Jun-15", "enb_url": "http://www.iisd.ca/vol12/enb12629e.html", "id": "enb12629e_4", "section_title": "Adaptation and Loss and Damage", "sentences": [ "ADP Co-chair Reifsnyder asked parties to consider ways to streamline the section of the negotiating text on adaptation and loss and damage. Emphasizing the need to allow time for group coordination, Bolivia, for the G-77/CHINA, suggested addressing sections of the text thematically and, supported by Jamaica, for AOSIS, beginning with streamlining the text on monitoring and evaluation. The US made proposals for, inter alia, streamlining the text on commitments, addressing overlaps between monitoring and evaluation, and communications and reporting.", "The EU supported addressing sections of the text thematically and suggested starting with the text on commitments. Saudi Arabia, for LMDCs, suggested deletions to avoid duplications, including in the text on commitments. Chile, for AILAC, announced proposals to streamline the text on, inter alia, long term and global aspects of adaptation, and commitments. TIMOR LESTE suggested streamlining the section on loss and damage.", "AOSIS called for considering adaptation and loss and damage as separate issues. Delegates agreed to consider options to streamline the text on adaptation in the context of a facilitated discussion, starting with text on: reporting for adaptation; commitments; and monitoring and evaluation." ], "subtype": "", "topics": [], "type": "" }
json
{ "name": "@posva/vuefire-core", "version": "2.3.0", "description": "Shared code for vue + Firebase apps used by vuefire and vuexfire", "author": "<NAME> <<EMAIL>>", "homepage": "https://github.com/vuejs/vuefire#readme", "license": "MIT", "sideEffects": false, "main": "dist/vuefire-core.cjs.js", "types": "dist/packages/@posva/vuefire-core/src", "browser": "dist/vuefire-core.esm.js", "module": "dist/vuefire-core.esm.js", "directories": { "lib": "src", "test": "test" }, "files": [ "src", "dist", "LICENSE" ], "publishConfig": { "access": "public" }, "repository": { "type": "git", "url": "git+https://github.com/vuejs/vuefire.git" }, "scripts": { "pretest": "yarn run lint", "test": "yarn run test:unit", "build": "rollup -c ../../../rollup.config.js", "prepare": "yarn run build", "postversion": "yarn run build", "test:unit": "jest", "lint": "eslint src __tests__ --color --ext ts", "dev": "yarn run test:unit --watchAll" }, "bugs": { "url": "https://github.com/vuejs/vuefire/issues" }, "devDependencies": { "@posva/vuefire-test-helpers": "^1.2.2" }, "gitHead": "e3e2df3624572cec86ed861f2472df4d143f2265" }
json
<gh_stars>10-100 from os import truncate import time import datetime import json import requests from pyngrok import ngrok import websockets import asyncio from django.utils import timezone from django.conf import settings from constance import config from channels.db import database_sync_to_async from tau.streamers.utils import update_all_streamers from tau.twitchevents.models import TwitchEvent from tau.twitchevents.serializers import TwitchEventSerializer from .utils import ( setup_ngrok, init_webhooks, refresh_access_token, teardown_all_acct_webhooks, teardown_webhooks, get_active_event_sub_ids, get_active_streamer_sub_ids ) class Worker(): irc_url = 'wss://irc-ws.chat.twitch.tv' connection = None loop = None tasks = [] irc_connected = False wh_delay = 15 irc_delay = 2 active_event_sub_ids = [] active_streamer_sub_ids = [] ngrok_tunnel = None token_refreshed = False def __init__(self, token): self.tau_token = token def setup_webhooks(self): twitch_access_token = config.TWITCH_APP_ACCESS_TOKEN if twitch_access_token != '': print(f'---- Establishing IRC and Webhook Connections ----') refresh_access_token() # refresh the access token self.token_refreshed = True print(' [Access tokens refreshed]') if not config.RESET_ALL_WEBHOOKS: teardown_webhooks(self.tau_token) print(' [Old WebHooks torn down]') else: print(' [Tearing down all webhooks]') teardown_webhooks(self.tau_token) teardown_all_acct_webhooks() config.RESET_ALL_WEBHOOKS = False self.active_event_sub_ids, self.active_streamer_sub_ids = init_webhooks(self.public_url, self.tau_token) print(' [New WebHooks Initialized]') update_all_streamers() print(' [All streamer statuses updated]\n') else: print( 'You have not yet set up a username, or authorized TAU to connect ' 'to your twitch account. Webhooks will be set up after you do so.' ) async def connect(self): delay = 1 while True: if self.token_refreshed: self.connection = await websockets.client.connect(self.irc_url) if self.connection.open: print(' [Opening IRC Connection]') await self.initial_connect() print(' [Connected to IRC]') self.irc_connected = True break else: print(f'---- Could not connect, waiting {delay}s to reconnect ----') await asyncio.sleep(delay) if delay < 120: delay = max(delay*2, 120) else: await asyncio.sleep(delay) def create_event_loop(self): self.loop = asyncio.get_event_loop() self.tasks = [ asyncio.ensure_future(self.manage_webhooks()), asyncio.ensure_future(self.manage_irc_loop()), asyncio.ensure_future(self.check_irc_settings()), ] self.loop.run_until_complete(asyncio.wait(self.tasks)) async def manage_irc_loop(self): while True: use_irc = await database_sync_to_async(self.lookup_setting)('USE_IRC') if use_irc and not self.irc_connected: await self.connect_irc() await asyncio.sleep(self.irc_delay) async def connect_irc(self): await self.connect() await self.recieve() def disconnect_irc(self): pass async def manage_webhooks(self): refresh_webhooks = True while True: refreshed_ngrok = False if settings.USE_NGROK and self.ngrok_tunnel is None: self.public_url, self.ngrok_tunnel = await database_sync_to_async(setup_ngrok)() refreshed_ngrok = True elif settings.USE_NGROK: # Check to see if tunnel is still alive r = requests.get(f'{self.public_url}/api/v1/heartbeat') if r.status_code != 200: try: ngrok.disconnect(self.ngrok_tunnel.public_url) except: pass self.public_url, self.ngrok_tunnel = await database_sync_to_async(setup_ngrok)() refreshed_ngrok = True else: self.public_url = settings.BASE_URL await database_sync_to_async(self.set_setting)('PUBLIC_URL', settings.BASE_URL) # check for difference in required webhooks: new_event_sub_ids = await database_sync_to_async(get_active_event_sub_ids)() scopes_refreshed = await database_sync_to_async(self.lookup_setting)('SCOPES_REFRESHED') if set(self.active_event_sub_ids) != set(new_event_sub_ids) and scopes_refreshed: refresh_webhooks = True await database_sync_to_async(self.set_setting)('SCOPES_REFRESHED', False) if refresh_webhooks or refreshed_ngrok: await database_sync_to_async(self.setup_webhooks)() refresh_webhooks = False force_refresh_webhooks = await database_sync_to_async(self.lookup_setting)('FORCE_WEBHOOK_REFRESH') if force_refresh_webhooks: await database_sync_to_async(self.setup_webhooks)() await database_sync_to_async(self.set_setting)('FORCE_WEBHOOK_REFRESH', False) await asyncio.sleep(self.wh_delay) def run(self): self.token = config.TWITCH_ACCESS_TOKEN self.username = config.CHANNEL self.create_event_loop() async def initial_connect(self): token = await database_sync_to_async(self.lookup_setting)('TWITCH_ACCESS_TOKEN') caps = 'twitch.tv/tags twitch.tv/commands twitch.tv/membership' await self.connection.send(f'CAP REQ :{caps}') await self.connection.send(f'PASS oauth:{token}') await self.connection.send(f'NICK {self.username}') await self.connection.send(f'JOIN #{self.username.lower()}') async def recieve(self): while True: try: message = await self.connection.recv() data = self.parse_message(message) # pp.pprint(data) if 'custom-reward-id' in data['tags']: await database_sync_to_async(self.handle_channel_points)(data) elif data['prefix'] is None and data['command'] == 'PING': await self.connection.send('PONG') except websockets.exceptions.ConnectionClosed: use_irc = await database_sync_to_async(self.lookup_setting)('USE_IRC') if use_irc: print('Websocket to twitch irc unexpectedly closed... reconnecting') await self.connect() else: break async def check_irc_settings(self): while True: await asyncio.sleep(self.irc_delay) use_irc = await database_sync_to_async(self.lookup_setting)('USE_IRC') if not use_irc and self.irc_connected: await self.connection.close() self.irc_connected = False print('---- Disconnected from twitch irc ws server ----') def lookup_setting(self, setting): return getattr(config, setting) def set_setting(self, setting, value): setattr(config, setting, value) def handle_channel_points(self, data): start_time = timezone.now() - datetime.timedelta(seconds=2) time.sleep(1) redemption = TwitchEvent.objects.filter( event_type='channel-channel_points_custom_reward_redemption-add', created__gte=start_time, event_data__user_login=data['tags']['display-name'].lower() ) if redemption.exists(): redemption = redemption.first() redemption.event_data['user_input_emotes'] = data['tags']['emotes'] serializer = TwitchEventSerializer(redemption, many=False) headers = { 'Authorization': f'Token {self.tau_token}', 'Content-type': 'application/json' } requests.put( f'{settings.LOCAL_URL}/api/v1/twitch-events/{redemption.id}', data=json.dumps(serializer.data), headers=headers ) return def parse_message(self, data): message = { 'raw': data, 'tags': {}, 'prefix': None, 'command': None, 'params': [], 'message-text': None } position = 0 nextspace = 0 if data[0] == '@': nextspace = data.find(' ') if(nextspace == -1): return None rawTags = data[1:nextspace].split(';') for tag in rawTags: pair = tag.split('=') if len(pair) == 1: value = True else: value = pair[1] message['tags'][pair[0]] = value position = nextspace + 1 while data[position] == ' ': position += 1 if data[position] == ':': nextspace = data.find(' ', position) if nextspace == -1: return None message['prefix'] = data[position:nextspace] position = nextspace + 1 while data[position] == ' ': position += 1 nextspace = data.find(' ', position) if nextspace == -1: if len(data) > position: message['command'] = data[position:] else: message['command'] = None return message message['command'] = data[position:nextspace] while data[position] == ' ': position+=1 while position < len(data): nextspace = data.find(' ', position) if data[position] == ':': message['params'].append(data[position:]) break if nextspace != -1: message['params'].append(data[position:nextspace]) position = nextspace + 1 while data[position] == ' ': position += 1 continue if nextspace == -1: message['params'].append(data[position:]) break if message['command'] == 'PRIVMSG': message['message-text'] = message['params'][2][1:].replace("\n", "").replace("\r", "") if 'emotes' in message['tags']: emotes = message['tags']['emotes'] emote_list = [] if emotes != '': for emote_txt in emotes.split('/'): emote_data=emote_txt.split(':') emote_list.append({ 'id': emote_data[0], 'positions': [ [int(val) for val in position.split('-')] for position in emote_data[1].split(',') ] }) message['tags']['emotes'] = emote_list return message
python
<filename>wtf/text/icu/UTextProviderUTF16.cpp /* * Copyright (C) 2014 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" #include <wtf/text/icu/UTextProviderUTF16.h> #include <algorithm> #include <wtf/text/icu/UTextProvider.h> namespace WTF { // UTF16ContextAware provider static UText* uTextUTF16ContextAwareClone(UText*, const UText*, UBool, UErrorCode*); static int64_t uTextUTF16ContextAwareNativeLength(UText*); static UBool uTextUTF16ContextAwareAccess(UText*, int64_t, UBool); static int32_t uTextUTF16ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode*); static void uTextUTF16ContextAwareClose(UText*); static const struct UTextFuncs textUTF16ContextAwareFuncs = { sizeof(UTextFuncs), 0, 0, 0, uTextUTF16ContextAwareClone, uTextUTF16ContextAwareNativeLength, uTextUTF16ContextAwareAccess, uTextUTF16ContextAwareExtract, nullptr, nullptr, nullptr, nullptr, uTextUTF16ContextAwareClose, nullptr, nullptr, nullptr }; static inline UTextProviderContext textUTF16ContextAwareGetCurrentContext(const UText* text) { if (!text->chunkContents) return UTextProviderContext::NoContext; return text->chunkContents == text->p ? UTextProviderContext::PrimaryContext : UTextProviderContext::PriorContext; } static void textUTF16ContextAwareMoveInPrimaryContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) { ASSERT(text->chunkContents == text->p); ASSERT_UNUSED(forward, forward ? nativeIndex >= text->b : nativeIndex > text->b); ASSERT_UNUSED(forward, forward ? nativeIndex < nativeLength : nativeIndex <= nativeLength); text->chunkNativeStart = text->b; text->chunkNativeLimit = nativeLength; int64_t length = text->chunkNativeLimit - text->chunkNativeStart; // Ensure chunk length is well defined if computed length exceeds int32_t range. ASSERT(length < std::numeric_limits<int32_t>::max()); text->chunkLength = length < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(length) : 0; text->nativeIndexingLimit = text->chunkLength; int64_t offset = nativeIndex - text->chunkNativeStart; // Ensure chunk offset is well defined if computed offset exceeds int32_t range or chunk length. ASSERT(offset < std::numeric_limits<int32_t>::max()); text->chunkOffset = std::min(offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0, text->chunkLength); } static void textUTF16ContextAwareSwitchToPrimaryContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) { ASSERT(!text->chunkContents || text->chunkContents == text->q); text->chunkContents = static_cast<const UChar*>(text->p); textUTF16ContextAwareMoveInPrimaryContext(text, nativeIndex, nativeLength, forward); } static void textUTF16ContextAwareMoveInPriorContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) { ASSERT(text->chunkContents == text->q); ASSERT(forward ? nativeIndex < text->b : nativeIndex <= text->b); ASSERT_UNUSED(nativeLength, forward ? nativeIndex < nativeLength : nativeIndex <= nativeLength); ASSERT_UNUSED(forward, forward ? nativeIndex < nativeLength : nativeIndex <= nativeLength); text->chunkNativeStart = 0; text->chunkNativeLimit = text->b; text->chunkLength = text->b; text->nativeIndexingLimit = text->chunkLength; int64_t offset = nativeIndex - text->chunkNativeStart; // Ensure chunk offset is well defined if computed offset exceeds int32_t range or chunk length. ASSERT(offset < std::numeric_limits<int32_t>::max()); text->chunkOffset = std::min(offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0, text->chunkLength); } static void textUTF16ContextAwareSwitchToPriorContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) { ASSERT(!text->chunkContents || text->chunkContents == text->p); text->chunkContents = static_cast<const UChar*>(text->q); textUTF16ContextAwareMoveInPriorContext(text, nativeIndex, nativeLength, forward); } static UText* uTextUTF16ContextAwareClone(UText* destination, const UText* source, UBool deep, UErrorCode* status) { return uTextCloneImpl(destination, source, deep, status); } static inline int64_t uTextUTF16ContextAwareNativeLength(UText* text) { return text->a + text->b; } static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward) { if (!text->context) return false; int64_t nativeLength = uTextUTF16ContextAwareNativeLength(text); UBool isAccessible; if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible)) return isAccessible; nativeIndex = uTextAccessPinIndex(nativeIndex, nativeLength); UTextProviderContext currentContext = textUTF16ContextAwareGetCurrentContext(text); UTextProviderContext newContext = uTextProviderContext(text, nativeIndex, forward); ASSERT(newContext != UTextProviderContext::NoContext); if (newContext == currentContext) { if (currentContext == UTextProviderContext::PrimaryContext) textUTF16ContextAwareMoveInPrimaryContext(text, nativeIndex, nativeLength, forward); else textUTF16ContextAwareMoveInPriorContext(text, nativeIndex, nativeLength, forward); } else if (newContext == UTextProviderContext::PrimaryContext) textUTF16ContextAwareSwitchToPrimaryContext(text, nativeIndex, nativeLength, forward); else { ASSERT(newContext == UTextProviderContext::PriorContext); textUTF16ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward); } return true; } static int32_t uTextUTF16ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode) { // In the present context, this text provider is used only with ICU functions // that do not perform an extract operation. ASSERT_NOT_REACHED(); *errorCode = U_UNSUPPORTED_ERROR; return 0; } static void uTextUTF16ContextAwareClose(UText* text) { text->context = nullptr; } UText* openUTF16ContextAwareUTextProvider(UText* text, const UChar* string, unsigned length, const UChar* priorContext, int priorContextLength, UErrorCode* status) { if (U_FAILURE(*status)) return nullptr; if (!string || length > static_cast<unsigned>(std::numeric_limits<int32_t>::max())) { *status = U_ILLEGAL_ARGUMENT_ERROR; return nullptr; } text = utext_setup(text, 0, status); if (U_FAILURE(*status)) { ASSERT(!text); return nullptr; } initializeContextAwareUTextProvider(text, &textUTF16ContextAwareFuncs, string, length, priorContext, priorContextLength); return text; } } // namespace WTF
cpp
Prince Harry and Meghan Markle assumed the title of Duke and Duchess of Sussex on May 19 this year. By India Today Web Desk: If you thought being a Royal was all about fancy clothes and fairytale weddings, that's not really the case. Take Meghan Markle, for example. The Suits actress tied the knot with Britain's Prince Harry on May 19 this year, and has made several stunning public appearances since. For her first Trooping the Colour ceremony, Meghan chose a pink off-shoulder Carolina Herrera dress, paired with a Philip Treacy hat, and all hell broke loose. Not everyone, however, was happy with what the Duchess of Sussex wore at the event. Because as a Royal, Meghan is supposed to follow several rules. The off-shoulder dress did not exactly fit there. This will be applicable whenever Meghan goes travelling. This is in case a senior member of the Royal family dies suddenly, and the other royals must be in suitable attire. This stems from Queen Elizabeth II's personal experience, as she was abroad when her father, King George VI passed away. As she had no mourning attire with her, she was forced to wait on the plane when she returned to London, so a black outfit could be brought to her. One of the Royal rules dictates that you don't wear a headgear other than a tiara after 6pm. Meghan has been rocking her headgear at recent royal engagements. But all of them must be off by 6pm. It may seem like a small detail, but dark or colourful nails are banned. Meghan did opt for a pale pink colour for her wedding and engagement. But the rule IS that Royal women should stick to pale, natural and light shades only. This a long-standing rule dating back to the 14th Century, when King Edward III banned all royals from wearing fur. But William and Kate infamously broke this rule when they wore fur scarves while on a tour of Canada. To avoid Royal women having a Marilyn Monroe moment, it's said that weights are sewn into the hem to stop them flying up in the breeze. But Kate Middleton has clearly not followed this rule, with instances of her skirt being caught in gusts of wind. A Royal female must wear a pair of pantyhose. Meghan Markle too followed suit when she stepped out in a pair of nude tights with her dress on her first appearance post her wedding with Prince Harry.
english
<filename>service/src/main/java/com/github/gv2011/jctrl/service/DetachedRunner.java package com.github.gv2011.jctrl.service; import static com.github.gv2011.util.ex.Exceptions.callWithCloseable; import static com.github.gv2011.util.ex.Exceptions.format; import static org.slf4j.LoggerFactory.getLogger; import java.io.IOException; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.ServerSocket; import java.nio.file.Path; import org.slf4j.Logger; import com.github.gv2011.jctrl.ShutdownSocket.Command; abstract class DetachedRunner { private static final Logger LOG = getLogger(DetachedRunner.class); final Path installDirectory; final String command; private final int port; DetachedRunner(final Path installDirectory, final int port, final String command) { this.installDirectory = installDirectory; this.port = port; this.command = command; } final void run() { LOG.info("Started."); checkControlPortIsAvailable(); startService(); new ControlConnection(port, installDirectory.resolve(Main.CERT_DIR_NAME)) .sendCommand(Command.WAIT_FOR_TERMINATION) ; } private void checkControlPortIsAvailable() { final InetSocketAddress endpoint = new InetSocketAddress(InetAddress.getLoopbackAddress(), port); callWithCloseable(()->new ServerSocket(), s->{ try { s.bind(endpoint); } catch (final IOException e) { throw new RuntimeException(format("Control port at {} is not available.", endpoint), e); } }); LOG.info("Control port at {} is available.", port); } abstract void startService(); }
java
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Sizer</title> <link rel="stylesheet" href="../sizer.css"> <style> body { font-family : Sans-Serif; background : #151515; } header { max-width : 800px; margin : auto; text-align : left; } h1 { font-size : 40px; color : #FFFFFF; } header p { color : #DDDDDD; } .container { max-width : 800px; margin-top : 40px; margin-right : auto; margin-bottom : 40px; margin-left : auto; padding : 10px; overflow : auto; background : #DDDDDD; } .col-half { float : left; width : 50%; } .col-fourth { float : left; width : 25%; } .col-threefourth { float : left; width : 75%; } .text { padding-left : 20px; padding-right : 20px; box-sizing : border-box; } .text p { text-align : justify; color : #555555; } </style> </head> <body> <header> <h1>Sizer</h1> <p>Go ahead, resize the viewport!</p> </header> <div class="container"> <div class="col-half" data-sizer="text-1"> <img src="./photo_4-3.jpeg" alt=""> </div> <div class="col-half text" id="text-1"> <h2>Do You Like Yogurt?</h2> <p>Of course you do! Only silly aligators don't like yogurt! The bacteria used to make yogurt are known as "yogurt cultures". Fermentation of lactose by these bacteria produces lactic acid, which acts on milk protein to give yogurt its texture and characteristic tart flavor.[1] Cow's milk is commonly available worldwide, and, as such, is the milk most commonly used to make yogurt. Milk from water buffalo, goats, ewes, mares, camels, and yaks is also used to produce yogurt where available locally. Milk used may be homogenized or not (milk distributed in many parts of the world is homogenized); both types may be used, with substantially different results.<br> SOURCE: <a href="https://en.wikipedia.org/wiki/Yogurt">https://en.wikipedia.org/wiki/Yogurt</a></p> </div> </div> <div class="container"> <div class="col-threefourth text" id="text-2"> <h2>Do You Like Yogurt?</h2> <p>Of course you do! Only silly aligators don't like yogurt! The bacteria used to make yogurt are known as "yogurt cultures". Fermentation of lactose by these bacteria produces lactic acid, which acts on milk protein to give yogurt its texture and characteristic tart flavor.[1] Cow's milk is commonly available worldwide, and, as such, is the milk most commonly used to make yogurt. Milk from water buffalo, goats, ewes, mares, camels, and yaks is also used to produce yogurt where available locally. Milk used may be homogenized or not (milk distributed in many parts of the world is homogenized); both types may be used, with substantially different results.<br> SOURCE: <a href="https://en.wikipedia.org/wiki/Yogurt">https://en.wikipedia.org/wiki/Yogurt</a></p> </div> <div class="col-fourth" data-sizer="text-2"> <img src="./photo_16-9.jpeg" alt="" style="right: -75%;"> </div> </div> <div class="container"> <div class="col-half" data-sizer="text-3"> <img src="./photo_9-16.jpeg" alt=""> </div> <div class="col-half text" id="text-3"> <h2>Do You Like Yogurt?</h2> <p>Of course you do! Only silly aligators don't like yogurt! The bacteria used to make yogurt are known as "yogurt cultures". Fermentation of lactose by these bacteria produces lactic acid, which acts on milk protein to give yogurt its texture and characteristic tart flavor.[1] Cow's milk is commonly available worldwide, and, as such, is the milk most commonly used to make yogurt. Milk from water buffalo, goats, ewes, mares, camels, and yaks is also used to produce yogurt where available locally. Milk used may be homogenized or not (milk distributed in many parts of the world is homogenized); both types may be used, with substantially different results. <br> SOURCE: <a href="https://en.wikipedia.org/wiki/Yogurt">https://en.wikipedia.org/wiki/Yogurt</a></p> </div> </div> <div class="container"> <div data-sizer="16:9"> <img src="./photo_9-16.jpeg" alt=""> </div> </div> <div class="container"> <div data-sizer="4:3"> <img src="./photo_1-1.jpeg" alt=""> </div> </div> <div class="container"> <div data-sizer="693:329"> <img src="./photo_3-4.jpeg" alt=""> </div> </div> <div class="container"> <div class="col-half" data-sizer="text-3" data-sizer-contain> <img src="./photo_9-16.jpeg" alt=""> </div> <div class="col-half text" id="text-3"> <h2>Do You Like Yogurt?</h2> <p>Of course you do! Only silly aligators don't like yogurt! The bacteria used to make yogurt are known as "yogurt cultures". Fermentation of lactose by these bacteria produces lactic acid, which acts on milk protein to give yogurt its texture and characteristic tart flavor.[1] Cow's milk is commonly available worldwide, and, as such, is the milk most commonly used to make yogurt. Milk from water buffalo, goats, ewes, mares, camels, and yaks is also used to produce yogurt where available locally. Milk used may be homogenized or not (milk distributed in many parts of the world is homogenized); both types may be used, with substantially different results. <br> SOURCE: <a href="https://en.wikipedia.org/wiki/Yogurt">https://en.wikipedia.org/wiki/Yogurt</a></p> </div> </div> <div class="container"> <div data-sizer="16:9" data-sizer-contain> <img src="./photo_1-1.jpeg" alt=""> </div> </div> <script src="../sizer.js"></script> </body> </html>
html
Dunzo is seeking approval to raise $35 million via a rights issue, but some of its investors feel the cash-strapped startup’s valuation be slashed to about $200 million for the financing to happen. This and more in today’s ETtech Morning Dispatch. Online gaming firms aren’t getting any immediate relief from their Goods and Services Tax (GST) woes, as tax notices stand on firm legal ground, Central Board of Indirect Taxes and Customs chairman said. The diversified conglomerate is going for climate-risk modelling to identify the hotspots owing to extreme weather conditions, Chairman Sanjiv Puri said. Puri said that a team of experts is engaged in this job of modelling comprising big data analytics. The board of REC has approved fundraising of up to Rs 1.2 lakh crore under different debt instruments for financial year 2023-24. The funds will be raised for different maturities, through different instruments, depending upon the actual requirement of funds, asset-liability position and prevailing market conditions. The government’s recent amendment is being implemented in two phases - the first from December 1 and the second from April 1, 2023. The first phase involves implementing features such as battery traceability and spacing between cells, among other requirements. Drive through the streets of New Delhi and its surrounds and the Indian capital is abuzz with activity. Rusty metal signs that tout “Electric Charging” stand out, along with stations that power electric two-and-three wheelers. Startups building technology to drive greening and sustainability are hustling for funding. Multi-asset alternative investment platform Grip has brought on board Vaibhav Laddha as chief business officer. Laddha will lead growth initiatives for the company and drive strategic business partnerships with other stakeholders of the ecosystem such as financial institutions, neo-banks, and wealth management outfits. The transaction, among the largest equity fund raising by a listed infrastructure company, will help IRB deleverage its balance sheet and have access to new growth capital to participate in new projects and the government’s ambitious asset monetization plan, said Founder and Chairman Virendra Mhaiskar told ET. Fintech startup Grip Invest, which has now raised a total of $3.6 million, will use the fresh capital to expand the range of investment products offered, launch new user features and strengthen its team.
english
<gh_stars>10-100 {"Id":"341258","ProductId":"B001RVFEP2","UserId":"A215WH6RUDUCMP","ProfileName":"Shilom","HelpfulnessNumerator":1,"HelpfulnessDenominator":1,"Score":5,"date":"2010-03-13","Summary":"Tasty!","text":"We all have our vices, mine has always been chips. Specifically, Bettermade BBQ chips, so as I'm trying to eat healthier I've tried to find a replacement for that craving. I decided to give the popchips a try, thinking if they were at least okay I could replace my cravings for them. They are better than okay! These little guys are full of flavor and crunch! And not to sound like a pig, but I could eat a half a bag of Bettermade in one sitting, but these little 8 oz bags, even though they are small, they fill me up! I was shocked! I am not kidding, I am eating healthier, giving in to my craving, and getting full from one small bag. You cannot go wrong with these, even my kids love them! I am thrilled to have found a healthy alternative to fatty chips!"}
json
Megan Thee Stallion is a hottie and she knows how to stun every single time. She successfully entered the mainstream with her 2019 hit 'Hot Girl Summer' — a self-love anthem that has inspired millions of people to unapologetically embrace their hotness. But with her latest appearance on the cover of Sports Illustrated Swimsuit's 2021 issue, she is setting new standards everyday. Meghan Thee Stallion is the first female rapper to feature on the cover of Sports Illustrated swimsuit issue. Meghan is seen in different swimsuits. She is seen in a nude detailed cut out swimsuit. The swimsuit hugs her curves and complements her skin tone. For another image, she is seen in a bright yellow chiffon swimsuit with a plunging neckline, waist and neck cut outs and with a thong style bottom. In another video released, she is seen in a hot pink floral top with a bottle green bikini bottom. She looks stunning in this colour combination and looks better than ever. Meghan in another snap is seen in a silver cut out bikini. The metallic piece had a halter neck with straps and cut that accentuated her curves as she sizzled on the beach. Megan Thee Stallion says her love for the magazine goes back to another history-making cover star, Tyra Banks who became the first Black model to snag a solo cover in 1997 — and posed again in 2019. Catch us for latest Bollywood News, New Bollywood Movies update, Box office collection, New Movies Release , Bollywood News Hindi, Entertainment News, Bollywood Live News Today & Upcoming Movies 2024 and stay updated with latest hindi movies only on Bollywood Hungama.
english
package org.tim.server.command.handler; import cn.hutool.core.date.DateTime; import cn.hutool.core.util.ObjectUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.tim.common.packets.ChatBody; import org.tim.common.packets.Command; import org.tim.server.command.AbstractCmdHandler; import org.tim.server.helper.TIM; import org.tim.server.protocol.IMServer; import org.tim.server.protocol.tcp.TCPSocketServer; import org.tim.server.util.ChatKit; import org.tio.core.ChannelContext; import org.tio.core.intf.Packet; /** * Created by DELL(mxd) on 2021/12/24 17:26 */ public class ChatReqHandler extends AbstractCmdHandler { private static final Logger log = LoggerFactory.getLogger(ChatReqHandler.class); @Override public Command command() { return Command.COMMAND_CHAT_REQ; } @Override public Packet handler(Packet packet, ChannelContext channelContext) { ChatBody body = IMServer.handlerProcessor.instanceofHandler(packet, ChatBody.class); if (ObjectUtil.isEmpty(body)) { log.error("消息包格式化出错"); return null; } if (ObjectUtil.isNotEmpty(body)){ // 聊天类型int类型(0:未知,1:公聊,2:私聊 if (body.getChatType() == 1 && body.getGroupId().length() != 0 && !body.getGroupId().equals("")) { if (IMServer.isStore) { log.debug("群聊消息--开启了持久化需要将消息保存"); IMServer.cacheHelper.writeMessage(DateTime.now().toString("YYYY-MM-DD"), body.getFrom(), body.getGroupId(), body, true, false); } // 群聊 TIM.sendToGroup(TCPSocketServer.getServerTioConfig(), body.getGroupId(), packet, context -> { // 不发送自己 true:发送, false:不发送 return channelContext != context; }, false); } if (body.getChatType() == 2) { String s = DateTime.now().toString("YYYY-MM-DD"); if (IMServer.isStore) { log.debug("私聊消息--开启了持久化需要将消息保存"); IMServer.cacheHelper.writeMessage(s,body.getFrom(), body.getTo(), body, false, false); } // 私聊 if (ChatKit.isOnline(body.getTo()) || IMServer.cluster) { TIM.sendToUser(body, packet); return null; } if (IMServer.isStore) { // 做持久化处理 IMServer.cacheHelper.writeMessage(s,body.getFrom(), body.getTo(), body, false, true); } } if (body.getChatType() == 0) { log.debug("用户{}发送未知消息类型", body.getFrom()); } } return null; } }
java
CHANDIGARH: Chandigarh Traffic Police issued clarity that there is no need to panic if traffic rules are violated while giving way to any emergency vehicle in the city. Traffic Police said that there will be no challans will be issued to violators while giving way to emergency vehicles. If someone's challan is deducted, they can contact the traffic police. According to the information received, it is generally noted that if people commit any traffic violation while giving way to emergency vehicles (ambulance, fire brigade) then they get challan. Dispelling this notion of common people, Chandigarh Police has appealed to the people to give way to emergency vehicles on priority basis without worrying about challan. It is worth mentioning here that the Chandigarh Traffic Police has clarified that while issuing challans, the police observes irregularities through video footage. If a person is found violating traffic rules while giving way to an emergency vehicle, that vehicle will not be challaned. Chandigarh Traffic Police has also issued a regular e-mail for this. Police said that if a challan is issued for violating traffic rules while giving way to an emergency vehicle, he can file his complaint at police-command@chd. gov. in. The traffic department will take appropriate action in this matter. Usually the traffic police issue e-challans to those who violate the traffic rules at different light points of the city.
english
{ "name": "christianblos/symfony-di-annotation", "description": "Allows you to configure symfony dependency injections via annotations", "license": "MIT", "require": { "php": "^7.4|^8.0", "doctrine/annotations": "~1.0", "symfony/dependency-injection": ">=4.0", "symfony/config": ">=4.0" }, "require-dev": { "phpunit/phpunit": "^9.0" }, "autoload": { "psr-4": { "Symfony\\Component\\DependencyInjection\\Annotation\\": "src/" } }, "autoload-dev": { "classmap": [ "examples/", "tests/cases/" ] } }
json
Rafael Nadal believes he and Roger Federer are "equal" given their recent injury struggles. The Spaniard has also admitted that Novak Djokovic's chances in the Grand Slam race are "much higher" than his two rivals. The 35-year-old is making his much-awaited return from injury this week at the Mubadala World Tennis Championship, a high-profile exhibition event. He will then participate in the ATP 250 tournament in Melbourne, which begins on 4 January, instead of the ATP Cup team event. Nadal will next play at the Australian Open, which will run from 17-30 January. The World No. 6, who last competed at the Citi Open in August, has been recovering from a foot injury he suffered at Roland Garros. Speaking at a press conference ahead of the Abu Dhabi exhibition, Nadal admitted his lack of match play will make it difficult for him to regain his top form at the Australian Open. The 20-time Major champion asserted, though, that the key is to be healthy for the first Slam of the season. "It’s going to be super difficult for me," Nadal said. "If things are going well, I’m only going to play one tournament before Australia and these two matches here, so the amount of hours on court at the competitive level before such a tough and demanding tournament like Australia will be not much. "But the main thing is still always the same, be healthy," he insisted. "If I am healthy, I still have the interior fire to keep going and to fight for my goals." Nadal then declared Djokovic has the edge over Federer and himself in the battle to finish with the most Grand Slam titles. The legendary trio are currently tied on a record of 20 men's Majors. "I am outside of the competition for the last five, six months,” Nadal admitted. "I understand that the conversation [about the Grand Slam race] is always there, especially with Novak that he has been playing every week almost. Me and Roger have been injured for such a long period of time. Of course we are equal, but the chances for Novak are much higher than for us." Rafael Nadal will make his return to the match court today against old rival Andy Murray in the semifinals of the Mubadala World Tennis Championship. Nadal received a bye to the last four, while Murray saw off fellow Brit Dan Evans 6-3, 6-2 in his opening match. Nadal has won 17 of his 24 competitive encounters with Murray. Their most recent meeting was in the semifinals of the 2016 Madrid Open, which Murray won 7-5, 6-4. With Nadal playing his first match in a while, the Brit will fancy his chances of an upset.
english
{ "name": "ts-zxcvbn", "version": "5.0.2", "description": "realistic password strength estimation", "author": "<NAME>", "license": "MIT", "main": "lib/main.js", "types": "lib/main.d.ts", "repository": "jonime/ts-zxcvbn", "scripts": { "test": "jest", "build": "rimraf lib && tsc", "prepare": "npm run build", "build-lists": "npm run build-frequency-lists && npm run build-keyboard-adjacency-graphs", "build-frequency-lists": "python data-scripts/build_frequency_lists.py data src/frequency_lists.ts", "build-keyboard-adjacency-graphs": "python data-scripts/build_keyboard_adjacency_graphs.py src/adjacency_graphs.ts" }, "devDependencies": { "@babel/core": "^7.9.0", "@babel/preset-env": "^7.9.5", "@babel/preset-typescript": "^7.9.0", "@types/jest": "^25.2.1", "babel-jest": "^25.3.0", "jest": "^25.3.0", "rimraf": "^3.0.2", "typescript": "^3.8.3" }, "keywords": [ "password", "passphrase", "security", "authentication", "strength", "meter", "quality", "estimation", "pattern", "cracking", "scoring", "entropy", "bruteforce" ] }
json
The death of a Gorkha National Liberation Front supporter in Sonada area of the hills triggered fresh tensions in Darjeeling on July 8, 2017. The GNLF supporter Tashi Bhutia died of bullet injuries late on July 7, 2017. “He received bullet injuries on his forehead. He had come out in the night to get medicines for his brothers who have gastric problems. On the way he met a convoy of security forces and he was shot at point-blank range,” Neeraj Zimba the spokesperson of GNLF said. The State government has denied any incident of police firing in the hills. “Police is showing utmost restraint in the hills, even when they are being attacked. There is no basis to the claims that police shot and killed a person who was out taking medicines,” State’s Tourism Minister Gautam Deb said. With the daybreak, GNLF and Gorkhaland supporters laid siege to the Sonada Police station. Clashes erupted between the police and the demonstrators. Police resorted to firing of tear gas shells to control the situation. A police outpost was also set on fire. The situation remained tense in the area. On June 17, 2017, three Gorkha Janmukti Morcha (GJM) supporters were killed allegedly in police firing during the pro-Gorkhaland rallies. The Darjeeling hills in the northern most part of north Bengal has been on the boil since the first week of June 2017 over the demand of separate State. There is also a near total shutdown in the hills since June 15, 2017.
english
var express = require("express"); var app = express(); app.use(express.static('.')); var server = app.listen(8081, function(){ var port = server.address().port; console.log("Server started at http://localhost:%s", port); });
javascript
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/spellcheck/renderer/platform_spelling_engine.h" #include "content/public/renderer/render_thread.h" #include "services/service_manager/public/cpp/local_interface_provider.h" using content::RenderThread; SpellingEngine* CreateNativeSpellingEngine( service_manager::LocalInterfaceProvider* embedder_provider) { DCHECK(embedder_provider); return new PlatformSpellingEngine(embedder_provider); } PlatformSpellingEngine::PlatformSpellingEngine( service_manager::LocalInterfaceProvider* embedder_provider) : embedder_provider_(embedder_provider) {} PlatformSpellingEngine::~PlatformSpellingEngine() = default; spellcheck::mojom::SpellCheckHost& PlatformSpellingEngine::GetOrBindSpellCheckHost() { if (spell_check_host_) return *spell_check_host_; embedder_provider_->GetInterface(&spell_check_host_); return *spell_check_host_; } void PlatformSpellingEngine::Init(base::File bdict_file) { DCHECK(!bdict_file.IsValid()); } bool PlatformSpellingEngine::InitializeIfNeeded() { return false; } bool PlatformSpellingEngine::IsEnabled() { return true; } // Synchronously query against the platform's spellchecker. // TODO(groby): We might want async support here, too. Ideally, // all engines share a similar path for async requests. bool PlatformSpellingEngine::CheckSpelling(const base::string16& word_to_check, int tag) { bool word_correct = false; GetOrBindSpellCheckHost().CheckSpelling(word_to_check, tag, &word_correct); return word_correct; } // Synchronously query against the platform's spellchecker. // TODO(groby): We might want async support here, too. Ideally, // all engines share a similar path for async requests. void PlatformSpellingEngine::FillSuggestionList( const base::string16& wrong_word, std::vector<base::string16>* optional_suggestions) { GetOrBindSpellCheckHost().FillSuggestionList(wrong_word, optional_suggestions); }
cpp
The Indian Air Force (IAF) has kept two IL-76 military transport aircraft on standby to evacuate Indians who are stranded in conflict-hit eastern Ukrainian cities like Sumy and Kharkiv from Russian capital Moscow, officials said on Friday. As the Indians stranded in eastern Ukranian cities, where the fighting is the heaviest, cannot move to the western border of Ukraine, the IAF is planning to evacuate them from Moscow with the help of Russian military forces, the officials noted. Till now, India has been evacuating its citizens from Ukraine's western neighbours such as Romania, Slovakia, Poland and Hungary as the Ukranian airspace has remained shut since February 24, when the Russian military offensive began. Two IL-76 aircraft -- which are of Russian origin -- have been kept on standby so that they can immediately depart for Moscow and evacuate Indians, the officials added. Till date, the IAF has evacuated a total of 1,428 Indians on seven flights from Ukraine's western neighbouring countries. These seven flights were operated through US-origin C-17 planes. India on Thursday said it was primarily focusing on the evacuation of its nationals from the besieged city of Kharkiv and other conflict zones in eastern Ukraine amid increasing Russian military offensive in the region. At a media briefing, external affairs ministry spokesperson Arindam Bagchi said around 1,000 Indians reached Pisochyn from Kharkiv following the urgent advisory issued by the Indian embassy in Ukraine on Wednesday. "We estimate that a few hundred people still remain in Kharkiv despite our advisory," Mr Bagchi said, adding that "unfortunately" there has been a fresh outbreak of violence in the city on Thursday. (Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed. )
english
<reponame>laurabrosa/analisar-noticias-no-spark<filename>data30k/domain=rss.home.uol.com.br/data=2019-11-05/hora=22/1f681a8484805e31dae03154cf4ffab9.json<gh_stars>0 {"updatedAt":"","description":"Norte-americanos querem 'rever pontos' no acordo sanitário ","uri":"http://economia.uol.com.br/noticias/estadao-conteudo/2019/11/05/eua-sao-excelente-mercado-e-vamos-reabri-lo-diz-ministra-da-agricultura.htm","contents":"[\n <p>Norte-americanos querem 'rever pontos' no acordo sanitário </p>\n <img src=\"https://conteudo.imguol.com.br/c/home/cf/2019/08/06/a-ministra-da-agricultura-pecuaria-e-abastecimento-tereza-cristina-dem-fala-na-comissao-de-meio-ambiente-da-camara-dos-deputados-1565109153246_615x300.jpg\" alt=\"Vinicius Loures/Câmara dos Deputados\" title=\"Vinicius Loures/Câmara dos Deputados\" />\n ]","link":"[]","categories":"[]","content":"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>301 Moved Permanently</title>\n</head><body>\n<h1>Moved Permanently</h1>\n<p>The document has moved <a href=\"https://economia.uol.com.br/noticias/estadao-conteudo/2019/11/05/eua-sao-excelente-mercado-e-vamos-reabri-lo-diz-ministra-da-agricultura.htm\">here</a>.</p>\n</body></html>\n","title":"Ministra da Agricultura | <NAME> diz que reabrirá mercado com os EUA","publishedAt":""}
json
Samsung Buds owners have a reason to rejoice as the Korean electronics giant has pushed an update that essentially gives the Buds three new features that are the mainstay of the Buds+. The Buds and Buds plus have been a hit in the truly wireless earbuds category and now the former possess some ‘pro’ features making it even more value for money offering. The Microsoft Swift Pair feature allows easy pairing of Galaxy Buds with Windows 10 versions 1803 and above. This will greatly enhance the quality of remote video meetings and listening to music by leveraging the innovative sound quality of Galaxy Buds. Now Galaxy Buds can be paired with multiple devices across mobile and PCs like Galaxy Buds+ and users can switch easily between connected devices. Ambient Sound can now be experienced on Galaxy Buds automatically. The technology allows external sounds to pass through the ear buds even when the user is listening to music or other sound content. This allows users to stay in touch with their surroundings when they are on calls or listening to music. Ambient Sound can now be experienced with just one earbud which gives users more options to listen or not listen to the external sounds. The software update brings better integration of Galaxy Buds with Spotify. The tap and hold gesture will open Spotify on mobile phones and users can listen to the track they were previously listening to. They will get the recommended playlist by repeating the gesture. Galaxy Buds did not find much traction in the market when they were released in March 2019. Samsung has invested a lot in the Galaxy Buds+ which has much better hardware and features, but sales took an adverse hit after Covid-19 lockdown worldwide. The Buds retail for Rs 10,000 and the Buds plus for Rs 12,000 and are available on Samsung’s website and on other ecommerce sites like Amazon and Flipkart. Get the hottest deals available in your inbox plus news, reviews, opinion, analysis, deals and more from the TechRadar team. Nitesh is a writer at Techradar india. He has spent 12 Years as Journalist, Content Writer, Editor with Newspapers and Magazine, English language, Email. Nitesh went to Nagpur University.
english
export default { NICKNAME_CHANGED: "UI.nickname_changed", SELECTED_ENDPOINT: "UI.selected_endpoint", PINNED_ENDPOINT: "UI.pinned_endpoint", /** * Notifies that local user created text message. */ MESSAGE_CREATED: "UI.message_created", /** * Notifies that local user changed language. */ LANG_CHANGED: "UI.lang_changed", /** * Notifies that local user changed email. */ EMAIL_CHANGED: "UI.email_changed", /** * Notifies that "start muted" settings changed. */ START_MUTED_CHANGED: "UI.start_muted_changed", AUDIO_MUTED: "UI.audio_muted", VIDEO_MUTED: "UI.video_muted", ETHERPAD_CLICKED: "UI.etherpad_clicked", SHARED_VIDEO_CLICKED: "UI.start_shared_video", /** * Indicates that an invite button has been clicked. */ INVITE_CLICKED: "UI.invite_clicked", /** * Updates shared video with params: url, state, time(optional) * Where url is the video link, state is stop/start/pause and time is the * current video playing time. */ UPDATE_SHARED_VIDEO: "UI.update_shared_video", USER_KICKED: "UI.user_kicked", REMOTE_AUDIO_MUTED: "UI.remote_audio_muted", TOGGLE_FULLSCREEN: "UI.toogle_fullscreen", FULLSCREEN_TOGGLED: "UI.fullscreen_toggled", AUTH_CLICKED: "UI.auth_clicked", TOGGLE_CHAT: "UI.toggle_chat", TOGGLE_SETTINGS: "UI.toggle_settings", TOGGLE_CONTACT_LIST: "UI.toggle_contact_list", /** * Notifies that the profile toolbar button has been clicked. */ TOGGLE_PROFILE: "UI.toggle_profile", /** * Notifies that a command to toggle the film strip has been issued. The * event may optionally specify a {Boolean} (primitive) value to assign to * the visibility of the film strip (i.e. the event may act as a setter). * The very toggling of the film strip may or may not occurred at the time * of the receipt of the event depending on the position of the receiving * event listener in relation to the event listener which carries out the * command to toggle the film strip. * * @see {TOGGLED_FILM_STRIP} */ TOGGLE_FILM_STRIP: "UI.toggle_film_strip", /** * Notifies that the film strip was (actually) toggled. The event supplies * a {Boolean} (primitive) value indicating the visibility of the film * strip after the toggling (at the time of the event emission). * * @see {TOGGLE_FILM_STRIP} */ TOGGLED_FILM_STRIP: "UI.toggled_film_strip", TOGGLE_SCREENSHARING: "UI.toggle_screensharing", TOGGLED_SHARED_DOCUMENT: "UI.toggled_shared_document", CONTACT_CLICKED: "UI.contact_clicked", HANGUP: "UI.hangup", LOGOUT: "UI.logout", RECORDING_TOGGLED: "UI.recording_toggled", SIP_DIAL: "UI.sip_dial", SUBJECT_CHANGED: "UI.subject_changed", VIDEO_DEVICE_CHANGED: "UI.video_device_changed", AUDIO_DEVICE_CHANGED: "UI.audio_device_changed", AUDIO_OUTPUT_DEVICE_CHANGED: "UI.audio_output_device_changed", /** * Notifies interested listeners that the follow-me feature is enabled or * disabled. */ FOLLOW_ME_ENABLED: "UI.follow_me_enabled", /** * Notifies that flipX property of the local video is changed. */ LOCAL_FLIPX_CHANGED: "UI.local_flipx_changed", // An event which indicates that the resolution of a remote video has // changed. RESOLUTION_CHANGED: "UI.resolution_changed", /** * Notifies that the button "Go to webstore" is pressed on the dialog for * external extension installation. */ OPEN_EXTENSION_STORE: "UI.open_extension_store", /** * Notifies that the button "Cancel" is pressed on the dialog for * external extension installation. */ EXTERNAL_INSTALLATION_CANCELED: "UI.external_installation_canceled", /** * Notifies that the side toolbar container has been toggled. The actual * event must contain the identifier of the container that has been toggled * and information about toggle on or off. */ SIDE_TOOLBAR_CONTAINER_TOGGLED: "UI.side_container_toggled", /** * Notifies that the raise hand has been changed. */ LOCAL_RAISE_HAND_CHANGED: "UI.local_raise_hand_changed", /** * Notifies that the avatar is displayed or not on the largeVideo. */ LARGE_VIDEO_AVATAR_VISIBLE: "UI.large_video_avatar_visible", /** * Toggling room lock */ TOGGLE_ROOM_LOCK: "UI.toggle_room_lock", /** * Adding contact to contact list */ CONTACT_ADDED: "UI.contact_added", /** * Removing the contact from contact list */ CONTACT_REMOVED: "UI.contact_removed", /** * Indicates that a user avatar has changed. */ USER_AVATAR_CHANGED: "UI.user_avatar_changed", /** * Display name changed. */ DISPLAY_NAME_CHANGED: "UI.display_name_changed", /** * Indicates that a password is required for the call. */ PASSWORD_REQUIRED: "<PASSWORD>" };
javascript
<filename>public/js/japi.js // The Api module is designed to handle all interactions with the server var jApi = (function() { var messageEndpoint = '/api/message'; var deleteEndpoint = '/api/session'; var vrEndpoint = '/api/file/upload'; /**Funcion Generica para invocar mediante ajx al endpoint del api */ var sendRequestGeneric = function(data, endpoint, method, callback) { data = JSON.stringify(data); $.ajax({ type: method, url: endpoint, contentType: "application/json", cache: false, data: data, dataType: 'json', success: function(result) { console.log(result); if (callback) { callback(result); } }, error: function(xhr, ajaxOptions, thrownError) { var response = { error: { message: "Error técnico, disculpe las molestias", code: "500" } } if (callback) { callback(response); } } }); } /**Funcion para ejecutar un requets mediate HTTP DELETE /api/session*/ var sendDeleteRequest = function(data, callback) { return sendRequestGeneric(data, deleteEndpoint, "DELETE", callback); } /**Funcion para ejecutar un requets mediate HTTP POST /api/message*/ var sendRequest = function(data, callback) { return sendRequestGeneric(data, messageEndpoint, "POST", callback); } /**Funcion Para subir un archivo al API /api/file/upload*/ let sendFormDataURL = function(dataURL, callback) { if (dataURL == undefined || dataURL == null) { console.log("dataURL is empty"); return; } let arrayImageParts = dataURL.split(','); if (arrayImageParts.length < 1) { console.log("dataURL not have data"); return; } console.log("Parsin image to blob"); let blobBin = atob(arrayImageParts[1]); let type = arrayImageParts[0].split(':')[1].split(';')[0]; let array = []; for (let i = 0; i < blobBin.length; i++) { array.push(blobBin.charCodeAt(i)); } let file = new Blob([new Uint8Array(array)], { type: type }); console.log("Parsin done!!"); let formData = new FormData(); // add assockey values, this will be posts values formData.append('files', file); console.log("formData!!", formData); for (var value of formData.values()) { console.log(value); } $.ajax({ type: "POST", url: vrEndpoint, contentType: false, cache: false, processData: false, async: true, timeout: 60000, data: formData, success: function(result) { console.log('Succes ', result); if (callback) { callback(result); } }, error: function(xhr, ajaxOptions, thrownError) { var response = { error: { message: "Error técnico, disculpe las molestias", code: "500" } } console.log(response); if (callback) { callback(response); } } }); } return { sendMessage: sendRequest, closeSesion: sendDeleteRequest, vrMessage: sendFormDataURL } }());
javascript
Angelique Kerber would get another chance for redemption at the Championships in Wimbledon on Saturday. In a match that saw her overtake Jelena Ostapenko, the German held her ground in the late stages to hold on to a 6-3, 6-3 win on Centre Court Thursday. Too many errors from the Latvian made it possible for the 11th seed to pull out all the stops and reach her fourth Major final. The two highest seeds left in the tournament faced off in a first time meeting, where one of them would keep their title hopes alive. Both players showed strong competitive spirit on the court, with only the German dropping a set throughout the tournament. They each possess a different type of game that can either make or break their run to the final match. While they have never faced off before, the point of being pitted against one another would be a memory they wouldn’t forget. The Latvian began the match with some jitters, having never been this far in the tournament but battled back to gain control of the first game. She forced deuce to get the AD point quickly to stay out front. Ostapenko already had four unforced errors but began to show finesse, landing a drop shot during the second game. Though it didn’t help her earn the break, the need to become a strengthening figure was necessary against Kerber. Ostapenko had 12 winners by her second game win, but still hadn’t figured out a way to hold off the 11th seed. Kerber earned her first serve to love in the fourth game but was still behind the 21-year-old, who continued to lead the way. That all changed in the seventh game as Kerber's attacks paid off with a break of serve on deuce giving her the first lead change with the serve in play in the eighth game. She gave herself three game points but lost every one of them due to Ostapenko's aggression. The 12th seed forced deuce but watched Kerber land an ace to take a 5-3 lead. She marched ahead to play for the set forcing a nervous Ostapenko to drop her composure and double fault at the end to close out the set in 34 minutes. The former world number one had a lot of good running for her as she scored 17 of 26 on first serve points and four of five from the second. With her opponent having more errors than winners, it was a sure way to keep her own game together. Kerber proved that in the opening serve of the second set, taking down Ostapenko swiftly allowing her a point in the game. She was soon two serves and a break up with the Latvian showing a lot of struggle with the first serve and returns. Ostapenko made good on ending the shutout she found herself in as Kerber had too many errors on the backhand. The win gave her something to build on but the power from the German limited that just enough to earn a 4-1 stance, adding more negative feelings to Ostapenko. Kerber earned another break that helped her inch closer to the final, with Ostapenko clearly out of ideas. The 30-year-old served for the match and pushed forward while watching her opponent fall to pieces. Ostapenko made an attempt to put something back together, reaching a break point in the sixth game but it went to deuce on a return into the net. She refused to let that bother her fighting on every point, denying Kerber match point and laying down some winners that let her etch out a second game win in that set. Ostapenko almost had a serve to love in the eighth game, but despite giving up two points to Kerber, she gained a second straight win that pleased the crowd and energized her game to improve. The short surge gave Kerber a reason to doubt herself but she went into the ninth game determined to shut out the match. She got to deuce on an error from Ostapenko, followed by a second ace that gave Kerber her second match point. It was all over on a wide return from the Latvian that saw Kerber scream out the frustrations of the set and achieve her mission after one hour and seven minutes.
english
On March 17, 2007, the entire cricket fraternity suffered one of its biggest losses till date as former English cricketer, coach and commentator, Bob Woolmer, passed away at the age of 58. Woolmer died a day after his then coached side Pakistan were eliminated by minnows Ireland in the ongoing ICC World Cup 2007 in the West Indies. A day after Pakistan received the marching orders from 50-over cricket's biggest extravaganza, Woolmer's body was found in his hotel room under mysterious circumstances. On his 13th death anniversary, Woolmer's colleague and legendary Pakistani fast bowler Shoaib Akhtar opened up about his relationship with the late great English head coach, who served the Pakistan national side for three years. Talking about Woolmer's stint at Pakistan, the Rawalpindi Express revealed that people used to think that the pacer was at loggerheads with the then head coach of the Green Army. "People think we used to fight a lot but it was not like that. When he became the coach he came to me in Northampton and said that 'Shoaib I don't want any trouble from you,' and I said him that he was talking to the wrong person and he will not have any problem with me and then he said that others have indicated this to him," Akhtar said in a video shared on his official YouTube channel. "I believed in match winning performances and that match can get over soon. Cricket is a game of match winners and a good spell or a good innings can win the match for the team but Bob used to think that cricket is a team sport," he added. Woolmer replaced former coach Javed Miandad after the predecessor suffered a 2-1 series loss at the hands of arch-rivals India in 2004. The former pace ace and world's fastest bowler then explained how Pakistan's home series with England made Woolmer an admirer of the Rawalpindi Express. "During the England tour after some initial hiccups I was selected in the team for my pace and I took wickets against a very high-spirited England team, who were coming after an Ashes win. We taught them a lesson and took wickets in Multan, Faisalabad and then took a 5 wicket haul in the Lahore ODI. Woolmer was very happy then and he danced, later he told me that Shoaib you were right, individual acts do win matches," he said.
english
<reponame>malviguys/frontendweb<filename>frontend/src/app/homepage-teacher/homepage-teacher.component.ts import { Component, OnInit } from '@angular/core'; import {MenuItem} from 'primeng/api'; import * as _ from 'lodash'; import { AvailableLessonsService } from '../available-lessons.service'; import { Router } from '@angular/router'; import { BookLessonService } from '../booklesson.service'; @Component({ selector: 'app-homepage-teacher', templateUrl: './homepage-teacher.component.html', styleUrls: ['./homepage-teacher.component.css'] }) export class HomepageTeacherComponent implements OnInit { items: MenuItem[] = []; lessons: any[] = []; constructor(private router: Router, private lessonsService: AvailableLessonsService, private bookLessonService: BookLessonService ){ lessonsService.getLesson().subscribe( (response) => { console.log(response) _.map(response,(el)=>{ this.lessons.push(el) }) }, (error) => {console.log(error)}, ) } ngOnInit() { this.items = [ {label:'Homepage', routerLink :"/homepage-teacher"}, {label:'Add lesson', routerLink : "/addlesson"}, ]; } delete(id: number) { this.bookLessonService.deleteLessonTeacher(id).subscribe( (response) => { console.log(response) alert("removed") }, (error) => { alert("You don't have the permission") console.log(error) }, ) } }
typescript
package com.loren.textlibrary.util; import java.sql.Timestamp; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import android.annotation.SuppressLint; import android.util.Log; /** * * @author: Loren * @create: 2016-7-4下午7:43:05 * @desc: 日期时间工具类 * */ @SuppressLint({ "SimpleDateFormat", "UseValueOf", "DefaultLocale" }) public class DateTimeUtils { private final static String TAG = DateTimeUtils.class.getSimpleName(); private final static String YYYYMMDD = "yyyy/MM/dd"; @SuppressLint("SimpleDateFormat") private final static SimpleDateFormat sf = new SimpleDateFormat(YYYYMMDD); /** 返回当前时间的Date */ public static Date nowDate() { return new Date(); } /** * 字符串转为字符串符合标准格式"YYYY-MM-DD HH:MM:SS" * * @param dateTime * 标准时间格式 "YYYY-MM-DD HH:MM:SS" * @return java.util.Date */ public static Date toDate(String dateTime) { int index = dateTime.indexOf(" "); String date = dateTime.substring(0, index); String time = dateTime.substring(index + 1); return toDate(date, time); } /** * 字符串转为字符串符合标准格式"YYYY-MM-DD HH:MM:SS" * * @param date * 标准日期格式 "YYYY-MM-DD" * @param time * 标准时间格式 "HH:MM:SS" * @return java.util.Date */ public static Date toDate(String date, String time) { if (date == null || time == null) { return null; } int dateSlash1 = date.indexOf("-"); int dateSlash2 = date.lastIndexOf("-"); if (dateSlash1 <= 0 || dateSlash1 == dateSlash2) { return null; } int timeColon1 = time.indexOf(":"); int timeColon2 = time.lastIndexOf(":"); if (timeColon1 <= 0 || timeColon1 == timeColon2) { return null; } String year = date.substring(0, dateSlash1); String month = date.substring(dateSlash1 + 1, dateSlash2); String day = date.substring(dateSlash2 + 1); String hour = time.substring(0, timeColon1); String minute = time.substring(timeColon1 + 1, timeColon2); String second = time.substring(timeColon2 + 1); return toDate(year, month, day, hour, minute, second); } /** * 通过标准时间字符串输入生成java.util.Date * * @param yearStr * @param monthStr * @param dayStr * @param hourStr * @param minuteStr * @param secondStr * @return java.util.Date */ public static Date toDate(String yearStr, String monthStr, String dayStr, String hourStr, String minuteStr, String secondStr) { int year, month, day, hour, minute, second; try { year = Integer.parseInt(yearStr); month = Integer.parseInt(monthStr); day = Integer.parseInt(dayStr); hour = Integer.parseInt(hourStr); minute = Integer.parseInt(minuteStr); second = Integer.parseInt(secondStr); } catch (Exception e) { return null; } return toDate(year, month, day, hour, minute, second); } /** * 通过标准时间int 输入生成java.util.Date * * @param year * @param month * @param day * @param hour * @param minute * @param second * @return java.util.Date */ public static Date toDate(int year, int month, int day, int hour, int minute, int second) { Calendar calendar = Calendar.getInstance(); try { calendar.set(year, month - 1, day, hour, minute, second); } catch (Exception e) { return null; } return calendar.getTime(); } /** * 生成标准格式的字符串 格式 "MM-DD-YYYY HH:MM:SS" * * @param date * The Date * @return 生成默认格式的字符串 格式 "MM-DD-YYYY HH:MM:SS" */ public static String toDateTimeString(Date date) { if (date == null) { return ""; } String dateString = toDateString(date); String timeString = toTimeString(date); if (dateString == null || timeString == null) { return ""; } return dateString + " " + timeString; } /** * 生成标准日期,格式YYYY+spe+MM+spe+DD * * @param date * The Date * @return 生成日期,格式YYYY+spe+MM+spe+DD */ public static String toDateString(Date date, String spe) { if (date == null) { return ""; } Calendar calendar = Calendar.getInstance(); calendar.setTime(date); int month = calendar.get(Calendar.MONTH) + 1; int day = calendar.get(Calendar.DAY_OF_MONTH); int year = calendar.get(Calendar.YEAR); String monthStr = "" + month; String dayStr = "" + day; String yearStr = "" + year; if (month < 10) { monthStr = "0" + month; } if (day < 10) { dayStr = "0" + day; } return yearStr + spe + monthStr + spe + dayStr; } /** * 生成标准日期,格式?YYYY-MM-DD * * @param date * The Date * @return 生成日期,格式YYYY-MM-DD */ public static String toDateString(Date date) { return toDateString(date, "-"); } /** * 根据输入的时间生成时间格式 HH:MM:SS * * @param date * java.util.Date * @return 生成时间格式HH:MM:SS */ public static String toTimeString(Date date) { if (date == null) { return ""; } Calendar calendar = Calendar.getInstance(); calendar.setTime(date); return toTimeString(calendar.get(Calendar.HOUR_OF_DAY), calendar.get(Calendar.MINUTE), calendar.get(Calendar.SECOND)); } /** * 根据输入的时,生成时间格式 HH:MM:SS * * @param hour * @param minute * @param second * @return 生成时间格式HH:MM:SS */ public static String toTimeString(int hour, int minute, int second) { String hourStr = "" + hour; String minuteStr = "" + minute; String secondStr = "" + second; if (hour < 10) { hourStr = "0" + hour; } if (minute < 10) { minuteStr = "0" + minute; } if (second < 10) { secondStr = "0" + second; } return hourStr + ":" + minuteStr + ":" + secondStr; } /** * 取得给定日历,给定格式的日期字符串 * * @param calendar * 日历,给定日历 * @return String 取得默认的日期时间字符串"yyyy-MM-dd" */ public static String toDateString(Calendar calendar) { String format = "yyyy-MM-dd"; return toDateTimeString(calendar.getTime(), format); } /** * 取得给定日历,给定格式的日期时间字符串 * * @param calendar * 日历,给定日历 * @return String 取得默认的日期时间字符串"yyyy-MM-dd HH:mm:ss" */ public static String toDateTimeString(Calendar calendar) { String format = "yyyy-MM-dd HH:mm:ss"; return toDateTimeString(calendar.getTime(), format); } /** * 取得给定日历,给定格式的日期时间字符串 * * @param calendar * 日历,给定日历 * @param format * 格式,如String format = "yyyy-MM-dd HH:mm:ss"; * @return String 取得给定日历,给定格式的日期时间字符串 */ public static String toDateTimeString(Calendar calendar, String format) { return toDateTimeString(calendar.getTime(), format); } /** * 取得给定时间,给定格式的日期时间字符串,标准格式:"yyyy-MM-dd HH:mm:ss"; * * @param datetime * 日期,给定时间的毫秒数 * @return String 取得给定时间,给定格式的日期时间字符串 */ public static String toDateTimeString(long datetime) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return sdf.format(new Date(datetime)); } public static String toDateTimeStringSSS(long datetime){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS"); return sdf.format(new Date(datetime)); } public static String toDateTimeStringSSS(Date date){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS"); return sdf.format(date); } /** * 取得给定时间,给定格式的日期时间字符串 * * @param datetime * 日期,给定时间的毫秒数 * @param format * 格式,如String format = "yyyy-MM-dd HH:mm:ss"; * @return String 取得给定时间,给定格式的日期时间字符串 */ public static String toDateTimeString(long datetime, String format) { SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(new Date(datetime)); } /** * 取得给定时间,给定格式的日期时间字符串 * * @param date * 日期,给定时间 * @param format * 格式,如String format = "yyyy-MM-dd HH:mm:ss"; * @return String 取得给定时间,给定格式的日期时间字符串 */ public static String toDateTimeString(Date date, String format) { SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(date); } /** * 取得当前的日期时间字符串 * * @param format * 格式,如String format = "yyyy-MM-dd HH:mm:ss"; * @return String 取得当前的日期时间字符串 */ public static String getDateTimeString(String format) { return toDateTimeString(new Date(), format); } /** * 取得当前的日期时间字符串YYYY-MM-DD HH:mm:ss * * @return String 取得当前的日期时间字符串YYYY-MM-DD HH:mm:ss */ public static String getDateTimeString() { String format = "yyyy-MM-dd HH:mm:ss"; return getDateTimeString(format); } /** * 取得当前的日期时间字符串YYYY/MM/DD HH:mm:ss (移动) * * @return String 取得当前的日期时间字符串YYYY/MM/DD HH:mm:ss */ public static String getDateTimeString2() { String format = "yyyy/MM/dd HH:mm:ss"; return getDateTimeString(format); } /** * 取得当前的日期时间字符串YYYY/MM/DD (移动) * * @return String 取得当前的日期时间字符串YYYY/MM/DD */ public static String getDateString2() { String format = "yyyy/MM/dd"; return getDateTimeString(format); } /** * 取得当前的日期时间字符串YYYYMMDDHHMISS * * @return String 取得当前的日期时间字符串YYYYMMDDHHMISS */ public static String getDateTime14String() { String format = "yyyyMMddHHmmss"; return getDateTimeString(format); } /** * 取得当前的日期时间字符串YYMMDDHHMISS * * @return String 取得当前的日期时间字符串YYMMDDHHMISS */ public static String getDateTime12String() { String format = "yyMMddHHmmss"; return getDateTimeString(format); } /** * 取得当前的日期时间字符串YYYYMMDD * * @return String 取得当前的日期时间字符串 */ public static String getDateTime8String() { String format = "yyyyMMdd"; return getDateTimeString(format); } /** * 取得当前的日期时间字符串YYYYMM * * @return String 取得当前的日期时间字符串 */ public static String getDateTime6String() { String format = "yyyyMM"; return getDateTimeString(format); } /** * 取得当前的日期时间字符串YYYY-MM-DD * * @return String 取得当前的日期时间字符串 */ public static String getDateString() { String format = "yyyy-MM-dd"; return getDateTimeString(format); } /** * 取得当前的日期时间字符串HH:mm:ss * * @return String 取得当前的日期时间字符串 */ public static String getTimeString() { String format = "HH:mm:ss"; return getDateTimeString(format); } /** * 取得当前的日期对应格式的毫秒数 * */ public static int[] getDateTimes() { int[] dates = new int[7]; Calendar calendar = Calendar.getInstance(); dates[0] = calendar.get(Calendar.YEAR); dates[1] = calendar.get(Calendar.MONTH) + 1; dates[2] = calendar.get(Calendar.DAY_OF_MONTH); dates[3] = calendar.get(Calendar.HOUR_OF_DAY); dates[4] = calendar.get(Calendar.MINUTE); dates[5] = calendar.get(Calendar.SECOND); dates[6] = calendar.get(Calendar.MILLISECOND); return dates; } /** * 通过标准时间输入生成java.util.Date * * @param yearStr * @param monthStr * @param dayStr * @param hourStr * @param minuteStr * @param secondStr * @return Calendar */ public static Calendar toCalendar(String yearStr, String monthStr, String dayStr, String hourStr, String minuteStr, String secondStr) { int year, month, day, hour, minute, second; try { year = Integer.parseInt(yearStr); month = Integer.parseInt(monthStr); day = Integer.parseInt(dayStr); hour = Integer.parseInt(hourStr); minute = Integer.parseInt(minuteStr); second = Integer.parseInt(secondStr); } catch (Exception e) { return null; } return toCalendar(year, month, day, hour, minute, second); } /** * 通过String,组织日历 * * @param dates * @return 通过整型数组,返回日历 */ public static Calendar toCalendar(String datetime) { Date date = toDateFromStr(datetime); Calendar calendar = Calendar.getInstance(); calendar.setTime(date); return calendar; } /** * 通过整型数组,组织日历 * * @param dates * @return 通过整型数组,返回日历 */ public static Calendar toCalendar(int[] dates) { if (dates == null || dates.length < 6) { return null; } return toCalendar(dates[0], dates[1], dates[2], dates[3], dates[4], dates[5]); } /** * 通过标准时间输入生成java.util.Date * * @param year * @param month * @param day * @param hour * @param minute * @param second * @return Calendar */ public static Calendar toCalendar(int year, int month, int day, int hour, int minute, int second) { Calendar c = Calendar.getInstance(); c.set(Calendar.YEAR, year); c.set(Calendar.MONTH, month - 1); c.set(Calendar.DATE, day); c.set(Calendar.HOUR_OF_DAY, hour); c.set(Calendar.MINUTE, minute); c.set(Calendar.SECOND, second); return c; } /** * 通过整型数组,组织日期 * * @param dates * @return 通过整型数组,组织日期 */ public static Date toDate(int[] dates) { if (dates == null || dates.length < 6) { return null; } return toCalendar(dates).getTime(); } /** * 取得当前的日期时 * * @param str * 字符 * @param format * 格式 * @return 取得当前的日期时�?如果格式不对则返回null */ public static Date toDateFromStr(String str, String format) { try { SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.parse(str); } catch (ParseException e) { return null; } } /** * 取得当前的日期时按默认格式YYYY-MM-DD HH:mm:ss不对则返回null * * @param str * 字符 * @return 取得当前的日期时按默认格式不对则返回null */ public static Date toDateFromStr(String str) { try { String format = "yyyy-MM-dd HH:mm:ss"; SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.parse(str); } catch (ParseException e) { return null; } } /** * 获取当前 * * @return 当前 */ public static int getCurrentYear() { Calendar calendar = Calendar.getInstance(); return calendar.get(Calendar.YEAR); } /** * 获取当前月份 * * @return 月份 */ public static int getCurrentMonth() { Calendar calendar = Calendar.getInstance(); return calendar.get(Calendar.MONTH) + 1; } /** * 获取当前日期 * * @return 当前日期 */ public static int getCurrentDay() { Calendar calendar = Calendar.getInstance(); int day = calendar.get(Calendar.DAY_OF_MONTH); return day; } /** * 获取当前 * * @return 当前时间 */ public static int getCurrentHour() { Calendar calendar = Calendar.getInstance(); int hour = calendar.get(Calendar.HOUR_OF_DAY); return hour; } /** * 获取当前 * * @return 当前 */ public static int getCurrentMinute() { Calendar calendar = Calendar.getInstance(); int hour = calendar.get(Calendar.MINUTE); return hour; } /** * 获取当前时间的星期数 * @return 周数 */ public static int getCurrentWeek() { Calendar calendar = Calendar.getInstance(); int week = calendar.get(Calendar.DAY_OF_WEEK); week = week - 1; if (week == 0) { week = 7; } return week; } /** * 获取两个日期对象相差年数 * * @parma date1 日期对象 * @param date2 * 日期对象 * @return int 年份差 */ public static int compareYear(Date date1, Date date2) { if (date1 == null || date2 == null) { return 0; } Calendar calendar = Calendar.getInstance(); calendar.setTime(date1); int year1 = calendar.get(Calendar.YEAR); calendar.setTime(date2); int year2 = calendar.get(Calendar.YEAR); return year1 - year2; } /** * 获取两个日期对象相差月数 * * @param date1 * 日期对象 * @param date2 * 日期对象 * @return int 月份差 */ public static int compareMonth(Date date1, Date date2) { if (date1 == null || date2 == null) { return 0; } int year = compareYear(date1, date2); Calendar calendar = Calendar.getInstance(); calendar.setTime(date1); int month1 = calendar.get(Calendar.MONTH); calendar.setTime(date2); int month2 = calendar.get(Calendar.MONTH); /* 进行比较 */ return 12 * year + (month1 - month2); } /** * 获取两个日期对象相差天数 * * @param date1 * String yyyy-MM-dd * @param date2 * String yyyy-MM-dd * @return int 日差 */ public static int compareDay(String date1str, String date2str) { if (date1str == null || date2str == null) { return 0; } Date date1 = toDate(date1str, "00:00:01"); Date date2 = toDate(date2str, "00:00:00"); return compareDay(date1, date2); } /** * 获取两个日期对象相差天数 * * @param date1 * 日期对象 * @param date2 * 日期对象 * @return int 日差 */ public static int compareDay(Date date1, Date date2) { if (date1 == null || date2 == null) { return 0; } long time1 = date1.getTime(); long time2 = date2.getTime(); long margin = time1 - time2; /* 转化成天 */ int ret = (int) Math.floor((double) margin / (1000 * 60 * 60 * 24)); return ret; } /** * 获取两个日期对象相差的小时数 * * @param date1 * 日期对象 * @param date2 * 日期对象 * @return int 相差小时 */ public static int compareHour(Date date1, Date date2) { if (date1 == null || date2 == null) { return 0; } long time1 = date1.getTime(); long time2 = date2.getTime(); long margin = time1 - time2; int ret = (int) Math.floor((double) margin / (1000 * 60 * 60)); return ret; } /** * 获取两个日期对象相差的分钟数 * * @param date1 * 日期对象 * @param date2 * 日期对象 * @return int 相差分钟 */ public static int compareMinute(Date date1, Date date2) { if (date1 == null || date2 == null) { return 0; } long time1 = date1.getTime(); long time2 = date2.getTime(); long margin = time1 - time2; int ret = (int) Math.floor((double) margin / (1000 * 60)); return ret; } public static int compareMinute(String date1Str, String date2Str) { if (date1Str == null || date2Str == null) { return 0; } Date date1 = toDate(date1Str); Date date2 = toDate(date2Str); long time1 = date1.getTime(); long time2 = date2.getTime(); long margin = time1 - time2; int ret = (int) Math.floor((double) margin / (1000 * 60)); return ret; } /** * 获取两个日期对象相差秒数 * * @param date1 * 日期对象 * @param date2 * 日期对象 * @return int 相差秒数 */ public static int compareSecond(Date date1, Date date2) { if (date1 == null || date2 == null) { return 0; } long time1 = date1.getTime(); long time2 = date2.getTime(); long margin = time1 - time2; Long longValue = new Long(margin / (1000)); return longValue.intValue(); } /** * 获取和当前时间毫秒差 * * @param dateTime * YYYY-MM-DD hh:mm:ss * @return 毫秒 */ public static long getTimeMargin(String dateTime) { int index = dateTime.indexOf(" "); String date = dateTime.substring(0, index); String time = dateTime.substring(index + 1); int dateSlash1 = date.indexOf("-"); int dateSlash2 = date.lastIndexOf("-"); if (dateSlash1 <= 0 || dateSlash1 == dateSlash2) { return -1; } int timeColon1 = time.indexOf(":"); int timeColon2 = time.lastIndexOf(":"); if (timeColon1 <= 0 || timeColon1 == timeColon2) { return -1; } Calendar calendar = Calendar.getInstance(); try { int year = Integer.parseInt(date.substring(0, dateSlash1)); int month = Integer.parseInt(date.substring(dateSlash1 + 1, dateSlash2)); int day = Integer.parseInt(date.substring(dateSlash2 + 1)); int hour = Integer.parseInt(time.substring(0, timeColon1)); int minute = Integer.parseInt(time.substring(timeColon1 + 1, timeColon2)); int second = Integer.parseInt(time.substring(timeColon2 + 1)); calendar.set(year, month - 1, day, hour, minute, second); } catch (Exception e) { return -1; } return System.currentTimeMillis() - calendar.getTimeInMillis(); } /** * 获取当前时间的前或数天的年月日,并以数组形式还回数组0为年为月为日 * * @param year * 当前 * @param month * 当前 * @param day * 当前日期 * @param days * 相差天数 * @return 年月日数 */ public static int[] getPreviousDay(int year, int month, int day, int days) { Calendar calendar = Calendar.getInstance(); calendar.set(year, month - 1, day); long longDate = (calendar.getTime()).getTime() - (1000 * 60 * 60 * 24 * days); Date date = new Date(longDate); calendar.setTime(date); int[] rtn = new int[3]; rtn[0] = calendar.get(Calendar.YEAR); rtn[1] = calendar.get(Calendar.MONTH) + 1; rtn[2] = calendar.get(Calendar.DATE); return rtn; } /** * 获取前几天对应的当前时间 * * @param format * 格式化如 yyyy-MM-dd * @return String */ public static String getPreviousDateString(int days) { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.DAY_OF_MONTH, -days); return toDateString(calendar); } /** * 获取前几天对应的当前时间 * * @param format * 格式化如 yyyy-MM-dd * @return String */ public static String getPreviousDateTimeString(int days) { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.DAY_OF_MONTH, -days); return toDateTimeString(calendar); } /** * 获取前几小时对应的当前时 * * @param format * 格式化如 yyyy-MM-dd * @return String */ public static String getPreviousDateByHourString(int hours) { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.HOUR_OF_DAY, -hours); return toDateString(calendar); } /** * 获取前几小时对应的当前时 * * @param format * 格式化如 yyyy-MM-dd * @return String */ public static String getPreviousDateTimeByHourString(int hours) { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.HOUR_OF_DAY, -hours); return toDateTimeString(calendar); } /** * 获取前几秒对应的当前时间 * * @param format * 格式化如 yyyy-MM-dd * @return String */ public static String getPreviousDateBySecondString(int second) { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.SECOND, -second); return toDateString(calendar); } /** * 获取前几秒对应的当前时间 * * @param format * 格式化如 yyyy-MM-dd * @return String */ public static String getPreviousDateTimeBySecondString(int second) { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.SECOND, -second); return toDateTimeString(calendar); } /** * 获取前一天对应的当前时间,采用标准格式yyyy-MM-dd * * @return String */ public static String getPreviousDateString() { return getPreviousDateTimeString("yyyy-MM-dd"); } /** * 获取上一个月日期,2011-01 * * @return */ public static String getPreviousMonthString() { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.MONTH, -1); return toDateTimeString(calendar, "yyyy-MM"); } /** * 获取上周 * * @return */ public static String getPreviousWeekString() { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); calendar.add(Calendar.WEEK_OF_MONTH, -1); return toDateTimeString(calendar, "yyyy-MM-dd"); } /** * 获取前一天对应的当前时间,采用短信格式yyyy/MM/dd * * @return String */ public static String getPreviousDateString2() { return getPreviousDateTimeString("yyyy/MM/dd"); } /** * 获取前一天对应的当前时间 * * @param format * 格式化如 yyyy-MM-dd HH:mm:ss * @return String */ public static String getPreviousDateTimeString(String format) { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.DAY_OF_MONTH, -1); return toDateTimeString(calendar, format); } /** * 获取前一天对应的当前时间,采用标准格式yyyy-MM-dd HH:mm:ss * * @return String */ public static String getPreviousDateTimeString() { return getPreviousDateTimeString("yyyy-MM-dd HH:mm:ss"); } /** * 获取前一天对应的当前时间,采用短信格式yyyy/MM/dd HH:mm:ss * * @return String */ public static String getPreviousDateTimeString2() { return getPreviousDateTimeString("yyyy/MM/dd HH:mm:ss"); } /** * 获取后一天的Date String * * @param spe * 分隔�? * @return YYYY+spe+MM+spe+DD */ public static String getNextDateStr(String spe) { Calendar calendar = Calendar.getInstance(); long longDate = (calendar.getTime()).getTime() + (1000 * 60 * 60 * 24 * 1); Date date = new Date(longDate); calendar.setTime(date); return toDateString(calendar.getTime(), spe); } /** * 获取指定时间的后的Date String * * @param spe * 分隔 * @return YYYY+spe+MM+spe+DD */ public static String getNextDateString(String currentDate) { Calendar calendar = toCalendar(currentDate + " 00:00:01"); calendar.add(Calendar.DAY_OF_MONTH, 1); return toDateString(calendar); } /** * 获取后几天对应的当前时间 * * @param format * 格式化如 yyyy-MM-dd * @return String */ public static String getNextDateString(int days) { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.DAY_OF_MONTH, days); return toDateString(calendar); } /** * 获取后几天对应的当前时间 * * @param format * 格式化如 yyyy-MM-dd * @return String */ public static String getNextDateTimeString(int days) { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.DAY_OF_MONTH, days); return toDateTimeString(calendar); } /** * 获取后几小时对应的当前时�? * * @param format * 格式化如 yyyy-MM-dd * @return String */ public static String getNextDateStringByHour(int hours) { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.HOUR_OF_DAY, hours); return toDateString(calendar); } /** * 获取后几小时对应的当前时 * * @param format * 格式化如 yyyy-MM-dd * @return String */ public static String getNextDateTimeStringByHour(int hours) { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.HOUR_OF_DAY, hours); return toDateTimeString(calendar); } /** * 获取后几分对应的当前时间 * * @param format * 格式化如 yyyy-MM-dd * @return String */ public static String getNextDateTimeStringByMinute(int minute) { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.MINUTE, minute); return toDateTimeString(calendar); } /** * 获取后几秒对应的当前时间 * * @param format * 格式化如 yyyy-MM-dd * @return String */ public static String getNextDateTimeStringBySecond(int seconds) { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.SECOND, seconds); return toDateTimeString(calendar); } /** * 获取后一天的Date String * * @param format * 格式 * @return YYYY+spe+MM+spe+DD */ public static String getNextDateTimeStr(String format) { Calendar calendar = Calendar.getInstance(); long longDate = (calendar.getTime()).getTime() + (1000 * 60 * 60 * 24); Date date = new Date(longDate); calendar.setTime(date); return toDateTimeString(calendar.getTime(), format); } /** * 获取后一天String * * @param year * 当前 * @param month * 当前 * @param day * 当前日期 * @param days * 相差天数 * @return 年月日数 */ public static int[] getNextDay() { Calendar calendar = Calendar.getInstance(); long longDate = (calendar.getTime()).getTime() + (1000 * 60 * 60 * 24); Date date = new Date(longDate); calendar.setTime(date); int[] rtn = new int[3]; rtn[0] = calendar.get(Calendar.YEAR); rtn[1] = calendar.get(Calendar.MONTH) + 1; rtn[2] = calendar.get(Calendar.DATE); return rtn; } /** * 获取当前时间的后或数天的年月日,并以数组形式还回数组0为年为月为日 * * @param year * 当前 * @param month * 当前 * @param day * 当前日期 * @param days * 相差天数 * @return 年月日数 */ public static int[] getNextDay(int year, int month, int day, int days) { Calendar calendar = Calendar.getInstance(); calendar.set(year, month - 1, day); long longDate = (calendar.getTime()).getTime() + (1000 * 60 * 60 * 24 * days); Date date = new Date(longDate); calendar.setTime(date); int[] rtn = new int[3]; rtn[0] = calendar.get(Calendar.YEAR); rtn[1] = calendar.get(Calendar.MONTH) + 1; rtn[2] = calendar.get(Calendar.DATE); return rtn; } /** * 获取指定时间周的第一天的时间 * * @param year * @param month * @param day * @return 年月日数 */ public static int[] getDayOfWeek(int year, int month, int day) { int[] rtn = new int[6]; int week = 0; long longDate = 0; Date date = null; Calendar calendar1 = Calendar.getInstance(); Calendar calendar2 = Calendar.getInstance(); Calendar calendar = Calendar.getInstance(); calendar.set(year, month - 1, day); calendar.setFirstDayOfWeek(Calendar.SUNDAY); week = calendar.get(Calendar.DAY_OF_WEEK); longDate = (calendar.getTime()).getTime() - (60 * 1000 * 60 * 24 * (week - 1)); date = new Date(longDate); calendar1.setTime(date); rtn[0] = calendar1.get(Calendar.YEAR); rtn[1] = calendar1.get(Calendar.MONTH) + 1; rtn[2] = calendar1.get(Calendar.DATE); longDate = (calendar.getTime()).getTime() + (60 * 1000 * 60 * 24 * (7 - week)); date = new Date(longDate); calendar2.setTime(date); rtn[3] = calendar2.get(Calendar.YEAR); rtn[4] = calendar2.get(Calendar.MONTH) + 1; rtn[5] = calendar2.get(Calendar.DATE); return rtn; } /*********************************************************/ // 以下为数据库使用的日期方Timestamp ,java.sql.Date /*********************************************************/ /** 返回当前时间的Timestamp */ public static Timestamp nowTimestamp() { return new Timestamp(System.currentTimeMillis()); } /** 返回从当日开始的Timestamp */ public static Timestamp getDayStart(Timestamp stamp) { return getDayStart(stamp, 0); } /** 返回多少天后的Timestamp */ public static Timestamp getDayStart(Timestamp stamp, int daysLater) { Calendar tempCal = Calendar.getInstance(); tempCal.setTime(new Date(stamp.getTime())); tempCal.set(tempCal.get(Calendar.YEAR), tempCal.get(Calendar.MONTH), tempCal.get(Calendar.DAY_OF_MONTH), 0, 0, 0); tempCal.add(Calendar.DAY_OF_MONTH, daysLater); return new Timestamp(tempCal.getTime().getTime()); } /** 返回下一天开始的Timestamp */ public static Timestamp getNextDayStart(Timestamp stamp) { return getDayStart(stamp, 1); } /** 返回从当日结束的Timestamp */ public static Timestamp getDayEnd(Timestamp stamp) { return getDayEnd(stamp, 0); } /** 返回从多少日后结束的Timestamp */ public static Timestamp getDayEnd(Timestamp stamp, int daysLater) { Calendar tempCal = Calendar.getInstance(); tempCal.setTime(new Date(stamp.getTime())); tempCal.set(tempCal.get(Calendar.YEAR), tempCal.get(Calendar.MONTH), tempCal.get(Calendar.DAY_OF_MONTH), 23, 59, 59); tempCal.add(Calendar.DAY_OF_MONTH, daysLater); return new Timestamp(tempCal.getTime().getTime()); } /** * String到java.sql.Date的转标准格式:YYYY-MM-DD * * @param date * The date String * @return java.sql.Date */ public static java.sql.Date toSqlDate(String date) { Date newDate = toDate(date, "00:00:00"); if (newDate == null) { return null; } return new java.sql.Date(newDate.getTime()); } /** * 生成java.sql.Date,通过传入year, month, day * * @param yearStr * @param monthStr * @param dayStr * @return A java.sql.Date */ public static java.sql.Date toSqlDate(String yearStr, String monthStr, String dayStr) { Date newDate = toDate(yearStr, monthStr, dayStr, "0", "0", "0"); if (newDate == null) { return null; } return new java.sql.Date(newDate.getTime()); } /** * 生成java.sql.Date,通过传入year, month, day * * @param year * @param month * @param day * @return A java.sql.Date */ public static java.sql.Date toSqlDate(int year, int month, int day) { Date newDate = toDate(year, month, day, 0, 0, 0); if (newDate == null) { return null; } return new java.sql.Date(newDate.getTime()); } /** * 转换String �?java.sql.Time,格式:"HH:MM:SS" * * @param time * The time String * @return A java.sql.Time */ public static java.sql.Time toSqlTime(String time) { Date newDate = toDate("1970-1-1", time); if (newDate == null) { return null; } return new java.sql.Time(newDate.getTime()); } /** * 生成 java.sql.Time 通过输入 * * @param hourStr * @param minuteStr * @param secondStr * @return A java.sql.Time */ public static java.sql.Time toSqlTime(String hourStr, String minuteStr, String secondStr) { Date newDate = toDate("0", "0", "0", hourStr, minuteStr, secondStr); if (newDate == null) { return null; } return new java.sql.Time(newDate.getTime()); } /** * 生成 java.sql.Time 通过输入 * * @param hour * @param minute * @param second * @return A java.sql.Time */ public static java.sql.Time toSqlTime(int hour, int minute, int second) { Date newDate = toDate(0, 0, 0, hour, minute, second); if (newDate == null) { return null; } return new java.sql.Time(newDate.getTime()); } /** * 转换String �?java.sql.Timestamp,格式:"YYYY-MM-DD HH:MM:SS" * * @param dateTime * 格式:"YYYY-MM-DD HH:MM:SS" * @return Timestamp */ public static Timestamp toTimestamp(String dateTime) { Date newDate = toDate(dateTime); if (newDate == null) { return null; } return new Timestamp(newDate.getTime()); } /** * 转换String �?java.sql.Timestamp,格式:"YYYY-MM-DD HH:MM:SS" * * @param date * The date String: YYYY-MM-DD * @param time * The time String: HH:MM:SS * @return Timestamp */ public static Timestamp toTimestamp(String date, String time) { Date newDate = toDate(date, time); if (newDate == null) { return null; } return new Timestamp(newDate.getTime()); } /** * 生成 Timestamp 通过输入 * * @param yearStr * @param monthStr * @param dayStr * @param hourStr * @param minuteStr * @param secondStr * @return Timestamp */ public static Timestamp toTimestamp(String yearStr, String monthStr, String dayStr, String hourStr, String minuteStr, String secondStr) { Date newDate = toDate(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); if (newDate == null) { return null; } return new Timestamp(newDate.getTime()); } /** * 生成 Timestamp 通过输入 * * @param year * @param month * @param day * @param hour * @param minute * @param second * @return Timestamp */ public static Timestamp toTimestamp(int year, int month, int day, int hour, int minute, int second) { Date newDate = toDate(year, month, day, hour, minute, second); if (newDate == null) { return null; } return new Timestamp(newDate.getTime()); } /** * 没有毫秒的时间转成带毫秒的时间 * * @param time * @return */ public static long timeIntToLong(int time) { return (long) time * 1000; } /** * 有毫秒的时间转成不带毫秒的时间 * * @param time * @return */ public static int timeLongToInt(long time) { return (int) time / 1000; } /** * 长整形转日期 * * @param time * @return */ public static Date longToDate(long time) { Date date = new Date(time); return date; } /** * int转日期 * * @param time * @return */ public static Date intToDate(int time) { long timeL = timeIntToLong(time); Date date = new Date(timeL); return date; } /** * 将秒转换为小时,分钟,秒钟 * * @param second * @return */ public static String secondToHHMMSS(int second) { int hh = second / 3600; int mm = second % 3600 / 60; int ss = second % 60; return String.format("%02d:%02d:%02d", hh, mm, ss); } /** * * @param datetime * @return */ public static String toYYYMMDD(long datetime) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); return sdf.format(new Date(datetime)); } /** * * @param datetime * @return */ public static String toYYYMMDD(Date datetime) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); return sdf.format(datetime); } /** * * @param datetime * @return */ public static String toYYYMM(long datetime) { SimpleDateFormat sdf = new SimpleDateFormat("yyyyMM"); return sdf.format(new Date(datetime)); } /** * 将秒转换为小时,分钟,秒钟 * * @param second * @return */ public static String secondToHHMM(long second) { long hh = second / 3600; long mm = second % 3600 / 60; return String.format("%02d:%02d", hh, mm); } /** * * @param yyyyMMDD * @return */ public static Date getDayEnd(final String yyyyMMDD) { Date date=null; try { date = sf.parse(yyyyMMDD); return dayEnd(date); } catch (ParseException e) { Log.e(TAG, e.getMessage(), e); } return date; } /** * * @param date * @return */ public static Date dayEnd(final Date date) { Calendar c = Calendar.getInstance(); c.setTime(date); c.set(Calendar.HOUR_OF_DAY, 23); c.set(Calendar.MINUTE, 59); c.set(Calendar.SECOND, 59); return c.getTime(); } /** * * @param yyyyMMDD * @return */ public static Date getDayStart(final String yyyyMMDD) { Date date=null; try { date = sf.parse(yyyyMMDD); return dayStart(date); } catch (ParseException e) { Log.e(TAG, e.getMessage(), e); } return date; } /** * * @param date * @return */ public static Date dayStart(final Date date) { Calendar c = Calendar.getInstance(); c.setTime(date); c.set(Calendar.HOUR_OF_DAY, 0); c.set(Calendar.MINUTE, 0); c.set(Calendar.SECOND, 0); return c.getTime(); } /** * 今天开始 * @return */ public static Date todayStart() { Calendar date = Calendar.getInstance(); //设置时间为 xx-xx-xx 00:00:00 date.set(date.get(Calendar.YEAR), date.get(Calendar.MONTH), date.get(Calendar.DATE), 0, 0, 0); return date.getTime(); } /** * 今天结束 * @return */ public static Date todayEnd() { Calendar date = Calendar.getInstance(); //设置时间为 xx-xx-xx 23:59:59 date.set(date.get(Calendar.YEAR), date.get(Calendar.MONTH), date.get(Calendar.DATE), 23, 59, 59); return date.getTime(); } /** * * @param date * @param second * @return */ public static Date addSecond(final Date date, int second) { Calendar c = Calendar.getInstance(); c.setTime(date); c.add(Calendar.SECOND, second); return c.getTime(); } }
java
{ "metadata": { "id": "scoringCondition", "name": "scoringCondition", "description": "", "systemTags": [ "profileTags", "aggregated", "condition", "profileCondition" ], "readOnly": true }, "parentCondition": { "type": "profilePropertyCondition", "parameterValues": { "propertyName": "script::'scores.'+scoringPlanId", "propertyValueInteger": "parameter::scoreValue", "comparisonOperator": "parameter::comparisonOperator" } }, "parameters": [ { "id": "scoringPlanId", "type": "string", "multivalued": false, "defaultValue": "" }, { "id": "scoreValue", "type": "integer", "multivalued": false, "defaultValue": 0 }, { "id": "comparisonOperator", "type": "string", "multivalued": false, "defaultValue": "greaterThanOrEqualTo" } ] }
json
Flavour and fervour- that’s the heartbeat of India, from a raja to rank. What a combination it has been since time immemorial! Take the case of Ghiyath Shah,a fierce warrior general who wielded his sword to increase his father’s Malwa empire in central India. But after being crowned Sultan in 1469 AD, he sheathed his sword and became an epicurean who could have been the envy of Louis XIV, the Sun King of France. Ghiyath Shahi’s 30-year reign was a mix of flavour and fervour. Six centuries ago, he integrated art, architecture and water harvesting through his Jahaz Mahal (palace resembling a ship) and Hindola Mahal (palace that gently swayed), and many such opulent structures. The new Sultan understood the need for storing water for the people of Mandu, the new capital, after shifting from Dhar. Sense and sensuality were at play in this bon vivant’s court. An exquisite creation is Ni’matnama (Book of Delights), a piece of art which was treasured in the library of Tipu Sultan’s vast collection of books, and later taken away as ‘spoils of victory’ by the East India Company to the British Library, London. Ni’matnama is a delightful, and beguiling, fusion of flavours of the five senses – an ode to the olfactory pleasures that includes cuisine! The 50 exquisitely detailed miniature paintings give the sybarite Sultan’s perspective of how to enjoy life. The humble samosa of today makes a grand appearance in Ni’matnama. The street food of today has been glorified in 10 gastronomic creative ways. The detailed description of how to make that perfect samosa includes a warning -- to not to forget the saffron, fried aubergine, ginger et al. This begs the question -- what is a samosa and why has it been feted for over a millennia? A quick walk-through in history tells us that samosa -- or Sambushka -- first finds mention in Tarikh-e-Beyhaghi written by Iranian historian Abolfazl Beyhaqi (995-1077 CE). The origin lies in the Fertile Crescent of Turkey-Mesopotamia-Iran -- with the cultivation of grass-seeds that were the forerunners of barley and wheat, converting hunter-gatherers to farmer-settlers around 12,000 BCE, and the dawn of civilization. By the time the first millennium was ending, the Fertile Crescent had given rise to the Middle Eastern cuisine. Sanbosaq (etymologically related to Sambushka) and the pyramidal patty of Egypt, Samsa, find mention in the early medieval Persian texts – as do Sanbusak, Sanbusaq and Sanbusaj. Essentially snack items for the Silk Route traveller-traders, these were small triangle shaped patties filled with keema (mincemeat) and preservatives for long journeys. History records that’s how the stuffed triangle travelled from Central Asia to North Africa, East Asia and South Asia – from the present-day Middle East with traders and adventurers through Afghanistan to the northern region of the Indian subcontinent. Ibn Batuta, the Morroccan traveller, savoured a snack item called Sambusak - triangular pastry packed with mince, peas, pistachios, almonds and other tasty fillings – in Muhammad bin Tughlaq’s court (sometimes in 1334-40 CE), as recorded in his globe-trotter’s account Rihala. But the term samosa makes its appearance in Amir Khusrau’s riddle (around 1300 CE). “Samosa kyun na khaya? Joota kyun na pehna? Khusrau was a Sufi scholar, musician (invented the sitar) and a favourite disciple of Hazrat Nizamuddin Auliya during Tughlaq era. This little snack made its way through the hearts of a lot of people around the globe -- from Egypt to Libya to Central Asia and finally, India. The name slightly varies across the continent, and so does the stuffing. The flaky thin-crusted Sambushka -- filled with meat, pistachio etc, and flavoured with saffron and other spices -- has turned into the fried samosa made of ubiquitous mashed potato filled roti cone (made from ground wheat or its maida variant) across the length and breadth of our land. There are variants, like the tastier and smaller Bengal Singara cousin filled with seasonal cauliflower pieces garnished with peanuts and raisins. Even chicken and mutton stuffing are now in vogue, harking back to the Silk Route days. So, how to make a samosa? It’s quite simple. Make a round roti. Cut it into two. Hold one half between your thumb and index finger. Rub some water to join the ends to make it into a cone. Fill the cone with mincemeat, potatoes, or anything that pleases the taste. Some also fill it with cooked noodles, while winters come up with stuffing of succulent green peas. The most popular is the mashed potatoes with masalas (spices). Now close the cone. The golden pyramid-shaped snack is ready to be fried. Do the same with the other half of the cut roti. (The author runs a small home kitchen, Luchee Food Story)
english
const Parent = window.DDG.base.Model function Linkable (attrs) { Parent.call(this, attrs) } Linkable.prototype = window.$.extend({}, Parent.prototype, { modelName: 'linkable' } ) module.exports = Linkable
javascript
Hi, I'm Seth Macfarlane. And this is the Wired Autocomplete Interview. I'm from New England. We only respond to negative criticism. If you wanna [beep] me, I'm here. Did Seth Macfarlane work on 'Johnny Bravo?' I did work on Johnny Bravo. at Hanna-Barbera/Cartoon Network. for Johnny Bravo for Season 1. And then, they fired us all and got some new guys, and, you know, that's when the show went south. Did Seth Macfarlane draw 'Family Guy?' I did way back when. My major was Animation in school, so I designed the characters. by other more talented artists, but the initial designs were mine. Did Seth Macfarlane leave 'Family guy?' Stepped away around 2011 or so, to the show runners who've been running it ever since. Yeah, these days, I do voiceover on Family Guy, but that's really about it. Did Seth Macfarlane sing in 'Sing?' Same word, both a verb and a noun. Actually, yeah, I did. for the fabulous motion picture, Sing. Did Seth Macfarlane make 'The Simpsons?' I fuckin' wish. No, I did not make The Simpsons. I have a lot of very good friends at The Simpsons, Matt Groening is a friend and Al Jean, and Mike Reiss, and Mike Scully. that was [clears throat] actually legitimate throat clear. I wasn't trying to undercut what I just said. The Simpsons definitely had an influence on my work. that came afterwards, they rewrote the rule book. So, no, I did not, but hopefully, you still like me. What does Seth Macfarlane look like? What blank Seth Macfarlane blank? This is like I'm on the Match Game here. Know what that is kids? Know what the Match Game is? Gene Rayburn, nothing? What voices does Seth Macfarlane do? and I'll bark like a seal for you. I do Peter. I do Stewie. I do Brian, and I do Quagmire. for, and Stan, and Roger. What is Seth Macfarlane working on now? I am working on The Orville, which premieres June 2nd. And I'm also working on Ted, which is a television series for Peacock based on the films. The movie, Ted, I don't know if Ted is a film. It's a movie. What awards has Seth Macfarlane won? Softball questions. Yeah, a handful of Emmys, like the Man-Show awards. Right, no, the Spike TV awards. One of those dude channels that used to be around. I got something from them that had antlers on it. That's still in my house. What movies did Seth Macfarlane direct? Directed three movies, Ted, Ted 2, and A Million Ways to Die in The West, that if I had to do over again, and come up with something shorter. Yeah, that's that's those questions. Who was Seth Macfarlane on 'Gilmore Girls?' I think I was a graduating college student. I was [laughs] literally, just taking, taking shots at Lorelai Gilmore. a rendition of Michael, Row The Boat Ashore. I think that was the extent of my Gilmore Girls tenure. I was friends with Amy Palladino and Dan Palladino. So, it was a little bit of nepotism. Dan Palladino used to run Family Guy with me, and so, when he left to go do Gilmore Girls, he took me with him, I guess. What college did Seth Macfarlane go to? Attend, you also could have said. I went to the Rhode Island School of Design, superb school. They trained me to make Family Guy, which I'm sure, you know, they regret at this stage, but, yeah, loved RISDI, loved my experience. Great place, highly recommended. Why does Seth Macfarlane hate Tucson? It's not Tucson that I hate. It's it's all [laughs] of Arizona. Does Seth Macfarlane own Hulu? I do not own Hulu. I have a subscription to Hulu. If things keep going better, I'm gonna get the one without the commercials. Has Seth Macfarlane been on Broadway? I have not been on Broadway. to come to Spamalot, and as attractive as that offer was, the timing didn't work out. But it's not out of the realm of possibility. I'm certainly open to it. Why did Seth Macfarlane make 'American Dad?' Because Family Guy got canceled in 2002, or thereabouts. Created American Dad and then of course, Family Guy came back. on the air at the same time. And I figured, Well, it's all right. One of them will die, eventually. and they're both still kickin'. Is Seth Macfarlane nice? I guess it depends on the hour of the day. It's very early right now, but generally, I try to be kind. Is Seth Macfarlane vegan? I'm trying to phase out of meat. There's a Taco Bell late night now and then, that kind of disrupts things. But in general, I'd say that's probably where I'm headed. Is Seth Macfarlane's friends with Mila Kunis? We better be because she works for me. So, [chuckles] this would not be good, but yeah, no, she's a good egg. We're close. Is Seth Macfarlane friends with Ryan Reynolds? Yeah, I'm also friends with Ryan Reynolds. Yeah, these are like really, you guys could be digging a lot deeper. This is the next one. When did Seth Macfarlane host SNL? I think it was what? 2013? Does that sound about right? 2013? It was before Ted? No, it was after Ted. Yeah, after Ted, so 2013. I think the musical guest was Frank Ocean that night. When did Seth Macfarlane become famous? Right now. Like right here, now. Because of this Wired Autocomplete Interview, I'm now officially famous. When did Seth Macfarlane start singing? I've been singing since I was a little kid. I was in a church choir if you can believe that. I think probably, from the age of five years old, I was singing. When does, So, we're going to the Present Tense now. When does 'The Orville' take place? The Orville takes place in the 25th century. I think our pilot was 2417, was the date. So, yeah. There you go. How is Seth Macfarlane? Oh, you're asking how I am? [Staff] Yeah. How are you? I'm fine, I'm alright. How did Seth Macfarlane get his start? I got my start at Hanna-Barbera, that did Scooby Doo, The Flintstones, of work on the show called, Dexter's Lab, Ace Ventura, The Animated Series. How did Seth Macfarlane get Charlize Theron to, Let's just leave this one. I don't know what's under there. Oh, to be on 'The Orville?' Oh, well, that's that puts a different paint job on this. Charlize and I are very close. We're very, very good friends. as I thought she was and turned out she was. How does Seth Macfarlane know Patrick Stewart? I was a fan of Patrick Stewart for many years, but I don't remember exactly how I met him. I had a couple of friends who wrote for Star Trek. I think I may have met him that way. I don't remember how it came about, I guess, I guess we, I dunno, we have the same accountant or something? I don't, it doesn't, it's gone. It's gone. Seth Macfarlane, full name. Seth Woodbury Macfarlane. Seth Macfarlane, 'William Shatner' impression? Seth Macfarlane, 'William Shatner' impression. Seth Macfarlane, favorite movie. The Sound of Music. Can you believe that? Who would've thought? The Sound of mother fuckin' Music. Seth Macfarlane, shoe size? 11 and a half is probably where it averages out. where it's been like a 12. Seth Macfarlane is a genius. Hardly. I'm from New England. We only respond to negative criticism. So this is positive, so it does nothing for me. If you wanna shit on me, I'm here. That's it. Okay. What do I think about these searches? I think they're hugely imaginative. I do wish I owned Hulu. Yeah, I do wish I owned Hulu.
english
KATHMANDU: Mohammad Aftab Alam, Nepali Congress (NC) lawmaker, who was arrested in Rautahat on Sunday morning on the charge of murdering 14 persons, has lost his status of a lawmaker. With the arrest, Alam cannot exercise his right, including his remuneration and benefits, as a lawmaker. The decision to this effect was made after police formally informed the federal parliament secretariat about his arrest. He was arrested over a connection to a bombing on April 9, 2008. Alam will face suspension only if the court finds him guilty. The position of a lawmaker will also be vacant after that. The Central Investigation Bureau (CIB) of Nepal Police has been investigating the incident. The cadres were reportedly making a bomb following Alam’s order and were injured when the bomb accidentally went off.
english
More than most sports promotions, the UFC is a star-driven business. In order to succeed and draw the most money, it needs its top fighters to be seen as superstars by the fans. Thankfully for the UFC, a lot of the time, its superstars do their work for them by mastering the art of self-promotion. While the UFC can do a lot of the hard work in terms of pushing a fighter as a star to the fans, the whole thing becomes much easier if the fighter can promote themselves as a star too. With this in mind, here are five UFC fighters who have mastered the art of self-promotion. One current UFC star who has almost definitely mastered the art of self-promotion is current UFC middleweight champion Israel Adesanya. ‘The Last Stylebender’ debuted in the UFC in February 2018, and wasted absolutely no time in shooting up the rankings. Within four months of his debut, he’d headlined his first UFC event, and after only 14 months on the roster, he was holding UFC gold. Naturally, it’s fair to suggest that most of his success has come from his skills inside the octagon. Like Anderson Silva before him, Adesanya seemingly has the ability to move in an entirely different dimension to his opponents in order to land his strikes. However, it’s also safe to say that ‘The Last Stylebender’ is an expert at promoting himself. He is wildly charismatic, possesses a sharp wit and a willingness to throw verbal barbs on the microphone. He also comes across as down-to-earth enough to remain hugely popular with fans. More to the point, Adesanya is willing to push the boat out in order to ensure he’s always the center of attention. A great example being his Haka inspired entrance for his fight with Robert Whittaker at UFC 243. Essentially, Adesanya has made himself one of the most popular fighters in UFC history in a short space of time, and he’s done it at least partially by being able to expertly promote himself. Okay, so it’s fair to say that Khamzat Chimaev has been pretty impressive inside the octagon thus far into his short UFC career. ‘Borz’ destroyed John Phillips, Rhys McKee and Gerald Meerschaert in quick succession in 2020. After successfully fighting off a bad case of COVID-19, he then returned to throttle top ten-ranked welterweight Li Jingliang. While Chimaev can clearly handle himself inside the octagon, it’s fair to say that other fighters such as Anderson Silva have had more impressive runs to begin their UFC careers. What sets Chimaev apart from them is the fact that from the moment he stepped into the UFC, he’s been an absolutely brilliant self-promoter. The native of Chechnya clearly has plenty of charisma, and while his English isn’t the best at times, his promise to “smash everyone” in the UFC made him an instant star in the eyes of the fans. Particularly those who were missing Khabib Nurmagomedov. Outside of the octagon, ‘Borz’ has shown a surprising amount of wit and humor on social media – particularly on his Twitter account. When he’s in action, he’s also shown a penchant for the kind of showmanlike antics that made fighters such as Nurmagomedov, Tito Ortiz and Conor McGregor into superstars. An example being the way that he carried Jingliang towards Dana White before slamming him down. Essentially, while the UFC have pushed Chimaev as a star, they haven’t exactly had to put a lot of effort into doing so, showing how good of a self-promoter he is. While the majority of the UFC’s great self-promoters have worked to ensure they gain popularity with the fans, some fighters have bucked that trend by embracing the world of villainy. Chael Sonnen was arguably the first UFC fighter to really attempt to get the fans to boo him. However it’s probably fair to say that current welterweight contender Colby Covington has taken that idea to another level entirely. Initially seen as another cookie-cutter grinding wrestler, similar to, say, Jon Fitch, Covington was supposedly on the verge of being cut by the UFC in 2017 despite a stellar record inside the octagon. However, before that could happen, ‘Chaos’ changed his persona entirely, becoming a loudmouthed, outspoken American patriot who wasn’t afraid to use xenophobia, Trumpism and even near-racism to get under the skin of his opponents. While it’s probably fair to question the ethics of this approach, there’s no disputing that it’s worked. Covington now gets a deafening reaction every time he fights, with some fans embracing his new persona while many others feel compelled to boo him. More importantly, though, ‘Chaos’ has gone from being the kind of fighter that the UFC would attempt to bury on prelim cards to one of their more recognizable stars and multi-time headliner. The fact that he’s done it off his own back, regardless of the method, makes him one of the UFC’s masters of self-promotion. Jiri Prochazka’s career with the UFC is clearly only just beginning. The native of the Czech Republic has had just two fights inside the octagon thus far, knocking out Volkan Oezdemir and Dominick Reyes in devastating fashion. However, in a similar vein to Khamzat Chimaev, ‘Denisa’ has already set himself apart not only by fighting impressively, but by the sheer force of his natural charisma outside of the octagon. Prochazka had already established himself as a fan favorite in Japan prior to his UFC career, and his playful-yet-dangerous persona makes it easy to see why. Some fighters simply have the ability to draw in the interest of the fans without doing or saying much, and Prochazka is one of them. ‘Denisa’ has a unique, outlandish look, resembling a cross between the Tong Po character from the 80’s Jean-Claude Van Damme movie Kickboxer and a member of Duran Duran. While he hasn’t used it much in the UFC yet, his Czech battle cry “Bomby jak pica!” translates to “bomb the sh*t out of them!” and could easily be compared to a catchphrase used in the world of pro-wrestling. Essentially, if Prochazka manages to win the UFC light-heavyweight title as many suspect he will, he could easily develop into a European star on the level of Khabib Nurmagomedov. Most of that will be down to his own talent for self-promoting. Perhaps no other fighter in UFC history has mastered the art of self-promoting quite like Conor McGregor. The former UFC featherweight and lightweight champion undoubtedly has a serious set of skills inside the octagon, but at this stage, he’s transcended the sport of MMA entirely, and is one of the planet’s most recognizable athletes. ‘The Notorious’ definitely owes some of this success to his treatment by the UFC. From day one he was pushed as a star by the promotion, often to the point that some fans accused them of giving him preferential treatment. However, it was McGregor who initially made himself into a big deal. Firstly by showing tons of charisma in his UFC debut against Marcus Brimage and secondly by talking more trash than any other newcomer to the UFC had done before him. Before he’d even had three fights in the octagon, McGregor had become the most talked-about and the most called-out fighter on the UFC’s roster. When he headlined his first event in his hometown of Dublin, it was clear that he had something special. Even now, when it looks like his time as an elite-level fighter might be coming to an end, ‘The Notorious’ remains a master of self-promotion. Every time he posts on Twitter or Instagram, it's big news, and he’s somehow developed a best-selling brand of whiskey to complement his fighting career, too. Essentially, no other fighter in UFC history has been able to promote and sell themselves quite like the Irishman. Which explains why he’ll remain the biggest superstar in the sport for as long as he continues to compete.
english
Kunal Kapoor turned 44 on Monday, and his close friends, Hrithik Roshan and Sussanne Khan shared sweet birthday wishes for him. Actor Kunal Kapoor shares a close bond with Hrithik Roshan and his former wife, Sussanne Khan. The Rang De Basanti actor turned 44 on Monday, and both Hrithik and Sussanne had special birthday wishes for him. Sussanne Khan took to Instagram and shared pictures with Kunal Kapoor on his special day and wrote, “Happy happiest birthday my dear Kuns… wish you and nains The very best of Life’s blessings, Love and the greatest achievements #friendsthroughtheyears." The first picture featured her posing with the actor while they seem to be attending a party. The second picture saw Kunal in a group picture with Sussane Khan, Hrithik Roshan, Sonali Bendre, Naina Bachchan and a couple of other friends. Check out the post below: Meanwhile, Kunal, in a birthday interview with Hindustan Times, spoke about his journey in Bollywood and pointed out that he was initially warned against becoming an actor. It only happened recently that the filmmakers noticed his work and started calling him an ‘interesting actor’. Kunal was last seen in the Disney+ Hotstar historical fiction series The Empire, which saw him play the Mughal emperor Babur. The show also starred Shabana Azmi, Dino Morea, Drashti Dhami, Sahher Bambba and Aditya Seal.
english
<reponame>Gimme0/spotify-u import React, { useState } from "react"; import "../../App.scss"; import ListItem from "@material-ui/core/ListItem"; import ListItemText from "@material-ui/core/ListItemText"; import { FixedSizeList } from "react-window"; import { Box } from "@material-ui/core"; import DelayedCircularProgress from "../DelayedCircularProgress"; interface RowProps<T> { index: number; style: React.CSSProperties | undefined; data: { selectedIndex: number; onItemClick: (item: T, index: number) => void; items: T[]; getText: (t: T) => string; isLoading?: boolean; isItemLoaded?: (index: number) => boolean; }; } function renderRow<T>(props: RowProps<T>) { const { index, style } = props; const item = props.data.items[index]; const loaded: boolean = !props.data.isItemLoaded || props.data.isItemLoaded(index); const loading: boolean = !!props.data.isLoading && props.data.isLoading; let content; if (loading) { content = ( <ListItem style={{ height: 56 }} key={index}> <Box justifyContent="center" width="100%" display="flex"> <DelayedCircularProgress /> </Box> </ListItem> ); } else if (!loaded) { content = null; } else { content = ( <ListItem button key={index} selected={props.data.selectedIndex === index} onClick={() => { if (props.data.onItemClick && item) props.data.onItemClick(item, index); }} > <ListItemText primaryTypographyProps={{ noWrap: true }} primary={props.data.getText(item)} /> </ListItem> ); } return <div style={style}>{content}</div>; } interface Props<T> { height: number; itemSize: number; items: T[]; getText: (item: T) => string; itemCount?: number; onItemSelected?: (item: T, index: number) => void; onItemClick?: (item: T, index: number) => void; onItemsRendered?: any; reff?: any; isLoading?: boolean; isItemLoaded?: (index: number) => boolean; } function VirtualizedList<T>(props: Props<T>) { const [selectedIndex, setSelectedIndex] = useState<number | null>(null); const onItemClick = (item: T, index: number) => { let alreadySelected = index === selectedIndex; setSelectedIndex(index); if (props.onItemClick) props.onItemClick(item, index); if (!alreadySelected && props.onItemSelected) props.onItemSelected(item, index); }; const data = { selectedIndex: selectedIndex, onItemClick: onItemClick, items: props.items, getText: props.getText, isLoading: props.isLoading, isItemLoaded: props.isItemLoaded, }; return ( <div> <FixedSizeList itemData={data} height={props.height} width={"100%"} itemSize={props.itemSize} itemCount={props.itemCount ? props.itemCount : data.items.length} onItemsRendered={props.onItemsRendered} ref={props.reff} > {renderRow} </FixedSizeList> </div> ); } export default VirtualizedList;
typescript
# -*- coding: utf-8 -*- import json, os, os.path, re, shutil, subprocess, tempfile, time, unicodedata import psycopg2 from zipfile import ZipFile import private # 20037508.342789 is halfway around the equator in Google Mercator, # as calculated by: # SELECT ST_AsText( # ST_Transform( # ST_SetSRID( # ST_Point(180,0), # 4326 # ), # 3857 # ) # ); GOOG_180 = 20037508.342789 GOOG_360 = GOOG_180 * 2 def splitTableName( table ): split = table.split('.') if len(split) == 1: split = [ 'public', table ] return split def isGoogleSRID( srid ): return srid == 3857 or srid == 900913 def fixMultiPolygon180( geometry, fixer ): if not re.match( r'MULTIPOLYGON\(', geometry ): print 'ERROR: Not a MultiPolygon' return return re.sub( r'([\(,])((?:\d+)(?:\.\d+)?) ', fixer, geometry ) def fixCoord3857( match ): value = float( match.group(2) ) - GOOG_360 return match.group(1) + str(value) + ' ' def fixCoord4326( match ): value = float( match.group(2) ) - 360 return match.group(1) + str(value) + ' ' def isKML( filename ): return os.path.splitext(filename)[1].lower() == '.kml' def eachKML( source, tempdir ): if isKML( source ): yield source else: ZipFile( source, 'r' ).extractall( tempdir ) for root, dirs, files in os.walk( tempdir ): for name in files: if isKML( name ): yield os.path.join( tempdir, name ) def run( *command ): print 'Running ' + ' '.join(command) # TODO: quotes t1 = time.clock() subprocess.check_call( command ) t2 = time.clock() print '%s %.1f seconds' %( command[0], t2 - t1 ) class Database: def __init__( self, **kw ): self.database = kw.get( 'database' ) self.connection = psycopg2.connect( host = kw.get( 'host', private.POSTGRES_HOST ), port = kw.get( 'port', private.POSTGRES_PORT ), database = self.database, user = kw.get( 'user', private.POSTGRES_USERNAME ), password = kw.get( 'password', private.POSTGRES_PASSWORD ), ) self.cursor = self.connection.cursor() def execute( self, query, verbose=True ): if verbose: print query self.cursor.execute( query ) def executeCommit( self, query, verbose=True ): isolation_level = self.connection.isolation_level self.connection.set_isolation_level( psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT ) self.execute( query, verbose ) self.connection.set_isolation_level( isolation_level ) def createGeoDatabase( self, database ): self.dropDatabase( database ) self.executeCommit(''' CREATE DATABASE %(database)s WITH ENCODING = 'UTF8' TEMPLATE = template_postgis_20 CONNECTION LIMIT = -1; ''' % { 'database': database, }) def addUtilityFunctions( self ): self.executeCommit(''' CREATE EXTENSION unaccent; CREATE OR REPLACE FUNCTION lpad_notrunc( text, int4, varchar(1) ) RETURNS text AS $$ SELECT repeat( $3, $2 - length($1) ) || $1; $$ LANGUAGE SQL; ''' ) def createLikeTable( self, target, source ): self.executeCommit(''' DROP TABLE IF EXISTS %(target)s; CREATE TABLE %(target)s ( LIKE %(source)s INCLUDING DEFAULTS INCLUDING CONSTRAINTS INCLUDING INDEXES ); DROP SEQUENCE IF EXISTS %(target)s_gid_seq; CREATE SEQUENCE %(target)s_gid_seq; ''' % { 'target': target, 'source': source, }) def dropDatabase( self, name ): return self.drop( 'DATABASE', name ) def dropSchema( self, name ): return self.drop( 'SCHEMA', name ) def dropTable( self, name ): return self.drop( 'TABLE', name ) def dropColumn( self, schema, table, column ): return self.executeCommit(''' ALTER TABLE %(schema)s.%(table)s DROP COLUMN IF EXISTS %(column)s; ''' % { 'schema': schema, 'table': table, 'column': column }) def drop( self, kind, name ): self.executeCommit(''' DROP %(kind)s IF EXISTS %(name)s; ''' % { 'kind': kind, 'name': name, }) def createSchema( self, schema ): self.executeCommit(''' DROP SCHEMA IF EXISTS %(schema)s CASCADE; CREATE SCHEMA %(schema)s AUTHORIZATION postgres; ''' % { 'schema': schema, }) def loadCsvTable( self, source, table, cols, columns, copyopt='HEADER', encoding='utf8' ): target = '%s/%s-utf8.txt' %( private.TEMP_PATH, table ) utf8 = file(source).read().decode(encoding).encode('utf8') file( target, 'w' ).write( utf8 ) self.executeCommit( ''' CREATE TABLE %(table)s ( gid serial, %(columns)s ); ALTER TABLE %(table)s ADD PRIMARY KEY (gid); COPY %(table)s ( %(cols)s ) FROM '%(target)s' WITH CSV %(copyopt)s; ''' %({ 'table': table, 'cols': cols, 'columns': columns, 'target': target, 'copyopt': copyopt, }) ) os.remove( target ) def loadTsvTable( self, source, table, cols, columns, encoding='utf8' ): return loadCsvTable( self, source, table, cols, columns, "HEADER DELIMITER E'\t' ", encoding ) def loadKML( self, fulltable, source, kmltable, fixKML, select, fixTable ): fullGeom = 'full_geom' # temp googGeom = 'goog_geom' # temp schema, table = fulltable.split('.') tempdir = tempfile.mkdtemp( dir=private.TEMP_PATH ) newkmlfile = os.path.join( tempdir, 'new.kml' ) for kmlfile in eachKML( source, tempdir ): with open( kmlfile, 'rb' ) as f: kml = f.read() if fixKML: kml = fixKML( kml ) with open( newkmlfile, 'wb' ) as f: f.write( kml ) shppath = '%s/%s' %( tempdir, table ) vars = { 'gdalpath': private.GDAL_BIN, 'shppath': shppath, 'kmltable': kmltable, 'kmlfile': newkmlfile, 'table': table, 'select': select, } makeNewDir( shppath ) vars['shpfilename'] = shpfilename = '%s/%s.shp' %( shppath, table ) command = '''"%(gdalpath)s/ogr2ogr.exe" -f "ESRI Shapefile" -lco ENCODING=UTF-8 -overwrite -sql "%(select)s from '%(kmltable)s'" %(shpfilename)s %(kmlfile)s''' % vars subprocess.check_call( command ) print 'Loading %s' % shpfilename self.loadShapefile( shpfilename, private.TEMP_PATH, fulltable, fullGeom, '4326', None, True, shpfilename ) if fixTable: fixTable() self.addGoogleGeometry( fulltable, fullGeom, googGeom ) self.indexGeometryColumn( fulltable, googGeom ) self.dropColumn( schema, table, fullGeom ) shutil.rmtree( tempdir ) def loadShapefile( self, zipfile, tempdir, tablename, column=None, srid=None, encoding=None, create=True, shpfilename=None, tweaksql=None ): if column is None: column = 'full_geom' if srid is None: srid = '4269' if encoding is None: encoding = 'LATIN1' shpfile = zipfile zipname = os.path.basename( zipfile ) basename, ext = os.path.splitext( zipname ) shpname = basename + '.shp' sqlname = basename + '.sql' unzipdir = tempfile.mkdtemp( dir=tempdir ) if ext.lower() == '.zip': print 'Unzipping %s to %s' %( zipname, unzipdir ) ZipFile( zipfile, 'r' ).extractall( unzipdir ) shpfile = os.path.join( unzipdir, shpfilename or shpname ) print 'loadShapefile %s' % shpfile sqlfile = os.path.join( unzipdir, sqlname ) t1 = time.clock() command = '"%s/shp2pgsql" %s -g %s -s %s -W %s %s %s %s >%s' %( private.POSTGRES_BIN, ( '-a', '-c -I' )[create], column, srid, encoding, shpfile, tablename, self.database, sqlfile ) print 'Running shp2pgsql:\n%s' % command os.system( command ) t2 = time.clock() print 'shp2pgsql %.1f seconds' %( t2 - t1 ) if tweaksql: sqlfile = tweaksql( sqlfile ) command = '"%s/psql" -h %s -p %s -q -U %s -d %s -f %s' %( private.POSTGRES_BIN, private.POSTGRES_HOST, private.POSTGRES_PORT, private.POSTGRES_USERNAME, self.database, sqlfile ) print 'Running psql:\n%s' % command os.system( command ) t3 = time.clock() print 'psql %.1f seconds' %( t3 - t2 ) shutil.rmtree( unzipdir ) print 'loadShapefile done' def saveShapefile( self, shpfile, shpdir, tablename, column=None, srid=None ): if column is None: column = 'full_geom' if srid is None: srid = '4269' outdir = os.path.join( shpdir, shpfile ) makeNewDir( outdir ) run( '%s/pgsql2shp' % private.POSTGRES_BIN, '-f', '%s/%s' %( outdir, shpfile ), '-h', private.POSTGRES_HOST, '-p', private.POSTGRES_PORT, '-u', private.POSTGRES_USERNAME, '-P', private.POSTGRES_PASSWORD, '-g', column, self.database, tablename ) def getSRID( self, table, column ): ( schema, table ) = splitTableName( table ) self.execute(''' SELECT Find_SRID( '%(schema)s', '%(table)s', '%(column)s'); ''' % { 'schema': schema, 'table': table, 'column': column, }) return self.cursor.fetchone()[0] def columnExists( self, table, column ): self.execute(''' SELECT attname FROM pg_attribute WHERE attrelid = ( SELECT oid FROM pg_class WHERE relname = '%(table)s' ) AND attname = '%(column)s' ; ''' % { 'table': table, 'column': column, }) return self.cursor.fetchone() is not None def fix180( self, table, fullGeom, googGeom, where ): self.fixGeom180( table, fullGeom, 4326, 4269, fixCoord4326, where ) self.fixGeom180( table, googGeom, 3857, 3857, fixCoord3857, where ) def fixGeom180( self, table, geom, srid1, srid2, fixer, where ): print 'fixGeom180 %s %s %s %s' %( table, geom, fixer.func_name, where ) self.execute(''' SELECT gid, ST_AsText( ST_Transform( %(geom)s, %(srid1)d ) ) FROM %(table)s WHERE %(where)s ; ''' % { 'table': table, 'geom': geom, 'srid1': srid1, 'where': where, }) for gid, wkt in self.cursor.fetchall(): wkt = fixMultiPolygon180( wkt, fixer ) self.execute(''' UPDATE %(table)s SET %(geom)s = ST_GeometryFromText( '%(wkt)s', %(srid2)d ) WHERE gid = %(gid)s ; ''' % { 'table': table, 'geom': geom, 'wkt': wkt, 'srid2': srid2, 'gid': gid, }, False ) self.connection.commit() def addGeometryColumn( self, table, geom, srid=-1, always=False ): print 'addGeometryColumn %s %s' %( table, geom ) ( schema, table ) = splitTableName( table ) vars = { 'schema':schema, 'table':table, 'geom':geom, 'srid':srid, } if self.columnExists( table, geom ): if not always: return self.dropColumn( schema, table, geom ); self.execute(''' SELECT AddGeometryColumn( '%(schema)s', '%(table)s', '%(geom)s', %(srid)d, 'MULTIPOLYGON', 2 ); ''' % vars ) self.connection.commit() def indexGeometryColumn( self, table, geom ): print 'indexGeometryColumn %s %s' %( table, geom ) vars = { 'table':table, 'geom':geom, } t1 = time.clock() self.executeCommit(''' CREATE INDEX ON %(table)s USING GIST ( %(geom)s ); ''' % vars ) t2 = time.clock() print 'CREATE INDEX %.1f seconds' %( t2 - t1 ) self.analyzeTable( table ) def analyzeTable( self, table ): print 'analyzeTable %s' %( table ) t1 = time.clock() self.executeCommit(''' VACUUM ANALYZE %(table)s; ''' % { 'table':table } ) t2 = time.clock() print 'VACUUM ANALYZE %.1f seconds' %( t2 - t1 ) def addGoogleGeometry( self, table, llgeom, googeom ): print 'addGoogleGeometry %s %s %s' %( table, llgeom, googeom ) self.addGeometryColumn( table, googeom, 3857 ) t1 = time.clock() self.executeCommit(''' UPDATE %(table)s SET %(googeom)s = ST_Multi( ST_Transform( ST_Force_2D( ST_Buffer( %(llgeom)s, 0 ) ), 3857 ) ) ; ''' % { 'table': table, 'llgeom': llgeom, 'googeom': googeom, }) t2 = time.clock() print 'UPDATE ST_Transform %.1f seconds' %( t2 - t1 ) def mergeGeometry( self, sourceTable, sourceGeom, targetTable, targetGeom, whereGroupBy ): print 'mergeGeometry %s %s %s %s %s' %( sourceTable, sourceGeom, targetTable, targetGeom, whereGroupBy ) t1 = time.clock() srid = self.getSRID( sourceTable, sourceGeom ) self.addGeometryColumn( targetTable, targetGeom, srid ) self.executeCommit(''' UPDATE %(targetTable)s SET %(targetGeom)s = ( SELECT ST_Multi( ST_MakeValid( ST_Union( --ST_SnapToGrid( %(sourceGeom)s -- , -- 0.0000001 --) ) ) ) FROM %(sourceTable)s %(whereGroupBy)s ); SELECT Populate_Geometry_Columns(); ''' % { 'sourceTable': sourceTable, 'sourceGeom': sourceGeom, 'targetTable': targetTable, 'targetGeom': targetGeom, 'whereGroupBy': whereGroupBy, }) t2 = time.clock() print 'UPDATE ST_Union %.1f seconds' %( t2 - t1 ) # TODO: refactor with mergeGeometry def createMergedGeometryTable( self, sourceTable, sourceGeom, targetTable, targetGeom, cols, columns, whereGroupBy ): print 'createMergedGeometryTable %s %s %s %s %s' %( sourceTable, sourceGeom, targetTable, targetGeom, whereGroupBy ) t1 = time.clock() srid = self.getSRID( sourceTable, sourceGeom ) self.executeCommit( ''' CREATE TABLE %(targetTable)s ( gid serial, %(columns)s ); ALTER TABLE %(targetTable)s ADD PRIMARY KEY (gid); ''' %({ 'targetTable': targetTable, 'columns': columns, }) ) self.addGeometryColumn( targetTable, targetGeom, srid ) self.executeCommit(''' INSERT INTO %(targetTable)s SELECT nextval('%(targetTable)s_gid_seq'), %(cols)s, ST_Multi( ST_MakeValid( ST_Union( --ST_SnapToGrid( %(sourceGeom)s -- , -- 0.0000001 --) ) ) ) FROM %(sourceTable)s %(whereGroupBy)s; SELECT Populate_Geometry_Columns(); ''' % { 'sourceTable': sourceTable, 'sourceGeom': sourceGeom, 'targetTable': targetTable, 'targetGeom': targetGeom, 'cols': cols, 'columns': columns, 'whereGroupBy': whereGroupBy, }) t2 = time.clock() print 'UPDATE ST_Union %.1f seconds' %( t2 - t1 ) def simplifyGeometry( self, table, sourceGeom, targetGeom, tolerance ): print 'simplifyGeometry %s %s %s %f' %( table, sourceGeom, targetGeom, tolerance ) self.addGeometryColumn( table, targetGeom, self.getSRID(table,sourceGeom), True ) t1 = time.clock() self.executeCommit(''' UPDATE %(table)s SET %(targetGeom)s = ST_Multi( ST_MakeValid( ST_SimplifyPreserveTopology( %(sourceGeom)s, %(tolerance)f ) ) ) ; SELECT Populate_Geometry_Columns(); ''' % { 'table': table, 'sourceGeom': sourceGeom, 'targetGeom': targetGeom, 'tolerance': tolerance, }) t2 = time.clock() print 'UPDATE ST_SimplifyPreserveTopology %.1f seconds' %( t2 - t1 ) def makeGeoJSON( self, filename, table, boxGeom, polyGeom, geoid, name, idCol, nameCol, extraCol, where, jsonp ): print 'makeGeoJSON', filename t1 = time.clock() featurecollection = self.makeFeatureCollection( table, boxGeom, polyGeom, geoid, name, idCol, nameCol, extraCol, where ) self.writeGeoJSON( filename, featurecollection, jsonp ) t2 = time.clock() print 'makeGeoJSON %.1f seconds' %( t2 - t1 ) def writeGeoJSON( self, filename, data, jsonp=None ): print 'writeGeoJSON', filename geojson = json \ .dumps( data, separators=( ',', ':' ) ) \ .replace( '"name":', '\n"name":' ) if jsonp: geojson = jsonp + '(' + geojson + ')' file( filename, 'wb' ).write( geojson ) def makeFeatureCollection( self, table, boxGeom, polyGeom, geoid, name, idCol, nameCol, extraCol, where='true', fixid=None ): print 'makeFeatureCollection' if fixid is None: geoidfix = geoid else: geoidfix = fixid( geoid ) srid = self.getSRID( table, polyGeom ) digits = [ 6, 0 ][ isGoogleSRID(srid) ] # integer for google projection if boxGeom is not None: t1 = time.clock() self.execute(''' SELECT ST_AsGeoJSON( ST_Centroid( ST_Extent( %(boxGeom)s ) ), %(digits)s ), ST_AsGeoJSON( ST_Extent( %(boxGeom)s ), %(digits)s, 1 ) FROM %(table)s WHERE %(where)s ; ''' % { 'table': table, 'boxGeom': boxGeom, 'polyGeom': polyGeom, 'where': where, 'digits': digits, }) ( centerjson, extentjson ) = self.cursor.fetchone() if centerjson is None: return None center = json.loads( centerjson ) extent = json.loads( extentjson ) t2 = time.clock() print 'ST_Extent %.1f seconds' %( t2 - t1 ) else: t2 = time.clock() self.execute(''' SELECT %(idCol)s, %(nameCol)s, %(extraCol)s, ST_AsGeoJSON( ST_Centroid( %(polyGeom)s ), %(digits)s, 1 ), ST_AsGeoJSON( %(polyGeom)s, %(digits)s, 1 ) FROM %(table)s WHERE -- ST_IsValid( %(polyGeom)s ) -- AND %(where)s ORDER BY %(idCol)s ; ''' % { 'table': table, 'polyGeom': polyGeom, 'digits': digits, 'idCol': idCol, 'nameCol': nameCol, 'extraCol': extraCol, 'where': where, }) t3 = time.clock() print 'SELECT rows %.1f seconds' %( t3 - t2 ) features = [] for featuregeoid, featurename, featureextra, centroidjson, geomjson in self.cursor.fetchall(): #print featurename if fixid is None: featuregeoidfix = featuregeoid else: featuregeoidfix = fixid( featuregeoid, geoid ) if not centroidjson or not geomjson: print 'NO GEOMETRY for %s %s %s' %( featuregeoidfix, featurename, featureextra ) continue geometry = json.loads( geomjson ) centroid = json.loads( centroidjson ) extraName = extraCol.split( ' AS ' )[-1] feature = { 'type': 'Feature', 'bbox': geometry['bbox'], 'id': featuregeoidfix, 'name': featurename, extraName: featureextra, 'centroid': centroid['coordinates'], 'geometry': geometry, } features.append( feature ) del geometry['bbox'] featurecollection = { 'type': 'FeatureCollection', 'id': geoidfix, 'name': name, 'features': features, 'table': table, } if boxGeom is not None: featurecollection.update({ 'bbox': extent['bbox'], 'center': center['coordinates'], }) if srid != -1: featurecollection['crs'] = { 'type': 'name', 'properties': { 'name': 'urn:ogc:def:crs:EPSG::%d' % srid }, } t4 = time.clock() print 'makeFeatureCollection %.1f seconds' %( t4 - t3 ) return featurecollection def makeNewDir( path ): if os.path.exists( path ): shutil.rmtree( path ) time.sleep( 1 ) # hack to prevent access not allowed error on os.mkdir os.mkdir( path ) def TTYstr( ustr ): return unicodedata.normalize( 'NFKD', ustr ).encode( 'ascii', 'ignore' ).upper() if __name__ == "__main__": pass # TODO?
python
<gh_stars>1-10 { "anumithaapollo12-emojis": 11, "aretecode-decision-flow-control": 40, "aretecode-system-design-template": 46, "arqtangeles-architecture": 10, "bjoernkw-uml-er-library": 37, "braweria-customer-journey-map": 5, "cloud-cloud": 39, "corlaez-hexagonal-architecture": 10, "danimaniarqsoft-scrum-board": 4, "dbssticky-data-viz": 41, "dpalay-common-screen-resolutions": 2, "drwnio-drwnio": 27, "drwnio-storytelling": 16, "dwelle-hearts": 7, "ei-au-computers": 12, "esteevens-logos": 9, "excacomp-mobile-kit": 10, "excacomp-web-kit": 12, "farisology-data-science": 4, "ferminrp-awesome-icons": 73, "ferminrp-awesome-slides": 5, "ferminrp-gantt": 20, "ferminrp-post-it": 9, "franky47-apple-devices-frames": 5, "g-script-android": 6, "g-script-charts": 5, "g-script-forms": 58, "g-script-medias": 10, "gabi-as-cosmos-periodic-table": 2, "h7y-dropdowns": 9, "husainkhambaty-aws-simple-icons": 14, "inwardmovement-information-architecture": 15, "ivanreznikov-yellow-box": 1, "jakubpawlina-graphs": 14, "jdelacruz-veeam_unofficial": 8, "jhoughes-veeam": 5, "jumpingrivers-r": 1, "kaligule-robots": 15, "l8y-music-instruments": 6, "lipis-polygons": 6, "lipis-stars": 3, "madhusuthanan-b-front-end-tech-and-tools": 5, "madhusuthanan-b-html-css-js-icons": 8, "maeddes-technology-logos": 20, "marcottebear-raspberrypi-zero": 5, "markopolo123-dev_ops": 40, "marwinburesch-github-icons": 7, "michelcaradec-cloud-design-patterns": 28, "mikhailredis-redis-grafana": 2, "morgemoensch-gadgets": 9, "newbyca-cryptocurrencies": 1, "nikordaris-team-topologies": 4, "novakkkarel-nsx-t-vmware": 4, "ocapraro-bubbles": 21, "oehrlis-db-eng": 129, "pclainchard-it-logos": 10, "pgilfernandez-basic-shapes": 25, "pret-chess-set": 1, "revolunet-raspberrypi3": 2, "rkjc-arduino-boards": 3, "rkjc-schematic-symbols": 7, "rohanp-system-design": 87, "shellerbrand-canvases": 8, "shinkim-presentation-templates": 9, "simalexan-wardley-maps-symbols": 8, "slobodan-aws-serverless": 18, "spfr-lo-fi-wireframing-kit": 25, "swissarmysam-maps": 5, "thebrahmnicboy-logic-gates": 6, "thijsdev-snowflake": 13, "vasudevatirupathinaidu-random-figure-drawings": 7, "youritjang-azure-cloud-services": 5, "youritjang-software-architecture": 122, "youritjang-stick-figures": 73 }
json
<reponame>095990/programming-kirpicheva-ulyana #include <iostream> using namespace std; int main(int argc, char* argv[]) { long a = 0; long b = 0; long c = 0; long d = 0; cin >> a; cin >> b; cin >> c; cin >> d; for (int x = 0; x <= 1000; x++) { if (a * x * x * x + b * x * x + c * x + d == 0) { cout << x << " "; } } return EXIT_SUCCESS; }
cpp
Don’t waste your precious time searching the contest every day, Disconnected Rat can smell the contests and rat through everywhere. Get the maximum out of these contests. Make sure to carefully check the rules of each individual contest.! Good Luck! For your entries to count in the Challenge you need to receive at least 10 upvotes and at least 5 relevant and proper comments - so encourage all your friends and fellow community members to vote and comment on your posts! |What Is Your Niche? |Do You Love Justin Sun? These contests will run from May 08th, 2023 until 11.59pm UTC, on Sunday, May 14th, 2023. To have the best chance of winning in the Steemit Engagement Challenge you should enter as many of the contests as possible - but you can only enter one contest each day. Series of contests "Workplace" The workplace is the place where you work on a laptop or other gadget. Write posts in STEEMIT, code, or do other work or even play activities. The gadget can be any - laptop, desktop personal computer, tablet, phone. The participant must publish at least 20 comments during the period from 05.05 to 14.05. There must be 1 or more author's photo or illustration. according to you? |If a novel is written about your life, what would you name the novel? |30º Concussion on Values: |Color Palette: Blue Flowers! |Marriage for Life or Contract Marriage? |🆕 Is Steemit a learning space? on Steemit? love with your mother? with your mother or father?
english
Michael Clarke walks off the ground as his team-mates give a guard of honour. Chris Rogers and Michael Clarke shake hands after their last Test match. Australian captain Michael Clarke and Chris Rogers embrace ahead of day four. Michael Clarke and his wife Kyly Clarke embrace after his last Test match. Chris Rogers given a guard of honour by the Australian team. Michael Clarke walks from the ground after rain stopped play. Australia captain Michael Clarke waves to the crowd. Michael Clarke leads the team off the field. Michael Clarke and Chris Rogers enter the field in their last Test appearance. Michael Clarke poses with his family after his last Test.
english
CloudWalker Streaming Technologies, the revolutionizing tech start-up dedicated to creating digital ecosystems for large format screens directly through Smart TV or through conversion of existing TVs into smart TVs has recently launched its mammoth 55-inch Cloud TV. Available in flat and curved models, the TV is equipped with Ultra HD (4K) display, enabled with an Android OS, and a Content Discovery Engine equipped with a Cortex Dual Processor. Most importantly, the huge-yet-sleek TV set connects viewers with the treasure trove of internet-based entertainment in the most seamless and visually pleasing way. Users can access a plethora of digital content, enabling them to enjoy their favourite shows in a larger-than-life avatar. What’s more? Users can also download or side-load any Android app directly on the TV to stream digital content of their choice from thousands of applications available on the internet for Movies, TV Shows, Music, Documentaries, Educational, Kids content and more. The 55-inch Cloud TV also has a unique user interface that offers a first-of-its-kind ‘Screen-Shift’ technology that provides a viewing experience of watching Live TV and streaming digital content on the same screen simultaneously. Powered by the revolutionary Content Discovery Engine, an ingenious technology that discovers and curates rich & trending digital content available on the internet and brings them on the home screen of the TV. With this Cloud TVs are bringing digital entertainment into the living room of the audience on a big screen. It is also equipped with the CShare App which facilitates the connection of a user’s mobile to the TV. This enables the mobile to be mirrored on the TV and vice versa, and the phone can then be used as a remote, an air mouse, a wireless keyboard or as a voice search mechanism. The 55-inch Cloud TV comes with a SUPER REMOTE which has an inbuilt Air mouse plus IR function to quickly navigate all functions of the TV like switching channels, playing content, browsing the internet with a flick of one’s wrist. The presence of numerous hotkeys ensures a single press to get the user to their favourite and often-used functions. 3840X2160 (4K UHD) resolution, Dolby Digital Sound technology, Bluetooth, Dual Band Wi-Fi, 8 GB storage, 1GB RAM with attractive financing offers, Up to Rs. 20,000 off on exchange from Flipkart and truly competitive pricing at INR 54,999/- and INR 84,499/- for the flat and curved versions respectively, CloudWalker’s Smartest Smart TV, Cloud TVs are serving as the best tools to view limitless entertainment on your TV, on your own terms.
english
<gh_stars>1-10 # Particle arguments ![](./images/arguments/particle.png) The `ParticleArgument` class represents Minecraft particles. As expected, this is casted to the Bukkit `Particle` class. <div class="example"> ### Example - Show particles at a player's location Say we wanted to have a command that displayed particles at a player's location. We will use the following command syntax: ```mccmd /showparticle <particle> ``` With this, we can simply spawn the particle using the `World.spawnParticle(Particle, Location, int)` method: ```java {{#include ../../CommandAPI/commandapi-core/src/test/java/Examples.java:particlearguments}} ``` </div>
markdown
<reponame>Shadownox/iccm-feedbackexplanation {"version":1635513375034,"fileList":["noise.wasm","scripts/c3runtime.js","data.json","style.css","scripts/offlineclient.js","images/shared-0-sheet0.png","images/shared-0-sheet2.png","images/shared-0-sheet1.png","scripts/main.js","workermain.js","scripts/dispatchworker.js","scripts/jobworker.js","scripts/supportcheck.js","file.css","folresponses.json","icons/icon-16.png","icons/icon-32.png","icons/loading-logo.png","icons/icon-64.png","scripts/register-sw.js"]}
json
["Kemudian Abia mendapat perhentian bersama-sama dengan nenek moyangnya, dan ia dikuburkan di kota Daud. Maka Asa, anaknya, menjadi raja menggantikan dia. Pada zaman pemerintahannya negeri itu aman selama sepuluh tahun.","Asa melakukan apa yang baik dan yang benar di mata TUHAN, Allahnya.","Ia menjauhkan mezbah-mezbah asing dan bukit-bukit pengorbanan, memecahkan tugu-tugu berhala, dan menghancurkan tiang-tiang berhala.","Ia memerintahkan orang Yehuda supaya mereka mencari TUHAN, Allah nenek moyang mereka, dan mematuhi hukum dan perintah.","Ia menjauhkan bukit-bukit pengorbanan dan pedupaan-pedupaan dari segala kota di Yehuda. Dan kerajaanpun aman di bawah pemerintahannya.","Karena negeri itu aman dan tidak ada yang memeranginya di tahun-tahun itu, ia dapat membangun kota-kota benteng di Yehuda; TUHAN telah mengaruniakan keamanan kepadanya.","Katanya kepada orang Yehuda: \"Marilah kita memperkuat kota-kota ini dan mengelilinginya dengan tembok beserta menara-menaranya, pintu-pintunya dan palang-palangnya. Negeri ini masih dalam tangan kita, karena kita mencari TUHAN Allah kita dan Ia mencari kita serta mengaruniakan keamanan kepada kita di segala penjuru.\" Maka mereka melaksanakan pembangunan itu dengan berhasil.","Pasukan-pasukan Asa yang dari Yehuda jumlahnya tiga ratus ribu orang yang membawa perisai besar dan tombak, dan yang dari Benyamin jumlahnya dua ratus delapan puluh ribu orang yang membawa perisai kecil, sebagai pemanah. Mereka semua pahlawan-pahlawan yang gagah perkasa.","Zerah, orang Etiopia itu, maju berperang melawan mereka dengan tentara sebanyak sejuta orang dan tiga ratus kereta. Ia sampai ke Maresa.","Lalu Asa maju menghadapinya. Mereka mengatur barisan perangnya di lembah Zefata dekat Maresa.","Kemudian Asa berseru kepada TUHAN, Allahnya: \"Ya TUHAN, selain dari pada Engkau, tidak ada yang dapat menolong yang lemah terhadap yang kuat. Tolonglah kami ya TUHAN, Allah kami, karena kepada-Mulah kami bersandar dan dengan nama-Mu kami maju melawan pasukan yang besar jumlahnya ini. Ya TUHAN, Engkau Allah kami, jangan biarkan seorang manusia mempunyai kekuatan untuk melawan Engkau!\"","Dan TUHAN memukul kalah orang-orang Etiopia itu di hadapan Asa dan Yehuda. Orang-orang Etiopia itu lari,","lalu dikejar oleh Asa dan laskarnya sampai ke Gerar. Dari orang-orang Etiopia itu amat banyak yang tewas, sehingga tidak ada yang tinggal hidup, karena mereka hancur di hadapan TUHAN dan tentaranya. Orang-orang Yehuda memperoleh jarahan yang sangat besar.","Mereka mengalahkan semua kota di sekeliling Gerar, karena ketakutan yang dari TUHAN menimpa penduduknya. Mereka menjarahi semua kota itu, karena jarahan yang besar terdapat di situ.","Tenda-tenda pemilik ternakpun direbut mereka, dan banyak kambing domba dan unta diangkutnya sebagai jarahan, lalu mereka kembali ke Yerusalem."]
json
<filename>app/resources/meal.py from flask_restful import Resource, marshal, fields, reqparse from flask import abort from app import auth from app.models import Meal, PatientMeal, MealRequirement from sqlalchemy import func meal_order_fields = { 'id': fields.Integer, 'label': fields.String, 'total_orders': fields.Integer, 'uri': fields.Url('meal'), 'patients': fields.Url('patient_list_by_meal'), 'requirements': fields.Url('requirement_list_by_meal') } meal_fields = { 'id': fields.Integer, 'label': fields.String, 'total_quantity': fields.Integer, 'current_quantity': fields.Integer, 'uri': fields.Url('meal'), 'patients': fields.Url('patient_list_by_meal'), 'patient_meal': fields.Url('meal_list_by_patient'), 'requirements': fields.Url('requirement_list_by_meal') } class MealResource(Resource): decorators = [auth.login_required] def get(self, id): meal = Meal.query.get_or_404(id) return {'meal': marshal(meal, meal_fields)} class MealListResource(Resource): decorators = [auth.login_required] def __init__(self): self.reqparse = reqparse.RequestParser() self.reqparse.add_argument('feature', type=str, location=['json', 'args']) super(MealListResource, self).__init__() def get(self): args = self.reqparse.parse_args() if args['feature'] == 'total_orders': meals = Meal.query(Meal.id, Meal.label, func.count(PatientMeal.id).label('total_orders')) \ .join(PatientMeal) \ .group_by(Meal.id, Meal.label) \ .all() return {'meals': marshal([meal for meal in meals], meal_order_fields)} else: abort(400)
python
The coronavirus may have thwarted this couple’s wedding plans, but Publix was able to save the bride’s dream cake. Erin and Ben Cohen had originally planned to be married in Florida -- Erin’s home state -- where they would be able to have a Publix wedding cake. However, they had to change their plans and instead get married in Minneapolis, Minnesota, where Ben’s parents live, according to The Palm Beach Post. The problem was the wedding cake. Publix doesn’t have any grocery stores outside the southeast and though the couple tried to find a recipe online and make one themselves, they were having a tough time, The Post reported. Cake from the popular Florida-based supermarket chain were a big part of Erin’s childhood and her family had one for every major celebration, she told The Associated Press in a June interview. The first time she took Ben to Florida for a visit, she even made sure to take him to Publix for cake. “There are certain traditions that we are throwing away, but this Publix-inspired wedding cake feels like a real important piece of the puzzle in making our wedding feel special,″ she told The Associated Press. After the company heard about the couple’s plight, Publix stepped in to help. The supermarket offered to give the couple a virtual cake decorating session over Zoom and even sent them buttercream icing, pre-baked layers of cake, spatulas, a turntable for the cake and decorative gum paste flowers, according to The Post. Once they got the materials, a Publix bakery technical specialist gave them step-by-step instructions on how to put it all together. On top of that, Publix also delivered an identical cake to Erin’s family in Florida so they could have the same cake on Erin and Ben’s wedding day. “Publix created a way for my family to enjoy the exact same wedding cake we had at the ceremony in Minnesota — to share that experience with them was priceless,” Erin told The Post.
english
For many big or small businesses Producing consistent and high-quality content is an effective method to reach an audience. But old content cannot maintain its position in the market for a longer duration. To maintain the efficiency of your SEO efforts and, consequently, your potential for a high search ranking is increased when you update your existing content rather than producing new content. As new content can never be produced again and again for the same topic but can be updated. But updating content also becomes a difficult task for writers this is where the content rewriter tool is introduced.
english
package io.dropwizard.validation; import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Ordering; import com.google.common.collect.Sets; import javax.validation.ConstraintViolation; import javax.validation.Path; import java.util.Set; public class ConstraintViolations { private ConstraintViolations() { /* singleton */ } public static <T> String format(ConstraintViolation<T> v) { if (v.getConstraintDescriptor().getAnnotation() instanceof ValidationMethod) { final ImmutableList<Path.Node> nodes = ImmutableList.copyOf(v.getPropertyPath()); final ImmutableList<Path.Node> usefulNodes = nodes.subList(0, nodes.size() - 1); final String msg = v.getMessage().startsWith(".") ? "%s%s" : "%s %s"; return String.format(msg, Joiner.on('.').join(usefulNodes), v.getMessage()).trim(); } else { return String.format("%s %s", v.getPropertyPath(), v.getMessage()); } } public static <T> ImmutableList<String> format(Set<ConstraintViolation<T>> violations) { final Set<String> errors = Sets.newHashSet(); for (ConstraintViolation<?> v : violations) { errors.add(format(v)); } return ImmutableList.copyOf(Ordering.natural().sortedCopy(errors)); } public static ImmutableList<String> formatUntyped(Set<ConstraintViolation<?>> violations) { final Set<String> errors = Sets.newHashSet(); for (ConstraintViolation<?> v : violations) { errors.add(format(v)); } return ImmutableList.copyOf(Ordering.natural().sortedCopy(errors)); } public static <T> ImmutableSet<ConstraintViolation<?>> copyOf(Set<ConstraintViolation<T>> violations) { final ImmutableSet.Builder<ConstraintViolation<?>> builder = ImmutableSet.builder(); for (ConstraintViolation<T> violation : violations) { builder.add(violation); } return builder.build(); } }
java
The Union Ministry of AYUSH has sought details of licencing applications for Ayurvedic, Siddha, and Unani drugs as well as the results of clinical trials and research studies in these systems of medicine from States and Union Territories in the wake of their claims on COVID-19 treatment. In a recent order, the Ministry pointed out that guidelines had been issued in April on the conduct of research studies or clinical trials of Ayurveda, Siddha, Homoeopathy and Unani medicines for COVID-19 treatment. According to Rule 158-B of the Drugs and Cosmetics Rules, 1945, proof of effectiveness for new indication or use is required for granting licence or approval to manufacture and sell Ayurvedic, Siddha and Unani medicines. It had, however, come to the notice of the Union government that “approvals are being given for the medicinal products selected or registered for clinical trials or research studies” and “spurious claims and misleading advertisements are placed in the media” about the treatment of COVID-19 patients. Against this backdrop, the Union government directed the licencing authorities in States and Union Territories to forward the details of licencing applications of such formulations and results of clinical trials and research studies for verification by the AYUSH Ministry. It is in exercise of the powers under Section 33 P of the Drugs and Cosmetics Act, 1940, the order said. The respective licencing authorities should grant approval or licence to manufacture for sale of such formulations only after getting clearance from the Ministry, it added.
english
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var EditDiagramActionTypes; (function (EditDiagramActionTypes) { EditDiagramActionTypes["EDIT_DIAGRAM"] = "[DIAGRAM][EDIT] EDIT_DIAGRAM"; EditDiagramActionTypes["EDIT_DIAGRAM_START"] = "[DIAGRAM][EDIT] EDIT_DIAGRAM_START"; EditDiagramActionTypes["EDIT_DIAGRAM_SUCCEED"] = "[DIAGRAM][EDIT] EDIT_DIAGRAM_SUCCEED"; EditDiagramActionTypes["EDIT_DIAGRAM_FAILED"] = "[DIAGRAM][EDIT] EDIT_DIAGRAM_FAILED"; })(EditDiagramActionTypes = exports.EditDiagramActionTypes || (exports.EditDiagramActionTypes = {})); var EditDiagramAction = /** @class */ (function () { function EditDiagramAction(payload) { this.payload = payload; this.type = EditDiagramActionTypes.EDIT_DIAGRAM; } return EditDiagramAction; }()); exports.EditDiagramAction = EditDiagramAction; var EditDiagramActionStart = /** @class */ (function () { function EditDiagramActionStart(payload) { this.payload = payload; this.type = EditDiagramActionTypes.EDIT_DIAGRAM_START; } return EditDiagramActionStart; }()); exports.EditDiagramActionStart = EditDiagramActionStart; var EditDiagramActionSucceed = /** @class */ (function () { function EditDiagramActionSucceed(payload) { this.payload = payload; this.type = EditDiagramActionTypes.EDIT_DIAGRAM_SUCCEED; } return EditDiagramActionSucceed; }()); exports.EditDiagramActionSucceed = EditDiagramActionSucceed; var EditDiagramActionFailed = /** @class */ (function () { function EditDiagramActionFailed() { this.type = EditDiagramActionTypes.EDIT_DIAGRAM_FAILED; } return EditDiagramActionFailed; }()); exports.EditDiagramActionFailed = EditDiagramActionFailed; //# sourceMappingURL=edit-diagram.actions.js.map
javascript
import React, { useState } from "react"; import { Link } from "react-router-dom"; import { Button, Card, CardBody, CardGroup, Col, Container, Form, Input, InputGroup, InputGroupAddon, InputGroupText, Row } from "reactstrap"; import gql from "graphql-tag"; import { useMutation } from "@apollo/react-hooks"; import { Redirect, Route } from "react-router-dom"; import { useCookies } from "react-cookie"; import { oc } from "ts-optchain"; import { AuthService } from "../../Services/AuthService"; const SIGN_IN_MUTATION = gql` mutation UserCreateMutation($emailAddress: String!) { UserCreate(emailAddress: $emailAddress) { ... on User { id emailAddress } } } `; export default function Login() { const [signInMutation] = useMutation(SIGN_IN_MUTATION); const [emailAddress, setEmailAddress] = useState(""); const [cookies, setCookie] = useCookies(["emailAddress"]); const [userIdCookies, setUserIdCookie] = useCookies(["userId"]); const handleSubmit = event => { event.preventDefault(); signInMutation({ variables: { emailAddress: emailAddress } }).then(({ data }) => { console.log("data", data); const user = oc(data).UserCreate(); if (user.emailAddress && user.id) { setCookie("emailAddress", user.emailAddress); setUserIdCookie("userId", user.id); } }); }; return ( <Route render={props => AuthService.loggedIn() ? ( <Redirect to={{ pathname: "/dashboard" }} /> ) : ( <div className="app flex-row align-items-center"> <Container> <Row className="justify-content-center"> <Col md="8"> <CardGroup> <Card className="p-4"> <CardBody> <Form onSubmit={handleSubmit}> <h1>Login</h1> <p className="text-muted"> Returning user, Please sign-in using your email address </p> <p className="text-muted"> New User, Please enter your email address to start </p> <InputGroup className="mb-3"> <InputGroupAddon addonType="prepend"> <InputGroupText> <i className="icon-user" /> </InputGroupText> </InputGroupAddon> <Input type="text" placeholder="Email Address" onChange={event => setEmailAddress(event.target.value) } /> </InputGroup> <Row> <Col xs="6"> <Button color="primary" className="px-4" onClick={handleSubmit} > Login </Button> </Col> </Row> </Form> </CardBody> </Card> </CardGroup> </Col> </Row> </Container> </div> ) } /> ); }
javascript
{ "name": "bootstrap-autohidingnavbar", "filename": "jquery.bootstrap-autohidingnavbar.min.js", "description": "An extension for Bootstrap's fixed navbar which hides the navbar while the page is scrolling downwards and shows it the other way. The plugin is able to show/hide the navbar programmatically as well.", "repository": { "type": "git", "url": "http://github.com/istvan-ujjmeszaros/bootstrap-autohidingnavbar.git" }, "keywords": [ "jquery", "plugin", "bootstrap", "ui", "navigation" ], "homepage": "https://www.virtuosoft.eu/code/bootstrap-autohidingnavbar/", "autoupdate": { "source": "git", "target": "git://github.com/istvan-ujjmeszaros/bootstrap-autohidingnavbar.git", "fileMap": [ { "basePath": "dist", "files": [ "**/*" ] } ] }, "license": "Apache-2.0", "authors": [ { "name": "<NAME>", "url": "https://github.com/istvan-ujjmeszaros" } ] }
json
<reponame>MrNullPoint/marketing-api-go-sdk<gh_stars>10-100 # AllDataSpec ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Campaign** | [***CampaignGetSpec**](campaign_get_spec.md) | | [optional] [default to null] **Adgroup** | [***AdgroupGetSpec**](adgroup_get_spec.md) | | [optional] [default to null] **Adcreative** | [***AdCreativeGetSpec**](ad_creative_get_spec.md) | | [optional] [default to null] **AccountMetric** | [***MetricDetailData**](metric_detail_data.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
markdown
{ "name": "<NAME>", "rarity": "2", "foodtype": "SPECIALTY", "foodfilter": "Récupération", "foodcategory": "Recovery_Revive", "effect": "Réanime un personnage et restaure 15 % des PV max, puis encore 550 PV supplémentaires.", "description": "Spécialité culinaire de <NAME>. Le tofu frit a été spécialement préparé par la solennelle dame Kitsune. Il paraît que si vous mangez tout d'une traite de bon cœur, vous aurez la protection de la grande Kitsune. Le malheur s'enfuira et la fortune vous sourira !", "basedish": "Udon", "character": "<NAME>", "ingredients": [ { "name": "Farine", "count": 3 }, { "name": "<NAME>", "count": 1 }, { "name": "Poisson", "count": 1 } ] }
json
Following incidents of stone pelting between two groups leading to escalation of tension last evening, SILCHAR: Following incidents of stone pelting between two groups leading to escalation of tension last evening, the Cachar district administration has clamped curfew in the areas under Malugram Police Outpost of Silchar town with immediate effect. In an order issued to this effect on Monday, District Magistrate, Keerthi Jalli, said apprehending breach of peace and tranquility, curfew has been promulgated 'prohibiting the total movement of persons' in areas under Malugram Police Outpost of Silchar town with immediate effect. Two groups indulged in pelting stones at each other at Ghoniwala area of Silchar town on Sunday evening. Assam Police, CRPF and other security personnel rushed to the area of incident and brought the situation under control. As simmering tension prevails and there is every likelihood of breach of peace and public tranquility, the administration has clamped curfew in the areas falling under Malugram Police Outpost. However, the order exempts magistrates on duty, police, military and para military forces, health functionaries, including doctors and para medics. The order that comes into force with immediate effect shall continue to remain in force until further orders. In view of the incident that took place at Malugram'sGhoniwala area in Silchar town on Sunday last night, various segments of society and representatives of political parties cutting across party lines appealed to help the district administration in restoring peace, and maintaining law and order and communal harmony in the town. At a meeting convened by the district administration here on Monday, the senior citizens, religious leaders and representatives of political parties resolved to enhance administration-public coordination, quell rumour-mongering and reactivate peace committees for ushering in durable peace and tranquility in society amid the COVID-19 pandemic. Terming the incident of pelting of stones as handiwork of miscreants out to disturb peace in the society, all the participants demanded stern action against the perpetrators who fomented trouble. The participants thanked the civil and police administrations for taking swift action and preventing the incident from snowballing into a major law and order problem. Minister for Environment & Forest etc, ParimalSuklabaidya urged the Deputy Commissioner, DIG (Southern Range) and Superintendent of Police to visit the place of the incident once the curfew is lifted to instill confidence among the local people. He demanded strong action against the miscreants as per law and to quell rumours at work. The Minister said on hearing about the incident, Chief Minister SarbanandaSonowal rang him up, the DIG and the DC and took stock of the situation and asked them to step up efforts to restore normalcy in the troubled spot. Suklabaidya also asked the civil and police administrations to keep a tab on the social media and to take necessary action against those posting objectionable posts and spreading misinformation. Echoing the views of the participants, the Minister asked the DIG and SP to reinforce police personnel at Malugram Police Outpost as the areas under its jurisdiction is quite large. Suklabaidya exuded optimism that the ceremony associated with the bhoomipujan of Ram Temple at Ayodhya would pass off smoothly 'as the social fabric and secular ethos of our country is strong enough'. Deputy Commissioner, Keerthi Jalli assured that the administration would take stringent action against the culprits for triggering trouble 'as law will take its own course and in scotching rumours. Jalli said that the Ghoniwala incident that emanated from a trivial issue should not be allowed to recur. While appealing for peace and tranquility, Jalli sought the support and cooperation of everyone in the fight against COVID-19 during the festival times by following all protocols and to 'ensure that there is no political and religious congregations and assembling of more than five persons as per Government of Assam's latest guidelines to keep coronavirus at bay'. Earlier, DIG, Southern Range, Dilip Kumar Dey said the timely action by the police prevented the incident from snowballing into a major law and order problem. Dey said the local people with whom he and SP interacted said the incident should not have happened at all in an area which did not have such a precedent. Dey urged the participants to wean away certain misguided and frustrated youth who are spreading canards and misinformation in society. Superintendent of Police, Banwar Lal Meena urged the people to verify facts with the administration to keep rumours under check. Urging everyone not to take laws into own's hands, Meena said police will take action as per law. He requested everyone present to pass on correct and accurate information for the police to act upon. Silchar MLA, Dilip Kumar Paul said firm steps must be taken to scotch rumours and to book the culprits behind the incident. Former MP, Sushmita Dev thanked the administration for taking quick action and urged the administration to compensate those affected by the incident. Dev assured that they would help the administration in reaching out to the people. Additional Deputy Commissioner, SumitSattawan was also present. Also watch: #NewsMakers: Being LGBTQ+ A Curse?
english
import JobItem from "./JobItem"; export default JobItem;
typescript
import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { MatDividerModule, MatListModule } from '@angular/material'; import { FuseDemoContentComponent } from './demo-content/demo-content.component'; import { FuseDemoSidebarComponent } from './demo-sidebar/demo-sidebar.component'; @NgModule({ declarations: [ FuseDemoContentComponent, FuseDemoSidebarComponent ], imports : [ RouterModule, MatDividerModule, MatListModule ], exports : [ FuseDemoContentComponent, FuseDemoSidebarComponent ] }) export class FuseDemoModule { }
typescript
As expected Aamir Khan’s Dangal has finally achieved the feat and beaten the records held by PK. The film in it’s seventeenth day has gone past the domestic business of Aamir Khan’s 2014 blockbuster PK. In 2014, the film had made Rs 340. 8 crore becoming the highest grossing Indian film ever. Since then Salman Khan’s Bajrangi Bhaijaan(Rs 320. 34 crore) and Sultan(Rs 300. 45 crore) tried to break its record but failed to do so. It took Aamir Khan himself to achieve the feat once again. Early figures suggests an estimate of Rs 344 crore. And now with this, Dangal is on course to go past Rs 350 crore at Indian box office becoming first film to do so. With that, Aamir Khan has created a new record. The actor always sets new records and breaks it. Now we just have to wait and watch how far the film goes considering at the end of its third week, two new films will be releasing at the box office with Shraddha Kapoor-Aditya Roy Kapur’s OK Jaanu and Deepika Padukone’s Hollywood debut in xXx: Return Of Xander Cage, alongside Vin Diesel.
english
The Minister of State in the Ministry of Food and Agriculture (Dr. Ram Subhag Singh): Uttar Presh: No financial and technical assistance has been given since there does not appear to be any possibility of cashewnut cultivation in Uttar Pradesh. Bihar: The cultivation of cashewnut was taken up on experimental basis during the Second Five Year Plan. Plateau regions in the State have offered favourable conditions for the growth of this crop. Cashewnut seeds and technical assistance are provided to the cultivators for encouraging cashewnut cultivation through the Extension Staff. No financial assistance has so far been given. Union Territories: No financial or technical assistance has ben given to the cultivators in Laccadives, Himachal Pradesh, Goa, Manipur and Delhi. Technical advice has been given to the cultivators in Andaman and Nicobar Islands. Technical as well as financial assistance has been given to the growers in Tripura under the Third Five Year Plan. In regard to Pondicherry, a scheme for cashewnut cultivation is being taken up from 1963-64. In Goa, cashewnut cultivation is already well established. Himachal Pradesh and Delhi the conditions for growing cashewnut are not considered favourable. Boat building yard at Karwar 1539. Shri Raghunath Singh: Will the Minister of Transport and Communications be pleased to state: at Karwar and for dredging alongside the wharf and in the approach channel to a depth of 8 feet. This scheme has been included as a Centrally assisted scheme under the Third Five Year Plan, the provision being Rs. 21.22 lakhs. The State Government started work during 1961-62. An expenditure to the extent of (a) whether it is a fact that Mysore Government had decided to build a 1200 feet long wharf and a boat building yard at Karwar; and (b) if so, the details of the project? The Minister of Shipping in the Ministry of Transport and Communications (Shri Raj Bahadur): (a) and (b). The Intermediate Ports Developrecommended ment Committee had that first priority should be given to the construction of a lighterage wharf Rs. 3,76,700 has been incurred upto the 31st December 1692 on it. Details of the scheme regarding the boat building yard are awaited from the State Government. They will be laid on the Table of the Sabha as soon as they are received. Railway Crossing at Feroke 1540. Shri Koya: Will the Minister of Railways be pleased to state: (a) whether Government have reto ceived any representation struct a railway crossing at Feroke for the Karuvanthuruthi-Feroke road; (b) whether Government are aware of the fact that Karuvanthuruthi has no road connection with any of the neighbouring villages; and (c) whether Government propose to sanction a Railway crossing at Feroke? The Deputy Minister in the Ministry of Railways (Shri S. V. Ramaswamy): (a) Yes. (b) Yes. (c) A level crossing at this place is not feasible on consideration of is safety. The only alternative to connect the two roads i.e. Karuvanthuruthi-Chaliyam road and MadrasCalicut Road, through a road overbridge which scheme has been under the consideration of the State Government since 1957. The Railway would undertake the work as soon as such a scheme is finally sponsored by the State Government who would also have to agree to bear the cost of the work, under the extant rules. Forest Department, Port Blair 1541. Shri A. S. Saigal: Will the Minister of Food and Agriculture be 8171 Written Answers CHAITRA 16, pleased to refer to the reply given to Unstarred Question No. 2223 on the 30th May, 1962 and state: (a) the reasons for maintaining two separate indents registers by the Forest Department, Port Blair, for Government officers and general public respectively; and (b) the reason for supplying any firewood to private persons by Forest Department, Port Blair when Government's own requirements are not fully met and the Power House has to purchase firewood at Rs. 30 to 40 per against Forest Department's price of Rs. 5-50 per cord? The Minister of State in the Ministry of Food and Agriculture (Dr. Ram Subhag Singh ) : (a ) The reason is that it affords greater working venience. (b) The practice of supply of a small quantity of firewood fron Chatham Sawmill to private persons, subject to availability, has been in vogue in the Islands from time immemorial. It was apparently introduced originally to mitigate their hardships. Even by the stoppage of supply of firewood from Chatham Sawmill to the public, it is not possible to meet the requirements of the Power House in full. However the question of continuance of the system of supply of firewood from Chatham Sawmill to the public is being examined by the Forest Department, Port Blair, de novo. रहरा में तारघर १५४२. श्री प्रकाशवीर शास्त्री : क्या परिवहन तथा संचार मंत्री यह बताने कां कृपा करेंगे कि : ( क ) क्या यह सच है कि मुरादाबाद जिले में रहरा में कुछ समय पूर्व तार घर खोला गया था; ( ख ) क्या यह भी सच है कि यह तार घर महीने में कई-कई दिनों तक लगातार 1685 (SAKA) Written Answers 8172 खराब रहता है जिसके कारण उस क्षेत्र को जनता तारघर की सुविधाओं का लाभ नहीं उठा पाती और न ही बाहर से भेजे गये तार वहां शीघ्र पहुंचते हैं; (ग) क्या इस सम्बन्ध में सम्बन्धित अधिकारियों के पास कई शिकायतें भी की गयी हैं, परन्तु अभी तक उन्होंने कोई उचित निर्णय नहीं लिया है; और (घ) यदि हां, तो अब इस सम्बन्ध में सरकार क्या कर रही है ? परिवहन तथा संचार मंत्रालय में उपमंत्री ( श्री भगवती) : ( क ) जी हां । (ख) जी नहीं। पिछले दिनों हसनपुररहरा खण्ड में सड़क निर्माण कार्य के कारण तार परिपथ में कुछ खराबियां हो गई थीं । (ग) १८ फरवरी, १९६३ को भेजे गये एक तार की देरी के बाबत एक शिकायत की गई थी। जिसकी जांच जारी है । (घ) लाइन को फिर से ठोकठाक और दुबारा बनाया जा रहा है । राजस्थान में मलकूप लगाना श्री प० ला० बारूपाल : श्री नवल प्रभाकर : श्री हेम राज : क्या खाद्य तथा कृषि मंत्रों यह बताने कां कृपा करेंगे कि : (क) लघु सिंचाई योजनाओं के अन्तर्गत राजस्थान में केन्द्रीय सरकार की ओर से कितने नलकूप लगाये जायेंगे और इनमें से बीकानेर डिवीज़न में कितने लगेंगे; और (ख) बोकानेर क्षेत्र में प्रत्येक नलकूप के लिये कितना धन राशि नियत की जायेगी ? खाद्य तथा कृषि मंत्रालय म उपमंत्री ( श्री प्र० म० थामस ) : (क) राजस्थान में केन्द्रीय सरकार की ओर से लगाने की नलकूप कोई योजना नहीं है। फिर भी तासरां योजना की शेष अवधि में ५४ विभिन्न स्थानों पर गवेषणात्मक कुएं खोदे जायेंगे और जिन से काफी पानी निकलता है उनको उत्पादन-कश्रो में परिवर्तित कर दिया जायेगा। इस कार्यक्रम के अन्तर्गत बीकानेर जिले में दस गवेषणात्मक कुएं खोदना भी सम्मिलित हैं । (ख) बीकानेर जिले के दस स्थानों में गवेषणात्मक कुएं खोदने पर ३.५ लाख रुपये खर्च होने का अनुमान है । प्रत्येक नलकूप पर किया गया खर्च कार्य पूरा होने के बाद ही मालूम हो सकता है Overtime Allowance for R.M.S. Workers 1544. Shri S. M. Banerjee: Will the Minister of Transport and Communications be pleased to state: (a) whether it is a fact that w time payment for October, 1962 and onwards has not been paid to staff of R.M.S. 'A' Division, Allahabad uptiil now; and (b) if so, the reasons for the abnormal delay? The Deputy Minister in the Ministry of Transport and Communications (Shri Bhagavati): (a) No, Sir. Out of the total number of Overtime Allowance Bills received from October 1962 to February 1963, 71 per cent have already been disbursed. (b) There has been some delay owing to late receipt of the Overtime Allowance Bills from sub-record offices. Remedial action is, however, being taken. Transport and Communications in Border Districts of Bihar 1545. Shri Yamuna Prasad Mandal: Will the Minister of Transport and Communications be pleased to state: transPlan for providing means of port and communications in the border districts of Bihar; (a) the amount earmarked by the Centre under the Third Five Year (b) whether any change was effected in the said allocation as a result of the emergency; and (c) if so, the brief details of the new set-up planned by Government? The Minister of Shipping in the Ministry of Transport and Communications (Shri Raj Bahadur): (a) to (c). Works of a total cost of about Rs. 40 lakhs were already included in the Third Five Year Plan for National Highwa development in the border areas of Bihar. Further works worth about Rs. 40 lakhs have now been added to these works. New works for roads other than National Highways in the border districts are under consideration and a decision on a new set up, if required, will be taken at the same time. Roads and Bridges in Andhra 1546. Shri Laxmi Dass: Will the Minister of Transport and Communications be pleased to state: (a) whether the Government of Andhra Pradesh have submitted any proposals for the improvement of roads, bridges and culverts on Hyderabad-Nagarjunasagar Road and Deverkonda-Dindi Project Road in the II phase of All India Road Development Plan; (b) if so, the details thereof; and (c) the action taken in the matter? The Minister of Shipping in the Ministry of Transport and Communications (Shri Raj Bahadur): (a) No proposal for the improvement of roads, bridges and culverts on the Hyderabad-Nagarjunasagar Road and the Deverkonda-Dindi Project Road has been received from the Government of Andhra Pradesh. These are State roads and their development is primarily the responsibility of the State Government. (b) and (c) Do not arise.
english
New Delhi, May 16: The central government on Wednesday announced a ceasefire in Jammu and Kashmir, asking security forces to halt their operations during Ramadan to help “peace loving Muslims” observe the holy month in a peaceful environment. The announcement, reminiscent of then Prime Minister Atal Bihari Vajpayee’s similar initiative in 2000, comes barely two days before Prime Minister Narendra Modi visits Jammu to inaugurate development projects and address the sixth convocation of a university in the winter capital. A Home Ministry statement said that security forces had been told not to launch operations in Jammu and Kashmir during the holy month that begins on Thursday or Friday subject to the appearance of new moon. The decision was taken “to help the peace loving Muslims observe Ramzan in a peaceful environment”, the statement said. Home Minister Rajnath Singh conveyed the decision over phone to Chief Minister Mehbooba Mufti, who had appealed for a ceasefire after an all-party meeting in Srinagar on May 9 - a call that was questioned by the state BJP, the coalition partner of the PDP in the state government. Mehbooba Mufti “wholeheartedly” welcomed the initiative and thanked Modi and Rajnath Singh “for their personal intervention”. “The month of Ramadan is a harbinger of peace and such a decision will go a long way in creating a peaceful and amicable environment for a sustained dialogue. ” But the Home Ministry statement said that security forces would reserve the right to retaliate if attacked or if it was essential to protect the lives of innocent people. Former Chief Minister and National Conference leader Omar Abdullah asked the militants to reciprocate to provide relief to the people during the month of fasting. “Now if the militants don’t respond in kind, they will stand exposed as the true enemies of the people,” he tweeted. Separatist leaders and militants groups, who are backed by Pakistan, were yet to react to the move. It comes ahead of Modi’s Jammu trip on Saturday during which he is scheduled to inaugurate a ropeway to Vaishno Devi hill shrine. (IANS)
english
<filename>schools/schleswig-holstein/SH-0705700.json {"name":"<NAME>","id":"SH-0705700","address":"Dänenkamp 5, 25348 Glückstadt","school_type":"Gymnasium","legal_status":1,"fax":"04124 - 916444","phone":"04124 - 91640","provider":"Kreis Steinburg","headmaster":"<NAME>","state":"SH","programs":{"programs":[]},"full_time_school":true,"lon":9.433253,"lat":53.792279}
json
{"etp.js":"sha256-ylCyjOq3r49ci4WhROfCUbgh6JMNZsduFn/5aVlPLak=","etp.min.js":"sha256-LOhhyrn0pRhAJrM7sxPwBcNRkxMYwSVWso2ccDMuyRU="}
json
A film that has many fans quite excited, ‘Thala’ Ajith’s Nerkonda Paarvai is coming out in theatres this week on August 8 amidst massive expectations. Produced by Boney Kapoor’s Bayview Projects LLP banner, director H. Vinoth has helmed this courtroom drama, which also is an official remake of the Amitabh Bachchan and Taapsee Pannu starrer, Pink. With Mr. G. Srinivasan of S. Pictures, Mr. K. Rajamannar of Kanthaswamy Arts Centre & Mr. Raahul recently acquiring the film’s distribution rights, Udhayanidhi Stalin’s Red Giant Movies too will now be releasing Nerkonda Paarvai across Chennai city, Trichy and Salem. That said, the official list of theatres the film will be released in Chennai has been revealed and will be hitting as many as 22 major screens across the city. - Manju Warrier joins Ajith Kumar on his adventure bike tour during AK 61 schedule break - Here's her exciting statement! - Ajith Kumar and team's great feat at the 47th Tamil Nadu State Shooting Championship - Pictures go viral! - Ajith Kumar arrives in Chennai after long trip | Video goes viral | Check out! ! Nerkonda Paarvai’s promotions are being carried at an active pace for quite sometime now with the makers releasing all songs and theme tracks from the film with the romantic melody ballad, ‘Agalaathey’ turning out to be a chartbuster. In comparison to the duration of Pink, which stands at 2 hours and 16 minutes, Nerkonda Paarvai’s runtime has been revealed to be 2 hours and 38 minutes with an action fight sequence and Ajith’s character in the film being given more depth. Check out the Chennai city theatre list for Nerkonda Paarvai below:
english
NRAI said it is also relevant to state that extra charges are being levied by many other industries, including some Government agencies. However, the guidelines are issued only for the restaurant industry. NRAI said service charge is a part of the owner’s discretion / decision regarding the total price payable by a customer with regards to sale or service of a product. It constitutes one of the components of the total price of the product. "Neither the Government nor any authority can interfere with the decision of the business owner in this regard. It is a universally accepted trade practice," the industry body said in a statement. NRAI further said that the customer is made aware of the pricing and its components before the customer places an order for the product. "Once the customer places the order after being made aware of the terms and conditions there comes into existence a binding contract. No authority can interfere with binding nature of a valid contract until and unless it is shown and proved to be unconscionable or against any unfair trade practice," NRAI stated. The industry body went on to add that the legality, reasonableness or justification of levying service charge has been considered by the Supreme Court of India, High Courts, National Consumer Disputes Redressal Commission, erstwhile Monopolies and Restrictive Trade Practices Commission and by the Income Tax Authorities (ITAT). The levy of service charge has been upheld in various judicial pronouncements, it added. The Central Consumer Protection Authority has barred hotels and restaurants from levying service charge automatically or by default in bills through new guidelines on Monday. NRAI said the levy of service charge also has a socio economic angle. "Generally tips are paid to and pocketed by staff who serve the customers (waiters/stewards) and nothing is shared with those back of the house employees who contribute to the overall product/service. The system of service charge envisages point wise distribution even to the back of the house staff whose contribution is thus recognized and acknowledged in the form of a part of the service charge collected from the customer. It is therefore the owner's discretion as to how to run its business and what policy should be put in place," NRAI stated. Download The Economic Times News App to get Daily Market Updates & Live Business News.
english
<filename>tests/parsing.rs extern crate sql; #[test] fn query_format() { let inputs = vec![ "select a, b from c", "select sum(a), sum(b) from c", "select sum(a), b from c group by b", "select a, b from c order by b", "select a, b from c group by a order by b", "select a, b from c where a", r#"select a, b from "fixtures/accounts.json""#, ]; for input in inputs { let query = sql::parse(input).unwrap(); assert_eq!(input, format!("{}", query)); } }
rust
const path = require('path'); const transformMarkdown = require('markdown-magic'); const badgePlugin = require('markdown-magic-branch-badge'); const config = { transforms: { badgePlugin, }, }; function callback() { console.log('ReadME generated.'); } const markdownPath = path.join(__dirname, '../README.md'); transformMarkdown(markdownPath, config, callback);
javascript
BetMGM Sportsbook offers some of the best prop betting options for NFL games. In this article, we will take a look at how you can benefit from the offer. How to get the $1000 offer from the BetMGM? The process is simple and takes just a few minutes to complete: Step 1: Click on the link below, and select your state for the registration process. Step 2: Enter your personal details to create a new account. Step 3: Accept the apps Terms & Conditions, and set your profile. Step 4: Make an initial deposit of $10 or more, and claim additional bet credits. Step 5: Place your first bet. The free bet amount ties to your first cash bet amount. If you bet over $1,000 on your first sports wager, only the first $1,000 will be eligible for the promotion. Step 6: Bets greater than $50 will receive five FreeBets in equal denominations of 20% of the total amount of the Qualifying Bet up to $1,000. The promotional offer only applies to the first eligible wager, and cashing out or editing the initial wager invalidates the bet for this promotion. Free bets, odds boost tokens or risk-free tokens are not eligible for this promotion. Example: An initial wager of $1,500 will still only be able to receive $1,000 in free bet returns. This offer cannot be used in conjunction with any other BetMGM promotion. The Cincinnati Bengals will host the Cleveland Browns in NFL action on Monday (October 31). The Bengals have done well after losing their first two games of the season, going 4-1 in their last five. The Browns, meanwhile, have struggled this season and are on a four-game losing streak. Tyler Boyd has done a great job for the Bengals, averaging over 12.7 receiving yards per attempt, while his counterpart Amari Cooper is averaging 12.4. Both are likely to play a key role in this game, making it a great game to place a bet on. Don't lose the opportunity to go. Claim the benefits by clicking on the link below.
english
{"Header":{"Time":"2019-10-30T13:51:35-07:00","ReportName":"ProfitAndLoss","DateMacro":"this calendar year-to-date","ReportBasis":"Accrual","StartPeriod":"2019-01-01","EndPeriod":"2019-10-30","SummarizeColumnsBy":"Total","Currency":"USD","Class":"5000000000000111940","Option":[{"Name":"AccountingStandard","Value":"GAAP"},{"Name":"NoReportData","Value":"true"}]},"Columns":{"Column":[{"ColTitle":"","ColType":"Account","MetaData":[{"Name":"ColKey","Value":"account"}]}]},"Rows":{"Row":[{"Header":{"ColData":[{"value":"Income"}]},"Summary":{"ColData":[{"value":"Total Income"}]},"type":"Section","group":"Income"},{"Summary":{"ColData":[{"value":"Gross Profit"}]},"type":"Section","group":"GrossProfit"},{"Header":{"ColData":[{"value":"Expenses"}]},"Summary":{"ColData":[{"value":"Total Expenses"}]},"type":"Section","group":"Expenses"},{"Summary":{"ColData":[{"value":"Net Operating Income"}]},"type":"Section","group":"NetOperatingIncome"},{"Summary":{"ColData":[{"value":"Net Income"}]},"type":"Section","group":"NetIncome"}]}}
json
<gh_stars>0 { "modules": [ "knotx:io.knotx.KnotxServer", "knotx:io.knotx.HttpRepositoryConnector", "knotx:io.knotx.FilesystemRepositoryConnector", "knotx:io.knotx.FragmentSplitter", "knotx:io.knotx.FragmentAssembler", "knotx:io.knotx.ServiceKnot", "knotx:io.knotx.ActionKnot", "knotx:io.knotx.HandlebarsKnot", "knotx:io.knotx.HttpServiceAdapter" ] }
json
body { margin:0px; background-color:rgba(0, 204, 204, 1); background-image:none; position:static; left:auto; width:1280px; margin-left:0; margin-right:0; text-align:left; } #base { position:absolute; z-index:0; } #u4087_img { border-width:0px; position:absolute; left:0px; top:0px; width:1280px; height:720px; } #u4087 { border-width:0px; position:absolute; left:0px; top:0px; width:1280px; height:720px; } #u4087_text { border-width:0px; position:absolute; left:0px; top:0px; width:0px; visibility:hidden; word-wrap:break-word; } #u4088_div { border-width:0px; position:absolute; left:0px; top:0px; width:22px; height:26px; background:inherit; background-color:rgba(255, 255, 255, 0); border:none; border-radius:0px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u4088 { border-width:0px; position:absolute; left:269px; top:686px; width:22px; height:26px; } #u4088_text { border-width:0px; position:absolute; left:0px; top:0px; width:0px; visibility:hidden; word-wrap:break-word; } #u4089_div { border-width:0px; position:absolute; left:0px; top:0px; width:24px; height:26px; background:inherit; background-color:rgba(255, 255, 255, 0); border:none; border-radius:0px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u4089 { border-width:0px; position:absolute; left:296px; top:686px; width:24px; height:26px; } #u4089_text { border-width:0px; position:absolute; left:0px; top:0px; width:0px; visibility:hidden; word-wrap:break-word; } #u4090 { border-width:0px; position:absolute; left:278px; top:295px; width:645px; height:346px; } #u4090_input { border-width:2px; position:absolute; left:0px; top:0px; width:645px; height:346px; overflow:hidden; } #u4091_div { border-width:0px; position:absolute; left:0px; top:0px; width:121px; height:26px; background:inherit; background-color:rgba(255, 255, 255, 0); border:none; border-radius:0px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u4091 { border-width:0px; position:absolute; left:304px; top:655px; width:121px; height:26px; } #u4091_text { border-width:0px; position:absolute; left:0px; top:0px; width:0px; visibility:hidden; word-wrap:break-word; }
css
# -*- coding:utf-8 -*- """ 桌面截图 """ from PIL import Image import win32gui, win32ui, win32con, win32api class CaptureDesktop(object): """ 桌面截图 """ SM_XVIRTUALSCREEN = 76 SM_YVIRTUALSCREEN = 77 SM_CXVIRTUALSCREEN = 78 SM_CYVIRTUALSCREEN = 79 def __init__(self): super(CaptureDesktop, self).__init__() self.mHwnd = None self.mHwndDC = None self.mMfcDC = None self.mSaveDC = None self.init_env() def init_env(self): self.mHwnd = win32gui.GetDesktopWindow() self.mHwndDC = win32gui.GetWindowDC(self.mHwnd) self.mMfcDC = win32ui.CreateDCFromHandle(self.mHwndDC) self.mSaveDC = self.mMfcDC.CreateCompatibleDC() def Capture(self): w = win32api.GetSystemMetrics(self.SM_CXVIRTUALSCREEN) h = win32api.GetSystemMetrics(self.SM_CYVIRTUALSCREEN) l = win32api.GetSystemMetrics(self.SM_XVIRTUALSCREEN) t = win32api.GetSystemMetrics(self.SM_YVIRTUALSCREEN) r = l + w b = t + h # 左、上、右、下 print(l, t, r, b, ' -> ', w, h) saveBitMap = win32ui.CreateBitmap() saveBitMap.CreateCompatibleBitmap(self.mMfcDC , w, h) self.mSaveDC.SelectObject(saveBitMap) self.mSaveDC.BitBlt((0, 0), (w, h), self.mMfcDC , (l, t), win32con.SRCCOPY) # 保存为文件 # saveBitMap.SaveBitmapFile(self.mSaveDC, 'screencapture.bmp') bmpinfo = saveBitMap.GetInfo() bmpstr = saveBitMap.GetBitmapBits(True) # BMP原始数据, 图片的宽高 return bmpstr, bmpinfo['bmWidth'], bmpinfo['bmHeight'] # 使用PIL将BMP进行转码 # im = Image.frombuffer('RGB', (bmpinfo['bmWidth'], bmpinfo['bmHeight']), bmpstr, 'raw', 'BGRX', 0, 1) # pdata = im.convert("P") # return pdata.tobytes(), bmpinfo['bmWidth'], bmpinfo['bmHeight'] # 使用PIL将BMP存储为png或者jpg # import Image # im = Image.frombuffer('RGB', (bmpinfo['bmWidth'], bmpinfo['bmHeight']), bmpstr, 'raw', 'BGRX', 0, 1) # im.save('screencapture.jpg', format='jpeg', quality=85) # im.save('screencapture.png', format='png') if __name__ == "__main__": CaptureDesktop().Capture()
python
Frost acknowledges the UK would benefit from strong dispute settlement measures on state aid. 'I can quite see us being ready to use them just as much as the EU in future. Other EU countries subsidise quite often more than we do and that could definitely have impact on us.' Frost says the 'remaining negotiation' on LPF/common standards 'is about whether that baseline could move in future'. Says the EU is being 'a bit overambitious' about how the deal may work and 'we're a bit skeptical about that because it’s not in the Political Declaration'. Gove adds some people see the EU as 'Plato’s guardians - disinterested upholders of virtue and whatever they decree is right and other countries are potential rogues that need to be brought back online.' He says UK has a 'very favourable' record compared to EU on climate change. Frost says there has been 'good progress in the last 2-3 weeks' on security cooperation and 'we’re moving forward reasonably well'. He says the EU had previously adopted the 'mentality of competition from the economic bits' in this area 'where it makes no sense'. On security cooperation, Frost also sounds more upbeat on the stand-off over UK application of the ECHR. He says: 'We’re beginning to untangle the various threads that discussion tangled up earlier and I think I can see a way forward on that that satisfies all sides’ needs.' Gove: 'The automotive sector, because of the tariffs that might apply, will in the event of failure to secure an FTA require additional focus on the part of Government to support. I don’t think we’re blind or blasé about that. We're absolutely focussed on securing an FTA.' Michael Gove insists the Internal Market Bill was only introduced as 'a safety net, not because we sought to influence the negotiations through it'. He says 'it’s important to draw that distinction'. Ireland's foreign minister Simon Coveney called it a negotiating ploy earlier. And with that a very interesting - dare I say even enjoyable - @LordsEUCom hearing is done. Nice range and depth of questions, and Frost and Gove were on good form. The main takeaway to me was that both of them are very much in deal mode re their respective negotiating strands.
english
{"Target":"js/academic.min.4e51017b38c7ebaadd7e25fc9503f88c.js","MediaType":"application/javascript","Data":{"Integrity":"md5-TlEBezjH66rdfiX8lQP4jA=="}}
json
<reponame>nbdy/dhtc {% macro buildTable(lst) %} <table class="table table-striped table-responsive table-bordered"> <thead> <tr> <th>#</th> <th>Title</th> <th>Info Hash</th> <th>Address</th> <th>Seen</th> <th>First seen</th> <th>Last seen</th> </tr> </thead> {% for item in lst %} <tr> <td>{{ loop.index }}</td> <td>{{ item.title }}</td> <td>{{ item.info_hash }}</td> <td>{{ item.addr[0] }}{{ item.addr[1] }}</td> <td>{{ item.seen }}</td> <td>{{ item.first_seen }}</td> <td>{{ item.last_seen }}</td> </tr> {% endfor %} </table> {% endmacro %}
html