text stringlengths 1 1.04M | language stringclasses 25 values |
|---|---|
The Minnesota Vikings have concluded their sixth practice of training camp and the second one with pads.
Throughout practice, there were a lot of interesting items including performances, injuries and depth chart tidbits.
I attended practice live at TCO Performance Center on Tuesday afternoon. Here are the eight things that stood out to me.
The Vikings had three injuries occur during practice on Tuesday.
Cornerback Andrew Booth Jr. (unknown) walked off with a trainer and did not return.
Wide receiver Trishton Jackson (leg) went down while trying to haul in a deep corner route. He was taken off on a car and did not return. It is fair to note that going off on a cart doesn’t necessarily mean anything for the severity of the injury.
Running back Alexander Mattison (hamstring) came up limp during team drills. The injury looked minor and shouldn’t be a major concern moving forward.
Fighting for a spot on the roster, this was a massive day for Tay Gowan. He balled out in every drill. In special teams drills, he was a physical monster not allowing players to get past him in coverage drills.
In coverage, he was just as good. Gowan was attacking the football and staying with every receiver he was covering. Gowan is at best going to be the fifth cornerback on this team, but the special teams acumen will likely have him filling the role Kris Boyd left.
There were a few rough reps from Jordan Addison, but the first-round pick looks every bit the part of a talented rookie. He stumbled a couple of times in release drills, but most of the reps he had were explosive and his wiggle is excellent. One thing that was really impressive was how well he adjusted his tempo in his route running. He is going to not just compete for the WR2 spot, but will be a major contributor this season.
Things aren’t all sunshine and rainbows for Jaren Hall, but he did have the best deep ball during practice. His calling card at BYU was being able to drop the ball in a bucket and he has carried that over in practice. Hall threw three beautiful deep balls in practice, including a corner route to Blake Proehl which went for 50 yards. Teams drills are still tough at times for Hall, but he is working hard and showing real flashes.
Going into training camp, NaJee Thompson wasn’t going to make the team as a cornerback, it was always going to be as a special teams player. He thrives in that environment and was showing so during practice. He was physical, worked well through blockers and was relentless in his pursuit during drills. He is going to be a difficult cut if that translates to the preseason.
We knew that things were going to be different for the Vikings defense with Brian Flores in charge and they are already showing dividends in practice. Harrison Smith had three sacks during team drills and Ivan Pace Jr. added one as well. This blitz scheme is causing problems for the offense, which should translate to gameday.
After Joejuan Williams was the nickel cornerback the first few practices, Mekhi Blackmon has been firmly entrenched as that guy over the last two practices, both of which have had full pads. Outside of his reps against Jefferson, Blackmon has mostly held his own, which is a good sign for when games are played this September.
This is the one tidbit that has me really intrigued. Esezi Otomewo was drafted to be a 5T that can slide inside to 3T on passing downs. Brian Flores had him standing up as an outside linebacker. Otomewo is listed on the Vikings’ website at 6’5′′ and 282 lbs, which is around 20 lbs light for a 5T. His athletic profile is really good for a defensive tackle, but having him as an edge rusher brings a lot of intrigue. This will be something to monitor throughout the preseason.
Kirk Cousins wore 66 as a rib to punter Ryan Wright, who wore that jersey throughout training camp.
Cephus Johnson III didn’t look like he belongs in the NFL. Struggled in every phase, especially special teams.
Thayer Thomas runs a fantastic, clean route every time but he doesn’t have the juice to be an effective NFL player.
Ezra Cleveland pancaked Brian Asamoah II to the shadow realm during team drills. A really impressive rep.
Marcus Davenport and Danielle Hunter didn’t participate in team drills. Patrick Jones II and D.J. Wonnum got the majority of first-team edge reps in their place.
| english |
<gh_stars>1-10
/*
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.experimental.maven;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.Enumeration;
import java.util.Properties;
import java.util.Set;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.model.Dependency;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
/**
* Resolves the dependencies for a thin jar artifact and outputs a thin properties file.
*
* @author <NAME>
*
*/
@Mojo(name = "properties", defaultPhase = LifecyclePhase.GENERATE_RESOURCES, requiresProject = true, threadSafe = true, requiresDependencyResolution = ResolutionScope.NONE, requiresDependencyCollection = ResolutionScope.COMPILE_PLUS_RUNTIME)
public class PropertiesMojo extends ThinJarMojo {
/**
* The Maven project.
*/
@Parameter(defaultValue = "${project}", readonly = true, required = true)
private MavenProject project;
/**
* Directory containing the generated file.
*/
@Parameter(defaultValue = "src/main/resources/META-INF", required = true, property = "thin.output")
private File outputDirectory;
/**
* A flag to indicate whether to compute transitive dependencies.
*/
@Parameter(property = "thin.compute", defaultValue = "true", required = true)
private boolean compute;
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
if (skip) {
getLog().info("Skipping execution");
return;
}
File deployable = this.project.getArtifact().getFile();
getLog().info("Calculating properties for: " + deployable);
Properties props = new Properties();
try {
File target = new File(outputDirectory, "thin.properties");
if (target.exists()) {
props.load(new FileInputStream(target));
}
props.setProperty("computed", "" + this.compute);
for (Enumeration<?> keys = props.propertyNames(); keys.hasMoreElements();) {
String key = (String) keys.nextElement();
if (key.startsWith("dependencies.")) {
props.remove(key);
}
if (key.startsWith("boms.")) {
props.remove(key);
}
}
boms(project, props);
Set<Artifact> artifacts = this.compute ? project.getArtifacts()
: project.getDependencyArtifacts();
for (Artifact artifact : artifacts) {
if ("runtime".equals(artifact.getScope())
|| "compile".equals(artifact.getScope())) {
props.setProperty("dependencies." + artifact.getArtifactId(),
coordinates(artifact));
}
}
props.store(new FileOutputStream(target), "Enhanced by thin jar maven plugin");
getLog().info("Saved thin.properties");
}
catch (Exception e) {
throw new MojoExecutionException(
"Cannot calculate dependencies for: " + deployable, e);
}
getLog().info("Properties ready in: " + outputDirectory);
}
private void boms(MavenProject project, Properties props) {
while (project != null) {
String artifactId = project.getArtifactId();
if (isBom(artifactId)) {
props.setProperty("boms." + artifactId,
coordinates(project.getArtifact(), true));
}
for (Dependency dependency : project.getDependencyManagement()
.getDependencies()) {
if ("import".equals(dependency.getScope())) {
props.setProperty("boms." + dependency.getArtifactId(),
coordinates(dependency));
}
}
project = project.getParent();
}
}
private boolean isBom(String artifactId) {
return artifactId.endsWith("-dependencies")
|| artifactId.endsWith("-bom");
}
private String coordinates(Dependency dependency) {
return dependency.getGroupId() + ":" + dependency.getArtifactId() + ":"
+ dependency.getVersion();
}
private String coordinates(Artifact dependency) {
return coordinates(dependency, this.compute);
}
private String coordinates(Artifact dependency, boolean withVersion) {
return dependency.getGroupId() + ":" + dependency.getArtifactId()
+ (withVersion ? ":" + dependency.getVersion() : "");
}
}
| java |
<filename>docs/data/module_EDUC2381.json
{"activities_easter": [], "activities_epiphany": [], "activities_michaelmas": [], "code": "EDUC2381", "title": "Harry Potter and the Age of Illusion"} | json |
{
"Logging": {
"LogLevel": {
"Default": "Trace",
"Microsoft": "Information"
}
},
"ldap": {
"servers": [ "192.168.10.11:389", "192.168.10.11:389" ],
"poolSize": 4,
"bindDn": "CN=user,OU=branch,DC=contoso,DC=local",
"bindCredentials": "<PASSWORD>",
"searchBase": "DC=contoso,DC=local",
"searchFilter": "(&(objectClass=user)(objectClass=person)(sAMAccountName={0}))",
"adminCn": "CN=Admins,OU=branch,DC=contoso,DC=local"
}
}
| json |
{
"random_string": {
"lower": true
},
"aws_cloudwatch_log_group": {
"name": "/aws/kinesisfirehose/kinesis-logs-log-group-{RandomString}",
"retention_in_days": 7
},
"aws_cloudwatch_log_stream": [
{
"http_log_stream": {
"log_group_name": "/aws/kinesisfirehose/kinesis-logs-log-group-{RandomString}",
"name": "HttpEndpointDelivery"
}
},
{
"s3_log_stream": {
"log_group_name": "/aws/kinesisfirehose/kinesis-logs-log-group-{RandomString}",
"name": "S3Delivery"
}
}
],
"aws_iam_role": [
{
"logs_role": {
"name": "SumoLogic-Firehose-Logs-{RandomString}",
"assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"logs.{Region}.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}"
},
"firehose_role": {
"name": "SumoLogic-Firehose-{RandomString}",
"assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"firehose.amazonaws.com\"},\"Action\":\"sts:AssumeRole\",\"Condition\":{\"StringEquals\":{\"sts:ExternalId\":\"{AccountId}\"}}}]}"
}
}
],
"aws_kinesis_firehose_delivery_stream": {
"destination": "http_endpoint",
"http_endpoint_configuration": [
{
"buffering_interval": 60,
"buffering_size": 4,
"cloudwatch_logging_options": [
{
"enabled": true,
"log_group_name": "/aws/kinesisfirehose/kinesis-logs-log-group-{RandomString}",
"log_stream_name": "HttpEndpointDelivery"
}
],
"name": "sumologic-logs-endpoint-{RandomString}",
"retry_duration": 60,
"role_arn": "arn:aws:iam::{AccountId}:role/SumoLogic-Firehose-{RandomString}",
"s3_backup_mode": "FailedDataOnly",
"url": "{URL}"
}
],
"s3_configuration": [
{
"bucket_arn": "arn:aws:s3:::sumologic-kinesis-firehose-logs-{RandomString}",
"compression_format": "UNCOMPRESSED",
"role_arn": "arn:aws:iam::{AccountId}:role/SumoLogic-Firehose-{RandomString}",
"cloudwatch_logging_options": [
{
"enabled": true,
"log_group_name": "/aws/kinesisfirehose/kinesis-logs-log-group-{RandomString}",
"log_stream_name": "S3Delivery"
}
]
}
]
},
"aws_s3_bucket": [
{
"s3_bucket": {
"acl": "private",
"bucket": "sumologic-kinesis-firehose-logs-{RandomString}",
"region": "{Region}"
}
}
],
"aws_serverlessapplicationrepository_cloudformation_stack": [
{
"auto_enable_logs_subscription": {
"name": "Auto-Enable-Logs-Subscription-{RandomString}",
"application_id": "arn:aws:serverlessrepo:us-east-1:956882708938:applications/sumologic-loggroup-connector",
"capabilities": [
"CAPABILITY_IAM",
"CAPABILITY_RESOURCE_POLICY"
],
"parameters": {
"DestinationArnType": "Kinesis",
"DestinationArnValue": "arn:aws:firehose:{Region}:{AccountId}:deliverystream/Kinesis-Logs-{RandomString}",
"LogGroupPattern": "lambda",
"RoleArn": "arn:aws:iam::{AccountId}:role/SumoLogic-Firehose-Logs-{RandomString}",
"UseExistingLogs": "true"
},
"semantic_version": "1.0.5"
}
}
],
"sumologic_collector": [
{
"collector": {
"description": "This collector is created using Sumo Logic terraform AWS Kinesis Firehose for logs module to collect AWS cloudwatch logs.",
"name": "SumoLogic Kinesis Firehose for Logs Collector {RandomString}"
}
}
],
"sumologic_source": {
"category": "Labs/aws/cloudwatch/logs",
"content_type": "KinesisLog",
"description": "This source is created using Sumo Logic terraform AWS Kinesis Firehose for logs module to collect AWS Cloudwatch logs.",
"name": "Kinesis Firehose for Logs Source"
}
} | json |
<reponame>brettinternet/hugo-slides<gh_stars>1-10
import "../src/notes";
| javascript |
const sock = parent.sock;
const imagesPath = "./images/";
var questions = [];
$(document).ready(function () {
addSocketEvents();
initGameFrames(); // check
sock.emit("fromClient_toServer_startGame");
setChildName();
});
function addSocketEvents() {
var msg_counter = 0;
sock.on('fromServer_toClients_instruction_game', (text) => {
$('#instruction-top').text(`${childName}, ${text}`);
showModal(`${childName}, ${text}`);
console.log(`${++msg_counter}: ${text}`);
});
sock.on('fromServer_toClient_show_the_new_question', (question_string) => {
console.log(question_string);
let pre_question = `${childName}, ` + 'בחר את התמונה שמתאימה למילה: '
$('#instruction-top').text(pre_question + question_string);
showModal(pre_question + question_string);
});
sock.on('fromServer_toClient_updated_stats', (playersStatsArray) => {
$('#table-stats-body').empty();
playersStatsArray[0].subFields.forEach((subField, index) => {
$('<tr>').append(
$('<td>').text(subField.operatorHeb),
$('<td>').text(playersStatsArray[0].subFields[index].correct), // player
$('<td>').text(playersStatsArray[1].subFields[index].correct) // friend
).appendTo('#table-stats-body');
});
});
sock.on("fromServer_toClient_set_question_frame_state", (state) => {
set_questions_frame_state(state);
console.log(state);
});
sock.on("fromServer_toClient_set_answer_frame_state", (state) => {
set_answers_frame_state(state);
console.log(state);
});
sock.on("fromServer_toClient_send_questions_collection", (new_questions) => {
questions = new_questions;
initGameFrames();
});
sock.on("fromServer_toClient_show_solution_to_players", (isPlayerAnswerCorrect, question) => {
if (isPlayerAnswerCorrect) {
showModal("נכון!", 1000);
} else {
showModal("טעות", 1000);
}
let questionString = question._word;
setTimeout(() => {
showSolutionModal(`${childName}, ${questionString} זה: `, question._word.toLowerCase(), 6000);
}, 1000);
});
}
function initGameFrames() {
initQuestionsWordsFrame();
initAnswersImagesFrame();
}
function initQuestionsWordsFrame() {
$("#div-questions").empty();
questions.forEach(question => {
let $btn = $("<button>").text(question._word);
$btn.addClass("w3-button w3-card w3-ripple w3-yellow w3-hover-red");
$btn.click(function () {
$(this).hide();
sock.emit("fromClient_toServer_player_chose_questionWord", question);
});
$("#div-questions").append($btn);
});
set_questions_frame_state("disable");
}
function initAnswersImagesFrame() {
$("#div-answers").empty();
questions.forEach(question => {
let $btn = $("<input>", {
"type": "image",
"src": imagesPath + question._word.toLowerCase() + ".png"
});
$btn.addClass("img_answers w3-ripple");
console.log(question._word.toLowerCase());
$btn.on("click", function () {
$(this).hide();
sock.emit("fromClient_toServer_player_submitted_answer", question);
set_answers_frame_state("disable");
});
$("#div-answers").append($btn);
});
set_answers_frame_state("disable");
}
function set_answers_frame_state(state) {
if (state === "disable") {
$("#div-answers").hide();
$("#div-answers button").attr("disabled", "true");
} else { // only enabled after question was asked
$("#div-answers button").removeAttr("disabled");
$("#div-answers").show();
}
}
function set_questions_frame_state(state) {
// math operators disabled after player chose, enabled when new round started
if (state === "disable") {
$("#div-questions").hide();
$("#div-questions button").attr("disabled", "true");
} else {
$("#div-questions").show();
$("#div-questions button").removeAttr("disabled");
}
}
// Modal
function showModal(text, time = 2000) {
$('#modal-game-instruction-text').text(text);
$("#modal-game-instruction").fadeIn("slow");
setTimeout(() => {
$("#modal-game-instruction").fadeOut("slow");
}, time);
}
function hideModal() {
$('#modal-game-instruction').hide();
}
// Modal Solution
function showSolutionModal(questionString, answerImageName, time = 5000) {
$('#modal-game-solution-text').text(questionString);
setTimeout(() => {
$('#modal-game-solution-text').fadeIn("slow");
}, 500);
$('#modal-game-solution-answer').empty();
let $solutionImage = $("<input>", {
"type": "image",
"src": imagesPath + answerImageName + ".png"
});
$solutionImage.addClass("img_solution w3-ripple");
$('#modal-game-solution-answer').append($solutionImage);
setTimeout(() => {
$("#modal-game-solution-answer").fadeIn("slow");
}, 2000);
$("#modal-game-solution").fadeIn("slow");
setTimeout(() => {
$('#modal-game-solution-text').fadeOut("slow");
$("#modal-game-solution-answer").fadeOut("slow");
$("#modal-game-solution").fadeOut("slow");
}, time);
}
function hideSolutionModal() {
return;
$('#modal-game-solution').hide();
}
var childName = "";
function setChildName() {
let child = JSON.parse(localStorage.getItem('child'));
childName = child.firstName;
}
// sock.on('fromServer_toClient_setOperatorsState', (state) => {
// setOperatorsState(state)
// });
// sock.on('fromServer_toClient_set_answer_frame_state', (state) => {
// setAnswerContainerState(state)
// }); | javascript |
<gh_stars>1-10
package drug
import (
"net/url"
"github.com/bububa/opentaobao/model"
)
/*
获取订单详情 APIRequest
alibaba.alihealth.nr.trade.order.get
阿里健康O2O,获取订单详情
*/
type AlibabaAlihealthNrTradeOrderGetRequest struct {
model.Params
// 淘宝订单ID
orderId int64
}
func NewAlibabaAlihealthNrTradeOrderGetRequest() *AlibabaAlihealthNrTradeOrderGetRequest{
return &AlibabaAlihealthNrTradeOrderGetRequest{
Params: model.NewParams(),
}
}
func (r AlibabaAlihealthNrTradeOrderGetRequest) GetApiMethodName() string {
return "alibaba.alihealth.nr.trade.order.get"
}
func (r AlibabaAlihealthNrTradeOrderGetRequest) GetApiParams() url.Values {
params := url.Values{}
for k, v := range r.GetRawParams() {
params.Set(k, v.String())
}
return params
}
func (r *AlibabaAlihealthNrTradeOrderGetRequest) SetOrderId(orderId int64) error {
r.orderId = orderId
r.Set("order_id", orderId)
return nil
}
func (r AlibabaAlihealthNrTradeOrderGetRequest) GetOrderId() int64 {
return r.orderId
}
| go |
Reaffirming that the tolled expressway between Bengaluru and Mysuru should be named after the river Cauvery, Mysuru MP Pratap Simha said that there is no precedence of naming highways after individuals.
Speaking to mediapersons in Mysuru on February 13, Mr. Simha said that river Cauvery is the benefactor of millions of people, and there could be no Bengaluru, or other cities, without the river. Hence, it is apt that the expressway be named after the river as the road passes through the Cauvery heartland. People in Mandya and other districts deify and worship Cauvery, and there is no need to create a controversy over the issue, he added.
Mr. Simha said Cauvery is also worshipped as one of the seven sacred rivers. It has been a lifeline to the people in the region. Naming the expressway after Cauvery should not be construed to mean insult to other personalities whose names are being suggested, including that of Nalwadi Krishnaraja Wadiyar.
‘’I have suggested that the Mysuru airport be named after Nalwadi Krishnaraja Wadiyar for his contribution to the development of modern Mysuru, besides naming Mysuru station after Chamaraja Wadiyar given his efforts to expand railways in the princely state of Mysuru,” said Mr. Simha.
He remarked that politicians born and brought up in Mysuru could not think of naming either the railway station or the airport after the maharajas, nor could they conceive the idea of naming the expressway after Cauvery.
‘’But when I have made the suggestions, they are propping up alternative names without understanding the reality,” he said hinting at ‘lack of original thinking’ on their part.
Work on the expressway is more or less over, but for civic works at certain stretches, which will be completed within a month. ‘’In all probability, Prime Minister Narendra Modi will inaugurate the expressway some time in the second or the third week of March,” said Mr. Simha.
On the toll to be charged for using the road Mr. Simha said it was likely to be around ₹250 for one way, though the toll could be less for same-day return journey.
He said a rest area would come up on a 30-acre plot at Channapatna at a cost of ₹1,200 crore. Apart from toilets, there would be space for restaurants, eateries, kiosks and stalls dealing with handicrafts and Channapatana toys. It would also have electric vehicle charging stations, fuel station, and gas stations, and all of it would take another year to be completed. | english |
<reponame>NagalieArt/halloletters<filename>src/css/style.css
body {
overflow: hidden;
height: 100vh;
}
/* LETTER RECOGNITION LEVEL */
gameContainer {
height: 100%;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 0.5fr 0.8fr 1fr;
gap: 0px 0px;
grid-template-areas:
". . ."
". subjectImage ."
". label .";
}
subjectContainer {
grid-area: subjectImage;
align-self: center;
margin: auto;
}
subjectContainer img {
display: flex;
background-repeat: no-repeat;
background-size: contain;
width: 200px;
height: 200px;
}
labelContainer {
margin: 0 auto;
grid-area: label;
color: #fff;
font-size: 38px;
}
.nextLevelButton {
background-color: #00509D;
color: #00296B;
text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff; /* White border around icon */
font-size: 38px;
padding: 10px 75px;
border-radius: 1000px;
border: 0;
transition: 0.3s;
}
.nextLevelButton:hover {
background-color: #00296B;
color: #00509D;
cursor: pointer;
}
/* END LETTER RECOGNITION LEVEL */
| css |
package io.spring2go.corespring;
// Handler
public interface ApproveHandler {
public void setNextHandler(ApproveHandler nextHandler);
public void approve(Leave leave);
}
| java |
<filename>games/migrations/0004_alter_categorymodel_description.py<gh_stars>1-10
# Generated by Django 3.2.8 on 2021-11-17 10:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('games', '0003_categorymodel_description'),
]
operations = [
migrations.AlterField(
model_name='categorymodel',
name='description',
field=models.CharField(max_length=400, null=True),
),
]
| python |
Azamgarh: A 38-year-old man, who the police claim is a sex maniac and a necrophile, has been arrested for the murder of a couple and their child in Uttar Pradesh's Azamgarh.
A week ago, the couple and their infant son were found murdered and two other children were seriously injured at their home in Mubarakpur area.
The accused, identified as Nasiruddin, was arrested on Monday for the murders and police discovered that he had committed similar crimes in Haryana, Delhi and West Bengal.
He confessed to have committed horrific crimes and indulging in perversion.
During interrogation, Nasiruddin confessed that he killed the 30-year-old woman, her husband and four-month-old son before having sex with her corpse and then raping her 10-year-old daughter.
Azamgarh SP Triveni Singh said: "He engaged in sex with the body for three hours in the house and made a video of the act, which he later showed to his sister-in-law who was horrified. He also admitted to taking a stimulating drug and carried condoms for perpetrating the crime. He used a knife and a heavy stone to kill his victims. "
According to the SP, late on November 24, Nasiruddin went to the woman's house when the family was asleep. He killed her 35-year-old husband, then killed her and had sex with her corpse.
Before leaving, he raped and injured the couple's minor daughter and also attacked her four-year-old brother.
"We had found the three bodies without clothes. Nasiruddin was arrested from his house on the basis of circumstantial evidence and has confessed to his crime," a police official said. (This story has not been edited by News18 staff and is published from a syndicated news agency feed - IANS) | english |
Pictures are taken from various sources; thanks.
“Dasis, or Deva-dasis (handmaidens of the gods), are dancing girls attached to the temples. They have their own caste, which has its own customs, councils and laws of inheritance. Dasis, dedicated to the temple, are married to the god or to a sword and receive their marriage badge.
There are two divisions of the dasis: the Valangai, or right hand, and the Idangai, or left hand. The former will have nothing to do with artisans, and refuse to dance in their houses; the latter is not so particular. Neither division however, will sell themselves to men of the lowest castes. In the Oriya country the dasi caste is not connected with the temples in any way, and its girls neither marry the god nor receive the marriage badge.
Indian music is perhaps the oldest in the world, and the Dasi caste is the repository for much of it.
Dancing girls sometimes amass considerable fortunes, which frequently they devote to piety or to something which will commemorate their caste endian bridges and other public works frequently owe their existence to these girls, and the large tank at Channaraya patna in Mysore state was built by two dancing girls.
Girls are usually presented to the caste between six and eight years of age, and after formal investigations have been made the parents of the girl must pay the expenses of the ceremony and present something to the temple. If the girl is accepted she is taken to the inner sanctuary of the temple where she sits facing the deity. The priest then makes the fire and performs the marriage ceremony. A mimic marriage, representing Siva marrying Parvati, sometimes precedes the girl’s marriage to the god. After the marriage the girl is taken to her father’s house, where her marriage is celebrated for two or three days. A coconut is rolled back and forth between the bride and the elderly dasi dressed in male attire to act the part of the bridegroom.
The home of the dancing girl is the only place in India where the birth of a male child is not an occasion for rejoicing. Three boys born to the dancing girls sometimes remain in the caste as musicians, playing for the women to dance. Daughters are brought up to follow the profession, and are taught dancing, singing, and the arts of dressing and make-up.
When a dancing woman becomes too old, or too diseased, for the profession she applies to the temple for permission to remove her ear rings. After she has formally handed over her ornaments which are returned to her, she becomes an old mother and is supposed to lead a life of retirement. She may still receive a small income from the temple to which she was dedicated.
When a priest dies, the dancing girl whom he married vicariously prepares the turmeric powder which is dusted over his corpse. She also observes the anniversaries of his death. It is said that in former times dancing girls, at the commencement of their career, used to sleep three nights in the inner shrine of Koppeswara temple in the Godavari district, so as to be embraced by god.
At the beginning of the last century there were a hundred dancing girls attached to the temple at Conjeeevaram.
About three years ago I arranged to have a group of girls’ dance at the temple in Conjeevaram, the temple of Ekambara Swami, the god of a single garment. They danced in the hall of a hundred pillars, a fine old structure in the temple courtyard. They were dressed in gaudy saris, with as much jewellery as their frail little bodies could support. Their necks, breasts, hips, arms, fingers, ankles, and toes were fairly plastered with jewels, most of which were imitation. Their faces were heavily painted, and their eyes were touched up with kohol. Old hags and several ragged musicians accompanied them, and the former no doubts had been nautch girls once. The hags’ mouths were stained with betel and they talked rapidly to the dancers in highly pitched, unpleasant voices.
The girls danced slowly, rhythmically, swaying their bodies from side to side and dislocating their necks. The hags, meanwhile uttered a series of grunts, in time with the music. A girl, who could not have been more than twelve years old, knelt before me, making the erotic gestures and singing a filthy Tamil song. When she finished the song she stood up, the others joined her, and the dance became very excited. The musicians put down their instruments, and one old hag took up a conch shell and blew in it. The wail of the shell seemed to madden the girls, and they started a wild song which left little to the imagination.
The author has criticised Hindu customs through his book and he had lot of factual errors. His understanding of Hindu religion was not good.
Dance has become a sacred art now as we had it in the days of Bharata, who wrote the sacred treatise in Sanskrit 2000 years ago.
Raja Raja Choza had 400 dancing girls around the Big Temple in Thanjavur 1000 years ago. Their house numbers and their beautiful Tamil and Sanskrit names are inscribed on stone. Many Tamil inscriptions reveal that they have made donations to temples in cash and kind.
| english |
<reponame>karmaresearch/ajira
package nl.vu.cs.ajira.examples.aurora.api.support;
import nl.vu.cs.ajira.examples.aurora.data.Ordering;
public class SortOperatorInfo implements OperatorInfo {
private final String attributeName;
private final int slack;
private final Ordering ordering;
public SortOperatorInfo(String attributeName, int slack, Ordering ordering) {
super();
this.attributeName = attributeName;
this.slack = slack;
this.ordering = ordering;
}
public String getAttributeName() {
return attributeName;
}
public int getSlack() {
return slack;
}
public Ordering getOrdering() {
return ordering;
}
}
| java |
<reponame>stanislawiaw2018/bootcamp-launchbase-desafio1-3
// usuarios -> VARIAVEL GLOBAL
const usuarios = [
{
nome: "Antonio",
tecnologias: [
"HTML",
"CSS",
"JS",
"PHP",
"JAVA",
"PYTHON",
"node.js"
]
},
{
nome: "Vitória",
tecnologias: [
"MySQL",
"PHP",
"HTML",
"CSS",
"JS"
]
},
{
nome: "Carlos",
tecnologias: [
"HTML",
"CSS"
]
}
]
//DECLARAÇÃO DA FUNÇÃO/MÉTODO
function exibirInfomacoes(){
// i -> Variavel local
for (let i = 0; i < usuarios.length; i++){
console.log(`${usuarios[i].nome} trabalha com as seguintes tecnologias: ${usuarios[i].tecnologias}`)
}
}
//CHAMANDO A FUNÇÃO/MÉTODO
exibirInfomacoes() | javascript |
Amid a tussle between ministries of coal and environment over mining issues, the Cabinet on Thursday decided to constitute a group of ministers (GoM) to look into the issue of ‘no-go’ mining areas.
The decision of the Union Cabinet is aimed at finding a pragmatic and balanced approach towards the issue of environmental clearances to mining areas, while ensuring ecology is not hurt, sources said.
Talking to PTI separately, Coal Minister Sriprakash Jaiswal said: “the Cabinet Committee of Infrastructure (CCI) today referred the matter to a Group of Ministers for discussions on the issue“.
He, however, added that “members of the panel will be decided by the Prime Minister Manmohan Singh soon and we are waiting for the further guidelines“.
The Coal Ministry has been pressing for lifting the ban but the Environment Ministry has refused to relent. As a result, the matter reached the Prime Minister’s Office which is keen to find a solution, sources said.
The GoM is likely to be headed by Finance Minster Pranab Mukherjee and would include senior ministers—— Home Minister P Chidambaram, Coal Minister Sriprakash Jaiswal, Environment Minister Jairam Ramesh, Mines Minister B K Handique and Plan Commission Deputy Chairman Montek Singh Ahluwalia, the sources added.
Last year, Environment Ministry had defined ‘no—go’ areas for mining as those that have over 30 per cent gross forest cover or over 10 per cent weighted forest cover.
As per the guidelines, the mining is allowed only in the ’go’ areas.
The ‘no—go’ classification has brought 206 coal blocks involving a production potential of 660 million tonnes per annum (MTPA) under its ambit.
“The issue is not percentage, our view is that a pragmatic approach should be followed which does not hamper the growth of the country and we are hopeful that the GoM will precisely achieve that,” a source in coal ministry said.
Earlier, the Coal Ministry had vehemently opposed ‘no—go’ classification, by saying that not permitting coal mining in 206 blocks would affect about 1,30,000 MW potential power generation capacity.
These coal blocks are spread across 4,039 sq km in nine coalfields.
The sources said an attempt is being made to find a balance between exploitation of the coal reserves and protection of the environment.
In this direction, an idea is being mooted under which mining in a forest area could be undertaken in phases, the sources said. | english |
1 Rehoboam chu Jerusalem ahunglhun phat chun Judah phung le Benjamin phunga konin Israel douna ama lenggam tundoh kitna din mi akhomin, galsat ding Sepai sang jakhat le sang somget alheng doh in ahi. 2 Ahinlah Pakai chun Pathen mipa Shemiah jah a chun aseijin, 3 Solomon chapa Rehoboam Judah te Lengpa chule Judah le Benjamin gam'a Israel mite jouse jah’a chun seipeh in, 4 Pakaiyin hiti hin aseije, “Na inkote dounan galsat hih beh in, inlama kinunglen ajeh chu thilsoh hohi keima bola ahi bouve,” hiti chun amahon Pakai thusei chu anungin Jeroboam dounan gal abol tapouve.
5 Rehoboam chu Jerusalema aumden in, Judah te ventupna dingin khopi jouse chu kulpi akai tan ahi. 6 Aman Bethlehem, Etan, Tekoa, Beth-Zur, Soco, Adullam, 7 Gath, Mareshah, Zeph, 8 Adorium, Lachish, Azekah, 9 Zorah, Aijalon le Hebron asadoh in ahi. Hiche khopi hohi Judah le Benjamin gamsunga kulpi akaiho ahitai. 10 Jeroboam chun akivennau lampang hou chu asuhat in, chule asunga chun gal lamkai ding atousah in chuleh anneh twidon, olive thaotui le lengpi theitui thil ho ning lhing tah in akoipeh’in ahi. 11 Chujongleh aban joma kiven tup theina dingin kidalna pho le tengcha hojong, hiche khopi ho sunga chun akoijin ahi. Chuti chun Judah le Benjamin gamsung chu ventup na noiya aumin ahi. 12 Ahinlah sahlam gamkai’a Israel phung holah’a cheng thempu hole Levite chun, abon chaovin Rehoboam alangkaipiu vin ahi. 13 Levite chun akelngoi chin nau hamhing gam anei-agou jengu jong ahin dalhao vin, Judah gamle Jerusalem lama ahung chaodoh un ahi; ajeh chu Jeroboam le achateu chun thempu ahinauva Pakai kin abol diu ajahdahpeh’u ahi. 14 Jeroboam chun doiphung le amahon ahou u, kelcha le bongnou lim semthu ho jen le ding chun atumin thempu akilhen nun ahi. 15 Israel phung holah’a lungthengsella Pakai Israel Pathen hounom jouse chun, Jerusalema dingin Levite chu ajuitauve. Chuleh hiche lai munna chun apu apao Pakai, Pathen koma thilto abolthei’u ahi. ✡ 1 Lgt 12:31 16 Hiche hin Judah lenggam ahatsah ben, chule kum thum sung chu Solomon chapa Rehoboam chu akitho piuvin, David le Solomon chonbang chun kitah tah in ajui tauvin ahi.
17 Rehoboam chun David chapa Jeremoth chanu Mahalath akichen pin ahi. Amanu hi Jesse chapa Eleah chanu Abihail chanu ahi. 18 Mahalath chun chapa thum Jeush, Shamariah le Zaham ahingin ahi. 19 Chujouvin Rehoboam chun Absalom chanu maacah akichen pin, Macaah chun Abijah , Attai, Ziza le Shitomith ahingin ahi. 20 Rehoboam chun ajite leh athaikem holah’a chun Maacah chu alungset penin ahi. Rehoboam chun ji som le get athaikum somgup aneijin, amaho chun chapa somni le get le chanu som gup ahing uve. 21 Rehoboam chun Maacah chapa Abijah chu Leng Chapate lah’a alam kai diu vin apansah in, hiche hin kichentah agon chu ahileh ama chu abana leng ding tina ahi. 22 Rehoboam chun achapa dang ho jong chu mopohna apen, Judah leh Benjamin gamsung pumpia kulpi kikai khopi ho achun atousah in ahi. Amaho chu hongphal tah’in nehle chah apen chule aji diu jong tamtah apuipeh in ahi.
| english |
// Fill out your copyright notice in the Description page of Project Settings.
#include "MapEditorUtils.h"
#include "MapGenerator/GameMode/EditorGameMode.h"
#include "MapGenerator/MapActor.h"
#include "MapGenerator/Objects/BaseMapManager.h"
#include "MapGenerator/HeightMapLandscape/LandscapeManager.h"
#include "MapGenerator/Volumetric3DTerrain/Volumetric3DTerrainManager.h"
#include "MapGenerator/HeightMapPlanet/HeightMapPlanetManager.h"
TEnumAsByte<EMapType> UMapEditorUtils::DefaultMapType = EMapType::ProceduralLandscape;
TEnumAsByte<EMapType> UMapEditorUtils::ActualMapType = UMapEditorUtils::DefaultMapType;
TMap<EMapType, UClass*> UMapEditorUtils::ManagerRegistry = TMap<EMapType, UClass*>();
TMap<EMapType, FString> UMapEditorUtils::ModeName = TMap<EMapType, FString>();
bool UMapEditorUtils::IsRunning = false;
void UMapEditorUtils::InitMapEditor() {
ManagerRegistry.Empty();//Just in case
ManagerRegistry.Add({EMapType::ProceduralLandscape}, {ULandscapeManager::StaticClass()});
ManagerRegistry.Add({EMapType::ProceduralHMPlanet}, {UHeightMapPlanetManager::StaticClass()});
ManagerRegistry.Add({EMapType::Volumetric3DLandscape}, {UVolumetric3DTerrainManager::StaticClass()});
ModeName.Add({ EMapType::ProceduralLandscape }, { "Landscape procedural" });
ModeName.Add({ EMapType::ProceduralHMPlanet }, { "HM Planet procedural" });
ModeName.Add({ EMapType::Volumetric3DLandscape }, { "Terrain Volumetric" });
IsRunning = true;
UEditorGameMode::Get();
}
void UMapEditorUtils::DestroyMapEditor() {
UEditorGameMode::Destroy();
ManagerRegistry.Empty();
IsRunning = false;
}
bool UMapEditorUtils::IsEditorRunning() {
return IsRunning;
}
AMapActor* UMapEditorUtils::GetMapActor() {
return UMapEditorUtils::GetMapGameMode()->GetMapActor();
}
UBaseMapManager* UMapEditorUtils::GetActualMapManager() {
return UMapEditorUtils::GetMapActor()->MapManager;
}
ULandscapeManager* UMapEditorUtils::TryGetLandscapeManager() {
return Cast<ULandscapeManager>(UMapEditorUtils::GetActualMapManager());
}
UVolumetric3DTerrainManager* UMapEditorUtils::tryGetVolumetricTerrainManager() {
return Cast<UVolumetric3DTerrainManager>(UMapEditorUtils::GetActualMapManager());
}
UHeightMapPlanetManager * UMapEditorUtils::TryGetHeightMapPlanetManager() {
return Cast<UHeightMapPlanetManager>(UMapEditorUtils::GetActualMapManager());
}
UWorld* UMapEditorUtils::GetActualWorld() {
return UMapEditorUtils::GetMapGameMode()->GetWorld();
}
UEditorGameMode* UMapEditorUtils::GetMapGameMode() {
return UEditorGameMode::Get();
}
| cpp |
<filename>treebanks/yo_ytb/yo_ytb-dep-compound.md
---
layout: base
title: 'Statistics of compound in UD_Yoruba-YTB'
udver: '2'
---
## Treebank Statistics: UD_Yoruba-YTB: Relations: `compound`
This relation is universal.
There are 2 language-specific subtypes of `compound`: <tt><a href="yo_ytb-dep-compound-prt.html">compound:prt</a></tt>, <tt><a href="yo_ytb-dep-compound-svc.html">compound:svc</a></tt>.
77 nodes (1%) are attached to their parents as `compound`.
74 instances of `compound` (96%) are left-to-right (parent precedes child).
Average distance between parent and child is 1.48051948051948.
The following 11 pairs of parts of speech are connected with `compound`: <tt><a href="yo_ytb-pos-VERB.html">VERB</a></tt>-<tt><a href="yo_ytb-pos-SCONJ.html">SCONJ</a></tt> (30; 39% instances), <tt><a href="yo_ytb-pos-NOUN.html">NOUN</a></tt>-<tt><a href="yo_ytb-pos-NOUN.html">NOUN</a></tt> (16; 21% instances), <tt><a href="yo_ytb-pos-ADJ.html">ADJ</a></tt>-<tt><a href="yo_ytb-pos-ADP.html">ADP</a></tt> (8; 10% instances), <tt><a href="yo_ytb-pos-PRON.html">PRON</a></tt>-<tt><a href="yo_ytb-pos-PART.html">PART</a></tt> (6; 8% instances), <tt><a href="yo_ytb-pos-VERB.html">VERB</a></tt>-<tt><a href="yo_ytb-pos-NOUN.html">NOUN</a></tt> (6; 8% instances), <tt><a href="yo_ytb-pos-ADJ.html">ADJ</a></tt>-<tt><a href="yo_ytb-pos-ADJ.html">ADJ</a></tt> (3; 4% instances), <tt><a href="yo_ytb-pos-NOUN.html">NOUN</a></tt>-<tt><a href="yo_ytb-pos-ADJ.html">ADJ</a></tt> (2; 3% instances), <tt><a href="yo_ytb-pos-VERB.html">VERB</a></tt>-<tt><a href="yo_ytb-pos-ADV.html">ADV</a></tt> (2; 3% instances), <tt><a href="yo_ytb-pos-VERB.html">VERB</a></tt>-<tt><a href="yo_ytb-pos-PART.html">PART</a></tt> (2; 3% instances), <tt><a href="yo_ytb-pos-ADJ.html">ADJ</a></tt>-<tt><a href="yo_ytb-pos-ADV.html">ADV</a></tt> (1; 1% instances), <tt><a href="yo_ytb-pos-ADV.html">ADV</a></tt>-<tt><a href="yo_ytb-pos-ADV.html">ADV</a></tt> (1; 1% instances).
~~~ conllu
# visual-style 4 bgColor:blue
# visual-style 4 fgColor:white
# visual-style 3 bgColor:blue
# visual-style 3 fgColor:white
# visual-style 3 4 compound color:blue
1 Ọlọ́run ọlọ́run NOUN _ _ 3 nsubj _ Gloss=god|Ref=GEN_1.3
2 sì sì CCONJ _ _ 3 cc _ Gloss=then|Ref=GEN_1.3
3 wí wí VERB _ _ 0 root _ Gloss=said|Ref=GEN_1.3
4 pé pé SCONJ _ _ 3 compound _ Gloss=that|Ref=GEN_1.3|SpaceAfter=No
5 , , PUNCT _ _ 12 punct _ Gloss=,|Ref=GEN_1.3
6 “ “ PUNCT _ _ 12 punct _ Gloss=“|Ref=GEN_1.3|SpaceAfter=No
7 Jẹ́ jẹ́ VERB _ _ 12 ccomp _ Gloss=let|Ref=GEN_1.3
8 kí kí AUX _ _ 7 aux _ Gloss=|Ref=GEN_1.3
9 ìmọ́lẹ̀ ìmọ́lẹ̀ NOUN _ _ 12 nsubj _ Gloss=light|Ref=GEN_1.3
10 kí kí AUX _ _ 12 aux _ Gloss=let|Ref=GEN_1.3
11 ó ó PRON _ Case=Nom|Number=Sing|Person=3|PronType=Prs 12 expl _ Gloss=he|Ref=GEN_1.3
12 wà wà VERB _ _ 3 ccomp _ Gloss=was|Ref=GEN_1.3|SpaceAfter=No
13 , , PUNCT _ _ 12 punct _ Gloss=,|Ref=GEN_1.3|SpaceAfter=No
14 ” ” PUNCT _ _ 12 punct _ Gloss=”|Ref=GEN_1.3
15 ìmọ́lẹ̀ ìmọ́lẹ̀ NOUN _ _ 17 nsubj _ Gloss=light|Ref=GEN_1.3
16 sì sì CCONJ _ _ 17 cc _ Gloss=and|Ref=GEN_1.3
17 wà wà VERB _ _ 3 conj _ Gloss=was|Ref=GEN_1.3|SpaceAfter=No
18 . . PUNCT _ _ 3 punct _ Gloss=.|Ref=GEN_1.3
~~~
~~~ conllu
# visual-style 11 bgColor:blue
# visual-style 11 fgColor:white
# visual-style 9 bgColor:blue
# visual-style 9 fgColor:white
# visual-style 9 11 compound color:blue
1 Wọ́n Wọ́n PRON _ Case=Acc|Number=Plur|Person=3|PronType=Prs 7 nsubj _ _
2 bí bí SCONJ _ _ 7 mark _ _
3 Ẹ̀bùn Ẹ̀bùn NOUN _ _ 7 nsubj _ _
4 Olóyèdé Olóyèdé NOUN _ _ 3 nmod _ _
5 ní ní ADP _ _ 6 case _ _
6 ilú ilú NOUN _ _ 3 nmod _ _
7 Kẹ́nta Kẹ́nta ADV _ _ 0 root _ SpaceAfter=No
8 , , PUNCT _ _ 9 punct _ _
9 Òkè òkè NOUN _ _ 7 conj _ SpaceAfter=No
10 - - PUNCT _ _ 11 punct _ SpaceAfter=No
11 Èjìgbò Èjìgbò NOUN _ _ 9 compound _ _
12 Abẹ́òkúta Abẹ́òkúta NOUN _ _ 9 nmod _ SpaceAfter=No
13 . . PUNCT _ _ 7 punct _ SpacesAfter=\n\n
~~~
~~~ conllu
# visual-style 3 bgColor:blue
# visual-style 3 fgColor:white
# visual-style 1 bgColor:blue
# visual-style 1 fgColor:white
# visual-style 1 3 compound color:blue
1 Alábùkún Alábùkún ADJ _ _ 8 nsubj _ Ref=MATT_5.4|SpaceAfter=No|Gloss=blessed
2 - - PUNCT _ _ 3 punct _ Ref=MATT_5.4|SpaceAfter=No|Gloss=the
3 fún fún ADP _ _ 1 compound _ Ref=MATT_5.4|Gloss=unto
4 ni ni PART _ _ 6 case _ Ref=MATT_5.4|Gloss=is
5 àwọn àwọn PRON _ Case=Nom|Number=Plur|Person=3|PronType=Prs 6 nmod _ Ref=MATT_5.4|Gloss=they
6 tí tí PRON _ PronType=Rel 8 nmod _ Ref=MATT_5.4|Gloss=that
7 ń ń AUX _ _ 8 aux _ Ref=MATT_5.4|Gloss=that
8 ṣọ̀fọ̀ ṣọ̀fọ̀ VERB _ _ 0 root _ Ref=MATT_5.4|SpaceAfter=No|Gloss=mourn
9 , , PUNCT _ _ 13 punct _ Ref=MATT_5.4|Gloss=,
10 nítorí nítorí SCONJ _ _ 13 mark _ Ref=MATT_5.4|Gloss=for
11 a a PRON _ Case=Nom|Number=Plur|Person=1|PronType=Prs 13 nsubj _ Ref=MATT_5.4|Gloss=we
12 ó ó AUX _ _ 13 aux _ Ref=MATT_5.4|Gloss=will
13 tù tù VERB _ _ 8 advcl _ Ref=MATT_5.4|Gloss=comfort
14 wọ́n wọ́n PRON _ Case=Acc|Number=Plur|Person=3|PronType=Prs 13 obj _ Ref=MATT_5.4|Gloss=them
15 nínú nínú ADP _ _ 13 obl _ Ref=MATT_5.4|SpaceAfter=No|Gloss=inside
16 . . PUNCT _ _ 8 punct _ Ref=MATT_5.4|Gloss=.
~~~
| markdown |
<filename>datasets/2D/SIGN/writer006/sessionB/chevron_left-1-22.json
{"name":"chevron_left","subject":6,"date":"16122009-054607","paths":{"Pen":{"strokes":[{"x":-7,"y":-648,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":0,"stroke_id":0},{"x":-43,"y":-648,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":1,"stroke_id":0},{"x":-53,"y":-643,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":2,"stroke_id":0},{"x":-53,"y":-638,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":3,"stroke_id":0},{"x":-48,"y":-630,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":4,"stroke_id":0},{"x":-33,"y":-621,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":5,"stroke_id":0},{"x":-2,"y":-605,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":6,"stroke_id":0},{"x":39,"y":-589,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":7,"stroke_id":0},{"x":96,"y":-572,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":8,"stroke_id":0},{"x":162,"y":-558,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":9,"stroke_id":0},{"x":241,"y":-540,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":10,"stroke_id":0},{"x":325,"y":-529,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":11,"stroke_id":0},{"x":418,"y":-516,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":12,"stroke_id":0},{"x":513,"y":-505,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":13,"stroke_id":0},{"x":607,"y":-490,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":14,"stroke_id":0},{"x":695,"y":-478,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":15,"stroke_id":0},{"x":775,"y":-463,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":16,"stroke_id":0},{"x":842,"y":-443,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":17,"stroke_id":0},{"x":897,"y":-414,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":18,"stroke_id":0},{"x":931,"y":-375,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":19,"stroke_id":0},{"x":949,"y":-318,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":20,"stroke_id":0},{"x":940,"y":-250,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":21,"stroke_id":0},{"x":908,"y":-167,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":22,"stroke_id":0},{"x":855,"y":-74,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":23,"stroke_id":0},{"x":784,"y":30,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":24,"stroke_id":0},{"x":695,"y":137,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":25,"stroke_id":0},{"x":596,"y":248,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":26,"stroke_id":0},{"x":487,"y":354,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":27,"stroke_id":0},{"x":376,"y":454,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":28,"stroke_id":0},{"x":269,"y":541,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":29,"stroke_id":0},{"x":173,"y":616,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":30,"stroke_id":0},{"x":89,"y":678,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":31,"stroke_id":0},{"x":20,"y":731,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":32,"stroke_id":0},{"x":-36,"y":773,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":33,"stroke_id":0},{"x":-76,"y":805,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":34,"stroke_id":0},{"x":-99,"y":834,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":35,"stroke_id":0},{"x":-118,"y":850,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":36,"stroke_id":0},{"x":-122,"y":864,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":37,"stroke_id":0},{"x":-122,"y":870,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":38,"stroke_id":0},{"x":-112,"y":870,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":39,"stroke_id":0},{"x":-112,"y":870,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":40,"stroke_id":0}]}},"device":{"osBrowserInfo":"Fujitsu-Siemens Stylistic ST5022 Tablet PC","resolutionHeight":null,"resolutionWidth":null,"windowHeight":null,"windowWidth":null,"pixelRatio":null,"mouse":false,"pen":true,"finger":false,"acceleration":false,"webcam":false}} | json |
Bihar Women (BIH-W) will take on Madhya Pradesh Women (MP-W) in the second match of the Senior Women's T20 League on Tuesday, October 11, at the Amingaon Cricket Ground in Guwahati. Ahead of the match, here's everything you must know about the BIH-W vs MP-W Dream11 prediction, including fantasy cricket tips, playing 11s, top player picks and the pitch report.
Both teams will be playing their first matches of the tournament after a successful domestic season. Bihar Women have a strong in-form and experienced squad of players. Madhya Pradesh Women, on the other hand, have a young squad of promising players.
Madhya Pradesh Women will try their best to win the match, but Bihar Women are a relatively better team. Bihar Women are expected to win these nail-biting encounters.
The second match of the Senior Women's T20 League will be played on October 11 at the Amingaon Cricket Ground in Guwahati. The game is set to take place at 12.30 pm IST. The live score & commentary of the game can be followed in the Sportskeeda Live Score section.
The Amingaon Cricket Ground in Guwahati has a well-balanced pitch, which offers a lot of opportunities for both bowlers and batters. The pitch will be fresh, so fans can expect spinners to play a crucial role in the middle overs.
No major injury updates.
No major injury updates.
Rahila Firdous (wk), Deepika Shakya, Aashna Patidar, Neha Badwaik, Reena Yadav, Soumya Tiwari, Diksha Singh, Pooja Vastrakar, Priyanka Kaushal, Poonam Soni, and Salonee Dangore.
K Kumari, who has played exceptionally well in the last few matches, is without a doubt the best wicket-keeper for today's Dream11 side. She will bat in the top order and also earn additional points from catches. R Firdous is another good pick for today's match.
A Patidar and T Alok are the two best batter picks for the Dream11 team. T Nigam is another good pick for today's Dream11 team. They will all bat in the top order and have a high chance of scoring well in today's match.
A Manoj and P Vastrakar are the best all-rounder picks for the Dream11 team as they will bat in the top order and also complete their quota of overs. A KP Gupta is another good pick for today's Dream11 team.
The top bowler picks for today's Dream11 team are P Bal Krishna and S Pradeep. Both have bowled brilliantly in the last few matches, and you can also expect them to bowl in death overs. N Singh is another good pick for the Dream11 team.
A Manoj is one of the best all-rounders in Bihar Women's squad as she will bat in the top order and also bowl in the death overs. She is one of the best captaincy picks for today's match.
P Bal Krishna is one of the best bowler picks in Bihar Women's squad who will bowl in death overs and bat in the lower-middle order. Since the pitch is decent, she can be a good captaincy pick for the grand leagues.
As the pitch is good for bowling, it is advisable to pick at least four death over bowlers, who will bowl in the death overs and also bat in the top order. Making them captains and vice-captains is another good way to gain maximum points and win grand leagues.
| english |
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package tinkcrypto
import (
"crypto/ecdsa"
"crypto/elliptic"
_ "embed"
"encoding/base64"
"encoding/hex"
"encoding/json"
"testing"
"github.com/stretchr/testify/require"
"golang.org/x/crypto/chacha20poly1305"
"golang.org/x/crypto/curve25519"
"github.com/hyperledger/aries-framework-go/pkg/internal/cryptoutil"
)
func Test_ecKWSupportFailures(t *testing.T) {
ecKW := &ecKWSupport{}
_, err := ecKW.wrap("badCipherBlockType", []byte(""))
require.EqualError(t, err, "wrap support: EC wrap with invalid cipher block type")
_, err = ecKW.unwrap("badCipherBlockType", []byte(""))
require.EqualError(t, err, "unwrap support: EC wrap with invalid cipher block type")
_, err = ecKW.deriveSender1Pu("", nil, nil, nil, "badEphemeralPrivKeyType", nil, nil, 0)
require.EqualError(t, err, "deriveSender1Pu: ephemeral key not ECDSA type")
_, err = ecKW.deriveSender1Pu("", nil, nil, nil, &ecdsa.PrivateKey{}, "badSenderPrivKeyType", nil, 0)
require.EqualError(t, err, "deriveSender1Pu: sender key not ECDSA type")
_, err = ecKW.deriveSender1Pu("", nil, nil, nil, &ecdsa.PrivateKey{}, &ecdsa.PrivateKey{}, "badSenderPrivKeyType", 0)
require.EqualError(t, err, "deriveSender1Pu: recipient key not ECDSA type")
_, err = ecKW.deriveSender1Pu("", nil, nil, nil, &ecdsa.PrivateKey{
PublicKey: ecdsa.PublicKey{Curve: elliptic.P256()},
}, &ecdsa.PrivateKey{
PublicKey: ecdsa.PublicKey{Curve: elliptic.P521()},
}, &ecdsa.PublicKey{Curve: elliptic.P521()}, 0)
require.EqualError(t, err, "deriveSender1Pu: recipient, sender and ephemeral key are not on the same curve")
_, err = ecKW.deriveSender1Pu("", nil, nil, nil, &ecdsa.PrivateKey{
PublicKey: ecdsa.PublicKey{Curve: elliptic.P521()},
}, &ecdsa.PrivateKey{
PublicKey: ecdsa.PublicKey{Curve: elliptic.P256()},
}, &ecdsa.PublicKey{Curve: elliptic.P521()}, 0)
require.EqualError(t, err, "deriveSender1Pu: recipient, sender and ephemeral key are not on the same curve")
_, err = ecKW.deriveRecipient1Pu("", nil, nil, nil, "badEphemeralPrivKeyType", nil, nil, 0)
require.EqualError(t, err, "deriveRecipient1Pu: ephemeral key not ECDSA type")
_, err = ecKW.deriveRecipient1Pu("", nil, nil, nil, &ecdsa.PublicKey{}, "badSenderPrivKeyType", nil, 0)
require.EqualError(t, err, "deriveRecipient1Pu: sender key not ECDSA type")
_, err = ecKW.deriveRecipient1Pu("", nil, nil, nil, &ecdsa.PublicKey{}, &ecdsa.PublicKey{}, "badSenderPrivKeyType", 0)
require.EqualError(t, err, "deriveRecipient1Pu: recipient key not ECDSA type")
_, err = ecKW.deriveRecipient1Pu("", nil, nil, nil, &ecdsa.PublicKey{Curve: elliptic.P521()},
&ecdsa.PublicKey{Curve: elliptic.P521()}, &ecdsa.PrivateKey{PublicKey: ecdsa.PublicKey{Curve: elliptic.P256()}}, 0)
require.EqualError(t, err, "deriveRecipient1Pu: recipient, sender and ephemeral key are not on the same curve")
_, err = ecKW.deriveRecipient1Pu("", nil, nil, nil, &ecdsa.PublicKey{Curve: elliptic.P521()},
&ecdsa.PublicKey{Curve: elliptic.P256()}, &ecdsa.PrivateKey{PublicKey: ecdsa.PublicKey{Curve: elliptic.P521()}}, 0)
require.EqualError(t, err, "deriveRecipient1Pu: recipient, sender and ephemeral key are not on the same curve")
}
func Test_okpKWSupportFailures(t *testing.T) {
okpKW := &okpKWSupport{}
_, err := okpKW.getCurve("")
require.EqualError(t, err, "getCurve: not implemented for OKP KW support")
_, err = okpKW.createPrimitive([]byte("kekWithBadSize"))
require.EqualError(t, err, "createPrimitive: failed to create OKP primitive: chacha20poly1305: bad key length")
_, err = okpKW.wrap("badCipherBlockType", []byte(""))
require.EqualError(t, err, "wrap support: OKP wrap with invalid primitive type")
_, err = okpKW.unwrap("badCipherBlockType", []byte(""))
require.EqualError(t, err, "unwrap support: OKP unwrap with invalid primitive type")
kek, err := okpKW.generateKey(nil)
require.NoError(t, err)
kekBytes, ok := kek.([]byte)
require.True(t, ok)
XC20PPrimitive, err := okpKW.createPrimitive(kekBytes)
require.NoError(t, err)
_, err = okpKW.unwrap(XC20PPrimitive, []byte(""))
require.EqualError(t, err, "unwrap support: OKP unwrap invalid key")
_, err = okpKW.unwrap(XC20PPrimitive, []byte("badEncryptedKeyLargerThankNonceSize"))
require.EqualError(t, err, "unwrap support: OKP failed to unwrap key: chacha20poly1305: message authentication failed")
_, err = okpKW.deriveSender1Pu("", nil, nil, nil, "badEphemeralPrivKeyType", nil, nil, 0)
require.EqualError(t, err, "deriveSender1Pu: ephemeral key not OKP type")
_, err = okpKW.deriveSender1Pu("", nil, nil, nil, []byte{}, "badSenderPrivKeyType", nil, 0)
require.EqualError(t, err, "deriveSender1Pu: sender key not OKP type")
_, err = okpKW.deriveSender1Pu("", nil, nil, nil, []byte{}, []byte{}, "badSenderPrivKeyType", 0)
require.EqualError(t, err, "deriveSender1Pu: recipient key not OKP type")
_, err = okpKW.deriveSender1Pu("", nil, nil, nil, []byte{}, []byte{}, []byte{}, 0)
require.EqualError(t, err, "deriveSender1Pu: deriveECDHX25519: bad input point: low order point")
derivedKEK, err := curve25519.X25519(kekBytes, curve25519.Basepoint)
require.NoError(t, err)
// lowOrderPoint from golang.org/x/crypto/curve25519. Causes ED25519 key derivation to fail.
// https://github.com/golang/crypto/blob/f4817d981/curve25519/vectors_test.go#L10
lowOrderPoint := []byte{
0xee, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
}
_, err = okpKW.deriveSender1Pu("", nil, nil, nil, derivedKEK, kekBytes, lowOrderPoint, 0)
require.EqualError(t, err, "deriveSender1Pu: deriveECDHX25519: bad input point: low order point")
// can't reproduce key derivation error with sender key because recipient public key as lowOrderPoint fails for
// ephemeral key derivation. ie sender key derivation failure only fails if ephemeral key derivation fails.
_, err = okpKW.deriveRecipient1Pu("", nil, nil, nil, "badEphemeralPrivKeyType", nil, nil, 0)
require.EqualError(t, err, "deriveRecipient1Pu: ephemeral key not OKP type")
_, err = okpKW.deriveRecipient1Pu("", nil, nil, nil, []byte{}, "badSenderPrivKeyType", nil, 0)
require.EqualError(t, err, "deriveRecipient1Pu: sender key not OKP type")
_, err = okpKW.deriveRecipient1Pu("", nil, nil, nil, []byte{}, []byte{}, "badSenderPrivKeyType", 0)
require.EqualError(t, err, "deriveRecipient1Pu: recipient key not OKP type")
_, err = okpKW.deriveRecipient1Pu("", nil, nil, nil, []byte{}, []byte{}, []byte{}, 0)
require.EqualError(t, err, "deriveRecipient1Pu: deriveECDHX25519: bad input point: low order point")
}
type mockKey struct {
Kty string `json:"kty,omitempty"`
Crv string `json:"crv,omitempty"`
X string `json:"x,omitempty"`
Y string `json:"y,omitempty"`
D string `json:"d,omitempty"`
}
type mockProtectedHeader struct {
Alg string `json:"alg,omitempty"`
Enc string `json:"enc,omitempty"`
Apu string `json:"apu,omitempty"`
Apv string `json:"apv,omitempty"`
Epk mockKey `json:"epk,omitempty"`
}
type ref1PU struct {
ZeHex string `json:"zeHex,omitempty"`
ZsHex string `json:"zsHex,omitempty"`
ZHex string `json:"zHex,omitempty"`
Sender1PUKDFHex string `json:"sender1puKdfHex,omitempty"`
Sender1PUKWB64 string `json:"sender1puKwB64,omitempty"`
}
func refJWKtoOKPKey(t *testing.T, jwkM string) (*[chacha20poly1305.KeySize]byte, *[chacha20poly1305.KeySize]byte) {
t.Helper()
jwk := &mockKey{}
err := json.Unmarshal([]byte(jwkM), jwk)
require.NoError(t, err)
x, err := base64.RawURLEncoding.DecodeString(jwk.X)
require.NoError(t, err)
d, err := base64.RawURLEncoding.DecodeString(jwk.D)
require.NoError(t, err)
x32 := new([chacha20poly1305.KeySize]byte)
copy(x32[:], x)
d32 := new([chacha20poly1305.KeySize]byte)
copy(d32[:], d)
return x32, d32
}
// nolint:gochecknoglobals // embedded test data
var (
// test vector retrieved from:
//nolint:lll
// (github: https://github.com/NeilMadden/jose-ecdh-1pu/blob/master/draft-madden-jose-ecdh-1pu-04/draft-madden-jose-ecdh-1pu-04.txt#L740)
// (ietf draft: https://datatracker.ietf.org/doc/html/draft-madden-jose-ecdh-1pu-04#appendix-B)
//go:embed testdata/alice_key_ref.json
aliceKeyRef string
//go:embed testdata/bob_key_ref.json
bobKeyRef string
//go:embed testdata/charlie_key_ref.json
charlieKeyRef string
//go:embed testdata/alice_epk_ref.json
aliceEPKRef string
//go:embed testdata/protected_headers_ref.json
protectedHeadersRef string
//go:embed testdata/ecdh_1pu_bob.json
ecdh1puBobRef string
//go:embed testdata/ecdh_1pu_charlie.json
ecdh1puCharlieRef string
)
// TestDeriveReferenceKey uses the test vector in the 1PU draft found at:
// (github: https://github.com/NeilMadden/jose-ecdh-1pu/blob/master/draft-madden-jose-ecdh-1pu-03.txt#L459)
// (ietf draft: https://tools.ietf.org/html/draft-madden-jose-ecdh-1pu-03#appendix-A)
// to validate the ECDH-1PU key derivation.
func TestDeriveReferenceKey(t *testing.T) {
tag, err := base64.RawURLEncoding.DecodeString("HLb4fTlm8spGmij3RyOs2gJ4DpHM4hhVRwdF_hGb3WQ")
require.NoError(t, err)
cek, err := hex.DecodeString("fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8" +
"d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0")
require.NoError(t, err)
ref1PUBobData := &ref1PU{}
err = json.Unmarshal([]byte(ecdh1puBobRef), ref1PUBobData)
require.NoError(t, err)
ref1PUCharlieData := &ref1PU{}
err = json.Unmarshal([]byte(ecdh1puCharlieRef), ref1PUCharlieData)
require.NoError(t, err)
_, alicePrivKeyRefOKP := refJWKtoOKPKey(t, aliceKeyRef)
bobPubKeyRefOKP, _ := refJWKtoOKPKey(t, bobKeyRef)
charliePubKeyRefOKP, _ := refJWKtoOKPKey(t, charlieKeyRef)
_, alicePrivKeyEPKRefOKP := refJWKtoOKPKey(t, aliceEPKRef)
protectedHeaderRefJWK := &mockProtectedHeader{}
err = json.Unmarshal([]byte(protectedHeadersRef), protectedHeaderRefJWK)
require.NoError(t, err)
apuRef, err := base64.RawURLEncoding.DecodeString(protectedHeaderRefJWK.Apu) // "Alice"
require.NoError(t, err)
apvRef, err := base64.RawURLEncoding.DecodeString(protectedHeaderRefJWK.Apv) // "Bob and Charlie"
require.NoError(t, err)
zeBobRef, err := hex.DecodeString(ref1PUBobData.ZeHex)
require.NoError(t, err)
zeCharlieRef, err := hex.DecodeString(ref1PUCharlieData.ZeHex)
require.NoError(t, err)
t.Run("test derive Ze for Bob", func(t *testing.T) {
ze, e := cryptoutil.DeriveECDHX25519(alicePrivKeyEPKRefOKP, bobPubKeyRefOKP)
require.NoError(t, e)
require.EqualValues(t, zeBobRef, ze)
zeHEX := hex.EncodeToString(ze)
require.EqualValues(t, ref1PUBobData.ZeHex, zeHEX)
})
t.Run("test derive Ze for Charlie", func(t *testing.T) {
ze, e := cryptoutil.DeriveECDHX25519(alicePrivKeyEPKRefOKP, charliePubKeyRefOKP)
require.NoError(t, e)
zeHEX := hex.EncodeToString(ze)
require.EqualValues(t, ref1PUCharlieData.ZeHex, zeHEX)
require.EqualValues(t, zeCharlieRef, ze)
})
zsBobRef, err := hex.DecodeString(ref1PUBobData.ZsHex)
require.NoError(t, err)
t.Run("test derive Zs for Bob", func(t *testing.T) {
zs, e := cryptoutil.DeriveECDHX25519(alicePrivKeyRefOKP, bobPubKeyRefOKP)
require.NoError(t, e)
zsHEX := hex.EncodeToString(zs)
require.EqualValues(t, ref1PUBobData.ZsHex, zsHEX)
require.EqualValues(t, zsBobRef, zs)
})
zsCharlieRef, err := hex.DecodeString(ref1PUCharlieData.ZsHex)
require.NoError(t, err)
t.Run("test derive Zs for Charlie", func(t *testing.T) {
zs, e := cryptoutil.DeriveECDHX25519(alicePrivKeyRefOKP, charliePubKeyRefOKP)
require.NoError(t, e)
zsHEX := hex.EncodeToString(zs)
require.EqualValues(t, ref1PUCharlieData.ZsHex, zsHEX)
require.EqualValues(t, zsCharlieRef, zs)
})
zBob, err := hex.DecodeString(ref1PUBobData.ZHex)
require.NoError(t, err)
require.EqualValues(t, append(zeBobRef, zsBobRef...), zBob)
zCharlie, err := hex.DecodeString(ref1PUCharlieData.ZHex)
require.NoError(t, err)
require.EqualValues(t, append(zeCharlieRef, zsCharlieRef...), zCharlie)
onePUKDFBobFromHex, err := hex.DecodeString(ref1PUBobData.Sender1PUKDFHex)
require.NoError(t, err)
onePUKDFCharlieFromHex, err := hex.DecodeString(ref1PUCharlieData.Sender1PUKDFHex)
require.NoError(t, err)
okpWrapper := okpKWSupport{}
t.Run("test KDF for Bob", func(t *testing.T) {
sender1PUWithBobKDF, e := okpWrapper.deriveSender1Pu(protectedHeaderRefJWK.Alg, apuRef, apvRef, tag,
alicePrivKeyEPKRefOKP[:], alicePrivKeyRefOKP[:], bobPubKeyRefOKP[:], 32)
require.NoError(t, e)
require.EqualValues(t, onePUKDFBobFromHex, sender1PUWithBobKDF)
})
t.Run("test KDF for Charlie", func(t *testing.T) {
sender1PUWithCharlieKDF, e := okpWrapper.deriveSender1Pu(protectedHeaderRefJWK.Alg, apuRef, apvRef, tag,
alicePrivKeyEPKRefOKP[:], alicePrivKeyRefOKP[:], charliePubKeyRefOKP[:], 32)
require.NoError(t, e)
require.EqualValues(t, onePUKDFCharlieFromHex, sender1PUWithCharlieKDF)
})
// Appendix B example uses "A128KW" key wrapping.
ecKW := &ecKWSupport{}
t.Run("test key wrap for Bob", func(t *testing.T) {
bobAESBlock, err := ecKW.createPrimitive(onePUKDFBobFromHex)
require.NoError(t, err)
onePUKWBobFromB64, err := base64.RawURLEncoding.DecodeString(ref1PUBobData.Sender1PUKWB64)
require.NoError(t, err)
bobEncryptedKey, err := ecKW.wrap(bobAESBlock, cek)
require.NoError(t, err)
require.EqualValues(t, onePUKWBobFromB64, bobEncryptedKey)
bobDecryptedCEK, err := ecKW.unwrap(bobAESBlock, onePUKWBobFromB64)
require.NoError(t, err)
require.EqualValues(t, cek, bobDecryptedCEK)
})
t.Run("test key wrap for Charlie", func(t *testing.T) {
charlieAESBlock, err := ecKW.createPrimitive(onePUKDFCharlieFromHex)
require.NoError(t, err)
onePUKWCharlieFromB64, err := base64.RawURLEncoding.DecodeString(ref1PUCharlieData.Sender1PUKWB64)
require.NoError(t, err)
charlieEncryptedKey, err := ecKW.wrap(charlieAESBlock, cek)
require.NoError(t, err)
require.EqualValues(t, onePUKWCharlieFromB64, charlieEncryptedKey)
charlieDecryptedCEK, err := ecKW.unwrap(charlieAESBlock, onePUKWCharlieFromB64)
require.NoError(t, err)
require.EqualValues(t, cek, charlieDecryptedCEK)
})
}
| go |
{"interact.js":"<KEY>,"interact.min.js":"<KEY>}
| json |
/**
* Copyright (C) 2015 Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package common
import (
"fmt"
"reflect"
"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/apimachinery/pkg/watch"
kcache "k8s.io/client-go/tools/cache"
)
type InformerAddOrUpdateFunc func(interface{}, interface{}, watch.EventType)
type InformerDeleteFunc func(interface{})
func InformerFuncs(objType runtime.Object, addOrUpdateFunc InformerAddOrUpdateFunc, deleteFunc InformerDeleteFunc) kcache.ResourceEventHandlerFuncs {
handlerFuncs := kcache.ResourceEventHandlerFuncs{}
if addOrUpdateFunc != nil {
handlerFuncs.AddFunc = func(obj interface{}) {
addOrUpdateFunc(obj, nil, watch.Added)
}
handlerFuncs.UpdateFunc = func(old, cur interface{}) {
addOrUpdateFunc(cur, old, watch.Modified)
}
}
if deleteFunc != nil {
handlerFuncs.DeleteFunc = func(obj interface{}) {
if reflect.TypeOf(objType) != reflect.TypeOf(obj) {
tombstone, ok := obj.(kcache.DeletedFinalStateUnknown)
if !ok {
utilruntime.HandleError(fmt.Errorf("Couldn't get object from tombstone: %+v", obj))
return
}
obj = tombstone.Obj
if reflect.TypeOf(objType) != reflect.TypeOf(obj) {
utilruntime.HandleError(fmt.Errorf("Tombstone contained object, expected resource type: %v but got: %v", reflect.TypeOf(objType), reflect.TypeOf(obj)))
return
}
}
deleteFunc(obj)
}
}
return handlerFuncs
}
| go |
Australia’s Brad Haddin said Monday the tourists are desperate to end their Ashes “hurt” when they face England in the latest edition of Test cricket’s oldest rivalry.
The familiar foes begin a five-match series at Nottingham’s Trent Bridge ground on Wednesday with England bidding for a third straight series win over Australia — something they last managed in the 1950s — after a home success in 2009 was followed by a first triumph ‘Down Under’ in 24 years in 2011.
But vice-captain Haddin hopes the pain of those reverses will help fuel Australia’s bid to reclaim the urn.
“It hurts and that won’t go away,” the wicket-keeper said at Trent Bridge on Monday in an interview broadcast on Sky Sports.
“We’d love to make amends for that in this series and our progress over the last few weeks has been good. Now we’re just excited about one of the Tests being in a couple of days’ time. I think it’s important to live in the moment, there’s no point worrying what’s gone before.
“We can sit and talk about some great games in Australian cricket and English cricket, but it’s now about another exciting Test series in a couple of days’ time.
Haddin was less forthright about what role, if any, David Warner would play in Nottingham after he was suspended from Australia’s warm-up matches but cleared to play in the first Test after punching England’s Joe Root in a Birmingham bar last month.
Usually an opening batsman, Warner’s Trent Bridge prospects appeared to suffer a setback when new Australia coach Darren Lehmann, brought in after Mickey Arthur was sacked just 16 days before the Ashes, named Shane Watson and the recalled Chris Rogers as his first wicket pair.
But there has since been speculation Warner could bat elsewhere in the order. However, Haddin — due in at number seven — said: “I don’t know the team now. I can speculate on a lot of things but I don’t know the team. I know the openers, and I know who’s batting seventh.
“He’s got as good a chance as anyone in the squad but I haven’t been in discussions with him. Everyone’s excited about the campaign. It’s not hard to get up for a series like this. This is the biggest series that you play from a player’s point of view.
| english |
IFA, the world's largest consumer electronics and home appliance show, opened its doors for the 51st time on 1 September 2011.
For five hectic days, this annual extravaganza of all things electronic will redefine the consumer electronics landscape for the next 12 months.
IFA 2011 is not just another gadget show. It's a technology event on an enormous scale. Last year, the Internationale Funkausstellung Berlin attracted over 230,000 visitors. And yes, it is open to the public.
TechRadar is out at IFA in force - check out our IFA day one highlights video below.
Here's what's been announced at IFA 2011 so far:
Sony has officially named its two Android tablets - what was once known as the S1 will now be called the Sony Tablet S, while the Sony S2 is now the Sony Tablet P. We will be seeing both slates hit in Wi-Fi form from the end of September 2011 and while UK prices weren't confirmed, Sony said that the Tablet S will go on sale from $479 and the Tablet P from $599.
Dixons then followed up by opening Tablet S pre-orders and in the process announcing its Sony Tablet S UK price. The official Sony Tablet S UK price starts at £399.99 for the 16GB Wi-Fi only model. You can pre-order the 16GB Wi-Fi and 3G version for £499.99, or go for a bit more storage with the Wi-Fi only 32GB model for £499.99.
Sony also unveiled a 6-inch eReader - the Sony Reader Wi-Fi PRS-T1 - which weighs just 168 grams and is 8.9mm thick. The PRS-T1 features a one month battery life, is available in black, white and red and will allow borrowing from local libraries.
In the PC arena, Sony showed off its VAIO L 3D - or Vaio VPCL21S1E/B to give its full name - an all-in-one desktop with a 24-inch Full HD Vaio LED backlight display, and to its notebook collection, it's added a 15.5" model to its VAIO S Series. The 15.5-inch screen is Full HD affair, with an optional 'glasses-free 3D' panel so you can watch 3D Blu-rays simply by popping it over the screen.
For a more portable and ridiculous-looking 3D experience, Sony has made the Sony HMZ-T1 official. First shown at CES, this wearable personal 3D viewer streams content from your Blu-ray player or PS3, among other devices, STRAIGHT INTO YOUR EYES.
Also unveiled at IFA by Sony was the SMP-N200 Network Media Player, allowing people to turn any television into a connected TV.
Sony refreshed its arc line-up at IFA 2011, with the company announcing the Sony Xperia Arc S.
Also from Sony:
Our video of the key Sony products from our team at IFA in Berlin is below:
Samsung treated us to three new cameras at this year's IFA. The 18x superzoom WB750 compact brings a BSI (Back Side Illuminated) CMOS sensor and, for the first time in a compact, Samsung's own DSP 3 key component. Next up was the MV800 'Multiview' camera, billed as the world's first compact to feature a flip-up screen to make it easier to shoot from unusual angles.
Completing the trio is the NX200 compact system camera, featuring a 20.3 megapixel APS-C size CMOS sensor, 100 millisecond advanced autofocus and HD video recording.
Also from Samsung comes the Samsung Galaxy Tab 7.7, which was outed ahead of the press launch. The tablet features a 7.7" super AMOLED screen, 5100mAh battery, and is running Android 3.2 with Samsung's TouchWiz overlay on top. The tablet will come in 8GB, 16GB, 32GB and 64GB versions, and features a 2MP camera on the front and a 3MP snapper on the back. The Samsung Galaxy Tab 7.7 was officially unveiled shortly after.
Samsung also unveiled its 1.4GHz dual-core processor-packing, 5.3-inch screened Samsung Galaxy Note. That processor makes the Galaxy Note the world's most powerful smartphone - and the display specs completely blow the iPhone 4 away.
More on the Galaxy Note:
- Samsung Galaxy Note vs iPhone 4: which is best?
Samsung revealed its aluminium styled Series 7 Chronos laptop range ahead of the show opening. The Chronos 700Z5A is powered by the Intel Core i7 quad core processor and comes with a 15.6-inch screen, while the slightly lower-spec Chronos 700Z4A has a 15-inch screen and an Intel Huron River Core i5 2467M processor.
Samsung has also announced the PC Series-7 tablet, which can be docked to use as a Windows 7-running desktop PC, complete with Bluetooth keyboard and mouse. Windows 7 tablets haven't exactly set the world on fire, but we'd love to see this running Windows 8.
Also from Samsung:
Philips has been busy developing a host of new Full HD 3D TVs with integrated internet, LED display panels and the ability to convert 2D to 3D. So the 9000, 8000 and 7000 TV ranges have all seen an update.
IFA also saw Philips announce a new range of Cinema 21:9 TVs (dubbed Platinum and Gold) to bring smarter and smoother 3D plus the next generation of internet TV.
Also from Philips:
LG announced its new LW980T flagship TV range, combining 'the latest in 3D technology and SmartTV'. The new range, which will be available in 47- and 55-inch screen sizes, uses LG's Nano Full LED backlighting for a brighter, clearer picture. At the same time LG also announced its new HX906TX 3D surround sound system, featuring Dolby-certified 360 audio.
Plasma TVs are on LG's IFA launch list, too, with the PenTouch range of plasma TVs which allow people to draw and sketch straight onto the screen. We thought this was so you could draw moustaches on BBC news readers, but it turns out that using a connection to a PC you can draw and sketch and organise photos using the dedicated pen.
LG has also teamed up with Philips and Sharp on Smart TV apps. The three firms aim to create a standard for connected TV apps by collaborating on a common approach - and they've invited others to join.
HTC graced us with a couple of new Windows Phones: The HTC Titan, and our favourite name for a phone ever, the HTC Radar. HTC Titan brings 4.7-inches of Mango while the HTC Radar was given its official debut, with a release date set for October.
Toshiba has revealed that its AT200 tablet (aka the Toshiba Excite) will be just 7.7mm thick when it lands with Honeycomb 3.2. Spec-wise, it carries a 1.2GHz processor with 1GB of RAM to boot. Its high resolution display is a 10.1-incher, with resolution coming in at 1280x800 - the same as the Samsung Galaxy Note we saw earlier.
Toshiba has also bolstered its 3D TV line-up with the launch of the TL Series, which it says brings "exceptional value" Full HD 3D sets. We don't know how exceptional said value is as Tosh hasn't announced a price or release date yet. You'll need to factor in the cost of the active shutter glasses, though, as these are sold separately.
Or how about the UK's first glasses-free 3D TV? If you can step away from the 'exceptional value' end of the TV store, then you might be interested in the Toshiba 55ZL2. The high-end 55-inch ZL2 offers up face tracking, Resolution+, Auto-calibration, 2D to 3D conversion and smart TV features. The 3D is provided by lenticular lenslets, which can apparently offer up nine different viewing positions.
Also from Toshiba:
Lenovo has delivered one of the first Intel Ultrabook implementations. The Lenovo IdeaPad U300s runs various implementations of Intel's ULV (Ultra Low Voltage) variants of its Core i series processors and features SSD drives. A UK release date is, as yet, unknown but we don't think it'll be too long before you see it on UK streets.
"Thin and powerful" notebooks are all the rage what with Intel's hope that we'll start calling them 'ultrabooks' and stop buying MacBook Airs; and the Inspiron 14z is Dell's latest solution.
Netgear announced three new products designed to help you stream your entertainment around the home. The networking company revealed a smaller powerline networking set, the Powerline Nano Dual-port Set; the Universal Dual Band Wireless Internet Adapter for TV and Blu-Ray; and the Universal Push2TV Wireless PC to TV Adapter, which broadcasts content from a Windows PC screen to HDMI-compatible TV.
Creative unveiled its new Sound Blaster gaming headsets, including the Tactic360 Sigma, Tactic360 ION, Tactic3D Wrath and Tactic3D Omega.
Get the hottest deals available in your inbox plus news, reviews, opinion, analysis, deals and more from the TechRadar team.
After watching War Games and Tron more times that is healthy, Paul (Twitter, Google+) took his first steps online via a BBC Micro and acoustic coupler back in 1985, and has been finding excuses to spend the day online ever since. This includes roles editing .net magazine, launching the Official Windows Magazine, and now as Global EiC of TechRadar.
| english |
Cochlear's decision to begin building certain services on Amazon Web Services was first realised four years ago when it noticed that it needed to move faster, according to the company's chief software architect Victor Rodrigues.
Speaking to ZDNet, Rodrigues explained the implantable hearing aid solutions provider noticed that it was taking too long to deliver its clinical software, and needed to come up with a more efficient solution. The clinical software is used by clinicians who individually configure each device according to a patient's need, following the implantation of the solution.
"Our clinical software was distributed on CD, and that took up to four weeks to put the CD into production, to get the CDs produced, and then we'd ship them out to the regions and they are physically shipped out to the clinics," he said.
Rodrigues added that due to the length it used to take for the CDs to be delivered, it prevented the company from delivering software updates, such as new patch releases, in real-time.
But since moving the software onto AWS cloud using CloudFront and S3, Cochlear's delivery window has been reduced from four weeks to practically zero, Rodrigues said, assuring that the company is still able to remain compliant with regulatory requirements. The initial move was completed in the United States first, followed by Europe.
"All we need to do now is upload it through our system and just make the software available via a link. Our professionals would go and register and download it," he said.
Rodrigues said that the project helped familiarise Cochlear to the cloud and its benefits.
"Over time as we got more familiar with AWS and we started to see opportunities to resolve business problems, for example getting closer to your customer ... there was the opportunity to put things in the cloud because of the immediacy," he said.
As a result of this, the company recently launched Cochlear Link, a platform to enable clinicians to store patient data with Cochlear via the cloud.
Rodrigues explained previously, for instance, when an individual implant's processor malfunctioned, clinicians would have to contact Cochlear to reach the data that exists on the processor. But now with Cochlear Link, clinicians are able to download a patient's data right from the solution.
Rodrigues said the automation of the process has significantly improved the experience for patients.
"We started very small when we moved the data to Cochlear via S3 and made it available to our service and repair. But as we started seeing where this product could take us, within the confinement of regulation, it became apparent very quickly that AWS was going to fulfil what we felt a product like this would do for us," he said.
On the topic of moving data, Rodrigues recalled that the main issue the company faced was convincing clinicians in the UK that the data was going to be safely stored in the public cloud. He said Cochlear addressed the reluctance through education to convince people that the data would be safe in the cloud.
"When we started in the UK there was a lot of resistance of moving data to the public cloud. It was viewed with an air of scepticism, with preference of wanting the data to be in the UK," he said.
"It was a lot of negotiation to effectively assure them that when we moved data into S3 it would be on a server of Ireland, and so within the EU region."
With these two projects as successful proof points, Rodrigues said he hopes to see more of the company's existing services -- such as its website, professional portal, and recipient portal, which are still on-premises -- eventually be moved on the cloud, too.
He added that unlike other companies that often start in the cloud for development and test purposes, Cochlear went straight to using it for its core projects.
Disclosure: Aimee Chanthadavong travelled to AWS re:Invent with Amazon Web Services.
| english |
A Rochester, New York, police officer was fatally shot Thursday evening and another officer was injured after a gunman opened fire at them.
The Rochester Police Department said a male suspect approached the two officers and started shooting at them in an area on Bauman Street, WHEC, an NBC affiliate based in Rochester, reported. The officers were on duty at the time of the shooting.
One officer was transported to Rochester General Hospital and another was taken to Strong Memorial Hospital. It was later reported that one of the two officers died of his injuries. The condition of the other police officer was not immediately known.
Police Chief Dave Smith identified the deceased officer as Anthony Mazurkiewicz, a 29-year-old veteran of the force, according to Fox News. Another officer, identified as Sino Seng, was shot in the lower body, Smith said Friday morning. Seng has been on the force for eight years.
The motive behind the shooting was not known. No arrests have been made so far in the case.
Rochester Mayor Malik Evans issued a statement to WHAM-TV.
The City of Utica, New York Police Department, also reacted to the shooting. | english |
“The claim that Hindi unifies our country is absurd,” Mr. Vijayan said on Twitter. “That language is not the mother tongue of a majority of Indians. The move to inflict Hindi upon them amounts to enslaving them. Union Minister’s statement is a war cry against the mother tongues of non-Hindi speaking people,” he said.
Mr. Vijayan also added that India’s strength was its ability to embrace diversity, and that no Indian should feel alienated because of language.
“Sangh Parivar must relinquish divisive policies. They must realize that people can see through the ploy; that this is an attempt to divert attention from the real problems,” he said in his tweet.
Mr. Shah’s statement has also come in for sharp criticism from political leaders in Tamil Nadu, Karnataka, and BJP’s own allies.
DMK president M. K. Stalin said making Hindi as the national language would make non-Hindi speaking people secondary citizens and undermine the unity. “DMK founder Anna said if a language spoken by more people should be the national language, then the ubiquitous crow, and not the peacock, should be the national bird,” Mr. Stalin said.
PMK leader S. Ramadoss, an ally of the BJP, said while Mr. Shah had the right to extol the greatness of Hindi, he could not impose the language on others. “Hindi can never be the identity of India as it will lead to depriving the right of languages such as Tamil,” he said.
The Karnataka Rakshana Vedike (KRV) and other Kannada organisations held a protest rally in Bengaluru on Saturday, while Opposition parties Congress and Janata Dal (S) condemned Mr. Shah’s statement . Kannada activists observed Saturday as a “black day. ” State BJP leaders were silent on the subject through the day.
Congress leader Siddaramaiah tweeted that the “misinformation campaign that Hindi was our national language must stop and Hindi enjoyed the same status of Kannada in the Constitution. He said the opposition was not to Hindi, but to its imposition.
JD(S) leader H. D. Kumaraswamy argued along the same lines, asking Prime Minister Narendra Modi as to when the Centre would celebrate Kannada Divas across the nation, as Kannada too enjoyed the same status as Hindi in the Constitution. “Remember that Kannadigas too are part of the federal structure,” he said.
The Home Minister had said that it is “very important to have a language of the whole country which should become the identity of India globally”.
“India is a country of different languages and every language has its own importance but it is very important to have a language of the whole country which should become the identity of India globally,” he had said on Twitter, writing in Hindi. “Today, if one language can do the work of uniting the country, then it is the most spoken language, Hindi,” he had said. | english |
To promote her today's release "Malini And Co", twitter sensation Poonam Pandey is going to any extent. After all her extra ordinary skin shows won't make people run to theatres and she know it quite well.
In an unique marketing strategy, Poonam Pandey took to roads today to promote her film. She has started selling the tickets of "Malini and Co" directly on the roads to the people. Many are seen flocking around this hot lady on the pretext of buying tickets, but we know what's they are looking at.
Malini And Co. , is a Telugu film that has Poonam as a police officer and the film is all about her take on terrorism. | english |
{
"pci_projects_project_users_roles": "Rollen bearbeiten",
"pci_projects_project_users_roles_cancel": "Abbrechen",
"pci_projects_project_users_roles_edit": "Bestätigen",
"pci_projects_project_users_roles_edit_success": "Sie haben die Benutzerrechte erfolgreich bearbeitet. Die Änderungen sind nicht sofort wirksam und es kann bis zu 10 Minuten dauern, bis sie umgesetzt sind.",
"pci_projects_project_users_roles_edit_error": "Bei der Aktualisierung der Benutzerrollen ist ein Fehler aufgetreten: {{ message }}"
} | json |
<gh_stars>1-10
import React from "react";
import { storiesOf } from "@storybook/react";
import AlertText from "./";
import { alertTypes } from "../AlertBox";
storiesOf("Alerts|AlertText", module)
.add("_default", () => <AlertText message="default" />)
.add("Success", () => <AlertText type={alertTypes.SUCCESS} message="Success alert !" />)
.add("Info", () => <AlertText type={alertTypes.INFO} message="Success alert !" />)
.add("Warning", () => <AlertText type={alertTypes.WARNING} message="Success alert !" />)
.add("Error", () => <AlertText type={alertTypes.ERROR} message="Success alert !" />);
| javascript |
When Ranveer Singh invited Baba Ramdev on stage during Agenda Aaj Tak Conclave 2016 in Delhi, he could never have bargained for what happened next. The actor told the crowd to chant, "Hell yeah" if they wanted to see Ramdev dancing along with him on stage. The crowd was obliging, so was Ramdev. But once he got into his groove, the Baba was not so ready to oblige. "I would like to play Baba Ramdev in the biopic," joked Ranveer Singh. But before that happened, Ramdev really put the actor through the grind and ensured that when Ranveer emerged huffing and panting, he was ready to give up. (Source: Photo by APH Images) | english |
The Washington Wizards hope that their star point guard Russell Westbrook laces up for Game 3 as they host the Philadelphia 76ers at Capital One Arena. The Sixers have a commanding 2-0 lead in the first round of the 2021 NBA Playoffs and are expected to dominate the 8th-seeded Wizards once again. However, to make matters worse for Washington fans, Russell Westbrook suffered an apparent ankle injury in the fourth quarter of Game 2.
The former league MVP left the floor right before the infamous "popcorn" incident with a fan took place right as he was heading to the locker room.
NBA Playoffs 2021: Is Russell Westbrook playing tonight against the Philadelphia 76ers in Game 3?
Russell Westbrook has been listed as questionable against the Philadelphia 76ers for Game 3 of the first round of the 2021 NBA playoffs. He did not practice with the team yesterday and coach Scott Brooks said the team will determine his status based on how the point guard feels tomorrow. During his postgame press conference, Russell Westbrook said he would get treatment and should hopefully feel better.
Coach Scott Brooks spoke about Westbrook's status and how the star point guard had been beaten up earlier in the game. He said:
"I’ve seen him bounce back from some very not-so-good moments where you think he might be out for a couple of weeks. He’s tough. He’s not happy that he wasn’t able to finish the game, but he’s a winning basketball player."
Even if Russell Westbrook does lace up for the game, he is expected to be under a minutes restriction. We will have to see how that affects the Wizards down the stretch as they are 4-3 without him for the season.
The injury came at the worst possible time for the Washington Wizards as they are currently down 0-2 in the series. If they lose Game 3, recovering from a 0-3 deficit is next to impossible. No team has ever won a series after being down 0-3 in 140 occasions in NBA history.
Check out all NBA Trade Deadline 2024 deals here as big moves are made!
| english |
India’s star paddler G. Sathiyan will be leaving on October 15 to play in the Polish TT league. It has been quite a wait for the 27-year-old to get back to competition, and he is relieved that it is finally happening.
The two-time Pro-Tour men’s singles champion has been looking at various Airlines, and finally zeroed in on Air France . “ Air France was the only option after Lufthansa and Air India apparently cancelled their operations. I have to thank Air France , the Polish league authorities, the Polish TT Federation and Raman sir [who helped in taking to a source in Air France ] who were very supportive,” he said.
Sathiyan explained since he has already missed four matches in the Polish league, he will play four more in the second week of October at Gdansk before returning to India to apply for the Japanese visa - he is also scheduled to play in the Japanese league.
“My Japanese league visa is under process. The league there starts on November 15. I am planning to come back to India on October 30 and undergo a 14-day quarantine in India,” said the Asian Games medallist, ranked 32 in the world.
| english |
DHAKA (Metro Rail News): Bangladesh‘s capital has its first metro train, part of a Japanese-funded initiative to ease travelling in one of the world’s busiest cities.
“Metro rail is another achievement of Bangladesh,” the premier said, opening the 11. 73 km part of the Mass Rapid Transit (MRT) Line-6 of the metro rail project from Diabari to Agargaon by unveiling its plaque at Diabari in the city on 28 December.
Prime Minister Sheikh Hasina inaugurates the metro rail at the playground of sector-15 (C-1 Block) in the capital’s Uttara at 11:00 am by unveiling a plaque.
Prime Minister Sheikh Hasina inaugurated a portion of the 20-kilometer (12. 427-mile) urban rail project known as Line 6 Uttara to Agargaon from Uttara sector-15 playground. She will take the first official ride from Diabari of Uttara to Agargaon after buying a ticket. Marking the occasion, she also unveiled a commemorative stamp and a banknote.
The line connects Dhaka’s northern area to a centre of government offices and hospitals. It will eventually pass through the city to Motijheel’s financial sector in the south.
The project will significantly alter people’s movement in Dhaka, but its debut will give some much-needed political mileage to Hasina’s govt. The leader and her party are under pressure as the country in South Asia confront inflation and an energy crisis, its foreign currency reserves are depleting, and elections are anticipated in January 2024.
Rama added that it would be “naive to expect that congestion problems will go away” right away because every time a nation expands its public transportation system and increases its capacity, 90–95 per cent of the extra space on the roads is occupied by more vehicles.
Every day, Bangladesh’s economy loses 3. 2 million working hours to traffic congestion, costing the country’s economy billions of dollars annually. According to the Economist Intelligence Unit’s Global Livability Index for 2022, out of 172 cities around the world, Dhaka is the seventh least livable.
Japan also funds two other urban railway lines in Dhaka. According to the Japan International Cooperation Agency website, three metro lines would be able to accommodate two million passengers per day once they are all finished.
After six months, Hasina inaugurated the nation’s longest river bridge, extending more than six kilometres over the Padma River. | english |
<reponame>MrDML/LinKingPatch
{
"groups": [
{
"keys": "lianji_png,wddx_ball_01_png,wddx_ball_02_png,wddx_ball_03_png,wddx_ball_04_png,wddx_ball_05_png,wddx_ball_06_png,wddx_ball_07_png,comb_click_fnt,comb_click_png,flyNumber_fnt,flyNumber_png,ui_sheet_json,bloodConfig_json,dpsConfig_json,icon_sheet1_json,ui_sheet2_json,icon_stone_json,wddx_ball_08_png,wddx_ball_09_png,wddx_ball_10_png",
"name": "outResource"
}
],
"resources": [
{
"url": "assets/bigImage/lianji.png",
"type": "image",
"name": "lianji_png"
},
{
"url": "assets/bigImage/wddx_ball_01.png",
"type": "image",
"name": "wddx_ball_01_png"
},
{
"url": "assets/bigImage/wddx_ball_02.png",
"type": "image",
"name": "wddx_ball_02_png"
},
{
"url": "assets/bigImage/wddx_ball_03.png",
"type": "image",
"name": "wddx_ball_03_png"
},
{
"url": "assets/bigImage/wddx_ball_04.png",
"type": "image",
"name": "wddx_ball_04_png"
},
{
"url": "assets/bigImage/wddx_ball_05.png",
"type": "image",
"name": "wddx_ball_05_png"
},
{
"url": "assets/bigImage/wddx_ball_06.png",
"type": "image",
"name": "wddx_ball_06_png"
},
{
"url": "assets/bigImage/wddx_ball_07.png",
"type": "image",
"name": "wddx_ball_07_png"
},
{
"url": "assets/font/comb_click.fnt",
"type": "font",
"name": "comb_click_fnt"
},
{
"url": "assets/font/comb_click.png",
"type": "image",
"name": "comb_click_png"
},
{
"url": "assets/font/flyNumber.fnt",
"type": "font",
"name": "flyNumber_fnt"
},
{
"url": "assets/font/flyNumber.png",
"type": "image",
"name": "flyNumber_png"
},
{
"url": "assets/sheet/ui_sheet.json",
"type": "sheet",
"name": "ui_sheet_json",
"subkeys": "chou_chu,chou_jin,shouhuojinbi,touxiang-1,touxiang-2,touxiang-3,touxiang-4,touxiang-5,touxiang-cheng,touxiang-hong,touxiang-lan,touxiang-lv,touxiang-zi,wa_jues,wa_mofa,wa_shouc,wa_yajiu,wddx_bao_001,wddx_bao_001_baoshi,wddx_bao_001_jinbi,wddx_bao_001_kai,wddx_bao_002,wddx_bao_002_kai,wddx_bg_001,wddx_bg_0010,wddx_bg_0011,wddx_bg_0012,wddx_bg_0013,wddx_bg_0014,wddx_bg_0015,wddx_bg_0016,wddx_bg_0017,wddx_bg_0018,wddx_bg_002,wddx_bg_003,wddx_bg_004,wddx_bg_005,wddx_bg_006,wddx_bg_007,wddx_bg_008,wddx_bg_018,wddx_bg_019,wddx_bg_020,wddx_bg_021,wddx_bg_022,wddx_bg_028,wddx_bg_031,wddx_bg_033,wddx_bg_035,wddx_bg_036,wddx_bg_037,wddx_bt_001,wddx_bt_002,wddx_bt_003,wddx_bt_004,wddx_bt_005,wddx_bt_006,wddx_bt_007,wddx_bt_008,wddx_bt_009,wddx_bt_010,wddx_bt_011,wddx_bt_012,wddx_bt_013,wddx_bt_014,wddx_bt_015,wddx_bt_016,wddx_bt_017,wddx_bt_018,wddx_bt_019,wddx_bt_020,wddx_bt_021,wddx_bt_022,wddx_bt_023,wddx_bt_025,wddx_bt_026,wddx_ft_001,wddx_ft_002,wddx_ft_003,wddx_ft_004,wddx_ft_005,wddx_huangguan_1,wddx_huangguan_2,wddx_huangguan_3,wddx_ic_001,wddx_ic_002,wddx_ic_003,wddx_ic_004,wddx_ic_005,wddx_ic_006,wddx_ic_007,wddx_ic_008,wddx_ic_009,wddx_ic_010,wddx_ic_011,wddx_ic_012,wddx_ic_013,wddx_ic_014,wddx_ic_015,wddx_ic_016,wddx_ic_017,wddx_ic_029,wddx_ic_030,wddx_ic_128,wddx_line_001,wddx_line_002,wddx_line_003,wddx_red_point,yindaotishi"
},
{
"url": "config/dpsConfig.json",
"type": "json",
"name": "dpsConfig_json"
},
{
"url": "config/bloodConfig.json",
"type": "json",
"name": "bloodConfig_json"
},
{
"url": "assets/sheet/icon_sheet1.json",
"type": "sheet",
"name": "icon_sheet1_json",
"subkeys": "icon_10_4001,icon_10_4002,icon_10_4003,icon_10_4004,icon_10_4005,icon_9_4001,icon_9_4002,icon_9_4003,icon_9_4004,icon_9_4005"
},
{
"url": "assets/sheet/ui_sheet2.json",
"type": "sheet",
"name": "ui_sheet2_json",
"subkeys": "backg_neirdi,backg_shoucang,backg_tcbj,buttom_linqu,buttom_linquh,guanzuyouli_tb,icon_cloes,icon_close,icon_ddhezi,icon_sandian,img_banner,img_gghao,img_gzleft,img_liuc,img_tcbtdi,img_tjtish,jiangli_zuans,tcbt_gzhu,wddx_bt_033,wddx_ft_010,wddx_ft_011,wddx_ft_012,wddx_ft_013,wddx_ft_014,wddx_ft_015,wddx_ic_031,wddx_ic_032,wenzi_gzgzh"
},
{
"url": "assets/sheet/icon_stone.json",
"type": "sheet",
"name": "icon_stone_json",
"subkeys": "1,10,11,12,13,14,15,16,17,18,19,2,20,21,22,23,24,25,26,27,28,29,3,30,31,32,33,34,35,36,37,38,39,4,40,5,6,7,8,9"
},
{
"url": "assets/bigImage/wddx_ball_08.png",
"type": "image",
"name": "wddx_ball_08_png"
},
{
"url": "assets/bigImage/wddx_ball_09.png",
"type": "image",
"name": "wddx_ball_09_png"
},
{
"url": "assets/bigImage/wddx_ball_10.png",
"type": "image",
"name": "wddx_ball_10_png"
}
]
} | json |
{"group_id":"forward msg from pull (nb_writter:5 nb_readder:1)","function_id":"linear object poll","value_str":null,"throughput":null,"full_id":"forward msg from pull (nb_writter:5 nb_readder:1)/linear object poll","directory_name":"forward msg from pull (nb_writter_5 nb_readder_1)/linear object poll","title":"forward msg from pull (nb_writter:5 nb_readder:1)/linear object poll"} | json |
Hong Kong: In Hong Kong, when the tempo of traffic-light signals accelerates to about 800 ticks a minute, visually impaired residents know they can safely cross the road. But over the past six months of unrest, many streets have lost their beat.
Anti-government activists have smashed more than 700 traffic lights since demonstrations erupted in June, significantly altering the soundtrack of daily life for the southern Chinese-ruled city's estimated 174,800 visually impaired people.
While images of black-clad protesters hurling petrol bombs and riot police shooting tear gas have become ubiquitous, the visually impaired hear, rather than see, the unrest that has plunged the former British colony into crisis.
The holes and debris left behind after protesters dig up sidewalk bricks and scatter them across roads to disrupt traffic render pathways disorienting for people with a visual impairment.
"Suddenly I wonder why the road in front of me is now broken. Am I on the pavement or am I on the road? " said Joy Luk, 41, a blind lawyer who stands on the frontlines of protests and offers general legal advice to demonstrators.
"The people in Hong Kong think that as disabled people, we can do nothing to contribute to the betterment of society," Luk said. "Protesting is a way to express my opinion and to show my ability to others. "
Demonstrating, however, is not easy for Luk, who taps a white cane to feel for obstacles and relies on bystanders to guide her.
"Many people tell me to go straight, but for a blind person it is very hard to go straight," said Luk, who tends to veer left as she walks.
At a recent protest, several demonstrators' hands threaded through Luk's arm as they walked together along the route and offered grapes or homemade walnut cookies.
Recalling photos of Hong Kong she saw when she was younger and still had vision, Luk said: "Now the picture itself is not beautiful, but the hearts and minds of the people are very beautiful. "
Luk was born with 3% vision in one eye and lost all sight before she was 30.
Billy Wong, a 38-year-old visually impaired theology student, also supports the anti-government movement but has found himself increasingly home-bound due to escalating violence.
The "unified voice" he said he heard at earlier mass protests has been overtaken by the cacophony from clashes between protesters and police.
"When you turn on the TV . . . You hear people demonstrating, running. They are screaming. These sounds are so strange and unfamiliar to Hong Kong people," Wong said.
Wong finds it difficult to imagine the mass rallies.
"I would never be able to form an image of hundreds of thousands of people in one place," Wong said. "What would the scene look like? I can't imagine. "
One Facebook group has stepped into the breach by describing images and videos in text that can be dictated by phones.
Dorothy Ngan, one of the group's five editors, said the 20 volunteer audio describers found it increasingly harrowing to repeatedly watch the violent scenes that have been playing out on Hong Kong's streets. "Sometimes, I look at the photo and I can't write. Sometimes, I cry," Ngan said.
Another challenge for people with low vision or blindness has been the sudden closure of subway stations due to safety concerns.
W, a 50-year-old visually impaired woman who asked to be identified by her initial, plans her subway trips to the last step.
"If the entrance or lift is closed, it would be like hitting a dead end in a maze," she said.
W described Hong Kong before the protests as "a far away memory".
For Luk, the pro-democracy movement could be a step towards stronger legal protection for disadvantaged groups.
"If the system is fair to everyone, maybe we as minority groups can also have better rights," she said. (This story has not been edited by News18 staff and is published from a syndicated news agency feed - Reuters) | english |
The statement came from the government spokesman at a news conference in Tripoli.
Col. Qadhafi also sent a letter to the French and British leaders, and the U. N. secretary general, saying the resolution violates the U. N. charter and saying they would “regret” any intervention.
“Libya is not for you, Libya is for the Libyans,” he said. | english |
- Imran Khan says 80% women are stripped off their rights in rural Sindh.
- He asks nation to fight for future generation and “Haqeeqi Azadi”.
- “Pakistan is going through a decisive phase,” adds Khan.
ISLAMABAD: PTI Chairman Imran Khan Friday said that rural Sindh was going through the “worst form of slavery”, therefore, the nation will have to rise up to the occasion and wage jihad (holy war) for future generations.
Addressing a students’ convention in the federal capital, the former prime minister said that about 80% of women are stripped of their rights in rural Sindh, urging the nation to fight for the future generation and the “Haqiqi Azadi” (real freedom).
Once again criticising his political opponents, Khan said that the khalifahs (caliphs) in older times used to present themselves before the court but people like Nawaz Sharif and Zardari take money abroad.
“How will the country develop when it is ruled by these thieves?” he questioned.
The ex-premier said that the “thieves” have taken over Pakistan and their crimes are being gradually forgiven.
“Pakistan is going through a decisive phase as Shehbaz Sharif always visits different countries to humiliate Pakistan,” he added.
The PTI chief has announced resuming his “Haqiqi Azadi” Movement from Saturday (September 24) and appealed to the public to take to the streets as soon as he calls on them.
Khan has urged party workers and supporters to get ready for his call as establishing the “rule of law” was the country’s foremost need.
Since his ouster in April, Khan has time and again demanded “fair and free” snap polls, warning of a “strict reaction” if the government failed to yield to his demands.
| english |
{
"header": {
"title": "Театральные режиссёры Беларуси",
"nav": {
"home": "На главную",
"list": "К списку театральных режиссеров"
}
},
"description": {
"title": "Театр - это живое искусство",
"text": "Многие полагают, что театр важен не только в качестве развлечения, но и в качестве средства формирования культуры у новых поколений. Театр - это форма коллективного искусства, использующая живое выступление для передачи опыта воображаемых или реально имевших место событий. Музыка, танцы и прочие формы выступления на публику присутствуют во всех человеческих культурах. Настоящий Культурный портал был разработан в качестве учебного проекта школы Rolling Scopes School, и представляет собой онлайн-ресурс, посвященный белорусским режиссерам в рамках сохранения белорусского культурного наследия. На портале предоставлены подробные сведения и аудиовизуальные материалы об известных белорусских театральных режиссерах, их работах, деятельности и биографии."
},
"team": {
"title": "Наша команда",
"members": {
"first": {
"contribution": "Создание шаблона для генерации режиссёра, наполнение контентом, переводы на английский язык, адаптивный дизайн отдельных элементов, рефакторинг"
},
"second": {
"contribution": "Создание шаблона и дизайна домашней страницы с привязкой языкового плагина, добавление стилей для страницы списка режиссеров и кнопок переключения языка, работа с шаблоном страницы режиссера, создание адаптивного дизайна для описания на главной странице"
},
"third": {
"contribution": "Создание страницы режиссеров, работа с контентом, перевод на беларуский, добавление возможности переключения языков, адаптив некоторых элементов"
},
"fourth": {
"contribution": "Сбор текстовой, аудио- и видео информации, создание адаптивного дизайна отдельных элементов, создание поисковой строки"
}
}
},
"directorOfTheDay": {
"title": "Театральный режиссёр дня",
"button": "Читать больше"
},
"pageNotFound": "404! Страница куда-то пропала..."
} | json |
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Germination behavior of Jatropha curcas L. after different imbibition times</title>
<meta name="description" content="Research paper about germination in <em>J. curcas</em> under different imbibition times">
<meta name="generator" content="bookdown 0.7.1 and GitBook 2.6.7">
<meta property="og:title" content="Germination behavior of Jatropha curcas L. after different imbibition times" />
<meta property="og:type" content="book" />
<meta property="og:url" content="https://flavjack.github.io/20150607PE/" />
<meta property="og:image" content="https://flavjack.github.io/20150607PE/img/cover.jpg" />
<meta property="og:description" content="Research paper about germination in <em>J. curcas</em> under different imbibition times" />
<meta name="github-repo" content="flavjack/20150607PE" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Germination behavior of Jatropha curcas L. after different imbibition times" />
<meta name="twitter:description" content="Research paper about germination in <em>J. curcas</em> under different imbibition times" />
<meta name="twitter:image" content="https://flavjack.github.io/20150607PE/img/cover.jpg" />
<meta name="author" content="Lozano-Isla, F.1; Miranda, PV.1; Pompelli, MF.1,*">
<meta name="date" content="2018-03-10">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="shortcut icon" href="img/icon.png" type="image/x-icon">
<link rel="prev" href="figures.html">
<script src="libs/jquery-2.2.3/jquery.min.js"></script>
<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
<div class="book-summary">
<nav role="navigation">
<ul class="summary">
<li> <a href="http://www.lozanoisla.com" target="blank"> <NAME> </a> </li>
<li class="divider"></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i>Afilliation</a></li>
<li class="chapter" data-level="" data-path="abstract.html"><a href="abstract.html"><i class="fa fa-check"></i>Abstract</a></li>
<li class="chapter" data-level="1" data-path="introduction.html"><a href="introduction.html"><i class="fa fa-check"></i><b>1</b> Introduction</a></li>
<li class="chapter" data-level="2" data-path="materials-and-methods.html"><a href="materials-and-methods.html"><i class="fa fa-check"></i><b>2</b> Materials and Methods</a><ul>
<li class="chapter" data-level="2.1" data-path="materials-and-methods.html"><a href="materials-and-methods.html#plant-material"><i class="fa fa-check"></i><b>2.1</b> Plant material</a></li>
<li class="chapter" data-level="2.2" data-path="materials-and-methods.html"><a href="materials-and-methods.html#seed-imbibiton-test-and-water-relation"><i class="fa fa-check"></i><b>2.2</b> Seed imbibiton test and water relation</a></li>
<li class="chapter" data-level="2.3" data-path="materials-and-methods.html"><a href="materials-and-methods.html#germination-test"><i class="fa fa-check"></i><b>2.3</b> Germination test</a></li>
<li class="chapter" data-level="2.4" data-path="materials-and-methods.html"><a href="materials-and-methods.html#data-analysis"><i class="fa fa-check"></i><b>2.4</b> Data analysis</a></li>
</ul></li>
<li class="chapter" data-level="3" data-path="results.html"><a href="results.html"><i class="fa fa-check"></i><b>3</b> Results</a><ul>
<li class="chapter" data-level="3.1" data-path="results.html"><a href="results.html#electrical-conductivity-and-ph-evaluation"><i class="fa fa-check"></i><b>3.1</b> Electrical conductivity and pH evaluation</a></li>
<li class="chapter" data-level="3.2" data-path="results.html"><a href="results.html#seed-water-relation"><i class="fa fa-check"></i><b>3.2</b> Seed water relation</a></li>
<li class="chapter" data-level="3.3" data-path="results.html"><a href="results.html#seed-germination-analisys"><i class="fa fa-check"></i><b>3.3</b> Seed germination analisys</a></li>
<li class="chapter" data-level="3.4" data-path="results.html"><a href="results.html#multivariate-analisys"><i class="fa fa-check"></i><b>3.4</b> Multivariate analisys</a></li>
</ul></li>
<li class="chapter" data-level="4" data-path="discussion.html"><a href="discussion.html"><i class="fa fa-check"></i><b>4</b> Discussion</a></li>
<li class="chapter" data-level="5" data-path="conclusions.html"><a href="conclusions.html"><i class="fa fa-check"></i><b>5</b> Conclusions</a></li>
<li class="chapter" data-level="6" data-path="acknowledgments.html"><a href="acknowledgments.html"><i class="fa fa-check"></i><b>6</b> Acknowledgments</a></li>
<li class="chapter" data-level="" data-path="figures.html"><a href="figures.html"><i class="fa fa-check"></i>Figures</a></li>
<li class="chapter" data-level="" data-path="references.html"><a href="references.html"><i class="fa fa-check"></i>References</a></li>
<li class="divider"></li>
<li> <a href="http://revistas.lamolina.edu.pe/index.php/jpagronomy/article/view/1065" target="blank"> Peruvian Journal of Agronomy </a> </li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Germination behavior of <em>Jatropha curcas</em> L. after different imbibition times</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<section class="normal" id="section-">
<div id="references" class="section level1 unnumbered">
<h1>References</h1>
<div id="refs" class="references">
<div>
<p><NAME>., <NAME>., <NAME>., 1991. Association of differences in seed vigour in long bean ( <em>vigna sesquipedalis</em>) with testa colour and imbibition damage. The Journal of Agricultural Science 116, 259. <a href="https://doi.org/10.1017/s0021859600077662" class="uri">https://doi.org/10.1017/s0021859600077662</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., 2010. Revisited jatropha curcas as an oil plant of multiple benefits: Critical research needs and prospects for the future. Environmental Science and Pollution Research 18, 127–131. <a href="https://doi.org/10.1007/s11356-010-0400-5" class="uri">https://doi.org/10.1007/s11356-010-0400-5</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., 2015. Ultrastructural and biochemical changes induced by salt stress in <em>jatropha curcas</em> seeds during germination and seedling development. Functional Plant Biology 42, 865. <a href="https://doi.org/10.1071/fp15019" class="uri">https://doi.org/10.1071/fp15019</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., 2011. Water relations and some aspects of leaf metabolism of <em>jatropha curcas</em> young plants under two water deficit levels and recovery. Brazilian Journal of Plant Physiology 23, 123–130. <a href="https://doi.org/10.1590/s1677-04202011000200004" class="uri">https://doi.org/10.1590/s1677-04202011000200004</a></p>
</div>
<div>
<p><NAME>., <NAME>., 2008. Biodiesel production from crude <em>jatropha curcas</em> l. seed oil with a high content of free fatty acids. Bioresource Technology 99, 1716–1721. <a href="https://doi.org/10.1016/j.biortech.2007.03.051" class="uri">https://doi.org/10.1016/j.biortech.2007.03.051</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., 2010. Protein deterioration and longevity of quinoa seeds during long-term storage. Food Chemistry 121, 952–958. <a href="https://doi.org/10.1016/j.foodchem.2010.01.025" class="uri">https://doi.org/10.1016/j.foodchem.2010.01.025</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., 2008. <em>Jatropha curcas</em> l.: Biodiesel solution or all hype. A scientific approach, economic and political analysis of the future energy crop. Chicago Univ., Energy and Energy policy, Spring 1001–1005.</p>
</div>
<div>
<p><NAME>., <NAME>., 1999. Seed longevity and deterioration. Springer US. <a href="https://doi.org/10.1007/978-1-4615-1783-2_8" class="uri">https://doi.org/10.1007/978-1-4615-1783-2_8</a></p>
</div>
<div>
<p>de Mendiburu, F., 2017. Agricolae: Statistical procedures for agricultural research.</p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., 2017. Experimental study and prediction of the performance and exhaust emissions of mixed <em>jatropha curcas</em>-<em>ceiba pentandra</em> biodiesel blends in diesel engine using artificial neural networks. Journal of Cleaner Production 164, 618–633. <a href="https://doi.org/10.1016/j.jclepro.2017.06.065" class="uri">https://doi.org/10.1016/j.jclepro.2017.06.065</a></p>
</div>
<div>
<p><NAME>., <NAME>., 1981. Role of the testa in preventing cellular rupture during imbibition of legume seeds. PLANT PHYSIOLOGY 67, 449–456. <a href="https://doi.org/10.1104/pp.67.3.449" class="uri">https://doi.org/10.1104/pp.67.3.449</a></p>
</div>
<div>
<p><NAME>., <NAME>., 2014. Effect of sodium chloride on growth of jatropha (<em>jatropha curcas</em> l.) young transplants. Universal Journal of Plant Science 2, 19–22.</p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., others, 2005. Seed source variation in morphology, germination and seedling growth of <em>jatropha curcas</em> linn. in central india. Silvae genetica 54, 76–79.</p>
</div>
<div>
<p><NAME>., <NAME>., 1995. Handbook of vigour test methods. The International Seed Testing Association, Zurich (Switzerland).</p>
</div>
<div>
<p><NAME>., <NAME>., 1972. Interaction of initial seed moisture and imbibitional temperature on germination and productivity of soybean. Crop Science 12, 664. <a href="https://doi.org/10.2135/cropsci1972.0011183x001200050033x" class="uri">https://doi.org/10.2135/cropsci1972.0011183x001200050033x</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., 2017. FactoMineR: Multivariate exploratory data analysis and data mining.</p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., 1988. Analysis of physical states of water in soybean seeds by NMR. Agricultural and Biological Chemistry 52, 2777–2781. <a href="https://doi.org/10.1271/bbb1961.52.2777" class="uri">https://doi.org/10.1271/bbb1961.52.2777</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>, <NAME>., 2009. Imbibition phases and germination response of <em>mimosa bimucronata</em> (fabaceae: Mimosoideae) to water submersion. Aquatic Botany 91, 105–109. <a href="https://doi.org/10.1016/j.aquabot.2009.03.004" class="uri">https://doi.org/10.1016/j.aquabot.2009.03.004</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., 2014. Recent scenario and technologies to utilize non-edible oils for biodiesel production. Renewable and Sustainable Energy Reviews 37, 840–851. <a href="https://doi.org/10.1016/j.rser.2014.05.064" class="uri">https://doi.org/10.1016/j.rser.2014.05.064</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., 2008. Role of seed coat in imbibing soybean seeds observed by micro-magnetic resonance imaging. Annals of Botany 102, 343–352. <a href="https://doi.org/10.1093/aob/mcn095" class="uri">https://doi.org/10.1093/aob/mcn095</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., 2002. Seed dormancy and germination. Current Opinion in Plant Biology 5, 33–36. <a href="https://doi.org/10.1016/s1369-5266(01)00219-9" class="uri">https://doi.org/10.1016/s1369-5266(01)00219-9</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., 2017. GerminaR: Germination indexes for seed germination variables for ecophysiological studies.</p>
</div>
<div>
<p><NAME>., 1998. New approaches to seed vigor testing. Scientia Agricola 55, 27–33. <a href="https://doi.org/10.1590/s0103-90161998000500005" class="uri">https://doi.org/10.1590/s0103-90161998000500005</a></p>
</div>
<div>
<p><NAME>., <NAME>., 2006. Mean germination time as an indicator of emergence performance in soil of seed lots of maize (<em>zea mays</em>). Seed Science and Technology 34, 339–347. <a href="https://doi.org/10.15258/sst.2006.34.2.09" class="uri">https://doi.org/10.15258/sst.2006.34.2.09</a></p>
</div>
<div>
<p><NAME>., <NAME>., 2006. Electrical conductivity vigour test: Physiological basis and use. Seed Testing International 131, 32–35.</p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., 2013. Germination responses of <em>jatropha curcas</em> l. seeds to storage and aging. Industrial Crops and Products 44, 684–690. <a href="https://doi.org/10.1016/j.indcrop.2012.08.035" class="uri">https://doi.org/10.1016/j.indcrop.2012.08.035</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., 2012. <em>Jatropha curcas</em>: A potential biofuel plant for sustainable environmental development. Renewable and Sustainable Energy Reviews 16, 2870–2883. <a href="https://doi.org/10.1016/j.rser.2012.02.004" class="uri">https://doi.org/10.1016/j.rser.2012.02.004</a></p>
</div>
<div>
<p><NAME>., <NAME>., 1977. Transient changes during soybean imbibition. PLANT PHYSIOLOGY 59, 1111–1115. <a href="https://doi.org/10.1104/pp.59.6.1111" class="uri">https://doi.org/10.1104/pp.59.6.1111</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., 1969. Vigor of garden bean seeds and seedlings influenced by initial seed moisture, substrate oxygen, and imbibition temperature. Journal of the American Society for Horticultural Science 94, 577–584.</p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., 2010. Photosynthesis, photoprotection and antioxidant activity of purging nut under drought deficit and recovery. Biomass and Bioenergy 34, 1207–1215. <a href="https://doi.org/10.1016/j.biombioe.2010.03.011" class="uri">https://doi.org/10.1016/j.biombioe.2010.03.011</a></p>
</div>
<div>
<p><NAME>., <NAME>, <NAME>, <NAME>, <NAME>., 2010. Environmental influence on the physico-chemical and physiological properties of <em>jatropha curcas</em> seeds. Australian Journal of Botany 58, 421. <a href="https://doi.org/10.1071/bt10102" class="uri">https://doi.org/10.1071/bt10102</a></p>
</div>
<div>
<p><NAME>., 1986. Cell membranes and seed leachate conductivity in relation to the quality of seed for sowing. Journal of Seed Technology 81–100.</p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., 1986. The role of imbibition damage in determining the vigour of white and coloured seed lots of dwarf french beans (<em>phaseolus vulgaris</em>). Journal of Experimental Botany 37, 716–722. <a href="https://doi.org/10.1093/jxb/37.5.716" class="uri">https://doi.org/10.1093/jxb/37.5.716</a></p>
</div>
<div>
<p><NAME>., <NAME>., 1981. A physical explanation for solute leakage from dry pea embryos during imbibition. Journal of Experimental Botany 32, 1045–1050. <a href="https://doi.org/10.1093/jxb/32.5.1045" class="uri">https://doi.org/10.1093/jxb/32.5.1045</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., 2009. Non-reducing sugar levels in beech (<em>fagus sylvatica</em>) seeds as related to withstanding desiccation and storage. Journal of Plant Physiology 166, 1381–1390. <a href="https://doi.org/10.1016/j.jplph.2009.02.013" class="uri">https://doi.org/10.1016/j.jplph.2009.02.013</a></p>
</div>
<div>
<p>R Core Team, 2017. R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria.</p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., <NAME>, <NAME>., <NAME>., 2015. Metabolite profiling of the oilseed crop <em>ricinus communis</em> during early seed imbibition reveals a specific metabolic signature in response to temperature. Industrial Crops and Products 67, 305–309. <a href="https://doi.org/10.1016/j.indcrop.2015.01.067" class="uri">https://doi.org/10.1016/j.indcrop.2015.01.067</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., 2017. Effect of seed priming with different concentrations of potassium nitrate on the pattern of seed imbibition and germination of rice ( <em>oryza sativa</em> l.). Journal of Integrative Agriculture 16, 605–613. <a href="https://doi.org/10.1016/s2095-3119(16)61441-7" class="uri">https://doi.org/10.1016/s2095-3119(16)61441-7</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., <NAME>., 2012. Desert species adapted for dispersal and germination during floods: Experimental evidence in two <em>astrophytum</em> species (cactaceae). Flora - Morphology, Distribution, Functional Ecology of Plants 207, 707–711. <a href="https://doi.org/10.1016/j.flora.2012.08.002" class="uri">https://doi.org/10.1016/j.flora.2012.08.002</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., <NAME>., 2013. Minimal descriptors for characterization and evaluation of <em>jatropha curcas</em> l. germplasm for utilization in crop improvement. Biomass and Bioenergy 48, 239–249. <a href="https://doi.org/10.1016/j.biombioe.2012.11.008" class="uri">https://doi.org/10.1016/j.biombioe.2012.11.008</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., 1990. Investigation of the relationship between seed leachate conductivity and the germination of <em>brassica</em> seed. Annals of Applied Biology 117, 129–135. <a href="https://doi.org/10.1111/j.1744-7348.1990.tb04201.x" class="uri">https://doi.org/10.1111/j.1744-7348.1990.tb04201.x</a></p>
</div>
<div>
<p><NAME>., <NAME>., 1984. Bound water in soybean seed and its relation to respiration and imbibitional damage. PLANT PHYSIOLOGY 75, 114–117. <a href="https://doi.org/10.1104/pp.75.1.114" class="uri">https://doi.org/10.1104/pp.75.1.114</a></p>
</div>
<div>
<p><NAME>., <NAME>., 2017. Corrplot: Visualization of a correlation matrix.</p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., 2007. Hydrotime analysis of <em>lesquerella fendleri</em> seed germination responses to priming treatments. Industrial Crops and Products 25, 70–74. <a href="https://doi.org/10.1016/j.indcrop.2006.07.004" class="uri">https://doi.org/10.1016/j.indcrop.2006.07.004</a></p>
</div>
<div>
<p><NAME>., <NAME>., <NAME>., <NAME>., <NAME>., 2011. Germination responses to temperature and water potential in <em>jatropha curcas</em> seeds: A hydrotime model explains the difference between dormancy expression and dormancy induction at different incubation temperatures. Annals of Botany 109, 265–273. <a href="https://doi.org/10.1093/aob/mcr242" class="uri">https://doi.org/10.1093/aob/mcr242</a></p>
</div>
<div>
<p><NAME>., <NAME>., 1979. Evaluation of vigor tests in soybean seeds: Relationship of the standard germination test, seedling vigor classification, seedling length, and tetrazolium staining to field performance1. Crop Science 19, 247. <a href="https://doi.org/10.2135/cropsci1979.0011183x001900020019x" class="uri">https://doi.org/10.2135/cropsci1979.0011183x001900020019x</a></p>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
<a href="figures.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
</div>
</div>
<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
<script src="libs/gitbook-2.6.7/js/lunr.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script>
gitbook.require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": {
"github": true,
"facebook": false,
"twitter": false,
"google": false,
"linkedin": false,
"weibo": false,
"instapper": false,
"vk": false,
"all": ["facebook", "google", "twitter", "linkedin", "weibo", "instapaper"]
},
"fontsettings": {
"theme": "sepia",
"family": "sans",
"size": 2
},
"edit": {
"link": "https://github.com/Flavjack/20150607PE/blob/master/ref.Rmd",
"text": "Edit"
},
"download": ["20150607PE.docx", "20150607PE.pdf"],
"toc": {
"collapse": "section",
"scroll_highlight": true
},
"search": true
});
});
</script>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
var src = "";
if (src === "" || src === "true") src = "https://cdn.bootcss.com/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML";
if (location.protocol !== "file:" && /^https?:/.test(src))
src = src.replace(/^https?:/, '');
script.src = src;
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body>
</html>
| html |
<reponame>stormcat24/go-assign<filename>example/testdata/config-tmpl.json
{
"helloAPIDomain": "hello-api.example.com",
"helloAPITokenFile": "{{ .HelloAPITokenFile }}",
"worldAPIDomain": "world-api.example.com",
"worldAPITokenFile": "{{ .WorldAPITokenFile }}"
} | json |
{
"id": 709,
"source": "gileadi",
"verse_id": 18878,
"verse_count": 4,
"reference": "63:11\u201314",
"title": "",
"html": " <p>For some of Jehovah’s people the impact of covenant curses that follow them as a result of unrepented sins have the desired effect—they turn back to their God (<a class=\"isa\" verses=\"W1sxODAyN10seyIxODI1NyI6Mn1d\">Isaiah 19:22; 31:6-7<\/a>). They recall the wonderful acts Jehovah performed in times past, such as Israel’s exodus out of Egypt, and they wonder why, amidst so many calamities now overtaking them, he doesn’t do the same for them. Little do they know that for those who responded to his servant’s summons to repent of evil and return in the new exodus to Zion those very events are indeed in the process of happening, while for them it is too late. <\/p> <p>Word links identify Jehovah’s servant as his “shepherd,” as endowed with his “Spirit,” as a new Moses who dries up “the deep,” and as his <em>arm<\/em>, and <em>right hand <\/em>: “My servant whom I sustain, my chosen one in whom I delight, him I have endowed with my Spirit” (<a class=\"isa\" verses=\"WzE4NDgyXQ==\">Isaiah 42:1<\/a>); “Who says to the deep, ‘Become dry; I am drying up your currents,’ who says of Cyrus, ‘He is my shepherd’” (<a class=\"isa\" verses=\"eyIxODU2MSI6Mn0=\">Isaiah 44:27-28<\/a>); “Like a shepherd he pastures his flock: the lambs he gathers up with his <em>arm<\/em>,” (<a class=\"isa\" verses=\"WzE4NDMyXQ==\">Isaiah 40:11<\/a>; emphasis added); “Jehovah has sworn by his <em>right hand<\/em>, his mighty <em>arm<\/em>,” (<a class=\"isa\" verses=\"WzE4ODYzXQ==\">Isaiah 62:8<\/a>; emphasis added). <\/p> <p>As Jehovah made an “everlasting name” for himself and acquired “illustrious renown” when he performed wonders for his people anciently (<a class=\"ref\">Exodus 9:16; Joshua 9:9<\/a>), so he does when he delivers his end-time people: “In that day you will say, ‘Give thanks to Jehovah; invoke his name. Make known his deeds among the nations; commemorate his exalted name.’ Sing in praise of Jehovah, who has performed wonders; let it be acknowledged throughout the earth! Shout and sing for joy, O inhabitants of Zion, for renowned among you is the Holy One of Israel” (<a class=\"isa\" verses=\"eyIxNzkwNSI6M30=\">Isaiah 12:4-6<\/a>; cf. <a class=\"ref\">Jeremiah 16:14-15<\/a>). <\/p>",
"audit": 1
} | json |
<reponame>EnoshWang/ADFServer
/*
* @Author: enosh.wang
* @Date: 2021-06-27 16:08:39
* @Last Modified by: enosh.wang
* @Last Modified time: 2021-06-27 16:12:01
*/
#ifdef __linux__
#include "eventHandle.hpp"
#include "reactor.hpp"
#define MAX_BUF_LEN 1024
void EventHandle::handAccept(int fd, int events, void *arg) noexcept
{
auto reactor = (Reactor *)arg;
if (nullptr == reactor)
return;
struct sockaddr_in sock_client;
socklen_t len = sizeof(sock_client);
int clientfd = accept(fd, (struct sockaddr *)&sock_client, &len);
if (-1 == clientfd)
return;
do
{
int flag = fcntl(clientfd, F_SETFL, O_NONBLOCK);
if (flag < 0)
{
std::cout << "set non block failed." << std::endl;
break;
}
EventHandle *evHanlde = new EventHandle(clientfd);
if (nullptr == evHanlde)
return;
reactor->registerEventHandle(evHanlde, Event_Recv);
} while (0);
}
void EventHandle::handSend(int fd, int events, void *arg) noexcept
{
auto reactor = (Reactor *)arg;
if (nullptr == reactor)
return;
}
void EventHandle::handRecv(int fd, int events, void *arg) noexcept
{
auto reactor = (Reactor *)arg;
if (nullptr == reactor)
return;
char buff[MAX_BUF_LEN];
memset(buff, 0, MAX_BUF_LEN);
int len = recv(fd, buff, MAX_BUF_LEN, 0);
if (len > 0)
{
std::cout << "Recv buff: " << buff << std::endl;
auto retWrite = write(fd, buff, len);
std::cout << "Write " << retWrite << " bytes to client." << std::endl;
}
else if (len == 0) // client close
{
auto handle = reactor->getEventHandle(fd);
reactor->removeEventHandle(handle);
close(fd);
}
else
{
close(fd);
}
return;
}
#endif | cpp |
{"id": 38583, "date": "2014-12-03 20:55:17", "user": "jorjee001", "post": "<center><img src=\"http://sppnetwork.com/image/logo.png\" alt=\"\"></center>\r\n<center><h2><strong>SPPNetwork Group.</strong></h2></center>\r\n\r\n\r\n\r\n<strong>About Us</strong> SiamPowerWeb (Siam.pw), Since 2010. We are company based in Thailand. Nowaday we offer Complete Solution for customer such as Hosting, Domain, LinuxVPS, WindowsVPS and Dedicated Server. We offer 15 days money back guaranteed.\r\n\r\n\r\n<strong>Old Name</strong> : PrincessHost (Princesshost.com) - Registered since 2010\r\n\r\n<strong>Current Name</strong> : SiamPowerWeb (http://www.siam.pw) - Registered since 2013\r\n\r\n<p>=========================================</p>\r\n<strong>December promotion for LET & LEB User! Please enjoy!!!</strong>\r\n<p>=========================================</p>\r\n\r\n<strong>Promo 1GB</strong>\r\n \r\nCPU Processor : 1 Cores\r\n \r\nRAID-1 Storage : 10 GB\r\n \r\nGuaranteed Memory : 1 GB\r\n\r\nPremium Bandwidth : 500 GB\r\n\r\nPrmotion Price : $20 /year.\r\n\r\nORDER : https://www.jorjeeservice.com/cart.php?a=add&pid=54\r\n\r\n\r\n\r\n<strong>Promo 2GB</strong>\r\n \r\nCPU Processor : 1 Cores\r\n \r\nRAID-1 Storage : 30 GB\r\n \r\nGuaranteed Memory : 2 GB\r\n\r\nPremium Bandwidth : 1000 GB\r\n\r\nPrmotion Price : $40 /year.\r\n\r\nORDER : https://www.jorjeeservice.com/cart.php?a=add&pid=55\r\n\r\n\r\n\r\n\r\n<strong>Promo 4GB</strong>\r\n \r\nCPU Processor : 2 Cores\r\n \r\nRAID-1 Storage : 50 GB\r\n \r\nGuaranteed Memory : 4 GB\r\n\r\nPremium Bandwidth : 1000 GB\r\n\r\nPrmotion Price : $6.95 /month. <del>(Nomally $23.95 /month.)</del>\r\n\r\nORDER : https://www.jorjeeservice.com/cart.php?a=add&pid=25&promocode=LETLEB\r\n\r\n<p>=========================================</p>\r\n\r\n<strong>SolusVM - One Click OS-Reinstall</strong>\r\n\r\nTemplate - Ubuntu Desktop XFCE\r\n\r\nTemplate - CentOS Kloxo Control Panel\r\n\r\nTemplate - CentOS Vesta Control Panel\r\n\r\nOS - CentOS, Debian, Ubuntu, Suse, Fedora or Custom.\r\n\r\n<p>=========================================</p>\r\n<strong>Dedicated Server Spec</strong>\r\n\r\nDell PowerEdge C1100 Rack Server\r\n\r\nDual Intel\u00ae Xeon\u00ae Processor L5520\r\n\r\nHarddisk : 2x1TB SATA3 RAID-1\r\n\r\nMemory : 72GB DDR3 ECC\r\n\r\nInternet Connection : 100Mbps\r\n\r\nIDC : Lasvegas, Nevada, USA\r\n\r\n<p>=========================================</p>\r\n<strong>Service Level Agreement</strong>\r\n\r\n15 days money back guaranteed\r\n\r\n99.99% Uptimes Guatanteed\r\n\r\n<p>=========================================</p>\r\n<strong>Contact US</strong>\r\n\r\nName : <NAME> (Jorjee)\r\n\r\nEmail : <EMAIL>, <EMAIL>.com\r\n<p>=========================================</p>\r\n<p>Test IP : 192.168.127.12</p>\r\n<p>WebSite : http://www.siam.pw</p>\r\n<p>Fanpage : https://www.facebook.com/SPPNetwork</p>\r\n<p>Copyright \u00a9 2010-2014 SiamPowerWeb. All Rights Reserved.</p>\r\n<p>=========================================</p>\r\n"} | json |
/**
*
* @Name:自动加载表格操作
* @Author:HL
*
*/
layui.define(['jquery'], function(exports) {
"use strict";
var $ = layui.$
,baseUtil = {};
/**
* 继承一个类
*
* @param subClass
* 子类
* @param superClass
* 要继承的父类
*/
baseUtil.extend = function(subClass, superClass) {
var func = function() {
};
func.prototype = superClass.prototype;
subClass.prototype = new func();
subClass.prototype.constructor = subClass;
subClass.superClass = superClass.prototype;
if (superClass.prototype.constructor == Object.prototype.constructor) {
superClass.prototype.constructor = superClass;
}
};
/**
* 判断指定对象是否为函数
*
* @param obj
* 要判断的对象
* @return 返回一个值,该值标识对象是否为函数
*/
baseUtil.isFunction = function(obj) {
return typeof(obj) == "function";
};
/**
* 判断指定对象是否为空或者空字符串
*
* @param obj
* 要判断的对象
* @return 返回一个值,该值标识对象是否为空或者空字符串
*/
baseUtil.isNullOrEmpty = function(obj) {
return typeof(obj) == "undefined" || obj == null || obj == "";
};
/**
* layero:弹窗页面
* data:需要传递的参数(json格式)
*/
baseUtil.setLayerParam = function(layero,data){
var layerPage = layero.find("iframe").contents().find(".layerCard").click();
$.each(data, function(i, val) {
if(!baseUtil.isNullOrEmpty(val)){
layerPage.append("<input id='layerparam_"+i+"' type='hidden' name='layerparam' value='"+val+"'>");
}
});
}
/**
* 获取父页面传过来的参数实体
*/
baseUtil.getLayerParentParam = function(){
var returnObj = {},
flag = false;
$("input[name='layerparam']").each(function(j,item){
returnObj[item.id.split("_")[1]] = item.value;
flag = true;
});
if(!flag){
return "";
}else{
return returnObj;
}
}
/**
* 深复制指定对象
*
* @param obj
* 要复制的对象
* @return 返回复制后的新对象
*/
baseUtil.cloneObject = function(obj) {
var cloneObj = $.extend(true, {}, obj);
return cloneObj;
};
/**
* 深复制一个数组
*
* @param arr
* 要复制的数组
* @return 返回复制后的新数组
*/
baseUtil.cloneArray = function(arr) {
var that = this;
var cloneArr = $.map(arr, function(obj) {
return that.cloneObject(obj);
});
return cloneArr;
};
/**
* 删除对象中所有属性
*
* @param obj
* 要删除属性的对象
*/
baseUtil.deleteAllProps = function(obj) {
if(obj == null) {
return;
}
for(var prop in obj) {
delete obj[prop];
}
};
/**
* 获取选中的单选框的值
*
* @param name
* 单选框名称
* @return 返回选中的单选框的值
*/
baseUtil.getCheckedRadioVal = function(name) {
return $(":radio[name='" + name + "']:checked").val();
};
/**
* 根据名称与值将单选框选中
*
* @param name
* 单选框名称
* @param value
* 单选框的值
*/
baseUtil.setRadioChecked = function(name, value) {
$(":radio[name='" + name + "'][value='" + value + "']").prop("checked",
true);
};
/**
* 检查名称是否合法
*
* @param str
* 要检查的名称字符串
* @param text
* 用于不合法时提示的信息
* @return 返回一个值,该值标识输入字符串是否合法
*/
baseUtil.checkNameValid = function(str, text) {
return baseUtil.checkValid(str, text || "名称");
};
/**
* 通过正则检查输入字符串是否合法
*
* @param nameStr
* 要检查的字符串
* @param text
* 用于不合法时提示的信息
* @return 返回一个值,该值标识输入字符串是否合法
*/
baseUtil.checkValid = function(nameStr, text) {
if(!nameStr || "") {
mui.toast(text + "输入不允许为空。");
return false;
}
var x = eval("/[\\\\/'\"*?%.><=:;()\\[\\]|]/");
var ret = nameStr.match(x);
if(ret) {
if(ret == " ") {
mui.alert(text +
"输入中不允许包含非法字符' []()\*?%<>=:;|/\" ',该输入中包含非法字符: 。请更换为合法字符。");
} else {
mui.alert(text + "输入中不允许包含非法字符' []()\*?%<>=:;|/\" ',该输入中包含非法字符:" + ret +
"。请更换为合法字符。");
}
return false;
}
return true;
};
/**
* 扩展数组方法,在指定位置插入对象
*
* @param index
* 要插入的索引位置
* @param item
* 要插入的对象
*/
Array.prototype.insert = function(index, item) {
this.splice(index, 0, item);
};
/**
* 扩展字符串方法,判断是否以指定字符串结尾
*
* @param s
* 字符串结尾
*/
String.prototype.endWith = function(s) {
if(s == null || s == "" || this.length == 0 || s.length > this.length) {
return false;
}
if(this.substring(this.length - s.length) == s) {
return true;
} else {
return false;
}
return true;
};
/**
* 扩展字符串方法,判断是否以指定字符串开头
*
* @param s
* 字符串开头
*/
String.prototype.startWith = function(s) {
if(s == null || s == "" || this.length == 0 || s.length > this.length) {
return false;
}
if(this.substr(0, s.length) == s) {
return true;
} else {
return false;
}
return true;
};
exports("baseUtil", baseUtil);
});
| javascript |
use crate::model::*;
use crate::{util::*, Classpath, InvokeType, JniEnv};
use classfile_parser::ClassAccessFlags;
use classfile_parser::{
attribute_info::code_attribute_parser,
field_info::{FieldAccessFlags, FieldInfo},
method_info::{MethodAccessFlags, MethodInfo},
ClassFile,
};
use std::fmt::Write;
use std::{cell::RefCell, collections::HashMap, usize};
use super::interpreter::InstructionExecutor;
pub struct Jvm {
pub executor: InstructionExecutor,
pub classpath: Classpath,
pub call_stack_frames: RefCell<Vec<CallStackFrame>>,
pub heap: RefCell<Heap>,
pub initialized: bool,
}
impl Jvm {
pub fn new(webjvm: Classpath) -> Jvm {
Jvm {
executor: InstructionExecutor::new(),
classpath: webjvm,
call_stack_frames: RefCell::new(Vec::new()),
heap: RefCell::new(Heap {
loaded_classes: Vec::new(),
loaded_classes_lookup: HashMap::new(),
object_heap_map: HashMap::new(),
array_heap_map: HashMap::new(),
interned_string_map: HashMap::new(),
object_id_offset: 0,
main_thread_object: 0,
}),
initialized: false,
}
}
pub fn is_instance_of(&self, val: &JavaValue, compare_type: &str, null_is_instance: bool) -> RuntimeResult<bool> {
let res = match val {
JavaValue::Object(instance) => match instance {
Some(instance_id) => {
let class_id = {
let heap = self.heap.borrow();
let obj = heap.object_heap_map.get(instance_id).expect("bad object ref");
obj.class_id
};
self.is_assignable_from(compare_type, class_id)?
}
None => null_is_instance,
},
JavaValue::Array(_) => {
// TODO
true
}
_ => panic!("invalid object"),
};
Ok(res)
}
pub fn create_stack_frame(&self, cls: &ClassFile, method: &MethodInfo) -> RuntimeResult<CallStackFrame> {
let container_class = get_constant_string(&cls.const_pool, cls.this_class).clone();
let container_method_descriptor = get_constant_string(&cls.const_pool, method.descriptor_index);
let container_method =
get_constant_string(&cls.const_pool, method.name_index).clone() + container_method_descriptor;
if method.access_flags.contains(MethodAccessFlags::NATIVE) {
let container_class = container_class.replace("$", "_00024");
let md = MethodDescriptor::new(container_method_descriptor).expect("bad method descriptor");
let mut lvt_len = md
.argument_types
.iter()
.map(|jt| match jt.as_str() {
"D" | "J" => 2,
_ => 1,
})
.sum();
if !method.access_flags.contains(MethodAccessFlags::STATIC) {
lvt_len += 1;
}
Ok(CallStackFrame {
container_class,
container_method,
access_flags: method.access_flags,
is_native_frame: true,
instructions: Vec::new(),
state: CallStackFrameState {
line_number: 0,
instruction_offset: 0,
lvt: JavaValueVec::from_vec(vec![
JavaValue::Internal {
is_unset: true,
is_higher_bits: false
};
lvt_len
]),
stack: JavaValueVec::new(),
return_stack_value: None,
},
metadata: None,
})
} else if method.access_flags.contains(MethodAccessFlags::ABSTRACT) {
return Err(self.throw_exception(
"java/lang/AbstractMethodError",
Some(&format!("{}.{}", container_class, container_method)),
));
} else {
let (_, code_attribute) = code_attribute_parser(&method.attributes[0].info).unwrap();
let instructions = code_attribute.code.clone();
Ok(CallStackFrame {
container_class,
container_method,
access_flags: method.access_flags,
is_native_frame: false,
instructions,
state: CallStackFrameState {
line_number: 0,
instruction_offset: 0,
lvt: JavaValueVec::from_vec(vec![
JavaValue::Internal {
is_unset: true,
is_higher_bits: false
};
code_attribute.max_locals as usize
]),
stack: JavaValueVec::with_capacity(code_attribute.max_stack as usize),
return_stack_value: None,
},
metadata: Some(code_attribute),
})
}
}
pub fn push_call_stack_frame(&self, frame: CallStackFrame) {
let mut csf = self.call_stack_frames.borrow_mut();
csf.push(frame);
}
pub fn get_stack_depth(&self) -> usize {
let csf = self.call_stack_frames.borrow();
csf.len()
}
pub fn get_class_name_from_id(&self, id: usize) -> String {
let heap = self.heap.borrow();
heap.loaded_classes[id].java_type.clone()
}
pub fn ensure_class_loaded(&self, cls: &str, initialize: bool) -> RuntimeResult<usize> {
match {
let heap = self.heap.borrow();
heap.loaded_classes_lookup.get(cls).cloned()
} {
Some(id) => {
if initialize {
let is_initialized = {
let heap = self.heap.borrow();
let class = &heap.loaded_classes[id];
class.is_initialized
};
if !is_initialized {
self.initialize_class(id)?;
}
}
Ok(id)
}
None => {
let mut loaded_class = match cls.chars().next().unwrap() {
'[' => JavaClass {
java_type: String::from(cls),
class_id: 0,
access_flags: ClassAccessFlags::PUBLIC,
superclass_id: None,
static_fields: HashMap::new(),
class_object_id: 0,
is_array_type: true,
is_primitive_type: false,
direct_interfaces: vec![
String::from("java/io/Serializable"),
String::from("java/lang/Cloneable"),
],
is_initialized: true,
},
x => match x {
'B' | 'S' | 'I' | 'J' | 'F' | 'D' | 'C' | 'Z' => JavaClass {
java_type: String::from(match x {
'B' => "byte",
'S' => "short",
'I' => "int",
'J' => "long",
'F' => "float",
'D' => "double",
'C' => "char",
'Z' => "boolean",
_ => panic!(),
}),
class_id: 0,
access_flags: ClassAccessFlags::PUBLIC,
superclass_id: None,
static_fields: HashMap::new(),
class_object_id: 0,
is_array_type: false,
is_primitive_type: true,
direct_interfaces: Vec::new(),
is_initialized: true,
},
_ => {
let class_file = match self.classpath.get_classpath_entry(cls) {
Some(file) => file,
None => {
return Err(self.throw_exception("java/lang/NoClassDefFoundError", Some(cls)));
}
};
let superclass_id = match class_file.super_class {
0 => None,
id => Some(self.ensure_class_loaded(
get_constant_string(&class_file.const_pool, id),
initialize,
)?),
};
let declared_fields: Vec<&FieldInfo> = class_file
.fields
.iter()
.filter(|field| field.access_flags.contains(FieldAccessFlags::STATIC))
.collect();
let mut static_fields = HashMap::with_capacity(declared_fields.len());
for field in &declared_fields {
static_fields.insert(
get_constant_string(&class_file.const_pool, field.name_index).clone(),
JavaValue::default(get_constant_string(
&class_file.const_pool,
field.descriptor_index,
)),
);
}
let direct_interfaces = class_file
.interfaces
.iter()
.map(|id| get_constant_string(&class_file.const_pool, *id).clone())
.collect();
JavaClass {
java_type: String::from(cls),
class_id: 0,
access_flags: class_file.access_flags,
superclass_id,
static_fields,
class_object_id: 0,
is_array_type: false,
is_primitive_type: false,
direct_interfaces,
is_initialized: false,
}
}
},
};
let id = {
let mut heap = self.heap.borrow_mut();
let id = heap.loaded_classes.len();
loaded_class.class_id = id;
heap.loaded_classes.push(loaded_class);
heap.loaded_classes_lookup.insert(String::from(cls), id);
id
};
let env = JniEnv::empty(self);
// create java.lang.Class object after registering the class
let lang_class_id = self.ensure_class_loaded("java/lang/Class", false)?;
let class_object_id = env.new_instance(lang_class_id)?;
env.invoke_instance_method(
InvokeType::Special,
class_object_id,
lang_class_id,
"<init>",
"(Ljava/lang/ClassLoader;)V",
&[JavaValue::Object(None)],
)?;
let is_class_type = {
let mut heap = self.heap.borrow_mut();
let is_class_type = {
let cls = heap.loaded_classes.get_mut(id).unwrap();
cls.class_object_id = class_object_id;
!cls.is_array_type && !cls.is_primitive_type
};
let java_class_obj = heap.object_heap_map.get_mut(&class_object_id).unwrap();
java_class_obj.internal_metadata.insert(String::from("class_id"), InternalMetadata::Numeric(id));
java_class_obj
.internal_metadata
.insert(String::from("class_name"), InternalMetadata::Text(String::from(cls)));
is_class_type
};
if is_class_type && initialize {
self.initialize_class(id)?;
}
Ok(id)
}
}
}
pub fn initialize_class(&self, class_id: usize) -> RuntimeResult<()> {
{
let heap = self.heap.borrow();
if heap.loaded_classes[class_id].is_initialized {
return Ok(());
}
}
let cls = self.get_class_name_from_id(class_id);
let class_file = match self.classpath.get_classpath_entry(&cls) {
Some(file) => file,
None => return Err(self.throw_exception("java/lang/NoClassDefFoundError", Some(&cls))),
};
if class_file.super_class != 0 {
let superclass = get_constant_string(&class_file.const_pool, class_file.super_class);
let superclass_id = self.ensure_class_loaded(superclass, false)?;
self.initialize_class(superclass_id)?;
}
if self.classpath.get_static_method(class_file, "<clinit>", "()V").is_some() {
{
let mut heap = self.heap.borrow_mut();
heap.loaded_classes[class_id].is_initialized = true;
}
let env = JniEnv::empty(self);
if let Err(err) = env.invoke_static_method(class_id, "<clinit>", "()V", &[]) {
let new_error = match err {
JavaThrowable::Unhandled(unhandled) => {
let ex_cid = env.get_class_id("java/lang/ExceptionInInitializerError")?;
let ex_instance = env.new_instance(ex_cid)?;
env.invoke_instance_method(
InvokeType::Special,
ex_instance,
ex_cid,
"<init>",
"(Ljava/lang/Throwable;)V",
&[JavaValue::Object(Some(unhandled))],
)?;
self.throw_exception_ref(ex_instance)
}
other => other,
};
return Err(new_error);
}
}
Ok(())
}
pub fn is_assignable_from(&self, superclass: &str, subclass_id: usize) -> RuntimeResult<bool> {
let heap = self.heap.borrow();
let mut current_class = &heap.loaded_classes[subclass_id];
Ok('l: loop {
if current_class.java_type == superclass {
break true;
}
for interface in ¤t_class.direct_interfaces {
if interface == superclass {
break 'l true;
}
}
let cls = match self.classpath.get_classpath_entry(¤t_class.java_type) {
Some(file) => file,
None => {
return Err(self.throw_exception("java/lang/NoClassDefFoundError", Some(¤t_class.java_type)))
}
};
if cls.super_class == 0 {
break 'l superclass == "java/lang/Object";
}
let superclass_name = get_constant_string(&cls.const_pool, cls.super_class);
let class_id = heap.loaded_classes_lookup.get(superclass_name).expect("invalid superclass");
current_class = &heap.loaded_classes[*class_id];
})
}
pub fn throw_npe(&self) -> JavaThrowable {
self.throw_exception("java/lang/NullPointerException", None)
}
pub fn throw_exception_ref(&self, reference: usize) -> JavaThrowable {
let (exception_class, exception_class_id) = {
let heap = self.heap.borrow();
let obj = &heap.object_heap_map.get(&reference).expect("expecting object ref");
let cls = &heap.loaded_classes[obj.class_id];
(cls.java_type.clone(), obj.class_id)
};
log_error(&format!("Exception thrown: {}", exception_class));
let stacktrace = {
let csf = self.call_stack_frames.borrow();
let mut stacktrace = String::new();
for i in 0..csf.len() - 1 {
let frame = &csf[csf.len() - i - 1];
let source = match frame.is_native_frame {
true => "(Native Method)",
false => "(Unknown Source)",
};
writeln!(
&mut stacktrace,
"\tat {}.{}{}",
&frame.container_class[frame.container_class.rfind('/').map(|x| x + 1).unwrap_or(0)..],
// &frame.container_method[0..frame.container_method.find('(').unwrap()],
frame.container_method,
source
)
.unwrap();
}
stacktrace
};
loop {
let mut csf = self.call_stack_frames.borrow_mut();
if csf.len() == 1 {
break;
}
let top_frame = csf.last_mut().unwrap();
'b: {
if let Some(metadata) = top_frame.metadata.as_ref() {
for exception_item in &metadata.exception_table {
if top_frame.state.instruction_offset >= exception_item.start_pc as usize
&& top_frame.state.instruction_offset < exception_item.end_pc as usize
{
if exception_item.catch_type == 0 {
// TODO: finally blocks
break 'b;
}
let container_class =
self.classpath.get_classpath_entry(&top_frame.container_class).unwrap();
let catch_type =
get_constant_string(&container_class.const_pool, exception_item.catch_type);
if self.is_assignable_from(catch_type, exception_class_id).unwrap() {
println!(
"Catching exception in function: {}.{}",
top_frame.container_class, top_frame.container_method
);
top_frame.state.instruction_offset = exception_item.handler_pc as usize;
return JavaThrowable::Handled(reference);
}
}
}
}
}
csf.pop().unwrap();
}
let detail_str = {
let env = JniEnv::empty(self);
let detail_field = env.get_field(reference, "detailMessage");
detail_field.as_object().unwrap().map(|id| env.get_string(id))
};
let exception_class = exception_class.replace("/", ".");
if let Some(detail) = detail_str {
log_error(&format!("Exception in thread \"main\" {}: {}\n{}", exception_class, detail, stacktrace));
} else {
log_error(&format!("Exception in thread \"main\" {}\n{}", exception_class, stacktrace));
}
JavaThrowable::Unhandled(reference)
}
pub fn throw_exception(&self, exception_class: &str, message: Option<&str>) -> JavaThrowable {
// check to see if the exception class exists, otherwise we get an infinitely recursive loop
if self.classpath.get_classpath_entry(exception_class).is_none() {
return self.throw_exception("java/lang/NoClassDefFoundError", Some(exception_class));
}
let env = JniEnv::empty(self);
let cid = env.get_class_id(exception_class).unwrap();
let ex_ref = env.new_instance(cid).unwrap();
match message {
Some(msg_str) => {
let message_internal_str = env.new_string(msg_str);
env.invoke_instance_method(
InvokeType::Special,
ex_ref,
cid,
"<init>",
"(Ljava/lang/String;)V",
&[JavaValue::Object(Some(message_internal_str))],
)
.unwrap();
}
None => {
env.invoke_instance_method(InvokeType::Special, ex_ref, cid, "<init>", "()V", &[]).unwrap();
}
}
self.throw_exception_ref(ex_ref)
}
pub fn new_instance(&self, root_class_id: usize) -> RuntimeResult<JavaObject> {
let mut instance_fields = HashMap::new();
let mut class_name = {
let heap = self.heap.borrow();
&heap.loaded_classes[root_class_id].java_type.clone()
};
loop {
self.ensure_class_loaded(class_name, true)?;
let cls = self.classpath.get_classpath_entry(class_name).unwrap();
let declared_fields: Vec<&FieldInfo> =
cls.fields.iter().filter(|field| !field.access_flags.contains(FieldAccessFlags::STATIC)).collect();
for field in &declared_fields {
instance_fields.insert(
get_constant_string(&cls.const_pool, field.name_index).clone(),
JavaValue::default(get_constant_string(&cls.const_pool, field.descriptor_index)),
);
}
if cls.super_class == 0 {
break;
}
class_name = get_constant_string(&cls.const_pool, cls.super_class);
}
Ok(JavaObject {
class_id: root_class_id,
instance_fields,
internal_metadata: HashMap::new(),
})
}
pub fn heap_store_instance(&self, instance: JavaObject) -> usize {
let mut heap = self.heap.borrow_mut();
let idx = heap.object_id_offset;
heap.object_heap_map.insert(idx, instance);
heap.object_id_offset += 1;
idx
}
pub fn heap_store_array(&self, array: JavaArray) -> usize {
let mut heap = self.heap.borrow_mut();
let idx = heap.object_id_offset;
heap.array_heap_map.insert(idx, array);
heap.object_id_offset += 1;
idx
}
pub fn create_constant_array(&self, array_type: JavaArrayType, values: Vec<JavaValue>) -> usize {
let arr = JavaArray {
array_type,
values,
};
self.heap_store_array(arr)
}
pub fn create_empty_array(&self, array_type: JavaArrayType, length: usize) -> usize {
let values = vec![
match array_type {
JavaArrayType::Byte => JavaValue::Byte(0),
JavaArrayType::Short => JavaValue::Short(0),
JavaArrayType::Int => JavaValue::Int(0),
JavaArrayType::Long => JavaValue::Long(0),
JavaArrayType::Float => JavaValue::Float(0.0),
JavaArrayType::Double => JavaValue::Double(0.0),
JavaArrayType::Char => JavaValue::Char(0),
JavaArrayType::Boolean => JavaValue::Boolean(false),
JavaArrayType::Object(_) | JavaArrayType::Array(_) => JavaValue::Object(None),
};
length
];
let arr = JavaArray {
array_type,
values,
};
self.heap_store_array(arr)
}
pub fn create_string_object(&self, inner: &str, intern: bool) -> usize {
// let owned = String::from(inner);
if intern {
let heap = self.heap.borrow();
if let Some(id) = heap.interned_string_map.get(inner) {
return *id;
}
}
let string_class = self.ensure_class_loaded("java/lang/String", true).unwrap();
let mut instance = self.new_instance(string_class).unwrap();
let chars: Vec<JavaValue> = inner.encode_utf16().into_iter().map(JavaValue::Char).collect();
let array_id = self.create_constant_array(JavaArrayType::Char, chars);
instance.set_field(self, "value", JavaValue::Array(array_id)).unwrap();
let id = self.heap_store_instance(instance);
if intern {
let mut heap = self.heap.borrow_mut();
heap.interned_string_map.insert(String::from(inner), id);
}
id
}
}
| rust |
<filename>games/284910.json
{"appid": 284910, "name": "Purgatory: War of the Damned", "windows": true, "mac": false, "linux": false, "early_access": true, "lookup_time": 1490975619} | json |
Kannada superstar Puneeth Rajkumar passed away in a Bengaluru hospital today after suffering a heart attack, leaving fans and colleagues shocked and grief-stricken. The 46-year-old actor was rushed to the hospital after he was complained of chest pain.
The actress says that Puneeth’s passing away will leave a big void in the industry. “He was so active and was always raring to go. I think he was working on a few scripts. It’s a big loss for the industry. I would like to pass my condolences to his family and all his fans," she said.
Read all the Latest News , Breaking News and IPL 2022 Live Updates here. | english |
<gh_stars>0
import copy
import os
import pytest
import subprocess
import time
from configuration import available_ports, CIPHERSUITES, CURVES, PROVIDERS
from common import ProviderOptions, data_bytes
from fixtures import managed_process, custom_mtu
from providers import S2N, OpenSSL, Tcpdump
def find_fragmented_packet(results):
"""
This function searches Tcpdump's standard output and looks for packets
that have a length larger than the MTU(hardcoded to 1500) of the device.
"""
for line in results.decode('utf-8').split('\n'):
pieces = line.split(' ')
if len(pieces) < 2:
continue
if pieces[-2] == 'length':
if int(pieces[-1]) > 1500:
return True
return False
@pytest.mark.parametrize("cipher", CIPHERSUITES)
@pytest.mark.parametrize("curve", CURVES)
def test_s2n_client_dynamic_record(custom_mtu, managed_process, cipher, curve):
host = "localhost"
port = next(available_ports)
# 16384 bytes is enough to reliably get a packet that will exceed the MTU
bytes_to_send = data_bytes(16384)
client_options = ProviderOptions(
mode="client",
host="localhost",
port=port,
cipher=cipher,
data_to_send=bytes_to_send,
insecure=True,
tls13=True)
server_options = copy.copy(client_options)
server_options.data_to_send = None
server_options.mode = "server"
server_options.key = "../pems/ecdsa_p384_pkcs1_key.pem"
server_options.cert = "../pems/ecdsa_p384_pkcs1_cert.pem"
# This test shouldn't last longer than 5 seconds, even though
# Tcpdump tends to take a second to startup.
tcpdump = managed_process(Tcpdump, client_options, timeout=5)
server = managed_process(OpenSSL, server_options, timeout=5)
client = managed_process(S2N, client_options, timeout=5)
for results in client.get_results():
assert results.exception is None
assert results.exit_code == 0
assert b"Actual protocol version: 34" in results.stdout
for results in server.get_results():
assert results.exception is None
assert results.exit_code == 0
# The Tcpdump provider only captures 12 packets. This is enough
# to detect a packet larger than the MTU, but less than the
# total packets sent. This is important because it lets Tcpdump
# exit cleanly, which means all the output is available for us
# to examine.
for results in tcpdump.get_results():
assert results.exit_code == 0
assert find_fragmented_packet(results.stdout) is True
| python |
The IMD on Tuesday issued a heavy rainfall alert for Maharashtra for the next four days, following which Chief Minister Eknath Shinde directed the state administration officials to take precautions and ensure there is no loss of life or property.
Mumbai and some of its neighbouring districts witnessed heavy rainfall and flooding on Tuesday morning. The IMD also issued an ‘orange alert’ for south Konkan region and Goa and a ‘yellow alert’ for north Konkan, north central and south central Maharashtra and Marathwada regions.
The Marathwada region is likely to witness thunderstorms accompanied with lightning, heavy rain and gusty winds at a speed of 40-50 kmph, the IMD said.
The Chief Minister’s Office in a statement said CM Shinde is in touch with collectors of Thane, Raigad, Palghar, Ratnagiri and Sindhudurg districts. The National Disaster Response Force (NDRF) has also been asked to remain alert. “The situation in Mumbai is also being closely monitored,” it said.
The statement also noted that Kundalika river in Raigad has crossed the danger mark. The water level of the Amba, Savitri, Patalganga, Ulhas and Gadhi rivers was a little less than the danger mark, it said.
In view of the increasing rains and flood-like situation, Chief Minister Eknath Shinde has held discussions with chief secretary Manu Kumar Srivastava. Guardian secretaries have been asked to reach their districts and monitor the situation,” the statement said.
Officials from the water resource department have been asked to remain alert and take necessary precautions in view of the heavy rains, it said. People, especially in Thane, Palghar, Raigad, Sindhudurg, Ratnagiri and Kolhapur, where the rainfall intensity is more, should be alerted about floods in advance, the statement said. | english |
Emotional moments in Wrestlemania:- Pro wrestling is more or less like a daily soap opera which often brings out a lot of emotions from the global WWE fan base. Being a WWE fan, you may get to travel through all the highs and lows of the emotional roller coaster and that might make you cheer, boo, shout or even cry during the staging of the matches.
On the other side, Wrestle mania can certainly be quoted as the best WWE PPV event till now in the WWE history and even that has brought certain “offbeat” moments which have made all the WWE fans emotional in the process. With that been said, let us take a look at the top 5 emotional moments in the Wrestle mania history.
#1 Bidding Adieu to Mt Wrestlemania (Wrestlemania XXVI)
Emotional moments in Wrestlemania:-Shawn Michaels can surely be considered as one of the best in the WWE history and he is been famously known as Mr. Wrestle mania for providing some of the best moments during his WWE career. Doesn’t matter whom he had to face during any given match; he will bring you the best and most exciting bout on board out of simply anything.
One of such moments came when he challenged the dead man Undertaker for one final time in the Wrestle mania 26 and taker accepted the same challenge on a condition that if Michaels loses, he will retire from WWE. The Speculation was accepted by HBK and he was up against the most terrifying name in the WWE history. Both Michaels and taker fought to their last bit and the match took everything from both the competitors in the process.
Impressed by the level of competition, fans started cheering all around for both the superstars and eventually, it was the “dead man” who pinned the HBK in a nerve-wracking contest. Even though HBK lost the match, he has been given an emotional farewell by everyone present in the arena and there were fans who were simply crying on his exit from WWE. Undoubtedly, it was one of the most emotional moments in WWE history.
#2 Hulk Hogan vs. the Ultimate Warrior ( Wrestlemania VI)
Emotional moments in Wrestlemania:-That was the time when Hulk Hogan has been deemed as the best in the business and he has carried out his persona of a top WWE superstar in a structured manner. Still, if there was anyone who has challenged his supremacy in WWE, it was the equally capable Ultimate warrior who was getting very popular amongst the WWE fans for his ultimate grit and resilience in most of his matches. Finally, the battle came out open at the Wrestle Mania VI where the WWF( Now WWE) championship was on the line.
Warrior was an Intercontinental champion at that point of time and whilst eh challenged Hogan for the WWF title, he got supported by most of the fans present in the arena. Still, the match went on to become the fiercest battles fought between two of the most magnificent WWE superstars and entertained every single fan present at the Arena. Warrior won the match eventually and thanked every fan present around the arena for their love and support. Still, it was the moment when Hogan himself presented the belt to the warrior and shown his sportsman spirit in the process. That was something which made everyone around emotional to the core.
#3 End of the streak! ( Wrestle mania XXX)
Emotional moments in Wrestlemania:-You simply won’t find a WWE superstar like Undertaker and he is the one who has ruled the WWE arena for over three decades in his career so far. Moreover, one of the best parts of his career came out as his streak in the Wrestle mania where he didn’t lose a single match until Wrestle Mania XXX. It was for years, when questions were often been asked about his legacy and whether he will ever be defeated in wrestle mania event. Still his match against the Brock Lesnar has been quoted as one of the best ever staged in the wrestle mania event.
Undertaker and Lesnar bring out their best in the match and took the same down to the wire with every bit of their sweat and blood online. Still, it was Lesnar who eventually turned out to be the winner at the end whilst giving three F5s to taker after surviving his chokeslam. Right, when the referee counted 1-2-3, every single person at the arena has been found at a shock stage and even the ones who were watching it on TV couldn’t believe what they have just witnessed. To be precise, it was the most shocking defeat which may have happened to the Undertaker in WWE history.
#4 The shock exit for the “ Nature Boy” ( Wrestle Mania XXIV)
Emotional moments in Wrestlemania:-It was around the year 2007 when the storyline was going within WWE stating flair’s unwillingness to retire from the brand anytime soon. Still, it has been announced by the CEO Vince McMahon during the RAW weekly show that Ric has to retire once he loses any of his following matches. Talking about his opponents, he got to face names like Randy Orton, Umaga, and Triple H and eventually, he defeated them all on a trot.
It was then his ultimate test when he got to face his own beloved friend Shawn Michaels at the Wrestle Mania XXIV. Shawn has always been close to Flair during his career and facing him for the ultimate test came as a shocker for every WWE fan around. Being a fan, you must be remembering that moment when HBK gave that “ Super Kick” to Ric and expressed his love by saying “ I Love you: right before getting along with the count out. Once Flair got defeated, Both he and HBK were in tears along with every single fan present in the Arena. Quite possibly, it would be counted as one of the most “teary-eyed’ moments in WWE history.
#5 Randy Savage & his emotional moment with Elizabeth (Wrestlemania VII)
Emotional moments in Wrestlemania:-You simply have to be a stone-hearted person if you wouldn’t have felt the emotions within this ever emotional match between the Randy Savage and ultimate warrior at Wrestle mania VII. The storyline started with Randy savage ditching his beau and longtime girlfriend Elizabeth and getting along with queen Sherri in the process. Before this match, savage has cost the Warrior his WWF title match against Slaughter and thus the rivalry was high during this juicy contest at Wrestle mania VII.
Savage lost the match after a series of near falls and moments and was forced to retire from WWE as a result. Suddenly the fans saw Savage’s current girlfriend Sherri coming to the ring and punched Savage for his loss and same didn’t go well with his ex Elizabeth who was present between the audiences. Elizabeth came rushing to the ring and gave Sherri a big taste of her own medicine and the fans saw the reunion of the lovely couple once again in the process. This, in turn, became the most emotional moment ever witnessed at the Wrestlemania PPV event.
| english |
# TodoistAPI_JP
Todoist Developer APIの翻訳をしているところです。
| API | source | before | after | public |
| --- | --- | --- | --- | --- |
| REST API | [本家][original-rest-v1] | [翻訳前][trans-rest-v1-before] | [翻訳後][trans-rest-v1-after] | [公開版](REST_API/) |
| Sync API | [本家][original-sync-v8] | [翻訳前][trans-sync-v8-before] | [翻訳後][trans-sync-v8-after] | [公開版](Sync_API/) |
[original-rest-v1]:https://developer.todoist.com/rest/v1/
[trans-rest-v1-before]:translation_project/source/REST_API/
[trans-rest-v1-after]:translation_project/target/REST_API/
[original-sync-v8]:https://developer.todoist.com/sync/v8/
[trans-sync-v8-before]:translation_project/source/Sync_API/
[trans-sync-v8-after]:translation_project/target/Sync_API/
markdown形式でやろうかと思ってたんですが、
すべて張り付けたり抽出したりするのが面倒になってきたので、
とりあえず元のHTMLを分割してomegaTで翻訳しています。
gitを使える方はブランチを作ってから翻訳して、プルリクお願いします。
HTMLからmarkdownに変換する方法を知っている方いましたら、
教えていただけるか、変換したものをプルリクしてもらえるとありがたいです。
ご協力いただける方、募集中です。
| markdown |
<reponame>rolocampusano/nber<filename>data/nber/22369.json
{
"id": 22369,
"citation_title": "Bunching at the Kink: Implications for Spending Responses to Health Insurance Contracts",
"citation_author": [
"<NAME>",
"<NAME>",
"<NAME>"
],
"citation_publication_date": "2016-06-27",
"issue_date": "2016-06-23",
"revision_date": "None",
"topics": [
"Microeconomics",
"Households and Firms",
"Financial Economics",
"Financial Institutions"
],
"program": [
"Economics of Aging",
"Health Care",
"Health Economics",
"Industrial Organization",
"Labor Studies",
"Public Economics"
],
"projects": null,
"working_groups": [
"Insurance"
],
"abstract": "\n\nA large literature in empirical public finance relies on \u201cbunching\u201d to identify a behavioral response to non-linear incentives and to translate this response into an economic object to be used counterfactually. We conduct this type of analysis in the context of prescription drug insurance for the elderly in Medicare Part D, where a kink in the individual\u2019s budget set generates substantial bunching in annual drug expenditure around the famous \u201cdonut hole.\u201d We show that different alternative economic models can match the basic bunching pattern, but have very different quantitative implications for the counterfactual spending response to alternative insurance contracts. These findings illustrate the importance of modeling choices in mapping a compelling reduced form pattern into an economic object of interest.\n\n",
"acknowledgement": "\nEinav and Finkelstein gratefully acknowledge support from the NIA (R01 AG032449). We thank <NAME>, <NAME>, and <NAME> for helpful comments. The views expressed herein are those of the authors and do not necessarily reflect the views of the National Bureau of Economic Research.\n\n\n\n<NAME>\n\nI would like to disclose that I am an adviser to Nuna Health, a data analytics startup company, which specializes in analytics of health insurance claims. I am not being paid by them, but have received equity (nominal value is less than $1,000; the market value is hard to assess).\n\n\n"
} | json |
[
{
"merged": "/Users/milad/Android-Projects/BIOSPassBypass/app/build/intermediates/res/merged/debug/layout-v14/abc_activity_chooser_view.xml",
"source": "/Users/milad/Android-Projects/BIOSPassBypass/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/18.0.0/res/layout-v14/abc_activity_chooser_view.xml"
}
] | json |
<filename>index/g/grilled-chicken-with-root-beer-barbecue-sauce-105270.json
{
"directions": [
"Mix first 5 ingredients in small bowl. Reserve 4 teaspoons spice mixture for mop mixture. Rub remaining spice mixture all over chicken halves. Refrigerate chicken 1 hour.",
"Mix 1 cup water, vinegar, Worcestershire sauce, and reserved 4 teaspoons spice mixture in medium bowl to blend for mop mixture.",
"Place 1 handful of torn newspaper in bottom of charcoal chimney. Top newspaper with 30 charcoal briquettes. Remove top rack from barbecue; place chimney on bottom rack. Light newspaper and let charcoal burn until ash on briquettes is gray, about 30 minutes. Open 1 bottom barbecue vent. Turn out hot charcoal onto 1 side of bottom rack. Using metal spatula, spread charcoal to cover approximately 1/3 of rack. Scatter 1 cup drained wood chips over coals (using too many wet chips may douse the fire). Fill foil loaf pan halfway with water and place on bottom rack opposite coals.",
"Return top rack to barbecue. Arrange chicken halves, skin side up, on top rack above loaf pan (not above charcoal). Cover barbecue with lid, positioning top vent directly over chickens. Place stem of candy thermometer through top vent, with gauge on outside of lid and tip near chickens (thermometer should not touch chickens or rack); leave thermometer in place during cooking. Use top and bottom barbecue vents to maintain temperature between 275\u00b0F and 325\u00b0F, opening vents wider to increase heat and closing to decrease heat. Keep any other vents closed. Check temperature every 10 minutes.",
"Grill chickens until almost cooked through, brushing with mop mixture every 15 minutes, about 1 hour 25 minutes. After 15 minutes, use technique described above to light an additional 15 charcoal briquettes in chimney set atop nonflammable surface.",
"If temperature of barbecue falls below 275\u00b0F, use oven mitts to lift off top rack with chickens; place rack with chickens on nonflammable surface. Using tongs, add hot gray charcoal briquettes from chimney to bottom rack. Scatter remaining 1 cup drained wood chips over charcoal. Reposition top rack on barbecue, placing chickens above loaf pan. Cover with lid. Brush chickens with some Root Beer Barbecue Sauce and continue grilling until meat thermometer inserted into thighs registers 180\u00b0F, about 6 minutes longer. Using tongs, move chickens directly over fire. Grill until sauce sizzles and browns, about 2 minutes. Cut chicken into quarters. Serve, passing remaining Root Beer Barbecue Sauce separately."
],
"ingredients": [
"1 tablespoon salt",
"1 tablespoon Hungarian sweet paprika",
"1 tablespoon (packed) dark brown sugar",
"2 teaspoons ground black pepper",
"1/4 teaspoon celery seed",
"2 3 1/2- to 3 3/4-pound chickens, each cut in half, backbones removed",
"1 cup water",
"3/4 cup distilled white vinegar",
"1/4 cup Worcestershire sauce",
"45 charcoal briquettes",
"2 cups hickory wood chips, soaked 1 hour in water to cover, drained",
"Root Beer Barbecue Sauce"
],
"language": "en-US",
"source": "www.epicurious.com",
"tags": [
"Chicken",
"Fourth of July",
"Summer",
"Grill/Barbecue"
],
"title": "Grilled Chicken with Root Beer Barbecue Sauce",
"url": "http://www.epicurious.com/recipes/food/views/grilled-chicken-with-root-beer-barbecue-sauce-105270"
}
| json |
#[cfg(feature = "unstable")]
#[test]
fn test_send() -> async_std::io::Result<()> {
use async_std::prelude::*;
use async_std::{stream, task};
task::block_on(async {
fn test_send_trait<T: Send>(_: &T) {}
let stream = stream::repeat(1u8).take(10);
test_send_trait(&stream);
let fut = stream.collect::<Vec<_>>();
// This line triggers a compilation error
test_send_trait(&fut);
Ok(())
})
}
| rust |
import { makeStyles } from '@material-ui/core';
import { defaultGreen, defaultOrange, defaultRed } from '@tecsinapse/ui-kit';
export const useStyles = makeStyles(({ spacing }) => ({
circularStepperContainer: {
display: 'flex',
flexWrap: 'nowrap',
padding: spacing(1),
backgroundColor: 'transparent',
alignItems: 'center',
justifyContent: 'space-between',
},
circleBackground: {
stroke: '#D3D3D3',
fill: 'none',
},
circleProgress: {
stroke: defaultGreen,
strokeLinecap: 'round',
strokeLinejoin: 'round',
transition: '0.6s',
fill: 'none',
},
strokeOrange: {
stroke: defaultOrange,
},
strokeRed: {
stroke: defaultRed,
},
circleText: {
fontSize: '1.1rem',
fontWeight: '500',
},
circularStepperText: {
marginLeft: spacing(2),
textAlign: 'right',
},
currentStepText: {
fontSize: '1.3rem',
fontWeight: 500,
letterSpacing: '0.25px',
},
}));
| javascript |
Mumbai Indians, Director of Cricket Operations, Zaheer Khan said it feels heartening to see experienced overseas players in the squad interacting with the young Indian talent.
Mumbai has a great mix of experienced and young players in their line-up. From pacers to batsmen, the side has a mix of both in each department.
"We have a very experienced bunch of pacers and that is something which is definitely going to work in our advantage, not only with the bowling unit but also I see all the oversees bowlers interacting with the Indian young talent and that is something heartening to see," Zaheer said in the pre-match said in a virtual pre-match conference.
"When you see those interactions when oversees and the Indian experienced players making that effort of having that communication and encouragement to the youth. It always goes a long way for us in the season and generally as a franchise moving forward so that is something which we have always seen and which we always encourage," he added.
The Rohit Sharma-led side has played two games in the tournament so far. They lost the opening game against CSK while the team defeated KKR by 49 runs in the next match.
When asked about spinners' performance Zaheer replied, "It is too early in the tournament we have just played two games in the tournament. As a bowling unit, we have been doing a fantastic job. In this format of the game, batters putting pressure on the bowlers and you have to stay on the top of your game. That is something which the glimpses you have seen from our spinners as well in the last game and that is something you will see going forward in the tournament. "
Zaheer added that Rahul Chahar is a 'fantastic leg-spinner' who is looking in good form. He has scalped three wickets so far.
"Rahul Chahar is a fantastic leg-spinner and has had a brilliant last season. He is looking in good form. As far as matches are concern, it is a matter of time and things will fall in place," Zaheer said.
"As far as death bowling, we have pretty good plans in place with regard to different opposition and different batters. It is about going out there and having the freedom of expression which we really believe when you have to go with the game," he added.
Mumbai Indians will take on RCB at Dubai International Stadium on Monday, September 28.
( With inputs from ANI ) | english |
package jp.bootware.template.springauthbackend.infrastructure.authentication.user.impl;
import jp.bootware.template.springauthbackend.entity.*;
import jp.bootware.template.springauthbackend.infrastructure.authentication.token.Token;
import jp.bootware.template.springauthbackend.infrastructure.authentication.token.TokenProperty;
import jp.bootware.template.springauthbackend.infrastructure.authentication.token.TokenUtil;
import jp.bootware.template.springauthbackend.infrastructure.authentication.token.TokenValidation;
import jp.bootware.template.springauthbackend.infrastructure.authentication.user.MUserRepository;
import jp.bootware.template.springauthbackend.infrastructure.authentication.user.UserProfile;
import jp.bootware.template.springauthbackend.infrastructure.authentication.user.UserService;
import jp.bootware.template.springauthbackend.infrastructure.authentication.user.dto.LoginRequest;
import jp.bootware.template.springauthbackend.infrastructure.authentication.user.dto.LoginResponse;
import jp.bootware.template.springauthbackend.infrastructure.authentication.user.dto.LogoutResponse;
import jp.bootware.template.springauthbackend.infrastructure.web.HttpCookieUtil;
import jp.bootware.template.springauthbackend.infrastructure.web.ResponseSuccessFailure;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpCookie;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.stream.Collectors;
@Service
@Transactional
public class UserServiceImpl implements UserService {
@Autowired
HttpCookieUtil httpCookieUtil;
@Autowired
TokenProperty tokenProperty;
@Autowired
TokenUtil tokenUtil;
@Autowired
TokenValidation tokenValidation;
@Autowired
MUserRepository repository;
@Autowired
UserSpecification specification;
@Override
public ResponseEntity<LoginResponse> login(
LoginRequest loginRequest, String accessToken, String refreshToken) {
String loginId = loginRequest.getLoginId();
MUserEntity user = repository.findByEmailOrUsername(loginId);
boolean accessTokenValid = tokenValidation.validate(accessToken);
boolean refreshTokenValid = tokenValidation.validate(refreshToken);
HttpHeaders responseHeaders = new HttpHeaders();
if (specification.invalidAllTokens(accessTokenValid, refreshTokenValid)
|| specification.validAllTokens(accessTokenValid, refreshTokenValid)) {
Token newAccessToken = tokenUtil.generateAccessToken(user.getUserName());
HttpCookie accessTokenCookie = httpCookieUtil.createTokenCookie(
tokenProperty.getAccessTokenCookieName(), newAccessToken);
responseHeaders.add(HttpHeaders.SET_COOKIE, accessTokenCookie.toString());
Token newRefreshToken = tokenUtil.generateRefreshToken(user.getUserName());
HttpCookie refreshTokenCookie = httpCookieUtil.createTokenCookie(
tokenProperty.getRefreshTokenCookieName(), newRefreshToken);
responseHeaders.add(HttpHeaders.SET_COOKIE, refreshTokenCookie.toString());
} else if (specification.invalidAccessToken(accessTokenValid, refreshTokenValid)) {
Token newAccessToken = tokenUtil.generateAccessToken(user.getUserName());
HttpCookie accessTokenCookie = httpCookieUtil.createTokenCookie(
tokenProperty.getAccessTokenCookieName(), newAccessToken);
responseHeaders.add(HttpHeaders.SET_COOKIE, accessTokenCookie.toString());
}
LoginResponse loginResponse = new LoginResponse(ResponseSuccessFailure.SUCCESS,
"Auth successful. Tokens are created in cookie.");
return ResponseEntity.ok().headers(responseHeaders).body(loginResponse);
}
@Override
public ResponseEntity<LoginResponse> refresh(String accessToken, String refreshToken) {
boolean refreshTokenValid = tokenValidation.validate(refreshToken);
if (!refreshTokenValid) {
throw new IllegalArgumentException("Refresh Token is invalid!");
}
String currentUserEmail = tokenUtil.getUsernameFromToken(accessToken);
Token newAccessToken = tokenUtil.generateAccessToken(currentUserEmail);
HttpHeaders responseHeaders = new HttpHeaders();
responseHeaders.add(HttpHeaders.SET_COOKIE, httpCookieUtil
.createTokenCookie(tokenProperty.getAccessTokenCookieName(),
newAccessToken.getTokenValue(), newAccessToken.getDuration())
.toString());
LoginResponse loginResponse = new LoginResponse(ResponseSuccessFailure.SUCCESS,
"Auth successful. Tokens are created in cookie.");
return ResponseEntity.ok().headers(responseHeaders).body(loginResponse);
}
@Override
public ResponseEntity<LogoutResponse> logout() {
HttpHeaders responseHeaders = new HttpHeaders();
HttpCookie deleteAccessTokenCookie = httpCookieUtil.createDeleteTokenCookie(
tokenProperty.getAccessTokenCookieName());
responseHeaders.add(HttpHeaders.SET_COOKIE, deleteAccessTokenCookie.toString());
HttpCookie deleteRefreshTokenCookie = httpCookieUtil.createDeleteTokenCookie(
tokenProperty.getRefreshTokenCookieName());
responseHeaders.add(HttpHeaders.SET_COOKIE, deleteRefreshTokenCookie.toString());
LogoutResponse logoutResponse =
new LogoutResponse(ResponseSuccessFailure.SUCCESS, "Logout successful.");
return ResponseEntity.ok().headers(responseHeaders).body(logoutResponse);
}
@Override
public UserProfile getUserProfile() {
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
UserDetailsImpl customUserDetails = (UserDetailsImpl) authentication.getPrincipal();
MUserEntity user = repository.findByEmailOrUsername(customUserDetails.getUsername());
UserProfile profile = new UserProfile();
profile.setUserId(user.getId());
profile.setUsername(user.getUserName());
profile.setEmail(user.getMailAddress());
profile.setRoles(user.getTUserRoles().stream()
.map(TUserRoleEntity::getMRole)
.map(MRoleEntity::getRoleName)
.collect(Collectors.toSet()));
profile.setAuthActions(user.getTUserActionAuthoritys().stream()
.map(TUserActionAuthorityEntity::getMActionAuthority)
.map(MActionAuthorityEntity::getActionName)
.collect(Collectors.toSet()));
return profile;
}
}
| java |
<gh_stars>0
/******************************************************************************
* Copyright (c) 2015 Red Hat, Inc. and others.
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: JBoss by Red Hat - Initial implementation.
*****************************************************************************/
package org.jboss.mapper.eclipse.internal.editor;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.util.LocalSelectionTransfer;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.ViewerDropAdapter;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.dnd.TransferData;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.ui.dialogs.ResourceListSelectionDialog;
import org.jboss.mapper.eclipse.Activator;
import org.jboss.mapper.eclipse.TransformationEditor;
import org.jboss.mapper.eclipse.internal.util.Util;
import org.jboss.mapper.model.Model;
/**
*
*/
public class ModelTabFolder extends CTabFolder {
Model model;
ModelViewer modelViewer;
/**
* @param editor
* @param parent
* @param title
* @param model
*/
public ModelTabFolder(final TransformationEditor editor,
final Composite parent,
final String title,
final Model model) {
super(parent, SWT.BORDER);
this.model = model;
setBackground(parent.getDisplay().getSystemColor(
SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
final ToolBar toolBar = new ToolBar(this, SWT.RIGHT);
setTopRight(toolBar);
final ToolItem changeItem = new ToolItem(toolBar, SWT.NONE);
changeItem.setText("Change " + title);
changeItem.setImage(Util.CHANGE_IMAGE);
changeItem.setToolTipText("Change transformation " + title.toLowerCase());
final CTabItem tab = new CTabItem(this, SWT.NONE);
tab.setText(title + (model == null ? "" : ": " + model.getName()));
modelViewer = new ModelViewer(editor, this, model);
tab.setControl(modelViewer);
modelViewer.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
modelViewer.layout();
setSelection(tab);
changeItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(final SelectionEvent event) {
changeModel(editor, title, tab);
}
});
}
void changeModel(final TransformationEditor editor,
final String title,
final CTabItem tab) {
final IFolder classesFolder = editor.project().getFolder("target/classes");
final List<IResource> classes = new ArrayList<>();
try {
findClasses(classesFolder, classes);
final ResourceListSelectionDialog dlg =
new ResourceListSelectionDialog(getShell(),
classes.toArray(new IResource[classes.size()])) {
@Override
protected Control createDialogArea(final Composite parent) {
final Composite dlgArea = (Composite) super.createDialogArea(parent);
for (final Control child : dlgArea.getChildren()) {
if (child instanceof Text) {
((Text) child).setText(model == null ? "*" : model.getName());
break;
}
}
return dlgArea;
}
};
dlg.setTitle("Select " + title);
if (dlg.open() != Window.OK) {
return;
}
final IFile file = (IFile) dlg.getResult()[0];
String name =
file.getFullPath().makeRelativeTo(classesFolder.getFullPath()).toString()
.replace('/', '.');
name = name.substring(0, name.length() - ".class".length());
model = editor.changeModel(model, name);
tab.setText(title + ": " + model.getName());
modelViewer.rootModel = model;
refresh();
layout();
} catch (final Exception e) {
Activator.error(e);
}
}
/**
* @param listener
*/
public void configureDropSupport(final DropListener listener) {
modelViewer.treeViewer.addDropSupport(DND.DROP_MOVE,
new Transfer[] {LocalSelectionTransfer.getTransfer()},
new ViewerDropAdapter(modelViewer.treeViewer) {
@Override
public boolean performDrop(final Object data) {
try {
listener.drop(((IStructuredSelection) LocalSelectionTransfer
.getTransfer()
.getSelection()).getFirstElement(),
(Model) getCurrentTarget());
return true;
} catch (final Exception e) {
Activator.error(e);
return false;
}
}
@Override
public boolean validateDrop(final Object target,
final int operation,
final TransferData transferType) {
return getCurrentLocation() == ViewerDropAdapter.LOCATION_ON;
}
});
}
private void expand(final Model model) {
if (model == null) {
return;
}
expand(model.getParent());
modelViewer.treeViewer.expandToLevel(model, 0);
}
private void findClasses(final IFolder folder,
final List<IResource> classes) throws CoreException {
for (final IResource resource : folder.members()) {
if (resource instanceof IFolder) {
findClasses((IFolder) resource, classes);
} else if (resource.getName().endsWith(".class")) {
classes.add(resource);
}
}
}
/**
*
*/
public void refresh() {
modelViewer.treeViewer.refresh();
}
/**
* @param object
*/
public void select(final Object object) {
expand(((Model) object).getParent());
modelViewer.treeViewer.setSelection(new StructuredSelection(object), true);
}
/**
*
*/
public static interface DropListener {
/**
* @param object
* @param targetModel
* @throws Exception
*/
void drop(Object object,
Model targetModel) throws Exception;
}
}
| java |
<gh_stars>0
## TDShooter using gba-sprite-engine
TDShooter is a top-down shooter game built for the GameBoy Advance by [<NAME>](https://github.com/Jettypanini) as a project for the course "Software design with C/C++". This project started form the [gba-sprite-engine](https://github.com/wgroeneveld/gba-sprite-engine) provided by the lecturer [<NAME>](https://github.com/wgroeneveld). The code for this project can be observed in the file "JethroPans_TDShooter".
## Game description
In the game the player controls the character named Guy who has to pass a forest that is flooded with zombified machops. If the player gets too close to the zombified machops he dies. The zombified machops can be killed using the gun. The player possesses a normal glock and a shotgun. The glock shoots one bullet at a time, however can shoot continuously. The shotgun shoots five bullets at a time, however has to wait until the last bullets disappeared.
### Controls
```
- Arrow keys: player movement
- B: shoot
- Shoulder L: equip glock
- shoulder R: equip shotgun
```
### Music
The song heard in this game is "Spider dance" by <NAME> from the RPG game Undertale.
### Characters
#### Guy
<img src="https://github.com/Jettypanini/gba-sprite-engine/blob/master/JethroPans_TDShooter/img/guy_64_64.png">
#### Zombified mashop
<img src="https://github.com/Jettypanini/gba-sprite-engine/blob/master/JethroPans_TDShooter/img/enemy_32.png">
### Screenshots
<img src="https://github.com/Jettypanini/gba-sprite-engine/blob/master/JethroPans_TDShooter/img/homescreen.PNG">
<img src="https://github.com/Jettypanini/gba-sprite-engine/blob/master/JethroPans_TDShooter/img/screenshot1.PNG">
<img src="https://github.com/Jettypanini/gba-sprite-engine/blob/master/JethroPans_TDShooter/img/screenshot.PNG">
## Domain model
When starting the game, the player can see the home screen. In this home screen the playable character can be seen shooting a bullet at the zombified machop, summarizing the game. After pressing the "Start" button the level starts. The background "stage1", the music "SpiderDance" and the sprites "figures" are being loaded. If the player shoots at a zombified mashop, the function shoot() reacts as the player is holding a glock or shotgun. Both are child classes of the abstract class gun. The bullets and enemies shown on the screen are vectors of the objects with the same name. Each object holds information involving the movement, position and whether it can be seen or not. If the player dies, the screen shows he failed. By pressing the "Start" button the player can return to the home screen. Same goes for the ending screen if the player completes the level.
<img src="https://github.com/Jettypanini/gba-sprite-engine/blob/master/JethroPans_TDShooter/img/domain_model.png">
## Authors
* *<NAME>* - Lecturer - [GitHub](https://github.com/wgroeneveld)
* *<NAME>* - Student - [Github](https://github.com/Jettypanini)
## Acknowledgements
* high-level object-oriented Gameboy Advance sprite engine library: [gba-sprite-engine](https://github.com/wgroeneveld/gba-sprite-engine)
* GBA image transmogrifier: [Grit](https://www.coranac.com/man/grit/html/grit.htm)
* Sound to GBA file converter: [Audacity](https://www.audacityteam.org/download/)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## References
* Machop sprite: [https://www.spriters-resource.com/game_boy_advance/pokemonfireredleafgreen/sheet/3711/](https://www.spriters-resource.com/game_boy_advance/pokemonfireredleafgreen/sheet/3711/)
* Materials used in the map: [https://www.spriters-resource.com/game_boy_advance/pokemonfireredleafgreen/sheet/3736/](https://www.spriters-resource.com/game_boy_advance/pokemonfireredleafgreen/sheet/3736/)
* Guy: [http://pixelartmaker.com/art/1b679450a241211](http://pixelartmaker.com/art/1b679450a241211)
* Bullet: [https://www.spriters-resource.com/game_boy_advance/gtadv/sheet/4612/](https://www.spriters-resource.com/game_boy_advance/gtadv/sheet/4612/)
| markdown |
<gh_stars>0
@CHARSET "UTF-8";
@import url("home.css");
.user_description_div {
background-color: white;
color: black;
padding: 14px 15px 10px 15px;
border-bottom: 1px solid #D0D0D0;
margin-top: 20px;
margin-bottom: 20px;
}
.user_name_div {
font-size: 25px;
}
.user_rank_div {
font-size: 20px;
}
.total_quizes_div {
font-size: 20px;
} | css |
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pensando EAD na Pandemia - Ajude o EAD</title>
</head>
<body>
<h1>" Tudo ao mesmo tempo: A G O R A !!! "</h1>
<hr>
<p>> Neste momendo de tantas dificuldades gritantes, na saúde na economia, na educação. necessitamos ser solidários e marcar presença onde haja necessiade de colaboração.</p>
<hr>
<p> Se a Educação Privada ainda carece de auxílios na tangente da EAD, quase não é possível mensurar as dificuldades da Educação Pública. E N T Ã O <<< O >>>> que Fazer Bêbê !!!!!! </p>
</body>
<footer>
<center><small>© Testes Pensando EAD na Pandemia</small></center>
</footer>
</html> | html |
<gh_stars>0
package main
import (
"context"
"fmt"
"path"
"sort"
"sync"
"testing"
"github.com/sirupsen/logrus/hooks/test"
"github.com/spiffe/go-spiffe/v2/spiffeid"
entryv1 "github.com/spiffe/spire/proto/spire/api/server/entry/v1"
"github.com/spiffe/spire/proto/spire/types"
"github.com/spiffe/spire/test/spiretest"
"github.com/stretchr/testify/require"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
admv1beta1 "k8s.io/api/admission/v1beta1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
var (
fakePodWithLabel = `
{
"kind": "Pod",
"apiVersion": "v1",
"metadata": {
"name": "PODNAME",
"namespace": "NAMESPACE",
"labels": {
"spire-workload": "WORKLOAD"
}
},
"spec": {
"serviceAccountName": "SERVICEACCOUNT"
}
}
`
fakePodWithAnnotation = `
{
"kind": "Pod",
"apiVersion": "v1",
"metadata": {
"name": "PODNAME",
"namespace": "NAMESPACE",
"annotations": {
"spiffe.io/spiffe-id": "ENV/WORKLOAD"
}
},
"spec": {
"serviceAccountName": "SERVICEACCOUNT"
}
}
`
fakePodOnlySA = `
{
"kind": "Pod",
"apiVersion": "v1",
"metadata": {
"name": "PODNAME-NOLABEL",
"namespace": "NAMESPACE"
},
"spec": {
"serviceAccountName": "SERVICEACCOUNT"
}
}
`
)
func TestControllerInitialization(t *testing.T) {
controller, r := newTestController("", "")
// Initialize should create the registration entry for the cluster nodes
require.NoError(t, controller.Initialize(context.Background()))
requireEntriesEqual(t, []*types.Entry{
{
Id: "00000001",
ParentId: mustIDFromString("spiffe://domain.test/spire/server"),
SpiffeId: mustIDFromString("spiffe://domain.test/k8s-workload-registrar/CLUSTER/node"),
Selectors: []*types.Selector{
{Type: "k8s_psat", Value: "cluster:CLUSTER"},
},
},
}, r.GetEntries())
}
func TestControllerIgnoresKubeNamespaces(t *testing.T) {
controller, r := newTestController("", "")
for _, namespace := range []string{"kube-system", "kube-public"} {
requireReviewAdmissionSuccess(t, controller, &admv1beta1.AdmissionRequest{
UID: "uid",
Kind: metav1.GroupVersionKind{
Version: "v1",
Kind: "Pod",
},
Namespace: namespace,
Name: "PODNAME",
Operation: "CREATE",
Object: runtime.RawExtension{
Raw: []byte(fakePodWithLabel),
},
})
require.Empty(t, r.GetEntries(), 0)
}
}
func TestControllerIgnoresNonPods(t *testing.T) {
controller, r := newTestController("", "")
requireReviewAdmissionSuccess(t, controller, &admv1beta1.AdmissionRequest{
UID: "uid",
Kind: metav1.GroupVersionKind{
Version: "v1",
Kind: "ServiceAccount",
},
Namespace: "NAMESPACE",
Name: "SERVICEACCOUNTNAME",
Operation: "CREATE",
})
require.Empty(t, r.GetEntries(), 0)
}
func TestControllerFailsIfPodUnparsable(t *testing.T) {
controller, _ := newTestController("", "")
requireReviewAdmissionFailure(t, controller, &admv1beta1.AdmissionRequest{
UID: "uid",
Kind: metav1.GroupVersionKind{
Version: "v1",
Kind: "Pod",
},
Namespace: "NAMESPACE",
Name: "POD",
Operation: "CREATE",
}, "unable to unmarshal v1/Pod object")
}
func TestControllerIgnoresPodOperationsOtherThanCreateAndDelete(t *testing.T) {
controller, _ := newTestController("", "")
requireReviewAdmissionSuccess(t, controller, &admv1beta1.AdmissionRequest{
UID: "uid",
Kind: metav1.GroupVersionKind{
Version: "v1",
Kind: "Pod",
},
Namespace: "NAMESPACE",
Name: "POD",
Operation: "UPDATE",
})
}
func TestControllerServiceAccountBasedRegistration(t *testing.T) {
controller, r := newTestController("", "")
// Send in a POD CREATE and assert that it will be admitted
requireReviewAdmissionSuccess(t, controller, &admv1beta1.AdmissionRequest{
UID: "uid",
Kind: metav1.GroupVersionKind{
Version: "v1",
Kind: "Pod",
},
Namespace: "NAMESPACE",
Name: "PODNAME",
Operation: "CREATE",
Object: runtime.RawExtension{
Raw: []byte(fakePodWithLabel),
},
})
// Assert that the registration entry for the pod was created
requireEntriesEqual(t, []*types.Entry{
{
Id: "00000001",
ParentId: mustIDFromString("spiffe://domain.test/k8s-workload-registrar/CLUSTER/node"),
SpiffeId: mustIDFromString("spiffe://domain.test/ns/NAMESPACE/sa/SERVICEACCOUNT"),
Selectors: []*types.Selector{
{Type: "k8s", Value: "ns:NAMESPACE"},
{Type: "k8s", Value: "pod-name:PODNAME"},
},
},
}, r.GetEntries())
}
func TestControllerCleansUpOnPodDeletion(t *testing.T) {
controller, r := newTestController("", "")
// create an entry for the POD in one service account
r.CreateEntry(&types.Entry{
Selectors: []*types.Selector{
namespaceSelector("NAMESPACE"),
podNameSelector("PODNAME"),
},
})
// create an entry for the POD in another service account (should be rare
// in practice but we need to handle it).
r.CreateEntry(&types.Entry{
Selectors: []*types.Selector{
namespaceSelector("OTHERNAMESPACE"),
podNameSelector("PODNAME"),
},
})
requireReviewAdmissionSuccess(t, controller, &admv1beta1.AdmissionRequest{
UID: "uid",
Kind: metav1.GroupVersionKind{
Version: "v1",
Kind: "Pod",
},
Namespace: "NAMESPACE",
Name: "PODNAME",
Operation: "DELETE",
})
// Assert that the right registration entry for the pod was removed
requireEntriesEqual(t, []*types.Entry{
{
Id: "00000002",
Selectors: []*types.Selector{
{Type: "k8s", Value: "ns:OTHERNAMESPACE"},
{Type: "k8s", Value: "pod-name:PODNAME"},
},
},
}, r.GetEntries())
}
func TestControllerLabelBasedRegistration(t *testing.T) {
controller, r := newTestController("spire-workload", "")
// Send in a POD CREATE and assert that it will be admitted
requireReviewAdmissionSuccess(t, controller, &admv1beta1.AdmissionRequest{
UID: "uid",
Kind: metav1.GroupVersionKind{
Version: "v1",
Kind: "Pod",
},
Namespace: "NAMESPACE",
Name: "PODNAME",
Operation: "CREATE",
Object: runtime.RawExtension{
Raw: []byte(fakePodWithLabel),
},
})
// Assert that the registration entry for the pod was created
requireEntriesEqual(t, []*types.Entry{
{
Id: "00000001",
ParentId: mustIDFromString("spiffe://domain.test/k8s-workload-registrar/CLUSTER/node"),
SpiffeId: mustIDFromString("spiffe://domain.test/WORKLOAD"),
Selectors: []*types.Selector{
{Type: "k8s", Value: "ns:NAMESPACE"},
{Type: "k8s", Value: "pod-name:PODNAME"},
},
},
}, r.GetEntries())
}
func TestControllerLabelBasedRegistrationIgnoresPodsWithoutLabel(t *testing.T) {
controller, r := newTestController("spire-workload", "")
// Send in a POD CREATE and assert that it will be admitted
requireReviewAdmissionSuccess(t, controller, &admv1beta1.AdmissionRequest{
UID: "uid",
Kind: metav1.GroupVersionKind{
Version: "v1",
Kind: "Pod",
},
Namespace: "NAMESPACE",
Name: "PODNAME",
Operation: "CREATE",
Object: runtime.RawExtension{
Raw: []byte(fakePodOnlySA),
},
})
// Assert that the registration entry for the pod was created
require.Len(t, r.GetEntries(), 0)
}
func TestPodSpiffeId(t *testing.T) {
for _, testCase := range []struct {
name string
expectedSpiffeID string
configLabel string
podLabel string
configAnnotation string
podAnnotation string
podNamespace string
podServiceAccount string
}{
{
name: "using namespace and serviceaccount",
expectedSpiffeID: "spiffe://domain.test/ns/NS/sa/SA",
podNamespace: "NS",
podServiceAccount: "SA",
},
{
name: "using label",
expectedSpiffeID: "spiffe://domain.test/LABEL",
configLabel: "spiffe.io/label",
podLabel: "LABEL",
},
{
name: "using annotation",
expectedSpiffeID: "spiffe://domain.test/ANNOTATION",
configAnnotation: "spiffe.io/annotation",
podAnnotation: "ANNOTATION",
},
{
name: "ignore unannotated",
configAnnotation: "someannotation",
expectedSpiffeID: "",
},
{
name: "ignore unlabelled",
configLabel: "somelabel",
expectedSpiffeID: "",
},
} {
testCase := testCase
t.Run(testCase.name, func(t *testing.T) {
c, _ := newTestController(testCase.configLabel, testCase.configAnnotation)
// Set up pod:
pod := &corev1.Pod{
Spec: corev1.PodSpec{
ServiceAccountName: testCase.podServiceAccount,
},
ObjectMeta: metav1.ObjectMeta{
Namespace: testCase.podNamespace,
Labels: map[string]string{},
Annotations: map[string]string{},
},
}
if testCase.configLabel != "" && testCase.podLabel != "" {
pod.Labels[testCase.configLabel] = testCase.podLabel
}
if testCase.configAnnotation != "" && testCase.podAnnotation != "" {
pod.Annotations[testCase.configAnnotation] = testCase.podAnnotation
}
// Test:
spiffeID := c.podSpiffeID(pod)
// Verify result:
require.Equal(t, testCase.expectedSpiffeID, stringFromID(spiffeID))
})
}
}
func TestControllerAnnotationBasedRegistration(t *testing.T) {
controller, r := newTestController("", "spiffe.io/spiffe-id")
// Send in a POD CREATE and assert that it will be admitted
requireReviewAdmissionSuccess(t, controller, &admv1beta1.AdmissionRequest{
UID: "uid",
Kind: metav1.GroupVersionKind{
Version: "v1",
Kind: "Pod",
},
Namespace: "NAMESPACE",
Name: "PODNAME",
Operation: "CREATE",
Object: runtime.RawExtension{
Raw: []byte(fakePodWithAnnotation),
},
})
// Assert that the registration entry for the pod was created
requireEntriesEqual(t, []*types.Entry{
{
Id: "00000001",
ParentId: mustIDFromString("spiffe://domain.test/k8s-workload-registrar/CLUSTER/node"),
SpiffeId: mustIDFromString("spiffe://domain.test/ENV/WORKLOAD"),
Selectors: []*types.Selector{
{Type: "k8s", Value: "ns:NAMESPACE"},
{Type: "k8s", Value: "pod-name:PODNAME"},
},
},
}, r.GetEntries())
}
func TestControllerAnnotationBasedRegistrationIgnoresPodsWithoutLabel(t *testing.T) {
controller, r := newTestController("", "spiffe.io/spiffe-id")
// Send in a POD CREATE and assert that it will be admitted
requireReviewAdmissionSuccess(t, controller, &admv1beta1.AdmissionRequest{
UID: "uid",
Kind: metav1.GroupVersionKind{
Version: "v1",
Kind: "Pod",
},
Namespace: "NAMESPACE",
Name: "PODNAME",
Operation: "CREATE",
Object: runtime.RawExtension{
Raw: []byte(fakePodOnlySA),
},
})
// Assert that the registration entry for the pod was created
require.Len(t, r.GetEntries(), 0)
}
func newTestController(podLabel, podAnnotation string) (*Controller, *fakeEntryClient) {
log, _ := test.NewNullLogger()
e := newFakeEntryClient()
return NewController(ControllerConfig{
Log: log,
E: e,
TrustDomain: "domain.test",
Cluster: "CLUSTER",
PodLabel: podLabel,
PodAnnotation: podAnnotation,
DisabledNamespaces: map[string]bool{"kube-system": true, "kube-public": true},
}), e
}
func requireReviewAdmissionSuccess(t *testing.T, controller *Controller, req *admv1beta1.AdmissionRequest) {
resp, err := controller.ReviewAdmission(context.Background(), req)
require.NoError(t, err)
require.Equal(t, &admv1beta1.AdmissionResponse{
UID: req.UID,
Allowed: true,
}, resp)
}
func requireReviewAdmissionFailure(t *testing.T, controller *Controller, req *admv1beta1.AdmissionRequest, contains string) {
resp, err := controller.ReviewAdmission(context.Background(), req)
require.Error(t, err)
require.Contains(t, err.Error(), contains)
require.Nil(t, resp)
}
type fakeEntryClient struct {
entryv1.EntryClient
mu sync.Mutex
nextID int64
entries map[string]*types.Entry
}
func newFakeEntryClient() *fakeEntryClient {
return &fakeEntryClient{
entries: make(map[string]*types.Entry),
}
}
func (c *fakeEntryClient) GetEntries() []*types.Entry {
c.mu.Lock()
defer c.mu.Unlock()
entries := make([]*types.Entry, 0, len(c.entries))
for _, entry := range c.entries {
entries = append(entries, cloneEntry(entry))
}
sort.Slice(entries, func(i, j int) bool {
return entries[i].Id < entries[j].Id
})
return entries
}
func (c *fakeEntryClient) CreateEntry(entry *types.Entry) *types.Entry {
c.mu.Lock()
defer c.mu.Unlock()
// Clone for storage
entry = cloneEntry(entry)
c.nextID++
entry.Id = fmt.Sprintf("%08x", c.nextID)
c.entries[entry.Id] = entry
// Clone on the way out
return cloneEntry(entry)
}
func (c *fakeEntryClient) BatchCreateEntry(ctx context.Context, req *entryv1.BatchCreateEntryRequest, opts ...grpc.CallOption) (*entryv1.BatchCreateEntryResponse, error) {
resp := new(entryv1.BatchCreateEntryResponse)
for _, entryIn := range req.Entries {
resp.Results = append(resp.Results, &entryv1.BatchCreateEntryResponse_Result{
Status: &types.Status{},
Entry: c.CreateEntry(entryIn),
})
}
return resp, nil
}
func (c *fakeEntryClient) BatchDeleteEntry(ctx context.Context, req *entryv1.BatchDeleteEntryRequest, opts ...grpc.CallOption) (*entryv1.BatchDeleteEntryResponse, error) {
c.mu.Lock()
defer c.mu.Unlock()
resp := new(entryv1.BatchDeleteEntryResponse)
for _, id := range req.Ids {
_, ok := c.entries[id]
code := codes.OK
var msg string
if !ok {
code = codes.NotFound
msg = "not found"
}
resp.Results = append(resp.Results, &entryv1.BatchDeleteEntryResponse_Result{
Status: &types.Status{Code: int32(code), Message: msg},
Id: id,
})
delete(c.entries, id)
}
return resp, nil
}
func (c *fakeEntryClient) ListEntries(ctx context.Context, req *entryv1.ListEntriesRequest, opts ...grpc.CallOption) (*entryv1.ListEntriesResponse, error) {
switch {
case req.Filter == nil:
return nil, status.Error(codes.InvalidArgument, "expecting filter")
case req.Filter.BySelectors == nil:
return nil, status.Error(codes.InvalidArgument, "expecting filter by selector")
case req.Filter.BySelectors.Match != types.SelectorMatch_MATCH_EXACT:
return nil, status.Error(codes.InvalidArgument, "expecting exact selector match")
}
// peform an exact match check against selectors
var entries []*types.Entry
for _, entry := range c.entries {
if selectorSetsEqual(req.Filter.BySelectors.Selectors, entry.Selectors) {
entries = append(entries, cloneEntry(entry))
}
}
return &entryv1.ListEntriesResponse{
Entries: entries,
}, nil
}
func requireEntriesEqual(t *testing.T, expected, actual []*types.Entry) {
spiretest.RequireProtoListEqual(t, expected, actual)
}
func selectorSetsEqual(as, bs []*types.Selector) bool {
if len(as) != len(bs) {
return false
}
type sel struct {
t string
v string
}
set := map[sel]struct{}{}
for _, a := range as {
set[sel{t: a.Type, v: a.Value}] = struct{}{}
}
for _, b := range bs {
if _, ok := set[sel{t: b.Type, v: b.Value}]; !ok {
return false
}
}
return true
}
func cloneEntry(in *types.Entry) *types.Entry {
return proto.Clone(in).(*types.Entry)
}
func mustIDFromString(s string) *types.SPIFFEID {
id := spiffeid.RequireFromString(s)
return &types.SPIFFEID{
TrustDomain: id.TrustDomain().String(),
Path: id.Path(),
}
}
func stringFromID(id *types.SPIFFEID) string {
if id == nil {
return ""
}
return fmt.Sprintf("spiffe://%s%s", id.TrustDomain, path.Clean("/"+id.Path))
}
| go |
{"Tremula.css":"<KEY>,"Tremula.js":"<KEY>,"Tremula.min.js":"<KEY>} | json |
const { app, BrowserWindow, session, Menu, ipcMain,shell } = require('electron');
const url = require('url');
const path = require('path');
const fs = require('fs');
const extensions = require('./extensions');
const exec = require('child_process').exec;
const LogHandler = require('./app/resources/library/log');
// enable/disable logs
const logger = LogHandler.getLogger(false, 'server');
function log(level, message){
LogHandler.setLogs(logger, level, message);
}
var isWin = process.platform === "win32";
var AppPath = "", child = "";
if(isWin){
AppPath = "resources/app/";
child = exec('node ./node_modules/pm2/bin/pm2 start app/resources/app.js', {async:true, cwd: AppPath});
}else{
AppPath = "/Applications/FirstBlood.app/Contents/Resources/app/";
child = exec('node_mac_bin/bin/node ./node_modules/pm2/bin/pm2 start app/resources/app.js -i 1', {async:true, cwd: AppPath});
}
log("info","Node server child process start");
child.stdout.on('data', function(data) {
log("info","Node server success response - " + data);
});
child.stderr.on('data', function(data) {
log("info","Node server err response - " + data);
});
let mainWindow;
let isDev = true;
function createWindow() {
// Load metamask
extensions.loadMetamask(session, mainWindow, isDev);
log("info","Electron app window created...");
mainWindow = new BrowserWindow({
'web-preferences': {'web-security': false},
width: 1920,
height: 1080,
icon: __dirname + '/app/assets/images/firstblood.icns',
title: 'FirstBlood'
});
mainWindow.maximize();
//mainWindow.webContents.openDevTools();
mainWindow.on('close', () => {
mainWindow.webContents.send('stop-server');
log("info","Electron app window closed & stopped server...");
});
mainWindow.on("closed", () => {
mainWindow = null;
});
var template = [{
label: "Edit",
submenu: [
{ label: "Undo", accelerator: "CmdOrCtrl+Z", selector: "undo:" },
{ label: "Redo", accelerator: "Shift+CmdOrCtrl+Z", selector: "redo:" },
{ type: "separator" },
{ label: "Cut", accelerator: "CmdOrCtrl+X", selector: "cut:" },
{ label: "Copy", accelerator: "CmdOrCtrl+C", selector: "copy:" },
{ label: "Paste", accelerator: "CmdOrCtrl+V", selector: "paste:" },
{ label: "Select All", accelerator: "CmdOrCtrl+A", selector: "selectAll:" }
]}
];
Menu.setApplicationMenu(Menu.buildFromTemplate(template));
setTimeout(function(){
indexPath = path.join(`brave/${__dirname}`, '/app/frontend/index.html');
mainWindow.loadURL(url.format({
pathname: indexPath,
protocol: 'chrome',
slashes: true
}));
}, 1500);
}
ipcMain.on('new-window', function(event,data){
shell.openExternal(data);
})
app.on("ready", createWindow);
app.on("browser-window-created", function (e, window) {
//window.setMenu(null);
});
app.on("window-all-closed", function () {
if (process.platform !== "darwin") {
stopServer();
app.quit();
}
});
app.on("activate", function () {
if (mainWindow === null) {
createWindow();
}
});
function stopServer(){
var stopChild = "";
if(isWin){
stopChild = exec('node ./node_modules/pm2/bin/pm2 kill', {async:true, cwd: AppPath});
}else{
stopChild = exec('node_mac_bin ./node_modules/pm2/bin/pm2 kill', {async:true, cwd: AppPath});
}
log("info","Node server child process end");
stopChild.stdout.on('data', function(data) {
log("info","Node server kill success response - " + data);
});
stopChild.stderr.on('data', function(data) {
log("info","Node server kill err response - " + data);
});
} | javascript |
- BJP has released the second list of its candidates for 82 constituencies ahead of Karnataka Assembly elections scheduled for May 12.
- Important factor is that no person from either Muslim or Christian communities.
BJP has released the second list of its candidates for 82 constituencies ahead of Karnataka Assembly elections scheduled for May 12. Important factor is that no person from either Muslim or Christian communities. Interestingly, the most-awaited Varuna candidate has not been announced in the second list too.
In the first list, BJP had announced candidates for 72 constituencies. BJP State President, former CM Yeddyurappa's second son Vijayendra is a ticket aspirant against CM Siddaramaiah's son Dr Yathindra from Congress. While Congress in the first list has announced Dr Yathindra as the Varuna candidate, BJP has kept people waiting.
Here is the second list of BJP for Karnataka Assembly Elections 2018: | english |
<filename>public/data/spring-projects/spring-framework/subgraph_2341.json
{"info": {"project": "spring-projects/spring-framework", "developers": 1, "edges": 3, "vertices": 4, "commits": 2, "id": 2341, "agedays": 3, "refactorings": 3, "group": "Overtime", "language": "Java", "level": "Method", "summary": ""}, "commits_list": ["fa0b683161", "96b0752ddb"], "edges": [{"id": 3388, "before": "org.springframework.web.servlet.src.main.org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#handleMatch(RequestMappingInfo,String,HttpServletRequest)", "lineB": null, "after": "org.springframework.web.servlet.src.main.org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping#handleMatch(RequestMappingInfo,String,HttpServletRequest)", "lineA": null, "ref": "PULL_UP", "sha1": "fa0b683161"}, {"id": 3380, "before": "org.springframework.web.servlet.src.main.org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping#handleMatch(RequestMappingInfo,String,HttpServletRequest)", "lineB": null, "after": "org.springframework.web.servlet.src.main.org.springframework.web.servlet.mvc.method.condition.ProducesRequestCondition#isEmpty()", "lineA": null, "ref": "EXTRACT_MOVE", "sha1": "96b0752ddb"}, {"id": 3375, "before": "org.springframework.web.servlet.src.main.org.springframework.web.servlet.mvc.method.condition.ProducesRequestCondition#getMatchingCondition(HttpServletRequest)", "lineB": null, "after": "org.springframework.web.servlet.src.main.org.springframework.web.servlet.mvc.method.condition.ProducesRequestCondition#isEmpty()", "lineA": null, "ref": "EXTRACT", "sha1": "96b0752ddb"}]} | json |
<reponame>Ayutac/Croptopia<gh_stars>10-100
{
"name": "<NAME>",
"icon": "croptopia:chicken_and_noodles",
"category": "croptopia:meals",
"pages": [
{
"type": "patchouli:crafting",
"recipe": "croptopia:chicken_and_noodles",
"text": "Recipe for chicken and noodles."
}
]
} | json |
Sleeveless shirts and spectacular backflips were the main talking points at the African Nations Cup on Monday after the day's four games produced one measly goal between them.
Nigerian striker Julius Aghahowa was the only man to hit the back of the net as Nigeria -- who face England and Argentina in the first round of the World Cup -- beat Algeria 1-0 in Bamako to go top of group A.
But the Ukraine-based Aghahowa, who cut inside three defenders and fired a low shot inside the post, raised an even bigger cheer with his goal celebration -- five perfectly executed backflips.
And while he did a passable impression of an Olympic gymnast, Cameroon's players admitted they could have been mistaken for basketball players after taking the field on Sunday wearing trend-setting sleeveless shirts.
The Indomitable Lions, who produced an unmemorable performance in their 1-0 win over the Democratic Republic of Congo, admitted that most comments had been centred on the shirts which they said were specially designed by team suppliers Puma for the sub-Saharan heat of the Nations Cup.
"They look like basketball shirts but they were perfect for us in this weather," said Patrick Suffoe.
"I don't know about the World Cup, I don't know what FIFA think about them. It's a special shirt for a special team."
Zambia and Tunisia, Ghana and Morocco and Ivory Coast and Togo all played out goalless draws, leaving the overall goal tally for the tournament at five from eight games.
Despite the lack of goals, Monday produced some exciting play.
Nigeria, runners-up in the competition they co-hosted with Ghana two years ago, put on a stylish display and should have won by more.
Ivory Coast, determined to avoid a repeat of their first round elimination which led to a humiliating one-week stay in a military camp in 2000, also created plenty of chances but were foiled by Togo goalkeeper Kossi Agassa, who plays his club football in Abidjan with Africa Sports.
Ibrahim Bakayoko, who has averaged a goal a game for the Elephants over the last two years, was the biggest victim, seeing three good efforts saved by Agassa in a lively derby played in front of noisy Ivorian fans who crossed the nearby border in a convoy of buses.
Bakayoko, the former Montpellier and Everton striker now based with Marseille, was among the players detained for a week in a military camp and forced to frog march and attend lectures on patriotism following the early exit last time.
Tunisia -- who rarely get involved in goal gluts -- and Zambia also threw up plenty of chances in their group D game in Bamako but both lacked composure in front of goal.
Ghana and Morocco left group B with no goals at all from two games after their match in Segou. Poor finishing denied a meagre crowd a goal to enjoy at the Amary Ngaou stadium as the two sides struggled on a bumpy pitch.
Morocco had a bright spell midway through the first half when they came close with four chances inside two minutes while Ghana periodically burst through into goal scoring positions but failed with the final touch.
| english |
<filename>test_unique_binary_search_trees.py
import unittest
import math
class Solution:
def numTrees(self, n: int) -> int:
if n < 1:
return 0
total_num = (math.factorial(2*n) /
(math.factorial(n+1)*math.factorial(n)))
return int(total_num)
class TestNumTrees(unittest.TestCase):
def setUp(self):
self.sol = Solution()
def test_num_trees_1(self):
n = 1
total_num = self.sol.numTrees(n)
self.assertEqual(total_num, 1)
def test_num_trees_2(self):
n = 2
total_num = self.sol.numTrees(n)
self.assertEqual(total_num, 2)
def test_num_trees_3(self):
n = 3
total_num = self.sol.numTrees(n)
self.assertEqual(total_num, 5)
def test_num_trees_4(self):
n = 4
total_num = self.sol.numTrees(n)
self.assertEqual(total_num, 14)
def test_num_trees_5(self):
n = 5
total_num = self.sol.numTrees(n)
self.assertEqual(total_num, 42)
def test_num_trees_11(self):
n = 11
total_num = self.sol.numTrees(n)
self.assertEqual(total_num, 58786)
if __name__ == "__main__":
unittest.main()
| python |
<gh_stars>10-100
package org.ssio.spi.clientexternal.filetypespecific.office.parse;
import org.ssio.api.external.parse.ParseParamBuilder;
import org.ssio.api.external.parse.PropFromColumnMappingMode;
import org.ssio.api.internal.common.sheetlocate.SsSheetLocator;
import org.ssio.util.code.BuilderPatternHelper;
import java.io.InputStream;
import java.util.List;
public class OfficeParseParamBuilder<BEAN> extends ParseParamBuilder<BEAN, OfficeParseParamBuilder<BEAN>> {
private SsSheetLocator sheetLocator = SsSheetLocator.byIndexLocator(0);
/**
* which sheet to load the data from? By default it's the sheet at index 0
*/
public OfficeParseParamBuilder<BEAN> setSheetLocator(SsSheetLocator sheetLocator) {
this.sheetLocator = sheetLocator;
return this;
}
@Override
protected OfficeParseParam fileTypeSpecificBuild(Class<BEAN> beanClass, PropFromColumnMappingMode propFromColumnMappingMode, InputStream spreadsheetInput, boolean sheetHasHeader) {
return new OfficeParseParam(beanClass, propFromColumnMappingMode, spreadsheetInput, sheetHasHeader, sheetLocator);
}
@Override
protected void fileTypeSpecificValidate(List<String> errors) {
BuilderPatternHelper builderHelper = new BuilderPatternHelper();
builderHelper.validateFieldNotNull("sheetLocator", sheetLocator, errors);
}
}
| java |
Just some days back we informed you that Abhishek Bachchan is to go behind the microphone and exercise his vocal chords for a song in Bluffmaster. The movie as such doesnt have any songs but this number will be used as a promotional music video for the film. Says Abhishek on the experience of turning singer, It was a terrifying experience. It all started with a joke with me proposing to sing the song. Rohan caught my bluff and insisted that I actually sing it. Vishal and Shekhar have done a fantastic job and made it a great track. So I cannot take any credit if it sounds good. Abhishek had made ace director/choreographer Farah Khan hear the song while shooting in New York. Farah Khan who loved the song, offered to direct the video for the song. They shot non-stop and finished the video in two days flat. The excitement in the song doesnt end there. The song also features others members from the cast of Bluffmaster Priyanka Chopra and Ritesih Deshmukh. Director Rohan Sippy and musician duo Vishal-Shekhar also make flashing appearances in the video as themselves. Four hot models Carol Gracias, Pia Trivedi, Scherzade Shroff and Anchal Kumar will add sensuality to the video. The video will be premiered on December 1 on the television. But we promise to show you the entire video before that. Stay tuned.
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 |
All India Football Federation president Praful Patel is likely to meet the representatives of the agitated I-League clubs on July 2 or 3 with the sports governing body shifting it’s proposed Executive Committee meeting to July 9, Times of India reported on Saturday.
“The AIFF president will meet I-League clubs either on July 2 or July 3,” AIFF general secretary Kushal Das said on Friday.
The I-League clubs have been at loggerheads for the past few months with AIFF and Football Sports Development Limited, which runs the Indian Super League, over the future of the league with the former boycotting the Super Cup in March after their request for a meeting with Patel was not heeded.
Patel, who was busy with Fifa Council elections, was then supposed to meet the club’s representatives on April 14 but that meeting was also postponed due to his commitments with the general election. AIFF then slapped the clubs with a hefty fine for boycotting the Super Cup.
Things came to a head last week when reports of AIFF calling a EC meeting on July 3 to clear the way for ISL to become the top league in the country started doing the rounds. I-League clubs responded by threatening to move court against any such decision.
AIFF then claimed that Patel was always willing to meet the club representatives but they only had not followed up with the association after the Super Cup.
Though there have been no clarity yet on the possible road map AIFF will opt for in the July 9 meeting, AIFF has finally taken a step towards at least listening to the grievances of the I-League clubs.
| english |
<gh_stars>0
{
"contract": "0xacce8e31616e608d001afdd63aa764f589666879",
"tool": "mythril",
"start": 1563807816.9343605,
"end": 1563807828.1759226,
"duration": 11.241562128067017,
"analysis": {
"error": null,
"issues": [
{
"address": 940,
"code": " var tokenToBu",
"debug": "",
"description": "This contract executes a message call to to another contract. Make sure that the called contract is trusted and does not execute user-supplied code.",
"filename": "/unique_chucks/32/0xacce8e31616e608d001afdd63aa764f589666879.sol",
"function": "buy()",
"lineno": 74,
"title": "Message call to external contract",
"type": "Informational"
},
{
"address": 940,
"code": " var tokenToBu",
"debug": "",
"description": "Multiple sends exist in one transaction, try to isolate each external call into its own transaction. As external calls can fail accidentally or deliberately.\nConsecutive calls: \nCall at address: 1464\nCall at address: 1284\nCall at address: 1101\n",
"filename": "/unique_chucks/32/0xacce8e31616e608d001afdd63aa764f589666879.sol",
"function": "buy()",
"lineno": 74,
"title": "Multiple Calls",
"type": "Information"
},
{
"address": 1101,
"code": "ing to course\n ",
"debug": "",
"description": "This contract executes a message call to to another contract. Make sure that the called contract is trusted and does not execute user-supplied code.",
"filename": "/unique_chucks/32/0xacce8e31616e608d001afdd63aa764f589666879.sol",
"function": "buy()",
"lineno": 73,
"title": "Message call to external contract",
"type": "Informational"
},
{
"address": 1101,
"code": "ing to course\n ",
"debug": "",
"description": "Multiple sends exist in one transaction, try to isolate each external call into its own transaction. As external calls can fail accidentally or deliberately.\nConsecutive calls: \nCall at address: 1464\nCall at address: 1284\n",
"filename": "/unique_chucks/32/0xacce8e31616e608d001afdd63aa764f589666879.sol",
"function": "buy()",
"lineno": 73,
"title": "Multiple Calls",
"type": "Information"
},
{
"address": 1284,
"code": "1 token\n require(t",
"debug": "",
"description": "This contract executes a message call to to another contract. Make sure that the called contract is trusted and does not execute user-supplied code.",
"filename": "/unique_chucks/32/0xacce8e31616e608d001afdd63aa764f589666879.sol",
"function": "buy()",
"lineno": 75,
"title": "Message call to external contract",
"type": "Informational"
},
{
"address": 1284,
"code": "1 token\n require(t",
"debug": "",
"description": "Multiple sends exist in one transaction, try to isolate each external call into its own transaction. As external calls can fail accidentally or deliberately.\nConsecutive calls: \nCall at address: 1464\n",
"filename": "/unique_chucks/32/0xacce8e31616e608d001afdd63aa764f589666879.sol",
"function": "buy()",
"lineno": 75,
"title": "Multiple Calls",
"type": "Information"
},
{
"address": 1464,
"code": " var supposedTo",
"debug": "",
"description": "This contract executes a message call to to another contract. Make sure that the called contract is trusted and does not execute user-supplied code.",
"filename": "/unique_chucks/32/0xacce8e31616e608d001afdd63aa764f589666879.sol",
"function": "buy()",
"lineno": 85,
"title": "Message call to external contract",
"type": "Informational"
}
],
"success": true
}
} | json |
def hvplot_with_buffer(gdf, buffer_size, *args, **kwargs):
"""
Convenience function for plotting a GeoPandas point GeoDataFrame using point markers plus buffer polygons
Parameters
----------
gdf : geopandas.GeoDataFrame
point GeoDataFrame to plot
buffer_size : numeric
size of the buffer in meters (measured in EPSG:31287)
"""
buffered = gdf.to_crs('epsg:31287').buffer(buffer_size)
buffered = gdf.copy().set_geometry(buffered).to_crs('epsg:4326')
plot = ( buffered.hvplot(geo=True, tiles='OSM', alpha=0.5, line_width=0, *args, **kwargs) *
gdf.hvplot(geo=True, hover_cols=['DESIGNATION'])
).opts(active_tools=['wheel_zoom'])
return plot
| python |
Could PWC, SEC and others help me out here?
When I read the resignation letter of Satyam’s CEO, it triggered a number of questions for me.
Raju insists no one else was involved.
1. Can that be right? Here’s my problem with this. Any firm the size of Satyam would have someone responsible for every major client and entire market/services segments. There would be executives poring over sales data, forecasts, bookings, etc. All sorts of people would have management reports that would detail the breakout of revenues by client, area of the world, etc. If my client bookings were all of sudden higher than I thought they should be, I would investigate the matter. Was I missing some commission or had Accounting made a mistake? I wouldn’t want my client to get overbilled either. So, how did Raju overstate revenues FOR YEARS without anyone else noticing? Even if he made up some fictitious client, that client’s revenues would have appeared in some executive’s performance reports. Someone would have responsibility for this bogus client. The only other explanation is that the person responsible for this bogus client work was in on the fraud. Also, who were the staff and project team leads for this overstated work? Didn’t they see a mismatch between the contract, billings and Satyam revenues?
2. Can a CEO manipulate this data without the CFO, auditors, COO or the board getting wise to the deception? Here’s a firm with approximately $2 billion in revenue. Can you name a firm of this magnitude that doesn’t have automated accounting systems? Can you name a firm of this size where there aren’t clear divisions of responsibility between the Controller, CFO and CEO. In well run firms, the Treasurer can move money but not create journal entries. The Controller can enter journal entries but not cut checks. The CFO may not have journal entry authority but can sign checks. The CEO usually cannot do either: cut checks or enter journal entries. Someone obviously let the CEO do more than he should or else others were participants in this scheme.
3. Where is Satyam’s CFO in this matter? Apparently, he’s been unavailable. According to Reuters:
"The CFO Srinivas (Vadlamani) has actually sent in his resignation today; we have not approved the resignation." "We have been in constant touch with the CFO. He had not been coming to office due to personal reasons but he had been cooperating fully in terms of the information he is to provide and channels he is to open up for access. "What I understand is that he is very much in Hyderabad, but he assured us he will be at work next week."
The Wall Street Journal indicates that the CFO had resigned recently and is in possession of Satyam’s books.
Satyam Computer Services Ltd., whose chairman has admitted concocting financial results, says it can keep operating -- but it's strapped for cash and its books are with a chief financial officer who's resigned and hasn't come to the office recently.
I’ve known a lot of CFOs in my life but I’ve never met a one who took the books of his old employer home with him/her. Did this person know something and took the books as some sort of hedge against future prosecution or to use as leverage? This is more than a bit odd.
4. Is Raju falling on his sword in a vainglorious or quasi-noble effort to spare his family and colleagues from prosecution or litigation? Given how much of his resignation letter concerns this point, I suspect he is. Part of this emanates from the paternal attitude some CEOs, especially founders, have towards their staff and family. Of course, he’ll say it was all his doing but that’s one big scam to pull off, successfully, for a lot of years without help from others. My guess is he will stonewall investigators as to the role of others in this fraud and hope that his admission will placate regulators, litigants, etc. It won’t work. This fraud is too big, too visible and too egregious to have its scope limited to just this one individual. Eventually, I would expect a lower level person or family member to cooperate with authorities and then it will erupt.
5. Can we trust anything in this resignation letter? No. Consider the source and what this person has already done. If ever data needs verifying, this is the time.
6. What was missing from the resignation letter? A lot. Raju, interestingly, can tell you the amounts that individual financial statement line items are off but he does not provide any detail in how the fraud was committed. I found that particularly telling. Also, there is probably a lot more to tell concerning the aborted attempt to buy the two firms last month and how these transactions would eventually shore-up Satyam’s financials. Think about this for a minute. Why would the other executives in these two businesses agree to have their firms acquired under terms where they would not their cash for years into the future? No rational executive would agree to this unless they knew about Satyam’s woes and/or have one strong sense of family commitment. Regulators need to look at the executives of these two firms to see what they knew, when they knew it, etc.
7. How did $1billion in cash go missing and why didn't anyone notice its absence? Did PriceWaterhouse not get confirmations re: bank balances or were banks complicit in the fraud? I really doubt the latter but something is hinky here. Satyam may be running out of cash now and, if Raju’s numbers are right, Satyam can’t have much cash at all right now. Somebody needs to start checking in the sofa cushions at Satyam because I suspect they’ll need every rupee they can find. Better check the mattresses of some the executives, too!
Do I have questions? You bet! Time for the forensic accountants to swoop in fast!
| english |
It’s almost Thanksgiving, which means it’s time to start decorating for Christmas.
Melania Trump accepted the delivery of the White House Christmas tree. While it’s not quite as big as the Rockefeller Plaza tree, it’s still a very impressive evergreen.
Being the White House Christmas tree, this wasn’t just a regular old delivery. The tree was delivered by horse and buggy while the U. S. Marine Band played “O Christmas Tree,” AP News reports. The buggy was drawn by two horses named Cash and Ben.
The 18-and-a-half foot tall Douglas fir will be the centerpiece of the White House Blue Room. A chandelier will have to be removed from the room to accommodate the massive decoration.
The first lady, escorted by military aides, welcomed the horse and buggy at the White House’s entrance. She briefly inspected the tree before stopping to pose with the farmer that donated it.
Larry Snyder, owner of Mahantongo Valley Farms in Pitman, Pa. , presented the centerpiece after winning an annual contest held by the National Christmas Tree Association. The contest has been held since 1966.
After accepting the tree, the first lady wished everyone a Merry Christmas before heading back inside.
Meanwhile, the White House hasn’t forgotten about Thanksgiving. On Thursday, the President will carry out the tradition of pardoning a turkey. Today, the White House tweeted out a poll asking followers to vote on which of two turkeys should be pardoned.
This year, the two birds up for pardon are named Bread and Butter. | english |
from .mem_bank import RGBMem, CMCMem
from .mem_moco import RGBMoCo, CMCMoCo
def build_mem(opt, n_data):
if opt.mem == 'bank':
mem_func = RGBMem if opt.modal == 'RGB' else CMCMem
memory = mem_func(opt.feat_dim, n_data,
opt.nce_k, opt.nce_t, opt.nce_m)
elif opt.mem == 'moco':
mem_func = RGBMoCo if opt.modal == 'RGB' else CMCMoCo
memory = mem_func(opt.feat_dim, opt.nce_k, opt.nce_t)
else:
raise NotImplementedError(
'mem not suported: {}'.format(opt.mem))
return memory
| python |
<gh_stars>10-100
# Copyright 2021 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file accompanying this file. This file 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.
from autograd import numpy as np
from syne_tune.optimizer.schedulers.searchers.bayesopt.gpautograd.gluon import (
Parameter,
ParameterDict,
Block,
)
def test_parameter():
p = Parameter(name="abc", shape=(1,))
p.initialize()
data = p.data
grad = p.grad
def test_parameter_dict():
pd = ParameterDict("pd")
pd.initialize()
p = pd.get("def")
def test_block():
class TestBlock(Block):
def __init__(self):
super(TestBlock, self).__init__()
with self.name_scope():
self.a = self.params.get("a", shape=(10,))
self.b = self.params.get("b", shape=(10,))
def forward(self, x):
return x + self.a.data() + self.b.data()
t = TestBlock()
t.initialize()
print(t.a.grad_req)
t.a.set_data(np.ones((10,)))
assert "a" in t.a.name
x = np.zeros((10,))
y = t(x)
print(y)
| python |
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json",
"id": "c2ebe6a8-5c9f-4199-bff0-4e0222926d4f",
"alias": "MobxTutorialWebPart",
"componentType": "WebPart",
// The "*" signifies that the version should be taken from the package.json
"version": "*",
"manifestVersion": 2,
// If true, the component can only be installed on sites where Custom Script is allowed.
// Components that allow authors to embed arbitrary script code should set this to true.
// https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f
"requiresCustomScript": false,
"supportedHosts": ["SharePointWebPart"],
"preconfiguredEntries": [{
"groupId": "5c03119e-3074-46fd-976b-c60198311f70", // Other
"group": { "default": "Other" },
"title": { "default": "MobxTutorial" },
"description": { "default": "An example of a webpart using mobx for managing the application state" },
"iconImageUrl": "data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM\/rhtAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAnwSURBVFhHzVjbq1xnFV\/7cmbmzJzL5NySKhQMpVh90odSEaWCCkWE1AZRqtLWW0Ef9Kn1glTESqVWBR98EEWUViESY+ODCqK0vliw4EsrCMZYJTbnNsnJmZyZffH3+62195mT+<KEY>
"properties": {
"ApplicationTitle": "Mobx Tutorial Title (change in webpart properties) 😎",
"AllowImportantItems": true
}
}]
}
| json |
use crate::Stream;
/// List of possible [`ViewBox`] parsing errors.
#[derive(Clone, Copy, Debug)]
pub enum ViewBoxError {
/// One of the numbers is invalid.
InvalidNumber,
/// ViewBox has a negative or zero size.
InvalidSize,
}
impl std::fmt::Display for ViewBoxError {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match *self {
ViewBoxError::InvalidNumber => {
write!(f, "viewBox contains an invalid number")
}
ViewBoxError::InvalidSize => {
write!(f, "viewBox has a negative or zero size")
}
}
}
}
impl std::error::Error for ViewBoxError {
fn description(&self) -> &str {
"a viewBox parsing error"
}
}
/// Representation of the [`<viewBox>`] type.
///
/// [`<viewBox>`]: https://www.w3.org/TR/SVG2/coords.html#ViewBoxAttribute
#[allow(missing_docs)]
#[derive(Clone, Copy, PartialEq, Debug)]
pub struct ViewBox {
pub x: f64,
pub y: f64,
pub w: f64,
pub h: f64,
}
impl ViewBox {
/// Creates a new `ViewBox`.
pub fn new(x: f64, y: f64, w: f64, h: f64) -> Self {
ViewBox { x, y, w, h }
}
}
impl std::str::FromStr for ViewBox {
type Err = ViewBoxError;
fn from_str(text: &str) -> Result<Self, ViewBoxError> {
let mut s = Stream::from(text);
let x = s.parse_list_number().map_err(|_| ViewBoxError::InvalidNumber)?;
let y = s.parse_list_number().map_err(|_| ViewBoxError::InvalidNumber)?;
let w = s.parse_list_number().map_err(|_| ViewBoxError::InvalidNumber)?;
let h = s.parse_list_number().map_err(|_| ViewBoxError::InvalidNumber)?;
if w <= 0.0 || h <= 0.0 {
return Err(ViewBoxError::InvalidSize);
}
Ok(ViewBox::new(x, y, w, h))
}
}
#[cfg(test)]
mod tests {
use super::*;
use std::str::FromStr;
macro_rules! test {
($name:ident, $text:expr, $result:expr) => (
#[test]
fn $name() {
let v = ViewBox::from_str($text).unwrap();
assert_eq!(v, $result);
}
)
}
test!(parse_1, "-20 30 100 500", ViewBox::new(-20.0, 30.0, 100.0, 500.0));
macro_rules! test_err {
($name:ident, $text:expr, $result:expr) => (
#[test]
fn $name() {
assert_eq!(ViewBox::from_str($text).unwrap_err().to_string(), $result);
}
)
}
test_err!(parse_err_1, "qwe", "viewBox contains an invalid number");
test_err!(parse_err_2, "10 20 30 0", "viewBox has a negative or zero size");
test_err!(parse_err_3, "10 20 0 40", "viewBox has a negative or zero size");
test_err!(parse_err_4, "10 20 0 0", "viewBox has a negative or zero size");
test_err!(parse_err_5, "10 20 -30 0", "viewBox has a negative or zero size");
test_err!(parse_err_6, "10 20 30 -40", "viewBox has a negative or zero size");
test_err!(parse_err_7, "10 20 -30 -40", "viewBox has a negative or zero size");
}
| rust |
<filename>README.md
Play.js
====
Agnostic frame-skipping animation library
Performs an abstract transition for a fixed amount of time, regardless of the
frame rate of the page (frame skipping.) Calls an `onFrame` callback with a
0-to-1 float ratio (representing the progress of the transition) as often as
the browser can perform.
```js
// Run a transition for one second
Play.start({
time: 1,
onFrame: function(r) {
console.log('Animation is at ' + (r * 100).toFixed(2) + '%');
}
});
// A custom transition easing can be set using the "easing" option, otherwise
// it defaults to linear.
Play.start({
time: 0.1,
easing: function(r) {
// Similar to the default jQuery "swing" easing ($.easing.swing)
return 0.5 - Math.cos(r * Math.PI) / 2;
},
onFrame: function(r) {
// The first and last values will be closer, as the transition grows faster
// in middle
console.log(r);
}
});
// Starting an animation returns a reference to its instance, exposing a few
// API methods
var myAnimation = Play.start({time: 5});
// You can stop an animation at any time...
Play.stop(myAnimation);
// ...or end it. The difference being that this time the onFrame handler will
// also be called on last time, with maximum ratio (1), as if the entire time
// for that animation had passed
Play.end(myAnimation);
// Another thing you can do is start a transition from a specific point in its
// development. This animation will go from 0.5 to 1 ratio and will last 500ms
Play.start({time: 1, ratio: 0.5});
// The beauty of the onFrame handler lays in its simplicity. You can use the
// frame ratio in any way you'd like, from rendering a progress bar to all
// sorts af complex DOM transitions
Play.start({time: 5, function(r) {
$('.my-element').css({top: r / 2, left: r});
}});
// Play.js can also be installed as a npm package
var Play = require('play-js').Play;
```
| markdown |
<gh_stars>1-10
__all__ = ["config", "credo", "rf"] | python |
Relative of children injured in Uvalde, Texas, shooting questions 'why our babes? '
UVALDE, Texas – A Uvalde parent who knew several of the children who died and had two cousins injured in the shooting said he was sad and angry.
"Why? Why? I mean, why our babies? " Mark Madrigal told Fox News. "Those are our children. "
Salvador Ramos killed 19 children and two teachers at Robb Elementary School on Tuesday before he was fatally shot by a Border Patrol agent, according to authorities. Law enforcement has faced criticism after news reports indicated that onlookers shouted at police to rush the school during the shooting.
"As a community, we're together, and we watch over everybody's kids, no matter what," Madrigal told Fox News.
He said two cousins, ages 9 and 10, were injured during the Uvalde shooting.
"One of them is still in the hospital," Madrigal told Fox News. "One of them just got out of surgery last night. She's doing good. "
He listed children he knew who were killed. One was his brother-in-law's relative.
"My daughter's best friend, Tess, that was in her soccer team, passed away," Madrigal also said.
"An old childhood friend, Jose, lost his little boy, Jose Jr. ," Madrigal continued. "Our very good, good friend Stephen Garcia lost his daughter, Eli. "
He said his child's mother came to the school to check after she heard gunshots.
"When they got here it was pretty much more than they expected," he said. | english |
import React from "react"
const About = () => (
<div style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
height: '100vh',
width: '100%',
background: `rgb(0, 117, 193)`,
color: '#fff'
}}
id={'aboutUs'}
>
<h1> ABOUT US </h1>
<h3>JUST 4 MEDIA</h3>
<p style={{textAlign: 'center', width: '60%'}}>
Our company established in Dubai, UAE in 2010. With offices in Dubai, UAE we managed to grow into a multinational company with people in almost every continent.
</p>
</div>
)
export default About; | javascript |
<reponame>buuum/memory
var Memory;
Memory = (function() {
function Memory(cover, images, options) {
if (options == null) {
options = {};
}
this.options = {
game_class: '.game',
selected_class: '.active',
find_class: '.find',
onLoaded: function() {},
onStart: function() {},
onClick: function(clicks, min_clicks) {},
onEnd: function(time, clicks, min_clicks) {}
};
this.options = $.extend(this.options, options);
this.cover = cover;
this.cards = images;
this.clicks = 0;
this.start_time = false;
this.timeout = false;
this.elements_selected = this.options.game_class + " ul li" + this.options.selected_class;
this.elements_find = this.options.game_class + " ul li" + this.options.find_class;
this.initialize();
}
Memory.prototype.initialize = function() {
var preloadimgs;
preloadimgs = $('<div />').css('display', 'none');
$.each(this.cards, (function(_this) {
return function(i, el) {
var img;
img = $('<img >').attr('src', el);
return preloadimgs.append(img);
};
})(this));
return preloadimgs.imagesLoaded().always((function(_this) {
return function(instance) {
_this.generateMemory();
_this.addEvents();
return _this.options.onLoaded();
};
})(this));
};
Memory.prototype.addEvents = function() {
return $(this.options.game_class + " ul li").on('click', (function(_this) {
return function(e) {
var el, img;
e.preventDefault();
el = $(e.target);
if (el.hasClass(_this.name(_this.options.selected_class)) || el.hasClass(_this.name(_this.options.find_class))) {
return;
}
_this.onClick();
if ($(_this.elements_selected).length > 1) {
clearTimeout(_this.timeout);
_this.restartSelectedCards();
}
el.addClass(_this.name(_this.options.selected_class));
img = _this.cards[$(_this.options.game_class + " ul li").index(el)];
el.css('background-image', "url(" + img + ")");
if ($(_this.elements_selected).length > 1) {
return _this.checkPairs();
}
};
})(this));
};
Memory.prototype.onClick = function() {
if (!this.start_time) {
this.options.onStart();
}
if (!this.start_time) {
this.start_time = new Date().getTime();
}
this.clicks++;
return this.options.onClick(this.clicks, this.cards.length);
};
Memory.prototype.checkPairs = function() {
var img1, img2, time;
img1 = $(this.elements_selected).eq(0).css('background-image');
img2 = $(this.elements_selected).eq(1).css('background-image');
if (img1 === img2) {
$(this.elements_selected).addClass(this.name(this.options.find_class));
$(this.elements_selected).removeClass(this.name(this.options.selected_class));
if (this.cards.length === $(this.elements_find).length) {
time = new Date().getTime();
return this.options.onEnd((time - this.start_time) / 1000, this.clicks, this.cards.length);
}
} else {
return this.timeout = setTimeout((function(_this) {
return function() {
return _this.restartSelectedCards();
};
})(this), 1000);
}
};
Memory.prototype.restartSelectedCards = function() {
$(this.elements_selected).css('background-image', "url(" + this.cover + ")");
return $(this.elements_selected).removeClass(this.name(this.options.selected_class));
};
Memory.prototype.generateMemory = function() {
var game;
this.cards = this.shuffle(this.cards.concat(this.cards));
game = $('<ul />');
$.each(this.cards, (function(_this) {
return function(i, el) {
var li;
li = $('<li />');
li.css('background-image', "url(" + _this.cover + ")");
return game.append(li);
};
})(this));
return $("" + this.options.game_class).append(game);
};
Memory.prototype.shuffle = function(array) {
var currentIndex, randomIndex, temporaryValue;
currentIndex = array.length;
temporaryValue = void 0;
randomIndex = void 0;
while (0 !== currentIndex) {
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;
temporaryValue = array[currentIndex];
array[currentIndex] = array[randomIndex];
array[randomIndex] = temporaryValue;
}
return array;
};
Memory.prototype.name = function(name) {
return name.substr(1);
};
return Memory;
})();
| javascript |
<filename>app/Theme-BiPurple/config.json<gh_stars>1-10
{
"label":"Theme - BiPurple",
"icon":"icon.png",
"iconsel":"icon.png",
"launch":"launch.sh",
"description":"BiPurple - Lucario"
}
| json |
<filename>javafx-sdk-11.0.2/lib/src/javafx.web/com/sun/javafx/webkit/prism/WCImageDecoderImpl.java
/*
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.javafx.webkit.prism;
import com.sun.javafx.iio.ImageFrame;
import com.sun.javafx.iio.ImageLoadListener;
import com.sun.javafx.iio.ImageLoader;
import com.sun.javafx.iio.ImageMetadata;
import com.sun.javafx.iio.ImageStorage;
import com.sun.javafx.iio.ImageStorageException;
import com.sun.javafx.logging.PlatformLogger;
import com.sun.javafx.logging.PlatformLogger.Level;
import com.sun.webkit.graphics.WCGraphicsManager;
import com.sun.webkit.graphics.WCImage;
import com.sun.webkit.graphics.WCImageDecoder;
import com.sun.webkit.graphics.WCImageFrame;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import javafx.concurrent.Service;
import javafx.concurrent.Task;
final class WCImageDecoderImpl extends WCImageDecoder {
private final static PlatformLogger log;
private Service<ImageFrame[]> loader;
private int imageWidth = 0;
private int imageHeight = 0;
private ImageFrame[] frames;
private int frameCount = 0; // keeps frame count when decoded frames are temporarily destroyed
private boolean fullDataReceived = false;
private boolean framesDecoded = false; // guards frames from repeated decoding
private PrismImage[] images;
private volatile byte[] data;
private volatile int dataSize = 0;
private String fileNameExtension;
static {
log = PlatformLogger.getLogger(WCImageDecoderImpl.class.getName());
}
/*
* This method is supposed to be called from ImageSource::clear() method
* when either the decoded data or the image decoder itself are to be destroyed.
* It should free all complex object on the java layer and explicitely
* destroy objects which has native resources.
*/
@Override protected synchronized void destroy() {
if (log.isLoggable(Level.FINE)) {
log.fine(String.format("%X Destroy image decoder", hashCode()));
}
destroyLoader();
frames = null;
images = null;
framesDecoded = false;
}
@Override protected String getFilenameExtension() {
return "." + fileNameExtension;
}
private boolean imageSizeAvilable() {
return imageWidth > 0 && imageHeight > 0;
}
@Override protected void addImageData(byte[] dataPortion) {
if (dataPortion != null) {
fullDataReceived = false;
if (data == null) {
data = Arrays.copyOf(dataPortion, dataPortion.length * 2);
dataSize = dataPortion.length;
} else {
int newDataSize = dataSize + dataPortion.length;
if (newDataSize > data.length) {
resizeDataArray(Math.max(newDataSize, data.length * 2));
}
System.arraycopy(dataPortion, 0, data, dataSize, dataPortion.length);
dataSize = newDataSize;
}
// Try to decode the partial data until we get image size.
if (!imageSizeAvilable()) {
loadFrames();
}
} else if (data != null && !fullDataReceived) {
// null dataPortion means data completion
if (data.length > dataSize) {
resizeDataArray(dataSize);
}
fullDataReceived = true;
}
}
private void destroyLoader() {
if (loader != null) {
loader.cancel();
loader = null;
}
}
private void startLoader() {
if (this.loader == null) {
this.loader = new Service<ImageFrame[]>() {
protected Task<ImageFrame[]> createTask() {
return new Task<ImageFrame[]>() {
protected ImageFrame[] call() throws Exception {
return loadFrames();
}
};
}
};
this.loader.valueProperty().addListener((ov, old, frames) -> {
if ((frames != null) && (loader != null)) {
setFrames(frames);
}
});
}
if (!this.loader.isRunning()) {
this.loader.restart();
}
}
private void resizeDataArray(int newDataSize) {
byte[] newData = new byte[newDataSize];
System.arraycopy(data, 0, newData, 0, dataSize);
data = newData;
}
@Override protected void loadFromResource(String name) {
if (log.isLoggable(Level.FINE)) {
log.fine(String.format(
"%X Load image from resource '%s'", hashCode(), name));
}
String resourceName = WCGraphicsManager.getResourceName(name);
InputStream in = getClass().getResourceAsStream(resourceName);
if (in == null) {
if (log.isLoggable(Level.FINE)) {
log.fine(String.format(
"%X Unable to open resource '%s'", hashCode(), resourceName));
}
return;
}
setFrames(loadFrames(in));
}
private synchronized ImageFrame[] loadFrames(InputStream in) {
if (log.isLoggable(Level.FINE)) {
log.fine(String.format("%X Decoding frames", hashCode()));
}
try {
return ImageStorage.loadAll(in, readerListener, 0, 0, true, 1.0f, false);
} catch (ImageStorageException e) {
return null; // consider image missing
} finally {
try {
in.close();
} catch (IOException e) {
// ignore
}
}
}
private ImageFrame[] loadFrames() {
return loadFrames(new ByteArrayInputStream(this.data, 0, this.dataSize));
}
private final ImageLoadListener readerListener = new ImageLoadListener() {
@Override public void imageLoadProgress(ImageLoader l, float p) {
}
@Override public void imageLoadWarning(ImageLoader l, String warning) {
}
@Override public void imageLoadMetaData(ImageLoader l, ImageMetadata metadata) {
if (log.isLoggable(Level.FINE)) {
log.fine(String.format("%X Image size %dx%d",
hashCode(), metadata.imageWidth, metadata.imageHeight));
}
// The following lines is a workaround for RT-13475,
// because image decoder does not report valid image size
if (imageWidth < metadata.imageWidth) {
imageWidth = metadata.imageWidth;
}
if (imageHeight < metadata.imageHeight) {
imageHeight = metadata.imageHeight;
}
fileNameExtension = l.getFormatDescription().getExtensions().get(0);
}
};
@Override protected int[] getImageSize() {
final int[] size = THREAD_LOCAL_SIZE_ARRAY.get();
size[0] = imageWidth;
size[1] = imageHeight;
if (log.isLoggable(Level.FINE)) {
log.fine(String.format("%X image size = %dx%d", hashCode(), size[0], size[1]));
}
return size;
}
private static final class Frame extends WCImageFrame {
private WCImage image;
private Frame(WCImage image, String extension) {
this.image = image;
this.image.setFileExtension(extension);
}
@Override public WCImage getFrame() {
return image;
}
@Override public int[] getSize() {
final int[] size = THREAD_LOCAL_SIZE_ARRAY.get();
size[0] = image.getWidth();
size[1] = image.getHeight();
return size;
}
@Override protected void destroyDecodedData() {
image = null;
}
}
private synchronized void setFrames(ImageFrame[] frames) {
this.frames = frames;
this.images = null;
frameCount = frames == null ? 0 : frames.length;
}
@Override protected int getFrameCount() {
// Initiate full decode to get frame count.
// NOTE: This method will be called just before
// rendering the given image, so there will not
// be any performance degrade while initiating a
// full decode.
if (fullDataReceived) {
getImageFrame(0);
}
return frameCount;
}
// Avoid redundant decoding by async decoder threads, currently we don't
// support per frame decoding.
@Override protected synchronized WCImageFrame getFrame(int idx) {
ImageFrame frame = getImageFrame(idx);
if (frame != null) {
if (log.isLoggable(Level.FINE)) {
ImageStorage.ImageType type = frame.getImageType();
log.fine(String.format("%X getFrame(%d): image type = %s",
hashCode(), idx, type));
}
PrismImage img = getPrismImage(idx, frame);
return new Frame(img, fileNameExtension);
}
if (log.isLoggable(Level.FINE)) {
log.fine(String.format("%X FAILED getFrame(%d)", hashCode(), idx));
}
return null;
}
private synchronized ImageMetadata getFrameMetadata(int idx) {
return frames != null && frames.length > idx && frames[idx] != null ? frames[idx].getMetadata() : null;
}
@Override protected int getFrameDuration(int idx) {
final ImageMetadata meta = getFrameMetadata(idx);
int dur = (meta == null || meta.delayTime == null) ? 0 : meta.delayTime;
// Many annoying ads try to animate too fast.
// See RT-13535 or <http://webkit.org/b/36082>.
if (dur < 11) dur = 100;
return dur;
}
// Per thread array cache to avoid repeated creation of int[]
private static final ThreadLocal<int[]> THREAD_LOCAL_SIZE_ARRAY =
new ThreadLocal<int[]> () {
@Override protected int[] initialValue() {
return new int[2];
}
};
@Override protected int[] getFrameSize(int idx) {
final ImageMetadata meta = getFrameMetadata(idx);
if (meta == null) {
return null;
}
final int[] size = THREAD_LOCAL_SIZE_ARRAY.get();
size[0] = meta.imageWidth;
size[1] = meta.imageHeight;
return size;
}
@Override protected synchronized boolean getFrameCompleteStatus(int idx) {
// For GIF images there is no better way to find whether a given frame
// is completely decoded or not. As of now relying on framesDecoded
// which will wait for all the frames to decode.
return getFrameMetadata(idx) != null && framesDecoded;
}
private synchronized ImageFrame getImageFrame(int idx) {
if (!fullDataReceived) {
startLoader();
} else if (fullDataReceived && !framesDecoded) {
destroyLoader();
setFrames(loadFrames()); // re-decode frames if they have been destroyed
framesDecoded = true;
}
return (idx >= 0) && (this.frames != null) && (this.frames.length > idx)
? this.frames[idx]
: null;
}
private synchronized PrismImage getPrismImage(int idx, ImageFrame frame) {
if (this.images == null) {
this.images = new PrismImage[this.frames.length];
}
if (this.images[idx] == null) {
this.images[idx] = new WCImageImpl(frame);
}
return this.images[idx];
}
}
| java |
<div class="about">
<section class="hero is-fullheight">
<div class="hero-body">
<div class="container">
<br /> <br /> <br /> <br />
<div class="columns is-multiline is-mobile">
<div class="column is-half-desktop">
<app-pic file="'/assets/images/angular-morris-logo.svg'"></app-pic>
<div class="has-text-centered">
<h4 class="subtitle is-4">Angular & Morris</h4>
<p>
Easy creation of charts with libs that you already loves.
</p>
</div>
</div>
<div class="column is-half-desktop">
<app-pic file="'/assets/images/github-octocat.svg'"></app-pic>
<div class="has-text-centered">
<h4 class="subtitle is-4">Community</h4>
<p>
Tested and aproved by people around the world.
</p>
</div>
</div>
<div class="column cli">
<app-pic file="'/assets/images/install-cli.png'"></app-pic>
<div class="has-text-centered">
<h4 class="subtitle is-4">Easy installation</h4>
<p>
Use bower or npm to get angular-morris, then just reference the lib in your html template.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
</div> | html |
{
"_comment": "DO NOT EDIT MANUALLY - See ../../../README.md",
"name": "preparser",
"full_name": "gss/preparser",
"owner": "gss",
"private": false,
"html_url": "https://github.com/gss/preparser",
"description": "Extracts CCSS, CSS, VFL, and GTL parts from a GSS stylesheet and puts them in their own syntax groups",
"fork": false,
"url": "https://api.github.com/repos/gss/preparser",
"languages_url": "https://api.github.com/repos/gss/preparser/languages",
"pulls_url": "https://api.github.com/repos/gss/preparser/pulls{/number}",
"created_at": "2013-05-31T01:06:00Z",
"updated_at": "2015-10-07T11:35:37Z",
"pushed_at": "2014-11-25T20:28:56Z",
"homepage": null,
"size": 425,
"stargazers_count": 8,
"language": "CoffeeScript",
"mirror_url": null,
"archived": false,
"license": {
"key": "mit",
"name": "MIT License",
"spdx_id": "MIT",
"url": "https://api.github.com/licenses/mit",
"node_id": "MDc6TGljZW5zZTEz"
},
"default_branch": "master",
"organization": {
"login": "gss",
"id": 4575574,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjQ1NzU1NzQ=",
"avatar_url": "https://avatars3.githubusercontent.com/u/4575574?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gss",
"html_url": "https://github.com/gss",
"followers_url": "https://api.github.com/users/gss/followers",
"following_url": "https://api.github.com/users/gss/following{/other_user}",
"gists_url": "https://api.github.com/users/gss/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gss/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gss/subscriptions",
"organizations_url": "https://api.github.com/users/gss/orgs",
"repos_url": "https://api.github.com/users/gss/repos",
"events_url": "https://api.github.com/users/gss/events{/privacy}",
"received_events_url": "https://api.github.com/users/gss/received_events",
"type": "Organization",
"site_admin": false
},
"contributors": {
"paulyoung": 14,
"bergie": 17,
"d4tocchini": 41
},
"pulls_authors": [
"paulyoung"
],
"languages": {
"CoffeeScript": {
"bytes": 30808,
"color": "#244776"
},
"JavaScript": {
"bytes": 680,
"color": "#f1e05a"
}
},
"fetched_at": "2018-09-08T12:40:59.573Z"
}
| json |
Jeremy Miado knew that he had to make sacrifices if he wanted to further develop as a martial artist, and that included leaving his son in their home country.
The Filipino standout admitted that leaving the Philippines and training full-time in Thailand was one of the hardest decisions he’s ever made in his career, especially leaving a young son behind.
In an interview with ONE Championship, Miado said that the first few months were gut-wrenching for him. The only reprieve he found was thinking that his son Tobiko would eventually appreciate the sacrifice he’s made.
Miado said:
Miado’s sacrifice, though, eventually paid off, with ‘The Jaguar’ now the fastest-rising star in the strawweight division. The 30-year-old is riding a four-fight winning streak, with all four fights ending in a knockout finish.
He could stretch that run to five straight wins if he overcomes Russian star Mansur Malachiev in his next match at ONE Fight Night 11: Eersel vs. Menshikov on Prime Video.
A win for Miado could push him into the top five of the strawweight rankings or even a shot at ONE strawweight world champion Jarred Brooks.
ONE Fight Night 11 goes down on Friday in US primetime from the iconic Lumpinee Boxing Stadium. It will be broadcast live and free via Prime Video in North America.
| english |
Many have long considered the Monaco Grand Prix, with its narrow and winding streets, as one of the most challenging races on the Formula 1 calendar. Now, imagine a track potentially more difficult than Monaco. Surprisingly, it seems to come from NASCAR, a sport that is not typically associated with such demanding circuits. Before the Grant Park 220 race in Chicago, Illinois, former Formula 1 champion, Jenson Button, shared his thoughts on NASCAR’s inaugural street circuit.
In his interview, Button compared the new Chicago street course to the legendary Monaco Grand Prix. He emphasized that the Chicago race might pose even greater challenges than its Monte Carlo counterpart.
Why is it hard to race at Monaco and how is it comparable to Chicago’s street race?
The main problem with the iconic Monaco street circuit is the fact that modern-day Formula 1 cars have outgrown the circuit. Hence, wheel-to-wheel racing is often very hard to execute, unless they are on the main straight. The slightest of mistakes are not forgiven, since one would end up in the wall, ruining their race.
Looking back at the Chicago Street course there seems to be a similar issue with the narrow nature of the track. As per footage showcased in the iRacing series, it looks like the margin for error at the track is very thin. Another factor to consider is that these Cup Series cars were not exactly built for street courses, and it can prove to be a daunting task for the drivers to avoid the barriers. Of course, there would be enough safety measures in place. Regardless, a hard impact against the wall would potentially ruin the race for anyone unlucky enough.
| english |
1 Is nehuna he mibpirma iyan si Gubirnedur Nehemias he anak ni Hacalia, wey si Zedekia.
2-8 Is menge memumuhat he mibpirma iyan ensi Seraya, Azaria, Jeremias, Pashur, Amaria, Malkia, Hatush, Shebania, Maluc, Harim, Meremot, Obadias, Daniel, Gineton, Baruc, Meshulam, Abia, Miamin, Maazia, Bilga, wey si Shemaya.
9-13 Is menge Levihanen he mibpirma iyan ensi Jeshua he anak ni Azania, Binui he ebpuun diyà te pemilya ni Henadad, Kadmiel, Shebania, Hodia, Kelita, Pelaya, Hanan, Mica, Rehob, Hashabia, Zacur, Sherebia, Shebania, Hodia, Bani, wey Beninu.
14-27 Is menge pengulu he mibpirma iyan en si Parosh, Pahat Moab, Elam, Zatu, Bani, Buni, Azgad, Bebai, Adonia, Bigvai, Adin, Ater, Hezekia, Azur, Hodia, Hashum, Bezai, Harif, Anatot, Nebai, Magpiash, Meshulam, Hezir, Meshezabel, Zadok, Jadua, Palatia, Hanan, Anaya, Hoshea, Hanania, Hashub, Halohesh, Pilha, Shobek, Rehum, Hashabna, Maasea, Ahia, Hanan, Anan, Maluc, Harim, wey si Baanah.
28 Is duma he menge etew ziyà te Israel, ragkes is menge memumuhat, menge Levihanen, menge vantey te menge ǥemawan te valey te Nengazen, menge perekanta, menge suluǥuen diyà te valey te Nengazen, wey is langun he nekidsivayà te kenà menge Israilihanen he meǥinged diyà te Israel su edtuman mulà te Kesuǥuan te Megbevayà, ragkes is menge esawa zan wey is menge anak dan he zuen dan en hanew, 29 nesevaha key te kebpenangdù duma te menge pengulu zey he edtumanen dey is Kesuǥuan he imbeǥey te Megbevayà pinaaǥi te suluǥuen din he si Moises. Nenangdù key zaan he edewaten dey is rawak te Megbevayà emun kenè dey egketuman is insaad dey he ed-ikulen dey is langun he menge suǥù wey menge sulunuzen he imbeǥey te Nengazen he Megbevayè dey. 30 Midsaad key he kenè dey edtuǥutan is menge anak dey te kebpengesawa etawa kebpeesawa te kenà menge Israilihanen he ed-ubpà kayi te Israel. 31 Midsaad key zaan he emun ebelegyà heini is kenà menge Israilihanen te trigu etawa minsan hengkey he klasi te velegyà, dutun te Andew te Kedhimeley etawa zuma he segradu he andew, ne kenè dey ebpemesahan. Kada ikepitu he tuig, ne kenè dey ebpemulaan is tanè dey, wey kenè dey edsukuten is utang te zuma.
32 Midsaad key zaan he edtumanen dey is suǥù he ebeǥey key kada tuig te heepat he gramu he pelata he para te vuluhaten diyà te valey te Megbevayè dey. 33 Ne iyan egkepeveyaan kayi is para te supas he ibpemuhat diyà te etuvangan te Megbevayà, menge pemuhat he edtutungen wey menge pemuhat he para gasa he andew-andew is kebpemuhata zuen, menge pemuhat he para te menge Andew te Kedhimeley, para te Pista te Kebpuun te Hayag, wey zuma pa he menge pista, wey para te zuma pa he menge pemuhat he segradu iring te pemuhat he para idlumpiyu, he velukas te menge Israilihanen tenged te menge salè dan. Egemiten daan haazà he selapì para te zuma pa he menge kinehenglanen diyà te valey te Nengazen he Megbevayè dey.
34 Sikami is menge Israilihanen, ragkes is menge memumuhat dey wey is menge Levihanen, midripa key su para metueni zey ke hentei he menge pemilya is kinahanglan he ed-uwit te idtetavun he para idtavun te tinuig he menge pemuhat diyà te pemuhatà para te Nengazen he Megbevayè dey, sumalà te ingkesurat diyà te Kesuǥuan.
35 Midsaad key zaan he kada tuig ed-uwiten dey ziyà te valey te Nengazen is egkehuna he egkeraǥun dey ziyà te vevesukè dey wey is egkehuna he veǥas te menge pinemula zey. 36 Ne ed-uwiten dey zaan diyà te menge memumuhat he ebpenilbi ziyà te valey te Megbevayè dey is maama he kinekekayan he anak dey, ragkes is kinekekayan te menge vaka zey, menge kerehidu zey, wey menge kambing dey, sumalà te ingkesurat diyà te Kesuǥuan.
37 Midsaad key pa he idata zey ziyà te menge memumuhat, diyà te budiga ziyà te valey te Megbevayè dey, is kineupiyahan he klasi te herina wey zuma he menge halad he para gasa. Ed-uwiten dey zaan is kineupiyahan he menge prutas dey, wey is kineupiyahan he veǥu he vinu, wey lana he ulibu. Ed-uwiten dey zaan diyà te menge Levihanen is ikepulù te menge abut dey, su iyan sikandan ebpengulikta te ikepulù diyà te langun he menge inged he zuen duen menge vevesukà. Emun ebpengulikte en te ikepulù is menge Levihanen, 38 eduma kandan is memumuhat he kevuwazan ni Aaron. Ne is ikesepulù he vahin dutun te egkekulikta zan ed-uwiten dan diyà te budiga ziyà te valey te Megbevayè dey. 39 Is menge Israilihanen, ragkes en is menge Levihanen kinahanglan he ed-uwit te menge halad he trigu, beǥu he vinu wey lana diyà te budiga he zutun idtaǥù is menge gelemiten diyà te valey te Nengazen wey zutun ed-ubpàubpà is menge memumuhat he ebaal te vuluhaten, wey is menge vantey te menge ǥemawan te valey te Nengazen, wey is menge perekanta.
Umbe, midsaad key he kenè dey ebey-anan is baley te Megbevayè dey.
| english |
import { useEffect } from '@storybook/addons'
import { Meta, Story } from '@storybook/react'
import { useState } from 'react'
import { nanoid } from 'nanoid'
import { Select, SelectProps, SelectReturnType } from './Select'
const meta: Meta = {
title: `Data Input/Select`,
component: Select,
parameters: {
controls: { expanded: true },
},
argTypes: {
onChange: {
control: false,
},
},
}
export default meta
const Template: Story = ({ value, options, ...rest }) => {
const [stateVal, setStateVal] = useState(value)
useEffect(() => {
setStateVal(value)
}, [value])
const handleChange = (value: SelectReturnType) => {
setStateVal(value.value)
}
return <Select {...rest} options={options} onChange={handleChange} value={stateVal} />
}
export const Default = Template.bind({})
const simpsons = ['Homer', 'Marge', 'Bart', 'Lisa', 'Maggie']
Default.args = {
placeholder: 'Pick your favorite Simpson',
options: simpsons,
}
Default.argTypes = {
...Default.argTypes,
value: { options: [undefined, ...simpsons], control: { type: 'select' } },
}
export const WithBorder = Template.bind({})
const withBorderOptions = ['Han Solo', 'Greedo']
WithBorder.args = {
placeholder: 'Who shot first?',
options: withBorderOptions,
bordered: true,
}
WithBorder.argTypes = {
...WithBorder.argTypes,
value: { options: [undefined, ...withBorderOptions], control: { type: 'select' } },
}
export const Ghost = Template.bind({})
const ghostOptions = ['React', 'Svelte', 'Vue', 'Angular']
Ghost.args = {
placeholder: 'Pick the best JS Framework',
options: ghostOptions,
variant: 'ghost',
}
Ghost.argTypes = {
...Ghost.argTypes,
value: { options: [undefined, ...ghostOptions], control: { type: 'select' } },
}
export const Primary = Template.bind({})
const primaryOptions = ['Game of Thrones', 'Lost', 'Breaking Bad', 'Walking Dead']
Primary.args = {
placeholder: 'What is the best TV show?',
options: primaryOptions,
variant: 'primary',
}
Primary.argTypes = {
...Primary.argTypes,
value: { options: [undefined, ...primaryOptions], control: { type: 'select' } },
}
export const Secondary = Template.bind({})
const secondaryOptions = ['Java', 'Go', 'C', 'C#', 'C++', 'Rust', 'JavaScript', 'Python']
Secondary.args = {
placeholder: 'Pick your favorite language',
options: secondaryOptions,
variant: 'secondary',
}
Secondary.argTypes = {
...Secondary.argTypes,
value: { options: [undefined, ...secondaryOptions], control: { type: 'select' } },
}
export const Accent = Template.bind({})
const accentOptions = ['Auto', 'Dark', 'Light']
Accent.args = {
placeholder: 'Dark mode or light mode?',
options: accentOptions,
variant: 'accent',
}
Accent.argTypes = {
...Accent.argTypes,
value: { options: [undefined, ...accentOptions], control: { type: 'select' } },
}
export const Info = Template.bind({})
const infoOptions = ['English', 'Japanese', 'Italian']
Info.args = {
placeholder: 'Select language',
options: infoOptions,
variant: 'info',
}
Info.argTypes = {
...Info.argTypes,
value: { options: [undefined, ...infoOptions], control: { type: 'select' } },
}
export const Success = Template.bind({})
const successOptions = ['Lab', 'Shiba Inu', 'Golden Retriever', 'Airedale', 'Corgi', 'Yorkie']
Success.args = {
placeholder: 'Pick your favorite breed of dog?',
options: successOptions,
variant: 'success',
}
Success.argTypes = {
...Success.argTypes,
value: { options: [undefined, ...successOptions], control: { type: 'select' } },
}
export const Warning = Template.bind({})
const warningOptions = ['Cheese', 'Veggie', 'Pepperoni', 'Margherita', 'Hawaiian']
Warning.args = {
placeholder: 'Pick a pizza',
options: warningOptions,
variant: 'warning',
}
Warning.argTypes = {
...Warning.argTypes,
value: { options: [undefined, ...warningOptions], control: { type: 'select' } },
}
export const Error = Template.bind({})
const errorOptions = ['Strapi', 'Ghost', 'Netlify CMS', 'Sanity']
Error.args = {
placeholder: 'What is the best headless CMS?',
options: errorOptions,
variant: 'error',
}
Error.argTypes = {
...Error.argTypes,
value: { options: [undefined, ...errorOptions], control: { type: 'select' } },
}
const sizes = [
{ value: 'lg', label: 'Large' },
{ value: 'md', label: 'Normal' },
{ value: 'sm', label: 'Small' },
{ value: 'xs', label: 'Tiny' },
]
const sizesOptions = ['Apple', 'Orange', 'Tomato']
export const Sizes: Story = ({ value, bordered = true, ...rest }) => {
const [stateVal, setStateVal] = useState(value)
useEffect(() => {
setStateVal(value)
}, [value])
const handleChange = (value: SelectReturnType) => {
setStateVal(value.value)
}
return (
<div className="flex flex-col gap-4 w-2/3 lg:w-1/2">
{sizes.map((size) => (
<Select
{...rest}
key={nanoid()}
bordered={bordered}
options={sizesOptions.map((item) => `${size.label} ${item}`)}
value={value}
size={size.value as SelectProps['size']}
onChange={handleChange}
/>
))}
</div>
)
}
Sizes.argTypes = {
...Sizes.argTypes,
value: { options: [undefined, ...sizesOptions], control: { type: 'select' } },
}
export const Disabled = Template.bind({})
Disabled.args = {
placeholder: `You can't touch this`,
options: [],
disabled: true,
className: 'w-full max-w-xs',
}
Disabled.argTypes = {
...Disabled.argTypes,
value: { control: false },
}
| typescript |
<filename>common/changes/@itwin/imodel-react-hooks/3.0-irh_2022-03-02-19-32.json
{
"changes": [
{
"packageName": "@itwin/imodel-react-hooks",
"comment": "Update to iTwin.js 3.0",
"type": "patch"
}
],
"packageName": "@itwin/imodel-react-hooks"
} | json |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.