text
stringlengths
1
1.04M
language
stringclasses
25 values
// Copyright 2020 Hewlett Packard Enterprise Development LP package nimbleos // NsVolumeListReturn - Object containing a list of volume names and IDs. // Export NsVolumeListReturnFields for advance operations like search filter etc. var NsVolumeListReturnFields *NsVolumeListReturn func init() { NsVolumeListReturnFields = &NsVolumeListReturn{} } type NsVolumeListReturn struct { // VolList - A list of volume names and IDs. VolList []*NsVolumeSummary `json:"vol_list,omitempty"` }
go
<gh_stars>0 from __future__ import unicode_literals from django.test import override_settings from channels import route_class from channels.exceptions import SendNotAvailableOnDemultiplexer from channels.generic import BaseConsumer, websockets from channels.tests import ChannelTestCase, Client, HttpClient, apply_routes @override_settings(SESSION_ENGINE="django.contrib.sessions.backends.cache") class GenericTests(ChannelTestCase): def test_base_consumer(self): class Consumers(BaseConsumer): method_mapping = { 'test.create': 'create', 'test.test': 'test', } def create(self, message, **kwargs): self.called = 'create' def test(self, message, **kwargs): self.called = 'test' with apply_routes([route_class(Consumers)]): client = Client() # check that methods for certain channels routes successfully self.assertEqual(client.send_and_consume('test.create').called, 'create') self.assertEqual(client.send_and_consume('test.test').called, 'test') # send to the channels without routes client.send('test.wrong') message = self.get_next_message('test.wrong') self.assertEqual(client.channel_layer.router.match(message), None) client.send('test') message = self.get_next_message('test') self.assertEqual(client.channel_layer.router.match(message), None) def test_websockets_consumers_handlers(self): class WebsocketConsumer(websockets.WebsocketConsumer): def connect(self, message, **kwargs): self.called = 'connect' self.id = kwargs['id'] def disconnect(self, message, **kwargs): self.called = 'disconnect' def receive(self, text=None, bytes=None, **kwargs): self.text = text with apply_routes([route_class(WebsocketConsumer, path='/path/(?P<id>\d+)')]): client = Client() consumer = client.send_and_consume('websocket.connect', {'path': '/path/1'}) self.assertEqual(consumer.called, 'connect') self.assertEqual(consumer.id, '1') consumer = client.send_and_consume('websocket.receive', {'path': '/path/1', 'text': 'text'}) self.assertEqual(consumer.text, 'text') consumer = client.send_and_consume('websocket.disconnect', {'path': '/path/1'}) self.assertEqual(consumer.called, 'disconnect') def test_websockets_decorators(self): class WebsocketConsumer(websockets.WebsocketConsumer): strict_ordering = True def connect(self, message, **kwargs): self.order = message['order'] with apply_routes([route_class(WebsocketConsumer, path='/path')]): client = Client() client.send('websocket.connect', {'path': '/path', 'order': 1}) client.send('websocket.connect', {'path': '/path', 'order': 0}) client.consume('websocket.connect') self.assertEqual(client.consume('websocket.connect').order, 0) self.assertEqual(client.consume('websocket.connect').order, 1) def test_simple_as_route_method(self): class WebsocketConsumer(websockets.WebsocketConsumer): def connect(self, message, **kwargs): self.message.reply_channel.send({'accept': True}) self.send(text=message.get('order')) routes = [ WebsocketConsumer.as_route(attrs={"strict_ordering": True}, path='^/path$'), WebsocketConsumer.as_route(path='^/path/2$'), ] self.assertIsNot(routes[0].consumer, WebsocketConsumer) self.assertIs(routes[1].consumer, WebsocketConsumer) with apply_routes(routes): client = HttpClient() client.send('websocket.connect', {'path': '/path', 'order': 1}) client.send('websocket.connect', {'path': '/path', 'order': 0}) client.consume('websocket.connect', check_accept=False) client.consume('websocket.connect') self.assertEqual(client.receive(json=False), 0) client.consume('websocket.connect') self.assertEqual(client.receive(json=False), 1) client.send_and_consume('websocket.connect', {'path': '/path/2', 'order': 'next'}) self.assertEqual(client.receive(json=False), 'next') def test_as_route_method(self): class WebsocketConsumer(BaseConsumer): trigger = 'new' def test(self, message, **kwargs): self.message.reply_channel.send({'trigger': self.trigger}) method_mapping = {'mychannel': 'test'} with apply_routes([ WebsocketConsumer.as_route( {'method_mapping': method_mapping, 'trigger': 'from_as_route'}, name='filter', ), ]): client = Client() client.send_and_consume('mychannel', {'name': 'filter'}) self.assertEqual(client.receive(), {'trigger': 'from_as_route'}) def test_websockets_demultiplexer(self): class MyWebsocketConsumer(websockets.JsonWebsocketConsumer): def connect(self, message, multiplexer=None, **kwargs): multiplexer.send(kwargs) def disconnect(self, message, multiplexer=None, **kwargs): multiplexer.send(kwargs) def receive(self, content, multiplexer=None, **kwargs): multiplexer.send(content) class Demultiplexer(websockets.WebsocketDemultiplexer): consumers = { "mystream": MyWebsocketConsumer } with apply_routes([route_class(Demultiplexer, path='/path/(?P<id>\d+)')]): client = HttpClient() client.send_and_consume('websocket.connect', path='/path/1') self.assertEqual(client.receive(), { "stream": "mystream", "payload": {"id": "1"}, }) client.send_and_consume('websocket.receive', text={ "stream": "mystream", "payload": {"text_field": "mytext"}, }, path='/path/1') self.assertEqual(client.receive(), { "stream": "mystream", "payload": {"text_field": "mytext"}, }) client.send_and_consume('websocket.disconnect', path='/path/1') self.assertEqual(client.receive(), { "stream": "mystream", "payload": {"id": "1"}, }) def test_websocket_demultiplexer_send(self): class MyWebsocketConsumer(websockets.JsonWebsocketConsumer): def receive(self, content, multiplexer=None, **kwargs): self.send(content) class Demultiplexer(websockets.WebsocketDemultiplexer): consumers = { "mystream": MyWebsocketConsumer } with apply_routes([route_class(Demultiplexer, path='/path/(?P<id>\d+)')]): client = HttpClient() with self.assertRaises(SendNotAvailableOnDemultiplexer): client.send_and_consume('websocket.receive', path='/path/1', text={ "stream": "mystream", "payload": {"text_field": "mytext"}, }) client.receive()
python
<reponame>radityagumay/BenchmarkSentimentAnalysis_2 <HTML><HEAD> <TITLE>Review for Bad Behaviour (1993)</TITLE> <LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0106340">Bad Behaviour (1993)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?James+Berardinelli"><NAME></A></H3><HR WIDTH="40%" SIZE="4"> <PRE> BAD BEHAVIOUR A film review by <NAME> Copyright 1993 <NAME></PRE> <PRE>BAD BEHAVIOUR</PRE> <PRE>Rating (Linear 0 to 10): 6.9</PRE> <PRE> Date Released: varies Running Length: 1:46 Rated: R (Language, mature themes)</PRE> <PRE> Starring: <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME> Director: <NAME> Producer: <NAME> Screenplay: Les Blair (and his actors) Music: <NAME> Released by October Films</PRE> <P>BAD BEHAVIOUR could easily be called A FEW DAYS IN THE LIFE OF GERRY AND ELLIE McALLISTER if that title was commercially viable. Set in North London, this film is about the trials and tribulations in the McAllister household. Gerry (<NAME>), a building planner, is currently working on legalizing a local trailer site. Ellie (<NAME>) works part time at a bookstore while also caring for two children and making tea for the veritable army of people who parade through her house and her life. Among them are her friend Jesse (<NAME>gins), a divorcee whose anger at her ex-husband is straining her relationship with her daughter; Howard Spink (<NAME>), a shady character who's always involved in one scam or another; and the Nunn brothers (both played by <NAME>), a pair of identical twins who are remodeling her bathroom.</P> <P>Reminiscent in tone, if not content, to M<NAME>'s LIFE IS SWEET, BAD BEHAVIOUR can (perhaps unfairly) be pigeonholed into the "slice of life" motion picture category. The film really doesn't go anywhere, but the audience experiences an easygoing, amiable ride along the way. When all is said and done, little happens in this movie except that we've gotten to know a few interesting and witty characters. We come in on the story long after it's started, and depart long before it's finished. Nevertheless, it's highly unlikely that anyone will feel cheated.</P> <P>At first I thought <NAME> was giving a rather lackluster performance, but continuing exposure to his Gerry brought a revelation: Rea had immersed himself so completely in the role that what I was reacting to was Gerry himself - a stodgy, rather uninspiring sort of individual. Likewise, <NAME> dons her part with considerable flair.</P> <P>Most of the humor in BAD BEHAVIOUR is dry, but there are a few instances likely to spark laughter (most of which involve Howard or the Nunn brothers). As is usually the case in the best examples of these sorts of films, there's an element of poignancy present, but it's neither maudlin enough to sidetrack the production, nor overt enough to lead to straight melodrama. Everything is kept in the proper proportion, leading to an energetic, entertaining movie-going experience.</P> <P>Perhaps as interesting as the movie itself is the story of how it was brought into being, and how the characters came to be developed. If the writing credit above looks a little odd, it's because director <NAME> relied as much upon his cast as himself to develop Gerry, Ellie, and friends. BAD BEHAVIOUR comes close to being an improvisational motion picture.</P> <P>Blair started out with a two-page outline of his story. Three months before the start of principal photography, he held meetings with the actors to flesh out their characters. From there, the writer/director developed a 25-page script that described the storyline, but contained no dialogue (the characters' lines were developed during the rehearsals). Meanwhile, the actors began immersing themselves in their new alter-egos, so that when filming began, no transition was necessary. Rea and Cusack had, in a sense, become Gerry and Ellie.</P> <P>BAD BEHAVIOUR is an intelligent, insightful film that suffers only from uneven pacing and an occasional tendency to be too "talky". Once it gets going, the movie is intensely fascinating, but it takes nearly half the running length before the audience begins to get a real feel for the characters and situations. BAD BEHAVIOUR's strengths are much more apparent than its weaknesses, however, and it's worth a trip to a theater.</P> <P>- <NAME> (<A HREF="mailto:<EMAIL>"><EMAIL></A>)</P> <PRE>. </PRE> <HR><P CLASS=flush><SMALL>The review above was posted to the <A HREF="news:rec.arts.movies.reviews">rec.arts.movies.reviews</A> newsgroup (<A HREF="news:de.rec.film.kritiken">de.rec.film.kritiken</A> for German reviews).<BR> The Internet Movie Database accepts no responsibility for the contents of the review and has no editorial control. Unless stated otherwise, the copyright belongs to the author.<BR> Please direct comments/criticisms of the review to relevant newsgroups.<BR> Broken URLs inthe reviews are the responsibility of the author.<BR> The formatting of the review is likely to differ from the original due to ASCII to HTML conversion. </SMALL></P> <P ALIGN=CENTER>Related links: <A HREF="/Reviews/">index of all rec.arts.movies.reviews reviews</A></P> </P></BODY></HTML>
html
from collections import OrderedDict from inspect import Parameter, signature import pytest from attr import define from incant import Incanter def test_simple_dep(incanter: Incanter): def func(dep1) -> int: return dep1 + 1 with pytest.raises(TypeError): incanter.invoke(func) assert signature(incanter.prepare(func)).parameters == { "dep1": Parameter("dep1", Parameter.POSITIONAL_OR_KEYWORD) } incanter.register_hook(lambda p: p.name == "dep1", lambda: 2) assert incanter.invoke(func) == 3 assert signature(incanter.prepare(func)).parameters == {} assert signature(incanter.prepare(func)).return_annotation is int def test_nested_deps(incanter: Incanter): incanter.register_hook(lambda p: p.name == "dep1", lambda dep2: dep2 + 1) incanter.register_hook(lambda p: p.name == "dep2", lambda: 2) def func(dep1): return dep1 + 1 assert signature(incanter.prepare(func)).parameters == {} assert incanter.invoke(func) == 4 def test_nested_partial_deps(incanter: Incanter): incanter.register_hook( lambda p: p.name == "dep1", lambda dep2, input: dep2 + input + 1 ) incanter.register_hook(lambda p: p.name == "dep2", lambda: 2) def func(dep1): return dep1 + 1 assert signature(incanter.prepare(func)).parameters == { "input": Parameter("input", Parameter.POSITIONAL_OR_KEYWORD) } assert incanter.invoke(func, 1) == 5 def test_nested_partial_deps_with_args(incanter: Incanter): incanter.register_hook( lambda p: p.name == "dep1", lambda dep2, input: dep2 + input + 1 ) incanter.register_hook(lambda p: p.name == "dep2", lambda: 2) def func(dep1, input2: float) -> float: return dep1 + 1 + input2 assert signature(incanter.prepare(func)).parameters == OrderedDict( [ ("input", Parameter("input", Parameter.POSITIONAL_OR_KEYWORD)), ( "input2", Parameter("input2", Parameter.POSITIONAL_OR_KEYWORD, annotation=float), ), ] ) assert incanter.invoke(func, 1, 5.0) == 10.0 def test_nested_partial_deps_with_coalesce(incanter: Incanter): @incanter.register_by_type def dep(arg: float) -> str: return str(arg + 1) def fn(arg: str): return "1.0" + arg assert incanter.invoke(fn, 1.0) == "1.02.0" def test_shared_deps(incanter: Incanter): incanter.register_by_name(lambda dep2, input: dep2 + input + 1, name="dep1") incanter.register_by_name(lambda: 2, name="dep2") def func(dep1, input: float) -> float: return dep1 + 1 + input assert signature(incanter.prepare(func)).parameters == OrderedDict( [ ( "input", Parameter("input", Parameter.POSITIONAL_OR_KEYWORD, annotation=float), ), ] ) assert incanter.invoke(func, 5.0) == 14.0 def test_shared_deps_type_from_dep(incanter: Incanter): """The parameter type definition comes from the dependency.""" @incanter.register_by_name def dep1(dep2, input: float): return dep2 + input + 1 incanter.register_by_name(lambda: 2, name="dep2") def func(dep1, input) -> float: return dep1 + 1 + input assert signature(incanter.prepare(func)).parameters == OrderedDict( [ ( "input", Parameter("input", Parameter.POSITIONAL_OR_KEYWORD, annotation=float), ), ] ) assert incanter.invoke(func, 5.0) == 14.0 def test_shared_deps_incompatible(incanter: Incanter): """Type incompatibilities are raised.""" def dep1(dep2, input: str) -> str: return dep2 + input + "1" incanter.register_hook(lambda p: p.name == "dep1", dep1) incanter.register_hook(lambda p: p.name == "dep2", lambda: 2) def func(dep1, input: float) -> float: return dep1 + 1 + input with pytest.raises(Exception): incanter.prepare(func) with pytest.raises(Exception): incanter.invoke(func, 5.0) def test_class_deps(incanter: Incanter): @define class Dep: a: int incanter.register_hook(lambda p: p.name == "dep", Dep) assert incanter.invoke(lambda dep: dep.a + 1, a=1) assert signature(incanter.prepare(lambda dep: dep.a + 1)).parameters == OrderedDict( [ ( "a", Parameter("a", Parameter.POSITIONAL_OR_KEYWORD, annotation=int), ), ] ) def test_no_return_type(incanter: Incanter): """Registering by type with no return type is an error.""" def dep(): return 1 with pytest.raises(Exception): incanter.register_by_type(dep) def test_optional_arg(incanter: Incanter): """Registering by type with no return type is an error.""" @incanter.register_by_name def dep(i=1): return i assert incanter.invoke(lambda dep: dep + 1) == 2 assert incanter.invoke(lambda dep: dep + 1, 2) == 3 assert signature(incanter.prepare(lambda dep: dep + 1)).parameters == { "i": Parameter("i", Parameter.POSITIONAL_OR_KEYWORD, default=1) } def test_same_type_arg_coalescing(incanter: Incanter): @incanter.register_by_name def dep(i: int) -> int: return 1 def fn(i: int, dep: int) -> int: return i + dep assert incanter.invoke(fn, 1) == 2
python
The council made this recommendation after a road safety organization filed a complaint alleging that the promo is against traffic laws. Consumer unity and trust society (cuts) filed a complaint against the promotional campaign, which depicts Dhoni as a bus driver who stops the bus on a crowded road. When a traffic cop arrives on the scene and queries Dhoni about his behavior, he responds that they are watching the 'super over' of an IPL match. The traffic officer says this is routine during IPL. The issue was taken into consideration by the ASCI, a voluntary industry organization. Following that, members of the council's consumer complaints committee (CCC) saw the advertisement with a representative of the firm that created it. The ASCI identified a breach of its rules and ordered the advertising business to either edit or withdraw the commercial by April 2022. The corporation has responded and said that it will withdraw. Here's the IPL Promo Video:
english
Former Indian skipper MS Dhoni is arguably one of the most successful captains in the history of world cricket, having led his team to victory in the inaugural 2007 ICC World T20, the 2010 and 2016 Asia Cups, the 2011 ICC Cricket World Cup and the 2013 ICC Champions Trophy. After recent discussions between Indian captain Virat Kohli, head coach Ravi Shastri and Rohit Sharma, the BCCI roped in Dhoni as the team mentor specifically for this tournament. The former skipper was appointed to provide support and direction to the Indian team management, as per BCCI secretary Jay Shah's statement. Speaking about Dhoni's special inclusion in the team, former Indian cricketer Farokh Engineer mentioned, "IPL has mentors. Dhoni has always and still has got the Midas touch and whatever he has touched has turned into gold. I would hope that Dhoni brings us extra luck and I'm sure his knowledge would be extremely useful. " "What does a mentor do? It's an honorary thing. Sachin Tendulkar is the mentor of Mumbai Indians. And it’s lovely to have guys like him and Sachin around. In our time, once you give up the game, people forgot us. But today, fans do not forget. If you're a good and attractive cricketers, fans will always remember you. Dhoni is not the type to interfere with something or somebody. If he sees that something could be done better, I'm sure he would suggest it in a very clever way to Ravi and Virat," he added. Follow us on Google News and stay updated with the latest!
english
An investigating officer of the Serious Fraud Investigation Office (SFIO) today told the Special Court for Economic Offences here that B Ramalinga Raju and four other former directors of Satyam Computers had not disclosed full particulars of the firm to the Registrar of Companies (ROC) for two fiscal years. In his deposition before the court, Subhash Sarsonia, alleged that Satyam Computers and its directors violated Section 220 (1) of Companies Act by not disclosing full particulars (balance sheets and annual reports for the period of 2006-07 and 2007-08) to the Registrar of Companies. The court also marked 14 documents related to annual reports of Satyam Computers and later posted the case for cross-examination of Sarsonia to December 21. SFIO, investigation arm of the Union Corporate Affairs Ministry, had filed seven complaints against 11 directors of Satyam for alleged violations under different sections of the Companies Act in the Special Court here last December. Satyam founder Ramalinga Raju, former managing director B Rama Raju and its ex-CFO Vadlamani Srinivas, who are under judicial custody in connection with the multi-crore accounting fraud in the firm, were present during the examination of the witness. Along with the three, Satyam’s then Company Secretary G Jayaraman and Ram Mynampati, the then Satyam’s whole time director have also been named as accused. Trial in this case began in June this year. The cases filed by SFIO against Satyam Computers include violations by way of furnishing distorted figures of profit and loss, distribution of dividend on a non-existing profit of Rs 1,715. 75 crore when there was actually a loss of Rs 44. 43 crore and failure of balance sheets to reflect particulars of employees.
english
{ "name": "sequelize-utility", "version": "1.0.11", "description": "Sequelize Helper", "main": "index.js", "dependencies": { "debug": "^4.1.1" }, "devDependencies": {}, "keywords": [ "sequelize", "sequelize-help", "orm-helper" ], "repository": { "type": "git", "url": "https://github.com/tahsinature/sequelize-utility.git" }, "author": "Tahsin", "license": "MIT" }
json
For many app developers, TestFlight was a ray of sunshine that offered desperately needed beta testing tools in the early days of the App Store. I remember many developer friends literally asking TestFlight co-founders Ben Satterfield and Trystan Kosmynka to take their money. They haven’t done so yet, but as of today they’re offering even more to developers, thanks to the launch of FlightPath, an analytics platform made for mobile. FlightPath is a new entrant in the wold of mobile-first analytics, which includes recent offerings from Mixpanel, Flurry, Keen and others. But the approach taken by TestFlight, and Burstly, the parent company that acquired them in March last year, aims to be different through simplicity and a focus on easy customization. Walking me through the FlightPath dashboard, Satterfield and company show clearly that it’s not only about keeping things on one page, but making sure that the data is flexible and can be instantly manipulated to drill down to specific elements. Clicking on any number or graph point in the dashboard automatically updates information, giving you data relevant to that specific piece of your app’s tracked activity. So, for instance, you can look exclusively at users who have signed up after a specific date, see a path analysis of what actions they’ve triggered within your app, and even get a closer look at how frequently something like making an in-app purchase is linked to deeper engagement or further transactions. Specific views can be saved for later recovery, too, making it so you don’t have to tweak and adjust to get at drilled down information that you find particularly interesting. And FlightPath will also come with some preset configurations built in, so that you can easily see segments like your most-engaged users, those who are at risk of abandoning your app altogether, crashes broken down by device model and more. Maybe the best part of FlightPath though is that it’s incredibly easy for existing TestFlight users to get running. The beta product launches today, and TestFlight and Burstly will be choosing participants for that pool from existing TestFlight users, who already have everything they need to get started if they have the TestFlight SDK installed in their app. The team says they can start pulling data with a flip of the switch to populate FlightPath from the existing TestFlight SDK. That said, FlightPath and TestFlight will be offered as separate products, the company explained, since they don’t want to handcuff anyone who wants to use one to the other. Nonetheless, they work together in a very complimentary manner, and TestFlight’s existing devoted following provides a good starting pool of potential FlightPath users. One of the biggest challenges though was living up to TestFlight’s standards, and making sure that it could suit the needs of the incredibly broad range of TestFlight’s existing hundreds of thousands of users. And for now, it’s still free, though the company still says paid plans will be coming soon to cater to high volume users and offer services that enterprise and large shops would be interested in having. The first release is intended to be a starting point for gathering feedback from the pool of test developers, so it isn’t clear yet when FlightPath will release to the general public, but even at this stage it looks like something that will appeal to a lot of mobile developers.
english
116/7 (17. 0 ov) 119/4 (16. 1 ov) 172/7 (20. 0 ov) 157 (20. 0 ov) Karnataka will look to top the points table as they take on Punjab in the Ranji Trophy. Mumbai will aim for a quarter-finals berth as they take on Odisha in the Ranji Trophy. Wasim Jaffer will lead Mumbai for Ranji tie against Odisha starting on December 14 in Mumbai. Varun Aaron returns after injury, which put him out of action for nearly two years. Manojit Ghosh has been barred from playing any BCCI organised tournaments. Wasim Jaffer was appointed the captain of Mumbai squad. Opener Harshad Khadiwale smashed a run-a-ball 74 to power Maharashtra to an emphatic nine-wicket win over Jammu and Kashmir in Group C match of the Ranji Trophy, on Monday. Virender Sehwag again came cropper in his desperate bid to cross 50-run mark as Delhi managed three points by virtue of their first innings lead against Odisha in a group A Ranji Trophy encounter on Monday. Railways pace duo of Anureet Singh and Krishna Kant Upadhyay took 35 balls to dismiss the remaining three Bengal batsmen as the home team got three important points by virtue of their first innings lead of 36 runs in a Ranji Trophy Group B encounter in New Delhi on Monday.
english
A startup called Final wants to change the way people use credit cards — or rather, the company wants to change the credit card industry to fit consumers’ lifestyles. With a 1 percent cash-back bonus and no annual fee, Final offers a competitive credit card product, but it really excels in the flexibility it provides in the way consumers can manage virtual cards across multiple vendors. If you’re like most of the people who read this site, you probably have a Spotify account and a Netflix account, and maybe you subscribe to one or more online video services. You probably have a card on file at Amazon.com and shop a variety of different e-commerce sites. Who knows, maybe you pay monthly for some sort of subscription box that used to be all the rage a few years ago. Increasingly more of your purchases are moving online, and you probably pay for all of those goods services with the same credit card. And what happens if that credit card is ever lost or stolen? Well, you’ll need to get a new one, but that’s only the beginning of the hassle that comes with a compromised account. You’ll also need to update your card information with all the subscription service, e-commerce sites and online vendors that you happen to use. But what if I told you there was a way to have a different card number on file for each individual service? And what if I told you that each of those different card numbers would be aggregated into one single payment that you make monthly? That’s the beauty of what Final is doing: It allows its credit card customers to create an unlimited number of virtual cards that they can specify to use with various different online services. And if one of those cards is ever compromised, or even if they want to just cancel or stop paying for a service, all they need to do is delete the virtual card. Final customers still get a single physical card in the mail, but they may never use it. And that will be the last piece of mail they’ll receive from the company. All other correspondence, including statements, happens online — and in the case of a problem, Final is eschewing complicated phone support trees and moving to email-first support. In other words, Final is trying to build a credit card product for how consumers would like to interact with their accounts today. They want to be paperless, they want flexibility in managing their accounts, and they want more control over the ability to sign up for and cancel subscription services. Also, consumers want instant approval upon application, something that Final can deliver on. It can approve and activate customers immediately, meaning they can begin creating virtual cards and using the service before a physical card is ever even mailed to them. To do all that, the Final team spent more than two years building up its tech stack from scratch, which enables it to issue a near-infinite number of virtual cards. With that technology in place, the company is coming to market with a consumer-facing product, looking to take a small piece of the $6 trillion consumer credit card market. But Final could also serve enterprise customers that want a turnkey solution for issuing and managing credit cards. Final has raised $4 million from investors that include 1776, Canyon Creek Capital, DRW Venture Capital, Kima Ventures, KPCB Edge, Ludlow Ventures, Michael Liou, Right Side Capital Management, T5 Capital, Wei Guo, Y Combinator and Zillionize Angel.
english
Buying a home, especially if it’s your first time, can be confusing and stressful. But giving yourself enough time to prepare can make it a little easier. Mortgage rates are currently well above the record lows of the past few years, making affordability a major concern for many buyers. But experts say you shouldn’t let the current rate environment deter you from getting into a home. Still, taking on a mortgage is often the biggest financial decision you’ll make in your lifetime. Understanding the process ahead of time, familiarizing yourself with key terms and anticipating costs prior to closing can make all the difference when getting a mortgage. Here’s what you need to know about how to get a mortgage and how to choose the right mortgage and lender for you. Before making an important financial decision, like taking out a mortgage, it’s important to do a financial checkup to assess where you’re at. When it comes to getting a mortgage, you should focus on two things: building your credit and growing your savings. Having more cash on hand and a stronger credit score will make it easier to afford a wider range of homes. The minimum credit score required to get a mortgage depends on the mortgage type and lender. Conventional mortgages backed by Fannie Mae or Freddie Mac have minimum credit score requirements of 620, although individual lenders may set their own, higher credit score requirements on top of that. You’ll generally have better approval odds and mortgage options with a higher credit score. While it may be possible to get a mortgage with bad credit, it’ll also cost more. The lower your credit score, the higher your mortgage interest rate (and thus your monthly payments). Strengthening your credit by paying bills on time and paying off debt can make a mortgage more affordable. How much house you can afford goes beyond just the monthly mortgage payment. You’ll also need a sizable chunk of cash for upfront closing costs -- which can average between 3% and 6% of the purchase price -- and, in some cases, a down payment. Your down payment could end up costing tens of thousands of dollars. A healthy down payment is 20% of the home’s value, but each type of mortgage has different minimum requirements. It’s possible to buy a home with a smaller down payment -- some conventional loans require as little as 3% for a down payment -- and in some cases you can avoid a down payment altogether. You can also look for down payment assistance programs, which are designed to help first-time homeowners or buyers with low-to-moderate income better afford a home. Pro tip: Contributing to a savings account regularly, particularly one that earns a high yield, can help you better afford those costs when you’re ready to buy a home. Right now, high-yield savings accounts are offering rates between 4.00% and 5.00% APY, so you can earn additional interest on your down payment fund. If you’re not planning on buying a home for a few years, you can lock in a high-yielding CD rate for over 5.00% at some banks. To get a good idea of what your monthly mortgage payment will look like, you can use CNET’s mortgage calculator to estimate your monthly payments. But keep in mind that how much you feel you can comfortably fit into your budget may be more or less than what a bank is willing to lend to you. One of the ways your mortgage lender determines how much you can borrow is by looking at your debt-to-income ratio. Your DTI shows lenders what percent of your income goes to debt each month. You can calculate it by dividing your monthly debt payments by your monthly income before taxes. You should include your estimated monthly mortgage payment in this number. For example, let’s say you make $6,000 a month, pay $500 a month in debt payments and your estimated monthly mortgage payment is $2,000. In this case, your DTI is 42% ($2,500 divided by $6,000). Lenders may approve you for a mortgage if your DTI is 45% or lower. So while you may be approved for a mortgage in the above scenario, you can increase your chances of approval and lower your DTI by paying down any existing debt before applying for a mortgage. But just because a lender approves you for a certain amount, it doesn’t mean you should spend this much on a home. A good rule of thumb is to keep your DTI below 36%. That includes not just your mortgage payment, but all of your other monthly debts. So, if you make $6,000 a month, you’ll want to keep your monthly debts -- including your estimated mortgage payment -- under $2,160. You should also understand the different types of mortgages available. Down payment requirements, repayment terms and mortgage insurance requirements also vary by mortgage type. No two loans are exactly the same, so getting guidance on what makes sense for your situation is key. Conventional loans are a good option for buyers with solid credit and a 10% to 20% down payment saved up, though some conventional loans require as little as 3% down. Conventional loans are widely available with most banks, credit unions and private lenders. Government-insured loans like an FHA loan, VA loan or USDA loan can offer unique benefits that conventional loans cannot and are worth considering if you qualify for them. - FHA loans are offered by the Federal Housing Administration and are meant to make homeownership more accessible. They’re easier to qualify for than conventional loans -- often requiring a down payment as low as 3.5% and a minimum credit score of 580 in most cases. - VA loans are backed by the US Department of Veterans Affairs. To qualify for a VA loan, you must be an active or retired member of the military or a spouse of one. VA loans allow you to buy a house without a down payment -- and don’t charge private mortgage insurance either. But they do come with an origination fee, which you can roll into the loan. - USDA loans, backed by the US Department of Agriculture, provide home loans to middle- and low-income families purchasing homes in qualifying rural and suburban areas. These loans offer lower interest rates than conventional mortgages as well as more lenient credit requirements and no down payment. They also require an upfront guarantee fee and an annual USDA loan fee. Jumbo loans are a good option if you need to finance more than $726,200 for your home (loan limits vary across the country). These loans may allow borrowers to take up to $2 million in a mortgage, but require a strong credit score and high down payment to qualify. Each lender may set their own rules for a jumbo loan, so it’s important to ask upfront about eligibility and terms. Your mortgage term refers to how long you’ll be paying off your loan. Typical mortgage terms are 10 years, 15 years and 30 years. This has a big impact on your monthly payments and how much interest you pay over the life of the loan. A longer loan will have smaller monthly payments, because the purchase amount is spread out over a longer period of time. A shorter-term loan will have larger payments but, over time, save you money on interest. This is because shorter loans usually have lower interest rates and you’re paying the loan off in a shorter amount of time. Mortgages can also vary in terms of interest rate structure as well. There are fixed-rate loans, which have the same interest for the duration of the mortgage. And then there are adjustable-rate mortgages, or ARMs, which have a fixed rate for a set period of time, then switch to a variable interest rate that changes annually based on market conditions. Most homeowners opt for a fixed-rate mortgage for predictability -- you’ll know how much you’ll owe each month since your rate will never change. But if you think you’ll sell the home after a few years or refinance in the near future, you might consider an ARM with a fixed-rate term that matches your timeline. This can save you money, since ARMs typically have lower interest rates during the initial introductory period before the rate adjusts. Once you have an idea of the type of mortgage you’re looking for, you’ll want to compare offers from multiple lenders before signing with any particular one. It’s all about working with a lender you feel comfortable with and you trust to understand your situation. “With the level of volatility in the mortgage market, you need a lender who has every single tool and knows how to use them to help you get the best deal,” says Jennifer Beeston, senior vice president at Guaranteed Rate, a national mortgage lender. This will ensure you get the best rate and most amenable loan terms based on your financial situation. Even a small difference in your interest rate could save -- or cost -- you thousands of dollars over the life of your loan. “Buyers should be asking their lenders, ‘Can you lock my rate while I shop? What should I expect with rates? What have you seen with rates? Should I expect to pay discounts?’” Beeston says. Once you’ve narrowed down lenders, you’ll want to get preapproved for a mortgage. Mortgage preapproval gives you a good idea of how much you’re likely to be approved to borrow and shows sellers you’re a qualified buyer. To get preapproved, a lender will check your credit score and proof of income, assets and employment. If approved, the lender will send you a preapproval letter. Even though a preapproval letter doesn’t guarantee you’ll qualify for financing, it shows the seller you have the finances in a place to pass an initial examination from a lender. Most preapproval letters are valid for 60 to 90 days, and when it comes time to apply for a mortgage all of your information will need to be reverified. Also, don’t confuse preapproval with prequalification. A prequalification is a quick estimate of what you can borrow based on the numbers you share and doesn’t require any documentation. It’s less rigorous than a preapproval and carries less weight. During your research of different lenders, pay attention to whether you’re going to need private mortgage insurance, which can add hundreds of dollars to your monthly mortgage payments. PMI protects a lender in case the borrower defaults on their loan, so it’s your lender’s call whether it will require you to have PMI on your loan. Generally, lenders will require PMI on loans with a down payment of less than 20%. You won’t need PMI on VA loans, even if you don’t put any money down. USDA-guaranteed loans don’t require PMI, but borrowers are instead charged an upfront and annual guarantee fee that serves the same purpose. FHA loans require a one-time Up Front Mortgage Insurance Premium and annual mortgage insurance premium, or MIP, instead of PMI. If you have a conventional loan, you can file a request with your lender to cancel your PMI once you have at least 20% equity in your property. If you don’t request a cancellation, your lender must automatically cancel PMI on the date your loan-to-value ratio, or LTV, reaches 78% based on the original payment schedule, per the Homeowner’s Protection Act. Once you’ve found a house and your bid has been accepted, you can begin the formal application process. You can complete your mortgage application online, over the phone with the lending institution’s loan officer or in person if your lender has a physical branch. The lender will ask for your full name, income information and Social Security Number for a credit check. There will also be some questions about the home you’re looking to purchase. The lender will then provide a loan estimate form within three days of the initial application. If you decide to proceed with the application, the lender will need to verify every part of your finances. Depending on your situation, the list of what you need to submit along with your application can get long. Compiling the necessary paperwork ahead of time could save you some stress and time. Examples of forms you may need to submit include: If you’re self-employed or a freelancer, expect to provide extra documentation such as: Next, the lender will verify that you’re a qualified borrower during a process called underwriting. Your financial health will be closely scrutinized during this step, using the documentation you supplied in the previous step. Your lender may ask for further information or for letters explaining any employment gaps or money received from friends or relatives to help with down payment or closing costs. The underwriting process is meant to answer one question: Are you likely to repay this loan? So during this time, lenders are sensitive to any change in your credit profile. Avoid any big purchases, closing or opening any new accounts and making unusually large withdrawals or deposits. During this step the lender will also authorize a home appraisal to verify the home’s value. You should also schedule a home inspection, which will provide a deeper look at the home’s condition, so you’ll know if there are any damages or issues to raise with the seller before closing. At the close of the underwriting process, you’ll find out if you’re approved for a home loan. Before you get the keys to your new home, you need to finish the closing process, which technically starts when your offer is accepted. As a part of closing, the lender requires a home appraisal to verify its value. You’ll also need to have a title search done on the property and secure lender’s title insurance, as well as homeowner’s insurance. Your lender will also verify that you’re still employed during the closing process, and may even require employment verification up to the day of closing. It can take anywhere from a few weeks to a few months (in a worst-case scenario) before you wrap up with a final walkthrough of the property. After that, all you need to do is sign the dotted line at the closing appointment and your funds will be transferred from escrow.
english
New Delhi: Hockey India has appointed South African Craig Fulton as new chief coach of the Indian men's hockey team. Craig Fulton will succeed Graham Reid who resigned after India’s poor outing at the World Cup in January 2023. tremendous experience in coaching and his work ethic induces confidence in raising the team's performance in world hockey. Craig Fulton has nearly 25 years of coaching experience and earned 195 caps over a span of 10 years for South Africa. He also played Atlanta and Athens Olympic Games.
english
Thursday June 28, 2018, Swati Subodh decided to move from the lab to the labyrinth of India with 1 Million for 1 Billion, which focuses on empowering a million to impact a billion people for economic prosperity. A scientist and not a doctor, Swati Subodh was not trained to interact with patients, let alone be sensitised to the suffering of those at the bottom of the pyramid struggling to survive. But her lab was situated in the middle of clinics inside AIIMS, and she would witness, first-hand, patients and their families streaming in from distant places in India, staying in Delhi for weeks just to get five minutes with a doctor in a horrifically overburdened OPD. Swati grew up in the heart of Delhi; her childhood was steeped in classical dance, western instruments like the Spanish Guitar, books, athletics, and volleyball. She enjoyed biology even when fields like biochemistry were at a nascent stage. Her curiosity and interest, however, got the better of her, and she cracked the best institute for biochemistry in Delhi University, and eventually, procured a PhD from AIIMS, Delhi. Her doctorate work contributed in part towards understanding and developing a local vaccine for Rotavirus - a virus that claims many lives in India in the under the age of 5 years. The vaccine is now available in the market. She joined CSIR as a scientist and built her own team of researchers and students, for translational research for faster, affordable, and accessible healthcare solutions. During her work, she filed a patent for a DNA-based diagnosis method they had developed, where a pathogen’s DNA could be used to predict the progress of disease and intercept it by deciding on the best possible treatment. Having worked in the field for over 15 years, she could spot the lacunae clearly – on why some of the phenomenal work done inside labs never truly reached its intended beneficiaries, the patients. “Billions are spent on research and development, but we continue to grapple with access to basic healthcare to a majority of our population, leading to avoidable deaths and disabilities. I had already started gravitating towards public health since my AIIMS days, but with time the pull got stronger and I finally stepped outside the comfort of my lab,” Swati states. Her desire to add more meaning to her work coincided with a similar introspection-laden phase in the life of her brother, Manav Subodh. 1M1B, or 1 Million for 1 Billion, was his brainchild. He envisaged empowering a million to impact a billion for economic prosperity. His prowess in entrepreneurship training coupled with her infallible experience in healthcare research – not to mention both of their compassion and faith in education and technology to bridge every conceivable gap in healthcare – formed the foundation for 1M1B. The organisation tries to fill the gap between those who have the solutions to a problem (grassroot entrepreneurs) and those who face the problem (civilians who lack the means to access sophisticated healthcare). They provide the former skill training and access to technologies, to help them launch their own microenterprises in problem areas for the latter. 1M1B also provides access to big technology and healthcare giants, to create sustainable entrepreneurship models. Swati points out that the data collected through these enterprises gives a better assessment of the healthcare needs of the area and prospective interventional aspects; this is valuable for governments and corporates eager to access these markets. “We partner with these entities to provide our know-how and execution pipeline to enable last-mile access,” she says. Swati reveals that next in line is the “direct-to-home healthcare delivery” model, which will be anchored by these centres, enhancing access and purpose - not just in Indian villages and Tier II cities, but also in the US and Vietnam. Partnering with Orphan Impact, they work in Vietnamese orphanages to impart entrepreneurial education and life-skills to young adults who would soon be leaving the orphanage upon turning 18, but not be equipped for the uncertainty-ridden futures they were headed into. In the United States of America, they are working with many organisations, focusing on increasing the employability of the economically weak amongst the Black and Hispanic communities. From a grants-only model, 1M1B has now expanded to philanthropic fundraising and the service-model. It started operations in early 2015 with the launch of its village internship program in Delhi. “Almost simultaneously we launched a similar programme in New York and the Caribbean Islands. Our projects were presented by youth leaders at the United Nations Headquarters in New York. In the very first year, they helped a startup raise $25,000 by showcasing them at UC Berkeley's Global Social Venture Competition (GSVC) at Milan,” Swati says. In late 2015, they raised funding from an international organisation to initiate a similar program in Uttarakhand. “Under this, we engaged city youth to work in the villages of Uttarakhand; and thereby started our initiatives in tele-health, rural tourism and livelihood. In villages and Tier II cities, we run the Smart Cities Challenge by engaging other startups,” she says. 1M1B partnered with the University of Berkeley in 2016 for the Smart Village Programme of the Andhra Pradesh government led by Chief Minister Chandrababu Naidu. They also launched the rural co-innovation lab, bringing together startups and rural entrepreneurs for the first time. This time, they created 16 jobs and produced seven entrepreneurs, all in just 3 months. 2017 was a turning point for 1M1B. Through their joint programme, StartUp Gurukool, with the TATA Trusts, they bolstered 21 startups, and created 149 jobs across four states of India in six months. In late 2017, 1M1B received affiliation from the United Nations Department of Public Information (UN DPI) after a rather long and competitive process. Soon after, in 2018, they held their biggest event yet at the United Nations headquarters at New York with 30-odd contingents from India. Swati says they “also work with high school children from urban and rural schools to inculcate the tenets of entrepreneurship in them”. The organisation launched their city programme, Future Leaders, for school children in Bangalore. On completing their 45 curricula, including design-thinking and problem-solving modules, the students are given a choice to execute projects at any of their project sites in villages. “The mother of a 14-year-old student of an international school remarked that she saw a very humbling effect in her daughter post her visit, that she conveyed gratitude for what she had for the first time. She continues to work with us in the village even after her project ended,” Swati recounts. In the next few months, the plan is to expand Future Leaders to other Indian cities and Singapore. Through their relentless championing of the concept of “access for all”, an elderly couple in a remote village in Andhra Pradesh received specialised consultation for managing their diabetes from a doctor in the US, through the use of technology. A cashew farmer of modest means now supplies his products to an international hotel by partnering with a startup they helped. “Every time we entered a new country or area, beneficiaries were very sceptical of our intent. We thus always approach them as our on-ground partners and not someone whom we've come to uplift – and we involve them in building solutions, rather that dumping ready-made solutions on them. We always request our team members based out of villages to attend important meetings with us as there nothing better than a first-hand account and a human face to all the hustle,” Swati recalls. On the personal front, it was challenging for this mother of a young child to travel far and wide, for days on end. “I navigated this issue by using digital platforms to the hilt! I am selective about my travels and go when there is absolutely no other way. At other times I have used online platforms and resources to work with our team members across time zones, mentoring young leaders and also appearing on screen to demonstrate a tele-health prototype to a district collector during a screening camp!” she says.
english
table > thead > tr > th { border-bottom-width: 1px; padding: 12px 8px; vertical-align: middle; } table > tbody > tr > td { padding: 12px 8px; vertical-align: middle; } table > tbody > tr { border-bottom: 1px solid #eee; } table > tbody > tr:last-child { border-bottom: 0; } .blog-post .section-text p { margin-bottom: 30px; } .tablepress { border-collapse: collapse; border-spacing: 0; width: 100%; margin-bottom: 15px; border: none; overflow: hidden; background-color: var(--custom-color-2); } .tablepress td, .tablepress th { padding: 8px; border: none; text-align: left; float: none !important; } .tablepress tbody tr:first-child td { border-top: 0; } .tablepress .row-hover tr:hover td { background-color: var(--custom-color-1); } .tablepress img { margin: 0; padding: 0; border: none; max-width: none; } .tablepress thead th { font-weight: 700; vertical-align: middle; color: var(--custom-color-8); background-color: var(--custom-color-3); font-size: 18px; text-align: center; border-bottom: 1px solid #ddd; } .tablepress tbody tr td { vertical-align: middle; background: var(--custom-color-2); text-align: center; } .item-detail { display: flex; align-items: center; } .item-detail div { margin-right: 15px; } .item-detail img { width: 110px; } .item-detail a { font-weight: 700; font-size: 16px; } .tablepress a:hover { color: var(--custom-color-5); } .tablepress a { color: var(--custom-color-4); } .tablepress.table_s1 .table_s1_thead_title { display: none; } .tablepress.table_s2 .row-hover tr:hover td.column-1 { background: #fff; } .tablepress .su-button { min-width: 170px; } .tablepress a strong { pointer-events: none; } @media (max-width: 767px) { table { max-width: 100%; overflow-x: scroll; display: block; } .tablepress { overflow-x: scroll; display: block; } .tablepress { overflow-y: scroll; display: block; } .tablepress tbody tr { display: flex; flex-direction: column; justify-content: center; width: 100%; text-align: center; min-width: 100%; flex: 1; } .tablepress tbody tr > td { text-align: center; display: block; border: none; background: 0 0 !important; } .tablepress tbody td img { margin-left: auto; margin-right: auto; width: 220px; } .tablepress tbody { display: flex; flex-direction: column; border: 1px solid #e6e6e6; border-radius: 6px; overflow: hidden; } .tablepress tbody tr { padding-bottom: 20px; } .tablepress tbody td.column-2 { padding-top: 15px; } .tablepress tbody tr > td.column-1:empty { display: none; } .tablepress tbody .item-detail a { font-size: 16px !important; font-weight: 600; } .item-detail div { margin: 0 0 15px; } .item-detail { flex-direction: column; margin-top: 10px; } .tablepress.table_s1 thead tr { display: block; } .tablepress.table_s1 thead th { display: none; } .tablepress.table_s1 thead th.column-1 { display: block; width: 100%; font-size: 16px; } .tablepress.table_s1 .table_s1_thead_title { display: block; font-weight: 700; font-size: 14px; } .tablepress.table_s1 tbody { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; } .tablepress.table_s1 thead { border-top-left-radius: 6px; border-top-right-radius: 6px; overflow: hidden; display: block; } .tablepress thead tr th:nth-child(2) { display: none; } .tablepress thead, .tablepress thead tr, .tablepress thead tr th:nth-child(1) { display: block; } } .su-button span { font-size: 18px !important; padding: 0 !important; line-height: 1em !important; }
css
Virat Kohli scored his 45th One Day International century in the 1st match against Sri Lanka in the bilateral series held in Guwahati today. It was also Kohli’s 73rd International century. With this, Kohli broke Indian Cricketing Idol Sachin Tendulkar’s record of most centuries in ODIs against Sri Lanka. Sachin has eight centuries, while Kohli has nine now. With this century, Kohli reached another ODI milestone, equaling Sachin Tendulkar’s record of 20 ODI tons at home. While Tendulkar reached the landmark in 164 matches, Kohli did it in 101 games. Kohli ended his long wait of 1214 days of the century drought in 2022 against Afghanistan in the T20 International World Cup. After this, Kohli bounced back to his erstwhile form and has been performing consistently ever since. Kohli is yet to break the greatest record of Sachin. He is still in the second spot behind Sachin in terms of most ODI and international tons and stands four centuries short of levelling his idol’s tally in the 50-over format. Across formats, he still stands 27 centuries short of Sachin’s 100-ton. Today, he amassed a total of 113 runs in just 87 balls and took the total to a massive 373 runs. Sri Lanka has to chase 374 in 50 overs.
english
The change in the definition of micro, small and medium enterprises (MSME) is set to offer major relief to the downstream sector and boost exports of textile and readymade garments, experts have said. In the package announcement, the threshhold for micro manufacturing and services units was increased to Rs 1 crore by way of investment and Rs 5 crore by turnover. The limit for small units was raised to Rs 10 crore (investment) and Rs 50 crore (turnover). Similarly, the limit of medium units was increased to Rs 20 crore (investment) and Rs 100 crore (turnover). Earlier, these limits were significantly lower than the expanded figures. TO READ THE FULL STORY, SUBSCRIBE NOW NOW AT JUST RS 249 A MONTH. What you get on Business Standard Premium? - Unlock 30+ premium stories daily hand-picked by our editors, across devices on browser and app. - Pick your 5 favourite companies, get a daily email with all news updates on them. - Full access to our intuitive epaper - clip, save, share articles from any device; newspaper archives from 2006. - Preferential invites to Business Standard events. - Curated newsletters on markets, personal finance, policy & politics, start-ups, technology, and more.
english
<reponame>overlookmotel/livepack<gh_stars>10-100 #!/usr/bin/env node /* eslint-disable import/order, import/newline-after-import */ 'use strict'; // Use internal module cache const {useInternalModuleCache} = require('./shared/moduleCache.js'); const revertModuleCache = useInternalModuleCache(); // Modules const {resolve: pathResolve, join: pathJoin, dirname, parse: pathParse} = require('path'), {readFileSync} = require('fs'), yargs = require('yargs'), findUp = require('find-up'), stripJsonComments = require('strip-json-comments'), {isObject, isArray, isString, isBoolean} = require('is-it-type'), assert = require('simple-invariant'); // CLI // Throw unhandled rejections process.on('unhandledRejection', (err) => { throw err; }); // Load config file const configPath = findUp.sync(['.livepackrc', 'livepack.config.json', 'livepack.config.js']); let config; if (configPath) { if (/\.js$/.test(configPath)) { config = require(configPath); // eslint-disable-line global-require, import/no-dynamic-require } else { config = JSON.parse(stripJsonComments(readFileSync(configPath, 'utf8'))); } } else { config = {}; } // Parse args const {argv} = yargs .config(config) .command( '$0', 'livepack <input path(s)..> -o <output dir path> [options]', () => {}, (_argv) => { const {input} = _argv; if (input === undefined) { const inputs = _argv._; assert(inputs.length > 0, 'Must specify input file'); _argv.input = inputs; } } ) .alias('help', 'h') .alias('version', 'v') .option('input', { // Only used in config file alias: 'inputs', description: 'Input file path', type: 'string', hidden: true }) .option('output', { alias: 'o', description: 'Output directory path', demandOption: true, type: 'string' }) .option('format', { alias: 'f', description: 'Output format', type: 'string', choices: ['esm', 'cjs'], default: 'esm' }) .option('ext', { description: 'JS file extension', type: 'string', default: 'js' }) .option('map-ext', { description: 'Source map file extension', type: 'string', default: 'map' }) .option('minify', { alias: 'm', description: 'Minify output', type: 'boolean', default: false }) .option('inline', { type: 'boolean', description: 'Inline code where possible', default: true }) .option('mangle', { type: 'boolean', description: 'Mangle var names' }) .option('comments', { type: 'boolean', description: 'Keep comments in output' }) .option('entry-chunk-name', { type: 'string', description: 'Template for entry point chunk names' }) .option('split-chunk-name', { type: 'string', description: 'Template for split chunk names' }) .option('common-chunk-name', { type: 'string', description: 'Template for common chunk names' }) .option('source-maps', { alias: 's', description: 'Create source maps', defaultDescription: 'false', type: 'string', coerce(val) { if (val === 'inline' || isBoolean(val) || val === undefined) return val; if (val === '') return true; throw new Error("--source-maps option should have no value or 'inline'"); } }) .option('exec', { description: 'Output executable script', type: 'boolean', default: true }) .option('esm', { description: 'ES modules source', type: 'boolean', default: false }) .option('jsx', { description: 'JSX source', type: 'boolean', default: false }) .option('stats', { description: 'Output stats file', defaultDescription: 'false', type: 'string', coerce(val) { if (val === '') return true; if (isString(val) || isBoolean(val) || val === undefined) return val; throw new Error('--stats option should have no value or string for name of stats file'); } }) .option('babel-config', { description: 'Use babel config file', type: 'string', choices: ['pre', 'post'], coerce(val) { if (val === 'post') throw new Error("'--babel-config post' is not supported yet"); return val; } }) .option('babelrc', { description: 'Use .babelrc', type: 'string', choices: ['pre', 'post'], coerce(val) { if (val === 'post') throw new Error("'--babelrc post' is not supported yet"); return val; } }) .option('babel-config-file', { description: 'Babel config file path', type: 'string', implies: 'babel-config', normalize: true }) .option('babel-cache', { description: 'Enable Babel cache', type: 'boolean', default: true }) .option('debug', { description: 'Output debug info', type: 'boolean', default: false, hidden: true }); // The following is all after yargs option parsing, rather than at top of file, // to avoid slow response for `livepack --help` or a command with missing/invalid options. // Catalog globals etc require('./init/index.js'); // Import dependencies required for serialize. // `fs-extra` must be imported after cataloging globals as `fs-extra` uses `graceful-fs` internally, // which monkey-patches `fs` module. Need to catalog globals before `graceful-fs`'s patches are applied. const {writeFile, mkdirs} = require('fs-extra'), {serializeEntries} = require('./serialize/index.js'), {DEFAULT_OUTPUT_FILENAME} = require('./shared/constants.js'); // Switch back to global module cache revertModuleCache(); // Register Babel transform to track scopes const register = require('./register.js'); register({ esm: argv.esm, jsx: argv.jsx, configFile: argv.babelConfigFile || argv.babelConfig === 'pre', babelrc: argv.babelrc === 'pre' ? true : undefined, cache: argv.babelCache }); // Serialize (async () => { // Determine output path const outPath = pathResolve(argv.output); // Conform inputs array to object let inputs = argv.input; if (isString(inputs)) { inputs = {[DEFAULT_OUTPUT_FILENAME]: inputs}; } else if (isArray(inputs)) { const inputsObj = {}; for (const path of inputs) { assert(isString(path), '`input` paths must be strings'); const {name} = pathParse(path); assert(!inputsObj[name], `Multiple input files with same name '${name}'`); inputsObj[name] = path; } inputs = inputsObj; } else { assert(isObject(inputs), '`input` must be a string, object or array'); for (const [name, path] of Object.entries(inputs)) { assert(isString(name), '`input` keys must be strings'); assert(isString(path), '`input` paths must be strings'); } } // Load sources const entries = {}; await Promise.all( Object.entries(inputs).map(async ([name, pathOriginal]) => { const path = pathResolve(pathOriginal); let entry; try { entry = require(path); // eslint-disable-line global-require, import/no-dynamic-require } catch (err) { if ( err && err.code === 'MODULE_NOT_FOUND' && err.message.split('\n')[0] === `Cannot find module '${path}'` && err.requireStack && err.requireStack.length === 1 && err.requireStack[0] === __filename ) { throw new Error(`Cannot load input file '${pathOriginal}'`); } throw err; } if (entry && entry.__esModule) entry = entry.default; // Await Promise value entry = await entry; entries[name] = entry; }) ); // Serialize const files = serializeEntries(entries, { format: argv.format, ext: argv.ext, mapExt: argv.mapExt, exec: argv.exec, minify: argv.minify, inline: argv.inline, mangle: argv.mangle, comments: argv.comments, entryChunkName: argv.entryChunkName, splitChunkName: argv.splitChunkName, commonChunkName: argv.commonChunkName, sourceMaps: argv.sourceMaps || false, stats: argv.stats, outputDir: argv.sourceMaps ? outPath : undefined, debug: argv.debug }); // Output files for (const {filename, content} of files) { const path = pathJoin(outPath, filename); await mkdirs(dirname(path)); await writeFile(path, content); } })();
javascript
import React from 'react'; import { StyleSheet, View } from 'react-native'; import { useSelector } from 'react-redux'; import Text from './Text'; import { getChunkArray, getCompassValueFromDegree } from '../utils'; import { IMPERIAL_UNIT_VALUE, METRIC_UNIT_VALUE } from '../constants'; const styles = StyleSheet.create({ container: { width: '100%', display: 'flex', justifyContent: 'center', flexDirection: 'column', }, infoComponentRow: { display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center', marginBottom: 10, }, infoComponentContainer: { display: 'flex', flexDirection: 'row', alignItems: 'center', }, infoComponent: { height: 75, width: 125, display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', }, infoComponentValue: { fontSize: 24, }, infoComponentLabel: {}, bar: { height: 50, width: 1.5, backgroundColor: '#f4f4f4', }, }); const windspeedValues = new Map([ [METRIC_UNIT_VALUE, 'm/s'], [IMPERIAL_UNIT_VALUE, 'mph'], ]); function ExtraWeatherInfo() { const currentWeatherData = useSelector((state) => state.weather.data.current); const unit = useSelector((state) => state.settings.unit.value); const extraWeatherData = [ { value: `${currentWeatherData.main.pressure} hPa`, label: 'Luchtdruk', }, { value: getCompassValueFromDegree(currentWeatherData.wind.deg), label: 'Windrichting', }, { value: `${currentWeatherData.wind.speed} ${windspeedValues.get(unit)}`, label: 'Windshelheid', }, ]; // Split weather data in rows of three const extraWeatherDataRows = getChunkArray(extraWeatherData, 3); /* eslint-disable react/no-array-index-key */ const infoComponentRows = extraWeatherDataRows.map((row, idx) => ( <View key={idx} style={styles.infoComponentRow}> {row.map((data, rowIdx) => ( <View key={data.label} style={styles.infoComponentContainer}> <View style={styles.infoComponent}> <Text fontFamily="Roboto-Bold" style={styles.infoComponentValue}>{data.value}</Text> <Text style={styles.infoComponentLabel}>{data.label}</Text> </View> {rowIdx !== row.length - 1 && <View style={styles.bar} />} </View> ))} </View> )); /* eslint-enable react/no-array-index-key */ return ( <View style={styles.container}> {infoComponentRows} </View> ); } export default ExtraWeatherInfo;
javascript
{"Id":"136424","ProductId":"P1000-03","UserId":"#oc-R1KIN7Z6UZUU8Q","ProfileName":"<NAME>","HelpfulnessNumerator":2,"HelpfulnessDenominator":2,"Score":2,"Time":"1341014400","Summary":"Underwhelmed","text":"Like other users, whose reviews I wish I'd paid more attention to, the consistent performance of these k-cups is disappointing. Attracted to the product by its bargain price, I'm reminded you often get what you buy. While the coffee tastes OK, it's no better than most other brands I've purchased. This is the ONLY brand I've purchased, though, that has a defect about 50% of the time. Coffee goes into the cup and sprays into the cup holder which ruins the beverage. With only about half of the cups working properly that effectively doubles the cost making it anything but a bargain. I will not purchase again and, if asked, will recommend against purchases."}
json
{"polyfill":["/polyfill-845f39e382901b6152de.js"],"app":["/app-15afed974d9e54bf3d7a.js"],"component---src-pages-404-js":["/component---src-pages-404-js-5e86433f183d5fa5545a.js"],"component---src-pages-ads-js":["/component---src-pages-ads-js-67151334623ccdd731ea.js"],"component---src-pages-dragon-js":["/component---src-pages-dragon-js-8e1afc15c0e1da971831.js"],"component---src-pages-index-js":["/component---src-pages-index-js-608dc294d1f4bfb8892d.js"],"component---src-pages-mobile-heartbeat-js":["/component---src-pages-mobile-heartbeat-js-937b31e1881a6888c2bc.js"],"component---src-pages-neocova-js":["/component---src-pages-neocova-js-a2c7bb6bf048bedd7219.js"],"component---src-pages-theskills-js":["/component---src-pages-theskills-js-0ad5f2f23ec69fbe7f72.js"]}
json
<filename>Yis/src/Yis/Core/Application.cpp<gh_stars>0 #include "yspch.h" #include "Application.h" #include "Yis/Core/Events/ApplicationEvent.h" #include "Yis/Renderer/Renderer.h" #include "Input.h" //#include <imgui/imgui.h> #include <Windows.h> namespace Yis { #define BIND_ENVENT_FN(x) std::bind(&x, this, std::placeholders::_1) Application* Application::s_Instance = nullptr; Application::Application() { YS_CORE_ASSERT(!s_Instance, "Application already exists!"); s_Instance = this; m_Window = std::unique_ptr<Window>(Window::Create()); m_Window->SetEventCallback(BIND_ENVENT_FN(Application::OnEvent)); m_ImGuiLayer = new ImGuiLayer(); PushOverLay(m_ImGuiLayer); Renderer::Init(); } void Application::PushLayer(Layer* layer) { m_LayerStack.PushLayer(layer); layer->OnAttach(); } void Application::PushOverLay(Layer* overlay) { m_LayerStack.PushOverlay(overlay); overlay->OnAttach(); } void Application::PopLayer(Layer* layer) { m_LayerStack.PopLayer(layer); } void Application::PopOverlay(Layer* overlay) { } void Application::RenderImGui() { m_ImGuiLayer->Begin(); for (Layer* layer : m_LayerStack) layer->OnImGuiRender(); m_ImGuiLayer->End(); } std::string Application::OpenFile(const std::string& filter) const { //OPENFILENAMEA ofn; // common dialog box structure //CHAR szFile[260] = { 0 }; // if using TCHAR macros //// Initialize OPENFILENAME //ZeroMemory(&ofn, sizeof(OPENFILENAME)); //ofn.lStructSize = sizeof(OPENFILENAME); //ofn.hwndOwner = glfwGetWin32Window((GLFWwindow*)m_Window->GetNativeWindow()); //ofn.lpstrFile = szFile; //ofn.nMaxFile = sizeof(szFile); //ofn.lpstrFilter = "All\0*.*\0"; //ofn.nFilterIndex = 1; //ofn.lpstrFileTitle = NULL; //ofn.nMaxFileTitle = 0; //ofn.lpstrInitialDir = NULL; //ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; //if (GetOpenFileNameA(&ofn) == TRUE) //{ // return ofn.lpstrFile; //} return std::string(); } void Application::OnEvent(Event& e) { EventDispatcher dispatcher(e); dispatcher.Dispatch<WindowCloseEvent>(BIND_ENVENT_FN(Application::OnWindowClose)); for (auto it = m_LayerStack.end(); it != m_LayerStack.begin();) { (*--it)->OnEvent(e); if (e.Handled) { break; } } } bool Application::OnWindowClose(WindowCloseEvent& e) { m_Running = false; return true; } bool Application::OnWindowResize(WindowResizeEvent& e) { return false; } Application::~Application() { } void Application::Run() { while (m_Running) { for (Layer* layer : m_LayerStack) { auto [x, y] = Input::GetMousePosition(); layer->OnUpdate(); } Application* app = this; YS_RENDER_1(app, { app->RenderImGui(); YS_CORE_INFO("Command Application RenderImGui"); }); Renderer::Get().WaitAndRender(); //RenderImGui(); m_Window->OnUpdate(); } } }
cpp
1 Tɔn, ki Aarɔnn bonjai nba tee Nadab nan Abihu na jii senderik ki teen musankɔɔna li ni, ki bia pukin bonnunubit li paak, ki jii tur Yennu. Ŋaan ki muu na ki tee kasii muu, kimaan Yennu ki wannib nan bin tun nna. 2 Ki li taakpaak ni ki Yennu te ki muu sik ki dii kpiib ŋɔɔ Yennu tɔɔnn po. 3 Ki Moses yet Aarɔnn a, “Linba na boorue ki Yennu bo beerit na, ki yaa, ‘Daanɔ nba kur jiantirin, wuu baakitin nan barmɔnii, kimaan n tee kasiie. See ki n niib kur turin baakir.’ ” Ki Aarɔnn ki jiin siari. 4 Ki Moses yiin Misael nan Elsafann, binba tee Usiel bonjai, ki Usiel mun tee Aarɔnn baa naa bik na, ki yetib a, “Baat man ki tan jii i ninjamm gbanankpeena Yennu lanbouŋ boor, ki nyi namm ki birib kaaŋ na kpiŋ.” 5 Ki bi baar ki tan kpab soorib nan bi liant ki nyii namm kaaŋ na kpiŋ, nan biaŋinba ki Moses wannib na. 6 Tɔn, ki Moses yet Aarɔnn nan u bonjai Eleasar nan Itamar a, “I daa nyikin i yut ki ki saatir, koo ki pat i liant, a lin want nan i mɔk parbiiri. Li-i tee ki i tun nna, i saa kpowa, ki Yennu wutoor bia saa do niib na kur paaka. Ŋaan i nikpiimm, Israel niib kur, saa fit mɔ ki fabin niib banlee nba ki Yennu te ki muu diib na kuuma. 7 I daa nyikin Yennu lanbouŋ tammɔb na. I-i nyik, i saa kpoe, kimaan bi sennii ki mɔɔn Yennu kpan nba ŋammit i paaka.” Ki bi tun nan biaŋinba ki Moses wannib na. 19 Ki Aarɔnn gat a, “Li-i bonni tee ki n dii yanbɔmm Yenpiinii na dinna, Yennu par bo sii peena-a? Niib na baar nan bi yanbɔmm piinii ki tur Yennu dinna, ki bia baar nan bi mujoonu piinii, ŋaan ki bonbilankant na bia tun ki turin.” 20 Moses nba gbat nna ki u par ji maak.
english
import datetime from Poem.api.internal_views.utils import get_tenant_resources from Poem.tenants.models import Tenant from django_tenants.utils import get_public_schema_name, get_tenant_domain_model from rest_framework import status from rest_framework.authentication import SessionAuthentication from rest_framework.response import Response from rest_framework.views import APIView from .utils import error_response class ListTenants(APIView): authentication_classes = (SessionAuthentication,) def get(self, request, name=None): results = [] if name: if name == 'SuperPOEM_Tenant': tenants = Tenant.objects.filter( schema_name=get_public_schema_name() ) else: tenants = Tenant.objects.filter(name=name) if len(tenants) == 0: return Response( {'detail': 'Tenant not found.'}, status=status.HTTP_404_NOT_FOUND ) else: tenants = Tenant.objects.all() for tenant in tenants: if tenant.schema_name == get_public_schema_name(): tenant_name = 'SuperPOEM Tenant' metric_key = 'metric_templates' else: tenant_name = tenant.name metric_key = 'metrics' try: domain = get_tenant_domain_model().objects.get(tenant=tenant) data = get_tenant_resources(tenant.schema_name) results.append(dict( name=tenant_name, schema_name=tenant.schema_name, domain_url=domain.domain, created_on=datetime.date.strftime( tenant.created_on, '%Y-%m-%d' ), nr_metrics=data[metric_key], nr_probes=data['probes'] )) except get_tenant_domain_model().DoesNotExist: return error_response( status_code=status.HTTP_404_NOT_FOUND, detail='Domain for tenant {} not found.'.format(tenant_name) ) if name: results = results[0] else: results = sorted(results, key=lambda k: k['name'].lower()) return Response(results) def delete(self, request, name=None): if name: if request.tenant.schema_name == get_public_schema_name(): if request.user.is_superuser: try: tenant = Tenant.objects.get(name=name) tenant.delete() return Response(status=status.HTTP_204_NO_CONTENT) except Tenant.DoesNotExist: return error_response( status_code=status.HTTP_404_NOT_FOUND, detail='Tenant not found.' ) else: return error_response( status_code=status.HTTP_401_UNAUTHORIZED, detail='You do not have permission to delete tenants.' ) else: return error_response( status_code=status.HTTP_403_FORBIDDEN, detail='Cannot delete tenant outside public schema.' ) else: return error_response( status_code=status.HTTP_400_BAD_REQUEST, detail='Tenant name should be specified.' ) class ListPublicTenants(ListTenants): authentication_classes = () permission_classes = ()
python
Modula çavkaniya ronahiya xala LED-ê dikare li ronahiya xalê, çavkaniya ronahiya rêzê, çavkaniya ronahiya rûyê, û her çavkaniya ronahiyê taybetmendiyên serîlêdanê hene were dabeş kirin. Îro. 1. Berî her tiştî, hilbera dirêj a pêla ronahiyê ya modula çavkaniya ronahiyê ya xala LED-ê aram e, ronî bihêztir e, enerjî bilindtir e, û yekrengî çêtir e. Hêza hilberanê dikare bigihîje 9200 cm ji hêza hilberîna ultraviolet. Dûcar. 2. Li gorî substrate, xêzkirin, dûrbûna dermankirinê, hwd., çavkaniya ronahiya têla LED-ê amûrê rast dike da ku lezê bi guncan baş bike. 3. Çavkaniya ronahiya têla LED-ê dema ku serî tê bikar anîn ne hewce ye ku berê were germ kirin, ne jî di nav wê de maddeya jehrîn merkur heye. Hêza kevneşopî ya dirêjahiya pêlê ya ultraviyole bi sedan watt xilas dibe, an jî di kîlovatek de gengaz e. Zêdeyî 10 hûrdeman di lûleya çirayê de madeyên jehrî jî hene. Çavkaniyên ronahiya têl LED-ê bi teknolojiyên kevneşopî re têgehek nû ya bêtir teserûfa enerjiyê û jîngehê ye. 4. Li gorî substrate, xêzkirin, dûrbûna dermankirinê, û hwd., leza paqijkirina amûrê bi rêkûpêk tête guheztin, û leza dermankirinê pir zû ye. 5. Mezinahiya kontrola çavkaniya ronahiyê ya xeta LED tenê yek -heştê çavkaniya ronahiyê ya kevneşopî ye. Serê tîrêjê di heman demê de sazkirina cîhê hêsan xilas dike. Di binê serê ronahiyê de jî bi sêwiranek fanek sar ve hatî saz kirin da ku ew di havîna germ de zû belav bibe, îstîqrara enerjiyê ya dirêj û dirêjahiya jiyanê ya LED-ê misoger bike. 6. Kulîlk ji hêla ronahiya ku ji hêla çavkaniya ronahiyê ya çavkaniyên ronahiyê yên xeta LED ve hatî çêkirin têne çêkirin ku bingehek belaş an îyonî an îyonek çêbikin. Van genên monomer reaksiyonên zincîrê dest pê dikin da ku hişkên polîmer biafirînin, û pêvajoyek hişkbûnê ya bêkêmasî bi dawî dibe.
english
Begin typing your search above and press return to search. Smriti Mandhana is going after everything in her zone, and she is smarty hitting everything with the wind. Some very easy boundaries for the southpaw now as she moves into the late 80s. A T20I century is here for the taking for Smriti Mandhana.
english
Former Karnataka CM Siddaramaiah, PCC president DK Shivakumar and former Union minister KH Muniyappa are among the 124 candidates announced by Congress on Saturday in its first list for the state assembly elections. While Shivakumar will contest again from Kanakpura constituency, which he has won thrice, Siddaramaiah will be fielded from Varuna in Mysuru, currently represented by his son Yathindra. The former CM has been nursing hopes of contesting from Kolar too. "The decision will be taken by the party high command," Siddaramaiah said. He fought from two seats in 2018 - Chamundeshwari (Mysuru) and Badami (Bagalkot) - but lost the Chamundeshwari seat. Sources said the party might agree to his request this time too. Muniyappa, a seven-time MP from Kolar, is seeking to enter the assembly for the first time in his three-decade-long political career. He has been fielded from Devanahalli, a reserved constituency. In Muniyappa's case, Congress has overlooked the 'one-family-one-ticket' rule, adopted during its plenary session in Jaipur last year, as his daughter Roopakala, who is an MLA from KGF, will contest again from the seat.
english
Thiruvananthapuram: The allegation that the Kerala government entered into a contract with EMCC International was baseless, said Chief Minister Pinarayi Vijayan. He was addressing a press conference here on Thursday. “As the leader of Opposition is raising such baseless allegations, there is a chance that the people could misunderstand the situation. That is why the government cancelled the MoU. Not even a shadow of doubt will be allowed to remain in the minds of the people,” the CM clarified. The government had signed 117 memorandums of interest and 34 memorandums of understanding during Ascend Kerala 2020. It was only a standard memorandum of understanding which stated that matters will be taken forward according to the policies and stipulations of the government. The government’s fisheries policy is that no foreign corporate will be allowed to undertake deep sea fishing in Kerala. Anything that is against this policy will not be entertained, the CM explained. Kerala Shipping & Inland Navigation Corporation Ltd, (KSINC), a private company had signed an understanding with EMCC International on February 2, 2021 to make available 400 boats and 5 mother vessels, he said. However, this was without the knowledge of the government or the additional chief secretary in charge. As the MoU was against the government’s policies, KSINC was directed to cancel the same. T. K. Jose IAS, additional chief secretary to the Home Department has been directed to investigate into the situation in which the MoU was signed, he added. “I suspect that the Opposition created a controversy as part of their understanding with BJP. The government is with the fisherfolk and it will do everything to improve their lives,” the CM added.
english
{ "index_name": "taoofcoding", "start_urls": [ "https://taoofcoding.tech", "https://taoofcoding.tech/blogs/2021-10-24/myddd_vertx_open_source", "https://taoofcoding.tech/blogs/2021-10-11/will_asynchronous_is_future" ], "stop_urls": [], "selectors": { "lvl0": "[class^='PageContent'] h1", "lvl1": "[class^='PageContent'] h2", "lvl2": "[class^='PageContent'] h3", "lvl3": "[class^='PageContent'] h4", "lvl4": "[class^='PageContent'] h5", "lvl5": "[class^='PageContent'] h6", "text": "[class^='PageContent'] p, [class^='PageContent'] li" }, "conversation_id": [ "1661194979" ], "nb_hits": 591 }
json
<gh_stars>1-10 import numpy as np import cv2 import io import matplotlib.pyplot as plt import os from pdf2image import convert_from_path from PIL import Image from PyPDF2 import PdfFileWriter, PdfFileReader import re import tempfile # import tkinter as tk # from tkinter import Frame, Text, Label import torch import torchvision from .cnn import get_model from .segment_boards import segment_boards from .pdf_helper import create_annotation, add_annotation_to_page from .timer import Timer def sbw(im): f = plt.figure() plt.imshow(im, cmap='gray', vmin=0, vmax=255) f.show() def sw(im): f = plt.figure() plt.imshow(cv2.cvtColor(im, cv2.COLOR_BGR2RGB)) f.show() def run_gui(): pass # window = tk.Tk() # window.title('Chess PDF to FEN') # window.state('zoomed') # main_container = Frame(master=window, background="grey") # main_container.pack(side="top", fill="both", expand=True) # top_frame = Frame(main_container, background="green") # bottom_frame = Frame(main_container, background="yellow") # top_frame.pack(side="top", fill="x", expand=False) # bottom_frame.pack(side="bottom", fill="both", expand=True) # welcome_lbl = tk.Label(master=top_frame, text="Welcome to Chess PDF to FEN") # welcome_lbl.config(font=("Consolas ", 24)) # welcome_lbl.grid(row=0, column=1) # welcome_lbl.pack(side="top") # frm_pdf_select = tk.Frame(master=bottom_frame) # frm_pdf_select.pack(side="top", fill="x") # lbl_pdf_select = tk.Label(master=frm_pdf_select, text="Select a PDF file") # lbl_pdf_select.config(font=("Consolas ", 16)) # lbl_pdf_select.pack(side="left") # window.mainloop() def pil_loader(path): # open path as file to avoid ResourceWarning (https://github.com/python-pillow/Pillow/issues/835) with open(path, 'rb') as f: img = Image.open(f) return img.convert('RGB') piecenames_long = ['BlackBishop', 'BlackKing', 'BlackKnight', 'BlackPawn', 'BlackQueen', 'BlackRook', 'BlackSpace', 'WhiteBishop', 'WhiteKing', 'WhiteKnight', 'WhitePawn', 'WhiteQueen', 'WhiteRook', 'WhiteSpace'] piecenames = ['bb', 'bk', 'bn', 'bp', 'bq', 'br', 'em', 'wb', 'wk', 'wn', 'wp', 'wq', 'wr', 'em'] training_idx = 0 def create_training_set(tensors, predicted): """ tensors (List[tensor]): image of each cell predicted (tensor(64,1)): predicted value of each cell """ global training_idx output_dir = 'data/out/aagard' for i, tensor in enumerate(tensors): np_arr = (tensor * 255).view(64, 64, 1).numpy().astype(np.uint8) piece = piecenames_long[predicted[i]] output_path = os.path.join(output_dir, piece, '%07d.png' % (training_idx, )) cv2.imwrite(output_path, np_arr) training_idx += 1 def get_fen_str(predicted): with io.StringIO() as s: s.write('https://lichess.org/analysis/') for row in range(8): empty = 0 for cell in range(8): c = piecenames[predicted[row*8 + cell]] if c[0] in ('w', 'b'): if empty > 0: s.write(str(empty)) empty = 0 s.write(c[1].upper() if c[0] == 'w' else c[1].lower()) else: empty += 1 if empty > 0: s.write(str(empty)) s.write('/') # Move one position back to overwrite last '/' s.seek(s.tell() - 1) # If you do not have the additional information choose what to put # s.write(' w KQkq - 0 1') s.write('%20w%20KQkq%20-%200%201') return s.getvalue() def run(file_path, output_file_path, num_threads=4, num_pages_to_print=10, build_training_set=False): r""" file_path (str): Path to the input pdf file output_path (str): Path for the output file name num_threads (int, optional): Number of threads to use (recommended less than 4) num_pages_to_print (int, optional): Number of pages to process before printing progress build_training_set (bool, optional): Used to create training data, should be False otherwise Example usage chesspdftofen.run('data/yasser.pdf', 'data/yasser2.pdf') """ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") yield 'Model inference device ' + str(device) net = get_model(device) yield 'Model loaded' transform = torchvision.transforms.Compose([ # torchvision.transforms.Grayscale(), torchvision.transforms.Resize((8*64, 8*64)), # GaussianSmoothing([0, 5]), torchvision.transforms.ToTensor(), # torchvision.transforms.Normalize((0.5, ), (0.5, )) ]) yield 'Reading PDF ...' if not build_training_set: input_file = open(file_path, 'rb') pdf_input = PdfFileReader(input_file, strict=False) pdf_output = PdfFileWriter() pdf_output.appendPagesFromReader(pdf_input) num_pages = pdf_output.getNumPages() assert num_pages > 0 page1 = pdf_output.getPage(0) _, _, pdf_w, pdf_h = page1.mediaBox pdf_w = pdf_w.as_numeric() pdf_h = pdf_h.as_numeric() with torch.no_grad(): with tempfile.TemporaryDirectory() as output_path: im_paths = convert_from_path( file_path, output_folder=output_path, fmt="jpg", paths_only=True, grayscale=True, thread_count=num_threads) yield 'Converting %s ...' % (file_path,) num_pages = len(im_paths) for i, im_path in enumerate(im_paths): if i % num_pages_to_print == 0: yield 'Completed processing for %d / %d ...' % (i, num_pages) # if i > 50: # break im_path_base, im_path_ext = os.path.splitext(im_path) page_num = re.match('.*?([0-9]+)$', im_path_base) assert page_num is not None page_num = int(page_num.group(1)) - 1 page_im = cv2.imread(im_path, 0) page_im_h, page_im_w = page_im.shape boards = segment_boards(page_im) for board in boards: ymin, ymax, xmin, xmax, _, _ = board board_im = page_im[ymin:ymax, xmin:xmax] im = Image.fromarray(board_im) # im = pil_loader(path) im = transform(im).to(device) dim = 64 tensors = [im[:, dim*k: dim*(k+1), dim*j: dim*(j+1)] for k in range(8) for j in range(8)] images = torch.stack(tensors) outputs = net(images) _, predicted = torch.max(outputs.data, 1) fen_str = get_fen_str(predicted) if not build_training_set: annotation1, annotation2 = create_annotation(xmax / page_im_w * pdf_w, (1 - ymin / page_im_h) * pdf_h, { 'author': '', 'contents': fen_str }) add_annotation_to_page(annotation1, pdf_output.getPage(page_num), pdf_output) add_annotation_to_page(annotation2, pdf_output.getPage(page_num), pdf_output) else: create_training_set(tensors, predicted) if not build_training_set: output_file = open(output_file_path, 'wb') pdf_output.write(output_file) output_file.close() input_file.close() yield 'Done!' if __name__ == "__main__": run() __version__ = '0.5.5'
python
package commons.game; public class Pawn extends Piece { public Pawn(int x, int y, Color color, Board board) { super(x, y, color, board); if(color.equals(Color.WHITE)) imagePath="/images/white/pawn.png"; else imagePath="/images/black/pawn.png"; } @Override public boolean canMoveTo(int x, int y) { if(!super.canMoveTo(x,y)) return false; if(Math.abs(this.x-x)>1) return false; if(color.equals(Color.WHITE)) { if (y != this.y + 1) return false; } else { if (y != this.y - 1) return false; } if(this.x==x){ if(board.occupiedByColor(x,y)!=null) return false; return true; } else{ if(board.occupiedByColor(x,y)!=null && !board.occupiedByColor(x,y).equals(color)) return true; return false; } } }
java
Aarti Kunj Bihari Ki song is a Hindi devotional song from the Govind Mero Hai released on 2014. Music of Aarti Kunj Bihari Ki song is composed by Bal Krishna Sharma. Aarti Kunj Bihari Ki was sung by Anuradha Paudwal. Download Aarti Kunj Bihari Ki song from Govind Mero Hai on Raaga.com.
english
Subramanian Swamy surrounded Sitharaman on the statement of recession in India by his tweet. Mumbai: The demand of the opposition regarding inflation in the country was discussed yesterday in the parliament. Finance Minister Nirmala Sitharaman said that India’s position is very strong and there is no recession in the country after its party leader Subramanian Swamy raised the issue. Subramanian Swamy jibed at her by tweeting “the Indian economy already went into recession last year”. Subramanian Swamy through his tweet seems to be quite aggressive towards his own government in general. Only government regulations brought them into the circle of questions. “No question of the Indian economy getting into recession” says Finance Minister according to media today. She is right! ! Because Indian economy has already got into recession last year. So question of getting into recession does not arise. Subramaniam’s tweet came as the opposition surrounded the government over rising inflation in the country. As an independent media platform, we do not take advertisements from governments and corporate houses. It is you, our readers, who have supported us on our journey to do honest and unbiased journalism. Please contribute, so that we can continue to do the same in future.
english
Although over the last two years or so, Assam has been witness to on-and-off upheavals on the law and order front, mounting tensions, confusion in the body politic of the State and misery suffered by the people, be it due to sky rocketing of prices or crude dramas enacted in the political arena that effect the normal life of the general people and the like, a much harsher and gloomier time seemingly awaits the people of Assam from now onwards. Never in the history of independent India or anytime in the past, except on one occasion, did the people the State confronted such a grotesque scenario. And that one occasion was when the identity of the indigenous people was virtually wiped out during the invasion of Assam by the Maan (Burmese) army. And, mind you, such situations do not spring up overnight. A considerable period ensued from the time traitor Badan Barphukan contacted a Maan general at Calcutta (now Kolkata) till the Maan army poured in on the soil of Assam with its murderous agenda. In the contemporary scenario, it is for decades together that the people of Assam have been demanding the expulsion of lakhs of foreigners (read as Bangladeshis) from the State while several political parties and fundamentalist organisations took to adding colour to the issue to extract political or communal mileage. Finally, the Supreme Court came to the rescue of the people of Assam by ordering the State government to prepare an updated version of the National Register of Citizens (NRC) of 1951 and following the publication of the final draft NRC, the people, by and large, heaved a sigh of relief hoping that the final NRC was round the corner and that the foreigners’ problem would be resolved for all times with midnight of March 24, 1971 as the cut-or off date. Unfortunately, as of now, a coffin has seemingly been prepared by the powers that be for the cremation of the NRC while the hammering of the last nail into the coffin is apparently awaited. The Citizenship (Amendment) Bill, 2016, an obnoxious brainchild of the saffron brigade, has been pushed to the centre-stage by the BJP dispensation at the Centre with a view to providing citizenship to non-Muslim foreigners (primarily Bangladeshis in the case of Assam and the NE) seemingly with the sole purpose of multiplying the vote-bank of the BJP. One can very well conjecture that once the Bill becomes an Act and the existing Hindu Bangladeshi nationals and hoards more likely come become Indian citizens, a permanent Hindu vote-bank may come to stay to vote overwhelmingly for the saffron party in all electoral battles henceforth. While the last few months witnessed massive protest against the Bill across the length and breadth of Assam, displaying contemptuous disregard to all public opinion, The BJP-led government got the Bill passed in the Lok Sabha and presently awaits the nod of the Rajya Sabha. Meanwhile, as a way of countering all protest against the Bill, the ruling dispensation is apparently adopting a divide and rule strategy. While six communities of the State have been demanding ST status since long, it is only now, with the tenure of the Central government at its fag end, that a Bill to grant ST status to the said communities was tabled in the Rajya Sabha. The move of the government obviously appears to be to wean away the six communities from the mainstream Assamese people who are opposing the CAB-16 tooth and nail. On this count, the government appears to be adopting a 2-pronged strategy. Firstly, to divide the greater Assamese society and secondly to bring the six communities under its fold as the Lok Sabha polls are round the corner. Further, while luring the six communities with prospective ST status, the government also succeeded in bringing a rift in the existing ST communities with one group taking to protest against the government move to grant ST status to 6 communities. Again, by way of sop to the Assamese community in its obvious attempt to weaken the protest movement and as a poll stunt in view of the 2019 general elections, the Centre has now taken up, at least on paper, the issue of constitutional safeguards to the indigenous people. Any political observer would definitely question as to why so many issues are being taken up only now by the Centre although the BJP took over the reigns of the government at the Centre more than four-and-a-half years ago. Presently, the hard hammering of the greater Assamese society by the Centre has already begun. To that end the Government appears to have succeeded in its apparent attempt to divide the people on the basis of language, religion, ethnicity, community and the like. Whereas the government came to power both at the Centre and the State on the promise of all round development (Saab ka saath, saab ka vikash), any development worth its salt has seemingly suffered the blackest of eclipse over the last few years. The government is also aware that its much vaunted development and ‘Aacche Din’ would not cut any ice not only in Assam but across the country now. Meanwhile, with Magh Bihu already behind us, and going by the warnings issued by various protesting organizations, the State is likely to witness the resurgence of protest against the Bill by leaps and bounds. At this juncture it may be pertinent to state that media reports had hit the headline (prior to tabling of the Bill in the Lok Sabha) that the security agencies had warned the government that the situation in the State might ‘worsen’ if the Bill is passed. Now that the Bill has been passed in the Lok Sabha, the same media has reported that the “Centre ignored warnings from security agencies”. It now appears that in its commitment to promote its hardcore Hinduvta agenda to the extreme and in the process make room for settlement of non-Muslim foreigners (Hindu Bangladeshi nationals) in Assam, the Centre is apparently least bothered about the sons of the soil – their wellbeing, culture, language, religious harmony or the fragile demography. The way protest against the Bill is burgeoning by leaps and bounds with every passing day, it is almost clear as daylight that the sons and the daughters of the soil of Assam are fully prepared for a decisive Saraighat as the 2019 election approaches. So far, through the medium of democratic protests, the indigenous people of Assam have sent the message loud and clear that the Sultans of Delhi and Dispur must accept the down-to-earth truth that “Jati, Mati & Bheti” of Assam belong to the indigenous people of the State and that they are not prepared to part with the same, be it private land or Government land. It may be pointed out that an elected government is formed by elected representatives of the people. The present representatives of the people in Delhi and Dispur never sought the people’s opinion on the issue of settling any foreigner on the soil of Assam before being voted to power . It indeed is shuddering to note that that the Centre has caused the warnings issued by the security agencies to fall by the wayside. Going by media reports, the powers that be have also been warned that the Bill could give the much needed fuel to the militant outfits of the region. From that point of view, it may not be surprising if in the coming day a fresh spurt in militant activities rock the region. The question arises if the Centre is desirous of such violent activities so that the present movement against the Bill could be crushed at gun point while thousands are put behind bars. The Government certainly displayed its fascist face in Tripura by indulging in wanton firing on peaceful tribal protesters against the Bill recently. The fascist design also made its appearance in Assam with Dispur manufacturing serious criminal charges against three frontline activist against the Bill. Fortunately, the Gauhati High Court granted interim bail/bail to all the three before the police put them behind bars. While the coming days may witness unrest, turmoil and turbulence rocking the State, analysing the government approach one may question if the powers that be are deliberately and calculatedly pushing the affairs of the State to that end with a view to letting loose its fascist design to the fullest potential against all protests.
english
<gh_stars>10-100 # -*- coding:utf-8 -*- import torch from medvision import _C def affine_2d(features, rois, out_size, spatial_scale, sampling_ratio=0, aligned=True, order=1): if isinstance(out_size, int): out_h = out_size out_w = out_size elif isinstance(out_size, tuple): assert len(out_size) == 2 assert isinstance(out_size[0], int) assert isinstance(out_size[1], int) out_h, out_w = out_size else: raise TypeError( '"out_size" must be an integer or tuple of integers') assert features.dtype in [torch.float32, torch.float16], \ f'input must be float16 or float32 nut get {features.dtype}' assert order in [0, 1, 3], f'order {order} is not supported!' if order == 0: # avoid sample average sampling_ratio = 1 batch_size, num_channels, data_height, data_width = features.size() num_rois = rois.size(0) output = features.new_zeros(num_rois, num_channels, out_h, out_w) _C.affine_2d( features, rois.type(features.type()), output, out_h, out_w, spatial_scale, sampling_ratio, aligned, order) return output def affine_3d(features, rois, out_size, spatial_scale, sampling_ratio=0, aligned=True, order=1): # clockwise is not used in 3d if isinstance(out_size, int): out_d = out_size out_h = out_size out_w = out_size elif isinstance(out_size, tuple): assert len(out_size) == 3 assert isinstance(out_size[0], int) assert isinstance(out_size[1], int) assert isinstance(out_size[2], int) out_d, out_h, out_w = out_size else: raise TypeError( '"out_size" must be an integer or tuple of integers') assert features.dtype in [torch.float32, torch.float16], \ f'input must be float16 or float32 nut get {features.dtype}' assert order in [0, 1, 3], f'order {order} is not supported!' if order == 0: # avoid sample average sampling_ratio = 1 batch_size, num_channels, data_depth, data_height, data_width = features.size() num_rois = rois.size(0) output = features.new_zeros(num_rois, num_channels, out_d, out_h, out_w) _C.affine_3d( features, rois.type(features.type()), output, out_d, out_h, out_w, spatial_scale, sampling_ratio, aligned, order) return output def apply_offset_2d(img, offset, order=1): """ image : b, c, d, h, w offset : b, 2, d, h, w """ assert img.shape[2:] == offset.shape[2:] assert offset.shape[1] == 2 channels = img.shape[1] kernel_size = [1, 1] stride = [1, 1] padding = [0, 0] dilation = [1, 1] group = 1 deformable_groups = 1 im2col_step = 64 weight = torch.eye(channels, channels).unsqueeze(-1).unsqueeze(-1).cuda() bias = torch.zeros(channels).cuda() offset = offset.cuda() if img.dtype == torch.float16: offset = offset.half() bias = bias.half() weight = weight.half() output = _C.deform_2d(img.contiguous(), weight.contiguous(), bias.contiguous(), offset.contiguous(), kernel_size[0], kernel_size[1], stride[0], stride[1], padding[0], padding[1], dilation[0], dilation[1], group, deformable_groups, im2col_step, order) assert img.shape == output.shape return output def apply_offset_3d(img, offset, order=1): assert img.shape[2:] == offset.shape[2:] assert offset.shape[1] == 3 channels = img.shape[1] kernel_size = [1, 1, 1] stride = [1, 1, 1] padding = [0, 0, 0] dilation = [1, 1, 1] group = 1 deformable_groups = 1 im2col_step = 64 weight = torch.eye(channels, channels).unsqueeze(-1).unsqueeze(-1).unsqueeze(-1).cuda() bias = torch.zeros(channels).cuda() offset = offset.cuda() if img.dtype == torch.float16: offset = offset.half() bias = bias.half() weight = weight.half() output = _C.deform_3d(img.contiguous(), weight.contiguous(), bias.contiguous(), offset.contiguous(), kernel_size[0], kernel_size[1], kernel_size[2], stride[0], stride[1], stride[2], padding[0], padding[1], padding[2], dilation[0], dilation[1], dilation[2], group, deformable_groups, im2col_step, order) assert img.shape == output.shape, f"input is {img.shape}, out is {output.shape}" return output def random_noise_2d(img, method, mean=0., std=1., inplace=False): """ method: 0 : uniform , U[-0.5, 0.5] 1 : normal, N(0, 1) mean: std * gen_noise + mean """ if not inplace: out = img.clone() _C.noise_2d(out, method, mean, std) return out else: _C.noise_2d(img, method, mean, std) return img def random_noise_3d(img, method, mean=0., std=1., inplace=False): if not inplace: out = img.clone() _C.noise_3d(out, method, mean, std) return out else: _C.noise_3d(img, method, mean, std) return img
python
package webrtc import ( conf "github.com/giongto35/cloud-game/v2/pkg/config/webrtc" "github.com/pion/interceptor" . "github.com/pion/webrtc/v3" ) func NewInterceptedPeerConnection(conf conf.Webrtc, interceptors []interceptor.Interceptor) (*PeerConnection, error) { m := &MediaEngine{} if err := m.RegisterDefaultCodecs(); err != nil { return nil, err } i := &interceptor.Registry{} if err := RegisterDefaultInterceptors(m, i); err != nil { return nil, err } for _, itc := range interceptors { i.Add(itc) } settingEngine := SettingEngine{} if conf.IcePorts.Min > 0 && conf.IcePorts.Max > 0 { if err := settingEngine.SetEphemeralUDPPortRange(conf.IcePorts.Min, conf.IcePorts.Max); err != nil { return nil, err } } if conf.IceIpMap != "" { settingEngine.SetNAT1To1IPs([]string{conf.IceIpMap}, ICECandidateTypeHost) } peerConf := Configuration{ICEServers: []ICEServer{}} for _, server := range conf.IceServers { peerConf.ICEServers = append(peerConf.ICEServers, ICEServer{ URLs: []string{server.Url}, Username: server.Username, Credential: server.Credential, }) } api := NewAPI(WithMediaEngine(m), WithInterceptorRegistry(i), WithSettingEngine(settingEngine)) return api.NewPeerConnection(peerConf) }
go
<reponame>lovecrossyou/teacher-web import Vue from 'vue' import Vuex from 'vuex' import login from './modules/login' import teacher from './modules/teacher' import schoolclass from './modules/schoolclass' const REDIRECT_URI = "http://www.bluefing.com/jsb-web/#/"; const authUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx04ed87ff27f7385a&response_type=code&scope=snsapi_userinfo&state=STATE"; const redirectUrl = "&redirect_uri=" + REDIRECT_URI; Vue.use(Vuex) const state = { authUrl: authUrl + redirectUrl } const mutations = { savelottery(state, lottery) { state.lottery = lottery; } } const getters = { hasLogin: state => { const token = localStorage.getItem('token'); return token && token != null && token.length !== 0; } } const actions = { async updatelottery({ commit }, params) { try { const res = await updateLottery(params); } catch (err) { // console.log(err.message) } } } export default new Vuex.Store({ modules: { login, teacher, schoolclass }, state, getters, actions, mutations, })
javascript
{"1547617775875":{"type":"book open","bookName":"Epic%20Quest","subjectName":"school","fName":"users/<KEY>"},"1547617776180":{"type":"st"},"1547617776181":{"type":"ss"}}
json
Our editors will review what you’ve submitted and determine whether to revise the article. What is abstracted—i.e., the abstraction or abstractum—is sometimes taken to be a concept (or “abstract idea”) rather than a property or relation. Which view is taken on this issue depends in part on the view one holds on the general issue of universals (entities used to explain what it is for individual things to share a feature, attribute, or quality or to fall under the same type or natural kind). Abstract as an adjective is contrasted with concrete in that, whereas the latter refers to a particular thing, the former refers to a kind, or general character, under which the particular thing—i.e., the “instance”—falls. Thus, war is abstract, but World War I is concrete; circularity is abstract, but coins, dinner plates, and other particular circular objects are concrete. The term abstract is sometimes used to refer to things that are not located in space or time; in this sense, numbers, properties, sets, propositions, and even facts can be said to be abstract, whereas individual physical objects and events are concrete. The capacity for making and employing abstractions is considered to be essential to higher cognitive functions, such as forming judgments, learning from experience, and making inferences.
english
// Schemas const DeviceMetricSchema = require('../../schemas/devicemetric.schema'); const BundleSchema = require('../../schemas/bundle.schema'); // Arguments const DeviceMetricArgs = require('../../parameters/devicemetric.parameters'); const CommonArgs = require('../../parameters/common.parameters'); // Resolvers const { devicemetricResolver, devicemetricListResolver, devicemetricInstanceResolver, } = require('./resolver'); // Scope Utilities const { scopeInvariant } = require('../../../../utils/scope.utils'); let scopeOptions = { name: 'DeviceMetric', action: 'read', version: '3_0_1', }; /** * @name exports.DeviceMetricQuery * @summary DeviceMetric Query. */ module.exports.DeviceMetricQuery = { args: Object.assign({}, CommonArgs, DeviceMetricArgs), description: 'Query for a single DeviceMetric', resolve: scopeInvariant(scopeOptions, devicemetricResolver), type: DeviceMetricSchema, }; /** * @name exports.DeviceMetricListQuery * @summary DeviceMetricList Query. */ module.exports.DeviceMetricListQuery = { args: Object.assign({}, CommonArgs, DeviceMetricArgs), description: 'Query for multiple DeviceMetrics', resolve: scopeInvariant(scopeOptions, devicemetricListResolver), type: BundleSchema, }; /** * @name exports.DeviceMetricInstanceQuery * @summary DeviceMetricInstance Query. */ module.exports.DeviceMetricInstanceQuery = { description: 'Get information about a single DeviceMetric', resolve: scopeInvariant(scopeOptions, devicemetricInstanceResolver), type: DeviceMetricSchema, };
javascript
{ "widgetLabel": "Putanja", "startTracking": "Počni da pratiš moju lokaciju", "stopTracking": "Prestani da pratiš moju lokaciju" }
json
As the world prepares for the holiday season of 2023, the Great American Family has revealed its Christmas Movie schedule for the year, planning to air Christmas movies all day long till the end of 2023, marking the return of the Great American Christmas film lineup for the third time in a row. Despite the ongoing strike in Hollywood, there are expected to be twenty movie premieres in the 2023 list. The other good news is that the channel has begun airing its Christmas movie schedule from October 13, 2023, onwards, instead of the previously decided date of October 20, 2023. The Great American Family is based out of its headquarters in Fort Worth, Texas and is owned by Great American Media. The Great American Family has finally announced their Great American Christmas movie schedule for the year just in time for the movies to start airing from October 14, 2023, to December 23, 2023. The list contains the names of twenty movies that will premiere on the channel itself which seems to be a strange occurrence owing to the strikes in Hollywood. However, the Christmas movies due release had reportedly been shot and produced last year leading to ample movie premieres amidst their usual Christmas schedule. The list and schedule of new Christmas movies that will be aired on Great American Family's channel starting Saturday, October 14, 2023, is given below. Apart from the original movies on the network, these new releases have been scheduled for release throughout the remainder of the year. Moreover, crowd-favorite actors like Daniel Lissing, Candace Cameron Bure, Jill Wagner, Trevor Donovan, Merritt Patterson, Danica McKellar, Lori Loughlin, Paul Greene, Chad Michael Murray, Laura Osnes, Danica McKellar, Matthew Morrison and more take roles in the listed movies. The Great American Family captures the essence of a quintessentially American family for whom Christmas is the biggest event of the year. Thus, it becomes important to ensure that the Christmas schedule is on point. The films on the Great American Christmas schedule are specially curated to ensure they are meant for family watches and faith-based. Moreover, they give families an excellent opportunity to curl up with some hot cocoa and tune in on weekends for holiday-themed movie marathons. When Calls the Heart will start premiering on Saturday, November 11, 2023, and will feature Chris McNally, Jack Wagner and Erin Krakow. Similarly, David Winning's Blessings of Christmas premiers on Sunday, November 12, 2023, and will be featuring Lori Loughlin, Jesse Hutch and Laura Bertram. Meanwhile, the festivities on the network will begin this Saturday with the Shae Robins and Casey Elliott starring in Destined 2: Christmas Once More. The schedule for Christmas 2023 by the Great American Family has surely ushered in the holiday cheer just in time and has beat Hallmark's release of its Christmas schedule by an entire week. Residents in the United States who are willing to tune into the Great American Family can check with their cable operators or access the channel using a subscription to Frndly or Philo. Alternatively, one can drop a text saying CHRISTMAS to 877-999-1225. Once the Great American Christmas phase is over, the network will be the exclusive cable operator for the 135th Tournament of Roses Parade on New Year’s Day.
english
<section class="webring"> <h3>Posts from other places I follow</h3> <section class="articles"> {{range .Articles}} <div class="webring__article"> <p class="webring__title"> <a href="{{.Link}}" target="_blank" rel="noopener">{{.Title}}</a> </p> <span class="webring__metadata"> <small class="webring__source"> via <a href="{{.SourceLink}}">{{.SourceTitle}}</a> </small> {{- if ne (datef "2006-01-02" .Date) "0001-01-01" }} <small class="webring__date">- <date datetime="{{ .Date }}">{{.Date | datef "2006-01-02"}}</date></small> {{- end }} </span> </div> {{end}} </section> <p class="webring__attribution"> Generated by <a href="https://git.sr.ht/~sircmpwn/openring">openring</a> </p> </section> <style> .webring .articles { margin: -0.5rem; } .webring__title { margin: 0; } .webring__article { margin: 0.5rem; padding: 0.5rem; background: var(--base01); } .webring__attribution { text-align: right; font-size: 0.8rem; } </style>
html
Uran (Maharashtra): Today, the condition of this country in all fields like finance, social and political, is quite pitiable and it is because Indian society does not value the culture, traditions and glorifying history of this country. The society is completely engulfed in the grip of perverted western culture and imported products; therefore, it has become necessary to regenerate nationalism, Dharma and traditions among people. The above views were expressed by Mr. Ramesh Shinde, the spokesperson of Hindu Janajagruti Samiti (HJS) during the program held on the occasion of its 8th anniversary. Hindu unification meet was organized at Uran Sarvajanik Navaratrotsava Mandal in Ganesh Chowk. Mr. Shinde said, “Today’s youth studies to become an engineer, doctor, advocate etc. but he does not get knowledge of Hindu Dharmaanywhere during his education. Julia Roberts, an internationally acclaimed actress has adopted Hinduism with her family; it is not that Hindu Dharma is supreme because she has converted to Hinduism; but she has converted because Hindu Dharma and traditions are superior. Today, Hindus, however, feel ashamed to apply ‘Tilak’ or ‘kumkum’ on their forehead. Hindus must follow ‘Dharmacharan’ so that they get power to think about nationalism in its true sense. ” Mr. Ramesh Thakur organized the meet. Mr. Suresh Sawant, Mr. Pramod Bendre, Mr. Bharat Thakur, Dr. Devanikar, Dr. Bapat and Mr. Madhu Pedanekar were felicitated on the occasion.
english
import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { Hospital } from 'src/entity/hospital.entity'; import { HospitalResolver } from './hospital.resolver'; import { HospitalService } from './hospital.service'; @Module({ imports: [TypeOrmModule.forFeature([Hospital])], exports: [TypeOrmModule], providers: [ HospitalResolver, HospitalService ] }) export class HospitalModule {}
typescript
{ "data_uoa_list":["demo-autotune-flags-adapt16-clang-android-win-i10", "demo-autotune-flags-adapt16-clang-android-win-i10-pareto", "demo-autotune-flags-adapt16-clang-android-win-best"], "flat_keys_list":[ "##characteristics#compile#obj_size#min", "##characteristics#run#execution_time_kernel_0#center", "##characteristics#run#execution_time_kernel_0#halfrange" ] }
json
New Delhi: The Supreme Court will on Friday pronounce its judgement on Vodafone International Holdings' appeal challenging the income tax demand of Rs 11,000 crore on the overseas deal between Vodafone and Hutchison. Vodafone had moved the apex court challenging the Bombay High Court judgement of September 8, 2010 which had held that Indian IT department had jurisdiction over the deal. Through the $11. 2 billion deal in May 2007, Vodafone acquired 67 per cent stake in the Hutchison-Essar Ltd (HEL) from Hong Kong-based Hutchison Group through companies based in Netherlands and Cayman Island. The IT Department maintained that since capital gains were made in India through the deal, Vodafone was liable to pay the tax and issued a show cause notice to it asking as to why it should not be treated as a representative assessee of the Vodafone International Holding. Vodafone, however, challenged the the show cause notice before the Bombay High Court saying it was share transfer carried outside India. The appeal was rejected by the high court in December 2008 which was again challenged by Vodafone before the apex court. The Supreme Court also dismissed Vodafone's appeal in January 2009 and directed IT Department to decide whether it had jurisdiction to tax the transaction. The Supreme Court, however, observed Vodafone would be at liberty to challenge the IT department's decision if it went against Vodafone and the question of law would also be open. The IT Department passed an order in May 2010 and held that it had competent jurisdiction to treat Vodafone as an 'assessee in default' for failure to deduct tax at source. This decision of IT department was challenged by Vodafone before the Bombay High Court. The high court by its September 8, 2010 judgement, dismissed Vodafone's petition and held that "the essence of the transaction was a change in the controlling interest in HEL which constituted a source of income in India". It said the "the proceedings which have been initiated by the Income Tax Authorities cannot be held to lack jurisdiction". The Bombay High Court judgement was challenged by Vodafone before the Supreme Court on September 14, 2010. The Supreme Court by its interim order on September 27, 2010, refused to stay the high court verdict and asked the IT department to compute the tax liability of Vodafone. On November 15, 2010 the apex court asked Vodafone to deposit Rs 2,500 crore and a bank guarantee of Rs 8500 crore before the hearing of the case began. It also said that if the case goes in favour of Vodafone then the government will have to return the amount to Vodafone along with interest. Supreme Court finally began hearing detailed arguments on in the case on August 3, 2011 and reserved its judgement on October 19, 2011.
english
//========================================================================== // ObTools::Gather: test-buffer.cc // // Test harness for gather buffer library // // Copyright (c) 2010 <NAME>. All rights reserved // This code comes with NO WARRANTY and is subject to licence agreement //========================================================================== #include "ot-gather.h" #include <gtest/gtest.h> namespace { using namespace std; using namespace ObTools; TEST(GatherTest, TestSimpleAdd) { Gather::Buffer buffer(0); char data[] = "Hello, world!"; const string expected(&data[0], strlen(data)); Gather::Segment& seg = buffer.add(reinterpret_cast<unsigned char *>(&data[0]), strlen(data)); ASSERT_EQ(expected.size(), buffer.get_length()); ASSERT_LE(1, buffer.get_size()); ASSERT_EQ(1, buffer.get_count()); ASSERT_EQ(data, string(reinterpret_cast<char *>(seg.data), seg.length)); } TEST(GatherTest, TestInternalAdd) { Gather::Buffer buffer(0); Gather::Segment& seg = buffer.add(16); for (unsigned int i = 0; i < seg.length; ++i) seg.data[i] = i; ASSERT_EQ(16, buffer.get_length()); ASSERT_LE(1, buffer.get_size()); ASSERT_EQ(1, buffer.get_count()); for (unsigned int i = 0; i < seg.length; ++i) ASSERT_EQ(i, seg.data[i]) << "Where i = " << i; } TEST(GatherTest, TestSimpleInsert) { Gather::Buffer buffer(0); uint32_t n = 0xDEADBEEF; const uint32_t expected = n; Gather::Segment &seg = buffer.insert(reinterpret_cast<Gather::data_t *>(&n), sizeof(n)); ASSERT_EQ(sizeof(expected), buffer.get_length()); ASSERT_LE(1, buffer.get_size()); ASSERT_EQ(1, buffer.get_count()); ASSERT_EQ(sizeof(expected), seg.length); for (unsigned i = 0; i < sizeof(expected); ++i) ASSERT_EQ((expected >> (i * 8)) & 0xff, seg.data[i]) << "Where i = " << i; } TEST(GatherTest, TestInsertBetween) { Gather::Buffer buffer(0); char data[] = "Hello, world!"; const string expected_str(&data[0], strlen(data)); uint32_t n = 0x01234567; const uint32_t expected_num(n); buffer.add(reinterpret_cast<Gather::data_t *>(&data[0]), strlen(data)); buffer.add(reinterpret_cast<Gather::data_t *>(&data[0]), strlen(data)); buffer.insert(reinterpret_cast<Gather::data_t *>(&n), sizeof(n), 1); const Gather::Segment *segments = buffer.get_segments(); ASSERT_EQ(expected_str.size() * 2 + sizeof(expected_num), buffer.get_length()); ASSERT_LE(3, buffer.get_size()); ASSERT_EQ(3, buffer.get_count()); ASSERT_TRUE(segments); const Gather::Segment &seg1 = segments[0]; ASSERT_EQ(expected_str.size(), seg1.length); ASSERT_EQ(expected_str, string(reinterpret_cast<char *>(seg1.data), seg1.length)); const Gather::Segment &seg2 = segments[1]; ASSERT_EQ(sizeof(expected_num), seg2.length); for (unsigned i = 0; i < sizeof(expected_num); ++i) ASSERT_EQ((expected_num >> (i * 8)) & 0xff, seg2.data[i]) << "Where i = " << i; const Gather::Segment &seg3 = segments[2]; ASSERT_EQ(expected_str.size(), seg3.length); ASSERT_EQ(expected_str, string(reinterpret_cast<char *>(seg3.data), seg3.length)); } TEST(GatherTest, TestSimpleLimit) { Gather::Buffer buffer(0); char data[] = "Hello, world!"; const unsigned int chop(8); const string expected(&data[0], strlen(data) - chop); Gather::Segment& seg = buffer.add( reinterpret_cast<Gather::data_t *>(&data[0]), strlen(data)); buffer.limit(buffer.get_length() - chop); ASSERT_EQ(expected.size(), buffer.get_length()); ASSERT_LE(1, buffer.get_size()); ASSERT_EQ(1, buffer.get_count()); ASSERT_EQ(expected, string(reinterpret_cast<char *>(seg.data), seg.length)); } TEST(GatherTest, TestSimpleConsume) { Gather::Buffer buffer(0); char data[] = "Hello, world!"; const unsigned int chop(7); const string expected(&data[chop], strlen(data) - chop); Gather::Segment& seg = buffer.add( reinterpret_cast<Gather::data_t *>(&data[0]), strlen(data)); buffer.consume(chop); ASSERT_EQ(expected.size(), buffer.get_length()); ASSERT_LE(1, buffer.get_size()); ASSERT_EQ(1, buffer.get_count()); ASSERT_EQ(expected, string(reinterpret_cast<char *>(seg.data), seg.length)); } TEST(GatherTest, TestCopy) { Gather::Buffer buffer(0); char one[] = "xHell"; char two[] = "o, wo"; char three[] = "rld!x"; const string expected = string(&one[1], strlen(one) - 1) + string(&two[0], strlen(two)) + string(&three[0], strlen(three) - 1); buffer.add(reinterpret_cast<Gather::data_t *>(&one[0]), strlen(one)); buffer.add(reinterpret_cast<Gather::data_t *>(&two[0]), strlen(two)); buffer.add(reinterpret_cast<Gather::data_t *>(&three[0]), strlen(three)); string actual; actual.resize(expected.size()); unsigned int copied = buffer.copy( reinterpret_cast<Gather::data_t *>(const_cast<char *>(actual.c_str())), 1, expected.size()); ASSERT_EQ(expected.size(), copied); ASSERT_EQ(expected, actual); } TEST(GatherTest, TestAddFromBuffer) { Gather::Buffer buffer1(0); char one[] = "xHell"; const string one_str(&one[0], strlen(one)); char two[] = "o, wo"; const string two_str(&two[0], strlen(two)); char three[] = "rld!x"; const string three_str(&three[0], strlen(three)); buffer1.add(reinterpret_cast<Gather::data_t *>(&one[0]), strlen(one)); buffer1.add(reinterpret_cast<Gather::data_t *>(&two[0]), strlen(two)); buffer1.add(reinterpret_cast<Gather::data_t *>(&three[0]), strlen(three)); Gather::Buffer buffer2(0); char data[] = "Hello"; const string hello(&data[0], strlen(data)); buffer2.add(reinterpret_cast<Gather::data_t *>(&data[0]), strlen(data)); buffer2.add(buffer1, 6, 8); const Gather::Segment *segments = buffer2.get_segments(); ASSERT_LE(3, buffer2.get_size()); ASSERT_EQ(3, buffer2.get_count()); ASSERT_TRUE(segments); const Gather::Segment& segment1 = segments[0]; ASSERT_EQ(hello.size(), segment1.length); ASSERT_EQ(hello, string(reinterpret_cast<char *>(segment1.data), segment1.length)); const Gather::Segment& segment2 = segments[1]; ASSERT_EQ(two_str.substr(1).size(), segment2.length); ASSERT_EQ(two_str.substr(1), string(reinterpret_cast<char *>(segment2.data), segment2.length)); const Gather::Segment& segment3 = segments[2]; ASSERT_EQ(three_str.substr(0, 4).size(), segment3.length); ASSERT_EQ(three_str.substr(0, 4), string(reinterpret_cast<char *>(segment3.data), segment3.length)); } TEST(GatherTest, TestAddBuffer) { Gather::Buffer buffer1(0); char one[] = "Hello"; const string one_str(&one[0], strlen(one)); char two[] = ", wo"; const string two_str(&two[0], strlen(two)); char three[] = "rld!"; const string three_str(&three[0], strlen(three)); buffer1.add(reinterpret_cast<Gather::data_t *>(&one[0]), strlen(one)); Gather::Buffer buffer2(0); Gather::Segment& segment = buffer2.add(strlen(two)); memcpy(segment.data, &two[0], segment.length); buffer2.add(reinterpret_cast<Gather::data_t *>(&three[0]), strlen(three)); buffer1.add(buffer2); const Gather::Segment *segments = buffer1.get_segments(); ASSERT_LE(3, buffer1.get_size()); ASSERT_EQ(3, buffer1.get_count()); ASSERT_TRUE(segments); const Gather::Segment& segment1 = segments[0]; ASSERT_EQ(one_str.size(), segment1.length); ASSERT_EQ(one_str, string(reinterpret_cast<char *>(segment1.data), segment1.length)); const Gather::Segment& segment2 = segments[1]; ASSERT_EQ(two_str.size(), segment2.length); ASSERT_EQ(two_str, string(reinterpret_cast<char *>(segment2.data), segment2.length)); const Gather::Segment& segment3 = segments[2]; ASSERT_EQ(three_str.size(), segment3.length); ASSERT_EQ(three_str, string(reinterpret_cast<char *>(segment3.data), segment3.length)); } TEST(GatherTest, TestIteratorLoop) { Gather::Buffer buffer(0); char one[] = "Hello"; const string one_str(&one[0], strlen(one)); char two[] = ", wo"; const string two_str(&two[0], strlen(two)); char three[] = "rld!"; const string three_str(&three[0], strlen(three)); buffer.add(reinterpret_cast<Gather::data_t *>(&one[0]), strlen(one)); buffer.add(reinterpret_cast<Gather::data_t *>(&two[0]), strlen(two)); buffer.add(reinterpret_cast<Gather::data_t *>(&three[0]), strlen(three)); const string expect = one_str + two_str + three_str; string actual; for (Gather::Buffer::iterator it = buffer.begin(); it != buffer.end(); ++it) actual += reinterpret_cast<char&>(*it); ASSERT_EQ(expect.size(), actual.size()); ASSERT_EQ(expect, actual); } TEST(GatherTest, TestIteratorAdd) { Gather::Buffer buffer(0); char one[] = "Hello"; const string one_str(&one[0], strlen(one)); char two[] = ", wo"; const string two_str(&two[0], strlen(two)); char three[] = "rld!"; const string three_str(&three[0], strlen(three)); buffer.add(reinterpret_cast<Gather::data_t *>(&one[0]), strlen(one)); buffer.add(reinterpret_cast<Gather::data_t *>(&two[0]), strlen(two)); buffer.add(reinterpret_cast<Gather::data_t *>(&three[0]), strlen(three)); const string expect = one_str + two_str + three_str; Gather::Buffer::iterator it = buffer.begin(); it += 7; ASSERT_EQ(expect[7], *it); } TEST(GatherTest, TestIteratorSub) { Gather::Buffer buffer(0); char one[] = "Hello"; const string one_str(&one[0], strlen(one)); char two[] = ", wo"; const string two_str(&two[0], strlen(two)); char three[] = "rld!"; const string three_str(&three[0], strlen(three)); buffer.add(reinterpret_cast<Gather::data_t *>(&one[0]), strlen(one)); buffer.add(reinterpret_cast<Gather::data_t *>(&two[0]), strlen(two)); buffer.add(reinterpret_cast<Gather::data_t *>(&three[0]), strlen(three)); const string expect = one_str + two_str + three_str; Gather::Buffer::iterator it = buffer.end(); it -= 6; ASSERT_EQ(expect[7], *it); it -= 1; ASSERT_EQ(expect[6], *it); } TEST(GatherTest, TestDump) { Gather::Buffer buffer(1); ostringstream expect; expect << "Buffer (4/4):" << endl << " 0" << endl << " 12" << endl << "0000: 656c6c6f 2c20776f 726c6421 | ello, world!" << endl << " 4" << endl << "0000: 67452301 | gE#." << endl << "* 8" << endl << "0000: 00010203 04050607 | ........" << endl << "Total length 24" << endl; char data[] = "Hello, world!"; buffer.add(reinterpret_cast<Gather::data_t *>(&data[0]), strlen(data)); Gather::Segment& seg = buffer.add(16); for (unsigned int i = 0; i < seg.length; ++i) seg.data[i] = i; uint32_t n = 0xDEADBEEF; buffer.insert(reinterpret_cast<Gather::data_t *>(&n), sizeof(n)); uint32_t n2 = 0x01234567; buffer.insert(reinterpret_cast<Gather::data_t *>(&n2), sizeof(n2), 2); buffer.limit(buffer.get_length() - 8); buffer.consume(5); ostringstream actual; buffer.dump(actual, true); ASSERT_EQ(actual.str(), expect.str()); } #if !defined(PLATFORM_WINDOWS) TEST(GatherTest, TestFill) { Gather::Buffer buffer(1); char data[] = "Hello, world!"; buffer.add(reinterpret_cast<Gather::data_t *>(&data[0]), strlen(data)); Gather::Segment& seg = buffer.add(16); for (unsigned int i = 0; i < seg.length; ++i) seg.data[i] = i; uint32_t n = 0xDEADBEEF; buffer.insert(reinterpret_cast<Gather::data_t *>(&n), sizeof(n)); uint32_t n2 = 0x01234567; buffer.insert(reinterpret_cast<Gather::data_t *>(&n2), sizeof(n), 2); buffer.limit(buffer.get_length() - 8); buffer.consume(5); struct iovec io[4]; buffer.fill(io, 4); // Note: zero sized buffer is skipped ASSERT_EQ(12, io[0].iov_len); ASSERT_EQ(string("ello, world!"), string(reinterpret_cast<char *>(io[0].iov_base), io[0].iov_len)); ASSERT_EQ(4, io[1].iov_len); ASSERT_EQ(string("gE#\x01"), string(reinterpret_cast<char *>(io[1].iov_base), io[1].iov_len)); ASSERT_EQ(8, io[2].iov_len); ASSERT_EQ(string("\x00\x01\x02\x03\x04\x05\x06\x07", 8), string(reinterpret_cast<char *>(io[2].iov_base), io[2].iov_len)); } #endif TEST(GatherTest, TestGetFlatDataSingleSegment) { Gather::Buffer buffer(0); char data[] = "Hello, world!"; buffer.add(reinterpret_cast<Gather::data_t *>(&data[0]), strlen(data)); Gather::data_t buf[4]; Gather::data_t *p = buffer.get_flat_data(0, 4, buf); ASSERT_NE(p, buf) << "Single segment get_flat_data used temporary buffer!\n"; ASSERT_EQ(string(reinterpret_cast<char *>(p), 4), "Hell"); } TEST(GatherTest, TestGetFlatDataMultiSegment) { Gather::Buffer buffer(0); char one[] = "Hello"; char two[] = ", wo"; char three[] = "rld!"; buffer.add(reinterpret_cast<Gather::data_t *>(&one[0]), strlen(one)); buffer.add(reinterpret_cast<Gather::data_t *>(&two[0]), strlen(two)); buffer.add(reinterpret_cast<Gather::data_t *>(&three[0]), strlen(three)); Gather::data_t buf[7]; Gather::data_t *p = buffer.get_flat_data(3, 7, buf); ASSERT_EQ(p, buf) << "Multi-segment get_flat_data didn't use temporary buffer!\n"; ASSERT_EQ(string(reinterpret_cast<char *>(p), 7), "lo, wor"); } TEST(GatherTest, TestGetFlatDataOffEndFails) { Gather::Buffer buffer(0); char one[] = "Hello"; char two[] = ", wo"; char three[] = "rld!"; buffer.add(reinterpret_cast<Gather::data_t *>(&one[0]), strlen(one)); buffer.add(reinterpret_cast<Gather::data_t *>(&two[0]), strlen(two)); buffer.add(reinterpret_cast<Gather::data_t *>(&three[0]), strlen(three)); Gather::data_t buf[7]; Gather::data_t *p = buffer.get_flat_data(7, 7, buf); ASSERT_FALSE(p) << "get_flat_data off the end didn't fail!\n"; } TEST(GatherTest, TestReplaceSingleSegment) { Gather::Buffer buffer(0); // Need to ensure it's owned data, not referenced memcpy(buffer.add(13).data, "Hello, world!", 13); buffer.replace(0, reinterpret_cast<const Gather::data_t *>("Salut"), 5); Gather::data_t buf[13]; Gather::data_t *p = buffer.get_flat_data(0, 13, buf); ASSERT_EQ(string(reinterpret_cast<char *>(p), 13), "Salut, world!"); } TEST(GatherTest, TestReplaceMultiSegment) { Gather::Buffer buffer(0); char one[] = "Hello"; char two[] = ", wo"; char three[] = "rld!"; buffer.add(reinterpret_cast<Gather::data_t *>(&one[0]), strlen(one)); buffer.add(reinterpret_cast<Gather::data_t *>(&two[0]), strlen(two)); buffer.add(reinterpret_cast<Gather::data_t *>(&three[0]), strlen(three)); buffer.replace(4, reinterpret_cast<const Gather::data_t *>(" freezeth"), 9); Gather::data_t buf[13]; Gather::data_t *p = buffer.get_flat_data(0, 13, buf); ASSERT_EQ(string(reinterpret_cast<char *>(p), 13), "Hell freezeth"); } } // anonymous namespace int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }
cpp
What's the story? Brock Lesnar became the first ever two-time Universal Champion at WWE Crown Jewel when he defeated Braun Strowman for the vacated championship. However, the champ couldn't even rest for a full day before being called out by another MMA turned WWE star. Matt Riddle recently debuted for NXT this week. The King of Bros dominated his first opponent, and with the ovation he received at Full Sail University, it looks like Riddle is already a star in the eyes of the WWE Universe. Riddle has mentioned a few times in the past that he'd like to wrestle Brock Lesnar at some point. Riddle has even gone so far as to say that it's his dream to retire the Universal Champion at WrestleMania. And after the Beast's latest triumph, the King of Bros couldn't help himself. On Twitter, Matt Riddle called out Brock Lesnar once again, claiming that he's "right where he needs him. " Riddle continued on to say, yet again, that he'll be retiring Brock Lesnar in a couple of years. What's next? The newest NXT acquisition is known for making some pretty outlandish goals for himself, but he's also known for reaching them. With two former MMA stars in their ranks, it's not hard to assume that the WWE would consider this a pretty captivating matchup. With Riddle in the prime of his life and a lot of time to carve out an iconic career in the WWE, maybe it's not crazy to think that he may one day get a shot at the WWE's top heavyweight. Would you like to see Matt Riddle face Brock Lesnar at WrestleMania? Let us know in the comments below.
english
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <base data-ice="baseUrl"> <title data-ice="title">API Document</title> <link type="text/css" rel="stylesheet" href="css/style.css"> <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css"> <script src="script/prettify/prettify.js"></script> <script src="script/manual.js"></script> </head> <body class="layout-container" data-ice="rootContainer"> <header> <a href="./">Home</a> <a href="identifiers.html">Reference</a> <a href="source.html">Source</a> <a data-ice="repoURL" href="https://github.com/StoneCypher/pbar" class="repo-url-github">Repository</a> <div class="search-box"> <span> <img src="./image/search.png"> <span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span> </span> <ul class="search-result"></ul> </div> </header> <nav class="navigation" data-ice="nav"><div> <ul> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/pbar.js~pbar.html">pbar</a></span></span></li> </ul> </div> </nav> <div class="content" data-ice="content"><div data-ice="index" class="github-markdown"><h1 id="pbar">pbar</h1> <p>Tiny progress bar widget in css3 and js es6 / es2015. Designed for ease of use.</p> <p>Add to your site with two lines of code:</p> <p><code>ES5</code></p> <pre><code class="lang-html"><code class="source-code prettyprint">&lt;script defer src=&quot;pbar.es5.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; &lt;script defer type=&quot;text/javascript&quot;&gt;var pb = new require(&apos;pbar&apos;).pbar;&lt;/script&gt;</code> </code></pre> <p><code>ES6</code></p> <pre><code class="lang-html"><code class="source-code prettyprint">&lt;script defer src=&quot;pbar.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; &lt;script defer type=&quot;text/javascript&quot;&gt;import {pbar} from &apos;./pbar.js&apos;;&lt;/script&gt;</code> </code></pre> <p>No production dependencies, assets, globals, or primitive decoration. Source is 2.1k. Minified ES5 with <code>require()</code> packaging is 2.6k. Works in browsers, node, and embedded browsers.</p> <p>You have control of color, background color and presence, location (defaults to fixed browser top,) animation transition, and many other things that most people won&apos;t actually care about in practice.</p> <p>Ships with ES6 packaging, ES5 packaging that works in-browser and in-node, and minified ES5. (We&apos;re <a href="https://github.com/google/closure-compiler/commit/d62eb21375427b25b87490cedd833ce4f6cd0371">waiting on a closure compiler patch</a> before es6 minification will work correctly.)</p> <h2 id="tl-dr">tl;dr</h2> <pre><code class="lang-html"><code class="source-code prettyprint">&lt;!doctype html&gt;&lt;html&gt;&lt;head&gt; &lt;script defer src=&quot;../dist/pbar.es5.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt; var pbar, pb; var pb; window.onload = function() { // when the page loads pbar = require(&apos;pbar&apos;).pbar; // load the library pb = new pbar({color:&apos;red&apos;, value:&apos;0%&apos;}); // make a new progress bar, initially red and empty pb.value = &apos;20%&apos;; // immediately animate to 20% } window.setTimeout(function() { // when the timeout fires pb.color = &apos;#aa0&apos;; // change the color to dark yellow pb.value = &apos;80%&apos;; // set the value to 80% }, 2000); // the timeout fires in two seconds window.setTimeout(function() { // when the timeout fires pb.color = &apos;green&apos;; // change the color to green pb.value = &apos;100%&apos;; // set the value to 100% }, 4000); // the timeout fires in four seconds &lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;</code> </code></pre> <h2 id="options">Options</h2> <p><code>pbar</code> with no options, or with an empty object, is legal. <code>pbar</code> will ignore options it doesn&apos;t recognize.</p> <p><code>pbar</code> writes inline styles without quoting. <strong><em>Options are subject to injections</em></strong>. &lt;u&gt;Do not use <code>pbar</code> with user generated content&lt;/u&gt;.</p> <p>Options that <code>pbar</code> does recognize:</p> <ul> <li><code>background</code> is the value of the <code>background</code> property on the master frame tag. Default is transparent.</li> <li><code>border</code> is the value of the <code>border</code> property on the tag drawing the frame. Default is <code>0px solid transparent</code>.</li> <li><code>color</code> is the value of the <code>background</code> property on the tag drawing the bar. Generally this will be a color, but this very easily could be an image, or whatever. Default is #40B3CC, a light blue.</li> <li><code>height</code> is the value of the <code>height</code> property of the frame tag. Default is <code>&apos;4px&apos;</code>. This is a CSS string, and therefore requires a unit unless <code>0</code>.</li> <li><code>value</code> is the value of the <code>width</code> property of the bar tag. Normally this would be expressed as a percentage. Default is <code>50%</code>, which is kind of trolly, but nice for newcomers.</li> <li><code>target</code> is the identity of the bar&apos;s host. Unlike most values, this isn&apos;t a CSS property. Instead, it&apos;s either a DOM reference like you&apos;d get from <code>document.getElementById()</code>, or a string which will be looked up as an <code>id</code> by the library. If no <code>target</code> is given, <code>document.body</code> is assumed.</li> <li><code>position</code> is the <code>position</code> of the frame tag. Default is <code>fixed</code> if no <code>target</code> is given, or <code>absolute</code> if one is.</li> <li><code>transition</code> is the value of the <code>transition</code> property, but with the string <code>&apos;width &apos;</code> prepended to the front. Generally provide the time and/or the easing function in CSS format, such as <code>&apos;0.35s&apos;</code> or <code>&apos;0.5s easeOutSine&apos;</code>. Default is <code>&apos;0.35s&apos;</code>.</li> </ul> <h1 id="polemic-neckbeard-">Polemic :neckbeard:</h1> <p><code>pbar</code> is MIT licensed, because viral licenses and newspeak language modification are evil. Free is <strong><em>only</em></strong> free when it&apos;s free for everyone.</p> </div> </div> <footer class="footer"> Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(0.4.6)</span></a> </footer> <script src="script/search_index.js"></script> <script src="script/search.js"></script> <script src="script/pretty-print.js"></script> <script src="script/inherited-summary.js"></script> <script src="script/test-summary.js"></script> <script src="script/inner-link.js"></script> <script src="script/patch-for-local.js"></script> </body> </html>
html
@import 'reset.css'; @import 'box.css';
css
A mountain of runs scored. A plethora of records broken and set. A career that spanned twenty-four glorious years. He just called time on a glittering journey which began all those years ago at Shivaji Park, under the tutelage of the legendary Ramakant Achrekar (Achrekar Sir, to be precise). It took a ‘late cut’ from the elder statesman to bring the kid to his senses and restore his focus on a game that gave him a lot of joy. Sachin Ramesh Tendulkar – master batsman, immortal icon, international legend – will be missed by legions of fans, and the world of cricket the most. Here are 10 things that the cricket fraternity will miss about Sachin, making them rue his absence from the game: He was all of 16 – skinny, his hair standing up all over his head, and wielding a bat as light as his feet. Pakistan pacer Waqar Younis also made his first appearance in the international arena, and was breathing fire on the Indians along with Wasim Akram and Imran Khan. Waqar broke Sachin’s nose with a nasty bouncer, making him bleed heavily. Navjot Sidhu, at the other end, rushed over to the youngster, and so did the other Pakistanis. The young one just shook off the impact of the blow, walked up to Sidhu and said in his now-famous squeaky voice: Main khelega. Sidhu was shocked, the Pakistanis stunned. Sachin proceeded to play an innings that saved the game for India. Those two words epitomized the hallmark of the teen prodigy’s character – he was going to play on come what may. It made the world sit up and take notice. Ten years later, against the same opposition, Sachin would defy pain to delay the inevitable defeat at Chennai. The Main Khelega attitude was there for all to see, and it remained with him all throughout his career; something that the cricketing fraternity have long admired and will miss sorely. Landmarks, milestones, records – throw any moniker you can think of, and Sachin’s achieved it. Going past both Sir Don Bradman and Sunil Gavaskar’s pre-set target of the maximum Test centuries is no mean feat. Hitting a hundred international centuries – one of them being the first double century scored by a male player in ODIs – requires three things: skill, guts and stamina. Sachin has had all three in equal measure, maybe even more than any other wielder of the willow. In the Test arena – the ultimate destination of a cricketer – Sachin stands like a colossal giant, with the distinction of being the second youngest to score a hundred in the longer format. The only individual landmark he has missed out on so far is a Test triple century; hopefully he can achieve that in a winning cause when he takes the field for the final time. For the statistically inclined members in the world of cricket, Sachin remains the first person to have crossed the 10,000-run mark (and every other 1000-run barrier after that) in ODIs. Speaks volumes of his longevity, doesn’t it? Dennis Lillee, the former Australian pacer of the seventies and early eighties, was unimpressed by the precociously talented kid from Mumbai, who had arrived at the MRF Pace Foundation with ambitions of becoming a world-class fast bowler. He advised the youngster to concentrate on batting, and he never looked back from that moment onward. But Sachin did not give up bowling entirely. He worked on being as versatile as possible on this aspect, and added both leg-breaks as well as off-breaks to his medium-pace. When it came to breaking partnerships, his services were called upon more than once. No one will forget the semi-final of the Hero Cup against South Africa at the Eden Gardens, when none of India’s frontline bowlers were willing to take the ball for the last over. Tendulkar put his hand up and requested skipper Azharuddin that he be allowed to send down the final six deliveries, managing to convince both the leader as well as veteran all-rounder Kapil Dev. What followed was history – India had to defend six runs, Sachin gave away three, and a wicket also fell courtesy a run-out from Salil Ankola. The man himself remained as cool as ever despite the high amount of pressure on his side. He single-handedly won the quarter-final of the 1998 ICC Knockout Trophy against Australia with a magical century and four wickets. Most remember Harbhajan Singh‘s exploits at the Eden Gardens in 2001, but it was the Little Master’s triple strike on the final day that helped India level the series. It was his unreadable delivery that consigned Adam Gilchrist to his one and only king pair in Test cricket, and will be remembered by the cricketing world for eons to come. During most of the nineties, the little champion’s wicket was the prize that every bowler wanted. The buzz around cricketing circles at the time was that if you could knock over Sachin early, the rest would fall like a pack of cards. It happened to come true more often than not. The infamous 1996 World Cup semi-final comes to mind. Tendulkar’s dismissal triggered a collapse that the crowds couldn’t stomach, and ultimately the match referee awarded the game to Sri Lanka, who went on to win the final. Each time the Master Blaster fell early, India struggled to put up a decent score or stumbled during the chase. The humiliation dished out by the Lankans at the Coca Cola Trophy final in 2000 is still fresh in the minds of many. At the NatWest Series final in 2002, Sachin was bowled by left-arm spinner Ashley Giles when India were struggling to chase down 326. Millions of viewers in India switched off their television sets – a practice they followed since the mid-nineties. Certainly not something that the great man himself wants to remember, but despite his recent travails in Test matches, he still remains the prize catch. He just enjoyed doing what he did best – make runs. No, scratch that. Others made runs, Sachin made scores of runs. There was always a hint of the mischievous child in that smiling face of his each time he made a fifty or a hundred. In the World Cup editions of 1996, 2003 and 2011, he crafted at least one century – each knock a lot more polished and aesthetic than the last. Yet, nothing could take away the sheer joy that suffused his facial features when his innings won games for his side. His double century against the South Africans at Gwalior in 2010 let the entire cricketing fraternity know that at 37, Sachin still had the appetite for amassing as many runs as possible; a run-glutton he was, so to speak. The similarities with Bradman do not stop with their batting styles. Both had such a propensity to score truckloads of runs that it became difficult for opposing captains to set attacking fields in order to curtail their gluttony. It took Bodyline to keep Bradman in check, while Saqlain Mushtaq’s doosra and Glenn McGrath’s probing off-stump line managed to do the same to Tendulkar, albeit briefly. It is the burning desire for runs that will be conspicuous by its absence when Sachin walks into the sunset of a glorious career. More often than not, the veteran batsman has waged a lone fight for his team on cricket’s battle grounds. It began with his maiden Test century against England at Old Trafford in 1990, where he had less support before Manoj Prabhakar’s arrival at the crease; his sublime innings saved the match for India. The Chepauk Test in 1999 also remains a witness to his single-minded focus in winning games for his side, despite the pain of a chronically troublesome back. On the 2000 tour to Australia, he was the only one to shine during a nightmarish period in his captaincy; at Melbourne, his century and half-century in both innings failed to prevent an Indian defeat. But each time he scores a century in the final of a tournament, India has gone on to win the match handsomely. His blitzkrieg against Zimbabwe in the final of the Coca Cola Trophy in 1998 led his side to a comprehensive ten-wicket win. Henry Olonga, who had dismissed him in the previous game with a short delivery, was given a crash course in batting as the master simply tore him apart. It was the arrival of young turks Yuvraj Singh, Mohammad Kaif, Virender Sehwag and MS Dhoni that lifted the pressure of getting tall scores from Tendulkar’s shoulders. But for the better part of his 24-year journey, it was the Maestro’s immense talent that India thrived on. Perhaps inspired by the Don, Sachin suggested the promotion of promising young all-rounder Irfan Pathan up the order during the captaincy of Rahul Dravid and tenure of Greg Chappell as the Indian coach. The move paid off almost immediately during the Sri Lanka series, with Pathan belting 83 in one game. Sachin has always been an integral part of the team’s strategic processes, and has been observed having lengthy, animated chats with the captain on the field. In a recent interview, India skipper MS Dhoni has acknowledged that his inputs and differences of opinion with the master about overall strategy resulted in his elevation to the hot seat. Along with plotting against rival teams, Tendulkar also masterminded the downfall of Shane Warne during Australia’s 1998 visit to India. He would regularly and repeatedly charge down the track to hammer the bowler for boundaries, almost at will. He has also come up with several unorthodox shots – the paddle-sweep, scoop over fine leg, and the trademark upper-cut over third man, and these strokes have paid rich dividends. This, if not his presence, will be hard to forget for the fraternity at large. Before the arrival of Virender Sehwag and MS Dhoni, there was Sachin Tendulkar – the original Destroyer of bowling attacks. He was a ferocious hitter of the ball in his younger days, and once hit four massive sixes off Pakistan’s legendary spinner Abdul Qadir in a 20-over exhibition game. Other notable exploits of his unbridled hitting include Desert Storm in 1998, whacking the stuffing out of the Kenyan bowlers in the 1999 World Cup, and pulling Andrew Caddick for a massive six over square leg in 2003. Upon his surgery for a recurring back problem, a shoulder operation and treatment for tennis elbow, he focused more on dismantling the bowling attacks with his new arsenal of shots. From out-and-out stroke-play to a much more refined, classical selection of shots, Tendulkar dominated the bowlers with the precision of a surgeon. There will be no more views of the Master in full flow as he prepares to bring down the curtains on an illustrious career. But perhaps in his final match, we may get to see Tendulkar of old! Described as the most wholesome batsman of his time, Sachin’s stance is based on complete balance and perfect head position when facing a delivery. He doesn’t indulge in unnecessary flourishes or flashy maneuvers, and quite surprisingly, he has little preference for the slow pitches on offer in the subcontinent. Uniquely, Sachin has the habit of punching the ball in the direction he wants it to go. The straight drive as well as the cover drive are examples of his compactness at the crease; now vintage stuff for the youthful fans of the Master. He has also shown an amazing ability to adapt to his body’s needs and keep scoring consistently. Not many batsmen in the world, past or present, have managed to do so. Blending classical technique with raw aggression and fluid grace, Sachin in full flow is a sight for sore eyes! Along with Rahul Dravid, Sachin too has carried himself with the utmost dignity while remaining untouched by needless controversy as much as possible. His middle-class roots have certainly contributed to this, but it was his long association with childhood coach Ramakant Achrekar that inculcated a sense of discipline and hard work while being humble at the same time. It is not easy to shoulder the hopes of a billion Indian fans and many more around the world for over two decades, leading some to wonder whether Tendulkar is actually human. Yet, he has done so with aplomb and in his own unassuming self. Flashy stuff, air kisses, publicity stunts – none of these have been seen in the great man who has earned all his riches the hard way. He is as simple as ever, and dignified in his approach both on and off the field. For his sheer admirable characteristics, if not for his batting exploits, Sachin Ramesh Tendulkar will leave a hole in the hearts of the cricketing fraternity across the world.
english
Panda Robotics' Kickstarter campaign to build a "friendly, affordable 3-D printer" has been kicked to the curb less than a month after its launch. The PandaBot, a cute printer that could fit on a standard desk, received funding from 130 backers and managed to reach a total of $38,959 out of the developer's $50,000 goal. Aiming to become an affordable device for those wanting to print 3D objects at home, it quickly gained backers and many waited in anticipation for the printer to be released commercially. However, in order to focus on building a better printer, the team have decided to drop the project. On the PandaBot blog and Kickstarter campaign page, the team wrote: "In the past weeks, we've received requests from institutions like universities, resellers, distributors and individuals who want to buy final PandaBots in bulk. This is wonderful, but we don't want our Kickstarter backers, those who put their money on the line for us, to settle for a beta product so we can build a better product for all those who waited." The PandaBot team say that product development is going to continue, and to say sorry to their backers each contributor will be given a t-shirt and $200 coupon towards a future version of the home 3D printer. With some luck, Panda Robotics wants to have a ready-made printer ready in the first half of 2013. There's no indication how much the to-be printer will cost, although the original project states that the PandaBot would cost around $800. If you can't wait, there's always the option of the $499 Solidoodle.
english
{ "directions": [ "Place the ginger ale in a 2-cup microwave-safe measuring cup, and microwave on high until the soda is hot but not boiling, 1 to 2 minutes. Gently stir in the butter to melt, then stir in the brown sugar and cinnamon. Don't stir too vigorously to avoid the soda fizzing up. Pour the drink into mugs, and serve." ], "image": "https://images.media-allrecipes.com/userphotos/560x315/2502053.jpg", "ingredients": [ "2 cups ginger ale", "1 teaspoon butter", "1 tablespoon brown sugar", "1/4 teaspoon cinnamon" ], "language": "en-US", "source": "allrecipes.com", "tags": [], "title": "Butterbeer", "url": "http://allrecipes.com/recipe/213135/butterbeer/" }
json
/******************************************************************************* * Copyright (c) 2004 Actuate Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Actuate Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.birt.report.engine.internal.executor.doc; import org.eclipse.birt.report.engine.content.IContent; public class BodyReader extends ReportItemReader { ReportItemReaderManager manager; public BodyReader( AbstractReportReader reportReader, Fragment fragment ) { super( reportReader.context ); this.reader = reportReader.reader; this.manager = reportReader.manager; this.fragment = fragment; Fragment firstChild = fragment.getFirstFragment( ); if ( firstChild != null ) { this.child = ( (Long) firstChild.getOffset( ) ).longValue( ); } else { this.child = -1; } } public IContent execute( ) { return context.getReportContent( ).getRoot( ); } ReportItemReader createExecutor( ReportItemReader parent, long offset, Fragment fragment ) { return manager.createExecutor( parent, offset, fragment ); } }
java
<reponame>bundestag/dip21-daten<filename>18/Schriftliche Frage/18-70450.json { "vorgangId": "70450", "VORGANG": { "WAHLPERIODE": "18", "VORGANGSTYP": "Schriftliche Frage", "TITEL": "Ergebnis des Deutschen Marken- und Patentamts im Verfahren gegen VG Media wegen der ausschließlich für Google geltenden Erteilung einer widerruflichen Gratiseinwilligung in die unentgeltliche Nutzung von Presseerzeugnissen", "AKTUELLER_STAND": "Beantwortet", "SIGNATUR": "", "GESTA_ORDNUNGSNUMMER": "", "WICHTIGE_DRUCKSACHE": { "DRS_HERAUSGEBER": "BT", "DRS_NUMMER": "18/6137", "DRS_TYP": "Schriftliche Fragen", "DRS_LINK": "http://dipbt.bundestag.de:80/dip21/btd/18/061/1806137.pdf" }, "EU_DOK_NR": "", "SCHLAGWORT": [ "Deutsches Patent- und Markenamt", { "_fundstelle": "true", "__cdata": "Google" }, "Leistungsschutzrecht", "Markenrecht", "Presseverlag", { "_fundstelle": "true", "__cdata": "Verwertungsgesellschaft" } ], "ABSTRAKT": "Originaltext der Frage(n): \r\n \r\nZu welchem Ergebnis kam nach Kenntnis der Bundesregierung das Deutsche Patent- und Markenamt in dem Verfahren gegen die Verwertungsgesellschaft VG Media wegen der ausschließlich für Google geltenden Erteilung einer widerruflichen Gratiseinwilligung für die Nutzung von Textausschnitten und Fotos, die dem Leistungsschutzrecht für Presseverleger unterliegen?" }, "VORGANGSABLAUF": { "VORGANGSPOSITION": { "ZUORDNUNG": "BT", "URHEBER": "Schriftliche Frage/Schriftliche Antwort ", "FUNDSTELLE": "25.09.2015 - BT-Drucksache 18/6137, Nr. 16", "FUNDSTELLE_LINK": "http://dipbt.bundestag.de:80/dip21/btd/18/061/1806137.pdf", "PERSOENLICHER_URHEBER": [ { "VORNAME": "Halina", "NACHNAME": "Wawzyniak", "FUNKTION": "MdB", "FRAKTION": "DIE LINKE", "AKTIVITAETSART": "Frage" }, { "VORNAME": "Christian", "NACHNAME": "Lange", "FUNKTION": "Parl. Staatssekr.", "RESSORT": "Bundesministerium der Justiz und für Verbraucherschutz", "AKTIVITAETSART": "Antwort" } ] } } }
json
Cricket is a religion and Sachin Tendulkar is a God in our country. Television sets used to be turned off when Sachin Tendulkar was dismissed. Moreover, for a large number of years, Indian cricket team was synonymous to only one name – Sachin Tendulkar. Tendulkar has given the cricket fraternity a lot to cherish about. Be it his dessert storm innings in Sharjah or his memorable 98-run knock against Pakistan in the 2003 World Cup. His 117-run knock against Australia in the CB series final was also something fans will remember for a long period of time. It was on March 18, 2012. The stage was set between the arch-rivals India and Pakistan to clash. But what overshadowed the traditional fixture of the two red-hot rivalries was Sachin Tendulkar — a man who has give it his all to the game — was playing his last One-Day International (ODI). And what better than winning a match over your arch-rivals by six-wickets on your swansong! The Master Blaster gave it his all his final ODI. He scored 52 runs against Pakistan off 48 deliveries. His knock was laced with five boundaries and one hit over the fence. And as a result, India managed to chase down the total of 330 runs with 13 balls to spare as Virat Kohli played a whirlwind knock of 183 runs. In his entire career, Tendulkar recorded a century of centuries, 51 in Tests and 49 in ODIs. He accumulated 15,921 runs in the longest format of the game and 18,426 runs in ODIs. The record number of runs in both the formats still remain intact. Tendulkar was also the first cricketer to score a double century in the ODIs. Though, it has been years that the Mumbai batsman has bid adieu to cricket, his contribution to the game makes him one of the greatest players on the international circuit.
english
Consumer electronics firm Micromax is aspiring to capture 15 percent market share in the TV panel segment by next year and planning to set up a new unit to ramp up production of budget-range models by investing up to Rs. 500 crore. The company aims to sell around 1.5 million panels in 2016 and provide the latest technology of TV viewing with an affordable price range. "We are aiming to have around 15 percent market share next year. Micromax is expected to sell around 1.5 million panels in 2015 with an addition of 7 percent market share," Micromax Informatics Co-founder Rajesh Agarwal told PTI. At present Micromax, which had forayed into TV panel segment in 2012, has 8 percent share of the total market, which is around 10 million units, he added. Micromax, which has a plant in Rudrapur in Uttarakhand, is also looking to establish a new unit to ramp up its production to meet the demand. "We are going to start a new unit, as we are thinking to have two units. We would invest around Rs. 200 to 500 crore on the new unit," Agarwal said. Micromax's Rudrapur unit has capacity to roll out around one lakh units per month, he added. Presently, the company uses 50 percent localised components for the TV unit and rest portions as glasses etc are imported. However, the company is planning to increase the local components gradually. "By 2020, we expect to use all localised components. But it would also depend on external factors as firms like Foxconn are coming to India which would have glass production facility here," he said. Micromax sells a range of LED, FHD and UHD panels from 20 inches screen size, priced between Rs. 10,590 and Rs. 88,990. besides on all major e-commerce portals. "We are covering 35 percent of the total point of sales," he said adding the objective is democratisation of technology to the last mile. According to him, "Micromax is bringing right experience to the people for the B and C class towns with its innovations." However, he also added that 'surprisingly' the company is strong in metro markets along with 'B' and 'C' class towns. TV segment is contributing around 7 percent of Micromax Informatics, which also sells mobile handsets, tablets, data cards and laptops.
english
JORHAT: The All Assam Students' Union (AASU), Jorhat district committee on Friday took out a protest rally against sky-rocketing prices of fuel, LPG cylinder, essential commodities and life-saving drugs from the JDSA ground to the Deputy Commissioner's office complex. The protesters were holding banners, placards, cutouts of LPG cylinders and mustard oil bottles. The protestors shouted slogans against the BJP-led Central and state governments for the sharp increase of prices of all essential commodities. They also slammed the Food and Civil Supplies and Consumer Affairs department for remaining silent spectators in the present scenario. Sankalpa Gogoi Jorhat district AASU president, said that the students' body submitted a memorandum to the Chief Minister through the Deputy Commissioner seeking immediate steps by the government to bring down prices. Also watch:
english
<reponame>dciborow/CDM<filename>objectModel/Java/objectmodel/src/main/java/com/microsoft/commondatamodel/objectmodel/storage/StorageManager.java // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. package com.microsoft.commondatamodel.objectmodel.storage; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.JsonNodeFactory; import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.base.Strings; import com.microsoft.commondatamodel.objectmodel.cdm.*; import com.microsoft.commondatamodel.objectmodel.enums.CdmLogCode; import com.microsoft.commondatamodel.objectmodel.utilities.JMapper; import com.microsoft.commondatamodel.objectmodel.utilities.StorageUtils; import com.microsoft.commondatamodel.objectmodel.utilities.StringUtils; import java.io.IOException; import java.net.MalformedURLException; import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.concurrent.CompletableFuture; import com.microsoft.commondatamodel.objectmodel.utilities.logger.Logger; import org.apache.commons.lang3.tuple.ImmutablePair; public class StorageManager { private static final String TAG = StorageManager.class.getSimpleName(); private final CdmCorpusDefinition corpus; private final Map<String, CdmFolderDefinition> namespaceFolder = new LinkedHashMap<>(); private String defaultNamespace; private Map<String, StorageAdapter> namespaceAdapters = new LinkedHashMap<>(); // The namespaces that have default adapters defined by the program and not by a user. private Set<String> systemDefinedNamespaces; public StorageManager(final CdmCorpusDefinition corpus) { this.corpus = corpus; this.systemDefinedNamespaces = new HashSet<>(); // Set up default adapters. this.mount("local", new LocalAdapter(System.getProperty("user.dir") + "\\objectmodel")); this.mount("cdm", new CdmStandardsAdapter()); systemDefinedNamespaces.add("local"); systemDefinedNamespaces.add("cdm"); } public void mount(final String nameSpace, final StorageAdapter adapter) { try (Logger.LoggerScope logScope = Logger.enterScope(StorageManager.class.getSimpleName(), getCtx(), "mount")) { if (StringUtils.isNullOrTrimEmpty(nameSpace)) { Logger.error(this.corpus.getCtx(), TAG, "mount", null, CdmLogCode.ErrStorageNullNamespace); return; } if (adapter != null) { if (adapter instanceof StorageAdapterBase) { ((StorageAdapterBase) adapter).setCtx(this.corpus.getCtx()); } this.namespaceAdapters.put(nameSpace, adapter); final CdmFolderDefinition fd = new CdmFolderDefinition(this.corpus.getCtx(), ""); fd.setCorpus(this.corpus); fd.setNamespace(nameSpace); fd.setFolderPath("/"); this.namespaceFolder.put(nameSpace, fd); this.systemDefinedNamespaces.remove(nameSpace); } else { Logger.error(this.corpus.getCtx(), TAG, "mount", null, CdmLogCode.ErrStorageNullAdapter); } } } public List<String> mountFromConfig(final String adapterConfig) { return mountFromConfig(adapterConfig, false); } public List<String> mountFromConfig(final String adapterConfig, final boolean doesReturnErrorList) { if (Strings.isNullOrEmpty(adapterConfig)) { Logger.error(this.corpus.getCtx(), TAG, "mountFromConfig", null, CdmLogCode.ErrStorageNullAdapterConfig); return null; } JsonNode adapterConfigJson; try { adapterConfigJson = JMapper.MAP.readTree(adapterConfig); } catch (final IOException e) { throw new StorageAdapterException("Failed to convert config jsonNode", e); } if (adapterConfigJson.has("appId")) { this.corpus.setAppId(adapterConfigJson.get("appId").asText()); } if (adapterConfigJson.has("defaultNamespace")) { this.defaultNamespace = adapterConfigJson.get("defaultNamespace").asText(); } final List<String> unrecognizedAdapters = new ArrayList<>(); for (final JsonNode item : adapterConfigJson.get("adapters")) { final String nameSpace; // Check whether the namespace exists. if (item.has("namespace")) { nameSpace = item.get("namespace").asText(); } else { Logger.error(this.corpus.getCtx(), TAG, "mountFromConfig", null, CdmLogCode.ErrStorageMissingNamespace); continue; } final JsonNode configs; // Check whether the config exists. if (item.has("config")) { configs = item.get("config"); } else { Logger.error(this.corpus.getCtx(), TAG, "mountFromConfig", null, CdmLogCode.ErrStorageMissingJsonConfig, nameSpace); continue; } if (!item.has("type")) { Logger.error(this.corpus.getCtx(), TAG, "mountFromConfig", null, CdmLogCode.ErrStorageNullNamespace, nameSpace); continue; } try { final String itemType = item.get("type").asText(); StorageAdapter adapter = null; switch (itemType) { case CdmStandardsAdapter.TYPE: adapter = new CdmStandardsAdapter(); break; case LocalAdapter.TYPE: adapter = new LocalAdapter(); break; case GithubAdapter.TYPE: adapter = new GithubAdapter(); break; case RemoteAdapter.TYPE: adapter = new RemoteAdapter(); break; case AdlsAdapter.TYPE: adapter = new AdlsAdapter(); break; default: unrecognizedAdapters.add(JMapper.WRITER.writeValueAsString(item)); } if (adapter != null) { adapter.updateConfig(JMapper.WRITER.writeValueAsString(configs)); this.mount(nameSpace, adapter); } } catch (final JsonProcessingException e) { throw new StorageAdapterException("Failed to process config as String", e); } catch (final MalformedURLException e) { throw new StorageAdapterException("Config contains malformed URL.", e); } catch (final IOException e) { throw new StorageAdapterException("Failed to construct adapter. AdapterType: " + item.get("type").asText(), e); } } return doesReturnErrorList ? unrecognizedAdapters : null; } public boolean unmount(final String nameSpace) { try (Logger.LoggerScope logScope = Logger.enterScope(StorageManager.class.getSimpleName(), getCtx(), "unmount")) { if (StringUtils.isNullOrTrimEmpty(nameSpace)) { Logger.error(this.corpus.getCtx(), TAG, "unmount", null, CdmLogCode.ErrStorageNullNamespace); return false; } if (this.namespaceAdapters.containsKey(nameSpace)) { this.namespaceAdapters.remove(nameSpace); this.namespaceFolder.remove(nameSpace); this.systemDefinedNamespaces.remove(nameSpace); // The special case, use resource adapter. if (nameSpace.equals("cdm")) { this.mount(nameSpace, new ResourceAdapter()); } return true; } else { Logger.warning(this.corpus.getCtx(), TAG, "unmount", null, CdmLogCode.WarnStorageRemoveAdapterFailed); return false; } } } /** * Allow replacing a storage adapter with another one for testing, leaving folders intact. * * @param nameSpace String * @param adapter StorageAdapter * @deprecated This should only be used for testing only. And is very likely to be removed from * public interface. */ @Deprecated public void setAdapter(String nameSpace, StorageAdapter adapter) { if (StringUtils.isNullOrTrimEmpty(nameSpace)) { Logger.error(this.corpus.getCtx(), TAG, "setAdapter", null, CdmLogCode.ErrStorageNullNamespace); return; } if (adapter != null) { this.namespaceAdapters.put(nameSpace, adapter); } else { Logger.error(this.corpus.getCtx(), TAG, "setAdapter", null, CdmLogCode.ErrStorageNullAdapter); } } public StorageAdapter fetchAdapter(final String nameSpace) { if (StringUtils.isNullOrTrimEmpty(nameSpace)) { Logger.error(this.corpus.getCtx(), TAG, "fetchAdapter", null, CdmLogCode.ErrStorageNullNamespace); return null; } if (this.namespaceFolder.containsKey(nameSpace)) { return this.namespaceAdapters.get(nameSpace); } Logger.error(this.corpus.getCtx(), TAG, "fetchAdapter", null, CdmLogCode.ErrStorageAdapterNotFound, nameSpace); return null; } public CdmFolderDefinition fetchRootFolder(final String nameSpace) { try (Logger.LoggerScope logScope = Logger.enterScope(StorageManager.class.getSimpleName(), getCtx(), "fetchRootFolder")) { if (StringUtils.isNullOrTrimEmpty(nameSpace)) { Logger.error(this.corpus.getCtx(), TAG, "fetchRootFolder", null, CdmLogCode.ErrStorageNullNamespace); return null; } if (this.namespaceFolder.containsKey(nameSpace)) { return this.namespaceFolder.get(nameSpace); } else if (this.namespaceFolder.containsKey(this.defaultNamespace)) { return this.namespaceFolder.get(this.defaultNamespace); } Logger.error(this.corpus.getCtx(), TAG, "fetchRootFolder", null, CdmLogCode.ErrStorageAdapterNotFound, nameSpace); return null; } } public String adapterPathToCorpusPath(final String adapterPath) { try (Logger.LoggerScope logScope = Logger.enterScope(StorageManager.class.getSimpleName(), getCtx(), "adapterPathToCorpusPath")) { for (final Map.Entry<String, StorageAdapter> kv : this.namespaceAdapters.entrySet()) { final String corpusPath = kv.getValue().createCorpusPath(adapterPath); if (corpusPath != null) { // got one, add the prefix return kv.getKey() + ":" + corpusPath; } } Logger.error(this.corpus.getCtx(), TAG, "adapterPathToCorpusPath", null, CdmLogCode.ErrStorageInvalidAdapterPath); return null; } } public String corpusPathToAdapterPath(final String corpusPath) { try (Logger.LoggerScope logScope = Logger.enterScope(StorageManager.class.getSimpleName(), getCtx(), "corpusPathToAdapterPath")) { if (StringUtils.isNullOrTrimEmpty(corpusPath)) { Logger.error(this.corpus.getCtx(), TAG, "corpusPathToAdapterPath", null, CdmLogCode.ErrStorageNullCorpusPath); return null; } final ImmutablePair<String, String> pathTuple = StorageUtils.splitNamespacePath(corpusPath); if (pathTuple == null) { Logger.error(this.corpus.getCtx(), TAG, "corpusPathToAdapterPath", null, CdmLogCode.ErrStorageNullCorpusPath); return null; } final String nameSpace = !StringUtils.isNullOrTrimEmpty(pathTuple.getLeft()) ? pathTuple.getLeft() : this.defaultNamespace; if (this.fetchAdapter(nameSpace) == null) { Logger.error(this.corpus.getCtx(), TAG, "corpusPathToAdapterPath", null, CdmLogCode.ErrStorageNamespaceNotRegistered); return ""; } return this.fetchAdapter(nameSpace).createAdapterPath(pathTuple.getRight()); } } public String createAbsoluteCorpusPath(final String objectPath) { return this.createAbsoluteCorpusPath(objectPath, null); } public String createAbsoluteCorpusPath(final String objectPath, final CdmObject obj) { try (Logger.LoggerScope logScope = Logger.enterScope(StorageManager.class.getSimpleName(), getCtx(), "createAbsoluteCorpusPath")) { if (StringUtils.isNullOrTrimEmpty(objectPath)) { Logger.error(this.corpus.getCtx(), TAG, "createAbsoluteCorpusPath", null, CdmLogCode.ErrPathNullObjectPath); return null; } if (this.containsUnsupportedPathFormat(objectPath)) { // already called statusRpt when checking for unsupported path format. return null; } final ImmutablePair<String, String> pathTuple = StorageUtils.splitNamespacePath(objectPath); if (pathTuple == null) { Logger.error(this.corpus.getCtx(), TAG, "createAbsoluteCorpusPath", null, CdmLogCode.ErrPathNullObjectPath); return null; } final String nameSpace = pathTuple.getLeft(); String newObjectPath = pathTuple.getRight(); String finalNamespace; String prefix = ""; String namespaceFromObj = ""; if (obj instanceof CdmContainerDefinition) { prefix = ((CdmContainerDefinition) obj).getFolderPath(); namespaceFromObj = ((CdmContainerDefinition) obj).getNamespace(); } else if (obj != null) { prefix = obj.getInDocument().getFolderPath(); namespaceFromObj = obj.getInDocument().getNamespace(); } if (prefix != null && this.containsUnsupportedPathFormat(prefix)) { // already called statusRpt when checking for unsupported path format. return null; } if (!Strings.isNullOrEmpty(prefix) && prefix.charAt(prefix.length() - 1) != '/') { Logger.warning(this.corpus.getCtx(), TAG, "createAbsoluteCorpusPath", null, CdmLogCode.WarnStorageExpectedPathPrefix, prefix); prefix += "/"; } // check if this is a relative path if (!Strings.isNullOrEmpty(newObjectPath) && !newObjectPath.startsWith("/")) { if (obj == null) { // relative path and no other info given, assume default and root prefix = "/"; } if (!Strings.isNullOrEmpty(nameSpace) && !Objects.equals(nameSpace, namespaceFromObj)) { Logger.error(this.corpus.getCtx(), TAG, "createAbsoluteCorpusPath", null, CdmLogCode.ErrStorageNamespaceMismatch); return null; } newObjectPath = prefix + newObjectPath; finalNamespace = Strings.isNullOrEmpty(namespaceFromObj) ? (StringUtils.isNullOrTrimEmpty(nameSpace) ? this.defaultNamespace : nameSpace) : namespaceFromObj; } else { finalNamespace = Strings.isNullOrEmpty(nameSpace) ? (StringUtils.isNullOrTrimEmpty(namespaceFromObj) ? this.defaultNamespace : namespaceFromObj) : nameSpace; } return (!StringUtils.isNullOrTrimEmpty(finalNamespace) ? finalNamespace + ":" : "") + newObjectPath; } } /** * Fetches the config. * * @return The JSON string representing the config. */ public String fetchConfig() { final ArrayNode adaptersArray = JsonNodeFactory.instance.arrayNode(); // Construct the JObject for each adapter. for (final Map.Entry<String, StorageAdapter> namespaceAdapterTuple : this.namespaceAdapters.entrySet()) { // Skip system-defined adapters and resource adapters. if (this.systemDefinedNamespaces.contains(namespaceAdapterTuple.getKey()) || namespaceAdapterTuple.getValue() instanceof ResourceAdapter) { continue; } final String config = namespaceAdapterTuple.getValue().fetchConfig(); if (Strings.isNullOrEmpty(config)) { Logger.error(this.corpus.getCtx(), TAG, "fetchConfig", null, CdmLogCode.ErrStorageNullAdapter); continue; } ObjectNode jsonConfig; try { jsonConfig = (ObjectNode) JMapper.MAP.readTree(config); jsonConfig.put("namespace", namespaceAdapterTuple.getKey()); adaptersArray.add(jsonConfig); } catch (final IOException e) { Logger.error(this.corpus.getCtx(), TAG, "fetchConfig", null, CdmLogCode.ErrStorageObjectNodeCastFailed, config, e.getMessage()); } } final ObjectNode resultConfig = JsonNodeFactory.instance.objectNode(); // App ID might not be set. if (this.corpus.getAppId() != null) { resultConfig.put("appId", this.corpus.getAppId()); } resultConfig.put("defaultNamespace", this.defaultNamespace); resultConfig.set("adapters", adaptersArray); try { return JMapper.WRITER.writeValueAsString(resultConfig); } catch (final JsonProcessingException e) { throw new StorageAdapterException("Cannot generate adapters config", e); } } /** * Saves adapters config into a file. * @param name The name of a file. * @param adapter The adapter used to save the config to a file. * @return CompletableFuture */ public CompletableFuture<Void> saveAdapterConfigAsync(final String name, final StorageAdapter adapter) { return adapter.writeAsync(name, fetchConfig()); } public String createRelativeCorpusPath(final String objectPath) { return this.createRelativeCorpusPath(objectPath, null); } public String createRelativeCorpusPath(final String objectPath, final CdmContainerDefinition relativeTo) { try (Logger.LoggerScope logScope = Logger.enterScope(StorageManager.class.getSimpleName(), getCtx(), "createRelativeCorpusPath")) { String newPath = this.createAbsoluteCorpusPath(objectPath, relativeTo); final String namespaceString = relativeTo != null ? relativeTo.getNamespace() + ":" : ""; if (!StringUtils.isNullOrTrimEmpty(namespaceString) && !StringUtils.isNullOrTrimEmpty(newPath) && newPath.startsWith(namespaceString)) { newPath = newPath.substring(namespaceString.length()); if (relativeTo != null && newPath.startsWith(relativeTo.getFolderPath())) { newPath = newPath.substring(relativeTo.getFolderPath().length()); } } return newPath; } } /** * @return Integer * Maximum number of documents read concurrently when loading imports. */ public Integer getMaxConcurrentReads() { return this.corpus.getDocumentLibrary().concurrentReadLock.getPermits(); } /** * @param maxConcurrentReads Integer * Maximum number of documents read concurrently when loading imports. */ public void setMaxConcurrentReads(Integer maxConcurrentReads) { this.corpus.getDocumentLibrary().concurrentReadLock.setPermits(maxConcurrentReads); } private boolean containsUnsupportedPathFormat(final String path) { if (path.startsWith("./") || path.startsWith(".\\") || path.contains("../") || path.contains("..\\") || path.contains("/./") || path.contains("\\.\\") ) { // Invalid path. } else { return false; } Logger.error(this.corpus.getCtx(), TAG, "containsUnsupportedPathFormat", null, CdmLogCode.ErrStorageInvalidPathFormat); return true; } public Map<String, StorageAdapter> getNamespaceAdapters() { return namespaceAdapters; } public void setNamespaceAdapters(final Map<String, StorageAdapter> namespaceAdapters) { this.namespaceAdapters = namespaceAdapters; } public String getDefaultNamespace() { return defaultNamespace; } public void setDefaultNamespace(final String defaultNamespace) { this.defaultNamespace = defaultNamespace; } private CdmCorpusContext getCtx() { return corpus.getCtx(); } }
java
{"name":"BITCOIN","symbol":"BITCOIN","logoURI":"https://raw.githubusercontent.com/BitcoinSimone/Bitcoin/main/borrowPNG.png","decimals":2,"address":"AH4JyGYUTfXJt8F4FuoHQ6FgVNvGNkXE2g2uewNdTk7C","chainId":101,"tags":["Shopping"]}
json
Vedanta share price soared nearly 3% on Tuesday morning to hit a fresh 52-week high as the mining major extended its year-to-date gains to more than 13%. In a recent analyst meeting, the company’s management shed light on its debt reduction plans at the parent level and said that they remain upbeat on demand for metals and minerals on the back of a surge in demand for EVs and renewable energy. Analysts see further upside in Vedanta’s share price while advising investors to buy more shares of the company. Vedanta shares were trading 2.9% higher at Rs 412.75 per share on Tuesday morning. Analysts at Systematix Institutional Equities have a ‘Buy’ rating on the stock with a target price of Rs 567 per share. “We note that Vedanta has demonstrated strong execution capabilities over the last few years. It has been in the lowest decile cost curve across businesses (except oil & gas),” they added in a note. The brokerage firm highlighted that institutional investors have steered clear of Vedanta owing to various reasons such as high debt at the promoter level, unrelated investments and the cyclical nature of its business. “We believe the investor aversion on Vedanta stock is unwarranted. Notably, Jindal Steel & Power and JSW Steel have high levels of debt at promoter entities and related party transactions, but the stocks have elicited investor participation,” they said. The brokerage firm believes deeper investor engagement, a more consistent dividend policy and a measured approach towards new ventures will lead to a gradual re-rating in Vedanta stock. Meanwhile, IIFL Securities has an ‘Add’ rating on the scrip with a target price of Rs 424 per share. “At the analyst meeting, Vedanta Chairman highlighted debt reduction of $5 billion over 3 years at parent Vedanta Resources as a top-most priority, led by an elevated $2 billion annual dividend payout by Vedanta. The brokerage firm said that group deleveraging, growth capex is in focus for Vedanta. Technical analysts at Motilal Oswal have picked Vedanta as their Technical pick of the day with a target of Rs 425 per share and a stop loss of Rs 388 apiece. Fundamental analysts have a target price of Rs 459 per share with a neutral rating. “The stock trades at 4.9x/5.4x FY23E/FY24E EV/EBITDA. At current prices, we do not expect a favorable risk-reward scenario in the stock. Oil, Steel, Aluminum, Zinc – all major commodities which VED produces are above the cycle averages and are supported by the Russia-Ukraine conflict,” they added. Analysts at Systematix Institutional equities said that recent volatility in commodity prices and a likely increase in FSA linkage coal prices by Coal India remain the key monitorables for Vedanta stock. Analysts at Motilal Oswal also added that any reduction in commodity prices may restrict Vedanta’s ability to deliver higher dividends or continue with growth Capex and could keep the leverage at the parent level elevated.
english
{ "category" : "RichTextEditing-Core", "classinstvars" : [ ], "classvars" : [ ], "commentStamp" : "JEH 8/7/2020 17:27", "instvars" : [ "structureIdentifier", "attributes", "preAddHook" ], "name" : "RichTextStructure", "pools" : [ ], "super" : "TextAttribute", "type" : "normal" }
json
Former Chelsea captain John Terry has applauded the Blues' performance in their recent 4-0 win over Juventus in the UEFA Champions League. Terry was pleased to see Chelsea dominate one of the biggest teams in European football on Tuesday. The 40-year-old was also happy to see the club's youngsters perform on the biggest stage. Speaking after Chelsea's win over Juventus, the former defender said: "Dominated one of the best teams in Europe tonight. What a performance from us tonight. So good to see our homegrown players in the team, surrounded by world class players like Thiago Silva. " Chelsea manager Thomas Tuchel was also quite happy with his team's performance against Juventus. He said after the game: "It was a very strong performance and an outstanding result. We knew we had to be patient and at the same time be responsible for the rhythm and intensity. " Chelsea recorded a comfortable 4-0 win over Juventus at Stamford Bridge to secure a safe passage to the knockout stages of the Champions League. The Blues join fellow English clubs Liverpool and Manchester United in the Round of 16. Out of the four goals scored on the night, three were netted by Chelsea's homegrown players. Trevoh Chalobah opened the scoring in the first half before Reece James and Callum Hudson-Odoi added two more in the second half. Timo Werner added a fourth goal in injury time to complete the rout. The defending champions are now through to the knockout rounds of the competition. They will only need to match Juventus' result on the final day to secure the top spot in the group. Chelsea are on course to have a successful 2021-22 season in both the league and the Champions League. The Blues have made a bright start to the new season. As things stand, they are on top of both their Champions League group and the Premier League standings. Thomas Tuchel's men are currently three points clear at the top of the league table. The foundation of Chelsea's outstanding start to the new season has been laid down by their tight defense. The Blues have only conceded four goals in the Premier League and just once in the Champions League. Chelsea will now take on Manchester United in the Premier League at the weekend. The London giants have a great chance of beating the Red Devils this time around.
english
<reponame>fennerh/UAV_Software # -*- coding: utf-8 -*- """ Created on Thu Nov 25 10:19:00 2021 @author: holmanf """ import os,sys from typing_extensions import IntVar ## Defines current working directory even in executable. def resource_path(relative_path): """ Get absolute path to resource, works for development and for PyInstaller """ try: # PyInstaller creates a temp folder and stores path in _MEIPASS base_path = sys._MEIPASS except Exception: base_path = os.path.abspath(".") return os.path.join(base_path, relative_path) os.environ["GDAL_DATA"] = resource_path('gdal') os.environ["PROJ_LIB"] = resource_path('proj') os.environ["USE_PATH_FOR_GDAL_PYTHON"] = 'YES' os.environ['PATH'] = os.pathsep.join(os.environ['PATH'].split(os.pathsep)[:-1]) print(os.environ["PROJ_LIB"]) abspath = os.path.abspath(__file__) dname = (os.path.dirname(abspath)) os.chdir(dname) print(dname) import math import time import shutil import exifread import threading import subprocess import numpy as np import glob, re import pandas as pd import tkinter as tk import tifffile as tiff import fiona import geopandas import traceback import xlsxwriter import threading import ctypes import rasterio import gc import openpyxl from random import randint from rasterio.mask import mask from datetime import datetime from osgeo import ogr, gdal from shapely.geometry import shape, mapping from ttkwidgets import tooltips from tkinter import ttk from tkinter import filedialog from tkinter import messagebox from tkinter import font from tkinter import PhotoImage from tkinter.ttk import Style from ttkwidgets.autocomplete import AutocompleteCombobox from queue import Queue from SonyImage_master import SonyImage_Master from PlotShapfile_Extractor import shapefile_gen from Data_Extractor import hyperspec_master from mergingSony import orthoMerge from itertools import count from PIL import ImageTk, Image from natsort import natsorted ##Set DPI awareness to improve display## ctypes.windll.shcore.SetProcessDpiAwareness(1) ## Define style variables for Tkinter## Large_Font=("Verdana",12,'bold') Norm_Font=("Verdana",10) Small_font=("Verdana",8) ## Define text files for saving locations of shapefiles## fieldfile=open(resource_path('Requirements\\fieldshapefile.txt'),'r+') fieldshape=fieldfile.read() file=open(resource_path('Requirements\\plotshapefiles.txt'),'r+') shapefolder=file.read() groundfile=open(resource_path('Requirements\\groundDEM.txt'),'r+') grnddem=groundfile.read() ##Define Graphics file locations## info_button = resource_path('Graphics\\button_info.png') home_button = resource_path('Graphics\\button_home.png') exit_button = resource_path('Graphics\\button_exit.png') back_button = resource_path('Graphics\\button_back.png') sony_button = resource_path('Graphics\\button_camera.png') geojson_button = resource_path('Graphics\\button_shapefile.png') spectrum_button = resource_path('Graphics\\button_extractor.png') layers_button = resource_path('Graphics\\button_layers.png') class ImageLabel(tk.Label): """a label that displays images, and plays them if they are gifs""" def load(self, im): if isinstance(im, str): im = Image.open(im) self.loc = 0 self.frames = [] try: for i in count(1): self.frames.append(ImageTk.PhotoImage(im.copy())) im.seek(i) except EOFError: pass try: self.delay = im.info['duration'] except: self.delay = 100 if len(self.frames) == 1: self.config(image=self.frames[0]) else: self.next_frame() def unload(self): self.config(image="") self.frames = None def next_frame(self): if self.frames: self.loc += 1 self.loc %= len(self.frames) self.config(image=self.frames[self.loc]) self.after(self.delay, self.next_frame) ## Software Class: Defines the Tkinter variables for the GUI software. class software(tk.Tk): def __init__(self,*args,**kwargs): tk.Tk.__init__(self,*args,**kwargs) # self.tk.call('tk', 'scaling', 3.0) tk.Tk.wm_title(self,"UAV Data Tool") container=tk.Frame(self) container.pack(side='top',fill='both',expand=True) container.grid_rowconfigure(0,weight=1) container.grid_columnconfigure(0,weight=1) self.frames={} for F in (HomePage,ImageCalibrator,batchcalibrator,Shapefilegenerator,HyperSpecExtractor,OrthoMerging): #DataMerger,DataExtractor frame=F(container,self) self.frames[F]=frame frame.grid(row=0,column=0,sticky='nsew') self.show_frame(HomePage) def show_frame(self,cont): frame=self.frames[cont] frame.tkraise() def enditall(self): global file file.close() self.destroy() ## Homepage Class: Defines the variables for the appearance and function of the software homepage. class HomePage(ttk.Frame): def popup_window(self): win_x = self.winfo_rootx()+300 win_y = self.winfo_rooty()+100 window = tk.Toplevel() window.geometry(f'+{win_x}+{win_y}') window.title('UAV Data Tool - Help') label = tk.Label(window, text=''' Image Calibration Tool: if you want to calibrate raw Sony imagery into reflectances. Ortho Merger: if you want to merge multiple spatial rasters together into one file. Shapefile Generator: if you want to process experiment shapefiles ready for data extraction. Data Extractor: if you want to extract data values from spatial raster datasets. ''',justify='left') label.pack(fill='x', padx=50, pady=50) button_close = ttk.Button(window, text="Close", command=window.destroy) button_close.pack(fill='x') def __init__(self,parent,controller): tk.Frame.__init__(self,parent) self.grid_rowconfigure(1, weight=1) self.grid_columnconfigure(0, weight=1) self.topframe = tk.Frame(self) self.midframe = tk.Frame(self) self.btmframe = tk.Frame(self) self.topframe.grid(row=0) self.midframe.grid(row=1) self.btmframe.grid(row=2) label2 = tk.Label(self.topframe,text='UAV Data Tool: Version 1.1') label2.pack(fill='x') info_btn = PhotoImage(file=info_button,master=self).subsample(5,5) ext_btn = PhotoImage(file=exit_button,master=self).subsample(5,5) clb_btn = PhotoImage(file=sony_button,master=self).subsample(2,2) shp_btn = PhotoImage(file=geojson_button,master=self).subsample(2,2) spc_btn = PhotoImage(file=spectrum_button,master=self).subsample(2,2) lyr_btn = PhotoImage(file=layers_button,master=self).subsample(2,2) button1=ttk.Button(self.midframe,text='Image Calibration Tool',image=clb_btn,tooltip='Tool for calibrating Sony a6000 RAW imagery to calibrated reflectance' ,command=lambda: controller.show_frame(ImageCalibrator),compound='top') button1.image = clb_btn button1.grid(row=1,column=1,padx=15, pady=15) button2=ttk.Button(self.midframe,text='Ortho Merger',image=lyr_btn,tooltip='Tool for merging orthomosaics from different sensors',command=lambda: controller.show_frame(OrthoMerging),compound='top') button2.image = lyr_btn button2.grid(row=1,column=2,padx=15, pady=15) button4=ttk.Button(self.midframe,text='Shapefile Generator',image=shp_btn,tooltip='Tool for generating GeoJSON files from Area of Interest shapefiles',command=lambda: controller.show_frame(Shapefilegenerator),compound='top') button4.image = shp_btn button4.grid(row=2,column=1,padx=15, pady=15) button3=ttk.Button(self.midframe,text='Data Extractor',image=spc_btn,tooltip='Tool for extracting statstics from spatial datasets',command=lambda: controller.show_frame(HyperSpecExtractor),compound='top') button3.image = spc_btn button3.grid(row=2,column=2,padx=15, pady=15) button5=ttk.Button(self.btmframe,text='Quit',image=ext_btn,tooltip='Quit software and all running processes',command=controller.enditall,compound='top') button5.image=ext_btn button5.grid(row=1,column=3,padx=5,pady=10) button6=ttk.Button(self.btmframe,text='Help',image=info_btn,tooltip='Get additional help',command=self.popup_window,compound='top') button6.image=info_btn button6.grid(row=1,column=1,padx=5,pady=10) ## Image Calibrator Class: defines the variables for the appearance and function of the Image Calibration Tool. class ImageCalibrator(ttk.Frame): def popup_window(self): win_x = self.winfo_rootx()+300 win_y = self.winfo_rooty()+100 window = tk.Toplevel() window.geometry(f'+{win_x}+{win_y}') window.title('Image Calibrator - Help') label = tk.Label(window, text=''' Raw imagery = Folder containing sony .ARW image files from data capture flight Tec5 file = .xlsx file containing Tec5 irradiance data from data capture flight Average Irradiance = Select to use single meaned irradiance value for relfectance corrections Vignetting Models = Destination folder for band vignetting models produced during processing Out folder = Destination folder for calibrated .tiff imagery''',justify='left') label.pack(fill='x', padx=50, pady=50) button_close = ttk.Button(window, text="Close", command=window.destroy) button_close.pack(fill='x') def get_raw(self): self.button5.configure(state='enabled') folder=tk.filedialog.askdirectory(initialdir = "/",title = 'Select Raw Folder') self.rawfolder.set(folder+'/') try: self.t5file.set((glob.glob(os.path.abspath(os.path.join(self.rawfolder.get(),'../'))+'/'+'*ec5*'+'*.xlsx'))[0]) except: tk.messagebox.showwarning(title='Warning',message='No Tec5 File found') self.t5file.set('blank') self.vigfolder.set(os.path.join(os.path.abspath(os.path.join(self.rawfolder.get(),"../")+'VIG_models\\'),'')) try: self.cam.set(re.split('/',self.rawfolder.get())[re.split('/',self.rawfolder.get()).index('NIR')]) self.outfolder.set(os.path.join(os.path.abspath(os.path.join(self.rawfolder.get(),"../")+(re.split('/',self.rawfolder.get())[re.split('/',self.rawfolder.get()).index('NIR')])+'_AllCorrect'),'')) except: self.cam.set(re.split('/',self.rawfolder.get())[re.split('/',self.rawfolder.get()).index('RGB')]) self.outfolder.set(os.path.join(os.path.abspath(os.path.join(self.rawfolder.get(),"../")+(re.split('/',self.rawfolder.get())[re.split('/',self.rawfolder.get()).index('RGB')])+'_AllCorrect'),'')) def get_t5(self): try: folder=tk.filedialog.askopenfilename(initialdir = os.path.abspath(os.path.join(self.rawfolder.get() ,"../")),title = 'Select Tec5 File',filetypes = (("excel files","*.xlsx"),("all files","*.*"))) self.t5file.set(folder) except: tk.messagebox.showwarning(title='Warning',message='No Tec5 File found') self.t5file.set('blank') def get_vig(self): folder=tk.filedialog.askdirectory(initialdir = os.path.abspath(os.path.join(self.rawfolder.get() ,"../")),title = 'Select Vignette Model Folder') self.vigfolder.set(folder+'/') def get_out(self): folder=tk.filedialog.askdirectory(initialdir = os.path.abspath(os.path.join(self.rawfolder.get() ,"../")),title = 'Select Output Folder') self.outfolder.set(folder+'/') def _toggle_state(self, state): state = state if state in ('normal', 'disabled') else 'normal' widgets = (self.button1, self.button2,self.button3,self.button4,self.button5,self.rgb,self.button8,self.button9,self.button10) for widget in widgets: widget.configure(state=state) def monitor(self, thread): if thread.is_alive(): # check the thread every 100ms self.after(100, lambda: self.monitor(thread)) else: tk.messagebox.showinfo("Processing Complete", "Processing Complete") gc.collect() self._toggle_state('enabled') def click_run(self): self._toggle_state('disabled') try: variables={'infolder':self.rawfolder.get(),'outfolder':self.outfolder.get(),'t5file':self.t5file.get(),'vigdest':self.vigfolder.get(),'camera':self.cam.get(),'average':self.average.get()} gc.collect() thread_1 = threading.Thread(target=SonyImage_Master(variables)) thread_1.setDaemon(True) thread_1.start() self.monitor(thread_1) except Exception as e: tk.messagebox.showerror("Error", e) traceback.print_exc() self._toggle_state('normal') def __init__(self,parent,controller): tk.Frame.__init__(self,parent) self.grid_rowconfigure(1, weight=1) self.grid_columnconfigure(0, weight=1) self.topframe = tk.Frame(self) self.midframe = tk.Frame(self) self.btmframe = tk.Frame(self) self.topframe.grid(row=0) self.midframe.grid(row=1) self.btmframe.grid(row=2) #---VARIABLES---# self.rawfolder=tk.StringVar() self.t5file=tk.StringVar() self.vigfolder=tk.StringVar() self.outfolder=tk.StringVar() self.cam=tk.StringVar() self.queue=Queue() options=['Please Select*','NIR','RGB'] self.batch=[] self.average=tk.IntVar() info_btn = PhotoImage(file=info_button,master=self).subsample(5,5) hme_btn = PhotoImage(file=home_button,master=self).subsample(5,5) ext_btn = PhotoImage(file=exit_button,master=self).subsample(5,5) #---LABELS---# self.label=tk.Label(self.topframe,text='Image Calibration',font=Large_Font) self.label.grid(row=0,column=2,padx=10) self.label=tk.Label(self.topframe,font=Norm_Font, text='Calibrate raw (.ARW) sony images to reflectance (%).') self.label.grid(row=1,column=2,padx=10) #---BUTTONS---# self.button1=ttk.Button(self.midframe,text='Raw Imagery',command=self.get_raw,width=20) self.button1.grid(row=3,column=1,pady=5) self.button2=ttk.Button(self.midframe,text='Tec5 File',command=self.get_t5,width=20) self.button2.grid(row=4,column=1,pady=5) self.button3=ttk.Button(self.midframe,text='Vignetting Models',command=self.get_vig,width=20) self.button3.grid(row=5,column=1,pady=5) self.button4=ttk.Button(self.midframe,text='Out Folder',command=self.get_out,width=20) self.button4.grid(row=6,column=1,pady=5) self.rgb=ttk.OptionMenu(self.midframe,self.cam,*options) self.rgb.grid(row=7,column=2,pady=5) self.button5=ttk.Button(self.midframe,text='Run',command=self.click_run) self.button5.configure(state='disabled') self.button5.grid(row=8,column=2,pady=10) self.button6=ttk.Button(self.midframe,text='Batch Processor',command=lambda: controller.show_frame(batchcalibrator)) self.button6.configure(state='enabled') self.button6.grid(row=9,column=2) self.button7=ttk.Checkbutton(self.midframe,text='Average Irradiance',variable=self.average) self.button7.grid(row=4,column=3) self.button8=ttk.Button(self.btmframe,image=hme_btn,text='Home',tooltip='Go Home (your drunk)',command=lambda: controller.show_frame(HomePage),compound="top") self.button8.image=hme_btn self.button8.grid(row=1,column=1,padx=5,pady=10) self.button9=ttk.Button(self.btmframe,image=info_btn,text='Help',command=self.popup_window,tooltip='Press for more help',compound="top") self.button9.image=info_btn self.button9.grid(row=1,column=2,padx=5,pady=10) self.button10=ttk.Button(self.btmframe,text='Quit',image=ext_btn,tooltip='Quit software and all running processes',command=controller.enditall,compound="top") self.button10.image=ext_btn self.button10.grid(row=1,column=3,padx=5,pady=10) #---ENTRIES---# self.entry1=ttk.Entry(self.midframe,textvariable=self.rawfolder,width=75) self.entry1.grid(row=3,column=2,padx=5) self.entry2=ttk.Entry(self.midframe,textvariable=self.t5file,width=75) self.entry2.grid(row=4,column=2,padx=5) self.entry3=ttk.Entry(self.midframe,textvariable=self.vigfolder,width=75) self.entry3.grid(row=5,column=2,padx=5) self.entry4=ttk.Entry(self.midframe,textvariable=self.outfolder,width=75) self.entry4.grid(row=6,column=2,padx=5) ## Image Calibrator Class: defines the variables for the appearance and function of the Batch Processing Image Calibration Tool. class batchcalibrator(ttk.Frame): def popup_window(self): win_x = self.winfo_rootx()+300 win_y = self.winfo_rooty()+100 window = tk.Toplevel() window.geometry(f'+{win_x}+{win_y}') window.title('Batch Calibrator - Help') label = tk.Label(window, text=''' Raw imagery = Folder containing sony .ARW image files from data capture flight Tec5 file = .xlsx file containing Tec5 irradiance data from data capture flight Average Irradiance = Select to use single meaned irradiance value for reflectance corrections Vignetting Models = Destination folder for band vignetting models produced during processing Out folder = Destination folder for calibrated .tiff imagery Add/Delete = add or remove the current dataset to the batch processing queue ''',justify='left') label.pack(fill='x', padx=50, pady=50) button_close = ttk.Button(window, text="Close", command=window.destroy) button_close.pack(fill='x') def get_raw(self): self.button5.configure(state='enabled') folder=tk.filedialog.askdirectory(initialdir = "/",title = 'Select Raw Folder') self.rawfolder.set(folder+'/') try: self.t5file.set((glob.glob(os.path.abspath(os.path.join(self.rawfolder.get(),'../'))+'/'+'*ec5*'+'*.xlsx'))[0]) except: tk.messagebox.showinfo('Error','No Tec5 file found') self.t5file.set('blank') self.vigfolder.set(os.path.join(os.path.abspath(os.path.join(self.rawfolder.get(),"../")+'VIG_models\\'),'')) try: self.cam.set(re.split('/',self.rawfolder.get())[re.split('/',self.rawfolder.get()).index('NIR')]) self.outfolder.set(os.path.join(os.path.abspath(os.path.join(self.rawfolder.get(),"../")+(re.split('/',self.rawfolder.get())[re.split('/',self.rawfolder.get()).index('NIR')])+'_AllCorrect'),'')) except: self.cam.set(re.split('/',self.rawfolder.get())[re.split('/',self.rawfolder.get()).index('RGB')]) self.outfolder.set(os.path.join(os.path.abspath(os.path.join(self.rawfolder.get(),"../")+(re.split('/',self.rawfolder.get())[re.split('/',self.rawfolder.get()).index('RGB')])+'_AllCorrect'),'')) def get_t5(self): try: folder=tk.filedialog.askopenfilename(initialdir = os.path.abspath(os.path.join(self.rawfolder.get() ,"../")),title = 'Select Tec5 File',filetypes = (("excel files","*.xlsx"),("all files","*.*"))) self.t5file.set(folder) except: tk.messagebox.showinfo('Error','No Tec5 file found') self.t5file.set('blank') def get_vig(self): folder=tk.filedialog.askdirectory(initialdir = os.path.abspath(os.path.join(self.rawfolder.get() ,"../")),title = 'Select Vignette Model Folder') self.vigfolder.set(folder+'/') def get_out(self): folder=tk.filedialog.askdirectory(initialdir = os.path.abspath(os.path.join(self.rawfolder.get() ,"../")),title = 'Select Output Folder') self.outfolder.set(folder+'/') def add2batch(self): batch_vars={'infolder':self.rawfolder.get(),'outfolder':self.outfolder.get(),'t5file':self.t5file.get(),'vigdest':self.vigfolder.get(),'camera':self.cam.get(),'average':self.average.get()} self.batch.append(batch_vars) self.batchbox.insert('end',str(batch_vars)) self.button9.configure(state='enabled') def deletebatch(self): self.batch.pop(-1) self.batchbox.delete('1.0','end') self.batchbox.insert('end',self.batch) def _toggle_state(self, state): state = state if state in ('normal', 'disabled') else 'normal' widgets = (self.button1, self.button2,self.button3,self.button4,self.button5,self.rgb,self.button8,self.button9,self.button10) for widget in widgets: widget.configure(state=state) def monitor(self, thread): if thread.is_alive(): # check the thread every 100ms self.after(100, lambda: self.monitor(thread)) else: tk.messagebox.showinfo("Processing Complete", "Processing Complete") gc.collect() self._toggle_state('enabled') def batchrun(self): self._toggle_state('disabled') for batch in self.batch: print(batch) gc.collect() thread_1 = threading.Thread(target=SonyImage_Master(batch)) thread_1.setDaemon(True) thread_1.start() self.monitor(thread_1) def __init__(self,parent,controller): tk.Frame.__init__(self,parent) self.grid_rowconfigure(1, weight=1) self.grid_columnconfigure(0, weight=1) self.topframe = tk.Frame(self) self.midframe = tk.Frame(self) self.btmframe = tk.Frame(self) self.topframe.grid(row=0) self.midframe.grid(row=1) self.btmframe.grid(row=2) #---VARIABLES---# self.rawfolder=tk.StringVar() self.t5file=tk.StringVar() self.vigfolder=tk.StringVar() self.outfolder=tk.StringVar() self.cam=tk.StringVar() self.queue=Queue() options=['Please Select*','NIR','RGB'] self.batch=[] self.average=tk.IntVar() info_btn = PhotoImage(file=info_button,master=self).subsample(5,5) hme_btn = PhotoImage(file=home_button,master=self).subsample(5,5) ext_btn = PhotoImage(file=exit_button,master=self).subsample(5,5) bck_btn = PhotoImage(file=back_button,master=self).subsample(5,5) #---LABELS---# self.label=tk.Label(self.topframe,text='Image Calibration',font=Large_Font) self.label.grid(row=0,column=2,padx=10) self.label1=tk.Label(self.topframe,font=Norm_Font, text='Calibrate raw (.ARW) sony images to reflectance (%), but now in batches!') self.label1.grid(row=1,column=2,padx=10) #---BUTTONS---# self.button1=ttk.Button(self.midframe,text='Raw Imagery',command=self.get_raw,width=20) self.button1.grid(row=1,column=1,pady=5) self.button2=ttk.Button(self.midframe,text='Tec5 File',command=self.get_t5,width=20) self.button2.grid(row=2,column=1,pady=5) self.button3=ttk.Button(self.midframe,text='Vignetting Models',command=self.get_vig,width=20) self.button3.grid(row=3,column=1,pady=5) self.button4=ttk.Button(self.midframe,text='Out Folder',command=self.get_out,width=20) self.button4.grid(row=4,column=1,pady=5) self.rgb=ttk.OptionMenu(self.midframe,self.cam,*options) self.rgb.grid(row=5,column=2,pady=5,columnspan=2) self.button5=ttk.Button(self.midframe,text='Batch Run',command=self.batchrun) self.button5.configure(state='disabled') self.button5.grid(row=9,column=2,columnspan=2) self.button7=ttk.Button(self.midframe,text='Add',command=self.add2batch) self.button7.grid(row=6,column=2,sticky='e') self.button17=ttk.Button(self.midframe,text='Delete',command=self.deletebatch) self.button17.grid(row=6,column=3,sticky='w') self.button27=ttk.Checkbutton(self.midframe,text='Average Irradiance',variable=self.average) self.button27.grid(row=2,column=4) self.button8=ttk.Button(self.btmframe,image=hme_btn,text='Home',tooltip='Go Home (your drunk)',command=lambda: controller.show_frame(HomePage),compound="top") self.button8.image=hme_btn self.button8.grid(row=1,column=1,padx=5,pady=10) self.button9=ttk.Button(self.btmframe,image=info_btn,text='Help',command=self.popup_window,tooltip='Press for more help',compound="top") self.button9.image=info_btn self.button9.grid(row=1,column=2,padx=5,pady=10) self.button10=ttk.Button(self.btmframe,text='Quit',image=ext_btn,tooltip='Quit software and all running processes',command=controller.enditall,compound="top") self.button10.image=ext_btn self.button10.grid(row=1,column=3,padx=5,pady=10) self.button11=ttk.Button(self.btmframe,text='Back',image=bck_btn,command=lambda: controller.show_frame(ImageCalibrator),compound="top") self.button11.image=bck_btn self.button11.grid(row=0,column=2,pady=5) #---ENTRIES---# self.entry1=ttk.Entry(self.midframe,textvariable=self.rawfolder,width=75) self.entry1.grid(row=1,column=2,padx=5,columnspan=2) self.entry2=ttk.Entry(self.midframe,textvariable=self.t5file,width=75) self.entry2.grid(row=2,column=2,padx=5,columnspan=2) self.entry3=ttk.Entry(self.midframe,textvariable=self.vigfolder,width=75) self.entry3.grid(row=3,column=2,padx=5,columnspan=2) self.entry4=ttk.Entry(self.midframe,textvariable=self.outfolder,width=75) self.entry4.grid(row=4,column=2,padx=5,columnspan=2) self.batchbox=tk.Text(self.midframe,width=50,height=10) self.batchbox.grid(row=8,column=2,columnspan=2, padx=10, pady=5) ## Shapefile Class: defines the variables for the appearance and function of the shapefile generator Tool. class Shapefilegenerator(ttk.Frame): def popup_window(self): win_x = self.winfo_rootx()+300 win_y = self.winfo_rooty()+100 window = tk.Toplevel() window.geometry(f'+{win_x}+{win_y}') window.title('Shapefile Generator - Help') label = tk.Label(window, text=''' Shapefile = the input shapefile generated using GIS software identifying plot names and locations. Output file = the output file location ane name of the generated geoJSON file. ''',justify='left') label.pack(fill='x', padx=50, pady=50) button_close = ttk.Button(window, text="Close", command=window.destroy) button_close.pack(fill='x') def get_shapefile(self): folder=tk.filedialog.askopenfilename(initialdir = "/",title = 'Shapefile',filetypes=(("shp","*.shp"),("all files","*.*"))) self.shapefile.set(folder) def get_outfilename(self): folder=tk.filedialog.asksaveasfilename(initialdir = os.path.abspath(os.path.join(self.shapefile.get(),'../')),title = 'Output file',filetypes=(("geojson","*.geojson"),("all files","*.*"))) self.out_file.set(folder) self._toggle_state('normal') def run(self): if self.out_file.get() == 'blank': tk.messagebox.showinfo("Select Output file", "Please define a file name and location") else: self._toggle_state('disabled') try: shapefile_gen(self.shapefile.get(),self.out_file.get()) tk.messagebox.showinfo("Processing Complete", "Processing Complete") self._toggle_state('normal') except Exception as e: tk.messagebox.showerror("Error", e) traceback.print_exc() self._toggle_state('normal') def _toggle_state(self, state): state = state if state in ('normal', 'disabled') else 'normal' widgets = (self.button1, self.button2,self.button3) for widget in widgets: widget.configure(state=state) def __init__(self,parent,controller): tk.Frame.__init__(self,parent) self.grid_rowconfigure(1, weight=1) self.grid_columnconfigure(0, weight=1) self.topframe = tk.Frame(self) self.midframe = tk.Frame(self) self.btmframe = tk.Frame(self) self.topframe.grid(row=0) self.midframe.grid(row=1) self.btmframe.grid(row=2) #---VARIABLES---# self.shapefile=tk.StringVar() self.shapefile.set('blank') self.out_file=tk.StringVar() self.out_file.set('blank') info_btn = PhotoImage(file=info_button,master=self).subsample(5,5) hme_btn = PhotoImage(file=home_button,master=self).subsample(5,5) ext_btn = PhotoImage(file=exit_button,master=self).subsample(5,5) self.label=tk.Label(self.topframe,text='Shapefile to GeoJSON',font=Large_Font) self.label.grid(row=0,column=2,padx=10) self.label=tk.Label(self.topframe,text='Convert plot shapefiles (.shp) to GeoJSON for storage and further processing.',font=Norm_Font) self.label.grid(row=1,column=2,padx=10) self.button1=ttk.Button(self.midframe,text='Shapefile (.shp)',command=self.get_shapefile,width=20) self.button1.grid(row=2,column=1,pady=10) self.button2=ttk.Button(self.midframe,text='Output file (.geojson)',command=self.get_outfilename,width=20) self.button2.grid(row=3,column=1,pady=10) self.button3=ttk.Button(self.midframe,text='Run',command=self.run,width=15) self.button3.configure(state='disabled') self.button3.grid(row=10,column=2,pady=10) self.button8=ttk.Button(self.btmframe,image=hme_btn,text='Home',tooltip='Go Home (your drunk)',command=lambda: controller.show_frame(HomePage),compound="top") self.button8.image=hme_btn self.button8.grid(row=1,column=1,padx=5,pady=10) self.button9=ttk.Button(self.btmframe,image=info_btn,text='Help',command=self.popup_window,tooltip='Press for more help',compound="top") self.button9.image=info_btn self.button9.grid(row=1,column=2,padx=5,pady=10) self.button10=ttk.Button(self.btmframe,text='Quit',image=ext_btn,tooltip='Quit software and all running processes',command=controller.enditall,compound="top") self.button10.image=ext_btn self.button10.grid(row=1,column=3,padx=5,pady=10) #---ENTRIES---# self.entry1=ttk.Entry(self.midframe,textvariable=self.shapefile,width=75) self.entry1.grid(row=2,column=2,padx=5) self.entry2=ttk.Entry(self.midframe,textvariable=self.out_file,width=75) self.entry2.grid(row=3,column=2,padx=5) ## HyperSpecExtractor Class: defines the variables for the appearance and function of the Hyperspec data extractor Tool. class HyperSpecExtractor(ttk.Frame): def popup_window(self): win_x = self.winfo_rootx()+500 win_y = self.winfo_rooty()+150 window = tk.Toplevel() window.geometry(f'+{win_x}+{win_y}') window.title('UAV Data Extractor - Help') label = ImageLabel(window) label.pack(padx=10,pady=10) label.load(resource_path('Graphics\\'+str(randint(1,5))+'.gif')) button_close = ttk.Button(window, text="Close", command=window.destroy) button_close.pack(fill='x') def checkBands(self,window,file): bands = [] def chkchk(bands, window): if all([b.get() != '' for b in bands]): self.bandnames.extend([bands[a].get() for a in range(0,len(bands))]) window.destroy() else: tk.messagebox.showerror("Error", "Band Name missing") window.lift() with rasterio.open(file) as f: if any([a is None for a in f.descriptions]): window.title('UAV Data Extractor - Help') self.label = ttk.Label(window,text='Unknown bands, please provide band names') self.label.grid(row=1,column=1,columnspan=2) for a in range(1,f.count+1): bands.append(tk.StringVar()) self.bndNM = AutocompleteCombobox(window,width=10, textvariable=bands[a-1], completevalues=self.band_opts) self.bndNM.grid(row=a+1,column=2) self.bnd = ttk.Label(window,text=f'Band {a}:') self.bnd.grid(row=a+1,column=1) self.button_sub = ttk.Button(window, text="Submit", width=20, command=lambda: chkchk(bands, window)) self.button_sub.grid(row=a+2,column=1,columnspan=2) def get_data(self): files=tk.filedialog.askopenfilenames(initialdir = "/",title = 'Source File') self.data.set([a for a in files]) self.data_short.set([os.path.basename(b)+' ' for b in files]) for a in files: with rasterio.open(a) as b: if any([a is None for a in b.descriptions]): win_x = self.winfo_rootx()+500 win_y = self.winfo_rooty()+150 pop = tk.Toplevel() pop.geometry(f'+{win_x}+{win_y}') pop.title('UAV Data Extractor - Help') self.checkBands(pop,a) self.wait_window(pop) if os.path.isfile(files[0]): self.button5=ttk.Button(self.midframe,text='Results Output file (.csv)',command=lambda: self.get_outfilename(),tooltip='Output CSV path.',width=20) self.button5.grid(row=4,column=1,pady=10) self.entry4=ttk.Entry(self.midframe,textvariable=self.out_file,width=75) self.entry4.grid(row=4,column=2,columnspan=2,padx=5) self.get_outfilename() return(self.button5) def get_shapefile(self): folder=tk.filedialog.askopenfilename(initialdir = "/",title = 'Shapefile',filetypes=(("geojson","*.geojson"),("all files","*.*"))) self.shapefile.set(folder) def getplots(self): def getfolder(): folder=tk.filedialog.askdirectory(initialdir = '/', title = 'Plot Value Folder') self.outFolder.set(folder) if self.checkPlotVals.instate(['selected']) == True: folder=tk.filedialog.askdirectory(initialdir = '/', title = 'Plot Value Folder') self.outFolder.set(folder) self.plotVals.set(True) self.button6=ttk.Button(self.midframe,text='Pixel Folder',command=lambda: getfolder(),width=20) self.button6.grid(row=11,column=1,pady=10) self.entry6=ttk.Entry(self.midframe,textvariable=self.outFolder,width=75) self.entry6.grid(row=11,column=2,columnspan=2,padx=5) if self.checkPlotVals.instate(['selected']) == False: self.plotVals.set(False) self.button6.grid_forget() self.entry6.grid_forget() def checkall(self): all = [self.checkMean,self.checkMedian,self.checkStdev,self.checkCount,self.checkPrcnt99,self.checkPrcnt90] if self.checkAll.instate(['selected']) == True: for a in all: if a.instate(['selected']) == False: a.invoke() elif self.checkAll.instate(['selected']) == False: for a in all: if a.instate(['selected']) == True: a.invoke() def get_outfilename(self): folder=tk.filedialog.asksaveasfilename(initialdir = os.path.abspath(os.path.join(self.shapefile.get(),'../')),title = 'Output file',filetypes=(("csv","*.csv"),("all files","*.*"))) if '.csv' not in folder: folder += '.csv' self.out_file.set(folder) self._toggle_state('normal') def monitor(self, thread): if thread.is_alive(): # check the thread every 100ms self.after(100, lambda: self.monitor(thread)) else: tk.messagebox.showinfo("Processing Complete", "Processing Complete") gc.collect() self._toggle_state('enabled') def run(self): if self.out_file.get() == '.csv': tk.messagebox.showinfo("Select Output file", "Please define an output file name and location") else: all = [self.checkMean,self.checkMedian,self.checkStdev,self.checkCount,self.checkPrcnt99,self.checkPrcnt90] samples = [] for a in all: if a.instate(['selected']) == True: samples.append(a.cget('text')) self._toggle_state('disabled') if self.checkPrcntC.instate(['selected']) == True: if self.customPrcnt.get() == '': tk.messagebox.showerror("Error", "Invalid percentile value") self._toggle_state('normal') return else: samples.append({'custom':self.customPrcnt.get()}) if not samples and self.checkPlotVals == False: tk.messagebox.showinfo("Select Someting", "No outputs selected") self._toggle_state('normal') return try: variables = {'outfile':self.out_file.get(),'shapefile':self.shapefile.get(),'samples':samples,'bandnames':self.bandnames,'PlotValues':self.plotVals.get(),'outFolder':self.outFolder.get()} layers = {'inFiles':self.data.get()} gc.collect() thread_1 = threading.Thread(target=hyperspec_master, args=(variables,layers)) thread_1.setDaemon(True) thread_1.start() self.monitor(thread_1) except Exception as e: tk.messagebox.showerror("Error", e) traceback.print_exc() self._toggle_state('normal') def _toggle_state(self, state): state = state if state in ('normal', 'disabled') else 'normal' try: widgets = (self.button1, self.button2, self.button4, self.button5, self.button8,self.button9,self.button10) except: widgets = (self.button1, self.button2, self.button4, self.button5, self.button8,self.button9,self.button10) for widget in widgets: widget.configure(state=state) def __init__(self,parent,controller): tk.Frame.__init__(self,parent) self.grid_rowconfigure(1, weight=1) self.grid_columnconfigure(0, weight=1) self.topframe = tk.Frame(self) self.midframe = tk.Frame(self) self.btmframe = tk.Frame(self) self.topframe.grid(row=0) self.midframe.grid(row=1) self.btmframe.grid(row=2) #---VARIABLES---# self.bandnames = [] self.data=tk.StringVar() self.data.set('') self.data_short=tk.StringVar() self.data_short.set('') self.outFolder=tk.StringVar() self.outFolder.set('') self.plotVals=tk.BooleanVar() self.plotVals.set(False) self.shapefile=tk.StringVar() self.shapefile.set('') self.out_file=tk.StringVar() self.out_file.set('') # self.out_swir=tk.StringVar() # self.out_swir.set('') self.xmean = tk.IntVar() self.xmedian = tk.IntVar() self.xstdev = tk.IntVar() self.xcount = tk.IntVar() self.xprcnt99 = tk.IntVar() self.xprcnt90 = tk.IntVar() self.xprcntcstm = tk.IntVar() self.xall = tk.IntVar() info_btn = PhotoImage(file=info_button,master=self).subsample(5,5) hme_btn = PhotoImage(file=home_button,master=self).subsample(5,5) ext_btn = PhotoImage(file=exit_button,master=self).subsample(5,5) self.band_opts = ['Red','Green','Blue','Alpha','NIR','Thermal'] self.label=tk.Label(self.topframe,text='UAV Data Extractor',font=Large_Font) self.label.grid(row=0,column=2,padx=10) self.label=tk.Label(self.topframe,text='Extract and statistically sample areas of interest from spatial data.\n \n Hover over inputs/outputs for more info.',font=Norm_Font) self.label.grid(row=1,column=2,padx=10) self.button1=ttk.Button(self.midframe,text='Shapefile (.geojson)',command=self.get_shapefile,tooltip='GeoJSON file containing Area of Interest Polygons',width=20) self.button1.grid(row=2,column=1,pady=10) self.button2=ttk.Button(self.midframe,text='Input File',command=self.get_data,tooltip='Source file from which data will be extracted',width=20) self.button2.grid(row=3,column=1,pady=10) # self.button3=ttk.Button(self.midframe,text='SWIR',command=self.get_swir,tooltip='SWIR binary file from sensor (not .hdr!)',width=20) # self.button3.grid(row=5,column=1,pady=10) self.button4=ttk.Button(self.midframe,text='Run',command=self.run,width=20) self.button4.configure(state='disabled') self.button4.grid(row=12,column=2,pady=10,padx=75) self.checkframe=tk.Frame(self.midframe) self.checkframe.grid(row=10,column=2) self.checkMean=ttk.Checkbutton(self.checkframe,text='Mean',variable=self.xmean,onvalue='Mean') self.checkMean.grid(row=1,column=1) self.checkMedian=ttk.Checkbutton(self.checkframe,text='Median',variable=self.xmedian,onvalue='Median') self.checkMedian.grid(row=1,column=3) self.checkStdev=ttk.Checkbutton(self.checkframe,text='StDev',variable=self.xstdev,onvalue='StDev') self.checkStdev.grid(row=1,column=2) self.checkCount=ttk.Checkbutton(self.checkframe,text='Count',variable=self.xcount,onvalue='Count') self.checkCount.grid(row=2,column=1) self.checkPrcnt99=ttk.Checkbutton(self.checkframe,text='99th%',variable=self.xprcnt99,onvalue='99th%') self.checkPrcnt99.grid(row=2,column=2) self.checkPrcnt90=ttk.Checkbutton(self.checkframe,text='90th%',variable=self.xprcnt90,onvalue='90th%') self.checkPrcnt90.grid(row=2,column=3) self.checkAll=ttk.Checkbutton(self.checkframe,text='All',command=self.checkall,variable=self.xall) self.checkAll.grid(row=3,column=2) self.checkPrcntC=ttk.Checkbutton(self.checkframe,text='Custom Percentile (0-100)',variable=self.xprcntcstm,onvalue='Cstm%') self.checkPrcntC.grid(row=4,column=2) self.customPrcnt=ttk.Combobox(self.checkframe,width=5,values=natsorted([str(a) for a in range(0,101)])) self.customPrcnt.grid(row=4,column=3) self.checkPlotVals=ttk.Checkbutton(self.checkframe,text='Extract Plot Pixel Values?',command=self.getplots,variable=self.plotVals) self.checkPlotVals.grid(row=5,column=2) self.button8=ttk.Button(self.btmframe,image=hme_btn,text='Home',tooltip='Go Home (your drunk)',command=lambda: controller.show_frame(HomePage),compound="top") self.button8.image=hme_btn self.button8.grid(row=1,column=1,padx=5,pady=10) self.button9=ttk.Button(self.btmframe,image=info_btn,text='Help',command=self.popup_window,tooltip='Press for more help',compound="top") self.button9.image=info_btn self.button9.grid(row=1,column=2,padx=5,pady=10) self.button10=ttk.Button(self.btmframe,text='Quit',image=ext_btn,tooltip='Quit software and all running processes',command=controller.enditall,compound="top") self.button10.image=ext_btn self.button10.grid(row=1,column=3,padx=5,pady=10) #---ENTRIES---# self.entry1=ttk.Entry(self.midframe,textvariable=self.shapefile,width=75) self.entry1.grid(row=2,column=2,columnspan=2,padx=5) self.entry2=ttk.Entry(self.midframe,textvariable=self.data_short,width=75) self.entry2.grid(row=3,column=2,columnspan=2,padx=5) # self.entry3=ttk.Entry(self.midframe,textvariable=self.swir_short,width=75) # self.entry3.grid(row=5,column=2,columnspan=2,padx=5) class OrthoMerging(ttk.Frame): def popup_window(self): win_x = self.winfo_rootx()+500 win_y = self.winfo_rooty()+150 window = tk.Toplevel() window.geometry(f'+{win_x}+{win_y}') window.title('HyperSpec Extractor - Help') label = tk.Label(window, text=''' Inputs = orthomosaics for same field to be combined into one single multi-layer ortho. Output will be compressed using LZW and predictor 2, please ensure enough space on disk for temporary files. DEM (Digital Elevation Model) is the bare ground one, double check if you need to, but definitely bare ground.''',justify='left') label.pack(fill='x', padx=50, pady=50) button_close = ttk.Button(window, text="Close", command=window.destroy) button_close.pack(fill='x') def checkBands(self,file,pop): bands = [] def chkchk(bands, window): if all([b.get() != '' for b in bands]): self.bandnames.set(self.bandnames.get() + ', '.join(bands[a].get() for a in range(0,len(bands)))) # str([bands[a].get() for a in range(0,len(bands))])) # self.label3.config(text=self.bandnames.get()) print(self.bandnames.get()) window.destroy() else: tk.messagebox.showerror("Error", "Band Name missing") window.lift() win_x = self.winfo_rootx()+500 win_y = self.winfo_rooty()+150 # pop = tk.Toplevel() with rasterio.open(file) as f: if any([a is None for a in f.descriptions]): pop.geometry(f'+{win_x}+{win_y}') pop.title('UAV Data Extractor - Help') self.label = ttk.Label(pop,text='Unknown bands, please provide band names') self.label.grid(row=1,column=1,columnspan=2) for a in range(1,f.count+1): bands.append(tk.StringVar()) self.bndNM = AutocompleteCombobox(pop,width=10, textvariable=bands[a-1], completevalues=self.band_opts) self.bndNM.grid(row=a+1,column=2) self.bnd = ttk.Label(pop,text=f'Band {a}:') self.bnd.grid(row=a+1,column=1) self.button_sub = ttk.Button(pop, text="Submit", width=20, command=lambda: chkchk(bands, pop)) self.button_sub.grid(row=a+2,column=1,columnspan=2) else: self.bandnames.set(self.bandnames.get() + ', '.join(f.descriptions[a] for a in range(0,f.count-1))) pop.destroy() def get_rgb(self): files=tk.filedialog.askopenfilename(initialdir = "/",title = 'RGB',filetype=(("tif","*.tif"),("all files","*.*"))) if files != '': pop = tk.Toplevel() self.checkBands(files,pop) self.wait_window(pop) self.rgb.set(files) self.rgb_short.set(os.path.basename(files)) # return(self.button5) def get_nir(self): files=tk.filedialog.askopenfilename(initialdir = os.path.dirname(self.rgb.get()),title = 'NIR',filetypes=(("tif","*.tif"),("all files","*.*"))) self.nir.set(files) self.nir_short.set(os.path.basename(files)) def get_DEM(self): files=tk.filedialog.askopenfilename(initialdir = os.path.dirname(self.rgb.get()),title = 'Bare Ground DEM',filetypes=(("tif","*.tif"),("all files","*.*"))) self.DEM.set(files) self.DEM_short.set(os.path.basename(files)) def get_DSM(self): files=tk.filedialog.askopenfilename(initialdir = os.path.dirname(self.rgb.get()),title = 'DSM',filetypes=(("tif","*.tif"),("all files","*.*"))) self.DSM.set(files) self.DSM_short.set(os.path.basename(files)) def get_Other(self): files=tk.filedialog.askopenfilename(initialdir = os.path.dirname(self.rgb.get()),title = 'Other File',filetypes=(("tif","*.tif"),("all files","*.*"))) other_name=tk.simpledialog.askstring(title='Layer Name',prompt='Provide a name for this layer (e.g. Thermal)') self.other_file.set(files) self.other.set(other_name) def get_outfilename(self): folder=tk.filedialog.asksaveasfilename(initialdir = os.path.abspath(os.path.join(self.rgb.get(),'../')),title = 'Output file',filetypes=(("tif","*.tif"),("all files","*.*"))) if '.tif' not in folder: folder += '.tif' self.out_file.set(folder) self._toggle_state('normal') def monitor(self, thread): if thread.is_alive(): # check the thread every 100ms self.after(100, lambda: self.monitor(thread)) else: tk.messagebox.showinfo("Processing Complete", "Processing Complete") gc.collect() self._toggle_state('enabled') def run(self): if self.rgb.get() == '': tk.messagebox.showinfo("Select RGB file", "Please a RGB or Primary dataset") if self.out_file.get() == '': tk.messagebox.showinfo("Select Output file", "Please define a file name and location") else: self._toggle_state('disabled') try: print(self.bandnames.get()) others = (self.other.get(),self.other_file.get()) gc.collect() thread_1 = threading.Thread(target=orthoMerge, args=(self.rgb.get(),self.nir.get(),self.DEM.get(),self.DSM.get(),others,self.out_file.get(),self.bandnames.get())) thread_1.setDaemon(True) thread_1.start() self.monitor(thread_1) except Exception as e: tk.messagebox.showerror("Error", e) traceback.print_exc() self._toggle_state('normal') def _toggle_state(self, state): state = state if state in ('normal', 'disabled') else 'normal' try: widgets = (self.button1, self.button2, self.button3, self.button4, self.button5, self.button6, self.button7, self.button8,self.button9,self.button10) except: widgets = (self.button1, self.button2, self.button3, self.button4, self.button5, self.button8,self.button9,self.button10) for widget in widgets: widget.configure(state=state) def clear(self): a = [b for b in self.bandnames.get().split(', ')] print(a) print(self.bandnames.get()) self.bandnames.set('') # self.entry7.config(text=self.bandnames.get()) def __init__(self,parent,controller): tk.Frame.__init__(self,parent) self.grid_rowconfigure(1, weight=1) self.grid_columnconfigure(0, weight=1) self.topframe = tk.Frame(self) self.midframe = tk.Frame(self) self.btmframe = tk.Frame(self) self.topframe.grid(row=0) self.midframe.grid(row=1) self.btmframe.grid(row=2) #---VARIABLES---# self.bandnames = tk.StringVar() self.rgb=tk.StringVar() self.rgb.set('') self.rgb_short=tk.StringVar() self.rgb_short.set('') self.nir=tk.StringVar() self.nir.set('') self.nir_short=tk.StringVar() self.nir_short.set('') self.DEM=tk.StringVar() self.DEM.set('') self.DEM_short=tk.StringVar() self.DEM_short.set('') self.DSM=tk.StringVar() self.DSM.set('') self.DSM_short=tk.StringVar() self.DSM_short.set('') self.other=tk.StringVar() self.other.set('') self.other_file=tk.StringVar() self.other_file.set('') self.out_file=tk.StringVar() self.out_file.set('') info_btn = PhotoImage(file=info_button,master=self).subsample(5,5) hme_btn = PhotoImage(file=home_button,master=self).subsample(5,5) ext_btn = PhotoImage(file=exit_button,master=self).subsample(5,5) self.band_opts = ['Red','Green','Blue','Alpha','NIR','Thermal'] self.label1=tk.Label(self.topframe,text='Orthophoto Merger',font=Large_Font) self.label1.grid(row=0,column=2,padx=10) self.label2=tk.Label(self.topframe,text='Merge orthophotos into a single multilayer orthophoto, compressed using LZW(2).\n \n Hover over inputs/outputs for more info.\n \n DEM = Bare Ground; DSM = the one with crops in.',font=Norm_Font) self.label2.grid(row=1,column=2,padx=10) self.button1=ttk.Button(self.midframe,text='RGB',command=self.get_rgb,tooltip='RGB orthomosaic',width=20) self.button1.grid(row=2,column=1,pady=10) self.button2=ttk.Button(self.midframe,text='NIR',command=self.get_nir,tooltip='NIR orthomosaic',width=20) self.button2.grid(row=3,column=1,pady=10) self.button3=ttk.Button(self.midframe,text='DEM (BG)',command=self.get_DEM,tooltip='Bare Ground DEM',width=20) self.button3.grid(row=4,column=1,pady=10) self.button4=ttk.Button(self.midframe,text='DSM',command=self.get_DSM,tooltip='Digital Surface Model (with crops!)',width=20) self.button4.grid(row=5,column=1,pady=10) self.button5=ttk.Button(self.midframe,text='Other',command=self.get_Other,tooltip='Any other orthomosaic to include (e.g. Thermal)',width=20) self.button5.grid(row=6,column=1,pady=10) self.button6=ttk.Button(self.midframe,text='OutFile',command=self.get_outfilename,tooltip='Outpath for generated orthomosaic (.tif)',width=20) self.button6.grid(row=7,column=1,pady=10) self.button7=ttk.Button(self.midframe,text='Run',command=self.run,width=15) self.button7.configure(state='disabled') self.button7.grid(row=11,column=2,pady=10,padx=75) self.button8=ttk.Button(self.midframe, text='clear',command=self.clear,tooltip='Clear Band Names',width=20) self.button8.grid(row=8,column=1,pady=10) self.button9=ttk.Button(self.btmframe,image=hme_btn,text='Home',tooltip='Go Home (your drunk)',command=lambda: controller.show_frame(HomePage),compound="top") self.button9.image=hme_btn self.button9.grid(row=1,column=1,padx=5,pady=10) self.button10=ttk.Button(self.btmframe,image=info_btn,text='Help',command=self.popup_window,tooltip='Press for more help',compound="top") self.button10.image=info_btn self.button10.grid(row=1,column=2,padx=5,pady=10) self.button11=ttk.Button(self.btmframe,text='Quit',image=ext_btn,tooltip='Quit software and all running processes',command=controller.enditall,compound="top") self.button11.image=ext_btn self.button11.grid(row=1,column=3,padx=5,pady=10) #---ENTRIES---# self.entry1=ttk.Entry(self.midframe,textvariable=self.rgb_short,width=75) self.entry1.grid(row=2,column=2,columnspan=2,padx=5) self.entry2=ttk.Entry(self.midframe,textvariable=self.nir_short,width=75) self.entry2.grid(row=3,column=2,columnspan=2,padx=5) self.entry3=ttk.Entry(self.midframe,textvariable=self.DEM_short,width=75) self.entry3.grid(row=4,column=2,columnspan=2,padx=5) self.entry4=ttk.Entry(self.midframe,textvariable=self.DSM_short,width=75) self.entry4.grid(row=5,column=2,columnspan=2,padx=5) self.entry5=ttk.Entry(self.midframe,textvariable=self.other_file,width=75) self.entry5.grid(row=6,column=2,columnspan=2,padx=5) self.entry6=ttk.Entry(self.midframe,textvariable=self.out_file,width=75) self.entry6.grid(row=7,column=2,columnspan=2,padx=5) self.entry7=ttk.Entry(self.midframe,textvariable=self.bandnames,width=75) self.entry7.grid(row=8,column=2,columnspan=2) if __name__ == "__main__": app=software() app.geometry("1200x900") app.mainloop()
python
The Odisha Government and Bharat Petroleum Corporation Limited (BPCL) on Monday signed a Memorandum of Understanding (MoU) to take vital steps towards the proliferation of green energy in the state. The Odisha Government and Bharat Petroleum Corporation Limited (BPCL) on Monday signed a Memorandum of Understanding (MoU) to take vital steps towards the proliferation of green energy in the state. Bhupendra Singh Poonia, Managing Director Industrial Promotion and Investment Corporation of Odisha Limited (IPICOL), and Amit Garg, Executive Director Renewable Energy, Bharat Petroleum Corporation Limited (BPCL), signed a Memorandum of Understanding for a five-year period to collaborate in the fields of the feasibility of setting up renewable energy plant and green hydrogen plant (both for domestic and export customers), round the clock (RTC) power for consumers and proposed green hydrogen plants, setting up of requisite infrastructure, training, and knowledge sharing, etc. "Green Hydrogen would help the industries to cut aggregate emissions of Green House Gases (GHGs) thus contributing to the overall objectives of the Government of India's INDC targets," said a statement from IPICOL. "Odisha, being a power surplus state, is looking to further strengthen its position in power and these upcoming plants will help Odisha-based heavy industries to supplement their growing power requirements," it further added. Chief Secretary, Suresh Chandra Mahapatra, stated, "We have huge natural resources and due to the expanding steel making industry, green energy is a big prospect in Odisha and it has a high potential for production of green energy from ethanol, solar and hydrogen. " "Also, we have major ports and developing new ones, which will help BPCL to export the green hydrogen and ammonia to other countries. " Principal Secretary Industries, Hemant Sharma said, "Today Odisha is the single largest manufacturer of steel in the country. More than 33 per cent of the steelmaking capacity is now in Odisha though making it the primary prospect of green hydrogen and green ammonia. Because of the value addition policy, the demand is only going to increase in future. Highlighting the growing demand for green energy, Chairman and MD BPCL Arun Kumar Singh said, "Odisha figures out in its innovative ventures. Many parts of Odisha has great potential for production of solar and green-based ethanol energy". BPCL also plans to spend Rs 25,000 crore to build a renewable energy capacity of 10 gigawatts comprising a mix of solar, wind, small hydro and biomass by 2040. ( With inputs from ANI )
english
Chattogram Challengers (CCH) will lock horns with Fortune Barishal (FBA) in the opening match of Bangladesh Premier League 2022 at the Sher-e-Bangla National Stadium in Dhaka on Friday, January 21. The match will start from 1:00 PM IST. Chattogram Challengers have roped in swashbuckling batters in Kennar Lewis and Will Jacks for BPL 2022. They also have Ben Howell who has prior experience of playing in the Bangladesh Premier League. The likes of Shoriful Islam and Nasum Ahmed will also provide much-needed balance to their line-up. On the other hand, Fortune Barishal will depend on their T20 stalwarts in Chris Gayle, Shakib Al Hasan and Dwayne Bravo. The Bangladesh duo of Najmul Hossain Shanto and Mehedi Hasan Rana are quality players in the shortest format as well. Going by team combination, Fortune Barishal will start as slight favourites against Chattogram Challengers on Thursday. Picking Chris Gayle in any fantasy T20 team is a no-brainer. Considered to be one of greatest T20 players ever, Gayle will play for Fortune Barishal in BPL this season. At 9.5 credits, the hard-hitting opener will be a worthy pick for this clash. In the bowling department, Fortune Barishal’s Obed McCoy is expected to play an important role for his side in BPL 2022 on Friday. The West Indies left-arm pacer has several slower variations at his disposal and could be extremely handy on Bangladeshi pitches, Among all-rounders, Shakib Al Hasan of Fortune Barishal will be the overwhelming choice for this clash. The former Bangladesh captain is a genuine match-winner on his day and he will look to contribute with both bat and ball against Chattogram Challengers. For the wicket-keeper spot, Chattogram Challengers’ Chadwick Walton will be the preferred choice over Nurul Hasan Sohan of Fortune Barishal due to his match-winning capabilities with the bat. SportsAdda will bring you Chattogram Challengers vs Fortune Barishal live scores. Play fantasy cricket with SportsAdda. Create your team, track your progress and win prizes. Start here.
english
Bali Ba Toharo Umariya song is a Bhojpuri pop song from the Basti Jila Ke Rangila released on 2017. Music of Bali Ba Toharo Umariya song is composed by Ankur Singh. Bali Ba Toharo Umariya was sung by Ramu Nishad. Download Bali Ba Toharo Umariya song from Basti Jila Ke Rangila on Raaga.com.
english
Lewis Hamilton had some funny moments in his lengthy F1 career, and one includes when he drove his McLaren without a steering wheel. The seven-time world champion when introduced himself to F1, and it was evident he was not just another rookie. However, his race in Canada back in 2010 also showed one of his witty sides. The Briton was participating in qualifying in Montreal when during his cool-down lap his car got way slower than it should have been. In reaction, Hamilton took off the steering wheel, and let the car go with the flow. He even got up from his seat, and sat on the chassis, until he decided to push his car, but later was told by one of the officials to leave it. The young F1 driver back then complied. It was due to the low fuel level in the car that led his car to slow down. Hamilton was then commanded by his team to push down the car into the pits to make sure he had enough fuel in the car to show for sampling. However, the Canadian GP did end well for Hamilton. The Briton went on to win the race with a heroic performance. Hamilton has an impeccable record in Montreal. The seven-time world champion in fact won his first race out of his 103 victories over here only, when he was just a rookie. And now along with Michael Schumacher he has the most Canadian GP wins, both have seven races here. Hamilton is even the winner of the last Grand Prix that happened in Canada, though the fashion in which he won is controversial. Many Ferrari and Sebastian Vettel fans aren’t still over that heartbreak. But now, in 2022, Hamilton is far from being the favourite to win the Canadian GP. Because Mercedes this year doesn’t have the fastest or even the second fastest car on the grid. Moreover, the porpoising issue will give even more trouble to Mercedes on the long straights of Montreal. The FIA has placed the new directives to reduce the excessive bouncing. But it doesn’t seem like it would in any way help Mercedes to improve their performances, as it orders teams to increase the ride height in case of extreme porpoising. Because of that Mercedes would lose downforce, and would get even slower. A similar problem is with Ferrari, which also faces porpoising when the fuel load is high.
english
import React, { useState } from 'react'; import { ToggleSwitch } from './toggle-switch'; import styles from './upload-add-album.css'; export const UploadAddAlbum = ({onShouldCreateAlbum}) => { const [showEditor, onShowEditorChanged] = useState(false); const [albumName, onAlbumNameChange] = useState(''); const handleShowEditorChanged = (event) =>{ let val = event.target.checked; if(val){ let date = new Date(Date.now()); let y = date.getFullYear(); let m = date.getMonth() < 9 ? `0${date.getMonth() + 1}` : date.getMonth() + 1; let d= date.getDate() < 10 ? date.getDate() + 1 : date.getDate(); let h = date.getHours() < 10 ? `0${date.getHours()}` : date.getHours(); let min = date.getMinutes() < 10 ? `0${date.getMinutes()}` : date.getMinutes(); let s = date.getSeconds() < 10 ? `0${date.getSeconds()}` : date.getSeconds(); let name = `${y}${m}${d} ${h}:${min}:${s}`; onAlbumNameChange(name); onShouldCreateAlbum(val, name); }else{ onShouldCreateAlbum(val, ''); } onShowEditorChanged(val); }; return( <div className={styles.container}> <div className={styles.row}> <span>Create new album for uploaded media?</span> <ToggleSwitch name='showEditor' showLabels={false} checked={showEditor} onChange={handleShowEditorChanged}/> </div> {showEditor && <div className={styles.output}>New album "{albumName}" will be created for these media</div> } </div> ); }
javascript
Planning a trip to Kabini? All you need to know to visit Nagarhole National Park is covered in this post so read on. We visited Kabini March, 2019, so all we know wil be listed here to help you plan your trip. Best time to visit Kabini? Nagarhole National Park is one of those parks in India which is open throughout the year. The best time would be summer months(April to May) with increasing heat the wild cats are more prone to come out near the watering holes, but it will be difficult for you in the safari. The most pleasant season for safari will be winter months ( November to February). During monsoon the safaris are open but you can't reach all the zones due to heave rain fall in this area. How to reach Nagarhole National Park? Nagarhole National Park is spread across two states of India, Karnataka and Kerala. We visited Kabini, Karnata side of the park. The nearest airport from Kabini is Mysore Airpot. You can fly in from any major cities from India to Mysore. The second best option is flying to Bengaluru airport and take an Air conditioned bus to Mysore. From mysore either you take government buses to Kabini or hire a car that will cost you roughly 2k rupees. We have taken bus from Mumbai to reach to Mysore. It took us almost 19hrs to reach Mysore whereas the bus claimed it will take only 17hrs. You can book the bus from redbus.in, a return ticket costs 3200 rupees without discount. Where to stay in Kabini? There are plenty of options to stay near or around Kabini. There are luxury resorts like Orange County, Serai and Bison to name a few popular ones. We will suggest to stay in Government run safari lodge because we stayed there and they are one of the affordable options. You can book Kabini River lodge from here, offers discount on online weekday bookings. Kabini River Lodge price is inclusive of the stay, safari and all meals. Also all the safaris starts from here and all the hotel folks needs to come down to this hotel for the safari. Book your stay with Kabini River lodges then your safaris are included along with your stay (except Dorm room stay). You get one jeep safari and one boat safari. If you are booking Dorm stay then you are allowed only one safari in a bus. If you are staying in any other resort then you can use the link here to book your safari with them prior. Safari costs 1300p.p in cantor/bus all inclusive. Camera charges are extra. Safari timings are 6.00 AM in the morning and 3.00 PM in the evening. If you are planning a trip to Kabini you have to plan for at least 2 nights, i.e. total 4 safaris. As Indian safaris are only for 3 hrs max at one go, the ideal way will be going for 4-6 safaris. This gives you maximum chances of spotting a wild cat mainly tigers. If you are booking your stay in Kabini River Lodge, then 2 safaris will be available for per night bookings. One boat and one Jeep safari, boat safaris are pleasant experience but chances of spotting a wild cat is lesser. If you want you can request the forest ranger for both jeep safaris, then your request will be addressed based on availability. I will highly recommend book 2 nights stay in Kabini River Lodge. The lodge will take care of your food, safari and comfortable stay. If you have any more question, please leave a comment below will be happy to help.
english
Ellyse Perry and Phoebe Litchfield made India's above-par score of 282 look less threatening as Australia went 1-0 up in the first of the three ODIs at the Wankhede Stadium on Thursday. Losing Alyssa Healy in the first over of the innings, Litchfield and Perry notched up 78 and 75 respectively, with Tahlia McGrath contributing a valuable unbeaten 68 as Australia recorded the second-highest run chase in women's ODIs. This was after Jemimah Rodrigues's classy 82 and Pooja Vastrakar's fighting 62 not out at No.9 on a sultry Mumbai afternoon propelled India to their highest ODI total against Australia. Perry's intent was clear from the beginning as she started off briskly to keep up with the required run rate of 5.66. The allrounder smashed nine fours and two clean sixes in her 72-ball innings while the left-handed Litchfield gave us a glimpse of the future of Australia's batting with her calculative knock. She began the innings by just stroking to get accustomed to the conditions and once she got settled in, Litchfield began to find boundaries with the sweep, reverse sweep and punches off the back foot. Playing her 12th ODI, first in India, Litchfield scored eight boundaries and a six in her 89-ball knock. The left-right duo stitched together 148 off 150 balls, and by the time Perry was dismissed by Deepti Sharma in the 26th over, the foundation was well laid for the chase. Beth Mooney and McGrath capitalised on the start to put on another 88 runs off just 67 deliveries and made the chase look effortless as the wicket became better to bat on. Vastrakar cleaned up Mooney for 42 in the 42nd over, but it was too late for India to bounce back with little help from the bowlers in the second innings. McGrath, in her first tour as full-time vice-captain, stayed till the end to complete the formalities with six wickets in hand. Earlier, India fought back from early jitters after losing Shafali Verma, Richa Ghosh and Harmanpreet Kaur early in the innings. The notable absentee from their XI was vice-captain and opener Smriti Mandhana, who was unwell and unavailable for selection. However, Until the eighth-wicket stand between Rodrigues and Vastrakar, Australia did not allow any pair to settle in. Six of the seven bowlers picked up at least a wicket each after they were asked to bowl first on a track offering turn. Rodrigues, who carried forward her Test form into ODIs, was visibly wilting in the heat, but she ran hard, swept hard and drove through covers to notch up her fifth fifty in her 25th ODI. After sharing 38, 39 and 45 runs with Bhatia, Deepti Sharma and Amanjot Kaur respectively, she found Vastrakar's help to put on 68 runs - the only fifty-plus partnership of the innings - for the eighth wicket. Rodrigues' 77-ball stay had seven fours while Vastrakar hit seven fours and two sixes in her 46-ball knock. After Rodrigues' dismissal in the 47th over, Vastrakar blasted her way to her fourth ODI fifty off 39 balls in the penultimate over, yet again proving her batting credentials lower down the order. All four of Vastrakar's ODI fifties have come while batting at No.8 or lower. No other woman has scored more than two fifties while batting at No.8 or lower in ODIs. It looked like India saved the best for the last phase, accumulating 82 runs in the final ten overs. However, it wasn't enough to overcome Meg Lanning-less Australia. For the visitors, Wareham and Ashleigh Gardner were crucial in scalping two wickets each.
english
import EmberRouter from '@ember/routing/router'; import config from 'dummy/config/environment'; export default class Router extends EmberRouter { location = config.locationType; rootURL = config.rootURL; } Router.map(function() { this.route('attribute'); this.route('attribute-verify'); this.route('change-password'); this.route('delete-user'); this.route('forgot-password', function() { this.route('confirm'); }); this.route('login', function() { this.route('new-password'); }); this.route('profile'); this.route('register', function() { this.route('confirm'); this.route('resend'); }); });
javascript
For PC gamers, mouse sensitivity is a crucial factor. Minimal changes in DPI scoped sensitivity, among other mouse settings, can significantly impact someone's performance in-game. These mouse settings are usually different for each game, and using some simple formulas, players can easily figure out their optiminal sensitivity in each title. Apex Legends has been one of the most famous battle royale games since it was released in 2019. Riot Games released its first FPS, Valorant, last year, and the game has become immensely popular in this short period. Although some players have had difficulties converting their Apex Legends sensitivity to Valorant, this article will give them a more precise idea. Apex Legends sensitivity to Valorant using a formula/website: Using formulas in players can convert their Apex Legends sensitivity into any game, including Valorant. To convert the Apex Legends sensitivity into Valorant, players need to divide that by 3.17. Players can also take help from the AIMING.PRO site to convert their mouse sensitivity. Sensitivity conversion calculator provides the user with accurate sensitivity. Using this, players can convert the sensitivity of any game to another. Difference between Apex Legends and Valorant: Apex Legends and Valorant are games which belong to entirely different genres. Apex Legends is a battle royale game developed by Respawn Entertainment and published by Electronic Arts. It is all about surviving till the end by eliminating all the enemies, and players need to possess both survival and gun skills to claim victory. On the other hand, Valorant is a first-person tactical shooter game where players have 12 rounds to attack and defend their side using precision gunplay and tactical abilities. Whichever team wins 13 round first, claims victory. However, players need a sharp aim in both of these games to claim victory. It takes a lot of practice to improve the aim along with reflexes and skills. And to improve their aim, players need to know their perfect sensitivity as well.
english
<gh_stars>0 package org.oliot.epcis.service.capture; import javax.servlet.ServletContext; import org.apache.log4j.Level; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.oliot.epcis.configuration.Configuration; import org.oliot.epcis.serde.mongodb.MasterDataWriteConverter; import org.oliot.model.jsonschema.JsonSchemaLoader; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; import org.springframework.data.mongodb.core.MongoOperations; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.context.ServletContextAware; /** * Copyright (C) 2014 <NAME> * * This project is part of Oliot (oliot.org), pursuing the implementation of * Electronic Product Code Information Service(EPCIS) v1.1 specification in * EPCglobal. * [http://www.gs1.org/gsmp/kc/epcglobal/epcis/epcis_1_1-standard-20140520.pdf] * * * @author <NAME>, Ph.D student * * Korea Advanced Institute of Science and Technology (KAIST) * * Real-time Embedded System Laboratory(RESL) * * <EMAIL>, <EMAIL> */ @Controller @RequestMapping("/JsonVocabularyCapture") public class JsonVocabularyCapture implements ServletContextAware { @Autowired ServletContext servletContext; @Override public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } public ResponseEntity<?> asyncPost(String inputString) { ResponseEntity<?> result = post(inputString); return result; } @SuppressWarnings({ "unused", "resource" }) @RequestMapping(method = RequestMethod.POST) @ResponseBody public ResponseEntity<?> post(@RequestBody String inputString) { Configuration.logger.info(" EPCIS Masterdata Document Capture Started.... "); if (Configuration.isCaptureVerfificationOn == true) { // JSONParser parser = new JSONParser(); JsonSchemaLoader schemaloader = new JsonSchemaLoader(); ApplicationContext ctx = new GenericXmlApplicationContext("classpath:MongoConfig.xml"); try { JSONObject json = new JSONObject(inputString); JSONObject schema_json = schemaloader.getGeneralschema_md(); if (!CaptureUtil.validate(json, schema_json)) { Configuration.logger.info("Json Document is invalid" + " about master_data_validcheck"); ((AbstractApplicationContext) ctx).close(); return new ResponseEntity<>(new String("Error: EPCIS Masterdata Document is not validated"), HttpStatus.BAD_REQUEST); } JSONObject json2 = json.getJSONObject("epcismd"); JSONObject json3 = json2.getJSONObject("EPCISBody"); JSONArray json4 = json3.getJSONArray("VocabularyList"); for (int i = 0; i < json4.length(); i++) { if (json4.getJSONObject(i).has("Vocabulary") == true) { JSONArray json5 = json4.getJSONObject(i).getJSONArray("Vocabulary"); for(int j = 0; j < json5.length(); j++){ if (Configuration.backend.equals("MongoDB")) { MasterDataWriteConverter mdConverter = new MasterDataWriteConverter(); mdConverter.json_capture(json5.getJSONObject(j)); Configuration.logger.info(" EPCIS Masterdata Document : Captured "); } } /* startpoint of validation logic for Vocabulary */ } } } catch (JSONException e) { Configuration.logger.info(" Json Document is not valid "); } catch (Exception e) { Configuration.logger.log(Level.ERROR, e.toString()); } } else { JSONObject json = new JSONObject(inputString); JSONObject json2 = json.getJSONObject("epcismd"); JSONObject json3 = json2.getJSONObject("EPCISBody"); JSONArray json4 = json3.getJSONArray("VocabularyList"); ApplicationContext ctx = new GenericXmlApplicationContext("classpath:MongoConfig.xml"); MongoOperations mongoOperation = (MongoOperations) ctx.getBean("mongoTemplate"); for (int i = 0; i < json4.length(); i++) { if (json4.getJSONObject(i).has("Vocabulary") == true) { JSONArray json5 = json4.getJSONObject(i).getJSONArray("Vocabulary"); for(int j = 0; j < json5.length(); j++){ if (Configuration.backend.equals("MongoDB")) { MasterDataWriteConverter mdConverter = new MasterDataWriteConverter(); mdConverter.json_capture(json5.getJSONObject(i)); Configuration.logger.info(" EPCIS Masterdata Document : Captured "); } } /* startpoint of validation logic for Vocabulary */ } } } return new ResponseEntity<>(new String("EPCIS Masterdata Document : Captured"), HttpStatus.OK); } }
java
<filename>azure-devops/azure/devops/released/build/build_client.py # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- # Generated file, DO NOT EDIT # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- from msrest import Serializer, Deserializer from ...client import Client from ...v5_1.build import models class BuildClient(Client): """Build :param str base_url: Service URL :param Authentication creds: Authenticated credentials. """ def __init__(self, base_url=None, creds=None): super(BuildClient, self).__init__(base_url, creds) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) resource_area_identifier = '965220d5-5bb9-42cf-8d67-9b146df2a5a4' def create_artifact(self, artifact, project, build_id): """CreateArtifact. Associates an artifact with a build. :param :class:`<BuildArtifact> <azure.devops.v5_1.build.models.BuildArtifact>` artifact: The artifact. :param str project: Project ID or project name :param int build_id: The ID of the build. :rtype: :class:`<BuildArtifact> <azure.devops.v5_1.build.models.BuildArtifact>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') content = self._serialize.body(artifact, 'BuildArtifact') response = self._send(http_method='POST', location_id='1db06c96-014e-44e1-ac91-90b2d4b3e984', version='5.1', route_values=route_values, content=content) return self._deserialize('BuildArtifact', response) def get_artifact(self, project, build_id, artifact_name): """GetArtifact. Gets a specific artifact for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param str artifact_name: The name of the artifact. :rtype: :class:`<BuildArtifact> <azure.devops.v5_1.build.models.BuildArtifact>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if artifact_name is not None: query_parameters['artifactName'] = self._serialize.query('artifact_name', artifact_name, 'str') response = self._send(http_method='GET', location_id='1db06c96-014e-44e1-ac91-90b2d4b3e984', version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('BuildArtifact', response) def get_artifact_content_zip(self, project, build_id, artifact_name, **kwargs): """GetArtifactContentZip. Gets a specific artifact for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param str artifact_name: The name of the artifact. :rtype: object """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if artifact_name is not None: query_parameters['artifactName'] = self._serialize.query('artifact_name', artifact_name, 'str') response = self._send(http_method='GET', location_id='1db06c96-014e-44e1-ac91-90b2d4b3e984', version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') if "callback" in kwargs: callback = kwargs["callback"] else: callback = None return self._client.stream_download(response, callback=callback) def get_artifacts(self, project, build_id): """GetArtifacts. Gets all artifacts for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :rtype: [BuildArtifact] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='1db06c96-014e-44e1-ac91-90b2d4b3e984', version='5.1', route_values=route_values) return self._deserialize('[BuildArtifact]', self._unwrap_collection(response)) def get_file(self, project, build_id, artifact_name, file_id, file_name, **kwargs): """GetFile. Gets a file from the build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param str artifact_name: The name of the artifact. :param str file_id: The primary key for the file. :param str file_name: The name that the file will be set to. :rtype: object """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if artifact_name is not None: query_parameters['artifactName'] = self._serialize.query('artifact_name', artifact_name, 'str') if file_id is not None: query_parameters['fileId'] = self._serialize.query('file_id', file_id, 'str') if file_name is not None: query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') response = self._send(http_method='GET', location_id='1db06c96-014e-44e1-ac91-90b2d4b3e984', version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') if "callback" in kwargs: callback = kwargs["callback"] else: callback = None return self._client.stream_download(response, callback=callback) def delete_build(self, project, build_id): """DeleteBuild. Deletes a build. :param str project: Project ID or project name :param int build_id: The ID of the build. """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') self._send(http_method='DELETE', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', version='5.1', route_values=route_values) def get_build(self, project, build_id, property_filters=None): """GetBuild. Gets a build :param str project: Project ID or project name :param int build_id: :param str property_filters: :rtype: :class:`<Build> <azure.devops.v5_1.build.models.Build>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if property_filters is not None: query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') response = self._send(http_method='GET', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Build', response) def get_builds(self, project, definitions=None, queues=None, build_number=None, min_time=None, max_time=None, requested_for=None, reason_filter=None, status_filter=None, result_filter=None, tag_filters=None, properties=None, top=None, continuation_token=None, max_builds_per_definition=None, deleted_filter=None, query_order=None, branch_name=None, build_ids=None, repository_id=None, repository_type=None): """GetBuilds. Gets a list of builds. :param str project: Project ID or project name :param [int] definitions: A comma-delimited list of definition IDs. If specified, filters to builds for these definitions. :param [int] queues: A comma-delimited list of queue IDs. If specified, filters to builds that ran against these queues. :param str build_number: If specified, filters to builds that match this build number. Append * to do a prefix search. :param datetime min_time: If specified, filters to builds that finished/started/queued after this date based on the queryOrder specified. :param datetime max_time: If specified, filters to builds that finished/started/queued before this date based on the queryOrder specified. :param str requested_for: If specified, filters to builds requested for the specified user. :param str reason_filter: If specified, filters to builds that match this reason. :param str status_filter: If specified, filters to builds that match this status. :param str result_filter: If specified, filters to builds that match this result. :param [str] tag_filters: A comma-delimited list of tags. If specified, filters to builds that have the specified tags. :param [str] properties: A comma-delimited list of properties to retrieve. :param int top: The maximum number of builds to return. :param str continuation_token: A continuation token, returned by a previous call to this method, that can be used to return the next set of builds. :param int max_builds_per_definition: The maximum number of builds to return per definition. :param str deleted_filter: Indicates whether to exclude, include, or only return deleted builds. :param str query_order: The order in which builds should be returned. :param str branch_name: If specified, filters to builds that built branches that built this branch. :param [int] build_ids: A comma-delimited list that specifies the IDs of builds to retrieve. :param str repository_id: If specified, filters to builds that built from this repository. :param str repository_type: If specified, filters to builds that built from repositories of this type. :rtype: :class:`<GetBuildsResponseValue>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if definitions is not None: definitions = ",".join(map(str, definitions)) query_parameters['definitions'] = self._serialize.query('definitions', definitions, 'str') if queues is not None: queues = ",".join(map(str, queues)) query_parameters['queues'] = self._serialize.query('queues', queues, 'str') if build_number is not None: query_parameters['buildNumber'] = self._serialize.query('build_number', build_number, 'str') if min_time is not None: query_parameters['minTime'] = self._serialize.query('min_time', min_time, 'iso-8601') if max_time is not None: query_parameters['maxTime'] = self._serialize.query('max_time', max_time, 'iso-8601') if requested_for is not None: query_parameters['requestedFor'] = self._serialize.query('requested_for', requested_for, 'str') if reason_filter is not None: query_parameters['reasonFilter'] = self._serialize.query('reason_filter', reason_filter, 'str') if status_filter is not None: query_parameters['statusFilter'] = self._serialize.query('status_filter', status_filter, 'str') if result_filter is not None: query_parameters['resultFilter'] = self._serialize.query('result_filter', result_filter, 'str') if tag_filters is not None: tag_filters = ",".join(tag_filters) query_parameters['tagFilters'] = self._serialize.query('tag_filters', tag_filters, 'str') if properties is not None: properties = ",".join(properties) query_parameters['properties'] = self._serialize.query('properties', properties, 'str') if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') if continuation_token is not None: query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') if max_builds_per_definition is not None: query_parameters['maxBuildsPerDefinition'] = self._serialize.query('max_builds_per_definition', max_builds_per_definition, 'int') if deleted_filter is not None: query_parameters['deletedFilter'] = self._serialize.query('deleted_filter', deleted_filter, 'str') if query_order is not None: query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') if branch_name is not None: query_parameters['branchName'] = self._serialize.query('branch_name', branch_name, 'str') if build_ids is not None: build_ids = ",".join(map(str, build_ids)) query_parameters['buildIds'] = self._serialize.query('build_ids', build_ids, 'str') if repository_id is not None: query_parameters['repositoryId'] = self._serialize.query('repository_id', repository_id, 'str') if repository_type is not None: query_parameters['repositoryType'] = self._serialize.query('repository_type', repository_type, 'str') response = self._send(http_method='GET', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', version='5.1', route_values=route_values, query_parameters=query_parameters) response_value = self._deserialize('[Build]', self._unwrap_collection(response)) continuation_token = self._get_continuation_token(response) return self.GetBuildsResponseValue(response_value, continuation_token) class GetBuildsResponseValue(object): def __init__(self, value, continuation_token): """ Response for the get_builds method :param value: :type value: :class:`<[Build]> <azure.devops.v5_1.build.models.[Build]>` :param continuation_token: The continuation token to be used to get the next page of results. :type continuation_token: str """ self.value = value self.continuation_token = continuation_token def queue_build(self, build, project, ignore_warnings=None, check_in_ticket=None, source_build_id=None): """QueueBuild. Queues a build :param :class:`<Build> <azure.devops.v5_1.build.models.Build>` build: :param str project: Project ID or project name :param bool ignore_warnings: :param str check_in_ticket: :param int source_build_id: :rtype: :class:`<Build> <azure.devops.v5_1.build.models.Build>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if ignore_warnings is not None: query_parameters['ignoreWarnings'] = self._serialize.query('ignore_warnings', ignore_warnings, 'bool') if check_in_ticket is not None: query_parameters['checkInTicket'] = self._serialize.query('check_in_ticket', check_in_ticket, 'str') if source_build_id is not None: query_parameters['sourceBuildId'] = self._serialize.query('source_build_id', source_build_id, 'int') content = self._serialize.body(build, 'Build') response = self._send(http_method='POST', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) return self._deserialize('Build', response) def update_build(self, build, project, build_id, retry=None): """UpdateBuild. Updates a build. :param :class:`<Build> <azure.devops.v5_1.build.models.Build>` build: The build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param bool retry: :rtype: :class:`<Build> <azure.devops.v5_1.build.models.Build>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if retry is not None: query_parameters['retry'] = self._serialize.query('retry', retry, 'bool') content = self._serialize.body(build, 'Build') response = self._send(http_method='PATCH', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) return self._deserialize('Build', response) def update_builds(self, builds, project): """UpdateBuilds. Updates multiple builds. :param [Build] builds: The builds to update. :param str project: Project ID or project name :rtype: [Build] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') content = self._serialize.body(builds, '[Build]') response = self._send(http_method='PATCH', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', version='5.1', route_values=route_values, content=content) return self._deserialize('[Build]', self._unwrap_collection(response)) def get_build_changes(self, project, build_id, continuation_token=None, top=None, include_source_change=None): """GetBuildChanges. Gets the changes associated with a build :param str project: Project ID or project name :param int build_id: :param str continuation_token: :param int top: The maximum number of changes to return :param bool include_source_change: :rtype: :class:`<GetBuildChangesResponseValue>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if continuation_token is not None: query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') if include_source_change is not None: query_parameters['includeSourceChange'] = self._serialize.query('include_source_change', include_source_change, 'bool') response = self._send(http_method='GET', location_id='54572c7b-bbd3-45d4-80dc-28be08941620', version='5.1', route_values=route_values, query_parameters=query_parameters) response_value = self._deserialize('[Change]', self._unwrap_collection(response)) continuation_token = self._get_continuation_token(response) return self.GetBuildChangesResponseValue(response_value, continuation_token) class GetBuildChangesResponseValue(object): def __init__(self, value, continuation_token): """ Response for the get_build_changes method :param value: :type value: :class:`<[Change]> <azure.devops.v5_1.build.models.[Change]>` :param continuation_token: The continuation token to be used to get the next page of results. :type continuation_token: str """ self.value = value self.continuation_token = continuation_token def get_build_controller(self, controller_id): """GetBuildController. Gets a controller :param int controller_id: :rtype: :class:`<BuildController> <azure.devops.v5_1.build.models.BuildController>` """ route_values = {} if controller_id is not None: route_values['controllerId'] = self._serialize.url('controller_id', controller_id, 'int') response = self._send(http_method='GET', location_id='fcac1932-2ee1-437f-9b6f-7f696be858f6', version='5.1', route_values=route_values) return self._deserialize('BuildController', response) def get_build_controllers(self, name=None): """GetBuildControllers. Gets controller, optionally filtered by name :param str name: :rtype: [BuildController] """ query_parameters = {} if name is not None: query_parameters['name'] = self._serialize.query('name', name, 'str') response = self._send(http_method='GET', location_id='fcac1932-2ee1-437f-9b6f-7f696be858f6', version='5.1', query_parameters=query_parameters) return self._deserialize('[BuildController]', self._unwrap_collection(response)) def create_definition(self, definition, project, definition_to_clone_id=None, definition_to_clone_revision=None): """CreateDefinition. Creates a new definition. :param :class:`<BuildDefinition> <azure.devops.v5_1.build.models.BuildDefinition>` definition: The definition. :param str project: Project ID or project name :param int definition_to_clone_id: :param int definition_to_clone_revision: :rtype: :class:`<BuildDefinition> <azure.devops.v5_1.build.models.BuildDefinition>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if definition_to_clone_id is not None: query_parameters['definitionToCloneId'] = self._serialize.query('definition_to_clone_id', definition_to_clone_id, 'int') if definition_to_clone_revision is not None: query_parameters['definitionToCloneRevision'] = self._serialize.query('definition_to_clone_revision', definition_to_clone_revision, 'int') content = self._serialize.body(definition, 'BuildDefinition') response = self._send(http_method='POST', location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) return self._deserialize('BuildDefinition', response) def delete_definition(self, project, definition_id): """DeleteDefinition. Deletes a definition and all associated builds. :param str project: Project ID or project name :param int definition_id: The ID of the definition. """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if definition_id is not None: route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') self._send(http_method='DELETE', location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', version='5.1', route_values=route_values) def get_definition(self, project, definition_id, revision=None, min_metrics_time=None, property_filters=None, include_latest_builds=None): """GetDefinition. Gets a definition, optionally at a specific revision. :param str project: Project ID or project name :param int definition_id: The ID of the definition. :param int revision: The revision number to retrieve. If this is not specified, the latest version will be returned. :param datetime min_metrics_time: If specified, indicates the date from which metrics should be included. :param [str] property_filters: A comma-delimited list of properties to include in the results. :param bool include_latest_builds: :rtype: :class:`<BuildDefinition> <azure.devops.v5_1.build.models.BuildDefinition>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if definition_id is not None: route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') query_parameters = {} if revision is not None: query_parameters['revision'] = self._serialize.query('revision', revision, 'int') if min_metrics_time is not None: query_parameters['minMetricsTime'] = self._serialize.query('min_metrics_time', min_metrics_time, 'iso-8601') if property_filters is not None: property_filters = ",".join(property_filters) query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') if include_latest_builds is not None: query_parameters['includeLatestBuilds'] = self._serialize.query('include_latest_builds', include_latest_builds, 'bool') response = self._send(http_method='GET', location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('BuildDefinition', response) def get_definitions(self, project, name=None, repository_id=None, repository_type=None, query_order=None, top=None, continuation_token=None, min_metrics_time=None, definition_ids=None, path=None, built_after=None, not_built_after=None, include_all_properties=None, include_latest_builds=None, task_id_filter=None, process_type=None, yaml_filename=None): """GetDefinitions. Gets a list of definitions. :param str project: Project ID or project name :param str name: If specified, filters to definitions whose names match this pattern. :param str repository_id: A repository ID. If specified, filters to definitions that use this repository. :param str repository_type: If specified, filters to definitions that have a repository of this type. :param str query_order: Indicates the order in which definitions should be returned. :param int top: The maximum number of definitions to return. :param str continuation_token: A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions. :param datetime min_metrics_time: If specified, indicates the date from which metrics should be included. :param [int] definition_ids: A comma-delimited list that specifies the IDs of definitions to retrieve. :param str path: If specified, filters to definitions under this folder. :param datetime built_after: If specified, filters to definitions that have builds after this date. :param datetime not_built_after: If specified, filters to definitions that do not have builds after this date. :param bool include_all_properties: Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned. :param bool include_latest_builds: Indicates whether to return the latest and latest completed builds for this definition. :param str task_id_filter: If specified, filters to definitions that use the specified task. :param int process_type: If specified, filters to definitions with the given process type. :param str yaml_filename: If specified, filters to YAML definitions that match the given filename. :rtype: :class:`<GetDefinitionsResponseValue>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if name is not None: query_parameters['name'] = self._serialize.query('name', name, 'str') if repository_id is not None: query_parameters['repositoryId'] = self._serialize.query('repository_id', repository_id, 'str') if repository_type is not None: query_parameters['repositoryType'] = self._serialize.query('repository_type', repository_type, 'str') if query_order is not None: query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') if continuation_token is not None: query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') if min_metrics_time is not None: query_parameters['minMetricsTime'] = self._serialize.query('min_metrics_time', min_metrics_time, 'iso-8601') if definition_ids is not None: definition_ids = ",".join(map(str, definition_ids)) query_parameters['definitionIds'] = self._serialize.query('definition_ids', definition_ids, 'str') if path is not None: query_parameters['path'] = self._serialize.query('path', path, 'str') if built_after is not None: query_parameters['builtAfter'] = self._serialize.query('built_after', built_after, 'iso-8601') if not_built_after is not None: query_parameters['notBuiltAfter'] = self._serialize.query('not_built_after', not_built_after, 'iso-8601') if include_all_properties is not None: query_parameters['includeAllProperties'] = self._serialize.query('include_all_properties', include_all_properties, 'bool') if include_latest_builds is not None: query_parameters['includeLatestBuilds'] = self._serialize.query('include_latest_builds', include_latest_builds, 'bool') if task_id_filter is not None: query_parameters['taskIdFilter'] = self._serialize.query('task_id_filter', task_id_filter, 'str') if process_type is not None: query_parameters['processType'] = self._serialize.query('process_type', process_type, 'int') if yaml_filename is not None: query_parameters['yamlFilename'] = self._serialize.query('yaml_filename', yaml_filename, 'str') response = self._send(http_method='GET', location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', version='5.1', route_values=route_values, query_parameters=query_parameters) response_value = self._deserialize('[BuildDefinitionReference]', self._unwrap_collection(response)) continuation_token = self._get_continuation_token(response) return self.GetDefinitionsResponseValue(response_value, continuation_token) class GetDefinitionsResponseValue(object): def __init__(self, value, continuation_token): """ Response for the get_definitions method :param value: :type value: :class:`<[BuildDefinitionReference]> <azure.devops.v5_1.build.models.[BuildDefinitionReference]>` :param continuation_token: The continuation token to be used to get the next page of results. :type continuation_token: str """ self.value = value self.continuation_token = continuation_token def restore_definition(self, project, definition_id, deleted): """RestoreDefinition. Restores a deleted definition :param str project: Project ID or project name :param int definition_id: The identifier of the definition to restore. :param bool deleted: When false, restores a deleted definition. :rtype: :class:`<BuildDefinition> <azure.devops.v5_1.build.models.BuildDefinition>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if definition_id is not None: route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') query_parameters = {} if deleted is not None: query_parameters['deleted'] = self._serialize.query('deleted', deleted, 'bool') response = self._send(http_method='PATCH', location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('BuildDefinition', response) def update_definition(self, definition, project, definition_id, secrets_source_definition_id=None, secrets_source_definition_revision=None): """UpdateDefinition. Updates an existing definition. :param :class:`<BuildDefinition> <azure.devops.v5_1.build.models.BuildDefinition>` definition: The new version of the definition. :param str project: Project ID or project name :param int definition_id: The ID of the definition. :param int secrets_source_definition_id: :param int secrets_source_definition_revision: :rtype: :class:`<BuildDefinition> <azure.devops.v5_1.build.models.BuildDefinition>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if definition_id is not None: route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') query_parameters = {} if secrets_source_definition_id is not None: query_parameters['secretsSourceDefinitionId'] = self._serialize.query('secrets_source_definition_id', secrets_source_definition_id, 'int') if secrets_source_definition_revision is not None: query_parameters['secretsSourceDefinitionRevision'] = self._serialize.query('secrets_source_definition_revision', secrets_source_definition_revision, 'int') content = self._serialize.body(definition, 'BuildDefinition') response = self._send(http_method='PUT', location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) return self._deserialize('BuildDefinition', response) def get_build_log(self, project, build_id, log_id, start_line=None, end_line=None, **kwargs): """GetBuildLog. Gets an individual log file for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param int log_id: The ID of the log file. :param long start_line: The start line. :param long end_line: The end line. :rtype: object """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') if log_id is not None: route_values['logId'] = self._serialize.url('log_id', log_id, 'int') query_parameters = {} if start_line is not None: query_parameters['startLine'] = self._serialize.query('start_line', start_line, 'long') if end_line is not None: query_parameters['endLine'] = self._serialize.query('end_line', end_line, 'long') response = self._send(http_method='GET', location_id='35a80daf-7f30-45fc-86e8-6b813d9c90df', version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') if "callback" in kwargs: callback = kwargs["callback"] else: callback = None return self._client.stream_download(response, callback=callback) def get_build_log_lines(self, project, build_id, log_id, start_line=None, end_line=None): """GetBuildLogLines. Gets an individual log file for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param int log_id: The ID of the log file. :param long start_line: The start line. :param long end_line: The end line. :rtype: [str] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') if log_id is not None: route_values['logId'] = self._serialize.url('log_id', log_id, 'int') query_parameters = {} if start_line is not None: query_parameters['startLine'] = self._serialize.query('start_line', start_line, 'long') if end_line is not None: query_parameters['endLine'] = self._serialize.query('end_line', end_line, 'long') response = self._send(http_method='GET', location_id='35a80daf-7f30-45fc-86e8-6b813d9c90df', version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) def get_build_logs(self, project, build_id): """GetBuildLogs. Gets the logs for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :rtype: [BuildLog] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='35a80daf-7f30-45fc-86e8-6b813d9c90df', version='5.1', route_values=route_values) return self._deserialize('[BuildLog]', self._unwrap_collection(response)) def get_build_logs_zip(self, project, build_id, **kwargs): """GetBuildLogsZip. Gets the logs for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :rtype: object """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='35a80daf-7f30-45fc-86e8-6b813d9c90df', version='5.1', route_values=route_values, accept_media_type='application/zip') if "callback" in kwargs: callback = kwargs["callback"] else: callback = None return self._client.stream_download(response, callback=callback) def get_build_log_zip(self, project, build_id, log_id, start_line=None, end_line=None, **kwargs): """GetBuildLogZip. Gets an individual log file for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param int log_id: The ID of the log file. :param long start_line: The start line. :param long end_line: The end line. :rtype: object """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') if log_id is not None: route_values['logId'] = self._serialize.url('log_id', log_id, 'int') query_parameters = {} if start_line is not None: query_parameters['startLine'] = self._serialize.query('start_line', start_line, 'long') if end_line is not None: query_parameters['endLine'] = self._serialize.query('end_line', end_line, 'long') response = self._send(http_method='GET', location_id='35a80daf-7f30-45fc-86e8-6b813d9c90df', version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') if "callback" in kwargs: callback = kwargs["callback"] else: callback = None return self._client.stream_download(response, callback=callback) def get_build_option_definitions(self, project=None): """GetBuildOptionDefinitions. Gets all build definition options supported by the system. :param str project: Project ID or project name :rtype: [BuildOptionDefinition] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='591cb5a4-2d46-4f3a-a697-5cd42b6bd332', version='5.1', route_values=route_values) return self._deserialize('[BuildOptionDefinition]', self._unwrap_collection(response)) def get_definition_revisions(self, project, definition_id): """GetDefinitionRevisions. Gets all revisions of a definition. :param str project: Project ID or project name :param int definition_id: The ID of the definition. :rtype: [BuildDefinitionRevision] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if definition_id is not None: route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') response = self._send(http_method='GET', location_id='7c116775-52e5-453e-8c5d-914d9762d8c4', version='5.1', route_values=route_values) return self._deserialize('[BuildDefinitionRevision]', self._unwrap_collection(response)) def get_build_settings(self, project=None): """GetBuildSettings. Gets the build settings. :param str project: Project ID or project name :rtype: :class:`<BuildSettings> <azure.devops.v5_1.build.models.BuildSettings>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='aa8c1c9c-ef8b-474a-b8c4-785c7b191d0d', version='5.1', route_values=route_values) return self._deserialize('BuildSettings', response) def update_build_settings(self, settings, project=None): """UpdateBuildSettings. Updates the build settings. :param :class:`<BuildSettings> <azure.devops.v5_1.build.models.BuildSettings>` settings: The new settings. :param str project: Project ID or project name :rtype: :class:`<BuildSettings> <azure.devops.v5_1.build.models.BuildSettings>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') content = self._serialize.body(settings, 'BuildSettings') response = self._send(http_method='PATCH', location_id='aa8c1c9c-ef8b-474a-b8c4-785c7b191d0d', version='5.1', route_values=route_values, content=content) return self._deserialize('BuildSettings', response) def add_build_tag(self, project, build_id, tag): """AddBuildTag. Adds a tag to a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param str tag: The tag to add. :rtype: [str] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') if tag is not None: route_values['tag'] = self._serialize.url('tag', tag, 'str') response = self._send(http_method='PUT', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', version='5.1', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) def add_build_tags(self, tags, project, build_id): """AddBuildTags. Adds tags to a build. :param [str] tags: The tags to add. :param str project: Project ID or project name :param int build_id: The ID of the build. :rtype: [str] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') content = self._serialize.body(tags, '[str]') response = self._send(http_method='POST', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', version='5.1', route_values=route_values, content=content) return self._deserialize('[str]', self._unwrap_collection(response)) def delete_build_tag(self, project, build_id, tag): """DeleteBuildTag. Removes a tag from a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param str tag: The tag to remove. :rtype: [str] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') if tag is not None: route_values['tag'] = self._serialize.url('tag', tag, 'str') response = self._send(http_method='DELETE', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', version='5.1', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) def get_build_tags(self, project, build_id): """GetBuildTags. Gets the tags for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :rtype: [str] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', version='5.1', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) def get_tags(self, project): """GetTags. Gets a list of all build and definition tags in the project. :param str project: Project ID or project name :rtype: [str] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='d84ac5c6-edc7-43d5-adc9-1b34be5dea09', version='5.1', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) def delete_template(self, project, template_id): """DeleteTemplate. Deletes a build definition template. :param str project: Project ID or project name :param str template_id: The ID of the template. """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if template_id is not None: route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') self._send(http_method='DELETE', location_id='e884571e-7f92-4d6a-9274-3f5649900835', version='5.1', route_values=route_values) def get_template(self, project, template_id): """GetTemplate. Gets a specific build definition template. :param str project: Project ID or project name :param str template_id: The ID of the requested template. :rtype: :class:`<BuildDefinitionTemplate> <azure.devops.v5_1.build.models.BuildDefinitionTemplate>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if template_id is not None: route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') response = self._send(http_method='GET', location_id='e884571e-7f92-4d6a-9274-3f5649900835', version='5.1', route_values=route_values) return self._deserialize('BuildDefinitionTemplate', response) def get_templates(self, project): """GetTemplates. Gets all definition templates. :param str project: Project ID or project name :rtype: [BuildDefinitionTemplate] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='e884571e-7f92-4d6a-9274-3f5649900835', version='5.1', route_values=route_values) return self._deserialize('[BuildDefinitionTemplate]', self._unwrap_collection(response)) def save_template(self, template, project, template_id): """SaveTemplate. Updates an existing build definition template. :param :class:`<BuildDefinitionTemplate> <azure.devops.v5_1.build.models.BuildDefinitionTemplate>` template: The new version of the template. :param str project: Project ID or project name :param str template_id: The ID of the template. :rtype: :class:`<BuildDefinitionTemplate> <azure.devops.v5_1.build.models.BuildDefinitionTemplate>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if template_id is not None: route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') content = self._serialize.body(template, 'BuildDefinitionTemplate') response = self._send(http_method='PUT', location_id='e884571e-7f92-4d6a-9274-3f5649900835', version='5.1', route_values=route_values, content=content) return self._deserialize('BuildDefinitionTemplate', response) def get_build_timeline(self, project, build_id, timeline_id=None, change_id=None, plan_id=None): """GetBuildTimeline. Gets details for a build :param str project: Project ID or project name :param int build_id: :param str timeline_id: :param int change_id: :param str plan_id: :rtype: :class:`<Timeline> <azure.devops.v5_1.build.models.Timeline>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') if timeline_id is not None: route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') query_parameters = {} if change_id is not None: query_parameters['changeId'] = self._serialize.query('change_id', change_id, 'int') if plan_id is not None: query_parameters['planId'] = self._serialize.query('plan_id', plan_id, 'str') response = self._send(http_method='GET', location_id='8baac422-4c6e-4de5-8532-db96d92acffa', version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Timeline', response) def get_build_work_items_refs(self, project, build_id, top=None): """GetBuildWorkItemsRefs. Gets the work items associated with a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param int top: The maximum number of work items to return. :rtype: [ResourceRef] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='5a21f5d2-5642-47e4-a0bd-1356e6731bee', version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ResourceRef]', self._unwrap_collection(response)) def get_build_work_items_refs_from_commits(self, commit_ids, project, build_id, top=None): """GetBuildWorkItemsRefsFromCommits. Gets the work items associated with a build, filtered to specific commits. :param [str] commit_ids: A comma-delimited list of commit IDs. :param str project: Project ID or project name :param int build_id: The ID of the build. :param int top: The maximum number of work items to return, or the number of commits to consider if no commit IDs are specified. :rtype: [ResourceRef] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if build_id is not None: route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') content = self._serialize.body(commit_ids, '[str]') response = self._send(http_method='POST', location_id='5a21f5d2-5642-47e4-a0bd-1356e6731bee', version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) return self._deserialize('[ResourceRef]', self._unwrap_collection(response))
python
Q.1) Consider the following statements about contingent convertible capital instruments (CoCos) Which of the following statements is/are incorrect? Which of the following statements is/are correct? What does this indicate? - Both (a) and (c)
english
Delhi Liquor Policy Case News: Kavitha deposed before the ED for nine hours on Saturday for recording her statement in connection with a money laundering case linked to alleged irregularities in the Delhi excise policy. The BRS leader has been questioned by the Central Bureau of Investigation (CBI) in this case earlier. Kalvakuntla Kavitha did not appear bitter about the delay in promises being fulfilled and indicated that some lag was perhaps expected given the country's "system". "Our system takes too long to set focus on certain issues. This is such a case," she said. After remaining without a chief for more than a year, the CBSE is set to have a new chairman soon. Hyderabad, Jan 14 (ANI): Bogi festival or Bhogi, the first day of the three-day Sankranti festival, is being celebrated in both Andhra Pradesh and Telangana from the early hours on Thursday. People returned to their respective native places to celebrate the festival with families. The harvesting festival is celebrated with much pomp in the coastal districts in Andhra Pradesh. Telangana Rashtra Samithi party leader Kalvakuntla Kavitha participated in the Bhogi fire celebration in the early hours at KBR Park in the city. She said that Bhogi is a three day festival and is celebrated by holding a campfire which signifies shedding ills in oneself.
english
<reponame>bundestag/dip21-daten { "vorgangId": "79278", "VORGANG": { "WAHLPERIODE": "18", "VORGANGSTYP": "Mündliche Frage", "TITEL": "Kenntnisse über einen Fonds für nachrichtendienstliche Geheimoperationen freiberuflicher Agenten", "AKTUELLER_STAND": "Beantwortet", "SIGNATUR": "", "GESTA_ORDNUNGSNUMMER": "", "PLENUM": { "PLPR_KLARTEXT": "Mündliche Frage/Schriftliche Antwort", "PLPR_HERAUSGEBER": "BT", "PLPR_NUMMER": "18/211", "PLPR_SEITEN": "21185B - 21185D", "PLPR_LINK": "http://dipbt.bundestag.de:80/dip21/btp/18/18211.pdf#P.21185" }, "EU_DOK_NR": "", "SCHLAGWORT": [ { "_fundstelle": "true", "__cdata": "Fonds" }, "Nachrichtendienst", "Spionage", { "_fundstelle": "true", "__cdata": "Verdeckte Ermittlung" } ], "ABSTRAKT": "Originaltext der Frage(n): \r\n \r\nWas ist der Bundesregierung über die Betreiber/Einzahler sowie Nutznießer eines Geheimfonds bekannt, aus dem sich der auch für die Bundesregierung tätige Ex-Geheimagent Werner Mauss als \"internationale Reserve\" bedient haben soll und der nach Aussagen des ehemaligen Kanzleramtsministers <NAME>, der bei Antritt seiner Stelle im Jahr 1991 über den Fonds informiert war, unter anderem von den Regierungen der USA und Israels befüllt worden war (tagesschau.de vom 9. Januar 2017, \"Schmidbauer entlastet Mauss\"; sueddeutsche.de vom 9. Januar 2017, \"Ein bisschen Frieden\"), und auf welche Weise hat die Bundesregierung den Agenten für seine damaligen Dienste finanziell oder anderweitig begünstigt (bitte angeben, auf welchem Weg etwaige Finanztransaktionen vorgenommen wurden)?" }, "VORGANGSABLAUF": { "VORGANGSPOSITION": [ { "ZUORDNUNG": "BT", "URHEBER": "Mündliche Frage ", "FUNDSTELLE": "13.01.2017 - BT-Drucksache 18/10828, Nr. 17", "FUNDSTELLE_LINK": "http://dipbt.bundestag.de:80/dip21/btd/18/108/1810828.pdf" }, { "ZUORDNUNG": "BT", "URHEBER": "Mündliche Frage/Schriftliche Antwort", "FUNDSTELLE": "18.01.2017 - BT-Plenarprotokoll 18/211, S. 21185B - 21185D", "FUNDSTELLE_LINK": "http://dipbt.bundestag.de:80/dip21/btp/18/18211.pdf#P.21185", "PERSOENLICHER_URHEBER": [ { "VORNAME": "Andrej", "NACHNAME": "Hunko", "FUNKTION": "MdB", "FRAKTION": "DIE LINKE", "AKTIVITAETSART": "Frage", "SEITE": "21185B" }, { "PERSON_TITEL": "Dr.", "VORNAME": "Ole", "NACHNAME": "Schröder", "FUNKTION": "Parl. Staatssekr.", "RESSORT": "Bundesministerium des Innern", "AKTIVITAETSART": "Antwort", "SEITE": "21185C" } ] } ] } }
json
<gh_stars>1-10 /** * @module node-opcua-server */ // tslint:disable:no-console import { EventEmitter } from "events"; import * as net from "net"; import { Server, Socket } from "net"; import * as chalk from "chalk"; import * as async from "async"; import { assert } from "node-opcua-assert"; import { ICertificateManager, OPCUACertificateManager } from "node-opcua-certificate-manager"; import { Certificate, convertPEMtoDER, makeSHA1Thumbprint, PrivateKeyPEM, split_der } from "node-opcua-crypto"; import { checkDebugFlag, make_debugLog, make_errorLog } from "node-opcua-debug"; import { getFullyQualifiedDomainName, resolveFullyQualifiedDomainName } from "node-opcua-hostname"; import { fromURI, MessageSecurityMode, SecurityPolicy, ServerSecureChannelLayer, ServerSecureChannelParent, toURI, AsymmetricAlgorithmSecurityHeader, IServerSessionBase, Message } from "node-opcua-secure-channel"; import { UserTokenType } from "node-opcua-service-endpoints"; import { EndpointDescription } from "node-opcua-service-endpoints"; import { ApplicationDescription } from "node-opcua-service-endpoints"; import { IChannelData } from "./i_channel_data"; import { ISocketData } from "./i_socket_data"; const debugLog = make_debugLog(__filename); const errorLog = make_errorLog(__filename); const doDebug = checkDebugFlag(__filename); const default_transportProfileUri = "http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary"; function extractSocketData(socket: net.Socket, reason: string): ISocketData { const { bytesRead, bytesWritten, remoteAddress, remoteFamily, remotePort, localAddress, localPort } = socket; const data: ISocketData = { bytesRead, bytesWritten, localAddress, localPort, remoteAddress, remoteFamily, remotePort, timestamp: new Date(), reason }; return data; } function extractChannelData(channel: ServerSecureChannelLayer): IChannelData { const { channelId, clientCertificate, clientNonce, clientSecurityHeader, securityHeader, securityMode, securityPolicy, timeout, transactionsCount } = channel; const channelData: IChannelData = { channelId, clientCertificate, clientNonce, clientSecurityHeader, securityHeader, securityMode, securityPolicy, timeout, transactionsCount }; return channelData; } function dumpChannelInfo(channels: ServerSecureChannelLayer[]): void { function d(s: IServerSessionBase) { return `[ status=${s.status} lastSeen=${s.clientLastContactTime.toFixed(0)}ms sessionName=${s.sessionName} timeout=${ s.sessionTimeout } ]`; } function dumpChannel(channel: ServerSecureChannelLayer): void { console.log("------------------------------------------------------"); console.log(" channelId = ", channel.channelId); console.log(" timeout = ", channel.timeout); console.log(" remoteAddress = ", channel.remoteAddress); console.log(" remotePort = ", channel.remotePort); console.log(""); console.log(" bytesWritten = ", channel.bytesWritten); console.log(" bytesRead = ", channel.bytesRead); console.log(" sessions = ", Object.keys(channel.sessionTokens).length); console.log(Object.values(channel.sessionTokens).map(d).join("\n")); const socket = (channel as any).transport?._socket; if (!socket) { console.log(" SOCKET IS CLOSED"); } } for (const channel of channels) { dumpChannel(channel); } console.log("------------------------------------------------------"); } const emptyCertificate = Buffer.alloc(0); const emptyPrivateKeyPEM = ""; let OPCUAServerEndPointCounter = 0; export interface OPCUAServerEndPointOptions { /** * the tcp port */ port: number; /** * the DER certificate chain */ certificateChain: Certificate; /** * privateKey */ privateKey: PrivateKeyPEM; certificateManager: OPCUACertificateManager; /** * the default secureToken lifetime @default=60000 */ defaultSecureTokenLifetime?: number; /** * the maximum number of connection allowed on the TCP server socket * @default 20 */ maxConnections?: number; /** * the timeout for the TCP HEL/ACK transaction (in ms) * @default 30000 */ timeout?: number; serverInfo: ApplicationDescription; objectFactory?: any; } export interface EndpointDescriptionParams { allowAnonymous?: boolean; restricted?: boolean; allowUnsecurePassword?: boolean; resourcePath?: string; alternateHostname?: string[]; hostname: string; securityPolicies: SecurityPolicy[]; } export interface AddStandardEndpointDescriptionsParam { securityModes?: MessageSecurityMode[]; securityPolicies?: SecurityPolicy[]; disableDiscovery?: boolean; allowAnonymous?: boolean; restricted?: boolean; hostname?: string; alternateHostname?: string[]; allowUnsecurePassword?: boolean; resourcePath?: string; } function getUniqueName(name: string, collection: { [key: string]: number }) { if (collection[name]) { let counter = 0; while (collection[name + "_" + counter.toString()]) { counter++; } name = name + "_" + counter.toString(); collection[name] = 1; return name; } else { collection[name] = 1; return name; } } interface ServerSecureChannelLayerPriv extends ServerSecureChannelLayer { _unpreregisterChannelEvent?: () => void; } /** * OPCUAServerEndPoint a Server EndPoint. * A sever end point is listening to one port * note: * see OPCUA Release 1.03 part 4 page 108 7.1 ApplicationDescription */ export class OPCUAServerEndPoint extends EventEmitter implements ServerSecureChannelParent { /** * the tcp port */ public port: number; public certificateManager: OPCUACertificateManager; public defaultSecureTokenLifetime: number; public maxConnections: number; public timeout: number; public bytesWrittenInOldChannels: number; public bytesReadInOldChannels: number; public transactionsCountOldChannels: number; public securityTokenCountOldChannels: number; public serverInfo: ApplicationDescription; public objectFactory: any; public _on_new_channel?: (channel: ServerSecureChannelLayer) => void; public _on_close_channel?: (channel: ServerSecureChannelLayer) => void; public _on_connectionRefused?: (socketData: any) => void; public _on_openSecureChannelFailure?: (socketData: any, channelData: any) => void; private _certificateChain: Certificate; private _privateKey: PrivateKeyPEM; private _channels: { [key: string]: ServerSecureChannelLayer }; private _server?: Server; private _endpoints: EndpointDescription[]; private _listen_callback?: (err?: Error) => void; private _started = false; private _counter = OPCUAServerEndPointCounter++; private _policy_deduplicator: { [key: string]: number } = {}; constructor(options: OPCUAServerEndPointOptions) { super(); assert(!Object.prototype.hasOwnProperty.call(options, "certificate"), "expecting a certificateChain instead"); assert(Object.prototype.hasOwnProperty.call(options, "certificateChain"), "expecting a certificateChain"); assert(Object.prototype.hasOwnProperty.call(options, "privateKey")); this.certificateManager = options.certificateManager; options.port = options.port || 0; this.port = parseInt(options.port.toString(), 10); assert(typeof this.port === "number"); this._certificateChain = options.certificateChain; this._privateKey = options.privateKey; this._channels = {}; this.defaultSecureTokenLifetime = options.defaultSecureTokenLifetime || 600000; this.maxConnections = options.maxConnections || 20; this.timeout = options.timeout || 30000; this._server = undefined; this._setup_server(); this._endpoints = []; this.objectFactory = options.objectFactory; this.bytesWrittenInOldChannels = 0; this.bytesReadInOldChannels = 0; this.transactionsCountOldChannels = 0; this.securityTokenCountOldChannels = 0; this.serverInfo = options.serverInfo; assert(this.serverInfo !== null && typeof this.serverInfo === "object"); } public dispose(): void { this._certificateChain = emptyCertificate; this._privateKey = emptyPrivateKeyPEM; assert(Object.keys(this._channels).length === 0, "OPCUAServerEndPoint channels must have been deleted"); this._channels = {}; this.serverInfo = new ApplicationDescription({}); this._endpoints = []; assert(this._endpoints.length === 0, "endpoints must have been deleted"); this._endpoints = []; this._server = undefined; this._listen_callback = undefined; this.removeAllListeners(); } public toString(): string { const privateKey1 = convertPEMtoDER(this.getPrivateKey()); const txt = " end point" + this._counter + " port = " + this.port + " l = " + this._endpoints.length + " " + makeSHA1Thumbprint(this.getCertificateChain()).toString("hex") + " " + makeSHA1Thumbprint(privateKey1).toString("hex"); return txt; } public getChannels(): ServerSecureChannelLayer[] { return Object.values(this._channels); } /** * Returns the X509 DER form of the server certificate */ public getCertificate(): Certificate { return split_der(this.getCertificateChain())[0]; } /** * Returns the X509 DER form of the server certificate */ public getCertificateChain(): Certificate { return this._certificateChain; } /** * the private key */ public getPrivateKey(): PrivateKeyPEM { return this._privateKey; } /** * The number of active channel on this end point. */ public get currentChannelCount(): number { return Object.keys(this._channels).length; } /** * @method getEndpointDescription * @param securityMode * @param securityPolicy * @return endpoint_description {EndpointDescription|null} */ public getEndpointDescription( securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy, endpointUrl: string | null ): EndpointDescription | null { const endpoints = this.endpointDescriptions(); const arr = endpoints.filter(matching_endpoint.bind(this, securityMode, securityPolicy, endpointUrl)); if (endpointUrl && endpointUrl.length > 0 && !(arr.length === 0 || arr.length === 1)) { errorLog("Several matching endpoints have been found : "); for (const a of arr) { errorLog(" ", a.endpointUrl, MessageSecurityMode[securityMode], securityPolicy); } } return arr.length === 0 ? null : arr[0]; } public addEndpointDescription( securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy, options?: EndpointDescriptionParams ): void { if (!options) { options = { hostname: getFullyQualifiedDomainName(), securityPolicies: [SecurityPolicy.Basic256Sha256] }; } options.allowAnonymous = options.allowAnonymous === undefined ? true : options.allowAnonymous; // istanbul ignore next if (securityMode === MessageSecurityMode.None && securityPolicy !== SecurityPolicy.None) { throw new Error(" invalid security "); } // istanbul ignore next if (securityMode !== MessageSecurityMode.None && securityPolicy === SecurityPolicy.None) { throw new Error(" invalid security "); } // const port = this.port; // resource Path is a string added at the end of the url such as "/UA/Server" const resourcePath = (options.resourcePath || "").replace(/\\/g, "/"); assert(resourcePath.length === 0 || resourcePath.charAt(0) === "/", "resourcePath should start with /"); const hostname = options.hostname || getFullyQualifiedDomainName(); const endpointUrl = `opc.tcp://${hostname}:${port}${resourcePath}`; const endpoint_desc = this.getEndpointDescription(securityMode, securityPolicy, endpointUrl); // istanbul ignore next if (endpoint_desc) { throw new Error(" endpoint already exist"); } // now build endpointUrl this._endpoints.push( _makeEndpointDescription({ collection: this._policy_deduplicator, endpointUrl, hostname, port, server: this.serverInfo, serverCertificateChain: this.getCertificateChain(), securityMode, securityPolicy, allowAnonymous: options.allowAnonymous, allowUnsecurePassword: options.allowUnsecurePassword, resourcePath: options.resourcePath, restricted: !!options.restricted, securityPolicies: options?.securityPolicies || [] }) ); } public addRestrictedEndpointDescription(options: EndpointDescriptionParams): void { options = { ...options }; options.restricted = true; return this.addEndpointDescription(MessageSecurityMode.None, SecurityPolicy.None, options); } public addStandardEndpointDescriptions(options?: AddStandardEndpointDescriptionsParam): void { options = options || {}; options.securityModes = options.securityModes || defaultSecurityModes; options.securityPolicies = options.securityPolicies || defaultSecurityPolicies; const defaultHostname = options.hostname || getFullyQualifiedDomainName(); let hostnames: string[] = [defaultHostname]; options.alternateHostname = options.alternateHostname || []; if (typeof options.alternateHostname === "string") { options.alternateHostname = [options.alternateHostname]; } // remove duplicates if any (uniq) hostnames = [...new Set(hostnames.concat(options.alternateHostname as string[]))]; for (const alternateHostname of hostnames) { const optionsE = options as EndpointDescriptionParams; optionsE.hostname = alternateHostname; if (options.securityModes.indexOf(MessageSecurityMode.None) >= 0) { this.addEndpointDescription(MessageSecurityMode.None, SecurityPolicy.None, optionsE); } else { if (!options.disableDiscovery) { this.addRestrictedEndpointDescription(optionsE); } } for (const securityMode of options.securityModes) { if (securityMode === MessageSecurityMode.None) { continue; } for (const securityPolicy of options.securityPolicies) { if (securityPolicy === SecurityPolicy.None) { continue; } this.addEndpointDescription(securityMode, securityPolicy, optionsE); } } } } /** * returns the list of end point descriptions. */ public endpointDescriptions(): EndpointDescription[] { return this._endpoints; } /** * @method listen * @async */ public listen(callback: (err?: Error) => void): void { assert(typeof callback === "function"); assert(!this._started, "OPCUAServerEndPoint is already listening"); this._listen_callback = callback; this._server!.on("error", (err: Error) => { debugLog(chalk.red.bold(" error") + " port = " + this.port, err); this._started = false; this._end_listen(err); }); this._server!.on("listening", () => { debugLog("server is listening"); }); this._server!.listen( this.port, /*"::",*/ (err?: Error) => { // 'listening' listener debugLog(chalk.green.bold("LISTENING TO PORT "), this.port, "err ", err); assert(!err, " cannot listen to port "); this._started = true; this._end_listen(); } ); } public killClientSockets(callback: (err?: Error) => void): void { for (const channel of this.getChannels()) { const hacked_channel = channel as any; if (hacked_channel.transport && hacked_channel.transport._socket) { // hacked_channel.transport._socket.close(); hacked_channel.transport._socket.destroy(); hacked_channel.transport._socket.emit("error", new Error("EPIPE")); } } callback(); } public suspendConnection(callback: (err?: Error) => void): void { if (!this._started) { return callback(new Error("Connection already suspended !!")); } // Stops the server from accepting new connections and keeps existing connections. // (note from nodejs doc: This function is asynchronous, the server is finally closed // when all connections are ended and the server emits a 'close' event. // The optional callback will be called once the 'close' event occurs. // Unlike that event, it will be called with an Error as its only argument // if the server was not open when it was closed. this._server!.close(() => { this._started = false; debugLog("Connection has been closed !" + this.port); }); this._started = false; callback(); } public restoreConnection(callback: (err?: Error) => void): void { this.listen(callback); } public abruptlyInterruptChannels(): void { for (const channel of Object.values(this._channels)) { channel.abruptlyInterrupt(); } } /** * @method shutdown * @async */ public shutdown(callback: (err?: Error) => void): void { debugLog("OPCUAServerEndPoint#shutdown "); if (this._started) { // make sure we don't accept new connection any more ... this.suspendConnection(() => { // shutdown all opened channels ... const _channels = Object.values(this._channels); async.each( _channels, (channel: ServerSecureChannelLayer, callback1: (err?: Error) => void) => { this.shutdown_channel(channel, callback1); }, (err?: Error | null) => { /* istanbul ignore next */ if (!(Object.keys(this._channels).length === 0)) { errorLog(" Bad !"); } assert(Object.keys(this._channels).length === 0, "channel must have unregistered themselves"); callback(err || undefined); } ); }); } else { callback(); } } /** * @method start * @async * @param callback */ public start(callback: (err?: Error) => void): void { assert(typeof callback === "function"); this.listen(callback); } public get bytesWritten(): number { const channels = Object.values(this._channels); return ( this.bytesWrittenInOldChannels + channels.reduce((accumulated: number, channel: ServerSecureChannelLayer) => { return accumulated + channel.bytesWritten; }, 0) ); } public get bytesRead(): number { const channels = Object.values(this._channels); return ( this.bytesReadInOldChannels + channels.reduce((accumulated: number, channel: ServerSecureChannelLayer) => { return accumulated + channel.bytesRead; }, 0) ); } public get transactionsCount(): number { const channels = Object.values(this._channels); return ( this.transactionsCountOldChannels + channels.reduce((accumulated: number, channel: ServerSecureChannelLayer) => { return accumulated + channel.transactionsCount; }, 0) ); } public get securityTokenCount(): number { const channels = Object.values(this._channels); return ( this.securityTokenCountOldChannels + channels.reduce((accumulated: number, channel: ServerSecureChannelLayer) => { return accumulated + channel.securityTokenCount; }, 0) ); } public get activeChannelCount(): number { return Object.keys(this._channels).length; } private _dump_statistics() { this._server!.getConnections((err: Error | null, count: number) => { debugLog(chalk.cyan("CONCURRENT CONNECTION = "), count); }); debugLog(chalk.cyan("MAX CONNECTIONS = "), this._server!.maxConnections); } private _setup_server() { assert(!this._server); this._server = net.createServer({ pauseOnConnect: true }, this._on_client_connection.bind(this)); // xx console.log(" Server with max connections ", self.maxConnections); this._server.maxConnections = this.maxConnections + 1; // plus one extra this._listen_callback = undefined; this._server .on("connection", (socket: NodeJS.Socket) => { // istanbul ignore next if (doDebug) { this._dump_statistics(); debugLog("server connected with : " + (socket as any).remoteAddress + ":" + (socket as any).remotePort); } }) .on("close", () => { debugLog("server closed : all connections have ended"); }) .on("error", (err: Error) => { // this could be because the port is already in use debugLog(chalk.red.bold("server error: "), err.message); }); } private _on_client_connection(socket: Socket) { // a client is attempting a connection on the socket socket.setNoDelay(true); debugLog("OPCUAServerEndPoint#_on_client_connection", this._started); if (!this._started) { debugLog( chalk.bgWhite.cyan( "OPCUAServerEndPoint#_on_client_connection " + "SERVER END POINT IS PROBABLY SHUTTING DOWN !!! - Connection is refused" ) ); socket.end(); return; } const deny_connection = () => { console.log( chalk.bgWhite.cyan( "OPCUAServerEndPoint#_on_client_connection " + "The maximum number of connection has been reached - Connection is refused" ) ); const reason = "maxConnections reached (" + this.maxConnections + ")"; const socketData = extractSocketData(socket, reason); this.emit("connectionRefused", socketData); socket.end(); socket.destroy(); }; const establish_connection = () => { const nbConnections = Object.keys(this._channels).length; debugLog( " nbConnections ", nbConnections, " self._server.maxConnections", this._server!.maxConnections, this.maxConnections ); if (nbConnections >= this.maxConnections) { deny_connection(); return; } debugLog("OPCUAServerEndPoint._on_client_connection successful => New Channel"); const channel = new ServerSecureChannelLayer({ defaultSecureTokenLifetime: this.defaultSecureTokenLifetime, // objectFactory: this.objectFactory, parent: this, timeout: this.timeout }); debugLog("channel Timeout = >", channel.timeout); socket.resume(); this._preregisterChannel(channel); channel.init(socket, (err?: Error) => { this._un_pre_registerChannel(channel); debugLog(chalk.yellow.bold("Channel#init done"), err); if (err) { const reason = "openSecureChannel has Failed " + err.message; const socketData = extractSocketData(socket, reason); const channelData = extractChannelData(channel); this.emit("openSecureChannelFailure", socketData, channelData); socket.end(); socket.destroy(); } else { debugLog("server receiving a client connection"); this._registerChannel(channel); } }); channel.on("message", (message: Message) => { // forward this.emit("message", message, channel, this); }); }; // Each SecureChannel exists until it is explicitly closed or until the last token has expired and the overlap // period has elapsed. A Server application should limit the number of SecureChannels. // To protect against misbehaving Clients and denial of service attacks, the Server shall close the oldest // SecureChannel that has no Session assigned before reaching the maximum number of supported SecureChannels. this._prevent_DDOS_Attack(establish_connection, deny_connection); } private _preregisterChannel(channel: ServerSecureChannelLayer) { // _preregisterChannel is used to keep track of channel for which // that are in early stage of the hand shaking process. // e.g HEL/ACK and OpenSecureChannel may not have been received yet // as they will need to be interrupted when OPCUAServerEndPoint is closed assert(this._started, "OPCUAServerEndPoint must be started"); assert(!Object.prototype.hasOwnProperty.call(this._channels, channel.hashKey), " channel already preregistered!"); const channelPriv = <ServerSecureChannelLayerPriv>channel; this._channels[channel.hashKey] = channelPriv; channelPriv._unpreregisterChannelEvent = () => { debugLog("Channel received an abort event during the preregistration phase"); this._un_pre_registerChannel(channel); channel.dispose(); }; channel.on("abort", channelPriv._unpreregisterChannelEvent); } private _un_pre_registerChannel(channel: ServerSecureChannelLayer) { if (!this._channels[channel.hashKey]) { debugLog("Already un preregistered ?", channel.hashKey); return; } delete this._channels[channel.hashKey]; const channelPriv = <ServerSecureChannelLayerPriv>channel; if (typeof channelPriv._unpreregisterChannelEvent === "function") { channel.removeListener("abort", channelPriv._unpreregisterChannelEvent!); channelPriv._unpreregisterChannelEvent = undefined; } } /** * @method _registerChannel * @param channel * @private */ private _registerChannel(channel: ServerSecureChannelLayer) { if (this._started) { debugLog(chalk.red("_registerChannel = "), "channel.hashKey = ", channel.hashKey); assert(!this._channels[channel.hashKey]); this._channels[channel.hashKey] = channel; /** * @event newChannel * @param channel */ this.emit("newChannel", channel); channel.on("abort", () => { this._unregisterChannel(channel); }); } else { debugLog("OPCUAServerEndPoint#_registerChannel called when end point is shutdown !"); debugLog(" -> channel will be forcefully terminated"); channel.close(); channel.dispose(); } } /** * @method _unregisterChannel * @param channel * @private */ private _unregisterChannel(channel: ServerSecureChannelLayer): void { debugLog("_un-registerChannel channel.hashKey", channel.hashKey); if (!Object.prototype.hasOwnProperty.call(this._channels, channel.hashKey)) { return; } assert(Object.prototype.hasOwnProperty.call(this._channels, channel.hashKey), "channel is not registered"); /** * @event closeChannel * @param channel */ this.emit("closeChannel", channel); // keep trace of statistics data from old channel for our own accumulated stats. this.bytesWrittenInOldChannels += channel.bytesWritten; this.bytesReadInOldChannels += channel.bytesRead; this.transactionsCountOldChannels += channel.transactionsCount; delete this._channels[channel.hashKey]; // istanbul ignore next if (doDebug) { this._dump_statistics(); debugLog("un-registering channel - Count = ", this.currentChannelCount); } /// channel.dispose(); } private _end_listen(err?: Error) { assert(typeof this._listen_callback === "function"); this._listen_callback!(err); this._listen_callback = undefined; } /** * shutdown_channel * @param channel * @param inner_callback */ private shutdown_channel(channel: ServerSecureChannelLayer, inner_callback: (err?: Error) => void) { assert(typeof inner_callback === "function"); channel.once("close", () => { // xx console.log(" ON CLOSED !!!!"); }); channel.close(() => { this._unregisterChannel(channel); setImmediate(inner_callback); }); } /** * @private */ private _prevent_DDOS_Attack(establish_connection: () => void, deny_connection: () => void) { const nbConnections = this.activeChannelCount; if (nbConnections >= this.maxConnections) { // istanbul ignore next errorLog(chalk.bgRed.white("PREVENTING DDOS ATTACK => maxConnection =" + this.maxConnections)); const unused_channels: ServerSecureChannelLayer[] = this.getChannels().filter((channel1: ServerSecureChannelLayer) => { return !channel1.isOpened && !channel1.hasSession; }); if (unused_channels.length === 0) { // all channels are in used , we cannot get any errorLog("All Channel are in used ! let cancel this one"); // istanbul ignore next console.log(" - all channel are used !!!!"); dumpChannelInfo(this.getChannels()); setTimeout(deny_connection, 10); return; } // istanbul ignore next if (doDebug) { console.log( " - Unused channels that can be clobbered", unused_channels.map((channel1: ServerSecureChannelLayer) => channel1.hashKey).join(" ") ); } const channel = unused_channels[0]; errorLog("Closing channel ", channel.hashKey); channel.close(() => { // istanbul ignore next if (doDebug) { console.log(" _ Unused channel has been closed ", channel.hashKey); } this._unregisterChannel(channel); establish_connection(); }); } else { setImmediate(establish_connection); } } } interface MakeEndpointDescriptionOptions { /** * port number s */ port: number; /** * @default default hostname (default value will be full qualified domain name) */ hostname: string; /** * */ endpointUrl: string; serverCertificateChain: Certificate; /** * */ securityMode: MessageSecurityMode; /** * */ securityPolicy: SecurityPolicy; securityLevel?: number; server: ApplicationDescription; /* { applicationUri: string; applicationName: LocalizedTextOptions; applicationType: ApplicationType; gatewayServerUri: string; discoveryProfileUri: string; discoveryUrls: string[]; }; */ resourcePath?: string; allowAnonymous?: boolean; // default true // allow un-encrypted password in userNameIdentity allowUnsecurePassword?: boolean; // default false /** * onlyCertificateLessConnection */ onlyCertificateLessConnection?: boolean; restricted: boolean; collection: { [key: string]: number }; securityPolicies: SecurityPolicy[]; } interface EndpointDescriptionEx extends EndpointDescription { restricted: boolean; } function estimateSecurityLevel(securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy): number { if (securityMode === MessageSecurityMode.None) { return 1; } let offset = 100; if (securityMode === MessageSecurityMode.SignAndEncrypt) { offset = 200; } switch (securityPolicy) { case SecurityPolicy.Basic128: case SecurityPolicy.Basic128Rsa15: case SecurityPolicy.Basic192: return 2; // deprecated => low case SecurityPolicy.Basic192Rsa15: return 3; // deprecated => low case SecurityPolicy.Basic256: return 4; // deprecated => low case SecurityPolicy.Basic256Rsa15: return 4 + offset; case SecurityPolicy.Aes128_Sha256_RsaOaep: return 5 + offset; case SecurityPolicy.Basic256Sha256: return 6 + offset; case SecurityPolicy.Aes256_Sha256_RsaPss: return 7 + offset; default: case SecurityPolicy.None: return 1; } } /** * @private */ function _makeEndpointDescription(options: MakeEndpointDescriptionOptions): EndpointDescriptionEx { assert(isFinite(options.port), "expecting a valid port number"); assert(Object.prototype.hasOwnProperty.call(options, "serverCertificateChain")); assert(!Object.prototype.hasOwnProperty.call(options, "serverCertificate")); assert(!!options.securityMode); // s.MessageSecurityMode assert(!!options.securityPolicy); assert(options.server !== null && typeof options.server === "object"); assert(!!options.hostname && typeof options.hostname === "string"); assert(typeof options.restricted === "boolean"); const u = (n: string) => getUniqueName(n, options.collection); options.securityLevel = options.securityLevel === undefined ? estimateSecurityLevel(options.securityMode, options.securityPolicy) : options.securityLevel; assert(isFinite(options.securityLevel), "expecting a valid securityLevel"); const securityPolicyUri = toURI(options.securityPolicy); const userIdentityTokens = []; if (options.securityPolicy === SecurityPolicy.None) { if (options.allowUnsecurePassword) { userIdentityTokens.push({ policyId: u("username_unsecure"), tokenType: UserTokenType.UserName, issuedTokenType: null, issuerEndpointUrl: null, securityPolicyUri: null }); } const a = (tokenType: UserTokenType, securityPolicy: SecurityPolicy, name: string) => { if (options.securityPolicies.indexOf(securityPolicy) >= 0) { userIdentityTokens.push({ policyId: u(name), tokenType, issuedTokenType: null, issuerEndpointUrl: null, securityPolicyUri: securityPolicy }); } }; const onlyCertificateLessConnection = options.onlyCertificateLessConnection === undefined ? false : options.onlyCertificateLessConnection; if (!onlyCertificateLessConnection) { a(UserTokenType.UserName, SecurityPolicy.Basic256, "username_basic256"); a(UserTokenType.UserName, SecurityPolicy.Basic128Rsa15, "username_basic128Rsa15"); a(UserTokenType.UserName, SecurityPolicy.Basic256Sha256, "username_basic256Sha256"); a(UserTokenType.UserName, SecurityPolicy.Aes128_Sha256_RsaOaep, "username_aes128Sha256RsaOaep"); // X509 a(UserTokenType.Certificate, SecurityPolicy.Basic256, "certificate_basic256"); a(UserTokenType.Certificate, SecurityPolicy.Basic128Rsa15, "certificate_basic128Rsa15"); a(UserTokenType.Certificate, SecurityPolicy.Basic256Sha256, "certificate_basic256Sha256"); a(UserTokenType.Certificate, SecurityPolicy.Aes128_Sha256_RsaOaep, "certificate_aes128Sha256RsaOaep"); } } else { // note: // when channel session security is not "None", // userIdentityTokens can be left to null. // in this case this mean that secure policy will be the same as connection security policy userIdentityTokens.push({ policyId: u("usernamePassword"), tokenType: UserTokenType.UserName, issuedTokenType: null, issuerEndpointUrl: null, securityPolicyUri: null }); userIdentityTokens.push({ policyId: u("certificateX509"), tokenType: UserTokenType.Certificate, issuedTokenType: null, issuerEndpointUrl: null, securityPolicyUri: null }); } if (options.allowAnonymous) { userIdentityTokens.push({ policyId: u("anonymous"), tokenType: UserTokenType.Anonymous, issuedTokenType: null, issuerEndpointUrl: null, securityPolicyUri: null }); } // return the endpoint object const endpoint = new EndpointDescription({ endpointUrl: options.endpointUrl, server: undefined, // options.server, serverCertificate: options.serverCertificateChain, securityMode: options.securityMode, securityPolicyUri, userIdentityTokens, securityLevel: options.securityLevel, transportProfileUri: default_transportProfileUri }) as EndpointDescriptionEx; (endpoint as any).__defineGetter__("endpointUrl", () => { return resolveFullyQualifiedDomainName(options.endpointUrl); }); endpoint.server = options.server; endpoint.restricted = options.restricted; return endpoint; } /** * return true if the end point matches security mode and policy * @param endpoint * @param securityMode * @param securityPolicy * @internal * */ function matching_endpoint( securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy, endpointUrl: string | null, endpoint: EndpointDescription ): boolean { assert(endpoint instanceof EndpointDescription); const endpoint_securityPolicy = fromURI(endpoint.securityPolicyUri); if (endpointUrl && endpoint.endpointUrl! !== endpointUrl) { return false; } return endpoint.securityMode === securityMode && endpoint_securityPolicy === securityPolicy; } const defaultSecurityModes = [MessageSecurityMode.None, MessageSecurityMode.Sign, MessageSecurityMode.SignAndEncrypt]; const defaultSecurityPolicies = [ SecurityPolicy.Basic128Rsa15, SecurityPolicy.Basic256, // xx UNUSED!! SecurityPolicy.Basic256Rsa15, SecurityPolicy.Basic256Sha256, SecurityPolicy.Aes128_Sha256_RsaOaep // NO USED YET SecurityPolicy.Aes256_Sha256_RsaPss ];
typescript
// A launch configuration that compiles the extension and then opens it inside a new window // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 { "version": "0.2.0", "configurations": [ { "name": "Jest: Extension Tests", "type": "extensionHost", "request": "launch", "runtimeExecutable": "${execPath}", "stopOnEntry": false, "sourceMaps": true, "smartStep": true, "args": [ "--disable-extensions", "--extensionDevelopmentPath=${workspaceFolder}", "--extensionTestsPath=${workspaceFolder}/node_modules/vscode-jest-test-runner" ], "skipFiles": ["<node_internals>/**/*.js"], "outFiles": ["${workspaceFolder}/dist/**/*.js"], "preLaunchTask": "npm: compile", "internalConsoleOptions": "openOnSessionStart", "env": { "JEST_TEST_RUNNER_SETUP": "${workspaceFolder}/dist/test-utils/vscode-jest-test-runner-setup.js", "JEST_TEST_RUNNER_TEST_REGEX": "", "JEST_TEST_RUNNER_UPDATE_SNAPSHOTS": "false" } }, { "name": "Jest: Current Test File", "type": "extensionHost", "request": "launch", "runtimeExecutable": "${execPath}", "stopOnEntry": false, "sourceMaps": true, "smartStep": true, "args": [ "--disable-extensions", "--extensionDevelopmentPath=${workspaceFolder}", "--extensionTestsPath=${workspaceFolder}/node_modules/vscode-jest-test-runner" ], "skipFiles": ["<node_internals>/**/*.js"], "outFiles": ["${workspaceFolder}/dist/**/*.js"], "preLaunchTask": "npm: compile", "internalConsoleOptions": "openOnSessionStart", "env": { "JEST_TEST_RUNNER_SETUP": "${workspaceFolder}/dist/test-utils/vscode-jest-test-runner-setup.js", "JEST_TEST_RUNNER_TEST_REGEX": "${file}", "JEST_TEST_RUNNER_UPDATE_SNAPSHOTS": "false" } }, { "name": "Jest: Update All Snapshots", "type": "extensionHost", "request": "launch", "runtimeExecutable": "${execPath}", "stopOnEntry": false, "sourceMaps": true, "smartStep": true, "args": [ "--disable-extensions", "--extensionDevelopmentPath=${workspaceFolder}", "--extensionTestsPath=${workspaceFolder}/node_modules/vscode-jest-test-runner" ], "skipFiles": ["<node_internals>/**/*.js"], "outFiles": ["${workspaceFolder}/dist/**/*.js"], "preLaunchTask": "npm: compile", "internalConsoleOptions": "openOnSessionStart", "env": { "JEST_TEST_RUNNER_SETUP": "${workspaceFolder}/dist/test-utils/vscode-jest-test-runner-setup.js", "JEST_TEST_RUNNER_TEST_REGEX": "", "JEST_TEST_RUNNER_UPDATE_SNAPSHOTS": "true" } }, { "name": "Jest: Update Snapshots in Current Test File", "type": "extensionHost", "request": "launch", "runtimeExecutable": "${execPath}", "stopOnEntry": false, "sourceMaps": true, "smartStep": true, "args": [ "--disable-extensions", "--extensionDevelopmentPath=${workspaceFolder}", "--extensionTestsPath=${workspaceFolder}/node_modules/vscode-jest-test-runner" ], "skipFiles": ["<node_internals>/**/*.js"], "outFiles": ["${workspaceFolder}/dist/**/*.js"], "preLaunchTask": "npm: compile", "internalConsoleOptions": "openOnSessionStart", "env": { "JEST_TEST_RUNNER_SETUP": "${workspaceFolder}/dist/test-utils/vscode-jest-test-runner-setup.js", "JEST_TEST_RUNNER_TEST_REGEX": "${file}", "JEST_TEST_RUNNER_UPDATE_SNAPSHOTS": "true" } } ] }
json
1 Behold, a King shall reigne in iustice, and the princes shall rule in iudgement. 2 And that man shall bee as an hiding place from the winde, and as a refuge for the tempest: as riuers of water in a drie place, and as the shadowe of a great rocke in a weary land. 3 The eyes of the seeing shall not be shut, and the eares of them that heare, shall hearken. 4 And the heart of the foolish shall vnderstand knowledge, and the tongue of the stutters shalbe ready to speake distinctly. 5 A nigard shall no more be called liberall, nor the churle riche. 6 But the nigarde will speake of nigardnesse, and his heart will worke iniquitie, and do wickedly, and speake falsely against the Lord, to make emptie the hungrie soule, and to cause the drinke of the thirstie to faile. 7 For the weapons of the churle are wicked: hee deuiseth wicked counsels, to vndoe the poore with lying words: and to speake against the poore in iudgement. 8 But the liberall man will deuise of liberall things, and he will continue his liberalitie. 9 Rise vp, ye women that are at ease: heare my voyce, ye carelesse daughters: hearken to my wordes. 10 Yee women, that are carelesse, shall be in feare aboue a yeere in dayes: for the vintage shall faile, and the gatherings shall come no more. 11 Yee women, that are at ease, be astonied: feare, O yee carelesse women: put off the clothes: make bare, and girde sackcloth vpon the loynes. 12 Men shall lament for the teates, euen for the pleasant fieldes, and for the fruitefull vine. 13 Vpon the lande of my people shall growe thornes and briers: yea, vpon all the houses of ioye in the citie of reioysing, 14 Because the palace shalbe forsaken, and the noise of the citie shalbe left: the towre and fortresse shalbe dennes for euer, and the delite of wilde asses, and a pasture for flockes, 15 Vntill the Spirit be powred vpon vs from aboue, and the wildernes become a fruitfull fielde, and the plenteous fielde be counted as a forest. 16 And iudgement shall dwel in the desert, and iustice shall remaine in the fruitfull fielde. 17 And the worke of iustice shall bee peace, euen the worke of iustice and quietnesse, and assurance for euer. 18 And my people shall dwell in the tabernacle of peace, and in sure dwellings, and in safe resting places. 19 When it haileth, it shall fall on the forest, and the citie shall be set in the lowe place. 20 Blessed are ye that sowe vpon all waters, and driue thither the feete of the oxe and the asse.
english
<filename>lab01/3-2.cpp<gh_stars>0 // Lab 01 section 3.2 // Given a list of N integers, find its mean (as a double), maximum value, minimum value, // and range. Your program will first ask for N, the number of integers in the list, which the // user will input. Then the user will input N more numbers #include <iostream> using namespace std; int main() { int numbers; cout << "This program calculates the mean, max and min of a group of numbers" << endl; cout << "Please, insert the quantity of numbers desired: " << endl; cin >> numbers; int myArray[numbers]; cout << "Now please insert your numbers:" << endl; for ( int i = 0; i<numbers; i++ ) { cin >> myArray[i]; } double mean = 0; int max = myArray[0]; int min = myArray[0]; for (int i = 0; i<numbers; i++ ) { mean = mean + myArray[i]; } mean = mean / numbers; cout << "Your mean is: " << mean << endl; for (int i = 0; i<numbers; i++ ) { if (max < myArray[i]) { max = myArray[i]; } } cout << "Your max is: " << max << endl; for (int i = 0; i<numbers; i++ ) { if (min > myArray[i]) { min = myArray[i]; } } cout << "Your min is: " << min << endl; return 0; }
cpp
<gh_stars>10-100 #!/usr/bin/env python # -*- coding: utf-8 # Copyright 2017-2019 The FIAAS 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. import mock import pytest from k8s.client import NotFound from k8s.models.common import ObjectMeta from k8s.models.configmap import ConfigMap NAME = "my-name" NAMESPACE = "my-namespace" @pytest.mark.usefixtures("k8s_config") class TestConfigMap(object): def test_created_if_not_exists(self, post, api_get): api_get.side_effect = NotFound() configmap = _create_default_configmap() call_params = configmap.as_dict() post.return_value.json.return_value = call_params assert configmap._new configmap.save() assert not configmap._new pytest.helpers.assert_any_call(post, _uri(NAMESPACE), call_params) def test_updated_if_exists(self, get, put): mock_response = _create_mock_response() get.return_value = mock_response configmap = _create_default_configmap() from_api = ConfigMap.get_or_create(metadata=configmap.metadata, data=configmap.data) assert not from_api._new assert from_api.data == {"foo": "bar"} from_api.data = {"baz": "quux"} call_params = from_api.as_dict() put.return_value.json.return_value = call_params from_api.save() pytest.helpers.assert_any_call(put, _uri(NAMESPACE, NAME), call_params) def test_deleted(self, delete): ConfigMap.delete(NAME, namespace=NAMESPACE) pytest.helpers.assert_any_call(delete, _uri(NAMESPACE, NAME)) def _create_mock_response(): mock_response = mock.Mock() mock_response.json.return_value = { "apiVersion": "v1", "kind": "ConfigMap", "metadata": { "creationTimestamp": "2017-09-08T13:37:00Z", "generation": 1, "labels": { "test": "true" }, "name": NAME, "namespace": NAMESPACE, "resourceVersion": "42", "selfLink": _uri(NAMESPACE, NAME), "uid": "d8f1ba26-b182-11e6-a364-fa163ea2a9c4" }, "data": { "foo": "bar", }, } return mock_response def _create_default_configmap(): object_meta = ObjectMeta(name=NAME, namespace=NAMESPACE, labels={"test": "true"}) data = {"foo": "bar"} configmap = ConfigMap(metadata=object_meta, data=data) return configmap def _uri(namespace, name=""): return "/api/v1/namespaces/{namespace}/configmaps/{name}".format(name=name, namespace=namespace)
python
LG announced today that it has sold 5 million Viewty camera phones worldwide after 14 months on the market. The 3′′ touch screen-equipped, 5mp handset (now available in more colors – black, silver, red, blue, pink, purple, and white) has proven extremely popular abroad thanks to its emphasis on “real” camera features including its ability to capture video at 120fps, built-in autofocus and image stabilization, xenon flash, and Schneider Kreuznach optics. Of the 5 million units sold, 350,000 devices were snapped up in LG’s homeland (S. Korea), with the majority of Viewty sales taking place across Europe and other parts Asia (4,650,000 units). These numbers bode well for LG who has already announced an 8mp Viewty successor, the KC910 Renior, back in September 2008. Just goes to show ya (mobile manufacturers), when you mix looks and features with actual functionality, we all win in the end!
english
The Weeknd, Lily-Rose Depp and HBO are coming to defend their new series The Idol, which has been reported of onset creative clashes and toxicity. The news comes after a report from Rolling Stone alleging that production on the upcoming HBO series, which was billed as a six-episode series, has seen multiple production delays and costly reshoots. In response, HBO denied the recent accusations and shared how the network is excited about the new creative direction. "The creators and producers of The Idol have been working hard to create one of HBO's most exciting and provocative original programs," the statement read, as shared by People publication. "The initial approach on the show and production of the early episodes, unfortunately, did not meet HBO standards so we chose to make a change." "Throughout the process, the creative team has been committed to creating a safe, collaborative, and mutually respectful working environment, and last year, the team made creative changes they felt were in the best interest of both the production and the cast and crew,” the statement continued. “We look forward to sharing The Idol with audiences soon." Depp also praised Levinson's new direction and his collaborative nature in a statement to People. "Sam is, for so many reasons, the best director I have ever worked with," she said. "Never have I felt more supported or respected in a creative space, my input and opinions more valued. Working with Sam is a true collaboration in every way - it matters to him, more than anything does, not only what his actors think about the work, but how we feel performing it. He hires people whose work he esteems and has always created an environment in which I felt seen, heard, and appreciated." Moreover, The Weeknd also responded to Rolling Stone’s report sharing an unreleased clip from The Idol in which the characters disparage Rolling Stone, calling the publication "irrelevant" and "past its prime." The video is captioned, “@rollingstone did we upset you?” Additionally, a source told People that the video was filmed sometime last year and is not the result of Rolling Stone’s report, which claimed that the new scripts contained "disturbing sexual and physically violent scenes between Depp and Tesfaye's characters." The Idol also stars Troye Sivan, Blackpink’s Jennie, Dan Levy, Rachel Sennott, Hank Azaria, Moses Sumney and more. “A self-help guru and leader of a modern-day cult enters a complicated relationship with a rising pop idol,” reads an official logline for the series. The Idol is set to premiere on HBO sometime in 2023. Catch us for latest Bollywood News, New Bollywood Movies update, Box office collection, New Movies Release , Bollywood News Hindi, Entertainment News, Bollywood Live News Today & Upcoming Movies 2024 and stay updated with latest hindi movies only on Bollywood Hungama.
english
<reponame>jwade1327/ac-business-media-websites<filename>sites/oemoffhighway.com/server/graphql/fragments/market-outlook-list.js const gql = require('graphql-tag'); module.exports = gql` fragment EquipmentMarketOutlookListFragment on Content { id name body } `;
javascript
<gh_stars>0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Second Variety, by <NAME>.</title> <style type="text/css"> body { font-family: Georgia,serif; margin-left: 15%; margin-right: 15%; } p { text-align: justify; margin: 0em; text-indent:1em; } h1 { text-align: center; font-weight: normal; margin-top:2em; font-family:sans-serif; } div.illo {text-align:center; margin:2em auto; text-indent:0em;} img { border:none;display:block;margin:2em auto;} .illo a.img_link {font-family:sans-serif;font-size:.7em;display:block;text-align:right;margin-right:-15%;} #transcriber_note {margin: 2em 10%; padding: 1em 1em; border:thin gray solid; background-color:#eee; color:#000; text-align:left; } #synopsis { margin: 2em 10%; text-align:justify; font-family:sans-serif; text-indent:0em; } #author { text-align: center; font-size:125%; padding:1em; text-indent:0em; font-family:sans-serif; } #illustrator { text-align: center; font-size:100%; padding:1em; text-indent:0em; font-family:sans-serif; } .pagenum { position: absolute; left: 1%; right: 87%; font-size: 10px; text-align: left; color: gray; background-color: inherit; font-weight: normal; font-style: normal; font-variant: normal; letter-spacing: normal; text-indent: 0em; } /* a[title].pagenum:after { content: attr(title); }*/ /*Uncomment previous section to show page numbers*/ hr.thoughtbreak {display:none;} .post_thoughtbreak { margin-top:2em; } /* framing decoration */ #the_beginning { border-top:thin gray solid; margin:2em 0em;} #the_end { border-bottom:thin gray solid; margin:2em 0em;} /* no underlines in links */ a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { color: red; background: inherit; } </style> </head> <body> <pre> The Project Gutenberg EBook of Second Variety, by <NAME> This eBook is for the use of anyone anywhere at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this eBook or online at www.gutenberg.net Title: Second Variety Author: <NAME> Illustrator: <NAME> Release Date: April 17, 2010 [EBook #32032] [Last updated: May 4, 2011] Language: English Character set encoding: UTF-8 *** START OF THIS PROJECT GUTENBERG EBOOK SECOND VARIETY *** Produced by <NAME>, <NAME> and the Online Distributed Proofreading Team at http://www.pgdp.net </pre> <div id="transcriber_note"> This etext was produced from <cite>Space Science Fiction</cite> May 1953. Extensive research did not uncover any evidence that the U.S. copyright on this publication was renewed. </div> <div id="the_beginning"> </div> <div id="cover" class="illo"> <img src="images/cover.jpg" width="600" height="882" alt="Magazine Cover: A flaming man holds the Earth in his arms." /> </div> <div id="illo1" class="illo"><a class="pagenum" id="page102" title="102"> </a> <img src="images/illo1-sm.jpg" width="600" height="423" alt="A man dangles the head of a 'boy' which has wires coming out of its neck." /> <a href="images/illo1-left.jpg" class="img_link">Left side image</a> <a href="images/illo1-right.jpg" class="img_link">Right side image</a> </div> <h1><a class="pagenum" id="page103" title="103"> </a>SECOND VARIETY</h1> <p id="author">BY <NAME></p> <p id="illustrator">ILLUSTRATED BY EBEL</p> <p id="synopsis">The claws were bad enough in the first place—nasty, crawling little death-robots. But when they began to imitate their creators, it was time for the human race to make peace—if it could!</p> <p><a class="pagenum" id="page104" title="104"> </a>The Russian soldier made his way nervously up the ragged side of the hill, holding his gun ready. He glanced around him, licking his dry lips, his face set. From time to time he reached up a gloved hand and wiped perspiration from his neck, pushing down his coat collar.</p> <p>Eric turned to Corporal Leone. “Want him? Or can I have him?” He adjusted the view sight so the Russian’s features squarely filled the glass, the lines cutting across his hard, somber features.</p> <p>Leone considered. The Russian was close, moving rapidly, almost running. “Don’t fire. Wait.” Leone tensed. “I don’t think we’re needed.”</p> <p>The Russian increased his pace, kicking ash and piles of debris out of his way. He reached the top of the hill and stopped, panting, staring around him. The sky was overcast, drifting clouds of gray particles. Bare trunks of trees jutted up occasionally; the ground was level and bare, rubble-strewn, with the ruins of buildings standing out here and there like yellowing skulls.</p> <p>The Russian was uneasy. He knew something was wrong. He started down the hill. Now he was only a few paces from the bunker. Eric was getting fidgety. He played with his pistol, glancing at Leone.</p> <p>“Don’t worry,” Leone said. “He won’t get here. They’ll take care of him.”</p> <p>“Are you sure? He’s got damn far.”</p> <p>“They hang around close to the bunker. He’s getting into the bad part. Get set!”</p> <p>The Russian began to hurry, sliding down the hill, his boots sinking into the heaps of gray ash, trying to keep his gun up. He stopped for a moment, lifting his fieldglasses to his face.</p> <p>“He’s looking right at us,” Eric said.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">The Russian came on. They could see his eyes, like two blue stones. His mouth was open a little. He needed a shave; his chin was stubbled. On one bony cheek was a square of tape, showing blue at the edge. A fungoid spot. His coat was muddy and torn. One glove was missing. As he ran his belt counter bounced up and down against him.</p> <p>Leone touched Eric’s arm. “Here one comes.”</p> <p>Across the ground something small and metallic came, flashing in the dull sunlight of mid-day. A metal sphere. It raced up the hill after the Russian, its treads flying. It was small, one of the baby ones. Its claws were out, two razor projections spinning in a blur of white steel. The Russian heard it. He turned instantly, <a class="pagenum" id="page105" title="105"> </a>firing. The sphere dissolved into particles. But already a second had emerged and was following the first. The Russian fired again.</p> <p>A third sphere leaped up the Russian’s leg, clicking and whirring. It jumped to the shoulder. The spinning blades disappeared into the Russian’s throat.</p> <p>Eric relaxed. “Well, that’s that. God, those damn things give me the creeps. Sometimes I think we were better off before.”</p> <p>“If we hadn’t invented them, they would have.” Leone lit a cigarette shakily. “I wonder why a Russian would come all this way alone. I didn’t see anyone covering him.”</p> <p>Lt. Scott came slipping up the tunnel, into the bunker. “What happened? Something entered the screen.”</p> <p>“<NAME>.”</p> <p>“Just one?”</p> <p>Eric brought the view screen around. Scott peered into it. Now there were numerous metal spheres crawling over the prostrate body, dull metal globes clicking and whirring, sawing up the Russian into small parts to be carried away.</p> <p>“What a lot of claws,” Scott murmured.</p> <p>“They come like flies. Not much game for them any more.”</p> <p>Scott pushed the sight away, disgusted. “Like flies. I wonder why he was out there. They know we have claws all around.”</p> <p>A larger robot had joined the smaller spheres. It was directing operations, a long blunt tube with projecting eyepieces. There was not much left of the soldier. What remained was being brought down the hillside by the host of claws.</p> <p>“Sir,” Leone said. “If it’s all right, I’d like to go out there and take a look at him.”</p> <p>“Why?”</p> <p>“Maybe he came with something.”</p> <p>Scott considered. He shrugged. “All right. But be careful.”</p> <p>“I have my tab.” Leone patted the metal band at his wrist. “I’ll be out of bounds.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">He picked up his rifle and stepped carefully up to the mouth of the bunker, making his way between blocks of concrete and steel prongs, twisted and bent. The air was cold at the top. He crossed over the ground toward the remains of the soldier, striding across the soft ash. A wind blew around him, swirling gray particles up in his face. He squinted and pushed on.</p> <p>The claws retreated as he came close, some of them stiffening into immobility. He touched his tab. The Ivan would have given something for that! Short hard radiation emitted from the tab <a class="pagenum" id="page106" title="106"> </a>neutralized the claws, put them out of commission. Even the big robot with its two waving eyestalks retreated respectfully as he approached.</p> <p>He bent down over the remains of the soldier. The gloved hand was closed tightly. There was something in it. Leone pried the fingers apart. A sealed container, aluminum. Still shiny.</p> <p>He put it in his pocket and made his way back to the bunker. Behind him the claws came back to life, moving into operation again. The procession resumed, metal spheres moving through the gray ash with their loads. He could hear their treads scrabbling against the ground. He shuddered.</p> <p>Scott watched intently as he brought the shiny tube out of his pocket. “He had that?”</p> <p>“In his hand.” Leone unscrewed the top. “Maybe you should look at it, sir.”</p> <p>Scott took it. He emptied the contents out in the palm of his hand. A small piece of silk paper, carefully folded. He sat down by the light and unfolded it.</p> <p>“What’s it say, sir?” Eric said. Several officers came up the tunnel. <NAME> appeared.</p> <p>“Major,” Scott said. “Look at this.”</p> <p>Hendricks read the slip. “This just come?”</p> <p>“A single runner. Just now.”</p> <p>“Where is he?” Hendricks asked sharply.</p> <p>“The claws got him.”</p> <p><NAME> grunted. “Here.” He passed it to his companions. “I think this is what we’ve been waiting for. They certainly took their time about it.”</p> <p>“So they want to talk terms,” Scott said. “Are we going along with them?”</p> <p>“That’s not for us to decide.” Hendricks sat down. “Where’s the communications officer? I want the Moon Base.”</p> <p>Leone pondered as the communications officer raised the outside antenna cautiously, scanning the sky above the bunker for any sign of a watching Russian ship.</p> <p>“Sir,” Scott said to Hendricks. “It’s sure strange they suddenly came around. We’ve been using the claws for almost a year. Now all of a sudden they start to fold.”</p> <p>“Maybe claws have been getting down in their bunkers.”</p> <p>“One of the big ones, the kind with stalks, got into an Ivan bunker last week,” Eric said. “It got a whole platoon of them before they got their lid shut.”</p> <p>“How do you know?”</p> <p>“A buddy told me. The thing came back with—with remains.”</p> <p>“Moon Base, sir,” the communications officer said.</p> <p><a class="pagenum" id="page107" title="107"> </a>On the screen the face of the lunar monitor appeared. His crisp uniform contrasted to the uniforms in the bunker. And he was clean shaven. “Moon Base.”</p> <p>“This is forward command L-Whistle. On Terra. Let me have <NAME>son.”</p> <p>The monitor faded. Presently General Thompson’s heavy features came into focus. “What is it, Major?”</p> <p>“Our claws got a single Russian runner with a message. We don’t know whether to act on it—there have been tricks like this in the past.”</p> <p>“What’s the message?”</p> <p>“The Russians want us to send a single officer on policy level over to their lines. For a conference. They don’t state the nature of the conference. They say that matters of—” He consulted the slip. “—Matters of grave urgency make it advisable that discussion be opened between a representative of the UN forces and themselves.”</p> <p>He held the message up to the screen for the general to scan. Thompson’s eyes moved.</p> <p>“What should we do?” Hendricks said.</p> <p>“Send a man out.”</p> <p>“You don’t think it’s a trap?”</p> <p>“It might be. But the location they give for their forward command is correct. It’s worth a try, at any rate.”</p> <p>“I’ll send an officer out. And report the results to you as soon as he returns.”</p> <p>“All right, Major.” Thompson broke the connection. The screen died. Up above, the antenna came slowly down.</p> <p>Hendricks rolled up the paper, deep in thought.</p> <p>“I’ll go,” Leone said.</p> <p>“They want somebody at policy level.” Hendricks rubbed his jaw. “Policy level. I haven’t been outside in months. Maybe I could use a little air.”</p> <p>“Don’t you think it’s risky?”</p> <p>Hendricks lifted the view sight and gazed into it. The remains of the Russian were gone. Only a single claw was in sight. It was folding itself back, disappearing into the ash, like a crab. Like some hideous metal crab….</p> <p>“That’s the only thing that bothers me.” Hendricks rubbed his wrist. “I know I’m safe as long as I have this on me. But there’s something about them. I hate the damn things. I wish we’d never invented them. There’s something wrong with them. Relentless little—”</p> <p>“If we hadn’t invented them, the Ivans would have.”</p> <p>Hendricks pushed the sight back. “Anyhow, it seems to be winning the war. I guess that’s good.”</p> <p>“Sounds like you’re getting the same jitters as the Ivans.” <a class="pagenum" id="page108" title="108"> </a>Hendricks examined his wrist watch. “I guess I had better get started, if I want to be there before dark.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">He took a deep breath and then stepped out onto the gray, rubbled ground. After a minute he lit a cigarette and stood gazing around him. The landscape was dead. Nothing stirred. He could see for miles, endless ash and slag, ruins of buildings. A few trees without leaves or branches, only the trunks. Above him the eternal rolling clouds of gray, drifting between Terra and the sun.</p> <p><NAME> went on. Off to the right something scuttled, something round and metallic. A claw, going lickety-split after something. Probably after a small animal, a rat. They got rats, too. As a sort of sideline.</p> <p>He came to the top of the little hill and lifted his fieldglasses. The Russian lines were a few miles ahead of him. They had a forward command post there. The runner had come from it.</p> <p>A squat robot with undulating arms passed by him, its arms weaving inquiringly. The robot went on its way, disappearing under some debris. Hendricks watched it go. He had never seen that type before. There were getting to be more and more types he had never seen, new varieties and sizes coming up from the underground factories.</p> <p>Hendricks put out his cigarette and hurried on. It was interesting, the use of artificial forms in warfare. How had they got started? Necessity. The Soviet Union had gained great initial success, usual with the side that got the war going. Most of North America had been blasted off the map. Retaliation was quick in coming, of course. The sky was full of circling disc-bombers long before the war began; they had been up there for years. The discs began sailing down all over Russia within hours after Washington got it.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">But that hadn’t helped Washington.</p> <p>The American bloc governments moved to the Moon Base the first year. There was not much else to do. Europe was gone; a slag heap with dark weeds growing from the ashes and bones. Most of North America was useless; nothing could be planted, no one could live. A few million people kept going up in Canada and down in South America. But during the second year Soviet parachutists began to drop, a few at first, then more and more. They wore the first really effective anti-radiation equipment; what was left of American production moved to <a class="pagenum" id="page109" title="109"> </a>the moon along with the governments.</p> <p>All but the troops. The remaining troops stayed behind as best they could, a few thousand here, a platoon there. No one knew exactly where they were; they stayed where they could, moving around at night, hiding in ruins, in sewers, cellars, with the rats and snakes. It looked as if the Soviet Union had the war almost won. Except for a handful of projectiles fired off from the moon daily, there was almost no weapon in use against them. They came and went as they pleased. The war, for all practical purposes, was over. Nothing effective opposed them.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">And then the first claws appeared. And overnight the complexion of the war changed.</p> <p>The claws were awkward, at first. Slow. The Ivans knocked them off almost as fast as they crawled out of their underground tunnels. But then they got better, faster and more cunning. Factories, all on Terra, turned them out. Factories a long way under ground, behind the Soviet lines, factories that had once made atomic projectiles, now almost forgotten.</p> <p>The claws got faster, and they got bigger. New types appeared, some with feelers, some that flew. There were a few jumping kinds.</p> <p>The best technicians on the moon were working on designs, making them more and more intricate, more flexible. They became uncanny; the Ivans were having a lot of trouble with them. Some of the little claws were learning to hide themselves, burrowing down into the ash, lying in wait.</p> <p>And then they started getting into the Russian bunkers, slipping down when the lids were raised for air and a look around. One claw inside a bunker, a churning sphere of blades and metal—that was enough. And when one got in others followed. With a weapon like that the war couldn’t go on much longer.</p> <p>Maybe it was already over.</p> <p>Maybe he was going to hear the news. Maybe the Politburo had decided to throw in the sponge. Too bad it had taken so long. Six years. A long time for war like that, the way they had waged it. The automatic retaliation discs, spinning down all over Russia, hundreds of thousands of them. Bacteria crystals. The Soviet guided missiles, whistling through the air. The chain bombs. And now this, the robots, the claws—</p> <p>The claws weren’t like other weapons. They were <em>alive</em>, from any practical standpoint, whether the Governments wanted to admit it or not. They were not machines. They were living <a class="pagenum" id="page110" title="110"> </a>things, spinning, creeping, shaking themselves up suddenly from the gray ash and darting toward a man, climbing up him, rushing for his throat. And that was what they had been designed to do. Their job.</p> <p>They did their job well. Especially lately, with the new designs coming up. Now they repaired themselves. They were on their own. Radiation tabs protected the UN troops, but if a man lost his tab he was fair game for the claws, no matter what his uniform. Down below the surface automatic machinery stamped them out. Human beings stayed a long way off. It was too risky; nobody wanted to be around them. They were left to themselves. And they seemed to be doing all right. The new designs were faster, more complex. More efficient.</p> <p>Apparently they had won the war.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak"><NAME> lit a second cigarette. The landscape depressed him. Nothing but ash and ruins. He seemed to be alone, the only living thing in the whole world. To the right the ruins of a town rose up, a few walls and heaps of debris. He tossed the dead match away, increasing his pace. Suddenly he stopped, jerking up his gun, his body tense. For a minute it looked like—</p> <p>From behind the shell of a ruined building a figure came, walking slowly toward him, walking hesitantly.</p> <p>Hendricks blinked. “Stop!”</p> <p>The boy stopped. Hendricks lowered his gun. The boy stood silently, looking at him. He was small, not very old. Perhaps eight. But it was hard to tell. Most of the kids who remained were stunted. He wore a faded blue sweater, ragged with dirt, and short pants. His hair was long and matted. Brown hair. It hung over his face and around his ears. He held something in his arms.</p> <p>“What’s that you have?” Hendricks said sharply.</p> <p>The boy held it out. It was a toy, a bear. A teddy bear. The boy’s eyes were large, but without expression.</p> <p>Hendricks relaxed. “I don’t want it. Keep it.”</p> <p>The boy hugged the bear again.</p> <p>“Where do you live?” Hendricks said.</p> <p>“In there.”</p> <p>“The ruins?”</p> <p>“Yes.”</p> <p>“Underground?”</p> <p>“Yes.”</p> <p>“How many are there?”</p> <p>“How—how many?”</p> <p>“How many of you. How big’s your settlement?”</p> <p>The boy did not answer.</p> <p><a class="pagenum" id="page111" title="111"> </a>Hendricks frowned. “You’re not all by yourself, are you?”</p> <p>The boy nodded.</p> <p>“How do you stay alive?”</p> <p>“There’s food.”</p> <p>“What kind of food?”</p> <p>“Different.”</p> <p>Hendricks studied him. “How old are you?”</p> <p>“Thirteen.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">It wasn’t possible. Or was it? The boy was thin, stunted. And probably sterile. Radiation exposure, years straight. No wonder he was so small. His arms and legs were like pipecleaners, knobby, and thin. Hendricks touched the boy’s arm. His skin was dry and rough; radiation skin. He bent down, looking into the boy’s face. There was no expression. Big eyes, big and dark.</p> <p>“Are you blind?” Hendricks said.</p> <p>“No. I can see some.”</p> <p>“How do you get away from the claws?”</p> <p>“The claws?”</p> <p>“The round things. That run and burrow.”</p> <p>“I don’t understand.”</p> <p>Maybe there weren’t any claws around. A lot of areas were free. They collected mostly around bunkers, where there were people. The claws had been designed to sense warmth, warmth of living things.</p> <p>“You’re lucky.” Hendricks straightened up. “Well? Which way are you going? Back—back there?”</p> <p>“Can I come with you?”</p> <p>“With <em>me</em>?” Hendricks folded his arms. “I’m going a long way. Miles. I have to hurry.” He looked at his watch. “I have to get there by nightfall.”</p> <p>“I want to come.”</p> <p>Hendricks fumbled in his pack. “It isn’t worth it. Here.” He tossed down the food cans he had with him. “You take these and go back. Okay?”</p> <p>The boy said nothing.</p> <p>“I’ll be coming back this way. In a day or so. If you’re around here when I come back you can come along with me. All right?”</p> <p>“I want to go with you now.”</p> <p>“It’s a long walk.”</p> <p>“I can walk.”</p> <p>Hendricks shifted uneasily. It made too good a target, two people walking along. And the boy would slow him down. But he might not come back this way. And if the boy were really all alone—</p> <p>“Okay. Come along.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">The boy fell in beside him. Hendricks strode along. The boy walked silently, clutching his teddy bear.</p> <p>“What’s your name?” Hendricks said, after a time.</p> <p>“<NAME>.”</p> <p><a class="pagenum" id="page112" title="112"> </a>“David? What—what happened to your mother and father?”</p> <p>“They died.”</p> <p>“How?”</p> <p>“In the blast.”</p> <p>“How long ago?”</p> <p>“Six years.”</p> <p>Hendricks slowed down. “You’ve been alone six years?”</p> <p>“No. There were other people for awhile. They went away.”</p> <p>“And you’ve been alone since?”</p> <p>“Yes.”</p> <p>Hendricks glanced down. The boy was strange, saying very little. Withdrawn. But that was the way they were, the children who had survived. Quiet. Stoic. A strange kind of fatalism gripped them. Nothing came as a surprise. They accepted anything that came along. There was no longer any <em>normal</em>, any natural course of things, moral or physical, for them to expect. Custom, habit, all the determining forces of learning were gone; only brute experience remained.</p> <p>“Am I walking too fast?” Hendricks said.</p> <p>“No.”</p> <p>“How did you happen to see me?”</p> <p>“I was waiting.”</p> <p>“Waiting?” Hendricks was puzzled. “What were you waiting for?”</p> <p>“To catch things.”</p> <p>“What kind of things?”</p> <p>“Things to eat.”</p> <p>“Oh.” Hendricks set his lips grimly. A thirteen year old boy, living on rats and gophers and half-rotten canned food. Down in a hole under the ruins of a town. With radiation pools and claws, and Russian dive-mines up above, coasting around in the sky.</p> <p>“Where are we going?” David asked.</p> <p>“To the Russian lines.”</p> <p>“Russian?”</p> <p>“The enemy. The people who started the war. They dropped the first radiation bombs. They began all this.”</p> <p>The boy nodded. His face showed no expression.</p> <p>“I’m an American,” Hendricks said.</p> <p>There was no comment. On they went, the two of them, Hendricks walking a little ahead, David trailing behind him, hugging his dirty teddy bear against his chest.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">About four in the afternoon they stopped to eat. Hendricks built a fire in a hollow between some slabs of concrete. He cleared the weeds away and heaped up bits of wood. The Russians’ lines were not very far ahead. Around him was what had once been a long valley, acres of fruit trees and grapes. Nothing remained now but a few bleak <a class="pagenum" id="page113" title="113"> </a>stumps and the mountains that stretched across the horizon at the far end. And the clouds of rolling ash that blew and drifted with the wind, settling over the weeds and remains of buildings, walls here and there, once in awhile what had been a road.</p> <p>Hendricks made coffee and heated up some boiled mutton and bread. “Here.” He handed bread and mutton to David. David squatted by the edge of the fire, his knees knobby and white. He examined the food and then passed it back, shaking his head.</p> <p>“No.”</p> <p>“No? Don’t you want any?”</p> <p>“No.”</p> <p>Hendricks shrugged. Maybe the boy was a mutant, used to special food. It didn’t matter. When he was hungry he would find something to eat. The boy was strange. But there were many strange changes coming over the world. Life was not the same, anymore. It would never be the same again. The human race was going to have to realize that.</p> <p>“Suit yourself,” Hendricks said. He ate the bread and mutton by himself, washing it down with coffee. He ate slowly, finding the food hard to digest. When he was done he got to his feet and stamped the fire out.</p> <p>David rose slowly, watching him with his young-old eyes.</p> <p>“We’re going,” Hendricks said.</p> <p>“All right.”</p> <p>Hendricks walked along, his gun in his arms. They were close; he was tense, ready for anything. The Russians should be expecting a runner, an answer to their own runner, but they were tricky. There was always the possibility of a slipup. He scanned the landscape around him. Nothing but slag and ash, a few hills, charred trees. Concrete walls. But someplace ahead was the first bunker of the Russian lines, the forward command. Underground, buried deep, with only a periscope showing, a few gun muzzles. Maybe an antenna.</p> <p>“Will we be there soon?” David asked.</p> <p>“Yes. Getting tired?”</p> <p>“No.”</p> <p>“Why, then?”</p> <p>David did not answer. He plodded carefully along behind, picking his way over the ash. His legs and shoes were gray with dust. His pinched face was streaked, lines of gray ash in riverlets down the pale white of his skin. There was no color to his face. Typical of the new children, growing up in cellars and sewers and underground shelters.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Hendricks slowed down. He lifted his fieldglasses and studied <a class="pagenum" id="page114" title="114"> </a>the ground ahead of him. Were they there, someplace, waiting for him? Watching him, the way his men had watched the Russian runner? A chill went up his back. Maybe they were getting their guns ready, preparing to fire, the way his men had prepared, made ready to kill.</p> <p>Hendricks stopped, wiping perspiration from his face. “Damn.” It made him uneasy. But he should be expected. The situation was different.</p> <p>He strode over the ash, holding his gun tightly with both hands. Behind him came David. Hendricks peered around, tight-lipped. Any second it might happen. A burst of white light, a blast, carefully aimed from inside a deep concrete bunker.</p> <p>He raised his arm and waved it around in a circle.</p> <p>Nothing moved. To the right a long ridge ran, topped with dead tree trunks. A few wild vines had grown up around the trees, remains of arbors. And the eternal dark weeds. Hendricks studied the ridge. Was anything up there? Perfect place for a lookout. He approached the ridge warily, David coming silently behind. If it were his command he’d have a sentry up there, watching for troops trying to infiltrate into the command area. Of course, if it were his command there would be the claws around the area for full protection.</p> <p>He stopped, feet apart, hands on his hips.</p> <p>“Are we there?” David said.</p> <p>“Almost.”</p> <p>“Why have we stopped?”</p> <p>“I don’t want to take any chances.” Hendricks advanced slowly. Now the ridge lay directly beside him, along his right. Overlooking him. His uneasy feeling increased. If an Ivan were up there he wouldn’t have a chance. He waved his arm again. They should be expecting someone in the UN uniform, in response to the note capsule. Unless the whole thing was a trap.</p> <p>“Keep up with me.” He turned toward David. “Don’t drop behind.”</p> <p>“With you?”</p> <p>“Up beside me! We’re close. We can’t take any chances. Come on.”</p> <p>“I’ll be all right.” David remained behind him, in the rear, a few paces away, still clutching his teddy bear.</p> <p>“Have it your way.” Hendricks raised his glasses again, suddenly tense. For a moment—had something moved? He scanned the ridge carefully. Everything was silent. Dead. No life up there, only tree trunks and ash. Maybe a few rats. The big black rats that had survived the claws. Mutants—built their own shelters out of saliva and ash. Some <a class="pagenum" id="page115" title="115"> </a>kind of plaster. Adaptation. He started forward again.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">A tall figure came out on the ridge above him, cloak flapping. Gray-green. A Russian. Behind him a second soldier appeared, another Russian. Both lifted their guns, aiming.</p> <p>Hendricks froze. He opened his mouth. The soldiers were kneeling, sighting down the side of the slope. A third figure had joined them on the ridge top, a smaller figure in gray-green. A woman. She stood behind the other two.</p> <p>Hendricks found his voice. “Stop!” He waved up at them frantically. “I’m—”</p> <p>The two Russians fired. Behind Hendricks there was a faint <em>pop</em>. Waves of heat lapped against him, throwing him to the ground. Ash tore at his face, grinding into his eyes and nose. Choking, he pulled himself to his knees. It was all a trap. He was finished. He had come to be killed, like a steer. The soldiers and the woman were coming down the side of the ridge toward him, sliding down through the soft ash. Hendricks was numb. His head throbbed. Awkwardly, he got his rifle up and took aim. It weighed a thousand tons; he could hardly hold it. His nose and cheeks stung. The air was full of the blast smell, a bitter acrid stench.</p> <p>“Don’t fire,” the first Russian said, in heavily accented English.</p> <p>The three of them came up to him, surrounding him. “Put down your rifle, Yank,” the other said.</p> <p>Hendricks was dazed. Everything had happened so fast. He had been caught. And they had blasted the boy. He turned his head. David was gone. What remained of him was strewn across the ground.</p> <p>The three Russians studied him curiously. Hendricks sat, wiping blood from his nose, picking out bits of ash. He shook his head, trying to clear it. “Why did you do it?” he murmured thickly. “The boy.”</p> <p>“Why?” One of the soldiers helped him roughly to his feet. He turned Hendricks around. “Look.”</p> <p>Hendricks closed his eyes.</p> <p>“Look!” The two Russians pulled him forward. “See. Hurry up. There isn’t much time to spare, Yank!”</p> <p>Hendricks looked. And gasped.</p> <p>“See now? Now do you understand?”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">From the remains of David a metal wheel rolled. Relays, glinting metal. Parts, wiring. One of the Russians kicked at the heap of remains. Parts popped out, rolling away, wheels and <a class="pagenum" id="page116" title="116"> </a>springs and rods. A plastic section fell in, half charred. Hendricks bent shakily down. The front of the head had come off. He could make out the intricate brain, wires and relays, tiny tubes and switches, thousands of minute studs—</p> <p>“A robot,” the soldier holding his arm said. “We watched it tagging you.”</p> <p>“Tagging me?”</p> <p>“That’s their way. They tag along with you. Into the bunker. That’s how they get in.”</p> <p>Hendricks blinked, dazed. “But—”</p> <p>“Come on.” They led him toward the ridge. “We can’t stay here. It isn’t safe. There must be hundreds of them all around here.”</p> <p>The three of them pulled him up the side of the ridge, sliding and slipping on the ash. The woman reached the top and stood waiting for them.</p> <p>“The forward command,” Hendricks muttered. “I came to negotiate with the Soviet—”</p> <p>“There is no more forward command. <em>They</em> got in. We’ll explain.” They reached the top of the ridge. “We’re all that’s left. The three of us. The rest were down in the bunker.”</p> <p>“This way. Down this way.” The woman unscrewed a lid, a gray manhole cover set in the ground. “Get in.”</p> <p>Hendricks lowered himself. The two soldiers and the woman came behind him, following him down the ladder. The woman closed the lid after them, bolting it tightly into place.</p> <p>“Good thing we saw you,” one of the two soldiers grunted. “It had tagged you about as far as it was going to.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">“Give me one of your cigarettes,” the woman said. “I haven’t had an American cigarette for weeks.”</p> <p>Hendricks pushed the pack to her. She took a cigarette and passed the pack to the two soldiers. In the corner of the small room the lamp gleamed fitfully. The room was low-ceilinged, cramped. The four of them sat around a small wood table. A few dirty dishes were stacked to one side. Behind a ragged curtain a second room was partly visible. Hendricks saw the corner of a cot, some blankets, clothes hung on a hook.</p> <p>“We were here,” the soldier beside him said. He took off his helmet, pushing his blond hair back. “I’m Corporal <NAME>. Polish. Impressed in the Soviet Army two years ago.” He held out his hand.</p> <p>Hendricks hesitated and then shook. “<NAME>.”</p> <p>“<NAME>.” The other <a class="pagenum" id="page117" title="117"> </a>soldier shook with him, a small dark man with thinning hair. Epstein plucked nervously at his ear. “Austrian. Impressed God knows when. I don’t remember. The three of us were here, Rudi and I, with Tasso.” He indicated the woman. “That’s how we escaped. All the rest were down in the bunker.”</p> <p>“And—and <em>they</em> got in?”</p> <p>Epstein lit a cigarette. “First just one of them. The kind that tagged you. Then it let others in.”</p> <p>Hendricks became alert. “The <em>kind</em>? Are there more than one kind?”</p> <p>“The little boy. David. David holding his teddy bear. That’s Variety Three. The most effective.”</p> <p>“What are the other types?”</p> <p>Epstein reached into his coat. “Here.” He tossed a packet of photographs onto the table, tied with a string. “Look for yourself.”</p> <p>Hendricks untied the string.</p> <p>“You see,” <NAME> said, “that was why we wanted to talk terms. The Russians, I mean. We found out about a week ago. Found out that your claws were beginning to make up new designs on their own. New types of their own. Better types. Down in your underground factories behind our lines. You let them stamp themselves, repair themselves. Made them more and more intricate. It’s your fault this happened.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Hendricks examined the photos. They had been snapped hurriedly; they were blurred and indistinct. The first few showed—David. David walking along a road, by himself. David and another David. Three Davids. All exactly alike. Each with a ragged teddy bear.</p> <p>All pathetic.</p> <p>“Look at the others,” Tasso said.</p> <p>The next pictures, taken at a great distance, showed a towering wounded soldier sitting by the side of a path, his arm in a sling, the stump of one leg extended, a crude crutch on his lap. Then two wounded soldiers, both the same, standing side by side.</p> <p>“That’s Variety One. The Wounded Soldier.” Klaus reached out and took the pictures. “You see, the claws were designed to get to human beings. To find them. Each kind was better than the last. They got farther, closer, past most of our defenses, into our lines. But as long as they were merely <em>machines</em>, metal spheres with claws and horns, feelers, they could be picked off like any other object. They could be detected as lethal robots as soon as they <a class="pagenum" id="page118" title="118"> </a>were seen. Once we caught sight of them—”</p> <p>“Variety One subverted our whole north wing,” Rudi said. “It was a long time before anyone caught on. Then it was too late. They came in, wounded soldiers, knocking and begging to be let in. So we let them in. And as soon as they were in they took over. We were watching out for machines….”</p> <p>“At that time it was thought there was only the one type,” <NAME> said. “No one suspected there were other types. The pictures were flashed to us. When the runner was sent to you, we knew of just one type. Variety One. The big Wounded Soldier. We thought that was all.”</p> <p>“Your line fell to—”</p> <p>“To Variety Three. David and his bear. That worked even better.” Klaus smiled bitterly. “Soldiers are suckers for children. We brought them in and tried to feed them. We found out the hard way what they were after. At least, those who were in the bunker.”</p> <p>“The three of us were lucky,” Rudi said. “Klaus and I were—were visiting Tasso when it happened. This is her place.” He waved a big hand around. “This little cellar. We finished and climbed the ladder to start back. From the ridge we saw. There they were, all around the bunker. Fighting was still going on. David and his bear. Hundreds of them. Klaus took the pictures.”</p> <p>Klaus tied up the photographs again.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">“And it’s going on all along your line?” Hendricks said.</p> <p>“Yes.”</p> <p>“How about <em>our</em> lines?” Without thinking, he touched the tab on his arm. “Can they—”</p> <p>“They’re not bothered by your radiation tabs. It makes no difference to them, Russian, American, Pole, German. It’s all the same. They’re doing what they were designed to do. Carrying out the original idea. They track down life, wherever they find it.”</p> <p>“They go by warmth,” Klaus said. “That was the way you constructed them from the very start. Of course, those you designed were kept back by the radiation tabs you wear. Now they’ve got around that. These new varieties are lead-lined.”</p> <p>“What’s the other variety?” Hendricks asked. “The David type, the Wounded Soldier—what’s the other?”</p> <p>“We don’t know.” Klaus pointed up at the wall. On the wall were two metal plates, ragged at the edges. Hendricks got up and studied them. They were bent and dented.</p> <p>“The one on the left came off <a class="pagenum" id="page119" title="119"> </a>a Wounded Soldier,” Rudi said. “We got one of them. It was going along toward our old bunker. We got it from the ridge, the same way we got the David tagging you.”</p> <p>The plate was stamped: I-V. Hendricks touched the other plate. “And this came from the David type?”</p> <p>“Yes.” The plate was stamped: III-V.</p> <p>Klaus took a look at them, leaning over Hendricks’ broad shoulder. “You can see what we’re up against. There’s another type. Maybe it was abandoned. Maybe it didn’t work. But there must be a Second Variety. There’s One and Three.”</p> <p>“You were lucky,” Rudi said. “The David tagged you all the way here and never touched you. Probably thought you’d get it into a bunker, somewhere.”</p> <p>“One gets in and it’s all over,” Klaus said. “They move fast. One lets all the rest inside. They’re inflexible. Machines with one purpose. They were built for only one thing.” He rubbed sweat from his lip. “We saw.”</p> <p>They were silent.</p> <p>“Let me have another cigarette, Yank,” Tasso said. “They are good. I almost forgot how they were.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">It was night. The sky was black. No stars were visible through the rolling clouds of ash. Klaus lifted the lid cautiously so that Hendricks could look out.</p> <p>Rudi pointed into the darkness. “Over that way are the bunkers. Where we used to be. Not over half a mile from us. It was just chance Klaus and I were not there when it happened. Weakness. Saved by our lusts.”</p> <p>“All the rest must be dead,” Klaus said in a low voice. “It came quickly. This morning the Politburo reached their decision. They notified us—forward command. Our runner was sent out at once. We saw him start toward the direction of your lines. We covered him until he was out of sight.”</p> <p>“<NAME>. We both knew him. He disappeared about six o’clock. The sun had just come up. About noon Klaus and I had an hour relief. We crept off, away from the bunkers. No one was watching. We came here. There used to be a town here, a few houses, a street. This cellar was part of a big farmhouse. We knew Tasso would be here, hiding down in her little place. We had come here before. Others from the bunkers came here. Today happened to be our turn.”</p> <p>“So we were saved,” Klaus said. “Chance. It might have <a class="pagenum" id="page120" title="120"> </a>been others. We—we finished, and then we came up to the surface and started back along the ridge. That was when we saw them, the Davids. We understood right away. We had seen the photos of the First Variety, the Wounded Soldier. Our Commissar distributed them to us with an explanation. If we had gone another step they would have seen us. As it was we had to blast two Davids before we got back. There were hundreds of them, all around. Like ants. We took pictures and slipped back here, bolting the lid tight.”</p> <p>“They’re not so much when you catch them alone. We moved faster than they did. But they’re inexorable. Not like living things. They came right at us. And we blasted them.”</p> <p><NAME> rested against the edge of the lid, adjusting his eyes to the darkness. “Is it safe to have the lid up at all?”</p> <p>“If we’re careful. How else can you operate your transmitter?”</p> <p>Hendricks lifted the small belt transmitter slowly. He pressed it against his ear. The metal was cold and damp. He blew against the mike, raising up the short antenna. A faint hum sounded in his ear. “That’s true, I suppose.”</p> <p>But he still hesitated.</p> <p>“We’ll pull you under if anything happens,” Klaus said.</p> <p>“Thanks.” Hendricks waited a moment, resting the transmitter against his shoulder. “Interesting, isn’t it?”</p> <p>“What?”</p> <p>“This, the new types. The new varieties of claws. We’re completely at their mercy, aren’t we? By now they’ve probably gotten into the UN lines, too. It makes me wonder if we’re not seeing the beginning of a now species. <em>The</em> new species. Evolution. The race to come after man.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Rudi grunted. “There is no race after man.”</p> <p>“No? Why not? Maybe we’re seeing it now, the end of human beings, the beginning of the new society.”</p> <p>“They’re not a race. They’re mechanical killers. You made them to destroy. That’s all they can do. They’re machines with a job.”</p> <p>“So it seems now. But how about later on? After the war is over. Maybe, when there aren’t any humans to destroy, their real potentialities will begin to show.”</p> <p>“You talk as if they were alive!”</p> <p>“Aren’t they?”</p> <p>There was silence. “They’re machines,” Rudi said. “They <a class="pagenum" id="page121" title="121"> </a>look like people, but they’re machines.”</p> <p>“Use your transmitter, Major,” Klaus said. “We can’t stay up here forever.”</p> <p>Holding the transmitter tightly Hendricks called the code of the command bunker. He waited, listening. No response. Only silence. He checked the leads carefully. Everything was in place.</p> <p>“Scott!” he said into the mike. “Can you hear me?”</p> <p>Silence. He raised the gain up full and tried again. Only static.</p> <p>“I don’t get anything. They may hear me but they may not want to answer.”</p> <p>“Tell them it’s an emergency.”</p> <p>“They’ll think I’m being forced to call. Under your direction.” He tried again, outlining briefly what he had learned. But still the phone was silent, except for the faint static.</p> <p>“Radiation pools kill most transmission,” Klaus said, after awhile. “Maybe that’s it.”</p> <p>Hendricks shut the transmitter up. “No use. No answer. Radiation pools? Maybe. Or they hear me, but won’t answer. Frankly, that’s what I would do, if a runner tried to call from the Soviet lines. They have no reason to believe such a story. They may hear everything I say—”</p> <p>“Or maybe it’s too late.”</p> <p>Hendricks nodded.</p> <p>“We better get the lid down,” Rudi said nervously. “We don’t want to take unnecessary chances.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">They climbed slowly back down the tunnel. Klaus bolted the lid carefully into place. They descended into the kitchen. The air was heavy and close around them.</p> <p>“Could they work that fast?” Hendricks said. “I left the bunker this noon. Ten hours ago. How could they move so quickly?”</p> <p>“It doesn’t take them long. Not after the first one gets in. It goes wild. You know what the little claws can do. Even <em>one</em> of these is beyond belief. Razors, each finger. Maniacal.”</p> <p>“All right.” Hendricks moved away impatiently. He stood with his back to them.</p> <p>“What’s the matter?” Rudi said.</p> <p>“The Moon Base. God, if they’ve gotten there—”</p> <p>“The Moon Base?”</p> <p>Hendricks turned around. “They couldn’t have got to the Moon Base. How would they get there? It isn’t possible. I can’t believe it.”</p> <p>“What is this Moon Base? We’ve heard rumors, but nothing definite. What is the actual situation? You seem concerned.”</p> <p>“We’re supplied from the <a class="pagenum" id="page122" title="122"> </a>moon. The governments are there, under the lunar surface. All our people and industries. That’s what keeps us going. If they should find some way of getting off Terra, onto the moon—”</p> <p>“It only takes one of them. Once the first one gets in it admits the others. Hundreds of them, all alike. You should have seen them. Identical. Like ants.”</p> <p>“Perfect socialism,” Tasso said. “The ideal of the communist state. All citizens interchangeable.”</p> <p>Klaus grunted angrily. “That’s enough. Well? What next?”</p> <p>Hendricks paced back and forth, around the small room. The air was full of smells of food and perspiration. The others watched him. Presently Tasso pushed through the curtain, into the other room. “I’m going to take a nap.”</p> <p>The curtain closed behind her. Rudi and Klaus sat down at the table, still watching Hendricks.</p> <p>“It’s up to you,” Klaus said. “We don’t know your situation.”</p> <p>Hendricks nodded.</p> <p>“It’s a problem.” Rudi drank some coffee, filling his cup from a rusty pot. “We’re safe here for awhile, but we can’t stay here forever. Not enough food or supplies.”</p> <p>“But if we go outside—”</p> <p>“If we go outside they’ll get us. Or probably they’ll get us. We couldn’t go very far. How far is your command bunker, Major?”</p> <p>“Three or four miles.”</p> <p>“We might make it. The four of us. Four of us could watch all sides. They couldn’t slip up behind us and start tagging us. We have three rifles, three blast rifles. Tasso can have my pistol.” Rudi tapped his belt. “In the Soviet army we didn’t have shoes always, but we had guns. With all four of us armed one of us might get to your command bunker. Preferably you, Major.”</p> <p>“What if they’re already there?” Klaus said.</p> <p>Rudi shrugged. “Well, then we come back here.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Hendricks stopped pacing. “What do you think the chances are they’re already in the American lines?”</p> <p>“Hard to say. Fairly good. They’re organized. They know exactly what they’re doing. Once they start they go like a horde of locusts. They have to keep moving, and fast. It’s secrecy and speed they depend on. Surprise. They push their way in before anyone has any idea.”</p> <p>“I see,” Hendricks murmured.</p> <p>From the other room Tasso stirred. “Major?”</p> <p>Hendricks pushed the curtain back. “What?”</p> <div id="illo2" class="illo"> <a href="images/illo2.jpg"><img src="images/illo2-sm.jpg" width="373" height="551" alt="A womanly body, but it has a robotic head, hand and arm showing." /></a> </div> <p>Tasso looked up at him lazily <!-- <a class="pagenum" id="page123" title="123"> </a> original location of illo2--> <a class="pagenum" id="page124" title="124"> </a>from the cot. “Have you any more American cigarettes left?”</p> <p>Hendricks went into the room and sat down across from her, on a wood stool. He felt in his pockets. “No. All gone.”</p> <p>“Too bad.”</p> <p>“What nationality are you?” Hendricks asked after awhile.</p> <p>“Russian.”</p> <p>“How did you get here?”</p> <p>“Here?”</p> <p>“This used to be France. This was part of Normandy. Did you come with the Soviet army?”</p> <p>“Why?”</p> <p>“Just curious.” He studied her. She had taken off her coat, tossing it over the end of the cot. She was young, about twenty. Slim. Her long hair stretched out over the pillow. She was staring at him silently, her eyes dark and large.</p> <p>“What’s on your mind?” Tasso said.</p> <p>“Nothing. How old are you?”</p> <p>“Eighteen.” She continued to watch him, unblinking, her arms behind her head. She had on Russian army pants and shirt. Gray-green. Thick leather belt with counter and cartridges. Medicine kit.</p> <p>“You’re in the Soviet army?”</p> <p>“No.”</p> <p>“Where did you get the uniform?”</p> <p>She shrugged. “It was given to me,” she told him.</p> <p>“How—how old were you when you came here?”</p> <p>“Sixteen.”</p> <p>“That young?”</p> <p>Her eyes narrowed. “What do you mean?”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Hendricks rubbed his jaw. “Your life would have been a lot different if there had been no war. Sixteen. You came here at sixteen. To live this way.”</p> <p>“I had to survive.”</p> <p>“I’m not moralizing.”</p> <p>“Your life would have been different, too,” Tasso murmured. She reached down and unfastened one of her boots. She kicked the boot off, onto the floor. “Major, do you want to go in the other room? I’m sleepy.”</p> <p>“It’s going to be a problem, the four of us here. It’s going to be hard to live in these quarters. Are there just the two rooms?”</p> <p>“Yes.”</p> <p>“How big was the cellar originally? Was it larger than this? Are there other rooms filled up with debris? We might be able to open one of them.”</p> <p>“Perhaps. I really don’t know.” Tasso loosened her belt. She made herself comfortable on the cot, unbuttoning her shirt. “You’re sure you have no more cigarettes?”</p> <p>“I had only the one pack.”</p> <p>“Too bad. Maybe if we get back to your bunker we can find <a class="pagenum" id="page125" title="125"> </a>some.” The other boot fell. Tasso reached up for the light cord. “Good night.”</p> <p>“You’re going to sleep?”</p> <p>“That’s right.”</p> <p>The room plunged into darkness. Hendricks got up and made his way past the curtain, into the kitchen.</p> <p>And stopped, rigid.</p> <p>Rudi stood against the wall, his face white and gleaming. His mouth opened and closed but no sounds came. Klaus stood in front of him, the muzzle of his pistol in Rudi’s stomach. Neither of them moved. Klaus, his hand tight around his gun, his features set. Rudi, pale and silent, spread-eagled against the wall.</p> <p>“What—” Hendricks muttered, but Klaus cut him off.</p> <p>“Be quiet, Major. Come over here. Your gun. Get out your gun.”</p> <p>Hendricks drew his pistol. “What is it?”</p> <p>“Cover him.” Klaus motioned him forward. “Beside me. Hurry!”</p> <p>Rudi moved a little, lowering his arms. He turned to Hendricks, licking his lips. The whites of his eyes shone wildly. Sweat dripped from his forehead, down his cheeks. He fixed his gaze on Hendricks. “Major, he’s gone insane. Stop him.” Rudi’s voice was thin and hoarse, almost inaudible.</p> <p>“What’s going on?” Hendricks demanded.</p> <p>Without lowering his pistol Klaus answered. “Major, remember our discussion? The Three Varieties? We knew about One and Three. But we didn’t know about Two. At least, we didn’t know before.” Klaus’ fingers tightened around the gun butt. “We didn’t know before, but we know now.”</p> <p>He pressed the trigger. A burst of white heat rolled out of the gun, licking around Rudi.</p> <p>“Major, this is the Second Variety.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Tasso swept the curtain aside. “Klaus! What did you do?”</p> <p>Klaus turned from the charred form, gradually sinking down the wall onto the floor. “The Second Variety, Tasso. Now we know. We have all three types identified. The danger is less. I—”</p> <p>Tasso stared past him at the remains of Rudi, at the blackened, smouldering fragments and bits of cloth. “You killed him.”</p> <p>“Him? <em>It</em>, you mean. I was watching. I had a feeling, but I wasn’t sure. At least, I wasn’t sure before. But this evening I was certain.” Klaus rubbed his pistol butt nervously. “We’re lucky. Don’t you understand? Another hour and it might—”</p> <p>“You were <em>certain</em>?” Tasso <a class="pagenum" id="page126" title="126"> </a>pushed past him and bent down, over the steaming remains on the floor. Her face became hard. “Major, see for yourself. Bones. Flesh.”</p> <p>Hendricks bent down beside her. The remains were human remains. Seared flesh, charred bone fragments, part of a skull. Ligaments, viscera, blood. Blood forming a pool against the wall.</p> <p>“No wheels,” Tasso said calmly. She straightened up. “No wheels, no parts, no relays. Not a claw. Not the Second Variety.” She folded her arms. “You’re going to have to be able to explain this.”</p> <p>Klaus sat down at the table, all the color drained suddenly from his face. He put his head in his hands and rocked back and forth.</p> <p>“Snap out of it.” Tasso’s fingers closed over his shoulder. “Why did you do it? Why did you kill him?”</p> <p>“He was frightened,” Hendricks said. “All this, the whole thing, building up around us.”</p> <p>“Maybe.”</p> <p>“What, then? What do you think?”</p> <p>“I think he may have had a reason for killing Rudi. A good reason.”</p> <p>“What reason?”</p> <p>“Maybe Rudi learned something.”</p> <p>Hendricks studied her bleak face. “About what?” he asked.</p> <p>“About him. About Klaus.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Klaus looked up quickly. “You can see what she’s trying to say. She thinks I’m the Second Variety. Don’t you see, Major? Now she wants you to believe I killed him on purpose. That I’m—”</p> <p>“Why did you kill him, then?” Tasso said.</p> <p>“I told you.” Klaus shook his head wearily. “I thought he was a claw. I thought I knew.”</p> <p>“Why?”</p> <p>“I had been watching him. I was suspicious.”</p> <p>“Why?”</p> <p>“I thought I had seen something. Heard something. I thought I—” He stopped.</p> <p>“Go on.”</p> <p>“We were sitting at the table. Playing cards. You two were in the other room. It was silent. I thought I heard him—<em>whirr</em>.”</p> <p>There was silence.</p> <p>“Do you believe that?” Tasso said to Hendricks.</p> <p>“Yes. I believe what he says.”</p> <p>“I don’t. I think he killed Rudi for a good purpose.” Tasso touched the rifle, resting in the corner of the room. “Major—”</p> <p>“No.” Hendricks shook his head. “Let’s stop it right now. One is enough. We’re afraid, the way he was. If we kill him we’ll be doing what he did to Rudi.”</p> <p>Klaus looked gratefully up at <a class="pagenum" id="page127" title="127"> </a>him. “Thanks. I was afraid. You understand, don’t you? Now she’s afraid, the way I was. She wants to kill me.”</p> <p>“No more killing.” Hendricks moved toward the end of the ladder. “I’m going above and try the transmitter once more. If I can’t get them we’re moving back toward my lines tomorrow morning.”</p> <p>Klaus rose quickly. “I’ll come up with you and give you a hand.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">The night air was cold. The earth was cooling off. Klaus took a deep breath, filling his lungs. He and Hendricks stepped onto the ground, out of the tunnel. Klaus planted his feet wide apart, the rifle up, watching and listening. Hendricks crouched by the tunnel mouth, tuning the small transmitter.</p> <p>“Any luck?” Klaus asked presently.</p> <p>“Not yet.”</p> <p>“Keep trying. Tell them what happened.”</p> <p>Hendricks kept trying. Without success. Finally he lowered the antenna. “It’s useless. They can’t hear me. Or they hear me and won’t answer. Or—”</p> <p>“Or they don’t exist.”</p> <p>“I’ll try once more.” Hendricks raised the antenna. “Scott, can you hear me? Come in!”</p> <p>He listened. There was only static. Then, still very faintly—</p> <p>“This is Scott.”</p> <p>His fingers tightened. “Scott! Is it you?”</p> <p>“This is Scott.”</p> <p>Klaus squatted down. “Is it your command?”</p> <p>“Scott, listen. Do you understand? About them, the claws. Did you get my message? Did you hear me?”</p> <p>“Yes.” Faintly. Almost inaudible. He could hardly make out the word.</p> <p>“You got my message? Is everything all right at the bunker? None of them have got in?”</p> <p>“Everything is all right.”</p> <p>“Have they tried to get in?”</p> <p>The voice was weaker.</p> <p>“No.”</p> <p>Hendricks turned to Klaus. “They’re all right.”</p> <p>“Have they been attacked?”</p> <p>“No.” Hendricks pressed the phone tighter to his ear. “Scott, I can hardly hear you. Have you notified the Moon Base? Do they know? Are they alerted?”</p> <p>No answer.</p> <p>“Scott! Can you hear me?”</p> <p>Silence.</p> <p>Hendricks relaxed, sagging. “Faded out. Must be radiation pools.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Hendricks and Klaus looked at each other. Neither of them said anything. After a time Klaus said, “Did it sound like any of <a class="pagenum" id="page128" title="128"> </a>your men? Could you identify the voice?”</p> <p>“It was too faint.”</p> <p>“You couldn’t be certain?”</p> <p>“No.”</p> <p>“Then it could have been—”</p> <p>“I don’t know. Now I’m not sure. Let’s go back down and get the lid closed.”</p> <p>They climbed back down the ladder slowly, into the warm cellar. Klaus bolted the lid behind them. Tasso waited for them, her face expressionless.</p> <p>“Any luck?” she asked.</p> <p>Neither of them answered. “Well?” Klaus said at last. “What do you think, Major? Was it your officer, or was it one of <em>them</em>?”</p> <p>“I don’t know.”</p> <p>“Then we’re just where we were before.”</p> <p>Hendricks stared down at the floor, his jaw set. “We’ll have to go. To be sure.”</p> <p>“Anyhow, we have food here for only a few weeks. We’d have to go up after that, in any case.”</p> <p>“Apparently so.”</p> <p>“What’s wrong?” Tasso demanded. “Did you get across to your bunker? What’s the matter?”</p> <p>“It may have been one of my men,” Hendricks said slowly. “Or it may have been one of <em>them</em>. But we’ll never know standing here.” He examined his watch. “Let’s turn in and get some sleep. We want to be up early tomorrow.”</p> <p>“Early?”</p> <p>“Our best chance to get through the claws should be early in the morning,” Hendricks said.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">The morning was crisp and clear. <NAME> studied the countryside through his fieldglasses.</p> <p>“See anything?” Klaus said.</p> <p>“No.”</p> <p>“Can you make out our bunkers?”</p> <p>“Which way?”</p> <p>“Here.” Klaus took the glasses and adjusted them. “I know where to look.” He looked a long time, silently.</p> <p>Tasso came to the top of the tunnel and stepped up onto the ground. “Anything?”</p> <p>“No.” Klaus passed the glasses back to Hendricks. “They’re out of sight. Come on. Let’s not stay here.”</p> <p>The three of them made their way down the side of the ridge, sliding in the soft ash. Across a flat rock a lizard scuttled. They stopped instantly, rigid.</p> <p>“What was it?” Klaus muttered.</p> <p>“A lizard.”</p> <p>The lizard ran on, hurrying through the ash. It was exactly the same color as the ash.</p> <p>“Perfect adaptation,” Klaus <a class="pagenum" id="page129" title="129"> </a>said. “Proves we were right. Lysenko, I mean.”</p> <p>They reached the bottom of the ridge and stopped, standing close together, looking around them.</p> <p>“Let’s go.” Hendricks started off. “It’s a good long trip, on foot.”</p> <p>Klaus fell in beside him. Tasso walked behind, her pistol held alertly. “Major, I’ve been meaning to ask you something,” Klaus said. “How did you run across the David? The one that was tagging you.”</p> <p>“I met it along the way. In some ruins.”</p> <p>“What did it say?”</p> <p>“Not much. It said it was alone. By itself.”</p> <p>“You couldn’t tell it was a machine? It talked like a living person? You never suspected?”</p> <p>“It didn’t say much. I noticed nothing unusual.</p> <p>“It’s strange, machines so much like people that you can be fooled. Almost alive. I wonder where it’ll end.”</p> <p>“They’re doing what you Yanks designed them to do,” Tasso said. “You designed them to hunt out life and destroy. Human life. Wherever they find it.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Hendricks was watching Klaus intently. “Why did you ask me? What’s on your mind?”</p> <p>“Nothing,” Klaus answered.</p> <p>“Klaus thinks you’re the Second Variety,” Tasso said calmly, from behind them. “Now he’s got his eye on you.”</p> <p>Klaus flushed. “Why not? We sent a runner to the Yank lines and he comes back. Maybe he thought he’d find some good game here.”</p> <p>Hendricks laughed harshly. “I came from the UN bunkers. There were human beings all around me.”</p> <p>“Maybe you saw an opportunity to get into the Soviet lines. Maybe you saw your chance. Maybe you—”</p> <p>“The Soviet lines had already been taken over. Your lines had been invaded before I left my command bunker. Don’t forget that.”</p> <p>Tasso came up beside him. “That proves nothing at all, Major.”</p> <p>“Why not?”</p> <p>“There appears to be little communication between the varieties. Each is made in a different factory. They don’t seem to work together. You might have started for the Soviet lines without knowing anything about the work of the other varieties. Or even what the other varieties were like.”</p> <p>“How do you know so much about the claws?” Hendricks said.</p> <p>“I’ve seen them. I’ve observed <a class="pagenum" id="page130" title="130"> </a>them. I observed them take over the Soviet bunkers.”</p> <p>“You know quite a lot,” Klaus said. “Actually, you saw very little. Strange that you should have been such an acute observer.”</p> <p>Tasso laughed. “Do you suspect me, now?”</p> <p>“Forget it,” Hendricks said. They walked on in silence.</p> <p>“Are we going the whole way on foot?” Tasso said, after awhile. “I’m not used to walking.” She gazed around at the plain of ash, stretching out on all sides of them, as far as they could see. “How dreary.”</p> <p>“It’s like this all the way,” Klaus said.</p> <p>“In a way I wish you had been in your bunker when the attack came.”</p> <p>“Somebody else would have been with you, if not me,” Klaus muttered.</p> <p>Tasso laughed, putting her hands in her pockets. “I suppose so.”</p> <p>They walked on, keeping their eyes on the vast plain of silent ash around them.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">The sun was setting. Hendricks made his way forward slowly, waving Tasso and Klaus back. Klaus squatted down, resting his gun butt against the ground.</p> <p>Tasso found a concrete slab and sat down with a sigh. “It’s good to rest.”</p> <p>“Be quiet,” Klaus said sharply.</p> <p>Hendricks pushed up to the top of the rise ahead of them. The same rise the Russian runner had come up, the day before. Hendricks dropped down, stretching himself out, peering through his glasses at what lay beyond.</p> <p>Nothing was visible. Only ash and occasional trees. But there, not more than fifty yards ahead, was the entrance of the forward command bunker. The bunker from which he had come. Hendricks watched silently. No motion. No sign of life. Nothing stirred.</p> <p>Klaus slithered up beside him. “Where is it?”</p> <p>“Down there.” Hendricks passed him the glasses. Clouds of ash rolled across the evening sky. The world was darkening. They had a couple of hours of light left, at the most. Probably not that much.</p> <p>“I don’t see anything,” Klaus said.</p> <p>“That tree there. The stump. By the pile of bricks. The entrance is to the right of the bricks.”</p> <p>“I’ll have to take your word for it.”</p> <p>“You and Tasso cover me from here. You’ll be able to sight all the way to the bunker entrance.”</p> <p><a class="pagenum" id="page131" title="131"> </a>“You’re going down alone?”</p> <p>“With my wrist tab I’ll be safe. The ground around the bunker is a living field of claws. They collect down in the ash. Like crabs. Without tabs you wouldn’t have a chance.”</p> <p>“Maybe you’re right.”</p> <p>“I’ll walk slowly all the way. As soon as I know for certain—”</p> <p>“If they’re down inside the bunker you won’t be able to get back up here. They go fast. You don’t realize.”</p> <p>“What do you suggest?”</p> <p>Klaus considered. “I don’t know. Get them to come up to the surface. So you can see.”</p> <p>Hendricks brought his transmitter from his belt, raising the antenna. “Let’s get started.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Klaus signalled to Tasso. She crawled expertly up the side of the rise to where they were sitting.</p> <p>“He’s going down alone,” Klaus said. “We’ll cover him from here. As soon as you see him start back, fire past him at once. They come quick.”</p> <p>“You’re not very optimistic,” Tasso said.</p> <p>“No, I’m not.”</p> <p>Hendricks opened the breech of his gun, checking it carefully. “Maybe things are all right.”</p> <p>“You didn’t see them. Hundreds of them. All the same. Pouring out like ants.”</p> <p>“I should be able to find out without going down all the way.” Hendricks locked his gun, gripping it in one hand, the transmitter in the other. “Well, wish me luck.”</p> <p>Klaus put out his hand. “Don’t go down until you’re sure. Talk to them from up here. Make them show themselves.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Hendricks stood up. He stepped down the side of the rise.</p> <p>A moment later he was walking slowly toward the pile of bricks and debris beside the dead tree stump. Toward the entrance of the forward command bunker.</p> <p>Nothing stirred. He raised the transmitter, clicking it on. “Scott? Can you hear me?”</p> <p>Silence.</p> <p>“Scott! This is Hendricks. Can you hear me? I’m standing outside the bunker. You should be able to see me in the view sight.”</p> <p>He listened, the transmitter gripped tightly. No sound. Only static. He walked forward. A claw burrowed out of the ash and raced toward him. It halted a few feet away and then slunk off. A second claw appeared, one of the big ones with feelers. It moved toward him, studied him intently, and then fell in behind him, dogging respectfully after him, a few paces away. A moment later a second big claw joined it. Silently, the claws <a class="pagenum" id="page132" title="132"> </a>trailed him, as he walked slowly toward the bunker.</p> <p>Hendricks stopped, and behind him, the claws came to a halt. He was close, now. Almost to the bunker steps.</p> <p>“Scott! Can you hear me? I’m standing right above you. Outside. On the surface. Are you picking me up?”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">He waited, holding his gun against his side, the transmitter tightly to his ear. Time passed. He strained to hear, but there was only silence. Silence, and faint static.</p> <p>Then, distantly, metallically—</p> <p>“This is Scott.”</p> <p>The voice was neutral. Cold. He could not identify it. But the earphone was minute.</p> <p>“Scott! Listen. I’m standing right above you. I’m on the surface, looking down into the bunker entrance.”</p> <p>“Yes.”</p> <p>“Can you see me?”</p> <p>“Yes.”</p> <p>“Through the view sight? You have the sight trained on me?”</p> <p>“Yes.”</p> <p>Hendricks pondered. A circle of claws waited quietly around him, gray-metal bodies on all sides of him. “Is everything all right in the bunker? Nothing unusual has happened?”</p> <p>“Everything is all right.”</p> <p>“Will you come up to the surface? I want to see you for a moment.” Hendricks took a deep breath. “Come up here with me. I want to talk to you.”</p> <p>“Come down.”</p> <p>“I’m giving you an order.”</p> <p>Silence.</p> <p>“Are you coming?” Hendricks listened. There was no response. “I order you to come to the surface.”</p> <p>“Come down.”</p> <p>Hendricks set his jaw. “Let me talk to Leone.”</p> <p>There was a long pause. He listened to the static. Then a voice came, hard, thin, metallic. The same as the other. “This is Leone.”</p> <p>“Hendricks. I’m on the surface. At the bunker entrance. I want one of you to come up here.”</p> <p>“Come down.”</p> <p>“Why come down? I’m giving you an order!”</p> <p>Silence. Hendricks lowered the transmitter. He looked carefully around him. The entrance was just ahead. Almost at his feet. He lowered the antenna and fastened the transmitter to his belt. Carefully, he gripped his gun with both hands. He moved forward, a step at a time. If they could see him they knew he was starting toward the entrance. He closed his eyes a moment.</p> <p>Then he put his foot on the first step that led downward.</p> <p><a class="pagenum" id="page133" title="133"> </a>Two Davids came up at him, their faces identical and expressionless. He blasted them into particles. More came rushing silently up, a whole pack of them. All exactly the same.</p> <p>Hendricks turned and raced back, away from the bunker, back toward the rise.</p> <p>At the top of the rise Tasso and Klaus were firing down. The small claws were already streaking up toward them, shining metal spheres going fast, racing frantically through the ash. But he had no time to think about that. He knelt down, aiming at the bunker entrance, gun against his cheek. The Davids were coming out in groups, clutching their teddy bears, their thin knobby legs pumping as they ran up the steps to the surface. Hendricks fired into the main body of them. They burst apart, wheels and springs flying in all directions. He fired again through the mist of particles.</p> <p>A giant lumbering figure rose up in the bunker entrance, tall and swaying. Hendricks paused, amazed. A man, a soldier. With one leg, supporting himself with a crutch.</p> <p>“Major!” Tasso’s voice came. More firing. The huge figure moved forward, Davids swarming around it. Hendricks broke out of his freeze. The First Variety. The Wounded Soldier.</p> <p>He aimed and fired. The soldier burst into bits, parts and relays flying. Now many Davids were out on the flat ground, away from the bunker. He fired again and again, moving slowly back, half-crouching and aiming.</p> <p>From the rise, Klaus fired down. The side of the rise was alive with claws making their way up. Hendricks retreated toward the rise, running and crouching. Tasso had left Klaus and was circling slowly to the right, moving away from the rise.</p> <p>A David slipped up toward him, its small white face expressionless, brown hair hanging down in its eyes. It bent over suddenly, opening its arms. Its teddy bear hurtled down and leaped across the ground, bounding toward him. Hendricks fired. The bear and the David both dissolved. He grinned, blinking. It was like a dream.</p> <p>“Up here!” Tasso’s voice. Hendricks made his way toward her. She was over by some columns of concrete, walls of a ruined building. She was firing past him, with the hand pistol Klaus had given her.</p> <p>“Thanks.” He joined her, grasping for breath. She pulled him back, behind the concrete, fumbling at her belt.</p> <p>“Close your eyes!” She unfastened a globe from her waist. <a class="pagenum" id="page134" title="134"> </a>Rapidly, she unscrewed the cap, locking it into place. “Close your eyes and get down.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">She threw the bomb. It sailed in an arc, an expert, rolling and bouncing to the entrance of the bunker. Two Wounded Soldiers stood uncertainly by the brick pile. More Davids poured from behind them, out onto the plain. One of the Wounded Soldiers moved toward the bomb, stooping awkwardly down to pick it up.</p> <p>The bomb went off. The concussion whirled Hendricks around, throwing him on his face. A hot wind rolled over him. Dimly he saw Tasso standing behind the columns, firing slowly and methodically at the Davids coming out of the raging clouds of white fire.</p> <p>Back along the rise Klaus struggled with a ring of claws circling around him. He retreated, blasting at them and moving back, trying to break through the ring.</p> <p>Hendricks struggled to his feet. His head ached. He could hardly see. Everything was licking at him, raging and whirling. His right arm would not move.</p> <p>Tasso pulled back toward him. “Come on. Let’s go.”</p> <p>“Klaus—He’s still up there.”</p> <p>“Come on!” Tasso dragged Hendricks back, away from the columns. Hendricks shook his head, trying to clear it. Tasso led him rapidly away, her eyes intense and bright, watching for claws that had escaped the blast.</p> <p>One David came out of the rolling clouds of flame. Tasso blasted it. No more appeared.</p> <p>“But Klaus. What about him?” Hendricks stopped, standing unsteadily. “He—”</p> <p>“Come on!”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">They retreated, moving farther and farther away from the bunker. A few small claws followed them for a little while and then gave up, turning back and going off.</p> <p>At last Tasso stopped. “We can stop here and get our breaths.”</p> <p>Hendricks sat down on some heaps of debris. He wiped his neck, gasping. “We left Klaus back there.”</p> <p>Tasso said nothing. She opened her gun, sliding a fresh round of blast cartridges into place.</p> <p>Hendricks stared at her, dazed. “You left him back there on purpose.”</p> <p>Tasso snapped the gun together. She studied the heaps of rubble around them, her face expressionless. As if she were watching for something.</p> <p>“What is it?” Hendricks demanded. “What are you looking for? Is something coming?” He <a class="pagenum" id="page135" title="135"> </a>shook his head, trying to understand. What was she doing? What was she waiting for? He could see nothing. Ash lay all around them, ash and ruins. Occasional stark tree trunks, without leaves or branches. “What—”</p> <p>Tasso cut him off. “Be still.” Her eyes narrowed. Suddenly her gun came up. Hendricks turned, following her gaze.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Back the way they had come a figure appeared. The figure walked unsteadily toward them. Its clothes were torn. It limped as it made its way along, going very slowly and carefully. Stopping now and then, resting and getting its strength. Once it almost fell. It stood for a moment, trying to steady itself. Then it came on.</p> <p>Klaus.</p> <p>Hendricks stood up. “Klaus!” He started toward him. “How the hell did you—”</p> <p>Tasso fired. Hendricks swung back. She fired again, the blast passing him, a searing line of heat. The beam caught Klaus in the chest. He exploded, gears and wheels flying. For a moment he continued to walk. Then he swayed back and forth. He crashed to the ground, his arms flung out. A few more wheels rolled away.</p> <p>Silence.</p> <p>Tasso turned to Hendricks. “Now you understand why he killed Rudi.”</p> <p>Hendricks sat down again slowly. He shook his head. He was numb. He could not think.</p> <p>“Do you see?” Tasso said. “Do you understand?”</p> <p>Hendricks said nothing. Everything was slipping away from him, faster and faster. Darkness, rolling and plucking at him.</p> <p>He closed his eyes.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Hendricks opened his eyes slowly. His body ached all over. He tried to sit up but needles of pain shot through his arm and shoulder. He gasped.</p> <p>“Don’t try to get up,” Tasso said. She bent down, putting her cold hand against his forehead.</p> <p>It was night. A few stars glinted above, shining through the drifting clouds of ash. Hendricks lay back, his teeth locked. Tasso watched him impassively. She had built a fire with some wood and weeds. The fire licked feebly, hissing at a metal cup suspended over it. Everything was silent. Unmoving darkness, beyond the fire.</p> <p>“So he was the Second Variety,” Hendricks murmured.</p> <p>“I had always thought so.”</p> <p>“Why didn’t you destroy him <a class="pagenum" id="page136" title="136"> </a>sooner?” he wanted to know.</p> <p>“You held me back.” Tasso crossed to the fire to look into the metal cup. “Coffee. It’ll be ready to drink in awhile.”</p> <p>She came back and sat down beside him. Presently she opened her pistol and began to disassemble the firing mechanism, studying it intently.</p> <p>“This is a beautiful gun,” Tasso said, half-aloud. “The construction is superb.”</p> <p>“What about them? The claws.”</p> <p>“The concussion from the bomb put most of them out of action. They’re delicate. Highly organized, I suppose.”</p> <p>“The Davids, too?”</p> <p>“Yes.”</p> <p>“How did you happen to have a bomb like that?”</p> <p>Tasso shrugged. “We designed it. You shouldn’t underestimate our technology, Major. Without such a bomb you and I would no longer exist.”</p> <p>“Very useful.”</p> <p>Tasso stretched out her legs, warming her feet in the heat of the fire. “It surprised me that you did not seem to understand, after he killed Rudi. Why did you think he—”</p> <p>“I told you. I thought he was afraid.”</p> <p>“Really? You know, Major, for a little while I suspected you. Because you wouldn’t let me kill him. I thought you might be protecting him.” She laughed.</p> <p>“Are we safe here?” Hendricks asked presently.</p> <p>“For awhile. Until they get reinforcements from some other area.” Tasso began to clean the interior of the gun with a bit of rag. She finished and pushed the mechanism back into place. She closed the gun, running her finger along the barrel.</p> <p>“We were lucky,” Hendricks murmured.</p> <p>“Yes. Very lucky.”</p> <p>“Thanks for pulling me away.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Tasso did not answer. She glanced up at him, her eyes bright in the fire light. Hendricks examined his arm. He could not move his fingers. His whole side seemed numb. Down inside him was a dull steady ache.</p> <p>“How do you feel?” Tasso asked.</p> <p>“My arm is damaged.”</p> <p>“Anything else?”</p> <p>“Internal injuries.”</p> <p>“You didn’t get down when the bomb went off.”</p> <p>Hendricks said nothing. He watched Tasso pour the coffee from the cup into a flat metal pan. She brought it over to him.</p> <p>“Thanks.” He struggled up enough to drink. It was hard to swallow. His insides turned over and he pushed the pan away. <a class="pagenum" id="page137" title="137"> </a>“That’s all I can drink now.”</p> <p>Tasso drank the rest. Time passed. The clouds of ash moved across the dark sky above them. Hendricks rested, his mind blank. After awhile he became aware that Tasso was standing over him, gazing down at him.</p> <p>“What is it?” he murmured.</p> <p>“Do you feel any better?”</p> <p>“Some.”</p> <p>“You know, Major, if I hadn’t dragged you away they would have got you. You would be dead. Like Rudi.”</p> <p>“I know.”</p> <p>“Do you want to know why I brought you out? I could have left you. I could have left you there.”</p> <p>“Why did you bring me out?”</p> <p>“Because we have to get away from here.” Tasso stirred the fire with a stick, peering calmly down into it. “No human being can live here. When their reinforcements come we won’t have a chance. I’ve pondered about it while you were unconscious. We have perhaps three hours before they come.”</p> <p>“And you expect me to get us away?”</p> <p>“That’s right. I expect you to get us out of here.”</p> <p>“Why me?”</p> <p>“Because I don’t know any way.” Her eyes shone at him in the half-light, bright and steady. “If you can’t get us out of here they’ll kill us within three hours. I see nothing else ahead. Well, Major? What are you going to do? I’ve been waiting all night. While you were unconscious I sat here, waiting and listening. It’s almost dawn. The night is almost over.”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Hendricks considered. “It’s curious,” he said at last.</p> <p>“Curious?”</p> <p>“That you should think I can get us out of here. I wonder what you think I can do.”</p> <p>“Can you get us to the Moon Base?”</p> <p>“The Moon Base? How?”</p> <p>“There must be some way.”</p> <p>Hendricks shook his head. “No. There’s no way that I know of.”</p> <p>Tasso said nothing. For a moment her steady gaze wavered. She ducked her head, turning abruptly away. She scrambled to her feet. “More coffee?”</p> <p>“No.”</p> <p>“Suit yourself.” Tasso drank silently. He could not see her face. He lay back against the ground, deep in thought, trying to concentrate. It was hard to think. His head still hurt. And the numbing daze still hung over him.</p> <p>“There might be one way,” he said suddenly.</p> <p>“Oh?”</p> <p>“How soon is dawn?”</p> <p><a class="pagenum" id="page138" title="138"> </a>“Two hours. The sun will be coming up shortly.”</p> <p>“There’s supposed to be a ship near here. I’ve never seen it. But I know it exists.”</p> <p>“What kind of a ship?” Her voice was sharp.</p> <p>“A rocket cruiser.”</p> <p>“Will it take us off? To the Moon Base?”</p> <p>“It’s supposed to. In case of emergency.” He rubbed his forehead.</p> <p>“What’s wrong?”</p> <p>“My head. It’s hard to think. I can hardly—hardly concentrate. The bomb.”</p> <p>“Is the ship near here?” Tasso slid over beside him, settling down on her haunches. “How far is it? Where is it?”</p> <p>“I’m trying to think.”</p> <p>Her fingers dug into his arm. “Nearby?” Her voice was like iron. “Where would it be? Would they store it underground? Hidden underground?”</p> <p>“Yes. In a storage locker.”</p> <p>“How do we find it? Is it marked? Is there a code marker to identify it?”</p> <p>Hendricks concentrated. “No. No markings. No code symbol.”</p> <p>“What, then?”</p> <p>“A sign.”</p> <p>“What sort of sign?”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Hendricks did not answer. In the flickering light his eyes were glazed, two sightless orbs. Tasso’s fingers dug into his arm.</p> <p>“What sort of sign? What is it?”</p> <p>“I—I can’t think. Let me rest.”</p> <p>“All right.” She let go and stood up. Hendricks lay back against the ground, his eyes closed. Tasso walked away from him, her hands in her pockets. She kicked a rock out of her way and stood staring up at the sky. The night blackness was already beginning to fade into gray. Morning was coming.</p> <p>Tasso gripped her pistol and walked around the fire in a circle, back and forth. On the ground Major Hendricks lay, his eyes closed, unmoving. The grayness rose in the sky, higher and higher. The landscape became visible, fields of ash stretching out in all directions. Ash and ruins of buildings, a wall here and there, heaps of concrete, the naked trunk of a tree.</p> <p>The air was cold and sharp. Somewhere a long way off a bird made a few bleak sounds.</p> <p>Hendricks stirred. He opened his eyes. “Is it dawn? Already?”</p> <p>“Yes.”</p> <p>Hendricks sat up a little. “You wanted to know something. You were asking me.”</p> <p>“Do you remember now?”</p> <p>“Yes.”</p> <p>“What is it?” She tensed. “What?” she repeated sharply.</p> <p><a class="pagenum" id="page139" title="139"> </a>“A well. A ruined well. It’s in a storage locker under a well.”</p> <p>“A well.” Tasso relaxed. “Then we’ll find a well.” She looked at her watch. “We have about an hour, Major. Do you think we can find it in an hour?”</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">“Give me a hand up,” Hendricks said.</p> <p>Tasso put her pistol away and helped him to his feet. “This is going to be difficult.”</p> <p>“Yes it is.” Hendricks set his lips tightly. “I don’t think we’re going to go very far.”</p> <p>They began to walk. The early sun cast a little warmth down on them. The land was flat and barren, stretching out gray and lifeless as far as they could see. A few birds sailed silently, far above them, circling slowly.</p> <p>“See anything?” Hendricks said. “Any claws?”</p> <p>“No. Not yet.”</p> <p>They passed through some ruins, upright concrete and bricks. A cement foundation. Rats scuttled away. Tasso jumped back warily.</p> <p>“This used to be a town,” Hendricks said. “A village. Provincial village. This was all grape country, once. Where we are now.”</p> <p>They came onto a ruined street, weeds and cracks criss-crossing it. Over to the right a stone chimney stuck up.</p> <p>“Be careful,” he warned her.</p> <p>A pit yawned, an open basement. Ragged ends of pipes jutted up, twisted and bent. They passed part of a house, a bathtub turned on its side. A broken chair. A few spoons and bits of china dishes. In the center of the street the ground had sunk away. The depression was filled with weeds and debris and bones.</p> <p>“Over here,” Hendricks murmured.</p> <p>“This way?”</p> <p>“To the right.”</p> <p>They passed the remains of a heavy duty tank. Hendricks’ belt counter clicked ominously. The tank had been radiation blasted. A few feet from the tank a mummified body lay sprawled out, mouth open. Beyond the road was a flat field. Stones and weeds, and bits of broken glass.</p> <p>“There,” Hendricks said.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">A stone well jutted up, sagging and broken. A few boards lay across it. Most of the well had sunk into rubble. Hendricks walked unsteadily toward it, Tasso beside him.</p> <p>“Are you certain about this?” Tasso said. “This doesn’t look like anything.”</p> <p>“I’m sure.” Hendricks sat down at the edge of the well, his teeth locked. His breath came quickly. He wiped perspiration from his face. “This was <a class="pagenum" id="page140" title="140"> </a>arranged so the senior command officer could get away. If anything happened. If the bunker fell.”</p> <p>“That was you?”</p> <p>“Yes.”</p> <p>“Where is the ship? Is it here?”</p> <p>“We’re standing on it.” Hendricks ran his hands over the surface of the well stones. “The eye-lock responds to me, not to anybody else. It’s my ship. Or it was supposed to be.”</p> <p>There was a sharp click. Presently they heard a low grating sound from below them.</p> <p>“Step back,” Hendricks said. He and Tasso moved away from the well.</p> <p>A section of the ground slid back. A metal frame pushed slowly up through the ash, shoving bricks and weeds out of the way. The action ceased, as the ship nosed into view.</p> <p>“There it is,” Hendricks said.</p> <p>The ship was small. It rested quietly, suspended in its mesh frame, like a blunt needle. A rain of ash sifted down into the dark cavity from which the ship had been raised. Hendricks made his way over to it. He mounted the mesh and unscrewed the hatch, pulling it back. Inside the ship the control banks and the pressure seat were visible.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Tasso came and stood beside him, gazing into the ship. “I’m not accustomed to rocket piloting,” she said, after awhile.</p> <p>Hendricks glanced at her. “I’ll do the piloting.”</p> <p>“Will you? There’s only one seat, Major. I can see it’s built to carry only a single person.”</p> <p>Hendricks’ breathing changed. He studied the interior of the ship intently. Tasso was right. There was only one seat. The ship was built to carry only one person. “I see,” he said slowly. “And the one person is you.”</p> <p>She nodded.</p> <p>“Of course.”</p> <p>“Why?”</p> <p>“<em>You</em> can’t go. You might not live through the trip. You’re injured. You probably wouldn’t get there.”</p> <p>“An interesting point. But you see, I know where the Moon Base is. And you don’t. You might fly around for months and not find it. It’s well hidden. Without knowing what to look for—”</p> <p>“I’ll have to take my chances. Maybe I won’t find it. Not by myself. But I think you’ll give me all the information I need. Your life depends on it.”</p> <p>“How?”</p> <p>“If I find the Moon Base in time, perhaps I can get them to send a ship back to pick you up. <em>If</em> I find the Base in time. If not, then you haven’t a chance. I imagine there are supplies on the <a class="pagenum" id="page141" title="141"> </a>ship. They will last me long enough—”</p> <p>Hendricks moved quickly. But his injured arm betrayed him. Tasso ducked, sliding lithely aside. Her hand came up, lightning fast. Hendricks saw the gun butt coming. He tried to ward off the blow, but she was too fast. The metal butt struck against the side of his head, just above his ear. Numbing pain rushed through him. Pain and rolling clouds of blackness. He sank down, sliding to the ground.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">Dimly, he was aware that Tasso was standing over him, kicking him with her toe.</p> <p>“Major! Wake up.”</p> <p>He opened his eyes, groaning.</p> <p>“Listen to me.” She bent down, the gun pointed at his face. “I have to hurry. There isn’t much time left. The ship is ready to go, but you must tell me the information I need before I leave.”</p> <p>Hendricks shook his head, trying to clear it.</p> <p>“Hurry up! Where is the Moon Base? How do I find it? What do I look for?”</p> <p>Hendricks said nothing.</p> <p>“Answer me!”</p> <p>“Sorry.”</p> <p>“Major, the ship is loaded with provisions. I can coast for weeks. I’ll find the Base eventually. And in a half hour you’ll be dead. Your only chance of survival—” She broke off.</p> <p>Along the slope, by some crumbling ruins, something moved. Something in the ash. Tasso turned quickly, aiming. She fired. A puff of flame leaped. Something scuttled away, rolling across the ash. She fired again. The claw burst apart, wheels flying.</p> <p>“See?” Tasso said. “A scout. It won’t be long.”</p> <p>“You’ll bring them back here to get me?”</p> <p>“Yes. As soon as possible.”</p> <p>Hendricks looked up at her. He studied her intently. “You’re telling the truth?” A strange expression had come over his face, an avid hunger. “You will come back for me? You’ll get me to the Moon Base?”</p> <p>“I’ll get you to the Moon Base. But tell me where it is! There’s only a little time left.”</p> <p>“All right.” Hendricks picked up a piece of rock, pulling himself to a sitting position. “Watch.”</p> <p>Hendricks began to scratch in the ash. Tasso stood by him, watching the motion of the rock. Hendricks was sketching a crude lunar map.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">“This is the Appenine range. Here is the Crater of Archimedes. The Moon Base is beyond the end of the Appenine, about two hundred miles. I don’t know <a class="pagenum" id="page142" title="142"> </a>exactly where. No one on Terra knows. But when you’re over the Appenine, signal with one red flare and a green flare, followed by two red flares in quick succession. The Base monitor will record your signal. The Base is under the surface, of course. They’ll guide you down with magnetic grapples.”</p> <p>“And the controls? Can I operate them?”</p> <p>“The controls are virtually automatic. All you have to do is give the right signal at the right time.”</p> <p>“I will.”</p> <p>“The seat absorbs most of the take-off shock. Air and temperature are automatically controlled. The ship will leave Terra and pass out into free space. It’ll line itself up with the moon, falling into an orbit around it, about a hundred miles above the surface. The orbit will carry you over the Base. When you’re in the region of the Appenine, release the signal rockets.”</p> <p>Tasso slid into the ship and lowered herself into the pressure seat. The arm locks folded automatically around her. She fingered the controls. “Too bad you’re not going, Major. All this put here for you, and you can’t make the trip.”</p> <p>“Leave me the pistol.”</p> <p>Tasso pulled the pistol from her belt. She held it in her hand, weighing it thoughtfully. “Don’t go too far from this location. It’ll be hard to find you, as it is.”</p> <p>“No. I’ll stay here by the well.”</p> <p>Tasso gripped the take-off switch, running her fingers over the smooth metal. “A beautiful ship, Major. Well built. I admire your workmanship. You people have always done good work. You build fine things. Your work, your creations, are your greatest achievement.”</p> <p>“Give me the pistol,” Hendricks said impatiently, holding out his hand. He struggled to his feet.</p> <p>“Good-bye, Major.” Tasso tossed the pistol past Hendricks. The pistol clattered against the ground, bouncing and rolling away. Hendricks hurried after it. He bent down, snatching it up.</p> <p>The hatch of the ship clanged shut. The bolts fell into place. Hendricks made his way back. The inner door was being sealed. He raised the pistol unsteadily.</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">There was a shattering roar. The ship burst up from its metal cage, fusing the mesh behind it. Hendricks cringed, pulling back. The ship shot up into the rolling clouds of ash, disappearing into the sky.</p> <p>Hendricks stood watching a long time, until even the streamer had dissipated. Nothing stirred. The morning air was <a class="pagenum" id="page143" title="143"> </a>chill and silent. He began to walk aimlessly back the way they had come. Better to keep moving around. It would be a long time before help came—if it came at all.</p> <p>He searched his pockets until he found a package of cigarettes. He lit one grimly. They had all wanted cigarettes from him. But cigarettes were scarce.</p> <p>A lizard slithered by him, through the ash. He halted, rigid. The lizard disappeared. Above, the sun rose higher in the sky. Some flies landed on a flat rock to one side of him. Hendricks kicked at them with his foot.</p> <p>It was getting hot. Sweat trickled down his face, into his collar. His mouth was dry.</p> <p>Presently he stopped walking and sat down on some debris. He unfastened his medicine kit and swallowed a few narcotic capsules. He looked around him. Where was he?</p> <p>Something lay ahead. Stretched out on the ground. Silent and unmoving.</p> <p>Hendricks drew his gun quickly. It looked like a man. Then he remembered. It was the remains of Klaus. The Second Variety. Where Tasso had blasted him. He could see wheels and relays and metal parts, strewn around on the ash. Glittering and sparkling in the sunlight.</p> <p>Hendricks got to his feet and walked over. He nudged the inert form with his foot, turning it over a little. He could see the metal hull, the aluminum ribs and struts. More wiring fell out. Like viscera. Heaps of wiring, switches and relays. Endless motors and rods.</p> <p>He bent down. The brain cage had been smashed by the fall. The artificial brain was visible. He gazed at it. A maze of circuits. Miniature tubes. Wires as fine as hair. He touched the brain cage. It swung aside. The type plate was visible. Hendricks studied the plate.</p> <p>And blanched.</p> <p>IV—IV.</p> <p>For a long time he stared at the plate. Fourth Variety. Not the Second. They had been wrong. There were more types. Not just three. Many more, perhaps. At least four. And Klaus wasn’t the Second Variety.</p> <p>But if Klaus wasn’t the Second Variety—</p> <p>Suddenly he tensed. Something was coming, walking through the ash beyond the hill. What was it? He strained to see. Figures. Figures coming slowly along, making their way through the ash.</p> <p>Coming toward him.</p> <p>Hendricks crouched quickly, raising his gun. Sweat dripped down into his eyes. He fought <a class="pagenum" id="page144" title="144"> </a>down rising panic, as the figures neared.</p> <p>The first was a David. The David saw him and increased its pace. The others hurried behind it. A second David. A third. Three Davids, all alike, coming toward him silently, without expression, their thin legs rising and falling. Clutching their teddy bears.</p> <p>He aimed and fired. The first two Davids dissolved into particles. The third came on. And the figure behind it. Climbing silently toward him across the gray ash. A Wounded Soldier, towering over the David. And—</p> <hr class="thoughtbreak" /> <p class="post_thoughtbreak">And behind the Wounded Soldier came two Tassos, walking side by side. Heavy belt, Russian army pants, shirt, long hair. The familiar figure, as he had seen her only a little while before. Sitting in the pressure seat of the ship. Two slim, silent figures, both identical.</p> <p>They were very near. The David bent down suddenly, dropping its teddy bear. The bear raced across the ground. Automatically, Hendricks’ fingers tightened around the trigger. The bear was gone, dissolved into mist. The two Tasso Types moved on, expressionless, walking side by side, through the gray ash.</p> <p>When they were almost to him, Hendricks raised the pistol waist high and fired.</p> <p>The two Tassos dissolved. But already a new group was starting up the rise, five or six Tassos, all identical, a line of them coming rapidly toward him.</p> <p>And he had given her the ship and the signal code. Because of him she was on her way to the moon, to the Moon Base. He had made it possible.</p> <p>He had been right about the bomb, after all. It had been designed with knowledge of the other types, the David Type and the Wounded Soldier Type. And the Klaus Type. Not designed by human beings. It had been designed by one of the underground factories, apart from all human contact.</p> <p>The line of Tassos came up to him. Hendricks braced himself, watching them calmly. The familiar face, the belt, the heavy shirt, the bomb carefully in place.</p> <p>The bomb—</p> <p>As the Tassos reached for him, a last ironic thought drifted through Hendricks’ mind. He felt a little better, thinking about it. The bomb. Made by the Second Variety to destroy the other varieties. Made for that end alone.</p> <p>They were already beginning to design weapons to use against each other.</p> <div id="the_end">&nbsp;</div> <pre> End of the Project Gutenberg EBook of Second Variety, by <NAME> *** END OF THIS PROJECT GUTENBERG EBOOK SECOND VARIETY *** ***** This file should be named 32032-h.htm or 32032-h.zip ***** This and all associated files of various formats will be found in: http://www.gutenberg.org/3/2/0/3/32032/ Produced by <NAME>, <NAME> and the Online Distributed Proofreading Team at http://www.pgdp.net Updated editions will replace the previous one--the old editions will be renamed. Creating the works from public domain print editions means that no one owns a United States copyright in these works, so the Foundation (and you!) can copy and distribute it in the United States without permission and without paying copyright royalties. Special rules, set forth in the General Terms of Use part of this license, apply to copying and distributing Project Gutenberg-tm electronic works to protect the PROJECT GUTENBERG-tm concept and trademark. Project Gutenberg is a registered trademark, and may not be used if you charge for the eBooks, unless you receive specific permission. If you do not charge anything for copies of this eBook, complying with the rules is very easy. You may use this eBook for nearly any purpose such as creation of derivative works, reports, performances and research. They may be modified and printed and given away--you may do practically ANYTHING with public domain eBooks. Redistribution is subject to the trademark license, especially commercial redistribution. *** START: FULL LICENSE *** THE FULL PROJECT GUTENBERG LICENSE PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK To protect the Project Gutenberg-tm mission of promoting the free distribution of electronic works, by using or distributing this work (or any other work associated in any way with the phrase "Project Gutenberg"), you agree to comply with all the terms of the Full Project Gutenberg-tm License (available with this file or online at http://gutenberg.net/license). Section 1. General Terms of Use and Redistributing Project Gutenberg-tm electronic works 1.A. By reading or using any part of this Project Gutenberg-tm electronic work, you indicate that you have read, understand, agree to and accept all the terms of this license and intellectual property (trademark/copyright) agreement. If you do not agree to abide by all the terms of this agreement, you must cease using and return or destroy all copies of Project Gutenberg-tm electronic works in your possession. If you paid a fee for obtaining a copy of or access to a Project Gutenberg-tm electronic work and you do not agree to be bound by the terms of this agreement, you may obtain a refund from the person or entity to whom you paid the fee as set forth in paragraph 1.E.8. 1.B. "Project Gutenberg" is a registered trademark. It may only be used on or associated in any way with an electronic work by people who agree to be bound by the terms of this agreement. There are a few things that you can do with most Project Gutenberg-tm electronic works even without complying with the full terms of this agreement. See paragraph 1.C below. There are a lot of things you can do with Project Gutenberg-tm electronic works if you follow the terms of this agreement and help preserve free future access to Project Gutenberg-tm electronic works. See paragraph 1.E below. 1.C. The Project Gutenberg Literary Archive Foundation ("the Foundation" or PGLAF), owns a compilation copyright in the collection of Project Gutenberg-tm electronic works. Nearly all the individual works in the collection are in the public domain in the United States. If an individual work is in the public domain in the United States and you are located in the United States, we do not claim a right to prevent you from copying, distributing, performing, displaying or creating derivative works based on the work as long as all references to Project Gutenberg are removed. Of course, we hope that you will support the Project Gutenberg-tm mission of promoting free access to electronic works by freely sharing Project Gutenberg-tm works in compliance with the terms of this agreement for keeping the Project Gutenberg-tm name associated with the work. You can easily comply with the terms of this agreement by keeping this work in the same format with its attached full Project Gutenberg-tm License when you share it without charge with others. 1.D. The copyright laws of the place where you are located also govern what you can do with this work. Copyright laws in most countries are in a constant state of change. If you are outside the United States, check the laws of your country in addition to the terms of this agreement before downloading, copying, displaying, performing, distributing or creating derivative works based on this work or any other Project Gutenberg-tm work. The Foundation makes no representations concerning the copyright status of any work in any country outside the United States. 1.E. Unless you have removed all references to Project Gutenberg: 1.E.1. The following sentence, with active links to, or other immediate access to, the full Project Gutenberg-tm License must appear prominently whenever any copy of a Project Gutenberg-tm work (any work on which the phrase "Project Gutenberg" appears, or with which the phrase "Project Gutenberg" is associated) is accessed, displayed, performed, viewed, copied or distributed: This eBook is for the use of anyone anywhere at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this eBook or online at www.gutenberg.net 1.E.2. If an individual Project Gutenberg-tm electronic work is derived from the public domain (does not contain a notice indicating that it is posted with permission of the copyright holder), the work can be copied and distributed to anyone in the United States without paying any fees or charges. If you are redistributing or providing access to a work with the phrase "Project Gutenberg" associated with or appearing on the work, you must comply either with the requirements of paragraphs 1.E.1 through 1.E.7 or obtain permission for the use of the work and the Project Gutenberg-tm trademark as set forth in paragraphs 1.E.8 or 1.E.9. 1.E.3. If an individual Project Gutenberg-tm electronic work is posted with the permission of the copyright holder, your use and distribution must comply with both paragraphs 1.E.1 through 1.E.7 and any additional terms imposed by the copyright holder. Additional terms will be linked to the Project Gutenberg-tm License for all works posted with the permission of the copyright holder found at the beginning of this work. 1.E.4. Do not unlink or detach or remove the full Project Gutenberg-tm License terms from this work, or any files containing a part of this work or any other work associated with Project Gutenberg-tm. 1.E.5. Do not copy, display, perform, distribute or redistribute this electronic work, or any part of this electronic work, without prominently displaying the sentence set forth in paragraph 1.E.1 with active links or immediate access to the full terms of the Project Gutenberg-tm License. 1.E.6. You may convert to and distribute this work in any binary, compressed, marked up, nonproprietary or proprietary form, including any word processing or hypertext form. However, if you provide access to or distribute copies of a Project Gutenberg-tm work in a format other than "Plain Vanilla ASCII" or other format used in the official version posted on the official Project Gutenberg-tm web site (www.gutenberg.net), you must, at no additional cost, fee or expense to the user, provide a copy, a means of exporting a copy, or a means of obtaining a copy upon request, of the work in its original "Plain Vanilla ASCII" or other form. Any alternate format must include the full Project Gutenberg-tm License as specified in paragraph 1.E.1. 1.E.7. Do not charge a fee for access to, viewing, displaying, performing, copying or distributing any Project Gutenberg-tm works unless you comply with paragraph 1.E.8 or 1.E.9. 1.E.8. You may charge a reasonable fee for copies of or providing access to or distributing Project Gutenberg-tm electronic works provided that - You pay a royalty fee of 20% of the gross profits you derive from the use of Project Gutenberg-tm works calculated using the method you already use to calculate your applicable taxes. The fee is owed to the owner of the Project Gutenberg-tm trademark, but he has agreed to donate royalties under this paragraph to the Project Gutenberg Literary Archive Foundation. Royalty payments must be paid within 60 days following each date on which you prepare (or are legally required to prepare) your periodic tax returns. Royalty payments should be clearly marked as such and sent to the Project Gutenberg Literary Archive Foundation at the address specified in Section 4, "Information about donations to the Project Gutenberg Literary Archive Foundation." - You provide a full refund of any money paid by a user who notifies you in writing (or by e-mail) within 30 days of receipt that s/he does not agree to the terms of the full Project Gutenberg-tm License. You must require such a user to return or destroy all copies of the works possessed in a physical medium and discontinue all use of and all access to other copies of Project Gutenberg-tm works. - You provide, in accordance with paragraph 1.F.3, a full refund of any money paid for a work or a replacement copy, if a defect in the electronic work is discovered and reported to you within 90 days of receipt of the work. - You comply with all other terms of this agreement for free distribution of Project Gutenberg-tm works. 1.E.9. If you wish to charge a fee or distribute a Project Gutenberg-tm electronic work or group of works on different terms than are set forth in this agreement, you must obtain permission in writing from both the Project Gutenberg Literary Archive Foundation and Michael Hart, the owner of the Project Gutenberg-tm trademark. Contact the Foundation as set forth in Section 3 below. 1.F. 1.F.1. Project Gutenberg volunteers and employees expend considerable effort to identify, do copyright research on, transcribe and proofread public domain works in creating the Project Gutenberg-tm collection. Despite these efforts, Project Gutenberg-tm electronic works, and the medium on which they may be stored, may contain "Defects," such as, but not limited to, incomplete, inaccurate or corrupt data, transcription errors, a copyright or other intellectual property infringement, a defective or damaged disk or other medium, a computer virus, or computer codes that damage or cannot be read by your equipment. 1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for the "Right of Replacement or Refund" described in paragraph 1.F.3, the Project Gutenberg Literary Archive Foundation, the owner of the Project Gutenberg-tm trademark, and any other party distributing a Project Gutenberg-tm electronic work under this agreement, disclaim all liability to you for damages, costs and expenses, including legal fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE PROVIDED IN PARAGRAPH F3. YOU AGREE THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH DAMAGE. 1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you discover a defect in this electronic work within 90 days of receiving it, you can receive a refund of the money (if any) you paid for it by sending a written explanation to the person you received the work from. If you received the work on a physical medium, you must return the medium with your written explanation. The person or entity that provided you with the defective work may elect to provide a replacement copy in lieu of a refund. If you received the work electronically, the person or entity providing it to you may choose to give you a second opportunity to receive the work electronically in lieu of a refund. If the second copy is also defective, you may demand a refund in writing without further opportunities to fix the problem. 1.F.4. Except for the limited right of replacement or refund set forth in paragraph 1.F.3, this work is provided to you 'AS-IS' WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTIBILITY OR FITNESS FOR ANY PURPOSE. 1.F.5. Some states do not allow disclaimers of certain implied warranties or the exclusion or limitation of certain types of damages. If any disclaimer or limitation set forth in this agreement violates the law of the state applicable to this agreement, the agreement shall be interpreted to make the maximum disclaimer or limitation permitted by the applicable state law. The invalidity or unenforceability of any provision of this agreement shall not void the remaining provisions. 1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation, the trademark owner, any agent or employee of the Foundation, anyone providing copies of Project Gutenberg-tm electronic works in accordance with this agreement, and any volunteers associated with the production, promotion and distribution of Project Gutenberg-tm electronic works, harmless from all liability, costs and expenses, including legal fees, that arise directly or indirectly from any of the following which you do or cause to occur: (a) distribution of this or any Project Gutenberg-tm work, (b) alteration, modification, or additions or deletions to any Project Gutenberg-tm work, and (c) any Defect you cause. Section 2. Information about the Mission of Project Gutenberg-tm Project Gutenberg-tm is synonymous with the free distribution of electronic works in formats readable by the widest variety of computers including obsolete, old, middle-aged and new computers. It exists because of the efforts of hundreds of volunteers and donations from people in all walks of life. Volunteers and financial support to provide volunteers with the assistance they need are critical to reaching Project Gutenberg-tm's goals and ensuring that the Project Gutenberg-tm collection will remain freely available for generations to come. In 2001, the Project Gutenberg Literary Archive Foundation was created to provide a secure and permanent future for Project Gutenberg-tm and future generations. To learn more about the Project Gutenberg Literary Archive Foundation and how your efforts and donations can help, see Sections 3 and 4 and the Foundation web page at http://www.pglaf.org. Section 3. Information about the Project Gutenberg Literary Archive Foundation The Project Gutenberg Literary Archive Foundation is a non profit 501(c)(3) educational corporation organized under the laws of the state of Mississippi and granted tax exempt status by the Internal Revenue Service. The Foundation's EIN or federal tax identification number is 64-6221541. Its 501(c)(3) letter is posted at http://pglaf.org/fundraising. Contributions to the Project Gutenberg Literary Archive Foundation are tax deductible to the full extent permitted by U.S. federal laws and your state's laws. The Foundation's principal office is located at 4557 Melan Dr. S. Fairbanks, AK, 99712., but its volunteers and employees are scattered throughout numerous locations. Its business office is located at 809 North 1500 West, Salt Lake City, UT 84116, (801) 596-1887, email <EMAIL>. Email contact links and up to date contact information can be found at the Foundation's web site and official page at http://pglaf.org For additional contact information: Dr. <NAME> Chief Executive and Director <EMAIL> Section 4. Information about Donations to the Project Gutenberg Literary Archive Foundation Project Gutenberg-tm depends upon and cannot survive without wide spread public support and donations to carry out its mission of increasing the number of public domain and licensed works that can be freely distributed in machine readable form accessible by the widest array of equipment including outdated equipment. Many small donations ($1 to $5,000) are particularly important to maintaining tax exempt status with the IRS. The Foundation is committed to complying with the laws regulating charities and charitable donations in all 50 states of the United States. Compliance requirements are not uniform and it takes a considerable effort, much paperwork and many fees to meet and keep up with these requirements. We do not solicit donations in locations where we have not received written confirmation of compliance. To SEND DONATIONS or determine the status of compliance for any particular state visit http://pglaf.org While we cannot and do not solicit contributions from states where we have not met the solicitation requirements, we know of no prohibition against accepting unsolicited donations from donors in such states who approach us with offers to donate. International donations are gratefully accepted, but we cannot make any statements concerning tax treatment of donations received from outside the United States. U.S. laws alone swamp our small staff. Please check the Project Gutenberg Web pages for current donation methods and addresses. Donations are accepted in a number of other ways including including checks, online payments and credit card donations. To donate, please visit: http://pglaf.org/donate Section 5. General Information About Project Gutenberg-tm electronic works. Professor <NAME> is the originator of the Project Gutenberg-tm concept of a library of electronic works that could be freely shared with anyone. For thirty years, he produced and distributed Project Gutenberg-tm eBooks with only a loose network of volunteer support. Project Gutenberg-tm eBooks are often created from several printed editions, all of which are confirmed as Public Domain in the U.S. unless a copyright notice is included. Thus, we do not necessarily keep eBooks in compliance with any particular paper edition. Most people start at our Web site which has the main PG search facility: http://www.gutenberg.net This Web site includes information about Project Gutenberg-tm, including how to make donations to the Project Gutenberg Literary Archive Foundation, how to help produce our new eBooks, and how to subscribe to our email newsletter to hear about new eBooks. </pre> </body> </html>
html
<reponame>Run2948/lx-music-desktop<gh_stars>1000+ { "merge_btn_local_remote": "本机列表 合并 远程列表", "merge_btn_remote_local": "远程列表 合并 本机列表", "merge_label": "合并", "merge_tip": "合并:", "merge_tip_desc": "将两边的列表合并到一起,相同的歌曲将被去掉(去掉的是被合并者的歌曲),不同的歌曲将被添加。", "other_label": "其他", "other_tip": "其他:", "other_tip_desc": "“仅使用实时同步功能”将不修改双方的列表,仅实时同步操作;“取消同步”将直接断开双方的连接。", "overwrite": "完全覆盖", "overwrite_btn_cancel": "取消同步", "overwrite_btn_local_remote": "本机列表 覆盖 远程列表", "overwrite_btn_none": "仅使用实时同步功能", "overwrite_btn_remote_local": "远程列表 覆盖 本机列表", "overwrite_label": "覆盖", "overwrite_tip": "覆盖:", "overwrite_tip_desc": "被覆盖者与覆盖者列表ID相同的列表将被删除后替换成覆盖者的列表(列表ID不同的列表将被合并到一起),若勾选完全覆盖,则被覆盖者的所有列表将被移除,然后替换成覆盖者的列表。", "title": "选择与 {name} 的列表同步方式" }
json
Even after the releases of big-budget films like Shehzada and Selfiee, Shah Rukh’s Pathaan is still drawing crowds to the theatres. Pathaan is easily one of the mighty comebacks in India. In overseas alone, the movie made around 50 million $. Also, the fact that Shehzada and Selfiee were rejected by audiences helped Pathaan to an extent. Yesterday the movie made a nett of 1.95 crores, and till now, the film amassed 505.05 crores nett at the box office. Today the movie will be fetching another two crores. So from tomorrow, all Pathaan needs is four crores to cross the mighty Baahubali 2 to become the biggest earner in the Hindi industry (Domestically). Siddharth Anand directed this high-budget action thriller which has Deepika Padukone as the romantic interest of King Khan. Articles that might interest you:
english
Islam Times - French households are facing higher prices as inflation climbed more than expected in August, driven by soaring energy bills. France – the EU’s second largest economy after Germany – recorded a 12-month inflation rate of 5.7 percent last month, up from 5.1 percent in July, This Is Money reported. Analysts had predicted a lower rate in August, with a poll of 18 economists, conducted by Reuters, forecasting a rate of 5.4 percent. The only good news was that food inflation was 11.1 percent in August, from 12.7 percent in July – but that was still almost twice the overall inflation rate. Energy prices, which fell 3.7 percent in July, rose 6.8 percent. "This rise is due to a rebound in energy prices. Food prices eased as well as manufactured products and services," the EU statistics agency said. According to the agency, eurozone core inflation was unchanged at 5.3 percent in the year to August. UK inflation cooled to 6.8 percent in July, down from 7.9 percent in June. British Retail Consortium figures this week showed that UK shop price inflation fell to its lowest level in a year in August. And Bank of England Chief Economist Huw Pill said Wednesday that the central bank will ‘see the job through’ to bring inflation back down to its 2 percent target, even if there was a risk of raising interest rates too high. "The key element is that we on the Monetary Policy Committee need to see the job through and ensure a lasting and sustainable return of inflation to 2 percent," he told a conference organised by the South African central bank.
english
<filename>data/spack-issues/issue-9748.json<gh_stars>0 { "body": "* The CLAW compiler uses the native compiler preprocessing capabilities therefore, the raw path of the compiler is needed to configure the CLAW Compiler and not the Spack wrapper. \r\n\r\nThanks @jrood-nrel to point out this problem", "user": "clementval", "url": "https://api.github.com/repos/spack/spack/issues/9748", "updated_at": "2018-11-08 09:11:27", "created_at": "2018-11-07 13:20:52", "closed_at": "2018-11-07 14:24:25", "state": "closed", "title": "Use the raw compiler path for the preprocessing pass in CLAW driver", "number": 9748, "milestone": null, "labels": [ "update-package" ], "id": 378284592, "html_url": "https://github.com/spack/spack/pull/9748", "assignees": [], "comments": 1 }
json
# Create the DMatrix: housing_dmatrix housing_dmatrix = xgb.DMatrix(data=X, label=y) # Create the parameter dictionary: params params = {'objective':'reg:linear', 'max_depth':4} # Train the model: xg_reg xg_reg = xgb.train(dtrain=housing_dmatrix, params=params, num_boost_round=10) # Plot the feature importances xgb.plot_importance(xg_reg) plt.show()
python
package commnet.model.beans; import commnet.model.enums.EdgeSide; public class DeveloperEdge { private Integer idDB; private Integer networkIdDB; private DeveloperNode devA; private DeveloperNode devB; private Integer weight = new Integer(0); private Integer edgeType; private EdgeSide edgeSide; public DeveloperEdge() { this(null, null, null, null, null, null, null); } public DeveloperEdge(Integer id) { this(id, null, null, null, null, null, null); } public DeveloperEdge(DeveloperNode devA, DeveloperNode devB, Integer edgeType, EdgeSide edgeSide, Integer weightEdge) { this(null, null, devA, devB, edgeType, edgeSide, weightEdge); } public DeveloperEdge(Integer idDB, Integer networkIdDB, DeveloperNode devA, DeveloperNode devB, Integer edgeType, EdgeSide edgeSide, Integer weight) { setIdDB(idDB); setNetworkIdDB(networkIdDB); setDevA(devA); setDevB(devB); setEdgeType(edgeType); setEdgeSide(edgeSide); setWeight(weight); } public Integer getIdDB() { return this.idDB; } public void setIdDB(Integer idDB) { this.idDB = idDB; } public Integer getNetworkID() { return this.networkIdDB; } public void setNetworkIdDB(Integer networkID) { this.networkIdDB = networkID; } public DeveloperNode getDevA() { return devA; } public void setDevA(DeveloperNode devA) { this.devA = devA; } public DeveloperNode getDevB() { return devB; } public void setDevB(DeveloperNode devB) { this.devB = devB; } public void setWeight(Integer weight) { this.weight = weight; } public int getWeight() { return this.weight; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((devA == null) ? 0 : devA.hashCode()); result = prime * result + ((devB == null) ? 0 : devB.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; DeveloperEdge other = (DeveloperEdge) obj; if (devA == null) { if (other.devA != null) return false; } if (devB == null) { if (other.devB != null) return false; } if (!getEdgeSide().equals(other.getEdgeSide())) { return false; } if (!getEdgeType().equals(other.getEdgeType())) { return false; } // testing bidirectionality if ((devB.equals(other.devB) && devA.equals(other.devA)) || (devB.equals(other.devA) && devA.equals(other.devB))) { return true; } if ((devB.equals(other.devB) && !devA.equals(other.devA)) || (!devB.equals(other.devB) && devA.equals(other.devA)) || (!devB.equals(other.devB) && !devA.equals(other.devA))) { return false; } return true; } public boolean devsEqualIDs(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; DeveloperEdge other = (DeveloperEdge) obj; if (devA.getIdDB() == null) { if (other.devA.getIdDB() != null) return false; } if (devB.getIdDB() == null) { if (other.devB.getIdDB() != null) return false; } // testing bidirectionality if ((devB.equalIds(other.devB) && devA.equalIds(other.devA)) || (devB.equalIds(other.devA) && devA.equalIds(other.devB))) { return true; } if ((devB.equalIds(other.devB) && !devA.equalIds(other.devA)) || (!devB.equalIds(other.devB) && devA.equalIds(other.devA)) || (!devB.equalIds(other.devB) && !devA.equalIds(other.devA))) { return false; } return true; } public Integer getEdgeType() { return this.edgeType; } public void setEdgeType(Integer edgeType) { this.edgeType = edgeType; } public EdgeSide getEdgeSide() { return this.edgeSide; } public void setEdgeSide(EdgeSide edgeSide) { this.edgeSide = edgeSide; } public void incrementWeight() { this.weight++; } }
java
As the Federal Reserve raises interest rates again, credit card debt is already at a record high, and more people are carrying debt month to month. The Fed's interest rate increases are meant to fight inflation, but they've also led to higher annual percentage rates (APRs) for people with credit card debt, which means they pay more in interest. The Fed announced Wednesday that it would increase rates another quarter of a point. With inflation still high, people are leaning on their credit cards more for everyday purchases. It's the economy, inflation, gas prices, and food costs, said Lance DeJesus, 46, kitchen manager at the Golden Corral in York, Pennsylvania. A year ago, you could go to the grocery store with a hundred bucks and come out with a bunch of bags. Now, I come out with just one bag. How will US Fed and BoE rate action affect markets this week? DeJesus said he carries a credit card balance of roughly $2,600 from month to month over several cards, which have interest rates from 16. 99% to 21. 99%. Early in the pandemic, when DeJesus lost his job, he said that unemployment payments, stimulus checks, and child tax credits (which went to his household via his wife, who has three children) all helped him stay afloat. Now, with COVID-era emergency relief and stimulus policies ending, he uses credit for emergencies. He's not alone: 46% of people are carrying debt from month to month, up from 39% a year ago, according to Bankrate. com, an online financial information site. Bankrate says the average credit card interest rate, or annual percentage rate, has reached 20. 4% the highest since their tracking began in the mid-1980s. A new poll by The Associated Press-NORC Center for Public Affairs Research finds 35% of U. S. adults report that their household debt is higher than it was a year ago. Just 17% say it has decreased. Roughly 4 in 10 adults in households making under $100,000 a year say their debt is up, compared with about a quarter in households making more than that. About half of Black and Hispanic adults say their household debt has increased, compared with about 3 in 10 white adults. Data also shows more people are now falling behind on payments, according to Bankrate analyst Greg McBride. He sees this as evidence of a so-called K-shaped recovery from the pandemic, in which the distance between the haves and the have-nots grows larger. The more than half who pay in full each month are clearly doing a lot better than the almost half who don't, McBride said. Those who tend to carry balances tend to be younger people, people making lower incomes, and those with lower credit scores. Another factor contributing to rising debt is inflation, which means the cost of day-to-day living is outpacing paychecks. Typically, on a national scale, it takes something pretty extraordinary for credit card balances to fall, economists agree. The Great Recession, beginning in 2008, and COVID, beginning in 2020, are two periods when they fell sharply. During the early pandemic, credit card debt dipped 17%, Bankrate said thanks in part to stimulus programs, emergency relief, and a decrease in consumer spending. But in the last three months of 2022, credit card balances in the U. S. increased $61 billion to $986 billion, surpassing the pre-pandemic high of $927 billion, according to the Federal Reserve Bank of New York. Using a credit card can provide protections for people who can pay off the balance every month. But the cost for those who can't is high. What's not good is carrying balances, paying interest, and falling behind, McBride said. "No one wants to be paying 20% every month. " For Gary Deuvall, 68, of Walls, Mississippi, who worked servicing and repairing motorcycles, stimulus checks brought some financial relief even though the pandemic hurt his business. Now retired and on Social Security, Deuvall and his wife still have some credit card debt, he said, in the five figures, but they've also transferred that balance to a zero percent interest card to help contend with high rates. Zero percent interest offers are generally available only for a limited period, sometimes up to 21 months, and banks sometimes charge a flat fee, such as 3% of the balance transferred. We'd hoped to build or buy a house, Deuvall said. But interest rates are so high, that's on pause. Meanwhile, I'll just rent. " Dan Stokes, 31, a special education teacher based in Richmond, Virginia, said that a pause on student loan payments that began during the pandemic has helped him make ends meet, but he still carries about $8,000 in credit card debt from month to month across at least three cards. Of that, Stokes said he's moved about $1,200 to a zero percent interest card for the next twelve months. Honestly, it feels really good that I don't have to make those student debt payments at the moment, he said of the emergency policy, which has been extended until the summer. My pay as a teacher hasn't kept up with inflation, so there are times when I'm swiping my credit cards just to get by and make it through. Credit card rates are one of the fastest ways higher interest rates hit consumers. Most car loans and mortgages are fixed-rate. So if you're new to the market, it has a big effect, but if you have an existing loan, it's not affecting you," McBride said. "With credit cards, the higher interest rate gets passed through pretty much right away. (Only the headline and picture of this report may have been reworked by the Business Standard staff; the rest of the content is auto-generated from a syndicated feed. )
english
We talk about our beloved backpacking And backpacking foods tips. This year I joined a combined group of experienced pack-rafters on a two-day trip in the San Isabel National Forest. Consider alongside adequate meals and normal water, inside inclusion to a good altitude help package along with good medication such while Diamox (often prescribed with regard to backpackers who else are usually climbing over 8,000 ft), ibuprofen, coughing falls and stomach upset medicine. Chatting about playgrounds , some clear issues that are available for you to head happen to be distinct forms of out of doors gemstone tools many of these while monkey clubs, power point sides, some sort of golf swing fixed, or a youngster standard jungle gym sometimes. There are accepted ethics in hunting generally, which is expected to b observed and respected by very hunter in spite of our level of understanding and skills in hunting. Their motto is ‘true travelers – true info.” This would seem regular with the web-site, which features everything from transportation reviews to the best travel trip and deal planners. My spouse and i really fancy hiking in Kenneth Hahn Stat Area because it’s hence nearby by and because We check out hence many other Dark and dark brown persons. The classic appears to be and durability of this typ of patio furniture produce it a favorite for home owners and commercial settings both. The best way to gt to the traiIhead is by car and it taks about 1.5 hours from Hsinchu Area to Youluo Mountain. Out-of-doors kitchen plans construct info construct out-of-doors kitchen material studs out-of-doors kitchen construction construct your very own out-of-doors bar, construct an out-of-doors kitchen. By using the looking security tips format over not really simply conduct you ensure your basic safety but that of your associates seekers (both the only two and four legged seekers). You’ll want a waterfowI hunting backpack for sale tó store all of your Ioose things like knives. One point you has to acknowledge is that, these pets or animals are life plant structur, they have lifetime, hence they present basically all of the informative post traits you present as a man as well. That started from subsequent my father close to squirreling looking with a new BB weapon to having the chance to pick countless little sport creatures, several deer, many turkeys, a new few of potential predators, and actually a new Pennsylvania dark carry. Describing often the benches best parts his or her beauty magnificence and even allures this consideration involving people young and old which want some sort of time to be able to remainder in their very own means to be able to this general practitioner or perhaps store wall socket. For instance, trendy outside furnishings items in Sydney suggest that móst selections are ideal for the very hot time of year, but may also be used in th colder climate as very well because the producers use high-quality components and coatings. Outdoors pets or animals are always mistreated when abused as domestic pets – so your notion of “legal rights” seems rather skewed to whre you think the canine has zero, but you have all yóu want. An particular person wolf will consume to 20 kilos of animal meat in a one waiting up, it is a complete whole lot, but it’s significant that the baby wolves stuff themselves in this means, as it could be times or 2 or 3 weeks before their next substantial meals perhaps.
english
<reponame>rolocampusano/nber { "id": 3322, "citation_title": "An Empirical Analysis of Cigarette Addiction", "citation_author": [ "<NAME>", "<NAME>", "<NAME>" ], "citation_publication_date": "1990-04-01", "issue_date": "1990-04-01", "revision_date": "None", "topics": [ "Public Economics" ], "program": [ "Health Economics" ], "projects": null, "working_groups": null, "abstract": "\n\nWe use a framework suggested by a model of rational addiction to analyze empirically the demand for cigarettes. The data consist of per capita cigarettes sales (in packs) annually by state for the period 1955 through 1985. The empirical results provide support for the implications of a rational addiction model that cross price effects are negative (consumption in different periods are complements), that long-run price responses exceed short-run responses, and that permanent price effects exceed temporary price effects. A 10 percent permanent increase in the price of cigarettes reduces current consumption by 4 percent in the short run and by 7.5 percent in the long run. In contrast, a 10 percent increase in the price for only one period decreases consumption by only 3 percent. In addition, a one period price increase of 10 percent reduces consumption in the previous period by approximately .7 percent and consumption in the subsequent period by 1.5 percent. These estimates illustrate the importance of the intertemporal linkages in cigarette demand implied by rational addictive behavior.\n\n", "acknowledgement": "\n" }
json
*, *::before, *::after { padding: 0; margin: 0; box-sizing: border-box; } body { background-color: aliceblue; } section { width: 600px; font-size: 2rem; position: relative; margin: 0 auto; } section p::selection { background-color: aquamarine; } .share-this-popover { background-color: bisque; width: 1.5em; height: 1.5em; position: absolute; border-radius: .2em; text-align: center; cursor: pointer; z-index: 100; transform: translate(-50%, -100%); transition: top ease .5s; } .share-this-popover::before { width: 10px; height: 10px; content: ''; background-color: bisque; position: absolute; bottom: 0; left: 50%; transform: translate(-50%, 50%) rotateZ(45deg); }
css
<reponame>greenelab/nature_news_disparities version https://git-lfs.github.com/spec/v1 oid sha256:bfc9ca0e2efd027892ea2b55e9606cabf0ae0f4f0263480da12f195181558035 size 977718
json
/* * 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. */ package org.apache.activemq.artemis.rest.test; import org.apache.activemq.artemis.rest.queue.QueueDeployment; import org.apache.activemq.artemis.rest.topic.TopicDeployment; import org.apache.activemq.artemis.rest.util.Constants; import org.jboss.resteasy.client.ClientRequest; import org.jboss.resteasy.client.ClientResponse; import org.jboss.resteasy.spi.Link; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import static org.jboss.resteasy.test.TestPortProvider.generateURL; public class SessionTest extends MessageTestBase { @BeforeClass public static void setup() throws Exception { QueueDeployment deployment1 = new QueueDeployment("testQueue", true); manager.getQueueManager().deploy(deployment1); TopicDeployment deployment = new TopicDeployment(); deployment.setConsumerSessionTimeoutSeconds(1); deployment.setDuplicatesAllowed(true); deployment.setDurableSend(false); deployment.setName("testTopic"); manager.getTopicManager().deploy(deployment); } @Test public void testRestartFromAutoAckSession() throws Exception { ClientRequest request = new ClientRequest(generateURL("/queues/testQueue")); ClientResponse<?> response = request.head(); response.releaseConnection(); Assert.assertEquals(200, response.getStatus()); Link sender = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "create"); System.out.println("create: " + sender); Link consumers = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "pull-consumers"); System.out.println("pull: " + consumers); response = Util.setAutoAck(consumers, true); Link session = response.getLocationLink(); response = session.request().head(); response.releaseConnection(); Link consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "consume-next"); System.out.println("consume-next: " + consumeNext); response = sender.request().body("text/plain", Integer.toString(1)).post(); response.releaseConnection(); Assert.assertEquals(201, response.getStatus()); response = consumeNext.request().post(String.class); Assert.assertEquals(200, response.getStatus()); Assert.assertEquals("1", response.getEntity(String.class)); response.releaseConnection(); response = session.request().get(); consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "consume-next"); response = sender.request().body("text/plain", Integer.toString(2)).post(); response.releaseConnection(); Assert.assertEquals(201, response.getStatus()); response = consumeNext.request().post(String.class); Assert.assertEquals(200, response.getStatus()); Assert.assertEquals("2", response.getEntity(String.class)); response.releaseConnection(); response = session.request().head(); consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "consume-next"); response = sender.request().body("text/plain", Integer.toString(3)).post(); response.releaseConnection(); Assert.assertEquals(201, response.getStatus()); response = consumeNext.request().post(String.class); Assert.assertEquals(200, response.getStatus()); Assert.assertEquals("3", response.getEntity(String.class)); response.releaseConnection(); response = session.request().delete(); response.releaseConnection(); Assert.assertEquals(204, response.getStatus()); } @Test public void testTopicRestartFromAutoAckSession() throws Exception { ClientRequest request = new ClientRequest(generateURL("/topics/testTopic")); ClientResponse<?> response = request.head(); response.releaseConnection(); Assert.assertEquals(200, response.getStatus()); Link sender = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "create"); System.out.println("create: " + sender); Link consumers = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "pull-subscriptions"); System.out.println("pull: " + consumers); response = Util.setAutoAck(consumers, true); Link session = response.getLocationLink(); response = session.request().head(); response.releaseConnection(); Link consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "consume-next"); System.out.println("consume-next: " + consumeNext); response = sender.request().body("text/plain", Integer.toString(1)).post(); response.releaseConnection(); Assert.assertEquals(201, response.getStatus()); response = consumeNext.request().post(String.class); Assert.assertEquals(200, response.getStatus()); Assert.assertEquals("1", response.getEntity(String.class)); response.releaseConnection(); response = session.request().get(); response.releaseConnection(); consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "consume-next"); response = sender.request().body("text/plain", Integer.toString(2)).post(); response.releaseConnection(); Assert.assertEquals(201, response.getStatus()); response = consumeNext.request().post(String.class); Assert.assertEquals(200, response.getStatus()); Assert.assertEquals("2", response.getEntity(String.class)); response.releaseConnection(); response = session.request().head(); response.releaseConnection(); consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "consume-next"); response = sender.request().body("text/plain", Integer.toString(3)).post(); response.releaseConnection(); Assert.assertEquals(201, response.getStatus()); response = consumeNext.request().post(String.class); Assert.assertEquals(200, response.getStatus()); Assert.assertEquals("3", response.getEntity(String.class)); response.releaseConnection(); response = session.request().delete(); response.releaseConnection(); Assert.assertEquals(204, response.getStatus()); } @Test public void testRestartFromAckSession() throws Exception { ClientRequest request = new ClientRequest(generateURL("/queues/testQueue")); ClientResponse<?> response = request.head(); response.releaseConnection(); Assert.assertEquals(200, response.getStatus()); Link sender = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "create"); System.out.println("create: " + sender); Link consumers = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "pull-consumers"); System.out.println("pull: " + consumers); response = Util.setAutoAck(consumers, false); Link session = response.getLocationLink(); response = session.request().head(); response.releaseConnection(); Link consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledge-next"); System.out.println("consume-next: " + consumeNext); Link ack = null; response = sender.request().body("text/plain", Integer.toString(1)).post(); response.releaseConnection(); Assert.assertEquals(201, response.getStatus()); // consume response = consumeNext.request().header(Constants.WAIT_HEADER, "3").post(String.class); Assert.assertEquals(200, response.getStatus()); Assert.assertEquals("1", response.getEntity(String.class)); response.releaseConnection(); response = session.request().get(); response.releaseConnection(); consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledge-next"); Assert.assertNull(consumeNext); ack = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledgement"); Assert.assertNotNull(ack); // acknowledge response = ack.request().formParameter("acknowledge", "true").post(); response.releaseConnection(); response = session.request().head(); response.releaseConnection(); consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledge-next"); Assert.assertNotNull(consumeNext); ack = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledgement"); Assert.assertNull(ack); response = sender.request().body("text/plain", Integer.toString(2)).post(); response.releaseConnection(); Assert.assertEquals(201, response.getStatus()); // consume response = consumeNext.request().header(Constants.WAIT_HEADER, "1").post(String.class); Assert.assertEquals(200, response.getStatus()); Assert.assertEquals("2", response.getEntity(String.class)); response.releaseConnection(); response = session.request().get(); response.releaseConnection(); consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledge-next"); Assert.assertNull(consumeNext); ack = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledgement"); Assert.assertNotNull(ack); // acknowledge response = ack.request().formParameter("acknowledge", "true").post(); response.releaseConnection(); response = session.request().head(); response.releaseConnection(); consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledge-next"); Assert.assertNotNull(consumeNext); ack = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledgement"); Assert.assertNull(ack); response = session.request().delete(); response.releaseConnection(); Assert.assertEquals(204, response.getStatus()); } @Test public void testTopicRestartFromAckSession() throws Exception { ClientRequest request = new ClientRequest(generateURL("/topics/testTopic")); ClientResponse<?> response = request.head(); response.releaseConnection(); Assert.assertEquals(200, response.getStatus()); Link sender = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "create"); System.out.println("create: " + sender); Link consumers = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "pull-subscriptions"); System.out.println("pull: " + consumers); response = Util.setAutoAck(consumers, false); Link session = response.getLocationLink(); response = session.request().head(); response.releaseConnection(); Link consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledge-next"); System.out.println("consume-next: " + consumeNext); Link ack = null; response = sender.request().body("text/plain", Integer.toString(1)).post(); response.releaseConnection(); Assert.assertEquals(201, response.getStatus()); // consume response = consumeNext.request().header(Constants.WAIT_HEADER, "1").post(String.class); Assert.assertEquals(200, response.getStatus()); Assert.assertEquals("1", response.getEntity(String.class)); response.releaseConnection(); response = session.request().get(); response.releaseConnection(); consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledge-next"); Assert.assertNull(consumeNext); ack = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledgement"); Assert.assertNotNull(ack); // acknowledge response = ack.request().formParameter("acknowledge", "true").post(); response.releaseConnection(); response = session.request().head(); response.releaseConnection(); consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledge-next"); Assert.assertNotNull(consumeNext); ack = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledgement"); Assert.assertNull(ack); response = sender.request().body("text/plain", Integer.toString(2)).post(); response.releaseConnection(); Assert.assertEquals(201, response.getStatus()); // consume response = consumeNext.request().header(Constants.WAIT_HEADER, "1").post(String.class); Assert.assertEquals(200, response.getStatus()); Assert.assertEquals("2", response.getEntity(String.class)); response.releaseConnection(); response = session.request().get(); response.releaseConnection(); consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledge-next"); Assert.assertNull(consumeNext); ack = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledgement"); Assert.assertNotNull(ack); // acknowledge response = ack.request().formParameter("acknowledge", "true").post(); response.releaseConnection(); response = session.request().head(); response.releaseConnection(); consumeNext = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledge-next"); Assert.assertNotNull(consumeNext); ack = getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "acknowledgement"); Assert.assertNull(ack); response = session.request().delete(); response.releaseConnection(); Assert.assertEquals(204, response.getStatus()); } }
java