text stringlengths 1 1.04M | language stringclasses 25 values |
|---|---|
package net.mcft.copy.wearables.common.impl;
import net.mcft.copy.wearables.api.IWearablesContainer;
import net.mcft.copy.wearables.common.WearablesContainerData;
import net.minecraft.container.Container;
public class WearablesContainerImpl
{
public static IWearablesContainer from(Container container)
{ return ((WearablesContainerData.IAccessor)container).getWearablesData(true); }
}
| java |
When talent, dream and team work come together, age is just a number. With his invention, Mohammed Rifath Sharook has proved that today.
Sharook developed an interest in space science while he was studying in Class VIII because of his father who was a space research scientist. “We would always talk about space and the universe when I was a child. I used to tell him that I will design a satellite one day,” said Sharook. This passion for space research has made him one of the leading scientists in a Chennai-based space organisation called Space Kidz India (SKI).
After his father’s death in 2008, he garnered support to realise his dream. “My greatest supporters are my mother, uncle and Dr. Srimathy Kesavan, CEO of SKI, who constantly supported me,” he adds.
Sharook participated in a space challenge contest, ‘Cubes of Space’, for young inventors. This challenge was organised by an education company called ‘I doodle Learning’. He led the project and created the satellite along with his team Vinay Bharadwaj, Tanishq Dwivedi, Yagna Sai, Abdul Khasif and Gobinath. He named it KalamSat to demonstrate his admiration for renowned space scientist, A. P. J. Abdul Kalam.
“Creating a private space research agency such as Space X India is our next aim,” says Sharook. | english |
use std::fs;
use test_utils::{ensure_file_contents, project_root};
use super::*;
#[test]
fn generate_package_json_config() {
let s = Config::json_schema();
let schema = format!("{:#}", s);
let mut schema = schema
.trim_start_matches('{')
.trim_end_matches('}')
.replace(" ", " ")
.replace("\n", "\n ")
.trim_start_matches('\n')
.trim_end()
.to_string();
schema.push_str(",\n");
// Transform the asciidoc form link to markdown style.
//
// https://link[text] => [text](https://link)
let url_matches = schema.match_indices("https://");
let mut url_offsets = url_matches.map(|(idx, _)| idx).collect::<Vec<usize>>();
url_offsets.reverse();
for idx in url_offsets {
let link = &schema[idx..];
// matching on whitespace to ignore normal links
if let Some(link_end) = link.find(|c| c == ' ' || c == '[') {
if link.chars().nth(link_end) == Some('[') {
if let Some(link_text_end) = link.find(']') {
let link_text = link[link_end..(link_text_end + 1)].to_string();
schema.replace_range((idx + link_end)..(idx + link_text_end + 1), "");
schema.insert(idx, '(');
schema.insert(idx + link_end + 1, ')');
schema.insert_str(idx, &link_text);
}
}
}
}
let package_json_path = project_root().join("editors/code/package.json");
let mut package_json = fs::read_to_string(&package_json_path).unwrap();
let start_marker = " \"$generated-start\": {},\n";
let end_marker = " \"$generated-end\": {}\n";
let start = package_json.find(start_marker).unwrap() + start_marker.len();
let end = package_json.find(end_marker).unwrap();
let p = remove_ws(&package_json[start..end]);
let s = remove_ws(&schema);
if !p.contains(&s) {
package_json.replace_range(start..end, &schema);
ensure_file_contents(&package_json_path, &package_json)
}
}
#[test]
fn generate_config_documentation() {
let docs_path = project_root().join("docs/user/generated_config.adoc");
let expected = ConfigData::manual();
ensure_file_contents(&docs_path, &expected);
}
fn remove_ws(text: &str) -> String {
text.replace(char::is_whitespace, "")
}
#[cfg(test)]
pub fn manual(fields: &[(&'static str, &'static str, &[&str], &str)]) -> String {
fields
.iter()
.map(|(field, _ty, doc, default)| {
let name = format!("rust-analyzer.{}", field.replace("_", "."));
let doc = doc_comment_to_string(*doc);
format!("[[{}]]{} (default: `{}`)::\n+\n--\n{}--\n", name, name, default, doc)
})
.collect::<String>()
}
| rust |
<gh_stars>10-100
insertI18nJS();
function insertI18nJS(){
var language="en";
var ctx = $("#contextPath").val();
if (language.indexOf("ko") > -1){
document.writeln('<script type="text/javascript" src="' + ctx + '/js/i18n/message/MessageResource_ko.js"></script>');
document.writeln('<script type="text/javascript" src="' + ctx + '/js/i18n/message/TooltipMessage_ko.js"></script>');
} else if (language.indexOf("cn") > -1) {
document.writeln('<script type="text/javascript" src="' + ctx + '/js/i18n/message/MessageResource_cn.js"></script>');
document.writeln('<script type="text/javascript" src="' + ctx + '/js/i18n/message/TooltipMessage_cn.js"></script>');
} else {
document.writeln('<script type="text/javascript" src="' + ctx + '/js/i18n/message/MessageResource_en.js"></script>');
document.writeln('<script type="text/javascript" src="' + ctx + '/js/i18n/message/TooltipMessage_en.js"></script>');
}
}
function getI18nMsg(key, args){
var result = resource[key];
if (args && args != null) {
var i;
for(i = 0; i < args.length; i++) {
result = result.replace("{" + i + "}", args[i]);
}
}
return result;
}
function getTooltipMsg(key) {
return tooltips[key];
}
function getAdvanceMsg(key) {
return advances[key];
}
function getShownMsg(key, type) {
var msg = "";
if (type == "tt") {
msg = tooltips[key];
} else if (type = "ad") {
msg = advances[key];
}
return msg;
} | javascript |
"I do not discount the States’ concerns," he wrote."Even the federal government acknowledges 'that the end of the Title 42 orders will likely have disruptive consequences.' But the current border crisis is not a COVID crisis. And courts should not be in the business of perpetuating administrative edicts designed for one emergency only because elected officials have failed to address a different emergency. We are a court of law, not policymakers of last resort."Read more:
Biden got on live tv in Ga saying everyone gets amnesty is first 100 days in office igniting the invasion only to then stop the wall n ignore pleas for fed Asst from Abbot! 6 million unvaxed illegals thanks to Joe during a pandemic! Another action of his proving he doesn’t care about the American people. He needs to go, go straight to jail and his leaders with him.
RedRaiderSports - Staff Predictions: Will Texas Tech capture eighth win at Texas Bowl?
The case of the Supreme Court that just can't seem to stop talkingThe Supreme Court justices have been known for their discipline when it comes to talking. But as of late, they've been talking, talking, talking ... sometimes more than doubling their allotted time for oral arguments. Can't stop narcissism!
A Year of Dominance and Defiance at the Supreme CourtThis was a year that was split into “before” and “after” the Supreme Court’s decision to overrule Roe v. Wade. “Soul-searching about the Court and the rule of law has rarely been as cynical or as fundamental,” jeanniesgersen writes. JeannieSGersen “A institucionalização do Judiciário” JeannieSGersen Within a few weeks, Americans lost the right to clean water, clean air, and safe workplaces; to abortion, and reproductive freedom; to safety from concealed firearms, and to a secular public education free from Christian religious indoctrination. JeannieSGersen 🗞 The fairness score of this tweet is 📈0.57 (Our method is still at the experimental stage!).
The order was put in place by former President Donald Trump at the beginning of the COVID pandemic — essentially putting the nation’s asylum laws on hold — and the Biden administration leaned on it as a tool to handle the surge of migration to the border, using it to turn away asylum seekers more than two million times over the last two years.
Under the rule, migrants are denied the opportunity to plead their asylum case.
Immigrants rights advocates and Democrats have long sought its repeal, arguing the order flouts asylum laws and is no longer excusable as the pandemic is now largely under control.
Immigration experts say Title 42 has actually worsened matters at the border by driving up the number of migrants who try repeatedly to enter the country. Rather than be detained and given court dates, many are turned back immediately, often to try and cross the border again.
In his dissent, Gorsuch wrote that"the emergency on which" the Title 42 policy was"premised has long since lapsed."
"I do not discount the States’ concerns," he wrote."Even the federal government acknowledges 'that the end of the Title 42 orders will likely have disruptive consequences.' But the current border crisis is not a COVID crisis. And courts should not be in the business of perpetuating administrative edicts designed for one emergency only because elected officials have failed to address a different emergency. We are a court of law, not policymakers of last resort."
But Republicans and some moderate Democrats, especially those in border districts, have argued it is the only effective tool in place to manage the number of migrants seeking to enter the country.
The fate of the order has been caught up in the courts since the Centers for Disease Control moved to lift it this spring.
Texas and other states sued at the time, and a federal district judge blocked the Biden administration from lifting it. But in a separate case, advocacy groups sued to force the administration to scrap Title 42, and a federal judge last month ordered Biden to let Title 42 expire on Dec. 21. The GOP states urged the Supreme Court to step in, and Chief Justice John Roberts put the plan on hold until the high court decided whether to take up the case.
The administration has been under pressure from Texas Republicans and some Democrats for weeks to do more to prepare for tens of thousands of asylum-seekers expected to try to enter the country.
The White House has surged resources to the border, including dispatching a record 23,000 Border Patrol agents, as well as 1,000 processing coordinators. It has also added new ground detection systems and automated surveillance towers and stood up 10 soft-sided facilities to hold migrants.
The Biden administration says it is also planning to more quickly deport migrants who do not qualify for asylum and more aggressively prosecute repeat offenders and smugglers as it returns to the asylum laws that were in place before the pandemic.
The government spending bill that Congress passed in December boosted border patrol funding by 17 percent, including money to hire 300 new agents. It also included $800 million in emergency relief funding for cities struggling to handle an influx of migrants, including those along the border and Democratic-led cities in the northeast where Gov. Greg Abbott has been busing migrants for months.
| english |
import matplotlib.pyplot as plt
import librosa.display
plt.rcParams.update({'font.size': 16})
y, sr = librosa.load(librosa.util.example_audio_file())
plt.figure(figsize=(18, 7))
librosa.display.waveplot(y, sr=sr, x_axis='s')
print(sr)
plt.ylabel('Sampling Rate',fontsize=32)
plt.xlabel('Time (s)',fontsize=32)
plt.show() | python |
We keep on with the basic principle of "quality to start with, support very first, continuous improvement and innovation to meet the customers" for your management and "zero defect, zero complaints" as the quality objective. To great our service, we offer the items with all the superior top quality at the reasonable selling price for Oversized Electric Recliner , Electric Recliner Stand Up Chair , Leather Electric Recliners , We've been honest and open up. We glance ahead on your pay a visit to and developing trustworthy and long-term standing relationship.
Factory Cheap Hot Recliner Accessories – Ultimate Lift Seat Mechanism – JKY Detail:
Infinite positioning – Provides the ability to stop the mechanism in any recline position.
Gauge of steel (thickness of steel used like 8 gauge (find out what it is )
Firm main Ottoman footrest support.
Swivel or standard base available.
Heavy duty load Actuator.
Passed 25,000 cycle test on 180 Kgs. (Add our testing )
Related Product Guide:
To meet the customers' over-expected pleasure , now we have our potent staff to offer our greatest general service which includes internet marketing, sales, planning, output, quality controlling, packing, warehousing and logistics for Factory Cheap Hot Recliner Accessories – Ultimate Lift Seat Mechanism – JKY , The product will supply to all over the world, such as: Sheffield, Manila, Albania, We would very much welcome an opportunity to do business with you and have pleasure in attaching further details of our products. Excellent quality, competitive prices,punctual delivery and dependable service can be guaranteed.
| english |
<filename>sdk/storage/storage-blob/recordings/node/blobclient/recording_download_all_parameters_set.js
let nock = require('nock');
module.exports.testInfo = {"container":"container156816829358500106","blob":"blob156816829401605267"}
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
.put('/container156816829358500106')
.query(true)
.reply(201, "", [ 'Content-Length',
'0',
'Last-Modified',
'Wed, 11 Sep 2019 02:18:13 GMT',
'ETag',
'"0x8D7365E4CCB989A"',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'1071b366-c01e-0024-0c47-68ffb2000000',
'x-ms-client-request-id',
'37fcd7c7-be56-45df-993c-4b298c3a5bc5',
'x-ms-version',
'2019-02-02',
'Date',
'Wed, 11 Sep 2019 02:18:13 GMT' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
.put('/container156816829358500106/blob156816829401605267', "Hello World")
.reply(201, "", [ 'Content-Length',
'0',
'Content-MD5',
'sQqNsWTgdUEFt6mb5y4/5Q==',
'Last-Modified',
'Wed, 11 Sep 2019 02:18:14 GMT',
'ETag',
'"0x8D7365E4D0BF948"',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'fbebed5c-701e-001f-0f47-68bdec000000',
'x-ms-client-request-id',
'9671b46b-82ac-4fc1-803e-3929c50e60f2',
'x-ms-version',
'2019-02-02',
'x-ms-content-crc64',
'YeJLfssylmU=',
'x-ms-request-server-encrypted',
'true',
'Date',
'Wed, 11 Sep 2019 02:18:13 GMT' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
.get('/container156816829358500106/blob156816829401605267')
.reply(206, "H", [ 'Content-Length',
'1',
'Content-Type',
'application/octet-stream',
'Content-Range',
'bytes 0-0/11',
'Last-Modified',
'Wed, 11 Sep 2019 02:18:14 GMT',
'Accept-Ranges',
'bytes',
'ETag',
'"0x8D7365E4D0BF948"',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'4090de90-f01e-0027-2a47-68fcb5000000',
'x-ms-client-request-id',
'7abee656-faa8-4d06-9bb4-1518818ca8c6',
'x-ms-version',
'2019-02-02',
'x-ms-tag-count',
'0',
'x-ms-creation-time',
'Wed, 11 Sep 2019 02:18:14 GMT',
'x-ms-blob-content-md5',
'sQqNsWTgdUEFt6mb5y4/5Q==',
'x-ms-lease-status',
'unlocked',
'x-ms-lease-state',
'available',
'x-ms-blob-type',
'BlockBlob',
'x-ms-server-encrypted',
'true',
'Access-Control-Expose-Headers',
'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Accept-Ranges,Content-Length,Date,Transfer-Encoding',
'Access-Control-Allow-Origin',
'*',
'x-ms-content-crc64',
'MlSW/U5mnKQ=',
'Date',
'Wed, 11 Sep 2019 02:18:14 GMT' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
.get('/container156816829358500106/blob156816829401605267')
.reply(206, "e", [ 'Content-Length',
'1',
'Content-Type',
'application/octet-stream',
'Content-MD5',
'4WcXl8UuFfdjOAtF6EHsMg==',
'Content-Range',
'bytes 1-1/11',
'Last-Modified',
'Wed, 11 Sep 2019 02:18:14 GMT',
'Accept-Ranges',
'bytes',
'ETag',
'"0x8D7365E4D0BF948"',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'b7b4885d-901e-005a-2e47-68607d000000',
'x-ms-client-request-id',
'2d930231-24a1-4615-ba54-c70132e4ce51',
'x-ms-version',
'2019-02-02',
'x-ms-tag-count',
'0',
'x-ms-creation-time',
'Wed, 11 Sep 2019 02:18:14 GMT',
'x-ms-blob-content-md5',
'sQqNsWTgdUEFt6mb5y4/5Q==',
'x-ms-lease-status',
'unlocked',
'x-ms-lease-state',
'available',
'x-ms-blob-type',
'BlockBlob',
'x-ms-server-encrypted',
'true',
'Access-Control-Expose-Headers',
'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Accept-Ranges,Content-Length,Date,Transfer-Encoding',
'Access-Control-Allow-Origin',
'*',
'Date',
'Wed, 11 Sep 2019 02:18:14 GMT' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
.get('/container156816829358500106/blob156816829401605267')
.reply(400, "<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>BothCrc64AndMd5RangeHeaderPresent</Code><Message>Both x-ms-range-get-content-crc64 header and x-ms-range-get-content-md5 header are present.\nRequestId:8a959415-f01e-0068-3647-6838ad000000\nTime:2019-09-11T02:18:15.6154811Z</Message></Error>", [ 'Content-Length',
'293',
'Content-Type',
'application/xml',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'8a959415-f01e-0068-3647-6838ad000000',
'x-ms-client-request-id',
'7560b1fc-98c4-4f52-93d7-0465458dfa7c',
'x-ms-version',
'2019-02-02',
'x-ms-error-code',
'BothCrc64AndMd5RangeHeaderPresent',
'Access-Control-Expose-Headers',
'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding',
'Access-Control-Allow-Origin',
'*',
'Date',
'Wed, 11 Sep 2019 02:18:15 GMT' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
.delete('/container156816829358500106')
.query(true)
.reply(202, "", [ 'Content-Length',
'0',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'2b542b1b-b01e-002b-2d47-681244000000',
'x-ms-client-request-id',
'ba157f5d-a30f-4ec3-8866-c80d688c6369',
'x-ms-version',
'2019-02-02',
'Date',
'Wed, 11 Sep 2019 02:18:15 GMT' ]);
| javascript |
<reponame>petafuel/FueliFinTS
package net.petafuel.fuelifints.communication;
import junit.framework.Assert;
import net.petafuel.fuelifints.FinTSServer;
import net.petafuel.fuelifints.FinTSVersionSwitch;
import net.petafuel.fuelifints.IFinTSController;
import net.petafuel.fuelifints.protocol.FinTSPayload;
import net.petafuel.fuelifints.protocol.fints3.FinTS3Controller;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.conn.SchemePortResolver;
import org.apache.http.conn.UnsupportedSchemeException;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.ssl.SSLContextBuilder;
import org.apache.http.util.EntityUtils;
import org.junit.Test;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import java.util.Properties;
import static org.mockito.Matchers.anyObject;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class NIOSSLRequestListenerThreadTest {
FinTSCommunicationHandler currentRequest;
//@todo fix Test
public void testRun() throws Exception {
Properties systemProps = System.getProperties();
systemProps.put("javax.net.ssl.trustStore", "src/test/resources/keystore/truststore");
systemProps.put("javax.net.ssl.trustStorePassword", "<PASSWORD>");
System.setProperties(systemProps);
FinTSServer server = mock(FinTSServer.class);
NIOSSLRequestListenerThread thread = new NIOSSLRequestListenerThread(8081, server);
IFinTSController controller = mock(FinTS3Controller.class);
when(server.addRequest((FinTSCommunicationHandler) anyObject())).then(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
Object[] args = invocationOnMock.getArguments();
if (args.length > 0 && args[0] instanceof FinTSCommunicationHandler)
currentRequest = (FinTSCommunicationHandler) args[0];
return true;
}
});
when(controller.newRequest((FinTSPayload) anyObject(), eq(FinTSCommunicationHandler.CommunicationChannel.SSL))).thenAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
if (currentRequest != null) {
currentRequest.sendResponse("TestAnswer".getBytes(), false);
}
currentRequest = null;
return true;
}
});
FinTSVersionSwitch.controller = controller;
thread.start();
Thread.sleep(2000); //wait for server to start
SSLContext sslContext = new SSLContextBuilder().build();
SSLConnectionSocketFactory sslSocketFactory = new SSLConnectionSocketFactory(sslContext, new HostnameVerifier() {
@Override
public boolean verify(String s, SSLSession sslSession) {
return true;
}
});
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
httpClientBuilder.setSSLSocketFactory(sslSocketFactory);
httpClientBuilder.setSchemePortResolver(new SchemePortResolver() {
@Override
public int resolve(HttpHost httpHost) throws UnsupportedSchemeException {
return 8081;
}
});
CloseableHttpClient httpClient = httpClientBuilder.build();
HttpPost httpPost = new HttpPost("https://localhost:8081");
StringEntity entity = new StringEntity("HNHBK:1:3+000000000120+300+0+1'HKIDN:2:2+280:20041144+9999999999+0+0'HKVVB:3:2+0+0+0+123 Banking Android+0.3'HNHBS:4:1+1");
httpPost.setEntity(entity);
HttpResponse response = httpClient.execute(httpPost);
Thread.sleep(1000);
String responseString = EntityUtils.toString(response.getEntity());
Assert.assertTrue(responseString.equals("TestAnswer"));
}
}
| java |
import { element, by, ElementFinder } from 'protractor';
export class ProductComponentsPage {
createButton = element(by.id('jh-create-entity'));
deleteButtons = element.all(by.css('jhi-product div table .btn-danger'));
title = element.all(by.css('jhi-product div h2#page-heading span')).first();
async clickOnCreateButton() {
await this.createButton.click();
}
async clickOnLastDeleteButton() {
await this.deleteButtons.last().click();
}
async countDeleteButtons() {
return this.deleteButtons.count();
}
async getTitle() {
return this.title.getAttribute('jhiTranslate');
}
}
export class ProductUpdatePage {
pageTitle = element(by.id('jhi-product-heading'));
saveButton = element(by.id('save-entity'));
cancelButton = element(by.id('cancel-save'));
titleInput = element(by.id('field_title'));
priceInput = element(by.id('field_price'));
imageInput = element(by.id('file_image'));
async getPageTitle() {
return this.pageTitle.getAttribute('jhiTranslate');
}
async setTitleInput(title) {
await this.titleInput.sendKeys(title);
}
async getTitleInput() {
return this.titleInput.getAttribute('value');
}
async setPriceInput(price) {
await this.priceInput.sendKeys(price);
}
async getPriceInput() {
return this.priceInput.getAttribute('value');
}
async setImageInput(image) {
await this.imageInput.sendKeys(image);
}
async getImageInput() {
return this.imageInput.getAttribute('value');
}
async save() {
await this.saveButton.click();
}
async cancel() {
await this.cancelButton.click();
}
getSaveButton(): ElementFinder {
return this.saveButton;
}
}
export class ProductDeleteDialog {
private dialogTitle = element(by.id('jhi-delete-product-heading'));
private confirmButton = element(by.id('jhi-confirm-delete-product'));
async getDialogTitle() {
return this.dialogTitle.getAttribute('jhiTranslate');
}
async clickOnConfirmButton() {
await this.confirmButton.click();
}
}
| typescript |
<gh_stars>1-10
export const lighthouseNames = {
html: 'lhreport.html',
json: 'lhreport.json',
} as const;
export const lighthouseCategories = ['performance', 'accessibility', 'best-practices', 'seo'] as const;
| typescript |
<gh_stars>1-10
/*
* Copyright (c) 2005-2011 Grameen Foundation USA
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
* See also http://www.apache.org/licenses/LICENSE-2.0.html for an
* explanation of the license and how it is applied.
*/
package org.mifos.accounts.loan.business.matchers;
import org.hamcrest.Description;
import org.hamcrest.TypeSafeMatcher;
import org.mifos.accounts.loan.business.OriginalLoanFeeScheduleEntity;
public class OriginalLoanFeeScheduleEntityMatcher extends TypeSafeMatcher<OriginalLoanFeeScheduleEntity> {
private OriginalLoanFeeScheduleEntity feeScheduleEntity;
public OriginalLoanFeeScheduleEntityMatcher(OriginalLoanFeeScheduleEntity feeScheduleEntity) {
this.feeScheduleEntity = feeScheduleEntity;
}
@Override
public boolean matchesSafely(OriginalLoanFeeScheduleEntity originalLoanFeeScheduleEntity) {
return feeScheduleEntity.getInstallmentId().equals(originalLoanFeeScheduleEntity.getInstallmentId());
}
@Override
public void describeTo(Description description) {
//To change body of implemented methods use File | Settings | File Templates.
}
}
| java |
TOKYO, Mar 12 – Japan paused on Friday to mark five years since an offshore earthquake spawned a monster tsunami that left about 18,500 people dead or missing along its northeastern coast and sparked the worst nuclear disaster in a quarter century.
Emperor Akihito, Empress Michiko, Prime Minister Shinzo Abe and other participants at a national ceremony in Tokyo bowed their heads along with residents across the affected region at 2:46 pm (0546 GMT) the exact moment on March 11, 2011 the magnitude 9. 0 quake struck under the Pacific Ocean.
The massive earthquake unleashed a giant wall of water that swallowed schools and entire neighborhoods, with unforgettable images of panicked residents fleeing to higher ground and vehicles and ships bobbing in the swirling waters of flooded towns.
The waves also swamped power supplies at the Fukushima Daiichi plant, causing reactor meltdowns that released radiation in the most dangerous nuclear disaster since Chernobyl in 1986.
In the northern city of Sendai in Miyagi prefecture — the region that suffered the most deaths — survivors and bereaved relatives gathered at a Buddhist statue built for the repose of victims’ souls in front of a huge breakwater at Arahama beach where massive waves crashed ashore five years ago.
Some joined hands in prayer, while a woman threw a bouquet of flowers into the sea.
Police and firefighters were seen combing beaches along the Pacific coast in continuing efforts to find evidence of victims, including bones, as many families say they still cannot abandon hope of seeing their loved ones again.
Besides the number of people killed in the quake and tsunami, about 3,400 deaths from causes such as illness and suicide have been linked to the aftermath of the tragedy.
In remarks at the solemn event in Tokyo inside the National Theatre, 82-year-old Akihito spoke of those who were forced to evacuate after the disaster because of nuclear contamination.
“I feel pain in my heart when I think of people who still could not return home,” he said.
The crisis forced tens of thousands of residents near the stricken plant to flee their homes, farms and fishing boats. Some areas remain uninhabitable, though in others residents have been cleared to return.
As night fell in Sendai, residents gathered at a park where thousands of candles were arranged on the ground to form the Japanese-language phrase “toward the future light”.
The situation remains fragile in Fukushima prefecture, where the nuclear plant suffered explosions that spread radioactive material into the surrounding countryside and ocean.
Authorities have since brought the reactors to a state of “cold shutdown” and dispatched work crews to cleanse affected houses, sweep streets and shave topsoil in “decontamination” efforts.
Tokyo Electric Power, the operator of the shuttered plant, admits it has only made small steps in what is likely to be a four-decade battle to decommission the crippled reactors.
Japan’s entire stable of reactors was shuttered in the disaster’s aftermath but Abe and utility companies have been pushing to get as many as possible back in operation — despite public opposition and legal hurdles — saying they are essential to power the world’s third-largest economy.
Only this week, a court temporarily ordered the shutdown of two reactors previously declared safe under new rules, demonstrating the ongoing battles over Japan’s energy policy. | english |
They’ve been together for years, two moderately happy couples. Now, a numbers game is threatening to tear them apart. It’s one of the reasons the Congress and NCP still haven’t decided who gets which seats — just three days before the deadline for filing nominations. Shailesh Gaikwad reports.
They’ve been together for years, two moderately happy couples. Now, a numbers game is threatening to tear them apart. It’s one of the reasons the Congress and NCP still haven’t decided who gets which seats — just three days before the deadline for filing nominations.
And why the Shiv Sena and BJP are battling to maintain order within the ranks.
Delimitation has erased the bastions of some pretty powerful people, and raised some ugly questions.
Where do they go now? Which constituency will they be given instead, and what happens to the faithful MLAs already ensconced there?
The constituency map was recently redrawn in keeping with the 2001 census. More seat were created in urban areas — which had been left lagging behind, as their populations grew but representation did not.
This is good news for you — your wants and needs are now that much more important, and your vote finally counts as much. But some seats dating back to 1971, when this exercise was last conducted, have disappeared altogether.
With the new distribution of population, most of these are rural seats, which have been merged or carved up and divided between other constituencies.
Leaving powerhouses like Opposition leader Ramdas Kadam of the Shiv Sena without a constituency — Khed in Pune has been swallowed up by Guhagar and BJP MLA Dr Vinay Natu has quit the party and floated his own outfit to fight him for it.
Once the dust has settled, though, the redrawn borders could mean a flood of funds — and political mindspace — for urban Maharashtra in general and Mumbai and Thane in particular.
With 42 per cent of the state now living in the cities and towns, about a third of the Assembly will be elected by urban Maharashtra this time.
And as the urban population rises — it is expected to hit 50 per cent by 2015 — future state governments are already preparing to pander to the cities.
“The delimitation will change the focus and face of the government,” said psephologist and political analyst Uday Nirgudkar.
Analysts say more ministers and even chief ministers may eventually be picked from the cities, particularly the Mumbai-Pune-Thane-Nashik belt.
Little wonder, then, that the Congress is more comfortable with leaders like Vilasrao Deshmukh (who kickstarted the Mumbai Makeover) and Ashok Chavan (who is well educated and considered more urban).
And it’s why the Sena is not hesitating to project Uddhav Thackeray as its chief ministerial candidate, since he too is fairly polished and more acceptable to the urban voter. | english |
.field {
resize: none;
border: 1px solid var(--primary-color);
color: var(--primary-color);
border-radius: 5px;
font-size: 1.8rem;
font-weight: 400;
padding: 1.8rem;
outline: none;
overflow-y: hidden;
height: 350px;
}
.field::placeholder {
color: var(--primary-color);
}
| css |
<reponame>TunJudge/tun-judge
{
"name": "Scala",
"dockerImage": "ghcr.io/tunjudge/lang/scala:2.13.4",
"extensions": [
"scala"
],
"allowSubmit": true,
"allowJudge": true,
"buildScript": "languages/scala/build.sh"
} | json |
<filename>app/styles/style.css
.bankid{
font-family: sans-serif;
font-size: 16px;
position: relative;
}
.bankid-img{
width: 200px;
}
.action-area{
margin: auto;
width: 70%;
}
.bankid-img, .action-area{
display: inline-block;
vertical-align: middle;
}
button.auth-sign{
background-color: #469CBE;
color: white;
border: none;
padding: 10px;
border-radius: 4px;
transition: all 0.2s cubic-bezier(.52,.39,.81,.5);
margin: 2px;
}
.input input{
padding: 9px;
margin-right: -6px;
}
.input button.auth-sign{
margin-left: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.auth-sign.inverted{
background-color: white;
color: #469CBE;
border: 1px solid #469CBE;
}
button.auth-sign:hover{
background-color: #225971;
color: white;
cursor: pointer;
}
.loading, .denied, .success{
margin: 65px;/*80+2x65 is the same width as the image*/
width: 80px;
height: 80px;
}
.loading{
border-radius: 50%;
box-shadow: 0 3px 0 0.3px #225971;
animation: rotation 1s cubic-bezier(.52,.39,.81,.5) infinite;
}
.denied, .success{
position: relative;
transform: rotate(45deg);
}
.denied:before, .denied:after, .success:before, .success:after{
content: '';
position: absolute;
background-color: #469CBE;
z-index: -1;
}
.denied:before{
height:10%;
width: 100%;
top: 45%;
}
.denied:after{
width: 10%;
height: 100%;
left: 45%;
}
.success:before{
height: 100%;
width: 10%;
right: 40%;
background-color: green;
}
.success:after{
width: 50%;
height: 10%;
bottom: 0;
right: 40%;
background-color: green;
}
@keyframes rotation{
from {
transform: rotate(0deg);
}
to{
transform: rotate(360deg);
}
}
| css |
{"text":"Appropriation is hereby authorized to be made to carry out the provisions of this chapter, and the Mayor of the District of Columbia is authorized to include in his annual estimates provision for all the expenses of the Office of the Director incident to such purposes, and for personnel.","historical":"Prior Codifications\n\n1981 Ed., § 40-1016.\n\n1973 Ed., § 40-715.\n\nEffect of Amendments\n\nD.C. Law 16-279 substituted \"Office of the Director\" for \"Office of the Director and Recorder\".\n\nLegislative History of Laws\n\nFor legislative history of D.C. Law 2-139, see Historical and Statutory Notes following § 50-2201.03.\n\nFor Law 16-279, see notes following § 50-312.\n\nChange in Government\n\nThis section originated at a time when local government powers were delegated to a Board of Commissioners of the District of Columbia (see Acts Relating to the Establishment of the District of Columbia and its Various Forms of Governmental Organization in Volume 1). Section 401 of Reorganization Plan No. 3 of 1967 (see Reorganization Plans in Volume 1) transferred all of the functions of the Board of Commissioners under this section to a single Commissioner. The District of Columbia Self-Government and Governmental Reorganization Act, 87 Stat. 818, § 711 (D.C. Code, § 1-207.11), abolished the District of Columbia Council and the Office of Commissioner of the District of Columbia. These branches of government were replaced by the Council of the District of Columbia and the Office of Mayor of the District of Columbia, respectively. Accordingly, and also pursuant to § 714(a) of such Act (D.C. Code, § 1-207.14(a)), appropriate changes in terminology were made in this section.\n\nDC CODE § 50-1216\n\nCurrent through December 11, 2012","credits":"(July 2, 1940, 54 Stat. 740, ch. 527, § 15; Oct. 28, 1949, 63 Stat. 972, title XI, ch. 782, § 1106(a); Mar. 3, 1979, D.C. Law 2-139, § 3205(m), 25 DCR 5740; Mar. 14, 2007, D.C. Law 16-279, § 201(j), 54 DCR 903.)","sections":[],"division":{"identifier":"VIII","text":"General Laws."},"title":{"identifier":"50","text":"Motor and Non-Motor Vehicles and Traffic. (Refs & Annos)"},"subtitle":{"prefix":"IV","text":" Motorized Vehicle Registration, Inspection, Licensing."},"chapter":{"identifier":"12","text":"Liens on Motor Vehicles or Trailers."},"heading":{"title":"50","chaptersection":"1216","identifier":"50-1216","catch_text":"Appropriation."}} | json |
var classarm__compute_1_1_c_l_dequantization_layer =
[
[ "CLDequantizationLayer", "classarm__compute_1_1_c_l_dequantization_layer.xhtml#adaff01149002af4e16a6ab19bb785902", null ],
[ "CLDequantizationLayer", "classarm__compute_1_1_c_l_dequantization_layer.xhtml#a0a498fb264f4d607c52cc481397dd745", null ],
[ "configure", "classarm__compute_1_1_c_l_dequantization_layer.xhtml#a6b14fa2a92543bff4d379cafc689ba54", null ],
[ "operator=", "classarm__compute_1_1_c_l_dequantization_layer.xhtml#a7e879d333563f4c267fa128928066842", null ],
[ "run", "classarm__compute_1_1_c_l_dequantization_layer.xhtml#ad1717410afd0be936c6213a63c8005fb", null ]
]; | javascript |
<reponame>vrkansagara/ZFBlog<gh_stars>0
<article class="blog">
<h2>2011-08-17 IRC Meeting Log</h2>
<p>
Today we held the first Zend Framework community IRC meeting. Find out what
we discussed, and where you can read the transcript.
</p><p>
The meeting
was held on Freenode IRC in the #zf2-meeting channel, and moderated by
<NAME>. While sometimes boisterous, sometimes off-topic, it definitely
helped build some community spirit as well as consensus surrounding the
direction of ZF2.
</p>
<p>
Specifically, we discussed:
</p>
<ul class="ul">
<li>Format of meetings and how agendas will be created.</li>
<li>The proposal process.</li>
<li>Milestones towards ZF2's completion.</li>
</ul>
<p>
The full transcript, as well as a summary of decisions, can be found on the
<a href="http://framework.zend.com/wiki/display/ZFDEV2/2011-08-17+Meeting+Log">ZF2
wiki</a>.
</p></article>
<aside class="sidebar blog">
<div class="metadata">
<ul>
<li>Posted on <b>2011-08-17 14:50:00</b>.</li>
<li>Last updated on <b>2011-08-17 14:50:00</b>.</li>
</ul>
</div>
<div class="metadata">
<h4>Tags for this entry</h4>
<p class="tags"></p>
</div>
</aside>
| html |
{
"name": "golang-lib",
"version": "1.4.4",
"private": false,
"description": "Golang's packages updater and builder, for convert github.com URL from import to src tool.",
"main": "app.js",
"bin": {
"golib": "app.js"
},
"scripts": {
"test": "echo 'Error: no test specified' && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/ddrrqq/golib.git"
},
"keywords": [
"go",
"golang",
"golib",
"goimport",
"gosrc"
],
"author": "ddrrqq",
"license": "MIT"
}
| json |
This is what usually happens when a biggie releases on a holiday [in this case, a partial holiday of Holi] and that too on a Thursday; there is a big drop that comes on the next day. Well, that wasn't really the case though for Kesari which held itsefl really well on Friday and brought in as much as Rs. 16.70 crore. The film had collected Rs. 21.06 crore on its opening day and considering that, there is good sustenance already.
There is a weekend ahead for the film and since Friday was a working day, audience footfalls were comparatively low during the morning and the afternoon shows. Of course, the evening and night shows turned out to be much better with the result the film collected well in its final tally.
All eyes are now on the collections that come in on Saturday. The film doesn't really have any competition around it which means the ground is wide open for its 3600 screens to bring in good occupancy. While at the bare minimum one would expect the numbers to be in excess of the opening day, anything over and above that would mean a real good result.
The Akshay Kumar starrer has collected Rs. 37.76 crore so far and while Rs. 60 crore would be definitely crossed today, a bigger number would ensure that the extended weekend is in the range of Rs. 85-90 crore at the Box Office.
| english |
<reponame>jwzimmer/tv-tropes<gh_stars>1-10
{"ElementalArmor": ["ElementalPowers", "ImprovisedArmour", "InstantArmor", "WreathedInFlames", "SubTrope", "ElementalBarrier", "SisterTrope", "ElementalWeapon", "SandBlaster", "DishingOutDirt", "ShockAndAwe", "MakeMeWannaShout", "PoisonousPerson", "ExtraOreDinary", "ArcVillain", "BlowYouAway", "AnIcePerson", "HoistByHisOwnPetard", "SandBlaster", "DishingOutDirt", "ShockAndAwe", "MakeMeWannaShout", "PoisonousPerson", "ExtraOreDinary", "ArcVillain", "BlowYouAway", "AnIcePerson", "HoistByHisOwnPetard", "HesJustHiding", "HesJustHiding", "ChromeChampion", "AnIcePerson", "ShockAndAwe", "EnergyAbsorption", "HardLight", "ChromeChampion", "AnIcePerson", "ShockAndAwe", "EnergyAbsorption", "HardLight", "ChromeChampion", "WreathedInFlames", "WreathedInFlames", "SquishyWizard", "SkeletonsInTheCoatCloset", "BlowYouAway", "FireIceLightning", "SkeletonsInTheCoatCloset", "BlowYouAway", "FireIceLightning", "DishingOutDirt", "ExtraOreDinary", "DisabilitySuperpower"]} | json |
<reponame>wonyk/free-code-camp-projects
function openNav() {
document.getElementById('navbar').style.display = 'flex'
}
function closeNav() {
document.getElementById('navbar').style.display = 'none'
} | javascript |
<filename>language/e2e-testsuite/src/tests/account_universe/bad_transaction.rs
// Copyright (c) The Libra Core Contributors
// SPDX-License-Identifier: Apache-2.0
use language_e2e_tests::account_universe::{
default_num_transactions, run_and_assert_gas_cost_stability, AccountUniverseGen,
InsufficientBalanceGen, InvalidAuthkeyGen, SequenceNumberMismatchGen,
};
use proptest::{collection::vec, prelude::*};
proptest! {
// These tests are pretty slow but quite comprehensive, so run a smaller number of them.
#![proptest_config(ProptestConfig::with_cases(32))]
#[test]
fn bad_sequence(
universe in AccountUniverseGen::success_strategy(2),
txns in vec(any_with::<SequenceNumberMismatchGen>((0, 10_000)), 0..default_num_transactions()),
) {
run_and_assert_gas_cost_stability(universe, txns)?;
}
#[test]
fn bad_auth_key(
universe in AccountUniverseGen::success_strategy(2),
txns in vec(any_with::<InvalidAuthkeyGen>(()), 0..default_num_transactions()),
) {
run_and_assert_gas_cost_stability(universe, txns)?;
}
#[test]
fn insufficient_balance(
universe in AccountUniverseGen::success_strategy(2),
txns in vec(any_with::<InsufficientBalanceGen>((1, 10_001)), 0..default_num_transactions()),
) {
run_and_assert_gas_cost_stability(universe, txns)?;
}
}
| rust |
Wednesday May 20, 2020,
Utsav Somani, India Partner for AngelList, has launched a new micro venture capital fund called iSeed. The fund, which is dedicated to Indian startups, plans to invest in 30 early-stage companies with a particular focus on technology.
The fund has also been anchored by Naval Ravikant, a prominent angel investor in the Silicon Valley, and plans to invest an average cheque of $150,000.
In a post on Medium, Utsav said,
Besides Naval Ravikant, iSeed is backed by founders of Xiaomi, Thumbtack, Flutter, Bolt, and WikiHow. The list also includes partners from investment firms such as DST Global and Matrix Partners.
According to Utsav, the investors in iSeed were carefully selected based on their knowledge and willingness to help portfolio companies scale.
“They can act as a bridge for Indian founders, who are increasingly targeting international customers and investors,” he said.
The backers of iSeed have started or invested in 24 unicorns worth over $200 billion combined. Micro venture capitalists typically invest along with or after angel investors. Mostly, these funds invest with other venture funds in a funding round.
AngelList India has backed startups including BharatPe, Open Bank, DealShare, Mall91, and Yulu Bikes, and since its launch has made 140 investments.
Given the environment of coronavirus, investments into startups has been steadily coming down over the last two months. In the last week of April and running into May, weekly investments into startups have actually fallen below $100 million.
This reflects the broader trend where investors are hesitant to place larger cheque on the table, given the huge uncertainty on how coronavirus is going to play out. However, the investor focus seems to be largely on Series A, B, and pre-Series A kind of investments, where the quantum of fund is typically not large.
| english |
<reponame>IOINITID/react-hooks-kit
export { useModalState } from './useModalState';
export { useToggle } from './useToggle';
export { useSetState } from './useSetState';
| typescript |
import multer from "multer";
import path from "path";
import mongoose from "mongoose";
const storage = multer.diskStorage({
destination: (req, file, cb) => {
cb(null, path.join(__dirname, "..", "static", "images"));
},
filename: (req, file, cb) => {
const id = mongoose.Types.ObjectId();
req.body.id = id;
const fileName = id + file.originalname.replace(/ /g, "_");
req.body.fileName = fileName;
cb(null, fileName);
}
});
const fileFilter = (req, file, cb) => {
const allowedTypes = ["image/png", "image/jpeg", "image/jpg"];
if (allowedTypes.indexOf(file.mimetype) > -1) cb(null, true);
else cb(new Error("Unsupported file type"), false);
};
const upload = multer({
storage,
limits: {
fileSize: 1024 * 1024 * 5
},
fileFilter
}).single("image");
export default upload;
| javascript |
http://data.doremus.org/artist/3bbac6f7-4ec8-314a-90a3-a8760bc8b042
http://data.doremus.org/artist/b20f3837-de6a-32c3-ab19-0a2bb96942e0
http://data.doremus.org/artist/e71e1cae-778c-3e8b-bc46-c57fb7950c3e | json |
<gh_stars>100-1000
/* ==UserStyle==
@name compact impress watch
@namespace USO Archive
@author hi2z
@description `画像などが大きくなって見辛くなった Impress watch を多少見やすく。Headline は表示順も変更。`
@version 20170402.5.46
@license NO-REDISTRIBUTION
@preprocessor uso
==/UserStyle== */
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("impress.co.jp") {
/* --------
ページ全体
-------- */
* { font-size: 12px; }
html { width: 100%; }
body { width: 100%; }
#page,
header
{
width: 100%!important;
}
#page-wrap,
#main
{
width:80%;
}
/* ---
記事
--- */
article > .contents {
font-size: 14px!important;
}
.mainContents a {
font-size: 100%;
}
/* 画像は全て小さく */
.image img
{
max-height: 40px!important;
max-width: 100%!important;
}
.image
{
height: 50%!important;
width: 80px!important;
}
#main-image-wrap img
{
max-width: 800px!important;
max-height: 800px!important;
}
/* [おすすめ記事]のスリム化 */
.recommend li.item div.body div.image p
{
height: 100%!important;
width: 100%!important;
}
.recommend li.item div.body div.text
{
margin-left: 50px!important;
width: 100%!important;
}
.recommend li.item div.body div.text p
{
width: 100%!important;
}
/* タグ非表示 */
ul.breadcrumb
{
display: none;
}
/* 記事タイトルのスリム化 */
.daily-block li.item.news
{
height: 70px;
}
li.item .body .text .title,
li.item .body .text .outline
{
width: 80%;
float: left;
}
li.item .body .text .outline
{
font-size: 0.8em!important;
color: dimgray!important;
}
li.item .body .text p
{
line-height: 15px!important;
}
/* ヘッダー領域のカスタマイズ*/
body.gnav-hide header {
padding-bottom: 100px!important;
}
/* 常にグローバルナビが表示されるようにする */
body.gnav-hide #global-nav
{
position: fixed!important;
z-index: 99;
right: 0;
top: 0;
left: 0;
padding-left: 0;
}
/* グローバルナビの2段目は薄く */
#global-list .inline.row2 li
{
opacity: 0.4;
}
/* グローバルナビの2段目がいらない場合はこちら */
/*
#global-list .inline.row2
{
display: none;
}
#global-nav,
#global-nav > div > *
{
height: 35px!important;
}
#site-logo
{
background-size: 50%;
background-position: center;
}
*/
/* カテゴリーナビは使わない */
#category-nav div.list,
p.close
{
display: none!important;
}
body.gnav-hide #category-nav
{
position: static!important;
}
/* 検索窓は常に表示 */
#category-nav > #search-area > form
{
display: block!important;
}
#category-nav.open > #search-area > p.open
{
background-position: 13px 10px;
color: #33498e!important;
}
#search-area {
left:85px!important;
}
/* おすすめ記事 */
.recommend * { font-size: 11px!important; }
/* -------
サイドバーのスリム化
--------- */
#extra
{
width:20%;
}
#extra *,
aside.list.static p
{
font-size: 9px!important;
line-height: normal;
}
#special-site-ul .item,
#special-site-ul .item .body
{
height: 80px!important;
}
#extra .body .text .title
{
width: 170px!important;
}
/* social ボタンのスリム化 */
#extra .social
{
width: 200px;
height: 50px;
padding: 0;
margin: 0;
}
#extra .social p
{
font-size: 10px;
width: 200px;
border: none;
height: auto;
margin: 0;
}
#extra .social ul
{
width: 100px;
}
#extra .social a
{
background-size: 20px!important;
width: 20px!important;
height: 20px!important;
}
/* ----------------
表示順のカスタマイズ
---------------- */
article[role="main"]
{
display: flex;
flex-direction: column;
}
/* News Headline(Headline) */
.heading.news-headline { order: 0; }
/* アクセスランキング */
.heading.ranking.topics.list { order: 90; }
/* トップ記事 */
.top-news.topics { order: 100; }
/* おすすめ記事 */
aside.recommend { order: 105; }
/* 発売日情報(AV watch) */
aside#bd-shiplist { order: 106; }
/* 新作ゲーム発売日一覧(Game watch) */
aside#game-shiplist { order: 106; }
/* amazon ゲーム売り上げランキング(Game watch) */
aside#game-amazon-ranking { order: 107; }
/* サイト内記事紹介(?) */
.watch.static.center { order: 180; }
/* Headline 選書 */
.heading.sensho { order: 190; }
/* 編集部から */
.from-editors.list-2col { order: 200; }
/* その他非表示要素 */
.ad.haikei,
.ad.billboard,
.item.ad
{
display: none;
}
} | css |
<reponame>cs-fullstack-2019-spring/project1-portfolio-gkg901
/*INFINITE BACKGROUND SCROLLING*/
.overlay{
/*position:fixed;*/
background:url(https://www.toptal.com/designers/subtlepatterns/patterns/dark_wood.png);
-webkit-animation:100s scroll infinite linear;
-moz-animation:100s scroll infinite linear;
-o-animation:100s scroll infinite linear;
-ms-animation:100s scroll infinite linear;
animation:100s scroll infinite linear;
top:0;
left:0;
width:100%;
height:100%;
}
/*PAGE IDENTIFIERS FOR NAV*/
.onPage{
border-left: 1px solid #FFF;
border-right: 1px solid #FFF;
}
/*NAV BUTTON STYLING*/
button:hover{
border-bottom: 1px solid #FFF;
}
/*NAV BAR GRID*/
#nav{
/*margin-top: 1%;*/
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-row: 1;
grid-column: 2/3;
width: 800px;
margin-left: auto;
margin-right: auto;
}
/*NAV BAR BUTTON STYLING*/
button {
border: none;
background: none;
width: 200px;
margin-top: 4%;
display: inline;
color: #FFF;
font: 24px Lobster;
text-shadow: 0px 4px 3px rgba(0, 0, 0, 0.4),
0px 8px 13px rgba(0, 0, 0, 0.1),
0px 18px 23px rgba(0, 0, 0, 0.1);
}
/*EMBEDDED VIDEO STYLING AND PLACEMENT*/
.iframe-container {
overflow: hidden;
/*padding-top: 56.25%;*/
position: relative;
/*height: 100vh;*/
}
.iframe-container iframe {
border: 0;
height: 125px;
left: 0;
/*position: absolute;*/
top: 0;
width: 75%;
/*padding-top: 55px;*/
padding-left: 13%;
}
/* 4x3 Aspect Ratio */
.iframe-container-4x3 {
/*padding-top: 75%;*/
}
.iframe-container iframe:first-child {
border: 0;
height: 125px;
left: 0;
/*position: absolute;*/
top: 0;
width: 75%;
padding-top: 45px;
}
/*TITLE STYLING*/
h1{
font: 30px Lobster;
color: #FFF;
text-align: center;
margin-top: 4%;
text-shadow: 0px 4px 3px rgba(0,0,0,0.4),
0px 8px 13px rgba(0,0,0,0.1),
0px 18px 23px rgba(0,0,0,0.1);
}
/*SCROLLING BACKGROUND STYLING*/
@-webkit-keyframes scroll{
100%{
background-position:0px -3000px;
}
}
@-moz-keyframes scroll{
100%{
background-position:0px -3000px;
}
}
@-o-keyframes scroll{
100%{
background-position:0px -3000px;
}
}
@-ms-keyframes scroll{
100%{
background-position:0px -3000px;
}
}
@keyframes scroll{
100%{
background-position:0px -3000px;
}
}
/* visited link */
a:visited {
color: #FFF;
text-decoration: none;
}
a:link {
text-decoration: none;
} | css |
{
"id": 86449372,
"name": "<NAME>",
"is_illegal": false,
"is_custom": false,
"text": "During damage calculation, if your monster battles an opponent\u0027s monster: Your battling monster\u0027s ATK becomes that opponent\u0027s monster\u0027s ATK, during that damage calculation only, also, the controller of any monster destroyed by that battle takes damage equal to its original ATK, at the end of the Damage Step. If your \"@Ignister\" monster would be destroyed by battle, you can banish this card from your GY instead. You can only activate 1 \"TA.I. Strike\" per turn.",
"images": [
"https://storage.googleapis.com/ygoprodeck.com/pics/86449372.jpg"
],
"type": "Spell",
"spell_type": "Quick-Play"
} | json |
<gh_stars>0
// Code generated by go-swagger; DO NOT EDIT.
package model
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"strconv"
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/errors"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// DetailedEnvironmentResponse detailed environment response
// swagger:model DetailedEnvironmentResponse
type DetailedEnvironmentResponse struct {
// Cloud platform of the environment.
CloudPlatform string `json:"cloudPlatform,omitempty"`
// Name of the credential of the environment.
CredentialName string `json:"credentialName,omitempty"`
// Datalake clusters created in the environment.
// Unique: true
DatalakeClusters []*StackViewResponse `json:"datalakeClusters"`
// description of the resource
Description string `json:"description,omitempty"`
// id of the resource
ID int64 `json:"id,omitempty"`
// Kerberos configs in the environment.
// Unique: true
KerberosConfigs []*KerberosResponse `json:"kerberosConfigs"`
// Kubernetes configurations in the environment.
// Unique: true
KubernetesConfigs []*KubernetesConfigResponse `json:"kubernetesConfigs"`
// LDAP configurations in the environment.
// Unique: true
LdapConfigs []*LdapConfigResponse `json:"ldapConfigs"`
// Location of the environment.
Location *LocationResponse `json:"location,omitempty"`
// name of the resource
Name string `json:"name,omitempty"`
// Proxy configurations in the environment.
// Unique: true
ProxyConfigs []*ProxyConfigResponse `json:"proxyConfigs"`
// RDS configurations in the environment.
// Unique: true
RdsConfigs []*RDSConfigResponse `json:"rdsConfigs"`
// Regions of the environment.
Regions *CompactRegionResponse `json:"regions,omitempty"`
// Workload clusters created in the environment.
// Unique: true
WorkloadClusters []*StackViewResponse `json:"workloadClusters"`
// workspace
Workspace *WorkspaceResourceResponse `json:"workspace,omitempty"`
}
// Validate validates this detailed environment response
func (m *DetailedEnvironmentResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateDatalakeClusters(formats); err != nil {
res = append(res, err)
}
if err := m.validateKerberosConfigs(formats); err != nil {
res = append(res, err)
}
if err := m.validateKubernetesConfigs(formats); err != nil {
res = append(res, err)
}
if err := m.validateLdapConfigs(formats); err != nil {
res = append(res, err)
}
if err := m.validateLocation(formats); err != nil {
res = append(res, err)
}
if err := m.validateProxyConfigs(formats); err != nil {
res = append(res, err)
}
if err := m.validateRdsConfigs(formats); err != nil {
res = append(res, err)
}
if err := m.validateRegions(formats); err != nil {
res = append(res, err)
}
if err := m.validateWorkloadClusters(formats); err != nil {
res = append(res, err)
}
if err := m.validateWorkspace(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *DetailedEnvironmentResponse) validateDatalakeClusters(formats strfmt.Registry) error {
if swag.IsZero(m.DatalakeClusters) { // not required
return nil
}
if err := validate.UniqueItems("datalakeClusters", "body", m.DatalakeClusters); err != nil {
return err
}
for i := 0; i < len(m.DatalakeClusters); i++ {
if swag.IsZero(m.DatalakeClusters[i]) { // not required
continue
}
if m.DatalakeClusters[i] != nil {
if err := m.DatalakeClusters[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("datalakeClusters" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *DetailedEnvironmentResponse) validateKerberosConfigs(formats strfmt.Registry) error {
if swag.IsZero(m.KerberosConfigs) { // not required
return nil
}
if err := validate.UniqueItems("kerberosConfigs", "body", m.KerberosConfigs); err != nil {
return err
}
for i := 0; i < len(m.KerberosConfigs); i++ {
if swag.IsZero(m.KerberosConfigs[i]) { // not required
continue
}
if m.KerberosConfigs[i] != nil {
if err := m.KerberosConfigs[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("kerberosConfigs" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *DetailedEnvironmentResponse) validateKubernetesConfigs(formats strfmt.Registry) error {
if swag.IsZero(m.KubernetesConfigs) { // not required
return nil
}
if err := validate.UniqueItems("kubernetesConfigs", "body", m.KubernetesConfigs); err != nil {
return err
}
for i := 0; i < len(m.KubernetesConfigs); i++ {
if swag.IsZero(m.KubernetesConfigs[i]) { // not required
continue
}
if m.KubernetesConfigs[i] != nil {
if err := m.KubernetesConfigs[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("kubernetesConfigs" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *DetailedEnvironmentResponse) validateLdapConfigs(formats strfmt.Registry) error {
if swag.IsZero(m.LdapConfigs) { // not required
return nil
}
if err := validate.UniqueItems("ldapConfigs", "body", m.LdapConfigs); err != nil {
return err
}
for i := 0; i < len(m.LdapConfigs); i++ {
if swag.IsZero(m.LdapConfigs[i]) { // not required
continue
}
if m.LdapConfigs[i] != nil {
if err := m.LdapConfigs[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ldapConfigs" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *DetailedEnvironmentResponse) validateLocation(formats strfmt.Registry) error {
if swag.IsZero(m.Location) { // not required
return nil
}
if m.Location != nil {
if err := m.Location.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("location")
}
return err
}
}
return nil
}
func (m *DetailedEnvironmentResponse) validateProxyConfigs(formats strfmt.Registry) error {
if swag.IsZero(m.ProxyConfigs) { // not required
return nil
}
if err := validate.UniqueItems("proxyConfigs", "body", m.ProxyConfigs); err != nil {
return err
}
for i := 0; i < len(m.ProxyConfigs); i++ {
if swag.IsZero(m.ProxyConfigs[i]) { // not required
continue
}
if m.ProxyConfigs[i] != nil {
if err := m.ProxyConfigs[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("proxyConfigs" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *DetailedEnvironmentResponse) validateRdsConfigs(formats strfmt.Registry) error {
if swag.IsZero(m.RdsConfigs) { // not required
return nil
}
if err := validate.UniqueItems("rdsConfigs", "body", m.RdsConfigs); err != nil {
return err
}
for i := 0; i < len(m.RdsConfigs); i++ {
if swag.IsZero(m.RdsConfigs[i]) { // not required
continue
}
if m.RdsConfigs[i] != nil {
if err := m.RdsConfigs[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("rdsConfigs" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *DetailedEnvironmentResponse) validateRegions(formats strfmt.Registry) error {
if swag.IsZero(m.Regions) { // not required
return nil
}
if m.Regions != nil {
if err := m.Regions.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("regions")
}
return err
}
}
return nil
}
func (m *DetailedEnvironmentResponse) validateWorkloadClusters(formats strfmt.Registry) error {
if swag.IsZero(m.WorkloadClusters) { // not required
return nil
}
if err := validate.UniqueItems("workloadClusters", "body", m.WorkloadClusters); err != nil {
return err
}
for i := 0; i < len(m.WorkloadClusters); i++ {
if swag.IsZero(m.WorkloadClusters[i]) { // not required
continue
}
if m.WorkloadClusters[i] != nil {
if err := m.WorkloadClusters[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("workloadClusters" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *DetailedEnvironmentResponse) validateWorkspace(formats strfmt.Registry) error {
if swag.IsZero(m.Workspace) { // not required
return nil
}
if m.Workspace != nil {
if err := m.Workspace.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("workspace")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *DetailedEnvironmentResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *DetailedEnvironmentResponse) UnmarshalBinary(b []byte) error {
var res DetailedEnvironmentResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
| go |
<gh_stars>10-100
{"geometry": {"type": "Point", "coordinates": [-98.53, 43.15]}, "type": "Feature", "id": "57356", "properties": {"other_cities": "Ravinia", "city": "Lake Andes", "state": "SD", "county": "Charles Mix County"}} | json |
import { usePicker } from '../hooks'
import { createProvider } from './utlis'
export const PickerProvider = createProvider(usePicker, 'PickerProvider')
| typescript |
<gh_stars>0
import React from 'react';
import './LoginPage.css';
import { useLogin } from './hooks';
import LoginForm from './LoginForm';
const propTypes = {};
export const hooks = {
useLogin,
};
const LoginPage = ({ onSuccess }) => {
const [login, { loading, requiresLogin, error, session }] = hooks.useLogin();
if (session) {
onSuccess(session);
}
return (
<div className="LoginPage">
{requiresLogin ? (
<LoginForm
className="LoginPage-form"
loading={loading}
error={error}
onLogin={({ username, password }) =>
login({ variables: { username, password } })
}
/>
) : (
''
)}
</div>
);
};
LoginPage.propTypes = propTypes;
export default LoginPage;
| javascript |
<reponame>hltfbk/E3C-Corpus
{
"authors": [
{
"author": "<NAME>"
},
{
"author": "<NAME>"
},
{
"author": "<NAME>"
},
{
"author": "<NAME>"
}
],
"doi": "10.1186/1471-2407-5-67",
"publication_date": "2005-07-02",
"id": "EN119721",
"url": "https://pubmed.ncbi.nlm.nih.gov/15989692",
"source": "BMC cancer",
"source_url": "",
"licence": "CC BY",
"language": "en",
"type": "pubmed",
"description": "",
"text": "A 46 year old man presented to hospital with massive hepatomegaly, elevated liver enzymes and increased lactate three weeks following resection of a malignant melanoma from his shoulder (Clark level 5). Initially stable, he decompensated 24 to 48 hours subsequent to presentation with respiratory failure requiring mechanical ventilation, distributive shock requiring high dose vasopressor infusion, coagulopathy refractory to plasma infusion, progressive rise in liver enzymes and severe metabolic abnormalities including hyperkalemia, acidosis, hyperphosphatemia, hyperuricemia and hypocalcemia. Refractory to aggressive physiologic support he received palliation. Autopsy revealed >80% liver infiltration by metastatic malignant melanoma."
} | json |
Madhya Pradesh: Female inmates of Indore's Central Jail prepare herbal colours on the occasion of Holi (Image: ANI)
Indore Central Jail Superintendent, Alka Sonkar said, For the first time, we've tried to make organic colours from flowers, vegetables & fruits. Female inmates are being trained for it. " (Image: ANI)
Uttar Pradesh CM-designate Yogi Adityanath attends a function on the occasion of 'Holika Dahan' in Gorakhpur (Image: ANI)
CM-designate Yogi Adityanath said, People have started playing Holi from March 10 onwards itself. I want to thank you for choosing a govt of law & order. This election showed that truth will always triumph. "(Image: ANI)
Preparations begin for the celebration of the two-day festival of Holi in Laxmi Nagar market in Delhi as people throng the shops for festivities-related shopping. (Image: ANI) | english |
<reponame>lareaves/web_development_basics<filename>mtrester-css.css<gh_stars>1-10
body {
background-color: #121212;
margin-top: 30px; }
div#content {
margin-left: auto;
margin-right: auto;
width: 75%;
font-family: arial;
font-size: 12px;
color: #6f6f6f;
background-color: #171717; }
div#magicbox {
padding: 15px;
margin-left: auto;
margin-right: auto;
width: 75%;
font-family: arial;
font-size: 12px;
color: #9400D3;
background-color: #1d1d1d; }
h1 {
color: #9400D3; } | css |
export { default as default } from './src/group';
export { default as Option } from './src/option';
| javascript |
The excitement and glitz of a Casino may be brought to your own event by hosting a casino night. An exciting and entertaining atmosphere may be created at any party with a casino theme, whether it's a birthday bash, a business meeting, or just a night out with friends. Here are five tried-and-true suggestions to make your casino night a smashing success and leave your guests talking about it for weeks to come.
Planning is the key to a fun and profitable casino night. The size of the party, the number of casino games, and the level of sophistication in the décor can all be affected by the money you allocate to the event.
Find a nice place to hold the celebration; it might be your home, a hired hall, or a posh hotel ballroom. Consider checking out Casino Party Rentals New York, NY that come with a casino themed atmosphere and you won’t have to do much just renting out. Make sure there's enough room for everyone to sit comfortably, a bar, and a few gaming tables. Prepare a schedule including the event's setup, game rotations, breaks, and any planned entertainment.
Create the exciting atmosphere of a real casino for your guests by paying attention to the details. In order to create a genuine casino environment, it is important to have high-quality equipment such as professional card tables, roulette wheels, and slot machines. You might think about getting professional dealers to run the games because their knowledge and charm will impress your guests.
The atmosphere and allure of a casino floor can be captured with the help of ambient lighting, which includes dimmed and colorful lights. Glitzy accents, color schemes centered around red and black, and decorative elements inspired by playing cards are just a few ways to dress up a space. Your guests will feel more at home in the atmosphere if gentle music is played in the background that is reminiscent of a casino.
The same may be said for your casino night: more variety means more fun. Casinos should have a wide variety of games to appeal to a wide range of players. Poker, roulette, craps, and other traditional table games are necessary additions. To spice things up, plan some themed games that fit in with the event's goals or the interests of the attendees.
Set up game tables with instructions and rules posted conspicuously so guests may enjoy themselves without feeling overwhelmed. Make sure there are helpful dealers there to explain the rules to novices. To encourage friendly rivalry without the high stakes of real gambling, offering play money or chips in return for rewards is a great option.
Having tasty food and drinks available is essential for a successful casino night party. Arrange for a buffet or catering service to provide a variety of fancy finger snacks, appetizers, and main courses to complement the formal setting. Use dish names that seem like they belong in a casino to keep with the theme.
Pair the meal with a drink from the bar's extensive drink menu, which includes traditional cocktails, mocktails, and alcohol-free substitutes. One option is to provide cocktails with names like "Blackjack Blush" and "Lucky Lemonade," both of which play off of the event's casino theme. Keep the drinks coming by hiring enough bartenders.
Include memorable, fun additions at your casino party to take it to the next level. Choose a weekend like Friday or Saturday to keep the fun on. To keep the mood lively in between rounds of games, you might choose to hire a professional entertainer. Make a photo booth where people can take pictures using casino-themed props.
Raffles and other prize giveaways spread throughout the night will have guests on the edge of their seats. Prizes might range from modest tokens to a larger sum awarded to the guest who ends the evening with the most play money. Use icebreaker games and activities to get your visitors talking to one another.
What Else Should You Know About Throwing Casino Parties?
To throw a truly spectacular casino party, you need to put in a lot of time and effort into preparing every last aspect. You can give your visitors a night of glitz, excitement, and top-notch enjoyment if you keep three things in mind: authenticity, variety, and entertainment. Keep in mind that the secret to success is making sure that everyone has a good time while feeling like they're in a real casino.
| english |
from typing import Tuple
import haiku as hk
import jax.numpy as np
from chex import assert_axis_dimension
from ramsey._src.attention.attention import Attention
from ramsey._src.family import Family, Gaussian
from ramsey._src.neural_process.neural_process import NP
__all__ = ["ANP"]
# pylint: disable=too-many-instance-attributes,duplicate-code
class ANP(NP):
"""
An attentive neural process
Implements the core structure of an attentive neural process [1], i.e.,
a deterministic encoder, a latent encoder, and a decoder with a
cross-attention module.
References
----------
.. [1] <NAME>, et al. "Attentive Neural Processes."
International Conference on Learning Representations. 2019.
"""
def __init__(
self,
decoder: hk.Module,
latent_encoder: Tuple[hk.Module, hk.Module],
deterministic_encoder: Tuple[hk.Module, Attention],
family: Family = Gaussian(),
):
"""
Instantiates an attentive neural process
Parameters
----------
decoder: hk.Module
the decoder can be any network, but is typically an MLP. Note
that the _last_ layer of the decoder needs to
have twice the number of nodes as the data you try to model
latent_encoder: Tuple[hk.Module, hk.Module]
a tuple of two `hk.Module`s. The latent encoder can be any network,
but is typically an MLP. The first element of the tuple is a neural
network used before the aggregation step, while the second element
of the tuple encodes is a neural network used to
compute mean(s) and standard deviation(s) of the latent Gaussian.
deterministic_encoder: Tuple[hk.Module, Attention]
a tuple of a `hk.Module` and an Attention object. The deterministic
encoder can be any network, but is typically an MLP
family: Family
distributional family of the response variable
"""
super().__init__(
decoder, latent_encoder, deterministic_encoder[0], family
)
self._deterministic_cross_attention = deterministic_encoder[1]
@staticmethod
def _concat_and_tile(z_deterministic, z_latent, num_observations):
if z_latent.shape[1] == 1:
z_latent = np.tile(z_latent, [1, num_observations, 1])
representation = np.concatenate([z_deterministic, z_latent], axis=-1)
assert_axis_dimension(representation, 1, num_observations)
return representation
def _encode_deterministic(
self,
x_context: np.ndarray,
y_context: np.ndarray,
x_target: np.ndarray,
):
xy_context = np.concatenate([x_context, y_context], axis=-1)
z_deterministic = self._deterministic_encoder(xy_context)
z_deterministic = self._deterministic_cross_attention(
x_context, z_deterministic, x_target
)
return z_deterministic
| python |
//! High level abstraction over the `mount` and `umount2` system calls.
//!
//! If the `loop` feature is enabled (default), additionally supports creating loopback devices
//! automatically when mounting an iso or squashfs file.
//!
//! # Example
//!
//! ```rust,no_run
//! extern crate sys_mount;
//!
//! use std::process::exit;
//! use sys_mount::{
//! Mount,
//! MountFlags,
//! SupportedFilesystems,
//! Unmount,
//! UnmountFlags
//! };
//!
//! fn main() {
//! // Fetch a list of supported file systems.
//! // When mounting, a file system will be selected from this.
//! let supported = SupportedFilesystems::new().unwrap();
//!
//! // Attempt to mount the src device to the dest directory.
//! let mount_result = Mount::new(
//! "/imaginary/block/device",
//! "/tmp/location",
//! &supported,
//! MountFlags::empty(),
//! None
//! );
//!
//! match mount_result {
//! Ok(mount) => {
//! // Make the mount temporary, so that it will be unmounted on drop.
//! let mount = mount.into_unmount_drop(UnmountFlags::DETACH);
//! // Do thing with the mounted device.
//! }
//! Err(why) => {
//! eprintln!("failed to mount device: {}", why);
//! exit(1);
//! }
//! }
//! }
extern crate libc;
#[cfg(feature = "loop")]
extern crate loopdev;
#[macro_use]
extern crate bitflags;
#[macro_use]
extern crate thiserror;
mod fstype;
mod mount;
mod supported;
mod umount;
pub use self::{fstype::*, mount::*, supported::*, umount::*};
use libc::swapoff as c_swapoff;
use std::{
ffi::CString,
io::{self, Error, ErrorKind},
os::unix::ffi::OsStrExt,
path::Path,
ptr,
};
#[derive(Debug, Error)]
pub enum ScopedMountError {
#[error("cannot get list of supported file systems")]
Supported(#[source] io::Error),
#[error("could not mount partition")]
Mount(#[source] io::Error),
}
/// Mount a partition temporarily for the duration of the scoped block within.
pub fn scoped_mount<T, S: FnOnce() -> T>(
source: &Path,
mount_at: &Path,
scope: S,
) -> Result<T, ScopedMountError> {
let supported = SupportedFilesystems::new().map_err(ScopedMountError::Supported)?;
Mount::new(&source, mount_at, &supported, MountFlags::empty(), None)
.map_err(ScopedMountError::Mount)?;
let result = scope();
if let Err(why) = unmount(mount_at, UnmountFlags::empty()) {
tracing::warn!("{}: failed to unmount: {}", mount_at.display(), why);
}
Ok(result)
}
/// Unmounts a swap partition using `libc::swapoff`
pub fn swapoff<P: AsRef<Path>>(dest: P) -> io::Result<()> {
unsafe {
let swap = CString::new(dest.as_ref().as_os_str().as_bytes().to_owned());
let swap_ptr = swap.as_ref().ok().map_or(ptr::null(), |cstr| cstr.as_ptr());
match c_swapoff(swap_ptr) {
0 => Ok(()),
_err => Err(Error::new(
ErrorKind::Other,
format!(
"failed to swapoff {}: {}",
dest.as_ref().display(),
Error::last_os_error()
),
)),
}
}
}
fn to_cstring(data: &[u8]) -> io::Result<CString> {
CString::new(data).map_err(|why| {
io::Error::new(io::ErrorKind::InvalidData, format!("failed to create `CString`: {}", why))
})
}
| rust |
<filename>setup.py
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
setup(
name='anime',
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='1.2.0',
description='Declarative animation library for pygame.',
# The project's main homepage.
url='https://github.com/SodaCookie/anime',
# Author details
author='<NAME>',
author_email='<EMAIL>',
# Choose your license
license='MIT',
include_package_data = True,
package_data={
'anime.demo': ['anime/images/image1.png'],
},
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: pygame',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 3',
],
# What does your project relate to?
keywords='pygame animation anime',
# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
# List run-time dependencies here. These will be installed by pip when
# your project is installed. For an analysis of "install_requires" vs pip's
# requirements files see:
# https://packaging.python.org/en/latest/requirements.html
install_requires=['pygame']
) | python |
ISLAMABAD: The Pakistan Telecommunication Authority (PTA) on Sunday restored access to social media websites in the country.
The PTA had suspended social media including Facebook, Twitter, YouTube and Daily Motion after launching an operation to end Faizabad sit-in in Islamabad on Saturday.
Earlier, the government on Sunday directed the Pakistan Electronic Media Regulatory Authority (Pemra) to restore transmission of all news channels.
The regularity authority had taken all news channels off air in the country.
Sources said that the broadcast of news channels would be restored shortly.
They said that the media regularity body would issue guidelines for the television channels.
The Pakistan Broadcasters Association (PBA) and the All Pakistan Newspapers Society (APNS) on Saturday condemned the government’s decision to close news channels.
Sources said that the decision to restore transmission of news channels had been taken during the PM Abbasi’s meeting with Army Chief Gen Qamar Javed Bajwa on Sunday.
| english |
from .abstract import AbstractHealthcheck
class DummyHealthcheck(AbstractHealthcheck):
status = True
def __init__(self, config=None):
pass
async def is_healthy(self, vm):
return self.status
def set_status(self, healthy):
self.status = healthy
| python |
Komna/Bhadrak: At least six people were killed and two others injured in separate road accidents in Nuapada and Bhadrak districts Monday, police said. In Nuapada, five people, including a minor, were killed and a woman sustained serious injuries after the motorcycle they were all travelling on was hit by a speeding truck on National Highway-353 between Udyanbandha and Krishna villages, a police officer said. Three people died on the spot, and two others succumbed to the injuries at a hospital. The identities of the deceased and the injured were not immediately known but it is suspected that the injured woman may be the mother of the deceased minor.
In another incident, a man died and his wife was critically injured after the car they were travelling in dashed into a concrete mixer machine on National Highway-16 near Rahanja Chhak in Bhadrak district. The deceased was identified as Surendra Sahu, 45, an employee of Electricity department and a native of Asurali area in the district. His wife Sudhansubala, 40, was seriously injured in the accident while their three-year-old daughter survived the crash unhurt, police said. | english |
<gh_stars>0
{
"DocumentDbClient": {
"EndpointUri": "https://localhost:8081",
"AuthorizationKey": "<KEY>
},
"StorageAccount": {
"Name": "devstoreaccount1",
"Key": "<KEY>
"Scheme": "http",
"Endpoints": "BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;TableEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10000/devstoreaccount1;"
},
"OAuth": {
"Facebook": {
"ClientId": "652967514908861",
"ClientSecret": "8cf4ab15da3083db31e313864458b616"
},
"Google": {
"ClientId": "229435238043-uudbjbi8e0tul6evho5vk8lkmck6r1rc.apps.googleusercontent.com",
"ClientSecret": "<KEY>"
},
"Microsoft": {
"ClientId": "e75794ef-c77a-446a-a260-d03d45f361d5",
"ClientSecret": "<KEY>"
}
},
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}
| json |
<filename>src/test/java/org/mahjong4j/exceptions/MahjongTileOverFlowExceptionTest.java
package org.mahjong4j.exceptions;
import org.junit.Test;
import org.mahjong4j.MahjongTileOverFlowException;
import org.mahjong4j.Player;
import org.mahjong4j.hands.Hands;
import org.mahjong4j.hands.Kotsu;
import org.mahjong4j.hands.Mentsu;
import org.mahjong4j.tile.Tile;
import java.util.ArrayList;
import java.util.List;
import static org.mahjong4j.tile.Tile.M2;
import static org.mahjong4j.tile.Tile.P7;
/**
* TODO : lastの牌が無い場合も
*
* @author yu1ro
*/
public class MahjongTileOverFlowExceptionTest {
@Test(expected = MahjongTileOverFlowException.class)
public void testManySameMentsu() throws Exception {
int[] tiles = {
0, 2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0
};
Tile last = M2;
Hands hands = new Hands(tiles, last, new Kotsu(true, P7), new Kotsu(true, P7), new Kotsu(true, P7), new Kotsu(true, P7));
new Player(hands);
}
@Test(expected = MahjongTileOverFlowException.class)
public void testManySameMentsuList() throws Exception {
int[] tiles = {
0, 2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0
};
Tile last = M2;
List<Mentsu> mentsuList = new ArrayList<>(4);
mentsuList.add(new Kotsu(true, P7));
mentsuList.add(new Kotsu(true, P7));
mentsuList.add(new Kotsu(true, P7));
mentsuList.add(new Kotsu(true, P7));
Hands hands = new Hands(tiles, last, mentsuList);
new Player(hands);
}
} | java |
<reponame>CLBExchange/certified-token-list
{"name":"Consbeeracy Coin","symbol":"CONB","logoURI":"https://raw.githubusercontent.com/800BOT/crypto/main/Capture.PNG","decimals":0,"address":"9tghX1jRyVxXRtVkYi4sqtxVt1UFDr7YNdZA5wM8R436","chainId":101,"tags":["social-token"]} | json |
<filename>pkg/credstore/credstore_test.go
// Copyright 2020 Pivotal Software, Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package credstore_test
import (
"net/http"
"net/http/httptest"
"os"
"code.cloudfoundry.org/lager"
"github.com/cloudfoundry/cloud-service-broker/pkg/config"
"github.com/cloudfoundry/cloud-service-broker/pkg/credstore"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
var _ = Describe("Credhub Store", func() {
var logger lager.Logger
var uaaTestServer *httptest.Server
var uaaRequest *http.Request
var chTestServer *httptest.Server
var chRequest *http.Request
BeforeEach(func() {
logger = lager.NewLogger("test")
uaaTestServer = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(`{}`))
uaaRequest = r
}))
chTestServer = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(`{"data": [{"foo": "bar"}]}`))
chRequest = r
}))
})
It("sanity check (class under test is mostly just a wrapper)", func() {
credStoreConfig := &config.CredStoreConfig{
CredHubURL: chTestServer.URL,
UaaURL: uaaTestServer.URL,
UaaClientName: "my-client",
UaaClientSecret: "<PASSWORD>",
SkipSSLValidation: true,
CaCertFile: "",
StoreBindCredentials: false,
}
chStore, err := credstore.NewCredhubStore(credStoreConfig, logger)
Expect(err).To(BeNil())
cred, err := chStore.Get("/foo/bar/baz")
Expect(err).To(BeNil())
Expect(cred).NotTo(BeNil())
Expect(uaaRequest).NotTo(BeNil())
Expect(chRequest).NotTo(BeNil())
chRequest.ParseForm()
Expect(chRequest.Form["name"]).To(Equal([]string{"/foo/bar/baz"}))
})
It("sanity check cert file (class under test is mostly just a wrapper", func() {
content := []byte(`-----BEGIN CERTIFICATE-----
<KEY>
-----END CERTIFICATE-----`)
tmpfile, err := os.CreateTemp("", ".pem")
Expect(err).NotTo(HaveOccurred())
_, err = tmpfile.Write(content)
Expect(err).NotTo(HaveOccurred())
err = tmpfile.Close()
Expect(err).NotTo(HaveOccurred())
credStoreConfig := &config.CredStoreConfig{
CredHubURL: chTestServer.URL,
UaaURL: uaaTestServer.URL,
UaaClientName: "my-client",
UaaClientSecret: "my-secret",
SkipSSLValidation: true,
CaCertFile: tmpfile.Name(),
StoreBindCredentials: false,
}
chStore, err := credstore.NewCredhubStore(credStoreConfig, logger)
Expect(err).To(BeNil())
cred, err := chStore.Get("/foo/bar/baz")
Expect(err).To(BeNil())
Expect(cred).NotTo(BeNil())
Expect(uaaRequest).NotTo(BeNil())
Expect(chRequest).NotTo(BeNil())
chRequest.ParseForm()
Expect(chRequest.Form["name"]).To(Equal([]string{"/foo/bar/baz"}))
os.Remove(tmpfile.Name())
})
})
| go |
South Korea's three telcos will be banned from signing up new customers from Jan. 2013, for offering illegal subsidies, according to the Korea Communications Commission (KCC).
According to the Korean telecom regulator in a statement on Thursday, the business suspension comes after SK Telecom, KT Corporation and LG Uplus continued to offer illegal subsidies despite previous warnings.
The move comes after KCC commenced investigations on the firms over illegal subsidies for Samsung's Galaxy S3 smartphones, the Korean news site noted. In September for instance, customers could purchase the phone for 170,000 won (US$158.19) if they commited to a contract and promised to change carriers.
The suspension period is expected to range between 20 and 90 days, from early Jan. 2013, KCC officials told The Korea Times in a report. This is the third time the regulator has issued a business suspension order, as the three telcos have been suspended earlier in 2002 and 2004, the report noted.
The regulator will collect opinions from the carriers by Dec. 17, and report the results of their month-long investigation over illegal subsidies, a senior official from KCC told the Korean news site. On Dec. 28, KCC will make a final decision on the details of the punishiment, and fix the exact business suspension period according to the carrier, another senior KCC official directly involved with the matter, added.
KCC last week also warned SK Telecom and KT to stop giving illegal subsidies for Apple's latest iPhone 5 which launched in South Korea on Dec. 7, and stressed they will punish the carriers if they keep failing to abide by the law. A 16GB iPhone 5 is expected to cost 814,000 won (US$751.37), but customers who agree to change carriers can purchase the phone for 400,000 won (US$369.23) with the subsidies.
SK Telecom, KT and LG Uplus have declined to comment on the move by KCC when approached by The Korea Times, citing sensitivity of the issue.
| english |
- Lifestyle Beach Day Fashion: Tips and Tricks for a Stylish Look!
Xiaomi's flagship smartphones for this year - the Xiaomi Mi 10 and Mi 10 Pro went official back in February. As we are nearing the end of this year, rumors are rife that the next-generation flagship smartphones in the Mi 11 series are all set to be unveiled early next year.
Well, the talk is about the Mi 11 and Mi 11 Pro. These upcoming Xiaomi smartphones are believed to see the light of the day as early as January 2021. A reliable Chinese tipster has announced this launch time frame for the upcoming Mi flagship smartphones but there is no word regarding the exact launch date.
It is yet to be seen if Xiaomi will bring the Mi 11 or Mi 20 as the sequel to the Mi 10 series launched this year. If the company unveils the next-generation Mi flagship smartphone series in early 2021 with the Snapdragon 875 SoC, the flagship chipset from Qualcomm, then Xiaomi will be the first Chinese brand to use the new mobile platform. Notably, Qualcomm is likely to announce the latest chipset on December 1 for the next-generation Android flagships.
As per the machine translation of the tipster's Twitter post, Xiaomi Mi 11 has already been sent for network certification. This indicates that the new smartphone series could go official sometime in January.
As per a previous report, the Xiaomi Mi 11 is believed to flaunt a curved display and a triple-camera setup at the rear with a 108MP primary camera sensor. It is said to feature support for up to 30x zoom. Also, it is hinted that there will be an ultra-wide lens that can capture macro shots.
On the other hand, the Xiaomi Mi 11 Pro is rumored to be launched with a curved display along with a punch-hole cutout. It is said that the screen will have QHD+ resolution and a fast 120Hz refresh rate. While the display details of the standard Mi 11 aren't known, it is believed to have a similar refresh rate and resolution.
For now, there is no clarity if the Xiaomi Mi 11 Pro will arrive with a quad-camera setup at its rear. But it is reported that the smartphone might flaunt the 4-in-1 pixel binning technology and a 50MP primary camera lens. The others are believed to include a 48MP or 12MP telephoto lens. | english |
<filename>assets/biomesoplenty/blockstates/maple_leaves.json
{
"variants": {
"": [
{ "model": "biomesoplenty:block/maple_leaves1" },
{ "model": "biomesoplenty:block/maple_leaves2" },
{ "model": "biomesoplenty:block/maple_leaves3" },
{ "model": "biomesoplenty:block/maple_leaves4" },
{ "model": "biomesoplenty:block/maple_leaves5" },
{ "model": "biomesoplenty:block/maple_leaves6" },
{ "model": "biomesoplenty:block/maple_leaves7" },
{ "model": "biomesoplenty:block/maple_leaves8" }
]
}
}
| json |
<div style="font-size: small;">
<ul>
<li><a class="menuTop" href="<{$xoops_url}>/user.php"><{$smarty.const._MB_LEGACY_VACNT}></a></li>
<li><a href="<{$xoops_url}>/edituser.php"><{$smarty.const._MB_LEGACY_EACNT}></a></li>
<li><a href="<{$xoops_url}>/notifications.php"><{$smarty.const._MB_LEGACY_NOTIF}></a></li>
<li><a href="<{$xoops_url}>/user.php?op=logout"><{$smarty.const._MB_LEGACY_LOUT}></a></li>
<{if $block.flagShowInbox}>
<{if $block.new_messages > 0}>
<li><a class="highlight" href="<{$block.inbox_url}>"><{$smarty.const._MB_LEGACY_INBOX}> (<span style="color:#ff0000; font-weight: bold;"><{$block.new_messages}></span>)</a></li>
<{else}>
<li><a href="<{$block.inbox_url}>"><{$smarty.const._MB_LEGACY_INBOX}></a></li>
<{/if}>
<{/if}>
<{* <{if $block.show_adminlink}>
<a href="<{$xoops_url}>/admin.php"><{$smarty.const._MB_LEGACY_ADMENU}></a>
<{/if}> *}>
</ul>
</div>
| html |
import { runTest, TestCaseConfig } from '../runTest';
import _ from '../../src';
const cases: TestCaseConfig = {
name: 'oneOf',
cases: [
{
schema: _.oneOf([_.string, _.number]),
pass: ['1', 0],
fail: [undefined, null, true, {}, []]
}
]
};
runTest(cases);
| typescript |
/*
* Copyright (c) 2016 Network New Technologies Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.networknt.schema;
import com.fasterxml.jackson.databind.JsonNode;
import org.junit.Assert;
import org.junit.Test;
import java.util.Set;
/**
* Created by steve on 22/10/16.
*/
public class PatternPropertiesValidatorTest extends BaseJsonSchemaValidatorTest {
@Test(expected=JsonSchemaException.class)
public void testInvalidPatternPropertiesValidator() throws Exception {
JsonSchemaFactory factory = JsonSchemaFactory.getInstance();
JsonSchema schema = factory.getSchema("{\"patternProperties\":6}");
JsonNode node = getJsonNodeFromStringContent("");
Set<ValidationMessage> errors = schema.validate(node);
Assert.assertEquals(errors.size(), 0);
}
}
| java |
<filename>electron/package.json
{
"name": "crochet",
"main": "main.js",
"version": "0.1.7",
"license": "MIT",
"author": "@FaultyFunctions",
"description": "An editor for Yarn files. Forked from YarnEditor.",
"homepage": "https://github.com/FaultyFunctions/Crochet",
"repository": {
"type": "git",
"url": "git+https://github.com/FaultyFunctions/Crochet.git"
},
"bugs": {
"url": "https://github.com/FaultyFunctions/Crochet/issues"
},
"scripts": {
"build-web-app-dev": "cd .. && npm run build-dev && npm run copy-web-app",
"build-web-app": "cd .. && npm run build && npm run copy-web-app",
"start": "npm run build-web-app-dev && electron --no-sandbox .",
"build-linux": "npm run build-web-app && electron-builder --linux --publish never",
"build-windows": "npm run build-web-app && electron-builder --windows",
"build-mac": "npm run build-web-app && electron-builder --macos"
},
"dependencies": {
"dot-prop": "^4.2.1",
"electron-is": "^3.0.0"
},
"devDependencies": {
"copyfiles": "^2.1.1",
"electron": "^9.4.0",
"electron-builder": "^22.9.1"
},
"lint-staged": {
"package.json": [
"prettier-package-json --write",
"git add"
],
"*.js": [
"eslint --fix",
"git add"
]
},
"build": {
"productName": "Crochet",
"files": [
"**/*",
"build/icon.*"
],
"fileAssociations": {
"ext": "yarn",
"name": "Yarn File",
"role": "editor"
},
"win": {
"target": "nsis",
"icon": "./build/icon.ico"
},
"snap": {
"plugs": ["default", "removable-media"]
}
}
}
| json |
<filename>js/dataio.js
var nodes = [];
var elements = [];
class NGNode {
constructor(_id, _x, _y, _z) {
this.id = _id;
this.x = _x;
this.y = _y;
this.z = _z;
}
}
class NGElement {
constructor(_id, _n1, _n2, _matid, _secid) {
this.id = _id;
this.n1 = _n1;
this.n2 = _n2;
this.matid = _matid;
this.secid = _secid;
}
}
class NGMaterial {
constructor(_id, _name, _E) {
this.id = _id;
this.name = _name;
this.E = _E;
}
}
class NGSection {
constructor(_id, _area, _inertia) {
this.id = _id;
this.area = _area;
this.inertia = _inertia;
}
}
class NGLoad {
constructor(_id, _nid, _x, _y) {
this.id = _id;
this.nid = _nid;
this.x = _x;
this.y = _y;
}
}
function addData(txt)
{
// Input Tab
document.Input.rData.value = txt;
// Read Input
// Read Node
var tempArray = txt.split("\n");
for (var i=0; i<tempArray.length; i++){
if (tempArray[i].startsWith('NODE')){
var tempLine = tempArray[i].split(',');
nodes.push(new NGNode(tempLine[1],tempLine[2],tempLine[3], 0))
}
}
// Read Element
var tempArray = txt.split("\n");
for (var i=0; i<tempArray.length; i++){
if (tempArray[i].startsWith('ELEM')){
var tempLine = tempArray[i].split(',');
elements.push(new NGElement(tempLine[1],tempLine[2],tempLine[3], tempLine[4], tempLine[5]))
}
}
// export to tables
// export Node
var tabledata_node = [];
for (var i=0; i<nodes.length; i++){
var tmp = {};
tmp["id"] = nodes[i].id;
tmp["x"] = nodes[i].x;
tmp["y"] = nodes[i].y;
tmp["z"] = nodes[i].z;
tabledata_node.push(tmp);
}
// export Element
var tabledata_element = [];
for (var i=0; i<elements.length; i++){
var tmp = {};
tmp["id"] = elements[i].id;
tmp["n1"] = elements[i].n1;
tmp["n2"] = elements[i].n2;
tmp["matid"] = elements[i].matid;
tmp["secid"] = elements[i].secid;
tabledata_element.push(tmp);
}
var table0 = new Tabulator("#table_node", {
layout:"fitColumns",
height:"100%",
reactiveData: true, //turn on data reactivity
data: tabledata_node, //load data into table
columns:[
{title:"Node id", field:"id", sorter:"number", width:200},
{title:"X", field:"x", sorter:"number", formatter:"money", formatterParams:{precision:6}},
{title:"Y", field:"y", sorter:"number", formatter:"money", formatterParams:{precision:6}},
{title:"Z", field:"z", sorter: "number", formatter:"money", formatterParams:{precision:6}},
],
});
var table1 = new Tabulator("#table_element", {
layout:"fitColumns",
height:"100%",
reactiveData: true, //turn on data reactivity
data: tabledata_element, //load data into table
columns:[
{title:"Element id", field:"id", sorter:"number", width:200},
{title:"N1", field:"n1", sorter:"number"},
{title:"N2", field:"n2", sorter:"number"},
{title:"Material id", field:"matid", sorter:"number"},
{title:"Section id", field:"secid", sorter:"number"},
],
});
init();
animate();
}
// three.js part
var container;
var camera, scene, renderer;
var mesh, geopts;
// var material = new THREE.MeshBasicMaterial( { color: 0x424242, wireframe: true, opacity: 0.5 } );
function addNode() {
if ( mesh !== undefined ) {
scene.remove( mesh );
geopts.dispose();
}
// nodes
var pts = new THREE.Geometry();
for (var i = 0; i < nodes.length; i++) {
pts.vertices.push(new THREE.Vector3(
nodes[i].x,
nodes[i].y,
nodes[i].z,
));
}
const mat_pt = new THREE.PointsMaterial({
size: 0.2,
color: 0x333333,
});
mesh = new THREE.Points(pts, mat_pt);
scene.add(mesh);
// elements
var mat_lns = new THREE.LineBasicMaterial({
color: 0x333333
});
for (var i=0; i<elements.length;i++){
var tmpPts = new THREE.Geometry();
const n1 = nodes.findIndex((n) => n.id === elements[i].n1);
const n2 = nodes.findIndex((n) => n.id === elements[i].n2);
tmpPts.vertices.push(
new THREE.Vector3(nodes[n1].x, nodes[n1].y, nodes[n1].z)
);
tmpPts.vertices.push(
new THREE.Vector3(nodes[n2].x, nodes[n2].y, nodes[n2].z)
);
var ln = new THREE.Line(tmpPts, mat_lns);
scene.add(ln);
}
}
function init() {
container = document.getElementById( 'container' );
camera = new THREE.PerspectiveCamera( 35, window.innerWidth / window.innerHeight, 1, 1000 );
camera.position.z = 20;
scene = new THREE.Scene();
scene.background = new THREE.Color(0xFFFFFF);
addNode();
var helper = new THREE.GridHelper( 100, 100 );
helper.material.opacity = 0.25;
helper.material.transparent = true;
scene.add( helper );
var axes = new THREE.AxesHelper( 50 );
axes.position.set(0,0,0 );
scene.add( axes );
renderer = new THREE.WebGLRenderer( { antialias: true } );
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
container.appendChild( renderer.domElement );
var controls = new THREE.OrbitControls( camera, renderer.domElement );
window.addEventListener( 'resize', onWindowResize, false );
}
function onWindowResize() {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize( window.innerWidth, window.innerHeight );
}
function animate() {
requestAnimationFrame( animate );
render();
}
function render() {
renderer.render( scene, camera );
}
// exports.setmenu = function(){
// }
| javascript |
High-end Italian fashion giant Gucci has become the first major brand to start accepting payments in the form of the famous Bored Ape Yacht Club-affiliated ApeCoin (APE).
The move was announced last week and could provide the ApeCoin project with significant mainstream exposure, besides bringing much-needed further utility to the barely five-month-old cryptocurrency.
Following this announcement, Gucci customers in the United States will be able to purchase items in-store with APE at select stores, while the payment infrastructure will be provided by BitPay, a firm that has helped big names such as AMC Theaters accept crypto payments in the past, as per a Coin Telegraph report.
This big move towards crypto by Gucci comes despite the ongoing crypto bear market, wherein all major crypto coins like bitcoin, Ethereum, dogecoin etc. have bled red heavily.
But this is not Gucci’s first step in the crypto and NFT market. As per the report, in February 2022, Gucci kicked things off with the “SUPERGUCCI” NFT collection in collaboration with vinyl toy brand SUPERPLASTIC. The following month, Gucci rolled out the “Gucci Grail” NFT collection targeted toward owners of top NFT projects such as the BAYC.
Then in May 2022, it took another leap of faith. Gucci reportedly went on to announce plans to accept 12 crypto assets as payment methods across 111 stores in North America. The list included Bitcoin (BTC), Bitcoin Cash (BCH), Ether (ETH), Wrapped Bitcoin (WBTC), Litecoin (LTC), Shiba Inu (SHIB), Dogecoin (DOGE), and five U. S. dollar stablecoins.
Apecoin’s price has soared from nearly $6 on August 2nd (date of Gucci announcement) to $7. 4 (at the time of writing this report today), and its market cap has risen from nearly $1. 95 billion last week to $2. 29 billion (at the time of writing this report today), as per Coinmarketcap data.
For the uninitiated, APE was launched following much anticipation earlier this year in March 2022. Its accompanying decentralized autonomous organization (DAO) and governance community has since remained highly engaged and has overseen important decisions such as the vetoing of a proposal to port APE from Ethereum to a new blockchain in June 2022, as per the report.
Last month, the DAO reportedly voted in favour of several notable proposals, such as studying the feasibility of hosting an NFT conference and festival and providing APE funding for the Bored Ape Gazette to become a 24-hour news site. Additionally, the project is working on rolling out APE staking in response to a strong push from the community.
Also Read: US Based Porsche Dealer Starts Accepting Crypto For PaymentFor the latest and interesting financial news, keep reading Indiatimes Worth. Click here. | english |
<gh_stars>100-1000
package jobs
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/cloudradar-monitoring/rport/server/test/jb"
"github.com/cloudradar-monitoring/rport/share/models"
)
func TestSortByFinishedAt(t *testing.T) {
// given
ft := time.Date(2020, 10, 10, 10, 10, 10, 0, time.UTC)
j1 := jb.New(t).JID("1").Status(models.JobStatusRunning).Build().JobSummary
j2 := jb.New(t).JID("2").Status(models.JobStatusRunning).Build().JobSummary
j3 := jb.New(t).JID("3").Status(models.JobStatusRunning).Build().JobSummary
j4 := jb.New(t).JID("4").Status(models.JobStatusFailed).FinishedAt(ft.Add(time.Minute)).Build().JobSummary
j5 := jb.New(t).JID("5").Status(models.JobStatusSuccessful).FinishedAt(ft).Build().JobSummary
j6 := jb.New(t).JID("6").Status(models.JobStatusUnknown).FinishedAt(ft.Add(-time.Hour)).Build().JobSummary
testCases := []struct {
name string
desc bool
jobs []*models.JobSummary
wantJobs []*models.JobSummary
}{
{
name: "desc",
desc: true,
jobs: []*models.JobSummary{&j2, &j6, &j1, &j4, &j3, &j5},
wantJobs: []*models.JobSummary{&j1, &j2, &j3, &j4, &j5, &j6},
},
{
name: "asc",
desc: false,
jobs: []*models.JobSummary{&j2, &j6, &j1, &j4, &j3, &j5},
wantJobs: []*models.JobSummary{&j6, &j5, &j4, &j3, &j2, &j1},
},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
// when
SortByFinishedAt(tc.jobs, tc.desc)
// then
assert.Equal(t, tc.wantJobs, tc.jobs)
})
}
}
| go |
Four girls were buried to death and one was grievously injured on Monday after a huge mound of earth collapsed on them in a village in Nuh district of Haryana, police said. All the girls belonging to the Kangarka village in the Taouru subdivision of the district had gone to dig some mud for their homes when a big chunk of soil collapsed on them, they said.
The villagers somehow managed to retrieve the girls out of the heap, police said. While four of the girls died of asphyxiation before they could be rescued, one of them had extricated herself despite getting injured and has been admitted to the hospital for treatment, they added.
The district administration and police team reached the spot and were trying to find the cause behind the mishap while the family members of the deceased did not file any complaint and accepted it as an accident. Police identified the deceased as Vakeela (19), Taslima (11), Janista (17) and Gulafsha (9) and the injured as Sofia (8).
All had gone to dig some mud for their homes when a big chunk of earth fell on them and all got buried under it. Sofia somehow managed to come out and raise an alarm, prompting villagers to reach the spot and retrieve the four girls’ bodies, police said.
It was an accident and nobody is to be blamed, said Mushtkim, the village sarpanch. A senior police officer said the bodies have been kept to the mortuary for post mortem while the condition of the injured girl was stable.
Read all the Latest India News here(This story has not been edited by News18 staff and is published from a syndicated news agency feed - PTI) | english |
<filename>sri/prettyCheckable/1.0.json
{"prettyCheckable.css":"sha256-zt7uh61JeEFZj6p6q3MXj8cqGRWAuBKGoSeALES5e5Q=","prettyCheckable.js":"sha256-A0swpbTXLjl5iAGCnPx5hiKzyOzCundfT6IUYtpBivc=","prettyCheckable.min.css":"sha256-QfLU/EXlWsEmrcBmaUmnVAXXfryrMujBWsoQkjzlSew=","prettyCheckable.min.js":"sha256-uoLnPhs/X2ljbPEAkAY/OXGq8DP5zAQAguO8+sSqfKI="} | json |
Editor’s note: Eric Wheeler is CEO and co-founder of 33Across. He has 20 years of experience leading successful Internet businesses. Follow him on Twitter: @ericwheeler.
Much has already been discussed in the media regarding the threat that the $300 billion advertising industry faces if Congress passes a strict interpretation of Do Not Track. Most of the discussion has focused on how “adtech” companies would get hurt: ad networks, third-party data providers, DSPs, and marketers.
However, what has gotten far less attention is that many of the web publishers that consumers enjoy on a daily basis would also have their businesses severely squeezed if such legislation were enacted.
Those vulnerable range from seemingly invincible Fortune 500 tech behemoths such as Facebook and Google, to myriad small online publishers. Essentially, any company that relies on partners to help drive revenue from advertising that accesses anonymous, third-party cookie data could be severely exposed. Moreover, we as consumers would suffer. While Do Not Track was conceived in order to protect consumers, it would actually make our time on the Internet a noticeably worse experience by forcing us to watch untargeted, annoying ads aimed at getting our attention (think “Lose Weight Now!”) versus receiving relevant ads that better align with our interests. It could take the industry back 12 years in terms of consumer experience with the DNT privacy notice pop-ups appearing with almost every click. And worse, Do Not Track puts us all on a path to paying subscription fees to visit sites that today we freely consume (thanks advertisers!).
Most of the content we like would go away, because these publishers won’t be able to survive on subscription fees alone...ask The New York Times. Do Not Track actually threatens the very existence of the “Free Internet.” With our economy in such disrepair, is this the time to put the screws to small businesses and industries that drive domestic innovation?
But, here’s the rub: If Do Not Track becomes law– one that would, by default, opt consumers out of behavioral advertising – the Facebook Exchange would be rendered virtually useless overnight. Why? Because the Facebook Exchange needs anonymous cookie data about consumers who browse off Facebook in order to target them with relevant ads on Facebook. And what’s more, advertisers mandate being able to measure the online ads they run on Facebook in the same way they measure performance on other sites. Doing so requires utilizing anonymous third-party cookies.
Of course, Facebook isn’t the only behemoth first-party data company that relies upon third-party data. The same is true of Yahoo with its Right Media Exchange and AOL with its Advertising.com. Even Google’s bottom line would be hit hard as its advertising businesses are predicated on serving and measuring relevant ads based on interest and demographic information gathered from third-party cookie data. While Do Not Track wouldn’t necessarily spell the end for some of tech’s biggest giants, you can bet that their bottom lines would take a massive hit. Along with your retirement savings if you have invested heavily in some of these companies.
If flat-out threatening entrepreneurism weren’t enough, how about the hundreds of thousands of small publishers whose revenues are fully reliant on behavioral advertising? The authentic, user-generated content that we love so much would quickly wither and die without the premium ad revenue they get from behavioral advertising. To this point, a Borrell Associates study from earlier this year found that targeted display advertising will represent 45 percent of the total local/social spend by small to medium sized businesses by year’s end. Which, frankly, shouldn’t shock anyone. So unless you’re NBC or Microsoft and have a brand that’s been long established, Do Not Track will make it nearly impossible to build a small publishing business.
A Do Not Track approach that automatically “opts out” consumers would harm virtually everyone who uses or earns a living from the Internet. If advertisers and publishers can no longer utilize targeted advertising, it’s hard to see a scenario that doesn’t result in a pay-for-content model. Just for a moment, imagine a future where a “Free Internet” no longer exists: In addition to paying to get online each month, you would find yourself paying for most every piece of content you access on the Web. So only those with disposable incomes can afford to pay for online content? Suddenly the Internet seems a lot less egalitarian, doesn’t it?
Nearly everyone, especially TechCrunch readers, recognize that data is incredibly valuable, drives innovation, and is the foundation for a broad range of industries. And we all agree that the industry should continue to take every step to protect users and disclose how data is used. But it’s time to move beyond inflammatory debates to a rational discourse.
My conclusion: the Internet economy is already highly respectful of consumer privacy. And any fears consumers have to the contrary are certainly not centered on third-party anonymous data. Their concerns are about first-party sites with which they share personal information such as their credit card numbers and email and physical addresses. The online advertising industry has been aggressive about opt-out standards and that won’t change. Hopefully innovation, “Free Internet” content, and continued economic growth won’t change either.
| english |
<reponame>unosquare/uno-js<filename>src/toDate.ts<gh_stars>1-10
import isDate from './isDate';
import isString from './isString';
import toLocalTime from './toLocalTime';
const toDate = (obj: string | Record<string, unknown>): void => {
Object.keys(obj).forEach((prop) => {
if (isString(obj[prop]) && isDate(obj[prop])) {
obj[prop] = toLocalTime(obj[prop]);
}
if (typeof obj[prop] === 'object' && obj[prop]) {
if (obj[prop] instanceof Array) {
obj[prop].forEach(toDate);
} else {
Object.keys(obj[prop]).forEach(() => toDate(obj[prop]));
}
}
});
};
export default toDate;
| typescript |
{
"name": "LPParseConnect",
"version": "0.1.3",
"summary": "Connector for Parse LP Server",
"description": "Connect to Parse easily",
"homepage": "https://github.com/liltimtim/LPParseConnect",
"license": {
"type": "MIT",
"file": "LICENSE"
},
"authors": {
"liltimtim": "<EMAIL>"
},
"source": {
"git": "https://github.com/liltimtim/LPParseConnect.git",
"tag": "0.1.3"
},
"platforms": {
"ios": "10.0"
},
"source_files": "LPParseConnect/Classes/**/*",
"frameworks": "UserNotifications",
"dependencies": {
"Parse": [
],
"SwiftValidator": [
],
"LPCommonUI": [
]
}
}
| json |
FreshBooks makes small business invoicing and billing so simple, you’ll be amazed at the time you have to focus on doing what you love and how much faster you get paid.
You’re the real deal, be sure you look it. FreshBooks makes creating professional-looking invoices for your business ridiculously easy. With our invoice generator, it’s simple to create and customize your invoice, add your logo, and personalize your thank you email. Your clients will be wowed.
No more chasing clients for checks or waiting in the line at the bank. Let your clients pay their preferred way, online, and get paid up to 11 days faster.
From sending reminders to securely charging your client’s credit card, you can automate as much (or as little) of your business with FreshBooks. Let FreshBooks follow-up with clients so you can focus your time on what matters most.
No more paying expenses out of pocket or waiting until the end of a project to get paid. Request a deposit on your invoice and you’ll sleep peacefully knowing you’ll get the money you need at the start.
You’ll always charge for all the work you did and any expenses you incurred. With the FreshBooks invoice generator you can easily add your tracked time and expenses to your invoices so you’ll never leave money on the table again.
Negotiate fixed pricing with your clients upfront. Whether it’s for a specific timeline or project, establish a stable cash flow and make it easier to forecast upcoming workload and income.
Dedicate a specific number of hours to your client’s retainer and schedule work against that amount at a pace that works for both you and your client.
Generate and send retainer summary reports at any point during a retainer period to keep your clients happy and informed.
When project deliverables change it’s easy to highlight what’s new and discuss the impact to your retainer amount and timeline.
Recurring invoicing, time tracking, project management and reporting all seamlessly work together with this one, easy-to-use tool.
Absolutely. If you invoice the same amount on a set schedule, FreshBooks automates everything from making invoices to collecting payments and even (gently) reminding any late-paying customers. Our invoice generator can help.
Great news! FreshBooks invoice generator software is available on any device – desktop, mobile or tablet and plays nicely with both Mac and PC.
The safety of your private data is our top priority, that’s why it’s protected by 256-bit SSL encryption—the gold standard in Internet security. The FreshBooks billing system is cloud based and uses industry-leading secure servers.
Absolutely, our FreshBooks invoice generator produces a product that is a lot more professional than an invoice template. Plus, you can customize the look and feel of your invoices to match your business’ brand, including the layout, font, color, imagery and even charge late fees.
You sure can. FreshBooks’ iOS and Android apps let you painlessly access our invoice generator to quickly invoice your clients wherever and whenever you need to.
Calculation errors are a common problem when invoicing in Word, Excel or other home-grown invoicing and accounting solutions. FreshBooks removes the worry of making errors, as all calculations are done for you, including the taxes.
Take the guesswork out of invoicing with FreshBooks.
| english |
Super Bowl 53 is still anyone's game.
The Super Bowl is live now, and even after halftime, it's still anyone's game. It's a rematch of 2002's Super Bowl 36, which started the Tom Brady and Bill Belichick dynasty, when the underdog Patriots knocked off the then-St. Louis Rams to win the first Super Bowl in franchise history. Now, Brady and Belichick are seeking their sixth Super Bowl ring. Led by second-year QB Jared Goff, the unblockable Aaron Donald and wunderkind coach Sean McVay, the Rams are hoping to put an end to the Patriots dynasty and embark on their own run of dominance. Oh -- and there are a ton of amazing TV commercials and movie trailers, too.
CBS is broadcasting the game and offers a number of ways to stream Super Bowl 2019 for free and without needing to prove you're a cable or satellite TV subscriber. (Note that CNET is a division of CBS.) Let's get you ready for the big game. Here's what you need to know.
It's already underway! CBS started livestreaming about 30 minutes before kickoff at 6 p.m. ET (3 p.m. PT).
Great news You can livestream the 2019 Super Bowl on CBSSports.com or the CBS Sports app for free -- no authentication is required. You can also watch on CBS All Access if you live in one of the 200 markets where the service offers live TV. CBS All Access costs $5.99 a month, or $9.99 a month with no commercials, and offers a 7-day free trail.
If you're willing to watch on a phone or tablet and not screencast to your TV, you can livestream the Super Bowl with the NFL Mobile app or the Yahoo Sports app for free.
You can, as long as it's not Sling TV and you live in an area that gets a live feed of CBS and not just on-demand content. In many markets, you can watch on-demand but not live content from CBS and the other local networks.
DirecTV Now's basic, $40-a-month Live a Little package includes CBS. You can use its channel lookup tool to see if you get a live feed of CBS and the other local networks in your zip code.
Hulu with Live TV costs $40 a month and includes CBS, but check to see which live channels Hulu offers in your area.
PlayStation Vue's $45 Access plan includes CBS. Use the PlayStation Vue Plans page to see if you can get a live feed of CBS where you live.
YouTube TV costs $40 a month and includes CBS. Plug in your zip code on its channel lineup page to see what live, local networks are available where you live.
FuboTV is a sports-centric streaming service that costs $40 for the first month before jumping up to $45 a month. It includes a live feed of CBS in dozens of markets.
Sling TV does not offer CBS.
The above streaming services offer a free, seven-day trial.
If you live in an area with good reception, you can watch for free on over-the-air broadcast channels just by attaching an affordable (under $30) indoor antenna to nearly any TV.
Following in the tradition of the past few years, many -- but not all -- of the big ads have already been released or teased online. The big hitters so far include Microsoft, Pepsi, Amazon and Mercedes, just to name a few. We've collected all the big Super Bowl ads here, and we'll continue to update the list throughout the game.
Jim Nantz and Tony Romo will be in the broadcast booth, with Tracy Wolfson reporting from the sidelines.
Maroon 5 headlined the halftime show, but even with a Spongebob appearance, it was a bit of a mess.
The "Empress of Soul" Gladys Knight performed The Star-Spangled Banner.
Yep! We've got you covered:
| english |
<reponame>Spaxe/twitter-stream<filename>package.json
{
"name": "twitter-stream",
"version": "1.0.0",
"description": "streaming twitter lightweight server",
"main": "index.js",
"scripts": {
"start": "node index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"twitter",
"streaming",
"nodejs",
"express",
"tweets"
],
"author": "<NAME>",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"express": "^4.14.0",
"querystring": "^0.2.0",
"twitter": "^1.5.0"
}
}
| json |
// Code generated by protoc-gen-goext. DO NOT EDIT.
package iam
func (m *GetRoleRequest) SetRoleId(v string) {
m.RoleId = v
}
func (m *ListRolesRequest) SetPageSize(v int64) {
m.PageSize = v
}
func (m *ListRolesRequest) SetPageToken(v string) {
m.PageToken = v
}
func (m *ListRolesRequest) SetFilter(v string) {
m.Filter = v
}
func (m *ListRolesResponse) SetRoles(v []*Role) {
m.Roles = v
}
func (m *ListRolesResponse) SetNextPageToken(v string) {
m.NextPageToken = v
}
| go |
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "http://github.com/JoaoBaptMG/gba-modern/tree/master/data-schemas/sprite.schema.json",
"title": "Font definition",
"description": "The attributes used for exporting a font using tools/tools sprite-export",
"type": "object",
"properties":
{
"$schema": {"type": "string", "description": "The schema to validate this json for" },
"export-size": { "type": "integer", "minimum": 1, "description": "The size in which to export this font." },
"export-range":
{
"type": "array",
"description": "The ranges of characters to export the font with.",
"items":
{
"type": "array",
"description": "A range composed of a first and a last character.",
"items":
[
{ "type": "number", "description": "The first character to export from that range." },
{ "type": "number", "description": "The last character to export from that range." }
],
"additionalItems": false
}
},
"override-vertical-stride": { "type": "integer", "minimum": 1, "description": "The vertical stride to use instead of the one embedded in the font file." }
},
"required": ["export-size", "export-range"]
} | json |
Recover your password.
A password will be e-mailed to you.
SHANGHAI, China and CAMBRIDGE, Mass. , May 25, 2023 (GLOBE NEWSWIRE) — Zai Lab Limited (NASDAQ: ZLAB; HKEX: 9688) today announced that members of the company’s senior management team will participate in the following investor conferences in June 2023:
Zai Lab (NASDAQ: ZLAB; HKEX: 9688) is an innovative, research-based, commercial-stage biopharmaceutical company based in China and the United States. We are focused on discovering, developing, and commercializing innovative products that address medical conditions with significant unmet needs in the areas of oncology, autoimmune disorders, infectious diseases, and neuroscience. Our goal is to leverage our competencies and resources to positively impact human health in China and worldwide.
For additional information about Zai Lab, including our products, business activities and partnerships, research, and other events or developments, please visit www. zailaboratory. com or follow us at www. twitter. com/ZaiLab_Global.
For more information, please contact:
Get real time updates directly on you device, subscribe now. | english |
The following two scholarship schemes have been formulated for students belonging to the minority communities in pursuance of the Prime Minister’s New 15 Point Programme for the Welfare of Minorities:
A request has been received from the State of Kerala for increasing the number of pre-matric scholarships for students belonging to the minority communities. The allocation of scholarships to all States, including Kerala, has been made on the basis of the population of the notified minority communities in the State. Out of a total of 4 lakh scholarships for 2008-09, the allocation for Kerala is 29, 380.
This was stated by the Minister of Minority Affairs, Shri A.R.Antulay, in a written reply to a question in Lok Sabha today.
| english |
<reponame>kyteinsky/OmniNet
#!/usr/bin/env python
import glob
import os
if __name__ == '__main__':
print('Searching for notebooks in the notebooks directory')
# maybe executing like execute_notebook.py
notebook_dir = '../notebooks'
result_dir = '../results'
if not os.path.exists(notebook_dir):
# maybe executing like scripts/execute_notebook.py
notebook_dir = './notebooks'
result_dir = './results'
if not os.path.exists(notebook_dir):
# still did not find the notebook directory
print('Notebook Directory not found! Exiting')
exit(0)
# glob notebooks
notebooks = glob.glob(f'{notebook_dir}/*.ipynb')
# the length cannot be 0
if len(notebooks) == 0:
print('No Notebooks found! Exiting.')
exit(0)
print('Select a notebook to run. Results will be logged to <notebook_name>.log in the results directory\n')
for i in range(len(notebooks)):
print(f'{i + 1}. {os.path.basename(notebooks[i])}')
try:
option = int(input('\nEnter option: '))
if option > len(notebooks):
assert IndexError
print(f'Executing notebook {os.path.basename(notebooks[option - 1])}')
# deal with spaces in file names
selected_notebook = notebooks[option - 1].replace(' ', '\ ')
result_file_name = os.path.splitext(os.path.basename(selected_notebook))[0]
# run the selected notebook
os.system(f'jupyter nbconvert --to script --execute --stdout {selected_notebook} | '
f'python -u 2>&1 | tee {result_dir}/{result_file_name}.log &')
print('Process started!')
except IndexError as e:
print('Invalid option! Existing.')
exit(0)
| python |
[
{
"url": "www.example.com",
"uptime_check_enabled": true,
"certificate_check_enabled": false
}
]
| json |
The latest in Kobe Bryant’s book series, The Wizenard was launched on Tuesday. The late athlete’s wife, Vanessa Bryant shared the news on Instagram. “Welcome back to Dren! We hope you are all ready to catch up with the West Bottom Badgers for another magical basketball season. The #Wizenard Series: Season One is OUT NOW,” she wrote. It has been authored by Wesley King and Kobe Bryant.
The series is a young adult novel that traces the life and experience of Reggie, a basketball player in his quest of becoming the best version of himself. He is held back by circumstances, especially the gym which he feels is working against him.
“Reggie is willing to train tirelessly to improve his game, but the gym itself seems to be working against him in magical ways. Before Reggie can become the player he dreams of being, he must survive the extraordinary trials of practice,” it adds. | english |
[{"namaKab":"LUWU","originalFilename":"Doc4(1)_001.png","namaPartai":"Partai NasDem","id":179926,"noUrut":1,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"LUWU","originalFilename":"12. Doc5_001.png","namaPartai":"Partai NasDem","id":158907,"noUrut":2,"nama":"Drs. <NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"LUWU","originalFilename":"12. Doc8_001.png","namaPartai":"Partai NasDem","id":158598,"noUrut":3,"nama":"<NAME>","stringJenisKelamin":"Perempuan"},{"namaKab":"LUWU","originalFilename":"12. Doc1_001.png","namaPartai":"Partai NasDem","id":166178,"noUrut":4,"nama":"HARSIN","stringJenisKelamin":"Laki-Laki"},{"namaKab":"LUWU","originalFilename":"12Doc1_001.png","namaPartai":"Partai NasDem","id":180339,"noUrut":5,"nama":"Drs. <NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"LUWU","originalFilename":"12..png","namaPartai":"Partai NasDem","id":199336,"noUrut":6,"nama":"ALFRIDAH","stringJenisKelamin":"Perempuan"},{"namaKab":"LUWU","originalFilename":"12. Doc1_001.png","namaPartai":"Partai NasDem","id":166556,"noUrut":7,"nama":"BASTEM","stringJenisKelamin":"Laki-Laki"},{"namaKab":"LUWU","originalFilename":"12, Doc3_001.png","namaPartai":"Partai NasDem","id":199048,"noUrut":8,"nama":"<NAME>, S.Pd","stringJenisKelamin":"Perempuan"},{"namaKab":"LUWU","originalFilename":"Doc1_001.png","namaPartai":"Partai NasDem","id":129184,"noUrut":9,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"}] | json |
Women and their love for lipsticks, lip balms, and lip tints is never-ending. To fuel their love a little more, we have come up with a comprehensive list of the best drugstore lip stains. These lip stains not only help one to save bigger on their makeup bills but also chuck the possibility of making their lips look discolored. So, today we will introduce you to lip stains and their long-lasting, smudge-proof, waterproof, kissproof, and primarily lip-nourishing properties.
Before we delve deeper into the world of lip stains, let us take a look at what Patricia Longo, Celebrity Makeup Artist, has to say about them. She says, “I like to prep the lips first. Usually, a lip stain can make your lips look very dry. So, what I recommend is moisten the lips with a not-so-shiny balm. Then, I like to apply a little bit of lip plumper. This makes sure that the lip stain stays on. And then I finally apply a lip stain. My favorite lip stains are the ones that look like a stick and have a tip-like applicator so there is no need for a lip liner.” If you too are in love with lip stains for their long-lasting natural look, then scroll down to populate your makeup vanity with the best of all right away.
Rimmel London has come up with a flawless double-ended lip color to make your lips look luscious. With intense color pigment on one end and a clear top coat on the other, this lip stain wins the hearts of makeup junkies across the world. This beauty essential keeps your lips perfectly hued throughout the day. Moreover, the top coat delivers 100% moisture to keep your lips hydrated and feel smooth and soft.
A single stroke of lip balm has the power to transform your look. Considering this principle, Revlon has introduced its honey-shade balm stain to ensure that you look your best everyday. This balm stain is enriched with the goodness of coconut, shea, and mango butter. This triple butter complex stains your lips and leaves them thoroughly moisturized. The retractable crayon is sleek and slips into any pocket or pouch. Plus, you need no sharper to maintain a precise tip.
Fruity and sweet lip tints have a different fanfare altogether. And, for all those makeup junkies who love fruitilicious lips, look what we found for you — Etude’s Dear Darling water tint! This lip essential is just perfect for those who are more inclined toward cherry, orange, and strawberry-like shades for their lips. So, why wait? Populate your lipstick collection with this water tint and define your lips effortlessly.
When you aren’t able to decide on the right shade of lipstick to go with your LOTD, opt for nude. No matter what kind of outfit you choose to wear, nude lipstick surely plays the game for you. And, this lip stain from Palladio is a sheer game-changer when it comes to accentuating your looks. It has a precise tip for mess-free application and features a long-lasting formula that will require no touch-ups at all. In addition, this vegan and cruelty-free lip stain hydrates your lips intensely.
Long-lasting, transfer-proof, and matte finish — these are the three reasons why the youth loves this lip stain kit from Wonderskin a little more than others. It is an all-day lip stain kit with a wide range of tints in multiple colors. And, this whimsical shade features a warm rosy hue that defines your lips beautifully. The best thing about this popular lip stain is that it is alcohol-free and features a vegan formula.
Pink lips and rosy cheeks are loved by women all across the globe. But we understand the struggle of finding the best lip stains. For this reason, we found for you this Just Kissed Lip and Cheek Stain introduced by Jane Iredale. It is rich in natural botanicals, olive, and avocado butter and takes good care of your lips. The ‘forever pink’ shade is truly the secret behind your picture-perfect look of the day.
This lip tint from Golden Rose is yet another beauty product that has paved its way to the list of top drugstore lip stains. With aloe vera and vitamin E, this lip marker imparts a healthy glow to your lips. It is easy to glide and lends you a tattoo-like effect. For shiny and plump lips, you can apply a lip balm or lip gloss without the fear of your color coming off. Plus, this lip marker lasts for up to 12 hours and is a great alternative to lipsticks.
There is no count over the lipsticks, lip balms, and lip stains one can own. So, without any hesitation, pick as many lip stains as you wish. Don’t forget to check out e.l.f’s berry blush lip stain that manages to grab large eyeballs. It is richly pigmented and the best affordable lip stain a makeup junkie can own. It contains lip-nourishing properties and features a smudge-free formula to keep your lips pout-ready all day long.
Benefit has come up with a rosy cheek and lip stain that features an alluring sheer tint that you can rock all day. Plus, it is kiss-proof and doesn’t smudge. Its glossy finish and travel-friendly packaging have made it a cult favorite lip stain. This tint is so versatile that it makes the apple of your cheeks look supple and your lips plump. Grab this best inexpensive lip stain now and let your lips do the talking.
For an alluring and beautiful flush of color on your lips, splurge on this lip stain from Covergirl. It is a water-based colorant that beautifully defines your lips. Secondly, the pen-like precision makes this drugstore lip stain a sheer winner. It comes with a lightweight formula that contours your lips beautifully and lends them a natural-looking shine. Now, you can paint your lips in an absolutely hassle-free manner with this in your vanity.
This lip and cheek tint by Elizabeth Mott is a fail-proof makeup essential that you shouldn’t resist investing in. With a non-drying and long-lasting formula, this drugstore lip tint manages to attract the hearts of all makeup-obsessed women. After all, lips play a pivotal role in accentuating your beauty. This tint smells like cherries and the red shade looks very natural when applied to the lips.
With this one lip tint set in your makeup kit, we bet you would no longer need to look for anything else to make your lips more luscious. Kyda has introduced this set for all makeup buffs who love amplifying the look of their lips by painting them with beautiful shades. In this set of 4 lip tint stains, you can try shades ranging from deep red to vibrant orange. With rich and hydrating ingredients, all of these beauties moisturize your lips to the maximum. There is clearly nothing apart from this lip stain that you need for attaining smooth, and soft lips.
This was our list of some of the top-rated drugstore lip stains that can transform your look in a jiffy. Now, roll your eyes over and learn how to pick the best of them all.
Here are a few aspects that you must consider before splurging on a good drugstore lip stain.
Texture: Make sure you invest in some of the best drugstore lip stains that possess a smooth and glideable texture. Secondly, the consistency of the product determines the texture of your lip stain. Runny consistency will have an opaque texture whereas a thicker formula will be more pigmented. Both of them work well if you know the right way to apply.
Shade: Always consider your choice and preferences. Do not buy lip stains just because they are in vogue. There is a wide range of shades right from bright, neutral, and bold. For everyday use, you may pick a neutral lip stain and make your lips look naturally beautiful. For get-togethers or parties, you may rely on bold or vibrant shades of lip stains.
Ingredients: To moisturize your lips and prevent chapping, always invest in drugstore lip stains that come with hydrating and moisturizing ingredients like jojoba oil, vitamin E, aloe vera, shea butter, coconut butter, and mango butter.
Finish: As per your preference and liking, you may vouch for matte or glossy lip stains. It is also advisable to rely on a non-sticky lip stain.
Formula: Last but not least, it is vital to analyze the formula of your drugstore lip stain or lip tint. Always choose a lip stain that is weightless and features a non-toxic formula. Avoid products that are infused with harmful ingredients.
This was the list of the best drugstore lip stains that accentuate your beauty in a jiffy. And, while every makeup buff needs a break from heavily pigmented lipsticks, these lip stains are a great alternative. Pick as many as possible and try out new looks every day. Right from super sheer and sheen to flattering shades, you will find all on our list. So, pull out your cards, kickstart your shopping spree, and populate your makeup vanity with some alluring lip stains.
As a certified makeup artist and the author of this article, Sayantani has a lot of knowledge about the best lip products on the market. She says that drugstore lip stains are an inexpensive way for one to achieve a long-lasting and vibrant lip color. Also, they can withstand the day’s activities, without requiring any touch-ups. After trying all the amazing recommendations in this article, she was really impressed by Etude’s Dear Darling Water Tint in the shade Cherry Ade. It was non-sticky and hydrating on the lips, delivering a bold color payoff. Plus, its smudge-proof qualities make it a winner!
Our product experts study the specifications of every product we suggest and try them out to bring what’s proven to be worthy of your money, time, and energy. We also have subject matter experts from various fields like Fashion, Skincare, Haircare, Home Decor, and Health & Fitness onboard to make sure our suggestions are credible and trustworthy. You can trust Pinkvilla to be your faithful shopping guide for all the right reasons!
| english |
<gh_stars>1-10
{
"id": 16276,
"title": [
"[Karazja Jungle, Mound]"
],
"description": [
"The ground rises here, forming an oval mound. The foliage is as thick and dense as elsewhere, but clearly not as old as in other parts of the jungle. The mound is pockmarked with small depressions, as if attempts had been made to burrow into the mound at some point in the distant past. The high-pitched humming of gnats can be heard throughout the area."
],
"paths": [
"Obvious paths: west"
],
"wayto": {
"16265": "west"
},
"timeto": {
"16265": 0.2
}
} | json |
<filename>docs/template_plugin/src/template_executable_network.hpp<gh_stars>1-10
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <ngraph/function.hpp>
#include "template_config.hpp"
#include "template_infer_request.hpp"
#include "template_async_infer_request.hpp"
#include <cpp_interfaces/impl/ie_executable_network_thread_safe_default.hpp>
namespace TemplatePlugin {
class Plugin;
/**
* @class ExecutableNetwork
* @brief Interface of executable network
*/
// ! [executable_network:header]
class ExecutableNetwork : public InferenceEngine::ExecutableNetworkThreadSafeDefault {
public:
ExecutableNetwork(const std::shared_ptr<const ngraph::Function>& function,
const Configuration& cfg,
const std::shared_ptr<Plugin>& plugin);
ExecutableNetwork(std::istream& model,
const Configuration& cfg,
const std::shared_ptr<Plugin>& plugin);
~ExecutableNetwork() override = default;
// Methods from a base class ExecutableNetworkThreadSafeDefault
void ExportImpl(std::ostream& model) override;
InferenceEngine::InferRequestInternal::Ptr CreateInferRequestImpl(InferenceEngine::InputsDataMap networkInputs,
InferenceEngine::OutputsDataMap networkOutputs) override;
InferenceEngine::IInferRequest::Ptr CreateInferRequest() override;
InferenceEngine::Parameter GetMetric(const std::string &name) const override;
InferenceEngine::Parameter GetConfig(const std::string &name) const override;
private:
friend class TemplateInferRequest;
void CompileNetwork(const std::shared_ptr<const ngraph::Function>& function);
void InitExecutor();
std::atomic<std::size_t> _requestId = {0};
Configuration _cfg;
std::shared_ptr<Plugin> _plugin;
std::shared_ptr<ngraph::Function> _function;
std::map<std::string, std::size_t> _inputIndex;
std::map<std::string, std::size_t> _outputIndex;
};
// ! [executable_network:header]
} // namespace TemplatePlugin
| cpp |
Kunnthur Mana is a joint venture of Mr. P. K Shelly and Nisha Shelly, Daughter of an Ayurveda Acharya in Kerala. Kunnathur Mana is a Gov: of Kerala approved ayurveda hospital in Kerala with Green Leaf Certification.
Going back to history it is the house of the richest Brahmin families in Kerala. The resort lies away from the hustle bustle of city life and is only 3 km from the beach and 90 km away from The Cochin International Airport.
Numerous facilities are offered to the guests to make their stay as a comfortable and memorable hide-away. Some of the hotel facilities available to the guests are:
Apart from these general facilities, the hotel also has excellent dining option to the guests. One can dine at Akathalam, a multi-cuisine restaurant which serves wide array of sumptuous delicacies.
A combination of impeccable customer service, hygiene and cleanliness has made this restaurant as one of the most preferred joints among the travellers. The other restaurant is air conditioned multi- cuisine restaurant that specializes in sea food cuisines. | english |
Stressing on the need for ‘Reinventing the India Story’, the Minister of Urban Development Shri M. Venkaiah Naidu today said that ‘business as usual’ approach should make way for radical re-orientation on the part of all stakeholders to enable the country retrieve its past glory. He was addressing the 41st Annual Convocation of All India Management Association here today.
Speaking on the theme of ‘Changing Times: Reinventing the India Story’, Shri Naidu quoted Spanish Pholosopher Sa’id al-Andalusi who in the year 1068 wrote : “The first Nation to have cultivated science is India which is known for the wisdom of its people. Over many centuries, all the kings of the past have recognized the ability of Indians in all the branches of knowledge.’’ Shri Naidu lamented that India was not looked upon as a source of knowledge, technology and innovation by the rest of the world during and immediately after the colonial period. He said that thousands of years ago, Indians were aware of ‘sky travel and Pushpak Vimanas’ before Wright brothers invented aero plane and this glory need to be restored.
Shri Venkaiah Naidu observed that the country is at an inflection point and instead of talking about the ‘potential of India’ the discourse should be about ‘rise of India’. He said, ‘ideas, innovation, investments and implementation’ held key to reinventing the India story. The Minister stated that the central government led by Prime Minister Shri Narendra Modi is committed to removing all the hurdles in the way of rapid economic development of the country.
Noting that ‘if there is a will, there is a way’, Shri Naidu referred to opening of about four crore new bank accounts under Prime Minister’s Jan Dhan Yojana, as an evidence of the government’s commitment to make things happen. Asserting that ‘growth and governance’ are the twin major objectives of the government led by Shri Narendra Modi, the Urban Development Minister said, necessary enabling policy environment is being put in place to unleash the much desired investments to give a fillip to the economy.
Shri Naidu said, huge working age manpower is the major resource of the country and all efforts need to be made to enable them to contribute to economic growth through their adequate empowerment in the form of required skills.
Shri Naidu cautioned that the next ten years will be very critical for the ‘rise of India’ and all stakeholders should do their bit to reinvent the India story.
The Urban Development Minister said challenges of urbanization are being sought to be converted into an opportunity with substantial involvement of private sector.
| english |
<filename>checker/tests/formatter/FormatBasic.java
import java.util.Calendar;
import java.util.Date;
import java.util.Formatter;
import java.util.GregorianCalendar;
public class FormatBasic {
public static void main(String ... p) {
Formatter f = new Formatter();
f.format("String");
f.format("String %20% %n");
f.format("%% %s", "str");
f.format("%4$2s %3$2s %2$2s %1$2s", "a", "b", "c", "d");
f.format("e = %+10.4f", Math.E);
f.format("Amount gained or lost since last statement: $ %(,.2f",-6217.58);
f.format("Local time: %tT", Calendar.getInstance());
f.format("Unable to open file '%1$s': %2$s", "food", "No such file or directory");
f.format("Duke's Birthday: %1$tm %1$te,%1$tY", new GregorianCalendar(1995, Calendar.MAY, 23));
f.format("Duke's Birthday: %tm %<te,%<tY", new Date());
f.format("Duke's Birthday: %2$tm %<te,%<tY (it's the %dth)", 123, new Date());
String s = "%+s%";
//:: error: (format.string.invalid)
f.format(s, "illegal");
//:: error: (format.string.invalid)
f.format("%+s%", "illegal");
//:: error: (format.string.invalid)
f.format("Wrong < indexing: %1$tm %<te,%<$tY", new Date());
//:: error: (format.string.invalid)
f.format("%t", new Date());
//:: error: (argument.type.incompatible)
f.format("%Td", (int)231);
f.close();
}
}
| java |
- #CashlessSouth India's first 'cashless' village suffers, says digitization was a 'mistake'
In a bid to drive the cashless economy in the country, the central government is considering making mandatory digital payments at points of consumer interface in all government and departments including railways and road transport corporations.
Government payments account for a huge percentage of overall transactions and hence PM Modi wants digital transactions to increase in order to reduce the country's dependence on cash.
All payment options of government and Public Sector Units will be integrated with with official payment modes such as BHIM and Bharat QR code.
Bus, train and Metro ticket counters and licenced kiosks and shops will display the Bharat QR code and discounts will be offered for digital payments.
The government is also considering printing the Bharat QR code on all utility bills as a payment option and telecom operators will be told to ensure its prominent display at recharge outlets offering additional talk time for digital payment.
Besides, it is planning to make RFID toll tags mandatory for all cars from October.
The government will on October 2 launch a big-ticket campaign concerted campaign on digital transactions involving all ministries, states and public sector units. The campaign will run till Republic Day (January 26).
Ministries, states and PSUs will proactively publicise and promote digital payments.
The government is also looking at further incentives to encourage the use of digital payment tools apart from strengthening the infrastructure for their acceptance.
It came up with multiple incentives ranging from discounts on fuel, highway toll and railway tickets to cheaper insurance cover for those using digital payment modes.
For the payment of toll at Toll Plazas on National Highways using RFID card/Fast Tags, a discount of 10% will be available to users in the year 2016-17.
Digital is still not the primary mode of payment. Lots of ideas are being discussed on how to reduce dependence on cash, but they are still to be finalised, an official told ET.
The governments agressive move to further drive the economy towards cashless started out with demonetisation, and has been further backed by the release of their UPI-powered BHIM app and Aadhar-backed Aadhar Pay. | english |
<filename>data/events/devpulsecon-2016.json
{
"accessibility": "",
"cfp_end": "",
"code_of_conduct": "http://devpulsecon.squarespace.com/code-of-conduct",
"diversitytickets": "",
"event_end": "2016-04-23",
"event_start": "2016-04-23",
"facebook": "",
"languages": [
"English"
],
"location": {
"city": "Mountain View",
"country": "USA",
"state": "California"
},
"name": "<NAME>",
"tags": [
"technology"
],
"twitter": "DevPulseCon",
"website": "http://devpulsecon.squarespace.com/",
"youtube": "PLczDmsCXJMoAXu1lVBBG_UVYFQB4GRDll"
} | json |
<filename>css/style.css
/*
GERAL ↴
*/
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
overflow-x: hidden;
background-color: #DCDCDC;
}
/*
AREA HEADER ↴
*/
.container_slider {
display: flex;
justify-content: center;
padding-top: 30px;
}
.header {
height: 50px;
background-color: blue;
}
.slider {
width: 100vw;
height: 500px;
overflow: hidden;
}
.slider-width {
display: flex;
height: 100%;
transition: all ease 0.3s;
}
.slider-img {
width: 100vw;
height: inherit;
background-position: center;
background-size: cover;
display: flex;
justify-content: center;
align-items: center;
color: #FFF;
text-shadow: 0px 1px 1px #333;
font-size: 50px;
font-weight: bold;
}
.slider-controls {
display: flex;
justify-content: space-between;
align-items: center;
position: absolute;
}
.slider-control {
display: flex;
align-items: center;
justify-content: center;
padding-left: 10px;
padding-right: 10px;
}
.slider-control img {
cursor: pointer;
width: 45px;
}
@media (min-width: 320px) and (max-width: 425px) {
.slider-img {
font-size: 30px;
}
} | css |
To stay relevant and winning in the blogging game, you need to actively improve and grow your blog.
Many factors go into building a successful blog. Utilizing the right set of data, creating the right content, applying the right traffic tactics, and choosing the best tools – all make an impact on how successful your blog will be.
In this guide, we will look into many things that you can do to continuously improve and grow your blog.
So You Want to Own A Successful Blog?
This is part 3 of 5 of my Blogging 101 Guide. If you are new to blogging, also check out:
My approach to growing a blog is similar to “Kaizen” – a term that usually refers to the statistical process that improves quality in every aspect of a business (originally, manufacturing) operation. We will focus on using data / specific web metrics to define our actions.
Some of the tips I mentioned require very little effort and can create instant positive results; while others take more time and skills to complete. It's like playing RPG video games – some levels are easy while some take longer time/effort to master the necessary skills and breakthrough.
Data is your friend, but which?
Data is crucial to measure your blogging progress and drive improvements.
But what type of data should you be looking at?
If you don’t use the right web metrics to track progress and fine-tune your site, then you may be taking two steps backward instead of one step forward.
Depending upon the nature of your niche and level of understanding, you might look at different types of statistical data.
At first look, Google Analytics reports can be overwhelming. So many numbers! And you may not be familiar with some of the metrics or concepts.
- Honestly, I don't think bloggers should spend too much time in grinding Google Analytic reports.
Go simple. Your objective is to build a better blog for your users, not spend hours after hours learning the technicalities behind Google Analytic numbers.
Hence, I am suggesting only four Google Analytics numbers to track. And here are the three vital stats on Google Analytics that every blogger – regardless of the size of your blog or the niche you are in – should understand and keep an eye on.
To obtain user acquisition info, log in to Google Analytics > Reports > Acquisition > User Acquisition.
Tracking how many new users visiting your blog is one way to measure growth. If your blog is acquiring more sessions this month than before, then surely you must be doing something right.
To obtain traffic acquisition info, log in to Google Analytics > Reports > Acquisition > Traffic Acquisition.
The new Google Analytics 4 (GA4) groups traffic sources into multiple channels: Organic Search, Direct, Referral, Unassigned, and Organic Social. These numbers show where your traffic is coming from. Is your blog getting organic search traffic? What other sites are sending your traffic? Can you invest your resources in these traffic sources so you can get more traffic from them next month?
To obtain average engagement time info, log in to Google Analytics > Reports > Engagement > Pages and Screens.
Average engagement time is a good measurement of your content or traffic quality:
- Are you serving the right content to your audience?
- Are you targeting the right audience with your content?
A low engagement time is not necessarily a bad thing. It can mean your readers are getting what they want in a quick manner and they leave your blog after getting what they were looking for.
Hence “Average Engagement Time” is an important metric that triggers the “why question”.
Why is there a sudden surge (or dip) in your blog's average engagement time? Is the blog loading slowly? is the blog layout broken after an update? Is the blog getting new types of users from different traffic sources?
Once you have a grasp of the different types of data available for your blog, here are some of the practical things you can do that will improve your blog.
The first thing to do is to figure out what is working and what isn’t for your blog.
Is there a particular type of content that works extra well for you? Are traffic coming from social media converting better? Does your last month's link campaign bring you extra users from organic searches?
Identified the growth tactics that work well for your blog and double down on those tactics.
Here's one personal example.
We run a periodic check on our content performance at WHSR. For articles that were logging long average engagement time – we will expand and improve this content in various ways, including adding expert interviews, the latest statistic numbers, new featured images, and screenshots; as well as converting the content into video content.
The key is to focus on winners and make the best out of them.
Blogs are like large machines that run on multiple small parts. One easy way to improve a blog is by taking good care of these tiny parts. These basic tasks which you can do in a few minutes a day can make a big impact on the overall success of your blog.
These basic tasks include:
- Schedule backups so you don’t lose your entire blog to a catastrophic site meltdown.
The people who visit your site have landed there because they are interested in the topic you cover. This is as target of an audience as you can meet. You must collect their contact information so you can continue to market to these individuals.
Social media is overcrowded, but with email, you are sending your materials to a very specific audience who has already decided they are interested in what you have to say.
91% of people check their email inboxes every single day. Compare that to sites like Facebook, where your post may get pushed down the news feed by all the noise.
Fortunately, there are email marketing tools that can help you collect and stay organized with email marketing.
In addition, you’ll want to use a professionally designed opt-in form, so there is no question that the user signed up for the mailing list. The last thing you want is to be accused of spamming those on your mailing list. Some of the email list tools mentioned above have built-in opt-in forms or plugins that sync up with your blog.
One of my favorite [list building] techniques is using ‘category targeted opt-ins’.
It’s a similar idea to content upgrades but it’s far easier to manage.
The idea is that you use opt-in forms to offer exclusive content that is relevant to a topic that someone is reading at the time.
For example, if you’re running a blog about food, you’d offer a different ‘lead magnet’ to people reading the category about meal recipes than you would those viewing the breakfast recipes category.
It’s what we used at UK Linkology to increase email sign ups by over 300%:
Here’s a quick outline of the process we used:
- Setup opt-in forms to promote each lead magnet (we focused on sidebar, in-content and popover opt-in forms)
The key here is to offer a lead magnet that is closely related to what someone is reading at the time.
That way, they’re far more likely to subscribe.
– Adam Connell, Adam Connell dot me.
A truly amazing About page needs to have more than just the facts about your company. It should be the story of you and how you grew your business, what your core beliefs are and what makes you different than your competitors.
Here are some ideas to try out:
Share your history.
Your About page should be a reflection of your business statement and your own personality. Make it interesting and readers will feel as though they know you on a personal level.
It takes the average person 0.05 seconds to make a judgement about your website. That translates to 50 milliseconds to make a good first impression on your visitor. In 50 milliseconds, it’s doubtful the person has time to read much of your text. What does that mean? That means most people’s first impression of your website is made based on the design and images, which the brain processes faster than text.
Generally, here's what I suggest with your blog visual elements:
Do Not:
With so many free resources and web applications on the Internet, it's super-easy to create stunning images by yourself – even if you are not a graphic designer by profession.
Want original graphics for your next blog post? Create it yourself by following these steps:
Or, you can record your screen and turn it into GIF images using ScreenToGif (Windows) and Kap (Mac).
Take the time to work on old blog posts and read them regularly. Find and correct grammar mistakes. Even pieces that have gone through multiple edits can contain typos.
Consider re-writing your titles and headlines for better content flow and user engagement. Great copy converts – This is the mantra all bloggers need to maintain throughout their lives.
Generate new ideas and content from your old posts. For example, you can:
Who is your audience, really? What is their general age? What education level do they have? Any cultural specifics? Why are they at your site?
These lead you to the most important question: How can you do better to serve your blog audience?
If you don't know who are your blog readers, you are shooting in the dark.
Start with people you know, then expand to names in your niche. Collect information, and make statistics and graphs. As a blogger, you may find surveys and polls useful tools at hand. Polling your blog audience helps determine your demographics.
Use Google Form, Survey Monkey, or even Twitter Polls to find out who is reading as well as who might be reading — their ages, genders, occupations, interests, walks of life, etc. Invite them to contact you and introduce themselves and talk about what they like about your blog. Why did they choose to follow you? What kind of posts are their favorites? What is it about you and your content that lends you credibility in their eyes?
During my good old days running WHSR Newsletter, I always invite WHSR subscribers to hit “reply” in the newsletter so I get a chance to connect. You should do the same.
Forums are good to see what’s boiling in your field and what your audience is finding interesting and relevant at a given time.
Webmaster World and Web Hosting Talk are two typical examples of how a niche forum can give you an incredible amount of input to understand what people in my industry are concerned about.
One warning before you hop on though – don’t let the noise distract you from your goals. Forums host the good and the bad apple of the user base, so make sure you filter out any irrelevant discussions and only focus on what matters — especially topics that are basically help requests, as they give you background material to write an answer piece.
Get inspired by popular relevant content on Podcast, YouTube Channels, and SlideShare. This is a window into what people in your niche want to know more about. There is a reason that certain content is more popular at any given time.
For example, iTunes allows users to browse podcasts based on popularity. Take note of the topic as well as the way it is presented to the audience.
Use YouTube to see what vloggers in your niche are doing. Find out which videos are most popular in their channels. Turn those popular videos into blog content ideas.
On SlideShare, you can go to the Most Popular page to find out which slides are grabbing the interest of site visitors.
Take a look at the different categories on your website. Are there any categories missing? Can you create a hub page (some call it a “ribbon page”) and feature your very best content in that category? Or, perhaps you simply want to highlight a specific topic over others because your data analysis has shown that your site visitors are most interested in XYZ.
You can create charts that tie into the topics, group elements into a basic chart, and add color and interest to your site.
Some of the types of content you might want to include would be:
Getting your blog to load faster requires that you look at many different elements. Obviously simply compressing images isn’t enough. Consider:
Extensive testing is required to optimize the loading speed of your website. It involves day-by-day fine tuning to achieve the best results, but your investment in time will pay off in terms of enhanced search engine optimization and conversion rate.
The one thing I consider most important is GZIP compression for your website. This is a method of compressing the webpage into small, easier and faster loading data files.
Fortunately, this is easy to accomplish with WordPress, via any number of specialized plugins. The one I use (at Bitcatcha, InMotion Hosting) is W3 Total Cache, which also caches your pages in addition to GZIP compression.
We have covered extensively on website speed issues in our article, to learn more please read: How to improve your speed.
A few years back we asked establish bloggers if they hire freelancers for their blogging tasks. To our surprise, more than 2/3 of our interview guests said “yes”. In case you wonder where to find freelancers – majority of the bloggers we spoke to use Upwork (31.3%), Fiverr (18.8%) as well Freelancer.com and Peopleperhour (both with 12.5% respectively).
So – As your blog grows, so should your team (btw, this is Team WHSR). Seek out people who are trustworthy and offer high quality work for your team. Once they are trained, these people should be able to complete tasks with just minor direction from you. This allows you to expand your promotional and content efforts almost as though you are cloning yourself. The goal would be for you to eventually manage the team and leave the actual work to them.
With the right team and continued effort, your blog should continue to expand its reach. Over time, you’ll gain a loyal following and regular new traffic from other efforts.
Improving your blog is not a one-time effort. You must continue to improve your blog week after week if you want to find success.
This article is part of my Blogging 101 series. If you wish to blog better, also check out my other guide:
| english |
With this, KL Rahul became the first Indian captain to lose each of the first three ODIs in charge.
CAPE TOWN, Jan 23: Deepak Chahar's fighting fifty (54 off 34) went in vain as South Africa completed a hat-trick of wins with a four-run victory in the thrilling third and final ODI to seal a 3-0 series whitewash against India, here on Sunday.
A fantastic century by Quinton de Kock (124 off 130) helped South Africa post a challenging 287 in 49. 5 overs. Apart from de Kock, Rassie van der Dussen (52 off 59) and David Miller (39 off 38) also played vital knocks for the Proteas.
In reply, Shikhar Dhawan (61 off 73) and Virat Kohli (65 off 84) played important knocks but India were in deep trouble at one point after losing quick wickets during middle overs. However, Deepak Chahar's knock under pressure ignited hopes and kept India in the game till the time he was at the crease.
When Chahar was dismissed in the first ball of the 48th over, India needed 10 runs to win off 17 balls and had two wickets in hand. But South Africa sent back Jasprit Bumrah in the penultimate over and in the last over, with six needed off six balls, Yuzvendra Chahal;s slog found the top edge and South Africa closed off the game with a nervy four-run victory.
With this, KL Rahul became the first Indian captain to lose each of the first three ODIs in charge.
Chasing a stiff target, India were off to a poor start as captain KL Rahul (9) got out in the 5th over. Lungi Ngidi bowled a ball outside off and Rahul pushed his bat away from his body for a thick outside edge and the catch was taken at first slip by Janneman Malan, leaving visitors at 18/1.
Virat Kohli then joined Shikhar Dhawan at the crease and used his wrists to get off the mark with a stylish boundary. After losing Rahul early, Dhawan and Kohli need to forge a solid stand to bail India out in the run chase.
Dhawan who looked in solid touch hit a few glorious boundaries and helped India cross the 50-run mark in the 10th over along with Kohli. Proteas bowlers tried to create the pressure but the duo of Dhawan and Kohli managed to rotate strikes and hit regular boundaries, keeping hosts at bay.
The left-handed opener picked up a single off Keshav Maharaj to get to his 35th ODI fifty in 58 balls in the 18th over. On the other hand, Virat Kohli took the attack to Sisanda Magala and hit him for two successive boundaries as India crossed the 100-run mark in the 19th over. However, Dhawan couldn't carry his innings longer and got out to Phehlukwayo for 61 and his 98-run stand with Kohli came to an end in the 23rd over.
Rishabh Pant, who came to bat next, threw his wicket by playing a risky shot, getting out for a golden duck.
Despite losing two quick wickets, Kohli continued his controlled innings and completed his 64th ODI fifty. With wickets falling all around him, India needed a match-winning innings from the former India skipper but once again failed to convert, falling for the second time this series to Keshav Maharaj.
From there on, India needed a big partnership from Suryakumar Yadav and Shreyas Iyer. The pressure eased when Suryakumar Yadav walked in and unfurled a flurry of attacking shots. Iyer, though, holed out off Sisanda Magal to dent India's chase again. Soon, Suryakumar Yadav followed, trying to flick Dwaine Pretorius to the leg side and the leading edge taking the ball to mid-off.
Deepak Chahar revived India's hopes with a brilliant cameo, slamming two sixes and five fours in his half-century that took India to the cusp of a win. The half-century stand with Bumrah ended when he was out caught off a slower ball from Ngidi. Things unfolded quickly afterward with South Africa wrapping up the Indian tail to complete a close win.
Brief scores: South Africa for 287 all out in 49. 5 overs (Quinton de Kock 124, Rassie van der Dussen 52; Prasidh Krishna 3/59) beat India 283 all out in 49. 2 overs (Virat Kohli 65, Shikhar Dhawan 61, Andile Phehlukwayo 3/40) by 4 runs.
Also watch: | english |
<reponame>Jed-g/first-year-web-assignment<filename>css/index.css
/* author: <NAME> */
#profile-picture {
width: min(80vw, 30vh);
border-radius: 100%;
}
#name {
font-size: 2rem;
margin: 2vh 0;
}
#intro{
font-size: 1.2rem;
}
#welcome{
font-size: 3rem;
font-weight: 600;
margin: 0 0 3vh;
}
#about-me-images{
display: flex;
justify-content: space-evenly;
align-items: center;
margin: 4vh 0;
}
.about-me-image{
width: min(25vw, 10vh);
margin: 1vh 0;
}
#about-me-paragraph{
font-size: 1.2rem;
text-align: left;
} | css |
{"category":"sans-serif","family":"Exo 2","files":{"100":"http://fonts.gstatic.com/s/exo2/v10/7cH1v4okm5zmbvwkAx_sfcEuiD8jvvOcPtq-rpvLpQ.ttf","100italic":"http://fonts.gstatic.com/s/exo2/v10/7cH3v4okm5zmbtYtMeA0FKq0Jjg2drF0fNC6jJ7bpQBL.ttf","200":"http://fonts.gstatic.com/s/exo2/v10/7cH1v4okm5zmbvwkAx_sfcEuiD8jPvKcPtq-rpvLpQ.ttf","200italic":"http://fonts.gstatic.com/s/exo2/v10/7cH3v4okm5zmbtYtMeA0FKq0Jjg2drH0fdC6jJ7bpQBL.ttf","300":"http://fonts.gstatic.com/s/exo2/v10/7cH1v4okm5zmbvwkAx_sfcEuiD8j4PKcPtq-rpvLpQ.ttf","300italic":"http://fonts.gstatic.com/s/exo2/v10/7cH3v4okm5zmbtYtMeA0FKq0Jjg2drEqfdC6jJ7bpQBL.ttf","500":"http://fonts.gstatic.com/s/exo2/v10/7cH1v4okm5zmbvwkAx_sfcEuiD8jjPKcPtq-rpvLpQ.ttf","500italic":"http://fonts.gstatic.com/s/exo2/v10/7cH3v4okm5zmbtYtMeA0FKq0Jjg2drFGfdC6jJ7bpQBL.ttf","600":"http://fonts.gstatic.com/s/exo2/v10/7cH1v4okm5zmbvwkAx_sfcEuiD8jYPWcPtq-rpvLpQ.ttf","600italic":"http://fonts.gstatic.com/s/exo2/v10/7cH3v4okm5zmbtYtMeA0FKq0Jjg2drGqetC6jJ7bpQBL.ttf","700":"http://fonts.gstatic.com/s/exo2/v10/7cH1v4okm5zmbvwkAx_sfcEuiD8jWfWcPtq-rpvLpQ.ttf","700italic":"http://fonts.gstatic.com/s/exo2/v10/7cH3v4okm5zmbtYtMeA0FKq0Jjg2drGTetC6jJ7bpQBL.ttf","800":"http://fonts.gstatic.com/s/exo2/v10/7cH1v4okm5zmbvwkAx_sfcEuiD8jPvWcPtq-rpvLpQ.ttf","800italic":"http://fonts.gstatic.com/s/exo2/v10/7cH3v4okm5zmbtYtMeA0FKq0Jjg2drH0etC6jJ7bpQBL.ttf","900":"http://fonts.gstatic.com/s/exo2/v10/7cH1v4okm5zmbvwkAx_sfcEuiD8jF_WcPtq-rpvLpQ.ttf","900italic":"http://fonts.gstatic.com/s/exo2/v10/7cH3v4okm5zmbtYtMeA0FKq0Jjg2drHdetC6jJ7bpQBL.ttf","italic":"http://fonts.gstatic.com/s/exo2/v10/7cH3v4okm5zmbtYtMeA0FKq0Jjg2drF0fdC6jJ7bpQBL.ttf","regular":"http://fonts.gstatic.com/s/exo2/v10/7cH1v4okm5zmbvwkAx_sfcEuiD8jvvKcPtq-rpvLpQ.ttf"},"lastModified":"2021-01-30","subsets":["cyrillic","cyrillic-ext","latin","latin-ext","vietnamese"],"variants":["100","200","300","regular","500","600","700","800","900","100italic","200italic","300italic","italic","500italic","600italic","700italic","800italic","900italic"],"version":"v10"}
| json |
.brand-intro {
text-align: center;
background-color: #a811b5;
color: #fff;
padding: 120px 0;
background-position: center center;
background-repeat: no-repeat;
}
.sui-btn {
display: inline-block;
padding: 2px 14px;
box-sizing: border-box;
margin-bottom: 0;
font-size: 12px;
line-height: 18px;
text-align: center;
vertical-align: middle;
cursor: pointer;
color: #333333;
background-color: #eeeeee;
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
border: 1px solid #e1e1e1;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
.btn-lead {
padding: 1em 4em;
border: 2px solid #fff;
opacity: .8;
background: transparent;
color: #fff;
font-size: 24px;
height: auto;
}
.footer {
border-top: 1px solid #aaa;
padding: 30px;
text-align: center;
color: #666;
font-size: 13px;
margin-top: 50px;
}
.index-body {
margin-top: 22px;
margin-bottom: 22px;
}
#index-group .i-c-p1 {
background: #A020F0 no-repeat 35px -47px;
}
#index-group .i-c-p2 {
background: #FF1493 no-repeat 35px -47px;
}
#index-group .i-c-p3 {
background: #e8b875 no-repeat 35px -47px;
}
#index-group .i-c-p4 {
background: #baa1e2 no-repeat 25px -260px;
}
#index-group .i-c-p {
height: 42px;
position: relative;
text-align: center;
overflow: hidden;
}
#index-group .i-c-ph, #index-group .i-c-ph1 {
color: #fff;
font-size: 1.3em;
margin: 0;
text-align: center;
position: absolute;
z-index: 10;
font-weight: 400;
left: 0;
width: 100%;
}
.i-c-ph, .i-c-ph1 {
color: #fff;
font-size: 1.5em;
text-align: center;
position: absolute;
z-index: 10;
bottom: .7em;
font-weight: 400;
left: 0;
width: 100%;
}
.i-c-list li {
height: 2.5em;
line-height: 2.5em;
overflow: hidden;
border-bottom: 1px dashed #eaeaea;
list-style: none;
padding-left: 10px;
font-size: 1.1em;
}
.modals {
margin-top:200px;
}
.gdspider, .gqspider, .gcspider, .rpspider {
margin:20px auto auto auto;
width:50%;
min-width:400px;
} | css |
class EventEmitter {
listeners = {};
fire(event) {
for (const key in this.listeners) {
let listener = this.listener(key);
this.unregister(key);
listener(events);
}
}
register(id, listener) {
this.listeners[id] = listener;
console.log('Register', id);
}
unregister(id) {
return delete this.listeners[id];
}
}
module.exports = EventEmitter;
| javascript |
<filename>frontend/src/app/components/shared/services/meta.service.ts<gh_stars>0
import { Injectable } from '@angular/core';
import {Meta, MetaDefinition} from '@angular/platform-browser';
@Injectable({
providedIn: 'root'
})
export class MetaService {
constructor(
private meta: Meta
) { }
public addTags(tags: MetaDefinition[]): void {
this.meta.addTags(tags);
}
}
| typescript |
{"name": "freezegun", "description": "Let your Python tests travel through time", "license": {"key": "apache-2.0", "name": "Apache License 2.0", "spdx_id": "Apache-2.0", "url": "https://api.github.com/licenses/apache-2.0"}, "starNum": 1258, "folkNum": 114, "watchNum": 1258, "topic": []} | json |
Why this website?
Who owns the Media?
Patra was way out of line but does Razdan own the show?
A professional journalist does not own air time. She has borrowed the time from the public as a trustee of public interest,
Does social media chatter help a film succeed?
Both controversies and a marketing push lead to a buzz on social media for a film. But should such manipulated discussions influence movie goers on what to watch,
Sundays are ruined with his grumbling and mumbo-jumbo. Give your readers a break please, dear Indian Express.
The coverage of Nestle's Maggi controversy was massive but unbalanced, with fulsome praise for the brand and irrelevant nostalgia. Its controversial record abroad was ignored.
Why bother with edits?
In the Lalu conviction case only the Times of India made the proper connections between the Rahul rejection, Nitish Kumar's pressure and the conviction itself.
Intelligence reporting or embedded journalism?
Why do spooks mostly feed us the apple-pie-cold-coffee stories instead of revealing information of the kind Gen Singh disclosed?
The Untold Story of Dalit Journalists-Part II. Most Dalit journalists insist that social network based on caste plays a crucial role in placement and, subsequently, in switching jobs.
Untold story of Dalit journalists - Part III. Change the media has from Uniyal's days, but its pace mimics the Hindu rate of growth, which had dogged India's economic growth.
NGOs too want publicity for the good work they do, and the global ones certainly are flush with funds.
And now, Bollywood Bolta!
Several names for the prospective publication were suggested- Filmfair, Star-Durst (dare), Asli Pitcher, Hum Critic Se Kum Nahin, Movie aur Seedhi Baat, Filmy Log (ka) Pal, Hum Hain Cannes and Parde ke Peeche,
| english |
A woman and her two minor children drowned when a boat carrying seven people capsized in the Brahmaputra in Assam's Morigaon district on Friday, a police officer said.
The country boat, in which the victims were travelling, overturned after colliding with another engine-driven boat at Hamu Chapori in the Laharighat area of the district.
"All passengers of the country boat fell into the river under the impact of the collision. Three of them drowned, while four others managed to swim to safety," the officer said.
The victims have been identified as Bimla Khatun, her son Jinnahtul Islam, and her daughter Istara Khatun.
Their bodies were recovered by district authorities with the help of locals, the officer added.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed. ) | english |
<reponame>NiceEasy/pinetreeMobile
package com.pinetree.mobile.utils;
import android.content.Context;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
/**
* 网络数据缓存工具类
*/
public class FilesUtils {
//缓存目录的文件名
private final static String APK_CACHE_FILE_NAME="PINETREE";
//获取缓存
public static String getCacheInfo(String fileName,Context context){
File file=getFile(fileName,context);
if(file==null)return null;
try {
if(file.isFile() && file.exists()){ //判断文件是否存在
InputStreamReader read = new InputStreamReader(
new FileInputStream(file));//考虑到编码格式
BufferedReader bufferedReader = new BufferedReader(read);
StringBuffer sb=new StringBuffer();
String lineTxt = null;
while((lineTxt = bufferedReader.readLine()) != null){
sb.append(lineTxt);
}
read.close();
bufferedReader.close();
// return AESTUtil.getInstance().deciphering(sb.toString());
return sb.toString();
}
}catch (Exception e){
return null;
}
return null;
}
//储存缓存 内容是加密的。。用到的加密工具。自己搞一个吧。你也可以不加密
public static void setCacheInfo(String fileName,String str,Context context){
File file=getFile(fileName,context);
//这是对内容进行加密。可加密,可不加密
// content= AESTUtil.getInstance().encrypt(content);
if(file==null)return;
try {
OutputStreamWriter outputStreamWriter=new OutputStreamWriter(new FileOutputStream(file));
outputStreamWriter.write(str);
outputStreamWriter.close();
}catch (Exception e){
}
}
public static File getFile(String fileName,Context context){
File file=getFileDir("cache",context);
if(file==null)return null;
return new File(file,fileName);
}
public static File getFileDir(String fileDirName,Context context){
File apkFile=null;
if(existSDCard()){
apkFile=new File(context.getExternalCacheDir().getAbsolutePath()+ File.separator+APK_CACHE_FILE_NAME+ File.separator+fileDirName);
if(apkFile==null)return apkFile;
if(!apkFile.exists()||!apkFile.isDirectory()){
if(!apkFile.mkdirs())return null;
}
}else {
apkFile=new File(context.getCacheDir().getAbsolutePath()+ File.separator+APK_CACHE_FILE_NAME+ File.separator+fileDirName);
if(apkFile==null)return apkFile;
if(!apkFile.exists()||!apkFile.isDirectory()){
if(!apkFile.mkdirs())return null;
}
}
return apkFile;
}
private static boolean existSDCard() {
if (android.os.Environment.getExternalStorageState().equals(
android.os.Environment.MEDIA_MOUNTED)) {
return true;
} else
return false;
}
public static void deleteDirectory(File dirFile) {
if (!dirFile.exists() || !dirFile.isDirectory()) {
return;
}
//删除文件夹下的所有文件(包括子目录)
File[] files = dirFile.listFiles();
for (int i = 0; i < files.length; i++) {
//删除子文件
if (files[i].isFile()) {
deleteFile(files[i]);
} //删除子目录
else {
deleteDirectory(files[i]);
}
}
dirFile.delete();
}
public static void deleteFile(File file) {
// 路径为文件且不为空则进行删除
if (file.isFile() && file.exists()) {
file.delete();
}
}
}
| java |
A little after two and a half days, Aussies celebrate their first Test win on Indian soil since 2004.
Australian skipper Steve Smith shakes hands with Virat Kohli after ending his 19-Test unbeaten run as captain.
Ravindra Jadeja looks back to find a bail dislodged as India suffered another batting collapse in Pune.
India's captain Virat Kohli walks back after getting out to Steve O' Keefe.
6-35; 6-35 read Steve O'Keefe's match figures as he bowled Australia to a stunning win over the host.
| english |
//! Builder for the [`Simulation`]
//!
//! [`Simulation`]: ./../trait.Simulation.html
use super::time::InstantWrapperImpl;
use super::{InstantWrapperFactoryFn, World, WorldInteractorFactoryFn};
use crate::object::AssociatedObjectData;
use crate::simulation::simulation_impl::world::builder::NphysicsWorldBuilder;
use crate::simulation::simulation_impl::SimulationImpl;
use crate::simulation::Simulation;
use crate::world_interactor::WorldInteractorImpl;
use nameof::name_of_type;
use std::fmt;
use std::fmt::Debug;
use std::time::Instant;
/// Builder for the [`Simulation`]. This is the composition root.
/// Only advanced users should derive from the defaults.
///
/// # Example
/// ```
/// use myelin_engine::simulation::SimulationBuilder;
///
/// let simulation = SimulationBuilder::<()>::new().build();
/// ```
///
/// [`Simulation`]: ./../trait.Simulation.html
pub struct SimulationBuilder<T> {
world: Option<Box<dyn World>>,
world_interactor_factory_fn: Option<Box<WorldInteractorFactoryFn<T>>>,
instant_wrapper_factory_fn: Option<Box<InstantWrapperFactoryFn>>,
}
impl<T> Debug for SimulationBuilder<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct(name_of_type!(SimulationBuilder<T>))
.field("world", &self.world)
.finish()
}
}
impl<T> Default for SimulationBuilder<T> {
fn default() -> Self {
Self {
world: None,
world_interactor_factory_fn: None,
instant_wrapper_factory_fn: None,
}
}
}
impl<T> SimulationBuilder<T>
where
T: AssociatedObjectData,
{
/// Creates a new builder by calling SimulationBuilder::default()
pub fn new() -> Self {
Self::default()
}
/// Sets the [`World`] which the [`Simulation`] is going to use.
///
/// By default this builder uses the [`NphysicsWorldBuilder`] with default settings.
///
/// [`World`]: ../trait.World.html
/// [`Simulation`]: ./../trait.Simulation.html
/// [`NphysicsWorldBuilder`]: ../builder/struct.NphysicsWorldBuilder.html
pub fn world(&mut self, world: Box<dyn World>) {
self.world = Some(world)
}
/// Sets the [`WorldInteractorFactoryFn`].
///
/// [`WorldInteractorFactoryFn`]: ../simulation_impl/trait.WorldInteractorFactoryFn.html
pub fn world_interactor_factory_fn(
&mut self,
world_interactor_factory_fn: Box<WorldInteractorFactoryFn<T>>,
) {
self.world_interactor_factory_fn = Some(world_interactor_factory_fn)
}
/// Sets the [`InstantWrapperFactoryFn`].
///
/// [`InstantWrapperFactoryFn`]: ../simulation_impl/trait.InstantWrapperFactoryFn.html
pub fn instant_wrapper_factory_fn(
&mut self,
instant_wrapper_factory_fn: Box<InstantWrapperFactoryFn>,
) {
self.instant_wrapper_factory_fn = Some(instant_wrapper_factory_fn)
}
/// Builds the [`Simulation`].
///
/// [`Simulation`]: ./../trait.Simulation.html
pub fn build<'a>(self) -> Box<dyn Simulation<T> + 'a>
where
T: 'a,
{
box SimulationImpl::new(
self.world
.unwrap_or_else(|| box NphysicsWorldBuilder::default().build()),
self.world_interactor_factory_fn.unwrap_or_else(|| {
box |simulation, id| box WorldInteractorImpl::new(simulation, id)
}),
self.instant_wrapper_factory_fn
.unwrap_or_else(|| box || box InstantWrapperImpl::new(Instant::now())),
)
}
}
| rust |
Lewis Hamilton started the 2022 F1 Singapore GP third but crossed the checkered flag in ninth position after a poor performance. The seven-time world champion had a race to forget under the lights of Marina Bay. He had a weak start and was pushed wide by Carlos Sainz in the first few laps.
Hamilton stuck close to the Spaniard's Ferrari until he slid out and nosed into a barrier shortly after the halfway distance. After a pitstop where he changed his front wing and switched to slick tires, Hamilton attempted to mount a challenge but the pace on his Mercedes was missing. The Briton was passed by Max Verstappen in the final few laps of the race and finished ninth.
Fans were appalled by the poor performance of the legendary driver, calling it the worst race of the season for the Brackley-based team. They also suggested that age was getting to the driver. Some of the tweets are:
"Too many mistakes for Hamilton. I think his age is getting to him. "
"He was terrible today"
"This is our worst race of the season when it should have been our best. Great job team"
"A race to forget. We'll come back stronger next week"
"Russell way better than finished Lamilton"
"Where waa your supposed pace in 'high downforce track'? Loliston couldn't overtake an Aston"
"Please end the misery and create a good car for 2023 season. There will be 24 races and 6 sprints…we need an amazing car! "
"lewis deserves better"
Fans also pointed out how Mercedes had let down both its drivers in the race. Hamilton had asked for slick tires to be fitted before the race, but Mercedes switched it to intermediates at the last second and the British driver was left complaining about a lack of grip.
Lewis Hamilton was stuck behind Carlos Sainz for most of the race after the Spaniard passed the Mercedes driver at turn 2 on the first lap. Sainz had a drastic loss of pace but Hamilton, trying as he might, was unable to get past the Ferrari. Speaking in a post-race interview, Hamilton said:
"Yeah, that kind of difficult start, and then obviously getting stuck behind Carlos. I don't know why he was so slow. But obviously not quick enough to get past him in these conditions, and then just sitting behind him. "
Lewis Hamilton also explained that he had the pace to keep up with the leaders but was stuck behind the Ferrari. The Briton said:
"But I think I could do similar times to the guys ahead, but because I was stuck behind him, I couldn't. I think if I was third I would have would have kept with the guys up ahead. "
Lewis Hamilton will look to get over this dismal performance and focus on Japan next week. | english |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.