text
stringlengths
1
1.04M
language
stringclasses
25 values
{ com.badlogic.gdx.graphics.g2d.BitmapFont: { default-font1: { file: com/badlogic/gdx/utils/arial-15.fnt } }, com.badlogic.gdx.graphics.Color: { white: { a: 1, b: 1, g: 1, r: 1 }, black: { a: 1, b: 0, g: 0, r: 0 } }, com.badlogic.gdx.scenes.scene2d.ui.Label$LabelStyle: { default: { font: default-font, fontColor: white } }, }
json
{"_id":"brewery_EndeHouse_Brewery_and_Restaurant","name":"EndeHouse Brewery and Restaurant","address":[],"city":"Reedsburg","state":"Wisconsin","country":"United States","geo":{"loc":["-90.0026","43.5325"],"accuracy":"APPROXIMATE"},"updated":"2010-07-22 20:00:20"}
json
New Delhi: On Wednesday, BJP’s Unnao MP Sachchidanand Hari Sakshi alias Sakshi Maharaj met rape accused party MLA Kuldeep Singh Sengar at the Sitapur district jail to “thank” him after the general election. Sengar, a four-time MLA, is lodged in the jail for allegedly raping a woman who had visited him for a job on June 4, 2017. Jail superintendent D. C. Mishra said the meeting lasted about two minutes. He said the MP enquired about Sengar when he was about to leave after spending half an hour with him. “He said he would thank the MLA. He thanked him and then left. It lasted barely two minutes,” the jail superintendent stated. Mishra told the PTI that as Sakshi Maharaj was an MP, he was “accorded the protocol”. “Today is Eid and World Environment Day. He sat for some time and discussed what is being done in jail. He was told about various horticulture works undertaken in the jail,” he told the PTI. The Unnao MP also planted a sapling in the jail. Sakshi Maharaj’s victory margin in Unnao in the 2019 elections – at 4. 09 lakh – was second only to Narendra Modi’s from Varanasi. This is not the first time the BJP leader has openly voiced his support to a rape accused. In August 2017, he said that the woman who accused Dera Sacha Sauda chief Gurmeet Ram Raheem Singh should not be believed. “Who is right? Crores of people who see god in Ram Rahim or that girl who filed a complaint? Accusing a noble soul like Ram Rahim,” Sakshi Maharaj said after Singh was convicted. The Hindutva leader has also made inflammatory and communal remarks on multiple occasions. In November 2018, for instance, he said that the Jama Masjid in Delhi should be demolished as he was sure that there used to be a temple in its place. “When I came to politics, my first statement was in Mathura: ‘Leave Ayodhya, Mathura and Kashi aside, and demolish Jama Masjid in Delhi and if idols are not found below the staircase, then I should be hanged’. I still stand by this statement,” he said. After the murder of Mohammad Akhlaq in Dadri over rumours that his family was consuming beef, the leader had said Hindus were ready to kill to protect cows from slaughter. “We won’t remain silent if somebody tries to kill our mother. We are ready to kill and get killed,” he had said. (With PTI inputs)
english
import { safeParseInt } from '../../util/parse'; type LevelPickerProps = { label: string, level: number, min: number, max: number, onChange: (level: number) => any } export default function LevelPicker({label, level, min, max, onChange}: LevelPickerProps) { return ( <label> <span>{label}</span> <input type="number" min={min} max={max} step="1" value={level} onChange={(e) => onChange(safeParseInt(e.target.value, {min, max}))} /> </label> ); }
typescript
A popular website had an understanding with a film production company. This particular site resorts to blackmailing and keeps the film people on tenterhooks. Now the understanding is that the production company will supply all the information regarding other movies and their production banners which is the latest and in turn, the journalist of this website shouldn’t write anything negative about them. It is a good bargain actually. In case someone from their own company does something that is not in tune with the banner’s thinking, a negative information will be let out to this website. Any guesses which this site and the production company is?
english
import java.util.Scanner; class Footballer extends Man { String position; int pace; int dribbling; int shooting; int defending; int passing; int physical; Footballer() { super("", "", "", 0, 0); } Footballer(String firstName, String lastName, String birthdayDate, int height, int weight) { super(firstName, lastName, birthdayDate, height, weight); this.pace = pace; this.dribbling = dribbling; this.shooting = shooting; this.defending = defending; this.passing = passing; this.physical = physical; this.position = position; } public int getPace() { return pace; } public void setPace(int pace) { this.pace = pace; } public int getDribbling() { return dribbling; } public void setDribbling(int dribbling) { this.dribbling = dribbling; } public int getShooting() { return shooting; } public void setShooting(int shooting) { this.shooting = shooting; } public int getDefending() { return defending; } public void setDefending(int defending) { this.defending = defending; } public int getPassing() { return passing; } public void setPassing(int passing) { this.passing = passing; } public int getPhysical() { return physical; } public void setPhysical(int physical) { this.physical = physical; } public String getPosition() { return position; } public void setPosition(String position) { this.position = position; } void fillInformation(){ Scanner scanner = new Scanner(System.in); System.out.println("Enter the First Name : "); this.firstName = scanner.nextLine(); System.out.println("Enter the Last Name : "); this.lastName = scanner.nextLine(); System.out.println("Enter the Birthday Date : "); this.birthdayDate = scanner.nextLine(); System.out.println("Enter the weight : "); this.weight = scanner.nextInt(); System.out.println("Enter the Height : "); this.height = scanner.nextInt(); scanner.nextLine(); System.out.println("Enter the Position : "); this.position = scanner.nextLine(); System.out.println("Enter the Pace : "); this.pace = scanner.nextInt(); System.out.println("Enter the Dribbling :"); this.dribbling = scanner.nextInt(); System.out.println("Enter the Shooting"); this.shooting = scanner.nextInt(); System.out.println("Enter the Defending : "); this.defending = scanner.nextInt(); System.out.println("Enter the Passing : "); this.passing = scanner.nextInt(); System.out.println("Enter the physical : "); this.physical = scanner.nextInt(); } void displayInformation(){ System.out.println("First name : " + getFirstName()); System.out.println("Last name : " + getLastName()); System.out.println("Birthday Date : " + getBirthdayDate()); System.out.println("Height : " + getHeight()); System.out.println("Weight : " + getWeight()); System.out.println("Position : " + getPosition()); System.out.println("Pace : " + getPace()); System.out.println("Dribbling : " + getDribbling()); System.out.println("Shooting : " + getShooting()); System.out.println("Defending : " + getDefending()); System.out.println("Passing : " + getPassing()); System.out.println("Physical : " + getPhysical()); } }
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /*! * Copyright (c) 2016 by Contributors * \file elemwise_binary_scalar_op.cc * \brief CPU Implementation of unary function. */ #include "./elemwise_unary_op.h" #include "./elemwise_binary_op.h" #include "./elemwise_binary_scalar_op.h" namespace mxnet { namespace op { MXNET_OPERATOR_REGISTER_BINARY_SCALAR(_maximum_scalar) .set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Compute<cpu, mshadow_op::maximum>) .set_attr<nnvm::FGradient>("FGradient", ElemwiseGradUseIn{"_backward_maximum_scalar"}) .add_alias("_MaximumScalar"); MXNET_OPERATOR_REGISTER_BINARY(_backward_maximum_scalar) .add_argument("scalar", "float", "scalar value") .set_attr_parser([](NodeAttrs *attrs) { attrs->parsed = std::stod(attrs->dict["scalar"]); }) .set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Backward<cpu, mshadow_op::ge>); MXNET_OPERATOR_REGISTER_BINARY_SCALAR(_minimum_scalar) .set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Compute<cpu, mshadow_op::minimum>) .set_attr<nnvm::FGradient>("FGradient", ElemwiseGradUseIn{"_backward_minimum_scalar"}) .add_alias("_MinimumScalar"); MXNET_OPERATOR_REGISTER_BINARY(_backward_minimum_scalar) .add_argument("scalar", "float", "scalar value") .set_attr_parser([](NodeAttrs *attrs) { attrs->parsed = std::stod(attrs->dict["scalar"]); }) .set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Backward<cpu, mshadow_op::le>); MXNET_OPERATOR_REGISTER_BINARY_SCALAR(_power_scalar) .set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Compute<cpu, mshadow_op::power>) .set_attr<nnvm::FGradient>("FGradient", ElemwiseGradUseIn{"_backward_power_scalar"}) .add_alias("_PowerScalar"); MXNET_OPERATOR_REGISTER_BINARY(_backward_power_scalar) .add_argument("scalar", "float", "scalar value") .set_attr_parser([](NodeAttrs *attrs) { attrs->parsed = std::stod(attrs->dict["scalar"]); }) .set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Backward< cpu, mshadow_op::power_grad>); MXNET_OPERATOR_REGISTER_BINARY_SCALAR(_rpower_scalar) .set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Compute< cpu, mshadow_op::rpower>) .set_attr<nnvm::FGradient>("FGradient", ElemwiseGradUseOut{"_backward_rpower_scalar"}) .add_alias("_RPowerScalar"); MXNET_OPERATOR_REGISTER_BINARY(_backward_rpower_scalar) .add_argument("scalar", "float", "scalar value") .set_attr_parser([](NodeAttrs *attrs) { attrs->parsed = std::stod(attrs->dict["scalar"]); }) .set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Backward< cpu, mshadow_op::rpower_grad>); MXNET_OPERATOR_REGISTER_BINARY_SCALAR(_hypot_scalar) .set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Compute< cpu, mshadow_op::hypot>) .set_attr<nnvm::FGradient>("FGradient", ElemwiseGradUseIn{ "_backward_hypot_scalar" }) .add_alias("_HypotScalar"); MXNET_OPERATOR_REGISTER_BINARY(_backward_hypot_scalar) .add_argument("scalar", "float", "scalar value") .set_attr_parser([](NodeAttrs *attrs) { attrs->parsed = std::stod(attrs->dict["scalar"]); }) .set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Backward< cpu, mshadow_op::hypot_grad_left>); MXNET_OPERATOR_REGISTER_BINARY_SCALAR(smooth_l1) .describe(R"code(Calculate Smooth L1 Loss(lhs, scalar) by summing .. math:: f(x) = \begin{cases} (\sigma x)^2/2,& \text{if }x < 1/\sigma^2\\ |x|-0.5/\sigma^2,& \text{otherwise} \end{cases} where :math:`x` is an element of the tensor *lhs* and :math:`\sigma` is the scalar. Example:: smooth_l1([1, 2, 3, 4], sigma=1) = [0.5, 1.5, 2.5, 3.5] )code" ADD_FILELINE) .set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Compute< cpu, mshadow_op::smooth_l1_loss>) .set_attr<nnvm::FGradient>("FGradient", ElemwiseGradUseIn{ "_backward_smooth_l1" }); MXNET_OPERATOR_REGISTER_BINARY(_backward_smooth_l1) .set_attr_parser([](NodeAttrs *attrs) { attrs->parsed = std::stod(attrs->dict["scalar"]); }) .set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Backward< cpu, mshadow_op::smooth_l1_gradient>); } // namespace op } // namespace mxnet
cpp
U. S. Secret Service officials on Friday arrested an Arizona Home Depot employee accused of replacing nearly $400,000 worth of cash with counterfeit bills. Agents arrested Adrian Jean Pineda after he allegedly counted and sealed genuine cash into bags for transfer and deposit at a Wells Fargo bank before replacing it with his own counterfeit cash between January 2018 and January 2022, according to the Secret Service. "The Secret Service was originally formed in 1865 to enforce federal laws against counterfeiting," U. S. Secret Service Phoenix Field Office Special Agent in Charge Frank Boudreaux Jr. said in a Friday statement. "This case illustrates the continued commitment of the Secret Service and the US Attorney’s Office to investigating and prosecuting counterfeit violations. " He added that Pineda's "arrest and search warrant operation marked the culmination of a strategic investigation enacted by Phoenix special agents, Home Depot security personnel and Wells Fargo Bank. " Pineda was a vault associate at the home supplies retailer, meaning he was in charge of preparing cash for deposits. The Home Depot recorded $387,500 in losses as a result of Pineda's scheme. During his Jan. 31 arrest, Secret Service agents also seized $5,000 in counterfeit currency and recovered $5,300 in genuine currency. They also discovered $22,000 in genuine currency while executing on a search warrant at Pineda's home. Pineda is set to appear in district court on Feb. 7.
english
Chetan Sharma, the head selector for India, stated on Monday, October 31, that he has not discussed the future of senior players in T20 International cricket with Rohit Sharma, Virat Kohli, Bhuvneshwar Kumar, and R Ashwin after the T20 World Cup in 2022, adding that the selectors are always willing to choose players with experience as long as they are producing consistently. The current T20 World Cup in Australia features players like Rohit and Kohli, but the next tournament will take place in the USA and the West Indies in 2024. While Rohit Sharma and Virat Kohli haven’t shown any symptoms of slowing down, it’s unclear how India would approach the 2024 T20 World Cup’s shortest format of the game. While Kohli, 33, recently ended a dry spell to regain form for the World Cup in Australia, Rohit, 35, is now leading India in all formats of the game. Chetan Sharma told the media in a virtual press conference on Monday that the players themselves should approach the management and selectors if they have any concerns about their futures and that he wouldn’t discuss anything during the T20 World Cup. This was in response to the announcement of India’s squads for the upcoming tours to New Zealand and Bangladesh. “In the middle of the tournament, how do you expect the chairman of selectors to speak to somebody? I shouldn’t be speaking to anyone (about their future) in the middle of the tournament. They are such big players, if they are getting to understand something, they themselves will come and talk to us,” Sharma said. “The players you mentioned, if they are part of the team, the youngsters will get to learn a lot from them. I can see how the youngsters are getting to learn and train from these big players. They ask the likes of Virat Kohli and Rohit Sharma how to handle certain situations, how to prepare. “So, in the middle of the tournament, I can’t talk to them about these things,” he added. Any selection committee, according to Chetan Sharma, would adore having players with experience in the team, particularly in the T20I format. “The doors of cricket will never be closed to anyone. Age is just a number if you are competing. If you are good enough to perform and get runs, selectors are more than happy to pick experienced players,” he added. Starting on November 18, India’s T20I series against New Zealand will be captained by Hardik Pandya. Rishabh Pant has been selected as Hardik’s backup while Rohit Sharma, Virat Kohli, and KL Rahul have been rested. Dinesh Karthik will still be taken into consideration for selection in T20 International matches even after the T20 World Cup, according to Chetan Sharma. Even though India nominated three wicketkeepers, including Pant, Ishan Kishan, and Sanju Samson, the seasoned wicketkeeper was not included in the T20I team for the New Zealand tour.
english
<reponame>djengo16/Java.Pu package fmi.informatics.comparators; import java.util.Comparator; import javax.swing.SortOrder; import fmi.informatics.extending.Person; public abstract class PersonComparator implements Comparator<Person> { protected int sortOrder = 1; // Стойност по подразбиране, сортиране по възходящ ред public void setSortOrder(SortOrder order) { if (order.equals(SortOrder.DESCENDING)) { this.sortOrder = -1; } else { this.sortOrder = 1; } } }
java
Hyderabad, Dec 12 (INN): Last date for submission of Online Haj Applications is extended from December 12 to December 19 and the aspiring applicants have been requested to avail the elaborate arrangements made by the Telangana State Haj Committee for filing the Haj Applications, announced Prof. S. A. Shukoor, Special Officer, State Haj Committee, said in a Press Release today. He said that the facility at Haj Committee would be available on all working days between 10:30 AM and 5:00 PM and the applicants should use this opportunity. He further said that the Haj Applicants should possess valid International Passport issued on or before 19th December 2018 and valid till 31st January 2020. The applicants should submit the hard copy of the application in the office of the State Haj Committee so that the cover number is generated, he said.
english
{ "vorgangId": "158344", "VORGANG": { "WAHLPERIODE": "11", "VORGANGSTYP": "Kleine Anfrage", "TITEL": "Unfall eines britischen Militärlastzugs mit hochexplosiven Treibstoffen bei Bispingen im Landkreis Soltau-Fallingbostel am 24. Juni 1987 (G-SIG: 11000623)", "INITIATIVE": "Fraktion Die Grünen", "AKTUELLER_STAND": "Beantwortet", "SIGNATUR": "", "GESTA_ORDNUNGSNUMMER": "", "WICHTIGE_DRUCKSACHE": [ { "DRS_HERAUSGEBER": "BT", "DRS_NUMMER": "11/633", "DRS_TYP": "Kleine Anfrage", "DRS_LINK": "http://dipbt.bundestag.de:80/dip21/btd/11/006/1100633.pdf" }, { "DRS_HERAUSGEBER": "BT", "DRS_NUMMER": "11/737", "DRS_TYP": "Antwort", "DRS_LINK": "http://dipbt.bundestag.de:80/dip21/btd/11/007/1100737.pdf" } ], "EU_DOK_NR": "", "SACHGEBIET": [ "Umwelt", "Verkehr" ], "SCHLAGWORT": [ "Biotopschutz", "Bodenschutz", "Grundwasser", { "_fundstelle": "true", "__cdata": "Militärkraftfahrzeug" }, "Soltau-Fallingbostel, Kreis", "Straßenverkehr", "Treibstoff", "Umweltschutz" ], "ABSTRAKT": "Zulässigkeit des Transports mit verschiedenen explosiven Treibstoffen auf einem Militärlastzug und Vorschriften hierfür; Beseitigung des verseuchten Erdreichs, Schadensausmaß für das Sumpfgelände und Grundwasser; Erkenntnisse über ähnliche Erdreich- und Wasserverunreinigungen im Übungsraum des Soltau-Lüneburg-Abkommens und Kostenträger der Behebung; Maßnahmen zum Schutz der Bevölkerung und Umwelt " }, "VORGANGSABLAUF": { "VORGANGSPOSITION": [ { "ZUORDNUNG": "BT", "URHEBER": "Kleine Anfrage, Urheber : Fraktion Die Grünen ", "FUNDSTELLE": "22.07.1987 - BT-Drucksache 11/633", "FUNDSTELLE_LINK": "http://dipbt.bundestag.de:80/dip21/btd/11/006/1100633.pdf", "PERSOENLICHER_URHEBER": { "VORNAME": "Lieselotte", "NACHNAME": "Wollny", "FUNKTION": "MdB", "FRAKTION": "Die Grünen", "AKTIVITAETSART": "Kleine Anfrage" } }, { "ZUORDNUNG": "BT", "URHEBER": "Antwort, Urheber : Bundesregierung, Bundesministerium der Finanzen (federführend)", "FUNDSTELLE": "26.08.1987 - BT-Drucksache 11/737", "FUNDSTELLE_LINK": "http://dipbt.bundestag.de:80/dip21/btd/11/007/1100737.pdf" } ] } }
json
#!/usr/bin/env python3 ''' booksdatasource.py Interface by <NAME>, 21 September 2021 Code by <NAME>, <NAME> revised by <NAME> and <NAME>, 9 October 2021 For use in the "books" assignment at the beginning of Carleton's CS 257 Software Design class, Fall 2021. ''' from functools import cmp_to_key import csv class Author: def __init__(self, surname='', given_name='', birth_year=None, death_year=None): self.surname = surname self.given_name = given_name self.birth_year = birth_year self.death_year = death_year def __eq__(self, other): ''' For simplicity, we're going to assume that no two authors have the same name. ''' return self.surname == other.surname and self.given_name == other.given_name def compare_authors(author1, author2): '''compares two authors by surname, tiebreak by given name. ''' if author1.surname < author2.surname: return -1 elif author1.surname > author2.surname: return 1 elif author1.given_name < author2.given_name: return -1 elif author1.given_name > author2.given_name: return 1 else: return 0 class Book: def __init__(self, title='', publication_year=None, authors=[]): ''' Note that the self.authors instance variable is a list of references to Author objects. ''' self.title = title self.publication_year = publication_year self.authors = authors def __eq__(self, other): ''' We're going to make the excessively simplifying assumption that no two books have the same title, so "same title" is the same thing as "same book". ''' return self.title == other.title def compare_books_by_title(book1, book2): '''Compares two books in alphabetical order. ''' if book1.title < book2.title: return -1 elif book1.title > book2.title: return 1 else: return 0 def compare_books_by_year(book1, book2): '''Compares two books by publishing year, tiebreak by title. ''' if book1.publication_year < book2.publication_year: return -1 elif book1.publication_year > book2.publication_year: return 1 elif book1.title < book2.title: return -1 elif book1.title > book2.title: return 1 else: return 0 class BooksDataSource: def __init__(self, books_csv_file_name): ''' The books CSV file format looks like this: title,publication_year,author_description For example: <NAME>,2010,<NAME> (1945-) "<NAME>",1934,<NAME> (1881-1975) This __init__ method parses the specified CSV file and creates suitable instance variables for the BooksDataSource object containing a collection of Author objects and a collection of Book objects. ''' #list of Book objects read in from books_csv_file_name. self.book_list = [] file = open(books_csv_file_name) reader = csv.reader(file) for row in reader: title = row[0] publication_year = int(row[1]) authors = [] #parses all authors of a book into a list called author_info_list #each author's information is stored as a separate string element author_info_list = row[2].split(' and ') for author_info in author_info_list: #a list of info for one author info_list = author_info.split(' ') surname = info_list[-2] given_name = info_list[0] #splits author's lifetime into [birth year, death year] author_birth_death_years = info_list[-1].split('-') birth_year = int(author_birth_death_years[0][1:]) #store death_year if author is dead otherwise none if author_birth_death_years[1] != ')': death_year = int(author_birth_death_years[1][:-1]) else: death_year = None authors.append(Author(surname, given_name, birth_year, death_year)) book = Book(title, publication_year, authors) self.book_list.append(book) file.close() def authors(self, search_text=None): ''' Returns a list of all the Author objects in this data source whose names contain (case-insensitively) the search text. If no search_text is provided, then this method returns all of the Author objects. In either case, the returned list is sorted by surname, breaking ties using given name (e.g. <NAME>ontë comes before Charlotte Brontë). Note: the search string 'y S' would return '<NAME>', since the string overlaps between given name and surname. ''' #stores Author objects that match search_text matched_authors = [] #stores search_text in manipulatable string search_string = search_text #default setting, if no search_string provided if search_string is None: search_string = '' #dictionary to prevent duplicate Authors in matched_authors duplicate_author_dict = {} #iterates through author of every book, add author to matched_authors if matches search_string for book in self.book_list: for author in book.authors: #concatenate author's given name and surname full_name = author.given_name + ' ' + author.surname if search_string.lower() in full_name.lower(): #checks that full_name is not already in matched_authors if full_name not in duplicate_author_dict: matched_authors.append(author) duplicate_author_dict[full_name] = True #sort matched_authors alphabetically by surname using the built-in sort method and comparator in the Author class. matched_authors.sort(key=cmp_to_key(Author.compare_authors)) return matched_authors def books(self, search_text=None, sort_by='title'): ''' Returns a list of all the Book objects in this data source whose titles contain (case-insensitively) search_text. If search_text is None, then this method returns all of the books objects. The list of books is sorted in an order depending on the sort_by parameter: 'year' -- sorts by publication_year, breaking ties with (case-insenstive) title 'title' -- sorts by (case-insensitive) title default -- same as 'title' (that is, if sort_by is anything other than 'year' or 'title', just do the same thing you would do for 'title') ''' #stores Book objects whose title matchest search_text matched_books = [] #stores search_text in manipulatable string search_string = search_text #default setting, if no search_string provided if search_string is None: search_string = '' #iterates through every book, adds the book to matched_books if they title contains search_text. for book in self.book_list: if search_string.lower() in book.title.lower(): matched_books.append(book) #sort matched_books chronologically by publishing year if specified. if sort_by=='year': matched_books.sort(key=cmp_to_key(Book.compare_books_by_year)) #if 'year' is not specified,sort using default else: matched_books.sort(key=cmp_to_key(Book.compare_books_by_title)) return matched_books def books_between_years(self, start_year=None, end_year=None): ''' Returns a list of all the Book objects in this data source whose publication years are between start_year and end_year, inclusive. The list is sorted by publication year, breaking ties by title (e.g. Neverwhere 1996 should come before Thief of Time 1996). If start_year is None, then any book published before or during end_year should be included. If end_year is None, then any book published after or during start_year should be included. If both are None, then all books should be included. ''' #stores the matching Book objects matched_books = [] #if no years are specified if start_year is None and end_year is None: for book in self.book_list: matched_books.append(book) #if only an end year is given elif start_year is None: for book in self.book_list: if book.publication_year <= end_year: matched_books.append(book) #if only a start year is given elif end_year is None: for book in self.book_list: if book.publication_year >= start_year: matched_books.append(book) #otherwise, start and end year is both given else: for book in self.book_list: if book.publication_year >= start_year and book.publication_year <= end_year: matched_books.append(book) #sort matched_books chronologically by publishing year matched_books.sort(key=cmp_to_key(Book.compare_books_by_year)) return matched_books
python
Aravind Kejriwal's Aam Aadmi Party which is known for launching sharp jibes at rivals given an opportunity are on cloud nine after PM Modi refused to buy a mask from a stall at a fair. Aam Aadmi Party has used a video of PM Modi to send a message of use of face mask, a protocol by the Health Ministry to fight COVID-19. Interestingly, in the video PM Modi can be seen walking without a face mask and also refused to take one when a volunteer offers him. The video of the PM saying Mask Nahi Chaiye is being trolled and has gone viral. The Aap Twitter army is using this footage and putting out a post with the tagline saying, "wear a mask, don't be like Modiji. " PM Modi can be seen walking at a fair and as soon as he reaches a particular stall, a volunteer can be seen offering a mask to the PM which he refused to accept. As per the direction from Ministry of Health and Family Welfare, Government of India, wearing a mask, sanitizing hands frequently, maintaining distance are key guidelines issued to keep safe from Covid-19. In some places a person seen without a mask will be punished and will have to pay a penalty. In places like Bengaluru, the cops who may not have shown interest in solving a case or prevention of crime, but are very strict in terms of collecting fines for this offence of not wearing face mask.
english
# NOTE: override the kaolin one from .renderer.base import Renderer as DIBRenderer
python
import os import sys if sys.version_info[0] == 2: _ENCODE = sys.getfilesystemencoding() def path_join(*args): bin_args = map(lambda a: a.decode(_ENCODE), args) return os.path.join(*bin_args).encode(_ENCODE) def str_join(s, l): bin_args = map(lambda a: a.decode(_ENCODE), l) b = s.decode(_ENCODE) return b.join(bin_args).encode(_ENCODE) logfile_open = open else: path_join = os.path.join str_join = str.join def logfile_open(*args): return open(*args, errors='replace')
python
GUWAHATI, May 4: The Gauhati High Court, in association with the Assam State Commission for Protection of Child Rights & State Child Protection Society (Social Welfare Department) and supported by UNICEF office for Assam, will organize a two-day conclave on the Juvenile Justice (Care & Protection of Children) Act, 2015 with special focus on children in conflict with law at Assam Administrative Staff College on May 7 and 8. The conclave will mainly focus on different aspects of children in conflict with law, in the juvenile justice system of India and to dissemite the study on pendency of cases in JJBs in Assam and filize recommendations. The conclave will also share experience on psycho-social support interventions with children in conflict with the law and to orient on the new facets of the Juvenile Justice (care and protection of Children) Act, 2015. During the two-day deliberation, judges of the Gauhati High Court will be present and chair the technical sessions. Justice Madan B Lokur, Supreme Court of India, New Delhi will be the chief guest.
english
<filename>.cache/caches/gatsby-transformer-sharp/diskstore-9687a1a349c7bec4b3214fea981a4a16.json {"expireTime":9007200860463048000,"key":"04e80d070db8674b1bb743c026e7953b{\"background\":\"rgba(0,0,0,1)\",\"duotone\":false,\"grayscale\":false,\"rotate\":0,\"trim\":false,\"toFormat\":\"png\",\"toFormatBase64\":\"\",\"cropFocus\":17,\"fit\":\"cover\",\"width\":20,\"height\":20}","val":{"src":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAD1klEQVQ4y2VUS28bVRR2UrFhwR9gxxrWbNiyQrDtCiHBjn+ABDto1ZI+KBVJWxFBS6CkTZq6buM2KU2apK6bNnZm7PH7/cjDGT/aqDT2zD1837XHsoSlo3vn+pzvfuc75x7fdrbp837YHxvZfwibgKVgLkyimWZ9O2v/Fs3Yn8DG6Pc8eTC+EtnRMStbO8NgH5yPDfYfRLPNJav0SvL7rsSLr4RgMGUWOpLd7UmmfsRvE6CfegSemHtjQ2bR7BDsCwYzCEzAyu712dmqz9BWMJ71ktXX2i9Zbp/xcMB0zBdJ2xoskrE/z+50xci1GNhl8BAE7AZgPOMKv6ZD4OCLl3J6xrxMjFurpT7LeKH1Phwklm8zFQfpy2iwZ94FBs63Urb8fDOhfpq1uqHUawlbjS+HKT+zGg+syhvZTDS6YCxmrumx+5/xnJdPzifV5dspARknVT3kf3XYO75zf8c/uhIoyK+BtHPzUV<KEY>,"width":20,"height":20,"aspectRatio":1,"originalName":"ConfidenceSmall.png"}}
json
/******************************************************************************* * Copyright (c) 2000, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.internal.compiler.lookup; import org.eclipse.jdt.core.compiler.CharOperation; import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration; import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration; import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; public class SyntheticMethodBinding extends MethodBinding { public FieldBinding targetReadField; // read access to a field public FieldBinding targetWriteField; // write access to a field public MethodBinding targetMethod; // method or constructor public TypeBinding targetEnumType; // enum type public int purpose; public final static int FieldReadAccess = 1; // field read public final static int FieldWriteAccess = 2; // field write public final static int SuperFieldReadAccess = 3; // super field read public final static int SuperFieldWriteAccess = 4; // super field write public final static int MethodAccess = 5; // normal method public final static int ConstructorAccess = 6; // constructor public final static int SuperMethodAccess = 7; // super method public final static int BridgeMethod = 8; // bridge method public final static int EnumValues = 9; // enum #values() public final static int EnumValueOf = 10; // enum #valueOf(String) public final static int SwitchTable = 11; // switch table method public int sourceStart = 0; // start position of the matching declaration public int index; // used for sorting access methods in the class file public SyntheticMethodBinding(FieldBinding targetField, boolean isReadAccess, boolean isSuperAccess, ReferenceBinding declaringClass) { this.modifiers = ClassFileConstants.AccDefault | ClassFileConstants.AccStatic | ClassFileConstants.AccSynthetic; this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved); SourceTypeBinding declaringSourceType = (SourceTypeBinding) declaringClass; SyntheticMethodBinding[] knownAccessMethods = declaringSourceType.syntheticMethods(); int methodId = knownAccessMethods == null ? 0 : knownAccessMethods.length; this.index = methodId; this.selector = CharOperation.concat(TypeConstants.SYNTHETIC_ACCESS_METHOD_PREFIX, String.valueOf(methodId).toCharArray()); if (isReadAccess) { this.returnType = targetField.type; if (targetField.isStatic()) { this.parameters = Binding.NO_PARAMETERS; } else { this.parameters = new TypeBinding[1]; this.parameters[0] = declaringSourceType; } this.targetReadField = targetField; this.purpose = isSuperAccess ? SyntheticMethodBinding.SuperFieldReadAccess : SyntheticMethodBinding.FieldReadAccess; } else { this.returnType = TypeBinding.VOID; if (targetField.isStatic()) { this.parameters = new TypeBinding[1]; this.parameters[0] = targetField.type; } else { this.parameters = new TypeBinding[2]; this.parameters[0] = declaringSourceType; this.parameters[1] = targetField.type; } this.targetWriteField = targetField; this.purpose = isSuperAccess ? SyntheticMethodBinding.SuperFieldWriteAccess : SyntheticMethodBinding.FieldWriteAccess; } this.thrownExceptions = Binding.NO_EXCEPTIONS; this.declaringClass = declaringSourceType; // check for method collision boolean needRename; do { check : { needRename = false; // check for collision with known methods long range; MethodBinding[] methods = declaringSourceType.methods(); if ((range = ReferenceBinding.binarySearch(this.selector, methods)) >= 0) { int paramCount = this.parameters.length; nextMethod: for (int imethod = (int)range, end = (int)(range >> 32); imethod <= end; imethod++) { MethodBinding method = methods[imethod]; if (method.parameters.length == paramCount) { TypeBinding[] toMatch = method.parameters; for (int i = 0; i < paramCount; i++) { if (toMatch[i] != this.parameters[i]) { continue nextMethod; } } needRename = true; break check; } } } // check for collision with synthetic accessors if (knownAccessMethods != null) { for (int i = 0, length = knownAccessMethods.length; i < length; i++) { if (knownAccessMethods[i] == null) continue; if (CharOperation.equals(this.selector, knownAccessMethods[i].selector) && areParametersEqual(methods[i])) { needRename = true; break check; } } } } if (needRename) { // retry with a selector postfixed by a growing methodId setSelector(CharOperation.concat(TypeConstants.SYNTHETIC_ACCESS_METHOD_PREFIX, String.valueOf(++methodId).toCharArray())); } } while (needRename); // retrieve sourceStart position for the target field for line number attributes FieldDeclaration[] fieldDecls = declaringSourceType.scope.referenceContext.fields; if (fieldDecls != null) { for (int i = 0, max = fieldDecls.length; i < max; i++) { if (fieldDecls[i].binding == targetField) { this.sourceStart = fieldDecls[i].sourceStart; return; } } } /* did not find the target field declaration - it is a synthetic one public class A { public class B { public class C { void foo() { System.out.println("A.this = " + A.this); } } } public static void main(String args[]) { new A().new B().new C().foo(); } } */ // We now at this point - per construction - it is for sure an enclosing instance, we are going to // show the target field type declaration location. this.sourceStart = declaringSourceType.scope.referenceContext.sourceStart; // use the target declaring class name position instead } public SyntheticMethodBinding(FieldBinding targetField, ReferenceBinding declaringClass, TypeBinding enumBinding, char[] selector) { this.modifiers = ClassFileConstants.AccDefault | ClassFileConstants.AccStatic | ClassFileConstants.AccSynthetic; this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved); SourceTypeBinding declaringSourceType = (SourceTypeBinding) declaringClass; SyntheticMethodBinding[] knownAccessMethods = declaringSourceType.syntheticMethods(); int methodId = knownAccessMethods == null ? 0 : knownAccessMethods.length; this.index = methodId; this.selector = selector; this.returnType = declaringSourceType.scope.createArrayType(TypeBinding.INT, 1); this.parameters = Binding.NO_PARAMETERS; this.targetReadField = targetField; this.targetEnumType = enumBinding; this.purpose = SyntheticMethodBinding.SwitchTable; this.thrownExceptions = Binding.NO_EXCEPTIONS; this.declaringClass = declaringSourceType; if (declaringSourceType.isStrictfp()) { this.modifiers |= ClassFileConstants.AccStrictfp; } // check for method collision boolean needRename; do { check : { needRename = false; // check for collision with known methods long range; MethodBinding[] methods = declaringSourceType.methods(); if ((range = ReferenceBinding.binarySearch(this.selector, methods)) >= 0) { int paramCount = this.parameters.length; nextMethod: for (int imethod = (int)range, end = (int)(range >> 32); imethod <= end; imethod++) { MethodBinding method = methods[imethod]; if (method.parameters.length == paramCount) { TypeBinding[] toMatch = method.parameters; for (int i = 0; i < paramCount; i++) { if (toMatch[i] != this.parameters[i]) { continue nextMethod; } } needRename = true; break check; } } } // check for collision with synthetic accessors if (knownAccessMethods != null) { for (int i = 0, length = knownAccessMethods.length; i < length; i++) { if (knownAccessMethods[i] == null) continue; if (CharOperation.equals(this.selector, knownAccessMethods[i].selector) && areParametersEqual(methods[i])) { needRename = true; break check; } } } } if (needRename) { // retry with a selector postfixed by a growing methodId setSelector(CharOperation.concat(selector, String.valueOf(++methodId).toCharArray())); } } while (needRename); // We now at this point - per construction - it is for sure an enclosing instance, we are going to // show the target field type declaration location. this.sourceStart = declaringSourceType.scope.referenceContext.sourceStart; // use the target declaring class name position instead } public SyntheticMethodBinding(MethodBinding targetMethod, boolean isSuperAccess, ReferenceBinding declaringClass) { if (targetMethod.isConstructor()) { initializeConstructorAccessor(targetMethod); } else { initializeMethodAccessor(targetMethod, isSuperAccess, declaringClass); } } /** * Construct a bridge method */ public SyntheticMethodBinding(MethodBinding overridenMethodToBridge, MethodBinding targetMethod, SourceTypeBinding declaringClass) { this.declaringClass = declaringClass; this.selector = overridenMethodToBridge.selector; // amongst other, clear the AccGenericSignature, so as to ensure no remains of original inherited persist (101794) // also use the modifiers from the target method, as opposed to inherited one (147690) this.modifiers = (targetMethod.modifiers | ClassFileConstants.AccBridge | ClassFileConstants.AccSynthetic) & ~(ClassFileConstants.AccAbstract | ClassFileConstants.AccNative | ClassFileConstants.AccFinal | ExtraCompilerModifiers.AccGenericSignature); this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved); this.returnType = overridenMethodToBridge.returnType; this.parameters = overridenMethodToBridge.parameters; this.thrownExceptions = overridenMethodToBridge.thrownExceptions; this.targetMethod = targetMethod; this.purpose = SyntheticMethodBinding.BridgeMethod; SyntheticMethodBinding[] knownAccessMethods = declaringClass.syntheticMethods(); int methodId = knownAccessMethods == null ? 0 : knownAccessMethods.length; this.index = methodId; } /** * Construct enum special methods: values or valueOf methods */ public SyntheticMethodBinding(SourceTypeBinding declaringEnum, char[] selector) { this.declaringClass = declaringEnum; this.selector = selector; this.modifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccStatic; this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved); LookupEnvironment environment = declaringEnum.scope.environment(); this.thrownExceptions = Binding.NO_EXCEPTIONS; if (selector == TypeConstants.VALUES) { this.returnType = environment.createArrayType(environment.convertToParameterizedType(declaringEnum), 1); this.parameters = Binding.NO_PARAMETERS; this.purpose = SyntheticMethodBinding.EnumValues; } else if (selector == TypeConstants.VALUEOF) { this.returnType = environment.convertToParameterizedType(declaringEnum); this.parameters = new TypeBinding[]{ declaringEnum.scope.getJavaLangString() }; this.purpose = SyntheticMethodBinding.EnumValueOf; } SyntheticMethodBinding[] knownAccessMethods = ((SourceTypeBinding)this.declaringClass).syntheticMethods(); int methodId = knownAccessMethods == null ? 0 : knownAccessMethods.length; this.index = methodId; if (declaringEnum.isStrictfp()) { this.modifiers |= ClassFileConstants.AccStrictfp; } } /** * An constructor accessor is a constructor with an extra argument (declaringClass), in case of * collision with an existing constructor, then add again an extra argument (declaringClass again). */ public void initializeConstructorAccessor(MethodBinding accessedConstructor) { this.targetMethod = accessedConstructor; this.modifiers = ClassFileConstants.AccDefault | ClassFileConstants.AccSynthetic; this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved); SourceTypeBinding sourceType = (SourceTypeBinding) accessedConstructor.declaringClass; SyntheticMethodBinding[] knownSyntheticMethods = sourceType.syntheticMethods(); this.index = knownSyntheticMethods == null ? 0 : knownSyntheticMethods.length; this.selector = accessedConstructor.selector; this.returnType = accessedConstructor.returnType; this.purpose = SyntheticMethodBinding.ConstructorAccess; this.parameters = new TypeBinding[accessedConstructor.parameters.length + 1]; System.arraycopy( accessedConstructor.parameters, 0, this.parameters, 0, accessedConstructor.parameters.length); this.parameters[accessedConstructor.parameters.length] = accessedConstructor.declaringClass; this.thrownExceptions = accessedConstructor.thrownExceptions; this.declaringClass = sourceType; // check for method collision boolean needRename; do { check : { needRename = false; // check for collision with known methods MethodBinding[] methods = sourceType.methods(); for (int i = 0, length = methods.length; i < length; i++) { if (CharOperation.equals(this.selector, methods[i].selector) && areParametersEqual(methods[i])) { needRename = true; break check; } } // check for collision with synthetic accessors if (knownSyntheticMethods != null) { for (int i = 0, length = knownSyntheticMethods.length; i < length; i++) { if (knownSyntheticMethods[i] == null) continue; if (CharOperation.equals(this.selector, knownSyntheticMethods[i].selector) && areParametersEqual(knownSyntheticMethods[i])) { needRename = true; break check; } } } } if (needRename) { // retry with a new extra argument int length = this.parameters.length; System.arraycopy( this.parameters, 0, this.parameters = new TypeBinding[length + 1], 0, length); this.parameters[length] = this.declaringClass; } } while (needRename); // retrieve sourceStart position for the target method for line number attributes AbstractMethodDeclaration[] methodDecls = sourceType.scope.referenceContext.methods; if (methodDecls != null) { for (int i = 0, length = methodDecls.length; i < length; i++) { if (methodDecls[i].binding == accessedConstructor) { this.sourceStart = methodDecls[i].sourceStart; return; } } } } /** * An method accessor is a method with an access$N selector, where N is incremented in case of collisions. */ public void initializeMethodAccessor(MethodBinding accessedMethod, boolean isSuperAccess, ReferenceBinding receiverType) { this.targetMethod = accessedMethod; this.modifiers = ClassFileConstants.AccDefault | ClassFileConstants.AccStatic | ClassFileConstants.AccSynthetic; this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved); SourceTypeBinding declaringSourceType = (SourceTypeBinding) receiverType; SyntheticMethodBinding[] knownAccessMethods = declaringSourceType.syntheticMethods(); int methodId = knownAccessMethods == null ? 0 : knownAccessMethods.length; this.index = methodId; this.selector = CharOperation.concat(TypeConstants.SYNTHETIC_ACCESS_METHOD_PREFIX, String.valueOf(methodId).toCharArray()); this.returnType = accessedMethod.returnType; this.purpose = isSuperAccess ? SyntheticMethodBinding.SuperMethodAccess : SyntheticMethodBinding.MethodAccess; if (accessedMethod.isStatic()) { this.parameters = accessedMethod.parameters; } else { this.parameters = new TypeBinding[accessedMethod.parameters.length + 1]; this.parameters[0] = declaringSourceType; System.arraycopy(accessedMethod.parameters, 0, this.parameters, 1, accessedMethod.parameters.length); } this.thrownExceptions = accessedMethod.thrownExceptions; this.declaringClass = declaringSourceType; // check for method collision boolean needRename; do { check : { needRename = false; // check for collision with known methods MethodBinding[] methods = declaringSourceType.methods(); for (int i = 0, length = methods.length; i < length; i++) { if (CharOperation.equals(this.selector, methods[i].selector) && areParametersEqual(methods[i])) { needRename = true; break check; } } // check for collision with synthetic accessors if (knownAccessMethods != null) { for (int i = 0, length = knownAccessMethods.length; i < length; i++) { if (knownAccessMethods[i] == null) continue; if (CharOperation.equals(this.selector, knownAccessMethods[i].selector) && areParametersEqual(knownAccessMethods[i])) { needRename = true; break check; } } } } if (needRename) { // retry with a selector & a growing methodId setSelector(CharOperation.concat(TypeConstants.SYNTHETIC_ACCESS_METHOD_PREFIX, String.valueOf(++methodId).toCharArray())); } } while (needRename); // retrieve sourceStart position for the target method for line number attributes AbstractMethodDeclaration[] methodDecls = declaringSourceType.scope.referenceContext.methods; if (methodDecls != null) { for (int i = 0, length = methodDecls.length; i < length; i++) { if (methodDecls[i].binding == accessedMethod) { this.sourceStart = methodDecls[i].sourceStart; return; } } } } protected boolean isConstructorRelated() { return this.purpose == SyntheticMethodBinding.ConstructorAccess; } }
java
In the intricate tapestry of human interactions, the Logic of appropriateness stands as a defining thread that weaves together our behaviors and decisions. Rooted in the realm of social sciences, this concept offers a unique lens through which we can decipher the subtle forces guiding our actions. In this exploration, we embark on a journey to demystify the logic of appropriateness, delving into its mechanisms, theoretical underpinnings, and its dynamic interplay with burstiness and perplexity. Let’s unravel the intricate web of social Norms and understand how they wield their influence on our daily lives. The essence of the logic of appropriateness lies in its core, encompassing the unspoken codes and societal conventions that guide our actions. Unlike the traditional logic of rational choices, which is based on calculated results, the logic of appropriateness centers on the idea that our behavior is often influenced by what is considered fitting or appropriate in a particular situation. It recognizes the profound impact of social norms, cultural influences, and established traditions in shaping our decisions, going beyond the realm of decisions driven solely by utility. Imagine a scenario where you enter a quiet library. Instinctively, you lower your voice to match the subdued ambiance. This automatic adjustment exemplifies the influence of social norms on our behavior. The logic of appropriateness operates as an unconscious compass that guides us toward actions that align with established norms. This phenomenon becomes particularly evident in situations where there’s no clear “right” choice based on rational considerations. Instead, our decisions are driven by what we perceive as socially acceptable or appropriate within a given context. The theoretical framework of the logic of appropriateness traces back to institutionalism, a foundational concept emphasizing the influence of institutions on our behaviors and social exchanges. Institutions encompass a diverse array of societal structures, norms, and customary practices that intricately shape our daily existence. Moreover, the role of scripts and patterns plays a pivotal role in comprehending the mechanics of the logic of appropriateness. These cognitive scripts serve as mental blueprints guiding our actions within familiar contexts, alleviating the cognitive burden associated with decision-making processes. Consider your morning routine: the sequence of actions you follow—brushing your teeth, having breakfast—is a script embedded in the logic of appropriateness. This routine is not solely driven by rational calculation; it’s influenced by the normative expectations of a “typical” morning. Similarly, the logic of appropriateness is evident in more complex social behaviors, such as the unwritten rules that dictate how we greet colleagues at work or how we behave at formal events. While the logic of appropriateness offers insights into our behavior, it also raises intriguing questions. How do we balance conformity with authenticity? How do cultural variations impact what’s deemed appropriate? At times, adhering to norms can lead to tension between our genuine selves and the roles we play. Moreover, in multicultural societies, the clash of normative expectations can introduce perplexity, challenging our adherence to a single set of norms. Burstiness, characterized by unpredictable deviations from norms, introduces a fascinating layer to the logic of appropriateness. Burstiness can be observed in instances where individuals challenge established norms to express their uniqueness. Think of a colleague who arrives at a formal meeting wearing vibrant sneakers—a burst of nonconformity that challenges the norm of formal attire. Burstiness acts as a dynamic force, triggering normative evolution and offering room for creativity within established frameworks. Moments of perplexity arise when norms collide or when the “appropriate” course of action isn’t clear. For instance, imagine a social setting where cultural norms around greetings differ significantly. In such scenarios, individuals may experience perplexity as they navigate conflicting expectations. Perplexity can act as a catalyst for change, prompting a reevaluation of existing norms and fostering cross-cultural understanding. The logic of appropriateness isn’t confined to mundane choices; it extends to critical decisions that impact society. Political leaders, for example, often operate within the framework of what’s deemed appropriate for their roles, guided by established norms of governance. Even in high-stakes scenarios, the logic of appropriateness exerts its influence, shaping actions that align with expectations. Norms are not static entities; they evolve over time and space. What was once deemed appropriate in the past may no longer hold true today. Societal shifts, technological advancements, and changing cultural values contribute to the dynamic nature of norms. Individuals and societies adapt, recalibrating their actions in response to evolving normative landscapes. The logic of appropriateness extends its reach beyond individual actions, influencing collective behaviors and even social movements. In the realm of social activism, norms may be challenged and redefined, giving rise to new forms of norm entrepreneurship. As social dynamics evolve, so does the logic of appropriateness, reflecting the ever-changing tapestry of human interactions. In the intricate dance of human behavior, the logic of appropriateness takes center stage, casting its invisible threads that guide our actions. From the routines we follow to the decisions we make in complex scenarios, social norms play a pervasive role in shaping our lives. Burstiness challenges conventions and perplexity beckons us to embrace change. As we navigate this dynamic interplay between norms and individual agency, we find ourselves at the intersection of tradition and innovation, conformity and creativity. The logic of appropriateness invites us to question, adapt, and ultimately, understand the intricate mosaic of our interconnected world. The post Why Following Rules Isn’t Always Rational: Logic of Appropriateness appeared first on MagnifyMinds.
english
Hiroshima, a city at the southern tip of Japan’s main island Honshu, is the venue of this year’s Group of Seven (G7) Summit, the annual meeting of the leaders of world’s richest and most industrialised democracies. Japan’s Prime Minister Fumio Kishida welcomed President Joe Biden of the United States, Chancellor Olaf Scholz of Germany, President Emmanuel Macron of France, Prime Minister Rishi Sunak of the United Kingdom, Prime Minister Justin Trudeau of Canada, and Prime Minister Giorgia Meloni of Italy, along with two representatives of the European Union, President of the European Council Charles Michel, and President of the European Commission Ursula von der Leyen, in his home city on Friday (May 19). Prime Minister Narendra Modi will attend the Summit at the invitation of Prime Minister Kishida and as president of the G20 this year. The choice of Hiroshima as host city of the G7 Summit underlines Prime Minister Kishida’s commitment to put nuclear disarmament and nonproliferation prominently on the agenda of the meeting. Hiroshima was the first city in the world that was hit by a nuclear weapon on August 6, 1945. A second Japanese city, Nagasaki, was hit three days later, on August 9. The nuclear bombings of Japan by the US brought World War II to an immediate end. Estimates of the dead at Hiroshima and Nagasaki vary from 110,000 (70,000 at Hiroshima and 40,000 at Nagasaki) to 210,000 (140,000 and 70,000 respectively). The fate of the two cities remains the most compelling argument against the use of nuclear weapons and for nuclear disarmament. No nuclear weapon has ever been used again, even though the nuclear powers have continued to build up their arsenals, and the world has seen several close shaves with nuclear crises. Most recently, assertions from Russia that it will not hesitate to go to any extent in pursuing its war goals in Ukraine have been seen as threats to use nuclear weapons. Hiroshima is a flat city surrounded by hills and was, for the makers of the atomic bomb, an ideal target to test out their devastating new weapon which, if exploded at the right height above the ground, could destroy almost the entire city. The aim of the bombing was spectacular destruction, and to demonstrate to the Japanese as well as to the Soviet Union the strength and potential of the US war machine. The bomb, nicknamed “Little Boy”, was released at 8. 15 am local time by the US Air Force pilot Paul Tibbets flying “Enola Gay”, a Boeing B-29 Superfortress bomber aircraft. About 70% of Hiroshima’s buildings were flattened, and the deaths from the effects of radiation exposure continued for decades after the bombing. The Americans announced it was an atomic bomb only some 16 hours later. Little Boy exploded above Hiroshima with an energy of about 15 kilotons of TNT, far less than the potential of the most destructive modern nuclear weapons. “Fat Man”, the bomb that was dropped above Nagasaki on August 9, was a little more powerful, but caused less damage because of the uneven terrain of the city. Both Hiroshima and Nagasaki were subsequently rebuilt. The Hiroshima Peace Memorial Park, which the G7 leaders visited, stands testimony to the city’s tragedy and in memory of those killed in the world’s first nuclear attack.
english
const imageHash = require('../index'); imageHash('https://ichef-1.bbci.co.uk/news/660/cpsprodpb/7F76/production/_95703623_mediaitem95703620.jpg', 16, false, (err, res) => { if (err) throw err; console.log(res); });
javascript
{"organizations": [], "uuid": "6b92155d49b24b2fcb78c26d96e77d5b429d3263", "thread": {"social": {"gplus": {"shares": 0}, "pinterest": {"shares": 0}, "vk": {"shares": 0}, "linkedin": {"shares": 0}, "facebook": {"likes": 0, "shares": 0, "comments": 0}, "stumbledupon": {"shares": 0}}, "site_full": "www.tripadvisor.com", "main_image": "https://media-cdn.tripadvisor.com/media/photo-s/06/bc/63/54/the-hotel--v2375200.jpg", "site_section": "https://www.tripadvisor.com/Hotel_Review-g186338-d192145-Reviews-Park_International_Hotel-London_England.html", "section_title": "Park International Hotel - UPDATED 2017 Reviews &amp; Price Comparison (London, England) - TripAdvisor", "url": "https://www.tripadvisor.com/ShowUserReviews-g186338-d192145-r471004478-Park_International_Hotel-London_England.html", "country": "US", "domain_rank": 189, "title": "Graet city-trip", "performance_score": 0, "site": "tripadvisor.com", "participants_count": 1, "title_full": "Graet city-trip - Review of Park International Hotel, London, England - TripAdvisor", "spam_score": 0.019, "site_type": "discussions", "published": "2017-03-28T03:00:00.000+03:00", "replies_count": 0, "uuid": "6b92155d49b24b2fcb78c26d96e77d5b429d3263"}, "author": "joycewQ3254GC", "url": "https://www.tripadvisor.com/ShowUserReviews-g186338-d192145-r471004478-Park_International_Hotel-London_England.html", "ord_in_thread": 0, "title": "Graet city-trip", "locations": [], "entities": {"persons": [], "locations": [], "organizations": []}, "highlightText": "", "language": "english", "persons": [], "text": "Hotel is perfect, nice staff, clean en nice room. We spent 2 day's in Londen, one night. Hotel not far from the underground. Everything in the room was clean. Sleep good in the bed. Good braekfast. All is positif", "external_links": [], "published": "2017-03-28T03:00:00.000+03:00", "crawled": "2017-03-31T16:12:51.787+03:00", "highlightTitle": ""}
json
" Unbearable Weight is brilliant. From an immensely knowledgeable feminist perspective, in engaging, jargonless (!) prose, Bordo analyzes a whole range of issues connected to the body―weight and weight loss, exercise, media images, movies, advertising, anorexia and bulimia, and much more―in a way that makes sense of our current social landscape―finally! This is a great book for anyone who wonders why women's magazines are always describing delicious food as 'sinful' and why there is a cake called Death by Chocolate. Loved it!"―Katha Pollitt, Nation columnist and author of Subject to Debate: Sense and Dissents on Women, Politics, and Culture (2001) Susan Bordo is known for the clarity, accessibility, and contemporary relevance of her writing. Her first book, The Flight to Objectivity, has become a classic of feminist philosophy. In 1993, increasingly aware of our culture's preoccupation with weight and body image, she published Unbearable Weight: Feminism, Western Culture, and the Body, a book that is still widely read and assigned in classes today. During speaking tours for that book, she encountered many young men who asked, "What about us?" The result was The Male Body: A New Look at Men in Public and in Private (1999). Both books were highly praised by reviewers, with Unbearable Weight named a 1993 Notable Book by the New York Times and The Male Body featured in Mademoiselle, Elle, Vanity Fair, NPR, and MSNBC. Both books have been translated into many languages, and individual chapters, many of which are considered paradigms of lucid writing, are frequently re-printed in collections and writing textbooks. The Creation of Anne Boleyn: A New Look at England's Most Notorious Queen, was published to critical acclaim by Houghton Mifflin Harcourt in April, 2013. The Destruction of Hillary Clinton followed in 2017. She lives in Lexington, Kentucky with her husband, daughter, three dogs, a cat, and a cockatiel. Bordo received her Ph.D. from the State University of New York at Stony Brook in 1982. She recently retired from her position as Otis A. Singletary Chair in the Humanities and Professor of Gender and Women's Studies at the University of Kentucky. Unbearable Weight is an analysis of the body in relation to culture. I expected to read about eating disorders and disordered body images, but instead discovered a new way of thinking about the body and culture. "Psychopathology, as Jules Henry has said, 'is the final outcome of all that is wrong with a culture.' " The author, Susan Bordo, takes "the psychopathologies that develop within a culture, far from being anomalies or aberrations, to be characteristic expressions of that culture; to be, indeed, the crystallization of much that is wrong with it." This is true, this is a way of thinking about culture that I very much appreciate. Watching Bordo analyze our collective body and weight obsessions and finding them to be an expression of "some of the central ills of our culture" is refreshing. Bordo speaks with frankness and certainty about issues that all women and many men will quickly grasp. She does not argue or persuade so much as she lays out, explains, and analyzes, providing the reader with a deeper understanding of what she has always, deep down, known. Being aware of something doesn't (ever, in my experience) mean you can escape it, though, so reading Bordo was quite healing and calming for me. Bordo breaks down the personal and cultural effects of a society that is inundated with subtle and not so subtle messages about how your body should look. As we all know, these effects are devastating. This was published in 1993, and since then so much has changed; unfortunately, the external and therefore internal pressure to be thin and fit has become more intense, not less. We all know we shouldn't participate in self-loathing or body-bashing (I am, look, feel fat). Knowing we shouldn't do this only loads us with more guilt and negativity when we do it, especially since we are also told that being obsessed with superficial things such as appearance is vain and frivolous. Bordo provides much-needed breathing space for anyone who has internalized the onslaught of media images - let's not be angry at ourselves for our "imperfect" bodies or our obsessive thoughts about weight; let's externalize that anger and refocus the gaze not on ourselves but on the culture that produces these images and illnesses. I found in Bordo's essays validation of many things I already thought and felt, and an in-depth exploration of many ideas I've been briefly exposed to over the years. Some of the ideas are the male gaze, the concept and truth of which fascinates me in itself and also because I feel that gaze constantly; psychopathology as the crystallization of a culture, a lovely phrase for an awesome idea; a heavy critique of postmodernism, which surprised me, as I've always equated postmodernism with leftist thought and leanings - and therefore feminism. Yet Bordo manages to free herself from postmodernism for the sake of feminism, or rather, for the sake of women. Our lives, the images we are constantly exposed to, are so dependent on social constructs and loaded historical meaning that to strip that meaning away and say it exists in a vacuum certainly does damage to the women who absorb the images and intuitively understand their meanings. To be told that they have no meaning is demoralizing to say the least. And so - away with you, postmodernism! Bordo's argument and conclusions are of course in no way so simplistic, but I like to simplify my life and so - away, postmodernism. Bordo devotes a chapter to the regulation of pregnancy by the law, to the autonomy of the rights of fathers and fetuses while the agency of pregnant women is stripped away. This is interesting, but I prefer her ruminations on the idealization and demonization of the female body in our culture, and as a new mother I found it helpful to apply her ideas on woman to my experience as a mother. First, the "archetypal image of the female: as hungering, voracious, all-needing, and all-wanting." Bordo quotes a young woman who says that " '...the anorectic is always convinced she is taking up too much space, eating too much, eating food too much. I've never felt that way, but I've often felt I was too much - too much emotion, too much need, too loud and demanding, too much there, if you know what I mean.' " I do know what you mean! And I'm sure most women do, too. Add to this the "powerful ideological underpinning...for the cultural containment of female appetite: the notion that women are most gratified by feeding and nourishing others, not themselves." Our society "casts women as chief emotional and physical nurturer. The rules for this construction of femininity (and I speak here in a language both symbolic and literal) require that women learn to feed others, not the self, and to construe any desires for self-nurturance and self-feeding as greedy and excessive. Thus, women must develop a totally other-oriented emotional economy." Let me speak to both her literal and symbolic meanings here. I nursed my daughter for 11 months. I did it because I knew it would make her healthy - which it has - but behind that was the feeling that it was what I should do, that I would fail as a mother if I did not provide her with milk for the first year of her life. Indeed, my breast mild dried up a month before her first year, and I was crushed with shame. I felt I had failed. Why did my milk dry up? I was working full-time, attending graduate school full-time, caring for and feeding an infant, and managing a house. I stopped feeding myself because I simply didn't have enough energy to prepare food. My mother often prepared meals for me - because, well, that's what mothers do; isn't that the sad point? - but all other requests for help went unmet. I didn't have the energy to cook, and then I simply didn't have the will to cook out of resentment that I wasn't being helped or being fed - and so I subsisted on pretzels and chocolate milk until my body had enough. From all this follows the body issues that will arise from having a child - the soft belly, the deflated breasts that are so unacceptable in our culture and cause men and women such disgust that "mommy makeovers" - combination breast lifts, tummy tucks, liposuction, and vaginoplasty - are a growing trend after having children. How sad that there is no space in our culture for the image of a real, beautiful postpartum body. Unfortunately we instead have "the tantalizing (and mystifying) ideal of a perfectly managed and regulated self, within a consumer culture which has made the actual management of hunger and desire intensely problematic. In this context, food refusal, weight loss, commitment to exercise, and ability to tolerate bodily pain and exhaustion have become cultural metaphors for self-determination, will, and moral fortitude." Bordo also speaks repeatedly, as some of the above quotes have touched upon, to the sheer amount of time and energy it takes to meet the standards set for us. "Yet, each hour, each minute spent in anxious pursuit of that ideal (for it does not come naturally to most mature women) is in fact time and energy taken from inner development and social achievement." She says that "through the exacting and normalizing disciplines of diet, makeup, and dress - central organizing principles of time and space in the day of many women....we continue to memorize on our bodies the feel and conviction of lack, of insufficiency, of never being good enough." Yet another reason to feel guilty? for me to feel bad for waxing my eyebrows and putting makeup on in the morning? Not necessarily. "Many, if not most, women also are willing (often, enthusiastic) participants in cultural practices that objectify and sexualize us." Yet "feminist cultural criticism is not a blueprint for the conduct of personal life...and does not empower (or require) individuals to 'rise above' their culture or become martyrs to feminist ideals." The goal is edification and understanding. Excellent - because I don't plan to stop with the makeup or the obsessive grooming that takes time and energy away from my participation in the real world. I am deeply enmeshed in our culture and the expectations it has of me. I don't plan or expect to escape, but I do have a deeper understanding of myself, my body issues, and will actively resist the "temptation" to become hard and plastic. The reviews on the back cover, as well as the foreword to the 10 year anniversary edition, claim that Bordo is jargon-free. Nope. No, she's not. Unless you're steeped in academia, this book won't be a breeze; but Bordo does write clearly, and her ideas contain the sort of depth and complexity and appreciation for nuance that make my mouth water. They make me...hungry. Totally worth it. This was a very difficult book for me to finish. I started out engaged; her discussion about the history of the mind/body split was very interesting and the writing on hysteria made me want more on the topic. In general, I think this where she shines: the history of ideas. But as the book went on, it dragged. A lot. It's very clearly a product of 1993, and in that way it's not anyone's fault I didn't always connect with the data points. That being said, this felt at times like a spotty example of cultural studies, with cherry picked examples holding up the author's claims. In general, I'm not a fan of Bordo's theoretical position; I think she simplifies Foucault and misses Lacan/Derrida /postmodernist notions of subjectivity entirely. I just can't quite connect with Bordo's discussion of gender; she strains away from the binary but does not make a break. Despite her apologies, I cannot help but feel that male/female are real poles in her universe. (In general, Bordo apologizes for and explains away her position a lot, which was an annoying writing tick to say the least.) Ultimately, I'd suggest reading the first 100-150 pages and calling it a day. PS The 80/90s ads included as images are worth their weight in gold. An interesting collection of essays written by Susan Bordo in the late 80s and the early 90s, focusing on the way women in Western culture view their bodies, and the idea of "perfection" as a feminine goal. In spite of being rather outdated (though the ads included throughout are pretty classic - holy shoulder pads, Batman!), the information is still, sadly, relevant today. Our media still dictates what is expected of women (and men) especially when it comes to what is considered not only normal but also preferred. Bordo covers the usual topics, such as anorexia and bulimia, but also discusses cosmetic surgery which was, at the time of publication, a somewhat new and popular way of perfecting ones body. There is some repetition throughout the essays - a common problem with these sorts of collections, but it's a decent amount of information and worth reading more than once anyway. I've always been fairly interested in pop culture references and how what occurs in popular culture becomes the norm, the standard, the expectation. Bordo handles this fairly well, even though they may seem irrelevant to modern readers, especially those who didn't grow up through the 80s or even 90s. The essay, Material Girl, for example, focuses on Madonna who in her early years was proud of her body the way it was, and implied that would never change. A few years later, however, she had lost considerable weight from a diet and exercise plan, and made cosmetic changes to her body. We saw a similar change with Gwen Stefani who, I think we all agree, has lost a considerable amount of weight, especially when compared to the Gwen Stefani of the 90s when she first found popularity on MTV with Just a Girl - then an athletic-appearing woman with a strong-physique. But herein lies part of the problem - it's hard to talk about these things without bringing up other examples in media, especially when a celebrity's appearance changes so noticeably in the public eye, and then we all talk and wonder and that makes us all bad people, doesn't it, because we're not letting these people live authentic lives. In any case. So I appreciated Bordo's book, though would especially be interested in reading an updated version of these essays if Bordo felt so inclined. There were a few aspects that seemed especially outdated, and I have to wonder if Bordo still stands behind all of her opinions proposed in this collection, published in 1993. Lord knows I no longer still believe a lot of what I believed in 1993. You're all welcome for that, by the way. Because I believed a lot of stupid shit in 1993. There are also similarities to Naomi Wolf's The Beauty Myth which was published just a couple years before Bordo's book, but they clearly were writing about much of the same issues at the same time, and we should all appreciate the fact that they were calling that shit out. Only when we realize and admit there's a problem can we start to fix it and heal, collectively. I think that Susan Bordo takes usually difficult-to-understand theory and applies it to anorexia and body image. I turned to her because many women my age have decided to starve themselves. She mainly deals with younger women, but reading this has helped me understand the complexities of eating disorders-- from wanting control over at least one aspect of life to being bullied into cultural submission through the barrage of images projecting ideals of femininity, beauty, and success. This book is somewhat dated; however, I think her analysis is useful. Because much of her analysis is based on Michel Foucault, whom she describes as saying that power is diffuse, her recommendations for resistance is somewhat limited to individuals' personal decisions. I would prefer a movement. Way, way more academic than I had anticipated. I found myself rereading lines 2-3x. You definitely need some background in women's studies/philosophy to understand all the references to different philosophers and theories. It was so dense; it took me six months to complete. The parts that were slightly more accessible in talking about mass media, culture and women were pretty interesting. Not sure I agreed with all of it, but it was presented in a way that at least made me consider it. In the introduction to this collection of essays, Susan Bordo names Foucault as the primary influence on her thought, and on the ideas she explores here. As soon as I read that, I said "Oh, no. That's a bad sign," fearing that the book would be too postmodern for me. Happily, it's not. The writing is clear, engaging and fairly accessible (it can still be slow going, especially in the final three essays which deal specifically with postmodernism), and she does actually make recognizable, clearly-stated arguments in every one of her essays, as opposed to much of postmodernist writing, which spends most of its time studiously avoiding argument. (Harrumph!) Anyway, most of the book has little to do with postmodernism at all; it's a discussion of the body in Western culture, particularly at the time the book was written (early 1990s), though it also makes reference to earlier historical periods. Much time is spent discussing eating disorders as logical outgrowths of contemporary society's conflicting attitudes toward appetites --- we still honor the Protestant work ethic of delayed gratification and self-denial, but our economy has shifted to one dependent on lots of consumer spending. Until recently, we solved that problem by making men the producers and (middle- and upper-class) women the consumers (in the housewife role), but with the second wave of feminism that dichotomy collapsed. Bordo also draws a connection between historical periods of greater social and political freedom for women and more-restrictive beauty standards. What I liked most about her cultural explanations for eating disorders and the thin ideal is her refusal to limit herself to one "reading" of thinness. She prioritizes the different readings, of course --- she would have to, in order to avoid incoherence --- but she recognizes that beauty ideals say a lot of different things about the culture from which they come. To women who embrace the thin ideal, it's not just about looking like the models in the ads; it's also about repudiating maternity as the only destiny a woman can have, and claiming historically "masculine" virtues (those aforementioned traits of self-denial and striving) as one's own. She emphasizes, however, that these are just another aspect of the still-rigid, and still-unequal gender binary: extreme thinness is about repudiating what makes the body characteristically feminine, just as much female success is (still) achieved at the cost of uncritically accepting, and forcing oneself into, the masculine mold. I've been thinking about Bordo a lot as I've been riding the bus during rush hour. The logistics of body and space and how it relates to expectations of women are frustrating. That I (and women) are expected to tuck and pull into ourseleves on our shared seats while the man sitting next to me sprawls out and is allowed culturally to take up more space. Bordo speaks to a lot of this (maybe not within this context) and applies it to the eating disordered. Interesting stuff. I'm going to kick my legs out more often. this book was clearly written in the 1990s, and it would be really cool to hear bordo's perspective on how things have changed (if at all), and how her theories can be applied to more modern societal developments. i especially liked the chapters about hunger as ideology and the politics and power in female hunger. as someone who has suffered from it, i am often hesitant when anorexia (along with other eating disorders) is analyzed from purely psychological/analytical or theoretical lenses (which i don't think bordo tries to do, but still). i just don't think that projecting metaphors and symbols onto eds fully address their multifaceted natures and scientific backing, nor the sheer lack of logic and cognitive dissonance and endless, bordering on obsessive, compulsions that so often accompany them. a lot of the theories in this book bear quite a lot of merit, but i still think the differentiation between disordered eating and a full blown eating disorder that can affect someone for and in so many ways is something to keep in mind while engaging with bordo's text. that being said, i found this book both incredibly thought provoking and relevant; the analysis of how the female form is subconsciously categorized as passive, the commentary on historical constructions and views of the body, the politics of and power in slenderness and hunger, and the gendered nature of philosophy were especially all well written and clearly argued. bodyodyodyodyodyodyodyody ohhh my god. really enjoyable book... feminism has always been a bit (?) to me, something that ive been interested in but also distanced myself from due to the animosity(??) towards “feminists”, third wave ones in particular. how they’re always treated as outcasts, as a blue haired gal who is fighting for #freethenipple or something. but i want to change that.. i want to get to know their story . susan bordo is a terrific writer and this was the first time ive read a philosophy book and went ohhhh so these are the methods that are used in the field. bordo grounds feminism from the theoretical back into the body, physically by looking at the eating disorders “trend” in the 80s and 90s, and metaphysically by looking at how the erasure of the body in our postmodern world has led to consequences about academic thought. the body as a site of cultural anxiety, the desire for control over uncontrollable processes, where she compares the uptick in eating disorders as one that has the same roots in victorian era hysteria, but manifests in this pattern due to contemporary factors. bordos definition of postmodernism is one that involves the proliferation of images, especially through TV and advertisement, and she does a daanngg good job of looking at and breaking down advertisements. which i really wish my ereader copy showed!!! this was an incredible read. the last essay especially was fascinating to me, discussing how postmodernist deconstruction of gender and even disregard of gender as a relevant category can work to undermine the utility of using gender (even as it generalizes nuanced experience) as a tool to analyze dynamics at play in a situation. huge fan will probably read again. Susan Bordo is one of my favorite feminist theorists, and I love the way she handles politics of the body. Though originally published in the mid 80s, most of her observations about advertising, anorexia, bulimia, and body image still stand. I'm a bit of a Susan Bordo fangirl, and I love the way that she takes high theory and writes a book that is engaging, understandable, and influential. Her discussion of Foucaultian systems of control and the anorexic body are particularly spot-on, and I think the way she correlates those systems with modern advertising is particularly enlightened. This is an absolutely critical text for anyone looking to better understand the way feminism interprets body image. This collection of essays is truly amazing and eye-opening. I really enjoyed every single one. Susan Bordo does a great job of creating a dialogue about eating disorders and highlighting the many issues that surround such topics in society today. She is able to recognize them for the difficult topics that they are while also making them incredibly easy to understand and bring the reader into the topic in a way that makes you question "Why haven't we looked at it like this before?" Would definitely recommend to anyone looking for an enlightening, educational read. Much better than the excerpts have led me to believe; I particularly enjoyed the chapter on reproductive rights and the critique of postmodern disembodiment in theory. Highly recommended and quite relevant. I’m not totally sure how you can start a book with an essay on how women, upon becoming pregnant, are treated as less than human in the eyes of medicine and the law, and then end the book praising a philosopher pretender who says all gender is performance. Overall this is heavily academic, and if you want to fully comprehend the meaning I suggest you be first familiar with Foucault since he is heavily referenced. The writing itself is unnecessarily circuitous. Bordo’s sentence construction approach is like taking a walk through a forest, then upon seeing a bird stopping to admire it, and upon finding a brook crossing it and then coming back over it (with many interjected thoughts in parentheses) before finally stepping back on the path to end the sentence. Her writing style is very dense. I picked up this book because I wanted a deeper understanding of my personal body image issues. I do have many pages bookmarked for later journaling. It’s really quite shocking how relevant a book written nearly 30 years ago still is. In one of the essays, I was particularly shocked to discover that anorexics often will desire to surgically mutilate themselves to remove the male gaze. Incredible how much we are still affected by attempts to control how we are perceived. What I was also interested to learn about were the pre-Dove adverts promoting body diversity. The body positivity movement often suggests Dove as the first, but apparently that is not quite true. In relation, I am very interested to explore how the Fat Acceptance movement fits into Bordo’s framework. It’s all very interesting to consider current social issues in the context of this work. One thing I will take umbrage with Bordo on is that I do not feel she accurately represented bodybuilding. She merely shows one advert of a woman’s shoulder doing what is supposed to be pull-ups. My perception of bodybuilding is really in the context of bodybuilding competitions where women will build a lot of muscle and diet down to a very low body fat percentage. This does not seem to be the definition Susan is using. My one other complaint about the book is the later chapters are all about post-modernism and not necessarily directly about dealing with women’s bodies. So if you are reading this book with similar purpose to mine, you may wish to just skip the post-modern essays. The essays, however, are insightful to the current culture more broadly. A beach read this is not. Pick up this book prepared to work, highlight, make a few notes, discuss with your compatriots, even be frustrated with the author from time to time. But do pick it up! The work is dated in some respects (you will see more eighties tailoring in these pages then many of us have encountered in our entire lives...) but still excruciatingly relevant. A savvy reader can generate a wealth of examples from their daily lives that are equally astute if they find the jell-o and shoulder pads too much of a distraction. Bordo gives an unapologetically intellectual and academically rigorous underpinning beneficial to 2017's "#feminism" as well as trenchant articulation to many of the subjects that give modern women pause. Bordo's discussion of intersectionality has not aged gracefully, but the tenth anniversary edition has also resisted the urge to "correct" the record with surgical excision. The author remains refreshingly true to her argument in this. Bordo does not wallow in her outrage. The authorial voice when detailing the stark differences in judicial opinions of male vs. female physical integrity, the portrayal of their diverse "desires" in place of "wishes", or a student mocking his girlfriend for not weighing 110lbs, remains neutral and well-informed. As well, the work is painstakingly annotated and well grounded in the literature, and so if this is a gateway piece of feminist academia, it is also a roadmap to the rest of the state of the art. Find a quiet evening (or several) and pace yourself-- it is worth it. I'm not sure if it's because I chose to read this front to back, but while I found this book interesting and informative at the onset, by the end it felt a bit like re-treading the same points over and over again. This book has a great deal of information in it, but it is dense and academic as hell. It should be noted that this book does show its age. I read through it dreading the mention of queer folk - I don't know whether Bordo is a TERF or not, but I am always frightened to learn about where feminists of her generation stand on that point. I think it should also be noted, although Bordo identifies some issues that specifically affect people of colour (and particularly women of colour), this book still didn't quite seem to fully engage with those issues, often treating them as a side note rather than worthy of a full essay. I'm torn over this book . The subject matter, whilst fascinating and of huge interest to me, felt overblown and inflated by Bordo's (only in my opinion) unnecessary use of grandiose and florid language to accentuate her points. I'm no eejit like (!!!) but I felt utterly unintelligent when reading particular sections of this book. Bordo's obsession with postmodernism for example and her scathing remarks about fellow female authors on contemporary feminist literature felt entirely unnecessary. Surely all feminist experience is subjective (as Bordo herself points out) and open to interpretation. Whilst the concepts first presented were of major interest, I felt as if I had to swim through a treacle of pretension to arrive where I wanted to be with this book. Never mind. In this legendary book, Bordo is successful in maintaining the balance between the abstract philosophical thought and social criticism that is aimed to tangible issues that we are all exposed to everyday. While there are some tendencies to romanticize subjectivity, Bordo has nevertheless given us a sight to problems we might not have seen before. The discussion of a (female) human body in this book challenges both our biased cultural and scientific point of view that omits women's struggles within their own bodies. Can't say much else other than: 'Wow!' An excellent and spot-on book written on the subject of women's body image in Western culture. Only downside might be the third and final section of the edition of the book I read veers more into philosophy than sociology, anthropology, and (bio)psychology, but still covers some important ground related to the latter three fields. Would highly recommend for women struggling to understand their own body image issues and for those looking to help someone with body image issues. While full of interesting facts and ideas, the book, at least for me, doesn't live up, from a 2017 point of view, to its expectations. The ideas within it were so implemented that now it feels more like an historical artifact than as a still revealing addition. One point of interest still remains highly illuminating, though, and it is the article "Anorexia Nervosa", especially regarding its thesis of sexual boundry crossing, in terms of the anorexic body. This was both difficult to read and difficult to finish. It's essentially required reading when you're going to later be engaging in rhetoric about the body and trauma, but it is definitely a product of its time. Offers some genuinely interesting insight into the split between mind and body, and does succeed at making theory more accessible and easily understandable. It just doesn't withstand the test of time imo. Loved the first two thirds - but disagreed with and thought that the last third of the book was uniformed and played into toxic white feminism. I enjoyed the critique and unpacking of anorexia and the female body, especially with the western correlation of female hunger and sexual desire. Definitely not for the faint of heart!! Anorexia will erupt, typically, in the course of what begins as a fairly moderate diet regime, undertaken because someone, often the father, has made a casual critical remark. Anorexia begins in, emerges out of, what is, in our time, conventional feminine practice. Bordo's book is filled with self-reflexive insights about how the body has been framed through Western philosophy and it's consequences for both men and women. A significant book for researchers interested in gender studies.
english
<filename>src/common/checker/id.js<gh_stars>10-100 function isValidId (id) { return typeof id === 'string' && /^[0-9a-fA-F]{24}$/.test(id) } module.exports = { isValidId }
javascript
{ "directions": [ "Place beets in large bowl; press with paper towels to absorb any moisture. In another large bowl, whisk flour and next 5 ingredients. Mix in beets, then eggs.", "Pour enough oil into large skillet to cover bottom; heat over medium heat. Working in batches, drop beet mixture by 1/4 cupfuls into skillet; spread to 3 1/2-inch rounds. Fry until golden, about 5 minutes per side. Transfer latkes to baking sheet. (Can be made 6 hours ahead. Let stand at room temperature. Rewarm in 350\u00b0F oven until crisp, about 10 minutes.)", "Serve latkes with relish and salsa." ], "ingredients": [ "6 cups coarsely shredded peeled beets (about 6 medium)", "6 tablespoons all purpose flour", "1 1/2 teaspoons salt", "1 1/2 teaspoons ground cumin", "3/4 teaspoon ground coriander", "3/4 teaspoon baking powder", "1/4 teaspoon ground black pepper", "3 large eggs, beaten to blend", "Canola oil (for frying)", "Celery and Cilantro Relish", "Apple, Green Onion, and Jalape\u00f1o Salsa" ], "language": "en-US", "source": "www.epicurious.com", "tags": [ "Cake", "Vegetable", "Appetizer", "Fry", "Hanukkah", "Quick & Easy", "Beet", "Winter", "Pan-Fry", "Kosher", "Coriander", "Sugar Conscious", "Kidney Friendly", "Vegetarian", "Pescatarian", "Dairy Free", "Peanut Free", "Tree Nut Free", "Soy Free", "No Sugar Added" ], "title": "Cumin-Scented Beet Latkes", "url": "http://www.epicurious.com/recipes/food/views/cumin-scented-beet-latkes-231262" }
json
Brittney Griner pleaded guilty to drug charges in a Russian court on Thursday. The two-time Olympic gold medalist was arrested in February for allegedly trying to bring vape cartridges containing oils derived from cannabis through a Moscow airport. "I'd like to plead guilty, your honor. But there was no intent. I didn't want to break the law," she said in court, via Reuters. "I'd like to give my testimony later. I need time to prepare," she added. Griner’s guilty plea comes just one day after Russia’s Foreign Ministry said during a news briefing that the WNBA star will have the ability to appeal her verdict or apply for clemency. The Foreign Ministry also disputed claims made by the U. S. that she was wrongfully detained on Feb. 17. "The court must first deliver its verdict, but no one is stopping Brittney Griner from making use of the appeal procedure and also from requesting clemency," a spokesperson for the ministry said, adding that "attempts to present her case as though the American woman was illegally detained do not stand up to criticism. " Rebekah Koffler, a Russian-born former U. S. intelligence officer and expert on Russia and Vladimir Putin, told Fox News Digital on Wednesday that it would be unlikely for Putin to grant Griner clemency in such a highly charged case and her detention would more than likely be used as a bargaining chip for a prison swap or more. "Putin and the Kremlin want to exchange Brittney Griner for Viktor Bout, the ‘Merchant of Death,’ no one else. They will drag on the entire process, including appeal, simply as a negotiating tool to get what they want out of the Biden administration," she explained. "Bottom line, Putin will use Ms. Griner for his negotiating leverage in a prisoner swap case or something else. The more news this case makes here in the U. S. , stirring emotions, the deeper the Russians will dig in their heels, demanding exchange for Bout or some other concessions. They know our hot buttons. " Following news of Griner's guilty plea, Koffler added Thursday that she believes she is "doing the right thing" despite being involved in a "sham" trial. "The Russians are in charge. Brittney needs to hang tough and have faith that the U. S. government will do everything to get her out. " She added that engaging in a prisoner swap to bring Griner home could be risky in that it would only "embolden Russia spy services to grab more Americans on their territory who unwittingly break Russian laws" but she has "sympathy" for her situation. "I wouldn’t want any American to be in a Russian prison. Bottom line, have faith and pray. " The White House confirmed Wednesday that President Joe Biden spoke with Griner’s wife and are actively "working to secure Brittney’s release as soon as possible, as well as the release of Paul Whelan and other U. S. nationals who are wrongfully detained or held hostage in Russia and around the world. " Griner, who has played in Russia for the last seven years during the WNBA offseason, could face up to 10 years in prison. Her next court hearing is scheduled for July 14.
english
<gh_stars>0 package org.emmanet.controllers; /* * #%L * InfraFrontier * $Id:$ * $HeadURL:$ * %% * Copyright (C) 2015 EMBL-European Bioinformatics Institute * %% * 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. * #L% */ /** * * @author phil */ import java.io.UnsupportedEncodingException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import javax.mail.MessagingException; import javax.mail.internet.MimeMessage; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.velocity.app.VelocityEngine; import org.emmanet.jobs.WebRequests; import org.emmanet.model.AllelesDAO; import org.emmanet.model.ArchiveDAO; import org.emmanet.model.ArchiveManager; import org.emmanet.model.BackgroundManager; import org.emmanet.model.BibliosDAO; import org.emmanet.model.BibliosManager; import org.emmanet.model.BibliosStrainsDAO; import org.emmanet.model.CVRtoolsDAO; import org.emmanet.model.CategoriesDAO; import org.emmanet.model.CategoriesManager; import org.emmanet.model.CategoriesStrainsDAO; import org.emmanet.model.GenesDAO; import org.emmanet.model.GenesManager; import org.emmanet.model.LaboratoriesManager; import org.emmanet.model.LabsDAO; import org.emmanet.model.MutationsDAO; import org.emmanet.model.MutationsManager; import org.emmanet.model.MutationsStrainsDAO; import org.emmanet.model.OmimDAO; import org.emmanet.model.OmimManager; import org.emmanet.model.PeopleDAO; import org.emmanet.model.PeopleManager; import org.emmanet.model.ProjectsStrainsDAO; import org.emmanet.model.ProjectsStrainsManager; import org.emmanet.model.RToolsDAO; import org.emmanet.model.RToolsManager; import org.emmanet.model.ResiduesDAO; import org.emmanet.model.ResiduesManager; import org.emmanet.model.SourcesStrainsManager; import org.emmanet.model.Sources_StrainsDAO; import org.emmanet.model.StrainsDAO; import org.emmanet.model.StrainsManager; import org.emmanet.model.Strains_OmimDAO; import org.emmanet.model.Strains_OmimManager; import org.emmanet.model.SubmissionBibliosDAO; import org.emmanet.model.SubmissionMutationsDAO; import org.emmanet.model.SubmissionsDAO; import org.emmanet.model.SubmissionsManager; import org.emmanet.model.Syn_StrainsDAO; import org.emmanet.model.Syn_StrainsManager; import org.emmanet.util.Encrypter; import org.emmanet.util.PubmedID; import org.json.simple.*; import org.springframework.mail.javamail.JavaMailSender; import org.springframework.mail.javamail.MimeMessageHelper; import org.springframework.ui.velocity.VelocityEngineUtils; import org.springframework.validation.Errors; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.AbstractWizardFormController; public class SubmissionFormController extends AbstractWizardFormController { private List cvDAO; private HttpSession session; private JSONObject obj; private List JSONobjects = new LinkedList(); private WebRequests wr; private Encrypter encrypter = new Encrypter(); private List stepTitles; private JavaMailSender javaMailSender; private VelocityEngine velocityEngine; private boolean action; private static String BASEURL;// = Configuration.get("BASEURL"); private String[] Cc; public SubmissionFormController() { setCommandName("command"); setAllowDirtyBack(true); // setAllowDirtyForward(true); action = true; } @Override protected Object formBackingObject(HttpServletRequest request) { action = true; setBindOnNewForm(true); String idDecrypt = ""; System.out.println("AT THE FORMBACKING OBJECT"); StrainsDAO sd = new StrainsDAO(); SubmissionsDAO sda = new SubmissionsDAO(); wr = new WebRequests(); SubmissionsManager sm = new SubmissionsManager(); System.out.println("FBO ACTION = " + action); if (request.getParameter("getprev") != null) { idDecrypt = encrypter.decrypt(request.getParameter("getprev")); if (request.getParameter("recall_window").equals("Yes") && action) { sda = sm.getSubByID(Integer.parseInt(idDecrypt)); if (sda.getStep().equals("-2")) { System.out.println("ok prevsub is -1"); //lets give them their user details only SubmissionsDAO newSub = new SubmissionsDAO(); newSub.setPer_id_per(sda.getPer_id_per()); newSub.setPer_id_per_contact(sda.getPer_id_per_contact()); newSub.setPer_id_per_sub(sda.getPer_id_per_sub()); // request.setAttribute("previousSub", newSub); newSub.setStep("4"); sda = newSub; } System.out.println("NEW RECALLED SUBMISSIONS DAO ID IS:: " + sda.getId_sub()); System.out.println("g e t p r e v::" + idDecrypt); System.out.println("PREVIOUS STRAIN NAME IS :: " + sda.getStrain_name()); System.out.println("PREVIOUS STEP IS :: " + sda.getStep()); } } BackgroundManager bm = new BackgroundManager(); String getprev = ""; session = request.getSession(true); session.setAttribute("BASEURL", getBASEURL()); //total steps in wizard for use in view int iPageCount = getPageCount() - 1; session.setAttribute("totalStepCount", "" + iPageCount); session.setAttribute("stepTitles", "" + stepTitles); sda.setCvDAO(wr.isoCountries()); sd.setPeopleDAO(new PeopleDAO()); sd.getPeopleDAO().setLabsDAO(new LabsDAO()); sda.setCvDAO(wr.isoCountries()); CategoriesManager categoriesManager = new CategoriesManager(); session.setAttribute("backgroundsDAO", bm.getCuratedBackgrounds()); sda.setBgDAO(bm.getCuratedBackgrounds()); session.setAttribute("categoriesDAO", categoriesManager.getCategoryListCurated("Y")); sda.setCatDAO(categoriesManager.getCategoryListCurated("Y")); return sda; } @Override protected Map referenceData(HttpServletRequest request, Object command, Errors errors, int page) throws Exception { System.out.println("reference data method called - getprev is " + request.getParameter("getprev")); SubmissionsDAO sda = new SubmissionsDAO(); sda = (SubmissionsDAO) command; System.out.println("SDA sent to command value of id_sub is::" + sda.getId_sub()); SubmissionsManager sm = new SubmissionsManager(); encrypter = new Encrypter(); System.out.println("REF DATA ACTION = " + action); if (request.getParameter("getprev") != null) { if (request.getParameter("recall_window").equals("Yes") && action) { System.out.println("REF DATA NEW RECALLED SUBMISSIONS DAO ID IS:: " + sda.getId_sub()); System.out.println("REF DATA PREVIOUS STRAIN NAME IS :: " + sda.getStrain_name()); System.out.println("REF DATAPREVIOUS STEP IS :: " + sda.getStep()); int stepRef = Integer.parseInt(sda.getStep()); page = stepRef - 1; action = false; } } Map refData = new HashMap(); int pageCount = page; session.setAttribute("pageCount", "" + pageCount); session.setAttribute("userdaos", null); PeopleDAO pd; PeopleManager pm; List people; List peopleDAOs; System.out.println("SUBID:: = " + sda.getId_sub()); switch (page) { case 0: //if page 1 , do summat sda.setStep("0"); //sm.save(sda); break; case 1: //if page 2 do summat //sm.save(sda); sda.setStep("1"); break; case 2: encrypter = new Encrypter(); if (sda.getSubmitter_email()/*.getPeopleDAO().getEmail()*/ != null) { wr = new WebRequests(); SubmissionsDAO prevSub = new SubmissionsDAO(); List submitterDAO = new LinkedList(); System.out.println(" email for prevsub = " + sda.getSubmitter_email().toString()); /*prevSub*/ submitterDAO = sm.getSubsByEmail(sda.getSubmitter_email().toString()); if (/*prevSub*/submitterDAO != null) { for (Iterator it = submitterDAO.listIterator(); it.hasNext();) { prevSub = (SubmissionsDAO) it.next(); System.out.println("TIMESTAMP :: " + prevSub.getTimestamp() + " step is ::- " + prevSub.getStep()); encrypter = new Encrypter(); // Encrypt String encrypted = encrypter.encrypt(prevSub.getId_sub()); if (encrypted.isEmpty() || encrypted != null) { session.setAttribute("getprev", encrypted); } else { //do nothing } if (prevSub.getStep().equals("-1")) { System.out.println("ok prevsub is -1"); //lets give them their user details only SubmissionsDAO newSub = new SubmissionsDAO(); newSub.setPer_id_per(prevSub.getPer_id_per()); newSub.setPer_id_per_contact(prevSub.getPer_id_per_contact()); newSub.setPer_id_per_sub(prevSub.getPer_id_per_sub()); // request.setAttribute("previousSub", newSub); newSub.setStep("5"); prevSub = newSub; } prevSub.setEncryptedId_sub(encrypted); prevSub.setCvDAO(wr.isoCountries()); //setting all per_id_per, per_id_per_contact and per_id_per_sub id's to 0 to ensure a new user and lab is created for each. prevSub.setPer_id_per(0); prevSub.setPer_id_per_contact(0); prevSub.setPer_id_per_sub(0); sm.save(prevSub); request.setAttribute("previousSub", prevSub); } } //request.setAttribute("previousSub", /*prevSub*/); //LOOK TO PULL USER/LAB DATA TO POPULATE STRAINS pd = new PeopleDAO(); pm = new PeopleManager(); System.out.println("SUBMITTER EMAIL IS:::---" + sda.getSubmitter_email()); people = pm.getPeopleByEMail(sda.getSubmitter_email()/*sd.getPeopleDAO().getEmail()*/); peopleDAOs = new LinkedList(); if (people.isEmpty()) { //OK no email address registered most likely a new user so let them submit their details //need to populate a new people entry to grab per_id_per } else { //OK email exists and likely user so present a view of user'lab details to choose from //NEED TO PULL LAST SUBMISSION FROM DATABASE SUBMISSIONS TABLE USING E-MAIL SUBMITTER ADDRESS //RETURN TO USER TO CHOOSE WHETHER TO RE-USE DATA. // sda=submissions manager.getlast submission. System.out.println("PERSON LIST SIZE " + people.size()); JSONobjects = new LinkedList(); peopleListLoop: for (Iterator it = people.listIterator(); it.hasNext();) { pd = (PeopleDAO) it.next(); System.out.println("A U T H O R I T Y : : " + pd.getLabsDAO().getAuthority()); //RESTRICT PEOPLE LISTING ONLY TO AUTHORISED LIST if (pd.getLabsDAO().getAuthority() != null) { //peopleDAOs.add(pd); commented out to prevent re-use of people details which is causing issues } else { // peopleDAOs.add(pd); //person not authorised to pick addresses but we need to populate submitter per_id_per_sub with id sda.setPer_id_per_sub(0/*Integer.parseInt(pd.getId_per())*/);//setting people id to 0 to ensure a new user is created each time break peopleListLoop; } } /*session*/ request.setAttribute("userdaos", peopleDAOs); } } System.out.println("STEP==" + sda.getStep()); sda.setStep("2"); if (!errors.hasErrors()) { // sm.save(sda); } break; case 3: org.emmanet.controllers.SubmissionFormValidator sfv = new SubmissionFormValidator(); if (sda.getProducer_email()/*.getPeopleDAO().getEmail()*/ != null) { //LOOK TO PULL USER/LAB DATA TO POPULATE STRAINS pd = new PeopleDAO(); pm = new PeopleManager(); people = pm.getPeopleByEMail(sda.getProducer_email()/*.getPeopleDAO().getEmail()*/); peopleDAOs = new LinkedList(); if (people.isEmpty()) { //OK no email address registered most likely a new user so let them submit their details } else { //OK email exists and likely user so present a view of user'lab details to choose from System.out.println("PERSON LIST SIZE " + people.size()); JSONobjects = new LinkedList(); peopleListLoopProducer: for (Iterator it = people.listIterator(); it.hasNext();) { pd = (PeopleDAO) it.next(); if (pd.getLabsDAO().getAuthority() != null) { peopleDAOs.add(pd); } else { // peopleDAOs.add(pd); //person not authorised to pick addresses but we need to populate producer per_id_per with id //we'll take the first and discard the rest sda.setPer_id_per(Integer.parseInt(pd.getId_per())); break peopleListLoopProducer; } } session.setAttribute("pidaos", peopleDAOs); } } sda.setStep("3"); //sfv.validateSubmissionForm2(sda, errors, BASEURL); System.out.println("ABOUT TO SAVE AT STEP 3"); if (!errors.hasErrors()) { sm.save(sda); } break; case 4: if (sda.getShipper_email() != null) { //LOOK TO PULL USER/LAB DATA TO POPULATE STRAINS pd = new PeopleDAO(); pm = new PeopleManager(); people = pm.getPeopleByEMail(sda.getShipper_email()/*.getPeopleDAO().getEmail()*/); peopleDAOs = new LinkedList(); if (people.isEmpty()) { //OK no email address registered most likely a new user so let them submit their details } else { //OK email exists and likely user so present a view of user'lab details to choose from System.out.println("PERSON LIST SIZE " + people.size()); JSONobjects = new LinkedList(); peopleListLoopShipper: for (Iterator it = people.listIterator(); it.hasNext();) { pd = (PeopleDAO) it.next(); if (pd.getLabsDAO().getAuthority() != null) { peopleDAOs.add(pd); } else { // peopleDAOs.add(pd); //person not authorised to pick addresses but we need to populate shipper per_id_per with id //we'll take the first and discard the rest sda.setPer_id_per_contact(Integer.parseInt(pd.getId_per())); break peopleListLoopShipper; } } session.setAttribute("pidaos", peopleDAOs); //refData.put("pi", peopleDAOs); } } sda.setStep("4"); System.out.println("ABOUT TO SAVE AT STEP 4"); if (!errors.hasErrors()) { sm.save(sda); } break; case 5: encrypter = new Encrypter(); // Encrypt String encrypted = encrypter.encrypt(sda.getId_sub()); session.setAttribute("getprev", encrypted); sda.setStep("5"); if (!errors.hasErrors()) { sm.save(sda); } break; case 6: sda.setStep("6"); if (!errors.hasErrors()) { sm.save(sda); } break; case 7: System.out.println("DAO ref==" + sda.hashCode()); if (request.getParameter("getprev") != null && !request.getParameter("getprev").isEmpty()) { // sda = new SubmissionsDAO(); sda = previousSubmission(sda, request.getParameter("getprev")); //command..equals(sda); sda = (SubmissionsDAO) command; System.out.println("DAO ref2==" + sda.hashCode()); System.out.println("new ID sub==" + sda.getId_sub()); //sda.setStep("7"); //sm.save(sda); } else { sda.setStep("7"); if (!errors.hasErrors()) { sm.save(sda); } } break; case 8: sda.setStep("8"); if (!errors.hasErrors()) { sm.save(sda); } break; case 9: sda.setStep("9"); if (!errors.hasErrors()) { sm.save(sda); } break; case 10: CVRtoolsDAO rt = new CVRtoolsDAO(); StrainsManager smg = new StrainsManager(); List rtl = new LinkedList(); List CVRtoolsDAO = new LinkedList(); rtl = smg.getRTools();//.getRToolsDAO(); for (Iterator it = rtl.listIterator(); it.hasNext();) { rt = (CVRtoolsDAO) it.next(); if (!rt.getDescription().isEmpty()) { CVRtoolsDAO.add(rt); } } session.setAttribute("CVRToolsDAO", CVRtoolsDAO); sda.setStep("10"); if (!errors.hasErrors()) { sm.save(sda); } break; case 11: DateFormat dateFormat = new SimpleDateFormat("yyyy"); Date date = new Date(); session.setAttribute("startYear", dateFormat.format(date)); //get possible multiple rtools values from previous step 10 if (request.getParameterValues("research_tools") != null) { String[] rtoolsValues = request.getParameterValues("research_tools"); String RTools = ""; StringBuffer RToolsConcat = new StringBuffer(""); System.out.println("RTOOLS VALUES::"); for (String s : rtoolsValues) { System.out.println(s); RToolsConcat = new StringBuffer(RToolsConcat).append(s).append(":"); } if (RToolsConcat.toString().endsWith(":")) { int i = RToolsConcat.lastIndexOf(":"); RTools = RToolsConcat.toString().substring(0, i); System.out.println(RTools); } sda.setResearch_tools(RTools); } if (request.getParameterValues("research_areas") != null) { String[] categories = request.getParameterValues("research_areas"); String cats = ""; StringBuffer catsConcat = new StringBuffer(""); System.out.println("CATS VALUES::"); for (String s : categories) { System.out.println(s); catsConcat = new StringBuffer(catsConcat).append(s).append(":"); } if (catsConcat.toString().endsWith(":")) { int i = catsConcat.lastIndexOf(":"); cats = catsConcat.toString().substring(0, i); System.out.println(cats); } sda.setResearch_areas(cats); } sda.setStep("11"); if (!errors.hasErrors()) { sm.save(sda); } break; } refData.put("command", command); return refData; } @Override protected ModelAndView processFinish(HttpServletRequest request, HttpServletResponse response, Object command, org.springframework.validation.BindException be) throws Exception { RToolsManager rtm = new RToolsManager(); SubmissionsDAO sd = (SubmissionsDAO) command; StrainsManager stm = new StrainsManager(); System.out.println("CHECKING RECALLED SUBMISSIONDAO :-"); System.out.println(sd.getId_sub()); System.out.println(sd.getShipper_country()); System.out.println(sd.getSubmitter_firstname()); System.out.println(sd.getBreeding_performance()); System.out.println("END CHECKING RECALLED SUBMISSIONDAO :-"); if (this.isFinishRequest(request)) { //SAVE IT //DEAL WITH INTEGER FIELDS THAT MAY NOT HAVE BEEN SET HAVING '' VALUES SubmissionsManager sm = new SubmissionsManager(); System.out.println("AT THE POINT OF SAVING SUBMISSION"); sm.save(sd); } String ilarCode = ""; ilarCode = sd.getProducer_ilar(); //LOOKUP IN ILAR TABLE FOR ID // ## IMPORTANT ## INTERNAL USE ONLY DO NOT DISPLAY, LEGAL COMPLICATIONS System.out.println("ILAR CODE SUBMITTED==" + ilarCode); PeopleManager pm = new PeopleManager(); PeopleDAO pd = pm.getPerson("" + sd.getPer_id_per()); String ilarID = ""; if (ilarCode != null) { if (ilarCode != "" || !ilarCode.isEmpty()) { ilarID = pm.ilarID(ilarCode); } if (pd != null) { if (ilarID != "" || !ilarID.isEmpty()) { System.out.println("ILAR ID==" + ilarID); pd.setId_ilar(ilarID); pm.save(pd); } } else { //set ilar in submission to ilar id } } //OK now we need to take the submissions dao/submissions mutations dao and submissions biblios dao data //and start to populate a new strains dao. //might need to break this out into its own method to be accesible by restful web service for future bulk uploads StrainsDAO nsd = new StrainsDAO(); nsd.setReporting_count("1.0"); // stm.save(nsd);//need to save to get ID but this causes stalobject error when updating Date dt = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String currentDate = sdf.format(dt); nsd.setAdditional_owner(sd.getExclusive_owner_text());//TODO not exclusive owner!!!! //ARCHIVE OBJECT ArchiveDAO ad = new ArchiveDAO(); ad.setArchived(null); ad.setArchiving_method_id(null); ad.setBreeding(null); ad.setEmbryo_state(null); ad.setEvaluated(null); ad.setFemale_bg_id(null); ad.setFemales(null); ad.setFreezing_started(null); ad.setFreezingtime(null); ad.setLab_id_labo(null); ad.setMale_bg_id(null); ad.setMales(null); ad.setNotes(null); ad.setReceived(null); ad.setStr_id_str("0"); ad.setSubmitted(currentDate); ad.setTimetoarchive(null); ad.setWt_received(null); ad.setWt_rederiv_started(null); ArchiveManager am = new ArchiveManager(); am.save(ad); //END ARCHIVE OBJECT System.out.println("ARCHIVE ID IS::-" + ad.getId()); // nsd.setArchiveDAO(ad); nsd.setArchive_id(ad.getId()); //nsd.setAvailDAO(new AvailabilitiesStrainsDAO()); nsd.setAvailable_to_order("no"); nsd.setBg_id_bg(sd.getCurrent_backg() + ""); //nsd.setBackgroundDAO(new BackgroundDAO()); nsd.setBibliosstrainsDAO(new BibliosStrainsDAO()); //nsd.setCategoriesStrainsDAO(new CategoriesStrainsDAO()); nsd.setCharact_gen(sd.getGenetic_descr());//TODO NEED TO CHECK THESE AREE THE RIGHT FIELDS TO INSERT IN TO CHARACT_GEN USING OTHERTYPING/PHENO/GENO OR SUPPORTING FILE INFO nsd.setCode_internal(sd.getStrain_name()); // nsd.setDate_published(/*sd.getSubmissionBibliosDAO().getYear()*/""); nsd.setDate_published(null);//TODO GET VALUE //int i = Integer.parseInt(nsd.getId_str(); nsd.setEx_owner_description(sd.getExclusive_owner_text()); nsd.setExclusive_owner(sd.getExclusive_owner()); if (sd.getBackcrosses().equals("")) { sd.setBackcrosses(null); } nsd.setGeneration(sd.getBackcrosses()); if (sd.getSibmatings().equals("")) { sd.setSibmatings(null); } nsd.setSibmatings(sd.getSibmatings()); if (sd.getDelayed_release() != null && sd.getDelayed_release().equals("yes")) { //current date + 2 years Calendar cal = Calendar.getInstance(); cal.add(Calendar.YEAR, 2); sdf = new SimpleDateFormat("yyyy-MM-dd"); // String releaseDate = sdf.format(sdf.format(cal.getTime())); String releaseDate = sdf.format(cal.getTime()); nsd.setGp_release(releaseDate); } else { nsd.setGp_release(null); } //nsd.setHealth_status(sd.getHealth_status()); nsd.setHuman_model(sd.getHuman_condition()); nsd.setHuman_model_desc(sd.getHuman_condition_text()); // The human condition or disease nsd.setImmunocompromised(sd.getImmunocompromised()); //nsd.setLast_change(null); nsd.setMaintenance(sd.getBreeding_history()); nsd.setMgi_ref(null);//TODO GET VALUE String mutantFertile = ""; String hetHemiFertile = ""; //TODO FAILS HERE WHEN RECALLING SUBMISSION AND SUBMITTING CHECK // if (sd.getHeterozygous_fertile() != null && !sd.getHeterozygous_fertile().isEmpty() || !sd.getHomozygous_fertile().isEmpty()) { if (!sd.getHeterozygous_fertile().isEmpty()) { hetHemiFertile = sd.getHeterozygous_fertile(); } if (!sd.getHomozygous_fertile().isEmpty()) { mutantFertile = sd.getHomozygous_fertile(); } // } nsd.setMutant_fertile(mutantFertile); nsd.setHethemi_fertile(hetHemiFertile); nsd.setMutant_viable(sd.getHomozygous_viable()); nsd.setName(sd.getStrain_name()); nsd.setName_status(null); //if per ids are 0 then need to create new people/laboratory refs SubmissionsManager sMan = new SubmissionsManager(); if (sd.getPer_id_per() == 0) { int idProd = addUser(sd, "producer"); sd.setPer_id_per(idProd); //save submission sMan.save(sd); nsd.setPer_id_per("" + idProd); } else { nsd.setPer_id_per("" + sd.getPer_id_per()); } if (sd.getPer_id_per_contact() == 0) { int idShip = addUser(sd, "shipper"); sd.setPer_id_per_contact(idShip); //save submission sMan.save(sd); nsd.setPer_id_per_contact("" + idShip); } else { nsd.setPer_id_per_contact("" + sd.getPer_id_per_contact()); } if (sd.getPer_id_per_sub() == 0) { int idSub = addUser(sd, "submitter"); sd.setPer_id_per_sub(idSub); //save submission sMan.save(sd); nsd.setPer_id_per_sub("" + idSub); } else { nsd.setPer_id_per_sub("" + sd.getPer_id_per_sub()); } stm.save(nsd); String phenoTextHomo = (sd.getHomozygous_phenotypic_descr().isEmpty() ? "" : sd.getHomozygous_phenotypic_descr()); nsd.setPheno_text(phenoTextHomo.trim()); String phenoTextHetero = (sd.getHeterozygous_phenotypic_descr().isEmpty() ? "" : sd.getHeterozygous_phenotypic_descr()); nsd.setPheno_text_hetero(phenoTextHetero.trim()); nsd.setRequire_homozygous(sd.getHomozygous_matings_required()); //RESIDUES OBJECT ResiduesDAO rd = new ResiduesDAO(); rd.setAccepted(null); rd.setAccepted_date(null); rd.setAnimal_husbandry(sd.getHusbandry_requirements()); //Below already collected for strains object but still placing in residues object rd.setChar_genotyping(sd.getGenotyping()); rd.setChar_other(sd.getOthertyping()); rd.setChar_phenotyping(sd.getPhenotyping()); //Above already collected for strains object but still placing in residues object rd.setCrelox(null); rd.setCurrent_sanitary_status(sd.getSanitary_status()); rd.setDelayed_description(sd.getDelayed_release_text()); //rd.setDelayed_release(null);//date + 2 years TODO do we need to add this?? rd.setDelayed_wanted(sd.getDelayed_release()); rd.setDelayed_description(sd.getDelayed_release_text()); rd.setDelayed_release(nsd.getGp_release()); rd.setDeposited_elsewhere(sd.getDeposited_elsewhere()); rd.setDeposited_elsewhere_text(sd.getDeposited_elsewhere_text()); rd.setOwner_permission(sd.getOwner_permission()); rd.setOwner_permission_text(sd.getOwner_permission_text()); rd.setFlp(null); rd.setIp_rights(sd.getIp_rights()); rd.setIpr_description(sd.getIp_rights_text()); rd.setNumber_of_requests(sd.getPast_requests()); rd.setOther_labos(sd.getSimilar_strains()); rd.setSpecific_info(null); rd.setTet(null); rd.setWhen_how_many_females(sd.getMice_avail_females()); rd.setWhen_how_many_males(sd.getMice_avail_males()); rd.setWhen_how_many_month(sd.getMice_avail_month()); rd.setWhen_how_many_year(sd.getMice_avail_year()); rd.setWhen_mice_month(sd.getMice_avail_month()); rd.setWhen_mice_year(sd.getMice_avail_year()); rd.setHomozygous_matings_required_text(sd.getHomozygous_matings_required_text()); if (sd.getReproductive_maturity_age().equals("")) { sd.setReproductive_maturity_age(null); } rd.setReproductive_maturity_age(sd.getReproductive_maturity_age()); if (sd.getReproductive_decline_age().equals("")) { sd.setReproductive_decline_age(null); } rd.setReproductive_decline_age(sd.getReproductive_decline_age()); rd.setGestation_length(sd.getGestation_length()); rd.setPups_at_birth(sd.getPups_at_birth()); rd.setPups_at_weaning(sd.getPups_at_weaning()); if (sd.getWeaning_age().equals("")) { rd.setWeaning_age(null); } else { rd.setWeaning_age(sd.getWeaning_age()); } if (sd.getLitters_in_lifetime().equals("")) { sd.setLitters_in_lifetime(null); } rd.setLitters_in_lifetime(sd.getLitters_in_lifetime()); if (sd.getBreeding_performance().equals("")) { sd.setBreeding_performance(null); } rd.setBreeding_performance(sd.getBreeding_performance()); rd.setWelfare(sd.getWelfare()); rd.setRemedial_actions(sd.getRemedial_actions()); //END RESIDUES OBJECT //SAVE RESIDUES ResiduesManager rm = new ResiduesManager(); rm.save(rd); System.out.println("R E S I D U E S I D = = " + rd.getId()); nsd.setRes_id("" + rd.getId());//RESIDUES ID nsd.setResiduesDAO(rd); Set setRtools = new LinkedHashSet(); String rToolsToParse = sd.getResearch_tools(); rtm = new RToolsManager(); if (rToolsToParse != null) { String[] parsedRtools = rToolsToParse.split(":"); for (String s : parsedRtools) { if (s != null && !s.isEmpty()) { RToolsDAO rtd = new RToolsDAO(); System.out.println("parsed value==" + s); rtd.setRtls_id(Integer.parseInt(s)); rtd.setStr_id_str(nsd.getId_str()); System.out.println("RTOOLS STRAINS VALUES == STR_ID_STR==" + rtd.getStr_id_str() + " RTOOLS ID==" + rtd.getRtls_id()); rtm.saveUsingJDBCSQL/*saveSQL*/(Integer.parseInt(s), nsd.getId_str());//(rtd.getRtls_id(), rtd.getStr_id_str()); //rtm.saveOnly(rtd); //set add dao here setRtools.add(rtd); } } } // The OMIM ids are presented as a comma-separated list of alphanumeric characters in sd.getHuman_condition_more(). if (sd.getHuman_condition_more() != null) { OmimManager omimManager = new OmimManager(); Strains_OmimManager strains_OmimManager = new Strains_OmimManager(); String[] omims = sd.getHuman_condition_more().split(","); for (String omimRaw : omims) { String omim = omimRaw.trim(); OmimDAO omimDAO = OmimManager.findByOmim(omim); if (omimDAO == null) { // The omim doesn't yet exist. Add it to the omim table. omimDAO = new OmimDAO(); omimDAO.setOmim(omim); omimManager.save(omimDAO); } Strains_OmimDAO strainsOmniDAO = new Strains_OmimDAO(); strainsOmniDAO.setId_omim(omimDAO.getId_omim()); strainsOmniDAO.setId_strains(nsd.getId_str()); strains_OmimManager.save(strainsOmniDAO); // Add the strain/omim combination to the Strains_Omim lookup table. } } // OMIM and STRAINS_OMIM String s1 = sd.getHuman_condition(); String s2 = sd.getHuman_conditionNo(); String s3 = sd.getHuman_conditionUnknown(); String s4 = sd.getHuman_condition_more(); String s5 = sd.getHuman_condition_omim(); String s6 = sd.getHuman_condition_text(); if (sd.getDelayed_release() != null && sd.getDelayed_release().equals("yes")) { nsd.setStr_access("C"); } else { //publicly visible after PO review nsd.setStr_access("P"); } nsd.setStr_status("EVAL"); nsd.setStr_type("MSR"); //nsd.setSyn_strainsDAO(null); nsd.setUsername("EMMA"); //nsd.setWrDAO(null); stm.save(nsd);//TODO TRY/CATCH EXCEPTION System.out.println("THE ID STR OF THE NEW STRAINS DAO IS::-" + nsd.getId_str()); String emmaID = String.format("%05d", nsd.getId_str());//String.format("%05d", result); System.out.println("EMMA ID IS ::- EM:" + emmaID); nsd.setEmma_id("EM:" + emmaID);//tTODO NEED TO GET OBJECT ID BUT NEEDS TO BE SAVED FIRST stm.save(nsd); /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //ADDITIONAL OBJECTS SubmissionsManager sm = new SubmissionsManager(); MutationsManager mm = new MutationsManager(); System.out.println("ADDITIONAL OBJECTS SECTION LINE 537::" + sd.getId_sub()); List smd = sm.getSubMutationsBySUBID(Integer.parseInt(sd.getId_sub())); SubmissionMutationsDAO smdao = new SubmissionMutationsDAO(); List sbd = sm.getSubBibliosBySUBID(Integer.parseInt(sd.getId_sub())); //Set setMutationsStrainsDAO = new LinkedHashSet(); //CATEGORIES STRAINS if (sd.getResearch_areas() != null || sd.getResearch_areas() != "0") { Set setCategories = new LinkedHashSet(); String catsToParse = sd.getResearch_areas(); SubmissionsManager sbm = new SubmissionsManager(); if (catsToParse != null) { String[] parsedCats = catsToParse.split(":"); for (String s : parsedCats) { if (s != null && !s.isEmpty() && !s.equals("0")) { CategoriesStrainsDAO csd = new CategoriesStrainsDAO(); System.out.println("parsed value==" + s); System.out.println("Unparsed string is " + sd.getResearch_areas().toString()); csd.setStr_id_str(nsd.getId_str()); csd.setCat_id_cat(Integer.parseInt(s)); //sbm.save(csd);//ONLY TRIES TO UPDATE THEN FAILS BECAUSE OF UNIQUE KEY CONSTRAINT USE SQL INSERT INSTEAD //OK sql insert isn't working either, same issue as rtools need to completely bypass hibernate!! rtm.saveCategoriesUsingJDBCSQL(csd.getCat_id_cat(), csd.getStr_id_str()); //sbm.saveSQL(csd.getCat_id_cat(), csd.getStr_id_str()); //set add dao here setCategories.add(csd); //nsd.setCategoriesStrainsDAO(setCategories); } } //~~~~~~~~~nsd.setCategoriesStrainsDAO(setCategories); } } // If 'Other research areas' was specified, query the Categories table. If it doesn't exist, add it to the Categories // table (making sure the 'curated' flag is set to 'N') and return the pk. If it already exists, save the pk. // The pk is then used to add the category to the categories_strains table. if ((sd.getResearch_areas_other_text() != null) && (sd.getResearch_areas_other_text().trim().length() > 0)) { CategoriesManager categoriesManager = new CategoriesManager(); CategoriesDAO categoriesDAO; List<CategoriesDAO> categoriesDAOList = categoriesManager.findByCategoryName(sd.getResearch_areas_other_text()); if ((categoriesDAOList != null) && (categoriesDAOList.size() > 0)) { categoriesDAO = categoriesDAOList.get(0); } else { categoriesDAO = new CategoriesDAO(); categoriesDAO.setCurated("N"); categoriesDAO.setDescription(sd.getResearch_areas_other_text()); categoriesDAO.setLast_change(currentDate); categoriesDAO.setMain_cat(sd.getResearch_areas_other_text()); categoriesDAO.setUsername("EMMA"); categoriesManager.save(categoriesDAO); } rtm.saveCategoriesUsingJDBCSQL(categoriesDAO.getId_cat(), nsd.getId_str()); } //SUBMISSIONMUTATIONSDAO Set setMutationsStrainsDAO = new LinkedHashSet(); GenesManager genesManager = new GenesManager(); for (Iterator it = smd.listIterator(); it.hasNext();) { smdao = (SubmissionMutationsDAO) it.next(); String transgeneName = ""; if (!smdao.getMutation_transgene_mgi_symbol().trim().isEmpty()) { transgeneName = smdao.getMutation_transgene_mgi_symbol().trim(); } else { transgeneName = smdao.getMutation_gene_mgi_symbol(); } GenesDAO genesDAO = genesManager.getGene(transgeneName); //System.out.println("This is the value of transgene - " + transgeneName); if (genesDAO == null) { genesDAO = new GenesDAO(); // The transgene does not yet exist in the genes table. Create a new instance. genesDAO.setName(transgeneName.isEmpty() ? "Unknown at present" : transgeneName/*smdao.getMutation_transgene_mgi_symbol()*/); genesDAO.setSymbol(genesDAO.getName());//ok adds result of above so all good according to Raffaele's requirements genesDAO.setChromosome(smdao.getMutation_chrom()); genesDAO.setMgi_ref(null); genesDAO.setPromoter(smdao.getMutation_promoter()); genesDAO.setFounder_line_number(smdao.getMutation_founder_line_number()); genesDAO.setPlasmid_construct(smdao.getMutation_plasmid()); genesDAO.setCentimorgan(null); } genesDAO.setLast_change(currentDate); genesDAO.setUsername("EMMA"); mm.save(genesDAO); //Oh crap alleles needs an entry now :( AllelesDAO ald = new AllelesDAO(); ald.setUsername("EMMA"); ald.setLast_change(currentDate); ald.setName(smdao.getMutation_allele_mgi_symbol().isEmpty() ? "Unknown at present" : smdao.getMutation_allele_mgi_symbol()); //ald.setName("Unknown at present"); //ald.setAlls_form("Unknown at present"); ald.setAlls_form(smdao.getMutation_allele_mgi_symbol().isEmpty() ? "Unknown at present" : smdao.getMutation_allele_mgi_symbol()); ald.setGen_id_gene("" + genesDAO.getId_gene()); ald.setMgi_ref(null); ald.setGenesDAO(genesDAO); mm.save(ald); MutationsDAO mud = new MutationsDAO(); mud.setBg_id_bg(smdao.getMutation_original_backg()); mud.setCh_ano_desc(smdao.getMutation_chrom_anomaly_descr()); mud.setCh_ano_name(smdao.getMutation_chrom_anomaly_name()); mud.setDominance(smdao.getMutation_dominance_pattern()); mud.setMain_type(smdao.getMutation_type()); mud.setSub_type(smdao.getMutation_subtype()); mud.setMu_cause(smdao.getMutation_mutagen()); mud.setTm_esline(smdao.getMutation_es_cell_line()); mud.setChromosome(smdao.getMutation_chrom()); //mud.setGenotype(smdao.); TODO mud.setStr_id_str(nsd.getId_str() + ""); mud.setUsername("EMMA"); mud.setLast_change(currentDate); mud.setAlls_id_allel(ald.getId_allel()); mud.setAllelesDAO(ald); //SAVE MUTATION mm.save(mud); //SET call method MutationsStrainsDAO msd = new MutationsStrainsDAO(); msd.setMut_id(mud.getId()); msd.setStr_id_str(nsd.getId_str()); //createMutationStrain(mud.getId(), nsd.getId_str()); //Set msdao = (Set) mm.getMutationIDsByStrain(nsd.getId_str()); //mm.save(msd); rtm.saveMutsStrainsUsingJDBCSQL(mud.getId(), nsd.getId_str()); setMutationsStrainsDAO.add(msd); } /** * Loop through all of the bibliographic records in this strain * submission, adding each reference to the biblios table. Before * updating the pubmed_id, check first to make sure it's valid. If it is * not valid, store the biblio record but leave the pubmed_id NULL. */ for (Iterator it = sbd.listIterator(); it.hasNext();) { BibliosManager bibliosManager = new BibliosManager(); SubmissionBibliosDAO submissionBiblioDAO = (SubmissionBibliosDAO) it.next(); PubmedID pubmedID = new PubmedID(submissionBiblioDAO.getPubmed_id()); if (!pubmedID.isValid()) { submissionBiblioDAO.setPubmed_id(null); } BibliosDAO bibliosDAO = new BibliosDAO(); bibliosDAO.setAuthor1(submissionBiblioDAO.getAuthor1()); bibliosDAO.setAuthor2(submissionBiblioDAO.getAuthor2()); bibliosDAO.setJournal(submissionBiblioDAO.getJournal()); bibliosDAO.setLast_change(currentDate); // getNotes() is a cv. The 'Other' option causes a free-text box to open. String notes = (submissionBiblioDAO.getNotes().compareTo("Other") == 0 ? submissionBiblioDAO.getNotesadditional() : submissionBiblioDAO.getNotes()); bibliosDAO.setNotes(notes); bibliosDAO.setPages(submissionBiblioDAO.getPages()); bibliosDAO.setPubmed_id(submissionBiblioDAO.getPubmed_id()); bibliosDAO.setTitle(submissionBiblioDAO.getTitle()); bibliosDAO.setUpdated(null); bibliosDAO.setUsername("EMMA"); bibliosDAO.setVolume(submissionBiblioDAO.getVolume()); bibliosDAO.setYear(submissionBiblioDAO.getYear()); bibliosManager.save(bibliosDAO); BibliosStrainsDAO biblioStrainsDAO = new BibliosStrainsDAO(); biblioStrainsDAO.setBib_id_biblio(bibliosDAO.getId_biblio()); biblioStrainsDAO.setStr_id_str(nsd.getId_str()); bibliosManager.save(biblioStrainsDAO); } //Syn_strains///////////////////////////////////////////////////// Set synStrains = new LinkedHashSet(); Syn_StrainsDAO ssd = new Syn_StrainsDAO(); ssd.setStr_id_str(nsd.getId_str()); System.out.println("STRING ID FROM STRAINS OBJECT==" + ssd.getStr_id_str()); if (nsd.getName().length() > 100) { /* * need to truncate name to avoid issues with length difference in tables strain (varchar 500) and syn_strains (varchar 100) * altering field size in syn_strains causes issues with UNIQUE KEY `syn_strains_uk` (`name`,`str_id_str`) only allowed a max key length is 767 bytes * bug with our mysql instances which has not been resolved by dba's * */ String synName = nsd.getName().substring(0, 100); ssd.setName(synName); } else { ssd.setName(nsd.getName()); } ssd.setUsername("EMMA"); ssd.setLast_change(currentDate); //stm.save(nsd); //need a syn_strains manager to save new Syn_StrainsDAO Syn_StrainsManager ssm = new Syn_StrainsManager(); ssm.save(ssd); synStrains.add(ssd); //~~~~~~~~~~~~~nsd.setSyn_strainsDAO(synStrains); ///////////////////////////////////////////////////////////////////////// /////////stm.save(nsd); //projects - set all to unknown(id 1) or COMMU(id 2) Set projectsStrains = new LinkedHashSet(); ProjectsStrainsDAO psd = new ProjectsStrainsDAO(); psd.setProject_id(2); psd.setStr_id_str(nsd.getId_str()); ProjectsStrainsManager psm = new ProjectsStrainsManager(); psm.save(psd); projectsStrains.add(psd); //~~~~~~~~~~~~~~~~ nsd.setProjectsDAO(projectsStrains); //need to save and recall saved strains object as for some reason if I try to set the source strains here without doing this it throws an error. // stm.save(nsd); nsd = stm.getStrainByID(nsd.getId_str()); //associate uploaded file prefix with new strain id by adding sub_id_sub nsd.setSub_id_sub(sd.getId_sub()); Set sourcesStrains = new LinkedHashSet(); Sources_StrainsDAO srcsd = new Sources_StrainsDAO(); Calendar rightNow = Calendar.getInstance(); // note that months start from 0 and days from 1 so 6 is July etc Calendar cal1start = Calendar.getInstance(); cal1start.set(Calendar.YEAR, 2013); cal1start.set(Calendar.MONTH, 0); cal1start.set(Calendar.DAY_OF_MONTH, 1); Calendar cal1end = Calendar.getInstance(); cal1end.set(Calendar.YEAR, 2014); cal1end.set(Calendar.MONTH, 5); cal1end.set(Calendar.DAY_OF_MONTH, 30); Calendar cal2start = Calendar.getInstance(); cal2start.set(Calendar.YEAR, 2014); cal2start.set(Calendar.MONTH, 6); cal2start.set(Calendar.DAY_OF_MONTH, 1); Calendar cal2end = Calendar.getInstance(); cal2end.set(Calendar.YEAR, 2015); cal2end.set(Calendar.MONTH, 11); cal2end.set(Calendar.DAY_OF_MONTH, 31); Calendar cal3start = Calendar.getInstance(); cal3start.set(Calendar.YEAR, 2016); cal3start.set(Calendar.MONTH, 0); cal3start.set(Calendar.DAY_OF_MONTH, 1); Calendar cal3end = Calendar.getInstance(); cal3end.set(Calendar.YEAR, 2016); cal3end.set(Calendar.MONTH, 11); cal3end.set(Calendar.DAY_OF_MONTH, 31); if (rightNow.after(cal1start) && rightNow.before(cal1end)) { srcsd.setSour_id(45);//I3-p1 } else if (rightNow.after(cal2start) && rightNow.before(cal2end)) { srcsd.setSour_id(46);//I3-p2 } else if (rightNow.after(cal3start) && rightNow.before(cal3end)) { srcsd.setSour_id(47);//I3-p3 } System.out.println("source is " + srcsd.getSour_id()); srcsd.setStr_id_str(nsd.getId_str()); SourcesStrainsManager srcsm = new SourcesStrainsManager(); srcsm.save(srcsd); sourcesStrains.add(srcsd); //~~~~~~~~~~~nsd.setSources_StrainsDAO(sourcesStrains); System.out.println("" + srcsd.getStr_id_str()); System.out.println("F I N A L S A V E :: -- " + nsd.getId_str() + " EMMA ID ++ " + nsd.getEmma_id()); stm.save(nsd); //MAIL OUT AND PDF ATTACHMENT + PDF LINK System.out.println("STARTING MAILOUT"); Map model = new HashMap(); model.put("emailsubmitter", sd.getSubmitter_email()); model.put("strainname", nsd.getName()); model.put("strainid", nsd.getId_str()); model.put("encid", encrypter.encrypt("" + nsd.getId_str()));//encryptedstrainid model.put("BASEURL", BASEURL); String velocTemplate = "org/emmanet/util/velocitytemplates/SubmissionFormReceipt-Template.vm"; String content = VelocityEngineUtils.mergeTemplateIntoString(getVelocityEngine(), velocTemplate, model); MimeMessage message = getJavaMailSender().createMimeMessage(); try { MimeMessageHelper helper = new MimeMessageHelper(message, true, "UTF-8"); helper.setReplyTo("<EMAIL>"); helper.setFrom("<EMAIL>"); helper.setBcc("<EMAIL>"); helper.setCc(Cc); helper.setTo(model.get("emailsubmitter").toString().trim()); helper.setSubject("Your submission to EMMA of strain " + model.get("strainname").toString()); helper.setText(content); System.out.println(message.getContent().toString()); getJavaMailSender().send(message); } catch (MessagingException ex) { ex.printStackTrace(); } catch (Exception ce) { logger.warn("Unable to send submission e-mail: " + ce.getLocalizedMessage()); } //ok submission pretty much complete, let's now set the step to the last position for user details //sd.setStep("-1"); //System.out.println("Step is::-" + sd.getStep()); sm.save(sd); return new ModelAndView("/publicSubmission/success"); } @Override protected ModelAndView processCancel(HttpServletRequest request, HttpServletResponse response, Object command, org.springframework.validation.BindException errors) throws Exception { return new ModelAndView("/publicSubmission/cancel"); } @Override protected void validatePage(Object command, Errors errors, int page) { SubmissionFormValidator validator = (SubmissionFormValidator) getValidator(); SubmissionsDAO sd = (SubmissionsDAO) command; //page is 0-indexed switch (page) { case 0: //if page 1 , go validate with validatePage1Form validator.validateSubmissionForm(sd, errors); break; case 1: //if page 2 , go validate with validatePage2Form //validator.validatePage2Form(command, errors); //validator.validateSubmissionForm2(sd, errors,"submitter"); //validator.validateSubmissionForm0(sd, errors); validator.validateSubmissionForm0(sd, errors); break; case 2: validator.validateSubmissionForm1(sd, errors, "submitter"); break; case 3: validator.validateSubmissionForm1(sd, errors, "producer"); break; case 4: //uses validator 2 to redice code duplication validator.validateSubmissionForm1(sd, errors, "shipper"); break; case 5: validator.validateSubmissionForm4(sd, errors); break; case 6: validator.validateSubmissionForm5(sd, errors); break; case 7: validator.validateSubmissionForm6(sd, errors); break; case 8: validator.validateSubmissionForm7(sd, errors); break; case 9: validator.validateSubmissionForm8(sd, errors); break; case 10: validator.validateSubmissionForm9(sd, errors); break; case 11: validator.validateSubmissionForm10(sd, errors); break; } } public List getCvDAO() { return cvDAO; } public void setCvDAO(List cvDAO) { this.cvDAO = cvDAO; } public SubmissionsDAO cleanInts(SubmissionsDAO sd) { return null; } public void PeopleData(HttpServletRequest request, String email, boolean returnJSON) { session = request.getSession(true); PeopleDAO pd = new PeopleDAO(); PeopleManager pm = new PeopleManager(); List people = pm.getPeopleByEMail(email); List peopleDAOs = new LinkedList(); obj = new JSONObject(); if (people.isEmpty()) { //Do nothing } else { System.out.println("PEOPLEDATA FUNCTION CALLED AND THE PERSON LIST SIZE IS " + people.size()); JSONobjects = new LinkedList(); for (Iterator it = people.listIterator(); it.hasNext();) { pd = (PeopleDAO) it.next(); peopleDAOs.add(pd); if (returnJSON) { //return a JSON String obj.put("id", pd.getId_per()); obj.put("title", pd.getTitle()); obj.put("firstname", pd.getFirstname()); obj.put("surname", pd.getSurname()); obj.put("email", pd.getEmail()); obj.put("phone", pd.getPhone()); obj.put("fax", pd.getFax()); obj.put("ilar", pd.getId_ilar()); //laboratory details obj.put("institution", pd.getLabsDAO().getName()); obj.put("dept", pd.getLabsDAO().getName()); obj.put("address1", pd.getLabsDAO().getAddr_line_1()); obj.put("address2", pd.getLabsDAO().getAddr_line_2()); obj.put("town", pd.getLabsDAO().getTown()); obj.put("county", pd.getLabsDAO().getProvince()); obj.put("postcode", pd.getLabsDAO().getPostcode()); obj.put("country", pd.getLabsDAO().getCountry()); obj.put("authority", pd.getLabsDAO().getAuthority()); System.out.println(obj.toString()); //return obj.toString(); } } session.setAttribute("pidaos", peopleDAOs); } } public SubmissionsDAO previousSubmission(SubmissionsDAO sd, String encryptedID) throws UnsupportedEncodingException { //String getprev = ""; Encrypter encrypter = new Encrypter(); String getprev = encrypter.decrypt(encryptedID); //System.out.println(getprev); int idDecrypt = Integer.parseInt(getprev); //System.out.println("decrypted id_str==" + idDecrypt); SubmissionsManager sman = new SubmissionsManager(); sd = sman.getSubByID(idDecrypt);///decrypt here return sd; } public void createMutationStrain(int mutID, int strainID) { MutationsManager mutMan = new MutationsManager(); MutationsStrainsDAO msd = new MutationsStrainsDAO(); System.out.println("MUTATION ID IS::" + mutID); System.out.println("STRAIN ID IS::" + strainID); msd.setMut_id(mutID); msd.setStr_id_str(strainID); mutMan.saveSQL(strainID, mutID, msd); } public int addUser(SubmissionsDAO sda, String type) { PeopleDAO pd = new PeopleDAO(); LaboratoriesManager lm = new LaboratoriesManager(); PeopleManager pm = new PeopleManager(); String email = ""; String fax = ""; String phone = ""; String firstname = ""; String surname = ""; String title = ""; int ilarID = 0; int labID = 0; int per_id_per = 0; //lab info String department = ""; String name = ""; String town = ""; String postcode = ""; String country = ""; String province = ""; String address1 = ""; String address2 = ""; //List checkPerson = pm.getPeopleByEMail(sda.getSubmitter_email()); //Removed after discussion with PO (Sabine) as we may aswell add all users to database rather than re-use old //when user accounts are implemented we then have nice new people data List checkPerson = new ArrayList();;//now always going to be empty so line 1309 always adds to database if (type.equals("submitter")) { email = sda.getSubmitter_email(); fax = sda.getSubmitter_fax(); phone = sda.getSubmitter_tel(); surname = sda.getSubmitter_lastname(); title = sda.getSubmitter_title(); firstname = sda.getSubmitter_firstname(); department = sda.getSubmitter_dept(); name = sda.getSubmitter_inst(); town = sda.getSubmitter_city(); postcode = sda.getSubmitter_postcode(); country = sda.getSubmitter_country(); province = sda.getSubmitter_county(); address1 = sda.getSubmitter_addr_1(); address2 = sda.getSubmitter_addr_2(); } else if (type.equals("shipper")) { email = sda.getShipper_email(); fax = sda.getShipper_fax(); phone = sda.getShipper_tel(); surname = sda.getShipper_lastname(); title = sda.getShipper_title(); firstname = sda.getShipper_firstname(); department = sda.getShipper_dept(); name = sda.getShipper_inst(); town = sda.getShipper_city(); postcode = sda.getShipper_postcode(); country = sda.getShipper_country(); province = sda.getShipper_county(); address1 = sda.getShipper_addr_1(); address2 = sda.getShipper_addr_2(); } else if (type.equals("producer")) { email = sda.getProducer_email(); fax = sda.getProducer_fax(); phone = sda.getProducer_tel(); surname = sda.getProducer_lastname(); title = sda.getProducer_title(); firstname = sda.getProducer_firstname(); //need to take ilar code and get id //pm = new PeopleManager(); //make sure ilar isn't null which will cause a null pointer exception String ilarToCheck = sda.getProducer_ilar(); System.out.println("PRODUCER ILAR FOR NEW USER == " + ilarToCheck.length()); if (ilarToCheck.length() > 0) { System.out.println("PRODUCER ILAR is > 0 == " + ilarToCheck.length()); String checkedIlarID = pm.ilarID(ilarToCheck); if (checkedIlarID != null && !checkedIlarID.isEmpty()) { ilarID = Integer.parseInt(checkedIlarID); } } department = sda.getProducer_dept(); name = sda.getProducer_inst(); town = sda.getProducer_city(); postcode = sda.getProducer_postcode(); country = sda.getProducer_country(); province = sda.getProducer_county(); address1 = sda.getProducer_addr_1(); address2 = sda.getProducer_addr_2(); } //new lm method pd.setEmail(email); pd.setFax(fax); pd.setFirstname(firstname); pd.setPhone(phone); pd.setSurname(surname); pd.setTitle(title); pd.setUsername("EMMA"); if (ilarID != 0) { pd.setId_ilar("" + ilarID); } //now a lab check LabsDAO checkLab = new LabsDAO(); checkLab = lm.getLabCheck(postcode, "postcode"); System.out.println("line 1 of checklab==" + checkLab.getAddr_line_1()); if (checkLab.getId_labo() != null) { if (checkLab.getCountry().equals(country)) { System.out.println("pretty sure same laboratory but let's check some more"); if (checkLab.getName().contains(name)) { System.out.println("more sure same laboratory but let's check once more"); if (checkLab.getAddr_line_1().contains(address1)) { System.out.println("deffo same so let us set the labID var to the dao lab id"); //Removed after discussion with PO (Sabine) as we may aswell add all laboratories to database rather than re-use old //when user accounts are implemented we then have nice new laboratory data //labID = Integer.parseInt(checkLab.getId_labo()); } } } } System.out.println("labID value is::" + labID); if (labID != 0) { pd.setLab_id_labo("" + labID); } else { //we have a new lab let's populate a labsDao object System.out.println("this is a new lab so we are creating it in the db"); LabsDAO ld = new LabsDAO(); ld.setAddr_line_1(address1); ld.setAddr_line_2(address2); ld.setCountry(country); ld.setDept(department); ld.setName(name); ld.setPostcode(postcode); ld.setProvince(province); ld.setTown(town); lm.save(ld); pd.setLab_id_labo(ld.getId_labo()); } //save person? if (checkPerson.isEmpty()) { //no person exists with this er-mail so save now pm.save(pd); per_id_per = Integer.parseInt(pd.getId_per()); } else { //iterate over list but only the first one to get peopleListLoop: for (Iterator it = checkPerson.listIterator(); it.hasNext();) { PeopleDAO personFound = (PeopleDAO) it.next(); per_id_per = Integer.parseInt(personFound.getId_per()); break peopleListLoop; } } //return person id? System.out.println("Type and returning " + type + " - " + per_id_per); return per_id_per; } /** * @return the stepTitles */ public List getStepTitles() { return stepTitles; } /** * @param stepTitles the stepTitles to set */ public void setStepTitles(List stepTitles) { this.stepTitles = stepTitles; } /** * @return the velocityEngine */ public VelocityEngine getVelocityEngine() { return velocityEngine; } /** * @param velocityEngine the velocityEngine to set */ public void setVelocityEngine(VelocityEngine velocityEngine) { this.velocityEngine = velocityEngine; } /** * @return the javaMailSender */ public JavaMailSender getJavaMailSender() { return javaMailSender; } /** * @param javaMailSender the javaMailSender to set */ public void setJavaMailSender(JavaMailSender javaMailSender) { this.javaMailSender = javaMailSender; } /** * @return the BASEURL */ public String getBASEURL() { return BASEURL; } /** * @param aBASEURL the BASEURL to set */ public void setBASEURL(String aBASEURL) { BASEURL = aBASEURL; } /** * @return the Cc */ public String[] getCc() { return Cc; } /** * @param Cc the Cc to set */ public void setCc(String[] Cc) { this.Cc = Cc; } }
java
<gh_stars>1-10 {"toasted.js":"<KEY>,"toasted.min.js":"<KEY>,"vue-toasted.js":"<KEY>,"vue-toasted.min.css":"<KEY>,"vue-toasted.min.js":"<KEY>}
json
- Movies Tamannaah Bhatia Grooves To Kaavaalaa Song With Fan At Mumbai Airport; Says 'He Is Doing Better Than Me' - News Who is Monk Amogh Lila Das and Why Has ISKCON Banned Him? - Travel Have you been to Vishveshwaraya Falls in Mandya yet? If not, this is the best time! Change in lifestyle and food habits has been on the top list, which has been the cause for several diseases in the recent times. Hence, making the right choice of food is necessary to have good health. But where do we get this right information, is what most of them are confused about. Having the right ingredients in a correct amount is necessary for all your three major meals. It should have the correct amount of micro nutrients, fibre, cereals, proteins, carbohydrates, vitamins and minerals. For example, your breakfast, the first meal of the day, should comprise of all the essential micro-nutrients, fibre, proteins and carbohydrates. In order to ensure that your meal is completely balanced and nutritious, it should comprise of fruits, vegetables, grains, proteins and dairy in a balanced manner. Check out for the guidelines to choose the right kind of foods, here : Fruits: A quarter portion of your plate should be fruits. It is always best to choose fresh, local and seasonal fruits and fruits that are colourful. Fruits like apple, papaya, guava, melon, pineapple, avocado, berry, etc, are recommended. Vegetables: Vegetables form an important part of our daily diet. About 30% of your plate should comprise of vegetables both in the raw form as well as in the cooked form. Make it a point to opt for fresh greens like spinach, methi and spring onions. In addition, red tomatoes, juicy vegetables such as gourds, cucumber and other vegetables like beans, cabbage and tubers should be included in the diet on a daily basis. Vegetables should not be overcooked, as they will lose their nutrients. The best way to cook them is to gently sauté them with very little cooking oil and season them with some fresh herbs. Grains: Broken wheat, oats, whole grains, flour like ragi, jowar, gram, soya, bajra or whole wheat are rich sources of carbohydrates, proteins, fibre, vitamins and minerals, and should make up for another quarter of your plate. It can be eaten as a porridge, in pancakes, bread or chapatis. Avoid cereals that are refined or processed. Proteins: Next major part of your meal is proteins; the building blocks that are needed for tissue repair and to have a great satiety value. Choose proteins from vegetarian sources such as whole lentils like grams, rajma, masoor, moong, urad and chickpea, which are rich in proteins. Egg white, nuts like walnuts, almonds, dates, raisins, apricots, cashews, etc, are also a rich source of protein. In addition, lean meat and fresh water fish, which are rich in protein, should also be consumed in small quantities. Dairy: About 200 mL of low-fat milk or yoghurt should be added to one's meal to make it complete. A balanced meal comprises of all these group of foods in the recommended quantity. - healthMyths vs Facts: The '5-second Rule' For Food Is Real! - healthFeeling Anxious And Jittery? Avoid These Foods When You Are Stressed! - insyncLaunch Of 'Modi Thali' In New Jersey Restaurant Ahead Of PM's Visit In The US, Know What This Thali Contains! - healthFoods You Must Soak Before Eating, Cooking, Frying Them!
english
<reponame>AhmedAldahshoury/BringlsICR body { font-family: sans-serif; background-repeat: round; background-attachment:fixed; height:100%; background-image: -moz-linear-gradient(45deg, #3f3251 2%, #002025 100%); background-image: -webkit-linear-gradient(45deg, #3f3251 2%, #002025 100%); background-image: linear-gradient(45deg, #3f3251 2%, #002025 100%); } .file-upload { width: 600px; margin: 0 auto; padding: 20px; } .file-upload-btn { width: 100%; margin: 0; color: #fff; background: #1FB264; border: none; padding: 10px; border-radius: 4px; border-bottom: 4px solid #15824B; transition: all .2s ease; outline: none; text-transform: uppercase; font-weight: 700; } .file-upload-btn:hover { background: #1AA059; color: #ffffff; transition: all .2s ease; cursor: pointer; } .file-upload-btn:active { border: 0; transition: all .2s ease; } .file-upload-content { display: none; text-align: center; } .file-upload-input { position: absolute; margin: 0; padding: 0; width: 100%; height: 100%; outline: none; opacity: 0; cursor: pointer; z-index: 40; } .image-upload-wrap { margin-top: 20px; border: 4px dashed #1FB264; position: relative; } .image-dropping, .image-upload-wrap:hover { background-color: #1FB264; border: 4px dashed #ffffff; } .image-title-wrap { padding: 0 15px 15px 15px; color: #222; position: center; text-align: center; } .drag-text { text-align: center; } .drag-text h3 { font-weight: 100; text-transform: uppercase; color: #15824B; padding: 60px 0; } .file-upload-image { max-height: 500px; max-width: 500px; margin: auto; padding: 20px; } .remove-image { width: 200px; margin: 0; color: #fff; background: #cd4535; border: none; padding: 10px; border-radius: 4px; border-bottom: 4px solid #b02818; transition: all .2s ease; outline: none; text-transform: uppercase; font-weight: 700; } .remove-image:hover { background: #c13b2a; color: #ffffff; transition: all .2s ease; cursor: pointer; } .remove-image:active { border: 0; transition: all .2s ease; } .caption { position: absolute; left: 0; width: 100%; text-align: center; color: #000; } .caption span.border { background-color: #111; color: #fff; padding: 18px; font-size: 25px; letter-spacing: 10px; } titlee { letter-spacing: 5px; text-transform: uppercase; font: 20px "Lato", sans-serif; color: #111; } h1 { font-family: "Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif; font-size: 82px; padding: 10px 5px; text-align: center; text-transform: uppercase; text-rendering: optimizeLegibility; color: #1FB264; letter-spacing: .05em; text-shadow: 7px 7px 0px rgba(0, 0, 0, 0.2); } .wrapper { text-align: center; } .function-button { width: 200px; margin: 0; color: #fff; background: #1FB264; border: none; padding: 10px; border-radius: 4px; border-bottom: 4px solid #15824B; transition: all .2s ease; outline: none; text-transform: uppercase; font-weight: 700; } .function-button:hover { background: #c13b2a; color: #ffffff; transition: all .2s ease; cursor: pointer; } .function-button:active { border: 0; transition: all .2s ease; } .terminal{ padding: 20px 20px 20px 20px; background: #222; height:300px; text-align: left; width: 97.5%; color: #fff; }
css
Why you can trust TechRadar We spend hours testing every product or service we review, so you can be sure you’re buying the best. Find out more about how we test. The A 102 HCS11 is a home cinema system combining Jamo's DMR61 DVD player/receiver along with the its A10 series speaker package. All the components are remarkably compact (with the exception of the chunky sub) and its simplistic styling will appeal to minimalist fans. The DMR61 builds on its predecessor by adding HDMI connectivity, but little else has changed. The main unit doesn't give much away, and there are no logos on the front to suggest the powerful home cinema system that lurks beneath the sleek, black and silver exterior. Hidden behind a flap on the front panel there's a USB (V1.1) socket for compatible memory card peripherals and a 4-in-1 fl ash card reader for simple replay of MP3, WMA, MPEG4 or JPEG files downloaded onto the card. There's also an audio input jack on the side of the unit for hook-up to other music players, like an iPod. HDMI connectivity gets top billing, but there are no video upscaling options on the DMR61. Other connections are good, with progressive scan component video output as well as an RGB Scart and S-video socketry. The cube-like satellites are solidly built models housed in magnetically shielded boxes, and can be wall or tabletop mounted. Optional floorstanders are available, costing £70 per pair. The centre speaker is a slightly larger model but sonically matched to the satellites. The partnering subwoofer is the least attractive component in the system, but it's solidly built and houses a robust 200mm bass driver with a potent 200W of amplification. DVD pictures from the HDMI output are bit of a disappointment. Details are soft and edges jittery, particularly around the black letterbox format with 16:9 movies. There's simply not enough detail to draw you in, and images look fl at and uninspiring. Component video images have similar characteristics, but there are also traces of distracting patterning interference in background information. The RGB Scart output is actually the one that delivers the most pleasing results, with the sharpest, cleanest details on display. The surround sound performance is a lot more pleasing, and the 60W per channel amplifier and powerful sub deliver plenty of punch with the Casino Royale DVD soundtrack. The satellites convey a wide soundstage and effective placement of effects, while the sub handles bass effects with plenty of gusto. Music is handled with similar aplomb and fills the room with a punchy performance, but it's not exactly hi-fi quality and errs toward a boomy sound. On paper, the Jamo A 102 HCS11 ticks all the right home cinema boxes with its multimedia capabilities and HDMI socketry. But the DMR 61's pictures are a considerable let down, and we've seen better picture performance from its predecessors. Tech.co.uk was the former name of TechRadar.com. Its staff were at the forefront of the digital publishing revolution, and spearheaded the move to bring consumer technology journalism to its natural home – online. Many of the current TechRadar staff started life a Tech.co.uk staff writer, covering everything from the emerging smartphone market to the evolving market of personal computers. Think of it as the building blocks of the TechRadar you love today.
english
# ARMultipleMarkers Augmented Reality game example where user must collect "tokens" from multiple markers. Using AR Foundation and Unity 2020.3.17f1
markdown
Russia says it will respond to a recent move by the US military to deploy a destroyer, upgraded with a new missile system, to the Black Sea near Russian borders. The Russian Foreign Ministry said on Friday that Moscow will respond to the June 6 entry of the USS Porter into the Black Sea. The Russian ministry did not specify how it would respond to the deployment to the Black Sea, which is bounded by Russia and a number of other countries. Citing freedom of navigation, the US has repeatedly deployed military vessels to areas far from US mainland. Such deployments often stir up regional tensions. Russia has also had rocky relations with the US-led NATO over what is perceived as the Western military alliance’s expansion eastward toward Russian borders.
english
<filename>templates/editcomment.html {% extends "base.html" %} {% block title %}Edit Comment - Simple Blog{% endblock %} {% block body %} <h1>Edit Comment</h1> {% if updated %} Comment successfully updated. {% elif errors %} Your comment was not edited. Please fix errors and resubmit. {% endif %} <a href="{{ uri_for('viewpost', post_id=comment.key.parent().id()) }}">Back To Post</a> <form method="POST"> <label> <div>Comment</div> {% if errors %} <textarea name="comment_body">{{ comment_body }}</textarea> <div class="error"> Comment cannot be blank. </div> {% else %} <textarea name="comment_body">{{ comment.comment_body }}</textarea> {% endif %} </label> <div> <input type="submit"> </div> </form> <a href="{{ uri_for('viewpost', post_id=comment.key.parent().id()) }}">Cancel</a> <a href="{{ uri_for('deletecomment', url_comment_key=comment.key.urlsafe()) }}">Delete Comment</a> {% endblock %}
html
His quiet addition to the ODI squad for the upcoming series against South Africa barely raised an eyebrow back in Australia. But his call-up is not just an experiment where he keeps a seat warm while Australia wait for the return of injured batters Steven Smith and Glenn Maxwell. It seems clear that David, without an ODI to his name, and just 16 List A games on his resume, the last of which was in November of 2021, is being primed as a very real option for the World Cup if Maxwell's previously broken leg causes him any more serious issues. It is very un-Australian to put a T20 specialist into such a big spot just a month out from a major tournament, and the troubles of David's Mumbai Indians team-mate Suryakumar Yadav in converting his T20 dominance to ODI runs are a cautionary tale for Australia's selectors. But anyone doubting David's ability to perform in the longer format should be equally cautious because his development as a cricketer suggests otherwise. It was in David's very first international series for Australia where he showcased some of the situational skills the selectors are hoping he can produce in his first ODI series. In Hyderabad against India in September 2022, he made 54 off 27 balls. Typical Tim David, right? But this wasn't typical Tim David. It was the manner in which he put the innings together that sowed the seed for his potential inclusion in ODI cricket down the line. With Australia batting first, he walked in at 84 for 4 in the 10th over, far earlier than any finisher would prefer to enter. Australia would slump to 117 for 6 before the end of the 14th over. Instead of hitting his way out of trouble, David methodically went through the gears to reach 25 off 19 balls. He hit just two boundaries and faced just five dot balls. It was almost completely risk-free. He hit the ball to the sweepers to rotate the strike and picked up two well-placed twos. His boundary shots were relatively low risk. One was a lofted off drive from a generous Harshal Patel half-volley, the other a lovely, controlled late cut off Hardik Pandya. He took the innings deep to the 18th over, with the help of Daniel Sams, before he finally unleashed "typical Tim David", launching three sixes and a four in his last eight balls. David did something similar in the first T20I against South Africa, the day before his call-up to the ODI squad had been confirmed. He entered at 77 for 4 in the eighth over after Australia had lost 3 for 8. He scored 9 off 9 without hitting a ball in the air as he steadied alongside Mitchell Marsh. He slipped gears when he got the match-up he wanted, walloping Tabraiz Shamsi for two sixes in an over to start an assault that ended with 64 off 28 to help Australia amass 226 for 6. It was an innings that even Maxwell noted was a window into David's talent beyond just T20 cricket. "I think the way he batted in that first [T20I against South Africa] showed great maturity, and a great level head," Maxwell said. "I think any time you bring a player in who's in good form, he's got a history of great power hitting at the back end, but what we probably haven't seen a lot on the international stage from Tim is that style of play where he is able to get through a tough time. He's a very good player of spin. He bats well in India. It doesn't surprise me that he's been added to that [ODI] squad." But ultimately those two innings are still less than 30 balls faced in total, and less than 10 overs at the crease all up. Finishers in ODI's can sometimes be called on to mount far longer rescue missions. Maxwell's last ODI century in 2020 came off 90 balls across nearly 32 overs as he helped Australia chase down 303 against England having slumped to 73 for 5. That is where David's development as a cricketer will hold him in good stead. He has an astonishing List A record, averaging 82.77 and striking at 123.14 with two centuries and five half-centuries. Admittedly four of those half-centuries have come in Associate matches for Singapore against attacks from Qatar, Denmark, Vanuatu and Malaysia. But he made two stunning centuries for Surrey in the 2021 Royal London Cup batting at No. 4. In the same club competition in Perth where his current Australia team-mates Marcus Stoinis, Ashton Agar, Cameron Green and Josh Inglis all cut their teeth, David was a dominant force in his late teens and early 20s, particularly in the 50-over format. Playing with white balls and under the same fielding restriction rules as the current version of ODI cricket, David's middle-over smarts against spin, his situational ability to slip through the gears and use his developing power judiciously were rare traits for a young player. It's that talent that gives Australia options whenever he does get his chance in this ODI series. The obvious use of him would be as a finisher at No. 6 or 7, but the indifferent ODI batting form of Stoinis since the last World Cup, and David's superior prowess against spin means he could be a tempting disrupter in the middle overs to change the trajectory of an innings. How much of an opportunity David gets remains to be seen as Australia balances trying to plug their short-term injury holes with bedding down their World Cup plans. But he's proven he can handle high-pressure moments. If he does during this series and injuries remain a worry, Australia's final 15-man squad might look slightly different. Australia have David Warner back in their XI after he missed the T20Is, with captain Mitchell Marsh to start at No. 3. Alex Carey and Josh Hazlewood are the two players who did not play the T20Is who have been included in this XI.
english
{"word":"clypeate","definition":"1. (Bot.) Shaped like a round buckler or shield; scutate. 2. (Zoöl.) Furnished with a shield, or a protective plate or shell."}
json
Project Management (10 programs) PROS: Useful hotkeys. High portability.CONS: Collab features can be messy. Feature-light. PROS: Caters to both freelancers and clients. Clean and intuitive UI. Cross-platform support. Time-tracking and invoicing in one.CONS: Not intended for large-scale use. PROS: Easy to add subjects and related items. Many annotations to choose from. Free to use.CONS: Annotation bar is very crowded. Many annotations not particularly useful. PROS: Secure digital workspace. Requires a single sign-on. Dynamically update files stored centrally. Allows personal and work-related apps to exist in one device.CONS: Dependent to Citrix Virtual Apps. Limited to 25 users. Logging in isn't very intuitive. Frequently lags. PROS: A complete project management application. Free to download.CONS: Demo may have some workability issues. Generic graphic representation. PROS: Work with your OS, make available online. Team Instant Messenger environment. Tabbed workspaces.CONS: The application is a little slow at times. Lack of security settings. PROS: Easy to create tasks and plans. Gantt Chart very useful for planning schedules. Allows you to share plans online.CONS: Simple but number of features still takes time to learn. PROS: Slick interface. Exports to MS Project format. Logical workflow.CONS: Not as advanced as MS Project. PROS: Manage accommodations. View arrivals and departures. Includes in-depth analysis of operations.CONS: Free for 30 days only.
english
The finance ministry on Friday released revised guidelines on public procurement and project management which outline innovative rules for faster, efficient and transparent execution of projects. The guidelines also permit alternative methods for selection of contractors, which can improve speed and efficiency in execution of projects. In appropriate cases, quality parameters can be given weightage during evaluation of the proposal in a transparent and fair manner, through a Quality cum Cost Based Selection (QCBS) as an alternative to the traditional L1 system, the ministry said. Finance Secretary and Secretary Expenditure, T V Somanathan released the guidelines to usher in reforms in public procurement and project management here on Friday, a finance ministry statement said. The formulation and release of these guidelines are part of the continuous process of review of existing rules and procedures. "These guidelines attempt to incorporate into the realm of Public Procurement in India, innovative rules for faster, efficient and transparent execution of projects and to empower executing agencies to take quicker and more efficient decision in public interest," the ministry said. Some of the improvements include prescribing strict timelines for payments when due. Timely release of ad hoc payments (70 per cent or more of bills raised) is expected to improve liquidity with the contractors, especially micro, small and medium enterprises (MSMEs), it added. As part of the government's digital thrust, electronic measurement books have been prescribed as a means of recording progress of works. This system, along with other IT based solutions proposed in the guidelines, will help in realising the dream of efficient Digital India, facilitate faster payments to contractors and reduce disputes. "Executing public projects on time, within the approved cost and with good quality has always been a challenge. As the pace of economic development steps up careful examination of procedures and rules is essential to ensure unwarranted roadblocks are removed and new innovations utilised for increasing value for money of the taxpayer," the ministry added. The Central Vigilance Commission (CVC), the Comptroller & Auditor General (CAG) and the National Institution for Transforming India (NITI) Aayog had carried out detailed analysis of the procedures and rules for public procurement and project management and had suggested changes in strategies to meet challenges of present and future public procurement. The draft of the guidelines was prepared under the aegis of the Central Vigilance Commission (CVC) after a detailed consultative process involving experts from various fields of public procurement and project management. The Department of Expenditure (DoE), Ministry of Finance, was nominated to issue the guidelines after soliciting and detailed consideration of the comments of ministries/ departments. Besides, Model Tender Documents (MTDs) for procurement of goods and non-consultancy services were also released on Friday as part of the continuous process of review of existing procedures. MTDs specifically cater to needs relating to e-procurement thereby easing the process for adoption of e-procurement and furthering the ambition of convenient and efficient e-governance. Such initiatives shall help in achieving the goal of Digital India by easing and standardising the digitisation process of public procurement. These MTDs rationalise and simplify the structure of tender documents. Besides aligning provisions with various procurement policies of the government, like policies related to micro and small enterprises, preference to Make in India and benefits to startups, MTDs incorporate national and international best practices. The MTDs have been developed after a two-stage, extensive consultation with ministries/ departments/ central public sector undertakings, other organisations and individual experts, the ministry said. (Only the headline and picture of this report may have been reworked by the Business Standard staff; the rest of the content is auto-generated from a syndicated feed. )
english
import styled from "styled-components"; import Modal from "./Modal"; import { InputContainer, Input, SubmitBtn, ErrorMsg, } from "../instagram/Signup"; import { useState } from "react"; import uploadFile from "../firebase/uploadFile"; import { useForm } from "react-hook-form"; import { postPost } from "../services/postService"; import { useHistory } from "react-router-dom"; import postSuccess from "../assets/images/postSuccess.jpg"; export const Header = styled.div` border-bottom: 1px solid #d9d9d9; display: flex; justify-content: center; font-size: 15px; `; const Body = styled.div` padding: 10px; /* width: 100%; */ display: flex; justify-content: center; `; const CaptionTextArea = styled.textarea` background-color: #fafafa; width: 100%; padding: 7px; /* padding-left: 10px; */ border: 1px solid #d9d9d9; border-radius: 5px; font-size: 15px; :focus { border: 1px solid red; } `; const NewPost = (props) => { const [isSubmitting, setIsSubmitting] = useState(false); const [posted, setPosted] = useState(false); const history = useHistory(); const { register, handleSubmit, formState: { errors, isValid }, } = useForm({ mode: "all", }); const submitForm = (data) => { setIsSubmitting(true); uploadFile(data.imageFile[0], async (url) => { console.log(url); data.postedImage = url; let response = await postPost(data); console.log(response.status); setPosted(true); // history.push("/"); setIsSubmitting(false); }); }; const validateImageFile = (file) => { let fileType = file[0].type; return fileType.includes("image") ? true : "Please Select Image File"; }; return ( <Modal modalId={props.ModalId} callback={() => setPosted(false)}> {!posted ? ( <> <Header> <h3>New Post</h3> </Header> <Body> <form onSubmit={handleSubmit(submitForm)}> <InputContainer style={{ width: "400px" }}> <Input type="file" placeholder="Select Image" accept="image/*" {...register("imageFile", { required: "Please Select File.", validate: validateImageFile, })} /> {errors.imageFile && ( <ErrorMsg>{errors.imageFile.message}</ErrorMsg> )} </InputContainer> <InputContainer style={{ width: "400px" }}> <CaptionTextArea type="text" placeholder="Enter Caption" rows="10" {...register("caption")} ></CaptionTextArea> </InputContainer> <InputContainer style={{ width: "400px" }}> <SubmitBtn type="submit" disabled={!isValid || isSubmitting}> {isSubmitting ? ( <> <i className="fa fa-spinner fa-spin" aria-hidden="true" ></i> </> ) : ( <>Post</> )} </SubmitBtn> </InputContainer> </form> </Body> </> ) : ( <> <br /> <br /> <InputContainer> <img src={postSuccess} height="150" width="150" /> <br /> <h3 style={{ color: "green" }}>Posted Successfully</h3> </InputContainer> </> )} <br /> <br /> </Modal> ); }; export default NewPost;
javascript
<filename>JSONS/2700.json { "contacts": [ { "name": "<NAME>", "email": "", "designation": "", "mobile": [] } ], "guideStarURL": "http://www.guidestarindia.org/Summary.aspx?CCReg=2700", "name": "Community Renovation and Organisation Advancement Trust", "primaryEmail": "<EMAIL>", "website": "www.coroat.org", "organisationType": [ "Advocacy & Campaigning", "Direct Service" ], "telephone": [ "914312700894", "914312700894" ], "mainAddrress": { "state": "Tamil Nadu", "address": [ "No.52, First Floor", "Boologanathar Koil Street", "Tiruchirapalli", "Tiruchirappalli", "Tamil Nadu", "620008" ] }, "briefDescription": "COROAT is a registered Trust, functioning for the empowerment of unorganized workers in general and traditional artisans in particular. Currently the organization has been mobilizing women and men from traditional artisan community, formed them into a community based organization in the name of Thenkoodu Artisan Federation. Presently 13 groups of women and men are part of the federation and they are involved in savings and credit activities. The federation is functioning for the development of education of the children, Improvement of leadership, health, industrial activities and livelihood. 250 children are traditional artisans are provided free evening tuition centres, life skill training and competition to bring out their talents.", "yearOfEstablishment": "2009", "regiseredAddrress": { "state": "Tamil Nadu", "address": [ "3/9", "Venus Nagar", "Airport", "Tiruchirappalli", "Tamil Nadu", "620007" ] } }
json
The United Nations climate conference in Glasgow started on October 31 with the heads of over 140 countries scaling up expectations with impressive announcements. But, a fortnight later, 197 countries agreed to a political outcome dubbed the “Glasgow Climate Pact” which would, according to experts, continue to take the world down the over 2 degrees Celsius trajectory and clearly highlights the faultlines in the combative political will to tackle climate change. In fact, the wording of the final agreement is not much different from decisions in the previous conference of parties (COP), although there are some positive takeaways, particularly on coal, fossil fuels and new emission review mechanisms. Negotiations had not assembled in Glasgow to sign a new agreement, but to operationalise the Paris Climate Agreement of 2015. The Glasgow pact, by itself, is just a non-binding political statement. It shows the intent of the world to collectively act on several fronts — reduce greenhouse gas emissions from coal and reducing subsidy on fossil fuels; enhance National Determined Contributions (NDCs) before the next climate conference in Sharm El-Sheikh, Egypt, in 2022; a mechanism to review NDCs by 2023; a carbon trading market to be in place by 2023; and $100 billion every year by 2025. The political decision at Glasgow asks nations to enhance NDCs every five years instead of 10, and double money for climate adaptation by 2025. In the fortnight at Glasgow, some other agreements between countries, outside the UN ambit, were signed. Significant among them was one on reversing deforestation by 105 countries, methane emission reduction by 30-odd nations, climate finance deal to reduce fossil fuel dependence in most climate-vulnerable nations and a global mechanism to infuse electric cars in personal transport. India is not part of these agreements, though, at Glasgow, the United States (US) agreed to become part of the international Solar Alliance, a multi-lateral form anchored by India to enhance the transfer of solar technologies to the developing world. Another milestone at Glasgow was a US and China joint statement that placed specific timelines on emission mitigation. It is the first of such agreements between the two biggest carbon polluters of the world at COP. These multi-lateral agreements would also lead to some emission cuts but are more aligned towards pushing new cleaner technologies. However, one may recall that such agreements have been signed at COP in the past as well, but many of them have not achieved much because of the funding issues. An afforestation agreement signed by close to 100 countries in Paris in 2015 failed to take off as Norway backed out from funding two years later. So, it would be prudent to wait and watch to see how many of these agreements really materialise on the ground. For many in the developing world, Glasgow has failed to push rich countries to substantially enhance their financial commitments to fight the crisis. Without adequate finance, the world will not be able to deal with the rising vagaries of the climate crisis. This was visible in India with devastating rains in Kerala and Tamil Nadu in October and November and in Uttarakhand in early October. Considering that science clearly says that the impact of the climate crisis has intensified, historical polluters – rich countries that have contributed the most to cause climate change – have not substantially increased climate finance. They promised $100 billion at the failed 2010 conference at Copenhagen, and the Glasgow pact says they should ensure that $100 billion is delivered every year from 2025 onwards, 15 years since Copenhagen. “We are disappointed that the $100 billion pledge remains outstanding, and I call upon all donors to make it a reality by next year,” said UNFCCC executive secretary Patricia Espinosa. Although the Glasgow pact talks about doubling climate finance from the 2019 level, the possibility of that happening by 2025 appears remote. At best, it may happen by 2030. The final text of the Glasgow pact expressed “deep regret” about the funding failures while urging rich countries to provide “adequate” climate finance “as soon as possible”. Progress on Loss and Damage, a mechanism to compensate the developing world for the devastation wrought by the climate crisis, remains insignificant as there was no indication on how much money would be provided. Rich countries continued to block its implementation on the grounds that there’s no clear system to evaluate the “contribution of climate change” to any damage. On this, the Glasgow pact speaks about asking a United Nations Framework Convention on Climate Change (UNFCCC) subsidiary body to draft a science-based compensation mechanism before Egypt. In a nutshell, eight years after the Loss and Damage mechanism was agreed in Warsaw COP in 2013, there’s no clarity on how it would work. The Glasgow conference has agreed on rules on “carbon trading” (as per Article 6 of the Paris agreement) that provides for setting up carbon markets to offset emissions of rich countries by mitigation measures in the developing world. This is replete with shortcomings seen in the Clean Development Mechanism (CDM) that was implemented for a decade under the Kyoto Protocol from 2002 onwards. “An agreement was reached on the fundamental norms related to Article 6 on carbon markets, which will make the Paris Agreement fully operational,” the UN said in a statement. Espinosa said the operationalising of carbon markets will allow countries to scale up their cooperation and mobilise additional finance through private sector participation. Some climate advocacy groups said carbon markets will allow rich countries to greenwash their emissions through buying credits from the developing world, an accounting exercise fraught with potential scam as certain emissions could be counted twice. Before Glasgow, commitment to “net zero” (carbon neutrality target) was the buzzword with close to 120 countries announcing their net-zero target year. Many countries including India joined the bandwagon during the conference. In a way, net-zero implies that if there is a certain amount of climate-changing emissions in one place, it can be “offset” elsewhere in a number of ways such as capturing it in trees or the oceans or through storage. It does not necessarily mean reducing emissions at the place where they are happening. So, emissions from power plants, factories, which have harmful effects on biodiversity may not be reduced, and in effect, may increase. A report by Corporate Accountability, a group that looks at emissions reductions, said that projections for net-zero are based on unrealistic projects on land availability, or unproven technologies. In India, it may translate to grabbing land from communities for massive new plantations; this is already happening in the name of compensatory afforestation carried out purportedly to “offset” the ecological damage caused by cutting down natural forests for mining, dams, highways, said Ashish Kothari, a veteran Indian environment activist, who has worked with communities across the countries for the past 40 years. There are definite, small steps forward, but not adequate to limit the global temperature rise to 2°C by the turn of the century as enshrined in the Paris agreement. Limiting temperature rise to 1. 5°C still remains an elusive goal. Achieving the 1. 5°C goal with present intentions and rising emissions, now looks almost impossible. The Climate Action Tracker earlier this week said that the temperature would rise to 2. 4°Celsius by the end of 2100 if all countries meet their enhanced commitments made before and at the Glasgow conference. Indian Prime Minister Narendra Modi’s announced net-zero emissions by 2070, saving one billion tonnes of carbon by 2030, 500GW of renewable by 2030, 50% of energy needs from renewable by 2030 and reducing emission intensity for a unit of GDP by 45% by 2030. India is yet to submit these announcements as its enhanced NDCs. So, the announcements in Glasgow mean a marginal improvement, as the projected temperature rise before the conference was 2. 7°C. COP president Alok Sharma said that Glasgow has ensured that the 1. 5°C goal is still in sight, though countries will have to raise ambition significantly next year. But experts disagree. Sunita Narain, director general, Centre for Science and Environment said with no mention of a carbon budget and right of the developing world to occupancy the remaining carbon space, the pathway to 1. 5°C is almost closed. “The refusal of developed countries to open up carbon space for poorer countries is unfortunate,” said Arunabha Ghosh, chief executive officer of Council for Energy Environment and Water (CEEW). Glasgow has tailored down its commitment to “phasing out” coal saying the countries would work to “phase down” coal emissions following stiff resistance from India and China, where coal still remains the main source of energy. It has also shifted most goalposts to the next climate conference in Egypt while keeping the 1. 5°C goal alive. Collaboration between countries has found some place in the pact, but experts say it may not be enough. And, the call for climate justice was partially heeded in Glasgow. “The failure to ramp up hard targets for climate finance and provide adequate support for loss and damage, in particular, has further eroded trust,” Ghosh said.
english
fieldset { border: 1px solid var(--gray-lighter); border-radius: 2px; }
css
<gh_stars>1000+ // @ts-ignore import { Button } from './mockIndex'; // @ts-ignore import { DefaultButton } from './DefaultButton'; // @ts-ignore import { Button as b, OtherButton } from './Button';
typescript
Durban, Mar 18: With the world's top ODI batsman - Graeme Smith - leading them, the South Africans are all set to "thump" India in the upcoming three-match Test series, feels Proteas' Cricket Board chief Gerald Majola. Lauding the in-form Smith for guiding the team to the top of the ICC ODI rankings, Majola said the South Africans will be a tough proposition for the home side. "Cricket South Africa (CSA) salutes Graeme on remarkable achievements at such a young age. Graeme's leadership qualities have really come to the fore, and CSA is confident that he will take the Proteas to the number 1 spot in Tests as well," Majola said in a statement. "India beware in the forthcoming three match Test series which starts in Chennai next week. Graeme Smith and his boys are going to thump Anil Kumble and his charges," he added. The 27-year-old Smith became the top ODI batsman displacing Sachin Tendulkar after a fine run of form in the series against Bangladesh. The CSA chief lavished praise on the left-hander for his remarkable form with the bat. "At the age of 27, Graeme Smith has set several landmarks which put him among the best young captain/batsman yet produced in world cricket," he said. "The Proteas, under Graeme's leadership, have finished the international season as the No. 1 ODI team in world cricket and are looking to take second spot in the Test ratings," he added, lauding Smith's leadership. Smith is the only South African with four Test double hundreds and he holds the world record for the highest first wicket partnership in Tests with Neil McKenzie - 415 v Bangladesh at Chittagong.
english
<reponame>gmzlo/discordaddbots const Discord = require('discord.js') exports.run = (client, message) => { let user = message.mentions.users.first() || message.author let member = message.guild.member(user) let roles = member.roles.array().slice(1).sort((a, b) => a.comparePositionTo(b)).reverse().map(role => role.name); let messageauthor = message.guild.member(message.author) let authorroles = message.guild.member(message.author).roles.array().slice(1).sort((a, b) => a.comparePositionTo(b)).reverse().map(role => role.name) if (roles.length < 1) roles = ['None'] const status = { online: 'Online', idle: 'Idle', dnd: 'Do Not Disturb', offline: 'Offline/Invisible' }; let botuser; if (member.user.bot === true) botuser = 'Yes' else botuser = 'No' const randomColor = "#000000".replace(/0/g, function () { return (~~(Math.random() * 16)).toString(16); }); if (!user) { let embed = new Discord.RichEmbed() .setColor(randomColor) .setThumbnail(`${message.author.displayAvatarURL}`, true) .addField("Username + tag", `${message.author.message.username}#${message.author.discriminator}`, true) .addField("ID", `${message.author.id}`, true) .addField("Created At", `${message.author.createdAt}`, true) .addField("Status", `${status[message.author.presence.status]}`, true) .addField("Last Message", `${(message.author.lastMessage) || 'Has not said a message yet.'}`, true) .addField("Joined On", `${messageauthor.joinedAt}`) .addField("Playing", `${(message.author.presence.game && message.author.presence.game && message.author.presence.game.name) || 'Not playing a game.'}`, true) .addField("Nickname", `${message.member.displayName}`, true) .addField("Roles", `${roles.join(', ')}`, true) .addField("Bot?", `${botuser}`, true) message.channel.send({embed}); } else { let botuser; if (member.user.bot === true) botuser = 'Yes' else botuser = 'No' let embed = new Discord.RichEmbed() .setColor(randomColor) .setThumbnail(`${user.displayAvatarURL}`, true) .addField("Username + tag", `${user.username}#${user.discriminator}`, true) .addField("ID", `${user.id}`, true) .addField("Created At", `${user.createdAt}`, true) .addField("Status", `${status[user.presence.status]}`, true) .addField("Last Message", `${(user.lastMessage) || 'Has not said a message yet.'}`, true) .addField("Joined On", `${member.joinedAt}`, true) .addField("Playing", `${(user.presence.game && user.presence.game && user.presence.game.name) || 'Not playing a game.'}`, true) .addField("Roles", `${roles.join(', ')}`, true) .addField("Bot?", `${botuser}`, true) message.channel.send({embed}); }};
javascript
<reponame>GetTerminus/ngx-tools import { Component } from '@angular/core'; import { async, TestBed, } from '@angular/core/testing'; import { expectNativeEl } from './expect-native-el'; @Component({ template: `<div class="foo"></div>` }) class TestComponent {} describe(`expectNativeEl`, function() { beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ TestComponent, ], }).compileComponents(); })); test(`should return a DebugElement`, () => { const fixture = TestBed.createComponent(TestComponent); fixture.detectChanges(); expectNativeEl(fixture).toBeTruthy(); }); });
typescript
package wal // Copyright 2015 MediaMath <http://www.mediamath.com>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // RecordBody collects the bytes that make up the body of a record type RecordBody struct { header *RecordHeader bs []byte whatsNeeded uint64 typ RecordType } // NewRecordBody creates a new RecordBody based on a RecordHeader func NewRecordBody(recordHeader *RecordHeader) *RecordBody { whatsNeeded := uint64(recordHeader.TotalLength()) - recordHeader.AlignedSize() return &RecordBody{header: recordHeader, whatsNeeded: whatsNeeded, typ: recordHeader.Type()} } // AppendBodyAfterHeader reads what is available of the body on the same page and appends it to the body func (r *RecordBody) AppendBodyAfterHeader(block []byte, location Location) uint64 { body := readBody(block, location, r.whatsNeeded) r.bs = append(r.bs, body...) return uint64(len(body)) } // AppendContinuation reads a continuation from a page and appends it to the body func (r *RecordBody) AppendContinuation(page Page) uint64 { cont := page.Continuation() if cont == nil { return 0 } r.bs = append(r.bs, cont...) return uint64(len(cont)) } // IsComplete indicates that needs to be read of a body has been read func (r *RecordBody) IsComplete() bool { if uint64(len(r.bs)) >= r.whatsNeeded { return true } return false } // HeapData interprets the body based on the type indicated in the record header func (r *RecordBody) HeapData() []HeapData { return NewHeapData(r.typ, r.header.IsInit(), r.bs, r.header.version) } func readBody(block []byte, location Location, length uint64) []byte { var start, blockLen, remaining, end uint64 start = location.FromStartOfPage() blockLen = uint64(len(block)) remaining = blockLen - start if start >= blockLen { return block[0:0] } if length > remaining { end = start + remaining } else { end = start + length } return block[start:end] }
go
<filename>catalog/templates/catalog/author_detail.html {% extends "base_generic.html" %} {% block content %} <h1>Author: {{ author.last_name }}, {{ author.first_name }}</h1> {% if author.date_of_birth %} <p>{{ author.date_of_birth }} - {{ author.date_of_death }} {% endif %} <div style="margin-left:20px;margin-top:20px"> <h4>Books</h4> {% for copy in author.book_set.all %} <dt><a href="{{ copy.get_absolute_url }}">{{ copy.title }}</a></dt> <dd>{{ copy.summary }}</dd> {% endfor %} </div> {% endblock %}
html
<filename>packages/theme/src/shared/options/plugins.ts import type { CommentOptions } from "vuepress-plugin-comment2"; import type { CopyCodeOptions } from "vuepress-plugin-copy-code2"; import type { FeedOptions } from "vuepress-plugin-feed2"; import type { MarkdownEnhanceOptions } from "vuepress-plugin-md-enhance"; import type { PhotoSwipeOptions } from "vuepress-plugin-photo-swipe"; import type { PWAOptions } from "vuepress-plugin-pwa2"; import type { SitemapOptions } from "vuepress-plugin-sitemap2"; import type { SeoOptions } from "vuepress-plugin-seo2"; export interface HopeThemePluginsOptions { /** * Enable @vuepress/plugin-active-header-links or not */ activeHeaderLinks?: boolean; /** * Enable @vuepress/plugin-back-to-top or not */ backToTop?: boolean; /** * 评论插件配置 * @see http://vuepress-theme-hope.github.io/comment/zh/config/ * * Comment plugin options * @see http://vuepress-theme-hope.github.io/comment/config/ */ comment?: CommentOptions; /** * 代码复制插件配置 * @see http://vuepress-theme-hope.github.io/copy-code/zh/config/ * * code copy plugin options * @see http://vuepress-theme-hope.github.io/copy-code/config/ */ copyCode?: CopyCodeOptions | false; /** * Feed 插件配置 * @see http://vuepress-theme-hope.github.io/feed/zh/config/ * * Feed plugin options * @see http://vuepress-theme-hope.github.io/feed/config/ */ feed?: FeedOptions | false; /** * Markdown 增强插件配置 * @see http://vuepress-theme-hope.github.io/md-enhance/zh/config/ * * Markdown enhance plugin options * @see http://vuepress-theme-hope.github.io/md-enhance/config/ */ mdEnhance?: MarkdownEnhanceOptions | false; /** * 图片预览插件配置 * @see http://vuepress-theme-hope.github.io/photo-swipe/zh/config/ * * Photo Swipe plugin options * @see http://vuepress-theme-hope.github.io/photo-swipe/config/ */ photoSwipe?: PhotoSwipeOptions | false; /** * PWA 插件配置 * @see http://vuepress-theme-hope.github.io/pwa/zh/config/ * * PWA plugin options * @see http://vuepress-theme-hope.github.io/pwa/config/ */ pwa?: PWAOptions | false; /** * SEO 插件配置 * @see http://vuepress-theme-hope.github.io/seo/zh/config/ * * SEO plugin options * @see http://vuepress-theme-hope.github.io/seo/config/ */ seo?: SeoOptions | false; /** * Sitemap 插件配置 * @see http://vuepress-theme-hope.github.io/sitemap/zh/config/ * * Sitemap plugin options * @see http://vuepress-theme-hope.github.io/sitemap/config/ */ sitemap?: SitemapOptions | false; /** * Enable @vuepress/plugin-container or not */ container?: { tip?: boolean; warning?: boolean; danger?: boolean; details?: boolean; codeGroup?: boolean; codeGroupItem?: boolean; }; /** * Enable @vuepress/plugin-git or not */ git?: boolean; /** * Enable @vuepress/plugin-medium-zoom or not */ mediumZoom?: boolean; /** * Enable @vuepress/plugin-nprogress or not */ nprogress?: boolean; /** * Enable @vuepress/plugin-prismjs or not */ prismjs?: boolean; }
typescript
<reponame>carlos-sweb/css-utility .justify-self-auto { justify-self: auto; } .justify-self-auto\:active:active { justify-self: auto; } .justify-self-auto\:checked:checked { justify-self: auto; } .justify-self-auto\:disabled:disabled { justify-self: auto; } .justify-self-auto\:focus:focus { justify-self: auto; } .justify-self-auto\:focus-visible:focus-visible { justify-self: auto; } .justify-self-auto\:hover:hover { justify-self: auto; } .justify-self-auto\:required:required { justify-self: auto; } .justify-self-auto\:visited:visited { justify-self: auto; } .justify-self-start { justify-self: start; } .justify-self-start\:active:active { justify-self: start; } .justify-self-start\:checked:checked { justify-self: start; } .justify-self-start\:disabled:disabled { justify-self: start; } .justify-self-start\:focus:focus { justify-self: start; } .justify-self-start\:focus-visible:focus-visible { justify-self: start; } .justify-self-start\:hover:hover { justify-self: start; } .justify-self-start\:required:required { justify-self: start; } .justify-self-start\:visited:visited { justify-self: start; } .justify-self-end { justify-self: end; } .justify-self-end\:active:active { justify-self: end; } .justify-self-end\:checked:checked { justify-self: end; } .justify-self-end\:disabled:disabled { justify-self: end; } .justify-self-end\:focus:focus { justify-self: end; } .justify-self-end\:focus-visible:focus-visible { justify-self: end; } .justify-self-end\:hover:hover { justify-self: end; } .justify-self-end\:required:required { justify-self: end; } .justify-self-end\:visited:visited { justify-self: end; } .justify-self-center { justify-self: center; } .justify-self-center\:active:active { justify-self: center; } .justify-self-center\:checked:checked { justify-self: center; } .justify-self-center\:disabled:disabled { justify-self: center; } .justify-self-center\:focus:focus { justify-self: center; } .justify-self-center\:focus-visible:focus-visible { justify-self: center; } .justify-self-center\:hover:hover { justify-self: center; } .justify-self-center\:required:required { justify-self: center; } .justify-self-center\:visited:visited { justify-self: center; } .justify-self-stretch { justify-self: stretch; } .justify-self-stretch\:active:active { justify-self: stretch; } .justify-self-stretch\:checked:checked { justify-self: stretch; } .justify-self-stretch\:disabled:disabled { justify-self: stretch; } .justify-self-stretch\:focus:focus { justify-self: stretch; } .justify-self-stretch\:focus-visible:focus-visible { justify-self: stretch; } .justify-self-stretch\:hover:hover { justify-self: stretch; } .justify-self-stretch\:required:required { justify-self: stretch; } .justify-self-stretch\:visited:visited { justify-self: stretch; } @media (min-width: 0px) and (max-width: 639px) { .xs\:justify-self-auto { justify-self: auto; } .xs\:justify-self-auto\:active:active { justify-self: auto; } .xs\:justify-self-auto\:checked:checked { justify-self: auto; } .xs\:justify-self-auto\:disabled:disabled { justify-self: auto; } .xs\:justify-self-auto\:focus:focus { justify-self: auto; } .xs\:justify-self-auto\:focus-visible:focus-visible { justify-self: auto; } .xs\:justify-self-auto\:hover:hover { justify-self: auto; } .xs\:justify-self-auto\:required:required { justify-self: auto; } .xs\:justify-self-auto\:visited:visited { justify-self: auto; } .xs\:justify-self-start { justify-self: start; } .xs\:justify-self-start\:active:active { justify-self: start; } .xs\:justify-self-start\:checked:checked { justify-self: start; } .xs\:justify-self-start\:disabled:disabled { justify-self: start; } .xs\:justify-self-start\:focus:focus { justify-self: start; } .xs\:justify-self-start\:focus-visible:focus-visible { justify-self: start; } .xs\:justify-self-start\:hover:hover { justify-self: start; } .xs\:justify-self-start\:required:required { justify-self: start; } .xs\:justify-self-start\:visited:visited { justify-self: start; } .xs\:justify-self-end { justify-self: end; } .xs\:justify-self-end\:active:active { justify-self: end; } .xs\:justify-self-end\:checked:checked { justify-self: end; } .xs\:justify-self-end\:disabled:disabled { justify-self: end; } .xs\:justify-self-end\:focus:focus { justify-self: end; } .xs\:justify-self-end\:focus-visible:focus-visible { justify-self: end; } .xs\:justify-self-end\:hover:hover { justify-self: end; } .xs\:justify-self-end\:required:required { justify-self: end; } .xs\:justify-self-end\:visited:visited { justify-self: end; } .xs\:justify-self-center { justify-self: center; } .xs\:justify-self-center\:active:active { justify-self: center; } .xs\:justify-self-center\:checked:checked { justify-self: center; } .xs\:justify-self-center\:disabled:disabled { justify-self: center; } .xs\:justify-self-center\:focus:focus { justify-self: center; } .xs\:justify-self-center\:focus-visible:focus-visible { justify-self: center; } .xs\:justify-self-center\:hover:hover { justify-self: center; } .xs\:justify-self-center\:required:required { justify-self: center; } .xs\:justify-self-center\:visited:visited { justify-self: center; } .xs\:justify-self-stretch { justify-self: stretch; } .xs\:justify-self-stretch\:active:active { justify-self: stretch; } .xs\:justify-self-stretch\:checked:checked { justify-self: stretch; } .xs\:justify-self-stretch\:disabled:disabled { justify-self: stretch; } .xs\:justify-self-stretch\:focus:focus { justify-self: stretch; } .xs\:justify-self-stretch\:focus-visible:focus-visible { justify-self: stretch; } .xs\:justify-self-stretch\:hover:hover { justify-self: stretch; } .xs\:justify-self-stretch\:required:required { justify-self: stretch; } .xs\:justify-self-stretch\:visited:visited { justify-self: stretch; } } @media (min-width: 640px) and (max-width: 767px) { .sm\:justify-self-auto { justify-self: auto; } .sm\:justify-self-auto\:active:active { justify-self: auto; } .sm\:justify-self-auto\:checked:checked { justify-self: auto; } .sm\:justify-self-auto\:disabled:disabled { justify-self: auto; } .sm\:justify-self-auto\:focus:focus { justify-self: auto; } .sm\:justify-self-auto\:focus-visible:focus-visible { justify-self: auto; } .sm\:justify-self-auto\:hover:hover { justify-self: auto; } .sm\:justify-self-auto\:required:required { justify-self: auto; } .sm\:justify-self-auto\:visited:visited { justify-self: auto; } .sm\:justify-self-start { justify-self: start; } .sm\:justify-self-start\:active:active { justify-self: start; } .sm\:justify-self-start\:checked:checked { justify-self: start; } .sm\:justify-self-start\:disabled:disabled { justify-self: start; } .sm\:justify-self-start\:focus:focus { justify-self: start; } .sm\:justify-self-start\:focus-visible:focus-visible { justify-self: start; } .sm\:justify-self-start\:hover:hover { justify-self: start; } .sm\:justify-self-start\:required:required { justify-self: start; } .sm\:justify-self-start\:visited:visited { justify-self: start; } .sm\:justify-self-end { justify-self: end; } .sm\:justify-self-end\:active:active { justify-self: end; } .sm\:justify-self-end\:checked:checked { justify-self: end; } .sm\:justify-self-end\:disabled:disabled { justify-self: end; } .sm\:justify-self-end\:focus:focus { justify-self: end; } .sm\:justify-self-end\:focus-visible:focus-visible { justify-self: end; } .sm\:justify-self-end\:hover:hover { justify-self: end; } .sm\:justify-self-end\:required:required { justify-self: end; } .sm\:justify-self-end\:visited:visited { justify-self: end; } .sm\:justify-self-center { justify-self: center; } .sm\:justify-self-center\:active:active { justify-self: center; } .sm\:justify-self-center\:checked:checked { justify-self: center; } .sm\:justify-self-center\:disabled:disabled { justify-self: center; } .sm\:justify-self-center\:focus:focus { justify-self: center; } .sm\:justify-self-center\:focus-visible:focus-visible { justify-self: center; } .sm\:justify-self-center\:hover:hover { justify-self: center; } .sm\:justify-self-center\:required:required { justify-self: center; } .sm\:justify-self-center\:visited:visited { justify-self: center; } .sm\:justify-self-stretch { justify-self: stretch; } .sm\:justify-self-stretch\:active:active { justify-self: stretch; } .sm\:justify-self-stretch\:checked:checked { justify-self: stretch; } .sm\:justify-self-stretch\:disabled:disabled { justify-self: stretch; } .sm\:justify-self-stretch\:focus:focus { justify-self: stretch; } .sm\:justify-self-stretch\:focus-visible:focus-visible { justify-self: stretch; } .sm\:justify-self-stretch\:hover:hover { justify-self: stretch; } .sm\:justify-self-stretch\:required:required { justify-self: stretch; } .sm\:justify-self-stretch\:visited:visited { justify-self: stretch; } } @media (min-width: 768px) and (max-width: 1023px) { .md\:justify-self-auto { justify-self: auto; } .md\:justify-self-auto\:active:active { justify-self: auto; } .md\:justify-self-auto\:checked:checked { justify-self: auto; } .md\:justify-self-auto\:disabled:disabled { justify-self: auto; } .md\:justify-self-auto\:focus:focus { justify-self: auto; } .md\:justify-self-auto\:focus-visible:focus-visible { justify-self: auto; } .md\:justify-self-auto\:hover:hover { justify-self: auto; } .md\:justify-self-auto\:required:required { justify-self: auto; } .md\:justify-self-auto\:visited:visited { justify-self: auto; } .md\:justify-self-start { justify-self: start; } .md\:justify-self-start\:active:active { justify-self: start; } .md\:justify-self-start\:checked:checked { justify-self: start; } .md\:justify-self-start\:disabled:disabled { justify-self: start; } .md\:justify-self-start\:focus:focus { justify-self: start; } .md\:justify-self-start\:focus-visible:focus-visible { justify-self: start; } .md\:justify-self-start\:hover:hover { justify-self: start; } .md\:justify-self-start\:required:required { justify-self: start; } .md\:justify-self-start\:visited:visited { justify-self: start; } .md\:justify-self-end { justify-self: end; } .md\:justify-self-end\:active:active { justify-self: end; } .md\:justify-self-end\:checked:checked { justify-self: end; } .md\:justify-self-end\:disabled:disabled { justify-self: end; } .md\:justify-self-end\:focus:focus { justify-self: end; } .md\:justify-self-end\:focus-visible:focus-visible { justify-self: end; } .md\:justify-self-end\:hover:hover { justify-self: end; } .md\:justify-self-end\:required:required { justify-self: end; } .md\:justify-self-end\:visited:visited { justify-self: end; } .md\:justify-self-center { justify-self: center; } .md\:justify-self-center\:active:active { justify-self: center; } .md\:justify-self-center\:checked:checked { justify-self: center; } .md\:justify-self-center\:disabled:disabled { justify-self: center; } .md\:justify-self-center\:focus:focus { justify-self: center; } .md\:justify-self-center\:focus-visible:focus-visible { justify-self: center; } .md\:justify-self-center\:hover:hover { justify-self: center; } .md\:justify-self-center\:required:required { justify-self: center; } .md\:justify-self-center\:visited:visited { justify-self: center; } .md\:justify-self-stretch { justify-self: stretch; } .md\:justify-self-stretch\:active:active { justify-self: stretch; } .md\:justify-self-stretch\:checked:checked { justify-self: stretch; } .md\:justify-self-stretch\:disabled:disabled { justify-self: stretch; } .md\:justify-self-stretch\:focus:focus { justify-self: stretch; } .md\:justify-self-stretch\:focus-visible:focus-visible { justify-self: stretch; } .md\:justify-self-stretch\:hover:hover { justify-self: stretch; } .md\:justify-self-stretch\:required:required { justify-self: stretch; } .md\:justify-self-stretch\:visited:visited { justify-self: stretch; } } @media (min-width: 1024px) and (max-width: 2000px) { .lg\:justify-self-auto { justify-self: auto; } .lg\:justify-self-auto\:active:active { justify-self: auto; } .lg\:justify-self-auto\:checked:checked { justify-self: auto; } .lg\:justify-self-auto\:disabled:disabled { justify-self: auto; } .lg\:justify-self-auto\:focus:focus { justify-self: auto; } .lg\:justify-self-auto\:focus-visible:focus-visible { justify-self: auto; } .lg\:justify-self-auto\:hover:hover { justify-self: auto; } .lg\:justify-self-auto\:required:required { justify-self: auto; } .lg\:justify-self-auto\:visited:visited { justify-self: auto; } .lg\:justify-self-start { justify-self: start; } .lg\:justify-self-start\:active:active { justify-self: start; } .lg\:justify-self-start\:checked:checked { justify-self: start; } .lg\:justify-self-start\:disabled:disabled { justify-self: start; } .lg\:justify-self-start\:focus:focus { justify-self: start; } .lg\:justify-self-start\:focus-visible:focus-visible { justify-self: start; } .lg\:justify-self-start\:hover:hover { justify-self: start; } .lg\:justify-self-start\:required:required { justify-self: start; } .lg\:justify-self-start\:visited:visited { justify-self: start; } .lg\:justify-self-end { justify-self: end; } .lg\:justify-self-end\:active:active { justify-self: end; } .lg\:justify-self-end\:checked:checked { justify-self: end; } .lg\:justify-self-end\:disabled:disabled { justify-self: end; } .lg\:justify-self-end\:focus:focus { justify-self: end; } .lg\:justify-self-end\:focus-visible:focus-visible { justify-self: end; } .lg\:justify-self-end\:hover:hover { justify-self: end; } .lg\:justify-self-end\:required:required { justify-self: end; } .lg\:justify-self-end\:visited:visited { justify-self: end; } .lg\:justify-self-center { justify-self: center; } .lg\:justify-self-center\:active:active { justify-self: center; } .lg\:justify-self-center\:checked:checked { justify-self: center; } .lg\:justify-self-center\:disabled:disabled { justify-self: center; } .lg\:justify-self-center\:focus:focus { justify-self: center; } .lg\:justify-self-center\:focus-visible:focus-visible { justify-self: center; } .lg\:justify-self-center\:hover:hover { justify-self: center; } .lg\:justify-self-center\:required:required { justify-self: center; } .lg\:justify-self-center\:visited:visited { justify-self: center; } .lg\:justify-self-stretch { justify-self: stretch; } .lg\:justify-self-stretch\:active:active { justify-self: stretch; } .lg\:justify-self-stretch\:checked:checked { justify-self: stretch; } .lg\:justify-self-stretch\:disabled:disabled { justify-self: stretch; } .lg\:justify-self-stretch\:focus:focus { justify-self: stretch; } .lg\:justify-self-stretch\:focus-visible:focus-visible { justify-self: stretch; } .lg\:justify-self-stretch\:hover:hover { justify-self: stretch; } .lg\:justify-self-stretch\:required:required { justify-self: stretch; } .lg\:justify-self-stretch\:visited:visited { justify-self: stretch; } }
css
Born in a coastal area of Andhra Pradesh, Hanuma Vihari has been considered just as cool as the eastern winds itself. Known to be in the same category as the 'coolest' VVS Laxman, Vihari has risen through the ranks slowly but made sure his rise didn't go unnoticed. Vihari was a member of the Under-19 World Cup winning squad in 2012. Though he didn't have the numbers to press forward his case for the national team, he made sure he didn't waste time in pondering upon it too much. He worked hard on his skills and got a contract with the Hyderabad-based franchise in the Indian T20 League in 2013. After showing promise with both bat and ball in the T20 tournament, he changed his allegiance to Hyderabad from Andhra Pradesh in the domestic circuit in 2016. He was given the reigns of the team as well. In the first 63 FC matches he played, he had a staggering average of 59.79 and the best of 302*, which came in the very season he switched. After a lot of hard work and perseverance, his outstanding 2017-18 domestic season where he scored 1056 FC runs at an average of 96 was hard to ignore. Hanuma was finally called to the Test squad in 2018 for the last two Tests in England. He made his debut against England in September and struck his maiden fifty in the very first outing. He also picked up three crucial wickets of Joe Root, Alastair Cook, and Sam Curran in the second innings to showcase his all-round utility. Since then, he has been almost a regular for India in this format, especially away from home.
english
package org.jabref.logic.remote; public class RemoteUtil { private RemoteUtil() { } public static boolean isUserPort(int portNumber) { return (portNumber >= 1024) && (portNumber <= 65535); } }
java
<reponame>WSU-WEB3430-AA/web3430-starter-project-fullstack // Required by Webpack - do not touch require('../../favicon.ico') require.context('../../fonts/', true, /\.(eot|ttf|woff|woff2)$/i) require.context('../../images/', true, /\.(png|jpg|jpeg|gif|svg)$/i) require.context('../../stylesheets/', true, /\.(css|scss)$/i) // TODO import 'bootstrap' import React from 'react' import ReactDOM from 'react-dom' import App from './components/App' ReactDOM.render(<App course="Full stack JavaScript development" framework="the MERN stack"/>, document.querySelector('#main'))
javascript
<filename>beecrowd exercises/beecrowd-1158.py<gh_stars>0 n = int(input()) for i in range(n): vet = list(map(int, input().split())) partida = vet[0] qtd = vet[1] if partida % 2 == 0: partida += 1 soma = 0 for j in range(qtd): soma += partida partida += 2 print(soma)
python
from dataclasses import dataclass, field from typing import List, Optional from virtool_workflow.analysis.library_types import LibraryType @dataclass class Sample: """A Virtool Sample.""" #: The sample's unique database ID. id: str #: A user-selected name. name: str #: A user-selected host of origin. host: str #: A user-selected isolate identifier. isolate: str #: A user-selected locale. locale: str #: The sample's :class:`.LibraryType`. library_type: LibraryType #: Flag indicating whether the Illumina data is paired. paired: bool #: A quality :class:`dict` from FastQC. quality: dict #: Flag indicating whether sample has a completed NuVs analysis. nuvs: bool = False #: Flag indicating whether sample has a completed Pathoscope analysis. pathoscope: bool = False #: Read files associated with the sample. files: List[dict] = field(default_factory=lambda: []) def __post_init__(self): self.reads_path = None self.read_paths = None @property def min_length(self) -> Optional[int]: """ The minimum observed read length in the sample sequencing data. Returns ``None`` if the sample is still being created and no quality data is available. """ return self.quality["length"][0] if self.quality else None @property def max_length(self) -> Optional[int]: """ The maximum observed read length in the sample sequencing data. Returns ``None`` if the sample is still being created and no quality data is available. """ return self.quality["length"][1] if self.quality else None
python
import xlrd import numpy as np import xlwt from tempfile import TemporaryFile book = xlwt.Workbook() sheet1 = book.add_sheet('sheet1') data=xlrd.open_workbook(r'C:\Users\Desktop\teamE\D1_route.xlsx') table=data.sheets()[0] all_data=[] row_num=table.nrows col_num=table.ncols all_loc=[] for i in range(table.nrows): every_row=table.row_values(i) all_data.append(every_row) new_all_data=np.array(all_data) data_try=new_all_data.flatten() data_try1=sorted(data_try) for l in range(len(data_try1)): j = 1 order_min=data_try1[l] loca=np.where(new_all_data==order_min) all_data_for_choose=new_all_data sheet1.write(l, 0, order_min) while j<12: #all_loc.append([loca[0][0],loca[1][0]]) change1=np.delete(all_data_for_choose,[loca[0][0],loca[1][0]],0) change2=np.delete(change1,[loca[0][0],loca[1][0]],1) dis = np.min(change2) all_data_for_choose = change2 loca = np.where(all_data_for_choose == dis) sheet1.write(l, j, dis) j+=1 name = "find_route_sensitivity_D1.xls" book.save(name) book.save(TemporaryFile())
python
Gladiators Esports made their BGMI debut on June 9, 2023, by signing three former Chemin Esports players, DeltaPG, Destro, and Justin. Apart from these seasoned athletes, the Hyderabad-based organization added an underdog, Shogun, to their squad. The ongoing Skyesports Champions Series is their first tournament, where the lineup has directly been seeded in the Semifinals. The lineup, under the team name Destro, participated in the Nodwin BGMI Pro Scrims, where they captured third position and received ₹80,000 in prize money. The newly-established firm will aim to garner remarkable results in their upcoming competitions with this strong unit. The combination of three experienced and one rising player looks promising and is expected to prove a formidable opponent against several big clubs. These veterans have already proven their sensational abilities in several tournaments and will use their coordinated gameplay to achieve respectable results in their upcoming major contests. Justin, who used to play for Team Pahadi Gaming, recently exhibited his phenomenal gameplay in the BGMI Rising and was awarded the Most Valuable Player (MVP) title. During this Launch Party tournament, he eliminated 12 players in a single match, and several prominent players appreciated him for his magnificent show. He came into the limelight last year while playing for Chemin Esports and, within five months, became a rising star. Destro is a well-known figure in the community, as he has competed under several prestigious organizations. Khan started his esports career in 2019 and came to light when Umumba Esports recruited him in January 2020. He then joined Scout-owned Team Xspark and secured the PMCO India Fall 2020 title. He played for OR Esports for about six months in 2021. He then joined Skylightz Gaming and surprisingly claimed the grand BGIS Season 1 trophy under the banner. DeltaPG's consistent performance makes him one of the unique talents in BGMI esports. He presented an exceptional job in the Master Series 2022 and has provided excellent support to his team in several events. Meanwhile, the underdog Shogun will look to learn from his experienced teammates and aim to earn a name for himself. BGMI relaunched about two weeks ago, and three third-party tournaments are already over. Several events have already been scheduled for the upcoming weeks, providing a good platform for these teams.
english
The New York Post is quivering in fear and outrage over a graduate level course for intelligence analysts that requires students to write a fake terrorism plot, complete with methods of execution, sources of funding, number of operatives needed and the target government's reaction. Students, who are training for intelligence and counterterrorism careers, must take into account the “goals, capabilities, tactical profile, targeting pattern and operational area,” the syllabus states -- according to the Post's harrowing story Monday. The Post's crack investigative team uncovered the covert training of terrorists by obtaining the syllabus of the class offered by NYU’s School of Continuing and Professional Studies Center for Global Affairs. I know you apologists will say such an exercise is intended to train analysts to know how to think like their adversaries, and be able to understand how to detect and disrupt attacks. But that's just fancy intellectualizing. You need only to read the outraged quote from one of the Post's anonymous sources to see what evil is transpiring here under the tutelage of former Navy criminal investigator Marie-Helen Maras: But we need to do more than keep our students from drawing up plots for terrorists and then e-mailing their homework to them. We need to rein in Hollywood and put export controls on -- or even better -- ban terrorist-communications-masquerading-as-entertainment like "Live Free or Die," "Homeland," and "24". We should even consider controls on well-intentioned fare like the "Red Dawn" and "Rambo" movies from the 1980s. The only way to keep the terrorists in the Dark Ages is to keep them in the dark, even if we have to sacrifice by living there too. Our bright future depends on it.
english
<gh_stars>1-10 export declare type permissionString = 'http://www.w3.org/ns/auth/acl#Read' | 'http://www.w3.org/ns/auth/acl#Write' | 'http://www.w3.org/ns/auth/acl#Append' | 'http://www.w3.org/ns/auth/acl#Control'; export declare type PermissionsCastable = Permissions | permissionString | permissionString[] | undefined; /** * @alias module:Permissions * @example * const { READ, WRITE, APPEND, CONTROL } = Permissions * // Create a new permissions instance with READ and WRITE permission * const permissions = new Permissions(READ, WRITE) * permissions.add(APPEND) * permissions.has(READ, WRITE, APPEND) // true * permissions.delete(APPEND) * permissions.has(APPEND) // false * * // It has an inbuilt iterator which allows a for-each loop and using the spread syntax * for (const perm of permissions) { * console.log(perm) * } * [...perm].forEach(perm => console.log(perm)) */ declare class Permissions { readonly permissions: Set<permissionString>; constructor(...permissions: permissionString[]); add(...permissions: permissionString[]): this; has(...permissions: permissionString[]): boolean; delete(...permissions: permissionString[]): this; equals(other: Permissions): boolean; includes(other: Permissions): boolean; clone(): Permissions; /** * @description Return true when no permissions are stored * @returns {boolean} */ isEmpty(): boolean; _assertValidPermissions(...permissions: permissionString[]): void; /** * @description Make a permissions instance iterable * @returns {IterableIterator<permissionString>} */ [Symbol.iterator](): IterableIterator<permissionString>; static from(): Permissions; static from(firstVal: PermissionsCastable): Permissions; static from(firstVal: PermissionsCastable, ...val: permissionString[]): Permissions; /** * @description Return all common permissions */ static common(first: Permissions, second: Permissions): Permissions; /** * @description Return all permissions which are in at least one of [first, second] */ static merge(first: Permissions, second: Permissions): Permissions; /** * @description Return all permissions from the first which aren't in the second */ static subtract(first: Permissions, second: Permissions): Permissions; static readonly READ: permissionString; static readonly WRITE: permissionString; static readonly APPEND: permissionString; static readonly CONTROL: permissionString; static readonly ALL: Permissions; } export default Permissions;
typescript
"I have been using this over the past 3 days. Here is my review. nnPros:nn1. Overall Configuration is great. n2. First tab in the world to be boxed with a Jellybean. n3. It supports Google Play Store. n4. Internal space of around 1. 5Gb is dedicated for downloads from play store. nAlso around 800 Mb of it is like user space. n5. Charges pretty fast around 2 hours max for a huge 4500mAh battery. Also battery lasts long around 6+ hours till now. n6. The tab does not heat up when you play games or even browse net via wi-fi for hours. n7. It has support for connecting a dongle like MTS since it does not have sim facility for GPRS. n8. The screen size is good enough to read books, browse and play good games. n9. Games work out of the box - Temple Run, FL Commando, POP Classic were some of the high end games I played and it plays flawlessly. n10. It has USB OTG support. So it means you can connect your pen drives to the cable provided in the box to browse and even watch movies present inside your pen drive. n11. It supports enough number of formats. Plz install MXplayer with codec support from Play store to run different formats. n12. The shutdown time of the tab is less than 5 seconds and the start up time is like 25 to 30 seconds. Make sure you reduce the number of home screens and the widgets on your home screens. Also remove automatic adding of widgets from your google play settings. n13. The audio is loud enough to watch a film happily. Also you can connect your speakers to the stereo jack as an optional source of sound. n14. The graphics card provided is from the US company called Vivante. It is good and in fact a great competitor for Mali cards provided by ARM. n15. It has a dual GPU which should support lots of high end games and also a 1. 5 Ghz dual core cortex 9 processor is an added advantage. n16. Stand by time is around a day or more. Could not test this properly. n17. It has ethernet support. So if you have a USB modem you can connect it to the tab via UTG support n connect to the internet directly with no router for a wi fi. n18. Connecting a keyboard or a mouse with the tab is easy. So mounting the tab and you can work some projects or even write some source code. n19. I use a Sennheiser earphone. The sound quality with it was wonderful for this tab. n20. Supports bluetooth - so sharing is simplified. Also you can use wifi direct functionality. nnCon(s):nn1. You dont need a mirror! ! ! Yes the screen I think has an added layer which reflects your own face - it becomes difficult to read and write in bright sunlight or even when the background light is more. n2. A small dust particle is embedded b/w these 2 screens in my tablet which is kinda irritation when you observe it keenly. n3. It does not have calling facility. Also its not comfortable to speak with a 8 inches tablet across your face. Unless you use a bluetooth headset. nnI bought this tab for a price less than stated here in Flipkart. nnSince this is one of the first tablets to come with a 8 inches screen - getting a screen guard or a cover is difficult. nnHopefully if flipkart could provide it for the extra bucks they are charging here and also if they could provide some earphones or a bluetooth headset it would be great. nnHope you liked the review. nnIts a great product for every amount of Rupee you pay on it. nnEnjoy. " I got this tablet mainly because of the specs. The dual core A9 CPU + Mali GPU combo was very tempting along with 8 inch screen. I already own a Phablet (5 inch) and Netbook (11 inch), so 8 inch size of this tablet is perfect fit in between - read casual browsing. The tablet looks good though on closer scrutiny it feels flimsy. nnThe biggest issue with this tablet must be the touch. The touch "resolution" is very low. If the screen is scrutinized closely, one can observe large sensor blocks. Further It is not very sensitive to touch, more so towards the edges. This can cause severe frustration because more interactive aspects of UI like screen buttons, browser tab/menu buttons, notification buttons happen to be at the edge of screen. nnWith just two weeks of usage, I am observing two shadowy black bands appearing on the edges of the screen. So the screen may not last long. nnThe whole world is moving towards Micro USB, but this tab is equipped with stone age charger pin. So you have to carry tablet's charger along with your standard USB charger. nnWhat is the use of good specs if a product is not usable? Compared to this, I feel Micromax Funbook is much better. The international brands like Note 800 are a league ahead. At close to 7K this is huge waste of money ! nnUpdate: After nearly a year of usage, It is now mainly an entertainment hub for my daughter. No issues yet other than touch sensitivity. Connect to keyboard & Mouse via OTG, bingo the "touch" issue is dealt with. Well I actually have bought Karbonn Smart Tab 10 and not this one but still as the tabs are identical apart from the display size I felt I should review to help others. nnThe touch,display and the internal memory seem to be the cons of Karbonn Smart Tab 8. But the display and touch is rather good in Smart Tab 10. So I'd rather let you guys know about the pros of these two tabs Velox and Cosmic. nnPros:-nni)Multitasking is just as it should be with 1 Gigs of RAM. It's great. nii)The dual core 1. 5 GHz processor makes the UI really responsive and thus no lags at all. niii)It can play 1080p videos without a single jerk. niv)It can run all HD games but the actual problem is a few games do not support Jelly Bean so don't blame this device. nv)The range of Wifi is really good. nvi) The touch sensitivity is really good on ST10. nnMoreover I have already found the method of rooting these two tabs from Karbonn and I have also posted the method of swapping Internal and External Memory so that you can play HD games with huge data. And you can also find out what all HD games are running well on this tab(There's a separate thread for that). Google it and you'll find out. Just head over to the xda forums.
english
export {default} from './NavbarBrand.js';
javascript
<filename>hackerrank-solutions/src/test/java/io/github/amarcinkowski/hackerrank/java/tests/JavaAdvanced.java package io.github.amarcinkowski.hackerrank.java.tests; import org.junit.Test; import io.github.amarcinkowski.solutionframework.SolutionTestSuite; import io.github.amarcinkowski.solutionframework.TestInfo; public class JavaAdvanced extends SolutionTestSuite { @Test @TestInfo(platform = "hackerrank", domain = "java", subdomain = "java-advanced", classname = "CanYouAccess", taskDescription = "Can You Access?") public void canYouAccess() { runTest(); } @Test @TestInfo(platform = "hackerrank", domain = "java", subdomain = "java-advanced", classname = "PrimeChecker", taskDescription = "Prime Checker") public void primeChecker() { runTest(); } @Test @TestInfo(platform = "hackerrank", domain = "java", subdomain = "java-advanced", classname = "ReflectionAttributes", taskDescription = "Java Reflection - Attributes") public void reflectionAttributes() { runTest(); } @Test @TestInfo(platform = "hackerrank", domain = "java", subdomain = "java-advanced", classname = "JavaFactory", taskDescription = "Java Factory") public void javaFactory() { runTest(); } @Test @TestInfo(platform = "hackerrank", domain = "java", subdomain = "java-advanced", classname = "Singleton", taskDescription = "Java Singleton") public void singleton() { runTest(); } @Test @TestInfo(platform = "hackerrank", domain = "java", subdomain = "java-advanced", classname = "Annotations", taskDescription = "Java Annotations") public void annotations() { runTest(); } @Test @TestInfo(platform = "hackerrank", domain = "java", subdomain = "java-advanced", classname = "CovariantReturnTypes", taskDescription = " Covariant Return Types") public void covariantReturnTypes() { runTest(); } @Test @TestInfo(platform = "hackerrank", domain = "java", subdomain = "java-advanced", classname = "LambdaExpressions", taskDescription = "Java Lambda Expressions") public void lambdaExpressions() { runTest(); } @Test @TestInfo(platform = "hackerrank", domain = "java", subdomain = "java-advanced", classname = "JavaVarargsSimpleAddition", taskDescription = "Java Varargs - Simple Addition") public void javaVarargsSimpleAddition() { runTest(); } @Test @TestInfo(platform = "hackerrank", domain = "java", subdomain = "java-advanced", classname = "JavaMd5", taskDescription = "Java MD5") public void javaMd5() { runTest(); } @Test @TestInfo(platform = "hackerrank", domain = "java", subdomain = "java-advanced", classname = "JavaSha256", taskDescription = "Java SHA-256") public void javaSha256() { runTest(); } }
java
Rogue was limping in the morning. He is our garden cat, who was a tiny kitten until February this year. By the afternoon, the limp was gone. And the nag inside me went away. I never had a bond with animals, until this past year.
english
use std::fs::File; use std::io::prelude::*; fn skip_garbage<T>(char_iter: &mut std::iter::Peekable<T>) -> u32 where T: Iterator<Item = char>, { // Skip the opening '<' if let Some(c) = char_iter.next() { assert!(c == '<', "Garbage must start with '<', instead got {}", c); } else { panic!("Garbage has end of input") } let mut garbage_count = 0; while let Some(c) = char_iter.next() { if c == '>' { break; } else if c == '!' { char_iter.next(); } else { garbage_count += 1; } } assert!( char_iter.peek().is_some(), "Unexpected end of input in garbage" ); return garbage_count; } fn count_groups<T>(char_iter: &mut std::iter::Peekable<T>, depth: u32) -> (u32, u32) where T: Iterator<Item = char>, { // Skip the opening '{' assert!(char_iter.peek() == Some(&'{')); char_iter.next(); let mut group_count = 0; let mut garbage_count = 0; loop { // Count subgroup or garbage match char_iter.peek() { Some(&c) => { if c == '{' { let (subgroup_count, subgroup_garbage) = count_groups(char_iter, depth + 1); group_count += subgroup_count; garbage_count += subgroup_garbage; } else if c == '<' { garbage_count += skip_garbage(char_iter); } } None => { panic!("Unexpected end of input"); } } // Check if we are continuing this group with ',', or ending this group with '}' match char_iter.next() { Some(c) => { if c == '}' { // End of group return (depth + group_count, garbage_count); } else { assert!(c == ',', "expected \',\' or \'}}\'; got \'{}\'", c); } } None => { panic!("Unexpected end of input"); } } } } fn get_input() -> String { let mut f = File::open("input.txt").expect("Could not open file"); let mut input_str = String::new(); f.read_to_string(&mut input_str) .expect("Could not read file"); return input_str; } fn main() { let input = get_input(); let (part1, part2) = count_groups(&mut input.chars().peekable(), 1); println!("Part 1: {}", part1); println!("Part 2: {}", part2); }
rust
As a young boy, Ravindra Kumar Barkhiya believed that if he wished hard enough, his right leg would untwist and grow strong again, that he’d no longer have to crawl or use crutches, and that he’d be able to play cricket with his friends in his village in Bulandshahr, Uttar Pradesh. His grandfather took him to a ‘baba’ who chanted prayers and rubbed oils on his leg, his parents took him to doctors who prescribed everything from pills to electrical stimulation. But nothing made Barkhiya’s polio-paralysed leg better. Two years ago, Barkhiya, now 30 and a computer scientist with an atomic power station, decided to Google up hospitals that treat polio disabilities. “I wanted to be independent,” he says. When I meet Barkhiya, he is on a hospital bed, his legs in callipers. He is past the most painful part of his treatment, a ‘distraction’ or bone-lengthening procedure, and has never been more optimistic. “Doctor saheb told me if I keep up with the physiotherapy, I may soon be able to walk with just a single elbow crutch,” he says. I am at Delhi’s oldest hospital, the 134-year-old St. Stephen’s hospital, where on the fourth floor are two wards, No. 4012 and No. 4013, possibly India’s only wards dedicated to treating men and women affected by polio. It has been five years since WHO declared the country polio-free, but the disease has left tens of thousands of people with severe disabilities. And at these polio wards, Mathew Varghese leads the orthopaedic team that performs reconstructive surgery to help patients walk again. They correct deformities of the hip, knee and foot, set right muscle imbalance, lengthen bones, and custom fit polypropylene callipers — all for free, thanks in part to the hospital’s welfare society and in part to donations. An elevator is not working this morning and Dr. Varghese has been dashing up and down the stairs between the wards on the fourth floor and his office in the basement. His table is cluttered with journals and medical records but also with wedding invitations, letters and photographs that former patients have sent their doctor, informing him about milestones in their lives after surgery. India’s ambitious Pulse Polio oral vaccination campaign launched nationwide in 1995 brought down polio cases from 50,000-100,000 each year in the 80s to zero in 2012. The last case of wild poliovirus was reported in 2011, when 18-month-old Rukhsar Khatoon from West Bengal’s Howrah district was diagnosed with the disease. When the ward was set up in the 80s, this was a children’s ward — 7,000 children have been treated here since the ward was established in the late 80s. Now, Dr. Varghese’s patients are adults in their 20s and 30s who come from all across the country, Gujarat to Guwahati, Kerala to Kashmir. Back at the ward, Dr. Varghese checks in on Puja Sharma, 24, whose leg is in a plaster and strung up in a traction unit to stretch her contracted joints. Sharma was less fortunate than Barkhiya — she had to drop out of school by Class VIII as it had become impossible to travel an hour sitting on the floor of the bus; her paralysis meant she couldn’t prop herself on a seat. “It started with a fever when she was three years old,” recalls her mother Suman, who is at her bedside. “I noticed one leg had gone limp. ” Her parents sought help everywhere, in Delhi where they lived to as far as a town in Uttar Pradesh where ‘doctors’ prescribed potions that peeled her skin off but did little else. Sharma heard about Dr. Varghese from her neighbour a couple of years ago. “All I want now is to be able to stand my own feet, without my brother or father holding my things, propping me up. Maybe I will even finish Class X and find a job,” she says. Disability surgery is not a priority for anyone, says Dr. Varghese — “not for corporate hospitals, because it is not money-making or glamorous, and not for government hospitals because the beds are occupied by trauma patients admitted for emergency surgeries. ” In the absence of access to treatment, families do what they can: they lean on homoeopathy, go to faith healers, or untrained surgeons who make things much worse. Often, the doctor finds that he is righting surgeries that have gone wrong. A month after I meet Barkhiya, I receive a message from him on WhatsApp. He has posted a picture of himself captioned: ‘Started standing on my feet without support’. For the first time that he can remember, Barkhiya is on his feet, hands in pockets. “Hopefully I should be able to walk soon too,” he says.
english
<reponame>qgenda/react-native-fingerprint-android<filename>android/src/main/java/io/jari/fingerprint/FingerprintModule.java package io.jari.fingerprint; import android.Manifest; import android.content.pm.PackageManager; import androidx.core.hardware.fingerprint.FingerprintManagerCompat; import androidx.core.os.CancellationSignal; import androidx.core.app.ActivityCompat; import android.util.Log; import com.facebook.react.bridge.Promise; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContextBaseJavaModule; import com.facebook.react.bridge.ReactMethod; import com.facebook.react.bridge.WritableNativeMap; import com.facebook.react.modules.core.DeviceEventManagerModule; import java.util.HashMap; import java.util.Map; @SuppressWarnings("MissingPermission") public class FingerprintModule extends ReactContextBaseJavaModule { private static final String TAG = "FingerprintModule"; FingerprintManagerCompat fingerprintManager; ReactApplicationContext reactContext; CancellationSignal cancellationSignal; boolean isCancelled = false; final int FINGERPRINT_ACQUIRED_AUTH_FAILED = 999; final int FINGERPRINT_ERROR_CANCELED = 5; public FingerprintModule(ReactApplicationContext reactContext) { super(reactContext); this.reactContext = reactContext; this.fingerprintManager = FingerprintManagerCompat.from(reactContext); } // Harcdoded from https://developer.android.com/reference/android/hardware/fingerprint/FingerprintManager.html#FINGERPRINT_ACQUIRED_GOOD // So we don't depend on FingerprintManager directly @Override public Map<String, Object> getConstants() { final Map<String, Object> constants = new HashMap<>(); constants.put("FINGERPRINT_ACQUIRED_GOOD", 0); constants.put("FINGERPRINT_ACQUIRED_IMAGER_DIRTY", 3); constants.put("FINGERPRINT_ACQUIRED_INSUFFICIENT", 2); constants.put("FINGERPRINT_ACQUIRED_PARTIAL", 1); constants.put("FINGERPRINT_ACQUIRED_TOO_FAST", 5); constants.put("FINGERPRINT_ACQUIRED_TOO_SLOW", 4); constants.put("FINGERPRINT_ACQUIRED_AUTH_FAILED", FINGERPRINT_ACQUIRED_AUTH_FAILED); constants.put("FINGERPRINT_ERROR_CANCELED", FINGERPRINT_ERROR_CANCELED); constants.put("FINGERPRINT_ERROR_HW_UNAVAILABLE", 1); constants.put("FINGERPRINT_ERROR_LOCKOUT", 7); constants.put("FINGERPRINT_ERROR_NO_SPACE", 4); constants.put("FINGERPRINT_ERROR_TIMEOUT", 3); constants.put("FINGERPRINT_ERROR_UNABLE_TO_PROCESS", 2); return constants; } @ReactMethod public void hasPermission(Promise promise) { try { promise.resolve(ActivityCompat.checkSelfPermission(reactContext, Manifest.permission.USE_FINGERPRINT) == PackageManager.PERMISSION_GRANTED); } catch (Exception ex) { promise.reject(ex); } } @ReactMethod public void hasEnrolledFingerprints(Promise promise) { try { promise.resolve(fingerprintManager.hasEnrolledFingerprints()); } catch (SecurityException secEx) { Exception exception = new Exception("App does not have the proper permissions. (did you add USE_FINGERPRINT to your manifest?)\nMore info see https://github.com/jariz/react-native-fingerprint-android"); exception.initCause(secEx); promise.reject(exception); } catch (Exception ex) { promise.reject(ex); } } @ReactMethod public void isHardwareDetected(Promise promise) { try { promise.resolve(fingerprintManager.isHardwareDetected()); } catch (SecurityException secEx) { Exception exception = new Exception("App does not have the proper permissions. (did you add USE_FINGERPRINT to your manifest?)\nMore info see https://github.com/jariz/react-native-fingerprint-android"); exception.initCause(secEx); promise.reject(exception); } catch (Exception ex) { promise.reject(ex); } } @ReactMethod public void authenticate(Promise promise) { try { isCancelled = false; cancellationSignal = new CancellationSignal(); fingerprintManager.authenticate(null, 0, cancellationSignal, new AuthenticationCallback(promise), null); } catch (SecurityException secEx) { Exception exception = new Exception("App does not have the proper permissions. (did you add USE_FINGERPRINT to your manifest?)\nMore info see https://github.com/jariz/react-native-fingerprint-android"); exception.initCause(secEx); promise.reject(exception); } catch (Exception ex) { promise.reject(ex); } } @ReactMethod public void isAuthenticationCanceled(Promise promise) { promise.resolve(isCancelled); } @ReactMethod public void cancelAuthentication(Promise promise) { try { if(!isCancelled) { cancellationSignal.cancel(); isCancelled = true; } promise.resolve(null); } catch(Exception e) { promise.reject(e); } } @Override public String getName() { return "FingerprintAndroid"; } public class AuthenticationCallback extends FingerprintManagerCompat.AuthenticationCallback { Promise promise; public AuthenticationCallback(Promise promise) { this.promise = promise; } @Override public void onAuthenticationError(int errorCode, CharSequence errString) { super.onAuthenticationError(errorCode, errString); if(errorCode == FINGERPRINT_ERROR_CANCELED) { isCancelled = true; } if(promise == null) { Log.w(TAG, "Tried to reject the auth promise, but it was already resolved / rejected."); return; } promise.reject(Integer.toString(errorCode), errString.toString()); promise = null; } @Override public void onAuthenticationHelp(int helpCode, CharSequence helpString) { super.onAuthenticationHelp(helpCode, helpString); WritableNativeMap writableNativeMap = new WritableNativeMap(); writableNativeMap.putInt("code", helpCode); writableNativeMap.putString("message", helpString.toString()); reactContext .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) .emit("fingerPrintAuthenticationHelp", writableNativeMap); } @Override public void onAuthenticationSucceeded(FingerprintManagerCompat.AuthenticationResult result) { super.onAuthenticationSucceeded(result); if(promise == null) { Log.w(TAG, "Tried to reject the auth promise, but it was already resolved / rejected."); return; } promise.resolve(null); promise = null; } @Override public void onAuthenticationFailed() { super.onAuthenticationFailed(); WritableNativeMap writableNativeMap = new WritableNativeMap(); writableNativeMap.putInt("code", FINGERPRINT_ACQUIRED_AUTH_FAILED); writableNativeMap.putString("message", "Fingerprint was recognized as not valid."); reactContext .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) .emit("fingerPrintAuthenticationHelp", writableNativeMap); } } }
java
{ "name": "<NAME>", "type": "feature", "img": "icons/svg/item-bag.svg", "data": { "ability": "", "actionOptions": [], "activation": { "cost": "", "type": "", "reactionTrigger": "" }, "attack": { "bonus": "", "critThreshold": 20, "type": "" }, "area": { "shape": "", "size": "" }, "check": { "ability": "str" }, "damage": [], "description": "<p>At 1st level, you are particularly adept at traveling and surviving in natural environments. When making an Intelligence or Wisdom check related to any natural terrain, you gain an expertise die if using a skill you're proficient in. While traveling in any&nbsp;natural terrain, you gain the following benefits:</p><ul><li><p>Difficult terrain doesn’t slow your group’s travel.</p></li><li><p>Your group can’t become lost except by magical means.</p></li><li><p>Even when you are engaged in another activity while traveling you remain alert to danger. Your passive Perception increases by 2.</p></li><li><p>If you are traveling alone, you can move stealthily at a normal pace.</p></li><li><p>When you Hunt and Gather, you find twice as much Supply as you normally would.</p></li><li><p>While tracking other creatures, you also learn their exact number, their sizes, and how long ago they passed through the area.</p></li></ul>", "duration": { "unit": "", "value": "" }, "healing": [], "proficient": true, "range": [], "save": { "dc": "", "onSave": "", "targetAbility": "" }, "source": "", "target": { "quantity": "", "type": "" }, "uses": { "value": null, "max": "", "per": null }, "featureType": "class" }, "effects": [], "flags": { "core": { "sourceId": "Item.JfeUe7orrHplf4xO" }, "exportSource": { "world": "red-hand", "system": "a5e", "coreVersion": "9.266", "systemVersion": "0.6.0" } } }
json
<reponame>amortaza/go-hal<filename>hal-graphics.go<gh_stars>0 package hal type Canvas interface { Clear(red, green, blue float32) GetWidth() int GetHeight() int Begin() End() Paint(seeThru bool, left, top int, alphas []float32) Free() } type Graphics interface { Clear(red, green, blue float32) PushView(width, height int) PopView() NewCanvas(width, height int) Canvas }
go
package POO; public class MoldePatinete { String cor; String tipo; boolean estado; public void andar() { System.out.println("Em movimento..."); } public void parar() { System.out.println("Parado"); } }
java
import styled from "@emotion/styled"; import React from "react"; import { Redirect, Router, Link } from "@reach/router"; import { FaLightbulb, FaHistory } from "react-icons/fa"; import NewInsights from "./NewInsights"; import HistoricalInsights from "./HistoricalInsights"; import { borderColor, uiBlue, fgSecondary } from "../theme"; import { containerWidth } from "../layout"; const Styled = { TabWrapper: styled.nav` display: flex; flex-direction: row; justify-content: space-around; align-items: center; border-bottom: 1px solid ${borderColor}; margin-top: 32px; `, Content: styled.div` overflow-y: auto; flex-grow: 1; `, Router: styled(Router)` margin: 0 auto; max-width: ${containerWidth}; width: 100%; `, TabContent: styled.div` flex: 0 1 ${containerWidth}; `, Tab: styled(Link)` display: inline-block; padding: 10px 28px 16px; text-decoration: none; --color: ${fgSecondary}; color: var(--color); transform: translateY(1px); transition: all 0.125s linear; border-bottom: 3px solid transparent; svg { color: var(--color); opacity: 0.7; margin-right: 8px; vertical-align: -3px; font-size: 18px; } &[data-active] { --color: ${uiBlue}; border-bottom: 3px solid ${uiBlue}; } `, }; /** * Shows the inner content/routing needed for a connected dashboard, * including the tabs at the top */ function ConnectedDashboard() { return ( <> <Styled.TabWrapper> <Styled.TabContent> <Tab path="/dashboard/new" icon={FaLightbulb}> New Insights </Tab> <Tab path="/dashboard/historical" icon={FaHistory}> Historical Insights </Tab> </Styled.TabContent> </Styled.TabWrapper> <Styled.Content> <Styled.Router> <NewInsights path="new" /> <HistoricalInsights path="historical" /> <Redirect from="*" to="/dashboard/new" default noThrow /> </Styled.Router> </Styled.Content> </> ); } export default ConnectedDashboard; // ? ============== // ? Sub components // ? ============== type TabProps = { path: string; children: React.ReactNode; icon: React.ComponentType; }; /** * Renders a styled Tab component that has special active styling */ function Tab({ path, children, icon: Icon }: TabProps) { return ( <Styled.Tab to={path} getProps={({ isCurrent }) => ({ "data-active": isCurrent ? "true" : undefined, })} > <Icon /> {children} </Styled.Tab> ); }
typescript
/* Copyright (c) 2019, isaponsoft (Isao Shibuya) All rights reserved. * * Use of this source code is governed by a BSD-style license that * * can be found in the LICENSE file. */ #ifndef __libamtrs__passion__def__hpp #define __libamtrs__passion__def__hpp #ifndef PASSION_NAMESPACE #define PASSION_NAMESPACE psnvm #endif #define PASSION_NAMESPACE_BEGIN namespace PASSION_NAMESPACE { #define PASSION_NAMESPACE_END } #endif
cpp
{"name":"<NAME>","symbol":"FAYRIN","logoURI":"https://raw.githubusercontent.com/jayala1/crypto/main/logo.png","decimals":0,"address":"3YuUgH2VWJPBsDJmCsczhvTFjp3rryXwHwLFsVXUuZQm","chainId":101,"tags":["social-token"]}
json
Maxwell is in limelight after guiding Australia to a series win over India in their ongoing five-match ODI series Down Under. Australia all-rounder Glenn Maxwell has credited the tour to England last year and good performances in the ongoing Big Bash League (BBL) 2015 tournament the reason for his excellent show. Maxwell is in limelight after guiding Australia to a series win over India in their ongoing five-match ODI series Down Under, which they sealed in the third ODI with a 3-wicket win. Maxwell scored a composed 96 in the game to guide Australia to win in the third match at Melbourne, despite India creating troubles for the home side. Maxwell was named Man of the Match for his innings of 96, which came off 83 balls with 8 boundaries and 3 sixes. He added, “It’s not always going to be like that that, so it’s about adapting. Early on in my career I probably got a little too excited about trying to strike at 150 each game and be the match winner in each game and I didn’t really finish a job. “I felt I made good strides in England and had some good innings and I think even more recently for the Stars I felt I’ve done well and controlled some of the games. It’s been a massive work in progress. I’ve been doing some stuff off the field around the metal side of the game, which is the most important thing. So that’s one of the key things I’ve changed,” Maxwell concluded.
english
Real Madrid are closely following Joshua Kimmich's situation at Bayern Munich, Defensacentral's Jose Padilla reports. f the situation doesn't change, Madrid could consider a move for him in 2024 when he will have just one year left on his deal. Kimmich would be a great addition to the squad as he can play in multiple positions - as a right-back, defensive midfielder and central midfielder. He is currently 27 years old and definitely has more good seasons left in him.
english
When he rides in the real thing, the pope just smiles and waves. In this video game, the holy father dodges killer potholes and other obstacles as he drives the Popemobile. "Papa Road" Papa means Pope in Spanish is the brainchild of young Paraguayans who got the idea as their capital city prepares to host the pontiff starting Friday as part of a tour of South America. Back in June, crews started fixing up streets that were along the route the pope's transparent, bulletproof buggy will follow, said Jose Manuel Gonzalez, producer of the video game. But they ignored others that are still an absolute mess, he added. "Potholes that are like lunar craters, people offering to wash windshields, roving vendors and motorcycles that appear out of nowhere are just some of the obstacles you have to confront," Gonzalez said. The game works with cartoon figures and is free on the Internet. It's all just a way to poke fun at the government as the city prepares to host the pope. In the game, the Pope drives past city landmarks like the government palace, the Pantheon of Heroes and the cathedral, just as he will in person starting Friday. When the pontiff hits something, the face of Paraguayan President Horacio Cartes appears on the right of the screen, squealing and holding out a sign that says, "keep going." The Pope will arrive in Paraguay after visits to Ecuador and Bolivia. He leaves Asuncion Sunday to return home to the Vatican.
english
# ============================================================================= # FXCM API testing # Author : <NAME> # Please report bug/issues in the Q&A section # ============================================================================= import fxcmpy import time #initiating API connection and defining trade parameters token_path = "D:\\Udemy\\Quantitative Investing Using Python\\7_API Trading\\key.txt" con = fxcmpy.fxcmpy(access_token = open(token_path,'r').read(), log_level = 'error', server='demo') pair = 'EUR/USD' #get historical data data = con.get_candles(pair, period='m5', number=250) """periods can be m1, m5, m15 and m30, H1, H2, H3, H4, H6 and H8, D1, W1, M1""" #streaming data "for streaming data, we first need ti subscribe to a currency pair" con.subscribe_market_data('EUR/USD') con.get_last_price('EUR/USD') con.get_prices('EUR/USD') con.unsubscribe_market_data('EUR/USD') #trading account data con.get_accounts().T con.get_open_positions().T con.get_open_positions_summary().T con.get_closed_positions() con.get_orders() #orders con.create_market_buy_order('EUR/USD', 10) con.create_market_buy_order('USD/CAD', 10) con.create_market_sell_order('USD/CAD', 20) con.create_market_sell_order('EUR/USD', 10) order = con.open_trade(symbol='USD/CAD', is_buy=False, is_in_pips=True, amount=10, time_in_force='GTC', stop=-9, trailing_step =True, order_type='AtMarket', limit=9) con.close_trade(trade_id=tradeId, amount=1000) con.close_all_for_symbol('USD/CAD') #closing connection con.close()
python
Jeff Thomson was the epitome of a mega, macho Australian poster boy: he was tall, well-built, flamboyant and a fast bowler whose ability bowl thunderbolts made him a huge star. His strikingly good looks added to his image and he was very much a cynosure of ladies’ eyes. Thomson bid goodbye to the life in the glamorous lane and settled for a married life when he tied the knot with Cheryl Wilson, a good-looking model of the times. It’s another matter that Thommo forgot within a month the name of the church where he got married, other than the fact that it was opposite a police station! Incidentally, the flowers for his wedding were supplied by a florist who too had opened the bowling for Australia. The name of the florist? Ray Lindwall! In the above photo, Thomson and Cheryl are modeling outfits for an Australian chainstore on March 1, 1978.
english
Chef, cookbook author, culinary teacher and curry expert Raghavan Iyer died on Friday after a prolonged battle with cancer. He was 61. According to a New York Times report, Iyer taught Americans to cook Indian food. He has written seven cookbooks, including the iconic 660 curries. New York Times reported that the cause of his death was pneumonia complicated by colorectal cancer that had metastasized to his lungs and brain. He lived in Minneapolis and was visiting San Franciso at his death. In one of his final interviews with BBC in March this year, he talked about the latest - and last - book, On the Curry Trail: Chasing the Flavor That Seduced the World. In the interview, he expressed his hope for this book to become his lasting legacy in Indian cooking, especially the versatility of curry around the world. He said, "The book is telling the story of how curry travelled out of India, all around the world. " Through his books, he wanted his readers to know that there is more to curry than just curry powders. He described the book as his "love letter to the world of curries" and hoped it would be his "lasting legacy to the richness and vastness of this dish simply called curry". He was born on April 21, 1961, in Chidambaram, Tamil Nadu, to Gangabai Ramachandran, a homemaker, and S. Ramachandran, an officer in the Indian navy who later moved the family to Mumbai. He was the youngest of six children. His oldest sister, Lalitha Iyer, was a resident in obstetrics and gynaecology when their mother was pregnant with Mr Iyer, and she helped deliver him, reported New York Times.
english
Al-Arafah Islami Bank opened a sub-branch at Mawa, Lohajang of Munshiganj Sunday. Md Harun-Ar-Rashid Khan, director of the bank, inaugurated the new sub-branch as chief guest. Md Monir Hossain, head of Dhaka South Zone, was present, according to a media statement. Businessmen Md Rashidul Haque Munna, Ataur Rahman, Motahar Uddin Ahmed; General Secretary of Lohajang Press Club Manik Mia also joined the event, and Lohajang Branch Manager Zakiullah Siddique presided over it. "Al-Arafah Islami Bank was established not for making a profit by doing business but for the welfare of society," Harun-Ar-Rashid said.
english
<filename>data/bills/hr/hr1870/data.json { "actions": [ { "acted_at": "2015-04-16", "committees": [ "HSSY" ], "references": [], "status": "REFERRED", "text": "Referred to the House Committee on Science, Space, and Technology.", "type": "referral" }, { "acted_at": "2015-08-18", "in_committee": null, "references": [], "text": "Referred to the Subcommittee on Energy.", "type": "referral" } ], "amendments": [], "bill_id": "hr1870-114", "bill_type": "hr", "by_request": false, "committees": [ { "activity": [ "referral" ], "committee": "House Science, Space, and Technology", "committee_id": "HSSY" }, { "activity": [ "referral" ], "committee": "House Science, Space, and Technology", "committee_id": "HSSY", "subcommittee": "Subcommittee on Energy", "subcommittee_id": "20" } ], "congress": "114", "cosponsors": [], "enacted_as": null, "history": { "active": false, "awaiting_signature": false, "enacted": false, "vetoed": false }, "introduced_at": "2015-04-16", "number": "1870", "official_title": "To authorize Energy Innovation Hubs.", "popular_title": null, "related_bills": [ { "bill_id": "hr1806-114", "reason": "related", "type": "bill" }, { "bill_id": "hr1898-114", "reason": "related", "type": "bill" } ], "short_title": null, "sponsor": { "district": "9", "name": "<NAME>", "state": "FL", "thomas_id": "01914", "title": "Rep", "type": "person" }, "status": "REFERRED", "status_at": "2015-04-16", "subjects": [ "Advanced technology and technological innovations", "Alternative and renewable resources", "Climate change and greenhouse gases", "Energy", "Energy efficiency and conservation", "Energy research", "Energy storage, supplies, demand", "Hybrid, electric, and advanced technology vehicles", "Nuclear power", "Research administration and funding", "Research and development", "Technology transfer and commercialization" ], "subjects_top_term": "Energy", "summary": { "as": "Introduced", "date": "2015-04-16", "text": "This bill requires the Department of Energy (DOE) to carry out a grant program to enhance the nation's economic, environmental, and energy security by making awards to consortia for establishing and operating Energy Innovation Hubs to conduct and support multidisciplinary, collaborative research, development, demonstration, and commercial application of advanced energy technologies. Advanced energy technologies are innovative technologies or research, development, demonstration, and commercial application activities necessary to ensure the long-term, secure, and sustainable supply of energy critical elements. These elements have a high risk of a supply disruption and are critical to new, energy-related technologies in that a shortage of the element would significantly inhibit large-scale deployment of technologies that produce, transmit, store, or conserve energy.\n\nExamples of advanced energy technology include an innovative technology that:\n\n produces energy from renewable energy resources; produces nuclear energy; includes carbon capture and sequestration; enables advanced vehicles, vehicle components, and related technologies that result in significant energy savings; generates, transmits, distributes, utilizes, or stores energy more efficiently than conventional technologies; and enhances the energy independence and security of the United States by enabling improved or expanded supply and production of domestic energy resources. DOE must designate a unique advanced energy technology focus for each Hub.\n\nGrants may not be used for constructing new buildings or facilities for Hubs. Further, construction of new buildings or facilities may not be considered as part of the non-federal share of a Hub cost-sharing agreement. Grants and non-federal cost share funds may be used for research or for the construction of a test bed or renovations to existing buildings or facilities for the purposes of research." }, "titles": [ { "as": "introduced", "is_for_portion": false, "title": "To authorize Energy Innovation Hubs.", "type": "official" } ], "updated_at": "2016-06-25T06:39:07-04:00", "url": "http://thomas.loc.gov/cgi-bin/bdquery/z?d114:HR1870:@@@L&summ2=m&" }
json
<filename>data_collection/English/layer3/EN114947.json { "authors": [ { "author": "<NAME>" }, { "author": "<NAME>" }, { "author": "<NAME>" }, { "author": "<NAME>" }, { "author": "<NAME>" } ], "doi": "10.1186/s12881-015-0263-1", "publication_date": "2015-12-25", "id": "EN114947", "url": "https://pubmed.ncbi.nlm.nih.gov/26701096", "source": "BMC medical genetics", "source_url": "", "licence": "CC BY", "language": "en", "type": "pubmed", "description": "", "text": "We report a case of newly diagnosed ARVC where genetic testing identified a novel familial frame-shift mutation in the PKP2 gene. Screening of the family members identified both children and the father as mutation carriers following an autosomal-dominant inheritance pattern." }
json
package main import "fmt" func numprocs() int { return 10 } func adder(in <-chan int, out chan<- int) { for { out <- (<-in + 1) } } func main() { chOne := make(chan int) chOut := chOne chIn := chOne for i := 0; i < numprocs(); i++ { chOut = make(chan int) go adder(chIn, chOut) chIn = chOut } chOne <- 0 fmt.Println(<-chOut) }
go
package org.zenframework.easyservices.test.dynamic; import org.zenframework.easyservices.annotations.Close; import org.zenframework.easyservices.annotations.Ref; import org.zenframework.easyservices.test.simple.Function; public interface Calculator { @Ref Function getFunction(String name); void close(@Ref @Close Function function); int call(@Ref Function function, int a, int b); }
java
# from functools import wraps # def debugMethod(func, cls=None): # '''decorator for debugging passed function''' # @wraps(func) # def wrapper(*args, **kwargs): # print({ # 'class': cls, # class object, not string # 'method': func.__qualname__, # method name, string # 'args': args, # all args, including self # 'kwargs': kwargs # }) # return func(*args, **kwargs) # return wrapper class Meta(type): # def __new__(cls, clsname, bases, clsdict): # obj = super().__new__(cls, clsname, bases, clsdict) # def IS_DUNDER(x): return x.startswith("__") and x.endswith("__") # for item, val in vars(obj).items(): # if callable(val): # # setattr(obj, item, debugMethod(val, cls=cls)) # pass # return obj def __getattribute__(self, name): print({'action': "get", 'attr': name}) return object.__getattribute__(self, name) class A(object, metaclass=Meta): # def __init__(self): # pass # def __setattr__(self, name, value): # print("setting attribute", name, value) # return super().__setattr__(name, value) # def __getattribute__(self, name): # print("getting attribute", name) # return super().__getattribute__(name) def add(self, x, y): return x+y def mul(self, x, y): return x*y a = A() # a.mul(2, 3) # a.mul(0, 100) # a.mul(2, 100) # a.mul(2323, 3) # a.mul(2, 2) # a.mul(2, 3414) # another setter a.x = 200 # print(vars(a)) # # settter # a.x = 1000 # # setter # a.x = "23931903" # # finally a getter # my_getter_val = a.x
python
<gh_stars>0 package com.example.developer.taskmanagerv05; import android.content.Context; import android.util.AttributeSet; import android.widget.RelativeLayout; public class RelativeLayoutCustom extends RelativeLayout { private SetterBase Setter = new SetterBase(this.getContext()); public RelativeLayoutCustom(Context context, AttributeSet attrs) { super(context, attrs); } public void setWidthVal(int val){ Setter.setWidthProp(this, val); } public void setHeightVal(int val) { Setter.setHeightProp(this, val); } public void setMarginTopVal(int val){ Setter.setMarginTopProp(this, val); } public void setMarginBottomVal(int val){ Setter.setMarginBottomProp(this, val); } public void setMarginRightVal(int val){ Setter.setMarginRightProp(this, val); } public void setMarginLeftVal(int val){ Setter.setMarginLeftProp(this, val); } public void setPaddingLeftVal(int val){ Setter.setPaddingLeftProp(this, val); } public void setPaddingRightVal(int val){ Setter.setPaddingRightProp(this, val); } public void setOpacityVal(float val){ Setter.setOpacityProp(this, val); } public void setVisibilityVal(int val){ Setter.setVisibilityProp(this, val); } public void getVisibilityVal(){ this.getVisibility(); } }
java
<gh_stars>1-10 # Databricks notebook source # MAGIC %run ./includes/utils # COMMAND ---------- mountDataLake(clientId="64492359-3450-4f1e-be01-8717789fd01e", clientSecret=dbutils.secrets.get(scope="dpdatalake",key="adappsecret"), tokenEndPoint="https://login.microsoftonline.com/0b55e01a-573a-4060-b656-d1a3d5815791/oauth2/token", storageAccountName="dpdatalake", containerName="data") # COMMAND ---------- # MAGIC %sql # MAGIC CREATE DATABASE IF NOT EXISTS nyctaxi; # MAGIC USE nyctaxi; # MAGIC CREATE TABLE IF NOT EXISTS fact_zone_summary # MAGIC USING DELTA # MAGIC LOCATION '/mnt/data/curated/fact_zone_summary'; # MAGIC CREATE TABLE IF NOT EXISTS dim_zone_lookup # MAGIC USING DELTA # MAGIC LOCATION '/mnt/data/curated/dim_zone_lookup';
python
Overcome fear. Fear keeps people frozen. And like the song from the movie, we need to learn to “Let it go, let it go!” If you don’t know what I’m talking about, you need to go watch the movie Frozen. But that’s what fear does; it keeps us frozen. Fear keeps us stuck from moving forward or going after an opportunity. It will keep us living a pretty lame story until we learn to let it go. But like that verse you just read was talking about, fear isn’t from God. God gave us power and love and discipline. If we live by fear then we’ll miss out on so much God has for us. So whatever we fear, we need to learn to trust God with that thing and give it over to Him. That very thing we fear we should face head-on. So what is it for you? What do you fear most? Give it to God, face it head on, and know those who overcome their fears live out stories worth telling. We all live out a story, but are all our stories worth telling? In this plan we’ll look at four ways to live a better story.
english
Islamic Revolution Guards Corps (IRGC) has thwarted a terror attack on the country’s northwestern border, killing four terrorists and injuring three others in the operation. Iran says it could resort to its own options if the mechanisms featured in its 2015 nuclear agreement with world powers, including the US, fail to force other parties to live up to their end of the bargain. A senior Russian official has denounced fresh US sanctions against Iran on "unfounded" grounds, saying they will only undermine the implementation of the 2015 nuclear agreement with Tehran. A senior military commander says Iran's fight against terrorists is not limited to evicting them from the country's borders and goes far beyond borders. The Iranian deputy foreign minister has held meetings with senior Syrian officials, including President Bashar al-Assad, for talks on the enhancement of bilateral ties as well as cooperation in the fight against terrorism. Kuwait has reportedly told the Iranian Embassy to reduce its diplomatic staff in the Persian Gulf state and close down some of its technical offices following a court ruling last year that implicated some Iranians in a spying case. The administration of US President Donald Trump has “come to the realization” that abandoning the international nuclear deal with Iran would not be welcome globally, says Foreign Minister Mohammad Javad Zarif. The EU foreign policy chief say the “strong” nuclear deal struck in 2015 between Iran and the P5+1 states is the outcome of “collective cooperation,” emphasizing that the landmark accord does not just belong to the signatories but the entire global community. A top Iranian commander has warned against the repercussions of Washington’s possible designation of the Islamic Revolution Guards Corps (IRGC) as a terrorist organization, saying the move would cost the US dear. Iran has dismissed as “baseless” the recent US allegation that Tehran is undermining regional stability, saying American officials perceive the Islamic Republic’s “wise” policies vis-à-vis the developments in the region as a threat to their meddlesome policies.
english
from xml.etree import ElementTree as Etree from xml.dom import minidom from elavonvtpv.enum import RequestType from elavonvtpv.Response import Response import datetime import hashlib import requests class Request: def __init__(self, secret, request_type, merchant_id, order_id, currency=None, amount=None, card=None, tss_info=None, settle=True, account=None, channel=None, comment1=None, comment2=None, past_reference=None, authorization_code=None, refund_hash=None, pares=None, mpi=None): """ Defines a Request object :param secret: the shared secret between Elavon and your account :param request_type: RequestType enum object containing the type of the request to be sent to Elavon :param merchant_id: the credentials of the elavon merchant account :param order_id: number unique to the request for all accounts associated with the merchant :param currency: Currency enum object containing the code of the currency to be use in the transaction :param amount: amount of currency to be charged, in the smallest unit of currency possible :param card: CreditCard object containing the data pertaining to the customer's credit card :param tss_info: TssInfo object containing the data pertaining to the anti-fraud system :param settle: flag indicating if the transaction must be settled automatically by Elavon :param account: the sub-account to be used for the request :param channel: Channel enum object indicating the channel by which the transaction is made :param comment1: optional comment to include in the request :param comment2: optional comment to include in the request :param past_reference: reference of the transaction to which this one refers :param authorization_code: authorization code given with the transaction to which this one refers :param refund_hash: hash provided by Elavon, needed to make refunds :param pares: authorization code given with the transaction to which this one refers :param mpi: hash provided by Elavon, needed to make refunds """ self.timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S') self.secret = secret self.request_type = request_type self.merchant_id = merchant_id self.order_id = order_id self.currency = currency self.amount = amount self.card = card self.tss_info = tss_info self.settle = settle self.account = account self.channel = channel self.comment1 = comment1 self.comment2 = comment2 self.past_reference = past_reference self.authorization_code = authorization_code self.refund_hash = refund_hash self.pares = pares self.mpi = mpi def __hash(self): """ Builds the request hash from the data contained within :return: the hash string that will latter be cyphered """ res = "%s.%s.%s.%s.%s." % (str(self.timestamp), str(self.merchant_id), str(self.order_id), str(self.amount), str(self.currency.value)) if self.card: res += "%s" % str(self.card.number) return res.encode('utf-8') def sha1_hash(self): """ returns a secure hash in SHA-1 for this request :return: secure hash in SHA-1 """ sha1_hash = hashlib.sha1(self.__hash()).hexdigest() sha1_hash += ".%s" % self.secret return hashlib.sha1(sha1_hash.encode('utf-8')).hexdigest() # return hashlib.sha1(self.__hash()).hexdigest() def md5_hash(self): """ returns a secure hash in MD5 for this request :return: secure hash in MD5 """ md5_hash = hashlib.md5(self.__hash()).hexdigest() md5_hash += ".%s" % self.secret return hashlib.md5(md5_hash.encode('utf-8')).digest() def __basic_to_etree_element(self): """ creates the basic structure of an Elavon request :return: the basic root element of the request containing those fields that exist en every request type """ if self.request_type == RequestType.verify_enrolled: request_type = '3ds-verifyenrolled' elif self.request_type == RequestType.verify_sig: request_type = '3ds-verifysig' else: request_type = self.request_type.name request = Etree.Element('request') request.set('timestamp', self.timestamp) request.set('type', request_type) merchant_id = Etree.SubElement(request, 'merchantid') merchant_id.text = self.merchant_id if self.account: account = Etree.SubElement(request, 'account') account.text = self.account order_id = Etree.SubElement(request, 'orderid') order_id.text = self.order_id return request def __channel_to_etree_element(self): channel = Etree.Element('channel') channel.text = self.channel.value return channel def __past_reference_to_etree_element(self): past_reference = Etree.Element('pasref') past_reference.text = self.past_reference return past_reference def __pares_to_etree_element(self): pares = Etree.Element('pares') pares.text = self.pares return pares def __authorization_code_to_etree_element(self): authorization_code = Etree.Element('authcode') authorization_code.text = self.authorization_code return authorization_code def __amount_to_etree_element(self): amount = Etree.Element('amount') amount.set('currency', self.currency.value) amount.text = self.amount return amount def __auto_settle_to_etree_element(self): auto_settle = Etree.Element('autosettle') auto_settle.set('flag', '1' if self.settle else '0') return auto_settle def __comments_to_etree_element(self): comments = Etree.Element('comments') if self.comment1: comment1 = Etree.SubElement(comments, 'comment', id='1') comment1.text = self.comment1 if self.comment2: comment2 = Etree.SubElement(comments, 'comment', id='2') comment2.text = self.comment2 return comments def __refund_hash_to_etree_element(self): refundhash = Etree.Element('refundhash') refundhash.text = hashlib.sha1(self.refund_hash.encode('utf-8')).hexdigest() return refundhash def __sh1_hash_to_etree_element(self): sha1_hash = Etree.Element('sha1hash') sha1_hash.text = self.sha1_hash() return sha1_hash def __md5_hash_to_etree_element(self): md5_hash = Etree.Element('md5hash') md5_hash.text = self.md5_hash() return md5_hash def __auth_to_etree(self): request = self.__basic_to_etree_element() if not self.mpi: request.append(self.__channel_to_etree_element()) request.append(self.__amount_to_etree_element()) request.append(self.card.to_etree_element()) if self.mpi: request.append(self.mpi.to_etree_element()) request.append(self.__auto_settle_to_etree_element()) if self.comment1 or self.comment2: request.append(self.__comments_to_etree_element()) if self.tss_info: request.append(self.tss_info.to_etree_element()) request.append(self.__sh1_hash_to_etree_element()) # request.append(self.__md5_hash_to_etree_element()) return Etree.ElementTree(request) def __manual_to_etree(self): request = self.__basic_to_etree_element() request.append(self.__channel_to_etree_element()) request.append(self.__authorization_code_to_etree_element()) request.append(self.__amount_to_etree_element()) request.append(self.card.to_etree_element()) request.append(self.__auto_settle_to_etree_element()) if self.comment1 or self.comment2: request.append(self.__comments_to_etree_element()) if self.tss_info: request.append(self.tss_info.to_etree_element()) request.append(self.__sh1_hash_to_etree_element()) # request.append(self.__md5_hash_to_etree_element()) return Etree.ElementTree(request) def __obt_to_etree(self): request = self.__basic_to_etree_element() request.append(self.card.to_etree_element()) request.append(self.__auto_settle_to_etree_element()) request.append(self.__sh1_hash_to_etree_element()) # request.append(self.__md5_hash_to_etree_element()) return Etree.ElementTree(request) def __offline_to_etree(self): request = self.__basic_to_etree_element() request.append(self.__past_reference_to_etree_element()) request.append(self.__authorization_code_to_etree_element()) request.append(self.__amount_to_etree_element()) request.append(self.card.to_etree_element()) request.append(self.__auto_settle_to_etree_element()) if self.comment1 or self.comment2: request.append(self.__comments_to_etree_element()) if self.tss_info: request.append(self.tss_info.to_etree_element()) request.append(self.__sh1_hash_to_etree_element()) # request.append(self.__md5_hash_to_etree_element()) return Etree.ElementTree(request) def __rebate_to_etree(self): request = self.__basic_to_etree_element() request.append(self.__past_reference_to_etree_element()) request.append(self.__authorization_code_to_etree_element()) request.append(self.__amount_to_etree_element()) request.append(self.__auto_settle_to_etree_element()) if self.comment1 or self.comment2: request.append(self.__comments_to_etree_element()) request.append(self.__sh1_hash_to_etree_element()) request.append(self.__refund_hash_to_etree_element()) return Etree.ElementTree(request) def __void_to_etree(self): request = self.__basic_to_etree_element() request.append(self.__past_reference_to_etree_element()) request.append(self.card.to_etree_element()) request.append(self.__authorization_code_to_etree_element()) if self.comment1 or self.comment2: request.append(self.__comments_to_etree_element()) request.append(self.__sh1_hash_to_etree_element()) # request.append(self.__md5_hash_to_etree_element()) return Etree.ElementTree(request) def __tss_to_etree(self): request = self.__basic_to_etree_element() request.append(self.__amount_to_etree_element()) request.append(self.card.to_etree_element()) request.append(self.__auto_settle_to_etree_element()) if self.comment1 or self.comment2: request.append(self.__comments_to_etree_element()) if self.tss_info: request.append(self.tss_info.to_etree_element()) request.append(self.__sh1_hash_to_etree_element()) # request.append(self.__md5_hash_to_etree_element()) return Etree.ElementTree(request) def __settle_to_etree(self): request = self.__basic_to_etree_element() request.append(self.__past_reference_to_etree_element()) if self.amount and self.currency: request.append(self.__amount_to_etree_element()) request.append(self.__authorization_code_to_etree_element()) if self.comment1 or self.comment2: request.append(self.__comments_to_etree_element()) request.append(self.__sh1_hash_to_etree_element()) # request.append(self.__md5_hash_to_etree_element()) return Etree.ElementTree(request) def __verify_enrolled_to_etree(self): request = self.__basic_to_etree_element() if self.amount and self.currency: request.append(self.__amount_to_etree_element()) request.append(self.card.to_etree_element()) request.append(self.__sh1_hash_to_etree_element()) return Etree.ElementTree(request) def __verify_sig_to_etree(self): request = self.__basic_to_etree_element() if self.amount and self.currency: request.append(self.__amount_to_etree_element()) request.append(self.card.to_etree_element()) request.append(self.__pares_to_etree_element()) request.append(self.__sh1_hash_to_etree_element()) return Etree.ElementTree(request) def __to_etree(self): if self.request_type is RequestType.auth: return self.__auth_to_etree() elif self.request_type is RequestType.manual: return self.__manual_to_etree() elif self.request_type is RequestType.obt: return self.__obt_to_etree() elif self.request_type is RequestType.offline: return self.__offline_to_etree() elif self.request_type is RequestType.rebate: return self.__rebate_to_etree() elif self.request_type is RequestType.void: return self.__void_to_etree() elif self.request_type is RequestType.TSS: return self.__tss_to_etree() elif self.request_type is RequestType.settle: return self.__settle_to_etree() elif self.request_type is RequestType.verify_enrolled: return self.__verify_enrolled_to_etree() elif self.request_type is RequestType.verify_sig: return self.__verify_sig_to_etree() def to_xml_string(self): binary = Etree.tostring(self.__to_etree().getroot(), encoding='utf8', method='xml') return binary.decode('utf-8') def to_pretty_xml(self): return minidom.parseString(self.to_xml_string()).toprettyxml() def send(self, url): headers = {'Content-Type': 'application/xml'} response = requests.post(url=url, data=self.to_pretty_xml(), headers=headers) return Response(response.content)
python
<filename>src/hunterplan/components/Button.js //import React from 'react'; export class Button extends React.Component { constructor(props) { super(props); } render() { let style=this.props.style; let disabled=this.props.disabled; let onclickFunc=this.props.onClick; let backgroundColor = disabled ? this.props.disabledColor : ''; return ( <button className={this.props.className} onClick={e => (!disabled) && onclickFunc && onclickFunc()} style={{border: 'none',backgroundColor,...style}} title="button"> {this.props.value} </button> ); } } Button.defaultProps = { className:'main-button', disabled:false, onClick:()=>console.log('button->click'), disabledColor:'#D9D9D9' }; /* class Button2 extends React.Component { constructor(props) { super(props); this.state = {state: 'link'}; this.color = { 'strong': {link: '#07aab2', hover: '#51c3c9', active: '#04767c'}, 'blank': {link: '#ffffff', hover: '#f1f1f1', active: '#bbbbbb'}, 'weak': {link: '#ffffff', hover: '#f1f1f1', active: '#f1f1f1'} }[props.type || 'strong']; } render() { let {type, style, onPress, disabled, children, ...others} = this.props; type = disabled ? 'disabled' : (type || 'strong'); let backgroundColor = disabled ? '#fff' : this.color[this.state.state]; let color = {'disabled': '#999', 'strong': '#fff', 'blank': '#333', 'weak': '#07aab2'}[type]; let border = { 'disabled': '1px solid #ccc', 'strong': 0, 'blank': '1px solid #ddd', 'weak': '1px solid #ddd' }[type]; return ( <button style={{ height: 36, width: 110, borderRadius: 2, outline: 'none', cursor: 'pointer', fontSize: 14, backgroundColor, color, border, ...style }} onMouseEnter={e => this.setState({state: 'hover'})} onMouseDown={e => this.setState({state: 'active'})} onMouseUp={e => this.setState({state: 'hover'})} onMouseLeave={e => this.setState({state: 'link'})} onClick={e => !disabled && onPress && onPress()} {...others}> {children} </button> ); } } */
javascript
The Spatium M480 marks a stellar entry for MSI into the storage segment with transfer speeds that easily cross the 7000 MBps mark providing serious competition to the likes of Samsung, WD and others who follow similar designs using the Phison E18 controller. The pricing for the 1TB SKU is quite competitive when you consider that the WD Black SN850 and Samsung 980 Pro cost a little extra. Like we mentioned at the onset, we can’t exactly compare the 2TB Gen 4 unit with all the other 1TB Gen 4 units we’ve compared over the years but if you’re simply looking at the numbers, you’ve got a pretty great performer in the Spatium M480. MSI is not the brand that comes to mind when you’re talking about SSDs. The Taiwanese ICT giant has diversified its product portfolio with the introduction of the new NVMe SSDs. As part of their initial launch, the company has introduced several new PCIe Gen 4. 0 and Gen 3. 0 NVMe SSDs and the one we’re reviewing is the MSI Spatium M480 2TB HS variant. The “HS” in the name refers to the heatsink that’s provided with this particular variant for a slight premium. Speaking of price, the MSI Spatium M480 1TB variant can be found online for about 17,000 rupees which puts it in the same league as the Samsung 980 Pro and the WD SN850, both of which offer similar rated performance. So how well does the Spatium M480 perform? Does it have the chops to beat competition SSDs that have led the market for a better part of the decade? That’s what we’re hoping to find out. MSI went with a Phison controller for the flagship SSD in their portfolio. In particular, it is using the Phison PS5018-E18 controller which would be the second-gen E18 controller with several improvements that allow it to perform better in random data reads. The first-gen E18 did provide excellent sequential data transfer speeds but was a little behind flagships from competing brands in random performance. The controller is powered by five ARM Cortex R5 cores of which three are the big cores and the remaining two are the little cores. If you’ve read about ARM’s big. LITTLE architecture, then you'll know exactly what we’re talking about. The controller has eight NAND flash channels capable of running at 1600 MTps. The higher channel bandwidth is what helps with the random access performance of the second-gen controller. The PS5018-E18 is paired with two SK Hynix 8Gb DDR4 DRAM chips, one of each side, for the cache and for the NAND it is using Micron’s 96 layer 3D NAND TLC chips. Each of which happens to be 256 Gigabytes. The entire configuration is exactly the same as can be found in the Corsair MP600 Pro and the Sabrent Rocket 4 Plus. All of whom sport similar specs in their datasheets. One of the key features of the Phison E18 controller is that it offers up a pseudo-SLC cache of pSLC. Like all cache mechanisms, when data is being written to the drive, it will be dumped into the much faster cache before the controller takes its own sweet time to write it back into the NAND chips. In most SSDs, the DRAM chip is used as the cache so you will get great data transfer speeds as long as the DRAM has space to accommodate incoming data and the moment it runs out of space, you will see a significant drop in performance. With just 8 GB of space on the individual DRAM chips, one can expect to fill up the cache really fast on PCIe Gen 4. 0 NVMe SSDs. So how do you keep transfer speeds high? By using the pseudo-SLC cache. To implement pSLC cache, the controller marks out a portion of the main NAND capacity as SLC cache. By utilising just one bit per cell in the NAND, the controller can write to the pSLC cache very quickly. So you get much higher speeds and the DRAM can be emptied out quickly to allow for consistent high data transfer speeds. With the Phison E18 controllers, you can take things further by implementing what they call as dynamic pSLC. This simply means, that instead of having just one portion of the NAND capacity being designated as the pSLC cache, the controller can mark up to 100% of the NAND capacity as flash. This means, as long as you have a significant portion of the NAND capacity empty, you will get fast transfer speeds. Enough of the controller. Let’s look at the heatsink. The heatsink is a two-part assembly with a massive chunk on the top which is kept in place with a bracket that sits on the bottom. And you do have thermal pads making contact with both faces of the SSD. This way, both sides of the SSD are covered but most of the heat is dissipated from the top. Moreover, with the E18 controller, temperature throttling isn’t that big a concern anymore. Then comes the aspect of fitting the heatsink laden SSD onto a motherboard. When properly installed, the heatsink increases the length of the SSD by 0. 4mm, height by 18. 25 mm and width by 1mm. Since the width only increases by 1mm, you will still have plenty of clearance between PCIe slots on most motherboards. The concern here is the height. If you’ve installed the SSD on a motherboard underneath the first PCIe x16 slot and the graphics installed on the same slot have any heatpipes or part of the housing jutting out, you might have a problem. We installed the SSD on an ASUS X570 motherboard and installed a pretty beefy RX 6900 XT on top and we still had plenty of clearance on the top. As for air-flow, that’s an entirely different ball game altogether. Let’s look at performance next. We’d like to mention right away that this is not an apples-to-apples comparison. MSI only had the 2TB review sample to share with us and most of our SSD tests are done on 1 TB SKUs. The change in configuration does affect performance. In this case, we have two DRAM chips on the 2TB M480 whereas the 1TB M480 only comes with one DRAM chip. Moreover, you’ve got all the eight NAND channels on the controller being used in the 2TB configuration. This affects the write speeds massively but read speeds should still be comparable but nevertheless, we’ll refrain from scoring the SSD in the same league as the others we have reviewed in the past. We start off with CrystalDiskMark for the synthetic benchmarks. We saw read speeds of about 7200 MBps at the very maximum on the 32 Queue-1 Thread sequential test and for write speeds, we saw 6750 MBps. Moving on to ATTO, we saw write speeds of up to 6. 24 GBps and write speeds of 6. 94 GBps. Switching to higher file sizes resulted in consistent performance across the board which is quite impressive. To test out the dynamic pSLC cache, we decided to fill up the SSD as much as we could with random data at 10% capacity intervals to see when and where the speeds would start degrading. The read speeds remained untouched till the capacity of the drive was up to 40% full. Upon hitting 50% capacity, the read speeds dropped to 6. 4 GBps whereas write speeds remained consistent. This went on till we had 80% of the NAND capacity used up. Upon hitting 90%, we saw a massive degradation in write speeds as it went down to 1. 78 GBps. So the MSI Spatium M480 will perform great when fresh out of the box, like every other SSD on the planet as long as you don’t cross 90% of the NAND capacity. Again, due to the nature of how dynamic pSLC works, this threshold will reduce over time and you might have to leave more capacity on the SSD unused to retain higher speeds. This is because, after a certain number of read/write cycles, the controller will permanently stop using that portion of the NAND as a pseudo-SLC cache. And once it runs out of NAND capacity that can be converted to SLC, the performance of the drive will forever be stunted. There is no saying when this will happen for you and there’s a good chance that the Spatium M480 will last just as long as any other SSD on the market. The Spatium M480 marks a stellar entry for MSI into the storage segment with transfer speeds that easily cross the 7000 MBps mark providing serious competition to the likes of Samsung, WD and others who follow similar designs using the Phison E18 controller. The pricing for the 1TB SKU is quite competitive when you consider that the WD Black SN850 and Samsung 980 Pro cost a little extra. Like we mentioned at the onset, we can’t exactly compare the 2TB Gen 4 unit with all the other 1TB Gen 4 units we’ve compared over the years but if you’re simply looking at the numbers, you’ve got a pretty great performer in the Spatium M480.
english
Ryan Garcia and Emmanuel Tagoe almost came to blows during their faceoff. Garcia and Tagoe came out for their open media workouts and pre-fight face-off yesterday. 'KingRy' and the Ghanaian were taking pictures and posing inside the ring before their face-off with no animosity between them. However, during their face-off, things got heated. Watch the video below: 'KingRy' is looking to make a comeback to the ring after almost a year out of the ring. Garcia is extremely confident in his ability to dispatch the Ghanaian boxer early on. During the build-up to the fight, 'KingRy' has said that he feels he's at the top of his game despite his long absence. Ring rust is a very real problem for many boxers, and it will be interesting to see how the Mexican-American battles it. Ryan Garcia sat down with Joe Goossen and went live on Instagram. Garcia was interacting with his fans following his open media workouts and face-off against Tagoe. During the Instagram live post, Goossen asked 'KingRy' to talk to his fans about his heated moment with Tagoe: "I think mainly today was a, kind of a little filling out tester. Because he's been speaking a lot online throughout the course of the fight, calling me Queen Ryan. If you look at his tweets he's always saying he has the Ghana pepper, you know, things that are just little whacky. And I decided to give him a little taste of his own medicine and size him up, see how he is. " Garcia was the one who initiated the heated exchange between himself and Tagoe on stage. 'KingRy' sized him up and began raising his voice. At one point he also told the Ghanaian that he would fight him right now. Watch the video down below:
english
{"name":"<NAME>","harga":" Rp. 431.365/ kemasan","golongan":"http://medicastore.com/image_banner/obat_keras_dan_psikotropika.gif","kandungan":"Propafenon HCl / Propafenone HCl","indikasi":"Pengobatan & pencegahan takhiaritmia ventrikular & supraventrikular termasuk fibrilasi atrium & takhikardia, bahkan pada sindroma WPW; semua tipe ekstrasistol ventrikular & supraventrikular.","kontraindikasi":"Manifestasi gagal jantung, syok kardiogenik (kecuali untuk syok yang diakibatkan oleh aritmia), bradikardia berat selama 3 bulan setelah infarksi miokardial, sebelumnya terdapat kelainan konduksi impuls SA, atrio-ventrikular, & intraventrikular tingkat tinggi, \"sick sinus syndrome\", manifestasi gangguan keseimbangan elektrolit, penyakit penyumbatan paru berat, hipotensi yang tampak nyata, miastenia gravis.","perhatian":"Gangguan fungsi hati atau ginjal, trimester pertama kehamilan, menyusui, lansia atau pasien dengan gangguan fungsi miokardial berat, dosis harus ditambahkan secara hati-hati. Bisa mengganggu kemampuan untuk mengendarai kendaraan atau mengoperasikan mesin. Bisa mengubah ambang langkah serta ambang perasaan perintis artifisial. Interaksi obat : - efek bisa terpotensiasi oleh anestesi lokal, β-bloker, antidepresan trisiklis. - bisa meningkatkan kadar Propranolol, Metoprolol, Desipramin, Siklosporin, Digoksin dalam plasma. - kadar plasma bisa meningkat bila diberikan secara serentak dengan Simetidin atau Quinidin. - bisa mempertinggi efek antikoagulan. - pemberian bersama dengan Fenobarbital atau Rifamisin bisa meningkatkan kadar Propafenon dalam plasma, mungkin dalam kadar terapeutik.","efeksamping":"Kadang-kadang : anoreksia (kehilangan nafsu makan), perasaan penuh pada perut, mual, muntah, rasa pahit, baal pada mulut. Sekali-sekali penglihatan kabur, vertigo, reaksi kulit karena alergi, ketidakteraturan sirkulasi pada ortostasis. Jarang : kelelahan, sakit kepala, gangguan psikis, gejala-gejala ekstrapiramidal, bradikardia, blok SA, atrio-ventrikular, atau intraventrikular. Kolestasis. Resiko terkena takhikardia ventrikular atau geletar ventrikular, fibrilasi, pengurangan potensi & jumlah sperma (pada dosis tinggi), sangat jarang : penurunan jumlah sel darah putih, granulosit, dan trombosit yang sepenuhnya bersifat reversibel, agranulositosis jarang teramati. Kejang bronkhus, kejang (akibat overdosis).","indeksamanwanitahamil":"C: Penelitian pada hewan menunjukkan efek samping pada janin ( teratogenik atau embriosidal atau lainnya) dan belum ada penelitian yang terkendali pada wanita atau penelitian pada wanita dan hewan belum tersedia. Obat seharusnya diberikan bila hanya keuntungan potensial memberikan alasan terhadap bahaya potensial pada janin.","kemasan":"Tablet salut selaput 150 mg x 6 x 10 butir.","dosis":"Dosis disesuaikan secara induvidual berdasarkan respon dan toleransi pasien.Diawali dengan 150 mg tiap 8 jam.Dosis dapat ditingkatkan dalam jarak waktu minimal 3-4 hari menjadi 225 mg tiap 8 jam.Maksimal : 900 mg/hari.","penyajian":"Dikonsumsi bersamaan dengan makanan","pabrik":"Abbott.","id":"7329","category_id":"2"}
json
{"ajv.bundle.js":"sha256-7Ih7fJsuTyD6BWhMGT1LAOiBarI9LsS3MxGHdK1USBo=","ajv.min.js":"sha256-CU2rdrhysqLNxMpMJDfCv5fq/iMULnuC8/R8tiba1GI=","nodent.min.js":"sha256-d+5CaYAWjkXj4DpH8RyjbJfGR3IvHQcwMbfLV+BT3sM=","regenerator.min.js":"sha256-Sz6bdCv8Nd0gIr0kGeoMC9rR5rVWNtQLbkHoW/3EXZ0="}
json
We already know that Yash’s KGF: Chapter 2 has been making multiple records at the box office and has initiated a craze among the Indian audience. Its theatrical run has still not come to an end and just a day back, the film entered the prestigious Rs 1200 crore club in 33 days. It is now the third highest grossing Indian film after Dangal and Babubali 2: The Conclusion. While KGF 2 the movie has been receiving praise from all quarters, the latest to applaud the film is a director who is known to make large-scale pan-Indian movies himself. Renowned filmmaker Shankar recently watched KGF: Chapter 2 and has been bowled over by it. He has tweeted a crisp review of the film, with praise for its various aspects. “Finally saw KGF2. Cutting edge style storytelling, screenplay & Editing. Bold move to intercut action & dialogue, worked beautifully. Revamped Style of Mass 4 the powerhouse TheNameIsYash Thanks Director prashanth Neel 4 giving us a “periyappa” experience. The work of stunt director Anbari was fantastic", Shankar tweeted on Tuesday. Yash was quick to respond, thanking Shankar for his kind words and calling him an inspiration. It was not long before the tweet caught the attention of director Prashanth Neel and he replied to Shankar with a heartfelt thanks. Shankar has made some Tamil films which have had pan-Indian appeal like Sivaji: The Boss, Anniyan, Enthiren and 2. 0. Shankar is now working on RC 15 with Ram Charan. This film was advertised last year and gone into production a few months ago. Ram Charan is claimed to have completed nearly half of the shoot. Kiara Advani plays Ram Charan’s love interest in the film. The film is produced by Dil Raju and it is likely to release in theatres during the summer of 2023. Read all the Latest News , Breaking News and IPL 2022 Live Updates here.
english
Complete mix of herbs and natural ingredients. The best part is the product delivers what it promises. You go longer (erection), great performance enhancement and super nice sensual feelings that enhanced overall experience of not only me but my partner. For this price this is a great product. Love it, will definitely order more.
english
package de.madjosz.adventofcode.y2020; import java.util.List; public class Day12 { private final List<String> actions; public Day12(List<String> input) { this.actions = input; } private enum D { E, S, W, N; D rotateR(int deg) { return values()[(ordinal() + deg / 90) % 4]; } D rotateL(int deg) { return values()[(4 + ordinal() - deg / 90) % 4]; } void move(int[] pos, int units) { switch (this) { case E: pos[0] += units; break; case S: pos[1] -= units; break; case W: pos[0] -= units; break; case N: pos[1] += units; break; } } } public int a1() { D dir = D.E; int[] pos = new int[2]; for (String action : actions) { String command = action.substring(0, 1); int amount = Integer.parseInt(action.substring(1)); switch (command) { case "F": dir.move(pos, amount); break; case "R": dir = dir.rotateR(amount); break; case "L": dir = dir.rotateL(amount); break; default: D.valueOf(command).move(pos, amount); } } return Math.abs(pos[0]) + Math.abs(pos[1]); } public int a2() { int[] ship = new int[2]; int[] pos = new int[] { 10, 1 }; for (String action : actions) { String command = action.substring(0, 1); int amount = Integer.parseInt(action.substring(1)); switch (command) { case "F": ship[0] += amount * pos[0]; ship[1] += amount * pos[1]; break; case "R": amount *= -1; case "L": pos = rotate(pos, amount); break; default: D.valueOf(command).move(pos, amount); } } return Math.abs(ship[0]) + Math.abs(ship[1]); } private static int[] rotate(int[] pos, int deg) { double rad = Math.toRadians(deg); int cos = (int) Math.round(Math.cos(rad)); int sin = (int) Math.round(Math.sin(rad)); return new int[] { cos * pos[0] - sin * pos[1], sin * pos[0] + cos * pos[1] }; } }
java
<filename>web/static/js/main.js "use strict"; const now = _ => Math.round(Date.now()/1000); class Shoutbox { constructor() { this.ui = new Layout(); this.connection = new ChatConnection((location.protocol == "https:" ? "wss://" : "ws://") + location.host + location.pathname + "ws"); //probably a bad idea this.lastUsername = ""; this.emojis = {}; this.reconnecting = false; this.connection.openPromise .then(() => this.setupHandlers()) .then(() => this.setupErrorHandlers()) .then(() => this.setupUI()) .then(() => this.sendInitMessages()); } setupUI() { let usernamePrompt = new Prompt("enter your username", "username"); this.ui.DOM.append(usernamePrompt.DOM); usernamePrompt.getPromise().then((username) => { this.lastUsername = username; this.connection.send({type:"setUsername",username:username}); }, () => {}); this.ui.messageControls.setShowEmojisListener(() => { let emojiList = new EmojiList(this.emojis); this.ui.DOM.append(emojiList.DOM); emojiList.activate(); }); this.ui.messageControls.setSendListener((text) => { if(text.length >= 1024*10) { this.ui.statusBar.setError("message is too long"); return; } this.connection.send({type:"sendMessage",content:text}); this.ui.messageControls.resetMessageInput(); }); } sendInitMessages() { this.connection.send({type:"getUserList"}); this.connection.send({type:"getEmojis"}); this.connection.send({type:"getHistory"}); } addMessage(data) { let message = new Message(data.from, data.content, data.timestamp); message.content.innerHTML = this.parseEmojis(message.content.innerHTML); message.content.innerHTML = message.content.innerHTML.replace(/\n/g, "</br>"); this.ui.messageList.addMessage(message); } updateUserNumber() { this.ui.statusBar.setMessage("users: " + this.ui.userList.usersNum()); } setupHandlers() { this.connection.setHandler("message", (data) => { this.addMessage(data); }); this.connection.setHandler("userJoined", (data) => { this.ui.userList.addUser(data.username); this.updateUserNumber(); this.ui.messageList.addMessage(new UserStatusMessage(data.username, now(), "has joined")); }); this.connection.setHandler("userLeft", (data) => { this.ui.userList.removeUser(data.username); this.updateUserNumber(); this.ui.messageList.addMessage(new UserStatusMessage(data.username, now(), "has left")); }); this.connection.setHandler("userList", (data) => { data.usernames.forEach((u) => this.ui.userList.addUser(u)); this.updateUserNumber(); }); this.connection.setHandler("history", (data) => { data.content.forEach((m) => { if(m.type == "msg") { this.addMessage(m); } else if(m.type == "joined" || m.type == "left") { this.ui.messageList.addMessage(new UserStatusMessage(m.content, m.timestamp, `has ${m.type}`)); } }); }); this.connection.setHandler("emojis", (data) => { for(let n of data.emojis) { let img = new Image(); img.src = `${location.protocol + "//" + location.host + location.pathname}emoji/${n}`; img.classList.add("emoji"); img.alt = `:${n}:`; this.emojis[n] = img; } }); } setupErrorHandlers() { let errorHandlers = { "usernameTaken": () => { let usernamePrompt = new Prompt("user with choosen username already exists, please choose another username", "username", true); this.ui.DOM.append(usernamePrompt.DOM); usernamePrompt.getPromise().then((username) => { this.lastUsername = username; this.connection.send({type:"setUsername",username:username}); }, () => {}); }, "usernameInvalid": () => { let usernamePrompt = new Prompt("choosen username is invalid, please choose another username", "username", true); this.ui.DOM.append(usernamePrompt.DOM); usernamePrompt.getPromise().then((username) => { this.lastUsername = username; this.connection.send({type:"setUsername",username:username}); }, () => {}); }, "messageInvalid": () => { this.ui.statusBar.setError("invalid message"); }, "usernameNotSet": () => { let usernamePrompt = new Prompt("no username is set, please set a username", "username", true); this.ui.DOM.append(usernamePrompt.DOM); usernamePrompt.getPromise().then((username) => { this.lastUsername = username; this.connection.send({type:"setUsername",username:username}); }, () => {}); }, "default": (data) => { console.log("unknown error", data); this.ui.statusBar.setError("unknown error"); }, }; this.connection.setErrorHandler((err) => { console.log(err); this.ui.statusBar.setPersistentError("connection error, reconnecting"); this.reconnect(); }); this.connection.closePromise.then((() => { this.ui.statusBar.setPersistentError("connection closed, reconnecting"); this.reconnect(); })); this.connection.setHandler("error", (data) => { let handler = errorHandlers[data.message]; if(handler != undefined) { handler(data); } else { errorHandlers["default"](data); } }); } parseEmojis(message) { let foundEmojis = [...new Set(message.match(/:([a-z_\-]*):/gm))]; for(let n of foundEmojis) { let emoji = this.emojis[n.substr(1, n.length-2)]; if(emoji != undefined) { message = message.replace(new RegExp(n, 'gm'), emoji.outerHTML); } } return message; } reconnect() { if(this.reconnecting) return; this.reconnecting = true this.reconnectInterval = setInterval(() => { this.connection.close(); this.connection = new ChatConnection((location.protocol == "https:" ? "wss://" : "ws://") + location.host + location.pathname + "ws"); this.connection.openPromise .then(() => { console.log("reconnected"); clearInterval(this.reconnectInterval); this.ui.statusBar.setMessage("connected"); this.ui.userList.clear(); this.ui.messageList.clear(); this.connection.send({type:"setUsername",username:this.lastUsername}); this.reconnecting = false; }) .then(() => this.setupHandlers()) .then(() => this.setupErrorHandlers()) .then(() => this.sendInitMessages()); }, 5000); //TODO: append new messages after reconnecting instead of removing the old ones //TODO: double join message after reconnecting } } document.addEventListener("DOMContentLoaded", async () => { let shoutbox = new Shoutbox(); document.body.append(shoutbox.ui.DOM); }); //not sure what will happen if somebody disconnects while we iterate thru getUserList
javascript
{"acadYear":"2019/2020","description":"This module focuses on integrating Design Thinking into the creative development of innovative products and services. It is a human-centric approach with emphasis on user desirability, technology feasibility and business viability.","title":"Design Thinking & Product Innovations","department":"BIZ Dean's Office","faculty":"NUS Business School","workload":[0,3,0,5,2],"moduleCredit":"4","moduleCode":"BMA5530","semesterData":[{"semester":4,"timetable":[{"classNo":"P1","startTime":"1830","endTime":"2200","weeks":{"start":"2020-06-25","end":"2020-07-30"},"venue":"BIZ1-0303","day":"Thursday","lessonType":"Sectional Teaching","size":66},{"classNo":"P1","startTime":"1830","endTime":"2200","weeks":{"start":"2020-06-23","end":"2020-07-28"},"venue":"BIZ1-0303","day":"Tuesday","lessonType":"Sectional Teaching","size":66}]}]}
json