text stringlengths 1 1.04M | language stringclasses 25 values |
|---|---|
Two-time NASCAR Cup Series champion Kyle Busch was recently featured in an instagram reel made by his wife, Samantha, that showcased the humorous dynamics in the family. The post quickly gained attention from fans, who couldn't help but react with amusement and delight.
Samantha Busch has been sharing snippets of her adventures with her husband and son, Brexton, on social media. The Busch family appeared to be having a great time together on a recent hiking trip to a picturesque St. Lucia. In the midst of their family escapades, Samantha Busch managed to capture a relatable and humorous moment during their daily routine.
She shared a short clip on Instagram showing herself loading the dishwasher. Taking a jab at Kyle, the caption read, "A good husband and son would never watch mom load the dishwasher. "
The video then seamlessly transitioned to a clip of Kyle and Brexton walking past with their eyes covered. The caption accompanying this scene read, "So we'll be at the race track. "
The hilarious reel shared by Samantha Busch quickly caught the attention of fans and followers, sparking an outpouring of funny reactions in the comments section.
Last year, Richard Childress Racing driver Kyle Busch's departure from Joe Gibbs Racing was driven by the team's inability to afford his services without a sponsor.
With Busch subsequently achieving consistent victories for another team, some experts believe that Joe Gibbs Racing may now be regretting their decision. However, NBC analyst Jeff Burton offered a different viewpoint on the matter.
During a recent discussion with NBC analysts Kyle Petty and journalist Dustin Long, Burton made a bold statement in support of Joe Gibbs' decision to part ways with Busch.
Burton believes that considering the controversies and high stakes involved, Gibbs made the right call.
While Kyle Busch's on-track performance cannot be denied, Burton raised questions on the reason behind Joe Gibbs' decision to part ways with the 2-time NASCAR Cup Series Champion. He also raised the matter of Busch's poor form around his final days with his former employers. | english |
Whenever you are overwhelmed, stressed, discouraged, or in despair, your problems aren’t caused by your circumstances. The problem is you are running your life without an adequate supply of food for your spirit. What you need is an infusion of “spirit and life” into your mind, heart, and soul. Child, how much time have you spent meditating on My words this week? If your answer is “little to none,” then your spirit is starving. You don’t need empty advice from people; you need spiritual food. I am the only One who can fill up your spirit. The only spirit-and-life food I offer are My words.
You can fill your mind with knowledge and information; you can fill your heart with feelings and images; you can surround yourself with people. But the only way you can fill your soul with the spirit and life you need is by delighting in My words. As you feast on My words, your spirit will be nourished, and you will soar above your problems. I promise!
| english |
<reponame>Shirk/api.apkallufalls.com
{"id":600,"help":{"de":"Den Gelehrten-Jobauftrag „Die Rückkehr des Gelehrten“ abgeschlossen.","en":"Complete the scholar job quest “The Beast Within.”","fr":"Accomplir la quête de job “Le passé caché de Nym”.","jp":"クエスト「次代の学者」をコンプリートする"},"img":"/i/026000/026011.png","xivdb":"/achievement/600"} | json |
<gh_stars>1-10
{
"translation": {
"are_you_sure_you_want_to_switch_the_department": "Oled sa kindel, et soovid osakonda vahetada?",
"cancel": "Tühista",
"conversation_finished": "Vestlus on lõppenud",
"department_switched": "Osakond vahetatud",
"no": "Ei",
"options": "Valikud",
"send": "Saada",
"user_joined": "Kasutaja liitus",
"user_left": "Kasutaja lahkus"
}
}
| json |
{"dist":"File-Copy-Recursive-0.45","pathname":"D/DM/DMUEY/File-Copy-Recursive-0.45.tar.gz","target":"File::Copy::Recursive","version":0.45,"provides":{"File::Copy::Recursive":{"version":0.45,"file":"lib/File/Copy/Recursive.pm"}},"name":"File::Copy::Recursive"} | json |
def factorielle_rec(n: int) -> int:
"""
Description:
Factorielle méthode récursive
Paramètres:
n: {int} -- Nombre à factorielle
Retourne:
{int} -- Factorielle de n
Exemple:
>>> factorielle_rec(100)
9.332622e+157
Pour l'écriture scientifique: f"{factorielle_rec(100):e}"
"""
return 1 if n == 0 else n * factorielle_rec(n - 1)
def factorielle_it(n: int) -> int:
"""
Description:
Factorielle méthode itérative
Paramètres:
n: {int} -- Nombre à factorielle
Retourne:
{int} -- Factorielle de n
Exemple:
>>> factorielle_it(100)
9.332622e+157
Pour l'écriture scientifique: f"{factorielle_it(100):e}"
"""
result = 1
for i in range(1, n + 1):
result *= i
return result | python |
<filename>package.json
{
"name": "intake",
"version": "0.3.0",
"description": "JavaScript utilities and other helper methods for intake form applications.",
"main": "index.js",
"engines": {
"node": ">=0.12.6"
},
"directories": {
"test": "test"
},
"scripts": {
"test": "mocha --reporter spec",
"cover": "nyc npm run test",
"coverage": "nyc report --reporter=text-lcov | coveralls"
},
"repository": {
"type": "git",
"url": "git://github.com/brencon/intake.git"
},
"keywords": [
"javascript, form, input, formatting"
],
"author": "<EMAIL>",
"license": "MIT",
"bugs": {
"url": "https://github.com/brencon/intake/issues"
},
"homepage": "https://github.com/brencon/intake#readme",
"devDependencies": {
"chai": "^4.1.2",
"coveralls": "^3.1.0",
"grunt": "^1.0.2",
"grunt-contrib-jshint": "^2.1.0",
"grunt-mocha-test": "^0.13.3",
"mocha": "^8.1.3",
"nyc": "^15.1.0"
},
"dependencies": {}
}
| json |
---
layout: posts
title: "Python pickle module"
date: 2021-03-17 09:00:20 +0700
categories: [Machine Learning]
---
<link rel = "stylesheet" href ="/static/css/bootstrap.min.css">
--------------------------
{% raw %} <img src="https://Kimjs11.github.io/img/pickle.jpg" alt=""> {% endraw %}
## Pickle module<br/>
* 일반 텍스트를 파일로 저장할 때는 파일 입출력을 이용한다. <br/>
* **리스트**, **클래스**의 경우, 텍스트가 아닌 **자료형**이다. 일반적인 입출력 방법으로는 데이터를 저장 및 로드할 수 없다.<br/>
* 파이썬에서는 이와 같은 텍스트 이외의 자료형을 파일로 저장하기 위하여 **pickle** module을 제공한다.<br/>
<br/>
## Pickle module 을 활용하여 데이터 입력 및 로드<br/>
* import pickle 을 통하여 모듈 임포트<br/>
* pickle module 을 이용하면 원하는 데이터를 자료형의 변경없이 파일로 저장하여 그대로 로드할 수 있다.<br/>
* pickle로 데이터를 저장하거나 불러올때는 파일을 byte 형식으로 읽거나 써야한다. <br/>
* ex) open('test.txt', 'wb, rb')<br/>
* 모든 파이썬 데이터 객체를 저장하고 읽을 수 있다.
| markdown |
Whenever Wasim Akram was in action on the cricket field, it was a thrilling sight for the spectators. Whether it was his power packed hits with the bat or his superbly controlled swing bowling at high speed, he was a dangerous opponent for all rivals. His tall and sturdy frame and his long flowing hair made him a sight to behold. But he also played during a time of great crisis in Pakistan cricket when match fixing was rife. He had not disclosed his opinion then, but now he has come out with his own version of the incidents in his autobiography titled Sultan. Wasim used to be called the Sultan of Swing.
The book starts by describing Wasim’s boyhood in the locality of Mozang in Lahore. It was there that Wasim grew up along with his elder brothers Naeem and Nadeem. He also had a younger sister named Sofia. Hilariously, one of the first cricket teams that he represented was named The British Government. The boys who founded the team felt that the name British Government would be an impressive name for a cricket club! !
His first cricketing hero was Imran Khan who helped his career to flourish. But despite having talented players, the Pakistan team always performed below expectations.
Wasim writes candidly: “People complain that the Pakistan team is not consistent. But the country itself is not consistent. Nothing happens in the same way twice. There is no institution that you can rely on. I played under 13 different captains, ten different coaches and nine cricket board Chairmen. ” He attributes the team’s inconsistency to the rapid changes that are always happening in Pakistan’s cricket system.
Later in the book he also takes up the question of match fixing that erupted during the peak of his own career. In a chapter titled “Dirty Money”, he writes: “The first hint I had of corrupt undercurrents was before the final of the Austral-Asia Cup in 1990. Rumours began circulating that some Pakistan players had been paid to make their team lose. ” When word reached Imran Khan, he called his team together and flatly told them that the 14,000 pounds that the team had already won would come to the players only if they continued to win. If they lost, not a single penny would come into their hands. The ploy worked and Pakistan won the trophy.
Wasim writes that although Imran Khan and Javed Miandad had different ways of looking at issues, they were both uncompromising when it came to honesty. This steadied the players. Had it not been for their strong leadership, things could have become much worse. Even then, there was often an air of suspicion with the team. Players were suspicious of each other and therefore could not be genuinely friendly with each other. It affected the morale and fighting spirit of the team.
Later, when Saleem Malik was the captain, his questionable decisions and Pakistan’s astonishing defeats added fuel to the fire. Malik was eventually banned but by then a lot of harm had been done to Pakistan cricket. Under intense spotlight and media glare, there came a situation where every player thought only about his own safety and pointed a finger at others including Wasim. It destroyed team spirit completely. The haphazard decision making of the Pakistan Cricket Board and its selectors added to the chaos and confusion. It took many years before some semblance of order and confidence was restored.
After he had quit playing, Wasim found satisfaction as a commentator along with his old friends Sunil Gavaskar, Ravi Shastri and Harsha Bhogle. He also served as bowling coach of Kolkata Knight Riders in the IPL. But in 2009 he lost his wife Huma. The posthumous diagnosis was that she had suffered from an affliction called mucormycosis which the doctors in Pakistan had not diagnosed correctly.
Her rapid decline had made Wasim decide to shift her to a hospital in Singapore. But when she had a cardiac arrest on the flight, the aircraft was diverted to Chennai. They arrived without the required visas and permits. But the Indian authorities waived all requirements and Apollo hospital waived the fees. “I will never forget their kindness,” writes Wasim. But despite everyone’s efforts, Huma passed away due to multiple organ failure. She was only 42 years old then.
Later Wasim married Shaniera Thompson, an Australian woman who steadied his family life in the same way as Huma had done earlier. Now his two sons Tahmoor and Akbar are doing well at college in the USA and his seven year old daughter Aiyla is a precocious learner too. It was his wife who urged him to pen down his memoirs so that his fans across the world would come to know the facts of his life and career. The result of his efforts can be read about in this absorbing tale of the ups and downs of one of cricket’s legendary all time greats. | english |
There are 4 Muslim MLAs in the Assembly but none of them has demanded a Namaz room.
Sonia Gandhi sobbed on hearing about the killing of the jihadi terrorist during the Batla House attack, from this, it can be understood whose sympathies are with whom.
The students said that the school teacher Anoop Rawat had cut the sacred threads on the wrists of the students.
The area where these posters were displayed is known as ‘Purohit Mohalla’ which has most of the Hindu population. In the adjacent part, Muslims are in the majority.
Chouhan said, “One needs spiritual peace. The resolve I made in this regard was fulfilled today. By the grace of Shriram, you will visit the pilgrimage sites.
The film’s producer Vipul Shah alleged that theater owners are getting threatening phone calls from the Police and Administration.
Currently, we are being accused of spreading propaganda through our movie The Kerala Story. However, to prove our depictions we are introducing today 26 women who were victims of this conversion.
For the past 3-4 years, some devotees were celebrating Shri Shanidev’s Jayanti by cake cutting in western style at the active (jagrut) ‘Shri Shanaishchar’ Devasthan in Shreekshetra Shani Shingnapur.
A prank of throwing eggs Religious fanatics led to arguments and finally resulted in riots. | english |
“In Argentina, ‘a woman is killed every 30 hours’, reports Telam, the country’s official news agency, based on a report of the Observatorio de Femicidios Marisel Zambrano from the NGO La Casa del Encuentro.
From July 1, 2015 to May 31, 2016, 275 women had been killed. The violence that takes place in cities goes beyond robbery and assault, the gang that controls the corner, the abuses, the drug ring that terrorises the neighbourhood or the illegitimate use of force by diverse actors.
Violence is also hunger, a lack of basic services, and an unjust legal system. And it is discrimination based on ethnicity, birthplace, sexual orientation and age.
Women are the omitted subjects in much urban design and planning. As Saskia Sassen expressed in a 2016 article:
Much research and theory is now focusing on gender and cities, bringing light to these omissions and to the subordinate situations of women in cities.
Gender is here used as an analytical category useful for highlighting the asymmetries between men and women. Society is not binary therefore it is equally concerns LGTBI population, youth, ethnicities, others.
Even as change is happening, many women experience the city differently than men. Women combine productive work with family duties, fragmenting the use of time and space. During daylight hours, public spaces are more likely to be used by women, spending time in nearby parks, with children, disabled and/or senior citizens. And yet, those spaces are mainly designed for men’s needs. Urban design and planning, particularly since Modernism, has answered to a universal citizen: white young productive men.
Millions of women and girls experience violence as a kind of pandemic, natural, invisible and justified. Only recently has it been seen as resulting from patriarchal conditions where ideology and culture hide symbolic dominance and economic exploitation.
This recognition has produced diverse initiatives. For instance, the Safe Cities for Women Campaign developed in Brazil by Action Aid for the municipality of Garanhuns, located in the state of Pernambuco, launched a plan of public policies for women’s safety.
It includes strengthening the focus on women in special courts of justice, police stations, police training, improvement in public transport, investment in street lights, training on gender and violence against women in schools, and more. Renata, a transsexual woman, political leader in Garanhuns and an active member of the Women’s Forum of Pernambuco, reports on the positive actions taken by the city, including how a simple investment in street lighting is reducing violence.
If our understanding of cities and potential policy reforms are to enhance social progress, we must revisit urban planning from a gender-based perspective. The use of time and space should be central to gendered planning.
Mothers use time in fragments – domestic tasks, school and health care each gets its own slice of time.
Women’s responsibilities as family careers are not recognised at the workplace and thereby their economic contribution to both reproductive and productive work is rendered invisible. Ana Falú takes this analysis further by underlining the significance of both kinds of omission: it is the central factor organising urban space in ways that build obstacles for women.
Surveys and analyses of time use and time budgeting in diverse cities highlight on the invisible unremunerated contributions of women to society, estimated around the 20-30% of the GDP of cities.
This is not new. Jane Jacobs taught us in 1961 about the significance of the proximity of basic services and infrastructures for women in particular.
Gaps in knowledge about omitted subjects are part of a larger epistemological question central to systemic inequality and its reproduction. Debates surrounding compact versus diffused cities, or the impact of new, urban spatial fragmentation must address specific identity-based exclusions.
Growth trends tend to be associated with women’s social progress. And yet even though women at all levels of education are better qualified than men, they earn less and much search longer for work. The majority of women work in the low-end service sector.
A paradox persists: The more women work, the poorer they are. For instance, in the Latin America and the Caribbean region, female participation in the work force increased by 21% between 2002 and 2012, totalling over 100 million women.
In this period, the region registered significant economic growth and a decrease in poverty, but not among women. In 2002, there were 109 poor women for every 100 poor men; in 2012 the ratio rose to 118.
These trends point to a disjuncture between economic growth and overall social progress, a pattern not unique to this region. Women constitute the majority of the low-paid service sector.
And in Latin America, 71% of domestic workers are women, most of whom are indigenous and/or black. Further, poor women have high fertility rates, having twice as many children than rich women. Accessing sexual, health and reproductive rights is severely limited due to low social and economic status.
The patterns in Latin America are evident throughout the world. Data on the informal sector in India shows that home-based workers, numbering 23.5 million, are mostly women. In the South Asian context, women’s work place is often determined by social and cultural constraints on mobility. As a result, home-based work is the one or only possible option for women to secure an income. As in Latin America, this pattern is unlikely to change even in times of robust development, such as India saw over the past two decades.
In addition to space and income considerations for social progress, it is central to consider the intangible dimension of violence suffered by women in private and public spaces, just because they are women. The persistence of male violence on the bodies of women to discipline them, is one of the most universal human-rights violations in the world.
Diverse instruments have been adopted across the world: laws, protocols, participatory planning and gender budgeting. But progress is slow, as with all policy, political will and adequate resourcing are key to achieve impact.
Reports on violence in cities find reports that 60% of women feel unsafe in urban spaces. Criminality and threats limit women’s freedom of movement. Women are poor in rights: political participation, autonomy, equal access to work, infrastructure, transportation and security all are marked by limited recognition of women’s rights.
Women can become invisible subjects in a context where the city is a political territory for making citizenship. That is why women often have to build their citizenship by taking risks. While this risk-taking builds confidence in terms of advocacy, it nonetheless requires significant economic, cultural and symbolic resources.
Ana Falú, Professor of Architecture at the Faculty of Architecture, Universidad de Còrdoba and Saskia Sassen, Robert S. Lynd Professor of Sociology, Columbia University.
This article first appeared on The Conversation.
| english |
<gh_stars>1-10
[{"id":61325,"idParent":61322,"namaWilayah":"<NAME>","tingkatWilayah":4,"idPro":60371,"idKab":61251,"idKec":61322,"idKel":61325,"namaPro":"<NAME>","namaKab":"SERUYAN","namaKec":"<NAME>","namaKel":"<NAME>","kodeWilayah":"62.07.06.2003"},{"id":61324,"idParent":61322,"namaWilayah":"<NAME>","tingkatWilayah":4,"idPro":60371,"idKab":61251,"idKec":61322,"idKel":61324,"namaPro":"<NAME>","namaKab":"SERUYAN","namaKec":"<NAME>","namaKel":"<NAME>","kodeWilayah":"62.07.06.2002"},{"id":61326,"idParent":61322,"namaWilayah":"<NAME>","tingkatWilayah":4,"idPro":60371,"idKab":61251,"idKec":61322,"idKel":61326,"namaPro":"<NAME>","namaKab":"SERUYAN","namaKec":"<NAME>","namaKel":"<NAME>","kodeWilayah":"62.07.06.2004"},{"id":61323,"idParent":61322,"namaWilayah":"<NAME>","tingkatWilayah":4,"idPro":60371,"idKab":61251,"idKec":61322,"idKel":61323,"namaPro":"KAL<NAME>","namaKab":"SERUYAN","namaKec":"<NAME>","namaKel":"<NAME>","kodeWilayah":"62.07.06.2001"},{"id":61327,"idParent":61322,"namaWilayah":"<NAME>","tingkatWilayah":4,"idPro":60371,"idKab":61251,"idKec":61322,"idKel":61327,"namaPro":"<NAME>","namaKab":"SERUYAN","namaKec":"<NAME>","namaKel":"<NAME>","kodeWilayah":"62.07.06.2005"},{"id":61328,"idParent":61322,"namaWilayah":"<NAME>","tingkatWilayah":4,"idPro":60371,"idKab":61251,"idKec":61322,"idKel":61328,"namaPro":"<NAME>","namaKab":"SERUYAN","namaKec":"<NAME>","namaKel":"<NAME>","kodeWilayah":"62.07.06.2006"}] | json |
Red Bull's Formula One championship leader Max Verstappen described the setback of finishing second to Mercedes rival Lewis Hamilton in Sunday's Sao Paulo Grand Prix as 'damage limitation'.
The Dutch 24-year-old is now 14 points ahead of seven times world champion Hamilton with three races remaining.
"We still have a good points lead you know, so today was a bit of damage limitation on a weekend where it was a bit difficult, but I’m confident that in the coming races we’ll bounce back," he said.
"I had fun out there. Of course, I like to win, but I think second today, with the defence I did, it’s also satisfying and, of course, we’re still ahead in the Championship.
"It’s been like this the whole year, hasn’t it," he said of the points gap widening and narrowing between the two contenders.
Verstappen defended strongly against Hamilton, who had a new engine for the race, with a turn four incident between the two on lap 48 the major talking point.
Hamilton tried to overtake, but Verstappen moved across and closed the door, both cars going off the track together with accusations that the Red Bull driver had gone too far and gained an unfair advantage.
Stewards took an immediate look but decided against imposing any time penalty.
"We both, of course, tried to be ahead into the corner, and so I braked a bit later to try and keep the position," said Verstappen.
"The tyres were already a bit worn so I was really on the edge of grip...so then it’s a safer way of just running a bit wide there.
"I was of course happy that the stewards decided that we could just keep on racing because I think the racing, in general, was really good today."
| english |
<filename>Framework/Source/Windows/LWVideo/LWVideoDrivers/LWVideoDriver_OpenGL3_3_Windows.cpp
#include "LWVideo/LWVideoDrivers/LWVideoDriver_OpenGL3_3.h"
#include "LWPlatform/LWWindow.h"
LWVideoDriver_OpenGL3_3 *LWVideoDriver_OpenGL3_3::MakeVideoDriver(LWWindow *Window, uint32_t Type) {
LWWindowContext WinCon = Window->GetContext();
int32_t PixelFormat;
PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), 1, PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, PFD_TYPE_RGBA, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0 };
int32_t AttribList[] = { WGL_CONTEXT_MAJOR_VERSION_ARB, 3, WGL_CONTEXT_MINOR_VERSION_ARB, 2, 0, 0 };
LWOpenGL3_3Context Context = { nullptr, nullptr };
LWVideoDriver_OpenGL3_3 *Driver = nullptr;
HGLRC GLContext = nullptr;
if ((Context.m_DC = GetDC(WinCon.m_WND)) == nullptr) LWWindow::MakeDialog("Error: 'GetDC'", "ERROR", LWWindow::DialogOK);
else if ((PixelFormat = ChoosePixelFormat(Context.m_DC, &pfd)) == 0) LWWindow::MakeDialog("Error: 'ChoosePixelFormat'", "ERROR", LWWindow::DialogOK);
else if (!SetPixelFormat(Context.m_DC, PixelFormat, &pfd)) LWWindow::MakeDialog("Error: 'SetPixelFormat'", "ERROR", LWWindow::DialogOK);
else if ((GLContext = wglCreateContext(Context.m_DC)) == nullptr) LWWindow::MakeDialog("Error: 'wglCreateContext'", "ERROR", LWWindow::DialogOK);
else if (!wglMakeCurrent(Context.m_DC, GLContext)) LWWindow::MakeDialog("Error: 'wglMakeCurrent'", "ERROR", LWWindow::DialogOK);
else if (glewInit() != GLEW_OK) LWWindow::MakeDialog("Error: 'glewInit'", "ERROR", LWWindow::DialogOK);
else if (GLEW_VERSION_3_3) {
if ((Context.m_GLRC = wglCreateContextAttribsARB(Context.m_DC, 0, AttribList)) == nullptr) LWWindow::MakeDialog("Error: 'wglCreateContextAttribsARB'", "ERROR", LWWindow::DialogOK);
else {
wglDeleteContext(GLContext);
wglMakeCurrent(Context.m_DC, Context.m_GLRC);
int32_t UniformBlockSize = 0;
glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, &UniformBlockSize);
Driver = Window->GetAllocator()->Allocate<LWVideoDriver_OpenGL3_3>(Window, Context, (uint32_t)UniformBlockSize);
}
}
if (!Driver) {
if (GLContext) wglDeleteContext(GLContext);
if (Context.m_GLRC) wglDeleteContext(Context.m_GLRC);
if (Context.m_DC) ReleaseDC(WinCon.m_WND, Context.m_DC);
}
return Driver;
}
bool LWVideoDriver_OpenGL3_3::DestroyVideoContext(LWVideoDriver_OpenGL3_3 *Driver) {
LWWindowContext &WinCon = Driver->GetWindow()->GetContext();
LWOpenGL3_3Context &Con = Driver->GetContext();
if (Con.m_GLRC) wglDeleteContext(Con.m_GLRC);
if (Con.m_DC) ReleaseDC(WinCon.m_WND, Con.m_DC);
LWAllocator::Destroy(Driver);
return true;
}
bool LWVideoDriver_OpenGL3_3::Update(void) {
return true;
}
LWVideoDriver &LWVideoDriver_OpenGL3_3::Present(uint32_t SwapInterval){
wglSwapIntervalEXT(SwapInterval);
SwapBuffers(m_Context.m_DC);
return *this;
} | cpp |
The ODI World Cup 2023 is just around the corner and is all set to commence from October 5. Hosted by India, the 13th edition of the marquee tournament will be hosted in cities across India, with the final set to take place at the Narendra Modi stadium in Ahmedabad. The current defending champions of the World Cup are England, who managed to win at home in 2019.
From the design of the World Cup to whether the winning team takes the original trophy home or not, a lot of questions still linger on the mind of the fans. Ahead of the World Cup 2023, let us look at some of the unknown facts surrounding the marquee tournament and its trophy.
1. Does the winning team take home the ODI World Cup?
Fans have often wondered whether the winning team gets to take the original trophy home. The answer is that the winning side takes home a replica of the World Cup trophy instead of the original one. The original trophy is taken back to the ICC headquarters in UAE.
While the replicas have the ICC logo engraved on the outside columns of the World Cup, the original one has the logo engraved on the inside. That remains to be the single differentiator between the original and the replica.
The ICC World Cup trophy, which is made entirely of gold and silver, is shaped in the form of a cricket ball with a seam as the circumference. The silver columns are shaped as per the three fundamental aspects of the game – batting, bowling and fielding. At the bottom, there is a hardwood in which the names of the winners are inscribed.
3. What is the height and weight of the ICC World Cup trophy?
Did you know that the iconic piece of silverware was designed by Paul Marsden of Garrard & Co. in London? The ICC ODI World Cup trophy is 65 cm tall and weighs 11 kgs.
4. When was the World Cup trophy designed?
Following the conclusion of the 1996 World Cup, the ICC arrived at at a decision to have a permanent World Cup. The existing World Cup trophy made its debut in 1999 when Australia, captained by Steve Waugh, lifted the trophy.Between 1975 and 1996, four trophies made their appearances on the grandest stage of them all.
India is all set to host ICC Men’s Cricket World Cup 2023 in October-November this year. With the schedule out, ENG vs NZ will mark the beginning of the WC on October 5 at the Narendra Modi Stadium in Ahmedabad. India will face Pakistan at the same venue on October 14. Rohit Sharma & Co will begin the tournament against Australia in Chennai on Oct 8.
This is the fourth time that India will be hosting cricket’s global showpiece event. A total of 8 teams have already confirmed their spots through the ICC Cricket World Cup Super League 2020-23.
| english |
As a parent of 3 young children I am terrified to send them to school, worrying if today will be the day some lunatic walks in with a gun and open fires on our innocent children.
I REALLY wish we didn't live in a world where we are scared to send our children to school, hoping today won't be their last day, praying they won't be threatened at a place that they're suppose to feel safe. Nowadays I do not believe there is such a thing as being too protective. I am tired of hoping things will change, it's time to MAKE a change!
I am starting a petition for a movement to keep our schools safe! I believe if we have some teachers who are trained and authorized to carry a gun in our schools, or hire retired veterans and reserved duty military to protect our children it can prevent these mass shootings from happening. We need higher securities in school so it is not so easy to walk into a school and end innocent lives. We need to make a change now!!
| english |
Following a sharp decline in global oil prices, the government has decided to exempt upstream oil companies — ONGC and Oil India — from paying fuel subsidy as long as the crude prices remain below $60 a barrel and proposes to exclude GAIL India from paying any more subsidy this fiscal.
A ministry note said that after considering “suggestions” from the chief economic advisor, petroleum minister Dharmendra Pradhan approved the upstream burden share as “status quo” for the first half of fiscal 2014-15 with a respite in third and fourth quarter where no contribution would be taken from them for crude price “less than and equal to $60 a barrel”.
Last week, Pradhan approved the graded sharing mechanism where both upstream companies would have to shell out 85 per cent of the crude price exceeding $60 but less than or equal to $100 a barrel; and, 90 per cent of the crude price increase above $100 a barrel.
This would mean that exploration firms ONGC and Oil India will pay Rs 3,746 crore for third quarter of fiscal 2014-15 during which the average price of India basket of crude was $75. 17 per barrel.
They would not pay any subsidy for January during which the price averaged $45.
Separately, the ministry is considering excluding GAIL India from paying any subsidy during the third and fourth quarters. GAIL shared under-recovery of about Rs 1,000 crore in the first half.
The ministry has revised the under-recoveries for fiscal 2014-15 at Rs 77,594 crore of which upstream oil companies paid Rs 31,926 crore and the government paid Rs 17,000 crore. It expects the government to pick up the remaining Rs 23,590 crore of which the last year’s Budget already provides for Rs 5,336 crore.
State-run oil marketing companies suffer under recovery for selling fuels such as kerosene and LPG at a subsidised cost. There is also an outstanding subsidy of Rs 10,934 crore on diesel until last October after which its prices are market determined. | english |
<gh_stars>100-1000
import {
drawPath,
getFontHeight,
getTextWidth,
roundWithKey,
} from '../index';
import { rtv } from '../resources';
/**
* Draws a pair of vertical rectangular brackets.
* @param {number} x Top-left `x` coordinate.
* @param {number} y Top-left `y` coordinate.
* @param {number} width Distance between brackets.
* @param {number} height Height of brackets.
* @param {number} fingerLength
* Length of short horizontal block on top and bottom of bracket in pixels.
*/
export function drawBrackets(x, y, width, height, fingerLength = 8) {
drawPath([
[x + fingerLength, y],
[x, y],
[x, y + height],
[x + fingerLength, y + height],
]); // Left bracket
drawPath([
[x + width - fingerLength, y],
[x + width, y],
[x + width, y + height],
[x + width - fingerLength, y + height],
]); // Right bracket
}
/**
* @property {number} width The width of the matrix onscreen.
* @property {number} height The height of the matrix onscreen.
*/
export default class MatrixOutput {
/**
* Lays out a matrix on `ctx` and prepares it to be drawn.
* @param {Array} matrix The matrix to be layed out.
* @param {number} padding Space in pixels between elements and brackets.
* @param {CanvasRenderingContext2D} ctx Optionally specify a context instead of `rtv.ctx`.
*/
constructor(matrix, padding = 16, ctx = rtv.ctx) {
// Store arguments for later use
this.matrix = matrix;
this.padding = padding;
this.ctx = ctx;
// Initialize empty arrays to hold layout measurements
this.columnWidths = [];
this.rowHeights = [];
this.generateRowDrawFunctions();
this.width = this.columnWidths.reduce((a, b) => a + b + this.padding, this.padding);
this.height = this.rowHeights.reduce((a, b) => a + b + this.padding, this.padding);
}
/**
* Updates `sizes[index]` to `newVal` if it is undefined or is smaller than `newVal`.
* @param {number[]} sizes Array of sizes (widths or heights).
* @param {number} index Index of element to be replaced.
* @param {number} newVal Value to replace `sizes[index]` with.
*/
static updateLayout(sizes, index, newVal) {
const oldVal = sizes[index];
if (oldVal === undefined || oldVal < newVal) {
sizes[index] = newVal;
}
}
/**
* Generates and stores an array of draw functions for each row of the matrix.
*/
generateRowDrawFunctions() {
this.rowDrawFunctions = this.matrix.map((row, rowIndex) => {
if (row instanceof Array) {
const elementDrawFunctions = this.generateElementDrawFunctions(row, rowIndex);
return (x, y, elementCallback) => this
.columnWidths.reduceRight((pointerX, cw, columnIndex) => {
if (elementCallback instanceof Function) {
elementCallback(rowIndex, columnIndex);
}
elementDrawFunctions[columnIndex](
pointerX, y,
undefined,
cw, this.rowHeights[rowIndex],
true, this.ctx,
); // Call draw function (text or nested matrix)
return pointerX - cw - this.padding; // Move left by column width and padding
}, x - this.padding); // Move left by padding
}
// Row is a number; return function to draw text
const str = roundWithKey(row);
const rowWidth = getTextWidth(str);
MatrixOutput.updateLayout(this.columnWidths, 0, rowWidth);
this.rowHeights[rowIndex] = getFontHeight();
return (x, y, elementCallback) => {
if (elementCallback instanceof Function) {
elementCallback(rowIndex, 0);
}
this.ctx.fillText(str, x - this.padding, y);
};
});
}
/**
* Generates and returns an array of draw functions for each element in `row`.
* @param {Array} row
* @param {number} rowIndex
* @returns {(x: number, y: number) => void} Array of draw functions.
*/
generateElementDrawFunctions(row, rowIndex) {
return row.map((element, columnIndex) => {
let width;
let height;
let draw;
if (element instanceof Array) { // Element is a nested matrix
const childMatrix = new MatrixOutput(element);
({ width, height } = childMatrix);
// Substitute 'this' with 'childMatrix' instead of default array of draw functions
draw = childMatrix.draw.bind(childMatrix);
} else { // Element is a number
// Generate function to draw text
const str = roundWithKey(element);
width = getTextWidth(str);
height = getFontHeight();
draw = (x, y) => this.ctx.fillText(str, x, y);
}
MatrixOutput.updateLayout(this.columnWidths, columnIndex, width);
MatrixOutput.updateLayout(this.rowHeights, rowIndex, height);
return draw;
});
}
/**
* Draws matrix contents onto canvas.
* @param {number} x Top-right `x` coordinate.
* @param {number} y Top-left `y` coordinate.
* @param {number} width The width of the matrix.
*/
drawInterior(x, y, elementCallback) {
this.rowHeights.reduce((pointerY, rh, rowIndex) => {
this.rowDrawFunctions[rowIndex](x, pointerY, elementCallback); // Call row draw functions
return pointerY + rh + this.padding; // Move down by row height and padding
}, y + this.padding); // Move down by padding
}
/**
* Draws matrix onto canvas.
* @param {number} x Top-left (or right; see below) `x` coordinate.
* @param {number} y Top-left `y` coordinate.
* @param {(rowIndex: number, columnIndex: number) => void} elementCallback
* Called before each matrix element is drawn.
* @param {number} width Optional onscreen matrix width.
* @param {number} height Optional onscreen matrix height.
* @param {boolean} right If true, `x` will be considered the top-right coordinate.
*/
draw(x, y, elementCallback = undefined, width = this.width, height = this.height, right = false) {
this.ctx.save();
// The origin of text drawn on the canvas will be the top-right corner
this.ctx.textBaseline = 'top';
this.ctx.textAlign = 'right';
// Draw matrix contents; without brackets
// Since 'drawInterior' draws from the top-right corner,
// 'x' must be adjusted when 'right' is false
this.drawInterior(right ? x : x + width, y, elementCallback);
// Since 'drawBrackets' draws from the top-left corner,
// 'x' must be adjusted when 'right' is true
drawBrackets(right ? x - width : x, y, width, height);
this.ctx.restore();
}
}
| javascript |
<gh_stars>10-100
{
"directions": [
"Heat sugar in a heavy saucepan over medium-low heat until sugar becomes lightly brown. Slowly stir in soy sauce. Once the sugar and soy sauce are combined, stir in the water, star anise, curry leaves, ginger, and garlic. Increase heat and bring to a boil. Simmer until the sugar is dissolved, about 15 minutes. Remove from heat and cool. Strain sauce and pour into a lidded bottle or jar. Store in the refrigerator."
],
"ingredients": [
"2 1/2 cups white sugar",
"3 cups dark soy sauce",
"1/2 cup water",
"1/2 star anise pod",
"2 fresh curry leaves",
"1 (1 inch) piece fresh ginger root, sliced",
"4 cloves garlic, minced"
],
"language": "en-US",
"source": "allrecipes.com",
"tags": [],
"title": "Kecap Manis (Sweet Soy Sauce)",
"url": "http://allrecipes.com/recipe/178280/kecap-manis-sweet-soy-sauce/"
}
| json |
<reponame>johangel/SypServices
.nav-at-top{
position: absolute !important;
z-index: 3 !important;
width: 100% !important;
top: 0 !important;
}
.login-content{
width: 100vw;
display: flex;
align-items: center;
justify-content: space-between;
background: url('login.jpg');
background-size: cover;
background-repeat: no-repeat;
height: 100vh;
}
.login-form-container{
width: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
position: absolute;
/* background: url('login.jpg'); */
background-size: cover;
background-repeat: no-repeat;
top: 50%;
transform: translate(0%,-50%);
}
.login-form{
padding: 10px;
border: 1px solid rgba(0,0,0,0.2);
border-radius: 5px;
background: rgba(0,0,0,0.1);
min-width: 270px;
}
.img-container{
}
.max-width-350{
max-width: 500px;
margin: 10px 0px !important;
}
.width-110{
width: 100px;
display: flex;
justify-content: center;
}
| css |
KATHMANDU: Nepal Badminton Association on Wednesday finalized the names of badminton players for the upcoming 13th South Asian Games (SAG).
A total of ten male and ten female players, out of 17 male and female players each in the close-camp, have been finalized, informed Nabin Bikram Shah, Secretary of the Association.
With this, the players will be trained at a close-training-camp in Pokhara, he informed.
The badminton competition will be held at a multipurpose covered hall in Pokhara stadium during the SAG games scheduled for December 1 to 10 in Kathmandu and Pokhara.
The selected male players include Dipesh Dhami, Ratnajit Tamang, Praphul Maharjan, Prince Dahal, Sajan Krishna Tamrakar, Nabin Shrestha, Sunil Joshi, Bushnu Katuwal, Bikash Shrestha, and Jiwan Acharya.
Likewise, female players include Jeshika Gurung, Rashila Maharjan, Nangshal Tamang, Puja Shrestha, Sima Rajbansi, Amita Giri, Anumaya Rai, Nita Lamsal, Shova Gauchan and Sita Rai. | english |
{
"ultrawarm": true,
"natural": false,
"coordinate_scale": 2.03,
"has_skylight": false,
"has_ceiling": true,
"ambient_light": 0.92,
"fixed_time": 5822,
"piglin_safe": true,
"bed_works": false,
"respawn_anchor_works": true,
"has_raids": false,
"logical_height": 182,
"infiniburn": "minecraft:standing_signs",
"effects": "minecraft:the_nether"
} | json |
<reponame>kolinz/node-red-recipe<filename>discoverysearchui/sample-docs.json<gh_stars>1-10
[
{
"title": "Code and Response Day Online #1",
"url": "https://bmxug.connpass.com/event/171668/",
"text": "Call for Codeの説明会と、マスクの店舗別在庫情報を地図に表示するWebアプリの作り方を解説します。",
"date": "2020-04-10"
},
{
"title": "Code and Response Day Online #2",
"url": "https://bmxug.connpass.com/event/174576/",
"text": "Call for Codeの説明会と、IBM Watson IoT 仮想センサーの計測値をデータベースに記録する仕組みについてのハンズオンを実施。",
"date": "2020-05-22"
},
{
"title": "水曜ワトソンカフェvol.26「TensorflowとWatson MLによる画像分類アプリ」",
"url": "https://bmxug.connpass.com/event/179594/",
"text": "TensorflowとWatson MLによる画像分類アプリ作りについて解説します。",
"date": "2020-07-08"
},
{
"title": "IBM CloudとARでセンサデータを可視化してみよう",
"url": "https://bmxug.connpass.com/event/185059/",
"text": "検証用の仮想センサーの計測値を可視化するARコンテンツを作成します。ARの表示には、スマートフォンを使用します。",
"date": "2020-08-28"
},
{
"title": "BMXUG Online 初めてのIBM Maximo Visual Inspection",
"url": "https://bmxug.connpass.com/event/199419/",
"text": "2021年12月1日にIBM Watson Visual Recognition (VR)のサービス終了にあたり、移行先となり得る「IBM Maximo Visual Inspection」についての説明会を開催します。今までパートナー向け説明会はありましたが、今回のような説明会の機会は少ないかと思います。ご参加お待ちしております。",
"date": "2021-01-26"
},
{
"title": "IBM Champions Garage #1 Clubhouseで「クラウド学習」をネタにトーク",
"url": "https://bmxug.connpass.com/event/204175/",
"text": "クラウドを中心に、IBM Cloud含め、無料のクラウド使って、クラウドやAIの勉強を行う方法や経験をトークしあったり、IBM Cloud Blogの記事についてご紹介したり、実験的イベントとしてゆるめに実施します。",
"date": "2021-02-12"
}
] | json |
const URL = "http://localhost:80";
const path = window.location.pathname;
| javascript |
<filename>spec/unit_tests/fixtures/files/installed_plugins.json
{"plugins":[{"active":true,"backupVersion":null,"bundled":true,"deleted":false,"dependencies":[],"downgradable":false,"enabled":true,"hasUpdate":false,"longName":"Jenkins Mailer Plugin","pinned":false,"shortName":"mailer","supportsDynamicLoad":"MAYBE","url":"http://wiki.jenkins-ci.org/display/JENKINS/Mailer","version":"1.5"},{"active":false,"backupVersion":null,"bundled":true,"deleted":false,"dependencies":[],"downgradable":false,"enabled":false,"hasUpdate":false,"longName":"External Monitor Job Type Plugin","pinned":false,"shortName":"external-monitor-job","supportsDynamicLoad":"MAYBE","url":"https://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs","version":"1.1"},{"active":true,"backupVersion":"1.2","bundled":true,"deleted":false,"dependencies":[{}],"downgradable":true,"enabled":false,"hasUpdate":false,"longName":"LDAP Plugin","pinned":true,"shortName":"ldap","supportsDynamicLoad":"MAYBE","url":"http://wiki.jenkins-ci.org/display/JENKINS/LDAP+Plugin","version":"1.5"},{"active":true,"backupVersion":"1.1","bundled":true,"deleted":false,"dependencies":[{}],"downgradable":true,"enabled":true,"hasUpdate":false,"longName":"PAM Authentication plugin","pinned":true,"shortName":"pam-auth","supportsDynamicLoad":"MAYBE","url":"http://wiki.jenkins-ci.org/display/JENKINS/PAM+Authentication+Plugin","version":"1.1"},{"active":false,"backupVersion":null,"bundled":true,"deleted":false,"dependencies":[],"downgradable":false,"enabled":false,"hasUpdate":false,"longName":"Ant Plugin","pinned":false,"shortName":"ant","supportsDynamicLoad":"MAYBE","url":"http://wiki.jenkins-ci.org/display/JENKINS/Ant+Plugin","version":"1.2"},{"active":true,"backupVersion":null,"bundled":true,"deleted":false,"dependencies":[{},{},{},{}],"downgradable":false,"enabled":true,"hasUpdate":false,"longName":"Javadoc Plugin","pinned":false,"shortName":"javadoc","supportsDynamicLoad":"MAYBE","url":"http://wiki.jenkins-ci.org/display/JENKINS/Javadoc+Plugin","version":"1.1"},{"active":true,"backupVersion":null,"bundled":true,"deleted":false,"dependencies":[{},{},{},{},{},{}],"downgradable":false,"enabled":true,"hasUpdate":false,"longName":"Jenkins Translation Assistance plugin","pinned":false,"shortName":"translation","supportsDynamicLoad":"MAYBE","url":"http://wiki.jenkins-ci.org/display/JENKINS/Translation+Assistance+Plugin","version":"1.10"},{"active":true,"backupVersion":null,"bundled":false,"deleted":false,"dependencies":[{}],"downgradable":false,"enabled":false,"hasUpdate":false,"longName":"SMS Notification","pinned":false,"shortName":"sms","supportsDynamicLoad":"MAYBE","url":"https://wiki.jenkins-ci.org/display/JENKINS/SMS+Notification","version":"1.1"},{"active":true,"backupVersion":null,"bundled":true,"deleted":false,"dependencies":[{},{}],"downgradable":false,"enabled":true,"hasUpdate":false,"longName":"Maven Integration plugin","pinned":false,"shortName":"maven-plugin","supportsDynamicLoad":"MAYBE","url":"http://wiki.jenkins-ci.org/display/JENKINS/Maven+2+Project+Plugin","version":"1.520"},{"active":false,"backupVersion":null,"bundled":true,"deleted":false,"dependencies":[],"downgradable":false,"enabled":false,"hasUpdate":false,"longName":"Credentials Plugin","pinned":false,"shortName":"credentials","supportsDynamicLoad":"MAYBE","url":"http://wiki.jenkins-ci.org/display/JENKINS/Credentials+Plugin","version":"1.4"},{"active":true,"backupVersion":null,"bundled":true,"deleted":false,"dependencies":[{},{},{},{},{},{},{}],"downgradable":false,"enabled":true,"hasUpdate":false,"longName":"SSH Credentials Plugin","pinned":false,"shortName":"ssh-credentials","supportsDynamicLoad":"MAYBE","url":"http://wiki.jenkins-ci.org/display/JENKINS/SSH+Credentials+Plugin","version":"0.3"},{"active":true,"backupVersion":"0.25","bundled":true,"deleted":false,"dependencies":[{},{},{},{},{}],"downgradable":true,"enabled":true,"hasUpdate":false,"longName":"Jenkins SSH Slaves plugin","pinned":true,"shortName":"ssh-slaves","supportsDynamicLoad":"MAYBE","url":"http://wiki.jenkins-ci.org/display/JENKINS/SSH+Slaves+plugin","version":"0.27"},{"active":true,"backupVersion":"2.8","bundled":true,"deleted":false,"dependencies":[{},{},{},{}],"downgradable":true,"enabled":true,"hasUpdate":false,"longName":"Jenkins CVS Plug-in","pinned":true,"shortName":"cvs","supportsDynamicLoad":"MAYBE","url":"http://wiki.jenkins-ci.org/display/JENKINS/CVS+Plugin","version":"2.9"},{"active":true,"backupVersion":"1.45","bundled":true,"deleted":false,"dependencies":[{},{},{},{}],"downgradable":true,"enabled":true,"hasUpdate":false,"longName":"Jenkins Subversion Plug-in","pinned":true,"shortName":"subversion","supportsDynamicLoad":"MAYBE","url":"http://wiki.jenkins-ci.org/display/JENKINS/Subversion+Plugin","version":"1.50"}]}
| json |
Chief of Army Staff Gen MM Naravane on Saturday did not rule out the possibility of Afghan-origin foreign terrorists attempting to infiltrate into Jammu and Kashmir once the situation stabilises in Afghanistan as he cited similar instances when the Taliban was in power in Kabul over two decades ago.
At the same time, he said Indian armed forces are prepared to deal with any eventuality as they have a very strong counter-infiltration grid as well as a mechanism to check terrorist activities in the hinterland in Jammu and Kashmir.
Asked at the India Today conclave whether there was any link between the spate of recent killings of civilians in Kashmir and the Taliban’s capture of power in Afghanistan, Gen Naravane said it cannot be said whether there was a connection.
“Definitely, there has been a spurt in activities (in Jammu and Kashmir) but whether they can be directly linked to what is happening in or happened in Afghanistan, we really cannot say,” the Army Chief said.
“But what we can say and learn from the past is that when the previous Taliban regime was in power, that time definitely we had foreign terrorists of Afghan origin in Jammu and Kashmir,” he said.
“So there are reasons to believe that the same thing might happen once again that once the situation in Afghanistan stabilises, then we could see an inflow of these fighters from Afghanistan to the Jammu and Kashmir,” he added.
The Chief of Army Staff said the Indian armed forces are fully ready to deal with any such attempts.
“We are prepared for any such eventuality. We have a very strong counter-infiltration grid to stop them at the border. We have a very strong counter-terrorism grid in the hinterland to take care of any such actions. Just as we dealt with them in the early 2000s, we will deal with them now also should they venture anywhere near us,” he said.
There have been increasing concerns in the Indian security establishment over the possibility of terror spillover from Afghanistan into Jammu and Kashmir through Pakistan and rise in terrorist activities, particularly by groups such as Lashkar-e-Taiba and Jaish-e-Mohammed following the Taliban wresting power in Kabul.
On the targeted killings in Jammu and Kashmir, the Army Chief said this is a matter of “concern” and described it as “reprehensible”.
“They do not want normalcy. It is a last-ditch attempt to stay relevant,” he said referring to militant groups.
“The people will revolt. If they (militants) say that they are doing all these for the people, then why you are killing your own people who are your support base. It is just an attempt to spread terror which is totally unacceptable,” Gen Naravane said.
About the ceasefire agreement between India and Pakistan, Gen Naravane said it was observed in “totality” for four months from February.
“But from the end of July onwards to September and now the beginning of October, the sporadic incidents have again started. I think again, it is following the pattern of 2003 when it would start with one odd incident and rising to as good as not having a ceasefire,” he said.
“Over the last month or so, we are again seeing renewed attempts at infiltration. We have eliminated two or three such infiltration attempts,” he added.
In a sudden and significant move aimed at reducing tensions, the Indian and Pakistani armies on February 25 announced that they would cease firing across the LoC while recommitting themselves to a 2003 ceasefire agreement.
“Apart from the infiltration bids, there have been three incidents of proper ceasefire violations that is one post firing at the other post,” he said. | english |
New Delhi : Policenama Online – The protest against the Citizenship Amendment Act (CAA) and the National Register of Citizens (NRC) has been going on for the past one and a half months. Bharat Bandh has been announced by the Bahujan Kranti Morcha against CAA, NRC on Wednesday. This bandh called by the Kranti Morcha has also been supported by many Dalit organizations. At the same time, women sitting on a dharna in Shaheen Bagh, Delhi for the last forty days will protest against Jantar Mantar.
The women will also address the people gathered at Jantar Mantar. Let us know that many organizations have called off India against CAA so far. The opposition is also attacking the central government over CAA. At the same time, the Central Government has already said that it will not back an inch on its decision. | english |
<reponame>LeeGodSRC/ImanityFramework
/*
* MIT License
*
* Copyright (c) 2021 Imanity
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.imanity.framework.libraries;
import com.google.common.io.ByteStreams;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Base64;
public enum LibraryRepository {
MAVEN_CENTRAL("https://repo1.maven.org/maven2/");
private final String url;
LibraryRepository(String url) {
this.url = url;
}
protected URLConnection openConnection(Library library) throws IOException {
URL url = new URL(this.url + library.getMavenRepoPath());
return url.openConnection();
}
public byte[] downloadRaw(Library dependency) throws LibraryDownloadException {
try {
URLConnection connection = openConnection(dependency);
try (InputStream in = connection.getInputStream()) {
byte[] bytes = ByteStreams.toByteArray(in);
if (bytes.length == 0) {
throw new LibraryDownloadException("Empty stream");
}
return bytes;
}
} catch (Exception e) {
throw new LibraryDownloadException(e);
}
}
public byte[] download(Library dependency) throws LibraryDownloadException {
byte[] bytes = downloadRaw(dependency);
// compute a hash for the downloaded file
byte[] hash = Library.createDigest().digest(bytes);
// ensure the hash matches the expected checksum
if (!dependency.checksumMatches(hash)) {
throw new LibraryDownloadException("Downloaded file had an invalid hash. " +
"Expected: " + Base64.getEncoder().encodeToString(dependency.getChecksum()) + " " +
"Actual: " + Base64.getEncoder().encodeToString(hash));
}
return bytes;
}
public void download(Library dependency, Path file) throws LibraryDownloadException {
try {
Files.write(file, download(dependency));
} catch (IOException e) {
throw new LibraryDownloadException(e);
}
}
}
| java |
<!--poolButtonErstellen.html-->
{{range .Pools}}
<div id="{{.Name}}" style="float:left;"class="poolminidivs">
<button name="{{.Name}}" style="width: 100px; height: 100%">{{.Name}}</button>
<p>Bilder: {{.Eigenschaften.Anzahl}} </p>
{{if .GenBilder}}
<p>{{.Eigenschaften.KachelGroesse}}x{{.Eigenschaften.KachelGroesse}}px</p>
<p>Helligkeit: {{.Eigenschaften.Helligkeit}}</p>
<p>{{if .Eigenschaften.Farbverlauf}} Farbverlauf {{else}} Einfarbig {{end}}</p>
{{else}}
<p>{{.Eigenschaften.KachelGroesse}}x{{.Eigenschaften.KachelGroesse}}px</p>
{{end}}
<p>
RGB-Werte: Gelb
Hellligkeit: Weiß
<img id="aktiveBildHistorgramm" name="{{.Name}}" style="width :200px; height:150px" src="/gridGetImage?dbName=HA15DB_Christian_Schulz_570249&gridfsName=bilder&fileName={{.Eigenschaften.HistoBild}}&zahl={{.Zufall}}"/>
</p>
<button name="delete{{.Name}}" style="width: 100px; height: 100%">delete</button>
</div>
{{end}}
| html |
<gh_stars>1-10
# MIPS Assembler C
> A MIPS assembler written in C that supports the core arithmetic instructions, assembly directives, and psuedo instructions.
[](http://badges.mit-license.org)
---
## Installation
### Prerequisites
- C / C++ Compiler (Developed and tested using GCC 5.4, Clang / Clang++, and MSVC)
- GNU Make Utility (Linux / MacOS)
- Visual Studio (Windows)
### Clone
- Clone this repo to your local machine using `https://github.com/tstword/MIPSAssemblerC`
### Setup
#### Ubuntu
```shell
$ sudo apt-get install gcc make
```
#### MacOS
```shell
$ xcode-select --install
```
#### Windows
- Since there is no convenient way to get a C compiler on Windows, we will default to using a C++ compiler.
- Fear not, the assembler was written to be compatible with Microsoft's MSVC compiler shipped with Visual Studio.
<a href="https://visualstudio.microsoft.com/">Download Visual Studio</a>.
## Compilation
### Linux / Mac OS
- Change into the directory containing the source code
```shell
$ cd MIPSAssembler
```
- Compile using the Make Utility
```shell
$ make
```
### Windows
1. Open Visual Studio and create an Empty Project (C++)
2. Import the source files into the 'Source Files' folder in the project
3. Change project properties to add the include path containing the header files
4. Build project for target platform (x86/x64)
---
## Usage
### Provided main program
- Typical usage
```shell
$ bin/assembler program.asm -o program.obj
```
- Dump text segment (binary format)
```shell
$ bin/assembler -a program.asm -t text.dump
```
- Dump data segment (binary format)
```shell
$ bin/assembler -a program.asm -d text.dump
```
- Usage statement
```
$ bin/assembler -h
Usage: bin/assembler [-a] [-h] [-t output] [-d output] [-o output] file...
A MIPS assembler written in C
The following options may be used:
-a Only assembles program, does not create object code file
* Note: This does not disable segment dumps
-d <output> Stores data segment in <output>
-h Displays this message
-t <output> Stores text segment in <output>
-o <output> Stores object code in <output>
* Note: If this option is not specified, <output> defaults to a.obj
Refer to the repository at <https://github.com/tstword/MIPSAssemblerC>
```
### Using source code
Should you decide to use the assembler in your own main program, here is an example
```C
#include <stdio.h>
#include <stdlib.h>
#include "assembler.h"
int main(int argc, char *argv[]) {
const char *program_files[] = {"program1.asm", "program2.asm"};
struct assembler *assembler = create_assembler();
/* Execute and check to see if the assembler failed to parse the files */
if(execute_assembler(assembler, program_files, 2) != ASSEMBLER_STATUS_OK) {
fprintf(stderr, "Failed to assembler program\n");
return EXIT_FAILURE;
}
/**
* The binary data for the segments are referenced by: assembler->segment_memory[SEGMENT]
* The number of bytes stored is indicated by: assembler->segment_memory_offset[SEGMENT]
* where SEGMENT equals: SEGMENT_TEXT, SEGMENT_DATA, SEGMENT_KTEXT, or SEGMENT_KDATA
*
* Example: Dumping the data segment
**/
printf("Dumping data segment...");
for(int i = 0; i < assembler->segment_memory_offset[SEGMENT_DATA]; i++) {
/* If offset is a multiple of 4, print address */
if((i & (0x3)) == 0) printf("\n0x%08X ", i);
/* Print the byte located at the offset */
printf("\\%02X ", *((unsigned char *)assembler->segment_memory[SEGMENT_DATA] + i));
}
printf("\nFinished!\n");
/* Free up the memory used by the assembler */
destroy_assembler(&assembler);
return EXIT_SUCCESS;
}
```
---
## Features
### Custom object files
If the program has been successfully assembled, the assembler will produce a custom object file using the structures defined in the file mipsfhdr.h:
```C
struct MIPS_file_header {
uint8_t m_magic[4];
uint8_t m_endianness;
uint8_t m_version;
uint8_t m_shnum;
uint8_t m_padding[1];
};
struct MIPS_sect_header {
uint8_t sh_segment;
uint8_t sh_padding[3];
uint32_t sh_offset;
uint32_t sh_size;
};
```
Each object file created by the assembler contains a file header that is 8 bytes long
Field | Meaning | Value
------------ | ------------- | ------------
m_magic | Magic number | "MIPS"
m_endianness | Indicates endianness of system | 0x01 (little-endian)<br />0x02 (big-endian)
m_version | Version the object file was assembled in | 0x01
m_shnum | The number of section headers in the file | Situational
m_padding | Unused data for padding | 0x00
Following the file header is the section header of the first segment. Each section header is 12 bytes long
Field | Meaning | Value
------------ | ------------- | ------------
sh_section | The ID of the segment | 0x00 (.text)<br />0x01 (.data)<br />0x02 (.ktext)<br />0x03 (.kdata)
sh_padding | Unused data for padding | 0x00
sh_offset | The file offset in bytes where the header starts | Situational
sh_size | The number of bytes in the segment | Situational
Following the section header are the bytes of the segment itself indicated by sh_section. The next section header (if it exists) can be located using sh_size.
### Support for the core arithmetic instruction set
Core Instruction | Description
---------------- | -----------
add $d, $s, $t | Addition
addi $t, $s, imm | Addition with 16-bit sign-extended immediate
addiu $t, $s, imm | Unsigned addition with 16-bit sign-extended immediate
addu $d, $s, $t | Unsigned addition
and $d, $s, $t | Logical AND
andi $t, $s, imm | Logical AND with 16-bit immediate
beq $s, $t, label | Branch on equal
bgez $s, $t, label | Branch on greater than or equal to zero
bgezal $s, $t, label | Branch on greater than or equal to zero and link
bgtz $s, $t, label | Branch on greater than zero
blez $s, $t, label | Branch on less than or equal
bltz $s, $t, label | Branch on less than zero
bltzal $s, $t, label | Branch on less than zero and link
bne $s, $t, label | Branch on not equal
div $s, $t | Division
divu $s, $t | Unsigned division
j label | Jump
jal label | Jump and link
jr $s | Jump register
lb $t, imm($s) | Load byte
lbu $t, imm($s) | Load byte unsigned
lh $t, imm($s) | Load half-word
lhu $t, imm($s) | Load half-word unsigned
lui $t, imm | Load upper immediate
lw $t, imm($s) | Load word
mfhi $d | Move from HI
mflo $d | Move from LO
mult $s, $t | Multiplication
multu $s, $t | Unsigned multiplication
or $d, $s, $t | Logical OR
ori $t, $s, imm | Logical OR with 16-bit immediate
sb $t, imm($s) | Store byte
sh $t, imm($s) | Store half-word
sll $d, $t, shamt | Shift left logical
slt $d, $s, $t | Set less than
slti $t, $s, imm | Set less than with 16-bit sign-extended immediate
sltiu $t, $s, imm | Set less than unsigned with 16-bit sign-extended immediate
sltu $d, $s, $t | Set less than unsigned
sra $d, $t, shamt | Shift right arithmetic
srl $d, $t, shamt | Shift right logical
sub $d, $s, $t | Subtraction
subu $d, $s, $t | Unsigned subtraction
sw $t, imm($s) | Store word
syscall | System call
xor $d, $s, $t | Logical XOR
xori $t, $s, imm | Logical XOR with 16-bit immediate
### Support for assembly directives
Directive | Description
------------ | -------------
.ascii "\<string\>", ... | Creates non-null terminated strings in the .data segment
.asciiz "\<string\>", ... | Creates null terminated strings in the .data segment
.align \<n\> | Aligns the current segment offset to 2^\<n\><br>If \<n\> = 0, automatic alignment is disabled until next .data directive
.byte \<byte\>, ... | Creates bytes in the .data segment
.data | Changes the segment to DATA
.half \<half\>, ... | Creates half-words in the .data segment
.include "\<file\>" | Opens the file with the name \<file\> and assembles the file
.kdata | Changes the segment to KDATA
.ktext | Changes the segment to KTEXT
.space \<n\> | Creates \<n\> bytes of unitialized space (value defaults to 0)
.text | Changes the segment to TEXT
.word \<word\>, ... | Creates words in the .text or .data segment
### Support for psuedo instructions
Psuedo Instruction | Description
------------------ | -----------
abs $d, $s | Stores the absolute value of $s into $d
addi $t, $s, imm32 | Addition with 32-bit immediate
addiu $t, $s, imm32 | Unsigned addition with 32-bit immediate
andi $t, $s, imm32 | Logical AND with 32-bit immediate
b label | Branch to label
beq $s, imm, label | Branch on equal with 16-bit immediate
beqz $s, label | Branch on equal to zero
bge $s, $t, label | Branch on greater than or equal to
bge $s, imm, label | Branch on greater than or equal to with 16-bit immediate
bgeu $s, $t, label | Branch on greater than or equal to unsigned
bgeu $s, imm, label | Branch on greater than or equal to unsigned with 16-bit immediate
bgt $s, $t, label | Branch on greater than
bgt $s, imm, label | Branch on greater than with 16-bit immediate
bgtu $s, $t, label | Branch on greater than unsigned
bgtu $s, imm, label | Branch on greater than unsigned with 16-bit immediate
ble $s, $t, label | Branch on less than or equal
ble $s, imm, label | Branch on less than or equal with 16-bit immediate
bleu $s, $t, label | Branch on less than or equal to unsigned
bleu $s, imm, label | Branch on less than or equal to unsigned with 16-bit immediate
blt $s, $t, label | Branch on less than
blt $s, imm, label | Branch on less than with 16-bit immediate
bltu $s, $t, label | Branch on less than unsigned
bltu $s, imm, label | Branch on less than unsigned with 16-bit immediate
bne $t, imm, label | Branch on not equal with 16-bit immediate
bnez $t, label | Branch on not equal to zero
la $t, label | Loads the address of the label into register $t
lb $t, label | Load byte stored at the label
lbu $t, label | Load unsigned byte stored at the label
lh $t, label | Load half-word stored at the label
lhu $t, label | Load half-word unsigned stored at the label
li $t, imm32 | Loads 32-bit immediate into register $t
lw $t, label | Load word stored at the label
move $t, $s | Moves contents of register $s to register $t
neg $d, $s | Stores the negated value of $s into $d
not $d, $s | Logical not
ori $t, $s, imm32 | Logical OR with 32-bit immediate
rol $t, $s, imm | Rotates the contents of $s to the left by the amount specified by imm
ror $t, $s, imm | Rotates the contents of $s to the right by the amount specified by imm
sb $t, label | Store byte at the label
sgt $d, $s, $t | Set greater than
sh $t, label | Store half-word at the label
slti $t, $s, imm32 | Set less than with 32-bit immediate
sltiu $t, $s, imm32 | Set less than unsigned with 32-bit immediate
sne $d, $s, $t | Set not equal
sw $t, label | Store word at the label
xori $t, $s, imm32 | Logical XOR with 32-bit immediate
---
## License
[](http://badges.mit-license.org)
- **[MIT license](http://opensource.org/licenses/mit-license.php)**
- Copyright 2019 © <NAME>
| markdown |
#include "skip_days.h"
#include "date.h"
#include "constants.h"
#include "scaling.h"
#include "parallel.h"
ds_key_t skipDays(int nTable, ds_key_t *pRemainder) {
static date_t BaseDate;
ds_key_t jDate;
ds_key_t kRowCount, kFirstRow, kDayCount, index = 1;
if (!InitConstants::skipDays_init) {
strtodt(&BaseDate, DATA_START_DATE);
InitConstants::skipDays_init = 1;
*pRemainder = 0;
}
// set initial conditions
jDate = BaseDate.julian;
*pRemainder = dateScaling(nTable, jDate) + index;
// now check to see if we need to move to the
// the next piece of a parallel build
// move forward one day at a time
split_work(nTable, &kFirstRow, &kRowCount);
while (index < kFirstRow) {
kDayCount = dateScaling(nTable, jDate);
index += kDayCount;
jDate += 1;
*pRemainder = index;
}
if (index > kFirstRow) {
jDate -= 1;
}
return (jDate);
}
| cpp |
from conftest import DeSECAPIV1Client, NSLordClient, random_domainname
def test_create(api_user: DeSECAPIV1Client):
assert len(api_user.domain_list()) == 0
assert api_user.domain_create(random_domainname()).status_code == 201
assert len(api_user.domain_list()) == 1
def test_get(api_user_domain: DeSECAPIV1Client):
domain = api_user_domain.get(f"/domains/{api_user_domain.domain}/").json()
assert NSLordClient.query(api_user_domain.domain, 'CDS')[1] == set(domain['keys'][0]['ds'])
assert domain['name'] == api_user_domain.domain
def test_destroy(api_user_domain: DeSECAPIV1Client):
n = len(api_user_domain.domain_list())
assert api_user_domain.domain_destroy(api_user_domain.domain).status_code == 204
assert len(api_user_domain.domain_list()) == n - 1
| python |
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs, select, date } from '@storybook/addon-knobs';
import { action } from '@storybook/addon-actions';
import { Calendar } from './Calendar';
const TODAY = new Date();
const YESTERDAY = new Date(+TODAY - 24 * 60 * 60 * 1000);
const TOMORROW = new Date(+TODAY + 24 * 60 * 60 * 1000);
const MONTHS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
const YEARS = [2016, 2017, 2018, 2019];
/**
* custom date knob that returns Date() object
*
* @returns {Date}
*/
function dateKnob(...args: any) {
return new Date(date(...args));
}
storiesOf('Components | Calendar', module)
.addDecorator(withKnobs)
.add(
'Basic',
() => (
<Calendar
assignedMonth={select('assignedMonth', MONTHS, 1)}
assignedYear={select('assignedYear', YEARS, 2018)}
selectedDateRange={{
from: dateKnob('availableDate.from', YESTERDAY),
to: dateKnob('availableDate.to', TOMORROW),
}}
onDateSelect={action('onDateSelect')}
/>
),
{ info: '' },
);
| typescript |
<filename>lib/plugin/joi-validator/index.js<gh_stars>1-10
/**
* Created by anzer on 2016/12/19.
*/
let Loader = require('../../loader.js');
let path = require('path');
let Joi = require('joi');
let ChineseLanguage = require('./language/zh-cn.js');
module.exports = class JoiValidatorPlugin {
static getName() {
return 'JoiValidator';
}
init(app, options = {}) {
this.code = options.code || -400;
let VALIDATOR_PATH = this.VALIDATOR_PATH = options.VALIDATOR_PATH || path.join(app.APP_PATH, 'validator');
let loader = this.loader = new Loader(app).load({
root: VALIDATOR_PATH,
resolve(item){
return item(Joi);
}
});
let self = this;
app.beforeHook(function (ctx) {
let Validator = loader.get(ctx.pathKey);
ctx.validated = {};
if (Validator) {
let schemaList = Validator[ctx.methodName];
try {
if (schemaList) {
if (schemaList.query) {
ctx.validated.query = self.validate(ctx.request.query, schemaList.query);
}
if (schemaList.body) {
ctx.validated.body = self.validate(ctx.request.body, schemaList.body);
}
if (schemaList.params) {
ctx.validated.params = self.validate(ctx.params, schemaList.params);
}
if (schemaList.header) {
ctx.validated.header = self.validate(ctx.request.header, schemaList.header, true);
}
}
} catch (e) {
ctx.body = {
code: self.code,
message: e.message
};
ctx.preventNext();
}
}
}, 'joi-validator')
}
validate(obj, schema, allowUnknown = false) {
let ret = Joi.validate(obj, schema, {
language: ChineseLanguage,
allowUnknown
});
if (ret.error) {
let message = "Validate Error";
if (ret.error && ret.error.details && ret.error.details.length) {
message = ret.error.details[0].message || message;
}
throw new Error(message);
}
return ret.value;
}
}; | javascript |
<filename>Course Experiment/Interface Technology Course Exp/Final/Python/main.py
import random
import sys
from time import sleep
import serial
import threading
from PySide2.QtCore import QTimer, SIGNAL, QObject, QEvent
from PySide2.QtGui import QPainter, QColor, QPen, QCloseEvent
from PySide2.QtWidgets import QMainWindow, QApplication, QWidget, QLabel
from ui_mainwindow import Ui_MainWindow
class MainWindow(QMainWindow):
tempList = []
curTemp = 0
curPower = 0
curGear = 0
curDoorWindowState = 0
run = True
timer = QTimer()
ser = serial.Serial()
def __init__(self):
QMainWindow.__init__(self)
self.ser.port = sys.argv[1]
self.ser.baudrate = 115200
self.ser.timeout = 0.5
self.ser.write_timeout = 0.5
self.ser.open()
if not self.ser.is_open:
sys.exit(-1)
self.setWindowTitle("Interface Technology")
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
self.ui.curve.installEventFilter(self)
self.timer.start(1000)
self.connect(self.timer, SIGNAL("timeout()"), self.refresh)
self.connect(self.timer, SIGNAL("timeout()"), self.update)
self.ui.setTemp.valueChanged.connect(self.onSetTempChanged)
self.ui.setWind.valueChanged.connect(self.onSetWindChanged)
self.ui.checkBox_1.clicked.connect(self.onCheckBoxClicked)
self.ui.checkBox_2.clicked.connect(self.onCheckBoxClicked)
self.ui.checkBox_3.clicked.connect(self.onCheckBoxClicked)
self.ui.checkBox_4.clicked.connect(self.onCheckBoxClicked)
self.ui.checkBox_5.clicked.connect(self.onCheckBoxClicked)
self.ui.checkBox_6.clicked.connect(self.onCheckBoxClicked)
self.tempList = [0 for n in range(0, 61)]
self.ui.power.setText('%.2f W'%self.curPower)
self.ui.gear.setText('%d D'%self.curGear)
#self.send(b'P%d\n' % self.curPower)
#self.send(b'L%d\n' % self.curGear)
thread = threading.Thread(target=self.recv, args=[])
thread.start()
def onSetTempChanged(self, value_as_double):
oldPower = self.curPower
if self.curTemp > value_as_double:
self.curPower = 0
elif self.curTemp < value_as_double:
div = value_as_double - self.curTemp
self.curPower = min(int(div/0.5), 9)
self.ui.power.setText('%.2f W' % self.curPower)
if oldPower != self.curPower:
print("SendPower")
print(b'P%d\n' % self.curPower)
self.send(b'P%d\n' % self.curPower)
def onSetWindChanged(self, value_as_int):
oldGear = self.curGear
self.curGear = max(value_as_int-self.updateDoorWindowState(), 0)
self.ui.gear.setText('%d D' % self.curGear)
if oldGear != self.curGear:
print("SendWind")
print(b'L%d\n' % self.curGear)
self.send(b'L%d\n' % self.curGear)
def eventFilter(self, watched: QObject, event: QEvent) -> bool:
if watched == self.ui.curve and event.type() == QEvent.Paint:
self.drawCurve()
return QWidget.eventFilter(self, watched, event)
def refresh(self):
self.tempList.append(self.curTemp)
if (len(self.tempList) > 61):
self.tempList.pop(0)
def send(self, data):
for item in data:
self.ser.write(item)
print('Send:' + str(item))
sleep(0.2)
def recv(self):
while self.run:
command = self.ser.readline()
if len(command):
if command.startswith(b'T'):
self.curTemp = float(command.decode('ascii')[1:-1])
self.ui.setTemp.emit(SIGNAL('valueChanged'), self.ui.setTemp.value())
# self.onSetTempChanged(self.ui.setTemp.value())
elif command.startswith(b'S'):
self.curDoorWindowState = int(command.decode('ascii')[1:-1])
self.ui.setWind.emit(SIGNAL('valueChanged'), self.ui.setWind.value())
# self.onSetWindChanged(self.ui.setWind.value())
print("Debug:" + command.decode())
#else:
# print("Debug:"+command.decode())
def updateDoorWindowState(self):
self.ui.checkBox_1.setChecked(self.curDoorWindowState & 0x1)
self.ui.checkBox_2.setChecked(self.curDoorWindowState & 0x2)
self.ui.checkBox_3.setChecked(self.curDoorWindowState & 0x4)
self.ui.checkBox_4.setChecked(self.curDoorWindowState & 0x8)
self.ui.checkBox_5.setChecked(self.curDoorWindowState & 0x10)
self.ui.checkBox_6.setChecked(self.curDoorWindowState & 0x20)
rtn = 0
temp = self.curDoorWindowState
for i in range(0, 5):
if temp & 0x1:
if i <= 1:
rtn += 2
else:
rtn += 1
temp = temp >> 1
return rtn
def onCheckBoxClicked(self):
self.updateDoorWindowState()
def drawCurve(self):
painter = QPainter(self.ui.curve)
painter.setPen(QColor(114, 159, 207))
width = self.ui.curve.width()
height = self.ui.curve.height()
for i in range(0, height,25):
painter.drawLine(0, i, width, i)
for i in range(0, width,20):
painter.drawLine(i, 0, i, height)
pen = QPen()
pen.setColor(QColor(114, 159, 207))
pen.setWidth(2);
painter.setPen(pen);
painter.setRenderHint(QPainter.Antialiasing, True)
maxTemp = max(self.tempList)
minTemp = min(self.tempList)
stepTemp = max((maxTemp-minTemp)/10, 0.01)
midTemp = (maxTemp + minTemp) / 2.0
fromTemp = (midTemp - stepTemp * 5.5)
toTemp = (midTemp + stepTemp * 5.5)
gapTemp = 11 * stepTemp
for i in range(0, 60):
painter.drawLine(i*width/60.0,height*((toTemp - self.tempList[i])/gapTemp),(i+1)*width/60.0, height*((toTemp - self.tempList[i+1])/gapTemp))
temp = toTemp
self.ui.tempLabel_1.setText("%.2f" % temp); temp -= stepTemp
self.ui.tempLabel_2.setText("%.2f" % temp); temp -= stepTemp
self.ui.tempLabel_3.setText("%.2f" % temp); temp -= stepTemp
self.ui.tempLabel_4.setText("%.2f" % temp); temp -= stepTemp
self.ui.tempLabel_5.setText("%.2f" % temp); temp -= stepTemp
self.ui.tempLabel_6.setText("%.2f" % temp); temp -= stepTemp
self.ui.tempLabel_7.setText("%.2f" % temp); temp -= stepTemp
self.ui.tempLabel_8.setText("%.2f" % temp); temp -= stepTemp
self.ui.tempLabel_9.setText("%.2f" % temp); temp -= stepTemp
self.ui.tempLabel_10.setText("%.2f" % temp); temp -= stepTemp
self.ui.tempLabel_11.setText("%.2f" % temp)
# for i in range(1,11):
# print("tempLabel_%d" % i)
# qlabel = self.findChild(QLabel, ("tempLabel_%d" % i))
# print(qlabel)
# print(temp)
# qlabel.setText("%.2f"%temp)
# temp -= stepTemp
def closeEvent(self, event:QCloseEvent):
self.run = False
if __name__ == "__main__":
if len(sys.argv) <= 1:
print('Please input the argument!')
sys.exit(-1)
print(sys.argv)
app = QApplication(sys.argv)
window = MainWindow()
window.show()
sys.exit(app.exec_())
| python |
{"jQuery.tagify.min.js":"<KEY>,"react.tagify.js":"<KEY>,"react.tagify.min.js":"<KEY>,"tagify.css":"<KEY>,"tagify.min.css":"<KEY>,"tagify.min.js":"<KEY>,"tagify.polyfills.min.js":"sha5<KEY>} | json |
<reponame>flyliufu/PythonDemo
"""
Django settings for weixin_admin project.
Generated by 'django-admin startproject' using Django 2.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
# 导入模块
import logging
import django.utils.log
import logging.handlers
import os
from weixin_admin.reader import LocalProperties
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'jg*8+)3^2@ettecw7c31rhnqd8i3-70rit8w&n1-a%air80323'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'standard': {
# 日志格式
'format': '%(asctime)s [%(threadName)s:%(thread)d] [%(name)s:%(lineno)d] [%(module)s:%(funcName)s] [%(levelname)s]- %(message)s'
}
},
'filters': {
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler',
'include_html': True,
},
'default': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': BASE_DIR + '/sourceDns/log/all.log', # 日志输出文件
'maxBytes': 1024 * 1024 * 5, # 文件大小
'backupCount': 5, # 备份份数
'formatter': 'standard', # 使用哪种formatters日志格式
},
'error': {
'level': 'ERROR',
'class': 'logging.handlers.RotatingFileHandler',
'filename': BASE_DIR + '/sourceDns/log/error.log',
'maxBytes': 1024 * 1024 * 5,
'backupCount': 5,
'formatter': 'standard',
},
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'standard'
},
'request_handler': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': BASE_DIR + '/sourceDns/log/script.log',
'maxBytes': 1024 * 1024 * 5,
'backupCount': 5,
'formatter': 'standard',
},
'scprits_handler': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': BASE_DIR + '/sourceDns/log/script.log',
'maxBytes': 1024 * 1024 * 5,
'backupCount': 5,
'formatter': 'standard',
}
},
'loggers': {
'django': {
'handlers': ['default', 'console'],
'level': 'ERROR',
'propagate': False
},
'django.request': {
'handlers': ['request_handler'],
'level': 'DEBUG',
'propagate': False,
},
'scripts': {
'handlers': ['scprits_handler'],
'level': 'INFO',
'propagate': False
},
'sourceDns.webdns.views': {
'handlers': ['default', 'error'],
'level': 'DEBUG',
'propagate': True
},
'sourceDns.webdns.util': {
'handlers': ['error'],
'level': 'ERROR',
'propagate': True
}
}
}
INSTALLED_APPS = [
'zeus.apps.ZeusConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'weixin_admin.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
os.path.join(BASE_DIR, 'templates'),
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'weixin_admin.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
pro = LocalProperties()
DATABASES = {
'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE': 'django.db.backends.mysql',
'NAME': pro.get_mysql_db_name(),
'USER': pro.get_mysql_user(),
'PASSWORD': pro.get_mysql_passwd(),
'HOST': pro.get_mysql_host(), # Or an IP Address that your DB is hosted on
'PORT': pro.get_mysql_port(),
}
}
CACHES = {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': '127.0.0.1:6379',
'OPTIONS': {
'DB': 1,
# 'PASSWORD': '<PASSWORD>',
'PARSER_CLASS': 'redis.connection.HiredisParser',
'CONNECTION_POOL_CLASS': 'redis.BlockingConnectionPool',
'PICKLE_VERSION': -1,
},
},
}
# Password validation
# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/2.1/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'Hongkong'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.1/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
os.path.join(BASE_DIR, "zeus/static"),
]
| python |
<filename>front-end/src/profiles/arkatova_katerina_vitaliyivna.json<gh_stars>1-10
{"2010":"","2016":"","Department":"Дзержинський районний суд м. Харкова","Region":"Харківська область","Position":"Суддя Дзержинського районного суду м. Харкова","Name":"<NAME>","Link":"https://drive.google.com/open?id=0BygiyWAl79DMeUNsNnZjQVo4NzA","Note":"У меня","AdditionalNote":"","декларації 2015":"","Youtube":"","ПІБ2":"","Кількість справ":"","Оскаржені":"","Кількість скарг":"7","Кількість дисциплінарних стягнень":"","Клейма":"2","Фото":"","Як живе":"","Декларація доброчесності судді подано у 2016 році (вперше)":"","Декларація родинних зв’язків судді подано у 2016 році":"","key":"arkatova_katerina_vitaliyivna","field8":"","Link 2015":"","field9":"","Декларації 2013":"","Декларації 2014":"","Декларації 2015":"","Декларації 2016":"","type":"judge","analytics":[{"y":2014,"i":251580.59,"fc":1,"ff":90.9,"ffa":1,"fh":160,"fha":1},{"y":2015,"i":239791,"c":1,"k":54.14,"ka":2,"fi":147695,"fh":169,"fha":1,"j":7},{"y":2016,"i":305848,"c":1,"k":54.14,"ka":2,"fi":213648,"fh":169,"fha":1},{"y":2017,"i":343884,"c":1,"k":54.14,"ka":2,"fi":224621,"fh":169,"fha":1,"fl":1613,"fla":2}],"declarationsLinks":[{"id":"vulyk_61_93","year":2014,"url":"http://static.declarations.com.ua/declarations/chosen_ones/mega_batch/arkatova_kateryna_vitaliivna.pdf","provider":"declarations.com.ua.opendata"},{"id":"nacp_05f46293-da2b-4acd-9f98-70207b779656","year":2015,"provider":"declarations.com.ua.opendata"},{"id":"nacp_dc04ddaa-5d3e-42a6-a2bf-3337467d57d7","year":2016,"provider":"declarations.com.ua.opendata"},{"id":"nacp_8ea0ae0a-7e18-4c6e-af9c-7e110d238c4f","year":2017,"provider":"declarations.com.ua.opendata"}]} | json |
<reponame>cquiroz/ocs
package edu.gemini.itc.base;
import edu.gemini.itc.operation.Slit;
/**
* Representation of a disperser element.
* This defines the wavelength range for which the disperser lets light pass and also the dispersion and
* resolution which is used by the slit visitor to calculate the signal and background strength.
* For most dispersers the resolution is defined in nm for a 0.5-arcsec slit and the actual resolution
* for the given slit width is then extrapolated from this value; note that the methods provided here also allow
* to account for the case where the image quality is smaller than the slit; by default it uses the image quality
* instead of the slit width to set the size of the resolution element in that case.
* Some dispersers may need to implement a different behavior for how the resolution and dispersion are calculated
* by overriding these methods, see e.g. the NIRI grisms (which don't use interpolation from the half arcsec slit
* width) or GNIRS (which has to take a camera scale factor and the cross dispersion order into account).
*/
public interface Disperser {
/** Wavelength in [nm] at which this element starts letting light through. */
double getStart();
/** Wavelength in [nm] at which this element stop letting light through. */
double getEnd();
/** Dispersion of this disperser in [nm/pixel]. */
double dispersion();
/** Spectral resolution in nm for a 0.5-arcsec slit.
* This value can be used to extrapolate the resolution for any given slit which is the default
* behavior for most instruments and dispersers. */
double resolutionHalfArcsecSlit();
/** Calculates the size of a spectral resolution element in [nm] for the given slit.
* By default this is done by extrapolating from the 0.5-arcsec resolution. */
default double resolution(final Slit slit) {
return resolutionHalfArcsecSlit() * slit.width() / 0.5;
}
/** Calculates the size of a spectral resolution element in [nm] for the source taking the image quality
* into account. By default if the image quality is smaller than the slit width the image quality is used
* as the slit width. */
default double resolution(final Slit slit, final double imgQuality) {
//if image size is less than the slit width it will determine the resolution
final double width = imgQuality < slit.width() ? imgQuality : slit.width();
return resolutionHalfArcsecSlit() * width / 0.5;
}
}
| java |
Mumbai (Maharashtra) [India], May 4 : Actor Sara Ali Khan recently finished shooting for her upcoming fil 'Ae Watan Mere Watan' and went on vacation to Kashmir with family and friends.
The 'Gaslight' actor took to Instagram and shared a string of snaps where she can be seen enjoying her holidays with her mother and actor Amrita Singh.
In the first photo, Sara is taking a selfie with a pout and the moon in the background. She wore a saffron sweater and a woollen cap. In another picture, she can be seen sitting outdoors and can be seen leng on her friend who stood behind her.
In the next picture, Sara, her friends, and Amrita sat around an indoor fireplace. Sara opted for a saffron sweater and beige pants and kept her hands near the fire. Amrita wore a black outfit as she sat behind her daughter.
In one of the snaps, Sara can be seen relaxing in the swimming pool along with her friend and was busy in a conversation. The actor also posted a solo picture of herself inside the pool.
In the last picture, Sara and her friends posed outdoors for the camera. She was seen in a white jacket, beige pants, a woollen cap, and shoes.
Sitting by the fire enjoying the flame, the haze. Nights are warm, sun-kissed swim in the days. Phones been off this week so time to hear what Sara says. #purnima #fullmoon. "
A post shared by Sara Ali Khan (@saraalikhan95)
Fans reacted to the post and showered love in the comment section.
A fan wrote, "Sara" with a heart emoji, while another user commented, "First like. . . . Sara. "
Meanwhile, Sara will be seen in director Laxman Utekar's next 'Zara Hatke Zara Bach Ke' romantic drama film alongside Vicky Kaushal.
Apart from that, She will be seen in Karan Johar's next 'Ae Watan Mere Watan' in which she will play a brave freedom fighter in a fictional tale set against the backdrop of the Quit India Movement in 1942.
Sara and Vikrant Massey starrer 'Gaslight' is streaming on Disney Plus Hotstar since 31 March. | english |
Lok Sabha MP from Tirunelveli S Gnanathiraviam was served a notice by his party — DMK — on Tuesday in connection with an alleged assault on a Christian priest on Monday.
This comes after a case was registered by the Palayamkottai police, naming Gnanathiraviam and 20 others for assaulting Godfrey Noble, a self-styled bishop.
DMK general secretary and PWD minister S Duraimurugan issued a notice to Gnanathiraviam, demanding an explanation within seven days of receipt of the notice.
Sources in the Diocese said a dispute between two factions within the Tirunelveli diocese of the Church of South India led to the incident.
“We have many schools and colleges and Gnanathiraviam was in charge of a school as a patron. He was recently removed from his post by one faction. The rival faction and a few supporters of the MP challenged the decision and heated arguments led to the assault of a priest,” said a diocese official. | english |
"Chalo Jeete Hain is a very inspiring movie. I am touched by the message of the film," said Mukesh Ambani.
"The film is well made and it's just not about one individual but all of us. We as a society need to come together," Kangana Ranaut told reporters at the event. The Manikarnika: The Queen of Jhansi actor was accompanied by CBFC chief Prasoon Joshi.
Aanand L Rai was also present at the screening of Chalo Jeete Hain.
Chalo Jeete Hain is produced by Mahaveer Jain and Bhushan Kumar. | english |
A seed planted within her womb.
A woman waters her garden.
Life begins to bloom.
As she carries the weight,
That pains her back.
Her petals aren't lost,
They stay intact.
Tears run from her eyes.
Yet in still, birthing life.
The first cries are heard from her.
Loving hands,
First comforters.
Kisses given,
Came from women.
That loved and carried,
A life birthed.
Hands weeding, her seedlings.
A woman waters her garden.
As she carries the weight,
Some garden in a blouse.
Others tend, in slacks.
No matter the hat is worn,
The pain burdens their back.
Tears run from their eyes.
Petals aren't lost, they stay intact.
Like a tree,
As if leaves were blowing,
In the wind.
Yet standing firm, rooted.
As women.
| english |
// Copyright (c) 2017-2020, The rav1e contributors. All rights reserved
//
// This source code is subject to the terms of the BSD 2 Clause License and
// the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
// was not distributed with this source code in the LICENSE file, you can
// obtain it at www.aomedia.org/license/software. If the Alliance for Open
// Media Patent License 1.0 was not distributed with this source code in the
// PATENTS file, you can obtain it at www.aomedia.org/license/patent.
use super::*;
use crate::predict::PredictionMode;
use crate::predict::PredictionMode::*;
use crate::transform::TxType::*;
pub const MAX_TX_SIZE: usize = 64;
pub const MAX_CODED_TX_SIZE: usize = 32;
pub const MAX_CODED_TX_SQUARE: usize = MAX_CODED_TX_SIZE * MAX_CODED_TX_SIZE;
pub const TX_SIZE_SQR_CONTEXTS: usize = 4; // Coded tx_size <= 32x32, so is the # of CDF contexts from tx sizes
pub const TX_SETS: usize = 6;
pub const TX_SETS_INTRA: usize = 3;
pub const TX_SETS_INTER: usize = 4;
pub const INTRA_MODES: usize = 13;
pub const UV_INTRA_MODES: usize = 14;
const MAX_VARTX_DEPTH: usize = 2;
pub const TXFM_PARTITION_CONTEXTS: usize =
(TxSize::TX_SIZES - TxSize::TX_8X8 as usize) * 6 - 3;
// Number of transform types in each set type
pub static num_tx_set: [usize; TX_SETS] = [1, 2, 5, 7, 12, 16];
pub static av1_tx_used: [[usize; TX_TYPES]; TX_SETS] = [
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],
[1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],
[1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
];
// Maps set types above to the indices used for intra
static tx_set_index_intra: [i8; TX_SETS] = [0, -1, 2, 1, -1, -1];
// Maps set types above to the indices used for inter
static tx_set_index_inter: [i8; TX_SETS] = [0, 3, -1, -1, 2, 1];
pub static av1_tx_ind: [[usize; TX_TYPES]; TX_SETS] = [
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1, 3, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1, 5, 6, 4, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0],
[3, 4, 5, 8, 6, 7, 9, 10, 11, 0, 1, 2, 0, 0, 0, 0],
[7, 8, 9, 12, 10, 11, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6],
];
pub static max_txsize_rect_lookup: [TxSize; BlockSize::BLOCK_SIZES_ALL] = [
TX_4X4, // 4x4
TX_4X8, // 4x8
TX_8X4, // 8x4
TX_8X8, // 8x8
TX_8X16, // 8x16
TX_16X8, // 16x8
TX_16X16, // 16x16
TX_16X32, // 16x32
TX_32X16, // 32x16
TX_32X32, // 32x32
TX_32X64, // 32x64
TX_64X32, // 64x32
TX_64X64, // 64x64
TX_64X64, // 64x128
TX_64X64, // 128x64
TX_64X64, // 128x128
TX_4X16, // 4x16
TX_16X4, // 16x4
TX_8X32, // 8x32
TX_32X8, // 32x8
TX_16X64, // 16x64
TX_64X16, // 64x16
];
pub static sub_tx_size_map: [TxSize; TxSize::TX_SIZES_ALL] = [
TX_4X4, // TX_4X4
TX_4X4, // TX_8X8
TX_8X8, // TX_16X16
TX_16X16, // TX_32X32
TX_32X32, // TX_64X64
TX_4X4, // TX_4X8
TX_4X4, // TX_8X4
TX_8X8, // TX_8X16
TX_8X8, // TX_16X8
TX_16X16, // TX_16X32
TX_16X16, // TX_32X16
TX_32X32, // TX_32X64
TX_32X32, // TX_64X32
TX_4X8, // TX_4X16
TX_8X4, // TX_16X4
TX_8X16, // TX_8X32
TX_16X8, // TX_32X8
TX_16X32, // TX_16X64
TX_32X16, // TX_64X16
];
#[inline]
pub fn has_chroma(
bo: TileBlockOffset, bsize: BlockSize, subsampling_x: usize,
subsampling_y: usize, chroma_sampling: ChromaSampling,
) -> bool {
if chroma_sampling == ChromaSampling::Cs400 {
return false;
};
let bw = bsize.width_mi();
let bh = bsize.height_mi();
((bo.0.x & 0x01) == 1 || (bw & 0x01) == 0 || subsampling_x == 0)
&& ((bo.0.y & 0x01) == 1 || (bh & 0x01) == 0 || subsampling_y == 0)
}
pub fn get_tx_set(
tx_size: TxSize, is_inter: bool, use_reduced_set: bool,
) -> TxSet {
let tx_size_sqr_up = tx_size.sqr_up();
let tx_size_sqr = tx_size.sqr();
if tx_size_sqr_up.block_size() > BlockSize::BLOCK_32X32 {
return TxSet::TX_SET_DCTONLY;
}
if is_inter {
if use_reduced_set || tx_size_sqr_up == TxSize::TX_32X32 {
TxSet::TX_SET_INTER_3
} else if tx_size_sqr == TxSize::TX_16X16 {
TxSet::TX_SET_INTER_2
} else {
TxSet::TX_SET_INTER_1
}
} else if tx_size_sqr_up == TxSize::TX_32X32 {
TxSet::TX_SET_DCTONLY
} else if use_reduced_set || tx_size_sqr == TxSize::TX_16X16 {
TxSet::TX_SET_INTRA_2
} else {
TxSet::TX_SET_INTRA_1
}
}
pub fn get_tx_set_index(
tx_size: TxSize, is_inter: bool, use_reduced_set: bool,
) -> i8 {
let set_type = get_tx_set(tx_size, is_inter, use_reduced_set);
if is_inter {
tx_set_index_inter[set_type as usize]
} else {
tx_set_index_intra[set_type as usize]
}
}
static intra_mode_to_tx_type_context: [TxType; INTRA_MODES] = [
DCT_DCT, // DC
ADST_DCT, // V
DCT_ADST, // H
DCT_DCT, // D45
ADST_ADST, // D135
ADST_DCT, // D113
DCT_ADST, // D157
DCT_ADST, // D203
ADST_DCT, // D67
ADST_ADST, // SMOOTH
ADST_DCT, // SMOOTH_V
DCT_ADST, // SMOOTH_H
ADST_ADST, // PAETH
];
static uv2y: [PredictionMode; UV_INTRA_MODES] = [
DC_PRED, // UV_DC_PRED
V_PRED, // UV_V_PRED
H_PRED, // UV_H_PRED
D45_PRED, // UV_D45_PRED
D135_PRED, // UV_D135_PRED
D113_PRED, // UV_D113_PRED
D157_PRED, // UV_D157_PRED
D203_PRED, // UV_D203_PRED
D67_PRED, // UV_D67_PRED
SMOOTH_PRED, // UV_SMOOTH_PRED
SMOOTH_V_PRED, // UV_SMOOTH_V_PRED
SMOOTH_H_PRED, // UV_SMOOTH_H_PRED
PAETH_PRED, // UV_PAETH_PRED
DC_PRED, // CFL_PRED
];
pub fn uv_intra_mode_to_tx_type_context(pred: PredictionMode) -> TxType {
intra_mode_to_tx_type_context[uv2y[pred as usize] as usize]
}
// Level Map
pub const TXB_SKIP_CONTEXTS: usize = 13;
pub const EOB_COEF_CONTEXTS: usize = 9;
const SIG_COEF_CONTEXTS_2D: usize = 26;
const SIG_COEF_CONTEXTS_1D: usize = 16;
pub const SIG_COEF_CONTEXTS_EOB: usize = 4;
pub const SIG_COEF_CONTEXTS: usize =
SIG_COEF_CONTEXTS_2D + SIG_COEF_CONTEXTS_1D;
const COEFF_BASE_CONTEXTS: usize = SIG_COEF_CONTEXTS;
pub const DC_SIGN_CONTEXTS: usize = 3;
const BR_TMP_OFFSET: usize = 12;
const BR_REF_CAT: usize = 4;
pub const LEVEL_CONTEXTS: usize = 21;
pub const NUM_BASE_LEVELS: usize = 2;
pub const BR_CDF_SIZE: usize = 4;
pub const COEFF_BASE_RANGE: usize = 4 * (BR_CDF_SIZE - 1);
pub const COEFF_CONTEXT_BITS: usize = 6;
pub const COEFF_CONTEXT_MASK: usize = (1 << COEFF_CONTEXT_BITS) - 1;
const MAX_BASE_BR_RANGE: usize = COEFF_BASE_RANGE + NUM_BASE_LEVELS + 1;
const BASE_CONTEXT_POSITION_NUM: usize = 12;
// Pad 4 extra columns to remove horizontal availability check.
pub const TX_PAD_HOR_LOG2: usize = 2;
pub const TX_PAD_HOR: usize = 4;
// Pad 6 extra rows (2 on top and 4 on bottom) to remove vertical availability
// check.
pub const TX_PAD_TOP: usize = 2;
pub const TX_PAD_BOTTOM: usize = 4;
pub const TX_PAD_VER: usize = TX_PAD_TOP + TX_PAD_BOTTOM;
// Pad 16 extra bytes to avoid reading overflow in SIMD optimization.
const TX_PAD_END: usize = 16;
pub const TX_PAD_2D: usize = (MAX_CODED_TX_SIZE + TX_PAD_HOR)
* (MAX_CODED_TX_SIZE + TX_PAD_VER)
+ TX_PAD_END;
const TX_CLASSES: usize = 3;
#[derive(Copy, Clone, PartialEq)]
pub enum TxClass {
TX_CLASS_2D = 0,
TX_CLASS_HORIZ = 1,
TX_CLASS_VERT = 2,
}
#[derive(Copy, Clone, PartialEq)]
pub enum SegLvl {
SEG_LVL_ALT_Q = 0, /* Use alternate Quantizer .... */
SEG_LVL_ALT_LF_Y_V = 1, /* Use alternate loop filter value on y plane vertical */
SEG_LVL_ALT_LF_Y_H = 2, /* Use alternate loop filter value on y plane horizontal */
SEG_LVL_ALT_LF_U = 3, /* Use alternate loop filter value on u plane */
SEG_LVL_ALT_LF_V = 4, /* Use alternate loop filter value on v plane */
SEG_LVL_REF_FRAME = 5, /* Optional Segment reference frame */
SEG_LVL_SKIP = 6, /* Optional Segment (0,0) + skip mode */
SEG_LVL_GLOBALMV = 7,
SEG_LVL_MAX = 8,
}
pub const seg_feature_bits: [u32; SegLvl::SEG_LVL_MAX as usize] =
[8, 6, 6, 6, 6, 3, 0, 0];
pub const seg_feature_is_signed: [bool; SegLvl::SEG_LVL_MAX as usize] =
[true, true, true, true, true, false, false, false];
use crate::context::TxClass::*;
pub static tx_type_to_class: [TxClass; TX_TYPES] = [
TX_CLASS_2D, // DCT_DCT
TX_CLASS_2D, // ADST_DCT
TX_CLASS_2D, // DCT_ADST
TX_CLASS_2D, // ADST_ADST
TX_CLASS_2D, // FLIPADST_DCT
TX_CLASS_2D, // DCT_FLIPADST
TX_CLASS_2D, // FLIPADST_FLIPADST
TX_CLASS_2D, // ADST_FLIPADST
TX_CLASS_2D, // FLIPADST_ADST
TX_CLASS_2D, // IDTX
TX_CLASS_VERT, // V_DCT
TX_CLASS_HORIZ, // H_DCT
TX_CLASS_VERT, // V_ADST
TX_CLASS_HORIZ, // H_ADST
TX_CLASS_VERT, // V_FLIPADST
TX_CLASS_HORIZ, // H_FLIPADST
];
pub static eob_to_pos_small: [u8; 33] = [
0, 1, 2, // 0-2
3, 3, // 3-4
4, 4, 4, 4, // 5-8
5, 5, 5, 5, 5, 5, 5, 5, // 9-16
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, // 17-32
];
pub static eob_to_pos_large: [u8; 17] = [
6, // place holder
7, // 33-64
8, 8, // 65-128
9, 9, 9, 9, // 129-256
10, 10, 10, 10, 10, 10, 10, 10, // 257-512
11, // 513-
];
pub static k_eob_group_start: [u16; 12] =
[0, 1, 2, 3, 5, 9, 17, 33, 65, 129, 257, 513];
pub static k_eob_offset_bits: [u16; 12] = [0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
// The ctx offset table when TX is TX_CLASS_2D.
// TX col and row indices are clamped to 4
#[rustfmt::skip]
pub static av1_nz_map_ctx_offset: [[[i8; 5]; 5]; TxSize::TX_SIZES_ALL] = [
// TX_4X4
[
[ 0, 1, 6, 6, 0],
[ 1, 6, 6, 21, 0],
[ 6, 6, 21, 21, 0],
[ 6, 21, 21, 21, 0],
[ 0, 0, 0, 0, 0]
],
// TX_8X8
[
[ 0, 1, 6, 6, 21],
[ 1, 6, 6, 21, 21],
[ 6, 6, 21, 21, 21],
[ 6, 21, 21, 21, 21],
[21, 21, 21, 21, 21]
],
// TX_16X16
[
[ 0, 1, 6, 6, 21],
[ 1, 6, 6, 21, 21],
[ 6, 6, 21, 21, 21],
[ 6, 21, 21, 21, 21],
[21, 21, 21, 21, 21]
],
// TX_32X32
[
[ 0, 1, 6, 6, 21],
[ 1, 6, 6, 21, 21],
[ 6, 6, 21, 21, 21],
[ 6, 21, 21, 21, 21],
[21, 21, 21, 21, 21]
],
// TX_64X64
[
[ 0, 1, 6, 6, 21],
[ 1, 6, 6, 21, 21],
[ 6, 6, 21, 21, 21],
[ 6, 21, 21, 21, 21],
[21, 21, 21, 21, 21]
],
// TX_4X8
[
[ 0, 11, 11, 11, 0],
[11, 11, 11, 11, 0],
[ 6, 6, 21, 21, 0],
[ 6, 21, 21, 21, 0],
[21, 21, 21, 21, 0]
],
// TX_8X4
[
[ 0, 16, 6, 6, 21],
[16, 16, 6, 21, 21],
[16, 16, 21, 21, 21],
[16, 16, 21, 21, 21],
[ 0, 0, 0, 0, 0]
],
// TX_8X16
[
[ 0, 11, 11, 11, 11],
[11, 11, 11, 11, 11],
[ 6, 6, 21, 21, 21],
[ 6, 21, 21, 21, 21],
[21, 21, 21, 21, 21]
],
// TX_16X8
[
[ 0, 16, 6, 6, 21],
[16, 16, 6, 21, 21],
[16, 16, 21, 21, 21],
[16, 16, 21, 21, 21],
[16, 16, 21, 21, 21]
],
// TX_16X32
[
[ 0, 11, 11, 11, 11],
[11, 11, 11, 11, 11],
[ 6, 6, 21, 21, 21],
[ 6, 21, 21, 21, 21],
[21, 21, 21, 21, 21]
],
// TX_32X16
[
[ 0, 16, 6, 6, 21],
[16, 16, 6, 21, 21],
[16, 16, 21, 21, 21],
[16, 16, 21, 21, 21],
[16, 16, 21, 21, 21]
],
// TX_32X64
[
[ 0, 11, 11, 11, 11],
[11, 11, 11, 11, 11],
[ 6, 6, 21, 21, 21],
[ 6, 21, 21, 21, 21],
[21, 21, 21, 21, 21]
],
// TX_64X32
[
[ 0, 16, 6, 6, 21],
[16, 16, 6, 21, 21],
[16, 16, 21, 21, 21],
[16, 16, 21, 21, 21],
[16, 16, 21, 21, 21]
],
// TX_4X16
[
[ 0, 11, 11, 11, 0],
[11, 11, 11, 11, 0],
[ 6, 6, 21, 21, 0],
[ 6, 21, 21, 21, 0],
[21, 21, 21, 21, 0]
],
// TX_16X4
[
[ 0, 16, 6, 6, 21],
[16, 16, 6, 21, 21],
[16, 16, 21, 21, 21],
[16, 16, 21, 21, 21],
[ 0, 0, 0, 0, 0]
],
// TX_8X32
[
[ 0, 11, 11, 11, 11],
[11, 11, 11, 11, 11],
[ 6, 6, 21, 21, 21],
[ 6, 21, 21, 21, 21],
[21, 21, 21, 21, 21]
],
// TX_32X8
[
[ 0, 16, 6, 6, 21],
[16, 16, 6, 21, 21],
[16, 16, 21, 21, 21],
[16, 16, 21, 21, 21],
[16, 16, 21, 21, 21]
],
// TX_16X64
[
[ 0, 11, 11, 11, 11],
[11, 11, 11, 11, 11],
[ 6, 6, 21, 21, 21],
[ 6, 21, 21, 21, 21],
[21, 21, 21, 21, 21]
],
// TX_64X16
[
[ 0, 16, 6, 6, 21],
[16, 16, 6, 21, 21],
[16, 16, 21, 21, 21],
[16, 16, 21, 21, 21],
[16, 16, 21, 21, 21]
]
];
const NZ_MAP_CTX_0: usize = SIG_COEF_CONTEXTS_2D;
const NZ_MAP_CTX_5: usize = NZ_MAP_CTX_0 + 5;
const NZ_MAP_CTX_10: usize = NZ_MAP_CTX_0 + 10;
pub static nz_map_ctx_offset_1d: [usize; 32] = [
NZ_MAP_CTX_0,
NZ_MAP_CTX_5,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
NZ_MAP_CTX_10,
];
const CONTEXT_MAG_POSITION_NUM: usize = 3;
static mag_ref_offset_with_txclass: [[[usize; 2]; CONTEXT_MAG_POSITION_NUM];
3] = [
[[0, 1], [1, 0], [1, 1]],
[[0, 1], [1, 0], [0, 2]],
[[0, 1], [1, 0], [2, 0]],
];
// End of Level Map
pub struct TXB_CTX {
pub txb_skip_ctx: usize,
pub dc_sign_ctx: usize,
}
impl<'a> ContextWriter<'a> {
pub fn write_tx_type(
&mut self, w: &mut dyn Writer, tx_size: TxSize, tx_type: TxType,
y_mode: PredictionMode, is_inter: bool, use_reduced_tx_set: bool,
) {
let square_tx_size = tx_size.sqr();
let tx_set = get_tx_set(tx_size, is_inter, use_reduced_tx_set);
let num_tx_types = num_tx_set[tx_set as usize];
if num_tx_types > 1 {
let tx_set_index =
get_tx_set_index(tx_size, is_inter, use_reduced_tx_set);
assert!(tx_set_index > 0);
assert!(av1_tx_used[tx_set as usize][tx_type as usize] != 0);
if is_inter {
symbol_with_update!(
self,
w,
av1_tx_ind[tx_set as usize][tx_type as usize] as u32,
&mut self.fc.inter_tx_cdf[tx_set_index as usize]
[square_tx_size as usize][..num_tx_set[tx_set as usize]]
);
} else {
let intra_dir = y_mode;
// TODO: Once use_filter_intra is enabled,
// intra_dir =
// fimode_to_intradir[mbmi->filter_intra_mode_info.filter_intra_mode];
symbol_with_update!(
self,
w,
av1_tx_ind[tx_set as usize][tx_type as usize] as u32,
&mut self.fc.intra_tx_cdf[tx_set_index as usize]
[square_tx_size as usize][intra_dir as usize]
[..num_tx_set[tx_set as usize]]
);
}
}
}
fn get_tx_size_context(
&self, bo: TileBlockOffset, bsize: BlockSize,
) -> usize {
let max_tx_size = max_txsize_rect_lookup[bsize as usize];
let max_tx_wide = max_tx_size.width() as u8;
let max_tx_high = max_tx_size.height() as u8;
let has_above = bo.0.y > 0;
let has_left = bo.0.x > 0;
let mut above = self.bc.above_tx_context[bo.0.x] >= max_tx_wide as u8;
let mut left = self.bc.left_tx_context[bo.y_in_sb()] >= max_tx_high as u8;
if has_above {
let above_blk = self.bc.blocks.above_of(bo);
if above_blk.is_inter() {
above = (above_blk.n4_w << MI_SIZE_LOG2) >= max_tx_wide;
};
}
if has_left {
let left_blk = self.bc.blocks.left_of(bo);
if left_blk.is_inter() {
left = (left_blk.n4_h << MI_SIZE_LOG2) >= max_tx_high;
};
}
if has_above && has_left {
return above as usize + left as usize;
};
if has_above {
return above as usize;
};
if has_left {
return left as usize;
};
0
}
pub fn write_tx_size_intra(
&mut self, w: &mut dyn Writer, bo: TileBlockOffset, bsize: BlockSize,
tx_size: TxSize,
) {
fn tx_size_to_depth(tx_size: TxSize, bsize: BlockSize) -> usize {
let mut ctx_size = max_txsize_rect_lookup[bsize as usize];
let mut depth: usize = 0;
while tx_size != ctx_size {
depth += 1;
ctx_size = sub_tx_size_map[ctx_size as usize];
debug_assert!(depth <= MAX_TX_DEPTH);
}
depth
}
fn bsize_to_max_depth(bsize: BlockSize) -> usize {
let mut tx_size: TxSize = max_txsize_rect_lookup[bsize as usize];
let mut depth = 0;
while depth < MAX_TX_DEPTH && tx_size != TX_4X4 {
depth += 1;
tx_size = sub_tx_size_map[tx_size as usize];
debug_assert!(depth <= MAX_TX_DEPTH);
}
depth
}
fn bsize_to_tx_size_cat(bsize: BlockSize) -> usize {
let mut tx_size: TxSize = max_txsize_rect_lookup[bsize as usize];
debug_assert!(tx_size != TX_4X4);
let mut depth = 0;
while tx_size != TX_4X4 {
depth += 1;
tx_size = sub_tx_size_map[tx_size as usize];
}
debug_assert!(depth <= MAX_TX_CATS);
depth - 1
}
debug_assert!(!self.bc.blocks[bo].is_inter());
debug_assert!(bsize > BlockSize::BLOCK_4X4);
let tx_size_ctx = self.get_tx_size_context(bo, bsize);
let depth = tx_size_to_depth(tx_size, bsize);
let max_depths = bsize_to_max_depth(bsize);
let tx_size_cat = bsize_to_tx_size_cat(bsize);
debug_assert!(depth <= max_depths);
debug_assert!(!tx_size.is_rect() || bsize.is_rect_tx_allowed());
symbol_with_update!(
self,
w,
depth as u32,
&mut self.fc.tx_size_cdf[tx_size_cat][tx_size_ctx][..=max_depths]
);
}
// Based on https://aomediacodec.github.io/av1-spec/#cdf-selection-process
// Used to decide the cdf (context) for txfm_split
fn get_above_tx_width(
&self, bo: TileBlockOffset, _bsize: BlockSize, _tx_size: TxSize,
first_tx: bool,
) -> usize {
let has_above = bo.0.y > 0;
if first_tx {
if !has_above {
return 64;
}
let above_blk = self.bc.blocks.above_of(bo);
if above_blk.skip && above_blk.is_inter() {
return above_blk.bsize.width();
}
}
self.bc.above_tx_context[bo.0.x] as usize
}
fn get_left_tx_height(
&self, bo: TileBlockOffset, _bsize: BlockSize, _tx_size: TxSize,
first_tx: bool,
) -> usize {
let has_left = bo.0.x > 0;
if first_tx {
if !has_left {
return 64;
}
let left_blk = self.bc.blocks.left_of(bo);
if left_blk.skip && left_blk.is_inter() {
return left_blk.bsize.height();
}
}
self.bc.left_tx_context[bo.y_in_sb()] as usize
}
fn txfm_partition_context(
&self, bo: TileBlockOffset, bsize: BlockSize, tx_size: TxSize, tbx: usize,
tby: usize,
) -> usize {
debug_assert!(tx_size > TX_4X4);
debug_assert!(bsize > BlockSize::BLOCK_4X4);
// TODO: from 2nd level partition, must know whether the tx block is the topmost(or leftmost) within a partition
let above = (self.get_above_tx_width(bo, bsize, tx_size, tby == 0)
< tx_size.width()) as usize;
let left = (self.get_left_tx_height(bo, bsize, tx_size, tbx == 0)
< tx_size.height()) as usize;
let max_tx_size: TxSize = bsize.tx_size().sqr_up();
let category: usize = (tx_size.sqr_up() != max_tx_size) as usize
+ (TxSize::TX_SIZES as usize - 1 - max_tx_size as usize) * 2;
debug_assert!(category < TXFM_PARTITION_CONTEXTS);
category * 3 + above + left
}
pub fn write_tx_size_inter(
&mut self, w: &mut dyn Writer, bo: TileBlockOffset, bsize: BlockSize,
tx_size: TxSize, txfm_split: bool, tbx: usize, tby: usize, depth: usize,
) {
if bo.0.x >= self.bc.blocks.cols() || bo.0.y >= self.bc.blocks.rows() {
return;
}
debug_assert!(self.bc.blocks[bo].is_inter());
debug_assert!(bsize > BlockSize::BLOCK_4X4);
debug_assert!(!tx_size.is_rect() || bsize.is_rect_tx_allowed());
if tx_size != TX_4X4 && depth < MAX_VARTX_DEPTH {
let ctx = self.txfm_partition_context(bo, bsize, tx_size, tbx, tby);
symbol_with_update!(
self,
w,
txfm_split as u32,
&mut self.fc.txfm_partition_cdf[ctx]
);
} else {
debug_assert!(!txfm_split);
}
if !txfm_split {
self.bc.update_tx_size_context(bo, tx_size.block_size(), tx_size, false);
} else {
// if txfm_split == true, split one level only
let split_tx_size = sub_tx_size_map[tx_size as usize];
let bw = bsize.width_mi() / split_tx_size.width_mi();
let bh = bsize.height_mi() / split_tx_size.height_mi();
for by in 0..bh {
for bx in 0..bw {
let tx_bo = TileBlockOffset(BlockOffset {
x: bo.0.x + bx * split_tx_size.width_mi(),
y: bo.0.y + by * split_tx_size.height_mi(),
});
self.write_tx_size_inter(
w,
tx_bo,
bsize,
split_tx_size,
false,
bx,
by,
depth + 1,
);
}
}
}
}
#[inline]
pub fn get_txsize_entropy_ctx(tx_size: TxSize) -> usize {
(tx_size.sqr() as usize + tx_size.sqr_up() as usize + 1) >> 1
}
pub fn txb_init_levels<T: Coefficient>(
&self, coeffs: &[T], height: usize, levels: &mut [u8],
levels_stride: usize,
) {
// Coefficients and levels are transposed from how they work in the spec
for (coeffs_col, levels_col) in
coeffs.chunks(height).zip(levels.chunks_mut(levels_stride))
{
for (coeff, level) in coeffs_col.iter().zip(levels_col.iter_mut()) {
*level = clamp(coeff.abs(), T::cast_from(0), T::cast_from(127)).as_();
}
}
}
// Since the coefficients and levels are transposed in relation to how they
// work in the spec, use the log of block height in our calculations instead
// of block width.
#[inline]
pub fn get_txb_bhl(tx_size: TxSize) -> usize {
av1_get_coded_tx_size(tx_size).height_log2()
}
#[inline]
pub fn get_eob_pos_token(eob: usize, extra: &mut u32) -> u32 {
let t = if eob < 33 {
eob_to_pos_small[eob] as u32
} else {
let e = cmp::min((eob - 1) >> 5, 16);
eob_to_pos_large[e as usize] as u32
};
assert!(eob as i32 >= k_eob_group_start[t as usize] as i32);
*extra = eob as u32 - k_eob_group_start[t as usize] as u32;
t
}
pub fn get_nz_mag(levels: &[u8], bhl: usize, tx_class: TxClass) -> usize {
// Levels are transposed from how they work in the spec
// May version.
// Note: AOMMIN(level, 3) is useless for decoder since level < 3.
let mut mag = cmp::min(3, levels[1]); // { 1, 0 }
mag += cmp::min(3, levels[(1 << bhl) + TX_PAD_HOR]); // { 0, 1 }
if tx_class == TX_CLASS_2D {
mag += cmp::min(3, levels[(1 << bhl) + TX_PAD_HOR + 1]); // { 1, 1 }
mag += cmp::min(3, levels[2]); // { 2, 0 }
mag += cmp::min(3, levels[(2 << bhl) + (2 << TX_PAD_HOR_LOG2)]); // { 0, 2 }
} else if tx_class == TX_CLASS_VERT {
mag += cmp::min(3, levels[2]); // { 2, 0 }
mag += cmp::min(3, levels[3]); // { 3, 0 }
mag += cmp::min(3, levels[4]); // { 4, 0 }
} else {
mag += cmp::min(3, levels[(2 << bhl) + (2 << TX_PAD_HOR_LOG2)]); // { 0, 2 }
mag += cmp::min(3, levels[(3 << bhl) + (3 << TX_PAD_HOR_LOG2)]); // { 0, 3 }
mag += cmp::min(3, levels[(4 << bhl) + (4 << TX_PAD_HOR_LOG2)]); // { 0, 4 }
}
mag as usize
}
fn get_nz_map_ctx_from_stats(
stats: usize,
coeff_idx: usize, // raster order
bhl: usize,
tx_size: TxSize,
tx_class: TxClass,
) -> usize {
if (tx_class as u32 | coeff_idx as u32) == 0 {
return 0;
};
// Coefficients are transposed from how they work in the spec
let col: usize = coeff_idx >> bhl;
let row: usize = coeff_idx - (col << bhl);
let ctx = ((stats + 1) >> 1).min(4);
ctx
+ match tx_class {
TX_CLASS_2D => {
// This is the algorithm to generate table av1_nz_map_ctx_offset[].
// const int width = tx_size_wide[tx_size];
// const int height = tx_size_high[tx_size];
// if (width < height) {
// if (row < 2) return 11 + ctx;
// } else if (width > height) {
// if (col < 2) return 16 + ctx;
// }
// if (row + col < 2) return ctx + 1;
// if (row + col < 4) return 5 + ctx + 1;
// return 21 + ctx;
av1_nz_map_ctx_offset[tx_size as usize][cmp::min(row, 4)]
[cmp::min(col, 4)] as usize
}
TX_CLASS_HORIZ => nz_map_ctx_offset_1d[col],
TX_CLASS_VERT => nz_map_ctx_offset_1d[row],
}
}
fn get_nz_map_ctx(
levels: &[u8], coeff_idx: usize, bhl: usize, area: usize, scan_idx: usize,
is_eob: bool, tx_size: TxSize, tx_class: TxClass,
) -> usize {
if is_eob {
if scan_idx == 0 {
return 0;
}
if scan_idx <= area / 8 {
return 1;
}
if scan_idx <= area / 4 {
return 2;
}
return 3;
}
// Levels are transposed from how they work in the spec
let padded_idx = coeff_idx + ((coeff_idx >> bhl) << TX_PAD_HOR_LOG2);
let stats = Self::get_nz_mag(&levels[padded_idx..], bhl, tx_class);
Self::get_nz_map_ctx_from_stats(stats, coeff_idx, bhl, tx_size, tx_class)
}
pub fn get_nz_map_contexts(
&self, levels: &mut [u8], scan: &[u16], eob: u16, tx_size: TxSize,
tx_class: TxClass, coeff_contexts: &mut [i8],
) {
let bhl = Self::get_txb_bhl(tx_size);
let area = av1_get_coded_tx_size(tx_size).area();
for i in 0..eob {
let pos = scan[i as usize];
coeff_contexts[pos as usize] = Self::get_nz_map_ctx(
levels,
pos as usize,
bhl,
area,
i as usize,
i == eob - 1,
tx_size,
tx_class,
) as i8;
}
}
pub fn get_br_ctx(
levels: &[u8],
coeff_idx: usize, // raster order
bhl: usize,
tx_class: TxClass,
) -> usize {
// Coefficients and levels are transposed from how they work in the spec
let col: usize = coeff_idx >> bhl;
let row: usize = coeff_idx - (col << bhl);
let stride: usize = (1 << bhl) + TX_PAD_HOR;
let pos: usize = col * stride + row;
let mut mag: usize = (levels[pos + 1] + levels[pos + stride]) as usize;
match tx_class {
TX_CLASS_2D => {
mag += levels[pos + stride + 1] as usize;
mag = cmp::min((mag + 1) >> 1, 6);
if coeff_idx == 0 {
return mag;
}
if (row < 2) && (col < 2) {
return mag + 7;
}
}
TX_CLASS_HORIZ => {
mag += levels[pos + (stride << 1)] as usize;
mag = cmp::min((mag + 1) >> 1, 6);
if coeff_idx == 0 {
return mag;
}
if col == 0 {
return mag + 7;
}
}
TX_CLASS_VERT => {
mag += levels[pos + 2] as usize;
mag = cmp::min((mag + 1) >> 1, 6);
if coeff_idx == 0 {
return mag;
}
if row == 0 {
return mag + 7;
}
}
}
mag + 14
}
}
| rust |
Swaragini: In the coming episodes Swara will be in a desperate condition as Sahil will attack Sanskar with poisonous gas!
In tonight’s episode we will see the great expose where Kissan (Varun Kapoor’s) identity will be revealed. Swara (Helly Shah) will be damn upset and tell Sanskar that she wants to divorce him. However, later she will regain her memory and reconcile with Sanskar. The Maheshwari family will be jubilant to get their bahu back. We will also see a huge showdown between Parineeta and Swara where the latter will give her a tight slap.
However, there is trouble in Swara and Sanskar’s life. Sahil (Anuj Sachdeva) is hell bent on having her in his life. We will see him making Sanskar critically ill with poisonous gas. Now, that is a new tactic! Yes, Swara will be devastated when Sahil will call her and blackmail her with his life. She will ask him for the remedy but he will want something in return. Totally helpless, Swara won’t know what to do. Fans are extremely eager for this ‘tadap’ wala track. You won’t believe us but a certain section was dying to see him on the deathbed. Varun seems to have got a new hairdo, which is looking quite stylish. Now that the Devdas phase is over, the actor’s got a makeover.
Stay tuned to BollywoodLife for the latest scoops and updates from Bollywood, Hollywood, South, TV and Web-Series.
Click to join us on Facebook, Twitter, Youtube and Instagram.
Also follow us on Facebook Messenger for latest updates.
| english |
<reponame>confluentinc/data-mesh-demo
package io.confluent.demo.datamesh;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DataMeshDemo {
public static void main(String[] args) {
SpringApplication.run(DataMeshDemo.class, args);
}
} | java |
To get access to over 10000+ Franchise Business Opportunities.
Network with the growing Business Community to get expert interventions to let you learn to Grow & Expand your Business with Franchising.
About Us:
Big Fix has developed and launched a web portal to help consumers avail professional & reliable out-warranties services through online interface. Big Fix is a effort to professionalize the unorganised gadgets "repair & services" domain and provide easy access, genuine spare parts, skilled workforce and easy payment options to consumers.
BigFix | Ecare Services is a next generation "Repair & Service" partner, providing a fully automated, e-commerce enabled business through web, mobile & social connects. We provide out-warranty repair through Carry-in, Pick-up, Remote and Onsite service for laptops, desktops, tablets, mobile phones and gaming consoles.
We invite small and medium computer & mobile shops to partner with us for all your repair needs. You can concentrate on sales, while we take care of all your service needs!
BigFix | Ecare provides a single window solution to all the needs for out warranty support so that you can ensure that they can focus on their core competence and increase customer satisfaction.
Interested in above franchise model? Contact now for more details...Hurry!
Thanks for showing your interest in Bigfix Gadgdet Care Llp.
Your contact detail has been shared with the company. requested you to create your investor profile and upgrade to directly contact the brand.
Thanks for showing your interest in Bigfix Gadgdet Care Llp.
But you have already applied for Bigfix Gadgdet Care Llp.
| english |
function openModal(_src) {
$("#imageModal").attr("src", _src);
$("#myModal").modal();
}
| javascript |
<filename>db/bis/45_6.json<gh_stars>1-10
["Kalau begitu, apakah yang dapat kita katakan? Haruskah kita terus saja berbuat dosa supaya Allah semakin mengasihi kita?","Tentu tidak! Dosa tidak lagi berkuasa atas kita, jadi, mana bisa kita terus-menerus hidup dengan berbuat dosa?","Tahukah Saudara-saudara bahwa pada waktu kita dibaptis, kita dipersatukan dengan Kristus Yesus? Ini berarti kita dipersatukan dengan kematian-Nya.","Dengan baptisan itu, kita dikubur dengan Kristus dan turut mati bersama-sama Dia, supaya sebagaimana Kristus dihidupkan dari kematian oleh kuasa Bapa yang mulia, begitu pun kita dapat menjalani suatu hidup yang baru.","Kalau kita sudah menjadi satu dengan Kristus sebab kita turut mati bersama Dia, kita akan menjadi satu dengan Dia juga karena kita turut dihidupkan kembali seperti Dia.","Kita mengetahui bahwa tabiat kita yang lama sebagai manusia sudah dimatikan bersama-sama Kristus pada kayu salib supaya kuasa tabiat kita yang berdosa itu dihancurkan; dengan demikian kita tidak lagi diperhamba oleh dosa.","Karena kalau seseorang mati, orang itu dibebaskan dari kuasa dosa.","Kalau kita sudah mati bersama Kristus, kita percaya bahwa kita pun akan hidup bersama Dia.","Sebab kita tahu bahwa Kristus sudah dihidupkan dari kematian dan Ia tidak akan mati lagi; kematian sudah tidak lagi berkuasa atas diri-Nya.","Kematian yang dialami Kristus adalah kematian terhadap dosa. Itu terjadi satu kali saja untuk selama-lamanya. Dan hidup yang dijalani-Nya sekarang ini adalah hidup untuk Allah.","Kalian harus juga menganggap dirimu mati terhadap dosa, tetapi hidup dalam hubungan yang erat dengan Allah melalui Kristus Yesus.","Jangan lagi membiarkan dosa menguasai hidupmu yang fana agar Saudara jangan menuruti keinginanmu yang jahat.","Janganlah juga Saudara menyerahkan anggota badanmu kepada kuasa dosa untuk digunakan bagi maksud-maksud yang jahat. Tetapi serahkanlah dirimu kepada Allah sebagai orang yang sudah dipindahkan dari kematian kepada hidup. Serahkanlah dirimu seluruhnya kepada Allah supaya dipakai untuk melakukan kehendak Allah.","Dosa tidak boleh menguasai kalian, karena kalian tidak lagi hidup di bawah hukum agama Yahudi tetapi di bawah rahmat Allah.","Sekarang, apa kesimpulannya? Bolehkah kita berdosa, sebab kita tidak lagi di bawah kekuasaan hukum agama Yahudi, melainkan di bawah kekuasaan rahmat Allah? Sekali-kali tidak!","Tahukah kalian bahwa kalau kalian menyerahkan diri kepada seseorang untuk melakukan kemauannya maka kalian adalah hamba orang yang kalian taati itu--entah hamba dosa yang membawa kalian kepada kematian, atau hamba yang taat kepada Allah, dan dengan demikian berbaik kembali dengan Allah.","Tetapi syukur kepada Allah! Sebab dahulu kalian menjadi hamba dosa, tetapi sekarang kalian dengan sepenuh hati mentaati pengajaran benar yang sudah diberikan kepadamu.","Kalian sudah dibebaskan dari dosa, dan sekarang menjadi hamba untuk kehendak Allah.","Karena daya tangkapmu begitu lemah, saya memakai contoh-contoh perhambaan supaya lebih mudah kalian mengerti. Dahulu kalian menyerahkan dirimu seluruhnya sebagai hamba bagi hal-hal yang kotor dan yang jahat untuk maksud-maksud yang jahat. Begitu juga sekarang, hendaklah kalian menyerahkan diri seluruhnya sebagai hamba bagi kehendak Allah untuk maksud-maksud Allah yang khusus.","Waktu kalian diperhamba oleh dosa, kalian tidak dikuasai oleh kehendak Allah.","Pada waktu itu keuntungan apakah yang kalian terima dari hal-hal yang sekarang ini kalian malu melakukannya? Perbuatan-perbuatan itu hanya membawa kematian!","Tetapi sekarang kalian sudah dibebaskan dari dosa, dan menjadi hamba Allah. Keuntunganmu ialah bahwa Saudara hidup khusus untuk Allah dan hal itu menghasilkan hidup sejati dan kekal.","Sebab kematian adalah upah dari dosa; tetapi hidup sejati dan kekal bersama Kristus Yesus Tuhan kita adalah pemberian yang diberikan oleh Allah dengan cuma-cuma."] | json |
It's no news anymore that Anurag Kashyap`s period drama 'Bombay Velvet' is set in Bombay of the 60`s. The director has recreated Bombay of that period and for which he made sure that everything is in sync with that era - from the look of the characters, to the cars and the streets.
Tabloid journalism of that 1960s too plays a major part in 'Bombay Velvet'. A tabloid called Glitz` is an important part of the film`s narrative. This tabloid breaks sensational stories on the rich and famous of the city. It writes about the big and wealthy people of Bombay. It also talks about sting operations and blackmail stories that are a part of the narrative of the film.
It is a well known fact that Blitz` was a major tabloid in the 60s. It is India`s first tabloid with Russi Karanjia as it`s editor. He is known as the man who pioneered tabloid journalism in India. In the film, the role of the editor of Glitz is essayed by Manish Chaudhari, who plays a charismatic newspaper editor named Jimmy Mistry.
Our sources revealed, Manish did a lot of research and preparation for his role. He visited Russi`s closed up house in Cuffe Parade, went to his office and even spoke to Russi`s colleagues. Interestingly, Manish also met an 80 year old tailor working out of the ground floor of the former Blitz building. He shares, "He and his father made Russi's suits. His anecdotes and pictures, along with the other research, were my references. I hope Russi's family, friends and colleagues will enjoy Jimmy. "
One of the most awaited films this year, 'Bombay Velvet' starring Ranbir Kapoor and Anushka ? Sharma? is co produced by Fox Star Studios and Phantom Films.
Follow us on Google News and stay updated with the latest! | english |
As per specialists, Norway is en route to turning into the principal completely electric-controlled nation on the planet, as a major aspect of its concentrated endeavors to move towards manageability.
Energi Norge, a perfect vitality think tank, says it’s feasible for Norway to work totally on clean power by as when 2050.
Hydropower is right now the biggest wellspring of power in Norway, representing more than 96 percent of its energy era. Also, there are evaluated to be more than 110,000 electric autos in the nation. Actually, the legislature as of late issued a statement expressing that non-renewable energy source fueled vehicles would never again be sold in Norway after 2025, and both open and private transport would need to be electric-controlled.
Energi Norge’s executive, Oluf Ulseth, says that spotless vitality and manageability can have a colossal positive effect on environmental change, and in addition the loss of occupations in Norway’s oil industry. “The current framework gives us a remarkable chance to change over different parts to power and in this manner lessen outflows,” Ulseth told the Norwegian news office NTB. | english |
from thkc_disrank import *
| python |
The Android tablet category is slowly becoming stagnant. With each passing year, we have seen a dip in the number of product launches, with most manufacturers closing the doors on this product category completely. On the other hand, Apple has been selling its iPads for quite some time now, and recently launched the iPad (2018), though it cannot be considered a low-cost tablet. Now, Alcatel is hoping to create some excitement in the budget Android tablet category by launching the Alcatel Pop4.
The Alcatel Pop4 is a 2-in-1 tablet and comes with an attachable keyboard. It has a 10. 1-inch display with Full HD resolution. Powering the tablet is a Snapdragon 430 processor, an octa-core chip clocked at 1. 4GHz. The tablet has 2GB of RAM and 16GB of internal storage. Since it is a 4G model, it has a micro SIM slot at the back alongside the dedicated microSD card slot that accepts cards upto 32GB. At the back the tablet has an 8-megapixel camera which lacks autofocus. The selfie camera is a 5 megapixel shooter. It runs on Android Marshmallow and is powered by a 5830mAh battery.
Alcatel Pop4 (10-inch) price in India starts from ₹ 4,499. The lowest price of Alcatel Pop4 (10-inch) is ₹ 4,499 at Flipkart on 29th May 2023. | english |
Pharma company Pfizer has announced a 12-week paternity leave policy for its employees, the company said in a statement on Thursday. The move has been taken as part of the company's diversity and inclusion initiatives.
According to the statement, the new leave policy is applicable from January 1, 2023. It can be availed by biological as well as adoptive fathers.
The policy gives both biological and adoptive fathers the option to take leaves over a period of two-year in a maximum of four tranches. A single tranche of leaves may be taken for a minimum of two weeks and a maximum of six weeks. The employee will also be permitted to take additional leaves as permitted by the company's leave policy, which includes casual leave, elective holidays, and wellness days, in the event of any complication, the company has over 5,500 employees said.
TO READ THE FULL STORY, SUBSCRIBE NOW NOW AT JUST RS 249 A MONTH.
What you get on Business Standard Premium?
- Unlock 30+ premium stories daily hand-picked by our editors, across devices on browser and app.
- Pick your 5 favourite companies, get a daily email with all news updates on them.
- Full access to our intuitive epaper - clip, save, share articles from any device; newspaper archives from 2006.
- Preferential invites to Business Standard events.
- Curated newsletters on markets, personal finance, policy & politics, start-ups, technology, and more. | english |
<gh_stars>1-10
.navbar-inverse {
background-color: #522583;
border-color: #847ab2;
}
.navbar-inverse .navbar-brand {
color: #adafaf;
}
.navbar-inverse .navbar-brand:hover,
.navbar-inverse .navbar-brand:focus {
color: #fcf8ff;
}
.navbar-inverse .navbar-text {
color: #adafaf;
}
.navbar-inverse .navbar-nav > li > a {
color: #adafaf;
}
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus {
color: #fcf8ff;
}
.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus {
color: #fcf8ff;
background-color: #847ab2;
}
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .open > a:hover,
.navbar-inverse .navbar-nav > .open > a:focus {
color: #fcf8ff;
background-color: #847ab2;
}
.navbar-inverse .navbar-toggle {
border-color: #847ab2;
}
.navbar-inverse .navbar-toggle:hover,
.navbar-inverse .navbar-toggle:focus {
background-color: #847ab2;
}
.navbar-inverse .navbar-toggle .icon-bar {
background-color: #adafaf;
}
.navbar-inverse .navbar-collapse,
.navbar-inverse .navbar-form {
border-color: #adafaf;
}
.navbar-inverse .navbar-link {
color: #adafaf;
}
.navbar-inverse .navbar-link:hover {
color: #fcf8ff;
}
@media (max-width: 767px) {
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
color: #adafaf;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
color: #fcf8ff;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #fcf8ff;
background-color: #847ab2;
}
}
/* Word wrap setting*/
h1, h2, h3, h4, h5, h6, span.xref {
word-wrap: break-word;
word-break: initial;
}
/* Customize navigation */
.toc .level3 {
font-size: 13px;
margin-top: 7px;
margin-left: 7px;
margin-bottom: 7px;
}
.toc .level3 > li {
margin-top: 3px
}
.toc .level4 > li {
margin-top: 3px
}
.toc .level4 {
font-size: 12px;
margin-top: 7px;
margin-left: 7px;
margin-bottom: 7px;
}
/* Customize tables */
table{border-spacing:5px;border-collapse:collapse;padding-left:5px;padding-right:5px}
td,th{border-spacing:5px;border-collapse:collapse;padding-left:5px;padding-right:5px} | css |
<filename>src/instruments/base.rs
use super::traits::Instrument;
use crate::definitions::Money;
use crate::patterns::LazyObject;
use crate::pricingengines::{Arguments, PricingEngine, Results};
use crate::time::Date;
use std::collections::HashMap;
#[derive(Default, Clone)]
pub struct Base<PE: PricingEngine> {
lazy: LazyObject,
npv: Money,
error_estimate: Money,
valuation_date: Date,
additional_results: HashMap<String, Money>,
engine: PE,
has_engine: bool,
}
impl<PE> Instrument for Base<PE>
where
PE: PricingEngine,
{
type E = PE;
/// returns the net present value of the instrument.
fn npv(&mut self) -> Money {
self.calculate();
assert!(self.npv != Money::default());
self.npv
}
/// returns the error estimate on the NPV when available.
fn error_estimate(&mut self) -> Money {
self.calculate();
assert!(self.error_estimate != Money::default());
self.error_estimate
}
/// returns the date the net present value refers to.
fn valuation_date(&mut self) -> Date {
self.calculate();
assert!(self.valuation_date != Date::default());
self.valuation_date
}
/// returns any additional result returned by the pricing engine.
fn result(&mut self, tag: String) -> Result<Money, &str> {
self.calculate();
let m = self.additional_results.get(&tag);
if m.is_none() {
return Err("not found");
}
Ok(*m.unwrap())
}
/// returns any additional result returned by the pricing engine.
fn additional_results(&self) -> &HashMap<String, Money> {
&self.additional_results
}
/// returns whether the instrument might have value greater than zero.
fn is_expired(&self) -> bool {
false
}
/// set the pricing engine to be used.
fn set_pricing_engine(&mut self, engine: Self::E) {
if self.has_engine {
// TODO: unregister.
self.engine = engine;
self.has_engine = true;
}
if self.has_engine {
// TODO: register.
//registerWith(engine_);
}
// trigger (lazy) recalculation and notify observers
self.lazy.update();
}
/// When a derived argument structure is defined for an
/// instrument, this method should be overridden to fill
/// it. This is mandatory in case a pricing engine is used.
fn setup_arguments<A: Arguments>(&self, _args: A) {
unimplemented!();
}
/// When a derived result structure is defined for an
/// instrument, this method should be overridden to read from
/// it. This is mandatory in case a pricing engine is used.
fn fetch_results<R: Results>(&mut self, results: R) {
let r = results.get();
self.npv = r.value;
self.error_estimate = r.error_estimate;
self.valuation_date = r.valuation_date;
self.additional_results = r.additional_results.clone();
}
fn calculate(&mut self) {
if !self.lazy.calculated {
if self.is_expired() {
self.setup_expired();
self.lazy.calculated = true;
} else {
self.lazy.calculate();
}
}
}
///
fn setup_expired(&mut self) {
self.npv = Money::default();
self.error_estimate = Money::default();
self.valuation_date = Date::default();
self.additional_results.clear();
}
///
fn perform_calculations(&mut self) {
assert!(self.has_engine);
self.engine.reset();
self.setup_arguments(self.engine.get_arguments());
self.engine.get_arguments().validate();
self.engine.calculate();
self.fetch_results(self.engine.get_results());
}
}
| rust |
{
"directions": [
"Place chutney in blender. Add broth gradually and puree. Set aside.",
"Heat oil in heavy large saucepan over medium heat. Add bell pepper and garlic and saut\u00e9 3 minutes. Add rice and curry powder and stir 1 minute. Add beans, potato, greens and currants and stir to blend. Add broth mixture. Bring to boil. Reduce heat to low, cover and simmer until rice and vegetables are tender and liquids are absorbed, about 25 minutes. Turn off heat and let stand covered 10 minutes.",
"Mound pilaf in large bowl. Serve, passing yogurt separately, if desired."
],
"ingredients": [
"1/3 cup <NAME>'s mango chutney",
"2 1/2 cups canned unsalted chicken broth or water",
"1 tablespoon olive oil",
"1 red bell pepper, diced",
"2 tablespoons chopped garlic",
"1 cup long-grain white rice",
"1 tablespoon curry powder",
"1 15-ounce can low-salt kidney beans, rinsed, drained",
"1 small orange-fleshed sweet potato (yam), peeled, cut into 1/2-inch pieces",
"1 10-ounce package frozen chopped collard greens, thawed, squeezed dry",
"1/2 cup dried currants",
"Plain nonfat yogurt (optional)"
],
"language": "en-US",
"source": "www.epicurious.com",
"tags": [
"Blender",
"Bean",
"Herb",
"Rice",
"Vegetable",
"Side",
"Low Fat",
"Vegetarian",
"Currant",
"Sweet Potato/Yam",
"Collard Greens",
"Wheat/Gluten-Free",
"Peanut Free",
"Tree Nut Free",
"Soy Free"
],
"title": "Curried Rice, Beans and Vegetable Pilaf",
"url": "http://www.epicurious.com/recipes/food/views/curried-rice-beans-and-vegetable-pilaf-229"
}
| json |
Sorry currently there are no articles available for this celebrity.
Get all the latest news and updates on Ezra Mir only on Bollywood Hungama. Check all 2022 news about Ezra Mir, news headlines, breaking news, and News today online on Ezra Mir at Bollywood Hungama. Stay tuned for more news for Ezra Mir and other Bollywood updates on Bollywood Hungama.
| english |
<reponame>holoyan/python-data-validation
from setuptools import setup, find_packages
# read the contents of your README file
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='pyva',
packages=find_packages(),
version='0.4.1',
license='MIT',
description='Simple and flexible python data validation library',
long_description=long_description,
long_description_content_type='text/markdown',
author='Artak',
author_email='<EMAIL>',
url='https://github.com/holoyan/python-data-validation',
keywords=['data', 'validation', 'validator', 'data validator'],
install_requires=[ # I get to this in a second
'python-dateutil',
],
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
)
| python |
<filename>package.json
{
"name": "actools-cm-download-extension",
"version": "0.0.1",
"description": "This package is only for node modules for userscript.zsh.",
"main": "index.js",
"dependencies": {
"base64-img": "^1.0.3"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gro-ove/actools-cm-download-extension.git"
},
"keywords": [
"assetto",
"corsa"
],
"author": "x4fab",
"license": "MIT",
"bugs": {
"url": "https://github.com/gro-ove/actools-cm-download-extension/issues"
},
"homepage": "https://github.com/gro-ove/actools-cm-download-extension#readme"
}
| json |
package googleSignInIDTokenVerifier
import (
"crypto/rsa"
"encoding/base64"
"encoding/json"
"fmt"
"math/big"
"net/http"
"regexp"
"strconv"
"time"
)
const (
// GoogleCertsURL url exposed by Google with their current RSA keys
GoogleCertsURL = "https://www.googleapis.com/oauth2/v3/certs"
defaultCacheDuration = time.Hour * 2
)
type gKey struct {
Kty string
Alg string
Use string
Kid string
N string
E string
}
func (v *Verifier) refreshCerts() error {
resp, err := http.Get(GoogleCertsURL)
if err != nil {
return err
}
v.cacheExpiry = time.Now().Add(defaultCacheDuration)
if cache := resp.Header.Get("cache-control"); cache != "" {
r := regexp.MustCompile("max-age=([0-9]*)")
matches := r.FindAllStringSubmatch(cache, -1)
if len(matches) > 0 && len(matches[0]) > 1 {
var offset int64
offset, err = strconv.ParseInt(matches[0][1], 10, 64)
if err == nil {
v.cacheExpiry = time.Now().Add(time.Duration(offset) * time.Second)
}
}
}
var dest map[string][]gKey
err = json.NewDecoder(resp.Body).Decode(&dest)
if err != nil {
return err
}
if len(dest["keys"]) < 1 {
return fmt.Errorf("No keys were found when fetching %s", GoogleCertsURL)
}
keys := map[string]*rsa.PublicKey{}
for _, gkey := range dest["keys"] {
if gkey.Kty == "RSA" && gkey.Use == "sig" {
n, err := base64.RawURLEncoding.DecodeString(gkey.N)
if err != nil {
return err
}
e, err := base64.RawURLEncoding.DecodeString(gkey.E)
if err != nil {
return err
}
keys[gkey.Kid] = &rsa.PublicKey{
N: big.NewInt(0).SetBytes([]byte(n)),
E: int(big.NewInt(0).SetBytes([]byte(e)).Int64()),
}
}
}
v.keys = keys
return nil
}
// RefreshCerts refreshes current certificates if keys are expired
// Returns a boolean whether it hit cache or not
func (v *Verifier) RefreshCerts() (bool, error) {
if time.Now().Before(v.cacheExpiry) {
return true, nil
}
return false, v.refreshCerts()
}
// RefreshCerts refreshes current certificates if keys are expired
// Returns a boolean whether it hit cache or not
func RefreshCerts() (bool, error) {
return SharedInstance.RefreshCerts()
}
// ForceRefreshCerts forcefully refreshes certificates
func (v *Verifier) ForceRefreshCerts() error {
return v.refreshCerts()
}
// ForceRefreshCerts forcefully refreshes certificates
func ForceRefreshCerts() error {
return SharedInstance.ForceRefreshCerts()
}
| go |
{
"name": "derelict-vulkan",
"license": "BSL-1.0",
"description": "A dynamic binding to the vulkan api.",
"copyright": "Copyright © 2016, <NAME>",
"authors": ["<NAME>"],
"targetPath": "bin",
"targetType": "library",
"dependencies": {
"derelict-util" : ">=3.0.0-alpha.1"
}
}
| json |
<filename>android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/PipeTabFragment.java<gh_stars>10-100
/*
* Copyright (c) 2018-2021 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.arthenica.ffmpegkit.test;
import static com.arthenica.ffmpegkit.test.MainActivity.TAG;
import static com.arthenica.ffmpegkit.test.MainActivity.notNull;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.MediaController;
import android.widget.TextView;
import android.widget.VideoView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.Fragment;
import com.arthenica.ffmpegkit.FFmpegKit;
import com.arthenica.ffmpegkit.FFmpegKitConfig;
import com.arthenica.ffmpegkit.FFmpegSession;
import com.arthenica.ffmpegkit.FFmpegSessionCompleteCallback;
import com.arthenica.ffmpegkit.LogCallback;
import com.arthenica.ffmpegkit.ReturnCode;
import com.arthenica.ffmpegkit.SessionState;
import com.arthenica.ffmpegkit.Statistics;
import com.arthenica.ffmpegkit.StatisticsCallback;
import com.arthenica.ffmpegkit.util.AsyncCatImageTask;
import com.arthenica.ffmpegkit.util.DialogUtil;
import com.arthenica.ffmpegkit.util.ResourcesUtil;
import com.arthenica.smartexception.java.Exceptions;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
public class PipeTabFragment extends Fragment {
private VideoView videoView;
private AlertDialog progressDialog;
private Statistics statistics;
public PipeTabFragment() {
super(R.layout.fragment_pipe_tab);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
View createButton = view.findViewById(R.id.createButton);
if (createButton != null) {
createButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
createVideo();
}
});
}
videoView = view.findViewById(R.id.videoPlayerFrame);
progressDialog = DialogUtil.createProgressDialog(requireContext(), "Creating video");
}
@Override
public void onResume() {
super.onResume();
setActive();
}
public static PipeTabFragment newInstance() {
return new PipeTabFragment();
}
public void enableLogCallback() {
FFmpegKitConfig.enableLogCallback(new LogCallback() {
@Override
public void apply(final com.arthenica.ffmpegkit.Log log) {
Log.d(MainActivity.TAG, log.getMessage());
}
});
}
public void enableStatisticsCallback() {
FFmpegKitConfig.enableStatisticsCallback(new StatisticsCallback() {
@Override
public void apply(final Statistics newStatistics) {
MainActivity.addUIAction(new Runnable() {
@Override
public void run() {
PipeTabFragment.this.statistics = newStatistics;
updateProgressDialog();
}
});
}
});
}
void startAsyncCatImageProcess(final String imagePath, final String namedPipePath) {
AsyncCatImageTask asyncTask = new AsyncCatImageTask();
asyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, imagePath, namedPipePath);
}
public void createVideo() {
final File image1File = new File(requireContext().getCacheDir(), "machupicchu.jpg");
final File image2File = new File(requireContext().getCacheDir(), "pyramid.jpg");
final File image3File = new File(requireContext().getCacheDir(), "stonehenge.jpg");
final File videoFile = getVideoFile();
final String pipe1 = FFmpegKitConfig.registerNewFFmpegPipe(requireContext());
final String pipe2 = FFmpegKitConfig.registerNewFFmpegPipe(requireContext());
final String pipe3 = FFmpegKitConfig.registerNewFFmpegPipe(requireContext());
try {
// IF VIDEO IS PLAYING STOP PLAYBACK
videoView.stopPlayback();
if (videoFile.exists()) {
videoFile.delete();
}
Log.d(TAG, "Testing PIPE with 'mpeg4' codec");
showProgressDialog();
ResourcesUtil.resourceToFile(getResources(), R.drawable.machupicchu, image1File);
ResourcesUtil.resourceToFile(getResources(), R.drawable.pyramid, image2File);
ResourcesUtil.resourceToFile(getResources(), R.drawable.stonehenge, image3File);
final String ffmpegCommand = Video.generateCreateVideoWithPipesScript(pipe1, pipe2, pipe3, videoFile.getAbsolutePath());
Log.d(TAG, String.format("FFmpeg process started with arguments\n'%s'.", ffmpegCommand));
FFmpegKit.executeAsync(ffmpegCommand, new FFmpegSessionCompleteCallback() {
@Override
public void apply(final FFmpegSession session) {
final SessionState state = session.getState();
final ReturnCode returnCode = session.getReturnCode();
Log.d(TAG, String.format("FFmpeg process exited with state %s and rc %s.%s", state, returnCode, notNull(session.getFailStackTrace(), "\n")));
hideProgressDialog();
// CLOSE PIPES
FFmpegKitConfig.closeFFmpegPipe(pipe1);
FFmpegKitConfig.closeFFmpegPipe(pipe2);
FFmpegKitConfig.closeFFmpegPipe(pipe3);
MainActivity.addUIAction(new Runnable() {
@Override
public void run() {
if (ReturnCode.isSuccess(returnCode)) {
Log.d(TAG, "Create completed successfully; playing video.");
playVideo();
} else {
Popup.show(requireContext(), "Create failed. Please check logs for the details.");
}
}
});
}
});
// START ASYNC PROCESSES AFTER INITIATING FFMPEG COMMAND
startAsyncCatImageProcess(image1File.getAbsolutePath(), pipe1);
startAsyncCatImageProcess(image2File.getAbsolutePath(), pipe2);
startAsyncCatImageProcess(image3File.getAbsolutePath(), pipe3);
} catch (IOException e) {
Log.e(TAG, String.format("Create video failed %s.", Exceptions.getStackTraceString(e)));
Popup.show(requireContext(), "Create video failed");
}
}
protected void playVideo() {
MediaController mediaController = new MediaController(requireContext());
mediaController.setAnchorView(videoView);
videoView.setVideoURI(Uri.parse("file://" + getVideoFile().getAbsolutePath()));
videoView.setMediaController(mediaController);
videoView.requestFocus();
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
videoView.setBackgroundColor(0x00000000);
}
});
videoView.setOnErrorListener(new MediaPlayer.OnErrorListener() {
@Override
public boolean onError(MediaPlayer mp, int what, int extra) {
videoView.stopPlayback();
return false;
}
});
videoView.start();
}
protected File getVideoFile() {
return new File(requireContext().getFilesDir(), "video.mp4");
}
public void setActive() {
Log.i(MainActivity.TAG, "Pipe Tab Activated");
enableLogCallback();
enableStatisticsCallback();
Popup.show(requireContext(), getString(R.string.pipe_test_tooltip_text));
}
protected void showProgressDialog() {
// CLEAN STATISTICS
statistics = null;
progressDialog.show();
}
protected void updateProgressDialog() {
if (statistics == null) {
return;
}
int timeInMilliseconds = this.statistics.getTime();
if (timeInMilliseconds > 0) {
int totalVideoDuration = 9000;
String completePercentage = new BigDecimal(timeInMilliseconds).multiply(new BigDecimal(100)).divide(new BigDecimal(totalVideoDuration), 0, BigDecimal.ROUND_HALF_UP).toString();
TextView textView = progressDialog.findViewById(R.id.progressDialogText);
if (textView != null) {
textView.setText(String.format("Creating video: %% %s.", completePercentage));
}
}
}
protected void hideProgressDialog() {
progressDialog.dismiss();
MainActivity.addUIAction(new Runnable() {
@Override
public void run() {
PipeTabFragment.this.progressDialog = DialogUtil.createProgressDialog(requireContext(), "Creating video");
}
});
}
}
| java |
<filename>src/app/game/game.scene.ts
import 'Phaser';
export class GameScene extends Phaser.Scene {
init(): void {
}
preload(): void {
this.load.image('logo', 'assets/img/logo.png');
}
create(): void {
console.log('creating scene');
const centerX = this.game.canvas.width / 2;
const centerY = this.game.canvas.height / 2;
const logo = this.add.sprite(centerX, centerY, 'logo');
logo.setInteractive();
logo.on('pointerdown', () => this.onLogoClick());
logo.on('pointerup', () => this.onLogoUnClick());
const info = this.add.text(10, 10, '---', { font: '24px Arial Bold', fill: '#FBFBAC' });
info.name = 'textCounter';
const txtClick = this.add.text(10, 30, 'no click', { font: '24px Arial Bold', fill: '#FBFBAC' });
txtClick.name = 'textClicker';
console.log('creating scene complete');
}
update(time: number): void {
const info = this.children.getByName('textCounter') as Phaser.GameObjects.Text;
info.setText(this.game.canvas.width + 'x' + this.game.canvas.height + ' T: ' + time);
}
onLogoClick(): void {
const txtClick = this.children.getByName('textClicker') as Phaser.GameObjects.Text;
txtClick.setText('clicked');
}
onLogoUnClick(): void {
const txtClick = this.children.getByName('textClicker') as Phaser.GameObjects.Text;
txtClick.setText('unclicked');
}
}
| typescript |
/**
* \class SmartCar
* A class to programmatically represent a vehicle equipped with odometers and a heading
* sensor
*/
#pragma once
#include "../distance/DistanceCar.hpp"
#include "../heading/HeadingCar.hpp"
#ifdef SMARTCAR_BUILD_FOR_ARDUINO
#include "../../runtime/arduino_runtime/ArduinoRuntime.hpp"
extern ArduinoRuntime arduinoRuntime;
#endif
class SmartCar : public DistanceCar, public HeadingCar
{
public:
#ifdef SMARTCAR_BUILD_FOR_ARDUINO
/**
* Constructs a car equipped with a heading sensor and an odometer
* @param control The car's control
* @param headingSensor The heading sensor
* @param odometer The odometer
*
* **Example:**
* \code
* BrushedMotor leftMotor(smartcarlib::pins::v2::leftMotorPins);
* BrushedMotor rightMotor(smartcarlib::pins::v2::rightMotorPins);
* DifferentialControl control(leftMotor, rightMotor);
*
* GY50 gyroscope(37);
* DirectionlessOdometer odometer(100);
* SmartCar car(control, gyroscope, odometer);
* \endcode
*/
SmartCar(Control& control,
HeadingSensor& headingSensor,
Odometer& odometer,
Runtime& runtime = arduinoRuntime);
/**
* Constructs a car equipped with a heading sensor and two odometers
* @param control The car's control
* @param headingSensor The heading sensor
* @param odometerLeft The left odometer
* @param odometerRight The right odometer
*
* **Example:**
* \code
* BrushedMotor leftMotor(smartcarlib::pins::v2::leftMotorPins);
* BrushedMotor rightMotor(smartcarlib::pins::v2::rightMotorPins);
* DifferentialControl control(leftMotor, rightMotor);
*
* GY50 gyroscope(37);
*
* const auto pulsesPerMeter = 600;
*
* DirectionlessOdometer leftOdometer(
* smartcarlib::pins::v2::leftOdometerPin, []() { leftOdometer.update(); }, pulsesPerMeter);
* DirectionlessOdometer rightOdometer(
* smartcarlib::pins::v2::rightOdometerPin, []() { rightOdometer.update(); },
* pulsesPerMeter);
*
* SmartCar car(control, gyroscope, leftOdometer, rightOdometer);
* \endcode
*/
SmartCar(Control& control,
HeadingSensor& headingSensor,
Odometer& odometerLeft,
Odometer& odometerRight,
Runtime& runtime = arduinoRuntime);
#else
SmartCar(Control& control, HeadingSensor& headingSensor, Odometer& odometer, Runtime& runtime);
SmartCar(Control& control,
HeadingSensor& headingSensor,
Odometer& odometerLeft,
Odometer& odometerRight,
Runtime& runtime);
#endif
/**
* Adjusts the speed when cruise control is enabled and calculates the current heading.
* You must have this being executed as often as possible for highest
* accuracy of heading calculations and cruise control.
*
* **Example:**
* \code
* void loop() {
* // Update the car readings as often as possible
* car.update();
* // Other functionality
* }
* \endcode
*/
virtual void update() override;
/* Use the overriden functions from DistanceCar */
using DistanceCar::overrideMotorSpeed;
using DistanceCar::setSpeed;
};
/**
* \example SmartCar.ino
* A basic example on how to use the core functionality of the SmartCar class.
*
* \example automatedMovements.ino
* An example of how to use the SmartCar functionality in order to perform a series
* of automated movements using the vehicle's HeadingSensor and Odometer capabilities.
*
* \example rotateOnSpot.ino
* An example on how to make a SmartCar rotate on spot by using the HeadingSensor
* and the SmartCar::overrideMotorSpeed functionality.
*/
| cpp |
Australia appointed Cummins as the sole vice-captain in Tests after he had previously shared the role with Travis Head.
Michael Clarke wants Pat Cummins to succeed Tim Paine as the the next Australia Test captain. Paine, who is at the fag end of his international career, has been leading Australia in the longer format since the 2018 ball-tampering scandal led to 12-month bans on the then captain Steve Smith and his deputy David Warner.
Smith and Warner, alongside Cameron Bancroft were banned from professional cricket for heir roles in the Newlands ball-tampering scandal. All three have returned to playing international cricket since that incident.
However, there’s been no change on the leadership front with Paine continuing as the Test skipper while Aaron Finch handling the responsibility in the ODIs and T20Is.
Australia appointed Cummins as the sole vice-captain in Tests after he had previously shared the role with Travis Head.
“Hopefully he gets an opportunity along the way to captain in certain games, whether it be Australia A or whether it be a tour game, whatever it is, which I’m sure he will,” he added.
Recently, Smith was asked whether he would love to captain Australia again and he revealed discussions have taken place in that regards. However, he’s comfortable with how things are at the moment.
Australia head coach Justin Langer was also asked about Smith being reappointed and he said it’s too early to say that and a process has to be followed before that to happen.
Clarke is a former Australia captain himself who led them to the 2015 ODI World Cup title following which he retired. He doesn’t buy the idea that a batsman is better suited to lead than a bowler. | english |
Fortnite Chapter 4 Season 3 was just released, and many players are excited to try it out. Epic Games has released numerous new features with the season, including the new Battle Pass, which includes eight different skins, from Optimus Prime to a new version of Ruin, a popular character from the first chapter of the video game.
A new version of Meowscles was leaked right before the season came out, and it turns out that this character is the secret skin of the new Battle Pass. This is somewhat surprising, but considering that many Fortnite players love Meowscles, they'll be more than happy to unlock him.
The reason this is unusual is because the secret skin is typically reserved either for a collaboration or a storyline character. However, there is a chance that the popular cat character will play a role in the events of Fortnite Chapter 4 Season 3.
Meowscles is one of the most popular Fortnite characters of all time. Many players have been asking Epic Games to bring him back to the game, but that wasn't possible since he wasn't an Item Shop skin.
The character was first released in the Chapter 2 Season 2 Battle Pass. His new version has now been released in Fortnite Chapter 4 Season 3, and he can be unlocked with the Battle Pass once again.
At the moment, it's unclear what players need to do to unlock the secret skin in Fortnite Chapter 4 Season 3. However, considering that the previous seasons required players to complete a special questline for secret skins, that will likely be the case with Purradise Meowscles as well.
Epic Games has added three different variants of the popular character, so there is no doubt that many players will try to unlock him as soon as possible. However, it's important to add that since Meowscles is a Battle Pass character, it's necessary to spend 950 on the Battle Pass before he can be unlocked.
Apart from the skin, there are many other Meowscles-themed cosmetic items in the Fortnite Chapter 4 Season 3 Battle Pass. Players can also unlock a special loading screen, emote, music pack, glider, several wraps, and much more.
Considering that Purradise Meowscles is a secret skin, he may not be obtainable on the first day of the new season. However, Epic Games will likely make him available in July. | english |
{
"name": "@imqueue/pg-pubsub",
"version": "1.6.0",
"description": "Reliable PostgreSQL LISTEN/NOTIFY with inter-process lock support",
"keywords": [
"listen",
"notify",
"postgres",
"postgresql",
"pg-listen",
"pg-notify",
"pubsub",
"publish",
"subscribe",
"events",
"publish-subscribe",
"inter-process-lock"
],
"scripts": {
"prepublishOnly": "npm run build",
"postpublish": "./bin/wiki.sh",
"clean:dts": "find . -name '*.d.ts' -not -wholename '*node_modules*' -type f -delete",
"clean:map": "find . -name '*.js.map' -not -wholename '*node_modules*' -type f -delete",
"clean:js": "find . -name '*.js' -not -wholename '*node_modules*' -not -wholename '*bin*' -type f -delete",
"clean:build": "rm -rf ./node_modules/@types ; find . -name '*.js.map' -type f -delete ; find . -name '*.ts' -type f -delete",
"clean:test": "rm -rf .nyc_output coverage",
"clean:doc": "rm -rf docs",
"clean:wiki": "rm -rf wiki",
"clean": "npm run clean:test ; npm run clean:dts ; npm run clean:map ; npm run clean:js ; npm run clean:doc ; npm run clean:wiki",
"build": "tsc",
"mocha": "nyc mocha",
"show:test": "/usr/bin/env node -e \"require('open')('file://`pwd`/coverage/index.html',{wait:false});\"",
"show:doc": "/usr/bin/env node -e \"require('open')('file://`pwd`/docs/index.html',{wait:false});\"",
"test": "npm run build && npm run mocha && npm run show:test && ((test ! -z \"${CI}\" && nyc report --reporter=text-lcov | coveralls) || exit 0)",
"doc": "npm run clean && typedoc --excludePrivate --excludeExternals --hideGenerator --exclude \"**/+(debug|test|node_modules|docs|coverage|.nyc_output|examples)/**/*\" --mode file --out ./docs --plugin typedoc-plugin-as-member-of . && npm run show:doc",
"wiki": "npm run clean && typedoc --excludePrivate --excludeExternals --hideGenerator --exclude \"**/+(debug|test|node_modules|docs|coverage|.nyc_output|examples)/**/*\" --mode file --out ./wiki --plugin typedoc-plugin-as-member-of,typedoc-plugin-markdown --hideSources --theme markdown . && ./bin/rename.js",
"help": "npm-scripts-help"
},
"author": "<EMAIL> <<EMAIL>>",
"license": "ISC",
"repository": {
"type": "git",
"url": "git://github.com/imqueue/pg-pubsub.git"
},
"bugs": {
"url": "https://github.com/imqueue/pg-pubsub/issues"
},
"homepage": "https://github.com/imqueue/pg-pubsub",
"dependencies": {
"@types/node": "^17.0.29",
"@types/pg": "^8.6.5",
"@types/pg-format": "^1.0.2",
"murmurhash-native": "^3.5.0",
"pg": "^8.7.3",
"pg-format": "^1.0.4",
"uuid": "^8.3.2"
},
"devDependencies": {
"@types/chai": "^4.3.1",
"@types/mocha": "^9.1.1",
"@types/mock-require": "^2.0.1",
"@types/sinon": "^10.0.11",
"@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^5.21.0",
"@typescript-eslint/parser": "^5.21.0",
"@typescript-eslint/typescript-estree": "^5.21.0",
"chai": "^4.3.6",
"coveralls": "^3.1.1",
"eslint": "^8.14.0",
"glob": "^8.0.1",
"minimist": "^1.2.6",
"mocha": "^9.2.2",
"mocha-lcov-reporter": "^1.3.0",
"mock-require": "^3.0.3",
"npm-scripts-help": "^0.8.0",
"nyc": "^15.1.0",
"open": "^8.4.0",
"sinon": "^13.0.2",
"source-map-support": "^0.5.21",
"ts-node": "^10.7.0",
"typedoc": "^0.22.15",
"typedoc-plugin-as-member-of": "^1.0.2",
"typedoc-plugin-markdown": "^3.12.1",
"typescript": "^4.6.3"
},
"main": "index.js",
"typescript": {
"definitions": "index.d.ts"
},
"nyc": {
"check-coverage": true,
"extension": [
".ts"
],
"exclude": [
"**/*.d.ts",
"**/test/**",
"**/examples/**"
],
"require": [
"ts-node/register"
],
"reporter": [
"html",
"text",
"text-summary",
"lcovonly"
]
}
}
| json |
The latest Peugeot 508 is already a very desirable car that's transformed the 508 nameplate, but things are set to get even more interesting for it, with Peugeot announcing it intends to produce a high-output hybrid version next year. Instead of being just another petrol/electric hybrid with moderately better fuel economy than a regular 508, the main focus of this particular plug-in hybrid will be performance.
The new model will offer top-of-the-range performance and a limited electric-only capability for the 508's sporty GT trim, thanks to a mild hybrid 1. 6-liter petrol engine driving the front wheels and an electric motor in the back to drive the rear wheels. If that setup sounds familiar it could be because it's the same system that's been confirmed for the DS 7 Crossback E-Tense, which is another model based on PSA's EMP2 platform, due to go on sale next year. 2018 Peugeot 508. (Image: AFP Relaxnews)
The 508 PHEV's four-cylinder engine, which will be assisted by a starter/generator motor, is expected to generate a total system power of around 200bhp. The electric motor driving the rear wheels will be responsible for providing approximately 100bhp of that, and will be capable of propelling the 508 PHEV on electric-only for a range of approximately 31 miles. Energy for the electric motor will be provided by a lithium-ion battery under the floor of the boot. Although that's normally where the spare wheel is to be found, the design of the EMP2 platform means this won't impact boot space in either fastback or estate body styles.
An eight-speed automatic is expected to be the only gearbox offered, and the same system is also set to be employed in the plug-in hybrid versions of the 3008 and 5008 SUVs that are in the pipeline, and are also built on the versatile EMP2 platform. PSA has ambitious plans to electrify every model in its portfolio, with larger models getting plug-in hybrids while smaller models like the Peugeot 208 will be offered in fully electric versions. | english |
Russian mercenary chief Yevgeny Prigozhin reveals Wagner Group's future plans, amid uncertainty and concerns over their activities in Africa.
The Kremlin said on Monday that Russian President Vladimir Putin met with Wagner mercenary chief Yevgeny Prigozhin on June 29, five days after the group marched towards Moscow in a short-lived rebellion.
In a video made public on Monday, Valery Gerasimov, the Chief of the General Staff of Russia, was seen giving orders to subordinates to attack Ukrainian missile positions. This was his first public outing since an aborted Wagner mercenary uprising on June 24.
Following negotiations facilitated by Alexander Lukashenko to resolve the mutiny in Russia, charges against Wagner boss Yevgeny Prigozhin were dropped, and he was granted permission to relocate to Belarus.
Kyiv has reported that a conflict has erupted between Vladimir Putin's Federal Security Service (FSB) and Russia's Defence Ministry following the mutiny of the Wagner group. Reports add that a plot to assassinate the Russian President was also foiled by secret services.
Belarus President Alexander Lukashenko on Tuesday revealed what transpired during a phone call with Russian counterpart Vladimir Putin, hours before Wagner boss Yevgeny Prigozhin aborted the mutiny on Saturday.
Russian authorities said they have closed a criminal investigation into the armed rebellion led by mercenary chief Yevgeny Prigozhin, with no charges against him or any of the other participants. The announcement was the latest twist in series of stunning events in recent days that have brought the gravest threat so far to President Vladimir Putin’s grip on power.
On Monday, Russian President Vladimir Putin appeared in a video where he addressed an engineering forum, two days after the aborted Wagner mutiny. However, the original date of the video and where it was recorded remains unknown.
Wagner boss Yevgeny Prigozhin on Monday said his march on Moscow revealed "most serious security problems across the entire country," claiming that his units had managed to block "all" Russian military units and airfields in their path.
Russian President Vladimir Putin's video was released moments after Russian PM Mikhail Mishustin declared that the nation had suffered "a challenge to its stability" and needed to remain united.
Russia’s Prime Minister Mikhail Mishustin on Monday said Russia has faced “a challenge to its stability”, and must remain united behind President Vladimir Putin.
According to the Russian media, Wagner mercenary group chief Yevgeny Prigozhin is still being investigated by authorities despite Kremlin's promise to drop all charges against him after weekend mutiny.
Wagner chief Yevgeny Prigozhin demanded Russia's Defence Minister Sergei Shoigu be removed when he launched his rebellion, but a video shows him very much still in post as he visits troops in Ukraine.
US has said the Wagner Group's short-lived rebellion shows the "cracks" in Vladimir Putin's power. US Secretary of State Antony Blinken told US media that the mutiny was a "direct challenge to Putin's authority".
Wagner's leader, Yevgeny Prigozhin, was exiled to Belarus on Saturday as part of a deal to put an end to his uprising against the Kremlin. | english |
According to several sources, Apple has already begun flexing its supply chain muscles by shipping so many units of upcoming devices from its manufacturing facilities to sales outlets that it is causing delays for other manufacturers.
Apple shipments via major concerns like FedEx and UPS are said to be ‘incredibly high’ for the holiday quarter, pointing to a massive number of iPhones and whatever other units Apple announces for the fall season incoming. The company is apparently flooding its channels with devices, causing shipments for other ‘top tier’ device makers to be delayed to make way for Apple products.
One other manufacturer was reportedly told by shippers that they couldn’t meet some deadlines because they were booked up servicing a ‘very important customer’.
If Apple is displacing shipments from other manufacturers with its volume then it wouldn’t be the first time. An account given by logistics exec John Martin to Businessweek a couple of years ago gives a few examples:
It also points to Apple’s hopes to sell an enormous number of devices in the holiday quarter. Reportedly, those include at least one new iPhone and updates to the iPad — a rumored wearable device is reported to be announced but shipped next year.
Creative Strategies analyst Ben Bajarin estimates (subscription required) that — provided it can make enough of them — Apple could sell in the mid-60 million iPhones in the holiday quarter.
Samsung having pushed a lot of phones last quarter to cover up some of its sales slump issues could bite it in the butt if Apple eats up shipping capacity in a way that makes it tough for the company to get the new Galaxy models into the country.
| english |
{"judges":[],"court":"Court of Appeals of Virginia","api_url":"opinions\/1892944.json","author":null,"text":{"pdf":"http:\/\/www.courts.state.va.us\/opinions\/opncavwp\/1892944.pdf","text":"opinions\/1892944.txt"},"cited_laws":null,"cited_cases":null,"number":"1892944","name":"<NAME> etc, et al v <NAME>","date_published":"5\/09\/1995","parties":{"plaintiff":"Davey Tree etc, et al","defendant":"<NAME>"},"attorneys":[],"outcome":null,"type":null,"is_published":true} | json |
<reponame>agmen-hu/consoloid-console<filename>Consoloid/Topic/LoadDialog.js
defineClass('Consoloid.Topic.LoadDialog', 'Consoloid.Ui.Dialog',
{
__constructor: function(options)
{
this.__base($.extend({
responseTemplateId: 'Consoloid-Topic-Load',
}, options));
},
setup: function()
{
var console = this.get('console');
this.topicLoaded = console.isTopicLoaded(this.arguments.name.value)
if (!this.topicLoaded) {
console.loadTopic(this.arguments.name.value);
}
}
}
); | javascript |
A subscription to JoVE is required to view this content.
You will only be able to see the first 2 minutes.
The JoVE video player is compatible with HTML5 and Adobe Flash. Older browsers that do not support HTML5 and the H.264 video codec will still use a Flash-based video player. We recommend downloading the newest version of Flash here, but we support all versions 10 and above.
If that doesn't help, please let us know.
We describe a simple and efficient method for isolating cells of the retinal pigment epithelium (RPE) cells from the eyes of young pigmented guinea pigs. This procedure allows for follow-up molecular biology studies on the isolated RPE, including gene expression analyses.
Retinal pigment epithelium or RPE is critical for the retinal health. And studying the isolated RPE is crucial for the retinal disease. This method of RPE isolation from the guinea pig, a popular myopia model, aids in solving the challenging problem.
The main advantage of this technique is that it is relatively simple and yield high-quality RPE sample suitable for the biological molecular studies including the RPE analysis. By perfectly following the technique demonstrated and observing how to manipulate the dissecting tools, one can master this procedure quickly with some practice. After humanely euthanizing the guinea pig and enucleating the animal's eyes, immediately wash the eyes by transferring them to a 10 centimeter Petri dish containing sterile phosphate buffered saline or PBS.
After washing, transfer the eyes to fresh PBS solution. Now working under a dissecting microscope, use an 18 gauge needle to make an initial small opening in the sclera of one eye, approximately one millimeter behind the limbal boundary between the cornea and sclera. Using scissors, remove the anterior segment, including the cornea, iris, ciliary body, and crystalline lens.
Then working with a remaining posterior ocular segment, use forceps to grasp and gently tug on the zonule of Zinn, followed by detaching the retina from RPE/choroid/sclera complex, and peeling away the retina without fragmentation. After the retina has been completely removed, immerse the remaining posterior eye cup, which includes the RPE, choroid, and sclera in one of the wells of a 12-well plate containing two milliliters of tissue storage reagent and keep it immersed for five minutes. To rinse away the storage reagent, transfer the eye cup to another well filled with four milliliters of PBS for 10 seconds before moving it to a third well filled with two milliliters of PBS.
Before proceeding to the final RPE isolation step, prepare a one milliliter syringe filled with PBS and attach a 30 gauge needle. Gently push on the syringe plunger to create a jet stream of PBS. Working under a microscope, first, aim this stream of PBS at the RPE to make a small tear or hole in it.
Then direct the stream of PBS into the created opening to detach the RPE as a sheet from the choroid. After detaching the RPE from the choroid, collect the RPE cells in a needleless one milliliter syringe and transfer the collected sample to a 1.5 milliliter tube. Centrifuge the tube with the collected RPE at 8, 000 x g for one minute to obtain an RPE pellet.
For samples to be used in RNA analyses, discard the supernatant, that is the PBS solution, and replace it with 350 milliliters of lysis buffer as included in RNA isolation kits. Pipet the content up and down 20 times to mix well and preserve the quality of the sample. For long-term storage and preservation, transfer the samples to a minus 80 degree Celsius freezer.
Use an RNA isolation kit and follow the manufacturer's instructions to isolate and collect the RNA from the RPE samples before evaluating the quality of the sample via electrophoresis. In our study, the collected RPE samples showed well preserved RNA having an RNA integrity number or RIN greater than eight. The total RNA count of around 240 nanograms per eye.
The expression level of the RPE specific gene, Rpe65, was found to be significantly higher in the RPE samples than in choroid and sclera. In contrast, the RPE samples showed minimal expression of the selected choroid sclera specific gene, collagen type alpha-one, indicating the absence of choroidal and scleral contaminants in the isolated RPE samples. The most important step of the procedure is the smooth removal of the retina without leaving behind any retinal fragment.
This RPE isolation procedure warrants explanation in vitro cell culture studies with some important differences, including the choice of media for immersing the RPE cells after the isolation.
| english |
Patna, March 14 (UNI) – Bihar assembly was adjourned till lunch on Tuesday following ruckus created by the opposition on the issues of corruption and crime during which a BJP MLA allegedly broke the mike triggering heated exchange between the ruling coalition and the opposition.
The BJP MLA Lakhendra Paswan, through his supplementary question stood up to demand enhancement in the wages of Aanganwadi sevikas but as his mike had no sound, he forcibly objected to it holding the mike which broke . To this the ruling parties members strongly objected and the Speaker Awadh Bihari Chowdhary said that action would be taken against such an act.
Paswan said that he was stopped from speaking and the ruling members were using abusive words. Amid uproar, the opposition members trooped to the well and shouted slogans against the government following which the entire house plunged into noise.
The speaker later adjourned the proceedings of the house till 2:00 p. m. during pre lunch sitting.
As the house had assembled for the day the leader of the opposition in the state assembly Vijay Kumar Sinha tried to draw the attention of the speaker towards some issues but in the mean time Satyadev RAM of CPI ML raised a point of order regarding Senate’s meeting of Jaiprakash Narayan Chhapra University of which some MLAs were also members.
The opposition leader Vijay Kumar Sinha raising the issues of corruption and crime said that the Chief Minister Nitish Kumar was boasting the moral of the criminals and those indulged in corruption.
He also raised the issue of inferno in Kishanganj and demanded a reply on it from the government.
Sinha said it seems there was a complete Gundaraj and the ruling members were behaving like gundas.
He demanded from the chair to accept the adjournment motion moved by the opposition members on it.
To this the speaker asked Sinha to furnish evidence on the issues of corruption and crime raised by him only then it would be discussed and took up the short noticed question proceedings of question hour.
Creating noise the opposition members meanwhile entered into the well and shouted slogans against the government demanding resignation from the Deputy Chief Minister Tejaswi Prasad Yadav in connection with land for job scam.
The opposition leader asked the speaker to bring the house in order and listen to the issues of the members instead of running the house one sidedly.
To this the parliamentary affairs minister Vijay Kumar Choudhary said that the government would make a reply even on the serious issues if raised as per the laid rules and regulations of the house.
Objecting to it the opposition leader Vijay Sinha, a former speaker of the house, referring to the laid rules and regulations said that if only 10 members stand up on some issue it is taken up whereas at present more than 50 members were on their toes on the serious issues including corruption and crime as well as communal tension in Kishanganj were the Hindus were being scared.
The speaker however said that the rules and regulations have been mentioned in the rules and business of the house and requested the opposition leader to raise the issues in writing.
Countering it the opposition leader said that written notice has already been moved in the form of adjournment motion notice as per the laid rules and regulations.
Later, the opposition members resumed their seats and the question our proceedings continued. | english |
Producer-director Rajkumar Santoshi has announced the launch of his next movie Rashk.
The movie will star Aamir Khan, Shahrukh Khan & Kareena Kapoor in lead roles. The film will be presented by Bharat Shah. A.R. Rahman will compose the music. The movie will go on the floors from February 2001.
Catch us for latest Bollywood News, New Bollywood Movies update, Box office collection, New Movies Release , Bollywood News Hindi, Entertainment News, Bollywood Live News Today & Upcoming Movies 2024 and stay updated with latest hindi movies only on Bollywood Hungama.
| english |
The biggest event in the game of cricket only happens once in 4 years, and it is every cricketer's dream to achieve that World Cup glory at least once in their career. Even the great Sachin Tendulkar had to wait for 22 years to attain an elusive World Cup win to his name.
There are plenty of budding Indian cricketers who take up cricket as their profession after watching their heroes lift the Cup. But the real challenge for a cricketer in India is to sustain himself for a long time as there are many who want a piece of the same cherry.
There are some legends who achieved everything in their careers playing for India but for the World Cup, which always seemed to have eluded them. Here are some of those who didn't win the Cup in their illustrious career.
VVS Laxman will be long remembered as one of the best middle order batsmen in the history of Indian cricket and as a part of the famous Fab 4 of the same. His strokeplay is immaculate and he is one of the greatest players in the 4th innings of a Test Match with a history of match-winning performances.
Laxman is one of the few players who has dominated the potent Australia pace attacks single-handedly. He has achieved many things in his career as a Test player but one thing he will look back with disappointment is his ODI career for India. Laxman has featured in 86 limited overs matches for India scoring 2338 runs but none in a World cup. He is one of the greatest Test match players who has not represented his nation in the mega event even once.
Javagal Srinath was probably India's fastest bowler in the 1990s. He was the leader of the Indian pace attack and was the lone warrior for them in red-ball cricket after the retirement of Kapil Dev. He was also the fastest Indian to reach 100 ODI wickets and the first one from the country to breach the 300 wickets mark in the limited overs format.
But the one thing that has eluded the now-Match Referee is a World Cup glory. Srinath has represented India in as many as 4 World cups and is the joint leading wicket-taker along with Zaheer with 44 scalps for them as far as the mega tournament is concerned, but failed to win a single one.
He has found success in the longer format too with 236 wickets from 67 Test matches where he has represented India.
Anil Kumble is the leading wicket-taker in both the Test and the ODI formats of the game for India, but was never a World Cup winner. Kumble had the ability to run through batting lineups throughout his career and has found tremendous success, but like many other legends, he too had an indifferent World Cup career.
He represented India in 3 World Cups but failed to lift the Cup on each occasion, with the 1996 edition proving to be his personal best in which he snapped 15 wickets in seven matches.
Kumble, throughout his career, has created many records ranging from being the third highest wicket-taker in the history of Test Cricket, to being only the 2nd player to take all 10 wickets in a single Test innings. He has done it all except for a World Cup win.
Mohammad Azharuddin has had a career with many ups, and downs. He has a distinction of leading India in as many as 3 World Cups (an Indian record) but didn't have enough to go all the way in winning them the tournament. He has captained India in 174 ODIs, and 47 Test matches. He was also the first player in the history of the game to feature in more than 300 ODIs and was 1 shy of representing 100 Test matches for India.
Till date, Azharuddin is the only cricketer with the distinction of scoring a century in each of his first three Tests. He did this in his debut series against England. He is also one of the 4 cricketers to score a century in his first and his last Test matches.
With all being said, Azharuddin would have hoped for a World Cup win but it was not be in his 4 attempts.
Rahul Dravid was branded as a Test match specialist for so long when he entered the International arena, but the 1999 World Cup proved to be a turning point in his career as an ODI batsman. He scored 2 centuries in that tournament and ended up as a leading scorer in that edition of the Cup.
He and the Indians were within touching distance of lifting the Cup in the 2003 edition but were dominated in the finals by a ruthless Australian team. In the 2007 World Cup, he led the team but were shown the door in the group stages of the tournament.
Dravid is one of the few players in the world to have crossed the 10,000-run mark in both the Test and ODI format and is one of the greatest of all time. He has been a thorough gentleman and a once-in-a-lifetime cricketer.
During his playing career, Ganguly established himself as one of the world's leading batsmen and also one of the greatest captains of the national cricket team. He is one of the most controversial figures ever to play the game in India. He was one who brought out the fighting spirit among Indians in overseas conditions.
While batting, he was especially prolific through the off side, earning himself the nickname 'God of the off-side' for his elegant strokeplay through the covers. Along with Tendulkar, he formed one of the most feared opening pairs in the history of ODIs.
Ganguly led the Indian team to the finals of the World Cup in the 2003 edition but what followed was a heartbreaking loss at the hands of the Aussies. The person who taught India to play fearless cricket was deprived of a World Cup win. | english |
Even if there are lots of different couples, this activity in pairs sometimes requires a little work (sometimes not at all, it spends if you, your guy or your girl are boloss or not). Fortunately, a lot of studies have been carried out on the question to give you a bit of a job. We’ve found 10 that give you some tips on how to make your relationship work, no matter what. Afterwards, in view of these studies, do we really want our couple to walk in these conditions? I do not believe.
The agreement in a couple goes largely through the ass. And according to a study, the couples who sext the most are the ones who are the most satisfied in bed. So you know what you have to do: change your plan and start exchanging naughty content with your significant other. ()
But otherwise you can also do as you feel like because not everyone wants to spend their life making the splotch (yes that’s my onomatopic way of talking about sex).
2. Avoid cleaning (when you’re a guy)
IT SO AS BY CHANCE HYPER PRACTICAL THIS STUDY SAY MY WORD.
Eh yes. There would be 50% more divorces when the man actively participates in household chores, this is what emerges from a Norwegian study on which we shit with all our soul.
3. Being teubé (when you are a woman)
According to a study, men are not very fond of smart women. Guess they feel a little threatened, so they prefer dating girls whose IQ is lower than theirs. Awesome isn’t it? That’s why I think it’s best to become a lesbian in order to live among intelligent and happy people. ()
4. And also have a shitty job (always when you’re a woman)
As with intelligence, men feel threatened by their partner’s professional success. A stupid reflex of an alpha male who is afraid of being castrated. It’s ridiculous but that’s how it is, we can’t help it. So ladies, if not stupid, try not to be too talented. THAAAAAAANKS. ()
5. Being tall (when you’re a guy)
If men prefer women who are less intelligent than them, women prefer tall men. It is indeed more difficult for the little guys to find a shoe that suits them. It’s cruel but that’s the way it is. ()
According to this study, the more expensive marriage is, the higher the chances of divorce. Our advice: do a little thing at Domac with some friends and manage to find a ring in a Kinder Surprise.
We might have thought the opposite (because we love to roll around in prejudices) but it seems that the couples born on the Internet are stronger than the others and are on the whole much more satisfied than the old school people who meet in bars or in parties, these big boloss. ()
PS: on the other hand, according to a study of myself, to speak of “one’s other half” would constitute a cause for premature divorce.
According to this Boston University study, social networks are frustrating and weaken couples. The more a member of the couple uses them, the more unhappy he is. To live happily, live disconnected.
It shouldn’t be too complicated to do, and a priori it’s not really binding unless you don’t have the same tastes as your partner, which can happen. The idea is that watching films together and debriefing them would allow you to get to know each other better. It makes sense, but that’s no reason to watch romantic comedies every night, we agree. ()
Basically, it’s better to do something that you both like than to do something together that one partner hates. A study that pleases everyone.
| english |
{
"name": "hyper-lighthaus",
"version": "1.1.2",
"description": "A Lighthaus theme for Hyper",
"main": "index.js",
"homepage": "https://github.com/lighthaus-theme/hyper#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/lighthaus-theme/hyper.git"
},
"keywords": [
"hyperterm",
"hyper",
"hyper.app",
"lighthaus",
"hyper-lighthaus",
"colorscheme",
"hyper-theme"
],
"author": "<NAME> (https://github.com/Brutuski)",
"contributors": [
{
"name": "<NAME>",
"url": "https://github.com/m0hammedimran"
}
],
"license": "MIT",
"bugs": {
"url": "https://github.com/lighthaus-theme/hyper/issues"
}
}
| json |
//! Sorting algorithms.
#[cfg(test)]
#[macro_use]
mod test_cases;
mod bubble_sort;
pub use self::bubble_sort::{bubble_sort, bubble_sort_optimized};
mod insertion_sort;
pub use self::insertion_sort::{binary_insertion_sort, insertion_sort};
mod selection_sort;
pub use self::selection_sort::selection_sort;
mod shellsort;
pub use self::shellsort::{shellsort, MARCIN_GAPS};
mod mergesort;
pub use self::mergesort::{mergesort, mergesort_bottom_up};
mod heapsort;
pub use self::heapsort::heapsort;
mod quicksort;
pub use self::quicksort::{
quicksort, quicksort_3way, quicksort_hoare, quicksort_manual_tco, quicksort_optimized,
};
mod bucket_sort;
pub use self::bucket_sort::bucket_sort;
mod counting_sort;
pub use self::counting_sort::counting_sort;
mod radix_sort;
pub use self::radix_sort::radix_sort;
mod timsort;
pub use self::timsort::timsort;
mod introsort;
pub use self::introsort::introsort;
mod pdqsort;
pub use self::pdqsort::pdqsort;
| rust |
<gh_stars>100-1000
import { compose, createStore, applyMiddleware } from 'redux';
import rootReducer from '../reducers';
import thunk from 'redux-thunk';
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
export default function configureStore(initialState) {
const store = createStore(rootReducer, initialState, composeEnhancers(
applyMiddleware(
thunk
)
));
if (module.hot) {
module.hot.accept('../reducers', () => {
const nextReducer = require('../reducers');
store.replaceReducer(nextReducer);
});
}
return store;
}
| javascript |
from ws_connection import ClientClosedError
from ws_server import WebSocketServer, WebSocketClient
import time
import random
class TestClient(WebSocketClient):
t=30
h=50
def __init__(self, conn):
super().__init__(conn)
def process(self):
try:
msg = self.connection.read()
self.t+=random.randint(0,10)-5
self.h+=random.randint(0,20)-10
self.connection.write("%d,%d"%(self.t,self.h))
time.sleep(0.2)
if not msg:
return
msg = msg.decode("utf-8")
items = msg.split(" ")
cmd = items[0]
if cmd == "Hello":
self.connection.write(cmd + " World")
print("Hello World")
except ClientClosedError:
self.connection.close()
class TestServer(WebSocketServer):
def __init__(self):
super().__init__("plot.html", 2)
def _make_client(self, conn):
return TestClient(conn)
server = TestServer()
server.start()
try:
while True:
server.process_all()
except KeyboardInterrupt:
pass
server.stop()
| python |
<filename>jodconverter-core/src/test/java/org/jodconverter/office/SimpleOfficeManagerPoolEntry.java
/*
* Copyright 2004 - 2012 <NAME> and contributors
* 2016 - 2019 <NAME> and contributors
*
* This file is part of JODConverter - Java OpenDocument Converter.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jodconverter.office;
import org.jodconverter.task.OfficeTask;
/**
* A SimpleOfficeManagerPoolEntry is responsible to execute tasks submitted through a {@link
* AbstractOfficeManagerPool} that does not depend on an office installation. It will simply submit
* tasks with a null office context and wait until the task is done or a configured task execution
* timeout is reached.
*
* @see AbstractOfficeManagerPool
*/
class SimpleOfficeManagerPoolEntry extends AbstractOfficeManagerPoolEntry {
/** Creates a new pool entry with default configuration. */
public SimpleOfficeManagerPoolEntry() {
this(new SimpleOfficeManagerPoolEntryConfig());
}
/**
* Creates a new pool entry for the specified office URL with the specified configuration.
*
* @param config The entry configuration.
*/
public SimpleOfficeManagerPoolEntry(final SimpleOfficeManagerPoolEntryConfig config) {
super(config);
}
@Override
protected void doStart() throws OfficeException {
taskExecutor.setAvailable(true);
}
@Override
protected void doExecute(final OfficeTask task) throws OfficeException {
// Simply execute the task
task.execute(null);
}
@Override
protected void doStop() throws OfficeException {
// Nothing to stop here.
}
}
| java |
{
"variants": {
"type=bottom": {
"model": "betterclay:block/bigger_purple_porcelain_bricks_slab"
},
"type=double": {
"model": "betterclay:block/bigger_purple_porcelain_bricks"
},
"type=top": {
"model": "betterclay:block/bigger_purple_porcelain_bricks_slab_top"
}
}
} | json |
She was already in a vulnerable state when her classmates Faseena and Jaseena ‘laid the trap’, Ashokan told the Supreme Court.
Ashokan, the father of a woman from Kerala whose conversion to Islam and marriage to a Muslim man set off a legal case that the Supreme Court is now hearing, told the court in an affidavit that there had been an attempt to take his daughter Hadiya to Yemen, Bar and Bench reported on Tuesday.
Ashokan had approached the Kerala High Court in January 2017, claiming that Muslim organisations planned to force Hadiya to join the Islamic State group, and that her husband Shafin Jahan was involved in terrorist activities. He had told the courts that two of Hadiya’s classmates at Sivaraj college in Salem – Faseena and Jaseena – had influenced her, and their father had got Hadiya to convert to Islam.
In this affidavit, Ashokan claimed that Hadiya was already in a vulnerable state before that. She had reportedly met a person named Shanib, who introduced her to his elder sister Sherin Shahana, The News Minute reported. Fasil Musthafa, Shahana’s husband, allegedly asked Hadiya to become his second wife and told her he would take her to Yemen.
After Hadiya’s friend Ambily counselled her against marrying Musthafa, she “withdrew from the marriage proposal”, Ashokan said. She was then taken to Popular Front of India leader AS Sainaba, who convinced her to convert to Islam, Ashokan alleged. Sainaba had earlier dismissed this allegation.
Ashokan, who had earlier said that his daughter had told him she wanted to go to Syria to rear sheep, told the court he did not record their conversation.
The court will hear the case again on Thursday. | english |
Feedback (2)
China Braided Hangers Factory – High-end Hotel Free Paint Beech Wood Shirt Hanger with Solid Wood Bar – Lipu Detail:
|Item No.:
|FOB Port:
The skirt hangers have a pant bar that allows users to hang pants, jeans,trousers,skirts, scarves ect.
The pant bar is rounded to eliminate the occurrence of creases and wrapped in a clear, grooved vinyl grip.
Flat body design keeps your clothes in good shapes and maximizes your closet storage space.
Designed with 360-degree swivel chrome anti-rust hook, you can hang and take clothes at any angle.
• Private label(woven label,print label,Etc.)
•Colors and package can be made as your requests,
Product detail pictures:
Related Product Guide:
High-quality comes 1st; support is foremost; business is cooperation" is our small business philosophy which is regularly observed and pursued by our organization for China Braided Hangers Factory – High-end Hotel Free Paint Beech Wood Shirt Hanger with Solid Wood Bar – Lipu , The product will supply to all over the world, such as: Benin, America, Uruguay, We've been consistently broadening the market within Romania in addition to preparation punching in extra premium quality merchandise connected with printer on t shirt so that you can Romania. Most people firmly believe we've the whole capacity to provide you happy solutions.
This is a very professional and honest Chinese supplier, from now on we fell in love with the Chinese manufacturing.
| english |
.header .advertiser {
width: 150px;
height: 2.25em;
margin-left: 0.4em;
}
.home .table {
margin-top: 3em;
}
| css |
Antigua and Barbuda have expressed their reservations over India’s request to revoke the citizenship of Mehul Choksi whose extradition has been sought by the Indian government, officials said.
Choksi and his nephew Nirav Modi are wanted in the Rs 13,578-crore fraud in Punjab National Bank (PNB). The case is being probed by the CBI and the Enforcement Directorate.
At a meeting with representatives of the Indian High Commission, Antigua and Barbuda officials reportedly said that they couldn’t annul Choksi’s citizenship as that would violate their constitution. They claimed he got citizenship only after his credentials were “verified. ” However, they assured Indian officials that they might consider New Delhi’s extradition request once a Red Corner Notice (RCN) is issued against him.
The National Central Bureau (NCB) of the Interpol in Antigua also informed CBI that Choksi is present in the country, CBI said on Thursday.
Sources, however, said that the key PNB scam accused is not under detention and had, in fact, been moving in and out of the country on an Antiguan passport.
Indian officials have received a photocopy of Choksi’s passport issued by the two Caribbean island nations but it does not have any local address. “There is only his photograph and details such as his father’s name, date of issue and expiry of the passport, crucial information about his address has not been shared,” said a senior official.
Choksi applied for Antiguan citizenship in November 2017 and took the oath of citizenship on January 15, 2018 — he left India on January 7 — under the much-debated Citizenship Investment Program.
Those holding Antigua and Barbuda passports enjoy visa-free travel to 132 countries, including the UK, Singapore and countries in the Schengen area.
On July 2, based on the CBI request, Interpol issued an RCN against Choksi’s nephew, Nirav Modi, his brother Neeshal Modi and close aide Subhash Parab in the alleged fraud which is being probed by the CBI and the Enforcement Directorate (ED).
Choksi is also an accused in the same case. However, an RCN request made on May 29 against him is pending before Interpol.
Choksi has challenged the agency’s request to issue the RCN citing poor law and order and failure of the state to provide him required security. The CBI has told Interpol that Choksi is an “economic offender” and the state would provide necessary protection to him.
In the absence of an extradition treaty between India and Antigua and Barbuda, the extradition request has been made through an affidavit which was drafted in accordance with the United Nations Convention against Corruption to which both Antigua and Barbuda and India are signatories.
Last week, a special CBI court affirmed the agency’s affidavit.
On July 23, the US Department of Justice, in a communication routed through the CBI, wrote to ED that it had not recorded details of Choksi’s movements but its “assessment is that he has flown out (of the USA) on an Antiguan passport”. Following this, sources said, Choksi again left Antigua and visited the US only to return by the weekend. | english |
28 So Isaac called Jacob and blessed him and charged him, and said to him, “You shall not marry one of the women of Canaan. 2 [a]Arise, go to Paddan-aram, to the house of Bethuel your mother’s father; and take from there as a wife for yourself one of the daughters of Laban your mother’s brother. 3 May [b]God Almighty bless you and make you fruitful and multiply you, so that you may become a [great] company of peoples. 4 May He also give the blessing of Abraham to you and your descendants with you, that you may inherit the [promised] land of your sojournings, which He gave to Abraham.” 5 Then Isaac sent Jacob away, and he went to Paddan-aram, to Laban, son of Bethuel the Aramean, the brother of Rebekah, the mother of Jacob and Esau.
6 Now Esau noticed that Isaac had blessed Jacob and sent him to Paddan-aram to take a wife for himself from there, and that as he blessed him he gave him a prohibition, saying, “You shall not take a wife from the daughters of Canaan,” 7 and that Jacob obeyed his father and his mother and had gone to Paddan-aram. 8 So Esau realized that [his two wives] the daughters of Canaan displeased Isaac his father; 9 and [to appease his parents] Esau went to [the family of] Ishmael and took as his wife, in addition to the wives he [already] had, Mahalath the daughter of Ishmael, Abraham’s son, the sister of Nebaioth [Ishmael’s firstborn son].
18 So Jacob got up early in the morning, and took the stone he had put under his head and he set it up as a pillar [that is, a monument to the vision in his dream], and he poured [olive] oil on the top of it [to [d]consecrate it]. 19 He named that place Bethel (the house of God); the previous name of that city was Luz (Almond Tree). 20 Then Jacob made a vow (promise), saying, “If God will be with me and will keep me on this journey that I take, and will give me food to eat and clothing to wear, 21 and if [He grants that] I return to my father’s house in safety, then the Lord will be my God. 22 This stone which I have set up as a pillar (monument, memorial) will be God’s house [a sacred place to me], and of everything that You give me I will give the tenth to You [as an offering to signify my gratitude and dependence on You].”(C)
- Genesis 28:3 Heb El Shaddai.
- Genesis 28:14 I.e. Jesus Christ (the Messiah) is a descendant of Jacob.
- Genesis 28:18 I.e. dedicate or declare something sacred for God’s purpose.
28 So Isaac called for Jacob and blessed(A) him. Then he commanded him: “Do not marry a Canaanite woman.(B) 2 Go at once to Paddan Aram,[a](C) to the house of your mother’s father Bethuel.(D) Take a wife for yourself there, from among the daughters of Laban, your mother’s brother.(E) 3 May God Almighty[b](F) bless(G) you and make you fruitful(H) and increase your numbers(I) until you become a community of peoples. 4 May he give you and your descendants the blessing given to Abraham,(J) so that you may take possession of the land(K) where you now reside as a foreigner,(L) the land God gave to Abraham.” 5 Then Isaac sent Jacob on his way,(M) and he went to Paddan Aram,(N) to Laban son of Bethuel the Aramean,(O) the brother of Rebekah,(P) who was the mother of Jacob and Esau.
6 Now Esau learned that Isaac had blessed Jacob and had sent him to Paddan Aram to take a wife from there, and that when he blessed him he commanded him, “Do not marry a Canaanite woman,”(Q) 7 and that Jacob had obeyed his father and mother and had gone to Paddan Aram. 8 Esau then realized how displeasing the Canaanite women(R) were to his father Isaac;(S) 9 so he went to Ishmael(T) and married Mahalath, the sister of Nebaioth(U) and daughter of Ishmael son of Abraham, in addition to the wives he already had.(V)
10 Jacob left Beersheba(W) and set out for Harran.(X) 11 When he reached a certain place,(Y) he stopped for the night because the sun had set. Taking one of the stones there, he put it under his head(Z) and lay down to sleep. 12 He had a dream(AA) in which he saw a stairway resting on the earth, with its top reaching to heaven, and the angels of God were ascending and descending on it.(AB) 13 There above it[c] stood the Lord,(AC) and he said: “I am the Lord, the God of your father Abraham and the God of Isaac.(AD) I will give you and your descendants the land(AE) on which you are lying.(AF) 14 Your descendants will be like the dust of the earth, and you(AG) will spread out to the west and to the east, to the north and to the south.(AH) All peoples on earth will be blessed through you and your offspring.[d](AI) 15 I am with you(AJ) and will watch over you(AK) wherever you go,(AL) and I will bring you back to this land.(AM) I will not leave you(AN) until I have done what I have promised you.(AO)”(AP)
18 Early the next morning Jacob took the stone he had placed under his head(AT) and set it up as a pillar(AU) and poured oil on top of it.(AV) 19 He called that place Bethel,[e](AW) though the city used to be called Luz.(AX)
- Genesis 28:14 Or will use your name and the name of your offspring in blessings (see 48:20)
- Genesis 28:19 Bethel means house of God.
Copyright © 2015 by The Lockman Foundation, La Habra, CA 90631. All rights reserved.
Holy Bible, New International Version®, NIV® Copyright ©1973, 1978, 1984, 2011 by Biblica, Inc.® Used by permission. All rights reserved worldwide.
NIV Reverse Interlinear Bible: English to Hebrew and English to Greek. Copyright © 2019 by Zondervan.
| english |
Pieter Strydom looks a little like Pink Floyd drummer Nick Mason. A Nick Mason older than in the glory days of the Floyd, when he had long, dark hair and a walrus moustache, and only slightly younger than the old man at their reunion at Live 8, who was described by Mark Blake as a "fifty-something businessman on a dress-down Friday". Strydom has a similar upper lip, made for walrus moustaches, and a slightly elusive demeanour when he talks. It's almost like he doesn't like to talk about serious things, a little like Mason, who didn't quite share the brooding seriousness of his band mates. It was Mason's fate to be part of heavy conversations.
It is Strydom's fate to keep being reminded of his involvement in the Hansie Cronje match-fixing scandal, though he has always maintained - and the King Commission cleared him - that he was not involved. Strydom was a player good enough to play 114 first-class matches and 139 List A ones. He was an attacking lower-middle-order batsman with a home-grown technique that featured heavy and awkward use of the bottom hand, and a left-arm spinner.
"It is quite often, huh," Strydom says when asked how often he gets reminded of Cronje. "Lots of people know me because of this. It is a long story to keep telling everyone. Now you know me, having a few beers, and now the okes want to hear the whole story. You start telling one little bit. Almost feels like you have to explain yourself. Maybe the okes aren't as familiar with the King Commission as you are. They don't know the whole thing. Then I am boring myself out for 45 minutes."
To those who are not familiar with the King Commission, it was an inquiry into the biggest scandal cricket had faced till then. Much loved South Africa captain Cronje was caught by the Delhi police, fixing - or at least promising to fix - matches. They taped his phone conversations with bookies during the tour of India in 2000. In one of those conversations, before the third ODI on that tour, Cronje is heard telling bookie Sanjay Chawla that Nicky Boje, Herschelle Gibbs and Strydom are in on the fix.
Life has not been the same for Strydom since the day the transcripts were released. Firstly, Strydom says he wasn't even approached during the ODIs. He was approached by Cronje twice before the first Test, in Mumbai, and he refused both times. Modern cricketers are taught to report such approaches, but back then the administrators were themselves unaware of such threats to the sport. Strydom didn't think too much of it - until he saw 97 missed calls on his phone at the end of a golf game in East London in April 2000. The news had broken.
"When I walked away from that room [where he spoke to Cronje], to me, I had forgotten about everything already," Strydom says. "In my mind I said no, that is it. Only, the next morning when he walked into the bus: 'Hey, how about 140 [the first offer was 70,000 rand]?' or something. Jokingly. Even the first offer was joking. He had that sort of demeanour. But he didn't harp on it. It was a very quick offer. And then we spoke about his degree and he spoke about his music, he spoke about all his MP3s. Not much about cricket."
Then in April, the tape with Strydom's name played all over. In the said ODI, Strydom bowled three overs for 15 runs, batted at No. 10, and was at the wicket when the winning runs were scored by Mark Boucher, another man who, it would later emerge, was approached by Cronje. Cronje himself bowled his quota of ten overs, took a wicket and scored a half-century to seal the Man-of-the-Match award.
"The next morning when he walked into the bus: 'Hey, how about 140?' or something. Jokingly. Even the first offer was joking. He had that sort of demeanour. But he didn't harp on it. It was a very quick offer"
"Not at all," he says when asked if he felt anything was dodgy. "Not even in declaration. Not even in India either. I mean, if you go back and start thinking now, maybe this, maybe that, but never on the field. Whenever I played with Hansie, there was no way I saw him as a cricketer that he would ever, ever throw a game. If he used the game - I mean you would have seen the Mumbai [Test] pitch, no one was going to get 250, and that was the request, that South Africa must score less than 250..."
That is what Cronje basically said at the King Commission, the summary of which is: he got mixed up with the wrong crowd, he took their money, and when under pressure, he sold them information and promises that didn't need any underperforming. In between, under pressure from continuous calls from the bookies, Cronje just randomly threw out some names to get them off his back. One of those names was Strydom's. That's what Cronje said at the Commission, before insisting Strydom was not involved.
Strydom had to fight on two fronts, he says. He says he knew he did nothing wrong in India, and all he had to do was tell his story without omissions to the King Commission. He even told them he told Cronje he would have considered the offer if he had played 80 or 90 Tests at the time; instead, it was the time for him to cement a place in the side.
"I don't know why I said that," he says now. "I don't know if that's the right thing to say either. But it was my way of saying, 'I am not doing it.'"
There are other things he would have liked changed. He was out of the side by then, and he believes his second fight was against the people who should have been providing him support. In an ideal world, the United Cricket Board (UCB) would have done: charged him but also provided him support.
"I didn't get any support from South African cricket," Strydom says. "I was on my own, you know. I used to go overseas but I stayed back because of all the court cases and King Commission. So I had to stay back for that. I thought I would stay here the whole year. Didn't go overseas.
"I was advised not to speak to Hansie. South African Cricket wanted nothing to do with him. I was also advised by my lawyers - just leave it until everything settles down, then you can go and chat. But don't get involved with it. You tell your side of the story. You don't know who's going to help, who's not going to help you.
"South African cricket then charged me for trying to place a bet for trying to find out the odds in Centurion. I had to now protect myself against South African cricket. I felt like they were having a something at me. I paid for my own flights, my own lawyers, to protect myself against them, and yet I had done nothing wrong. Maybe in a small print it says you are not allowed to do that [seek to bet on games you are playing in]. Not that I read the small print. I just went to see if there were odds, which there weren't."
Strydom does acknowledge calls and logistics support from Bronwyn Wilkinson, the communications officer of UCB then, "but there was no emotional support" from the board. In due course Strydom was acquitted because there was no evidence to prove he had done anything wrong. "I knew I wasn't guilty, I just had to tell my side of the story."
Closure eluded him, though. During the course of the trial, he managed to speak to Cronje only twice - both times on the phone. Then Cronje died in a plane crash. Strydom keeps meeting others involved in the incident, he kept playing against them in domestic cricket - they don't talk about it - but the man who could have given him answers is gone.
"The thing I regret is, I was not allowed to speak to Hansie," Strydom says. "It would have been nice to ask him, 'Why is my name on the tape if there is a tape?' Those are the type of questions... Why did you mention me Hansie? Why was I mentioned in the one-day series when you didn't even approach me in the one-day series? That is something that can't be answered."
"What are they going to tell me?" Strydom says about whether he has tried to contact Cronje's family. "What can they do? They have got bigger things to worry about. Not in my place to even go there."
Strydom's bigger regret in a way is that he didn't do enough on that tour of India to keep a place in the side; as it was, he was a late selection. Or that he was given caught off his arm guard in Centurion. Or that he batted too low in a strong lower-middle order in ODIs. "For me to go and play my second Test in Mumbai, 35,000 people, you had [Anil] Kumble and three men around the bat, in the 50th over," he says. "I don't care how good a player of spin you are. It's not going to be easy out there. I just think maybe if I hadn't try to hit Murali Kartik in the air..."
Strydom knows he needed runs in his first couple of opportunities, even though as a bowler he did okay, going for about five an over in ODIs. He was never a prodigy, was selected when he was over 30, was more a utility player, a disposable one. He reckons he could have been a useful bits-and-pieces cricketer in modern T20 cricket, but back then he knew the selectors were not going to have patience with him.
That he didn't play for South Africa after that doesn't have anything to do with the scandal, he says, but because he didn't give them reasons to persist with him. He says, though, that his family and wife feel the selectors and administrators avoided him after the incident.
"My family feel let down by him. Me not so much. There is nothing you can do. I would like to have spoken to him and asked him questions, but other people - my friends, people who support me - they feel let down"
Strydom now runs the Port Elizabeth franchise of Postnet, mainly a courier service that competes directly with government postal services. He meets cricketers when they are in town but is not on regular calling terms. He hosted Ottis Gibson, a friend from when the two played for Border, when the South Africa coach was in town for the Boxing Day Test. They hardly talked cricket. Strydom is a good squash player. We meet at his squash club. He says he is happy with where he is in his life. "A good conscience is the softest pillow."
Strydom says he has forgiven Cronje but his family hasn't. "Ja, look, the way I saw it, he was using my name as a player and getting money for it, which I didn't get money for. Which I didn't want. I said no to it then," he says. "I still think he was a great cricketer. Ja, I don't think less of Hansie. Which you might feel... I don't think... I have never been cross with Hansie. I don't know why. I would have liked to have known from him first before I got cross with him.
"My family feel let down by him. Me not so much. There is nothing you can do. I would like to have spoken to him and asked him questions, but other people - my friends, people who support me - they feel let down. They think it is unfair. Why would he approach you? It was your first Test, second Test."
Before we part, Strydom jokes, "But you didn't ask me anything about squash. My wife told me this [Cronje controversy] is what the interview was going to be about.
"It's sort of, it feels like it has died. But if you put Pieter Strydom in Google, it does come up. Now my son is ten, and he has sort of started to look at things like that. I have sort of spoken to him about it. It is hard to talk what I am talking to you now to him. It is hard to explain what happened. He doesn't even know what match-fixing is. That bridge we will have to cross. I don't think his friends will know about it. 'Oh your dad is so and so...' It hasn't happened yet. They are only ten. I will have to deal with it. Everything that has happened, you just have to deal with it.
"There's always a smart oke somewhere to remind me of this. I have never been ostracised - they are just interested in it. It would be nice to get a closure to the whole thing. I don't know if there is closure to it."
If Strydom never had anything to do with corrupt activities it must be really hard to reconcile with being known as the man Hansie propositioned, and not as a useful cricketer who made all of the limited natural ability he had.
"I have got my blazer hanging there," he says. "Like to have been more known for my cricket ability than being part of the Hansie commission. A solid cricketer."
| english |
Several writers who have been identified with the progressive stream in Kannada literature have been dropped from the new textbooks in the process of revision.
The textbook revision committee headed by Rohith Chakrathirtha has decided to remove text of writers including Aravinda Malagatti, L. Basavaraju, B. T. Lalitha Nayak, K. Neela and others from Kannada first language textbooks of class 8 and 9. Among those who are included newly are S. L. Bhyrappa, writer and a vocal supporter of the Hindutva ideology.
Major revision has been in class 9 textbook where Goruru Ramaswamy Iyengar’s prose work “Kannada Moulvi” has made way for N. Ranganatha Sharma’s “Ramarajya” and prose text “Dharma Samadrusti — Vijayanagara Shasana” has been replaced by Mr. Bhyrappa’s “Nanu Kandanthe Dr. B. G. L. Swamy. ’’ While L. Basavaraju’s “Urubhanga” prose has been replaced by Gajanana Sharma’s “Channabyradevi”, Aravinda Malagatti’s “Marali Manege” poem has been replaced by S. V. Parameshwara Bhatta’s “Hemantha. ” K. Neela’s prose work “Ramjan Surakumba” has been removed and Sushrutha Dodderi’s “Holebaagilu” has been added.
A section of writers and authors excluded have expressed dismay over exclusions that they said upheld Constitutional and secular values. “Ramjan Surakumba is my personal experience that is testimony to religious harmony and solidarity. I used the Hyderabad-Karnataka [Kalyana Karnataka] dialect in this prose work. It is only expected that the revision committee would not want the theme of communal harmony as per RSS agenda,” said Ms. Neela. | english |
263 (60. 4 ov)
237 (52. 3 ov)
331/9 (50. 0 ov)
189 (43. 2 ov)
New South Wales Blues wicket keeper Daniel Smith feels after Royal Challengers Bangalore’s successful run chase of 204 runs in the first semi-finals, the Bangalore franchise look favourite to win the Champions League.
Royal Challengers Bangalore (RCB) opener Chris Gayle has praised middle order batsman Virat Kohli for his successive match winning innings in the semi-finals against New South Wales Blues (NSW Blues) on Friday.
Statistical highlights of the Champions League Twenty20 semifinal between Royal Challengers Bangalore and New South Wales.
Home team Royal Challenger Bangalore (RCB) late Friday survived a scare to beat New South Wales Blues (NSW) by six wickets to enter the finals of the ICC Champions League Twenty20 (CLT20) at the Chinnaswamy stadium here.
The first semi-final of the ICC Champions League Twenty20 (CLT20) brought die-hard fans in droves late Friday to the Chinnaswamy stadium in this tech hub to cheer home team Royal Challengers Bangalore (RCB) taking on New South Wales (NSW) Blues from Australia.
David Warner slammed a whirlwind unbeaten century to power New South Wales Blues to a mammoth 203 for two against Royal Challengers Bangalore in the first semi-final of the Champions League Twenty20 on Friday.
The last two innings that the two semi-finalists - New South Wales and Bangalore - played fetched a combined total of 416 runs from 40 overs. Two things are blindingly clear: both sides' batsmen are in form and the pitch on which the match will be played has been good to batsmen in form. The first semi-final will likely be a run-glut.
Royal Challengers Bangalore captain Daniel Vettori won the toss and elected to bowl in the first semifinal of the Champions League Twenty20 against New South Wales Blues at M Chinnaswamy Stadium on Friday.
Royal Challengers Bangalore skipper Daniel Vettori says his side will be wary of the explosive New South Wales Blues openers Shane Watson and David Warner in their semi-final match at the M Chinnaswamy Stadium in Bengaluru. | english |
iQoo Neo range might get two new models to expand its portfolio as per a tipster. Key specifications of these two models have leaked and while the official name of the phones have not been revealed, they are likely to be called the iQoo Neo 5s and iQoo Neo 6 SE. Of the two, the iQoo Neo 5s is tipped to be powered by the Qualcomm Snapdragon 888 SoC and pack a 4,500mAh battery. The iQoo Neo 6 SE on the other hand is tipped to come with 66W fast charging support.
Chinese tipster Digital Chat Station leaked specifications of the rumoured two iQoo Neo phones. While the tipster does not mention the name of the two phones, reports indicate that they may be the iQoo Neo 5s and iQoo Neo 6 SE. The iQoo Neo 5s is tipped to feature an OLED display with 120Hz refresh rate. It is likely to be powered by the Qualcomm Snapdragon 888 SoC and pack 4,500mAh battery. The iQoo Neo 5s may be an upgraded version of the iQoo Neo 5 Vitality Edition that was unveiled earlier this year.
Another Chinese tipster Arsenal has claimed that the iQoo Neo 5s may feature a 120Hz refresh rate display and come with a 16-megapixel selfie camera setup. At the back, the phone may feature a triple rear camera setup with a 48-megapixel Sony IMX598 primary sensor. The iQoo Neo 5s is also tipped to come with 66W fast charging support. Other leaked specifications include 12GB RAM, 256GB of internal storage, a linear motor, and dual speakers.
On the other hand, the iQoo Neo 6 SE is tipped b Digital Chat Station to be powered by the Qualcomm Snapdragon 778G or Snapdragon 778G Plus processor. The tipster notes that the phone may come with support for 66W fast charging. It is tipped that both the phones are positioned in the mid-range segment.
The company has not made any official announcements regarding the iQoo Neo 5s or the iQoo Neo 6 SE.
Affiliate links may be automatically generated - see our ethics statement for details.
| english |
<reponame>LalicUfscar/WE-PE-tool
import re
class GIZAReader(object):
def __init__(self, filename):
self.aligned_lines = list()
with open(filename, 'r') as giza_file:
while True:
line_info = giza_file.readline()
if not line_info:
break
line_plain = giza_file.readline()
line_aligned = giza_file.readline()
line_num = int(re.findall(r'\(([^\)]*)\)', line_info)[0])
# Parse line with alignments into tuples (word, alignment)
line_aligned = re.findall(
r'([^\(]+) \(\{([^\}]*)\}\)', line_aligned)
# Alignment is represented as tuples of indices (src, sys)
alignment = list()
for (i, w) in enumerate(line_aligned):
indices = list(map(int, w[1].split()))
if not indices:
alignment.append((i-1, None))
else:
alignment.extend(
[(None, j-1) if w[0] == 'NULL' else (i-1, j-1) for j in indices])
self.aligned_lines.append({'num': line_num - 1,
'sys': line_plain.split(),
'src': [w[0] for w in line_aligned if w[0] != 'NULL'],
'alignment': alignment})
self.aligned_lines = sorted(self.aligned_lines, key=lambda x: x['num'])
| python |
<reponame>zendesklabs/attachment_restrictions
{
"app": {
"name": "Secure Attachments app",
"description": "Cette application vous avertit quand il existe des pièces jointes avec une extension de fichier donnée.",
"parameters": {
"whitelist": {
"label": "Ajouter à la liste blanche",
"helpText": "Définissez les formats de fichiers que les agents et les utilisateurs peuvent charger en tant que pièces jointes. (Séparez les extensions par des virgules. Exemple : zip, jpg, gif, png, pdf.)"
}
}
},
"global": {
"error": {
"general": "Un problème est survenu."
},
"alert": {
"empty_whitelist": "Vous n’avez pas spécifié de liste blanche. Toutes les pièces jointes à un billet seront considérées dangereuses."
},
"loading": "Analyse des pièces jointes en cours"
},
"attachment": {
"unsecure": {
"heading": "Pièces jointes potentiellement malveillantes détectées",
"body": "Nous avons trouvé dans ce billet une ou plusieurs pièces jointes qui pourraient être utilisées pour diffuser des logiciels malveillants."
},
"secure": "Les pièces jointes sont sûres."
},
"unsecure_attachments": {
"heading": "Pièce(s) jointe(s) potentiellement malveillante(s)"
}
}
| json |
<reponame>raid-toolkit/raid-toolkit
# Client API (alpha)
You can now read data from Raid Toolkit with your own applications or websites. Note that this is still experimental, and may change or break inbetween releases!
To get started check out this code sandbox example:
https://codesandbox.io/s/raid-apisamplesweb-client-h3onh?file=/src/index.ts

