text
stringlengths 1
1.04M
| language
stringclasses 25
values |
|---|---|
{
"_from": "angular-datatables@v0.6.2",
"_id": "angular-datatables@0.6.2",
"_inBundle": false,
"_integrity": "sha1-wBiAr7eeWydoLg7RKx3BovmA9N4=",
"_location": "/angular-datatables",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "angular-datatables@v0.6.2",
"name": "angular-datatables",
"escapedName": "angular-datatables",
"rawSpec": "v0.6.2",
"saveSpec": null,
"fetchSpec": "v0.6.2"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/angular-datatables/-/angular-datatables-0.6.2.tgz",
"_shasum": "c01880afb79e5b27682e0ed12b1dc1a2f980f4de",
"_spec": "angular-datatables@v0.6.2",
"_where": "E:\\",
"author": {
"name": "l-lin"
},
"bundleDependencies": false,
"dependencies": {
"angular": ">=1.6.0",
"datatables.net": "^1.10.11",
"datatables.net-dt": "^1.10.11",
"jquery": ">=1.11.0"
},
"deprecated": false,
"description": "angular-datatables [](https://travis-ci.org/l-lin/angular-datatables) [](http://gruntjs.com/) [](http://waffle.io/l-lin/angular-datatables) ================ > Angular module that provides a `datatable` directive along with datatable options helpers.",
"devDependencies": {
"body-parser": "~1.8.1",
"express": "~4.10.1",
"grunt": "~0.4.1",
"grunt-angular-templates": "~0.5.1",
"grunt-contrib-clean": "0.5.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-cssmin": "~0.7.0",
"grunt-contrib-jshint": "~0.7.1",
"grunt-contrib-uglify": "~0.6.0",
"grunt-contrib-watch": "~0.5.2",
"grunt-express": "1.4.1",
"grunt-jsbeautifier": "~0.2.2",
"grunt-karma": "~0.6.2",
"grunt-ng-annotate": "~0.8.0",
"grunt-parallel": "^0.4.1",
"grunt-wrap": "~0.3.0",
"jshint-stylish": "~0.1.3",
"karma": "~0.10.8",
"karma-chrome-launcher": "~0.1.0",
"karma-firefox-launcher": "~0.1.2",
"karma-html2js-preprocessor": "~0.1.0",
"karma-jasmine": "~0.1.4",
"karma-ng-html2js-preprocessor": "~0.1.0",
"karma-ng-scenario": "~0.1.0",
"karma-phantomjs-launcher": "~0.1.0",
"karma-script-launcher": "~0.1.0",
"load-grunt-config": "~0.7.2",
"load-grunt-tasks": "~0.2.0",
"time-grunt": "~0.2.0"
},
"engines": {
"node": ">=0.8.0"
},
"ignore": [
".bowerrc",
".editorconfig",
".git*",
".jshintrc",
".esformatter",
"Gruntfile.js",
"test",
"src",
".travis.yml",
"vendor",
"data.json",
"data1.json",
"demo",
"favicon.png",
"index.html",
"README.md",
"CONTRIBUTING.md",
"server.js",
"styles",
"_config.yml",
"grunt",
"images",
"bower.json",
"archives",
"archives.json",
"dtOptions.json",
"dtColumns.json"
],
"main": "index.js",
"name": "angular-datatables",
"scripts": {
"test": "grunt test"
},
"version": "0.6.2"
}
|
json
|
<reponame>charles-halifax/recipes
{
"directions": [
"Place cantaloupe balls in a small bowl. Pour in enough grain alcohol to cover them halfway. Let infuse, turning occasionally, 4 hours to overnight.",
"Fill a cocktail shaker with ice. Add pineapple juice, orange juice, raspberry vodka, and coconut rum. Cover and shake until outside of the shaker is frosted. Strain into a glass. Add spiked cantaloupe balls and grenadine syrup."
],
"ingredients": [
"Spiked Melon Balls:",
"2 cantaloupe balls",
"2 tablespoons 190 proof grain alcohol (such as Everclear\u00ae), or as needed",
"large ice cubes (optional)",
"2 fluid ounces pineapple juice",
"2 fluid ounces orange juice",
"1 1/2 fluid ounces raspberry-flavored vodka",
"1 fluid ounce coconut-flavored rum",
"1 splash grenadine syrup (optional)"
],
"language": "en-US",
"source": "allrecipes.com",
"tags": [],
"title": "Fuzzy Beach Balls Cocktail",
"url": "http://allrecipes.com/recipe/254736/fuzzy-beach-balls-cocktail/"
}
|
json
|
Kangana Ranaut has been facing the wrath of a section of Netizens on social media for her tweet in which she compared Mumbai to Pakistan occupied Kashmir. Her tweet was in response to Shiv Sena leader Sanjay Raut’s statement asking Kangana not to come back if she is so scared of the Mumbai Police. Kangana had asked for protection from either the Center or the Himachal Pradesh government. India Today had reported that the Himachal Pradesh government said that the state would provide security to Kangana and was also reportedly considering to extend the security during her visit to Mumbai.
Take a look at her tweet:
मुझे अपने देश में कहीं भी जाने की आज़ादी है ।
|
english
|
<gh_stars>10-100
package api
import (
"fmt"
"net/http"
"github.com/HyperspaceApp/Hyperspace/modules"
"github.com/julienschmidt/httprouter"
)
// GatewayGET contains the fields returned by a GET call to "/gateway".
type GatewayGET struct {
NetAddress modules.NetAddress `json:"netaddress"`
Peers []modules.Peer `json:"peers"`
MaxDownloadSpeed int64 `json:"maxdownloadspeed"`
MaxUploadSpeed int64 `json:"maxuploadspeed"`
}
// gatewayHandlerGET handles the API call asking for the gatway status.
func (api *API) gatewayHandlerGET(w http.ResponseWriter, req *http.Request, _ httprouter.Params) {
peers := api.gateway.Peers()
mds, mus := api.gateway.RateLimits()
// nil slices are marshalled as 'null' in JSON, whereas 0-length slices are
// marshalled as '[]'. The latter is preferred, indicating that the value
// exists but contains no elements.
if peers == nil {
peers = make([]modules.Peer, 0)
}
WriteJSON(w, GatewayGET{api.gateway.Address(), peers, mds, mus})
}
// gatewayHandlerPOST handles the API call changing gateway specific settings.
func (api *API) gatewayHandlerPOST(w http.ResponseWriter, req *http.Request, _ httprouter.Params) {
maxDownloadSpeed, maxUploadSpeed := api.gateway.RateLimits()
// Scan the download speed limit. (optional parameter)
if d := req.FormValue("maxdownloadspeed"); d != "" {
var downloadSpeed int64
if _, err := fmt.Sscan(d, &downloadSpeed); err != nil {
WriteError(w, Error{"unable to parse downloadspeed: " + err.Error()}, http.StatusBadRequest)
return
}
maxDownloadSpeed = downloadSpeed
}
// Scan the upload speed limit. (optional parameter)
if u := req.FormValue("maxuploadspeed"); u != "" {
var uploadSpeed int64
if _, err := fmt.Sscan(u, &uploadSpeed); err != nil {
WriteError(w, Error{"unable to parse uploadspeed: " + err.Error()}, http.StatusBadRequest)
return
}
maxUploadSpeed = uploadSpeed
}
// Try to set the limits.
err := api.gateway.SetRateLimits(maxDownloadSpeed, maxUploadSpeed)
if err != nil {
WriteError(w, Error{"failed to set new rate limit: " + err.Error()}, http.StatusBadRequest)
return
}
WriteSuccess(w)
}
// gatewayConnectHandler handles the API call to add a peer to the gateway.
func (api *API) gatewayConnectHandler(w http.ResponseWriter, req *http.Request, ps httprouter.Params) {
addr := modules.NetAddress(ps.ByName("netaddress"))
err := api.gateway.Connect(addr)
if err != nil {
WriteError(w, Error{err.Error()}, http.StatusBadRequest)
return
}
WriteSuccess(w)
}
// gatewayDisconnectHandler handles the API call to remove a peer from the gateway.
func (api *API) gatewayDisconnectHandler(w http.ResponseWriter, req *http.Request, ps httprouter.Params) {
addr := modules.NetAddress(ps.ByName("netaddress"))
err := api.gateway.Disconnect(addr)
if err != nil {
WriteError(w, Error{err.Error()}, http.StatusBadRequest)
return
}
WriteSuccess(w)
}
|
go
|
<filename>cmd/catalog/main.go
package main
import (
"flag"
"fmt"
"net/http"
"os"
"strings"
"time"
log "github.com/sirupsen/logrus"
v1 "k8s.io/api/core/v1"
"github.com/operator-framework/operator-lifecycle-manager/pkg/controller/operators/catalog"
"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/signals"
olmversion "github.com/operator-framework/operator-lifecycle-manager/pkg/version"
)
const (
defaultWakeupInterval = 15 * time.Minute
defaultCatalogNamespace = "openshift-operator-lifecycle-manager"
defaultConfigMapServerImage = "quay.io/operatorframework/configmap-operator-registry:latest"
)
// config flags defined globally so that they appear on the test binary as well
var (
kubeConfigPath = flag.String(
"kubeconfig", "", "absolute path to the kubeconfig file")
wakeupInterval = flag.Duration(
"interval", defaultWakeupInterval, "wakeup interval")
watchedNamespaces = flag.String(
"watchedNamespaces", "", "comma separated list of namespaces that catalog watches, leave empty to watch all namespaces")
catalogNamespace = flag.String(
"namespace", defaultCatalogNamespace, "namespace where catalog will run and install catalog resources")
configmapServerImage = flag.String(
"configmapServerImage", defaultConfigMapServerImage, "the image to use for serving the operator registry api for a configmap")
debug = flag.Bool(
"debug", false, "use debug log level")
version = flag.Bool("version", false, "displays olm version")
)
func main() {
stopCh := signals.SetupSignalHandler()
// Parse the command-line flags.
flag.Parse()
// Check if version flag was set
if *version {
fmt.Print(olmversion.String())
// Exit early
os.Exit(0)
}
// `namespaces` will always contain at least one entry: if `*watchedNamespaces` is
// the empty string, the resulting array will be `[]string{""}`.
namespaces := strings.Split(*watchedNamespaces, ",")
for _, ns := range namespaces {
if ns == v1.NamespaceAll {
namespaces = []string{v1.NamespaceAll}
break
}
}
// Serve a health check.
http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
})
go http.ListenAndServe(":8080", nil)
logger := log.New()
if *debug {
logger.SetLevel(log.DebugLevel)
}
logger.Infof("log level %s", logger.Level)
// Create a new instance of the operator.
catalogOperator, err := catalog.NewOperator(*kubeConfigPath, logger, *wakeupInterval, *configmapServerImage, *catalogNamespace, namespaces...)
if err != nil {
log.Panicf("error configuring operator: %s", err.Error())
}
_, done := catalogOperator.Run(stopCh)
<-done
}
|
go
|
/*
Copyright (c) 2017 Ahome' Innovation Technologies. All rights reserved.
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.ait.lienzo.client.core.image.filter;
import com.ait.lienzo.client.core.shape.Movie;
import com.ait.lienzo.client.core.shape.Picture;
import com.ait.lienzo.shared.core.types.ImageFilterType;
import elemental2.core.JsArray;
import elemental2.dom.ImageData;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
/**
* Interface to be used to create {@link Picture} and {@link Movie} filters.
*/
public interface ImageDataFilter<T extends ImageDataFilter<T>> {
int R_OFFSET = 0;
int G_OFFSET = 1;
int B_OFFSET = 2;
int A_OFFSET = 3;
int PIXEL_SZ = 4;
ImageDataFilterCommonOps FilterCommonOps = ImageDataFilterCommonOps.make();
ImageData filter(ImageData source, boolean copy);
boolean isTransforming();
boolean isActive();
void setActive(boolean active);
ImageFilterType getType();
@JsType(isNative = true, name = "Array", namespace = JsPackage.GLOBAL)
final class FilterTableArray extends JsArray<Integer> {
protected FilterTableArray(int... items) {
}
}
interface FilterTransformFunction {
void transform(int x, int y, int[] out);
}
@JsType(isNative = true, name = "Array", namespace = JsPackage.GLOBAL)
final class FilterConvolveMatrix extends JsArray<Double> {
public FilterConvolveMatrix() {
}
}
}
|
java
|
Prv. Close:
Prv. Close:
with reference to the above subject, the provisions of Regulation 23(9) read with Regulation 15(2) applicability criteria of the SEBI (LODR)Regulations 2015 is not applicable to the company since the company''s paid up share capital is not exceeding ten crores and net worth is not exceeding twenty five crores as on the financial year ended 31st March, 2023.
Please find enclosed a gist of proceedings of the 32nd Annual General Meeting of M/s Pagaria Energy Limited September 29th, 2023 pursuant to Regulation 30 of the Securities and Exchange Board of India (Listing Obligations and Disclosure Requirements)Regulations, 2015 which concluded at 1:10 P.M.This is for your kind information and records.
In terms of Regulation 30 and 34 of the SEBI (Listing Obligations & Disclosure Requirements) Regulations, 2015, please find enclosed the Annual Report of Pagaria Energy Limited (the Company) for the Financial Year 2022-23 along with notice convening 32nd Annual General Meeting of the members of the Company, scheduled to be held on Friday, September 29, 2023 through Video Conferencing/Other Audio Visual Means (VC/OVAM) at 1:00 P.M.
We hereby notify the the Board of Directors, at its meeting held on August 14,2023 has approved the appointment of Mr. Sanjay Kumar Bhansali as the CFO of the company with immediate effect.
1. Approved and took on record the Unaudited Financial Results of the Company for the Quarter Ended on 30th June, 2023 and the copy of the above said Unaudited Financial Results is enclosed herewith.2. Approved Management Discussion and Analysis Report, Directors Report for the year ended 31st March, 2023 and draft notice of 32nd Annual General Meeting.3. Approved appointment of Mr. Sanjay Kumar Bhansali as CFO of the company.4. Auditor is not yet identified by directors of the company, once decided, Board Meeting will be called for approval thereof.
Certificate pursuant to Regulation 74(5) of SEBI(DP) Regulations,2018 for the quarter ended 30th June,2023 of M/s. Pagaria Energy Limited(Formerly Women Networks Limited)
We wish to inform you that the Board of Directors of the Company at its meeting heldtoday, inter-alia, transacted the following business:1. Approved and took on record the Audited Financial Results of the Company forthe Quarter Ended on 31st March, 2023 and the copy of the above said AuditedFinancial Results is enclosed herewith.2. Appointment of Scrutinizer of the Company for the purpose of scrutinizing theprocess of voting through Remote e-voting and e-voting3. Appointment of Secretarial Auditor for the FY 2023-20244. Other matters of Business.
We wish to inform you that the Board of Directors of the Company at its meeting held today, inter-alia, transacted the following business:1. Approved and took on record the Audited Financial Results of the Company for the Quarter Ended on 31st March, 2023 and the copy of the above said Audited Financial Results is enclosed herewith.2. Appointment of Scrutinizer of the Company for the purpose of scrutinizing the process of voting through Remote e-voting and e-voting3. Appointment of Secretarial Auditor for the FY 2023-20244. Other matters of Business.In view of the above, please note that the Trading Window for trading in equity shares of the Company by designated persons will be open after 48 hours from the announcement of the Audited financial results of the Company for the year ended 31st March, 2023.
Pursuant to the Code of Conduct for Regulating, Monitoring & Reporting Trading by Insiders of the Company under SEBI (Prohibition of Insider Trading) Regulations, 2015, as amended from time to time, we would like to inform you that the trading window for the purpose of dealing in the equity shares of the Company shall remain closed from 01.04.2023 till 48 (Forty Eight) hours after the conclusion of the Meeting of the Board of Directors of the Company to be held for the purpose of consideration and approval of the Audited Financial Results for the quarter ended 31st March,2023.The date of the Board Meeting in which results will be considered shall be intimated in due course of time.Kindly take the same on record.
Revised outcome We wish to inform you that the Board of Directors of the Company at its meeting held today, inter-alia, transacted the following business:1. Approved and took on record the Unaudited Financial Results of the Company for the Quarter Ended on 31st December, 2022 and the copy of the abovesaid Unaudited Financial Results for the meeting ending at 12:30 pm is enclosed herewith.2. To approve Opening of Suspense Escrow Demat Account and to appoint Authorised Signatories.3. To Consider And Approve the Resignation of Mr. Ranjit Singh Pagaria, CFO from the company.
We wish to inform you that the Board of Directors of the Company at its meeting held today, inter-alia, transacted the following business:1. Approved and took on record the Unaudited Financial Results of the Company for the Quarter Ended on 31st December, 2022 and the copy of the abovesaid Unaudited Financial Results for the meeting ending at 12:30 pm is enclosed herewith.2. To approve Opening of Suspense Escrow Demat Account and to appoint Authorised Signatories.3. To Consider And Approve the Resignation of Mr. Ranjit Singh Pagaria, CFO from the company.
Pursuant To Regulation 74 (5) of the SEBI (Depositories and Participants) Regulations, 2018, we enclose herewith a Confirmation Certificate received from Link Intime India Private Limited, the Register and Transfer Agent of the Company for the period ended 31.12.2022. As per attached.You are requested to take the above on record.
Pursuant to Regulation 47 and Regulation 30 read with Schedule III of the SEBI (Listing Obligations and Disclosure Requirements) Regulations, 2015, please find enclosed copies of the Newspaper Advertisements of the Unaudited Financial Results of the Company for the quarter and half year ended 30th September, 2022 published in Newspapers viz. - The Sikh Times (in English) and Quami Patrika (in Hindi) on 16th November,2022.
WOMEN NETWORKS LTD.has informed BSE that the meeting of the Board of Directors of the Company is scheduled on 14/11/2022 ,inter alia, to consider and approve In terms of Regulation 29 of SEBI Listing Regulations, we would like to inform that a meeting of the Board of Directors of the Company is scheduled to be held on Monday, 14th November, 2022 to consider and approve, inter alia, the Un-Audited Financial Results of the Company for the quarter ended on 30.09.2022 along with other routine business. The trading window for dealing with the securities of the Company is already closed as per the Companys code of conduct read with BSE Circular No, LIST/COMP/0L/2019-20; dated April 02, 2019 and would remain closed till 48 hours after the announcement of the Unaudited Financial Results for the quarter ended on 30.09.2022 to the public. Accordingly all the directors and employees of the company have been advised not to trade in the securities of the company during the aforesaid period of closure of trading window. You are requested to take above-mentioned information on your records.
Please find enclosed a gist of the proceedings of the 31ST Annual General Meeting of M/s Pagaria Energy Limited held on September 29, 2022 pursuant to Regulation 30 of the Securities and Exchange Board of India (Listing Obligations and Disclosure Requirements) Regulations, 2015. This is for your kind information and records.
Pursuant to Regulation 47 of the Securities and Exchange Board of India (Listing Obligations and Disclosure Requirements) Regulations, 2015, please find enclosed newspaper clips of the notice to the shareholders of the Company to register/update their email addresses. The said notice was published in the following newspapers: 1) The Sikh Times; and 2) Qaumi PatrikaKindly take the same on record.
This is to inform you that the 31st Annual General Meeting (AGM) of Pagaria Energy Limited (formerly Women Networks Limited) is scheduled to be held on Thursday the 29th September, 2022 at 11: 30 A.M. through Video Conferencing/Other Audio Visual Means (VC/OVAM). The company shall provide its Members the facility to exercise their votes electronically for transacting the items of the business, as set out in the Notice convening AGM. Company has fixed September 22, 2022 as cut-off date pursuant to rule 20(4)(vi1) of the Companies (Management and Administration) Rule, 2014, to determine the entitlement of voting rights of members for e-voting. The Register of Members and Share Transfer Book will remain closed from 23rd September 2022 to 29th September, 2022 (both days inclusive), for the purpose of Annual General Meeting.This is for your information and record.
|
english
|
<gh_stars>1-10
import { ExtensionProperty } from '@gltf-transform/core';
import { PropertyType } from '@gltf-transform/core';
import { KHR_MATERIALS_UNLIT } from '../constants';
/**
* # Unlit
*
* Converts a PBR {@link Material} to an unlit shading model. See {@link MaterialsUnlit}.
*/
export class Unlit extends ExtensionProperty {
public static EXTENSION_NAME = KHR_MATERIALS_UNLIT;
public declare extensionName: typeof KHR_MATERIALS_UNLIT;
public declare propertyType: 'Unlit';
public declare parentTypes: [PropertyType.MATERIAL];
protected init(): void {
this.extensionName = KHR_MATERIALS_UNLIT;
this.propertyType = 'Unlit';
this.parentTypes = [PropertyType.MATERIAL];
}
}
|
typescript
|
With 12,30,509 total recoveries, India’s recovered cases are twice the active cases, as of today. 44,306 patients discharged in the last 24 hours. This has taken the recovery rate among COVID-19 patients to 66.31%. Coordinated implementation of COVID-19 management strategy by the Union and State/UT governments and selfless sacrifice of all frontline health workers has ensured that the recoveries are continuously on the rise.
The active cases (5,86,298) account for 31.59% of total positive cases and all are under medical supervision.
Effective containment, aggressive testing and standardized clinical management protocols based on a holistic Standard of Care approach continues to result in a progressively reducing Case Fatality Rate (CFR). India has registered the lowest CFR since the first lockdown at 2.10% as compared to the global average.
The mortality analysis of the present data shows that 50% of deaths have happened in the age group of 60 years and above; 37% deaths belong to 45 to 60 years age group; while 11% deaths belong to 26-44 years age group. This clearly highlights the people above the age of 45 belong to the high-risk group and country’s containment strategy is focusing on this group. In the gender wise distribution, 68% of people who died were men and 32% were women.
India has taken timely and graded measures to ensure availability of ventilators since the start of COVID-19 pandemic which had resulted in a spike in demand all across the world. India decided to encourage domestic supply of ventilators under ‘Make In India’ as 75% of the market depended on import and import restrictions were increasing along with the severity of the pandemic.
To meet the projected requirement of 60,000 ventilators in the country, the Committee of Technical Experts under Director General of Health Services (DGHS) under the Ministry of Health & Family Welfare prescribed the Minimum Essential Specifications for the basic ventilators to be procured for COVID-19 purposes after due and extensive deliberation. The Empowered Group (EG) -3 was constituted for addressing the issue of essential medical supplies. After careful physical demonstration and clinical validation of the domestic ventilator model, orders were placed.
Major orders were placed upon two Public Sector Enterprises (PSEs) - Bharat Electronics Limited (BEL) and Andhra Med-Tech Zone (AMTZ). In addition, the automobile industry also stepped up along with Defence research and Development Organisation (DRDO). As of now, the ‘Make in India’ ventilators have a market share more than 96% by volume and more than 90% by value. As on date, they have been installed at more than 700 hospitals. In less than two months, more than 18000 ventilators have been supplied to States/ UTs/ Central Govt. Hospitals/ DRDO facility.
For all authentic & updated information on COVID-19 related technical issues, guidelines & advisories please regularly visit: https://www.mohfw.gov.in/ and @MoHFW_INDIA.
Technical queries related to COVID-19 may be sent to technicalquery.covid19@gov.in and other queries on ncov2019@gov.in and @CovidIndiaSeva .
In case of any queries on COVID-19, please call at the Ministry of Health & Family Welfare helpline no.: +91-11-23978046 or 1075 (Toll-free). List of helpline numbers of States/UTs on COVID-19 is also available at https://www.mohfw.gov.in/pdf/coronvavirushelplinenumber.pdf.
|
english
|
import React, { Component } from "react";
import Button from "@material-ui/core/Button";
import Dialog from "@material-ui/core/Dialog";
import DialogActions from "@material-ui/core/DialogActions";
import DialogContent from "@material-ui/core/DialogContent";
import DialogContentText from "@material-ui/core/DialogContentText";
import DialogTitle from "@material-ui/core/DialogTitle";
import Grid from "@material-ui/core/Grid";
import ButtonGood from "../../UI/Button/ButtonGood/ButtonGood";
import ButtonBad from "../../UI/Button/ButtonBad/ButtonBad";
import TitleLabel from "../../UI/Label/TitleLabel";
import Fab from "@material-ui/core/Fab";
import AddIcon from "@material-ui/icons/AddPhotoAlternate";
import DeleteIcon from "@material-ui/icons/Delete";
import { FormControlLabel, Checkbox } from "@material-ui/core";
import Modal from "../../UI/Modal/Modal";
import PhotoUpload from "../../Forms/PhotoUpload/PhotoUpload";
import TextAreaInput from "../../UI/Input/TextArea/TextArea";
import TextInput from "../../UI/Input/TextInput/TextInput";
import NumberInput from "../../UI/Input/NumberInput/NumberInput";
import IMG from "../../UI/LightBox/ImageLightBox";
import Select from "react-select";
import { connect } from "react-redux";
import * as actions from "../../../redux/actions/index";
import styleClass from "./ProductPage.module.css";
import { MDBBtn } from "mdbreact";
class ProductPage extends Component {
state = {
dialogOpen: false,
showAddFotoModal: false,
product: {
price: "",
name: "",
latinName: "",
description: "",
type: "SINGLE",
tags: "",
available: false,
wikiEntry: {
wikiEntryId: null
}
}
};
componentWillMount() {
this.props.onProductFetch();
this.props.onWikiEntryFetch();
let product = null;
for (let i = 0; i < this.props.products.products.length; i++) {
if (
this.props.products.products[i].productId == this.props.match.params.id
) {
product = this.props.products.products[i];
}
}
if (product !== null) {
this.setState({ product });
}
}
refreshHandler = () => {
let product = null;
for (let i = 0; i < this.props.products.products.length; i++) {
if (
this.props.products.products[i].productId == this.props.match.params.id
) {
product = this.props.products.products[i];
}
}
if (product !== null) {
this.setState({ product });
}
};
deleteButtonHandler = () => {
this.setState({ dialogOpen: true });
};
addPictureButtonHandler = () => {
this.setState({ showAddFotoModal: true });
};
closePhotoAddModal = () => {
this.setState({ showAddFotoModal: false });
};
onModifyButtonClicked = () => {
this.props.onProductUpdate(this.state.product);
this.props.history.replace("/product");
};
onTextInputHandler = (event, inputIdentifier) => {
const newState = { ...this.state };
if (inputIdentifier === "name") {
newState.product.name = event.target.value;
this.setState(newState);
} else if (inputIdentifier === "latinName") {
newState.product.latinName = event.target.value;
this.setState(newState);
} else if (inputIdentifier === "description") {
newState.product.description = event.target.value;
this.setState(newState);
} else if (inputIdentifier === "tags") {
newState.product.tags = event.target.value;
this.setState(newState);
} else if (inputIdentifier === "price") {
newState.product.price = event.target.value;
this.setState(newState);
} else if (inputIdentifier === "type") {
newState.product.type = event.target.value;
this.setState(newState);
} else if (inputIdentifier === "wikiId") {
if (newState.product.wikiEntry === null) {
newState.product.wikiEntry = { wikiEntryId: null };
}
newState.product.wikiEntry.wikiEntryId = event.target.value;
this.setState(newState);
} else if (inputIdentifier === "available") {
newState.product.available = !this.state.product.available;
this.setState(newState);
}
};
onWikiSelectHandler = option => {
this.setState({
...this.state,
product: {
...this.state.product,
wikiEntry: { wikiEntryId: option.value }
}
});
};
handleDialogClose = () => {
this.setState({ dialogOpen: false });
};
handleDialogConfirm = () => {
this.setState({ dialogOpen: false });
this.props.onProductDelete(this.props.match.params.id);
this.props.history.replace("/product");
};
render() {
console.log(this.state);
const buttonAddStyle = {
margin: 0,
top: "auto",
right: 20,
bottom: 20,
left: "auto",
position: "fixed",
zIndex: 1000
};
const buttonDeleteStyle = {
margin: 0,
top: "auto",
right: 80,
bottom: 20,
left: "auto",
position: "fixed",
zIndex: 1000
};
let product = null;
let photos = null;
for (let i = 0; i < this.props.products.products.length; i++) {
if (
this.props.products.products[i].productId == this.props.match.params.id
) {
product = this.props.products.products[i];
}
}
if (product !== null) {
if (product.photos !== null) {
photos = product.photos.map((photo, index) => {
return (
<Grid item key={index} xs={12} xl={6} lg={4}>
<IMG photo={photo}></IMG>
</Grid>
);
});
}
let options = [{ label: "NONE", value: null }];
let selectedOption = options[0];
const wikiEntryOptions = this.props.wiki.wikiEntries.map(
(wikiEntry, index) => {
const option = {
label:
wikiEntry.wikiEntryId +
": " +
wikiEntry.name +
"-" +
wikiEntry.latinName,
value: wikiEntry.wikiEntryId
};
options.push(option);
if (
this.state.product.wikiEntry !== null &&
this.state.product.wikiEntry.wikiEntryId !== null &&
this.state.product.wikiEntry.wikiEntryId === wikiEntry.wikiEntryId
) {
console.log(option);
selectedOption = option;
}
return (
<option key={wikiEntry.wikiEntryId} value={wikiEntry.wikiEntryId}>
{wikiEntry.wikiEntryId}: {wikiEntry.name}-{wikiEntry.latinName}
</option>
);
}
);
return (
<div className={styleClass.All}>
<Dialog
open={this.state.dialogOpen}
onClose={this.handleDialogClose}
aria-labelledby="alert-dialog-title"
aria-describedby="alert-dialog-description"
>
<DialogTitle id="alert-dialog-title">
{"Are you sure you want to delete this wiki entry?"}
</DialogTitle>
<DialogContent></DialogContent>
<DialogActions>
<Button onClick={this.handleDialogConfirm} color="primary">
Yes
</Button>
<Button
onClick={this.handleDialogClose}
color="primary"
autoFocus
>
No
</Button>
</DialogActions>
</Dialog>
<Modal
show={this.state.showAddFotoModal}
modalClosed={this.closePhotoAddModal}
>
<PhotoUpload
history={this.props.history}
productId={this.props.match.params.id}
isWikiEntry={false}
></PhotoUpload>
</Modal>
<Fab
color="primary"
aria-label="add"
style={buttonAddStyle}
onClick={this.addPictureButtonHandler}
>
<AddIcon></AddIcon>
</Fab>
<Fab
color="secondary"
aria-label="add"
style={buttonDeleteStyle}
onClick={this.deleteButtonHandler}
>
<DeleteIcon />
</Fab>
<TitleLabel name="Product Page"></TitleLabel>
<Grid container justify="center" alignItems="center" spacing={1}>
<Grid container spacing={1} justify="center" alignItems="center">
<Grid item xs={12} md={9} lg={9}>
<TextInput
name={"Name:"}
value={this.state.product.name}
onChangeAction={event =>
this.onTextInputHandler(event, "name")
}
></TextInput>
</Grid>
<Grid item xs={12} md={9} lg={9}>
<TextInput
name={"Latin name:"}
value={this.state.product.latinName}
onChangeAction={event =>
this.onTextInputHandler(event, "latinName")
}
></TextInput>
</Grid>
<Grid item xs={12} md={9} lg={9}>
<TextAreaInput
name={"Description:"}
value={this.state.product.description}
onChangeAction={event =>
this.onTextInputHandler(event, "description")
}
rows={5}
></TextAreaInput>
</Grid>
<Grid item xs={12} md={6} lg={6}>
<TextInput
name={"Tags:"}
value={this.state.product.tags}
onChangeAction={event =>
this.onTextInputHandler(event, "tags")
}
rows={1}
></TextInput>
</Grid>
<Grid item xs={11} md={3} lg={3}>
<FormControlLabel
onClick={event => this.onTextInputHandler(event, "available")}
control={
<Checkbox
value={this.state.product.available}
checked={this.state.product.available}
/>
}
label="Is available"
/>
</Grid>
<Grid item xs={12} md={9} lg={9}>
<NumberInput
name={"Price:"}
value={this.state.product.price}
onChangeAction={event =>
this.onTextInputHandler(event, "price")
}
rows={1}
></NumberInput>
</Grid>
<Grid item xs={11} md={8} lg={8}>
<label>Type:</label>
<select
value={this.state.product.type}
onChange={event => this.onTextInputHandler(event, "type")}
>
<option value="SINGLE">SINGLE</option>
<option value="BOUQUET">BOUQUET</option>
<option value="OTHER">OTHER</option>
</select>
</Grid>
<Grid item xs={12} md={6}>
<Select
value={selectedOption}
placeholder={"WikiEntry:"}
options={options}
onChange={option => this.onWikiSelectHandler(option)}
></Select>
</Grid>
</Grid>
<Grid item xs={12} sm={6} md={6} lg={6}>
<div className={styleClass.Button}>
<ButtonGood
name={"Modify"}
onClickAction={event => this.onModifyButtonClicked()}
></ButtonGood>
</div>
</Grid>
<Grid item xs={12} sm={6} md={6} lg={6}>
<div className={styleClass.Button}>
<MDBBtn onClick={this.refreshHandler}>Refresh</MDBBtn>
</div>
</Grid>
{photos}
</Grid>
</div>
);
}
return (
<div>
productPage
<h2>{this.props.match.params.id}</h2>
</div>
);
}
}
const mapStateToProps = state => {
return {
wiki: state.wiki,
products: state.products
};
};
const mapDispatchToProps = dispatch => {
return {
onWikiEntryFetch: () => dispatch(actions.fetchWikiEntries()),
onProductFetch: () => dispatch(actions.fetchProducts()),
onProductDelete: productId => dispatch(actions.deleteProduct(productId)),
onProductUpdate: product => dispatch(actions.updateProduct(product))
};
};
export default connect(mapStateToProps, mapDispatchToProps)(ProductPage);
|
javascript
|
<reponame>Laniv713/artisan-worktables<filename>src/main/java/com/codetaylor/mc/artisanworktables/modules/requirement/reskillable/crafttweaker/ZenReskillableRequirementBuilder.java
package com.codetaylor.mc.artisanworktables.modules.requirement.reskillable.crafttweaker;
import com.codetaylor.mc.artisanworktables.api.recipe.requirement.IRequirement;
import com.codetaylor.mc.artisanworktables.api.recipe.requirement.IRequirementBuilder;
import com.codetaylor.mc.artisanworktables.modules.requirement.reskillable.requirement.ReskillableRequirement;
import com.codetaylor.mc.artisanworktables.modules.requirement.reskillable.requirement.ReskillableRequirementBuilder;
import net.minecraft.util.ResourceLocation;
import stanhebben.zenscript.annotations.ZenMethod;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public class ZenReskillableRequirementBuilder
implements IRequirementBuilder {
private ReskillableRequirementBuilder builder;
/* package */ ZenReskillableRequirementBuilder() {
this.builder = new ReskillableRequirementBuilder();
}
@ZenMethod
public ZenReskillableRequirementBuilder add(String requirementString) {
this.builder.add(requirementString);
return this;
}
@ZenMethod
public ZenReskillableRequirementBuilder addAll(String[] requirementStrings) {
this.builder.addAll(requirementStrings);
return this;
}
@Nonnull
@Override
public String getRequirementId() {
return ReskillableRequirement.REQUIREMENT_ID;
}
@Nonnull
@Override
public ResourceLocation getResourceLocation() {
return ReskillableRequirement.LOCATION;
}
@Nullable
@Override
public IRequirement create() {
return this.builder.create();
}
}
|
java
|
<reponame>NJ261/WPFToolkit<filename>discussions/70700.json
[
{
"Id": "240862",
"ThreadId": "70700",
"Html": "<p>Hi there,</p>\r\n<p>to display data I use the DataGrid of the WPF-Toolkit and bind a DataTable to the grid. Everything works fine but I need for some columns an editable ComboBox. The columns are created in code behind. How can I set a DataGridComboBoxColumn to IsEditable = true just for specific columns? Not every DataGridComboBoxColumn should be editable. And the columns have to be generated dynamically because the number and content changed everytime when the DataTable changed.</p>\r\n<p> </p>\r\n<p>Greetings</p>",
"PostedDate": "2009-10-01T04:50:42.04-07:00",
"UserRole": null,
"MarkedAsAnswerDate": null
},
{
"Id": "241120",
"ThreadId": "70700",
"Html": "<p>Hi funzl,</p>\r\n<p>you could overrides the method GenerateEditingElement() in DataGridComboBoxColumn and sets the comboBox to editable.</p>\r\n<p>Regards,</p>\r\n<p>Tony</p>",
"PostedDate": "2009-10-01T19:02:11.503-07:00",
"UserRole": null,
"MarkedAsAnswerDate": null
}
]
|
json
|
<reponame>elia-mercatanti/guesthouse-reservations<filename>src/main/java/com/eliamercatanti/guesthousebooking/repository/mongo/BookingMongoRepository.java
package com.eliamercatanti.guesthousebooking.repository.mongo;
import static org.bson.codecs.configuration.CodecRegistries.fromProviders;
import static org.bson.codecs.configuration.CodecRegistries.fromRegistries;
import java.time.LocalDate;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
import org.bson.codecs.configuration.CodecRegistry;
import org.bson.codecs.pojo.PojoCodecProvider;
import org.bson.conversions.Bson;
import org.bson.types.ObjectId;
import com.eliamercatanti.guesthousebooking.model.Booking;
import com.eliamercatanti.guesthousebooking.model.Room;
import com.eliamercatanti.guesthousebooking.repository.BookingRepository;
import com.mongodb.MongoClient;
import com.mongodb.MongoClientSettings;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoDatabase;
import com.mongodb.client.model.Filters;
public class BookingMongoRepository implements BookingRepository {
private static final String CHECK_IN_FIELD_NAME = "checkInDate";
private static final String CHECK_OUT_FIELD_NAME = "checkOutDate";
private MongoCollection<Booking> bookingCollection;
public BookingMongoRepository(MongoClient mongoClient, String databaseName, String collectionName) {
CodecRegistry pojoCodecRegistry = fromRegistries(MongoClientSettings.getDefaultCodecRegistry(),
fromProviders(PojoCodecProvider.builder().automatic(true).build()));
MongoDatabase database = mongoClient.getDatabase(databaseName).withCodecRegistry(pojoCodecRegistry);
bookingCollection = database.getCollection(collectionName, Booking.class);
}
@Override
public List<Booking> findAll() {
return StreamSupport.stream(bookingCollection.find().spliterator(), false).collect(Collectors.toList());
}
@Override
public void save(Booking booking) {
bookingCollection.insertOne(booking);
}
@Override
public Booking findById(String id) {
return bookingCollection.find(Filters.eq("_id", stringToObjectId(id))).first();
}
@Override
public void delete(String id) {
bookingCollection.deleteOne(Filters.eq("_id", stringToObjectId(id)));
}
@Override
public boolean checkRoomAvailabilityInDateRange(Room room, LocalDate firstDate, LocalDate secondDate) {
Bson filterQuery = Filters.and(Filters.eq("room", room.name()), Filters.or(
Filters.and(Filters.gt(CHECK_IN_FIELD_NAME, firstDate), Filters.lt(CHECK_IN_FIELD_NAME, secondDate)),
Filters.and(Filters.lt(CHECK_OUT_FIELD_NAME, secondDate), Filters.gt(CHECK_OUT_FIELD_NAME, firstDate)),
Filters.and(Filters.lte(CHECK_IN_FIELD_NAME, firstDate), Filters.gte(CHECK_OUT_FIELD_NAME, secondDate))));
return bookingCollection.find(filterQuery).first() == null;
}
@Override
public List<Booking> findByDates(LocalDate firstDate, LocalDate secondDate) {
Bson filterQuery = Filters.or(
Filters.and(Filters.gt(CHECK_IN_FIELD_NAME, firstDate), Filters.lt(CHECK_IN_FIELD_NAME, secondDate)),
Filters.and(Filters.gt(CHECK_OUT_FIELD_NAME, firstDate), Filters.lt(CHECK_OUT_FIELD_NAME, secondDate)));
return StreamSupport.stream(bookingCollection.find(filterQuery).spliterator(), false)
.collect(Collectors.toList());
}
@Override
public List<Booking> findByRoom(Room room) {
return StreamSupport.stream(bookingCollection.find(Filters.eq("room", room.name())).spliterator(), false)
.collect(Collectors.toList());
}
@Override
public List<Booking> findByGuestId(String guestId) {
return StreamSupport
.stream(bookingCollection.find(Filters.eq("guestId", stringToObjectId(guestId))).spliterator(), false)
.collect(Collectors.toList());
}
private ObjectId stringToObjectId(String id) {
try {
return new ObjectId(id);
} catch (IllegalArgumentException e) {
return null;
}
}
}
|
java
|
When you’re in a war, movement is critical. You’ve got to dodge some things to stay mobile. How do you know that you are moving tactfully? How do you know that your direction is exact? God has given us a spiritual radar by which we can know that our movements are in sync with His directives. It’s called the footsteps of peace. This is not the gospel that takes you to heaven, but rather the one that guides your footsteps, your movement, and your mobility on earth.
It’s called the Gospel of Peace because when you are saved, you not only get the peace with God, but you also have radar control, guidance for your movements and directions in life. The Bible is clear that God wants us to know what His will is. It’s a will that will remain true to His principles, but the specific steps are confirmed by His peace. He will show you how to move, how to maneuver in the circumstances of life, so that you can avoid or overcome or steer around the attacks of the evil one.
We would like to thank The Urban Alternative (Tony Evans) for providing this plan. For more information, please visit:
|
english
|
Manchester United have had a rich history with French signings. From the days of Eric Cantona to those of Paul Pogba and Anthony Martial of late - the country has given the English club so many talented stars.
Time and again managers such as Sir Alex Ferguson, Louis van Gaal and Jose Mourinho have looked at signing French-born players to solve their problems and why not? The country boasts of winning two FIFA World Cups, two UEFA European Championships and two FIFA Confederations Cups. And those tournaments have brought to the fore some of the brightest stars, making the choice easier for Manchester United managers when it comes to new signings.
But not all those signings have found success at Old Trafford. The likes of Laurent Blanc, despite being regarded as one of the greatest French players, was not one of Sir Alex Ferguson's more successful signings.
It also came as a surprise to many when the legendary manager made William Prunier one of his loan signings from Bordeaux back in 1995.
However, the general pattern has been a positive one. Undoubtedly, one of the greatest French players, Eric Cantona, gave the number 7 shirt a new meaning following his arrival from Leeds United in 1992.
And who can forget the fiery stint of Fabian Barthez? Despite his spell not lasting for more than four years, he remains one of the biggest French signings for Manchester United.
Manchester United are now ushering in a new era with the signing of Raphael Varane from Real Madrid. Though the defender is yet to be unveiled, the excitement among fans is noteworthy. Along with Jadon Sancho, Varane is one of the most high-profile signings of the Ole Gunnar Solskjaer era and the latest Frenchman expected to ply his trade at Old Trafford.
Ahead of Varane's baptism in Manchester, we profile five of his fellow countrymen to have had the greatest impact at Manchester United in the past.
Mikael Silvestre decided to make the switch from Italy to England back in 1999 for a fee in the region of £4m. The Frenchman had an offer from Liverpool as well but decided to opt for the Red Devils.
He was the most high-profile of the five signings Manchester United had made that summer. Ferguson had a preference for players who could perform multiple roles on the pitch and Silvestre fitted the bill.
The defender was used both as a centre-back as well as a full-back by his manager. As a full-back Silvestre had the chance to show his attacking skills.
Following the departure of Jaap Stam in 2001 Silvestre became the leader of the pack and stayed that way until the signings of Nemanja Vidic and Patrice Evra in January 2006.
Meanwhile, Silvestre's issues with injuries had dented his sharpness and he no longer found himself at the top of Sir Alex Ferguson's pecking order, eventually deciding to bid adieu to Old Trafford in 2008.
Arsene Wenger still had faith in the Frenchman's abilities and made him one of his utility signings. Silvestre notched up 361 appearances in all competitions for Manchester United and also had stints in the MLS and Indian Super League after leaving Arsenal.
Louis Saha was on a goal scoring spree for Fulham when Sir Alex Ferguson spotted him. The season before joining Manchester United, the Frenchman had scored a resounding 22 goals in 35 appearances in a Fulham shirt.
Manchester United at the time had become over-relient on just one striker - Ruud van Nistelrooy. Ferguson felt the need to find someone who could give him goals day-in, day-out.
Diego Forlan's move from Independiente had failed miserably as the young Uruguayan failed to suit himself to the demanding nature of the Premier League.
From that aspect, Saha suited well having already proven himself as a goal getter in the division. Ferguson, though, preferred to use Saha as a back-up and most of his appearances during the first season came off the bench.
Manchester United fans only started to see sparks of Saha's brilliance in his second season as he found himself involved in as many as 22 goals in 30 appearances.
Following the departure of Van Nistelrooy, Saha started to take centre-stage but that was when his issues with injury began to crop up. The following season was his worst as he could manage only 17 league appearances and Ferguson was forced to let him go.
Saha joined Everton in 2008 and proved his mettel there as well, scoring as many as 34 goals over the next four seasons.
The pressure of performing at the highest level at a club like Manchester United might have taken a toll on his slender figure but Saha remains one of the best French signings for Manchester United.
Manchester United's current number 6 is undoubtedly one of the greatest French signings. Paul Pogba is a product of Manchester United's academy but left the club to join Juventus after failing to break into the first team.
His heroics at Juventus convinced Jose Mourinho, Sir Alex Ferguson's successor, that Pogba was the perfect choice for the Manchester United midfield. The Red Devils spent a then-record £89m to make Pogba their most expensive signing.
Some might believe that Pogba is yet to reach his full potential at Old Trafford. This has probably been due to the fact that he has been used in different positions by different managers and never got the chance to settle into a certain role.
Solskjaer's predecessor Jose Mourinho, despite the huge onus he had put on making Pogba one of his key signings, sometimes used him as a defensive midfielder and sometimes even on the flanks. It dealt a serious blow to the creative nature of Pogba's game.
Even then, fans were left spellbound by his visionary passes and aerial balls, often going on to find the right attacking target.
Under Solskjaer, though, Pogba has found his footing at Old Trafford and together with Bruno Fernandes he is creating problems for opposition defenders.
Standing 6’2” tall, Pogba is a physical presence in the middle of the pitch, drawing likeness with countryman Patrick Vieira. However, he betters Vieira in terms of his attacking acumen. The 42 goals he has set up for his team-mates so far show how good he is at creating opportunities for others.
He is a good dribbler and has decent pace to go around defenders. What adds to his skills is his long-range shooting ability.
Though with just a year left on his current contract, Pogba's Manchester United future is in doubt and the club should do everything in its power to retain him beyond 2022.
Paris Saint-Germain have been heavily linked with a move for Pogba, who could become a free agent next summer if he fails to agree on a new deal at Old Trafford.
Manchester United fans will unanimously agree that Patrice Evra is a club legend, one of their own and one of their best signings.
He was a key member of Sir Alex Ferguson's squad that went on to create history by winning 20 Premier League titles.
Evra was one of two defensive signings in January 2006 along with Nemanja Vidic as Ferguson decided to shore up his defense in the wake of the injury to Gabriel Heinze.
Over the next eight years, Evra went on to write his name in Manchester United's history books. He started out as a wing-back and loved going forward to assist in attack.
However, his attacking prowess didn't mean that he was vulnerable to counter-attacking football. Evra perfected the art of tracking back and was one of the main components of the Manchester United defense that developed a reputation for being unbreachable.
Evra finished his Manchester United career with five league titles, three EFL Cup titles and a Champions League trophy. During a summer of drastic transfer activity, Juventus made Evra one of their signings in 2014.
Eric Cantona was and is still one of the greatest signings of the Sir Alex Ferguson era. Leading up to the move from fierce rivals Leeds United, there was huge controversy and the Yorkshire giants drew the ire of fans by sanctioning the transfer.
However, the Leeds board had by then realized how difficult it was to keep such a turbulent character in the dressing room and the move suited both parties well.
What the new number seven did for Manchester United over the next five years is history. The Red Devils managed to win the league title in four of the five seasons with Cantona in their ranks.
Cantona was quite a physical presence on the pitch going up and down continuously, assisting in defense as well as scoring goals.
The Frenchman finished his career with the Red Devils in 1997. By then he had scored 81 goals in 180 games, averaging 0. 45 goals per game.
This makes him an even better goal scorer for Manchester United than Cristiano Ronaldo, who scored 118 goals from 292 games at an average of 0. 40 per game.
Cantona, who remains the greatest Frenchman to play for Manchester United, was duly rewarded for his contributions at Old Trafford when he was inducted into the Hall of Fame in English football back in 2002.
|
english
|
a.li {
color: #e8fefa;
text-align: center;
text-decoration:none;
}
|
css
|
<reponame>Lusey77/midwest-hackathon
{
"_args": [
[
{
"raw": "virtual-device-sdk@^1.0.0",
"scope": null,
"escapedName": "virtual-device-sdk",
"name": "virtual-device-sdk",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"C:\\Projects\\midwest-hackathon\\node_modules\\bespoken-tools"
]
],
"_from": "virtual-device-sdk@>=1.0.0 <2.0.0",
"_id": "virtual-device-sdk@1.4.5",
"_inCache": true,
"_location": "/virtual-device-sdk",
"_nodeVersion": "6.12.3",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/virtual-device-sdk_1.4.5_1524163049051_0.6260531824058726"
},
"_npmUser": {
"name": "jpkbst",
"email": "<EMAIL>"
},
"_npmVersion": "3.10.10",
"_phantomChildren": {},
"_requested": {
"raw": "virtual-device-sdk@^1.0.0",
"scope": null,
"escapedName": "virtual-device-sdk",
"name": "virtual-device-sdk",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/bespoken-tools"
],
"_resolved": "https://registry.npmjs.org/virtual-device-sdk/-/virtual-device-sdk-1.4.5.tgz",
"_shasum": "ca262caf55b22fd145b19704dd9ec17a07eb6455",
"_shrinkwrap": null,
"_spec": "virtual-device-sdk@^1.0.0",
"_where": "C:\\Projects\\midwest-hackathon\\node_modules\\bespoken-tools",
"bin": {
"bvd": "./lib/src/ScriptRunner.js"
},
"bugs": {
"url": "https://github.com/bespoken/virtual-device-sdk/issues"
},
"dependencies": {
"chalk": "^2.3.1",
"dotenv": "^4.0.0"
},
"description": "[](https://circleci.com/gh/bespoken/virtual-device-sdk) [](https://codecov.io/gh/bespo",
"devDependencies": {
"@types/chai": "^4.0.2",
"@types/dotenv": "^4.0.0",
"@types/mocha": "^2.2.41",
"@types/nock": "^8.2.1",
"@types/sinon": "^2.3.3",
"@types/sinon-chai": "^2.7.29",
"chai": "^4.0.2",
"codecov": "^2.2.0",
"mocha": "^3.2.0",
"nock": "^9.0.24",
"nyc": "^10.1.2",
"sinon": "^2.3.8",
"sinon-chai": "^2.14.0",
"ts-node": "^4.1.0",
"tslint": "^4.0.2",
"typescript": "^2.4.1"
},
"directories": {},
"dist": {
"shasum": "ca262caf55b22fd145b19704dd9ec17a07eb6455",
"tarball": "https://registry.npmjs.org/virtual-device-sdk/-/virtual-device-sdk-1.4.5.tgz",
"fileCount": 22,
"unpackedSize": 77187,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa2OHpCRA9TVsSAnZWagAAvBcP/A9SNRs2ipf92z5OijAC\n5wEeGHadwN0749G4EwhnXNGMhDnIOAbSEFJgIJH++xIsBjte3T3kyXPjh3xs\n9ubHn5EIqXQ5SKwnR2wxZ09x+JZ8/iIUJL6ddo1kZUcGPVL+2NdS38MO+p8n\n9fXDW8Et2MfbLXZfZUD4i/MyNbD49YRSFIR2X49iBDgsL29p5I6lXmPzKFfu\njAJoD9XCrP/JoZRniT/zc/QevUeq2dvIX7+I8mG4O/PuUes5Vlw7ufsVeR0+\niClaApDDNJnkPvfuK3kdORBe0PqVxKh3g0c4BOVqKPR9kx1LWpgLeS3BM2x1\nzvU0G53k5hKuEwTX5hcl3IxnutF8am01ZvgT+Z/R743p2nHPB2KSS9AAiWIV\nE2ii3+VLGSEd49VjrIaFOPMbQ/zaNDnm5k8v8a+e/sr8JHgnIICVjQUslx7y\nfK3k+QyH6lomHGulhuAHMw03HlT50LQi08HKD77+y2lvEhqmiTpk0tIirsao\n/CZyk6wvyozQFFzDQqHGanPXaBgCeq566HVRhr3GZvhRW6ADW4ujomefn5kk\nFtwdlM8tt88BjTNTKiyZ778GZMkoxqdtfrIKM+69TGGdKobyRjyNgCt4tIUh\n6kiOCWRYyLZhc0XzA8+IyRiGh8FLTovIa1SyT+ItnIwfi0TK4rRjFh535VIT\nlECo\r\n=pmY+\r\n-----END PGP SIGNATURE-----\r\n"
},
"engines": {
"node": "> 6.0.0"
},
"files": [
"lib/src/*.js",
"lib/src/*.d.ts"
],
"gitHead": "a2311d38107a5cb0e842c6c8f7f69b32f16712f4",
"homepage": "https://github.com/bespoken/virtual-device-sdk#readme",
"license": "Apache 2.0",
"main": "./lib/src/Index.js",
"maintainers": [
{
"name": "chrisramon",
"email": "<EMAIL>"
},
{
"name": "jpkbst",
"email": "<EMAIL>"
}
],
"name": "virtual-device-sdk",
"nyc": {
"exclude": [
"lib/test/**"
],
"reporter": [
"json",
"html"
]
},
"optionalDependencies": {},
"private": false,
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/bespoken/virtual-device-sdk.git"
},
"scripts": {
"lint": "tslint src/**/*.ts && tslint test/**/*.ts",
"posttest": "nyc report --reporter=json && codecov -f coverage/*.json",
"pretest": "npm run tsc && npm run lint",
"preversion": "npm run tsc",
"test": "nyc mocha lib/test/*Test.js",
"tsc": "tsc",
"typings": "typings install"
},
"typings": "./lib/src/Index.d.ts",
"version": "1.4.5"
}
|
json
|
import {Component} from 'angular2/core';
@Component({
template:'<h1>This is Pen1 Template</h1>'
})
export class Pen1Component
{
}
|
typescript
|
<reponame>praepunctis/twilioquest-ext-hack-cade<gh_stars>0
{
"title": "Scourge of the Seven C's",
"description": "This level contains compact, convenient, corny C course concepts.",
"mission_icon": "mission_icon.png",
"is_mission": true,
"priority": 1,
"backgroundMusic": "hackertheme_104771b",
"backgroundEffect": {
"key": "vr",
"options": {}
},
"flavorTextOverrides": {
"bookshelf": "There's nothing like a good book."
},
"objectives": ["1-come-in", "example_objective2"]
}
|
json
|
If you missed it then we've reported that Western Digital has already released the world's first staggeringly huge 3TB hard drive.
This makes for another milestone in drive capacities and another breaking of a legacy storage limitation, this time the 2.19TB limit imposed by older drives only supporting a maximum 32-bits worth of blocks, or 4.29 billion in old money.
But just as Moore's law for processors helps constantly drive up speeds while driving down costs, the ever increasing 'areal density' – the technical term for data density – of hard drive platters helps drive up capacities while costs fall. And that only leads to one thing: stunning deals on storage.
Currently Dabs is having a bonanza on all types of storage be it internal, external or solid state. To kick things off it's already listing that spectacular 3TB Western Digital drive for pre-order at just under £190, which works out at an incredible 6.3p per gigabyte. But if you're using that metric to measure value-for-money you should be eyeing up one of the 2TB drives – with many on offer at under £75 these are costing you as little as 3.75p per gigabyte. An absolute bargain.
If raw speed is more your thing rather than out-and-out capacity, this bit's for you. We're finally seeing decent solid state hard drives falling just below the £100 mark. Take the OCZ 60GB Vertex 2 drive, which can be snapped up for just under £98.
Compared to old-style mechanical spinning disk hard drives that's pricey £1.64 per gigabyte, which is forty times more expensive but the performance return is something you can't put a value on. These 2.5-inch drives will put a healthy performance boost into any desktop or laptop system, as they run rings around their spinning brethren.
You shouldn't miss the external options on offer either.
The one that really tweaked our interest is the well-known and popular Western Digital MyPassport Essential 250GB model, it's currently available for just £34.99. We're not sure how long that bargain is going to last, so if you're after some bus-powered external storage we'd snap one of these good-looking drives up pronto.
Or for just £10 more there's the Iomega 500GB 2.5-inch Select drive, this is again bus-powered so there's no need for an annoying external power supply. Both of these are perfect for when you need to take some serious storage on the move.
Get the hottest deals available in your inbox plus news, reviews, opinion, analysis, deals and more from the TechRadar team.
The TechRadar hive mind. The Megazord. The Voltron. When our powers combine, we become 'TECHRADAR STAFF'. You'll usually see this author name when the entire team has collaborated on a project or an article, whether that's a run-down ranking of our favorite Marvel films, or a round-up of all the coolest things we've collectively seen at annual tech shows like CES and MWC. We are one.
|
english
|
<filename>config.json
{
"botname": "MilkBot",
"gitlink": "https://github.com/astroantics/milkbot",
"supportserver": "https://discord.gg/9gvAq7r",
"botinvite": "https://discord.com/oauth2/authorize?client_id=722490368003670028&permissions=8&scope=bot",
"donatelink": "monero:43rf5jYqpPfCuJkaTwWrPY2DqbpLuiAMxTQxzdDc4RvyZNmxVxckZTmZeQLUaNypSDB55ARWMkMQ8GTHrXmV7PmG2qs3ZDN",
"creator": "lambdaguy101",
"prefix": "mb/",
"creatorUserID": "474918727507378198",
"contributors": [ "AstroAntics", "ImVerum", "DavidJoacaRo", "Jan0660" ]
}
|
json
|
Long before electric vehicles began dominating the discourse of green urban transport solutions in India, Bengaluru-based startup Lithium Urban Technologies (Lithium), founded by Sanjay Krishnan and Ashwin Mahesh, launched a 100 per cent electric taxi fleet in 2015, starting with just 10 Mahindra e20s vehicles.
In a little over four years, their fleet has expanded to 1,100 registered electric four-wheelers operating across 9 cities including Bengaluru, Hyderabad, Pune, Delhi, Noida, Gurugram and Jaipur, offering cab services to more than 30 corporate clients including Credit Suisse, Barclays, Google, and McKinsey.
Conducting about 25,000 trips per day, their fleet of cabs has so far completed about 100 million electric kilometres and aided in 20,000+ MT CO2 abatement and saved 8,500,000+ litres of fuel, according to the company.
By the end of the next financial year, it will look to add another 2,000 more vehicles.
“At Lithium Urban Technologies, we provide mobility services for corporate clients to not merely fulfill their employee transport needs, but also help them meet sustainability targets without crippling their budgets. We do this by using 100 per cent electric vehicles, which is good for the environment, their users and their profitability as well since the costs are lower than employing a fleet of IC-engine or CNG vehicles,” says Vikash Mishra, head of external relations at Lithium, in a conversation with The Better India.
Lithium allows clients to pay a monthly revenue per vehicle and on a per-trip basis. By understanding that the operating cost of EV is about one-fourth and one third of running a diesel or CNG vehicle respectively, Lithium runs its vehicles throughout the day over any distance their clients prefer. Mishra claims that the transportation costs for their clients have come down to as much as 15 per cent as compared to a fleet of IC-engine or CNG vehicles.
“In Delhi NCR for a 24-hour service, where we are deploying say two drivers in 12 hour shifts each, the charges can range from Rs 80,000-1,00,000 per month. On a per trip basis, it ranges from anywhere between Rs 500 and Rs 800 depending on whether they are travelling within Gurugram or Gurugram to Greater Noida,” says Mishra.
Moreover, Lithium can guarantee that these charges won’t drastically change for over a period of three years unlike fossil fuel-powered vehicles that have to account for fluctuations in crude oil prices.
Besides the vehicles themselves, Lithium offers their clients the entire ecosystem required to run their fleet. They own all 1,100 vehicles, have their own drivers, in-house developed technological platform that does the routing and scheduling of trips, and provide the charging infrastructure dedicated to that particular client.
At present, they are managing about 1500 charging stations for captive use, of which 300 are fast chargers and 1200 slow chargers. Slow chargers will take around 5-6 hours to ensure 100 per cent charge, whereas fast chargers take between 70 and 80 minutes.
Lithium provides three types of charging infrastructure.
- The startup provides charging infrastructure in the campus of the company which can be used by any employee, i.e. the charging stations that they have set up at Google.
- The second type involves a tie-up with a real estate developer like Embassy, to set up charging stations on their properties. Any user or company working out of their properties can use our charging infrastructure during working hours.
- The third type is the renewable charging hubs, where Lithium has set up infrastructure on real estate it owns. The first charging hub in the country is already running in Gurugram powered by Hyderabad-based rooftop solar company Fourth Partner Energy.
“At our hub in Gurugram, we can charge 30 cars at a time. We will soon open this up to private consumers as well although for the time being it’s for our own captive use,” says Mishra.
In the next few months, they will open a charging hub in Pune, and hope to establish around 25 such installations over the next few years.
So, how does Lithium schedule trips for their clients?
Companies let the startup know in advance the different shifts within which they would like the service. Once they receive a roster of the client’s transport needs 24 hours in advance along with drop-off locations, they plan accordingly which time the employees have to be picked up, dropped and the lag time they have to charge their vehicles. Based on the roster companies give them, Lithium works on how to plan their schedule based on charging time requirements.
Meanwhile, the drivers they hire are deemed as ‘service providers’ and paid a fixed monthly salary of upto Rs 20,000 or more depending on whether they pick up more shifts.
These drivers predominantly ferry their clients in the range of EVs provided by mega vehicle manufacturer Mahindra & Mahindra, but Lithium is looking to expand to the Tata Tigor amongst others. The startup wants to operate a range of EV models that offer greater choice of services to clients like employee transport needs, inter-city travel and airport drops, etc. They essentially want to expand their EV vehicle portfolio to offer a range of services.
Instead of getting into Uber of Ola-like cab services for average customers. Lithium is happy to service corporate clients for the time being. Why?
“The short answer is lack of charging infrastructure. In a B2C segment like Ola and Uber, you don’t know in advance where the user is going to start and end the trip. When vehicles have a range limitation and an extensive charging infrastructure network doesn’t exist, it’s very difficult to plan your trip in advance. That is why our focus is on a scenario where we already know where employees reside and the office is located. It’s easier to plan your trip, vehicle, driver and charging time effectively. But let’s say in the future, when cities have very dense charging infrastructure networks, then the B2C segment is worth considering,” he says.
(Edited by Saiqua Sultan)
Like this story? Or have something to share? Write to us: contact@thebetterindia.com, or connect with us on Facebook and Twitter.
Ex-Army Officer is Restoring Bengaluru’s Stormwater Drains; Can it Help Fight Floods?
We bring stories straight from the heart of India, to inspire millions and create a wave of impact. Our positive movement is growing bigger everyday, and we would love for you to join it.
Please contribute whatever you can, every little penny helps our team in bringing you more stories that support dreams and spread hope.
|
english
|
<gh_stars>0
import { Controller, Post, UseGuards } from '@nestjs/common';
import {ApiTags, ApiBody, ApiResponse} from '@nestjs/swagger';
import { AuthService } from './auth.service';
import { LocalAuthGuard } from './local-auth.guard';
import { JwtAuthGuard } from './jwt-auth.guard';
import { UserSession } from '../users/users.session.decorator';
import { User } from '../users/users.interface';
import {LoginDto, LoginResponse} from './dto/login.dto';
import {ResourcesResponse} from "../resources/resources.dto";
@ApiTags('auth')
@Controller('auth')
export class AuthController {
constructor(private readonly authService: AuthService) {}
@UseGuards(LocalAuthGuard)
@Post('login')
@ApiBody({ type: LoginDto })
@ApiResponse({ status: 200, type: LoginResponse })
login(@UserSession() user: User): LoginResponse {
return this.authService.login(user);
}
@UseGuards(JwtAuthGuard)
logut() {
/* TODO: logout action ? */
}
}
|
typescript
|
The brutal murder of advocates Gattu Vamana Rao and his wife PV Nagamani on a busy highway in Peddapalli district earlier this week, has led to widespread protests from lawyers across the Telangana. Several petitions have been filed before the courts, even as advocates abstained from their duties and took to the streets blocking roads and holding candlelight vigils.
In a statement condemning the brutal murder, Telangana Bar Council chairman A Narasimha Reddy said the country is witnessing frequent attacks on advocates and urged the government to enact the Advocates Protection Act to safeguard the lawyers’ community. Vamana Rao’s father has sought a CBI probe alleging larger political conspiracy in the murders.
This is the echo across the fraternity in the state too. Stating the morale of advocates across the state is down since the incident, Manjusha Ettovoni, former vice-president of the Hyderabad City Civil Court Advocates Association, said advocates are like other professionals who discharge their duties, and it should be without any fear. “This incident has sent shivers down our spines. I have 40 young interns, most of the parents want them to quit the profession and go back. The terror associated with the incident will further alienate young lawyers, especially women, from fighting for justice. The incident also shows that it should be the responsibility of the government to protect them,” she said.
Ettovoni lamented that even if the passengers of the buses at the spot had raised their voices, the lives could have been saved. “Everyone just kept watching. It is so ghastly that one can hear Vamana Rao requesting for water and ambulance while people continue to film his death,” she added.
Ramagundam Police on Thursday night arrested Kunta Sreenivas (44), TRS party’s Manthani Mandal president and formerly associated with an outfit allegedly linked to CPI (Maoists), S Chiranjeevi (35), and Akkapaka Kumar (44) in connection with the murders. On Vamana Rao’s father Kishan Rao’s complaint, police have registered a case on charges of murder, criminal conspiracy, and wrongful restraint against the trio. Sreenivas was subsequently suspended from the party.
After the arrests, Ramagundam Police suggested a criminal conspiracy in the case. The accused had followed the couple from the court in Manthani to the spot near a filling station on the main road to Kalvacherla where they were assassinated, the police maintained.
Chikkudu Prabhakar, an advocate known for filing several public interest litigations, termed the incident a culpable homicide by the state and demanded an impartial investigation under the supervision of a sitting Judge of the High Court. “Not once but repeatedly Vamana Rao and Nagamani sought protection and despite the then Chief Justice directing the government it failed to act. It is the denial of this protection that cost them their lives,” said Prabhakar.
Moments before his death, lying on the road and soaked in blood, Vamana Rao had named Kunta Sreenivas as the perpetrator. This dying declaration recorded by an onlooker using his mobile phone is the most valuable evidence in the case. Taking up the case suo-motu, a division bench of the Telangana High Court directed police to trace the viral video clips that recorded Rao’s dying declaration and preserve it. The bench led by Chief Justice Hima Kohli issued notices to the government and directed the police a time-bound investigation after collecting all material evidence. It has sought a counter-affidavit from the government on March 1.
Sudarshan Malugari, the secretary of Telangana High Court Advocates Association, echoed the same views. “We met with the Chief Justice on Thursday and expressed our pain and anguish. She assured us that the state and police authorities were directed to submit their counter explanation by March 1. We will then see all kinds of possibilities to fix the people involved in the brutal murder,” he said.
On Thursday, over 10,000 advocates from across the state took to protest against the murders following a call from the High Court Advocates’ Association. “Advocates at the High Court will attend the courts as the CJ has given an assurance. Meanwhile, advocates at all lower courts will observe protests and boycott courts,” he added.
According to him, Vamana Rao and his wife Nagamani were murdered as they tried to expose the illegal activities of local politicians. “Advocates have become soft targets. Over a decade ago, advocate Ashok Reddy was brutally assassinated because he appeared before the revenue tribunal in certain land matters. Similarly, in 2005, two women advocates were killed after their client did not get favourable orders. We have to assume that the latest murders are a signal sent out to all advocates,” he stated.
According to him, the unanimity with which advocates across the state staged protests meant that anyone who does anything of this kind will run a larger risk in the future. “This is one of its kind and hopefully will remain one of its kind. I think this is also a reflection of larger malice in our society, a tendency to take to violence at the drop of a hat. I also believe the government will bring in the right measures to ensure things like this do not happen again,” he said.
On the progress of the investigation into the case, Ramagundam police commissioner V Satyanarayana told indianexpress. com that police will seek custody of the three arrested persons for further questioning, scene reconstruction, and collection of evidence such as weapons used. “We are doing a meticulous investigation. We are questioning one Bittu Srinu in connection to the case. He will be arrested for his role in the crime. We will corroborate the findings with technical evidence, including digital and social media,” he said. Tulisegari Srinivas alias Bittu Srinu is the nephew of former TRS Legislator and Peddapalli Zilla Parishad Chairman Putta Madhu.
Similarly, the State Human Rights Commission took suo-motu cognisance of press reports that said the deceased couple had already complained to the police about threats to their lives, and their lives were not saved. The Commission, hence, called for a report on the incident from the Director-General of Police by March 10.
Meanwhile, Warangal Advocates Association secretary Ennamsetti Venugopal Rao was on Wednesday roughed up by two strangers, ironically as he was watching the news of the double murder. The 50-year-old was waiting for his turn at an ATM near his home when he stopped two youngsters who tried to jump the queue. “One of them punched me on my forehead while the other hit me on my jaw. As I resisted them, they fled the place without withdrawing money. I was left with a swollen face and bleeding from my forehead,” recalled Rao. The Subedari police station in Hanamkonda has registered a case under Section 324 IPC (Voluntarily causing hurt using dangerous weapons or means) and started an investigation.
|
english
|
import React from 'react';
import { SegmentProvider, useSegment } from './provider';
export default {
title: 'SegmentProvider',
};
function MyComponent() {
const analytics = useSegment();
function trackEvent() {
analytics.track({
event: 'Test Event',
});
}
function pageEvent() {
analytics.page({
name: 'Fake page',
});
}
function identifyEvent() {
analytics.identify({
userId: '12345',
traits: {
email: '<EMAIL>',
},
});
}
function groupEvent() {
analytics.group({
groupId: 'Fake Group',
});
}
function aliasEvent() {
analytics.alias({
userId: '12345',
previousId: '54321',
});
}
return (
<div>
<button onClick={trackEvent}>Track event</button>
<button onClick={pageEvent}>Page event</button>
<button onClick={identifyEvent}>Identify event</button>
<button onClick={groupEvent}>Group event</button>
<button onClick={aliasEvent}>Alias event</button>
</div>
);
}
export const WithDebug = () => (
<SegmentProvider apiKey="<KEY>" debug>
<MyComponent />
</SegmentProvider>
);
WithDebug.story = {
name: 'With debug',
};
export const NoDebug = () => (
<SegmentProvider apiKey="<KEY>">
<MyComponent />
</SegmentProvider>
);
NoDebug.story = {
name: 'No debug',
};
|
typescript
|
<reponame>diguage/lexicon-tools
{"web":[{"value":["远见","预见","先知先觉"],"key":"foresight"},{"value":["完全预见","完全预期","完美预见"],"key":"Perfect Foresight"},{"value":["神机妙算","神算"],"key":"wonderful foresight"}],"query":"foresight","translation":["远见"],"errorCode":"0","dict":{"url":"yddict://m.youdao.com/dict?le=eng&q=foresight"},"webdict":{"url":"http://m.youdao.com/dict?le=eng&q=foresight"},"basic":{"us-phonetic":"'fɔrsaɪt","phonetic":"'fɔːsaɪt","uk-phonetic":"'fɔːsaɪt","explains":["n. 先见,远见;预见;深谋远虑"]},"l":"EN2zh-CHS"}
|
json
|
<filename>v2/items/83708.json
{
"name": "<NAME> <NAME>",
"description": "Double-click to summon this mini to follow you around. Only one mini may be in use at a time.",
"type": "MiniPet",
"level": 0,
"rarity": "Exotic",
"vendor_value": 100,
"game_types": [
"PvpLobby",
"Activity",
"Wvw",
"Dungeon",
"Pve"
],
"flags": [
"NoMysticForge",
"NoSell",
"DeleteWarning"
],
"restrictions": [],
"id": 83708,
"chat_link": "[\u0026AgH8RgEA]",
"icon": "https://render.guildwars2.com/file/AD160398D8E79AFF62E3F867BC7EA8F822BD0259/1766830.png",
"details": {
"minipet_id": 518
}
}
|
json
|
Recently she became a Green Queen. Meaning was chosen as a brand ambassador for promoting the ÂSave Environment campaign by NDTV. And now Priyanka Chopra has volunteered to support the international organisation called ÂSave the ChildrenÂ. The organisation has introduced a campaign, ÂRewrite the FutureÂ, that aids in reforming the lives of underprivileged children of 100 countries.
Keep up the social work, gal!
Follow us on Google News and stay updated with the latest!
|
english
|
<reponame>newtonflash/aem-node-experience-layer<filename>react-src/components/OverviewSidebar/OverviewSidebarSection/OverviewSidebarSection.component.js
// This file is maintained by storybook, not to be modified
import PropTypes from 'prop-types';
import React from 'react';
import CustomContent from '../../CustomContent/CustomContent.component';
import IconFacebook from '../../Icon/Facebook.component';
import IconInstagram from '../../Icon/Instagram.component';
import IconTwitter from '../../Icon/Twitter.component';
export const OverviewSidebarSectionPropTypes = {
headline: PropTypes.shape({
title: PropTypes.string.isRequired,
content: PropTypes.oneOfType([
PropTypes.shape({
type: PropTypes.oneOf(['text']).isRequired,
text: PropTypes.string.isRequired,
}),
PropTypes.shape({
type: PropTypes.oneOf(['link']).isRequired,
linkUrl: PropTypes.string.isRequired,
linkText: PropTypes.string.isRequired,
}),
PropTypes.shape({
type: PropTypes.oneOf(['social-icons']).isRequired,
facebookUrl: PropTypes.string,
instagramUrl: PropTypes.string,
twitterUrl: PropTypes.string,
}),
]),
}),
items: PropTypes.arrayOf(
PropTypes.oneOfType([
PropTypes.shape({
type: PropTypes.oneOf(['inline-text']).isRequired,
label: PropTypes.string.isRequired,
text: PropTypes.string.isRequired,
}),
PropTypes.shape({
type: PropTypes.oneOf(['inline-link']).isRequired,
label: PropTypes.string.isRequired,
linkUrl: PropTypes.string.isRequired,
linkText: PropTypes.string.isRequired,
}),
PropTypes.shape({
type: PropTypes.oneOf(['content']).isRequired,
contentHTML: PropTypes.string.isRequired,
}),
PropTypes.shape({
type: PropTypes.oneOf(['list']).isRequired,
listItems: PropTypes.arrayOf(PropTypes.string).isRequired,
}),
]),
),
};
class OverviewSidebarSection extends React.PureComponent {
static displayName = 'OverviewSidebarSection';
static propTypes = OverviewSidebarSectionPropTypes;
static defaultProps = {
headline: undefined,
items: [],
};
static renderSocialIcon({ Icon, url }) {
return (
<a href={url} className="OverviewSidebarSection__headline__social-link">
<Icon id={Math.random().toString()} />
</a>
);
}
static renderHeadlineContent(content) {
switch (content.type) {
case 'text':
return content.text;
case 'link':
return <a href={content.linkUrl}>{content.linkText}</a>;
case 'social-icons':
return (
<div className="OverviewSidebarSection__headline__social-links">
{content.facebookUrl &&
OverviewSidebarSection.renderSocialIcon({
Icon: IconFacebook,
url: content.facebook,
})}
{content.instagramUrl &&
OverviewSidebarSection.renderSocialIcon({
Icon: IconInstagram,
url: content.instagram,
})}
{content.twitterUrl &&
OverviewSidebarSection.renderSocialIcon({
Icon: IconTwitter,
url: content.twitter,
})}
</div>
);
default:
throw new TypeError(`Unknown headline.content.type: ${content.type}`);
}
}
static renderItem(item, index) {
if (item.type === 'inline-text') {
return (
<div
className="OverviewSidebarSection__item OverviewSidebarSection__item--inline"
key={index}
>
<div className="OverviewSidebarSection__item__label">
{item.label}
</div>
<div className="OverviewSidebarSection__item__content">
{item.text}
</div>
</div>
);
}
if (item.type === 'inline-link') {
return (
<div
className="OverviewSidebarSection__item OverviewSidebarSection__item--inline"
key={index}
>
<div className="OverviewSidebarSection__item__label">
{item.label}
</div>
<div className="OverviewSidebarSection__item__content">
<a href={item.linkUrl}>{item.linkText}</a>
</div>
</div>
);
}
if (item.type === 'content') {
return (
<div
className="OverviewSidebarSection__item OverviewSidebarSection__item--block"
key={index}
>
<CustomContent innerHTML={item.contentHTML} />
</div>
);
}
if (item.type === 'list') {
return (
<div
className="OverviewSidebarSection__item OverviewSidebarSection__item--block"
key={index}
>
<CustomContent>
<ul>
{item.listItems.map((listItem, listItemIndex) => (
<li key={listItemIndex}>{listItem}</li>
))}
</ul>
</CustomContent>
</div>
);
}
throw new TypeError(`Unknown items[].type: ${item.type}`);
}
render() {
const { headline, items } = this.props;
return (
<div className="OverviewSidebarSection">
{headline && (
<div className="OverviewSidebarSection__headline">
<div className="OverviewSidebarSection__headline__title">
{headline.title}
</div>
{headline.content && (
<div className="OverviewSidebarSection__headline__content">
{OverviewSidebarSection.renderHeadlineContent(headline.content)}
</div>
)}
</div>
)}
{items.length > 0 && (
<div className="OverviewSidebarSection__items">
{items.map((item, index) =>
OverviewSidebarSection.renderItem(item, index),
)}
</div>
)}
</div>
);
}
}
export default OverviewSidebarSection;
|
javascript
|
A lot of people remember Winamp, the PC MP3 player that almost everyone used in the 1990s or early 2000s for their downloaded music. With technology costantly changing the way we listen to our music, Winamp, the MP3 legend from back in the day also faded out as we picked up new ways to listen to music over time. Winamp had a minimal interface and tiny playback controls that could be moved anywhere on the screen, and very prominent equalisers. If you are one of the people whose music relied on Winamp back in the day, you are in for a treat. There is a Winamp Skin Museum that has a collection of over 65,000 Winamp skins that are searchable and fully interactive.
The Winamp Museum is a collection of over 65,000 Winamp skins and users can add their own skins into Webamo, a web-based version of Winamp 2. This Winamo museum also allows users to upload audio files from their computers. On the website, the Winamp Skin Museum is described as an attempt to build a fast and shareable interface for the collection of Winamp skins amassed on the internet archive. The Winamp museum was created by Facebook engineer Jordan Elredge. He said in February that he has trained an ML model to generate Winamp skin screenshots. He says that as they turned out ? quite interesting,? he? s taken the next step, which is trying to generate actual skins.
There is also a bot that tweets a different Winamp skin every few hours that can be loaded directly into a browser via Webamp.
Read all the Latest News, Breaking News and Coronavirus News here.
|
english
|
Shikhar Dhawan and Virat Kohli batted with authority to chase a competitive total and ensure that India clinched the Asia Cup for a record sixth time in Mirpur. Bangladesh were in the contest for most parts but ran out of steam in the end as the raucous crowd at the Shere Bangla Stadium was silenced.
That the match even happened was a minor miracle in itself. A heavy thunderstorm gripped Mirpur for at least a couple of hours into the pre-scheduled playing time. But, the ground staff braved the incessant rain and swooped in when the skies began to clear. A world-class drainage system also helped significantly to get the match started.
Here are all the stats from the final Asia Cup game:
280 - Mahendra Singh Dhoni’s strike in this year’s edition of Asia Cup T20. He faced only 15 deliveries throughout the tournament and made 42 runs off it.
84. 22 - Virat Kohli’s average while chasing in T20I :
MS Dhoni finishing with a six in a successful chase:
10 - Ten wins in 11 T20Is this year are the most India have won in a calendar year. And still 300 days are left in the year!
MS Dhoni's trophies:
|
english
|
const { expect } = require('chai');
const { describe, it, before, beforeEach, afterEach } = require('mocha');
describe('option model', () => {
let User, Option, db;
before(async () => {
db = require('../')();
User = db.User;
Option = db.Option;
await Option.sync({ force: true });
});
let user, option
beforeEach(async () => {
user = await User.create({
name: 'Test',
password: '<PASSWORD>'
})
option = await Option.create({
name: 'some option',
value: 'some value',
UserId: user.id
})
})
it('should be able to create an option with a user', async () => {
expect(option.name).to.equal('some option');
expect(option.value).to.equal('some value');
const optionUser = await option.getUser();
expect(optionUser.name).to.equal('Test');
const [userOption] = await user.getOptions();
expect(userOption.name).to.equal('some option');
});
afterEach(async () => {
return await user.destroy();
})
});
|
javascript
|
<reponame>cehbrecht/md-ingestion
{
"name" : "<commShortname>",
"title" : "<COMMShortName>",
"description" : "The <Community Longname> ([<COMMShortName>](http://www.<commShortname>.eu/ \"<COMMShortName>\")) is a <Description>.",
"image_url" : "http://b2find.eudat.eu/images/communities/<commShortname>_logo.png",
"image_url_orig" : "<commLogoPath>"
}
|
json
|
# crypto-museum-demo
Original version - https://github.com/SamueleA/crypto-museum-demo/
|
markdown
|
New Delhi/Guwahati: With the Supreme Court ordering a draft to be prepared of the National Register of Citizenship (NRC) to curb ‘illegal immigration’, minorities in Assam are wary of losing their citizenship if their gram panchayat certificates are considered invalid.
As the December 31 deadline for the NRC draft approaches, the All Assam Minorities Students Association (AAMSU) has claimed that a fear has gripped the “genuine Indian citizens”.
The union says it is doubtful if the gram panchayat certificates, submitted by many, would be considered valid for the exercise.
The latest NRC comes after the Supreme Court linked illegal immigration to "external aggression" in Assam and ordered a draft to be prepared by January this year, which was later extended to December 31. The last NRC in Assam was processed in 1951.
Talking to News18, Azizur Rehman, president of AAMSU blamed the government for not taking steps to overcome this fear among minorities.
In February this year, the Gauhati High Court ruled that the panchayat certificates had no legal validity.
Even though a panchayat certificate is among the 11 documents approved by a sub-committee of the state cabinet in 2010 to prove citizenship, in itself, the HC stated that it cannot be treated as a link document by an applicant to prove citizenship. It can only be a supporting document.
However, organisations like AAMSU have appealed to the Supreme Court against the HC verdict. Deciding on a bunch of petitions in August, a two-judge SC bench ordered the NRC coordinator in Assam, Prateek Hajela, to file a report within six weeks on how many of the 48 lakh applicants, who had submitted only a panchayat certificate, were “original inhabitants” of the state. The next date of hearing is November 15.
The AAMSU president also said that reports of minority groups bringing in crores of people in Guwahati for November 27, is "false propaganda".
"There is no such congregation on the cards. There will be peaceful rallies from villages. These people have only two demands. First, those who entered Assam post-1971 should be deported and second, in the name of D-Voter and foreigners, random harassment that is being carried out on genuine Indian citizens should stop,” said Rehman.
However, state NRC coordinator, Prateek Hajela is of the view that raking up the matter would be improper as it is sub judice.
“The matter is sub judice as the Gauhati HC has already said that gram panchayat certificate will, at best, act as a private document and therefore it cannot be used for NRC. Now, there is an appeal in form of a Special Leave Petition (SLP) at the Supreme Court and the next hearing is on November 15. I have informed the SC that around 47 lakh such certificates have been submitted," said Hajela.
Hajela also said that the happenings at the foreigner tribunals were beyond the scope of NRC to intervene, as the tribunals are an appellate authority.
"Doubtful voters or D-voters have been found to be unsure of their citizenship rights. That's how the cases have been referred to foreign tribunals. Now, the SC has ruled that D-voters will have to wait for the orders from the foreign tribunals. This is an appellate authority above the NRC and hence if a matter is pending before the tribunal, we cannot get into it,” said the state NRC Coordinator.
All Assam Students Union's head, Lurin Jyoti Gogoi too reiterated that the Panchayat certificates were only supporting documents.
"How can these certificates be proof of citizenship? These are just supporting documents. This is false propaganda to gain sympathy for crores of illegal immigrants. This draft NRC would drop at least 50 lakh people from the citizenship list," said Gogoi.
“Initially, the OI was given to tea garden workers and others like them, who didn't have documents. It was given with the agreement of the local NRC authority. If officials thought beyond doubt that the person was from Assam, they were given the OI status. Now, except for Muslims and Bengali Hindus, almost everyone is an OI," said the lawyer.
Wadud feels that this distinction might make its way into the draft NRC, thereby rendering scores of people stateless.
"There are many places where Muslims still are not original inhabitants, despite some of them being able to trace their parentage to over 100 years here. There is a bias that can been seen. This problem may creep into the draft NRC as well. After it is published, there may be a classification between OI and non-OI," said Wadud.
However, the state NRC Coordinator allayed such fears and said that "no such distinction will be made".
"We are making no distinction between the original inhabitants and non-original inhabitants. The draft will include all Citizens of India irrespective of what the mechanism is, by which their citizenship was determined. Someone must be in the 1951 list and some in the voters list. We are considering all of these," said Hajela who is also judging the veracity of the documents by asking the issuing authority to check the authenticity.
With the NRC is now racing towards its December 31 deadline to determine how many of Assam’s 34 million people are Indians, Wadud, who has travelled extensively in Assam for these cases, thinks that it's the minorities who have all their in place documents as compared to the others.
"This was a blessing in disguise as immediately after partition, Muslims were a harassed lot, so they have preserved all the documents. These documents are more precious to them than their lives. It’s the basis of their existence," said Wadud.
Hajela told News18 that the main task before them was to check the consistency of the claims being made.
"We are also looking into the consistency of the claims being made by people to establish a family tree. In Assam, it is citizenship by descent unlike the rest of India and hence, we are checking the links to their ancestors," said Hajela.
But Wadud still feels that if the Citizenship Bill sees the light of the day, which proposes to give citizenship to all persecuted minorities from neighbouring nations that categorically exclude Muslims, it will be a sail through for the original inhabitants or OIs.
"The government is even deliberating a Bill to grant citizenship to Bengali Hindus who came here till 2014. Now, Bengali Hindus will also be OIs even if they entered Assam one or two years ago. So, this entire process is only about targeting Muslims. Till now around 1. 5 crore people have been declared OI and all Muslims have been left out," said the human rights lawyer.
|
english
|
On December 13, the opposition forced the adjournment of the question hour during the Lok Sabha winter session. Displeased by the way the opposition leaders, especially the members of the Congress Party, Home Minister Amit Shah lashed out at them in the press brief.
It is notable that the Ministry of Home Affairs cancelled the FCRA licence of the Rajiv Gandhi Foundation on October 23, 2022. It was reported that the decision was made based on investigations conducted by an inter-ministerial committee constituted by the ministry of home affairs (MHA) in July 2020. A notice regarding the termination of the licence was sent to the office-bearers of the foundation. In July 2020, the MHA formed an inter-ministerial committee led by an Enforcement Directorate (ED) officer to investigate Rajiv Gandhi Foundation (RGF), Rajiv Gandhi Charitable Trust (RGCT), and Indira Gandhi Memorial Trust, for alleged violations of the Money Laundering Act, Income Tax Act, and FCRA. The committee, which included officers from the union home and finance ministries in addition to the Central Bureau of Investigation (CBI), was tasked with investigating whether the trusts run by the Gandhi family and other Congress leaders tampered with documents when filing income taxes or misused and laundered money received from foreign countries.
On December 7, the question on the cancellation of the license was raised in Rajya Sabha by Digvijay Singh and Amee Yajnik. In the reply, Nityanand Rai, Minister of State, Ministry of Home Affairs said that under section 14 of the Foreign Contribution (Regulation) Act, 2010 (FCRA, 2010) due to violation of provisions under section 11 and conditions of registration under section 12(4)(a)(vi) of the FCRA, 2010. The FCRA licence of the Rajiv Gandhi Charitable Trust (RGCT) was cancelled under section 14 of the FCRA, 2010 due to violation of provisions under sections 8(1)(a), 11, 17, 18, 19 and conditions of registration under section 12(4)(a)(vi) of the FCRA, 2010.
On December 13, the question was raised in Lok Sabha by VK Shreekandan and Benny Behanan. Rai submitted the same answer in the house. In both cases, the reasons mentioned by HM Shah during the media brief were not mentioned. As per the reply submitted by Home Ministry, the foundation will not be eligible for the license for another three years.
|
english
|
package mx.ipn.escom.prueba.coffeeapp.asynctasks;
import android.os.AsyncTask;
import android.util.Log;
import mx.ipn.escom.prueba.coffeeapp.services.ProductosService;
import retrofit2.Response;
public class IsDisponibleAsyncTask extends AsyncTask<Integer,Void, Void> {
private ProductosService productosService;
private Response<Boolean> response;
public IsDisponibleAsyncTask(ProductosService productosService){
this.productosService = productosService;
}
@Override
protected Void doInBackground(Integer... integers) {
try{
response = productosService.isProductoDisponible(integers[0],integers[1],integers[2]).execute();
if (response.isSuccessful()){
Log.d("--->", "Resultado" + response.body());
}else{
Log.d("--->","ERROR");
}
}catch (Exception e){
e.printStackTrace();
}
return null;
}
public Boolean getResponseBody(){
return response.body();
}
}
|
java
|
use linux_io_uring::{ opcode, IoUring };
#[test]
fn test_poll_add() -> anyhow::Result<()> {
let mut io_uring = IoUring::new(1)?;
let (rp, wp) = nix::unistd::pipe()?; // just test, we don't close
let entry = opcode::PollAdd::new(opcode::Target::Fd(rp), libc::POLLIN);
unsafe {
io_uring
.submission()
.available()
.push(entry.build().user_data(0x42))
.map_err(drop)
.expect("queue is full");
}
io_uring.submit()?;
assert!(io_uring.completion().is_empty());
nix::unistd::write(wp, b"pipe")?;
io_uring.submit_and_wait(1)?;
let entry = io_uring
.completion()
.available()
.next()
.expect("queue is empty");
assert_eq!(entry.result() as i16 & libc::POLLIN, libc::POLLIN);
assert_eq!(entry.user_data(), 0x42);
Ok(())
}
#[test]
fn test_poll_remove() -> anyhow::Result<()> {
let mut io_uring = IoUring::new(1)?;
let (rp, _) = nix::unistd::pipe()?; // just test, we don't close
let token = 0x43;
let entry = opcode::PollAdd::new(opcode::Target::Fd(rp), libc::POLLIN);
unsafe {
io_uring
.submission()
.available()
.push(entry.build().user_data(token))
.map_err(drop)
.expect("queue is full");
}
io_uring.submit()?;
assert!(io_uring.completion().is_empty());
let entry = opcode::PollRemove::new(token);
unsafe {
io_uring
.submission()
.available()
.push(entry.build().user_data(token))
.map_err(drop)
.expect("queue is full");
}
io_uring.submit_and_wait(1)?;
let entry = io_uring
.completion()
.available()
.next()
.expect("queue is empty");
assert_eq!(entry.result(), 0);
assert_eq!(entry.user_data(), token);
Ok(())
}
|
rust
|
The special day is here to express your love for your sister. The beautiful festival of Raksha Bandhan has cultural significance. The day is dedicated to the sibling’s bond and represents love and duty. In Mahabharata, it is believed that once Draupadi tied a strip of cloth to the bleeding hand of Lord Krishna. In return, Lord Krishna rewarded her with his divine protection.
There’s also a belief that Lord Yama blessed his sister and promised that all sisters who will tie Rakhi on Shravana Purnima would have his blessings. And there can be many other historical and cultural significance. Raksha Bandhan will be celebrated today August 11, 2022.
TO READ THE FULL STORY, SUBSCRIBE NOW NOW AT JUST RS 249 A MONTH.
What you get on Business Standard Premium?
- Unlock 30+ premium stories daily hand-picked by our editors, across devices on browser and app.
- Pick your 5 favourite companies, get a daily email with all news updates on them.
- Full access to our intuitive epaper - clip, save, share articles from any device; newspaper archives from 2006.
- Preferential invites to Business Standard events.
- Curated newsletters on markets, personal finance, policy & politics, start-ups, technology, and more.
|
english
|
{"videojs.ima.js":"sha256-mJfCCt6h+g1tTOer2G3ADmcoahf1L2USbWuSI3Ey02c=","videojs.ima.min.js":"<KEY>}
|
json
|
version https://git-lfs.github.com/spec/v1
oid sha256:5de04758e6d467c9fdde403eea89b5088a9c1c7917d965227b1dda6d7c466d73
size 443703
|
json
|
package Main;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.control.cell.PropertyValueFactory;
import java.sql.ResultSet;
import java.sql.SQLException;
/**
* 负责查询并显示结果的类
*/
public class Search {
//商品信息查询
public void goodsSearch( TableView Table, TableColumn name, TableColumn no, TableColumn mf,TableColumn num) throws SQLException {
ObservableList<Data> list = FXCollections.observableArrayList();
//获取搜索框中的数据
//创建DBcon对象,连接数据库输入sql查询语句,将数据以结果集形式返回
DBcon dBcon = new DBcon();
ResultSet dbre = dBcon.Db("select 商品名,商品编号,供货商,库存量 from 仓库 ");
//通过循环获取返回的结果集的数据
while (true){
//若下一组结果集没有数据则关闭结果集并跳出循环
if (!dbre.next()){
dbre.close();
break;
}
//从结果集中获取数据
String txtname = dbre.getString("商品名");
String txtno = dbre.getString("商品编号");
String txtmf = dbre.getString("供货商");
int txtnum = dbre.getInt("库存量");
//创建值对象
Data data = new Data();
data.GoodsSearchData(txtname,txtno,txtmf,txtnum);
name.setCellValueFactory(new PropertyValueFactory("name"));//映射
no.setCellValueFactory(new PropertyValueFactory("no"));
mf.setCellValueFactory(new PropertyValueFactory("mf"));
num.setCellValueFactory(new PropertyValueFactory("num"));
//list添加值对象
list.add(data);
//tableview添加list
Table.setItems(list);
}
}
public void goodsSearch(TextField searchGoods, TableView Table, TableColumn name, TableColumn no, TableColumn mf,TableColumn num) throws SQLException {
ObservableList<Data> list = FXCollections.observableArrayList();
//获取搜索框中的数据
String goods = searchGoods.getText();
//创建DBcon对象,连接数据库输入sql查询语句,将数据以结果集形式返回
DBcon dBcon = new DBcon();
ResultSet dbre = dBcon.Db("select 商品名,商品编号,供货商,库存量 from 仓库 where 商品编号='"+goods+"' or 商品名='"+goods+"'");
//通过循环获取返回的结果集的数据
while (true){
//若下一组结果集没有数据则关闭结果集并跳出循环
if (!dbre.next()){
dbre.close();
break;
}
//从结果集中获取数据
String txtname = dbre.getString("商品名");
String txtno = dbre.getString("商品编号");
String txtmf = dbre.getString("供货商");
int txtnum = dbre.getInt("库存量");
//创建值对象
Data data = new Data();
data.GoodsSearchData(txtname,txtno,txtmf,txtnum);
name.setCellValueFactory(new PropertyValueFactory("name"));//映射
no.setCellValueFactory(new PropertyValueFactory("no"));
mf.setCellValueFactory(new PropertyValueFactory("mf"));
num.setCellValueFactory(new PropertyValueFactory("num"));
//list添加值对象
list.add(data);
//tableview添加list
Table.setItems(list);
}
}
public void inGoodsSearch( TableView Table, TableColumn noIn, TableColumn nameIn, TableColumn adminIn,TableColumn dateIn,TableColumn numIn) throws SQLException {
ObservableList<Data> list = FXCollections.observableArrayList();
// //获取搜索框中的数据
// String goods = searchGoods.getText();
//创建DBcon对象,连接数据库输入sql查询语句,将数据以结果集形式返回
DBcon dBcon = new DBcon();
ResultSet dbre = dBcon.Db("select 仓库.商品编号,商品名,账号,入库时间,入库数量 from 入库单,仓库 where 入库单.`商品编号`=仓库.`商品编号` ");
//通过循环获取返回的结果集的数据
while (true){
//若下一组结果集没有数据则关闭结果集并跳出循环
if (!dbre.next()){
dbre.close();
break;
}
//从结果集中获取数据
String txtnoIn = dbre.getString("商品编号");
String txtnameIn = dbre.getString("商品名");
String txtadminIn = dbre.getString("账号");
String txtdeatIn = dbre.getString("入库时间");
int txtnumIn = dbre.getInt("入库数量");
//创建值对象
Data data = new Data();
data.InGoodsSearchData(txtnoIn,txtnameIn,txtadminIn,txtdeatIn,txtnumIn);
noIn.setCellValueFactory(new PropertyValueFactory("noIn")); //映射
nameIn.setCellValueFactory(new PropertyValueFactory("nameIn"));
adminIn.setCellValueFactory(new PropertyValueFactory("adminIn"));
dateIn.setCellValueFactory(new PropertyValueFactory("dateIn"));
numIn.setCellValueFactory(new PropertyValueFactory("numIn"));
//添加值对象
list.add(data);
//tableview添加list
Table.setItems(list);
}
}
public void inGoodsSearch(TextField searchGoods, TableView Table, TableColumn noIn, TableColumn nameIn, TableColumn adminIn,TableColumn dateIn,TableColumn numIn) throws SQLException {
ObservableList<Data> list = FXCollections.observableArrayList();
String goods = searchGoods.getText();
//创建DBcon对象,连接数据库输入sql查询语句,将数据以结果集形式返回
DBcon dBcon = new DBcon();
ResultSet dbre = dBcon.Db("select 仓库.商品编号,商品名,账号,入库时间,入库数量 from 入库单,仓库 where 入库单.`商品编号`=仓库.`商品编号` and (入库单.商品编号='"+goods+"' or 商品名='"+goods+"')");
//通过循环获取返回的结果集的数据
while (true){
//若下一组结果集没有数据则关闭结果集并跳出循环
if (!dbre.next()){
dbre.close();
break;
}
//从结果集中获取数据
String txtnoIn = dbre.getString("商品编号");
String txtnameIn = dbre.getString("商品名");
String txtadminIn = dbre.getString("账号");
String txtdeatIn = dbre.getString("入库时间");
int txtnumIn = dbre.getInt("入库数量");
//创建值对象
Data data = new Data();
data.InGoodsSearchData(txtnoIn,txtnameIn,txtadminIn,txtdeatIn,txtnumIn);
noIn.setCellValueFactory(new PropertyValueFactory("noIn")); //映射
nameIn.setCellValueFactory(new PropertyValueFactory("nameIn"));
adminIn.setCellValueFactory(new PropertyValueFactory("adminIn"));
dateIn.setCellValueFactory(new PropertyValueFactory("dateIn"));
numIn.setCellValueFactory(new PropertyValueFactory("numIn"));
//添加值对象
list.add(data);
//tableview添加list
Table.setItems(list);
}
}
public void outGoodsSearch( TableView Table, TableColumn noOut, TableColumn nameOut, TableColumn adminOut,TableColumn dateOut,TableColumn numOut) throws SQLException {
ObservableList<Data> list = FXCollections.observableArrayList();
// //获取搜索框中的数据
// String goods = searchGoods.getText();
//创建DBcon对象,连接数据库输入sql查询语句,将数据以结果集形式返回
DBcon dBcon = new DBcon();
ResultSet dbre = dBcon.Db("select 仓库.商品编号,商品名,账号,出库时间,出库数量 from 出库单,仓库 where 出库单.`商品编号`=仓库.`商品编号` ");
//通过循环获取返回的结果集的数据
while (true){
//若下一组结果集没有数据则关闭结果集并跳出循环
if (!dbre.next()){
dbre.close();
break;
}
//从结果集中获取数据
String txtnoOut = dbre.getString("商品编号");
String txtnameOut = dbre.getString("商品名");
String txtadminOut = dbre.getString("账号");
String txtdateOut = dbre.getString("出库时间");
int txtnumOut = dbre.getInt("出库数量");
//创建值对象
Data data = new Data();
data.OutGoodsSearchData(txtnoOut,txtnameOut,txtadminOut,txtdateOut,txtnumOut);
noOut.setCellValueFactory(new PropertyValueFactory("noOut")); //映射
nameOut.setCellValueFactory(new PropertyValueFactory("nameOut"));
adminOut.setCellValueFactory(new PropertyValueFactory("adminOut"));
dateOut.setCellValueFactory(new PropertyValueFactory("dateOut"));
numOut.setCellValueFactory(new PropertyValueFactory("numOut"));
//添加值对象
list.add(data);
//tableview添加list
Table.setItems(list);
}
}
public void outGoodsSearch(TextField searchGoods, TableView Table, TableColumn noOut, TableColumn nameOut, TableColumn adminOut,TableColumn dateOut,TableColumn numOut) throws SQLException {
ObservableList<Data> list = FXCollections.observableArrayList();
//获取搜索框中的数据
String goods = searchGoods.getText();
//创建DBcon对象,连接数据库输入sql查询语句,将数据以结果集形式返回
DBcon dBcon = new DBcon();
ResultSet dbre = dBcon.Db("select 仓库.商品编号,商品名,账号,出库时间,出库数量 from 出库单,仓库 where 出库单.`商品编号`=仓库.`商品编号` and (出库单.商品编号='"+goods+"' or 商品名='"+goods+"')");
//通过循环获取返回的结果集的数据
while (true){
//若下一组结果集没有数据则关闭结果集并跳出循环
if (!dbre.next()){
dbre.close();
break;
}
//从结果集中获取数据
String txtnoOut = dbre.getString("商品编号");
System.out.println(txtnoOut);
String txtnameOut = dbre.getString("商品名");
String txtadminOut = dbre.getString("账号");
String txtdateOut = dbre.getString("出库时间");
int txtnumOut = dbre.getInt("出库数量");
//创建值对象
Data data = new Data();
data.OutGoodsSearchData(txtnoOut,txtnameOut,txtadminOut,txtdateOut,txtnumOut);
noOut.setCellValueFactory(new PropertyValueFactory("noOut")); //映射
nameOut.setCellValueFactory(new PropertyValueFactory("nameOut"));
adminOut.setCellValueFactory(new PropertyValueFactory("adminOut"));
dateOut.setCellValueFactory(new PropertyValueFactory("dateOut"));
numOut.setCellValueFactory(new PropertyValueFactory("numOut"));
//添加值对象
list.add(data);
//tableview添加list
Table.setItems(list);
}
}
}
|
java
|
<reponame>jlolling/talendcomp_tCamundaExtTask
package de.jlo.talendcomp.camunda.externaltask;
import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
public class CamundaClientTest {
private Map<String, Object> globalMap = new HashMap<String, Object>();
@Before
public void init() {
BasicConfigurator.configure();
Logger.getRootLogger().setLevel(Level.DEBUG);
}
@Test
public void testFetchAndLock() throws Exception {
FetchAndLock cc = new FetchAndLock();
globalMap.put("comp1", cc);
cc.setCamundaServiceURL("http://localhost:8080");
cc.setWorkerId("camundaClientTest_" + System.currentTimeMillis());
cc.setNumberTaskToFetch(1);
cc.setMaxRetriesInCaseOfErrors(0);
cc.setTopicName("testTopic");
cc.addVariable("productId");
cc.setLockDuration(5000);
cc.setTimeBetweenFetches(1000);
cc.setWaitMillisAfterError(10000);
cc.setStopTime(60);
while (cc.nextTask()) {
System.out.println(cc.getCurrentTaskId());
System.out.println(cc.getCurrentTaskVariableValueAsObject("productId", false, false));
}
Assert.assertTrue(true);
}
// @Test
// public void testConnect() throws Exception {
// FetchAndLock cc = new FetchAndLock();
// globalMap.put("comp1", cc);
// cc.setCamundaServiceURL("http://camundacdh01.gvl.local:8080");
// cc.setCamundaUser("talend_prod");
// cc.setCamundaPassword("<PASSWORD>");
// cc.setWorkerId("camundaClientTest_" + System.currentTimeMillis());
// cc.setNumberTaskToFetch(1);
// cc.setMaxRetriesInCaseOfErrors(4);
// cc.setTopicName("calculateConflict");
// cc.addVariable("calculateConflict");
// cc.setLockDuration(5000);
// cc.setTimeBetweenFetches(1000);
// cc.setWaitMillisAfterError(10000);
// cc.setStopTime(60);
// while (cc.nextTask()) {
// System.out.println(cc.getCurrentTaskId());
// System.out.println(cc.getCurrentTaskVariableValueAsObject("calculateConflict", false, false));
// }
// Assert.assertTrue(true);
// }
}
|
java
|
import { Breakpoint, Breakpoints, useMatchedBreakpoints } from "./BreakpointProvider";
import { isNil, isObject } from "../../shared";
export type ResponsiveValue<T> = Partial<Record<Breakpoint, T>> & { base?: T };
export type ResponsiveProp<T> = T | ResponsiveValue<T>;
const responsiveKeys = [...Object.keys(Breakpoints), "base"];
export function isResponsiveObject(obj: any) {
if (!isObject(obj)) {
return false;
}
const keys = Object.keys(obj);
return keys.every(key => responsiveKeys.includes(key));
}
// The code have been inspired by https://github.com/adobe/react-spectrum/blob/main/packages/%40react-spectrum/utils/src/styleProps.ts.
// Our breakpoints strategy have been inspired by Tailwind https://tailwindcss.com/docs/responsive-design.
export function parseResponsiveValue<T>(value: T | ResponsiveValue<T>, matchedBreakpoints: Breakpoint[]) {
if (isResponsiveObject(value)) {
for (let i = 0; i < matchedBreakpoints.length; i++) {
const responsiveValue = value[matchedBreakpoints[i]];
if (!isNil(responsiveValue)) {
return responsiveValue as T;
}
}
return value["base"] as T;
}
return value as T;
}
export function useResponsiveValue<T>(value: T | ResponsiveValue<T>) {
const matchedBreakpoints = useMatchedBreakpoints();
return parseResponsiveValue(value, matchedBreakpoints);
}
|
typescript
|
<filename>appengine/chrome_infra_console_loadtest/main.py
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import endpoints
import random
import webapp2
from apiclient import discovery
from google.appengine.ext import ndb
from oauth2client.client import GoogleCredentials
from protorpc import messages
from protorpc import message_types
from protorpc import remote
from components import auth
CONFIG_DATASTORE_KEY = "CONFIG_DATASTORE_KEY"
API_NAME = 'consoleapp'
API_VERSION = 'v1'
DISCOVERY_URL = '%s/_ah/api/discovery/v1/apis/{api}/{apiVersion}/rest'
class FieldParamsModel(ndb.Model):
field_key = ndb.StringProperty()
values = ndb.StringProperty(repeated=True)
class MetricModel(ndb.Model):
name = ndb.StringProperty(default="")
minimum = ndb.FloatProperty(default=0)
maximum = ndb.FloatProperty(default=100)
class ParamsModel(ndb.Model):
time = ndb.FloatProperty(default=10)
freq = ndb.FloatProperty(default=1)
url = ndb.StringProperty()
params = ndb.LocalStructuredProperty(FieldParamsModel, repeated=True)
metrics = ndb.LocalStructuredProperty(MetricModel, repeated=True)
class Field(messages.Message):
key = messages.StringField(1)
value = messages.StringField(2)
class Point(messages.Message):
time = messages.FloatField(1)
value = messages.FloatField(2)
class FieldParams(messages.Message):
field_key = messages.StringField(1)
values = messages.StringField(2, repeated=True)
class Metric(messages.Message):
name = messages.StringField(1)
minimum = messages.FloatField(2)
maximum = messages.FloatField(3)
class Params(messages.Message):
time = messages.FloatField(1)
freq = messages.FloatField(2)
url = messages.StringField(3)
params = messages.MessageField(FieldParams, 4, repeated=True)
metrics = messages.MessageField(Metric, 5, repeated=True)
class TimeSeries(messages.Message):
points = messages.MessageField(Point, 1, repeated=True)
fields = messages.MessageField(Field, 2, repeated=True)
metric = messages.StringField(3)
class DataPacket(messages.Message):
timeseries = messages.MessageField(TimeSeries, 1, repeated=True)
@auth.endpoints_api(name='consoleapp', version='v1')
class LoadTestApi(remote.Service):
"""A testing endpoint that receives timeseries data."""
@auth.endpoints_method(DataPacket, message_types.VoidMessage,
name='timeseries.update')
@auth.require(lambda: auth.is_group_member('metric-generators'))
def timeseries_update(self, request):
logging.debug('Datapacket length is %d', len(request.timeseries))
return message_types.VoidMessage()
@auth.endpoints_api(name='ui', version='v1')
class UIApi(remote.Service):
"""API for the loadtest configuration UI."""
@auth.endpoints_method(message_types.VoidMessage, Params,
name='ui.get')
@auth.require(lambda: auth.is_group_member('metric-generators'))
def UI_get(self, _request):
data = ParamsModel.get_or_insert(CONFIG_DATASTORE_KEY)
params = [FieldParams(field_key=field.field_key, values=field.values)
for field in data.params]
metrics = [Metric(name=metric.name,
minimum=metric.minimum,
maximum=metric.maximum)
for metric in data.metrics]
return Params(time=data.time, freq=data.freq, url=data.url, params=params,
metrics=metrics)
@auth.endpoints_method(Params, message_types.VoidMessage,
name='ui.set')
@auth.require(lambda: auth.is_group_member('metric-generators'))
def UI_set(self, request):
logging.debug('Got %s', request)
data = ParamsModel.get_or_insert(CONFIG_DATASTORE_KEY)
data.time = request.time
data.freq = request.freq
data.url = request.url
data.params = [FieldParamsModel(field_key=field.field_key,
values=field.values)
for field in request.params]
data.metrics = [MetricModel(name=metric.name,
minimum=metric.minimum,
maximum=metric.maximum)
for metric in request.metrics]
data.put()
return message_types.VoidMessage()
def field_generator(dataparams, index, fields):
if index == len(dataparams):
return [fields]
else:
key = dataparams[index].field_key
return sum((field_generator(
dataparams, index+1, fields+[{'key': key, 'value': value}])
for value in dataparams[index].values), [])
class CronHandler(webapp2.RequestHandler):
def get(self):
data = ParamsModel.get_or_insert(CONFIG_DATASTORE_KEY)
metric_ranges = {}
for metric in data.metrics:
metric_ranges[metric.name] = (metric.minimum,metric.maximum)
datapacket = {'timeseries': []}
logging.debug('There are %d metrics', len(metric_ranges))
fieldlist = field_generator(data.params, 0, [])
for metric in metric_ranges:
for fields in fieldlist:
points = []
for x in xrange(0, int(data.time), int(data.freq)):
points.append({'time': x,
'value': random.uniform(*metric_ranges[metric])})
timeseries = {'points': points,
'fields': fields,
'metric': metric}
datapacket['timeseries'].append(timeseries)
logging.info('Send data to %s', data.url)
discovery_url = DISCOVERY_URL % data.url
credentials = GoogleCredentials.get_application_default()
service = discovery.build(API_NAME, API_VERSION,
discoveryServiceUrl=discovery_url,
credentials=credentials)
_response = service.timeseries().update(body=datapacket).execute()
backend_handlers = [
('/cron', CronHandler)
]
WEBAPP = webapp2.WSGIApplication(backend_handlers, debug=True)
APPLICATION = endpoints.api_server([LoadTestApi, UIApi])
|
python
|
<gh_stars>1000+
'use strict';
var $ = require('jquery');
var UI = require('./core');
var Hammer = require('./util.hammer');
var supportTransition = UI.support.transition;
var animation = UI.support.animation;
/**
* @via https://github.com/twbs/bootstrap/blob/master/js/tab.js
* @copyright 2011-2014 Twitter, Inc.
* @license MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/**
* Tabs
* @param {HTMLElement} element
* @param {Object} options
* @constructor
*/
var Tabs = function(element, options) {
this.$element = $(element);
this.options = $.extend({}, Tabs.DEFAULTS, options || {});
this.transitioning = this.activeIndex = null;
this.refresh();
this.init();
};
Tabs.DEFAULTS = {
selector: {
nav: '> .am-tabs-nav',
content: '> .am-tabs-bd',
panel: '> .am-tab-panel'
},
activeClass: 'am-active'
};
Tabs.prototype.refresh = function() {
var selector = this.options.selector;
this.$tabNav = this.$element.find(selector.nav);
this.$navs = this.$tabNav.find('a');
this.$content = this.$element.find(selector.content);
this.$tabPanels = this.$content.find(selector.panel);
var $active = this.$tabNav.find('> .' + this.options.activeClass);
// Activate the first Tab when no active Tab or multiple active Tabs
if ($active.length !== 1) {
this.open(0);
} else {
this.activeIndex = this.$navs.index($active.children('a'));
}
};
Tabs.prototype.init = function() {
var _this = this;
var options = this.options;
this.$element.on('click.tabs.amui', options.selector.nav + ' a', function(e) {
e.preventDefault();
_this.open($(this));
});
// TODO: nested Tabs touch events
if (!options.noSwipe) {
if (!this.$content.length) {
return this;
}
var hammer = new Hammer.Manager(this.$content[0]);
var swipe = new Hammer.Swipe({
direction: Hammer.DIRECTION_HORIZONTAL
// threshold: 40
});
hammer.add(swipe);
hammer.on('swipeleft', UI.utils.debounce(function(e) {
e.preventDefault();
_this.goTo('next');
}, 100));
hammer.on('swiperight', UI.utils.debounce(function(e) {
e.preventDefault();
_this.goTo('prev');
}, 100));
this._hammer = hammer;
}
};
/**
* Open $nav tab
* @param {jQuery|HTMLElement|Number} $nav
* @returns {Tabs}
*/
Tabs.prototype.open = function($nav) {
var activeClass = this.options.activeClass;
var activeIndex = typeof $nav === 'number' ? $nav : this.$navs.index($($nav));
$nav = typeof $nav === 'number' ? this.$navs.eq(activeIndex) : $($nav);
if (!$nav ||
!$nav.length ||
this.transitioning ||
$nav.parent('li').hasClass(activeClass)) {
return;
}
var $tabNav = this.$tabNav;
var href = $nav.attr('href');
var regexHash = /^#.+$/;
var $target = regexHash.test(href) && this.$content.find(href) ||
this.$tabPanels.eq(activeIndex);
var previous = $tabNav.find('.' + activeClass + ' a')[0];
var e = $.Event('open.tabs.amui', {
relatedTarget: previous
});
$nav.trigger(e);
if (e.isDefaultPrevented()) {
return;
}
// activate Tab nav
this.activate($nav.closest('li'), $tabNav);
// activate Tab content
this.activate($target, this.$content, function() {
$nav.trigger({
type: 'opened.tabs.amui',
relatedTarget: previous
});
});
this.activeIndex = activeIndex;
};
Tabs.prototype.activate = function($element, $container, callback) {
this.transitioning = true;
var activeClass = this.options.activeClass;
var $active = $container.find('> .' + activeClass);
var transition = callback && supportTransition && !!$active.length;
$active.removeClass(activeClass + ' am-in');
$element.addClass(activeClass);
if (transition) {
$element.redraw(); // reflow for transition
$element.addClass('am-in');
} else {
$element.removeClass('am-fade');
}
var complete = $.proxy(function complete() {
callback && callback();
this.transitioning = false;
}, this);
transition && !this.$content.is('.am-tabs-bd-ofv') ?
$active.one(supportTransition.end, complete) : complete();
};
/**
* Go to `next` or `prev` tab
* @param {String} direction - `next` or `prev`
*/
Tabs.prototype.goTo = function(direction) {
var navIndex = this.activeIndex;
var isNext = direction === 'next';
var spring = isNext ? 'am-animation-right-spring' :
'am-animation-left-spring';
if ((isNext && navIndex + 1 >= this.$navs.length) || // last one
(!isNext && navIndex === 0)) { // first one
var $panel = this.$tabPanels.eq(navIndex);
animation && $panel.addClass(spring).on(animation.end, function() {
$panel.removeClass(spring);
});
} else {
this.open(isNext ? navIndex + 1 : navIndex - 1);
}
};
Tabs.prototype.destroy = function() {
this.$element.off('.tabs.amui');
Hammer.off(this.$content[0], 'swipeleft swiperight');
this._hammer && this._hammer.destroy();
$.removeData(this.$element, 'amui.tabs');
};
// Plugin
function Plugin(option) {
var args = Array.prototype.slice.call(arguments, 1);
var methodReturn;
this.each(function() {
var $this = $(this);
var $tabs = $this.is('.am-tabs') && $this || $this.closest('.am-tabs');
var data = $tabs.data('amui.tabs');
var options = $.extend({}, UI.utils.parseOptions($this.data('amTabs')),
$.isPlainObject(option) && option);
if (!data) {
$tabs.data('amui.tabs', (data = new Tabs($tabs[0], options)));
}
if (typeof option === 'string') {
if (option === 'open' && $this.is('.am-tabs-nav a')) {
data.open($this);
} else {
methodReturn = typeof data[option] === 'function' ?
data[option].apply(data, args) : data[option];
}
}
});
return methodReturn === undefined ? this : methodReturn;
}
$.fn.tabs = Plugin;
// Init code
UI.ready(function(context) {
$('[data-am-tabs]', context).tabs();
});
$(document).on('click.tabs.amui.data-api', '[data-am-tabs] .am-tabs-nav a',
function(e) {
e.preventDefault();
Plugin.call($(this), 'open');
});
module.exports = UI.tabs = Tabs;
// TODO: 1. Ajax 支持
// 2. touch 事件处理逻辑优化
|
javascript
|
{"Id":"145475","ProductId":"B003D4F1QS","UserId":"AXBC52UXVOIO0","ProfileName":"<NAME>","HelpfulnessNumerator":1,"HelpfulnessDenominator":1,"Score":5,"date":"2011-09-21","Summary":"Love Stash decaf chai","text":"I love stash decaf chai it is very good. I love the taste for being decaf. Stash has a great selection for their decaf teas. I can not do caffeine much so it is really nice to find tea that tastes good and is decaf. It is a nice chai taste not too strong. Great with honey and a bit of milk or half and half."}
|
json
|
Bhubaneswar: The virtual interaction between Union Education Minister Ramesh Pokhriyal Nishank and teachers over the upcoming CBSE Class 10, 12 board exams date, which was scheduled to be held today, has been rescheduled for some unknown reasons.
Minister Pokhriyal took to his Twitter handle to announce the same. "Teachers, I am looking forward to having an insightful interaction with you all on Dec 22 at 4 PM. Please share your queries/suggestions with me using #EducationMinisterGoesLive," he tweeted.
Teachers, I am looking forward to having an insightful interaction with you all on Dec 22 at 4 PM.
Speculations were rife that the Education Minister would make some important decision regarding CBSE board exam dates during his interaction with the teachers.
On the other hand, Pokhriyal on Wednesday released the schedule of the Joint Entrance Examination (JEE) Main 2021. The entrance exam will be conducted in multiple sessions for the next academic session in February, March, April and May 2021.
The first session of JEE Main 2021 will be conducted by NTA between February 23 and February 26, in multiple shifts.
It is said that exams in multiple sessions will give multiple opportunities to candidates to improve their scores in the entrance exam if they fail to give their best in the first attempt without wasting their whole academic year.
|
english
|
BookshelvesAll (927)
sometimes, you find a book — or rather, it finds you — at the perfect time. it wraps you up in its delicate pages, lets the words wash over you. it re sometimes, you find a book — or rather, it finds you — at the perfect time. it wraps you up in its delicate pages, lets the words wash over you. it reassures you, telling you everything you need to hear in that moment. that’s the connection i felt with this book.
i am incredibly picky when it comes to contemporary romance. there’s always something that i find fault with: an overly jealous or possessive mmc, a doormat fmc, a third act breakup, insta love, etc. i haven’t found a rom com that i’ve loved in almost every aspect. until now.
annie: an introverted, socially anxious girlie who prefers books to people? she is me i am her. i can’t tell you how refreshing it was to see someone so much like myself be told that she doesn’t need to change in order for someone to like her. that is she is worthy of love just the way she is.
it’s like sarah adams crawled into my mind and wrote this character based off of my life and my experiences bc wow do i relate. it is beyond frustrating when everyone thinks they know you, when they try to tell you who you are. as if they know better.
will: i need him biblically. i need him in a way that is concerning to feminism. i can’t express how much i love this man. he encouraged annie to be herself even when she thought her authenticity was the problem he recreated her pirate fantasies 😭💖 he took care of her when she was sick ❤️🩹 he bought a house and a truck and moved to rome for her after he said the town was too boring for him (clearly not 😏) and he decided to confront his emotional baggage after ignoring it for so long bc she! was! worth! it! to! him!
i just want what they have.
Notes are private!
i consider myself a pragmatist. in almost every aspect of my life, i tend to do what is most practical. but when it comes to love, i’ve found that i’m an idealist. i want to believe in a fairytale kind of love, like evangeline, even though i know it’s not the most sensible thing. but it’s why i fell in love with this book. the ballad of never after doesn’t concern itself with the practical; if anything, it favors idealism, asking you “what could be” if you dream big enough — if you just believe.
with danger lurking at her heels, evangeline chases the happy ending she still longs for, realizing soon enough that it may not be exactly how — or with whom — she imagined it to be. but despite this, and despite every threat and every attempt on her life, she continues to pursue what she desires. she possesses an unparalleled amount of hope, a sense of determination that keeps her from giving up, and it is this quality that makes her especially compelling.
it’s hard to know what jacks was thinking throughout this book and why he made the choices he made. his actions near the end show us how deeply he cares for evangeline, but he refuses to be that transparent with her. and instead of fighting for evangeline, instead of taking a chance on what could be a happy ending, he chooses to settle for someone he doesn’t love. perhaps it’s because he’s lost all that he’s ever loved and the thought of losing evangeline too — because he was selfish enough to let himself want her — is too great to bear.
evajacks will always be so special to me. i don’t know how their story ends, but i want to believe that they choose each other. against all odds. and beyond that, it’s such a beautiful thing to see little fragments of yourself in the characters you love. because, surely, if they deserved to be loved, then so do you.
um so if you don’t hear from me for the next three months it’s bc i am recovering from this ending.
Notes are private!
a little love letter to this book, to these characters, who have become everything to me:
evangeline fox: oh how i adore her. she may be naive. she may make questionable decisions. she may trust people after they’ve given her every reason not to. but she is a dreamer, a lover, a believer. she wants to see the best in people, and for that i will always admire her.
jacks, prince of hearts: it’s often mentioned (even by evangeline) that he doesn’t have a heart. and thought it’s true that he’s cruel and manipulative and self serving, the softer, gentler moments tucked away into the pages of this book prove that there’s more to him than that.
oh my god?? 😭😭 rtc (actually this is a lie idk how to write a review for this book)
Notes are private!
**spoiler alert** wow this was a wild ride. i don’t even know where to start.
i loved everything about this book: lo coming back from rehab and reunit **spoiler alert** wow this was a wild ride. i don’t even know where to start.
i loved everything about this book: lo coming back from rehab and reuniting with lily; his decision to stop enabling her and instead help her with her recovery, even if that meant showing her tough love; lily’s relationships with daisy and rose growing stronger; rose’s trust in connor remaining steadfast when sebastian tried to convince her otherwise; ryke willing to accompany his brother to see jonathan hale just so that lo wouldn’t be the target of their father’s hurtful, verbally abusive comments; lo comforting and consoling ryke when he found out his mother was behind the leak; and so much more.
Notes are private!
first reread:
tactfully, but with so much emotion and intensity that it’s bound to stay with yo first reread:
tactfully, but with so much emotion and intensity that it’s bound to stay with you for a while. i am in awe at the way she manages to weave all of these themes together so seamlessly and at her ability to write such wonderful characters.
bree is an incredible lead. she is brave and headstrong and persistent. and though she may be stubborn and determined to a fault, her self awareness and ability to reflect on situations allow for a compelling, complex character who is fascinating to read about.
original review:
team sel forever & always. i have not stopped thinking about this man since i finished reading. and the bonus chapter that was in his point of view?? show-stopping. groundbreaking. truly spectacular.
this book was nothing short of a masterpiece. the premise was unique and unlike any fantasy novel i’ve ever read or heard about, and the execution was brilliant. the action, the romance, the side characters?? william??? my absolute favorite.
and bree. one of the best mc’s i’ve read about in a while. she is bold and determined despite her fear of the unknown while also being protective of and loyal to the people she loves. her defiance and stubbornness in such a harsh, unforgiving world ruled strictly by law cemented her as one of my favorite book characters of all time.
Notes are private!
first read:
Notes are private!
thinking about this series as i read the last book and i have to say this one is my favorite. i loved the murder mystery aspect of it and th 4.5 stars!
thinking about this series as i read the last book and i have to say this one is my favorite. i loved the murder mystery aspect of it and the suspense and the witty banter and the reluctant alliance and the tension. might make this an annual october reread.
this was SO much fun. i’ve had the most exhausting week, with two exams and a lot of stress, but i still managed to finish this book in a week, which is pretty unusual for me. every time i picked it up, i did not want to put it down. it was such an easy read and a great pick for fall & october.
the banter between wrath and emilia is top tier. i can easily see myself reading this again just for their quips and retorts. throughout the almost 400 page book, i was not bored even once. there was a lot of information thrown at us several times, particularly through conversation between two characters, but i didn’t mind it much.
Notes are private!
second read (nov 2023):
oh my god i loved this 10x more the second time around 😭 judecardan you will always be famous!
rereading this masterpiece bc i second read (nov 2023):
oh my god i loved this 10x more the second time around 😭 judecardan you will always be famous!
first read (july 2022):
jude’s character development is worthy of an infinite amount of stars. her defiance, cleverness, and strategic thinking coupled with her ruthlessness and lack of morality make for a compelling antihero, a deadly combination of smarts and tactical skills. “if i cannot be better than them, i will become so much worse.” jude!!! duarte!!!
and the tension between her and cardan?? “i hate you because i think of you. often.” i had to reread that scene like three times.
Notes are private!
Notes are private!
|
english
|
import { InjectionToken, Provider } from '@angular/core';
import { BUCKET, SCHEMA, SOURCE } from '../tokens';
import { BackupSource, createBackupSource } from './backup';
import { RemoteSource, createRemoteSource } from './remote';
export const BACKUP_SOURCE = new InjectionToken<BackupSource>('BackupSource');
export const REMOTE_SOURCE = new InjectionToken<RemoteSource>('RemoteSource');
export const DATA_SOURCE_PROVIDERS: Provider[] = [
{ provide: BACKUP_SOURCE, useFactory: createBackupSource, deps: [ BUCKET, SCHEMA ] },
{ provide: REMOTE_SOURCE, useFactory: createRemoteSource, deps: [ BUCKET, SCHEMA ] },
{ provide: SOURCE, useExisting: BACKUP_SOURCE, multi: true },
{ provide: SOURCE, useExisting: REMOTE_SOURCE, multi: true },
];
|
typescript
|
New Delhi: The Supreme Court has stayed the deportation of a woman from Assam, who had been excluded from the final draft of the state’s National Register of Citizens (NRC), Bar and Bench reported.
In 2019, the Gauhati High Court had upheld a 2017 verdict by a Foreigners Tribunal that the woman was not a citizen of India.
Both courts held that she had entered Assam illegally from Bangladesh after March 25, 1971 – the cut-off date in the northeastern state to prove citizenship.
A bench of Justices DY Chandrachud and Hima Kohli on Friday were hearing a plea filed by the woman challenging the High Court order.
Advocate Pijush Kanti Roy, appearing for the woman submitted before the court that all her family members had been declared Indian citizens. However, the Foreigners Tribunal held that she had entered the country illegally and directed the authorities to take action, Live Law reported.
The top court took this argument into consideration to put a stay on the woman’s deportation till the next hearing of the plea after three years and asked the Centre and Assam government to file their responses to the petition.
In her plea, the woman has claimed that she is an Indian citizen by birth. The woman also said that she has submitted documents to prove that the name of her parents existed in voter lists and certificates issued by the local panchayat before 1971.
The final NRC in Assam was published in August 2019 with an aim to distinguish Indian citizens from undocumented immigrants living in the state.
Over 19 lakh persons in Assam were excluded from the final list of the NRC.
|
english
|
<filename>resources/js/RootPanel/components/structure/table/EnhancedTable.js
import React, {Component} from "react";
import {withRouter} from "react-router-dom";
import {withStyles} from "@material-ui/core/styles";
import Table from "@material-ui/core/Table";
import TableBody from "@material-ui/core/TableBody";
import TableCell from "@material-ui/core/TableCell";
import TableContainer from "@material-ui/core/TableContainer";
import TablePagination from "@material-ui/core/TablePagination";
import TableRow from "@material-ui/core/TableRow";
import Paper from "@material-ui/core/Paper";
import EnhancedTableToolbar from "./EnhancedTableToolbar";
import IconButton from "@material-ui/core/IconButton";
import EditIcon from "@material-ui/icons/Edit";
import CheckIcon from "@material-ui/icons/Check";
import DeleteIcon from "@material-ui/icons/Delete";
import Tooltip from "@material-ui/core/Tooltip";
import TableHead from "@material-ui/core/TableHead";
import {store} from "../../../store/configureStore";
import {setError, setIsShowPreloader, setMessage} from "../../../store/rootActions";
import Button from "@material-ui/core/Button";
import ButtonGroup from "@material-ui/core/ButtonGroup";
import {connect} from "react-redux";
import DataTableCell from "./DataTableCell";
import TablePaginationActions from "./TablePaginationActions";
import PropTypes from "prop-types";
const styles = theme => ({
root: {
width: "100%",
},
paper: {
width: "100%",
marginBottom: theme.spacing(2),
},
table: {
minWidth: 750,
},
visuallyHidden: {
border: 0,
clip: "rect(0 0 0 0)",
height: 1,
margin: -1,
overflow: "hidden",
padding: 0,
position: "absolute",
top: 20,
width: 1,
},
});
const propTypes = {
multiLanguage: PropTypes.bool,
isCreate: PropTypes.bool,
isEdit: PropTypes.bool,
isDestroy: PropTypes.bool,
isApply: PropTypes.bool,
textApply: PropTypes.string,
basePath: PropTypes.string,
entity: PropTypes.string,
textTitle: PropTypes.string,
headCells: PropTypes.array,
filtersCells: PropTypes.array,
filter: PropTypes.object,
setFilter: PropTypes.func,
currentPage: PropTypes.number,
setCurrentPage: PropTypes.func,
echoRows: {
propertySearch: PropTypes.string,
row: PropTypes.object,
event: PropTypes.string,
},
setEchoRows: PropTypes.func,
};
const defaultProps = {
multiLanguage: false,
isCreate: false,
isEdit: false,
isDestroy: false,
isApply: false,
textApply: "",
filtersCells: false,
filter: false,
echoRows: {},
setEchoRows: () => {},
};
class EnhancedTable extends Component {
constructor() {
super();
store.dispatch(setIsShowPreloader(true));
this.state = {
page: 0,
rowsPerPage: 10,
search: "",
rows: [],
rowsLength: 0,
};
}
componentDidMount() {
this.setState({page: this.props.currentPage});
this.getData(this.props.currentPage, this.state.rowsPerPage, this.state.search, this.props.filter);
}
componentDidUpdate(prevProps, prevState, snapshot) {
if (this.props.echoRows && prevProps.echoRows !== this.props.echoRows) {
let newRows = this.state.rows;
let newCountRows = this.state.rowsLength;
let indexRow;
switch (this.props.echoRows.event) {
case "add":
if (this.state.page === 0) {
newRows.unshift(this.props.echoRows.row);
if (newRows.length > this.state.rowsPerPage) {
newRows.pop();
}
}
newCountRows++;
break;
case "delete":
indexRow = newRows.findIndex(
item =>
item[this.props.echoRows.propertySearch] ===
this.props.echoRows.row[this.props.echoRows.propertySearch]
);
if (indexRow >= 0) {
newRows.splice(indexRow, 1);
}
newCountRows = newCountRows > 0 ? --newCountRows : newCountRows;
break;
case "update":
indexRow = newRows.findIndex(
item =>
item[this.props.echoRows.propertySearch] ===
this.props.echoRows.row[this.props.echoRows.propertySearch]
);
if (indexRow >= 0) {
newRows[indexRow] = this.props.echoRows.row;
}
break;
}
this.setState({
rows: newRows,
rowsLength: newCountRows,
});
this.props.setEchoRows(null);
}
}
getData = (page, perPage, search, filter) => {
store.dispatch(setIsShowPreloader(true));
let data = {
page: page,
perPage: perPage,
search: search,
filter: filter,
};
postRequest("getAll-" + this.props.entity, data)
.then(res => {
this.setState({
rows: res.array,
rowsLength: res.total,
});
store.dispatch(setIsShowPreloader(false));
})
.catch(err => {
store.dispatch(setError(err));
store.dispatch(setIsShowPreloader(false));
});
};
handleRequestSort = (event, property) => {
let isAsc = this.state.orderBy === property && this.state.order === "asc";
this.setState({
order: isAsc ? "desc" : "asc",
orderBy: property,
});
};
handleChangePage = (event, newPage) => {
newPage -= 1;
this.setState({page: newPage});
this.getData(newPage, this.state.rowsPerPage, this.state.search, this.props.filter);
};
handleChangeRowsPerPage = event => {
let page = 0;
let perPage = parseInt(event.target.value, 10);
this.setState({
page: page,
rowsPerPage: perPage,
});
this.getData(page, perPage, this.state.search, this.props.filter);
};
onChangeFieldSearch = textSearch => {
this.setState({search: textSearch});
};
onSearch = textSearch => {
this.setState({page: 0, search: textSearch});
this.getData(0, this.state.rowsPerPage, textSearch, this.props.filter);
};
onChangeFilters = filter => {
this.setState({page: 0});
this.getData(0, this.state.rowsPerPage, this.state.search, filter);
};
onChangeLanguage = (e, rowId, langId) => {
e.preventDefault();
store.dispatch(setIsShowPreloader(true));
let data = {
rowId: rowId,
langId: langId,
};
postRequest("changeLanguage-" + this.props.entity, data)
.then(res => {
let arrayNews = this.state.rows;
for (let index = 0; index < this.state.rows.length; index++) {
if (this.state.rows[index].id === rowId) {
arrayNews[index] = res[this.props.entity];
break;
}
}
this.setState({rows: arrayNews});
store.dispatch(setIsShowPreloader(false));
})
.catch(err => {
store.dispatch(setError(err));
store.dispatch(setIsShowPreloader(false));
});
};
applyRow = (e, rowId) => {
e.preventDefault();
let isApply = confirm('Вы уверены, что хотите "' + this.props.textApply + '"?');
if (!isApply) {
return;
}
store.dispatch(setIsShowPreloader(true));
let data = {
rowId: rowId,
};
postRequest("apply-" + this.props.entity, data)
.then(res => {
if (res.success) {
this.getData(this.state.page, this.state.rowsPerPage, this.state.search, this.props.filter);
store.dispatch(setMessage("Действие успешно выполнено."));
} else {
if (res.error) {
store.dispatch(setError(res.error));
store.dispatch(setIsShowPreloader(false));
}
}
})
.catch(err => {
store.dispatch(setError(err));
store.dispatch(setIsShowPreloader(false));
});
};
deleteRow = (e, rowId) => {
e.preventDefault();
let isDel = confirm("Вы уверены, что хотите удалить запись?");
if (!isDel) {
return;
}
store.dispatch(setIsShowPreloader(true));
let data = {
rowId: rowId,
};
postRequest("destroy-" + this.props.entity, data)
.then(res => {
if (res.success) {
this.getData(this.state.page, this.state.rowsPerPage, this.state.search, this.props.filter);
store.dispatch(setMessage("Строка удалена"));
} else {
if (res.error) {
if (Number(res.error) === 1) {
store.dispatch(setError("У пользователя не хватает баланса"));
store.dispatch(setIsShowPreloader(false));
} else if (Number(res.error) === 2) {
store.dispatch(setError("Нарушение целостности данных."));
}
}
store.dispatch(setIsShowPreloader(false));
}
})
.catch(err => {
store.dispatch(setError(err));
store.dispatch(setIsShowPreloader(false));
});
};
editRow = (e, rowId) => {
this.props.setCurrentPage(this.state.page);
this.props.history.push(this.props.basePath + "/edit-" + this.props.entity + rowId);
};
render() {
const {
classes,
textTitle,
headCells,
basePath,
entity,
language,
isApply,
textApply,
multiLanguage,
isCreate,
isEdit,
isDestroy,
filtersCells,
filter,
setFilter,
} = this.props;
const {page, rowsPerPage, rows, rowsLength, search} = this.state;
return (
<div className={classes.root}>
<Paper className={classes.paper}>
<EnhancedTableToolbar
isCreate={isCreate}
basePath={basePath}
entity={entity}
textTitle={textTitle}
textSearch={this.state.search}
filtersCells={filtersCells}
filter={filter}
setFilter={filter => setFilter(filter)}
getData={() => this.getData(page, rowsPerPage, search, filter)}
onChangeFieldSearch={textSearch => this.onChangeFieldSearch(textSearch)}
onSearch={textSearch => this.onSearch(textSearch)}
onChangeFilters={filter => this.onChangeFilters(filter)}
/>
<TableContainer>
<Table
className={classes.table}
aria-labelledby="tableTitle"
size="small"
aria-label="enhanced table">
<TableHead>
<TableRow>
{headCells.map(headCell => (
<TableCell
key={"headCell" + headCell.id}
align={
headCell.type === "numeric" ||
headCell.type === "date" ||
headCell.type === "date_roadmap"
? "right"
: headCell.type === "image" || headCell.type === "boolean"
? "center"
: "left"
}
variant="head">
{headCell.label}
</TableCell>
))}
{(multiLanguage || isEdit || isDestroy || isApply) && (
<TableCell key={"headCell" + "actions"} align="center" />
)}
</TableRow>
</TableHead>
<TableBody>
{rows.map(row => {
return (
<TableRow hover key={"row" + row.id}>
{headCells.map(headCell => (
<DataTableCell
key={headCell.id + row.id}
row={row}
headCell={headCell}
/>
))}
{(multiLanguage || isEdit || isDestroy || isApply) && (
<TableCell align="center" padding="none">
{multiLanguage && (
<div>
<ButtonGroup>
{language.map(lang => (
<Button
variant="contained"
key={"lang" + lang.id}
onClick={e =>
this.onChangeLanguage(e, row.id, lang.id)
}>
{lang.id.toUpperCase()}
</Button>
))}
</ButtonGroup>
<br />
</div>
)}
{isEdit && (
<Tooltip title="Редактировать">
<IconButton
aria-label="Редактировать"
onClick={e => this.editRow(e, row.id)}>
<EditIcon />
</IconButton>
</Tooltip>
)}
{isApply && (
<Tooltip title={textApply}>
<IconButton
aria-label={textApply}
onClick={e => this.applyRow(e, row.id)}>
<CheckIcon />
</IconButton>
</Tooltip>
)}
{isDestroy && (
<Tooltip title="Удалить">
<IconButton
aria-label="Удалить"
onClick={e => this.deleteRow(e, row.id)}>
<DeleteIcon />
</IconButton>
</Tooltip>
)}
</TableCell>
)}
</TableRow>
);
})}
</TableBody>
</Table>
</TableContainer>
<TablePagination
rowsPerPageOptions={[5, 10, 25]}
component="div"
count={rowsLength}
rowsPerPage={rowsPerPage}
page={page}
onChangePage={this.handleChangePage}
onChangeRowsPerPage={this.handleChangeRowsPerPage}
ActionsComponent={TablePaginationActions}
/>
</Paper>
</div>
);
}
}
EnhancedTable.propTypes = propTypes;
EnhancedTable.defaultProps = defaultProps;
const mapStateToProps = store => {
return {
language: store.root.language,
};
};
export default connect(mapStateToProps)(withStyles(styles)(withRouter(EnhancedTable)));
|
javascript
|
<filename>stackgl_modules/package.json
{
"browserify": {
"transform": [
"glslify"
]
},
"scripts": {
"bundle-stackgl": "../node_modules/browserify/bin/cmd.js main.js --standalone stackgl | ../node_modules/derequire/bin/cmd.js --from require --to _glvis_ > index.js",
"postshrinkwrap": "chttps ."
},
"dependencies": {
"@plotly/point-cluster": "^3.1.9",
"alpha-shape": "^1.0.0",
"box-intersect": "plotly/box-intersect#v1.1.0",
"convex-hull": "^1.0.3",
"delaunay-triangulate": "^1.1.6",
"gl-cone3d": "^1.5.2",
"gl-error3d": "^1.0.16",
"gl-heatmap2d": "^1.1.1",
"gl-line3d": "1.2.1",
"gl-mesh3d": "^2.3.1",
"gl-plot2d": "^1.4.5",
"gl-plot3d": "^2.4.7",
"gl-pointcloud2d": "^1.0.3",
"gl-scatter3d": "^1.2.3",
"gl-select-box": "^1.0.4",
"gl-shader": "4.3.1",
"gl-spikes2d": "^1.0.2",
"gl-streamtube3d": "^1.4.1",
"gl-surface3d": "^1.6.0",
"glslify": "^7.1.1",
"incremental-convex-hull": "plotly/incremental-convex-hull#v1.1.0",
"matrix-camera-controller": "^2.1.4",
"ndarray": "plotly/ndarray#v1.1.0",
"ndarray-extract-contour": "plotly/ndarray-extract-contour#v1.1.0",
"ndarray-gradient": "plotly/ndarray-gradient#v1.1.0",
"ndarray-linear-interpolate": "^1.0.0",
"ndarray-ops": "plotly/ndarray-ops#v1.3.0",
"ndarray-pack": "plotly/ndarray-pack#v1.3.0",
"ndarray-sort": "plotly/ndarray-sort#v1.1.0",
"right-now": "^1.0.0",
"robust-determinant": "plotly/robust-determinant#v1.2.2",
"robust-in-sphere": "1.2.1",
"robust-linear-solve": "plotly/robust-linear-solve#v1.1.2",
"robust-orientation": "1.2.1",
"simplicial-complex-contour": "plotly/simplicial-complex-contour#v1.1.0",
"surface-nets": "plotly/surface-nets#v1.1.1",
"vectorize-text": "3.2.2",
"zero-crossings": "plotly/zero-crossings#v1.1.0"
},
"devDependencies": {
"chttps": "^1.0.6"
}
}
|
json
|
- Integration of SWM with other activities viz. sewerage, water supply, health care, engineering departments, etc.
- Emphasis was laid on Complaint redressal system, Grievance redressal system, Litter prevention system, Slum Upgradation & Rehabilitation, Field work, Daily meeting in this regard, etc.
- Financial commitment: Equipment, Vehicles, communication.
- Involving citizens: Positive involvement, penalizing truant, creating public awareness.
- Quantity of M.S.W. generation : 750.00 M.T. Per Day.
- Collection and transportation : 730.00 M.T. per day (Yearly average)
- System of collection and transportation:
- Sweeping during day and night time.
- Container lifting.
- Door to Door Garbage collection vehicles with GPS System.
Waste transportation is being carried out with the help of dumper trucks, container lifting vehicles, refuse compactors and transportation vehicles. The collected waste is transported from the storage receptacles to the landfill site in dumper placer and closed dumper trucks. A dumper truck is fully covered with plastic/tarpaulin sheets during transportation. In view of the present city population and area, the total number of containers required for collecting city waste should be around 650. Since VMC has commenced door-to-door waste collection, the collected waste is being transported directly to the compost plant/disposal site. The existing 261 containers are/would be sufficient for city waste storage.
Vadodara Municipal Corporation has also developed its second processing plant adjoining to the landfill cell phase I site of 300 MT/day (expandable up to 700 TPD) capacity based on Integrated Processing Technology with the intention to minimize waste load on the landfill site and to increase the life span of the landfill site thereby. The work is allotted to M/s. Hanjer Biotech Energies Pvt. Ltd. on PPP basis. The Integrated Processing facility is consisting of composting of biodegradable matter, pelletization, recovery of recyclables such as metals, rubber, plastics etc, RDF and manufacturing of sand and eco bricks. Only 20% of the total incoming waste is going for the landfilling by this technology. The processing plant is operationalized from February-2010. The tenure of the agreement is of 10 years which will expire in 2018. The capacity of plant is now expanded to 500 TPD.
1) The first waste processing facility (compost plant) is located at Atladara STP premises running on BOOT basis. The capacity of this plant for treating un-segregated solid waste is 250 TPD. The biodegradable waste is segregated and composted in the plant and the reject is transported to the secured sanitary landfill site. Solid waste is processed by Mechanical Aerobic Windrow composting method. Compost/Manure is manufactured from this processed solid waste. At present with reference to the change in characteristics of waste and with intention to minimize processing reject waste to the secured sanitary landfill, revamping and upgrading the treatment process by implementing advanced technology and adopting profit sharing model is carried out which will result in the production of combination of easily marketable by products including green energy besides compost, resulting in enhancing the viability of the project and consequently its sustainability on long term basis. The tenure of the agreement is of 20 years which will expire in 2024.
2) Construction of Elevated Transfer Station for Centralized collection of Municipal Solid Waste under JnNURM Scheme is under progress.
- The first waste processing facility of Atladara is under upgradation on Waste to Energy Concept.
- The second processing plant adjoining to the landfill cell phase I site of 300 MT/day (expandable up to 700 TPD) capacity based on Integrated Processing Technology with the intention to minimize waste load on the landfill site and to increase the life span of the landfill site thereby.
4) Sanitary land fill cell: - The Sanitary Land Fill cell (SLF) of capacity 4 Lakh Metric Tonns is in use and expected life of the same is 5 to 7 years adjacent to the processing facility near Jambuva.
As per the Municipal Solid Waste (Management and Handling) Rules 2000, notified by the Ministry of Environment and Forests, Government of India, Vadodara Municipal Corporation has introduced Door-to-Door Garbage collection system from March-2006. The garbage from residential and commercial area is directly collected from the door-step by specially designed closed body vehicles. All four zones of the city are covered by Door-to-Door Garbage collection system. More than 50% of the total waste of the city is collected by this system. The Door to Door Garbage Collection system vehicles are equipped with GPS monitoring system from November, 2010.
|1 (Elevated Transfer Station concept is approved from the standing committee of VMSS and is under execution stage)
|All the primary collecting vehicles from Door to Door Garbage collection and sweeping activity will reach to transfer station from where secondary transportation vehicles are loaded for the purpose of transferring it to disposal site.
- Primary collecting vehicles sent to the Elevated Platform through Ramp.
- Chutes are provided at Elevated Platform to receive the MSW from where it will be unloaded by primary collection vehicles.
- Secondary transport vehicle is kept underneath the chutes.
- MSW unloaded from primary collection vehicles will be transferred into the closed container provided with compactor system.
- The chute portion of transfer station is covered on the top with FRP sheet and whole structure is kept closed with concrete louvered blocks.
- Transportation of container will be carried out on Hook lifting vehicles.
- MSW received through closed vehicles will be dropped to closed containers without secondary handling.
- Covered leak proof container prevents spillage of garbage on the road.
- No foul odour, as transfer station is semi-closed and transport containers are fully closed.
- No MSW storage, permanently or temporary, at transfer station as it will be directly transferred to containers without secondary handling, therefore no flies nuisance & animals entry is restricted.
- Separate leachate collecting system is provided in the planning.
The Indian Medical Association (IMA) is dealing with bio-medical waste in Vadodara. Approximately, two per cent of the total waste generated is biomedical waste which is handled by an incinerator, auto calving and waste shredding facility. About 800 hospitals and private clinics have been registered under this facility. The Gujarat Pollution Control Board monitors the disposal of the biomedical waste.
|
english
|
<gh_stars>1-10
{"201202": {"c": "MFIN 598", "n": "Managerial Skills Workshop 2", "f": "SOM", "cr": 1.5, "ac": 16, "ca": 16, "pr": [], "co": [], "i": [{"tn": "<NAME>", "ta": 16, "tc": 16}], "ce": 0, "p": 173}, "catList": ["Managerial Skills workshop is a series of seminars and hands-on activities designed to develop various team and professional skills of MiF students to support them as they embark on their careers."]}
|
json
|
import { storiesOf } from '@storybook/react'
import { withKnobs } from '@storybook/addon-knobs'
import { SyntaxHighlight } from '../syntax-highlight'
import { Header } from '../header'
import { PeerTabs } from '../peer-tabs'
import styled from 'styled-components'
const stories = storiesOf('Pages', module)
stories.addParameters({ info: { inline: true } }).addDecorator(withKnobs)
const TabContainer = styled.div``
stories.add('default', () => {
const files = [
{
id: '1',
name: 'a1-main.py',
content: `def myfunc():
result = ["str", True, 1, []]
return result
`
},
{
id: '2',
name: 'a1.code.py',
content: `def myfunc():
result = ["str", True, 1, []]
return result
`
}
]
const annotations = {
1: 'Use better variable name',
3: 'Magic number'
}
const peer1 = (
<TabContainer>
<SyntaxHighlight editable annotations={annotations} files={files} />
</TabContainer>
)
return (
<>
<Header title={'CSCA20'} userName={'Kenny'} />
<PeerTabs contents={[peer1, 'Peer 2', 'Peer 3']} />
</>
)
})
|
typescript
|
Statement laid on the Table of the House-vide answer to clause (c) of L. A. Q. No. 2838-Y given notice of by Sarvasri Annadatha Madhava Rao, T. S. Murthy, C. Janga Reddy, D- Venkatesam & V. Rama Rao, M. L. As.
In a combined judgment in W. P. Nos. 809 & 828 of 1967 along with some other W. Ps., the High Court allowed the W. Ps. quashing the orders of reversion of the writ petitioners and directed the Government to consider the inclusion of the names of writ petitioners in the list of U. D. Cs. qualified for promotion as Denutv Tahsildars. In pursuance of the above judgment, the Writ petitioners have been accommodated as Deputy Tahsildars and their periods of waiting (for the months of July and August) have been treated as duty. In so far as the direction relating to inclusion in the list of Deputy Tahsildars is concerned, the Government have, in view of the farreaching implications of the judgment, filed a Writ appeal together with a petition for condonation of delay and the Court has also been moved to grant stay of the fudgment for inclusion of the names of Writ petitioners in Derutv Tahsildars list pending disposal of the Writ apneal. The petition for condonation of delav has been rejected by the Court. The question as to the next course of action to be taken in the matter is under consideration of the Government.
In a common judgment dated 28-9-1970 in W. P. No. 3125/68 along with two other W. Ps., the High Court directed that :(1) The Government of India should prepare a common gradation list in accordance with the principles laid down by them;
(2) While giving promotions to the nosts of Chief Engineers, the petitioners in W. Ps. 3125 and 4872 of 1968 should be considered as seniors to the respondents and appointments made on the basis of merit ;
(3) The petitioners in W. P. No. 4782 of 1968 are not entitled to be considered for promotion to the post of Chief Engineers earlier than respondents 2 & 3 in that petition;
(4) While making promotions to the posts of Executive Engineers, the petitioners in W. P. No. 4664 of 1968 should be considered as seniors to the respondents there in and appointments made on the basis of merit;
(5) All promotions, reversions and confirmations should be revised in accordance with the final Common Gradation list prepared as directed in item (1) above; and
(6) The costs of petitioners should be borne by the Government.
In regard to the direction at item No. (1) above, draft Common Gradation list was prepared and sent to Government of India for
యలు ఖర్చు పెట్టడము భావ్యముగా వుందా ? అదే ప్రజల అభివృద్ధికి ఖర్చు పెట్టినట్లయితే ప్రభుత్వము సరైన పని చేసినట్లు అవుతుంది గదా.
శ్రీ కె. వెంగళరావు :- ఇంత కాలము పోలీసు మీద ఖర్చు పెట్టకుండా ప్రజల అభివృద్ధి మీదే ఖర్చు పెట్టాము. కాని మెడకాయలు కోస్తున్నప్పుడు దానిని ఆదు కోచానికి యిప్పుడు ఖర్చు పెట్టక తప్పదు.
శ్రీ వావిలాల గోపాలకృష్ణయ్య :- ఈ కోటి రూపాయలతో లా అండ్ ఆర్డర్ మేంటేన్ చేయడానికి ఎంత ? మరి అక్కనివారి అభివృద్ధి కొరకు ఎంత
అనేది చెబుతారా ?
జె. వెంగళరావు :- అక్కడ రోడ్స్ వేయడానికి అయితేనేమి, ట్రైబల్ పీపుల్కు యిన్ సెంటివ్స్ యిచ్చేదానికి అయితేనేమి 12 లక్షలు మాత్రము ఖర్చు పెట్ట
డము అయింది.
437CONTEMPT PETITIONS FOR NON-IMPLEMENTATION OF HIGH COURT JUDGEMENTS
* 1451 No. (2838-Y) Sarvasri Annadatha Madhava Rao, T. S' Murthy, C. Janga Reddy (Parkal) D. Venkatesam (Kuppam) & V. Rama Rao, M. L. As. :- Will the Hon. Chief Minister be pleased to refer to the answer given to clause (b) of L. A. Q. No 1728- M 28-7-1970 and state :
(a) The number of contempt applications that have been moved for non-implementation of the judgment given in cases referred to in clause (b) of L.A.D. No. 1726-M.
(b) The number of Writs in which strictures were passed against the Ministers and Heads of Departments.
(c) Whether the Govt. implemented the decision of the High Court in its judgment dated 21-3-1969 in W. P. No. 809, 828 of 1967 and 3125/68; if not reasons therefor?
(d) Whether the Government propose to open a cell for implementation of the High Court directions.
Sri K. Brahmananda Reddy :(a) Twenty.
(b) No list is being maintained of the number of Writs in which strictures are passed by the High Court against Ministers and Heads of Departments.
(c) A statement is placed on the Table of the House.
(d) No proposal is under consideration of the Government.
|
english
|
{
"title": "Jug",
"creation_date": "c. 1850",
"creation_date_earliest": "1845-01-01",
"creation_date_latest": "1855-01-01",
"medium": "glass",
"accession_number": "2001.34",
"id": "cmoa:things/b7905788-b39e-44be-a12a-9ecc55143970",
"credit_line": "Decorative Arts Purchase Fund",
"date_acquired": "2001-10-04",
"department": "Decorative Arts and Design",
"physical_location": "Not on View",
"item_width": 5.5,
"item_height": 10.125,
"item_depth": 5.125,
"item_diameter": 0.0,
"web_url": "http://collection.cmoa.org/CollectionDetail.aspx?item=1004239",
"provenance_text": "H. Blairman & Sons Ltd, London, England",
"classification": "Glass",
"images": [
{
"image_url": "http://collection.cmoa.org/CollectionImage.aspx?irn=888&size=Medium"
}
],
"creator": [
{
"artist_id": "cmoa:parties/56062e97-498b-4188-b06a-ccd1e9af3671",
"party_type": "Organization",
"full_name": "<NAME>. & <NAME>",
"cited_name": "Richardson, W.H.B. & J.",
"role": "manufacturer",
"nationality": "British",
"birth_date": "1836-01-01",
"death_date": "1853-01-01",
"birth_place": null,
"death_place": null
}
]
}
|
json
|
{
"directions": [
"Special equipment: a long-handled spoon; a seltzer siphon (optional)",
"Pour milk into a 16-ounce glass and place spoon in glass. Pour seltzer (or squirt if using siphon) into glass to reach 1/2 inch below rim. (A snow-white foam will develop.) Pour syrup into center of white foam, then stir in syrup and remove spoon through center of foam."
],
"ingredients": [
"1/2 cup chilled whole milk",
"Chilled seltzer",
"1/4 cup chocolate syrup"
],
"language": "en-US",
"source": "www.epicurious.com",
"tags": [
"Milk/Cream",
"Non-Alcoholic",
"Chocolate",
"Kid-Friendly",
"Quick & Easy",
"Gourmet",
"Drink"
],
"title": "Chocolate Egg Cream",
"url": "http://www.epicurious.com/recipes/food/views/chocolate-egg-cream-201102"
}
|
json
|
<reponame>luosichengx/myplace
{"title": "kBF: A Bloom Filter for key-value storage with an application on approximate state machines.", "fields": ["bloom filter", "intrusion detection system", "probabilistic logic", "cpu time", "speedup"], "abstract": "Key-value (k-v) storage has been used as a cru- cial component for many network applications, such as social networks, online retailing, and cloud computing. Such storage usually provides support for operations on key-value pairs, and can be stored in memory to speed up responses to queries. So far, existing methods have been deterministic: they will faithfully return previously inserted key-value pairs. Providing such accuracy, however, comes at the cost of memory and CPU time. In contrast, in this paper, we present an approximate k-v storage that is more compact than existing methods. The tradeoff is that it may, theoretically, return a null value for a valid key with a low probability, or return a valid value for a key that was never inserted. Its design is based on the probabilistic data structure called the \"Bloom Filter\", which was originally developed to test element membership in sets. In this paper, we extend the bloom filter concept to support key-value operations, and demonstrate that it still retains the compact nature of the original bloom filter. We call the resulting design as the kBF (key-value bloom filter), and systematically analyze its performance advantages and design tradeoffs. Finally, we apply the kBF to a practical problem of implementing a state machine in network intrusion detection to demonstrate how the kBF can be used as a building block for more complicated software infrastructures.", "citation": "Citations (5)", "departments": ["University of Tennessee", "University of Tennessee", "University of Tennessee", "University of Minnesota"], "authors": ["<NAME>.....http://dblp.org/pers/hd/x/Xiong:Sisi", "Y<NAME>.....http://dblp.org/pers/hd/y/Yao:Yanjun", "<NAME>ao.....http://dblp.org/pers/hd/c/Cao:Qing", "Tian He.....http://dblp.org/pers/hd/h/He_0001:Tian"], "conf": "info<EMAIL>", "year": "2014", "pages": 9}
|
json
|
Posted On:
Researchers from Indian Institute of Geomagnetism (IIG), Navi Mumbai, an autonomous institute of the Department of Science & Technology, Govt. of India, have developed a global model to predict the ionospheric electron density with larger data coverage—a crucial need for communication and navigation.
Dr. V. Sai Gowtam, with his research supervisor Dr. S. Tulasiram from IIG, has developed a new Artificial Neural Networks based global Ionospheric Model (ANNIM) using long-term ionospheric observations to predict the ionospheric electron density and the peak parameters.
ANNs replicate the processes in the human brain (or biological neurons) to solve problems such as pattern recognition, classification, clustering, generalization, linear and nonlinear data fitting, and time series prediction, and very few attempts have been made to model the global ionosphere variability using ANNs.
Tracking the variability of the Ionosphere is important for communication and navigation. The ionospheric variability is greatly influenced by both solar originated processes and the neutral atmosphere origin, therefore, difficult to model. Scientists have tried to model the ionosphere using theoretical and empirical techniques; however, the accurate prediction of electron density is still a challenging task.
In recent years, the Artificial Neural Networks (ANNs) are showing potential to handle more complex and non-linear problems. Keeping these aspects in mind, a novel machine learning approach was implemented by the IIG team in the ionospheric model development using global ionospheric observations.
The researchers developed a neural network-based global ionospheric model by using an extensive database consisting of nearly two decades of global Digisonde (an instrument that measures real-time on-site electron density of the ionosphere by sending the radiofrequency pulses), Global Navigation Satellite System (GNSS) radio occultation and topside sounders observations. These datasets were processed with various quality control measures to eliminate spurious data points (outliers) and prepared for the training. Day number, Universal Time, latitude, longitude, F10.7 index (responsible for Photo-ionization), Kp (represents the disturbed space weather conditions), magnetic declination, inclination, dip latitude, zonal and meridional neutral winds were taken as inputs in the study. The target (output) of ANNs is the electron density as a function of altitude for any given location and time. The data was trained with the ANNs using high-performance computer at IIG to develop the ANNIM.
The model developed by IIG researchers may be utilized as a reference model in the ionospheric predictions and has potential applications in calculating the Global Navigation Satellite System (GNSS) positioning errors.
Figure 1: Architecture of the neural network used in ANNIM development (Gowtam et al., 2019)
Figure 2: The ionospheric electron density as a function of altitude over Indian longitude during March equinox at 12:00 Hrs. as simulated by ANNIM.
[Pubications:1. Sai Gowtam, V., Tulasi Ram, S., Reinisch, B., & Prajapati, A. (2019). A new artificial neural network‐based global three‐dimensional ionospheric model (ANNIM‐3D) using long‐term ionospheric observations: Preliminary results. J. Geophys. Res. Space Physics, 124, 4639– 4657. https://doi.org/10.1029/2019JA026540.
2.Tulasi Ram, S., Sai Gowtam, V., Mitra, A., &Reinisch, B. (2018). The improved two-dimensional artificial neural network-based ionospheric model (ANNIM). J. Geophys. Res. Space Physics, 123, 5807–5820. https://doi.org/10.1029/2018JA025559.
3.Sai Gowtam, V., &Tulasi Ram, S. (2017). An Artificial Neural Network-based Ionospheric Model to predict NmF2 and hmF2 using long-term data set of FORMOSAT-3/COSMIC radio occultation observations: Preliminary results. J. Geophys. Res. Space Physics, 122 (11), 743-11, 755. https://doi.org/10.1002/2017JA024795.
For further details contact:
KGS/( DST)
|
english
|
<reponame>askrepps/advent-of-code-2020<filename>test/test_day11.py
# MIT License
#
# Copyright (c) 2020 <NAME>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import unittest
from advent2020.day11 import get_part1_answer
from advent2020.day11 import get_part2_answer
from advent2020.util import get_input_data_lines
seat_data = """
L.LL.LL.LL
LLLLLLL.LL
L.L.L..L..
LLLL.LL.LL
L.LL.LL.LL
L.LLLLL.LL
..L.L.....
LLLLLLLLLL
L.LLLLLL.L
L.LLLLL.LL
"""
class Day11Test(unittest.TestCase):
def test_day11(self):
seat_grid = get_input_data_lines(seat_data)
self.assertEqual(get_part1_answer(seat_grid), 37)
self.assertEqual(get_part2_answer(seat_grid), 26)
|
python
|
State Level Single Window Clearance Authority (SLSWCA) meeting held on Saturday under the Chairmanship of Chief Secretary Suresh Chandra Mahapatra accorded in-principle approval to 10 industrial investment proposals envisaging investment of around Rs 2171. 82 crores and direct employment opportunities for 5,242 persons in the state.
State Level Single Window Clearance Authority (SLSWCA) meeting held on Saturday under the Chairmanship of Chief Secretary Suresh Chandra Mahapatra accorded in-principle approval to 10 industrial investment proposals envisaging investment of around Rs 2171. 82 crores and direct employment opportunities for 5,242 persons in the state.
Besides, the projects will create many more indirect employment opportunities and will enhance economic activities in different parts of the State.
Giving an in-principle nod to the proposals, Chief Secretary Mahapatra directed the IDCO to do a scientific assessment of the real requirement of land and water for the units for optimizing the land use. Concerned departments were also asked to facilitate early grounding of the projects through expeditious clearances and approvals.
Presenting details of the investment proposals, Principal Secretary, Industry, Hemant Kumar Sharma said, "The Proposals are mainly from the sectors like cement grinding, ethanol production, food processing, tourism, coal tar and renewable energy".
He outlined the financial and technical credibility of the industrial houses that submitted the proposals. MD of the Industrial Promotion & Investment Corporation of Odisha (IPICOL), Bhoopinder Singh Poonia presented project-wise details for discussion.
"The committee approved the proposals of My Home Industries Private Limited (MHPL) to set up a 3 MTPA Cement Grinding unit in Jajpur district with an investment of Rs 650 crores and employment opportunities for over 750 persons; L N Metallics Limited's for setting up 0. 112 MTPA MS Billets, 0. 112 MTPA TMT/ Structure/ MS Strip, 0. 04 MTPA Ferro Alloys, 0. 1 MTPA Sponge Iron, 0. 6 MTPA Iron ore Beneficiation, 0. 4 MTPA Pellet, 0. 112 MTPA MS/GI Pipe and 23 MW CPP in Jharsuguda district with an investment of Rs 205 crores and employment potential for over 571 persons," said Poonia.
"Arcelor Mittal Nippon Steel India Limited to set up a Riverine Jetty at Udayabata, Jagatsinghpur with an investment of Rs 150 crores and employment opportunities for over 280 persons," he added.
Speaking further he said, that the Chief Secretary also gave nod to the proposal of Mash Bio Fuels Private Limited for setting up a 360 KLPD Ethanol, 120 KLPD Extra Neutral Alcohol(ENA), 10 MW Co-generation Plant along with a bottling unit for ENA with an investment of Rs 258. 05 crores. The unit proposed to be set up in the Sonepur district would generate employment opportunities for over 300 persons.
The proposals of Vibrant Spirits Private Limited to set up 100 KLPD Ethanol along with 5 MW co-generation plant in Bargarh district with an investment of Rs 100 crores and employment opportunities for over 2,250 persons; VCI Chemical Industries Private Limited to set up a Coal Tar Distillation Plant with a 1,00,000TPA capacity at Kalinganagar in Jajpur with an investment of Rs 210 crores and employment potential for over 157 persons; and Ramco Cements Limited to expand its existing plant with the addition of a cement grinding capacity of 0. 9 MTPA at Haridaspur in Jajpur with an investment of Rs 190 crores and employment opportunities for over 60 persons were was also approved in the meeting.
The other projects approved by the committee included, A 5-star Hotel by Luxurio Assets Private Limited with an investment of Rs 181. 60 crores and employment potential for 224 persons to be set up in Khurdha district, A Hotel-cum-luxury resort by Lalchand Resort Private Limited against an investment of Rs 119. 67 crores and employment potential for over 350 persons in Khurdha district and A 4-star hotel by Sailabala Infrastructure Private Limited in the industrial estate of Khurdha district with an investment of Rs 107. 50 crores and employment opportunities for over 300 persons.
( With inputs from ANI )
|
english
|
{
"id": 51537,
"name": "right to left twitter + Persian fonts",
"description": "توییتر به حالت راست به چپ به همراه فونت های فارسی \r\nیکان، میترا و تاهوما",
"user": {
"id": 108279,
"name": "toospool",
"email": "redacted",
"paypal_email": null,
"homepage": null,
"about": null,
"license": null
},
"updated": "2011-08-11T17:11:53.000Z",
"weekly_install_count": 0,
"total_install_count": 325,
"rating": null,
"after_screenshot_name": "https://userstyles.org/style_screenshots/51537_after.jpeg?r=1608365227",
"obsoleting_style_id": null,
"obsoleting_style_name": null,
"obsolete": 0,
"admin_delete_reason_id": null,
"obsoletion_message": null,
"screenshots": null,
"license": null,
"created": "2011-07-31T03:19:51.000Z",
"category": "site",
"raw_subcategory": "twitter",
"subcategory": "twitter",
"additional_info": null,
"style_tags": [],
"css": "@-moz-document domain(\"twitter.com\") {\r\n.main-content {\r\n\r\ntext-align:right;\r\nfont-family:yekan,b yekan,tahoma;\r\n}\r\n\r\n.tweet-box .twitter-anywhere-tweet-box-editor, .proxy-editor {\r\nfont-family: b yekan,yekan,tahoma;\r\ntext-align:right;\r\ndirection:rtl;\r\n}\r\n.tweet-text {\r\nfont-family: tahoma;\r\nfont-size:12px;\r\ndirection:rtl;\r\n}\r\n.dashboard{\r\nfloat:left;\r\n}\r\n.profile-pane .full-name h2 {\r\nfont-family:yekan,b yekan;\r\n}\r\n.profile-pane span.bio {\r\nfont-family:tahoma;}\r\n.details-pane .tweet-text {\r\nfont-family:tahoma;\r\n}\r\n.tweet-box h2 {\r\ntext-align:left;\r\n}\r\n}",
"discussions": [],
"discussionsCount": 0,
"commentsCount": 0,
"userjs_url": "/styles/userjs/51537/right-to-left-twitter-persian-fonts.user.js",
"style_settings": []
}
|
json
|
<reponame>MaxBrooks114/moss
{"ast":null,"code":"export const updateLogin = formData => {\n return {\n type: \"UPDATE_LOGIN\",\n formData\n };\n};\nexport const resetLogin = formData => {\n return {\n type: \"RESET_LOGIN\"\n };\n};","map":{"version":3,"sources":["/Users/maxbrooks/Development/Projects/moss/moss-client/src/actions/login.js"],"names":["updateLogin","formData","type","resetLogin"],"mappings":"AAAC,OAAO,MAAMA,WAAW,GAAGC,QAAQ,IAAI;AACtC,SAAO;AACLC,IAAAA,IAAI,EAAE,cADD;AAELD,IAAAA;AAFK,GAAP;AAIA,CALM;AAOP,OAAO,MAAME,UAAU,GAAGF,QAAQ,IAAI;AACrC,SAAO;AACLC,IAAAA,IAAI,EAAE;AADD,GAAP;AAGA,CAJM","sourcesContent":[" export const updateLogin = formData => {\n return {\n type: \"UPDATE_LOGIN\",\n formData\n }\n }\n\n export const resetLogin = formData => {\n return {\n type: \"RESET_LOGIN\" \n }\n }\n"]},"metadata":{},"sourceType":"module"}
|
json
|
Paul Scholes’ recently released autobiography aptly reflects his character – quiet, unassuming and understated. It is full of lucid insights about his career with both Manchester United and England, team-mates, important matches, opponents and goals. He copiously uses comments by his team-mates and others in the game which aptly reveals his character and impact on the game.
A sampling of some of these comments show how highly rated Scholes was by in both England and Europe. His club manager Alex Ferguson says, “Paul is one in a million.” Sir Bobby Charlton assesses the technical brilliance of Scholes in his two-page afterword to the book. Charlton says, “he had guile, an amazing touch and that priceless knack of making instant decisions that catch so many opponents on the hop.” Former England manager Sven Goran Eriksson says, “Paul finished with the national team too early” and that “he was very clever with outstanding technique. He could pass the ball over five yards or fifty.” Gary Neville says he was the most talented player he played with. Even the legendary Zidane has called Scholes as the complete midfielder.
The book also has Scholes’ assessments of his team-mates and rivals, as part of the narrative. He says, “to see Zidane in action was to see poetry in motion. The skills, the vision, the goals...” He praises Cristiano Ronaldo’s God-given talent and calls him a happy-go-lucky workmate and a congenital joker. Scholes stresses that Ronaldo’s image as a playboy is an exaggeration and that instead he had a top class attitude, was always practicing and took loads of physical punishment.
These interspersed comments give an extra dimension to the fast flowing narrative. The format of the book is unusual but very effective. Scholes has taken great pains to include vivid photographs on each page. His narrative technique is to comment on the action in the photographs. These pithy comments are part of the flow of his narrative. Sometimes, the thoughts of other players involved in the action are also included. For instance, on page 7, we see the four year old Paul Scholes trying to trap a bouncing ball at his relative Uncle Patrick’s house in Middleton, Manchester. On that same page, the narrative gets linked to the photograph, as Paul Scholes comments on his Beatles hair-cut very much in vogue during the 1970s and how his family frequently visited his Uncle Patrick’s house. His maternal uncle, an avid Manchester United, played a big part in developing young Paul’s obsession with football and the Red Devils.
There are pictures and comments of many of his 106 goals in the English Premier League and his 26 goals in the Champions League for Manchester United, from 1994-95 till 2011-12. His injury-time winning goal, a well-directed header against arch rivals Manchester City on their own ground in April 2010 is, according to him, his most satisfying goal.
The book provides rare insights into the life and times of Scholes’ career. He candidly talks about his controversial decision to quit playing for England, when he was at the peak of his career, in 2004. He says that he retired at the age of twenty nine because he “did not like being away from home and my family for weeks on end”. He honestly admits that “whenever we were knocked out I was always more than ready to go home.....given my mindset I never enjoyed the football (international) and therefore had no chance of being anywhere near my best.” He then drops a bombshell by giving a secondary factor, namely the selfish attitude of some other England players,”who appeared to be there for personal glory.” That is the hallmark of this book; Scholes reveals little known facts about his professional life and of other professionals.
There are memorable chapters dealing with the years Manchester United did the double, winning the Premiership and FA Cup, aptly called A Double Dose of Glory. The treble crown and the magnificent unbeaten run after the 1998 Christmas are vividly described in the chapter Two Out of Three, can’t Complain. The title of this chapter is very appropriate as Scholes and Roy Keane were suspended for the memorable Champions league final against Bayern Munich at the Nou Camp.
The most interesting chapter has a title from a James Bond thriller, Blood and Plunder in the Moscow Night. It provides graphic details of how Manchester United were desperate to win the Champions League in 2008, as they felt they had underachieved in this tournament, frequently getting beaten in either the quarter finals or semi finals. The year 2008 was also significant as it marked the 50th anniversary of the Munich air disaster. In the all-England against Chelsea, Scholes reveals the sense of injustice he felt when he got a yellow card for an accidental clash of heads with rival midfielder Claude Makelele. As a professional, he sympathises with international team-mate but Chelsea rival John Terry who missed the crucial penalty kick in the penalty shoot-out. Terry was crying at the end and in a sporting gesture, Scholes tapped him on the shoulder, as he knew that words could not offer any consolation.
This is a very sensitively written autobiography with delightful illustrations and mandatory reading for all Scholes and Manchester United fans.
|
english
|
<gh_stars>1-10
/*
* Copyright 2018 The ffb.depot.client contributors
*
* 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 de.bmarwell.ffb.depot.client;
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import de.bmarwell.ffb.depot.client.err.FfbClientError;
import de.bmarwell.ffb.depot.client.json.FfbDepotInfo;
import de.bmarwell.ffb.depot.client.json.FfbFondsbestand;
import de.bmarwell.ffb.depot.client.json.LoginResponse;
import de.bmarwell.ffb.depot.client.json.MyFfbResponse;
import de.bmarwell.ffb.depot.client.value.FfbDepotNummer;
import de.bmarwell.ffb.depot.client.value.FfbLoginKennung;
import de.bmarwell.ffb.depot.client.value.FfbPin;
import com.github.tomakehurst.wiremock.junit.WireMockRule;
import java.math.BigDecimal;
import java.net.URI;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class TestMobileGetDepotwert {
public static final FfbLoginKennung LOGIN = FfbLoginKennung.of("22222301");
public static final FfbPin PIN = FfbPin.of("91901");
public static final FfbDepotNummer DEPOTNUMMER = FfbDepotNummer.of("222223");
private static final Logger LOG = LoggerFactory.getLogger(TestMobileGetDepotwert.class);
@Rule
public WireMockRule wiremock = new WireMockRule(wireMockConfig().dynamicPort());
private FfbMobileClient client;
private FfbMobileClient clientWithoutCredentials;
@Before
public void setUp() {
final FfbClientConfiguration config = () -> URI.create("http://localhost:" + wiremock.port());
this.client = new FfbMobileClient(LOGIN, PIN, config);
this.clientWithoutCredentials = new FfbMobileClient(config);
}
@Test
public void testGetDepotwertWithoutCredentials() throws FfbClientError {
clientWithoutCredentials.logon();
assertFalse(clientWithoutCredentials.isLoggedIn());
final LoginResponse loginResponse = clientWithoutCredentials.loginInformation();
LOG.debug("Login: [{}].", loginResponse);
assertFalse(loginResponse.isLoggedIn());
}
@Test
public void testLoginLogout() throws FfbClientError {
client.logon();
final LoginResponse loginResponse = client.loginInformation();
LOG.debug("Login: [{}].", loginResponse);
assertTrue("Should be logged in.", loginResponse.isLoggedIn());
final boolean logout = client.logout();
Assert.assertThat("logout should yield success.", logout, is(true));
assertFalse("loginInformation should be gone now.", client.isLoggedIn());
}
@Test(expected = IllegalStateException.class)
public void testFfbIllegalState() throws FfbClientError {
client.getPerformance();
}
/**
* Tests with a valid test login.
*
* <p>Login taken from: <a href= "http://www.wertpapier-forum.de/topic/31477-demo-logins-depots-einfach-mal-testen/page__view__findpost__p__567459">
* Wertpapier-Forum</a>.<br> Login: 22222301<br> PIN: 91901</p>
*
* @throws FfbClientError
* Errror with fetching data.
*/
@Test
public void testGetDepotwertWithCredentials() throws FfbClientError {
client.logon();
assertTrue(client.isLoggedIn());
final LoginResponse loginResponse = client.loginInformation();
LOG.debug("Login: [{}].", loginResponse);
assertTrue(loginResponse.isLoggedIn());
assertEquals("Customer", loginResponse.getUsertype());
assertEquals("E1000590054", loginResponse.getLastname());
final MyFfbResponse accountData = client.fetchAccountData();
assertTrue(accountData != null);
LOG.debug("Account data: [{}].", accountData);
for (final FfbDepotInfo depot : accountData.getDepots()) {
LOG.debug("Depotinfo: [{}].", depot);
assertThat(depot.compareTo(depot), is(0));
}
final BigDecimal depotBestand = FfbDepotUtils.getGesamtBestand(accountData, DEPOTNUMMER);
LOG.debug("Depotbestand: [{}].", depotBestand);
assertTrue(depotBestand.compareTo(BigDecimal.ZERO) > 0);
assertTrue(accountData.isLoggedIn());
assertFalse(accountData.isModelportfolio());
assertTrue(accountData.getGesamtwert().compareTo(BigDecimal.ZERO) > 0);
LOG.debug("MyFfb: [{}].", accountData);
// Teste Depotbestände
assertFalse(accountData.getDepots().isEmpty());
boolean hasDepotBestand = false;
for (final FfbDepotInfo depot : accountData.getDepots()) {
if (depot.getFondsbestaende().isEmpty()) {
continue;
}
hasDepotBestand = true;
for (final FfbFondsbestand bestand : depot.getFondsbestaende()) {
assertNotNull(bestand);
assertNotEquals(BigDecimal.ZERO, bestand.getBestandStueckzahl());
assertNotEquals(BigDecimal.ZERO, bestand.getBestandWertInEuro());
assertNotEquals(BigDecimal.ZERO, bestand.getBestandWertInFondswaehrung());
assertNotNull(bestand.getFondsname());
assertNotNull(bestand.getIsin());
assertNotNull(bestand.getWkn());
}
}
assertTrue(hasDepotBestand);
}
@Test
public void testToString() {
final String mobileToString = client.toString();
assertNotNull("ToString may not be missing.", mobileToString);
LOG.debug("FfbMobileClient: [{}]", mobileToString);
assertTrue("User should be set.", mobileToString.contains(LOGIN.getLoginKennung()));
}
}
|
java
|
<gh_stars>1-10
import * as isoly from "isoly"
import { Transaction as SettlementTransaction } from "../../Settlement/Transaction"
import { Operation } from "../Operation"
import { Transaction as TransactionFee } from "./Transaction"
export type Fee = { [status in Operation]?: number } &
{
[country in isoly.CountryCode.Alpha2]?: TransactionFee
} & {
eea?: TransactionFee
other: TransactionFee
}
export namespace Fee {
export function is(value: any | Fee): value is Fee {
return (
typeof value == "object" &&
Operation.types.every(v => value[v] == undefined || typeof value[v] == "number") &&
Object.keys(value)
.filter(v => Operation.types.every(t => t != v))
.every(region => TransactionFee.is(value[region]) || region == undefined) &&
TransactionFee.is(value.other)
)
}
export function apply(transaction: SettlementTransaction, fee: Fee, rate?: number): number {
return (
(fee[transaction.type] ?? 0) * (rate ?? 1) +
TransactionFee.apply(
transaction.scheme,
transaction.card,
fee[transaction.area] ?? isoly.CountryCode.Alpha2.isEEA(transaction.area)
? fee["eea"] ?? fee["other"]
: fee["other"],
transaction.gross
)
)
}
export type Transaction = TransactionFee
export namespace Transaction {
export const is = TransactionFee.is
export const isUnified = TransactionFee.isUnified
export const apply = TransactionFee.apply
}
}
|
typescript
|
.reveal .slides {
text-align: left;
}
.reveal h1,
.reveal h2,
.reveal h3 {
text-transform: none;
text-align: center;
}
code {
padding: 2px 4px;
color: #d14;
background-color: #f7f7f9;
border: 1px solid #e1e1e8;
font-size: 28px;
}
.reveal p {
text-align: left;
margin: 20px 0;
line-height: 1.3;
}
.reveal p img {
display: block;
margin: 0 auto;
}
.reveal ul {
text-align: left;
}
.reveal img {
text-align: center;
}
.math {
text-align: center;
}
.reveal pre code {
padding: 3px;
word-wrap: none;
}
.reveal pre {
margin: 5px auto;
}
.reveal .knitsql-table {
font-size: 70%;
}
|
css
|
<reponame>imotai/tonic
use std::task::{Context, Poll};
use http::{header, HeaderMap, HeaderValue, Method, Request, Response, StatusCode, Version};
use hyper::Body;
use tonic::body::{empty_body, BoxBody};
use tonic::transport::NamedService;
use tower_service::Service;
use tracing::{debug, trace};
use crate::call::content_types::is_grpc_web;
use crate::call::{Encoding, GrpcWebCall};
use crate::cors::Cors;
use crate::cors::{ORIGIN, REQUEST_HEADERS};
use crate::{BoxError, BoxFuture, Config};
const GRPC: &str = "application/grpc";
#[derive(Debug, Clone)]
pub struct GrpcWeb<S> {
inner: S,
cors: Cors,
}
#[derive(Debug, PartialEq)]
enum RequestKind<'a> {
// The request is considered a grpc-web request if its `content-type`
// header is exactly one of:
//
// - "application/grpc-web"
// - "application/grpc-web+proto"
// - "application/grpc-web-text"
// - "application/grpc-web-text+proto"
GrpcWeb {
method: &'a Method,
encoding: Encoding,
accept: Encoding,
},
// The request is considered a grpc-web preflight request if all these
// conditions are met:
//
// - the request method is `OPTIONS`
// - request headers include `origin`
// - `access-control-request-headers` header is present and includes `x-grpc-web`
GrpcWebPreflight {
origin: &'a HeaderValue,
request_headers: &'a HeaderValue,
},
// All other requests, including `application/grpc`
Other(http::Version),
}
impl<S> GrpcWeb<S> {
pub(crate) fn new(inner: S, config: Config) -> Self {
GrpcWeb {
inner,
cors: Cors::new(config),
}
}
}
impl<S> GrpcWeb<S>
where
S: Service<Request<Body>, Response = Response<BoxBody>> + Send + 'static,
{
fn no_content(&self, headers: HeaderMap) -> BoxFuture<S::Response, S::Error> {
let mut res = Response::builder()
.status(StatusCode::NO_CONTENT)
.body(empty_body())
.unwrap();
res.headers_mut().extend(headers);
Box::pin(async { Ok(res) })
}
fn response(&self, status: StatusCode) -> BoxFuture<S::Response, S::Error> {
Box::pin(async move {
Ok(Response::builder()
.status(status)
.body(empty_body())
.unwrap())
})
}
}
impl<S> Service<Request<Body>> for GrpcWeb<S>
where
S: Service<Request<Body>, Response = Response<BoxBody>> + Send + 'static,
S::Future: Send + 'static,
S::Error: Into<BoxError> + Send,
{
type Response = S::Response;
type Error = S::Error;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
self.inner.poll_ready(cx)
}
fn call(&mut self, req: Request<Body>) -> Self::Future {
match RequestKind::new(req.headers(), req.method(), req.version()) {
// A valid grpc-web request, regardless of HTTP version.
//
// If the request includes an `origin` header, we verify it is allowed
// to access the resource, an HTTP 403 response is returned otherwise.
//
// If the origin is allowed to access the resource or there is no
// `origin` header present, translate the request into a grpc request,
// call the inner service, and translate the response back to
// grpc-web.
RequestKind::GrpcWeb {
method: &Method::POST,
encoding,
accept,
} => match self.cors.simple(req.headers()) {
Ok(headers) => {
trace!(kind = "simple", path = ?req.uri().path(), ?encoding, ?accept);
let fut = self.inner.call(coerce_request(req, encoding));
Box::pin(async move {
let mut res = coerce_response(fut.await?, accept);
res.headers_mut().extend(headers);
Ok(res)
})
}
Err(e) => {
debug!(kind = "simple", error=?e, ?req);
self.response(StatusCode::FORBIDDEN)
}
},
// The request's content-type matches one of the 4 supported grpc-web
// content-types, but the request method is not `POST`.
// This is not a valid grpc-web request, return HTTP 405.
RequestKind::GrpcWeb { .. } => {
debug!(kind = "simple", error="method not allowed", method = ?req.method());
self.response(StatusCode::METHOD_NOT_ALLOWED)
}
// A valid grpc-web preflight request, regardless of HTTP version.
// This is handled by the cors module.
RequestKind::GrpcWebPreflight {
origin,
request_headers,
} => match self.cors.preflight(req.headers(), origin, request_headers) {
Ok(headers) => {
trace!(kind = "preflight", path = ?req.uri().path(), ?origin);
self.no_content(headers)
}
Err(e) => {
debug!(kind = "preflight", error = ?e, ?req);
self.response(StatusCode::FORBIDDEN)
}
},
// All http/2 requests that are not grpc-web or grpc-web preflight
// are passed through to the inner service, whatever they are.
RequestKind::Other(Version::HTTP_2) => {
debug!(kind = "other h2", content_type = ?req.headers().get(header::CONTENT_TYPE));
Box::pin(self.inner.call(req))
}
// Return HTTP 400 for all other requests.
RequestKind::Other(_) => {
debug!(kind = "other h1", content_type = ?req.headers().get(header::CONTENT_TYPE));
self.response(StatusCode::BAD_REQUEST)
}
}
}
}
impl<S: NamedService> NamedService for GrpcWeb<S> {
const NAME: &'static str = S::NAME;
}
impl<'a> RequestKind<'a> {
fn new(headers: &'a HeaderMap, method: &'a Method, version: Version) -> Self {
if is_grpc_web(headers) {
return RequestKind::GrpcWeb {
method,
encoding: Encoding::from_content_type(headers),
accept: Encoding::from_accept(headers),
};
}
if let (&Method::OPTIONS, Some(origin), Some(value)) =
(method, headers.get(ORIGIN), headers.get(REQUEST_HEADERS))
{
match value.to_str() {
Ok(h) if h.contains("x-grpc-web") => {
return RequestKind::GrpcWebPreflight {
origin,
request_headers: value,
};
}
_ => {}
}
}
RequestKind::Other(version)
}
}
// Mutating request headers to conform to a gRPC request is not really
// necessary for us at this point. We could remove most of these except
// maybe for inserting `header::TE`, which tonic should check?
fn coerce_request(mut req: Request<Body>, encoding: Encoding) -> Request<Body> {
req.headers_mut().remove(header::CONTENT_LENGTH);
req.headers_mut()
.insert(header::CONTENT_TYPE, HeaderValue::from_static(GRPC));
req.headers_mut()
.insert(header::TE, HeaderValue::from_static("trailers"));
req.headers_mut().insert(
header::ACCEPT_ENCODING,
HeaderValue::from_static("identity,deflate,gzip"),
);
req.map(|b| GrpcWebCall::request(b, encoding))
.map(Body::wrap_stream)
}
fn coerce_response(res: Response<BoxBody>, encoding: Encoding) -> Response<BoxBody> {
let mut res = res
.map(|b| GrpcWebCall::response(b, encoding))
.map(BoxBody::new);
res.headers_mut().insert(
header::CONTENT_TYPE,
HeaderValue::from_static(encoding.to_content_type()),
);
res
}
#[cfg(test)]
mod tests {
use super::*;
use crate::call::content_types::*;
use http::header::{CONTENT_TYPE, ORIGIN};
#[derive(Clone)]
struct Svc;
impl tower_service::Service<Request<Body>> for Svc {
type Response = Response<BoxBody>;
type Error = String;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, _: Request<Body>) -> Self::Future {
Box::pin(async { Ok(Response::new(empty_body())) })
}
}
impl NamedService for Svc {
const NAME: &'static str = "test";
}
mod grpc_web {
use super::*;
use http::HeaderValue;
fn request() -> Request<Body> {
Request::builder()
.method(Method::POST)
.header(CONTENT_TYPE, GRPC_WEB)
.header(ORIGIN, "http://example.com")
.body(Body::empty())
.unwrap()
}
#[tokio::test]
async fn default_cors_config() {
let mut svc = crate::enable(Svc);
let res = svc.call(request()).await.unwrap();
assert_eq!(res.status(), StatusCode::OK);
}
#[tokio::test]
async fn without_origin() {
let mut svc = crate::enable(Svc);
let mut req = request();
req.headers_mut().remove(ORIGIN);
let res = svc.call(req).await.unwrap();
assert_eq!(res.status(), StatusCode::OK);
}
#[tokio::test]
async fn origin_not_allowed() {
let mut svc = crate::config()
.allow_origins(vec!["http://localhost"])
.enable(Svc);
let res = svc.call(request()).await.unwrap();
assert_eq!(res.status(), StatusCode::FORBIDDEN)
}
#[tokio::test]
async fn only_post_allowed() {
let mut svc = crate::enable(Svc);
for method in &[
Method::GET,
Method::PUT,
Method::DELETE,
Method::HEAD,
Method::OPTIONS,
Method::PATCH,
] {
let mut req = request();
*req.method_mut() = method.clone();
let res = svc.call(req).await.unwrap();
assert_eq!(
res.status(),
StatusCode::METHOD_NOT_ALLOWED,
"{} should not be allowed",
method
);
}
}
#[tokio::test]
async fn grpc_web_content_types() {
let mut svc = crate::enable(Svc);
for ct in &[GRPC_WEB_TEXT, GRPC_WEB_PROTO, GRPC_WEB_PROTO, GRPC_WEB] {
let mut req = request();
req.headers_mut()
.insert(CONTENT_TYPE, HeaderValue::from_static(ct));
let res = svc.call(req).await.unwrap();
assert_eq!(res.status(), StatusCode::OK);
}
}
}
mod options {
use super::*;
use crate::cors::{REQUEST_HEADERS, REQUEST_METHOD};
use http::HeaderValue;
const SUCCESS: StatusCode = StatusCode::NO_CONTENT;
fn request() -> Request<Body> {
Request::builder()
.method(Method::OPTIONS)
.header(ORIGIN, "http://example.com")
.header(REQUEST_HEADERS, "x-grpc-web")
.header(REQUEST_METHOD, "POST")
.body(Body::empty())
.unwrap()
}
#[tokio::test]
async fn origin_not_allowed() {
let mut svc = crate::config()
.allow_origins(vec!["http://foo.com"])
.enable(Svc);
let res = svc.call(request()).await.unwrap();
assert_eq!(res.status(), StatusCode::FORBIDDEN);
}
#[tokio::test]
async fn missing_request_method() {
let mut svc = crate::enable(Svc);
let mut req = request();
req.headers_mut().remove(REQUEST_METHOD);
let res = svc.call(req).await.unwrap();
assert_eq!(res.status(), StatusCode::FORBIDDEN);
}
#[tokio::test]
async fn only_post_and_options_allowed() {
let mut svc = crate::enable(Svc);
for method in &[
Method::GET,
Method::PUT,
Method::DELETE,
Method::HEAD,
Method::PATCH,
] {
let mut req = request();
req.headers_mut().insert(
REQUEST_METHOD,
HeaderValue::from_maybe_shared(method.to_string()).unwrap(),
);
let res = svc.call(req).await.unwrap();
assert_eq!(
res.status(),
StatusCode::FORBIDDEN,
"{} should not be allowed",
method
);
}
}
#[tokio::test]
async fn h1_missing_origin_is_err() {
let mut svc = crate::enable(Svc);
let mut req = request();
req.headers_mut().remove(ORIGIN);
let res = svc.call(req).await.unwrap();
assert_eq!(res.status(), StatusCode::BAD_REQUEST);
}
#[tokio::test]
async fn h2_missing_origin_is_ok() {
let mut svc = crate::enable(Svc);
let mut req = request();
*req.version_mut() = Version::HTTP_2;
req.headers_mut().remove(ORIGIN);
let res = svc.call(req).await.unwrap();
assert_eq!(res.status(), StatusCode::OK);
}
#[tokio::test]
async fn h1_missing_x_grpc_web_header_is_err() {
let mut svc = crate::enable(Svc);
let mut req = request();
req.headers_mut().remove(REQUEST_HEADERS);
let res = svc.call(req).await.unwrap();
assert_eq!(res.status(), StatusCode::BAD_REQUEST);
}
#[tokio::test]
async fn h2_missing_x_grpc_web_header_is_ok() {
let mut svc = crate::enable(Svc);
let mut req = request();
*req.version_mut() = Version::HTTP_2;
req.headers_mut().remove(REQUEST_HEADERS);
let res = svc.call(req).await.unwrap();
assert_eq!(res.status(), StatusCode::OK);
}
#[tokio::test]
async fn valid_grpc_web_preflight() {
let mut svc = crate::enable(Svc);
let res = svc.call(request()).await.unwrap();
assert_eq!(res.status(), SUCCESS);
}
}
mod grpc {
use super::*;
use http::HeaderValue;
fn request() -> Request<Body> {
Request::builder()
.version(Version::HTTP_2)
.header(CONTENT_TYPE, GRPC)
.body(Body::empty())
.unwrap()
}
#[tokio::test]
async fn h2_is_ok() {
let mut svc = crate::enable(Svc);
let req = request();
let res = svc.call(req).await.unwrap();
assert_eq!(res.status(), StatusCode::OK)
}
#[tokio::test]
async fn h1_is_err() {
let mut svc = crate::enable(Svc);
let req = Request::builder()
.header(CONTENT_TYPE, GRPC)
.body(Body::empty())
.unwrap();
let res = svc.call(req).await.unwrap();
assert_eq!(res.status(), StatusCode::BAD_REQUEST)
}
#[tokio::test]
async fn content_type_variants() {
let mut svc = crate::enable(Svc);
for variant in &["grpc", "grpc+proto", "grpc+thrift", "grpc+foo"] {
let mut req = request();
req.headers_mut().insert(
CONTENT_TYPE,
HeaderValue::from_maybe_shared(format!("application/{}", variant)).unwrap(),
);
let res = svc.call(req).await.unwrap();
assert_eq!(res.status(), StatusCode::OK)
}
}
}
mod other {
use super::*;
fn request() -> Request<Body> {
Request::builder()
.header(CONTENT_TYPE, "application/text")
.body(Body::empty())
.unwrap()
}
#[tokio::test]
async fn h1_is_err() {
let mut svc = crate::enable(Svc);
let res = svc.call(request()).await.unwrap();
assert_eq!(res.status(), StatusCode::BAD_REQUEST)
}
#[tokio::test]
async fn h2_is_ok() {
let mut svc = crate::enable(Svc);
let mut req = request();
*req.version_mut() = Version::HTTP_2;
let res = svc.call(req).await.unwrap();
assert_eq!(res.status(), StatusCode::OK)
}
}
}
|
rust
|
Friday’s accident that killed 32 people in Rae Bareli occurred after the train overshot a signal, refusing to stop at Bachrawan station and hitting a track dead-end. AVISHEK G DASTIDAR explains how this might have happened.
When do trains overshoot signals?
A train is said to have “overshot” a signal — technically referred to in Indian Railways jargon as ‘Signal Passing At Danger’, or SPAD — when the driver ignores a red signal asking him to stop. In Railways signalling sequence, every signal is also an indicator of the next signal. Thus, if the current signal is red, or “danger”, the next signal cannot be green. If the current signal is yellow — “caution” —the next signal cannot be green.
Why might overshooting happen?
A red signal can be crossed as a result of human error, like the driver failing to sight the signal, or not reacting to it. It can also be due to a mechanical or equipment failure, such as the brakes not working for some reason. While the Railways runs on both an automatic signalling system, and what is known as ‘Absolute Block Signalling System’, the adherence to signals is a manual job, and does not happen automatically. Data doesn’t conclusively prove that one type of signal is more prone to SPAD than the other.
How frequent is signal jumping?
It is not infrequent. For instance, between April 2011 and August 2014, there were 239 SPAD cases, or around six instances every month on average. But the Railways claims the numbers have been decreasing as a result of policy interventions.
How does jumping a signal put a train at risk?
Obviously, not all SPAD cases end up in a loss of lives or damage to property. But in the Indian Railways’ books, every case of SPAD is termed as an ‘accident’, and the punishment for the driver is removal from service. Many SPAD cases have led to collisions and derailment.
What are the other reasons for accidents?
Collision, derailment and fire are most common. Accidents happen at manned and unmanned level crossings too. Numbers for one or the other type of accident fluctuate from year to year.
What is the Railways doing about accidents?
Suresh Prabhu’s Rail Budget has envisaged a 5-year corporate safety plan to reduce accidents, with stress on unmanned level crossings. The Ministry wants to come up with annual quantifiable targets to address safety issues. The Budget has allocated Rs 6,750 crore to eliminate 3,438 level crossings. The last major thrust to upgrade safety came during the Atal Bihari Vajpayee government, when the then railway minister Nitish Kumar got Rs 12,000 crore from the Finance Ministry to establish the Rs 17,000 crore Special Railway Safety Fund.
|
english
|
{
"name": "quafzi/customer-payment-filter",
"type": "magento-module",
"description": "This Magento extension allows you to deny specific payment methods for single customers.",
"license": "MIT",
"authors": [
{
"name": "<NAME>",
"email": "<EMAIL>"
}
],
"require": {
"magento-hackathon/magento-composer-installer": "*"
}
}
|
json
|
Toronto Blue Jays vs New York Yankees MLB game box score for Sep 19, 2023.
Copyright © 1995 - 2023 CS Media Limited All Rights Reserved.
If you choose to make use of any information on this website including online sports betting services from any websites that may be featured on this website, we strongly recommend that you carefully check your local laws before doing so. It is your sole responsibility to understand your local laws and observe them strictly. Covers does not provide any advice or guidance as to the legality of online sports betting or other online gambling activities within your jurisdiction and you are responsible for complying with laws that are applicable to you in your relevant locality. Covers disclaims all liability associated with your use of this website and use of any information contained on it. As a condition of using this website, you agree to hold the owner of this website harmless from any claims arising from your use of any services on any third party website that may be featured by Covers.Read more:
Blue Jays vs Yankees Odds, Picks, & Predictions — September 19MLB odds, predictions, and picks for Toronto Blue Jays at New York Yankees on September 19. MLB free pick for Blue Jays-Yankees.
Blue Jays visit the Yankees to begin 3-game seriesThe New York Yankees host the Toronto Blue Jays to start a three-game series.
Toronto Blue Jays vs New York Yankees Line MovementMLB line and odds movement for Toronto Blue Jays vs New York Yankees on Sep 19, 2023.
Today’s MLB Props Picks & Best Bets - September 18Free picks for MLB prop bets on September 18, swinging at today's MLB props and giving our best MLB prop picks, predictions, and baseball bets.
Today’s MLB Props Picks & Best Bets - September 19Free picks for MLB prop bets on September 19, swinging at today's MLB props and giving our best MLB prop picks, predictions, and baseball bets.
|
english
|
use std::fmt;
use std::convert::TryFrom;
/// Processing modes
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub enum ProcessingMode {
/// JSON-LD 1.0.
JsonLd1_0,
/// JSON-LD 1.1.
JsonLd1_1
}
impl ProcessingMode {
pub fn as_str(&self) -> &str {
match self {
ProcessingMode::JsonLd1_0 => "json-ld-1.0",
ProcessingMode::JsonLd1_1 => "json-ld-1.1"
}
}
}
impl Default for ProcessingMode {
fn default() -> ProcessingMode {
ProcessingMode::JsonLd1_1
}
}
impl<'a> TryFrom<&'a str> for ProcessingMode {
type Error = ();
fn try_from(name: &'a str) -> Result<ProcessingMode, ()> {
match name {
"json-ld-1.0" => Ok(ProcessingMode::JsonLd1_0),
"json-ld-1.1" => Ok(ProcessingMode::JsonLd1_1),
_ => Err(())
}
}
}
impl fmt::Display for ProcessingMode {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.as_str())
}
}
|
rust
|
Deprived of electricity since cyclone Phailin hit Odisha about three weeks ago,slum dwellers of this coastal town in the worst hit Ganjam district are celebrating Diwali with solar lights.
Bernard van Leer Foundation,a Netherland-based NGO in association with a local organisation,had distributed relief kits to the slum dwellers before the festival of lights. Among other materials,the relief kits contained a solar lantern.
“We have distributed the relief kits to around 5,500 slum dwellers of about 40 slum pockets in the town,” said Jacob Thundyl,President of the local NGO ‘PREM’.
“We wanted to distribute the relief materials before Diwali so that they could celebrate the festival in some way,” he said.
“I requested Thundyl to distribute these on the eve of Diwali so that they can light up their houses with the solar lantern,” said Berhampur Municipal Corporation corporator Mamata Bisoi.
“These are very helpful to us as we can light up the house for Diwali” said N Admabati,a slum-dweller at Good Shed Road Berhampur.
About 35,000 dwelling units in 163 slum pockets have been damaged by the cyclone in the town,official sources said.
|
english
|
New Delhi/Jaipur: Stepping up the demand for Rajasthan Chief Minister Vasundhara Raje’s resignation, the Congress on Monday alleged that she had “direct financial dealings” with former IPL chief Lalit Modi. The BJP vehemently refuted the charge as “baseless”.
Congress leader Jairam Ramesh, who has been at the forefront of making serious allegations against Raje, claimed that the chief minister had helped convert a state-owned palace in Dholpur, about 260 km from Jaipur, into private property.
He alleged that Niyant Heritage Pvt. Ltd., a company owned by Raje, her son Dushyant Singh, daughter-in-law Niharika Singh and Lalit Modi had taken over a Rajasthan government property, converted it into a private high-end luxury hotel and invested over Rs.100 crore.
“A joint venture company is running Niyant Heritage which is running Dholpur palace,” he said.
Ramesh showed Rajasthan government documents to claim that Dholpur palace — built in the late 19th century and which has eight royal palace rooms and 18 luxury villas — was never a private property of the erstwhile Dholpur royal family.
In Jaipur, the Bharatiya Janata Party’s Rajasthan unit rubbished the allegations, saying that the palace’s ownership was very much with Dushyant Singh.
“All the allegations are baseless. We have papers to prove that the Dholpur palace belongs to Dushyant Singh. There is no illegal occupation on the palace. Moreover, everyone knows that Vasundhara Raje ji is known as the Maharani (queen) of Dholpur city,” BJP state president Ashok Parnami said.
“Even the records with the municipality show that the palace belongs to Dushyant Singh,” he added.
Ramesh earlier asserted that he had conclusive proof that the Dholpur palace belonged to the government.
“We sadly have to state that Vasundhara Raje’s husband in 1980 made a statement saying Dholpur palace belongs to the government,” Ramesh said.
He accused Raje and Lalit Modi of converting government property into personal assets. “Even Vasundhara Raje herself had admitted that the Dholpur property was owned by the government of Rajasthan.
“First, she (Raje) and fugitive Lalit Modi are business partners. Second, Lalit Modi got Rs.21 crore from Mauritius and invested (it) in Dushyant Singh’s company. Third, Raje signed a seven-page document for UK authorities to help him (Lalit Modi),” Ramesh said.
The Congress leader also took a dig at Prime Minister Narendra Modi, describing him as “Swami Maunendra Baba” for his continued silence over the Lalit Modi issue.
The Congress also wants External Affairs Minister Sushma Swaraj to quit for helping Lalit Modi — who faces charges of financial impropriety — get travel documents.
Meanwhile, Aam Aadmi Party activists staged protests in the national capital demanding the sacking of Raje, Sushma Swaraj, Human Resource Development Minister Smriti Irani and Maharashtra minister Pankaja Munde of the BJP.
A court here has taken cognizance of a complaint challenging the educational qualification of Smriti Irani, while Pankaja Munde has been accused of corruption in Maharashtra.
Meghalaya scored 92.85 out of 100 possible points in a Gaming Industry Index and proved to be India’s most gaming-friendly state following its recent profound legislation changes over the field allowing land-based and online gaming, including games of chance, under a licensing regime.
Starting from February last year, Meghalaya became the third state in India’s northeast to legalise gambling and betting after Sikkim and Nagaland. After consultations with the UKIBC, the state proceeded with the adoption of the Meghalaya Regulation of Gaming Act, 2021 and the nullification of the Meghalaya Prevention of Gambling Act, 1970. Subsequently in December, the Meghalaya Regulation of Gaming Rules, 2021 were notified and came into force.
The move to legalise and license various forms of offline and online betting and gambling in Meghalaya is aimed at boosting tourism and creating jobs, and altogether raising taxation revenues for the northeastern state. At the same time, the opportunities to bet and gamble legally will be reserved only for tourists and visitors.
“We came out with a Gaming Act and subsequently framed the Regulation of Gaming Rules, 2021. The government will accordingly issue licenses to operate games of skill and chance, both online and offline,” said James P. K. Sangma, Meghalaya State Law and Taxation Minister speaking in the capital city of Shillong. “But the legalized gambling and gaming will only be for tourists and not residents of Meghalaya,” he continued.
To be allowed to play, tourists and people visiting the state for work or business purposes will have to prove their non-resident status by presenting appropriate documents, in a process similar to a bank KYC (Know Your Customer) procedure.
With 140 millions of people in India estimated to bet regularly on sports, and a total of 370 million desi bettors around prominent sporting events, as per data from one of the latest reports by Esse N Videri, Meghalaya is set to reach out and take a piece of a vast market.
Estimates on the financial value of India’s sports betting market, combined across all types of offline channels and online sports and cricket predictions and betting platforms, speak about amounts between $130 and $150 billion (roughly between ₹9.7 and ₹11.5 lakh crore).
Andhra Pradesh, Telangana and Delhi are shown to deliver the highest number of bettors and Meghalaya can count on substantial tourists flow from their betting circles. The sports betting communities of Karnataka, Maharashtra, Uttar Pradesh and Haryana are also not to be underestimated.
Among the sports, cricket is most popular, registering 68 percent of the total bet count analyzed by Esse N Videri. Football takes second position with 11 percent of the bets, followed by betting on FIFA at 7 percent and on eCricket at 5 percent. The last position in the Top 5 of popular sports for betting in India is taken by tennis with 3 percent of the bet count.
Meghalaya residents will still be permitted to participate in teer betting over arrow-shooting results. Teer is a traditional method of gambling, somewhat similar to a lottery draw, and held under the rules of the Meghalaya Regulation of the Game of Arrow Shooting and the Sale of Teer Tickets Act, 2018.
Teer includes bettors wagering on the number of arrows that reach the target which is placed about 50 meters away from a team of 20 archers positioned in a semicircle.
The archers shoot volleys of arrows at the target for ten minutes, and players place their bets choosing a number between 0 and 99 trying to guess the last two digits of the number of arrows that successfully pierce the target.
If, for example, the number of hits is 256, anyone who has bet on 56 wins an amount eight times bigger than their wager.
|
english
|
["format-gh-users","get-code-reviewers","get-github-issue-creators","get-github-pr-creators","get-issue-commenters","name-your-contributors"]
|
json
|
Dronacharya awardee athletics coach and former international hammer thrower Virender Poonia has tested positive for COVID-19 and has been admitted to a hospital in Jaipur.
The 47-year-old Virender is the husband of Olympian discus thrower and sitting Rajasthan MLA Krishna Poonia. He is now admitted to the Railway Hospital in Jaipur.
He, however, said he is doing “fine”.
“Last week I had body pain and sore throat and so I went for COVID-19 testing and it turned out to be positive. The result came on Saturday,” Virender told PTI over phone.
Virender, a Railways employee, won a bronze in hammer throw in the Asian Junior Championships in 1992 and finished fourth in the 1998 Asian Senior Championships.
He was Krishna’s coach when she won the discus throw gold medal in the 2010 Delhi Commonwealth Games. He received the Dronacharya Award in 2012.
|
english
|
Daniil Medvedev said his on-court outbursts at Indian Wells were a distraction to himself and he would be better off shutting up and playing the game instead.
The fifth-seeded Russian is not a fan of the slow hardcourts at the tournament and has vented his frustration during his matches.
“I think it actually distracts me and I’d be better just shutting up and playing. That’s what I should do,” Medvedev, who beat Alexander Zverev on Tuesday to reach the quarter-finals, said. “But at the same time, that’s how I am.
“When I was much younger, I was actually worse. I tried to mature. I do think that in many aspects of my life and in my tennis career I’ve matured a lot. And I’m better than I was three, four years ago.
“The attitude I had on the court today and with (Ilya) Ivashka was immature. But what else can I say? That’s also this high-intensity sport where you’re one on one against the opponent and it brings the heat out of you.
The world number six said he had worked on improving his behaviour with the help of a mental coach and he wanted to be remembered not for his tantrums but for his game and the “good parts of my personality”.
“I want to have good relationship with all the guys on the court, because I can also understand that this can distract my opponent, and that’s not what I want. I don’t care to win a match distracting my opponent. I want to win it normally,” he said.
|
english
|
After seven-year of space odyssey, a three-tonne piece of Chinese rocket debris slammed into the Moon, creating a 65 feet wide crater on the lunar surface, the media reported. According to experts, the event took place at 7:25 a.m. EST on the lunar far side, on Friday, Space.com reported. As a result, NASA`s Lunar Reconnaissance Orbiter could not get a look at the crash. “We certainly have an interest in finding the impact crater and will attempt to do so over the coming weeks and months,” John Keller, the deputy project scientist for the Lunar Reconnaissance Orbiter mission, emailed to The Verge in a statement.
“We will not be near the impact site when it takes place so we won`t be able to directly observe it. The onboard narrow angle cameras have sufficient resolution to detect the crater but the Moon is full of fresh impact craters, so positive identification is based on before and after images under similar lighting conditions, he added.
The doomed space debris was first reported by Bill Gray, an astronomer running Project Pluto. In his blogpost, Gray first claimed that the debris is from billionaire Elon Musk owned SpaceX rocket.
But later Gray predicted that the object is a leftover piece of a Chinese rocket, specifically a Long March 3C that launched China`s Chang`e 5-T1 mission to the Moon.
But China`s Ministry of Foreign Affairs rejected the claim, Space News reported.
In an another case, a rocket launched by American billionaire Elon Musk’s company SpaceX back in 2015 is all set to crash into the lunar surface, and it might lead to a legal conflict. The fast-moving piece of space junk, which is all set to hit the surface of the moon is the upper stage of a SpaceX Falcon 9 rocket that hoisted the Deep Space Climate Observatory satellite off planet earth. Since the launch of the satellite the ill-fated Falcon 9 has been chaotically looping around Earth and the Moon ever since. However, the crash at the lunar surface could soon mean a giant lawsuit for Musk.
Speaking to Forbes attorney Steven Kaufman, who co-heads satellite practice at the law firm Hogan Lovells, said that Musk can be sued theoretically but in practical terms that outcome is not that certain.
The court, generally, considers a person who commit a crime and the one who destroys the evidence, as criminals in the eyes of law. But what if an animal destroys the evidence of a crime committed by a human.
In a peculiar incident in Rajasthan, a monkey fled away with the evidence collected by the police in a murder case. The stolen evidence included the murder weapon (a blood-stained knife).
The incident came to light when the police appeared before the court and they had to provide the evidence in the hearing.
The hearing was about the crime which took place in September 2016, in which a person named Shashikant Sharma died at a primary health center under Chandwaji police station. After the body was found, the deceased’s relatives blocked the Jaipur-Delhi highway, demanding an inquiry into the matter.
Following the investigation, the police had arrested Rahul Kandera and Mohanlal Kandera, residents of Chandwaji in relation to the murder. But, when the time came to produce the evidence related to the case, it was found that the police had no evidence with them because a monkey had stolen it from them.
In the court, the police said that the knife, which was the primary evidence, was also taken by the monkey. The cops informed that the evidence of the case was kept in a bag, which was being taken to the court.
The evidence bag contained the knife and 15 other important evidences. However, due to the lack of space in the malkhana, a bag full of evidence was kept under a tree, which led to the incident.
|
english
|
<div class="projects-list">
{% for page in pages.portfolio %}
<article>
<div class="box">
{% if page.project_image_small %}
<img src="{{ base_url }}/uploads/portfolio/{{ page.project_image_small }}" alt="{{ page.title }}"/>
{% endif %}
<div class="details">
<h3>{{ page.title }}</h3>
<time datetime="2009-11-13">{{ page.project_date|date("F Y") }}</time>
<div class="company">
{% if page.project_company %}
Working at {{ page.project_company}}
{% else %}
{% endif %}
</div>
</div>
<div class="more">
<a href="{{ page.url }}" class="icon">View</a>
</div>
</div>
</article>
{% endfor %}
</div>
|
html
|
<reponame>unfoldingWord-box3/lexicon-poc
{
"brief": "I furnish with additions",
"long": "I make an additional testamentary disposition, I furnish with additions."
}
|
json
|
Star Studios and Cine1 Studios’ edge-of-the-seat survival thriller Apurva is all set to release from 15th November onwards on Disney+ Hotstar. Directed by Nikhil Nagesh Bhat, the film stars an ensemble cast of Tara Sutaria, Abhishek Banerjee, Dhairya Karwa and Rajpal Yadav who have united to showcase one of the most powerful stories of good over evil onscreen. The team unveiled the intriguing first look and announced the release date amidst huge crowds and tremendous fanfare at the prestigious Lav Kush Ramlila Ground at Red Fort, Delhi - the first of its kind launch that has never taken place for an Indian film!
Apurva is the story of an ordinary girl who faces extraordinary circumstances and will do anything to Survive and Live. Set in one of the most dangerous places in India – Chambal, the movie is presented by some of India’s leading creative powerhouses who have come together for this gritty thriller.
Abhishek Banerjee adds, "My character in Apurva is perhaps one of the most menacing and fearsome ones that I have portrayed so far. The powerful script instantly appealed to me when I first heard it, and I can't wait for the audience to watch the trailer, which will be launched very soon and thereafter the film’s release from 15th November onwards on Disney+ Hotstar."
Rajpal Yadav whose dramatic new look has struck a lot of intrigue says, "Audiences will see me in a very different and unusual avatar in Apurva which will be revealed when our trailer launches very soon. This is just the first glimpse, and I am looking forward to audiences watching Apurva from 15th November onwards on Disney+ Hotstar."
Catch us for latest Bollywood News, New Bollywood Movies update, Box office collection, New Movies Release , Bollywood News Hindi, Entertainment News, Bollywood Live News Today & Upcoming Movies 2024 and stay updated with latest hindi movies only on Bollywood Hungama.
|
english
|
package com.cmput301.penguindive;
import junit.framework.TestCase;
import org.junit.Assert;
public class QuestionTest extends TestCase {
public void testGetQuestion() {
Question ques = new Question("Question", "ID","Title","123");
String result = ques.getQuestion();
Assert.assertEquals("Question",result);
}
public void testSetQuestion() {
Question ques = new Question("Question", "ID","Title","1234");
ques.setQuestion("newQ");
Assert.assertEquals("newQ",ques.getQuestion());
}
public void testGetQuestionId() {
Question ques = new Question("Question", "ID","Title","1234");
String result = ques.getQuestionId();
Assert.assertEquals("ID",result);
}
public void testSetQuestionId() {
Question ques = new Question("Question", "ID","Title","1234");
ques.setQuestionId("newId");
Assert.assertEquals("newId",ques.getQuestionId());
}
public void testGetQuestionTitle() {
Question ques = new Question("Question", "ID","Title","1234");
String result = ques.getQuestionTitle();
Assert.assertEquals("Title",result);
}
public void testSetQuestionTitle() {
Question ques = new Question("Question", "ID","Title","1234");
ques.setQuestionTitle("newTitle");
Assert.assertEquals("newTitle",ques.getQuestionTitle());
}
public void testGetQuestionUserId(){
Question ques = new Question("Question", "ID","Title","1234");
String result = ques.getQuestionUserId();
Assert.assertEquals("1234",result);
}
public void testSetQuestionUserId() {
Question ques = new Question("Question", "ID","Title","1234");
ques.setQuestion_user_id("1234");
Assert.assertEquals("1234",ques.getQuestionUserId());
}
}
|
java
|
The German Consulate had informed the state police chief of the missing woman, named Liza, 31, after her mother in Germany approached them saying there is no word from her.
By Indo-Asian News Service: Kerala Police have begun an investigation to trace a German woman tourist, who had come to the state in March, after a complaint from her family that they had not heard from her, a police official said.
Pradeep, a Sub Inspector of Police at the Valiyathura police station, under which the Thiruvananthapuram airport comes, said that police have registered a case and begun their probe.
According to the police, the German Consulate had informed the state police chief of the missing woman, named Liza, 31, after her mother in Germany approached them saying there is no word from her.
Liza arrived at the airport here on March 7 and according to her disclosure in the arrival form, she was to head to the ashram of 'hugging saint' Amrithananda Mayi near Kollam, about 80 km from here.
But the police probe revealed that she has not reached there and she was last seen leaving the airport on a two-wheeler.
The police had got information that her friend Mohammed Ali, a British passport holder, was with her, but also found that he had departed from the Cochin airport on March 15.
|
english
|
<gh_stars>1-10
{% extends "layout.html" %}
{% block pageTitle %}
Check your answers: changes to workplace – Access to Work – GOV.UK
{% endblock %}
{% block beforeContent %}
<a class="govuk-back-link" href="/alpha-apply-1f/1f-workplace-adaptations-do-you-know-what-you-need">Back</a>
{% endblock %}
{% block content %}
<h1 class="govuk-heading-l">Check your answers</h1>
{% include "alpha-apply-1f/1f-workplace-adaptations-check-your-answers-body.html" %}
<form class="form" action="/alpha-apply-1f/1f-task-list" method="post">
<input type="hidden" name="workplace-adaptations-check-your-answers" value="true">
<button type="submit" class="govuk-button" data-module="govuk-button">
Confirm and save
</button>
</form>
{% endblock %}
|
html
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const UpvotePost_1 = require("./UpvotePost");
const repos_1 = require("../../../repos");
const services_1 = require("../../../domain/services");
const UpvotePostController_1 = require("./UpvotePostController");
const upvotePost = new UpvotePost_1.UpvotePost(repos_1.memberRepo, repos_1.postRepo, repos_1.postVotesRepo, services_1.postService);
exports.upvotePost = upvotePost;
const upvotePostController = new UpvotePostController_1.UpvotePostController(upvotePost);
exports.upvotePostController = upvotePostController;
//# sourceMappingURL=index.js.map
|
javascript
|
<gh_stars>0
{
"license": "SEE LICENSE IN ../LICENSE",
"dependencies": {
"normalize-scss": "^7.0.1"
}
}
|
json
|
//
// RenderSystem.cpp
// TinyEngine
//
// Created by <NAME> on 11/4/19.
// Copyright © 2019 0xfede. All rights reserved.
//
#include "RenderSystem.hpp"
#include "../World.hpp"
#include "../../Core/Utils.hpp"
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <stdio.h>
#include <regex>
#include <fstream>
#include <glm/gtc/matrix_transform.hpp>
#ifndef STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#endif
#include "stb_image.h"
using std::regex;
using std::smatch;
using std::ifstream;
//static void checkGLError() {
// uint32_t e;
//
// while(!(e = glGetError()) ){
// std::cout << "[Render System]: Error (GL): " << e << std::endl;
// }
//}
//static mat4 P = mat4{1};
static mat4 P = mat4{1};
template <class T>
static vector<T> toValVec(const vector<ShaderParam>& pVals) {
vector<T> v;
for (auto& pVal : pVals) {
v.emplace_back(pVal.get<T>());
}
return v;
}
static void checkShaderStatus(GLuint id) {
GLint ok;
GLchar info[1024];
glGetShaderiv(id, GL_COMPILE_STATUS, &ok);
if (!ok) {
glGetShaderInfoLog(id, 1024, NULL, info);
std::cout << "[Render System]: Error: " << info << std::endl;
assert(ok);
}
}
static void checkProgramStatus(GLuint id) {
GLint ok;
GLchar info[1024];
glGetProgramiv(id, GL_LINK_STATUS, &ok);
if (!ok) {
glGetProgramInfoLog(id, 1024, NULL, info);
std::cout << "[Render System]: Error: " << info << std::endl;
assert(ok);
}
}
static void onGLFWError(int error, const char* description) {
std::cout << "[Render System]: Error " << error << " : " << description << std::endl;
}
static void onGLFWBufferResize(GLFWwindow* window, int w, int h) {
glViewport(0, 0, w, h);
P = mat4{
2./w, 0., 0., 0.,
0., 2./h, 0., 0.,
0., 0., 2., 0.,
-1., -1., -1, 1.
};
}
void RenderSystem::initVertexBuffers() {
float v[] = {
-1, -1, 0, 0, 0,
+1, -1, 0, 1, 0,
+1, +1, 0, 1, 1,
-1, +1, 0, 0, 1,
};
uint32_t i[] = {
0, 1, 2, // tri 1
2, 3, 0 // tri 2
};
uint32_t BuffAttributes, BuffIndices;
glGenVertexArrays(1, &quadVao);
glGenBuffers(1, &BuffAttributes);
glGenBuffers(1, &BuffIndices);
glGenBuffers(1, &BuffWTransform);
glGenBuffers(1, &BuffTXOffset);
glBindVertexArray(quadVao);
glBindBuffer(GL_ARRAY_BUFFER, BuffAttributes);
glBufferData(GL_ARRAY_BUFFER, sizeof(v), v, GL_STATIC_DRAW);
glEnableVertexAttribArray(AttrPositions);
glVertexAttribPointer(AttrPositions, 3, GL_FLOAT, GL_FALSE, sizeof(float) * 5, nullptr);
glEnableVertexAttribArray(AttrTXCoords);
glVertexAttribPointer(AttrTXCoords, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 5, (void*)(sizeof(float)*3));
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, BuffIndices);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(i), i, GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, BuffTXOffset);
glEnableVertexAttribArray(AttrTXOffset);
glVertexAttribPointer(AttrTXOffset, 2, GL_FLOAT, GL_FALSE, sizeof(vec2), nullptr);
glVertexAttribDivisor(AttrTXOffset, 1);
glBindBuffer(GL_ARRAY_BUFFER, BuffWTransform);
for (int i = 0; i < 4 ; i++) {
glEnableVertexAttribArray(AttrWTransform + i);
glVertexAttribPointer(AttrWTransform + i, 4, GL_FLOAT, GL_FALSE, sizeof(mat4), (void*)(sizeof(float)*i*4));
glVertexAttribDivisor(AttrWTransform + i, 1);
}
glBindVertexArray(0);
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
size_t RenderSystem::loadShaderProgram(const string& path) {
unordered_map<string, string> source;
std::ifstream f(path);
assert(!f.fail());
string regexStr;
for (auto& [stageName, ignore] : programStages) {
regexStr += !regexStr.size() ? "(" + stageName : "|" + stageName;
}
regexStr += ")";
regex start(regexStr);
string activeStage;
smatch result;
string temp;
while(f.good()) {
getline(f, temp);
if (regex_search(temp, result, start)) {
activeStage = result[0].str();
continue;
}
source[activeStage] += temp += '\n';
}
uint32_t pid = glCreateProgram();
vector<uint32_t> sids;
uint32_t sid;
for (auto& [stageName, stageSource] : source) {
if (stageSource.size()) {
sids.push_back(glCreateShader(programStages[stageName]));
sid = sids.back();
const char* const src = stageSource.c_str();
glShaderSource(sid, 1, &src, nullptr);
glCompileShader(sid);
checkShaderStatus(sid);
glAttachShader(pid, sid);
}
}
glLinkProgram(pid);
checkProgramStatus(pid);
for (auto sid : sids) {
glDetachShader(pid, sid);
glDeleteShader(sid);
}
programs[programCounter] = pid;
return programCounter++;
}
size_t RenderSystem::createAtlas(uint32_t size, uint32_t cellSize) {
TXAtlas a {.dim = size/cellSize, .cellSize = cellSize};
a.grid = vector<uint8_t>((size*size)/cellSize);
glGenTextures(1, &a.id);
glBindTexture(GL_TEXTURE_2D, a.id);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
glBindTexture(GL_TEXTURE_2D, 0);
atlases.emplace(atlasCounter, a);
return atlasCounter++;
}
size_t RenderSystem::loadTexture(const string& path, size_t atlas) {
int w, h, channels;
stbi_set_flip_vertically_on_load(true);
uint8_t* data = stbi_load(path.c_str(), &w, &h, &channels, 4);
auto& a = atlases[atlas];
// w = ceil((float)w/a.cellSize);
// h = ceil((float)h/a.cellSize);
int i_ = 0, j_ = 0;
bool done = false;
for (int i = 0; i < a.dim; i++) {
if (done) {
break;
}
for (int j = 0; j < a.dim; j++) {
if (a.grid[i*a.dim+j] == 0) {
a.grid[i*a.dim+j] = 1;
i_ = i;
j_ = j;
done = true;
break;
}
}
}
glBindTexture(GL_TEXTURE_2D, a.id);
glTexSubImage2D(GL_TEXTURE_2D, 0, i_ * w, j_ * h, w, h, GL_RGBA, GL_UNSIGNED_BYTE, data);
glBindTexture(GL_TEXTURE_2D, 0);
free(data);
textures.emplace(textureCounter, Texture{atlas, {i_, j_}});
return textureCounter++;
}
void RenderSystem::init() {
programStages = {
{"VERTEX_STAGE", GL_VERTEX_SHADER},
{"FRAGMENT_STAGE", GL_FRAGMENT_SHADER},
};
glfwSetErrorCallback(onGLFWError);
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
win = glfwCreateWindow(640, 480, "", NULL, NULL);
glfwSetInputMode(win, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
glfwSetFramebufferSizeCallback(win, onGLFWBufferResize);
glfwMakeContextCurrent(win);
printf("[Render System]: GL Version: %s\n", glGetString(GL_VERSION));
glfwSwapInterval(0);
glClearColor(0, 0, 0, 1);
glEnable(GL_DEPTH_TEST);
glewExperimental = true;
glewInit();
initVertexBuffers();
int w, h;
glfwGetFramebufferSize(win, &w, &h);
glViewport(0, 0, w, h);
P = mat4{
2./w, 0., 0., 0.,
0., 2./h, 0., 0.,
0., 0., 2., 0.,
-1., -1., -1, 1.
};
}
void RenderSystem::query(World *world) {
auto& S = world->comp.shader;
auto& T = world->comp.transform;
if (!S.hasChanges && !T.hasChanges) {
return;
}
sortedSprites.clear();
for (auto& [eid, cid] : S.eid2cidMap()) {
auto found = T.eid2cidMap().find(eid);
if (found != T.eid2cidMap().end()) {
sortedSprites.emplace_back(cid, found->second);
}
}
std::sort(sortedSprites.begin(), sortedSprites.end(), [&S](auto&& s1, auto&& s2) {
return S[s1.first].program < S[s2.first].program;
});
}
void RenderSystem::submitParams(uint32_t pid, const unordered_map<string, vector<ShaderParam>>& params) {
for (auto& [pName, pVals] : params) {
int32_t uid = glGetUniformLocation(pid, pName.c_str());
if (uid == -1) {
continue;
}
if (pVals[0].holds<size_t>()) {
glActiveTexture(GL_TEXTURE0);
size_t tid = pVals[0].get<size_t>();
auto a = atlases[textures[tid].atlas];
glBindTexture(GL_TEXTURE_2D, a.id);
glUniform1i(uid, 0);
}
else if (pVals[0].holds<float>()) {
auto vals = toValVec<float>(pVals);
glUniform1fv(uid, vals.size(), (GLfloat*)&vals[0]);
}
else if (pVals[0].holds<vec2>()) {
auto vals = toValVec<vec2>(pVals);
glUniform2fv(uid, vals.size(), (GLfloat*)&vals[0]);
}
else if (pVals[0].holds<vec3>()) {
auto vals = toValVec<vec3>(pVals);
glUniform3fv(uid, vals.size(), (GLfloat*)&vals[0]);
}
else if (pVals[0].holds<vec4>()) {
auto vals = toValVec<vec4>(pVals);
glUniform4fv(uid, vals.size(), (GLfloat*)&vals[0]);
}
else if (pVals[0].holds<mat3>()) {
auto vals = toValVec<mat3>(pVals);
glUniformMatrix3fv(uid, vals.size(), GL_FALSE, (GLfloat*)&vals[0]);
}
else if (pVals[0].holds<mat4>()) {
auto vals = toValVec<mat4>(pVals);
glUniformMatrix4fv(uid, vals.size(), GL_FALSE, (GLfloat*)&vals[0]);
}
}
}
void RenderSystem::tick(World* world) {
auto& S = world->comp.shader;
auto& T = world->comp.transform;
uint32_t currentProgram = -1;
vector<mat4> M;
vector<vec2> O;
unordered_map<string, vector<ShaderParam>> params;
size_t batchCount = 0;
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
glBindVertexArray(quadVao);
for (auto& [sid, tid] : sortedSprites) {
M.emplace_back(P*T[tid].M);
auto& shader = S[sid];
auto t = shader.params["sprite"].get<size_t>();
O.emplace_back(textures[t].origin);
for (auto& [name, val] : shader.params) {
params[name].push_back(val);
}
batchCount += 1;
if (batchCount == batchSize ||
batchCount == sortedSprites.size()) {
glBindBuffer(GL_ARRAY_BUFFER, BuffWTransform);
glBufferData(GL_ARRAY_BUFFER, sizeof(mat4) * M.size(), &M[0][0], GL_DYNAMIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, BuffTXOffset);
glBufferData(GL_ARRAY_BUFFER, sizeof(vec2) * O.size(), &O[0][0], GL_DYNAMIC_DRAW);
currentProgram = currentProgram == -1 ? programs[shader.program] : currentProgram;
glUseProgram(currentProgram);
submitParams(currentProgram, params);
glDrawElementsInstanced(GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0, batchCount);
batchCount = 0;
currentProgram = programs[shader.program];
}
}
glUseProgram(0);
glBindVertexArray(0);
glfwSwapBuffers(win);
glfwPollEvents();
}
|
cpp
|
<filename>views/archive/j/box2d-car-game/js/box2d/dynamics/contacts/b2ContactSolver.js
/*
* Copyright (c) 2006-2007 <NAME> http:
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked, and must not be
* misrepresented the original software.
* 3. This notice may not be removed or altered from any source distribution.
*/
var b2ContactSolver = Class.create();
b2ContactSolver.prototype =
{
initialize: function(contacts, contactCount, allocator){
// initialize instance variables for references
this.m_constraints = new Array();
//
this.m_allocator = allocator;
var i = 0;
var tVec;
var tMat;
this.m_constraintCount = 0;
for (i = 0; i < contactCount; ++i)
{
this.m_constraintCount += contacts[i].GetManifoldCount();
}
// fill array
for (i = 0; i < this.m_constraintCount; i++){
this.m_constraints[i] = new b2ContactConstraint();
}
var count = 0;
for (i = 0; i < contactCount; ++i)
{
var contact = contacts[i];
var b1 = contact.m_shape1.m_body;
var b2 = contact.m_shape2.m_body;
var manifoldCount = contact.GetManifoldCount();
var manifolds = contact.GetManifolds();
var friction = contact.m_friction;
var restitution = contact.m_restitution;
//var v1 = b1.m_linearVelocity.Copy();
var v1X = b1.m_linearVelocity.x;
var v1Y = b1.m_linearVelocity.y;
//var v2 = b2.m_linearVelocity.Copy();
var v2X = b2.m_linearVelocity.x;
var v2Y = b2.m_linearVelocity.y;
var w1 = b1.m_angularVelocity;
var w2 = b2.m_angularVelocity;
for (var j = 0; j < manifoldCount; ++j)
{
var manifold = manifolds[ j ];
//b2Settings.b2Assert(manifold.pointCount > 0);
//var normal = manifold.normal.Copy();
var normalX = manifold.normal.x;
var normalY = manifold.normal.y;
//b2Settings.b2Assert(count < this.m_constraintCount);
var c = this.m_constraints[ count ];
c.body1 = b1;
c.body2 = b2;
c.manifold = manifold;
//c.normal = normal;
c.normal.x = normalX;
c.normal.y = normalY;
c.pointCount = manifold.pointCount;
c.friction = friction;
c.restitution = restitution;
for (var k = 0; k < c.pointCount; ++k)
{
var cp = manifold.points[ k ];
var ccp = c.points[ k ];
ccp.normalImpulse = cp.normalImpulse;
ccp.tangentImpulse = cp.tangentImpulse;
ccp.separation = cp.separation;
//var r1 = b2Math.SubtractVV( cp.position, b1.m_position );
var r1X = cp.position.x - b1.m_position.x;
var r1Y = cp.position.y - b1.m_position.y;
//var r2 = b2Math.SubtractVV( cp.position, b2.m_position );
var r2X = cp.position.x - b2.m_position.x;
var r2Y = cp.position.y - b2.m_position.y;
//ccp.localAnchor1 = b2Math.b2MulTMV(b1.m_R, r1);
tVec = ccp.localAnchor1;
tMat = b1.m_R;
tVec.x = r1X * tMat.col1.x + r1Y * tMat.col1.y;
tVec.y = r1X * tMat.col2.x + r1Y * tMat.col2.y;
//ccp.localAnchor2 = b2Math.b2MulTMV(b2.m_R, r2);
tVec = ccp.localAnchor2;
tMat = b2.m_R;
tVec.x = r2X * tMat.col1.x + r2Y * tMat.col1.y;
tVec.y = r2X * tMat.col2.x + r2Y * tMat.col2.y;
var r1Sqr = r1X * r1X + r1Y * r1Y;
var r2Sqr = r2X * r2X + r2Y * r2Y;
//var rn1 = b2Math.b2Dot(r1, normal);
var rn1 = r1X*normalX + r1Y*normalY;
//var rn2 = b2Math.b2Dot(r2, normal);
var rn2 = r2X*normalX + r2Y*normalY;
var kNormal = b1.m_invMass + b2.m_invMass;
kNormal += b1.m_invI * (r1Sqr - rn1 * rn1) + b2.m_invI * (r2Sqr - rn2 * rn2);
//b2Settings.b2Assert(kNormal > Number.MIN_VALUE);
ccp.normalMass = 1.0 / kNormal;
//var tangent = b2Math.b2CrossVF(normal, 1.0);
var tangentX = normalY
var tangentY = -normalX;
//var rt1 = b2Math.b2Dot(r1, tangent);
var rt1 = r1X*tangentX + r1Y*tangentY;
//var rt2 = b2Math.b2Dot(r2, tangent);
var rt2 = r2X*tangentX + r2Y*tangentY;
var kTangent = b1.m_invMass + b2.m_invMass;
kTangent += b1.m_invI * (r1Sqr - rt1 * rt1) + b2.m_invI * (r2Sqr - rt2 * rt2);
//b2Settings.b2Assert(kTangent > Number.MIN_VALUE);
ccp.tangentMass = 1.0 / kTangent;
// Setup a velocity bias for restitution.
ccp.velocityBias = 0.0;
if (ccp.separation > 0.0)
{
ccp.velocityBias = -60.0 * ccp.separation;
}
//var vRel = b2Math.b2Dot(c.normal, b2Math.SubtractVV( b2Math.SubtractVV( b2Math.AddVV( v2, b2Math.b2CrossFV(w2, r2)), v1 ), b2Math.b2CrossFV(w1, r1)));
var tX = v2X + (-w2*r2Y) - v1X - (-w1*r1Y);
var tY = v2Y + (w2*r2X) - v1Y - (w1*r1X);
//var vRel = b2Dot(c.normal, tX/Y);
var vRel = c.normal.x*tX + c.normal.y*tY;
if (vRel < -b2Settings.b2_velocityThreshold)
{
ccp.velocityBias += -c.restitution * vRel;
}
}
++count;
}
}
//b2Settings.b2Assert(count == this.m_constraintCount);
},
//~b2ContactSolver();
PreSolve: function(){
var tVec;
var tVec2;
var tMat;
// Warm start.
for (var i = 0; i < this.m_constraintCount; ++i)
{
var c = this.m_constraints[ i ];
var b1 = c.body1;
var b2 = c.body2;
var invMass1 = b1.m_invMass;
var invI1 = b1.m_invI;
var invMass2 = b2.m_invMass;
var invI2 = b2.m_invI;
//var normal = new b2Vec2(c.normal.x, c.normal.y);
var normalX = c.normal.x;
var normalY = c.normal.y;
//var tangent = b2Math.b2CrossVF(normal, 1.0);
var tangentX = normalY;
var tangentY = -normalX;
var j = 0;
var tCount = 0;
if (b2World.s_enableWarmStarting)
{
tCount = c.pointCount;
for (j = 0; j < tCount; ++j)
{
var ccp = c.points[ j ];
//var P = b2Math.AddVV( b2Math.MulFV(ccp.normalImpulse, normal), b2Math.MulFV(ccp.tangentImpulse, tangent));
var PX = ccp.normalImpulse*normalX + ccp.tangentImpulse*tangentX;
var PY = ccp.normalImpulse*normalY + ccp.tangentImpulse*tangentY;
//var r1 = b2Math.b2MulMV(b1.m_R, ccp.localAnchor1);
tMat = b1.m_R;
tVec = ccp.localAnchor1;
var r1X = tMat.col1.x * tVec.x + tMat.col2.x * tVec.y;
var r1Y = tMat.col1.y * tVec.x + tMat.col2.y * tVec.y;
//var r2 = b2Math.b2MulMV(b2.m_R, ccp.localAnchor2);
tMat = b2.m_R;
tVec = ccp.localAnchor2;
var r2X = tMat.col1.x * tVec.x + tMat.col2.x * tVec.y;
var r2Y = tMat.col1.y * tVec.x + tMat.col2.y * tVec.y;
//b1.m_angularVelocity -= invI1 * b2Math.b2CrossVV(r1, P);
b1.m_angularVelocity -= invI1 * (r1X * PY - r1Y * PX);
//b1.m_linearVelocity.Subtract( b2Math.MulFV(invMass1, P) );
b1.m_linearVelocity.x -= invMass1 * PX;
b1.m_linearVelocity.y -= invMass1 * PY;
//b2.m_angularVelocity += invI2 * b2Math.b2CrossVV(r2, P);
b2.m_angularVelocity += invI2 * (r2X * PY - r2Y * PX);
//b2.m_linearVelocity.Add( b2Math.MulFV(invMass2, P) );
b2.m_linearVelocity.x += invMass2 * PX;
b2.m_linearVelocity.y += invMass2 * PY;
ccp.positionImpulse = 0.0;
}
}
else{
tCount = c.pointCount;
for (j = 0; j < tCount; ++j)
{
var ccp2 = c.points[ j ];
ccp2.normalImpulse = 0.0;
ccp2.tangentImpulse = 0.0;
ccp2.positionImpulse = 0.0;
}
}
}
},
SolveVelocityConstraints: function(){
var j = 0;
var ccp;
var r1X;
var r1Y;
var r2X;
var r2Y;
var dvX;
var dvY;
var lambda;
var newImpulse;
var PX;
var PY;
var tMat;
var tVec;
for (var i = 0; i < this.m_constraintCount; ++i)
{
var c = this.m_constraints[ i ];
var b1 = c.body1;
var b2 = c.body2;
var b1_angularVelocity = b1.m_angularVelocity;
var b1_linearVelocity = b1.m_linearVelocity;
var b2_angularVelocity = b2.m_angularVelocity;
var b2_linearVelocity = b2.m_linearVelocity;
var invMass1 = b1.m_invMass;
var invI1 = b1.m_invI;
var invMass2 = b2.m_invMass;
var invI2 = b2.m_invI;
//var normal = new b2Vec2(c.normal.x, c.normal.y);
var normalX = c.normal.x;
var normalY = c.normal.y;
//var tangent = b2Math.b2CrossVF(normal, 1.0);
var tangentX = normalY;
var tangentY = -normalX;
// Solver normal constraints
var tCount = c.pointCount;
for (j = 0; j < tCount; ++j)
{
ccp = c.points[ j ];
//r1 = b2Math.b2MulMV(b1.m_R, ccp.localAnchor1);
tMat = b1.m_R;
tVec = ccp.localAnchor1;
r1X = tMat.col1.x * tVec.x + tMat.col2.x * tVec.y
r1Y = tMat.col1.y * tVec.x + tMat.col2.y * tVec.y
//r2 = b2Math.b2MulMV(b2.m_R, ccp.localAnchor2);
tMat = b2.m_R;
tVec = ccp.localAnchor2;
r2X = tMat.col1.x * tVec.x + tMat.col2.x * tVec.y
r2Y = tMat.col1.y * tVec.x + tMat.col2.y * tVec.y
// Relative velocity at contact
//var dv = b2Math.SubtractVV( b2Math.AddVV( b2.m_linearVelocity, b2Math.b2CrossFV(b2.m_angularVelocity, r2)), b2Math.SubtractVV(b1.m_linearVelocity, b2Math.b2CrossFV(b1.m_angularVelocity, r1)));
//dv = b2Math.SubtractVV(b2Math.SubtractVV( b2Math.AddVV( b2.m_linearVelocity, b2Math.b2CrossFV(b2.m_angularVelocity, r2)), b1.m_linearVelocity), b2Math.b2CrossFV(b1.m_angularVelocity, r1));
dvX = b2_linearVelocity.x + (-b2_angularVelocity * r2Y) - b1_linearVelocity.x - (-b1_angularVelocity * r1Y);
dvY = b2_linearVelocity.y + (b2_angularVelocity * r2X) - b1_linearVelocity.y - (b1_angularVelocity * r1X);
// Compute normal impulse
//var vn = b2Math.b2Dot(dv, normal);
var vn = dvX * normalX + dvY * normalY;
lambda = -ccp.normalMass * (vn - ccp.velocityBias);
// b2Clamp the accumulated impulse
newImpulse = b2Math.b2Max(ccp.normalImpulse + lambda, 0.0);
lambda = newImpulse - ccp.normalImpulse;
// Apply contact impulse
//P = b2Math.MulFV(lambda, normal);
PX = lambda * normalX;
PY = lambda * normalY;
//b1.m_linearVelocity.Subtract( b2Math.MulFV( invMass1, P ) );
b1_linearVelocity.x -= invMass1 * PX;
b1_linearVelocity.y -= invMass1 * PY;
b1_angularVelocity -= invI1 * (r1X * PY - r1Y * PX);
//b2.m_linearVelocity.Add( b2Math.MulFV( invMass2, P ) );
b2_linearVelocity.x += invMass2 * PX;
b2_linearVelocity.y += invMass2 * PY;
b2_angularVelocity += invI2 * (r2X * PY - r2Y * PX);
ccp.normalImpulse = newImpulse;
// MOVED FROM BELOW
// Relative velocity at contact
//var dv = b2.m_linearVelocity + b2Cross(b2.m_angularVelocity, r2) - b1.m_linearVelocity - b2Cross(b1.m_angularVelocity, r1);
//dv = b2Math.SubtractVV(b2Math.SubtractVV(b2Math.AddVV(b2.m_linearVelocity, b2Math.b2CrossFV(b2.m_angularVelocity, r2)), b1.m_linearVelocity), b2Math.b2CrossFV(b1.m_angularVelocity, r1));
dvX = b2_linearVelocity.x + (-b2_angularVelocity * r2Y) - b1_linearVelocity.x - (-b1_angularVelocity * r1Y);
dvY = b2_linearVelocity.y + (b2_angularVelocity * r2X) - b1_linearVelocity.y - (b1_angularVelocity * r1X);
// Compute tangent impulse
var vt = dvX*tangentX + dvY*tangentY;
lambda = ccp.tangentMass * (-vt);
// b2Clamp the accumulated impulse
var maxFriction = c.friction * ccp.normalImpulse;
newImpulse = b2Math.b2Clamp(ccp.tangentImpulse + lambda, -maxFriction, maxFriction);
lambda = newImpulse - ccp.tangentImpulse;
// Apply contact impulse
//P = b2Math.MulFV(lambda, tangent);
PX = lambda * tangentX;
PY = lambda * tangentY;
//b1.m_linearVelocity.Subtract( b2Math.MulFV( invMass1, P ) );
b1_linearVelocity.x -= invMass1 * PX;
b1_linearVelocity.y -= invMass1 * PY;
b1_angularVelocity -= invI1 * (r1X * PY - r1Y * PX);
//b2.m_linearVelocity.Add( b2Math.MulFV( invMass2, P ) );
b2_linearVelocity.x += invMass2 * PX;
b2_linearVelocity.y += invMass2 * PY;
b2_angularVelocity += invI2 * (r2X * PY - r2Y * PX);
ccp.tangentImpulse = newImpulse;
}
// Solver tangent constraints
// MOVED ABOVE FOR EFFICIENCY
/*for (j = 0; j < tCount; ++j)
{
ccp = c.points[ j ];
//r1 = b2Math.b2MulMV(b1.m_R, ccp.localAnchor1);
tMat = b1.m_R;
tVec = ccp.localAnchor1;
r1X = tMat.col1.x * tVec.x + tMat.col2.x * tVec.y
r1Y = tMat.col1.y * tVec.x + tMat.col2.y * tVec.y
//r2 = b2Math.b2MulMV(b2.m_R, ccp.localAnchor2);
tMat = b2.m_R;
tVec = ccp.localAnchor2;
r2X = tMat.col1.x * tVec.x + tMat.col2.x * tVec.y
r2Y = tMat.col1.y * tVec.x + tMat.col2.y * tVec.y
// Relative velocity at contact
//var dv = b2.m_linearVelocity + b2Cross(b2.m_angularVelocity, r2) - b1.m_linearVelocity - b2Cross(b1.m_angularVelocity, r1);
//dv = b2Math.SubtractVV(b2Math.SubtractVV(b2Math.AddVV(b2.m_linearVelocity, b2Math.b2CrossFV(b2.m_angularVelocity, r2)), b1.m_linearVelocity), b2Math.b2CrossFV(b1.m_angularVelocity, r1));
dvX = b2_linearVelocity.x + (-b2_angularVelocity * r2Y) - b1_linearVelocity.x - (-b1_angularVelocity * r1Y);
dvY = b2_linearVelocity.y + (b2_angularVelocity * r2X) - b1_linearVelocity.y - (b1_angularVelocity * r1X);
// Compute tangent impulse
var vt = dvX*tangentX + dvY*tangentY;
lambda = ccp.tangentMass * (-vt);
// b2Clamp the accumulated impulse
var maxFriction = c.friction * ccp.normalImpulse;
newImpulse = b2Math.b2Clamp(ccp.tangentImpulse + lambda, -maxFriction, maxFriction);
lambda = newImpulse - ccp.tangentImpulse;
// Apply contact impulse
//P = b2Math.MulFV(lambda, tangent);
PX = lambda * tangentX;
PY = lambda * tangentY;
//b1.m_linearVelocity.Subtract( b2Math.MulFV( invMass1, P ) );
b1_linearVelocity.x -= invMass1 * PX;
b1_linearVelocity.y -= invMass1 * PY;
b1_angularVelocity -= invI1 * (r1X * PY - r1Y * PX);
//b2.m_linearVelocity.Add( b2Math.MulFV( invMass2, P ) );
b2_linearVelocity.x += invMass2 * PX;
b2_linearVelocity.y += invMass2 * PY;
b2_angularVelocity += invI2 * (r2X * PY - r2Y * PX);
ccp.tangentImpulse = newImpulse;
}*/
// Update angular velocity
b1.m_angularVelocity = b1_angularVelocity;
b2.m_angularVelocity = b2_angularVelocity;
}
},
SolvePositionConstraints: function(beta){
var minSeparation = 0.0;
var tMat;
var tVec;
for (var i = 0; i < this.m_constraintCount; ++i)
{
var c = this.m_constraints[ i ];
var b1 = c.body1;
var b2 = c.body2;
var b1_position = b1.m_position;
var b1_rotation = b1.m_rotation;
var b2_position = b2.m_position;
var b2_rotation = b2.m_rotation;
var invMass1 = b1.m_invMass;
var invI1 = b1.m_invI;
var invMass2 = b2.m_invMass;
var invI2 = b2.m_invI;
//var normal = new b2Vec2(c.normal.x, c.normal.y);
var normalX = c.normal.x;
var normalY = c.normal.y;
//var tangent = b2Math.b2CrossVF(normal, 1.0);
var tangentX = normalY;
var tangentY = -normalX;
// Solver normal constraints
var tCount = c.pointCount;
for (var j = 0; j < tCount; ++j)
{
var ccp = c.points[ j ];
//r1 = b2Math.b2MulMV(b1.m_R, ccp.localAnchor1);
tMat = b1.m_R;
tVec = ccp.localAnchor1;
var r1X = tMat.col1.x * tVec.x + tMat.col2.x * tVec.y
var r1Y = tMat.col1.y * tVec.x + tMat.col2.y * tVec.y
//r2 = b2Math.b2MulMV(b2.m_R, ccp.localAnchor2);
tMat = b2.m_R;
tVec = ccp.localAnchor2;
var r2X = tMat.col1.x * tVec.x + tMat.col2.x * tVec.y
var r2Y = tMat.col1.y * tVec.x + tMat.col2.y * tVec.y
//var p1 = b2Math.AddVV(b1.m_position, r1);
var p1X = b1_position.x + r1X;
var p1Y = b1_position.y + r1Y;
//var p2 = b2Math.AddVV(b2.m_position, r2);
var p2X = b2_position.x + r2X;
var p2Y = b2_position.y + r2Y;
//var dp = b2Math.SubtractVV(p2, p1);
var dpX = p2X - p1X;
var dpY = p2Y - p1Y;
// Approximate the current separation.
//var separation = b2Math.b2Dot(dp, normal) + ccp.separation;
var separation = (dpX*normalX + dpY*normalY) + ccp.separation;
// Track max constraint error.
minSeparation = b2Math.b2Min(minSeparation, separation);
// Prevent large corrections and allow slop.
var C = beta * b2Math.b2Clamp(separation + b2Settings.b2_linearSlop, -b2Settings.b2_maxLinearCorrection, 0.0);
// Compute normal impulse
var dImpulse = -ccp.normalMass * C;
// b2Clamp the accumulated impulse
var impulse0 = ccp.positionImpulse;
ccp.positionImpulse = b2Math.b2Max(impulse0 + dImpulse, 0.0);
dImpulse = ccp.positionImpulse - impulse0;
//var impulse = b2Math.MulFV( dImpulse, normal );
var impulseX = dImpulse * normalX;
var impulseY = dImpulse * normalY;
//b1.m_position.Subtract( b2Math.MulFV( invMass1, impulse ) );
b1_position.x -= invMass1 * impulseX;
b1_position.y -= invMass1 * impulseY;
b1_rotation -= invI1 * (r1X * impulseY - r1Y * impulseX);
b1.m_R.Set(b1_rotation);
//b2.m_position.Add( b2Math.MulFV( invMass2, impulse ) );
b2_position.x += invMass2 * impulseX;
b2_position.y += invMass2 * impulseY;
b2_rotation += invI2 * (r2X * impulseY - r2Y * impulseX);
b2.m_R.Set(b2_rotation);
}
// Update body rotations
b1.m_rotation = b1_rotation;
b2.m_rotation = b2_rotation;
}
return minSeparation >= -b2Settings.b2_linearSlop;
},
PostSolve: function(){
for (var i = 0; i < this.m_constraintCount; ++i)
{
var c = this.m_constraints[ i ];
var m = c.manifold;
for (var j = 0; j < c.pointCount; ++j)
{
var mPoint = m.points[j];
var cPoint = c.points[j];
mPoint.normalImpulse = cPoint.normalImpulse;
mPoint.tangentImpulse = cPoint.tangentImpulse;
}
}
},
m_allocator: null,
m_constraints: new Array(),
m_constraintCount: 0};
|
javascript
|
#[macro_use]
extern crate clap;
extern crate gitlab;
extern crate reqwest;
use std::env;
use reqwest::Client;
use gitlab::{Gitlab, Credentials};
use gitlab::projects::{SingleProjectOptions, GetProjectUsersOptions, ProjectParams};
fn main() {
let matches = clap_app!(app =>
(version: crate_version!())
(author: crate_authors!())
(about: "Gitlab CLI")
(@arg host: -h --host +takes_value "Set Gitlab host")
(@subcommand getproject =>
(about: "Get a project by ID, name, or namespace path")
(@arg name: "ID or name of project to retrieve")
)
(@subcommand gitignore =>
(about: "List or retrieve gitignore templates")
(@arg list: -l --list "Fetch all available gitignore template names")
(@arg template: "Name of template to retrieve")
)
(@subcommand listusers =>
(about: "List users of a project")
(@arg name: "ID or name of project to retrieve")
)
(@subcommand createproject =>
(about: "Create a new project")
(@arg name: "Name of new project")
)
(@subcommand deleteproject =>
(about: "Delete a project")
(@arg name: "Name of project to delete")
)
).get_matches();
let credentials = match env::var("GITLAB_ACCESS_TOKEN") {
Ok(token) => Credentials::AccessToken(token),
_ => Credentials::Anonymous,
};
let host = matches.value_of("host").unwrap_or("https://gitlab.com");
println!("Gitlab host: {}", host);
println!("Credentials used: {:?}", credentials);
let gitlab = Gitlab::new(
host,
Client::new().unwrap(),
credentials);
if let Some(matches) = matches.subcommand_matches("gitignore") {
let gi = gitlab.gitignores();
let template = matches.value_of("template").unwrap();
let gitignore_template = gi.single_template(template).unwrap();
println!("{:?}", gitignore_template);
}
if let Some(matches) = matches.subcommand_matches("getproject") {
let projects = gitlab.projects();
let name = matches.value_of("name").unwrap();
let spo = SingleProjectOptions::builder(name).statistics(true).build();
println!("{:?}", projects.project(&spo));
}
if let Some(matches) = matches.subcommand_matches("listusers") {
let projects = gitlab.projects();
let name = matches.value_of("name").unwrap();
let b = GetProjectUsersOptions::builder(name).build();
println!("{:?}", projects.users(&b));
}
if let Some(matches) = matches.subcommand_matches("createproject") {
let projects = gitlab.projects();
let name = matches.value_of("name").unwrap();
let p = ProjectParams::builder(name).build();
println!("{:?}", projects.create(&p));
}
if let Some(matches) = matches.subcommand_matches("deleteproject") {
let projects = gitlab.projects();
let name = matches.value_of("name").unwrap();
println!("{:?}", projects.delete(name));
}
}
|
rust
|
class Person:
'''
This class represents a person
'''
def __init__(self, id, firstname, lastname, dob):
self.id = id
self.firstname = firstname
self.lastname = lastname
self.dob = dob
def __str__(self):
return "University ID Number: " + self.id + "\nName: " + self.firstname + " " + self.lastname
def __repr__(self):
return self.firstname + " " + self.lastname
def get_salary(self):
return 0
class Student(Person):
'''
This class represents a Student
'''
def __init__(self, id, firstname, lastname, dob, start_year):
self.start_year = start_year
self.courses = []
# invoking the __init__ of the parent class
# Person.__init__(self, firstname, lastname, dob)
# or better call super()
super().__init__(id, firstname, lastname, dob)
def add_course(self, course_id):
self.courses.append(course_id)
def get_courses():
return self.courses
def __str__(self):
return super().__str__() + ". This student has the following courses on records: " + str(list(self.courses))
# A student has no salary.
def get_salary(self):
return 0
class Professor(Person):
'''
This class represents a Professor in the university system.
'''
def __init__(self, id, firstname, lastname, dob, hiring_year, salary):
self.hiring_year = hiring_year
self.salary = salary
self.courses = set()
self.research_projects = set()
super().__init__(id, firstname, lastname, dob)
def __str__(self):
return super().__str__() + ". This Professor is the instructor of record of following courses : " + str(
list(self.courses))
def add_course(self, course_id):
self.courses.add(course_id)
def add_courses(self, courses):
for course in courses:
self.courses.add(course)
def get_courses():
return self.courses
def get_salary(self):
return self.salary
class Staff(Person):
'''
This class represents a staff member.
'''
def __init__(self, id, firstname, lastname, dob, hiring_year, salary):
self.hiring_year = hiring_year
self.salary = salary
super().__init__(id, firstname, lastname, dob)
def __str__(self):
return super().__str__() + ". This Staff memeber has a salary of " + str(self.salary)
def get_salary(self):
return self.salary
class Teaching_Assistant(Staff, Student):
'''
A Teaching Assistant is a student and is a staff member.
'''
def __init__(self, id, firstname, lastname, dob, start_year, hiring_year, salary):
Student.__init__(self, id, firstname, lastname, dob, start_year)
self.hiring_year = hiring_year
self.salary = salary
# Staff().__init__(self, id, firstname, lastname, dob, hiring_year, salary)
def __str__(self):
return Student.__str__(self) + Staff.__str__(self)
|
python
|
import { Card } from '../../../interfaces'
import Set from '../Ultra Prism'
const card: Card = {
name: {
en: "<NAME>",
fr: "Triopikeur d’Alola",
es: "Dugtrio de Alola",
it: "Dugtrio di Alola",
pt: "Dugtrio de Alola",
de: "Alola-Digdri"
},
illustrator: "<NAME>",
rarity: "Uncommon",
category: "Pokemon",
set: Set,
dexId: [
51,
],
hp: 60,
types: [
"Metal",
],
evolveFrom: {
en: "<NAME>",
fr: "Taupiqueur d’Alola",
},
stage: "Stage1",
attacks: [
{
name: {
en: "<NAME>",
fr: "Ruée Vers l’Or",
es: "Fiebre del Oro",
it: "Corsa all’Oro",
pt: "Corrida do Ouro",
de: "Goldrausch"
},
effect: {
en: "Discard any number of Metal Energy cards from your hand. This attack does 30 damage for each card you discarded in this way.",
fr: "Défaussez autant de cartes Énergie Metal que vous voulez de votre main. Cette attaque inflige 30 dégâts pour chaque carte défaussée de cette façon.",
es: "Descarta cualquier cantidad de cartas de Energía Metal de tu mano. Este ataque hace 30 puntos de daño por cada carta que hayas descartado de esta manera.",
it: "Scarta un numero qualsiasi di carte Energia Metal che hai in mano. Questo attacco infligge 30 danni per ogni carta che hai scartato in questo modo.",
pt: "Descarte qualquer número de cartas de Energia Metal da sua mão. Este ataque causa 30 pontos de dano para cada carta descartada desta forma.",
de: "Lege beliebig viele Metal-Energiekarten aus deiner Hand auf deinen Ablagestapel. Diese Attacke fügt 30 Schadenspunkte mal der Anzahl der auf diese Weise auf deinen Ablagestapel gelegten Karten zu."
},
damage: "30×",
},
],
weaknesses: [
{
type: "Fire",
value: "×2"
},
],
resistances: [
{
type: "Psychic",
value: "-20"
},
],
retreat: 1,
}
export default card
|
typescript
|
// Copyright 2022 RisingLight Project Authors. Licensed under Apache-2.0.
use std::marker::PhantomData;
use bitvec::prelude::{BitVec, Lsb0};
use itertools::enumerate;
use risinglight_proto::rowset::BlockStatistics;
use super::super::statistics::StatisticsBuilder;
use super::super::PrimitiveFixedWidthEncode;
use super::BlockBuilder;
/// Encodes fixed-width data into a block, with null element support.
///
/// The layout is fixed-width data and a u8 bitmap, concatenated together.
pub struct PlainPrimitiveNullableBlockBuilder<T: PrimitiveFixedWidthEncode> {
data: Vec<u8>,
bitmap: BitVec<u8, Lsb0>,
target_size: usize,
_phantom: PhantomData<T>,
}
impl<T: PrimitiveFixedWidthEncode> PlainPrimitiveNullableBlockBuilder<T> {
pub fn new(target_size: usize) -> Self {
let data = Vec::with_capacity(target_size);
let bitmap = BitVec::<u8, Lsb0>::with_capacity(target_size);
Self {
data,
target_size,
bitmap,
_phantom: PhantomData,
}
}
}
impl<T: PrimitiveFixedWidthEncode> BlockBuilder<T::ArrayType>
for PlainPrimitiveNullableBlockBuilder<T>
{
fn append(&mut self, item: Option<&T>) {
if let Some(item) = item {
item.encode(&mut self.data);
self.bitmap.push(true);
} else {
T::DEAFULT_VALUE.encode(&mut self.data);
self.bitmap.push(false);
}
}
fn estimated_size(&self) -> usize {
let bitmap_byte_len = (self.bitmap.len() + 7) / 8;
self.data.len() + bitmap_byte_len
}
fn should_finish(&self, _next_item: &Option<&T>) -> bool {
!self.data.is_empty() && self.estimated_size() + 1 + T::WIDTH > self.target_size
}
fn get_statistics(&self) -> Vec<BlockStatistics> {
let mut stats_builder = StatisticsBuilder::new();
for (idx, item) in enumerate(self.data.chunks(T::WIDTH)) {
if self.bitmap[idx] {
stats_builder.add_item(Some(item));
}
}
stats_builder.get_statistics()
}
fn finish(self) -> Vec<u8> {
let mut data = self.data;
data.extend(self.bitmap.as_raw_slice().iter());
data
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_build_i32() {
let mut builder = PlainPrimitiveNullableBlockBuilder::<i32>::new(128);
builder.append(Some(&1));
builder.append(None);
builder.append(Some(&3));
builder.append(Some(&4));
assert_eq!(builder.estimated_size(), 17);
assert!(!builder.should_finish(&Some(&5)));
let data = builder.finish();
// bitmap should be 1011 and Lsb0, so u8 will be 0b1101 = 13
let expected_data: Vec<u8> = vec![1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 13];
assert_eq!(data, expected_data);
}
}
|
rust
|
<reponame>Xqua/dao-research
{"id": "<KEY>", "title": "Do you think the bunny of Pancake should have its own game to join the gamefi ?", "body": "(which can make CAKE ATH and help to develop the ecosystem of cake)", "choices": ["Yes", "No"], "start": 1636873200, "end": 1637391600, "snapshot": "12634599", "state": "closed", "author": "0<PASSWORD>", "space": {"id": "pancake", "name": "PancakeSwap"}, "votes": 0, "votes_data": []}
|
json
|
import numpy as np
__copyright__ = 'Copyright (C) 2018 ICTP'
__author__ = '<NAME> <<EMAIL>>'
__credits__ = ["<NAME>", "<NAME>"]
def get_x(lon, clon, cone):
if clon >= 0.0 and lon >= 0.0 or clon < 0.0 and lon < 0.0:
return np.radians(clon - lon) * cone
elif clon >= 0.0:
if abs(clon - lon + 360.0) < abs(clon - lon):
return np.radians(clon - lon + 360) * cone
else:
return np.radians(clon - lon) * cone
elif abs(clon - lon - 360.0) < abs(clon - lon):
return np.radians(clon - lon - 360) * cone
else:
return np.radians(clon - lon) * cone
def grid_to_earth_uvrotate(proj, lon, lat, clon, clat, cone=None, plon=None,
plat=None):
if proj == 'NORMER':
return 1, 0
elif proj == 'ROTMER':
zphi = np.radians(lat)
zrla = np.radians(lon)
zrla = np.where(abs(lat) > 89.99999, 0.0, zrla)
if plat > 0.0:
pollam = plon + 180.0
polphi = 90.0 - plat
else:
pollam = plon
polphi = 90.0 + plat
if pollam > 180.0:
pollam = pollam - 360.0
polcphi = np.cos(np.radians(polphi))
polsphi = np.sin(np.radians(polphi))
zrlap = np.radians(pollam) - zrla
zarg1 = polcphi * np.sin(zrlap)
zarg2 = polsphi*np.cos(zphi) - polcphi*np.sin(zphi)*np.cos(zrlap)
znorm = 1.0/np.sqrt(zarg1**2+zarg2**2)
sindel = zarg1*znorm
cosdel = zarg2*znorm
return cosdel, sindel
else:
if np.isscalar(lon):
x = get_x(lon, clon, cone)
else:
c = np.vectorize(get_x, excluded=['clon', 'cone'])
x = c(lon, clon, cone)
xc = np.cos(x)
xs = np.sin(x)
if clat >= 0:
xs *= -1
return xc, xs
|
python
|
<gh_stars>1-10
import { parseSuccessResponse } from '../ResultTypes';
describe('ResultTypes', () => {
describe('parseSuccessResponse', () => {
const correctResponse = {
pagination: {
page: 1,
totalPages: 5,
},
results: [
{
references: [
{
book: 'Matt',
chapter: 1,
verse: 1,
},
{
book: 'Matt',
chapter: 1,
verse: 2,
},
],
translation: 'translation',
words: [
{
text: 'word1',
matchedSequence: 0,
matchedWordQuery: 0,
},
{
text: 'word2',
matchedSequence: -1,
matchedWordQuery: -1,
},
],
},
],
};
it('parses a correct SuccessResponse', () => {
expect(parseSuccessResponse(correctResponse)).toEqual(correctResponse);
});
it('throws a TypeError if there the response is not an object', () => {
expect(() => {
parseSuccessResponse([]);
}).toThrow(TypeError);
});
it('throws a TypeError if the response does not have pagination info', () => {
expect(() => {
parseSuccessResponse({
results: correctResponse.results,
});
}).toThrow(TypeError);
});
it('throws a TypeError if the response does not have results', () => {
expect(() => {
parseSuccessResponse({
pagination: correctResponse.pagination,
});
}).toThrow(TypeError);
});
it('throws a TypeError if results are not a list', () => {
expect(() => {
parseSuccessResponse({
pagination: correctResponse.pagination,
results: {},
});
}).toThrow(TypeError);
});
it('throws a TypeError if pagination does not have the right attributes', () => {
expect(() => {
parseSuccessResponse({
pagination: {
wrong: 'attribute',
},
results: correctResponse.results,
});
}).toThrow(TypeError);
});
it('throws a TypeError if pagination attributes are not integers', () => {
expect(() => {
parseSuccessResponse({
pagination: {
page: 2,
totalPages: undefined,
},
results: correctResponse.results,
});
}).toThrow(TypeError);
});
});
});
|
typescript
|
I Am the Greatest (Athlete)
What is the origin of the Olympic Games?
Are the Olympic Games an overall benefit for their host countries and cities?
How is tennis played?
How Is Tennis Scored?
Why Doesn’t the U.S. Use the Metric System?
Do We Really Swallow Spiders in Our Sleep?
Why Does the New Year Start on January 1?
Why Was Frederick Douglass’s Marriage to Helen Pitts Controversial?
How Many Countries Are There in the World?
Venus Williams, 2008.
in these related Britannica articles:
|
english
|
{
"class" : {
},
"instance" : {
"streamingReadMatching:inclusive:" : "MartinKobetic 12/31/2010 00:36",
"streamingWriteMatching:inclusive:" : "MartinKobetic 12/31/2010 00:36" } }
|
json
|
<reponame>frankjoshua/rosdock
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CodeblockComponent } from './codeblock.component';
import { DataService } from '../services/data.service';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { AngularFireObject } from 'angularfire2/database';
describe('ConfigFormComponent', () => {
let component: CodeblockComponent;
let fixture: ComponentFixture<CodeblockComponent>;
const mockDataService: any = {
createNode() {
return {
valueChanges(){
return {
subscribe(){
}
}
}
};
}
};
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CodeblockComponent ],
imports: [FormsModule, ReactiveFormsModule],
providers: [{provide: DataService, useValue: mockDataService}]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CodeblockComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should have a form', async(() => {
const fixture = TestBed.createComponent(CodeblockComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('form')).not.toEqual(null);
}));
it('form should have a name input', async(() => {
const fixture = TestBed.createComponent(CodeblockComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('#inputName')).not.toEqual(null);
//expect(compiled.querySelector('#inputName')).name.startsWith('name');
}));
it('form should have a submit button', async(() => {
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('#submit')).not.toEqual(null);
}));
});
|
typescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.