text stringlengths 1 1.04M | language stringclasses 25 values |
|---|---|
//! A value represents the result of an expression. A value can either be
//! uninitialised, a boolean, a number, a string or an array of the previous
//! types. This modules provides methods for creating new values from primitives
//! and the ability to convert from one type to another.
use crate::{
errors::EvaluationError,
parser::ast::{AssignType, CmpOperator},
};
use std::{collections::HashMap, fmt};
/// A value represents the result of an expression.
#[derive(Clone, Debug, PartialEq)]
pub enum Value {
/// An uninitialised value can become any type, depending on how it is used.
Uninitialised,
Bool(bool),
Number(f64),
String(String),
Array(HashMap<String, Value>),
}
impl From<f64> for Value {
fn from(value: f64) -> Value {
Value::Number(value)
}
}
impl From<usize> for Value {
fn from(value: usize) -> Value {
Value::Number(value as f64)
}
}
impl From<i32> for Value {
fn from(value: i32) -> Value {
Value::Number(f64::from(value))
}
}
impl From<bool> for Value {
fn from(value: bool) -> Value {
Value::Bool(value)
}
}
impl From<String> for Value {
fn from(value: String) -> Value {
Value::String(value)
}
}
impl From<&str> for Value {
fn from(value: &str) -> Value {
Value::String(value.to_string())
}
}
impl fmt::Display for Value {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Value::Uninitialised => Ok(()),
Value::Number(n) => write!(f, "{}", n),
Value::String(s) => write!(f, "{}", s),
Value::Bool(b) => {
if *b {
write!(f, "1")
} else {
write!(f, "0")
}
},
Value::Array(_) => unreachable!(),
}
}
}
impl Value {
/// Returns true if the value is not an array.
pub fn is_scalar(&self) -> bool {
match self {
Value::Bool(_) | Value::String(_) | Value::Number(_) => true,
_ => false,
}
}
/// Converts the value into a string.
pub fn as_string(&self) -> String {
match self {
Value::Array(..) => unreachable!(),
Value::Uninitialised => String::new(),
Value::Bool(v) => String::from(if *v { "1" } else { "0" }),
Value::String(s) => s.to_string(),
Value::Number(n) => n.to_string(),
}
}
/// Converts the value into a boolean.
pub fn as_bool(&self) -> bool {
match self {
Value::Array(..) => unreachable!(),
Value::Uninitialised => false,
Value::Bool(v) => *v,
Value::String(s) => !s.is_empty(),
Value::Number(n) => *n != 0.0,
}
}
/// Converts the value into a number.
pub fn as_number(&self) -> f64 {
match self {
Value::Array(..) => unreachable!(),
Value::Uninitialised => 0.0,
Value::Bool(v) => {
if *v {
1.0
} else {
0.0
}
},
Value::String(s) => match s.parse::<f64>() {
Ok(n) => n,
Err(_) => 0.0,
},
Value::Number(n) => *n,
}
}
/// Compares two values according to an operator.
pub fn compare(op: &CmpOperator, a: &Value, b: &Value) -> Value {
let res = match (a, b) {
(Value::Number(a), Value::Number(b)) => op.compare(a, b),
(Value::Number(a), Value::String(b)) => match b.parse::<f64>() {
Ok(num) => op.compare(a, &num),
Err(_) => op.compare(&a.to_string(), b),
},
(Value::String(a), Value::Number(b)) => match a.parse::<f64>() {
Ok(num) => op.compare(&num, b),
Err(_) => op.compare(a, &b.to_string()),
},
(Value::Number(a), Value::Uninitialised) => op.compare(a, &0.0),
(Value::Uninitialised, Value::Number(b)) => op.compare(&0.0, b),
(Value::Uninitialised, Value::Uninitialised) => op.compare(&0.0, &0.0),
(Value::String(a), Value::String(b)) => op.compare(a, b),
_ => unreachable!(),
};
Value::Bool(res)
}
/// Apply an operation on both values and returns the result.
pub fn compute(op: AssignType, a: Value, b: Value) -> Result<Value, EvaluationError> {
match op {
AssignType::Pow => Ok(Value::from(a.as_number().powf(b.as_number()))),
AssignType::Mod => Ok(Value::from(a.as_number() % b.as_number())),
AssignType::Mul => Ok(Value::from(a.as_number() * b.as_number())),
AssignType::Div => {
let bnum = b.as_number();
if bnum == 0.0 {
return Err(EvaluationError::DivisionByZero);
}
Ok(Value::from(a.as_number() / bnum))
},
AssignType::Add => Ok(Value::from(a.as_number() + b.as_number())),
AssignType::Sub => Ok(Value::from(a.as_number() - b.as_number())),
AssignType::Normal => Ok(b),
}
}
}
| rust |
The Government of India has recently announced its plan to create 10 lakh government jobs in the next 18 months. Of about 40 lakh sanctioned posts, 22% posts are now vacant and the Government will fill these posts in 18 months.
Though the announcement has been called a “historic step in the interest of the youth” and as “raising a new hope and confidence among youth” by some top Government leaders, the plan has serious problems.
The first question is: how is the Government managing now in the absence of more than a fifth of the required number of staff? There are as many as 8. 72 lakh positions that were vacant in various departments of the Central government, as told by the Minister of State in Personnel, Public Grievances and Pensions, Jitendra Singh, to the Rajya Sabha on February 3, 2022. If various positions in public sector banks, the defence forces and police, the health sector, central schools and central universities, and the judiciary are added, then the number touches about 30 lakh posts. This number does not include vacancies in State government jobs. As sanctioned posts broadly indicate the required posts needed to run a government, it appears that this government is perhaps facing a serious shortage of staff, which is then causing long delays in work, corruption and maybe other inefficiencies.
Another major concern is about the quality of employment that will be generated through this plan. The share of contract workers in total government employment has been increasing rapidly in recent years — from 11. 11 lakh in 2017 to 13. 25 lakh in 2020 and to 24. 31 lakh in 2021. In addition, there are “honorary workers” such as Anganvadi workers, their helpers, accredited social health activist (ASHA) workers, etc. These employees of the government earn a lower salary (consolidated wages), and are not entitled to “decent work” conditions (International Labour Organization recommendations) including a minimum package of social security.
The Government must ensure that the employment generated under its plan will be of a standard quality. There has been no assurance so far on this by the Government.
The total labour force in the country stands at 437. 2 million (April 2022 data). At a labour force participation rate of 42. 13% (Centre for Monitoring Indian Economy Pvt. Ltd. ) the unemployment rate of the youth is about 20% at present. Given the backlog of about 30 million unemployed people and an annual addition of 50 lakh-70 lakh workers every year (World Bank), the dimensions of India’s unemployment problem today are formidable. The generation of a mere 10 lakh jobs in the next 18 months is too little. This scheme of the Government will hardly provide any relief to the youth of the country; and will not have much of an impact on the present unemployment problem.
It is important to note here that the performance of the private sector in creating employment opportunities has remained dismal. Currently, when the economy is still struggling to overcome the shocks caused by the novel coronavirus pandemic, and when private final consumption expenditure has not crossed the pre-pandemic level, private firms are being seen to be managing their profit margin by cutting costs (in the form of rationalising wage bills). In this situation it is all the more important for the Government to ensure as many jobs as possible.
As is claimed, if the Government is really in ‘mission mode’ to provide employment to the unemployed, and to the youth, it will have to do much more than what has been announced. To start with, the Government will have to create more employment within the Government. Recent national and international reports and rankings have shown that India is lagging far behind most other countries in terms of health and nutrition, particularly women and children, in education, literacy and skills, holistic care of children in early childhood and later; drinking water and sanitation, and other basic infrastructure, etc.
We believe that the Government will have to take responsibility for meeting these basic needs without depending on privatisation — at least for the bottom 40% of the population. The first task for the Government would be to take much better direct care of basic well-being, human development and human resource development, and the basic infrastructure of the bottom population without privatisation in these areas.
Another major task would also be to reorient the industrialisation policy to focus on labour-intensive sectors of the economy, and promote Micro, Small and Medium Enterprises (MSMEs) and informal production by ensuring better technology and higher productivity, providing finances (including working capital) and pushing further cluster development for all industries that have the potential.
And, finally, considering the fact that the urban economy has been badly hurt by the pandemic, a carefully designed urban employment guarantee programme would be most desirable to create ample urban employment avenues for urban youth. This programme will have to be different from the rural employment guarantee programme. The urban programme should include: basic urban services, where the youth would get special training so that they can be absorbed in the mainstream economy; day-care centres set up for childcare to enable women to reduce their unpaid services and to ensure quality care for children; and infrastructural gaps filled in under construction work to facilitate quality urban life.
If the gesture of filling vacant posts in the Government is part of a mission employment, it will have to be followed by radical changes in the Government’s employment policy. Let us hope that people of India will be able to discern the motives behind the gesture, and assess the Government’s performance accordingly. | english |
{
"symptoms": {},
"details": "Prolapsus uteri and chronic metritis, especially when associated with subinvolution and inflammation of the cervix. The special symptoms leading to its selection is a FEELING OF SORENESS ACROSS THE HYPOGASTRIUM FROM ILEUM TO ILEUM. Uterine displacements, and in the commencement of metritis. Sensation as if bladder were too full. Pain from sacrum towards pubes. Pain as if in ureters.",
"common_names": "<NAME>",
"name": "<NAME>",
"dosage": "Third to sixth potency. Honey for itching of anus and worms."
} | json |
<reponame>carlosbpy/pyspark-3.1.1-pgsql
import os
from pyspark.sql import SparkSession
if __name__ == '__main__':
spark = SparkSession \
.builder \
.appName("Job - Consumer-zone") \
.getOrCreate()
consumer_df = spark.read \
.format("parquet") \
.load("processing-zone/*.parquet")
consumer_df.createOrReplaceTempView("tb_user")
spark.sql("SELECT count(*) FROM tb_user").show()
def processing_count_gender_per_user():
return spark.sql("""
SELECT
count(id) as qtd,
gender
FROM
tb_user
GROUP BY 2
""")
metrics_gender = processing_count_gender_per_user()
metrics_gender.write.mode("overwrite") \
.partitionBy("gender") \
.format("parquet") \
.save("consumer-zone/")
| python |
<filename>zulip_json/116395-maths/topological.20groups.json
[
{
"content": "<p>I pushed to <a href=\"https://github.com/leanprover-community/mathlib/blob/completions/analysis/topology/group_completion.lean\" target=\"_blank\" title=\"https://github.com/leanprover-community/mathlib/blob/completions/analysis/topology/group_completion.lean\">https://github.com/leanprover-community/mathlib/blob/completions/analysis/topology/group_completion.lean</a> the current state of my work on completions of uniform groups. I would really appreciate help (from Mario, <span class=\"user-mention\" data-user-id=\"110294\"><NAME></span> or anyone else) with understanding how one should setup the instance maze (or use definitions instead of instances) to be able to finish <a href=\"https://github.com/leanprover-community/mathlib/blob/completions/analysis/topology/group_completion.lean#L161\" target=\"_blank\" title=\"https://github.com/leanprover-community/mathlib/blob/completions/analysis/topology/group_completion.lean#L161\">https://github.com/leanprover-community/mathlib/blob/completions/analysis/topology/group_completion.lean#L161</a> (assume I can prove <a href=\"https://github.com/leanprover-community/mathlib/blob/completions/analysis/topology/group_completion.lean#L124\" target=\"_blank\" title=\"https://github.com/leanprover-community/mathlib/blob/completions/analysis/topology/group_completion.lean#L124\">https://github.com/leanprover-community/mathlib/blob/completions/analysis/topology/group_completion.lean#L124</a>). I'd be ready to have the uniform space structure on a topological group to be outside the type class system, especially since we would ideally also like to handle non-commutative groups at some point, and those have two natural uniform structures. But I don't know how to use them if there are not instances (everything else uses instance implicit arguments).</p>",
"id": 133277465,
"sender_full_name": "<NAME>",
"timestamp": 1536006196
}
] | json |
Dear Sir,
Please refer to our circular IECD No.3/04.02.02/2001-02 dated August 30, 2001 regarding obtaining undertaking from all your clients who are being extended credit for doing any business relating to diamonds.
2. We advise that as per new UN mandated Kimberley Process Certification Scheme (KPCS) which has been adopted, among others, by India, it has to be ensured that no rough diamonds mined and illegally traded enter our country. Various measures have been taken in this regard including a system of import into India of diamonds being mandatorily accompanied by Kimberley Process Certificate (KPC). Similarly, the exports from India would also be accompanied by the KPC to the effect that no conflict/rough diamonds have been used in the process. These KPCs would be verified/validated in the case of imports/exports by the Gem and Jewellery Export Promotion Council, which has been designated, under the KPCS, as Importing-Exporting Authority by the Government of India.
3. It has therefore been decided that banks should obtain a modified undertaking as per format enclosed, from all the clients who are being extended credit for doing any business relating to diamonds to ensure that the client complies with the KPCS guidelines.
4. The format of Undertaking given as Annexure in the Master Circular on Customer Service, Simplification of Procedures for Delivery of Export Credit and Reporting Requirements may be amended accordingly.
5. The existing system of prompt reporting to RBI of any violation of UN Resolutions as and when noticed as laid down in above circular would continue.
Please acknowledge receipt.
Yours faithfully,
(Usha Thorat)
'I hereby undertake :
not to knowingly do any business in the conflict diamonds as have been banned vide UN Security Council Resolutions No. 1173, 1176 and 1343(2001) or the conflict diamonds which come from any area in Africa including Liberia controlled by forced rebelling against the legitimate and internationally recognised Government of the relevant country.
not to do direct or indirect import of rough diamonds from Sierra Leone and/or Liberia whether or not such diamonds originated in Liberia in terms of UN Security Council Resolution No.1306(2000) which prohibits the direct or indirect import of all rough diamonds from Sierra Leone and 1343 (2001) which prevents such import of all rough diamonds from Sierra Leone and 1343(2001) which prevents such import from Liberia.
to follow Kimberley Process Certification Scheme for dealing in diamonds.
2. I am also giving my consent to the withdrawal of all my credit entitlements, if at any time, I am found guilty of knowingly having conducted business in such diamonds'.
| english |
[{"title": "Minister-ansvaret ute og hjemme ", "author": "Lie, <NAME>\u00f8<NAME>, 1873-1926.", "id": "006774958"}] | json |
{
"030000.KS": {
"short_name": "CheilWorldwide",
"long_name": "Cheil Worldwide Inc.",
"summary": "Cheil Worldwide Inc. provides various marketing solutions worldwide. It offers strategic, creative, and media solutions; integrated digital marketing solution and social media platform; and experiential marketing solutions, such as events, exhibitions, sports, and retail marketing solutions. The company was founded in 1973 and is headquartered in Seoul, South Korea.",
"currency": "KRW",
"sector": "Communication Services",
"industry": "Advertising Agencies",
"exchange": "KSC",
"market": "kr_market",
"country": "South Korea",
"city": "Seoul"
},
"035000.KS": {
"short_name": "GR",
"long_name": "GIIR Inc.",
"summary": "GIIR Inc., together with its subsidiaries, operates as an advertising and marketing communications company in South Korea and internationally. The company was founded in 1962 and is headquartered in Seoul, South Korea.",
"currency": "KRW",
"sector": "Communication Services",
"industry": "Advertising Agencies",
"exchange": "KSC",
"market": "kr_market",
"country": "South Korea",
"city": "Seoul"
},
"214320.KS": {
"short_name": "INNOCEAN",
"long_name": "Innocean Worldwide Inc.",
"summary": "Innocean Worldwide Inc. provides marketing and communications services worldwide. The company offers advertising services; digital services, including providing campaigns for online, mobile, social, and other means in the media environment and advanced digital platform operations; and experiential services, such as planning and producing content to induce significant consumer behaviors. It also provides marketing services, such as brand diagnosis, problem extraction, discovery of market opportunities, brand positioning, and communication strategy development; and media services. The company was founded in 2005 and is headquartered in Seoul, South Korea.",
"currency": "KRW",
"sector": "Communication Services",
"industry": "Advertising Agencies",
"exchange": "KSC",
"market": "kr_market",
"country": "South Korea",
"city": "Seoul"
}
} | json |
AHMEDNAGAR district police have booked suspended Bharatiya Janata Party (BJP) leader and Telangana MLA T Raja Singh for his alleged hate speech towards the Muslim community during a programme organised in Shrirampur town of the district on the occasion of Shiv Jayanti last week.
Officials from Shrirampur police station, where the complaint against the legislator was lodged in the intervening night of Monday and Tuesday, said that Singh was invited for a programme in the town on March 10, which is marked as Shiv Jayanti – the birth anniversary of Chhatrapati Shivaji Maharaj, according to the Hindu calendar.
“During his speech… Singh made derogatory remarks towards Muslim community…some local members of the community approached us and filed a complaint based on which an offence has been registered against him. We have invoked Indian Penal Code sections 295, 504 and 506,” said inspector Harshwardhan Gawali, in-charge of Shrirampur town police station.
IPC section 295 pertains to injuring or defiling place of worship with intent to insult the religion of any class while 504 and 506 pertain to intentional insult and criminal intimidation, respectively.
Earlier, an FIR was registered against Singh in the state’s Latur district for alleged hate speech during the Shiv Jayanti event on February 19 – the birth anniversary of the Maratha warrior king, according to the Gregorian calender.
In August 2022, Singh was arrested by Telangana police for his alleged remarks against Islam and Prophet Mohammed after which the BJP had distanced itself from his comment and had suspended him from the party. | english |
According to Press TV, speaking in a political interview show set to be broadcast on the CBS television network on Sunday, Zarif noted that Tehran is “ready” to take action should US President Donald Trump go ahead with the plan to reinstate economic sanctions against Iran, which were lifted under the nuclear deal.
“We have put a number of options for ourselves, and those options are ready, including options that would involve resuming at a much greater speed our nuclear activities,” he said.
“Those options are ready to be implemented and we will make the necessary decision when we see fit,” he added.
The top Iranian diplomat also stressed that the Islamic Republic would not unilaterally remain committed to the nuclear accord if the other side scuttles it.
“Obviously the rest of the world cannot ask us to unilaterally and one-sidedly implement a deal that has already been broken,” Zarif said.
Separately on Friday, the Iranian foreign minister warned that the US will “regret” leaving the nuclear pact as the reaction from the Islamic Republic and the international community will be “unpleasant” for the Americans.
Iran and the five permanent members of the UN Security Council – the US, France, Britain, Russia and China – plus Germany signed the nuclear agreement in July 2015 and started implementing it in January 2016.
The deal, which is officially called the Joint Comprehensive Plan of Action (JCPOA), is an international document endorsed by the Security Council Resolution 2231.
Trump, who took office one year after the accord came into force, has been a vociferous critic of it. He has called the agreement the “worst deal ever” and even threatened to tear it up.
In January, he decided to stick with the JCPOA, but gave the European signatories a May 12 deadline to “fix the terrible flaws” of the accord or have him abandon the agreement.
However, other parties to the agreement, namely Russia, China, Britain, Germany and France, have all criticized Trump’s hostile views, saying the deal is sound and has proven to be functioning.
Earlier this week, over 500 parliamentarians from the three European signatories to the deal called on US Congress to support the JCPOA. | english |
<reponame>open-aquarium/open-aquarium-embedded
#include "Device.h"
/*Device::Device() {
}*/
uint16_t Device::getFreeSRAM() {
return (int) SP - (int) (__brkval == 0 ? (int)&__heap_start : (int)__brkval);
}
uint16_t Device::getSRAMUsage() {
return this->getTotalSRAM() - this->getFreeSRAM();
}
uint16_t Device::getTotalSRAM() {
// return 8192; // 8 KB
return (int) RAMEND - (int) &__data_start;
}
/*int Device::getFreeFlash() {
return -1;
}
int Device::getFreeEEPROM() {
return -1;
}*/
float Device::getDeviceInbuiltTemperature() {
// https://playground.arduino.cc/Main/InternalTemperatureSensor/
#if defined(__AVR_ATmega168A__) || defined(__ATmega168P__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega32U4__)
unsigned int wADC;
double t;
// The internal temperature has to be used
// with the internal reference of 1.1V.
// Channel 8 can not be selected with
// the analogRead function yet.
// Set the internal reference and mux.
ADMUX = (_BV(REFS1) | _BV(REFS0) | _BV(MUX3));
ADCSRA |= _BV(ADEN); // enable the ADC
delay(20); // wait for voltages to become stable.
ADCSRA |= _BV(ADSC); // Start the ADC
// Detect end-of-conversion
while (bit_is_set(ADCSRA,ADSC));
// Reading register "ADCW" takes care of how to read ADCL and ADCH.
wADC = ADCW;
// The offset of 324.31 could be wrong. It is just an indication.
t = (wADC - 324.31 ) / 1.22;
return t;
#else
return -273.15; // Absolute Zero Celcius //OA_MIN_FLOAT; //std::numeric_limits<float>::lowest();
#endif
}
String Device::getCPU() {
return F("ATmega2560");
}
uint8_t Device::getCPUSpeed() {
return 16; // MHz
}
uint8_t Device::getAnalogIO() {
return 16;
}
uint8_t Device::getDigitalIO() {
return 54;
}
uint8_t Device::getDigitalPWM() {
return 15;
}
uint16_t Device::getTotalEEPROM() {
return 4096; // 4KB
}
uint32_t Device::getTotalFlash() {
return 33554432; // 32MB
}
| cpp |
Srinagar | Tourism stakeholders in the Valley are hopeful that the upcoming G20 working group meeting in Srinagar will pave the way for lifting of Jammu and Kashmir-specific travel advisories by the European Union countries and the US, which can give a massive boost to the tourism sector.
A significant number of foreign tourists -- even from the countries which have negative travel advisories in place -- are visiting Kashmir and they feel the place is absolutely safe.
"As a tourism stakeholder, I welcome the G20 event. There are advisories in place from various countries across the globe, which unfortunately have been in place since the 1990s. There has been a great transformation as far as the overall situation in Kashmir is concerned. It's very peaceful now and there have been certain instances where European countries have been discussing lifting these travel advisories," Syed Abid Rashid, Tourism Secretary to Jammu and Kashmir government, told PTI.
He said representatives of the countries, which have issued the negative travel advisories, will be in the Valley for the G20 meet.
"I am sure these things will be discussed and keeping in consideration the present political scenario and the peaceful environment of Kashmir, I am hopeful they will consider lifting these advisories. The footfall of tourists from various countries is going to contribute to the overall tourism industry in Jammu and Kashmir,” Rashid added.
Manzoor Ahmad Wangnoo, who has been associated with the tourism trade for several decades, said it was the best time to revoke the advisories.
"I think this is the best time to revoke those advisories. You see, for the last two years, all the hotels, houseboats are full. The credit goes to the department of tourism. Earlier, you know, we had COVID and business was almost zero. Now we have tourists calling us for reservations, they want to know if they will get hotel rooms or not. That is wonderful news," Wangnoo said.
On the arrival of international tourists, he said, "It was not that good in the last two years but it has started moving upwards. You see the shikarawallahs and the ponywallahs and those associated with tourist trade. They are doing wonderful business. This message goes across the country and abroad. It will take some time, we are showing them the best hospitality of Kashmir. " "Kashmir is safe for tourists, especially international tourists," he added.
Foreign tourists say they feel safe in the valley and are amazed by the hospitality of the people.
"I am in Srinagar for three days and I am feeling very safe and fine. . . I walked the whole city and I don't feel unsafe," Labeouf, a German national, said.
He said he was aware of the advisories from the German government but travelled anyway to Kashmir. "I don't feel unsafe, no problem at all, it's absolutely the right time to revoke that (advisory). " Daria, a youth delegate from Russia who was here for the recent Y20 event, said she had her reservations and worries about coming to Kashmir.
"To be honest, I was scared. I had some concerns but after coming here, all my doubts faded away. It is safe and I don't have those worries anymore. Based on my experience, they are not justified (negative travel advisories). I feel absolutely safe and secure here," she said.
Fleu, a traveller from France, said he was not aware of the situation in Kashmir but liked the place very much.
"I just arrived yesterday. So I don't have a complete picture but it is indeed a beautiful place, the mountains are beautiful and the lake also. People seem very nice," he said.
The three-day third G20 tourism working group meeting would be held here from May 22-24. Foreign delegates, participating in the meeting, will also visit famous ski resort Gulmarg in north Kashmir's Baramulla district. | english |
<gh_stars>0
package com.example.deliverable1;
import junit.framework.TestCase;
import static org.junit.Assert.*;
import org.junit.Test;
public class MainActivityTest {
@Test
public void testgetdecDay() {
assertArrayEquals(new String[] {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}, MainActivity.getdecDay());
}
@Test
public void testgetdDuration() {
assertArrayEquals(new String[] {"0.5 hours", "1 hour", "1.5 hours", "2 hours", "2.5 hours", "3 hours"}, MainActivity.getdDuration());
}
@Test
public void testgetdDifficulty() {
assertArrayEquals(new String[] {"Beginner", "Intermediate", "Advanced"}, MainActivity.getdDifficulty());
}
@Test
public void testgetdTime() {
assertArrayEquals(new String[] {"07:00", "07:30", "08:00", "08:30", "09:00", "09:30", "10:00", "10:30", "11:00",
"11:30", "12:00", "12:30", "13:00", "13:30", "14:00", "14:30", "15:00", "15:30", "16:00", "16:30", "17:00", "17:30", "18:00"}, MainActivity.getdTime());
}
public static void main(String[] args) {
org.junit.runner.JUnitCore.main("MainActivityTest");
}
}
| java |
md-card {
max-width: 80%;
}
| css |
Wall Street futures edged up early Wednesday after the previous session’s losses with traders looking ahead to the release of minutes from the latest Federal Reserve meeting, due later in the day. Major European markets were mostly positive.Dow, S&P and Nasdaq futures were all above water in the early premarket period.
On the economic side, Canadian investors will get July housing starts numbers as well as a report on June wholesale trade before the opening bell. In Asia, Japan’s Nikkei closed down 1.46 per cent after a weak handoff from Wall Street. Hong Kong’s Hang Seng slid 1.36 per cent.Crude prices wavered in early trading as concerns about China’s economy were offset somewhat by declines in U.S. inventories, suggesting tighter supply.
“The pivotal question at this juncture revolves around the sustainability of the factors propelling the shift in oil’s trajectory: the burgeoning global economic prospects and the orchestrated production cuts by OPEC+,” Stephen Innes, managing partner with SPI Asset Management, said.
More official U.S. government figures are due from the U.S. Energy Information Administration later Wednesday morning. The day range on the loonie was 74.01 US cents to 74.21 US cents in the predawn period. As of early Wednesday morning, the Canadian dollar was down about 0.46 per cent against the greenback over the past five days and off more than 2 per cent over the past month., which showed the annual rate of inflation ticked up to 3.3 per cent in July, has again focused attention on the Bank of Canada’s Sept. headtopics.comRead more:
Jorge Soler, Luis Arraez and Josh Bell hit consecutive homers to lift Marlins over AstrosJorge Soler, Luis Arraez and Josh Bell hit consecutive homers in the eighth inning and the Miami Marlins beat the Houston Astros 5-1 on Monday night.
Canadian automotive R&D needs government funding, or it risks falling behindAs the industry transitions to electric vehicles, industry insiders and observers say government aid is seen as essential.
| english |
Two technology giants today reported quarterly results that beat analyst expectations.
Accenture, one of the world’s most critical consulting firms, and massive vendor of technology services, posted quarterly profit of 97 cents per share. Analysts had expected 86 cents. Year ago profits for the same quarter came in at 75 cents per share. The company also raised its full year profit expectation to $3.82 $3.90 per share, from $3.76 to $3.84.
Micron, the largest US memory manufacturer had stronger than expected quarter as well. The company posted revenue for the quarter of $2.07 billion, down from the previous year’s $2.26 billion, but higher than the analyst expected $2.02 billion. The company lost over 200 million dollars in the quarter over soft DRAM and NAND chip prices.
While it’s always sexy to cover the big three (Microsoft, Google, Apple), there are host of other major players in technology that drive news in a behind-the-scenes sort of way. We’re thinking EMC, Cisco, and others. We are going to boost our coverage of such companies because they matter. You can’t have a full picture of technology if you only focus on app-driven startups in one area code.
TNW will also be covering more funding news moving forward, whenever we deem it appropriate. Yes, the biggest players are important, but so are the future giants. We’ll be covering funding news from all over the world, wherever something hot is happening. Consider this post the start of a new sort of financial coverage here at The Next Web.
Get the most important tech news in your inbox each week.
| english |
const express = require("express");
const cors = require("cors");
const { uuid, isUuid } = require("uuidv4");
const app = express();
app.use(express.json());
app.use(cors());
const repositories = [];
function validateFields(request, response, next) {
const { url, techs } = request.body;
if (techs && !(techs instanceof Array)) {
return response
.status(400)
.json({ error: "The field `techs` must have a valid array" });
}
if (url && !/^(http|https):\/\/[^ "]+$/.test(url)) {
return response
.status(400)
.json({ error: "The field `url` must have a valid url" });
}
return next();
}
function getRepositoryIndexById(request, response, next) {
const { id } = request.params;
if (!isUuid(id)) {
return response.status(400).json({ error: "You must provide a valid id" });
}
const repositoryIndex = repositories.findIndex((item) => item.id === id);
if (repositoryIndex === -1) {
return response.status(404).json({ error: "Repository not found" });
}
request.repositoryIndex = repositoryIndex;
return next();
}
app.get("/repositories", (request, response) => {
return response.json(repositories);
});
app.post("/repositories", validateFields, (request, response) => {
const { title, url, techs } = request.body;
if (!title || !url || !techs) {
return response
.status(400)
.json({ error: "Missing params in the request" });
}
const repository = {
id: uuid(),
title,
url,
techs,
likes: 0,
};
repositories.push(repository);
return response.status(201).json(repository);
});
app.put(
"/repositories/:id",
getRepositoryIndexById,
validateFields,
(request, response) => {
const { repositoryIndex } = request;
const { title, url, techs } = request.body;
repositories[repositoryIndex] = {
...repositories[repositoryIndex],
title,
url,
techs,
};
return response.json(repositories[repositoryIndex]);
}
);
app.delete("/repositories/:id", getRepositoryIndexById, (request, response) => {
const { repositoryIndex } = request;
repositories.splice(repositoryIndex, 1);
return response.status(204).json();
});
app.post("/repositories/:id/like", getRepositoryIndexById, (request, response) => {
const { repositoryIndex } = request;
repositories[repositoryIndex].likes += 1;
return response.json(repositories[repositoryIndex]);
});
module.exports = app;
| javascript |
import pytest
ENCODING = 'utf-8'
@pytest.fixture(scope='function', autouse=True)
def setup_case(request):
def destroy_case():
from corm import annihilate_keyspace_tables, SESSIONS
annihilate_keyspace_tables('mykeyspace')
for keyspace_name, session in SESSIONS.copy().items():
if keyspace_name in ['global']:
continue
session.shutdown()
del SESSIONS[keyspace_name]
request.addfinalizer(destroy_case)
def test_initial_api():
from corm import register_table, insert, sync_schema
from corm.models import CORMBase
class TestModel(CORMBase):
__keyspace__ = 'mykeyspace'
something: str
other: str
register_table(TestModel)
sync_schema()
one = TestModel('one', 'two')
two = TestModel('one', 'two')
three = TestModel('one', 'three')
insert([one, two, three])
def test_keyspace_api():
import hashlib
import uuid
from corm import register_table, insert, sync_schema, \
keyspace_exists, keyspace_destroy, keyspace_create
from corm.datatypes import CassandraKeyspaceStrategy
from corm.models import CORMBase
# Keyspaces seem to have to start with Alpha-Letters
keyspace_name = hashlib.md5(str(uuid.uuid4()).encode(ENCODING)).hexdigest()
keyspace_name = f'abc_{keyspace_name}'
assert keyspace_exists(keyspace_name) is False
keyspace_create(keyspace_name, CassandraKeyspaceStrategy.Simple)
assert keyspace_exists(keyspace_name) is True
keyspace_destroy(keyspace_name)
assert keyspace_exists(keyspace_name) is False
class TestModelKeyspace(CORMBase):
__keyspace__ = keyspace_name
item: str
register_table(TestModelKeyspace)
assert keyspace_exists(keyspace_name) is False
sync_schema()
assert keyspace_exists(keyspace_name) is True
one = TestModelKeyspace('one')
insert([one])
keyspace_destroy(keyspace_name)
assert keyspace_exists(keyspace_name) is False
def test_float_api():
from corm import register_table, insert, sync_schema, select
from corm.models import CORMBase
class TestModelFloat(CORMBase):
__keyspace__ = 'mykeyspace'
input_one: float
register_table(TestModelFloat)
sync_schema()
data = 324.593998934
one = TestModelFloat(data)
insert([one])
for idx, entry in enumerate(select(TestModelFloat)):
assert entry.input_one == data
def test_boolean_api():
from corm import register_table, insert, sync_schema
from corm.models import CORMBase
from datetime import datetime
class TestModelBoolean(CORMBase):
__keyspace__ = 'mykeyspace'
item: str
created: datetime
value: bool
register_table(TestModelBoolean)
sync_schema()
one = TestModelBoolean('one', datetime.utcnow(), True)
two = TestModelBoolean('two', datetime.utcnow(), False)
insert([one, two])
def test_datetime_api():
from corm import register_table, insert, sync_schema
from corm.models import CORMBase
from datetime import datetime
class TestModelDatetime(CORMBase):
__keyspace__ = 'mykeyspace'
item: str
created: datetime
register_table(TestModelDatetime)
sync_schema()
one = TestModelDatetime('one', datetime.utcnow())
two = TestModelDatetime('two', datetime.utcnow())
insert([one, two])
def test_set_api():
from corm import register_table, insert, sync_schema
from corm.models import CORMBase
from corm.annotations import Set
class TestModelSet(CORMBase):
__keyspace__ = 'mykeyspace'
something: str
other: Set
register_table(TestModelSet)
sync_schema()
one = TestModelSet('one', {'first'})
two = TestModelSet('two', {'last', 'second-to-last'})
three = TestModelSet('three', {'last', 'second-to-last', 'last'})
four = TestModelSet('four', ['one', 'two', 'three', 'four'])
insert([one, two, three, four])
def test_select_api():
import random
from corm import register_table, insert, sync_schema, select
from corm.models import CORMBase
from corm.annotations import Set
from datetime import datetime
MAX_INT = 1000
class TestModelSelect(CORMBase):
__keyspace__ = 'mykeyspace'
random_number: int
created: datetime
register_table(TestModelSelect)
sync_schema()
insert_later = []
values = []
for idx in range(0, 100):
values.append({
'random_number': random.randint(0, MAX_INT),
'created': datetime.utcnow()
})
entry = TestModelSelect(values[-1]['random_number'], values[-1]['created'])
insert_later.append(entry)
if len(insert_later) > 20:
insert(insert_later)
insert_later = []
insert(insert_later)
for idx, entry in enumerate(select(TestModelSelect, fetch_size=100)):
assert isinstance(entry, TestModelSelect)
# Order is not consistent
# assert entry.random_number == values[idx]['random_number']
# assert entry.created == values[idx]['created']
assert idx > 0
def test_select_where_api():
import random
from corm import register_table, insert, sync_schema, select, where
from corm.models import CORMBase
from datetime import datetime
MAX_INT = 99999
class TestModelSelectSource(CORMBase):
__keyspace__ = 'mykeyspace'
random_number: int
created: datetime
one: str
two: str
class TestModelSelectPivot(CORMBase):
__keyspace__ = 'mykeyspace'
random_number: int
created: datetime
one: str
two: str
source: TestModelSelectSource
# TODO: Build UserType integration
# register_table(TestModelSelectSource)
# register_table(TestModelSelectPivot)
def test_alter_table_api():
from corm import register_table, insert, sync_schema, select, obtain_session
from corm.models import CORMBase
from datetime import datetime
# Create Table or Delete Column on existing Table
class TestModelAlter(CORMBase):
__keyspace__ = 'mykeyspace'
random_number: int
created: datetime
register_table(TestModelAlter)
sync_schema()
COL_CQL = f'''
SELECT
column_name, type
FROM
system_schema.columns
WHERE
table_name = '{TestModelAlter._corm_details.table_name}'
AND
keyspace_name = '{TestModelAlter._corm_details.keyspace}'
'''
rows = [(row.column_name, row.type) for row in obtain_session('mykeyspace').execute(COL_CQL)]
assert len(rows) == 3
# Add Column on existing Table
class TestModelAlter(CORMBase):
__keyspace__ = 'mykeyspace'
random_number: int
created: datetime
new_column: str
register_table(TestModelAlter)
sync_schema()
rows = [(row.column_name, row.type) for row in obtain_session('mykeyspace').execute(COL_CQL)]
assert len(rows) == 4
def test_not_ordered_by_pk_field():
import random
from corm import register_table, insert, sync_schema, select, obtain_session
from corm.models import CORMBase
from datetime import datetime
class TestNotOrderedByPkField(CORMBase):
__keyspace__ = 'mykeyspace'
__primary_keys__ = ['one', 'two', 'three']
random_number: int
created: datetime
one: str
two: str
three: str
register_table(TestNotOrderedByPkField)
sync_schema()
first_entry = TestNotOrderedByPkField(random.randint(0, 99999), datetime.utcnow(), 'one', 'one', 'beta')
gamma = TestNotOrderedByPkField(random.randint(0, 99999), datetime.utcnow(), 'one', 'one', 'gamma')
delta = TestNotOrderedByPkField(random.randint(0, 99999), datetime.utcnow(), 'one', 'one', 'delta')
second_entry = TestNotOrderedByPkField(random.randint(0, 99999), datetime.utcnow(), 'one', 'one', 'alpha')
insert([first_entry, gamma, delta, second_entry])
for idx, entry in enumerate(select(TestNotOrderedByPkField)):
if idx == 0:
assert entry.three != 'alpha'
def test_ordered_by_pk_field():
import random
from corm import register_table, insert, sync_schema, select, obtain_session
from corm.models import CORMBase
from corm.datatypes import TableOrdering
from datetime import datetime
class TestOrderedByPkField(CORMBase):
__keyspace__ = 'mykeyspace'
__primary_keys__ = ['one', 'two', 'three']
__ordered_by_primary_keys__ = TableOrdering.DESC
random_number: int
created: datetime
one: str
two: str
three: str
register_table(TestOrderedByPkField)
sync_schema()
first_entry = TestOrderedByPkField(random.randint(0, 99999), datetime.utcnow(), 'one', 'one', 'beta')
second_entry = TestOrderedByPkField(random.randint(0, 99999), datetime.utcnow(), 'one', 'one', 'alpha')
gamma = TestOrderedByPkField(random.randint(0, 99999), datetime.utcnow(), 'one', 'one', 'gamma')
delta = TestOrderedByPkField(random.randint(0, 99999), datetime.utcnow(), 'one', 'one', 'delta')
insert([first_entry, second_entry, delta, gamma])
for idx, entry in enumerate(select(TestOrderedByPkField)):
if idx == 0:
assert entry.three == 'alpha'
elif idx == 1:
assert entry.three == 'beta'
elif idx == 2:
assert entry.three == 'delta'
elif idx == 3:
assert entry.three == 'gamma'
def test_corm_auth():
import os
os.environ['CLUSTER_PORT'] = '9043'
os.environ['CLUSTER_USERNAME'] = 'cassandra'
os.environ['CLUSTER_PASSWORD'] = '<PASSWORD>'
from corm import register_table, insert, sync_schema
from corm.models import CORMBase
class TestCORMAuth(CORMBase):
one: str
__keyspace__ = 'test_corm_auth'
register_table(TestCORMAuth)
sync_schema()
def test_corm_enum():
import enum
from corm import register_table, insert, sync_schema, select
from corm.models import CORMBase
class OptionList(enum.Enum):
One = 'one'
Two = 'two'
class TestCormEnum(CORMBase):
__keyspace__ = 'test_corm_enum'
option: OptionList
register_table(TestCormEnum)
sync_schema()
first = TestCormEnum(OptionList.One)
second = TestCormEnum(OptionList.Two)
insert([first, second])
for idx, entry in enumerate(select(TestCormEnum)):
assert entry.option in OptionList.__members__.values()
def test_corm_where():
import enum
from corm import register_table, insert, sync_schema, select, where, cp, Operator
from corm.models import CORMBase
class OptionList(enum.Enum):
One = 'one'
Two = 'two'
class TestCORMWhere(CORMBase):
__keyspace__ = 'test_corm_where'
option: OptionList
score: int
register_table(TestCORMWhere)
sync_schema()
one = TestCORMWhere(OptionList.One, 1)
two = TestCORMWhere(OptionList.One, 2)
three = TestCORMWhere(OptionList.Two, 3)
four = TestCORMWhere(OptionList.Two, 4)
insert([one, two, three, four])
for idx, entry in enumerate(where(TestCORMWhere, [cp(Operator.Equal, 'score', 4)])):
assert idx == 0
assert entry.score == 4
assert entry.option == OptionList.Two
for idx, entry in enumerate(where(TestCORMWhere, [cp(Operator.Equal, 'score', 1)])):
assert idx == 0
assert entry.score == 1
assert entry.option == OptionList.One
for idx, entry in enumerate(where(TestCORMWhere, [cp(Operator.Equal, 'option', OptionList.One)])):
assert idx in [0, 1]
assert entry.score in [1, 2]
assert entry.option == OptionList.One
for idx, entry in enumerate(where(TestCORMWhere, [cp(Operator.Equal, 'option', OptionList.Two)])):
assert idx in [0, 1]
assert entry.score in [3, 4]
assert entry.option == OptionList.Two
def test_corm_uuid():
import uuid
from corm import register_table, insert, sync_schema, select
from corm.models import CORMBase
class TestCORMUUID(CORMBase):
__keyspace__ = 'mykeyspace'
identity_test: uuid.UUID
register_table(TestCORMUUID)
sync_schema()
one = TestCORMUUID(uuid.uuid4())
insert([one])
for entry in select(TestCORMUUID):
assert isinstance(entry.identity_test, uuid.UUID)
| python |
<gh_stars>0
var data = {
"body": "<path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM8.5 6a1.25 1.25 0 1 1 0 2.5a1.25 1.25 0 0 1 0-2.5zm2.5 7c0 .55-.45 1-1 1v3c0 .55-.45 1-1 1H8c-.55 0-1-.45-1-1v-3c-.55 0-1-.45-1-1v-1.5c0-1.1.9-2 2-2h1c1.1 0 2 .9 2 2V13zm6.52.76l-1.6 2.56c-.2.31-.65.31-.85 0l-1.6-2.56c-.2-.33.04-.76.43-.76h3.2c.39 0 .63.43.42.76zM17.1 11h-3.2c-.39 0-.63-.43-.42-.77l1.6-2.56c.2-.31.65-.31.85 0l1.6 2.56c.2.34-.04.77-.43.77z\" fill=\"currentColor\"/>",
"width": 24,
"height": 24
};
exports.__esModule = true;
exports.default = data;
| javascript |
Ever since its launch back in November 2021, the developers have consistently been adding new content to Jurassic World Evolution 2 in a bid to sustain the hype and excitement surrounding it. Apart from brand new campaigns, Frontier Developments has also introduced multiple new faces from prehistoric times. The recent Feathered Species Pack is a similar tale.
The latest DLC pack brings four new species that players will be able to add to their parks. They have been painstakingly brought to life and are designed to captivate the attention of not just the visitors who make their way to the enclosures but also the players themselves.
While the Feathered Species Pack is not the same as its immediate predecessor, the Dominion Malta Expansion, I was excited to see what the developers have offered with the new DLC.
In my initial review of the base Jurassic World Evolution 2 game and for every subsequent DLCs, I have praised the developers at Frontier Developments for how beautifully they have realized these creatures from millions of years ago and introduced a variety of behavioral nuances to capture players' imagination.
With The Feathered Species Pack, they continue the trend of adding more and more of such exciting faces from our prehistoric past brought to life in all their majestic glory. The latest DLC introduces Yutyrannus, Jeholopterus, Deinocheirus, and Sinosauropteryx with them featuring intricate plumage and patterns that catch the eye.
Yutyrannus, also known as the feathered tyrant, was an early Cretaceous period dinosaur that roamed the now Liaoning Province. The meat-eating behemoth was a striking addition to my park, with its white and black striped fur and feathered tail providing it with a distinct look.
Next, I added a handful of Sinosauropteryx to delight my park guests. While I knew they were small, carnivorous dinosaurs, I did have to spend a little time locating them in their large enclosures. The trick is to look for its tail sticking out of the foliage.
Sinosauropteryx is an absolute delight to look at, especially with its waving striped tail bobbing behind it as it runs around. The Feathered Species Pack also added the smallest flying species in Jurassic World Evolution 2 with the Jeholopterus. These agile creatures have mesmerizing patterned wings that visitors can catch as the creatures soar within the aviary.
The final addition to the list is Deinocheirus. They are considered to be one of the largest ornithomimosaurs to have ever been discovered. Their physical characteristics make them quite the unique species to have in your park.
Is it worth it?
I have been mulling over and answering these questions with every pack Frontier Developments release for Jurassic World Evolution 2. The developers have consistently managed to create these extinct species with intricate nuances that make them feel alive and a treasure to add to your park.
While the Dominion Expansions remain my absolute favorites among all the available DLC content, I feel that the various packs, including the Feathered Species Pack, are more attuned to the paleontologists among us who would love to add a diverse array of creatures to their park in-game.
Having said that, I find the Feathered Species Pack to be a great addition to the game and one that players would likely not want to miss out on. Be it watching a Jeholopterus catch insects mid-air or two Sinosauropteryx interacting and playing with each other, I've had an absolute blast with the four creatures introduced with the latest DLC.
| english |
package at.aau.esop15.course06.game;
/**
* @author Dr. <NAME>, <EMAIL>, 12.11.2015 14:22.
*/
public class Music extends Audio {
}
| java |
One of the main trends is an ordinary white T-shirt made of cotton, polyester or some other fabric. This is surprisingly laconic and at the same time a universal part of the wardrobe of any person. The most common combination is white Maya with jeans. She emphasizes the figure, skin color and gives the whole image a sea of direct, unobtrusive sexuality. This combination of things was first presented on a big stage by Dima Bilan at the Eurovision Song Contest. After his speech, everyone started wearing a jersey with jeans, a leather belt with metal inserts and light sports shoes.
The universality of this wardrobe is that it will perfectly match with any things. So, with what to wear a white jersey? If you want to create an image for the office, then women can wear it together with black trousers 7/8 and a jacket with ¾ sleeves. This will give the image on the one hand deliberate negligence, and on the other - will withstand the dress code. A bright accessory to this set will be braces and shoes on a massive stable heel.
Yet a white T-shirt is associated with many in the summer. Girls prefer to wear it with skirts of various lengths. If all things are a set of one color, then this will add to all kind of airiness, lightness and tenderness. It is worth noting that it is not the first season of one of the main trends of the summer fashion is wearing it along with a skirt in the floor, made of air materials or thin cotton, and pantolets or sandals decorated with flowers or rhinestones. If you add a large exotic flower to your hair, then you can safely qualify for the title of "Queen of Beach Parties. " Men can wear a white jersey with summer jeans, light trousers made of natural fabrics, while the trousers must be rolled up so that the ankles can be seen. Actual shoes for young people in conjunction with these wardrobe items were light or colored polukedy, also it can be sneakers or pantowletes.
It should be noted that in order for a white T-shirt to look at a person profitable, it should have a beautiful tightened body and golden skin color. This part of the wardrobe beautifully emphasizes all the reliefs, but at the same time will not hide a single defect. To solve this problem will help correctly picked up cardigans or light summer shirts, thrown from above. They can be supplemented by a wide elastic strap with a large buckle. Owners of full-fledged hands should not deny themselves the pleasure of wearing a T-shirt, they can throw on top a tie made of the finest cotton or chiffon.
For many designers and simply creative people, a white T-shirt is not only a finished version of clothing, but also a huge field for creativity and the manifestation of one's individuality. They know exactly how to decorate a white jersey so that it becomes a unique and original clothing. For these purposes, you can use thermo - stickers, which are sold in all cloth stores. This is the easiest and fastest way to decorate fabrics. You can add sequins to them. They are sold not only individually, but also sealed in one tape, which allows you to quickly and easily create various inscriptions on the fabric. This will be an original addition, which can make from an ordinary shirt an elegant evening top. Also for decoration you can use a variety of artificial flowers, adding romanticism to form. For example, a large bright sunflower, attached to the middle of a T-shirt, with a stem made of green sequins tape will make the wearer of this piece of clothing visible in any crowd and attract a lot of attention to it.
A simple white T-shirt is a huge field for creativity and a universal component of the wardrobe, which can be combined with absolutely all things. It allows its owners to remain at the peak of fashion without sacrificing their own comfort. | english |
<filename>src/main/java/com/bergerkiller/generated/net/minecraft/server/RegistryMaterialsHandle.java<gh_stars>0
package com.bergerkiller.generated.net.minecraft.server;
import com.bergerkiller.mountiplex.reflection.declarations.Template;
import java.util.Map;
/**
* Instance wrapper handle for type <b>net.minecraft.server.RegistryMaterials</b>.
* To access members without creating a handle type, use the static {@link #T} member.
* New handles can be created from raw instances using {@link #createHandle(Object)}.
*/
@Template.InstanceType("net.minecraft.server.RegistryMaterials")
public abstract class RegistryMaterialsHandle extends Template.Handle {
/** @See {@link RegistryMaterialsClass} */
public static final RegistryMaterialsClass T = Template.Class.create(RegistryMaterialsClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
/* ============================================================================== */
public static RegistryMaterialsHandle createHandle(Object handleInstance) {
return T.createHandle(handleInstance);
}
/* ============================================================================== */
public abstract Object get(Object key);
public abstract Object getKey(Object value);
/**
* Stores class members for <b>net.minecraft.server.RegistryMaterials</b>.
* Methods, fields, and constructors can be used without using Handle Objects.
*/
public static final class RegistryMaterialsClass extends Template.Class<RegistryMaterialsHandle> {
@Template.Optional
public final Template.Field<Map<Object, Object>> opt_inverseLookupField = new Template.Field<Map<Object, Object>>();
public final Template.Method.Converted<Object> get = new Template.Method.Converted<Object>();
public final Template.Method<Object> getKey = new Template.Method<Object>();
}
}
| java |
<filename>example-projects/mysql-actix-api/src/handlers/index_handler.rs<gh_stars>1-10
use actix_web::{get, HttpResponse, Responder};
#[get("/")]
pub async fn index() -> impl Responder {
HttpResponse::Ok().body("Hello World!")
}
#[get("/status")]
pub async fn status() -> impl Responder {
HttpResponse::Ok().body("ok!")
}
pub async fn empty() -> impl Responder {
HttpResponse::Ok().body("empty!")
}
| rust |
Bigg Boss 7 Telugu is going great and with each passing day, the intensity of the tasks is getting better. Only seven celebs are left in the house and two of them will be ousted this week as per the news.
The word is that the makers are also planning for a double elimination this week as well. One of the celebs who is nominated will be taken away by the team as an elimination say the reports.
The ones in the danger zone are Yawar and Shobha Shetty. The competition is very tough as it is the last week where the nominations will happen. Next week, it will be a grand finale and the winner will be announced.
Articles that might interest you:
| english |
Superfoods have been the buzzword in the healthcare industry for quite some time now and it seems like everyone is jumping on to the bandwagon. But are these so-called “superfoods” really nutritionally important or just a hype? We’ll explore what makes a food a superfood, why they’re relevant, their potential benefits and some popular examples of superfoods you may want to consider adding to your diet.
What are superfoods?
Superfoods are a category of nutrient-dense foods that offer high levels of essential vitamins, minerals and bioactive compounds. These compounds include antioxidants, phytochemicals, probiotics, prebiotics, healthy fats like Omega-3 fatty acids, polyphenols, carotenoids and more.
What sets superfoods apart from other whole foods is their unique combination of these vital nutrients and bioactive compounds. These substances promote good health by supporting the body’s natural functions in various ways such as improving immunity or boosting energy levels.
While the term “superfood” may be overused for commercial purposes, it doesn’t take away from the fact that certain foods hold immense nutritional value for our bodies. In fact, they are necessary to prevent chronic diseases and help in lifestyle management.
The concept of superfoods is not new; in fact, it has been around for centuries. Ancient civilizations like the Greeks and Romans believed in consuming certain foods to boost their health and vitality. In traditional Chinese medicine, ginseng was considered a superfood due to its many nutritional properties. Similarly, Ayurveda emphasised the use of nutrient-rich foods for healing and wellness. Foods such as turmeric, ginger and ashwagandha were recommended for various ailments.
Superfoods have gained immense popularity in India as people are becoming increasingly health-conscious. In a country where traditional diets are being replaced by processed and fast foods, superfoods provide a way to preserve the nutrient-rich foods that have been consumed for centuries.
Turmeric, an ingredient commonly used in Indian cooking, is considered a superfood due to its anti-inflammatory properties. Other examples of popular superfoods include chickpeas or chana, moringa leaves or drumstick leaves, Indian gooseberry or amla which is rich in Vitamin C and nuts like almonds and cashews. However, there are concerns about the accessibility and affordability of imported items such as kale or goji berries for average Indians. It’s crucial to recognize local ingredients like curry leaves or drumsticks that are equally nutritious but often overlooked.
Drumsticks contain minerals, vitamins and fibre, which help lower blood sugar levels. Their leaves stop cancer cells from growing and their extracts are rich in antioxidants, can neutralise free radicals and prevent oxidative damage. They can help lower cholesterol, prevent Alzheimer’s, are great diuretics and can heal ulcers.
Several studies have shown that extracts of drumsticks are effective against several bacteria such as Bacillus subtilis, Staphylococcus aureus and Vibrio cholera.
Meanwhile curry leaves yield 97 calories/100g, are high in soluble and insoluble fibres, which help in the reduction of serum LDL cholesterol levels as well as in smooth bowel movements. They prevent hunger pangs and increase the satiety value of foods. They are rich in folate, vitamin A and B vitamins, the last playing a key role in enzyme synthesis, nervous system function and body metabolism.
Why are superfoods relevant?
Superfoods can help address some of the major health concerns prevalent in India such as malnutrition and lifestyle diseases like diabetes and obesity. The high concentration of nutrients present in superfoods makes them an ideal dietary supplement for people who may not be getting enough nutrition from their regular diet.
Incorporating superfoods into your diet can be an excellent way to boost your nutritional intake and improve overall health. Here are some tips on how to incorporate these nutrient-dense foods into your daily meals:
1. Start small: Begin by adding one or two superfoods to your regular meals, such as incorporating chia seeds into a smoothie or adding berries to your breakfast cereal.
2. Experiment with recipes: Superfoods can be used in a variety of dishes, from salads to soups and main courses. Try new recipes that include superfood ingredients like quinoa, kale, turmeric or ginger.
3. Look for local options: While international superfoods like goji berries may not always be affordable or accessible, there are many nutritious options available locally such as drumstick leaves (moringa), curry leaves, tulsi etc.
4. Get creative: Superfoods don’t have to be boring! Mix them up with herbs and spices for added flavour while getting the benefits too — try roasted chickpeas seasoned with turmeric and cumin.
5. Plan ahead: Meal prepping is an effective way of ensuring you consume healthy foods throughout the week; consider preparing snacks like trail mix using nuts and dried fruits. Incorporating superfoods into our diets doesn’t have to be complicated but requires conscious efforts towards making healthier food choices in our everyday lives.
However, consumers must be aware that consuming superfoods alone without a balanced diet could have adverse effects on their health if taken excessively or without consulting qualified sources. Therefore, while we embrace this trend towards healthier eating patterns through incorporating superfoods into our diets, it is important not to overlook traditional nutrient-rich foods available locally that are equally effective in promoting good health and nutrition value. | english |
English version of the README -> please [click here](./README-EN.md)
## 关于版本匹配说明
此Demo适用于CR系列的V3.5.2及以上控制器版本。
## DEMO说明文档
本demo为Java 编写的给Android手机或平板使用TCP方式控制Dobot协作机器人CR(以下简称CR)的DEMO
## DEMO系统要求
Android 4.3版本以上即可
## 工程文件说明
工程文件需要使用Android Studio打开,请使用4.0版本的Android Studio
工程文件目录下分为四个模块分别为app、socket-client、socket-common-interface、socket-core。其中app为demo的主要模块,用于对CR的TCP通讯协议的封装以及实现部分简单的功能交互,如上使能、清除报警、急停、点动、MovJ和修改IO等功能。剩下的模块为实现TCP通讯功能的Socket客户端的底层实现。
在app包内主要分为Client、Message和RobotState模块,分别对应了TCP客户端的实现,TCP通讯协议的封装和机器人状态的实时封装。
* Client中实现了三个Client对应了CR三个端口和三种形式的消息协议。APIClient对应了29999端口,实现了一个一发一收的应答客户端。MoveClient对应了30003端口,只进行发送工作对应了CR的运动指令。StateClient对应了30004端口只进行接受机器人的状态协议。
* Message则为CR的各种发送的消息封装,分为基础的BaseMessage和CRMessage.
* RobotState则是对30004端口返回的数据进行了封装,用于生成各种CR的参数。
| markdown |
<reponame>JefferyLukas/SRIs<filename>should.js/13.2.3.json
{"should.js":"<KEY>,"should.min.js":"<KEY>} | json |
<reponame>erkanerol/bash-lingua-non-grata<gh_stars>10-100
# Pipes
- The output of each command in the pipeline is connected via a pipe to the input of the next command. That is, each command reads the previous command’s output.
- `command1 | command2 | command3`
[filename](../../examples/pipes/pipes.sh ':include :type=code bash')
#### Demo
```
bash ./examples/pipes/pipes.sh 1
```
<br><br><br><br><br>
### References
- https://www.gnu.org/software/bash/manual/html_node/Pipelines.html | markdown |
These days there are many young women are making their way to Tollywood from Mumbai, North India and neighbouring States too.
Anju Kurian, is the latest entrant into our Telugu Film Industry from Kerala, after Keerthy Suresh, Bhavana and few others.
She wants to do as many Telugu films as she can and concentrate on a big career here and in Tamil films as well.
She wants to do so, as this is the second largest filmmaking Industry in the county and the Industry, that made an Pan-Indian hit like, Baahubali.
The actress is debuting with Sumanth, in his next film. Look at her, doesn't she look like a girl from neighbourhood. | english |
# Title : TODO
# Objective : TODO
# Created by: noonwave
# Created on: 4/8/20 | python |
import 'reflect-metadata';
jest.mock('express');
import express from 'express';
import { IInteractor } from '../../common/interfaces/IInteractor';
import { ITransformer } from '../../common/interfaces/ITransformer';
import { ApiVersion } from '../../common/models/domain/ApiVersion';
import { requestContextSymbol } from '../../common/models/domain/requestContextSymbol';
import { RequestWithContext } from '../../server/models/RequestWithContext';
import { SelectedCriteriaApiV1Fixtures } from '../fixtures/api/v1/SelectedCriteriaApiV1Fixtures';
import { SelectedCriteriaFixtures } from '../fixtures/domain/SelectedCriteriaFixtures';
import { SelectedCriteriaUpdateQueryFixtures } from '../fixtures/domain/SelectedCriteriaUpdateQueryFixtures';
import { SelectedCriteriaApiV1 } from '../models/api/v1/SelectedCriteriaApiV1';
import { SelectedCriteria } from '../models/domain/SelectedCriteria';
import { SelectedCriteriaUpdateQuery } from '../models/domain/SelectedCriteriaUpdateQuery';
import { PatchUsersMeSelectedCriteriasSelectedCriteriaUuidRequestHandler } from './PatchUsersMeSelectedCriteriasSelectedCriteriaUuidRequestHandler';
describe('PatchUsersMeSelectedCriteriasSelectedCriteriaUuidExpressRequestHandler', () => {
let patchV1UsersMeSelectedCriteriasSelectedCriteriaUuidRequestToSelectedCriteriaUpdateQueryTransformer: jest.Mocked<
ITransformer<RequestWithContext, SelectedCriteriaUpdateQuery>
>;
let updateSelectedCriteriaInteractor: jest.Mocked<
IInteractor<SelectedCriteriaUpdateQuery, SelectedCriteria>
>;
let matchingToSelectedCriteriaApiV1Transformer: jest.Mocked<
ITransformer<SelectedCriteria, SelectedCriteriaApiV1>
>;
let patchUsersMeSelectedCriteriasSelectedCriteriaUuidRequestHandler: PatchUsersMeSelectedCriteriasSelectedCriteriaUuidRequestHandler;
beforeAll(() => {
let expressRouterMockHandler: express.RequestHandler | undefined =
undefined;
const expressRouterMock: jest.Mocked<express.Router> = jest
.fn()
.mockImplementation(
(
request: express.Request,
response: express.Response,
next: express.NextFunction,
) => {
if (expressRouterMockHandler) {
expressRouterMockHandler(request, response, next);
}
},
) as Partial<express.Router> as jest.Mocked<express.Router>;
expressRouterMock.use = jest
.fn()
.mockImplementation(
(handler: express.RequestHandler): express.RequestHandler => {
expressRouterMockHandler = handler;
return expressRouterMock;
},
);
(express.Router as jest.Mock).mockReturnValue(expressRouterMock);
patchV1UsersMeSelectedCriteriasSelectedCriteriaUuidRequestToSelectedCriteriaUpdateQueryTransformer =
{
transform: jest.fn(),
};
updateSelectedCriteriaInteractor = {
interact: jest.fn(),
};
matchingToSelectedCriteriaApiV1Transformer = {
transform: jest.fn(),
};
patchUsersMeSelectedCriteriasSelectedCriteriaUuidRequestHandler =
new PatchUsersMeSelectedCriteriasSelectedCriteriaUuidRequestHandler(
patchV1UsersMeSelectedCriteriasSelectedCriteriaUuidRequestToSelectedCriteriaUpdateQueryTransformer,
updateSelectedCriteriaInteractor,
matchingToSelectedCriteriaApiV1Transformer,
);
});
describe('.handler()', () => {
let expressResponseMock: jest.Mocked<express.Response>;
let expressNextFunctionMock: jest.Mocked<express.NextFunction>;
beforeAll(() => {
expressResponseMock = {
json: jest.fn(),
} as Partial<express.Response> as jest.Mocked<express.Response>;
expressNextFunctionMock = jest.fn();
patchV1UsersMeSelectedCriteriasSelectedCriteriaUuidRequestToSelectedCriteriaUpdateQueryTransformer.transform.mockResolvedValue(
SelectedCriteriaUpdateQueryFixtures.withMandatory,
);
updateSelectedCriteriaInteractor.interact.mockResolvedValue(
SelectedCriteriaFixtures.withMandatory,
);
matchingToSelectedCriteriaApiV1Transformer.transform.mockResolvedValue(
SelectedCriteriaApiV1Fixtures.withMandatory,
);
});
describe('having an ExpressRequest with ApiVersion.v1', () => {
let expressRequestMock: RequestWithContext;
beforeAll(() => {
expressRequestMock = {
[requestContextSymbol]: {
apiVersion: ApiVersion.v1,
},
} as RequestWithContext;
});
describe('when called', () => {
beforeAll(async () => {
await (patchUsersMeSelectedCriteriasSelectedCriteriaUuidRequestHandler.handler(
expressRequestMock,
expressResponseMock,
expressNextFunctionMock,
) as unknown as Promise<void>);
});
afterAll(() => {
jest.clearAllMocks();
});
it('should call PatchV1SelectedCriteriasSelectedCriteriaUuidRequestToSelectedCriteriaUpdateQueryTransformer.trasnform()', () => {
expect(
patchV1UsersMeSelectedCriteriasSelectedCriteriaUuidRequestToSelectedCriteriaUpdateQueryTransformer.transform,
).toHaveBeenCalledTimes(1);
expect(
patchV1UsersMeSelectedCriteriasSelectedCriteriaUuidRequestToSelectedCriteriaUpdateQueryTransformer.transform,
).toHaveBeenCalledWith(expressRequestMock);
});
it('should call UpdateSelectedCriteriaInteractor.interact()', () => {
expect(
updateSelectedCriteriaInteractor.interact,
).toHaveBeenCalledTimes(1);
expect(
updateSelectedCriteriaInteractor.interact,
).toHaveBeenCalledWith(
SelectedCriteriaUpdateQueryFixtures.withMandatory,
);
});
it('should call SelectedCriteriaToSelectedCriteriaApiV1Transformer.transform()', () => {
expect(
matchingToSelectedCriteriaApiV1Transformer.transform,
).toHaveBeenCalledTimes(1);
expect(
matchingToSelectedCriteriaApiV1Transformer.transform,
).toHaveBeenCalledWith(SelectedCriteriaFixtures.withMandatory);
});
it('should call expressResponseMock.json()', () => {
expect(expressResponseMock.json).toHaveBeenCalledTimes(1);
expect(expressResponseMock.json).toHaveBeenCalledWith(
SelectedCriteriaApiV1Fixtures.withMandatory,
);
});
});
});
});
});
| typescript |
<!-- NewPage -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Thu Jan 21 11:21:36 CST 2016 -->
<title>AttributeMap (Oracle OLAP Java API Reference)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="date" content="2016-01-21">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js">
</script>
<meta name="generator" content="Oracle ST-Doc Jadey 2.5">
<link rel="schema.dcterms" href="http://purl.org/dc/terms/">
<meta name="dcterms.created" content="2019-01-10T23:14:22+00:00">
<meta name="dcterms.title" content="Oracle OLAP Java API Reference">
<meta name="dcterms.category" content="database">
<meta name="dcterms.isVersionOf" content="OLAPI">
<meta name="dcterms.product" content="en/database/oracle/oracle-database/19">
<meta name="dcterms.identifier" content="E96404-01">
<meta name="dcterms.release" content="Release 19">
<script id="ssot-metadata" type="application/json"> {"primary":{"category":{"short_name":"database","element_name":"Database","display_in_url":true},"suite":{"short_name":"oracle","element_name":"Oracle","display_in_url":true},"product_group":{"short_name":"not-applicable","element_name":"Not applicable","display_in_url":false},"product":{"short_name":"oracle-database","element_name":"Oracle Database","display_in_url":true},"release":{"short_name":"19","element_name":"Release 19","display_in_url":true}}} </script>
</head>
<body>
<script type="text/javascript">
<!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="AttributeMap (Oracle OLAP Java API Reference)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script><noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar_top" id="navbar_top"><!-- --></a>
<div class="skipNav"><a href="#skip_navbar_top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar_top_firstrow" id="navbar_top_firstrow"><!-- --></a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Oracle® OLAP Java API Reference<br>
19c</b><br>
E96404-01
</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="CubeDimensionalityMap.html" title="class in oracle.olapi.metadata.mapping"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html" target="_top">Frames</a></li>
<li><a href="AttributeMap.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div><script type="text/javascript">
<!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script></div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip_navbar_top" id="skip_navbar_top"><!-- --></a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">oracle.olapi.metadata.mapping</div>
<h2 title="Class AttributeMap" class="title">Class AttributeMap</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../BaseMetadataObject.html" title="class in oracle.olapi.metadata">oracle.olapi.metadata.BaseMetadataObject</a></li>
<li>
<ul class="inheritance">
<li><a href="../PublicMetadataObject.html" title="class in oracle.olapi.metadata">oracle.olapi.metadata.PublicMetadataObject</a></li>
<li>
<ul class="inheritance">
<li><a href="ObjectMap.html" title="class in oracle.olapi.metadata.mapping">oracle.olapi.metadata.mapping.ObjectMap</a></li>
<li>
<ul class="inheritance">
<li><a href="ValueMap.html" title="class in oracle.olapi.metadata.mapping">oracle.olapi.metadata.mapping.ValueMap</a></li>
<li>
<ul class="inheritance">
<li>oracle.olapi.metadata.mapping.AttributeMap</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../MetadataObject.html" title="interface in oracle.olapi.metadata">MetadataObject</a></dd>
</dl>
<hr>
<br>
<pre>
public final class <span class="typeNameLabel">AttributeMap</span>
extends <a href="ValueMap.html" title="class in oracle.olapi.metadata.mapping">ValueMap</a>
</pre>
<div class="block">A <code>ValueMap</code> that maps an <code>MdmAttribute</code> for an <code>MdmDimension</code> to an <code>Expression</code>. An application creates an <code>AttributeMap</code> with the <a href="DimensionMap.html#findOrCreateAttributeMap_oracle_olapi_metadata_mdm_MdmBaseAttribute_"><code><code>findOrCreateAttributeMap</code></code></a> method of a <code>DimensionMap</code>. An application that supports multiple languages must provide a separate <code>AttributeMap</code> for each language.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList"><!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary" id="method_summary"><!-- --></a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../mdm/MdmBaseAttribute.html" title="class in oracle.olapi.metadata.mdm">MdmBaseAttribute</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="AttributeMap.html#getAttribute__">getAttribute</a></span>()</code>
<div class="block">Gets the <code>MdmAttribute</code> associated with the <code>AttributeMap</code>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="DimensionMap.html" title="class in oracle.olapi.metadata.mapping">DimensionMap</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="AttributeMap.html#getDimensionMap__">getDimensionMap</a></span>()</code>
<div class="block">Gets the <code>DimensionMap</code> that is the owner of this <code>AttributeMap</code>.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="AttributeMap.html#getLanguage__">getLanguage</a></span>()</code>
<div class="block">Gets the language that is associated with this <code>AttributeMap</code>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="AttributeMap.html#setAttribute_oracle_olapi_metadata_mdm_MdmBaseAttribute_">setAttribute</a></span>(<a href="../mdm/MdmBaseAttribute.html" title="class in oracle.olapi.metadata.mdm">MdmBaseAttribute</a> input)</code>
<div class="block">Specifies the <code>MdmAttribute</code> to associate with the <code>AttributeMap</code>.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="AttributeMap.html#setLanguage_java_lang_String_">setLanguage</a></span>(java.lang.String input)</code>
<div class="block">Specifies the language to associate with this <code>AttributeMap</code>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_oracle_olapi_metadata_mapping_ValueMap" id="methods_inherited_from_class_oracle_olapi_metadata_mapping_ValueMap"><!-- --></a>
<h3>Methods inherited from class oracle.olapi.metadata.mapping.<a href="ValueMap.html" title="class in oracle.olapi.metadata.mapping">ValueMap</a></h3>
<code><a href="ValueMap.html#getExpression__">getExpression</a>, <a href="ValueMap.html#getName__">getName</a>, <a href="ValueMap.html#setExpression_oracle_olapi_syntax_Expression_">setExpression</a>, <a href="ValueMap.html#setName_java_lang_String_">setName</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_oracle_olapi_metadata_BaseMetadataObject" id="methods_inherited_from_class_oracle_olapi_metadata_BaseMetadataObject"><!-- --></a>
<h3>Methods inherited from class oracle.olapi.metadata.<a href="../BaseMetadataObject.html" title="class in oracle.olapi.metadata">BaseMetadataObject</a></h3>
<code><a href="../BaseMetadataObject.html#getContainedByObject__">getContainedByObject</a>, <a href="../BaseMetadataObject.html#getID__">getID</a>, <a href="../BaseMetadataObject.html#getNewName__">getNewName</a>, <a href="../BaseMetadataObject.html#getOwner__">getOwner</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java_lang_Object" id="methods_inherited_from_class_java_lang_Object"><!-- --></a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList"><!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail" id="method_detail"><!-- --></a>
<h3>Method Detail</h3>
<a name="setAttribute_oracle_olapi_metadata_mdm_MdmBaseAttribute_" id="setAttribute_oracle_olapi_metadata_mdm_MdmBaseAttribute_"><!-- --></a>
<ul class="blockList">
<li class="blockList">
<h4>setAttribute</h4>
<pre>
public void setAttribute(<a href="../mdm/MdmBaseAttribute.html" title="class in oracle.olapi.metadata.mdm">MdmBaseAttribute</a> input)
</pre>
<div class="block">Specifies the <code>MdmAttribute</code> to associate with the <code>AttributeMap</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - The <code>MdmAttribute</code> to associate with the <code>AttributeMap</code>.</dd>
</dl>
</li>
</ul>
<a name="getAttribute__" id="getAttribute__"><!-- --></a>
<ul class="blockList">
<li class="blockList">
<h4>getAttribute</h4>
<pre>
public <a href="../mdm/MdmBaseAttribute.html" title="class in oracle.olapi.metadata.mdm">MdmBaseAttribute</a> getAttribute()
</pre>
<div class="block">Gets the <code>MdmAttribute</code> associated with the <code>AttributeMap</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The <code>MdmAttribute</code> associated with the <code>AttributeMap</code>.</dd>
</dl>
</li>
</ul>
<a name="getDimensionMap__" id="getDimensionMap__"><!-- --></a>
<ul class="blockList">
<li class="blockList">
<h4>getDimensionMap</h4>
<pre>
public <a href="DimensionMap.html" title="class in oracle.olapi.metadata.mapping">DimensionMap</a> getDimensionMap()
</pre>
<div class="block">Gets the <code>DimensionMap</code> that is the owner of this <code>AttributeMap</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The <code>DimensionMap</code> that owns this <code>AttributeMap</code>.</dd>
</dl>
</li>
</ul>
<a name="setLanguage_java_lang_String_" id="setLanguage_java_lang_String_"><!-- --></a>
<ul class="blockList">
<li class="blockList">
<h4>setLanguage</h4>
<pre>
public void setLanguage(java.lang.String input)
</pre>
<div class="block">Specifies the language to associate with this <code>AttributeMap</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - A <code>String</code> that contains the identifier of the language to associate with this <code>AttributeMap</code>.</dd>
</dl>
</li>
</ul>
<a name="getLanguage__" id="getLanguage__"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
<h4>getLanguage</h4>
<pre>
public java.lang.String getLanguage()
</pre>
<div class="block">Gets the language that is associated with this <code>AttributeMap</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A <code>String</code> that contains the identifier of the language associated with this <code>AttributeMap</code>.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom" id="navbar_bottom"><!-- --></a>
<div class="skipNav"><a href="#skip_navbar_bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar_bottom_firstrow" id="navbar_bottom_firstrow"><!-- --></a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">
<center>Copyright © 2002, 2018, Oracle. All rights reserved.</center>
</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="CubeDimensionalityMap.html" title="class in oracle.olapi.metadata.mapping"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html" target="_top">Frames</a></li>
<li><a href="AttributeMap.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div><script type="text/javascript">
<!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script></div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip_navbar_bottom" id="skip_navbar_bottom"><!-- --></a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| html |
{"sly.js":"sha256-ZPZegPROQi3adQjGOYqI9/oYDKe0Vj5RL/Jak94+Trw=","sly.min.js":"sha256-bn+QvVomrklOWby13NVHR9rWRafVYx+RbwIP+GyclB4="}
| json |
#!/usr/bin/env python
###########################################################
# WARNING: Generated code! #
# ************************** #
# Manual changes may get lost if file is generated again. #
# Only code inside the [MANUAL] tags will be kept. #
###########################################################
import roslib; roslib.load_manifest('behavior_simplemissionerror')
from flexbe_core import Behavior, Autonomy, OperatableStateMachine, ConcurrencyContainer, PriorityContainer, Logger
from hector_flexbe_states.ErrorOperator import ErrorOperator
from hector_flexbe_states.get_robot_pose import GetRobotPose
# Additional imports can be added inside the following tags
# [MANUAL_IMPORT]
from geometry_msgs.msg import PoseStamped
# [/MANUAL_IMPORT]
'''
Created on Thu Jun 09 2016
@author: <NAME>
'''
class SimpleMissionErrorSM(Behavior):
'''
Error handling for Simple Mission
'''
def __init__(self):
super(SimpleMissionErrorSM, self).__init__()
self.name = 'SimpleMissionError'
# parameters of this behavior
# references to used behaviors
# Additional initialization code can be added inside the following tags
# [MANUAL_INIT]
# [/MANUAL_INIT]
# Behavior comments:
def create(self):
# x:130 y:365, x:230 y:365, x:325 y:378
_state_machine = OperatableStateMachine(outcomes=['failed', 'toStart', 'toEnd'], input_keys=['startPoint', 'endPoint'], output_keys=['startPoint', 'endPoint'])
_state_machine.userdata.startPoint = PoseStamped()
_state_machine.userdata.endPoint = PoseStamped()
# Additional creation code can be added inside the following tags
# [MANUAL_CREATE]
# [/MANUAL_CREATE]
with _state_machine:
# x:209 y:34
OperatableStateMachine.add('Operator',
ErrorOperator(),
transitions={'failed': 'failed', 'toStart': 'toStart', 'toEnd': 'toEnd', 'setSart': 'setStartpoint', 'setEnd': 'setEndpoint'},
autonomy={'failed': Autonomy.High, 'toStart': Autonomy.High, 'toEnd': Autonomy.High, 'setSart': Autonomy.High, 'setEnd': Autonomy.High},
remapping={'startPoint': 'startPoint', 'endPoint': 'endPoint'})
# x:555 y:29
OperatableStateMachine.add('setStartpoint',
GetRobotPose(),
transitions={'succeeded': 'Operator'},
autonomy={'succeeded': Autonomy.Off},
remapping={'pose': 'startPoint'})
# x:553 y:120
OperatableStateMachine.add('setEndpoint',
GetRobotPose(),
transitions={'succeeded': 'Operator'},
autonomy={'succeeded': Autonomy.Off},
remapping={'pose': 'endPoint'})
return _state_machine
# Private functions can be added inside the following tags
# [MANUAL_FUNC]
# [/MANUAL_FUNC]
| python |
The deviations from the specifications of the RFP (request for proposal) in violation of the rules were already approved by the MD, DTC, and Transport Minister Kailash Gehlot himself a day before it was placed before the DTC Board for approval, a press note from the Delhi LG office said.
Delhi: Delhi Lieutenant General Vinai Kumar Saxena has alleged that the Arvind Kejriwal-led Delhi government backtracked and scrapped the tender process in the procurement of 1,000 Delhi Transport Corporation ( DTC ) buses only after a detailed report by the DTC brought to light the "wrongdoings" being carried out under Transport Minister Kailash Gehlot's supervision.
The note further said that the deviations from the specifications of the RFP (request for proposal) in violation of the rules, as recommended by the Tender Committee headed by Kailash Gehlot, were already approved by the MD, DTC, and the Transport Minister himself on November 6, 2019, a day before it was placed before the DTC Board for approval on November 7, 2019.
Highlights of Deputy Commissioner (DTC) reports:
-The DTC had floated the tender for procurement of 1,000 buses and it was a single tender for the supply of 1,000 BS-IV or latest buses.
-In the pre-bid, the quantity of 1,000 buses was bifurcated into 400 BS-IV buses and 600 BS-VI buses but the tender still remained one only and the bidders could have made the bid for all 1,000 of these buses of both types as mere bifurcation of two types of buses did not ever change the RFP into two separate tenders.
-However, the bidding consultant (DIMTS) and the Tender Committee of DTC did not correctly evaluate the financial bids. The Committee declared M/S TATA Motors Ltd eligible for the bid of 600 BS-VI buses.
-M/s TATA Motors Ltd made a bid for 600 buses and, therefore, its bid should have been rejected. After the rejection of Tata Motors, there would have been a single bid of M/s JBM and the examination of this tender would have been on an entirely different footing.
-However, it was further found that DTC invited M/s JBM for negotiation for BS-IV buses on the basis of rates of TATA which never made any bid for this category. This action of DTC was without any justification and the price negotiation with M/s JBM is violative of GFR and CVC guidelines.
-Interestingly, there was a specific requirement of front-facing seats in the RFP but both the Consultant and DTC Tender Committee did not reject JBM's bid for want of this condition.
-Since the buses did not match the condition of the RFP, its bid should have been rejected at the techno-commercial stage itself and opening of the financial bid of a bidder whose bus did not meet the specifications is not justified, the report said.
-The RFP contained a proforma for deviation but M/s JBM did not mention any deviation from the specifications and therefore, DTC should not have considered the bid. This RFP/Tender process has been vitiated and the DTC must inquire into the matter and fix responsibility for the lapses.
For the abovementioned reasons, it is recommended that the DTC should scrap the tender and should call for fresh bids without any delay, the noting said.
Meanwhile, LG Saxena has cleared a proposal by chief secretary Naresh Kumar to forward a complaint, linked to the alleged corruption in the procurement of 1,000 low-floor buses by the DTC, to the CBI. The complaint was received by the LG Secretariat office.
The complaint stated the appointment of the Minister of Transport as the Chairman of the Committee for tendering and procurement of buses by DTC in a pre-mediated manner, while the irregularities in the bid of July 2019 for procurement of 1000 low floor BS-IV and BS-VI buses and a bid of March 2020 for purchase and annual maintenance contract of low floor BS-VI buses, read the complaint. | english |
{
"siteIds": [${repeat:prop.provision.hubspokesite_length:
${prop.provision.hubspokesite[${1}]},
}
],
"encryptionKey":null,
"validityPeriod":3
}
| json |
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
package com.pogeyan.cmis.impl.uri.expression;
import com.pogeyan.cmis.api.uri.exception.MessageReference;
import com.pogeyan.cmis.api.uri.expression.CommonExpression;
import com.pogeyan.cmis.api.uri.expression.ExpressionParserException;
/**
* This class is used to create exceptions of type FilterParserException.
* Because this class lies inside org.apache.olingo.odata2.core it is possible
* to define better/more detailed input parameters for inserting into the
* exception text.<br>
* The exception {@link ExpressionParserException} does not know the
* org.apache.olingo.odata2.core content
*
*
*/
public class FilterParserExceptionImpl extends ExpressionParserException {
private static final long serialVersionUID = 77L;
static public ExpressionParserException createERROR_IN_TOKENIZER(final TokenizerException exceptionTokenizer,
final String expression) {
Token token = exceptionTokenizer.getToken();
MessageReference msgRef = ExpressionParserException.ERROR_IN_TOKENIZER.create();
msgRef.addContent(token.getUriLiteral());
msgRef.addContent(Integer.toString(token.getPosition() + 1));
msgRef.addContent(expression);
return new ExpressionParserException(msgRef, exceptionTokenizer);
}
static public ExpressionParserException createINVALID_TRAILING_TOKEN_DETECTED_AFTER_PARSING(final Token token,
final String expression) {
MessageReference msgRef = ExpressionParserException.INVALID_TRAILING_TOKEN_DETECTED_AFTER_PARSING.create();
msgRef.addContent(token.getUriLiteral());
msgRef.addContent(Integer.toString(token.getPosition() + 1));
msgRef.addContent(expression);
return new ExpressionParserException(msgRef);
}
static public ExpressionParserException createEXPRESSION_EXPECTED_AFTER_POS(final Token token,
final String expression) {
MessageReference msgRef = ExpressionParserException.EXPRESSION_EXPECTED_AFTER_POS.create();
msgRef.addContent(Integer.toString(token.getPosition() + 1));
msgRef.addContent(expression);
return new ExpressionParserException(msgRef);
}
static public ExpressionParserException createEXPRESSION_EXPECTED_AFTER_POS(final int position,
final String expression) {
MessageReference msgRef = ExpressionParserException.EXPRESSION_EXPECTED_AFTER_POS.create();
msgRef.addContent(position);
msgRef.addContent(expression);
return new ExpressionParserException(msgRef);
}
static public ExpressionParserException createCOMMA_OR_END_EXPECTED_AT_POS(final Token token,
final String expression) {
MessageReference msgRef = ExpressionParserException.COMMA_OR_END_EXPECTED_AT_POS.create();
msgRef.addContent(Integer.toString(token.getPosition() + 1));
msgRef.addContent(expression);
return new ExpressionParserException(msgRef);
}
static public ExpressionParserException createEXPRESSION_EXPECTED_AT_POS(final Token token,
final String expression) {
MessageReference msgRef = ExpressionParserException.EXPRESSION_EXPECTED_AT_POS.create();
msgRef.addContent(Integer.toString(token.getPosition() + 1));
msgRef.addContent(expression);
return new ExpressionParserException(msgRef);
}
static public ExpressionParserException createCOMMA_OR_CLOSING_PARENTHESIS_EXPECTED_AFTER_POS(final Token token,
final String expression) {
MessageReference msgRef = ExpressionParserException.COMMA_OR_CLOSING_PARENTHESIS_EXPECTED_AFTER_POS.create();
msgRef.addContent(Integer.toString(token.getPosition() + token.getUriLiteral().length()));
msgRef.addContent(expression);
return new ExpressionParserException(msgRef);
}
public static ExpressionParserException createMETHOD_WRONG_ARG_COUNT(final MethodExpressionImpl methodExpression,
final Token token, final String expression) {
MessageReference msgRef = null;
int minParam = methodExpression.getMethodInfo().getMinParameter();
int maxParam = methodExpression.getMethodInfo().getMaxParameter();
if ((minParam == -1) && (maxParam == -1)) {
// no exception thrown in this case
} else if ((minParam != -1) && (maxParam == -1)) {
// Tested with TestParserExceptions.TestPMreadParameters CASE 7-1
msgRef = ExpressionParserException.METHOD_WRONG_ARG_X_OR_MORE.create();
msgRef.addContent(methodExpression.getMethod().toUriLiteral());
msgRef.addContent(token.getPosition() + 1);
msgRef.addContent(expression);
msgRef.addContent(minParam);
} else if ((minParam == -1) && (maxParam != -1)) {
// Tested with TestParserExceptions.TestPMreadParameters CASE 8-2
msgRef = ExpressionParserException.METHOD_WRONG_ARG_X_OR_LESS.create();
msgRef.addContent(methodExpression.getMethod().toUriLiteral());
msgRef.addContent(token.getPosition() + 1);
msgRef.addContent(expression);
msgRef.addContent(maxParam);
} else if ((minParam != -1) && (maxParam != -1)) {
if (minParam == maxParam) {
// Tested with TestParserExceptions.TestPMreadParameters CASE
// 11-1
msgRef = ExpressionParserException.METHOD_WRONG_ARG_EXACT.create();
msgRef.addContent(methodExpression.getMethod().toUriLiteral());
msgRef.addContent(token.getPosition() + 1);
msgRef.addContent(expression);
msgRef.addContent(minParam);
} else {
// Tested with TestParserExceptions.TestPMreadParameters CASE
// 10-1
msgRef = ExpressionParserException.METHOD_WRONG_ARG_BETWEEN.create();
msgRef.addContent(methodExpression.getMethod().toUriLiteral());
msgRef.addContent(token.getPosition() + 1);
msgRef.addContent(expression);
msgRef.addContent(minParam);
msgRef.addContent(maxParam);
}
}
return new ExpressionParserException(msgRef);
}
public static ExpressionParserException createMETHOD_WRONG_INPUT_TYPE(final MethodExpressionImpl methodExpression,
final Token token, final String expression) {
MessageReference msgRef = null;
// Tested with TestParserExceptions.TestPMreadParameters CASE 7-1
msgRef = ExpressionParserException.METHOD_WRONG_INPUT_TYPE.create();
msgRef.addContent(methodExpression.getMethod().toUriLiteral());
msgRef.addContent(token.getPosition() + 1);
msgRef.addContent(expression);
return new ExpressionParserException(msgRef);
}
public static ExpressionParserException createLEFT_SIDE_NOT_A_PROPERTY(final Token token, final String expression)
throws ExpressionParserInternalError {
MessageReference msgRef = ExpressionParserException.LEFT_SIDE_NOT_A_PROPERTY.create();
msgRef.addContent(token.getPosition() + 1);
msgRef.addContent(expression);
return new ExpressionParserException(msgRef);
}
public static ExpressionParserException createMISSING_CLOSING_PARENTHESIS(final int position,
final String expression, final TokenizerExpectError e) {
MessageReference msgRef = ExpressionParserException.MISSING_CLOSING_PARENTHESIS.create();
msgRef.addContent(position + 1);
msgRef.addContent(expression);
return new ExpressionParserException(msgRef, e);
}
public static ExpressionParserException createINVALID_SORT_ORDER(final Token token, final String expression) {
MessageReference msgRef = ExpressionParserException.INVALID_SORT_ORDER.create();
msgRef.addContent(token.getPosition() + 1);
msgRef.addContent(expression);
return new ExpressionParserException(msgRef);
}
public static ExpressionParserException createINVALID_METHOD_CALL(final CommonExpression leftNode,
final Token prevToken, final String expression) {
final MessageReference msgRef = ExpressionParserException.INVALID_METHOD_CALL.create();
msgRef.addContent(leftNode.getUriLiteral());
msgRef.addContent(prevToken.getPosition() + 1);
msgRef.addContent(expression);
return new ExpressionParserException(msgRef);
}
public static TokenizerException createTOKEN_UNDETERMINATED_STRING(int oldPosition, String expression) {
final MessageReference msgRef = ExpressionParserException.TOKEN_UNDETERMINATED_STRING.create();
msgRef.addContent(oldPosition);
msgRef.addContent(expression);
return new TokenizerException(msgRef);
}
}
| java |
The executive committee of German Chancellor Angela Merkel’s Christian Democrats (CDU) has decided to postpone the party congress planned for Dec. 4 to elect a new leader, sources within the CDU told Reuters on Monday.
The executive committee voted unanimously in favour of a proposal by party leader Annegret Kramp-Karrenbauer to decide on Jan. 16 whether it will be possible to hold the meeting with 1,001 delegates in the middle of the coronavirus pandemic.
If the pandemic situation is still unclear, the party will have to consider holding a virtual congress and allowing delegates to vote by mail, the sources said, although this would pose logistical challenges.
Merkel, in power since 2005, has said she will not seek re-election in federal elections due by October 2021. Kramp-Karrenbauer said in February she no longer wanted to succeed Merkel and would stand down as CDU leader.
So far, Armin Laschet, premier of the western state of North Rhine-Westphalia, erstwhile Merkel rival Friedrich Merz, and foreign policy expert Norbert Roettgen are running to be chairman.
Laschet, who is positioning himself as the continuity candidate to succeed Merkel, had pushed for a postponement of the party congress, saying the CDU could not justify holding a conference at a time of rising coronavirus infections.
Merz, in contrast, has spoken out against a delay. | english |
<reponame>suchipi/reverse-proxy-cli
{
"name": "reverse-proxy-cli",
"version": "0.1.1",
"description": "A simple CLI for running a reverse proxy",
"main": "index.js",
"bin": "index.js",
"scripts": {},
"keywords": [
"reverse",
"proxy",
"http",
"nginx",
"cli"
],
"author": "<NAME> <<EMAIL>>",
"license": "MIT",
"dependencies": {
"arg": "^5.0.1",
"http-proxy": "^1.18.1"
},
"repository": "https://github.com/suchipi/reverse-proxy-cli"
}
| json |
Residents of the city are facing the heat not only of the changing season, but of marked rise in prices of fuel, electricity and food items.
GUWAHATI: Residents of the city are facing the heat not only of the changing season, but of marked rise in prices of fuel, electricity and food items. With the onset of the month of Ramadan, those who are observing the fast are finding it difficult to purchase their daily requirement of protein and vitamins.
The prices of fruits in the city as of today varied from market to market, but all on the high side. Vendors charge between Rs 180 and Rs 240 for a kg of apple and Rs 160 and Rs 200 per kg of grapes. Watermelon costs about Rs 70 to Rs 80 per kg. On the other hand, a kg of dressed broiler chicken costs between Rs 280 and Rs 310. Local chicken costs Rs 500 to Rs 520 per kg. However, the price of mutton remains the same. The prices of various vegetables have also increased commensurately.
Also Watch: Will Smith Stormed up the Stage and struck Chris Rock across the face for joking about his wife. | english |
@import url('https://fonts.googleapis.com/css?family=Roboto');
@import url('https://fonts.googleapis.com/css?family=Roboto:100');
.reveal {
font-family: 'Roboto', sans-serif;
font-size: 30px;
font-weight: normal;
color: #657b83; }
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #586e75;
font-family: 'Roboto Light', sans-serif;
font-weight: 100;
line-height: 1.2;
letter-spacing: normal;
text-transform: none;
text-shadow: none;
word-wrap: break-word; }
.reveal h1 {
font-size: 3.77em; }
.reveal h2 {
font-size: 2.11em; }
.reveal h3 {
font-size: 1.55em; }
.reveal h4 {
font-size: 1em; }
.reveal h1 {
text-shadow: none; }
ul li{list-style-type:none;}
ul li:before{content:'\00b7'; font-size:50px; line-height:24px; vertical-align:middle;}
.reveal section img {
margin: 15px 0px;
border: 0;
box-shadow: none;
background: none; }
.image {
position: relative;
width: 100%; /* for IE 6 */
}
.image-text {
position: absolute;
top: 50px;
left: 0;
width: 100%;
}
.image-span {
color: white;
letter-spacing: -1px;
background: rgb(0, 0, 0); /* fallback color */
background: rgba(0, 0, 0, 0.7);
padding: 10px;
}
.multiCol {
display: table;
table-layout: fixed;
width: 100%;
text-align: left; }
.multiCol .col {
display: table-cell;
vertical-align: top;
width: 50%;
padding: 0 0 0 3%; }
.multiCol .col:first-of-type {
padding-left: 0; }
.box {
height: 500px;
width: 400px;
text-align: center;
padding: 0 20px;
margin: 20px;
display: flex;
justify-content: center;
/* align horizontal */
align-items: center;
/* align vertical */ } | css |
<gh_stars>1-10
/**
* 扫描博客目录,获得博客
*/
const path = require('path');
const fs = require('fs-extra');
const frontMatter = require('front-matter');
const renderMarkdown = require('../renderMarkdown');
const { resolve } = require('../util/util');
const config = require('../../sinblog.config');
/**
*
* @param {string} blogDir 博客目录,相对路径
*/
function scanBlog(blogDir) {
const blogInfoList = []; // 用于储存最终数据
const blogDirAbs = resolve(blogDir);
const blogList = fs.readdirSync(blogDirAbs, {
withFileTypes: true
});
for (let i = 0; i < blogList.length; i++) {
if (blogList[i].isFile() && /\.(md|MD)$/.test(blogList[i].name)) {
// 确认是 Markdown 文件
const blogPath = path.resolve(blogDirAbs, blogList[i].name);
const {baseInfo} = renderMarkdown(blogPath);
blogInfoList.push(baseInfo);
}
}
return blogInfoList;
}
function main() {
if (config.blogPages && config.blogPages.length) {
config.blogPages.forEach(item => {
scanBlog(item.path, item.urlPath);
});
} else if (config.blogDir) {
scanBlog(config.blogDir, 'blog');
}
}
// main();
module.exports = scan;
| javascript |
Some living things that were presumed lost or extinct have re-emerged this year due to climate change or for reasons that are still unknown.
Take the Madagascan chameleon for example. The reptile had 'gone missing' for over a century but was recently re-discovered by scientists.
The species was thought to be lost forever. But recently, an expedition team in a northwest African island found the chameleon in the wild.
The team of experts from Madagascar and Germany revealed that they had re-discovered the Voeltzkow’s chameleon on October 30.
Soon after the discovery, Global Wildlife Conservation shared a video of the chameleon on Twitter with the caption: "The team of experts from Madagascar and Germany revealed that they had re-discovered the Voeltzkow’s chameleon on October 30. "
See it here:
A team of experts confirmed that the genetic analysis of the chameleon showed it was closely related to the Labord's chameleon. Both the species survive for a few months only. The hatch and grow quickly during the rainy season, according to experts.
Experts confirmed that this was the first time that the female of the Voeltzkow’s chameleon species was documented.
Last week, a species of spider, presumed to be extinct, was spotted in the UK for the first time in 25 years.
The Great Fox spider is one of the biggest spiders in the UK. While its official status was 'critically endangered', many experts believed it had gone extinct. But it's recent sighting has put all speculations to rest.
According to reports, the spider was tracked down at a Ministry of Defence training area in Surrey for the first time since 1993. Mike Waite from the Surrey Wildlife Trust said in a statement that the spider is big compared to other species but it had been remarkably elusive for 25 years due to its perfect camouflage. | english |
#%%
from datetime import datetime
import numpy as np
import pandas as pd
from tqdm import tqdm
# %%
picks = pd.read_csv('gamma_picks.csv', sep="\t")
events = pd.read_csv('gamma_catalog.csv', sep="\t")
# %%
events["match_id"] = events.apply(lambda x: f'{x["event_idx"]}_{x["file_index"]}', axis=1)
picks["match_id"] = picks.apply(lambda x: f'{x["event_idx"]}_{x["file_index"]}', axis=1)
# %%
out_file = open("hypoInput.arc", "w")
picks_by_event = picks.groupby("match_id").groups
for i in tqdm(range(len(events))):
event = events.iloc[i]
event_time = datetime.strptime(event["time"], "%Y-%m-%dT%H:%M:%S.%f").strftime("%Y%m%d%H%M%S%f")[:-4]
lat_degree = int(event["latitude"])
lat_minute = (event["latitude"] - lat_degree) * 60 * 100
south = "S" if lat_degree <= 0 else " "
lng_degree = int(event["longitude"])
lng_minute = (event["longitude"] - lng_degree) * 60 * 100
east = "E" if lng_degree >= 0 else " "
depth = event["depth(m)"] / 1e3 * 100
event_line = f"{event_time}{abs(lat_degree):2d}{south}{abs(lat_minute):4.0f}{abs(lng_degree):3d}{east}{abs(lng_minute):4.0f}{depth:5.0f}"
out_file.write(event_line + "\n")
picks_idx = picks_by_event[event["match_id"]]
for j in picks_idx:
pick = picks.iloc[j]
network_code, station_code, comp_code, channel_code = pick['id'].split('.')
phase_type = pick['type']
phase_weight = min(max(int((1 - pick['prob']) / (1 - 0.3) * 4) - 1, 0), 3)
pick_time = datetime.strptime(pick["timestamp"], "%Y-%m-%dT%H:%M:%S.%f")
phase_time_minute = pick_time.strftime("%Y%m%d%H%M")
phase_time_second = pick_time.strftime("%S%f")[:-4]
tmp_line = f"{station_code:<5}{network_code:<2} {comp_code:<1}{channel_code:<3}"
if phase_type.upper() == 'P':
pick_line = f"{tmp_line:<13} P {phase_weight:<1d}{phase_time_minute} {phase_time_second}"
elif phase_type.upper() == 'S':
pick_line = f"{tmp_line:<13} 4{phase_time_minute} {'':<12}{phase_time_second} S {phase_weight:<1d}"
else:
raise (f"Phase type error {phase_type}")
out_file.write(pick_line + "\n")
out_file.write("\n")
if i > 1e3:
break
out_file.close()
| python |
{
"directions": [
"Fill an outdoor deep-fryer with the peanut oil (see tip below), and heat to 325 degrees F (160 degrees C). This will take about 30 minutes.",
"Rub the turkey with minced garlic, salt and pepper on the inside and outside. Fill the cavity with rosemary, garlic cloves and ginger. Refrigerate for 30 minutes to marinate.",
"Remove the herbs and garlic from the cavity of the bird, and discard. Make sure the opening at the neck of the turkey is at least 2 inches wide. Trim skin back if necessary. This will prevent pressure from building inside. If the turkey has a pop-up doneness indicator, it must be removed beforehand.",
"Place the turkey in the fryer basket, or hanging device, and slowly lower it into the hot oil. Be sure to maintain the temperature of the oil while it is frying. Cook for 3 1/2 minutes per pound, or until the internal temperature is at 180 degrees F (82 degrees C) when taken in the thickest part of the thigh.",
"Carefully remove the turkey from the hot oil, and turn off the deep-fryer. Let the bird cool for 5 minutes, then pat dry."
],
"ingredients": [
"1 (12 pound) whole turkey, neck and giblets removed",
"1/2 cup minced garlic",
"salt and ground black pepper to taste",
"3 gallons peanut oil for frying",
"3 sprigs fresh rosemary",
"12 cloves garlic, peeled",
"1/2 cup chopped fresh ginger root"
],
"language": "en-US",
"source": "allrecipes.com",
"tags": [],
"title": "Erick's Deep Fried Rosemary Turkey",
"url": "http://allrecipes.com/recipe/49123/ericks-deep-fried-rosemary-turkey/"
}
| json |
“With our technology strategy launched in 2019, we want to strengthen engineering and IT architectural excellence in Deutsche Bank, and we need to have these capabilities in-house,” Bernd Leukert, its chief technology, data and innovation officer, told ET on a recent visit to India.
India is currently home to a third of its total tech workforce.
The decision to in-source tech development and increase tech hiring came at a time when the rest of the bank was undergoing job cuts and rationalisation.
India, said Leukert, was the obvious place to increase its presence given the quality of technology and engineering skills available here. “We decided to grow into technology centres, and India is now our biggest one. It isn't necessarily about gaining cost benefits, but rather the technology talent that we see in India,” he said.
The India technology centre now provides services across a whole spectrum of business areas, and is leading development in areas like cloud, machine learning, artificial intelligence and remote work.
This change in focus has been driven by a larger shift in the market, with the bank’s customers adopting technology at a faster pace. “As our customers are changing their business models, we need to change as well to support them in their transformation ... and technology is the enabler for that,” he said.
“The change starts with how we as a bank engage with customers,” said Leukert. “We have redefined it and want to leverage modern technology to incorporate our financial services into the digitalised business models of our customers,” he said.
In 2020, Deutsche Bank announced a partnership with Google to co-innovate on new products and services and adopt a new cloud-adoption strategy.
The long-term focus, said Leukert, would be to strengthen the internal technology talent. Over time, it intends to have 70% of its technology workforce comprise internal employees, and 30% from vendors and partners. At present, this is split about equally.
| english |
Yves Rossy isn’t your average adrenaline junkie. This part time pilot and full time madman likes to strap on a carbon fiber jet-wing over is back and zoom across the skies of his native Switzerland.
This time, however he has taken it to the next level. He and his fellow bird-man Vince Reffert were recently seen chasing an Airbus A380 superjumbo over the skyscrapers of Dubai. The A380 is the largest aeroplane ever built and has a wingspan of 262 feet. The two daredevil look like a pair of gnats flying alongside a raptor.
To see this behemoth maneuver effortlessly at such a low altitude (well, 1,200 m is low when you weigh over 500 tons) is a treat in itself. The formation required ‘painstaking planning and meticulous collaboration with an intense focus on safety,’ Rossy’s website said. The flying men were dropped from a helicopter at 1,600 m as it flew over the Emirates aircraft. The daredevils then proceed to fly at about 300 kmph over the plane and manoeuvre alongside its wings. The jet-winged team then fall into formation on either side of the plane, regroup on one side and then break away.
"It was absolutely surreal flying alongside the biggest aircraft there is and we felt like mosquitoes beside a gigantic eagle”, Rossy said.
Bonus Clip: Watch Rossy on his jetpack race Top Gear host Richard Hammond on a souped up rally car in Wales. | english |
/**
* Wechaty Open Source Software - https://github.com/wechaty
*
* @copyright 2022 <NAME> (李卓桓) <https://github.com/huan>, and
* Wechaty Contributors <https://github.com/wechaty>.
*
* 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.
*
*/
/* eslint-disable sort-keys */
import type * as PUPPET from 'wechaty-puppet'
import * as Mailbox from 'mailbox'
import * as duck from '../../../duck/mod.js'
export interface Context {
/**
* Required
*/
actors: {
wechaty : string
notice : string
}
/**
* To-be-filled
*/
attendees : { [contactId: string]: PUPPET.payloads.Contact }
chairs : { [contactId: string]: PUPPET.payloads.Contact }
talks : { [contactId: string]: string }
message? : PUPPET.payloads.Message
}
const duckula = Mailbox.duckularize({
id: 'Calling',
events: [ duck.Event, [
/**
* Request
*/
'REPORT',
'MESSAGE',
/**
* Response
*/
'CHAIRS',
'ATTENDEES',
'TALKS',
'GERROR',
/**
* Config
*/
'RESET',
/**
* Internal
*/
'BATCH',
'HELP',
'ROOM',
'NO_ROOM',
'MENTIONS',
'NO_MENTION',
'NEXT',
'VALIDATE',
'NOTICE',
'INTENTS',
'FINISH',
] ],
states: [ duck.State, [
'Idle',
'Busy',
'Responding',
'Erroring',
'RegisteringRoom',
'RegisteredRoom',
'RegisteringChairs',
'RegisteredChairs',
'RegisteringAttendees',
'RegisteredAttendees',
'RegisteringTalks',
'RegisteredTalks',
'Confirming',
'Initializing',
'Initialized',
'Loading',
'Mentioning',
'Reporting',
'Resetting',
'Resetted',
'Summarizing',
] ],
initialContext: {
attendees : {},
chairs : {},
talks : {},
message : undefined,
},
})
export type Event = ReturnType<typeof duckula.Event[keyof typeof duckula.Event]>
export type Events = {
[key in keyof typeof duckula.Event]: ReturnType<typeof duckula.Event[key]>
}
export default duckula
| typescript |
Mumbai Indians got their campaign back on track with a convincing eight-wicket win over table-toppers Chennai Super Kings (CSK) in a one-sided encounter in Pune yesterday.
Chasing 170 to win, Mumbai were in control all along after the openers put up 69 runs for the first wicket.
Though West Indian Evin Lewis failed to get going, Suryakumar Yadav continued his phenomenal form as he scored 44 off just 34 balls with five boundaries and one six.
Rohit Sharma, who has been criticised for batting too low down the order, came in to bat at No. 3 and took the game by the scruff of the neck. He was supported by Lewis, as the two put a 59 run stand for the second wicket to take the game away from Chennai.
When Bravo finally dismissed Lewis, it was already too late. Rohit and Pandya then got together, helping Mumbai cruise home to a comfortable victory. Rohit did step on the gas later, scoring 56 off just 33 balls. Chennai weren’t helped by an injury to in-form Deepak Chahar who had to limp off the field with what looked like a hamstring injury.
Earlier, it was Suresh Raina who starred with the bat for Chennai, scoring an unbeaten 75 off just 47 balls.
He came into bat after Watson’ early dismissal with Krunal Pandya getting the Aussie for 12. Raina and in-form Rayudu combined to put 71 runs for the second wicket with both players playing some fascinating shots.
Then, Krunal struck again, dismissing Rayudu for 46, who was unlucky to miss out on a half-century. Rayudu’s innings included 4 sixes and 2 boundaries.
Raina then lacked any sort of support from the other end, with Dhoni departing for 26 off 21 balls. The big overs eluded Chennai and some magnificent death bowling, especially from Mitchell McCleneghan, who removed Dhoni and Bravo in the same over helped Mumbai restrict Chennai to 169/5.
Krunal Pandya too bowled well and ended up with figures of two for 32. | english |
<filename>query/src/storages/stage/stage_table.rs
// Copyright 2021 <NAME>.
//
// 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.
use std::any::Any;
use std::collections::VecDeque;
use std::str::FromStr;
use std::sync::Arc;
use common_base::infallible::Mutex;
use common_datablocks::DataBlock;
use common_exception::ErrorCode;
use common_exception::Result;
use common_meta_app::schema::TableInfo;
use common_planners::Extras;
use common_planners::Partitions;
use common_planners::ReadDataSourcePlan;
use common_planners::StageTableInfo;
use common_planners::Statistics;
use common_planners::TruncateTablePlan;
use common_streams::SendableDataBlockStream;
use super::StageSource;
use crate::formats::output_format::OutputFormatType;
use crate::pipelines::new::processors::port::OutputPort;
use crate::pipelines::new::NewPipeline;
use crate::pipelines::new::SourcePipeBuilder;
use crate::sessions::QueryContext;
use crate::storages::Table;
pub struct StageTable {
table_info: StageTableInfo,
// This is no used but a placeholder.
// But the Table trait need it:
// fn get_table_info(&self) -> &TableInfo).
table_info_placeholder: TableInfo,
}
impl StageTable {
pub fn try_create(table_info: StageTableInfo) -> Result<Arc<dyn Table>> {
let table_info_placeholder = TableInfo::default();
Ok(Arc::new(Self {
table_info,
table_info_placeholder,
}))
}
}
#[async_trait::async_trait]
impl Table for StageTable {
fn as_any(&self) -> &dyn Any {
self
}
// External stage has no table info yet.
fn get_table_info(&self) -> &TableInfo {
&self.table_info_placeholder
}
async fn read_partitions(
&self,
_ctx: Arc<QueryContext>,
_push_downs: Option<Extras>,
) -> Result<(Statistics, Partitions)> {
Ok((Statistics::default(), vec![]))
}
// External stage only supported new pipeline.
// TODO(bohu): Remove after new pipeline ready.
async fn read(
&self,
_ctx: Arc<QueryContext>,
_plan: &ReadDataSourcePlan,
) -> Result<SendableDataBlockStream> {
Err(ErrorCode::UnImplement(
"S3 external table not support read()!",
))
}
fn read2(
&self,
ctx: Arc<QueryContext>,
_plan: &ReadDataSourcePlan,
pipeline: &mut NewPipeline,
) -> Result<()> {
let settings = ctx.get_settings();
let mut builder = SourcePipeBuilder::create();
let table_info = &self.table_info;
let schema = table_info.schema.clone();
let mut files_deque = VecDeque::with_capacity(table_info.files.len());
for f in &table_info.files {
files_deque.push_back(f.to_string());
}
let files = Arc::new(Mutex::new(files_deque));
for _index in 0..settings.get_max_threads()? {
let output = OutputPort::create();
builder.add_source(
output.clone(),
StageSource::try_create(
ctx.clone(),
output,
schema.clone(),
table_info.clone(),
files.clone(),
)?,
);
}
pipeline.add_pipe(builder.finalize());
Ok(())
}
// Write data to stage file.
// TODO: support append2
async fn append_data(
&self,
_ctx: Arc<QueryContext>,
stream: SendableDataBlockStream,
) -> Result<SendableDataBlockStream> {
Ok(Box::pin(stream))
}
async fn commit_insertion(
&self,
ctx: Arc<QueryContext>,
_catalog_name: &str,
operations: Vec<DataBlock>,
_overwrite: bool,
) -> Result<()> {
let format_name = format!(
"{:?}",
self.table_info.stage_info.file_format_options.format
);
let path = format!(
"{}/{}.{}",
self.table_info.path,
uuid::Uuid::new_v4(),
format_name.to_ascii_lowercase()
);
let op = StageSource::get_op(&ctx, &self.table_info.stage_info).await?;
let fmt = OutputFormatType::from_str(format_name.as_str())?;
let mut format_settings = ctx.get_format_settings()?;
let format_options = &self.table_info.stage_info.file_format_options;
{
format_settings.skip_header = format_options.skip_header > 0;
if !format_options.field_delimiter.is_empty() {
format_settings.field_delimiter =
format_options.field_delimiter.as_bytes().to_vec();
}
if !format_options.record_delimiter.is_empty() {
format_settings.record_delimiter =
format_options.record_delimiter.as_bytes().to_vec();
}
}
let mut output_format = fmt.create_format(self.table_info.schema(), format_settings);
let prefix = output_format.serialize_prefix()?;
let written_bytes: usize = operations.iter().map(|b| b.memory_size()).sum();
let mut bytes = Vec::with_capacity(written_bytes + prefix.len());
bytes.extend_from_slice(&prefix);
for block in operations {
let bs = output_format.serialize_block(&block)?;
bytes.extend_from_slice(bs.as_slice());
}
let bs = output_format.finalize()?;
bytes.extend_from_slice(bs.as_slice());
ctx.get_dal_context()
.get_metrics()
.inc_write_bytes(bytes.len());
let object = op.object(&path);
object.write(bytes.as_slice()).await?;
Ok(())
}
// Truncate the stage file.
async fn truncate(
&self,
_ctx: Arc<QueryContext>,
_truncate_plan: TruncateTablePlan,
) -> Result<()> {
Err(ErrorCode::UnImplement(
"S3 external table truncate() unimplemented yet!",
))
}
}
| rust |
import { onBeforeUpdate } from 'vue';
/**
* Locker return cached mark.
* If set to `true`, will return `true` in a short time even if set `false`.
* If set to `false` and then set to `true`, will change to `true`.
* And after time duration, it will back to `null` automatically.
*/
export default function useLock(duration = 250): [() => boolean | null, (lock: boolean) => void] {
let lock: boolean | null = null;
let timeout: number;
onBeforeUpdate(() => {
window.clearTimeout(timeout);
});
function doLock(locked: boolean) {
if (locked || lock === null) {
lock = locked;
}
window.clearTimeout(timeout);
timeout = window.setTimeout(() => {
lock = null;
}, duration);
}
return [() => lock, doLock];
}
| typescript |
The two newly discovered minerals have been named elaliite and elkinstantonite.
A team of researchers has discovered at least two new minerals that have never before been seen on Earth in a 15 tonne meteorite found in Somalia — the ninth largest meteorite ever found.
The two minerals found came from a single 70 gram slice that was sent to the U of A for classification, and there already appears to be a potential third mineral under consideration. If researchers were to obtain more samples from the massive meteorite, there’s a chance that even more might be found, Herd notes.
The two newly discovered minerals have been named elaliite and elkinstantonite . The first receives its name from the meteorite itself, dubbed the “El Ali” meteorite because it was found in near the town of El Ali, in the Hiiraan region of Somalia. Herd named the second mineral after Lindy Elkins-Tanton, vice president of the ASU Interplanetary Initiative, professor at Arizona State University’s School of Earth and Space Exploration and principal investigator of NASA’s upcoming Psyche mission.
“Lindy has done a lot of work on how the cores of planets form, how these iron nickel cores form, and the closest analogue we have are iron meteorites. So it made sense to name a mineral after her and recognize her contributions to science,” Herd explains.
In collaboration with researchers at UCLA and the California Institute of Technology, Herd classified the El Ali meteorite as an “Iron, IAB complex” meteorite, one of over 350 in that particular category.
As Herd was analyzing the meteorite to classify it, he saw something that caught his attention. He brought in the expertise of Andrew Locock, head of the U of A’s Electron Microprobe Laboratory, who has been involved in other new mineral descriptions including Heamanite-(Ce).
Locock’s rapid identification was possible because the two minerals had been synthetically created before, so he was able to match the composition of the newly discovered natural minerals with their human-made counterparts.
Researchers are continuing to examine the minerals to determine what they can tell us about the conditions in the meteorite when it formed.
Herd also notes that any new mineral discoveries could possibly yield exciting new uses down the line.
While the future of the meteorite remains uncertain, Herd says the researchers have received news that it appears to have been moved to China in search of a potential buyer. It remains to be seen whether additional samples will be available for scientific purposes.
Unique experience for customers! This bank launches its virtual branch in Metaverse - Do you have account in it? | english |
The Department for the Empowerment of Differently Abled and Senior Citizens has invited applications from visually impaired students for distribution of Braille Kits for the year 2020-21. Visually impaired students studying SSLC and above, who have secured minimum of 40 percent marks, are eligible to apply. Prescribed application forms can be collected from the Department office in Tilaknagar and filled-in forms, along with all necessary documents, should be submitted back before Jan. 30. [Ph: 0821-2490333]. | english |
1“Son of man, prophesy to the mountains of Israel and say, ‘Mountains of Israel, hear the word of the Lord. 2This is what the Sovereign Lord says: The enemy said of you, “Aha! The ancient heights have become our possession.” ’ 3Therefore prophesy and say, ‘This is what the Sovereign Lord says: Because they ravaged and crushed you from every side so that you became the possession of the rest of the nations and the object of people’s malicious talk and slander, 4therefore, mountains of Israel, hear the word of the Sovereign Lord: This is what the Sovereign Lord says to the mountains and hills, to the ravines and valleys, to the desolate ruins and the deserted towns that have been plundered and ridiculed by the rest of the nations around you— 5this is what the Sovereign Lord says: In my burning zeal I have spoken against the rest of the nations, and against all Edom, for with glee and with malice in their hearts they made my land their own possession so that they might plunder its pastureland.’ 6Therefore prophesy concerning the land of Israel and say to the mountains and hills, to the ravines and valleys: ‘This is what the Sovereign Lord says: I speak in my jealous wrath because you have suffered the scorn of the nations. 7Therefore this is what the Sovereign Lord says: I swear with uplifted hand that the nations around you will also suffer scorn.
8“ ‘But you, mountains of Israel, will produce branches and fruit for my people Israel, for they will soon come home. 9I am concerned for you and will look on you with favor; you will be plowed and sown, 10and I will cause many people to live on you—yes, all of Israel. The towns will be inhabited and the ruins rebuilt. 11I will increase the number of people and animals living on you, and they will be fruitful and become numerous. I will settle people on you as in the past and will make you prosper more than before. Then you will know that I am the Lord. 12I will cause people, my people Israel, to live on you. They will possess you, and you will be their inheritance; you will never again deprive them of their children.
16Again the word of the Lord came to me: 17“Son of man, when the people of Israel were living in their own land, they defiled it by their conduct and their actions. Their conduct was like a woman’s monthly uncleanness in my sight. 18So I poured out my wrath on them because they had shed blood in the land and because they had defiled it with their idols. 19I dispersed them among the nations, and they were scattered through the countries; I judged them according to their conduct and their actions. 20And wherever they went among the nations they profaned my holy name, for it was said of them, ‘These are the Lord’s people, and yet they had to leave his land.’ 21I had concern for my holy name, which the people of Israel profaned among the nations where they had gone.
22“Therefore say to the Israelites, ‘This is what the Sovereign Lord says: It is not for your sake, people of Israel, that I am going to do these things, but for the sake of my holy name, which you have profaned among the nations where you have gone. 23I will show the holiness of my great name, which has been profaned among the nations, the name you have profaned among them. Then the nations will know that I am the Lord, declares the Sovereign Lord, when I am proved holy through you before their eyes.
24“ ‘For I will take you out of the nations; I will gather you from all the countries and bring you back into your own land. 25I will sprinkle clean water on you, and you will be clean; I will cleanse you from all your impurities and from all your idols. 26I will give you a new heart and put a new spirit in you; I will remove from you your heart of stone and give you a heart of flesh. 27And I will put my Spirit in you and move you to follow my decrees and be careful to keep my laws. 28Then you will live in the land I gave your ancestors; you will be my people, and I will be your God. 29I will save you from all your uncleanness. I will call for the grain and make it plentiful and will not bring famine upon you. 30I will increase the fruit of the trees and the crops of the field, so that you will no longer suffer disgrace among the nations because of famine. 31Then you will remember your evil ways and wicked deeds, and you will loathe yourselves for your sins and detestable practices. 32I want you to know that I am not doing this for your sake, declares the Sovereign Lord. Be ashamed and disgraced for your conduct, people of Israel!
| english |
{
"id": "golden_koi",
"name": "<NAME>",
"description": "A large fish said to be the descendant of dragons.<br/>With the horn on its head and its scaleless form clad as if in golden armor, it looks every bit like a king underwater. In truth, its bloodline and behavior could not be more different from that of a dragon — it can neither call forth the wind and rain nor the power of domination and is actually often the victim of food-snatching due to its weak character. A real shame, of course, that it looks so very majestic. As such, it lost the nickname \"Descendant of Dragons,\" and is now termed the \"False Dragon\" instead.",
"rarity": 3,
"source": ["Obtained from fishing"],
"bait": {
"id": "fake_fly_bait",
"name": "Fake Fly Bait",
"rarity": 2
}
}
| json |
An alarming trend of some mysterious drug being administered to minor girls trafficked into the Capital from West Bengal, primarily to be forced into prostitution, has raised serious concerns over the mental and physical health of the victims of human trafficking.
The latest case is that of 17-year-old Wahida (name changed) from South 24 Parganas, who was smuggled into the city by an acquaintance of her lover’s brother and sold to a brothel on G. B. Road in Central Delhi about a week ago. “Having completed my Class X, I had gone to get myself enrolled with a nurse training school where Siraj, an acquaintance of my lover Nasir’s brother, met me. He took me to an eating joint where we had some food, after which I lost my senses. My body was functioning properly, but I could not utter a single word. What happened thereafter I cannot recall. It seems he made me consume food laced with some drugs,” said Wahida, daughter of a rickshaw puller.
Jitendra Nagpal, Head of the Department of the Institute of Mental Health and Lifeskills at Moolchand Hospital, said: “It could be some psychotropic that alters the functioning of the mind, declines overall function and impacts short-term memory altering the perception and emotion. These could also be illegally procured mind modifying agents like opioids or cannabinoids, making the person unable to control his/her behaviour. It at times makes the person vulnerable to suggestions by the perpetrator of the crime. ” Dr. Nagpal said those under the influence of such a drug may lose their senses and are unable to later recall what exactly transpired with them. The next thing Wahida remembers is that she was at the New Delhi railway station. “When I confronted Siraj asking why he brought me to Delhi, he initially claimed that he wanted to marry me. I objected and urged him to take me back home, but he forcibly took me to a house where he beat me when I offered resistance. He then sold me off to a brothel where I was raped and mentally tortured,” she said.
Soon after the victim was brought to the brothel, non-government organisation Shakti Vahini got a tip-off that a minor girl had been forced into prostitution. “We immediately contacted the Kamla Market police, which raided the brothel and rescued the victim. Subsequently we alerted the West Bengal Police, which had received a complaint from the girl’s father a day ago. The girl was produced before a Child Welfare Committee. A case has now been registered and a police team headed by Sub-Inspector Bishwadev Roy, comprising two women police constables, is here along with the girl’s father to take her back to her native place,” said Rishi Kant of Shakti Vahini.
Mr. Kant said a similar modus operandi was employed by human traffickers in a recent case wherein a 16-year-old girl was brought to the Capital from Sonarpur in South 24 Parganas and pushed into the flesh trade. The girl, who was rescued later and is presently here for cross-examination before a city court, said she was also drugged before being trafficked.
Stating that presently there was lack of data on the subject of substance abuse among children and its repercussions, Mr. Gupta said a nationwide study was being undertaken by a committee in 142 districts across 27 States in coordination with the All India Institute of Medical Sciences under the supervision of the National Commission for Protection of Child Rights. | english |
<filename>src/test/compile-fail/borrowck-pat-enum.rs
fn match_ref(&&v: option<int>) -> int {
match v {
some(ref i) => {
*i
}
none => {0}
}
}
fn match_ref_unused(&&v: option<int>) {
match v {
some(_) => {}
none => {}
}
}
fn match_const_reg(v: &const option<int>) -> int {
match *v {
some(ref i) => {*i} // OK because this is pure
none => {0}
}
}
fn impure(_i: int) {
}
fn match_const_reg_unused(v: &const option<int>) {
match *v {
some(_) => {impure(0)} // OK because nothing is captured
none => {}
}
}
fn match_const_reg_impure(v: &const option<int>) {
match *v {
some(ref i) => {impure(*i)} //~ ERROR illegal borrow unless pure
//~^ NOTE impure due to access to impure function
none => {}
}
}
fn match_imm_reg(v: &option<int>) {
match *v {
some(ref i) => {impure(*i)} // OK because immutable
none => {}
}
}
fn main() {
}
| rust |
/** @internal */
export declare function lorem(wordCount: number): string;
| typescript |
package xuul.flint.common.block;
import net.minecraft.world.level.block.state.properties.IntegerProperty;
public class XFurnaceBlock {
public static final IntegerProperty HEAT = IntegerProperty.create("heat", 0, 10);
}
| java |
played a captain’s knock to guide struggling Gujarat Lions to a comprehensive four-wicket win over two-time champions Kolkata Knight Riders in an Indian Premier League match, here on Friday. Chasing a challenging 188-run target set by KKR, Raina led from the front with a blistering 46-ball 84-run knock to set the platform for the much-needed win for Gujarat Lions.
Coming on to bat at the no. 3 position, Raina took the attack to the opposition bowlers and decorated his innings with nine boundaries and four sixes to steer Gujarat Lions chase.
He was ably supported by Brendon McCullum (33) and Aaron Finch (31) who stitched 42 runs off just 21 balls for the opening stand to get Gujarat Lions’ chase off to a flier.
Down the order, Ravindra Jadeja remained unbeaten on 19 to finish off the proceedings for Gujarat Lions with a boundary in 18. 2 overs.
Chinaman bowler Kuldeep Yadav (2/33) Nathan Coulter-Nile (2/41) picked up two wickets apiece for KKR.
Earlier, Robin Uthappa cracked a brilliant half-century while makeshift opener Sunil Narine struck a quickfire 47 at the top to guide Kolkata Knight Riders to 187 for five. Uthappa made 72 off just 48 balls balls with the help of eight boundaries and two sixes to anchor the KKR innings after Narine (42 off 17 balls) played a short little cameo at the top to give his side a blazing start to their innings after being invited to bat.
Narine’s breezy knock was studded with nine boundaries and a huge hit over the fence.
Besides, skipper Gautam Gambhir made 33 off 28 balls while Manish Pandey (24) and Yusuf Pathan (11 not out) also conributed for the hosts. For Gujarat Lions, skipper Suresh Raina (2/11) was the most economical bowler. | english |
<filename>app/data/seed/locations/f7a98beb-5743-422f-972b-cf4fc4be420a/ede01e19-c073-4a59-9271-1d56fa87e39b.json
{"id":"ede01e19-c073-4a59-9271-1d56fa87e39b","name":"Pikemere Primary School","code":"Y","address":{"addressLine1":"Pikemere Road","addressLine2":"Alsager","postcode":"ST7 2SW"},"organisation":{"id":"f7a98beb-5743-422f-972b-cf4fc4be420a","code":"1PN","name":"Holmes Chapel Comprehensive School"}} | json |
The multilevel parking at Pune airport will be inaugurated by Union civil aviation minister Jyotiraditya Scindia at 5. 30 pm on November 25, said Pune MP Girish Bapat.
“The parking lot will also provide other facilities to passengers. During the Union minister Jyotiraditya Scindia’s visit to Pune in September 2022, he was requested to give time for the inauguration of this facility. He agreed, and will visit the city for the inauguration ceremony,” Bapat said. | english |
IQ or Intelligence Quotient is one word we’ve heard all our lives. As per studies, people with high IQ tend to be successful. However, it’s a myth that IQ is God-given, there are ways you can cultivate Intelligence Quotient in your kids and yourself too. There’s no age limit to improving your IQ however your child’s formative years are the best time for them to recognize patterns and act accordingly.
Here’s a list of 5 ways you can increase IQ in your kids, holistically:
Learning to play a musical instrument is a great brain activity that boosts IQ levels directly by improving the mathematical and spatial reasoning skills. It has been scientifically proven with MRI scans that playing an instrument boosts brain functioning. Take time out each week and let your child learn an instrument like guitar, mini-keyboard, a drum or a tabla… the list is unending and you can take cue from your little boy or girl’s interests.
Physical activity while playing any sport increases brain activity with the release of endorphins and endorphins boost our brain’s function and output. Encourage your child to take up a sport and engage with him so he can follow through.
Mathematical calculations improve the brain functioning drastically and hence impact an individual’s IQ. You can engage 10 minutes every day with your kid and ask them randomly 2+2=, 9-3=, and so on… increase the level as per their age. Get them to learn mathematical skills like ABACUS, Vedic Maths, in their pre-teens as the academic pressure is less in these years.
Deep breathing is one of the greatest brain hacks and has been revered since ancient times in India. Deep breathing is the core of meditation and helps clear thoughts thereby lending more clarity to an individual by releasing stress and increasing the power to concentrate. As per a recent study conducted in Harvard Medical School, a brain scan proved thickening of all four quarters of the brain after 8 weeks of continuous meditation. Therefore, take 10-15 minutes each day with your kids, early morning or before going off to sleep, practice belly breathing and see the difference in their performance.
Lastly, how much we stop, our kids manage to play games on our mobiles, desktops, laptops and ipads. It is better to download games that improve their brain function and hence IQ. There are a plethora of brain exercises for kids that you can find on Google Play store or Apple’s App Store. | english |
{"data":{"id":7619,"title":"Hood II : [Aviator C.<NAME>, S.A.: portraits, aeroplane and with <NAME>riggs studying a map, 1934]","primoId":"ADLIB110312050","slug":"adlib110312050","shortcode":"","imageUrl":"https:\/\/dxlab.sl.nsw.gov.au\/images-newselfwales\/selfie1523887255817.jpg","content":"interiors, aeroplanes, aviators, maps, portraits, Mascot (N.S.W.), Adult Males","imageType":"portrait","date":"2018-04-16 14:00:55","dateText":"20 Aug 1934","timestamp":"","instagramUsername":"","featuredMedia":{"sourceUrl":"https:\/\/dxlab.sl.nsw.gov.au\/images-newselfwales\/selfie1523887255817.jpg","sizes":{"medium":{"sourceUrl":"https:\/\/dxlab.sl.nsw.gov.au\/images-newselfwales\/selfie1523887255817-300x231.jpg","width":300,"height":231,"__typename":"MediaSize"},"full":{"sourceUrl":"https:\/\/dxlab.sl.nsw.gov.au\/images-newselfwales\/selfie1523887255817.jpg","width":1400,"height":1079,"__typename":"MediaSize"},"__typename":"MediaSizes"},"__typename":"Media"},"__typename":"NewSelfWalesPortrait"}} | json |
{
"waitTimes": [],
"MinHeightInInches": 40,
"MaxHeightInInches": null,
"ExpressPassAccepted": true,
"WaitTime": 35,
"OpensAt": null,
"ClosesAt": null,
"HasChildSwap": true,
"PeakHeightInFeet": null,
"TopSpeedInMph": null,
"AccessibilityOptions": [
"WheelchairMustTransfer",
"ExtraInfo"
],
"AdaDescription": null,
"MinRecommendedAge": null,
"MaxRecommendedAge": null,
"HasSingleRiderLine": true,
"RideTypes": [
"Video3D4D"
],
"FunFact": "First ever combination of moving, motion-based ride vehicles, 3-D film and live action. \n\nThis simulator ride's set encompasses 1.5 acres including a virtual 400 foot freefall experience",
"FunFactImage": null,
"SiteUrl": "https://www.universalorlando.com/Rides/Islands-of-Adventure/Adventures-of-Spider-Man-Ride.aspx",
"SocialSharingText": "Checking out The Amazing Adventures of Spider-Man® on the #UniversalOrlando mobile app - via @UniversalOrl",
"HasNominalFee": false,
"P406LocationId": null,
"Category": "Rides",
"MblDisplayName": "The Amazing Adventures of Spider-Man®",
"LandId": 10138,
"VenueId": 10000,
"MblLongDescription": null,
"MblShortDescription": "Strap on your 3-D glasses and join the world's most famous web slinger in a high-flying virtual reality ride. You'll soar above the streets, scale skyscrapers and battle bad guys left and right.",
"Longitude": -81.469852,
"Latitude": 28.4705456,
"DetailImages": [
"https://services.universalorlando.com/api/Images/IOA-SpiderMan-detail1.jpg",
"https://services.universalorlando.com/api/Images/IOA-SpiderMan_detail2.jpg",
"https://services.universalorlando.com/api/Images/IOA-SpiderMan-detail3.jpg"
],
"ListImage": "https://services.universalorlando.com/api/Images/IOA-SpiderMan_list.jpg",
"ThumbnailImage": "https://services.universalorlando.com/api/Images/IOA-SpiderMan-search.jpg",
"IsRoutable": false,
"EventSeriesOnly": false,
"Tags": [
"Marvel",
"Comics",
"Comic Book",
"Super hero",
"Hero"
],
"OfferIds": [],
"InteractiveExperiences": [],
"Prices": [],
"PhotoFrameExperiences": [],
"VideoImage": null,
"VideoURL": null,
"QueueImage": null,
"SupplementalTime": null,
"SupplementalTimingDetails": null,
"VirtualLine": false,
"UniversalPlayTitle": null,
"UniversalPlayURL": null,
"UniversalPlayHeaderColor": null,
"WebSiteLink": null,
"Url": "https://services.universalorlando.com/api/PointsOfInterest/Rides/10831",
"Id": 10831,
"ExternalIds": {
"Tridion13": "100-58231",
"SharePoint": "18",
"ContentId": "com.uo.ioa.rides.the_amazing_adventures_of_spider-man"
},
"statusCode": 200
} | json |
<filename>src/game-bar.service.ts<gh_stars>0
import { Injectable } from '@nestjs/common';
import {
Action,
BoxScore,
Period,
PlayByPlay,
Player,
PlayerGameBar,
PlayerPeriodPerformance,
PlayerStats,
Team,
} from './model';
@Injectable()
export class GameBarService {
calculateStatsForPlayerForPeriod(actions: Action[], player: Player, period: Period): PlayerStats {
let points = 0;
let missedShotsAndFreeThrows = 0;
let assists = 0;
let turnovers = 0;
let rebounds = 0;
let steals = 0;
let blocks = 0;
let fouls = 0;
let fta = 0;
let fga2 = 0;
let fga3 = 0;
for (const action of actions) {
if ((period === undefined || action.period === period.period) && action.personId === player.personId) {
if (['2pt', '3pt', 'freethrow'].includes(action.actionType) && action.shotResult === 'Made') {
switch (action.actionType) {
case '2pt':
points += 2;
fga2++;
break;
case '3pt':
points += 3;
fga3++;
break;
case 'freethrow':
points += 1;
fta++;
break;
}
} else if (['2pt', '3pt', 'freethrow'].includes(action.actionType) && action.shotResult === 'Missed') {
switch (action.actionType) {
case '2pt':
fga2++;
break;
case '3pt':
fga3++;
break;
case 'freethrow':
fta++;
break;
}
missedShotsAndFreeThrows += 1;
} else if (action.actionType === "turnover") {
turnovers += 1;
} else if (action.actionType === "rebound") {
rebounds += 1;
} else if (action.actionType === "foul") {
fouls += 1;
}
} else if ((period === undefined || action.period === period.period) && action.assistPersonId === player.personId) {
assists += 1;
} else if ((period === undefined || action.period === period.period) && action.stealPersonId === player.personId) {
steals += 1;
} else if ((period === undefined || action.period === period.period) && action.blockPersonId === player.personId) {
blocks += 1;
}
}
return new PlayerStats({
points: points,
missedShotsAndFreeThrows: missedShotsAndFreeThrows,
assists: assists,
turnovers: turnovers,
rebounds: rebounds,
steals: steals,
blocks: blocks,
fouls: fouls,
fta: fta,
fga2: fga2,
fga3: fga3
});
}
getGameBarsForTeam = (boxScore: BoxScore, playByPlay: PlayByPlay): [Team, Team] => {
const away = boxScore.awayTeam.players.map(player => this.createPlayerPeriodPerformance(playByPlay, player, boxScore.awayTeam.periods));
const home = boxScore.homeTeam.players.map(player => this.createPlayerPeriodPerformance(playByPlay, player, boxScore.homeTeam.periods));
const awayTeam = {...boxScore.awayTeam, playerGameBars: away}
const homeTeam = {...boxScore.awayTeam, playerGameBars: home}
return [awayTeam, homeTeam];
}
createPlayerPeriodPerformance = (playByPlay: PlayByPlay, player: Player, periods: Period[]): PlayerGameBar => {
let result: PlayerPeriodPerformance[] = [];
for (const period of periods) {
result.push({
period: period,
player: player,
stats: this.calculateStatsForPlayerForPeriod(playByPlay.actions, player, period),
});
}
return {
player: player,
playerPeriodPerformance: result
};
};
getPeriods = (boxScore: BoxScore): Period[] => {
return boxScore.homeTeam.periods;
};
getPlayers = (boxScore: BoxScore): Player[] => {
const homePlayers = boxScore.homeTeam.players;
const awayPlayers = boxScore.awayTeam.players;
return homePlayers.concat(awayPlayers);
};
}
| typescript |
The scene featured the two lead protagonists, Apu and Durga running through the fields, with a train moving at a distance, in the background.
which released in 1956 and 1959, respectively. The film was based on the novel by the same name, written by Bibhutibhushan Bandopadhyay.
. In total, Ray directed 36 films including feature films, short films and documentaries.
Ray also wrote fiction including Feluda, a series of Bengali novels and short stories revolving around the private detective Feluda. Ray won 32 National Film Awards and an Oscar for lifetime achievement. He also won the Bharat Ratna, the highest civilian honour in India in 1992 and the Dadasaheb Phalke Award in 1985.
He was also the second film personality following Chaplin who was awarded an honorary doctorate degree by Oxford University.
Ray died on April 23 1992 in Calcutta at the age of 70.
| english |
<filename>README.md
# JavaScript Playground
JavaScript Playground is an application that lets you use your own editor to write some code and then log 2 console and have it appear in your browser for viewing purposes.
The purpose of this project is to provide training demos using the browser as the printable output.
## Usage
```
npx degit twilson63/playground mydemo
cd mydemo
npm install
npm start
```
Open up `src/main.js` in your editor, then open up a browser to localhost:3000, and start writting code, then everytime you save, you should see anything you logged in the browser.
## LICENSE
MIT
| markdown |
{"ast":null,"code":"import React from 'react';\nimport { connectMenu } from 'react-instantsearch-core';\nimport PanelCallbackHandler from '../components/PanelCallbackHandler';\nimport MenuSelect from '../components/MenuSelect';\n/**\n * The MenuSelect component displays a select that lets the user choose a single value for a specific attribute.\n * @name MenuSelect\n * @kind widget\n * @requirements The attribute passed to the `attribute` prop must be present in \"attributes for faceting\"\n * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API.\n * @propType {string} attribute - the name of the attribute in the record\n * @propType {string} [defaultRefinement] - the value of the item selected by default\n * @propType {number} [limit=10] - the minimum number of diplayed items\n * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return.\n * @themeKey ais-MenuSelect - the root div of the widget\n * @themeKey ais-MenuSelect-noRefinement - the root div of the widget when there is no refinement\n * @themeKey ais-MenuSelect-select - the `<select>`\n * @themeKey ais-MenuSelect-option - the select `<option>`\n * @translationkey seeAllOption - The label of the option to select to remove the refinement\n * @example\n * import React from 'react';\n * import algoliasearch from 'algoliasearch/lite';\n * import { InstantSearch, MenuSelect } from 'react-instantsearch-dom';\n\n *\n * const searchClient = algoliasearch(\n * 'latency',\n * '6be0576ff61c053d5f9a3225e2a90f76'\n * );\n *\n * const App = () => (\n * <InstantSearch\n * searchClient={searchClient}\n * indexName=\"instant_search\"\n * >\n * <MenuSelect attribute=\"categories\" />\n * </InstantSearch>\n * );\n */\n\nvar MenuSelectWidget = function MenuSelectWidget(props) {\n return React.createElement(PanelCallbackHandler, props, React.createElement(MenuSelect, props));\n};\n\nexport default connectMenu(MenuSelectWidget);","map":null,"metadata":{},"sourceType":"module"} | json |
package org.n52.sta.awiingestor.model.awi;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.HashMap;
import java.util.Map;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"uuid",
"unitOfMeasurement",
"name",
"sensorOutputType",
"shortname",
"comment",
"id"
})
public class AWISensorOutput {
@JsonProperty("uuid")
private String uuid;
@JsonProperty("unitOfMeasurement")
private UnitOfMeasurement unitOfMeasurement;
@JsonProperty("name")
private String name;
@JsonProperty("sensorOutputType")
private SensorOutputType sensorOutputType;
@JsonProperty("shortname")
private String shortname;
@JsonProperty("comment")
private Object comment;
@JsonProperty("id")
private Integer id;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
private String sourceUrl;
@JsonProperty("uuid")
public String getUuid() {
return uuid;
}
@JsonProperty("uuid")
public void setUuid(String uuid) {
this.uuid = uuid;
}
@JsonProperty("unitOfMeasurement")
public UnitOfMeasurement getUnitOfMeasurement() {
return unitOfMeasurement;
}
@JsonProperty("unitOfMeasurement")
public void setUnitOfMeasurement(UnitOfMeasurement unitOfMeasurement) {
this.unitOfMeasurement = unitOfMeasurement;
}
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@JsonProperty("sensorOutputType")
public SensorOutputType getSensorOutputType() {
return sensorOutputType;
}
@JsonProperty("sensorOutputType")
public void setSensorOutputType(SensorOutputType sensorOutputType) {
this.sensorOutputType = sensorOutputType;
}
@JsonProperty("shortname")
public String getShortname() {
return shortname;
}
@JsonProperty("shortname")
public void setShortname(String shortname) {
this.shortname = shortname;
}
@JsonProperty("comment")
public Object getComment() {
return comment;
}
@JsonProperty("comment")
public void setComment(Object comment) {
this.comment = comment;
}
@JsonProperty("id")
public Integer getId() {
return id;
}
@JsonProperty("id")
public void setId(Integer id) {
this.id = id;
}
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
public String getSourceUrl() {
return sourceUrl;
}
public AWISensorOutput setSourceUrl(String sourceUrl) {
this.sourceUrl = sourceUrl;
return this;
}
}
| java |
New Delhi: Noted jurist Fali Nariman on Monday said he was of the view that Chief Election Commissioner N Gopalaswami did not have the suo motu power to recommend the removal of his colleague Navin Chawla.
"It is a grey area but to my mind I don't think that he has the power to suo-motu to take any action," he told said.
He said that there was no clarity in the Constitution whether the CEC had suo motu power to recommend removal of an Election Commissioner. The Supreme Court has left the issue open two years ago, he felt.
On Chawla's likely appointment as the next CEC, Nariman said he had no right to become the next CEC automatically on the retirement of the incumbent. However, it was upto the government to take a decision.
The fact that they had kept on appointing the senior-most person was only a matter of practice and not a matter of law or Constitution, he said. | english |
{"type":"minecraft:chest","pools":[{"entries":[{"type":"minecraft:item","weight":10,"name":"minecraft:heart_of_the_sea"}],"rolls":1},{"entries":[{"type":"minecraft:item","weight":10,"name":"oceanmaze:ocean_metal_helmet","functions":[{"function":"minecraft:enchant_with_levels","levels":{"min":10,"max":20,"type":"minecraft:uniform"},"treasure":false}]},{"type":"minecraft:item","weight":10,"name":"oceanmaze:ocean_metal_chestplate","functions":[{"function":"minecraft:enchant_with_levels","levels":{"min":10,"max":20,"type":"minecraft:uniform"},"treasure":false}]},{"type":"minecraft:item","weight":10,"name":"oceanmaze:ocean_metal_leggings","functions":[{"function":"minecraft:enchant_with_levels","levels":{"min":10,"max":20,"type":"minecraft:uniform"},"treasure":false}]},{"type":"minecraft:item","weight":10,"name":"oceanmaze:ocean_metal_boots","functions":[{"function":"minecraft:enchant_with_levels","levels":{"min":10,"max":20,"type":"minecraft:uniform"},"treasure":false}]}],"rolls":1},{"entries":[{"type":"minecraft:item","weight":1,"name":"minecraft:enchanted_golden_apple"},{"type":"minecraft:item","weight":9,"name":"minecraft:trident"},{"type":"minecraft:item","weight":5,"name":"minecraft:golden_apple","functions":[{"function":"minecraft:set_count","count":{"min":1,"max":4,"type":"minecraft:uniform"}}]},{"type":"minecraft:item","weight":5,"name":"minecraft:prismarine_shard","functions":[{"function":"minecraft:set_count","count":{"min":1,"max":32,"type":"minecraft:uniform"}}]},{"type":"minecraft:item","weight":5,"name":"minecraft:prismarine_crystals","functions":[{"function":"minecraft:set_count","count":{"min":1,"max":16,"type":"minecraft:uniform"}}]},{"type":"minecraft:item","weight":5,"name":"minecraft:iron_ingot","functions":[{"function":"minecraft:set_count","count":{"min":1,"max":32,"type":"minecraft:uniform"}}]},{"type":"minecraft:item","weight":10,"name":"minecraft:diamond","functions":[{"function":"minecraft:set_count","count":{"min":1,"max":6,"type":"minecraft:uniform"}}]},{"type":"minecraft:item","weight":10,"name":"minecraft:nautilus_shell","functions":[{"function":"minecraft:set_count","count":{"min":1,"max":16,"type":"minecraft:uniform"}}]},{"type":"minecraft:item","weight":10,"name":"minecraft:scute","functions":[{"function":"minecraft:set_count","count":{"min":1,"max":16,"type":"minecraft:uniform"}}]},{"type":"minecraft:item","weight":5,"name":"oceanmaze:water_metal_block","functions":[{"function":"minecraft:set_count","count":{"min":1,"max":4,"type":"minecraft:uniform"}}]},{"type":"minecraft:item","weight":10,"name":"oceanmaze:ocean_metal_ingot","functions":[{"function":"minecraft:set_count","count":{"min":1,"max":4,"type":"minecraft:uniform"}}]},{"type":"minecraft:item","weight":10,"name":"oceanmaze:deep_ocean_metal_nugget","functions":[{"function":"minecraft:set_count","count":{"min":1,"max":8,"type":"minecraft:uniform"}}]}],"rolls":{"min":10,"max":20,"type":"minecraft:uniform"}}]}
| json |
Badminton legends Lin Dan (China) and Lee Chong Wei (Malaysia) have been elected to the BWF Hall of Fame for 2023.
They will be inducted at a ceremony on Friday 26 May at the Kuala Lumpur Convention Centre in Malaysia.
The pair of them were the most dominant men’s singles players of their generation. Having begun their senior international career in the early 2000s, Lee and Lin went on to stamp their presence on the game until their retirements in 2019 and 2020 respectively. A measure of their dominance is that between them, they contested a total of five Olympic and 10 BWF World Championships finals.
Lee and Lin set several records during the course of their long careers. Lee finished with 47 BWF Superseries/World Tour titles and was world No. 1 for an amazing 349 weeks.
Lin was unrivalled when it came to the Major Championships, with two Olympic and five World Championships titles.
They were also vital to their countries’ fortunes at the team championships.
But it was not just in terms of tournament success that they will be remembered.
BWF President Poul-Erik Høyer hailed both players for their impact on the game. | english |
<filename>src/data/Spanish/materials/dreamsolvent.json
{
"name": "<NAME>",
"description": "Un objeto capaz de transformar materiales de mejora de personaje obtenidos de recuerdos y pruebas en la forma que se necesite.\nAntiguamente, la gente creía que los espíritus y los recuerdos también tienen una forma física. Si alguien soñaba con el paraíso y tras despertarse recogía una flor, esa flor debía de estar hecha de la fantasía del sueño. El Solvente de sueños disuelve lo que se obtiene de los recuerdos y lo transforma en un sueño distinto.\nEl recuerdo de pelear contra alguien más poderoso que tú es lo que hace que quieras ser más fuerte.",
"sortorder": 1938,
"rarity": "4",
"category": "CONSUME",
"materialtype": "Consumible",
"source": [
"Recompensa del desafío del Dominio de la cruzada y el Rey Lobo del Norte"
]
} | json |
<reponame>MenkaChaugule/hospital-management-emr
import { Component, EventEmitter, Input, Output } from "@angular/core";
import { RouterOutlet, RouterModule, Router } from '@angular/router';
import { MessageboxService } from '../../shared/messagebox/messagebox.service';
import { BillingBLService } from '../shared/billing.bl.service';
import { PatientService } from '../../patients/shared/patient.service';
import { CommonFunctions } from '../../shared/common.functions';
import { DanpheHTTPResponse } from "../../shared/common-models";
import { Patient } from "../../patients/shared/patient.model";
import { BillingService } from "../shared/billing.service";
import * as moment from 'moment/moment';
import { CoreService } from "../../core/shared/core.service";
@Component({
selector: "bill-history",
templateUrl: "./patient-bill-history.html",
host: { '(window:keydown)': 'hotkeys($event)' }
})
export class PatientBillHistoryComponent {
@Output("history-emitter")
historyEmitter: EventEmitter<Object> = new EventEmitter<Object>();
@Input("showPatientBillHistory")
public showPatientBillHistory: boolean = false;
@Input("patient")
public patient: Patient;
public patBillHistory = {
IsLoaded: false,
PatientId: null,
PaidAmount: null,
DiscountAmount: null,
CancelAmount: null,
ReturnedAmount: null,
CreditAmount: null,
ProvisionalAmt: null,
TotalDue: null,
DepositBalance: null,
BalanceAmount: null
};
public patBillHistoryDetail = {
IsLoaded: false,
Invoices: null,
ProvisionalItems: null,
Settlements: null,
Deposits: null,
CancelledItems: null
}
public paidPatBillHistoryDetail = Array<any>();
public unPaidPatBillHistoryDetail = Array<any>();
public returnedPatBillHistoryDetail = Array<any>();
public insuranceBillDetail = Array<any>();
//public currencyUnit: string = "";
public showView: false;
private RefundAmount: boolean = false;
constructor(public billingBLService: BillingBLService,
public msgBoxServ: MessageboxService,
public patientService: PatientService, public billingService: BillingService,
public coreService: CoreService) {
//this.currencyUnit = this.billingService.currencyUnit;
}
//@Input("showPatientBillHistory")
//public set value(val: boolean) {
// this.showPatientBillHistory = val;
// if (this.showPatientBillHistory && this.patient && this.patient.PatientId) {
// this.LoadPatientPastBillSummary(this.patient.PatientId);
// this.LoadPatientBillDetail(this.patient.PatientId);
// }
// else {
// this.showPatientBillHistory = false;
// }
//}
ngOnInit() {
//console.log(this.patient);
//console.log(this.showPatientBillHistory);
if (this.showPatientBillHistory && this.patient && this.patient.PatientId) {
this.LoadPatientPastBillSummary(this.patient.PatientId);
this.LoadPatientBillDetail(this.patient.PatientId);
}
else {
this.showPatientBillHistory = false;
}
}
LoadPatientPastBillSummary(patientId: number) {
this.billingBLService.GetPatientPastBillSummary(patientId)
.subscribe((res: DanpheHTTPResponse) => {
if (res.Status == "OK") {
this.patBillHistory = res.Results;
//provisional amount should exclude itmes those are listed for payment in current window.
this.patBillHistory.ProvisionalAmt = CommonFunctions.parseAmount(this.patBillHistory.ProvisionalAmt);
this.patBillHistory.TotalDue = CommonFunctions.parseAmount(this.patBillHistory.CreditAmount + this.patBillHistory.ProvisionalAmt);
this.patBillHistory.BalanceAmount = CommonFunctions.parseAmount(this.patBillHistory.DepositBalance - this.patBillHistory.TotalDue);
this.patBillHistory.IsLoaded = true;
this.patBillHistory.DepositBalance = CommonFunctions.parseAmount(this.patBillHistory.DepositBalance);
this.patBillHistory.PaidAmount = CommonFunctions.parseAmount(this.patBillHistory.PaidAmount);
this.patBillHistory.CreditAmount = CommonFunctions.parseAmount(this.patBillHistory.CreditAmount);
this.patBillHistory.CancelAmount = CommonFunctions.parseAmount(this.patBillHistory.CancelAmount);
this.patBillHistory.ReturnedAmount = CommonFunctions.parseAmount(this.patBillHistory.ReturnedAmount);
this.patBillHistory.DiscountAmount = CommonFunctions.parseAmount(this.patBillHistory.DiscountAmount);
if (this.patBillHistory.BalanceAmount >= 0) {
this.RefundAmount = true;
}
}
else {
this.msgBoxServ.showMessage("failed", ["Cannot get patient bill history detail.Check Log"]);
console.log(res.ErrorMessage)
}
});
}
LoadPatientBillDetail(patientId: number) {
this.paidPatBillHistoryDetail = [];
this.unPaidPatBillHistoryDetail = [];
this.returnedPatBillHistoryDetail = [];
this.insuranceBillDetail = [];
this.billingBLService.GetPatientBillHistoryDetail(patientId)
.subscribe((res: DanpheHTTPResponse) => {
if (res.Status == "OK") {
this.patBillHistoryDetail = res.Results;
//provisional amount should exclude itmes those are listed for payment in current window.
this.patBillHistoryDetail.Invoices.forEach(invoice => {
invoice.Amount = CommonFunctions.parseAmount(invoice.Amount);
if (invoice.BillStatus == 'paid' && !invoice.IsReturned && !invoice.IsInsuranceBilling) {
this.paidPatBillHistoryDetail.push(invoice);
}
else if (invoice.BillStatus == 'unpaid' && !invoice.IsReturned && !invoice.IsInsuranceBilling) {
this.unPaidPatBillHistoryDetail.push(invoice);
}
else if (invoice.IsInsuranceBilling && !invoice.IsReturned) {
this.insuranceBillDetail.push(invoice);
}
// else if (invoice.IsReturned) {
// invoice.BillStatus = 'returned';
// this.returnedPatBillHistoryDetail.push(invoice);
// }
});
this.returnedPatBillHistoryDetail = res.Results.ReturnedItems;
this.patBillHistoryDetail.ProvisionalItems.forEach(provisional => {
provisional.SubTotal = CommonFunctions.parseAmount(provisional.SubTotal);
provisional.Amount = CommonFunctions.parseAmount(provisional.Amount);
});
this.patBillHistoryDetail.Settlements.forEach(settlement => {
settlement.PaidAmount = CommonFunctions.parseAmount(settlement.PaidAmount);
});
this.patBillHistoryDetail.CancelledItems.forEach(canItems => {
canItems.Amount = CommonFunctions.parseAmount(canItems.Amount);
canItems.SubTotal = CommonFunctions.parseAmount(canItems.SubTotal);
});
}
else {
this.msgBoxServ.showMessage("failed", ["Cannot get patient bill history detail. Check Log"]);
console.log(res.ErrorMessage)
}
});
}
Close() {
this.showPatientBillHistory = false;
this.patient = null;
}
// <link href="../../assets-dph/external/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
public showHeader: boolean = false;
printDetailedView() {
this.showHeader = true;
let popupWinindow;
var printContents = document.getElementById("printpage").innerHTML;
popupWinindow = window.open('', '_blank', 'width=600,height=700,scrollbars=no,menubar=no,toolbar=no,location=no,status=no,titlebar=no');
popupWinindow.document.open();
popupWinindow.document.write('<html><head><link href="../../assets-dph/external/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" /><link rel="stylesheet" type="text/css" href="../../themes/theme-default/DanpheStyle.css" /></head><body onload="window.print()">' + printContents + '</body></html>');
popupWinindow.document.close();
}
showDetailedView(event: any) {
}
public hotkeys(event) {
if (event.keyCode == 27) {
this.historyEmitter.emit({ close: true });
}
}
}
| typescript |
New Delhi: The Congress hit back Wednesday at the BJP for levelling graft allegations against Rahul Gandhi and said that Prime Minister Narendra Modi and Union minister Smriti Irani were making ‘completely baseless’ charges to divert attention from real issues such as ‘rampant joblessness’ and ‘agrarian crisis’.
Earlier in the day, the BJP had dragged Rahul and his sister Priyanka Gandhi Vadra into alleged corruption involving land deals, claiming the opposition party known for ‘institutionalising’ graft has now come to define ‘family corruption’.
Responding to the allegation, Congress’ chief spokesperson Randeep Surjewala asked if there was wrongdoing in the deals then why had the BJP not probed them in the last five years.
“The Prime Minister and his favourite Smriti Irani are resorting to levelling completely baseless and false allegations,” the Congress leader said.
“Smriti ji has got so blinded by her desire for revenge against Rahul along with her mentor Narendra Modi that she is resorting to fake and false allegations as a diversionary tactic to give cover fire to the Prime Minister. But they are never going to succeed,” he added.
Earlier in the day referring to a media report, Irani had claimed that Rahul and Priyanka purchased land in a deal involving HL Pahwa, who was raided by the ED.
Meanwhile while interacting with students in Chennai, the Congress president said that if his brother-in-law Robert Vadra can be probed then PM Narendra Modi should also face the same for his alleged role in the Rafale deal.
“I will be the first person to say it… Investigate Robert Vadra but also investigate Prime Minister Narendra Modi,” Rahul said while asking the students to refer to him by his first name. | english |
Umar Nurmagomedov believes that Aljamain Sterling is not a deserving UFC bantamweight champion. According to the 25-year-old Dagestani, Sterling had the belt handed to him thanks to a mistake from Petr Yan.
Yan and Sterling met inside the octagon for the bantamweight title at UFC 260 in March this year. In the fourth round of their exciting clash, Yan landed an illegal knee to Sterling's head. 'The Funk Master' found himself unable to continue fighting, and the referee declared him the winner via disqualification.
Speaking to RT Sport MMA about Sterling's legitimacy as the UFC bantamweight champion, Umar Nurmagomedov said:
"If you're asking whether he deserves the belt? No. He didn't win that belt. Petr made a mistake and he [Sterling] was given it." (Transcription courtesy: RT Sport MMA).
Umar Nurmagomedov, who made his UFC debut back in January 2021, is considered one of the most promising prospects in the bantamweight division.
Umar Nurmagomedov further reflected on his relationship with both Aljamain Sterling and Petr Yan. The Dagestani said he doesn't share a special bond with either of them and would be willing to challenge both fighters for the belt.
The 25-year-old also added that he was rooting for Yan over Sterling since he was the only fighter from Russia to hold a UFC title back then.
"I don't have the mindset that Sterling is the man and Petr is a bad guy or the other way around. They are both potential opponents. I'm ready to fight them both for the title. There's no special relationship with either of them. I was rooting for Petr because Khabib retired and he was the only Russian champ, and I was hoping our country would retain it. But we've got good prospects at 135lbs and 155lbs, so I hope we'll get some belts," said Nurmagomedov.
Umar Nurmagomedov is currently 1-0 in the UFC. His first promotional fight against Sergey Mozorov culminated in a dominant submission win for the Dagestani. Considering his lack of fighting experience, it will only be fair to assume that Nurmagomedov stands far off from a title shot as of now.
Please take 30 seconds to answer this survey so that we can better understand how to serve your MMA needs.
| english |
A free app for Android, by Tally in Mobile app GST Billing software Business.
Easy invoicing software to manage and track your billing on Android device.
Easy Invoice - PDF invoice generator is a free software only available for Mac, belonging to the category Business software.
A free program for Android, by Atooz Web Works.
Invoice Control is a free software for Android, that makes part of the category 'Finance'.
Invoice Maker PRO. is a free app for iPhone, that makes part of the category 'Business & Productivity'.
| english |
let webview
let activeGuestInstanceId
document.addEventListener('DOMContentLoaded', function () {
setup()
chrome.ipcRenderer.on('window-set-active-tab', (e, tabId, guestInstanceId) => {
console.log(`Received active tab id ${tabId}, guest instance ${guestInstanceId}`)
activeGuestInstanceId = guestInstanceId
})
})
function setup () {
webview = document.querySelector('webview')
const attachButton = document.querySelector('.control__command-attach')
const detachButton = document.querySelector('.control__command-detach')
attachButton.addEventListener('click', () => attachActiveTab())
detachButton.addEventListener('click', () => detach())
}
function attachActiveTab () {
if (activeGuestInstanceId == null) {
throw new Error('no active tab id')
}
console.log('showing active guest instance ', activeGuestInstanceId)
webview.attachGuest(activeGuestInstanceId)
}
function detach () {
console.log('detaching')
webview.detachGuest()
} | javascript |
<gh_stars>0
#ifndef SINCELL_CONTROLLER_HPP
#define SINCELL_CONTROLLER_HPP
#include <mecacell/mecacell.h>
#include <random>
#include <string>
struct SinController {
public:
SinController() {}
static SinController random() {
return SinController();
}
double getInput(const std::string &input, const int& verb = 1) const {
return 0.0;
}
void setInput(const std::string &input, double val) {
MecaCell::logger<MecaCell::DBG>("input: ", input, " ", val);
}
double getOutput(const std::string &output, const int& verb = 1, const int& step = 0) const {
double r = 0.0;
if ((sin((step/50)) > 0.5 && output == "contract")
/*|| (sin(step/100) <= 0 && output == "extension")*/)
r = 1.0;
if(verb >= 3) MecaCell::logger<MecaCell::DBG>("output: ", output, " ", r);
return r;
}
double getDelta(const std::string &o1, const std::string &o2) {
double plus = getOutput(o1);
double minus = getOutput(o2);
double div = plus + minus;
if (div > 0.0) {
return (plus - minus) / div;
}
return 0.0;
}
SinController(const SinController &c) {
// MecaCell::logger<MecaCell::DBG>("cloning");
}
SinController(const string& s) {} // unserialize
std::string serialize() const { return ""; }
void reset() {}
void update() {}
void mutate() {}
SinController crossover(const SinController& other) {
return SinController();
}
inline static double getDistance(const SinController& a, const SinController& b) {
return 0.0;
}
};
#endif
| cpp |
# Sudan function
https://en.wikipedia.org/wiki/Sudan_function
The Sudan function is an example of a function that is recursive, but not primitive recursive. The Sudan function was the first function having this property to be published. It was discovered and published in 1927 by <NAME>, a Romanian mathematician who was a student of <NAME>.
| markdown |
{
"solutionId": "deliverpoint",
"partnerId": "lightning-tools",
"categories": [
"teams"
],
"industries": [],
"sortOrder": 0,
"preview": false,
"visible": true,
"solutionLogoPicture": null,
"solutionLogoPictureAlt": "",
"solutionName": "DeliverPoint for Microsoft Teams",
"solutionUrl": "https://lightningtools.com/contact-us",
"solutionUrlTitle": "DeliverPoint for Microsoft Teams",
"metadata": {
"personas": "Administrators;End-user",
"solutionTechnologies": "Graph API;SPFx",
"businessFunctions": null,
"displayPartner": true,
"appSource": null,
"displayInfo": {
"default": {
"descriptionParagraphs": [
{
"name": "Short description",
"content": [
"\u003Cdiv\u003EDeliverPoint Permission Reporting and Management tool for Microsoft Teams, SharePoint, and OneDrive. Run reports to discover who is permissioned across the content of one or many teams. Manage the permissions across large scopes as user roles change.\u003Cbr\u003E\u003C/div\u003E"
]
},
{
"name": "Long description",
"content": []
},
{
"name": "Business need or problem",
"content": [
"\u003Cdiv\u003EMany organizations have many teams and channels where users have been assigned permissions through group memberships and sharing links. Reporting across multiple teams can be time consuming, let alone the removal of users as team membership needs change.\u003Cbr\u003E\u003C/div\u003E"
]
},
{
"name": "Business solution",
"content": [
"\u003Cdiv\u003EDeliverPoint is a tool that provides contextual permissions reporting and management for SharePoint and Microsoft Teams owners, as well as centralized permissions management for IT workers. DeliverPoint provides many reports that can be run against large scopes to determine the users that are permissioned. Permissions can be reassigned using the transfer permissions operation, or added and removed depending on the business need. DeliverPoint ensures that there is no doubt as to who has access to the content within your Microsoft Teams.\u003Cbr\u003E\u003C/div\u003E"
]
},
{
"name": "Success factors",
"content": [
"\u003Cdiv\u003EGovernment, financial, and technology organizations, among others, have found success with DeliverPoint to ensure that the right users have the right level of access to business content. Organizations using DeliverPoint range from small to enterprise organizations, with either centralized or de-centralized permissions models.\u003Cbr\u003E\u003C/div\u003E"
]
}
],
"mediaAssets": [
{
"type": "image",
"order": 0,
"url": "assets/DeliverPoint.png",
"alt": ""
}
],
"detailItemCategories": [
{
"name": "Resources",
"description": "Possible html supported text shown just above the list of links",
"items": []
}
]
}
}
}
} | json |
import {InjectionToken} from '@angular/core';
import firebase from 'firebase/app';
export class FirebaseConfig {
[key: string]: any;
}
export interface FirestoreEmulatorConfig {
// useEmulator: boolean;
host: string;
port: number;
}
export const FIREBASE_APP = new InjectionToken<firebase.app.App>('firebase_app.config');
export const FIRESTORE_USE_EMULATOR: FirestoreEmulatorConfig = {
// useEmulator: false,
host: 'localhost',
port: 8080,
};
// export type FirestoreEmulatorConfig = {
// useEmulator: boolean;
// emulatorHost: string;
// emulatorPort: 4200
// }
| typescript |
function(doc, req) {
var phones = [];
for (type in doc.phones) { phones.push( 'TEL;TYPE='+type.toUpperCase()+':'+doc.phones[type] ) }
var addresses = []
for (type in doc.addresses) {
addresses.push( 'ADR;TYPE='+type.toUpperCase()+':;;' +
doc.addresses[type].number + ' ' + doc.addresses[type].street + ';' +
doc.addresses[type].city + ';' +
doc.addresses[type].country
)
}
var body = (<vcard>BEGIN:VCARD
VERSION:3.0
N:{doc.last_name};{doc.first_name}
FN:{doc.first_name} {doc.last_name}
{phones.join("\n")}
{addresses.join("\n")}
END:VCARD</vcard>).toString()
return {
body : body,
headers : {
"Content-Type" : "text/x-vcard"
}
}
}
| javascript |
The wrestlers are still adamant on demanding the arrest of Brij Bhushan Sharan Singh. On Wednesday, the wrestlers had a meeting with Sports Minister Anurag Thakur for about 6 hours. The government has agreed to most of their demands after the wrestlers, who have been protesting for more than a month, met Sports Minister Anurag Thakur. After the meeting which lasted for more than six hours, Thakur said that the charge sheet will be filed against the outgoing WFI president Brijmohan Sharan Singh on the allegations of the players by June 15 and till then the players have agreed to postpone their protest.
After the meeting, Thakur told reporters, ‘Positive talks have taken place on a very sensitive issue in a very good environment. The issues which were discussed in this meeting which lasted for about six hours, included the demand to investigate the allegations of the wrestlers and file the charge sheet by June 15. However, at the moment nothing was said from any side on the main demand of the players for the arrest of Brij Bhushan.
Olympic medalist wrestlers Sakshi Malik and Bajrang Punia, who have been protesting since April 23 demanding the arrest of Brij Bhushan, the outgoing president of the Wrestling Federation of India, on the allegations of sexual harassment of seven women wrestlers, including a minor, at the invitation of Sports Minister Thakur, today at his residence But met him. Vinesh Phogat did not attend this meeting.
Thakur said, ‘All the decisions in the meeting were taken with mutual consent. The suggestions given by the players include the demand to hold the elections of the Wrestling Federation of India by June 30. Apart from this, Brijbhushan Sharan Singh and people related to him should not be elected in the federation.
Thakur further said, ‘Along with this, he has demanded that the internal complaints committee of WFI should be formed and it should be headed by a woman. He said, “Until the WFI elections are held, the names of two coaches have been proposed in the ad-hoc committee of the IOA so that technical difficulties do not arise.” The Sports Minister said, ‘There was also a demand of the players that women players or other players should get security as per the requirement. The cases against the players or arena or coaches against whom cases have been filed, those cases should be withdrawn.
After meeting Sports Minister Anurag Thakur, Bajrang Punia said that our performance is not over. We will wait till 15th June. After the completion of the police process, the government will tell the status of the investigation. The government should have done these things earlier. We will talk to all the organizations involved in the protest.
| english |
RIYADH: Saudi government on Sunday ordered Iranian ambassador to leave the state within 24 hours.
Iran-Saudi Arabia split emerged deepened after Saudi embassy torched in Tehran. Saudi government on Sunday asked the Iranian ambassador to leave Riyadh within 24 hours.
Earlier, the Foreign Ministry on Saturday summoned the Iranian ambassador to the Kingdom and handed him a strongly worded protest letter following Tehran’s statements against the Kingdom over the executions of 47 convicted terrorists..
The ministry termed Iranian statements “clear interference in the domestic affairs of the Kingdom.” The ministry also called on Iran to take full responsibility of protecting the Saudi Embassy in Tehran and the Saudi Consulate in Mashhad and provide full protection to the Saudi diplomatic staff in accordance with international diplomatic conventions.
Meanwhile, Grand Mufti Sheikh Abdul Aziz Al-Asheikh said on Saturday that the executions were based on the teachings of the Holy Qur’an and Hadith. “It was required for integrity and stability, and in defense of peace, properties, sanctities and minds,” he said in a statement.
| english |
{
"buttons": ["formatting", "redo", "undo", "bold", "italic", "unorderedlist", "orderedlist", "link"],
"plugins": ["inlinestyle"],
"linkNewTab": true,
"toolbarFixed": true,
"minHeight": "200px",
"formattingHide": ["pre", "h1", "h5", "h6"]
}
| json |
At a time when the coronavirus pandemic has shifted most of the studies to online platforms, teachers and students are grappling the technology, internet services and other technical glitches that come with it.
Showing a new path in these complex times is a visually-challenged teacher of Koraput, Odisha, who is putting technology to best use.
A recent report by The New Indian Express mentions how the 56-year-old History professor Kamakhi Das is utilising the quarantine days to record audio lectures for his students. The report says that Das has prepared a set of 10,000 questions and their answers on Indian history.
The teacher is assisted by his wife who helps him record the questions and lectures on other topics in the form of audio files. Apart from audio recordings, the History professor also shoots his lecture sessions at home using a smartphone for the students.
Head of the History Department at Koraput Government College, Das has a humble recording studio at his residence where he is putting in his passion to teach his students into use. In the tough times of the coronavirus pandemic, Das realises the value of education and what it means for his students. After recording the lectures, he sends the audio files to his students which includes the visually-challenged ones via WhatsApp.
Talking to The New Indian Express, Das said that the questions and answers which he records are based on the syllabus of UGC-sponsored Choice Based Credit System (CBCS) course. The professor says that the recordings will also help the students to prepare for various State and national-level competitive exams.
With the help of WhatsApp video class, Das also takes online classes for his students. His efforts have helped visually-challenged students a great deal in these unusual times.
For the visually-impaired students who do not have access to braille or audio books, Das’s initiative has proven really beneficial. Das had been awarded the Indian Red Cross State Award in 1999 and has urged the state government to take initiatives to start online classes or provide audio books to the visually-challenged students. | english |
Mr. India Movie Streaming Watch Online on Zee5. A poor but big-hearted man takes orphans into his home. After discovering his scientist father's invisibility device, he rises to the occasion and fights to save his children and all of India from the clutches of a megalomaniac.
| english |
Pooja Bhatt is ready with her first draft of her next directorial Jism 3, which will be the third installment of the erotic thriller franchise.
Pooja Bhatt is ready with her first draft of her next directorial Jism 3, which will be the third installment of the erotic thriller franchise and she promises us that it will be bolder, hotter and more erotic than even Jism 2 which starred Sunny Leone and Randeep Hooda. It’s not a love triangle or a ménage-e-trois but something much bolder – a love quadrangle revolving between three men and a woman! While the woman and two men will be known faces, the third man will be a newcomer she plans to launch.
A top actress will feature as the lead, Pooja tells us. “You will certainly see a known face, but keeping true to the tradition of Jism - we will launch one new face, like we did with John and Sunny in part one and two respectively. I will direct it. Jism is what it is because of my feminine gaze... And I believe strongly that my female audiences deserve eye candy as much as my male audiences do! I have shortlisted two of my four protagonists. I also have a fair idea of who I want to approach as the female lead but don't want to talk about it until I had a final draft of script. I want the story and screenplay to sell itself as I didn't want the Jism as a brand to supersede that."
With a career spanning over two decades, Upala is one of the most respected entertainment journalists. She has thousands of newsbreaks and remarkable interviews to her credit, and presently freelances for Mid-Day.
| english |
<filename>files/json/reply_20100901_0154_radiance-general_007245.json
{"body": "One more thing:\nIf you have a single surface under the sky, its SVF can easily be calculated as: SVF=(1+cos(a))/2 where a is the tilt angle of the surface (a=0 for a horizontal surface; a=90 for a vertical surface; a=180 for an horizontal surface oriented towards the ground)\n\n\nYou can then check your radiance calculations by comparing your results with this formula.\nFor instance by printing a graph like this:\n\n\nbgraph | x11meta\nAdata=!\"cnt 181 | rcalc -e '$1=0;$2=0;$3=0;a=$1*PI/180;$4=sin(a);$5=0;$6=cos(a)' | rtrace -h -w -I -aa 0 -ab 1 s.oct | rcalc -e '$1=recno;$2=$1'\"\nBdata=!\"cnt 181 | rcalc -e 'a=$1*PI/180;$1=recno;$2=(1+cos(a))/2'\"\nxlabel=tilt\nylabel=SVF\n\n\nYou should see that the two curves totally overlap!\n\n\nRapha\u00ebl\n___\n<sup>Automatically generated content from [radiance mailing-list](https://radiance-online.org/pipermail/radiance-general/2010-September/007245.html).</sup>", "attachments": [], "created_by_name": "<NAME>\u00ebl", "created_at": "September 01, 2010 at 01:54AM", "created_by": "Compagnon_Rapha\u00ebl", "parent_id": "radiance-general_007241", "id": "radiance-general_007245"} | json |
#ifndef EXPRAST_H
#define EXPRAST_H
#include <memory>
#include <string>
#include <vector>
#include "llvm/IR/Value.h"
#include "../code_gen_context.hpp"
/// ExprAST - Base class for all expression nodes.
class ExprAST
{
public:
virtual ~ExprAST() = default;
virtual llvm::Value *codegen(CodeGenContext &) = 0;
};
#endif | cpp |
<gh_stars>1-10
use crate::Error;
use crate::common::{MacAddress, Vlan, MAC_LENGTH};
use arrayref::array_ref;
use byteorder::{BigEndian as BE, WriteBytesExt};
use log::*;
use nom::*;
use std::mem::size_of;
use std::io::{Cursor, Write};
const ETHERNET_PAYLOAD: u16 = 1500u16;
///
/// List of valid ethernet types that aren't payload or vlan. https://en.wikipedia.org/wiki/EtherType
///
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum Layer3Id {
Lldp,
IPv4,
IPv6,
Arp,
}
impl Layer3Id {
pub fn value(&self) -> u16 {
match self {
Layer3Id::Lldp => 0x88ccu16,
Layer3Id::IPv4 => 0x0800u16,
Layer3Id::IPv6 => 0x86ddu16,
Layer3Id::Arp => 0x0806u16,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum VlanTypeId {
VlanTagId,
ProviderBridging,
}
impl VlanTypeId {
pub fn value(&self) -> u16 {
match self {
VlanTypeId::VlanTagId => 0x8100u16,
VlanTypeId::ProviderBridging => 0x88a8u16
}
}
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EthernetTypeId {
PayloadLength(u16),
Vlan(VlanTypeId),
L3(Layer3Id),
}
impl EthernetTypeId {
fn new(vlan: u16) -> Option<EthernetTypeId> {
match vlan {
0x8100u16 => Some(EthernetTypeId::Vlan(VlanTypeId::VlanTagId)),
0x88a8u16 => Some(EthernetTypeId::Vlan(VlanTypeId::ProviderBridging)),
0x88ccu16 => Some(EthernetTypeId::L3(Layer3Id::Lldp)),
0x0800u16 => Some(EthernetTypeId::L3(Layer3Id::IPv4)),
0x86ddu16 => Some(EthernetTypeId::L3(Layer3Id::IPv6)),
0x0806u16 => Some(EthernetTypeId::L3(Layer3Id::Arp)),
x if x <= ETHERNET_PAYLOAD => Some(EthernetTypeId::PayloadLength(x)),
_ => {
//TODO: change to warn once list is more complete
debug!("Encountered {:02x} when parsing Ethernet type", vlan);
None
}
}
}
fn value(&self) -> u16 {
match self {
EthernetTypeId::PayloadLength(v) => *v,
EthernetTypeId::Vlan(v) => v.value(),
EthernetTypeId::L3(v) => v.value(),
}
}
}
#[allow(unused)]
#[derive(Clone, Copy, Debug)]
pub struct VlanTag {
pub vlan_type: VlanTypeId,
pub vlan_value: u16,
pub prio: u8,
pub dei: u8,
pub id: u16,
}
impl VlanTag {
pub fn vlan(&self) -> u16 {
self.id
}
}
#[derive(Clone, Debug)]
pub struct Ethernet<'a> {
pub dst_mac: MacAddress,
pub src_mac: MacAddress,
pub ether_type: EthernetTypeId,
pub vlans: std::vec::Vec<VlanTag>,
pub payload: &'a [u8],
}
fn to_mac_address(i: &[u8]) -> MacAddress {
MacAddress(array_ref![i, 0, MAC_LENGTH].clone())
}
named!(mac_address<&[u8], MacAddress>, map!(take!(MAC_LENGTH), to_mac_address));
impl<'a> Ethernet<'a> {
pub fn as_bytes(&self) -> Vec<u8> {
let vlans_size = self.vlans.len() * (size_of::<u16>() * 2);
let inner = Vec::with_capacity(
MAC_LENGTH * 2
+ size_of::<u16>()
+ vlans_size
);
let mut writer = Cursor::new(inner);
writer.write(&self.dst_mac.0).unwrap();
writer.write(&self.src_mac.0).unwrap();
for vlan in &self.vlans {
writer.write_u16::<BE>(vlan.vlan_type.value()).unwrap();
writer.write_u16::<BE>(vlan.vlan_value).unwrap();
}
writer.write_u16::<BE>(self.ether_type.value()).unwrap();
writer.write(self.payload).unwrap();
writer.into_inner()
}
pub fn vlans_to_vlan(vlans: &std::vec::Vec<VlanTag>) -> Vlan {
let opt_vlan = vlans.first().map(|v| v.vlan());
opt_vlan.unwrap_or(0)
}
pub fn vlan(&self) -> Vlan {
Ethernet::vlans_to_vlan(&self.vlans)
}
fn parse_not_vlan_tag<'b>(
input: &'b [u8],
dst_mac: MacAddress,
src_mac: MacAddress,
ether_type: EthernetTypeId,
agg: std::vec::Vec<VlanTag>,
) -> nom::IResult<&'b [u8], Ethernet<'b>> {
do_parse!(
input,
payload: rest
>> (Ethernet {
dst_mac: dst_mac,
src_mac: src_mac,
ether_type: ether_type,
vlans: agg,
payload: payload.into()
})
)
}
fn parse_vlan_tag<'b>(
input: &'b [u8],
dst_mac: MacAddress,
src_mac: MacAddress,
agg: std::vec::Vec<VlanTag>,
) -> nom::IResult<&'b [u8], Ethernet<'b>> {
let (input, vlan) =
do_parse!(input, vlan: map_opt!(be_u16, EthernetTypeId::new) >> (vlan))?;
if let EthernetTypeId::Vlan(vlan_type_id) = vlan {
let (input, (value, prio, dei, id)) = do_parse!(
input,
total: be_u16
>> ((
total,
(total & 0x7000) as u8,
(total & 0x8000) as u8,
total & 0x0FFF
))
)?;
let tag = VlanTag {
vlan_type: vlan_type_id,
vlan_value: value,
prio: prio,
dei: dei,
id: id,
};
debug!("Encountered vlan {:012b}", tag.vlan());
let mut agg = agg;
agg.push(tag);
Ethernet::parse_vlan_tag(input, dst_mac, src_mac, agg)
} else {
debug!("Encountered non vlan {:?}", vlan);
Ethernet::parse_not_vlan_tag(input, dst_mac, src_mac, vlan, agg)
}
}
pub fn parse<'b>(input: &'b [u8]) -> Result<(&'b [u8], Ethernet), Error> {
trace!("Available={}", input.len());
let r = do_parse!(
input,
dst_mac: mac_address >> src_mac: mac_address >> ((dst_mac, src_mac))
);
r.and_then(|res| {
let (rem, (dst_mac, src_mac)) = res;
Ethernet::parse_vlan_tag(rem, dst_mac, src_mac, vec![])
}).map_err(Error::from)
}
}
#[cfg(test)]
pub mod tests {
use super::*;
pub const PAYLOAD_RAW_DATA: &'static [u8] = &[
0x01u8, 0x02u8, 0x03u8, 0x04u8, 0x05u8, 0x06u8, //dst mac 01:02:03:04:05:06
0xFFu8, 0xFEu8, 0xFDu8, 0xFCu8, 0xFBu8, 0xFAu8, //src mac FF:FE:FD:FC:FB:FA
0x00u8, 0x04u8, //payload ethernet
//payload
0x01u8, 0x02u8, 0x03u8, 0x04u8,
];
pub const TCP_RAW_DATA: &'static [u8] = &[
0x01u8, 0x02u8, 0x03u8, 0x04u8, 0x05u8, 0x06u8, //dst mac 01:02:03:04:05:06
0xFFu8, 0xFEu8, 0xFDu8, 0xFCu8, 0xFBu8, 0xFAu8, //src mac FF:FE:FD:FC:FB:FA
0x08u8, 0x00u8, //ipv4
//ipv4
0x45u8, //version and header length
0x00u8, //tos
0x00u8, 0x48u8, //length, 20 bytes for header, 52 bytes for ethernet
0x00u8, 0x00u8, //id
0x00u8, 0x00u8, //flags
0x64u8, //ttl
0x06u8, //protocol, tcp
0x00u8, 0x00u8, //checksum
0x01u8, 0x02u8, 0x03u8, 0x04u8, //src ip 1.2.3.4
0x0Au8, 0x0Bu8, 0x0Cu8, 0x0Du8, //dst ip 10.11.12.13
//tcp
0xC6u8, 0xB7u8, //src port, 50871
0x00u8, 0x50u8, //dst port, 80
0x00u8, 0x00u8, 0x00u8, 0x01u8, //sequence number, 1
0x00u8, 0x00u8, 0x00u8, 0x02u8, //acknowledgement number, 2
0x50u8, 0x00u8, //header and flags, 0
0x00u8, 0x00u8, //window
0x00u8, 0x00u8, //check
0x00u8, 0x00u8, //urgent
//no options
//payload
0x01u8, 0x02u8, 0x03u8, 0x04u8, 0x00u8, 0x00u8, 0x00u8, 0x00u8, 0x00u8, 0x00u8, 0x00u8,
0x00u8, 0x00u8, 0x00u8, 0x00u8, 0x00u8, 0x00u8, 0x00u8, 0x00u8, 0x00u8, 0x00u8, 0x00u8,
0x00u8, 0x00u8, 0x00u8, 0x00u8, 0x00u8, 0x00u8, 0xfcu8, 0xfdu8, 0xfeu8,
0xffu8, //payload, 8 words
];
#[test]
fn parse_ethernet_payload() {
let _ = env_logger::try_init();
let (rem, l2) = Ethernet::parse(PAYLOAD_RAW_DATA).expect("Could not parse");
assert!(rem.is_empty());
assert_eq!(
l2.dst_mac.0,
[0x01u8, 0x02u8, 0x03u8, 0x04u8, 0x05u8, 0x06u8]
);
assert_eq!(
l2.src_mac.0,
[0xFFu8, 0xFEu8, 0xFDu8, 0xFCu8, 0xFBu8, 0xFAu8]
);
assert!(l2.vlans.is_empty());
let proto_correct = if let EthernetTypeId::PayloadLength(_) = l2.ether_type {
true
} else {
false
};
assert!(proto_correct);
assert_eq!(l2.as_bytes().as_slice(), PAYLOAD_RAW_DATA);
}
#[test]
fn parse_ethernet_tcp() {
let _ = env_logger::try_init();
let (rem, l2) = Ethernet::parse(TCP_RAW_DATA).expect("Could not parse");
assert!(rem.is_empty());
assert_eq!(
l2.dst_mac.0,
[0x01u8, 0x02u8, 0x03u8, 0x04u8, 0x05u8, 0x06u8]
);
assert_eq!(
l2.src_mac.0,
[0xFFu8, 0xFEu8, 0xFDu8, 0xFCu8, 0xFBu8, 0xFAu8]
);
assert!(l2.vlans.is_empty());
let proto_correct = if let EthernetTypeId::L3(Layer3Id::IPv4) = l2.ether_type {
true
} else {
false
};
assert!(proto_correct);
assert_eq!(l2.as_bytes().as_slice(), TCP_RAW_DATA);
}
#[test]
fn test_single_vlan() {
//TODO
}
#[test]
fn test_multiple_vlans() {
//TODO
}
}
| rust |
<reponame>mark-summerfield/ddiff
{
"authors": [
"<NAME>"
],
"copyright": "Copyright © 2020 <NAME>. All rights reserved.",
"dependencies": {
"aaset": "~>0.2.2"
},
"description": "A D implementation of Python's difflib sequence matcher",
"homepage": "https://github.com/mark-summerfield/ddiff",
"license": "Apache-2.0",
"name": "ddiff",
"targetType": "library"
}
| json |
<reponame>Gantios/Specs
{
"name": "UIViewAnimation",
"version": "1.0.0",
"summary": "Animation extension for UIView.",
"description": "It is a animation extension for UIView.",
"homepage": "https://github.com/venwu1984/UIViewAnimation",
"license": "MIT",
"authors": {
"ven.wu": "<EMAIL>"
},
"platforms": {
"ios": "9.0"
},
"source": {
"git": "https://github.com/venwu1984/UIViewAnimation.git",
"tag": "1.0.0"
},
"requires_arc": true,
"source_files": "Classes/*.{swift}",
"swift_version": "4.2"
}
| json |
<filename>plugins/auth-proxy/github/github-auth.controller.ts<gh_stars>1-10
/* eslint-disable @typescript-eslint/camelcase */
import {
Controller,
Scope,
Get,
Inject,
Redirect,
Req,
Query,
HttpException,
HttpStatus,
Res,
} from '@nestjs/common';
import { AuthProxyConfig } from '../auth-proxy-config.interface';
import { _ } from 'lodash';
import { Request, Response } from 'express';
import { default as fetch } from 'node-fetch';
import { sign } from 'jsonwebtoken';
import {
NOREST_AUTH_CONFIG_TOKEN,
DEFAULT_CONFIG,
AuthConfig,
} from '@norest/nestjs';
@Controller({
scope: Scope.DEFAULT,
path: 'github',
})
export class GitHubAuthController {
constructor(
@Inject('PLUGIN_AUTH_PROXY_CONFIG_TOKEN') private config: AuthProxyConfig,
@Inject(NOREST_AUTH_CONFIG_TOKEN)
protected authConfig: AuthConfig = DEFAULT_CONFIG.auth,
) {}
@Get('login')
@Redirect('https://github.com/login/oauth/authorize', 302)
login(@Req() req: Request) {
const url = new URL('https://github.com/login/oauth/authorize');
const redirectUrl = `${req.protocol}://${req.get('host')}/github/auth`;
_.forEach(this.config.github, (value, key) => {
if (value && !['client_secret', 'redirect_uri'].includes(key)) {
url.searchParams.append(key, value);
}
});
url.searchParams.append('redirect_uri', redirectUrl);
return { url: url.toString() };
}
@Get('auth')
async auth(
@Res({ passthrough: true }) response: Response,
@Query('state') toProveState,
@Query('code') code,
) {
if (this.config.github.state !== toProveState) {
throw new HttpException(
'Invalid state parameter',
HttpStatus.BAD_REQUEST,
);
}
const {
client_secret,
client_id,
redirect_uri,
state,
} = this.config.github;
const data = {
client_secret,
client_id,
redirect_uri,
state,
code,
};
const result = await fetch('https://github.com/login/oauth/access_token', {
method: 'POST',
headers: {
accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
});
const accessResponse = await result.json();
if (accessResponse.error) {
throw new HttpException(
accessResponse.error_description,
HttpStatus.BAD_REQUEST,
);
}
const sub = await this.getUserName(accessResponse);
const signedJwt = sign(
{ ...accessResponse, sub },
this.authConfig.jwt.secretOrPrivateKey,
this.authConfig.jwt.options,
);
response.cookie(this.authConfig.cookieName, signedJwt, {
httpOnly: true,
});
return { message: `${sub} successful logged in.`, status: 200 };
}
@Get('logout')
logout(@Res({ passthrough: true }) response: Response) {
response.clearCookie(this.authConfig.cookieName, {
httpOnly: true,
});
return { message: `Successful logged out.`, status: 200 };
}
async getUserName(accessResponse: any) {
const result = await fetch('https://api.github.com/user', {
method: 'GET',
headers: {
Accept: 'application/vnd.github.v3+json',
Authorization: `Bearer ${accessResponse.access_token}`,
},
});
const userEntity = await result.json();
return userEntity.login;
}
}
| typescript |
World champions France were eliminated from Euro 2020 following their shock defeat in the penalty shootout against Switzerland in the last-16 of the competition. The Swiss side turned in a courageous display against the tournament favourites to set up a mouth-watering tie against 2012 European champions Spain in the quarter-finals.
Vladimir Petkovic's men made a stunning start to the game as Haris Seferovic gave his side an early lead. Steven Zuber, who starred in Switzerland's 3-1 victory over Turkey, delivered a beautiful cross into the box which was headed home by the Benfica forward.
Adrien Rabiot came close to grabbing an equalizer for France but his long-range strike fizzed just wide of the post. The world champions went into half time trailing by a goal.
Switzerland were presented with a glorious opportunity to double their advantage as they were awarded a penalty for a foul on Steven Zuber inside the penalty area. Ricardo Rodriguez stepped up but was denied by a spectacular save from Hugo Lloris.
Petkovic's men were then made to rue the missed penalty as Karim Benzema scored twice inside two minutes to give his side the lead. Paul Pogba then scored a splendid long-range goal to give his side a two-goal cushion.
Haris Seferovic scored his second goal of the game in the 81st-minute to give his side a lifeline. The striker headed home from close range from Kevin Mbabu's cross to bring the game back to life. Mario Gavranovic then went on to score a spectacular goal in the 90th-minute to bring his side level.
Kingsley Coman also came mightily close to sealing the win for France with almost the last kick of the game as he struck the crossbar with a very good effort. The game went into extra time with a 3-3 scoreline.
Benjamin Pavard was presented with the best goalscoring opportunity in the first half of extra time but his effort was kept out by a brilliant save from Yann Sommer. Kylian Mbappe also squandered a glorious opportunity to put his side into the lead as he blasted the ball into the side netting from a promising position.
The game remained level after extra time and was forced into a penalty shootout. Switzerland won 5-4 on penalties following a decisive miss from the spot by Kylian Mbappe.
| english |
<reponame>g0v/amis-moedict<gh_stars>1-10
{"h":[{"d":[{"e":["`O~ `tiposan~ `ca~ `ka~`tadasienaw~, `pata'ediphan~ `to~ `cecay~ `ko~ `riko'~, `ma~`edengay~ `to~.冬天不太冷,把衣服特地添加一件就足夠了。"],"f":"特地把…添加、重疊、覆蓋。"}]}],"stem":"ta'edip","t":"pata'ediphan"} | json |
<reponame>Mrthomas20121-Mods/Rechiseled-Ecosphere<filename>src/main/resources/assets/rechiseled_compat/models/item/betterendforge_jellyshroom_planks_diagonal_stripes_connecting.json
{
"parent": "rechiseled_compat:block/betterendforge_jellyshroom_planks_diagonal_stripes_connecting"
} | json |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.