text
stringlengths 1
1.04M
| language
stringclasses 25
values |
|---|---|
<filename>SageFrame/Modules/AspxCommerce/AspxCouponManagement/js/CouponStatusManagement.js<gh_stars>10-100
var CouponStatusMgmt = "";
$(function() {
var aspxCommonObj = {
StoreID: AspxCommerce.utils.GetStoreID(),
PortalID: AspxCommerce.utils.GetPortalID(),
UserName: AspxCommerce.utils.GetUserName(),
CultureName: AspxCommerce.utils.GetCultureName()
};
var editFlag = 0;
var isUnique = false;
CouponStatusMgmt = {
config: {
isPostBack: false,
async: false,
cache: false,
type: 'POST',
contentType: "application/json; charset=utf-8",
data: '{}',
dataType: 'json',
baseURL: aspxservicePath + "AspxCoreHandler.ashx/",
method: "",
url: "",
ajaxCallMode: 0 },
ajaxCall: function(config) {
$.ajax({
type: CouponStatusMgmt.config.type, beforeSend: function (request) {
request.setRequestHeader('ASPX-TOKEN', _aspx_token);
request.setRequestHeader("UMID", umi);
request.setRequestHeader("UName", AspxCommerce.utils.GetUserName());
request.setRequestHeader("PID", AspxCommerce.utils.GetPortalID());
request.setRequestHeader("PType", "v");
request.setRequestHeader('Escape', '0');
},
contentType: CouponStatusMgmt.config.contentType,
cache: CouponStatusMgmt.config.cache,
async: CouponStatusMgmt.config.async,
url: CouponStatusMgmt.config.url,
data: CouponStatusMgmt.config.data,
dataType: CouponStatusMgmt.config.dataType,
success: CouponStatusMgmt.ajaxSuccess,
error: CouponStatusMgmt.ajaxFailure
});
},
HideAlldiv: function() {
$('#divCouponStatusDetail').hide();
$('#divEditCouponStatus').hide();
},
Reset: function() {
$('#txtCouponStatusName').val('');
},
ClearForm: function() {
$("#btnSaveCouponStatus").removeAttr("name");
$('#txtCouponStatusName').val('');
$('#txtCouponStatusName').removeClass('error');
$('#txtCouponStatusName').parents('td').find('label').remove();
$('#csErrorLabel').html('');
},
BindCouponsStatusInGrid: function(CouponStatusName, isAct) {
this.config.method = "GetAllCouponStatusList";
this.config.url = this.config.baseURL;
this.config.data = { aspxCommonObj: aspxCommonObj, couponStatusName: CouponStatusName, isActive: isAct };
var data = this.config.data;
var offset_ = 1;
var current_ = 1;
var perpage = ($("#tblCouponStatusDetails_pagesize").length > 0) ? $("#tblCouponStatusDetails_pagesize :selected").text() : 10;
$("#tblCouponStatusDetails").sagegrid({
url: this.config.baseURL ,
functionMethod: this.config.method,
colModel: [
{ display: getLocale(AspxCouponManagement, "Coupon Status ID"), name: 'CouponStatusID', cssclass: 'cssClassHeadCheckBox', coltype: 'checkbox', align: 'center', checkFor: '5', elemClass: 'attrChkbox', elemDefault: false, controlclass: 'attribHeaderChkbox', hide: true },
{ display: getLocale(AspxCouponManagement, "Coupon Status Name"), name: 'CouponStatus', cssclass: '', controlclass: '', coltype: 'label', align: 'left' },
{ display: getLocale(AspxCouponManagement, "Active"), name: 'IsActive', cssclass: 'cssClassHeadBoolean', controlclass: '', coltype: 'label', align: 'left', type: 'boolean', format: 'Yes/No', hide: true },
{ display: getLocale(AspxCouponManagement, "Actions"), name: 'action', cssclass: 'cssClassAction', coltype: 'label', align: 'center' }
],
buttons: [{ display: getLocale(AspxCouponManagement, "Edit"), name: 'edit', enable: true, _event: 'click', trigger: '1', callMethod: 'CouponStatusMgmt.EditCouponStatus', arguments: '1,2' }
],
rp: perpage,
nomsg: getLocale(AspxCouponManagement, "No Records Found!"),
param: data,
current: current_,
pnew: offset_,
sortcol: { 0: { sorter: false }, 3: { sorter: false } }
});
},
Boolean: function(str) {
switch (str.toLowerCase()) {
case "yes":
return true;
case "no":
return false;
default:
return false;
}
},
EditCouponStatus: function(tblID, argus) {
switch (tblID) {
case "tblCouponStatusDetails":
editFlag = argus[0];
CouponStatusMgmt.ClearForm();
$("#btnReset").hide();
$('#divCouponStatusDetail').hide();
$('#divEditCouponStatus').show();
$('#' + lblHeading).html(getLocale(AspxCouponManagement, "Edit Order Status:") + "'" + argus[3] + "'");
$('#txtCouponStatusName').val(argus[3]);
var isactive = argus[4];
$("#btnSaveCouponStatus").prop("name", argus[0]);
break;
default:
break;
}
},
SaveCouponStatus: function(CouponStatusID) {
editFlag = CouponStatusID;
var CouponStatusName = $('#txtCouponStatusName').val();
var SaveCouponStatusObj = {
CouponStatusID: CouponStatusID,
CouponStatus: CouponStatusName,
IsActive: true
};
this.config.method = "AddUpdateCouponStatus";
this.config.url = this.config.baseURL + this.config.method;
this.config.data = JSON2.stringify({
aspxCommonObj: aspxCommonObj,
SaveCouponStatusObj: SaveCouponStatusObj
});
this.config.ajaxCallMode = 1;
this.ajaxCall(this.config);
},
SearchCouponStatus: function() {
var CouponStatusAliasName = $.trim($("#txtCouponStateName").val());
if (CouponStatusAliasName.length < 1) {
CouponStatusAliasName = null;
}
var isAct = $.trim($("#ddlVisibitity").val()) == "" ? null : ($.trim($("#ddlVisibitity").val()) == "True" ? true : false);
CouponStatusMgmt.BindCouponsStatusInGrid(CouponStatusAliasName, isAct);
},
CheckCouponStatusUniquness: function(CouponStatusId) {
var CouponStatusName = $.trim($('#txtCouponStatusName').val());
this.config.method = "CheckCouponStatusUniqueness";
this.config.url = this.config.baseURL + this.config.method;
this.config.data = JSON2.stringify({ aspxCommonObj: aspxCommonObj, couponStatusId: CouponStatusId, couponStatusName: CouponStatusName });
this.config.ajaxCallMode = 2;
this.ajaxCall(this.config);
return isUnique;
},
ajaxSuccess: function(data) {
switch (CouponStatusMgmt.config.ajaxCallMode) {
case 0:
break;
case 1:
CouponStatusMgmt.BindCouponsStatusInGrid(null, null);
CouponStatusMgmt.ClearForm();
if (editFlag > 0) {
csscody.info('<h2>' + getLocale(AspxCouponManagement, "Information Message") + '</h2><p>' + getLocale(AspxCouponManagement, "Order status has been updated successfully.") + '</p>');
} else {
csscody.info('<h2>' + getLocale(AspxCouponManagement, "Information Message") + '</h2><p>' + getLocale(AspxCouponManagement, "Order status has been saved successfully.") + '</p>');
}
$('#divCouponStatusDetail').show();
$('#divEditCouponStatus').hide();
break;
case 2:
isUnique = data.d;
if (data.d == true) {
$('#txtCouponStatusName').removeClass('error');
$('#csErrorLabel').html('');
} else {
$('#txtCouponStatusName').addClass('error');
$('#csErrorLabel').html(getLocale(AspxCouponManagement, "This coupon status already exist!")).css("color", "red");
return false;
}
break;
}
},
ajaxFailure: function(data) {
switch (CouponStatusMgmt.config.ajaxCallMode) {
case 0:
break;
case 1:
csscody.error('<h2>' + getLocale(AspxCouponManagement, "Error Message") + '</h2><p>' + getLocale(AspxCouponManagement, "Failed to save coupon status") + '</p>');
break;
}
},
init: function() {
CouponStatusMgmt.HideAlldiv();
$('#divCouponStatusDetail').show();
CouponStatusMgmt.BindCouponsStatusInGrid(null, null);
$("#btnBack").bind('click', function() {
$("#divCouponStatusDetail").show();
$("#divEditCouponStatus").hide();
});
$("#btnReset").bind('click', function() {
CouponStatusMgmt.Reset();
CouponStatusMgmt.ClearForm();
});
$('#btnSaveCouponStatus').bind('click', function() {
AspxCommerce.CheckSessionActive(aspxCommonObj);
if (AspxCommerce.vars.IsAlive) {
var v = $("#form1").validate({
messages: {
StatusName: {
required: '*',
minlength: "* (at least 2 chars)"
}
}
});
if (v.form() && CouponStatusMgmt.CheckCouponStatusUniquness(editFlag)) {
var CouponStatus_id = $(this).prop("name");
if (CouponStatus_id != '') {
CouponStatusMgmt.SaveCouponStatus(CouponStatus_id);
} else {
CouponStatusMgmt.SaveCouponStatus(0);
}
}
} else {
window.location.href = AspxCommerce.utils.GetAspxRedirectPath() + LoginURL + pageExtension;
}
});
$("#txtCouponStatusName").bind('focusout', function() {
CouponStatusMgmt.CheckCouponStatusUniquness(editFlag);
});
$('#txtOrderStateName,#ddlVisibitity').keyup(function(event) {
if (event.keyCode == 13) {
CouponStatusMgmt.SearchCouponStatus();
}
});
}
};
CouponStatusMgmt.init();
});
|
javascript
|
{
"name": "ts-node-starter",
"version": "1.0.1",
"description": "Starter template for nodejs application using ts",
"main": "dist/index.js",
"homepage": "https://github.com/ViGi-P/ts-node-starter#README",
"repository": "github:ViGi-P/ts-node-starter",
"author": "<NAME> <<EMAIL>> (https://vigneshprasad.com/)",
"license": "MIT",
"scripts": {
"start": "NODE_ENV=development ./node_modules/.bin/fbw -t=src -r=\"npm run build\" -t=dist -r=\"node dist/index.js\"",
"build": "./node_modules/.bin/tsc",
"docs": "./node_modules/.bin/typedoc"
},
"devDependencies": {
"@types/node": "14.6.4",
"@vigi-p/fbw": "^2.1.6",
"typedoc": "0.19.1",
"typescript": "^4.0.0"
},
"dependencies": {}
}
|
json
|
<gh_stars>0
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import { fetchExportedSpecIfNeeded } from '../../../actions/ExportedVisualizationActions'
import styles from '../Visualizations.sass';
import VisualizationView from '../VisualizationView';
class ExportedVisualizationPage extends Component {
componentWillMount() {
if (this.props.params.projectId && !this.props.exportedSpec.spec.id) {
this.props.fetchExportedSpecIfNeeded(this.props.params.projectId, this.props.params.exportedSpecId);
}
}
componentWillReceiveProps(nextProps) {
if (this.props.params.projectId && !nextProps.exportedSpec.spec.id) {
this.props.fetchExportedSpecIfNeeded(this.props.params.projectId, nextProps.params.exportedSpecId);
}
}
render() {
return (
<div className={ `${styles.fillContainer} ${styles.exportedVisualizationContainer}` }>
{ this.props.exportedSpec.spec.id &&
<VisualizationView visualization={ this.props.exportedSpec }/>
}
</div>
);
}
}
ExportedVisualizationPage.propTypes = {
exportedSpec: PropTypes.object.isRequired
}
function mapStateToProps(state) {
const { exportedSpec } = state;
return { exportedSpec };
}
export default connect(mapStateToProps, { fetchExportedSpecIfNeeded })(ExportedVisualizationPage);
|
javascript
|
<filename>recipes/mining_minion/iron_minion_11.json
{
"name": "iron_minion_11",
"category": "mining",
"ingredients": [
{"name": "iron_minion", "tier": 10},
{"name": "enchanted_iron_block", "count": 8}
],
"result": {"name": "iron_minion", "tier": 11},
"collection_req": ["iron", 1]
}
|
json
|
<filename>client/registro.css
* {
margin: 0;
padding: 0;
outline: none;
}
body, html {
height: 100%;
width: 100%;
font-family: sans-serif;
color: rgb(85, 85, 85)
}
body {
background-color: rgb(240, 240, 240);
display: flex;
flex-direction: row;
justify-content: flex-end;
}
main {
width: 50%;
display: flex;
justify-content: center;
align-items: center;
}
#signupContainer {
width: 400px;
height: 280px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: white;
border-radius: 10px;
}
#username, #password {
height: 30px;
width: 80%;
margin-top: 15px;
border: none;
border-radius: 5px;
border: 2px solid rgb(231, 231, 231);
padding: 5px 10px;
box-sizing: border-box;
}
#signupLink {
text-decoration: none;
font-size: 14px;
align-self: flex-end;
margin-right: 10%;
margin-top: 5px;
color: gray;
}
#signupLink:visited {
color: gray;
text-decoration: none;
}
#signupLink span {
text-decoration: none;
color: rgb(30, 199, 199);
}
#signupButton {
width: 80%;
height: 30px;
margin-top: 20px;
border: none;
background-color: rgb(41, 156, 41);
color: white;
font-weight: bold;
}
#signupButton:hover {
cursor: pointer;
background-color: rgb(53, 170, 53);
}
#imageContainer {
width: 50%;
height: 100%;
background-image: url("image.jpg");
background-size: cover;
background-repeat: no-repeat;
background-position: right;
animation: .3s open;
}
@keyframes open {
from {
width: 0%;
}
to {
width: 50%;
}
}
|
css
|
{"type":"Feature","id":"node/4956854126","properties":{"addr:city":"Reigoldswil","addr:housenumber":"228","addr:postcode":"4418","addr:street":"Niestelen","email":"<EMAIL>","name":"<NAME>","opening_hours":"Mo-Fr 08:00-12:00,13:30-18:30; Sa 08:00-12:00","operator":"Wirz-Obstbau & Brennerei, <NAME>","organic":"no","phone":"+41 61 941 17 49","produce":"Schokolade mit Edelbrand, Kirsch, Eierkirsch, <NAME>, Mirabellen, Pflümli, Zwetschgenwasser, <NAME>, Mirabellen, Apfelschnaps, Burgermeisterli, <NAME>, Williams, <NAME>, <NAME>, Absinthe, Härdöpfeler, Röteli, Aprikosen.","shop":"farm","source":"https://www.baselland-shop.ch/user/191","website":"http://www.wirz-obstbau.ch/","id":"node/4956854126"},"geometry":{"type":"Point","coordinates":[7.6842548,47.4057452]}}
|
json
|
Wong to Disha Kasat, out Bowled!! Brilliant bowling from Wong! A searing yorker on middle and off, Disha Kasat swings hard at it but misses and the ball crashes into the stumps. Disha Kasat b Wong 2(5)
|
english
|
Photograph by Omer Nusrullah 123 (RF)
In our 10-part Wedding Special series, we now talk about the trousseau planner’s role in your wedding and tell you what you must discuss to ensure you are able to design the best looks for yourself for all your wedding functions, in a budget that fits you well.
Hiring a trousseau planner will save you the trouble of running from one designer to the other, trying to find all the outfits and accessories you will need for your pre-bridal, bridal and post-bridal needs. Some trousseau planners also help you choose gifts for your fiancé and his family, decor for your new home and clothes for your honeymoon, which you will realise is a really big boon in the hectic days running up to the wedding. Nitika Seth, trousseau planner and personal stylist of unveilweddings.com, says that a trousseau should be contacted at least two months before the wedding. “Getting things off the racks is not time consuming, but if you intend to get outfits tailored or made by a designer, you need at least one-and-a-half to two months in hand.” You will need to be in constant touch with your trousseau planner right up to the wedding, so be prepared for many meetings and consultations with her.
Discuss your budget with the trousseau planner, as all the shopping has to be done keeping your financial situation in mind.
The planner’s repertoire includes helping you pick up outfits for a range of events and functions. Domention whether you will require her services for all the events right up to the honeymoon or just the important ones.
Discuss your likes and dislikes in terms of colours, embroidery techniques, brands, designers, style (ethnic or contemporary), cuts, etc, so that there is no scope for misunderstanding or wastage of time. “I prefer to take my client shopping with me during one of the initial meetings so that I can gauge her style,” says Nitika.
Make sure you give her your sizes for both clothes and accessories. If you communicate clearly with your trousseau planner, you can put together the best wares even in a not-so-big budget. All you need to do is plan ahead and be open to ideas and suggestions.
|
english
|
package at.sms.business.sdk.http.impl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import at.sms.business.api.domain.sms.SmsSendResponse;
import at.sms.business.sdk.client.util.DeleteUnderscoreAtTheBeginning;
import at.sms.business.sdk.client.util.StatusCodes;
import at.sms.business.sdk.exception.ApiException;
import at.sms.business.sdk.http.ResponseHandler;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
/**
* Is responsible for parsing and evaluating the response when user sends an
* SmsSendRequest.
*
* @author <NAME>
*
*/
public class SendSmsResponseHandler implements ResponseHandler<SmsSendResponse> {
Logger logger = LoggerFactory.getLogger(this.getClass());
private ApiException responseException = null;
private SmsSendResponse reponseRessource = null;
/**
* Returns the response if it was set. If a exception was set, the
* exception will be thrown.
* @return SmsSendResponse The ressource if the server returned an success-status-code(2000,2001,2002).
* @throws ApiException Will be thrown if the server returned an status-code which indicates an error.
*/
@Override
public SmsSendResponse getResponse() throws ApiException {
if (responseException != null)
throw responseException;
else
return reponseRessource;
}
/**
* Parses and evaluates the response of the SendSmsRequest
*
* @param stringResponse
* The response of the request.
*/
@Override
public void process(String stringResponse) {
GsonBuilder builder = new GsonBuilder();
builder.setFieldNamingStrategy(new DeleteUnderscoreAtTheBeginning());
builder.setPrettyPrinting();
Gson gson = builder.create();
SmsSendResponse response = gson.fromJson(stringResponse,
SmsSendResponse.class);
switch (response.getStatusCode()) {
case StatusCodes.PARAMETER_MISSING:
responseException = new ApiException(response
.getStatusMessage(), response
.getStatusCode());
break;
case StatusCodes.OK:
case StatusCodes.OK_QUEUED:
case StatusCodes.OK_TEST:
this.reponseRessource = response;
break;
default:
responseException = new ApiException(response
.getStatusMessage(), response
.getStatusCode());
break;
}
}
}
|
java
|
<filename>locales/EmuTarkov-LocaleEs/db/locales/es/templates/5df916dfbb49d91fb446d6b9.json
{
"Name": "Guardamano URX-4 para AR-10 y compatibles",
"ShortName": "Guard. URX4 14,5\"",
"Description": "El guardamano URX-4 de 14,5 pulgadas de largo para fusiles AR-15, se caracteriza por su ligereza y la posibilidad de utilizar el sistema M-LOK"
}
|
json
|
Nifty futures on Singapore Exchange traded 51 points, or 0.32 per cent, lower at 15,813.50, signaling that Dalal Street was headed for a negative start on Monday.
- Tech View: Nifty50 on Friday formed a Doji candle on the daily chart, suggesting indecisiveness among traders.
- India VIX: The fear gauge jumped 6 per cent to 14.1 level on Friday over its close at 15 on Thursday.
Markets across China, Hong Kong and Australia remained closed today on the account of public holidays. Other Asian markets opened mixed, as investors await Federal Reserve's policy meeting later this week. MSCI's broadest index of Asia-Pacific shares outside Japan fell 0.13 per cent.
US stocks closed modestly higher at the end with few market-moving catalysts and persistent concerns over whether current inflation spikes could linger and cause the US Federal Reserve to tighten its dovish policy sooner than expected.
The US dollar held steady against major currencies on Monday, after posting its biggest weekly gain in more than a month, as traders closed short positions ahead of a Federal Reserve policy meeting this week.
Oil prices held near multi-year highs on Monday, underpinned by an improved outlook for demand as increased Covid-19 vaccinations help lift travel curbs. Brent crude was up 14 cents, or 0.2 per cent, at $72.83. It rose 1.1 per cent last week and hit the highest since May 2019 of $73.09 on Friday. US WTI was also up 14 cents, or 0.2 per cent, at $71.05 a barrel, after reaching the highest since October 2018 at $71.24 on Friday.
Coal India, Indian Overseas Bank, IDFC, Arti Industries, Kajaria Ceramics, JB Chemicals and Pharmaceuticals, IFB Industries, Hemisphere Properties India,, Responsive Industries, Greenply Industries, BF Utilities, Tips Industries and Globus Spirits that will announce their March quarter results today.
Net-net, foreign portfolio investors (FPIs) turned buyers of domestic stocks to the tune of Rs 18.64 crore, data available with NSE suggested. DIIs, turned sellers to the tune of Rs 666.36crore, data suggests. Foreign Portfolio Investors (FPI) have made a total net investment of Rs 15,520 crore in Indian equities so far in June.
Rupee: The Indian rupee on Friday settled marginally lower at 73.07 against the US dollar, marking its fourth loss in a row, even as some positive factors helped the domestic unit stay away from any deep loss.
10-year bonds: India 10-year bond yield declined 0.22 per cent to 6.01 after trading in 6.00 - 6.02 range.
Call rates: The overnight call money rate weighted average stood at 3.09 per cent, according to RBI data. It moved in a range of 1.90-3.40 per cent.
- India WPI Manufacturing YoY May (12:00 pm)
- Inda WPI Fuel YoY May (12:00 pm)
- India WPI Food YoY May (12:00 pm)
- India WPI Inflation YoY May (12:00 pm)
- India Inflation Rate YoY May (05:30 pm)
- Japan Industrial Production MoM Final April (10:00 am)
- Euro Area Industrial Production YoY April (02:30 pm)
- BoE Gov Bailey Speech (06.30 pm)
NSDL has frozen the accounts of three foreign funds — Albula Investment Fund, Cresta Fund and APMS Investment Fund — which together own over Rs 43,500 crore worth of shares in four Adani Group companies. These accounts were frozen on or before May 31, as per the depository’s website. The freeze on the three accounts could be because of insufficient disclosure of information regarding beneficial ownership as per the Prevention of Money Laundering Act, said top officials at custodian banks and law firms handling foreign investors.
Big companies with big purses in May drew large cash from overnight and liquid funds, where they park their short-term surplus cash. These funds saw a net outflow of Rs 57,020 crore in May, reflecting the urgency to hold immediate cash. Low yields also prompted the companies to retreat. Investors liquidated a net of Rs 45,447 crore from liquid funds and Rs 11,573 crore from overnight funds, Amfi data showed.
Holders of optionally convertible redeemable preference shares are in a quandary after the Supreme Court ruled recently that investors do not have a “sacrosanct” right to redeem such instruments. The top court also made clear that investors cannot redeem such shares before the National Company Law Tribunal has ruled either way — whether investors can convert such shares or not — under the Insolvency and Bankruptcy Code.
The second wave of Covid has pushed up claims for life insurance companies by 5-10 times for April 2021. This follows 1.9 lakh Covid-related deaths since April 1, 2021, which is 17% higher than lives lost to the pandemic in the entire FY21. “Life insurers, while making Covid reserves last year, assumed 50–100% higher Covid deaths for FY22. Our analysis shows that reserves made by them can cover1.5–2x the Covid-related deaths in FY21,” said a report by Macquarie. The 5-10 times increase in the number of death claims is based on enquiries with life insurance companies and industry bodies by Macquarie.
The pension regulator is in talks with the government for an overhaul of the National Pension System — including changes to the tax regime, allowing insurance agents to hawk the scheme and launching systematic withdrawal plans as well as annuities indexed to inflation to offer higher retur ns — PFRDA Chairman Supratim Bandyopadhyay told TOI in an interview. While implementation of some of the changes has already begun, others such as allowing investors to park their entire corpus into systematic withdrawal plans will require amendments to the law.
Download The Economic Times News App to get Daily Market Updates & Live Business News.
Subscribe to The Economic Times Prime and read the Economic Times ePaper Online.and Sensex Today.
|
english
|
<html><head><title>UVMC Converter Common Code - SV Producer</title><link rel="stylesheet" type="text/css" href="../../../styles/main.css"><script language=JavaScript src="../../../javascript/main.js"></script></head><body class="FramedContentPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
<!-- Generated by Natural Docs, version Development Release 01-12-2008 (1.35 base) -->
<!-- http://www.naturaldocs.org -->
<!-- saved from url=(0026)http://www.naturaldocs.org -->
<!--TOP - START OF CONTENT-->
<div id=Content>
<!--CONTENT index=0 -->
<div class="CSection"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="UVMC_Converter_Common_Code-SV_Producer" href="../../../uvmc/examples/converters/producer.sv">UVMC Converter Common Code - SV Producer</a></h1><div class=CBody>
<!--START_ND_SUMMARY index=0-->
<div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable>
<!-- index=0 -->
<tr class="SMain"><td colspan=2 class=SEntry><a href="#UVMC_Converter_Common_Code-SV_Producer" >UVMC Converter Common Code - SV Producer</a></td></tr>
<tr class=SMain><td colspan=2 class=SWideDescription></td></tr>
<!-- index=1 -->
<tr class="SGeneric SIndent1"><td class=SEntry><a href="#Description" >Description</a></td><td class=SDescription>A generic producer parameterized on transaction type. </td></tr></table></div></div><!--END_ND_SUMMARY-->
</div></div></div>
<!--CONTENT index=1 -->
<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Description" href="../../../uvmc/examples/converters/producer.sv">Description</a></h3><div class=CBody><p>A generic producer parameterized on transaction type. Used to illustrate different converter options using the same producer class.</p>
<p align=center><a name="Description" href="../../../uvmc/examples/converters/producer.sv">../../../uvmc/examples/converters/producer.sv</a></p></div>
<div class="SourceCode"><pre>
<b>//</b>
<b>//------------------------------------------------------------//</b>
<b>// Copyright 2009-2012 Mentor Graphics Corporation //</b>
<b>// All Rights Reserved Worldwid //</b>
<b>// //</b>
<b>// Licensed under the Apache License, Version 2.0 (the //</b>
<b>// "License"); you may not use this file except in //</b>
<b>// compliance with the License. You may obtain a copy of //</b>
<b>// the License at //</b>
<b>// //</b>
<b>// http://www.apache.org/licenses/LICENSE-2.0 //</b>
<b>// //</b>
<b>// Unless required by applicable law or agreed to in //</b>
<b>// writing, software distributed under the License is //</b>
<b>// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR //</b>
<b>// CONDITIONS OF ANY KIND, either express or implied. See //</b>
<b>// the License for the specific language governing //</b>
<b>// permissions and limitations under the License. //</b>
<b>//------------------------------------------------------------//</b>
class producer #(type T=int) extends uvm_component;
uvm_tlm_b_transport_port #(T) out;
int num_pkts;
`uvm_component_param_utils(producer #(T))
function new(string name, uvm_component parent=null);
super.new(name,parent);
out = new("out", this);
num_pkts = 10;
endfunction : new
task run_phase (uvm_phase phase);
uvm_tlm_time delay = new("delay",1.0e-12);
phase.raise_objection(this);
for (int i = 1; i <= num_pkts; i++) begin
int unsigned exp_addr;
byte exp_data[$];
T pkt = new(); <b>//$sformatf("packet%0d",i));</b>
assert(pkt.randomize());
delay.set_abstime(1,1e-9);
exp_addr = ~pkt.addr;
foreach (pkt.data[i])
exp_data[i] = ~pkt.data[i];
`uvm_info("PRODUCER/PKT/SEND_REQ",
$sformatf("SV producer request:\n %s", pkt.convert2string()), UVM_MEDIUM)
out.b_transport(pkt,delay);
`uvm_info("PRODUCER/PKT/RECV_RSP",
$sformatf("SV producer response:\n %s\n", pkt.convert2string()), UVM_MEDIUM)
if (exp_addr != pkt.addr)
`uvm_error("PRODUCER/PKT/RSP_MISCOMPARE",
$sformatf("SV producer expected returned address to be %h, got back %h",
exp_addr,pkt.addr))
if (exp_data != pkt.data)
`uvm_error("PRODUCER/PKT/RSP_MISCOMPARE",
$sformatf("SV producer expected returned data to be %p, got back %p",
exp_data,pkt.data))
end
`uvm_info("PRODUCER/END_TEST","Dropping objection to ending the test",UVM_LOW)
phase.drop_objection(this);
endtask
endclass
</pre></div>
</div></div>
</div><!--Content-->
<!--START_ND_TOOLTIPS-->
<!--END_ND_TOOLTIPS-->
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
|
html
|
{"derivation": "from H2421 (\u05d7\u05b8\u05d9\u05b8\u05d4);", "pron": "mikh-yaw'", "outline": "<ol><li> preservation of life, sustenance<ol><li> preservation of life</li><li> sustenance</li><li> reviving</li><li> the quick of the flesh, live flesh, tender or raw flesh</li></ol></li></ol>", "kjv_def": "preserve life, quick, recover selves, reviving, sustenance, victuals.", "lemma": "\u05de\u05b4\u05d7\u05b0\u05d9\u05b8\u05d4", "frequency": 8, "strongs_def": "preservation of life; hence, sustenance; also the live flesh, i.e. the quick", "xlit": "michy\u00e2h"}
|
json
|
<filename>package.json
{
"name": "express_mvc",
"version": "1.0.0",
"description": "Express basic project that will help explain the MVC model",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "nodemon index.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/CAMIRO/Express_MVC.git"
},
"author": "CAMIRO",
"license": "MIT",
"bugs": {
"url": "https://github.com/CAMIRO/Express_MVC/issues"
},
"homepage": "https://github.com/CAMIRO/Express_MVC#readme",
"dependencies": {
"ejs": "^3.1.6",
"express": "^4.17.3"
}
}
|
json
|
{"name":"<NAME> \"Am Kaitzbach \"","id":"SN-4310223-0","address":" Franzweg 4 01217 Dresden OT Plauen ","school_type":"Grundschule","legal_status":1,"fax":"0351/4027351 ","phone":"0351/4015481 ","website":"http://www.71gs.de","email":"<EMAIL>","provider":"Stadt Dresden","director":"<NAME>","full_time_school":false,"profile":{"students":{"2013":[{"class_level":1,"male":13,"female":15},{"class_level":2,"male":25,"female":23},{"class_level":3,"male":30,"female":17},{"class_level":4,"male":23,"female":19}],"2014":[{"class_level":1,"male":21,"female":18},{"class_level":2,"male":12,"female":14},{"class_level":3,"male":26,"female":23},{"class_level":4,"male":30,"female":17}],"2015":[{"class_level":1,"male":24,"female":17},{"class_level":2,"male":19,"female":16},{"class_level":3,"male":10,"female":14},{"class_level":4,"male":26,"female":22}]},"teacher":[{"year":"2016/2017","male":1,"female":7},{"year":"2015/2016","male":1,"female":8},{"year":"2014/2015","male":1,"female":8},{"year":"2013/2014","male":1,"female":8},{"year":"2012/2013","male":0,"female":8}]},"programs":{"programs":[],"working_groups":[{"name":"Schülerbibliothek","category":"Literatur / Medien","entity":"Schülerbibliothek"},{"name":"Allgemeiner Freizeitsport","category":"Sport","entity":"Allgemeiner Freizeitsport"},{"name":"Fußball","category":"Sport","entity":"Fußball"},{"name":"Tischtennis","category":"Sport","entity":"Tischtennis"},{"name":"Tanz","category":"Musik / Tanz","entity":"Tanz"},{"name":"künstlerisches Gestalten","category":"Kultur / Kunst","entity":"künstlerisches Gestalten"},{"name":"Schulgarten","category":"Umwelt","entity":"Schulgarten"},{"name":"Schülerzeitung","category":"Literatur / Medien","entity":"Schülerzeitung"},{"name":"Konzentrationstraining","category":"Sport","entity":"Konzentrationstraining"}]},"partner":[],"concept":"Der Mensch muss sich in der Welt forthelfen.\r\nDies ihn zu lehren, ist unsere Aufgabe.\r\n\r\nPestalozzi ","state":"SN","lon":13.729148,"lat":51.014892}
|
json
|
Our world pushes a seductive lie: you can achieve any goal through positive thinking, organization, and determination. But anyone who's tried to white-knuckle their way to self-fulfillment is only left with frustration, disappointment, and exhaustion. Inspired by Tara Sun's book, this plan shows that there’s a better way: surrender to the God who cares for us and has an infinitely better blueprint for a life filled with joy, peace, and meaning.
Don’t I Need to Be Fixed Up?
|
english
|
Palak Tiwari says people who call her too plain will never be satisfied: 'Why is it bad that sometimes we look like you'
Palak Tiwari has decided not to pay heed to those who criticise her for her looks. She says people are never satisfied.
Up and coming actor Palak Tiwari has spoken about all the negative comments she receives about her looks. Palak, who has featured in a few music videos so far, is often spotted by the paparazzi on lunch or dinner outings with her friends or at shoots. Often, people leave mean comments on videos and pictures of her, calling her too ‘made-up’ or too ‘simple’ to be a Bollywood ‘heroine’. (Also read: Palak Tiwari breaks silence on being papped with Ibrahim Ali Khan: 'I was hiding from Shweta Tiwari')
Palak, who is the daughter of actor Shweta Tiwari, has said that she doesn't bother about what people say anymore as there is no end to their complaints about her looks. She said that people should realise that an actor is supposed to represent the common people and therefore, does not need to be ‘perfect’ and flawless.
Palak also mentioned the double standards of people when an actor goes for beauty enhancement surgeries and is criticised for that as well. She said that such people should ‘just shut up’. Therefore, their opinions do not matter to her because ‘they are not happy with themselves’.
Palak has so far been seen in the song Bijlee Bijlee with singer Harrdy Sandhu and her latest music video is Mangta Hai Kya with Aditya Seal. She will make her acting debut with Rosie: The Saffron Chapter.
|
english
|
<filename>chrome/android/javatests/src/org/chromium/chrome/browser/signin/SigninHelperTest.java
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.signin;
import androidx.test.filters.SmallTest;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
import org.chromium.chrome.test.util.browser.signin.AccountManagerTestRule;
import org.chromium.chrome.test.util.browser.signin.MockChangeEventChecker;
/**
* Instrumentation tests for {@link SigninHelper}.
*/
@RunWith(ChromeJUnit4ClassRunner.class)
public class SigninHelperTest {
@Rule
public final AccountManagerTestRule mAccountManagerTestRule = new AccountManagerTestRule();
private MockChangeEventChecker mEventChecker;
@Before
public void setUp() {
mEventChecker = new MockChangeEventChecker();
}
@Test
@SmallTest
public void testSimpleAccountRename() {
mEventChecker.insertRenameEvent("A", "B");
SigninHelper.updateAccountRenameData(mEventChecker, "A");
Assert.assertEquals("B", getNewSignedInAccountName());
}
@Test
@SmallTest
public void testNotSignedInAccountRename() {
mEventChecker.insertRenameEvent("B", "C");
SigninHelper.updateAccountRenameData(mEventChecker, "A");
Assert.assertNull(getNewSignedInAccountName());
}
@Test
@SmallTest
public void testSimpleAccountRenameTwice() {
mEventChecker.insertRenameEvent("A", "B");
SigninHelper.updateAccountRenameData(mEventChecker, "A");
Assert.assertEquals("B", getNewSignedInAccountName());
mEventChecker.insertRenameEvent("B", "C");
SigninHelper.updateAccountRenameData(mEventChecker, "B");
Assert.assertEquals("C", getNewSignedInAccountName());
}
@Test
@SmallTest
public void testNotSignedInAccountRename2() {
mEventChecker.insertRenameEvent("B", "C");
mEventChecker.insertRenameEvent("C", "D");
SigninHelper.updateAccountRenameData(mEventChecker, "A");
Assert.assertNull(getNewSignedInAccountName());
}
@Test
@SmallTest
public void testChainedAccountRename2() {
mEventChecker.insertRenameEvent("Z", "Y"); // Unrelated.
mEventChecker.insertRenameEvent("A", "B");
mEventChecker.insertRenameEvent("Y", "X"); // Unrelated.
mEventChecker.insertRenameEvent("B", "C");
mEventChecker.insertRenameEvent("C", "D");
SigninHelper.updateAccountRenameData(mEventChecker, "A");
Assert.assertEquals("D", getNewSignedInAccountName());
}
@Test
@SmallTest
public void testLoopedAccountRename() {
mEventChecker.insertRenameEvent("Z", "Y"); // Unrelated.
mEventChecker.insertRenameEvent("A", "B");
mEventChecker.insertRenameEvent("Y", "X"); // Unrelated.
mEventChecker.insertRenameEvent("B", "C");
mEventChecker.insertRenameEvent("C", "D");
mEventChecker.insertRenameEvent("D", "A"); // Looped.
mAccountManagerTestRule.addAccount("D");
SigninHelper.updateAccountRenameData(mEventChecker, "A");
Assert.assertEquals("D", getNewSignedInAccountName());
}
private String getNewSignedInAccountName() {
return SigninPreferencesManager.getInstance().getNewSignedInAccountName();
}
}
|
java
|
["alexa-home-server","ap3","appup","atlassian-connect-express-bitbucket","atlassian-connect-express-sync","bootbot-cli","botkit","browser-sync","browser-sync-x","captureme","component-test","component-test2","connect-aemmobile","connect-phonegap","copycast","cordova-paramedic","cortex-test","duo-test","durable-tunnel","easy-sauce","elastic-transfer","expose-fs","expose-s3","express-phonegap","feebs","gbouquet-browser-sync","gravy","grunt-localtunnel","grunt-localtunnel-me","hangout","iis-express-tunnel","kepler-api","localtunnel-runner","miner","mott","node-weixin-express","pagespeed-cli","perfschool","powtunnel","prome-sync","protoment","publishify","remote-share-cli","silk-gui","slack-emojifier","smokestack","typeform-builder","wcag","wcag-cli","web-tracer","zuul-localtunnel"]
|
json
|
The Seven Deadly Sins: Four Knights of the Apocalypse has shaken the world of anime with its two teasers for the upcoming season 6, which were dropped on January 24 and March 26, respectively. Fans are over the moon after learning that their favorite anime will be adapting another arc in October 2023.
Fans have been eagerly awaiting another installment of The Seven Deadly Sins: Four Knights of the Apocalypse, ever since the end of the fifth season. The latest season featured Meliodas’ journey, which ended as the Demon King died.
The Seven Deadly Sins has 346 chapters, comprising 41 volumes in total. Fans saw all the chapters from the manga being covered by the end of season 5, which ended in 2021.
Hence, there is no source material for The Seven Deadly Sins: Four Knights of the Apocalypse except for the manga sequel written and illustrated by Nakaba Suzuki. The sequel series began serialization in January 2021 and October 2023 seems to be the perfect time to launch the anime adaptation of the same.
The Seven Deadly Sins: Four Knights of the Apocalypse is likely to be available on Netflix. However, there is no official announcement by Telecom Animation Films yet about the streaming platforms that are going to feature the series. Fans will have to wait a little longer for the news to be announced to see where they can watch the brand-new season.
The forthcoming sequel to The Seven Deadly Sins is not exactly a continuation of the original series, as The Seven Deadly Sins: Four Knights of the Apocalypse has got a completely new set of characters and protagonists and an entirely different story.
Percival has always lived a simple life with his grandfather in a remote location called God's Finger, which is situated high above the clouds. Although he loves his life there, he secretly wishes to experience adventure. One day, an intruder arrives and destroys everything Percival has ever known. He then discovers that the intruder has a shocking connection to him.
With nothing left to lose, Percival embarks on a journey to track down the person who took everything away from him. Along the way, he learns about the realities of life that he was previously sheltered from. He meets friends who offer to help him, but he is unsure how they will react when they discover Percival's destiny.
Suzuki, the creator of the manga series, had initially planned for Tristan to be the protagonist of The Seven Deadly Sins: Four Knights of the Apocalypse. However, he later changed his mind as he did not want the main character to have a strong connection with the previous series' cast.
Instead, he created a new character named Percival as the protagonist. During an interview with French Magazine in April 2021, Suzuki revealed that he focused on highlighting the character's cuteness when drawing Percival. He added design elements, such as the character's helmet and cloak, to emphasize this trait.
Sportskeeda Anime is now on Twitter! Follow us here for latest news & updates.
|
english
|
The deadly drug has been found in vape pens on high school campuses in recent months.
Columbia, S. C. – Health officials say fentanyl isn’t just killing people in the substance abuse community, it’s also killing children who aren’t even aware they're taking it.
The deadly drug has been found in vape pens on high school campuses in recent months. And officials have a growing concern that middle school, high school, and college-aged kids are being targeted as criminals make fentanyl pills disguised as oxycodone, Adderall, and Xanax.
Jamie Puerta's only child, Daniel, was 16 when he died after taking a pill containing a lethal dose of fentanyl.
"I walked into my son’s room at 8 o clock in the morning and found him dead," Puerta said.
The Santa Clarita, California, resident is now dedicated to keeping the drug out of the hands of young people.
"I’ll never see him get married or have a family of his own. I will never be a grandfather," Puerta said.
Last month, police confiscated vape pens laced with fentanyl from students at least two American high schools. One in Madisonville, Tennessee, and another in Norwalk, Connecticut.
19-year-old Johan Pleitez of El Monte, California says the problem is common. He’s in rehab after overdosing on fentanyl.
"I’m a youngster myself, so I know a lot of people that do that at school, you know, it’s bad. They don’t know what they’re smoking anymore," Pleitez said.
When asked how most students get their hands on illicit drugs like Fentanyl, Pleitez said "Snapchat, Instagram, people from their school, it’s everywhere. "
"Too many children are dying, and there should be no reason for this," Puerta said.
Puerta says his son Daniel bought the fatal pill through a dealer on Snapchat thinking it was oxycodone.
"I’m seeing kids, 16-year-old kids, that are buying drugs on the internet. These drugs are being dropped off to their homes," said Cary Quashen, owner of Action Drug Rehab in Santa Clarita, CA.
Puerta says his son consumed half a pill and it took his life.
"Do I condone his decision of wanting to self-medicate during the pandemic or wanting to take a pill? Absolutely not. I do not condone it. But he certainly did not deserve to die for making that decision," Puerta said.
Sarah Goldsby, with the South Carolina Department of Alcohol and Other Drug Abuse Services (DAODAS), says there’s growing concern about fentanyl use in middle, high school, and college students.
"These drugs look like Adderall which is a very commonly misused prescription drug by our college students. "
Although Goldsby says the U. S. has never seen a drug this threatening before, she says it’s important to remember that there is always hope.
"There’s no shame in asking for help, help is available and lots of people are recovering from opioid use disorder," she said.
It’s not only young people. Fentanyl kills more adults age 18-45 than anything else in the U. S. , according to CDC data, and anxieties from the pandemic have likely been making the problem worse.
"These drugs are not regulated at all. They’re manufactured in the back of someone’s truck, apartment, bathroom," Goldsby said.
Those who are looking for treatment options can call the national Substance Abuse and Mental Health Services Administration (SAMHSA) hotline at 1-800-662-help.
|
english
|
{
"Logging": {
"IncludeScopes": true,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information",
"Management": "Trace",
"Steeltoe": "Trace"
}
},
"management": {
"endpoints": {
"path": "/cloudfoundryapplication",
"cloudfoundry": {
"validateCertificates": false
}
}
}
}
|
json
|
[
"ace",
"adorable",
"amazing",
"astonishing",
"astounding",
"awe-inspiring",
"awesome",
"baboosh",
"badass",
"beautiful",
"bedazzling",
"best",
"bravissimo",
"breathtaking",
"brightest",
"brilliant",
"charming",
"clever",
"chic",
"classy",
"clever",
"colossal",
"cool",
"crackin'",
"cute",
"dandy",
"dazzling",
"delicate",
"delicious",
"delightful",
"distinctive",
"divine",
"dope",
"elegant",
"epic",
"excellent",
"exclusive",
"exceptional",
"exciting",
"exquisite",
"extraordinary",
"fabulous",
"fancy",
"fantastic",
"fantabulosus",
"fantabulous",
"fascinating",
"fine",
"finest",
"first-class",
"first-rate",
"flawless",
"formidable",
"funkadelic",
"geometric",
"glorious",
"gnarly",
"good",
"good-looking",
"gorgeous",
"grand",
"great",
"groovy",
"groundbreaking",
"hip",
"hot",
"hunky-dory",
"impeccable",
"impressive",
"incredible",
"irresistible",
"just wow",
"kickass",
"kryptonian",
"laudable",
"legendary",
"lovely",
"luminous",
"magnificent",
"magnifique",
"majestic",
"marvelous",
"mathematical",
"metal",
"mind-blowing",
"miraculous",
"nice",
"neat",
"nice",
"outstanding",
"particular",
"peachy",
"peculiar",
"perfect",
"phenomenal",
"pioneering",
"polished",
"posh",
"praiseworthy",
"premium",
"priceless",
"prime",
"primo",
"proper",
"rad",
"radical",
"remarkable",
"riveting",
"rockandroll",
"rockin",
"sensational",
"sharp",
"shining",
"slick",
"smart",
"smashing",
"solid",
"special",
"spectacular",
"spiffing",
"splendery-doodley",
"splendid",
"splendiferous",
"stellar",
"striking",
"stonking",
"stunning",
"stupefying",
"stupendous",
"stylish",
"sublime",
"supah",
"super",
"super-duper",
"super-excellent",
"super-good",
"superb",
"superior",
"supreme",
"sweet",
"sweetest",
"swell",
"terrific",
"tiptop",
"top-notch",
"transcendent",
"tremendous",
"tubular",
"ultimate",
"unique",
"unbelievable",
"unreal",
"well-made",
"wicked",
"wise",
"wonderful",
"wondrous",
"world-class"
]
|
json
|
While giving the 2012 MCC Spirit of Cricket Cowdrey Lecture, former England captain Tony Greig proposed the idea of an Asian League instead of an Indian Premier League.
New Delhi: Former England captain and one of the most popular commentators of his time, Tony Greig in his MCC Spirit of Cricket Cowdrey Lecture in 2012 wanted the Board of Control for Cricket in India (BCCI) to expand the cash-rich Indian Premier League (IPL) into an Asian League with teams from Pakistan, Sri Lanka and Bangladesh also part of the league. Greig also wanted the cricket boards of these countries to be given a financial interest in the competition upon their inclusion.
Greig, who died at the age of 66 in 2012 due to a heart attack after battling lung cancer for close to six months, was always upfront in his views about the game and in his Cricket Cowdrey Lecture in 2012, he was particularly critical of the BCCI for the manner in which it was running the game at the time.
“…India should agree to expand the IPL to say an Asian League and include extra teams from Sri Lanka, Bangladesh and Pakistan. The cricket boards of these countries should be given a financial interest in the competition, which would enable them to under-write most of their cricket. Those funds would compensate the boards for not running domestic Twenty/20 competitions of their own as they are planning to do now. This expanded league would enable players from the have-not countries to earn good money and still be available for Internationals,” the former England captain had said.
“…England should set up its equivalent of the IPL and include teams from the West Indies and one team from Ireland, which would have a financial interest in the competition. Similar arrangements should be made by South Africa for Zimbabwe and Kenya. And Australia’s Big Bash should include New Zealand teams,” he further added.
“World cricket should do everything possible to not only help the West Indies become a dominant Test force again but to ensure Pakistan cricket survives the extraordinary situation it finds itself,” Greig stressed.
|
english
|
# -*- coding: utf-8 -*-
from .temperature_reduction_when_heating_is_off_table_9b import temperature_reduction_when_heating_is_off_table_9b
from .utilisation_factor_for_heating_table_9a import utilisation_factor_for_heating_table_9a
from .heating_requirement_table_9c import heating_requirement_table_9c
from .utilisation_factor_for_heating_whole_house_table_9a import utilisation_factor_for_heating_whole_house_table_9a
|
python
|
The Sydney Thunder began defending their total brilliantly as Pat Cummins, Fawad Ahmed, and Chris Smith took wickets at regular intervals to leave Brisbane Heat tottering at 63/6. However, Chris Lynn’s monumental 85 along with some assistance from Jack Wildermuth won the match for the Heat.
However, there were a total of three instances when Sydney Thunder threw away the match through some sloppy fielding. The first of these came during the sixteenth over when Wildermuth hit a Chris Green delivery flat down the ground and Andre Russell seemed in a good position to catch it. The ball went through Russell’s hands though and over the rope for a six. Things went from bad to worse as Wildermuth hit another six off the very next delivery.
The second major error came during the crucial penultimate over when Chris Lynn mistimed a pull shot off a Pat Cummins bouncer. Wicket-keeper Jake Doran, however, wasn’t able to hold on to the catch as he fell backwards in the process.
The last of these errors came in the final over when Lynn was once again dropped, this time by Sydney Thunder captain Shane Watson at cover. These mistakes cost the Thunder the match as they could have saved a good 15-20 runs had the catches been taken.
|
english
|
{"word":"falseness","definition":"The state of being false; contrariety to the fact; inaccuracy; want of integrity or uprightness; double dealing; unfaithfulness; treachery; perfidy; as, the falseness of a report, a drawing, or a singer's notes; the falseness of a man, or of his word."}
|
json
|
When John Zimmer and Logan Green launched a new ride-sharing service called Lyft in the spring of 2012, they instantly knew they had a hit on their hands. But that wasn't always the case.
Micah Toll’s Barak Electric Bike Conversion Kit turns ordinary bikes into electric ones.
Google is launching a new feature in the Chrome beta channel for Windows, Mac and Linux today that will make it easier -- and safer -- to let others use your computer.
Just about every Mac you'd see in operation nowadays has a 64-bit CPU tucked inside. Apple started making the switch from 32-bit to 64-bit nearly a decade ago, after all.
Where is your data, and how quickly can you safely reach it?
|
english
|
/*
Copyright 2020 The Knative 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 tracing
import (
"reflect"
"testing"
"go.opencensus.io/trace"
"k8s.io/apimachinery/pkg/types"
)
func TestBrokerMessagingDestination(t *testing.T) {
got := BrokerMessagingDestination(types.NamespacedName{
Namespace: "brokerns",
Name: "brokername",
})
want := "broker:brokername.brokerns"
if want != got {
t.Errorf("unexpected messaging destination: want %q, got %q", want, got)
}
}
func TestTriggerMessagingDestination(t *testing.T) {
got := TriggerMessagingDestination(types.NamespacedName{
Namespace: "triggerns",
Name: "triggername",
})
want := "trigger:triggername.triggerns"
if want != got {
t.Errorf("unexpected messaging destination: want %q, got %q", want, got)
}
}
func TestMessagingMessageIDAttribute(t *testing.T) {
tests := []struct {
name string
ID string
want trace.Attribute
}{
{
name: "foo",
ID: "foo",
want: trace.StringAttribute("messaging.message_id", "foo"),
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := MessagingMessageIDAttribute(tt.ID); !reflect.DeepEqual(got, tt.want) {
t.Errorf("MessagingMessageIDAttribute() = %v, want %v", got, tt.want)
}
})
}
}
func TestBrokerMessagingDestinationAttribute(t *testing.T) {
tests := []struct {
name string
namespaceName types.NamespacedName
want trace.Attribute
}{
{
name: "foo",
namespaceName: types.NamespacedName{
Namespace: "default",
Name: "foo",
},
want: trace.StringAttribute("messaging.destination", "broker:foo.default"),
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := BrokerMessagingDestinationAttribute(tt.namespaceName); !reflect.DeepEqual(got, tt.want) {
t.Errorf("BrokerMessagingDestinationAttribute() = %v, want %v", got, tt.want)
}
})
}
}
func TestTriggerMessagingDestinationAttribute(t *testing.T) {
tests := []struct {
name string
namespaceName types.NamespacedName
want trace.Attribute
}{
{
name: "foo",
namespaceName: types.NamespacedName{
Namespace: "default",
Name: "foo",
},
want: trace.StringAttribute("messaging.destination", "trigger:foo.default"),
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := TriggerMessagingDestinationAttribute(tt.namespaceName); !reflect.DeepEqual(got, tt.want) {
t.Errorf("TriggerMessagingDestinationAttribute() = %v, want %v", got, tt.want)
}
})
}
}
|
go
|
What’s the story?
Once dismissed for being wayward and inconsistent, Umesh Yadav has shut all his detractors with his new and much-improved avatar, especially in the longest format. The sharp pace and bounce that he extracts from any surface were key features of his 30-wicket haul in the recently concluded 13-Test home season for Team India. Yet, Umesh, and the rest of the Indian pace contingent have been plying their trade without a fast bowling coach in their ranks.
The pacer, however, has expressed his desire to have a fast bowling coach for the team. "A fast bowling coach will definitely help bowlers like Ishant, Shami, Bhuvi and myself to improve.”, he said.
At the top most level, coaching is becoming more and more specialist: especially in the bowling and fielding departments. The Indian team coaching hierarchy starts from Anil Kumble, who is the head coach, followed by R Sridhar (fielding coach) and Sanjay Bangar (batting coach).
After taking over the job last year, Anil Kumble had expressed his interest in keeping a fast bowling coach for the side, but not with immediate effect.
While speaking to Reuters, Umesh Yadav stressed that the core of the Indian bowling looks settled. Yet, the 29-year old believes that he still has to correct his mistakes, because if he doesn’t realise what went wrong.
He also added that with the inclusion of a fast bowling coach, the likes of Ishant Sharma, Mohammad Shami and Bhuvneshwar Kumar will get benefitted, and will have scope to improve on their skills.
What’s next?
A hip injury bothered him after the Australia tour, but a now-fit Umesh is raring to go for the Kolkata Knight Riders, his IPL franchise, after having missed out on the initial few matches. He is most likely to feature in KKR’s first home game at the Eden Gardens against the Kings XI Punjab on April 13.
While there is ample importance being given to batting and fielding coaches, bowling coaches have been an oft-neglected role in the Indian team. The likes of Venkatesh Prasad and Eric Simmons were reprising the role a few years back, but the job has been lying vacant for quite a while now.
The pace battery has impressed with their sustained performances throughout last year, and would be benefitted if there is a helping hand to brush the rough edges. The BCCI should surely respond to Umesh’s plea, and addresses the concern of the Indian pacer.
|
english
|
.mainContainer {
min-height: calc(100vh - 100px);
}
.fa-glasses {
color: rgba(0, 0, 0, 0.76);
}
|
css
|
The flood situation in Barak Valley continued to be grim as the water level of Barak River and its tributaries recorded an upward rising over the last three days.
SILCHAR: The flood situation in Barak Valley continued to be grim as the water level of Barak River and its tributaries recorded an upward rising over the last three days. Water level of Barak River at Annapurna Ghat in Silchar was rising at 7 cm per hour. Water level at 7 pm was 21. 46 metre against the danger level of 19. 83 metres. However, the last three hours of reading marked a steady flow.
The overflowing of Barak River had put various embankments under great pressure. On the other hand, river water started to inundate various points of Silchar. Panic had gripped the town as the APDCL, as a safety measure, disconnected the electricity supply in the low lying areas of the town.
People were seen rushing to the market for panic buying. News of per kg potato being sold at Rs 50 had made the district administration alert. On Wednesday, Deputy Commissioners of Cachar, Hailakandi and Karimganj held at a meeting in Silchar and cautioned the traders not to hike the prices of essential commodities. Meanwhile, scarcity of fuels was also reported as a long queue could be seen in front of the petrol pumps.
Also Watch:
|
english
|
Bombay batsmen Allan Sippy (left) and Sachin Tendulkar during a Ranji Trophy match between Bombay (now Mumbai) and Gujarat at the Wankhede Stadium in 1988.
India U19 cricketer Virender Sehwag poses for a photograph in 1998.
Sourav Ganguly, Bengal batsman, plays a shot during a Ranji Trophy match against Karnataka at Calcutta (now Kolkata) on February 19, 1991.
BCCI U19 XI's Rahul Dravid (left) and S. Sharath during the MRF - Buchi Babu invitation quarterfinals match against TNCA XI at the M.A. Chidambaram Stadium, Chepauk in Madras (now Chennai) on August 16, 1991.
Hyderabad XI batsman V.V.S. Laxman in action during the MRF - Buchi Babu invitation match against TNCA President XI at the M.A. Chidambaram Stadium in Chepauk, Madras (now Chennai), on August 16, 1991.
|
english
|
James Chapter Two Overview from the Matthew Henry Commentary:
In this chapter the apostle condemns a sinful regarding of the rich, and despising the poor, which he imputes to partiality and injustice, and shows it to be an acting contrary to God, who has chosen the poor, and whose interest is often persecuted, and his name blasphemed, by the rich (v. 1-7). He shows that the whole law is to be fulfilled, and that mercy should be followed, as well as justice (v. 8-13). He exposes the error and folly of those who boast of faith without works, telling us that this is but a dead faith, and such a faith as devils have, not the faith of Abraham, or of Rahab (v. 11 to the end).
Journey through the book of James as orator and author Heather Hair brings the Bible to life in this 5-day reading plan.
Revival Is Now!
Elijah. Man of Courage, Man of Faith, Man of God.
|
english
|
Filmmaker Prashanth Neel reveals that the character of Prabhas in Salaar was inspired by Amitabh Bachchan in Salim-Javed movies.
Prabhas starrer Salaar has been loved by all. The film is getting all the love and people are all praise for the actors of the movie. Apart from Prabhas, the film also stars Prithviraj Sukumaran, Shruti Haasan, Sriya Reddy, Eshwari Rao, Jagapathi Babu and Meenakshi Chaudhary. Salaar is directed by Prashanth Neel and produced by Hombale Films. The film has been excellent at the box office. Now, Prashanth Neel has revealed that he drew inspiration from Amitabh Bachchan for Salaar. BollywoodLife is now on WhatsApp. Click here to join for the latest Entertainment News.
He spoke to Pinkvilla and said that the lead character from Salaar is an angry young man, much like those played by Amitabh Bachchan in Salim-Javed movies. He further spoke about his love for Amitabh Bachchan. He said that he drew inspiration from that era for sure, but I also tend to write in a way where my hero has to be my biggest villain.
He said that this is his rule and then he starts writing. He added, "At the time being, both the movies (KGF and Salaar), both the characters they have similarities that they turn out to be the biggest villains."
Salaar is set in the fictional city of Khansaar, the story of the film revolves around two friends Deva (Prabhas) and Vardha (Prithviraj).
Salaar had a box office clash with Shah Rukh Khan's Dunki. Salaar released on December 22 and Dunki released on December 21. Many thought that one of the films will face the downfall but both have been doing great. Salaar has now crossed Rs 550 crores internationally.
Prashanth Neel had recently spoken about Prabhas' reaction to the success of Salaar. He said that Prabhas is absolutely over the moon, with something like this and his reaction is euphoric.
Stay tuned to BollywoodLife for the latest scoops and updates from Bollywood, Hollywood, South, TV and Web-Series.
Click to join us on Facebook, Twitter, Youtube and Instagram.
Also follow us on Facebook Messenger for latest updates.
|
english
|
Pat McAfee made his WWE debut last week at NXT TakeOver: XXX. McAfee faced former NXT Champion Adam Cole in a singles match and despite losing, impressed everyone watching. McAfee's promos in the run-up to TakeOver were also impressive.
McAfee recently appeared as a guest on Corey Graves' After The Bell podcast and commented on his future after TakeOver. While McAfee didn't say that he would definitely wrestle in WWE again, he did not rule it out:
The conversation that was happening very loudly around me the last couple of days before 'TakeOver: XXX' and now after 'TakeOver: XXX about, 'are you going to get in the ring again? Are you gonna wrestle again?'. And whenever I said, 'well, I haven't even thought about that.' I think people thought I was lying. No, no. I was only worried about that match.
Pat McAfee went on to discuss how important it was for him to showcase his respect for pro wrestling. McAfee took a shot at some outsiders who have appeared in WWE in the past without even bothering to find out more about what it was all about. He also said that he wanted everyone in the locker room to know that he respected the business:
With my match, I wanted to show respect to the business, and I think that was something that as a wrestling fan, I always hated when the outsider came in. When you watch most of these outsiders - not all of them obviously, there's some great matches that have happened. But the majority of them, it looks like the person didn't even attempt to learn about the business. They weren't a fan of the business or watched the business.
"For me, the biggest thing was that I want to respect this business. The people who have made a living in here, whenever they watch me, I want them to think like, 'OK, that guy at least cared about the business a little bit.
Pat McAfee is a lifelong WWE fan and was a pro footballer before retiring in 2017.
You can listen to After The Bell HERE.
|
english
|
{"name": "twisted-intro", "description": "Source files used for an introduction to Twisted", "license": {"key": "mit", "name": "MIT License", "spdx_id": "MIT", "url": "https://api.github.com/licenses/mit"}, "starNum": 458, "folkNum": 260, "watchNum": 458, "topic": []}
|
json
|
{
"navigationBarTitleText": "订单详情",
"usingComponents": {
"order-operate": "/components/order-operate/index",
"count-down": "/components/count-down/index"
}
}
|
json
|
From Bhumi Pednekar, Tara Sutaria to Mrunal Thakur, whose Barbie-fever outfit was the best?
Greta Gerwig’s Barbie is finally here and it’s time to go back and see which Bollywood actress embraced the pink fever in the best way possible. Read on to find out more.
Greta Gerwig’s Barbie movie featuring Margot Robbie, Ryan Gosling, Dua Lipa, America Ferrara, Simu Liu, Will Ferrell, and others, is finally out. The movie has brought along with it, a wave of pink like never before. People all around the world have been riding along and scouring their closets to find that ideal pink outfit to wear for the movie. There are no doubts about the fact that this might be the biggest release of the year. Even, Bollywood divas have been embracing the pink fever and creating the most amazing Barbie-inspired looks which prove that we can indeed, be anything we want.
So, why don’t we look back at all of these magical Barbiecore outfits and decide who did it best? After all, a good ol’ face-off had never hurt anyone, has it? Let’s dive right in and pick out the outfit that literally makes us go, “Hi Barbie!”. Are you ready?
Bhumi Pednekar:
Let’s all agree that Bhumi Pednekar embraced Barbiecore in her birthday week like nobody else did. She was seen wearing a pink shimmery coordinated set with a matching shirt and pants from Itrh with a matching scarf on the neck and baby pink pumps to complete her look. She also perfectly accessorized the look with earrings from Mahesh Notandass and rings from Vandals. Doesn’t she look gorgeous?
Shanaya Kapoor:
Shanaya Kapoor turned into ‘Glam Barbie’ as she embraced the pink trend taking over the globe. She wore a floor-length pink gown called Antonia from the brand Mélani. She paired this beautiful backless gown with a formal pink shimmery purse and opted for minimalistic accessories like simple droplet earrings. Meanwhile, her hair was styled in a messy bun while her pretty makeup with the perfect pink lipstick, elevated the entire look. Doesn’t she look simply magical?
Taapsee Pannu:
Taapsee Pannu also embraced the Barbiecore trend like a boss as she wore a white crop top paired with the baby pink Acai skirt from 1XBLUE. She also wore a gorgeous pink faux fur jacket from Zabella worth Rs. 8,990, over the same, to complete her outfit. Furthermore, she added “Karens” white faux leather boots from Hogwash, to complete her outfit. Meanwhile, her perfectly curled-up hair and natural-looking makeup elevated the outfit. Doesn’t she look beautiful?
Sharvari Wagh:
Sharvari Wagh is no slouch when it comes to following trends, she aces all her looks like a boss. Recently, during a red-carpet appearance, she stunned everyone with a floor-length, avant-garde pink gown laden with a floral print created by Gauri and Nainika. She complimented the corset-style dress with gorgeous earrings. Meanwhile, her makeup look with a pink lip and her hair was styled into a high ponytail. Doesn’t she look super adorable?
Tara Sutaria:
Tara Sutaria’s gorgeous looks always have us mesmerized, haven’t they? One such look was her recent outing with a side of Barbiecore. She was seen wearing a straight, strapless, floor-length baby-pink gown from House Of CB. She completed the outfit with embellished peep-toe heels from Jimmy Choo and a gorgeous bracelet, necklace, and ring from Diamantia Fine Jewels. Meanwhile, her makeup look with a glossy pink lip looks perfect too. We’re simply obsessed with this one.
Mrunal Thakur:
Mrunal Thakur’s fashion game is always on point. She knows exactly how to command everyone’s attention with just the right outfits. This is perhaps why her Barbiecore outfit is so spectacular. She wore an off-shoulder floor-length baby pink gown with a thigh-high slit from the brand, Genny. She perfectly accessorized this outfit with long earrings and a ring from Golden Window Jewelry and completed the look with silver studded heels from Jimmy Choo. Whereas her pink makeup look perfectly elevated the outfit. Doesn’t she look fabulous?
Ananya Panday:
Ananya Panday stepped into her own fabulous Barbie era while setting the stage on fire with a show-stopping pink bodycon dress from the H&M x Mugler collection. She completed the outfit with teardrop silver earrings and a ring from KAJ Fine Jewellery. Meanwhile, her sheeny makeup look with gorgeous pink lipstick, captivating eyeliner, shimmery eyeshadow, and mascara her hair, styled into a neat bun, perfectly elevated the outfit. Doesn’t she look amazing?
Disha Patani:
Disha Patani recently made an appearance as the ‘Sexy Barbie’ in a bold and sexy pink fusional saree dress which was a custom ensemble created by Saisha Shinde. She chose to wear studded silver earrings and a matching ring with the outfit and completed it with matching metallic pink strappy heels. Meanwhile, her hair was styled in loose waves and her dewy makeup look with the perfect blush, shimmery eyeshadow, gorgeous pink lips, and just the right contouring looked great. Doesn’t she look seriously hot?
This Barbie-inspired trend encourages us to appreciate and embrace our beauty, knowing that it is a distinctive and valuable part of who we are. Ultimately, this inclusive and empowering fashion trend reminds us that we are all beautiful in our way, and that’s what makes it truly special for everyone. So, what are you waiting for? Have you tried the Barbie trend, looked at yourself in the mirror, and screamed, ‘Hi Barbie!’ yet? Comment below to share your experience with us.
|
english
|
The Mumias Sugar Company that had halted the ethanol production due to lack of raw material from last one month will resume the operations. The management of the mill has managed to get 2000 tonnes of molasses from the private millers in Kakamega Country to start the operations.
Sugarcane farmers associated with the Uttam Sugar mill have received the cane bills for the 10 days from December 11 to 20. According to the mill administration officials, the payments of the farmers have been transferred to the Libbrheri sugarcane committee.
Sugarcane farmers from Goa that were solely dependent on the operations of the Sanjivani sugar mill, the only sugar mill from the state were left in lurch as the mill remained shut for more than two years. The farmers have now found their own way by starting jaggery production from the available cane.
Crushing season of the Experimental Sugar Factory of the institute commenced today with Prof. Narendra Mohan, Director carrying out the sugarcane carrier Pooja. The factory is expected to be operated to impart “hands on” training to the students of the Sugar Technology first year courses.
Cyril Ramaphosa, President of South Africa has urged the citizens to help in implementing the sugar master plan that will help in supporting the local sugar industry.
|
english
|
<!--
Base
<router-outlet></router-outlet>
<main class="control">
<img class="img-fluid"src="/assets/img/florian.jpg" />
<div class="superior2_texto">
</div>
</main>-->
<router-outlet></router-outlet>
<main class="control">
<img class="img-fluid"src="/assets/img/florian.jpg" />
<mat-card id="fundo">
<mat-card-subtitle>
<strong>
Acesse a Safe House
</strong>
</mat-card-subtitle>
<form [formGroup]="login">
<mat-form-field appearance="standard" id="emailInput" class="input">
<mat-label>E-mail</mat-label>
<input matInput placeholder="Digite o seu email" formControlName="email">
</mat-form-field>
<mat-form-field appearance="standard" id="senhaInput" class="input">
<mat-label>Senha</mat-label>
<input matInput placeholder="Digite a sua senha" formControlName="senha"
[type]="hide ? 'password' : 'text'">
<button mat-icon-button matSuffix (click)="hide = !hide" [attr.aria-label]="'Hide password'" [attr.aria-pressed]="hide">
<mat-icon>{{ hide ? 'visibility_off' : 'visibility' }}</mat-icon>
</button>
</mat-form-field>
</form>
<mat-card-footer>
<button mat-raised-button id="createBtn" color="accent" (click)="submit()" [disabled]="!login.valid" >Entrar</button>
</mat-card-footer>
<mat-card *ngIf="timeUntilUnblock">
Você está bloqueado temporariamente. <br />
Você poderá acessar a plataforma novamente em {{ timeUntilUnblock | date: 'dd/MM/yyyy' }} <br />
Para mais informações entre em contato pelo nosso e-mail: <EMAIL> <br />
</mat-card>
</mat-card>
</main>
|
html
|
import {
IViewComponentDesignSandbox,
IViewComponentDesignValidationIssue,
ViewDesignerComponentModel
} from '@helix/platform/view/designer';
import { IViewDesignerComponentModel } from '@helix/platform/view/api';
import { Injector } from '@angular/core';
import { IDisplayGradientParameters } from './display-gradient.interface';
import { GRADIENT_COMPONENT_OPTIONS} from '../../../inspectors/gradient/gradient.types';
import { GradientComponent } from '../../../inspectors/gradient/gradient.component';
import { IGradientOptions } from '../../../inspectors/gradient/gradient.interface';
import { Tooltip } from '@helix/platform/shared/api';
import { combineLatest } from 'rxjs';
import { map } from 'rxjs/operators';
const initialComponentProperties: IDisplayGradientParameters = {
gradient: `${GRADIENT_COMPONENT_OPTIONS.defaultValues.left}|${GRADIENT_COMPONENT_OPTIONS.defaultValues.right}`
};
export class DisplayGradientDesignModel extends ViewDesignerComponentModel implements IViewDesignerComponentModel<IDisplayGradientParameters> {
// LMA:: TODO:: See how to pass the values back to the design time component, is that the good way?
// Or should we subscribe to the sandbox object somehow from the model, is there a way?
modelSandbox: IViewComponentDesignSandbox;
constructor(protected injector: Injector,
protected sandbox: IViewComponentDesignSandbox) {
super(injector, sandbox);
// Used for the design time component to subscribe to this.sandbox.componentProperties$.
this.modelSandbox = sandbox;
// Here we define the properties passed to the Inspector to define the input parameter.
// Those are not the default values.
sandbox.updateInspectorConfig(this.setInspectorConfig(initialComponentProperties));
// Registering the custom validation.
combineLatest([this.sandbox.componentProperties$])
.pipe(
map(([componentProperties]) => {
return this.validate(this.sandbox, componentProperties as IDisplayGradientParameters);
})
)
.subscribe((validationIssues) => {
this.sandbox.setValidationIssues(validationIssues);
});
}
// Method called automatically that sets the view component input parameters
// default values or current values.
static getInitialProperties(initialProperties?: IDisplayGradientParameters): IDisplayGradientParameters {
return {
// Setting the gradient default value.
// The gradient will contain information of the starting color (left) to destination color (right).
// It will be stored as, for example:
// '#000000|#FFFFFF'
// Please check the action "fruit-picker" for more details.
gradient: `${GRADIENT_COMPONENT_OPTIONS.defaultValues.left}|${GRADIENT_COMPONENT_OPTIONS.defaultValues.right}`,
...initialProperties
}
}
// Setting inspector for the input parameters.
private setInspectorConfig(model) {
return {
inspectorSectionConfigs: [
{
label: 'General',
controls: [
// In this example the gradient is using a custom inspector previously created for the
// action fruit-picker.
{
name: 'gradient',
component: GradientComponent,
options: {
label: 'Gradient information',
required: true,
tooltip: new Tooltip('Please select the colors that will be used to create a gradient at runtime.')
} as IGradientOptions
}
]
}
]
};
}
// Design time validation. The "model" contains the input parameters (all steps).
private validate(
sandbox: IViewComponentDesignSandbox,
model: IDisplayGradientParameters
): IViewComponentDesignValidationIssue[] {
let validationIssues = [];
// The model contains the input parameter values.
if (!model.gradient) {
validationIssues.push(sandbox.createError('The gradient is required.', 'gradient'));
}
return validationIssues;
}
}
|
typescript
|
<filename>intermediate-Day15-to-Day32/Day_26-list_dict_comprehensions/dict_challenge/main.py<gh_stars>0
sentence = "What is the Airspeed Velocity of an Unladen Swallow?".split()
count = {word:len(word) for word in sentence}
print(count)
|
python
|
#![allow(non_snake_case)]
#![allow(unused_variables)]
#![allow(dead_code)]
fn main() {
let N: i64 = {
let mut line: String = String::new();
std::io::stdin().read_line(&mut line).unwrap();
line.trim().parse().unwrap()
};
let K: i64 = {
let mut line: String = String::new();
std::io::stdin().read_line(&mut line).unwrap();
line.trim().parse().unwrap()
};
let X: i64 = {
let mut line: String = String::new();
std::io::stdin().read_line(&mut line).unwrap();
line.trim().parse().unwrap()
};
let Y: i64 = {
let mut line: String = String::new();
std::io::stdin().read_line(&mut line).unwrap();
line.trim().parse().unwrap()
};
let ans = std::cmp::min(N, K) * X + std::cmp::max(0, N - K) * Y;
println!("{}", ans);
}
|
rust
|
<reponame>Stas-Ghost/fhir-ru
Coagulation factor XIII coagulum dissolution at 24 hours [Presence] in Platelet poor plasma by Coagulation assay
|
json
|
England continued their fine form in white-ball cricket as they went 1-0 up in the 3-match T20I series against South Africa with a five-wicket win at Newlands. Eoin Morgan's men will look to continue in the same vein when they take the field at the Boland Park in Paarl on Sunday.
Former captain Faf du Plessis scored a magnificent half-century and led his team to 179/6 in 20 overs. His Chennai Super Kings teammate Sam Curran starred for the visitors with a three-wicket haul. Chasing 180 runs, England reached the target in the 20th over, riding on Jonny Bairstow's 48-ball 86*.
Quinton de Kock will be disappointed with his performances of his bowlers in the second half of the English innings. Debutant George Linde's dream spell had reduced England to 34/3 in 5. 3 overs. Still, the rest of the bowlers could not capitalize on that start as Bairstow guided them home.
The home team will look to keep the series alive by registering a win in Paarl. Here's a look at the pitch report and weather conditions for this fixture.
It is pertinent to note that Boland Park has not hosted a T20 international match before. South Africa and England will play the first T20I at the ground in Paarl. Looking at the numbers from the ODI matches played on this ground, fans of the game can expect another high-scoring thriller.
In the 12 ODI games played at this venue, teams batting first have touched the 200-run milestone on every occasion. The average first innings score on this ground is 261 runs in ODI cricket, meaning that anything above 170 would be a par score in T20Is. The conditions at Paarl will be best-suited for the fast bowlers.
Sunny skies are expected for this afternoon fixture at Boland Park in Paarl. The temperature will stay at around 26 degrees Celsius throughout the match.
|
english
|
body {
background-color:#e8e8e8;
}
h1 {
color:#f05454;
}
h2 {
color:#30475e;
}
hr {
border-style: dotted none none;
border-width: 5px;
border-color:grey;
width:5%
}
ul {
color:#000000;
}
table {
color:#000000;
}
form {
color:#000000;
}
|
css
|
New Delhi:
The government today launched a new air quality index on, under intense pressure to act after the World Health Organization (WHO) declared New Delhi the world's most polluted capital.
Environment Minister Prakash Javadekar said the government would publish air quality data for 10 cities, amid growing public concern over the impact of air pollution on the health of India's 1. 2 billion people.
The new index will initially cover 10 cities -- Delhi, Agra, Kanpur, Lucknow, Varanasi, Faridabad, Ahmedabad, Chennai, Bangalore and Hyderabad -- each of which would have monitoring stations with Air Quality Index display boards. The aim is to eventually cover 66 cities, the government said.
"The Air Quality Index may prove to be a major impetus to improving air quality in urban areas, as it will improve public awareness in cities to take steps for air pollution mitigation," Mr Javadekar said as he launched the index at a conference on the environment.
But the Minister gave little indication of what the government would do to improve air quality, except to say it would introduce new rules on disposal of construction waste.
The dust from thousands of industrial and construction sites adds to the fumes from millions of vehicles to create the toxic cocktail that urban Indians breathe.
At least 3,000 people die prematurely every year in Delhi because of high exposure to air pollution, according to a joint study by the Boston-based Health Effects Institute and Delhi's Energy Resources Institute.
A World Health Organization study of 1,600 cities released last year showed Delhi had the world's highest annual average concentration of small airborne particles known as PM2. 5 -- higher even than the Chinese capital Beijing.
These extremely fine particles of less than 2. 5 micrometres in diameter are linked with increased rates of chronic bronchitis, lung cancer and heart disease as they penetrate deep into the lungs and can pass into the bloodstream.
An air quality index compiled by the US embassy in Delhi on Monday registered a PM2. 5 reading of 175, which is considered unhealthy. The reading from the US embassy in Beijing was just 53, which is considered moderate.
Prime Minister Narendra Modi used Monday's conference to defend India's record on pollution, saying the country has a strong tradition of protecting the environment. "We must think of traditional ways to tackle environmental issues," he said in a speech to delegates.
"There can be green solutions in our age-old traditions," he added, suggesting that Sundays could become "cycle day" on India's traffic-clogged roads.
Though the government has yet to announce any major moves to tackle air pollution, policymakers have suggested restrictions on private vehicles, higher pollution-related taxes and stricter enforcement of urban planning laws.
|
english
|
<reponame>zhouzhuo810/StringKiller
package me.zhouzhuo810.stringkiller.utils;
import java.io.*;
/**
* Created by zz on 2017/9/20.
*/
public class FileUtils {
public static void replaceContentToFile(String path, String con) {
try {
OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(path), "UTF-8");
BufferedWriter bw = new BufferedWriter(osw);
bw.write(con);
bw.flush();
bw.close();
} catch (IOException e) {
e.printStackTrace();
}
}
public static void closeQuietly(Closeable c) {
if(c != null) {
try {
c.close();
} catch (IOException var2) {
;
}
}
}
}
|
java
|
<reponame>Eric-Arellano/rust
trait Foo {
fn bar(&self);
fn baz(&self) { }
fn bah(_: Option<&Self>) { }
}
struct BarTy {
x : isize,
y : f64,
}
impl BarTy {
fn a() {}
fn b(&self) {}
}
impl Foo for *const BarTy {
fn bar(&self) {
baz();
//~^ ERROR cannot find function `baz`
a;
//~^ ERROR cannot find value `a`
}
}
impl<'a> Foo for &'a BarTy {
fn bar(&self) {
baz();
//~^ ERROR cannot find function `baz`
x;
//~^ ERROR cannot find value `x`
y;
//~^ ERROR cannot find value `y`
a;
//~^ ERROR cannot find value `a`
bah;
//~^ ERROR cannot find value `bah`
b;
//~^ ERROR cannot find value `b`
}
}
impl<'a> Foo for &'a mut BarTy {
fn bar(&self) {
baz();
//~^ ERROR cannot find function `baz`
x;
//~^ ERROR cannot find value `x`
y;
//~^ ERROR cannot find value `y`
a;
//~^ ERROR cannot find value `a`
bah;
//~^ ERROR cannot find value `bah`
b;
//~^ ERROR cannot find value `b`
}
}
impl Foo for Box<BarTy> {
fn bar(&self) {
baz();
//~^ ERROR cannot find function `baz`
bah;
//~^ ERROR cannot find value `bah`
}
}
impl Foo for *const isize {
fn bar(&self) {
baz();
//~^ ERROR cannot find function `baz`
bah;
//~^ ERROR cannot find value `bah`
}
}
impl<'a> Foo for &'a isize {
fn bar(&self) {
baz();
//~^ ERROR cannot find function `baz`
bah;
//~^ ERROR cannot find value `bah`
}
}
impl<'a> Foo for &'a mut isize {
fn bar(&self) {
baz();
//~^ ERROR cannot find function `baz`
bah;
//~^ ERROR cannot find value `bah`
}
}
impl Foo for Box<isize> {
fn bar(&self) {
baz();
//~^ ERROR cannot find function `baz`
bah;
//~^ ERROR cannot find value `bah`
}
}
fn main() {}
|
rust
|
Who are Yahoo users' NCAA tournament upset picks and title favorites?
If the secret to winning an office pool is going against the grain, then you may want to find a Final Four threat besides Villanova and Virginia in the East and South regions.
Two-thirds of all Yahoo users like the top-seeded Wildcats to emerge from the East region. The top-seeded Cavaliers are nearly as popular a choice in the South.
Here’s an early look at who Yahoo users like to pull upsets, to reach the Final Four and to win the national championship in this year’s Yahoo Sports Tourney Pick’em. And just in case you want the thoughts of a college basketball writer with a long history of picking national champions who fail to make it out of the opening weekend, I also offered my thoughts on where I agree and disagree with popular opinion.
Most popular Round of 64 upset pick by a double-digit seed: No. 10 Butler over No. 7 Arkansas (59.0 percent)
My take: This is certainly a reasonable pick considering oddsmakers don’t even consider it an upset. Butler opened as a one-point favorite and the spread has increased to as much as two in some places. One concern for Butler is that it generates most of its offense inside the arc and Daniel Gafford’s rim protection is the one strength of Arkansas’ otherwise mediocre defense. Expect Butler to hoist a few more threes than usual and Tyler Wideman to have a big game on the offensive glass.
Most popular 11-6 Round of 64 upset pick: San Diego State over Houston (31 percent)
My take: San Diego State is a better and healthier team now than the one that dumped games to Cal and Washington State in non-conference play and dropped six of eight midway through the Mountain West season. The Aztecs closed the season on a nine-game win streak fueled by balanced offense and a renewed commitment defensively. This is no slam-dunk pick, by any means. Rob Gray is one of college basketball’s elite scoring guards and Houston has a capable defense. But the Aztecs certainly have as much hope as any other 11 seed.
Most popular 12-5 Round of 64 upset pick: New Mexico State over Clemson (26.9 percent)
My take: Having beaten Miami and Illinois and pushed USC to the final buzzer, New Mexico State won’t be intimidated facing Clemson. The Aggies won 28 games and swept the WAC regular season and tournament titles thanks to their strong defense and dominance on the glass. The key to this game should be whether New Mexico State can generate enough second-chance points to stay close until the end. Clemson’s interior defense is its biggest strength and the Aggies don’t shoot it efficiently from behind the arc.
Most popular 13-4 Round of 64 upset pick: Marshall over Wichita State (9.7 percent)
My take: This feels like a reach. Marshall is a tricky opponent because of its fast-paced, 3-point-heavy style of play, but a high-possession game doesn’t favor the underdog. Look for Wichita State to adjust to Marshall’s style of play as the game goes on and bludgeon the Thundering Herd on the boards. There’s not a No. 13 seed I love in this field, but fading Auburn is a vulnerable No. 4. Taking Charleston to upset the Tigers might be a better pick than this one.
Double-digit seed most likely to reach the Sweet 16: No. 12 New Mexico State (11.1 percent)
My take: If you take New Mexico State to win its first game, you might as well ride the Aggies to the Sweet 16. Fourth-seeded Auburn would be a more favorable second-round matchup than first-round opponent Clemson is. Auburn has dropped four of six games since shot-blocking standout Anthony McLemore’s season-ending injury. The Tigers also are more vulnerable on the defensive glass than Clemson is.
My take: Only 20 percent of Yahoo users project the top-seeded Musketeers to reach the Final Four, making them the eighth-most popular Final Four pick in the field. Considering the Musketeers have never been to the Final Four, check in 14th in the KenPom rankings and have benefited from a 9-1 record in games decided by five points or less, a little bit of healthy skepticism is to be expected.
Most popular Final Four picks: Villanova (67.0), Virginia (59.7), North Carolina (38.7), Kansas (32.2)
My take: This is reasonable, though I’m a bit surprised Kansas is a more popular pick than Michigan State or Duke in the Midwest. Yahoo users’ most popular long-shot Final Four picks that aren’t top-three seeds? Arizona, Gonzaga and Kentucky.
Five most popular national champions: Virginia (26.1), Villanova (18.7), Duke (9.6), Michigan State (8.5), Kansas (8.2)
My take: Three of the top five title contenders hail from the Midwest Region, an unfortunate break for Duke and Michigan State in particular. The top choices behind this quintet: North Carolina, Michigan and Arizona.
Kentucky will: lose in the round of 64 (13.7 percent), lose during the first weekend (63.8 percent), make the Final Four (7.5 percent), win the national championship (1.5 percent)
My take: This reflects how tough Kentucky’s draw is. The Wildcats could have to beat surging Davidson, talent-laden Arizona and the best team in college basketball, Virginia, just to get to the Elite Eight.
Duke will: lose in the round of 64 (3.4 percent), lose during the first weekend (12.1 percent), make the Final Four (30.7 percent), win the national championship (9.6 percent)
My take: 3.4 percent of you are throwing your bracket pool entry-fee away. Iona is one of the worst rebounding teams in the country. It plays fast and freewheeling. To say that’s not the formula to upset Duke is a massive understatement.
More NCAA tournament on Yahoo Sports:
Jeff Eisenberg is a college basketball writer for Yahoo Sports. Have a tip? Email him at daggerblog@yahoo.com or follow him on Twitter!
|
english
|
<filename>src/components/CheckBox.styles.ts
export const CHECKBOX_STYLE: React.CSSProperties = {
boxSizing: 'border-box',
display: 'flex',
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
width: '1.2rem',
height: '1.2rem',
margin: 0,
padding: 0,
border: '1px solid black',
};
export const CHECKBOX_CHECKED_STYLE: React.CSSProperties = {};
export const CHECKBOX_INNER_STYLE: React.CSSProperties = {
boxSizing: 'border-box',
content: '""',
display: 'block',
width: '0.6rem',
height: '0.6rem',
maxWidth: 0,
maxHeight: 0,
margin: 0,
padding: 0,
backgroundColor: 'black',
transition: '0.2s',
};
export const CHECKBOX_INNER_CHECKED_STYLE: React.CSSProperties = {
maxWidth: '0.6rem',
maxHeight: '0.6rem',
};
|
typescript
|
This is Chad Orzel's (@orzelc and blogger at Uncertain Principles) third book. His first two were How To Teach Physics to Your Dog and How to Teach Relativity to Your Dog. Both of these are fine books, but this one is different. You could think of the previous two books as an entertaining version of a physics class (without the test), but this is more like a case study on the process of science.
What is science? I think Chad does a great job of describing science right in the first chapter. He says that science is a lot like playing Angry Birds (yes, he mentions me in the very first footnote). In the game (please tell me you know about Angry Birds) you have some idea of how to knock over a pig and you try it out. If it doesn't work, you try a different idea. Of course, this isn't exactly what science is all about. If it were, this would be a very short book.
One way to get a better understanding of the nature of science is to see the progress of different scientific ideas. This is the whole point of the book - to show the process of science by looking at the great stories in science. Some of the interesting chapters:
- How do we know evolution works? Of course, this would be difficult for a physicist to write since we don't know all the details about evolutionary biology beforehand.
- What about the periodic table and the organization of the elements?
- How do we know about the atomic structure of matter?
Chad does an excellent job mixing these classic stories along with some actual science content in a conversational style. I honestly enjoyed reading the book.
Here is TL;DR - this is an enjoyable book that presents the process of science through entertaining stories. Oh, and it's way better than those dumb "The Scientific Method" posters you see hanging up in classrooms.
Disclaimer: A review copy of this book was provided by Basic Books.
|
english
|
ISLAMABAD: Kashmiris on both sides of the Line of Control are observing Accession to Pakistan Day on Tuesday with a renewed pledge to continue their freedom struggle till liberation of the state from Indian subjugation.
According to KMS, it was on this day in 1947 that the Kashmiris adopted a historic resolution from the platform of All Jammu and Kashmir Muslim Conference in Srinagar, demanding accession of the state of Jammu and Kashmir to Pakistan in accordance with the Partition Plan and two-nation theory.
Hurriyat leaders, including Syed Ali Gilani, Mirwaiz Umar Farooq and Yasin Malik, in a joint statement appealed to the people to observe complete shutdown today (Tueday) and tomorrow (Wednesday) as black day against the recent killings of Kashmiris by the Indian troops in the Occupied territory.
The strike will also be observed on Thursday and Friday. Black Day will also be observed against the Indian atrocities in Occupied Kashmir tomorrow.
|
english
|
Buena Vista Social Club (1999)
When I rented Buena Vista Social Club I didn't have any appreciation for the type of music played by the Club; I still don't know what it's called. I rented the movie because I'm a Ry Cooder fan, and have seen some Wim Wenders' movies I liked. I wasn't expecting much, but the result is that I've just seen one of the best documentaries in my life. The premise is very simple, it's all about the old musicians and the wonderful music they make. You get to visit their modest homes, hang out in their neighborhoods, and listen to their music. Nothing more than that, but done so well, so effortlessly, you wish you could step through the screen and join them. I would recommend this film to anyone.
Welcome to the Dollhouse (1995)
Junior High must be the tenth circle of Hell. How do any of us scrawny, not-cool geeks survive it? Perhaps we don't, and all our adult neurosis trace back to 7th grade homeroom and not Mom after all.
Not convinced? Watch Welcome to the Dollhouse and relive Hell.
Dawn Wiener is the protagonist, an awkward 7th grader who is put-upon by everyone from her family to schoolmates. She suffers a multitude of insults, all too small to register with adults who could help, but which inflict a thousand darts to her soul. The movie made me cringe, unearthing long suppressed memories of adolescent cruelties and torment at the hands of bullies. Is this entertainment? Absolutely, Todd Solondz did an admirable job in his freshman movie.
Jay and Silent Bob Strike Back (2001)
I'm not hip anymore, if I ever was. But in my teens I sure was a dopey, foul-mouthed, slacker and relying on the memories of that experience I can understand the appeal of JSBSB. That squirrelly demographic surely has to be Ken Smith's target audience, he's sure not shooting for the Merchant/Ivory crowd. That said then, does he hit his intended targets?
Yes, but not nearly enough of the time. What is essentially sketch comedy is forced into a (dumb) linear plot and stretched out far too long. Jay and Silent Bob could thrive within the confines of a 30-minute TV program, albeit it would have to be on cable. But trying to tell a movie-length story? Nope. There are some very funny bits, but plenty more time is spent on trying to establish a narrative arc that just isn't there. It didn't work.
Anger Management (2003)
My problem with Anger Management is not that it's another comedic misfire by Adam Sandler, but that he takes Jack Nicholson down with him. Jack has done some excellent work in comedy in the past. But they were roles with substance; good direction, script, supporting actors. Anger Management is a piece of fluff with nothing behind it, particularly a decent script. The script seems solely designed as a series setups for Sandler and Nicholson to bask in the limelight and overact. It's unseemly.
Sandler playing Sandler was not very funny when it was fresh, him newly minted from his hysterical stint on SNL. But now it's getting tiresome. I can see why Sandler needed Nicholson, but I don't understand why Nicholson accepted.
Anger Management (2003)
My problem with Anger Management is not that it's another comedic misfire by Adam Sandler, but that he takes Jack Nicholson down with him. Jack has done some excellent work in comedy in the past. But they were roles with substance; good direction, script, supporting actors. Anger Management is a piece of fluff with nothing behind it, particularly a decent script. The script seems solely designed as a series setups for Sandler and Nicholson to bask in the limelight and overact. It's unseemly.
Sandler playing Sandler was not very funny when it was fresh, him newly minted from his hysterical stint on SNL. But now it's getting tiresome. I can see why Sandler needed Nicholson, but I don't understand why Nicholson accepted.
The Italian Job (2003)
F. Gary Gray has created a very effective high-speed caper flick. Nothing too deep, just the basic elements delivered with style and flash. These elements include the members of the gang; the sage leader, his number one, the tactician, geek, and explosives guy. Then there's the initial big heist, betrayal and death, another theft that is bigger than the first, while not forgetting the obligatory chase scenes, other cliffhangers, and romance. The characters are portrayed by a well-rounded ensemble cast who usually resist chewing the scenery. The directing is competent and abetted by a great soundtrack. No overreaching by Mr. Gray, he delivers a straight, just-for-entertainment story, and does it very well.
Confessions of a Dangerous Mind (2002)
What if the creator and host of two of the 1970s biggest and lamest television game shows was also a part-time CIA hitman? That he used The Dating Game and The Gong Show as a cover to stage assassinations in the netherworld of Cold War espionage. Ridiculous you'd say. But that's what exactly what Chuck Barris claims in his autobiography, and Charlie Kaufman accepts carte blanche as the premise for his screenplay. The film plays it straight up as if Barris were telling the truth.
Can Charlie Kaufman, the screenwriter, and George Clooney, the director pull it off? Mostly. It is competently acted by Sam Rockwell as Barris, Julia Roberts as a fellow spy, Drew Barrymore as his love interest, and director George Clooney as his CIA recruiter and handler. The bizarre landscape, a marriage of television and espionage, is presented without a smirk or wink. If Barris is telling the truth, this is what it must have been like. It's an interesting idea, and Clooney and Kaufman have taken it and crafted an enjoyable film.
The Mysterious Island (1929)
Loosely based on a Jules Verne novel, The Mysterious Island is set in a mythical kingdom by the sea where one of its leading royalty (Lionel Barrymore) doubles as cutting-edge scientist who invents the submarine and diving suit. In the course of exploring he and his buds discover a civilization of sea creatures that look like walking frogs and have the sensibilities of a pack of hyenas. There are also above-surface issues of betrayal, palace coups, wars, and young love.
Made on the cusp between silent and sound films, The Mysterious Island is caught somewhere in between; it is part talkie and part silent. Oddly there doesn't seem to be a dramatic or thematic rationale for deciding which scenes have sound and which don't. And why didn't the producers choose one format over the other for the entire movie? But they didn't, and this alone makes the film a novelty. Another reason to watch The Mysterious Island is the 1929-era special effects. They're a hoot. But even when these factors are taken in to account there is not much reason to invest the time in this movie.
West of Zanzibar (1928)
Crippled during a confrontation with his wife's lover, Phroso, a famous English magician (Lon Chaney, Sr), vows to exact terrible revenge on wife and lover. A couple of year's later when the wife, fatally ill, returns to London with a young child, Phroso's plans are put into action. After she succumbs to her illness, Phroso emigrates to Africa with her child, where the wife's lover is an ivory trader, a vocation also undertaken by Phroso.
Now known as Dead-Legs he becomes the most feared and degenerate backcountry ivory trader west of Zanzibar. He raises his daughter, who he presumes is not his own, to be a drug-addicted prostitute. With his wife's child debased, he waits like a spider in his web for the man who cuckolded and then paralyzed him. Dark stuff, this.
It's a morbid although entertaining little tale, and Lon Chaney gives his usual top-notch performance, transitioning from the big-hearted Phroso to the crippled (in both body and sole) Dead-Legs. The movie is worth watching just for his performance. Tod Browning is in his element and delivers up a dark, creepy tale. So what that the plot twists are telegraphed from a mile away, and the portrayal of Africans is negatively stereotyped. If these shortcomings can be overlooked, this is a good example of the Browning-Chaney collaborations. Not bad for a silent film, which has a recorded soundtrack, coming as it did on the cusp of the transition to sound.
Le divorce (2003)
it looks in bad form to leave a pregnant wife. The American Mom, Dad, and Brother show up to help, especially to retrieve a valuable family painting that is in France with Sis, but a piece of property that the French family also covets. Complicating matters, the visiting sister begins an affair with the husband's married uncle, as a multitude of other characters begin to pop up.
The acting is mostly journeyman (although there are a few standouts like Stockard Channing as the American Mom), but is adequate for the material. Okay so it's also over plotted, overpopulated, and over done. I still enjoyed it, and would recommend it, although not heartily.
The Santa Clause (1994)
Why'd It Make So Much Money?
I remember The Santa Clause from 1994 and the good vibe it generated and the money it made. But at the time I gave it a pass; my children were teenagers and didn't have much interest in kids movies. Nor did I. But this holiday season I felt like feel-good movie. Something akin to A Christmas Story, one of my all-time favorites, but one I've seen too many times. I needed a new Christmas movie and The Santa Claus seemed like a promising candidate. Wrong.
Tim Allen plays Scott Calvin, a workaholic divorced parent who cannot connect with his young son. And he desperately wants to, both for his son and to offset the influence of Mom's new boyfriend. But Scott can't do anything right. Then on Christmas Eve Scott accidentally kills Santa Clause. Funny, huh? The clause in the title is not a misspelling, but refers to the legal clause that requires anyone who offs Santa to take his place. This is cleverly done, although it is a bit maudlin. Well guess what happens? Scott learns the (non-religious) meaning of Christmas, bonds with his son, discovers himself make that a lot maudlin.
In 1994 Tim Allen was riding high with his hit TV show, Home Improvement, and in The Santa Clause he plays Tim Allen playing Tim Allen playing Santa Clause. No stretch here. And the rest of the cast is just there as a foil for Tim. And the plot, however clever, just wasn't very entertaining to this reviewer. Actually, this minority commentator didn't like The Santa Clause very much at all, and certainly can't recommend it to anyone.
The Matrix Reloaded (2003)
The initial Matrix is one of the most innovative science fiction movies I've seen. When I first saw it, it took me by complete surprise (c'mon, it's a Keanu Reeves movie), and it provided one of my more enjoyable movie-going experiences in 1999. Like all great science fiction, it brought a new, terrifying, and wildly believable world to life. All I could say was "wow". When I heard that this was only the first of a trilogy of Matrix movies, I had more than a little trepidation. How could the Wachowskis jump-start the second while improving upon the original?
Well, the answer is, they couldn't. The second installment, The Matrix Reloaded, doesn't hold a candle to the original. But all of the principals from the first are present; what went wrong?
Well it's the Star Wars Syndrome. But at least George Lucas gave us three great movies before stumbling, the Wachowski's mustered only one. But the mistakes committed by Lucas and the Wachowskis are very similar; infusions of moralizing, diminuation and sanitizing of the drama and tragedy, dumbing down the characters, etc, etc.
The Matrix Reloaded is not a bad movie, just a disappointing one.
A.I. Artificial Intelligence (2001)
Many reviewers and critics have bemoaned the fact that this film did not achieve the box-office success it deserved. I am more in agreement with the theater-going public; this misfire deserved its disappointing take. Not that it didn't try, and in my opinion, should have succeeded.
Two of the greatest directors in the history of film were associated with the project, and apparently cared deeply about it. They are, of course, Stanley Kubrick and Steven Spielberg. It was Spielberg that finally directed A.I. and perhaps it was his desire to adhere to Kubrick's vision (or his perception of it) that threw the film off balance. That, or perhaps Spielberg is getting sappy. Nonetheless, the movie tries to cover too much philosophical ground, and instead of telling a good story, we're stuck with an odd polemic on the nature of love, life, and lots of other deep subjects. There was a great, dark, story to tell and a fine cast assembled to assist in the telling. But Spielberg decided to get preachy, ditched the inherit drama (and horror) of the story, and subjected the paying public to a sermon. I don't find that so entertaining, and apparently neither did many others.
About Schmidt (2002)
Some of my friends were very disappointed with About Schmidt. It went against their perception of Jack Nicholson's recent comedic typecast; a wicked Jack who embraces his roles with gusto. But even though the film claims it, About Schmidt is no comedy. It's a downer. Jack looks like the same old Jack, but Warren Schmidt is not a funny man, he's a shell of a human. A recently retired life insurance underwriter in Omaha, his wife abruptly dies leaving him alone and with nothing do to. His wife and his job were his whole universe, and now they're both gone. To make matters worse, while going through his wife's affects, he finds love letters from a long ago adulterous affair with their best friend. In late middle age, what little life Warren has remaining comes crashing down around him.
His grown daughter is getting married in Colorado (to a man Warren believes beneath her), so Warren embarks on a road trip to see her and meet her family. A family headed by Roberta, played by Kathy Bates, who embraces life. Will she be Warren's salvation?
Warren Schmidt is a very difficult character, but Jack Nicholson nails it with a very understated and gutsy performance. He is supported by a great and believable supporting cast, and the on-site Midwestern winter locales add truthfulness to the tale. And then there's Jack in one of his best roles. About Schmidt is highly recommended.
Dr. T & the Women (2000)
Robert Altman appreciates women. It shows in his movies; women are often the main characters, and his films offer up a variety of interesting roles for actresses. Dr. T and the Women is almost entirely about women, modern day wealthy Texas women. Richard Gere plays Dr. Sully Travis a very successful and popular Dallas gynecologist. Not only is he surrounded by women all day at work, but his family consists entirely of women. Only a couple of male buddies enter into his closed, female dominated life. And like all good Altman movies there are plenty of quirky characters and intersecting plotlines.
The problem is that the plotlines aren't that interesting or original. Dr. T's wife develops a rare mental disorder that affects only the wealthy, and must be institutionalized. The new female golf pro comes on to Dr. T, as does his nurse. His soon-to-be-married daughter is slowly realizing that she may be a lesbian. And so on.
For Altman fans, Dr. T and the Women is not a bad rental. The director has done better, but it's still Altman. Others, less interested, might want to give this a pass.
Spanking the Monkey (1994)
This Indie film pushes the envelope with its odious subject matter; mother-son incest. Now, I don't mind when a film tackles a difficult topic, but this movie appears to embrace its subject matter not because it has a story to tell or a point to make, but only to be out there on the edge.
It's intuitively obvious that the relationship between the mother and her son has to be a product of a very dysfunctional family, and the subject family is a case of middle-class dysfunction en extremis. So much so, the characters are rendered unbelievable. The director and screenwriter push way too hard to make the movie edgy', and end up with a mess.
I missed Ready to Wear when it was released in 1994, and finally rented the film. I had great anticipation. The fashion industry was the next to squirm under Mr. Altman's cinematic scalpel. Altman assembled a large, talented ensemble cast as usual. The locale is the annual prêt-à-porter fashion show in Paris, as a multitude of characters descend on hotels, fashion houses, restaurants, and runways; their stories intertwining and crisscrossing across a pastiche of interlocking plotlines. It'll be just like Nashville, in other words, another Altman tour de force.
Oddly and sadly, it's nothing of the sort. Ready to Wear loses its way early, and drifts aimlessly along for its lengthy 133 minute runtime. The characters lack the depth of his other films; they're poorly defined and you never really feel you get to know them. The dialogue is shallow and lacks bite. Even the little things tend to annoy; why use sidewalk dog poop as a unifying symbol? What's the point to that?
All in all I found Ready to Wear disappointing and probably my least favorite of Altman's films.
Bruce Almighty (2003)
This is an odd movie; its values are strictly social conservative, but the story takes place against the backdrop of a large city television newsroom. Seem a little incongruous? Its even more so when you realize the primary actors are Jim Carrey, Morgan Freeman, and Jennifer Anniston. And the films style is essentially a slapstick comedy accentuating Carrey's patented rubber-faced, self-effacing schtick. Strange, yes, but a winning combination scoring an $80M opening weekend.
Big money maker or not, I found the movie unfunny and boring. The premise that God would select a failed TV newsman to replace Him while He took a vacation is just too absurd. Someone like the Marx Brothers could have had a field day with this premise, but you sure wouldn't have found them developing a maudlin, sappy conclusion like the one that Bruce Almighty serves up. After an hour and a half of mostly unfunny Jim Carrey pratfalls, the movie presents its "come to Jesus" revelatory moment and Bruce is saved (in the religious sense). After all the damage he'd done playing God, you'd have thought him more deserving of a one way ticket to Hell.
The Contender (2000)
The Contender is stealth propaganda, and laughably bad propaganda at that. Through the first half of the movie the viewer believes they're watching a political thriller. Joan Allen stars as Senator Laine Hanson, nominated to replace the recently deceased Vice President by President Jackson Evans played by Jeff Bridges. Republican Rep. Shelly Runyon, played by Gary Oldman, is a rival to President Evans and wants another politician nominated, a Southern Democratic. Rep. Runyon is going to fight Senator Hanson's nomination by any means at his disposal. This includes pictures of a 19-year old Hanson participating in a sex orgy at a college frat. The battle lines are drawn, and the gloves are off as both camps prepare for battle. It's good against evil.
That's okay. Moviemakers can make political pictures, take sides, and argue positions. I don't mind as long as they do it in the context of an honest and entertaining movie. The problem is that The Contender is neither honest nor entertaining; it's insulting.
During the first third of the movie it appears that it's point will be a condemnation of the personal attacks that mar and degrade our political system. But during the middle third the story line takes a sharp turn. Its focus narrows from the original good vs evil themes, and becomes distinctly partisan. By the final third, the message is reduced to a diatribe against all things conservative and Republican. During the movie's final scenes there are two breathless liberal soliloquies where heroic music builds to crescendo as the speakers stake noble positions. It's almost religious. Released just three weeks before the 2000 American elections I can see why Mr. Oldman wanted to disassociate himself from the movie. Personally I feel as I should have been paid to watch it, not vice versa.
Whale Rider (2002)
Pai is a 12-year old Maori girl living in a rural town on the coast of New Zealand. Her family has traditionally supplied the leaders for the local Maori, and her grandfather, Koro, has the responsibility of selecting and training the next one. The town is spiritually and physically deteriorating, the young men becoming lazy and hedonistic, forgetting the ancient and honorable Maori ways. Pai's mother and twin brother both died in childbirth, and Pai's father left shortly thereafter for Europe. Pai has no siblings. In desperation Koro widens his search to all the Maori village boys hoping to find the next leader. But Pai knows that it is she who has actually been chosen to lead the village back to the righteous path. But how can she convince her Grandfather of this? He firmly believes that teaching girls Maori leadership skills is taboo.
The casting is nothing short of perfect. Keisha Castle-Hughes plays Pai, and has an acting range rarely seen in children. In one scene she's acting the role of average kid, in another incredible nobility as she stands up for her convictions, and in another deep, tortured grief. I fervently hope she gets an Oscar nomination. Rawiri Paratene and Vicky Haughton as Koro and his wife also give excellent performances. Niki Caro's screenplay and direction infuse the story with the reality of small-town life, but also with the deep mysteries of the Maori people. In my opinion this is one of the best movies of 2003.
Two Family House (2000)
Buddy's repressed. A young Italian-American man living in Staten Island in 1956, he sees opportunity all around him. It's laying there waiting for him to pick it up and run with. Except for one major obstacle, his wife Estelle. She wants only for Buddy to find his narrow niche in the local community, with its dead-end job and familiar surroundings, and exist quietly in her idea of the American dream.
But it's not Buddy's vision. So Buddy perseveres, undercut at every turn by Estelle. He finally manages to buy a two-family house to turn into his dream; a bar on the first floor, his home on the second. The current occupants are a foul-mouthed white trash Irish immigrant family, the very young wife in a very pregnant way. When she gives birth to a child whose father is obviously black, the older husband abandons her. And from this point Buddy's life journey takes a remarkable turn.
Two Family House is a prototypical Indie film in all its positive aspects. It does very well with little budget, maximizing the contributions of cast and crew. The uplifting story is told without pandering or exploitation. The movie's not great, but it is effective, and most importantly, very enjoyable.
Alice et Martin (1998)
When we first meet Martin, he's the 12 year old illegitimate son sent to live with his father at the family estate. In the film's second scene, the now 19 year old Martin is fleeing the same estate. Literally. Running blindly into the countryside, we follow as he hides from imagined pursuers, subsisting (barely) on what he can scrounge, completely exposed to the elements. In a few days he's arrested while pilfering from a farmer, but his family bails him out. He doesn't return home, but makes his way to Paris where he asks to live with his older half-brother, Benjamin, and his roommate, Alice, a musician. They reluctantly agree to take him in.
Soon, due to luck and his good looks, Martin is a world-class male model earning tons of money. He's also successful at courting the older Alice, which causes conflicts with Benjamin. Not romantic conflict, Benjamin is gay, but professional. Martin is the family bastard, his father's child by his mistress. Benjamin and the other siblings are children by the legal mother. Martin is the outcaste, but now he's a great success, more so than any of the siblings, especially Benjamin.
But Martin is harboring a great secret, the reason that caused him to flee, and it's tearing him apart. The family refuses help; they don't air their dirty laundry in public, and they don't like Martin. Martin begins to go mad. Alice, now in deeply love with Martin, begins a quest to unlock Martin's hidden demons and exorcize them.
Enough said about the plot, I've spoiled about half the movie. Is this movie any good? It's not bad. The film is French, so, except for Juliette Binoche as Alice, none of the actors are recognizable to this American; but they are all very good. The direction by André Téchiné is also quite good. The story? It's an odd little downer of a story that I suspect doesn't resonate well with the middle classes. But anything with Juliette Binoche in it is worth a rental.
The Good Girl (2002)
Justine, ten-years married to her high school sweetheart, is stuck in a rut. She lives with her housepainter, stoner husband in their small hometown in Texas where she works as a clerk at the Retail Rodeo (a stand-in for Wal-Mart). Husband Phil is just fine with his life (who spends non-working hours stoned) but it's suffocating Justine. Her reaction to the situation is to begin a relationship with an 18-year old co-worker. She's initially attracted to him because he too is depressed about his hopeless existence. What she doesn't know is that he is also a deeply troubled young man. She finds that out soon enough as his part of the relationship becomes overly possessive, and the secret relationship begins to become public.
Jennifer Anniston plays Justine and proves that she possesses greater acting depth than we've seen in Friends. John C. Reilly as her husband and Tim Blake Nelson as his best friend really nail their characters. The weak link acting-wise is Jake Gyllenhaal as the troubled love interest whose performance seems one-dimensional. As his is a key character, this drags on the movie, but the others keep it afloat.
The Good Girl is a pretty-good movie. It was not good enough to garner award scrutiny, but is worth the price of a rental. It'll be interesting to see if Ms. Anniston continues to take non-comedic roles in movies such as this. I hope so.
Yin shi nan nu (1994)
Chu is the number one chef in Taipei, a master with no equal. Widowed, he lives comfortably with his three young-adult daughters. Each is a very independent woman, and each is very different from the other. And all three are on the verge of stretching their wings and going out in the world on their own. This poses dilemmas for all, and these personal trials are the focus of Ang Lee's movie; they're his story. Nothing overly dramatic, just modern urban people, successful people, coping and getting along.
The only difficulty I had with the film is that I'm not familiar with the actors; especially those playing the three daughters. Obviously they're all Chinese and speak Mandarin. The film is heavy into conversation so the viewer reads lots of sub-titles. I frequently lost the point of a conversation because I didn't realize who was talking; I was too busy reading.
It's a small complaint. On the plus side the movie delivers an ending. Often these 'slice of life' movies just end, there are no real plot elements to resolve and life goes on. Not here, Mr. Lee delivers an ending that will have you smiling after the Home Theater is darkened.
Breaking the Waves (1996)
Initially, this story about the marriage of young Scottish woman and a Scandinavian oil rig worker had my eyes glazing over. I was ready to hit the eject button about 20 minutes into the movie. But I held in there and slowly was drawn in to their lives, their environment, and the ghastly tragedy that confronts them.
Lars von Trier is a very patient storyteller, as well as being an eccentric movie maker. In Breaking the Waves, he slowly, very slowly unfolds his drama. The problem is; you have to pay careful attention, and this can be difficult. Von Trier's style, with its hand-held camera, lack of artificial lighting, grainy photography, and lingering close-ups can try the patience. The movie is also long, clocking in at about 21⁄2 hours. But if you see it through, the final half hour will blow your mind, and you will have seen one of the best (and most emotionally powerful) movies of 1996, maybe even the whole decade.
|
english
|
In times of depleting energy resources and increasing costs,JNU has a solution at hand. The administration has decided that all new buildings being constructed in the campus should have energy-saving mechanisms like rainwater harvesting and solar heaters. The university also plans to have its own water treatment plants to recycle the water used by the residents of JNU for domestic purposes.
JNU has a water scarcity problem,so it is important that such plans are made for water conservation, said Prof Rajendra Prasad,Rector I of the university. Talking about the planned water treatment plants,he said recycled water from those plants is known as grey water and can be used for horticulture and other non-drinking purposes.
We already have water harvesting systems in some of our buildings,while two buildings,including the Staff College have solar heaters. Now all new buildings will have these facilities, added Prasad.
The buildings fitted with rainwater harvesting systems store their accumulated water in the six check dams built inside the campus. According to a source,many changes were made in the proposed location of new buildings to make sure they did not block any of the tubes that transport the water to the dams.
Among the new buildings slated to come up by the end of this year inside the campus is the Koena Hostel for boys and girls,which will house more than 500 students. Next in line is the housing complex for guests and faculty.
Sunil Kumar,the Horticulture Officer said two to three buildings will share one water treatment plant. The whole Administrative block will have one treatment plant,while the cluster of new buildings will have one shared between them, he said.
While work on the plans has already started,the new buildings are expected to be ready in a years time.
|
english
|
package main
import (
"bufio"
"fmt"
"os"
"sort"
"sync"
"time"
"strings"
"github.com/oliverkofoed/dogo/commandtree"
"github.com/oliverkofoed/dogo/registry/resources/localhost"
"github.com/oliverkofoed/dogo/schema"
"github.com/oliverkofoed/dogo/term"
)
type tunnelState int
const (
tunnelStateIdle tunnelState = iota
tunnelStateConnecting
tunnelStateConnected
tunnelStateError
)
type dogoTunnelInfo struct {
state tunnelState
name string
resource *schema.Resource
getConnection func(l schema.Logger) (schema.ServerConnection, error)
localport int
remoteport int
remotehost string
remotehostTemplate schema.Template
tunnelstring string
err error
}
func (d *dogoTunnelInfo) SetProgress(progress float64) {}
func (d *dogoTunnelInfo) Logf(format string, args ...interface{}) {
if len(args) > 0 {
format = fmt.Sprintf(format, args)
}
d.tunnelstring = format
}
func (d *dogoTunnelInfo) Errf(format string, args ...interface{}) {
if len(args) > 0 {
format = fmt.Sprintf(format, args)
}
d.Err(fmt.Errorf(format))
}
func (d *dogoTunnelInfo) Err(err error) {
d.state = tunnelStateError
d.err = err
}
type sortByTunnelAndServer []*dogoTunnelInfo
func (x sortByTunnelAndServer) Len() int { return len(x) }
func (x sortByTunnelAndServer) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
func (x sortByTunnelAndServer) Less(i, j int) bool {
nameDiff := strings.Compare(x[i].name, x[j].name)
if nameDiff == 0 {
return strings.Compare(x[i].resource.Name, x[j].resource.Name) == -1
}
return nameDiff == -1
}
func dogoTunnel(config *schema.Config, environment *schema.Environment, query string) {
setTemplateGlobals(config, environment)
parts := strings.Split(query, ".")
tunnels := make([]*dogoTunnelInfo, 0, 10)
// grab the tunnel_offset, if specified in the config file
portOffset := 0
if offset, found := environment.Vars["tunnel_offset"]; found {
if i, ok := offset.(int); ok {
portOffset = i
} else {
fmt.Println(term.Red + fmt.Sprintf("tunnel_offset must be an integervalue. Got: %v (%T)", offset, offset) + term.Reset)
return
}
}
// build list of name, localport, remote port, server
usedTunnel := make(map[string]bool)
getStateMap := make(map[string][]*dogoTunnelInfo)
for _, res := range environment.Resources {
if server, ok := res.Resource.(schema.ServerResource); ok {
getConnection := func(s schema.ServerResource, res *schema.Resource) func(l schema.Logger) (schema.ServerConnection, error) {
var c schema.ServerConnection
var err error
var m sync.Mutex
return func(l schema.Logger) (schema.ServerConnection, error) {
m.Lock()
defer m.Unlock()
if err != nil {
return c, err
}
if c == nil {
// provision if required.
if res.Manager.Provision != nil {
err := res.Manager.Provision(res.ManagerGroup, res.Resource, &schema.PrefixLogger{Output: l, Prefix: "provision: "})
if err != nil {
return nil, err
}
}
// open connection
c, err = s.OpenConnection()
}
return c, err
}
}(server, res)
for packageName := range res.Packages {
pack := config.Packages[packageName]
for tunnelName, tunnel := range pack.Tunnels {
t := &dogoTunnelInfo{
name: tunnelName,
resource: res,
localport: tunnel.Port + portOffset,
remoteport: tunnel.Port,
remotehostTemplate: tunnel.Host,
getConnection: getConnection,
}
// try to get the tunnel host, if it fails, mark that we'll
// try to get the server state before opening any tunnels.
host, err := t.remotehostTemplate.Render(nil)
if err != nil {
getStateMap[res.Name] = append(getStateMap[res.Name], t)
}
t.remotehost = host
if len(parts) == 2 { // server.tunnel
if res.Name == parts[1] && tunnelName == parts[2] {
tunnels = append(tunnels, t)
}
} else if parts[0] == "*" { // all tunnels
tunnels = append(tunnels, t)
} else if parts[0] == "" { // one of each tunnel
if _, found := usedTunnel[tunnelName]; !found {
tunnels = append(tunnels, t)
usedTunnel[tunnelName] = true
}
} else if parts[0] == res.Name { // all tunnels on server
tunnels = append(tunnels, t)
} else if parts[0] == tunnelName { // start the tunnel for this server
tunnels = append(tunnels, t)
}
}
}
}
}
if len(tunnels) == 0 {
fmt.Println(term.Red + "no tunnels matched." + term.Reset)
return
}
// sort list of tunnel
sort.Sort(sortByTunnelAndServer(tunnels))
// get any state required by those tunnels.
if len(getStateMap) > 0 {
root := commandtree.NewRootCommand("Some tunnels require that we get state from remote servers")
for _, v := range getStateMap {
root.Add("Get state: "+environment.Name+"."+v[0].resource.Name, &dogoTunnelGetStateCommand{tunnels: v})
}
r := commandtree.NewRunner(root, 1)
go r.Run(nil)
if err := commandtree.ConsoleUI(root); err != nil {
return
}
}
// start a list of workers.
usedPort := make(map[int]bool)
usedPortLock := sync.Mutex{}
workChan := make(chan *dogoTunnelInfo, len(tunnels))
for i := 0; i != 1; i++ {
go func() {
for tunnel := range workChan {
tunnel.state = tunnelStateConnecting
// grab a connection
connection, err := tunnel.getConnection(tunnel)
if err != nil {
tunnel.err = err
tunnel.state = tunnelStateError
break
}
/*tunnelHost, err := tunnel.remotehost.Render(nil)
if err != nil {
// possibly because we don't have the state
}*/
for x := 0; true; x++ {
// after 80 tries, we're not going to find an avalible port
if x >= 80 {
tunnel.err = fmt.Errorf("Unable to listen. Last tried: %v. Last error: %v", tunnel.localport, tunnel.err)
tunnel.state = tunnelStateError
break
}
// find a port we haven't tried yet. (don't need to do this for localhost)
if _, local := tunnel.resource.Resource.(*localhost.Localhost); !local {
usedPortLock.Lock()
for {
if _, used := usedPort[tunnel.localport]; !used {
usedPort[tunnel.localport] = true
break
} else {
tunnel.localport++
}
}
usedPortLock.Unlock()
}
// try starting a tunnel
port, err := connection.StartTunnel(tunnel.localport, tunnel.remoteport, tunnel.remotehost, false)
if err != nil {
tunnel.localport++
tunnel.err = err
tunnel.state = tunnelStateError
continue
}
// everything is great!
tunnel.localport = port
tunnel.tunnelstring = fmt.Sprintf("127.0.0.1:%v", tunnel.localport)
tunnel.state = tunnelStateConnected
break
}
}
}()
}
// start the status printer
go printTunnelStatus(environment, tunnels)
// feed all the work into the workChan
for _, tunnel := range tunnels {
workChan <- tunnel
}
// wait for completion
reader := bufio.NewReader(os.Stdin)
_, _ = reader.ReadString('\n')
}
type dogoTunnelGetStateCommand struct {
commandtree.Command
tunnels []*dogoTunnelInfo
}
func (c *dogoTunnelGetStateCommand) Execute() {
t := c.tunnels[0]
connection, err := t.getConnection(c)
if err != nil {
c.Err(err)
return
}
_, _, success := getState(t.resource, connection, false, c, c)
if !success {
return
}
// expand templates
expandErrors := expandResourceTemplates(t.resource, config)
if len(expandErrors) > 0 {
for _, err := range expandErrors {
c.Err(err)
}
return
}
for _, t := range c.tunnels {
host, err := t.remotehostTemplate.Render(map[string]interface{}{
"self": t.resource.Data,
})
if err != nil {
c.Err(err)
return
}
t.remotehost = host
}
}
func printTunnelStatus(environment *schema.Environment, tunnels []*dogoTunnelInfo) {
spinIndex := 0
rewrite := false
for {
term.StartBuffer()
if rewrite {
term.MoveUp(4 + len(tunnels) + 2)
}
// pick spinner
spinIndex++
spinChar := string(commandtree.SpinnerCharacters[spinIndex%len(commandtree.SpinnerCharacters)])
// calculate width
maxLenTunnel := 0
maxLenServer := 0
maxLenStatus := 0
for _, t := range tunnels {
if len(t.name) > maxLenTunnel {
maxLenTunnel = len(t.name)
}
if len(t.resource.Name) > maxLenServer {
maxLenServer = len(t.resource.Name)
}
if len(t.tunnelstring) > maxLenStatus {
maxLenStatus = len(t.tunnelstring)
}
}
width := maxLenTunnel + maxLenServer + maxLenStatus
if width < 50 {
width = 50
}
// print header
term.Print(term.Bold + runChar(dashes, width) + term.Reset + "\n")
leftdashes := runChar(dashes, (width-27-len(environment.Name))/2)
rightdashes := leftdashes
if len(environment.Name)%2 == 0 {
rightdashes += "-"
}
term.Print(term.Bold + leftdashes + "[ tunnels to " + environment.Name + term.Bold + " environment ]" + rightdashes + term.Reset + "\n")
term.Print(term.Bold + runChar(dashes, width) + term.Reset + "\n")
col1 := maxLenTunnel + 5
col2 := maxLenServer + 5
col3 := maxLenStatus + 5
term.Print(term.Bold)
term.Print("tunnel")
term.Print(runChar(spaces, 2+col1-len("tunnel")))
term.Print("server")
term.Print(runChar(spaces, col2-len("server")))
term.Print(runChar(spaces, col3-len("status")))
term.Print("status")
term.Print(term.Reset + "\n")
allDone := true
for _, t := range tunnels {
// waiting, connecting. connected, or failed.
switch t.state {
case tunnelStateIdle:
term.Print(term.Reset)
term.Print(" ")
allDone = false
break
case tunnelStateConnecting:
term.Print(term.Yellow)
term.Print(spinChar)
term.Print(" ")
allDone = false
break
case tunnelStateConnected:
term.Print(term.Green)
term.Print("✓ ")
term.Print(term.Bold)
break
case tunnelStateError:
term.Print(term.Red)
term.Print("! ")
break
}
term.Print(t.name)
term.Print(runChar(spaces, col1-len(t.name)))
term.Print(t.resource.Name)
term.Print(runChar(spaces, col2-len(t.resource.Name)))
last := t.tunnelstring
if t.state == tunnelStateError && t.err != nil {
last = t.err.Error()
}
term.Print(runChar(spaces, col3-len(last)))
term.Print(last)
term.Print(term.Reset)
term.Print("\n")
}
term.Print(term.Bold + runChar(dashes, width) + term.Reset + "\n")
term.Print("(press enter to exit.)\n")
term.FlushBuffer(true)
time.Sleep(time.Millisecond * 200)
rewrite = true
if allDone {
return
}
}
}
|
go
|
{"status_id":8751416705286144,"text":"Al tolciciw wipan calo ra jenesnig muhokafa fovfesno lezkot cuoce pir olbodfeb boc. #zozzesu","user":{"user_id":7408465198710784,"name":"<NAME>","screen_name":"@peno","created_at":60453493,"followers_count":92,"friends_count":23,"favourites_count":21},"created_at":671569826,"favorite_count":71,"retweet_count":91,"entities":{"hashtags":[{"text":"#zozzesu","indices":[2,25]}]},"in_reply_to_status_id":6382903516725248}
|
json
|
#!/usr/bin/env python
import os.path
import config
import experiment_lib
import lightgbm as lgb
class LightGBMExperimentEarlyStopping(experiment_lib.ExperimentEarlyStopping):
def __init__(self, **kwargs):
super(LightGBMExperimentEarlyStopping, self).__init__(**kwargs)
def get_estimator(self, cat_cols):
return lgb.LGBMRegressor(
n_jobs=16,
n_estimators=9999
)
def fit_estimator(self, estimator, X_train, y_train, X_test, y_test, cat_cols, early_stopping_rounds):
estimator.fit(
X_train,
y_train,
categorical_feature=cat_cols,
eval_set=[(X_test, y_test)],
eval_metric='rmse',
early_stopping_rounds=early_stopping_rounds
)
self.best_estimator = estimator
self.best_iteration = estimator.best_iteration_
self.best_params = estimator.get_params()
self.best_score = estimator.best_score_
if __name__ == "__main__":
dataset_path = config.preprocessed_dataset_path
LightGBMExperimentEarlyStopping(
train_path=os.path.join(config.preprocessed_dataset_path, 'train'),
test_path=os.path.join(config.preprocessed_dataset_path, 'test'),
cd_path=os.path.join(config.preprocessed_dataset_path, 'cd'),
output_folder_path=os.path.join(config.training_output_path, 'LightGBMExperimentEarlyStopping'),
header_in_data=False
).run()
|
python
|
# -*- coding: utf-8 -*-
print("""***************
xxxxx Atmsine Hoşgeldiniz.
İşlemler;
1. Bakiye Sorgulama
2. Para Yatırma
3. Para Çekme
Kart iadesi için 'q' basın
***************
""")
bakiye = 4000
while True:
islem = input("İşlemi seçiniz: ")
if (islem == "q"):
print("Yine Bekleriz")
break
elif (islem == "1"):
print("Bakiyeniz: {} tl'dir".format(bakiye))
elif (islem == "2"):
miktar = int(input("Yatırmak istediğiniz miktarı giriniz: "))
bakiye += miktar
elif (islem == "3"):
miktar1 = int(input("Çekmek istediğiniz miktarı giriniz: "))
if (bakiye - miktar1 < 0):
print("Bakiye yeterli değil")
continue
bakiye -= miktar1
else:
print("Geçersiz İşlem")
|
python
|
package com.commsen.em.annotations;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Requires(value = "servlet.container", filter="(&(em.contract=servlet.container)(version=${version})(whiteboard=${whiteboard?c}))")
@Retention(RetentionPolicy.CLASS)
public @interface RequiresServletContainer {
String version() default "2.5";
boolean whiteboard() default true;
}
|
java
|
1 Tawamhã wa tô duré sabu, ĩbaihâ ĩsinhai ré hã. Danhib'apito simasisizém na ĩsãmra hã te tinhib'rata nhimire niwĩ tété. Ĩbaihâ nhinha hã, ĩ'ui'éré si'uiwa ré hã. Duré 7 na ĩhâiba hã ĩ'uptobzé hã siwasihu tõ da, ni'wa te te sõré tõ da.
2 Tawamhã wa tô duré sabu, hâiwa ãma 'Re ĩhâimana u'âsi mono ma romhuri'wa, ĩsimiwada'uri pire hã. Ãne te nasi anha, mreme 'rãihâ na:
— E 'wa hã danhipai u ĩwẽ uptabi hã, duré ĩwaihu'u pese uptabi hã te za 7 na ĩbaihâ nhinha uptobzé hã prub za'ra, ĩbaihâ te te sõ'a da. E 'wa hã te sada tihâiba. — Ãne te nasi anha.
3 Tane nherẽ, ni'wa hã sada hâimana õ di hâiwa ãma hã, ĩpru'wa da hã, te te pru wa, ĩbaihâ nho'a'wa da hã, duré te te ĩsõré da hã. Duré ti'ai ãma 're ĩdahâimana za'ra mono hã sada da'maihâimana õ di. Duré ti'ai 'rowi adâ 're ĩhâimana za'ra mono hã ni'wai õ di, sada hã. 4 Taha wa, wa tô sa'ẽtẽ aiwa'õ, 're ĩdahâimana za'ra mono hã sada da'maihâimana õ wa, ĩpru'wa da hã, duré te te ĩsabu da hã. 5 Tawamhã 24 na dama ĩpire norĩ te misi ĩ̱ma tinha, ãne:
— Aiwa'õ tõ. Ma'ãpé 'madâ'â. Õhõta te za, Zudaha nhihudu hã. Hu'u zérépa nhiptete nhipai u 're ĩhâimana mono ne, te õ hã danhipai u 're hâimana, danhib'apito na. Ta hã apito Dawihi nhihudu, za ĩsine pire na te te 're ĩda'ab'madâ'â mono da hã. Ta hã uburé dama waihu'u pese uptabi di. Ta hã tinhitob'ru norĩ nhimiromhuri wasété nhiptetezé hã ma tô tiwi uprosi za'ra. Taha wa, te õhõ si sada tihâiba, 7 na ĩ'uptobzé hã te te ĩprub za'ra da hã, duré ĩbaihâ ĩsinhai ré te te ĩsõ'a da hã. — Ãne ma ĩ̱ma 'maiwaihu'u, dama ĩpire norĩ hã.
6 Tawamhã wa tô 'madâ, Pone'ẽrebâ hã. Danhib'apito simasisizéb 'rata te za, maparane si'uiwa na ropoto na ĩhâiba norĩ wa'wab zama, duré 24 na dama ĩpire norĩ wa'wab zama. Da te dasiwi wĩrĩ wa, da te ĩwa'rézéb ré te za. 7 na ĩ'õmo ré hã, Pone'ẽrebâ hã. Duré 7 na ĩtõmo ré hã. 'Re ĩhâimana u'âsi mono pẽ'ẽzani hã danhipai u uburé marĩ na ĩwaihu'u pese zé, te wasu'u, ĩtõmo za'ra hã. 7 Tawamhã Pone'ẽrebâ hã ma tô ai'ré, danhib'apito simasisizém na ĩsãmra u, ĩbaihâ nhinha hã te te âri da, tinhimire niwĩ te te ĩtédé hã. Tawamhã Pone'ẽrebâ hã ma tô ti'â, ĩbaihâ nhinha hã. 8 Te te âri wamhã, ma tô maparane si'uiwa na ropoto na ĩhâiba norĩ hã Pone'ẽrebâi ma, hi'rãtitõ ana, 24 na dama ĩpire norĩ zama. Rowamremezéb ré ma tô tãma aiwẽ'ẽ za'ra, ẽtẽ'ubuzi pré oru 'manharĩ u'awi ne ré zama. U'awi 'remhã wedewa'u ĩsadaze, te ĩ're tiro'o za'ra. Taha nhizé hã hâimo haré ĩsizé hã, ta hã 'Re ĩhâimana u'âsi mono nhib'a'uwẽ norĩ, tãma 're ĩmreme zusi mono zé, te wasu'u. 9 Tawamhã ta norĩ hã te Pone'ẽrebâi ma tinho're za'ra, tinho're ĩtém na. Ãne te tãma tinho're za'ra:
“A hã ma tô dasiwi aiwĩrĩ ni. Ma tô dazada atâ. Dazada atâ'âzém na ma tô ĩdawa'â, dawasédé hã dama 're apari mono da, 'Re ĩhâimana u'âsi mono nhib'a'uwẽ oto 're danomro mono da.
Dapoto mono bâ a hã ma tô ĩda'awa'â, damreme sipo'o mono bâ 're ĩdahâimana za'ra mono hã. Danhipai u aiwẽ uptabi di, a hã. Aiwaihu'u pese uptabi di duré.
Taha wa, te aiwétési sada aihâiba, ĩbaihâ ĩsinhai ré hã âri da, duré ĩ'uptobzé hã prub za'ra da.
Ãne te tãma tinho're za'ra, tinho're ĩtém na.
11 Tawamhã wa tô duré 'madâ. Te 'madâ'â wamhã, hâiwa ãma romhuri'wa norĩ hã te nemo tizadawa'a'a. Ahâ uptabi di. Da te ĩsa'rata waihu'u õ. Danhib'apito simasisizé hã ma siwi uirĩ. Duré maparane si'uiwa na ropoto na ĩhâiba norĩ mana wawi te asõré, 24 na dama ĩpire za'ra norĩ hã ĩsisõré mana wawib zama. 12 Ãne te sõ're 'rãihâ na tizadawa'a'a:
Ãne ma tô sõ're 'rãihâ na ãma tizadawa'a'a, hâiwa ãma romhuri'wa norĩ hã.
13 Tawamhã wa tô duré wapa, uburé pese 'Re ĩhâimana u'âsi mono te te ĩda'apoto mono bâ, duré te te ĩ'apoto mono bâ, ĩhâiba ré mono hã, hâiwa ãma, duré ti'ai ãma, duré ti'ai 'rowi adâ 're ĩhâimana za'ra mono zéb ãma, duré â 'rowi uburé pese ĩhâiba ré mono hã. Uburé pese te simisutu dasiwazari tazadawa'a'a ni, 'Re ĩhâimana u'âsi mono te te ĩda'apoto mono bâ. Ãne te tazadawa'a'a ni:
Ãne te ãma tawata zahuré ni.
14 Tawamhã maparane si'uiwa na ropoto na ĩhâiba norĩ hã te ãma sõ're uze pese za'ra:
— Tô sena, tô sena. — Ãne te ãma sõ're uzei pese za'ra. Duré 24 na dama ĩpire za'ra norĩ hã ma tô hi'rãtitõ tãma ana, ãma wata za'ra da.
Ãne ĩ̱nhotõ 'rowim ne, te ĩ'azabui mono hã, duré te ĩ'awapari mono hã.
|
english
|
Red Hot Updates on Vijay’s Tollywood debut ‘Thalapathy66’!
It is well known by now that Thalapathy Vijay and Pooja Hegde are currently shooting for the biggie 'Beast' in Nelson Dilipkumar's direction. The filming is proceeding in full swing. On the other hand, Indiaglitz had already updated you that Thalapathy's bilingual film with director Vamsi Paidipally will mark his Telugu debut.
Tentatively called 'Thalapathy66', this pan-Indian project is bankrolled by producer Dil Raju. The shooting of the untitled flick is said to begin from February 2022 and the makers have planned to release 'Thalapathy 66' for the Diwali festival 2022. Amid the hot updates, the big buzz is that the launch of 'Thalapathy66' will happen by the coming Dussehra/Aayudha Pooja festival.
While Thala Ajith's 'Valimai' is locked to hit the big screens on Diwali 2021, the makers of Thalapathy Vijay's 66th film are planning to drop the film on Diwali 2022. Meanwhile, the Beast shooting is currently taking place at Gokulam Studios, Chennai and the team will move to Delhi in the future.
Follow us on Google News and stay updated with the latest!
|
english
|
Leicester winger Riyad Mahrez has agreed to join Arsenal, according to some outrageous claims in his homeland Algeria.
The PFA Player of the Year has been linked with a move to the Emirates and several reports last night suggested a deal between Mahrez and Arsenal has been done already.
Algerian newspaper Le Buteur claimed how Arsenal boss Arsene Wenger met with Mahrez and his agent.
Wenger’s main agenda in that meeting was to anyhow convince Mahrez to join the Gunners, it’s been claimed.
And Algerian news outlet also suggests Mahrez agreed with a deal with the north Londoners and is insistent on joining them.
Leicester, however, remains keen to tie down Mahrez to a new contract, with the club’s owner ready to offer the 25-year-old £100,000 per week.
But even that might not be enough to keep him at the club.
Despite Mahrez allegedly saying he wants to go to Arsenal, there is, as yet, no agreement between Leicester and the Gunners.
Mahrez netted 17 goals in Leicester’s memorable title-winning season.
But manager Claudio Ranieri has already witnessed one of his stars N’Golo Kante leave the club for Chelsea.
Top scorer Jamie Vardy rejected Arsenal and signed a new contract at Leicester but that might not stop Mahrez leaving the King Power.
Ranieri admitted at the weekend Mahrez has been distracted heavily by the rumours linking him with a move to Arsenal.
Meanwhile, Wenger and assistant manager Steve Bould were present at Leicester’s pre-season game against PSG.
Wenger was coy as always when asked whether he was interested in Mahrez but Leicester officials were frustrated to see him and his No.2 at the game.
|
english
|
<filename>src/main/resources/static/mas_json/2010_aaai_7671051127067918532.json
{"title": "Non-Negative Matrix Factorization with Constraints.", "fields": ["data point", "decomposition method", "matrix decomposition", "non negative matrix factorization", "dimensionality reduction"], "abstract": "Non-negative matrix factorization (NMF), as a useful decomposition method for multivariate data, has been widely used in pattern recognition, information retrieval and computer vision. NMF is an effective algorithm to find the latent structure of the data and leads to a parts-based representation. However, NMF is essentially an unsupervised method and can not make use of label information. In this paper, we propose a novel semi-supervised matrix decomposition method, called Constrained Non-negative Matrix Factorization, which takes the label information as additional constraints. Specifically, we require that the data points sharing the same label have the same coordinate in the new representation space. This way, the learned representations can have more discriminating power. We demonstrate the effectiveness of this novel algorithm through a set of evaluations on real world applications.", "citation": "Citations (35)", "departments": ["Zhejiang University", "Zhejiang University"], "authors": ["<NAME>.....http://dblp.org/pers/hd/l/Liu:Haifeng", "<NAME>.....http://dblp.org/pers/hd/w/Wu:Zhaohui"], "conf": "aaai", "year": "2010", "pages": -1}
|
json
|
package msplit;
import java.lang.reflect.Method;
import java.util.Arrays;
import org.junit.Assert;
import org.junit.Test;
import org.objectweb.asm.MethodTooLargeException;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
import static msplit.TestUtil.classAsm;
import static msplit.TestUtil.classWithComputedFramesAndMaxes;
import static msplit.TestUtil.compileMethod;
import static msplit.TestUtil.debug;
import static msplit.TestUtil.manualClassWithMethods;
import static msplit.TestUtil.trace;
import static msplit.Util.intConst;
public class SplitMethodTest {
@Test
public void testSplitMethod() throws Exception {
// Create a method too large that mutates a local over and over and then returns it
MethodNode method = new MethodNode(Opcodes.ACC_PUBLIC + Opcodes.ACC_STATIC, "testMethod",
Type.getMethodDescriptor(Type.INT_TYPE), null, null);
intConst(0).accept(method);
method.visitVarInsn(Opcodes.ISTORE, 0);
int expected = 0;
for (int i = 0; i < 13000; i++) {
expected += i;
// Load 0, add i, store
method.visitVarInsn(Opcodes.ILOAD, 0);
intConst(i).accept(method);
method.visitInsn(Opcodes.IADD);
method.visitVarInsn(Opcodes.ISTORE, 0);
}
method.visitVarInsn(Opcodes.ILOAD, 0);
method.visitInsn(Opcodes.IRETURN);
ClassNode cls = manualClassWithMethods(method);
// Compile it and make sure it's too large
try {
compileMethod(cls, method.name);
Assert.fail("Expected exception");
} catch (MethodTooLargeException e) {
Assert.assertEquals(method.name, e.getMethodName());
}
// Split it
SplitMethod.Result result = new SplitMethod(Opcodes.ASM6).split(cls.name, method);
if (debug) {
System.out.println("Orig method insn count: " + method.instructions.size());
System.out.println("Split off method insn count: " + result.splitOffMethod.instructions.size());
System.out.println("Trimmed method insn count: " + result.trimmedMethod.instructions.size());
}
if (trace) System.out.println("-----ORIG-----\n" + classAsm(cls) + "\n----------------");
// Replace methods and recalc frames/max
cls.methods = Arrays.asList(result.splitOffMethod, result.trimmedMethod);
cls = classWithComputedFramesAndMaxes(cls);
if (trace) System.out.println("-----NEW-----\n" + classAsm(cls) + "\n----------------");
// Replace methods and compile
Method trimmedMethod = compileMethod(cls, method.name);
Assert.assertEquals(expected, trimmedMethod.invoke(null));
}
}
|
java
|
<reponame>ZXSoftCN/fanfSystemApp<filename>app/configs/common.js
import { hashHistory } from 'react-router'
import { message } from 'antd'
import { loginByToken, staff, nav, login as loginApi, getBtns } from '@apis/common'
export function parseQueryString(url) {
const obj = {}
if (url.indexOf('?') !== -1) {
const str = url.split('?')[1]
const strs = str.split('&')
strs.map((item, i) => {
const arr = strs[i].split('=')
obj[arr[0]] = arr[1]
})
}
return obj
}
/* --------------验证ticket并获取用户信息和菜单信息 --------------*/
const _fetchLoginByTicket = async ticket => new Promise((resolve) => {
loginByToken({ ticket }, (response) => {
resolve(response.data)
}, (response) => {
const obj = parseQueryString(window.location.href)
console.log(obj)
if (obj.ticket || obj.mode) {
message.info('登录过期或服务不可用')
} else {
hashHistory.replace('/login')
}
})
})
const _fetchStaff = () => new Promise((resolve) => {
staff({}, (res) => {
const { data } = res
sessionStorage.setItem('userinfo', JSON.stringify(data))
resolve()
})
})
/* eslint-disable no-use-before-define */
export const isHasCurrentMenu = (allMenu, pathname) => compare(allMenu, pathname)
/* eslint-enable no-use-before-define */
const _fetchNav = pathname => new Promise((resolve) => {
// try {
// if (JSON.parse(sessionStorage.getItem('menu')).length > 0) {
// resolve()
// return
// }
// } catch (e) { e }
nav({}, (response) => {
const { list } = response.data
if (list.length === 0) {
message.info('该账户没有任何菜单权限,请联系管理员')
hashHistory.replace('/login')
// this.setState({ loading: false })
return
}
sessionStorage.setItem('menu', JSON.stringify(list))
// TODO:添加完菜单权限后,需要增加以下代码
// if (pathname !== '/' && !isHasCurrentMenu(list, pathname)) {
// if (process.env.NODE_ENV === 'production') {
// hashHistory.replace('/')
// }
// }
resolve()
})
})
/* 不管是否含有ticket参数都会在顶层组件中调用 */
export const validateTickit = async function validateTickit({ query, pathname }, callback) {
const { ticket } = query
if (ticket) {
const loginInfo = await _fetchLoginByTicket(ticket)
sessionStorage.setItem('token', loginInfo.token)
// sessionStorage.setItem('isLeftNavMini', false)
} else {
/**
* 仅存在于以下两种情况:
* 1. 未登录,退出到登录页面进行登录操作,在登录时获取菜单并存到sessionStorage中,再进行页面跳转,执行此代码时只需要请求staff信息
* 2. 登录过,刷新页面后执行此代码,认为上次登录时已经获取过菜单并已存到sessionStorage中,所以只需要请求staff信息
* (FIXME:网速缓慢的情况下,可能存在登录token拿到后,菜单数据返回前,直接输入url访问页面的情况,所以会导致获取不到菜单)
*/
// await _fetchStaff()
// if (typeof callback === 'function')callback()
/*
_fetchStaff()
_fetchNav(callback)
*/
}
const _a = _fetchStaff()
const _b = _fetchNav(pathname)
await _a
await _b
if (typeof callback === 'function') callback()
}
/* -----------------------------------------------------------------------------*/
/* -------------- 存储当前页面的菜单id到sessionStorage的menuId属性上 --------------*/
// 比较方法
function compare(children, pathname) {
for (let i = 0; i < children.length; i += 1) {
const item = children[i]
/* eslint-disable no-useless-escape */
const _resKey = `${item.resKey.replace(/[\$\.\?\+\^\[\]\(\)\{\}\|\\\/]/g, '\\$&').replace(/\*\*/g, '[\\w|\\W]+').replace(/\*/g, '[^\\/]+')}$`
/* eslint-enable no-useless-escape */
if (new RegExp(_resKey).test(pathname)) {
sessionStorage.setItem('menuId', item.id)
return true
} else if (item.children) {
if (compare(item.children, pathname)) return true
}
}
return false
}
// 获取菜单id
export const getMenuId = (navs, pathname) => {
if (navs && navs.length > 0) {
compare(navs, pathname)
}
}
/* -----------------------------------------------------------------------------*/
/* ------------------------- 登陆 -------------------------*/
export const login = (params, success, failure) => {
loginApi(params, (response) => {
sessionStorage.setItem('token', response.data.token)
localStorage.setItem('sessionStorage', JSON.stringify(sessionStorage))
// _fetchNav().then(() => { success() })
if (typeof success === 'function') success(response)
}, (response) => {
if (typeof failure === 'function') failure(response)
})
}
/* -------------------------------------------------------*/
// 获取按钮
export const fetchBtns = (component, cb) => {
getBtns({ id: sessionStorage.getItem('menuId') }, (res) => {
const result = {}
res.data.list.map((item) => {
result[item.resKey] = true
})
typeof (cb) === 'function' ? cb(result) : ''
})
}
// 进入路由的判断
export const isLogin = (nextState, replaceState) => {
if (nextState.location.query && nextState.location.query.token) { // 如果url自带token
sessionStorage.setItem('token', nextState.location.query.token)
}
if (nextState.location.query && nextState.location.query.key) { // 如果url自带key
sessionStorage.setItem('token', 'key')
}
const token = sessionStorage.getItem('token')
if (!token) { // 没有token,那就返回首页
replaceState('/login')
}
}
// 异步请求需要走redux的方式
export const createAjaxAction = (createdApi, startAction, endAction) => (request = {}, resolve, reject, config) => (dispatch) => {
if (startAction) dispatch(startAction({ req: request, res: {} }))
const _resolve = (response) => {
if (endAction) dispatch(endAction({ req: request, res: response }))
if (resolve) resolve(response)
}
return createdApi(request, _resolve, reject, config)
}
|
javascript
|
{"id": 22092, "name": "Dragon key", "qualified_name": "Dragon key (unobtainable item)", "examine": "An ancient key.", "members": true, "release_date": "2018-01-04", "quest": true, "weight": 0.001, "value": 1, "tradeable": false, "stackable": false, "noteable": false, "equipable": false, "tradeable_ge": false, "icon": "<KEY>", "wiki_url": "https://oldschool.runescape.wiki/w/Dragon_key_(unobtainable_item)"}
|
json
|
<gh_stars>10-100
{
"sn45.103:0.1": "Saṁyutta Nikāya 45 ",
"sn45.103:0.2": "10. Dutiyagaṅgāpeyyālavagga ",
"sn45.103:0.3": "103. Paṭhamapācīnaninnasutta ",
"sn45.103:1.1": "“Seyyathāpi, bhikkhave, gaṅgā nadī pācīnaninnā pācīnapoṇā pācīnapabbhārā; ",
"sn45.103:1.2": "evameva kho, bhikkhave, bhikkhu ariyaṁ aṭṭhaṅgikaṁ maggaṁ bhāvento ariyaṁ aṭṭhaṅgikaṁ maggaṁ bahulīkaronto nibbānaninno hoti nibbānapoṇo nibbānapabbhāro. ",
"sn45.103:1.3": "Kathañca, bhikkhave, bhikkhu ariyaṁ aṭṭhaṅgikaṁ maggaṁ bhāvento ariyaṁ aṭṭhaṅgikaṁ maggaṁ bahulīkaronto nibbānaninno hoti nibbānapoṇo nibbānapabbhāro? ",
"sn45.103:1.4": "Idha, bhikkhave, bhikkhu sammādiṭṭhiṁ bhāveti rāgavinayapariyosānaṁ dosavinayapariyosānaṁ mohavinayapariyosānaṁ …pe… sammāsamādhiṁ bhāveti rāgavinayapariyosānaṁ dosavinayapariyosānaṁ mohavinayapariyosānaṁ. ",
"sn45.103:1.5": "Evaṁ kho, bhikkhave, bhikkhu ariyaṁ aṭṭhaṅgikaṁ maggaṁ bhāvento ariyaṁ aṭṭhaṅgikaṁ maggaṁ bahulīkaronto nibbānaninno hoti nibbānapoṇo nibbānapabbhāro”ti. ",
"sn45.103:1.6": "Paṭhamaṁ. "
}
|
json
|
{"title": "Efficient sentiment correlation for large-scale demographics.", "fields": ["search engine indexing", "sentiment analysis", "exploit", "demographics", "social web"], "abstract": "Analyzing sentiments of demographic groups is becoming important for the Social Web, where millions of users provide opinions on a wide variety of content. While several approaches exist for mining sentiments from product reviews or micro-blogs, little attention has been devoted to aggregating and comparing extracted sentiments for different demographic groups over time, such as 'Students in Italy' or 'Teenagers in Europe'. This problem demands efficient and scalable methods for sentiment aggregation and correlation, which account for the evolution of sentiment values, sentiment bias, and other factors associated with the special characteristics of web data. We propose a scalable approach for sentiment indexing and aggregation that works on multiple time granularities and uses incrementally updateable data structures for online operation. Furthermore, we describe efficient methods for computing meaningful sentiment correlations, which exploit pruning based on demographics and use top-k correlations compression techniques. We present an extensive experimental evaluation with both synthetic and real datasets, demonstrating the effectiveness of our pruning techniques and the efficiency of our solution.", "citation": "Citations (9)", "year": "2013", "departments": ["University of Trento", "University of Trento", "Laboratoire d'I ... renoble, France"], "conf": "sigmod", "authors": ["<NAME>.....http://dblp.org/pers/hd/t/Tsytsarau:Mikalai", "Sihem Amer-Yahia.....http://dblp.org/pers/hd/a/Amer=Yahia:Sihem", "Themis Palpanas.....http://dblp.org/pers/hd/p/Palpanas:Themis"], "pages": 12}
|
json
|
After a low-scoring thriller in the first T20 International between India and Australia at Visakhapatnam, the second and final game at the Chinnaswamy Stadium in Bengaluru promises to be a run-feast according to a Karnataka State Cricket Association official said on Tuesday, PTI reported.
Though the Bengaluru wicket has slowed down over the years, the game is expected to be a high-scoring affair unlike the series opener, where Australia chased down 127 in the final ball of the innings.
During this time of the year, dew is also not expected to be a factor. “Around 180 should be a par score on this surface,” he added.
The last T20 International was played here in February 2017 when India beat England by 75 runs after amassing 202/6 batting first. India all-rounder Krunal Pandya too thinks the this track will be a batting friendly one.
There was a tinge of green on the surface a day before the game but in all probability, that will be shaved off by Wednesday. “I have not seen the wicket yet but it should be a lot more batting friendly than Vizag,” said Pandya.
However, Australian pacer Pat Cummins feels the pitch’s nature has changed considerably over the last couple of years. “It has been a funny wicket in the last couple of years. First time I came to Bangalore 7-8 years ago during the IPL, it was a 220-plus wicket. Over the years, it has slowed down.
“Vizag was low scoring but a great game. I loved the surface there. In T20s you prepare for yorkers, slower balls, but over there you knew good balls were going to be good enough. The ball felt like swinging a little bit in the end,” he added.
|
english
|
Han Solo : Chewie? Chewie, is that you?
Han Solo : Ch-Chewie! I can't see, pal. What's going on?
Han Solo : Luke? Luke's crazy! He can't even take care of himself, much less rescue anybody.
Han Solo : A Jedi Knight? Jeez, I'm out of it for a little while, everyone gets delusions of grandeur!
Han Solo : Who are you?
Princess Leia : Someone who loves you.
Han Solo : I'm sure Luke wasn't on that thing when it blew.
Princess Leia : He wasn't. I can feel it.
Han Solo : You love him,
Han Solo : don't you?
Princess Leia : Yes.
Han Solo : All right. I understand. Fine. When he comes back, I won't get in the way.
Princess Leia : Oh, Han, it's not like that at all.
Princess Leia : He's my brother.
Han Solo : Boba Fett? Boba Fett? Where?
C-3PO : His high exaltedness, the Great Jabba the Hutt, has decreed that you are to be terminated immediately.
Han Solo : Good, I hate long waits.
C-3PO : You will therefore be taken to the Dune Sea, and cast into the pit of Carkoon, the nesting place of the all-powerful Sarlaac.
Han Solo : Doesn't sound so bad.
C-3PO : In his belly you will find a new definition of pain and suffering as you are slowly digested over a thousand years.
Han Solo : On second thought, let's pass on that, huh?
Stormtrooper : Don't move!
Han Solo : I love you.
Princess Leia : [smiles] I know.
Han Solo : [to Chewie about the Ewoks] Well, short help is better than no help at all.
Han Solo : I have a really bad feeling about this.
Princess Leia : It only takes one to sound the alarm.
Han Solo : Then we'll do it real quiet-like.
Han Solo : Well, look at you! A General, huh?
Lando Calrissian : Someone must have told them all about my little maneuver at the Battle of Taanab.
Han Solo : Well, don't look at me, pal. I just said you were a fair pilot. I didn't know they were looking for somebody to lead this crazy attack.
Lando Calrissian : I'm surprised they didn't ask you to do it.
Han Solo : Well, who says they didn't? Only I ain't crazy.
Princess Leia : I... I can't tell you.
Han Solo : Could you tell Luke? Is that who you could tell?
Han Solo : [grunts angrily and starts to storm away, but stops and returns to Leia a moment later] I'm sorry.
Princess Leia : Hold me.
Luke : I'll meet you back at the fleet.
Princess Leia : Hurry. The Alliance should be assembled by now.
Luke : I will.
Han Solo : Hey, Luke, thanks. Thanks for coming after me. I owe you one.
C-3PO : He says the scouts are going to show us the quickest way to the shield generator.
Han Solo : Good. How far is it? Ask him.
Han Solo : We need some fresh supplies too.
Han Solo : Try and get our weapons back.
Han Solo : Hurry up, will ya? Haven't got all day!
Han Solo : [as Lando is being dragged down by Sarlaac] Chewie, give me the gun! Don't move, Lando!
Lando Calrissian : No, wait! I thought you were blind!
Han Solo : It's alright, I can see a lot better! Don't move!
Lando Calrissian : Up a little higher! Just a little higher!
Han Solo : [disguised as an Imperial] It's over, Commander. The rebels have been routed and they're fleeing into the woods. We need reinforcements to continue the pursuit.
C-3PO : Your Royal Highness.
Princess Leia : But these are my friends. 3PO, tell them they must be set free.
Han Solo : Somehow I got the feeling that didn't work very much.
Princess Leia : How is it?
Han Solo : I don't know. All I see is blowing sand!
Princess Leia : That's all any of us can see.
Han Solo : I guess I'm getting better then.
Luke : I'll see you back at the fleet.
Han Solo : Why don't you leave that crate and come with us? We're faster.
Luke : [shakes head] I have a promise to keep... to an old friend.
Han Solo : Hey kid!
Han Solo : Thanks for coming after me.
Luke : Think nothing of it.
Han Solo : I'm thinking... I owe you one.
Luke : Meet you back at the fleet.
Princess Leia : Hurry. The Alliance should be assembled by now.
Luke : I will.
Boushh : Just relax for a moment. You're free of the carbonite. Shh. You have hibernation sickness.
Han Solo : [shaking] I can't see.
Boushh : Your eyesight will return in time.
Han Solo : Where am I?
Boushh : Jabba's palace.
Han Solo : Who are you?
Princess Leia : Someone who loves you.
Han Solo : Leia!
Princess Leia : Hey, you awake?
Han Solo : [referring to the Millennium Falcon] Yeah. I just got a funny feeling, like I'm not gonna see her again.
Princess Leia : [smiles] Come on, General. Let's move.
Han Solo : Right.
C-3PO : General Solo, somebody's coming!
Han Solo : Luke!
Han Solo : Where's Leia?
Luke Skywalker : What? She didn't come back?
Han Solo : [sternly] I thought she was with you.
Luke Skywalker : We got seperated. We better go look for her.
Han Solo : [to a Rebel] Take the squad ahead. We'll meet at the shield generator at 0300.
Luke Skywalker : Come on, R2. We'll need your scanners.
C-3PO : Don't worry, Master Luke! We know what to do!
C-3PO : And *you* said it was pretty here.
|
english
|
<filename>README.md
# Typeorm naming strategy
[](https://github.com/chantouchsek/typeorm-naming-strategy/actions/workflows/test.yml)
[](https://npmjs.com/package/typeorm-naming-strategy)
[](LICENSE)
[](https://npmjs.com/package/typeorm-naming-strategy)
[](https://npmjs.com/package/typeorm-naming-strategy)
This package provides a few (one, at the moment) useful custom naming strategies. It alliterates the name of columns, relations, and other fields in the database.
For example, using the snake strategy, if you have a model like this:
```typescript
class User {
@Column()
createdAt;
}
```
In the DB the `createdAt` field will be `created_at`
## Naming strategies available
- Snake
## Installation
It's available as an [npm package](https://www.npmjs.com/package/typeorm-naming-strategy)
```sh
npm install typeorm-naming-strategy --save
```
Or using yarn
```sh
yarn add typeorm-naming-strategy
```
## Usage
```ts
import { createConnection } from 'typeorm';
// import { SnakeNamingStrategy } from 'typeorm-naming-strategy';
import SnakeNamingStrategy from 'typeorm-naming-strategy';
await createConnection({
...
namingStrategy: new SnakeNamingStrategy(), // Here you'r using the strategy!
});
```
Alternatively you can use it in combination with a `ormconfig.js`
```js
// Use require instead of import
// const SnakeNamingStrategy = require("typeorm-naming-strategy").SnakeNamingStrategy
const SnakeNamingStrategy = require("typeorm-naming-strategy")
module.exports = {
...
namingStrategy: new SnakeNamingStrategy(),
}
```
Or you can use it in combination with a `ormconfig.ts`
```ts
import SnakeNamingStrategy from 'typeorm-naming-strategy';
module.exports = {
...
namingStrategy: new SnakeNamingStrategy(),
}
```
|
markdown
|
{
"id": "table-freeze-column",
"description": "Flow main",
"defaultPage": "table-freeze-column-start",
"services": {},
"types": {},
"variables": {}
}
|
json
|
Deepika Padukone and Ranveer Singh who will be celebrating their fourth marriage anniversary on November 14, recently shelled out some major relationship goals that left their fans gushing. Deepika shared a short clip of Ranveer Singh showering kisses on her during a store launch in Delhi. Ranveer was seen sporting a printed jacket over a purple t-shirt as he blew kisses at the image of his wife during the launch.
Ranveer and Deepika dated for six years, before tying the knot on November 14, 2018 (Pic: Instagram/ deepikapadukone)
Bollywood power couple Ranveer Singh and Deepika Padukone shell out major relationship goals for everyone time and again. They are both loved by their fans and their relationship is celebrated and cherished by them by all. The couple, who is going to celebrate their fourth marriage anniversary soon, once again proved that they are as much in love now as when they first started dating.
While Deepika and Ranveer will celebrate their fourth marriage anniversary on November 14, the two recently shelled out a major relationship goal that left their fans gushing.
A few hours back, Deepika shared a short clip of Ranveer Singh showering kisses on her during a store launch in Delhi . In the clip, Ranveer can be seen sporting a printed jacket over a purple t-shirt as he blows kisses at the image of his wife during the launch.
Deepika and Ranveer will celebrate their fourth marriage anniversary on November 14 (Pic: Instagram/ deepikapadukone)
In another Instagram story, Deepika shared another pic and wrote, "We're all smiles too. "
Notably, Deepika and Ranveer's social media banter always manages to set the Internet on fire. Recently, Ranveer took to his Instagram Story to share a video of them together, in which she was seen playfully hitting him as he recorded her. He captioned the post "cutie" alongside a pink emoji.
These posts come at the wake of rumours online of the couple's separation. However, Deepika indirectly quashed all such reports of trouble in her marriage, confirming that all is indeed well with Ranveer duing Meghan Markle 's podcast. During the podcast, Deepika said Ranveer has been away for a week attending some music festival and that when he gets back, he will be happy to see her.
Ranveer and Deepika dated for six years, before tying the knot on November 14, 2018.
|
english
|
Panaji: Former managing editor of Tehelka Shoma Chaudhury arrived at a Goa court today to record her statement in the alleged rape case filed against the news weekly's founder-editor Tarun Tejpal.
Ms Chaudhury arrived from New Delhi in Goa last night and appeared before the Judicial Magistrate First Class Panaji today, where her statement would be recorded through the day.
Tarun Tejpal will also be produced in court later in the day as his six day remand in police custody expires.
Police are expected to seek extension of his custody for a week more.
Tejpal has been accused of allegedly raping a junior employee at a Goa resort last month.
|
english
|
package ur_rna.Utilities;
import ur_rna.Utilities.annotation.NotNull;
import ur_rna.Utilities.annotation.Nullable;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.List;
import static ur_rna.Utilities.PathTools.getCanonicalPath;
/**
* @author <NAME>
*
* A simple class used to load resources contained within a jar file
* in the class-path of the application (or alternatively from the file system).
*
* The purpose of this class is to make it so that client code can request
* a resource by name, without needing to specify the path
* of the actual resource file. I.e. the client code does not need to know the full
* path to the resources or the details of retrieving them.
*
* To achieve this, the ResourceLoader is initialized with a base directory and
* optionally one or more sub-directories to searched for each requested resource.
*
* The base directory can be specified using either an absolute path, or a Class.
* If the latter approach is used, the package name of the Class is used to
* determine the base directory by converting each dot (.) in the package name to a slash (/).
* In addition, a sub-directory can be appended after the package-derived path.
* E.g. the call {@code setBaseDir(my.package.MyClass.class, "resources") } would set the
* resource base directory to {@code my/package/resources}.
*
* TODO: Make it so that resources can be requested WITHOUT specifying the file extension. E.g. by associating one or more extensions with each sub-directory.
*
*/
public class ResourceLoader {
protected ClassLoader loader;
protected String baseDir;
protected List<String> searchDirs = new ArrayList<>();
protected static final char pathSep = '/'; //File.separatorChar
private List<String> allSearchDirs;
public ResourceLoader() { this("resources/"); }
public ResourceLoader(String resourceBaseDir) {
setBaseDir(resourceBaseDir);
setLoader(null);
}
public ResourceLoader(String resourceBaseDir, ClassLoader loader) {
this(resourceBaseDir);
setLoader(loader);
}
/**
* Create a new ResourceLoader and set its resource directory based on the
* package name of the specified class by converting each dot (.) in the package
* name to a slash (/). If sub-directory is also specified, it will be appended to
* the package-derived directory.
* E.g. {@code ResourceLoader(my.package.MyClass.class, "resources") would set the
* resource base directory to {@code my/package/resources}.
*
* @param resourcePeerClass The Class from which to obtain the package name.
* @param pathRelativeToClassPackage This specifies a sub-directory relative to the
* package-derived directory from which resources can be obtained. (This can be
* null or empty, in which case resources will be served directly from the
* package-derived directory).
*/
public ResourceLoader(Class resourcePeerClass, String pathRelativeToClassPackage) {
this(getDirFromPackage(resourcePeerClass, pathRelativeToClassPackage));
}
public void setLoader(@Nullable ClassLoader c) {
if (c == null)
loader = ClassLoader.getSystemClassLoader();
else
loader = c;
}
// public void setLoaderFrom(@NotNull Class<?> c) {
// if (c == null) throw new NullPointerException("Class cannot be null.");
// setLoader(c.getClassLoader());
// }
// public void setLoaderFrom(@NotNull Object o) {
// if (o == null) throw new NullPointerException("Object cannot be null.");
// setLoaderFrom(o.getClass());
// }
public void setBaseDir(String pathRelativeToClassPath) {
baseDir = pathRelativeToClassPath;
if (baseDir == null)
baseDir = "";
else {
baseDir = getCanonicalPath(pathRelativeToClassPath, true, false, true, true);
if (baseDir.equals("/")) baseDir = "";
}
}
/**
* Set the resource directory based on the package name of the specified class
* by converting each dot (.) in the package name to a slash (/). If a non-empty
* sub-directory is also specified, it will be appended to the package-derived
* directory.
* E.g. {@code ResourceLoader(my.package.MyClass.class, "resources") would set the
* resource base directory to {@code my/package/resources}.
*
* @param resourcePeerClass The Class from which to obtain the package name.
* @param pathRelativeToClassPackage This specifies a sub-directory relative to the
* package-derived directory from which resources can be obtained. (This can be
* null or empty, in which case resources will be served directly from the
* package-derived directory).
*/
public void setBaseDir(@NotNull Class<?> resourcePeerClass, String pathRelativeToClassPackage) {
setBaseDir(getDirFromPackage(resourcePeerClass, pathRelativeToClassPackage));
}
// public void setBaseDir(@NotNull Object obj, String pathRelativeToClassPackage) {
// setBaseDir(obj.getClass(), pathRelativeToClassPackage);
// }
public static String getDirFromPackage(@NotNull Class<?> c, String relativeSubDir) {
return getDirFromPackage(c.getPackage(), relativeSubDir);
}
public static String getDirFromPackage(@NotNull Package p, String relativeSubDir) {
String path = p.getName().replace('.', pathSep);
if (relativeSubDir != null && relativeSubDir.length() != 0)
path += pathSep + relativeSubDir;
return path;
}
public String getBaseDir() {
return baseDir;
}
/**
* Add a sub-directory (relative to the resource base directory) that will be
* searched to find requested resources.
* @param dir The subdirectory to add. If the directory starts with a slash (/)
* it indicates that it is an absolute directory instead of being
* relative to the resource base directory.
*/
public void addSearchDir(String dir) {
searchDirs.add(getCanonicalPath(dir, true, false, false, true));
}
/**
* Add a list of sub-directories (relative to the resource base directory) that will be
* searched to find requested resources.
* @param dirs A list of subdirectories to add. If a directory starts with a slash (/)
* it indicates that it is an absolute directory instead of being
* relative to the resource base directory.
*/
public void addSearchDirs(String... dirs) {
for(String s : dirs)
addSearchDir(s);
}
public List<String> getSearchDirs() { return searchDirs; }
/**
* Searches for the specified resource in all search directories and returns either
* an InputStream (if the resource is found) or null (if it cannot be found).
* @param resourceName The name of the resource to find.
* @return An InputStream representing the resource if it is found, or null otherwise.
*/
public InputStream tryGetStream(String resourceName) {
String path = getResourceLocation(resourceName);
if (path == null)
return null;
return loader.getResourceAsStream(path);
}
/**
* Searches for the specified resource in all search directories and returns an
* an InputStream representing the resource.
* @param resourceName The name of the resource to find.
* @return An InputStream representing the resource if it is found.
* @throws IOException - The specified resource was not found or could not be loaded.
*/
public InputStream getStream(String resourceName) throws IOException {
return getStream(resourceName, false);
}
public InputStream getStream(String resourceName, boolean ignoreMissing)
throws IOException {
InputStream rs = tryGetStream(resourceName);
if (rs == null) {
if (ignoreMissing)
return null;
throw createNotFoundException(resourceName);
}
return rs;
}
// public boolean testResourceDir() {
// return loader.getResource(baseDir) != null;
// }
//
// public boolean testResourceDir(String testDir) {
// return loader.getResource(testDir) != null;
// }
// public void verifyResourceDir() throws IOException {
// folderVerified = testResourceDir();
// if (!folderVerified) {
//
//
// StringBuilder sb = new StringBuilder();
//
//
// URL[] urls = ((URLClassLoader)loader).getURLs();
//
// String base = urls[0].toString();
// String[] paths = new String[] {
// base,
// base + "/",
// base + "/resources",
// base + "/ur_rna",
// "/resources",
// "/ur_rna",
// "/",
// "resources",
// "ur_rna",
// "",
// "ur_rna/RNAstructureUI/resources/images/Draw.gif",
// "/ur_rna/RNAstructureUI/resources/images/Draw.gif",
// "RNAstructureUI/resources/images/Draw.gif",
// "/RNAstructureUI/resources/images/Draw.gif",
// "resources/images/Draw.gif",
// "/resources/images/Draw.gif",
// "ur_rna/RNAstructureUI/resources/images/*.gif",
// "ur_rna/RNAstructureUI/resources/images/*.",
// "ur_rna/RNAstructureUI/resources/images/*.*",
// "ur_rna/RNAstructureUI/resources/images/*",
// "ur_rna/RNAstructureUI/resources/images/.",
// "ur_rna/RNAstructureUI/resources/images/./",
// "ur_rna/RNAstructureUI/resources/images/./Draw.gif"
// };
// for (String s : paths) {
// Object dir = loader.getResource(s);
// if (dir == null)
// System.out.println("invalid resource dir: " + s);
// else
// System.out.println("!! RESOURCE: " + s + " ==> " + ObjTools.toDisplayString(dir));
// }
//
// sb.append("Class paths searched for resources: \n");
// for (URL u : urls)
// sb.append('\t').append(u.toString()).append('\n');
// AppLog.getDefault().warn(sb.toString());
// throw new IOException("The application resources folder is missing. Expected location (relative to any path listed in the classPath): " + baseDir);
// }
// }
// public InputStream getFirstStream(String... alternatePaths) throws IOException {
// if (!folderVerified) verifyResourceDir();
// for (String s : alternatePaths) {
// InputStream ss = getStream(s, true);
// if (ss != null) return ss;
// }
// throw createNotFoundException(String.join(" or ", alternatePaths));
// }
/**
* Returns the full path to a resource if it is found, or null otherwise.
*/
public String getResourceLocation(String resourceName) {
String path = baseDir + resourceName;
if (loader.getResource(path) != null) return path;
for (String subDir : searchDirs) {
if (subDir.startsWith("/"))
path = subDir + resourceName;
else
path = baseDir + subDir + resourceName;
if (loader.getResource(path) != null) return path;
}
return null; //not found
}
private static IOException createNotFoundException(String path) {
return new IOException(String.format("Resource not found: %s.", path));
}
public List<String> getAllSearchDirs() {
ArrayList<String> list = new ArrayList<>();
URL[] urls = ((URLClassLoader)loader).getURLs();
for (URL u : urls) {
String base = u.toString();
if (base.endsWith(".jar"))
base += "!";
else if (!(base.endsWith("/")||base.endsWith(".jar!")))
base += "/";
list.add(base + baseDir);
for(String subDir : searchDirs) {
if (subDir.startsWith("/"))
list.add(base + subDir);
else
list.add(base + baseDir + subDir);
}
}
return list;
}
/**
* Determine whether the specified resource exists.
* @param resourceName The resource to locate.
* @return True if the resource could be found in one of the search directories or false otherwise.
*/
public boolean hasResource(final String resourceName) {
return getResourceLocation(resourceName) != null;
}
// private static String getSearchList(String path) {
// StringBuilder sb = new StringBuilder();
// for (String sub : _searchPaths) {
// Path full = Paths.get(sub, path);
// if (sb.length() != 0)
// sb.append(", ");
// sb.append(full.toString());
// }
// return sb.toString();
// }
// private static String findResource(String path) {
// for (String sub : _searchPaths) {
// String full = Paths.get(sub, path).toString();
// if (loader.getResource(full) != null)
// return full;
// }
// return null;
// }
// public InputStream getImage(String name, boolean ignoreMissing) throws IOException {
// try {
// return getFirstStream(imagesSubFolder + pathSep + name, name); //First try the images folder, then the name itself.
// } catch (IOException ex) {
// if (!ignoreMissing)
// throw ex;
// }
// return null;
// }
// public static java.net.URL getResPath(String name) {
// java.net.URL s = loader.getResource(prependPath + name);
// return s;
// }
}
|
java
|
Speaking at a government program in West Bengal’s Alipurduar, West Bengal Chief Minister Mamata Banerjee slammed the central government over several issues.
By Anupam Mishra: West Bengal Chief Minister Mamata Banerjee hit out at the Centre for having Prime Minister Narendra Modi’s face on every new scheme it launches.
Speaking at a government program in West Bengal’s Alipurduar, Mamata Banerjee stated, “Everywhere you will see one picture. He (PM Modi) has given ration, he has given house, and he has given food. If someone dies, his face should be there too. "
"Pictures do not speak everything. Pictures deserve a man who is praised and loved,” she added.
Mamata Banerjee also accused the central government of stopping the OBC scholarship money. “We have 17 per cent reservation in OBC in West Bengal. The OBC students used to get Rs 800 scholarship (per month), but the Centre has stopped it,” she said.
Mamata Banerjee also accused the Centre of not sharing with the state its tax share. “The state government does not collect tax, the central government does. And we are supposed to get 60 per cent from it, but we are not getting it. Rather, we are being raided. I want to see how long it lasts. I will not beg before you,” said the West Bengal CM.
“They have also not given Bengal the ‘aawaas yojna’ money. We have built 11 lakh houses. They did not even repay that money,” she added.
The Trinamool Congress (TMC) supremo also asked why so many central teams were being sent to West Bengal.
“Everyday they send central teams. . . Why are you not sending a central team to Delhi, where a girl was killed after she was dragged by a car for around 12km? Why not send central teams to Gujarat, Uttar Pradesh or Assam? Here, they will send central probe agencies even if an insect bites a BJP leader. If one fires a chocolate bomb, even then they will send central teams," said Mamata Banerjee.
“If you think every year you will be in Delhi and just before elections you will send teams to West Bengal and distribute a few books, you will call it funding. We won’t take it. Who are you? " she added.
|
english
|
The Seattle Mariners are ready to meet the Atlanta Braves for a three-game series. This is a battle between the American League West and the National League East. Interestingly, both teams are placed second in their respective divisions.
The Mariners are enjoying being second in the AL west. A decent home (36-30) and even better away (41-30) record are what is keeping them in a comfortable spot. However, they lost their last game to the Chicago White Sox. Nevertheless, Seattle is enjoying a magnificent 8-2 run at the moment.
Ahead of the Mariners are the Houston Astros, who lead the division. If the Mariners continue to play the way they have been, they can give the Braves a really tough time.
There is not much to say about the Braves. The World Series champions are having a solid season yet again. They have a fantastic, well-balanced team with great hitters and pitchers. Atlanta is also second in their division but much closer to the leaders, the New York Mets. With only a handful of games remaining in the season, we might see the Braves secure the top position.
This three-game series will surely be interesting to watch. Both teams are enjoying a terrific run at the moment. All that is left now is to continue with similar performances and finish the season on a high note. Both teams are strong, so expect an evenly contested game.
Odds slightly favor the Braves for Game 1.
Veteran Charlie Morton is ready to pitch for the Braves in Game 1. The 38-year-old righty has witnessed everything the game offers. In the 26 games Charlie has played this season, he has been excellent. Although his 4.01 ERA is little on the high side, he makes up for it with strikeouts. In the last five games, Morton has managed an incredible 39 strikeouts.
Game 1 between the Seattle Mariners and the Atlanta Braves is a close call. The Braves are slight favorites because of their overall success. They are one of the toughest nuts to crack, and it is never easy to take them down. Expect the game to be solid and full of fire.
|
english
|
Toronto: New smartphone apps aim to solve the problem of keyboards causing aching fingers or auto-correct resulting in embarrassing blunders.
The apps replace QWERTY keyboards with alternatives designed to provide better auto-correct and more seamless typing.
Minuum, which launched for the iPhone and is available for Android devices, converts the keyboard into a single staggered line of characters and learns users' typing habits to predict what they will type next.
"Your fingers are very large relative to the size of your screen, so the first thing we do is assume that everything you type is sloppy and that you're making mistakes all the time," said Will Walmsley, co-founder and chief executive officer of Toronto-based Whirlscape, which created the app.
The app's algorithms sense the general area that users are typing to predict the word they intend to type, and then provides a list of 10 options.
Walmsley said compressing the keyboard also gives users more screen space and a familiar way of typing without needing to move their fingers up and down.
The app, which costs $1. 99 on iPhone and $3. 99 on Android, is available worldwide in English. Android users can also get the app in Spanish, French, German, Dutch, Italian and Russian.
Swype, which launched on the iPhone and is available for Android, Symbian and Windows phones, lets people glide their fingers over a character instead of tapping. As users glide their fingers across the touchscreen keyboard, algorithms predict the word they intend to type based on the keys their fingers cross.
Aaron Sheedy, vice president of mobile, text and speech at Burlington, Massachusetts-based Nuance, which created the app, says it is a more natural function than traditional typing.
"The organic nature of touchscreens is to swipe and glide. But as soon we open the keyboard, we have to grab both our hands and put our thumbs in an unnatural position to start typing away," he said.
The app's predictive algorithms learn a user's language habits over time, including proper nouns that often cause trouble for auto-correction algorithms.
"Our goal is to get the keyboard to understand your words and how you write," Sheedy said of Swype, which costs 99 cents on the iPhone.
Other popular keyboard apps include SwiftKey and TouchPal, free for iOS and Android, and GIF Keyboard for the iPhone.
Although Android users have been able to replace their keyboards with alternatives, Apple has only recently allowed its users to do so.
Craig Palli, chief strategy officer at Boston-based Fiksu, believes it is a move many iPhone users have been awaiting.
"The biggest complaint among Android fans for years about the iPhone was that it didn't support Swype-like functionality, which is a highly efficient means of inputting information," said Palli. (This story has not been edited by News18 staff and is published from a syndicated news agency feed - Reuters)
|
english
|
Community Resources/Grants Strategy Relaunch 2020-2021/How will this affect me?
The new Grants Strategy has been launched. See Grants:Start.
How will this affect me?
How will this process and changes to our current grant programs affect you or your organization? Below, you will find some guidance on what to expect. This guidance is split into two parts:
An important goal in this transition process is to ensure that you understand how you will be able to apply for and receive funding, how this transition will affect your current grants, and what new opportunities and resources will be available to you. Furthermore, because this transition process uses an iterative approach, we are open to and expect to make adjustments to the proposal to support your needs.
For each proposed grant program, we provide a conceptual framework and initial guidance related to what needs the funding will support:
- Scope of Proposals: What kinds of programmatic work will this grant program support?
- Considerations: An overview of initial concepts for each grant program.
- Relation to current grant program: How does this relate to the Wikimedia Foundation’s current grant programs?
Most current grantees would fall into this program, which will distribute the largest portion of grants funds, estimated at least 80% of the grants budget. We plan to clarify pathways for growth for those who desire them, including opportunities for funding staff and capacity building. We will have a proactive strategy for inviting new and diverse communities into the movement.
|Short-term project and program activities, such as local edit-a-thons, contests, and workshops.
This program will help amplify and grow the network in emerging communities by working with mission-aligned organizations. It is estimated that this would make up approximately 10% of the overall grants budget. This is primarily a new category of grant funding, although a few current Project Grant recipients from mission-aligned organizations would fall into it. We will work closely with communities to adapt the program to their contexts.
|Increase local awareness and readership through collaboration with mission-aligned organizations in emerging communities.
Software and research grantees funded through the current Project Grants program would be moved into a dedicated new program focused on technical grants. This will allow for more coherent and tailored support for technical grantees. The scope of this new program will be clearly defined, with specific criteria to be established. The budget for this program focus will modestly increase from current spending levels, at approximately 10% of the overall grants budget.
We are fully committed to the idea of decentralization and power sharing through participatory decision-making processes. We will review our eligibility criteria to determine what needs to be maintained (such as good community standing and commitment to the Universal Code of Conduct (UCOC), and what can become more flexible. To increase power sharing, we want to work towards guiding principles for grant programs that allow committees the flexibility needed to adapt to the realistic and adapted needs of community members to achieve their goals.
The strategic direction moves us towards a regional focus. Regional and thematic committees will be created that aim to account for the full complexities of the world and the movement. And that recognizes the diversity in programming, cultures and languages within regions and globally. Committee composition will be a key conversation during the implementation phase.
We will request an overall increase in the available budget based on the estimated needs to support the proposed strategy in its first year. We do not have the exact budget yet, but we are working on a request this quarter as we enter the Foundation’s annual planning process.
We have a strong commitment to equitable funding distribution. We will increase investment in emerging communities. We will make access to funding more flexible across all programs by adopting a less conservative risk policy.
|
english
|
<filename>BYSJ_GUI/test.py
import cv2
import argparse
ap = argparse.ArgumentParser(description="python part")
input = ap.add_mutually_exclusive_group()
input.add_argument("-f","--file",type=str,help="input file path",default="default")
input.add_argument("--folder",type=str,help="input folder path",default="default")
arg = ap.parse_args()
filePath = arg.file
folderPath = arg.folder
if filePath != "default":
print(filePath)
#img = cv2.imread(filePath)
#cv2.namedWindow("win",cv2.WINDOW_AUTOSIZE)
#cv2.imshow("win",img)
#cv2.waitKey(500)
#cv2.destroyAllWindows()
print("----")
elif folderPath != "default":
pass
else:
print("No Input !")
|
python
|
"""Solr Tests"""
import os
import pytest
from hamcrest import contains_string, assert_that
# pylint: disable=redefined-outer-name
@pytest.fixture()
def get_ansible_vars(host):
"""Define get_ansible_vars"""
java_role = "file=../../../java/vars/main.yml name=java_role"
common_vars = "file=../../../common/vars/main.yml name=common_vars"
common_defaults = "file=../../../common/defaults/main.yml name=common_defaults"
common_hosts = "file=../../../common/defaults/main.yml name=common_hosts"
search_services = "file=../../vars/main.yml name=search_services"
ansible_vars = host.ansible("include_vars", java_role)["ansible_facts"]["java_role"]
ansible_vars.update(host.ansible("include_vars", java_role)["ansible_facts"]["java_role"])
ansible_vars.update(host.ansible("include_vars", common_vars)["ansible_facts"]["common_vars"])
ansible_vars.update(host.ansible("include_vars", common_hosts)["ansible_facts"]["common_hosts"])
ansible_vars.update(host.ansible("include_vars", common_defaults)["ansible_facts"]["common_defaults"])
ansible_vars.update(host.ansible("include_vars", search_services)["ansible_facts"]["search_services"])
return ansible_vars
test_host = os.environ.get('TEST_HOST')
def test_solr_log_exists(host, get_ansible_vars):
"Check that solr log"
assert_that(host.file("{}/solr.log".format(get_ansible_vars["logs_folder"])).exists, get_ansible_vars["logs_folder"])
@pytest.mark.parametrize("svc", ["alfresco-search"])
def test_search_service_running_and_enabled(host, svc):
"""Check alfresco-search service"""
alfresco_search = host.service(svc)
assert_that(alfresco_search.is_running)
assert_that(alfresco_search.is_enabled)
def test_solr_stats_is_accesible(host, get_ansible_vars):
"""Check that SOLR creates the alfresco and archive cores"""
alfresco_core_command = host.run("curl -iL http://{}:8983/solr/#/~cores/alfresco".format(test_host))
archive_core_command = host.run("curl -iL http://{}:8983/solr/#/~cores/archive".format(test_host))
assert_that(alfresco_core_command.stdout, contains_string("HTTP/1.1 200"))
assert_that(archive_core_command.stdout, contains_string("HTTP/1.1 200"))
def test_environment_jvm_opts(host, get_ansible_vars):
"Check that overwritten JVM_OPTS are taken into consideration"
pid = host.run("/opt/openjdk*/bin/jps -lV | grep start.jar | awk '{print $1}'")
process_map = host.run("/opt/openjdk*/bin/jhsdb jmap --heap --pid {}".format(pid.stdout))
assert_that(process_map.stdout, contains_string("MaxHeapSize = 943718400 (900.0MB)"))
|
python
|
from __future__ import print_function
import re
from fabric.api import hide
from six.moves.urllib.request import urlopen
from burlap.constants import *
from burlap import ContainerSatchel
from burlap.decorators import task
def _to_int(val):
try:
return int(val)
except ValueError:
return val
DOWNLOAD_LINK_PATTERN = re.compile(r'http[s]{0,1}://[^/]+/vagrant/[0-9\.]+/vagrant[^"]+')
class VagrantSatchel(ContainerSatchel):
name = 'vagrant'
def set_defaults(self):
self.env.box = '?'
self.env.provider = '?'
self.env.shell_command = 'vagrant ssh'
self.env.download_url = 'https://www.vagrantup.com/downloads.html'
def ssh_config(self, name=''):
"""
Get the SSH parameters for connecting to a vagrant VM.
"""
r = self.local_renderer
with self.settings(hide('running')):
output = r.local('vagrant ssh-config %s' % name, capture=True)
config = {}
for line in output.splitlines()[1:]:
key, value = line.strip().split(' ', 2)
config[key] = value
return config
def _get_settings(self, config):
settings = {}
user = config['User']
hostname = config['HostName']
port = config['Port']
# Build host string
host_string = "%s@%s:%s" % (user, hostname, port)
settings['user'] = user
settings['hosts'] = [host_string]
settings['host_string'] = host_string
# Strip leading and trailing double quotes introduced by vagrant 1.1
settings['key_filename'] = config['IdentityFile'].strip('"')
settings['forward_agent'] = (config.get('ForwardAgent', 'no') == 'yes')
settings['disable_known_hosts'] = True
return settings
@task
def version(self):
"""
Get the Vagrant version.
"""
r = self.local_renderer
with self.settings(hide('running', 'warnings'), warn_only=True):
res = r.local('vagrant --version', capture=True)
if res.failed:
return None
line = res.splitlines()[-1]
version = re.match(r'Vagrant (?:v(?:ersion )?)?(.*)', line).group(1)
return tuple(_to_int(part) for part in version.split('.'))
@task
def setup(self, name=''):
r = self.local_renderer
_settings = self._get_settings(self.ssh_config(name=name))
if self.verbose:
print(_settings)
r.genv.update(_settings)
@task
def init(self):
r = self.local_renderer
r.local('vagrant init {box}')
@task
def up(self):
r = self.local_renderer
r.local('vagrant up --provider={provider}')
@task
def shell(self):
r = self.local_renderer
self.setup()
r.local(r.env.shell_command)
@task
def destroy(self):
r = self.local_renderer
r.local('vagrant destroy')
@task
def upload(self, src, dst=None):
r = self.local_renderer
r.put(local_path=src, remote_path=dst)
#http://serverfault.com/a/758017/41252
@task
def ssh(self):
r = self.local_renderer
self.setup()
hostname, port = r.genv.host_string.split('@')[-1].split(':')
r.local((
'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no '
'-i %s %s@%s -p %s') % (r.genv.key_filename, r.genv.user, hostname, port))
def _settings_dict(self, config):
settings = {}
user = config['User']
hostname = config['HostName']
port = config['Port']
# Build host string
host_string = "%s@%s:%s" % (user, hostname, port)
settings['user'] = user
settings['hosts'] = [host_string]
settings['host_string'] = host_string
# Strip leading and trailing double quotes introduced by vagrant 1.1
settings['key_filename'] = config['IdentityFile'].strip('"')
settings['forward_agent'] = (config.get('ForwardAgent', 'no') == 'yes')
settings['disable_known_hosts'] = True
return settings
@task
def vagrant(self, name=''):
"""
Run the following tasks on a vagrant box.
First, you need to import this task in your ``fabfile.py``::
from fabric.api import *
from burlap.vagrant import vagrant
@task
def some_task():
run('echo hello')
Then you can easily run tasks on your current Vagrant box::
$ fab vagrant some_task
"""
r = self.local_renderer
config = self.ssh_config(name)
extra_args = self._settings_dict(config)
r.genv.update(extra_args)
def vagrant_settings(self, name='', *args, **kwargs):
"""
Context manager that sets a vagrant VM
as the remote host.
Use this context manager inside a task to run commands
on your current Vagrant box::
from burlap.vagrant import vagrant_settings
with vagrant_settings():
run('hostname')
"""
config = self.ssh_config(name)
extra_args = self._settings_dict(config)
kwargs.update(extra_args)
return self.settings(*args, **kwargs)
def status(self, name='default'):
"""
Get the status of a vagrant machine
"""
machine_states = dict(self._status())
return machine_states[name]
def _status(self):
if self.version() >= (1, 4):
return self._status_machine_readable()
return self._status_human_readable()
def _status_machine_readable(self):
with self.settings(hide('running')):
output = self.local('vagrant status --machine-readable', capture=True)
tuples = [tuple(line.split(',')) for line in output.splitlines() if line.strip() != '']
return [(target, data) for timestamp, target, type_, data in tuples if type_ == 'state-human-short']
def _status_human_readable(self):
with self.settings(hide('running')):
output = self.local('vagrant status', capture=True)
lines = output.splitlines()[2:]
states = []
for line in lines:
if line == '':
break
target = line[:25].strip()
state = re.match(r'(.{25}) ([^\(]+)( \(.+\))?$', line).group(2)
states.append((target, state))
return states
def machines(self):
"""
Get the list of vagrant machines
"""
return [name for name, state in self._status()]
def base_boxes(self):
"""
Get the list of vagrant base boxes
"""
return sorted(list(set([name for name, provider in self._box_list()])))
def _box_list(self):
if self.version() >= (1, 4):
return self._box_list_machine_readable()
return self._box_list_human_readable()
def _box_list_machine_readable(self):
r = self.local_renderer
with self.settings(hide('running')):
output = r.local('vagrant box list --machine-readable', capture=True)
tuples = [tuple(line.split(',')) for line in output.splitlines() if line.strip() != '']
res = []
for timestamp, target, type_, data in tuples:
if type_ == 'box-name':
box_name = data
elif type_ == 'box-provider':
box_provider = data
res.append((box_name, box_provider))
else:
raise ValueError('Unknown item type')
return res
def _box_list_human_readable(self):
r = self.local_renderer
with self.settings(hide('running')):
output = r.local('vagrant box list', capture=True)
lines = output.splitlines()
res = []
for line in lines:
box_name = line[:25].strip()
mo = re.match(r'.{25} \((.+)\)$', line)
box_provider = mo.group(1) if mo is not None else 'virtualbox'
res.append((box_name, box_provider))
return res
@task
def install_from_upstream(self):
"""
Installs Vagrant from the most recent package available from their homepage.
"""
from burlap.system import get_arch, distrib_family
r = self.local_renderer
content = urlopen(r.env.download_url).read()
print(len(content))
matches = DOWNLOAD_LINK_PATTERN.findall(content)
print(matches)
arch = get_arch() # e.g. 'x86_64'
family = distrib_family()
if family == DEBIAN:
ext = '.deb'
matches = [match for match in matches if match.endswith(ext) and arch in match]
print('matches:', matches)
assert matches, "No matches found."
assert len(matches) == 1, "Too many matches found: %s" % (', '.join(matches))
r.env.final_download_url = matches[0]
r.env.local_filename = '/tmp/vagrant%s' % ext
r.run('wget -O {local_filename} {final_download_url}')
r.sudo('dpkg -i {local_filename}')
else:
raise NotImplementedError('Unsupported family: %s' % family)
@task(precursors=['packager', 'user'])
def configure(self, *args, **kwargs):
self.install_from_upstream()
vagrant = VagrantSatchel()
|
python
|
{"slug":"genesis-simple-edits","name":"Genesis Simple Edits","latest_version":"2.2.1","last_updated":"2018-03-27T16:38:00.219Z","vulnerabilities":null}
|
json
|
<reponame>ahives/HareDu1<filename>src/HareDu.Tests/TestData/BindingInfo.json
[
{
"source": "",
"vhost": "/",
"destination": "Queue1",
"destination_type": "queue",
"routing_key": "Key1",
"arguments": {},
"properties_key": "Key1"
},
{
"source": "",
"vhost": "/",
"destination": "Queue1_error",
"destination_type": "queue",
"routing_key": "Queue1_error",
"arguments": {},
"properties_key": "Queue1_error"
},
{
"source": "",
"vhost": "/",
"destination": "input_queue",
"destination_type": "queue",
"routing_key": "input_queue",
"arguments": {},
"properties_key": "input_queue"
},
{
"source": "Queue1:SomeMessage",
"vhost": "/",
"destination": "Queue1",
"destination_type": "exchange",
"routing_key": "",
"arguments": {},
"properties_key": "~"
},
{
"source": "input_queue",
"vhost": "/",
"destination": "input_queue",
"destination_type": "queue",
"routing_key": "",
"arguments": {},
"properties_key": "~"
},
{
"source": "",
"vhost": "HareDu",
"destination": "Queue1",
"destination_type": "queue",
"routing_key": "Queue1",
"arguments": {},
"properties_key": "Queue1"
},
{
"source": "",
"vhost": "HareDu",
"destination": "Queue2",
"destination_type": "queue",
"routing_key": "Queue2",
"arguments": {},
"properties_key": "Queue2"
},
{
"source": "Test1",
"vhost": "HareDu",
"destination": "Queue1",
"destination_type": "queue",
"routing_key": "",
"arguments": {},
"properties_key": "~"
},
{
"source": "Test1",
"vhost": "HareDu",
"destination": "Queue1",
"destination_type": "queue",
"routing_key": "x=y",
"arguments": {
"A": "B",
"X": "Y"
},
"properties_key": "<KEY>"
},
{
"source": "",
"vhost": "TestVirtualHost",
"destination": "TestQueue",
"destination_type": "queue",
"routing_key": "TestQueue",
"arguments": {},
"properties_key": "TestQueue"
},
{
"source": "HareDu.IntegrationTesting.Core:FakeMessage",
"vhost": "TestVirtualHost",
"destination": "TestQueue",
"destination_type": "exchange",
"routing_key": "",
"arguments": {},
"properties_key": "~"
},
{
"source": "TestQueue",
"vhost": "TestVirtualHost",
"destination": "TestQueue",
"destination_type": "queue",
"routing_key": "",
"arguments": {},
"properties_key": "~"
}
]
|
json
|
Her father continued to sexually harass her yet she kept quiet. However, when her step-father refused to allow her to marry a youth whom she loved, she ran out of patience, picked up spice grinder stone and killed her father. Her lover also accompanied her in the crime. The incident took place in Kanpur.
According reports, Govindnagar resident Jagdish resides with her 15-year-old step daughter in Kanpur. The girl fell in love with a youth from the same locality. They both wanted to marry, however, Jagdish protested against the proposal.
On Monday, the girl and her lover reached Jagdish house in a bid to discuss their marriage plan. Enraged over this, Jagdish began beating the girl. Running out of patience, the girl picked up spice grinder stone and hit Jagdish on his face. Her lover also standing there, picked up a LPG cylinder and hit Jagdish, who died on the spot.
The girl then infomed the police control room about the incident. The police rushed to the spot and took the girl and her lover in custody. The girl told the police that he had been regularly harassing her sexually, but she kept quiet. However, what irked her was his obstinacy not to allow her to marry the boy of his choice and she hit him with stone.
The girl alleged that Jagdish had been sexually harassing her for a long time. He had even threatened her.
The police have arrested both the accused.
Her father continued to sexually harass her yet she kept quiet. However, when her step-father refused to allow her to marry a youth whom she loved, she ran out of patience, picked up spice grinder stone and killed her father. Her lover also accompanied her in the crime. The incident took place in Kanpur.
|
english
|
Robert Califf, commissioner of the US Food and Drug Administration (FDA), said in an interview that misinformation is killing Americans—contributing to the fact that US life expectancy is 3 to 5 years worse than that of people in comparably wealthy countries. He called for better regulation to crack down on misinformation. But would such rules help? I studied medical misinformation as part of a journalism fellowship, and as I’ve written before, there is a real danger when misinformed people skip life-saving vaccines or buy into risky, untested treatments. Yet policing misinformation is tricky.
|
english
|
Ask This: Has anyone ever heard the word, “Hoarding”? (Explain that this is when people hold onto stuff and never throw it away, sell it or give it away.)
Say This: There’s actually a TV show just about people who hoard everything…I mean EVERYTHING! (Suggestion: find a clip to show.)
Ask This: What are some things you noticed? Do you think this lady planned to live like that? How do you think she ended up in that condition?
Say This: She may have started like a lot of people…follow me..
Do This: Take your family on a field trip to a place in your house where the all-too-common “Junk Drawer” is and show them what’s in the drawer. It’s likely that most of the items will have a story attached to them. Share those stories.
Say This: The lady in the video has a real bad problem. She can’t let anything go. She thinks all of that stuff has value, so she holds on to all of it and you saw what happened.
Do This: Return to the dinner table or just sit down where you are.
Ask This: What do you think Jesus meant by “treasure?” Was it like a pirate treasure?
Say This: The “treasure” Jesus was talking about is the stuff we give a lot of value.
Ask This: What are some things we might treasure? (Cars, toys, house, clothes, video games, computer, cell phones, etc)
Say This: The stuff in the “Junk Drawer” used be a treasure, but look at it now. It used to have value and look at it now. We kept it because we thought it would still be valuable later, but now it’s really nothing more than trash. It’s like food that you keep for too long without using it…it molds. We can’t keep trying to hold on to our stuff because when we do, it’s just going to be worthless. And eventually, we’re going to die and it will left for other people to take care of.
Ask This: What can we do differently to keep this from becoming a problem like the lady in the video? (Sell it, give it away)
Say This: Jesus tells us to store our treasure (something we value a lot) in heaven and not on Earth. That doesn’t mean we can’t have things like cars, cell phones and video games. But it does mean we should use those things to honor Him and not just use them for us. But to do that, we have to be willing to let go of those things and not keep them to ourselves. We have to see that everything we have really doesn’t belong to us. It all belongs to Jesus.
Do This: Find 1 Chronicles 29:11 and ask one of your kids (or wife) to read it.
Ask This: What did that verse say belongs to Jesus? (Everything).
Say This: So if it all belongs to Jesus, our job is to use all we have in ways that make Him happy. One way can do this is to look for ways to give what we have to others as a treasure for Jesus.
Ask This: How can we give our house as a treasure for Jesus? How can we give our toys as a treasure for Jesus? How can we give money as a treasure for Jesus? How can we give time as a treasure to Jesus?
Say This: Let’s ask God to help us see all that we have as His and not ours. Let’s also ask him to help us let go of things that we might hold on to more than we should. In my prayer, I’m going to tell Jesus we want to thank Him for the things He’s allowed our family to enjoy. And then I want each person to thank Him for something they have. I’ll go first so you can see what I mean. Mom will follow after me and then the rest of you can go next. Let’s pray.
Pray This: Heavenly Father, we are very grateful for all of the things you have allowed our family to enjoy. Jesus, I thank you for (add something you are thankful for). [Wait for the next person to say something.] Jesus, may we be wise with the things we have and use them for your glory and not ours. May we not try to hold on to them, but offer them to you as treasures in Your hands to be used for Your glory. In Your name we pray, Amen.
|
english
|
Modadugu Gupta, (born Aug. 17, 1939, Bapatla, Andhra Pradesh, India), Indian scientist, who boosted food yields in impoverished areas with innovative approaches to aquaculture.
Gupta earned a doctorate from the University of Calcutta and joined the Indian Council of Agricultural Research as a research associate. He later began a longtime association with the WorldFish Center, eventually serving as the organization’s assistant director general. In the 1970s, at a time when intense harvesting by commercial fishing fleets had caused a serious decline in the world’s wild fish stock, Gupta began introducing his aquaculture methods to poor farmers in India, demonstrating to them how they could easily integrate aquaculture into their routines. Freshwater fish production in the country soon more than doubled.
Gupta subsequently became a leading figure in the so-called Blue Revolution, the expansion of fish farming that was credited with improving the nutrition and enhancing the livelihoods of the rural poor through the spread of techniques that could significantly boost food production. Many of these techniques had been pioneered by Gupta. They included breeding species of carp that are adaptable to a variety of harsh environments, using common farm wastes such as weeds and chicken manure as fish food, and converting flooded fields and other seasonal water bodies into places to grow fish. Some areas of South and Southeast Asia where Gupta had worked with local farmers experienced as much as fivefold increases in fish harvests.
From 1986 to 1995 Gupta worked with the Bangladesh Fisheries Research Institute. His efforts in Bangladesh were notable for his involvement of rural women, who traditionally were limited to working inside the home. With the help of local nongovernmental organizations, Gupta persuaded many women to start small fish farms in their areas. He also helped spread aquaculture in Laos, Thailand, and Vietnam.
Some critics objected to Gupta’s work on the basis that fish farming posed environmental as well as health hazards. Gupta conceded that some farmers overused fish feed and fertilizer, but he said that the solution was to educate these farmers in proper aquaculture techniques. He also insisted that aquaculture was meeting a crucial need as the world’s wild fish stock dwindled. Gupta saw great potential for aquaculture in Africa, and by 2006 he was advising a number of countries there. For his decades of effort and research in aquaculture, Gupta was awarded the international World Food Prize in October 2005.
|
english
|
use crate::{
certificate::PoolId,
config::RewardParams,
fee::LinearFee,
rewards::Ratio,
testing::{
builders::StakePoolBuilder,
ledger::{ConfigBuilder, TestLedger},
scenario::{prepare_scenario, stake_pool, wallet},
verifiers::LedgerStateVerifier,
},
value::Value,
};
use std::num::{NonZeroU32, NonZeroU64};
pub mod tax;
#[test]
pub fn rewards_no_block() {
let (mut ledger, _) = prepare_scenario()
.with_config(
ConfigBuilder::new(0)
.with_rewards(Value(100))
.with_treasury(Value(100)),
)
.with_initials(vec![wallet("Alice").with(1_000).owns("stake_pool")])
.build()
.unwrap();
assert_eq!(ledger.can_distribute_reward(), false);
ledger.distribute_rewards().unwrap();
LedgerStateVerifier::new(ledger.into())
.info("after empty rewards distribution")
.pots()
.has_fee_equals_to(&Value::zero())
.and()
.has_treasury_equals_to(&Value(100))
.and()
.has_remaining_rewards_equals_to(&Value(100));
}
#[test]
pub fn rewards_empty_pots() {
let (mut ledger, controller) = prepare_scenario()
.with_config(
ConfigBuilder::new(0)
.with_rewards(Value(0))
.with_treasury(Value(0)),
)
.with_initials(vec![wallet("Alice").with(1_000).owns("stake_pool")])
.with_stake_pools(vec![stake_pool("stake_pool")
.with_reward_account(true)
.tax_ratio(1, 1)])
.build()
.unwrap();
let stake_pool = controller.stake_pool("stake_pool").unwrap();
assert!(ledger.produce_empty_block(&stake_pool).is_ok());
ledger.distribute_rewards().unwrap();
let mut ledger_verifier = LedgerStateVerifier::new(ledger.into());
ledger_verifier.info("after empty rewards distribution");
ledger_verifier
.pots()
.has_fee_equals_to(&Value::zero())
.and()
.has_treasury_equals_to(&Value::zero())
.and()
.has_remaining_rewards_equals_to(&Value::zero());
let reward_account = stake_pool.reward_account().unwrap();
ledger_verifier
.account(reward_account.clone())
.does_not_exist();
}
#[test]
pub fn rewards_owners_split() {
let (mut ledger, controller) = prepare_scenario()
.with_config(
ConfigBuilder::new(0)
.with_rewards(Value(100))
.with_treasury(Value(0))
.with_rewards_params(RewardParams::Linear {
constant: 10,
ratio: Ratio {
numerator: 1,
denominator: NonZeroU64::new(1).unwrap(),
},
epoch_start: 0,
epoch_rate: NonZeroU32::new(1).unwrap(),
}),
)
.with_initials(vec![
wallet("Alice").with(1_000).owns("stake_pool"),
wallet("Bob").with(1_000).owns("stake_pool"),
wallet("Clarice").with(1_000).owns("stake_pool"),
])
.with_stake_pools(vec![stake_pool("stake_pool").tax_ratio(1, 1)])
.build()
.unwrap();
let stake_pool = controller.stake_pool("stake_pool").unwrap();
let alice = controller.wallet("Alice").unwrap();
let bob = controller.wallet("Bob").unwrap();
let clarice = controller.wallet("Clarice").unwrap();
assert!(ledger.produce_empty_block(&stake_pool).is_ok());
assert!(ledger.can_distribute_reward());
ledger.distribute_rewards().unwrap();
let mut ledger_verifier = LedgerStateVerifier::new(ledger.into());
ledger_verifier.info("tets after reward distribution splitted into 3 accounts");
ledger_verifier
.pots()
.has_fee_equals_to(&Value::zero())
.and()
.has_treasury_equals_to(&Value::zero())
.and()
.has_remaining_rewards_equals_to(&Value(91));
ledger_verifier
.account(alice.as_account_data())
.has_value(&Value(1003));
ledger_verifier
.account(bob.as_account_data())
.has_value(&Value(1003));
ledger_verifier
.account(clarice.as_account_data())
.has_value(&Value(1003));
}
#[test]
pub fn rewards_owners_uneven_split() {
let (mut ledger, controller) = prepare_scenario()
.with_config(
ConfigBuilder::new(0)
.with_rewards(Value(100))
.with_treasury(Value(0))
.with_rewards_params(RewardParams::Linear {
constant: 20,
ratio: Ratio {
numerator: 1,
denominator: NonZeroU64::new(1).unwrap(),
},
epoch_start: 0,
epoch_rate: NonZeroU32::new(1).unwrap(),
}),
)
.with_initials(vec![
wallet("Alice").with(1_000).owns("stake_pool"),
wallet("Bob").with(1_000).owns("stake_pool"),
wallet("Clarice").with(1_000).owns("stake_pool"),
])
.with_stake_pools(vec![stake_pool("stake_pool").tax_ratio(1, 1)])
.build()
.unwrap();
let stake_pool = controller.stake_pool("stake_pool").unwrap();
let alice = controller.wallet("Alice").unwrap();
let bob = controller.wallet("Bob").unwrap();
let clarice = controller.wallet("Clarice").unwrap();
assert!(ledger.produce_empty_block(&stake_pool).is_ok());
ledger.distribute_rewards().unwrap();
let mut ledger_verifier = LedgerStateVerifier::new(ledger.into());
ledger_verifier.info("tets after reward distribution splitted into 3 accounts");
ledger_verifier
.pots()
.has_fee_equals_to(&Value::zero())
.and()
.has_treasury_equals_to(&Value::zero())
.and()
.has_remaining_rewards_equals_to(&Value(81));
ledger_verifier
.account(alice.as_account_data())
.has_value(&Value(1007));
ledger_verifier
.account(bob.as_account_data())
.has_value(&Value(1006));
ledger_verifier
.account(clarice.as_account_data())
.has_value(&Value(1006));
}
#[test]
pub fn rewards_single_owner() {
let (mut ledger, controller) = prepare_scenario()
.with_config(
ConfigBuilder::new(0)
.with_rewards(Value(100))
.with_treasury(Value(0))
.with_rewards_params(RewardParams::Linear {
constant: 10,
ratio: Ratio {
numerator: 1,
denominator: NonZeroU64::new(1).unwrap(),
},
epoch_start: 0,
epoch_rate: NonZeroU32::new(1).unwrap(),
}),
)
.with_initials(vec![wallet("Alice").with(1_000).owns("stake_pool")])
.with_stake_pools(vec![stake_pool("stake_pool").tax_ratio(1, 1)])
.build()
.unwrap();
let stake_pool = controller.stake_pool("stake_pool").unwrap();
let alice = controller.wallet("Alice").unwrap();
assert!(ledger.produce_empty_block(&stake_pool).is_ok());
ledger.distribute_rewards().unwrap();
let mut ledger_verifier = LedgerStateVerifier::new(ledger.into());
ledger_verifier.info("after rewards distribution to single owner");
ledger_verifier
.pots()
.has_fee_equals_to(&Value::zero())
.and()
.has_treasury_equals_to(&Value(0))
.and()
.has_remaining_rewards_equals_to(&Value(91));
ledger_verifier
.account(alice.as_account_data())
.has_value(&Value(1_009));
}
#[test]
pub fn rewards_reward_account() {
let (mut ledger, controller) = prepare_scenario()
.with_config(
ConfigBuilder::new(0)
.with_rewards(Value(1000))
.with_treasury(Value(0))
.with_rewards_params(RewardParams::Linear {
constant: 100,
ratio: Ratio {
numerator: 1,
denominator: NonZeroU64::new(1).unwrap(),
},
epoch_start: 0,
epoch_rate: NonZeroU32::new(1).unwrap(),
}),
)
.with_initials(vec![wallet("Alice").with(1_000).owns("stake_pool")])
.with_stake_pools(vec![stake_pool("stake_pool")
.with_reward_account(true)
.tax_ratio(1, 10)])
.build()
.unwrap();
let stake_pool = controller.stake_pool("stake_pool").unwrap();
assert!(ledger.produce_empty_block(&stake_pool).is_ok());
ledger.distribute_rewards().unwrap();
let mut ledger_verifier = LedgerStateVerifier::new(ledger.into());
ledger_verifier.info("after rewards distribution to reward account");
ledger_verifier
.pots()
.has_fee_equals_to(&Value::zero())
.and()
.has_treasury_equals_to(&Value(90))
.and()
.has_remaining_rewards_equals_to(&Value(901));
let reward_account = stake_pool.reward_account().unwrap();
ledger_verifier
.account(reward_account.clone())
.has_value(&Value(9))
.and()
.has_last_reward(&Value(9));
}
#[test]
pub fn rewards_goes_to_treasury_if_stake_pool_is_retired() {
let (mut ledger, controller) = prepare_scenario()
.with_config(
ConfigBuilder::new(0)
.with_rewards(Value(1000))
.with_treasury(Value(0))
.with_rewards_params(RewardParams::Linear {
constant: 100,
ratio: Ratio {
numerator: 1,
denominator: NonZeroU64::new(1).unwrap(),
},
epoch_start: 0,
epoch_rate: NonZeroU32::new(1).unwrap(),
}),
)
.with_initials(vec![wallet("Alice").with(1_000).owns("stake_pool")])
.with_stake_pools(vec![stake_pool("stake_pool")
.with_reward_account(true)
.tax_ratio(1, 10)])
.build()
.unwrap();
let stake_pool = controller.stake_pool("stake_pool").unwrap();
let alice = controller.wallet("Alice").unwrap();
assert!(ledger.produce_empty_block(&stake_pool).is_ok());
controller
.retire(Some(&alice), &stake_pool, &mut ledger)
.unwrap();
ledger.distribute_rewards().unwrap();
let mut ledger_verifier = LedgerStateVerifier::new(ledger.into());
ledger_verifier.info("after rewards distribution to retired stake pool");
ledger_verifier
.pots()
.has_fee_equals_to(&Value::zero())
.and()
.has_treasury_equals_to(&Value(99))
.and()
.has_remaining_rewards_equals_to(&Value(901));
let reward_account = stake_pool.reward_account().unwrap();
ledger_verifier
.account(reward_account.clone())
.does_not_exist();
}
#[test]
pub fn rewards_from_fees() {
let (mut ledger, controller) = prepare_scenario()
.with_config(
ConfigBuilder::new(0)
.with_fee(LinearFee::new(1, 1, 1))
.with_rewards(Value(1000))
.with_treasury(Value(0))
.with_rewards_params(RewardParams::Linear {
constant: 100,
ratio: Ratio {
numerator: 1,
denominator: NonZeroU64::new(1).unwrap(),
},
epoch_start: 0,
epoch_rate: NonZeroU32::new(1).unwrap(),
}),
)
.with_initials(vec![
wallet("Alice").with(1_000).owns("stake_pool"),
wallet("Bob").with(1_000),
wallet("Clarice").with(1_000),
])
.with_stake_pools(vec![stake_pool("stake_pool")
.with_reward_account(true)
.tax_ratio(1, 10)])
.build()
.unwrap();
let stake_pool = controller.stake_pool("stake_pool").unwrap();
let bob = controller.wallet("Bob").unwrap();
let clarice = controller.wallet("Clarice").unwrap();
let fragment_factory = controller.fragment_factory();
let fragment = fragment_factory.transaction(&bob, &clarice, &mut ledger, 100);
assert!(ledger.produce_block(&stake_pool, vec![fragment]).is_ok());
let mut ledger_verifier = LedgerStateVerifier::new(ledger.clone().into());
ledger_verifier.info("before rewards distribution with single transaction");
ledger_verifier
.pots()
.has_fee_equals_to(&Value(3))
.and()
.has_treasury_equals_to(&Value::zero())
.and()
.has_remaining_rewards_equals_to(&Value(1000));
ledger.distribute_rewards().unwrap();
let mut ledger_verifier = LedgerStateVerifier::new(ledger.into());
ledger_verifier.info("after rewards distribution with single transaction");
ledger_verifier
.pots()
.has_fee_equals_to(&Value::zero())
.and()
.has_treasury_equals_to(&Value(92))
.and()
.has_remaining_rewards_equals_to(&Value(901));
let reward_account = stake_pool.reward_account().unwrap();
ledger_verifier
.account(reward_account.clone())
.has_value(&Value(10));
}
#[test]
pub fn rewards_stake_pool_with_delegation() {
let (mut ledger, controller) = prepare_scenario()
.with_config(
ConfigBuilder::new(0)
.with_rewards(Value(1000))
.with_treasury(Value(0))
.with_rewards_params(RewardParams::Linear {
constant: 100,
ratio: Ratio {
numerator: 1,
denominator: NonZeroU64::new(1).unwrap(),
},
epoch_start: 0,
epoch_rate: NonZeroU32::new(1).unwrap(),
}),
)
.with_initials(vec![
wallet("Alice").with(1_000).owns("stake_pool"),
wallet("Bob").with(1_000).delegates_to("stake_pool"),
])
.with_stake_pools(vec![stake_pool("stake_pool").tax_ratio(1, 2)])
.build()
.unwrap();
let stake_pool = controller.stake_pool("stake_pool").unwrap();
let alice = controller.wallet("Alice").unwrap();
let bob = controller.wallet("Bob").unwrap();
assert!(ledger.produce_empty_block(&stake_pool).is_ok());
ledger.distribute_rewards().unwrap();
let mut ledger_verifier = LedgerStateVerifier::new(ledger.into());
ledger_verifier.info("after rewards distribution with delegation");
ledger_verifier
.pots()
.has_fee_equals_to(&Value::zero())
.and()
.has_treasury_equals_to(&Value::zero())
.and()
.has_remaining_rewards_equals_to(&Value(901));
ledger_verifier
.account(alice.as_account_data())
.has_value(&Value(1049));
ledger_verifier
.account(bob.as_account_data())
.has_value(&Value(1050));
}
#[test]
pub fn rewards_total_amount_is_constant_after_reward_distribution() {
let (mut ledger, controller) = prepare_scenario()
.with_config(
ConfigBuilder::new(0)
.with_rewards(Value(1000))
.with_treasury(Value(100))
.with_rewards_params(RewardParams::Linear {
constant: 100,
ratio: Ratio {
numerator: 1,
denominator: NonZeroU64::new(1).unwrap(),
},
epoch_start: 0,
epoch_rate: NonZeroU32::new(1).unwrap(),
}),
)
.with_initials(vec![
wallet("Alice").with(1_000).owns("stake_pool"),
wallet("Bob").with(1_000).delegates_to("stake_pool"),
wallet("Clarice").with(1_000),
])
.with_stake_pools(vec![stake_pool("stake_pool").tax_ratio(1, 2)])
.build()
.unwrap();
let stake_pool = controller.stake_pool("stake_pool").unwrap();
let bob = controller.wallet("Bob").unwrap();
let clarice = controller.wallet("Clarice").unwrap();
let fragment_factory = controller.fragment_factory();
let fragment = fragment_factory.transaction(&bob, &clarice, &mut ledger, 100);
assert!(ledger.produce_block(&stake_pool, vec![fragment]).is_ok());
LedgerStateVerifier::new(ledger.clone().into())
.info("before rewards distribution")
.total_value_is(&Value(4100));
ledger.distribute_rewards().unwrap();
LedgerStateVerifier::new(ledger.into())
.info("after rewards distribution")
.total_value_is(&Value(4100));
}
#[test]
pub fn rewards_are_propotional_to_stake_pool_effectivness_in_building_blocks() {
let slots_per_epoch = 100;
let reward_constant = 100;
let ratio_numerator = 1;
let expected_total_reward = Value(reward_constant - ratio_numerator);
let (mut ledger, controller) = prepare_scenario()
.with_config(
ConfigBuilder::new(0)
.with_slots_per_epoch(slots_per_epoch)
.with_rewards(Value(1_000_000))
.with_treasury(Value(0))
.with_rewards_params(RewardParams::Linear {
constant: reward_constant,
ratio: Ratio {
numerator: ratio_numerator,
denominator: NonZeroU64::new(1).unwrap(),
},
epoch_start: 0,
epoch_rate: NonZeroU32::new(1).unwrap(),
}),
)
.with_initials(vec![
wallet("Alice")
.with(1_000_000)
.owns_and_delegates_to("alice_stake_pool"),
wallet("Bob")
.with(1_000_000)
.owns_and_delegates_to("bob_stake_pool"),
wallet("Clarice")
.with(1_000_000)
.owns_and_delegates_to("clarice_stake_pool"),
wallet("Carol").with(1_000_000),
wallet("David").with(1_000_000),
])
.with_stake_pools(vec![
stake_pool("alice_stake_pool").tax_ratio(1, 2),
stake_pool("bob_stake_pool").tax_ratio(1, 2),
stake_pool("clarice_stake_pool").tax_ratio(1, 2),
])
.build()
.unwrap();
let alice = controller.wallet("Alice").unwrap();
let bob = controller.wallet("Bob").unwrap();
let clarice = controller.wallet("Clarice").unwrap();
let alice_stake_pool = controller.stake_pool("alice_stake_pool").unwrap();
let bob_stake_pool = controller.stake_pool("bob_stake_pool").unwrap();
let clarice_stake_pool = controller.stake_pool("clarice_stake_pool").unwrap();
let mut carol = controller.wallet("Carol").unwrap();
let david = controller.wallet("David").unwrap();
let fragment_factory = controller.fragment_factory();
while ledger.date().slot_id < 99 {
let fragment = fragment_factory.transaction(&carol, &david, &mut ledger, 100);
let block_was_created = ledger
.fire_leadership_event(controller.initial_stake_pools(), vec![fragment])
.unwrap();
if block_was_created {
carol.confirm_transaction();
}
}
let expected_alice_reward =
(calculate_reward(expected_total_reward, &alice_stake_pool.id(), &ledger) + alice.value())
.unwrap();
let expected_bob_reward =
(calculate_reward(expected_total_reward, &bob_stake_pool.id(), &ledger) + bob.value())
.unwrap();
let expected_clarice_reward =
(calculate_reward(expected_total_reward, &clarice_stake_pool.id(), &ledger)
+ clarice.value())
.unwrap();
ledger.distribute_rewards().unwrap();
let mut ledger_verifier = LedgerStateVerifier::new(ledger.into());
ledger_verifier
.info("after rewards distribution for alice")
.account(alice.as_account_data())
.has_value(&expected_alice_reward);
ledger_verifier
.info("after rewards distribution for bob")
.account(bob.as_account_data())
.has_value(&expected_bob_reward);
ledger_verifier
.info("after rewards distribution for clarice")
.account(clarice.as_account_data())
.has_value(&expected_clarice_reward);
}
fn calculate_reward(expected_total_reward: Value, pool_id: &PoolId, ledger: &TestLedger) -> Value {
let reward_unit = expected_total_reward.split_in(ledger.leaders_log().total());
let block_count = ledger.leaders_log_for(pool_id);
reward_unit.parts.scale(block_count).unwrap()
}
#[test]
pub fn rewards_owner_of_many_stake_pool() {
let (mut ledger, controller) = prepare_scenario()
.with_config(
ConfigBuilder::new(0)
.with_fee(LinearFee::new(1, 1, 1))
.with_rewards(Value(1000))
.with_treasury(Value(0))
.with_rewards_params(RewardParams::Linear {
constant: 100,
ratio: Ratio {
numerator: 1,
denominator: NonZeroU64::new(1).unwrap(),
},
epoch_start: 0,
epoch_rate: NonZeroU32::new(1).unwrap(),
}),
)
.with_initials(vec![
wallet("Alice").with(1_000).owns("stake_pool"),
wallet("Bob").with(1_000),
wallet("Clarice").with(1_000),
])
.with_stake_pools(vec![stake_pool("stake_pool").tax_ratio(1, 10)])
.build()
.unwrap();
let first_alice_stake_pool = controller.stake_pool("stake_pool").unwrap();
let alice = controller.wallet("Alice").unwrap();
let bob = controller.wallet("Bob").unwrap();
let clarice = controller.wallet("Clarice").unwrap();
let total_ada_before = ledger.total_funds();
let second_alice_stake_pool = StakePoolBuilder::new()
.with_owners(vec![alice.public_key()])
.with_ratio_tax_type(1, 10, None)
.build();
controller
.register(&alice, &second_alice_stake_pool, &mut ledger)
.unwrap();
// produce 2 blocks for each stake pool
let fragment_factory = controller.fragment_factory();
let fragment = fragment_factory.transaction(&bob, &clarice, &mut ledger, 100);
assert!(ledger
.produce_block(&first_alice_stake_pool, vec![fragment])
.is_ok());
let fragment = fragment_factory.transaction(&clarice, &bob, &mut ledger, 100);
assert!(ledger
.produce_block(&second_alice_stake_pool, vec![fragment])
.is_ok());
ledger.distribute_rewards().unwrap();
let mut ledger_verifier = LedgerStateVerifier::new(ledger.into());
ledger_verifier.info("after rewards distribution with two transactions");
ledger_verifier
.pots()
.has_fee_equals_to(&Value::zero())
.and()
.has_treasury_equals_to(&Value(98))
.and()
.has_remaining_rewards_equals_to(&Value(901));
ledger_verifier.total_value_is(&total_ada_before);
// check owner account (10 from rewards - 3 from register stake pool fee)
ledger_verifier
.account(alice.as_account_data())
.has_value(&Value(1007));
}
#[test]
pub fn rewards_delegators_of_many_stake_pool() {
let (mut ledger, controller) = prepare_scenario()
.with_config(
ConfigBuilder::new(0)
.with_fee(LinearFee::new(1, 1, 1))
.with_rewards(Value(1000))
.with_treasury(Value(0))
.with_rewards_params(RewardParams::Linear {
constant: 100,
ratio: Ratio {
numerator: 1,
denominator: NonZeroU64::new(1).unwrap(),
},
epoch_start: 0,
epoch_rate: NonZeroU32::new(1).unwrap(),
}),
)
.with_initials(vec![
wallet("Alice").with(1_000).owns("alice_stake_pool"),
wallet("Bob").with(1_000).owns("bob_stake_pool"),
wallet("Clarice").with(1_000),
wallet("David").with(1_000),
wallet("Eve").with(1_000),
])
.with_stake_pools(vec![
stake_pool("alice_stake_pool").tax_ratio(1, 10),
stake_pool("bob_stake_pool").tax_ratio(1, 10),
])
.build()
.unwrap();
let alice_stake_pool = controller.stake_pool("alice_stake_pool").unwrap();
let bob_stake_pool = controller.stake_pool("bob_stake_pool").unwrap();
let clarice = controller.wallet("Clarice").unwrap();
let david = controller.wallet("David").unwrap();
let eve = controller.wallet("Eve").unwrap();
let total_ada_before = ledger.total_funds();
controller
.delegates_to_many(
&eve,
&[(&alice_stake_pool, 1), (&bob_stake_pool, 1)],
&mut ledger,
)
.unwrap();
// produce 2 blocks for each stake pool
let fragment_factory = controller.fragment_factory();
let fragment = fragment_factory.transaction(&david, &clarice, &mut ledger, 100);
assert!(ledger
.produce_block(&alice_stake_pool, vec![fragment])
.is_ok());
let fragment = fragment_factory.transaction(&clarice, &david, &mut ledger, 100);
assert!(ledger
.produce_block(&bob_stake_pool, vec![fragment])
.is_ok());
ledger.distribute_rewards().unwrap();
let mut ledger_verifier = LedgerStateVerifier::new(ledger.into());
ledger_verifier.info("after rewards distribution with two transactions");
ledger_verifier
.pots()
.has_fee_equals_to(&Value::zero())
.and()
.has_treasury_equals_to(&Value(2))
.and()
.has_remaining_rewards_equals_to(&Value(901));
ledger_verifier.total_value_is(&total_ada_before);
// check owner account (94 from rewards - 3 from register stake pool fee)
ledger_verifier
.account(eve.as_account_data())
.has_value(&Value(1093));
}
|
rust
|
In a major development, BCCI president and former India skipper Sourav Ganguly has been hospitalized again. The 48-year-old complained of chest pain. According to ANI, he has been taken to Apollo Hospital in Kolkata. Further reports suggest that he is stable and feeling better now, but will be kept under observation for two days.
It is also understood, two more stents on Ganguly’s coronary arteries, which were supposed to be implanted in a couple of weeks from the date of his previous discharge from hospital, likely to be implanted now. Hospital sources say nothing seriously wrong with Ganguly.
The news has come weeks after Sourav underwent coronary angioplasty at the Woodlands hospital after experiencing a sudden blackout and chest pain. The former India cricketer was at the gym when he faced the issue. Post which, he got in touch with his family doctor who asked him to rush to the hospital at the earliest.
The hospital in a statement said, “Coronary Angiography was done at 3 p. m. — Triple vessel disease PTCA (percutaneous transluminal coronary angioplasty) and stenting to RCA or right coronary artery done through radial route".
Sourav was attended by Saroj Mondal and her team of doctors. An MI, commonly known as a heart attack, occurs when blood flow decreases or stops to a part of the heart, causing damage to the heart muscle.
Sourav was discharged from the hospital on January 7. He thanked all the doctors and support staff for taking care of him.
|
english
|
Tollywood Megastar Chiranjeevi graced the Pakka Commercial pre-release event and received overwhelming reactions from his fans. Suma's anchoring during Chiranjeevi's entry grabbed the attention of the viewers. Chiru's entry enhanced josh among fans during the set. Gopi Chand and Raashi Khanna are playing the lead roles in the movie. They play lawyers' roles in the movie. Anasuya Bhardwaj, Sathyaraj, Rao Ramesh, Ajay Ghosh, Saptagiri, Kiran Talasila, Sai Krishna and Ramana Reddy are playing the lead roles in the movie.
The story is written and directed by Maruthi and bankrolled by UV Creations and GA2 Pictures. Jakes Bejoy is composing music for the movie.
|
english
|
<reponame>gentildf/Python
#Faça um programa em Python que abra e reproduza o áudio de um arquivo MP3.
import pygame
print('\033[1mPlayer de música')
pygame.mixer.init()
pygame.mixer.music.load("desafio023.mp3")
pygame.mixer.music.play()
while(pygame.mixer.music.get_busy()):pass
|
python
|
<reponame>capselocke/capselocke<gh_stars>0
{
"body": "WOULD NOT BE THOUGHT FITTER FOR BEDLAM THAN CIVIL CONVERSATION.",
"next": "https://raw.githubusercontent.com/CAPSELOCKE/CAPSELOCKE/master/tweets/7567.json"
}
|
json
|
<filename>data/recipes/173507.json
{
"name": "Jarvis- Gingerbread Latte",
"description": "Episode 87 - I saw a coffee drink, so I went for a gingerbread flavored latte. The Biscuit Base, Gingerbread, Gingerbread extra ginger, and Graham Cracker Clear make up the gingerbread flavor part of the latte. I was not aiming to have it be like eating the cookie stuck in the cup, that's just decoration, I was going for the drink itself. So the cookie flavor is not super distinct as a crunchy cookie. I think if I were going to go for that style I would have added FA cookie, some AP, and possibly some TFA Snickerdoodle. Just suggestions if you would like to try it out with this recipe. \r\n\r\nThe coffee layer consists of the VT Caffe Latte, and coffee milk froth. TO me the milk froth has no coffee notes in, but it's thick, creamy, and nearly buttery, which does help bridge the cookie flavors into the coffee. The Caffe Latte is not super strong, and competing with the creams and rich cookie flavors, it does need to be up at 4%. It was just enough for me to get a good stout coffee note for both me and my husband when we tested it. If you mix this and find it isn't quite strong enough for coffee notes for you, you could easily bump it up by 0.5% until you reach a point that it works for you. I would imagine most average tasters will be satisfied with the coffee level in this recipe. If you're a little sensitive, like I am it could probably be lowered by 0.5%, as when I tried it at 3.5% level I could taste the coffee well enough, but my husband couldn't taste it over the creams. \r\n\r\nThe FLV Whipped cream hangs out on the top layers of the profile, caught most at the end of the exhale and slight aftertaste of whipped cream. \r\n\r\nI didn't find that it needed sweetener. However if you are someone who likes sweetener adding your preferred level to this recipe should yield good results. \r\n\r\nThis is a delightful recipe for the cool winter days coming up here in the Northern Hemisphere. If you like coffee and gingerbread you'll enjoy this flavor. \r\n\r\n",
"id": 173507,
"image_url": "https:\/\/storage.googleapis.com\/dev-images.alltheflavors.com\/uploads\/recipe\/imageUrl\/173507\/gingerbreadlatte.png",
"updated_at": "2020-12-12T10:16:08.000-05:00",
"deleted_at": null,
"recipe_type": 1,
"recipe_flavors": [
{
"name": "Biscuit Base",
"flavor_id": "8828",
"millipercent": 250,
"vendor": "VT"
},
{
"name": "Caff\u00e8 Latte",
"flavor_id": "9368",
"millipercent": 4000,
"vendor": "VT"
},
{
"name": "Coffee Milk Froth",
"flavor_id": "8858",
"millipercent": 1000,
"vendor": "VT"
},
{
"name": "Gingerbread",
"flavor_id": "58",
"millipercent": 1250,
"vendor": "CAP"
},
{
"name": "Gingerbread Extra Ginger",
"flavor_id": "9300",
"millipercent": 350,
"vendor": "TPA"
},
{
"name": "Graham Cracker Clear",
"flavor_id": "325",
"millipercent": 1000,
"vendor": "TPA"
},
{
"name": "Whipped Cream",
"flavor_id": "4440",
"millipercent": 1500,
"vendor": "FLV"
}
],
"author": "mixinvixens",
"views": "735",
"created_at": "2019-11-06",
"slug": "jarvis_gingerbread_latte",
"archive_image_url": "https:\/\/allthearchives.com\/images\/173507.png",
"total_flavoring": "9.35%",
"steep_days": "7",
"best_vg": "0%",
"temperature": "0"
}
|
json
|
<reponame>OpenLocalizationTestOrg/azure-docs-pr15_da-DK
<properties
pageTitle="Få vist installation operationer med Azure CLI | Microsoft Azure"
description="Beskriver, hvordan du bruger Azure CLI til at finde problemer fra ressourcestyring installation."
services="azure-resource-manager,virtual-machines"
documentationCenter=""
tags="top-support-issue"
authors="tfitzmac"
manager="timlt"
editor="tysonn"/>
<tags
ms.service="azure-resource-manager"
ms.devlang="na"
ms.topic="article"
ms.tgt_pltfrm="vm-multiple"
ms.workload="infrastructure"
ms.date="08/15/2016"
ms.author="tomfitz"/>
# <a name="view-deployment-operations-with-azure-cli"></a>Få vist installationshandlinger med Azure CLI
> [AZURE.SELECTOR]
- [Portal](resource-manager-troubleshoot-deployments-portal.md)
- [PowerShell](resource-manager-troubleshoot-deployments-powershell.md)
- [Azure CLI](resource-manager-troubleshoot-deployments-cli.md)
- [REST-API](resource-manager-troubleshoot-deployments-rest.md)
Hvis du har modtaget en fejl, når du installerer ressourcer på Azure, kan du vil se flere oplysninger om de installationshandlinger, der blev udført. Azure CLI indeholder kommandoer, som gør det muligt at finde fejlene, og bestemme mulige løsninger.
[AZURE.INCLUDE [resource-manager-troubleshoot-introduction](../includes/resource-manager-troubleshoot-introduction.md)]
Du kan undgå nogle fejl ved at validere skabelonen og infrastruktur før installation. Du kan også logge yderligere anmodningen og svaret oplysninger under installationen, der kan være nyttige senere til fejlfinding. For at få mere for at vide om at validere og oplysninger om logføring og svar, skal du se [Implementer en ressourcegruppe med Azure ressourcestyring skabelon](resource-group-template-deploy-cli.md).
## <a name="use-audit-logs-to-troubleshoot"></a>Brug overvågningslogge at foretage fejlfinding af
[AZURE.INCLUDE [resource-manager-audit-limitations](../includes/resource-manager-audit-limitations.md)]
Hvis du vil se fejl for en installation, skal du følge nedenstående trin:
1. Kør kommandoen **azure logfil Vis** for at få vist overvågningsloggene. Du kan medtage den **– sidste installation** mulighed for at hente kun logfilen til den seneste installation.
azure group log show ExampleGroup --last-deployment
2. Kommandoen **Vis azure gruppe log** returnerer mange oplysninger. Til fejlfinding vil du som regel til at fokusere på mislykkede handlinger. Følgende script bruger indstillingen **– json** og værktøjet [jq](https://stedolan.github.io/jq/) JSON til at søge i logfilen for mislykkede forsøg på installation.
azure group log show ExampleGroup --json | jq '.[] | select(.status.value == "Failed")'
{
"claims": {
"aud": "https://management.core.windows.net/",
"iss": "https://sts.windows.net/<guid>/",
"iat": "1442510510",
"nbf": "1442510510",
"exp": "1442514410",
"ver": "1.0",
"http://schemas.microsoft.com/identity/claims/tenantid": "{guid}",
"http://schemas.microsoft.com/identity/claims/objectidentifier": "{guid}",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress": "<EMAIL>",
"puid": "XXXXXXXXXXXXXXXX",
"http://schemas.microsoft.com/identity/claims/identityprovider": "example.com",
"altsecid": "1:example.com:XXXXXXXXXXX",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier": "<hash string="">",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname": "Tom",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname": "FitzMacken",
"name": "<NAME>",
"http://schemas.microsoft.com/claims/authnmethodsreferences": "pwd",
"groups": "{guid}",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name": "example.com#<EMAIL>",
"wids": "{guid}",
"appid": "{guid}",
"appidacr": "0",
"http://schemas.microsoft.com/identity/claims/scope": "user_impersonation",
"http://schemas.microsoft.com/claims/authnclassreference": "1",
"ipaddr": "000.000.000.000"
},
"properties": {
"statusCode": "Conflict",
"statusMessage": "{\"Code\":\"Conflict\",\"Message\":\"Website with given name mysite already exists.\",\"Target\":null,\"Details\":[{\"Message\":\"Website with given name
mysite already exists.\"},{\"Code\":\"Conflict\"},{\"ErrorEntity\":{\"Code\":\"Conflict\",\"Message\":\"Website with given name mysite already exists.\",\"ExtendedCode\":
\"54001\",\"MessageTemplate\":\"Website with given name {0} already exists.\",\"Parameters\":[\"mysite\"],\"InnerErrors\":null}}],\"Innererror\":null}"
},
...
Du kan se **Egenskaber** indeholder oplysninger i json om handlingen mislykkedes.
Du kan bruge den **– detaljeret** og **- vv** muligheder for at se flere oplysninger fra loggene. Brug den **– detaljeret** mulighed for at få vist trinnene handlingerne gennemfører på `stdout`. Brug indstillingen **- vv** for en komplet anmodning historik. Meddelelserne, der indeholder ofte vigtige oplysninger om årsagen om fejl.
3. For at fokusere på statusmeddelelsen for mislykkedes poster, skal du bruge følgende kommando:
azure group log show ExampleGroup --json | jq -r ".[] | select(.status.value == \"Failed\") | .properties.statusMessage"
## <a name="use-deployment-operations-to-troubleshoot"></a>Brug installationshandlinger til at foretage fejlfinding af
1. Få den overordnede status for en installation med kommandoen **Vis azure gruppe installation** . I eksemplet herunder mislykkedes installationen.
azure group deployment show --resource-group ExampleGroup --name ExampleDeployment
info: Executing command group deployment show
+ Getting deployments
data: DeploymentName : ExampleDeployment
data: ResourceGroupName : ExampleGroup
data: ProvisioningState : Failed
data: Timestamp : 2015-08-27T20:03:34.9178576Z
data: Mode : Incremental
data: Name Type Value
data: --------------- ------ ------------
data: siteName String ExampleSite
data: hostingPlanName String ExamplePlan
data: siteLocation String West US
data: sku String Free
data: workerSize String 0
info: group deployment show command OK
2. Hvis du vil se meddelelsen til mislykkedes handlinger for en installation, skal du bruge:
azure group deployment operation list --resource-group ExampleGroup --name ExampleDeployment --json | jq ".[] | select(.properties.provisioningState == \"Failed\") | .properties.statusMessage.Message"
## <a name="next-steps"></a>Næste trin
- Hjælp til løsning af fejl bestemt-installation, skal du se [løse almindelige fejl, når du installerer ressourcer til Azure med Azure ressourcestyring](resource-manager-common-deployment-errors.md).
- Hvis du vil lære at bruge overvågningslogge til at overvåge andre typer handlinger, se [overvåge forskellige handlinger med ressourcestyring](resource-group-audit.md).
- For at validere din installation, inden du udfører den, skal du se [Implementer en ressourcegruppe med Azure ressourcestyring skabelon](resource-group-template-deploy.md).
|
markdown
|
<gh_stars>1-10
import * as moment from 'moment';
import { Moment } from '../src';
const momentjs = (d?: number | string | Date) => new Moment({ date: d });
describe('parse', () => {
it('now', () => {
const now = new Date();
expect(momentjs(now).valueOf()).toBe(moment(now).valueOf());
});
it('format: 20130208', () => {
const date = '20130208';
expect(momentjs(date).valueOf()).toBe(moment(date).valueOf());
});
it('format: 2013-02-08', () => {
const date = '2013-02-08';
expect(momentjs(date).valueOf()).toBe(moment(date).valueOf());
});
it('format: 2013-02-08', () => {
const date = '2013-02-08';
expect(momentjs(date).valueOf()).toBe(moment(date).valueOf());
});
it('format: 2018-05-02 11:12:13', () => {
const date = '2018-05-02 11:12:13';
expect(momentjs(date).valueOf()).toBe(moment(date).valueOf());
});
it('format: 2018-05-02 11:12:13.998', () => {
const date = '2018-05-02 11:12:13.998';
expect(momentjs(date).valueOf()).toBe(moment(date).valueOf());
});
it('format: 2018-05-02T11:12:13Z', () => {
const date = '2018-05-02T11:12:13Z';
expect(momentjs(date).valueOf()).toBe(moment(date).valueOf());
});
it('format: 1546569450994', () => {
const date = 1546569450994;
expect(momentjs(date).valueOf()).toBe(moment(date).valueOf());
});
});
|
typescript
|
Four of the country's top prosecutors who are facing scrutiny – and even recall efforts – over their progressive agendas pushed back on their opponents Tuesday while defending their policies, which critics have blamed for an uptick in violent crime in each of their respective jurisdictions.
The discussion on changing the criminal justice system was part of a virtual meeting moderated by Melina Abdullah, a civic leader and professor at California State University, Los Angeles. District attorneys Chesa Boudin of San Francisco, George Gascon of Los Angeles County and Larry Krasner of Philadelphia attended, as did Kim Foxx, the state attorney for Cook County, Illinois.
Boudin and Gascon are currently facing recall attempts. All four DAs have implemented efforts to reduce incarceration and directives that represent a change from the traditional tough-on-crime approach.
"We should never walk away from the fact that reform is actually good for safety and health in the community," Gascon said. "We should be very proud of the fact that the path that we're taking is avoiding, not only the systemic racism, but all the mistakes of the past. "
Much of the panel blamed most crimes on several factors: poverty, racism, access to mental health care and over-policing.
The moves, however, come as violent crime has skyrocketed across the country amid brazen acts by offenders, with some having been arrested and released back onto the street time and time again. In California, Gascon helped author Proposition 47, a statewide ballot measure approved by voters that downgraded property thefts below $950 to misdemeanors.
Critics have blamed the measure for an uptick in brazen retail thefts across the state. San Francisco became the site of so many of those incidents that Walgreens closed multiple stores over concerns. In Los Angeles County, thieves had taken to following victims home from shopping malls and restaurants to rob them at home or in secluded areas.
In Chicago, murders and gun violence increased in 2021 following several years of declines.
Gascon's other policies include barring prosecutors from trying juveniles as adults, which has been walked back, and not seeking cash bail or enhancement charges for repeat offenders.
Krasner said he believes Gascon and Boudin will come out of the recall efforts unscathed. Both cited big-money donors behind the recalls and what they characterized as misinformation about their policies. Krasner also assailed the Democratic Party for not supporting a more progressive criminal justice agenda and the DAs facing recall campaigns.
"So what do they do when they cannot beat us in elections? They try to end democracy and. . . they recall," he said. "We're going to convince our colleagues in the Democratic Party that instead of running away from criminal justice reform, they better run at it and hug as hard as they possibly can. "
"The reality is that Donald Trump knows how to turn out ‘Duck Dynasty’ and a bunch of guys with long beards who want to kidnap people and if Democrats don't stop acting like it's the Clinton era and rejecting progressives and rejecting criminal justice reform, then they will not turn out the sensible and progressive and young and Black and brown folks that they need to beat this bunch of fascists," he added.
Foxx, meanwhile, elaborated on "transformative justice," which she described as the recognition that the current system isn't working.
"What we know is that healthy, thriving communities where people's basic and fundamental needs are met, where people feel loved and nurtured have less crime. It's just a fact," she said.
|
english
|
---
title: Ação da macro AbrirProcedimentoArmazenado
TOCTitle: OpenStoredProcedure macro action
ms:assetid: b14dbb82-7c8a-0ace-e251-46599551a490
ms:mtpsurl: https://msdn.microsoft.com/library/Ff822003(v=office.15)
ms:contentKeyID: 48547142
ms.date: 09/18/2015
mtps_version: v=office.15
f1_keywords:
- vbaac10.chm187628
f1_categories:
- Office.Version=v15
ms.localizationpriority: medium
ms.openlocfilehash: 5da86224211362c4819f7f5a49e3509c900f319a
ms.sourcegitcommit: a1d9041c20256616c9c183f7d1049142a7ac6991
ms.translationtype: MT
ms.contentlocale: pt-BR
ms.lasthandoff: 09/24/2021
ms.locfileid: "59611876"
---
# <a name="openstoredprocedure-macro-action"></a>Ação da macro AbrirProcedimentoArmazenado
**Aplica-se ao**: Access 2013, Office 2013
Em um projeto do Access, você pode usar a ação **AbrirProcedimentoArmazenado** para abrir um procedimento armazenado em modo Folha de Dados, em modo Design de procedimento armazenado ou Visualizar Impressão. Esta ação executa o procedimento armazenado nomeado quando aberta em modo Folha de Dados. Você pode selecionar o modo de entrada de dados do procedimento armazenado e restringir os registros exibidos pelo procedimento armazenado.
> [!NOTE]
> Essa ação não será permitida se o banco de dados não for confiável.
## <a name="setting"></a>Setting
A ação **AbrirProcedimentoArmazenado** tem os seguintes argumentos.
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th><p>Argumento da ação</p></th>
<th><p>Descrição</p></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>Nome do Procedimento</strong></p></td>
<td><p>O nome do procedimento armazenado que será aberto. A <strong>caixa Nome do</strong> Procedimento na seção <strong>Argumentos de</strong> Ação do painel Construtor de Macros mostra todos os procedimentos armazenados no banco de dados atual. Esse é um argumento obrigatório. Se você executar uma macro que contém a ação <strong>AbrirProcedimentoArmazenado</strong> em um banco de dados biblioteca, o Microsoft Access procurará o procedimento armazenado com esse nome primeiro no banco de dados biblioteca e depois no banco de dados atual.</p></td>
</tr>
<tr class="even">
<td><p><strong>View</strong></p></td>
<td><p>O modo de exibição no qual o procedimento armazenado será aberto. Clique em <strong>Folha de Dados</strong>, <strong>Design</strong>, <strong>Visualizar Impressão</strong>, <strong>Tabela Dinâmica</strong> ou <strong>Gráfico Dinâmico</strong> na caixa <strong>Modo de Exibição</strong>. O padrão é <strong>Folha de Dados</strong>.</p></td>
</tr>
<tr class="odd">
<td><p><strong>Modo de Dados</strong></p></td>
<td><p>O modo de entrada de dados do procedimento armazenado. Isso se aplica somente a procedimentos armazenados abertos no modo Folha de Dados. Clique em <strong>Adicionar</strong> (o usuário pode adicionar novos registros, mas não pode exibir ou editar os existentes), <strong>Editar</strong> (o usuário pode exibir ou editar os registros existentes e adicionar novos) ou <strong>Somente Leitura</strong> (o usuário só pode exibir registros). O padrão é <strong>Editar</strong>.</p></td>
</tr>
</tbody>
</table>
## <a name="remarks"></a>Comentários
Esta ação é semelhante a clicar duas vezes no procedimento armazenado do Painel de Navegação ou a clicar com o botão direito do mouse no procedimento armazenado do Painel de Navegação e selecionar o comando desejado.
Alternar para o modo Design enquanto o procedimento armazenado é aberto remove a configuração do argumento **Modo de Dados** do procedimento armazenado. Essa configuração não entra em vigor, mesmo se o usuário retorna para o modo Folha de Dados.
> [!TIP]
> - Você pode arrastar um procedimento armazenado do Painel de Navegação para uma linha de ação de macro. Isso cria automaticamente uma ação **AbrirProcedimentoArmazenado** que abre o procedimento armazenado em modo Folha de Dados.
> - Se você não deseja exibir as mensagens do sistema que normalmente aparecem quando um procedimento armazenado é executado (indicando que ele é um procedimento armazenado e mostrando quantos registros serão afetados), use a ação **DefinirAviso** para suprimir a exibição dessas mensagens.
Para executar a ação **AbrirProcedimentoArmazenado** em um módulo do VBA (Visual Basic for Applications), use o método **OpenStoredProcedure** do objeto **DoCmd**.
|
markdown
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.