text stringlengths 1 1.04M | language stringclasses 25 values |
|---|---|
from Cryptodome.PublicKey import RSA
import hashlib
import json
def recover(key):
private_key_readable = key.exportKey().decode("utf-8")
public_key_readable = key.publickey().exportKey().decode("utf-8")
address = hashlib.sha224(public_key_readable.encode("utf-8")).hexdigest()
wallet_dict = {}
wallet_dict['Private Key'] = private_key_readable
wallet_dict['Public Key'] = public_key_readable
wallet_dict['Address'] = address
with open ("wallet_recovered.der", 'w') as wallet_file:
json.dump (wallet_dict, wallet_file)
print ("Wallet recovered to: wallet_recovered.der")
return (address, "wallet_recovered.der")
# Edit with your pem file
with open('privkey.pem', 'r') as f:
private_key_readable = f.read()
key = RSA.importKey(private_key_readable)
recover(key)
| python |
As you’re probably aware by now, Facebook is holding an event at their headquarters in Palo Alto, CA. The invite we received didn’t seem to give any real clues about what would be announced, but that didn’t stop everyone from guessing anyway. But now we know a part of what they’re rolling out — because they’ve actually already sort of started rolling it out. At least a part of what will be unveiled tomorrow is a redesign, we hear.
Yes, just like Twitter did a few weeks ago, Facebook will be giving their service a new coat of paint tomorrow. Some users are already reporting that they’re seeing a new version of chat appear on the site — that’s because it’s a part of this redesign, we’ve confirmed with a source. More specifically, chat will be moved to the left side of the screen and big profile pictures are being added into the chat itself. But the real key of the redesign is that all Profile pages and much of the rest of the site will be revamped to look more like Places pages, we’re told. If you look at the image below of our TechCrunch Disrupt Places page, you’ll get a taste of what’s to come.
Aside from the movement of chat, apps will be moved below profile pictures as icons. The profile navigation will also now reside in that area, we believe. That means the top tabs you see now on Profile pages will likely be no more. There will also likely be a lot of subtle tweaks to the UI in order to unify the entire service. All the major Facebook areas should be getting this new coat of paint, we hear. That means Profiles, Pages, Events, Groups, Photos, and Videos.
From what we’re told, Facebook has been in a state of lockdown for the past two months or so working on this new design. This lockdown is actually called “Lockdown” — there’s even a Facebook Group for it. Apparently, it’s something that CEO Mark Zuckerberg uses to get the troops worked up and ready to work basically 24/7. “Whatever it takes,” we’re told. If you believe the Wall postings there, the last Lockdown was four years ago before this current one.
VentureBeat’s Anthony Ha previously reported on this Lockdown two months ago when the company apparently went into it. Tomorrow morning, they could be emerging.
Facebook has not yet responded to our request for comment. I suspect they might tomorrow.
| english |
Srinagar: Negotiating months of heavy snowing and the COVID-19 lockdown, the Kupwara district administration connected three villages located along the Line of Control in Jammu and Kashmir’s Keran area to the national electricity grid, ending a wait since Independence for power supply.
It is an arduous five hours journey to Keran from here on a fair-weather road that meanders through apple and walnut orchards of the Kashmir Valley and the Pherkian Pass at 10,000 feet in the Shamasbari Ranges.
Keran remains cut-off for nearly six months due to heavy snow which can reach heights of nine to 12 feet.
For three hours of electricity, the Keran area, with a population of 14,000 in four panchayats, was till recently dependent on three old diesel generator (DG) sets, for which fuel was transported from the district headquarters.
“Installed over a decade back, the three DG sets were prone to frequent breakdowns further disrupting the meagre power supply, more so in winters when conducting repairs are next to impossible,” Deputy Commissioner, Kupwara, Anshul Garg, told PTI .
In 2012, the area’s residents were hopeful that a solution to their power problems was found. The plan was to extend power lines to Keran and establish a grid station at a cost of Rs 6. 5 crore.
But hopes started to wither as no substantial progress was made on the project for nearly seven years, apart from the installation of some solar lighting systems that had limited efficiency even during the summers, some villagers in Keran said.
Not being directly connected to the national power grid threw Keran into extreme backwardness with lack of industries and limited access to medical facilities and television.
“All essential commodities, especially food items and essential drugs are stored in advance for an year in the area to cater to the winter requirements,” Garg said as the area remains cut-off.
The power line project gathered steam after Kupwara was selected as an ‘Aspirational’ district by the NITI Aayog in 2018. It was among 112 districts of the country that were chosen for quick and effective transformation.
The task of ensuring last mile coverage in the power sector was put on mission mode from April 2019 under the close supervision of the deputy commissioner.
The Kupwara district administration swung into action deploying multi-disciplinary teams to ensure corridor clearance for the entire stretch of the electricity line, that passes through several villages, steep slopes and dense forests.
The administration decided on a target-based approach. This comprised fortnightly review of work, resolving bottlenecks and regular field inspection by senior officers. These were besides liaising and taking feedback from Panchayati Raj Institutions especially Mohd Syed Joo, Chairman Block Development Council Keran to avoid further delays.
The job was not easy as the administration was faced with acute manpower shortage after the abrogation of Article 370 followed by seven months of snow in winters and the coronavirus pandemic, officials said.
Sticking to the timeline of July 31, the administration ensured inauguration of the Receiving Sub-station on July 18.
The line was successfully charged providing grid electricity to people in three villages for the first time. The administration is working to cover the remaining three villages soon.
“A small project for the district has triggered revolutionary changes in the lives of the common masses starting from switching on a television set as and when they want, to better healthcare, water supply, lift irrigation systems and impacting almost every walk of life now dependent on power supply. The people living on the zero line are very happy,” Garg said. | english |
{
"directions": [
"Preheat oven to 400 degrees F (200 degrees C). Line a medium baking dish with aluminum foil. Lightly grease foil.",
"With a mortar and pestle, grind together the garlic, chile pepper, and olive oil. Mix into a thick paste with the mustard, lime juice, salt, and pepper. Place the salmon fillets in the prepared baking dish, and coat with the paste mixture.",
"Bake salmon 12 to 15 minutes in the preheated oven, or until fish is easily flaked with a fork."
],
"ingredients": [
"2 cloves garlic, crushed",
"1 dried red chile pepper",
"1 tablespoon olive oil",
"1 teaspoon whole grain mustard",
"2 tablespoons fresh lime juice",
"sea salt to taste",
"freshly ground black pepper",
"2 (6 ounce) fillets salmon"
],
"language": "en-US",
"source": "allrecipes.com",
"tags": [],
"title": "Spicy Garlic Salmon",
"url": "http://allrecipes.com/recipe/74567/spicy-garlic-salmon/"
}
| json |
<reponame>replydev/skytransfer
import { EncryptionType } from '../models/encryption';
interface Encryption {
encryptChunkSize: number;
decryptChunkSize: number;
encryptionType: EncryptionType;
}
const MBSize = 1048576;
// https://blog.jim-nielsen.com/2020/export-to-html-from-javascript-using-blob-urls/
// There are different types of chunk size encryptChunkSize/decryptChunkSize because of how js works with bytes.
// During encryption, file is splitted in chunks of encryptChunkSize.
// Once the file is encrypted, its size is bigger (additional 33%) of overhead.
// During the decription, this information if needed to correctly decrypt the chunks.
const encryptions: Encryption[] = [
{
encryptChunkSize: MBSize * 4,
decryptChunkSize: 5592448,
encryptionType: EncryptionType.AES_4MB,
},
{
encryptChunkSize: MBSize * 8,
decryptChunkSize: 11184856,
encryptionType: EncryptionType.AES_8MB,
},
{
encryptChunkSize: MBSize * 16,
decryptChunkSize: 22369664,
encryptionType: EncryptionType.AES_16MB,
},
{
encryptChunkSize: MBSize * 32,
decryptChunkSize: 44739288,
encryptionType: EncryptionType.AES_32MB,
},
{
encryptChunkSize: MBSize * 64,
decryptChunkSize: 89478528,
encryptionType: EncryptionType.AES_64MB,
},
];
export class ChunkResolver {
private encryptionType: EncryptionType;
constructor(encryptionType: EncryptionType) {
this.encryptionType = encryptionType;
}
get encryptChunkSize(): number {
const found = encryptions.find(
(e) => e.encryptionType === this.encryptionType
).encryptChunkSize;
return found ? found : encryptions[0].encryptChunkSize;
}
get decryptChunkSize(): number {
const found = encryptions.find(
(e) => e.encryptionType === this.encryptionType
).decryptChunkSize;
return found ? found : encryptions[0].decryptChunkSize;
}
}
| typescript |
<reponame>ppartarr/azure-sdk-for-java<filename>sdk/datafactory/mgmt-v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/MongoDbLinkedService.java
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.datafactory.v2018_06_01;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.microsoft.rest.serializer.JsonFlatten;
import com.microsoft.azure.management.datafactory.v2018_06_01.implementation.LinkedServiceInner;
/**
* Linked service for MongoDb data source.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = MongoDbLinkedService.class)
@JsonTypeName("MongoDb")
@JsonFlatten
public class MongoDbLinkedService extends LinkedServiceInner {
/**
* The IP address or server name of the MongoDB server. Type: string (or
* Expression with resultType string).
*/
@JsonProperty(value = "typeProperties.server", required = true)
private Object server;
/**
* The authentication type to be used to connect to the MongoDB database.
* Possible values include: 'Basic', 'Anonymous'.
*/
@JsonProperty(value = "typeProperties.authenticationType")
private MongoDbAuthenticationType authenticationType;
/**
* The name of the MongoDB database that you want to access. Type: string
* (or Expression with resultType string).
*/
@JsonProperty(value = "typeProperties.databaseName", required = true)
private Object databaseName;
/**
* Username for authentication. Type: string (or Expression with resultType
* string).
*/
@JsonProperty(value = "typeProperties.username")
private Object username;
/**
* Password for authentication.
*/
@JsonProperty(value = "typeProperties.password")
private SecretBase password;
/**
* Database to verify the username and password. Type: string (or
* Expression with resultType string).
*/
@JsonProperty(value = "typeProperties.authSource")
private Object authSource;
/**
* The TCP port number that the MongoDB server uses to listen for client
* connections. The default value is 27017. Type: integer (or Expression
* with resultType integer), minimum: 0.
*/
@JsonProperty(value = "typeProperties.port")
private Object port;
/**
* Specifies whether the connections to the server are encrypted using SSL.
* The default value is false. Type: boolean (or Expression with resultType
* boolean).
*/
@JsonProperty(value = "typeProperties.enableSsl")
private Object enableSsl;
/**
* Specifies whether to allow self-signed certificates from the server. The
* default value is false. Type: boolean (or Expression with resultType
* boolean).
*/
@JsonProperty(value = "typeProperties.allowSelfSignedServerCert")
private Object allowSelfSignedServerCert;
/**
* The encrypted credential used for authentication. Credentials are
* encrypted using the integration runtime credential manager. Type: string
* (or Expression with resultType string).
*/
@JsonProperty(value = "typeProperties.encryptedCredential")
private Object encryptedCredential;
/**
* Get the IP address or server name of the MongoDB server. Type: string (or Expression with resultType string).
*
* @return the server value
*/
public Object server() {
return this.server;
}
/**
* Set the IP address or server name of the MongoDB server. Type: string (or Expression with resultType string).
*
* @param server the server value to set
* @return the MongoDbLinkedService object itself.
*/
public MongoDbLinkedService withServer(Object server) {
this.server = server;
return this;
}
/**
* Get the authentication type to be used to connect to the MongoDB database. Possible values include: 'Basic', 'Anonymous'.
*
* @return the authenticationType value
*/
public MongoDbAuthenticationType authenticationType() {
return this.authenticationType;
}
/**
* Set the authentication type to be used to connect to the MongoDB database. Possible values include: 'Basic', 'Anonymous'.
*
* @param authenticationType the authenticationType value to set
* @return the MongoDbLinkedService object itself.
*/
public MongoDbLinkedService withAuthenticationType(MongoDbAuthenticationType authenticationType) {
this.authenticationType = authenticationType;
return this;
}
/**
* Get the name of the MongoDB database that you want to access. Type: string (or Expression with resultType string).
*
* @return the databaseName value
*/
public Object databaseName() {
return this.databaseName;
}
/**
* Set the name of the MongoDB database that you want to access. Type: string (or Expression with resultType string).
*
* @param databaseName the databaseName value to set
* @return the MongoDbLinkedService object itself.
*/
public MongoDbLinkedService withDatabaseName(Object databaseName) {
this.databaseName = databaseName;
return this;
}
/**
* Get username for authentication. Type: string (or Expression with resultType string).
*
* @return the username value
*/
public Object username() {
return this.username;
}
/**
* Set username for authentication. Type: string (or Expression with resultType string).
*
* @param username the username value to set
* @return the MongoDbLinkedService object itself.
*/
public MongoDbLinkedService withUsername(Object username) {
this.username = username;
return this;
}
/**
* Get password for authentication.
*
* @return the password value
*/
public SecretBase password() {
return this.password;
}
/**
* Set password for authentication.
*
* @param password the password value to set
* @return the MongoDbLinkedService object itself.
*/
public MongoDbLinkedService withPassword(SecretBase password) {
this.password = password;
return this;
}
/**
* Get database to verify the username and password. Type: string (or Expression with resultType string).
*
* @return the authSource value
*/
public Object authSource() {
return this.authSource;
}
/**
* Set database to verify the username and password. Type: string (or Expression with resultType string).
*
* @param authSource the authSource value to set
* @return the MongoDbLinkedService object itself.
*/
public MongoDbLinkedService withAuthSource(Object authSource) {
this.authSource = authSource;
return this;
}
/**
* Get the TCP port number that the MongoDB server uses to listen for client connections. The default value is 27017. Type: integer (or Expression with resultType integer), minimum: 0.
*
* @return the port value
*/
public Object port() {
return this.port;
}
/**
* Set the TCP port number that the MongoDB server uses to listen for client connections. The default value is 27017. Type: integer (or Expression with resultType integer), minimum: 0.
*
* @param port the port value to set
* @return the MongoDbLinkedService object itself.
*/
public MongoDbLinkedService withPort(Object port) {
this.port = port;
return this;
}
/**
* Get specifies whether the connections to the server are encrypted using SSL. The default value is false. Type: boolean (or Expression with resultType boolean).
*
* @return the enableSsl value
*/
public Object enableSsl() {
return this.enableSsl;
}
/**
* Set specifies whether the connections to the server are encrypted using SSL. The default value is false. Type: boolean (or Expression with resultType boolean).
*
* @param enableSsl the enableSsl value to set
* @return the MongoDbLinkedService object itself.
*/
public MongoDbLinkedService withEnableSsl(Object enableSsl) {
this.enableSsl = enableSsl;
return this;
}
/**
* Get specifies whether to allow self-signed certificates from the server. The default value is false. Type: boolean (or Expression with resultType boolean).
*
* @return the allowSelfSignedServerCert value
*/
public Object allowSelfSignedServerCert() {
return this.allowSelfSignedServerCert;
}
/**
* Set specifies whether to allow self-signed certificates from the server. The default value is false. Type: boolean (or Expression with resultType boolean).
*
* @param allowSelfSignedServerCert the allowSelfSignedServerCert value to set
* @return the MongoDbLinkedService object itself.
*/
public MongoDbLinkedService withAllowSelfSignedServerCert(Object allowSelfSignedServerCert) {
this.allowSelfSignedServerCert = allowSelfSignedServerCert;
return this;
}
/**
* Get the encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string).
*
* @return the encryptedCredential value
*/
public Object encryptedCredential() {
return this.encryptedCredential;
}
/**
* Set the encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string).
*
* @param encryptedCredential the encryptedCredential value to set
* @return the MongoDbLinkedService object itself.
*/
public MongoDbLinkedService withEncryptedCredential(Object encryptedCredential) {
this.encryptedCredential = encryptedCredential;
return this;
}
}
| java |
Madrid: Spanish police said Wednesday they had seized half a tonne of cocaine hidden in fake fireplace bricks and arrested 25 people after nationwide raids.
A two-year investigation culminated in the arrests last month when authorities found the drug in hollow firebricks in a warehouse, the police said in a statement.
Police had to break open thousands of the heat-resistant bricks - normally used to build barbecues or chimneys - to find the hollow ones used to transport the drugs.
The alleged drug ring was led by an individual living in Colombia, Mexico and Spain, according to police, who raided 28 apartments across the country.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed. ) | english |
Rs. 20 crores, the issued equity capital of the company is Rs. 6 crores approximately in which the foreign capital participation is of the order of Rs. 1.5 crores approximately.]
श्री भक्त दर्शन : श्रीमन्, इस फैक्टरी के बारे में पिछले दिनों जो उत्तर मंत्रालय की ओर से दिये गये थे उनसे पता लगा था कि ६ महीने पहले इसका उत्पादन शुरू हो जाना चाहिए था । पर इसमें इतनी देरी क्यों हुई, इसका क्या कारण है ?
श्री कानूनगो : सब इन्तिजाम करने में देरी हो गयी । अप्रैल में काम शुरू होने वाला है ।
श्री भक्त दर्शन : श्रीमन्, मैं जानना चाहता हूं कि हमारे देश में कृत्रिम रबड़ की कुल कितनी खपत होती है और इस फैक्टरी के बन जाने बाद भी कितनी और आवश्यकता रहेगी ? क्या इस फैक्टरी को और बढ़ाया जायेगा या कोई और फैक्टरी लगायी जायेगी ?
श्री कानूनगो : आंकड़े तो मेरे पास नहीं हैं, लेकिन इसके पूरा होने के पश्चात् भी और बहुत ज्यादा जरूरत रहेगी ।
श्री भागवत झा प्राज्जाद: इस कारखाने की अन्तिम उत्पादन क्षमता क्या होगी, और क्या आप बता सकते हैं कि उस स्थिति में यह कब तक पहुंच जायेगा ?
श्री कानूनगो : इसकी अन्तिम उत्पादन क्षमता ३० हज़ार टन होगी ।
श्री भागवत झा प्राज्जाद: इस स्थिति में यह कारखाना कब तक पहुंच जायेगा ?
श्री कानूनगो : तीन चार साल में ।
श्री कछवाय : मैं जानना चाहता हूं कि इस कारखाने के बनने के बाद इसमें कितने कर्मचारी काम करेंगे और कर्मचारियों को कम से कम और ज्यादा से ज्यादा क्या वेतन मिलेगा ?
श्री कानूनगो : यह कारखांना प्राइवेट सेक्टर में है और एक कम्पनी इसको बना रही है । इसमें कितने प्रादमी रहेंगे इसका व्यौरा हम कहां से दे सकते हैं ।
श्री कछवाय : उस पर आपका कोई कंट्रोल होगा या नहीं ?
श्री कानूनगो : कोई कंट्रोल नहीं होगा ।
Shri Mansinh P. Patel: Arising out of the Minister's reply, may I know what is the thinking of the Government regarding the additional quantity of rubber required in this country?
The Minister of International Trade in the Ministry of Commerce and Industry ( Shri Manubhai Shah): There will be a deficit of 45,000 tons of rubber even after this factory goes into production. We are, therefore, thinking of also increasing the rubber plantations and the production on the one hand and also setting up one or two units of synthetic rubber on the other.
Shri P. R. Patel: May I know whether benzene is one of the requirements for production of synthetic rubber and whether the Government have failed to supply benzene to these companies?
Shri Kanungo: As far as my information goes, othylene, styrene, butadiene and synthetic latex are required. Alcohol is the main component. Alcohol has got to be produced from the various sugar factories and other factories. The company is making arrangements for that and the Government is not concerned with it.
Shri Sham Lal Saraf: May I know whether this factory will manufacture rubber as raw material only or it will produce end-products also; it so, what will be those products ?
end-products Kanungo: No will be manufactured; it will only manufacture synthetic rubber.
| english |
/*
* Copyright 2021-2022 Objectiv B.V.
*/
import { Tracker } from './Tracker';
import { TrackerRepositoryInterface } from './TrackerRepositoryInterface';
/**
* TrackerRepository allows developers to create and use multiple Tracker instances in the same Application.
*/
export const TrackerRepository = new (class<T extends Tracker> implements TrackerRepositoryInterface<T> {
trackersMap = new Map<string, T>();
defaultTracker?: T;
add(newInstance: T) {
if (this.trackersMap.has(newInstance.trackerId)) {
globalThis.objectiv?.TrackerConsole.error(
`「objectiv:TrackerRepository」 Tracker \`${newInstance.trackerId}\` already exists.`
);
return;
}
this.trackersMap.set(newInstance.trackerId, newInstance);
if (!this.defaultTracker) {
this.defaultTracker = newInstance;
}
}
delete(trackerId: string) {
if (this.defaultTracker && this.defaultTracker.trackerId === trackerId) {
if (this.trackersMap.size > 1) {
globalThis.objectiv?.TrackerConsole.error(
`「objectiv:TrackerRepository」 \`${trackerId}\` is the default Tracker. Please set another as default before deleting it.`
);
return;
}
this.defaultTracker = undefined;
}
this.trackersMap.delete(trackerId);
}
get(trackerId?: string) {
if (this.trackersMap.size === 0) {
globalThis.objectiv?.TrackerConsole.error(`「objectiv:TrackerRepository」 There are no Trackers.`);
return;
}
if (trackerId) {
const trackerInstance = this.trackersMap.get(trackerId);
if (!trackerInstance) {
globalThis.objectiv?.TrackerConsole.error(`「objectiv:TrackerRepository」 Tracker \`${trackerId}\` not found.`);
return;
}
return this.trackersMap.get(trackerId);
}
return this.defaultTracker;
}
setDefault(trackerId: string) {
if (!this.trackersMap.has(trackerId)) {
globalThis.objectiv?.TrackerConsole.error(`「objectiv:TrackerRepository」 Tracker \`${trackerId}\` not found.`);
return;
}
this.defaultTracker = this.trackersMap.get(trackerId);
}
activateAll() {
this.trackersMap.forEach((tracker) => tracker.setActive(true));
}
deactivateAll() {
this.trackersMap.forEach((tracker) => tracker.setActive(false));
}
flushAllQueues() {
this.trackersMap.forEach((tracker) => tracker.flushQueue());
}
})();
| typescript |
<reponame>MethodGrab/firefox-open-image-in-new-tab
{
"extensionName": {
"message": "Open Image In New Tab",
"description": "Name of the extension."
},
"extensionDescription": {
"message": "Adds a context menu item to open images in a new tab",
"description": "Description of the extension."
},
"openImageInNewTabContextMenuLabel": {
"message": "Open image in new tab",
"description": "The label to use in the context menu for opening images in a new tab"
}
}
| json |
There is a pleasure in the pathless woods;
There is a rapture on the lonely shore;
There is society, where none intrudes,
By the deep sea and music in its roar;
Unlike a compact Matheran or a Mahabaleshwar, Coorg comprises several towns spread across the district, the most significant and central being Madikeri, which is where we decided to stay.
Coffee plantations are one of the major attractions in Coorg and various estates and hotels provide plantation trails where you get an insight into growing of these beautifully scented crop. One of our friends living in Coorg happened to be a coffee estate manager and so, we ended up spending an entire day, lazing in his bungalow (no other property within a km radius) in the company of his two dogs and a rattlesnake somewhere in his garage. We gorged on a sumptuous meal of chicken and veggies, freshly picked from his garden and taking a walk through the plantation – with our friend dishing out interesting details about his adventures that included an encounter with a tiger walking right up to his porch and witnessing an elephant fight from his window. Something that I, an urban dweller lost in the humdrum routine, would only read in fantasy tales.
| english |
// Boost.Geometry
// Unit Test
// Copyright (c) 2016-2017 Oracle and/or its affiliates.
// Contributed and/or modified by <NAME>, on behalf of Oracle
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include "test_formula.hpp"
#include "intersection_cases.hpp"
#include <boost/geometry/formulas/andoyer_inverse.hpp>
#include <boost/geometry/formulas/geographic.hpp>
#include <boost/geometry/formulas/gnomonic_intersection.hpp>
#include <boost/geometry/formulas/sjoberg_intersection.hpp>
#include <boost/geometry/formulas/thomas_direct.hpp>
#include <boost/geometry/formulas/thomas_inverse.hpp>
#include <boost/geometry/formulas/vincenty_direct.hpp>
#include <boost/geometry/formulas/vincenty_inverse.hpp>
#include <boost/geometry/srs/spheroid.hpp>
void check_result(expected_result const& result, expected_result const& expected,
expected_result const& reference, double reference_error,
bool check_reference_only)
{
//BOOST_CHECK_MESSAGE((false), "(" << result.lon << " " << result.lat << ") vs (" << expected.lon << " " << expected.lat << ")");
check_one(result.lon, expected.lon, reference.lon, reference_error, false, check_reference_only);
check_one(result.lat, expected.lat, reference.lat, reference_error, false, check_reference_only);
}
void test_formulas(expected_results const& results, bool check_reference_only)
{
// reference result
if (results.sjoberg_vincenty.lon == ND)
{
return;
}
double const d2r = bg::math::d2r<double>();
double const r2d = bg::math::r2d<double>();
double lona1r = results.p1.lon * d2r;
double lata1r = results.p1.lat * d2r;
double lona2r = results.p2.lon * d2r;
double lata2r = results.p2.lat * d2r;
double lonb1r = results.q1.lon * d2r;
double latb1r = results.q1.lat * d2r;
double lonb2r = results.q2.lon * d2r;
double latb2r = results.q2.lat * d2r;
expected_result result;
// WGS84
bg::srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793);
if (results.gnomonic_vincenty.lon != ND)
{
bg::formula::gnomonic_intersection<double, bg::formula::vincenty_inverse, bg::formula::vincenty_direct>
::apply(lona1r, lata1r, lona2r, lata2r, lonb1r, latb1r, lonb2r, latb2r, result.lon, result.lat, spheroid);
result.lon *= r2d;
result.lat *= r2d;
check_result(result, results.gnomonic_vincenty, results.sjoberg_vincenty, 0.00000001, check_reference_only);
}
if (results.gnomonic_thomas.lon != ND)
{
bg::formula::gnomonic_intersection<double, bg::formula::thomas_inverse, bg::formula::thomas_direct>
::apply(lona1r, lata1r, lona2r, lata2r, lonb1r, latb1r, lonb2r, latb2r, result.lon, result.lat, spheroid);
result.lon *= r2d;
result.lat *= r2d;
check_result(result, results.gnomonic_thomas, results.sjoberg_vincenty, 0.0000001, check_reference_only);
}
if (results.sjoberg_vincenty.lon != ND)
{
bg::formula::sjoberg_intersection<double, bg::formula::vincenty_inverse, 4>
::apply(lona1r, lata1r, lona2r, lata2r, lonb1r, latb1r, lonb2r, latb2r, result.lon, result.lat, spheroid);
result.lon *= r2d;
result.lat *= r2d;
check_result(result, results.sjoberg_vincenty, results.sjoberg_vincenty, 0.00000001, check_reference_only);
}
if (results.sjoberg_thomas.lon != ND)
{
bg::formula::sjoberg_intersection<double, bg::formula::thomas_inverse, 2>
::apply(lona1r, lata1r, lona2r, lata2r, lonb1r, latb1r, lonb2r, latb2r, result.lon, result.lat, spheroid);
result.lon *= r2d;
result.lat *= r2d;
check_result(result, results.sjoberg_thomas, results.sjoberg_vincenty, 0.0000001, check_reference_only);
}
if (results.sjoberg_andoyer.lon != ND)
{
bg::formula::sjoberg_intersection<double, bg::formula::andoyer_inverse, 1>
::apply(lona1r, lata1r, lona2r, lata2r, lonb1r, latb1r, lonb2r, latb2r, result.lon, result.lat, spheroid);
result.lon *= r2d;
result.lat *= r2d;
check_result(result, results.sjoberg_andoyer, results.sjoberg_vincenty, 0.0001, check_reference_only);
}
if (results.great_elliptic.lon != ND)
{
typedef bg::model::point<double, 2, bg::cs::geographic<bg::degree> > point_geo;
typedef bg::model::point<double, 3, bg::cs::cartesian> point_3d;
point_geo a1(results.p1.lon, results.p1.lat);
point_geo a2(results.p2.lon, results.p2.lat);
point_geo b1(results.q1.lon, results.q1.lat);
point_geo b2(results.q2.lon, results.q2.lat);
point_3d a1v = bg::formula::geo_to_cart3d<point_3d>(a1, spheroid);
point_3d a2v = bg::formula::geo_to_cart3d<point_3d>(a2, spheroid);
point_3d b1v = bg::formula::geo_to_cart3d<point_3d>(b1, spheroid);
point_3d b2v = bg::formula::geo_to_cart3d<point_3d>(b2, spheroid);
point_3d resv(0, 0, 0);
point_geo res(0, 0);
bg::formula::great_elliptic_intersection(a1v, a2v, b1v, b2v, resv, spheroid);
res = bg::formula::cart3d_to_geo<point_geo>(resv, spheroid);
result.lon = bg::get<0>(res);
result.lat = bg::get<1>(res);
check_result(result, results.great_elliptic, results.sjoberg_vincenty, 0.01, check_reference_only);
}
}
void test_4_input_combinations(expected_results const& results, bool check_reference_only)
{
test_formulas(results, check_reference_only);
#ifdef BOOST_GEOMETRY_TEST_GEO_INTERSECTION_TEST_SIMILAR
{
expected_results results_alt = results;
std::swap(results_alt.p1, results_alt.p2);
test_formulas(results_alt, true);
}
{
expected_results results_alt = results;
std::swap(results_alt.q1, results_alt.q2);
test_formulas(results_alt, true);
}
{
expected_results results_alt = results;
std::swap(results_alt.p1, results_alt.p2);
std::swap(results_alt.q1, results_alt.q2);
test_formulas(results_alt, true);
}
#endif
}
void test_all(expected_results const& results)
{
test_4_input_combinations(results, false);
#ifdef BOOST_GEOMETRY_TEST_GEO_INTERSECTION_TEST_SIMILAR
expected_results results_alt = results;
results_alt.p1.lat *= -1;
results_alt.p2.lat *= -1;
results_alt.q1.lat *= -1;
results_alt.q2.lat *= -1;
results_alt.gnomonic_vincenty.lat *= -1;
results_alt.gnomonic_thomas.lat *= -1;
results_alt.sjoberg_vincenty.lat *= -1;
results_alt.sjoberg_thomas.lat *= -1;
results_alt.sjoberg_andoyer.lat *= -1;
results_alt.great_elliptic.lat *= -1;
test_4_input_combinations(results_alt, true);
#endif
}
int test_main(int, char*[])
{
for (size_t i = 0; i < expected_size; ++i)
{
test_all(expected[i]);
}
return 0;
}
| cpp |
<reponame>Katala121/delivery_food
class Order {
constructor({
id, user_id, restaurant_id, delivery_adress, order_cost,
list_dish_order, order_time, status,
}) {
this._id = id;
this._user_id = user_id;
this._restaurant_id = restaurant_id;
this._delivery_adress = delivery_adress;
this._order_cost = order_cost;
this._list_dish_order = list_dish_order;
this._order_time = order_time;
this._status = status;
}
get id() {
return this._id;
}
get user_id() {
return this._user_id;
}
get restaurant_id() {
return this._restaurant_id;
}
get delivery_adress() {
return this._delivery_adress;
}
set delivery_adress(newValue) {
this._delivery_adress = newValue;
}
get order_cost() {
return this._order_cost;
}
set order_cost(newValue) {
this._order_cost = newValue;
}
get list_dish_order() {
return this._list_dish_order;
}
set list_dish_order(newValue) {
this._list_dish_order = newValue;
}
get order_time() {
return this._order_time;
}
set order_time(newValue) {
this._order_time = newValue;
}
get status() {
return this._status;
}
set status(newValue) {
this._status = newValue;
}
toJSON() {
return {
id: this.id,
user_id: this.user_id,
restaurant_id: this.restaurant_id,
delivery_adress: this.delivery_adress,
order_cost: this.order_cost,
list_dish_order: this.list_dish_order,
status: this.status,
};
}
}
export default Order;
| javascript |
Google first announced Android Wear 2.0 at its I/O developer conference in May, with a promise to roll it out to all users later this year. It has now delayed those release plans in favor of more developer previews; today it launched the fourth of these.
Just like before, there is no way to get an over-the-air update to Android Wear 2.0 for your watch, so this release is still squarely aimed at developers. Unlike some earlier previews, this update does include some major new features, though. Apps — which can run natively on Wear 2.0 without the need for a companion app on the phone — can now include in-app billing, for example. Users will be able to authorize these on-watch in-app purchases by entering a four-digit PIN code on the watch. I don’t expect to buy a lot of stuff from my watch, but at least it does give developers more opportunities to come up with ways to tempt me to do so.
Just because apps can now run natively on the watch doesn’t mean they can’t benefit from having a companion app installed on a phone, too. To help developers cross-promote their watch and phone apps, Google is introducing a new API that helps them send watch users to the Google Play store on their phones to install apps there.
If you haven’t used Wear 2.0 yet (and chances are you haven’t), then it may come as a surprise that the standard swipe-to-dismiss gesture from Wear 1.x wasn’t available in earlier versions of Wear 2.0. With this fourth developer version, it’s thankfully coming back. The hardware button on the watch is now also mapped to “power” and doesn’t work as a “back” button anymore.
Google also included a number of other minor updates in this release. You can find a full rundown of these changes here. Don’t expect the final release anytime soon, though. The company has already said that we’ll see a fifth developer preview, too.
| english |
<filename>maze/src/logic/InanimatedObjectType.java
package logic;
/**
* The Enum InanimatedObjectType (RTTI).
*/
public enum InanimatedObjectType
{
/** The Wall. */
Wall,
/** The Path. */
Path,
/** The Exit portal. */
ExitPortal;
}
| java |
Senior officials from the banking circle said that this is first time that such a large number of vacancies at helm have been lying unfilled. This development should ideally force the government to hasten the appointments as a failure would leave them more vulnerable as banks are saddled with bad loans and strict central bank regulations.
Dena Bank, Andhra Bank and Punjab & Sind Bank –– have been without a head since the beginning of this calendar year. The fourth one –– Allahabad Bank –– also lacks leadership as the present CEO Usha Ananthasubramanian has been divested of all powers on allegations that the bank had not followed the regulator’s guidelines on Swift in connection with the Nirav Modi scam.
Similarly, PS Jayakumar, CEO of Bank of Baroda, would be completing his three-year term this year while Rajiv Rishi who completed his five-year term at Central Bank of India is unlikely to get an extension, although he has not completed 60 years –– the age PSU chiefs retire.
Among other bank CEOs whose terms have ended are Rakesh Sharma of Canara Bank, Kishor Kharat of Indian Bank, Melwyn Rego of Syndicate Bank, PK Bajaj of United Bank of India and RK Takkar of UCO Bank.
There are 19 executive directors eligible to fill the 12 vacancies for the CEO’s posts in different PSU banks.
“Those executive directors who have completed a year as ED and have two years remaining would be eligible for the CEO post,” said a senior official who did not want to be named. The cut- off date for applying was April 1, 2018. Apart from these 12 banks, two other prominent posts are vacant ––that of managing director at State Bank of India and deputy governor at Reserve Bank of India.
As many as 11 banks are facing restrictions from the Reserve Bank of India due to poor performance in terms of sharp rise in bad loans and losses posted over the past two years.
Absence of CEOs, particularly in banks like Dena Bank and Allahabad Bank which are facing lending restrictions, would make it difficult for these banks to come out of the red.
The BBB had already cleared the CEO appointment of Dena Bank and Andhra Bank. They are awaiting nod from the PMO.
Download The Economic Times News App to get Daily Market Updates & Live Business News.
| english |
{"ast":null,"code":"import * as React from 'react';\nexport function isDisabled(dataNode, skipType) {\n if (!dataNode) {\n return true;\n }\n\n var _dataNode$data = dataNode.data,\n disabled = _dataNode$data.disabled,\n disableCheckbox = _dataNode$data.disableCheckbox;\n\n switch (skipType) {\n case 'select':\n return disabled;\n\n case 'checkbox':\n return disabled || disableCheckbox;\n }\n\n return false;\n}\nexport default function useKeyValueMapping(cacheKeyMap, cacheValueMap) {\n var getEntityByKey = React.useCallback(function (key) {\n var skipType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'select';\n var ignoreDisabledCheck = arguments.length > 2 ? arguments[2] : undefined;\n var dataNode = cacheKeyMap.get(key);\n\n if (!ignoreDisabledCheck && isDisabled(dataNode, skipType)) {\n return null;\n }\n\n return dataNode;\n }, [cacheKeyMap]);\n var getEntityByValue = React.useCallback(function (value) {\n var skipType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'select';\n var ignoreDisabledCheck = arguments.length > 2 ? arguments[2] : undefined;\n var dataNode = cacheValueMap.get(value);\n\n if (!ignoreDisabledCheck && isDisabled(dataNode, skipType)) {\n return null;\n }\n\n return dataNode;\n }, [cacheValueMap]);\n return [getEntityByKey, getEntityByValue];\n}","map":{"version":3,"sources":["/Users/drkpasngr/0/Projects/reaxn/reaxn-ui/node_modules/rc-tree-select/es/hooks/useKeyValueMapping.js"],"names":["React","isDisabled","dataNode","skipType","_dataNode$data","data","disabled","disableCheckbox","useKeyValueMapping","cacheKeyMap","cacheValueMap","getEntityByKey","useCallback","key","arguments","length","undefined","ignoreDisabledCheck","get","getEntityByValue","value"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAO,SAASC,UAAT,CAAoBC,QAApB,EAA8BC,QAA9B,EAAwC;AAC7C,MAAI,CAACD,QAAL,EAAe;AACb,WAAO,IAAP;AACD;;AAED,MAAIE,cAAc,GAAGF,QAAQ,CAACG,IAA9B;AAAA,MACIC,QAAQ,GAAGF,cAAc,CAACE,QAD9B;AAAA,MAEIC,eAAe,GAAGH,cAAc,CAACG,eAFrC;;AAIA,UAAQJ,QAAR;AACE,SAAK,QAAL;AACE,aAAOG,QAAP;;AAEF,SAAK,UAAL;AACE,aAAOA,QAAQ,IAAIC,eAAnB;AALJ;;AAQA,SAAO,KAAP;AACD;AACD,eAAe,SAASC,kBAAT,CAA4BC,WAA5B,EAAyCC,aAAzC,EAAwD;AACrE,MAAIC,cAAc,GAAGX,KAAK,CAACY,WAAN,CAAkB,UAAUC,GAAV,EAAe;AACpD,QAAIV,QAAQ,GAAGW,SAAS,CAACC,MAAV,GAAmB,CAAnB,IAAwBD,SAAS,CAAC,CAAD,CAAT,KAAiBE,SAAzC,GAAqDF,SAAS,CAAC,CAAD,CAA9D,GAAoE,QAAnF;AACA,QAAIG,mBAAmB,GAAGH,SAAS,CAACC,MAAV,GAAmB,CAAnB,GAAuBD,SAAS,CAAC,CAAD,CAAhC,GAAsCE,SAAhE;AACA,QAAId,QAAQ,GAAGO,WAAW,CAACS,GAAZ,CAAgBL,GAAhB,CAAf;;AAEA,QAAI,CAACI,mBAAD,IAAwBhB,UAAU,CAACC,QAAD,EAAWC,QAAX,CAAtC,EAA4D;AAC1D,aAAO,IAAP;AACD;;AAED,WAAOD,QAAP;AACD,GAVoB,EAUlB,CAACO,WAAD,CAVkB,CAArB;AAWA,MAAIU,gBAAgB,GAAGnB,KAAK,CAACY,WAAN,CAAkB,UAAUQ,KAAV,EAAiB;AACxD,QAAIjB,QAAQ,GAAGW,SAAS,CAACC,MAAV,GAAmB,CAAnB,IAAwBD,SAAS,CAAC,CAAD,CAAT,KAAiBE,SAAzC,GAAqDF,SAAS,CAAC,CAAD,CAA9D,GAAoE,QAAnF;AACA,QAAIG,mBAAmB,GAAGH,SAAS,CAACC,MAAV,GAAmB,CAAnB,GAAuBD,SAAS,CAAC,CAAD,CAAhC,GAAsCE,SAAhE;AACA,QAAId,QAAQ,GAAGQ,aAAa,CAACQ,GAAd,CAAkBE,KAAlB,CAAf;;AAEA,QAAI,CAACH,mBAAD,IAAwBhB,UAAU,CAACC,QAAD,EAAWC,QAAX,CAAtC,EAA4D;AAC1D,aAAO,IAAP;AACD;;AAED,WAAOD,QAAP;AACD,GAVsB,EAUpB,CAACQ,aAAD,CAVoB,CAAvB;AAWA,SAAO,CAACC,cAAD,EAAiBQ,gBAAjB,CAAP;AACD","sourcesContent":["import * as React from 'react';\nexport function isDisabled(dataNode, skipType) {\n if (!dataNode) {\n return true;\n }\n\n var _dataNode$data = dataNode.data,\n disabled = _dataNode$data.disabled,\n disableCheckbox = _dataNode$data.disableCheckbox;\n\n switch (skipType) {\n case 'select':\n return disabled;\n\n case 'checkbox':\n return disabled || disableCheckbox;\n }\n\n return false;\n}\nexport default function useKeyValueMapping(cacheKeyMap, cacheValueMap) {\n var getEntityByKey = React.useCallback(function (key) {\n var skipType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'select';\n var ignoreDisabledCheck = arguments.length > 2 ? arguments[2] : undefined;\n var dataNode = cacheKeyMap.get(key);\n\n if (!ignoreDisabledCheck && isDisabled(dataNode, skipType)) {\n return null;\n }\n\n return dataNode;\n }, [cacheKeyMap]);\n var getEntityByValue = React.useCallback(function (value) {\n var skipType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'select';\n var ignoreDisabledCheck = arguments.length > 2 ? arguments[2] : undefined;\n var dataNode = cacheValueMap.get(value);\n\n if (!ignoreDisabledCheck && isDisabled(dataNode, skipType)) {\n return null;\n }\n\n return dataNode;\n }, [cacheValueMap]);\n return [getEntityByKey, getEntityByValue];\n}"]},"metadata":{},"sourceType":"module"} | json |
Noted Bollywood filmmaker Mahesh Bhatt's daughter Alia Bhatt who is known for her gorgeous looks is turning on the heat by flashing her thunder thighs every now and then. It's just a treat to watch the glowing skin of this newbie.
The 'Student Of The Year' star is making the people of all age groups fall head over heels for her with that flawless skin tone and sexy looks. The heat she generates with her presence is making her find a place in every eligible bachelor's most desirable women list. No doubt, she is the next big thing in Bollywood. Enjoy the sweet nothing of short sensation! | english |
<reponame>RendleLabs/aspnetcore-docker
{
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.1",
"type": "platform"
},
"Microsoft.AspNetCore.AngularServices": "1.0.0-*",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.1",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview2-final",
"type": "build"
},
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0"
},
"tools": {
"Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
"Microsoft.DotNet.Watcher.Tools": "1.0.0-preview2-final"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
}
}
| json |
<reponame>proximcreation/xbox-controller-node
{
"name": "xbox-controller-node",
"version": "1.6.0",
"description": "Simple interface to Xbox controller using Node.js",
"main": "./lib/xbox-controller.js",
"dependencies": {
"chalk": "^2.3.0",
"joystick": "^0.1.2",
"node-hid": "^0.5.7",
"socket.io": "^2.0.4"
},
"scripts": {
"test": "node lib/test.js"
},
"repository": {
"type": "git",
"url": "https://github.com/mapaiva/xbox-controller-node.git"
},
"keywords": [
"xbox",
"controller",
"node"
],
"author": {
"name": "<NAME>",
"email": "<EMAIL>"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/mapaiva/xbox-controller-node/issues"
},
"homepage": "https://github.com/mapaiva/xbox-controller-node"
}
| json |
<reponame>github/advisory-database
{
"schema_version": "1.2.0",
"id": "GHSA-4v5h-4j58-whhg",
"modified": "2022-05-13T01:30:18Z",
"published": "2022-05-13T01:30:18Z",
"aliases": [
"CVE-2016-8673"
],
"details": "A vulnerability has been identified in SIMATIC CP 343-1 Advanced (incl. SIPLUS NET variant) (All versions < V3.0.53), SIMATIC CP 443-1 Advanced (incl. SIPLUS NET variant) (All versions < V3.2.17), SIMATIC S7-300 PN/DP CPU family (incl. SIPLUS variants) (All versions), SIMATIC S7-400 PN/DP CPU family (incl. SIPLUS variants) (All versions). The integrated web server at port 80/TCP or port 443/TCP of the affected devices could allow remote attackers to perform actions with the permissions of an authenticated user, provided the targeted user has an active session and is induced to trigger the malicious request.",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}
],
"affected": [
],
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-8673"
},
{
"type": "WEB",
"url": "https://cert-portal.siemens.com/productcert/pdf/ssa-603476.pdf"
}
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"severity": "HIGH",
"github_reviewed": false
}
} | json |
<filename>lambda.py
import boto3
import json
import numpy as np
import base64, os, boto3, ast, json
endpoint = 'myprojectcapstone'
def format_response(message, status_code):
return {
'statusCode': str(status_code),
'body': json.dumps(message),
'headers': {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
}
}
def lambda_handler(event, context):
try :
body = json.loads(event['body'])
image = base64.b64decode(body['data'].replace('data:image/png;base64,', ''))
try :
runtime = boto3.Session().client(service_name='sagemaker-runtime', region_name='us-east-2')
response = runtime.invoke_endpoint(EndpointName=endpoint, ContentType='application/x-image', Body=image)
print(response)
try:
probs = response['Body'].read()
probs = json.loads(probs)
#probs = ast.literal_eval(probs)
#pred = probs.index(max(probs))
pred = np.argmax( np.array( probs ) )
if pred == 0:
resp = 'Animated Nsfw'
elif pred == 1:
resp = 'Conatins Nudity'
elif pred == 2:
resp = 'Contains Porn'
elif pred == 4:
resp = 'Conatins semi Nudity'
else :
resp = 'Safe For viewing'
return format_response(resp, 200)
except:
return format_response('Ouch! Something went wrong with loading json data from endpoint'+response['Body'].read() , 200)
except :
return format_response('Ouch! Something went wrong with endpoint' , 200)
except :
return format_response('Ouch! Something went wrong with decoding' , 200)
| python |
Terrorism is posing a threat to humanity and they are often hitting the international headlines with the bomb attacks. The latest incident has been reported in East Java province in Indonesia. Serial blasts took place in three churches when the Sunday morning sermons were going on.
The blasts took place in Surabaya city, the capital of East Java province. The explosion happened at 7. 15 a. m (Jakarta time). There was a gap of five minutes between each explosion. The blasts took place in Santa Maria church in Ngagel Madya area, Gereja Kristen Indonesia church on Diponegoro street and Pantekosta church on Arjuno street. The government immediately deployed the police personnel in these locations and emergency services have been called in to provide assistance to the victims.
The initial reports state that 8 persons were killed in the deadly attacks and 35 persons were injured. The police are suspecting that the suicide bombers have entered the churches disguising as church followers and they have detonated the bombs. | english |
<reponame>slavonnet/leakcanary<gh_stars>1000+
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [MinimumElapsedSinceStartInterceptor](index.md) / [<init>](./-init-.md)
# <init>
`MinimumElapsedSinceStartInterceptor(minimumElapsedSinceStartMillis: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = TimeUnit.SECONDS.toMillis(30), processInfo: `[`ProcessInfo`](../-process-info/index.md)` = ProcessInfo.Real)` | markdown |
Mumbai, Nov 28: Wednesday's terror attacks could affect the already struggling airlines industry and the travel & tourism sectors for at least next two to three months. Other than the direct impact of lower travel needs due to a slowing economy, there is a high probability of what analysts term `collateral damage', like dip in tourist inflows because of adverse travel advisory by other countries on India.
The silver lining, at least for the airlines industry, is the recent dip in crude oil price, that could lead to lower ATF prices, which, in turn, could allow the operators to cut price of tickets to attract more travellers to fly.
Within 24 hours of Wednesday's attacks on the city, Australia has cautioned its citizens about travelling to India. Market players now feel more countries could follow Australia. "Negative developments like these could lead to collateral damage for the airlines as well as travel & tourism industries,'' said Amitabh Chakraborty, president-equities, Religare Securities. Such warnings, coming just before the busy holiday season, could aggravate the pains for these industries, analysts feel.
These industries could also be affected by the cancellation of international conferences, earlier scheduled in India, Chakraborty said. For example, on Thursday, a leading ratings agency cancelled its scheduled conference in one of the two five start hotels in the city, majorly affected by the attacks.
However, marker players feel the slide in these sectors could be a temporary phenomenon. "There could be some immediate reaction to the blasts on these sectors. But I think in another 2-3 months, it would be back on track,'' said Arun Kejriwal, director, KRIS.
In the aviation sector in particular, a lot of bad news like higher cost of operation due to high ATF prices, some slowdown in the services industry leading to lower demand for air travel etc, have already been factored in, market players said. For example, over the last one year, the Jet Airways stock has lost over 84% in value to its current value of Rs 138.
Kejriwal also believes that with the ATF prices coming down, the aviation industry would soon be able to cut airfare which in turn would lure travellers to come back to air travel. "It might even lead to rise demand,'' Kejriwal said. | english |
<filename>src/locales/en.json
{
"settings.title": "Settings",
"settings.client_path": "LeagueClient installation path",
"champion.name": "Champion name",
"champion.autopick.tooltip": "When you're in champion select, automatically update RuneBook with your champion pick.",
"champion.autopick": "Auto select",
"settings.pathdiscovery.help": "Automatic detection is active. Please disable it if you want to manually set a custom path.",
"settings.pathdiscovery": "Automatically detect installation path (recommended)",
"settings.restart.warning": "Restart RuneBook to apply this change",
"settings.updates": "Updates",
"settings.newversion": "New version available!",
"settings.downloadupdate": "Download update",
"settings.uptodate": "RuneBook is up to date.",
"settings.advanced": "Advanced",
"settings.localrunefile": "Local rune pages file",
"settings.choosefile": "Choose .json file",
"settings.lang": "Language",
"chapters.title": "Chapters",
"chapters.welcome": "Welcome to RuneBook!",
"chapters.localpages": "Local pages",
"chapters.startmessage": "Select a champion to start managing your rune pages.",
"whatsnew.title": "What's new in ",
"connectionstatus.inprogress": "Logging in",
"connectionstatus.loggingout": "Logging out",
"currentpage.title": "Current page",
"currentpage.unavailable": "Current page is not available.",
"currentpage.unavailable.subheader1": "Please log in to the League client to access your rune pages.",
"currentpage.unavailable.subheader2": "If the error persists, go to Settings and manually set your LeagueClient installation path.",
"currentpage.downloadcurrentpage": "Import this page as local",
"pagelist.uploadpage": "Upload this page to the client",
"pagelist.syncfrom": "Sync from ",
"pagelist.unlink": "Unlink this page",
"pagelist.bookmarkpage": "Bookmark this page as local",
"pagelist.emptylocalpage": "You don't seem to have any pages for this champion.",
"pagelist.emptylocalpage.subheader": "Click the button below to import from your current page.",
"pagelist.emptyremotepage": "Couldn't find rune pages for this champion.",
"pagelist.emptyremotepage.subheader": "No pages found or service temporarily unavailable.",
"pagelist.confirmdialog": "Are you sure you want to delete this page?",
"settings.experimental": "Experimental",
"settings.darktheme": "Dark theme"
} | json |
Gandhinagar, May 23: Gujarat Chief Minister Vijay Rupani on Wednesday said that Congress will not be able to win a single Lok Sabha seat from the state as the BJP will repeat the 2014 general elections results by winning all 26 seats in 2019. “We will win all 26 seats in the 2019 Lok Sabha elections in Gujarat by repeating 2014,” Rupani told IANS in an interview. He said the Congress, which gave the Bharatiya Janata Party (BJP) a tough fight in the 2017 Assembly polls, would not be able to get a single seat from the state. “After the 2014 elections, it was only Gujarat where a state government repeated it’s tenure,” Rupani said.
Rupani also pointed out that the trader community of the state stood by the BJP during elections despite the Congress describing the Goods and Services Tax (GST) as ‘Gabbar Singh Tax’. When pointed out that the farmers were not backing the BJP in the rural areas, the Chief Minister said: “Even after 22 years of BJP’s rule in the state, farmers have full faith in the government. ” Asked about the Dalit atrocities in his state, Rupani said: “We have taken immediate action whenever such a complaint has come there. ” (IANS) | english |
<filename>Chapter13/TextQuery.cpp<gh_stars>0
#include "pch.h"
#include "StrVec.h"
#include "myfunction.h"
#include "TextQuery.h"
std::set<TextQuery::line_no>::iterator QueryResult::begin()
{
auto ret=lines->begin();
return ret;
}
const std::set<TextQuery::line_no>::iterator QueryResult::begin() const
{
auto ret = lines->cbegin();
return ret;
}
std::set<TextQuery::line_no>::iterator QueryResult::end()
{
auto ret = lines->end();
return ret;
}
const std::set<TextQuery::line_no>::iterator QueryResult::end() const
{
auto ret = lines->cend();
return ret;
}
void TextQuery::display_map() {
auto iter = wm.cbegin(), iter_end = wm.cend();
for (; iter != iter_end; ++iter) {
std::cout << "word: " << iter->first << " {";
auto text_locs = iter->second;
auto loc_iter = text_locs->cbegin();
auto loc_iter_end = text_locs->cend();
while (loc_iter != loc_iter_end) {
std::cout << *loc_iter;
if (++loc_iter != loc_iter_end) {
std::cout << ", ";
}
}
std::cout << "}" << std::endl;
}
std::cout << std::endl;
}
std::string TextQuery::cleanup_str(const std::string& word) {
std::string ret;
for (auto iter = word.begin(); iter != word.end(); ++iter) {
if (!ispunct(*iter)) {
ret += tolower(*iter);
}
}
return ret;
} | cpp |
<reponame>JeongJaeWook/python-for-text-analysis
{"published": "2015-09-18T07:13:55Z", "media-type": "News", "title": "Funeral notices for Friday, Sept. 18, 2015", "id": "9f21abd6-1690-46dd-adaf-dd2b4c19d45c", "content": "BEDARD \u2014 Barbara, 61, of North Fryeburg passed away on Friday, Sept. 11, in Auburn. A Celebration of her Life will be held Saturday, Sept. 26, at the North Fryeburg Fire Station from noon to 5 p.m. Bring a dish to share. Arrangements are under the care of Wood Funeral Home, 9 Warren St., Fryeburg. \n \nBRETON \u2014 <NAME>, 61, of Wilton passed away on Monday morning, Sept. 14. Private services will be held. Interment will be in St. Peter\u2019s Cemetery, Lewiston. Arrangements are under the care of Chandler Funeral Home and Cremation Service, 45 Main St., South Paris. \n \nCHAMPLIN \u2014 <NAME>, 58, of Odenton, Md., passed away on Friday, Sept. 11, at Baltimore Washington Medical Center in Glen Burnie, Md. A Celebration of Life will be held on Sunday, Sept. 20, at the American Legion Post 276, in Severn, Md. The U.S. Navy Honor Guard will present funeral honors at 3 p.m. \n \nCUMMINGS \u2014 Marilyn, of South Paris and previously of Sebastian, Fla., passed away on Wednesday, Sept. 16. At Marilyn\u2019s request, there will be no service at this time. A graveside service will be held at a later date. Anyone choosing to honor Marilyn\u2019s memory may do so with a donation to the American Diabetes Association. Arrangements are under the care of Chandler Funeral Home and Cremation Service, 45 Main St., South Paris. \n \nGIASSON \u2014 <NAME>., 84, of Auburn died Tuesday, Sept. 15. Visiting hours will be held on Thursday, Sept. 24, from 4 to 7 p.m. at Fortin/Auburn. A Liturgy of the Word service will take place on Friday, Sept. 25, at 11 a.m., also at Fortin/Auburn, followed by a committal service at Gracelawn Memorial Park in Auburn. Arrangements are under the care of the Fortin Group/Plummer & Merrill Funeral Home, Cremation and Monument Services, 217 Turner St., Auburn, 783-8545. \n \nJULIAN \u2014 <NAME>., 51, of Auburn died on Tuesday, Sept. 15, at the Auburn Hospice House after a brief illness. Relatives and friends are invited to attend a Celebration of Frank\u2019s Life on Sunday, Sept. 20, at 12:30 p.m. at the Julian residence, 1268 Lisbon St., Lewiston. Advantage Funeral and Cremation Services. \n \nLAVOIE \u2014 <NAME>., 72, of Lewiston died at his home on Monday, Sept. 14. A Mass of Christian Burial will take place on Saturday, Sept. 19, at 11 a.m. at Holy Family Church, followed by a committal at St. Peter\u2019s Cemetery, 217 Switzerland Road, Lewiston. In lieu of flowers, you can send a donation to The Patrick Dempsey Cancer Center for Cancer Hope & Healing at www.dempseycenter.org . A service of The Fortin Group Funeral, Cremation and Monument Provider, 70 Horton St., Lewiston, ME 04240 207-784-4584. \n \nPULSIFER \u2014 <NAME>, 89, of Poland, passed away peacefully Monday, Sept. 14, at Central Maine Medical Center in Lewiston. There will be a family graveside service on Saturday, Sept, 19, at 10 a.m. at Mountain View Cemetery, Auburn. Arrangements are under the care of Chandler Funeral Home and Cremation Service, 26 West Dwinal St., Mechanic Falls. \n \nWARREN \u2014 <NAME>., 87, of Buckfield passed away on Wednesday, Sept. 16, in Togus. Family and friends may attend graveside services, Sunday, Sept. 20, at 2 p.m. at the Buckfield Village Cemetery. Arrangements are under the care of Chandler Funeral Home and Cremation Service, 45 Main St., South Paris.", "source": "Sun-Journal"} | json |
package io.github.squid233.squid233slogger.consolestyle;
/**
* @author squid233
*/
public class Style {
/**
* The empty style
*/
public static final String EMPTY = "\033[0m";
/**
* The bold style
*/
public static final String BOLD = "\033[1m";
/**
* The underline style
*/
public static final String UNDERLINE = "\033[4m";
/**
* The inverse color style
*/
public static final String INVERSE_COLOR = "\033[7m";
}
| java |
/**
* @param createdBy
* <NAME>
* @param authors
* <NAME>
* @param summary
* Der alliance-Service beantragt für die alliance-Komponente die Daten zu den Bündnissen vom api-Service.
*
*/
import { HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { ThrowbackClass } from '../helpers/classes/ThrowbackClass';
import { ThrowbackManager } from '../helpers/classes/ThrowbackManager';
import { Throwback } from '../helpers/interfaces/Throwback';
import { ApiService } from './api.service';
@Injectable({
providedIn: 'root'
})
export class ThrowbackService {
throwbackmanager: ThrowbackManager;
limit=false;
constructor(private api: ApiService) {
this.throwbackmanager=new ThrowbackManager();
}
async getNecessaryThrowbacks(page?: number){
return new Promise<ThrowbackClass[]>(async (resolve, reject)=> {
try{
let current=this.throwbackmanager.getCurrentPage();
if(page){
current=page;
this.throwbackmanager.setCurrentPage(current);
}
// console.log("currentPage",current, "maxPage", this.throwbackmanager.getMaxPages());
if(!this.throwbackmanager.getPageValue(current)){
await this.getThrowbacks(current);
}
if(!this.limit && this.throwbackmanager.hasNextPage() && !this.throwbackmanager.getPageValue(current+1)){
// console.log("hasNextPage",this.throwbackmanager.hasNextPage());
await this.getThrowbacks(current+1);
}
if(this.throwbackmanager.hasPreviousPage() && !this.throwbackmanager.getPageValue(current-1)){
// console.log("hasPreviousPage",this.throwbackmanager.hasPreviousPage());
await this.getThrowbacks(current-1);
}
resolve(this.throwbackmanager.getPageValue(current));
}catch (error){
reject(error)
}
})
}
async getThrowbacks(page?: number){
return new Promise<ThrowbackClass[]>(async (resolve, reject) => {
try{
// console.log("request");
let params= new HttpParams()
.set('page', this.throwbackmanager.getCurrentPage().toString());
if(page){
params=params.set('page', page.toString());//.set reicht nicht, muss neu zugewiesen werden
}
const Url='throwbacks';
let response= await this.api.fetch(Url, params);
let newThrowbacks: ThrowbackClass[]=[];
(response.data as Throwback[]).forEach((value: Throwback) => {
if(new Date().getTime()-new Date(value.end_at).getTime()>0){
let newThrowback=new ThrowbackClass(
value.id,
value.name,
value.description,
value.social_media_video_url,
value.start_at,
value.end_at,
value.lat,
value.lng,
value.location_name,
value.description_shortened
);
newThrowbacks.push(newThrowback);
}
else{
this.limit=true;
}
});
this.throwbackmanager.setnewPage(response.current_page, response.max_pages,newThrowbacks);
this.throwbackmanager.setMaxPages(response.max_pages);
if(this.limit)this.throwbackmanager.setMaxPages(response.current_page);
resolve(newThrowbacks);
}catch (error){
reject(error)
}
})
}
}
| typescript |
<reponame>robertylewis/website_test
[
{
"content": "<p>hello, I am just getting started using lean and was wondering if anyone could help me out</p>\n<p>I am trying to prove the IVT using the basic functions in lean. Right now, I have the following:</p>\n<p>theorem intermediate_value {f : ℝ → ℝ} (Hf : continuous f)<br>\n {a b : ℝ} (Hab : a < b)<br>\n (Hav : f a < 0) (Hbv : f b > 0) : <br>\n ∃ c, a < c ∧ c < b ∧ f c = 0 :=<br>\nbegin<br>\nlet K := {x | a<b ∧ x>a ∧ x<b ∧ f x <= 0},<br>\nlet c := is_lub K,<br>\n--here I would like to use the definition of least upper bound, image of c, and continuity to say that f(c) is within epsilon of 0 but I'm not sure how to use the syntax of lean<br>\nend</p>",
"id": 192478415,
"sender_full_name": "adriana",
"timestamp": 1585709707
},
{
"content": "<p><code>is_lub</code> is a predicate; you probably want <code>let c := Sup K</code>.</p>",
"id": 192478641,
"sender_full_name": "<NAME>",
"timestamp": 1585710087
},
{
"content": "<p>BTW, no need to include <code>a < b</code> in the definition of <code>K</code>. You already have it in <code>Hab</code>.</p>",
"id": 192478703,
"sender_full_name": "<NAME>",
"timestamp": 1585710185
},
{
"content": "<p>If you use non-strict inequalities everywhere, then you'll be able to say that <code>K</code> is closed, hence it contains its Sup (see <code>cSup_mem_of_is_closed</code>).</p>",
"id": 192478870,
"sender_full_name": "<NAME>",
"timestamp": 1585710366
},
{
"content": "<p>And you'll need to show that <code>f x < 0</code> is impossible.</p>",
"id": 192478894,
"sender_full_name": "<NAME>",
"timestamp": 1585710415
},
{
"content": "<p>Or you can do something like (not tested)</p>\n<div class=\"codehilite\"><pre><span></span><span class=\"n\">rcases</span> <span class=\"n\">lt_trichotomy</span> <span class=\"mi\">0</span> <span class=\"o\">(</span><span class=\"n\">f</span> <span class=\"n\">c</span><span class=\"o\">)</span> <span class=\"k\">with</span> <span class=\"n\">Hc</span> <span class=\"bp\">|</span> <span class=\"n\">Hc</span> <span class=\"bp\">|</span> <span class=\"n\">Hc</span><span class=\"o\">,</span>\n</pre></div>\n\n\n<p>In two cases you'll get to a contradiction, and in the middle case you'll need to show <code>a < c</code> and <code>c < b</code>.</p>",
"id": 192479013,
"sender_full_name": "<NAME>",
"timestamp": 1585710583
},
{
"content": "<p>It makes sense to prove <code>a ≤ c</code> and <code>c ≤ b</code> before doing <code>rcases</code>.</p>",
"id": 192479073,
"sender_full_name": "<NAME>",
"timestamp": 1585710613
},
{
"content": "<p>Use <code>cSup_le</code> and <code>le_cSup</code> lemmas.</p>",
"id": 192479084,
"sender_full_name": "<NAME>",
"timestamp": 1585710636
},
{
"content": "<p>which import statement do I need in order to use Sup?</p>",
"id": 192479907,
"sender_full_name": "adriana",
"timestamp": 1585711736
},
{
"content": "<p>What is your mathlib version? It older versions it is in <code>lattice</code> namespace (was changed a few weeks ago).</p>",
"id": 192480160,
"sender_full_name": "<NAME>",
"timestamp": 1585712151
},
{
"content": "<p>It is defined in <code>order/complete_lattice</code>; lemmas that work for reals are in <code>order/conditionally_complete_lattice</code>, and the latter file is <code>import</code>ed by <code>data/real/basic</code>.</p>",
"id": 192480222,
"sender_full_name": "<NAME>",
"timestamp": 1585712231
},
{
"content": "<p>So, if you have real numbers, then you probably have <code>Sup</code> and most of its properties.</p>",
"id": 192480225,
"sender_full_name": "<NAME>",
"timestamp": 1585712255
},
{
"content": "<p>thanks, I had the old version!</p>",
"id": 192481244,
"sender_full_name": "adriana",
"timestamp": 1585713749
}
] | json |
<filename>mergedepotdynamic/system.activities.presentation.view.virtualizedcontainerservice.mta.json
{"author":"dotnet-bot","breadcrumb_path":"breadcrumb/toc.json","search.ms_sitename":"Docs","search.ms_docsetname":"fulldocset","version":null,"locale":"en-us","site_name":"Docs","search.ms_product":"MSDN","depot_name":"MSDN.fulldocset","ref_skeleton_gitcommit":"https://github.com/TianqiZhang/ECMA2YamlTestRepo2/blob/501959ac03e19ac52a27aa4c6bbeb980f8b11c8c/fulldocset/System.Activities.Presentation.View.VirtualizedContainerService.yml","original_ref_skeleton_git_url":"https://github.com/TianqiZhang/ECMA2YamlTestRepo2/blob/master/fulldocset/System.Activities.Presentation.View.VirtualizedContainerService.yml","open_to_public_contributors":true,"api_name":["System.Activities.Presentation.View.VirtualizedContainerService","System.Activities.Presentation.View.VirtualizedContainerService..ctor","System.Activities.Presentation.View.VirtualizedContainerService.GetContainer","System.Activities.Presentation.View.VirtualizedContainerService.GetHintSize","System.Activities.Presentation.View.VirtualizedContainerService.GetViewElement","System.Activities.Presentation.View.VirtualizedContainerService.HintSizeName","System.Activities.Presentation.View.VirtualizedContainerService.SetHintSize"],"api_location":["System.Activities.Presentation.dll"],"topic_type":["apiref"],"api_type":["Assembly"],"f1_keywords":["System.Activities.Presentation.View.VirtualizedContainerService","System::Activities::Presentation::View::VirtualizedContainerService","System.Activities.Presentation.View.VirtualizedContainerService.#ctor","System::Activities::Presentation::View::VirtualizedContainerService::#ctor","System.Activities.Presentation.View.VirtualizedContainerService.GetContainer","System::Activities::Presentation::View::VirtualizedContainerService::GetContainer","System.Activities.Presentation.View.VirtualizedContainerService.GetHintSize","System::Activities::Presentation::View::VirtualizedContainerService::GetHintSize","System.Activities.Presentation.View.VirtualizedContainerService.GetViewElement","System::Activities::Presentation::View::VirtualizedContainerService::GetViewElement","System.Activities.Presentation.View.VirtualizedContainerService.HintSizeName","System::Activities::Presentation::View::VirtualizedContainerService::HintSizeName","System.Activities.Presentation.View.VirtualizedContainerService.SetHintSize","System::Activities::Presentation::View::VirtualizedContainerService::SetHintSize"],"dev_langs":["csharp"],"updated_at":"2017-03-01 01:37 AM","document_id":"6dc19930-5d6d-a0de-08b4-18ab042dd815","content_git_url":"https://github.com/TianqiZhang/ECMA2YamlTestRepo2/blob/master/fulldocset/xml/System.Activities.Presentation.View/VirtualizedContainerService.xml","layout":"Reference","pagetype":"Reference","title":"VirtualizedContainerService class | Microsoft Docs","description":"Represents a virtual container service associated with an editing context and design view. The virtual container service is used to customize the UI virtualization behavior.\n","toc_asset_id":"_splitted/System.Activities.Presentation.View/toc.json","toc_rel":"_splitted/System.Activities.Presentation.View/toc.json","source_url":"","ms.assetid":"System.Activities.Presentation.View.VirtualizedContainerService","canonical_url":"https://ppe.docs.microsoft.com/en-us/mergedepotdynamic/system.activities.presentation.view.virtualizedcontainerservice","is_dynamic_rendering":true,"content_type":"application/json","publish_version":"{\"opbuild.templates.docs\":\"1.30.0-alpha-006-g4755e46\",\"commit_id\":\"2d9d5470bd6ded1ca54cf84dd0bdd43fce7970f9\",\"branch\":\"master\",\"opbuild.scripts\":\"1.30.0-alpha-006-g4755e46\",\"opbuild.htmltopdftool\":\"1.30.0-alpha-006-g4755e46\",\"opbuild.gitcontributorinformationresolver\":\"1.30.0-alpha-006-g4755e46\",\"opbuild_service\":\"1.30.6.0\",\"docfx.console\":\"2.14.1\",\"opbuild.resolvedependencyconsole\":\"1.30.0-alpha-006-g4755e46\",\"opbuild.schemavalidationconsole\":\"1.30.0-alpha-006-g4755e46\",\"opbuild.redirectionresolver\":\"1.30.0-alpha-006-g4755e46\",\"opbuild.templates.intellisense\":\"1.30.0-alpha-006-g4755e46\",\"dependencies\":[{\"branch\":\"preview\",\"path\":\"_themes\",\"url\":\"https://github.com/Microsoft/templates.docs.msft\",\"commit_id\":\"<PASSWORD>\",\"opbuild.templates.common\":\"1.29.1\"}]}"} | json |
{
"name": "Firefox",
"description": "A cross-platform open-source web browser.",
"url": "https://www.mozilla.org/en-US/firefox/new/"
} | json |
A bus collided with an ambulance in Gwarko, lalitpur, while the ambulance was parked at the side of road informed the police.
The bus with number plate Ba 3 Kha 2142 hit an ambulance with number plate Ja 1 cha 512, this morning. The bus went out of control and hit the ambulance, 18 people have sustained injury in the accident informed police.
The condition of the 18 injured is normal.
READ ALSO: | english |
<gh_stars>0
package cmd
import (
"github.com/spf13/cobra"
"github.com/ycanty/slack-stats/report"
)
func NewReportCommand() *cobra.Command {
command := &cobra.Command{
Use: "report",
Short: "Generate reports from the statistics database",
Long: ``,
}
command.AddCommand(NewReportOverviewCommand())
// TODO Add --from <date> --to <date>
return command
}
func reportApi() (*report.Api, error) {
dbApi, err := dbApi()
if err != nil {
return nil, err
}
return report.NewApi(dbApi)
}
| go |
** Most wickets for India in Tests:
** Most wins in overseas Tests as captain (India):
11 S Ganguly (28)
06 MS Dhoni (30)
05 R Dravid (17)
** Four wins for India outside the sub-continent in 2018 (Johannesburg, Trent Bridge, Adelaide & Melbourne) - the most for them in a calendar year surpassing three in 1968 ( all three in New Zealand).
** Virat Kohli's record when he wins the toss:
In nine away Tests he won the toss, India went on to win eight and drew one (vs Ban, Fatullah, 2015).
** Cheteshwar Pujara - the only batsman to score 50+ in all of India's four away wins in 2018:
** Fewest % of drawn Tests in a calendar year:
** Most dismissals by a WK in his debut calendar year:
42 Brad Haddin (2008) / Rishabh Pant (2018)
36 Peter Nevill (2015)
35 Kevin Wright (1979)
** Best figures by an Indian pacer in Australia:
Most Test wickets in debut calendar year:
44 R Tattersall (1951)
43 Ted McDonald (1921)
Jasprit Bumrah, Man of the Match: It is a great feeling. Be it the Boxing day, be it the any other day, I always wanted to play Test cricket and I made my debut against South Africa in January this year. I made my (ODI) debut against Australia in 2016, so to play Test cricket here was a big deal for me. I am really happy to contribute to the team's success. My aim is to always focus on consistency. We train very hard and we are used to bowling a lot of overs in Ranji Cricket, so the body is doing well. My focus is on the next Test now. It was always a dream to play Test cricket and I was really happy when I debuted in South Africa. I started learning slowly, in England it was a different experience. Coming to Australia has been a different experience as well. The start has been good, and hopefully, I will keep getting better.
Kohli (2/2): He (Bumrah) was unlucky not to get wickets in Perth. The way he bowled, it was almost criminal that he didn't reap the rewards. The team management calmed him down and wickets for him came in bunches in this Test and he won us the Test match here at the MCG. I certainly feel proud as a captain to watch these guys bowling in partnerships, nobody is trying to outdo another guy, it's all about what the team wants and what the kind of breakthroughs team wants. That's why they are so special. Our first class cricket structure is amazing. The tough conditions with the new ball makes bowlers hard and bowling with the old ball proved to be a difference in this match. Mayank Agarwal was amazing, he showed great character. His composure was excellent. Pujara was brilliant too. No one is looking for a personal milestone. Vihari played out the first 15 overs against the new ball which was pretty helpful too. With Rohit making runs at number 6, it played out extremely well for us. It is all about taking pride in your roles which you're given. We have to play good cricket to be in the position we are in right now. Nothing is to going to distract us from wanting us to winning that last Test match. We have never been in this position and now is the time to express ourselves even more.
Virat Kohli, India captain (1/2): We are not going to stop here. This (win) will give us more confidence and we will play more positively in Sydney. I think we have been really smart in all the departments in the two matches that we have won. That is the reason we have at least retained the trophy but the job is not done yet. It's not finished at all. We want to win the last Test match as well, if an opportunity comes our way. We don't want to be complacent. We are all but ready for the final Test match. It's a good thing that I don't read any comments or what the opinions are. What matters is what we decide inside the dressing room as a team unit. We were pretty clear that we wanted to bat third on this pitch and wanted to get more runs as the pitch was only getting worse. I always felt the pitch had enough for the bowlers and a score around 400 will be extremely tough for Australia to chase down. The credit goes to our fast bowlers, especially Bumrah, he has been brilliant for us. The three seamers have broken a record for the highest number of wickets in a calendar year which is amazing for the pace trio.
Tim Paine, Australia captain: It's a bit disappointing. I thought we took a big stride forward in Perth but with an inexperienced batting line-up, you are bound to have an innings like we did in the first innings. We are going to learn from it. We are probably playing against the best pace attack in the world right now and our top-6 is pretty inexperienced. We should find positives and move forward. The guys are working really hard and we have a huge challenge ahead of us in Sydney. There is always little discussions around the batting order.The conditions will be different in Sydney. The pitch was very good (here at the MCG). After watching the wicket for the first two days, I knew that the pitch will crumble and it will be difficult to bat on. Full credit to India, they won the toss and batted on a pitch we weren't sure about. Pat (Cummins) has been superb all series. We all know that he is a quality player. He has been fantastic for us. He turns up every day and rolls his sleeves up. We want more guys to perform like him. It's been an interesting year, a difficult one for us. The silver lining is, in the next few months, some world-class players will be available to us again. And in the next few years we will see some benefits of what has happened but we are under no illusion that we will have to work extremely hard to draw this series and then Sri Lanka is coming which is not going to be easy either.
All that changed on Day 3, wickets tumbled and as many as 15 batsmen fell, Australia, thanks to a special spell from Bumrah, were rocked, bowled out for 151 - thereby conceding a first-innings lead of 292 runs. Follow-on beckoned, especially with rain forecast on Day 4 and 5. India resisted, were tormented by Pat Cummins, who finished with career-best haul with the ball and would later go on to resist with the bat as well, as a last-ditch effort to delay the inevitable. 399 was the target and Bumrah was in his elements once again, well supported by Ishant and Shami. Day 5 was all about patience after rain washed out the first-session, but India's tryst with destiny wasn't going to be spoiled.
Coming to the performances, it wasn't a one-man show. Mayank Agarwal and Hanuma Vihari, with only 4 caps between them were asked to open, replacing the incumbent pair. They lasted more than what the previous pair could do and having started on a positive start, India never really squandered the advantage. Mayank made 76 on debut, set the platform for Pujara and Kohli, and finally when the shutters were called at 443/7, Rohit had helped himself to a half-century. Still, on what seemed to be a docile track, pundits feared India had batted far too slowly and far too long to force a result.
The stumps are taken out as India retain the Border-Gavaskar Trophy. They decided against making Australia bat day before yesterday, despite the 292-run lead, took 8 wickets and then opted to take the extra half hour. Cummins and Lyon, though, denied them, then it was rain which kept Kohli and his team chewing nails in the first session. Play did eventually start after lunch and it needed 27 balls for the visitors to complete the formalities. Plenty of support from the crowd and the Indians acknowledge that as they lap around the ground. The team management has joined them and so has Ravi Shastri - the team coach. Kohli's men started 2018 with a harrowing loss in Cape Town and they have finished it with an emphatic victory at the MCG.
Harsha Bhogle: Great win. Memorable. The Border-Gavaskar Trophy stays in India.
Ishant to Lyon, out Caught by Pant!! All-over! India win by 137 runs and will go to Sydney with a 2-1 lead. This is also the 150th Test victory for the men in blue, making them the fifth team to do so. Jubilant scenes at the 'G', the Indian supporters are making merry, Kohli is chuffed to bits and you can't blame him. Coming to the ball, it was banged short and just outside off, was climbing onto Lyon who fancied the pull, gets a top-edge and Pant did the rest. Lyon c Pant b Ishant 7(50)
Ishant to Lyon, THATS OUT!! Caught!!
Milan: "Ishant Sharma hasn't done much in this series. He is surviving in the team because of Bumrah and Shami!"
| english |
<gh_stars>0
# System metrics
BFE has a variety of built-in metrics and supports multiple output formats, which can be obtained through monitor interfaces.
## Configuration
Set monitor port in the BFE core configuration file (conf/bfe.conf).
```
[server]
monitorPort = 8421
```
## Fetch metric categories
Visit the following address for a list of available metrics categories
```
http://<addr>:8421/monitor
```
## Fetch metric data
```
http://<addr>:8421/monitor/<category>
```
## Fetch metric data in specified format
Currently supported format of metrics:
* [prometheus](https://prometheus.io/)
* kv
* json (default)
Specify the format of the output like below:
```
http://<addr>:8421/monitor/proxy_state?format=prometheus
```
| markdown |
/**
@license
(C) Copyright Nuxeo Corp. (http://nuxeo.com/)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import './nuxeo-aggregate-data-element.js';
{
/**
* An element providing metrics on repository data.
*
* A `metrics` query is a configurable nested aggregation with 3 aggregation levels:
*
* - `grouped-by`: top level term aggregations (comma-separated values)
* - `with-*`: nested multi-bucket aggregation (with-ranges | with-date-intervals)
* - `metrics`: leaf single-value metrics aggregation (count, max, min, avg, sum)
*
* Filtering of the data is possible by using the document property helper attributes: `ecm-primary-type`,
* `ecm-lifecycle-state` or `ecm-mixin-type`
*
* It is also possible to use a `where` attribute which takes a list of clauses to include in query.
*
* Example:
*
* <nuxeo-repository-data ecm-primary-type="Note"
* where='[{"range": {"dc:created": {"gte": startDate, "lte": endDate}}}]'
* grouped-by="dc:creator"
* data="{{data}}">
* </nuxeo-repository-data>
*
* The previous example would produce a query like:
*
* {
* query: {
* bool: {
* must:[
* {term: {"ecm:primaryType": "File"}}, // ecm-primary-type
* {"range": {"dc:created": {"gte": start, "lte": end}}} // where
* ]
* }
* }
* aggs: {
* by: { // grouped-by
* terms: {
* field: "dc:creator"
* }
* }
* }
* }
*
* @memberof Nuxeo
* @demo demo/repository.html
*/
class RepositoryData extends Nuxeo.AggregateDataElement {
static get is() {
return 'nuxeo-repository-data';
}
static get properties() {
return {
index: {
type: String,
value: 'nuxeo',
},
/**
* Date field to use
*/
dateField: {
type: String,
value: 'dc:created',
},
// Document property filter terms helpers
/**
* Filter by ecm:primaryType`
*/
ecmPrimaryType: {
type: String,
value: '',
},
/**
* Filter by ecm:lifecycleState`
*/
ecmLifecycleState: {
type: String,
value: '',
},
/**
* Filter by ecm:mixinType`
*/
ecmMixinType: {
type: String,
value: '',
},
};
}
static get observers() {
return [
'_query(ecmPrimaryType, ecmLifecycleState, ecmMixinType, where, startDate, endDate)',
'_aggregates(groupedBy, groupLimit, withRanges, withDateIntervals, metrics, metricsOperator, startDate, endDate)', // eslint-disable-line max-len
];
}
_query() {
// TODO: clone our query to allow setting it explicitly as well
const terms = [];
// push document properties terms
if (this.ecmPrimaryType) {
terms.push({ terms: { 'ecm:primaryType': this._splitTerms(this.ecmPrimaryType) } });
}
if (this.ecmLifecycleState) {
terms.push({ terms: { 'ecm:currentLifeCycleState': this._splitTerms(this.ecmLifecycleState) } });
}
if (this.ecmMixinType) {
terms.push({ terms: { 'ecm:mixinType': this._splitTerms(this.ecmMixinType) } });
}
// filter by date (dc:created by default)
if (this._dateRange) {
terms.push(this._dateRange);
}
this.query = this._buildTerms(terms);
}
_splitTerms(terms) {
if (terms) {
return terms.split(',').map((t) => t.trim());
}
}
}
customElements.define(RepositoryData.is, RepositoryData);
Nuxeo.RepositoryData = RepositoryData;
}
| javascript |
<reponame>guillermo-delgado-revature/Poke_Loot
import { Injectable } from '@angular/core';
import { HttpClient } from "@angular/common/http";
import { Observable, throwError } from 'rxjs';
import { Router } from '@angular/router';
import { environment } from 'src/environments/environment';
import { IComment } from './Models/IComment';
@Injectable({
providedIn: 'root'
})
export class DisplayServiceService {
private url = `${environment.urlmain}DisplayBoard`;
//private url: string = '';
private localurl = `${environment.urlmainlocalonly}EditPrice/`;
private urltobuy = `${environment.urlmain}buyCard/`;
private fullPosturl = `${environment.urlmain}FullPostById/`;
private postCommentsurl = `${environment.urlmain}Comments/`;
private newCommenturl = `${environment.urlmain}PostComment/`;
constructor( private router:Router, private http:HttpClient) { }
DisplayBoard():Observable<any[]>{
return this.http.get<any>(this.url);
}
getBuyCard(postId: number, userId: string):Observable<any>{
let newUrl = this.urltobuy + postId + '/' + userId + '/';
return this.http.get<any>(newUrl);
}
editPost(postId: number, newPrice: string):Observable<boolean>{
let newUrl = this.localurl + postId + '/' + newPrice + '/';
return this.http.get<any>(newUrl);
}
// Gets all the info needed to build a full post for the Post Comments component
FullPost(postId : number):Observable<any>{
console.log("PostId Path:" + this.fullPosturl + postId);
return this.http.get<any>(this.fullPosturl + postId);
}
// Gets all the comments for a Post by Id for the Post Comments component
PostComments(postId : number):Observable<any[]>{
return this.http.get<any>(this.postCommentsurl + postId);
}
// Generates a new comment object for the post and user being userd for the Post Comments component
NewComment(userId : string, postId : number, content : string):Observable<any>{
let status = this.http.get<any>(this.newCommenturl + userId + '/' + postId + '/' + encodeURI(content));
return status;
}
}
| typescript |
package main
import "fmt"
// overwritten at build time
var gitCommit = "unknown"
const dnsnameVersion = "1.4.0-dev"
func getVersion() string {
return fmt.Sprintf(`CNI dnsname plugin
version: %s
commit: %s`, dnsnameVersion, gitCommit)
}
| go |
Seven cities in Gujarat and Maharashtra have the maximum number of mobile gamers, a report by the UK-based data firm Opensignal has revealed. According to the report published Tuesday, out of 48 cities whose mobile network experience was analysed, Ahmedabad topped the list with a score of 71. 7 out of 100. The company explains that the score measures how “users perceive real-time multiplayer mobile gaming on cellular networks. "
Next in line is Navi Mumbai with a score of 70. 1 out of 100 followed by Vadodara (69. 8), Surat (68), Bhopal (67. 8), Mumbai (67. 8), Gwalior (67. 7), Indore (67. 7), Thane (65. 7), and Rajkot (64. 3). Other big Indian cities like Delhi, Bangalore, and Kolkata attained a score of 59. 8, 61. 3, and 57. 2, respectively. Cities like Varanasi and Thiruvananthapuram scored the least with points below 50. Opensignal further explains that mobile gaming in India has “risen exponentially" with the introduction of affordable smartphones, low-cost data, and improved Internet bandwidth. Notably, online mobile gaming is also reaching Tier 2 and Tier 3 cities widely due to similar factors.
The report also highlights that good gaming experience depends on three factors: UDP (User Datagram Protocol) Latency, Packet Loss, and Jitter. The UDP characterises the responsiveness of the network connection, that means that lower latencies in the Internet connectivity improve reaction times of players in action games, especially battle royale games like PUBG Mobile(banned in India), Call of Duty, and more. Packet loss denotes the amount of data packets that never reach their destination while Jitter characterises as “the variability of the arrival time of data packets. "
Meanwhile, a data analytics firm that tracks the growth and revenue of mobile apps, App Annie estimates that the mobile games market In India is currently worth $1. 1 billion with the number of users projected to reach roughly 62 crores by this year. Earlier in August, a report by Sensor Tower showed that spending in mobile games increased by 27 per cent year-over-year in the second quarter of 2020 to $19. 3 billion even as game downloads in India increased by nearly one billion during the same period amid the COVID-19 pandemic. | english |
<reponame>jburz/burger-tracker
//require pacakages and files
const orm = require("../config/orm.js");
//define object for burger
const burger = {
all: function (cb) {
orm.selectAll("burgers", function (res) {
cb(res);
});
},
add: function (name, cb) {
orm.insertOne("burgers", name, function (res) {
cb(res);
});
},
update: function (objColVals, condition, cb) {
orm.updateOne("burgers", objColVals, condition, function (res) {
cb(res);
});
}
}
//Export burger model for burgers_conroller.js to use
module.exports = burger; | javascript |
<reponame>scripting/Scripting-News
{
"text": "New version of \"LO2\" this morning with a few minor <a href=\"http://this.how/littleoutliner/versions.opml#1594474061000\">fixes</a>. As before if you spot problems, please report them <a href=\"https://github.com/scripting/Scripting-News/issues/181\">here</a>. ",
"created": "Sat, 11 Jul 2020 14:03:20 GMT",
"type": "outline"
} | json |
{"date":"1993-02-21","platform":"OVA","images":{"small":"https://lain.bgm.tv/pic/cover/s/0d/78/13549_rpMTD.jpg","grid":"https://lain.bgm.tv/pic/cover/g/0d/78/13549_rpMTD.jpg","large":"https://lain.bgm.tv/pic/cover/l/0d/78/13549_rpMTD.jpg","medium":"https://lain.bgm.tv/pic/cover/m/0d/78/13549_rpMTD.jpg","common":"https://lain.bgm.tv/pic/cover/c/0d/78/13549_rpMTD.jpg"},"summary":"1993年から1994年にかけて全5巻が制作・発売された。第5話は最終回で想定したストーリーと原作者本人が語っている。なお、アメリカで発売されたレーザーディスク版は両面で完全英語版と完全日本語版の全く同じものが収録されていた(ただし、日本語版のオープニングとエンディングのスタッフロールなどのキャプションは日本版と異なる)。","name":"ああっ女神さまっ OVA","name_cn":"我的女神 OVA","tags":[{"name":"OVA","count":95},{"name":"我的女神","count":62},{"name":"AIC","count":44},{"name":"1993","count":34},{"name":"漫画改","count":23},{"name":"永远的17岁","count":21},{"name":"恋爱","count":16},{"name":"天降系","count":15},{"name":"井上喜久子","count":13},{"name":"纯情","count":11},{"name":"合田浩章","count":9},{"name":"后宫","count":8},{"name":"藤岛康介","count":8},{"name":"漫改","count":7},{"name":"补旧番","count":5},{"name":"日本动画","count":4},{"name":"松原秀典","count":4},{"name":"治愈","count":4},{"name":"90年代","count":3},{"name":"动画","count":3},{"name":"日本","count":3},{"name":"1993年","count":2},{"name":"天降软妹","count":2},{"name":"奇幻","count":2},{"name":"搞笑","count":2},{"name":"本田雄","count":2},{"name":"童年的经典","count":2},{"name":"90~94年","count":1},{"name":"中庸","count":1},{"name":"情感片","count":1}],"infobox":[{"key":"中文名","value":"我的女神 OVA"},{"key":"话数","value":"5"},{"key":"发售日","value":"1993年2月21日"},{"key":"开始","value":"1993年2月21日"},{"key":"结束","value":"1994年5月17日"},{"key":"导演","value":"合田浩章"},{"key":"人物设定","value":"松原秀典"}],"rating":{"rank":1029,"total":313,"count":{"1":0,"2":0,"3":1,"4":1,"5":6,"6":32,"7":128,"8":103,"9":30,"10":12},"score":7.5},"total_episodes":5,"collection":{"on_hold":24,"dropped":21,"wish":208,"collect":501,"doing":14},"id":13549,"eps":5,"volumes":0,"locked":false,"nsfw":false,"type":2} | json |
Even as some economists have been suggesting a fiscal stimulus package to boost India’s slowing economy, NITI Aayog Vice Chairman Rajiv Kumar on Wednesday was quoted as saying that he supported increased government spending in key sectors with the aim of galvanising consumer demand. Kumar told Reuters that there would be no harm in relaxing the fiscal deficit target of 3.2% of the GDP set in the budget for this year if it helped the economy. The fiscal deficit refers to government spending in excess of its revenues.
But is the government in a position to put together an effective package?
Suyash Rai, a senior consultant at the National Institute of Public Finance and Policy, a research institution, said that the fiscal deficit target set by each government at the time of presenting the Budget is usually pegged to its expectation of growth rates during that year. If the economy does not grow fast enough, the fiscal deficit target would have to come down.
that is, without taking inflation into account. However, the economy grew by only 9.3% in the first quarter.
A high fiscal deficit could have several adverse effects, economists warn. If a government spends more than the revenue it collects, it must borrow money from the market. But large borrowings increase interest rates for private investors and crowd out private investment.
Already, the government’s ability to frame an effective stimulus package seems limited, consider the data on how and where the administration has spent its resources this year and how much revenue it is likely collect, observers say. This was reinforced on Tuesday with news that revenues collected by way of the Goods and Services Tax were just a little lower in August than they were in July.
As per the latest data, the government has already spent more than Rs 5 lakh crore over and above its total revenue receipts by July. The government’s target for the fiscal year ending March 2018 was to limit fiscal deficit to Rs 5.46 lakh crore. But in the first four months, it has already spent 92.4% of the amount it intended to spend in the entire year. Last year, by this point, 73.7% of the fiscal deficit target had been reached.
Much of the fiscal deficit has arisen from soaring revenue expenditure, such as on salaries of employees, interest payments and pensions. For instance, the government spent Rs 7.13 lakh crore in revenue expenditure, on items such as salaries of employees, interest payments and pensions by July 2017. This is 38.8% of the total budget of Rs 18.37 lakh crore for the whole year. In comparison, 33.8% of the budgeted revenue expenditure was spent by July last year.
Such revenue expenditure contributes less to cycles of economic growth than capital expenditure, which makes long-term investments in the economy, such as putting money in big projects and funding infrastructure under various ministries. This helps create jobs and further income growth. Capital expenditure in July stood at 30.8% of the allocated budget for the full year. In the corresponding period last year, the figure stood at 28.9%.
It is important to note that this year, the Union Budget was advanced by almost a month. It was presented on February 1 instead of February 29 as had been the practice. This enabled the government to spend higher amounts in the first quarter of the financial year starting April.
This “front-loading” of expenditure means that the government spent more money early in the year to discharge its liabilities even as it is yet to receive money in the form of tax and non-tax revenues from disinvestment, spectrum auctions and such avenues.
A scrutiny of this year’s Budget makes it clear that, political rhetoric aside, the government did not actually expect its revenues to increase substantially. The government gets revenues from tax and non-tax avenues. Tax receipts include income tax, wealth tax and corporation tax. Non-tax receipts include disinvestment and dividends from entities such as the Reserve Bank of India or the sale of national assets like the rights to use telecom spectrum.
In the Budget for this financial year, the government actually provided for a decrease in non-tax revenues by Rs 46,013 crore, about 13% less than what it earned in 2016-’17 as per the revised estimates of the Budget. This implies a realistic target for disinvestment of government-owned companies and lower expectations from the sale of additional spectrum. For instance, the government had not talked about selling Air India by the time the Budget was presented and now even a partial sale looks out of question in the short run. Last year, the government had received Rs 70,970 crore in non-tax revenue in August alone.
Tax-based revenues for 2017-’18 too have been budgeted for a lower than expected growth rate. This seems at odds with the enthusiasm with which the government has spoken of achieving high economic growth, especially with its demonetisation decision in November and the implementation of the Goods and Services Tax in July. The government expects to collect Rs 12 lakh crore in tax revenues this year, 12.7% more than last year. By comparison, tax revenues had grown by 15.36% last year without GST and demonetisation.
Tax collections are directly dependent on economic growth as people are likely to pay more taxes when their incomes rise. If the economy doesn’t grow fast enough, Sen added, the fiscal deficit will only widen.
If revenues are not on target, it will hamper the government’s ability to frame a stimulus package. Rai of the National Institute of Public Finance and Policy argued that a small package may not be adequate to jumpstart India’s Rs 150 lakh crore economy. On the other hand, a bigger stimulus package could undo the progress on fiscal consolidation to reduce the deficit. “We need a fiscal stimulus that’s big enough to make an impact but it needs careful planning to ensure that it is not just revenue expenditure that goes waste and doesn’t build capacity,” he said.
| english |
<reponame>HiveTechies/django-star-ratings
/* line 3, ../sass/star-ratings.scss */
.star-ratings {
display: inline-block;
position: relative;
}
/* line 7, ../sass/star-ratings.scss */
.star-ratings ul {
padding: 0;
margin: 0;
white-space: nowrap;
list-style: none outside none;
overflow: hidden;
}
/* line 14, ../sass/star-ratings.scss */
.star-ratings ul li {
display: inline-block;
}
/* line 20, ../sass/star-ratings.scss */
.star-ratings-rating-full, .star-ratings-rating-empty {
display: block;
background: url("/static/star-ratings/images/stars.png") no-repeat;
border: 0;
}
/* line 26, ../sass/star-ratings.scss */
.star-ratings-rating-foreground {
top: 0;
position: absolute;
-moz-transition-property: width;
-o-transition-property: width;
-webkit-transition-property: width;
transition-property: width;
-moz-transition-duration: 0.15s;
-o-transition-duration: 0.15s;
-webkit-transition-duration: 0.15s;
transition-duration: 0.15s;
-moz-transition-timing-function: ease-in;
-o-transition-timing-function: ease-in;
-webkit-transition-timing-function: ease-in;
transition-timing-function: ease-in;
}
/* line 34, ../sass/star-ratings.scss */
.star-ratings-rating-stars-container {
display: inline-block;
position: relative;
}
/* line 39, ../sass/star-ratings.scss */
.star-ratings-clear-hidden {
display: none;
}
| css |
{
"body": "I am using the Intel compilers and have `cflags: -gcc-name=/.../gcc/.../bin/gcc` etc, in my compilers.yaml for it to use the GCC frontend because Intel can't afford a frontend or whatever. When I build something like OpenMPI and the MPI wrappers get used by dependent packages, these flags don't propagate. Therefore my first guess is that I would like to do something like this in the OpenMPI package:\r\n\r\n```\r\n '--with-wrapper-cflags=%s' % self.compiler.cflags,\r\n '--with-wrapper-cxxflags=%s' % self.compiler.cxxflags,\r\n '--with-wrapper-fcflags=%s' % self.compiler.fflags\r\n```\r\n\r\nThe problem is `self.compiler.cxxflags` doesn't exist for example. Is it possible to find the flags from the compiler configuration in the package file? Or is this a bad idea? Or should this already be happening inside Spack's compiler wrappers by default?\r\n\r\nNote: My solution may be to list the GCC module on my system instead of using flags for GCC emulation, which appears to work for getting GCC emulation in the OpenMPI wrappers, but loading the GCC module on my system each compiler invocation causes linking errors in other cases for whatever reason.",
"user": "jrood-nrel",
"url": "https://api.github.com/repos/spack/spack/issues/2528",
"updated_at": "2018-06-19 22:24:59",
"created_at": "2016-12-08 23:24:34",
"closed_at": "2018-06-19 22:24:59",
"state": "closed",
"title": "Propagating compiler flags into MPI wrappers",
"number": 2528,
"milestone": null,
"labels": [],
"id": 194471993,
"html_url": "https://github.com/spack/spack/issues/2528",
"assignees": [],
"comments": 8
} | json |
import { WithUid } from "../../models/common-models";
import { Order } from "../../models/order-models";
import React, { useEffect, useState } from "react";
import { Company } from "../../models/company-models";
import usePricedProducts from "../../hooks/use-priced-products";
import { log } from "../../util/logging-config";
import { OrderRow } from "./OrderRow";
import { CompanyData } from "../../hooks/use-company-data";
import { UseSingleOrder } from "../../hooks/use-single-order";
import { OrderLineItems } from "./OrderLineItems";
import { UseOrders } from "../../hooks/use-orders";
export function ExpandableOrderRow(props: { orders: UseOrders, order: WithUid<Order>, companies: CompanyData, singleOrder: UseSingleOrder }) {
const [open, setOpen] = useState(props.order?.data?.orderNumber === props.singleOrder.document.data.orderNumber);
const company: WithUid<Company> = props.companies.companyForUid(props.order?.data?.companyId);
const pricedProducts = usePricedProducts(company);
const toggleOpen = () => setOpen(!open);
useEffect(() => {
log.debug("ExpandableOrderRow:initial render:open", open);
}, []);
return (
<>
<OrderRow useOrders={props.orders} open={open} order={props.order} company={company}
pricedProducts={pricedProducts}
toggleOpen={toggleOpen} singleOrder={props.singleOrder}/>
<OrderLineItems open={open} order={props.order} company={company} pricedProducts={pricedProducts}
singleOrder={props.singleOrder}/>
</>
);
}
| typescript |
package com.binance.client.examples.websocket;
import com.alibaba.fastjson.JSONObject;
import com.binance.client.SubscriptionClient;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.concurrent.atomic.AtomicInteger;
public class SubscribeBookDepth {
public static void main(String[] args) {
SubscriptionClient client = SubscriptionClient.create();
AtomicInteger count = new AtomicInteger();
File f = new File("/Users/fuyafeng/IdeaProjects/Binance_Futures_Java/tmp/SubscribeBookDepth1000shibusdt.txt");
Writer w = null;
try {
w = new FileWriter(f,true);
} catch (IOException e) {
e.printStackTrace();
}
Writer finalW = w;
client.subscribeBookDepthEvent("1000shibusdt", 20, ((event) -> {
count.getAndIncrement();
String writedStr = "第"+count.get()+"条:"+ JSONObject.toJSON(event) +"\n";
try {
finalW.append(writedStr);
} catch (IOException e) {
e.printStackTrace();
}
}), null);
}
}
| java |
<reponame>ChenFengYe/relightable-nr
import torch
from torch import nn
import torch_geometric as tg
from .torch_nn import MLP
from .torch_edge import DilatedKnnGraph
class MRConv(nn.Module):
"""
Max-Relative Graph Convolution (Paper: https://arxiv.org/abs/1904.03751)
"""
def __init__(self, in_channels, out_channels, act_type='relu', norm_type=None, bias=True, aggr='max'):
super(MRConv, self).__init__()
self.nn = MLP([in_channels*2, out_channels], act_type, norm_type, bias)
self.aggr = aggr
def forward(self, x, edge_index):
""""""
x_j = tg.utils.scatter_(self.aggr, torch.index_select(x, 0, edge_index[0]) - torch.index_select(x, 0, edge_index[1]), edge_index[1])
return self.nn(torch.cat([x, x_j], dim=1))
class EdgConv(tg.nn.EdgeConv):
"""
Edge convolution layer (with activation, batch normalization)
"""
def __init__(self, in_channels, out_channels, act_type='relu', norm_type=None, bias=True, aggr='max'):
super(EdgConv, self).__init__(MLP([in_channels*2, out_channels], act_type, norm_type, bias), aggr)
def forward(self, x, edge_index):
return super(EdgConv, self).forward(x, edge_index)
class GraphConv(nn.Module):
"""
Static graph convolution layer
"""
def __init__(self, in_channels, out_channels, conv_type='edge',
act_type='relu', norm_type=None, bias=True):
super(GraphConv, self).__init__()
if conv_type == 'edge':
self.gconv = EdgConv(in_channels, out_channels, act_type, norm_type, bias)
elif conv_type == 'mr':
self.gconv = MRConv(in_channels, out_channels, act_type, norm_type, bias)
def forward(self, x, edge_index):
return self.gconv(x, edge_index)
class DynConv(GraphConv):
"""
Dynamic graph convolution layer
"""
def __init__(self, in_channels, out_channels, kernel_size=9, dilation=1, conv_type='edge', act_type='relu',
norm_type=None, bias=True, stochastic=False, epsilon=1.0, knn_type='matrix'):
super(DynConv, self).__init__(in_channels, out_channels, conv_type, act_type, norm_type, bias)
self.k = kernel_size
self.d = dilation
self.dilated_knn_graph = DilatedKnnGraph(kernel_size, dilation, stochastic, epsilon, knn_type)
def forward(self, x, batch=None):
edge_index = self.dilated_knn_graph(x, batch)
return super(DynConv, self).forward(x, edge_index)
class ResDynBlock(nn.Module):
"""
Residual Dynamic graph convolution block
:input: (x0, x1, x2, ... , xi), batch
:output:(x0, x1, x2, ... , xi ,xi+1) , batch
"""
def __init__(self, channels, kernel_size=9, dilation=1, conv_type='edge', act_type='relu', norm_type=None,
bias=True, stochastic=False, epsilon=1.0, knn_type='matrix'):
super(ResDynBlock, self).__init__()
self.body = DynConv(channels, channels, kernel_size, dilation, conv_type,
act_type, norm_type, bias, stochastic, epsilon, knn_type)
# input: (x0, x1, x2, ..., xi); (xi-1, xi), output is (xi, xi+1)
def forward(self, x, batch):
return self.body(x, batch) + x, batch
class DenseDynBlock(nn.Module):
"""
Dense Dynamic graph convolution block
"""
def __init__(self, channels, kernel_size=9, dilation=1, conv_type='edge', act_type='relu', norm_type=None,
bias=True, stochastic=False, epsilon=1.0, knn_type='matrix'):
super(DenseDynBlock, self).__init__()
self.body = DynConv(channels*2, channels, kernel_size, dilation, conv_type,
act_type, norm_type, bias, stochastic, epsilon, knn_type)
def forward(self, x, batch):
dense = self.body(batch)
return torch.cat((x, dense), 1), batch
| python |
<filename>json/XYLAN-FWCONF-MIB.json<gh_stars>1-10
{
"imports": {
"class": "imports",
"SNMPv2-CONF": [
"MODULE-COMPLIANCE",
"NOTIFICATION-GROUP"
],
"SNMPv2-SMI": [
"MODULE-IDENTITY",
"NOTIFICATION-TYPE",
"OBJECT-IDENTITY",
"Bits",
"Counter64",
"Unsigned32",
"TimeTicks",
"IpAddress",
"OBJECT-TYPE",
"Gauge32",
"MibIdentifier",
"Integer32",
"iso",
"Counter32"
],
"SNMPv2-TC": [
"TEXTUAL-CONVENTION",
"DisplayString"
],
"XYLAN-BASE-MIB": [
"xylanFwArch"
]
},
"xylanFwConfig": {
"name": "xylanFwConfig",
"oid": "1.3.6.1.4.1.800.2.12.1",
"class": "objectidentity"
},
"xylanFwStatus": {
"name": "xylanFwStatus",
"oid": "1.3.6.1.4.1.800.192.168.3.11",
"nodetype": "scalar",
"class": "objecttype",
"syntax": {
"type": "INTEGER",
"class": "type",
"constraints": {
"enumeration": {
"enabled": 1,
"disabled": 2
}
}
},
"maxaccess": "read-write",
"status": "mandatory",
"description": "This variable displays the current status of the firewall module. The value 'enabled' denotes that the Firewall is active; 'disabled' disables the firewall module."
},
"xylanFwMode": {
"name": "xylanFwMode",
"oid": "1.3.6.1.4.1.800.172.16.58.3",
"nodetype": "scalar",
"class": "objecttype",
"syntax": {
"type": "INTEGER",
"class": "type",
"constraints": {
"enumeration": {
"blocked": 1,
"open": 2
}
}
},
"maxaccess": "read-write",
"status": "mandatory",
"description": "The default switch interface mode. If neither the Primary manager nor the secondary manager can be reached, this value dictates how packets are handled. The value 'blocked' indicates that all packets are blocked and the value 'open' indicates that all packets are allowed."
},
"xylanFwPrimaryAddr": {
"name": "xylanFwPrimaryAddr",
"oid": "1.3.6.1.4.1.800.172.16.58.3",
"nodetype": "scalar",
"class": "objecttype",
"syntax": {
"type": "IpAddress",
"class": "type"
},
"maxaccess": "read-write",
"status": "mandatory",
"description": "The Primary manager's IP address."
},
"xylanFwPrimaryPassword": {
"name": "xylanFwPrimaryPassword",
"oid": "1.3.6.1.4.1.800.192.168.127.12",
"nodetype": "scalar",
"class": "objecttype",
"syntax": {
"type": "DisplayString",
"class": "type",
"constraints": {
"size": [
{
"min": 0,
"max": 8
}
]
}
},
"maxaccess": "read-write",
"status": "mandatory",
"description": "The Primary manager's skey password. When read, xylanFwPrimaryPassword always returns an Octet String of length zero."
},
"xylanFwBackupAddr": {
"name": "xylanFwBackupAddr",
"oid": "1.3.6.1.4.1.800.172.16.17.32",
"nodetype": "scalar",
"class": "objecttype",
"syntax": {
"type": "IpAddress",
"class": "type"
},
"maxaccess": "read-write",
"status": "mandatory",
"description": "The Backup manager's IP address."
},
"xylanFwBackupPassword": {
"name": "xylanFwBackupPassword",
"oid": "1.3.6.1.4.1.800.2.12.1.6",
"nodetype": "scalar",
"class": "objecttype",
"syntax": {
"type": "DisplayString",
"class": "type",
"constraints": {
"size": [
{
"min": 0,
"max": 8
}
]
}
},
"maxaccess": "read-write",
"status": "mandatory",
"description": "The Backup manager's skey password. When read, xylanFwBackupPassword always returns an Octet String of length zero."
},
"meta": {
"comments": [
"ASN.1 source file:///Users/neermitt/kusanagi/mibs.snmplabs.com/asn1/XYLAN-FWCONF-MIB",
"Produced by pysmi-0.3.4 at Fri May 24 22:40:47 2019",
"On host NEERMITT-M-J0NV platform Darwin version 18.6.0 by user neermitt",
"Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) "
],
"module": "XYLAN-FWCONF-MIB"
}
} | json |
{
"name": "@vis-tree/core",
"version": "0.1.7",
"description": "main logic of vis-tree",
"author": "aadonkeyz <<EMAIL>>",
"homepage": "https://bytedance.github.io/vis-tree/",
"repository": {
"type": "git",
"url": "https://github.com/bytedance/vis-tree/tree/main/packages/vis-tree-core"
},
"keywords": [
"visualization",
"data-visualization",
"tree",
"typescript"
],
"license": "MIT",
"module": "lib/index.js",
"types": "lib/index.d.ts",
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
"scripts": {
"build": "tsc -p tsconfig.json --declaration true --emitDeclarationOnly true --outDir lib && rollup -c",
"test": "jest"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^10.0.0",
"@rollup/plugin-typescript": "^6.1.0",
"@typescript-eslint/eslint-plugin": "^4.7.0",
"@typescript-eslint/parser": "^4.7.0",
"eslint": "^7.13.0",
"eslint-config-airbnb-typescript": "^12.0.0",
"eslint-config-prettier": "^6.15.0",
"jest": "^26.6.3",
"rollup": "^2.33.1",
"typescript": "4.0.5"
},
"prettier": {
"arrowParens": "always",
"singleQuote": true,
"trailingComma": "all"
}
}
| json |
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11, c++14
// <variant>
// template <class T, class... Types>
// constexpr bool holds_alternative(const variant<Types...>& v) noexcept;
#include "test_macros.h"
#include <variant>
int main() {
{
using V = std::variant<int>;
constexpr V v;
static_assert(std::holds_alternative<int>(v), "");
}
{
using V = std::variant<int, long>;
constexpr V v;
static_assert(std::holds_alternative<int>(v), "");
static_assert(!std::holds_alternative<long>(v), "");
}
{ // noexcept test
using V = std::variant<int>;
const V v;
ASSERT_NOEXCEPT(std::holds_alternative<int>(v));
}
}
| cpp |
{
"puppet_task_version": 1,
"description": "A test task to learn how param type of Boolean passes to a PowerShell switch.",
"input_method": "powershell",
"parameters": {
"reboot": {
"description": "Do we want to reboot the system",
"type": "Optional[Boolean]"
},
"mybool": {
"description": "Do we want to bool the system",
"type": "Optional[Boolean]"
}
}
}
| json |
<gh_stars>1-10
{
"id": 10609,
"width": 15,
"height": 17,
"x": -55,
"y": 6,
"cells": "HhaaeaaaaaHhaaeaaaaaHhaaeaaaaaHhaaeaaaaaHhaaeaaaaaHhaaeaaaaaHhaaeaaaaaHhaaeaaaaaHhaaeaaaaaHhaaeaaaaaHhaaeaaaaaHhaaeaaa6aHhaaeaaa6bHhaaeaaa6aHhaaeaaaaaHhaaeaaaaaHhaaeaaaaaHhGaeaaa6cHhGaeaaaaaHhGaeaaaaaHhIKeaaa_4HhIKeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaa6eHhaaeaaa9YHhGaeaaa6bHhGaeaaa6bHhGaeaaa6aHhaaeaaaaaHhaae-DaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaa6eHhGaeaaa6eHhGaeaaa6aHhGaeaaa6aHhGaeaaa6aHhaaeaaaaaHhaaeaaaaaHhaaeaaa6aHhGaeaaaaaHhGaeaaaaaHhaaeaabbCHhGaeaaaaaHhGaeaaaaaHhaaeaabbCHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaa6cHhGaeaabbHGhaaeaabb0HhaaeaaaaaHhaaeaaaaaHhGaeaaa6cHhGaeaaaaaHhaaeaafbDHhaaeaabbDHhGaeaaaaaHhaaeaafbDHhaaeaabbDHhGaeaaaaaHhGaeaaaaaHhGaeaaa6cHhGaeaaa6bHhGaeaaa6cHhaaeaaaaaGhaaeaabbPHhaae-DaaaHhGaeaaaaaHhaaeaafbDHhQKeaaaaaHhaaeaabbDHhaaeaafbDHhQKeaaaaaHhaaeaabbDHhGaeaabbHHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaa6fHhaaeaaaaaHhaaeaaa6bHhGaeaaaaaHhaaeaafbDHhOaeaaaaaHhQKeaaaaaHhaaeaabbCHhQKeaaaaaHhQKeaaaaaHhaaeaabbDHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaabboHhaaeaaaaaHhaaeaaa6aHhGaeaaaaaHhaaeaafbDHhQKeaaaaaHhQKeaaaaaHhQKeaaaaaHhQJeaaaaaHhQJeaaaaaHhQKeaaaaaHhaaeaabbDHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhaaeaaaaaHhGaeaaaaaHhaaeaafbDHhOaeaaaaaHhQJeaaaaaHhOaeaaaaaHhQKeaaaaaHhOaeaaaaaHhQJeaaaaaHhQKeaaaaaHhaaeaabbDHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhaaeaaaaaHhGaeaaaaaHhaaeaabbCHhQKeaaaaaHhQJeaaaaaHhQJeaaaaaHhOaeaaaaaHhQJeaaaaaHhQKeaabboHhQJeaaaaaHhQKeaaaaaHhaaeaabbDHhGaeaaaaaHhGaeaaaaaHhIKeaaaaaGhaaeaaa9XHhGaeaaaaaHhaaeaabbDHhOaeaaaaaHhQJeaaaaaHhQKeaaaaaHhQJeaaaaaHhQKeaaaaaHhQKeaabboHhQJeaaaaaHhOaeaaaaaHhaaeaabbDHhGaeaaaaaHhGaeaaaaaHhaaeaaaaaHhGaeaaaaaHhGaeaaaaaHhaaeaabbDHhQKeaaaaaHhOaeaaaaaHhQJeaaaaaHhOaeaaaaaHhOaeaaaaaHhQJeaaaaaHhOaeaaaaaHhQKeaaaaaHhaaeaabbDHhGaeaaaaaHhIKeaaa_4HhaaeaaaaaHhGaeaaaaaHhGaeaaaaaHhaaeaabbDHhQKeaaaaaHhQKeaaaaaHhQKeaaaaaHhQKeaaaaaHhQKeaaaaaHhQKeaaaaaHhQKeaaaaaHhQKeaaaaaHhaaeaabbDHhGaeaaaaaHhcKeaaaaaHhGaeaaaaaHhGaeaaa93HhGaeaaaaaHhaaeaabbDHhQKeaaaaaHhOaeaaaaaHhOaeaaaaaHhQKeaaaaaHhQKeaaaaaHhQJeaaaaaHhOaeaaaaaHhQKeaaaaaHhaaeaabbCHhIKeaaaaaHhaaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhaaeaabbDHhQKeaaaaaHhQKeaaaaaHhQKeaaaaaHhQKeaaaaaHhQJeaaaaaHhQKeaaaaaHhQKeaaaaaHhaaeaafbDHhGaeaaaaaHhaaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhaaeaabbCHhQKeaaaaaHhQKeaaaaaHhOaeaaaaaHhQKeaaaaaHhQKeaaaaaHhQKeaaaaaHhaaeaafbDHhGae-DaaaHhIKeaaaaaHhaaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhaaeaafbDHhQJeaaaaaHhQKeaaaaaHhQKeaaaaaHhOaeaaaaaHhQKeaaaaaHhOaeaaaaaHhaaeaabbCGhaaeaabbFHhGaeaaaaaHhaaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhaaeaafbDHhQKeaaaaaHhOaeaaaaaHhQJeaaaaaHhQJeaaaaaHhQJeaaaaaHhQKeaaaaaHhQKeaaaaaHhaaeaabbDHhGaeaaaaaHhGaeaaaaaHhaaeaaaaaHhGaeaaaaaHhGaeaaaaaHhaaeaabbDHhOaeaaaaaHhQJeaaaaaHhQJeaaaaaHhOaeaaaaaHhQJeaaaaaHhQJeaaaaaHhQJeaaaaaHhQJeaaaaaHhaaeaabbDHhGaeaaaaaHhcKeaaaaaHhIKeaaa_4HhGaeaaaaaHhaaeaabbDHhOaeaaaaaHhQKeaaaaaHhQKeaaaaaHhQKeaaaaaHhQKeaaaaaHhQJeaaaaaHhQKeaaaaaHhQJeaaaaaHhQKeaaaaaHhaaeaabbCHhIKeaaaaaHhaaeaaaaaHhGaeaaaaaHhaaeaabbDHhOaeaaaaaHhQKeaaaaaHhQKeaaaaaHhQJeaaaaaHhQKeaaaaaHhOaeaaaaaHhQJeaaaaaHhQJeaaaaaHhQKeaaaaaHhaaeaafbDHhGaeaaaaaHhaaeaaaaaHhIKeaaaaaHhaaeaabbCHhOaeaaaaaHhOaeaaaaaHhQKeaaaaaHhQKeaabboHhQKeaaaaaHhQKeaaaaaHhQKeaaaaaHhQJeaaaaaHhQKeaaaaaHhiaeaahPVHhGaeaaaaaHhGaeaaaaaHhaaeaaaaaHhGaeaaaaaHhaaeaabbDHhOaeaaaaaHhQKeaaaaaHhQJeaaaaaHhQKeaaaaaHhQKeaaaaaHhQKeaaaaaHhQJeaaaaaHhQKeaaaaaHhaaeaafbDHhGaeaaaaaHhIKeaaaaaHhaaeaaaaaHhGaeaaa6fGhaae-DbbYHhaaeaabbDHhOaeaaaaaHhQKeaaaaaHhQKeaaaaaHhQKeaaaaaHhaaeaabbCHhQKeaaaaaHhQKeaaaaaHhaaeaafbDHhGaeaaaaaHhIKeaaaaaHhGaeaaaaaHhaaeaaaaaHhGaeaaaaaHhaaeaaaaaGhaaeaabbDHhOaeaaaaaHhQKeaaaaaHhQKeaaaaaHhaaeaafbDHhaaeaabbDHhQKeaaaaaHhaaeaafbDHhGaeaaa6cHhGaeaaaaaHhIKeaaaaaHhaaeaaaaaHhGaeaaaaaGhaaeaabbGGhaaeaaaaaGhaaeaaaaaHhQKe-Ca6aHhQKeaaaaaHhaaeaafbDGhaaeaabbYHhaaeaabbDHhaaeaafbDGhaaeaaa-LHhGaeaabboHhGaeaaaaaHhGaeaaa6bHhaaeaaaaaHhGaeaaaaaGhaaeaaaaaGhaaeaaaaaGhaaeaaaaaHhQKeaaa6aHhaaeaafbDHhGae-DaaaHhaaeaabbvHhaaeaabbCGhaaeaabbVHhGae-DaaaHhIKeaaaaaHhGaeaaaaaGhaaeaabbXHhGaeaaaaaHhaaeaaaaaGhaaeaaaaaGhaaeaaaaaHhaaeaabbDHhaaeaafbDHhGaeaaa6fHhGaeaaaaaHhGaeaaa6bGhaaeaabbNHhaaeaaaaaHhGaeaaaaaHhIKeaaaaaGhaae-Da9ZHhaaeaaaaaHhGaeaaaaaHhaaeaaaaaGhaaeaabbBGhaae-Ca-OHhaaeaabbCHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGae-DaaaHhGaeaaa6fHhIKeaaaaaHhaaeaaa-WGhaaeaabbWHhGaeaaaaaHhiaeaahgKHhGaeaaaaaGhaaeaaa-PGhaaeaaa9VHhGaeaaaaaHhGaeaaa93HhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhaaeaaa6bHhaaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaa6bHhGae-DaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhGaeaaa93HhIKeaabbHHhaaeaaa6bHhaaeaaaaaHhaaeaaaaaHhGae-Da6aHhGaeaaaaaHhGaeaaaaaHhGaeaaaaaHhIKeaaa_4HhIKeaaaaaHhGaeaaaaaHhIKeaaaaaHhIKeaaaaaHhIKeaaaaaHhIKeaaaaaHhaaeaaa6bHhaaeaaaaaGhaaeaabbLGhaaeaaa9WHhaaeaaa6cHhaaeaaaaaHhaaeaaaaaHhcKeaaaaaHhcKeaaaaaHhcKeaaaaaHhcKeaaaaaHhaaeaaaaaHhaaeaaaaaHhaaeaaaaaHhaaeaaaaaHhaaeaaaaaGhaaeaabbS"
} | json |
In a June 2018 video called “sorry mom & dad,” the 19-year-old vlogger confessed to sneaking out of high school to visit her boyfriend — and getting away with it.
The beauty guru, who has amassed nearly 2 million views on her YouTube videos, also admitted to doing “some really shady s–t” when she was younger.
Prosecutors charge that “Fuller House” star Loughlin and fashion designer Mossimo Giannulli allegedly paid $500,000 to get Olivia and her 20-year-old sister, Isabella Rose Giannulli, into the University of Southern California by pretending the sisters were competitive rowing recruits.
Her parents have been released on $1 million bond each.
Since then, Olivia Jade has been giving her parents the silent treatment and living with her boyfriend in Malibu to escape the backlash.
Both Olivia Jade and her sister have dropped out of USC for fear of being bullied over the scandal.
Since the story went public, Olivia Jade’s influencer career took a hit — causing her to lose partnerships with TRESemmé and Sephora.
This article originally appeared in Page Six. | english |
<reponame>rpls/openlane_summary
#!/usr/bin/env python3
import argparse
import os
import glob
import csv
import sys
import re
from shutil import which
import datetime
def is_tool(name):
return which(name) is not None
def check_path(path):
paths = glob.glob(path)
if len(paths) == 0:
exit("file not found: %s" % path)
if len(paths) > 1:
print("warning: glob pattern found too many files, using first one: %s" % paths[0])
return paths[0]
def openlane_date_sort(e):
datestamp = os.path.basename(e)
if re.match(r'^\d+\-\d+\_\d+\-\d+$',datestamp):
timestamp = datetime.datetime.strptime(datestamp, '%d-%m_%H-%M')
return timestamp.timestamp()
return datestamp
def summary_report(summary_file):
# print short summary of the csv file
status = None
with open(summary_file) as fh:
summary = csv.DictReader(fh)
for row in summary:
for key, value in row.items():
if "violation" in key or "error" in key:
print("%30s : %20s" % (key, value))
if "AREA" in key:
area = float(value)
if "flow_status" in key:
status = value
print("area %d um^2" % (1e6 * area))
if status is not None: # newer OpenLANE has status, older ones don't
print("flow status: %s" % status)
def full_summary_report(summary_file):
# print short summary of the csv file
with open(summary_file) as fh:
summary = csv.DictReader(fh)
for row in summary:
for key, value in row.items():
print("%30s : %20s" % (key, value))
def drc_report(drc_file):
last_drc = None
drc_count = 0
with open(drc_file) as drc:
for line in drc.readlines():
drc_count += 1
if '(' in line:
if last_drc is not None:
print("* %s (%d)" % (last_drc, drc_count/4))
last_drc = line.strip()
drc_count = 0
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="OpenLANE summary tool")
group = parser.add_mutually_exclusive_group(required=True)
# either choose the design and interation
group.add_argument('--design', help="only run checks on specific design", action='store')
# or show standard cells
group.add_argument('--show-sky130', help='show all standard cells', action='store_const', const=True)
# optionally choose different name for top module and which run to use (default latest)
parser.add_argument('--top', help="name of top module if not same as design", action='store')
parser.add_argument('--run', help="choose a specific run. If not given use latest. If not arg, show a menu", action='store', default=-1, nargs='?', type=int)
# what to show
parser.add_argument('--drc', help='show DRC report', action='store_const', const=True)
parser.add_argument('--summary', help='show violations, area & status from summary report', action='store_const', const=True)
parser.add_argument('--full-summary', help='show the full summary report csv file', action='store_const', const=True)
parser.add_argument('--synth', help='show post techmap synth', action='store_const', const=True)
parser.add_argument('--yosys-report', help='show cell usage after yosys synth', action='store_const', const=True)
# klayout for intermediate files
parser.add_argument('--floorplan', help='show floorplan', action='store_const', const=True)
parser.add_argument('--pdn', help='show PDN', action='store_const', const=True)
parser.add_argument('--global-placement', help='show global placement PDN', action='store_const', const=True)
parser.add_argument('--detailed-placement', help='show detailed placement', action='store_const', const=True)
parser.add_argument('--gds', help='show final GDS', action='store_const', const=True)
# GDS3D for 3d view
parser.add_argument('--gds-3d', help='show final GDS in 3D', action='store_const', const=True)
parser.add_argument('--caravel', help='use caravel directory structure instead of standard openlane', action='store_const', const=True)
args = parser.parse_args()
if not args.top:
args.top = args.design
if not 'OPENLANE_ROOT' in os.environ:
exit("pls set OPENLANE_ROOT to where your OpenLANE is installed")
klayout_def = os.path.join(os.path.dirname(sys.argv[0]), 'klayout_def.xml')
klayout_gds = os.path.join(os.path.dirname(sys.argv[0]), 'klayout_gds.xml')
gds3d_tech = os.path.join(os.path.dirname(sys.argv[0]), 'sky130.txt')
# if showing off the sky130 cells
if args.show_sky130:
if not os.environ['PDK_ROOT']:
exit("pls set PDK_ROOT to where your PDK is installed")
path = check_path(os.path.join(os.environ['PDK_ROOT'], "sky130A", "libs.ref", "sky130_fd_sc_hd", "gds", "sky130_fd_sc_hd.gds"))
os.system("klayout -l %s %s" % (klayout_gds, path))
exit()
# otherwise need to know where openlane and the designs are
openlane_designs = ''
if args.caravel:
if os.path.exists('openlane'):
openlane_designs = 'openlane'
else:
openlane_designs = '.'
run_dir = os.path.join(openlane_designs, args.design, 'runs/*')
else:
openlane_designs = os.path.join(os.environ['OPENLANE_ROOT'], 'designs')
run_dir = os.path.join(openlane_designs, args.design, 'runs/*-*')
list_of_files = glob.glob(run_dir)
if len(list_of_files) == 0:
exit("couldn't find that design")
list_of_files.sort(key=openlane_date_sort)
# what run to show?
if args.run == -1:
# default is to use the latest
print("using latest run:")
run_path = max(list_of_files, key=os.path.getctime)
elif args.run is None:
# UI for asking for which run to use
for run_index, run in enumerate(list_of_files):
print("\n%2d: %s" % (run_index, os.path.basename(run)), end='')
print(" <default>\n")
n = input("which run? <enter for default>: ") or run_index
run_path = list_of_files[int(n)]
else:
# use the given run
print("using run %d:" % args.run)
run_path = list_of_files[args.run]
print(run_path)
if args.summary:
path = check_path(os.path.join(run_path, 'reports', 'final_summary_report.csv'))
summary_report(path)
if args.full_summary:
path = check_path(os.path.join(run_path, 'reports', 'final_summary_report.csv'))
full_summary_report(path)
if args.drc:
path = os.path.join(run_path, 'logs', 'magic', 'magic.drc') # don't check path because if DRC is clean, don't get the file
if os.path.exists(path):
drc_report(path)
else:
print("no DRC file, DRC clean?")
if args.synth:
path = check_path(os.path.join(run_path, "tmp", "synthesis", "post_techmap.dot")) # post_techmap is created by https://github.com/efabless/openlane/pull/282
os.system("xdot %s" % path)
if args.yosys_report:
filename = "*yosys_*.stat.rpt"
path = check_path(os.path.join(run_path, "reports", "synthesis", filename))
os.system("cat %s" % path)
if args.floorplan:
path = check_path(os.path.join(run_path, "results", "floorplan", args.top + ".floorplan.def"))
os.system("klayout -l %s %s" % (klayout_def, path))
if args.pdn:
filename = "*pdn.def"
path = check_path(os.path.join(run_path, "tmp", "floorplan", filename))
os.system("klayout -l %s %s" % (klayout_def, path))
if args.global_placement:
filename = "*replace.def"
path = check_path(os.path.join(run_path, "tmp", "placement", filename))
os.system("klayout -l %s %s" % (klayout_def, path))
if args.detailed_placement:
path = check_path(os.path.join(run_path, "results", "placement", args.top + ".placement.def"))
os.system("klayout -l %s %s" % (klayout_def, path))
if args.gds:
path = check_path(os.path.join(run_path, "results", "magic", args.top + ".gds"))
os.system("klayout -l %s %s" % (klayout_gds, path))
if args.gds_3d:
if not is_tool('GDS3D'):
exit("pls install GDS3D from https://github.com/trilomix/GDS3D")
path = check_path(os.path.join(run_path, "results", "magic", args.top + ".gds"))
os.system("GDS3D -p %s -i %s" % (gds3d_tech, path))
| python |
When applying make-up, one of the elements that is given considerable attention is the color of the eyebrows. Particularly important is the proper selection of shades for fair-haired women.
What color eyebrows does blondes suit?
Sometimes nature controls so that there are blondes with dark brows. In this case, this combination looks very harmonious. With the help of a professional make-up artist, you can achieve an effect in which dark eyebrows and blonde hair will look natural. But to conduct such experiments alone is not recommended, as often black and dark brown eyebrows for blondes look vulgar.
The color of eyebrows for blondes is preferably the following shades:
- gray - ideally combined with ashy hair;
- beige, light brown - suitable for blond girls who have light skin and green or blue eyes;
- brown - it will look good for girls with light brown and wheaten hair.
In addition, blonde girls are recommended to adhere to the following simple rules:
- Blondes should choose a shade of eyebrows for 2-3 shades darker than the color of their hair.
- The lighter the skin, the lighter the color of the eyebrows should be. If the skin has a warm tone, then the shade of the brow should be warm, and vice versa.
- If two pencils are used for make-up of eyebrows, they must necessarily be the same color, but one of them is of a lighter shade.
Thus, eyebrows are considered ideal for blondes, which are in harmony with their skin color and eyes.
Make-up can be applied in a variety of ways:
- cosmetic pencil;
- with the help of shadows;
- special eyebrow paint;
- to do tattoo of eyebrows. | english |
// compile-flags:-g
// min-gdb-version: 8.1
// === GDB TESTS ==================================================================================
// gdb-command:run
// gdb-command:print r
// gdb-check:[...]$1 = Rc(strong=2, weak=1) = {value = 42, strong = 2, weak = 1}
// gdb-command:print a
// gdb-check:[...]$2 = Arc(strong=2, weak=1) = {value = 42, strong = 2, weak = 1}
// === LLDB TESTS ==================================================================================
// lldb-command:run
// lldb-command:print r
// lldb-check:[...]$0 = strong=2, weak=1 { value = 42 }
// lldb-command:print a
// lldb-check:[...]$1 = strong=2, weak=1 { data = 42 }
use std::rc::Rc;
use std::sync::Arc;
fn main() {
let r = Rc::new(42);
let r1 = Rc::clone(&r);
let w1 = Rc::downgrade(&r);
let a = Arc::new(42);
let a1 = Arc::clone(&a);
let w2 = Arc::downgrade(&a);
print!(""); // #break
}
| rust |
<filename>tests/tests.js
/**
* Created by xavi on 14/12/14.
*/
var should = require('chai').should();
var ABTesting = require('../index');
describe('Init', function() {
it('should work with a default weight', function () {
var abTest = ABTesting.createTest('test', [{ name : 'A' },{ name : 'B' }]);
var group = abTest.getGroup('<EMAIL>');
group.should.match(/^[A|B]/);
});
it('should work with weights smaller than 1', function () {
var abTest = ABTesting.createTest('test', [{ name : 'A', weight : 0.3 },{ name : 'B', weight: 0.3 }]);
var group = abTest.getGroup('<EMAIL>');
group.should.match(/^[A|B]/);
});
it('should work with weights bigger than 1', function () {
var abTest = ABTesting.createTest('test', [{ name : 'A', weight : 30 },{ name : 'B', weight: 30 }]);
var group = abTest.getGroup('<EMAIL>');
group.should.match(/^[A|B]/);
});
it('should work with many groups', function() {
var users = [];
for (var i = 0; i <1000; i++) {
users.push(i);
}
var testObject = ABTesting.createTest('manyGroupTest', [{
name: 'A',
weight: 0.25
},
{
name: 'B',
weight: 0.25
},
{
name: 'C',
weight: 0.25
},
{
name: 'D',
weight: 0.25
}
]);
var groups = users.reduce(function(accumulator, currentValue) {
cohort = testObject.getGroup(currentValue.toString());
accumulator[cohort] = true;
return accumulator;
}, {});
Object.keys(groups).sort().should.deep.equal(['A','B','C','D'])
});
});
describe('Test', function () {
it('should execute the correct function for Alice', function() {
var abTest = ABTesting.createTest('test', [{ name : 'A' },{ name : 'B' }]);
var group = abTest.getGroup('<EMAIL>');
abTest.test(group, [
function () {
group.should.equal('A');
},
function() {
group.should.equal('B');
}
]);
});
it('should execute the correct function for Bob', function() {
var abTest = ABTesting.createTest('test', [{ name : 'A' },{ name : 'B' }]);
var group = abTest.getGroup('<EMAIL>');
abTest.test(group, [
function () {
group.should.equal('A');
},
function() {
group.should.equal('B');
}
]);
});
it('should execute with the correct scope', function() {
var abTest = ABTesting.createTest('test', [{ name : 'A' },{ name : 'B' }]);
this.foo = "foo";
var group = abTest.getGroup('<EMAIL>');
abTest.test(group, [
function () {
group.should.equal('A');
this.foo.should.equal('foo');
},
function() {
group.should.equal('B');
this.foo.should.equal('foo');
}
], this);
});
it('should return error if the user group does not match any test', function () {
var abTest = ABTesting.createTest('test', [{ name : 'A' },{ name : 'B' }]);
try {
abTest.test('nonExistingGroup', [
function () {
should.throw.error();
},
function() {
should.throw.error();
}
]);
} catch (err) {
err.should.exist;
}
});
it('should return different groups for different users', function () {
var abTest = ABTesting.createTest('test', [{ name : 'A' },{ name : 'B' }]);
var username = Math.random().toString(),
isA = false,
isB = false;
for(var i = 0; i < 10000 && !isA; i++) {
isA = abTest.getGroup(username) === 'A';
username = Math.random().toString();
}
for(var i = 0; i < 10000 && !isB; i++) {
isB = abTest.getGroup(username) === 'B';
username = Math.random().toString();
}
});
});
describe('Different number of experiments', function () {
it('should accept 3 experiments', function () {
var abTest = ABTesting.createTest('test', [{ name: 'A'}, { name: 'B'}, { name: 'C'}]);
var username = '<EMAIL>';
abTest.getGroup(username).should.be.equal('A');
});
it('should hit only one test if the weight of the others is 0', function () {
var config = [
{ name: 'A', weight: 1},
{ name: 'B', weight: 0},
{ name: 'C', weight: 0}
];
var abTest = ABTesting.createTest('test', config);
var username = Math.random().toString();
for(var i = 0; i < 100; i++) {
abTest.getGroup(username).should.be.equal('A');
username = Math.random().toString();
}
})
})
describe('More than one A/B test', function () {
it('should accept more than one test', function () {
var testOne = ABTesting.createTest('test1', [{ name: 'A'}, { name: 'B'}]);
var testTwo = ABTesting.createTest('test2', [{ name: 'ATest'}, { name: 'BTest'}]);
var testOneGroup = testOne.getGroup('username');
var testTwoGroup = testTwo.getGroup('anotherUsername');
testOne.test(testOneGroup, [
function () {
testOneGroup.should.be.equal('A');
},
function () {
testOneGroup.should.be.equal('B');
}
], this);
testTwo.test(testTwoGroup, [
function () {
testTwoGroup.should.be.equal('ATest');
},
function () {
testTwoGroup.should.be.equal('BTest');
}
], this);
});
it('should return correct test name', function () {
var testOne = ABTesting.createTest('test1', [{ name: 'A'}, { name: 'B'}]);
var testTwo = ABTesting.createTest('test2', [{ name: 'A'}, { name: 'B'}]);
var testOneGroup = testOne.getGroup('username');
var testTwoGroup = testTwo.getGroup('anotherUsername');
var testOneName = testOne.getName();
var testTwoName = testTwo.getName();
testOneName.should.be.equal('test1');
testTwoName.should.be.equal('test2');
testOne.test(testOneGroup, [
function () {
testOneGroup.should.be.equal('A');
},
function () {
testOneGroup.should.be.equal('B');
}
], this);
testTwo.test(testTwoGroup, [
function () {
testTwoGroup.should.be.equal('A');
},
function () {
testTwoGroup.should.be.equal('B');
}
], this);
});
it('should return same groups for the same test names', function () {
var testOne = ABTesting.createTest('test1', [{ name: 'A'}, { name: 'B'}]);
var testTwo = ABTesting.createTest('test1', [{ name: 'A'}, { name: 'B'}]);
var username = 'testUsername';
testOne.getGroup(username).should.be.equal(testTwo.getGroup(username));
});
it('should return different groups for different tests', function () {
var testOne = ABTesting.createTest('test1', [{ name: 'A'}, { name: 'B'}]);
var testTwo = ABTesting.createTest('test2', [{ name: 'C'}, { name: 'D'}]);
var username = 'testUsername';
testOne.getGroup(username).should.not.be.equal(testTwo.getGroup(username));
});
});
| javascript |
Posted On:
The Ministry implemented ‘Naya Savera’ scheme (‘Free Coaching and Allied’ scheme) to assist students/candidates belonging to the six notified minority communities namely Sikh, Jain, Muslim, Christian, Buddhist and Parsi by way of special coaching for qualifying examinations for admission in technical/professional courses and competitive examination for recruitment to Group Á, ‘B’, & ‘C’ services and other equivalent posts under the Central and State Governments including public sector undertakings, banks and railways. The scheme was implemented across the country through empaneled Project Implementing Agencies (PIAs).
Since inception, 1,19,223 minority students/candidates have been benefited under Naya Savera Scheme, out of which 12,155 beneficiaries were from state of Andhra Pradesh. The details of physical achievement during last three years are given below:
State-wise details of minority students benefited under the scheme is available on the website of Ministry www.minorityaffairs.gov.in .
The duration of the coaching period under the scheme were from 3 months to 2 years depending upon the coaching programme allocated to the PIAs. The scheme has been discontinued w.e.f. 2022-23.
This information was given by the Minister of Minority Affairs Smt. Smriti Zubin Irani, in a written reply in Lok Sabha today.
| english |
<reponame>CLionMesonIntegration/CLionMesonIntegration
// This is a generated file. Not intended for manual editing.
package com.nonnulldinu.clionmeson.mesonbuildlang.psi;
import org.jetbrains.annotations.*;
import com.intellij.psi.PsiElement;
public interface MesonBuildNumLiteralUnary extends PsiElement {
@Nullable
PsiElement getBinnum();
@Nullable
PsiElement getDecnum();
@Nullable
PsiElement getHexnum();
@Nullable
PsiElement getOctnum();
}
| java |
# -*- coding: utf-8 -*-
from logging import getLogger
from pkg_resources import get_distribution
from openprocurement.auctions.core.plugins.contracting.base.utils import (
check_auction_status
)
from openprocurement.auctions.core.utils import (
cleanup_bids_for_cancelled_lots, check_complaint_status,
remove_draft_bids,
context_unpack,
get_now,
TZ,
)
PKG = get_distribution(__package__)
LOGGER = getLogger(PKG.project_name)
def check_bids(request):
auction = request.validated['auction']
if auction.lots:
[setattr(i.auctionPeriod, 'startDate', None) for i in auction.lots if i.numberOfBids < 2 and i.auctionPeriod and i.auctionPeriod.startDate]
[setattr(i, 'status', 'unsuccessful') for i in auction.lots if i.numberOfBids < 2 and i.status == 'active']
cleanup_bids_for_cancelled_lots(auction)
if not set([i.status for i in auction.lots]).difference(set(['unsuccessful', 'cancelled'])):
auction.status = 'unsuccessful'
else:
if auction.auctionPeriod:
if auction.numberOfBids < auction.minNumberOfQualifiedBids:
auction.auctionPeriod.startDate = None
auction.status = 'unsuccessful'
elif auction.numberOfBids == 1:
auction.auctionPeriod.startDate = None
request.content_configurator.start_awarding()
def check_status(request):
auction = request.validated['auction']
now = get_now()
for complaint in auction.complaints:
check_complaint_status(request, complaint, now)
for award in auction.awards:
request.content_configurator.check_award_status(request, award, now)
for complaint in award.complaints:
check_complaint_status(request, complaint, now)
if not auction.lots and auction.status == 'active.tendering' and auction.tenderPeriod.endDate <= now:
LOGGER.info('Switched auction {} to {}'.format(auction['id'], 'active.auction'),
extra=context_unpack(request, {'MESSAGE_ID': 'switched_auction_active.auction'}))
auction.status = 'active.auction'
remove_draft_bids(request)
check_bids(request)
return
elif auction.lots and auction.status == 'active.tendering' and auction.tenderPeriod.endDate <= now:
LOGGER.info('Switched auction {} to {}'.format(auction['id'], 'active.auction'),
extra=context_unpack(request, {'MESSAGE_ID': 'switched_auction_active.auction'}))
auction.status = 'active.auction'
remove_draft_bids(request)
check_bids(request)
[setattr(i.auctionPeriod, 'startDate', None) for i in auction.lots if i.numberOfBids < 2 and i.auctionPeriod]
return
elif not auction.lots and auction.status == 'active.awarded':
standStillEnds = [
a.complaintPeriod.endDate.astimezone(TZ)
for a in auction.awards
if a.complaintPeriod.endDate
]
if not standStillEnds:
return
standStillEnd = max(standStillEnds)
if standStillEnd <= now:
check_auction_status(request)
elif auction.lots and auction.status in ['active.qualification', 'active.awarded']:
if any([i['status'] in auction.block_complaint_status and i.relatedLot is None for i in auction.complaints]):
return
for lot in auction.lots:
if lot['status'] != 'active':
continue
lot_awards = [i for i in auction.awards if i.lotID == lot.id]
standStillEnds = [
a.complaintPeriod.endDate.astimezone(TZ)
for a in lot_awards
if a.complaintPeriod.endDate
]
if not standStillEnds:
continue
standStillEnd = max(standStillEnds)
if standStillEnd <= now:
check_auction_status(request)
return
def invalidate_bids_under_threshold(auction):
value_threshold = round(auction['value']['amount'] + auction['minimalStep']['amount'], 2)
for bid in auction['bids']:
if bid['value']['amount'] < value_threshold:
bid['status'] = 'invalid'
| python |
<reponame>wang420349864/dlcv_for_beginners
## Caffe中进行模型融合
Blog:
[在Caffe中实现模型融合](http://www.cnblogs.com/frombeijingwithlove/p/6683476.html)
## 从头训练两个不同模型
### step 1
> ./download_mnist.sh
### step 2
> python convert_mnist.py
### step 3
> python gen_img_list.py
### step 4
train with lenet_odd_solver.prototxt & lenet_even_solver.prototxt
## 基于预训练模型直接融合
预训练模型下载地址:
https://github.com/frombeijingwithlove/dlcv_book_pretrained_caffe_models/blob/master/mnist_lenet_even_iter_30000.caffemodel
https://github.com/frombeijingwithlove/dlcv_book_pretrained_caffe_models/blob/master/mnist_lenet_odd_iter_30000.caffemodel
## 生成融合后的prototxt
> python rename_n_freeze_layers.py input_model output_model prefix
拷贝从data层之后开始到最后要进行融合的特征层,比如ip1位置的prototxt,放到一个prototxt中,然后在开始加上data层,融合层可以用concat进行拼接,然后再接fc或是其他操作。
## 生成融合后的权重
> python fuse_model.py
## 基于融合的模型继续进行finetune
直接训练即可 | markdown |
<filename>css/style.css
/* Basic Style */
body {
background: #f0efe9;
height: 100vh;
width: 100vw;
}
p,
button,
input {
font-family: "Open Sans", sans-serif;
font-size: 1.1em;
padding: 5px 10px;
margin: 2px;
}
ul {
padding: 0;
}
li {
align-items: center;
display: flex;
justify-content: space-between;
padding: 35px 0;
}
.container {
background: #fff;
border-radius: 5px;
box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
margin: 100px auto;
padding: 80px;
position: relative;
width: 585px;
min-height: 500px;
}
div#login {
text-align: center;
}
.header {
font-size: 20px;
justify-content: space-between;
letter-spacing: 2px;
padding: 0 0 35px 0;
text-align: center;
}
input#username {
padding: 10px 12px;
width: 75%;
border: 1px solid #ccc;
border-radius: 4px;
}
#loginForm button {
width: 17%;
background: green;
}
.btn {
border: 1px solid #ccc;
padding: 10px 15px;
background-color: #017f9f;
color: white;
border-radius: 50%;
}
.btn-edit,
.btn-delete,
button#fetchList,
button#createList,
#loginForm button {
color: white;
border: 1px solid #ccc;
border-radius: 4px;
padding: 10px 12px;
}
.btn-edit {
background-color: green;
}
.btn-delete {
background-color: #d80707;
}
button#fetchList {
background-color: #017f9f;
}
button#createList {
background-color: #029c7c;
}
/* Edit Task */
ul li input[type="text"] {
display: none;
}
input#itemName {
width: 85%;
}
label {
width: 70%;
padding: 10px 12px;
text-align: left;
font-size: 20px;
}
ul li.editMode input[type="text"] {
display: block;
width: 68%;
padding: 10px 12px;
}
ul li.editMode label {
display: none;
}
div#groceries-list {
text-align: center;
}
.hidden {
display: none;
}
.errorMessage {
color: red;
font-size: 16px;
margin-bottom: 20px;
}
.successMessage {
color: green;
font-size: 26px;
text-transform: capitalize;
margin-bottom: 20px;
}
| css |
<filename>cjs/core/embedders/JavaScriptEmbedder.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var PDFHexString_1 = tslib_1.__importDefault(require("../objects/PDFHexString"));
var JavaScriptEmbedder = /** @class */ (function () {
function JavaScriptEmbedder(script, scriptName) {
this.script = script;
this.scriptName = scriptName;
}
JavaScriptEmbedder.for = function (script, scriptName) {
return new JavaScriptEmbedder(script, scriptName);
};
JavaScriptEmbedder.prototype.embedIntoContext = function (context, ref) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var jsActionDict;
return tslib_1.__generator(this, function (_a) {
jsActionDict = context.obj({
Type: 'Action',
S: 'JavaScript',
JS: PDFHexString_1.default.fromText(this.script),
});
if (ref) {
context.assign(ref, jsActionDict);
return [2 /*return*/, ref];
}
else {
return [2 /*return*/, context.register(jsActionDict)];
}
return [2 /*return*/];
});
});
};
return JavaScriptEmbedder;
}());
exports.default = JavaScriptEmbedder;
//# sourceMappingURL=JavaScriptEmbedder.js.map | javascript |
Chief Minister Bhupendra Patel Friday laid the foundation stone of the Tidal Regulator Dam project at Vaghrech village on the banks of Kaveri river in Navsari. The project, which costs Rs 250 crore, will provide water for irrigation to Bilimora and its neighboring 10 villages.
Madhya Pradesh Governor Mangubhai Patel was also present at the event, which was attended by state BJP president CR Paatil and State Minister of Water Resources and Water Supply Rushikesh Patel.
The Chief Minister said that the Vaghrech project will be completed in a time period of one year.
“Under the Azadi ka Amrut Mahotsav, government had fixed target to supply potable water to the people. Entire world is struggling to the challenges of global warming and climate change, and to overcome the needs of drinking water, the state government is working to recharge the ground water reservoirs,” the CM said. | english |
Thiruvananthapuram: Eight persons were killed after an ambulance in which they were travelling collided with a lorry loaded with fish at Thanissery in Palakkad.
Five persons inside the ambulance were being taken to a hospital in Palakkad after their car met with an earlier accident.
Police said the group was going on a trip to Nelliyampathy in a car when the accident happened.
They sustained minor injuries and after being administered first aid at the primary health centre in Nenmara, they were being taken to the Palakkad district hospital when the second mishap took place.
Along with the group, there were three more persons, who were being taken to another hospital.
There were nine persons in the ambulance of whom eight, including the driver, died in the accident.
One of the passengers in the ambulance and the lorry driver sustained injuries and were shifted to the hospital. | english |
#include "stdafx.h"
#include "FieldMap.h"
#include "CastleAlgorithmCommon.h"
FieldMap::FieldMap()
{
m_NodeCount = 0;
}
FieldMap::~FieldMap()
{
}
void FieldMap::SetNodeCount(int n)
{
m_NodeCount = n;
m_Bitmap.resize(n * n);
}
DirectedEdge FieldMap::GetConnection(int row, int col) const
{
DirectedEdge ret;
ret.m_eState = FM_ILLEGAL;
if (row < 0 || m_NodeCount <= row) {
return ret;
}
if (col < 0 || m_NodeCount <= col) {
return ret;
}
return m_Bitmap[row * m_NodeCount + col];
}
void FieldMap::SetConnectionChangeLength(int row, int col, FM_STATE eState, int nLength)
{
SetConnection(row, col, eState);
m_Bitmap[row * m_NodeCount + col].m_nLength = nLength;
}
void FieldMap::SetConnection(int row, int col, FM_STATE eState)
{
if (row < 0 || m_NodeCount <= row) {
ASSERT(FALSE);
return;
}
if (col < 0 || m_NodeCount <= col) {
ASSERT(FALSE);
return;
}
m_Bitmap[row * m_NodeCount + col].m_eState = eState;
}
void FieldMap::GenerateConnectGraph(int percentage)
{
int edgeCount = percentage * m_NodeCount * (m_NodeCount - 1) / 200;
if (edgeCount < m_NodeCount - 1) {
edgeCount = m_NodeCount - 1;
}
int * nodeIDs = new int[m_NodeCount];
for (int i = 0; i < m_NodeCount; ++i) {
nodeIDs[i] = i;
}
random_card(nodeIDs, m_NodeCount);
int ml = (m_NodeCount - 1) / 2, mr = ml + 1;
ConnectTwoParts(0, ml, mr, m_NodeCount - 1, nodeIDs);
delete[] nodeIDs;
nodeIDs = NULL;
int fullConnectionCount = m_NodeCount * (m_NodeCount - 1) / 2;
int * connectionIDs = new int[fullConnectionCount];
for (int i = 0; i < fullConnectionCount; ++i) {
connectionIDs[i] = i;
}
random_card(connectionIDs, fullConnectionCount);
FM_STATE * connections = new FM_STATE[fullConnectionCount];
int connIndex = 0;
for (int i = 0; i < m_NodeCount - 1; ++i) {
for (int j = i + 1; j < m_NodeCount; ++j) {
connections[connIndex++] = GetConnection(i, j).m_eState;
}
}
edgeCount -= (m_NodeCount - 1);
for (int i = 0; i < fullConnectionCount && edgeCount > 0; ++i) {
if (connections[connectionIDs[i]] == FM_NO_WAY) {
connections[connectionIDs[i]] = FM_HAVE_WAY;
--edgeCount;
}
}
delete[] connectionIDs;
connectionIDs = NULL;
connIndex = 0;
for (int i = 0; i < m_NodeCount - 1; ++i) {
for (int j = i + 1; j < m_NodeCount; ++j) {
SetConnectionChangeLength(i, j, connections[connIndex++], 1);
}
}
connIndex = 0;
for (int j = 0; j < m_NodeCount - 1; ++j) {
for (int i = j + 1; i < m_NodeCount; ++i) {
SetConnectionChangeLength(i, j, connections[connIndex++], 1);
}
}
delete[] connections;
connections = NULL;
GetString();
}
void FieldMap::InitCRing(const vector<int> & ds)
{
if (m_NodeCount <= ds[ds.size() - 1])
{
return;
}
for (int i = 0; i < m_NodeCount; ++i)
{
for (int j = 0; j < ds.size(); ++j)
{
int next = (i + ds[j]) % m_NodeCount;
SetConnectionChangeLength(i, next, FM_HAVE_WAY, 1);
SetConnectionChangeLength(next, i, FM_HAVE_WAY, 1);
}
}
}
CString FieldMap::GetString() const
{
CString strLine;
for (int i = 0; i < m_NodeCount; ++i) {
strLine.Empty();
for (int j = 0; j < m_NodeCount; ++j) {
CString strTmp;
strTmp.Format(_T("\t%d"), GetConnection(i, j));
strLine += strTmp;
}
strLine += _T("\n");
OutputDebugString(strLine);
}
OutputDebugString(_T("Output edges\n"));
for (int i = 0; i < m_NodeCount; ++i) {
for (int j = i + 1; j < m_NodeCount; ++j) {
if (GetConnection(i, j).m_eState != FM_NO_WAY) {
CString strTmp;
strTmp.Format(_T("G.add_edge(%d,%d)\n"), i, j);
OutputDebugString(strTmp);
}
}
}
return _T("");
}
int FieldMap::GetDegree(int from)
{
int ret = 0;
for (int i = 0; i < m_NodeCount; ++i)
{
if (GetConnection(from, i).m_eState > FM_NO_WAY)
{
++ret;
}
}
return ret;
}
bool FieldMap::Merge(FieldMap & a, FieldMap & b)
{
bool ret = a.MergeFrom(b);
b = a;
return ret;
}
bool FieldMap::MergeFrom(const FieldMap & src)
{
bool ret = false;
ASSERT(m_NodeCount == src.m_NodeCount);
for (int i = 0; i < m_NodeCount; ++i)
{
for (int j = 0; j < m_NodeCount; ++j)
{
DirectedEdge de = src.GetConnection(i, j);
if (de.m_eState > GetConnection(i, j).m_eState)
{
SetConnectionChangeLength(i, j, de.m_eState, de.m_nLength);
ret = true;
}
}
}
return ret;
}
void FieldMap::random_card(int* nums, int len)
{
CastleAlgorithmCommon::random_card(nums, len);
}
void FieldMap::ConnectTwoParts(int al, int ar, int bl, int br, int * nodeIDs)
{
if (al != ar) {
int ml = (ar + al) / 2;
int mr = ml + 1;
ConnectTwoParts(al, ml, mr, ar, nodeIDs);
}
if (bl != br) {
int ml = (br + bl) / 2;
int mr = ml + 1;
ConnectTwoParts(bl, ml, mr, br, nodeIDs);
}
int indexA = rand() % (ar - al + 1) + al;
int indexB = rand() % (br - bl + 1) + bl;
SetConnectionChangeLength(nodeIDs[indexA], nodeIDs[indexB], FM_HAVE_WAY, 1);
SetConnectionChangeLength(nodeIDs[indexB], nodeIDs[indexA], FM_HAVE_WAY, 1);
}
| cpp |
version https://git-lfs.github.com/spec/v1
oid sha256:cc15c97110099f47690e17231d2d3bf11fbaac89188389af34eadfd2d2b135b9
size 527983
| json |
<HTML>
<HEAD>
<meta charset="UTF-8">
<title>Deposit.BtcDeposit.transactionInfo - echoframework</title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">echoframework</a> / <a href="../../index.html">org.echo.mobile.framework.model</a> / <a href="../index.html">Deposit</a> / <a href="index.html">BtcDeposit</a> / <a href="./transaction-info.html">transactionInfo</a><br/>
<br/>
<h1>transactionInfo</h1>
<a name="org.echo.mobile.framework.model.Deposit.BtcDeposit$transactionInfo"></a>
<code><span class="keyword">val </span><span class="identifier">transactionInfo</span><span class="symbol">: </span><span class="identifier">TransactionInfo</span></code>
</BODY>
</HTML>
| html |
Kia plans to launch seven new all-electric vehicles by 2027, the first of which will be EV6. Due to be revealed this month, the company recently teased the EV some time ago. And a few weeks ahead of EV6's global debut, the South Korean carmaker has released images of the EV6 production model. Thanks to these images, the carmaker has given us a good look at its upcoming EV's exterior and interior design. It will be the carmaker's first electric car to be underpinned by Electric-Global Modular (E-GM) platform that has been specifically designed for EVs. This makes EV6 Kia's first dedicated EV according to the carmaker. However, it must not be confused as Kia's first all-electric car as the company has been selling models like Soul and Niro for a while now.
Kia EV6 marks the debut of the carmaker's 'Opposites United' design philosophy based on key design pillars -- Bold for Nature, Joy for Reason, Power to Progress, Technology for Life, and Tension for Serenity. It has a crossover silhouette and gets a sleek front grille flanked by large LED headlamps. The headlight sports a unique DRL signature that forms a part of the car’s ‘Digital Tiger Face’, a design progression evoking the spirit of Kia’s ‘Tiger Nose Grille’ for the electrified era. The front bumper sports a clean design with a wide air intake and a chrome garnish on the lower lip. The bonnet has two prominent creases and one can notice a signature line running along the length of the vehicle. The EV6's crossover personality is highlighter by the sloping roofline and a raked windscreen while the use of black accents around the windows lends a sporty appeal to the electric car. The aesthetics are complemented by elements like roof spoiler, duck-tail spoiler, and glossy black side cladding.
Kia EV6 features a sporty but clean interior layout and the carmaker has tried to lend a sense of space by minimising physical buttons. The centre stage is taken by a large touchscreen infotainment system adjoining the TFT instrument cluster. The centre console and dashboard have only a handful of physical switches for an uncluttered appeal inside the EV.
The company hasn't revealed EV6's specifications and feature list but we can expect it to be on par with the main rivals. The word on the street is that EV6 will offer a riding range of around 450 km/charge but we will have to wait for official details.
Karim Habib, Senior Vice President and Head of Global Design Center, said, "EV6, as the first dedicated Kia EV, is a showcase of human-centered, progressive design and electrified power. We strongly believe EV6 is a compelling and relevant model for the new EV market. With EV6 we aimed to create a distinctive, impactful design by using a combination of sophisticated, high-tech features on pure and rich volumes, while providing a unique space as a futuristic EV. " | english |
{"name":"chevron_down","subject":1010,"date":"1822010-023855","paths":{"Pen":{"strokes":[{"x":-473,"y":-127,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":0,"stroke_id":0},{"x":-460,"y":-132,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":1,"stroke_id":0},{"x":-460,"y":-132,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":2,"stroke_id":0},{"x":-440,"y":-141,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":3,"stroke_id":0},{"x":-424,"y":-133,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":4,"stroke_id":0},{"x":-424,"y":-133,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":5,"stroke_id":0},{"x":-397,"y":-108,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":6,"stroke_id":0},{"x":-386,"y":-85,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":7,"stroke_id":0},{"x":-361,"y":-37,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":8,"stroke_id":0},{"x":-341,"y":16,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":9,"stroke_id":0},{"x":-313,"y":88,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":10,"stroke_id":0},{"x":-290,"y":170,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":11,"stroke_id":0},{"x":-265,"y":260,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":12,"stroke_id":0},{"x":-243,"y":354,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":13,"stroke_id":0},{"x":-222,"y":441,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":14,"stroke_id":0},{"x":-203,"y":522,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":15,"stroke_id":0},{"x":-188,"y":584,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":16,"stroke_id":0},{"x":-173,"y":633,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":17,"stroke_id":0},{"x":-158,"y":656,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":18,"stroke_id":0},{"x":-142,"y":651,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":19,"stroke_id":0},{"x":-123,"y":615,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":20,"stroke_id":0},{"x":-98,"y":554,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":21,"stroke_id":0},{"x":-66,"y":470,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":22,"stroke_id":0},{"x":-27,"y":364,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":23,"stroke_id":0},{"x":23,"y":248,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":24,"stroke_id":0},{"x":80,"y":115,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":25,"stroke_id":0},{"x":145,"y":-20,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":26,"stroke_id":0},{"x":215,"y":-145,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":27,"stroke_id":0},{"x":283,"y":-262,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":28,"stroke_id":0},{"x":358,"y":-355,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":29,"stroke_id":0},{"x":423,"y":-424,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":30,"stroke_id":0},{"x":477,"y":-473,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":31,"stroke_id":0},{"x":523,"y":-496,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":32,"stroke_id":0},{"x":553,"y":-505,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":33,"stroke_id":0}]}},"device":{"osBrowserInfo":"Fujitsu-Siemens Stylistic ST5022 Tablet PC","resolutionHeight":null,"resolutionWidth":null,"windowHeight":null,"windowWidth":null,"pixelRatio":null,"mouse":false,"pen":true,"finger":false,"acceleration":false,"webcam":false}} | json |
import sys
from PyQt5.QtWidgets import QApplication
from gui import MgallManager
def main():
app = QApplication(sys.argv)
ex = MgallManager()
app.aboutToQuit.connect(ex.ExitHandler)
sys.exit(app.exec_())
if __name__ == "__main__":
main()
| python |
{
"copyright_text": "Creative Commons Attribution license (reuse allowed)",
"description": "Competitive programming has grown exponentially in the last decade.\nMillions of students, teachers, professionals solve problems including\ncomplex optimisations every minute. With the influx of programming\nlanguages, developers have a wide range of tools to choose from and use\nthem to solve competitive challenges. Some of the popular platforms\ninclude Codeforces, Codechef, Hackerrank, Hackerearth, Topcoder etc.\n\nIn this talk we are going to use the dataset of codes scraped from\nCodeforces from a variety of challenges. These include programs written\nby top rated coders across the world to the newbies. The platform allows\nyou to code in 26 different languages which obviously include popular\nprogramming languages like C, C++, Java, Javascript, PHP, Python etc.\nThere are a very wide range of challenges in competitive programming\nlike Sorting, Binary Search, Trees, Graphs, Dynamic Programming to name\na few. The talk will cover the visualization of the dataset among broad\nclassifications of how each programming language performs in these\nclassifications. How efficient are programming languages across\nclassifications in terms of time and memory and several others? The talk\nwould also specifically cover the ease of using Python to solve\ndifferent classes of challenges in competitive programming and the usage\nof Python over time.\n\nMajor takeaways :\n\n- ABC of web scraping and best practices.\n- Optimizing web scraping to scale.\n- No-SQL databases for storing unstructured data\n- How does Python as a language fare in competitive programming in\n terms of\n- efficiency and popularity?\n- Can I pursue competitive programming using Python ONLY?\n- An analysis of popular programming languages used for solving\n challenges.\n",
"duration": 1042,
"language": "eng",
"recorded": "2018-10-06",
"related_urls": [
{
"label": "schedule",
"url": "https://www.pycon.fr/2018/program/"
}
],
"speakers": [
"<NAME>"
],
"tags": [],
"thumbnail_url": "https://i.ytimg.com/vi/sUkWa3lC0gI/maxresdefault.jpg",
"title": "Visualising the world of competitive programming with Python",
"videos": [
{
"type": "youtube",
"url": "https://www.youtube.com/watch?v=sUkWa3lC0gI"
}
]
}
| json |
Madras Dyslexia Association (MDA), a non-profit founded by parents of children with dyslexia, is organizing National Symposium 2023 at the IIT Madras campus on January 21 and 22, 2023. The Symposium will focus on best practices in the intervention for children with specific learning disabilities.
It is intended to highlight a need-based multi-pronged approach to intervention for special children. This approach is essential to enable children with dyslexia to internalize, practice and adopt the coping strategies. Interventions in silos are ineffective and they need to be in-sync and administered regularly with a system of feedback to make need-based changes.
Experts with wide and deep practical experience are being invited to address the National Symposium 2023 to create an understanding of the influencing factors, challenges, and solutions. Ms. Geetha Santha Ram, Director, SpLD Assessment Services, English Language and Literacy Division, and Staff Professional Development Division, Singapore Dyslexia Association (DAS), would give the keynote address. Speakers include doctors, occupational therapists, and experts in the field of play, parenting, and emotional wellness.
School principals, teachers, special educators, and parents have been registering for the symposium with a view to understanding the importance of a multi-pronged approach. Many of the stakeholders have plans to integrate these learnings with teaching-learning practices followed at their respective schools.
Dyslexia is a hidden neurobiological condition that manifests as difficulties in academic skills despite average to above average IQ and strengths in many areas like out-of-the-box thinking. Structured, multi-modal remedial teaching, based on an Individualized Educational Plan is an essential intervention to cope with academic difficulties. However, co-morbidities that may be found in such children make remedial interventions less effective.
Difficulties like visual/ auditory processing (even though there are no issues related to vision or hearing) impede academic skills causing stress in the child. This could lead to a loss of self-confidence, loss of interest in academics, and other issues. Hence, dyslexia affects areas like behaviour and emotional condition in addition to academics. Multi-pronged intervention, not-limited to remedial teaching, plays a pivotal role in providing the child with comprehensive support. | english |
Revanth Reddy is one of the most keenly watched politician in Telangana these days. What will be his next move if he is not made the chief of the Telangana Pradesh Congress Committee? Will he remain in the Congress or will he join some other party, especially the BJP? These are being hotly debated in the undivided Mahabubnagar district.
There is a strong feeling that Revanth Reddy might not remain in the Congress if he is not offered the PCC chief post. In all probability, he might join the BJP, say sources. They also point out that Revanth has significant influence in his constituency of Kodangal and Kalwakuthi constituency. Revanth had in fact begun his political career from Kalwakurthi.
Sources say that beyond these two constituencies, there would be little effect of Revanth in other constituencies of the undivided Mahabubnagar. For instance, constituencies like Wanaparthy and Gadwal have strong local leaders like former minister Chinna Reddy and Sampath Kumar Reddy. The organization is largely in their hands and Revanth's leaving might not have any effect on the party.
Ditto with Nagarkurnool and Kollapur, where the party is already rudderless and Revanth's presence or absence will not have any effect. Mahabubnagar, Jadcharla, Devarakadra and Narayanpeta too will see no change due to Revanth's departure. So, if the pundits are to be believed, Revanth's effect would be limited to just two constituencies. | english |
<gh_stars>1-10
{"PursueTheDreamJob": ["SoulCrushingDeskJob", "Workaholic", "CallToAgriculture", "RomComJob", "HardWorkMontage", "OutOfJobIntoThePlot", "DesperatelyLookingForAPurposeInLife", "Inverted", "MultipleChoicePast", "StartOfDarkness", "SanitySlippage", "TheGreatDepression", "ForegoneConclusion", "FakingTheDead", "FakingTheDead", "Subverted", "PlayedStraight", "LoveInterest", "PlayedWith", "AbsurdPhobia", "Subverted", "PlayedStraight", "LoveInterest", "PlayedWith", "AbsurdPhobia", "LoadsAndLoadsOfCharacters", "Mangaka", "EarnYourHappyEnding"]} | json |
<filename>GUI/css/assignmentpane.css
.assignment_tile_pane {
-fx-padding: 80 80 80 80;
-fx-hgap: 15;
-fx-vgap: 15;
-fx-margin: auto;
-fx-box-border: transparent;
-fx-border-color: #fff;
/* -fx-background-color: cornsilk;
-fx-box-shadow: 10px 10px 5px #888888;*/
-fx-effect: dropshadow(three-pass-box, #fafafa, 3, 0, 0, 0);
-fx-background-color: #F0F0F1;
}
.assignment_card{
-fx-background-color: #FAFAFA;
/* -fx-background-radius: 5;*/
/* -fx-padding: 60px;*/
-fx-padding: 60px 20px 60px 20px;
}
.assignment_card_label{
-fx-text-alignment: center;
}
.assignment_card_image{
} | css |
Of late, skincare has become a topic that is much talked about across multiple sections of society. From teenagers to middle-aged folks and even the older population, irrespective of gender, skincare is something that is for everyone. Today, skincare is one of the fastest-growing segments, to the extent that the skin care products market in India stands at a valuation of USD 6. 53 billion this year.
“With consumer expectations evolving rapidly as they become more conscious about what they put on their skin and the impact on the environment, skincare trends are constantly emerging,” says Antara Kundu, General Manager - Marketing, Branding & Customer Acquisition at The Body Shop, Asia South.
The year 2022 saw trends like Male Aesthetics, showing that men are also inclined toward the aesthetic industry. “It was reported that men require parallel care like that of women for their skin due to the effect induced by an unhealthy skincare routine. Another trend noticed in the year 2022 was the growth in AI-mediated energy-based devices,” says Dr Chytra V Anand, CEO & Founder of Kosmoderma Healthcare Private Limited.
As we approach the end of this year and gear up for the new year, here are some trends by the industry experts that are likely to rule the industry in 2023.
The days when skincare simply meant applying a lotion you bought at the store down the street are long gone. Today, consumers are incredibly mindful of the kind of products they use. They are increasingly leaning towards products that are formulated without animal testing, use ingredients sourced ethically, and don’t harm their skin or the environment. “Besides, they also choose products that suit their skin type and concerns. In the new year, we can expect to see a renewed focus on self-care and authenticity, with consumers seeking the healthiest version of their skin types to build skincare routines accordingly,” adds Kundu.
While some people may naturally have blemish-free, normal skin, thanks to genetics and perhaps their lifestyle, it is possible to make your unique skin type look and feel healthy and radiant without using tons of products. In fact, people are now increasingly accepting this and taking the ‘less is more’ concept, focusing on the quality of the product rather than the number of products they use. The idea of skinimalism is quickly catching on, and we’re likely to see more and more consumers taking this route, and it could seep into the makeup segment as well. A bare-faced but better approach where the lines between makeup and skincare blur is what we can expect in the coming year.
This is becoming one of the most popular cosmetic procedures since it is minimally invasive. Skin laxity frequently manifests as fine lines, or wrinkles on the face, neck, jawline, hands, abdomen, and thighs. “Skin laxity is a result of both intrinsic and external factors. Age, stress, and genetics are examples of intrinsic factors; exposure to sunlight, environmental pollutants, and smoking are examples of extrinsic factors. The major elements that keep the skin smooth and firm are proteins called collagen and elastin, both of which are affected by environmental influences,” adds Dr Anand. Numerous skin tightening techniques have been developed that help in reducing skin laxity thus enriching the skin by tightening it.
Another trend to look out for in the year 2023 is cool sculpting which is also a non-invasive treatment for skin by removing the unnecessary fatty tissues. In recent years, cool sculpting has become very trendy. Cool sculpting is a non-surgical procedure that lifts the skin naturally and enhances the skin by adding more definition.
The world of makeup has evolved drastically. “People have shed the ‘one size fits all’ mindset and are now celebrating their individuality. Rather than worrying about whether their style of makeup will blend with the ever-changing trends, makeup wearers are going for what suits them the best according to their preferences,” opines Kundu. So, whether they add a pop of colour, love a clean, fresh look, or go for strong, accentuated eyebrows and bold lip colours, the coming months will see different individualities being acknowledged and celebrated. | english |
{"photobox/photobox.css":"sha256-yXAL/UhDxvwIb4zipbyPiuEdlt1/NHvhW2kbGldfasA=","photobox/photobox.ie.css":"sha256-RfTNIaZt7DLo4RZ6uneMy+dEVtYoHb3mPqaC3wkRQJc=","photobox/photobox.ie.min.css":"sha256-qNcJRHFrLTW1y4LHVXkXtCWA5ERgwFyAWWR4n+c1OKQ=","photobox/photobox.js":"sha256-N9FGC4QTmowl4Od6VOjO6Zo1JCShC21PHlZrddOH7Tw=","photobox/photobox.min.css":"sha256-i73VEgxiFpAhbEltN4x46B8brG4C5D7QbF7PzUhAF2Y=","photobox/photobox.min.js":"sha256-7Cngfjc5SBALEGkQt19rkMyWNX6nmOUExTNsHdJPFEs="} | json |
version https://git-lfs.github.com/spec/v1
oid sha256:ecf4b53cb3182c4e7c1b3c288e52f27460af8856c56b4224153c08270eedb45d
size 19907
| json |
Last year, a Martian meteorite slammed into the Moroccan desert. Now, an analysis of the meteorite has been published in Science Express, and these black pieces of stone and glass give us an incredible look at the ancient history of the planet.
The researchers believe the Tissint Martian Meteorite was ejected from Mars some 700,000 years ago, and its composition is uniquely complex. The meteorite has three distinct different types of deposit, linked to different areas of Mars. The researchers think this can be blamed on Martian weathering, and that this hunk of rock was once heavily weathered by water on Mars. In the paper, the researchers conclude:
We propose the following scenario in order to explain the composite nature of Tissint. A picritic basalt was emplaced at or near the surface of Mars. After some period, the rock was weathered by fluids, which had leached elements from the Martian regolith. Subsequently, these fluids deposited mineral phases within fissures and cracks.
When the meteorite hit Earth, shock-induced melting spread through the weathering fractures, melting them into black glass. Even in this changed form, the unique chemical signatures remained, allowing the scientists to reconstruct the path of Tissint.
Every other example of a Martian meteorite has suffered weathering on our planet, too, which makes the Tissint sample one of the most pristine ever seen.
| english |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2012-2013 <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
try:
from setuptools import setup
from setuptools.extension import Extension
except ImportError:
from distutils.core import setup
from distutils.extension import Extension
from jsonstream import __author__, __email__, __license__, __version__
def do_setup(extensions=None):
setup(
name="jsonstream",
version=__version__,
description=__doc__,
long_description=open("README.rst").read(),
author=__author__,
author_email=__email__,
url="http://nigelsmall.com/jsonstream",
packages=[
"jsonstream",
],
license=__license__,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.3",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development",
],
ext_modules=extensions,
zip_safe=False,
)
try:
if sys.version_info >= (3,):
do_setup([Extension("jsonstream.cjsonstream",
["jsonstream/cjsonstream.c"])])
else:
do_setup([Extension("jsonstream.cjsonstream_2x",
["jsonstream/cjsonstream_2x.c"])])
except:
do_setup()
| python |
<reponame>hibernate/hibernate-semantic-query
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
*/
package org.hibernate.query.sqm.consume.spi;
import org.hibernate.query.sqm.tree.SqmDeleteStatement;
import org.hibernate.query.sqm.tree.SqmInsertSelectStatement;
import org.hibernate.query.sqm.tree.SqmQuerySpec;
import org.hibernate.query.sqm.tree.SqmSelectStatement;
import org.hibernate.query.sqm.tree.SqmStatement;
import org.hibernate.query.sqm.tree.SqmUpdateStatement;
import org.hibernate.query.sqm.tree.expression.BinaryArithmeticSqmExpression;
import org.hibernate.query.sqm.tree.expression.CaseSearchedSqmExpression;
import org.hibernate.query.sqm.tree.expression.CaseSimpleSqmExpression;
import org.hibernate.query.sqm.tree.expression.CoalesceSqmExpression;
import org.hibernate.query.sqm.tree.expression.CollectionSizeSqmExpression;
import org.hibernate.query.sqm.tree.expression.ConcatSqmExpression;
import org.hibernate.query.sqm.tree.expression.ConstantEnumSqmExpression;
import org.hibernate.query.sqm.tree.expression.ConstantFieldSqmExpression;
import org.hibernate.query.sqm.tree.expression.EntityTypeLiteralSqmExpression;
import org.hibernate.query.sqm.tree.expression.LiteralBigDecimalSqmExpression;
import org.hibernate.query.sqm.tree.expression.LiteralBigIntegerSqmExpression;
import org.hibernate.query.sqm.tree.expression.LiteralCharacterSqmExpression;
import org.hibernate.query.sqm.tree.expression.LiteralDoubleSqmExpression;
import org.hibernate.query.sqm.tree.expression.LiteralFalseSqmExpression;
import org.hibernate.query.sqm.tree.expression.LiteralFloatSqmExpression;
import org.hibernate.query.sqm.tree.expression.LiteralIntegerSqmExpression;
import org.hibernate.query.sqm.tree.expression.LiteralLongSqmExpression;
import org.hibernate.query.sqm.tree.expression.LiteralNullSqmExpression;
import org.hibernate.query.sqm.tree.expression.LiteralStringSqmExpression;
import org.hibernate.query.sqm.tree.expression.LiteralTrueSqmExpression;
import org.hibernate.query.sqm.tree.expression.NamedParameterSqmExpression;
import org.hibernate.query.sqm.tree.expression.NullifSqmExpression;
import org.hibernate.query.sqm.tree.expression.ParameterizedEntityTypeSqmExpression;
import org.hibernate.query.sqm.tree.expression.PositionalParameterSqmExpression;
import org.hibernate.query.sqm.tree.expression.SqmExpression;
import org.hibernate.query.sqm.tree.expression.SubQuerySqmExpression;
import org.hibernate.query.sqm.tree.expression.UnaryOperationSqmExpression;
import org.hibernate.query.sqm.tree.expression.domain.AbstractSpecificSqmCollectionIndexReference;
import org.hibernate.query.sqm.tree.expression.domain.SqmAttributeReference;
import org.hibernate.query.sqm.tree.expression.domain.SqmCollectionElementReference;
import org.hibernate.query.sqm.tree.expression.domain.SqmCollectionIndexReference;
import org.hibernate.query.sqm.tree.expression.domain.SqmEntityIdentifierReference;
import org.hibernate.query.sqm.tree.expression.domain.SqmEntityTypeSqmExpression;
import org.hibernate.query.sqm.tree.expression.domain.SqmMapEntryBinding;
import org.hibernate.query.sqm.tree.expression.domain.SqmMaxElementReference;
import org.hibernate.query.sqm.tree.expression.domain.SqmMinElementReference;
import org.hibernate.query.sqm.tree.expression.domain.SqmMinIndexReferenceBasic;
import org.hibernate.query.sqm.tree.expression.domain.SqmSingularAttributeReference;
import org.hibernate.query.sqm.tree.expression.function.AvgFunctionSqmExpression;
import org.hibernate.query.sqm.tree.expression.function.CastFunctionSqmExpression;
import org.hibernate.query.sqm.tree.expression.function.ConcatFunctionSqmExpression;
import org.hibernate.query.sqm.tree.expression.function.CountFunctionSqmExpression;
import org.hibernate.query.sqm.tree.expression.function.CountStarFunctionSqmExpression;
import org.hibernate.query.sqm.tree.expression.function.GenericFunctionSqmExpression;
import org.hibernate.query.sqm.tree.expression.function.LowerFunctionSqmExpression;
import org.hibernate.query.sqm.tree.expression.function.MaxFunctionSqmExpression;
import org.hibernate.query.sqm.tree.expression.function.MinFunctionSqmExpression;
import org.hibernate.query.sqm.tree.expression.function.SubstringFunctionSqmExpression;
import org.hibernate.query.sqm.tree.expression.function.SumFunctionSqmExpression;
import org.hibernate.query.sqm.tree.expression.function.TrimFunctionSqmExpression;
import org.hibernate.query.sqm.tree.expression.function.UpperFunctionSqmExpression;
import org.hibernate.query.sqm.tree.from.SqmFromElementSpace;
import org.hibernate.query.sqm.tree.from.SqmAttributeJoin;
import org.hibernate.query.sqm.tree.from.SqmCrossJoin;
import org.hibernate.query.sqm.tree.from.SqmEntityJoin;
import org.hibernate.query.sqm.tree.from.SqmFromClause;
import org.hibernate.query.sqm.tree.from.SqmJoin;
import org.hibernate.query.sqm.tree.from.SqmRoot;
import org.hibernate.query.sqm.tree.order.SqmOrderByClause;
import org.hibernate.query.sqm.tree.order.SqmSortSpecification;
import org.hibernate.query.sqm.tree.paging.SqmLimitOffsetClause;
import org.hibernate.query.sqm.tree.predicate.AndSqmPredicate;
import org.hibernate.query.sqm.tree.predicate.BetweenSqmPredicate;
import org.hibernate.query.sqm.tree.predicate.BooleanExpressionSqmPredicate;
import org.hibernate.query.sqm.tree.predicate.EmptinessSqmPredicate;
import org.hibernate.query.sqm.tree.predicate.GroupedSqmPredicate;
import org.hibernate.query.sqm.tree.predicate.InListSqmPredicate;
import org.hibernate.query.sqm.tree.predicate.InSubQuerySqmPredicate;
import org.hibernate.query.sqm.tree.predicate.LikeSqmPredicate;
import org.hibernate.query.sqm.tree.predicate.MemberOfSqmPredicate;
import org.hibernate.query.sqm.tree.predicate.NegatedSqmPredicate;
import org.hibernate.query.sqm.tree.predicate.NullnessSqmPredicate;
import org.hibernate.query.sqm.tree.predicate.OrSqmPredicate;
import org.hibernate.query.sqm.tree.predicate.RelationalSqmPredicate;
import org.hibernate.query.sqm.tree.predicate.SqmWhereClause;
import org.hibernate.query.sqm.tree.select.SqmDynamicInstantiation;
import org.hibernate.query.sqm.tree.select.SqmSelectClause;
import org.hibernate.query.sqm.tree.select.SqmSelection;
import org.hibernate.query.sqm.tree.set.SqmAssignment;
import org.hibernate.query.sqm.tree.set.SqmSetClause;
/**
* @author <NAME>
*/
@SuppressWarnings({"unchecked", "WeakerAccess"})
public class BaseSemanticQueryWalker<T> implements SemanticQueryWalker<T> {
@Override
public T visitStatement(SqmStatement statement) {
return statement.accept( this );
}
@Override
public T visitSelectStatement(SqmSelectStatement statement) {
visitQuerySpec( statement.getQuerySpec() );
return (T) statement;
}
@Override
public T visitUpdateStatement(SqmUpdateStatement statement) {
visitRootEntityFromElement( statement.getEntityFromElement() );
visitSetClause( statement.getSetClause() );
visitWhereClause( statement.getWhereClause() );
return (T) statement;
}
@Override
public T visitSetClause(SqmSetClause setClause) {
for ( SqmAssignment assignment : setClause.getAssignments() ) {
visitAssignment( assignment );
}
return (T) setClause;
}
@Override
public T visitAssignment(SqmAssignment assignment) {
visitAttributeReferenceExpression( assignment.getStateField() );
assignment.getStateField().accept( this );
return (T) assignment;
}
@Override
public T visitInsertSelectStatement(SqmInsertSelectStatement statement) {
visitRootEntityFromElement( statement.getInsertTarget() );
for ( SqmSingularAttributeReference stateField : statement.getStateFields() ) {
stateField.accept( this );
}
visitQuerySpec( statement.getSelectQuery() );
return (T) statement;
}
@Override
public T visitDeleteStatement(SqmDeleteStatement statement) {
visitRootEntityFromElement( statement.getEntityFromElement() );
visitWhereClause( statement.getWhereClause() );
return (T) statement;
}
@Override
public T visitQuerySpec(SqmQuerySpec querySpec) {
visitFromClause( querySpec.getFromClause() );
visitSelectClause( querySpec.getSelectClause() );
visitWhereClause( querySpec.getWhereClause() );
visitOrderByClause( querySpec.getOrderByClause() );
visitLimitOffsetClause( querySpec.getLimitOffsetClause() );
return (T) querySpec;
}
@Override
public T visitFromClause(SqmFromClause fromClause) {
for ( SqmFromElementSpace fromElementSpace : fromClause.getFromElementSpaces() ) {
visitFromElementSpace( fromElementSpace );
}
return (T) fromClause;
}
@Override
public T visitFromElementSpace(SqmFromElementSpace fromElementSpace) {
visitRootEntityFromElement( fromElementSpace.getRoot() );
for ( SqmJoin joinedFromElement : fromElementSpace.getJoins() ) {
joinedFromElement.accept( this );
}
return (T) fromElementSpace;
}
@Override
public T visitCrossJoinedFromElement(SqmCrossJoin joinedFromElement) {
return (T) joinedFromElement;
}
@Override
public T visitQualifiedEntityJoinFromElement(SqmEntityJoin joinedFromElement) {
return (T) joinedFromElement;
}
@Override
public T visitQualifiedAttributeJoinFromElement(SqmAttributeJoin joinedFromElement) {
return (T) joinedFromElement;
}
@Override
public T visitRootEntityFromElement(SqmRoot rootEntityFromElement) {
return (T) rootEntityFromElement;
}
@Override
public T visitSelectClause(SqmSelectClause selectClause) {
for ( SqmSelection selection : selectClause.getSelections() ) {
visitSelection( selection );
}
return (T) selectClause;
}
@Override
public T visitSelection(SqmSelection selection) {
selection.getExpression().accept( this );
return (T) selection;
}
@Override
public T visitDynamicInstantiation(SqmDynamicInstantiation dynamicInstantiation) {
return (T) dynamicInstantiation;
}
@Override
public T visitWhereClause(SqmWhereClause whereClause) {
whereClause.getPredicate().accept( this );
return (T) whereClause;
}
@Override
public T visitGroupedPredicate(GroupedSqmPredicate predicate) {
predicate.getSubPredicate().accept( this );
return (T) predicate;
}
@Override
public T visitAndPredicate(AndSqmPredicate predicate) {
predicate.getLeftHandPredicate().accept( this );
predicate.getRightHandPredicate().accept( this );
return (T) predicate;
}
@Override
public T visitOrPredicate(OrSqmPredicate predicate) {
predicate.getLeftHandPredicate().accept( this );
predicate.getRightHandPredicate().accept( this );
return (T) predicate;
}
@Override
public T visitRelationalPredicate(RelationalSqmPredicate predicate) {
predicate.getLeftHandExpression().accept( this );
predicate.getRightHandExpression().accept( this );
return (T) predicate;
}
@Override
public T visitIsEmptyPredicate(EmptinessSqmPredicate predicate) {
predicate.getExpression().accept( this );
return (T) predicate;
}
@Override
public T visitIsNullPredicate(NullnessSqmPredicate predicate) {
predicate.getExpression().accept( this );
return (T) predicate;
}
@Override
public T visitBetweenPredicate(BetweenSqmPredicate predicate) {
predicate.getExpression().accept( this );
predicate.getLowerBound().accept( this );
predicate.getUpperBound().accept( this );
return (T) predicate;
}
@Override
public T visitLikePredicate(LikeSqmPredicate predicate) {
predicate.getMatchExpression().accept( this );
predicate.getPattern().accept( this );
predicate.getEscapeCharacter().accept( this );
return (T) predicate;
}
@Override
public T visitMemberOfPredicate(MemberOfSqmPredicate predicate) {
predicate.getPluralAttributeReference().accept( this );
return (T) predicate;
}
@Override
public T visitNegatedPredicate(NegatedSqmPredicate predicate) {
predicate.getWrappedPredicate().accept( this );
return (T) predicate;
}
@Override
public T visitInListPredicate(InListSqmPredicate predicate) {
predicate.getTestExpression().accept( this );
for ( SqmExpression expression : predicate.getListExpressions() ) {
expression.accept( this );
}
return (T) predicate;
}
@Override
public T visitInSubQueryPredicate(InSubQuerySqmPredicate predicate) {
predicate.getTestExpression().accept( this );
predicate.getSubQueryExpression().accept( this );
return (T) predicate;
}
@Override
public T visitBooleanExpressionPredicate(BooleanExpressionSqmPredicate predicate) {
predicate.getBooleanExpression().accept( this );
return (T) predicate;
}
@Override
public T visitOrderByClause(SqmOrderByClause orderByClause) {
if ( orderByClause.getSortSpecifications() != null ) {
for ( SqmSortSpecification sortSpecification : orderByClause.getSortSpecifications() ) {
visitSortSpecification( sortSpecification );
}
}
return (T) orderByClause;
}
@Override
public T visitSortSpecification(SqmSortSpecification sortSpecification) {
sortSpecification.getSortExpression().accept( this );
return (T) sortSpecification;
}
@Override
public T visitLimitOffsetClause(SqmLimitOffsetClause limitOffsetClause) {
if ( limitOffsetClause != null ) {
if ( limitOffsetClause.getLimitExpression() != null ) {
limitOffsetClause.getLimitExpression().accept( this );
}
if ( limitOffsetClause.getOffsetExpression() != null ) {
limitOffsetClause.getOffsetExpression().accept( this );
}
}
return (T) limitOffsetClause;
}
@Override
public T visitPositionalParameterExpression(PositionalParameterSqmExpression expression) {
return (T) expression;
}
@Override
public T visitNamedParameterExpression(NamedParameterSqmExpression expression) {
return (T) expression;
}
@Override
public T visitEntityTypeLiteralExpression(EntityTypeLiteralSqmExpression expression) {
return (T) expression;
}
@Override
public T visitEntityTypeExpression(SqmEntityTypeSqmExpression expression) {
return (T) expression;
}
@Override
public T visitParameterizedEntityTypeExpression(ParameterizedEntityTypeSqmExpression expression) {
return (T) expression;
}
@Override
public T visitUnaryOperationExpression(UnaryOperationSqmExpression expression) {
expression.getOperand().accept( this );
return (T) expression;
}
@Override
public T visitAttributeReferenceExpression(SqmAttributeReference expression) {
return (T) expression;
}
@Override
public T visitGenericFunction(GenericFunctionSqmExpression expression) {
return (T) expression;
}
@Override
public T visitCastFunction(CastFunctionSqmExpression expression) {
return (T) expression;
}
@Override
public T visitAvgFunction(AvgFunctionSqmExpression expression) {
return (T) expression;
}
@Override
public T visitCountStarFunction(CountStarFunctionSqmExpression expression) {
return (T) expression;
}
@Override
public T visitCountFunction(CountFunctionSqmExpression expression) {
return (T) expression;
}
@Override
public T visitMaxFunction(MaxFunctionSqmExpression expression) {
return (T) expression;
}
@Override
public T visitMinFunction(MinFunctionSqmExpression expression) {
return (T) expression;
}
@Override
public T visitSumFunction(SumFunctionSqmExpression expression) {
return (T) expression;
}
@Override
public T visitPluralAttributeSizeFunction(CollectionSizeSqmExpression function) {
return (T) function;
}
@Override
public T visitPluralAttributeElementBinding(SqmCollectionElementReference binding) {
return (T) binding;
}
@Override
public T visitPluralAttributeIndexFunction(SqmCollectionIndexReference binding) {
return (T) binding;
}
@Override
public T visitMapKeyBinding(SqmCollectionIndexReference binding) {
return (T) binding;
}
@Override
public T visitMapEntryFunction(SqmMapEntryBinding binding) {
return (T) binding;
}
@Override
public T visitMaxElementBinding(SqmMaxElementReference binding) {
return (T) binding;
}
@Override
public T visitMinElementBinding(SqmMinElementReference binding) {
return (T) binding;
}
@Override
public T visitMaxIndexFunction(AbstractSpecificSqmCollectionIndexReference function) {
return (T) function;
}
@Override
public T visitMinIndexFunction(SqmMinIndexReferenceBasic function) {
return (T) function;
}
@Override
public T visitLiteralStringExpression(LiteralStringSqmExpression expression) {
return (T) expression;
}
@Override
public T visitLiteralCharacterExpression(LiteralCharacterSqmExpression expression) {
return (T) expression;
}
@Override
public T visitLiteralDoubleExpression(LiteralDoubleSqmExpression expression) {
return (T) expression;
}
@Override
public T visitLiteralIntegerExpression(LiteralIntegerSqmExpression expression) {
return (T) expression;
}
@Override
public T visitLiteralBigIntegerExpression(LiteralBigIntegerSqmExpression expression) {
return (T) expression;
}
@Override
public T visitLiteralBigDecimalExpression(LiteralBigDecimalSqmExpression expression) {
return (T) expression;
}
@Override
public T visitLiteralFloatExpression(LiteralFloatSqmExpression expression) {
return (T) expression;
}
@Override
public T visitLiteralLongExpression(LiteralLongSqmExpression expression) {
return (T) expression;
}
@Override
public T visitLiteralTrueExpression(LiteralTrueSqmExpression expression) {
return (T) expression;
}
@Override
public T visitLiteralFalseExpression(LiteralFalseSqmExpression expression) {
return (T) expression;
}
@Override
public T visitLiteralNullExpression(LiteralNullSqmExpression expression) {
return (T) expression;
}
@Override
public T visitConcatExpression(ConcatSqmExpression expression) {
expression.getLeftHandOperand().accept( this );
expression.getRightHandOperand().accept( this );
return (T) expression;
}
@Override
public T visitConcatFunction(ConcatFunctionSqmExpression expression) {
for ( SqmExpression argument : expression.getExpressions() ) {
argument.accept( this );
}
return (T) expression;
}
@Override
public T visitConstantEnumExpression(ConstantEnumSqmExpression expression) {
return (T) expression;
}
@Override
public T visitConstantFieldExpression(ConstantFieldSqmExpression expression) {
return (T) expression;
}
@Override
public T visitBinaryArithmeticExpression(BinaryArithmeticSqmExpression expression) {
return (T) expression;
}
@Override
public T visitSubQueryExpression(SubQuerySqmExpression expression) {
return (T) expression;
}
@Override
public T visitSimpleCaseExpression(CaseSimpleSqmExpression expression) {
return (T) expression;
}
@Override
public T visitSearchedCaseExpression(CaseSearchedSqmExpression expression) {
return (T) expression;
}
@Override
public T visitCoalesceExpression(CoalesceSqmExpression expression) {
return (T) expression;
}
@Override
public T visitNullifExpression(NullifSqmExpression expression) {
return (T) expression;
}
@Override
public T visitSubstringFunction(SubstringFunctionSqmExpression expression) {
return (T) expression;
}
@Override
public T visitTrimFunction(TrimFunctionSqmExpression expression) {
return (T) expression;
}
@Override
public T visitLowerFunction(LowerFunctionSqmExpression expression) {
return (T) expression;
}
@Override
public T visitEntityIdentifierBinding(SqmEntityIdentifierReference expression) {
return (T) expression;
}
@Override
public T visitUpperFunction(UpperFunctionSqmExpression expression) {
return (T) expression;
}
}
| java |
<gh_stars>1-10
{"acadYear":"2019/2020","preclusion":"Any student pursuing or having obtained a basic law degree in a civil law jurisdiction is precluded from taking this course. This course is for common law students who\nhave not studied the civil law.","description":"This course looks mainly at contract law but also at some issues of commercial law in civil law jurisdictions in Asia using as examples a few Asian civil and commercial codes (for example the Indonesian codes which are similar to the\nFrench codes). It also looks at civil law in general as, unfortunately, more materials are available in English on European civil law than on Asian civil law. The course is\ncomparative in nature as it will compare civil and common law solutions. It would be a useful course for those who will works for firms with dealings across Asia.","title":"Contract and Commercial Law in Civil-Law Asia","department":"FoL Dean's Office","faculty":"Law","workload":[0,3,0,2,5],"prerequisite":"NUS Compulsory Core Curriculum or its equivalent. \n\nContract Law (or the equivalent common law contract course for exchange and graduate students)","moduleCredit":"4","moduleCode":"LL6017","semesterData":[]}
| json |
# PowerShell-GetAzPublicContainers
Script to run in your Azure environment to identify public containers.
Script connects to your Azure enviroment, gets all storage accounts from all subscriptions and checks if any containers are public (have access as "Blob" or "Container").
Script uses read-only cmdlets: Connect-AzAccount, Get-AzSubscription, Select-AzSubscription, Get-AzStorageAccount, Get-AzRmStorageContainer.
#### Prerequisites
- Script requires Azure modules (Az.Storage, Az.Accounts). Run `Install-Module Az.Storage, Az.Accounts` as administrator to install them.
- An Azure user account (with default Azure settings non-priviliged user account is ok).
#### Usage
1. Download the script
2. Allow script to run
3. Import function from the script
4. Run the function
```
#Download the script
Invoke-WebRequest -Uri https://raw.githubusercontent.com/vradchenko/PowerShell-GetAzPublicContainers/main/Get-AzPublicContainers.ps1 -OutFile Get-AzPublicContainers.ps1
#Update ExecutionPolicy for this session only to allow script to run
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
#Import function from the script
. .\Get-AzPublicContainers.ps1
#Run the function (and save results to a variable)
$containers = Get-AzPublicContainers
```
#### Output
Array of objects containing the following attributes of a public container:
- AzureSubscription
- StorageAccount
- StorageContainer
- PublicAccess
- LastModifiedTime
| markdown |
MediaTek has announced the availability of MT2533D, a highly integrated chipset for smart, connected headphones, headsets, earpieces and hands-free systems.
The MT2533D is designed for wireless headphones and in-vehicle hands-free systems, giving users an optimal experience whether they are listening or speaking. The MT2533D chipset is also ideal for stand-alone sports headsets or travel earpieces as it offers local MP3 playback, making music playback possible without the need to pair a smartphone. Such devices could offer users access to up to 1000 tracks using the support for 4GB external storage.
The MT 2533D combines an audio Analog Front End (AFE) and Digital Signal Processor (DSP) with an energy-efficient ARM Cortex-M4 processor, 4MB memory (PSRAM and flash) and dual-mode Bluetooth (2.1 and 4.2 Low Energy) radio.
To support applications that need advanced audio management, MT2533D integrates a DSP that comes with 128KB IRAM, 250KB DRAM, and 96KB SRAM for various speech enhancement algorithms. This DSP delivers native Dual Microphone Noise Reduction (DMNR) technology and supports third-party software for a voice wake-up command. It also supports A2DP, HFP, Advanced Wireless Stereo, and MP3 local playback.
Whether playing music, taking part in a conference call or making a hands-free call from a car, MT2533D offers high-quality audio with minimal power consumption. The chipset can also act as the MCU for other applications, which can include biosensing. In addition, it offers display and camera interfaces, and can work with additional connectivity, such as Wi-Fi, using the SDIO feature.
MT2533D is one of a series of chipsets supported by the MediaTek LinkIt Development Platform for RTOS. Key features of this platform include:
· Based on the popular FreeRTOS, with additional open-source modules (source code available).
· Supports chipsets based on the ARM Cortex-M4 architecture, offering high performance, low power connectivity.
· Development and debugging in ARM Keil μVision, IAR Embedded Workbench and GCC.
The chipset will be available to device makers in Q1 2017.
| english |
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template
*/
package GUI_Fichero_csv;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import javax.swing.JFileChooser;
import javax.swing.table.DefaultTableModel;
/**
*
* @author Gemelos
*/
public class Ver extends javax.swing.JFrame {
DefaultTableModel modeloTabla;
JFileChooser archivo = new JFileChooser (System.getProperty("C:"));
private void cargar(){
try{
String texto = "";
Object cabeceras[]={"Marca","Producto","Tipo","Costo","Calorias","Grasa","Calorias de Sodio","Sodio"};
modeloTabla = new DefaultTableModel(cabeceras,0);
archivo.showOpenDialog(this);
File abrir = archivo.getSelectedFile();
Object[] elemento = new Object[8];
if (abrir!=null){
FileReader fichero = new FileReader(abrir);
BufferedReader leer = new BufferedReader (fichero);
while((texto = leer.readLine())!=null){
String registro[] = texto.split(";");
elemento[0]=registro[0];
elemento[1]=registro[1];
elemento[2]=registro[2];
elemento[3]=registro[3];
elemento[4]=registro[4];
elemento[5]=registro[5];
elemento[6]=registro[6];
elemento[7]=registro[7];
modeloTabla.addRow(elemento);
}
jTable1.setModel(modeloTabla);
}
}catch(IOException e){
System.out.println("Error: "+e);
}
}
public Ver() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jScrollPane1.setViewportView(jTable1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(39, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 884, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(16, 16, 16))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(94, 94, 94)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 367, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(258, Short.MAX_VALUE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
/**
* @param args the command line arguments
*/
// public static void main(String args[]) {
// /* Set the Nimbus look and feel */
// //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
// /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
// * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
// */
// try {
// for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
// if ("Nimbus".equals(info.getName())) {
// javax.swing.UIManager.setLookAndFeel(info.getClassName());
// break;
// }
// }
// } catch (ClassNotFoundException ex) {
// java.util.logging.Logger.getLogger(Ver.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
// } catch (InstantiationException ex) {
// java.util.logging.Logger.getLogger(Ver.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
// } catch (IllegalAccessException ex) {
// java.util.logging.Logger.getLogger(Ver.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
// } catch (javax.swing.UnsupportedLookAndFeelException ex) {
// java.util.logging.Logger.getLogger(Ver.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
// }
// //</editor-fold>
//
// /* Create and display the form */
// java.awt.EventQueue.invokeLater(new Runnable() {
// public void run() {
// new Ver().setVisible(true);
// }
// });
// }
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable jTable1;
// End of variables declaration//GEN-END:variables
}
| java |
Norwich City were crowned champions of the second-tier Championship on Saturday as they roared back to beat Reading 4-1 at Carrow Road.
Daniel Farke’s side were promoted back to the Premier League at their first attempt two weeks ago, but defeats by Bournemouth and fellow promoted club Watford meant they had to wait until their penultimate game of the season to secure the title.
Reading midfielder Josh Laurent gave the visitors a 12th minute lead but Kieran Dowell struck either side of halftime to turn the game on its head.
Xavi Quintilla’s curling free kick into the top corner made it 3-1 before Teemu Pukki added gloss to the scoreline with his 26th goal of the campaign.
Meanwhile, second-placed Watford went down 2-0 at Brentford, who had already booked a playoff spot.
Ivan Toney scored his 30th Championship goal of the season with a penalty after Marcus Forss opened the scoring as Brentford ensured a second successive third-place finish.
Their points tally of 84 would have guaranteed automatic promotion last season but they must now attempt to avoid another heartbreak in the promotion playoffs, having lost to Fulham in the final last season.
Wayne Rooney’s Derby County will take their fight for survival to the final day of the season after fourth-placed Swansea City, who are also through to the playoffs, came from behind to beat them 2-1.
Derby are three points clear of the relegation zone, but Rotherham United could close that gap if they win their game in hand at Luton Town on Tuesday.
The other two teams in the playoffs are fifth-placed Bournemouth, who lost 1-0 at bottom side Wycombe Wanderers, and sixth-placed Barnsley, who went down 2-0 at Preston North End.
Read all the Latest News, Breaking News and Coronavirus News here. Follow us on Facebook, Twitter and Telegram. (This story has not been edited by News18 staff and is published from a syndicated news agency feed - Reuters) | english |
<reponame>hungrywarrior081/sunday-fast-backend
package io.renren.modules.app.dao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.renren.modules.app.dto.GoodsDto;
import io.renren.modules.app.entity.GoodsEntity;
/**
* @author taoz
* @email <EMAIL>
* @date 2019-05-20 16:07:41
*/
@Mapper
public interface GoodsDao extends BaseMapper<GoodsEntity> {
/**
* 商品分页
*
* @param page
* @param goodsDto
* @return
*/
IPage getGoodsPage(Page page, @Param("query") GoodsDto goodsDto);
/**
* 商品列表
* @param page
* @param params
* @return
*/
Page goodsList(Page page, GoodsDto params);
}
| java |
<gh_stars>1-10
{
"Name": "Aimtech Glock-Basis",
"ShortName": "G Basis VH",
"Description": "Aimtech Basis-Visierhalterung."
} | json |
<reponame>matchilling/org.programmingtalks.www
{
"description": "With Spring and Hibernate on your stack, your application's bytecode is likely enhanced or manipulated at runtime. This session examines three common byte code manipulation frameworks: ASM, CGLib, and Javassist (Java Programming Assistant). We will discuss how these tools work and why frameworks like Spring use them. You will learn enough to begin integrating these frameworks directly into your own code.",
"id": "52832d71-9f39-4500-8088-d2e9d42bee9e",
"meta": {
"duration": "PT55M1S"
},
"presenter": {
"name": "<NAME>"
},
"slug": "living-in-the-matrix-with-bytecode-manipulation",
"source": {
"id": "39kdr1mNZ_s",
"provider": "youtube"
},
"tag": ["Spring Framework", "Java"],
"title": "Living in the Matrix with Bytecode Manipulation",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/39kdr1mNZ_s/default.jpg",
"width": 120,
"height": 90
},
"medium": {
"url": "https://i.ytimg.com/vi/39kdr1mNZ_s/mqdefault.jpg",
"width": 320,
"height": 180
},
"high": {
"url": "https://i.ytimg.com/vi/39kdr1mNZ_s/hqdefault.jpg",
"width": 480,
"height": 360
}
}
}
| json |
function(doc, req) {
return !doc._id.match('_design/(.*)');
} | javascript |
<reponame>Nike-Inc/cerberus-lifecycle-cli
/*
* Copyright (c) 2019 Nike, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.nike.cerberus.domain.cloudformation;
public class ConfigOutputs {
private String configBucketDomainName;
private String configBucketName;
private String configCmkArn;
private String managementServiceCmkArn;
public String getConfigBucketDomainName() {
return configBucketDomainName;
}
public ConfigOutputs setConfigBucketDomainName(String configBucketDomainName) {
this.configBucketDomainName = configBucketDomainName;
return this;
}
public String getConfigBucketName() {
return configBucketName;
}
public ConfigOutputs setConfigBucketName(String configBucketName) {
this.configBucketName = configBucketName;
return this;
}
public String getConfigCmkArn() {
return configCmkArn;
}
public void setConfigCmkArn(String configCmkArn) {
this.configCmkArn = configCmkArn;
}
public String getManagementServiceCmkArn() {
return managementServiceCmkArn;
}
public void setManagementServiceCmkArn(String managementServiceCmkArn) {
this.managementServiceCmkArn = managementServiceCmkArn;
}
}
| java |
Total revenue from operations grew nearly 35% on year to Rs 12,498 crore. Net interest income for the quarter increased by 26% on year to Rs 8,398 crore.
The number of new loans booked during the quarter grew by a sharp 34% on year to 9.94 million, and were the highest ever in a quarter.
The assets under management (AUM) as of June 30, stood at Rs 2.70 lakh crore, up 32% from the year-ago period. The company recorded highest-ever quarterly increase in its AUM of Rs 22,718 crore. AUM mix remained stable in the last quarter.
Loan losses and provisions for the quarter was Rs 995 crore, compared to Rs 755 crore a year ago. The company held a management and macro-economic overlay of Rs 840 crore as of June 30, it said.
The gross non-performing asset (NPA) ratio was 0.87% as of June-end, compared with 1.25% a year ago. The net NPA ratio was 0.31%, compared with 0.51% a year earlier.
The company had a provisioning coverage ratio of 65% on stage-3 assets as of June 30.
Download The Economic Times News App to get Daily Market Updates & Live Business News.
Subscribe to The Economic Times Prime and read the Economic Times ePaper Online.and Sensex Today.
| english |
package com.konnectkode.kafka.cdi.annotation;
import org.apache.kafka.common.serialization.Deserializer;
import org.apache.kafka.common.serialization.StringDeserializer;
import java.lang.annotation.*;
import java.time.Duration;
/**
* Identifies the method to register as a KafkaConsumer and consume kafka cluster records.
*/
@Inherited
@Documented
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Consumer {
/**
* <p>
* The list of topics to subscribe to
* </p>
*/
String[] topics();
/**
* <p>
* A unique string that identifies the consumer group this consumer belongs to.
* </p>
*/
String groupId() default "";
/**
* What to do when there is no initial offset in Kafka or if the current offset does not exist any more on the server (e.g. because that data has been deleted):
*
* <ul>
* <li>earliest: automatically reset the offset to the earliest offset</li>
* <li>latest: automatically reset the offset to the latest offset</li>
* <li>none: throw exception to the consumer if no previous offset is found for the consumer's group</li>
* <li>anything else: throw exception to the consumer.</li>
* </ul>
*/
String offset() default "latest";
/**
* Deserializer class for key that implements the <code>org.apache.kafka.common.serialization.Deserializer</code> interface.
*/
Class<? extends Deserializer> keyDeserializer() default StringDeserializer.class;
/**
* Deserializer class for value that implements the <code>org.apache.kafka.common.serialization.Deserializer</code> interface.
*/
Class<? extends Deserializer> valueDeserializer() default StringDeserializer.class;
/**
* <p>
* Specifies {@linkplain org.apache.kafka.clients.consumer.KafkaConsumer#close(Duration)} timeout in milliseconds.
* </p>
* <p>
* The default the value is the same value of the KafkaConsumer.
* </p>
*/
long closeTimeout() default 30 * 1000;
}
| java |
The eagerly awaited series between Australia and India will start tomorrow in New Delhi, where the Men in Blue will try to continue their dominance by winning another game, while the Kangaroos will put a lot of effort into winning the opening game.
Given the prior performance, the spin-heavy nature of the Delhi pitch, and the type of spinners India possesses, it will be difficult for the Kangaroos to challenge the Men in Blue.
Cheteshwar Pujara, the top middle-order batter for India, will be celebrating a memorable occasion as he competes in his 100th Test match in New Delhi.
An Indian celebrity visited with Prime Minister Narendra Modi in New Delhi to ask for his blessings before a significant event in his life.
Even BCCI retweeted that post, which he also captioned on his official social media account.
After completing his training at the National Cricket Academy, Shreyas Iyer is ready to join the Test squad and will do so in the near future in New Delhi.
Iyer has been a constant for India in the game’s longest format, so having him around will be quite beneficial.
Due in large part to the level of interest it has attracted over the past few years, the Border-Gavaskar Trophy has made headlines on three separate occasions.
After Men in Blue won back-to-back series on Australian soil thanks to some miraculous individual performance, the event is eagerly anticipated.
| english |
<gh_stars>0
/**
* This class is a generic implementation of a finite state machine.
*
* You should initialize it with a start state and add some transitions to
* the machine. You can then trigger state transitions using the "trigger"
* method by providing the appropriate action definition and a callback or
* promise that should be performed during that transition.
*/
export default class StateMachine {
/**
* Create a new StateMachine with a given initial state. The machine does
* not have any transitions yet. You must add transitions before calling
* the "trigger" method for the first time. Triggering an undefined
* (state,action)-pair will raise an exception.
*/
constructor(initialState) {
this.state = initialState;
this.callbacks = [];
this.transitions = {};
}
/**
* Add a transition from oldState when receiving a given action.
* The new state will be newState.
*/
addTransition(oldState, action, newState) {
if(!this.transitions[oldState]) {
this.transitions[oldState] = {};
}
this.transitions[oldState][action] = newState;
}
_transitState(newState) {
const oldState = this.state;
this.state = newState;
for(let cb of this.callbacks) {
cb(oldState, newState);
}
}
/**
* Trigger an action. The state transition will be done
* - immediately, if "promise" is a function or
* - or when "promise" is resolved, in case it is a Promise.
*
* This method may throw an exception when no appropriate
* transition has been defined.
*/
trigger(action, promise) {
const that = this;
if(this.transitions[this.state] && this.transitions[this.state][action]) {
return new Promise((resolve, reject) => {
const finalize = () => {
that._transitState(that.transitions[that.state][action]);
resolve();
};
if(typeof promise == 'function') {
promise().then(finalize);
} else {
finalize();
}
});
}
throw 'Undefined state transition: {state: ' + this.state + ', action: ' + action + '}';
}
/**
* Get the current state.
*/
getState() {
return this.state;
}
/**
* Callback function that will be executed when a given state is entered.
*/
onStateEnter(state, callback) {
if(typeof callback == 'function') {
this.onStateChange(function(oldState, newState) {
if(newState == state) {
callback();
}
});
}
}
/**
* Callback function that will be executed when a given state is left.
*/
onStateLeave(state, callback) {
if(typeof callback == 'function') {
this.onStateChange(function(oldState, newState) {
if(oldState == state) {
callback();
}
})
}
}
/**
* Callback function that will be executed on any state change.
*/
onStateChange(callback) {
if(typeof callback == 'function') {
this.callbacks.push(callback);
}
}
};
| javascript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.