text stringlengths 1 1.04M | language stringclasses 25 values |
|---|---|
{"resourceType":"ActivityDefinition","id":"activity-definition-loinc-2472-9","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\">Activity Definition for IgM [Mass/volume] in Serum or Plasma</div>"},"url":"https://rarecare.world/2472-9","status":"draft","description":"IgM [Mass/volume] in Serum or Plasma Measurement","kind":"ServiceRequest","code":{"text":"IgM [Mass/volume] in Serum or Plasma"},"observationResultRequirement":[{"reference":"observation-definition-2472-9"}]} | json |
[{"name": "Metals", "path": "Metals", "value": 589.77}, {"name": "Miscellaneous", "path": "Miscellaneous", "value": 24439.123}, {"name": "<NAME>", "path": "Mach and Elec", "value": 31867.725}, {"name": "Intermediate goods", "path": "Intermediate goods", "value": 34702.605}, {"name": "Plastic or Rubber", "path": "Plastic or Rubber", "value": 36701.238}, {"name": "Capital goods", "path": "Capital goods", "value": 50247.945}, {"name": "Consumer goods", "path": "Consumer goods", "value": 200760.252}] | json |
package cache
import (
"bytes"
"encoding/gob"
)
func GobMarshal(v interface{}) ([]byte, error) {
buf := &bytes.Buffer{}
err := gob.NewEncoder(buf).Encode(v)
return buf.Bytes(), err
}
func GobUnmarshal(data []byte, v interface{}) error {
err := gob.NewDecoder(bytes.NewReader(data)).Decode(v)
return err
}
| go |
**Bhubaneswar:** The City-Wide Wi-Fi Project, to make the Capital city accessible across its major happening places ahead of the Odisha Men’s Hockey World Cup, will be launched by Chief Minister Naveen Patnaik on Monday.
In the first phase of the project, christened as ‘BhubaneswarMe’, 100 Wi-Fi hot spots will go live across the city including stretches like KIIT Square to Governor House Square, Acharya Vihar to AG Square, Shishu Bhavan to Vani Vihar and NALCO Square to Acharya Vihar.
Denizens can access 250 MB of data free of cost daily along these stretches which are taken from the 80 km Priority Road Network of the City. However, one should be within reach of the access point to login to the network.
Beyond the free limit, they have to recharge with very low cost top-up plans for subsequent use. The payment modalities and plans are yet to be announced. The Internet speed would be 2 MBPS in the City Wi-Fi Network.
In course of time 500 Wi-Fi hot spots will go live across the city to complete the City Wide Wi-Fi Network. Users can have access to 50 MB of data for 30 minutes each day free of cost. Each hot spot would be able to handle as many as 150 users with wireless band of 2.4 GHz to 5 GHz based on their handset capabilities.
The system has been designed to comply with all the regulations and policies of Telecom Regulatory Authority of India (TRAI) and Department of Telecommunications (DOT)
**Also Read:** [Ticket Sale For Hockey Men’s World Cup 2018 Starts Monday](https://www.ommcomnews.com/odisha-news/ticket-sale-for-hockey-men-s-world-cup-2018-starts-monday)
| english |
<reponame>ketavchotaliya/restaurant-management-api-gateway
{
"SERVER_ERROR": "Server Error",
"VALIDATIONS": {
"COMMON": {
"authorization": {
"required": "Authorization Token is required"
},
"rowNumber": {
"valid": "rowNumber must not be zero."
}
}
},
"PUBLIC": {
"first_name": {
"required": "First Name is Required",
"valid": "First Name should be valid"
},
"last_name": {
"required": "Last Name is Required",
"valid": "Last Name should be valid"
},
"email": {
"required": "Email is Required",
"valid": "Email should be valid"
},
"password": {
"required": "<PASSWORD>"
},
"user_type": {
"required": "User Type is required",
"valid": "User Type is invalid"
},
"has_accepted_tnc": {
"valid": "Terms and Condition should be valid"
},
"contact_number": {
"required": "Contact number is required",
"valid": "Contact number should be valid"
},
"otp": {
"required": "OTP Required"
},
"forgot_password_initiated": "Forgot password code has been sent to your email!",
"password_updated": "<PASSWORD>."
},
"USER": {
"access_forbidden": "Access forbidden!",
"otp_send": "OTP Sent.",
"user_already_available": "User already exists",
"otp_verified": "OTP verified",
"otp_expired": "OTP Expired",
"login_successful": "Login Successful",
"otp_not_matched": "Invalid OTP",
"user_not_found": "User not found"
},
"TIMEZONE": {
"LIST": "Timezone list"
},
"AUTH": {
"config_details_available": "Config Details",
"password_updated": "<PASSWORD>",
"logout_successful": "Logout successfully"
},
"ADMIN": {
"NOT_FOUND": "Admin not found"
}
}
| json |
Not merely discovered but they have entered into it and made a way to pass into it from their side. When a question was being asked about Siachen, then I talked about it. In 1993 General Musharraf was in Kargil adjoining Siachen. He was leading the Pakistani Brigade. He knows about all the provinces and from which sector to enter. He has complete map but is observing silence. Meanwhile another tunnel came into existence. Where is your intelligence?...(Interruptions)
I was telling about Mr. Li-Peng. We have been deceived by China we have also been deceived three or four times about Pakistan even then we are running the Government slowly and with ease. Here you have 22 parties with you. We progressed neither in Industrial sector nor in economic policy even this Government failed to stand in international scenario. I will not speak more since you are looking at me again and again. I wanted to speak till tomorrow morning but
Sir, I wanted to stand on my feet till tomorrow moming but you are now allowing me.
MR. CHAIRMAN: I would be glad to hear you but there are many hon. members who want to speak. Please conclude.
SHRI SUSHIL KUMAR SHINDE: I must thank Hon'ble President. But this Government has closed its eyes and do not want to listen. It is a dumb Government. What should I speak to it. I read and spoke this much and presented so many datas. Please tell something in your reply as to what you can do far dalits, poor and backward classes and what will you do to really protecting this country?
I wanted to speak much about economic policy but I can't speak. Much loss has been incurred in small savings in Maharashtra because you have reduced the rate of interest. You have reduced it by 1.5 percent in whole country. What is being done by you for small savings? You used to divert rupees 1100 crore towards development and this money was being used for power generation. You want power generation for the country. There is theft in distribution. I want to speak much more but they have deafears. I would speak if they use it and accept what I speak. They listen but do not follow. How this Government will work? We will have to save this country from them and with these words I conclude.
TEXT OF AMENDMENTS
SHRI G.M. BANATWALLA (Ponnani): I beg to move:
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Adress abut the repeated pronouncements of certain organisations and individuals to forcefully and unilaterally construct a Mandir on the site of the Babri Masjid even in defiance of all Court orders, and the need to take action against such elements and also to take all measures for protection of the disputed site." (1)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the immediate need to take into Government custody all the constructed materials and items for putting up a Mandir at the site of the Babri Masjid, in order to pre-empt any unilateral action against the Court orders." (2)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about rectification of the technical defect in the prosecution of accused including three Union Ministers on offences relating to demolition of Babri Masjid and to thus assure justice in the matter." (3)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about winding up the Constitution Review Committee." (4)
That at the end of the motion, the following be added, namely:---
"but regret that there is no mention in the Address about the need for rehabilitation of all the victims of the disastrous earthquake of Gujarat without any bias or discrimination against affected Muslims and Dalits." (5)
[Shri G.M. Banatwalla]
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about a crash plan for alleviation of poverty." (6)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the need for a National Pension and Welfare Policy for the infirm, destitute, handicapped and the aged." (7)
That at the end of the motion, the following be added, namely:--
"but regret that there is no mention in the Address about imbalance in the development of various regions in the country and the need for an action plan for balanced development of the country." (8)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the pressing need for the educational and economic development of the minorities." (9)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the need for Statutory schemes for providing compensation to and rehabilitation of the victims of violence, particularly the victims of communal riots." (10)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the need for reservation in Parliament, Legislatures, local bodies defence services and educational institutions for the minorities, particularly the Muslims." (11)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about any time-bound programme for solving the unemployment problem and also to give
'unemployment allowance' to all the unemployed registered with Employment Exchanges in the country." (12)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about inclusion of 'Right to Education' in the Constitution, as a Fundamental Right." (13)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about including the 'Right to work in the Constitution, as a Fundamental Right." (14)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about including the 'Right to-Shelter' in the Constitution, as a Fundamental Right." (15)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about including the 'Right to an adequate means of livelihood' in the Constitution, as a Fundamental Right." (16)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the need for free and compulsory education upto tenth standard and for making it a Fundamental Right in the Constitution." (17)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about an effective industrial policy to check migration from rural areas to urban areas." (18)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the need for immediate reforms in the judicial procedure for securing speedy justice." (19)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the need for introduction of the method of proportionate representation without any threshold in our electoral system." (20)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about ensuring voting rights at elections, to the Indian citizens working abroad." (21)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the decline in the value of rupee against dollar." (22)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the need to promote with special care the educational and economic interests of the people of the country, in particular those of the Scheduled Castes, Scheduled Tribes and the minorities and also to protect them from all forms of injustice and exploitation." (23)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the action taken for protection of places of worship of the minorities." (24)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the urgent need for expeditious clearance of court cases pertaining to Babri Masjid Ramjanam-Bhoomi dispute." (25)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the need to increase central investmen for the overall development of Kerala." (26)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the need for construction of a bridge across the river Bharathapuzha connecting Ponnani and Tirut in Malappuram district of Kerala." (27)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the pressing need to substantially increase the post and telegraph facilities in the Malappuram district of Kerala in view of the growing need for the same and also owing to the peculiarities and distinctive features relating to that State." (28)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the need to strengthen and to improve the functioning of the Minorities Financial Development Corporation." (29)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the need for appropriate legislation to ban exit polls during elections, particularly when elections are held in the country in a phased manners." (30)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about the need for a special package for the welfare of fishermen community, which is the most neglected section of our society, and also for the integrated development of coastal infrastructure." (31)
That at the end of the motion, the following be added, namely:"but regret that there is no mention in the Address about efforts made by the Government to secure termination of the United Nat ons sanction against Iraq." (32)
| english |
<gh_stars>1-10
2020年09月20日20时数据
Status: 200
1.郑爽不知道Kris是吴亦凡
微博热度:3862147
2.南师大回应一学生在宿舍死亡
微博热度:1348950
3.就好这一口 拿下每一刻
微博热度:1323324
4.尹正
微博热度:1299669
5.TFBOYS合体央视探班直播
微博热度:1230475
6.我的ID
微博热度:972925
7.我国九成以上成年人有牙周疾病
微博热度:947453
8.1986年至2020年的天安门广场花坛
微博热度:776964
9.第七次全国人口普查将于11月开启
微博热度:639268
10.一建
微博热度:582975
11.台湾
微博热度:538532
12.陈伟霆杨幂面具自拍
微博热度:531205
13.琉璃收官云歌会
微博热度:506184
14.RNG GNR
微博热度:421498
15.重庆高空索道坠落女子已去世
微博热度:369695
16.各地月饼轻装上市
微博热度:364066
17.外卖小哥载交警一路猛追酒驾男
微博热度:363356
18.宿舍染发染成案发现场
微博热度:362051
19.央视镜头下的杨紫
微博热度:361719
20.铁人三项选手将奖牌让给对手
微博热度:360062
21.原来这就是言情小说脸
微博热度:359232
22.肖战星推荐
微博热度:358578
23.女生的手可以拿多少东西
微博热度:356632
24.超模黄金奶
微博热度:356191
25.徒步非洲感染新冠大学生回应质疑
微博热度:354345
26.央视中秋晚会完成录制
微博热度:353988
27.岳云鹏自制借钱申请表
微博热度:352422
28.心疼刘学义
微博热度:351981
29.黄海南部海域将进行实弹射击
微博热度:350464
30.加拿大前总理特纳去世
微博热度:349684
31.当吵架后发现男友是对的时
微博热度:348904
32.王菊 女人化妆是为了自己
微博热度:333589
33.宋妍霏钻石口罩
微博热度:332695
34.护士和病人眼中的针
微博热度:317025
35.特朗普将提名候选填补金斯伯格席位
微博热度:274409
36.新疆的秋天到底有多美
微博热度:269927
37.王源谈App任意追踪侵犯隐私
微博热度:265935
38.杨钰莹金莎同框
微博热度:265531
39.小朋友的作业有多好笑
微博热度:234197
40.觉得画中人在一点点转过身来
微博热度:198782
41.南师大
微博热度:186797
42.藤木孝去世
微博热度:186698
43.能预知未来的逆时空人
微博热度:185517
44.抓拍过最好笑的照片
微博热度:184922
45.哇唧唧哇
微博热度:157567
46.毛不易线上演唱会
微博热度:145661
47.沉默的真相
微博热度:141963
48.天安门广场国庆花坛开始布置
微博热度:79103
49.央视镜头下的女明星
微博热度:77843
50.陆军西北大漠实弹演练40发齐射
微博热度:77782
| markdown |
In their heyday they were stars, either ruling the roost in their respective disciplines or touted for great things because of their undeniable talent. Putting in stellar performance after stellar performance, these players were known for their strong shot-making and incredible talent, with the potential to become all-time greats. However, they failed to keep up their performance level, and with the sheer glut of tennis stars who have emerged in the last 15 years, these players were forgotten in the shadow of the Slam champions and World No. 1s. The Champions Tennis League, however, has given a whole lot of players a chance to return to the limelight and put their obvious prowess to the test once again. Here are five super-talented players who have been 'rediscovered’, so to speak, in the CTL.
Although Cornet has never broken into the top 10 in the WTA rankings, she has come close, reaching No. 11 in 2009. Her 2015 season has not gone the way she would have liked, however, as the talented Frenchwoman, who ended 2014 in 20th, has dropped to No. 43 with a series of very early losses on the WTA circuit this year.
She has not progressed beyond the quarterfinals of any tournament at all in 2015, reaching only two of those and losing each one in straight sets – abysmally – 6-1, 6-1 against Venus Williams in Hong Kong, and 6-2, 6-0 against Anna Karolina Schmiedlova in Poland.
Cornet is undoubtedly very talented; she’s repeatedly slain the true giant of tennis, Serena Williams, taking her third straight win over the World No. 1 last year and earning the nickname ‘Serena Slayer’. But this year has been a different story, and she is no longer in the conversation of title contenders.
Playing for the Raipur Rangers in this year’s Champions Tennis League, Cornet has rediscovered some of her best form, twice defeating the reigning US Open champion Flavia Pennetta. The Frenchwoman is still all of 25 years old, and she could well turn her career around if she continues putting in strong performances next year.
Spain's Fernando Verdasco hit his highest ever singles ranking of 7th in 2009, but since then has seen a steady decline in form. Currently just managing a top-50 rank, the talented left-hander managed only two semi-final finishes on the ATP Tour this year – both of them on clay, the favourite surface for most Spanish players.
Although he has only ever finished reached one Major semifinal – the Australian Open in 2009, eventually losing to his compatriot, former World No. 1 and ‘King of Clay’ Rafael Nadal – Verdasco held his own in what is considered one of the greatest matches in tennis history.
He has had early exits in most tournaments this year, many of which have come against players far less experienced than himself.
Playing this year for the V Chennai Warriors, Verdasco had a renewed day in the sun, and he lit up the home courts with his heroics against Nagpur Orangers early in the tournament. He has continued playing at a high level after that, and has endeared himself to the Chennai crowd with his sparkling game.
Cypriot ace Marcos Baghdatis was a tennis prodigy, hitting #1 in the ITF juniors rankings at the age of 15 and joining the ATP world tour shortly thereafter. He had a standout year in 2006, finishing runner-up at the Australian Open, but from 2007 Baghdatis would see a decline in form.
The one-time 8th ranked tennis player dropped to 96 in the rankings, and although the ebullient Cypriot has managed a fairly steady rise to middle at 46th position in the ATP rankings, he's still far from where people expected him to be at this point of his career.
Known for his temper and expressive play, Baghdatis has occasionally attracted attention – and not all of it for the right reasons; he was fined by the Australian Open for breaking a racquet on court in 2012.
He has had a disappointing 2015 on the ATP World Tour, reaching just three semi-finals and one final, sadly taking none of those titles. However, the 30-year-old is keen to return to his once-stellar form, and with the Punjab Marshalls, he has continued his stellar play from the tournament last year.
Baghdatis memorably took the Pune Marathas to victory in the inaugural 2014 season, and he has been the talisman for the Punjab outfit this year. He may have been forgotten on the ATP tour, but he has certainly been a certifiable star in India the last two years.
Former World No. 1 Jelena Jankovic has slid down to a lowly (for her) 21st spot, after having finished in the top 10 for four straight years from 2007 to 2010. She ended the 2014 season in 16th, so her form has actually been dipping with each passing year.
Through the 2015 season the Serb has been in shaky, unsteady form, suffering straight-sets losses to opponents far lower-ranked than herself. These losses eventually saw the 30-year-old drop out of the top-20 for only the second time in the past eight years.
She had her moments of brilliance this year, most notably at Wimbledon as she upset reigning champion Petra Kvitova, eventually crashing out of the Championships in the fourth round – her strongest performance at Grand Slams this year. Jankovic also won titles in Hong Kong, Guangzhou and Nanchang, losing in the finals of Indian Wells to No. 2 Simona Halep. Despite some good performances, however, consistency has been missing from her game – she hasn't quite been like the Jankovic of old.
Playing for the Nagpur Orangers, however, Jankovic appears to have got back into her groove. The Serb, who has said she is aiming for the World No. 1 spot again, has shown flashes of brilliance as the league has progressed. She has beaten another former World No. 1 – Martina Hingis – already this year, and also defeated Heather Watson in the other singles match she has played.
Jankovic could well use this run of victories as a springboard for a successful 2016 season.
This might be a surprise choice to some, considering Martina Hingis is not what anyone would describe as ‘forgotten’, winning titles at three of four Grand Slams this year with partners Leander Paes and Sania Mirza.
But the Swiss Miss has not played singles since she took her second retirement, staying away from the format that saw her become the youngest ever World No. 1 in the history of the sport. She is considered one of the greatest singles players in the history of the sport, and even though she has stuck to doubles in her 'third’ career, she can still light up the court in the more popular format.
Hingis recently took on much-younger Heather Watson, the current British Number 1, utterly decimating her opponent and contributing massively to the Hyderabad Aces’ victory. Although she may have become a doubles specialist of late, it is the Hingis of the 1990s we have seen in full form at the Champions Tennis League, and that gives her the top spot on this list. | english |
Abu Dhabi: Top aides to U. S. President Donald Trump and Israeli Prime Minister Benjamin Netanyahu arrived in the United Arab Emirates on a historic flight from Tel Aviv on Monday to finalise a pact marking open relations between the Gulf power and Israel.
Even before discussions start in Abu Dhabi, the delegates made aviation history when the Israeli commercial airliner flew over Saudi territory on the direct flight from Tel Aviv to the UAE capital.
"That's what peace for peace looks like," Netanyahu tweeted, describing a deal for formal ties with an Arab state that does not entail handover of land that Israel captured in a 1967 war.
Announced on Aug. 13, the normalisation deal is the first such accommodation between an Arab country and Israel in more than 20 years and was catalysed largely by shared fears of Iran.
Palestinians were dismayed by the UAE's move, worried that it would weaken a long-standing pan-Arab position that called for Israeli withdrawal from occupied territory - and acceptance of Palestinian statehood - in return for normal relations with Arab countries.
Trump's senior adviser and son-in-law, Jared Kushner, and national security adviser Robert O'Brien head the U. S. delegation. The Israeli team is led by O'Brien's counterpart, Meir Ben-Shabbat. Officials will explore bilateral cooperation in areas such as commerce and tourism, and Israeli defence envoys are due to visit the UAE separately.
"I prayed yesterday at the (Western) Wall that Muslims and Arabs throughout the world will be watching this flight, recognising that we are all children of God, and that the future does not have to be pre-determined by the past," Kushner told reporters on the tarmac at Tel Aviv's Ben-Gurion airport.
Israeli officials hope the two-day trip will produce a date for a Washington signing ceremony, perhaps as early as September, between Netanyahu and Abu Dhabi's Crown Prince Sheikh Mohammed bin Zayed al-Nahyan.
That could give Trump a foreign policy boost ahead of his re-election bid in November.
The Trump administration has tried to coax other Sunni Arab countries concerned about Iran to engage with Israel. The most powerful of those, Saudi Arabia, while opening its airspace to the El Al flight, has signalled it is not ready.
Hours before the plane landed three people were killed and several others were injured in two separate explosions in Abu Dhabi and UAE tourism hub Dubai, police and local media said.
The Abu Dhabi government media office said two people were killed in the blast in the capital, which the National daily reported had hit KFC and Hardee's restaurants.
In a second incident, one person was killed when a gas cylinder exploded in a Dubai restaurant, local media reported.
Like all El Al 737s, the aircraft was equipped with an anti-missile system, an Israeli spokesman said, and carried security agents of the U. S. Secret Service and the Israeli Shin Bet to guard the delegations.
On board the packed airliner, passengers were welcomed in Arabic as well as English and Hebrew, a gesture marking the historic flight.
"Wishing us all salaam, peace and shalom, have a safe flight," the pilot, Captain Tal Becker, said on the intercom, in Arabic, English and Hebrew, using all three languages to also announce the flight number and destination.
Hanan Ashrawi, a member of the Palestine Liberation Organisation's executive committee, said Kushner and his team were "scrambling to convince as many Arab and Muslim leaders as possible" to give Trump an election boost.
"They will be a prop at the backdrop of a meaningless spectacle for a ridiculous agreement that will not bring peace to the region," she said. | english |
Jorge Masvidal has his eyes on a former UFC welterweight title challenger as his potential next opponent.
In a recent interview with The Fighter vs The Writer for MMA Fighting, Gilbert Burns wanting a fight with Jorge Masvidal was brought up.
Watch the video below:
This desire was communicated, along with the fact that 'Durinho' said he would sign a contract to have no takedowns transpire in their possible clash.
Burns is back at the gym, seemingly chomping at the bit to get his next assignment.
In response, Masvidal said:
"No, no, no. I don't want Gilbert (Burns) to sign no contract that says no takedowns. Do your game, my brother. Do what's gotten you here, I know he's a world champion in BJJ. I'm trying to work on my grappling to always get it better. Do everything that God has allowed you to do and blessed you to do. Definitely a fight that interests me. "
"Before the Conor (McGregor) fight came up, that's the one that called me out. And I was like man, this is a guy that comes to fight. The whole world doesn't know him but they will because man, he comes to fight. He's gonna try to choke you out, knock you out, he just has a good style. I like to fight. "
"Once some of these legal issues that I got going on kind of, you know, then I'm setting a date. That's another reason why we're not setting dates right now. Because I just got to figure out some things then we'll lock it in, you know. "
In his response to Burns, Jorge Masvidal mentioned that he hopes to be able to compete at least once more in 2022, preferably towards the tail end of the calendar year.
That would mark his second octagon foray of 2022, with the other being his unanimous decision loss to Colby Covington at UFC 272 in March.
'Gamebred' has not competed since, as an alleged outside-the-cage attack on Colby Covington transpired in the fall-out from their pay-per-view main event.
This conflict led to the aforementioned legal issues Masvidal touched on in his earlier quote.
How do you feel about a possible Jorge Masvidal and Gilbert Burns fight? Give us your thoughts in the comments! | english |
package kandinsky
import (
"bytes"
"fmt"
"math"
"reflect"
"sync"
"github.com/gosvg/gosvg"
)
// Marshal marshals a value into a valid SVG document represented as a byte slice.
// Users should note that size here represents a nominal document size; SVG documents
// are vector graphics and as such do not have a notion of image size. This will simply
// provide a sensible default for web browsers or other viewers when displaying the output.
func Marshal(i interface{}, size float64) ([]byte, error) {
if size <= 0 {
return nil, fmt.Errorf("kandinsky: invalid marshal size")
}
var b bytes.Buffer
s := gosvg.NewSVG(size, size)
g := s.Group()
e := &encodeState{Group: g, size: size}
err := e.marshal(reflect.ValueOf(i))
if err != nil {
return nil, err
}
s.Render(&b)
return b.Bytes(), nil
}
// encodeState encodes data into a bytes.Buffer.
type encodeState struct {
*gosvg.Group // accumulated output
size float64
}
func (e *encodeState) marshal(v reflect.Value) error {
f, err := valueEncoder(v)
if err != nil {
return err
}
return f(e, v)
}
type encoderFunc func(*encodeState, reflect.Value) error
// UnsupportedTypeError represents an error condition where kandinsky does not support
// the provided type for marshaling.
type UnsupportedTypeError struct {
t reflect.Type
}
func (e UnsupportedTypeError) Error() string {
return fmt.Sprintf("goviz: unsupported type %s (kind %s)", e.t.String(), e.t.Kind())
}
// InvalidValueError represents an error condition where the given value for a type
// is not marshalable by kandinsky.
type InvalidValueError struct {
v reflect.Value
}
func (e InvalidValueError) Error() string {
return fmt.Sprintf("goviz: invalid value %s", e.v.String())
}
func valueEncoder(v reflect.Value) (encoderFunc, error) {
if !v.IsValid() {
panic(InvalidValueError{v: v})
return nil, InvalidValueError{v: v}
}
return typeEncoder(v.Type())
}
func newTypeEncoder(t reflect.Type) (encoderFunc, error) {
switch t.Kind() {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
return intEncoder, nil
case reflect.Uint8:
return byteEncoder, nil
case reflect.Float32, reflect.Float64:
return floatEncoder, nil
case reflect.Bool:
return boolEncoder, nil
case reflect.String:
return stringEncoder, nil
case reflect.Struct:
return structEncoder, nil
case reflect.Slice:
return sliceEncoder, nil
case reflect.Map:
return mapEncoder, nil
case reflect.Interface:
return ifaceEncoder, nil
case reflect.Ptr:
return ptrEncoder, nil
default:
return nil, UnsupportedTypeError{t: t}
}
}
var encoderCache struct {
m map[reflect.Type]encoderFunc
sync.RWMutex
}
// we try to cache types here because building encoders is expensive.
func typeEncoder(t reflect.Type) (encoderFunc, error) {
encoderCache.RLock()
f := encoderCache.m[t]
encoderCache.RUnlock()
if f != nil {
return f, nil
}
f, err := newTypeEncoder(t)
if err != nil {
return nil, err
}
// lock the cache and initialize it
encoderCache.Lock()
if encoderCache.m == nil {
encoderCache.m = make(map[reflect.Type]encoderFunc)
}
encoderCache.m[t] = f
encoderCache.Unlock()
return f, nil
}
func ifaceEncoder(e *encodeState, v reflect.Value) error {
return e.marshal(v.Elem())
}
func ptrEncoder(e *encodeState, v reflect.Value) error {
elem := v.Elem()
if !elem.IsValid() {
return nil
}
return e.marshal(elem)
}
// ints in kandinsky encode as 8x8 (64-bit) matrices. MSB
// is at the top left, LSB is in the lower right. positive
// integers are rendered in black and negative in red.
func intEncoder(e *encodeState, v reflect.Value) error {
sz := e.size
val := int(v.Int())
color := "black"
if val <= 0 {
color = "red"
val = -val
}
factor := .1
cellSz := (sz / 8)
blkSz := cellSz * (1 - factor)
margin := cellSz * (factor / 2)
for y := sz - cellSz; y > 0; y -= cellSz {
for x := sz - cellSz; x > 0; x -= cellSz {
bit := val % 2
if bit == 1 {
r := e.Rect(x+margin, y-margin, blkSz, blkSz)
r.Style.Set("stroke-width", "0")
r.Style.Set("fill", color)
}
val = val >> 1
if val == 0 {
return nil
}
}
}
return nil
}
// bytes render as a set of up to 8 stacked bars.
func byteEncoder(e *encodeState, v reflect.Value) error {
val := v.Uint()
sz := e.size
h := sz / 8.0
factor := .2
blkH := h * (1 - factor)
margin := h * (factor / 2)
for y := sz - h; y > 0; y -= h {
bit := val % 2
if bit == 1 {
r := e.Rect(margin, y-margin, sz-margin, blkH)
r.Style.Set("stroke-width", "0")
r.Style.Set("fill", "black")
}
val = val >> 1
if val == 0 {
return nil
}
}
return nil
}
// strings render as a slice of bytes.
func stringEncoder(e *encodeState, v reflect.Value) error {
b := reflect.ValueOf([]byte(v.String()))
return e.marshal(b)
}
// floats currently only render in [-1, 1] as a circle filling a
// proportionate amount of the alloted space.
func floatEncoder(e *encodeState, v reflect.Value) error {
sz := e.size
val := float64(v.Float())
val *= float64(sz / 2)
fill := "black"
if val <= 0 {
fill = "red"
val = -val
}
x := sz / 2
y := x
c := e.Circle(x, y, val)
c.Style.Set("fill", fill)
c.Style.Set("stroke", fill)
return nil
}
// bools render as a triangle pointing up for true and down for
// false.
func boolEncoder(e *encodeState, v reflect.Value) error {
sz := e.size
factor := .25
factorD2 := factor / 2
h := sz * (1 - factor)
color := "black"
val := v.Bool()
// y = sin(1/3 * pi)*h for making equilateral triangle
sinY := 0.866 * h
x1, x2, x3 := sz*factorD2, sz/2, sz*(1-factorD2)
hi, lo := x1, sinY+x1
if val == false {
hi, lo = lo, hi
color = "red"
}
pts := []gosvg.Point{{x1, lo}, {x2, hi}, {x3, lo}}
p := e.Polygon(pts...)
p.Style.Set("stroke-width", "0")
p.Style.Set("fill", color)
return nil
}
// structEncoder renders the fields of the struct in order of their
// declaration in source. fields are displayed in a square grid which
// is guaranteed to have enough cells to render all fields.
func structEncoder(e *encodeState, v reflect.Value) error {
sz := e.size
t := v.Type()
numFields := t.NumField()
// short circuit if numFields is 0
if numFields == 0 {
return nil
}
width := int(math.Ceil(math.Sqrt(float64(numFields))))
cellSz := sz / float64(width)
cellPt := 1 / float64(width)
x := 0
y := 0
g := e.Group.Group()
for i := 0; i < numFields; i++ {
xF := float64(x) * cellSz
yF := float64(y) * cellSz
s := g.Group()
s.Transform.Translate(xF, yF)
s.Transform.Scale(cellPt, cellPt)
enc := &encodeState{
Group: s,
size: sz,
}
errMarshal := enc.marshal(v.Field(i))
if errMarshal != nil {
return errMarshal
}
x++
if x == width {
y++
x = 0
}
}
return nil
}
// mapEncoder encodes maps as a slice of key-value pairs.
func mapEncoder(e *encodeState, v reflect.Value) error {
type kvPair struct {
k1 interface{}
v1 interface{}
k2 interface{}
v2 interface{}
}
keys := v.MapKeys()
kvPairs := make([]kvPair, 0, (len(keys)+1)/2)
if len(keys) == 0 {
return nil
}
var (
p kvPair
isOdd bool
)
for _, k := range keys {
val := v.MapIndex(k)
if !isOdd {
p.k1, p.v1 = k.Interface(), val.Interface()
} else {
p.k2, p.v2 = k.Interface(), val.Interface()
kvPairs = append(kvPairs, p)
}
isOdd = !isOdd
}
if !isOdd {
kvPairs = append(kvPairs, p)
}
return sliceEncoder(e, reflect.ValueOf(kvPairs))
}
// sliceEncoder acts similarly to structEncoder, except instead of rendering
// fields in each grid cell the encoder renders indexes.
func sliceEncoder(e *encodeState, v reflect.Value) error {
sz := e.size
length := v.Len()
// short circuit if length is 0
if length == 0 {
return nil
}
width := int(math.Ceil(math.Sqrt(float64(length))))
cellSz := sz / float64(width)
cellPt := 1 / float64(width)
x := 0
y := 0
g := e.Group.Group()
for i := 0; i < length; i++ {
xF := float64(x) * cellSz
yF := float64(y) * cellSz
s := g.Group()
s.Transform.Translate(xF, yF)
s.Transform.Scale(cellPt, cellPt)
enc := &encodeState{
Group: s,
size: sz,
}
errMarshal := enc.marshal(v.Index(i))
if errMarshal != nil {
return errMarshal
}
x++
if x == width {
y++
x = 0
}
}
return nil
}
| go |
!function(exports) {
exports.mocha.setup('bdd');
function assert(expr, msg) {
if (!expr) throw new Error(msg || 'failed');
}
assert.equal = function(a, b, msg) {
if (a != b) throw new Error (msg || a + '!=' + b);
};
exports.assert = assert;
var now = new Date()
, mins = new Date(now.getTime() - (30 * 60 * 1000))
, hrs = new Date(now.getTime() - (2 * 60 * 60 * 1000))
, days = new Date(now.getTime() - 259200000)
, wks = new Date(now.getTime() - 1209600000)
, mths = new Date(now.getTime() - 10512000000)
, yrs = new Date(now.getTime() - 31556952000);
var fixture = [{
"_id": "12312"
, "_rev": "1-asdf"
, "text": "moments ago"
, "user":"sadf"
, "created": +now
}, {
"_id": "23423"
, "_rev": "1-asdfsdf"
, "text": "30 minutes ago"
, "user": "sadf"
, "created": +mins
}, {
"_id": "123adf"
, "_rev": "1-asdfsdf"
, "text": "2 hours ago"
, "user": "sadf"
, "created": +hrs
}, {
"_id": "g342"
, "_rev": "1-asdfsdf"
, "text": "2 weeks ago"
, "user": "sadf"
, "created": +wks
}, {
"_id": "324sdf"
, "_rev": "1-asdfsdf"
, "text": "3 days ago"
, "user": "sadf"
, "created": +days
}, {
"_id": "sdf"
, "_rev": "1-asdfsdf"
, "text": "4 months ago"
, "user": "sadf"
, "created": +mths
}, {
"_id": "23q423"
, "_rev": "1-asdfsdf"
, "text": yrs.toLocaleDateString()
, "user": "sadf"
, "created": +yrs
}];
var server = sinon.fakeServer.create();
server.autoRespond = true;
server.respondWith('GET', '/tweets', [200, {'Content-Type': 'application/json'}, JSON.stringify(fixture)]);
server.respondWith('POST', '/tweets', [200, {'Content-Type': 'application/json'}, JSON.stringify({'_id': '11234sdf', '_rev': '23434', created: + new Date()})])
server.respondWith('PUT', /\/tweets\/(\d)+/, [200, {'Content-Type': 'application/json'}, JSON.stringify({id: 123423, id_str: '123423', user: {screen_name: 'bananas'}})]);
server.respondWith('POST', '/tweets/instaPublish', [200, {'Content-Type': 'application/json'}, JSON.stringify({id: 123423, id_str: '123423', user: {screen_name: 'bananas'}})]);
server.respondWith('POST', /\/tweets\/publish\/(\d)+/, [200, {'Content-Type': 'application/json'}, JSON.stringify({id: 123423, id_str: '123423', user: {screen_name: 'bananas'}})]);
server.respondWith('DELETE', /\/tweets\/(\d)+/, [200, {'Content-Type': 'application/json'}, '']);
exports.server = server;
exports.fixture = fixture;
}(window) | javascript |
<reponame>hefox/rt-react<gh_stars>1-10
{"date":"2010 05 23","href":"Archives/2010/2010%2005%2023%20SF%20Leather%20Alliance%20Beer%20Bust","external":false,"name":"SF Leather Alliance Beer Bust","stub":"Archives--2010--2010-05-23-SF-Leather-Alliance-Beer-Bust","images":["thumbnails/IMG_0395.jpg","thumbnails/IMG_0397.jpg","thumbnails/IMG_0398.jpg","thumbnails/IMG_0400.jpg","thumbnails/IMG_0401.jpg","thumbnails/IMG_0403.jpg","thumbnails/IMG_0404.jpg","thumbnails/IMG_0407.jpg","thumbnails/IMG_0408.jpg","thumbnails/IMG_0409.jpg","thumbnails/IMG_0413.jpg","thumbnails/IMG_0415.jpg","thumbnails/IMG_0416.jpg","thumbnails/IMG_0417.jpg","thumbnails/IMG_0418.jpg","thumbnails/IMG_0420.jpg","thumbnails/IMG_0421.jpg","thumbnails/IMG_0423.jpg","thumbnails/IMG_0426.jpg","thumbnails/IMG_0428.jpg","thumbnails/IMG_0430.jpg","thumbnails/IMG_0433.jpg","thumbnails/IMG_0436.jpg","thumbnails/IMG_0438.jpg","thumbnails/IMG_0440.jpg","thumbnails/IMG_0442.jpg","thumbnails/IMG_0443.jpg","thumbnails/IMG_0446.jpg","thumbnails/IMG_0447.jpg","thumbnails/IMG_0448.jpg","thumbnails/IMG_0451.jpg","thumbnails/IMG_0452.jpg","thumbnails/IMG_0455.jpg","thumbnails/IMG_0459.jpg","thumbnails/IMG_0462.jpg","thumbnails/IMG_0463.jpg","thumbnails/IMG_0465.jpg","thumbnails/IMG_0468.jpg","thumbnails/IMG_0469.jpg","thumbnails/IMG_0471.jpg","thumbnails/IMG_0476.jpg","thumbnails/IMG_0478.jpg","thumbnails/IMG_0480.jpg","thumbnails/IMG_0482.jpg","thumbnails/IMG_0484.jpg","thumbnails/IMG_0485.jpg","thumbnails/IMG_0487.jpg","thumbnails/IMG_0488.jpg","thumbnails/IMG_0489.jpg","thumbnails/IMG_0491.jpg","thumbnails/IMG_0492.jpg","thumbnails/IMG_0494.jpg","thumbnails/IMG_0497.jpg","thumbnails/IMG_0499.jpg","thumbnails/IMG_0501.jpg","thumbnails/IMG_0503.jpg","thumbnails/IMG_0504.jpg","thumbnails/IMG_0506.jpg","thumbnails/IMG_0507.jpg","thumbnails/IMG_0508.jpg","thumbnails/IMG_0509.jpg","thumbnails/IMG_0510.jpg","thumbnails/IMG_0512.jpg","thumbnails/IMG_0514.jpg","thumbnails/IMG_0515.jpg","thumbnails/IMG_0516.jpg","thumbnails/IMG_0517.jpg","thumbnails/IMG_0518.jpg","thumbnails/IMG_0519.jpg","thumbnails/IMG_0521.jpg","thumbnails/IMG_0524.jpg","thumbnails/IMG_0531.jpg","thumbnails/IMG_0532.jpg","thumbnails/IMG_0536.jpg","thumbnails/IMG_0537.jpg","thumbnails/IMG_0539.jpg","thumbnails/IMG_0541.jpg","thumbnails/IMG_0542.jpg","thumbnails/IMG_0545.jpg","thumbnails/IMG_0546.jpg","thumbnails/IMG_0547.jpg"]} | json |
<reponame>ThanhZoro/tnt-project<filename>store/modules/history/_store/actions.js
import _ from 'lodash'
import firebase from 'firebase'
const getListUser = async (context, request) =>{
await firebase.database().ref('/users/').once('value').then((data) => {
var userData = {data: [], total: 0};
const obj = data.val();
for (let key in obj) {
userData.total++;
userData.data.push({
id: key,
fullName: obj[key].fullName ? obj[key].fullName : '',
phoneNumber: obj[key].phoneNumber ? obj[key].phoneNumber : '',
email: obj[key].email,
roleUser: obj[key].roleUser,
isDelete: obj[key].isDelete,
createdAt: obj[key].createdAt ? obj[key].createdAt : '',
updatedAt: obj[key].updatedAt ? obj[key].updatedAt : ''
})
}
context.commit('SET_LIST_USER', userData);
});
};
const setHistory = async (context, request) => {
context.commit('SET_HISTORY', { data: request ? request.data : null, total: request ? request.total : 0 });
};
export default {
getListUser,
setHistory
};
| javascript |
#map-canvas {
height: 400px;
width: 100%;
margin: 0;
padding: 0;
} | css |
package com.manuelmaly.hn.model;
import java.io.Serializable;
import java.util.ArrayList;
public class HNCommentTreeNode implements Serializable {
private static final long serialVersionUID = 1089928137259687565L;
private HNComment mComment;
private ArrayList<HNCommentTreeNode> mChildren;
private HNCommentTreeNode mParent;
private boolean mIsExpanded;
public HNCommentTreeNode(HNComment comment) {
mComment = comment;
mChildren = new ArrayList<HNCommentTreeNode>();
mIsExpanded = true;
}
public void addChild(HNCommentTreeNode child) {
mChildren.add(child);
child.setParent(this);
}
public void setParent(HNCommentTreeNode parent) {
mParent = parent;
}
public HNComment getComment() {
return mComment;
}
public HNCommentTreeNode getParent() {
return mParent;
}
public HNCommentTreeNode getRootNode() {
HNCommentTreeNode mRootNode;
if (mParent == null) {
mRootNode = this;
} else {
HNCommentTreeNode mCandidateRootNode = this;
while (mCandidateRootNode.getParent() != null) {
mCandidateRootNode = mCandidateRootNode.getParent();
}
mRootNode = mCandidateRootNode;
}
return mRootNode;
}
public ArrayList<HNCommentTreeNode> getChildren() {
return mChildren;
}
public ArrayList<HNComment> getVisibleComments() {
ArrayList<HNComment> visibleComments = new ArrayList<HNComment>();
visibleComments.add(getComment());
if (isExpanded()) {
for (HNCommentTreeNode child : mChildren)
visibleComments.addAll(child.getVisibleComments());
}
return visibleComments;
}
public boolean hasChildren() {
return mChildren != null && mChildren.size() > 0;
}
public boolean isExpanded() {
return mIsExpanded;
}
public void toggleExpanded() {
mIsExpanded = !mIsExpanded;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((mComment == null) ? 0 : mComment.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;
HNCommentTreeNode other = (HNCommentTreeNode) obj;
if (mComment == null) {
if (other.mComment != null)
return false;
} else if (!mComment.equals(other.mComment))
return false;
return true;
}
}
| java |
The Union government had passed the bill that aims at increasing the marriage age for women to 21 amid protests from the opposition parties in the house. As the opposition parties are condemning the bill and alleging that the bill was brought for political gains, Prime Minister Narendra Modi took an indirect dig at the opposition parties.
Prime Minister Narendra Modi who was in Uttar Pradesh to launch a scheme, addressed a gathering in Prayagraj and took potshots at the opposition parties without taking any names.
Saying that the minimum marriage age of women was increased to help women in studying and prosper, Narendra Modi said that some are getting pained with this. He asked why people are having issues when a decision was taken for the betterment of the daughters of the country.
Adding further, the Prime Minister said that the government is aiming for the empowerment of the daughters of the country without any rest. On the same lines, the marriage age was increased and people have problems even with this, he said.
Highlighting how the Union Government is working on the empowerment of women, Narendra Modi mentioned the flagship scheme launched by the Centre 'Beti Bachao, Beti Padhao'. The nutrition of women during pregnancy was also improved, he said. | english |
Written Answers
के महीने में विष्णु गार्डन नई दिल्ली में हत्या करने का आरोप लगाया गया है; और
(ख) यदि हां, तो सरकार इस सम्बन्ध में क्या कार्यवाही कर रही है ?
गृह मंत्रालय में उपमंत्री (श्री एफ० एच० मोहसिन) : (क) और (ख) दिल के उप राज्यपाल को सम्बोधित एक शिकायत प्राप्त हुई थी। इसका सम्बन्ध श्री बोध राम की हत्या के बारे में थाना तिलक नगर में भारतीय दण्ड सहिता की धाग 302/ 147/148/149 के 6 धीन दर्ज एक मामला एफ० आई० भार संख्या 864, दिनांक 7 अक्तूबर, 1974 मे था । मामले की जांच करने के लिए एक सब डिवीजनल मैजिस्ट्रेट प्रतिनियुक्त किया गया है ।
Closing of Post Offices
5652. SHRI B. V. NAIK. Will the Minister of COMMUNICATIONS pleased to state.
(a) whether the Department of Posts and Telegraphs has decided to close down a large number of post offices in the country on grounds of lack of profits; and
(b) if so, their number?
THE MINISTER OF COMMUNICATIONS (DR. SHANKER SHARMA): (a) and (b) No Post Office is closed as long as it is able to provide revenue matching its cost. In fact post offices are opened and continued even when they incur loss provided they fulfil the minimum condi. tions of distance from the existing post offices and the population served by them.
Written Answers 188
After the expiry of the experimental period of 10 years are declared permanent if the annual loss is upto Rs. 240/- Rs. 360/- or Rs. 500/- depending on their distance from the nearest post offices,
The existing policy admits annual loss upto Rs. 500/- and Rs. 750/- in ordinary rural areas and Rs. 1000/in backward, hilly and tribal areas.
Even when the loss exceeds the prescribed maximum limits the post offices are not closed if an interested party comes forth to pay the NonReturnable Contribution. The whole policy is, however, under review.
Opening of Television Centres in Fifth Plan and T.V. and Community T.V. Sets in operation
5653. SHRI B. V. NAIK: Will the Minister of INFORMATION AND BROADCASTING be uleased to state:
(a) the centres programmed for television coverage during the Fifth Five Year Plan;
(b) the number of television sets in operation in this country at present; and
(c) the number of community sets among them?
THE DEPUTY MINISTER IN THE MINISTRY OF INFORMATION AND BROADCASTING (SHRI DHARAM BIR SINHA): (a) T. V. Centres Delhi, Bombay (with a Relay Cent.e at Poona), Srinagar and a transmitting station at Amritsar re already functioning at present. A relay centre at Mussoorie to telecast programmes from Delhi, and T. V. stations at Calcutta. Madras, Lucknow (with a relay centre at Kanpur), and Jullundur (with a relay centre at Kasauli) are expected to start functioning during the Fifth Plan period. It is also proposed for the sake of providing continuity Television services started as a part of the Satellite Instructional Television Experiment to set up a produc tion centre at Patna with transmission facilities and augment the existing programme production facilities at Cuttack and Hyderabad and also to set up a few relay centres aftached to them, depending upon the availability of resources.
| english |
<reponame>vakuras/moleculardynamics
///
/// Host Implementation
///
/// Molecular Dynamics Simulation on GPU
///
/// Written by <NAME>. 2009-2010.
///
#include "Host.h"
///
/// Simulation main host function
///
int hostMain(CUdevice device, char * module_path, configuration * config)
{
real4 * posArray; //positions (host)
real3 * velocityArray; //velocity (host)
bool * flag; //box hit flag (host)
int * ljList = NULL; //lennard jones neigbor list pointer
int * mbList = NULL; //many body neigbor list pointer
listSettings lj; //lennard jones neigbor list settings
listSettings mb; //many body neigbor list settings
float highestVelocity; //heighest velocity
int timesteps; //timestep counter
int ljNextBuild; //on which timestep to call the build of the lennard jones list
int mbNextBuild; //on which timestep to call the build of the many body list
float boxSize=pow((float)(config->LennardJonesParticles + config->ManyBodyParticles),1.0f/3.0f)*52.8f; //box size
float boxSizeList; //box size for the neighbor lists
int buckets; //bucket count for the neighbor list
bool fallbackmb = false; //fallback from tpp to bpp for many body
bool fallbacklj = false; //fallback from tpp to bpp for lennard jones
vector<results> resultVec; //results vector
vector<float*> posVec; //position vector for animation
vector<float*> velVec; //velocity vector for animation
#ifdef USECUDADEBUG
float * informationMemory; //information memory pointer
CUdeviceptr devInformation; //information memory pointer for cuda
//vibLJ, vibMB, kinetic, temperature, centerOfMass, momentum
const int informationSize = sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float3)+sizeof(real3);
#endif
//device variables
CUdeviceptr devPosArray; //positions cuda pointer
CUdeviceptr devVelocityArray; //velocity cuda pointer
CUdeviceptr devAAccArray; //acceleration cuda pointer
CUdeviceptr devForceArray; //force cuda pointer
CUdeviceptr devBAccArray; //b-acc cuda pointer
CUdeviceptr devCAccArray; //c-acc cuda pointer
CUdeviceptr devMemAlloc; //device block-shared memory pointer
CUdeviceptr devFlag; //device box-hit-flag
CUcontext context; //device context
CUmodule module; //cude module (.ptx file)
//function pointers from module:
#ifdef USECUDADEBUG
CUfunction performCalculations;
CUfunction calculatePotentional;
#endif
CUfunction correct;
CUfunction predict;
CUfunction lennardJonesForces;
CUfunction lennardJonesForcesBPP;
CUfunction manyBodyForces1;
CUfunction manyBodyForces2;
CUfunction manyBodyForcesBPP1;
CUfunction manyBodyForcesBPP2;
CUfunction calculateAccelerations;
//textures for neighbor lists
CUarray devLjList = NULL;
CUarray devMbList = NULL;
CUtexref devLjTexRef = NULL;
CUtexref devMbTexRef = NULL;
//function build helpers - for use by consts defined in Host.h (CUDA_DEF_SET, CUDA_RESET_OFFSET... and so)
void * ptr;
int offset;
unsigned int val;
float fval;
int nlsoffset; //neighbor list 'largest list size' byte offset in the byte array of the force calculation functions
//block configuration
int BlocksPerGrid = config->CudaBlocks;
int ThreadsPerBlocks = (config->LennardJonesParticles + config->ManyBodyParticles)/BlocksPerGrid + ((config->LennardJonesParticles + config->ManyBodyParticles)%BlocksPerGrid == 0 ? 0:1);
int mbThreadsPerBlocks = config->ManyBodyParticles/BlocksPerGrid + (config->ManyBodyParticles%BlocksPerGrid == 0 ? 0:1);
//time-measure events
CUevent start;
CUevent stop;
float elapsedTime;
config->energyLoss = sqrt(config->energyLoss); //fix energy loss
//create context
CU_SAFE_CALL(cuCtxCreate(&context, 0, device));
//load module
CU_SAFE_CALL(cuModuleLoad(&module, module_path));
//get functions
#ifdef USECUDADEBUG
CU_SAFE_CALL(cuModuleGetFunction(&performCalculations, module, "performCalculations"));
CU_SAFE_CALL(cuModuleGetFunction(&calculatePotentional, module, "calculatePotentional"));
#endif
CU_SAFE_CALL(cuModuleGetFunction(&predict, module, "predict"));
CU_SAFE_CALL(cuModuleGetFunction(&correct, module, "correct"));
CU_SAFE_CALL(cuModuleGetFunction(&calculateAccelerations, module, "calculateAccelerations"));
if (config->useLennardJones) //if using lennard jones
{
CU_SAFE_CALL(cuModuleGetFunction(&lennardJonesForcesBPP, module, "lennardJonesForcesBPP"));
CU_SAFE_CALL(cuModuleGetFunction(&lennardJonesForces, module, "lennardJonesForces"));
}
if (config->useManyBody) //if using many body
{
CU_SAFE_CALL(cuModuleGetFunction(&manyBodyForcesBPP1, module, "manyBodyForcesBPP1"));
CU_SAFE_CALL(cuModuleGetFunction(&manyBodyForcesBPP2, module, "manyBodyForcesBPP2"));
CU_SAFE_CALL(cuModuleGetFunction(&manyBodyForces1, module, "manyBodyForces1"));
CU_SAFE_CALL(cuModuleGetFunction(&manyBodyForces2, module, "manyBodyForces2"));
CU_SAFE_CALL(cuMemAlloc(&devMemAlloc,sizeof(float2) * config->ManyBodyParticles * config->ManyBodyParticles)); //allocate memory used by many body
}
//set events
CU_SAFE_CALL(cuEventCreate(&start, CU_EVENT_DEFAULT));
CU_SAFE_CALL(cuEventCreate(&stop, CU_EVENT_DEFAULT));
//allocate memory for data on host (for future device mapping)
CU_SAFE_CALL(cuMemAllocHost((void**)&posArray, (config->LennardJonesParticles + config->ManyBodyParticles) * sizeof(real4)));
CU_SAFE_CALL(cuMemAllocHost((void**)&velocityArray, (config->LennardJonesParticles + config->ManyBodyParticles) * sizeof(real3)));
#ifdef USECUDADEBUG
CU_SAFE_CALL(cuMemAllocHost((void**)&informationMemory, informationSize));
#endif
CU_SAFE_CALL(cuMemAllocHost((void**)&flag, sizeof(bool)));
//allocate memory for data on device
CU_SAFE_CALL(cuMemAlloc(&devPosArray,sizeof(real4) * (config->LennardJonesParticles + config->ManyBodyParticles)));
CU_SAFE_CALL(cuMemAlloc(&devVelocityArray,sizeof(real3) * (config->LennardJonesParticles + config->ManyBodyParticles)));
CU_SAFE_CALL(cuMemAlloc(&devAAccArray,sizeof(real3) * (config->LennardJonesParticles + config->ManyBodyParticles)));
CU_SAFE_CALL(cuMemAlloc(&devForceArray,sizeof(real3) * (config->LennardJonesParticles + config->ManyBodyParticles)));
CU_SAFE_CALL(cuMemAlloc(&devBAccArray,sizeof(real3) * (config->LennardJonesParticles + config->ManyBodyParticles)));
CU_SAFE_CALL(cuMemAlloc(&devCAccArray,sizeof(real3) * (config->LennardJonesParticles + config->ManyBodyParticles)));
#ifdef USECUDADEBUG
CU_SAFE_CALL(cuMemAlloc(&devInformation,informationSize));
#endif
CU_SAFE_CALL(cuMemAlloc(&devFlag,sizeof(bool)));
//number of buckets for list hashs
buckets = (config->LennardJonesParticles + config->ManyBodyParticles) * 3;
mb.nlargestsize = lj.nlargestsize = 0;
if (config->useLennardJones) //set lennard jones list settings
{
lj.maxnlmove = ((config->LennardJonesRS) - (config->LennardJonesRCUT)) * 0.5f;
lj.maxnlmovesq = pow(lj.maxnlmove, 2);
lj.rcutsq = pow(config->LennardJonesRCUT,2);
lj.rcut = config->LennardJonesRCUT;
lj.rs = config->LennardJonesRS;
}
if (config->useManyBody) //set many body list settings
{
mb.maxnlmove = ((config->ManyBodyRS) - (config->ManyBodyRCUT)) * 0.5f;
mb.maxnlmovesq = pow(mb.maxnlmove, 2);
mb.rcutsq = pow(config->ManyBodyRCUT,2);
mb.rcut = config->ManyBodyRCUT;
mb.rs = config->ManyBodyRS;
}
#ifdef USECUDADEBUG
//parameter setup for performCalculations
CUDA_RESET_OFFSET; //reset offset to zero
CUDA_POINTER_ALLOC(performCalculations, devPosArray); //allocate pointer in the byte array of the function
CUDA_POINTER_ALLOC(performCalculations, devVelocityArray);
val = (config->LennardJonesParticles + config->ManyBodyParticles);
CUDA_UINT_ALLOC(performCalculations, val); //allocate unsigned int in the byte array of the function
CUDA_POINTER_ALLOC(performCalculations, devInformation);
CU_SAFE_CALL(cuParamSetSize( performCalculations, offset )); //set byte array size
CU_SAFE_CALL(cuFuncSetBlockShape( performCalculations, 1, 1, 1 )); //set block grid
//parameter setup for calculatePotentional
CUDA_RESET_OFFSET;
CUDA_POINTER_ALLOC(calculatePotentional, devPosArray);
val = (config->LennardJonesParticles + config->ManyBodyParticles);
CUDA_UINT_ALLOC(calculatePotentional, val);
CUDA_POINTER_ALLOC(calculatePotentional, devInformation);
CU_SAFE_CALL(cuParamSetSize( calculatePotentional, offset ));
CU_SAFE_CALL(cuFuncSetBlockShape( calculatePotentional, ThreadsPerBlocks, 1, 1 ));
#endif
//parameter setup for predict
CUDA_RESET_OFFSET;
CUDA_POINTER_ALLOC(predict, devPosArray);
CUDA_POINTER_ALLOC(predict, devVelocityArray);
CUDA_POINTER_ALLOC(predict, devAAccArray);
CUDA_POINTER_ALLOC(predict, devBAccArray);
CUDA_POINTER_ALLOC(predict, devCAccArray);
fval = config->DT;
CUDA_FLOAT_ALLOC(predict, fval); //allocate float in the byte array of the function
val = (config->LennardJonesParticles + config->ManyBodyParticles);
CUDA_UINT_ALLOC(predict, val);
CU_SAFE_CALL(cuParamSetSize( predict, offset ));
CU_SAFE_CALL(cuFuncSetBlockShape( predict, ThreadsPerBlocks, 1, 1 ));
//parameter setup for correct
CUDA_RESET_OFFSET;
CUDA_POINTER_ALLOC(correct, devPosArray);
CUDA_POINTER_ALLOC(correct, devVelocityArray);
CUDA_POINTER_ALLOC(correct, devForceArray);
CUDA_POINTER_ALLOC(correct, devAAccArray);
CUDA_POINTER_ALLOC(correct, devBAccArray);
CUDA_POINTER_ALLOC(correct, devCAccArray);
fval = config->DT;
CUDA_FLOAT_ALLOC(correct, fval);
val = (config->LennardJonesParticles + config->ManyBodyParticles);
CUDA_UINT_ALLOC(correct, val);
fval = boxSize;
CUDA_FLOAT_ALLOC(correct, fval);
CUDA_POINTER_ALLOC(correct, devFlag);
fval = config->energyLoss;
CUDA_FLOAT_ALLOC(correct, fval);
CU_SAFE_CALL(cuParamSetSize( correct, offset ));
CU_SAFE_CALL(cuFuncSetBlockShape( correct, ThreadsPerBlocks, 1, 1 ));
//parameter setup for calculateAccelerations
CUDA_RESET_OFFSET;
CUDA_POINTER_ALLOC(calculateAccelerations, devPosArray);
CUDA_POINTER_ALLOC(calculateAccelerations, devForceArray);
CUDA_POINTER_ALLOC(calculateAccelerations, devAAccArray);
val = (config->LennardJonesParticles + config->ManyBodyParticles);
CUDA_UINT_ALLOC(calculateAccelerations, val);
CU_SAFE_CALL(cuParamSetSize( calculateAccelerations, offset ));
CU_SAFE_CALL(cuFuncSetBlockShape( calculateAccelerations, ThreadsPerBlocks, 1, 1 ));
if (config->useLennardJones)
{
//parameter setup for lennardJonesForcesBPP
CUDA_RESET_OFFSET;
CUDA_POINTER_ALLOC(lennardJonesForcesBPP, devPosArray);
CUDA_POINTER_ALLOC(lennardJonesForcesBPP, devForceArray);
fval = lj.rcutsq;
CUDA_FLOAT_ALLOC(lennardJonesForcesBPP, fval);
CU_SAFE_CALL(cuParamSetSize( lennardJonesForcesBPP, offset ));
//parameter setup for lennardJonesForces
CUDA_RESET_OFFSET;
CUDA_POINTER_ALLOC(lennardJonesForces, devPosArray);
CUDA_POINTER_ALLOC(lennardJonesForces, devForceArray);
val = 0; //temporarily
CUDA_GET_OFFSET(nlsoffset);
CUDA_UINT_ALLOC(lennardJonesForces, val);
val = (config->LennardJonesParticles + config->ManyBodyParticles);
CUDA_UINT_ALLOC(lennardJonesForces, val);
fval = lj.rcutsq;
CUDA_FLOAT_ALLOC(lennardJonesForces, fval);
CU_SAFE_CALL(cuParamSetSize( lennardJonesForces, offset ));
CU_SAFE_CALL(cuFuncSetBlockShape( lennardJonesForces, ThreadsPerBlocks, 1, 1 ));
}
if (config->useManyBody)
{
//parameter setup for manyBodyForcesBPP1
CUDA_RESET_OFFSET;
CUDA_POINTER_ALLOC(manyBodyForcesBPP1, devPosArray);
CUDA_POINTER_ALLOC(manyBodyForcesBPP1, devForceArray);
fval = mb.rcutsq;
CUDA_FLOAT_ALLOC(manyBodyForcesBPP1, fval);
val = config->ManyBodyParticles;
CUDA_UINT_ALLOC(manyBodyForcesBPP1, val);
CUDA_POINTER_ALLOC(manyBodyForcesBPP1, devMemAlloc);
val = config->useLennardJones;
CUDA_UINT_ALLOC(manyBodyForcesBPP1, val);
CU_SAFE_CALL(cuParamSetSize( manyBodyForcesBPP1, offset ));
//parameter setup for manyBodyForcesBPP2
CUDA_RESET_OFFSET;
CUDA_POINTER_ALLOC(manyBodyForcesBPP2, devPosArray);
CUDA_POINTER_ALLOC(manyBodyForcesBPP2, devForceArray);
fval = mb.rcutsq;
CUDA_FLOAT_ALLOC(manyBodyForcesBPP2, fval);
val = config->ManyBodyParticles;
CUDA_UINT_ALLOC(manyBodyForcesBPP2, val);
CUDA_POINTER_ALLOC(manyBodyForcesBPP2, devMemAlloc);
CU_SAFE_CALL(cuParamSetSize( manyBodyForcesBPP2, offset ));
//parameter setup for manyBodyForces1
CUDA_RESET_OFFSET;
CUDA_POINTER_ALLOC(manyBodyForces1, devPosArray);
CUDA_POINTER_ALLOC(manyBodyForces1, devForceArray);
val = 0; //temporarily
CUDA_GET_OFFSET(nlsoffset);
CUDA_UINT_ALLOC(manyBodyForces1, val);
val = config->ManyBodyParticles;
CUDA_UINT_ALLOC(manyBodyForces1, val);
fval = mb.rcutsq;
CUDA_FLOAT_ALLOC(manyBodyForces1, fval);
CUDA_POINTER_ALLOC(manyBodyForces1, devMemAlloc);
val = config->useLennardJones;
CUDA_UINT_ALLOC(manyBodyForces1, val);
CU_SAFE_CALL(cuParamSetSize( manyBodyForces1, offset ));
CU_SAFE_CALL(cuFuncSetBlockShape( manyBodyForces1, mbThreadsPerBlocks, 1, 1 ));
//parameter setup for manyBodyForces2
CUDA_RESET_OFFSET;
CUDA_POINTER_ALLOC(manyBodyForces2, devPosArray);
CUDA_POINTER_ALLOC(manyBodyForces2, devForceArray);
val = 0; //temporarily
CUDA_UINT_ALLOC(manyBodyForces2, val);
val = config->ManyBodyParticles;
CUDA_UINT_ALLOC(manyBodyForces2, val);
fval = mb.rcutsq;
CUDA_FLOAT_ALLOC(manyBodyForces2, fval);
CUDA_POINTER_ALLOC(manyBodyForces2, devMemAlloc);
CU_SAFE_CALL(cuParamSetSize( manyBodyForces2, offset ));
CU_SAFE_CALL(cuFuncSetBlockShape( manyBodyForces2, mbThreadsPerBlocks, 1, 1 ));
}
for(float vxcm=config->vxcmFrom; vxcm<=config->vxcmTo; vxcm+=config->vxcmStep)
{
//init
timesteps = 0;
ljNextBuild = mbNextBuild = 0;
//information
int printout = config->OutputTimesteps; //next debug output time step
int animts = config->animts; //next animation save time step
//read input file
readInput(config, (float*) posArray, (float*) velocityArray);
//push the particles outside the box into the box & vxcm
for (int id=0; id< (config->LennardJonesParticles + config->ManyBodyParticles); id++)
{
if (fabs(posArray[id].x) > (boxSize/2))
posArray[id].x = (boxSize/2) * (posArray[id].x/fabs(posArray[id].x));
if (fabs(posArray[id].y) > (boxSize/2))
posArray[id].y = (boxSize/2) * (posArray[id].y/fabs(posArray[id].y));
if (fabs(posArray[id].z) > (boxSize/2))
posArray[id].z = (boxSize/2) * (posArray[id].z/fabs(posArray[id].z));
velocityArray[id].x += vxcm;
}
//copy position & velocity to device memory
CU_SAFE_CALL(cuMemcpyHtoD(devPosArray, posArray, sizeof(real4) * (config->LennardJonesParticles + config->ManyBodyParticles)));
CU_SAFE_CALL(cuMemcpyHtoD(devVelocityArray, velocityArray, sizeof(real3) * (config->LennardJonesParticles + config->ManyBodyParticles)));
//zero some device memory
CU_SAFE_CALL(cuMemsetD32(devAAccArray, 0, 3 * (config->LennardJonesParticles + config->ManyBodyParticles)));
CU_SAFE_CALL(cuMemsetD32(devBAccArray, 0, 3 * (config->LennardJonesParticles + config->ManyBodyParticles)));
CU_SAFE_CALL(cuMemsetD32(devCAccArray, 0, 3 * (config->LennardJonesParticles + config->ManyBodyParticles)));
CU_SAFE_CALL(cuMemsetD8(devFlag, 0, sizeof(bool)));
//before sim output
cout << fixed << setprecision(6); //set maximal precision for output
cout.setf(ios::fixed,ios::floatfield); //zero padding
cout << "Before Simulation [VXCM = " << vxcm << "]:" << endl;
//calculate highest velocity and boxSizeList
readyList(posArray, velocityArray, (config->LennardJonesParticles + config->ManyBodyParticles), highestVelocity, boxSizeList);
if (config->useLennardJones)
{
//build lennard jones list
buildList(posArray, &lj, boxSizeList, buckets, highestVelocity, (config->LennardJonesParticles + config->ManyBodyParticles), ljNextBuild, 0, &ljList, config->DT, "ljTexRef", &devLjList, &devLjTexRef, &module);
//check if a fallback is to be used
fallbacklj = (lj.nlargestsize > THREADSPERBLOCK) && config->Fallback;
//set the 'largest list size' according to the new data
if (config->lennardJonesBPP && !fallbacklj)
{
if (lj.nlargestsize > 0)
{
CU_SAFE_CALL(cuFuncSetBlockShape( lennardJonesForcesBPP, lj.nlargestsize, 1, 1 ));
CU_SAFE_CALL(cuFuncSetSharedSize( lennardJonesForcesBPP, lj.nlargestsize*sizeof(real4)));
}
}
else
{
val = lj.nlargestsize;
CUDA_SET_OFFSET(nlsoffset);
CUDA_UINT_ALLOC(lennardJonesForces, val);
}
}
if (config->useManyBody)
{
//build many body list
buildList(posArray, &mb, boxSizeList, buckets, highestVelocity, config->ManyBodyParticles, mbNextBuild, 0, &mbList, config->DT, "mbTexRef", &devMbList, &devMbTexRef, &module);
//check if a fallback is to be used
fallbackmb = (mb.nlargestsize > THREADSPERBLOCK) && config->Fallback;
//set the 'largest list size' according to the new data
if (config->manyBodyBPP && !fallbackmb)
{
if (mb.nlargestsize>0)
{
CU_SAFE_CALL(cuFuncSetBlockShape( manyBodyForcesBPP1, mb.nlargestsize, 1, 1 ));
CU_SAFE_CALL(cuFuncSetSharedSize( manyBodyForcesBPP1, mb.nlargestsize*sizeof(real4)));
CU_SAFE_CALL(cuFuncSetBlockShape( manyBodyForcesBPP2, mb.nlargestsize, 1, 1 ));
CU_SAFE_CALL(cuFuncSetSharedSize( manyBodyForcesBPP2, mb.nlargestsize*sizeof(real4)));
}
}
else
{
val = mb.nlargestsize;
CUDA_SET_OFFSET(nlsoffset);
CUDA_UINT_ALLOC(manyBodyForces1, val);
CUDA_SET_OFFSET(nlsoffset);
CUDA_UINT_ALLOC(manyBodyForces2, val);
}
}
//perform the output function
#ifdef USECUDADEBUG
performOutput(resultVec, BlocksPerGrid, informationSize, informationMemory, devInformation, performCalculations, calculatePotentional, timesteps, config->DT, true);
#else
performOutput(&resultVec, (config->LennardJonesParticles + config->ManyBodyParticles), posArray, velocityArray, devPosArray, devVelocityArray, timesteps, config->DT, true);
#endif
cout << endl;
if (config->animts>-1)
pushAnim(posVec, velVec, posArray, velocityArray, (config->LennardJonesParticles + config->ManyBodyParticles));
//measure & perform
CU_SAFE_CALL(cuEventRecord(start,0));
if (config->useLennardJones && lj.nlargestsize>0) //calculate force for lennard jones
{
if (config->lennardJonesBPP && !fallbacklj) //bpp and no fallback
{
CU_SAFE_CALL(cuLaunchGrid(lennardJonesForcesBPP, (config->LennardJonesParticles + config->ManyBodyParticles), 1));
CU_SAFE_CALL(cuCtxSynchronize()); //synchronize context
}
else //tpp
{
CU_SAFE_CALL(cuLaunchGrid(lennardJonesForces, BlocksPerGrid, 1));
CU_SAFE_CALL(cuCtxSynchronize()); //synchronize context
}
}
if (config->useManyBody && mb.nlargestsize>0) //calculate force for many body
{
if (config->manyBodyBPP && !fallbackmb) //bpp and no fallback
{
CU_SAFE_CALL(cuLaunchGrid(manyBodyForcesBPP1, config->ManyBodyParticles, 1)); //b-o 1
CU_SAFE_CALL(cuCtxSynchronize());
CU_SAFE_CALL(cuLaunchGrid(manyBodyForcesBPP2, config->ManyBodyParticles, 1)); //b-o 2
CU_SAFE_CALL(cuCtxSynchronize());
}
else //tpp
{
CU_SAFE_CALL(cuLaunchGrid(manyBodyForces1, BlocksPerGrid, 1)); //b-o 1
CU_SAFE_CALL(cuCtxSynchronize());
CU_SAFE_CALL(cuLaunchGrid(manyBodyForces2, BlocksPerGrid, 1)); //b-o 2
CU_SAFE_CALL(cuCtxSynchronize());
}
}
//calculate the accelerations after the force
CU_SAFE_CALL(cuLaunchGrid(calculateAccelerations, BlocksPerGrid, 1));
CU_SAFE_CALL(cuCtxSynchronize());
//while not reached the timestep goal
while(timesteps<config->Timesteps)
{
if (ljNextBuild == timesteps || mbNextBuild == timesteps) //is is time to build any of the lists?
{
//copy memory from device
CU_SAFE_CALL(cuMemcpyDtoH(posArray, devPosArray, sizeof(real4) * (config->LennardJonesParticles + config->ManyBodyParticles)));
CU_SAFE_CALL(cuMemcpyDtoH(velocityArray, devVelocityArray, sizeof(real3) * (config->LennardJonesParticles + config->ManyBodyParticles)));
readyList(posArray, velocityArray, (config->LennardJonesParticles + config->ManyBodyParticles), highestVelocity, boxSizeList);
if (config->useLennardJones && ljNextBuild == timesteps) //is it time to build the lj list?
{
buildList(posArray, &lj, boxSizeList, buckets, highestVelocity, (config->LennardJonesParticles + config->ManyBodyParticles), ljNextBuild, timesteps, &ljList, config->DT, "ljTexRef", &devLjList, &devLjTexRef, &module);
fallbacklj = (lj.nlargestsize > THREADSPERBLOCK) && config->Fallback; //check for fallback
//set the 'largest list size' according to the new data
if (config->lennardJonesBPP && !fallbacklj)
{
if (lj.nlargestsize > 0)
{
CU_SAFE_CALL(cuFuncSetBlockShape( lennardJonesForcesBPP, lj.nlargestsize, 1, 1 ));
CU_SAFE_CALL(cuFuncSetSharedSize( lennardJonesForcesBPP, lj.nlargestsize*sizeof(real4)));
}
}
else
{
val = lj.nlargestsize;
CUDA_SET_OFFSET(nlsoffset);
CUDA_UINT_ALLOC(lennardJonesForces, val);
}
}
if (config->useManyBody && mbNextBuild == timesteps) // is it time to build the mb list?
{
buildList(posArray, &mb, boxSizeList, buckets, highestVelocity, config->ManyBodyParticles, mbNextBuild, timesteps, &mbList, config->DT, "mbTexRef", &devMbList, &devMbTexRef, &module);
fallbackmb = (mb.nlargestsize > THREADSPERBLOCK) && config->Fallback; //check for fallback
//set the 'largest list size' according to the new data
if (config->manyBodyBPP && !fallbackmb)
{
if (mb.nlargestsize>0)
{
CU_SAFE_CALL(cuFuncSetBlockShape( manyBodyForcesBPP1, mb.nlargestsize, 1, 1 ));
CU_SAFE_CALL(cuFuncSetSharedSize( manyBodyForcesBPP1, mb.nlargestsize*sizeof(real4)));
CU_SAFE_CALL(cuFuncSetBlockShape( manyBodyForcesBPP2, mb.nlargestsize, 1, 1 ));
CU_SAFE_CALL(cuFuncSetSharedSize( manyBodyForcesBPP2, mb.nlargestsize*sizeof(real4)));
}
}
else
{
val = mb.nlargestsize;
CUDA_SET_OFFSET(nlsoffset);
CUDA_UINT_ALLOC(manyBodyForces1, val);
CUDA_SET_OFFSET(nlsoffset);
CUDA_UINT_ALLOC(manyBodyForces2, val);
}
}
}
//predict
CU_SAFE_CALL(cuLaunchGrid(predict, BlocksPerGrid,1));
CU_SAFE_CALL(cuCtxSynchronize());
//force lj
if (config->useLennardJones && lj.nlargestsize>0)
{
if (config->lennardJonesBPP && !fallbacklj)
{
CU_SAFE_CALL(cuLaunchGrid(lennardJonesForcesBPP, (config->LennardJonesParticles + config->ManyBodyParticles),1));
CU_SAFE_CALL(cuCtxSynchronize());
}
else
{
CU_SAFE_CALL(cuLaunchGrid(lennardJonesForces, BlocksPerGrid,1));
CU_SAFE_CALL(cuCtxSynchronize());
}
}
//force mb
if (config->useManyBody && mb.nlargestsize>0)
{
if (config->manyBodyBPP && !fallbackmb) //bpp and no fallback
{
CU_SAFE_CALL(cuLaunchGrid(manyBodyForcesBPP1, config->ManyBodyParticles,1));
CU_SAFE_CALL(cuCtxSynchronize());
CU_SAFE_CALL(cuLaunchGrid(manyBodyForcesBPP2, config->ManyBodyParticles,1));
CU_SAFE_CALL(cuCtxSynchronize());
}
else
{
CU_SAFE_CALL(cuLaunchGrid(manyBodyForces1, BlocksPerGrid,1));
CU_SAFE_CALL(cuCtxSynchronize());
CU_SAFE_CALL(cuLaunchGrid(manyBodyForces2, BlocksPerGrid,1));
CU_SAFE_CALL(cuCtxSynchronize());
}
}
//correct
CU_SAFE_CALL(cuLaunchGrid(correct, BlocksPerGrid,1));
CU_SAFE_CALL(cuCtxSynchronize());
//copy flag mem
CU_SAFE_CALL(cuMemcpyDtoH(flag, devFlag, sizeof(bool)));
if (*flag)
{
if (config->useLennardJones && lj.nlargestsize>0) //calculate force for lennard jones
{
if (config->lennardJonesBPP && !fallbacklj) //bpp and no fallback
{
CU_SAFE_CALL(cuLaunchGrid(lennardJonesForcesBPP, (config->LennardJonesParticles + config->ManyBodyParticles), 1));
CU_SAFE_CALL(cuCtxSynchronize()); //synchronize context
}
else //tpp
{
CU_SAFE_CALL(cuLaunchGrid(lennardJonesForces, BlocksPerGrid, 1));
CU_SAFE_CALL(cuCtxSynchronize()); //synchronize context
}
}
if (config->useManyBody && mb.nlargestsize>0) //calculate force for many body
{
if (config->manyBodyBPP && !fallbackmb) //bpp and no fallback
{
CU_SAFE_CALL(cuLaunchGrid(manyBodyForcesBPP1, config->ManyBodyParticles, 1)); //b-o 1
CU_SAFE_CALL(cuCtxSynchronize());
CU_SAFE_CALL(cuLaunchGrid(manyBodyForcesBPP2, config->ManyBodyParticles, 1)); //b-o 2
CU_SAFE_CALL(cuCtxSynchronize());
}
else //tpp
{
CU_SAFE_CALL(cuLaunchGrid(manyBodyForces1, BlocksPerGrid, 1)); //b-o 1
CU_SAFE_CALL(cuCtxSynchronize());
CU_SAFE_CALL(cuLaunchGrid(manyBodyForces2, BlocksPerGrid, 1)); //b-o 2
CU_SAFE_CALL(cuCtxSynchronize());
}
}
//calculate the accelerations after the force
CU_SAFE_CALL(cuLaunchGrid(calculateAccelerations, BlocksPerGrid, 1));
CU_SAFE_CALL(cuCtxSynchronize());
//clear flag
CU_SAFE_CALL(cuMemsetD8(devFlag, 0, sizeof(bool)));
}
//results
if (printout==timesteps)
{
#ifdef USECUDADEBUG
performOutput(resultVec, BlocksPerGrid, informationSize, informationMemory, devInformation, performCalculations, calculatePotentional, timesteps, config->DT, config->Debug);
#else
performOutput(&resultVec, (config->LennardJonesParticles + config->ManyBodyParticles), posArray, velocityArray, devPosArray, devVelocityArray, timesteps, config->DT, config->Debug);
#endif
printout += config->OutputTimesteps;
}
//animation
if (animts==timesteps)
{
//copy memory from device
CU_SAFE_CALL(cuMemcpyDtoH(posArray, devPosArray, sizeof(real4) * (config->LennardJonesParticles + config->ManyBodyParticles)));
CU_SAFE_CALL(cuMemcpyDtoH(velocityArray, devVelocityArray, sizeof(real3) * (config->LennardJonesParticles + config->ManyBodyParticles)));
pushAnim(posVec, velVec, posArray, velocityArray, (config->LennardJonesParticles + config->ManyBodyParticles));
animts += config->animts;
}
timesteps++;
}
//stop measuring
CU_SAFE_CALL(cuEventRecord(stop,0));
CU_SAFE_CALL(cuEventSynchronize(stop));
//calculate time
CU_SAFE_CALL(cuEventElapsedTime(&elapsedTime,start,stop));
//after sim output
cout << "\nAfter Simulation [VXCM = " << vxcm << "]:" << endl;
#ifdef USECUDADEBUG
performOutput(resultVec, BlocksPerGrid, informationSize, informationMemory, devInformation, performCalculations, calculatePotentional, timesteps, config->DT, true);
#else
performOutput(&resultVec, (config->LennardJonesParticles + config->ManyBodyParticles), posArray, velocityArray, devPosArray, devVelocityArray, timesteps, config->DT, true);
#endif
cout << "\nTime took: " << elapsedTime << "ms" << endl;
//copy memory from device
CU_SAFE_CALL(cuMemcpyDtoH(posArray, devPosArray, sizeof(real4) * (config->LennardJonesParticles + config->ManyBodyParticles)));
CU_SAFE_CALL(cuMemcpyDtoH(velocityArray, devVelocityArray, sizeof(real3) * (config->LennardJonesParticles + config->ManyBodyParticles)));
//write the output
writeOutput(config, (float*) posArray, (float*) velocityArray);
//output info to log & results
writeResults(resultVec, config, elapsedTime, tailResults(posArray, config->ManyBodyParticles), vxcm);
if (config->animts>-1)
writeAnimationBinaryData(posVec, velVec, config, vxcm);
flushVectors(resultVec, posVec, velVec);
}
//release lists memory
if (ljList)
{
delete [] ljList;
ljList = NULL;
}
if (mbList)
{
delete [] mbList;
mbList = NULL;
}
//free events
CU_SAFE_CALL(cuEventDestroy(start));
CU_SAFE_CALL(cuEventDestroy(stop));
//free device memory
CU_SAFE_CALL(cuMemFree(devPosArray));
CU_SAFE_CALL(cuMemFree(devVelocityArray));
CU_SAFE_CALL(cuMemFree(devAAccArray));
CU_SAFE_CALL(cuMemFree(devForceArray));
CU_SAFE_CALL(cuMemFree(devBAccArray));
CU_SAFE_CALL(cuMemFree(devCAccArray));
#ifdef USECUDADEBUG
CU_SAFE_CALL(cuMemFree(devInformation));
#endif
CU_SAFE_CALL(cuMemFree(devFlag));
if (config->useManyBody)
CU_SAFE_CALL(cuMemFree(devMemAlloc));
//free memory
CU_SAFE_CALL(cuMemFreeHost(posArray));
CU_SAFE_CALL(cuMemFreeHost(velocityArray));
CU_SAFE_CALL(cuMemFreeHost(flag));
#ifdef USECUDADEBUG
CU_SAFE_CALL(cuMemFreeHost(informationMemory));
#endif
//drop context
CU_SAFE_CALL(cuCtxDetach(context));
//free module path
cutFree(module_path);
return EXIT_SUCCESS;
}
#ifdef USECUDADEBUG
void performOutput(vector<results> & resultVec, int BlocksPerGrid, int informationSize, float * informationMemory, CUdeviceptr & devInformation, CUfunction & performCalculations, CUfunction & calculatePotentional, int timesteps, float dt, bool print)
{
real3 cmassTmp;
real3 momentumTmp;
//reset information memory on device
CU_SAFE_CALL(cuMemsetD32(devInformation, 0, informationSize/sizeof(float)));
//kinetic, memontum an so
CU_SAFE_CALL(cuLaunchGrid(performCalculations, 1, 1));
CU_SAFE_CALL(cuCtxSynchronize());
//potentional energy calculation
CU_SAFE_CALL(cuLaunchGrid(calculatePotentional, BlocksPerGrid, 1));
CU_SAFE_CALL(cuCtxSynchronize());
//copy from device to host
CU_SAFE_CALL(cuMemcpyDtoH(informationMemory, devInformation, informationSize));
//fill results structure and push into vector
results res;
res.time = timesteps * dt;
res.ek = (double)*(informationMemory+2);
res.eu = (double)*informationMemory + (double)*(informationMemory+1);
res.e = (double)res.ek + res.eu;
res.temperature = (double)*(informationMemory+3);
cmassTmp = *(real3*)(informationMemory+4);
momentumTmp = *(real3*)(informationMemory+7);
res.centerOfMassx = (double)cmassTmp.x;
res.centerOfMassy = (double)cmassTmp.y;
res.centerOfMassz = (double)cmassTmp.z;
res.momentumx = (double)momentumTmp.x;
res.momentumy = (double)momentumTmp.y;
res.momentumz = (double)momentumTmp.z;
if (print) //debug-output
cout << "t=" << res.time
<< "\tT=" << res.temperature
<< "\tE=" << res.e
<< "\tEK=" << res.ek
<< "\tEU=" << res.eu
<< endl;
resultVec.push_back(res);
}
#else
void performOutput(vector<results> * resultVec, int NumberOfParticles, real4 * posArray, real3 * velocityArray, CUdeviceptr & devPosArray, CUdeviceptr & devVelocityArray, int timesteps, real dt, bool print)
{
CU_SAFE_CALL(cuMemcpyDtoH(posArray, devPosArray, sizeof(real4) * NumberOfParticles));
CU_SAFE_CALL(cuMemcpyDtoH(velocityArray, devVelocityArray, sizeof(real3) * NumberOfParticles));
performOutput(resultVec, NumberOfParticles, posArray, velocityArray, timesteps, dt, print);
}
#endif
///
/// Get Highest Velocity & Box Size
///
void readyList(real4 * posArray, real3 * velocityArray, int NumberOfParticles, float & highestVelocity, float & boxSize)
{
highestVelocity = 0;
boxSize = 0;
for(int i=0; i<NumberOfParticles; i++)
{
//calculate highest velocity
float velocity = sqrt(velocityArray[i].x * velocityArray[i].x + velocityArray[i].y * velocityArray[i].y + velocityArray[i].z * velocityArray[i].z);
if (velocity>highestVelocity)
highestVelocity = velocity;
//boxsize = (the particle that is far the most from 0,0,0) * 2
if (boxSize<abs(posArray[i].x))
boxSize = abs(posArray[i].x);
if (boxSize<abs(posArray[i].y))
boxSize = abs(posArray[i].y);
if (boxSize<abs(posArray[i].z))
boxSize = abs(posArray[i].z);
}
boxSize*=2; //final box size
}
///
/// Build Neighbor List
///
void buildList(real4 * posArray, listSettings * listsettings, float boxSize, int buckets, float highestVelocity, int NumberOfParticles, int & nextBuild, int currentTimestep, int ** list, float dt, char * lpTexRef, CUarray * cu_array, CUtexref * cu_texref, CUmodule * module)
{
CUDA_ARRAY_DESCRIPTOR desc;
CUDA_MEMCPY2D copyParam;
//free memory if needed
if (*list)
{
delete [] *list;
*list = NULL;
}
//build list
*list = buildNeighborList(posArray, listsettings, boxSize, buckets, NumberOfParticles);
//calculte next build time step
nextBuild = (int) ((listsettings->maxnlmove / highestVelocity) / fabs(dt));
nextBuild += currentTimestep;
//create texture
if (*cu_array)
CU_SAFE_CALL( cuArrayDestroy( *cu_array));
desc.Format = CU_AD_FORMAT_SIGNED_INT32;
desc.NumChannels = 1;
desc.Width = listsettings->nlistsize;
desc.Height = NumberOfParticles;
CU_SAFE_CALL( cuArrayCreate( cu_array, &desc ));
//set memory copy params host-to-cuda-array
memset(©Param, 0, sizeof(copyParam));
copyParam.dstMemoryType = CU_MEMORYTYPE_ARRAY;
copyParam.dstArray = *cu_array;
copyParam.srcMemoryType = CU_MEMORYTYPE_HOST;
copyParam.srcHost = *list;
copyParam.srcPitch = listsettings->nlistsize * sizeof(int);
copyParam.WidthInBytes = copyParam.srcPitch;
copyParam.Height = NumberOfParticles;
CU_SAFE_CALL(cuMemcpy2D(©Param));
//build texture
CU_SAFE_CALL(cuModuleGetTexRef(cu_texref, *module, lpTexRef));
CU_SAFE_CALL(cuTexRefSetArray(*cu_texref, *cu_array, CU_TRSA_OVERRIDE_FORMAT));
CU_SAFE_CALL(cuTexRefSetAddressMode(*cu_texref, 0, CU_TR_ADDRESS_MODE_CLAMP));
CU_SAFE_CALL(cuTexRefSetAddressMode(*cu_texref, 1, CU_TR_ADDRESS_MODE_CLAMP));
CU_SAFE_CALL(cuTexRefSetFilterMode(*cu_texref, CU_TR_FILTER_MODE_POINT));
CU_SAFE_CALL(cuTexRefSetFlags(*cu_texref, CU_TRSF_READ_AS_INTEGER));
CU_SAFE_CALL(cuTexRefSetFormat(*cu_texref, CU_AD_FORMAT_SIGNED_INT32, 1));
//free memory
if (*list)
{
delete [] *list;
*list = NULL;
}
} | cpp |
<filename>chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/views/apps/shaped_app_window_targeter.h"
#include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"
#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/wm/core/easy_resize_window_targeter.h"
class ShapedAppWindowTargeterTest : public aura::test::AuraTestBase {
public:
ShapedAppWindowTargeterTest()
: web_view_(NULL) {
}
virtual ~ShapedAppWindowTargeterTest() {}
views::Widget* widget() { return widget_.get(); }
apps::NativeAppWindow* app_window() { return &app_window_; }
ChromeNativeAppWindowViews* app_window_views() { return &app_window_; }
protected:
virtual void SetUp() OVERRIDE {
aura::test::AuraTestBase::SetUp();
widget_.reset(new views::Widget);
views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
params.remove_standard_frame = true;
params.bounds = gfx::Rect(30, 30, 100, 100);
params.context = root_window();
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
widget_->Init(params);
app_window_.set_web_view_for_testing(&web_view_);
app_window_.set_window_for_testing(widget_.get());
widget_->Show();
}
virtual void TearDown() OVERRIDE {
widget_.reset();
aura::test::AuraTestBase::TearDown();
}
private:
views::WebView web_view_;
scoped_ptr<views::Widget> widget_;
ChromeNativeAppWindowViews app_window_;
DISALLOW_COPY_AND_ASSIGN(ShapedAppWindowTargeterTest);
};
TEST_F(ShapedAppWindowTargeterTest, HitTestBasic) {
aura::Window* window = widget()->GetNativeWindow();
{
// Without any custom shapes, the event should be targeted correctly to the
// window.
ui::MouseEvent move(ui::ET_MOUSE_MOVED,
gfx::Point(40, 40), gfx::Point(40, 40),
ui::EF_NONE, ui::EF_NONE);
ui::EventDispatchDetails details =
event_processor()->OnEventFromSource(&move);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(window, move.target());
}
scoped_ptr<SkRegion> region(new SkRegion);
region->op(SkIRect::MakeXYWH(40, 0, 20, 100), SkRegion::kUnion_Op);
region->op(SkIRect::MakeXYWH(0, 40, 100, 20), SkRegion::kUnion_Op);
app_window()->UpdateShape(region.Pass());
{
// With the custom shape, the events that don't fall within the custom shape
// will go through to the root window.
ui::MouseEvent move(ui::ET_MOUSE_MOVED,
gfx::Point(40, 40), gfx::Point(40, 40),
ui::EF_NONE, ui::EF_NONE);
ui::EventDispatchDetails details =
event_processor()->OnEventFromSource(&move);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(root_window(), move.target());
// But events within the shape will still reach the window.
ui::MouseEvent move2(ui::ET_MOUSE_MOVED,
gfx::Point(80, 80), gfx::Point(80, 80),
ui::EF_NONE, ui::EF_NONE);
details = event_processor()->OnEventFromSource(&move2);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(window, move2.target());
}
}
TEST_F(ShapedAppWindowTargeterTest, HitTestOnlyForShapedWindow) {
// Install a window-targeter on the root window that allows a window to
// receive events outside of its bounds. Verify that this window-targeter is
// active unless the window has a custom shape.
gfx::Insets inset(-30, -30, -30, -30);
root_window()->SetEventTargeter(scoped_ptr<ui::EventTargeter>(
new wm::EasyResizeWindowTargeter(root_window(), inset, inset)));
aura::Window* window = widget()->GetNativeWindow();
{
// Without any custom shapes, an event within the window bounds should be
// targeted correctly to the window.
ui::MouseEvent move(ui::ET_MOUSE_MOVED,
gfx::Point(40, 40), gfx::Point(40, 40),
ui::EF_NONE, ui::EF_NONE);
ui::EventDispatchDetails details =
event_processor()->OnEventFromSource(&move);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(window, move.target());
}
{
// Without any custom shapes, an event that falls just outside the window
// bounds should also be targeted correctly to the window, because of the
// targeter installed on the root-window.
ui::MouseEvent move(ui::ET_MOUSE_MOVED,
gfx::Point(10, 10), gfx::Point(10, 10),
ui::EF_NONE, ui::EF_NONE);
ui::EventDispatchDetails details =
event_processor()->OnEventFromSource(&move);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(window, move.target());
}
scoped_ptr<SkRegion> region(new SkRegion);
region->op(SkIRect::MakeXYWH(40, 0, 20, 100), SkRegion::kUnion_Op);
region->op(SkIRect::MakeXYWH(0, 40, 100, 20), SkRegion::kUnion_Op);
app_window()->UpdateShape(region.Pass());
{
// With the custom shape, the events that don't fall within the custom shape
// will go through to the root window.
ui::MouseEvent move(ui::ET_MOUSE_MOVED,
gfx::Point(10, 10), gfx::Point(10, 10),
ui::EF_NONE, ui::EF_NONE);
ui::EventDispatchDetails details =
event_processor()->OnEventFromSource(&move);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(root_window(), move.target());
}
// Remove the custom shape. This should restore the behaviour of targeting the
// app window for events just outside its bounds.
app_window()->UpdateShape(scoped_ptr<SkRegion>());
{
ui::MouseEvent move(ui::ET_MOUSE_MOVED,
gfx::Point(10, 10), gfx::Point(10, 10),
ui::EF_NONE, ui::EF_NONE);
ui::EventDispatchDetails details =
event_processor()->OnEventFromSource(&move);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(window, move.target());
}
}
// Tests targeting of events on a window with an EasyResizeWindowTargeter
// installed on its container.
TEST_F(ShapedAppWindowTargeterTest, ResizeInsetsWithinBounds) {
aura::Window* window = widget()->GetNativeWindow();
{
// An event in the center of the window should always have
// |window| as its target.
ui::MouseEvent move(ui::ET_MOUSE_MOVED,
gfx::Point(80, 80), gfx::Point(80, 80),
ui::EF_NONE, ui::EF_NONE);
ui::EventDispatchDetails details =
event_processor()->OnEventFromSource(&move);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(window, move.target());
}
{
// Without an EasyResizeTargeter on the container, an event
// inside the window and within 5px of an edge should have
// |window| as its target.
ui::MouseEvent move(ui::ET_MOUSE_MOVED,
gfx::Point(32, 37), gfx::Point(32, 37),
ui::EF_NONE, ui::EF_NONE);
ui::EventDispatchDetails details =
event_processor()->OnEventFromSource(&move);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(window, move.target());
}
// The EasyResizeTargeter specifies an inset of 5px within the window.
app_window_views()->InstallEasyResizeTargeterOnContainer();
{
// Ensure that the window has an event targeter (there should be an
// EasyResizeWindowTargeter installed).
EXPECT_TRUE(static_cast<ui::EventTarget*>(window)->GetEventTargeter());
}
{
// An event in the center of the window should always have
// |window| as its target.
// TODO(mgiuca): This isn't really testing anything (note that it has the
// same expectation as the border case below). In the real environment, the
// target will actually be the RenderWidgetHostViewAura's window that is the
// child of the child of |window|, whereas in the border case it *will* be
// |window|. However, since this test environment does not have a
// RenderWidgetHostViewAura, we cannot differentiate the two cases. Fix
// the test environment so that the test can assert that non-border events
// bubble down to a child of |window|.
ui::MouseEvent move(ui::ET_MOUSE_MOVED,
gfx::Point(80, 80), gfx::Point(80, 80),
ui::EF_NONE, ui::EF_NONE);
ui::EventDispatchDetails details =
event_processor()->OnEventFromSource(&move);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(window, move.target());
}
{
// With an EasyResizeTargeter on the container, an event
// inside the window and within 5px of an edge should have
// |window| as its target.
ui::MouseEvent move(ui::ET_MOUSE_MOVED,
gfx::Point(32, 37), gfx::Point(32, 37),
ui::EF_NONE, ui::EF_NONE);
ui::EventDispatchDetails details =
event_processor()->OnEventFromSource(&move);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(window, move.target());
}
}
| cpp |
export interface ITime {
start: string;
session?: string;
tracks?: string;
}
export interface IDay {
date?: string;
dayOfWeek: string;
times: ITime[];
}
export interface ISportSchedule {
title: string;
subTitle: string;
additionalInfo: string;
schedules: IDay[];
}
| typescript |
A Reddit user earlier this week reported being unable to install Linux on a Lenovo Yoga 900 ISK laptop, appearing to make the laptop locked to the Windows 10 Home Signature Edition it ships with. Since then, a lot of speculation has done the rounds on the Web, in part due to Lenovo's rough handling of the matter on its product forums and in response to the customer on the Best Buy site. Now however, things are much clearer, with both Lenovo and Microsoft clarifying their positions to state neither company is intentionally blocking the installation of other operating systems.
To refresh, Microsoft last year unveiled its Signature Edition PC program, a promise that PCs with this branding would not feature any bloatware from OEMs. BaronHK stumbled upon the issue when he tried to install Linux on his Lenovo Yoga 900 ISK2 ultrabook. According to him, the issue persists in other Yoga devices which include Yoga 900S and Yoga 710S.
Since then, many Linux fans have expressed their disappointment on the message board on the difficulties of installing open-source operating systems on Lenovo, with the blame mostly pointed at Lenovo and how the company has configured the systems.
According BaronHK, the issues stems from Lenovo's propriety technology that locks the BIOS into RAID mode for the SSD storage onboad, with AHCI support disabled. All of the three combined essentially prevent users to install any other operating system that doesn't have driver and OS kernel support for a single SSD drive in RAID mode.
Early on, a Lenovo Product Expect replied to BaronHK 's review of the Yoga 900 ISK2 on Best Buy, claiming "This system has a Signature Edition of Windows 10 Home installed. It is locked per our agreement with Microsoft." This obviously started off quite a controversy on the Web, but if more recent statements from both Lenovo and Microsoft are to be believed, there is no such agreement - instead, the ability to install Linux and other operating systems on the affected laptops is dependant on Linux and other operating systems coming up with a driver and kernel that support the SSD RAID configuration.
A spokesperson for Lenovo told Tech Republic that the company was not blocking Linux installation deliberately, "To improve performance, the industry is moving to RAID on the SSDs and Lenovo is leading with this change. Lenovo does not block customers using other operating systems on its devices but relies on the alternative operating system vendors to release appropriate drivers."
A much larger statement was provided to Engadget, "As the world's number 1 PC company, we continue to focus on bringing value to the PC user, and creating unique and innovative form factors such as Yoga. Our consumer Windows PCs are specifically designed for and extensively tested on Windows 10. Yoga 900 / 900S with their 360 degree hinges are specifically designed to maximise the touch functionality of Windows 10. Our Yoga design requires very specific, complex and unique drivers that require even greater amounts of testing, to ensure class-leading performance with Windows 10. To support our Yoga products and our industry-leading 360-hinge design in the best way possible we have used a storage controller mode that is unfortunately not supported by Linux and as a result, does not allow Linux to be installed. Beyond the controller setup limitation, other advanced capabilities of the Yoga design would likely not work with current Linux offerings... Lenovo does not intentionally block customers using other operating systems such as Linux on Yoga or any of its devices and is fully committed to providing Linux certifications and installation guidance on a wide range of suitable products. These products are listed on our support page: https://support.lenovo.com/us/en/documents/pd031426"
Microsoft also provided a statement to Engadget, clarifying its position and the role of the Signature Edition, "Lenovo recently adopted RAID on SSDs in certain product configurations, which require additional steps to support all system features. More information can be found on their support page; https://support.lenovo.com/us/en/documents/pd031426. Recent claims about software installation issues related to Microsoft Signature are inaccurate."
For now, until a revised Linux OS kernel and drivers are released to support the new configuration, we suggest you steer clear of Lenovo's Signature Editions if you're looking in the market for a new PC to install Linux or other alternative mobile operating systems onto.
| english |
<reponame>Aurelain/GriftlandsWiki
{
"url": "https://static.wikia.nocookie.net/griftlands_gamepedia_en/images/7/76/Silence.png/revision/latest?cb=20210808164711",
"sha1": "ee1121cb3397542cc0943d1c4f22a2ad999be6d4"
} | json |
<filename>tests/test_bytes.py<gh_stars>0
import unittest
from goodtypes.bytes import Bytes, Unit
class TestBytes(unittest.TestCase):
def test_bytes(self):
bs = Bytes("2344Ki")
self.assertEqual("2344Ki", bs.format(Unit.KIBI_BYTES))
self.assertEqual("2400256", bs.format(Unit.BYTES))
| python |
<filename>network_explorer/build.json
{
"args": {},
"build_from": {
"aarch64": "homeassistant/aarch64-base-python:3.7-alpine3.12",
"armhf": "homeassistant/armhf-base-python:3.8-alpine3.12",
"armv7": "homeassistant/armhf-base-python:3.8-alpine3.12"
}
} | json |
Ja Morant has spent time away from the team due to his actions that have caused him to get into trouble with the league. Memphis Grizzlies coach Taylor Jenkins, who has done a great job in keeping the team intact while their star is away, recently shared their excitement regarding the star's return.
In a recent interview, Jenkins shared how the team has handled Morant's absence.
"Adversity is gonna bring the best out of you and you can control is your work and your mentality," Jenkins said. "What the group's done in his absence has been phenomenal. From a defensive standpoint, offensive standpoint, execution standpoint, togetherness-standpoint. That's obviously our expectation with Ja.
"I think this is going to be a seamless reintegration. We know how important he is to us. He knows how importnant his teammates are to him. So, it's gonna be one day at a time. . . . Whatever struggles come our way, we've gotta ride together to get through it. "
Over the past week, the NBA announced that Morant has been suspended for eight games without pay. This was sparked by Morant going on an Instagram live showing off a handgun earlier this month. The team was in Denver at the time, and there were many questions about how he was able to gain access to a gun while on the road.
According to recent reports, Morant is expected to return to the lineup this week. The earliest for his return would be on Wednesday, when Memphis takes on the Houston Rockets. They are in the top three in the Western Conference standings with a 43-27 record.
Coach Jenkins has always integrated a team-oriented system since taking over the Grizzlies in 2019. That's why, even without their star point guard, the team has managed to get a decent amount of wins.
Last season, Ja Morant only played 57 games. During the games he missed, the team had a great winning record, despite not having its best player. Without Morant, Memphis went 21-5, making the Grizzlies one of the most dangerous matchups for some teams.
The Grizzlies were able to utilize Jaren Jackson Jr. , Desmond Bane and even Dillon Brooks to carry the offense. Additionally, on the defensive end, Jackson and Steven Adams left a huge impact, making it tough for other teams to score on them.
It's been a similar case for the team this season. Even without Ja Morant, the team has been able to get a good number of wins and have maintained their spot in the top of the West. | english |
{% load humfrey_elasticsearch %}
{% with facet.meta.terms.field as field_name %}
<div class="facet{% if facet.filter.present %} facet-active{% endif %}">
<h3>{{ facet_name|capfirst }}</h3>
<ul>
{% if not terse %}
{% if facet.filter.present %}
<li><a href="{% remove_parameter "filter" field_name %}">All</a></li>
{% else %}
<li class="selected">All</li>
{% endif %}
{% endif %}
{% for term in facet.terms %}
{% if facet.filter.value == term.value %}
{% if terse %}
<li><a class="facet-remove" href="{% remove_parameter "filter" field_name %}"><span class="collapsible-heading-status">Remove filter: </span>{{ term.label|default:term.value|default:term.term|capfirst }} ({{ term.count }})</a></li>
{% else %}
<li class="selected">{{ term.label|default:term.value|default:term.term|capfirst }} ({{ term.count }})</li>
{% endif %}
{% else %}
{% if not facet.filter.present %}
<li><a href="{% set_parameter "filter" field_name term.value %}">{{ term.label|default:term.value|default:term.term|capfirst }} ({{ term.count }})</a></li>
{% endif %}
{% endif %}
{% endfor %}
{% comment %}{% if facets.type.other %}
<li><em>other</em> ({{ facets.type.other }})</li>
{% endif %}{% endcomment %}
{% if facets.type.missing %}
{% if facet.filter.value == "" %}
<li class="selected"><em>unknown</em> ({{ facets.type.missing }})</li>
{% else %}
<li><a href="{% set_parameter "filter" field_name "" %}"><em>unknown</em> ({{ facets.type.missing }})</a></li>
{% endif %}
{% endif %}
</ul>
</div>
{% endwith %}
| html |
Former India captain MS Dhoni is one of the most iconic players in the history of the game and his helicopter shot has been embedded in memories of all those who followed his career from 2004- 2020. He will be seen on the field once more, when he leads the Chennai Super Kings (CSK) in the upcoming IPL 2021, which begins on April 9.
Meanwhile, in his time after cricket, Dhoni has taken to various business ventures like growing organic vegetables and food at his farmhouse in Ranchi and exporting the said produce to UAE. He had also gone into the poultry business by buying the rare Kadaknath chickens and has invested in many other similar ventures.
The former India captain MS Dhoni’s famous helicopter shot has inspired a series of artisan chocolates, which will be sold by food and beverage start-up 7InkBrews, where he is also a shareholder. The company is based out of Mumbai is founded by Mohit Bhagchandani and co-founded by Adil Mistry and Kunal Patel.
The new range of chocolates and beverages (non-alcoholic and alcoholic) have been launched under the brand Copter7-inspired by the iconic Dhoni helicopter shot and his shirt number.
“When you believe so strongly in the vision of a company, it makes the association that much more meaningful. I am truly elated to be a shareholder and brand ambassador for a company like 7Ink Brews,” Dhoni was quoted as saying in a press release issued by the company.
After the brand launch in Mumbai, Pune, Goa, and Bangalore, the products will also be launched in Uttar Pradesh, Haryana, Jharkhand, Punjab, and Chandigarh over the next few months.
“Built around the attributes of champion cricketer, Mahendra Singh Dhoni, and inspired by his signature ‘helicopter shot’, hence the name Copter7. The packaging and labelling is another noteworthy feature, inspired by Dhoni’s different jerseys and their colors,” the press release said.
For creating the unique chocolates, the company has tied up with well-known chocolatier and chef David Belo of Mysore-based craft chocolate brand Naviluna.
Meanwhile, MS Dhoni is busy preparing for the IPL 2021 which starts April 9, and his team the Chennai Super Kings will face Delhi Capitals in their first match on April 10 in Mumbai.
| english |
The first AEW Dynamite episode of 2020 focused on all the right things, as the company builds toward a pretty stacked month in terms of programming.
Jon Moxley and Cody Rhodes carried on the momentum for their respective feuds, and apart from that, AEW also teased some potential dissension between 'Hangman' Adam Page and other key members of The Elite.
Although some of the show's weaknesses are still pretty apparent at this point, you have to give credit to the showrunners for responding to criticism, at least to some extent so far.
Here are a few interesting observations from this year's first episode of AEW Dynamite (January 1st, 2020).
Those who have been following AEW Dynamite since its inception are aware of the fact that there is a major divide between the show's top and mid-card storylines.
The Elite vs. The Inner Circle was a major running theme throughout last night's episode, and by leaning back to basics, the show worked in terms of both wrestling and entertainment. Of course, this also meant that factions such as The Nightmare Collective and Dark Order wouldn't have a lot of stake in the episode, and that worked in AEW's favor last night since both of these factions have received mixed criticism for their respective storylines and general portrayal so far.
This goes to show that AEW's diverse programming does work against them during certain shows. The depth and stark contrast between storylines means that every angle has something important going on, and since Dynamite is a 2-hour show, you can't cram everything within that timeframe every week.
That is why AEW made a smart decision by mostly focusing on storylines that have been working in their favor so far. Hopefully that trend continues next week and beyond.
One of the best parts of last night's AEW Dynamite episode featured 'Hangman' Adam Page's drinking stint taking center stage during the latter half of the show.
Fans of Being The Elite are well aware of the character's recent downward spiral, and the reason behind that was made clear by producers who let us know that Adam Page "has been drinking."
Aside from its obvious comical perspective, this angle could very well branch off into something big in the future.
Page refused to celebrate with other members of The Elite like Kenny Omega, The Young Bucks, and Cody at the end of the show. Although his allegiances may not be as strong with The Elite as they once were, both parties are on good terms - that is until the character's drinking habit may cause him to take a drastic step that could change everything. Of course, that step would be joining the rival faction - The Inner Circle.
Whatever the outcome may be, this storyline gives Adam Page something else to do from a character standpoint, and that is always a good way to build a certain personality in front of the viewers.
Apart from the bitter feud between Cody and MJF in AEW, Jon Moxley and Chris Jericho have stepped up to push the show to the next level.
The AEW World Champion wants Jon Moxley to join The Inner Circle, and that is a potential conflict because we know there is no way that Moxley is going to join any faction anytime soon. The character's biggest trait is that he is a lone wolf, and no matter what Jericho throws at him, Moxley won't fall for the bait so easily.
Yet, the showrunners have been delaying this inevitable outcome for some reason, and that would make sense, if both of these mega-stars are set to clash at AEW Revolution which takes place next month on February 29th.
Next week, Moxley will give his definitive answer to Chris Jericho's offer. Although we all know what that answer is going to be, AEW can easily find several creative ways to execute that segment.
Wouldn't it be cool if Moxley would just go on a rampage and destroy the Ford GT that Jericho gifted him this week? We look forward to that possibility and much more next week on AEW Dynamite.
| english |
US manufacturing contracted further in December, but the pace of decline slowed amid a modest rebound in production and improvement in factory employment. The Institute for Supply Management (ISM) reported that its manufacturing PMI increased to 47.4 last month, marking the 14th consecutive month that the PMI stayed below 50, indicating contraction in manufacturing.
Stay bullish, but just add an element of caution which means stay with quality. There is quality in every segment of the markets, but when one is buying midcap stocks it is more important to focus on quality as these companies and also their stocks may have relatively less ability to withstand a corrective phase, either because of the nature of the business or because of technical reason like shareholding pattern. Following stocks have come from Refinitiv’s Stock Report Plus which lists stocks with high upside potential over next 12 months, with average recommendation rating of “buy” or "strong buy"
With some macro tailwinds, the mood on the street which was slightly tilting toward bears in September and October has once again stabilized and has turned in favor of bulls. While it is a good sign, if one takes a broader picture in terms of major event risks which the Indian market is staring at, “ being careful” would be the key which would finally impact the returns. So be selective, avoid impulsive investing, and keep reviewing one’s portfolio. We look at stocks which have witnessed a continuous rise in their score in the last one month. These selected stocks depict a strong upward trajectory in their overall average score which is based on five key pillars i.e. earnings, fundamentals, relative valuation, risk and price momentum. This implies that there has been a significant improvement in their market outlook in the given time frame.
TSMC, the world's largest contract chipmaker, is frustrated in Arizona, the sources said, where it has struggled to recruit workers for the gruelling chipmaking trade and faced pushback from unions on efforts to bring in workers from Taiwan.
H&M told Reuters it is following up on 20 alleged instances of labour abuse at Myanmar garment factories that supply the world's second-largest fashion retailer, just weeks after top rival Zara owner Inditex said it is phasing out purchases from the Southeast Asian country.
"Predictions that demand will remain buoyant had a positive impact on measures covered by the survey such as output, employment, profitability and investment forecasts," said Pollyanna De Lima, economics associate director at S&P Global Market Intelligence.
The increase in new orders was the fastest since February 2021, owing to favourable demand conditions. The 400 respondents to the survey also indicated that advertising and new product releases were also a factor in rising new orders. The continuing uptick in manufacturing activity also lifted growth prospects. The index has averaged 57.9 in the first quarter of FY24.
Manufacturing sector in India continues to grow from strength to strength as data showed that factory output expanded at the quickest pace in the last 31 months on strong demand and output. The Manufacturing Purchasing Managers' Index, compiled by S&P Global, rose to over a 2-1/2 year high of 58.7 in May from April's 57.2.
Students of a degree apprenticeship program graduate with three things in hand – a graduation degree from the university, a multi-year work experience and the mindset, attitude and the approach required to succeed at the workplace – an invaluable concoction that makes them the right fit for a job!
As the economy slowly picks up after the pandemic-induced business meltdown, jobs are trickling into the market but their quality is often patchy, as most of them are in the informal sector. At the same time with population growth and more new entrants joining the job market jostling with those who lost work during the pandemic, job opportunities are still too few and far between.
Global manufacturers are considering plans to completely withdraw from China as issues related to Covid, labour and geopolitical tensions make the “world’s factory” less and less attractive. If India can quickly grab the opportunity, it can position itself as the next factory of the world.
A recent outbreak of coronavirus cases in the region surrounding Apple's largest iPhone factory, in Zhengzhou, in central China, prompted local officials to order a seven-day lockdown last week. As a result, the company said Sunday, it will not be able to produce enough phones to meet the demands of the holiday season.
As global factories look to add resilience to efficiency, India is the logical choice. It has a large and young population. Its software strengths are integral to the services now inherent in all products. Its domestic markets are reaching critical mass, and infrastructure and human capital have improved.
NECG will be part of the open architecture DPG suite that is making India more inclusive, prosperous and less corrupt via identification (Aadhaar), payments (UPI), vaccination certification (CoWIN), documents (DigiLocker), toll collection (FASTag), education (National Digital Education Architecture), health (National Digital Health Mission) and taxation (GSTN).
While activity has sped up since various COVID lockdowns imposed since March have been rolled back, headwinds persist, including a still subdued property market, soft consumer spending and fear of any recurring waves of infections.
Agra has been India's biggest shoe making centre since the Mughals ruled from the city centuries ago. The local industry, which employs 400,000 workers, faces falling rural demand and rising costs, though a pick-up in overseas sales partly helped bigger manufacturers.
The Caixin/Markit Manufacturing Purchasing Managers' Index (PMI) rose to 48.1 in May from 46.0 the previous month and was slightly above a Reuters poll of 48.0. May's contraction was the second-sharpest slump since February 2020, suggesting the recovery remains fragile.
The Purchasing Managers' Index (PMI) -- a key gauge of manufacturing activity -- edged up to 49.6, officials said, from April's 47.4, which was the worst reading since early 2020. However, the reading remained stuck below the 50-point mark separating growth from contraction. The figures come as Beijing's zero-Covid policy aimed at stamping out infections with lockdowns and mass testing is challenged by a surge in the fast-spreading Omicron variant.
Full or partial lockdowns were imposed in major centres across the country in March and April, including the most populous city Shanghai, hitting production and consumption and heightening risks for those parts of the global economy heavily dependent on China.
The IHS Markit India Manufacturing Purchasing Managers' Index (PMI) rose to 54.9 in February from 54 in January. A reading above 50 on the index shows expansion and below that indicates contraction. The February PMI data pointed to an improvement in overall operating conditions for the eighth straight month.
The seasonally adjusted IHS Markit India Manufacturing Purchasing Managers' Index (PMI) improved from 52.3 in August to 53.7 in September, indicating a stronger expansion in overall business conditions across the sector. The September PMI data pointed to an improvement in overall operating conditions for the third straight month.
| english |
Melbourne, Jan 17: Sania Mirza survived a brief lapse of concentration before advancing to the third round of the Australian Open on Thursday with a 6-1, 4-6, 7-5 victory against Switzerland's Timea Bacsinszky.
Sania started off in smashing fashion as she took the first set 6-1 in just 22 minutes, but the Swiss world number 119 fought back in the second set.
The 31st-seeded Indian also didn't help her cause with a string of unforced errors in the second set, but things improved in the decider. Sania continued to toil in the third set and broke Bacsinszky's serve in the 12th game to win it 7-5 and advance to the third round. The 21-year-old next faces eight seed American Venus Williams for a place in the last 16. Venus was also made to work hard in both sets before beating Frenchwoman Camille Pin 7-5 6-4. | english |
package net.canadensys.dataportal.vascan.model.api;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
/**
* API response for vernacular names related data.
* @author canadensys
*
*/
@JsonInclude(Include.NON_NULL)
public class VernacularNameAPIResult {
private String vernacularName;
private String language;
private String source;
private boolean isPreferredName;
public String getVernacularName() {
return vernacularName;
}
public void setVernacularName(String vernacularName) {
this.vernacularName = vernacularName;
}
public String getLanguage() {
return language;
}
public void setLanguage(String language) {
this.language = language;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public boolean isPreferredName() {
return isPreferredName;
}
public void setPreferredName(boolean isPreferredName) {
this.isPreferredName = isPreferredName;
}
}
| java |
{"derivation": "a primitive root;", "pron": "kaw-tsab'", "outline": "<ol><li> (Qal) to cut off, shear</li></ol>", "kjv_def": "cut down, shorn.", "lemma": "\u05e7\u05b8\u05e6\u05b7\u05d1", "frequency": 2, "strongs_def": "to clip, or (generally) chop", "xlit": "q\u00e2tsab"} | json |
<gh_stars>1000+
# -----------------
# list comprehensions
# -----------------
# basics:
a = ['' for a in [1]]
#? str()
a[0]
#? ['insert']
a.insert
a = [a for a in [1]]
#? int()
a[0]
y = 1.0
# Should not leak.
[y for y in [3]]
#? float()
y
a = [a for a in (1, 2)]
#? int()
a[0]
a = [a for a,b in [(1,'')]]
#? int()
a[0]
a = [a for (a,b) in [(1,'')]]
#? int()
a[0]
arr = [1,'']
a = [a for a in arr]
#? int()
a[0]
#? str()
a[1]
#? int() str()
a[2]
a = [a if 1.0 else '' for a in [1] if [1.0]]
#? int() str()
a[0]
# name resolve should be correct
left, right = 'a', 'b'
left, right = [x for x in (left, right)]
#? str()
left
# with a dict literal
#? int()
[a for a in {1:'x'}][0]
# list comprehensions should also work in combination with functions
def _listen(arg):
for x in arg:
#? str()
x
_listen(['' for x in [1]])
#?
([str for x in []])[0]
# -----------------
# nested list comprehensions
# -----------------
b = [a for arr in [[1, 1.0]] for a in arr]
#? int()
b[0]
#? float()
b[1]
b = [arr for arr in [[1, 1.0]] for a in arr]
#? int()
b[0][0]
#? float()
b[1][1]
b = [a for arr in [[1]] if '' for a in arr if '']
#? int()
b[0]
b = [b for arr in [[[1.0]]] for a in arr for b in a]
#? float()
b[0]
#? str()
[x for x in 'chr'][0]
# From GitHub #26
#? list()
a = [[int(v) for v in line.strip().split() if v] for line in ["123", str(), "123"] if line]
#? list()
a[0]
#? int()
a[0][0]
# From GitHub #1524
#?
[nothing for nothing, _ in [1]][0]
# -----------------
# generator comprehensions
# -----------------
left, right = (i for i in (1, ''))
#? int()
left
#? str()
right
gen = (i for i in (1,))
#? int()
next(gen)
#?
gen[0]
gen = (a for arr in [[1.0]] for a in arr)
#? float()
next(gen)
#? int()
(i for i in (1,)).send()
# issues with different formats
left, right = (i for i in
('1', 2))
#? str()
left
#? int()
right
# -----------------
# name resolution in comprehensions.
# -----------------
def x():
"""Should not try to resolve to the if hio, which was a bug."""
#? 22
[a for a in h if hio]
if hio: pass
# -----------------
# slices
# -----------------
#? list()
foo = [x for x in [1, '']][:1]
#? int()
foo[0]
#? str()
foo[1]
# -----------------
# In class
# -----------------
class X():
def __init__(self, bar):
self.bar = bar
def foo(self):
x = [a for a in self.bar][0]
#? int()
x
return x
#? int()
X([1]).foo()
# -----------------
# dict comprehensions
# -----------------
#? int()
list({a - 1: 3 for a in [1]})[0]
d = {a - 1: b for a, b in {1: 'a', 3: 1.0}.items()}
#? int()
list(d)[0]
#? str() float()
d.values()[0]
#? str()
d[0]
#? float() str()
d[1]
#? float()
d[2]
# -----------------
# set comprehensions
# -----------------
#? set()
{a - 1 for a in [1]}
#? set()
{a for a in range(10)}
#? int()
[x for x in {a for a in range(10)}][0]
#? int()
{a for a in range(10)}.pop()
#? float() str()
{b for a in [[3.0], ['']] for b in a}.pop()
#? int()
next(iter({a for a in range(10)}))
#? int()
[a for a in {1, 2, 3}][0]
# -----------------
# syntax errors
# -----------------
# Issue #1146
#? ['list']
[int(str(x.value) for x in list
def reset_missing_bracket(): pass
# -----------------
# function calls
# -----------------
def foo(arg):
return arg
x = foo(x for x in [1])
#? int()
next(x)
#?
x[0]
# While it's illegal to have more than one argument, when a generator
# expression is involved, it's still a valid parse tree and Jedi should still
# work (and especially not raise Exceptions). It's debatable wheter inferring
# values for invalid statements is a good idea, but not failing is a must.
#? int()
next(foo(x for x in [1], 1))
def bar(x, y):
return y
#? str()
next(bar(x for x in [1], x for x in ['']))
| python |
<reponame>sho25/jackrabbit-oak<filename>oak-solr-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/query/SolrIndexLookup.java
begin_unit|revision:0.9.5;language:Java;cregit-version:0.0.1
begin_comment
comment|/* * 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. */
end_comment
begin_package
package|package
name|org
operator|.
name|apache
operator|.
name|jackrabbit
operator|.
name|oak
operator|.
name|plugins
operator|.
name|index
operator|.
name|solr
operator|.
name|query
package|;
end_package
begin_import
import|import
name|java
operator|.
name|util
operator|.
name|Collection
import|;
end_import
begin_import
import|import
name|java
operator|.
name|util
operator|.
name|Set
import|;
end_import
begin_import
import|import
name|com
operator|.
name|google
operator|.
name|common
operator|.
name|collect
operator|.
name|Sets
import|;
end_import
begin_import
import|import
name|org
operator|.
name|apache
operator|.
name|jackrabbit
operator|.
name|oak
operator|.
name|commons
operator|.
name|PathUtils
import|;
end_import
begin_import
import|import
name|org
operator|.
name|apache
operator|.
name|jackrabbit
operator|.
name|oak
operator|.
name|spi
operator|.
name|query
operator|.
name|Filter
import|;
end_import
begin_import
import|import
name|org
operator|.
name|apache
operator|.
name|jackrabbit
operator|.
name|oak
operator|.
name|spi
operator|.
name|state
operator|.
name|ChildNodeEntry
import|;
end_import
begin_import
import|import
name|org
operator|.
name|apache
operator|.
name|jackrabbit
operator|.
name|oak
operator|.
name|spi
operator|.
name|state
operator|.
name|NodeState
import|;
end_import
begin_import
import|import
name|org
operator|.
name|slf4j
operator|.
name|Logger
import|;
end_import
begin_import
import|import
name|org
operator|.
name|slf4j
operator|.
name|LoggerFactory
import|;
end_import
begin_import
import|import static
name|org
operator|.
name|apache
operator|.
name|jackrabbit
operator|.
name|oak
operator|.
name|plugins
operator|.
name|index
operator|.
name|IndexConstants
operator|.
name|INDEX_DEFINITIONS_NAME
import|;
end_import
begin_import
import|import static
name|org
operator|.
name|apache
operator|.
name|jackrabbit
operator|.
name|oak
operator|.
name|plugins
operator|.
name|index
operator|.
name|solr
operator|.
name|util
operator|.
name|SolrIndexInitializer
operator|.
name|isSolrIndexNode
import|;
end_import
begin_comment
comment|/** * Lookup for Solr indexes to be used for a given {@link Filter}. */
end_comment
begin_class
class|class
name|SolrIndexLookup
block|{
specifier|private
specifier|static
specifier|final
name|Logger
name|log
init|=
name|LoggerFactory
operator|.
name|getLogger
argument_list|(
name|SolrIndexLookup
operator|.
name|class
argument_list|)
decl_stmt|;
specifier|private
specifier|final
name|NodeState
name|root
decl_stmt|;
name|SolrIndexLookup
parameter_list|(
name|NodeState
name|root
parameter_list|)
block|{
name|this
operator|.
name|root
operator|=
name|root
expr_stmt|;
block|}
name|Collection
argument_list|<
name|String
argument_list|>
name|collectIndexNodePaths
parameter_list|(
name|Filter
name|filter
parameter_list|)
block|{
return|return
name|collectIndexNodePaths
argument_list|(
name|filter
argument_list|,
literal|true
argument_list|)
return|;
block|}
specifier|private
name|Collection
argument_list|<
name|String
argument_list|>
name|collectIndexNodePaths
parameter_list|(
name|Filter
name|filter
parameter_list|,
name|boolean
name|recurse
parameter_list|)
block|{
name|Set
argument_list|<
name|String
argument_list|>
name|paths
init|=
name|Sets
operator|.
name|newHashSet
argument_list|()
decl_stmt|;
name|collectIndexNodePaths
argument_list|(
name|root
argument_list|,
literal|"/"
argument_list|,
name|paths
argument_list|)
expr_stmt|;
if|if
condition|(
name|recurse
condition|)
block|{
name|StringBuilder
name|sb
init|=
operator|new
name|StringBuilder
argument_list|()
decl_stmt|;
name|NodeState
name|nodeState
init|=
name|root
decl_stmt|;
for|for
control|(
name|String
name|element
range|:
name|PathUtils
operator|.
name|elements
argument_list|(
name|filter
operator|.
name|getPath
argument_list|()
argument_list|)
control|)
block|{
name|nodeState
operator|=
name|nodeState
operator|.
name|getChildNode
argument_list|(
name|element
argument_list|)
expr_stmt|;
name|collectIndexNodePaths
argument_list|(
name|nodeState
argument_list|,
name|sb
operator|.
name|append
argument_list|(
literal|"/"
argument_list|)
operator|.
name|append
argument_list|(
name|element
argument_list|)
operator|.
name|toString
argument_list|()
argument_list|,
name|paths
argument_list|)
expr_stmt|;
block|}
block|}
return|return
name|paths
return|;
block|}
specifier|private
specifier|static
name|void
name|collectIndexNodePaths
parameter_list|(
name|NodeState
name|nodeState
parameter_list|,
name|String
name|parentPath
parameter_list|,
name|Collection
argument_list|<
name|String
argument_list|>
name|paths
parameter_list|)
block|{
name|NodeState
name|state
init|=
name|nodeState
operator|.
name|getChildNode
argument_list|(
name|INDEX_DEFINITIONS_NAME
argument_list|)
decl_stmt|;
for|for
control|(
name|ChildNodeEntry
name|entry
range|:
name|state
operator|.
name|getChildNodeEntries
argument_list|()
control|)
block|{
if|if
condition|(
name|isSolrIndexNode
argument_list|(
name|entry
operator|.
name|getNodeState
argument_list|()
argument_list|)
condition|)
block|{
name|String
name|indexNodePath
init|=
name|createIndexNodePath
argument_list|(
name|parentPath
argument_list|,
name|entry
operator|.
name|getName
argument_list|()
argument_list|)
decl_stmt|;
name|log
operator|.
name|debug
argument_list|(
literal|"found Solr index node at {}"
argument_list|,
name|indexNodePath
argument_list|)
expr_stmt|;
name|paths
operator|.
name|add
argument_list|(
name|indexNodePath
argument_list|)
expr_stmt|;
block|}
block|}
block|}
specifier|private
specifier|static
name|String
name|createIndexNodePath
parameter_list|(
name|String
name|parentPath
parameter_list|,
name|String
name|name
parameter_list|)
block|{
return|return
name|PathUtils
operator|.
name|concat
argument_list|(
name|parentPath
argument_list|,
name|INDEX_DEFINITIONS_NAME
argument_list|,
name|name
argument_list|)
return|;
block|}
block|}
end_class
end_unit
| java |
/*=========================================================================
Program: Visualization Toolkit
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkOpenGLGlyph3DHelper.h"
#include "vtkglVBOHelper.h"
#include "vtkBitArray.h"
#include "vtkCamera.h"
#include "vtkDataObject.h"
#include "vtkHardwareSelector.h"
#include "vtkMath.h"
#include "vtkMatrix3x3.h"
#include "vtkMatrix4x4.h"
#include "vtkNew.h"
#include "vtkObjectFactory.h"
#include "vtkOpenGLError.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLRenderer.h"
#include "vtkOpenGLShaderCache.h"
#include "vtkProperty.h"
#include "vtkShader.h"
#include "vtkShaderProgram.h"
#include "vtkTransform.h"
#include "vtkglGlyph3DVSFragmentLit.h"
using vtkgl::replace;
//-----------------------------------------------------------------------------
vtkStandardNewMacro(vtkOpenGLGlyph3DHelper)
//-----------------------------------------------------------------------------
vtkOpenGLGlyph3DHelper::vtkOpenGLGlyph3DHelper()
{
this->ModelTransformMatrix = NULL;
this->ModelNormalMatrix = NULL;
this->ModelColor = NULL;
this->UseFastPath = false;
this->UsingInstancing = false;
// we always tell our triangle VAO to emulate to be safe
// this is because it seems that GLEW_ARB_vertex_array_object
// does not always handle the attributes for GLEW_ARB_instanced_arrays
this->Tris.vao.SetForceEmulation(true);
}
//-----------------------------------------------------------------------------
void vtkOpenGLGlyph3DHelper::GetShaderTemplate(std::string &VSSource,
std::string &FSSource,
std::string &GSSource,
int lightComplexity, vtkRenderer* ren, vtkActor *actor)
{
this->Superclass::GetShaderTemplate(VSSource,FSSource,GSSource,lightComplexity,ren,actor);
VSSource = vtkglGlyph3DVSFragmentLit;
}
void vtkOpenGLGlyph3DHelper::ReplaceShaderValues(std::string &VSSource,
std::string &FSSource,
std::string &GSSource,
int lightComplexity,
vtkRenderer* ren,
vtkActor *actor)
{
// we use vertex instead of vertexMC
VSSource = replace(VSSource,
"//VTK::PositionVC::Impl",
"vertexVC = MCVCMatrix * vertex;\n"
" gl_Position = VCDCMatrix * vertexVC;\n");
// deal with color
if (this->UsingInstancing)
{
VSSource = replace(VSSource,"//VTK::Color::Dec",
"attribute vec4 glyphColor;\n"
"varying vec4 vertexColor;");
}
else
{
VSSource = replace(VSSource,
"//VTK::Color::Dec",
"uniform vec4 glyphColor;\n"
"varying vec4 vertexColor;");
}
VSSource = replace(VSSource,"//VTK::Color::Impl",
"vertexColor = glyphColor;");
// crate the material/color property declarations, and VS implementation
// these are always defined
std::string colorDec =
"uniform float opacityUniform; // the fragment opacity\n"
"uniform vec3 ambientColorUniform; // intensity weighted color\n"
"uniform vec3 diffuseColorUniform; // intensity weighted color\n";
// add some if we have a backface property
if (actor->GetBackfaceProperty())
{
colorDec +=
"uniform float opacityUniformBF; // the fragment opacity\n"
"uniform vec3 ambientColorUniformBF; // intensity weighted color\n"
"uniform vec3 diffuseColorUniformBF; // intensity weighted color\n";
}
// add more for specular
if (lightComplexity)
{
colorDec +=
"uniform vec3 specularColorUniform; // intensity weighted color\n"
"uniform float specularPowerUniform;\n";
if (actor->GetBackfaceProperty())
{
colorDec +=
"uniform vec3 specularColorUniformBF; // intensity weighted color\n"
"uniform float specularPowerUniformBF;\n";
}
}
colorDec += "varying vec4 vertexColor;\n";
FSSource = replace(FSSource,"//VTK::Color::Dec", colorDec);
// now handle the more complex fragment shader implementation
// the following are always defined variables. We start
// by assiging a default value from the uniform
std::string colorImpl =
"vec3 ambientColor;\n"
" vec3 diffuseColor;\n"
" float opacity;\n";
if (lightComplexity)
{
colorImpl +=
" vec3 specularColor;\n"
" float specularPower;\n";
}
if (actor->GetBackfaceProperty())
{
if (lightComplexity)
{
colorImpl +=
" if (int(gl_FrontFacing) == 0) {\n"
" ambientColor = ambientColorUniformBF;\n"
" diffuseColor = diffuseColorUniformBF;\n"
" specularColor = specularColorUniformBF;\n"
" specularPower = specularPowerUniformBF;\n"
" opacity = opacityUniformBF; }\n"
" else {\n"
" ambientColor = ambientColorUniform;\n"
" diffuseColor = diffuseColorUniform;\n"
" specularColor = specularColorUniform;\n"
" specularPower = specularPowerUniform;\n"
" opacity = opacityUniform; }\n";
}
else
{
colorImpl +=
" if (int(gl_FrontFacing) == 0) {\n"
" ambientColor = ambientColorUniformBF;\n"
" diffuseColor = diffuseColorUniformBF;\n"
" opacity = opacityUniformBF; }\n"
" else {\n"
" ambientColor = ambientColorUniform;\n"
" diffuseColor = diffuseColorUniform;\n"
" opacity = opacityUniform; }\n";
}
}
else
{
colorImpl +=
" ambientColor = ambientColorUniform;\n"
" diffuseColor = diffuseColorUniform;\n"
" opacity = opacityUniform;\n";
if (lightComplexity)
{
colorImpl +=
" specularColor = specularColorUniform;\n"
" specularPower = specularPowerUniform;\n";
}
}
// now handle scalar coloring
if (this->ScalarMaterialMode == VTK_MATERIALMODE_AMBIENT ||
(this->ScalarMaterialMode == VTK_MATERIALMODE_DEFAULT && actor->GetProperty()->GetAmbient() > actor->GetProperty()->GetDiffuse()))
{
FSSource = replace(FSSource,"//VTK::Color::Impl", colorImpl +
" ambientColor = vertexColor.rgb;\n"
" opacity = vertexColor.a;");
}
else if (this->ScalarMaterialMode == VTK_MATERIALMODE_DIFFUSE ||
(this->ScalarMaterialMode == VTK_MATERIALMODE_DEFAULT && actor->GetProperty()->GetAmbient() <= actor->GetProperty()->GetDiffuse()))
{
FSSource = replace(FSSource,"//VTK::Color::Impl", colorImpl +
" diffuseColor = vertexColor.rgb;\n"
" opacity = vertexColor.a;");
}
else
{
FSSource = replace(FSSource,"//VTK::Color::Impl", colorImpl +
" diffuseColor = vertexColor.rgb;\n"
" ambientColor = vertexColor.rgb;\n"
" opacity = vertexColor.a;");
}
if (this->UsingInstancing)
{
VSSource = replace(VSSource,
"//VTK::Glyph::Dec",
"attribute mat4 GCMCMatrix;");
}
else
{
VSSource = replace(VSSource,
"//VTK::Glyph::Dec",
"uniform mat4 GCMCMatrix;");
}
VSSource = replace(VSSource,
"//VTK::Glyph::Impl",
"vec4 vertex = GCMCMatrix * vertexMC;\n");
// new code for normal matrix if we have normals
if (this->Layout.NormalOffset)
{
if (this->UsingInstancing)
{
VSSource = replace(VSSource,
"//VTK::Normal::Dec",
"attribute vec3 normalMC;\n"
"attribute mat3 glyphNormalMatrix;\n"
"varying vec3 normalVCVarying;");
}
else
{
VSSource = replace(VSSource,
"//VTK::Normal::Dec",
"attribute vec3 normalMC;\n"
"uniform mat3 glyphNormalMatrix;\n"
"varying vec3 normalVCVarying;");
}
VSSource = replace(VSSource,
"//VTK::Normal::Impl",
"normalVCVarying = normalMatrix * glyphNormalMatrix * normalMC;");
}
// override one part of the clipping code
if (this->GetNumberOfClippingPlanes())
{
// add all the clipping planes
int numClipPlanes = this->GetNumberOfClippingPlanes();
if (numClipPlanes > 6)
{
vtkErrorMacro(<< "OpenGL has a limit of 6 clipping planes");
numClipPlanes = 6;
}
VSSource = vtkgl::replace(VSSource,
"//VTK::Clip::Impl",
"for (int planeNum = 0; planeNum < numClipPlanes; planeNum++)\n"
" {\n"
" clipDistances[planeNum] = dot(clipPlanes[planeNum], vertex);\n"
" }\n");
}
this->Superclass::ReplaceShaderValues(VSSource,FSSource,GSSource,lightComplexity,ren,actor);
}
//-----------------------------------------------------------------------------
vtkOpenGLGlyph3DHelper::~vtkOpenGLGlyph3DHelper()
{
}
void vtkOpenGLGlyph3DHelper::GlyphRender(vtkRenderer* ren, vtkActor* actor, vtkIdType numPts,
std::vector<unsigned char> &colors, std::vector<float> &matrices,
std::vector<float> &normalMatrices, std::vector<vtkIdType> &pickIds,
unsigned long pointMTime)
{
this->CurrentInput = this->GetInput();
this->UsingInstancing = false;
vtkHardwareSelector* selector = ren->GetSelector();
bool selecting_points = selector && (selector->GetFieldAssociation() ==
vtkDataObject::FIELD_ASSOCIATION_POINTS);
#if GL_ES_VERSION_2_0 != 1 || GL_ES_VERSION_3_0 == 1
if (actor->GetProperty()->GetRepresentation() == VTK_SURFACE &&
!selector &&
(vtkOpenGLRenderWindow::GetContextSupportsOpenGL32() ||
GLEW_ARB_instanced_arrays))
{
this->GlyphRenderInstances(ren, actor, numPts,
colors, matrices, normalMatrices, pointMTime);
return;
}
#endif
bool primed = false;
for (vtkIdType inPtId = 0; inPtId < numPts; inPtId++)
{
if (selecting_points)
{
selector->RenderAttributeId(pickIds[inPtId]);
}
if (!primed)
{
this->RenderPieceStart(ren,actor);
this->UpdateShader(this->Tris, ren, actor);
this->Tris.ibo.Bind();
primed = true;
}
// handle the middle
vtkShaderProgram *program = this->Tris.Program;
vtkgl::VBOLayout &layout = this->Layout;
// Apply the extra transform
program->SetUniformMatrix4x4("GCMCMatrix", &(matrices[inPtId*16]));
// for lit shaders set normal matrix
if (this->LastLightComplexity > 0 && this->Layout.NormalOffset)
{
program->SetUniformMatrix3x3("glyphNormalMatrix", &(normalMatrices[inPtId*9]));
}
program->SetUniform4uc("glyphColor", &(colors[inPtId*4]));
if (selector)
{
program->SetUniform3f("mapperIndex", selector->GetPropColorValue());
}
// First we do the triangles, update the shader, set uniforms, etc.
if (actor->GetProperty()->GetRepresentation() == VTK_POINTS)
{
glDrawRangeElements(GL_POINTS, 0,
static_cast<GLuint>(layout.VertexCount - 1),
static_cast<GLsizei>(this->Tris.indexCount),
GL_UNSIGNED_INT,
reinterpret_cast<const GLvoid *>(NULL));
}
if (actor->GetProperty()->GetRepresentation() == VTK_WIREFRAME)
{
// TODO wireframe of triangles is not lit properly right now
// you either have to generate normals and send them down
// or use a geometry shader.
glMultiDrawElements(GL_LINE_LOOP,
(GLsizei *)(&this->Tris.elementsArray[0]),
GL_UNSIGNED_INT,
reinterpret_cast<const GLvoid **>(&(this->Tris.offsetArray[0])),
(GLsizei)this->Tris.offsetArray.size());
}
if (actor->GetProperty()->GetRepresentation() == VTK_SURFACE)
{
glDrawRangeElements(GL_TRIANGLES, 0,
static_cast<GLuint>(layout.VertexCount - 1),
static_cast<GLsizei>(this->Tris.indexCount),
GL_UNSIGNED_INT,
reinterpret_cast<const GLvoid *>(NULL));
}
}
if (primed)
{
this->Tris.ibo.Release();
this->RenderPieceFinish(ren,actor);
}
}
//-----------------------------------------------------------------------------
void vtkOpenGLGlyph3DHelper::SetCameraShaderParameters(vtkgl::CellBO &cellBO,
vtkRenderer* ren, vtkActor *actor)
{
// do the superclass and then reset a couple values
this->Superclass::SetCameraShaderParameters(cellBO,ren,actor);
vtkShaderProgram *program = cellBO.Program;
// Apply the extra transform
if (this->ModelTransformMatrix)
{
program->SetUniformMatrix4x4("GCMCMatrix", this->ModelTransformMatrix);
}
// for lit shaders set normal matrix
if (this->LastLightComplexity > 0 && this->ModelNormalMatrix && this->Layout.NormalOffset)
{
program->SetUniformMatrix3x3("glyphNormalMatrix", this->ModelNormalMatrix);
}
}
//-----------------------------------------------------------------------------
void vtkOpenGLGlyph3DHelper::SetPropertyShaderParameters(vtkgl::CellBO &cellBO,
vtkRenderer *ren, vtkActor *actor)
{
// do the superclass and then reset a couple values
this->Superclass::SetPropertyShaderParameters(cellBO,ren,actor);
vtkShaderProgram *program = cellBO.Program;
if (this->ModelColor)
{
program->SetUniform4uc("glyphColor", this->ModelColor);
}
}
//-----------------------------------------------------------------------------
void vtkOpenGLGlyph3DHelper::SetMapperShaderParameters(vtkgl::CellBO &cellBO,
vtkRenderer *ren, vtkActor *actor)
{
this->Superclass::SetMapperShaderParameters(cellBO,ren,actor);
vtkHardwareSelector* selector = ren->GetSelector();
if (selector && selector->GetCurrentPass() == vtkHardwareSelector::ID_LOW24)
{
cellBO.Program->SetUniform3f("mapperIndex", selector->GetPropColorValue());
}
}
#if GL_ES_VERSION_2_0 != 1 || GL_ES_VERSION_3_0 == 1
void vtkOpenGLGlyph3DHelper::GlyphRenderInstances(
vtkRenderer* ren, vtkActor* actor, vtkIdType numPts,
std::vector<unsigned char> &colors, std::vector<float> &matrices,
std::vector<float> &normalMatrices,
unsigned long pointMTime)
{
this->UsingInstancing = true;
this->RenderPieceStart(ren,actor);
this->UpdateShader(this->Tris, ren, actor);
// do the superclass and then reset a couple values
if (this->Tris.indexCount && // we have points and one of
(this->OpenGLUpdateTime > this->InstanceBuffersLoadTime ||
this->Tris.ShaderSourceTime > this->InstanceBuffersLoadTime ||
pointMTime > this->InstanceBuffersLoadTime.GetMTime()))
{
this->Tris.vao.Bind();
// add 3 new BOs?
this->MatrixBuffer.Bind();
this->MatrixBuffer.Upload(matrices, vtkgl::BufferObject::ArrayBuffer);
if (!this->Tris.vao.AddAttributeMatrixWithDivisor(this->Tris.Program, this->MatrixBuffer,
"GCMCMatrix", 0, 16*sizeof(float), VTK_FLOAT, 4, false, 1))
{
vtkErrorMacro(<< "Error setting 'GCMCMatrix' in shader VAO.");
}
this->MatrixBuffer.Release();
if (this->Layout.NormalOffset)
{
this->NormalMatrixBuffer.Bind();
this->NormalMatrixBuffer.Upload(normalMatrices, vtkgl::BufferObject::ArrayBuffer);
if (!this->Tris.vao.AddAttributeMatrixWithDivisor(this->Tris.Program, this->NormalMatrixBuffer,
"glyphNormalMatrix", 0, 9*sizeof(float), VTK_FLOAT, 3, false, 1))
{
vtkErrorMacro(<< "Error setting 'glyphNormalMatrix' in shader VAO.");
}
this->NormalMatrixBuffer.Release();
}
this->ColorBuffer.Bind();
this->ColorBuffer.Upload(colors, vtkgl::BufferObject::ArrayBuffer);
if (!this->Tris.vao.AddAttributeArrayWithDivisor(this->Tris.Program, this->ColorBuffer,
"glyphColor", 0, 4*sizeof(unsigned char), VTK_UNSIGNED_CHAR, 4, true, 1, false))
{
vtkErrorMacro(<< "Error setting 'diffuse color' in shader VAO.");
}
this->ColorBuffer.Release();
this->InstanceBuffersLoadTime.Modified();
}
this->Tris.ibo.Bind();
#if GL_ES_VERSION_3_0 == 1
glDrawElementsInstanced(GL_TRIANGLES,
static_cast<GLsizei>(this->Tris.indexCount),
GL_UNSIGNED_INT,
reinterpret_cast<const GLvoid *>(NULL),
numPts);
#else
if (vtkOpenGLRenderWindow::GetContextSupportsOpenGL32())
{
glDrawElementsInstanced(GL_TRIANGLES,
static_cast<GLsizei>(this->Tris.indexCount),
GL_UNSIGNED_INT,
reinterpret_cast<const GLvoid *>(NULL),
numPts);
}
else if (GLEW_ARB_instanced_arrays)
{
glDrawElementsInstancedARB(GL_TRIANGLES,
static_cast<GLsizei>(this->Tris.indexCount),
GL_UNSIGNED_INT,
reinterpret_cast<const GLvoid *>(NULL),
numPts);
}
#endif
vtkOpenGLCheckErrorMacro("failed after Render");
this->Tris.ibo.Release();
this->RenderPieceFinish(ren, actor);
}
#endif
//-----------------------------------------------------------------------------
void vtkOpenGLGlyph3DHelper::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
}
| cpp |
<reponame>open-fidias/pjbank-java-sdk
package br.com.pjbank.sdk.enums;
/**
* @author <NAME> <<EMAIL>>
* @version 1.0
* @since 1.0
*/
public enum FormaRecebimento {
BOLETO_BANCARIO, CARTAO_CREDITO;
}
| java |
or a VW dealership near you, based on the local lockdown guidelines.
Ashish Gupta, Brand Director, Volkswagen Passenger Cars India said, "We are extremely excited to announce the introduction of new trim-line in the Polo family, Comfortline TSI AT for our discerning customers in India. The Polo continues to be a strong contender in the segment, and through this announcement, our endeavor is to continuously engage with customers, by offering striking enhancements on our flagship model, and provide safe and meticulously German engineered products coupled with a fun-to-drive experience. "
The new VW Polo Comfortline TSI AT will not feature any design changes as compared to other models, but it will come equipped with an auto-climatronic air-conditioning feature and a 17. 7 cm Blaupunkt music system, which is specific to this trim only.
As for the engine -- this new VW Polo variant comes powered by a 1. 0-litre TSI engine that belts out a peak power output of 108 bhp along with 175 Nm of maximum torque. Transmission duties are, of course, tended to by a six-speed automatic. | english |
TCS has fixed January 19 as the record date to determine the eligibility of shareholders for the proposed dividend. The third interim dividend and the special dividend will be paid on February 5 to the eligible shareholders. Shares of TCS will likely trade ex-dividend on the day or a day before the record date.
Infosys Q3 Results: Infosys reports a Q3 net profit of Rs 6,106 crore, down 7% YoY. Meanwhile, its Q3 revenue rose 1% to Rs 38,821 crore. The IT major revised revenue guidance for FY24 to 1.5%-2% in constant currency terms. It bagged $3.2 billion worth of large deals in Q3 and the attrition rate declined to 12.9%.
TCS Q3 Results: India’s largest software service provider reported a 2% YoY growth in consolidated net profit for the December quarter to Rs 11,058 crore, while the revenue increased 4% to Rs 60,583 crore. Analysts estimated a revenue of Rs 60,119 crore and a profit of Rs 11,446 crore. The board also recommended a special dividend payout of Rs 18/share and an interim dividend of Rs 9/share.
TCS Q3 Results Preview: In constant currency terms, most analysts expect TCS to see flat to a little over 1% growth in revenue sequentially. But there are a few brokerages like Nomura and BNP Paribas who foresee a decline in revenue. Most analysts have considered revenue contribution from the BSNL project in their topline estimates.
TCS and Infosys will release their Q3 earnings today amid expectations of weak numbers. However, bulls believe that this could be the last dull quarter before revenue growth picks up in Q4. Analysts anticipate TCS to deliver 1.5% QoQ cc revenue growth driven by large deal ramp-ups, with margin expansion driven by operational efficiencies. On the other hand, Infosys is expected to see a decline in USD revenue due to seasonal furloughs and the impact of a slowdown in discretionary tech spending.
We expect HCL's Q3FY24 revenue to grow in the mid-single digits QoQ driven by the Verizon deal ramp-up, the additional contribution from the ASAP Group acquisition for two months, and the seasonality benefits in the Products and Platform (P&P) business.
HCL Tech, Wipro, HDFC Life Insurance, Anand Rathi Wealth, JTL Industries, Tata Metaliks, Bharat Bijlee, Hi-Tech Pipes, Aditya Birla Money, Artson Engineering, International Travel House, LKP Finance, Amal Ltd among others will declare their Q3 results on January 12.
TCS Q3 Preview: PAT growth will likely be lower this time as against a 10.98% YoY increase the company reported during the December quarter last fiscal. On a sequential basis, the net profit is expected to grow 0.6%, as higher-than-usual furloughs are set to offset growth in Q3FY24.
Stock brokers' profits surged in the September quarter due to a record-breaking stock market rally, driven by increased client addition and higher trading activity. A study of six firms' second-quarter earnings showed average net profit growth over 40% from the June quarter and 53% from the same period a year ago.
In the first-half of FY23, the actual profit increased by 44.45% to ₹17,469 crore from ₹12,093 crores. This half-year profit incorporates an amount of ₹13,768 crore (net of tax), related to the accretions on the available solvency margin, transferred from the non-par fund to the shareholders' account. The Solvency Ratio, as of September 30, 2023, improved to 1.90 compared to 1.88.
Net commission for the quarter stood at Rs 6,077 crore, compared with Rs 5,808 crore a year ago. The solvency ratio as of September-end stood at 1.90 times, compared with 1.88 times a year ago. The gross non-performing assets ratio as of September 30 was 2.43%, compared with 5.60% a year ago, and 2.48% a quarter ago.
Operating revenue rose 20% year-on-year (YoY) to Rs 2,437 crore in the second quarter under review. The company has clocked 6% growth in its consolidated EBITDA to Rs 333 crore in the July-September period. EBITDA margins came in at 13.6% in the same period, down from 15.6% a year ago.
Max Healthcare Institute, NHPC, Bharat Forge, Hindustan Petroleum Corporation, Gland Pharma, Emami, Exide Industries, R R Kabel, Bajaj Electricals, Bikaji Foods International, Sun Pharma Advanced Research, Sobha Ltd, Ujjivan Financial Services, Quess Corp, Fusion MicroFinance, Gateway Distriparks, Heidelberg Cement, Va Tech Wabag, and Paras Defence and Space Technologies are among the other major companies releasing results on Monday.
As the earnings near the fag end, a plethora of companies are scheduled to release their second-quarter earnings in the week ahead. Divi’s Laboratories, FSN E-Commerce, Power Grid Corp of India, Adani Ports and SEZ, Apollo Hospitals, Bosch, Zee Entertainment Enterprises, LIC, Oil and Natural Gas Corp, Coal India, M&M, HAL, and Hindalco Industries are among the big names to watch out for.
Its total income stood at Rs 6,767.4 crore in the September quarter, up 16.5% YoY compared to Rs 5,810.4 crore in the same quarter of the previous financial year. On a QoQ basis, total income rose 1.3% to Rs 6,767.4 crore in Q2 FY24 from Rs 6,681 crore in Q1 FY24.
The company's total income rose to Rs 2,299.78 crore from Rs 2,029.74 crore a year ago. Its expenses were at Rs 1,818.02 crore as against Rs 1,634.07 crore in the July-September period a year ago. The board declared an interim dividend of Rs 3 per equity share of face value of Rs 5 each, amounting to Rs 182.79 crore for 2023-24.
The EBITDA in the quarter under review rose 15% to Rs 115 crore from Rs 100 crore in the same quarter last year. The margin, however, was down to 19.1% in the June-September period as against 23.3% in the same quarter a year ago.
The company which was listed in August rode on a Rs 217 crore of dividend income during the quarter which increased total income by 47% to Rs 608 crore from Rs 414 crore in the quarter ended June 2023. Expenses increased 31% to Rs 71 crore from Rs 54 crore a year ago largely due to a one and a half times increase in employee expenses to Rs 31 crore from Rs 12 crore in June.
Although the September quarter has been seasonally strong for Indian software exporters, analysts stated this time Q2 earnings are likely to show a continuation of weak demand with macro uncertainty prolonging.
| english |
{
"allowed_domains" : ["bbc.com"],
"start_urls": [
"https://www.bbc.com/sport/cricket"
],
"rules": [
{
"allow": ["https://www.bbc.com/sport/cricket"],
"follow": true,
"callback": "parseItems"
}
],
"paths": {
"title" : [
".//div[@id='responsive-story-page']/article/h1[@class='story-headline gel-trafalgar-bold ']/text()",
"//title/text()"
],
"author" : [
".//div[@class='gel-flag__body']/p[@class='gel-long-primer']/text()"
]
}
}
| json |
The New York district attorney charged Jonathan Majors with multiple counts of assault and harassment following his arrest in an alleged domestic dispute Saturday.
In documents obtained by Fox News Digital, Majors, 33, was charged with two counts of assault in the third degree, aggravated harassment in the second degree, attempted assault in the third degree and harassment in the second degree.
Police responded to a 911 call in the Chelsea neighborhood of Manhattan, and upon a preliminary investigation, determined Majors assaulted a 30-year-old woman.
The district attorney's complaint stated the defendant (Majors) "put his hand on her neck, causing bruising and substantial pain. "
In addition, the report stated "defendant strike her about the face with an open hand, causing substantial pain and a laceration behind her ear. "
The defendant also grabbed "her hand, causing swelling, bruising, and substantial pain to her finger. "
A judge granted a limited order of protection against the actor, and Majors is expected in court on May 8.
An initial police report listed charges as strangulation, assault and harassment. "Officers placed the 33-year-old male into custody without incident," the statement added. "The victim sustained minor injuries to her head and neck and was removed to an area hospital in stable condition. "
The "Lovecraft Country" star denied the altercation in a statement provided to Fox News Digital.
"Jonathan Majors is completely innocent and is provably the victim of an altercation with a woman he knows. We are quickly gathering and presenting evidence to the District Attorney with the expectation that all charges will be dropped imminently," Majors' lawyer, Priya Chaudhry said.
"This evidence includes video footage from the vehicle where this episode took place, witness testimony from the driver and others who both saw and heard the episode, and most importantly, two written statements from the woman recanting these allegations. All the evidence proves that Mr. Majors is entirely innocent and did not assault her whatsoever. Unfortunately, this incident came about because this woman was having an emotional crisis, for which she was taken to a hospital yesterday. "
She added, "The NYPD is required to make an arrest in these situations, and this is the only reason Mr. Majors was arrested. We expect these charges to be dropped soon. "
Majors made his screen debut in the 2017 ABC miniseries "When We Rise," and became a member of the Marvel universe six years later, portraying Kang the Conqueror in "Ant-Man and the Wasp: Quantumania. " | english |
# react-cljs [](https://clojars.org/dmohs/react)
A ClojureScript wrapper for React.
There are a number of React-like libraries for ClojureScript (e.g., Om, Reagent, Rum). This one sets itself apart by embracing the following two philosophies:
1. React is very well-engineered.
2. Objects are an excellent abstraction for UI components.
Because React is well-engineered, this wrapper aims to provide the absolute minimum interface necessary to make React usage seamless from ClojureScript. The primary benefit is that nearly every tool available to React developers in JavaScript (e.g., the full component lifecycle, refs, etc.) is available to users of this wrapper. The secondary benefit is that reading React's documentation, and using good judgement about how ClojureScript differs from JavaScript, is often enough to fully understand how to write code using this wrapper.
Since objects are an excellent abstraction for UI components, this wrapper eschews the usual practice of a function-first interface. Ad-hoc component methods (e.g., `:-handle-submit-button-click`) are natural and encouraged (we tend to prefix private methods with a hyphen by convention, which is not enforced).
Take a look at the [examples](http://dmohs.github.io/react-cljs/examples/) and the [examples source](https://github.com/dmohs/react-cljs/blob/master/src/test/cljs/webui/main.cljs) for usage. An understanding of React via React's excellent documentation will aid in understanding these examples.
If you'd like to try out the examples yourself with Figwheel's amazing hot-reloader, you'll need ruby and docker. Then run:
```sh
./project.rb start
```
to start Figwheel. When it has finished compiling, open http://localhost:3449/.
## Goodies
- **Built-in support for hot-reloading**. If you use, for example, [Figwheel](https://github.com/bhauman/lein-figwheel) to hot-reload files on change, React components created with the `defc` macro will be patched automatically.
- **Method tracing**. Including `:trace? true` in the class definition map will cause every method call to emit a message to the console. This also attempts to break infinite loops by setting a ceiling on the number of traces in a short time period.
- **React Developer Tools support**. Copies component state and props into plain JavaScript in non-optimized compilation modes so it is easier to use React Developer Tools (Chrome extension) to inspect components.
- **Bound methods**. Call `(r/method this :your-method)` to retrieve a method from your instance. Subsequent calls return an identical (not just equal) function, so it can be used in things like `addEventListener`/`removeEventListener`.
- **abind** *experimental*. Binds an atom passed as a property to a key in state. Whenever the atom's value changes, the corresponding state key will receive the new value (and cause a re-render).
### Add dependency:
```cljs
[dmohs/react "1.3.0"] ; [1]
```
**or**
```cljs
[dmohs/react "1.2.4+15.5.4-1"] ; [2]
```
[1] This version does not depend on React. You must bundle it separately (and include `create-react-class`) using Webpack or similar. You can get an example of this by reading the [scripts](https://github.com/dmohs/react-cljs/blob/master/.project/devserver.rb) used to start the dev environment.
[2] This version bundles the specified version of React via [CLJSJS](http://cljsjs.github.io/).
## Top-Level API
The Top-Level API closely follows React's Top-Level API:
https://facebook.github.io/react/docs/top-level-api.html
### React.Component
*Not applicable.*
### React.createClass
```cljs
;; (:require [dmohs/react :as r])
(def MyComponent
(r/create-class
{:get-initial-state (fn [] {:click-count 0})
:render
(fn [{:keys [this props state refs]}]
[:div {:style {:border "1px solid black"}}
"Hello there, " (:name props)
[:div {:ref "clickable-div"
:on-click (fn [e] (swap! state update-in [:click-count] inc))}
"I have been clicked " (:click-count @state) " times."]])
:component-did-mount
(fn [{:keys [refs]}]
(.focus (@refs "clickable-div")))}))
```
or, using the `defc` macro (preferred and supports hot-reloading):
```cljs
(r/defc MyComponent
{:get-initial-state ...
:render ...
...})
```
The `render` method can return either an element or a vector (as in the above example). Pass `:trace? true` for method tracing:
```cljs
(r/defc MyComponent
{:trace? true
:get-initial-state ...
:render ...
...})
```
### React.createElement
```cljs
(r/defc MyComponent ...)
(def PlainReactComponent (js/React.createClass ...))
(r/create-element
:div {:class-name "alert" :style {:background-color "red"}}
(r/create-element MyComponent {:foo "foo"})
(r/create-element PlainReactComponent {:bar "bar"}))
;; Vector syntax
(r/create-element [:div {:class-name "alert"}
"Child 1" "Child 2"
[MyComponent {:initial-click-count 15}]
[PlainReactComponent {:initial-click-count 21}]])
```
### React.cloneElement
*Not yet implemented.*
### React.createFactory
```cljs
(r/create-factory string-or-react-class)
```
### React.isValidElement
```cljs
(r/valid-element? x)
```
### ReactDOM.render
```cljs
(r/render element container callback)
```
### ReactDOM.unmountComponentAtNode
```cljs
(r/unmount-component-at-node container)
```
### ReactDOM.findDOMNode
```cljs
(r/find-dom-node element)
```
## Component Specifications
Component specifications closely follow React's Component Specifications:
https://facebook.github.io/react/docs/component-specs.html
React methods are defined using Clojure naming conventions (`:get-initial-state` corresponds to `getInitialState`). Additional methods become part of the object (as in React), so `:add-foo` can be called like so:
```cljs
(r/call :add-foo this "argument 1" "argument 2")
;; or
(r/call :add-foo (@refs "some-child") "argument 1" "argument 2")
```
Additionally, components implement `IFn`, so the above calls can be shortened to:
```cljs
(this :add-foo "argument 1" "argument 2")
;; and
((@refs "some-child") :add-foo "argument 1" "argument 2")
```
Methods are passed a map with the appropriate keys defined:
```cljs
{:this this ; the component instance
:props props
:state state ; state atom
:after-update ; [1]
:refs refs ; [2]
:locals ; [3]
:prev-props prevProps ; when applicable
:prev-state prevState ; "
:next-props nextProps ; "
:next-state nextState ; "
:abind ; [4]
}
```
1. This is used when you would pass a callback to `setState`, e.g.,
`(after-update #(.focus (r/find-dom-node this)))`. `after-update` is also defined as a root-level function, so this is identical: `(r/after-update this #(.focus (r/find-dom-node this)))`
2. The `refs` atom allows accessing `this.refs` as a map, e.g., `(.focus (@refs "my-text-box"))`.
3. Convenience atom for local variables. Instead of, e.g.,
`(set! (.-myTimer this) (js/setTimeout ...))`, you can do
`(swap! locals assoc :my-timer (js/setTimeout ...))`.
4. Bind a property atom to a key in state, e.g.,
`(abind :foo)` or `(abind :foo :my-state-key)`
Returns {state-key value-of-atom} for use in `:get-initial-state`.
Note: for non-api methods (like `:add-foo` above), this map is the first argument before any arguments passed when calling the method using `r/call` or via `this`.
Modifying the `state` atom implicitly calls `this.setState`. This maintains the behavior of React's `this.state` in the way that updates (via `swap!` or `reset!`) are not visible in `@state` until after the component is re-rendered.
Note that `propTypes`, `statics`, and `mixins` are not yet implemented. They may never be, since Clojure to some extent obviates the need for some of these utilities.
| markdown |
<reponame>bseeger/karaf<filename>jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/DigestPasswordLoginModule.java
/*
* 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.karaf.jaas.modules.properties;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Field;
import java.security.MessageDigest;
import java.util.HashSet;
import java.util.Map;
import javax.security.auth.Subject;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.NameCallback;
import javax.security.auth.callback.PasswordCallback;
import javax.security.auth.callback.UnsupportedCallbackException;
import javax.security.auth.login.FailedLoginException;
import javax.security.auth.login.LoginException;
import org.apache.commons.codec.binary.Base64;
import org.apache.felix.utils.properties.Properties;
import org.apache.karaf.jaas.boot.principal.GroupPrincipal;
import org.apache.karaf.jaas.boot.principal.RolePrincipal;
import org.apache.karaf.jaas.boot.principal.UserPrincipal;
import org.apache.karaf.jaas.modules.AbstractKarafLoginModule;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* JAAS Login module for user / password, based on two properties files.
*/
public class DigestPasswordLoginModule extends AbstractKarafLoginModule {
private static final transient Logger LOGGER = LoggerFactory.getLogger(DigestPasswordLoginModule.class);
static final String USER_FILE = "users";
private MessageDigest digest;
private String usersFile;
public void initialize(Subject sub, CallbackHandler handler, Map<String, ?> sharedState, Map<String, ?> options) {
super.initialize(sub,handler,options);
usersFile = (String) options.get(USER_FILE);
if (debug) {
LOGGER.debug("Initialized debug={} usersFile={}", debug, usersFile);
}
}
public String doPasswordDigest(String nonce, String created, String password) {
String passwdDigest = null;
try {
passwdDigest = doPasswordDigest(nonce, created, password.getBytes("UTF-8"));
} catch (Exception e) {
LOGGER.debug(e.getMessage(), e);
}
return passwdDigest;
}
public String doPasswordDigest(String nonce, String created, byte[] password) {
String passwdDigest = null;
try {
byte[] b1 = nonce != null ? new Base64().decode(nonce) : new byte[0];
byte[] b2 = created != null ? created.getBytes("UTF-8") : new byte[0];
byte[] b3 = password;
byte[] b4 = new byte[b1.length + b2.length + b3.length];
int offset = 0;
System.arraycopy(b1, 0, b4, offset, b1.length);
offset += b1.length;
System.arraycopy(b2, 0, b4, offset, b2.length);
offset += b2.length;
System.arraycopy(b3, 0, b4, offset, b3.length);
byte[] digestBytes = generateDigest(b4);
passwdDigest = new String(Base64.encodeBase64(digestBytes));
} catch (Exception e) {
LOGGER.debug(e.getMessage(), e);
}
return passwdDigest;
}
/**
* Generate a (SHA1) digest of the input bytes. The MessageDigest instance that backs this
* method is cached for efficiency.
* @param inputBytes the bytes to digest
* @return the digest of the input bytes
* @throws WSSecurityException
*/
public synchronized byte[] generateDigest(byte[] inputBytes) {
try {
if (digest == null) {
digest = MessageDigest.getInstance("SHA-1");
}
return digest.digest(inputBytes);
} catch (Exception e) {
throw new RuntimeException("Error in generating digest", e);
}
}
public boolean login() throws LoginException {
if (usersFile == null) {
throw new LoginException("The property users may not be null");
}
File f = new File(usersFile);
if (!f.exists()) {
throw new LoginException("Users file not found at " + f);
}
Properties users;
try {
users = new Properties(f);
} catch (IOException ioe) {
throw new LoginException("Unable to load user properties file " + f);
}
Callback[] callbacks = new Callback[2];
callbacks[0] = new NameCallback("Username: ");
callbacks[1] = new PasswordCallback("Password: ", false);
if (callbackHandler != null) {
try {
callbackHandler.handle(callbacks);
} catch (IOException ioe) {
throw new LoginException(ioe.getMessage());
} catch (UnsupportedCallbackException uce) {
throw new LoginException(uce.getMessage() + " not available to obtain information from user");
}
}
// user callback get value
if (((NameCallback) callbacks[0]).getName() == null) {
throw new LoginException("Username can not be null");
}
user = ((NameCallback) callbacks[0]).getName();
if (user.startsWith(PropertiesBackingEngine.GROUP_PREFIX)) {
// you can't log in under a group name
throw new FailedLoginException("login failed");
}
// password callback get value
if (((PasswordCallback) callbacks[1]).getPassword() == null) {
throw new LoginException("Password can not be null");
}
String password = new String(((PasswordCallback) callbacks[1]).getPassword());
// user infos container read from the users properties file
String userInfos = null;
try {
userInfos = users.get(user);
} catch (NullPointerException e) {
//error handled in the next statement
}
if (userInfos == null) {
if (!this.detailedLoginExcepion) {
throw new FailedLoginException("login failed");
} else {
throw new FailedLoginException("User " + user + " does not exist");
}
}
// the password is in the first position
String[] infos = userInfos.split(",");
String storedPassword = infos[0];
CallbackHandler myCallbackHandler = null;
try {
Field field = callbackHandler.getClass().getDeclaredField("ch");
field.setAccessible(true);
myCallbackHandler = (CallbackHandler) field.get(callbackHandler);
} catch (Exception e) {
throw new LoginException("Unable to load underlying callback handler");
}
if (myCallbackHandler instanceof NameDigestPasswordCallbackHandler) {
NameDigestPasswordCallbackHandler digestCallbackHandler = (NameDigestPasswordCallbackHandler)myCallbackHandler;
storedPassword = doPasswordDigest(digestCallbackHandler.getNonce(),
digestCallbackHandler.getCreatedTime(),
storedPassword);
}
// check the provided password
if (!checkPassword(password, storedPassword)) {
if (!this.detailedLoginExcepion) {
throw new FailedLoginException("login failed");
} else {
throw new FailedLoginException("Password for " + user + " does not match");
}
}
principals = new HashSet<>();
principals.add(new UserPrincipal(user));
for (int i = 1; i < infos.length; i++) {
if (infos[i].trim().startsWith(PropertiesBackingEngine.GROUP_PREFIX)) {
// it's a group reference
principals.add(new GroupPrincipal(infos[i].trim().substring(PropertiesBackingEngine.GROUP_PREFIX.length())));
String groupInfo = users.get(infos[i].trim());
if (groupInfo != null) {
String[] roles = groupInfo.split(",");
for (int j = 1; j < roles.length; j++) {
principals.add(new RolePrincipal(roles[j].trim()));
}
}
} else {
// it's an user reference
principals.add(new RolePrincipal(infos[i].trim()));
}
}
users.clear();
if (debug) {
LOGGER.debug("Successfully logged in {}", user);
}
return true;
}
public boolean abort() throws LoginException {
clear();
if (debug) {
LOGGER.debug("abort");
}
return true;
}
public boolean logout() throws LoginException {
subject.getPrincipals().removeAll(principals);
principals.clear();
if (debug) {
LOGGER.debug("logout");
}
return true;
}
}
| java |
Luka Doncic had 27 points, 12 rebounds and 10 assists in his 40th career triple-double, and the Dallas Mavericks used a second-half rally to rout Memphis 112-85 on Friday night and end the Grizzlies’ winning streak at 11 games.
Doncic had 18 points in the second half, connecting on 8 of 10 shots. Tim Hardaway Jr. scored 16 points, and Jalen Brunson and Marquese Chriss had 15 points apiece, with Brunson adding nine assists.
"Our defense was amazing," Doncic said. "(The Grizzlies) have a great offense, and it’s tough to stop them, but I think we did an amazing job in the second half. "
Ja Morant led Memphis with 19 points and eight assists, Desmond Bane had 16 points and Kyle Anderson added 12. The Grizzlies lost for the first time since Dec. 23, getting little help beyond its top three scorers.
The Grizzlies were playing the second night of a back-to-back and their fifth game in a week. Morant said the schedule may have finally caught up with them.
"Pretty much from our legs being heavy and our shots were short," Morant said, later adding the fatigue contributed to his eight turnovers and other mistakes in the game.
Memphis shot 38% from the field and made only seven of 31 shots from beyond the arc. Meanwhile, the Mavericks were at almost 52% from the floor.
The Mavericks have been playing well. Before losing 108-85 at New York on Wednesday night, Dallas had clicked off six straight victories.
Dallas gained a bit of a cushion in the second half, starting the third quarter shooting better than the first half. That catapulted the Mavs to an 84-73 lead entering the fourth. Doncic scored 10 points in the third to help the Mavericks build their lead, as they outscored Memphis 34-18 in the period.
When Dallas rattled off the first seven points of the fourth, the lead swelled to 18. Grizzlies interim coach Darko Rajakovic called off his starters with five minutes left and Memphis trailing by 24.
The lead would eventually reach 31 as Memphis managed only 12 points in the fourth quarter and 30 after halftime.
"I thought the team rebounding and the team defense was excellent to go with the tempo and pace offensively," Dallas interim coach Sean Sweeney said. "I thought it was great all around. "
As for Memphis, the longest regular-season winning streak ended, but the stretch moved the Grizzlies into third place in the Western Conference.
"First thing I told guys was congratulations for an amazing streak and making history for our franchise," Rajakovic said. "Eleven straight wins. It’s a huge thing. We were playing really good basketball. "
Mavericks: Willie Cauley-Stein (personal reasons) and Kristaps Porzingis (health and safety protocols) were both out. … Dallas has won seven of the last 10 games in the series. …Maxi Kleber started his 10th game of the season.
Grizzlies: The Grizzlies had swept three back-to-backs in the streak. They beat Minnesota on Thursday night. … C Steven Adams returned after missing four games in health and safety protocols. … F Brandon Clarke started his first game of the season.
UP NEXT:
Mavericks: Host Orlando on Saturday night.
Grizzlies: Host Chicago on Monday night. | english |
{"object":{"id":"861249","dataset":"gminy","object_id":"1861","data":{"powiaty.sejm_okreg_id":"38","nazwa_urzedu":"Urz\u0105d Gminy i <NAME>","wydatki_roczne":"29356136.72","teryt":"302805","id":"1861","powierzchnia":"198.00","nts":"4306028053","szef_stanowisko_id":"1","nazwa":"Skoki","zadluzenie_roczne":"822885.61","dochody_roczne":"28533251.11","powiaty.nazwa":"w\u0105growiecki","fax":"0-61 8 925-803","adres":"Skoki, Ul. Ciastowicza 11 62-085 Skoki","wojewodztwa.id":"15","telefon":"0-61 8 925-801","typ_nazwa":"Gmina miejsko-wiejska","powiat_id":"338","wojewodztwa.nazwa":"Wielkopolskie","bip_www":"skoki.nowoczesnagmina.pl","liczba_ludnosci":9073,"typ_id":"3","wojewodztwo_id":"15","email":"<EMAIL>","powiaty.id":"338","rada_nazwa":"<NAME>"},"score":1,"layers":{"enspat":{"ADD":["a}|`Isq_hBjrBrnBhLpbGwG~{@vHcEtH~f@uOlJ_TqGhHfTaH~DfEbc@`Txj@tH|z@nCw{@bNlVtIyRhSrHhOxe@dc@gRxAtQpKChq@<KEY>"],"DIFF":[]},"rada_komitety":null,"wskazniki":null,"radni_powiazania":null,"szef":null,"ostatnie_posiedzenie":null,"dzielnice":null,"dataset":null}}} | json |
Work From Home Latest News Today: The new policy would come into effect from September. With this the social media giant aims to increase productivity and efficiency of the employees.
Work from home latest news update (Representational image)
Work From Home Latest News Today: After Tata Consultancy Services (TCS), Meta Inc. (formerly the Facebook company) is reportedly mulling a new policy which would require employees assigned to an office to work on-site three days a week. The new policy would come into effect from September. With this the social media giant aims to increase productivity and efficiency of the employees.
Quoting an insider, Bloomberg reported that existing remote workers, however, would be permitted to continue their working from their current locations. "We're committed to distributed work, and we're confident people can make a meaningful impact both from the office and at home. We're also committed to continuously refining our model to foster the collaboration, relationships and culture necessary for employees to do their best work," a Meta spokesperson quoted in the report said.
Earlier in March, Meta Chief Executive Officer Mark Zuckerberg had highlighted the importance of working from the office. In an e-mail to Meta employees, wherein he announced a fresh round of layoffs of about 10,000 employees, Zuckerberg shared his vision for the company's future and put forth his thoughts on working from home.
Encouraging people to "find more opportunities to work with their colleagues in person", Zuckerberg reportedly said that the company's early analysis of performance data showed that engineers who either joined Meta in-person and then transferred to remote or remained in-person did better on average than people who joined remotely.
"This analysis also shows that engineers earlier in their careers perform better on average when they work in person with teammates at least three days a week. This requires further study, but our hypothesis is that it is still easier to build trust in the person and that those relationships help us work more effectively", the mail by Zuckerberg read. | english |
<filename>geeksw/plotting/__init__.py
from .Plot import Plot
from .RocPlot import RocPlot
| python |
{
"type": "object",
"title": "Custom Errors",
"patternProperties": {
".*": {
"type": "object",
"required": [
"code",
"reason",
"message"
],
"properties": {
"code": {
"type": "integer",
"title": "Status Code",
"examples": [503]
},
"reason": {
"type": "string",
"title": "Reason Phrase",
"examples": ["Bad Connectivity"]
},
"message": {
"type": ["string","array","object"],
"title": "Detailed Error Message",
"examples": [
"You have issues accessing the system",
["You have issues accessing the system", "Unable to connect to https://someurl"]
]
}
}
}
},
"additionalProperties": false
} | json |
Anupam Kher expressed his disappointment after visiting an Apple store in New York and noticing that the store featured watches representing all countries but India.
Bollywood actor Anupam Kher expressed disappointment as he recently visited an Apple store in New York. The actor took to Twitter and shared a video from the Apple store where they had displayed customised watches, representing each of the nations that participated in the Tokyo Olympic Games. He, however, couldn’t see any watch representing India.
The video shared by Anupam Kher featured watches representing other countries including Jamaica, France, Australia and Canada, among others. Each watch had the initials of the countries written over them.
Anupam shared the clip through Twitter and wrote, "Dear @Apple! Visited your store on 5th ave in NY! Impressive! There were watches of International Olympic collection representing flags of various countries! Was disappointed not to see INDIA’s watch there? I wonder why? We are one of the largest consumers of #Apple products!"
Check out the tweet below:
Shortly after the senior actor shared the video, his tweet was flooded with comments. While some were left furious, some even suggested that we only use Indian products.
Anupam Kher has been in the US for several weeks now for the shooting of his upcoming film Shiv Shastri Balboa. The film also features Neena Gupta and Jugal Hansraj and was wrapped a few days ago. Directed by Ajayan Venugopalan, it also features Neena Gupta and Jugal Hansraj.
Recently, after the shoot of his upcoming film, Anupam Kher shared an Instagram post detailing his experience working on the project, which is his 519th film.
| english |
<filename>applications/SolidMechanicsApplication/python_scripts/check_scalar_on_nodes_process.py
import KratosMultiphysics
import sys
from math import *
# Import KratosUnittest
import KratosMultiphysics.KratosUnittest as KratosUnittest
class aux_object_cpp_callback:
def __init__(self, compiled_function ):
self.compiled_function = compiled_function
def f(self,x,y,z,t):
return eval(self.compiled_function)
#return 0
def Factory(settings, Model):
if( not isinstance(settings,KratosMultiphysics.Parameters) ):
raise Exception("expected input shall be a Parameters object, encapsulating a json string")
return CheckScalarOnNodesProcess(Model, settings["Parameters"])
## All the processes python should be derived from "Process"
class CheckScalarOnNodesProcess(KratosMultiphysics.Process, KratosUnittest.TestCase):
def __init__(self, Model, settings ):
KratosMultiphysics.Process.__init__(self)
default_settings = KratosMultiphysics.Parameters("""
{
"mesh_id" : 0,
"model_part_name" : "please_specify_model_part_name",
"variable_name" : "SPECIFY_VARIABLE_NAME",
"interval" : [0.0, 1e30],
"value" : 0.0,
"tolerance_rank" : 3,
"local_axes" : {}
}
"""
)
#detect "End" as a tag and replace it by a large number
if(settings.Has("interval")):
if(settings["interval"][1].IsString() ):
if(settings["interval"][1].GetString() == "End"):
settings["interval"][1].SetDouble(1e30) # = default_settings["interval"][1]
else:
raise Exception("the second value of interval can be \"End\" or a number, interval currently:"+settings["interval"].PrettyPrintJsonString())
#here i do a trick, since i want to allow "value" to be a string or a double value
if(settings.Has("value")):
if(settings["value"].IsString()):
default_settings["value"].SetString("0.0")
settings.ValidateAndAssignDefaults(default_settings)
#admissible values for local axes, are "empty" or
#"local_axes" :{
# "origin" : [0.0, 0.0, 0.0]
# "axes" : [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0] ]
# }
self.non_trivial_local_system = False
if(settings["local_axes"].Has("origin")): # not empty
self.non_trivial_local_system = True
self.R = KratosMultiphysics.Matrix(3,3)
self.R[0,0] = settings["local_axes"]["axes"][0][0].GetDouble()
self.R[0,1] = settings["local_axes"]["axes"][0][1].GetDouble()
self.R[0,2] = settings["local_axes"]["axes"][0][2].GetDouble()
self.R[1,0] = settings["local_axes"]["axes"][1][0].GetDouble()
self.R[1,1] = settings["local_axes"]["axes"][1][1].GetDouble()
self.R[1,2] = settings["local_axes"]["axes"][1][2].GetDouble()
self.R[2,0] = settings["local_axes"]["axes"][2][0].GetDouble()
self.R[2,1] = settings["local_axes"]["axes"][2][1].GetDouble()
self.R[2,2] = settings["local_axes"]["axes"][2][2].GetDouble()
self.x0 = KratosMultiphysics.Vector(3)
self.x0[0] = settings["local_axes"]["origin"][0].GetDouble()
self.x0[1] = settings["local_axes"]["origin"][1].GetDouble()
self.x0[2] = settings["local_axes"]["origin"][2].GetDouble()
self.model = Model
self.settings = settings
self.variable = getattr(KratosMultiphysics, settings["variable_name"].GetString())
self.interval = KratosMultiphysics.Vector(2)
self.interval[0] = settings["interval"][0].GetDouble()
self.interval[1] = settings["interval"][1].GetDouble()
self.value_is_numeric = False
self.is_time_function = False
if settings["value"].IsNumber():
self.value_is_numeric = True
self.value = settings["value"].GetDouble()
else:
self.function_string = settings["value"].GetString()
if (sys.version_info > (3, 0)):
self.aux_function = aux_object_cpp_callback(compile(self.function_string, '', 'eval', optimize=2))
else:
self.aux_function = aux_object_cpp_callback(compile(self.function_string, '', 'eval'))
if(self.function_string.find("x") == -1 and
self.function_string.find("y") == -1 and
self.function_string.find("z") == -1): #depends on time alone!
self.is_time_function = True
# Error tolerance
self.tol = settings["tolerance_rank"].GetInt()
# print("Finished construction of ApplyCustomFunctionProcess Process")
def ExecuteInitialize(self):
self.model_part = self.model[self.settings["model_part_name"].GetString()]
self.mesh = self.model_part.GetMesh(self.settings["mesh_id"].GetInt())
def ExecuteInitializeSolutionStep(self):
pass
def ExecuteFinalizeSolutionStep(self):
current_time = self.model_part.ProcessInfo[KratosMultiphysics.TIME] #- self.model_part.ProcessInfo[KratosMultiphysics.DELTA_TIME]
if(current_time >= self.interval[0] and current_time<self.interval[1]):
if self.value_is_numeric:
for node in self.mesh.Nodes:
value = node.GetSolutionStepValue(self.variable, 0)
self.assertAlmostEqual(self.value, value, self.tol)
else:
if self.is_time_function:
self.value = self.aux_function.f(0.0,0.0,0.0,current_time)
for node in self.mesh.Nodes:
value = node.GetSolutionStepValue(self.variable, 0)
self.assertAlmostEqual(self.value, value, self.tol)
else: #most general case - space varying function (possibly also time varying)
if self.non_trivial_local_system == False:
for node in self.model_part.Nodes:
value = node.GetSolutionStepValue(self.variable, 0)
self.assertAlmostEqual(self.aux_function.f(node.X,node.Y,node.Z,current_time), value, self.tol)
else: #TODO: OPTIMIZE!!
for node in self.model_part.Nodes:
dx = node - self.x0
x = self.R[0,0]*dx[0] + self.R[0,1]*dx[1] + self.R[0,2]*dx[2]
y = self.R[1,0]*dx[0] + self.R[1,1]*dx[1] + self.R[1,2]*dx[2]
z = self.R[2,0]*dx[0] + self.R[2,1]*dx[1] + self.R[2,2]*dx[2]
value = node.GetSolutionStepValue(self.variable, 0)
self.assertAlmostEqual(self.aux_function.f(x,y,z,current_time), value, self.tol)
| python |
["airbrake-hapi","apps-api","centauro","chrome-tab-capture-visible-tab-full","chrome-web-store-item-property","chrome-web-store-item-property-cli","clappr-estat-plugin","clappr-ga-events-plugin","cloudmine-servercode","coffee-mule","command-runner","elasticsearch-csv","eslint-config-gigigo","exocomm-mock","exoservice-js","exprestive","fastchat","generator-exoservice-livescript","generator-gulpplugin-coffee","hapi-router-coffee","http-cli","is-nwjs","is-nwjs-mac","is-scoped-package","is-travis-ci-build","is-travis-ci-build-for-tag","jade-lint","jshint-reporter-bamboo","jsstana","jsverify","jsverify-contrib","lazy-seq","ljs","ljs2","mi-angular-alert-service","mi-angular-bootstrap-ultron","mi-angular-date-range-picker","mi-angular-resource-builder","mi24-bootstrap","mixfix","mm-mongoose-connection","mm-node-mailer","mycha","nifty","npm-freeze","nwjs-open-link-in-browser","presentation-service","presentation-service-server","pug-lint","rc4","react-admin-components","relaxed-json","remove-trailing-path-separator","response-state.coffee","stylinpug","stylperjade","trampa","typify","typify-parser","universal-event-tracker","webpack-brevity"] | json |
New Delhi: Police in Kerala have not charged a 23-year-old law student who chopped off the penis of her alleged rapist, a self-styled 53-year-old godman, and rightly so.
Section 100 in the Indian Penal Code protects victims when the attack is on their life, and what’s a life without dignity? To protect her dignity, a woman can even kill her assailant and the law shall protect her. Section 100 in the IPC enumerates situations when a person gets the protection after exercising his or her right of self-defence.
Therefore, the IPC comes to the aid of all women in situations where the offenders attempt to, or, commit sexual assaults. An imminent fear of grave harm is a reason sufficient enough in law to act in self-defence. This immunity is also available when there is an apprehension of death or kidnapping.
The accused was rushed to the Thiruvananthapuram Medical College where an emergency surgery was performed. Hospital officials, however, said that 90% of his penis was cut off and was not in a position to be re-attached. He has been booked under Section 376 (Rape) of the Indian Penal Code (IPC) and under the Protection of Children from Sexual Offenses Act (POCSO). He reportedly told the police that he had chopped off his penis himself. | english |
{"generated_at": "2017-01-27T09:37:39.248480", "required_by": ["story_chain", "crawlermaster", "pycameo"], "requires": ["Pillow", "Flask", "pymongo", "selenium"], "package": "bennu"} | json |
Prime Minister Pushpa Kamal Dahal 'Prachanda' has said he has a goal to materialize the dream of good governance and prosperity in the country.
During the meeting with a delegation of All Nepal National Free Students Union, close to the CPN (Unified Socialist), PM Dahal clarified that the role of students would be significant for the same.
The delegation led by chairperson Sudesh Parajuli had reached the official residence of the Prime Minister at Baluwatar today to congratulate Prime Minister Dahal.
On the occasion, the delegation also extended best wishes to PM Dahal and wished for a successful tenure. The organization had drawn the PM's attention regarding the election of Free Students Union which has not taken place since long.
The PM is chancellor of the Tribhuvan University. Chairperson Parajuli said discussion was also held on contemporary political issues on the occasion.
READ ALSO: | english |
<filename>pyxform/validators/odk_validate/bin/installed.json
{
"assets": [
{
"browser_download_url": "https://github.com/opendatakit/validate/releases/download/v1.14.0/ODK-Validate-v1.14.0.jar",
"content_type": "application/java-archive",
"created_at": "2020-02-06T22:27:46Z",
"download_count": 3,
"id": 17853556,
"label": null,
"name": "ODK-Validate-v1.14.0.jar",
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3ODUzNTU2",
"size": 1656498,
"state": "uploaded",
"updated_at": "2020-02-06T22:27:53Z",
"uploader": {
"avatar_url": "https://avatars3.githubusercontent.com/u/32369?v=4",
"events_url": "https://api.github.com/users/yanokwa/events{/privacy}",
"followers_url": "https://api.github.com/users/yanokwa/followers",
"following_url": "https://api.github.com/users/yanokwa/following{/other_user}",
"gists_url": "https://api.github.com/users/yanokwa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/yanokwa",
"id": 32369,
"login": "yanokwa",
"node_id": "MDQ6VXNlcjMyMzY5",
"organizations_url": "https://api.github.com/users/yanokwa/orgs",
"received_events_url": "https://api.github.com/users/yanokwa/received_events",
"repos_url": "https://api.github.com/users/yanokwa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/yanokwa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yanokwa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/yanokwa"
},
"url": "https://api.github.com/repos/opendatakit/validate/releases/assets/17853556"
}
],
"assets_url": "https://api.github.com/repos/opendatakit/validate/releases/23463586/assets",
"author": {
"avatar_url": "https://avatars3.githubusercontent.com/u/32369?v=4",
"events_url": "https://api.github.com/users/yanokwa/events{/privacy}",
"followers_url": "https://api.github.com/users/yanokwa/followers",
"following_url": "https://api.github.com/users/yanokwa/following{/other_user}",
"gists_url": "https://api.github.com/users/yanokwa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/yanokwa",
"id": 32369,
"login": "yanokwa",
"node_id": "MDQ6VXNlcjMyMzY5",
"organizations_url": "https://api.github.com/users/yanokwa/orgs",
"received_events_url": "https://api.github.com/users/yanokwa/received_events",
"repos_url": "https://api.github.com/users/yanokwa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/yanokwa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yanokwa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/yanokwa"
},
"body": "[All changes](https://github.com/opendatakit/validate/compare/v1.13.2..v1.14.0)\r\n\r\n**Highlights**\r\n* Upgrade to [JavaRosa v2.17.0](https://github.com/opendatakit/javarosa/releases/tag/v2.17.0)\r\n",
"created_at": "2020-02-06T22:21:53Z",
"draft": false,
"html_url": "https://github.com/opendatakit/validate/releases/tag/v1.14.0",
"id": 23463586,
"name": "ODK Validate v1.14.0",
"node_id": "MDc6UmVsZWFzZTIzNDYzNTg2",
"prerelease": false,
"published_at": "2020-02-06T22:27:30Z",
"tag_name": "v1.14.0",
"tarball_url": "https://api.github.com/repos/opendatakit/validate/tarball/v1.14.0",
"target_commitish": "master",
"upload_url": "https://uploads.github.com/repos/opendatakit/validate/releases/23463586/assets{?name,label}",
"url": "https://api.github.com/repos/opendatakit/validate/releases/23463586",
"zipball_url": "https://api.github.com/repos/opendatakit/validate/zipball/v1.14.0"
} | json |
NBA legend Michael Jordan talks about his special relationship with the late Gus Lett, revealing the latter was like a father figure to him.
Michael Jordan’s unprecedented popularity can never be matched, especially during his playing days with the Chicago Bulls. The media, fans, almost everyone wanted to know about his every movement. It came to a point where the constant public attention and curiosity became toxic for MJ.
The constant scrutiny was one of the reasons he didn’t feel like donning his basketball sneakers after the 3-peat in 1993. However, his father, James Jordan’s tragic death, impacted him severely. Though Jordan took a brief retirement from the hardwood, he would return towards the end of the 1994-95 season.
During this time, MJ developed a special bond with his security personnel Gus Lett, who he called his protector. After Jordan’s father passed away in a tragedy, the Bulls guard became very close to Gus, calling him late at night to discuss his heart out.
Soon Gus became like a father figure to MJ, accompanying the latter everywhere. Jordan’s recently released docu-series The Last Dance gave an insight into the special bond between the two.
Who was Gus Lett, and how did he become a part of Michael Jordan’s inner circle?
Gus started his career as a patrolman and would work his way up as a sergeant in the Chicago Police Department, and was then hired, to be Jordan’s personal bodyguard. The Bulls MVP described Gus as the following.
Tisher Lett, the wife of Gus, spoke about how the Bulls superstar would call her husband crying at 2’0 clock in the morning, and Gus would get up and go to him. At the time, Jordan was reeling from his father’s tragic death and would seek comfort from Gus.
Sadly, Gus was diagnosed with lung cancer and couldn’t accompany MJ after some time. However, the Bulls guard was there at every step, whether it was at the hospital or Gus’ household, attending treatments and checking on him on regular basis.
Fortunately, MJ would have Gus present during the 1998 ECF against the Indiana Pacers. Jordan described the series as one of his toughest but would have Gus for Game Seven at the United Center. The Bulls would win the series, with MJ calling Gus his inspiration during the post-game interview.
Gus died in 2000 after a long battle with cancer, but his segment became a talking point of the award-winning series The Last Dance.
| english |
Whoa! Will Chiyaan Vikram say yes to turn villain for Superstar Rajinikanth?
Chiyaan Vikram, hailed as one of the most versatile actors in India recently enthralled audiences as Aditha Karikalan in Mani Ratnam's 'Ponniyin Selvan 1' and 'Ponniyin Selvan 2'. Unfortunately he broke his ribs while rehearsing for an action sequence for Pa Ranjith's 'Thangalaan' and has been adviced a months rest by doctors.
Meanwhile there is a strong buzz in Kollywood that director T. J. Gnanavel has approached Vikram to play the chief antagonist role in Superstar Rajinikanth's 'Thalaivar 170' which goes on floors in a few weeks time. Though Vikram liked the story and his role he was reluctant to act in a negative shade.
Sources say that Lyca Productions owner Subaskaran has offerred a remuneration of rupees fifty crores to Vikram that too in a single payment. It is worth mentioning that Lyca produced both 'PS-1' and 'PS-2' and the company has a good rapport with Chiyaan. We have to wait and watch if the deal goes through and we will get to watch the one and only Superstar and one and only Super Actor locking horns. Stay tuned.
Follow us on Google News and stay updated with the latest! | english |
We have reached mid-week and you probably are governed with the most important question of "How does my day look like? " There are quite a handful of people who like to turn to astrology to figure out what their stars have in store for them. For people like them and others, we orient this space to the astrology prediction of all zodiac signs. The prediction helps people prepare for losses and gains that they might witness in their domestic or professional life. Check out your daily horoscope below:
Today, all situations will be under your control. You are blessed by Jupiter today thus you may expect to get some important position or post in the office. You may feel inclined towards your religion and mythological facts. You strong thoughts today may make you confident with respect to your work. You may also plan for a short trip.
Today you may feel a little unhappy and dull. This may affect your way of working. There may also be some delay in your projects. It may affect your prestige in your professional and domestic life. It is advised to avoid adventure tour or rush driving. Love bird may witness a rough patch. Jobseeker may be disappointed with their new job.
Today, you may perform your best in the office. You may have a good bonding with the boss and you may get some new responsibilities in terms of promotions. Chronic health issues may be cured now. You may also get good incentives for your work. Disputes with the siblings may be resolved now. Jobseeker may find a new job.
Today you may feel healthy as your old diseases may be cured. You may hear some good news from your near relative. You may perform well in the office and your colleague may help you in a critical project. You may develop faith in your subordinate staff. It may increase your prestige in society. You may also hear good news in some legal matter.
Today, you are likely to busy with your kids’ education and career. You may hear some good news in terms of your kid's academics. Love birds are advised to keep patience in terms of their relationships. Investors are advised to avoid investing in risky assets as they might convert into loses. It is advised to do meditation, yoga or chanting some mantras to come out from this difficult situation.
Today, you will be a victim of dissatisfaction and you may not get the result of your hard work. This may lead to disappointment. You are advised to read documents carefully before signing a contract or paper. Investment in the assets may be expected. You are advised to follow your intuition before making investments in the fixed assets. Your overwork may affect your domestic life; you will arrive late in the family or social events.
Today you may be busy in social get together and family occasions. It may increase your network. You may also plan for a work-related short travel. Disputes between siblings or friends may be resolved now. Your colleagues may cooperate you to complete a difficult project. You are likely to complete all the tasks with self-confidence. You are advised to keep patience while interacting with any person.
Today you may implement some new plans into your family business and it will pay you in term of gains in near future. You may also be busy in a family or social get together. You may buy some creative or artefact to renovate your house which may increase your social status. You might want to be careful in teeth, ears, eye, nose and skin-related issues.
Today you are blessed by the moon. Happiness may be around you and it can help you to enjoy your day to day work. Your vital power may help you to take tough decisions which will increase your profits in the near future. You may plan for a work-related short trip. Colleagues may support you to complete your work on time. Students may be more focused on the studies. You are advised to control your eating habits to avoid stomach issues.
Today, you may feel dull and sleeplessness may affect your mental and physical health as well. You may also be upset due to the health issues of your family member. Your expenditure on worthless stuff may affect your savings. You may be a victim of a conspiracy so you are advised to keep an eye on your opponents.
Today, your past investments may give you good profits. You may get good results after a relatively easy task. Your financial status may be improved now; new sources of income may be there. Couples may hear good news in terms of kids. You may get success easily just be putting a little effort.
Today, you are likely to meet someone to assist your positive growth in your business or work. Your destiny may help you and your loses may convert into profits. Financial health may be on track now. Love birds are advised to take some important decision in terms of marriage. Singles may likely to find their soul mate.
The author, Samir Jain, is a Jaipur based astrologer who is an expert in astrology, numerology, palmistry and Vastu. He is also an expert in Jain Temple Vastu and Jain Jyotish. Over the last several years, he has consulted clients from the USA, Brazil, Mexico, Canada, the UK, Australia, Turkey, France, Italy, South Africa, and Germany. | english |
'use strict';
/*
* organizationReservations.js
* Copyright(c) 2016 Universidad de Las Palmas de Gran Canaria
* Authors:
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
* MIT Licensed
*/
var connectionsAPI;
var utils;
var clientLogic;
// initialization
var initReservations = function() {
$('#popWindow').modal();
clientLogic.setUpDrawModule();
// get franchise from sessionStorage
var franchise = utils.getCurrentOrganization();
if (franchise) {
// only gets reservations if the user is logged
connectionsAPI.loginNeeded(function() {
clientLogic.showReservationsByOrganization(franchise);
});
}
$('tbody').height($(window).height() - $('thead th').height() -
$('#loggedDiv').height() - 50);
};
utils.addLoadEvent(initReservations);
| javascript |
New Delhi, September 24: Ahead of Prime Minister rendra Modi’s meeting with US investors, India on Thursday gave a major tax concession to foreign companies that don’t have a permanent set-up in India but operate out of countries with which New Delhi has double tax avoidance treaties. Technically, the ministry of fince has decided to amend the Income Tax Act, 1961, with effect from April 1, 2001, in a manner that provisions of Section 115JB shall not apply to a foreign company if it is a resident of a country having a tax treaty with India.
In cases where the country of domicile of the foreign company does not have a tax accord with India, this exemption shall not apply, provided the Companies Act, 2013, exempts it from having a registered office in India. In both cases, the foreign companies also should not have a permanent establishment in India.
The amendment is important in terms of minimum alterte tax called for by the Income Tax Act, which seeks to bring under the tax net companies that declare substantial profits in books but show their taxable incomes below what is otherwise due.
Earlier, a similar concession was extended to foreign funds from April 1 this year. “An appropriate amendment to the Income Tax Act in this regard will be carried out. Earlier, issues relating to taxation of foreign companies, having no permanent establishment in India, have been under consideration of the government,” an official statement said on Thursday. “The government has now considered the issue of applicability of minimum alterte tax under Section 115JB of the Income Tax Act to foreign companies having no place of business or permanent establishment in India,” the statement added. The concession to the foreign funds was extended based on the recommendations of the A. P. Shah Committee. The government has extended the same to foreign companies as well.
The move comes just ahead of Modi’s business meetings during his ongoing visit to the US. He is set to push for some of his pet projects involving domestic and foreign investors, such as “Make in India”, “Digital India”, “Skill India” and “Start-up India”.
Last week, just before leaving for Singapore and Hong Kong, Fince Minister Arun Jaitley declared that all tax disputes will be put to rest over the next few days, and that this was a “work in progress” along with steps to make it easier to do business in India. (IANS) | english |
<filename>xnat/scripts/print_dicom_header.py<gh_stars>1-10
#!/usr/bin/env python
'''make-rt-struct-assessor.py
Read in an RT-STRUCT DICOM file. Write out an icr:roiCollectionData assessor.
Usage:
print_dicom_header.py FILE
Options:
FILE ID of parent subject
'''
import os
import sys
import logging
import pydicom
import datetime as dt
import subprocess
import requests
from docopt import docopt
version = "1.0"
args = docopt(__doc__, version=version)
file = args.get("FILE")
try:
with open(file, 'rb') as f:
dicom = pydicom.dcmread(f)
print(dicom)
except Exception as e:
print("ERROR: - {}".format(e)) | python |
package com.hampcode.service.impl;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hampcode.client.ProductClientRest;
import com.hampcode.model.entity.Item;
import com.hampcode.model.repository.ItemRepository;
import com.hampcode.service.ItemService;
@Service
public class ItemServiceImpl implements ItemService {
@Autowired
private ProductClientRest productClienteRest;
@Autowired
private ItemRepository itemRepository;
@Transactional
@Override
public Item create(Item entity) {
Double total= entity.getProduct().getPrice() * entity.getQuantity().doubleValue();
entity.setTotal(total);
return itemRepository.save(entity);
}
@Override
public List<Item> getAll() {
List<Item> items = new ArrayList<>();
itemRepository.findAll().iterator().forEachRemaining(items::add);
return items;
}
@Override
public Optional<Item> getOne(Long id) {
return itemRepository.findById(id);
}
@Transactional
@Override
public void deleteById(Long id) {
// TODO Auto-generated method stub
itemRepository.deleteById(id);
}
/*@Override
public List<Item> getAll() {
return productClienteRest.getProducts()
.stream()
.map(product-> new Item(product,1))
.collect(Collectors.toList());
}
@Override
public Item getOne(Long id) {
return null;
}*/
@Override
public Item shoppingCart(Long productId, Integer quantity) {
return new Item(productClienteRest.getProductById(productId),quantity);
}
}
| java |
Wluper, the London-based tech startup building a conversational AI to power knowledge-based voice assistants, has raised $1.3 million in seed funding. Leading the round is “deep tech” VC IQ Capital, with participation from Seedcamp, Aster, and Magic Pony co-founder Dr Zehan Wang.
Founded in 2016 and originally backed by Jaguar Land Rover’s InMotion Ventures, Wluper’s “conversational AI” is initially targeting navigation products with what it describes as “goal-driven dialogue” technology that is designed to have more natural conversations to help with various navigation tasks.
The ‘secret sauce’, as it were, is that Wluper believes voice assistants work much better when the underlying AI is tasked with becoming an expert in a more narrow and specialist domain.
“When we think of intelligent assistants like Alexa or Siri, the only time you’ll believe they’re really good is if they understand you properly; most of the time, they simply can’t,” says Wluper co-founder Hami Bahraynian. “It is not the speech recognition which fails. It is the missing focus and lacking reasoning of these systems, because they all can do a lot of things reasonably well, but nothing perfectly”.
Describing the goal of “general” conversation AI as one that could take 15, 20 or more years to achieve, Bahraynian says that in the interim what is needed is “intelligent agents” that are created for a certain purpose, now.
“This is exactly what we do,” he says. “We build domain-expert conversational intelligence, which does one thing, understanding everything transport-related, but that one thing perfectly”.
Furthermore, Wluper’s approach is able to make clear assumptions regarding what the user is talking about, and therefore claims to be able to understand much more complex questions and in a more natural way. This includes multi-intent queries, and follow-up questions to enable a “true” conversation, says Bahraynian.
In addition, Wluper has been conducting R&D in what comes after the “understanding” bit of the NLP pipeline, leading the startup to undergo further research on a machine’s “knowledge acquisition” capabilities, which it believes is a crucial piece of the puzzle needed to solve conversational AI.
“Even if naturally asked user queries are eventually understood correctly, extracting and providing relevant and useful information from the right places is even more challenging, and with current mostly ruled-based approaches, ultimately impossible to scale,” adds Bahraynian.
“We work on this problem by moving away from traditional handcrafted methods and work on new ways to optimise a machine’s knowledge acquisition and finding the right balance between structured and unstructured data in order to provide more meaningful results”.
Meanwhile, Wluper’s seed investment will be used to hire more engineers and research scientists to expand the startup’s research and development capabilities.
| english |
Are you drinking enough water? This is one of the most frequently asked questions during summers. While one should stay hydrated all through the year and not merely in the summer months, it is true that during the season, one is advised to drink enough water to keep away dehydration and other illnesses. However, did you know that there is a way to achieve proper hydration too, so it doesn’t leave you feeling thirsty despite sipping on water?
Nutritionist Lovneet Batra recently took to Instagram to explain how hydration may still leave you thirsty.
While water intake should be at least three to four litres a day, a simple trick to keep the body’s electrolyte balance is to have water-based fruits that can also keep one cool and supply the body with the required amount of hydration.
Here’s what she explained. “Drinking plain water can still leave you thirsty sometimes due to loss of sodium and potassium through sweating, causing an electrolyte imbalance,” she said.
“Have two to three fruits with a pinch of pink salt during the day,” she said. However, do not have fruits closer to meal times.
Why pink salt?
Pink salt is known to balance the body’s pH levels and regulate blood sugar. That is why, when had along with fruits, it can help the body.
Another way to not feel thirsty is to sit and drink water instead of gulping lots of water.
Water should not be had right before or after a meal. “Keep a gap of at least 30 minutes between drinking water and having your food. Having water too close to your meal can cause indigestion,” said Batra. | english |
2019 has been a perilous year so far for the world's leading telecom equipment manufacturer, and second largest smartphone maker, China's Huawei. First, Donald Trump banned the company on May 15 from selling its phone or telecom equipment in the US through a national security order. In June, Trump decided to lift some restrictions to its most popular products but the company remained on the Commerce Department's blacklist.
Meanwhile, its CFO Meng Wanzhou is still languishing in a Canadian prison awaiting extradition to the US on charges ranging from money laundering to obstruction of justice.
Now, the latest news to give it further worry is that India -- on the verge of inviting telecom majors to conduct trials for the upcoming network -- is still undecided on whether to invite Huawei or not, as disclosed to Reuters by the telecom minister Ravi Shankar Prasad. This would be a major blow to a company that is keen on solidifying its presence in one of the fastest growing telecom market in the world and is projected to grow to 103.9 billion in 2020.
Not surprisingly, Chinese officials who were called by India's ambassador in Beijing, Vikram Misri, to discuss this issue suggested that there would be reverse sanctions if New Delhi were to go ahead with its decision.
Will New Delhi be justified in shutting the door on Huawei? After all, Huawei hardware has already been used in 5G trials in Malaysia, Philippines, Thailand, and Singapore, and the extreme cost competitiveness of its equipment would make it a front runner in these countries. Meanwhile, the UK may have huffed an puffed about Huawei's notoriety when it comes to security breaches but the fact remains that Vodafone launched its 5G network in the United Kingdom with both Huawei's hardware and broadband modem. Apparently, even its competitors EE, Three, and O2 are currently using or plan to use Huawei's equipment.
But detractors remain, and strident ones at that, including current arch enemy the US led by Trump's confusing and contradictory diktat's as well as New Zealand and Australia -- three members of the 'Five Eyes' intelligence community -- as well as Japan who have decided to give the Chinese maker a wide berth. Canada, despite detaining CFO Wanzhou on an extradition order, has not enacted a complete ban on Huawei equipment -- yet.
For India, the stakes are significantly higher considering it shares a border with China, who is a staunch ally of nemesis Pakistan. China too has had chronic border disputes with India where the two countries went to war in the 1960s over this. Therefore, the fact that Huawei founder Ren Zhengfei is a former member of the People's Liberation Army will undoubtedly not be very reassuring.
As the Asia Nikkei article details, security experts feel that companies in China are ultimately subservient to the state and would have to kow-tow to its intelligence and security agency demands, which makes Chinese companies, especially those selling electronic infrastructure equipment, not the safest to go along with. In fact, China's National Intelligence Law passed in 2017 demands this from its citizens.
To make things worse, Huawei has been accused by India of allegedly hacking into networks several times over the past decade and allowing 'backdoors' in its networking hardware for surveillance purposes, according to Venturebeat, something that Huawei denies. The problem for India is Huawei is simply very tough to beat on price. And it is omnipresent. It has 20% of all 5G patents globally which has allowed it to suck up 50 of the world's commercial 5G contracts.
Clearly, considering China's clout in the world of trade, many countries would wish to appear to appease it while protecting themselves against incidents of hacking. So no surprise that a 'middle approach' is apparently being explored in India where Huawei would be blocked from operating in sensitive border areas while relegated to more central geographies.
Moreover, the UK has already implemented such a plan where its carriers use the Chinese telco's 'non-core' components, such as transmitting radios used in close proximity to homes, rather than equipment used in guiding network traffic, which is more susceptible to breaches such as core servers that house encryption keys.
This could possibly be the most pragmatic solution that optimises both security and cost, the latter which is increasingly becoming more important in a beleaguered industry squeezed badly by the entrance of the price gouging Jio. But regardless of how attractive the numbers may look for Indian telecom operators like Vodafone and Airtel sizing up Huawei versus its competition, to put all one's eggs in the Huawei basket simply for price advantages would simply be foolish.
As a telecom executive in the Economic Times put it: "We don't want to be caught in a situation where we have deployed Huawei and then a ban comes. It would be such a big gamble to do so and already, given the stress in the sector, looks like nobody is going to take that risk."
| english |
import {
CommonModule
} from '@angular/common';
import {
NgModule
} from '@angular/core';
import {
SkyDatePipeModule
} from '@skyux/datetime';
import {
DatePipeDemoComponent
} from './date-pipe-demo.component';
@NgModule({
imports: [
CommonModule,
SkyDatePipeModule
],
exports: [
DatePipeDemoComponent
],
declarations: [
DatePipeDemoComponent
]
})
export class DatePipeDemoModule { }
| typescript |
<filename>src/main/java/com/dungnv/view/dashboard/DashboardEdit.java<gh_stars>0
package com.dungnv.view.dashboard;
import com.vaadin.event.ShortcutAction.KeyCode;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Component;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.themes.ValoTheme;
/**
* Simple name editor Window.
*/
@SuppressWarnings("serial")
public class DashboardEdit extends Window {
private final TextField nameField = new TextField("Name");
private final DashboardEditListener listener;
public DashboardEdit(final DashboardEditListener listener,
final String currentName) {
this.listener = listener;
setCaption("Edit Dashboard");
setModal(true);
setClosable(false);
setResizable(false);
setWidth(300.0f, Unit.PIXELS);
addStyleName("edit-dashboard");
setContent(buildContent(currentName));
}
private Component buildContent(final String currentName) {
VerticalLayout result = new VerticalLayout();
result.setMargin(true);
result.setSpacing(true);
nameField.setValue(currentName);
nameField.addStyleName("caption-on-left");
nameField.focus();
result.addComponent(nameField);
result.addComponent(buildFooter());
return result;
}
private Component buildFooter() {
HorizontalLayout footer = new HorizontalLayout();
footer.setSpacing(true);
footer.addStyleName(ValoTheme.WINDOW_BOTTOM_TOOLBAR);
footer.setWidth(100.0f, Unit.PERCENTAGE);
Button cancel = new Button("Cancel");
cancel.addClickListener(new ClickListener() {
@Override
public void buttonClick(final ClickEvent event) {
close();
}
});
cancel.setClickShortcut(KeyCode.ESCAPE, null);
Button save = new Button("Save");
save.addStyleName(ValoTheme.BUTTON_PRIMARY);
save.addClickListener(new ClickListener() {
@Override
public void buttonClick(final ClickEvent event) {
listener.dashboardNameEdited(nameField.getValue());
close();
}
});
save.setClickShortcut(KeyCode.ENTER, null);
footer.addComponents(cancel, save);
footer.setExpandRatio(cancel, 1);
footer.setComponentAlignment(cancel, Alignment.TOP_RIGHT);
return footer;
}
public interface DashboardEditListener {
void dashboardNameEdited(String name);
}
}
| java |
To be a fan of Bengaluru FC is something to be very proud of – if you don’t believe me, then you need to be part of the West Block Blues clan to know it! As someone who joined the tribe a couple of months ago, I have been able to experience the fandom which I only read on blogs or followed on the television set until now.
I was just another typical Indian football fan who cheered for European teams wearing European colors, but to be honest following the European leagues can get boring as you only get to watch the action on the screen, and you never really know the players that well. To sum it up, you simply don’t have a team to call your own, a team you can be proud of, players whom you can follow closely and last but not the least, get to watch them play live from the stands.
As a Bengaluru FC fan, I’m a total football fan who gets to enjoy the beautiful game in all its glory! A big thank you to JSW Group and Manager Ashley Westwood who was one of the key members in establishing the Bengaluru FC team in 2013, and after winning the i-League in the very first season there has been no-looking-back for the team.
After a perfect start to this season, our team has found the going get tougher with every match, and currently, we are placed 2nd in the I-league table. I was there in the west stand at the Kanteerava Stadium when we lost to Sporting Club de Goa 2-1, unable to beat the ten men Goan team.
It was a game marred by fouls and silly time-wasting tactics by the visitors who simply cared more about the points than the spirit of the game.
Bengaluru FC was to play Sporting Club de Goa on 6 March 2016 at the Fatorda Stadium, and the famous West Block Blues had planned an away trip to cheer the team. I decided to join them for the event, brushing aside all the pending work I had, to cheer my team from the stands in an away game for the first time.
The match was ideal for Bengaluru FC fans to cheer for the team and give them moral support in light of what had transpired during the home game. The away trip got the moniker – Odafa is falling!
We started from Bengaluru Football Stadium on 4th of March in the Bengaluru FC team bus! Yes, you read it right – in the official team bus! The players had left early to acclimatize and train for the match, and we got to travel in the Bengaluru FC official team bus – a big thank you to the BFC team officials and a special thanks to Akash who accompanied us and was sporting enough to endure the antics of our tribe.
We boarded the bus around 8. 30 PM, and our destination was Colva, Goa. We sang aloud our chants and anthems on the way and after a stop for dinner we took off and reached Colva around 11. 30 AM. After having brunch we finally checked into a nearby Hotel close to the beach.
It was time to re-energise and play some beach football. As the day came to an end, it was time for us to cheer our Europeans lads in the Premier League, which was more of a rehearsal for our Bengaluru FC match the next day.
The day finally arrived! Sunday it was, and unlike any other Sunday, it was the day for us West Block Blues to cause a commotion in the stands, a lot of chanting, waving our flags, and smoking up the stands blue was the order of the day.
We once again went to the same restaurant – Pastahut to have lunch and get some energy flowing. While we waited for the team bus to drop the players at the stadium and return to pick us up, we rehearsed our chants and took some snaps and found a new fan!
We arrived at the stadium with a bang! The kick-off was at 4. 30 PM and we got our ensemble ready in no time for the match. The customary unfurling of the flag was a treat to watch!
The entire west stand took a hue of blue as we lit the smoke bombs. It was all screaming and chanting and some dry banter in the stands while the players slugged it out in the sweltering Goan heat. No wonder the Sporting fans call themselves the flaming orange!
The west block fell silent when our team fell behind 1-0 to a freak goal, it was evident that our team’s morale took a huge blow as we soon conceded another goal making the score 2-0 in favor of Sporting.
Hope is our belief at the West Block Blues and our team didn’t disappoint, as we won a penalty which our skipper Sunil Chettri converted with ease to pull one back just before the stroke of half time. Sporting led 2-1 at the end of the first half, however, were down to ten men due to the red card awarded to Loveday Okechukwu.
It was advantage Bengaluru FC in the second half and the team strategy was simply to attack! We came close to scoring many times and in the 67th minute, Sunil Chettri scored the equalizer of a soaring cross from the right wing. Our team tried their best as the winning goal eluded us time and again. The match ended 2-2 – Bengaluru FC’s first draw this season in the i-League. Read the full match report here.
After the match, we decided to send off our players with a guard of honour. After all it was a terrific comeback trailing 2-0 for most of the first half. It was time for a rock star send off to our players, manager and the staff.
We gathered to form a pathway for the players to board their team bus, and as each player passed we chanted their names to show our love for the team and appreciation for the gritty comeback to draw the match.
We left the Fatorda stadium and boarded the team bus and were on our way back to Bengaluru. We reached the Bengaluru Football Stadium on Monday morning, safe and sound, thanks to our venerable driver, as our clan dispersed wishing each other farewell.
This was my first away match as a Bengaluru FC fan, and it was a memorable experience to the say the least, going forward I have a strong feeling that our clan will grow to an extent where we may have to book an entire flight for our team’s away game! | english |
{
"id": 112592,
"info": {
"name": "小秦王-强迫症v1",
"description": "小秦王版面细节调整、表格加宽字体增大、配色:清爽蓝。",
"additionalInfo": "20150515 V.1.1.1 版面颜色 去掉护眼绿(红大衣已经添加到论坛模板可选),夏天到了所以换成了蓝色\r\n20150414 V.1.1.0 版面颜色 护眼绿、细节调整\r\n20150413 V.1.0.0 页面宽度修改、字体样式大小修改、页面排版调整、去掉版头",
"format": "uso",
"category": "xqwh",
"createdAt": "2015-04-13T06:14:16.000Z",
"updatedAt": "2015-05-15T09:18:15.000Z",
"license": "CC-BY-NC-SA-4.0",
"author": {
"id": 289331,
"name": "minino"
}
},
"stats": {
"installs": {
"total": 411,
"weekly": 0
}
},
"screenshots": {
"main": {
"name": "112592_after.png",
"archived": false
}
},
"discussions": {
"stats": {
"discussionsCount": 0,
"commentsCount": 0
},
"data": []
},
"style": {
"css": "@-moz-document domain(\"xqwh.org\") {\r\nhtml,body,tr{\r\n font-family: \"微软雅黑\", Helvetica, Arial, sans-serif;\r\n color: #00000;\r\n background-color: #C1E6EA;\r\n font-size: 13px;\r\n margin: 0;\r\n WIDTH: 100%;\r\n}\r\n#wrapcentre {\r\n padding: 0 20px;\r\n min-width: 640px;\r\n width: 960px;\r\n margin: 0 auto;\r\n}\r\n#logodesc {\r\n background-color: #F9CCDE;\r\n background-repeat: repeat-x;\r\n background-position: center bottom;\r\n}\r\n\r\n/* background */\r\n#pagecontent td{background-color: #84CAD4}\r\ntr.nav, .cat {\r\n background-color: #87CDD7!important;\r\n}\r\n\r\n.tablebg {\r\n background-color: #7CC9D3;\r\n}\r\n.post{BORDER-BOTTOM: #7CC9D3 1px solid;}\r\nh2 {background-color: #84CAD4;padding:10px;}\r\n.panel table,.panel table div,.leftpanel,.rightpanel {background-color: #C1E6EA;padding:10px;}\r\n.panel table{BORDER: #7CC9D3 1px solid!important; }\r\n.row1,.row2,.row3 { \r\n background-color: #C1E6EA!important;\r\n}\r\n.cat {\r\n background-color: #89D1DF;\r\n}\r\nth {\r\n color: #000000;\r\n background-color: #9CDBE2;\r\n\r\n}\r\n.bg2,.postbody,.content,.genmed{background-color: #C1E6EA;}\r\n.gensmall {\r\n text-align: left;\r\n margin: 1px 1px;\r\n font-size: 1.2em;\r\n}\r\na.topictitle {\r\n margin: 1px 0;\r\n font-family: \"微软雅黑\", Helvetica, Arial, sans-serif;\r\n font-size: 16px;\r\n color: #000;\r\n}\r\n.row2 span { color: #57b6a1!important;}\r\n/* Links */\r\n\r\na:link {\r\n\tcolor: #000;\r\n\ttext-decoration: none;\r\n}\r\n\r\na:active,\r\na:visited {\r\n\tcolor: #333;\r\n\ttext-decoration: none;\r\n}\r\n\r\na:hover {\r\n\tcolor: #57b6a1;\r\n\ttext-decoration: none;\r\n}\r\n\r\na.prefixlink {\r\n\tcolor: #069;\r\n\tfont-size: 1.3em;\r\n}\r\n\r\na.forumlink {\r\n\tcolor: #069;\r\n\tfont-weight: bold;\r\n\tfont-size: 1.3em;\r\n}\r\na.topictitle {\r\n\tcolor: #000;\r\n}\r\n\r\na.topictitle:visited {\r\n\tcolor: #666;\r\n\ttext-decoration: none;\r\n}\r\n\r\na.topictitle:hover {\r\n\tcolor: #57b6a1;\r\n\ttext-decoration: none;\r\n}\r\n.topicrcmd {color:#ff0000!important;}\r\nth a,\r\nth a:visited {\r\n\tcolor: #333 !important;\r\n\ttext-decoration: none;\r\n}\r\n\r\nth a:hover {\r\n\ttext-decoration: none;\r\n\tcolor: #fc158c;\r\n}\r\n}"
}
} | json |
1 Mme erile Jesu a sena go bua dilo tse, a kgabaganya molatswana wa Kide-rona le barutwa ba gagwe mme a tsena mo sekgweng sa lotlhware. 2 Judase wa moraedi, o ne a itse lefelo le, gonne Jesu o ne a sa bolo go nna a ya teng gantsi le barutwa ba gagwe.
3 Ditlhogo tsa baperesiti le Bafarasai di ne di neetse Judase segopa sa masole le mapodisi go mo pata. Mme ba goroga mo sekgweng sa lotlhware ba tshotse dipone tsa mefuta e farologanye ba tshotse le ditlhabani.
4-5 Jesu a tlhaloganya ka botlalo se se neng se ya go mo diragalela. Erile a tsamaela kwa pele go ba kgatlhantsha a re, “Lo batla mang?” Mme ba mo fetola ba re, “Jesu wa Nasaretha.” Mme Jesu a ba raya a re, “Ke nna.” 6 Mme erile a bua jalo, botlhe ba boela kwa morago ba wela fa fatshe.
7 Mme a ba botsa gape a re, “Lo batla mang?” Mme ba mo fetola gape ba re, “Jesu wa Nasaretha.” Mme Jesu a ba raya a re,
12 Mme mapodisi a Sejuta le masole le maotlana a tshwara Jesu a mo golega. 13 Ba mo tseela “pele” kwa go Anase mogwagadia Kaiafase, Moperesiti yo mogolo mo ngwageng eo. 14 Kaiafase e ne e le ene yo o reileng baeteledipele ba Sejuta a re go botoka gore motho a le mongwe fela a swele batho botlhe.
18 Mme mapodise le batlhanka ba mo lwapeng ba ne ba eme ka dinao ba dikologile molelo o ba neng ba o gotsitse gonne go ne go le serame. Mme Petere a nna foo le bone a ikomosa.
19 Mme mo teng ga kgotla ya tshekelo Moperesiti yo Mogolo a simolola go botsa Jesu kaga barutwa ba gagwe le se a neng a ntse a se ba ruta.
24 Mme Anase a romela Jesu a golegilwe kwa go Kaiafase Moperesiti yo Mogolo.
27 Mme Petere a itatola gape. Mme ka bofefo mokoko wa lela.
31 Mme Pilatwe a ba raya a re, “Mo tseyeng lo mo atlhole lo le nosi ka melao ya lona.” Mme ba re, Mme kana re batla a bapolwa, mme, re batla tetlelelo ya gago 32 Se se ne sa rurifatsa kakanyetsopele ya ga Jesu ka ga tsela e a tla bolawang ka yone.
40 Mme ba goa ba re, “Nnyaa! E seng monna yo, e leng Barabase!” Barabase e ne e le serukutlhi.
| english |
/*
desktop:1200px; // col-xl
laptop:992px;// col-lg
tablet:768px;// md
phone:480px; // sn
*/
@font-face {
font-family: "Valencia";
src: url("src/assets/fonts/Valencia.ttf") format("truetype");
}
#welcome {
display: flex;
height: 100vh;
margin-left: 20vh;
align-items: center;
justify-content: flex-start;
}
@media screen and (max-width: 480px) {
#welcome {
margin-left: 2vh;
}
}
#icons {
display: flex;
align-items: center;
justify-content: flex-end;
}
#skillimg {
transition: transform 0.7s ease-in-out;
}
#skillimg:hover {
transform: rotate3d(0, 90, 0, 360deg);
}
a {
height: 8vh;
padding-bottom: 4vh;
}
.h1 {
font-weight: 400;
font-family: Valencia;
font-size: 100px;
}
h1 {
font-size: 40px;
font-family: AvenirHeavy;
}
#me {
font-size: 22px;
display: block;
margin-block-start: 1em;
margin-block-end: 1em;
font-family: AvenirLight;
max-width: 800px;
}
#about {
/* color: rgb(238, 238, 238); */
color: #f6f6f6;
display: flex;
min-height: 40vh;
background-color: #302a18;
align-items: center;
justify-content: center;
text-align: center;
line-height: 1.5;
}
@media screen and (max-width: 480px) {
#about {
min-height: 70vh;
}
}
img {
height: 5vh;
}
#skills {
display: flex;
min-height: 80vh;
align-items: center;
text-align: center;
line-height: 1.5;
max-width: 800px;
}
@media screen and (max-width: 480px) {
#skills {
min-height: 130vh;
}
}
mat-chip {
font-size: 2vh;
}
mat-card img {
object-fit: cover;
width: 10vh;
height: 10vh;
}
a {
text-decoration: none;
}
.list {
width: auto;
font-family: AvenirLight;
font-weight: 400;
margin: 2vh;
margin-left: 5vh;
font-size: 2vh;
}
@media screen and (max-width: 480px) {
.list {
margin-left: 1vh;
}
}
#contact {
background-color: #302a18;
color: #f6f6f6;
}
mat-form-field {
margin-left: 2vh;
align-items: center;
}
#end {
color: #f6f6f6;
display: flex;
font-size: 25px;
font-family: AvenirHeavy;
line-height: 1.5;
max-width: 80vh;
padding-right: 25vh;
padding-top: 5vh;
}
| css |
Controversy is nothing new to art. Whenever a new art form or movement gains enough traction within the mainstream, scandals are sure to follow. Charles Dickens, Edouard Manet and Leo Tolstoy have all had careers pockmarked by moral outrage. Even legendary masters have not been exempt from the firing line; Michelangelo was once contested over his fresco The Last Judgement.
Even when the film has not been created with the intent of pushing an ideology, cinema is capable of usurping or unsettling audiences’ preconceived attitudes towards their government or social standing. For some, this was considered dangerous and, therefore, had to be monitored to see what was fit for public consumption.
The list of controversial films is almost endless, especially when you consider the cultural nuances between countries and communities that effects a film’s reception. With that said, specific themes and genres (and filmmakers themselves) populate many lists and articles on this particular topic.
It will come as no real surprise to readers to find that Scorsese’s The Last Temptation of Christ was met with outrage because of its sexualised and religious content. Nor will the censoring of classic ‘Video Nasty’ I Spit on Your Grave (it still remains banned in Ireland). The fact that these films contain extreme acts of violence and sex (often blurring the lines thereof) or tackle sensitive topics such as religion or abuse makes them the easy target of media and public discussion about the impact of cinema.
| english |
<filename>public/json/words/hebrew-4547.json
{"pos":"n","translits":{"mas·lūl":{"isa.35.8|2":["there、","a highway","and a road、"]}},"meanings":{"highway":1},"meaningsCount":1,"occurences":1} | json |
# coding: utf-8
"""
HyperOne
HyperOne API # noqa: E501
The version of the OpenAPI document: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from h1.configuration import Configuration
class BillingCharges(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {
'id': 'str',
'value': 'float',
'start': 'str',
'end': 'str',
'price': 'float',
'quantity': 'float',
'paid_from': 'str',
'paid_on': 'str'
}
attribute_map = {
'id': 'id',
'value': 'value',
'start': 'start',
'end': 'end',
'price': 'price',
'quantity': 'quantity',
'paid_from': 'paidFrom',
'paid_on': 'paidOn'
}
def __init__(self, id=None, value=None, start=None, end=None, price=None, quantity=None, paid_from=None, paid_on=None, local_vars_configuration=None): # noqa: E501
"""BillingCharges - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._id = None
self._value = None
self._start = None
self._end = None
self._price = None
self._quantity = None
self._paid_from = None
self._paid_on = None
self.discriminator = None
if id is not None:
self.id = id
if value is not None:
self.value = value
if start is not None:
self.start = start
if end is not None:
self.end = end
if price is not None:
self.price = price
if quantity is not None:
self.quantity = quantity
if paid_from is not None:
self.paid_from = paid_from
if paid_on is not None:
self.paid_on = paid_on
@property
def id(self):
"""Gets the id of this BillingCharges. # noqa: E501
:return: The id of this BillingCharges. # noqa: E501
:rtype: str
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this BillingCharges.
:param id: The id of this BillingCharges. # noqa: E501
:type: str
"""
self._id = id
@property
def value(self):
"""Gets the value of this BillingCharges. # noqa: E501
:return: The value of this BillingCharges. # noqa: E501
:rtype: float
"""
return self._value
@value.setter
def value(self, value):
"""Sets the value of this BillingCharges.
:param value: The value of this BillingCharges. # noqa: E501
:type: float
"""
self._value = value
@property
def start(self):
"""Gets the start of this BillingCharges. # noqa: E501
:return: The start of this BillingCharges. # noqa: E501
:rtype: str
"""
return self._start
@start.setter
def start(self, start):
"""Sets the start of this BillingCharges.
:param start: The start of this BillingCharges. # noqa: E501
:type: str
"""
self._start = start
@property
def end(self):
"""Gets the end of this BillingCharges. # noqa: E501
:return: The end of this BillingCharges. # noqa: E501
:rtype: str
"""
return self._end
@end.setter
def end(self, end):
"""Sets the end of this BillingCharges.
:param end: The end of this BillingCharges. # noqa: E501
:type: str
"""
self._end = end
@property
def price(self):
"""Gets the price of this BillingCharges. # noqa: E501
:return: The price of this BillingCharges. # noqa: E501
:rtype: float
"""
return self._price
@price.setter
def price(self, price):
"""Sets the price of this BillingCharges.
:param price: The price of this BillingCharges. # noqa: E501
:type: float
"""
self._price = price
@property
def quantity(self):
"""Gets the quantity of this BillingCharges. # noqa: E501
:return: The quantity of this BillingCharges. # noqa: E501
:rtype: float
"""
return self._quantity
@quantity.setter
def quantity(self, quantity):
"""Sets the quantity of this BillingCharges.
:param quantity: The quantity of this BillingCharges. # noqa: E501
:type: float
"""
self._quantity = quantity
@property
def paid_from(self):
"""Gets the paid_from of this BillingCharges. # noqa: E501
:return: The paid_from of this BillingCharges. # noqa: E501
:rtype: str
"""
return self._paid_from
@paid_from.setter
def paid_from(self, paid_from):
"""Sets the paid_from of this BillingCharges.
:param paid_from: The paid_from of this BillingCharges. # noqa: E501
:type: str
"""
self._paid_from = paid_from
@property
def paid_on(self):
"""Gets the paid_on of this BillingCharges. # noqa: E501
:return: The paid_on of this BillingCharges. # noqa: E501
:rtype: str
"""
return self._paid_on
@paid_on.setter
def paid_on(self, paid_on):
"""Sets the paid_on of this BillingCharges.
:param paid_on: The paid_on of this BillingCharges. # noqa: E501
:type: str
"""
self._paid_on = paid_on
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, BillingCharges):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, BillingCharges):
return True
return self.to_dict() != other.to_dict()
| python |
As the two powerhouses of the K-pop industry, BTS and BLACKPINK, have bagged some of the most impressive brand endorsements that continue to extend their influence and impact in the industry. From casual luxury brands like Calvin Klein to high-end fashion outlets like Dior, the members of these two K-pop groups have represented quite a spectrum of brands that also communicate their own style and ideals.
While there's quite an exhaustive list of brands for which the two groups and their members stand as ambassadors, BTS and BLACKPINK also share a handful of brands they both represent. As such, this brings the two fandoms together as they support the K-pop idols in the additional embarkations, it also excites them to see the members of the two groups attend events and participate in campaigns together.
Celine is the first on the list of brand endorsements that BTS and BLACKPINK share, where Lisa and V stand as the global ambassadors for the same. Though V attended the Celine show at the Paris Fashion Week in 2022 before being named as an ambassador, Lisa, who accompanied him to the event, was already given the title in 2019.
After many collaborations between V and Celine, the idol was recently named the global brand ambassador for the brand on March 16, 2023.
While the two haven't been seen together at a Celine event after V's embarkation, the idol, to commemorate his entrance into the Celine family, she attended the recent fashion pop-up event organized by the brand. As such, fans cherished the crossover between the two iconic K-pop idols and could hardly wait to see them at an event together again.
One of the most recent embarkations for both the BTS and BLACKPINK members Jungkook and Jennie is their ambassadorship with Calvin Klein. After much speculation around a possible collaboration between Jungkook and Calvin Klein, it was recently announced that the idol will be finally joining the brand as their ambassador.
While the Butter singer was the newest addition to the Calvin Klein team, Jennie was already a part of the fashion house since 2021.
Jennie even recently stepped up her collaborations with Calvin Klein by rolling out an entire line of clothing. The capsule collection played around the colors of white, cream, and purple, which fans loved. Moreover, the collection was sold out within hours of its release.
At the pop-up event, which was held in Seoul to commemorate the same, both Jungkook and Jennie were spotted attending the event.
This fashion brand that the BTS and BLACKPINK members Jimin and Jisoo represent takes a more luxurious tone to it.
Around 2021, Jisoo was named the global brand ambassador of Dior, a time when she garnered much attention for her way of representing the brand, so much so that she was called "Lady Dior. " While she's been engaging with the brand in several ways by participating in its campaign and popping up at its events, a BTS member also joined Dior's family.
In January of this year, Jimin was named the global brand ambassador of Dior and also attended the brand's fashion event at the 2023 Paris Men's Fashion Week to commemorate the same. While the idol was invited to their recent Paris Fashion Week event as his second schedule, he couldn't attend the event due to the clash in the schedules.
4) BTS' Jimin and BLACKPINK's Rose for Tiffany & Co.
The last on the list of brand endorsements that BTS and BLACKPINK share is Tiffany & Co. This year proves to be Jimin's as the K-pop idol expands into the fashion industry with his embarkation as the brand ambassador of luxury jewelry brand Tiffany & Co.
Describing him as the embodiment of energy, style, and sense of modernity that epitomizes the brand, Tiffany & Co. welcomed the idol into his family in March 2023.
Rose, on the other hand, was named the brand's ambassador in 2021, and the idol continued to be a sensation in relation to Tiffany & Co. With every campaign, Rose not only proves herself as the deserved face of the luxury jewelry brand but also continues to impact the brand's market as their sales peak impressively.
As more and more brand endorsements pop up where the two influential K-pop groups, BTS and BLACKPINK, come together, the two fandoms couldn't be happier to see the members engaging with each other through the brands. | english |
{"resourceType":"NamingSystem","id":"v3-WorkClassificationODH","name":"v3.WorkClassificationODH","status":"active","kind":"codesystem","date":"2018-08-11T14:00:00.000Z","publisher":"HL7, Inc","contact":[{"telecom":[{"system":"url","value":"http://hl7.org"}]}],"description":" Code system of concepts representing a person's job type as defined by compensation and sector (e.g. paid vs. unpaid, self-employed vs. not self-employed, government vs. private, etc.).","uniqueId":[{"type":"uri","value":"http://terminology.hl7.org/CodeSystem/v3-WorkClassificationODH","preferred":true},{"type":"oid","value":"2.16.840.1.113883.5.1139","preferred":false}]} | json |
It must be a trying time for youthe release of Ishkq in Paris was delayed due to director Prem Rajs cancer diagnosis and now comes the IPL spot fixing controversy?
Its been hell dealing with both these situations. Prems illness did delay the release of the film but he has thankfully recovered. The spot-fixing controversy has caused a dip in the teams morale as well as mine. After all,the joke is on the team owners. But I truly believe that not everyone is corrupt. Im waiting to see where the investigations lead. In the end,the IPL will be cleared of all the filth.
Your involvement with Ishkq in Paris extends beyond just acting and production?
I wrote the story,screenplay and dialogues,too,along with Prem,which was very exciting for me. I studied criminal psychology and I have applied my training in observing people into writing. Much of the film is borrowed from the people I know and some of it is from my own life. Like the fact that I cut my hair short because I was told women from Paris dont wear their hair long.
And does your character,Ishkq,borrow your own view on love?
Yes and no. Half-French-half-Indian,Ishkqs idea of love or mine isnt like that of a 16-year-olds; she doesnt view it with rose-tinted glasses. Ishkq is looking for something to complete her life but it isnt love. That said,her view on relationships differs from mine as I have a more positive approach.
Isnt Paris a clichéd location to set your love story in?
Yes,but in this film,it isnt used as a clichéd location. In my view,you can get everything in Paris except love. You can fall in love every day in the city but you cannot stay in it. Its a tough city to live in. You see that in the movie.
Why did you choose to make a comeback with a newcomer?
I could have asked any of my friends Shah Rukh Khan,Aamir Khan,Hrithik Roshan or Salman Khan to come on board. But if they did,the movie would be a guaranteed flop since they come with the huge baggage. Besides,that would have overshot my budget. Rhehan Malliek brings freshness to the film,he makes me look different and new.
Has the strain of production put you off making more movies then?
I know what I want to produce next but I want to take time with it. Meanwhile,I am about to sign a new film soon. After a months break,I will start shooting for Bhaiyyaji Superhit,where I will rock. You know why? Because I dont have to produce it. | english |
<filename>deep500/frameworks/reference/custom_operators/cpp/utility/tensor/copy_data.hpp
//copy_data.hpp
#ifndef COPY_DATA_HPP
#define COPY_DATA_HPP
#include <cstring>
//copy data of tensor efficiently
namespace utilityTensor {
template <class T>
void copy_data(const int size, const T *source, T *dest) {
std::memcpy(dest, source, size * sizeof(T));
return;
}
}
#endif | cpp |
MELBOURNE, Australia (AP) — As thousands of fans queued to get into the Australian Grand Prix, seemingly unperturbed by the coronavirus pandemic, the Formula One teams and drivers were packing up to leave.
The rapid spread of the virus left organizers with little choice Friday but to cancel the season-opening race, particularly after McLaren withdrew because a team member tested positive for the COVID-19 illless and following heavy criticism from six-time world champion Lewis Hamilton.
The two practice sessions that usually showcase what the teams have been improving in the off-season were less than two hours from starting when the decision was publicly announced. Principals of nine F1 teams and organizers met overnight and “concluded with a majority view of the teams that the race should not go ahead," a joint statement by FIA, motorsport's governing body, local organizers and F1 said.
“It's been a very fluid situation," F1 chairman Chase Carey said. “We're all disappointed not to have it, but I think we've made the decision we had to make."
“It's not like it came out of the blue," Carey told a news conference beside the F1 paddock that ended in light rain. “A week ago, when teams started traveling here, we felt it was the right decision (to stage the race). Clearly the situation changed in the interim."
Practice, qualifying and Sunday's race were all scrapped, casting doubt over the Bahrain Grand Prix which is scheduled to be held next week and the Vietnamese GP, scheduled for April 5. Authorities in Bahrain have already said no fans will be allowed into the circuit. Carey said a decision on whether or not to go ahead with the the race would be made in coming days. The Chinese GP has already been postponed from April.
Hamilton used the first official news conference with F1 drivers in Melbourne to say he was shocked that organizers planned to proceed with the Australian Grand Prix, which regularly attracts more than 300,000 people over four days. McLaren's decision to withdraw was ultimately the catalyst for the cancellation. That person and 14 other McLaren team members have been placed in quarantine in a Melbourne hotel for 14 days.
Hamilton's Mercedes-AMG Petronas team said it sent a letter to the FIA and F1 requesting the cancellation and had commenced preparations to leave before the decision was publicly announced.
“The physical and mental health and well being of our team members and of the wider F1 community are our absolute priority," the team said in a statement. “In light of the force majeure events we are experiencing with regards to the Coronavirus pandemic, we no longer feel the safety of our employees can be guaranteed if we continue to take part in the event."
Hamilton was critical of the decision for the F1 show to travel to Australia, given the circumstances of other major sports and large-scale public gatherings being canceled all over the world.
Carey on Friday dismissed the “cash is king” comment, saying if that was the case, the Australian GP wouldn't have been canceled. More than 86,000 people attended the women's Twenty20 Cricket World Cup final last weekend in Melbourne, when many of the F1 teams were traveling to Australia and organizers weren't expecting any major problems.
Members of the U.S.-backed Haas team had also been in isolation but they were cleared after tests. Local health authorities confirmed only one positive case in eight F1-related tests conducted so far.
Fans will be refunded for their tickets, although some were angered that they weren't told of the cancellation when the decision was made. At some gates, circuit staff used speaker phones to tell spectators there'd be no racing at all. Negotiations are continuing with hundreds of suppliers for the race. Australian organizers haven't ruled out staging the race on a later date.
Later Friday, Australian Prime Minister Scott Morrison said non-essential gatherings of more than 500 people should not go ahead from Monday, on the advice of health officials. That means other sports will also go into lockdown, following the likes of the NBA and the NHL in America.
There have been more than 128,000 cases and 4,700 deaths globally since the virus outbreak started in China late last year.
Most people quickly recover from the virus after experiencing only mild or moderate symptoms, such as fever and cough. For some, especially older adults and people with existing health problems, it can cause more severe illness, including pneumonia.
According to the World Health Organization, people with mild illness recover in about two weeks.
| english |
# Definition for singly-linked list.
class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
class Solution(object):
def deleteDuplicates(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
l = list()
curr = head
while curr is not None:
if curr.val not in l:
l.append(curr.val)
curr = curr.next
else:
curr = curr.next
# make a listnode
dummyHead = ListNode(0)
p = dummyHead
for val in l:
node = ListNode(val)
p.next = node
p = p.next
return dummyHead.next
def printNode(node):
head = node
while head is not None:
print head.val
head = head.next
def main():
# head = ListNode(1)
# head.next = ListNode(1)
# head.next.next = ListNode(2)
# head.next.next.next = ListNode(3)
head = ListNode(1)
head.next = ListNode(1)
head.next.next = ListNode(1)
solution = Solution()
result = solution.deleteDuplicates(head)
printNode(result)
if __name__ == '__main__':
main() | python |
# Kitakaze to Taiyou

- **type**: movie
- **episodes**: 1
- **original-name**: きたかぜとたいよう
- **start-date**: 2060-04-19
- **rating**: G - All Ages
## Tags
## Sinopse
A short film released by Gakken. It is based on the Aesop's Fable "The North Wind and the Sun."
## Links
- [My Anime list](https://myanimelist.net/anime/32693/Kitakaze_to_Taiyou)
- [Official Site](http://gakken.co.jp/campaign/70th/archives/)
- [AnimeDB](http://anidb.info/perl-bin/animedb.pl?show=anime&aid=7182)
| markdown |
package me.ramswaroop.arrays;
/**
* Created by IntelliJ IDEA.
*
* @author: ramswaroop
* @date: 9/1/15
* @time: 10:21 PM
*/
public class MaxIndexDiff {
/**
* Given an array arr[], find the maximum j – i such that arr[j] > arr[i].
*
* @param a
* @return
*/
public static int maxDiff(int[] a) {
int maxDiff = -1;
int[] leftMin = new int[a.length], rightMax = new int[a.length];
/**
* leftMin[i] holds the smallest element on left side of arr[i] including arr[i].
* In other words, leftMin[i] stores the minimum value from (arr[0], arr[1], ... arr[i]).
*/
leftMin[0] = a[0];
for (int i = 1; i < a.length; i++) {
leftMin[i] = Math.min(a[i], leftMin[i - 1]);
}
/**
* rightMax[i] holds the greatest element on right side of arr[i] including arr[i].
* In other words, rightMax[i] stores the maximum value from (arr[i], arr[i+1], ..arr[n-1])
*/
rightMax[a.length - 1] = a[a.length - 1];
for (int i = a.length - 2; i >= 0; i--) {
rightMax[i] = Math.max(a[i], rightMax[i + 1]);
}
// traverse both arrays from left to right to find maximum j - i
for (int i = 0, j = 0; i < a.length && j < a.length; ) {
if (rightMax[j] > leftMin[i]) {
maxDiff = Math.max(maxDiff, j - i);
j++;
} else {
i++;
}
}
return maxDiff;
}
public static void main(String a[]) {
System.out.println(maxDiff(new int[]{34, 8, 10, 3, 2, 80, 30, 33, 1}));
System.out.println(maxDiff(new int[]{9, 2, 3, 4, 5, 6, 7, 8, 18, 0}));
System.out.println(maxDiff(new int[]{1, 2, 3, 4, 5, 6}));
System.out.println(maxDiff(new int[]{6, 5, 4, 3, 2, 1}));
System.out.println(maxDiff(new int[]{10, 11, 12, 13, 14, 6, 9, 7, 5, 3}));
}
}
| java |
// autogenerated file
import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../../index.js';
import * as protobuf from '../../../contrib/google/protobuf';
import * as operation from '../../../api/operation';
import * as access from '../../../api/access';
/**
* A Cloud resource. For more information, see [Cloud](/docs/resource-manager/concepts/resources-hierarchy#cloud).
*/
export interface Cloud {
/**
* ID of the cloud.
*/
id?: string;
/**
* Creation timestamp.
*/
createdAt?: protobuf.Timestamp;
/**
* Name of the cloud. 3-63 characters long.
*/
name?: string;
/**
* Description of the cloud. 0-256 characters long.
*/
description?: string;
}
/**
* A set of methods for managing Cloud resources.
*/
export class CloudService {
constructor(session?: Session);
/**
* Returns the specified Cloud resource.
*
* To get the list of available Cloud resources, make a [List] request.
*/
get(request: GetCloudRequest): Promise<Cloud>;
/**
* Retrieves the list of Cloud resources.
*/
list(request: ListCloudsRequest): Promise<ListCloudsResponse>;
/**
* Updates the specified cloud.
*/
update(request: UpdateCloudRequest): Promise<operation.Operation>;
/**
* Lists operations for the specified cloud.
*/
listOperations(
request: ListCloudOperationsRequest
): Promise<ListCloudOperationsResponse>;
/**
* Lists access bindings for the specified cloud.
*/
listAccessBindings(
request: access.ListAccessBindingsRequest
): Promise<access.ListAccessBindingsResponse>;
/**
* Sets access bindings for the specified cloud.
*/
setAccessBindings(
request: access.SetAccessBindingsRequest
): Promise<operation.Operation>;
/**
* Updates access bindings for the specified cloud.
*/
updateAccessBindings(
request: access.UpdateAccessBindingsRequest
): Promise<operation.Operation>;
}
export interface GetCloudRequest {
/**
* ID of the Cloud resource to return.
* To get the cloud ID, use a [CloudService.List] request.
*/
cloudId: string;
}
export interface ListCloudsRequest {
/**
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size],
* the service returns a [ListCloudsResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
* Default value: 100.
*/
pageSize?: Long;
/**
* Page token. Set [page_token]
* to the [ListCloudsResponse.next_page_token]
* returned by a previous list request to get the next page of results.
*/
pageToken?: string;
/**
* A filter expression that filters resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can use filtering only on the [Cloud.name] field.
* 2. An operator. Can be either `=` or `!=` for single values, `IN` or `NOT IN` for lists of values.
* 3. The value. Must be 3-63 characters long and match the regular expression `^[a-z][-a-z0-9]{1,61}[a-z0-9]$`.
*/
filter?: string;
}
export interface ListCloudsResponse {
/**
* List of Cloud resources.
*/
clouds?: Cloud[];
/**
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListCloudsRequest.page_size], use
* the [next_page_token] as the value
* for the [ListCloudsRequest.page_token] query parameter
* in the next list request. Each subsequent list request will have its own
* [next_page_token] to continue paging through the results.
*/
nextPageToken?: string;
}
export interface ListCloudOperationsRequest {
/**
* ID of the Cloud resource to list operations for.
*/
cloudId: string;
/**
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size], the service returns a [ListCloudOperationsResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
* Acceptable values are 0 to 1000, inclusive. Default value: 100.
*/
pageSize?: Long;
/**
* Page token. Set [page_token]
* to the [ListCloudOperationsResponse.next_page_token]
* returned by a previous list request to get the next page of results.
*/
pageToken?: string;
}
export interface ListCloudOperationsResponse {
/**
* List of operations for the specified cloud.
*/
operations?: operation.Operation[];
/**
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListCloudOperationsRequest.page_size], use the [next_page_token] as the value
* for the [ListCloudOperationsRequest.page_token] query parameter in the next list request.
* Each subsequent list request will have its own [next_page_token] to continue paging through the results.
*/
nextPageToken?: string;
}
export interface UpdateCloudRequest {
/**
* ID of the cloud to update.
* To get the cloud ID, use a [CloudService.List] request.
*/
cloudId: string;
/**
* Field mask that specifies which fields of the cloud are going to be updated.
*/
updateMask?: protobuf.FieldMask;
/**
* Name of the cloud.
*/
name?: string;
/**
* Description of the cloud.
*/
description?: string;
}
export interface UpdateCloudMetadata {
/**
* ID of the cloud that is being updated.
*/
cloudId?: string;
}
/**
* A Folder resource. For more information, see [Folder](/docs/resource-manager/concepts/resources-hierarchy#folder).
*/
export interface Folder {
/**
* ID of the folder.
*/
id?: string;
/**
* ID of the cloud that the folder belongs to.
*/
cloudId?: string;
/**
* Creation timestamp.
*/
createdAt?: protobuf.Timestamp;
/**
* Name of the folder.
* The name is unique within the cloud. 3-63 characters long.
*/
name?: string;
/**
* Description of the folder. 0-256 characters long.
*/
description?: string;
/**
* Resource labels as `` key:value `` pairs. Мaximum of 64 per resource.
*/
labels?: { [s: string]: string };
/**
* Status of the folder.
*/
status?: Folder.Status;
}
export namespace Folder {
export enum Status {
STATUS_UNSPECIFIED = 0,
/**
* The folder is active.
*/
ACTIVE = 1,
/**
* The folder is being deleted.
*/
DELETING = 2,
}
}
/**
* A set of methods for managing Folder resources.
*/
export class FolderService {
constructor(session?: Session);
/**
* Returns the specified Folder resource.
*
* To get the list of available Folder resources, make a [List] request.
*/
get(request: GetFolderRequest): Promise<Folder>;
/**
* Retrieves the list of Folder resources in the specified cloud.
*/
list(request: ListFoldersRequest): Promise<ListFoldersResponse>;
/**
* Creates a folder in the specified cloud.
*/
create(request: CreateFolderRequest): Promise<operation.Operation>;
/**
* Updates the specified folder.
*/
update(request: UpdateFolderRequest): Promise<operation.Operation>;
/**
* Deletes the specified folder.
*
* The method is temporarily unavailable.
*/
delete(request: DeleteFolderRequest): Promise<operation.Operation>;
/**
* Lists operations for the specified folder.
*/
listOperations(
request: ListFolderOperationsRequest
): Promise<ListFolderOperationsResponse>;
/**
* Lists access bindings for the specified folder.
*/
listAccessBindings(
request: access.ListAccessBindingsRequest
): Promise<access.ListAccessBindingsResponse>;
/**
* Sets access bindings for the specified folder.
*/
setAccessBindings(
request: access.SetAccessBindingsRequest
): Promise<operation.Operation>;
/**
* Updates access bindings for the specified folder.
*/
updateAccessBindings(
request: access.UpdateAccessBindingsRequest
): Promise<operation.Operation>;
}
export interface GetFolderRequest {
/**
* ID of the Folder resource to return.
* To get the folder ID, use a [FolderService.List] request.
*/
folderId: string;
}
export interface ListFoldersRequest {
/**
* ID of the cloud to list folders in.
* To get the cloud ID, use a [yandex.cloud.resourcemanager.v1.CloudService.List] request.
*/
cloudId: string;
/**
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size],
* the service returns a [ListFoldersResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
* Default value: 100.
*/
pageSize?: Long;
/**
* Page token. Set [page_token]
* to the [ListFoldersResponse.next_page_token]
* returned by a previous list request to get the next page of results.
*/
pageToken?: string;
/**
* A filter expression that filters resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can use filtering only on the [Folder.name] field.
* 2. An operator. Can be either `=` or `!=` for single values, `IN` or `NOT IN` for lists of values.
* 3. The value. Must be 3-63 characters long and match the regular expression `^[a-z][-a-z0-9]{1,61}[a-z0-9]$`.
*/
filter?: string;
}
export interface ListFoldersResponse {
/**
* List of Folder resources.
*/
folders?: Folder[];
/**
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListFoldersRequest.page_size], use
* the [next_page_token] as the value
* for the [ListFoldersRequest.page_token] query parameter
* in the next list request. Each subsequent list request will have its own
* [next_page_token] to continue paging through the results.
*/
nextPageToken?: string;
}
export interface CreateFolderRequest {
/**
* ID of the cloud to create a folder in.
* To get the cloud ID, use a [yandex.cloud.resourcemanager.v1.CloudService.List] request.
*/
cloudId: string;
/**
* Name of the folder.
* The name must be unique within the cloud.
*/
name: string;
/**
* Description of the folder.
*/
description?: string;
/**
* Resource labels as `` key:value `` pairs.
*/
labels?: { [s: string]: string };
}
export interface CreateFolderMetadata {
/**
* ID of the folder that is being created.
*/
folderId?: string;
}
export interface UpdateFolderRequest {
/**
* ID of the Folder resource to update.
* To get the folder ID, use a [FolderService.List] request.
*/
folderId: string;
/**
* Field mask that specifies which fields of the Folder resource are going to be updated.
*/
updateMask?: protobuf.FieldMask;
/**
* Name of the folder.
* The name must be unique within the cloud.
*/
name: string;
/**
* Description of the folder.
*/
description?: string;
/**
* Resource labels as `` key:value `` pairs.
*/
labels?: { [s: string]: string };
}
export interface UpdateFolderMetadata {
/**
* ID of the Folder resource that is being updated.
*/
folderId?: string;
}
export interface DeleteFolderRequest {
/**
* ID of the folder to delete.
* To get the folder ID, use a [FolderService.List] request.
*/
folderId: string;
}
export interface DeleteFolderMetadata {
/**
* ID of the folder that is being deleted.
*/
folderId?: string;
}
export interface ListFolderOperationsRequest {
/**
* ID of the Folder resource to list operations for.
*/
folderId: string;
/**
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size], the service returns a [ListFolderOperationsResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
* Default value: 100.
*/
pageSize?: Long;
/**
* Page token. Set [page_token]
* to the [ListFolderOperationsResponse.next_page_token]
* returned by a previous list request to get the next page of results.
*/
pageToken?: string;
}
export interface ListFolderOperationsResponse {
/**
* List of operations for the specified folder.
*/
operations?: operation.Operation[];
/**
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListFolderOperationsRequest.page_size], use the [next_page_token] as the value
* for the [ListFolderOperationsRequest.page_token] query parameter in the next list request.
* Each subsequent list request will have its own [next_page_token] to continue paging through the results.
*/
nextPageToken?: string;
}
| typescript |
package $package$.test;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
import $package$.dummy.DummyFactory;
public class DummyClassTest {
@Test
public void testToStringPrefix() {
var subject = DummyFactory.eINSTANCE.createDummyClass();
assertTrue(subject.toString()
.startsWith("PREFIX"));
}
}
| java |
The_Devil_Himself said:
Why only one of them?Did you like the second one?
The first ghost was a spirit and it was of my nanny so it just came once spoke to us thrugh my mother and left..but the other was a neighbour which had died some two years back and it was using my younger brother's body to do what he liked .For two years we couldn't make out the strange changes in my brother but when we called a maulana he made the ghost talk and the ghost spoke through my brother's body.he gave exact details of his death, why he was haunting others,his issues with his family members during his life and many other things .After he was made to leave my brother's body forcibly,my brother returned back to normal life.
now I am not faking things .I am an B.E (electronics) myself and my family is well-educated and we previously did not beleive such things but after getting first hand experience I do beleive in such things.
Those who beleive in such things do not need a proof but for those who do not believe in such things a million proof's are less.
| english |
If a worksheet spans more than one page, you can print row and column headers or labels (also called print titles) on every page. For example, you can repeat the first row of column headers on all pages when you have large, complex worksheets.
Select the worksheet that you want to print.
On the Page Layout tab, in the Page Setup group, click Print Titles.
Note: The Print Titles command will appear dimmed if you are working in cell editing mode, if a chart is selected on the same worksheet, or if you do not have a printer installed.
On the Sheet tab, under Print titles, do one or both of the following:
In the Rows to repeat at top box, type the reference of the rows that contain the column labels.
In the Columns to repeat at left box, type the reference of the columns that contain the row labels.
For example, if you want to print column labels at the top of every printed page, you could type $1:$1 in the Rows to repeat at top box.
Tip: You can also click the Collapse Dialog button at the right end of the Rows to repeat at top and Columns to repeat at left boxes, and then select the title rows or columns that you want to repeat in the worksheet. After you finish selecting the title rows or columns, click the Collapse Dialog button again to return to the dialog box.
Note: If you have more than one worksheet selected, the Rows to repeat at top and Columns to repeat at left boxes are not available in the Page Setup dialog box. To cancel a selection of multiple worksheets, click any unselected worksheet. If no unselected sheet is visible, right-click the tab of a selected sheet, and then click Ungroup Sheets.
Once you have finished setting up your worksheet to include row and column headings or labels (also named print titles) on every page, you can go ahead and print your worksheet.
This feature is not available in Excel for the web.
If you have the Excel desktop application, you can use the Open in Excel button to open the workbook and print rows with column headers.
Need more help?
You can always ask an expert in the Excel Tech Community or get support in Communities.
| english |
{
"0": {
"NO_OVERFLOW_DISCONNECTION": true,
"NB_TIMESTEP_OVERFLOW_ALLOWED": 9999,
"NB_TIMESTEP_COOLDOWN_SUB": 0,
"NB_TIMESTEP_COOLDOWN_LINE": 0,
"HARD_OVERFLOW_THRESHOLD": 9999,
"NB_TIMESTEP_RECONNECTION": 0,
"IGNORE_MIN_UP_DOWN_TIME": true,
"ALLOW_DISPATCH_GEN_SWITCH_OFF": true,
"ENV_DC": false,
"FORECAST_DC": false,
"MAX_SUB_CHANGED": 1,
"MAX_LINE_STATUS_CHANGED": 1
},
"1": {
"NO_OVERFLOW_DISCONNECTION": false,
"NB_TIMESTEP_OVERFLOW_ALLOWED": 6,
"NB_TIMESTEP_COOLDOWN_SUB": 0,
"NB_TIMESTEP_COOLDOWN_LINE": 0,
"HARD_OVERFLOW_THRESHOLD": 300,
"NB_TIMESTEP_RECONNECTION": 1,
"IGNORE_MIN_UP_DOWN_TIME": true,
"ALLOW_DISPATCH_GEN_SWITCH_OFF": true,
"ENV_DC": false,
"FORECAST_DC": false,
"MAX_SUB_CHANGED": 1,
"MAX_LINE_STATUS_CHANGED": 1
},
"2": {
"NO_OVERFLOW_DISCONNECTION": false,
"NB_TIMESTEP_OVERFLOW_ALLOWED": 3,
"NB_TIMESTEP_COOLDOWN_SUB": 1,
"NB_TIMESTEP_COOLDOWN_LINE": 1,
"HARD_OVERFLOW_THRESHOLD": 250,
"NB_TIMESTEP_RECONNECTION": 6,
"IGNORE_MIN_UP_DOWN_TIME": true,
"ALLOW_DISPATCH_GEN_SWITCH_OFF": true,
"ENV_DC": false,
"FORECAST_DC": false,
"MAX_SUB_CHANGED": 1,
"MAX_LINE_STATUS_CHANGED": 1
},
"competition": {
"NO_OVERFLOW_DISCONNECTION": false,
"NB_TIMESTEP_OVERFLOW_ALLOWED": 3,
"NB_TIMESTEP_COOLDOWN_SUB": 3,
"NB_TIMESTEP_COOLDOWN_LINE": 3,
"HARD_OVERFLOW_THRESHOLD": 200,
"NB_TIMESTEP_RECONNECTION": 12,
"IGNORE_MIN_UP_DOWN_TIME": true,
"ALLOW_DISPATCH_GEN_SWITCH_OFF": true,
"ENV_DC": false,
"FORECAST_DC": false,
"MAX_SUB_CHANGED": 1,
"MAX_LINE_STATUS_CHANGED": 1
}
}
| json |
<gh_stars>0
package com.lara;
public class X1
{
public static void main(String[] args)
{
String x=new String();//here object is creating.
String p=null;//here no Object is created.
String q="mkp";//here also object is creating..
System.out.println("x="+x);//calling to string method of string class.
System.out.println(x.toString());//calling to string method of String class.
System.out.println(p);
// System.out.println(p.toString()); it will give NullPointer exception..
System.out.println(q);
System.out.println(q.toString());
}
}
| java |
New Delhi: Rahul Gandhi has written to all state chief ministers from the Congress and alliance parties asking them to pass a resolution in support of the women’s reservation Bill. These resolutions, the Congress party president said, should be passed in the next assembly session.
“In order to reaffirm our support for the passage of the Bill, it would be expedient for the state assembly to pass a resolution calling for the reservation of one-third of the seats in the Lok Sabha and legislative assemblies for women, in the next session,” Gandhi said in the letter.
The Congress chief pointed out that at present, India ranks 148 out of 193 countries in terms of the percentage of women in parliament. According to him, the situation is “even worse in state assemblies”.
The women’s reservation Bill seeks to reserve 33% of all seats in the Lok Sabha and state legislative assemblies for women. It was introduced in parliament in 1996, but has not been passed in the last 22 years. The Congress-led United Progressive Alliance was in power with a majority for ten of those years, but did not pass the Bill.
The Bill was passed in the Rajya Sabha in 2010, but lapsed after the dissolution of the 15th Lok Sabha in 2014.
The state assemblies of Odisha and Andhra Pradesh have already passed resolutions of the kind Gandhi is propagating.
As The Wire has reported before, the Bill’s journey began on September 12, 1996, when it was introduced in the Lok Sabha by the United Front government of H. D. Deve Gowda. As per the draft, the seats were to be reserved for women on a rotation basis and would be determined by draw of lots, in such a way that a seat would be reserved only once in three consecutive general elections. It said reservation of seats for women would cease to exist 15 years after the commencement of the amendment Act.
The Bill, however, failed to get the approval of the house then and was instead referred to a joint parliamentary committee. The committee submitted its report to the Lok Sabha two months later.
In 1998, Atal Bihari Vajpayee, who headed the the first National Democratic Alliance government, reintroduced the Bill in the Lok Sabha. After Vajpayee’s law minister, M. Thambidurai introduced it in the house, a Rashtriya Janata Dal (RJD) MP snatched it from the speaker and tore it into pieces.
Thereafter, the Bill lapsed and was reintroduced – in 1999, in 2002 and 2003. The Lok Sabha has not voted on the Bill till date. | english |
<filename>com.ptoceti.osgi.obix.angular/src/main/webapp/api/poolchanges.json
{"type":"watchout","is":{"uris":[{"type":"uri","name":"uri","isNull":false,"writable":false,"childrens":[],"val":"obix:WatchOut"}]},"isNull":false,"writable":false,"childrens":[{"type":"list","name":"values","isNull":false,"writable":false,"childrens":[],"of":{"uris":[{"type":"uri","name":"uri","isNull":false,"writable":false,"childrens":[],"val":"obix:obj"}]},"min":0,"max":0}]} | json |
<filename>data/json_user_photos/6074865.json<gh_stars>0
{"response": {"photos": {"items": [{"id": "51320f87e4b021edcf5e0fc2", "createdAt": 1362235271, "height": 960, "visibility": "public", "source": {"url": "https://foursquare.com/download/#/iphone", "name": "Foursquare for iOS"}, "prefix": "https://igx.4sqi.net/img/general/", "venue": {"id": "4dd4969e813009ae10078ccd", "like": false, "stats": {"checkinsCount": 1272, "tipCount": 9, "usersCount": 823}, "url": "http://www.cathaycineplexes.com.sg", "beenHere": {"lastCheckinExpiredAt": 0}, "categories": [{"id": "4bf58dd8d48988d17f941735", "primary": true, "icon": {"prefix": "https://ss3.4sqi.net/img/categories_v2/arts_entertainment/movietheater_", "suffix": ".png"}, "pluralName": "Movie Theaters", "shortName": "Movie Theater", "name": "Movie Theater"}], "verified": false, "allowMenuUrlEdit": true, "location": {"address": "2 Handy Road Level 5 The Cathay", "lat": 1.2990945411738786, "postalCode": "229233", "city": "Singapore", "formattedAddress": ["2 Handy Road Level 5 The Cathay", "229233", "Singapore"], "lng": 103.84775456014967, "labeledLatLngs": [{"lng": 103.84775456014967, "label": "display", "lat": 1.2990945411738786}], "country": "Singapore", "cc": "SG"}, "contact": {"twitter": "cathaycineplex", "formattedPhone": "+65 6735 2262", "phone": "+6567352262"}, "name": "The Platinum Movie Suites at Cathay"}, "width": 720, "suffix": "/6074865_ddUER2jYcT5aNVa2_eUYV1D8jZkWAN4AonL1STKKYT4.jpg"}], "count": 1}, "totalCount": 1}, "meta": {"code": 200, "requestId": "595a77c8351e3d64b1ac5a36"}, "notifications": [{"item": {"unreadCount": 0}, "type": "notificationTray"}]} | json |
{"name":"grunt-cli","description":"The grunt command line interface.","version":"0.1.13","author":{"name":"Grunt Team"},"homepage":"http://gruntjs.com/","repository":{"type":"git","url":"git://github.com/gruntjs/grunt-cli.git"},"bugs":{"url":"http://github.com/gruntjs/grunt-cli/issues"},"licenses":[{"type":"MIT","url":"http://github.com/gruntjs/grunt-cli/blob/master/LICENSE-MIT"}],"bin":{"grunt":"bin/grunt"},"engines":{"node":">= 0.8.0"},"scripts":{"test":"node bin/grunt test"},"preferGlobal":true,"dependencies":{"nopt":"~1.0.10","findup-sync":"~0.1.0","resolve":"~0.3.1"},"devDependencies":{"grunt":"~0.4.0","grunt-contrib-jshint":"~0.2.0"},"contributors":[{"name":"<NAME>","url":"http://goingslowly.com"},{"name":"<NAME>","url":"http://gruntjs.com"},{"name":"<NAME>","url":"http://nemikor.com"},{"name":"<NAME>","url":"https://github.com/"}],"_id":"grunt-cli@0.1.13","dist":{"shasum":"e9ebc4047631f5012d922770c39378133cad10f4","tarball":"http://registry.npmjs.org/grunt-cli/-/grunt-cli-0.1.13.tgz"},"_from":"grunt-cli@>=0.1.13 <0.2.0","_npmVersion":"1.3.24","_npmUser":{"name":"tkellen","email":"<EMAIL>"},"maintainers":[{"name":"tkellen","email":"<EMAIL>"}],"directories":{},"_shasum":"e9ebc4047631f5012d922770c39378133cad10f4","_resolved":"https://registry.npmjs.org/grunt-cli/-/grunt-cli-0.1.13.tgz","readme":"ERROR: No README data found!"} | json |
import AsyncStorage from '@react-native-async-storage/async-storage';
import { generateUID } from "./helper";
//import shine from '../../assets/shinex2.png';
//import shrek from '../../assets/shrek-face.png';
const FLASHCARDS_STORAGE_KEY = "flashcards_data";
function initialData() {
return {
"632mgp7hm68vzvg2amz1hq": {
id: "632mgp7hm68vzvg2amz1hq",
title: "Movies",
questions: [
{
question: "Who was known to say: Here's Johnny?",
answer:
"<NAME>",
//avatarURL: shine
},
{
question: "Who was the voice of ShrekTM?",
answer:
"<NAME>",
//avatarURL: shrek
},
{
question: "Who is the only actor to receive an Oscar nomination for acting in a Lord of the Rings?",
answer:
"<NAME>"
},
{
question: "What is the highest-grossing R-rated movie of all time?",
answer: "Joker"
},
{
question: "Who is the first actor to play <NAME> on screen?",
answer: "<NAME>"
}
]
},
"724mgp7hm68vzvg2amz1hq": {
id: "724mgp7hm68vzvg2amz1hq",
title: "Music",
questions: [
{
question: "Who founded Motown Records?",
answer: "<NAME>"
},
{
question: "<NAME> only had one Top 40 hit. Which song was it?",
answer: "All Along the Watchtower"
},
{
question:
"What was Elvis Presley‘s first No. 1 hit in the US?",
answer: "Heartbreak Hotel"
},
{
question:
"Which classical composer was deaf",
answer: "<NAME>"
}
]
},
"636jgrwdbhf58lxznh9q79": {
id: "636jgrwdbhf58lxznh9q79",
title: "Video Games",
questions: [
{
question: "What was the first commercially successful video game?",
answer: "PONG"
},
{
question: "What popular dining franchise is the founder of Atari also responsible for?",
answer:
"Chuck E Cheese"
},
{
question: "What position did the creator of the Game Boy have at Nintendo?",
answer:
"A Janitor"
},
{
question: "Mario first appeared in what video game?",
answer:
"<NAME>"
}
]
}
};
}
export async function getDecks() {
try {
const results = await AsyncStorage.getItem(FLASHCARDS_STORAGE_KEY);
if (results) {
const data = JSON.parse(results);
return data;
} else {
await AsyncStorage.setItem(
FLASHCARDS_STORAGE_KEY,
JSON.stringify(initialData())
);
return initialData();
}
} catch (error) {
await AsyncStorage.setItem(
FLASHCARDS_STORAGE_KEY,
JSON.stringify(initialData())
);
return initialData();
}
}
export async function saveDeckTitle(title) {
const id = generateUID();
const deck = {
id: id,
title: title,
//correctAnswer: correctAnswer,
questions: []
};
await AsyncStorage.mergeItem(
FLASHCARDS_STORAGE_KEY,
JSON.stringify({
[id]: deck
})
);
return deck;
}
export async function saveCardToDeck(deckId, card) {
const results = await AsyncStorage.getItem(FLASHCARDS_STORAGE_KEY);
if (results) {
const data = JSON.parse(results);
const deck = data[deckId];
deck.questions = deck.questions.concat([card]);
await AsyncStorage.mergeItem(
FLASHCARDS_STORAGE_KEY,
JSON.stringify({
[deckId]: deck
})
);
return card;
}
}
export async function removeDeck(deckId) {
const results = await AsyncStorage.getItem(FLASHCARDS_STORAGE_KEY);
if (results) {
const data = JSON.parse(results);
delete data[deckId];
await AsyncStorage.setItem(FLASHCARDS_STORAGE_KEY, JSON.stringify(data));
return data;
}
return {};
}
| javascript |
{"name":"<NAME>","id":"BY-7746","address":"Schulstr. 2 96181 Rauhenebrach Untersteinbach","school_type":"Grund- und Hauptschule","fax":"09554 925342","phone":"09554 357","website":null,"state":"BY","programs":{"programs":[]},"full_time_school":false,"lon":10.547436,"lat":49.891467}
| json |
import { INodeState } from 'states/nodeState';
import { RootStore } from 'states/rootStore';
import { addPoints } from 'utils/point';
export const cloneSelectedNodesCommand = {
execute(rootStore: RootStore) {
rootStore.selectionState.selectedNodes.forEach((node) => {
const nodeObj = node.export() as INodeState;
nodeObj.id = undefined;
nodeObj.label = nodeObj.label;
nodeObj.position = addPoints(nodeObj.position, [50, 50]);
rootStore.nodesStore.addNode(nodeObj, false);
});
},
};
| typescript |
Microsoft, a small company in Washington, has been hit by a $200 million lawsuit by a company in Toronto called i4i over some sort of XML tagging to Microsoft Word. That’s $200 million US, not CAD.
Microsoft would have gotten away with it, too, if it hadn’t been for those meddling kids.
The jury in the case before the U.S. District Court for the Eastern District of Texas found Microsoft “wilfully infringed” on i4i’s patent.
Cawley said that means the judge could triple the damages.
Cawley said the key to the case were Microsoft emails showing the company knew about i4i’s patent.
Bloops! Note to self: never email other people about stealing people’s stuff. Use the phone!
| english |
<reponame>deMynchi/ioBroker.meteoswiss<gh_stars>1-10
export namespace Rest {
export interface DbInfo {
dbVersion: number;
checksum: string;
gaiRate: number;
timestamp: number;
}
export interface CurrentPlzWeather {
time: number;
icon: number;
temperature: number;
}
export interface Forecast {
dayDate: string;
iconDay: number;
temperatureMax: number;
temperatureMin: number;
precipitation: number;
}
export interface Link {
url: string;
text: string;
}
export interface Warning {
warnType: number;
warnLevel: number;
text: string;
validFrom?: number;
validTo?: number;
ordering: string;
htmlText: string;
outlook: boolean;
links: Link[];
}
export interface WarningsOverview {
warnType: number;
warnLevel: number;
}
export interface Graph {
start: number;
startLowResolution: number;
precipitation10m: number[];
weatherIcon3h: number[];
windDirection3h: number[];
windSpeed3h: number[];
sunrise: number[];
sunset: number[];
temperatureMin1h: number[];
temperatureMax1h: number[];
temperatureMean1h: number[];
precipitation1h: number[];
precipitationMin1h: number[];
precipitationMax1h: number[];
}
export interface PlzDetail {
currentWeather: CurrentPlzWeather;
forecast: Forecast[];
warnings: Warning[];
warningsOverview: WarningsOverview[];
graph: Graph;
}
export interface ValueTime {
value: number;
timestamp: number;
}
export interface StationMeasurements {
temperatureMin?: ValueTime;
temperatureMax?: ValueTime;
sunshineTotal?: number;
sunshineYesterday?: number;
precipitation1H?: number;
precipitationYesterday?: number;
precipitation24H?: number;
precipitation48H?: number;
precipitation72H?: number;
windGustMax?: ValueTime;
pressureDifference3H?: number;
pressure850?: number;
pressure700?: number;
snow2D?: number;
snow3D?: number;
dewPoint?: number;
windSpeed?: number;
precipitation?: number;
humidity?: number;
pressureSea?: number;
pressureStandard?: number;
pressureStation?: number;
windDirection?: number;
windGust?: number;
snowNew?: number;
snowTotal?: number;
temperature?: number;
smnTime?: number;
sunshine?: number;
snowTime?: number;
foehnTime?: number;
foehn?: number;
}
export interface CurrentWeather {
smnTime: number;
foehnTime: number;
snowTime: number;
data: Record<string, StationMeasurements>;
}
}
export namespace Db {
export interface Metadata {
version: string;
}
export interface LocationBase {
x: number;
y: number;
altitude: number;
}
export interface Plz extends LocationBase {
plz_pk: number;
primary_name: string;
warnregion: number;
station: string;
active: number;
}
export interface Wetterstation extends LocationBase {
station_pk: string;
name: string;
zoomLevel: number;
orientation: number;
zoomLevel: number;
orientation: number;
temperature: number;
sunshine: number;
precipitation: number;
humidity: number;
foehn: number;
wind: number;
snow: number;
pressure: number;
active: number;
hasImage: number;
temperature_since: ?number;
sunshine_since: ?number;
precipitation_since: ?number;
humidity_since: ?number;
foehn_since: ?number;
wind_since: ?number;
snow_since: ?number;
pressure_since: ?number;
specials_de: ?string;
specials_fr: ?string;
specials_it: ?string;
specials_en: ?string;
additional_de: ?string;
additional_fr: ?string;
additional_it: ?string;
additional_en: ?string;
}
}
export namespace Push {
export interface WarningData {
msg: string;
warnLevel: string; // number as string
warnType: string; // number as string
ordering: string;
mute: 'true' | 'false';
validFrom?: string; // number as string
validTo?: string; // number as string
gps: 'true' | 'false';
headLine: string;
warnText: string;
name: string; // name of the location
outlook: 'true' | 'false';
plz: string; // number as string
isAlertswissAlarm: 'true' | 'false';
}
export interface Warning {
data: WarningData;
from: string; // senderId
priority: string;
collapse_key: string;
}
}
| typescript |
Mythological series Ramayana would be re-telecast by Doordarshan from this Saturday, Information and Broadcasting Minister Prakash Javadekar said on Friday.
Sources said Ramayana was just one of the first in the series of old Doordharshan hits to make a reappearance.
The other programmes include B R Chopra's Mahabharata, Chanakya, Upanishad Ganga, Shahrukh Khan's iconic Circus and Byomkesh Bakshi. By later today, the timings of Mahabharata, Chanakya and Upanishad Ganga will be announced. These will play on DD Bharati. The timings of Byomkesh Bakshi and Circus will be announced in the next few days.
“Happy to announce that on public demand, we are starting re-telecast of 'Ramayana' from tomorrow, Saturday March 28 in DD National, One episode in morning 9 am to 10 am, another in the evening 9 pm to 10 pm,” Mr. Javadekar tweeted.
The announcement comes at a time when the country is going through a 21-day lockdown to contain the spread of COVID 19.
The 74-episode Ramayana was telecast from 25 January 1987 to 31 July 1988 and the 90-episode Mahabharata from 2 October 1988 to 24 June 1990.
“DD was already in talks for reacquisition of iconic serials several weeks prior to this situation. That process will continue. Right now, the lockdown being the priority, the content has been shared in national interest,” a senior Prasar Bharati official said.
The rights of all these programmes continue to be held with the producers and it is only a one-time rerun. This re-telecast was made possible by the new content acquisition policy adopted by Doordarshan in November last that manifold increased the budget for acquiring content. | english |
var five = require("../lib/johnny-five.js");
// console.log(Object.keys(five.Servo.prototype));
var board = new five.Board();
board.on("ready", function() {
console.log(new five.Servo(11));
});
| javascript |
Legnica, city, Dolnośląskie województwo (province), southwestern Poland. It lies along the Kaczawa River in the western lowlands of Silesia (Śląsk).
A 12th-century Silesian stronghold, Legnica became the capital of an autonomous principality in 1248. At the Battle of Liegnitz, or Legnica, on April 15, 1241, the Mongols defeated a Polish army under Henry II, prince of Lower Silesia. Legnica received municipal rights in 1252 and soon became an important trade centre, with an economy based on its extensive weaving industry. Long ruled by the Piast dynasty, the town passed to the Habsburgs (1675) and to the Prussians (1741). It suffered extensive damage in World War II.
Traditional industries include metalworking (principally brass), textiles, and food production; metallurgy and copper processing have developed more recently. Legnica is the capital of the local Roman Catholic diocese, established in 1992. The city operates a copper museum, art gallery, theatre, cultural centre, and public library. Pop. (2011) 103,238.
| english |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.