# Manual steps to access account information via the REST API:
* Enable the server by clicking the cloud button in the top right of the application

* Click on the green URL to open the swagger documentation page, or browse to http://localhost:5656/docs
* Scoll down to the `oauth/authorize` endpoint and click `Try it!`
* Update the sample schema to your application information, for example:
```json
{
"appId": "my-app",
"name": "My Raid Tool",
"author": "<EMAIL>",
"description": "My really cool Raid app, powered by Raid Toolkit",
"scopes": {
"read:heroes": "Use hero information to make team recommendations",
"read:artifacts": "Use stats information to calculate damage",
"read:shards": "Provide insight on shard usage"
}
}
```

* Click `execute`
* Switch to Raid Toolkit and observe the permissions request, click `Grant`

* A response will appear on the documentation page, containing your app registration including your app secret.

* Copy your app id and secret, and click the `Authorize` button at the top right of the page.
* Enter your app id/secret pair, and check the permissions you intend to use in your application

* Close the dialog
* Now you can access any of the APIs that you've requested scopes for!
Can use this model to implement your application making these same requests. Each time the toolkit is restarted, you will have to re-request a jwt token using your app-id and secret, which are unique to that users installation.
| markdown |
All rights reserved.
Other dates of the month:
America’s pastime. Best of World Series Game 1 photos.
Shane Carwin Would Un-Retire for Brock Lesnar, but ‘He's Not Coming Back'
Grandmother issues adorable 1-on-1 challenge to Dwyane Wade on 90th birthday (Video)
Pavel Datsyuk work of art ruined by NHL goalie interference rules (Video)
Daryl Morey thinks the James Harden defensive failure videos are 'completely unfair'
Arkansas State's Michael Gordon ends up with a 70-yard TD after ULL thought he was down (Video)
Dose: Brown or Dixon for BUF?
How terrible is this goalie interference call on Nick Bjugstad? (Video)
NHL Three Stars: Night of the OT thrillers (and goalie interference)
| english |
<gh_stars>0
{
"files": {
"main.css": "/static/css/main.8c8b27cf.chunk.css",
"main.js": "/static/js/main.a97cbae6.chunk.js",
"main.js.map": "/static/js/main.a97cbae6.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.e1ca0937.js",
"runtime-main.js.map": "/static/js/runtime-main.e1ca0937.js.map",
"static/js/2.3bd21e54.chunk.js": "/static/js/2.3bd21e54.chunk.js",
"static/js/2.3bd21e54.chunk.js.map": "/static/js/2.3bd21e54.chunk.js.map",
"static/js/3.8650755c.chunk.js": "/static/js/3.8650755c.chunk.js",
"static/js/3.8650755c.chunk.js.map": "/static/js/3.8650755c.chunk.js.map",
"index.html": "/index.html",
"static/css/main.8c8b27cf.chunk.css.map": "/static/css/main.8c8b27cf.chunk.css.map",
"static/js/2.3bd21e54.chunk.js.LICENSE.txt": "/static/js/2.3bd21e54.chunk.js.LICENSE.txt"
},
"entrypoints": [
"static/js/runtime-main.e1ca0937.js",
"static/js/2.3bd21e54.chunk.js",
"static/css/main.8c8b27cf.chunk.css",
"static/js/main.a97cbae6.chunk.js"
]
} | json |
<reponame>alobi/Specs
{
"name": "BEMSimpleLineGraph",
"version": "3.2",
"summary": "Elegant Line Graphs for iOS (charting library)",
"description": "BEMSimpleLineGraph lets you create highly customizable line graphs / charts for iOS.",
"homepage": "https://github.com/Boris-Em/BEMSimpleLineGraph",
"screenshots": [
"http://s27.postimg.org/txboc1peb/BEMSimple_Line_Graph_Main.png",
"http://s21.postimg.org/3lkbvgp53/GIF_Touch_Report.gif"
],
"license": {
"type": "MIT",
"file": "LICENSE"
},
"authors": {
"<NAME>": "<EMAIL>"
},
"platforms": {
"ios": "6.0"
},
"requires_arc": true,
"source": {
"git": "https://github.com/Boris-Em/BEMSimpleLineGraph.git",
"tag": "v3.2"
},
"source_files": [
"Classes",
"Classes/**/*.{h,m}"
]
} | json |
<reponame>AnyhowStep/sql-compiler
import {SyntaxKind, Identifier, ValueNode, KeyUsageList} from "../../../parser-node";
import {TokenKind} from "../../../scanner";
import {makeCustomRule} from "../../factory";
import {getTextRange, toNodeArray} from "../../parse-util";
import {optional, zeroOrMore} from "../../../nearley-wrapper";
/**
* https://github.com/mysql/mysql-server/blob/5c8c085ba96d30d697d0baa54d67b102c232116b/sql/sql_yacc.yy#L10692
*/
makeCustomRule(SyntaxKind.KeyUsageList)
.addSubstitution(
[
TokenKind.OpenParentheses,
optional([
/**
* May be `PRIMARY`
*/
SyntaxKind.Identifier,
zeroOrMore([
TokenKind.Comma,
/**
* May be `PRIMARY`
*/
SyntaxKind.Identifier,
] as const)
] as const),
TokenKind.CloseParentheses,
] as const,
(data) : KeyUsageList => {
const arr = data
.flat(3)
.filter((item) : item is Identifier => {
if (item == undefined) {
return false;
}
return "syntaxKind" in item;
})
.map((item) : Identifier|ValueNode<"PRIMARY"> => {
if (item.quoted) {
return item;
}
if (item.identifier.toUpperCase() != "PRIMARY") {
return item;
}
return {
...getTextRange(item),
syntaxKind : SyntaxKind.Value,
value : "PRIMARY",
};
});
return toNodeArray(
arr,
SyntaxKind.KeyUsageList,
getTextRange(data)
);
}
)
| typescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.