text stringlengths 1 1.04M | language stringclasses 25 values |
|---|---|
[{"name": "Capital goods", "path": "Capital goods", "value": 5479718.386}, {"name": "Consumer goods", "path": "Consumer goods", "value": 536736.085}, {"name": "Intermediate goods", "path": "Intermediate goods", "value": 1236696.331}, {"name": "<NAME>", "path": "Mach and Elec", "value": 5359196.052}, {"name": "Metals", "path": "Metals", "value": 655435.705}, {"name": "Miscellaneous", "path": "Miscellaneous", "value": 347675.911}, {"name": "Plastic or Rubber", "path": "Plastic or Rubber", "value": 134872.859}] | json |
Amisha in an item number with Jazzy B!
Neha Dhupia started off her career with a Japanese film!
Copyright © 2024 Hungama Digital Media Entertainment Pvt. Ltd. All Rights Reserved.
Connect with:
| english |
Opening batsman Shai Hope struck an unbeaten century as West Indies outplayed Afghanistan by five wickets in the third one-day international on Monday to complete a 3-0 series rout.
Hope made 109 and built crucial partnerships including an unbeaten 71-run stand with Roston Chase, 42 not out, to anchor West Indies' chase of 250 with eight balls to spare in Lucknow.
The wicketkeeper-batsman completed his seventh ODI hundred as West Indies, under new limited-overs captain Kieron Pollard, recorded their first ODI whitewash since 2014.
"We came here with a mission and specific roles for players, and all the players deserve credit," said Pollard.
"Winning is a habit, and anything that we want to do as a team is a process, and it's something we had to improve in a period of time.
"This was an opportunity for us to show we have that kind of venom inside us. We knew we had to rally as a team, and we proved we can bat 50 overs, and once we do that, we can win games."
Paceman Keemo Paul played a key role in the win, returning figures of 3-44 in Afghanistan's 249 for seven.
Afghanistan's teenage spinner Mujeeb Ur Rahman took two wickets to reduce West Indies to four for two but Hope stood firm to keep the chase on track.
Hope, who starred in the opening win with an unbeaten 77, remained the top-scorer in the series with 229 runs.
Man of the match Hope got support from debutant Brandon King, who made 39, and Pollard, who hit 32.
Chase was named man of the series for his 145 runs including a highest of 94 in the three matches and six wickets with his off-spin.
Afghanistan, led by Rashid Khan, were outplayed in all three matches in their newly adopted home in Lucknow. India has been the home of the war-torn nation's cricket team since 2015.
A 127-run partnership between Asghar Afghan and Mohammad Nabi gave Afghanistan a fighting total from a precarious 118-5 after being invited to bat first.
Afghan made 86 off 85 balls and Nabi remained unbeaten on 50 to thwart a persistent West Indies bowling.
Opener Hazratullah Zazai hit an attacking 50 but the rest of the top-order fell flat.
Afghan, who hit three fours and six sixes, then took stock to re-build and Nabi joined forces with the batting pair taking the attack to the opposition.
Nabi, who hit three fours and a six in his 66-ball stay, raised his 15th ODI fifty on the penultimate ball of the innings as Afghanistan managed 54 runs from the last five overs.
"We were just trying to be better in each and every game. There were more positives from us in today's game," said Rashid.
"The kind of finishing we got from Asghar and Nabi gave us a chance to win the game. We should have defended this total, but Hope played without giving us any chances."
He added, "We have to focus on doing the right things, and making the right decisions at the right time. T20 is all about enjoyment, and we have to keep enjoying, whether in batting, bowling or fielding. The results will take care of themselves."
The two teams will now play three Twenty20 internationals om Lucknow starting November 14.
| english |
Mira Murati who has worked behind the scenes at ChatGPT-maker OpenAI, will now step into the limelight as its interim chief executive officer after the company has pushed out its co-founder and CEO Sam Altman.
She was elevated to the top position on Friday after a review found Sam Altman was “not consistently candid in his communications" with the board of directors.
“Murati had a unique skill set and would provide a seamless transition while it conducts a formal search for a permanent CEO," the company said as quoted by The New York Times.
Since last year, Mira Murati has been the chief technology officer (CTO). In addition, she also managed OpenAI's relationship with Microsoft, an investor, and partner who has deployed OpenAI’s technology, NYT reported.
This February, she had expressed her concerns over the misuse of artificial intelligence. “AI can be misused," Mira Murati had said in an interview with Time magazine.
“AI can be misused, or it can be used by bad actors. So, then there are questions about how you govern the use of this technology globally. How do you govern the use of AI in a way that's aligned with human values?" she told the magazine.
She also stressed that the company (OpenAI) will need help from different sources, even if it's governments, regulators, and everyone else.
“But we're a small group of people and we need a ton more input in this system and a lot more input that goes beyond the technologies--definitely regulators and governments and everyone else," Murati noted.
Born in San Francisco, in 1988, Mira Murati was raised and brought up in the United States, however, her parents are from Albania. She has worked as a Senior Product Manager at Tesla.
She has completed her Bachelor of Engineering from the Thayer School of Engineering at Dartmouth. Currently, she is working as the SVP of Research, Product & Partnerships at OpenAI.
What is ChatGPT?
ChatGPT is an artificial intelligence chatbot developed by San Francisco-based AI research company OpenAI. Released in November 2022, it can have conversations on topics from history to philosophy, generate lyrics in the style of Taylor Swift or Billy Joel, and suggest edits to computer programming code.
It is s trained on a vast compilation of articles, websites, and social-media posts scraped from the internet as well as real-time conversations—primarily in English—with human contractors hired by OpenAI. It learns to mimic the grammar and structure of the writing and reflects frequently-used phrases.
The chatbot isn’t always accurate: its sources aren’t fact-checked, and it relies on human feedback to improve its accuracy.
OpenAI developed ChatGPT as part of a strategy to build AI software that will help the company turn a profit. In January, Microsoft, its strategic partner, unveiled a fresh multibillion-dollar investment in OpenAI and said it plans to infuse ChatGPT into its Bing search app and other products.
How does ChatGPT work?
The technology that underlies ChatGPT is referenced in the second half of its name, GPT, which stands for Generative Pre-trained Transformer. Transformers are specialized algorithms for finding long-range patterns in sequences of data.
A transformer learns to predict not just the next word in a sentence but also the next sentence in a paragraph and the next paragraph in an essay. This is what allows it to stay on topic for long stretches of text.
Because a transformer requires a massive amount of data, it is trained in two stages: first, it is pre-trained on generic data, which is easier to gather in large volumes, and then it is fine-tuned on tailored data for the specific task it is meant to perform.
Unlock a world of Benefits! From insightful newsletters to real-time stock tracking, breaking news and a personalized newsfeed – it's all here, just a click away! Login Now!
| english |
<filename>demo/test/.comparable/ajax/baseline/06-requests/03-post-reqres-login.json
[
{
"url": "https://reqres.in/api/login",
"method": "POST",
"body": "email=eve.holt%40reqres.in&password=<PASSWORD>"
}
]
| json |
{"kind": "youtube#video", "etag": "NJh2jRDu6O2h0OPV5GiB7ElUthU", "id": "qHvXmGMHDKw", "snippet": {"publishedAt": "2019-12-04T15:00:19Z", "channelId": "UCuP2vJ6kRutQBfRmdcI92mA", "title": "i9 9900K Hackintosh for Developers - 3x Compile Speed", "description": "Hackintoshes are popular since you can configure them with very powerful components at a relatively low price point. In today's video, I'll go over all of the internal parts for my current build. I've been using this machine for the past year for all my professional work and its been an absolutely beast running Catalina.\n\ni9 9900K CPU: https://amzn.to/2PaXB5b\nASUS TUF z390 mATX Motherboard: https://amzn.to/2P99etr\n32GB Corsair Vengeance RGB RAM: https://amzn.to/387eR3R\n32GB GSkill RAM: https://amzn.to/2YeCm6v\nRadeon RX570 Graphics Card: https://amzn.to/33NcNe6\nIntel 660P m.2 SSD: https://amzn.to/34Jvwse\nCorsair Crystal Series 280x RGB: https://amzn.to/2P6qf7y\nCorsair H100i AIO Liquid Cooler: https://amzn.to/34PWsqu\nBroadcom Wifi & Bluetooh Adapter on Ebay\n\nMaps UIKit SwiftUI: \nhttps://www.letsbuildthatapp.com/course/Maps-UIKit-SwiftUI\n\nFullstack Social NodeJS iOS HTML:\nhttps://www.letsbuildthatapp.com/course/Fullstack-Social-iOS-NodeJS-REST\n\nAppStore JSON APIs\nhttps://www.letsbuildthatapp.com/course/AppStore-JSON-APIs\n\nTinder Firestore Swipe and Match\nhttps://www.letsbuildthatapp.com/course/Tinder-Firestore-Swipe-and-Match\n\nTwitter Slide Out Menu Course\nhttps://www.letsbuildthatapp.com/course/Twitter-Slide-Out-Menu\n\nPodcasts Course\nhttps://www.letsbuildthatapp.com/course/Podcasts\n\nIntermediate Training Core Data\nhttps://www.letsbuildthatapp.com/course/intermediate-training-core-data\n\nFacebook Group\nhttps://www.facebook.com/groups/1240636442694543/\n\nInstagram: https://www.instagram.com/buildthatapp/\nTwitter: https://twitter.com/buildthatapp", "thumbnails": {"default": {"url": "https://i.ytimg.com/vi/qHvXmGMHDKw/default.jpg", "width": 120, "height": 90}, "medium": {"url": "https://i.ytimg.com/vi/qHvXmGMHDKw/mqdefault.jpg", "width": 320, "height": 180}, "high": {"url": "https://i.ytimg.com/vi/qHvXmGMHDKw/hqdefault.jpg", "width": 480, "height": 360}, "standard": {"url": "https://i.ytimg.com/vi/qHvXmGMHDKw/sddefault.jpg", "width": 640, "height": 480}}, "channelTitle": "Lets Build That App", "tags": ["ios", "swift", "development", "tutorial", "learn", "xcode", "programming", "code"], "categoryId": "27", "liveBroadcastContent": "none", "defaultLanguage": "en", "localized": {"title": "i9 9900K Hackintosh for Developers - 3x Compile Speed", "description": "Hackintoshes are popular since you can configure them with very powerful components at a relatively low price point. In today's video, I'll go over all of the internal parts for my current build. I've been using this machine for the past year for all my professional work and its been an absolutely beast running Catalina.\n\ni9 9900K CPU: https://amzn.to/2PaXB5b\nASUS TUF z390 mATX Motherboard: https://amzn.to/2P99etr\n32GB Corsair Vengeance RGB RAM: https://amzn.to/387eR3R\n32GB GSkill RAM: https://amzn.to/2YeCm6v\nRadeon RX570 Graphics Card: https://amzn.to/33NcNe6\nIntel 660P m.2 SSD: https://amzn.to/34Jvwse\nCorsair Crystal Series 280x RGB: https://amzn.to/2P6qf7y\nCorsair H100i AIO Liquid Cooler: https://amzn.to/34PWsqu\nBroadcom Wifi & Bluetooh Adapter on Ebay\n\nMaps UIKit SwiftUI: \nhttps://www.letsbuildthatapp.com/course/Maps-UIKit-SwiftUI\n\nFullstack Social NodeJS iOS HTML:\nhttps://www.letsbuildthatapp.com/course/Fullstack-Social-iOS-NodeJS-REST\n\nAppStore JSON APIs\nhttps://www.letsbuildthatapp.com/course/AppStore-JSON-APIs\n\nTinder Firestore Swipe and Match\nhttps://www.letsbuildthatapp.com/course/Tinder-Firestore-Swipe-and-Match\n\nTwitter Slide Out Menu Course\nhttps://www.letsbuildthatapp.com/course/Twitter-Slide-Out-Menu\n\nPodcasts Course\nhttps://www.letsbuildthatapp.com/course/Podcasts\n\nIntermediate Training Core Data\nhttps://www.letsbuildthatapp.com/course/intermediate-training-core-data\n\nFacebook Group\nhttps://www.facebook.com/groups/1240636442694543/\n\nInstagram: https://www.instagram.com/buildthatapp/\nTwitter: https://twitter.com/buildthatapp"}, "defaultAudioLanguage": "en"}, "contentDetails": {"duration": "PT14M4S", "dimension": "2d", "definition": "hd", "caption": "false", "licensedContent": true, "contentRating": {}, "projection": "rectangular"}, "statistics": {"viewCount": "23652", "likeCount": "423", "dislikeCount": "30", "favoriteCount": "0", "commentCount": "126"}, "topicDetails": {"relevantTopicIds": ["/m/019_rr", "/m/07c1v", "/m/019_rr", "/m/07c1v"], "topicCategories": ["https://en.wikipedia.org/wiki/Lifestyle_(sociology)", "https://en.wikipedia.org/wiki/Technology"]}, "has_face": true, "detection_confidence": 0.9999674558639526} | json |
It's a small fish in a big (phone) pond.
It's a small fish in a big (phone) pond.
Are you considering a coding bootcamp? Explore our picks of the best coding bootcamps and find out how to apply, what you'll learn, and how to land a job.
The majority of European businesses have adopted cloud for IT infrastructure but its mostly being deployed on US cloud technologies.
The Samsung M8 makes it easy to work with PCs, Macs and other devices, and also doubles up as a Tizen-based smart TV.
Amazon wanted to stop shareholders from having a say on the sale of tech to the US government. SEC said no.
Three years into its transformation journey, which includes moving to a digital platform, M1 CEO Manjot Singh Mann believes the Singapore mobile operator now has the pieces in place to transition into a regional provider of enterprise services.
According to the Wall Street Journal, Amazon is in the very early stages of a potential banking foray.
Arm-based chips are already ubiquitous in mobile phones, but they're becoming more popular in the cloud.
E-commerce giants like Amazon and Flipkart may soon not be able to compete with Reliance's interlocking new-era businesses. However, for that to happen, Reliance will need to think and act like a firm that genuinely innovates.
USB-C connectivity, an expansion mic and improved software all enhance the Meeting Owl collaboration experience. We take the 360-degree conference camera for a spin.
| english |
Here you will find an extensive list of the FM frequencies in Libya, a new way of exploring the country’s radio broadcasters. Check which radio stations are transmitting using each FM frequency and discover new radio stations to listen to in Libya. Click on any radio station to start listening to their live transmissions.
- FM 88.1 MHz Radio Sawa (راديو سوا)
- FM 93.8 MHz Lebda FM ( راديو لبدة اف ام )
- FM 100.7 MHz Radio Zone (راديو زون)
| english |
Venkatesh and Rana Daggubati-starrer Rana Naidu started streaming on Netflix last week. Since day one, this web series gained negative talk for its heavy dosage of cuss words and obscene scenes. However, that negative talk is now making people watch the series and also placing the show on top of Netflix’s trending list.
According to the reports, Rana Naidu clocked more than a million streaming minutes in less than a week of its release. It is now in the first position of the top-10 trending shows on Netflix India.
Since the beginning, people opined how a family-oriented actor like Venkatesh agreed to do a show like this one. Audiences have never seen him uttering cuss words on the screen. They were shocked to see him in Rana Naidu.
Feedback from people who watched the show is making others become curious about the show. They are watching it to see how bold Venkatesh’s character is. Apart from that, many scenes from the show are trending on social media in the form of reels and shorts. These clips are especially persuading youngsters to watch the show despite poor reviews.
On the other side, Rana is also publicizing the show actively online and offline. The Rama Naidu billboard located at Rama Naidu Studios has now been changed to Rana Naidu, to promote the series. People who are passing by can see a huge billboard of Rana Naidu now. Rana is also promoting the show on Twitter regularly by sharing interviews. All these factors are helping Rana Naidu in getting more views and stay on top of the trending list of Netflix India. | english |
Sorry currently there are no articles available for this celebrity.
Get all the latest news and updates on Abhishekh Khan only on Bollywood Hungama. Check all 2022 news about Abhishekh Khan, news headlines, breaking news, and News today online on Abhishekh Khan at Bollywood Hungama. Stay tuned for more news for Abhishekh Khan and other Bollywood updates on Bollywood Hungama.
| english |
6825 Industrial
I do not want to repeat the points already taken up by Shri Morarka, Shri Somani, Shri Bharucha and many others. They have given support and strength to this Bill. But there are one or two points which were raised by a few Members about regional disparity and the responsibility of the Corporation in fulfilling the obligation of reducing the regional disparities. As Shri Bharucha pointed out, it does not depend upon the Corporation to go into the question of regional disparities, because, as he pointed out, it may be that the concept of regional disparity may differ from one industrial unit to another. So, the Corporation, which is an impersonal body, cannot really go into the question. But I do appreciate the anxiety of the House about reducing this regional disparity. That has also been our national policy. It has been the policy of the Government, and the whole House is in support of that policy. I can certainly assure the House that we shall really keep in view this anxiety expressed in the House and see, without affecting the basic structure of the Corporation and without interfering in the day to day activities of the Corporation, whether Government can really find out way so that when applications are received, this question can also be considered. Every application which is to be sanctioned by the Corporation has to be very sound financially. The whole purpose of such a financial institution is to go into the entire financial soundness of the whole proposal. They have to satisfy themselves about it in respect of every industrial undertaking, responsibility for which they take upon their shoulders. But a case may come in where there are two units equally sound and equally deserving loan from the Corporation. There certainly the Government can look into the question, because these major loans have to be advanced under the approval of the Government. While these big loans are advanced with the approval of Government, Government will certainly try to pursue the policy decision which they have already
Corporation 6826 (Amendment) Bill
taken in other governmental activities or even in regard to the licensing of the private industrial undertakings, namely that they will keep in view the question of reducing or oiding regional disparities. As the hon. Member has pointed out, this does not require any amendment of the Act. This can be really provided for by a suitable discussion between the Government and the representatives of the IFC. But I do not think it is proper on the part of anybody to blame the IFC on this score.
Shri Harish Chandra Mathur: Nobody has blamed the corporation. We have very clearly stated that the corporation within its limits has done exceedingly well. So, the corporation is not being blamed. We only wanted Government to give a directive which will be in line with the policy of Government; they could give certain incentives so that in certain areas which are backward, both industry and capital could be attracted. Instead of being only a banking institution, the corporation which is a Government institution must certainly pursue a policy which will tend to promote industries in the backward regions.
Shrimati Tarkeshwari Sinha: I have already taken cognizance of the anxiety expressed on the floor of the House, and certainly we shall try to do whatever we can in this respect.
There was another criticism advanced that these loans were provided only to the big industrial undertakings. Several arguments have been advanced, and figures also have been quoted by Shri Morarka that out of the industries for which loans had been approved, there were actually
major industries, namely,
sugar, paper, cotton textiles, chemicals, cement, rayon and mechanical engineering. These cover almost all the important industrial sectors in the
6827 Industrial Finance
[Shrimati Takeshwari Sinha] country. Out of the loans approved for them, Rs. 25.62 crores have gone to the sugar industry; and these have been given mostly to the co-operative societies. So, to say that this corporation is only providing funds to the big industrial undertakings and big capitalists is not quite correct.
Shri Morarka raised a point about the relaxation of the principle of 50 per cent margin. Certainly, Government will bear this in mind. As the hon. Member himself has pointed out, this does not require an amendment of the Act. This will certainly be discussed between the Government and the IFC and we shall decide that could be done. Already, we do relax in certain respects. The IFC itself relaxes these rules in certain respects. As to what more we can do for the medium industries, we shall certainly keep this in view.
Shri Somani has raised the question about the purpose of the Central Government guaranteeing the loans given by the IFC. There special features in regard to the guaranteeing of these loans. Under the existing Act, there is section 3(2) which makes a provision in this behalf. The provision of guarantees of the IFC loans by the Central Government, State Governments, the scheduled banks or State co-operative banks relates to the cases where adequate securities in the shape of mortgages, pledge etc. are not available, and only in such cases as those relating to the IFC loans to sugar co-operative societies, which are generally formulated by the Central Government or State Government, this provision operates. This is the main purpose of guaranteeing the loans given by the IFC, and we cannot completely do away with that principle, because we have to see the merits of each individual case and find out whether sufficient mortgages or sufficient property is at their disposal which can be set apart to provide adequate guarantees by various other bodies
like the State Government or the Central Government or co-operative banks or scheduled banks.
Corporation 6828 (Amendment) Bill
A point was also raised by certain Members that adequate publicity is not given to the activities of the corporation. Publicity regarding the corporation's activities has been given at least to the House. The hon. Members themselves have commended the report of the corporation and said that it is so exhaustive that it covers almost all the aspects of the corporation's functioning. Therefore, to level this kind of charge is not fair. Besides, anybody who wants to get a copy of this report can get it and thereby know which are the industries which have been sanctioned loans and how the functioning of the corporation has been organised.
There was a suggestion by Shri Ranga that these loans should be disbursed with a lot of care. I think Parliament has exercised enough care in the activities of the corporation, and it is as a result of the zealous care that Parliament has exercised that the functioning of the corporation has improved very much. I have been a Member of this House since 1952, and I can realise how the functioning of the corporation has improved. In fact, it has been realised by the House also, because the House has also started commending the functions of the corporation. The praise that has been given to the IFC today on the floor of the House was not there in 1952. So, the House rightly appreciates the improvement that the IFC has brought into its operations and its structure.
I have nothing more to add. Once again, I thank the House for giving such a favourable response to this Bill and I move the Bill for the consideration of the House.
Mr. Chairman: There is an amendment moved by Shri Prabhat Kar. Need I put it to vote?
Shri Warior: We are not pressing it. The amendment was, by leave, withdrawn.
Mr. Chairman: The question is:
"That the Bill further to amend the Industrial Finance Corporation
6829 Industrial Finance
Act, 1948 be taken into consideration."
Mr. Chairman: We shall now take up the clauses. There are no amendments to clauses 2 to 4. So, I shall put them together to vote.
The question is:
"That clauses 2 to 4 stand part of the Bill."
Clauses 2 to 4 were added to the Bill. Clause 5 (Amendment of section 23)
Shri Warior: I beg to move:
(i) Page 2, line 13, for 'agreed upon' substitute 'prescribed'. (1).
(ii) Page 2, lines 15 and 16, for twenty-five years' substitute 'ten years' (2).
(iii) Page 2, line 18, omit scheduled banks or'. (3).
(iv) Page 2, line 20, for 'may be agreed upon' substitute prescribed. (4).
(v) Page 2, omit lines 29 to 35. (5).
(vi) Page 3, line 18, for 'seven years' substitute 'one year'. (6).
(vii) Page 3, line 23, for 'twentyfive years' substitute ten years'. (7).
The purpose of my moving these amendments is this. With all the explanations that the hon. Minister has given, I do maintain that this is a clear departure from the structure and concept of the IFC which we had agreed to in the original Act and the amendments made therein later on. These amendments which are being moved now are intended to restrict us very much,-since we now in the stage of almost accepting this Bill without referring it to a Select Committee, and restrict the activities and the liability that may 1675 (Ai) L.S. --7.
Corporation (Amendment) Bill
come on the head of the corporation. The corporation is given very wide powers. I am quite sure that those who are going to benefit out of it will certainly press the corporation to such an extent that the corporation may well find it difficult to shoulder all these responsibilities.
I shall just give one instance to convince the House of this. We are providing now that the corporation should stand guarantee to the loans raised by any concern even from a private scheduled bank. Suppose the corporation does not know actually what the position of the scheduled bank itself is; suppose it is a bank like the Palai Bank, for instance, what will be the position of the corporation when guaranteeing such loans? These private banks may be scheduled banks, but they may be giving loans to the concerns under certain circumstances, under certain pressures. What will be the guarantee about the security of those loans? We have no such guarantee. Even now banking concerns, especially in our parts in the south are, I know, in a flux. Under such circumstances should we load the responsibility of all these guarantees on this Corporation? I do not think that it is necessary at least at present.
Then again, we are now guaranteeing debentures and other loans. At the same time, there is a clause here to enable conversion of the loans into shares. Suppose the share market goes down. What will be the position? Naturally these concerns will come to the Corporation and press it for conversion of the loans into shares. We had such occasions and we had mentioned it here. Hence, as far as possible, we should not put the Corporation in a ridiculous position when it actually has to face pressure from the other side. My only object is to save the Corporation from this situation. It is not that its powers should be resricted so far as giving of loans is concerned or so far as the expansion of its activities is concerned. But the other side must not be given
6831 Industrial
[Shri Warior] overwhelming power to coerce the Corporation into certain awkard positions in which there will also be financial loss. Hence ese amendments.
In my first amendment, I have said that instead of 'agreed upon', it should be prescribed'. There must be specific rules and directions given to i'mplement these provisions. With this end in view, I have moved these amendments.
There is another amendment saying that the number of years must be reduced. In the original Act, we have provided for 25 years. Now things are moving faster; it is not like the earlier years. There are many changes taking place in the entire financial and industrial sector. Hence it is necessary that there should be periodical check-up and inspection so that at any time the Corporation can withdraw its hands from the affairs of certain companies which may be mismanaged. For this, 25 years is too long a period. It must be reduced to 10 or 7, whichever is feasible. I do not press that it should be 10. It may be 7 or 12. It is not sacrosanct. But in the present state of our very speedy and quick development, 25 years is too long a period.
All these amendments are harmless. They are meant only to save the Corporation from much trouble and pressure and I hope the Minister will not have much objection to accepting them.
Shri Morarka: I could not understand the amendments moved by Shri Warior. One of his amendments seeks to delete the words 'scheduled banks'. In support thereof, he has instanced the case of a loan taken from, say, the Palai Bank and a guarantee given for such a loan. I cannot understand what is wrong with the guarantee. After all, the Corporation guarantees the repayment of this loan to the bank. The bank gives a loan to an industrial concern and if that concern cannot repay it, then the Corporation
Corporation 6832
(Amendment) Bill
would repay. The standing of the bank does not actually matter here. Unless the bank is in a position to make a loan, it will not do so. If the loan is not given, the question of guarantee would not arise. The Corporation only guarantees that the loan would be repaid if the concern, the principal borrower, cannot repay. So Shri Warior's amendment on this point is not quite clear to me.
Shri Warior: If you will permit me, I will make it clear.
Shrimati Tarkeshwari Sinha: We understand it.
Shri Warior: The Deputy Minister has understood it. Take a concrete instance. A security was given to the Palai Bank for Rs. 25 lakhs. Actually, its value was only Rs. 5 lakhs. In such a circumstance, Rs. 20 lakhs would have had to be given by the Corporation to the bank in terms of the guarantee, because the value of the assets offered as security was only Rs. 5 lakhs.
Shri Morarka: Here it is not a question of providing any security or assessing its value. Here a loan is given to the industry concerned by the bank which is guaranteed by the Corporation.
Mr. Chairman: The hon. Member is trying to explain that if the bank is not vigilant and does not look into the assets properly and gives more loan than is warranted by the assets, then the Corporation will be made responsible for the repayment of the loan.
Shri Morarka: That question would not arise, because the Corporation would look into all the details of securities etc, before standing guarantee. Merely because some bank has given a loan, the Corporation will not guarantee it. Before guarantee is given, the Corporation would satisfy itself that all the conditions are fulfilled. So the nature of the security and value thereof would be fully examined. Hence that contingency would not arise.
6833 Industrial
Shrimati Tarkeshwari Sinha: I agree with what Shri Morarka has said about this. Actually the question does not arise at this stage, because the Corporation will have the choice and discretion to guarantee a particular loan given by the bank or not. This is only an enabling provision for the Corporation to guarantee loans; but it will certainly exercise its discretion before giving guarantee.
This Bill does not compel the Corporation to give guarantee. It will be very vigilant, as it has been in the case of so many other loans sanctioned directly by itself, so that the apprehensions of the hon. Member are not well founded at this stage. There is a lot of presumption in what he said.
Then another point was made about conversion of loans into shares. The Corporation has to make some profit. After all, this House has allowed the LIC and ICICI to convert their loans into shares and to buy shares and go into the open market. We have also enabled the Corporation to do likewise. It is not an open sanction to the Corporation to venture into every kind of share. It is just an enabling provision that in case it thinks fit it may buy à particular company's shares which are available and which will be profitable to buy. The Bill certainly gives option to the Corporation to have this elastic approach. It allows it the option of converting part of its loans to shares or debentures. But certainly I do agree with Shri Somani and Shri Morarka that there is an element of risk in this. But in business there is always a little risk involved. I am sure, like shrewd financial body that the Corporation is, it will be very cautious about the whole approach to be made in the share market. It has an additional responsibility under clause 8 which amends section 42 of the Act. Under this amendment, we are providing that the rules framed by Government should be published in the official gazette and laid before Parliament within 30 days and will be subCorporation 6834 (Amendment) Bill
ject to modifications made by Parliament. So Parliament will have abundant opportunity of discusing that rule and throwing it out if it thinks so and if it is against public interest. So there should be absolutely no apprehension on this account. Because there is nothing in these amendments, I do not propose to accept any them.
Mr. Chairman: Does the hon. Member want to press his amendments?
Mr. Chairman: Shall I put all of them together?
Mr. Chairman: I shall now put amendments Nos. 1 to 7 to the vote of the House.
Amendments Nos. 1 to 7 were put and negatived.
Mr. Chairman: The question is: "That clause 5 stand part of the Bill".
Clause 5 was added to the Bill. Clause 6 (Amendment of section 24) Shri Warior: I beg to move:
Page 4,-omit lines 5 to 9 (8).
My hon, friend, Shri Prabhat Kar, I do not has explained this point. want to add anything more to it.
Mr. Chairman: This amendment is now before the House. Does the hon. Member press it?
Shri Warior: No.
The amendment was, by leave. withdrawn.
Mr. Chairman: There are no amendments to clauses 7 and 8. So, I will put all the three clauses, clauses 6, 7 and 8 together for the vote.
| english |
<gh_stars>0
*{padding:0;margin:0;}
.clearfix:after{content:"";display:block;height:0;clear:both;visibility: :hidden;}
.clearfix{zoom:1;}
.container{width:100%;height:100px;background:#f2f2f2;z-index:12;position:fixed;left:0;top:0;}
.header{width:1200px;margin:0 auto;line-height:100px;}
.container1{background:#f2f2f2;}
.intro{
width: 1200px;margin: 0 auto;
height: 150px;
font-size: 16px;
line-height: 24px;
margin-top: 100px;
}
.title1{margin-bottom:50px;font-size: 24px;}
.desc{font-size: 16px;line-height: 40px;}
.lab2{
background: #f2f2f2;width: 100%;height: 800px;
}
.lab2_intro{
width: 1200px;margin: 0 auto;
padding:2
00px 0 200px;
}
.lab2_left{
width: 33.33%;
float: left;
height: 100%;
}
.lab2_right{
width: 66.6%;
float: right;
height: 100%;
text-align: right;
overflow: hidden;
}
.lab3{background:#18191E;width:100%;height:800px;}
.lab3_intro{width:1200px;margin:0 auto;color:#fff;padding:200px 0 200px;}
.lab3_left,.lab3_right{float:left;}
.lab3_left{width:66.6%;height:100%;}
.lab3_right{width:33.3%;height:100%;}
| css |
<gh_stars>1-10
/*
* Copyright 2002-2012 the original author or authors.
*
* 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 org.springframework.test.web.servlet;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.web.servlet.FlashMap;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
/**
* Provides access to the result of an executed request.
*
* @author <NAME>
* @since 3.2
*/
public interface MvcResult {
/**
* Return the performed request.
* @return the request, never {@code null}
*/
MockHttpServletRequest getRequest();
/**
* Return the resulting response.
* @return the response, never {@code null}
*/
MockHttpServletResponse getResponse();
/**
* Return the executed handler.
* @return the handler, possibly {@code null} if none were executed
*/
Object getHandler();
/**
* Return interceptors around the handler.
* @return interceptors, or {@code null} if none were selected
*/
HandlerInterceptor[] getInterceptors();
/**
* Return the {@code ModelAndView} prepared by the handler.
* @return a {@code ModelAndView}, or {@code null}
*/
ModelAndView getModelAndView();
/**
* Return any exception raised by a handler and successfully resolved
* through a {@link HandlerExceptionResolver}.
*
* @return an exception, possibly {@code null}
*/
Exception getResolvedException();
/**
* Return the "output" flash attributes saved during request processing.
* @return the {@code FlashMap}, possibly empty
*/
FlashMap getFlashMap();
/**
* Get the result of asynchronous execution or {@code null} if concurrent
* handling did not start. This method will hold and await the completion
* of concurrent handling.
*
* @throws IllegalStateException if concurrent handling does not complete
* within the allocated async timeout value.
*/
Object getAsyncResult();
/**
* Get the result of asynchronous execution or {@code null} if concurrent
* handling did not start. This method will wait for up to the given timeout
* for the completion of concurrent handling.
*
* @param timeout how long to wait for the async result to be set in
* milliseconds; if -1, the wait will be as long as the async timeout set
* on the Servlet request
*/
Object getAsyncResult(long timeout);
}
| java |
You can view full text of the Director's Report for M P Telelinks Ltd.
The Directors are pleased to present the Fifteenth Annual Report,
(Rs. in lac)
Interest, Depreciation and Tax (123.78) (422.91)
Provision for Tax/FBT (0.70) (0.97)
(Special Provision) Act, 1985 at its next meeting.
been upgraded by the Indian Railways and hence, in the ensuing year,
the Company is optimistic that orders for large quantity could flow in,
topline growth to a level of Rs.30-35 Crore.
of continuous losses.
Corporate Governance are made part of the Annual Report.
report as under:
of the Annual Accounts for the year ended 31st March 2009;
ended 31st March 2009 and of the loss for the year ended 31st March,
for preventing and detecting fraud and other irregularities;
concern basis.
Meeting and is eligible for re-appointment.
referred to in the Auditors Report are self-explanatory and, therefore,
do not call for any further comments.
Information on Conservation of Energy, Technology Absorption, Foreign,
Directors Report.
operations of the Company during the year despite adverse conditions.
employees qualify for such disclosure.
acknowledge their contribution.
| english |
<gh_stars>1-10
package br.com.brazilcode.cb.purchase.exception;
import br.com.brazilcode.cb.purchase.service.PriceQuotationService;
/**
* Classe responsável por configurar uma exceção personalizada para a classe {@link PriceQuotationService}.
*
* @author Brazil Code - <NAME>
* @since 8 de mar de 2020 17:48:52
* @version 1.0
*/
public class PriceQuotationServiceException extends Exception {
private static final long serialVersionUID = -1535937550574563389L;
public PriceQuotationServiceException() {
super();
}
public PriceQuotationServiceException(String message) {
super(message);
}
public PriceQuotationServiceException(String message, Throwable cause) {
super(message, cause);
}
public PriceQuotationServiceException(Throwable cause) {
super(cause);
}
}
| java |
New Delhi: Today, Adidas Running has unveiled the Adidas Ultraboost 22. The latest addition to the iconic Ultraboost line-up provides runners with 4% more supreme energy return than the Ultraboost 21 for women. Designed with our oceans in mind, it includes a CONTINENTAL™ natural rubber outsole and an upper made with yarn containing 50% Parley Ocean Plastic.
The launch represents a key milestone in Adidas' long-term commitment to offering the best product to all women, through improvements and benefits that support the needs of its diverse community of women. The new Ultraboost 22 was informed by women-specific insights to provide runners with a shoe that is specifically comfortable tailored to their feet.
Our all-women team of designers and product developers worked closely with the Adidas running community and testers to create the new silhouette, which marks the biggest update to the Ultraboost line-up yet. A shoe that has been at the forefront of performance running since its first iteration in 2015, the Ultraboost 22 delivers supreme energy return technology, combined with a refined design for ultimate comfort.
Tapping into women-specific insights and using an online anatomy database of 1. 2 million foot scans, conducted and analysed by footwear and technology researchers Jura, Žabkar & Džerosk (2019), our design team identified key differences across instep height, heel anatomy and females’ gait cycle trends and re-engineered and refined the Ultraboost last to better reflect the female foot. The new last, born from the foundations of the signature S-curve UB21 last, was fine-tuned to create a narrower heel pocket, shallower forefoot profile and lower instep area, whilst the newly refined outsole is designed to help you say goodbye to overpronation.
The adidas Ultraboost 22 features:
- Energy Return – the new upper and LEP torsion system combine with the iconic BOOST midsole to deliver superior energy return, 4% more than the Ultraboost 21 for women.
- LEP – the adidas Linear Energy Push is an evolution of the torsion system which works in harmony with the boost midsole and the newly designed outsole for a responsive ride.
- PRIMEKNIT+ – the refined PRIMEKNIT+ forged zones are made with yarn containing 50% Parley Ocean Plastic, providing an adaptive fit.
- 360° fit improvement based on the female anatomy – the fit is based on a new last built on female anatomical insights. It reflects a narrower heel, a lower instep and keeps the unique S-curve heel. It is designed to work in harmony with the heel counter to let the Achilles tendon move more freely.
Shaunae Miller-Uibo, adidas athlete and two-time Olympic champion, said “The Ultraboost 22 represents an exciting step for adidas Running and shows the brand’s continued commitment to providing all runners with the best product in order to support them in achieving their personal goals. As an athlete, seeing brands innovate and push boundaries inspires me to do the same. It's great to know that I have the support I need every step of the way.
To celebrate the new silhouette and support the adidas Running community with reaching its goals, adidas Running will launch a variety of exciting updates.
- The HI ENERGY playlist, which is set to help boost runners’ energy, featuring high energy beats, will be available on December 11 Spotify .
- The adidas ‘Countdown to 22’ December challenge will support our female community around the world to change their lives through running and motivate them to kick off their New Year’s resolutions. Participants will be able to access the challenge through the adidas Running app and sign-up from December 2nd and onwards and with the tracking phase running from 10th-31st December. Creator Club members who join the challenge will be rewarded with 220 points. | english |
/*jsl:option explicit*/
function inc_dec_within_stmt() {
var i, s;
function statements() {
i++;
i--;
++i;
--i;
}
function for_loops() {
for (i = 0; i < 10; i++) {
s = i;
}
for (i = 10; i > 0; i--) {
s = i;
}
for(i = 0; i < 5; i++, i--) {
i++;
}
for(i = 0; i < 5; ) {
i++;
}
for (i = 0; i < 5; i = ++i) { /*warning:inc_dec_within_stmt*/
/*jsl:pass*/
}
}
function expressions() {
switch (i--) /*warning:inc_dec_within_stmt*/
{
default:
break;
}
s = new String(i++); /*warning:inc_dec_within_stmt*/
s = --i; /*warning:inc_dec_within_stmt*/
}
function jsl_ignore() {
var x;
do {
var y = x--; /*warning:inc_dec_within_stmt*/
} while (x > 0);
do y = x--; /*warning:inc_dec_within_stmt*/
while (x > 0);
do {
/*jsl:ignore*/
var y = x--;
/*jsl:end*/
} while (x > 0);
Label--: /*warning:bad_label*/
do {
x++;
} while (x < 0);
}
}
| javascript |
<filename>allure-results/91dba18a-a8dc-4697-8017-23bd18c63aa7-result.json
{"name": "test_create_contact_without_group_relation[None, firstname, lastnamehV, addresseAYOqygOB6X4X qJ2d NTiBpAEBoqkjgXFys3, None, None]", "status": "passed", "parameters": [{"name": "json_contacts", "value": "None, firstname, lastnamehV, addresseAYOqygOB6X4X qJ2d NTiBpAEBoqkjgXFys3, None, None"}], "start": 1642686288038, "stop": 1642686296502, "uuid": "87ed170f-6b44-4a94-8753-fdaca5dad5e2", "historyId": "8a7c791d7d20b6113ff4a9f7abd0cc10", "testCaseId": "81400b8295fc277aa0d3167512746d30", "fullName": "tests.test_create_contact_without_group_relation#test_create_contact_without_group_relation", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_create_contact_without_group_relation"}, {"name": "host", "value": "nba-144-22"}, {"name": "thread", "value": "23604-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_create_contact_without_group_relation"}]} | json |
Former Florida Attorney General Pam Bondi, who co-chairs the group “Women For Trump,” is part of the lineup of speakers for the second night of the 2020 Republican National Convention.
She served as Florida’s AG between 2011 and 2019, and was one of Trump’s early supporters the first time around.
At the 2016 GOP convention, she famously gave a speech in which she encouraged “Lock Her Up” chants directed at Democratic nominee Hillary Clinton.
“Lock her up, I love that,” Bondi said to an audience member holding a sign.
After serving as attorney general, Bondi headed the lobbying firm Ballard Partners’ regulatory compliance office. The firm, headed by Brian Ballard, has close ties to President Trump.
Earlier this year, Bondi served on the president’s legal team during the impeachment trial.
In an in-person roll Monday, Republicans officially renominated Trump to represent their party on the ballot, locking in the GOP ticket for an electoral battle against Democratic presidential nominee Joe Biden and his running mate, Sen. Kamala Harris of California.
The Associated Press contributed to this report. | english |
mod environment;
mod error;
mod expression;
mod fields;
mod hydrator;
mod pattern;
mod pipe;
mod prelude;
pub mod pretty;
#[cfg(test)]
mod tests;
pub use environment::*;
pub use error::{Error, UnifyErrorSituation, Warning};
pub use fields::FieldMap;
pub use prelude::*;
use crate::{
ast::{
self, ArgNames, BitStringSegment, BitStringSegmentOption, CallArg, Constant, Layer,
Pattern, RecordConstructor, RecordConstructorArg, SrcSpan, Statement, TypeAst,
TypedConstant, TypedExpr, TypedModule, TypedPattern, TypedPatternBitStringSegment,
TypedRecordUpdateArg, TypedStatement, UnqualifiedImport, UntypedModule,
UntypedMultiPattern, UntypedPattern, UntypedRecordUpdateArg, UntypedStatement,
},
bit_string,
build::{Origin, Target},
};
use expression::*;
use std::{
cell::RefCell,
collections::{HashMap, HashSet},
ops::Deref,
sync::Arc,
};
use error::*;
use hydrator::Hydrator;
use itertools::Itertools;
pub trait HasType {
fn type_(&self) -> Arc<Type>;
}
#[derive(Debug, Clone, PartialEq)]
pub enum Type {
App {
public: bool,
module: Vec<String>,
name: String,
args: Vec<Arc<Type>>,
},
Fn {
args: Vec<Arc<Type>>,
retrn: Arc<Type>,
},
Var {
type_: Arc<RefCell<TypeVar>>,
},
Tuple {
elems: Vec<Arc<Type>>,
},
}
impl Type {
pub fn is_result_constructor(&self) -> bool {
match self {
Type::Fn { retrn, .. } => retrn.is_result(),
_ => false,
}
}
pub fn is_result(&self) -> bool {
matches!(self, Self::App { name, module, .. } if "Result" == name && module.is_empty())
}
pub fn is_unbound(&self) -> bool {
matches!(self, Self::Var { type_: typ } if typ.borrow().is_unbound())
}
pub fn return_type(&self) -> Option<Arc<Self>> {
match self {
Self::Fn { retrn, .. } => Some(retrn.clone()),
_ => None,
}
}
pub fn fn_types(&self) -> Option<(Vec<Arc<Self>>, Arc<Self>)> {
match self {
Self::Fn { args, retrn, .. } => Some((args.clone(), retrn.clone())),
_ => None,
}
}
pub fn is_nil(&self) -> bool {
match self {
Self::App { module, name, .. } if "Nil" == name && module.is_empty() => true,
Self::Var { type_ } => type_.borrow().is_nil(),
_ => false,
}
}
pub fn is_bool(&self) -> bool {
match self {
Self::App { module, name, .. } if "Bool" == name && module.is_empty() => true,
Self::Var { type_ } => type_.borrow().is_bool(),
_ => false,
}
}
pub fn is_int(&self) -> bool {
match self {
Self::App { module, name, .. } if "Int" == name && module.is_empty() => true,
Self::Var { type_ } => type_.borrow().is_int(),
_ => false,
}
}
pub fn is_float(&self) -> bool {
match self {
Self::App { module, name, .. } if "Float" == name && module.is_empty() => true,
Self::Var { type_ } => type_.borrow().is_float(),
_ => false,
}
}
pub fn is_string(&self) -> bool {
match self {
Self::App { module, name, .. } if "String" == name && module.is_empty() => true,
Self::Var { type_ } => type_.borrow().is_string(),
_ => false,
}
}
/// Get the args for the type if the type is a specific `Type::App`.
/// Returns None if the type is not a `Type::App` or is an incorrect `Type:App`
///
pub fn get_app_args(
&self,
public: bool,
module: &[String],
name: &str,
arity: usize,
environment: &mut Environment<'_, '_>,
) -> Option<Vec<Arc<Self>>> {
match self {
Self::App {
module: m,
name: n,
args,
..
} => {
if module == m && name == n && args.len() == arity {
Some(args.clone())
} else {
None
}
}
Self::Var { type_: typ } => {
let args: Vec<_> = match typ.borrow().deref() {
TypeVar::Link { type_: typ } => {
return typ.get_app_args(public, module, name, arity, environment);
}
TypeVar::Unbound { .. } => {
(0..arity).map(|_| environment.new_unbound_var()).collect()
}
TypeVar::Generic { .. } => return None,
};
// TODO: use the real type here rather than making a copy
*typ.borrow_mut() = TypeVar::Link {
type_: Arc::new(Self::App {
name: name.to_string(),
module: module.to_owned(),
args: args.clone(),
public,
}),
};
Some(args)
}
_ => None,
}
}
pub fn find_private_type(&self) -> Option<Self> {
match self {
Self::App { public: false, .. } => Some(self.clone()),
Self::App { args, .. } => args.iter().find_map(|t| t.find_private_type()),
Self::Tuple { elems, .. } => elems.iter().find_map(|t| t.find_private_type()),
Self::Fn { retrn, args, .. } => retrn
.find_private_type()
.or_else(|| args.iter().find_map(|t| t.find_private_type())),
Self::Var { type_: typ, .. } => match typ.borrow().deref() {
TypeVar::Unbound { .. } => None,
TypeVar::Generic { .. } => None,
TypeVar::Link { type_: typ, .. } => typ.find_private_type(),
},
}
}
pub fn fn_arity(&self) -> Option<usize> {
match self {
Self::Fn { args, .. } => Some(args.len()),
_ => None,
}
}
}
pub fn collapse_links(t: Arc<Type>) -> Arc<Type> {
if let Type::Var { type_: typ } = t.deref() {
if let TypeVar::Link { type_: typ } = typ.borrow().deref() {
return typ.clone();
}
}
t
}
#[derive(Debug, PartialEq, Clone)]
pub struct AccessorsMap {
pub public: bool,
pub type_: Arc<Type>,
pub accessors: HashMap<String, RecordAccessor>,
}
#[derive(Debug, PartialEq, Clone)]
pub struct RecordAccessor {
// TODO: smaller int. Doesn't need to be this big
pub index: u64,
pub label: String,
pub type_: Arc<Type>,
}
#[derive(Debug, Clone, PartialEq)]
pub enum ValueConstructorVariant {
/// A locally defined variable or function parameter
LocalVariable,
/// A module constant
ModuleConstant {
literal: Constant<Arc<Type>, String>,
},
/// A function belonging to the module
ModuleFn {
name: String,
field_map: Option<FieldMap>,
module: Vec<String>,
arity: usize,
},
/// A constructor for a custom type
Record {
name: String,
arity: usize,
field_map: Option<FieldMap>,
},
}
impl ValueConstructorVariant {
fn to_module_value_constructor(&self, type_: Arc<Type>) -> ModuleValueConstructor {
match self {
Self::Record {
name,
arity,
field_map,
} => ModuleValueConstructor::Record {
name: name.clone(),
field_map: field_map.clone(),
arity: *arity,
type_,
},
Self::ModuleConstant { literal } => ModuleValueConstructor::Constant {
literal: literal.clone(),
},
Self::LocalVariable { .. } | Self::ModuleFn { .. } => ModuleValueConstructor::Fn,
}
}
/// Returns `true` if the variant is [`LocalVariable`].
pub fn is_local_variable(&self) -> bool {
matches!(self, Self::LocalVariable)
}
}
#[derive(Debug, Clone, PartialEq)]
pub enum ModuleValueConstructor {
Record {
name: String,
arity: usize,
type_: Arc<Type>,
field_map: Option<FieldMap>,
},
Fn,
Constant {
literal: TypedConstant,
},
}
#[derive(Debug, Clone, PartialEq)]
pub struct Module {
pub name: Vec<String>,
pub origin: Origin,
pub package: String,
pub types: HashMap<String, TypeConstructor>,
pub values: HashMap<String, ValueConstructor>,
pub accessors: HashMap<String, AccessorsMap>,
}
#[derive(Debug, Clone, PartialEq)]
pub enum PatternConstructor {
Record {
name: String,
field_map: Option<FieldMap>,
},
}
#[derive(Debug, Clone, PartialEq)]
pub enum TypeVar {
Unbound { id: usize },
Link { type_: Arc<Type> },
Generic { id: usize },
}
impl TypeVar {
pub fn is_unbound(&self) -> bool {
matches!(self, Self::Unbound { .. })
}
pub fn is_nil(&self) -> bool {
match self {
Self::Link { type_ } => type_.is_nil(),
_ => false,
}
}
pub fn is_bool(&self) -> bool {
match self {
Self::Link { type_ } => type_.is_bool(),
_ => false,
}
}
pub fn is_int(&self) -> bool {
match self {
Self::Link { type_ } => type_.is_int(),
_ => false,
}
}
pub fn is_float(&self) -> bool {
match self {
Self::Link { type_ } => type_.is_float(),
_ => false,
}
}
pub fn is_string(&self) -> bool {
match self {
Self::Link { type_ } => type_.is_string(),
_ => false,
}
}
}
#[derive(Debug, Clone, PartialEq)]
pub struct TypeConstructor {
pub public: bool,
pub origin: SrcSpan,
pub module: Vec<String>,
pub parameters: Vec<Arc<Type>>,
pub typ: Arc<Type>,
}
#[derive(Debug, Clone, PartialEq)]
pub struct ValueConstructor {
pub public: bool,
pub origin: SrcSpan,
pub variant: ValueConstructorVariant,
pub type_: Arc<Type>,
}
impl ValueConstructor {
pub fn is_local_variable(&self) -> bool {
self.variant.is_local_variable()
}
}
#[derive(Debug, Clone, PartialEq)]
pub struct TypeAliasConstructor {
pub public: bool,
pub module: Vec<String>,
pub type_: Type,
pub arity: usize,
}
impl ValueConstructor {
fn field_map(&self) -> Option<&FieldMap> {
match &self.variant {
ValueConstructorVariant::ModuleFn { field_map, .. }
| ValueConstructorVariant::Record { field_map, .. } => field_map.as_ref(),
_ => None,
}
}
}
// TODO: This takes too many arguments.
/// Crawl the AST, annotating each node with the inferred type or
/// returning an error.
///
pub fn infer_module(
target: Target,
uid: &mut usize,
mut module: UntypedModule,
origin: Origin,
package: &str,
modules: &HashMap<String, Module>,
warnings: &mut Vec<Warning>,
) -> Result<TypedModule, Error> {
let name = module.name.clone();
let documentation = std::mem::take(&mut module.documentation);
let mut environment = Environment::new(uid, &name, modules, warnings);
validate_module_name(&name)?;
let mut type_names = HashMap::with_capacity(module.statements.len());
let mut value_names = HashMap::with_capacity(module.statements.len());
let mut hydrators = HashMap::with_capacity(module.statements.len());
// Register any modules, types, and values being imported
// We process imports first so that anything imported can be referenced
// anywhere in the module.
for s in module.iter_statements(target) {
register_import(s, &mut environment)?;
}
// Register types so they can be used in constructors and functions
// earlier in the module.
for s in module.iter_statements(target) {
register_types(s, &name, &mut hydrators, &mut type_names, &mut environment)?;
}
// Register values so they can be used in functions earlier in the module.
for s in module.iter_statements(target) {
register_values(s, &name, &mut hydrators, &mut value_names, &mut environment)?;
}
// Infer the types of each statement in the module
// We first infer all the constants so they can be used in functions defined
// anywhere in the module.
let mut statements = Vec::with_capacity(module.statements.len());
let mut consts = vec![];
let mut not_consts = vec![];
for statement in module.into_iter_statements(target) {
match statement {
Statement::Fn { .. }
| Statement::TypeAlias { .. }
| Statement::CustomType { .. }
| Statement::ExternalFn { .. }
| Statement::ExternalType { .. }
| Statement::Import { .. } => not_consts.push(statement),
Statement::ModuleConstant { .. } => consts.push(statement),
}
}
for statement in consts.into_iter().chain(not_consts) {
let statement = infer_statement(statement, &name, &mut hydrators, &mut environment)?;
statements.push(statement);
}
// Generalise functions now that the entire module has been inferred
let statements = statements
.into_iter()
.map(|s| generalise_statement(s, &name, &mut environment))
.collect();
// Generate warnings for unused items
environment.convert_unused_to_warnings();
// Remove private and imported types and values to create the public interface
environment
.module_types
.retain(|_, info| info.public && info.module == name);
environment.module_values.retain(|_, info| info.public);
environment
.accessors
.retain(|_, accessors| accessors.public);
// Ensure no exported values have private types in their type signature
for value in environment.module_values.values() {
if let Some(leaked) = value.type_.find_private_type() {
return Err(Error::PrivateTypeLeak {
location: value.origin,
leaked,
});
}
}
let Environment {
module_types: types,
module_values: values,
accessors,
..
} = environment;
Ok(ast::Module {
documentation,
name: name.clone(),
statements,
type_info: Module {
name,
types,
values,
accessors,
origin,
package: package.to_string(),
},
})
}
fn validate_module_name(name: &[String]) -> Result<(), Error> {
if name == ["gleam"] {
return Err(Error::ReservedModuleName {
name: name.join("/"),
});
};
for segment in name {
if crate::parse::lexer::str_to_keyword(segment).is_some() {
return Err(Error::KeywordInModuleName {
name: name.join("/"),
keyword: segment.to_string(),
});
}
}
Ok(())
}
fn assert_unique_value_name<'a>(
names: &mut HashMap<&'a str, &'a SrcSpan>,
name: &'a str,
location: &'a SrcSpan,
) -> Result<(), Error> {
match names.insert(name, location) {
Some(previous_location) => Err(Error::DuplicateName {
name: name.to_string(),
previous_location: *previous_location,
location: *location,
}),
None => Ok(()),
}
}
fn assert_unique_type_name<'a>(
names: &mut HashMap<&'a str, &'a SrcSpan>,
name: &'a str,
location: &'a SrcSpan,
) -> Result<(), Error> {
match names.insert(name, location) {
Some(previous_location) => Err(Error::DuplicateTypeName {
name: name.to_string(),
previous_location: *previous_location,
location: *location,
}),
None => Ok(()),
}
}
fn assert_unique_const_name<'a>(
names: &mut HashMap<&'a str, &'a SrcSpan>,
name: &'a str,
location: &'a SrcSpan,
) -> Result<(), Error> {
match names.insert(name, location) {
Some(previous_location) => Err(Error::DuplicateConstName {
name: name.to_string(),
previous_location: *previous_location,
location: *location,
}),
None => Ok(()),
}
}
fn register_values<'a>(
s: &'a UntypedStatement,
module_name: &[String],
hydrators: &mut HashMap<String, Hydrator>,
names: &mut HashMap<&'a str, &'a SrcSpan>,
environment: &mut Environment<'_, '_>,
) -> Result<(), Error> {
match s {
Statement::Fn {
name,
arguments: args,
location,
return_annotation,
public,
..
} => {
assert_unique_value_name(names, name, location)?;
let _ = environment.ungeneralised_functions.insert(name.to_string());
// Create the field map so we can reorder labels for usage of this function
let mut field_map = FieldMap::new(args.len());
for (i, arg) in args.iter().enumerate() {
if let ArgNames::NamedLabelled { label, .. }
| ArgNames::LabelledDiscard { label, .. } = &arg.names
{
field_map
.insert(label.clone(), i)
.map_err(|_| Error::DuplicateField {
label: label.to_string(),
location: *location,
})?;
}
}
let field_map = field_map.into_option();
// Construct type from annotations
let mut hydrator = Hydrator::new();
let arg_types = args
.iter()
.map(|arg| hydrator.type_from_option_ast(&arg.annotation, environment))
.try_collect()?;
let return_type = hydrator.type_from_option_ast(return_annotation, environment)?;
let typ = fn_(arg_types, return_type);
// Keep track of which types we create from annotations so we can know
// which generic types not to instantiate later when performing
// inference of the function body.
let _ = hydrators.insert(name.clone(), hydrator);
// Insert the function into the environment
environment.insert_variable(
name.clone(),
ValueConstructorVariant::ModuleFn {
name: name.clone(),
field_map,
module: module_name.to_vec(),
arity: args.len(),
},
typ,
*location,
);
if !public {
environment.init_usage(name.clone(), EntityKind::PrivateFunction, *location);
}
}
Statement::ExternalFn {
location,
name,
public,
arguments: args,
return_: retrn,
module,
fun,
..
} => {
assert_unique_value_name(names, name, location)?;
// Construct type of function from AST
let mut hydrator = Hydrator::new();
let (typ, field_map) = environment.in_new_scope(|environment| {
let return_type = hydrator.type_from_ast(retrn, environment)?;
let mut args_types = Vec::with_capacity(args.len());
let mut field_map = FieldMap::new(args.len());
for (i, arg) in args.iter().enumerate() {
let t = hydrator.type_from_ast(&arg.annotation, environment)?;
args_types.push(t);
if let Some(label) = &arg.label {
field_map
.insert(label.clone(), i)
.map_err(|_| Error::DuplicateField {
label: label.to_string(),
location: *location,
})?;
}
}
let field_map = field_map.into_option();
let typ = fn_(args_types, return_type);
Ok((typ, field_map))
})?;
// Insert function into module
environment.insert_module_value(
name,
ValueConstructor {
public: *public,
type_: typ.clone(),
origin: *location,
variant: ValueConstructorVariant::ModuleFn {
name: fun.clone(),
field_map: field_map.clone(),
module: vec![module.clone()],
arity: args.len(),
},
},
);
// Insert function into module's internal scope
environment.insert_variable(
name.clone(),
ValueConstructorVariant::ModuleFn {
name: fun.clone(),
module: vec![module.clone()],
arity: args.len(),
field_map,
},
typ,
*location,
);
if !public {
environment.init_usage(name.clone(), EntityKind::PrivateFunction, *location);
}
}
Statement::CustomType {
location,
public,
opaque,
name,
constructors,
..
} => {
let mut hydrator = hydrators
.remove(name)
.expect("Could not find hydrator for register_values custom type");
hydrator.disallow_new_type_variables();
let typ = environment
.module_types
.get(name)
.expect("Type for custom type not found in register_values")
.typ
.clone();
// If the custom type only has a single constructor then we can access the
// fields using the record.field syntax, so store any fields accessors.
if let Some(accessors) =
custom_type_accessors(constructors, &mut hydrator, environment)?
{
let map = AccessorsMap {
public: (*public && !*opaque),
accessors,
// TODO: improve the ownership here so that we can use the
// `return_type_constructor` below rather than looking it up twice.
type_: typ.clone(),
};
environment.insert_accessors(name, map)
}
// Check and register constructors
for constructor in constructors {
assert_unique_value_name(names, &constructor.name, &constructor.location)?;
let mut field_map = FieldMap::new(constructor.arguments.len());
let mut args_types = Vec::with_capacity(constructor.arguments.len());
for (i, RecordConstructorArg { label, ast, .. }) in
constructor.arguments.iter().enumerate()
{
let t = hydrator.type_from_ast(ast, environment)?;
args_types.push(t);
if let Some(label) = label {
field_map
.insert(label.clone(), i)
.map_err(|_| Error::DuplicateField {
label: label.to_string(),
location: *location,
})?;
}
}
let field_map = field_map.into_option();
// Insert constructor function into module scope
let typ = match constructor.arguments.len() {
0 => typ.clone(),
_ => fn_(args_types, typ.clone()),
};
if !opaque {
environment.insert_module_value(
&constructor.name,
ValueConstructor {
public: *public,
type_: typ.clone(),
origin: constructor.location,
variant: ValueConstructorVariant::Record {
name: constructor.name.clone(),
arity: constructor.arguments.len(),
field_map: field_map.clone(),
},
},
);
}
if !public {
environment.init_usage(
constructor.name.clone(),
EntityKind::PrivateTypeConstructor(name.clone()),
constructor.location,
);
}
environment.insert_variable(
constructor.name.clone(),
ValueConstructorVariant::Record {
name: constructor.name.clone(),
arity: constructor.arguments.len(),
field_map,
},
typ,
constructor.location,
);
}
}
Statement::ModuleConstant { name, location, .. } => {
assert_unique_const_name(names, name, location)?;
}
Statement::Import { .. } | Statement::TypeAlias { .. } | Statement::ExternalType { .. } => {
}
}
Ok(())
}
fn generalise_statement(
s: TypedStatement,
module_name: &[String],
environment: &mut Environment<'_, '_>,
) -> TypedStatement {
match s {
Statement::Fn {
doc,
location,
name,
public,
arguments: args,
body,
return_annotation,
end_location,
return_type,
} => {
// Lookup the inferred function information
let function = environment
.get_variable(&name)
.expect("Could not find preregistered type for function");
let field_map = function.field_map().cloned();
let typ = function.type_.clone();
// Generalise the function if not already done so
let typ = if environment.ungeneralised_functions.remove(&name) {
generalise(typ, 0)
} else {
typ
};
// Insert the function into the module's interface
environment.insert_module_value(
&name,
ValueConstructor {
public,
origin: location,
type_: typ,
variant: ValueConstructorVariant::ModuleFn {
name: name.clone(),
field_map,
module: module_name.to_vec(),
arity: args.len(),
},
},
);
Statement::Fn {
doc,
location,
name,
public,
arguments: args,
end_location,
return_annotation,
return_type,
body,
}
}
statement
@
(Statement::TypeAlias { .. }
| Statement::CustomType { .. }
| Statement::ExternalFn { .. }
| Statement::ExternalType { .. }
| Statement::Import { .. }
| Statement::ModuleConstant { .. }) => statement,
}
}
fn infer_statement(
s: UntypedStatement,
module_name: &[String],
hydrators: &mut HashMap<String, Hydrator>,
environment: &mut Environment<'_, '_>,
) -> Result<TypedStatement, Error> {
match s {
Statement::Fn {
doc,
location,
name,
public,
arguments: args,
body,
return_annotation,
end_location,
..
} => {
let preregistered_fn = environment
.get_variable(&name)
.expect("Could not find preregistered type for function");
let field_map = preregistered_fn.field_map().cloned();
let preregistered_type = preregistered_fn.type_.clone();
let (args_types, return_type) = preregistered_type
.fn_types()
.expect("Preregistered type for fn was not a fn");
// Infer the type using the preregistered args + return types as a starting point
let (typ, args, body, safe_to_generalise) =
environment.in_new_scope(|environment| {
let args = args
.into_iter()
.zip(&args_types)
.map(|(a, t)| a.set_type(t.clone()))
.collect();
let mut expr_typer = ExprTyper::new(environment);
expr_typer.hydrator = hydrators
.remove(&name)
.expect("Could not find hydrator for fn");
let (args, body) =
expr_typer.infer_fn_with_known_types(args, body, Some(return_type))?;
let args_types = args.iter().map(|a| a.type_.clone()).collect();
let typ = fn_(args_types, body.type_());
let safe_to_generalise = !expr_typer.ungeneralised_function_used;
Ok((typ, args, body, safe_to_generalise))
})?;
// Assert that the inferred type matches the type of any recursive call
environment
.unify(preregistered_type, typ.clone())
.map_err(|e| convert_unify_error(e, location))?;
// Generalise the function if safe to do so
let typ = if safe_to_generalise {
let _ = environment.ungeneralised_functions.remove(&name);
let typ = generalise(typ, 0);
environment.insert_variable(
name.clone(),
ValueConstructorVariant::ModuleFn {
name: name.clone(),
field_map,
module: module_name.to_vec(),
arity: args.len(),
},
typ.clone(),
location,
);
typ
} else {
typ
};
Ok(Statement::Fn {
doc,
location,
name,
public,
arguments: args,
end_location,
return_annotation,
return_type: typ
.return_type()
.expect("Could not find return type for fn"),
body,
})
}
Statement::ExternalFn {
doc,
location,
name,
public,
arguments: args,
return_: retrn,
module,
fun,
..
} => {
let preregistered_fn = environment
.get_variable(&name)
.expect("Could not find preregistered type value function");
let preregistered_type = preregistered_fn.type_.clone();
let (args_types, return_type) = preregistered_type
.fn_types()
.expect("Preregistered type for fn was not a fn");
let args = args
.into_iter()
.zip(&args_types)
.map(|(a, t)| a.set_type(t.clone()))
.collect();
Ok(Statement::ExternalFn {
return_type,
doc,
location,
name,
public,
arguments: args,
return_: retrn,
module,
fun,
})
}
Statement::TypeAlias {
doc,
location,
public,
alias,
parameters: args,
type_ast: resolved_type,
..
} => {
let typ = environment
.get_type_constructor(&None, &alias)
.expect("Could not find existing type for type alias")
.typ
.clone();
Ok(Statement::TypeAlias {
doc,
location,
public,
alias,
parameters: args,
type_ast: resolved_type,
type_: typ,
})
}
Statement::CustomType {
doc,
location,
public,
opaque,
name,
parameters,
constructors,
..
} => {
let constructors = constructors
.into_iter()
.map(
|RecordConstructor {
location,
name,
arguments: args,
documentation,
}| {
let preregistered_fn = environment
.get_variable(&name)
.expect("Could not find preregistered type for function");
let preregistered_type = preregistered_fn.type_.clone();
let args = if let Some((args_types, _return_type)) =
preregistered_type.fn_types()
{
args.into_iter()
.zip(&args_types)
.map(
|(
RecordConstructorArg {
label,
ast,
location,
..
},
t,
)| {
RecordConstructorArg {
label,
ast,
location,
type_: t.clone(),
doc: None,
}
},
)
.collect()
} else {
vec![]
};
RecordConstructor {
location,
name,
arguments: args,
documentation,
}
},
)
.collect();
let typed_parameters = environment
.get_type_constructor(&None, &name)
.expect("Could not find preregistered type constructor ")
.parameters
.clone();
Ok(Statement::CustomType {
doc,
location,
public,
opaque,
name,
parameters,
constructors,
typed_parameters,
})
}
Statement::ExternalType {
doc,
location,
public,
name,
arguments: args,
} => {
// Check contained types are valid
let mut hydrator = Hydrator::new();
for arg in &args {
let var = TypeAst::Var {
location,
name: arg.to_string(),
};
let _ = hydrator.type_from_ast(&var, environment)?;
}
Ok(Statement::ExternalType {
doc,
location,
public,
name,
arguments: args,
})
}
Statement::Import {
location,
module,
as_name,
mut unqualified,
..
} => {
let name = module.join("/");
// Find imported module
let module_info =
environment
.importable_modules
.get(&name)
.ok_or_else(|| Error::UnknownModule {
location,
name,
imported_modules: environment.imported_modules.keys().cloned().collect(),
})?;
// Record any imports that are types only as this information is
// needed to prevent types being imported in generated JavaScript
for import in unqualified.iter_mut() {
if environment.imported_types.contains(import.variable_name()) {
import.layer = Layer::Type;
}
}
Ok(Statement::Import {
location,
module,
as_name,
unqualified,
package: module_info.package.clone(),
})
}
Statement::ModuleConstant {
doc,
location,
name,
annotation,
public,
value,
..
} => {
let typed_expr = ExprTyper::new(environment).infer_const(&annotation, *value)?;
let type_ = typed_expr.type_();
environment.insert_module_value(
&name,
ValueConstructor {
public,
origin: location,
variant: ValueConstructorVariant::ModuleConstant {
literal: typed_expr.clone(),
},
type_: type_.clone(),
},
);
if !public {
environment.init_usage(name.clone(), EntityKind::PrivateConstant, location);
}
Ok(Statement::ModuleConstant {
doc,
location,
name,
annotation,
public,
value: Box::new(typed_expr),
type_,
})
}
}
}
fn infer_bit_string_segment_option<UntypedValue, TypedValue, Typer>(
segment_option: BitStringSegmentOption<UntypedValue>,
mut type_check: Typer,
) -> Result<BitStringSegmentOption<TypedValue>, Error>
where
Typer: FnMut(UntypedValue, Arc<Type>) -> Result<TypedValue, Error>,
{
match segment_option {
BitStringSegmentOption::Size {
value,
location,
short_form,
..
} => {
let value = type_check(*value, int())?;
Ok(BitStringSegmentOption::Size {
location,
short_form,
value: Box::new(value),
})
}
BitStringSegmentOption::Unit { location, value } => {
Ok(BitStringSegmentOption::Unit { location, value })
}
BitStringSegmentOption::Binary { location } => {
Ok(BitStringSegmentOption::Binary { location })
}
BitStringSegmentOption::Int { location } => Ok(BitStringSegmentOption::Int { location }),
BitStringSegmentOption::Float { location } => {
Ok(BitStringSegmentOption::Float { location })
}
BitStringSegmentOption::BitString { location } => {
Ok(BitStringSegmentOption::BitString { location })
}
BitStringSegmentOption::Utf8 { location } => Ok(BitStringSegmentOption::Utf8 { location }),
BitStringSegmentOption::Utf16 { location } => {
Ok(BitStringSegmentOption::Utf16 { location })
}
BitStringSegmentOption::Utf32 { location } => {
Ok(BitStringSegmentOption::Utf32 { location })
}
BitStringSegmentOption::Utf8Codepoint { location } => {
Ok(BitStringSegmentOption::Utf8Codepoint { location })
}
BitStringSegmentOption::Utf16Codepoint { location } => {
Ok(BitStringSegmentOption::Utf16Codepoint { location })
}
BitStringSegmentOption::Utf32Codepoint { location } => {
Ok(BitStringSegmentOption::Utf32Codepoint { location })
}
BitStringSegmentOption::Signed { location } => {
Ok(BitStringSegmentOption::Signed { location })
}
BitStringSegmentOption::Unsigned { location } => {
Ok(BitStringSegmentOption::Unsigned { location })
}
BitStringSegmentOption::Big { location } => Ok(BitStringSegmentOption::Big { location }),
BitStringSegmentOption::Little { location } => {
Ok(BitStringSegmentOption::Little { location })
}
BitStringSegmentOption::Native { location } => {
Ok(BitStringSegmentOption::Native { location })
}
}
}
pub type TypedCallArg = CallArg<TypedExpr>;
fn assert_no_labelled_arguments<A>(args: &[CallArg<A>]) -> Result<(), Error> {
for arg in args {
if let Some(label) = &arg.label {
return Err(Error::UnexpectedLabelledArg {
location: arg.location,
label: label.to_string(),
});
}
}
Ok(())
}
/// This function makes sure that the type variable being unified
/// doesn't occur within the type it is being unified with. This
/// prevents the algorithm from inferring recursive types, which
/// could cause naively-implemented type checking to diverge.
/// While traversing the type tree.
///
fn unify_unbound_type(typ: Arc<Type>, own_id: usize) -> Result<(), UnifyError> {
if let Type::Var { type_: typ } = typ.deref() {
let new_value = match typ.borrow().deref() {
TypeVar::Link { type_: typ, .. } => return unify_unbound_type(typ.clone(), own_id),
TypeVar::Unbound { id } => {
if id == &own_id {
return Err(UnifyError::RecursiveType);
} else {
Some(TypeVar::Unbound { id: *id })
}
}
TypeVar::Generic { .. } => return Ok(()),
};
if let Some(t) = new_value {
*typ.borrow_mut() = t;
}
return Ok(());
}
match typ.deref() {
Type::App { args, .. } => {
for arg in args {
unify_unbound_type(arg.clone(), own_id)?
}
Ok(())
}
Type::Fn { args, retrn } => {
for arg in args {
unify_unbound_type(arg.clone(), own_id)?;
}
unify_unbound_type(retrn.clone(), own_id)
}
Type::Tuple { elems, .. } => {
for elem in elems {
unify_unbound_type(elem.clone(), own_id)?
}
Ok(())
}
Type::Var { .. } => unreachable!(),
}
}
fn match_fun_type(
typ: Arc<Type>,
arity: usize,
environment: &mut Environment<'_, '_>,
) -> Result<(Vec<Arc<Type>>, Arc<Type>), MatchFunTypeError> {
if let Type::Var { type_: typ } = typ.deref() {
let new_value = match typ.borrow().deref() {
TypeVar::Link { type_: typ, .. } => {
return match_fun_type(typ.clone(), arity, environment)
}
TypeVar::Unbound { .. } => {
let args: Vec<_> = (0..arity).map(|_| environment.new_unbound_var()).collect();
let retrn = environment.new_unbound_var();
Some((args, retrn))
}
TypeVar::Generic { .. } => None,
};
if let Some((args, retrn)) = new_value {
*typ.borrow_mut() = TypeVar::Link {
type_: fn_(args.clone(), retrn.clone()),
};
return Ok((args, retrn));
}
}
if let Type::Fn { args, retrn } = typ.deref() {
return if args.len() != arity {
Err(MatchFunTypeError::IncorrectArity {
expected: args.len(),
given: arity,
})
} else {
Ok((args.clone(), retrn.clone()))
};
}
Err(MatchFunTypeError::NotFn { typ })
}
/// Takes a level and a type and turns all type variables within the type that have
/// level higher than the input level into generalized (polymorphic) type variables.
///
fn generalise(t: Arc<Type>, ctx_level: usize) -> Arc<Type> {
match t.deref() {
Type::Var { type_: typ } => match typ.borrow().deref() {
TypeVar::Unbound { id } => generic_var(*id),
TypeVar::Link { type_: typ } => generalise(typ.clone(), ctx_level),
TypeVar::Generic { .. } => Arc::new(Type::Var { type_: typ.clone() }),
},
Type::App {
public,
module,
name,
args,
} => {
let args = args
.iter()
.map(|t| generalise(t.clone(), ctx_level))
.collect();
Arc::new(Type::App {
public: *public,
module: module.clone(),
name: name.clone(),
args,
})
}
Type::Fn { args, retrn } => fn_(
args.iter()
.map(|t| generalise(t.clone(), ctx_level))
.collect(),
generalise(retrn.clone(), ctx_level),
),
Type::Tuple { elems } => tuple(
elems
.iter()
.map(|t| generalise(t.clone(), ctx_level))
.collect(),
),
}
}
fn make_type_vars(
args: &[String],
location: &SrcSpan,
hydrator: &mut Hydrator,
environment: &mut Environment<'_, '_>,
) -> Result<Vec<Arc<Type>>, Error> {
args.iter()
.map(|arg| TypeAst::Var {
location: *location,
name: arg.to_string(),
})
.map(|ast| hydrator.type_from_ast(&ast, environment))
.try_collect()
}
fn custom_type_accessors<A>(
constructors: &[RecordConstructor<A>],
hydrator: &mut Hydrator,
environment: &mut Environment<'_, '_>,
) -> Result<Option<HashMap<String, RecordAccessor>>, Error> {
// Get the constructor for this custom type.
let args = match constructors {
[constructor] if !constructor.arguments.is_empty() => &constructor.arguments,
// If there is not exactly 1 constructor we return as we cannot
// build any constructors.
_ => return Ok(None),
};
let mut fields = HashMap::with_capacity(args.len());
hydrator.disallow_new_type_variables();
for (index, RecordConstructorArg { label, ast, .. }) in args.iter().enumerate() {
if let Some(label) = label {
let typ = hydrator.type_from_ast(ast, environment)?;
let _ = fields.insert(
label.to_string(),
RecordAccessor {
index: index as u64,
label: label.to_string(),
type_: typ,
},
);
}
}
Ok(Some(fields))
}
/// Iterate over a module, registering any new types created by the module into the typer
pub fn register_types<'a>(
statement: &'a UntypedStatement,
module: &[String],
hydrators: &mut HashMap<String, Hydrator>,
names: &mut HashMap<&'a str, &'a SrcSpan>,
environment: &mut Environment<'_, '_>,
) -> Result<(), Error> {
match statement {
Statement::ExternalType {
name,
public,
arguments: args,
location,
..
} => {
assert_unique_type_name(names, name, location)?;
// Build a type from the type AST
let mut hydrator = Hydrator::new();
let parameters = make_type_vars(args, location, &mut hydrator, environment)?;
let typ = Arc::new(Type::App {
public: *public,
module: module.to_owned(),
name: name.clone(),
args: parameters.clone(),
});
// Insert into the module scope
environment.insert_type_constructor(
name.clone(),
TypeConstructor {
origin: *location,
module: module.to_owned(),
public: *public,
parameters,
typ,
},
)?;
// Keep track of private types so we can tell if they are later unused
if !public {
let _ = environment.init_usage(name.clone(), EntityKind::PrivateType, *location);
}
}
Statement::CustomType {
name,
public,
parameters,
location,
..
} => {
assert_unique_type_name(names, name, location)?;
// Build a type from the type AST
let mut hydrator = Hydrator::new();
let parameters = make_type_vars(parameters, location, &mut hydrator, environment)?;
let typ = Arc::new(Type::App {
public: *public,
module: module.to_owned(),
name: name.clone(),
args: parameters.clone(),
});
let _ = hydrators.insert(name.to_string(), hydrator);
environment.insert_type_constructor(
name.clone(),
TypeConstructor {
origin: *location,
module: module.to_owned(),
public: *public,
parameters,
typ,
},
)?;
// Keep track of private types so we can tell if they are later unused
if !public {
let _ = environment.init_usage(name.clone(), EntityKind::PrivateType, *location);
}
}
Statement::TypeAlias {
location,
public,
parameters: args,
alias: name,
type_ast: resolved_type,
..
} => {
assert_unique_type_name(names, name, location)?;
// Register the paramerterised types
let mut hydrator = Hydrator::new();
let parameters = make_type_vars(args, location, &mut hydrator, environment)?;
// Disallow creation of new types outside the paramerterised types
hydrator.disallow_new_type_variables();
// Create the type that the alias resolves to
let typ = hydrator.type_from_ast(resolved_type, environment)?;
environment.insert_type_constructor(
name.clone(),
TypeConstructor {
origin: *location,
module: module.to_owned(),
public: *public,
parameters,
typ,
},
)?;
// Keep track of private types so we can tell if they are later unused
if !public {
let _ = environment.init_usage(name.clone(), EntityKind::PrivateType, *location);
}
}
Statement::Fn { .. }
| Statement::ExternalFn { .. }
| Statement::Import { .. }
| Statement::ModuleConstant { .. } => (),
}
Ok(())
}
pub fn register_import(
s: &UntypedStatement,
environment: &mut Environment<'_, '_>,
) -> Result<(), Error> {
match s {
Statement::Import {
module,
as_name,
unqualified,
location,
..
} => {
let name = module.join("/");
// Find imported module
let module_info =
environment
.importable_modules
.get(&name)
.ok_or_else(|| Error::UnknownModule {
location: *location,
name,
imported_modules: environment.imported_modules.keys().cloned().collect(),
})?;
// Determine local alias of imported module
let module_name = as_name
.as_ref()
.or_else(|| module.last())
.expect("Typer could not identify module name.")
.clone();
// Insert unqualified imports into scope
for UnqualifiedImport {
name,
location,
as_name,
..
} in unqualified
{
let mut type_imported = false;
let mut value_imported = false;
let mut variant = None;
let imported_name = as_name.as_ref().unwrap_or(name);
// Check if value already was imported
if let Some(value) = environment.local_values.get(imported_name) {
return Err(Error::DuplicateImport {
location: *location,
previous_location: value.origin,
name: name.to_string(),
});
}
// Register the unqualified import if it is a value
if let Some(value) = module_info.values.get(name) {
environment.insert_variable(
imported_name.clone(),
value.variant.clone(),
value.type_.clone(),
*location,
);
variant = Some(&value.variant);
value_imported = true;
}
// Register the unqualified import if it is a type constructor
if let Some(typ) = module_info.types.get(name) {
let typ_info = TypeConstructor {
origin: *location,
..typ.clone()
};
match environment.insert_type_constructor(imported_name.clone(), typ_info) {
Ok(_) => (),
Err(e) => return Err(e),
};
type_imported = true;
}
if value_imported && type_imported {
let _ = environment.init_usage(
imported_name.to_string(),
EntityKind::ImportedTypeAndConstructor,
*location,
);
} else if type_imported {
let _ = environment.imported_types.insert(imported_name.to_string());
let _ = environment.init_usage(
imported_name.to_string(),
EntityKind::ImportedType,
*location,
);
} else if value_imported {
let _ = match variant {
Some(&ValueConstructorVariant::Record { .. }) => environment.init_usage(
imported_name.to_string(),
EntityKind::ImportedConstructor,
*location,
),
_ => environment.init_usage(
imported_name.to_string(),
EntityKind::ImportedValue,
*location,
),
};
} else if !value_imported {
// Error if no type or value was found with that name
return Err(Error::UnknownModuleField {
location: *location,
name: name.clone(),
module_name: module.clone(),
value_constructors: module_info
.values
.keys()
.map(|t| t.to_string())
.collect(),
type_constructors: module_info
.types
.keys()
.map(|t| t.to_string())
.collect(),
});
}
}
// Insert imported module into scope
// TODO: use a refernce to the module to avoid copying
let _ = environment
.imported_modules
.insert(module_name, module_info.clone());
Ok(())
}
Statement::Fn { .. }
| Statement::TypeAlias { .. }
| Statement::CustomType { .. }
| Statement::ExternalFn { .. }
| Statement::ExternalType { .. }
| Statement::ModuleConstant { .. } => Ok(()),
}
}
| rust |
At an Asian Games table tennis event long ago, a Korean coach explained to me the importance of the third ball attack. He broke it down thus: You serve, await the return and then attack it. It is commonplace now. Back then that strategy was innovative and coaches joked about the fourth ball and fifth ball attacks.
I was reminded of that in England where Bazball is the new mantra (one occasionally hears ‘Benball’ too — perhaps skipper Stokes hasn’t been given enough credit) and fans love it. The more cynical believe that the character of English cricket — safety first, risk-averse, look-before-you-leap — is too deeply ingrained and has had just enough success for everything to be thrown overboard now. Something has to give, they say.
But it is new (for England), it is attractive, it might reduce the number of drawn games, and it is beginning to bring the crowds back. Soon, as other countries catch on, the strategy will move from the innovative to the conventional. And that’s when the strength of Bazball will be tested. How do you counter your own tactics thrown back at you by other teams?
Earlier, as the West Indies under Clive Lloyd and Viv Richards, and then Australia under Steve Waugh and Ricky Ponting ruled the world of cricket, such tactics were known as ‘positive’ cricket, or ‘playing to win’.
Sometimes it took just three days to pick up the 20 wickets to win after making a big total in between. Great teams have usually played the Bazball style of cricket – Bradman’s Australia, for instance. No one called it Bradzball or Lloyball or Waughball or anything.
Today’s audiences prefer tactics to carry a label, perhaps for quick reference, perhaps because they sound pithy. And perhaps because there is just enough ambiguity to squeeze well-established manoueuvres into a more recent approach. There’s no harm in that, and if Brendon McCallum is fated to be remembered for ‘Bazball’ rather than for his incredible hitting at the top of the batting order, that is the way things pan out sometimes.
An important element in Bazball, however, is the third innings of the match (and hence my recall of the third ball attack from another sport). Both New Zealand and India, who lost a total of four matches in England, messed up their second innings, the third of the match.
And with their own top batsmen in form, England consistently scored over 250 in the fourth to win. England’s ‘third innings attack’, has served them superbly. It will be interesting to see how England themselves play the third innings when they bat first, even assuming the third innings attack might sometimes be the bowlers’ job.
Cricket has seldom acknowledged the third innings as the deciding one in a Test. The first, naturally, since a good start is an important aspect of any game. The fourth, inevitably, since this is where teams hang on for a draw or play above themselves to win. The second innings (of four) is usually like a return of serve – it can be the start of a discussion or end one decisively. But that third innings somehow became the least important, not much talked about, the one used merely to mark time. It was the ugly sister in the fairytale that is cricket – but has now emerged as the princess, all golden slippers and shining crown.
Philosophers who compare cricket to life talk about the manner in which it gives a player a second chance. Failure may be followed by success. But, as England showed in the Edgbaston Test against India, the reverse could turn out to be equally true.
Success — India led by 132 in the first innings — might be followed by failure too. Sport being a zero sum game, one team’s success is usually the opposition’s failure, but to focus on ensuring that whatever happens in the first two innings of the match, it is the third that really matters is what Bazball has spelt out. And it’s intriguing.
It is too early to draw any conclusions, of course. But England’s resurgence has been fascinating. In the twelve years before now, England’s strike rate in the fourth innings was 47. This summer over four Tests it has been 75. They scored at 4. 6 runs per over compared to the 2. 95 previously. Jonny Bairstow’s strike rate over four Tests and four centuries has been 100, which is remarkable.
Can any team sustain this? Will England themselves be able to do so in India or Australia? It doesn’t matter. Perhaps Bazball’s greatest contribution might be a shift in focus. Its stated aim is not victory or defeat alone, but to bring more people into the game. And that is not such a bad thing. | english |
<gh_stars>1-10
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'unicorn',
],
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
project: './tsconfig.json',
ecmaFeatures: {
jsx: true
},
tsconfigRootDir: __dirname,
},
env: {
browser: true,
es6: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'airbnb',
'airbnb/hooks',
'airbnb-typescript',
'plugin:unicorn/recommended',
'prettier',
],
rules: {
quotes: ['error', 'single'],
semi: ['error', 'always'],
"comma-dangle": ['error', 'only-multiline'],
'import/prefer-default-export': 'off',
'import/no-default-export': 'error',
'unicorn/filename-case': 'off',
'unicorn/prevent-abbreviations': 'off',
'no-console': 'off',
'react/prop-types': 'off',
'react/jsx-props-no-spreading': 'off',
// Fixes problems with deck.gl imports:
'import/no-extraneous-dependencies': 'off',
'object-curly-spacing': ['error', 'never'],
}
};
| javascript |
<reponame>Akagi201/url-shortener
pub mod shortlink;
pub mod dto;
| rust |
From UPSC perspective, the following things are important :
What is Jal Jeevan Mission ?
The Union Minister of Jal Shakti launched a special mission mode campaign to provide potable piped water supply in all schools and anganwadi centres across the nation within 100 days.
- This mission was envisaged by the Prime Minister on 29th September, 2020 while releasing the ‘Margdarshika’ for Gram Panchayats and Paani Samitis for implementation of Jal Jeevan Mission (JJM).
- Provisions have been made under Jal Jeevan Mission for ensuring safe water through tap water connection in schools, anganwadi centres, health care centres, etc.
- National Jal Jeevan Mission has reached out to States/ UTs to ensure that during this campaign, Gram Sabhas are convened at the earliest to pass a resolution for providing safe water in all schools, anganwadi centres and other public institutions in the village in the next 100 days.
- These facilities will be operated and maintained by the Gram Panchayat and/ or its sub-committee i.e. Village Water & Sanitation Committee or Paani Samiti.
- Jal Jeevan Mission (JJM) aims at the universal coverage of provision of tap water connection to every rural home by 2024. Under the mission, special focus is on women and children.
From UPSC perspective, the following things are important :
What are Swachh Bharat Puruskar ?
- he Swachh Bharat (2020) Awards were conferred to the best performing States/UTs, districts, blocks, GPs and others in various categories marking six years of the Swachh Bharat Mission (SBM) launch.
- The awards were given by Department of Drinking Water and Sanitation (DDWS).
- Top Awards were conferred upon Gujarat, Uttar Pradesh, Haryana, Telangana, Tamil Nadu, Madhya Pradesh, Punjab& others.
- Gujarat was felicitated with the first prize in the state category; Tirunelveli, Tamil Nadu as best district; Khachrod, Ujjain, Madhya Pradesh as best block; and Chinnaur, (Salem) as the best Gram Panchayat for Swachh Sundar Samudayik Shauchalaya (SSSS) campaign organized from 1st Nov 2019 to 30th April 2020.
- For the week-long Gandagi Se Mukt campaign launched by Prime Minister, Shri Narendra Modi on 8th August 2020, Telangana received the top award for maximum Shramdaan participation.
From UPSC perspective, the following things are important :
- Wildlife Week is celebrated every year in India between October 1 and 8.
- The annual theme of the campaign is to promote the preservation of fauna – i.e. animal life.
- Wildlife Week was conceptualized in 1952 with the overall goal of raising awareness to serve the long-term goal of safeguarding the lives of wildlife through critical action.
- In addition, the Indian Government established an Indian Board of Wild Life which works to improve awareness towards the preservation of wildlife.
From UPSC perspective, the following things are important :
Context- Speaking at the UN General Assembly, Chinese President Xi Jinping made two promises that came as a welcome surprise to climate change watchers.
What has China announced ?
- First, Xi said, China would become carbon net-zero by the year 2060.
- Net-zero is a state in which a country’s emissions are compensated by absorptions and removal of greenhouse gases from the atmosphere.
- Absorption can be increased by creating more carbon sinks such as forests, while removal involves application of technologies such as carbon capture and storage.
- Second, the Chinese President announced a small but important change in China’s already committed target for letting its emissions “peak”, from “by 2030” to “before 2030”.
- That means China would not allow its greenhouse gas emissions to grow beyond that point.
- Xi did not specify how soon “before 2030” means, but even this much is being seen as a very positive move from the world’s largest emitter.
How significant is China’s commitment?
- China is the world’s largest emitter of greenhouse gases. It accounts for almost 30% of global emissions, more than the combined emissions in the United States, the European Union and India, the three next biggest emitters.
- Getting China to commit itself to a net-zero target is a big breakthrough, especially since countries have been reluctant to pledge themselves to such long term commitments.
- So far, the European Union was the only big emitter to have committed itself to a net-zero emission status by 2050.
From UPSC perspective, the following things are important :
Context- Earlier this week, late actor Irrfan Khan’s wife Sutapa Sikdar made an appeal to legalise CBD oil in India for its potential to treat cancer. Her appeal followed the criticism of actor Rhea Chakrabaorty after it was reported that she had administered CBD oil, used as a pain reliever for some, to Sushant Singh Rajput when he was alive.
About CBD oil ?
- CBD oil is an extract from the cannabis plant. The two main active substances in it are cannabidiol or CBD and delta-9 tetrahydrocannabinol, or THC.
- The high that is caused by the consumption of cannabis is due to THC. CBD, however, does not cause a “high” or any form of intoxication.
- CBD oil is made by extracting CBD from the cannabis plant, then diluting it with a carrier oil like coconut or hemp seed oil.
- Cannabidiol can reduce pain and anxiety. It also reduces psychotic symptoms associated with conditions such as schizophrenia as well as epilepsy.
- There is not enough robust scientific evidence to prove that CBD oil can safely and effectively treat cancer.
- CBD oil manufactured under a license issued by the Drugs and Cosmetics Act, 1940 can be legally used. However, the use of cannabis as a medicine is not much prevalent in India.
From UPSC perspective, the following things are important :
- Between 2004-05 and 2017-18, the share of salaried workers outside agriculture without any written contract increased from 60 per cent to 71 per cent.
- Even in private and public limited companies, this share increased from 59 per cent to 71 per cent.
- In the government and the public sector the share of such workers increasing from 27 per cent to 45 per cent over the period.
- Many of the wage jobs in the organised sector came through contractors.
- In organised manufacturing, the reported share of contract labour increased from 13 per cent in 1995-06 to 36 per cent in 2017-18.
- A policy to deal with the problem of employment security was much needed.
- The response came in the form the three revised labour Code Bills — on Industrial Relations, Occupational Safety, Health and Working Conditions, and Social Security.
- These were introduced in Parliament in the Monsoon Session, and approved on September 23.
- These three labour codes, along with the Code on Wages approved earlier, touch the lives of every Indian worker.
- In 2018, the government amended the Standing Orders on Employment Act and introduced the category of “fixed term” worker.
- That category creates a permanent cadre of temporary workers, with no prospects of career growth and job security.
- 1) Government had rationalised fixed-term employment by arguing that industries had resorted to the third-party engagement of contract labour to get around the rigidities in firing workers.
- But that has not stopped the Codes from further liberalising the provisions relating to employment of contract labour and making their regulation applicable only in establishments employing 50 or more workers, instead of 20 or more.
- 2) The key provisions which regulate the employment of inter-state migrant workers have been further diluted and made applicable only to establishments employing 10 or more such workers, compared to five earlier.
- 3) Along with the provisions of retrenchment, the applicability of the Standing Orders, which regulate the categorisation as well as the terms of employment of workers in establishments, has also been raised from 100 to 300 workers.
- 4) The threshold for factories has now been doubled — from 10 to 20 workers with power — thereby eliminating a large number of important regulatory provisions for the smaller factories.
- 5) Relevant governments have been given much more leeway in exempting establishments from the applicability of a whole range of provisions in the Code.
- 6) Inspection provisions have been diluted in all the Codes and will no longer even be complaints based.
- 7) The changes have also made legal industrial action a virtual impossibility, and the presence of unions less possible.
Informality contributes to inequality and to conditions which make sustainable growth impossible, and economic recovery more difficult. It also creates conditions in which employers under-invest in workers’ capacities and workers are not invested in a company’s future — leading to low productivity and lack of competitiveness.
From UPSC perspective, the following things are important :
The article discusses the issues faced by the various sectors of the economy and how the reform measures introduced by the government could help these sectors.
- The Indian farmer has bee treated as captive sources of producing cheap food grain while living at subsistence levels.
- There was no freedom to choose the point of sale for his produce, he could not decide the price of his product and had no say in selecting the buyer.
- The end consumer was equally short-changed with frequent cycles of persistent high inflation.
- The only beneficiaries of this perverse system were middlemen who thrived under political protection.
- The stifling nature of the Essential Commodities Act and the APMC Act have both been removed.
- Contract farming is now nationally enabled, allowing private investment to come in.
- Private investment will bring in technology, modern equipment, better seeds, know-how for in-between-season crops, improved yields, better logistics and freer access to national and international markets.
- The Indian farm sector will now finally begin to see the benefits of economies of scale.
- There were 44 different labour laws with more than 1,200 sections and clauses that demanded compliance if one even thought of becoming an entrepreneur.
- Different inspectors and departments administered these laws and this stunted many entrepreneurs.
- The Companies Act of 2013 completely paralysed risk-taking and quick decision-making among the private wealth creators.
- There were a large number of organisations that called themselves “banks” but were completely outside the ambit of RBI regulation.
- The politicians who controlled these banks were the primary obstacles in introducing any reforms in these sectors.
- Indian mainstream banks, contrary to international norms, had a peculiar practice of “grossing” their bilateral liabilities rather than “netting”.
- As per estimates, this locked anywhere between Rs 50,000 to Rs 70,000 crore funds.
- In place of the 44 central labour laws, the Parliament has now put in place four labour codes that are much simpler — the Code on Wages, the Industrial Relations Code, the Social Security Code and the Occupational Safety, Health and Working Conditions Code.
- The bilateral banking netting law has been passed and a large corpus of unproductive capital has been freed to be deployed in the market.
- Cooperative banks will now be regulated by the RBI and its customers will have the same protections as those of other regular banks.
- The problematic sections of the Companies Act 2013 have been done away with and the fear of criminal prosecution gone.
The reforms in various sectors of the economy are bound to help the faster recovery of the economy as well as help the farmers realising their full potential.
| english |
.wishlist .item {
margin-bottom: 50px;
}
| css |
The second episode of ‘The Finish Line’ will be aired on YouTube, Facebook and Instagram pages at 6 pm on Friday (September 4)
New Delhi: The rivalry between Viswanathan Anand and Vladimir Kramnik has been part of chess folklore for many years and it will be a chess lover’s delight when the Indian chess legend Anand speaks about his battles against the Russian in detail during the second episode of ‘The Finish Line’, hosted by Asian Games Gold medallist squash player Saurav Ghoshal.
The show was launched last week with India’s only individual Olympic gold medallist Abhinav Bindra as its first guest.
The second episode of ‘The Finish Line’ will be aired on YouTube, Facebook and Instagram pages at 6 pm on Friday (September 4).
During the second episode, Anand will delve into how he devised tactics to create some fantastic wins over Kramnik during his career, the most important being the World Chess Championship victory in 2008, when he successfully defended his title.
The first season of ‘The Finish Line’ will consist of eight parts wherein a sporting legend will be invited to recreate a defining moment in Indian sports in each of the episodes. The eight legends who have been confirmed are Abhinav Bindra, Viswanathan Anand, Dinesh Karthik, Pankaj Advani, Smriti Mandhana, Leander Paes, Parul Parmar and Varun Singh Bhati. | english |
As technology advances at a never-seen-before pace, restaurants are evolving and robots are starting to be used to perform a wide range of tasks that are easily automated.
The rapid advancements have meant artificial intelligence (AI) is becoming more accessible, so it is no wonder that robots for the food and beverage industry are becoming more commonplace. The impact of the COVID-19 pandemic has also forced the hand of food service industry to make use of automation.
A Chinese restaurant chain in England has been forced to make use of robots due to shortage of staff caused by COVID-19 pandemic.
The Chinese Buffet is suing BellaBot in four restaurants across England, to serve food to diners, Daily Mail reported.
When the buffet re-opened after the last lockdown, its owners decided to serve food to people at the table, ordered via an app, rather than allow them to serve themselves.
This led to an extra strain on already depleted staff, but BellaBots have taken over and already proven to be popular with diners, according to owners Paolo Hu and Peter Wu.
The guide price for the friendly-faced robots is roughly $20,000 (Rs 15 lakh), which is less than the cost of employing a waiter at minimum wage for 40 hours per week, as per Daily Mail.
In the video that is going viral, Bella, who features a wide-eyed feline face, is seen sweeping across the restaurant floor dishing out delicacies to delighted customers.
Bella has four shelves meaning she can serve four tables at once and even talk to diners in the process.
Customers place their order using The Chinese Buffet app, and the food arrives on Bella's shelves at the table.
The restaurant, like many others around the world, has battled with low staff numbers since reopening after the pandemic.
It meant that as more things opened up and got busier, the restaurant struggled to find enough servers to keep up with demand.
For more from trending, click here. | english |
Mohammad Wasim Jr looked great with the ball against Bangladesh.
Mohammad Wasim Jr dismissed Mehidy Hasan Miraz and Taskin Ahmed in the same over.
The 22-year-old Pakistan National Cricket Team pacer Mohammad Wasim Jr rattled the stumps of the Bangladesh National Cricket Team player Taskin Ahmed in the 31st match of the ICC Cricket World Cup 2023 at the Eden Gardens in Kolkata on Tuesday, October 31.
Taskin Ahmed was forced to walk in to bat with a lot of overs remaining after the top-order batters of the Bangladesh National Cricket Team failed miserably. He tried to chip in with crucial runs but was eventually bamboozled by Mohammad Wasim Jr. He was back in the pavilion after contributing 6 runs off 13 balls.
Wasim came to bowl the 44th over of the innings and cleaned up Mehidy Hasan Miraz on the first ball of the over itself with a brilliant delivery. He then bowled a 142.5kph delivery to dismiss Taskin on the third ball of the same over.
Wasim bowled a full-length delivery and the batter played for the line, but the ball swung away, beat the outside edge, and rattled the stumps to leave Bangladesh tottering at 201/9.
Earlier, Bangladesh won the toss and elected to have a go with the bat first. Once again they failed miserably against the new ball and lost the wickets of Tanzid Hasan, Najmul Hossain Shanto, and Mushfiqur Rahim inside 10 overs. They were reduced to 23/3 and it looked like a low total was on cards.
However, star players Litton Das and Mahmudullah provided some stability with their decent partnership. Das was unable to complete his fifty, but Mahmudullah reached the milestone, although he wasn’t able to convert it into a big score.
In the end, Shakib Al Hasan and Mehidy Hasan Miraz chipped in with crucial runs, but Bangladesh were eventually bundled out for 204 in 45.1 overs.
| english |
<filename>src/de/hallorebux/bawt/AbsoluteSize.java<gh_stars>0
package de.hallorebux.bawt;
/**
* Represents a <code>SizeReference</code> that is absolute
* based on the screen resolution
*
* @author <NAME>
*/
public final class AbsoluteSize implements SizeReference
{
private int value;
/**
* Creates a <code>AbsoluteSize</code> that always returns it absolute value
*
* @param value a non-decimal absolute location measured in pixels
*/
public AbsoluteSize(int value)
{
this.value = value;
}
@Override
public int get(int relativeTo)
{
return value;
}
}
| java |
4 Now then, brothers and sisters, because of the Lord Jesus we ask and encourage you to excel in living a God-pleasing life even more than you already do. Do this the way we taught you. 2 You know what orders we gave you through the Lord Jesus. 3 It is God’s will that you keep away from sexual sin as a mark of your devotion to him. 4 Each of you should know that finding a husband or wife for yourself is to be done in a holy and honorable way, 5 not in the passionate, lustful way of people who don’t know God. 6 No one should take advantage of or exploit other believers that way. The Lord is the one who punishes people for all these things. We’ve already told you and warned you about this. 7 God didn’t call us to be sexually immoral but to be holy. 8 Therefore, whoever rejects this ⌞order⌟ is not rejecting human authority but God, who gives you his Holy Spirit.
9 You don’t need anyone to write to you about the way Christians should love each other. God has taught you to love each other. 10 In fact, you are showing love to all the Christians throughout the province of Macedonia. We encourage you as believers to excel in love even more. 11 Also, make it your goal to live quietly, do your work, and earn your own living, as we ordered you. 12 Then your way of life will win respect from those outside ⌞the church⌟, and you won’t have to depend on anyone else for what you need.
13 Brothers and sisters, we don’t want you to be ignorant about those who have died. We don’t want you to grieve like other people who have no hope. 14 We believe that Jesus died and came back to life. We also believe that, through Jesus, God will bring back those who have died. They will come back with Jesus. 15 We are telling you what the Lord taught. We who are still alive when the Lord comes will not go ⌞into his kingdom⌟ ahead of those who have already died. 16 The Lord will come from heaven with a command, with the voice of the archangel, and with the trumpet ⌞call⌟ of God. First, the dead who believed in Christ will come back to life. 17 Then, together with them, we who are still alive will be taken in the clouds to meet the Lord in the air. In this way we will always be with the Lord. 18 So then, comfort each other with these words!
4 As for other matters, brothers and sisters,(A) we instructed you how to live(B) in order to please God,(C) as in fact you are living. Now we ask you and urge you in the Lord Jesus to do this more and more. 2 For you know what instructions we gave you by the authority of the Lord Jesus.
3 It is God’s will(D) that you should be sanctified: that you should avoid sexual immorality;(E) 4 that each of you should learn to control your own body[a](F) in a way that is holy and honorable, 5 not in passionate lust(G) like the pagans,(H) who do not know God;(I) 6 and that in this matter no one should wrong or take advantage of a brother or sister.[b](J) The Lord will punish(K) all those who commit such sins,(L) as we told you and warned you before. 7 For God did not call us to be impure, but to live a holy life.(M) 8 Therefore, anyone who rejects this instruction does not reject a human being but God, the very God who gives you his Holy Spirit.(N)
9 Now about your love for one another(O) we do not need to write to you,(P) for you yourselves have been taught by God(Q) to love each other.(R) 10 And in fact, you do love all of God’s family throughout Macedonia.(S) Yet we urge you, brothers and sisters, to do so more and more,(T) 11 and to make it your ambition to lead a quiet life: You should mind your own business and work with your hands,(U) just as we told you, 12 so that your daily life may win the respect of outsiders(V) and so that you will not be dependent on anybody.
13 Brothers and sisters, we do not want you to be uninformed(W) about those who sleep in death,(X) so that you do not grieve like the rest of mankind, who have no hope.(Y) 14 For we believe that Jesus died and rose again,(Z) and so we believe that God will bring with Jesus those who have fallen asleep in him.(AA) 15 According to the Lord’s word, we tell you that we who are still alive, who are left until the coming of the Lord,(AB) will certainly not precede those who have fallen asleep.(AC) 16 For the Lord himself will come down from heaven,(AD) with a loud command, with the voice of the archangel(AE) and with the trumpet call of God,(AF) and the dead in Christ will rise first.(AG) 17 After that, we who are still alive and are left(AH) will be caught up together with them in the clouds(AI) to meet the Lord in the air. And so we will be with the Lord(AJ) forever. 18 Therefore encourage one another(AK) with these words.
- 1 Thessalonians 4:6 The Greek word for brother or sister (adelphos) refers here to a believer, whether man or woman, as part of God’s family.
Copyright © 1995, 2003, 2013, 2014, 2019, 2020 by God’s Word to the Nations Mission Society. All rights reserved.
Holy Bible, New International Version®, NIV® Copyright ©1973, 1978, 1984, 2011 by Biblica, Inc.® Used by permission. All rights reserved worldwide.
NIV Reverse Interlinear Bible: English to Hebrew and English to Greek. Copyright © 2019 by Zondervan.
| english |
Budgam, Feb, 19: District Development Commissioner, Budgam Tariq Hussain Ganaie today held a public darbar at community hall Char-i-Sharief.
The DDC was accompanied by CPO, ACD, SDM Char-i-Sharief, CMO, CEO, DIO, DSWO, Auqaf Officer of JK Waqf Board, representative from local Auqaf committee and district heads of various line departments and officials of concerned departments. During the darbar, DDC took stock of transport facilities, staff strength of GDC Char-i-Sharief, availability of staff and healthcare facilities at Sub- District Hospital, progress achieved on various projects, schemes presently running in the town through various agencies.
Speaking on the occasion, DDC called upon the concerned to submit weekly progress report of walls constructed to avert landslides and other disaster related issues and instructed R&B department to identify works related to construction of walls to protect life of people. Waqf authorities were instructed to submit report within one week on account of expenditure made during last 5 years.
Stressing on the early completion of projects, the DDC said that Alamadar road and shopping complex projects shall be brought under languishing projects to ensure work completion on both projects at an earliest.
He exhorted upon the concerned to ensure inclusion of all farmers under KCC scheme at an earliest as every farmer has to register himself with PM –Kisan to avail facilities under KCC. Regarding compensation for snow damaged orchards, the DDC said the damage is already been declared as national calamity under which every farmer whose orchards got damaged will receive a compensation of Rs. 900 per kanal.
With regard to sanitation and cleanliness, the EO of Municipality Char-i-Sharief was directed to maintain proper sanitation and cleanliness and ensure regular lifting of garbage from the Shrine area and rest of the Town and ensure segregation and proper disposal.
The DDC earlier visited Shrine of Hazrat Sheikh Noor-ud-Din Noorani (RA) where he paid obeisance and interacted with various local caretakers and custodians.
Later on DDC paid obeisance at Pakherpora shrine. During his visit DDC resolved the land dispute of Pakherpora Hospital with the land owner and it was decided that new hospital building shall be operational from next month.
| english |
"""Search-related testing utilities."""
import tempfile
import time
from contextlib import contextmanager
import haystack
from django.conf import settings
from django.core.management import call_command
from djblets.siteconfig.models import SiteConfiguration
from reviewboard.admin.siteconfig import load_site_config
def reindex_search():
"""Rebuild the search index."""
call_command('rebuild_index', interactive=False)
# On Whoosh, the above is asynchronous, and we can end up trying to read
# before we end up writing, occasionally breaking tests. We need to
# introduce just a bit of a delay.
#
# Yeah, this is still sketchy, but we can't turn off the async behavior
# or receive notification that the write has completed.
time.sleep(0.1)
@contextmanager
def search_enabled(on_the_fly_indexing=False, backend_id='whoosh'):
"""Temporarily enable indexed search.
Args:
on_the_fly_indexing (bool, optional):
Whether or not to enable on-the-fly indexing.
backend_id (unicode, optional):
The search backend to enable. Valid options are "whoosh" (default)
and "elasticsearch".
"""
siteconfig = SiteConfiguration.objects.get_current()
old_backend_id = siteconfig.get('search_backend_id')
old_backend_settings = siteconfig.get('search_backend_settings')
if backend_id == 'whoosh':
backend_settings = {
'PATH': tempfile.mkdtemp(suffix='search-index',
dir=settings.SITE_DATA_DIR),
'STORAGE': 'file',
}
elif backend_id == 'elasticsearch':
backend_settings = {
'INDEX_NAME': 'reviewboard-tests',
'URL': 'http://es.example.com:9200/',
}
else:
raise NotImplementedError('Unexpected backend ID "%s"' % backend_id)
siteconfig.settings.update({
'search_enable': True,
'search_backend_id': backend_id,
'search_backend_settings': {
backend_id: backend_settings,
},
'search_on_the_fly_indexing': on_the_fly_indexing,
})
siteconfig.save(update_fields=('settings',))
load_site_config()
try:
yield
haystack.connections['default'].reset_sessions()
finally:
siteconfig.settings.update({
'search_enable': False,
'search_backend_id': old_backend_id,
'search_backend_settings': old_backend_settings,
'search_on_the_fly_indexing': False,
})
siteconfig.save(update_fields=('settings',))
load_site_config()
| python |
# Generated by Django 2.2.13 on 2021-05-17 23:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('games', '0029_auto_20210517_0421'),
]
operations = [
migrations.AlterField(
model_name='game',
name='invitation_mode',
field=models.CharField(choices=[('INVITE_ONLY', 'Invited Players Only'), ('WORLD_MEMBERS', 'World Members Only'), ('ANYONE', 'Any Player'), ('CLOSED', 'Closed for RSVPs')], default=('INVITE_ONLY', 'Invited Players Only'), max_length=25),
),
]
| python |
/*=========================================================================
*
* Copyright NumFOCUS
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0.txt
*
* 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.
*
*=========================================================================*/
#ifndef itkPermuteAxesImageFilter_hxx
#define itkPermuteAxesImageFilter_hxx
#include "itkImageRegionIteratorWithIndex.h"
#include "itkMacro.h"
#include "itkTotalProgressReporter.h"
namespace itk
{
/**
* Constructor
*/
template <typename TImage>
PermuteAxesImageFilter<TImage>::PermuteAxesImageFilter()
{
for (unsigned int j = 0; j < ImageDimension; ++j)
{
m_Order[j] = j;
m_InverseOrder[m_Order[j]] = j;
}
this->DynamicMultiThreadingOn();
this->ThreaderUpdateProgressOff();
}
/**
* PrintSelf
*/
template <typename TImage>
void
PermuteAxesImageFilter<TImage>::PrintSelf(std::ostream & os, Indent indent) const
{
Superclass::PrintSelf(os, indent);
unsigned int j;
os << indent << "Order: [";
for (j = 0; j < ImageDimension - 1; ++j)
{
os << m_Order[j] << ", ";
}
os << m_Order[j] << "]" << std::endl;
os << indent << "InverseOrder: [";
for (j = 0; j < ImageDimension - 1; ++j)
{
os << m_InverseOrder[j] << ", ";
}
os << m_InverseOrder[j] << "]" << std::endl;
}
/**
* Set the permutation order
*/
template <typename TImage>
void
PermuteAxesImageFilter<TImage>::SetOrder(const PermuteOrderArrayType & order)
{
unsigned int j;
// check if it the same as current
if (m_Order == order)
{
return;
}
// check that input is a rearrangement of the
// numbers from 0 to ImageDimension - 1
FixedArray<bool, ImageDimension> used;
used.Fill(false);
for (j = 0; j < ImageDimension; ++j)
{
if (order[j] > ImageDimension - 1)
{
ExceptionObject err(__FILE__, __LINE__);
err.SetLocation(ITK_LOCATION);
err.SetDescription("Order indices is out of range");
throw err;
}
else if (used[order[j]])
{
ExceptionObject err(__FILE__, __LINE__);
err.SetLocation(ITK_LOCATION);
err.SetDescription("Order indices must not repeat");
throw err;
}
used[order[j]] = true;
}
// copy to member variable
this->Modified();
m_Order = order;
for (j = 0; j < ImageDimension; ++j)
{
m_InverseOrder[m_Order[j]] = j;
}
}
/**
* The output image meta information is obtained by permuting
* the input image meta information.
*/
template <typename TImage>
void
PermuteAxesImageFilter<TImage>::GenerateOutputInformation()
{
// call the superclass's implementation of this method
Superclass::GenerateOutputInformation();
// get pointers to the input and output
typename Superclass::InputImageConstPointer inputPtr = this->GetInput();
typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
if (!inputPtr || !outputPtr)
{
return;
}
const typename TImage::SpacingType & inputSpacing = inputPtr->GetSpacing();
const typename TImage::PointType & inputOrigin = inputPtr->GetOrigin();
const typename TImage::DirectionType & inputDirection = inputPtr->GetDirection();
const typename TImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize();
const typename TImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex();
typename TImage::SpacingType outputSpacing;
typename TImage::PointType outputOrigin;
typename TImage::DirectionType outputDirection;
typename TImage::SizeType outputSize;
typename TImage::IndexType outputStartIndex;
unsigned int i, j;
for (j = 0; j < ImageDimension; ++j)
{
// origin does not change by a Permute. But spacing, directions,
// size and start index do.
outputOrigin[j] = inputOrigin[j];
outputSpacing[j] = inputSpacing[m_Order[j]];
outputSize[j] = inputSize[m_Order[j]];
outputStartIndex[j] = inputStartIndex[m_Order[j]];
for (i = 0; i < ImageDimension; ++i)
{
outputDirection[i][j] = inputDirection[i][m_Order[j]];
}
}
outputPtr->SetSpacing(outputSpacing);
outputPtr->SetOrigin(outputOrigin);
outputPtr->SetDirection(outputDirection);
const typename TImage::RegionType outputRegion(outputStartIndex, outputSize);
outputPtr->SetLargestPossibleRegion(outputRegion);
}
/**
* The required input requested region is obtained by permuting
* the index and size of the output requested region
*/
template <typename TImage>
void
PermuteAxesImageFilter<TImage>::GenerateInputRequestedRegion()
{
// call the superclass's implementation of this method
Superclass::GenerateInputRequestedRegion();
// get pointers to the input and output
InputImagePointer inputPtr = const_cast<TImage *>(this->GetInput());
OutputImagePointer outputPtr = this->GetOutput();
if (!inputPtr || !outputPtr)
{
return;
}
const typename TImage::SizeType & outputSize = outputPtr->GetRequestedRegion().GetSize();
const typename TImage::IndexType & outputIndex = outputPtr->GetRequestedRegion().GetIndex();
typename TImage::SizeType inputSize;
typename TImage::IndexType inputIndex;
unsigned int j;
for (j = 0; j < ImageDimension; ++j)
{
inputSize[j] = outputSize[m_InverseOrder[j]];
inputIndex[j] = outputIndex[m_InverseOrder[j]];
}
const typename TImage::RegionType inputRegion(inputIndex, inputSize);
inputPtr->SetRequestedRegion(inputRegion);
}
/**
*
*/
template <typename TImage>
void
PermuteAxesImageFilter<TImage>::DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread)
{
unsigned int j;
// Get the input and output pointers
typename Superclass::InputImageConstPointer inputPtr = this->GetInput();
typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels());
// Setup output region iterator
using OutputIterator = ImageRegionIteratorWithIndex<TImage>;
OutputIterator outIt(outputPtr, outputRegionForThread);
typename TImage::IndexType outputIndex;
typename TImage::IndexType inputIndex;
// walk the output region, and sample the input image
for (outIt.GoToBegin(); !outIt.IsAtEnd(); ++outIt)
{
// determine the index of the output pixel
outputIndex = outIt.GetIndex();
// determine the input pixel location associated with this output pixel
for (j = 0; j < ImageDimension; ++j)
{
inputIndex[j] = outputIndex[m_InverseOrder[j]];
}
// copy the input pixel to the output
outIt.Set(inputPtr->GetPixel(inputIndex));
progress.CompletedPixel();
}
}
} // namespace itk
#endif
| cpp |
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
#![allow(dead_code)]
#![allow(unused_imports)]
use flatbuffers::EndianScalar;
use std::{cmp::Ordering, mem};
// automatically generated by the FlatBuffers compiler, do not modify
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MIN_METADATA_VERSION: i16 = 0;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MAX_METADATA_VERSION: i16 = 4;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_METADATA_VERSION: [MetadataVersion; 5] = [
MetadataVersion::V1,
MetadataVersion::V2,
MetadataVersion::V3,
MetadataVersion::V4,
MetadataVersion::V5,
];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct MetadataVersion(pub i16);
#[allow(non_upper_case_globals)]
impl MetadataVersion {
/// 0.1.0 (October 2016).
pub const V1: Self = Self(0);
/// 0.2.0 (February 2017). Non-backwards compatible with V1.
pub const V2: Self = Self(1);
/// 0.3.0 -> 0.7.1 (May - December 2017). Non-backwards compatible with V2.
pub const V3: Self = Self(2);
/// >= 0.8.0 (December 2017). Non-backwards compatible with V3.
pub const V4: Self = Self(3);
/// >= 1.0.0 (July 2020. Backwards compatible with V4 (V5 readers can read V4
/// metadata and IPC messages). Implementations are recommended to provide a
/// V4 compatibility mode with V5 format changes disabled.
///
/// Incompatible changes between V4 and V5:
/// - Union buffer layout has changed. In V5, Unions don't have a validity
/// bitmap buffer.
pub const V5: Self = Self(4);
pub const ENUM_MIN: i16 = 0;
pub const ENUM_MAX: i16 = 4;
pub const ENUM_VALUES: &'static [Self] =
&[Self::V1, Self::V2, Self::V3, Self::V4, Self::V5];
/// Returns the variant's name or "" if unknown.
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::V1 => Some("V1"),
Self::V2 => Some("V2"),
Self::V3 => Some("V3"),
Self::V4 => Some("V4"),
Self::V5 => Some("V5"),
_ => None,
}
}
}
impl std::fmt::Debug for MetadataVersion {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for MetadataVersion {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
impl flatbuffers::Push for MetadataVersion {
type Output = MetadataVersion;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}
impl flatbuffers::EndianScalar for MetadataVersion {
#[inline]
fn to_little_endian(self) -> Self {
let b = i16::to_le(self.0);
Self(b)
}
#[inline]
fn from_little_endian(self) -> Self {
let b = i16::from_le(self.0);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for MetadataVersion {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
i16::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for MetadataVersion {}
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MIN_FEATURE: i64 = 0;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MAX_FEATURE: i64 = 2;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_FEATURE: [Feature; 3] = [
Feature::UNUSED,
Feature::DICTIONARY_REPLACEMENT,
Feature::COMPRESSED_BODY,
];
/// Represents Arrow Features that might not have full support
/// within implementations. This is intended to be used in
/// two scenarios:
/// 1. A mechanism for readers of Arrow Streams
/// and files to understand that the stream or file makes
/// use of a feature that isn't supported or unknown to
/// the implementation (and therefore can meet the Arrow
/// forward compatibility guarantees).
/// 2. A means of negotiating between a client and server
/// what features a stream is allowed to use. The enums
/// values here are intented to represent higher level
/// features, additional details maybe negotiated
/// with key-value pairs specific to the protocol.
///
/// Enums added to this list should be assigned power-of-two values
/// to facilitate exchanging and comparing bitmaps for supported
/// features.
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct Feature(pub i64);
#[allow(non_upper_case_globals)]
impl Feature {
/// Needed to make flatbuffers happy.
pub const UNUSED: Self = Self(0);
/// The stream makes use of multiple full dictionaries with the
/// same ID and assumes clients implement dictionary replacement
/// correctly.
pub const DICTIONARY_REPLACEMENT: Self = Self(1);
/// The stream makes use of compressed bodies as described
/// in Message.fbs.
pub const COMPRESSED_BODY: Self = Self(2);
pub const ENUM_MIN: i64 = 0;
pub const ENUM_MAX: i64 = 2;
pub const ENUM_VALUES: &'static [Self] = &[
Self::UNUSED,
Self::DICTIONARY_REPLACEMENT,
Self::COMPRESSED_BODY,
];
/// Returns the variant's name or "" if unknown.
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::UNUSED => Some("UNUSED"),
Self::DICTIONARY_REPLACEMENT => Some("DICTIONARY_REPLACEMENT"),
Self::COMPRESSED_BODY => Some("COMPRESSED_BODY"),
_ => None,
}
}
}
impl std::fmt::Debug for Feature {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for Feature {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = unsafe { flatbuffers::read_scalar_at::<i64>(buf, loc) };
Self(b)
}
}
impl flatbuffers::Push for Feature {
type Output = Feature;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
unsafe { flatbuffers::emplace_scalar::<i64>(dst, self.0) };
}
}
impl flatbuffers::EndianScalar for Feature {
#[inline]
fn to_little_endian(self) -> Self {
let b = i64::to_le(self.0);
Self(b)
}
#[inline]
fn from_little_endian(self) -> Self {
let b = i64::from_le(self.0);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for Feature {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
i64::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for Feature {}
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MIN_UNION_MODE: i16 = 0;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MAX_UNION_MODE: i16 = 1;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_UNION_MODE: [UnionMode; 2] = [UnionMode::Sparse, UnionMode::Dense];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct UnionMode(pub i16);
#[allow(non_upper_case_globals)]
impl UnionMode {
pub const Sparse: Self = Self(0);
pub const Dense: Self = Self(1);
pub const ENUM_MIN: i16 = 0;
pub const ENUM_MAX: i16 = 1;
pub const ENUM_VALUES: &'static [Self] = &[Self::Sparse, Self::Dense];
/// Returns the variant's name or "" if unknown.
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::Sparse => Some("Sparse"),
Self::Dense => Some("Dense"),
_ => None,
}
}
}
impl std::fmt::Debug for UnionMode {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for UnionMode {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
impl flatbuffers::Push for UnionMode {
type Output = UnionMode;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}
impl flatbuffers::EndianScalar for UnionMode {
#[inline]
fn to_little_endian(self) -> Self {
let b = i16::to_le(self.0);
Self(b)
}
#[inline]
fn from_little_endian(self) -> Self {
let b = i16::from_le(self.0);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for UnionMode {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
i16::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for UnionMode {}
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MIN_PRECISION: i16 = 0;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MAX_PRECISION: i16 = 2;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_PRECISION: [Precision; 3] =
[Precision::HALF, Precision::SINGLE, Precision::DOUBLE];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct Precision(pub i16);
#[allow(non_upper_case_globals)]
impl Precision {
pub const HALF: Self = Self(0);
pub const SINGLE: Self = Self(1);
pub const DOUBLE: Self = Self(2);
pub const ENUM_MIN: i16 = 0;
pub const ENUM_MAX: i16 = 2;
pub const ENUM_VALUES: &'static [Self] = &[Self::HALF, Self::SINGLE, Self::DOUBLE];
/// Returns the variant's name or "" if unknown.
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::HALF => Some("HALF"),
Self::SINGLE => Some("SINGLE"),
Self::DOUBLE => Some("DOUBLE"),
_ => None,
}
}
}
impl std::fmt::Debug for Precision {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for Precision {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
impl flatbuffers::Push for Precision {
type Output = Precision;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}
impl flatbuffers::EndianScalar for Precision {
#[inline]
fn to_little_endian(self) -> Self {
let b = i16::to_le(self.0);
Self(b)
}
#[inline]
fn from_little_endian(self) -> Self {
let b = i16::from_le(self.0);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for Precision {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
i16::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for Precision {}
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MIN_DATE_UNIT: i16 = 0;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MAX_DATE_UNIT: i16 = 1;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_DATE_UNIT: [DateUnit; 2] = [DateUnit::DAY, DateUnit::MILLISECOND];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct DateUnit(pub i16);
#[allow(non_upper_case_globals)]
impl DateUnit {
pub const DAY: Self = Self(0);
pub const MILLISECOND: Self = Self(1);
pub const ENUM_MIN: i16 = 0;
pub const ENUM_MAX: i16 = 1;
pub const ENUM_VALUES: &'static [Self] = &[Self::DAY, Self::MILLISECOND];
/// Returns the variant's name or "" if unknown.
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::DAY => Some("DAY"),
Self::MILLISECOND => Some("MILLISECOND"),
_ => None,
}
}
}
impl std::fmt::Debug for DateUnit {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for DateUnit {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
impl flatbuffers::Push for DateUnit {
type Output = DateUnit;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}
impl flatbuffers::EndianScalar for DateUnit {
#[inline]
fn to_little_endian(self) -> Self {
let b = i16::to_le(self.0);
Self(b)
}
#[inline]
fn from_little_endian(self) -> Self {
let b = i16::from_le(self.0);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for DateUnit {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
i16::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for DateUnit {}
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MIN_TIME_UNIT: i16 = 0;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MAX_TIME_UNIT: i16 = 3;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_TIME_UNIT: [TimeUnit; 4] = [
TimeUnit::SECOND,
TimeUnit::MILLISECOND,
TimeUnit::MICROSECOND,
TimeUnit::NANOSECOND,
];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct TimeUnit(pub i16);
#[allow(non_upper_case_globals)]
impl TimeUnit {
pub const SECOND: Self = Self(0);
pub const MILLISECOND: Self = Self(1);
pub const MICROSECOND: Self = Self(2);
pub const NANOSECOND: Self = Self(3);
pub const ENUM_MIN: i16 = 0;
pub const ENUM_MAX: i16 = 3;
pub const ENUM_VALUES: &'static [Self] = &[
Self::SECOND,
Self::MILLISECOND,
Self::MICROSECOND,
Self::NANOSECOND,
];
/// Returns the variant's name or "" if unknown.
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::SECOND => Some("SECOND"),
Self::MILLISECOND => Some("MILLISECOND"),
Self::MICROSECOND => Some("MICROSECOND"),
Self::NANOSECOND => Some("NANOSECOND"),
_ => None,
}
}
}
impl std::fmt::Debug for TimeUnit {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for TimeUnit {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
impl flatbuffers::Push for TimeUnit {
type Output = TimeUnit;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}
impl flatbuffers::EndianScalar for TimeUnit {
#[inline]
fn to_little_endian(self) -> Self {
let b = i16::to_le(self.0);
Self(b)
}
#[inline]
fn from_little_endian(self) -> Self {
let b = i16::from_le(self.0);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for TimeUnit {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
i16::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for TimeUnit {}
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MIN_INTERVAL_UNIT: i16 = 0;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MAX_INTERVAL_UNIT: i16 = 1;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_INTERVAL_UNIT: [IntervalUnit; 2] =
[IntervalUnit::YEAR_MONTH, IntervalUnit::DAY_TIME];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct IntervalUnit(pub i16);
#[allow(non_upper_case_globals)]
impl IntervalUnit {
pub const YEAR_MONTH: Self = Self(0);
pub const DAY_TIME: Self = Self(1);
pub const ENUM_MIN: i16 = 0;
pub const ENUM_MAX: i16 = 1;
pub const ENUM_VALUES: &'static [Self] = &[Self::YEAR_MONTH, Self::DAY_TIME];
/// Returns the variant's name or "" if unknown.
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::YEAR_MONTH => Some("YEAR_MONTH"),
Self::DAY_TIME => Some("DAY_TIME"),
_ => None,
}
}
}
impl std::fmt::Debug for IntervalUnit {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for IntervalUnit {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
impl flatbuffers::Push for IntervalUnit {
type Output = IntervalUnit;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}
impl flatbuffers::EndianScalar for IntervalUnit {
#[inline]
fn to_little_endian(self) -> Self {
let b = i16::to_le(self.0);
Self(b)
}
#[inline]
fn from_little_endian(self) -> Self {
let b = i16::from_le(self.0);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for IntervalUnit {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
i16::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for IntervalUnit {}
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MIN_TYPE: u8 = 0;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MAX_TYPE: u8 = 21;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_TYPE: [Type; 22] = [
Type::NONE,
Type::Null,
Type::Int,
Type::FloatingPoint,
Type::Binary,
Type::Utf8,
Type::Bool,
Type::Decimal,
Type::Date,
Type::Time,
Type::Timestamp,
Type::Interval,
Type::List,
Type::Struct_,
Type::Union,
Type::FixedSizeBinary,
Type::FixedSizeList,
Type::Map,
Type::Duration,
Type::LargeBinary,
Type::LargeUtf8,
Type::LargeList,
];
/// ----------------------------------------------------------------------
/// Top-level Type value, enabling extensible type-specific metadata. We can
/// add new logical types to Type without breaking backwards compatibility
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct Type(pub u8);
#[allow(non_upper_case_globals)]
impl Type {
pub const NONE: Self = Self(0);
pub const Null: Self = Self(1);
pub const Int: Self = Self(2);
pub const FloatingPoint: Self = Self(3);
pub const Binary: Self = Self(4);
pub const Utf8: Self = Self(5);
pub const Bool: Self = Self(6);
pub const Decimal: Self = Self(7);
pub const Date: Self = Self(8);
pub const Time: Self = Self(9);
pub const Timestamp: Self = Self(10);
pub const Interval: Self = Self(11);
pub const List: Self = Self(12);
pub const Struct_: Self = Self(13);
pub const Union: Self = Self(14);
pub const FixedSizeBinary: Self = Self(15);
pub const FixedSizeList: Self = Self(16);
pub const Map: Self = Self(17);
pub const Duration: Self = Self(18);
pub const LargeBinary: Self = Self(19);
pub const LargeUtf8: Self = Self(20);
pub const LargeList: Self = Self(21);
pub const Timestamp32: Self = Self(100);//XXX
pub const ENUM_MIN: u8 = 0;
pub const ENUM_MAX: u8 = 21;
pub const ENUM_VALUES: &'static [Self] = &[
Self::NONE,
Self::Null,
Self::Int,
Self::FloatingPoint,
Self::Binary,
Self::Utf8,
Self::Bool,
Self::Decimal,
Self::Date,
Self::Time,
Self::Timestamp,
Self::Interval,
Self::List,
Self::Struct_,
Self::Union,
Self::FixedSizeBinary,
Self::FixedSizeList,
Self::Map,
Self::Duration,
Self::LargeBinary,
Self::LargeUtf8,
Self::LargeList,
];
/// Returns the variant's name or "" if unknown.
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::NONE => Some("NONE"),
Self::Null => Some("Null"),
Self::Int => Some("Int"),
Self::FloatingPoint => Some("FloatingPoint"),
Self::Binary => Some("Binary"),
Self::Utf8 => Some("Utf8"),
Self::Bool => Some("Bool"),
Self::Decimal => Some("Decimal"),
Self::Date => Some("Date"),
Self::Time => Some("Time"),
Self::Timestamp => Some("Timestamp"),
Self::Interval => Some("Interval"),
Self::List => Some("List"),
Self::Struct_ => Some("Struct_"),
Self::Union => Some("Union"),
Self::FixedSizeBinary => Some("FixedSizeBinary"),
Self::FixedSizeList => Some("FixedSizeList"),
Self::Map => Some("Map"),
Self::Duration => Some("Duration"),
Self::LargeBinary => Some("LargeBinary"),
Self::LargeUtf8 => Some("LargeUtf8"),
Self::LargeList => Some("LargeList"),
_ => None,
}
}
}
impl std::fmt::Debug for Type {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
pub struct TypeUnionTableOffset {}
impl<'a> flatbuffers::Follow<'a> for Type {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
Self(b)
}
}
impl flatbuffers::Push for Type {
type Output = Type;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
unsafe { flatbuffers::emplace_scalar::<u8>(dst, self.0) };
}
}
impl flatbuffers::EndianScalar for Type {
#[inline]
fn to_little_endian(self) -> Self {
let b = u8::to_le(self.0);
Self(b)
}
#[inline]
fn from_little_endian(self) -> Self {
let b = u8::from_le(self.0);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for Type {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
u8::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for Type {}
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MIN_DICTIONARY_KIND: i16 = 0;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MAX_DICTIONARY_KIND: i16 = 0;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_DICTIONARY_KIND: [DictionaryKind; 1] = [DictionaryKind::DenseArray];
/// ----------------------------------------------------------------------
/// Dictionary encoding metadata
/// Maintained for forwards compatibility, in the future
/// Dictionaries might be explicit maps between integers and values
/// allowing for non-contiguous index values
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct DictionaryKind(pub i16);
#[allow(non_upper_case_globals)]
impl DictionaryKind {
pub const DenseArray: Self = Self(0);
pub const ENUM_MIN: i16 = 0;
pub const ENUM_MAX: i16 = 0;
pub const ENUM_VALUES: &'static [Self] = &[Self::DenseArray];
/// Returns the variant's name or "" if unknown.
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::DenseArray => Some("DenseArray"),
_ => None,
}
}
}
impl std::fmt::Debug for DictionaryKind {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for DictionaryKind {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
impl flatbuffers::Push for DictionaryKind {
type Output = DictionaryKind;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}
impl flatbuffers::EndianScalar for DictionaryKind {
#[inline]
fn to_little_endian(self) -> Self {
let b = i16::to_le(self.0);
Self(b)
}
#[inline]
fn from_little_endian(self) -> Self {
let b = i16::from_le(self.0);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for DictionaryKind {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
i16::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for DictionaryKind {}
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MIN_ENDIANNESS: i16 = 0;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MAX_ENDIANNESS: i16 = 1;
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_ENDIANNESS: [Endianness; 2] = [Endianness::Little, Endianness::Big];
/// ----------------------------------------------------------------------
/// Endianness of the platform producing the data
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct Endianness(pub i16);
#[allow(non_upper_case_globals)]
impl Endianness {
pub const Little: Self = Self(0);
pub const Big: Self = Self(1);
pub const ENUM_MIN: i16 = 0;
pub const ENUM_MAX: i16 = 1;
pub const ENUM_VALUES: &'static [Self] = &[Self::Little, Self::Big];
/// Returns the variant's name or "" if unknown.
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::Little => Some("Little"),
Self::Big => Some("Big"),
_ => None,
}
}
}
impl std::fmt::Debug for Endianness {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for Endianness {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
impl flatbuffers::Push for Endianness {
type Output = Endianness;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}
impl flatbuffers::EndianScalar for Endianness {
#[inline]
fn to_little_endian(self) -> Self {
let b = i16::to_le(self.0);
Self(b)
}
#[inline]
fn from_little_endian(self) -> Self {
let b = i16::from_le(self.0);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for Endianness {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
i16::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for Endianness {}
/// ----------------------------------------------------------------------
/// A Buffer represents a single contiguous memory segment
// struct Buffer, aligned to 8
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq)]
pub struct Buffer(pub [u8; 16]);
impl std::fmt::Debug for Buffer {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.debug_struct("Buffer")
.field("offset", &self.offset())
.field("length", &self.length())
.finish()
}
}
impl flatbuffers::SimpleToVerifyInSlice for Buffer {}
impl flatbuffers::SafeSliceAccess for Buffer {}
impl<'a> flatbuffers::Follow<'a> for Buffer {
type Inner = &'a Buffer;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
<&'a Buffer>::follow(buf, loc)
}
}
impl<'a> flatbuffers::Follow<'a> for &'a Buffer {
type Inner = &'a Buffer;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
flatbuffers::follow_cast_ref::<Buffer>(buf, loc)
}
}
impl<'b> flatbuffers::Push for Buffer {
type Output = Buffer;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
let src = unsafe {
::std::slice::from_raw_parts(self as *const Buffer as *const u8, Self::size())
};
dst.copy_from_slice(src);
}
}
impl<'b> flatbuffers::Push for &'b Buffer {
type Output = Buffer;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
let src = unsafe {
::std::slice::from_raw_parts(
*self as *const Buffer as *const u8,
Self::size(),
)
};
dst.copy_from_slice(src);
}
}
impl<'a> flatbuffers::Verifiable for Buffer {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.in_buffer::<Self>(pos)
}
}
impl Buffer {
#[allow(clippy::too_many_arguments)]
pub fn new(offset: i64, length: i64) -> Self {
let mut s = Self([0; 16]);
s.set_offset(offset);
s.set_length(length);
s
}
/// The relative offset into the shared memory page where the bytes for this
/// buffer starts
pub fn offset(&self) -> i64 {
let mut mem = core::mem::MaybeUninit::<i64>::uninit();
unsafe {
core::ptr::copy_nonoverlapping(
self.0[0..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<i64>(),
);
mem.assume_init()
}
.from_little_endian()
}
pub fn set_offset(&mut self, x: i64) {
let x_le = x.to_little_endian();
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const i64 as *const u8,
self.0[0..].as_mut_ptr(),
core::mem::size_of::<i64>(),
);
}
}
/// The absolute length (in bytes) of the memory buffer. The memory is found
/// from offset (inclusive) to offset + length (non-inclusive). When building
/// messages using the encapsulated IPC message, padding bytes may be written
/// after a buffer, but such padding bytes do not need to be accounted for in
/// the size here.
pub fn length(&self) -> i64 {
let mut mem = core::mem::MaybeUninit::<i64>::uninit();
unsafe {
core::ptr::copy_nonoverlapping(
self.0[8..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<i64>(),
);
mem.assume_init()
}
.from_little_endian()
}
pub fn set_length(&mut self, x: i64) {
let x_le = x.to_little_endian();
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const i64 as *const u8,
self.0[8..].as_mut_ptr(),
core::mem::size_of::<i64>(),
);
}
}
}
pub enum NullOffset {}
#[derive(Copy, Clone, PartialEq)]
/// These are stored in the flatbuffer in the Type union below
pub struct Null<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Null<'a> {
type Inner = Null<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Null<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Null { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
_args: &'args NullArgs,
) -> flatbuffers::WIPOffset<Null<'bldr>> {
let mut builder = NullBuilder::new(_fbb);
builder.finish()
}
}
impl flatbuffers::Verifiable for Null<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?.finish();
Ok(())
}
}
pub struct NullArgs {}
impl<'a> Default for NullArgs {
#[inline]
fn default() -> Self {
NullArgs {}
}
}
pub struct NullBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> NullBuilder<'a, 'b> {
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> NullBuilder<'a, 'b> {
let start = _fbb.start_table();
NullBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Null<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Null<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Null");
ds.finish()
}
}
pub enum Struct_Offset {}
#[derive(Copy, Clone, PartialEq)]
/// A Struct_ in the flatbuffer metadata is the same as an Arrow Struct
/// (according to the physical memory layout). We used Struct_ here as
/// Struct is a reserved word in Flatbuffers
pub struct Struct_<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Struct_<'a> {
type Inner = Struct_<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Struct_<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Struct_ { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
_args: &'args Struct_Args,
) -> flatbuffers::WIPOffset<Struct_<'bldr>> {
let mut builder = Struct_Builder::new(_fbb);
builder.finish()
}
}
impl flatbuffers::Verifiable for Struct_<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?.finish();
Ok(())
}
}
pub struct Struct_Args {}
impl<'a> Default for Struct_Args {
#[inline]
fn default() -> Self {
Struct_Args {}
}
}
pub struct Struct_Builder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> Struct_Builder<'a, 'b> {
#[inline]
pub fn new(
_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
) -> Struct_Builder<'a, 'b> {
let start = _fbb.start_table();
Struct_Builder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Struct_<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Struct_<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Struct_");
ds.finish()
}
}
pub enum ListOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct List<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for List<'a> {
type Inner = List<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> List<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
List { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
_args: &'args ListArgs,
) -> flatbuffers::WIPOffset<List<'bldr>> {
let mut builder = ListBuilder::new(_fbb);
builder.finish()
}
}
impl flatbuffers::Verifiable for List<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?.finish();
Ok(())
}
}
pub struct ListArgs {}
impl<'a> Default for ListArgs {
#[inline]
fn default() -> Self {
ListArgs {}
}
}
pub struct ListBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> ListBuilder<'a, 'b> {
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ListBuilder<'a, 'b> {
let start = _fbb.start_table();
ListBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<List<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for List<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("List");
ds.finish()
}
}
pub enum LargeListOffset {}
#[derive(Copy, Clone, PartialEq)]
/// Same as List, but with 64-bit offsets, allowing to represent
/// extremely large data values.
pub struct LargeList<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for LargeList<'a> {
type Inner = LargeList<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> LargeList<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
LargeList { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
_args: &'args LargeListArgs,
) -> flatbuffers::WIPOffset<LargeList<'bldr>> {
let mut builder = LargeListBuilder::new(_fbb);
builder.finish()
}
}
impl flatbuffers::Verifiable for LargeList<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?.finish();
Ok(())
}
}
pub struct LargeListArgs {}
impl<'a> Default for LargeListArgs {
#[inline]
fn default() -> Self {
LargeListArgs {}
}
}
pub struct LargeListBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> LargeListBuilder<'a, 'b> {
#[inline]
pub fn new(
_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
) -> LargeListBuilder<'a, 'b> {
let start = _fbb.start_table();
LargeListBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<LargeList<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for LargeList<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("LargeList");
ds.finish()
}
}
pub enum FixedSizeListOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct FixedSizeList<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for FixedSizeList<'a> {
type Inner = FixedSizeList<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> FixedSizeList<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
FixedSizeList { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args FixedSizeListArgs,
) -> flatbuffers::WIPOffset<FixedSizeList<'bldr>> {
let mut builder = FixedSizeListBuilder::new(_fbb);
builder.add_listSize(args.listSize);
builder.finish()
}
pub const VT_LISTSIZE: flatbuffers::VOffsetT = 4;
/// Number of list items per value
#[inline]
pub fn listSize(&self) -> i32 {
self._tab
.get::<i32>(FixedSizeList::VT_LISTSIZE, Some(0))
.unwrap()
}
}
impl flatbuffers::Verifiable for FixedSizeList<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<i32>(&"listSize", Self::VT_LISTSIZE, false)?
.finish();
Ok(())
}
}
pub struct FixedSizeListArgs {
pub listSize: i32,
}
impl<'a> Default for FixedSizeListArgs {
#[inline]
fn default() -> Self {
FixedSizeListArgs { listSize: 0 }
}
}
pub struct FixedSizeListBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> FixedSizeListBuilder<'a, 'b> {
#[inline]
pub fn add_listSize(&mut self, listSize: i32) {
self.fbb_
.push_slot::<i32>(FixedSizeList::VT_LISTSIZE, listSize, 0);
}
#[inline]
pub fn new(
_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
) -> FixedSizeListBuilder<'a, 'b> {
let start = _fbb.start_table();
FixedSizeListBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<FixedSizeList<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for FixedSizeList<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("FixedSizeList");
ds.field("listSize", &self.listSize());
ds.finish()
}
}
pub enum MapOffset {}
#[derive(Copy, Clone, PartialEq)]
/// A Map is a logical nested type that is represented as
///
/// List<entries: Struct<key: K, value: V>>
///
/// In this layout, the keys and values are each respectively contiguous. We do
/// not constrain the key and value types, so the application is responsible
/// for ensuring that the keys are hashable and unique. Whether the keys are sorted
/// may be set in the metadata for this field.
///
/// In a field with Map type, the field has a child Struct field, which then
/// has two children: key type and the second the value type. The names of the
/// child fields may be respectively "entries", "key", and "value", but this is
/// not enforced.
///
/// Map
/// ```text
/// - child[0] entries: Struct
/// - child[0] key: K
/// - child[1] value: V
/// ```
/// Neither the "entries" field nor the "key" field may be nullable.
///
/// The metadata is structured so that Arrow systems without special handling
/// for Map can make Map an alias for List. The "layout" attribute for the Map
/// field must have the same contents as a List.
pub struct Map<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Map<'a> {
type Inner = Map<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Map<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Map { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args MapArgs,
) -> flatbuffers::WIPOffset<Map<'bldr>> {
let mut builder = MapBuilder::new(_fbb);
builder.add_keysSorted(args.keysSorted);
builder.finish()
}
pub const VT_KEYSSORTED: flatbuffers::VOffsetT = 4;
/// Set to true if the keys within each value are sorted
#[inline]
pub fn keysSorted(&self) -> bool {
self._tab
.get::<bool>(Map::VT_KEYSSORTED, Some(false))
.unwrap()
}
}
impl flatbuffers::Verifiable for Map<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<bool>(&"keysSorted", Self::VT_KEYSSORTED, false)?
.finish();
Ok(())
}
}
pub struct MapArgs {
pub keysSorted: bool,
}
impl<'a> Default for MapArgs {
#[inline]
fn default() -> Self {
MapArgs { keysSorted: false }
}
}
pub struct MapBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> MapBuilder<'a, 'b> {
#[inline]
pub fn add_keysSorted(&mut self, keysSorted: bool) {
self.fbb_
.push_slot::<bool>(Map::VT_KEYSSORTED, keysSorted, false);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> MapBuilder<'a, 'b> {
let start = _fbb.start_table();
MapBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Map<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Map<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Map");
ds.field("keysSorted", &self.keysSorted());
ds.finish()
}
}
pub enum UnionOffset {}
#[derive(Copy, Clone, PartialEq)]
/// A union is a complex type with children in Field
/// By default ids in the type vector refer to the offsets in the children
/// optionally typeIds provides an indirection between the child offset and the type id
/// for each child `typeIds[offset]` is the id used in the type vector
pub struct Union<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Union<'a> {
type Inner = Union<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Union<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Union { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args UnionArgs<'args>,
) -> flatbuffers::WIPOffset<Union<'bldr>> {
let mut builder = UnionBuilder::new(_fbb);
if let Some(x) = args.typeIds {
builder.add_typeIds(x);
}
builder.add_mode(args.mode);
builder.finish()
}
pub const VT_MODE: flatbuffers::VOffsetT = 4;
pub const VT_TYPEIDS: flatbuffers::VOffsetT = 6;
#[inline]
pub fn mode(&self) -> UnionMode {
self._tab
.get::<UnionMode>(Union::VT_MODE, Some(UnionMode::Sparse))
.unwrap()
}
#[inline]
pub fn typeIds(&self) -> Option<flatbuffers::Vector<'a, i32>> {
self._tab
.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i32>>>(
Union::VT_TYPEIDS,
None,
)
}
}
impl flatbuffers::Verifiable for Union<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<UnionMode>(&"mode", Self::VT_MODE, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>(
&"typeIds",
Self::VT_TYPEIDS,
false,
)?
.finish();
Ok(())
}
}
pub struct UnionArgs<'a> {
pub mode: UnionMode,
pub typeIds: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
}
impl<'a> Default for UnionArgs<'a> {
#[inline]
fn default() -> Self {
UnionArgs {
mode: UnionMode::Sparse,
typeIds: None,
}
}
}
pub struct UnionBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> UnionBuilder<'a, 'b> {
#[inline]
pub fn add_mode(&mut self, mode: UnionMode) {
self.fbb_
.push_slot::<UnionMode>(Union::VT_MODE, mode, UnionMode::Sparse);
}
#[inline]
pub fn add_typeIds(
&mut self,
typeIds: flatbuffers::WIPOffset<flatbuffers::Vector<'b, i32>>,
) {
self.fbb_
.push_slot_always::<flatbuffers::WIPOffset<_>>(Union::VT_TYPEIDS, typeIds);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> UnionBuilder<'a, 'b> {
let start = _fbb.start_table();
UnionBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Union<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Union<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Union");
ds.field("mode", &self.mode());
ds.field("typeIds", &self.typeIds());
ds.finish()
}
}
pub enum IntOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct Int<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Int<'a> {
type Inner = Int<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Int<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Int { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args IntArgs,
) -> flatbuffers::WIPOffset<Int<'bldr>> {
let mut builder = IntBuilder::new(_fbb);
builder.add_bitWidth(args.bitWidth);
builder.add_is_signed(args.is_signed);
builder.finish()
}
pub const VT_BITWIDTH: flatbuffers::VOffsetT = 4;
pub const VT_IS_SIGNED: flatbuffers::VOffsetT = 6;
#[inline]
pub fn bitWidth(&self) -> i32 {
self._tab.get::<i32>(Int::VT_BITWIDTH, Some(0)).unwrap()
}
#[inline]
pub fn is_signed(&self) -> bool {
self._tab
.get::<bool>(Int::VT_IS_SIGNED, Some(false))
.unwrap()
}
}
impl flatbuffers::Verifiable for Int<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<i32>(&"bitWidth", Self::VT_BITWIDTH, false)?
.visit_field::<bool>(&"is_signed", Self::VT_IS_SIGNED, false)?
.finish();
Ok(())
}
}
pub struct IntArgs {
pub bitWidth: i32,
pub is_signed: bool,
}
impl<'a> Default for IntArgs {
#[inline]
fn default() -> Self {
IntArgs {
bitWidth: 0,
is_signed: false,
}
}
}
pub struct IntBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> IntBuilder<'a, 'b> {
#[inline]
pub fn add_bitWidth(&mut self, bitWidth: i32) {
self.fbb_.push_slot::<i32>(Int::VT_BITWIDTH, bitWidth, 0);
}
#[inline]
pub fn add_is_signed(&mut self, is_signed: bool) {
self.fbb_
.push_slot::<bool>(Int::VT_IS_SIGNED, is_signed, false);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> IntBuilder<'a, 'b> {
let start = _fbb.start_table();
IntBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Int<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Int<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Int");
ds.field("bitWidth", &self.bitWidth());
ds.field("is_signed", &self.is_signed());
ds.finish()
}
}
pub enum FloatingPointOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct FloatingPoint<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for FloatingPoint<'a> {
type Inner = FloatingPoint<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> FloatingPoint<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
FloatingPoint { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args FloatingPointArgs,
) -> flatbuffers::WIPOffset<FloatingPoint<'bldr>> {
let mut builder = FloatingPointBuilder::new(_fbb);
builder.add_precision(args.precision);
builder.finish()
}
pub const VT_PRECISION: flatbuffers::VOffsetT = 4;
#[inline]
pub fn precision(&self) -> Precision {
self._tab
.get::<Precision>(FloatingPoint::VT_PRECISION, Some(Precision::HALF))
.unwrap()
}
}
impl flatbuffers::Verifiable for FloatingPoint<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<Precision>(&"precision", Self::VT_PRECISION, false)?
.finish();
Ok(())
}
}
pub struct FloatingPointArgs {
pub precision: Precision,
}
impl<'a> Default for FloatingPointArgs {
#[inline]
fn default() -> Self {
FloatingPointArgs {
precision: Precision::HALF,
}
}
}
pub struct FloatingPointBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> FloatingPointBuilder<'a, 'b> {
#[inline]
pub fn add_precision(&mut self, precision: Precision) {
self.fbb_.push_slot::<Precision>(
FloatingPoint::VT_PRECISION,
precision,
Precision::HALF,
);
}
#[inline]
pub fn new(
_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
) -> FloatingPointBuilder<'a, 'b> {
let start = _fbb.start_table();
FloatingPointBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<FloatingPoint<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for FloatingPoint<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("FloatingPoint");
ds.field("precision", &self.precision());
ds.finish()
}
}
pub enum Utf8Offset {}
#[derive(Copy, Clone, PartialEq)]
/// Unicode with UTF-8 encoding
pub struct Utf8<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Utf8<'a> {
type Inner = Utf8<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Utf8<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Utf8 { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
_args: &'args Utf8Args,
) -> flatbuffers::WIPOffset<Utf8<'bldr>> {
let mut builder = Utf8Builder::new(_fbb);
builder.finish()
}
}
impl flatbuffers::Verifiable for Utf8<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?.finish();
Ok(())
}
}
pub struct Utf8Args {}
impl<'a> Default for Utf8Args {
#[inline]
fn default() -> Self {
Utf8Args {}
}
}
pub struct Utf8Builder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> Utf8Builder<'a, 'b> {
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> Utf8Builder<'a, 'b> {
let start = _fbb.start_table();
Utf8Builder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Utf8<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Utf8<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Utf8");
ds.finish()
}
}
pub enum BinaryOffset {}
#[derive(Copy, Clone, PartialEq)]
/// Opaque binary data
pub struct Binary<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Binary<'a> {
type Inner = Binary<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Binary<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Binary { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
_args: &'args BinaryArgs,
) -> flatbuffers::WIPOffset<Binary<'bldr>> {
let mut builder = BinaryBuilder::new(_fbb);
builder.finish()
}
}
impl flatbuffers::Verifiable for Binary<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?.finish();
Ok(())
}
}
pub struct BinaryArgs {}
impl<'a> Default for BinaryArgs {
#[inline]
fn default() -> Self {
BinaryArgs {}
}
}
pub struct BinaryBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> BinaryBuilder<'a, 'b> {
#[inline]
pub fn new(
_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
) -> BinaryBuilder<'a, 'b> {
let start = _fbb.start_table();
BinaryBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Binary<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Binary<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Binary");
ds.finish()
}
}
pub enum LargeUtf8Offset {}
#[derive(Copy, Clone, PartialEq)]
/// Same as Utf8, but with 64-bit offsets, allowing to represent
/// extremely large data values.
pub struct LargeUtf8<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for LargeUtf8<'a> {
type Inner = LargeUtf8<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> LargeUtf8<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
LargeUtf8 { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
_args: &'args LargeUtf8Args,
) -> flatbuffers::WIPOffset<LargeUtf8<'bldr>> {
let mut builder = LargeUtf8Builder::new(_fbb);
builder.finish()
}
}
impl flatbuffers::Verifiable for LargeUtf8<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?.finish();
Ok(())
}
}
pub struct LargeUtf8Args {}
impl<'a> Default for LargeUtf8Args {
#[inline]
fn default() -> Self {
LargeUtf8Args {}
}
}
pub struct LargeUtf8Builder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> LargeUtf8Builder<'a, 'b> {
#[inline]
pub fn new(
_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
) -> LargeUtf8Builder<'a, 'b> {
let start = _fbb.start_table();
LargeUtf8Builder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<LargeUtf8<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for LargeUtf8<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("LargeUtf8");
ds.finish()
}
}
pub enum LargeBinaryOffset {}
#[derive(Copy, Clone, PartialEq)]
/// Same as Binary, but with 64-bit offsets, allowing to represent
/// extremely large data values.
pub struct LargeBinary<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for LargeBinary<'a> {
type Inner = LargeBinary<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> LargeBinary<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
LargeBinary { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
_args: &'args LargeBinaryArgs,
) -> flatbuffers::WIPOffset<LargeBinary<'bldr>> {
let mut builder = LargeBinaryBuilder::new(_fbb);
builder.finish()
}
}
impl flatbuffers::Verifiable for LargeBinary<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?.finish();
Ok(())
}
}
pub struct LargeBinaryArgs {}
impl<'a> Default for LargeBinaryArgs {
#[inline]
fn default() -> Self {
LargeBinaryArgs {}
}
}
pub struct LargeBinaryBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> LargeBinaryBuilder<'a, 'b> {
#[inline]
pub fn new(
_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
) -> LargeBinaryBuilder<'a, 'b> {
let start = _fbb.start_table();
LargeBinaryBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<LargeBinary<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for LargeBinary<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("LargeBinary");
ds.finish()
}
}
pub enum FixedSizeBinaryOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct FixedSizeBinary<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for FixedSizeBinary<'a> {
type Inner = FixedSizeBinary<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> FixedSizeBinary<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
FixedSizeBinary { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args FixedSizeBinaryArgs,
) -> flatbuffers::WIPOffset<FixedSizeBinary<'bldr>> {
let mut builder = FixedSizeBinaryBuilder::new(_fbb);
builder.add_byteWidth(args.byteWidth);
builder.finish()
}
pub const VT_BYTEWIDTH: flatbuffers::VOffsetT = 4;
/// Number of bytes per value
#[inline]
pub fn byteWidth(&self) -> i32 {
self._tab
.get::<i32>(FixedSizeBinary::VT_BYTEWIDTH, Some(0))
.unwrap()
}
}
impl flatbuffers::Verifiable for FixedSizeBinary<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<i32>(&"byteWidth", Self::VT_BYTEWIDTH, false)?
.finish();
Ok(())
}
}
pub struct FixedSizeBinaryArgs {
pub byteWidth: i32,
}
impl<'a> Default for FixedSizeBinaryArgs {
#[inline]
fn default() -> Self {
FixedSizeBinaryArgs { byteWidth: 0 }
}
}
pub struct FixedSizeBinaryBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> FixedSizeBinaryBuilder<'a, 'b> {
#[inline]
pub fn add_byteWidth(&mut self, byteWidth: i32) {
self.fbb_
.push_slot::<i32>(FixedSizeBinary::VT_BYTEWIDTH, byteWidth, 0);
}
#[inline]
pub fn new(
_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
) -> FixedSizeBinaryBuilder<'a, 'b> {
let start = _fbb.start_table();
FixedSizeBinaryBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<FixedSizeBinary<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for FixedSizeBinary<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("FixedSizeBinary");
ds.field("byteWidth", &self.byteWidth());
ds.finish()
}
}
pub enum BoolOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct Bool<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Bool<'a> {
type Inner = Bool<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Bool<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Bool { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
_args: &'args BoolArgs,
) -> flatbuffers::WIPOffset<Bool<'bldr>> {
let mut builder = BoolBuilder::new(_fbb);
builder.finish()
}
}
impl flatbuffers::Verifiable for Bool<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?.finish();
Ok(())
}
}
pub struct BoolArgs {}
impl<'a> Default for BoolArgs {
#[inline]
fn default() -> Self {
BoolArgs {}
}
}
pub struct BoolBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> BoolBuilder<'a, 'b> {
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> BoolBuilder<'a, 'b> {
let start = _fbb.start_table();
BoolBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Bool<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Bool<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Bool");
ds.finish()
}
}
pub enum DecimalOffset {}
#[derive(Copy, Clone, PartialEq)]
/// Exact decimal value represented as an integer value in two's
/// complement. Currently only 128-bit (16-byte) and 256-bit (32-byte) integers
/// are used. The representation uses the endianness indicated
/// in the Schema.
pub struct Decimal<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Decimal<'a> {
type Inner = Decimal<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Decimal<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Decimal { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args DecimalArgs,
) -> flatbuffers::WIPOffset<Decimal<'bldr>> {
let mut builder = DecimalBuilder::new(_fbb);
builder.add_bitWidth(args.bitWidth);
builder.add_scale(args.scale);
builder.add_precision(args.precision);
builder.finish()
}
pub const VT_PRECISION: flatbuffers::VOffsetT = 4;
pub const VT_SCALE: flatbuffers::VOffsetT = 6;
pub const VT_BITWIDTH: flatbuffers::VOffsetT = 8;
/// Total number of decimal digits
#[inline]
pub fn precision(&self) -> i32 {
self._tab
.get::<i32>(Decimal::VT_PRECISION, Some(0))
.unwrap()
}
/// Number of digits after the decimal point "."
#[inline]
pub fn scale(&self) -> i32 {
self._tab.get::<i32>(Decimal::VT_SCALE, Some(0)).unwrap()
}
/// Number of bits per value. The only accepted widths are 128 and 256.
/// We use bitWidth for consistency with Int::bitWidth.
#[inline]
pub fn bitWidth(&self) -> i32 {
self._tab
.get::<i32>(Decimal::VT_BITWIDTH, Some(128))
.unwrap()
}
}
impl flatbuffers::Verifiable for Decimal<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<i32>(&"precision", Self::VT_PRECISION, false)?
.visit_field::<i32>(&"scale", Self::VT_SCALE, false)?
.visit_field::<i32>(&"bitWidth", Self::VT_BITWIDTH, false)?
.finish();
Ok(())
}
}
pub struct DecimalArgs {
pub precision: i32,
pub scale: i32,
pub bitWidth: i32,
}
impl<'a> Default for DecimalArgs {
#[inline]
fn default() -> Self {
DecimalArgs {
precision: 0,
scale: 0,
bitWidth: 128,
}
}
}
pub struct DecimalBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> DecimalBuilder<'a, 'b> {
#[inline]
pub fn add_precision(&mut self, precision: i32) {
self.fbb_
.push_slot::<i32>(Decimal::VT_PRECISION, precision, 0);
}
#[inline]
pub fn add_scale(&mut self, scale: i32) {
self.fbb_.push_slot::<i32>(Decimal::VT_SCALE, scale, 0);
}
#[inline]
pub fn add_bitWidth(&mut self, bitWidth: i32) {
self.fbb_
.push_slot::<i32>(Decimal::VT_BITWIDTH, bitWidth, 128);
}
#[inline]
pub fn new(
_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
) -> DecimalBuilder<'a, 'b> {
let start = _fbb.start_table();
DecimalBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Decimal<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Decimal<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Decimal");
ds.field("precision", &self.precision());
ds.field("scale", &self.scale());
ds.field("bitWidth", &self.bitWidth());
ds.finish()
}
}
pub enum DateOffset {}
#[derive(Copy, Clone, PartialEq)]
/// Date is either a 32-bit or 64-bit type representing elapsed time since UNIX
/// epoch (1970-01-01), stored in either of two units:
///
/// * Milliseconds (64 bits) indicating UNIX time elapsed since the epoch (no
/// leap seconds), where the values are evenly divisible by 86400000
/// * Days (32 bits) since the UNIX epoch
pub struct Date<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Date<'a> {
type Inner = Date<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Date<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Date { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args DateArgs,
) -> flatbuffers::WIPOffset<Date<'bldr>> {
let mut builder = DateBuilder::new(_fbb);
builder.add_unit(args.unit);
builder.finish()
}
pub const VT_UNIT: flatbuffers::VOffsetT = 4;
#[inline]
pub fn unit(&self) -> DateUnit {
self._tab
.get::<DateUnit>(Date::VT_UNIT, Some(DateUnit::MILLISECOND))
.unwrap()
}
}
impl flatbuffers::Verifiable for Date<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<DateUnit>(&"unit", Self::VT_UNIT, false)?
.finish();
Ok(())
}
}
pub struct DateArgs {
pub unit: DateUnit,
}
impl<'a> Default for DateArgs {
#[inline]
fn default() -> Self {
DateArgs {
unit: DateUnit::MILLISECOND,
}
}
}
pub struct DateBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> DateBuilder<'a, 'b> {
#[inline]
pub fn add_unit(&mut self, unit: DateUnit) {
self.fbb_
.push_slot::<DateUnit>(Date::VT_UNIT, unit, DateUnit::MILLISECOND);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DateBuilder<'a, 'b> {
let start = _fbb.start_table();
DateBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Date<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Date<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Date");
ds.field("unit", &self.unit());
ds.finish()
}
}
pub enum TimeOffset {}
#[derive(Copy, Clone, PartialEq)]
/// Time type. The physical storage type depends on the unit
/// - SECOND and MILLISECOND: 32 bits
/// - MICROSECOND and NANOSECOND: 64 bits
pub struct Time<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Time<'a> {
type Inner = Time<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Time<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Time { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args TimeArgs,
) -> flatbuffers::WIPOffset<Time<'bldr>> {
let mut builder = TimeBuilder::new(_fbb);
builder.add_bitWidth(args.bitWidth);
builder.add_unit(args.unit);
builder.finish()
}
pub const VT_UNIT: flatbuffers::VOffsetT = 4;
pub const VT_BITWIDTH: flatbuffers::VOffsetT = 6;
#[inline]
pub fn unit(&self) -> TimeUnit {
self._tab
.get::<TimeUnit>(Time::VT_UNIT, Some(TimeUnit::MILLISECOND))
.unwrap()
}
#[inline]
pub fn bitWidth(&self) -> i32 {
self._tab.get::<i32>(Time::VT_BITWIDTH, Some(32)).unwrap()
}
}
impl flatbuffers::Verifiable for Time<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<TimeUnit>(&"unit", Self::VT_UNIT, false)?
.visit_field::<i32>(&"bitWidth", Self::VT_BITWIDTH, false)?
.finish();
Ok(())
}
}
pub struct TimeArgs {
pub unit: TimeUnit,
pub bitWidth: i32,
}
impl<'a> Default for TimeArgs {
#[inline]
fn default() -> Self {
TimeArgs {
unit: TimeUnit::MILLISECOND,
bitWidth: 32,
}
}
}
pub struct TimeBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> TimeBuilder<'a, 'b> {
#[inline]
pub fn add_unit(&mut self, unit: TimeUnit) {
self.fbb_
.push_slot::<TimeUnit>(Time::VT_UNIT, unit, TimeUnit::MILLISECOND);
}
#[inline]
pub fn add_bitWidth(&mut self, bitWidth: i32) {
self.fbb_.push_slot::<i32>(Time::VT_BITWIDTH, bitWidth, 32);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TimeBuilder<'a, 'b> {
let start = _fbb.start_table();
TimeBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Time<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Time<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Time");
ds.field("unit", &self.unit());
ds.field("bitWidth", &self.bitWidth());
ds.finish()
}
}
pub enum TimestampOffset {}
#[derive(Copy, Clone, PartialEq)]
/// Time elapsed from the Unix epoch, 00:00:00.000 on 1 January 1970, excluding
/// leap seconds, as a 64-bit integer. Note that UNIX time does not include
/// leap seconds.
///
/// The Timestamp metadata supports both "time zone naive" and "time zone
/// aware" timestamps. Read about the timezone attribute for more detail
pub struct Timestamp<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Timestamp<'a> {
type Inner = Timestamp<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Timestamp<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Timestamp { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args TimestampArgs<'args>,
) -> flatbuffers::WIPOffset<Timestamp<'bldr>> {
let mut builder = TimestampBuilder::new(_fbb);
if let Some(x) = args.timezone {
builder.add_timezone(x);
}
builder.add_unit(args.unit);
builder.finish()
}
pub const VT_UNIT: flatbuffers::VOffsetT = 4;
pub const VT_TIMEZONE: flatbuffers::VOffsetT = 6;
#[inline]
pub fn unit(&self) -> TimeUnit {
self._tab
.get::<TimeUnit>(Timestamp::VT_UNIT, Some(TimeUnit::SECOND))
.unwrap()
}
/// The time zone is a string indicating the name of a time zone, one of:
///
/// * As used in the Olson time zone database (the "tz database" or
/// "tzdata"), such as "America/New_York"
/// * An absolute time zone offset of the form +XX:XX or -XX:XX, such as +07:30
///
/// Whether a timezone string is present indicates different semantics about
/// the data:
///
/// * If the time zone is null or equal to an empty string, the data is "time
/// zone naive" and shall be displayed *as is* to the user, not localized
/// to the locale of the user. This data can be though of as UTC but
/// without having "UTC" as the time zone, it is not considered to be
/// localized to any time zone
///
/// * If the time zone is set to a valid value, values can be displayed as
/// "localized" to that time zone, even though the underlying 64-bit
/// integers are identical to the same data stored in UTC. Converting
/// between time zones is a metadata-only operation and does not change the
/// underlying values
#[inline]
pub fn timezone(&self) -> Option<&'a str> {
self._tab
.get::<flatbuffers::ForwardsUOffset<&str>>(Timestamp::VT_TIMEZONE, None)
}
}
impl flatbuffers::Verifiable for Timestamp<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<TimeUnit>(&"unit", Self::VT_UNIT, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>(
&"timezone",
Self::VT_TIMEZONE,
false,
)?
.finish();
Ok(())
}
}
pub struct TimestampArgs<'a> {
pub unit: TimeUnit,
pub timezone: Option<flatbuffers::WIPOffset<&'a str>>,
}
impl<'a> Default for TimestampArgs<'a> {
#[inline]
fn default() -> Self {
TimestampArgs {
unit: TimeUnit::SECOND,
timezone: None,
}
}
}
pub struct TimestampBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> TimestampBuilder<'a, 'b> {
#[inline]
pub fn add_unit(&mut self, unit: TimeUnit) {
self.fbb_
.push_slot::<TimeUnit>(Timestamp::VT_UNIT, unit, TimeUnit::SECOND);
}
#[inline]
pub fn add_timezone(&mut self, timezone: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
Timestamp::VT_TIMEZONE,
timezone,
);
}
#[inline]
pub fn new(
_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
) -> TimestampBuilder<'a, 'b> {
let start = _fbb.start_table();
TimestampBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Timestamp<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Timestamp<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Timestamp");
ds.field("unit", &self.unit());
ds.field("timezone", &self.timezone());
ds.finish()
}
}
pub enum IntervalOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct Interval<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Interval<'a> {
type Inner = Interval<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Interval<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Interval { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args IntervalArgs,
) -> flatbuffers::WIPOffset<Interval<'bldr>> {
let mut builder = IntervalBuilder::new(_fbb);
builder.add_unit(args.unit);
builder.finish()
}
pub const VT_UNIT: flatbuffers::VOffsetT = 4;
#[inline]
pub fn unit(&self) -> IntervalUnit {
self._tab
.get::<IntervalUnit>(Interval::VT_UNIT, Some(IntervalUnit::YEAR_MONTH))
.unwrap()
}
}
impl flatbuffers::Verifiable for Interval<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<IntervalUnit>(&"unit", Self::VT_UNIT, false)?
.finish();
Ok(())
}
}
pub struct IntervalArgs {
pub unit: IntervalUnit,
}
impl<'a> Default for IntervalArgs {
#[inline]
fn default() -> Self {
IntervalArgs {
unit: IntervalUnit::YEAR_MONTH,
}
}
}
pub struct IntervalBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> IntervalBuilder<'a, 'b> {
#[inline]
pub fn add_unit(&mut self, unit: IntervalUnit) {
self.fbb_.push_slot::<IntervalUnit>(
Interval::VT_UNIT,
unit,
IntervalUnit::YEAR_MONTH,
);
}
#[inline]
pub fn new(
_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
) -> IntervalBuilder<'a, 'b> {
let start = _fbb.start_table();
IntervalBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Interval<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Interval<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Interval");
ds.field("unit", &self.unit());
ds.finish()
}
}
pub enum DurationOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct Duration<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Duration<'a> {
type Inner = Duration<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Duration<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Duration { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args DurationArgs,
) -> flatbuffers::WIPOffset<Duration<'bldr>> {
let mut builder = DurationBuilder::new(_fbb);
builder.add_unit(args.unit);
builder.finish()
}
pub const VT_UNIT: flatbuffers::VOffsetT = 4;
#[inline]
pub fn unit(&self) -> TimeUnit {
self._tab
.get::<TimeUnit>(Duration::VT_UNIT, Some(TimeUnit::MILLISECOND))
.unwrap()
}
}
impl flatbuffers::Verifiable for Duration<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<TimeUnit>(&"unit", Self::VT_UNIT, false)?
.finish();
Ok(())
}
}
pub struct DurationArgs {
pub unit: TimeUnit,
}
impl<'a> Default for DurationArgs {
#[inline]
fn default() -> Self {
DurationArgs {
unit: TimeUnit::MILLISECOND,
}
}
}
pub struct DurationBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> DurationBuilder<'a, 'b> {
#[inline]
pub fn add_unit(&mut self, unit: TimeUnit) {
self.fbb_
.push_slot::<TimeUnit>(Duration::VT_UNIT, unit, TimeUnit::MILLISECOND);
}
#[inline]
pub fn new(
_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
) -> DurationBuilder<'a, 'b> {
let start = _fbb.start_table();
DurationBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Duration<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Duration<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Duration");
ds.field("unit", &self.unit());
ds.finish()
}
}
pub enum KeyValueOffset {}
#[derive(Copy, Clone, PartialEq)]
/// ----------------------------------------------------------------------
/// user defined key value pairs to add custom metadata to arrow
/// key namespacing is the responsibility of the user
pub struct KeyValue<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for KeyValue<'a> {
type Inner = KeyValue<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> KeyValue<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
KeyValue { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args KeyValueArgs<'args>,
) -> flatbuffers::WIPOffset<KeyValue<'bldr>> {
let mut builder = KeyValueBuilder::new(_fbb);
if let Some(x) = args.value {
builder.add_value(x);
}
if let Some(x) = args.key {
builder.add_key(x);
}
builder.finish()
}
pub const VT_KEY: flatbuffers::VOffsetT = 4;
pub const VT_VALUE: flatbuffers::VOffsetT = 6;
#[inline]
pub fn key(&self) -> Option<&'a str> {
self._tab
.get::<flatbuffers::ForwardsUOffset<&str>>(KeyValue::VT_KEY, None)
}
#[inline]
pub fn value(&self) -> Option<&'a str> {
self._tab
.get::<flatbuffers::ForwardsUOffset<&str>>(KeyValue::VT_VALUE, None)
}
}
impl flatbuffers::Verifiable for KeyValue<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>(
&"key",
Self::VT_KEY,
false,
)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>(
&"value",
Self::VT_VALUE,
false,
)?
.finish();
Ok(())
}
}
pub struct KeyValueArgs<'a> {
pub key: Option<flatbuffers::WIPOffset<&'a str>>,
pub value: Option<flatbuffers::WIPOffset<&'a str>>,
}
impl<'a> Default for KeyValueArgs<'a> {
#[inline]
fn default() -> Self {
KeyValueArgs {
key: None,
value: None,
}
}
}
pub struct KeyValueBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> KeyValueBuilder<'a, 'b> {
#[inline]
pub fn add_key(&mut self, key: flatbuffers::WIPOffset<&'b str>) {
self.fbb_
.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_KEY, key);
}
#[inline]
pub fn add_value(&mut self, value: flatbuffers::WIPOffset<&'b str>) {
self.fbb_
.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_VALUE, value);
}
#[inline]
pub fn new(
_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
) -> KeyValueBuilder<'a, 'b> {
let start = _fbb.start_table();
KeyValueBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<KeyValue<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for KeyValue<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("KeyValue");
ds.field("key", &self.key());
ds.field("value", &self.value());
ds.finish()
}
}
pub enum DictionaryEncodingOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct DictionaryEncoding<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for DictionaryEncoding<'a> {
type Inner = DictionaryEncoding<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> DictionaryEncoding<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
DictionaryEncoding { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args DictionaryEncodingArgs<'args>,
) -> flatbuffers::WIPOffset<DictionaryEncoding<'bldr>> {
let mut builder = DictionaryEncodingBuilder::new(_fbb);
builder.add_id(args.id);
if let Some(x) = args.indexType {
builder.add_indexType(x);
}
builder.add_dictionaryKind(args.dictionaryKind);
builder.add_isOrdered(args.isOrdered);
builder.finish()
}
pub const VT_ID: flatbuffers::VOffsetT = 4;
pub const VT_INDEXTYPE: flatbuffers::VOffsetT = 6;
pub const VT_ISORDERED: flatbuffers::VOffsetT = 8;
pub const VT_DICTIONARYKIND: flatbuffers::VOffsetT = 10;
/// The known dictionary id in the application where this data is used. In
/// the file or streaming formats, the dictionary ids are found in the
/// DictionaryBatch messages
#[inline]
pub fn id(&self) -> i64 {
self._tab
.get::<i64>(DictionaryEncoding::VT_ID, Some(0))
.unwrap()
}
/// The dictionary indices are constrained to be non-negative integers. If
/// this field is null, the indices must be signed int32. To maximize
/// cross-language compatibility and performance, implementations are
/// recommended to prefer signed integer types over unsigned integer types
/// and to avoid uint64 indices unless they are required by an application.
#[inline]
pub fn indexType(&self) -> Option<Int<'a>> {
self._tab.get::<flatbuffers::ForwardsUOffset<Int>>(
DictionaryEncoding::VT_INDEXTYPE,
None,
)
}
/// By default, dictionaries are not ordered, or the order does not have
/// semantic meaning. In some statistical, applications, dictionary-encoding
/// is used to represent ordered categorical data, and we provide a way to
/// preserve that metadata here
#[inline]
pub fn isOrdered(&self) -> bool {
self._tab
.get::<bool>(DictionaryEncoding::VT_ISORDERED, Some(false))
.unwrap()
}
#[inline]
pub fn dictionaryKind(&self) -> DictionaryKind {
self._tab
.get::<DictionaryKind>(
DictionaryEncoding::VT_DICTIONARYKIND,
Some(DictionaryKind::DenseArray),
)
.unwrap()
}
}
impl flatbuffers::Verifiable for DictionaryEncoding<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<i64>(&"id", Self::VT_ID, false)?
.visit_field::<flatbuffers::ForwardsUOffset<Int>>(
&"indexType",
Self::VT_INDEXTYPE,
false,
)?
.visit_field::<bool>(&"isOrdered", Self::VT_ISORDERED, false)?
.visit_field::<DictionaryKind>(
&"dictionaryKind",
Self::VT_DICTIONARYKIND,
false,
)?
.finish();
Ok(())
}
}
pub struct DictionaryEncodingArgs<'a> {
pub id: i64,
pub indexType: Option<flatbuffers::WIPOffset<Int<'a>>>,
pub isOrdered: bool,
pub dictionaryKind: DictionaryKind,
}
impl<'a> Default for DictionaryEncodingArgs<'a> {
#[inline]
fn default() -> Self {
DictionaryEncodingArgs {
id: 0,
indexType: None,
isOrdered: false,
dictionaryKind: DictionaryKind::DenseArray,
}
}
}
pub struct DictionaryEncodingBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> DictionaryEncodingBuilder<'a, 'b> {
#[inline]
pub fn add_id(&mut self, id: i64) {
self.fbb_.push_slot::<i64>(DictionaryEncoding::VT_ID, id, 0);
}
#[inline]
pub fn add_indexType(&mut self, indexType: flatbuffers::WIPOffset<Int<'b>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Int>>(
DictionaryEncoding::VT_INDEXTYPE,
indexType,
);
}
#[inline]
pub fn add_isOrdered(&mut self, isOrdered: bool) {
self.fbb_
.push_slot::<bool>(DictionaryEncoding::VT_ISORDERED, isOrdered, false);
}
#[inline]
pub fn add_dictionaryKind(&mut self, dictionaryKind: DictionaryKind) {
self.fbb_.push_slot::<DictionaryKind>(
DictionaryEncoding::VT_DICTIONARYKIND,
dictionaryKind,
DictionaryKind::DenseArray,
);
}
#[inline]
pub fn new(
_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
) -> DictionaryEncodingBuilder<'a, 'b> {
let start = _fbb.start_table();
DictionaryEncodingBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<DictionaryEncoding<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for DictionaryEncoding<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("DictionaryEncoding");
ds.field("id", &self.id());
ds.field("indexType", &self.indexType());
ds.field("isOrdered", &self.isOrdered());
ds.field("dictionaryKind", &self.dictionaryKind());
ds.finish()
}
}
pub enum FieldOffset {}
#[derive(Copy, Clone, PartialEq)]
/// ----------------------------------------------------------------------
/// A field represents a named column in a record / row batch or child of a
/// nested type.
pub struct Field<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Field<'a> {
type Inner = Field<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Field<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Field { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args FieldArgs<'args>,
) -> flatbuffers::WIPOffset<Field<'bldr>> {
let mut builder = FieldBuilder::new(_fbb);
if let Some(x) = args.custom_metadata {
builder.add_custom_metadata(x);
}
if let Some(x) = args.children {
builder.add_children(x);
}
if let Some(x) = args.dictionary {
builder.add_dictionary(x);
}
if let Some(x) = args.type_ {
builder.add_type_(x);
}
if let Some(x) = args.name {
builder.add_name(x);
}
builder.add_type_type(args.type_type);
builder.add_nullable(args.nullable);
builder.finish()
}
pub const VT_NAME: flatbuffers::VOffsetT = 4;
pub const VT_NULLABLE: flatbuffers::VOffsetT = 6;
pub const VT_TYPE_TYPE: flatbuffers::VOffsetT = 8;
pub const VT_TYPE_: flatbuffers::VOffsetT = 10;
pub const VT_DICTIONARY: flatbuffers::VOffsetT = 12;
pub const VT_CHILDREN: flatbuffers::VOffsetT = 14;
pub const VT_CUSTOM_METADATA: flatbuffers::VOffsetT = 16;
/// Name is not required, in i.e. a List
#[inline]
pub fn name(&self) -> Option<&'a str> {
self._tab
.get::<flatbuffers::ForwardsUOffset<&str>>(Field::VT_NAME, None)
}
/// Whether or not this field can contain nulls. Should be true in general.
#[inline]
pub fn nullable(&self) -> bool {
self._tab
.get::<bool>(Field::VT_NULLABLE, Some(false))
.unwrap()
}
#[inline]
pub fn type_type(&self) -> Type {
self._tab
.get::<Type>(Field::VT_TYPE_TYPE, Some(Type::NONE))
.unwrap()
}
/// This is the type of the decoded value if the field is dictionary encoded.
#[inline]
pub fn type_(&self) -> Option<flatbuffers::Table<'a>> {
self._tab
.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(
Field::VT_TYPE_,
None,
)
}
/// Present only if the field is dictionary encoded.
#[inline]
pub fn dictionary(&self) -> Option<DictionaryEncoding<'a>> {
self._tab
.get::<flatbuffers::ForwardsUOffset<DictionaryEncoding>>(
Field::VT_DICTIONARY,
None,
)
}
/// children apply only to nested data types like Struct, List and Union. For
/// primitive types children will have length 0.
#[inline]
pub fn children(
&self,
) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field<'a>>>> {
self._tab.get::<flatbuffers::ForwardsUOffset<
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field>>,
>>(Field::VT_CHILDREN, None)
}
/// User-defined metadata
#[inline]
pub fn custom_metadata(
&self,
) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
self._tab.get::<flatbuffers::ForwardsUOffset<
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
>>(Field::VT_CUSTOM_METADATA, None)
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_null(&self) -> Option<Null<'a>> {
if self.type_type() == Type::Null {
self.type_().map(Null::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_int(&self) -> Option<Int<'a>> {
if self.type_type() == Type::Int {
self.type_().map(Int::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_floating_point(&self) -> Option<FloatingPoint<'a>> {
if self.type_type() == Type::FloatingPoint {
self.type_().map(FloatingPoint::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_binary(&self) -> Option<Binary<'a>> {
if self.type_type() == Type::Binary {
self.type_().map(Binary::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_utf_8(&self) -> Option<Utf8<'a>> {
if self.type_type() == Type::Utf8 {
self.type_().map(Utf8::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_bool(&self) -> Option<Bool<'a>> {
if self.type_type() == Type::Bool {
self.type_().map(Bool::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_decimal(&self) -> Option<Decimal<'a>> {
if self.type_type() == Type::Decimal {
self.type_().map(Decimal::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_date(&self) -> Option<Date<'a>> {
if self.type_type() == Type::Date {
self.type_().map(Date::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_time(&self) -> Option<Time<'a>> {
if self.type_type() == Type::Time {
self.type_().map(Time::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_timestamp(&self) -> Option<Timestamp<'a>> {
if self.type_type() == Type::Timestamp {
self.type_().map(Timestamp::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_interval(&self) -> Option<Interval<'a>> {
if self.type_type() == Type::Interval {
self.type_().map(Interval::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_list(&self) -> Option<List<'a>> {
if self.type_type() == Type::List {
self.type_().map(List::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_struct_(&self) -> Option<Struct_<'a>> {
if self.type_type() == Type::Struct_ {
self.type_().map(Struct_::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_union(&self) -> Option<Union<'a>> {
if self.type_type() == Type::Union {
self.type_().map(Union::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_fixed_size_binary(&self) -> Option<FixedSizeBinary<'a>> {
if self.type_type() == Type::FixedSizeBinary {
self.type_().map(FixedSizeBinary::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_fixed_size_list(&self) -> Option<FixedSizeList<'a>> {
if self.type_type() == Type::FixedSizeList {
self.type_().map(FixedSizeList::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_map(&self) -> Option<Map<'a>> {
if self.type_type() == Type::Map {
self.type_().map(Map::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_duration(&self) -> Option<Duration<'a>> {
if self.type_type() == Type::Duration {
self.type_().map(Duration::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_large_binary(&self) -> Option<LargeBinary<'a>> {
if self.type_type() == Type::LargeBinary {
self.type_().map(LargeBinary::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_large_utf_8(&self) -> Option<LargeUtf8<'a>> {
if self.type_type() == Type::LargeUtf8 {
self.type_().map(LargeUtf8::init_from_table)
} else {
None
}
}
#[inline]
#[allow(non_snake_case)]
pub fn type_as_large_list(&self) -> Option<LargeList<'a>> {
if self.type_type() == Type::LargeList {
self.type_().map(LargeList::init_from_table)
} else {
None
}
}
}
impl flatbuffers::Verifiable for Field<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>(&"name", Self::VT_NAME, false)?
.visit_field::<bool>(&"nullable", Self::VT_NULLABLE, false)?
.visit_union::<Type, _>(&"type_type", Self::VT_TYPE_TYPE, &"type_", Self::VT_TYPE_, false, |key, v, pos| {
match key {
Type::Null => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Null>>("Type::Null", pos),
Type::Int => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Int>>("Type::Int", pos),
Type::FloatingPoint => v.verify_union_variant::<flatbuffers::ForwardsUOffset<FloatingPoint>>("Type::FloatingPoint", pos),
Type::Binary => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Binary>>("Type::Binary", pos),
Type::Utf8 => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Utf8>>("Type::Utf8", pos),
Type::Bool => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Bool>>("Type::Bool", pos),
Type::Decimal => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Decimal>>("Type::Decimal", pos),
Type::Date => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Date>>("Type::Date", pos),
Type::Time => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Time>>("Type::Time", pos),
Type::Timestamp => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Timestamp>>("Type::Timestamp", pos),
Type::Interval => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Interval>>("Type::Interval", pos),
Type::List => v.verify_union_variant::<flatbuffers::ForwardsUOffset<List>>("Type::List", pos),
Type::Struct_ => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Struct_>>("Type::Struct_", pos),
Type::Union => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Union>>("Type::Union", pos),
Type::FixedSizeBinary => v.verify_union_variant::<flatbuffers::ForwardsUOffset<FixedSizeBinary>>("Type::FixedSizeBinary", pos),
Type::FixedSizeList => v.verify_union_variant::<flatbuffers::ForwardsUOffset<FixedSizeList>>("Type::FixedSizeList", pos),
Type::Map => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Map>>("Type::Map", pos),
Type::Duration => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Duration>>("Type::Duration", pos),
Type::LargeBinary => v.verify_union_variant::<flatbuffers::ForwardsUOffset<LargeBinary>>("Type::LargeBinary", pos),
Type::LargeUtf8 => v.verify_union_variant::<flatbuffers::ForwardsUOffset<LargeUtf8>>("Type::LargeUtf8", pos),
Type::LargeList => v.verify_union_variant::<flatbuffers::ForwardsUOffset<LargeList>>("Type::LargeList", pos),
_ => Ok(()),
}
})?
.visit_field::<flatbuffers::ForwardsUOffset<DictionaryEncoding>>(&"dictionary", Self::VT_DICTIONARY, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Field>>>>(&"children", Self::VT_CHILDREN, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>>>(&"custom_metadata", Self::VT_CUSTOM_METADATA, false)?
.finish();
Ok(())
}
}
pub struct FieldArgs<'a> {
pub name: Option<flatbuffers::WIPOffset<&'a str>>,
pub nullable: bool,
pub type_type: Type,
pub type_: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
pub dictionary: Option<flatbuffers::WIPOffset<DictionaryEncoding<'a>>>,
pub children: Option<
flatbuffers::WIPOffset<
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field<'a>>>,
>,
>,
pub custom_metadata: Option<
flatbuffers::WIPOffset<
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>,
>,
>,
}
impl<'a> Default for FieldArgs<'a> {
#[inline]
fn default() -> Self {
FieldArgs {
name: None,
nullable: false,
type_type: Type::NONE,
type_: None,
dictionary: None,
children: None,
custom_metadata: None,
}
}
}
pub struct FieldBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> FieldBuilder<'a, 'b> {
#[inline]
pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_
.push_slot_always::<flatbuffers::WIPOffset<_>>(Field::VT_NAME, name);
}
#[inline]
pub fn add_nullable(&mut self, nullable: bool) {
self.fbb_
.push_slot::<bool>(Field::VT_NULLABLE, nullable, false);
}
#[inline]
pub fn add_type_type(&mut self, type_type: Type) {
self.fbb_
.push_slot::<Type>(Field::VT_TYPE_TYPE, type_type, Type::NONE);
}
#[inline]
pub fn add_type_(
&mut self,
type_: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>,
) {
self.fbb_
.push_slot_always::<flatbuffers::WIPOffset<_>>(Field::VT_TYPE_, type_);
}
#[inline]
pub fn add_dictionary(
&mut self,
dictionary: flatbuffers::WIPOffset<DictionaryEncoding<'b>>,
) {
self.fbb_
.push_slot_always::<flatbuffers::WIPOffset<DictionaryEncoding>>(
Field::VT_DICTIONARY,
dictionary,
);
}
#[inline]
pub fn add_children(
&mut self,
children: flatbuffers::WIPOffset<
flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Field<'b>>>,
>,
) {
self.fbb_
.push_slot_always::<flatbuffers::WIPOffset<_>>(Field::VT_CHILDREN, children);
}
#[inline]
pub fn add_custom_metadata(
&mut self,
custom_metadata: flatbuffers::WIPOffset<
flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
>,
) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
Field::VT_CUSTOM_METADATA,
custom_metadata,
);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FieldBuilder<'a, 'b> {
let start = _fbb.start_table();
FieldBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Field<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Field<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Field");
ds.field("name", &self.name());
ds.field("nullable", &self.nullable());
ds.field("type_type", &self.type_type());
match self.type_type() {
Type::Null => {
if let Some(x) = self.type_as_null() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::Int => {
if let Some(x) = self.type_as_int() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::FloatingPoint => {
if let Some(x) = self.type_as_floating_point() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::Binary => {
if let Some(x) = self.type_as_binary() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::Utf8 => {
if let Some(x) = self.type_as_utf_8() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::Bool => {
if let Some(x) = self.type_as_bool() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::Decimal => {
if let Some(x) = self.type_as_decimal() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::Date => {
if let Some(x) = self.type_as_date() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::Time => {
if let Some(x) = self.type_as_time() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::Timestamp => {
if let Some(x) = self.type_as_timestamp() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::Interval => {
if let Some(x) = self.type_as_interval() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::List => {
if let Some(x) = self.type_as_list() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::Struct_ => {
if let Some(x) = self.type_as_struct_() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::Union => {
if let Some(x) = self.type_as_union() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::FixedSizeBinary => {
if let Some(x) = self.type_as_fixed_size_binary() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::FixedSizeList => {
if let Some(x) = self.type_as_fixed_size_list() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::Map => {
if let Some(x) = self.type_as_map() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::Duration => {
if let Some(x) = self.type_as_duration() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::LargeBinary => {
if let Some(x) = self.type_as_large_binary() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::LargeUtf8 => {
if let Some(x) = self.type_as_large_utf_8() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
Type::LargeList => {
if let Some(x) = self.type_as_large_list() {
ds.field("type_", &x)
} else {
ds.field(
"type_",
&"InvalidFlatbuffer: Union discriminant does not match value.",
)
}
}
_ => {
let x: Option<()> = None;
ds.field("type_", &x)
}
};
ds.field("dictionary", &self.dictionary());
ds.field("children", &self.children());
ds.field("custom_metadata", &self.custom_metadata());
ds.finish()
}
}
pub enum SchemaOffset {}
#[derive(Copy, Clone, PartialEq)]
/// ----------------------------------------------------------------------
/// A Schema describes the columns in a row batch
pub struct Schema<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for Schema<'a> {
type Inner = Schema<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf, loc },
}
}
}
impl<'a> Schema<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
Schema { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args SchemaArgs<'args>,
) -> flatbuffers::WIPOffset<Schema<'bldr>> {
let mut builder = SchemaBuilder::new(_fbb);
if let Some(x) = args.features {
builder.add_features(x);
}
if let Some(x) = args.custom_metadata {
builder.add_custom_metadata(x);
}
if let Some(x) = args.fields {
builder.add_fields(x);
}
builder.add_endianness(args.endianness);
builder.finish()
}
pub const VT_ENDIANNESS: flatbuffers::VOffsetT = 4;
pub const VT_FIELDS: flatbuffers::VOffsetT = 6;
pub const VT_CUSTOM_METADATA: flatbuffers::VOffsetT = 8;
pub const VT_FEATURES: flatbuffers::VOffsetT = 10;
/// endianness of the buffer
/// it is Little Endian by default
/// if endianness doesn't match the underlying system then the vectors need to be converted
#[inline]
pub fn endianness(&self) -> Endianness {
self._tab
.get::<Endianness>(Schema::VT_ENDIANNESS, Some(Endianness::Little))
.unwrap()
}
#[inline]
pub fn fields(
&self,
) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field<'a>>>> {
self._tab.get::<flatbuffers::ForwardsUOffset<
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field>>,
>>(Schema::VT_FIELDS, None)
}
#[inline]
pub fn custom_metadata(
&self,
) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
self._tab.get::<flatbuffers::ForwardsUOffset<
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
>>(Schema::VT_CUSTOM_METADATA, None)
}
/// Features used in the stream/file.
#[inline]
pub fn features(&self) -> Option<flatbuffers::Vector<'a, Feature>> {
self._tab
.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, Feature>>>(
Schema::VT_FEATURES,
None,
)
}
}
impl flatbuffers::Verifiable for Schema<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier,
pos: usize,
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<Endianness>(&"endianness", Self::VT_ENDIANNESS, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Field>>>>(&"fields", Self::VT_FIELDS, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>>>(&"custom_metadata", Self::VT_CUSTOM_METADATA, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, Feature>>>(&"features", Self::VT_FEATURES, false)?
.finish();
Ok(())
}
}
pub struct SchemaArgs<'a> {
pub endianness: Endianness,
pub fields: Option<
flatbuffers::WIPOffset<
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field<'a>>>,
>,
>,
pub custom_metadata: Option<
flatbuffers::WIPOffset<
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>,
>,
>,
pub features: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, Feature>>>,
}
impl<'a> Default for SchemaArgs<'a> {
#[inline]
fn default() -> Self {
SchemaArgs {
endianness: Endianness::Little,
fields: None,
custom_metadata: None,
features: None,
}
}
}
pub struct SchemaBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> SchemaBuilder<'a, 'b> {
#[inline]
pub fn add_endianness(&mut self, endianness: Endianness) {
self.fbb_.push_slot::<Endianness>(
Schema::VT_ENDIANNESS,
endianness,
Endianness::Little,
);
}
#[inline]
pub fn add_fields(
&mut self,
fields: flatbuffers::WIPOffset<
flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Field<'b>>>,
>,
) {
self.fbb_
.push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_FIELDS, fields);
}
#[inline]
pub fn add_custom_metadata(
&mut self,
custom_metadata: flatbuffers::WIPOffset<
flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
>,
) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
Schema::VT_CUSTOM_METADATA,
custom_metadata,
);
}
#[inline]
pub fn add_features(
&mut self,
features: flatbuffers::WIPOffset<flatbuffers::Vector<'b, Feature>>,
) {
self.fbb_
.push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_FEATURES, features);
}
#[inline]
pub fn new(
_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
) -> SchemaBuilder<'a, 'b> {
let start = _fbb.start_table();
SchemaBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<Schema<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl std::fmt::Debug for Schema<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut ds = f.debug_struct("Schema");
ds.field("endianness", &self.endianness());
ds.field("fields", &self.fields());
ds.field("custom_metadata", &self.custom_metadata());
ds.field("features", &self.features());
ds.finish()
}
}
#[inline]
#[deprecated(since = "2.0.0", note = "Deprecated in favor of `root_as...` methods.")]
pub fn get_root_as_schema<'a>(buf: &'a [u8]) -> Schema<'a> {
unsafe { flatbuffers::root_unchecked::<Schema<'a>>(buf) }
}
#[inline]
#[deprecated(since = "2.0.0", note = "Deprecated in favor of `root_as...` methods.")]
pub fn get_size_prefixed_root_as_schema<'a>(buf: &'a [u8]) -> Schema<'a> {
unsafe { flatbuffers::size_prefixed_root_unchecked::<Schema<'a>>(buf) }
}
#[inline]
/// Verifies that a buffer of bytes contains a `Schema`
/// and returns it.
/// Note that verification is still experimental and may not
/// catch every error, or be maximally performant. For the
/// previous, unchecked, behavior use
/// `root_as_schema_unchecked`.
pub fn root_as_schema(buf: &[u8]) -> Result<Schema, flatbuffers::InvalidFlatbuffer> {
flatbuffers::root::<Schema>(buf)
}
#[inline]
/// Verifies that a buffer of bytes contains a size prefixed
/// `Schema` and returns it.
/// Note that verification is still experimental and may not
/// catch every error, or be maximally performant. For the
/// previous, unchecked, behavior use
/// `size_prefixed_root_as_schema_unchecked`.
pub fn size_prefixed_root_as_schema(
buf: &[u8],
) -> Result<Schema, flatbuffers::InvalidFlatbuffer> {
flatbuffers::size_prefixed_root::<Schema>(buf)
}
#[inline]
/// Verifies, with the given options, that a buffer of bytes
/// contains a `Schema` and returns it.
/// Note that verification is still experimental and may not
/// catch every error, or be maximally performant. For the
/// previous, unchecked, behavior use
/// `root_as_schema_unchecked`.
pub fn root_as_schema_with_opts<'b, 'o>(
opts: &'o flatbuffers::VerifierOptions,
buf: &'b [u8],
) -> Result<Schema<'b>, flatbuffers::InvalidFlatbuffer> {
flatbuffers::root_with_opts::<Schema<'b>>(opts, buf)
}
#[inline]
/// Verifies, with the given verifier options, that a buffer of
/// bytes contains a size prefixed `Schema` and returns
/// it. Note that verification is still experimental and may not
/// catch every error, or be maximally performant. For the
/// previous, unchecked, behavior use
/// `root_as_schema_unchecked`.
pub fn size_prefixed_root_as_schema_with_opts<'b, 'o>(
opts: &'o flatbuffers::VerifierOptions,
buf: &'b [u8],
) -> Result<Schema<'b>, flatbuffers::InvalidFlatbuffer> {
flatbuffers::size_prefixed_root_with_opts::<Schema<'b>>(opts, buf)
}
#[inline]
/// Assumes, without verification, that a buffer of bytes contains a Schema and returns it.
/// # Safety
/// Callers must trust the given bytes do indeed contain a valid `Schema`.
pub unsafe fn root_as_schema_unchecked(buf: &[u8]) -> Schema {
flatbuffers::root_unchecked::<Schema>(buf)
}
#[inline]
/// Assumes, without verification, that a buffer of bytes contains a size prefixed Schema and returns it.
/// # Safety
/// Callers must trust the given bytes do indeed contain a valid size prefixed `Schema`.
pub unsafe fn size_prefixed_root_as_schema_unchecked(buf: &[u8]) -> Schema {
flatbuffers::size_prefixed_root_unchecked::<Schema>(buf)
}
#[inline]
pub fn finish_schema_buffer<'a, 'b>(
fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
root: flatbuffers::WIPOffset<Schema<'a>>,
) {
fbb.finish(root, None);
}
#[inline]
pub fn finish_size_prefixed_schema_buffer<'a, 'b>(
fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
root: flatbuffers::WIPOffset<Schema<'a>>,
) {
fbb.finish_size_prefixed(root, None);
}
| rust |
package packetdeserializers
import (
"encoding/binary"
"errors"
"github.com/piot/hasty-protocol/commands"
"github.com/piot/hasty-protocol/packet"
)
// ToCreateStream : Path to create
func ToCreateStream(in packet.Packet) (commands.CreateStream, error) {
if in.Type() != packet.CreateStream {
return commands.CreateStream{}, errors.New("Illegal packet type")
}
payload := in.Payload()
pos := 0
requestID := binary.BigEndian.Uint64(payload[pos : pos+8])
pos += 8
opath, _, err := ToOpath(payload[pos:])
if err != nil {
return commands.CreateStream{}, err
}
createStream := commands.NewCreateStream(requestID, opath)
return createStream, nil
}
| go |
Hindi television’s famous and controversial comedian Kapil Sharma is attempting yet another comeback as a television show host with a fresh edition of The Kapil Sharma Show on Sony Entertainment Television. A promo for a new season of the widely popular comedy chat show, which went off-air in August 2017, was released on Tuesday. The airdate of the show is yet to be announced.
“Where can a grandson and his grandfather generally be seen together?” the narrator asks as the teaser opens. “Which two hours in the day prompt the people of India to come together forgetting their differences?. Who is that person who has managed to become a part of the lives of people who have just a few more days to live?” There was only one show on television that made the entire country laugh together, the teaser declares, followed by snapshots of people watching Sharma on their televisions and mobile phones.
SET’s The Kapil Sharma Show had gone off-air following reports of Sharma’s ill-health. This was a few months after he parted ways with co-star Sunil Grover after a long and public dispute. Sharma attempted to make a comeback in March 2018 with another chat show titled Family Time with Kapil Sharma. However, following a lukewarm response from the audience and allegations of Sharma cancelling shoots with guests at the last minute, the channel pulled the show.
| english |
<reponame>maikealame/laravel-auto-where
["html", ["blockquote", ["p", "Markdown indents blockquotes a couple of spaces\u000a necessitating some tweaks for pre-blocks in that\u000a blockquote:"],
["pre", ["code", "here is a check\u000afor that\u000a"]]]]
| json |
<reponame>MatanyaLoewenthal/MatanyaLoewenthal.github.io
## Contact Info
Send me an email!
<form id="fs-frm" name="simple-contact-form" accept-charset="utf-8" action="https://formspree.io/f/xnqlgdad" method="post">
<fieldset id="fs-frm-inputs">
<p>
<label for="full-name">Full Name</label>
</p><p>
<input type="text" name="name" id="full-name" placeholder="<NAME>" required="">
</p><p>
<label for="email-address">Email Address</label>
</p><p>
<input type="email" name="_replyto" id="email-address" placeholder="<EMAIL>" required="">
</p><p>
<label for="message">Message</label>
</p><p>
<textarea rows="5" name="message" id="message" required=""></textarea>
<input type="hidden" name="_subject" id="email-subject" value="Contact Form Submission">
</p>
</fieldset>
<input type="submit" value="Submit">
</form>
| markdown |
- Took local bus from Sindhi Camp. Can go directly there and take the ongoing bus.
-I took 9 o’clock bus. Pretty comfortable and must say, Rajasthan local bus drivers are so punctual!
-Distance- 5 h 53 min (311.2 km)
- The main spot of Chittorgarh is it’s Fort. So prefer staying in the fort rather than staying down in the city.
-From Bus station, got an Auto who charged 150/- to drop me up in the fort.
-Can use Gps or can ask local people about the location.
-Though it looks a little congested from front but don’t be disappointed. LOOK AT THE INSIDE PICTURES!
-Had one of the best experience in this hotel as it was beautiful from inside, quite vintage but royal.
What to Order?
-Ask for Masala chai & Maggie. Worth every penny!!
-Also at night if you want to have local home food, you need to ask them a little prior so that they can cook nicely.
( Only complaint from the hotel was their delayed service. So better order 2 hours prior to get it on time !!! )
Can’t help but click the interiors of this hotel.
Beautiful & so peaceful.
So if you ask me, you can pretty up cover whole Chittorgarh in one day!
How to Travel in the city ?
-You need to get rented Scooty to roam around the fort and not go breathless,literally.
-Also get a registered guide. It good to roam while knowing the history behind it.
So we covered up all famous places along with a local guide.
-Sound & light show ( I skipped this one)
What to eat locally ?
It’s a very full-filling and is a mixture of corn, curd & some spices.
How to Return ?
Best way is to take a local bus for Jaipur.
* Nearby places to Visit from Chittorgargh !
( via bus seems a perfect & time saving option)
( There is no direct buses or train for Kumbalgarh, so you may take a bus for Udaipur and then from there you can take a Taxi or local bus to go further for Kumbalgarh )
| english |
<filename>packages/documentation/src/components/PackageSassDoc/Find.tsx
import React, {
ReactElement,
ReactNode,
useCallback,
useMemo,
useState,
} from "react";
import { useRouter } from "next/router";
import { AutoComplete, FilterFunction } from "@react-md/autocomplete";
import { Button } from "@react-md/button";
import { Dialog } from "@react-md/dialog";
import { SearchSVGIcon } from "@react-md/material-icons";
import {
ABOVE_CENTER_ANCHOR,
caseInsensitiveFilter,
useAppSize,
} from "@react-md/utils";
import Code from "components/Code/Code";
import { FormattedSassDocItem, FormattedVariableItem } from "utils/sassdoc";
import getId from "./getId";
import getType from "./getType";
import styles from "./Find.module.scss";
interface FindProps {
items: FormattedSassDocItem[];
}
export default function Find({ items }: FindProps): ReactElement | null {
const router = useRouter();
const [visible, setVisible] = useState(false);
const searchables = useMemo(
() =>
items.map((item) => {
const { name, packageName } = item;
const type = getType(item.type);
let secondaryText: ReactNode = item.type;
if (type === "variable") {
const { compiled, value } = item as FormattedVariableItem;
const display = compiled || value;
if (!/\r?\n/.test(display)) {
secondaryText = <Code>{display}</Code>;
}
}
return {
name,
to: getId(name, type, packageName),
secondaryText,
};
}),
[items]
);
const filter = useCallback<FilterFunction>((query, data, options) => {
const filtered = caseInsensitiveFilter(query, data, options);
if (filtered.length) {
return filtered;
}
return ["No matches..."];
}, []);
const { isDesktop } = useAppSize();
if (!isDesktop) {
return null;
}
return (
<>
<Button
id="sassdoc-find"
aria-label="Find in page"
onClick={() => setVisible(!visible)}
buttonType="icon"
theme="secondary"
themeType="contained"
floating="bottom-right"
>
<SearchSVGIcon />
</Button>
<Dialog
id="sassdoc-autocomplete-dialog"
aria-label="Search for SassDoc"
visible={visible}
onRequestClose={() => setVisible(false)}
type="custom"
className={styles.dialog}
>
<AutoComplete
id="sassdoc-autocomplete"
portal
data={searchables}
labelKey="name"
valueKey="name"
placeholder="Search..."
filter={filter}
listboxClassName={styles.listbox}
clearOnAutoComplete
onAutoComplete={(data) => {
const result = data.result as typeof searchables[0];
// the router.asPath seems to break while hot reloading
const href = router.asPath.replace(/#.*$/, "");
router.push(`${href}#${result.to}`);
setVisible(false);
}}
anchor={ABOVE_CENTER_ANCHOR}
yMargin={12}
onKeyDown={(event) => {
if (event.key === "Tab") {
event.preventDefault();
}
}}
/>
</Dialog>
</>
);
}
| typescript |
Matter under CHAITRA 9, 1905 (SAKA) D.G. (Genl.) 1983-84 Rule 377 — M. of Food & Civil Supplies
अतः सरकार से आग्रह है कि सरकार समान कार्य के लिए समान वेतन की नीति निश्चित करे और रक्षा वाहिनी के जवानों को दैनिक भत्ता पच्चोस रुपया स्वीकृत करे। रक्षा वाहिनी के जवान जो काफी दिनों से सेवा कर रहे हैं उनकी सेवा को स्थाई करे जिससे वे भुखमरी के शिकार नहीं हों ।
(viii) NEED TO ABOLISH SYSTEM OF ENGAGING STAFF ON EXTRA DEPARTMENTAL BASIS IN P&T DEPARTMENT
SHRI SUSHIL BHATTACHARYA
( Burdwan): Sir, out of a total of about eight lakh employees serving the Post and Telegraph Department, nearly three lakhs are those halpless EDAS, receiving a monthly allowance, varying from Rs. 118 to 172, for working generally three to five hours a day. They are not paid if they work beyond the scheduled hours, which they have to do not infrequently, and of course they are not eligible for promotion even after rendering service in the department for 30 years or over. No regular procedure is followed, either for their appointment or dismissal, and the EDA are deprived of all the facilities enjoyed by regular staff, though the nature of work rendered by both the categories is the same. The Rajan Committee recommended in their report, almost a quarter of a century earlier, that EDAS should be recognised in a phased manner, as regular staff. The Supreme Court also gave the verdict that they were civil servants and not casual workers. But no step has yet been taken to recognise the EDAS departmental staff. They organised a 1,000 mile padajatra, from 10th to 25th March, from different parts of West Bengal to Calcutta, to place their demand before the Prime Minister of India in a memorandum, which was submitted to the Governor on
25th March. 1983. Their immediate demand is for the abolition of the system of engaging staff on extra-departmental basis. In the circumstances, I request the Gov ernment to take an immediate action.
MR. DEPUTY-SPEAKER: Now we will take up the next item.
SHRIKRISHNA CHANDRA HALDER (Durgapur): Sir, I have a small submission to make.
MR. DEPUTY-SPEAKER:
given notice ?
Have you
SHRI KRISHNA CHANDRA HALLER: No, Sir. Hear me for a minute. More than several hundred seamen under the leadership of Forward Seamens' Orgacome nisations have from different parts of our country to stage a dharna in front of the Prime Minister's house. Sir, through you, I would request the Prime Minister, or the Minister of Transport and Shipping, to meet their representatives and try to redress their grievances. This is my submission.
DEMANDS FOR GRANTS (GENERAL), 1983-84 –Contd.
MINISTRY OF FOOD AND CIVIL SUPPLIES Contd.
MR_DEPUTY-SPEAKER: The House will now take up further discussion and voting on the Demands for Grants under the control of the Ministry of Food and Civil Supplies, Shri K. C. Pandey was on his legs. He has already taken 8 minutes. He has now got 120 seconds.
श्री कृष्ण चन्द्र पाण्डे (खलीलाबाद) : माननीय उपाध्यक्ष महोदय, मैं ता० 24 के अपने अपूर्ण भाषण को पूर्ण करने के लिये खड़ा हुआ हूँ | मान्यवर, ता० 24 को मैंने सदन का ध्यान आकृष्ट कराया था कि उत्तर प्रदेश में गन्ना किसानों की बड़ी ही दुर्दशा हो रही है । 20 करोड़ रुपया उत्तर प्रदेश सरकार ने भारत सरकार से मांगा था, तरन्तु अभी तक कोई फैसला नहीं हो पाया है । इतना ही नहीं मान्यवर, जो भारत सरकार की पांच मिलें हैं वे भी किसानों को उचित मूल्य
| english |
{
"name": "@fluencelabs/fluence-network-environment",
"version": "1.0.0",
"description": "Fluence network environments addresses",
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"scripts": {
"build": "tsc"
},
"repository": "https://github.com/fluencelabs/fluence-network-environment",
"author": "<NAME>",
"license": "Apache-2.0",
"dependencies": {},
"devDependencies": {
"typescript": "3.9.5"
},
"private": false
}
| json |
{
"projectName": "html-wssupport-2021",
"pages": {
"index.html": "Главная",
"faq.html": "Вопросы и ответы",
"cases.html": "Кейсы",
"cases-detail.html": "Детальная кейса",
"partners.html": "Партнерская программа",
"blog.html": "Блог",
"store.html": "Магазин задач",
"store-detail.html": "Магазин задач детально",
"contacts.html": "Контакты",
"form-states.html": "Состояния форм",
"market.html": "Как подключить интернет-магазин на 1С-Битрикс к Яндекс.Маркет",
"update-bitrix.html": "Чем опасно самостоятельное обновление «1С-Битрикс»",
"task-evaluation.html": "Как мы проводим оценку задач",
"google-page.html": "Google Page Insights: что это и как улучшить показатели своего сайта"
}
} | json |
/*=========================================================================
Program: ALBA (Agile Library for Biomedical Applications)
Module: albaWizardWaitOpTest
Authors: <NAME>
Copyright (c) BIC
All rights reserved. See Copyright.txt or
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "albaDefines.h"
//----------------------------------------------------------------------------
// NOTE: Every CPP file in the ALBA must include "albaDefines.h" as first.
// This force to include Window,wxWidgets and VTK exactly in this order.
// Failing in doing this will result in a run-time error saying:
// "Failure#0: The value of ESP was not properly saved across a function call"
//----------------------------------------------------------------------------
#include "albaVisualPipesTests.h"
#include "albaFakeLogicForTest.h"
#include "albaPipeCompoundTest.h"
#include "albaPipeCompoundVolumeDRRTest.h"
#include "albaPipeCompoundVolumeIsosurfaceTest.h"
#include "albaPipeCompoundVolumeMIPTest.h"
#include "albaPipeCompoundVolumeTest.h"
#include "albaPipeCompoundVolumeVRTest.h"
#include "albaPipeCompoundVolumefixedScalarsTest.h"
#include "albaPipeDensityDistanceTest.h"
#include "albaPipeFactoryVMETest.h"
#include "albaPipeGizmoTest.h"
#include "albaPipeGraphTest.h"
#include "albaPipeImage3DTest.h"
#include "albaPipeIsosurfaceGPUTest.h"
#include "albaPipeIsosurfaceTest.h"
#include "albaPipeLandmarkCloudTest.h"
#include "albaPipeMeshSliceTest.h"
#include "albaPipeMeshTest.h"
#include "albaPipeMeterTest.h"
#include "albaPipePointSetTest.h"
#include "albaPipePolylineGraphEditorTest.h"
#include "albaPipePolylineSliceTest.h"
#include "albaPipePolylineTest.h"
#include "albaPipeRayCastTest.h"
#include "albaPipeScalarMatrixTest.h"
#include "albaPipeScalarTest.h"
#include "albaPipeSliceTest.h"
#include "albaPipeSurfaceEditorTest.h"
#include "albaPipeSurfaceSliceTest.h"
#include "albaPipeSurfaceTest.h"
#include "albaPipeSurfaceTexturedTest.h"
#include "albaPipeTensorFieldGlyphsTest.h"
#include "albaPipeTensorFieldSliceTest.h"
#include "albaPipeTensorFieldSurfaceTest.h"
#include "albaPipeTensorFieldTest.h"
#include "albaPipeTrajectoriesTest.h"
#include "albaPipeVectorFieldGlyphsTest.h"
#include "albaPipeVectorFieldMapWithArrowsTest.h"
#include "albaPipeVectorFieldSliceTest.h"
#include "albaPipeVectorFieldSurfaceTest.h"
#include "albaPipeVectorFieldTest.h"
#include "albaPipeVectorTest.h"
#include "albaPipeVolumeDRRTest.h"
#include "albaPipeVolumeMIPTest.h"
#include "albaPipeVolumeProjectedTest.h"
#include "albaPipeVolumeArbSliceTest.h"
#include "albaPipeVolumeOrthoSliceTest.h"
#include "albaPipeWrappedMeterTest.h"
#include "albaServiceLocator.h"
#include "albaVisualPipePolylineGraphTest.h"
#include "albaVisualPipeSlicerSliceTest.h"
#include "albaVisualPipeVolumeRayCastingTest.h"
#include "albaPipePointCloudTest.h"
#include <cppunit/BriefTestProgressListener.h>
#include <cppunit/CompilerOutputter.h>
#include <cppunit/TestResultCollector.h>
#include <cppunit/TestRunner.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include "vtkFileOutputWindow.h"
//-------------------------------------------------------------------------
albaCxxTypeMacro(albaClientData);
//-------------------------------------------------------------------------
//Main Test Executor
int main( int argc, char* argv[] )
{
// Create log of VTK error messages
vtkALBASmartPointer<vtkFileOutputWindow> log;
vtkFileOutputWindow::SetInstance(log);
albaString logPath = wxGetWorkingDirectory();
logPath << "\\VTKTest.log";
log->SetFileName(logPath);
// Create the event manager and test controller
CPPUNIT_NS::TestResult controller;
// Add a listener that collects test result
CPPUNIT_NS::TestResultCollector result;
controller.addListener( &result );
// Add a listener that print dots as test run.
CPPUNIT_NS::BriefTestProgressListener progress;
controller.addListener( &progress );
albaFakeLogicForTest *logic = new albaFakeLogicForTest();
albaServiceLocator::SetLogicManager(logic);
// Add the top suite to the test runner
CPPUNIT_NS::TestRunner runner;
runner.addTest(albaPipeMeshTest::suite());
runner.addTest(albaPipeSurfaceTest::suite());
runner.addTest(albaPipePointCloudTest::suite());
runner.addTest(albaPipeGizmoTest::suite());
runner.addTest(albaPipeSurfaceTexturedTest::suite());
runner.addTest(albaPipeScalarTest::suite());
runner.addTest(albaPipeImage3DTest::suite());
runner.addTest(albaPipeIsosurfaceTest::suite());
runner.addTest(albaPipePointSetTest::suite());
runner.addTest(albaPipeFactoryVMETest::suite());
runner.addTest(albaPipeIsosurfaceGPUTest::suite());
runner.addTest(albaPipePolylineTest::suite());
runner.addTest(albaPipeLandmarkCloudTest::suite());
runner.addTest(albaPipeVectorTest::suite());
runner.addTest(albaPipeMeterTest::suite());
runner.addTest(albaPipeVolumeProjectedTest::suite());
runner.addTest(albaPipeScalarMatrixTest::suite());
runner.addTest(albaVisualPipeVolumeRayCastingTest::suite());
runner.addTest(albaPipeVolumeMIPTest::suite());
runner.addTest(albaPipeVolumeDRRTest::suite());
runner.addTest(albaPipePolylineGraphEditorTest::suite());
runner.addTest(albaPipeMeshSliceTest::suite());
runner.addTest(albaPipeSurfaceSliceTest::suite());
runner.addTest(albaPipeVolumeOrthoSliceTest::suite());
runner.addTest(albaPipeVolumeArbSliceTest::suite());
runner.addTest(albaPipeTrajectoriesTest::suite());
runner.addTest(albaPipeSliceTest::suite());
runner.addTest(albaPipePolylineSliceTest::suite());
runner.addTest(albaPipeWrappedMeterTest::suite());
runner.addTest(albaPipeDensityDistanceTest::suite());
runner.addTest(albaPipeGraphTest::suite());
runner.addTest(albaPipeCompoundTest::suite());
runner.addTest(albaPipeCompoundVolumeTest::suite());
runner.addTest(albaPipeCompoundVolumeFixedScalarsTest::suite());
runner.addTest(albaVisualPipePolylineGraphTest::suite());
runner.addTest(albaPipeSurfaceEditorTest::suite());
runner.addTest(albaPipeTensorFieldSurfaceTest::suite());
runner.addTest(albaPipeVectorFieldSurfaceTest::suite());
runner.addTest(albaPipeVectorFieldGlyphsTest::suite());
runner.addTest(albaPipeVectorFieldMapWithArrowsTest::suite());
runner.addTest(albaPipeTensorFieldSliceTest::suite());
runner.addTest(albaPipeVectorFieldSliceTest::suite());
runner.addTest(albaPipeTensorFieldGlyphsTest::suite());
runner.addTest(albaPipeTensorFieldTest::suite());
runner.addTest(albaPipeVectorFieldTest::suite());
runner.addTest(albaVisualPipeSlicerSliceTest::suite());
runner.addTest(albaPipeCompoundVolumeVRTest::suite());
runner.addTest(albaPipeCompoundVolumeMIPTest::suite());
runner.addTest(albaPipeCompoundVolumeDRRTest::suite());
runner.addTest(albaPipeCompoundVolumeIsosurfaceTest::suite());
runner.addTest(albaPipeRayCastTest::suite());
runner.run( controller );
// Print test in a compiler compatible format.
CPPUNIT_NS::CompilerOutputter outputter( &result, CPPUNIT_NS::stdCOut() );
outputter.write();
cppDEL(logic);
return result.wasSuccessful() ? 0 : 1;
} | cpp |
<reponame>decoverri/decoverri.github.io<gh_stars>0
<!DOCTYPE HTML>
<!--
Strata by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title><NAME></title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!--[if lte IE 8]><script src="assets/js/ie/html5shiv.js"></script><![endif]-->
<link rel="stylesheet" href="assets/css/main.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="assets/css/ie8.css" /><![endif]-->
</head>
<body id="top">
<!-- Header -->
<header id="header">
<a href="#" class="image avatar"><img src="http://s.gravatar.com/avatar/909c83577636c1a7de9a65b1b741876d?s=200" alt="profile picture" /></a>
<h1>I am <strong><NAME></strong>, fullstack<br />
software developer and instructor</h1>
</header>
<!-- Main -->
<div id="main">
<!-- One -->
<section id="one">
<h2>Hi, I'm <strong><NAME></strong>. I'm mostly driven by experiences. New challenges, new cultures, new ways of thinking. And it always felt natural to me to pass it on afterwards.</h2>
<p>I work as a software developer and instructor at <a href="http://caelum.com.br">Caelum</a>, teaching classes on Java, Front-end, Android and Agile. I've worked as a financial consultant, as technical analysis at a financial asset management company and I've given classes at <a href="http://www.poli.usp.br/">Escola Politécnica</a>, apart from giving private lessons almost all my life. I have a Bachelor's degree in Applied Mathematics at <a href="http://www.ime.usp.br/">IME-USP</a>.</p>
</section>
<!-- Two -->
<section id="two">
<h2>Personal Projects</h2>
<div class="row">
<article class="6u 12u$(xsmall) work-item">
<h3><a href="http://treasure-generator.decoverri.com">Treasure Generator for Pathfinder RPG</a></h3>
<p>As a RPG enthusiast, but with little free time to play, it annoyed me the time spent to roll treasures for the game encounters. So I decided to automate the process. It emulates the same algorithm from the books, with just a few clicks. It also became my pet project for studying new technologies.</p>
</article>
<article class="6u$ 12u$(xsmall) work-item">
<h3><a href="https://play.google.com/store/apps/details?id=com.decoverri.treasuregenerator">Treasure Generator - Android App</a></h3>
<p>Android interface for the Treasure Generator. Also my first published Android app.</p>
</article>
</div>
</section>
<!-- Three -->
<section id="three">
<h2>Open Source Contributions</h2>
<div class="row">
<article class="6u 12u$(xsmall) work-item">
<h3><a href="https://github.com/caelum/caelum-stella">Caelum Stella</a></h3>
<p>This is a Java open source project created by Caelum for the Brazilian developers. It has tools for validating Brazilian-only documents like CPF and ways of dealing with regional and national holidays. Built from start using TDD, it's a great project to check out even if you are starting.</p>
</article>
</div>
</section>
</div>
<!-- Footer -->
<footer id="footer">
<ul class="icons">
<li><a href="https://twitter.com/decoverri" class="icon fa-twitter"><span class="label">Twitter</span></a></li>
<li><a href="https://github.com/decoverri" class="icon fa-github"><span class="label">Github</span></a></li>
<li><a href="https://www.linkedin.com/in/decoverri" class="icon fa-linkedin"><span class="label">Linkedin</span></a></li>
</ul>
<ul class="copyright">
<li>© 2016 <NAME></li><li>Design: <a href="http://html5up.net">HTML5 UP</a></li>
</ul>
</footer>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/jquery.poptrox.min.js"></script>
<script src="assets/js/skel.min.js"></script>
<script src="assets/js/util.js"></script>
<!--[if lte IE 8]><script src="assets/js/ie/respond.min.js"></script><![endif]-->
<script src="assets/js/main.js"></script>
</body>
</html> | html |
Digital Desk: India recorded 6,050 new Covid-19 cases on Friday, according to health ministry data. Notably, the nation witnessed an increase of 13 percent in coronavirus cases than yesterday.
The health ministry stated that 14 more people died as a result of the infection in India. The total number of fatalities is 5,30,943. According to data released by the ministry on Friday, the total number of individuals discharged was 4,41,85,858.
With Covid cases on the rise, Health Minister Mansukh Mandaviya chaired a high-level meeting with states and UTs to evaluate the situation. At the meeting, Mandaviya asked that the states focus on genomic sequencing and covid testing. As of right now, wearing a mask is not made mandatory.
Earlier in the day, MoS Health Dr. Bharati Pravin Pawar announced the meeting and stated, "The Centre has periodically provided instructions on Covid-19 to the states and UTs. PM Modi has discussed this with all of the states. A review meeting with the health ministers of the states and UTs will be held today by Minister of Health Mandaviya. "
According to the ministry, the daily positivity rate is 3. 39 percent, while the weekly positivity rate is 3. 02 percent.
The Health Ministry reported that the total number of tests performed the previous day was 1,78,533.
In the last 24 hours, a total of 2,334 vaccination doses were administered. Since the nationwide vaccination program began on January 16, 2021, a total of 2,20,66,20,700 vaccinations have been administered.
Kerala has the highest number of Covid cases, with 9,422 active cases. With 265 new cases, Delhi now has 2,060 active cases, while Maharashtra has 3,987 active cases.
Also Read: H3N2 Virus Outbreak: Warning Signs And Symptoms In Children, And How To Protect Them? | english |
<filename>lnbits/extensions/jukebox/config.json
{
"name": "Spotify Jukebox",
"short_description": "Spotify jukebox middleware",
"icon": "radio",
"contributors": ["benarc"]
}
| json |
United Nations: In a significant victory for India at the United Nations, Indian diplomat Vidisha Maitra was elected to the UN Advisory Committee on Administrative and Budgetary Questions (ACABQ), a subsidiary organ of the General Assembly.
In the Group of Asia-Pacific States, Maitra, First Secretary in India’s Permanent Mission to the UN, obtained 126 votes.
The 193-member General Assembly appoints members of the Advisory Committee. Members are selected on the basis of broad geographical representation, personal qualifications and experience.
Maitra was one of two nominated candidates from the Group of Asia-Pacific States. In the group, Ali Mohammed Faeq Al-Dabag of Iraq drew 64 votes.
The Fifth Committee of the General Assembly, which deals with administrative and budgetary issues, recommended Maitra to the Assembly for a three-year term beginning January 1, 2021.
The victory comes as India gets ready to sit in the UN Security Council as a non-permanent member for a two-year term beginning January 2021.
India’s Permanent Representative to the UN Ambassador T S Tirumurti said in a video message that Maitra was elected on Friday to the UN ACABQ “in a strong display of support by UN member states”.
He expressed confidence that Maitra “will bring an independent, objective and much-needed gender-balanced perspective to the functioning of ACABQ”.
Tirumurti expressed gratitude to all member states who supported India in this “crucial election and reposed faith in our candidate”.
He said ACABQ ensures that fund contributions to the UN system are put to good effect and that mandates are properly funded. He noted that India’s membership of ACABQ is particularly relevant now when the UN budget has come under increasing pressure.
“India has a stellar record of bringing professional auditing experience to the UN and contributing outstanding professionals to UN bodies, he said, adding that with India’s rising obligations in both assessed as well as voluntary contributions to the UN, “we take the responsibility of administrative and budgetary management of UN’s functioning very seriously”.
Tirumurti emphasised that this assumes greater significance against the backdrop of India’s term in the Security Council for 2021-22.
ACABQ consists of 16 members appointed by the Assembly in their individual capacity.
The major functions of the Advisory Committee are to examine and report on the budget submitted by the Secretary-General to the General Assembly and to advise the General Assembly concerning any administrative and budgetary matters referred to it.
It also examines, on behalf of the General Assembly, the administrative budgets of the specialised agencies and proposals for financial arrangements with such agencies; and to consider and report to the General Assembly on the auditors’ reports on the accounts of the United Nations and of the specialised agencies. | english |
<gh_stars>0
#content form .form-options {
padding: 4% 0 0 4%;
}
/*.btn {
display: block;
margin: 0 auto;
}*/ | css |
The scheme will benefit more than 12 lakh families living in slum colonies, which play a decisive role in electoral outcomes in at least 40% of the total 227 wards.
Locals heard sounds of serial gas cylinder blasts before the fire broke out, according to officials.
The Brihanmumbai Municipal Corporation recently floated tenders to install these wall-mounted sanitary pad dispensing machines for these toilet blocks, along with a contract to maintain them for three years.
Although the civic-run Shatabdi Hospital is nearest to the slum dwellers in Govandi, due to unavailability of doctors, they are forced to rush to Sion hospital or Rajawadi hospital in case of emergencies.
According to BMC, between September and October, 84 cases of measles were reported. Most of the cases are from the M-East ward that covers Govandi.
Through a Government Resolution issued in January 2021, the state offered these easy premium payment facilities in installments.
The construction of the mini-STPs (Sewage Treatment Plants) has been taken up as part of the BMC's business incubation centre for entrepreneurs called the Society for Mumbai Incubation Lab to Entrepreneurship (SMILE) Council, and is being set up by one of the start-ups supported by the civic body.
As part of this initiative, 500 people will be inoculated Wednesday with the help of S L Raheja Hospital, Mahim.
Mumbai has vaccinated over 2. 13 lakh people aged more than 60 years and those aged 45-59 years with co-morbidities; and vaccination centres have reported very few from slums in this pool.
The first survey had found 57 per cent of people surveyed in slums and 16 per cent in non-slum areas having antibodies against the virus. The second survey found a rise in the level of antibodies in non-slums, but a fall in slums. | english |
A free app for Windows, by fcoder-sia.
A free app for Windows, by Crazy IO Games.
A full version app for Windows, by Ubisoft.
Freely cut any big files into any size and rejoin the splitted files together to create original file.
A free program for Windows, by Google.
| english |
<gh_stars>0
package com.github.poad.example.java.grpc;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@SpringBootApplication
@EnableJpaRepositories("com.github.poad.example.java.grpc.repository")
@EnableTransactionManagement
public class App {
public static void main( String... args ) {
SpringApplication.run(App.class, args);
}
}
| java |
Begin typing your search above and press return to search.
GUWAHATI, July 10: One hundred-rupee fake notes with a face value of Rs 17,900, a printer for notes, a laptop, a cutter and around five litres ink used for making fake notes were recovered from Jyotishree gar in the Jyotikuchi area under Udalbakra outpost from the house of Parameshwar Deka. Three youths – Jitumoni Das, Parameshwar Deka and Chittaranjan – had been arrested by Patacharkuchi police with fake notes with a face value of Rs 3. 40 lakh on July 8. | english |
When two young volunteers agree to participate in a clinical drug trial, they can’t imagine what might come next: love.The play, written by “Succession” writer Lucy Prebble, is dark, funny and complex – three words also often used to describe the HBO phenomenon which concluded earlier this year.
“The Effect” explores the pharmaceutical industry and the impact it has on those at its centre – the people who volunteer their bodies and minds for the sake of innovation in the field. For Doz, the stakes of the play are high, but relatable – she found she understood the character of Connie from the outset.
The play’s rehearsal process was disrupted last fall when Coal Mine Theatre’s former space on Danforth Avenue suffered a major fire. The company has since relocated to great success (it’s still on Danforth Avenue, just a few blocks further east) and the cast of “The Effect” has been able to pick up where they left off.
While much of Doz’s previous work has been on film, shesays she enjoys the live medium of theatre as well, and her approaches to both are quite similar. One of the hallmarks of Coal Mine is the intimacy of its space, a stone’s throw from Woodbine Station. The actors and audience are often only a few inches from each other, which excites Doz. headtopics.comRead more:
Toronto Zoo gorillas reducing screen time + the inside story of the Stellantis dealGorillas’ fixation on phones, the Windsor EV battery plant and wildfires in Canada.
Toronto Zoo urges guests to help limit screen time for gorillasThe Toronto Zoo is advising its visitors to avoid showing videos and photos on their cellphones to its gorillas as they distract the apes.
Humans aren’t the only ones fixated on phones. Why the Toronto Zoo is cutting back on gorilla screen timeVisitors advised not to share cellphone images with the zoo’s primates as it can lead to anti-social behaviour.
A trailer for the Bob Marley biopic has dropped. Here’s what we knowA Bob Marley biopic is making its way to the big screen more than 40 years after his death – and a trailer just dropped.
| english |
Mild heat wave is sweeping over Khulna, Rajshahi divisions and Dhaka, Madaripur, Rangpur, Dinajpur, Nilphamari, Moulvibazar, Chandpur, Feni and Patuakhali districts and it may spread, according to Bangladesh Metrological Department (BMD).
Weather may remain mainly dry with temporary partly cloudy sky over the country having chances rain or thunder showers at one or two places over Sylhet division, said a BMD bulletin.
Besides, day and night temperature may rise slightly over the country.
A low pressure area is likely to be formed over Southeast Bay, it added.
| english |
<gh_stars>1-10
/*
* Copyright 2021 ACC Cyfronet AGH
*
* 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
*
* https://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 {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import {SentinelSearchComponent} from './sentinel-search.component';
import {MapModule} from '../map.module';
import {RouterTestingModule} from '@angular/router/testing';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {HttpClientTestingModule} from '@angular/common/http/testing';
import {SentinelSearchQuery} from '../state/sentinel-search/sentinel-search.query';
import {SentinelSearchStore} from '../state/sentinel-search/sentinel-search.store';
import {ReplaySubject} from 'rxjs';
import {DebugElement} from '@angular/core';
import {By} from '@angular/platform-browser';
import {
SentinelSearchFactory,
SentinelSearchMetadataFactory
} from '../state/sentinel-search/sentinel-search.factory.spec';
import {toTestPromise} from '../../../test.utils.spec';
describe('SentinelSearchComponent', () => {
let component: SentinelSearchComponent;
let fixture: ComponentFixture<SentinelSearchComponent>;
let de: DebugElement;
let query: SentinelSearchQuery;
let store: SentinelSearchStore;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
NoopAnimationsModule,
MapModule,
RouterTestingModule,
HttpClientTestingModule
]
}).compileComponents();
query = TestBed.inject(SentinelSearchQuery);
store = TestBed.inject(SentinelSearchStore);
})
);
beforeEach(() => {
fixture = TestBed.createComponent(SentinelSearchComponent);
component = fixture.componentInstance;
fixture.detectChanges();
de = fixture.debugElement;
});
it('should create', () => {
expect(component).toBeTruthy();
});
describe('No search results info', () => {
it('should show depending on the showNoResults$', () => {
const showNoResults$ = new ReplaySubject<boolean>();
component.showNoResults$ = showNoResults$.asObservable();
showNoResults$.next(false);
fixture.detectChanges();
expect(de.query(By.css('[data-test="no-results"]'))).toBeFalsy();
});
describe('results.length', () => {
beforeEach(() => {
store.update({
metadata: SentinelSearchMetadataFactory.build(),
metadataLoaded: true,
loaded: true
});
});
it('showNoResults$ should be true if length == 0', async () => {
store.set([]);
expect(await toTestPromise(component.showNoResults$)).toBeTruthy();
});
it('showNoResults$ should be false if length > 0', async () => {
store.set(SentinelSearchFactory.buildListSearchResult(1));
expect(await toTestPromise(component.showNoResults$)).toBeFalsy();
});
});
describe('loaded', () => {
beforeEach(() => {
store.update({
metadata: SentinelSearchMetadataFactory.build(),
metadataLoaded: true
});
store.set([]);
});
it('showNoResults$ should be false if loaded == false', async () => {
store.update({loaded: false});
expect(await toTestPromise(component.showNoResults$)).toBeFalsy();
});
it('showNoResults$ should be true if loaded == true', async () => {
store.update({loaded: true});
expect(await toTestPromise(component.showNoResults$)).toBeTruthy();
});
});
describe('Sentinel Sections', () => {
beforeEach(() => {
store.update({
loaded: true,
metadataLoaded: true
});
store.set([]);
});
it('showNoResults$ should depend on metadata sections length', async () => {
store.update({
metadata: {
common: {
params: []
},
sections: []
}
});
expect(await toTestPromise(component.showNoResults$)).toBeFalsy();
store.update({metadata: SentinelSearchMetadataFactory.build()});
expect(await toTestPromise(component.showNoResults$)).toBeTruthy();
});
});
});
});
| typescript |
Microsoft on Thursday released the Microsoft Edge 91 version. The Edge 91 version update was confirmed earlier this week at Microsoft’s Build conference. It has been on the release schedule for months, and comes right on schedule. Microsoft claims that this update makes Edge the fastest web browser for Windows 10. The new update comes with features like sleeping tabs, Startup Boost, new shopping features, more efficient usage, and more. “Microsoft Edge will be the best performing browser on Windows 10 when Microsoft Edge 91 releases later this week," Microsoft had said in a blog post earlier. Microsoft’s new Startup Boost and sleeping tabs features are the two most integral features towards a more powerful and efficient Microsoft Edge.
The Startup Boost feature was first rolled out in Edge back in March, with claims that it will make the browser launch up to 41 percent faster. Similarly, the sleeping tabs feature was also introduced earlier this year and was designed to improve browser performance. In this feature, Edge automatically releases system resources for inactive tabs, which helps new tabs run better or stop the browser from hogging memory and CPU resources for tabs that are not in use. Microsoft is also working on a performance mode for Edge that is being tested currently.
In terms of new shopping features, Microsoft Edge is bringing a feature called Bing Rebates. This will allow users to get cashbacks from purchases at over 300 stores. This in addition to an already in-place feature that finds coupons for users. Another feature will let you see the price history of a certain product. It also tells what was the recent highest price and lowest price of the product.
Apart from these, users can customise their browser themes. This again, comes as an extra functionality over the option of adding themes through the Add-ons store. Users can also customise what you see on the new tab page (finally! ).
Read all the Latest News, Breaking News and Coronavirus News here. Follow us on Facebook, Twitter and Telegram. | english |
{
"setCode": "c13",
"cardDataUrl": "http://www.mtgsalvation.com/spoilers/filter?SetID=137&IncludeUnconfirmed=true&CardsPerRequest=999",
"imagesUrl": "http://magic.wizards.com/en/articles/archive/2013-edition-card-image-gallery-2013-10-07",
"exceptions": [
{
"_comment": "add promo:false to ALL cards with the intention of deleting them later",
"where": "",
"newValues": {
"promo": false
}
},
{
"_comment": "Each deck has one primary and two secondary commanders. They also included oversized foil versions of the same.",
"where": "title=(Oloro, Ageless Ascetic|Sharuum the Hegemon|Sphinx of the Steel Wind| Marath, Will of the Wild|Gahiji, Honored One|Mayael the Anima| Prossh, Skyraider of Kher|Sek'Kuar, Deathkeeper|Shattergang Brothers| Jeleva, Nephalia's Scourge|Nekusar, the Mindrazer|Thraximundar| Derevi, Empyrial Tactician|Roon of the Hidden Realm|Rubinia Soulsinger)",
"newValues": {
"promo": true,
"num": "{{num}} Promo",
"includedReason": "Oversized Foil Commander Promo",
"usableForDeckBuilding": false,
"addedViaException": true
}
},
{
"_comment": "delete all cards that still have promo=false, which leaves just our promo cards",
"delete": true,
"where": "promo=false"
}
]
} | json |
Legal experts said on Monday that conversations, like those captured on video by former cricketer Manoj Prabhakar relating to match-fixing in Indian cricket, can be relied upon only as corroborative evidence in Indian courts -- that too if their authenticity and orginality is proved.
However, in the absence of evidence of any such conversation, the recording cannot be relied upon. Before any court can accept the evidence of tape records, it must carefully consider the genuineness of the tapes, according to a Calcutta High Court judgement.
Usually, as it is expected to be, the tape recording of voice is done without the knowledge and consent of the person concerned and very often he is being trapped unknowingly into it. ''Therefore, anything which is born of trickery or trapping or cunningness, should be very cautiously and carefully considered.
"After all, ventriloquism is not very uncommon and before any court can rely on a tape record, the court must carefully guard itself against possible tampering and manufacturing. It should look for independent corroboration and intrinsic evidence before it relies on the tape.''
The court should be cautious to accept the testimony of tape recording and should reject it unless there is further independent and reliable corroboration, said the Calcutta High Court. Also, the custody of the tape record must be beyond suspicion before a tape can be accepted.
A.S. Chandhiok, president of the Delhi High Court Bar Association, said the videotapes produced by tahelka.com -- which showed several prominent cricketers, officials and others acknowledging instances of match-fixing in Indian cricket -- are admissible in Indian courts provided they are proved to be genuine, authentic and relevant to the case.
"Prabhakar and his associates may be prosecuted separately for invasion of privacy or defamation. But as long as the evidence is relevant, the court may assert the right to information as well," Chandhiok said.
Another judgement of the Madras High Court is significant here. It says a tape recorded statement is admissible if there is no dispute about the identity of speakers, the accuracy of the recorded statement is duly proved, the possibility of tampering with the statement is ruled out, the cassette is carefully sealed and kept in the custody of a judicial officer and the voice of parties are clearly audible.
In 1982, the Supreme Court said in one of its rulings: ''Tape recorded conversation can only be relied upon as corroborative evidence of conversation deposed by any of the parties to the conversation and in the absence of evidence of any such conversation, the tape recorded conversation is indeed no proper evidence and cannot be relied upon.''
T.L. Garg, advocate at the Delhi High Court, said even English courts view the tape recordings before admitting it as evidence. ''But the court must be satisfied that the evidence yielded is not only relevant but is authentic and original.''
| english |
Dr Bhaben Kalita Becomes Assam's Youngest Person To Bags "Young Scientist Award"
Dr Bhaben Kalita started his educational journey at Sankardev Vidya Niketan, Guwahati, Assam where he has completed his schooling in 2005 after that, he completed his 12th board examination in 2007 from Cotton College, Guwahati, Assam.
Due to his interest in investigating technology, he has appeared for various competitive examinations for getting admission to premier institutions and he successfully cleared the "Combined Entrance Examination 2007" with state highest marks in Mathematics.
Accordingly, he joined one of the premier institutions in the region of Northeast India, Assam Engineering College, Guwahati, Assam in Mechanical Engineering.
After that, to pursue his passion for technology intervention he joined the Indian Institute of Technology Guwahati as an Assistant Project Engineer to set up a Virtual Robotics Lab funded by the Ministry of Education, Govt. of India. Here, he worked on the successful implementation of the project where he designed and developed different robotic platforms which can be used for various educational as well as industrial purposes. In the meantime, he got the opportunity to join the Indian Institute of Technology Guwahati as a PhD student to pursue his further research. His doctoral thesis is on the very interesting and emerging topic of Understanding of Nonlinear Dynamics presents in the Pneumatic Artificial Muscle Actuator for various medical as well as industrial applications under the supervision of Prof. S. K. Dwivedy.
He established the untouched area of the research with 6 publications in repute international journals multiple international conference presentations and one Patent.
Based on his doctoral thesis, he developed an affordable novel Pneumatic Artificial Muscle actuator with the help of locally available fabrics in Northeast India, such as Muga Silk and Pat Silk fibres. This muscle actuator can be used in various medical applications like exoskeletons and assistive devices along with different medical instrumentations. During his doctoral study, he travelled to different countries like Portugal, Malaysia, and Poland for presenting his works in various international forums.
His work was also acknowledged and appreciated by the Department of Science and Technology, Govt of India and was awarded the Young Scientist award in the year 2019. Finally, he defended his doctoral thesis in the month of December 2020. During his doctoral study, he was also involved with the newly established institution National Institute of Technology Meghalaya for setting up different laboratories, and industry-oriented curriculum design and lead the team for the establishment of the Center for Robotics and Mechatronics.
In the year 2021, Dr Bhaben Kalita joined Virginia Tech, United States of America as a Postdoctoral Associate to continue his further research in the field of system dynamics, robotics and biomechanics. | english |
Bu səhifədə siz yığıla bilən yemək kreslosuna yönəlmiş keyfiyyətli məzmun tapa bilərsiniz. Siz həmçinin yığıla bilən yemək kreslosu ilə əlaqəli ən son məhsulları və məqalələri pulsuz əldə edə bilərsiniz. Hər hansı bir sualınız varsa və ya yığıla bilən yemək kreslosu haqqında daha çox məlumat əldə etmək istəyirsinizsə, bizimlə əlaqə saxlayın.
yığıla bilən yemək kreslosu Heshan Youmeiya Furniture Co., Ltd. tərəfindən diqqətlə istehsal edilmişdir. Biz məhsul üçün yalnız ən yaxşı materiallardan istifadə edirik və həmişə lazımi istehsal keyfiyyətini təhlükəsiz və etibarlı şəkildə əldə edəcək istehsal prosesini seçirik. Biz illər ərzində keyfiyyətli təchizatçılar şəbəkəsi yaratmışıq, halbuki istehsal bazamız həmişə ən müasir dəqiqlikli maşınlarla təchiz olunub.
Yumeya Chairs markalı məhsulların beynəlxalq bazarda təsiri getdikcə artır. Bu məhsullar dünya standartlarına uyğun olaraq istehsal olunur və üstün keyfiyyəti ilə tanınır. Bu məhsullar yüksək performans, uzun xidmət müddəti və münasib qiymətlə müştərilərin diqqətini cəlb edərək yüksək bazar payı qazanır. Onun daimi yeniliyi, təkmilləşdirilməsi və potensial olaraq geniş tətbiqi perspektivləri sənayedə reputasiya qazanmışdır.
Yumeya Kresloları vasitəsilə yığıla bilən yemək kreslolarının təşviqi üçün biz həmişə tərəfdaşlıq istəyən müştərilər üçün "əməkdaşlıq və qazan-qazan" xidmət prinsipinə əməl etmişik.
Epoçt: Info@youmeiya.net.
| english |
{
"name": "v-dnd",
"version": "0.0.1",
"description": "Vue directive for drag and drop",
"main": "index.js",
"repository": "<EMAIL>:jiangtao/v-dnd.git",
"author": "jiangtao <<EMAIL>>",
"license": "MIT"
}
| json |
<gh_stars>0
import 'dotenv/config';
import express from 'express';
import { Server } from 'socket.io';
import http from 'http';
import { router } from './routes';
import cors from 'cors';
const PORT = 4000;
const app = express();
app.use(cors());
app.use(express.json());
app.use(router);
const httpServer = http.createServer(app);
const io = new Server(httpServer, {
cors: {
origin: '*'
}
});
export { httpServer, io, PORT };
| typescript |
The second Malaysian T10 Bash game of the day pits the Northern Strikers against the Southern Hitters at the Kinrara Academy Oval.
The Southern Hitters are the hot favourites for this tournament with a couple of Malaysian internationals in line to don their jersey. On the other hand, the Northern Strikers also have a nice blend of youth and experience in their roster. Although these are still early days in the competition, you would back the Hitters to register a win in this game.
However, since any game of T10 can go either way, a competitive clash between the Strikers and the Hitters beckons, with two valuable points up for grabs in Kuala Lumpur.
Virandeep Singh (C), Haider Ali, Kevin Perera, Sulaiman Ali, Muhammad Gulraiz, Neville Liyanage, Rehan Mahmood, Ahmad Asby Tan Haris, Ainool Haqqiem, Aminuddin Ramli, Amir Azim Abd Shukor, Bhushan Save, Sachinu Hettige, Saifullah Malik, Syazrul Ezat Idrus and Vijay Unni Suresh Unni.
The pitch at the Kinrara Oval is a good one to bat on, with the par score being 90. While the batsmen should enjoy conditions at this venue, they should be wary of the spinners, who are bound to get some turn in the middle overs. With the ball likely to skid on under lights, both teams will look to chase in this encounter. | english |
Two Tennessee Democrats who were expelled from the Republican-dominated state House of Representatives last week over their participation in a gun control protest said on Sunday that they hoped to soon reclaim their seats.
Their expulsion has drawn national outcry from Democrats. Vice President Kamala Harris paid a visit to Nashville last Friday in support of Jones, who represents a Nashville district, Pearson, who represents a Memphis district, and their colleague Representative Gloria Johnson, who also joined the gun control protest but was spared expulsion last week by one member vote.
Metro Council Member Kevin Rhoten said on Twitter that he had been bombarded with emails since Thursday asking him to vote to appoint Justin Jones for the District 52 seat, and that he planned to do that. At least two members of the Shelby County Board of Commissioners have told local news they plan to reappoint Pearson to the District 86 seat.
Is that why there were expelled? A simple protest?
On March 30, hundreds of demonstrators flooded into the Tennessee statehouse to demand that lawmakers pass stricter gun laws, after assailant Audrey Hale gunned down three 9-year-old students and three staff members at the Covenant School in Nashville on March 27.
Pearson and Jones have said their expulsion is the latest instance of the mostly white, mostly Republican state government trying to suppress the voices of communities of colour.Read more:
Tennessee Democratic lawmakers expelled over gun control protest hope to reclaim seatsApril 9 (Reuters) – Posers! The bucktoothed one always looks so stoned Calgary Herald - less American news. There is plenty of news from Canada.
Expelled Tennessee lawmakers both seeking seats againTwo former Black Democratic lawmakers who were expelled by Republican colleagues in Tennessee say they want to be reappointed, then elected back to their seats, following their ouster for a protest on the House floor Absolute gaylords larping as civil rights activists It was illegal to get rid of them that way anyways so… What does the color of their skin have to do with this, why even mention it?
Expelled Tennessee lawmakers both seeking seats againTwo former Black Democratic lawmakers who were expelled by Republican colleagues in Tennessee say they want to be reappointed, then elected back to their seats, following their ouster for a protest on the House floor urging passage of gun-control measures in the wake of a deadly school shooting. Clowns who act like children. Groomers They deserved to be fired!
CTV National News: Tennessee lawmakers oustedTennessee's legislature expelled two Black Democratic lawmakers for joining a protest calling for more gun control. Joy Malbon reports. False reporting. False journalism. These two children were in the legislature using a bullhorn to drown out debate by their elected colleagues. They refused to follow the standing orders and were reprimanded. Report truth! When you point out race that makes you a racist. BLM fundraiser! Look at the suits on these clowns!
Toronto FC extends unbeaten run while Nashville records another shutout in 0-0 drawToronto FC and Nashville SC fought to a 0\u002D0 draw on Saturday night in Tennessee.
| english |
<!--
This partial is used by both single.html and single.amp.html.
It reads the scratch output-format variable to determine if it's being called from an AMP page
if so it renders AMP compatible images
-->
{{ $home := $.Site.BaseURL }}
{{ $orgName := .Site.Params.contact.org_name }}
{{ $streetAddress := .Site.Params.contact.street_address }}
{{ $city := .Site.Params.contact.city }}
{{ $postCode := .Site.Params.contact.post_code }}
{{ $twitter_url := .Site.Params.social.twitter_url }}
{{ $facebook_url := .Site.Params.social.facebook_url }}
{{ $instagram_url := .Site.Params.social.instagram_url }}
<footer class="footer vk-amp-footer">
<div class="container">
<div class="columns vk-amp-columns">
<div class="column vk-amp-column is-5">
<h2 class="title vk-amp-title is-5"><a href="{{ $home }}">Acme Corp</a></h2>
<p class="block">{{ $orgName }} <br /> {{ $streetAddress }} <br /> {{ $city }}, {{ $postCode }}</p>
<div class="buttons vk-amp-buttons">
{{ if eq ($.Scratch.Get "output-format") "amp" }}
<a class="button vk-amp-button" href="{{ $twitter_url }}">
<amp-img src="/images/icons/twitter.svg" width="20" height="20" alt="Twitter logo"></amp-img>
</a>
<a class="button vk-amp-button" href="{{ $facebook_url }}">
<amp-img src="/images/icons/facebook-f.svg" width="20" height="20" alt="Facebook logo"></amp-img>
</a>
<a class="button vk-amp-button" href="{{ $instagram_url }}">
<amp-img src="/images/icons/instagram.svg" width="20" height="20" alt="Instagram logo"></amp-img>
</a>
{{ else }}
<a class="button" href="{{ $twitter_url }}">
<img src="/images/icons/twitter.svg" width="20" height="20" alt="Twitter logo" />
</a>
<a class="button" href="{{ $facebook_url }}">
<img src="/images/icons/facebook-f.svg" width="20" height="20" alt="Facebook logo" />
</a>
<a class="button" href="{{ $instagram_url }}">
<img src="/images/icons/instagram.svg" width="20" height="20" alt="Instagram logo" />
</a>
{{ end }}
</div>
</div>
<div class="column vk-amp-column">
<h3 class="title vk-amp-title is-6">Product</h3>
<ul>
{{ range .Site.Menus.product }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</div>
<div class="column vk-amp-column">
<h3 class="title vk-amp-title is-6">About us</h3>
<ul>
{{ range .Site.Menus.company }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</div>
</div>
<hr />
<div class="columns vk-amp-columns">
<div class="column vk-amp-column">
{{ range .Site.Menus.legal }}
<a class="mr-5" href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</div>
<div class="column vk-amp-column has-text-right-tablet">
<p class="subtitle vk-amp-subtitle is-6">{{ partial "copyright" . }}</p>
</div>
</div>
</div>
</footer> | html |
Speck's new Presidio Series is 20 percent thinner than its earlier Candyshell Series and 52 percent more shock absorbent, drop tested to 10 feet.
Speck makes some of the most popular cases for the iPhone and for the launch of the iPhone 7 and iPhone 7 Plus it's not only changed the name of its core case line, but it's upgraded the design, making the cases thinner and more protective.
The two anatomical changes concern the hole on the back for the camera: it's larger to accommodate the new lens design of the new iPhones (the iPhone Plus has dual lenses). Also, there are cutouts for the dual speakers on the bottom of the Phone, but there's no cutout for the headphone jack, because, well there's no headphone jack in the iPhone 7 or 7 Plus.
The case does fit an iPhone 6S -- the iPhone 7 is basically the same size -- but you can't access the headphone jack, so you'd have to use a Bluetooth headphone. Conversely, the only thing preventing you from using an iPhone 6S case with an iPhone 7 is size of the case's camera hole and anything that might cover the second speaker.
According to Speck, the new Presidio cases are 20 percent slimmer than its earlier Candyshell cases. And Speck says that thanks to this new inner layer of shock-absorbing material, which it calls Impactium, it's 52 percent more protective.
The Grip, Inked and Wallet versions of the case have been drop tested to 10 feet while the Clear versions are drop tested to 8 feet. (Note that the Grip has been redesigned with a new pattern).
Prices start at $40 for the iPhone 7 cases and go all the way up to $50 for the iPhone 7 Plus cases. That's pretty pricey, but they are good cases and should come down in price after the phones have been out on the market for a little while.
Here's the pricing:
| english |
{
"require": {
"friendsofphp/php-cs-fixer": "^2.19",
"tenantcloud/php-cs-fixer-rule-sets": "~1.2.0"
}
}
| json |
JHAPA: One person has died while another was injured in an incident of power leakage in Kamal rural municipality of Jhapa last night.
The deceased is Nepal Electricity Authority staffer Prem Khatiwada,55, of ward no. 3 in the same municipality.
According to the Area Police Office, Damak, Hikmat Budha, 49, also NEA staffer was seriously injured in the incident. They were renovating a transformer in front of the Kabeli Corridor Power House sub-station in ward no. 5 of the rural municipality, when the incident took place at around 8:00 pm, police inspector Khagendra Ekten said.
Khatiwada was declared dead-upon-arrival at the Lifeline Hospital in Damak while Budha has been rushed to Siliguri of India for further treatment.
Meanwhile, Police have begun an investigation into the incident. | english |
Delhi-based writer Geetanjali Shree’s 2019 novel ‘Ret Samadhi‘ created history by becoming the first Hindi work of fiction to win the International Booker Prize. Translated into English by Daisy Rockwell, ‘Tomb of Sand’ is now available for purchase in India.
Geetanjali’s work clinches her awarded GBP 50,000, which will be split evenly between the author and translator.
Set in northern India, ‘Tomb of Sand’ chronicles the life of an 80-year-old woman who slips into a deep depression after the death of her husband and then resurfaces to gain a new lease on life.
In a sense, the story is about second-innings. Geetanjali’s writing is often described as deeply introspective and this book offers that in abundance.
Geetanjali had four novels (Mai, Hamara Shahar Us Baras, Tirohit and Khali Jagah) to her credit before Ret Samadhi was published in 2018, translated into English as ‘Tomb of Sand’. Born in Mainpuri, Uttar Pradesh, Geetanjali also has several short stories to her credit. Her writings have been translated into English, French, German, Serbian, and Korean.
In this exclusive interview with Geetanjali Shree, she speaks about her writing journey, and early influences and shares her excitement at being longlisted.
Speaking to The Better India, Geetanjali says, “There was no one moment or any dramatic situation that led me to become a writer. It was the sheer desire to express myself that found me putting pen to paper. For me, the medium of writing worked the best.” Geetanjali grew up amidst literature and recalls her early influences.
“My father, who was a bureaucrat, was also a writer and there was always that atmosphere around the house. I grew up at a time when there was idealism about ‘new India’. I grew up in Allahabad and had the chance to interact with many of the well-known writers of that time. Sumitranandan Pant, Firaq Gorakhpuri, Mahadevi Verma and so many more prolific Hindi and Urdu writers,” she says.
Therefore, Geetanjali was always surrounded by books, literature and general awareness of the literary world.
“While there were a few other sources of entertainment whilst I was growing up, reading was always up there on the list. There were all kinds of literature available – serious, not-so-serious, and even just as a medium of entertainment,” she says. Now with an influx of so many other ways of staying entertained, literature has become just one amongst the many. “What’s missing today is a sort of thehraav (a certain kind of quiet) that allows one to just unfurl and stay with their thoughts,” she says.
“When I started writing, I was very diligent. I would start my work at 9.30 am and would try and sit with the writing until almost 5.00 pm. This does not necessarily mean I was writing every day, but I was in that space that allowed me to think and process at my own pace,” she explains. Geetanjali would also, within this time, read and immerse herself in the works of other authors.
While she was able to stick to this routine for a long while, she says once her work was published it started to get difficult. “I was introduced to the world of events and meetings. There were literary festivals I was attending and while all that was great, it did change my routine a bit. I started taking many more breaks,” she says.
This journey of discovery is something that Geetanjali finds thrilling.
Geetanjali interestingly takes her mother’s first name, ‘Shree’ Kumari Pandey, in place of a family/surname.
Click here* to order your copy of Tomb of Sand today!
(Edited by Yoshita Rao)
*This is an affiliate link. If you purchase something using this link, The Better India will get a small commission.
We bring stories straight from the heart of India, to inspire millions and create a wave of impact. Our positive movement is growing bigger everyday, and we would love for you to join it.
Please contribute whatever you can, every little penny helps our team in bringing you more stories that support dreams and spread hope.
| english |
package filestore
import (
"bytes"
"github.com/aws/aws-sdk-go/aws/credentials"
"os"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/s3/s3manager"
log "github.com/sirupsen/logrus"
)
// File is the file to be pushed to S3 bucket
type File struct {
Body []byte
FileName string
Size int64
ContentType string
}
// UploadToS3 uploads the given file to amazon s3 bucket
func (f *File) UploadToS3() (*s3manager.UploadOutput, error) {
region := os.Getenv("S3_REGION")
bucketName := os.Getenv("BUCKET_NAME")
Akid := os.Getenv("AWS_ACCESS_KEY")
Secretkey := os.Getenv("AWS_SECRET_KEY")
s, err := session.NewSession(&aws.Config{
Region: aws.String(region),
Credentials: credentials.NewStaticCredentials(Akid, Secretkey,""),
})
if err != nil {
log.Error(err)
}
object := &s3manager.UploadInput{
Bucket: aws.String(bucketName),
Key: aws.String(f.FileName),
ACL: aws.String("public-read"),
Body: bytes.NewReader(f.Body),
}
uploader := s3manager.NewUploader(s)
out, err := uploader.Upload(object)
if err != nil {
log.Error(err)
return nil, err
}
return out, nil
}
// DeleteFromS3 deletes a file from s3 bucket.
func DeleteFromS3(fileKey string) error {
region := os.Getenv("S3_REGION")
bucketname := os.Getenv("BUCKET_NAME")
if fileKey == "default.png" {
return nil
}
s, err := session.NewSession(&aws.Config{
Region: aws.String(region),
})
if err != nil {
return err
}
svc := s3.New(s)
_, err = svc.DeleteObject(&s3.DeleteObjectInput{Bucket: aws.String(bucketname), Key: aws.String(fileKey)})
if err != nil {
return err
}
err = svc.WaitUntilObjectNotExists(&s3.HeadObjectInput{
Bucket: aws.String(bucketname),
Key: aws.String(fileKey),
})
if err != nil {
return err
}
return nil
}
| go |
Daniela Melchior, who rose to prominence as Ratcatcher 2 in James Gunn's The Suicide Squad, is in talks to join the cast of the tenth Fast and Furious film starring Vin Diesel.
Melchior will be joined by newcomer Jason Momoa, who will reportedly play one of the action franchise's villains. Diesel, Michelle Rodriguez, Tyrese Gibson, Ludacris, and Sung Kang, as well as director Justin Lin, are all set to return to the franchise. Diesel and Lin are also producing the yet-untitled Fast & Furious 10.
Daniela Melchior is a Portuguese actress and model who began her career with films like Parque Mayer and The Black Book, both in Portuguese. Melchior is best known in Portugal for her roles in daytime dramas such as Valor Da Vida, A Herderia, and Massa Fresca.
She was the Portuguese dubbing voice for Gwen Stacy, who was initially dubbed by Hailee Steinfeld in Spider-Man: Into the Spider-Verse. As Cleo Cazo/Ratcatcher 2, she made her English-language debut in James Gunn's DC blockbuster The Suicide Squad.
Melchior has been a prolific actress, most notably portraying Maria Manuel in the 2021 drama miniseries Pecado. Melchior is set to star alongside Henry Golding, Sam Neill, and Noomi Rapace in the film Assassin Club.
She'll also appear in Marlowe, a thriller based on Raymond Chandler's novel The Black-Eyed Blonde, starring Liam Neeson. Many in the industry and in the media have already dubbed the young actress as "the next Gal Gadot."
Fast and Furious 10 will almost certainly propel Daniela Melchior's acting career even further in Hollywood. It will be intriguing to see what role Melchior plays in Fast and Furious 10, as well as how she interacts with the franchise's long-established ensemble of characters.
She is represented by CAA and Brave Artists Management. Melchior's casting was first revealed by TheWrap.
The plot of Fast & Furious 10 has yet to be revealed, and the official title has yet to be declared. The Fast and Furious franchise, which debuted in 2001, is now one of the highest-grossing cinematic properties of all time, grossing an astounding $6.6 billion globally.
The franchise has also produced spinoffs, such as the hit Hobbs & Shaw starring Dwayne Johnson and Jason Statham in 2019, which is expected to be followed by a sequel.
According to reports, Fast & Furious 10 will release in theaters on May 19, 2023.
| english |
{"pokemon":{"id":595,"identifier":"joltik","species_id":595,"height":1,"weight":6,"base_experience":64,"order":668,"is_default":1},"species_name":{"pokemon_species_id":595,"local_language_id":9,"name":"Joltik","genus":"Attaching"},"species_flavor_text":{"species_id":595,"version_id":26,"language_id":9,"flavor_text":"They attach themselves to large-bodied Pokémon\nand absorb static electricity, which they store in an\nelectric pouch."},"form":{"id":595,"identifier":"joltik","form_identifier":"","pokemon_id":595,"introduced_in_version_group_id":11,"is_default":1,"is_battle_only":0,"is_mega":0,"form_order":1,"order":708}} | json |
<reponame>wcho/neo-one
/* @flow */
import type { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import type {
BaseResource,
BaseResourceOptions,
Client,
InteractiveCLI,
} from './types';
import CRUDBase from './CRUDBase';
import type { CLIOption } from './CRUDBase';
import type ResourceType from './ResourceType';
export type ExecCLIOptions<ResourceOptions: BaseResourceOptions> = {|
cli: InteractiveCLI,
options: ResourceOptions,
|};
export type GetResources$Options<ResourceOptions: BaseResourceOptions> = {|
client: Client,
options: ResourceOptions,
|};
export type GetCRUDOptions<
Resource: BaseResource,
ResourceOptions: BaseResourceOptions,
> = {|
resourceType: ResourceType<Resource, ResourceOptions>,
help?: string,
aliases?: Array<string>,
options?: Array<CLIOption>,
autocomplete?: Array<string>,
|};
export default class GetCRUD<
Resource: BaseResource,
ResourceOptions: BaseResourceOptions,
> extends CRUDBase<Resource, ResourceOptions> {
constructor({
resourceType,
help,
aliases,
options,
autocomplete,
}: GetCRUDOptions<Resource, ResourceOptions>) {
super({
name: 'get',
command: `get ${resourceType.name}`,
resourceType,
help: help == null ? `List ${resourceType.names.lowerPlural}` : help,
aliases,
options,
autocomplete,
});
}
// Function to execute before the command.
// eslint-disable-next-line
preExecCLI(options: ExecCLIOptions<ResourceOptions>): Promise<void> {
return Promise.resolve();
}
// Function to execute after the command.
// eslint-disable-next-line
postExecCLI(options: ExecCLIOptions<ResourceOptions>): Promise<void> {
return Promise.resolve();
}
getResources$({
client,
options,
}: GetResources$Options<ResourceOptions>): Observable<Array<Resource>> {
return client
.getResources$({
plugin: this.resourceType.plugin.name,
resourceType: this.resourceType.name,
options,
})
.pipe(
map((resources) => resources.map((resource) => (resource: $FlowFixMe))),
);
}
}
| javascript |
{
"id": 9879,
"source": "bullinger",
"verse_id": 17951,
"verse_count": 1,
"reference": "14:22",
"title": "",
"html": " <p> <em>name and remnant. <\/em> Note the Figure of speech <i>Homoeopropheron <\/i> in this sentence and the next: <em>\"renown and remnant, scion and seed\"<\/em>. <\/p> \n\n <p> <em>and. <\/em> Some codices, with two early printed editions, omit this <em>\"and\"<\/em>. <\/p> \n\n <p> <em>son, and nephew <\/em> = scion and seed, or, son and son\"s son. <\/p> ",
"audit": null
} | json |
{
"name": "cookbook",
"version": "0.0.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"ejs": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.1.tgz",
"integrity": "<KEY>
},
"node-fetch": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
"integrity": "<KEY>
},
"sanitize-filename": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
"integrity": "<KEY>
"dev": true,
"requires": {
"truncate-utf8-bytes": "^1.0.0"
}
},
"truncate-utf8-bytes": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
"integrity": "sha1-QFkjkJWS1W94pYGENLC3hInKXys=",
"dev": true,
"requires": {
"utf8-byte-length": "^1.0.1"
}
},
"utf8-byte-length": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",
"integrity": "sha1-9F8VDExm7uloGGUFq5P8u4rWv2E=",
"dev": true
}
}
}
| json |
{"id":"00801","group":"easy-ham-1","checksum":{"type":"MD5","value":"0a1ec38cd598d6c2e02323487c74e53c"},"text":"From <EMAIL> Mon Sep 30 13:52:51 2002\nReturn-Path: <<EMAIL>>\nDelivered-To: yyyy<EMAIL>assass<EMAIL>int.org\nReceived: from localhost (jalapeno [127.0.0.1])\n\tby jmason.org (Postfix) with ESMTP id C34E016F81\n\tfor <jm@localhost>; Mon, 30 Sep 2002 13:48:56 +0100 (IST)\nReceived: from jalapeno [127.0.0.1]\n\tby localhost with IMAP (fetchmail-5.9.0)\n\tfor jm@localhost (single-drop); Mon, 30 Sep 2002 13:48:56 +0100 (IST)\nReceived: from xent.com ([64.161.22.236]) by dogma.slashnull.org\n (8.11.6/8.11.6) with ESMTP id g8SLeEg10229 for <<EMAIL>>;\n Sat, 28 Sep 2002 22:40:14 +0100\nReceived: from lair.xent.com (localhost [127.0.0.1]) by xent.com (Postfix)\n with ESMTP id 3B50A2940B3; Sat, 28 Sep 2002 14:36:10 -0700 (PDT)\nDelivered-To: <EMAIL>\nReceived: from mail-out2.apple.com (mail-out2.apple.com [17.254.0.51]) by\n xent.com (Postfix) with ESMTP id 6AB3C2940AC for <<EMAIL>>;\n Sat, 28 Sep 2002 14:32:50 -0700 (PDT)\nReceived: from mailgate2.apple.com (A17-129-100-225.apple.com\n [17.129.100.225]) by mail-out2.apple.com (8.11.3/8.11.3) with ESMTP id\n g8SLam921564 for <<EMAIL>>; Sat, 28 Sep 2002 14:36:48 -0700 (PDT)\nReceived: from scv3.apple.com (scv3.apple.com) by mailgate2.apple.com\n (Content Technologies SMTPRS 4.2.1) with ESMTP id\n <<EMAIL>>; Sat, 28 Sep 2002 14:36:48\n -0700\nReceived: from whump.com (to0202a-dhcp24.apple.com [17.212.22.152]) by\n scv3.apple.com (8.11.3/8.11.3) with ESMTP id g8SLal312161; Sat,\n 28 Sep 2002 14:36:47 -0700 (PDT)\nSubject: Re: EBusiness Webforms: cluetrain has left the station\nContent-Type: text/plain; charset=US-ASCII; format=flowed\nMIME-Version: 1.0 (Apple Message framework v546)\nCc: <EMAIL>, FoRK <<EMAIL>>\nTo: <NAME> <<EMAIL>>\nFrom: <NAME> <<EMAIL>>\nIn-Reply-To: <<EMAIL>>\nMessage-Id: <7<EMAIL>-<EMAIL>-<EMAIL>>\nContent-Transfer-Encoding: 7bit\nX-Mailer: Apple Mail (2.546)\nSender: fork-<EMAIL>\nErrors-To: fork-admin<EMAIL>.com\nX-Beenthere: <EMAIL>\nX-Mailman-Version: 2.0.11\nPrecedence: bulk\nList-Help: <mailto:fork-<EMAIL>?subject=help>\nList-Post: <mailto:<EMAIL>>\nList-Subscribe: <http://xent.com/mailman/listinfo/fork>, <mailto:<EMAIL>?subject=subscribe>\nList-Id: Friends of Rohit Khare <fork.xent.com>\nList-Unsubscribe: <http://xent.com/mailman/listinfo/fork>,\n <mailto:<EMAIL>?subject=unsubscribe>\nList-Archive: <http://xent.com/pipermail/fork/>\nDate: Sat, 28 Sep 2002 14:37:19 -0700\n\nOn Saturday, September 28, 2002, at 12:54 PM, <NAME> \nwrote:\n\n> Although it's like a total shock to 99.999% (5nines) of all the\n> employed website designers out there, the truth is webforms /can/\n> accept \"U.S. of A\" as a country. Incredible, but true. Web forms can\n> also accept /multiple/ or even /free-form/ telephone numbers and can\n> even be partitioned into manageable steps. All this can also be done\n> without selling exclusive rights to your wallet to the World's\n> Second-Richest Corporation (assuming Cisco is still #1) and vendor\n> locking your business into their \"small transaction fee\" tithe.\n\nYes, but this is what normally happened:\n\nEngineer: we can put an input validator/parser on the backend to do \nthat.\n\nDesigner: there's a JavaScript library that can do some of the \npre-validation.\n\nCreative Director: I want it in blue, with a zooming logo.\n\nEngineer: can we get to that later, we need to meet functional specs.\n\nCreative Director: You *don't* understand. *I* want it in blue.\n\nCreative Director: Oh, and the site launches this Friday because I sent \nout a press release about our new strategic partnership with HypeCorp.\n\nDesigner: fine, we'll just put a list of countries in a drop down.\n\nEngineer: and we can validate against that list.\n\nCreative Director: I don't give a shit. As long as it's in blue. And \nhas a link to my press release.\n\n----\n<NAME> <<EMAIL>>\nhttp://www.whump.com/moreLikeThis/\n\n\n"} | json |
<filename>locales/EmuTarkov-LocalePo/db/locales/po/templates/5b84038986f774774913b0c1.json
{
"Name": "Trilho de comprimento curto para Hexagon (Anodizado em vermelho)",
"ShortName": "Hex.",
"Description": "Trilho curto para guarda-mão Hexagon que permite instalação de equipamentos adicionais. (Anodizado em Vermelho)."
} | json |
{"purify.js":"sha256-E8jTyoNqL3A3zKs2pu/9wAGbIew3KHmQ1KLvj2IvwMk=","purify.min.js":"sha256-oCMOcnsbo+SvnG7z6K4jhoB76lYsxWEcG0VDI4Po2Yg="} | json |
{"html_attributions": [], "results": [{"business_status": "OPERATIONAL", "geometry": {"location": {"lat": 27.4959426, "lng": 80.5402166}, "viewport": {"northeast": {"lat": 27.4973195802915, "lng": 80.5415598302915}, "southwest": {"lat": 27.4946216197085, "lng": 80.5388618697085}}}, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/school-71.png", "icon_background_color": "#7B9EB0", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/school_pinlet", "name": "TIPONA", "photos": [{"height": 500, "html_attributions": ["<a href=\"https://maps.google.com/maps/contrib/109824502019135217291\"><NAME></a>"], "photo_reference": "Aap_uEAXB_u3j8qepeXsC-GYp9Sx3LE3yAja4u-aP6rE8zSbi9VHCU-SQCec5ElHfgMfMm3osAU66PY6QPo5VE1i9v29R0-isQpnd9CygV9II-RpjF_JVYvzdurJvWWa1Oqd-EaPW8Aa40bQaxZahJZQ0wOY48BRdB6LOkmycdedfwqnL8uE", "width": 480}], "place_id": "ChIJZ9Q7nJ7dnjkRM5zVcsK7vHc", "plus_code": {"compound_code": "FGWR+93 Bikasur Grant, Uttar Pradesh, India", "global_code": "7MV2FGWR+93"}, "rating": 5, "reference": "ChIJZ9Q7nJ7dnjkRM5zVcsK7vHc", "scope": "GOOGLE", "types": ["school", "point_of_interest", "establishment"], "user_ratings_total": 5, "vicinity": "Unnamed Road, Bikasur Grant"}, {"business_status": "OPERATIONAL", "geometry": {"location": {"lat": 27.4994745, "lng": 80.5578319}, "viewport": {"northeast": {"lat": 27.5008868302915, "lng": 80.5590948802915}, "southwest": {"lat": 27.4981888697085, "lng": 80.55639691970848}}}, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/school-71.png", "icon_background_color": "#7B9EB0", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/school_pinlet", "name": "Primary school <NAME>", "place_id": "ChIJ6xrYYkjbnjkR0zMohdIHhNE", "reference": "ChIJ6xrYYkjbnjkR0zMohdIHhNE", "scope": "GOOGLE", "types": ["school", "point_of_interest", "establishment"], "vicinity": "FHX5+Q4P, Hariharpur"}], "status": "OK"} | json |
<reponame>kckern/IsaiahExplorer<gh_stars>1-10
{
"id": 12876,
"source": "wen",
"verse_id": 18270,
"verse_count": 1,
"reference": "32:10",
"title": "",
"html": "The vintage shall fail\u2014During the time of the Assyrian invasion. The gathering\u2014Of the other fruits of the earth.",
"audit": null
} | json |
Why Are There Only 28 Days in February?
Do We Really Swallow Spiders in Our Sleep?
Why Is Christmas in December?
Tahar Ben Jelloun, 2008.
in these related Britannica articles:
| english |
[{"team_id": 1164, "team": "Lakeland", "id": "5054", "name": "<NAME>", "year": "Sophomore", "hometown": "West Bend, Wis.", "high_school": "West Bend West", "previous_school": null, "height": "5'3\"", "position": "Guard", "jersey": "5", "url": "/sports/womens-basketball/roster/kayla-clark/5054", "season": "2014-15"}, {"team_id": 1164, "team": "Lakeland", "id": "5053", "name": "<NAME>", "year": "Junior", "hometown": "Stephenson, Mich.", "high_school": "Stephenson", "previous_school": null, "height": "5'2\"", "position": "Guard", "jersey": "10", "url": "/sports/womens-basketball/roster/gaby-cappaert/5053", "season": "2014-15"}, {"team_id": 1164, "team": "Lakeland", "id": "5055", "name": "<NAME>", "year": "Sophomore", "hometown": "Munising, Mich.", "high_school": "Munising", "previous_school": null, "height": "5'2\"", "position": "Guard", "jersey": "11", "url": "/sports/womens-basketball/roster/emily-desjardins/5055", "season": "2014-15"}, {"team_id": 1164, "team": "Lakeland", "id": "5064", "name": "<NAME>", "year": "Freshman", "hometown": "Norwalk, Wis.", "high_school": "Brookwood", "previous_school": null, "height": "5'10\"", "position": "Forward", "jersey": "13", "url": "/sports/womens-basketball/roster/olivia-hansen/5064", "season": "2014-15"}, {"team_id": 1164, "team": "Lakeland", "id": "5061", "name": "<NAME>", "year": "Junior", "hometown": "Middleton, Wis.", "high_school": "Middleton", "previous_school": null, "height": "5'10\"", "position": "Guard", "jersey": "14", "url": "/sports/womens-basketball/roster/callie-olson/5061", "season": "2014-15"}, {"team_id": 1164, "team": "Lakeland", "id": "5056", "name": "<NAME>", "year": "Sophomore", "hometown": "Norway, Mich.", "high_school": "Norway", "previous_school": null, "height": "5'5\"", "position": "Guard", "jersey": "15", "url": "/sports/womens-basketball/roster/bailey-grayvold/5056", "season": "2014-15"}, {"team_id": 1164, "team": "Lakeland", "id": "5063", "name": "<NAME>", "year": "Freshman", "hometown": "Goodman, Wis.", "high_school": "Goodman-Pembine", "previous_school": null, "height": "5'11\"", "position": "Forward", "jersey": "21", "url": "/sports/womens-basketball/roster/rachel-stankevich/5063", "season": "2014-15"}, {"team_id": 1164, "team": "Lakeland", "id": "5135", "name": "<NAME>", "year": "Junior", "hometown": "Escanaba, Mich.", "high_school": "Escanaba", "previous_school": null, "height": "5'5\"", "position": "Guard", "jersey": "22", "url": "/sports/womens-basketball/roster/trista-barron/5135", "season": "2014-15"}, {"team_id": 1164, "team": "Lakeland", "id": "5065", "name": "<NAME>", "year": "Freshman", "hometown": "Milwaukee, Wis.", "high_school": "Heritage Christian", "previous_school": null, "height": "5'8\"", "position": "Guard", "jersey": "23", "url": "/sports/womens-basketball/roster/tiersa-gillie/5065", "season": "2014-15"}, {"team_id": 1164, "team": "Lakeland", "id": "5060", "name": "<NAME>", "year": "Junior", "hometown": "Mundelein, Ill.", "high_school": "Mundelein", "previous_school": null, "height": "5'11\"", "position": "Forward", "jersey": "24", "url": "/sports/womens-basketball/roster/rachael-millner/5060", "season": "2014-15"}, {"team_id": 1164, "team": "Lakeland", "id": "5059", "name": "<NAME>", "year": "Sophomore", "hometown": "Maywood, Ill.", "high_school": "Glenbard East", "previous_school": null, "height": "5'3\"", "position": "Guard", "jersey": "33", "url": "/sports/womens-basketball/roster/teaira-miller/5059", "season": "2014-15"}, {"team_id": 1164, "team": "Lakeland", "id": "5069", "name": "<NAME>", "year": "Freshman", "hometown": "Saukville, Wis.", "high_school": "Port Washington", "previous_school": null, "height": "6'0\"", "position": "Center", "jersey": "42", "url": "/sports/womens-basketball/roster/mikayla-hilton/5069", "season": "2014-15"}, {"team_id": 1164, "team": "Lakeland", "id": "5067", "name": "<NAME>", "year": "Freshman", "hometown": "Sheboygan, Wis.", "high_school": "Sheboygan North", "previous_school": null, "height": "5'10\"", "position": "Guard", "jersey": "44", "url": "/sports/womens-basketball/roster/c-j-usadel/5067", "season": "2014-15"}, {"team_id": 1164, "team": "Lakeland", "id": "5068", "name": "<NAME>", "year": "Freshman", "hometown": "Florence, Wis.", "high_school": "Florence", "previous_school": null, "height": "6'1\"", "position": "Center", "jersey": "50", "url": "/sports/womens-basketball/roster/maddy-doll/5068", "season": "2014-15"}, {"team_id": 1164, "team": "Lakeland", "id": "5057", "name": "<NAME>", "year": "Junior", "hometown": "Oostburg, Wis.", "high_school": "Oostburg", "previous_school": null, "height": "5'10\"", "position": "Guard/Forward", "jersey": "52", "url": "/sports/womens-basketball/roster/lexie-greenheck/5057", "season": "2014-15"}] | json |
package com.eugenewyj.samples.base.reflect;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* @since 2017/8/31
*/
public class ReflectService {
/**
* 示例方法
* @param name
*/
public void sayHello(String name) {
System.err.println("hello " + name);
}
/**
* 测试方法入口
* @param args
*/
public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException {
// 通过反射实例化ReflectService类
Object service = Class.forName(ReflectService.class.getName()).newInstance();
// 获取sayHello方法。
Method method = service.getClass().getMethod("sayHello", String.class);
// 通过反射调用方法。
method.invoke(service, "eugene");
}
}
| java |
<gh_stars>1-10
use crate::config::date_config::{
Date::{MonthDay, MonthWeekDay},
DateTimeConfig, Hours,
};
use crate::server::client::{Client, ClientResult, Running, Timeout};
use std::collections::HashSet;
use std::time::Duration;
use chrono::{Date, Datelike, Local, NaiveDate, NaiveTime, Timelike, Weekday};
use async_trait::async_trait;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum DateError {
#[error("{0} doesn't have {1} number of days")]
DayOfMonthError(&'static str, u32),
#[error("{0} doesn't have {2} number of {1}s")]
WeekdayOfMonthError(&'static str, Weekday, u32),
#[error("{0} has its start time > stop time")]
FlipFlopTimeError(Weekday),
#[error("{0} was stated multiple times in config for start times")]
RepeatedWeekdayError(Weekday),
}
type DateResult<T> = Result<T, DateError>;
#[derive(Debug)]
enum StartStopTimes {
EndOfDay(Duration, bool),
StartOfAlerts(Duration),
EndOfAlerts(Duration),
}
pub struct DateChecker {
config: DateTimeConfig,
running: Running,
alerts_on: Running,
timeout: Timeout,
}
impl DateChecker {
pub fn new(
config: DateTimeConfig,
running: Running,
alerts_on: Running,
timeout: Timeout,
) -> DateResult<DateChecker> {
Self::sanity_check(&config)?;
Ok(DateChecker {
config,
running,
alerts_on,
timeout,
})
}
fn sanity_check(config: &DateTimeConfig) -> DateResult<()> {
let opt_from_ymwd = NaiveDate::from_weekday_of_month_opt;
let opt_from_ymd = NaiveDate::from_ymd_opt;
let today = Local::today();
for date in config.dates() {
match *date {
MonthWeekDay { month, week, day } => {
let m = month.number_from_month();
if let None = opt_from_ymwd(today.year(), m, day, week as u8) {
return Err(DateError::WeekdayOfMonthError(month.name(), day, week));
}
}
MonthDay { month, day } => {
let m = month.number_from_month();
if let None = opt_from_ymd(today.year(), m, day) {
return Err(DateError::DayOfMonthError(month.name(), day));
}
}
}
}
let mut weekday_set = HashSet::new();
for hours in config.start_hours() {
if !weekday_set.contains(&hours.weekday()) {
weekday_set.insert(hours.weekday().clone());
} else {
return Err(DateError::RepeatedWeekdayError(hours.weekday()));
}
if hours.start() >= hours.stop() {
return Err(DateError::FlipFlopTimeError(hours.weekday()));
}
}
Ok(())
}
fn weekdays_hours(&self, weekday: Weekday) -> (NaiveTime, NaiveTime) {
for hours in self.config.start_hours() {
if weekday == hours.weekday() {
return (hours.start(), hours.stop());
}
}
let default = Hours::default();
(default.start(), default.stop())
}
fn should_run(&self, date: &Date<Local>) -> bool {
let from_ymwd = NaiveDate::from_weekday_of_month;
let from_ymd = NaiveDate::from_ymd;
for d in self.config.dates() {
match *d {
MonthWeekDay { month, week, day } => {
if date.naive_local()
== from_ymwd(date.year(), month.number_from_month(), day, week as u8)
{
return false;
}
}
MonthDay { month, day } => {
if date.naive_local() == from_ymd(date.year(), month.number_from_month(), day) {
return false;
}
}
}
}
true
}
fn next_time(&self) -> StartStopTimes {
let now = Local::now();
let weekday = now.weekday();
let (start, stop) = self.weekdays_hours(weekday);
let run_today = self.should_run(&now.date());
if run_today {
if now.time() < start {
let time = start - now.time();
return StartStopTimes::StartOfAlerts(Duration::from_secs(
time.num_seconds() as u64
));
} else if now.time() >= start && now.time() < stop {
let time = stop - now.time();
if stop == NaiveTime::from_hms(23, 59, 59) {
return StartStopTimes::EndOfDay(
Duration::from_secs(time.num_seconds() as u64),
true,
);
} else {
return StartStopTimes::EndOfAlerts(Duration::from_secs(
time.num_seconds() as u64
));
}
}
}
let time = (24 - now.hour()) * 3600 - now.minute() * 60 - now.second();
StartStopTimes::EndOfDay(Duration::from_secs(time as u64), false)
}
}
#[async_trait]
impl Client for DateChecker {
async fn start(mut self) -> ClientResult<()> {
use StartStopTimes::*;
while self.running.load() {
match self.next_time() {
StartOfAlerts(d) => {
self.alerts_on.store(false);
self.timeout.wait_timeout(d).await?;
}
EndOfAlerts(d) => {
self.alerts_on.store(true);
self.timeout.wait_timeout(d).await?;
}
EndOfDay(d, is_running) => {
self.alerts_on.store(is_running);
self.timeout.wait_timeout(d).await?;
}
}
}
Ok(())
}
}
| rust |
Recently, the RBI, under development measures in its monetary policy statement, announced that card-less cash withdrawals will be enabled across all banks and ATM networks using UPI. This will lead to innumerable benefits for the users including enhanced security.
How will it work?
This method will not require a customer to use a debit/credit card for withdrawing cash. Instead, to complete a card-less cash withdrawal on the ATM, a customer can simply scan the UPIQR code generated on the ATM screen and enter an authorisation PIN on the bank’s mobile application. The UPI QR based card-less cash withdrawal on a bank ATM was first introduced in 2019 by an integrated omni-channel payments solutions company.
How will it benefit customers?
The biggest benefit of this solution is the ease of transactions for customers. For instance, a customer need not worry about carrying a debit card to the ATM as the entire transaction is completed using the mobile phone. Moreover, new age customers look for convenience and swift cash withdrawals, without having to worry about carrying multiple cards. A solution like this addresses this concern.
Additionally, both urban & rural citizens, especially new-age customers are comfortable making UPIQR based transactions using their smartphones and it has become a part of their day-to-day life. Extending such a solution to ATMs/CRMs will bring added convenience to the end-users.
With the phenomenal growth of smartphones and internet connectivity even in rural areas today, there is huge opportunity for ATM players and banks to cater to this population. As this card-less cash withdrawal solution is interoperable – meaning a user of X Bank can withdraw cash from Y Bank’s ATM, it will bring ease of transactions to rural citizens.
Another benefit is the increased safety and security while transacting on an ATM which will result in strengthening customer confidence. As the customer does not need a debit/credit card, the chances of card-based frauds are negated. Moreover, as the transaction will take place on the secure network of UPI, the customers will have an increased faith while withdrawing cash.
This solution will also benefit teenagers and students as Gen Z/millennials, as they are open to newer options which enable safe and swift transactions – testimony is the growth of UPI. In addition, this will relieve parents and guardians of the fear of card theft.
UPI has been a gamechanger for India’s digital payments sector. The seamless integration of digital (through UPIQR) & physical through interoperable cash withdrawal feature will play an important role in achieving financial inclusion. Further, the urban citizens will also whole-heartedly accept this solution owing to the growing preference for contactless transactions.
In conclusion, the change in form factor – from debit card to mobile, will go a long way in bringing convenience to banking customers across urban and rural areas of India. It will further contribute towards a safe & secure growth of the payment ecosystem – especially ATMs & CRMs.
Stanley Johnson is the Executive Director at AGS Transact Technologies Ltd.
| english |
<gh_stars>1-10
# AWS Translate
Translation page that uses Amazon Web Services. | markdown |
def gen_binary(control, n1, n2, prefix):
if n1 == 0 and n2 == 0:
print(prefix)
else:
if n1 > 0:
gen_binary(control + 1, n1 - 1, n2, prefix + "(")
if control > 0 and n2 > 0:
gen_binary(control - 1, n1, n2 - 1, prefix + ")")
def read_input():
n = int(input())
control = 0
n1 = n
n2 = n
return n, control, n1, n2
def main():
n, control, n1, n2 = read_input()
gen_binary(control, n1, n2, "")
if __name__ == "__main__":
main()
# https://neerc.ifmo.ru/wiki/index.php?title=Правильные_скобочные_последовательности
| python |
Nandamuri Kalyanram has been busy with multiple projects once the shooting of his own production, Jai Lava Kusa completed with his brother, Jr. NTR. He is doing a political comedy with Kajal Aggarwal and a love story with Tamannah.
The actor is currently busy with love story in Ramoji Film City. But his next release will be Manchi Lakshanalunna Abbayi with Kajal Aggarwal, as he finished most of the shooting. Upendra Madhav is directing this movie. Along with this, Kalyanram is looking to remake a political drama, Ram Leela that became a huge hit in Malayalam. The film worked really well for Dileep, who is accused as the person who plotted the molestation incident of actress Bhavana.
Well, the movie has high octane political satires and drama. The story follows a young man who will take over local politics as opposition kill his father ruthlessly. This political drama could be putting his own family in the power in Andhra Pradesh in some awkward situation. So few of the well-wishers of Kalyanram are asking him to re-consider his decision and not remake the movie it seems. What will Kalyanram do? We will try to know the latest and will update you time to time. Keep watching this space! | english |
{
"713201f-a": {
"width": 402,
"image_url": "http://oldnyc-assets.nypl.org/600px/713201f-a.jpg",
"title": "",
"date": "1927",
"text": "44th Street, east from Ninth Avenue.\nSeptember 20, 1927\nP.L Sperr",
"folder": "44th Street & 9th Avenue, Manhattan, NY",
"thumb_url": "http://oldnyc-assets.nypl.org/thumb/713201f-a.jpg",
"original_title": "Manhattan: 44th Street - 9th Avenue",
"height": 600
},
"713202f-a": {
"width": 434,
"image_url": "http://oldnyc-assets.nypl.org/600px/713202f-a.jpg",
"title": "",
"date": "1934",
"text": "417-9-21 West 44th Street, north side, between Ninth and Tenth Avenues. At the left is a renovated 4-story building housing units of St. Josephs Immigrant Home. This activity occupies an adjoining building (No. 225-7) that is not shown here.\n\nAugust 1934\nGift of <NAME>\nArverne,Long Island\n",
"folder": "44th Street (West) & 9th Avenue, Manhattan, NY",
"thumb_url": "http://oldnyc-assets.nypl.org/thumb/713202f-a.jpg",
"original_title": "Manhattan: 44th Street (West) - 9th Avenue",
"height": 600
},
"713172f-b": {
"width": 409,
"image_url": "http://oldnyc-assets.nypl.org/600px/713172f-b.jpg",
"title": "",
"date": "1941",
"text": "(1)\nWest 44th Street, North West corner of Ninth Avenue and\nlooking Eastwards on 44th Street.\n(2)\nWest 44th Street and 9th Avenue North west corner\nlooking Northwards on Ninth Avenue.\nP.L.Speer.\nNO REPRODUCTIONS. April 18, 1941\n",
"folder": "44th Street (West) & 9th Avenue, Manhattan, NY",
"thumb_url": "http://oldnyc-assets.nypl.org/thumb/713172f-b.jpg",
"original_title": "Manhattan: 44th Street (West) - 9th Avenue",
"height": 600
},
"713172f-a": {
"width": 600,
"image_url": "http://www.oldnyc.org/rotated-assets/600px/713172f-a.90.jpg",
"title": "",
"date": "1941",
"text": "(1)\nWest 44th Street, North West corner of Ninth Avenue and\nlooking Eastwards on 44th Street.\n(2)\nWest 44th Street and 9th Avenue North west corner\nlooking Northwards on Ninth Avenue.\nP.L.Speer.\nNO REPRODUCTIONS. April 18, 1941\n",
"folder": "44th Street (West) & 9th Avenue, Manhattan, NY",
"thumb_url": "http://www.oldnyc.org/rotated-assets/thumb/713172f-a.90.jpg",
"original_title": "Manhattan: 44th Street (West) - 9th Avenue",
"rotation": 90,
"height": 407
},
"713179f-a": {
"width": 486,
"image_url": "http://oldnyc-assets.nypl.org/600px/713179f-a.jpg",
"title": "",
"date": "",
"text": "Received from Cross & Brown Co., March 1968\nThis is the Daily Commerce Building at 708 Third Avenue, NY NY",
"folder": "44th Street (East) & 9th Avenue, Manhattan, NY",
"thumb_url": "http://oldnyc-assets.nypl.org/thumb/713179f-a.jpg",
"original_title": "Manhattan: 44th Street (East) - 9th Avenue",
"height": 600
},
"713200f-a": {
"width": 384,
"image_url": "http://oldnyc-assets.nypl.org/600px/713200f-a.jpg",
"title": "",
"date": "",
"text": "350 West 44th Street, south side, east of Ninth Avenue. This\nis a three-story frame building.\n1932.\n<NAME> Collection, Museum of the City of New York.\nNegative No. 196.\n",
"folder": "44th Street (West) & 9th Avenue, Manhattan, NY",
"thumb_url": "http://oldnyc-assets.nypl.org/thumb/713200f-a.jpg",
"original_title": "Manhattan: 44th Street (West) - 9th Avenue",
"height": 600
},
"713204f-b": {
"width": 402,
"image_url": "http://oldnyc-assets.nypl.org/600px/713204f-b.jpg",
"title": "",
"date": "1931; 1934",
"text": "United Presbyterian Church, 434 West 44th Street, south side,\nbetween Ninth and Tenth Avenues.\nApril 14, 1931.\nP. L. Sperr\n(2)\nThe same edifice.\nAugust, 1934\ngift of <NAME>",
"folder": "44th Street (West) & 9th Avenue, Manhattan, NY",
"thumb_url": "http://oldnyc-assets.nypl.org/thumb/713204f-b.jpg",
"original_title": "Manhattan: 44th Street (West) - 9th Avenue",
"height": 600
},
"713204f-a": {
"width": 427,
"image_url": "http://oldnyc-assets.nypl.org/600px/713204f-a.jpg",
"title": "",
"date": "1931; 1934",
"text": "United Presbyterian Church, 434 West 44th Street, south side,\nbetween Ninth and Tenth Avenues.\nApril 14, 1931.\nP. L. Sperr\n(2)\nThe same edifice.\nAugust, 1934\ngift of <NAME>",
"folder": "44th Street (West) & 9th Avenue, Manhattan, NY",
"thumb_url": "http://oldnyc-assets.nypl.org/thumb/713204f-a.jpg",
"original_title": "Manhattan: 44th Street (West) - 9th Avenue",
"height": 600
}
} | json |
<reponame>charles-halifax/recipes<gh_stars>10-100
{
"directions": [
"In a large bowl combine zwieback crumbs, marshmallows, nuts and brown sugar.",
"In a saucepan over low heat cook the evaporated milk and butterscotch chips. Stir mixture constantly until the chips have melted and the mixture is smooth. Reserve 1/2 cup of the butterscotch mixture for glaze. Combine the remainder with the dry mixture and mix well.",
"Spread batter into one 8 inch square buttered baking pan. Drizzle reserved butterscotch mixture over the top. Refrigerate bars for several hours or overnight before cutting and serving. Store leftovers in a covered container in the refrigerator."
],
"image": "https://www.allrecipes.com/img/misc/og-default.png",
"ingredients": [
"3 cups zwieback cracker crumbs",
"2 cups miniature marshmallows",
"1 cup chopped pecans",
"\u2154 cup packed brown sugar",
"1 cup evaporated milk",
"2 cups butterscotch chips",
"\u00bd teaspoon vanilla extract"
],
"language": "en-US",
"source": "allrecipes.com",
"tags": [],
"title": "Butterscotch Bars I",
"url": "http://allrecipes.com/recipe/11089/butterscotch-bars-i/"
} | json |
<reponame>clickp4/bmv2
/* Copyright 2013-present Barefoot Networks, Inc.
*
* 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.
*/
/*
* <NAME> (<EMAIL>)
*
*/
#include <bm/bm_sim/bytecontainer.h>
#include <string>
#include <iostream>
#include <sstream>
namespace bm {
std::string
ByteContainer::to_hex(size_t start, size_t s, bool upper_case) const {
assert(start + s <= size());
std::ostringstream ret;
for (std::string::size_type i = start; i < start + s; i++) {
ret << std::setw(2) << std::setfill('0') << std::hex
<< (upper_case ? std::uppercase : std::nouppercase)
// the int cast was not sufficient 0xab -> 0xffffffab
// << static_cast<int>(bytes[i]);
<< static_cast<int>(static_cast<unsigned char>(bytes[i]));
}
return ret.str();
}
} // namespace bm
| cpp |
<reponame>shengqiangzhang/examples-of-web-crawlers
# -*- coding:utf-8 -*-
from uiObject import uiObject
# main入口
if __name__ == '__main__':
ui = uiObject()
ui.ui_process() | python |
There are more and more children growing up in multilingual environments. Experts say speaking two or more languages helps widen a child's horizons and that there is no one perfect strategy for multilingual education.
Two-and-a-half-year-old Enrique sits on the living room floor, his snub nose poking out over a picture book of colourful triangles, circles and squares. "Ou est le triangle rouge? " — "Where is the red triangle? " — his French mother Chloe Bourrat asks in French. "Ici! " replies Enrique as he taps the red triangle with his finger, beaming at his mother. "Donde esta el circulo amarillo? " — "Where is the yellow circle? " — his Spanish father Juan Koers asks in Spanish. "Aqui! " exclaims Enrique.
Like Enrique and his 8-month-old sister Alice, who live with their parents near Madrid, more and more children around the world are growing up with two or more languages at the same time.
Though the parents usually speak Spanish together, Bourrat speaks almost exclusively French with the two children, while Koers almost always speaks Spanish. Experts call this approach "one person, one language. " It is one of several methods that have established themselves in multilingual education.
Yeliz Gözmez from Frankfurt has chosen a different approach with her family. She and her husband were both born in Turkey, and at home they speak Turkish with their daughters Melissa (7) and Mila (4). "Away from home — that is, at day care, at school and in their free time — the children speak German," says their mother. Experts call this method "Away from home versus at home. " (Also Read | 5 love language ideas to strengthen your long-distance relationship)
There is also the activity-based method, whereby family members might speak Arabic during mealtimes but English when playing a game. And there is also the time-based method, when children might speak Chinese in the morning while getting dressed and eating breakfast but switch to German in the evening.
Many parents wonder which method is best, but research shows that multilingual education doesn't depend on one perfect strategy. "It's more about stimulating a child with language as often and in as many different ways as possible," says Wiebke Scharff Rethfeldt, a professor at the City University of Applied Sciences in Bremen.
She says that parents should talk to children about as many different topics as possible. However, this does not mean they have to follow strict rules about which language to use but should instead choose the one they feel most comfortable with. "That can be their own native language, but it doesn't have to be," she explains.
"French and Spanish are simply the languages that feel most natural to us respectively and in which we speak to the children quite automatically," says Koers. "Turkish is the language in which we can best express our feelings," says Göcmez.
According to Scharff Rethfeldt, expressing feelings and providing comfort and intimacy are the vital factors. "It is not about being a language teacher, but a parent building an emotional bond with a child," she says.
She also explains that parents do not have to stick to the language they feel most comfortable with all the time. "Always separating languages reflects a monolingual, monocultural mindset. That does not match our current world," she says. Scharff Rethfeldt suggests that families be flexible and switch between languages as it suits them, thus taking the pressure off parents and retaining the fun of learning for the children.
Bourrat and Koers, who both speak both languages almost perfectly, deviate from their "one person, one language" rule when the situation requires it. "For example, when Chloe's mother is visiting from France, I also speak French," says Koers. "Or when we meet with friends in Madrid, I sometimes speak Spanish with Enrique so that everyone can understand and participate in the conversation," adds Bourrat.
But "even mistakes are not dramatic," explains Scharff Rethfeldt. "Children are very robust language learners. They learn the correct grammar rules even if from time to time they hear incorrect sentences. "
The Göcmez family has a similar approach. During DW's phone call with Yeliz Göcmez, one of her daughters asked a question in Turkish. Her mother answered her in German because she was already using that language in the interview.
"At home, we take our children to language islands every now and then," says Göcmez. "We read our daughters a book in German, for example, or listen to German children's songs, even though we speak Turkish the rest of the day. "
A German word might sometimes crop up in a Turkish sentence too, she says: "In everyday life, you simply can't separate 100%. " Experts now agree that mixing languages is perfectly permissible because children know which word belongs to which language. They learn to distinguish languages according to their sounds when they are still in the womb.
"That is bilingualism. Mixing languages is part of it, and that's not at all bad," says Scharff Rethfeldt. "In this way, we show a child: 'Look, I'm also multilingual, I can juggle languages and switch back and forth. That's something great and positive that sets me apart — and you, too. '"
Does bilingual education also have disadvantages? There is a persistent myth that children in a multilingual environment start speaking later — or might even develop language problems. However, this has long been disproved: "Language development disorders are congenital and not triggered by bilingualism," says Scharff Rethfeldt.
About 5 to 8% of children have such a disorder — regardless of whether they are monolingual or bilingual. The problem is that in the latter case, multilingualism is often blamed.
What is true, however, is that a child might take longer to learn to speak his or her two languages as well as a monolingual child of the same age. This is not because he or she might have slower language development, but because it takes more time for a child to receive the same input in one language.
For example, a monolingual child might speak with his or her parents for four hours a day in one language, say, German. A bilingual child might spend the same four hours speaking with their parents, but two of those will be in German and the other two in Arabic, for instance. But that child may well have learned more vocabulary overall in the same amount of time.
For many experts, multilingual education has few disadvantages and many advantages. One of these, says Göcmez, is that her children can easily communicate with their relatives. "The Turkish language is like a bridge to the grandparents," she says.
"If you're able to communicate in more than one language, you have access to different cultures and ways of life," says Scharff Rethfeldt. "As a result, you are more inclined to reflect on your own perspectives — and become a bit smarter as a result. "
Another advantage is that when children already speak two languages, it is much easier for them to learn other languages. "Children who grow up bilingual already know that you can't translate expressions one-to-one," the bilingualism expert says.
Yeliz Göcmez has also noticed this, particularly with an au pair who recently moved in with the family and speaks English with the children. She says that Mila has absorbed this new language like a sponge: "She already speaks in complete sentences using 'because' and 'but,' for instance. That was really a nice surprise for us. " | english |
/*
Copyright 2018 Planet Labs Inc.
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 kubernetes
import (
"io/ioutil"
"net/http"
"github.com/pkg/errors"
admission "k8s.io/api/admission/v1beta1"
)
// A Reviewer reviews admission requests.
type Reviewer interface {
Review(*admission.AdmissionRequest) *admission.AdmissionResponse
}
// AdmissionReviewWebhook returns a new admission review webhook. Admission
// requests are reviewed by the supplied Reviewer.
func AdmissionReviewWebhook(r Reviewer) http.HandlerFunc {
return func(w http.ResponseWriter, rq *http.Request) {
b, err := ioutil.ReadAll(rq.Body)
if err != nil {
http.Error(w, errors.Wrap(err, "cannot read request body").Error(), http.StatusBadRequest)
return
}
if len(b) == 0 {
http.Error(w, "cannot parse empty request body", http.StatusBadRequest)
return
}
ar := &admission.AdmissionReview{}
if _, _, err := serializer.Decode(b, nil, ar); err != nil {
http.Error(w, errors.Wrap(err, "cannot decode request body as admission review").Error(), http.StatusBadRequest)
return
}
if ar.Request == nil {
http.Error(w, "admission review must contain a request", http.StatusBadRequest)
return
}
serializer.Encode(&admission.AdmissionReview{Response: r.Review(ar.Request)}, w) // nolint:gosec,errcheck
}
}
| go |
package szszhospital.cn.com.mobilenurse.fragemt;
import android.databinding.ViewDataBinding;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import szszhospital.cn.com.mobilenurse.base.BasePresenter;
import szszhospital.cn.com.mobilenurse.base.BasePresenterFragment;
import szszhospital.cn.com.mobilenurse.base.BaseView;
import szszhospital.cn.com.mobilenurse.event.SelectPatientEvent;
public abstract class BaseDoctorFragment<T extends ViewDataBinding, P extends BasePresenter> extends BasePresenterFragment<T, P> implements BaseView {
@Override
protected void init() {
super.init();
EventBus.getDefault().register(this);
}
@Override
public void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void selectedPatient(SelectPatientEvent event) {
initData();
}
}
| java |
<gh_stars>0
{
"base_spec": "/pa/ammo/base_beam/base_beam.json",
"damage": 800,
"fx_trail": {
"filename": null
},
"lifetime": 1,
"spawn_layers": "Orbital",
"splash_damage": 150,
"splash_radius": 10
} | json |
def banner(message, length, header='=', footer='*'):
print()
print(header * length)
print((' ' * (length//2 - len(message)//2)), message)
print(footer * length)
def banner_v2(length, footer='-'):
print(footer * length)
print()
| python |
The Enforcement Directorate (ED) on Friday issued summons to businessman Vijay Mallya in connection with the money laundering case against him, while two of his former employees were quizzed by the agency. He has been asked to present himself before the investigating team on March 18.
Refuting the allegations that he was evading the law, Mr. Mallya defended himself on the microblogging site, Twitter. “I am an international businessman. I travel to and from India frequently. I did not flee from India and neither am I an absconder. Rubbish,” he said, adding that as an Indian MP, he fully respected and would comply with the law of the land.
In what seems to be a veiled threat, Mr. Mallya claimed that he had extended favours to many people in the media.
“Let media bosses not forget help, favours, accommodation that I have provided over several years which are documented. Now lies to gain TRP? ” he tweeted. Mr. Mallya, through a series of tweets, said: “Once a media witch hunt starts, it escalates into a raging fire where truth and facts are burnt to ashes. "
He also targeted the editor of a television news channel. | english |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.