text stringlengths 1 1.04M | language stringclasses 25 values |
|---|---|
package hu.bme.mit.theta.solver.smtlib.cli;
import com.beust.jcommander.IParameterValidator;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.ParameterException;
import com.beust.jcommander.Parameters;
import hu.bme.mit.theta.common.Tuple2;
import hu.bme.mit.theta.common.logging.ConsoleLogger;
import hu.bme.mit.theta.common.logging.Logger;
import hu.bme.mit.theta.solver.smtlib.solver.installer.SmtLibSolverInstallerException;
import hu.bme.mit.theta.solver.smtlib.SmtLibSolverManager;
import java.awt.Desktop;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
public class SmtLibCli {
private static final String JAR_NAME = "theta-solver-smtlib-cli.jar";
private final String[] args;
private Logger logger;
static class MainParams {
@Parameter(names = "--home", description = "The path of the solver registry")
String home = SmtLibSolverManager.HOME.toAbsolutePath().toString();
@Parameter(names = "--loglevel", description = "Detailedness of logging")
Logger.Level logLevel = Logger.Level.MAINSTEP;
@Parameter(names = "--stacktrace", description = "Prints the stacktrace in case of an error")
private boolean stacktrace = false;
@Parameter(names = "--help", help = true, description = "Prints this help message")
private boolean help = false;
}
interface Command {
String getCommand();
void handle(SmtLibSolverManager smtLibSolverManager, Logger logger) throws SmtLibSolverInstallerException;
}
@Parameters(commandDescription = "Installs the solver")
static class InstallCommand implements Command {
static final String COMMAND = "install";
@Parameter(description = "The solver to install (<solver_name>:<solver_version>)", validateWith = SolverNameAndVersionValidator.class, required = true)
String solver;
@Parameter(names = "--name", description = "Install the solver version under this custom name (<solver_name>:<name>), instead of the default (<solver_name>:<solver_version>)")
String name;
@Parameter(names = "--solver-path", description = "The path of the solver to install. The solver will not be downloaded, instead the binary on this path will be used. Caveat emptor: the version must be specified correctly, there is no automatic detection.")
String solverPath;
@Parameter(names = "--tempt-murphy", description = "Allows the installation of unsupported solver version")
boolean temptMurphy = false;
@Override
public String getCommand() {
return COMMAND;
}
@Override
public void handle(final SmtLibSolverManager smtLibSolverManager, final Logger logger) throws SmtLibSolverInstallerException{
final var solver = decodeVersionString(this.solver);
if(solver.get1().equals(smtLibSolverManager.getGenericInstallerName())) {
logger.write(Logger.Level.RESULT, "To install a generic solver, use the \"%s\" command", InstallGenericCommand.COMMAND);
return;
}
if(name != null) {
smtLibSolverManager.install(solver.get1(), solver.get2(), name, solverPath != null ? Path.of(solverPath) : null, temptMurphy);
}
else {
smtLibSolverManager.install(solver.get1(), solver.get2(), solver.get2(), solverPath != null ? Path.of(solverPath) : null, temptMurphy);
}
}
}
@Parameters(commandDescription = "Installs a generic solver")
static class InstallGenericCommand implements Command {
static final String COMMAND = "install-generic";
@Parameter(names = "--solver-path", description = "The path of the generic solver to install", required = true)
String solverPath;
@Parameter(names = "--solver-args", description = "The arguments of the generic solver to invoke with")
String solverArgs;
@Parameter(names = "--name", description = "Install the solver version under this custom name (<solver_name>:<name>), instead of the default (<solver_name>:<solver_version>)", required = true)
String name;
@Override
public String getCommand() {
return COMMAND;
}
@Override
public void handle(final SmtLibSolverManager smtLibSolverManager, final Logger logger) throws SmtLibSolverInstallerException {
smtLibSolverManager.installGeneric(
name,
Path.of(solverPath),
(solverArgs == null ? "" : solverArgs).split(" ")
);
}
}
@Parameters(commandDescription = "Uninstalls the solver")
static class UninstallCommand implements Command {
static final String COMMAND = "uninstall";
@Parameter(description = "The solver to uninstall (<solver_name>:<solver_version>)", validateWith = SolverNameAndVersionValidator.class, required = true)
String solver;
@Override
public String getCommand() {
return COMMAND;
}
@Override
public void handle(SmtLibSolverManager smtLibSolverManager, Logger logger) throws SmtLibSolverInstallerException {
final var solver = decodeVersionString(this.solver);
smtLibSolverManager.uninstall(solver.get1(), solver.get2());
}
}
@Parameters(commandDescription = "Renames one installed solver version")
static class RenameCommand implements Command {
static final String COMMAND = "rename";
@Parameter(description = "The solver to reinstall (<solver_name>:<solver_version>)", validateWith = SolverNameAndVersionValidator.class, required = true)
String solver;
@Parameter(names = "--name", description = "Rename the solver version to this custom name (<solver_name>:<name>).", required = true)
String name;
@Override
public String getCommand() {
return COMMAND;
}
@Override
public void handle(SmtLibSolverManager smtLibSolverManager, Logger logger) throws SmtLibSolverInstallerException {
final var solver = decodeVersionString(this.solver);
smtLibSolverManager.rename(solver.get1(), solver.get2(), name);
}
}
@Parameters(commandDescription = "Prints info about the solver")
static class GetInfoCommand implements Command {
static final String COMMAND = "get-info";
@Parameter(description = "The solver to print info about (<solver_name>:<solver_version>)", validateWith = SolverNameAndVersionValidator.class, required = true)
String solver;
@Override
public String getCommand() {
return COMMAND;
}
@Override
public void handle(SmtLibSolverManager smtLibSolverManager, Logger logger) throws SmtLibSolverInstallerException {
final var solver = decodeVersionString(this.solver);
final var info = smtLibSolverManager.getInfo(solver.get1(), solver.get2());
logger.write(Logger.Level.RESULT, "%s\n", info);
}
}
@Parameters(commandDescription = "Edits the runtime arguments passed to the solver")
static class EditArgsCommand implements Command {
static final String COMMAND = "edit-args";
@Parameter(description = "The solver, whose runtime arguments are to be edited (<solver_name>:<solver_version>)", validateWith = SolverNameAndVersionValidator.class, required = true)
String solver;
@Parameter(names = "--print", description = "Print the path instead of opening it for editing")
boolean print = false;
@Override
public String getCommand() {
return COMMAND;
}
@Override
public void handle(SmtLibSolverManager smtLibSolverManager, Logger logger) throws SmtLibSolverInstallerException {
final var solver = decodeVersionString(this.solver);
final var argsFilePath = smtLibSolverManager.getArgsFile(solver.get1(), solver.get2());
if(print) {
logger.write(Logger.Level.RESULT, String.format("%s\n", argsFilePath.toAbsolutePath()));
}
else if(Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.EDIT)) {
try {
Desktop.getDesktop().edit(argsFilePath.toFile());
} catch (IOException e) {
throw new SmtLibSolverInstallerException(e);
}
}
else {
logger.write(Logger.Level.MAINSTEP, "Open the following text file in your favourite editor, and edit the content:\n");
logger.write(Logger.Level.RESULT, String.format("%s\n", argsFilePath.toAbsolutePath()));
}
}
}
@Parameters(commandDescription = "Lists installed solvers and their versions")
static class ListInstalledCommand implements Command {
static final String COMMAND = "list-installed";
@Parameter(description = "The solver, whose installed versions are to be listed (<solver_name>)", validateWith = SolverNameValidator.class)
String solver;
@Override
public String getCommand() {
return COMMAND;
}
@Override
public void handle(SmtLibSolverManager smtLibSolverManager, Logger logger) throws SmtLibSolverInstallerException {
if(solver != null) {
logger.write(Logger.Level.MAINSTEP, "The currently installed versions of solver %s are: \n", solver);
smtLibSolverManager.getInstalledVersions(solver).forEach(version -> {
logger.write(Logger.Level.RESULT, "\t%s:%s\n", solver, version);
});
}
else {
logger.write(Logger.Level.MAINSTEP, "The currently installed solvers are: \n");
smtLibSolverManager.getInstalledVersions().forEach(solver -> {
solver.get2().forEach(version -> {
logger.write(Logger.Level.RESULT, "\t%s:%s\n", solver.get1(), version);
});
});
}
}
}
@Parameters(commandDescription = "Lists supported solvers and their versions")
static class ListSupportedCommand implements Command {
static final String COMMAND = "list-supported";
@Parameter(description = "The solver, whose supported versions are to be listed (<solver_name>)", validateWith = SolverNameValidator.class)
String solver;
@Override
public String getCommand() {
return COMMAND;
}
@Override
public void handle(SmtLibSolverManager smtLibSolverManager, Logger logger) throws SmtLibSolverInstallerException {
if(solver != null) {
logger.write(Logger.Level.MAINSTEP, "The currently supported versions of solver %s are: \n", solver);
smtLibSolverManager.getSupportedVersions(solver).forEach(version -> {
logger.write(Logger.Level.RESULT, "\t%s:%s\n", solver, version);
});
}
else {
logger.write(Logger.Level.MAINSTEP, "The currently supported solvers are: \n");
smtLibSolverManager.getSupportedVersions().forEach(solver -> {
solver.get2().forEach(version -> {
logger.write(Logger.Level.RESULT, "\t%s:%s\n", solver.get1(), version);
});
});
}
}
}
public SmtLibCli(final String[] args) {
this.args = args;
}
public static void main(final String[] args) {
final SmtLibCli mainApp = new SmtLibCli(args);
mainApp.run();
}
private void run() {
final var mainParams = new MainParams();
List<Command> commands = List.of(
new InstallCommand(),
new InstallGenericCommand(),
new UninstallCommand(),
new RenameCommand(),
new GetInfoCommand(),
new EditArgsCommand(),
new ListInstalledCommand(),
new ListSupportedCommand()
);
final var jcBuilder = JCommander.newBuilder().addObject(mainParams);
commands.forEach(command -> jcBuilder.addCommand(command.getCommand(), command));
final var jc = jcBuilder.programName(JAR_NAME).build();
try {
jc.parse(args);
logger = new ConsoleLogger(mainParams.logLevel);
} catch (final ParameterException ex) {
System.out.println("Invalid parameters, details:");
System.out.println(ex.getMessage());
ex.usage();
return;
}
if(mainParams.help) {
jc.usage();
return;
}
try {
final var homePath = createIfNotExists(Path.of(mainParams.home));
final var smtLibSolverManager = SmtLibSolverManager.create(homePath, logger);
if(jc.getParsedCommand() == null) {
logger.write(Logger.Level.RESULT, "Missing command\n");
jc.usage();
return;
}
final var parsedCommand = jc.getParsedCommand();
for(final var command : commands) {
if(command.getCommand().equals(parsedCommand)) {
command.handle(smtLibSolverManager, logger);
return;
}
}
logger.write(Logger.Level.RESULT, "Unknown command\n");
jc.usage();
}
catch (SmtLibSolverInstallerException e) {
logger.write(Logger.Level.RESULT, "%s\n", e.getMessage());
if(mainParams.stacktrace) {
printError(e, true);
}
}
catch (IOException e) {
printError(e, mainParams.stacktrace);
}
}
private static Tuple2<String, String> decodeVersionString(final String version) {
return Tuple2.of(SmtLibSolverManager.getSolverName(version), SmtLibSolverManager.getSolverVersion(version));
}
private Path createIfNotExists(final Path path) throws IOException {
if(!Files.exists(path)) {
Files.createDirectory(path);
}
return path;
}
private void printError(final Throwable ex, final boolean printStackTrace) {
final String message = ex.getMessage() == null ? "" : ex.getMessage();
logger.write(Logger.Level.RESULT, "%s occurred, message: %s%n", ex.getClass().getSimpleName(), message);
if (printStackTrace) {
final StringWriter errors = new StringWriter();
ex.printStackTrace(new PrintWriter(errors));
logger.write(Logger.Level.RESULT, "Trace:%n%s%n", errors.toString());
}
else {
logger.write(Logger.Level.RESULT, "Use --stacktrace for stack trace%n");
}
}
public static class SolverNameValidator implements IParameterValidator {
@Override
public void validate(String name, String value) throws ParameterException {
if(!value.matches("[a-zA-Z0-9]+")) {
throw new ParameterException(
String.format("Invalid solver name in parameter %s", name)
);
}
}
}
public static class SolverNameAndVersionValidator implements IParameterValidator {
@Override
public void validate(String name, String value) throws ParameterException {
final var versionArr = value.split(":");
if(versionArr.length != 2) {
throw new ParameterException(String.format("Invalid version string %s in parameter %s", value, name));
}
if(!versionArr[0].matches("[a-zA-Z0-9]+") || !versionArr[1].matches("[a-zA-Z0-9-._]+")) {
throw new ParameterException(
String.format("Invalid version string %s in parameter %s", value, name)
);
}
}
}
}
| java |
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.
// Polkadot is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Polkadot is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
//! Utilities that don't belong to any particular module but may draw
//! on all modules.
use primitives::v1::{Id as ParaId, PersistedValidationData, ValidatorIndex};
use sp_std::vec::Vec;
use crate::{configuration, paras, hrmp};
/// Make the persisted validation data for a particular parachain, a specified relay-parent and it's
/// storage root.
///
/// This ties together the storage of several modules.
pub fn make_persisted_validation_data<T: paras::Config + hrmp::Config>(
para_id: ParaId,
relay_parent_number: T::BlockNumber,
relay_parent_storage_root: T::Hash,
) -> Option<PersistedValidationData<T::Hash, T::BlockNumber>> {
let config = <configuration::Module<T>>::config();
Some(PersistedValidationData {
parent_head: <paras::Module<T>>::para_head(¶_id)?,
relay_parent_number,
relay_parent_storage_root,
max_pov_size: config.max_pov_size,
})
}
/// Take the active subset of a set containing all validators.
pub fn take_active_subset<T: Clone>(active_validators: &[ValidatorIndex], set: &[T]) -> Vec<T> {
let subset: Vec<_> = active_validators.iter()
.filter_map(|i| set.get(i.0 as usize))
.cloned()
.collect();
if subset.len() != active_validators.len() {
log::warn!(
target: "runtime::parachains",
"Took active validators from set with wrong size",
);
}
subset
}
| rust |
Andhra Pradesh is experiencing long power cuts irrespective of the time. No matter if it is day or night, the power cuts are the same as per the reports. Barring a few regions, almost all the areas are having power cuts. The power cuts are said to be on during the night too.
Pawan Kalyan who has been raising his voice against the power cuts had attacked the government for one time on the same topic. He said that people are facing a lot of problems with the power cuts and demanded the government focus on correcting the mess.
Targeting the YCP government for pushing the state into a power crisis, Pawan Kalyan asked how the state which had power in surplus is dealing with the scarcity. If the government would have taken correct decisions, the current situation would have not been there, Pawan said.
Attacking Jagan on his election promise of giving more power to the households for less amount, Janasenani said that forget about extra current, people are unable to even use the fan in the houses. The fan is the election symbol of YCP.
Pawan Kalyan had breathed fire on the government on the power holiday of power stations. He asked how the companies and firms can survive if power is not supplied for a whole day. What the YCP wants to do to the state, Pawan asked. | english |
{"name":"BTCSEA Trademark BCSEA","symbol":"BCSEA","logoURI":"https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/G2PYNu3XS3XQndSof5DffP4QPCzcJ35SAB6a3WuYEgvL/logo.png","decimals":9,"address":"G2PYNu3XS3XQndSof5DffP4QPCzcJ35SAB6a3WuYEgvL","chainId":101,"tags":["btcnftsea-io","trademark"],"extensions":{"website":"https://btcnftsea.io/"}} | json |
Tenoten is a homeopathic drug that affects the nervous system. The drug is given in tablet form.
The drug has antidepressant, anxiolytic, stress-protective, nootropic, antiamnestic, anti-asthenic, neuroprotective effect. Tenoten does not cause a muscle relaxant, sedative and cholinolytic effect.
When hypoxia, intoxication, states after an acute cerebral circulation disorder, the drug produces a neuroprotective effect, limiting the area of damage, improving memory and learning processes .
One tablet contains antibodies to the protein brain-specific S-100 athenoechistchennye - active components. Excipients: magnesium stearate, microcrystalline cellulose, lactose.
Assign the drug for neurotic-like, neurotic disorders, accompanied by manifestations of anxiety-depressive symptoms, with asthenic conditions.
The medication is indicated for organic disorders of the central nervous system of moderate severity combined with the instability of the emotional background, apathy, irritability, decreased activity and memory.
One tablet of the drug is designed for a single dose. Keep the medication in the mouth until it is completely resorbed.
Depending on the severity of the manifestations, Tenoten's instruction allows you to take up to twelve tablets per day. Therapeutic course - from one to three months. If necessary, take the drug for up to six months or repeat after one to two months.
Tenoten's instruction recommends taking an empty stomach from one tablet with neurosis-like disorders of mild degree to two tablets six times a day with anxiety-depressive states of pronounced course.
Cases of overdose and manifestations of adverse reactions in practice were not observed. The safety of the drug during lactation and pregnancy is not established. In this regard, you should consult before applying Tenoten with your doctor.
Contraindicated medication with increased sensitivity to the ingredients.
Due to the fact that the preparation contains an activating component, the last reception is carried out no later than two hours before bedtime.
Tenoten is often prescribed by pediatricians. For young patients, there is a special children's medicine. As a rule, the need for its application arises with excessive excitability of the child or if he does not sleep well, is often irritated, capricious. Tenoten is also effective in the period of adaptation of children to a new collective (school, kindergarten). The drug, unlike other soothing, does not cause lethargy, drowsiness, apathy and inhibition.
At one time, one tablet is calculated. Keep the drug in the mouth before dissolving. It is not recommended to take it with food. If necessary, it is dissolved in boiled water (in a small amount). It is recommended to take one to three times a day for one to three months. The therapeutic course, if necessary, is prolonged to six months or repeated after one or two months from the last application.
When approaching any stressful event (moving, school or kindergarten) it is recommended to start the reception two to three weeks before it.
According to some experts, Tenoten is allowed to apply long-term courses.
Before taking the drug should consult with a specialist. If there is no persistent effect, a doctor should be examined within three to four weeks of therapy. | english |
<filename>HDU/6197.cpp<gh_stars>1-10
/**
* author: MaGnsi0
* created: 10.11.2021 21:50:47
**/
#include <bits/stdc++.h>
using namespace std;
//O(n log k) Greedy + D&C Algorithm
template <typename T>
void LIS(vector<T>& A, vector<int>& memo) {
int n = A.size(), k = 0;
vector<T> L(n, 0);
for (int i = 0; i < n; ++i) {
int pos = lower_bound(L.begin(), L.begin() + k, A[i]) - L.begin();
L[pos] = A[i];
if (pos == k) {
k++;
}
memo[i] = pos + 1;
}
}
int main() {
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int T;
cin >> T;
while (T--) {
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; ++i) {
cin >> a[i];
}
vector<int> dp1(n, 0);
LIS(a, dp1);
for (int i = 0; i < n; ++i) {
a[i] *= -1;
}
vector<int> dp2(n, 0);
LIS(a, dp2);
bool magic = false;
for (int i = 0; i < n; ++i) {
magic |= (dp1[i] >= n - k);
magic |= (dp2[i] >= n - k);
}
cout << (magic ? "A is a magic array." : "A is not a magic array.") << "\n";
}
}
| cpp |
import inspect
import json
import os
import random
import subprocess
import time
import requests
import ast
import paramiko
import rancher
from rancher import ApiError
from lib.aws import AmazonWebServices
DEFAULT_TIMEOUT = 120
DEFAULT_MULTI_CLUSTER_APP_TIMEOUT = 300
CATTLE_TEST_URL = os.environ.get('CATTLE_TEST_URL', "http://localhost:80")
ADMIN_TOKEN = os.environ.get('ADMIN_TOKEN', "None")
CATTLE_API_URL = CATTLE_TEST_URL + "/v3"
kube_fname = os.path.join(os.path.dirname(os.path.realpath(__file__)),
"k8s_kube_config")
MACHINE_TIMEOUT = float(os.environ.get('RANCHER_MACHINE_TIMEOUT', "1200"))
TEST_IMAGE = "sangeetha/mytestcontainer"
CLUSTER_NAME = os.environ.get("RANCHER_CLUSTER_NAME", "")
RANCHER_CLEANUP_CLUSTER = \
ast.literal_eval(os.environ.get('RANCHER_CLEANUP_CLUSTER', "True"))
env_file = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
"rancher_env.config")
CLUSTER_NAME_2 = ""
def random_str():
return 'random-{0}-{1}'.format(random_num(), int(time.time()))
def random_num():
return random.randint(0, 1000000)
def random_int(start, end):
return random.randint(start, end)
def random_test_name(name="test"):
return name + "-" + str(random_int(10000, 99999))
def get_admin_client():
return rancher.Client(url=CATTLE_API_URL, token=ADMIN_TOKEN, verify=False)
def get_client_for_token(token):
return rancher.Client(url=CATTLE_API_URL, token=token, verify=False)
def get_project_client_for_token(project, token):
p_url = project.links['self'] + '/schemas'
p_client = rancher.Client(url=p_url, token=token, verify=False)
return p_client
def get_cluster_client_for_token(cluster, token):
c_url = cluster.links['self'] + '/schemas'
c_client = rancher.Client(url=c_url, token=token, verify=False)
return c_client
def up(cluster, token):
c_url = cluster.links['self'] + '/schemas'
c_client = rancher.Client(url=c_url, token=token, verify=False)
return c_client
def wait_state(client, obj, state, timeout=DEFAULT_TIMEOUT):
wait_for(lambda: client.reload(obj).state == state, timeout)
return client.reload(obj)
def wait_for_condition(client, resource, check_function, fail_handler=None,
timeout=DEFAULT_TIMEOUT):
start = time.time()
resource = client.reload(resource)
while not check_function(resource):
if time.time() - start > timeout:
exceptionMsg = 'Timeout waiting for ' + resource.baseType + \
' to satisfy condition: ' + \
inspect.getsource(check_function)
if fail_handler:
exceptionMsg = exceptionMsg + fail_handler(resource)
raise Exception(exceptionMsg)
time.sleep(.5)
resource = client.reload(resource)
return resource
def wait_for(callback, timeout=DEFAULT_TIMEOUT, timeout_message=None):
start = time.time()
ret = callback()
while ret is None or ret is False:
time.sleep(.5)
if time.time() - start > timeout:
if timeout_message:
raise Exception(timeout_message)
else:
raise Exception('Timeout waiting for condition')
ret = callback()
return ret
def random_name():
return "test" + "-" + str(random_int(10000, 99999))
def create_project_and_ns(token, cluster, project_name=None, ns_name=None):
client = get_client_for_token(token)
p = create_project(client, cluster, project_name)
c_client = get_cluster_client_for_token(cluster, token)
ns = create_ns(c_client, cluster, p, ns_name)
return p, ns
def create_project(client, cluster, project_name=None):
if project_name is None:
project_name = random_name()
p = client.create_project(name=project_name,
clusterId=cluster.id)
time.sleep(5)
p = wait_until_available(client, p)
assert p.state == 'active'
return p
def create_project_with_pspt(client, cluster, pspt):
p = client.create_project(name=random_name(),
clusterId=cluster.id)
p = wait_until_available(client, p)
assert p.state == 'active'
return set_pspt_for_project(p, client, pspt)
def set_pspt_for_project(project, client, pspt):
project.setpodsecuritypolicytemplate(podSecurityPolicyTemplateId=pspt.id)
project = wait_until_available(client, project)
assert project.state == 'active'
return project
def create_ns(client, cluster, project, ns_name=None):
if ns_name is None:
ns_name = random_name()
ns = client.create_namespace(name=ns_name,
clusterId=cluster.id,
projectId=project.id)
wait_for_ns_to_become_active(client, ns)
ns = client.reload(ns)
assert ns.state == 'active'
return ns
def assign_members_to_cluster(client, user, cluster, role_template_id):
crtb = client.create_cluster_role_template_binding(
clusterId=cluster.id,
roleTemplateId=role_template_id,
subjectKind="User",
userId=user.id)
return crtb
def assign_members_to_project(client, user, project, role_template_id):
prtb = client.create_project_role_template_binding(
projectId=project.id,
roleTemplateId=role_template_id,
subjectKind="User",
userId=user.id)
return prtb
def change_member_role_in_cluster(client, user, crtb, role_template_id):
crtb = client.update(
crtb,
roleTemplateId=role_template_id,
userId=user.id)
return crtb
def change_member_role_in_project(client, user, prtb, role_template_id):
prtb = client.update(
prtb,
roleTemplateId=role_template_id,
userId=user.id)
return prtb
def create_kubeconfig(cluster):
generateKubeConfigOutput = cluster.generateKubeconfig()
print(generateKubeConfigOutput.config)
file = open(kube_fname, "w")
file.write(generateKubeConfigOutput.config)
file.close()
def validate_psp_error_worklaod(p_client, workload, error_message):
workload = wait_for_wl_transitioning(p_client, workload)
assert workload.state == "updating"
assert workload.transitioning == "error"
print(workload.transitioningMessage)
assert error_message in workload.transitioningMessage
def validate_workload(p_client, workload, type, ns_name, pod_count=1,
wait_for_cron_pods=60):
workload = wait_for_wl_to_active(p_client, workload)
assert workload.state == "active"
# For cronjob, wait for the first pod to get created after
# scheduled wait time
if type == "cronJob":
time.sleep(wait_for_cron_pods)
pods = p_client.list_pod(workloadId=workload.id).data
assert len(pods) == pod_count
for pod in pods:
wait_for_pod_to_running(p_client, pod)
wl_result = execute_kubectl_cmd(
"get " + type + " " + workload.name + " -n " + ns_name)
if type == "deployment" or type == "statefulSet":
assert wl_result["status"]["readyReplicas"] == pod_count
if type == "daemonSet":
assert wl_result["status"]["currentNumberScheduled"] == pod_count
if type == "cronJob":
assert len(wl_result["status"]["active"]) >= pod_count
return
for key, value in workload.workloadLabels.items():
label = key + "=" + value
get_pods = "get pods -l" + label + " -n " + ns_name
pods_result = execute_kubectl_cmd(get_pods)
assert len(pods_result["items"]) == pod_count
for pod in pods_result["items"]:
assert pod["status"]["phase"] == "Running"
return pods_result["items"]
def validate_workload_with_sidekicks(p_client, workload, type, ns_name,
pod_count=1):
workload = wait_for_wl_to_active(p_client, workload)
assert workload.state == "active"
pods = wait_for_pods_in_workload(p_client, workload, pod_count)
assert len(pods) == pod_count
for pod in pods:
wait_for_pod_to_running(p_client, pod)
wl_result = execute_kubectl_cmd(
"get " + type + " " + workload.name + " -n " + ns_name)
assert wl_result["status"]["readyReplicas"] == pod_count
for key, value in workload.workloadLabels.items():
label = key + "=" + value
get_pods = "get pods -l" + label + " -n " + ns_name
execute_kubectl_cmd(get_pods)
pods_result = execute_kubectl_cmd(get_pods)
assert len(pods_result["items"]) == pod_count
for pod in pods_result["items"]:
assert pod["status"]["phase"] == "Running"
assert len(pod["status"]["containerStatuses"]) == 2
assert "running" in pod["status"]["containerStatuses"][0]["state"]
assert "running" in pod["status"]["containerStatuses"][1]["state"]
def validate_workload_paused(p_client, workload, expectedstatus):
workloadStatus = p_client.list_workload(uuid=workload.uuid).data[0].paused
assert workloadStatus == expectedstatus
def validate_pod_images(expectedimage, workload, ns_name):
for key, value in workload.workloadLabels.items():
label = key + "=" + value
get_pods = "get pods -l" + label + " -n " + ns_name
pods = execute_kubectl_cmd(get_pods)
for pod in pods["items"]:
assert pod["spec"]["containers"][0]["image"] == expectedimage
def validate_pods_are_running_by_id(expectedpods, workload, ns_name):
for key, value in workload.workloadLabels.items():
label = key + "=" + value
get_pods = "get pods -l" + label + " -n " + ns_name
pods = execute_kubectl_cmd(get_pods)
curpodnames = []
for pod in pods["items"]:
curpodnames.append(pod["metadata"]["name"])
for expectedpod in expectedpods["items"]:
assert expectedpod["metadata"]["name"] in curpodnames
def validate_workload_image(client, workload, expectedImage, ns):
workload = client.list_workload(uuid=workload.uuid).data[0]
assert workload.containers[0].image == expectedImage
validate_pod_images(expectedImage, workload, ns.name)
def execute_kubectl_cmd(cmd, json_out=True, stderr=False):
command = 'kubectl --kubeconfig {0} {1}'.format(
kube_fname, cmd)
if json_out:
command += ' -o json'
if stderr:
result = run_command_with_stderr(command)
else:
result = run_command(command)
if json_out:
result = json.loads(result)
print(result)
return result
def run_command(command):
return subprocess.check_output(command, shell=True, text=True)
def run_command_with_stderr(command):
try:
output = subprocess.check_output(command, shell=True,
stderr=subprocess.PIPE)
returncode = 0
except subprocess.CalledProcessError as e:
output = e.output
returncode = e.returncode
print(returncode)
return (output, returncode)
def wait_for_wl_to_active(client, workload, timeout=DEFAULT_TIMEOUT):
start = time.time()
workloads = client.list_workload(uuid=workload.uuid).data
assert len(workloads) == 1
wl = workloads[0]
while wl.state != "active":
if time.time() - start > timeout:
raise AssertionError(
"Timed out waiting for state to get to active")
time.sleep(.5)
workloads = client.list_workload(uuid=workload.uuid).data
assert len(workloads) == 1
wl = workloads[0]
return wl
def wait_for_ingress_to_active(client, ingress, timeout=DEFAULT_TIMEOUT):
start = time.time()
ingresses = client.list_ingress(uuid=ingress.uuid).data
assert len(ingresses) == 1
wl = ingresses[0]
while wl.state != "active":
if time.time() - start > timeout:
raise AssertionError(
"Timed out waiting for state to get to active")
time.sleep(.5)
ingresses = client.list_ingress(uuid=ingress.uuid).data
assert len(ingresses) == 1
wl = ingresses[0]
return wl
def wait_for_wl_transitioning(client, workload, timeout=DEFAULT_TIMEOUT,
state="error"):
start = time.time()
workloads = client.list_workload(uuid=workload.uuid).data
assert len(workloads) == 1
wl = workloads[0]
while wl.transitioning != state:
if time.time() - start > timeout:
raise AssertionError(
"Timed out waiting for state to get to active")
time.sleep(.5)
workloads = client.list_workload(uuid=workload.uuid).data
assert len(workloads) == 1
wl = workloads[0]
return wl
def wait_for_pod_to_running(client, pod, timeout=DEFAULT_TIMEOUT):
start = time.time()
pods = client.list_pod(uuid=pod.uuid).data
assert len(pods) == 1
p = pods[0]
while p.state != "running":
if time.time() - start > timeout:
raise AssertionError(
"Timed out waiting for state to get to active")
time.sleep(.5)
pods = client.list_pod(uuid=pod.uuid).data
assert len(pods) == 1
p = pods[0]
return p
def get_schedulable_nodes(cluster):
client = get_admin_client()
nodes = client.list_node(clusterId=cluster.id).data
schedulable_nodes = []
for node in nodes:
if node.worker:
schedulable_nodes.append(node)
return schedulable_nodes
def get_role_nodes(cluster, role):
etcd_nodes = []
control_nodes = []
worker_nodes = []
node_list = []
client = get_admin_client()
nodes = client.list_node(clusterId=cluster.id).data
for node in nodes:
if node.etcd:
etcd_nodes.append(node)
if node.controlPlane:
control_nodes.append(node)
if node.worker:
worker_nodes.append(node)
if role == "etcd":
node_list = etcd_nodes
if role == "control":
node_list = control_nodes
if role == "worker":
node_list = worker_nodes
return node_list
def validate_ingress(p_client, cluster, workloads, host, path,
insecure_redirect=False):
time.sleep(10)
curl_args = " "
if (insecure_redirect):
curl_args = " -L --insecure "
if len(host) > 0:
curl_args += " --header 'Host: " + host + "'"
nodes = get_schedulable_nodes(cluster)
target_name_list = get_target_names(p_client, workloads)
for node in nodes:
host_ip = node.externalIpAddress
cmd = curl_args + " http://" + host_ip + path
validate_http_response(cmd, target_name_list)
def validate_ingress_using_endpoint(p_client, ingress, workloads,
timeout=300):
target_name_list = get_target_names(p_client, workloads)
start = time.time()
fqdn_available = False
url = None
while not fqdn_available:
if time.time() - start > timeout:
raise AssertionError(
"Timed out waiting for endpoint to be available")
time.sleep(.5)
ingress_list = p_client.list_ingress(uuid=ingress.uuid).data
assert len(ingress_list) == 1
ingress = ingress_list[0]
if hasattr(ingress, 'publicEndpoints'):
for public_endpoint in ingress.publicEndpoints:
if public_endpoint["hostname"].startswith(ingress.name):
fqdn_available = True
url = \
public_endpoint["protocol"].lower() + "://" + \
public_endpoint["hostname"]
if "path" in public_endpoint.keys():
url += public_endpoint["path"]
time.sleep(10)
validate_http_response(url, target_name_list)
def get_target_names(p_client, workloads):
pods = []
for workload in workloads:
pod_list = p_client.list_pod(workloadId=workload.id).data
pods.extend(pod_list)
target_name_list = []
for pod in pods:
target_name_list.append(pod.name)
print("target name list:" + str(target_name_list))
return target_name_list
def get_endpoint_url_for_workload(p_client, workload, timeout=600):
fqdn_available = False
url = ""
start = time.time()
while not fqdn_available:
if time.time() - start > timeout:
raise AssertionError(
"Timed out waiting for endpoint to be available")
time.sleep(.5)
workload_list = p_client.list_workload(uuid=workload.uuid).data
assert len(workload_list) == 1
workload = workload_list[0]
if hasattr(workload, 'publicEndpoints'):
assert len(workload.publicEndpoints) > 0
url = "http://"
url = url + workload.publicEndpoints[0]["addresses"][0] + ":"
url = url + str(workload.publicEndpoints[0]["port"])
fqdn_available = True
return url
def wait_until_lb_is_active(url, timeout=300):
start = time.time()
while check_for_no_access(url):
time.sleep(.5)
print("No access yet")
if time.time() - start > timeout:
raise Exception('Timed out waiting for LB to become active')
return
def check_for_no_access(url):
try:
requests.get(url)
return False
except requests.ConnectionError:
print("Connection Error - " + url)
return True
def validate_http_response(cmd, target_name_list, client_pod=None):
target_hit_list = target_name_list[:]
count = 5 * len(target_name_list)
for i in range(1, count):
if len(target_hit_list) == 0:
break
if client_pod is None:
curl_cmd = "curl " + cmd
result = run_command(curl_cmd)
else:
wget_cmd = "wget -qO- " + cmd
result = kubectl_pod_exec(client_pod, wget_cmd)
result = result.decode()
result = result.rstrip()
print("cmd: \t" + cmd)
print("result: \t" + result)
assert result in target_name_list
if result in target_hit_list:
target_hit_list.remove(result)
print("After removing all, the rest is: ", target_hit_list)
assert len(target_hit_list) == 0
def validate_cluster(client, cluster, intermediate_state="provisioning",
check_intermediate_state=True, skipIngresscheck=True,
nodes_not_in_active_state=[], k8s_version=""):
cluster = validate_cluster_state(
client, cluster,
check_intermediate_state=check_intermediate_state,
intermediate_state=intermediate_state,
nodes_not_in_active_state=nodes_not_in_active_state)
# Create Daemon set workload and have an Ingress with Workload
# rule pointing to this daemonset
create_kubeconfig(cluster)
if k8s_version != "":
check_cluster_version(cluster, k8s_version)
if hasattr(cluster, 'rancherKubernetesEngineConfig'):
check_cluster_state(len(get_role_nodes(cluster, "etcd")))
project, ns = create_project_and_ns(ADMIN_TOKEN, cluster)
p_client = get_project_client_for_token(project, ADMIN_TOKEN)
con = [{"name": "test1",
"image": TEST_IMAGE}]
name = random_test_name("default")
workload = p_client.create_workload(name=name,
containers=con,
namespaceId=ns.id,
daemonSetConfig={})
validate_workload(p_client, workload, "daemonSet", ns.name,
len(get_schedulable_nodes(cluster)))
if not skipIngresscheck:
host = "test" + str(random_int(10000, 99999)) + ".com"
path = "/name.html"
rule = {"host": host,
"paths":
[{"workloadIds": [workload.id], "targetPort": "80"}]}
ingress = p_client.create_ingress(name=name,
namespaceId=ns.id,
rules=[rule])
wait_for_ingress_to_active(p_client, ingress)
validate_ingress(p_client, cluster, [workload], host, path)
return cluster
def check_cluster_version(cluster, version):
cluster_k8s_version = \
cluster.appliedSpec["rancherKubernetesEngineConfig"][
"kubernetesVersion"]
assert cluster_k8s_version == version, \
"cluster_k8s_version: " + cluster_k8s_version + \
" Expected: " + version
expected_k8s_version = version[:version.find("-")]
k8s_version = execute_kubectl_cmd("version")
kubectl_k8s_version = k8s_version["serverVersion"]["gitVersion"]
assert kubectl_k8s_version == expected_k8s_version, \
"kubectl version: " + kubectl_k8s_version + \
" Expected: " + expected_k8s_version
def check_cluster_state(etcd_count):
css_resp = execute_kubectl_cmd("get cs")
css = css_resp["items"]
components = ["scheduler", "controller-manager"]
for i in range(0, etcd_count):
components.append("etcd-" + str(i))
print("components to check - " + str(components))
for cs in css:
component_name = cs["metadata"]["name"]
assert component_name in components
components.remove(component_name)
assert cs["conditions"][0]["status"] == "True"
assert cs["conditions"][0]["type"] == "Healthy"
assert len(components) == 0
def validate_dns_record(pod, record, expected):
# requires pod with `dig` available - TEST_IMAGE
host = '{0}.{1}.svc.cluster.local'.format(
record["name"], record["namespaceId"])
validate_dns_entry(pod, host, expected)
def validate_dns_entry(pod, host, expected):
# requires pod with `dig` available - TEST_IMAGE
cmd = 'ping -c 1 -W 1 {0}'.format(host)
ping_output = kubectl_pod_exec(pod, cmd)
ping_validation_pass = False
for expected_value in expected:
if expected_value in str(ping_output):
ping_validation_pass = True
break
assert ping_validation_pass is True
assert " 0% packet loss" in str(ping_output)
dig_cmd = 'dig {0} +short'.format(host)
dig_output = kubectl_pod_exec(pod, dig_cmd)
for expected_value in expected:
assert expected_value in str(dig_output)
def wait_for_nodes_to_become_active(client, cluster, exception_list=[],
retry_count=0):
nodes = client.list_node(clusterId=cluster.id).data
node_auto_deleted = False
for node in nodes:
if node.requestedHostname not in exception_list:
node = wait_for_node_status(client, node, "active")
if node is None:
print("Need to re-evalauate new node list")
node_auto_deleted = True
retry_count += 1
print("Retry Count:" + str(retry_count))
if node_auto_deleted and retry_count < 5:
wait_for_nodes_to_become_active(client, cluster, exception_list,
retry_count)
def wait_for_node_status(client, node, state):
uuid = node.uuid
start = time.time()
nodes = client.list_node(uuid=uuid).data
node_count = len(nodes)
# Handle the case of nodes getting auto deleted when they are part of
# nodepools
if node_count == 1:
node_status = nodes[0].state
else:
print("Node does not exist anymore -" + uuid)
return None
while node_status != state:
if time.time() - start > MACHINE_TIMEOUT:
raise AssertionError(
"Timed out waiting for state to get to active")
time.sleep(5)
nodes = client.list_node(uuid=uuid).data
node_count = len(nodes)
if node_count == 1:
node_status = nodes[0].state
else:
print("Node does not exist anymore -" + uuid)
return None
return node
def wait_for_node_to_be_deleted(client, node, timeout=300):
uuid = node.uuid
start = time.time()
nodes = client.list_node(uuid=uuid).data
node_count = len(nodes)
while node_count != 0:
if time.time() - start > timeout:
raise AssertionError(
"Timed out waiting for state to get to active")
time.sleep(.5)
nodes = client.list_node(uuid=uuid).data
node_count = len(nodes)
def wait_for_cluster_node_count(client, cluster, expected_node_count,
timeout=300):
start = time.time()
nodes = client.list_node(clusterId=cluster.id).data
node_count = len(nodes)
while node_count != expected_node_count:
if time.time() - start > timeout:
raise AssertionError(
"Timed out waiting for state to get to active")
time.sleep(.5)
nodes = client.list_node(clusterId=cluster.id).data
node_count = len(nodes)
def get_custom_host_registration_cmd(client, cluster, roles, node):
allowed_roles = ["etcd", "worker", "controlplane"]
cluster_tokens = client.list_cluster_registration_token(
clusterId=cluster.id).data
if len(cluster_tokens) > 0:
cluster_token = cluster_tokens[0]
else:
cluster_token = create_custom_host_registration_token(client, cluster)
cmd = cluster_token.nodeCommand
for role in roles:
assert role in allowed_roles
cmd += " --" + role
additional_options = " --address " + node.public_ip_address + \
" --internal-address " + node.private_ip_address
cmd += additional_options
return cmd
def create_custom_host_registration_token(client, cluster):
cluster_token = client.create_cluster_registration_token(
clusterId=cluster.id)
cluster_token = client.wait_success(cluster_token)
assert cluster_token.state == 'active'
return cluster_token
def get_cluster_type(client, cluster):
cluster_configs = [
"amazonElasticContainerServiceConfig",
"azureKubernetesServiceConfig",
"googleKubernetesEngineConfig",
"rancherKubernetesEngineConfig"
]
if "rancherKubernetesEngineConfig" in cluster:
nodes = client.list_node(clusterId=cluster.id).data
if len(nodes) > 0:
if nodes[0].nodeTemplateId is None:
return "Custom"
for cluster_config in cluster_configs:
if cluster_config in cluster:
return cluster_config
return "Imported"
def delete_cluster(client, cluster):
nodes = client.list_node(clusterId=cluster.id).data
# Delete Cluster
client.delete(cluster)
# Delete nodes(in cluster) from AWS for Imported and Custom Cluster
if (len(nodes) > 0):
cluster_type = get_cluster_type(client, cluster)
print(cluster_type)
if get_cluster_type(client, cluster) in ["Imported", "Custom"]:
nodes = client.list_node(clusterId=cluster.id).data
filters = [
{'Name': 'tag:Name',
'Values': ['testcustom*', 'teststess*']}]
ip_filter = {}
ip_list = []
ip_filter['Name'] = \
'network-interface.addresses.association.public-ip'
ip_filter['Values'] = ip_list
filters.append(ip_filter)
for node in nodes:
ip_list.append(node.externalIpAddress)
assert len(ip_filter) > 0
print(ip_filter)
aws_nodes = AmazonWebServices().get_nodes(filters)
for node in aws_nodes:
print(node.public_ip_address)
AmazonWebServices().delete_nodes(aws_nodes)
def check_connectivity_between_workloads(p_client1, workload1, p_client2,
workload2, allow_connectivity=True):
wl1_pods = p_client1.list_pod(workloadId=workload1.id).data
wl2_pods = p_client2.list_pod(workloadId=workload2.id).data
for pod in wl1_pods:
for o_pod in wl2_pods:
check_connectivity_between_pods(pod, o_pod, allow_connectivity)
def check_connectivity_between_workload_pods(p_client, workload):
pods = p_client.list_pod(workloadId=workload.id).data
for pod in pods:
for o_pod in pods:
check_connectivity_between_pods(pod, o_pod)
def check_connectivity_between_pods(pod1, pod2, allow_connectivity=True):
pod_ip = pod2.status.podIp
cmd = "ping -c 1 -W 1 " + pod_ip
response = kubectl_pod_exec(pod1, cmd)
print("Actual ping Response from " + pod1.name + ":" + str(response))
if allow_connectivity:
assert pod_ip in str(response) and " 0% packet loss" in str(response)
else:
assert pod_ip in str(response) and " 100% packet loss" in str(response)
def kubectl_pod_exec(pod, cmd):
command = "exec " + pod.name + " -n " + pod.namespaceId + " -- " + cmd
return execute_kubectl_cmd(command, json_out=False, stderr=True)
def exec_shell_command(ip, port, cmd, password):
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(ip, username="root", password=password, port=port)
stdin, stdout, stderr = ssh.exec_command(cmd)
response = stdout.readlines()
return response
def wait_for_ns_to_become_active(client, ns, timeout=DEFAULT_TIMEOUT):
start = time.time()
time.sleep(2)
nss = client.list_namespace(uuid=ns.uuid).data
assert len(nss) == 1
ns = nss[0]
while ns.state != "active":
if time.time() - start > timeout:
raise AssertionError(
"Timed out waiting for state to get to active")
time.sleep(.5)
nss = client.list_namespace(uuid=ns.uuid).data
assert len(nss) == 1
ns = nss[0]
return ns
def wait_for_pod_images(p_client, workload, ns_name, expectedimage, numofpods,
timeout=DEFAULT_TIMEOUT):
start = time.time()
for key, value in workload.workloadLabels.items():
label = key + "=" + value
get_pods = "get pods -l" + label + " -n " + ns_name
pods = execute_kubectl_cmd(get_pods)
for x in range(0, numofpods - 1):
pod = pods["items"][x]
podimage = pod["spec"]["containers"][0]["image"]
while podimage != expectedimage:
if time.time() - start > timeout:
raise AssertionError(
"Timed out waiting for correct pod images")
time.sleep(.5)
pods = execute_kubectl_cmd(get_pods)
pod = pods["items"][x]
podimage = pod["spec"]["containers"][0]["image"]
def wait_for_pods_in_workload(p_client, workload, pod_count,
timeout=DEFAULT_TIMEOUT):
start = time.time()
pods = p_client.list_pod(workloadId=workload.id).data
while len(pods) != pod_count:
if time.time() - start > timeout:
raise AssertionError(
"Timed out waiting for state to get to active")
time.sleep(.5)
pods = p_client.list_pod(workloadId=workload.id).data
return pods
def get_admin_client_and_cluster():
client = get_admin_client()
if CLUSTER_NAME == "":
clusters = client.list_cluster().data
else:
clusters = client.list_cluster(name=CLUSTER_NAME).data
assert len(clusters) > 0
cluster = clusters[0]
return client, cluster
def validate_cluster_state(client, cluster,
check_intermediate_state=True,
intermediate_state="provisioning",
nodes_not_in_active_state=[]):
if check_intermediate_state:
cluster = wait_for_condition(
client, cluster,
lambda x: x.state == intermediate_state,
lambda x: 'State is: ' + x.state,
timeout=MACHINE_TIMEOUT)
assert cluster.state == intermediate_state
cluster = wait_for_condition(
client, cluster,
lambda x: x.state == "active",
lambda x: 'State is: ' + x.state,
timeout=MACHINE_TIMEOUT)
assert cluster.state == "active"
wait_for_nodes_to_become_active(client, cluster,
exception_list=nodes_not_in_active_state)
return cluster
def wait_until_available(client, obj, timeout=DEFAULT_TIMEOUT):
start = time.time()
sleep = 0.01
while True:
time.sleep(sleep)
sleep *= 2
if sleep > 2:
sleep = 2
try:
obj = client.reload(obj)
except ApiError as e:
if e.error.status != 403:
raise e
else:
return obj
delta = time.time() - start
if delta > timeout:
msg = 'Timeout waiting for [{}:{}] for condition after {}' \
' seconds'.format(obj.type, obj.id, delta)
raise Exception(msg)
def delete_node(aws_nodes):
for node in aws_nodes:
AmazonWebServices().delete_node(node)
def cluster_cleanup(client, cluster, aws_nodes=None):
if RANCHER_CLEANUP_CLUSTER:
client.delete(cluster)
if aws_nodes is not None:
delete_node(aws_nodes)
else:
env_details = "env.CATTLE_TEST_URL='" + CATTLE_TEST_URL + "'\n"
env_details += "env.ADMIN_TOKEN='" + ADMIN_TOKEN + "'\n"
env_details += "env.CLUSTER_NAME='" + cluster.name + "'\n"
create_config_file(env_details)
def create_config_file(env_details):
file = open(env_file, "w")
file.write(env_details)
file.close()
def validate_hostPort(p_client, workload, source_port, cluster):
pods = p_client.list_pod(workloadId=workload.id).data
nodes = get_schedulable_nodes(cluster)
for node in nodes:
target_name_list = []
for pod in pods:
print(pod.nodeId + " check " + node.id)
if pod.nodeId == node.id:
target_name_list.append(pod.name)
break
host_ip = node.externalIpAddress
curl_cmd = " http://" + host_ip + ":" + \
str(source_port) + "/name.html"
validate_http_response(curl_cmd, target_name_list)
def validate_lb(p_client, workload):
url = get_endpoint_url_for_workload(p_client, workload)
target_name_list = get_target_names(p_client, [workload])
wait_until_lb_is_active(url)
validate_http_response(url + "/name.html", target_name_list)
def validate_nodePort(p_client, workload, cluster):
source_port = workload.publicEndpoints[0]["port"]
nodes = get_schedulable_nodes(cluster)
pods = p_client.list_pod(workloadId=workload.id).data
target_name_list = []
for pod in pods:
target_name_list.append(pod.name)
print("target name list:" + str(target_name_list))
for node in nodes:
host_ip = node.externalIpAddress
curl_cmd = " http://" + host_ip + ":" + \
str(source_port) + "/name.html"
validate_http_response(curl_cmd, target_name_list)
def validate_clusterIp(p_client, workload, cluster_ip, test_pods):
pods = p_client.list_pod(workloadId=workload.id).data
target_name_list = []
for pod in pods:
target_name_list.append(pod["name"])
curl_cmd = "http://" + cluster_ip + "/name.html"
for pod in test_pods:
validate_http_response(curl_cmd, target_name_list, pod)
def wait_for_pv_to_be_available(c_client, pv_object, timeout=DEFAULT_TIMEOUT):
start = time.time()
time.sleep(2)
list = c_client.list_persistent_volume(uuid=pv_object.uuid).data
assert len(list) == 1
pv = list[0]
while pv.state != "available":
if time.time() - start > timeout:
raise AssertionError(
"Timed out waiting for state to get to available")
time.sleep(.5)
list = c_client.list_persistent_volume(uuid=pv_object.uuid).data
assert len(list) == 1
pv = list[0]
return pv
def wait_for_pvc_to_be_bound(p_client, pvc_object, timeout=DEFAULT_TIMEOUT):
start = time.time()
time.sleep(2)
list = p_client.list_persistent_volume_claim(uuid=pvc_object.uuid).data
assert len(list) == 1
pvc = list[0]
while pvc.state != "bound":
if time.time() - start > timeout:
raise AssertionError(
"Timed out waiting for state to get to bound")
time.sleep(.5)
list = p_client.list_persistent_volume_claim(uuid=pvc_object.uuid).data
assert len(list) == 1
pvc = list[0]
return pvc
def create_wl_with_nfs(p_client, ns_id, pvc_name, wl_name,
mount_path, sub_path, is_daemonSet=False):
volumes = [{"type": "volume",
"name": "vol1",
"persistentVolumeClaim": {
"readOnly": "false",
"type": "persistentVolumeClaimVolumeSource",
"persistentVolumeClaimId": pvc_name
}}]
volumeMounts = [{"readOnly": "False",
"type": "volumeMount",
"mountPath": mount_path,
"subPath": sub_path,
"name": "vol1"
}]
con = [{"name": "test1",
"image": TEST_IMAGE,
"volumeMounts": volumeMounts
}]
if is_daemonSet:
workload = p_client.create_workload(name=wl_name,
containers=con,
namespaceId=ns_id,
volumes=volumes,
daemonSetConfig={})
else:
workload = p_client.create_workload(name=wl_name,
containers=con,
namespaceId=ns_id,
volumes=volumes)
return workload
def write_content_to_file(pod, content, filename):
cmd_write = "/bin/bash -c 'echo {1} > {0}'".format(filename, content)
output = kubectl_pod_exec(pod, cmd_write)
assert output.strip().decode('utf-8') == ""
def validate_file_content(pod, content, filename):
cmd_get_content = "/bin/bash -c 'cat {0}' ".format(filename)
output = kubectl_pod_exec(pod, cmd_get_content)
assert output.strip().decode('utf-8') == content
def wait_for_mcapp_to_active(client, multiClusterApp, timeout=DEFAULT_MULTI_CLUSTER_APP_TIMEOUT):
print("\nuuid:")
print(multiClusterApp.uuid)
time.sleep(5)
mcapps = client.list_multiClusterApp(uuid=multiClusterApp.uuid, name=multiClusterApp.name).data
start = time.time()
assert len(mcapps) == 1
mapp = mcapps[0]
print(mapp.state)
while mapp.state != "active":
print(mapp.uuid)
print(mapp.state)
if time.time() - start > timeout:
raise AssertionError(
"Timed out waiting for state to get to active")
time.sleep(.5)
multiclusterapps = client.list_multiClusterApp(uuid=multiClusterApp.uuid, name=multiClusterApp.name).data
assert len(multiclusterapps) == 1
mapp = multiclusterapps[0]
return mapp
def validate_mcapp_cluster(app_id, p_client):
mcapp = p_client.list_app(name=app_id).data
assert len(mcapp) == 1
app = mcapp[0]
return app
def wait_for_mcapp_cluster_level_to_active(client, app_id, timeout=DEFAULT_MULTI_CLUSTER_APP_TIMEOUT):
mcapps = client.list_app(name=app_id).data
start = time.time()
assert len(mcapps) == 1
mapp = mcapps[0]
while mapp.state != "active":
if time.time() - start > timeout:
raise AssertionError(
"Timed out waiting for state to get to active")
time.sleep(.5)
apps = client.list_app(name=app_id).data
assert len(apps) == 1
mapp = apps[0]
return mapp
def get_admin_client_and_cluster_mcapp():
clusters = []
client = get_admin_client()
if CLUSTER_NAME == "" or CLUSTER_NAME_2 == "":
clusters = client.list_cluster().data
else:
clusters.append(client.list_cluster(name=CLUSTER_NAME).data)
clusters.append(client.list_cluster(name=CLUSTER_NAME_2).data)
assert len(clusters) == 2
return client, clusters
def validate_multi_cluster_app_cluster(app_id1, app_id2, p_client1, p_client2):
validate_mcapp_cluster(app_id1, p_client1)
if app_id2 != "":
validate_mcapp_cluster(app_id2, p_client2)
# verify app in cluster is active or not
wait_for_mcapp_cluster_level_to_active(p_client1, app_id1)
if app_id2 != "":
wait_for_mcapp_cluster_level_to_active(p_client2, app_id2) | python |
Former captain Mohammad Azharuddin has said Team India will be under pressure during the upcoming ICC World Cup 2023. Having co-hosted the ODI World Cup thrice in the past, India are gearing up to host the World Cup alone for the first time.
Team India are one of the favorites to win the competition. The Rohit Sharma-led side will be under immense pressure to win the tournament. The team has faced severe criticism in recent years for their failures to win ICC competitions. India have not won the World Cup since 2011 their last ICC title came in 2013.
Playing at home will only add to the pressure. The last three editions of the ODI World Cup were won by the home teams and India will be desperately hoping to continue the trend. And while only time will tell whether India manage to win the World Cup or not, Mohammad Azharuddin has said that the team will be under pressure.
“It is going to be a very competitive World Cup. India have a very good team. Grounds will be full as India are hosting after a long time.
“I really don’t understand this peaking business. When you are playing you are playing well, doesn’t matter whether you are peaking or not peaking,” Mohammad Azharuddin told the Times of India when asked whether India are peaking at the right time.
“Sometimes you lose two three matches even after peaking and that has happened with this team. Rather than thinking about all of this, one should focus on the game, rather than thinking about semis and finals straightaway.
“Yes, there will be a lot of pressure to win an ICC tournament which we have not won for a long time. I am sure the boys are fully aware of that,” he added.
Mohammad Azharuddin disappointed:
Mohammad Azharuddin, who is also the former president of the Hyderabad Cricket Association, expressed his disappointment over Hyderabad not being allotted an India match during the World Cup. Hyderabad is one of the ten venues selected to stage the World Cup games.
“I would be happy if India were playing in Hyderabad. The matter should have been discussed with the BCCI. I don’t know what happened there. Hyderabad also deserved a big game like India and Pakistan,” said Mohammad Azharuddin.
The World Cup is scheduled to be played from October 5 to November 9. Hyderabad will host its first game on October 6 when Pakistan lock horns against Netherlands.
| english |
<gh_stars>0
[
{
"DeniedAlternatives": [],
"Files": {
"objects/themed/neon/neonceilingcabinet/neonceilingcabinet.object": [
"/description"
]
},
"Texts": {
"Eng": "A neon suspended cabinet.",
"Chs": "霓虹灯悬挂的橱柜。"
}
},
{
"DeniedAlternatives": [],
"Files": {
"objects/themed/neon/neonceilingcabinet/neonceilingcabinet.object": [
"/shortdescription"
]
},
"Texts": {
"Eng": "Neon Wall Cabinet",
"Chs": "霓虹灯壁柜"
}
}
] | json |
<reponame>Vladislav-Boiko/browser-proxy
import React, { useState, useEffect } from 'react';
import Input from 'atoms/Input/Input';
import ChunkedInput from 'molecules/ChunkedInput/ChunkedInput';
import Button from 'atoms/Button/Button';
import Icons from 'atoms/Icons/Icons';
import './BlobBody.css';
const isValidBase64 = (value) => {
try {
atob(value);
return true;
} catch (e) {
return false;
}
};
const BlobBody = ({ blobType, body, onChange, className, ...otherProps }) => {
const [blobTypeValue, setBlobTypeValue] = useState(blobType || '');
useEffect(() => {
setBlobTypeValue(blobType || '');
}, [blobType]);
const updateContent = ({ body, blobType }) => {
setBlobTypeValue(blobType);
onChange && onChange({ body, blobType });
};
return (
<div className={className}>
<div className="blob-type ffr">
<Input
value={blobTypeValue}
label="Blob type"
className="blob-type__input"
onChange={(value) => updateContent({ body, blobType: value })}
isUnsaved={blobType !== blobTypeValue}
/>
<Button
secondary
Icon={Icons.Import}
className="blob-type__upload-button"
>
Upload file
</Button>
</div>
<ChunkedInput
multiline
body={body}
{...otherProps}
label="base64 content"
className="mt3"
type="ArrayBuffer"
onChange={(value) =>
updateContent({ body: value, blobType: blobTypeValue })
}
validate={(value) =>
isValidBase64(value) ? '' : 'Is not a valid base64'
}
/>
</div>
);
};
export default BlobBody;
| javascript |
{
"template": "svReportEss_report_queue",
"description": "Hide user report's username if the user can't see it",
"execution_order": 6905,
"enabled": true,
"action": "preg_replace",
"find": "#(<xf:if is=\".*?)LastModifiedUser(\".*?<xf:username.*?)LastModifiedUser#si",
"replace": "$1LastModified$2LastModified.ViewableUser"
} | json |
Bron Breakker took the pro wrestling world by surprise when he invited Seth Rollins to NXT with the World Heavyweight Championship, possibly hinting at his much-anticipated return to Monday Night RAW in the process.
Fans who have been following the 25-year-old star's career might be able to recall his multiple appearances on RAW in 2022. Bron Breakker made his RAW in-ring debut on March 7, 2022, in a tag team match with Tommaso Ciampa against The Dirty Dawgs (Dolph Ziggler and Robert Roode). Breakker and Ciampa won against the heel tag team that night.
The NXT sensation showed up on the red brand the Monday after WrestleMania 38. He defeated Dolph Ziggler for the NXT Championship during the show. This marked Bron Breakker's final appearance on RAW.
He held onto the championship until Stand & Deliver 2023. At the April 1 event, Breakker lost the NXT Championship to Carmelo Hayes. He turned heel the following Tuesday by attacking the Trick-Melo Gang. At NXT Battleground, Hayes retained his title against Breakker.
The former NXT Champion shifted his attention to Ilja Dragunov this week on the white-and-gold brand. Breakker assaulted the Russian star during a backstage segment. He later explained his actions during the closing moments of the show.
Breakker was seen walking over to his car during the final moments of NXT when he was asked to comment on his assault on Dragunov. The former NXT Champion said he was tired of hearing the Russian's claims about how he's the most intense guy in the locker room.
The star said he would keep everyone in check from top to bottom. He also namedropped Seth Rollins and invited him over to his turf with the world title. Fans can read more on that by heading over to the link here. It remains to be seen if the Visionary will accept the challenge.
What's your take on this story? Let us know in the comments section below. | english |
<gh_stars>0
const { commandInitiator = '/' } = require('./../env');
const removeInitiatorIfPresent = (command, isPresent) => {
if (isPresent) {
return command.substring(commandInitiator.length);
}
return command;
};
const extractCommandSyntax = (msg) => {
const [unfilteredCommand, ...params] = msg.split(' ');
const hasInitiator = unfilteredCommand.startsWith(commandInitiator);
const command = removeInitiatorIfPresent(unfilteredCommand, hasInitiator);
return {
command: command.toLowerCase(),
hasInitiator,
params,
paramsString: params.join(' '),
};
};
const commandMatches = ({ triggers, initiatorOnly }, { command, hasInitiator }) => {
if (triggers.includes(command)) {
if (initiatorOnly) {
return hasInitiator;
}
return true;
}
return false;
};
const findCommand = (commands, extractedCommand) =>
commands.find(command => commandMatches(command, extractedCommand));
module.exports = {
removeInitiatorIfPresent,
extractCommandSyntax,
findCommand,
};
| javascript |
<reponame>mdruger/cqxmlintf
<html>
<head>
<title>Adding an Encryption Key</title>
<link rel='stylesheet' type='text/css' href='admin.css' />
<link rel='shortcut icon' href='pics/key.png' />
</head>
<body>
<table class='hdr'>
<tr>
<td><a href='admin.html'>« CQ/XML Admin Docs</a></td>
<th>Adding an Encryption Key</th>
<td align='right'><b>Updated:</b> <script>document.write( document.lastModified );</script></td>
</tr>
</table>
<h3>Modification Process</h3>
<ol>
<li><a href='login.html'>Login to the server as <code>cqxmlusr</code></a></li>
<li>Edit the file <code>/opt/cqxmlintf/data/enckeys.xml</code></li>
<li>Save the file.</li>
<li>Logout.</li>
</ol>
<h3>The Encryption Keys File</h3>
The encryption keys file will look like the following:
<pre>
<Encrypt>
<iplist>
<ip192.168.0.1>key1</ip192.168.0.1>
<ip192.168.0.2>key2</ip1172.16.17.32>
<ip192.168.0.3>key3</ip192.168.0.3>
</iplist>
<userlist>
<login1>key4</login1>
<login2>key5</login2>
<login3>key6</login3>
</userlist>
</Encrypt></pre>
Notice that the XML document is divided into two sections: <code>iplist</code> and <code>userlist</code>.
<h3>iplist</h3>
<p>
The <code>iplist</code> section is used to tie encryption keys to an ip address. This is commonly used for web servers or other stand-alone machines that CQ/XML customers have created.
</p>
<p>
To add a new ip-based encryption key, insert a new line anywhere within the <code>iplist</code> section. <code>iplist</code> sub-elements use the following format/syntax:
</p>
<blockquote>
<code>
<b><</b> + <b>ip</b> + <b>[address]</b> + <b>></b>
+ <b>[encryption key]</b>
+ <b></</b> + <b>ip</b> + <b>[address]</b> + <b>></b>
</code>
</blockquote>
<p>
Notice that the actual ip address used as the element name is preceeded with the string '<code>ip</code>'. Failure to adhere to this convention will create invalid XML elements. (XML elements must start with a letter or underscore.) Invalid XML in the encryption keys file causes the XML parser to go into deep recursion whenever it tries to read the file. The CQ/XML Interface tries to read the file when it changes. In other words, the CQ/XML Interface will crash the first time somebody sends a request.
</p>
<p>
Also note that the encryption key itself cannot have a greater-than symbol. The same thing will happen - bad XML, parsing recursion, crash.
</p>
<h3>userlist</h3>
<p>
The <code>userlist</code> section is used to tie encryption keys to a ClearQuest login. This is used for CQ/XML implementations that have interface clients on each user's machine of for implementations that pass the user login and password with its requests.
</p>
<p>
To add a new login-based encryption key, insert a new line anywhere withing the <code>userlist</code> section. <code>userlist</code> sub-elements use the following format/syntax:
</p>
<blockquote>
<code>
<b><</b> + <b>[login]</b> + <b>></b>
+ <b>[encryption key]</b>
+ <b></</b> + <b>[login]</b> + <b>></b>
</code>
</blockquote>
<p>
Like the <code>iplist</code> elements, the encryption key itself cannot have a greater-than symbol. The same thing will happen - bad XML, parsing recursion, crash.
</p>
</body>
</html>
| html |
<p>
<strong>Starloader</strong>
</p>
<p>
A mod loader/manager for Starbound.
</p>
<p>
Contact email: <a href="mailto:<EMAIL>"><EMAIL></a><br>
Source: https://github.com/Dragory/Starloader
</p> | html |
States General, body of delegates representing the United Provinces of the Netherlands (Dutch Republic; 1579–1795). It is not to be confused with the present Netherlands parliament of the same name.
The States General was instituted in the 15th century by the ruling dukes of Burgundy and was retained by the succeeding Habsburg rulers. The States General was convened on the command of the central government for the purpose of coordinating the assessment of provincial subsidies for the ruler’s treasury. It was made up of deputies of the provincial States (assemblies). Originally designed to facilitate control by a foreign ruler, the States General after a time became an important vehicle for the awakening of the Netherlands’ national consciousness.
During the revolt of the Netherlands against Spanish rule (1568–1609), the States General met without Spanish sanction in 1576 and became the central organ of a general Netherlands union; many sovereign prerogatives were then arrogated to it. As defections by the southern provinces and the advance of Spanish arms reduced the number of rebelling provinces, those remaining entered into a new pact, the 1579 Union of Utrecht, which clearly defined the powers of the States General vis-à-vis the provincial States. As the central organ of the republic founded by this union, it was to have responsibility for foreign and military affairs; no important national decision, however, could be taken without the unanimous vote of the seven provincial States, the delegates of which composed the States General. Thus, each province of the Dutch Republic was sovereign; no part of that sovereignty was given over to the States General. Internally, the States General had responsibility for the daily administration and taxation of the Generality lands (those areas of the republic that lay outside the seven provinces and that had been secured against Spanish reconquest).
Because of the great provincial particularism in the two centuries of the republic’s existence, the States General functioned smoothly only when the integrity of the state was threatened or when one of the contending political forces—the States of Holland or the stadtholder, the chief provincial executive—gained ascendancy. Even then, however, unanimity in the States General was not guaranteed; occasionally majority decisions were unconstitutionally acted upon.
When the old republic collapsed in 1795 and gave way to the more democratic Batavian Republic, the States General was retained for a year. It was replaced by a National Assembly in 1796.
The term States General was revived for the bicameral parliament of the Kingdom of the Netherlands, established in 1814.
| english |
Our mission is to become an innovative supplier of high-tech digital and communication devices by providing value added design, world-class manufacturing, and service capabilities for Couple Hoodies, Cotton Dress , Outdoor Waterproof Sportswear Softshell Jacket , Sublimation Leggings ,Fashion Cargo Shorts . We sincerely welcome you come to visit us. Hope we have good cooperation in the future. The product will supply to all over the world, such as Europe, America, Australia,Haiti , Casablanca ,Greenland , Italy .We honor ourselves as a company that comprises of a strong team of professionals who are innovative and well experienced in the international trading, business development and product advancement. Moreover, the company stays unique among its competitors due to its superior standard of quality in production, and its efficiency and flexibility in business support.
| english |
The New York baseball teams, the Yankees and Mets, were supposed to be among the best. The two teams were pegged to potentially meet for a Subway Series World Series but have been inconsistent and downright bad thus far.
One MLB analyst blasted the two teams via Audacy. Boomer Esiason didn't hold back when discussing how embarassing the teams were:
“The combined salaries for the Mets and the Yankees…$625 million being spent on baseball players in this city. To be a combined 17 games out of first place. Gerrit Cole and Aaron Judge make more money combined than the Rays spend on their entire team. "
He continued, adding that the baseball they play is almost unwatchable:
These teams have the two highest payrolls in baseball but have combined to have a measly . 506 winning percentage. For what it's worth, injuries have ravaged both teams. The Mets lost both of their top two starters for a portion of the season.
The Yankees have the most payroll on the Injured List by a wide margin. They have upwards of $152 million (about 54% of their team's money) on the IL per Spotrac. The Texas Rangers are second with about $74 million injured money.
After Esiason went on this rant, the Yankees responded by winning the first two games of the series with the lowly Oakland Athletics comfortably. That's not all that impressive, but they are now 20-17 on the season.
The Mets, on the other hand, are just two games up on the lowly Washington Nationals. These two teams have not had the starts they were supposed to. With surging teams like the Tampa Bay Rays and Atlanta Braves taking control of their divisions, the New York teams have an uphill battle to return to relevancy in the standings. | english |
Over the past two years, the 2021 defending champion Kyle Larson has emerged as a once-in-a-generation driver.
The 29-year-old has shown a perfect mixture of talent and hunger to win races. Whether it’s the NASCAR Cup Series or the top dirty race, Larson has battled to win it all.
During the latest episode of the Ask Jr. segment of his Dale Jr. Download podcast, the NASCAR legend was asked if fans would expect Larson to be behind the wheel of a single-seater at the Indianapolis 500.
Watch the video here:
Putting his money on the Hendrick Motorsports driver fulfilling his INDY 500 wish, Dale Earnhardt Jr. said:
Further in the episode, the former Hendrick Motorsports driver said Larson had plenty of time for INDY 500 and went on to say:
Where did Kyle Larson end up at Ruoff Mortgage 500 at Phoenix Raceway?
Driving the No. 5 Chevrolet Camaro ZL1, Kyle Larson began the Ruoff Mortgage 500 with a solid seventh place finish in qualifying.
Despite securing the seventh pole and running up front for most of the race, Larson dropped out on lap 239. His crew found a broken valve spring in his No. 5 car and ended with a DNF.
Even if Larson fails to perform well in the Ruoff Mortgage 500, there will be more opportunities coming his way as the 2022 season moves ahead.
Larson will be looking for his second win of the season when the green flag drops next weekend at newly renovated Atlanta Motor Speedway. | english |
A collection of 35 love poems on Unconditional love, Longing, Romance, Fond reminisces and Separation.
The heart listens to no one. It hums its own song. This is primarily the reason why love and music are so much interrelated. When a person falls in love, his heart becomes an orchestra of emotions which churns out a beautiful song, audible only to the heart of his lover.
There are different kinds of love stories, but one thing is same in all of them. In every love story, there is a melody. It might be sweet or passionate. It can also be transcending or heart wrenching.
In this book, you will be able to taste 35 distinct flavors of love. Delve in the verses, catch a glimpse of the 35 love stories unfolding before you and hear the melody they produce.
The heart listens to no one because it is governed by love. Then, why try to control it? Let it produce its own melody. Let it hum its own song.
Currently there are no reviews available for this book.
| english |
{
"Authentication": {
"Jwt": {
"Issuer": "https://github.com/cryoelite",
"SigningKey": "<KEY>",
"ExpirationInDays": 30,
"SigningAlgorithm": "HS256",
"KeyWrapAlgorithm": "A256KW",
"DataEncryptionAlgorithm": "A256CBC-HS512",
"EncryptionKey": "<KEY>"
},
"connectionString": "Server=172.23.0.51; Database=master;User Id=SA;Password=<PASSWORD>"
},
"Products": {
"connectionString": "Server=172.23.0.50;Database=master;User Id=SA;Password=<PASSWORD>#<PASSWORD>"
},
"Authorization": {
"connectionString": "Server=172.23.0.52;Database=master;User Id=SA;Password=<PASSWORD>#<PASSWORD>"
},
"Kafka": {
"broker1": "172.23.0.55:29092",
"authTopic-Primary": "AuthTopic-Primary",
"authTopic-Secondary": "AuthTopic-Secondary",
"authgroup-Primary": "AuthGroupPrimary",
"authgroup-Secondary": "AuthGroupSecondary",
"assetTopic-Primary": "AssetTopic-Primary",
"assetTopic-Secondary": "AssetTopic-Secondary",
"assetGroup-Primary": "AssetGroup-Primary",
"assetGroup-Secondary": "AssetGroup-Secondary"
},
"AssetManager": {
"GatewayAddress": "https://localhost:8002/api/asset"
},
"ClamAV": {
"host": "av"
}
} | json |
<gh_stars>0
package Tests;
import Modules.MinHash;
import Modules.Shingles;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
/**
* Purpose:
* Test used to check if we are able to get the correct Similarities using our created classes
*/
public class SimilaritiesTest {
public static HashMap<String, ArrayList<Integer>> getDataSet(String file) {
HashMap<String, ArrayList<Integer>> dataSet = new HashMap<String, ArrayList<Integer>>();
String user;
int movie;
try {
Scanner fileScanner = new Scanner(new File(file));
while (fileScanner.hasNext()) {
user = fileScanner.next();
movie = Integer.parseInt(fileScanner.next());
if (dataSet.get(user) != null) {
dataSet.get(user).add(movie);
} else {
ArrayList<Integer> temp = new ArrayList<Integer>();
temp.add(movie);
dataSet.put(user, temp);
}
//System.out.printf("User - %s ; Movie - %s\n",fileScanner.next(),fileScanner.next());
fileScanner.next();
fileScanner.next();
}
fileScanner.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
}
return dataSet;
}
public static void main(String[] args) {
long start, end;
/// TEST A - Check Similarities with Documents/ Texts
System.out.println("TEST A - Check Similarities with Documents/ Texts");
String[] docs = {"testFile1.txt", "testFile1 - Copy.txt","testFile2.txt","testOof.txt","testOof2.txt"};
Shingles ourShingles = new Shingles(docs);
MinHash ourMinHash2 = new MinHash(ourShingles.convertShingles(), 1000);
ourMinHash2.printSimilarities(0.2);
/// TEST B - Data Set taken from movieLens
HashMap<String, ArrayList<Integer>> dataSet = getDataSet("u.data");
System.out.println("\nTEST B - Data Set taken from movieLens");
MinHash ourMinHash = new MinHash(dataSet, 6650);
start = System.currentTimeMillis();
ourMinHash.printSimilarities(0.4);
end = System.currentTimeMillis();
System.out.println("Test took " + (end - start) + "ms");
}
}
| java |
The Indian Institute of Technology (IIT) Kanpur will be launching an online post-graduate level programme on construction engineering. To be launched by the institute’s department of civil engineering by July this year, the IIT claims the course is being launched for the first time ever in India.
“The programme is a new addition to the unique e-Masters degree programme being run by the institute and is focused on Sustainable Construction Practices and Project Management. It is designed to cater to the needs of the rapidly growing infrastructure and construction sectors in India," reads the official press release.
The programme aims to equip practising civil engineers and architects with the knowledge and skills to manage projects effectively, using minimum resources and energy requirements, and with a minimum carbon footprint. Designed by IIT Kanpur faculties and industry experts, it will cover a range of topics, including sustainable design and construction, green building materials, project management, and financing for sustainable projects.
The executive-friendly format of the e-Masters degree programmes at IIT Kanpur will offer a flexible approach for professionals to complete the degree anywhere between 1-3 years. The programme is inclusive of IIT Kanpur campus visits, mentorship, and career support.
The programme will be launched in July this year and the application process for the inaugural cohort will start by end of March.
Prof Abhay Karandikar, Director of IIT Kanpur, said, “The infrastructure and construction sectors are major contributors to India’s economy, and it is essential to address sustainability issues in this field. Like all the other varied e-Masters degree programmes we’re successfully running to contribute to India’s holistic growth, this programme is designed to provide a proper blend of academic insights and industrial skills to meet the growing requirements of this exponentially growing sector. This programme, once launched, will help in making the infrastructure and construction domains more robust with safer and sustainable practices. " IIT Kanpur is currently running nine e-Masters degree programmes from various departments. | english |
import React from "react"
import { Helmet } from "react-helmet"
import config from "../config"
function SEO() {
return (
<Helmet
htmlAttributes={{
lang: `en`,
}}
title={config.siteTitle}
meta={[
{
name: `description`,
content: config.siteDescription,
},
{
name: `keywords`,
content: config.siteKeywords,
},
{
property: `og:title`,
content: config.siteTitle,
},
{
property: `og:description`,
content: config.siteDescription,
},
{
property: `og:type`,
content: `website`,
},
{
property: `og:url`,
content: config.siteUrl,
},
{
property: `og:site_name`,
content: config.siteTitle,
},
{
property: `og:image`,
content: `https://raw.githubusercontent.com/zaidakhterr/portfolio-v1/master/src/images/site.png`,
},
{
property: "og:locale",
content: config.siteLanguage,
},
{
name: `twitter:card`,
content: `summary`,
},
{
property: `twitter:url`,
content: config.siteUrl,
},
{
name: `twitter:site`,
content: config.twitterHandle,
},
{
name: `twitter:creator`,
content: config.twitterHandle,
},
{
name: `twitter:title`,
content: config.siteTitle,
},
{
name: `twitter:description`,
content: config.siteDescription,
},
{
property: `twitter:image:alt`,
content: config.siteTitle,
},
]}
/>
)
}
export default SEO
| javascript |
[{"postal_code":"61760","place_name":"Agrarista","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"<NAME> (Loma de Vargas)","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"<NAME>","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"Filarmónicos (Juventino Rosas)","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"Reforma","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"<NAME>","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"Obrera","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"El Mirador","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"Campo de Aviación","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"Independencia","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"Libertad","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"Nueva Italia de Ruiz","place_type":"Pueblo","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"La Hortaliza","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"<NAME>","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"<NAME>","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"17 de Noviembre","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"},{"postal_code":"61760","place_name":"<NAME>","place_type":"Colonia","county":"Múgica","state":"Michoacán de Ocampo","city":"Nueva Italia de Ruiz"}] | json |
The Sharjah vs Fujairah, Final of the Emirates D20 2022 will be played at the ICC Academy Ground in Dubai.
Usman Khan is the top run-scorer for Sharjah with 273 runs at a strike rate of 134. He has struck 8 sixes and 35 fours. Mohammad Nadeem has also made 223 runs at a strike rate of 140.
Karnal Zahid has been the best bowler for Sharjah and has picked up 14 wickets while bowling at an average of 15 and an economy rate of 7.17.
Fujairah are placed at the 2nd spot in the Emirates D20 2022 points table with 6 wins and 4 losses from their 10 matches of the league. The team has 12 points.
Rohan Mustafa is the top run-scorer for Fujairah with 206 runs at a strike rate of 151. He has struck 10 sixes and 17 fours. Asif Khan has also made 196 runs at a strike rate of 161.
Harry Bharwal has been the best bowler for Fujairah and has picked up 9 wickets while bowling at an average of 21 and an economy rate of 5.65.
Top Batsman (Runs Scored) – Asif Khan (Fujairah), Mohammed Nadeem (Sharjah)
Top Bowler (Wickets taken) – Harry Bharwal (Fujairah), Karnal Zahid (Sharjah)
Most Sixes – Asif Khan (Fujairah), Mohammed Nadeem (Sharjah)
*NB these predictions may be changed nearer the start of the match once the final starting teams have been announced and we will be running ‘In-Play’ features, so stay tuned.
| english |
Bu səhifədə, arxası olan kafe taburelərinə yönəlmiş keyfiyyətli məzmun tapa bilərsiniz. Siz həmçinin kürəkli kafe tabureləri ilə bağlı ən son məhsul və məqalələri pulsuz əldə edə bilərsiniz. Hər hansı bir sualınız varsa və ya kürəkli kafe tabureləri haqqında ətraflı məlumat almaq istəyirsinizsə, bizimlə əlaqə saxlayın.
Arxalı kafe taburelərinin əsas istehsalçısı olaraq Heshan Youmeiya Furniture Co., Ltd. ciddi keyfiyyətə nəzarət prosesini həyata keçirir. Keyfiyyətə nəzarətin idarə edilməsi vasitəsilə biz məhsulun istehsal qüsurlarını yoxlayırıq və dəqiqləşdiririk. Keyfiyyətə nəzarət məqsədinə nail olmaq üçün QC sahəsində uzun illər təcrübəsi olan savadlı mütəxəssislərdən ibarət QC komandasını işə götürürük.
Yumeya Chairs brendi altında məhsullar maliyyə göstəricilərimizdə mühüm rol oynayır. Ağızdan çıxan söz və imicimizlə bağlı yaxşı nümunələrdir. Satış həcminə görə, onlar hər il daşınmamıza böyük töhfələr verirlər. Yenidən alış dərəcəsinə görə, onlar həmişə ikinci alışda ikiqat miqdarda sifariş edilir. Həm daxili, həm də xarici bazarlarda tanınırlar. Onlar bizim qabaqcıllarımızdır və bazarda təsirimizi artırmağa kömək edəcəklər.
Müştərilərin daha çox rəğbətini qazanmaq üçün biz təkcə arxası olan kafe tabureləri kimi təəccüblü məhsullar təqdim etmirik, həm də diqqətli xidmət göstəririk. Nümunə hazırlamaq və fərdiləşdirmə Yumeya-da mövcuddur.
Epoçt: Info@youmeiya.net.
| english |
<gh_stars>1-10
{
"alfredsnippet" : {
"snippet" : "# Remove nans from textfile output of dmstack and only extract x,y,e1,e2\n# Author: <NAME>\n\nimport pandas as pd\nimport numpy as np\nimport sys\n\ndef remove_nans(ifile):\n df = pd.read_csv(ifile, sep=\",\",header=None,comment='#',usecols=(10,11,37,38))\n for c in df.columns:\n df[c] = pd.to_numeric(df[c],errors='coerce')\n\n # drop na\n df = df.dropna()\n\n # write file\n df.to_csv(ifile[0:-4]+'.txt',index=None,header=None,sep='\\t')\n \nifile = sys.argv[1]\nremove_nans(ifile)",
"uid" : "A8E420AE-6A91-4B42-A9FF-F76F8B3B0DCC",
"name" : "rsh remove nans dmstack",
"keyword" : "remove_nans_\n# Remove nans from textfile output of dmstack and only extract x,y,e1,e2\n# Author: <NAME>\nimport pandas as pd\nimport numpy as np\nimport sys\n\ndef remove_nans(ifile):\n df = pd.read_csv(ifile, sep=\",\",header=None,comment='#',usecols=(10,11,37,38))\n for c in df.columns:\n df[c] = pd.to_numeric(df[c],errors='coerce')\n\n # drop na\n df = df.dropna()\n\n # write file\n df.to_csv(ifile[0:-4]+'.txt',index=None,header=None,sep='\\t')\n \nifile = sys.argv[1]\nremove_nans(ifile)dmstack"
}
} | json |
There are 5 indispensable elements that can make your travel experience more hassle-free and enjoyable. Read along as we put light on them through this article.
Travelling can be a daunting task with unexpected surprises along the way but it doesn't have to be that way since all we want is some peace of mind while travelling, as we want to be at the best of our mental and physical health while planning an important trip or simply going on the much-needed vacation. Thankfully, there are various ways through which one can eliminate the unnecessary hassle that it may bring.
1. Travel Planner: Having access to reliable travel planner can make your journey much smoother. A knowledgeable travel planner can help you book tickets, find accommodation, and arrange transportation, saving you time and effort. Travel planner also helps you in building best possible itinerary, support in local shopping and helps you saviour local flavours.
2. Travel Assistance for senior citizens and solo travellers: There are several factors that can cause hindrances to senior citizens and solo travellers during a trip or journey, which may include medical emergencies, language barriers when embarking upon unknown territories. Also, solo travellers and elders/senior travellers may face conveyance issues during odd hours and thus, may need guidance. This is where travel assistance can come in handy as these providers can help eliminate the hurdles with ease.
3. Emergency Travel Assistance: Emergencies can happen anytime, anywhere. That's why having access to emergency assistance can be a lifesaver. It can include medical assistance, legal support, and other services that help you deal with unexpected situations. Always have a plan in place for emergencies and know how to access assistance when needed. Reach out to leading emergency travel assistance providers.
Adding to the list, Vikas Sharma, Chief Executive Officer at Encalm Hospitality Pvt, recommended:
- Meet and Greet Service: Airports are the hotspots for activity and commencements. With travellers becoming more aware and transparent about their needs and requirements, various hospitality brands offer exclusive meet and greet services that are specially curated to ensure travellers’ well-being and comfort. These meet and greet services at airports inculcate an all-round approach to deliver exceptional service — starting from baggage handling to buggy service, porter service and exclusive airport lounge access to name a few.
- Lounges: Frequent flyers know the importance of lounges. They offer a comfortable seating area, delicious and sumptuous food, drinks and a serene ambiance. Lounges serve as the leisure and relaxation escapades at airports alongside offering free Wi-Fi, charging ports and other amenities that help you stay connected and productive. | english |
<reponame>fkaa/breadx
// MIT/Apache2 License
use super::{
auto::xproto::{
Arc, ChangeGcRequest, CoordMode, Drawable, FillPolyRequest, FreeGcRequest, Gcontext, Point,
PolyArcRequest, PolyFillArcRequest, PolyFillRectangleRequest, PolyRectangleRequest,
PolySegmentRequest, PolyShape, Rectangle, Segment,
},
Connection, Display, GcParameters,
};
impl Gcontext {
#[inline]
fn change_request(self, params: GcParameters) -> ChangeGcRequest {
let mut cgcr = ChangeGcRequest {
gc: self,
..Default::default()
};
let g = params.mask_change_gc_request(&mut cgcr);
cgcr.value_mask = g;
cgcr
}
/// Change the properties of this GC.
#[inline]
pub fn change<Conn: Connection>(
self,
dpy: &mut Display<Conn>,
params: GcParameters,
) -> crate::Result<()> {
log::debug!("Sending ChangeGcRequest to server");
let req = self.change_request(params);
let tok = dpy.send_request(req)?;
log::debug!("Send ChangeGcRequest to server");
dpy.resolve_request(tok)
}
/// Change the properties of this GC, async redox.
#[cfg(feature = "async")]
#[inline]
pub async fn change_async<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
params: GcParameters,
) -> crate::Result<()> {
log::debug!("Sending ChangeGcRequest to server");
let req = self.change_request(params);
let tok = dpy.send_request_async(req).await?;
log::debug!("Send ChangeGcRequest to server");
dpy.resolve_request_async(tok).await
}
/// Request to draw a line.
#[inline]
fn poly_segment_request(self, drawable: Drawable, line: &[Segment]) -> PolySegmentRequest {
PolySegmentRequest {
drawable,
gc: self,
segments: line.to_vec(),
..Default::default()
}
}
/// Draw a set of lines.
#[inline]
pub fn draw_lines<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
line: &[Segment],
) -> crate::Result {
if line.is_empty() {
return Ok(());
}
let psr = self.poly_segment_request(target.into(), line);
log::debug!("Sending PolySegmentRequest to server");
let tok = dpy.send_request(psr)?;
log::debug!("Sent PolySegmentRequest to server");
dpy.resolve_request(tok)
}
/// Draw a set of lines, async redox.
#[cfg(feature = "async")]
#[inline]
pub async fn draw_lines_async<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
line: &[Segment],
) -> crate::Result {
if line.is_empty() {
return Ok(());
}
let psr = self.poly_segment_request(target.into(), line);
log::debug!("Sending PolySegmentRequest to server");
let tok = dpy.send_request_async(psr).await?;
log::debug!("Sent PolySegmentRequest to server");
dpy.resolve_request_async(tok).await
}
/// Draw a singular line.
#[inline]
pub fn draw_line<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
line: Segment,
) -> crate::Result {
self.draw_lines(dpy, target, &[line])
}
/// Draw a singular line, async redox.
#[cfg(feature = "async")]
#[inline]
pub async fn draw_line_async<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
line: Segment,
) -> crate::Result {
self.draw_lines_async(dpy, target, &[line]).await
}
/// Rectangle drawing request.
#[inline]
fn poly_rectangle_request(
self,
target: Drawable,
rectangles: &[Rectangle],
) -> PolyRectangleRequest {
PolyRectangleRequest {
drawable: target,
gc: self,
rectangles: rectangles.to_vec(),
..Default::default()
}
}
/// Draw one or more rectangles to the screen.
#[inline]
pub fn draw_rectangles<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
rectangles: &[Rectangle],
) -> crate::Result<()> {
if rectangles.is_empty() {
return Ok(());
}
let prr = self.poly_rectangle_request(target.into(), rectangles);
log::debug!("Sending PolyRectangleRequest to the server.");
let tok = dpy.send_request(prr)?;
log::debug!("Sent PolyRectangleRequest to the server.");
dpy.resolve_request(tok)
}
/// Draw one or more rectangles to the screen, async redox.
#[cfg(feature = "async")]
#[inline]
pub async fn draw_rectangles_async<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
rectangles: &[Rectangle],
) -> crate::Result<()> {
if rectangles.is_empty() {
return Ok(());
}
let prr = self.poly_rectangle_request(target.into(), rectangles);
log::debug!("Sending PolyRectangleRequest to the server.");
let tok = dpy.send_request_async(prr).await?;
log::debug!("Sent PolyRectangleRequest to the server.");
dpy.resolve_request_async(tok).await
}
/// Draw a rectangle to the screen.
#[inline]
pub fn draw_rectangle<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
rectangle: Rectangle,
) -> crate::Result<()> {
self.draw_rectangles(dpy, target, &[rectangle])
}
/// Draw a rectangle to the screen, async redox.
#[cfg(feature = "async")]
#[inline]
pub async fn draw_rectangle_async<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
rectangle: Rectangle,
) -> crate::Result<()> {
self.draw_rectangles_async(dpy, target, &[rectangle]).await
}
/// Arc drawing request.
#[inline]
fn poly_arc_request(self, target: Drawable, arcs: &[Arc]) -> PolyArcRequest {
PolyArcRequest {
drawable: target,
gc: self,
arcs: arcs.to_vec(),
..Default::default()
}
}
/// Draw one or more arcs to the screen.
#[inline]
pub fn draw_arcs<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
arcs: &[Arc],
) -> crate::Result {
if arcs.is_empty() {
return Ok(());
}
let par = self.poly_arc_request(target.into(), arcs);
log::debug!("Sending PolyArcRequest to the server.");
let tok = dpy.send_request(par)?;
log::debug!("Send PolyArcRequest to the server.");
dpy.resolve_request(tok)
}
/// Draw one or more arcs to the screen, async redox.
#[cfg(feature = "async")]
#[inline]
pub async fn draw_arcs_async<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
arcs: &[Arc],
) -> crate::Result {
if arcs.is_empty() {
return Ok(());
}
let par = self.poly_arc_request(target.into(), arcs);
log::debug!("Sending PolyArcRequest to the server.");
let tok = dpy.send_request_async(par).await?;
log::debug!("Send PolyArcRequest to the server.");
dpy.resolve_request_async(tok).await
}
/// Draw an arc to the screen.
#[inline]
pub fn draw_arc<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
arc: Arc,
) -> crate::Result {
self.draw_arcs(dpy, target, &[arc])
}
/// Draw an arc to the screen, async redox.
#[cfg(feature = "async")]
#[inline]
pub async fn draw_arc_async<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
arc: Arc,
) -> crate::Result {
self.draw_arcs_async(dpy, target, &[arc]).await
}
/// Request to fill a polygon.
#[inline]
fn fill_poly_request(
self,
drawable: Drawable,
shape: PolyShape,
mode: CoordMode,
points: &[Point],
) -> FillPolyRequest {
FillPolyRequest {
drawable,
gc: self,
shape,
coordinate_mode: mode,
points: points.to_vec(),
..Default::default()
}
}
/// Fill a polygon specified by the given points.
#[inline]
pub fn fill_polygon<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
shape: PolyShape,
coordinate_mode: CoordMode,
points: &[Point],
) -> crate::Result {
if points.is_empty() {
return Ok(());
}
let fpr = self.fill_poly_request(target.into(), shape, coordinate_mode, points);
log::debug!("Sending FillPolyRequest to server.");
let tok = dpy.send_request(fpr)?;
log::debug!("Sent FillPolyRequest to server.");
dpy.resolve_request(tok)
}
/// Fill a polygon specified by the given points, async redox.
#[cfg(feature = "async")]
#[inline]
pub async fn fill_polygon_async<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
shape: PolyShape,
coordinate_mode: CoordMode,
points: &[Point],
) -> crate::Result {
if points.is_empty() {
return Ok(());
}
let fpr = self.fill_poly_request(target.into(), shape, coordinate_mode, points);
log::debug!("Sending FillPolyRequest to server.");
let tok = dpy.send_request_async(fpr).await?;
log::debug!("Sent FillPolyRequest to server.");
dpy.resolve_request_async(tok).await
}
/// Request to fill rectangles.
#[inline]
fn poly_fill_rectangle_request(
self,
drawable: Drawable,
rectangles: &[Rectangle],
) -> PolyFillRectangleRequest {
PolyFillRectangleRequest {
drawable,
gc: self,
rectangles: rectangles.to_vec(),
..Default::default()
}
}
/// Fill a set of one or more rectangles.
#[inline]
pub fn fill_rectangles<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
rectangles: &[Rectangle],
) -> crate::Result {
if rectangles.is_empty() {
return Ok(());
}
let pfrr = self.poly_fill_rectangle_request(target.into(), rectangles);
log::debug!("Sending PolyFillRectangleRequest to server.");
let tok = dpy.send_request(pfrr)?;
log::debug!("Sent PolyFillRectangleRequest to server.");
dpy.resolve_request(tok)
}
/// Fill a set of one or more rectangles, async redox.
#[cfg(feature = "async")]
#[inline]
pub async fn fill_rectangles_async<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
rectangles: &[Rectangle],
) -> crate::Result {
if rectangles.is_empty() {
return Ok(());
}
let pfrr = self.poly_fill_rectangle_request(target.into(), rectangles);
log::debug!("Sending PolyFillRectangleRequest to server.");
let tok = dpy.send_request_async(pfrr).await?;
log::debug!("Sent PolyFillRectangleRequest to server.");
dpy.resolve_request_async(tok).await
}
/// Fill a single rectangle.
#[inline]
pub fn fill_rectangle<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
rectangle: Rectangle,
) -> crate::Result {
self.fill_rectangles(dpy, target, &[rectangle])
}
/// Fill a single rectangle, async redox.
#[cfg(feature = "async")]
#[inline]
pub async fn fill_rectangle_async<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
rectangle: Rectangle,
) -> crate::Result {
self.fill_rectangles_async(dpy, target, &[rectangle]).await
}
/// Request to fill a series of arcs.
#[inline]
fn poly_fill_arc_request(self, drawable: Drawable, arcs: &[Arc]) -> PolyFillArcRequest {
PolyFillArcRequest {
drawable,
gc: self,
arcs: arcs.to_vec(),
..Default::default()
}
}
/// Fill a set of one or more arcs.
#[inline]
pub fn fill_arcs<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
arcs: &[Arc],
) -> crate::Result {
if arcs.is_empty() {
return Ok(());
}
let pfar = self.poly_fill_arc_request(target.into(), arcs);
log::debug!("Sending PolyFillArcRequest to server.");
let tok = dpy.send_request(pfar)?;
log::debug!("Sent PolyFillArcRequest to server.");
dpy.resolve_request(tok)
}
/// Fill a set of one or more arcs, async redox.
#[cfg(feature = "async")]
#[inline]
pub async fn fill_arcs_async<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
arcs: &[Arc],
) -> crate::Result {
if arcs.is_empty() {
return Ok(());
}
let pfar = self.poly_fill_arc_request(target.into(), arcs);
log::debug!("Sending PolyFillArcRequest to server.");
let tok = dpy.send_request_async(pfar).await?;
log::debug!("Sent PolyFillArcRequest to server.");
dpy.resolve_request_async(tok).await
}
/// Fill an arc.
#[inline]
pub fn fill_arc<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
arc: Arc,
) -> crate::Result {
self.fill_arcs(dpy, target, &[arc])
}
/// Fill an arc, async redox.
#[cfg(feature = "async")]
#[inline]
pub async fn fill_arc_async<Conn: Connection, Target: Into<Drawable>>(
self,
dpy: &mut Display<Conn>,
target: Target,
arc: Arc,
) -> crate::Result {
self.fill_arcs_async(dpy, target, &[arc]).await
}
/// Free the memory this GC allocates. Note that this will cause future requests involving this GC
/// to fail.
#[inline]
pub fn free<Conn: Connection>(self, dpy: &mut Display<Conn>) -> crate::Result {
let req = FreeGcRequest {
gc: self,
..Default::default()
};
log::debug!("Sending FreeGcRequest to server.");
let tok = dpy.send_request(req)?;
log::debug!("Sent FreeGcRequest to server.");
dpy.resolve_request(tok)
}
/// Free the memory this GC allocates, async redox.
#[cfg(feature = "async")]
#[inline]
pub async fn free_async<Conn: Connection>(self, dpy: &mut Display<Conn>) -> crate::Result {
let req = FreeGcRequest {
gc: self,
..Default::default()
};
log::debug!("Sending FreeGcRequest to server.");
let tok = dpy.send_request_async(req).await?;
log::debug!("Sent FreeGcRequest to server.");
dpy.resolve_request_async(tok).await
}
}
| rust |
{
"name": "tp-popup",
"version": "1.0.0",
"description": "Popup modal jQuery plugin",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "<NAME>",
"license": "ISC"
}
| json |
{"remainingRequest":"F:\\myblob\\vue-element-admin\\node_modules\\thread-loader\\dist\\cjs.js!F:\\myblob\\vue-element-admin\\node_modules\\babel-loader\\lib\\index.js!F:\\myblob\\vue-element-admin\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!F:\\myblob\\vue-element-admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!F:\\myblob\\vue-element-admin\\src\\components\\SizeSelect\\index.vue?vue&type=script&lang=js&","dependencies":[{"path":"F:\\myblob\\vue-element-admin\\src\\components\\SizeSelect\\index.vue","mtime":1572245987024},{"path":"F:\\myblob\\vue-element-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"F:\\myblob\\vue-element-admin\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"F:\\myblob\\vue-element-admin\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"F:\\myblob\\vue-element-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"F:\\myblob\\vue-element-admin\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.replace\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nexport default {\n data: function data() {\n return {\n sizeOptions: [{\n label: 'Default',\n value: 'default'\n }, {\n label: 'Medium',\n value: 'medium'\n }, {\n label: 'Small',\n value: 'small'\n }, {\n label: 'Mini',\n value: 'mini'\n }]\n };\n },\n computed: {\n size: function size() {\n return this.$store.getters.size;\n }\n },\n methods: {\n handleSetSize: function handleSetSize(size) {\n this.$ELEMENT.size = size;\n this.$store.dispatch('app/setSize', size);\n this.refreshView();\n this.$message({\n message: 'Switch Size Success',\n type: 'success'\n });\n },\n refreshView: function refreshView() {\n var _this = this;\n\n // In order to make the cached page re-rendered\n this.$store.dispatch('tagsView/delAllCachedViews', this.$route);\n var fullPath = this.$route.fullPath;\n this.$nextTick(function () {\n _this.$router.replace({\n path: '/redirect' + fullPath\n });\n });\n }\n }\n};",null]} | json |
<gh_stars>1-10
{"Content-Type": "message/rfc822", "Content-Type-Override": "message/rfc822", "MboxParser-content-transfer-encoding": "7bit", "MboxParser-from": "r Mon Sep 13 08:15:32 2004", "MboxParser-mime-version": "1.0", "MboxParser-return-path": "<<EMAIL>>", "MboxParser-status": "RO", "MboxParser-x-mailer": "RLSP Mailer", "MboxParser-x-priority": "3 (Normal)", "MboxParser-x-sieve": "CMU Sieve 2.2", "Message-Cc": "", "Message-From": "mobutu <<EMAIL>>", "Message:From-Email": "<EMAIL>", "Message:From-Name": "mobutu", "Message:Raw-Header:Content-Transfer-Encoding": "7bit", "Message:Raw-Header:Content-Type": "text/plain; charset=us-ascii", "Message:Raw-Header:Message-Id": "<<EMAIL>>", "Message:Raw-Header:Mime-Version": "1.0", "Message:Raw-Header:Return-Path": "<<EMAIL>>", "Message:Raw-Header:Status": "RO", "Message:Raw-Header:X-Mailer": "RLSP Mailer", "Message:Raw-Header:X-Priority": "3 (Normal)", "Message:Raw-Header:X-Sieve": "CMU Sieve 2.2", "X-TIKA:Parsed-By": ["org.apache.tika.parser.DefaultParser", "org.apache.tika.parser.mail.RFC822Parser"], "X-TIKA:content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nREPLY\n\n\nDEAR Friend,\n\nPlease reply to \"<EMAIL>\"\n\nI know that this letter will come to you as a surprise\nconsidering the fact that we have not met before.May\nthe Almighty God bless you as you read this email.I am\ntrully looking for someone that will assist me with a\nbusiness that has to do with my family estate which my\nlate father left behind for us.i am contacting you\nbased on the fact that i want someone that is not\nknown to my family to assist me in this business and\nthis is for security reasons which i will explain to\nyou as we make progress.\n\nI am the first son of the late <NAME>,\nthe former President of \"ZAIRE\" now democratic\nrepublic of congo .I am presently on political asylum in Nigeria . I\ngot your contact over the internet during my search\nfor a person that will assist me in this business.this\nbecame neccessary as i do not want anybody known to me\nor my family to be associated with this money.\nI want you to note that this business will benefit\nboth of us and that it is 100% risk free. However, you\nmust confirm your ability to handle this because it involves a large amount of\nmoney. The funds \"THIRTY SEVEN MILLION UNITED STATES\nDOLLARS\" ($37million)is my share of my father's\nestate. \n\nI boxed and shipped the money to a security\ncompany abroad at the peak of the a political uprising\nthat rocked my country few years ago. Now that the\ncrisis has ended , I need a trustworthy person to\nproceed to the place of the security company in order to clear the fund and\nafterwards,i will come to your country for us to start\na joint business venture as i do not have the\nintention of bringing the funds back to Africa for a\nvery long time.Note that I will send to you the\nrelevant documents that will enable you take\npossession of the fund for onward investment for our\nmutual benefit. All I need from you is as follows:\n\n\n1. Your confirmation of your ability to handle this\nbusiness for me.\n\n2.your word that you will keep this business as \nconfidential as possible at all times until we\nconclude this business.\n\n3. Your telephone and fax numbers for communication.\n\n4. Your full permanent address.\n\nAs soon as I get the above information from you, I\nwill disclose to you the name and the country of the\nsecurity company, the contact of the diplomat that i\nhave hired to assist us in this business,as well as \nyour name and particulars to the security company as my\nrepresentative and my partner to enable them contact\nyou accordingly. As we make progress,i will send to\nyou a\"LETTER OF AUTHORITY\" and \"AGREEMENT LETTER\" to\nenable you clear the fund on my behalf. Note that this\nis a very safe transaction as this funds is my share\nof my father's estate.Please reply to \"<EMAIL>\"\n\nI await your response to enable us proceed.\n\n\nRegards,\n\n<NAME>\n\n\n\n___________________________________________________________________________\nMail sent from WebMail service at PHP-Nuke Powered Site\n- http://www.blitz-krieg.de\n\n\n\n\n", "X-TIKA:content_handler": "ToTextContentHandler", "X-TIKA:embedded_depth": "1", "X-TIKA:embedded_resource_path": "/embedded-1114", "X-TIKA:parse_time_millis": "1", "dc:creator": ["mobutu <<EMAIL>>", "mobutu <<EMAIL>>"], "dc:format": "text/plain; charset=us-ascii", "dc:identifier": "<E1C6p8g-0004fy-00@h9271.serverkompetenz.net>", "dc:subject": "REPLY", "dc:title": "REPLY", "dcterms:created": "2004-09-13T11:36:54Z"} | json |
{"nom":"Bavelincourt","circ":"4ème circonscription","dpt":"Somme","inscrits":74,"abs":32,"votants":42,"blancs":0,"nuls":0,"exp":42,"res":[{"nuance":"REM","nom":"<NAME>","voix":28},{"nuance":"FN","nom":"<NAME>","voix":14}]} | json |
<filename>packages/requestNetworkSmartContracts/test/utils/bytes-test.js<gh_stars>1-10
const BytesUtilsMock = artifacts.require('./test/BytesUtilsMock.sol');
// Does the same job as web3.utils.asciiToHex()
const asciiToHex = ascii => '0x' + ascii.split('').map(letter => letter.charCodeAt().toString(16)).join('');
contract('Bytes Utils', function (accounts) {
let bytesUtils;
before(async function () {
bytesUtils = await BytesUtilsMock.new();
});
it('extractAddress works correctly', async function () {
const rawHexAddress = 'abc0000000000000000000000000000000000def';
const expectedAddress = `0x${rawHexAddress}`;
await bytesUtils.extractAddress(`0x${rawHexAddress}`, 0);
let result = await bytesUtils.extractAddressResult();
assert.equal(result, expectedAddress);
await bytesUtils.extractAddress(`0x9999${rawHexAddress}BBBB`, 2);
result = await bytesUtils.extractAddressResult();
assert.equal(result, expectedAddress);
});
it('extractBytes32 works correctly', async function () {
const rawHexBytes32 = 'abc0000000000000000000000000000000000000000000000000000000000def';
const expectedBytes32 = `0x${rawHexBytes32}`;
await bytesUtils.extractBytes32(`0x${rawHexBytes32}`, 0);
let result = await bytesUtils.extractBytes32Result();
assert.equal(result, expectedBytes32);
await bytesUtils.extractBytes32(`0x9999${rawHexBytes32}BBBB`, 2);
result = await bytesUtils.extractBytes32Result();
assert.equal(result, expectedBytes32);
});
it('updateBytes20inBytesResult works correctly', async function () {
const inputBytes = '0xabcdef0123456789000000000000000000000000000000000000000000000def';
const inputBytes20 = '0x123aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa123';
const expectedBytes = '0xabcdef123aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa123000000000000000def';
await bytesUtils.updateBytes20inBytes(inputBytes, 3, inputBytes20);
let result = await bytesUtils.updateBytes20inBytesResult();
assert.equal(result, expectedBytes);
});
it('extractString works correctly', async function () {
const expectedString = 'request4president';
const hexString = asciiToHex(expectedString);
const rubishBytes = '3d6a7c';
await bytesUtils.extractString(hexString + rubishBytes, expectedString.length, 0);
let result = await bytesUtils.extractStringResult();
assert.equal(result, expectedString);
});
});
| javascript |
import torch
from torch.nn import functional as F
from torch import optim
from torch import nn
class PolicyNetwork(torch.nn.Module):
def __init__(self, in_dim, out_dim, alpha=0.01):
super(PolicyNetwork, self).__init__()
self.in_dim = in_dim
self.out_dim = out_dim
self.l1 = nn.Linear(in_dim, 128)
self.l2 = nn.Linear(128, 128)
self.l3 = nn.Linear(128, 64)
self.l4 = nn.Linear(64, out_dim)
self.relu = nn.LeakyReLU()
self.optimizer = torch.optim.Adam(lr=alpha, params=self.parameters())
self.device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu:0')
self.to(self.device)
def forward(self, x):
out = torch.Tensor(x).reshape(-1, self.in_dim)
out = self.l1(out)
out = self.relu(out)
out = self.l2(out)
out = self.relu(out)
out = self.l3(out)
out = self.relu(out)
out = self.l4(out)
out = torch.tanh(out)
return out
def loss(self, q):
return -torch.sum(q)/q.shape[0]
def optimize(self, q):
torch.cuda.empty_cache()
self.optimizer.zero_grad()
loss = self.loss(q)
loss.backward(retain_graph=True)
self.optimizer.step()
return -loss.detach().numpy()
def main():
pn = PolicyNetwork(in_dim=3, out_dim=1)
x = torch.ones(10, 3)
print(pn.forward(x))
if __name__ == "__main__":
main()
| python |
It looks like the investment service Acorns may turn into an oak faster than expected.
Billed as an automated investment manager for the people, Acorns is off to a blistering start with its new retirement account service picking up 100,000 accounts in its first month.
Unlike other investment services, Acorns takes spare change from transactions and rewards agreements with certain retailers to invest in a managed portfolio. The company’s initial “spare change” investment service cost $1 per month and its new retirement-focused account costs $2.
“If you’re an Acorns customer, within 60 seconds you can open up a retirement account,” says chief executive Noah Kerner.
Those fees ($2 per-month for the retirement account) are in place until a customer hits the $1 million investment threshold.
Kerner says that most of Acorns more than 3.5 million customers are investing roughly $50 to $60 per month into their core accounts, which is ideal for investors who aren’t particularly savvy about investing in the stock market.
The average age of an Acorns customer is 32 years old with a median income falling somewhere between $50,000 and $60,000, Kerner said. And the accounts are coming from all over the country, rather than concentrated on the coasts like other automated investment managers, he says.
“The types of problems we’re trying to solve is that 70 percent of Americans don’t have a $1,000 emergency fund set up and 66 percent don’t have a dollar saved for retirement. Another 66 percent can’t pass a basic financial literacy test,” Kerner says.
And unlike other services, Kerner says that Acorns tries to be as transparent as possible about its pricing. “The way we think about pricing is from a subscription pricing perspective and to be really clear with our customers about exactly what they’re paying and exactly what they’re getting,” says Kerner.
Earlier this month, the company signed an agreement with BlackRock involving shared development resources for new product development in financial services.
“Acorns is a pioneer in creating innovative ways to engage investors in a mobile-first world. By deepening our understanding of how their customers use investment technologies, we can apply those learnings across BlackRock to evolve the products we build for our distribution partners,” said Rob Goldstein, BlackRock’s Chief Operating Officer, in a statement.
Financial services and investment apps continue to proliferate driven by a booming stock market, low interest rates and the rise of cryptocurrency speculation. While other companies have moved aggressively to incorporate more tools to encourage speculation, Acorns has taken the opposite approach.
The company emphasizes savings and portfolio diversification rather than day trading, margin trading or betting on the latest token offering from an unknown company.
This approach may actually prove more beneficial for the company’s customers in the long term. Kerner admonishes that customers should be as concerned about free trading services on the market as they are (arguably) about the free services they’re receiving from social networks, repeating that if a customer isn’t paying for a product, then they likely are the product.
| english |
use crate::HashMap;
use intmap::IntMap;
use std::io;
use std::mem::MaybeUninit;
use std::time::Duration;
use util::config;
use yaml_rust::{Yaml, YamlLoader};
pub(crate) mod emoji;
pub(crate) use emoji::*;
#[derive(Debug, Clone)]
pub(crate) struct MachineProps {
pub name: String,
pub emoji_version: EmojiVersion,
pub graphics_base_addr: u16,
pub sleep_unit: Duration,
pub text_buffer_base_addr: u16,
pub key_buffer_addr: u16,
pub key_mapping_addrs: Vec<u16>,
pub key_masks: [Option<(u16, u8)>; 256],
pub key_buffer_quit: bool,
pub addrs: IntMap<AddrProp>,
}
#[derive(Debug, Clone)]
pub(crate) struct AddrProp {
pub kind: AddrPropKind,
pub op: AddrPropOp,
}
#[derive(Debug, Clone)]
pub(crate) enum AddrPropOp {
None,
Add(i32),
Sub(i32),
Mul(i32),
Div(i32),
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AddrPropKind {
Year,
Month,
Day,
WeekDay,
Hour,
Minute,
Second,
}
impl Default for MachineProps {
fn default() -> Self {
Self {
name: String::new(),
emoji_version: EmojiVersion::New,
graphics_base_addr: 0,
sleep_unit: Duration::default(),
text_buffer_base_addr: 0,
key_buffer_addr: 0,
key_mapping_addrs: vec![],
key_masks: [None; 256],
key_buffer_quit: false,
addrs: IntMap::new(),
}
}
}
pub fn names() -> Vec<&'static str> {
unsafe {
MACHINES
.assume_init_ref()
.keys()
.map(|s| s.as_str())
.collect()
}
}
pub(crate) fn machines() -> &'static HashMap<String, MachineProps> {
unsafe { MACHINES.assume_init_ref() }
}
static mut MACHINES: MaybeUninit<HashMap<String, MachineProps>> =
MaybeUninit::uninit();
static mut MACHINES_INITED: bool = false;
pub(crate) static mut DEFAULT_MACHINE_FOR_NEW_EMOJI_VERSION: String =
String::new();
pub(crate) static mut DEFAULT_MACHINE_FOR_OLD_EMOJI_VERSION: String =
String::new();
#[derive(Debug)]
pub enum InitError {
Io(io::Error),
Yaml(yaml_rust::ScanError),
Other(String),
}
impl From<io::Error> for InitError {
fn from(err: io::Error) -> Self {
Self::Io(err)
}
}
impl From<yaml_rust::ScanError> for InitError {
fn from(err: yaml_rust::ScanError) -> Self {
Self::Yaml(err)
}
}
impl From<String> for InitError {
fn from(err: String) -> Self {
Self::Other(err)
}
}
impl From<&str> for InitError {
fn from(err: &str) -> Self {
Self::Other(err.to_owned())
}
}
pub fn init_machines() -> Result<(), InitError> {
let content = config::load_config_file("machines.yaml")?;
let mut docs = YamlLoader::load_from_str(&content)?;
unsafe {
if MACHINES_INITED {
MACHINES.assume_init_drop();
}
MACHINES.write(HashMap::default());
MACHINES_INITED = true;
}
if docs.is_empty() {
return Ok(());
}
let doc = docs.pop().unwrap();
let mut obj = doc.into_hash().ok_or_else(|| "toplevel is not object")?;
// default
let default = obj
.remove(&Yaml::String("default".to_owned()))
.ok_or_else(|| "missing field 'default'")?;
let mut default =
default.into_hash().ok_or_else(|| "default is not object")?;
// default.new
let new = default
.remove(&Yaml::String("new".into()))
.ok_or_else(|| "missing field 'new' in 'default'")?;
let new = new
.into_string()
.ok_or_else(|| "default.new is not string")?;
unsafe {
DEFAULT_MACHINE_FOR_NEW_EMOJI_VERSION = new.to_ascii_uppercase();
}
// default.old
let old = default
.remove(&Yaml::String("old".into()))
.ok_or_else(|| "missing field 'old' in 'default'")?;
let old = old
.into_string()
.ok_or_else(|| "default.old is not string")?;
unsafe {
DEFAULT_MACHINE_FOR_OLD_EMOJI_VERSION = old.to_ascii_uppercase();
}
if let Some((key, _)) = default.pop_front() {
return Err(
format!("superfluous field {} in 'default'", yaml_to_string(&key)).into(),
);
}
for (mach_name, obj) in obj {
let mach_name = mach_name.as_str().ok_or_else(|| {
format!("key {} is not string", yaml_to_string(&mach_name))
})?;
let mut obj = obj
.into_hash()
.ok_or_else(|| format!("'{}' is not object", mach_name))?;
let mut props = MachineProps::default();
props.name = mach_name.to_owned();
// emoji-version
let emoji_version = obj
.remove(&Yaml::String("emoji-version".into()))
.ok_or_else(|| {
format!("missing field 'emoji-version' in '{}'", mach_name)
})?;
let emoji_version = emoji_version
.as_str()
.ok_or_else(|| format!("{}.emoji-version is not string", mach_name))?;
if emoji_version == "new" {
props.emoji_version = EmojiVersion::New;
} else if emoji_version == "old" {
props.emoji_version = EmojiVersion::Old;
} else {
return Err(
format!("unrecognized emoji version '{}'", emoji_version).into(),
);
}
// sleep-unit
let sleep_unit = obj
.remove(&Yaml::String("sleep-unit".into()))
.ok_or_else(|| {
format!("missing field 'sleep-unit' in '{}'", mach_name)
})?;
let sleep_unit = sleep_unit
.as_str()
.ok_or_else(|| format!("{}.sleep-unit is not string", mach_name))?;
let i = sleep_unit
.rfind(|c: char| !c.is_ascii_alphabetic())
.ok_or_else(|| format!("invalid sleep unit '{}'", sleep_unit))?;
if i == sleep_unit.len() - 1 {
return Err(
format!("missing unit (s/ms/us/ns) in sleep unit '{}'", sleep_unit)
.into(),
);
}
let value = sleep_unit[..i + 1]
.parse::<f64>()
.map_err(|_| format!("invalid sleep unit '{}'", sleep_unit))?;
if !value.is_normal() || value < 0.0 {
return Err(format!("invalid sleep unit '{}'", sleep_unit).into());
}
let sleep_unit = match &sleep_unit[i + 1..] {
"s" => Duration::from_millis((value * 1000.0) as u64),
"ms" => Duration::from_micros((value * 1000.0) as u64),
"us" => Duration::from_nanos((value * 1000.0) as u64),
"ns" => Duration::from_nanos(value as u64),
_ => return Err(format!("invalid sleep unit '{}'", sleep_unit).into()),
};
props.sleep_unit = sleep_unit;
// graphics-base-addr
let addr = obj
.remove(&Yaml::String("graphics-base-addr".to_owned()))
.ok_or_else(|| {
format!("missing field 'graphics-base-addr' in '{}'", mach_name)
})?;
props.graphics_base_addr = get_addr(mach_name, "graphics-base-addr", addr)?;
// text-buffer-base-addr
let addr = obj
.remove(&Yaml::String("text-buffer-base-addr".to_owned()))
.ok_or_else(|| {
format!("missing field 'text-buffer-base-addr' in '{}'", mach_name)
})?;
props.text_buffer_base_addr =
get_addr(mach_name, "text-buffer-base-addr", addr)?;
// key-buffer-base-addr
let addr = obj
.remove(&Yaml::String("key-buffer-addr".to_owned()))
.ok_or_else(|| {
format!("missing field 'key-buffer-addr' in '{}'", mach_name)
})?;
props.key_buffer_addr = get_addr(mach_name, "key-buffer-addr", addr)?;
// key-mappings
let key_mappings = obj
.remove(&Yaml::String("key-mappings".to_owned()))
.ok_or_else(|| {
format!("missing field 'key-mappings' in '{}'", mach_name)
})?;
let key_mappings = key_mappings
.into_hash()
.ok_or_else(|| format!("{}.key-mappings is not object", mach_name))?;
let mut key_bits = HashMap::<u16, u8>::default();
for (key, mapping) in key_mappings {
let key = key.as_i64().ok_or_else(|| {
format!(
"key {}.key-mappings.{} is not integer",
mach_name,
yaml_to_string(&key)
)
})?;
let key = u8::try_from(key).map_err(|_| {
format!(
"key {}.key-mappings.{} is not within the range 0~255",
mach_name, key,
)
})?;
let mut mapping = mapping.into_hash().ok_or_else(|| {
format!("{}.key-mappings.{} is not object", mach_name, key)
})?;
let addr = mapping
.remove(&Yaml::String("addr".to_owned()))
.ok_or_else(|| {
format!("missing field 'addr' in {}.key-mappings.{}", mach_name, key)
})?;
let addr = get_addr(
format!("{}.key-mappings", mach_name),
format!("{}", key),
addr,
)?;
let bit =
mapping
.remove(&Yaml::String("bit".to_owned()))
.ok_or_else(|| {
format!("missing field 'bit' in {}.key-mappings.{}", mach_name, key)
})?;
let bit = bit.as_i64().ok_or_else(|| {
format!("{}.key-mappings.{}.bit is not integer", mach_name, key)
})?;
if bit < 0 || bit > 7 {
return Err(
format!(
"{}.key-mappings.{}.bit is not within the range 0~7",
mach_name, key
)
.into(),
);
}
if let Some((k, _)) = mapping.pop_front() {
return Err(
format!(
"superfluous field {} in {}.key-mappings.{}",
yaml_to_string(&k),
mach_name,
key
)
.into(),
);
}
if *key_bits.entry(addr).or_insert(0) & (1 << bit) != 0 {
return Err(
format!("duplicate {{ addr: {}, bit: {} }}", addr, bit).into(),
);
}
props.key_masks[key as usize] = Some((addr, 1 << bit));
}
props.key_mapping_addrs.extend(key_bits.keys());
// key-buffer-quit
let key_buffer_quit = obj
.remove(&Yaml::String("key-buffer-quit".into()))
.ok_or_else(|| {
format!("missing field 'key-buffer-quit' in '{}'", mach_name)
})?;
props.key_buffer_quit = key_buffer_quit
.as_bool()
.ok_or_else(|| format!("{}.key-buffer-quit is not boolean", mach_name))?;
// addrs
let addrs = obj
.remove(&Yaml::String("addrs".to_owned()))
.ok_or_else(|| format!("missing field 'addrs' in '{}'", mach_name))?;
let addrs = addrs
.into_hash()
.ok_or_else(|| format!("{}.addrs is not object", mach_name))?;
for (addr, value) in addrs {
let addr = addr.as_i64().ok_or_else(|| {
format!(
"key {}.addrs.{} is not integer",
mach_name,
yaml_to_string(&addr)
)
})?;
let addr = u16::try_from(addr).map_err(|_| {
format!(
"key {}.addrs.{} is not within the range 0~65535",
mach_name, addr
)
})?;
let value = value
.into_string()
.ok_or_else(|| format!("{}.addrs.{} is not string", mach_name, addr))?;
let value = value.trim();
let rest = value.trim_start_matches(char::is_alphanumeric);
let kind = if rest.len() == value.len() {
return Err(format!("{}.addrs.{} is invalid", mach_name, addr).into());
} else {
match &value[..value.len() - rest.len()] {
"year" => AddrPropKind::Year,
"month" => AddrPropKind::Month,
"day" => AddrPropKind::Day,
"weekday" => AddrPropKind::WeekDay,
"hour" => AddrPropKind::Hour,
"minute" => AddrPropKind::Minute,
"second" => AddrPropKind::Second,
s => {
return Err(
format!(
"unrecognized variable {} in {}.addrs.{}",
s, mach_name, addr
)
.into(),
)
}
}
};
let op = if rest.is_empty() {
AddrPropOp::None
} else {
let value = rest.trim_start();
let op_ctor = match value.as_bytes()[0] {
b'+' => AddrPropOp::Add,
b'-' => AddrPropOp::Sub,
b'*' => AddrPropOp::Mul,
b'/' => AddrPropOp::Div,
_ => {
return Err(
format!("{}.addrs.{} is invalid", mach_name, addr).into(),
);
}
};
let value = value[1..].trim_start();
let value = value.parse::<i32>().map_err(|_| {
format!("{} is not integer in {}.addrs.{}", value, mach_name, addr)
})?;
op_ctor(value)
};
props.addrs.insert(addr as _, AddrProp { kind, op });
}
if let Some((key, _)) = obj.pop_front() {
return Err(
format!(
"superfluous field {} in '{}'",
yaml_to_string(&key),
mach_name
)
.into(),
);
}
unsafe {
MACHINES
.assume_init_mut()
.insert(mach_name.to_ascii_uppercase(), props);
}
}
unsafe {
if !MACHINES
.assume_init_ref()
.contains_key(&DEFAULT_MACHINE_FOR_NEW_EMOJI_VERSION)
{
return Err(format!("new default machine '{}' not found", new).into());
}
if !MACHINES
.assume_init_ref()
.contains_key(&DEFAULT_MACHINE_FOR_OLD_EMOJI_VERSION)
{
return Err(format!("old default machine '{}' not found", old).into());
}
}
Ok(())
}
fn get_addr(
context: impl AsRef<str>,
name: impl AsRef<str>,
addr: Yaml,
) -> Result<u16, InitError> {
let context = context.as_ref();
let name = name.as_ref();
let addr = addr
.as_i64()
.ok_or_else(|| format!("{}.{} is not integer", context, name))?;
u16::try_from(addr).map_err(|_| {
format!("{}.{} is not within the range 0~65535", context, name).into()
})
}
fn yaml_to_string(yaml: &Yaml) -> String {
match yaml {
Yaml::Null => "~".to_owned(),
Yaml::Boolean(true) => "true".to_owned(),
Yaml::Boolean(false) => "false".to_owned(),
Yaml::Hash(_) => "<object>".to_owned(),
Yaml::Array(_) => "<array>".to_owned(),
Yaml::String(s) => format!("'{}'", s.replace("'", "\\'")),
Yaml::Integer(n) => n.to_string(),
Yaml::Real(n) => n.to_string(),
_ => panic!(),
}
}
impl AddrPropOp {
pub(crate) fn apply_to_i32(&self, value: i32) -> u8 {
match self {
Self::Add(n) => (value + *n) as _,
Self::Sub(n) => (value - *n) as _,
Self::Mul(n) => (value * *n) as _,
Self::Div(n) => (value / *n) as _,
Self::None => value as _,
}
}
pub(crate) fn apply_to_f64(&self, value: f64) -> u8 {
match self {
Self::Add(n) => (value + *n as f64) as _,
Self::Sub(n) => (value - *n as f64) as _,
Self::Mul(n) => (value * *n as f64) as _,
Self::Div(n) => (value / *n as f64) as _,
Self::None => value as _,
}
}
}
| rust |
<reponame>sensssz/SQPKV
#include "sqpkv/connection.h"
#include "gflags/gflags.h"
#include "spdlog/spdlog.h"
#include <algorithm>
#include <iostream>
#include <string>
#include <sstream>
#include <cstdio>
DEFINE_string(server_addr, "127.0.0.1", "Address of the server");
DEFINE_int32(port, 4242, "Port number of the server");
void Show(std::string message) {
std::cout << message << std::endl;
std::cout << "> ";
}
void ShowStatus(sqpkv::Status &status) {
if (status.err()) {
Show(status.message());
} else if (status.eof()) {
std::cout << "Server is lost, exiting..." << std::endl;
exit(EXIT_FAILURE);
} else {
std::cout << "> ";
}
}
void ShowList(std::vector<std::string> list) {
size_t max_len = 0;
for (auto &item : list) {
if (item.length() > max_len) {
max_len = item.length();
}
}
max_len += 2;
std::stringstream ss;
for (size_t i = 0; i < max_len; i++) {
ss << "─";
}
auto hline = ss.str();
std::cout << "┌" << hline << "┐" << std::endl;
if (list.size() > 0) {
std::string &item = list[0];
int lpad = static_cast<int>((max_len - item.length()) / 2);
int rpad = static_cast<int>(max_len - lpad - item.length() - 1);
printf("│ %*s%*s │\n", lpad, item.c_str(), rpad, "");
}
for (size_t i = 1; i < list.size(); i++) {
auto &item = list[i];
std::cout << "├" << hline << "┤" << std::endl;
int lpad = static_cast<int>((max_len - item.length()) / 2);
int rpad = static_cast<int>(max_len - lpad - item.length() - 1);
printf("│ %*s%*s │\n", lpad, item.c_str(), rpad, "");
}
std::cout << "└" << hline << "┘" << std::endl;
std::cout << "> ";
}
// You could also take an existing vector as a parameter.
std::vector<std::string> split(std::string str, char delimiter) {
std::vector<std::string> internal;
std::stringstream ss(str); // Turn the string into a stream.
std::string tok;
while(std::getline(ss, tok, delimiter)) {
internal.push_back(tok);
}
return internal;
}
int main(int argc, char *argv[]) {
gflags::ParseCommandLineFlags(&argc, &argv, true);
spdlog::set_pattern("[%H:%M:%S] %v");
spdlog::set_level(spdlog::level::debug);
auto console = spdlog::stdout_color_mt("console");
auto connection = sqpkv::Connection::ConnectTo(FLAGS_server_addr, FLAGS_port);
if (connection.err()) {
spdlog::get("console")->error(connection.status().ToString());
return 1;
}
Show("Welcome to SQPKV");
bool quit = false;
std::string line;
while (!quit) {
std::getline(std::cin, line);
if (line.find("get all ") == 0) {
auto parts = split(line, ' ');
std::vector<std::string> keys;
auto status = connection->GetAll(parts[2], keys);
if (status.ok()) {
ShowList(keys);
} else {
ShowStatus(status);
}
} else if (line.find("get ") == 0) {
auto parts = split(line, ' ');
std::string value;
auto status = connection->Get(parts[1], value);
if (status.ok()) {
Show(value);
} else {
ShowStatus(status);
}
} else if (line.find("put ") == 0) {
auto parts = split(line, ' ');
auto status = connection->Put(parts[1], parts[2]);
ShowStatus(status);
} else if (line.find("delete ") == 0) {
auto parts = split(line, ' ');
auto status = connection->Delete(parts[1]);
ShowStatus(status);
} else if (line.find("quit") == 0) {
quit = true;
} else {
Show("Unsupported syntax");
}
}
return 0;
}
| cpp |
use crate::consensus_decode;
use crate::bitcoin::{BlockHash, Transaction};
use std::sync::Arc;
use tokio::sync::RwLock;
use tokio::sync::watch::{Sender, Receiver, channel};
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ZeroMQMessage {
HashBlock(BlockHash),
RawTx(Transaction),
Init,
}
use ZeroMQMessage::*;
/// Listens to the Bitcoin Core's ZeroMQ server and relay messages to other threads.
#[derive(Debug, Clone)]
pub struct ZeroMQClient {
zmq_endpoint: String,
stop: Arc<RwLock<bool>>,
stopped: Arc<RwLock<bool>>,
ready: Arc<RwLock<bool>>,
}
impl ZeroMQClient {
pub fn new(zmq_endpoint: &str) -> Self {
Self {
zmq_endpoint: zmq_endpoint.to_string(),
stop: Arc::new(RwLock::new(false)),
stopped: Arc::new(RwLock::new(false)),
ready: Arc::new(RwLock::new(false)),
}
}
pub async fn run(&self, sender: Sender<ZeroMQMessage>) {
let stop = self.stop.clone();
tokio::spawn(async move {
tokio::signal::ctrl_c().await.expect("Failed to install CTRL+C signal handler.");
*stop.write().await = true;
});
// Connect to ZMQ.
let zmq_ctx = zmq::Context::new();
let socket = zmq_ctx.socket(zmq::SocketType::SUB).expect("Failed to open a ZeroMQ socket.");
socket.connect(&self.zmq_endpoint).expect("Failed to connect to a ZeroMQ endpoint.");
socket.set_subscribe(b"hashblock").expect("Failed to subscribe to a ZeroMQ topic.");
socket.set_subscribe(b"rawtx").expect("Failed to subscribe to a ZeroMQ topic.");
println!("ZeroMQClient: waiting for a ZeroMQ message...");
*self.ready.write().await = true;
loop {
if *self.stop.read().await {
break;
}
let multipart = socket.recv_multipart(zmq::DONTWAIT);
match multipart {
Ok(multipart) => {
assert_eq!(multipart.len(), 3);
let topic = std::str::from_utf8(&multipart[0]).expect("Failed to decode ZeroMQ topic.").to_string();
let bin = &multipart[1];
//println!("ZeroMQClient: {} {} {}", topic, hex::encode(bin), hex::encode(&multipart[2]));
match topic.as_str() {
"hashblock" => {
let block_hash: BlockHash = consensus_decode(bin);
sender.send(HashBlock(block_hash)).unwrap();
},
"rawtx" => {
let transaction: Transaction = consensus_decode(bin);
sender.send(RawTx(transaction)).unwrap();
}
_ => {},
}
},
Err(_) => {
//println!("ZeroMQClient: failed to receive a message from ZeroMq.");
tokio::time::sleep(std::time::Duration::from_millis(100)).await;
},
}
}
println!("ZeroMQClient stopped.");
*self.stopped.write().await = true;
}
pub async fn start(&self) -> Receiver<ZeroMQMessage> {
let (tx, rx) = channel(Init);
let me = self.clone();
tokio::spawn(async move {
me.run(tx).await;
});
rx
}
pub async fn is_ready(&self) -> bool {
*self.ready.read().await
}
pub async fn wait_for_ready(&self) {
while !self.is_ready().await {
tokio::time::sleep(std::time::Duration::from_millis(1)).await;
}
}
pub async fn is_stopped(&self) -> bool {
*self.stopped.read().await
}
pub async fn stop(&self) {
*self.stop.write().await = true;
}
pub async fn wait_for_stop(&self) {
self.stop().await;
while !self.is_stopped().await {
tokio::time::sleep(std::time::Duration::from_millis(1)).await;
}
}
}
#[cfg(test)]
mod tests {
use super::*;
const BLOCK_HASH: &str = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef";
// txid = caaacc4826fdf63ad0a4093400de5f1fd0c830be0724078ac039f9b29878b76f.
const RAW_TX: &str = "0200000000010122f1294bc73da293dfe1a9088c6d26d71564bf538940c7ce9c4e6212f099c3b90000000000ffffffff011e272d0100000000160014af73f777fcd64ec6d9b22ac9e1a57e127ea169ee0247304402205fea552c7d5ed3330aa4a8b5c90a980c1d3bdc72abd13c2d7bccba91fbb978f5022027fac985cfb83339fc9227e1c653b8a824c63a49cda4f9f97d48d5c07e047608012102acc07439373cc2902d0ad6602ed6f5a1b7abdf7608d265c089160ac826a4600600000000";
#[tokio::test(flavor = "multi_thread")]
async fn client() {
const ZMQ_PORT: u16 = 6667;
// Create a ZeroMQ server.
let zmq_ctx = zmq::Context::new();
let socket = zmq_ctx.socket(zmq::SocketType::PUB).unwrap();
socket.bind(&format!("tcp://*:{}", ZMQ_PORT)).unwrap();
println!("ZeroMQ server created.");
// Run ZeroMQClient.
let client = ZeroMQClient::new(&format!("tcp://127.0.0.1:{}", ZMQ_PORT));
let mut rx = client.start().await;
// Wait before ZeroMQClient is ready.
client.wait_for_ready().await;
tokio::time::sleep(std::time::Duration::from_millis(100)).await;
// Send hashblock.
let block_hash = hex::decode(BLOCK_HASH).unwrap();
println!("Sending \"hashblock\"...");
socket.send_multipart(vec![
b"hashblock".to_vec(),
block_hash.clone(),
0u32.to_le_bytes().to_vec(),
], zmq::DONTWAIT).unwrap();
println!("Reading a message...");
assert!(rx.changed().await.is_ok());
assert_eq!(*rx.borrow(), HashBlock(consensus_decode(&block_hash)));
// Send rawtx.
let tx = hex::decode(RAW_TX).unwrap();
println!("Sending \"rawtx\"...");
socket.send_multipart(vec![
b"rawtx".to_vec(),
tx.clone(),
1u32.to_le_bytes().to_vec(),
], zmq::DONTWAIT).unwrap();
println!("Reading a message...");
assert!(rx.changed().await.is_ok());
assert_eq!(*rx.borrow(), RawTx(consensus_decode(&tx)));
// Stop.
client.wait_for_stop().await;
}
}
| rust |
A Passing Out Parade was held at INS Garuda, Kochi on 27 July 2018 for Qualified Navigation Instructor (QNI), 87th Regular Observer and 18th Short Service Commission Observer Courses. Commanding Officer INS Garuda reviewed the parade and awarded the ‘Instructor Badges’ to QNIs and the coveted ‘Wings’ to the officers of Observer Courses. Lieutenant Kailash Kabbur was awarded the Uttar Pradesh Trophy for standing ‘First in the Overall Order of Merit’ and Sub Lieutenant RV Kunte Memorial Book Prize for being adjudged ‘Best in Ground Subjects’ in the 87th Regular Course. While Lieutenant Parikshit Rao was awarded the Flag Officer Commanding-in-Chief, Eastern Naval Command Trophy for being adjudged ‘Best in Flying’. In the 18th SSC Observer course, Book prizes were awarded to Sub Lieutenant Akshaya for ‘Best in Flying’, Sub Lieutenant Shruti Sood for ‘Best in Overall Order of Merit’, Lieutenant Varsha Yadav for ‘Best in Ground Subjects’ and Lieutenant Pranav Kumar Pandey for ‘Best Project’.
| english |
Battlefield 2042 is set to receive its major Season 5 update on June 7. Recently Battlefield has released a new gameplay trailer revealing most of the content that fans expect in the upcoming 'New Dawn' update. With each new season, gamers will obtain a whole new battlepass, including free and premium rewards. And, based on what has been revealed, the battlepass will surely attract the fanbase.
Battlepass is a fantastic way to obtain high-quality items at a low cost. A BP has 100 tiers; as you go through them, you will unlock rewards such as new weapons, skins, weapon charms, and more. Players may look forward to giving their inventory a more luxurious appearance with the Season 5 New Dawn upgrade.
What's included in Battlefield 2042 Season 5: New Dawn's Battlepass?
The Season 4 battlepass is active and will expire on June 7, the same day the Season 5: New Dawn battlepass will be activated.
The Battlepass offers substantial prizes in weapon skins, Specialist skins, charms, and other items. Players can obtain 100 rewards, 30 of which are free battlepass awards and 70 of which are premium battlepass rewards.
Premium Battle Pass Rewards:
- Will have the opportunity to earn up to 1.300 BFC (In-game currency)
Some of the other rewards revealed in the recent gameplay trailer include:
- DXR-1 "Asymmetric" weapon skin (Unlocked at Tier 39)
- Avancys "Devoured" weapon skin (Unlocked at Tier 80)
- Dozer "Overthrower" Specialist skin (Unlocked at Tier 100)
Free Battle Pass Rewards:
Players who do not want to spend money can still obtain 30 rewards from the 100-tier Battle Pass. They will not be as appealing as the premium segment; however, the developers have designed some excellent skins for the free section.
Among the 30 rewards, users will receive three new weapons, three new gadgets, and five prominent items that include:
How much does the Battlefield 2042 Season 5: New Dawn Battle Pass cost?
The Premium Battle Pass does not require a significant investment from players. They will only need to invest 1000 BFC, which is $9.99. The Premium Bundle with 200 tier skip, on the other hand, costs 2,400 BFC, or $19.99.
| english |
<filename>pokemon/14/index.json
{
"number": "14",
"name": "Kakuna",
"generation": 1,
"description": "Nearly incapable of movement, it leans against stout trees while waiting for its evolution.",
"species": "Cocoon",
"types": [
"Bug",
"Poison"
],
"abilities": {
"normal": [
"Shed Skin"
],
"hidden": []
},
"height": "2'",
"weight": "22 lbs.",
"eggGroups": [
"Bug"
],
"gender": [
50,
50
],
"family": {
"id": 5,
"evolutionStage": 2,
"evolutionLine": [
"Weedle",
"Kakuna",
"Beedrill"
]
},
"sprites": {
"default": "https://pisaucer.github.io/staticmon/images/14.png",
"shiny": "https://pisaucer.github.io/staticmon/images/shiny/14.png"
},
"isStarter": false,
"isLegendary": false,
"isMythical": false,
"isUltraBeast": false,
"isMega": false
} | json |
<filename>src/packages/recompose/__tests__/renameProp-test.js
import test from 'ava'
import React from 'react'
import { withProps, renameProp, compose } from '../'
import { shallow } from 'enzyme'
test('renameProp renames a single prop', t => {
const StringConcat = compose(
withProps({ so: 123, la: 456 }),
renameProp('so', 'do')
)('div')
t.is(StringConcat.displayName, 'withProps(renameProp(div))')
const div = shallow(<StringConcat />).find('div')
t.deepEqual(div.props(), { do: 123, la: 456 })
})
| javascript |
/*
MIT License
Copyright (c) 2018 tkpphr
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
html {
height: 100%;
}
body {
height: 100%;
margin: 0;
}
h1 {
font-size: 2em;
}
header {
width: 100%;
height: 40px;
position: fixed;
border-bottom: solid 2px lightgray;
}
header > nav {
height: 100%;
}
section {
margin-left: 1em;
margin-right: 1em;
}
footer {
width: 100%;
position: absolute;
top: calc(100% - 30px);
left: 0;
bottom: 0;
right: 0;
display: flex;
justify-content: center;
align-items: center;
border-top: 2px solid lightgray;
}
.light-theme{
background:white;
color:black;
}
.dark-theme {
color: white;
background: #222222;
}
.center-aligned-wrapper {
display: flex;
align-items: center;
justify-content: center;
}
.right-aligned-wrapper {
display: flex;
justify-content: flex-end;
align-items: flex-end;
}
.margin-lt {
margin-left: 1em;
margin-top: 1em;
}
.margin-rt {
margin-right: 1em;
margin-top: 1em;
}
.margin-lb {
margin-left: 1em;
margin-bottom: 1em;
}
.margin-rb {
margin-right: 1em;
margin-bottom: 1em;
}
.margin-tb {
margin-top: 1em;
margin-bottom: 1em;
}
.margin-lr {
margin-left: 1em;
margin-right: 1em;
}
.padding-lt {
padding-left: 1em;
padding-top: 1em;
}
.padding-rt {
padding-right: 1em;
padding-top: 1em;
}
.padding-lb {
padding-left: 1em;
padding-bottom: 1em;
}
.padding-rb {
padding-right: 1em;
padding-bottom: 1em;
}
.padding-tb {
padding-top: 1em;
padding-bottom: 1em;
}
.padding-lr {
padding-left: 1em;
padding-right: 1em;
}
.container {
width: 100%;
height: 100%;
position: relative;
}
.content {
width: 100%;
position: absolute;
top: 42px;
left: 0;
bottom: 28px;
right: 0;
overflow: auto;
}
.container a {
text-decoration: none;
color: cornflowerblue;
}
.container a:hover {
text-decoration: underline;
}
.side-bar {
width: 250px;
height: 100%;
float: left;
overflow: auto;
border-right: 2px solid lightgray;
}
.side-bar > h1 {
width: 100%;
text-align: center;
}
.main-content {
width: calc(100% - 252px);
height: 100%;
float: right;
overflow: auto;
}
.modal-background {
width: 100%;
height: 100%;
background: rgba(100,100,100,0.7);
z-index: 1002;
position: absolute;
top: 0;
visibility: hidden;
display: flex;
justify-content: center;
align-items: center;
}
.modal-foreground {
padding: 2em;
border-radius: 5px;
position: relative;
}
.modal-head {
width: 100%;
height: 48px;
border-bottom: solid 2px lightblue;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
text-align: center;
font: bold 18px sans-serif;
}
.modal-head > div {
display: flex;
justify-content: center;
align-items: center;
}
.modal-head > div:nth-child(1) {
width: calc(100% - 96px);
height: 100%;
float: left;
}
.modal-head > div:nth-child(2) {
width: 96px;
height: 100%;
float: right;
display: flex;
align-items: center;
justify-content: center;
}
.modal-body {
position: absolute;
top: 50px;
left: 0;
right: 0;
bottom: 0;
margin: 5px;
overflow: auto;
}
@media screen and (max-width:768px) {
.modal-body::-webkit-scrollbar {
width: 8px;
background: #9aadfc;
}
.modal-body::-webkit-scrollbar:horizontal {
width: 8px;
background: #9aadfc;
}
.modal-body::-webkit-scrollbar-thumb {
background: darkgray;
}
.modal-body::-webkit-scrollbar-thumb:horizontal {
background: darkgray;
}
.modal-body::-webkit-scrollbar-track-piece:start {
background: lightgray;
}
.modal-body::-webkit-scrollbar-track-piece:end {
background: lightgray;
}
.modal-body::-webkit-scrollbar-corner {
background: transparent;
}
}
nav.top-menu {
margin-left: 20px;
display: flex;
align-items: center;
overflow: auto;
}
nav.top-menu > a {
font: bold 18px sans-serif;
}
nav.top-menu > .logo {
width: 32px;
height: 32px;
object-fit: cover;
}
nav.top-menu > a {
text-decoration: none;
margin-left: 10px;
color: black;
padding: 4px;
}
nav.top-menu > a:hover {
text-decoration: none;
background: dodgerblue;
border-radius: 5px;
color: white;
}
nav.top-menu > .selected {
text-decoration: none;
background: dodgerblue;
border-radius: 5px;
color: white;
}
.aspect-fill {
max-width: 90%;
height: auto;
margin: 5%;
}
.button {
color: cornflowerblue;
padding: 5px;
cursor: pointer;
font: bold 16px sans-serif;
border-radius: 5px;
user-select: none;
}
@media screen and (orientation: portrait) {
.landscape-only{
display: none;
}
}
@media screen and (orientation: landscape) {
.portrait-only{
display: none;
}
} | css |
---
title: 'Committees'
date: '2020-09-22T22:12:03.284Z'
path: '/call-workshops/'
type: call-workshops
---
EDOC is the key forum for researchers and practitioners in the field of enterprise
computing. Since 1997, EDOC conferences address the full range of models,
methodologies, and engineering technologies contributing to intra- and
inter-enterprise application systems.
The main conference is accompanied with a number of workshops prior to the main event. They provide an excellent forum for smaller groups of industry experts, researchers, consumers and other interested parties, to discuss specific topics of interest, in a less formal structure than the main conference. The ultimate goal is to develop common understanding of the challenges, possible solutions and stimulate longer term collaboration of participants. These workshops can focus on the established technologies in new application areas, or even new areas of inquiries, some of which are listed next.
- Enterprise Architecture
- Interoperability, Federation and Integration
- Service-Oriented Architectures
- Software Architecture and Engineering
- Model-Driven Engineering
- Digital Twins
- Enterprise security, information privacy and consent
- Distributed Ledgers and Smart Contracts
- Business Process and Business rules
- Advanced analytics and AI for business and consumer applications
- Semantics and Information Management
- Digital Ethics, Law and Human Rights
- Community trust, resilience, and responsibility - AI concerns
- Human Machine Ecology - Challenges and Opportunities
The theme of EDOC 2021 is **Industry 4.0** – a very exciting and active research field.
We invite you to submit proposals for one-day or half-day workshops, physical or virtual, focusing on
these topics as well as emerging and interdisciplinary topics related to
enterprise computing in general, or in domains such as healthcare,
advanced manufacturing, environmental sciences, sustainable agriculture,
finance, transportation, Aerospace and Defence, energy and supply chains, while ensuring compliance
with the related human rights, ethics and legal challenges and longer-term
interoperability strategies. Both research and application-oriented
topics are welcome.
The EDOC workshops are intended to animate a lively discussion of innovative
ideas, recent progress, or practical approaches and applications. Each workshop will
provide a collaborative forum for a group of typically 15 to 30 participants to
exchange recent and/or preliminary results, to conduct intensive discussions on a
particular topic, or to coordinate efforts between representatives of a technical
community.
We encourage workshops organizers to propose various workshop
format and be creative when structuring their workshop programs and CfPs.
Next to
paper presentations, workshops can be also enriched by invited practitioners or
research talks, by discussion and working groups as well as demonstrations etc.
Related idea/vision or short papers do not have to be included in the IEEE workshop
proceedings. Workshops organizers will have the chance to select the type of
proceedings (e.g. IEEE, post-proceedings, etc.) based on the types of contributions.
<div style="font-size:18pt;">Important Dates</div>
- Paper submission deadline: 16 August 2021
- Notification of acceptance: 13 September 2021
- Camera ready paper: 27 September 2021
- Conference registration: 27 September 2021
<div style="font-size:18pt;">Workshop Proposal Guidelines</div>
Your proposal document must contain the following information:
1. Title of the workshop
2. Proposed duration of the workshop (full-day or half-day)
3. Name, affiliation, and e-mail addresses of the workshop chairs
4. Extended abstract (500-1000 words) explaining the workshop topics and their fit
with the EDOC conference, intended audience, organization/format of the
workshop: Specify the type of contributions, distribution into sessions, type of
sessions you intend to solicit and other relevant details.
5. Preliminary Call for Papers, including:
* Workshop description, background and goals;
* List of topics
- Preliminary list of program committee members
- Information about distribution channels (e.g., mailing lists, web-site, direct mailings
to past presenters, other direct mailings) that will be used for advertising the
workshop
6. History of the workshop (if it was held before) with some statistics
7. Short biographies of workshop chairs.
<div style="font-size:18pt;">Submissions</div>
Please ensure that you adhere to the above workshop proposal guidelines providing
all requested information using at most six pages. The proposal must be submitted
as a PDF file to the workshop chairs.
<div style="font-size:18pt;">Proceedings</div>
The workshop proceedings will be published by default by IEEE or depending on the
types of contributions in other outlets as selected by the workshop organizers; a
mixed model is also acceptable.
<div style="font-size:18pt;">Workshop Chairs</div>
<NAME> (<EMAIL>)<br/>
<NAME> (<EMAIL>)<br/>
<NAME> (<EMAIL>)
For further information, please send an email to the workshop committee chairs or
visit the EDOC website.
| markdown |
<filename>src/main/java/com/termersetzung/termersetzung/model/entities/Student.java<gh_stars>1-10
package com.termersetzung.termersetzung.model.entities;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import javax.persistence.*;
import java.util.List;
/**
* Student
*/
@Entity
public class Student {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
@Column
private String firstname;
@Column
private String lastname;
@Column
private int studentNumber;
@JsonManagedReference(value = "studentExercise")
@OneToMany(fetch = FetchType.LAZY, mappedBy = "student", cascade = CascadeType.ALL)
private List<StudentExercise> studentExercises;
@JsonManagedReference(value = "studentExam")
@OneToMany(fetch = FetchType.LAZY, mappedBy = "student", cascade = CascadeType.ALL)
private List<StudentExam> studentExams;
public Student() {
}
public Student(int id, String firstname, String lastname, int studentNumber, List<StudentExercise> studentExercises, List<StudentExam> studentExams) {
this.id = id;
this.firstname = firstname;
this.lastname = lastname;
this.studentNumber = studentNumber;
this.studentExercises = studentExercises;
this.studentExams = studentExams;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getStudentNumber() {
return studentNumber;
}
public void setStudentNumber(int studentNumber) {
this.studentNumber = studentNumber;
}
public String getFirstname() {
return firstname;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
public String getLastname() {
return lastname;
}
public void setLastname(String lastname) {
this.lastname = lastname;
}
public List<StudentExercise> getStudentExercises() {
return studentExercises;
}
public void setStudentExercises(List<StudentExercise> studentExercises) {
this.studentExercises = studentExercises;
}
public List<StudentExam> getStudentExams() {
return studentExams;
}
public void setStudentExams(List<StudentExam> studentExams) {
this.studentExams = studentExams;
}
}
| java |
{
"resources":{
"includes":[
{
"pattern":"\\QMETA-INF/services/ai.djl.engine.EngineProvider\\E"
},
{
"pattern":"\\QMETA-INF/services/ai.djl.repository.zoo.ZooProvider\\E"
},
{
"pattern":"\\QMETA-INF/services/io.smallrye.config.SmallRyeConfigFactory\\E"
},
{
"pattern":"\\QMETA-INF/services/org.eclipse.microprofile.config.spi.Converter\\E"
},
{
"pattern":"\\Qapplication.properties\\E"
},
{
"pattern":"\\Qcom/sun/jna/linux-x86-64/libjnidispatch.so\\E"
},
{
"pattern":"\\Qjnilib/pytorch.properties\\E"
},
{
"pattern":"\\Qorg/jboss/threads/Version.properties\\E"
},
{
"pattern":"\\Qorg/slf4j/impl/StaticLoggerBinder.class\\E"
},
{
"pattern":"\\Qquarkus-runtime-config-defaults.properties\\E"
},
{
"pattern":"\\Qsoftware/amazon/awssdk/services/s3/execution.interceptors\\E"
}
]},
"bundles":[{
"name":"sun.awt.resources.awt"
}]
}
| json |
import { Document } from 'mongoose';
export interface IGrupoOperaciones extends Document {
_id?: string;
nombre: string;
activo: boolean;
createdDate: string;
} | typescript |
import * as core from '@actions/core'
import * as exec from '@actions/exec'
import {ExecOptions} from '@actions/exec/lib/interfaces'
import * as io from '@actions/io'
import * as cp from 'child_process'
import * as tc from '@actions/tool-cache'
import * as fs from 'fs'
import * as fetch from 'node-fetch'
import * as os from 'os'
import * as path from 'path'
import * as semver from 'semver'
export const EDGEDB_PKG_ROOT = 'https://packages.edgedb.com'
const EDGEDB_PKG_IDX = `${EDGEDB_PKG_ROOT}/archive/.jsonindexes`
export async function run(): Promise<void> {
const cliVersion = core.getInput('cli-version')
let serverVersion: string | null = core.getInput('server-version')
if (serverVersion === '' || serverVersion === 'none') {
serverVersion = null
}
let projectLink: string | null = core.getInput('project-link')
if (projectLink === '' || projectLink === 'false') {
projectLink = null
}
let instanceName: string | null = core.getInput('instance-name')
if (instanceName === '') {
instanceName = null
}
try {
const cliPath = await installCLI(cliVersion)
if (projectLink) {
core.addPath(cliPath)
await linkProject(projectLink, instanceName)
return
}
if (serverVersion) {
const serverPath = await installServer(serverVersion, cliPath)
core.addPath(serverPath)
core.addPath(cliPath)
const runstateDir = generateRunstateDir()
if (isRunningInsideProject()) {
await initProject(instanceName, serverVersion, runstateDir)
core.setOutput('runstate-dir', runstateDir)
} else if (instanceName) {
await createNamedInstance(instanceName, serverVersion, runstateDir)
core.setOutput('runstate-dir', runstateDir)
}
} else {
core.addPath(cliPath)
}
} catch (error) {
core.setFailed(error.message)
}
}
async function installServer(
requestedVersion: string | null,
cliPath: string
): Promise<string> {
const options: ExecOptions = {
silent: true,
listeners: {
stdout: (data: Buffer) => {
core.debug(data.toString().trim())
},
stderr: (data: Buffer) => {
core.debug(data.toString().trim())
}
}
}
const cmdline = []
const cli = path.join(cliPath, 'edgedb')
if (requestedVersion === 'nightly') {
cmdline.push('--nightly')
} else if (requestedVersion && requestedVersion !== 'stable') {
cmdline.push('--version')
cmdline.push(requestedVersion)
}
const installCmdline = ['server', 'install'].concat(cmdline)
core.debug(`Running ${cli} ${installCmdline.join(' ')}`)
await exec.exec(cli, installCmdline, options)
let serverBinPath = ''
const infoOptions: ExecOptions = {
silent: true,
listeners: {
stdout: (data: Buffer) => {
serverBinPath = data.toString().trim()
},
stderr: (data: Buffer) => {
core.debug(data.toString().trim())
}
}
}
if (cmdline.length === 0) {
cmdline.push('--latest')
}
const infoCmdline = ['server', 'info', '--bin-path'].concat(cmdline)
core.debug(`Running ${cli} ${infoCmdline.join(' ')}`)
await exec.exec(cli, infoCmdline, infoOptions)
serverBinPath = fs.realpathSync(serverBinPath)
return path.dirname(serverBinPath)
}
async function installCLI(requestedCliVersion: string): Promise<string> {
const arch = os.arch()
const includeCliPrereleases = true
let cliVersionRange = '*'
let dist = getBaseDist(arch, os.platform())
if (requestedCliVersion === 'nightly') {
dist += '.nightly'
} else if (requestedCliVersion !== 'stable') {
cliVersionRange = requestedCliVersion
}
const versionMap = await getVersionMap(dist)
const matchingVer = await getMatchingVer(
versionMap,
cliVersionRange,
includeCliPrereleases
)
let cliDirectory = tc.find('edgedb-cli', matchingVer, arch)
if (!cliDirectory) {
const cliPkg = versionMap.get(matchingVer)
const downloadUrl = new URL(cliPkg.installref, EDGEDB_PKG_ROOT).href
core.info(
`Downloading edgedb-cli ${matchingVer} - ${arch} from ${downloadUrl}`
)
const downloadPath = await tc.downloadTool(downloadUrl)
fs.chmodSync(downloadPath, 0o755)
cliDirectory = await tc.cacheFile(
downloadPath,
'edgedb',
'edgedb-cli',
matchingVer,
arch
)
}
return cliDirectory
}
export async function getMatchingVer(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
versionMap: Map<string, any>,
cliVersionRange: string,
includeCliPrereleases: boolean
): Promise<string> {
const versions = Array.from(versionMap.keys()).filter(ver =>
semver.satisfies(ver, cliVersionRange, {
includePrerelease: includeCliPrereleases
})
)
versions.sort(semver.compareBuild)
if (versions.length > 0) {
return versions[versions.length - 1]
} else {
throw Error(
'no published EdgeDB CLI version matches requested version ' +
`'${cliVersionRange}'`
)
}
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export async function getVersionMap(dist: string): Promise<Map<string, any>> {
const indexRequest = await fetch.default(`${EDGEDB_PKG_IDX}/${dist}.json`)
const index = await indexRequest.json()
const versionMap = new Map()
for (const pkg of index.packages) {
if (pkg.name !== 'edgedb-cli') {
continue
}
if (
!versionMap.has(pkg.version) ||
versionMap.get(pkg.version).revision < pkg.revision
) {
versionMap.set(pkg.version, pkg)
}
}
return versionMap
}
export function getBaseDist(arch: string, platform: string): string {
let distArch = ''
let distPlatform = ''
if (platform === 'linux') {
distPlatform = platform
} else if (platform === 'darwin') {
distPlatform = 'macos'
} else {
throw Error(`This action cannot be run on ${platform}`)
}
if (arch === 'x64') {
distArch = 'x86_64'
} else {
throw Error(`This action does not support the ${arch} architecture`)
}
return `${distPlatform}-${distArch}`
}
async function linkProject(
dsn: string,
instanceName: string | null
): Promise<void> {
instanceName = instanceName || generateIntanceName()
const cli = 'edgedb'
const options: ExecOptions = {
silent: true,
listeners: {
stdout: (data: Buffer) => {
core.debug(data.toString().trim())
},
stderr: (data: Buffer) => {
core.debug(data.toString().trim())
}
}
}
const instanceLinkCmdLine = [
'instance',
'link',
'--non-interactive',
'--trust-tls-cert',
'--dsn',
dsn,
instanceName
]
core.debug(`Running ${cli} ${instanceLinkCmdLine.join(' ')}`)
await exec.exec(cli, instanceLinkCmdLine, options)
const projectLinkCmdLine = [
'project',
'init',
'--non-interactive',
'--link',
'--server-instance',
instanceName
]
core.debug(`Running ${cli} ${projectLinkCmdLine.join(' ')}`)
await exec.exec(cli, projectLinkCmdLine, options)
}
async function initProject(
instanceName: string | null,
serverVersion: string,
runstateDir: string
): Promise<void> {
instanceName = instanceName || generateIntanceName()
const cli = 'edgedb'
const options: ExecOptions = {
silent: true,
env: {
XDG_RUNTIME_DIR: runstateDir
},
listeners: {
stdout: (data: Buffer) => {
core.debug(data.toString().trim())
},
stderr: (data: Buffer) => {
core.debug(data.toString().trim())
}
}
}
const cmdOptionsLine = [
'--non-interactive',
'--server-start-conf',
'manual',
'--server-instance',
instanceName
]
if (serverVersion && serverVersion !== 'stable') {
cmdOptionsLine.push('--server-version', serverVersion)
}
const cmdLine = ['project', 'init'].concat(cmdOptionsLine)
core.debug(`Running ${cli} ${cmdLine.join(' ')}`)
await exec.exec(cli, cmdLine, options)
await startInstance(instanceName, runstateDir)
}
async function createNamedInstance(
instanceName: string,
serverVersion: string,
runstateDir: string
): Promise<void> {
const cli = 'edgedb'
const options: ExecOptions = {
silent: true,
env: {
XDG_RUNTIME_DIR: runstateDir
},
listeners: {
stdout: (data: Buffer) => {
core.debug(data.toString().trim())
},
stderr: (data: Buffer) => {
core.debug(data.toString().trim())
}
}
}
const cmdOptionsLine = ['--start-conf', 'manual']
if (serverVersion === 'nightly') {
cmdOptionsLine.push('--nightly')
} else if (serverVersion && serverVersion !== 'stable') {
cmdOptionsLine.push('--version', serverVersion)
}
const cmdLine = ['instance', 'create', instanceName].concat(cmdOptionsLine)
core.debug(`Running ${cli} ${cmdLine.join(' ')}`)
await exec.exec(cli, cmdLine, options)
await startInstance(instanceName, runstateDir)
}
async function startInstance(
instanceName: string,
runstateDir: string
): Promise<void> {
const cli = 'edgedb'
const options: ExecOptions = {
env: {
XDG_RUNTIME_DIR: runstateDir
}
}
const cmdLine = ['instance', 'start', '--foreground', instanceName]
core.debug(`Running ${cli} ${cmdLine.join(' ')} in background`)
await backgroundExec(cli, cmdLine, options)
}
function isRunningInsideProject(): boolean {
try {
fs.accessSync('edgedb.toml')
return true
} catch (error) {
return false
}
}
function generateIntanceName(): string {
const start = 1000
const end = 9999
const suffix = Math.floor(Math.random() * (end - start) + start)
return `ghactions_${suffix}`
}
function generateRunstateDir(): string {
return fs.mkdtempSync(path.join(os.tmpdir(), 'edgedb-server-'))
}
async function backgroundExec(
command: string,
args: string[],
options: ExecOptions
): Promise<void> {
command = await io.which(command, true)
const spawnOptions: cp.SpawnOptions = {
stdio: 'ignore',
detached: true,
env: options.env
}
const serverProcess = cp.spawn(command, args, spawnOptions)
serverProcess.unref()
}
| typescript |
package chip8
// Start is the memory address the program counter first points to.
const Start = 0x0200
// nextOpcode gets the next opcode from memory.
func (c *Chip8) nextOpcode() uint16 {
var oc uint16
oc = uint16(c.mem[c.pgCtr])
oc <<= 8
oc |= uint16(c.mem[c.pgCtr+1])
c.pgCtr += 2
return oc
}
// clearMem clears the registers, stack, and memory.
func (c *Chip8) clearMem() {
c.mem = [4096]byte{}
c.reg = [16]byte{}
for {
_, err := c.stack.Pop()
if err != nil {
break
}
}
}
// GetMem returns the memory.
func (c *Chip8) GetMem() [4096]byte {
return c.mem
}
| go |
<reponame>Naivis24/siteVitrine
/* GENERAL */
html {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale
}
body {
font-family: 'Lato';
font-size: 17px;
font-weight: 300;
color: #333745;
background: -webkit-gradient(linear, left top, right top, from(#f4efeb), to(#fbf8f6));
background: -webkit-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: -o-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: linear-gradient(to right, #f4efeb 0%, #fbf8f6 100%);
}
a {
text-decoration: none;
cursor: pointer;
-moz-transition: 0.5s;
-webkit-transition: 0.5s;
-ms-transition: 0.5s;
-o-transition: 0.5s;
transition: 0.5s;
}
a:hover {
text-decoration: none;
}
a img {
border: none
}
a:link {
color: #333745
}
a:visited {
color: #333745
}
a:active, a:focus {
text-decoration: none
}
a:not([href]):not([tabindex]):focus, a:not([href]):not([tabindex]):hover{
color: #FFF;
}
.btn:focus {
box-shadow: none;
}
.btn:active {
box-shadow: none;
}
h1 {
font-weight: 900;
font-size: 48px;
margin-bottom: 30px;
margin-top: 30px;
}
h2 {
font-weight: 900;
font-size: 30px;
margin-bottom: 30px;
margin-top: 30px;
}
h3 {
font-weight: 900;
font-size: 23px;
color: #FE5F55;
margin-bottom: 10px;
margin-top: 40px;
}
h4 {
line-height: 42px;
text-align: center;
font-weight: 900;
font-size: 40px;
margin-bottom: 80px;
}
h5 {
color: #333745;
font-family: "Old Standard TT";
font-size: 27px;
line-height: 33px;
margin-left: 40px;
}
h6 {
font-family: 'Old Standard TT';
font-size: 20px;
padding-top: 20px;
}
p {
line-height: 27px;
}
input[type=checkbox] {
-webkit-appearance: none!important;
-moz-appearance: none!important;
-ms-appearance: none!important;
}
input[type=checkbox] {
border-radius: 2px;
height: 12px;
width: 12px;
background: #fff;
border: 1px solid #333745;
}
input[type="checkbox"]:checked {
background: #FE5F55;
border:none;
}
.form-check-input{
margin-left:-1.5rem;
}
.form-check{
padding-top:0.25rem;
}
input:focus, textarea:focus, select:focus {
outline-offset: 0px !important;
outline: none !important;
}
/* HEADER */
.logo img {
height: 100px;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
.navbar {
padding: 1rem 5rem;
position: fixed;
z-index: 100;
width: 100%;
background: -webkit-gradient(linear, left top, right top, from(#f4efeb), to(#fbf8f6));
background: -webkit-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: -o-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: linear-gradient(to right, #f4efeb 0%, #fbf8f6 100%);
top: 0px;
overflow: hidden;
z-index: 1030;
width: 100%;
left: 0px;
top: 0px;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
.navbar-collapse {
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
.container-brand {
top: 400px;
position: absolute;
font-weight: 700;
color: #333745;
}
.container-back {
position: absolute;
top: 400px;
}
.navbar.scroll .container-brand {
top: 400px;
position: absolute;
}
.navbar.scroll .container-back {
top: 400px;
position: absolute;
}
.navbar.scroll .container-action {
top: 400px;
position: absolute;
}
.container-action {
top: 400px;
position: absolute;
}
.navbar-light .navbar-brand {
font-family: "Old Standard TT";
font-size: 17px;
line-height: 21px;
color: #333745;
}
.nav-link {
text-align: center;
}
.navbar-expand-lg .navbar-nav .nav-link {
padding-right: 1rem;
padding-left: 1rem;
}
.navbar-light .navbar-nav .nav-link {
color: #333745;
text-align: center;
}
.dropdown-item:focus, .dropdown-item:hover {
color: #FE5F55;
font-weight: 700;
}
.navbar-light .navbar-toggler {
color: #333745;
border-color: #333745;
border-width: 2px;
}
.navbar-light .navbar-toggler-icon {
background-image : url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#333745' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
.dropdown-menu {
position: relative;
background: #FFF;
border-color: #FFF;
box-shadow: 0 0 6px 0 rgba(0,0,0,0.1);
margin: 0;
border-radius: 0;
}
.dropdown-menu:after {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 0;
height: 0;
border: 15px solid transparent;
border-bottom-color: #FFF;
border-top: 0;
margin-left: -10px;
margin-top: 35px;
}
.dropdown-item {
text-align: center;
-moz-transition: 0s;
-webkit-transition: 0s;
-ms-transition: 0s;
-o-transition: 0s;
transition: 0s;
font-size: 14px;
}
@media (min-width: 992px) {
.navbar-expand-lg .navbar-nav .dropdown-menu:after {
content: '';
position: absolute;
top: 0;
left: 30%;
width: 0;
height: 0;
border: 15px solid transparent;
border-bottom-color: #FFF;
border-top: 0;
margin-left: -10px;
margin-top: -10px;
}
.navbar-expand-lg .navbar-nav .dropdown-menu {
width: 100%;
}
.dropdown-item {
text-align: left;
}
.navbar {
background: none;
padding: 1rem 5rem;
}
.logo.scroll img {
height: 60px;
}
.navbar.scroll {
background: -webkit-gradient(linear, left top, right top, from(#f4efeb), to(#fbf8f6));
background: -webkit-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: -o-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: linear-gradient(to right, #f4efeb 0%, #fbf8f6 100%);
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.1);
height: 100px;
}
.navbar.scroll .navbar-collapse {
-webkit-transform: translateY(-100px);
-moz-transform: translateY(-100px);
-ms-transform: translateY(-100px);
-o-transform: translateY(-100px);
transform: translateY(-100px);
}
.container-brand {
position: absolute;
top: 200px;
left: 150px;
color: #333745;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
.navbar.scroll .container-brand {
position: absolute;
top: 125px;
left: 150px;
display: block;
-webkit-transform: translateY(-100px);
-moz-transform: translateY(-100px);
-ms-transform: translateY(-100px);
-o-transform: translateY(-100px);
transform: translateY(-100px);
}
.container-back {
position: absolute;
top: 400px;
left: 50%;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
color: #FE5F55;
}
.navbar.scroll .container-back {
position: absolute;
top: 135px;
left: 49%;
display: block;
-webkit-transform: translateY(-100px);
-moz-transform: translateY(-100px);
-ms-transform: translateY(-100px);
-o-transform: translateY(-100px);
transform: translateY(-100px);
}
.container-action {
position: absolute;
right: 80px;
top: 200px;
color: #f4efeb;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
.navbar.scroll .container-action {
position: absolute;
top: 130px;
right: 80px;
display: block;
-webkit-transform: translateY(-100px);
-moz-transform: translateY(-100px);
-ms-transform: translateY(-100px);
-o-transform: translateY(-100px);
transform: translateY(-100px);
}
}
.dropdown:hover .dropdown-menu {
display: block;
}
.dropdown-item:focus, .dropdown-item:hover {
background: none;
}
.button-fc {
border: 2px solid #333745;
border-radius: 5px;
text-transform: uppercase;
font-size: 13px;
font-weight: bold;
font-family: Lato;
line-height: 16px;
text-align: center;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
color: #333745;
}
.button-fc:hover {
background-color: #333745;
color: #f4efeb;
}
.navbar.scroll .button-fc {
background-color: #333745;
color: #f4efeb;
}
.navbar.scroll .button-fc:hover {
background-color: #f4efeb;
color: #333745;
}
/* CONTENT */
.container {
padding: 2rem;
}
.container-text {
margin-left: 50px;
margin-right: 50px;
}
.padding-start{
padding-top: 8rem;
}
/* HOME */
.bg1 {
background-image: url("../img/background_1.jpg");
background-size: cover;
padding-top: 8rem;
padding-bottom: 6rem;
}
.bg2 {
background-image: url("../img/background_2.jpg");
background-size: cover;
padding-top: 8rem;
padding-bottom: 4rem;
}
.home1 {
background: -webkit-gradient(linear, left top, right top, from(#f4efeb), to(#fbf8f6));
background: -webkit-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: -o-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: linear-gradient(to right, #f4efeb 0%, #fbf8f6 100%);
padding-top: 4rem;
padding-bottom: 4rem;
}
.home2 {
background-color: #fff;
padding-top: 3rem;
padding-bottom: 3rem;
}
.home-box {
border: 4px #FE5F55 solid;
}
.container-next{
text-align: center;
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-animation-name: fadeInDown;
animation-name: fadeInDown;
-webkit-animation-iteration-count: 2;
-moz-animation-iteration-count: 2;
animation-iteration-count: 2;
}
@keyframes fadeInDown {
0% {
-webkit-transform:translateY(0px);
-ms-transform:translateY(0px);
transform:translateY(0px)
}
50% {
-webkit-transform:translateY(20px);
-ms-transform:translateY(20px);
transform:translateY(20px)
}
100% {
-webkit-transform:translateY(0px);
-ms-transform:translateY(0px);
transform:translateY(0px)
}
}
@-webkit-keyframes fadeInDown {
0% {
-webkit-transform:translateY(0px);
-ms-transform:translateY(0px);
transform:translateY(0px)
}
50% {
-webkit-transform:translateY(20px);
-ms-transform:translateY(20px);
transform:translateY(20px)
}
100% {
-webkit-transform:translateY(0px);
-ms-transform:translateY(0px);
transform:translateY(0px)
}
}
@-moz-keyframes fadeInDown {
0% {
-webkit-transform:translateY(0px);
-ms-transform:translateY(0px);
transform:translateY(0px)
}
50% {
-webkit-transform:translateY(20px);
-ms-transform:translateY(20px);
transform:translateY(20px)
}
100% {
-webkit-transform:translateY(0px);
-ms-transform:translateY(0px);
transform:translateY(0px)
}
}
.container-next img{
height:30px;
}
.slide-home ul{
list-style:none;
padding-left:0;
}
.slide-home li{
text-align:left;
margin-top:10px;
font-size:18px;
background-image: url('../img/checked.svg');
background-repeat: no-repeat;
padding-left: 1.8em;
background-size: 17px;
background-position: 0 6px;
}
.picto-text {
color: #FE5F55;
font-family: "Old Standard TT";
font-size: 27px;
margin-top: 10px;
}
.picto-img {
width: 80px;
}
.title-home-picto h5 {
margin-left: 0;
font-size: 30px;
}
.big-icon {
color: #FE5F55;
font-size: 50px;
position: absolute;
bottom: 0px;
left: -25px;
}
.container-btn {
margin-top: 3rem;
text-align: left;
}
.bg2 .container-btn {
margin-bottom: 4rem;
}
.button-fh {
border: 2px solid #333745;
border-radius: 5px;
text-transform: uppercase;
font-weight: bold;
font-family: 'Lato';
text-align: center;
text-decoration: none;
display: inline-block;
vertical-align: top;
padding: 17px 33px;
font-size: 16px;
cursor: pointer;
background: none;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
.button-fh:hover {
background-color: #333745;
color: #FFF;
}
.container-wt {
background-color: #fff;
position: absolute;
left: -3rem;
height: 80px;
padding: 20px 0px;
width: 400px;
}
.container-wtx {
padding-top: 50px;
}
@media (max-width: 992px) {
.container-wt {
width: 300px;
}
.container-wt h4 {
font-size: 30px;
}
}
/* OFFRES MARQUES */
#section-offers{
padding-top: 4rem;
padding-bottom: 4rem;
}
#section-offers h3{
font-family: 'Old Standard TT';
font-size: 35px;
text-align: center;
color: #333745;
margin-bottom: 3rem;
}
#section-offers h4{
font-size:18px;
margin:0.5rem;
line-height: normal;
font-weight: 700;
}
#section-offers .card{
background:linear-gradient(to bottom, #f4efeb 0%, #fbf8f6 100%);
background:-webkit-gradient(linear, left top, left bottom, from(#f4efeb 0%), to(#fbf8f6 100%));
background:-webkit-linear-gradient(top, #f4efeb 0%, #fbf8f6 100%);
background: -o-linear-gradient(top, #f4efeb 0%, #fbf8f6 100%);
}
#section-offers .card-footer{
background-color: transparent;
}
.brand-offers h1{
text-align: center;
}
.brand-offers h2{
font-weight: 300;
text-align: center;
}
.brand-offers-detail h3{
margin-top:10px;
margin-bottom: 30px;
}
.brand-offers-detail .row{
margin-top:3rem;
}
.brand-offers-detail ul{
list-style:none;
padding-left:0;
}
.container-picto-offers{
height: 120px;
width: 120px;
border: 3px solid #FE5F55;
border-radius: 50%;
padding:10px;
}
.container-picto-offers img{
height: 100%;
width: 100%;
}
.brand-offers-detail li{
text-align:left;
margin-top:10px;
font-size:17px;
background-image: url('../img/checked.svg');
background-repeat: no-repeat;
padding-left: 1.4em;
background-size: 10px;
background-position: 0 10px;
}
.brand-offers ul{
list-style:none;
padding-left:0;
}
.brand-offers li{
text-align:left;
margin-top:10px;
font-size:15px;
background-image: url('../img/checked.svg');
background-repeat: no-repeat;
padding-left: 1.8em;
background-size: 17px;
background-position-y: center;
}
.brand-offers .picto-text {
color: #FE5F55;
font-family: "Lato";
font-size: 20px;
margin-top: 10px;
font-weight: 700;
}
.brand-offers .picto-img {
width: 80px;
}
.picto-offers {
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
.picto-offers:hover {
transform: scale(1.025);
}
.button-fbd {
border: 2px solid #333745;
border-radius: 5px;
text-transform: uppercase;
font-weight: bold;
font-family: 'Lato';
text-align: center;
text-decoration: none;
display: inline-block;
vertical-align: top;
padding: 10px 45px;
font-size: 16px;
cursor: pointer;
background: none;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
.button-fbd:hover {
background-color: #333745;
color: #FFF;
}
/* CRM OFFER */
.crm-offer h1{
text-align: center;
}
.line-tools{
border-top: 1px #d7d2ce solid;
text-align: center;
}
.line-tools-point{
position: absolute;
left:40%;
top:-45px;
background-color: #f4efeb;
width:20%;
border-radius: 30px;
}
.line-tools h2{
font-size: 20px;
margin: 0;
}
.line-tools-text{
position: absolute;
left:40%;
top:-45px;
}
.tools-detail h2{
text-align: center;
}
/* PRICES */
.pricebg {
background: -webkit-gradient(linear, left top, right top, from(#f4efeb), to(#fbf8f6));
background: -webkit-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: -o-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: linear-gradient(to right, #f4efeb 0%, #fbf8f6 100%);
padding-top: 6rem;
padding-bottom: 3rem;
}
.pricebg h1 {
text-align: center;
}
.card-img-price {
width: 30%;
margin-top: 2rem;
margin-bottom: 1rem;
}
.card-price h2 {
margin-top: 0;
margin-bottom: 1rem;
font-size: 17px;
font-weight: 700;
text-transform: uppercase;
}
.price-num {
font-size: 30px;
line-height: 38px;
text-transform: uppercase;
display: inline-block;
vertical-align: bottom;
margin-right: 4px;
font-weight: 700;
}
.card-text {
font-size: 14px;
color: #333745;
}
.card-price-list{
margin-top: 2rem;
}
.scale-best{
transform: scale(1.05);
z-index:1020;
}
.stick-update{
font-size:10px;
color: #FE5F55;
font-weight: 700;
transform: rotate(30deg);
position: absolute;
}
.overlay-top{
background-color:#FE5F55;
text-align:center;
position:absolute;
width:100%;
color:#FFF;
font-weight:700;
border-top-left-radius:.25rem;
border-top-right-radius:.25rem;
}
.card-footer {
background-color: #FFF;
border: none;
margin-bottom: 2rem;
}
.card-deck {
margin-top: 4rem;
}
.card {
border: none;
}
.offer-first {
color: #77CE44;
}
.offer-second {
color: #06B4FE;
}
.offer-third {
color: #F98D5E;
}
.offer-four {
color: #6F738C;
}
.card-price ul{
list-style:none;
padding-left:0;
}
.card-price li{
text-align:left;
margin-top:10px;
font-size:15px;
background-image: url('../img/checked.svg');
background-repeat: no-repeat;
padding-left: 1.8em;
background-size: 17px;
background-position-y: center;
}
@media screen and (min-width: 768px) {
.container-option{
display:none;
}
.container-detail{
display:block;
}
}
@media screen and (max-width: 768px) {
.container-detail{
display:none;
}
.container-option{
display:block;
}
.container-option ul {
list-style-type: none;
padding-left:0;
}
.container-option .wrapper-li-opt {
width: 100%;
position: relative;
text-align: center;
padding-top: 30px;
}
.container-option .wrapper-li-opt .li-opt .opt .title {
display: block;
width: 100%;
text-align: center;
margin-top:10px;
}
.container-option .wrapper-li-opt .li-opt .opt .dsc {
display: block;
width: 100%;
text-align: center;
color: #FE5F55;
font-weight:700;
}
}
@media (min-width: 576px) {
.card-deck .card {
min-width: 200px;
margin-bottom: 15px;
}
}
.table td, .table th {
border: none;
}
.table th {
padding: 1rem;
}
.table td {
padding: 0.5rem 2rem;
}
.table thead th {
border-bottom: 1px solid #888d9c;
}
.table-price-title {
text-align: left;
}
.fa-times {
color: #FE5F55;
}
.fa-check {
color: #77CE44;
}
/* LISTE MARQUES SALONS */
.card-deck{
margin-bottom: 35px;
}
.container-list-brand{
margin:0 2rem;
}
.text-search-null{
padding-left:2rem;
padding-top:2rem;
font-weight: 700;
}
/* SALONS */
.salonsbg {
background: -webkit-gradient(linear, left top, right top, from(#f4efeb), to(#fbf8f6));
background: -webkit-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: -o-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: linear-gradient(to right, #f4efeb 0%, #fbf8f6 100%);
padding-top: 6rem;
padding-bottom: 3rem;
}
.salonsbg h1 {
text-align: center;
}
.slide-salons {
background-color: #FFF;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
.slide-salons:hover {
transform: scale(1.025);
}
.slide-salons h6{
margin: 0;
}
.slide-salons p{
margin: 0;
}
.slide-salons-date{
font-size: 15px;
color: #FE5F55;
font-weight: bold;
}
.slide-salons-place{
font-size: 15px;
}
/* MARQUES */
.marquesbg {
padding-top: 8rem;
padding-bottom: 3rem;
background: -webkit-gradient(linear, left top, right top, from(#f4efeb), to(#fbf8f6));
background: -webkit-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: -o-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: linear-gradient(to right, #f4efeb 0%, #fbf8f6 100%);
}
.marquesbg h1 {
text-align: center;
}
.col-md-3 {
min-width: 300px;
}
.card-marques {
background-color: #FFF;
width: 100%;
padding: 13px;
}
.filter-card{
display: none;
}
.afficher {
display: flex;
}
.container-img-brand {
position: absolute;
bottom: 40px;
left: 12%;
width: 75%;
height: 60px;
background-color: #FFF;
text-align: center;
}
.container-img-brand img {
height: 40px;
width: auto;
margin: 10px 0;
}
.card-marques:hover .card-img{
opacity: 0.1;
}
.card-img{
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
.container-hover-info{
position: absolute;
top: 10%;
width: 75%;
left:12%;
padding: 0;
margin: 0;
text-align: center;
font-size:.8rem;
height: 100%;
}
.container-hover-info h5{
margin: 0;
}
.card-marques .container-hover-info{
visibility: hidden;
}
.card-marques .button-slide-brands a{
-webkit-transition: all 0s ease;
transition: all 0s ease;
}
.card-marques:hover .container-hover-info{
visibility: visible;
}
.card-marques:hover .container-img-brand{
visibility: hidden;
}
.container-hover-info ul{
list-style: none;
margin: 10px 0 20px 0;
padding: 0;
}
.button-slide-brands{
position: absolute;
bottom: 0;
left: 12%;
width: 75%;
height: 60px;
text-align: center;
visibility: hidden;
}
.button-sb {
border: 2px solid #333745;
border-radius: 5px;
text-transform: uppercase;
font-size: 14px;
font-weight: bold;
font-family: Lato;
text-align: center;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
background-color: #333745;
color: #f4efeb;
}
.button-slide-brands a{
color: #f4efeb;
}
.card-marques:hover .button-slide-brands{
visibility: visible;
}
@media screen and (min-width: 992px) {
.container-slide-brands{
display:block;
}
}
@media screen and (max-width: 992px) {
.container-slide-brands{
display:none;
}
}
.marques-list{
margin-bottom:2rem;
}
/* <NAME> */
/* equal card height */
.row-equal > div[class*='col-'] {
display: flex;
flex: 1 0 auto;
}
.row-equal .card {
width: 100%;
}
.carousel-item {
-webkit-transition: transform .6s linear !important;
transition: transform .6s linear !important;
}
.carousel-item-next, .carousel-item-prev, .carousel-item.active{
display: flex;
}
/* ensure equal card height inside carousel */
.carousel-inner>.row-equal.active,
.carousel-inner>.row-equal.next,
.carousel-inner>.row-equal.prev {
display: flex;
}
/* prevent flicker during transition */
.carousel-inner>.row-equal.active.left,
.carousel-inner>.row-equal.active.right {
opacity: 0.5;
display: flex;
}
/* SALONS */
.detail-salon{
color: #333745;
}
/* MARQUES DÉTAILS*/
.sub-title-brands{
text-align: center;
background-color: #333745;
}
.sub-title-brands h2{
color: #FFFFFF;
font-family: "Old Standard TT";
font-size: 33px;
}
.container-brand-detail-master{
background-color: white;
}
.container-brand-detail {
position: relative;
text-align: center;
font-size: 20px;
}
.container-brand-detail h1{
font-family: "Old Standard TT";
font-size: 50px;
text-align: center;
margin-bottom: 0;
}
.bandeau-marque{
width: 100%;
}
.container-brand-detail-text {
position: absolute;
z-index:1000;
color:white;
width: 100%;
padding:3rem;
bottom:0;
top:0;
}
.container-brand-detail-text a{
color:white;
}
@media screen and (max-width: 992px) {
.container-brand-detail-text {
position: relative;
color:#333745;
}
.container-brand-detail-text a{
color:#333745;
}
.mask-brand img {
opacity: 1!important;
}
.button-backb {
border: 2px solid #333745!important;
color: #333745 !important;
}
.button-backb img {
display: none;
}
.container-button-backb{
text-align: center !important;
}
}
.container-button-backb{
text-align: left;
}
.button-backb {
border: 2px solid #fff;
border-radius: 5px;
text-transform: uppercase;
font-size: 13px;
font-weight: bold;
font-family: Lato;
line-height: 16px;
text-align: center;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
color: #fff;
}
.button-backb img {
padding-bottom: 4px;
}
.container-book-detail {
position: relative;
text-align: center;
font-size: 20px;
}
.container-book-detail h1{
font-family: "Old Standard TT";
font-size: 30px;
text-align: center;
margin: 0;
}
.container-book-detail-text {
position: absolute;
z-index:1000;
width: 50%;
background: -webkit-gradient(linear, left top, right top, from(#f4efeb), to(#fbf8f6));
background: -webkit-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: -o-linear-gradient(left, #f4efeb 0%, #fbf8f6 100%);
background: linear-gradient(to right, #f4efeb 0%, #fbf8f6 100%);
padding:5rem;
border-radius: 5px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.mask-brand {
background: rgba(55,63,71,1);
}
.mask-brand img {
opacity: .3;
}
.mask-book {
background-color: white;
}
.mask-book img {
opacity: .2;
}
.icons-network a{
display: inline-block;
width: 35px;
height: 35px;
cursor: pointer;
background-color: #fff;
color: #333745;
border-radius: 50%;
font-size: 20px;
text-align: center;
line-height: 35px;
margin: 1rem;
}
.icons-network a:hover {
background-color: #333745;
color: #fff;
}
.brands-competitor h2{
font-family: "Old Standard TT";
font-size: 30px;
text-align: center;
}
/* FILTRES */
@media (max-width: 992px){
.container-list-brand .col-3 {
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
text-align: center;
}
.ctn-button-filter{
margin-top: 20px;
}
.container-filters{
margin-left: 0!important;
}
.column-filters h2{
margin-left: 0!important;
}
.nav-filter-brands{
margin-bottom: 15px;
}
}
.container-list-brand .row {
}
.column-filters{
background-color: #FFF;
min-width: 300px;
max-width: 300px;
margin-bottom:2rem;
}
.column-filters h2{
background-color: #FFF;
font-family: "Old Standard TT";
font-size: 20px;
margin-left:1.2rem;
margin-bottom:10px;
margin-top:50px;
}
.container-btn-filters{
margin:1rem;
}
.container-filters{
margin-left:2rem;
font-size:15px;
}
.button-fb {
border: 2px solid #333745;
border-radius: 5px;
text-transform: uppercase;
font-weight: bold;
font-family: 'Lato';
text-align: center;
text-decoration: none;
display: inline-block;
vertical-align: top;
padding: 1rem;
font-size: 13px;
cursor: pointer;
background: none;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
.button-fb:hover {
background-color: #333745;
color: #FFF;
}
/* BARRE RECHERCHE */
.form{
text-align: center;
margin: 4rem 0 2rem 0;
}
.bg-searchbar{
margin: 2rem;
}
#searchbar input[type=text]{
width: 90%;
padding: 10px 20px;
border: none;
background-image:url("../img/search.svg");
background-size:25px 25px;
background-position:95% 50%;
background-repeat:no-repeat;
text-align: center;
font-size: 23px;
font-weight: 700;
border-radius: 5px;
}
#searchbar {
color:#333745;
margin: 0;
}
#searchbar ::placeholder {
text-align: center;
color:#333745;
font-style: italic;
font-size: 16px;
font-weight: 300;
line-height: 35px;
}
#searchbar :focus {
border:none !important;
}
#searchbar :focus::placeholder {
color: white;
}
.autocomplete {
position: relative;
display: inline-block;
}
.autocomplete-items {
z-index: 99;
width: 90%;
margin: 5px auto;
border-radius: 5px;
box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important;
}
.autocomplete-items div {
padding: 10px;
cursor: pointer;
background-color: #fff;
border-radius: 5px;
}
.autocomplete-items div:hover {
background-color: #e9e9e9;
}
.autocomplete-active {
background-color: #e9e9e9 !important;
}
.ctn-button-filter{
text-align: center;
}
.button-filter {
border: 1.5px solid #333745;
border-radius: 5px;
text-transform: uppercase;
font-family: 'Lato';
font-weight: 400;
text-align: center;
text-decoration: none;
display: inline-block;
vertical-align: top;
padding: 5px 12px;
font-size: 15px;
cursor: pointer;
background: none;
margin-top: 10px;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
.button-filter:hover {
background-color: #333745;
color: #FFF;
}
.nav-filter-brands{
border: none;
}
.nav-filter-brands li a{
-moz-transition: 0s;
-webkit-transition: 0s;
-ms-transition: 0s;
-o-transition: 0s;
transition: 0s;
}
.nav-filter-brands .nav-item{
text-transform: uppercase;
font-size:17px;
padding: 15px;
}
.nav-filter-brands a{
border: 0px;
}
.nav-filter-brands .nav-item.show a, .nav-tabs a.active{
background: none;
border: none;
color: #FE5F55;
text-transform: uppercase;
font-weight: 700;
border-bottom: 2px solid #FE5F55;
}
.nav-filter-brands .nav-tabs .nav-link:focus{
border: 0px;
}
/* CONTACT */
.form_contact .form-control{
border:2px solid rgba(0,0,0,0);
}
.form_contact{
margin:auto;
}
input:-webkit-autofill{
padding-left:10px !important;
}
input:autofill{
padding-left:10px !important;
}
select{
-webkit-appearance:none;
-moz-appearance:none;
appearance:none
}
#type{
width:100%;
height:52px;
overflow:hidden;
background-image:url("../img/arrow.svg");
background-size:20px 30px;
background-position:98% 6px;
background-origin:content-box;
background-repeat:no-repeat;
}
#name{
height:52px;
padding:0 2rem 0 4rem;
background-image:url("../img/name.svg");
background-size:30px 30px;
background-position:11px 8px;
background-repeat:no-repeat;
}
#email{
height:52px;
padding:0 2rem 0 4rem;
background-image:url("../img/email.svg");
background-size:30px 30px;
background-position:11px 8px;
background-repeat:no-repeat}
#text{
height:150px;
padding:1rem 2rem 1rem 4rem;
line-height:150%;
resize:vertical;
background-image:url("../img/comment.svg");
background-size:30px 30px;
background-position:11px 8px;
background-repeat:no-repeat;
}
#address{
height:52px;
padding:0 2rem;
}
#country{
height:52px;
padding:0 2rem;
}
#zip{
height:52px;
padding:0 2rem;
}
#city{
height:52px;
padding:0 2rem;
}
#tel{
height:52px;
padding:0 2rem 0 4rem;
background-image:url("../img/phone.svg");
background-size:30px 30px;
background-position:11px 8px;
background-repeat:no-repeat;
}
/* FOOTER */
.modal-footer {
width: 100%;
padding: 40px 30px;
background-color: #333745;
color: #FFF;
border: 0;
font-size: 15px;
line-height: 25px;
font-weight: 300;
}
#copyright {
position: absolute;
right: 0;
left: 0;
width: 100%;
background-color: #20222C;
margin-top: 30px;
padding-top: 20px;
padding-bottom: 20px;
font-size: 12px;
}
.modal-footer a {
color: #FFF;
}
.modal-footer a:hover {
color: #9BA8D3;
}
.footer-icons {
width: 100%;
margin-top: 20px;
margin-bottom: 20px;
}
.footer-icons a {
display: inline-block;
width: 35px;
height: 35px;
cursor: pointer;
background-color: #fff;
color: #333745;
border-radius: 50%;
font-size: 20px;
text-align: center;
line-height: 35px;
margin: 5px 20px 0px 5px;
}
.footer-icons a:hover {
background-color: #333745;
color: #fff;
}
| css |
Russia and Ukraine said Wednesday that they had exchanged hundreds of captive soldiers, the first such prisoner of war exchange in months. The two warring sides had carried out several rounds of exchanges during Moscow's 22-month long invasion, but the process had stalled in the latter half of last year.
Amid Russia's Ukraine conflict, Moscow's 'Almost Naked' party stirred controversy. Celebrities faced backlash at the event hosted by Anastasia Ivleeva. Rapper Vacio's jail term and fine followed a court ruling citing 'non-traditional sexual relationships' promotion. Apologies emerged, lawsuits loomed, and repercussions hit attendees like pop star Anna Asti. Kremlin stayed mum, while activists and officials condemned the event's timing amidst military operations. The uproar spotlighted clashes between entertainment, values, and ongoing crises, triggering widespread critique.
The discussions took place at the ‘Russia’ expo, held at Moscow’s VDNKH complex, where 89 regions of Russia showcase their economic, scientific and investment potential. According to a Russian government statement, they addressed trade, investment, banking and logistics, along with energy and food security. “Special attention was paid to advancing priority projects in industrial cooperation,” the note added.
In G20, India managed to bring together nations with starkly divergent views on Ukraine. The G20 joint declaration that avoided direct criticism of Russia for its war against Ukraine is being described as a significant diplomatic win for India, the host of the summit.
Putin's remarks came during a meeting with External Affairs Minister (EAM) S Jaishankar at the Kremlin on Wednesday. The EAM is on a Russia visit from December 25 to 29 as a part of the ongoing high-level exchanges between the two sides. Putin emphasised the positive stance of Prime Minister Modi on complex global developments, including the situation in Ukraine.
For India, Russia is a reliable counterbalance against China, despite (read: because of) Moscow's closeness to Beijing. And despite increasing its focus on domestic defence production and other country sources, India still needs Moscow's extra support for at least a couple of decades.
Ukraine's air force has claimed that they have destroyed a Russian fleet ship off the Crimean peninsula suspected of carrying drones for use in Moscow's war against Kyiv. Ukraine frequently carries out strikes in Crimea, particularly targeting the Russian military.
Russian opposition leader Alexei Navalny has said that he is "fine" after a "pretty exhausting" 20-day transfer from his prison near Moscow to a penal colony beyond the Arctic Circle. He has spent most of his detention at the IK-6 penal colony in the Vladimir region, some 250 kilometres (155 miles) east of Moscow.
An open and forward-looking interaction with leading representatives of the Russian strategic community. Spoke about the importance of rebalancing and the emergence of multipolarity, Jaishankar posted on X. Exchanged views on how India-Russia ties will develop in that framework. Also discussed connectivity, multilateralism, big power competition and regional conflicts, he said. "Geopolitics and strategic convergence will always keep India-Russia ties on a positive trajectory," Jaishankar emphasised.
Indian External Affairs Minister S Jaishankar’s five-day visit to Russia amid irritants in India’s ties with the USA comes ahead of Russian Presidential elections on March 17 and is aimed at widening Special and Privileged strategic partnership.
Accepting the credentials of more than 20 new ambassadors, including those of Germany and Britain, at a ceremony in the Kremlin, Putin also said he hoped that relations between Moscow and London would improve.
A court in Moscow decided to extend the detention of Wall Street Journal reporter Evan Gershkovich, who is facing espionage charges. The extension sets a new detention period until January 30, as reported by Russian news agencies.
"This is where it truly began," Riznychenko said, walking through central Kyiv's Independence Square recently, reflecting on the uprising that unleashed a decade of momentous change for Ukraine, eventually leading to the current war with Russia.
The notices, sent on Friday, are a routine step in sanctions investigations and represent the biggest step of its kind by the United States since Washington and its allies imposed the price cap last year to restrict oil revenues to Moscow as punishment for its invasion of Ukraine, the source said.
He was commenting on riots at Makhachkala airport in Russia's Dagestan region that took place on Oct. 29, when hundreds of people stormed the airport in search of Jewish people who had just arrived on a flight from Tel-Aviv.
The United States on Thursday targeted Russia's future energy capabilities, sanctions evasion and a suicide drone that has been a menace to Ukrainian troops and equipment, among others, in sanctions on hundreds of people and entities.
The mother of a Russian artist, Alexandra Skochilenko, who is currently facing the prospect of a decade-long prison term for her protest against Moscow's invasion of Ukraine, has expressed deep concern about her daughter's health. Alexandra Skochilenko, a 33-year-old artist and musician hailing from Saint Petersburg, has been in detention since April of the previous year. Her incarceration, spanning one-and-a-half years, has taken a toll on her well-being.
The Kremlin has announced that Western companies seeking to sell their Russian assets will not have a "free exit" and must adhere to strict rules set by Moscow. This decision comes as the Russian government tightens restrictions on foreign companies selling their Russian subsidiaries, imposing caps and deadlines on transactions.
Pakistan's Russia-backed gas pipeline project has faced a significant setback, with Pakistan appearing to slow down the project due to U.S. pressure. A meeting in Moscow led to heated discussions, raising doubts about the project's future. The pipeline was intended to construct a liquefied natural gas (LNG) pipeline from Karachi to Lahore, addressing gas shortages in Pakistan's Punjab province.
| english |
<reponame>Inontran/MyFinance
package com.vk.id194177937.myfinance.core.dao.impls;
import com.vk.id194177937.myfinance.core.dao.interfaces.SourceDAO;
import com.vk.id194177937.myfinance.core.database.SQLiteConnection;
import com.vk.id194177937.myfinance.core.enums.OperationType;
import com.vk.id194177937.myfinance.core.impls.DefaultSource;
import com.vk.id194177937.myfinance.core.interfaces.Source;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Types;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Created by Inontran on 08.07.16.
*/
//TODO можно реализовать общий абстрактный класс и вынести туда общие методы (getAll, delete и пр.
// реализация DAO не должна заниматься лишними делами - только связь с БД, заполнение объектов
public class SourceDAOImpl implements SourceDAO {
private static final String SOURCE_TABLE = "source";
private List<Source> sourceList = new ArrayList<>();
@Override
public List<Source> getAll() {
sourceList.clear();
try (Statement stmt = SQLiteConnection.getConnection().createStatement();
ResultSet rs = stmt.executeQuery("select * from " + SOURCE_TABLE + " order by parent_id");) {
while (rs.next()) {
DefaultSource source = new DefaultSource();
source.setId(rs.getLong("id"));
source.setName(rs.getString("name"));
source.setParentId(rs.getLong("parent_id"));
source.setOperationType(OperationType.getType(rs.getInt("operation_type_id")));
sourceList.add(source);
}
return sourceList;// должен содержать только корневые элементы
} catch (SQLException e) {
Logger.getLogger(SourceDAOImpl.class.getName()).log(Level.SEVERE, null, e);
}
return null;
}
@Override
public Source get(long id) {
try (PreparedStatement stmt = SQLiteConnection.getConnection().prepareStatement("select * from " + SOURCE_TABLE + " where id=?");) {
stmt.setLong(1, id);
try (ResultSet rs = stmt.executeQuery();){
DefaultSource source = null;
if (rs.next()){
source = new DefaultSource();
source.setId(rs.getLong("id"));
source.setName(rs.getString("name"));
source.setParentId(rs.getLong("parent_id"));
source.setOperationType(OperationType.getType(rs.getInt("operation_type_id")));
}
return source;
}
} catch (SQLException e) {
Logger.getLogger(SourceDAOImpl.class.getName()).log(Level.SEVERE, null, e);
}
return null;
}
@Override
public boolean update(Source source) {
// для упрощения - у хранилища даем изменить только название, изменять parent_id нельзя (для этого можно удалить и заново создать)
try (PreparedStatement stmt = SQLiteConnection.getConnection().prepareStatement("update " + SOURCE_TABLE + " set name=? where id=?");) {
stmt.setString(1, source.getName());// у созданного элемента - разрешаем менять только название
stmt.setLong(2, source.getId());
// не даем обновлять operationType - тип устанавливается только один раз при создании корневеого элемента
if (stmt.executeUpdate() == 1) {
return true;
}
} catch (SQLException e) {
Logger.getLogger(SourceDAOImpl.class.getName()).log(Level.SEVERE, null, e);
}
return false;
}
@Override
public boolean delete(Source source) {
// TODO реализовать - если есть ли операции по данному хранилищу - запрещать удаление
try (PreparedStatement stmt = SQLiteConnection.getConnection().prepareStatement("delete from " + SOURCE_TABLE + " where id=?");) {
stmt.setLong(1, source.getId());
if (stmt.executeUpdate() == 1) {
return true;
}
} catch (SQLException e) {
Logger.getLogger(SourceDAOImpl.class.getName()).log(Level.SEVERE, null, e);
}
return false;
}
// добавляет объект в БД и присваивает ему сгенерированный id
@Override
public boolean add(Source source) {
try (PreparedStatement stmt = SQLiteConnection.getConnection().prepareStatement("insert into " + SOURCE_TABLE + "(name, parent_id, operation_type_id) values(?,?,?)", Statement.RETURN_GENERATED_KEYS);) {
stmt.setString(1, source.getName());
if (source.hasParent()){
stmt.setLong(2, source.getParent().getId());
}else{
stmt.setNull(2, Types.BIGINT);
}
stmt.setLong(3, source.getOperationType().getId());
if (stmt.executeUpdate() == 1) {// если объект добавился нормально
try (ResultSet rs = stmt.getGeneratedKeys()) {// получаем id вставленной записи
if (rs.next()) {
source.setId(rs.getLong(1));// не забываем просвоить новый id в объект
}
return true;
}
}
} catch (SQLException e) {
Logger.getLogger(DepositoryDAOImpl.class.getName()).log(Level.SEVERE, null, e);
}
return false;
}
@Override
public List<Source> getList(OperationType operationType) {
sourceList.clear();
try (PreparedStatement stmt = SQLiteConnection.getConnection().prepareStatement("select * from " + SOURCE_TABLE + " where operation_type_id=?");) {
stmt.setLong(1, operationType.getId());
try (ResultSet rs = stmt.executeQuery();){
DefaultSource source = null;
while (rs.next()){
source = new DefaultSource();
source.setId(rs.getLong("id"));
source.setName(rs.getString("name"));
source.setParentId(rs.getLong("parent_id"));
source.setOperationType(OperationType.getType(rs.getInt("operation_type_id")));
sourceList.add(source);
}
return sourceList;
}
} catch (SQLException e) {
Logger.getLogger(SourceDAOImpl.class.getName()).log(Level.SEVERE, null, e);
}
return null;
}
}
| java |
<reponame>mormegil-cz/POI-Importer.github.io
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"label:cs":"Kříž v Hati u hraničního přechodu","P31":"http://www.wikidata.org/entity/Q2309609","P31^label:cs":"Pamětní kříž","P131^label:cs":"Hať","P6736":"29586"},"geometry":{"type":"Point","coordinates":[18.279,49.94028]}},{"type":"Feature","properties":{"label:cs":"Kříž v Hati v Lipové ulici","P31":"http://www.wikidata.org/entity/Q2309609","P31^label:cs":"Pamětní kříž","P131^label:cs":"Hať","P6736":"29363"},"geometry":{"type":"Point","coordinates":[18.26949,49.94196]}},{"type":"Feature","properties":{"label:cs":"Kříž v Hati v ulici Dolina","P31":"http://www.wikidata.org/entity/Q2309609","P31^label:cs":"Pamětní kříž","P131^label:cs":"Hať","P6736":"29362"},"geometry":{"type":"Point","coordinates":[18.27313,49.93822]}}]} | json |
While there is buzz that Shantanu Maheshwari might be a part of Khatron Ke Khiladi, the young choreographer-actor has moved onto new things in life. He was last seen on Jhalak Dikhhla Jaa where he was the runners-up. On the professional front, he is conducting dance workshops. He told Bollywood Life, "At the moment I am working on various dance workshops and routines, with my dance crew the Desi Hoppers. We have stretched our reach to cities like Kolkata, Delhi, Indore, Ahmedabad and are hoping to soon conduct workshops all over the country! Acting wise, well there are projects in the pipeline, nothing I can speak about now though." Shantanu was also seen on MTV's Girls on Top where his romantic scenes with Saloni Chopra made a lot of news.
Shantanu's show Dil Dosti Dance got a lot of appreciation from young viewers and is popular still date. The show completed six years recently and he was extremely nostalgic. In fact, he owes his success to D3. He said, "D3 was the starting point as well as turning point of my career. A show which will forever be close to my heart, as it gave me everything! Great friends, amazing well wishers, recognition, a team which I will forever want to work with and my Swayam Shekhawat character, which will always be my favourite!"
The show based on dance, friendship and love earned a great following and Shantanu cherishes the friends he made till date. Talking about his special memories from the show, Shantanu stated, "I don't have one, but many! From all our classroom scenes, all boy scenes, playing pranks with each other on sets, Eid feasts, outdoor shoots, dance sequences - we had all possible fun during those four years. It's really hard to name just one memory, as those four years gave me some of the best memories ever to cherish!"
He also does not have any one single favourite from the D3 team. He stated, "I think our entire D3 gang gelled really well, and so everyone is my favourite costar! All the boys, all the girls! Honestly that is the best part about our entire D3 team."
Stay tuned to BollywoodLife for the latest scoops and updates from Bollywood, Hollywood, South, TV and Web-Series.
Click to join us on Facebook, Twitter, Youtube and Instagram.
Also follow us on Facebook Messenger for latest updates.
| english |
document.addEventListener("turbolinks:load", function () {
$("body").on('click', '.forget-story-link', function (event) {
event.preventDefault();
let id = this.id;
let linksDiv = $(this).parent();
let forgetStoryWrapper = $(".forget-story-link-" + id);
let savedText = $(".saved-text-" + id);
let savedTextHr = $(".saved-text-hr-" + id);
let statusText = $(".status-text-" + id);
$.ajax({
url: '/stories/' + id + '/forget',
method: 'post',
contentType: 'application/json',
})
.done(function (data) {
if (data['success']) {
// remove link
forgetStoryWrapper.remove();
// remove status text
statusText.remove();
// remove saved text
savedText.remove();
savedTextHr.remove();
// append text and forget btn
linksDiv.append("<p class='m-auto save-story-link save-story-link-" + id + "' id=" + id +"><a href='javascript: void(0)' id=" + id + " class=' btn btn-sm btn-primary grid-item-save-story-" + id + "'><i class='fas fa-bookmark mr-1'></i> Save Story</a></p>");
// success text
// linksDiv.append("<p class='status-text-" + id + " success-"+ data['success'] +"'>" + data['message'] + "</p>");
} else {
linksDiv.append("<p class='status-text-" + id + " success-" + data['success'] +"'>" + data['message'] + "</p>");
};
})
})
});
| javascript |
Seasons, a captivating Filipino romance drama showcasing exceptional talent, promises to captivate hearts and minds. The movie will release on July 7, 2023, on Netflix with a standard air time of 3 am ET and it will offer viewers a fascinating perspective on perennial subjects such as love and relationships. Through the intricately woven journey of two inseparable friends, it will explore with great depth the multitude of complexities and challenges that accompany modern-day romance.
Seasons will offer an engaging and thought-provoking storyline that delves into the power of friendship and the universal quest for love. The plot follows two best friends who, despite facing numerous heartaches, unite in a brave pact to explore new romantic possibilities. This relatable concept strikes a chord with viewers who can empathize with the rollercoaster of emotions that come with navigating love's unpredictable path.
The trailer for the upcoming movie depicts the tale of two best friends, Charlie and Kurt, who share an amicable bond but have gone through terrible heartbreaks in the past. It also shows the duo wriggling to find the perfect relationship and eventually finding their way back to each other.
In the trailer, we see how beautifully the themes of deep connection, affection, and emotion are portrayed. It displays how friendships stay strong in the face of adversity and transform into unbreakable bonds. With its theme revolving around love and friendship, this film will resonate deeply with viewers.
The official synopsis of Seasons as per Netflix reads:
"After a string of failed relationships, two best friends make a deal to take risks and look for love again — but they might just find it in each other. "
The forthcoming movie will depict the complexities that an individual faces in order to seek validation from the world. It will open the gates to give viewers a subtle glance at the scars of past love experiences that seldom heal but still ignite hope in the search for a true mate. Netflix's exclusive Seasons will also showcase snippets of emotional and funny moments between the duo.
Netflix's romantic drama film will feature a seasoned cast that includes Lovie Poe, who will portray Charlie, and Carlo Aquino, who will take up the role of Kurt. Alongside the best friends, the film will feature Sarah Edwards as the third cast member, thereby adding further depth to the film.
Dwein Baltazar and Lovi Poe wrote the screenplay, and Easy Ferrer directed it. The one-hour-long movie will paint shades of love and friendship through emotive cinematography that will resonate with audiences.
As the highly anticipated premiere of Seasons on Netflix approaches on July 7, 2023, at 3 am ET, viewers are filled with excitement for this upcoming captivating Filipino romance drama. With an exceptional cast, the forthcoming movie is bound to captivate audiences and leave a lasting impact.
The mixture of romance and drama showcased against the backdrop of the vibrant Philippines is anticipated to captivate viewers both visually and emotionally. | english |
package shop;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.util.Map;
import java.util.Scanner;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* ミスタードーナッツの住所を取得するクラスです。
* @author zenjiro
* @since 3.16
* 2005/12/04
*/
public class MisterDonut implements AddressParser {
/**
* 最初のURL
*/
private static final String URL = "http://vip.mapion.co.jp/c/f?grp=misterdonut&uc=21&bool=admi2code&admi3=";
/**
* エンコーディング
*/
private static final String ENCODING = "EUC-JP";
/**
* キャッシュファイル名の接頭語
*/
private static final String PREFIX = "misterdonut_";
/**
* @since 4.09
*/
public Map<String, String> getAddresses(final String url) throws IOException {
final Map<String, String> ret = new ConcurrentHashMap<String, String>();
try {
final Scanner scanner = new Scanner(new InputStreamReader(new URL(url).openStream(), ENCODING));
String caption = null;
final Pattern pattern = Pattern.compile("<A HREF=\"[^<>]+\">([^<>]+)</A>");
final Pattern pattern2 = Pattern.compile("<font [^<>]+>([^<>]+)</font>");
while (scanner.hasNextLine()) {
final String line = scanner.nextLine();
final Matcher matcher = pattern.matcher(line);
if (matcher.find()) {
caption = matcher.group(1);
}
final Matcher matcher2 = pattern2.matcher(line);
if (matcher2.find()) {
if (caption != null) {
final String address = matcher2.group(1);
if (!address.startsWith(":")) {
ret.put(address, caption);
}
}
}
}
scanner.close();
} catch (final FileNotFoundException e) {
}
return ret;
}
/**
* @since 4.09
*/
public String getEncoding() {
return ENCODING;
}
/**
* @since 4.09
*/
public String getLabel(final String shopName) {
return "ミスド";
}
/**
* @since 4.09
*/
public String getPrefix() {
return PREFIX;
}
/**
* @since 4.09
*/
public String getURL(final String cityID, final String cityLabel, final String prefectureLabel) throws UnsupportedEncodingException {
return URL + cityID;
}
}
| java |
Actor Rambha had a car accident recently when she was returning home after picking up her children from school in Canada.
Though everyone escaped the accident with minor injuries, her younger daughter Sasha has been admitted to the hospital.
The actor shared about the same on Instagram and even asked her fans to pray for her daughter.
Rambha wrote “Our car was hit by another car at an intersection wayback from picking kids from school!
Rambha is a popular star across the Telugu states apart from South India.
The news is viral and there are searches on Google also about this accident which occurred recently. She was on a Telugu Channel in recent times with Raghavendra Rao the popular director and hero Chakri. | english |
The FBI recovered documents that were labeled “top secret” from former President Donald Trump’s Mar-a-Lago estate in Florida, according to court papers released Friday after a federal judge unsealed the warrant that authorized the unprecedented search this week.
A property receipt unsealed by the court shows FBI agents took 11 sets of classified records from the estate during a search on Monday.
The seized records include some that were marked classified as top secret and also “sensitive compartmented information,” a special category meant to protect the nation’s most important secrets and those that if revealed publicly would harm U. S. interests. The court records did not provide specific details about the documents or what information they might contain.
The warrant details that federal agents were investigating potential violations of three different federal laws, including one that governs gathering, transmitting or losing defense information under the Espionage Act. The other statutes address the concealment, mutilation or removal of records and the destruction, alteration, or falsification of records in federal investigations.
The property receipt also showed federal agents collected other potential presidential records, including the order pardoning Trump ally Roger Stone, a “leatherbound box of documents,” and information about the “President of France. ” A binder of photos, a handwritten note, “miscellaneous secret documents” and “miscellaneous confidential documents” were also seized in the search.
Trump’s attorney, Christina Bobb, who was present at Mar-a-Lago when the agents conducted the search, signed both property receipts — one that was two pages long and another that is a single page.
In a statement earlier Friday, Trump claimed that the documents seized by agents were “all declassified,” and argued that he would have turned over the documents to the Justice Department if asked.
While incumbent presidents have the power to declassify information, that authority lapses as soon as they leave office and it was not clear if the documents in question have ever been declassified. Trump also kept possession of the documents despite multiple requests from agencies, including the National Archives, to turn over presidential records in accordance with federal law.
U. S. Magistrate Judge Bruce Reinhart, the same judge who signed off on the search warrant, unsealed the warrant and property receipt Friday at the request of the Justice Department after Attorney General Merrick Garland declared there was “substantial public interest in this matter,” and Trump backed the warrant’s “immediate” release. The Justice Department told the judge Friday afternoon that Trump’s lawyers did not object to the proposal to make it public.
Trump himself had been given at least some of the records the government was seeking to unseal, but he and his lawyers have declined, so far, to make them public.
The Justice Department’s request is striking because such documents traditionally remain sealed during a pending investigation. But the department appeared to recognize that its silence since the search had created a vacuum for bitter verbal attacks by Trump and his allies, and that the public was entitled to the FBI’s side about what prompted Monday’s action at the former president’s home.
“The public’s clear and powerful interest in understanding what occurred under these circumstances weighs heavily in favor of unsealing,” said a motion filed in federal court in Florida on Thursday.
The information was released as( Trump prepares for another run for the White House. During his 2016 campaign, he pointed frequently to an FBI investigation into his Democratic opponent, Hillary Clinton, over whether she mishandled classified information.
To obtain a search warrant, federal authorities must prove to a judge that probable cause exists to believe that a crime was committed. Garland said he personally approved the warrant, a decision he said the department did not take lightly given that standard practice where possible is to select less intrusive tactics than a search of one’s home.
In this case, according to a person familiar with the matter, there was substantial engagement with Trump and his representatives prior to the search warrant, including a subpoena for records and a visit to Mar-a-Lago a couple of months ago by FBI and Justice Department officials to assess how the documents were stored. The person was not authorized to discuss the matter by name and spoke on condition of anonymity.
Neither Trump nor the FBI has said anything about what documents the FBI might have recovered, or what precisely agents were looking for.
FBI and Justice Department policy cautions against discussing ongoing investigations, both to protect the integrity of the inquiries and to avoid unfairly maligning someone who is being scrutinized but winds up ultimately not being charged. That’s especially true in the case of search warrants, where supporting court papers are routinely kept secret as the investigation proceeds.
In this case, though, Garland cited the fact that Trump himself had provided the first public confirmation of the FBI search, “as is his right. ” The Justice Department, in its new filing, also said that disclosing information about it now would not harm the court’s functions.
The Justice Department under Garland has been leery of public statements about politically charged investigations, or of confirming to what extent it might be investigating Trump as part of a broader probe into the Jan. 6 riot at the U. S. Capitol and efforts to overturn the results of the 2020 election.
The department has tried to avoid being seen as injecting itself into presidential politics, as happened in 2016 when then-FBI Director James Comey made an unusual public statement announcing that the FBI would not be recommending criminal charges against Clinton regarding her handling of email — and when he spoke up again just over a week before the election to notify Congress that the probe was being effectively reopened because of the discovery of new emails.
The Mar-a-Lago search warrant served Monday was part of an ongoing Justice Department investigation into the discovery of classified White House records recovered from Trump’s home in Palm Beach, Florida, earlier this year. The National Archives had asked the department to investigate after saying 15 boxes of records it retrieved from the estate included classified records. Multiple federal laws govern the handling of classified information.
The attorney general also condemned verbal attacks on FBI and Justice Department personnel over the search. Some Republican allies of Trump have called for the FBI to be defunded. Large numbers of Trump supporters have called for the warrant to be released hoping they it will show that Trump was unfairly targeted.
Earlier Thursday, an armed man wearing body armor tried to breach a security screening area at an FBI field office in Ohio, then fled and was later killed after a standoff with law enforcement. A law enforcement official briefed on the matter identified the man as Ricky Shiffer and said he is believed to have been in Washington in the days leading up to the attack on the Capitol and may have been there on the day it took place. | english |
Around this time last year, Shakib Al Hasan was basking in World Cup glory. The Bangladesh all-rounder had a dream run at the tournament, where he amassed 606 runs.
But things went haywire within a few months.
In November, Shakib accepted three charges of breaching the International Cricket Council’s (ICC) anti-corruption code for failing to report approaches in two tournaments in 2018 — a One-Day International (ODI) tri-series in January and an Indian Premier League (IPL) match when he featured for Sunrisers Hyderabad.
Since then, life has been challenging for the 33-year-old.
But Shakib admits that with the help of his friends and family, he has been able to get over the past. He will be eligible to return to international cricket on October 29, and Shakib plans to start training soon.
Currently in Wisconsin, United States, with family, Shakib’s daily routine has changed in the last few months. In April, Shakib and his wife, Umme Ahmed Shishir, welcomed their second child. “Since then, the daily routine has changed. I am awake at night and sleep in the morning. But it’s fun,” he says.
How have you been since the lockdown?
Overall, it has been a tough situation for people around the world. For me, it has been okay so far. I was blessed with a second child recently, so I spend most of the time with my daughters, and that keeps me busy. So, I am enjoying my time with the family.
Most cricketers have started basic training. What’s the scene with you?
I still have three-and-a-half months left (for the suspension to end), so I will start preparing myself in another month or so. I have enough time, so I am not rushing things and haven’t started training yet.
The outbreak of the coronavirus pandemic had halted cricket across the globe. Now that international cricket has returned after four months, what are your thoughts?
I personally feel that we should not be thinking too much about the rule changes or the other protocols, and should focus on the game. It is a great feeling to see cricket returning after a four-month hiatus. It was important to start somewhere and the Tests between England and the West Indies will give confidence to all the teams, and they will start believing that the game may slowly resume in other parts of the world as well. It was refreshing to see the West Indies putting up a good show in the first Test. The most satisfying bit is that both teams could complete the game smoothly. In such trying times, that’s what matters. It’s not really about a win or a defeat, it’s about boosting the confidence of players and all the other stakeholders.
Do you think that a bio-bubble environment is feasible in the Asian subcontinent?
I think if all the boards try desperately, then it is definitely possible to create a bio-secure bubble. And once that’s done, we can again think of resuming cricket in a safe and secured environment.
Around this time last year, you were basking in World Cup glory. But things have changed completely ever since. How challenging was it to accept the ban?
It has been difficult. The first few months were extremely difficult, but my near and dear ones always stood by me. After that, I have been busy with my kids, so there have been distractions. I, of course, want to come back to cricket and it has been frustrating to stay away from cricket for all this while. But there are only a few months left (for the suspension to get over), and I hope things get better and I can return to cricket.
Cricketers are considered demigods in this part of the world. Not many know what a cricketer goes through in such challenging phases. How tough has it been mentally? How have you coped?
Initially, it was difficult. My relatives, close friends and family have always supported me — that has helped me overcome the initial challenges. I am now optimistic that things will get back to normal soon and I will soon get ready to return to cricket. I think I have left the difficult days behind and now it’s time to move forward. I am looking forward to playing cricket again.
How shocking was the whole incident?
Look, I made the mistake. I should not have taken the matter lightly. So it was not a shock, it was more of repenting my action. It was disappointing that I failed to react in time.
But then, to err is human, and now it is important to get over it and learn from my mistakes. For every individual, that’s the most important thing.
Cricketers have been soft targets. What would you advise the youngsters so that they can be careful of corruption traps?
My only advice would be that they should be careful and not make similar mistakes. They should take lessons from us and ensure that they don’t commit similar errors.
Is it at all possible to avoid such things? Now, as you look back, what do you think could have been done differently?
I am sure everyone wants to play it safe, but the only thing that should be factored in is that nothing should be taken lightly. If there are any approaches or such things, it is necessary to take things seriously and follow the protocol. A bit of lackadaisical approach could lead to graver errors — that’s something one has to keep in mind. It is important to realise the consequences and not repeat the errors.
As you eye a return to cricket, what are your initial targets?
I have not planned anything as such. But I would likely to start from where I had left, and to achieve that, I will do everything that’s required. I will work hard.
How would you rate the year 2019?
I would call it a year of highs and lows. It took me to the peak of my career during the World Cup, but at the same time, life hit rock bottom later in the year. It has been a mixed-bag year, but I will always be happy for the memories of the World Cup. It was a lovely experience. The year, however, ended on a disappointing note due to the suspension. I really felt sorry with the way it ended!
There has been an overhaul in Bangladesh cricket. What’s the way forward for the team?
I am sure they will do a fine job. It’s just that we have to start playing cricket. When things start, the coaching staff will show us the right path and we will be able to get back into shape.
I am confident about that. We are in good shape. We will move further, and in the next three or four years, this team will be more matured and developed. I am confident that we will go far.
How do you see things panning out over the next few years?
I am not looking too far (ahead). The current plan is to return to the game and give my best. The primary target is to start somewhere, and once things start, I will figure out the road ahead.
These days, what’s your daily routine?
Routine has gone for a toss (laughs) . These days, I need to keep awake at night and sleep in the morning. I am quite used to it by now. It’s fun to be around kids!
You said that a lot of people close to you have helped you in these gloomy days. What has been the reaction of your teammates?
My family, friends have always been around. I have even been in regular touch with most of my teammates, and they have never made me realise that I am going through a difficult time. They have always boosted my morale, and whenever we talk, we never discuss that (the suspension).
The IPL will be held in the United Arab Emirates (UAE) this year, and you will be missing out. Being a seasoned campaigner in the tournament, how has your experience been?
The overall experience has been amazing. The IPL has played a huge role in my career. I have learnt so many things. This is the best franchise-based tournament in the world. So, if you are part of such a tournament for a long time, you eventually end up learning a lot.
I must admit that the IPL has played a huge role in my cricketing career, there is no doubt about that.
| english |
package name.vtuber.vtubername.dto;
import lombok.Data;
import java.util.List;
import java.util.Map;
@Data
public class DdVo {
private Long id;
private String uname;
private String face;
private List<Map<String, String>> guard1;
private List<Map<String, String>> guard2;
private List<Map<String, String>> guard3;
}
| java |
<filename>src/main/resources/assets/rechiseled_compat/blockstates/atmospheric_grimwood_planks_large_tiles_connecting.json<gh_stars>0
{
"variants": {
"": {
"model": "rechiseled_compat:block/atmospheric_grimwood_planks_large_tiles_connecting"
}
}
} | json |
export interface User {
email: string;
userName: string;
password: string;
name: string;
avatar?: string;
role?: string;
description?: string;
}
| typescript |
We got our hands on the CCTV footage of late singer KK's hotel. The CCTV footage shows singer KK in the hotel lobby moments before he collapsed. He is seen walking towards his hotel room, whereas a CCTV grab from the hotel's lift shows how exhausted KK was after the concert. KK had reportedly complained of uneasiness after his performance in Kolkata and was rushed to hospital immediately, where doctors declared him brought dead. KK's funeral will take place in Mumbai on June 2.
| english |
धोधरि बन्न भऽ गेलै। आब कोनो माल-जाल, चिड़ै निपत्ता नै होइ छै। …..
Currently there are no reviews available for this book.
Be the first one to write a review for the book तरहरिमे परीलोक.
| english |
Former England batter Sir Geoffrey Boycott slammed Australia for whining over Stuart Broad's 'superstitious' trick with the bails during the fifth Ashes Test at The Oval.
The veteran pacer flipped the bails around during the first innings, leading to Marnus Labuschagne's dismissal off the very next delivery. Broad later admitted that it is an Aussie ritual and emulated it after having seen Nathan Lyon do the same in the past.
Broad repeated the trick at the fag end of the contest with England only one wicket away from a historic win. Much to the chagrin of the Australian camp, the bail ploy did work again as the right-arm pacer induced an edge off Alex Carey to wrap up the series and his career in style.
Boycott did not mince his words while trying to express his opinion over people who were angered by Broad's antics.
He wrote for his column in The Telegraph:
"They got upset about Broad switching the bails behind Marnus Labuschagne and then him getting out to the next ball England bowled at him. He did it in the second innings as well before taking his last two wickets in Test cricket. Why were the Aussies upset? It would not have bothered me one iota and that sort of thing should not get you out."
Broad was warned by Aussie opener Usman Khawaja that if he switches the bail in front of him, he would revert it right back.
England and Australia settled for a 2-2 draw in the 2023 Ashes following a riveting set of matches that went down to the wire. Both sides have made a commanding start to the 2023-25 World Test Championship (WTC) cycle while Australia retained the urn as the current holders.
Further stating that antics like bail switching should not bother batters playing at the highest level, Boycott wrote:
"If that has any effect on a batsman’s mental thought process then he should not be playing Test cricket. If Labuschagne or the Aussies are blaming that then it is just a lame excuse. Same with their gripe about England changing the ball for a better one and then bowling Australia out."
"They feel a need to blame England for some sharp practice to justify their unsportsmanlike behavior against Jonny Bairstow at Lord’s," Boycott added.
The two arch-rivals will next meet in the ODI format during the World Cup in India during the October-November window.
| english |
.home {
background-image: url('http://localhost/expertsystem/assets/HomeBG.jpg');
background-attachment: fixed;
}
:root {
--main-color: salmon;
--font: #303538;
--nav: #2fdd78;
--font-fade: #68dada;
--bg: #fff;
}
/* Top Nav */
nav {
background: var(--bg);
display: flex;
padding: 1rem 7%;
top: 0;
left: 0;
right: 0;
z-index: 10;
box-shadow: 0 2px 4px 0 rgba(0,0,0,.2);
}
nav .topNav {
justify-content: end;
}
nav .topNav a {
margin: 0 1rem;
font-size: 1.2rem;
font-weight: 600;
text-decoration: none;
}
nav .topNav a:hover {
color: var(--font-fade);
border-bottom: .1rem solid var(--font-fade);
padding-bottom: .5rem;
transition-duration: 0.5s;
}
/* Home Page */
.home .title h1 {
color: var(--font);
font-size: 7.2rem;
text-align: center;
font-weight: bold;
margin-top: 8rem;
text-shadow: 4px 4px 0 var(--font-fade);
}
.home .btnTest {
margin-top: 1rem;
position: absolute;
text-transform: capitalize;
top: 60%;
left: 50%;
transform: translate(-50%, -50%);
padding: .8rem 3rem;
font-size: 1.2rem;
color: var(--font);
font-weight: bold;
background: var(--font-fade);
border-radius: 10px;
box-shadow: 2px 2px 2px;
}
.home .btnTest:hover {
background: var(--font);
color: var(--font-fade);
letter-spacing: .2rem;
transition-duration: 0.5s;
}
/* TestModel Page */
.home .title h3, .container .title h3 {
color: var(--font);
font-size: 3.6rem;
text-align: center;
font-weight: bold;
margin-top: 8rem;
text-shadow: 4px 4px 0 var(--font-fade);
}
.question {
box-shadow: 0 2px 4px 0 rgba(0,0,0,.2);
padding: 2rem 2rem;
background-color: white;
border-radius: 5px;
}
.btn{
padding: 0.5rem 3rem;
}
.bg-form {
width: 50%;
border: 3px solid white;
border-radius: 5px;
}
/* Result */
.judul {
margin-top: 8rem;
font-family: 'Changa', sans-serif;
font-weight: bold;
}
.nama {
font-family: 'Staatliches', cursive;
font-size: 2.5rem;
}
.row {
margin-top: 3rem;
padding: 1rem 1rem;
}
.text {
text-align: justify;
}
/* Personality Types */
.main {
width: 30%;
margin: 50px auto;
}
/* About Us */
.team .title {
color: var(--font);
font-size: 3rem;
text-align: center;
font-weight: bold;
margin-top: 8rem;
padding: 2rem;
text-shadow: 4px 4px 0 var(--font-fade);
}
.team .box-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
gap: 2rem;
}
.team .box-container .box {
border: var(--font);
text-align: center;
background: var(--font-fade);
box-shadow: 4px 4px 10px var(--font);
padding: 5rem 0rem;
border-radius: 10px;
}
.team .box-container .box .manusia {
height: 10rem;
width: 10rem;
margin-top: -50px;
border-radius: 50%;
object-fit: cover;
}
.team .box-container .box h3 {
padding: 1.2rem;
font-size: 1.5rem;
color: var(--font);
}
.team .box-container .box p {
font-size: 1rem;
color: var(--font);
margin-top: -10px;
}
.iconrow {
display: flex;
justify-content: center;
gap: 1rem;
margin-top: 2rem;
cursor: pointer;
}
.icon:hover{
transform: scale(1.5);
transition-duration: 0.5s;
}
/* Credits */
.row .title {
color: var(--font);
font-size: 2rem;
font-weight: bold;
padding: 2rem;
text-shadow: 2px 2px 0 var(--font-fade);
}
.row .title2 {
color: var(--font);
font-size: 2rem;
font-weight: bold;
padding: 2rem;
text-shadow: 2px 2px 0 var(--font-fade);
}
.media {
height: 150px;
border: 1px solid var(--font);
border-radius: 5px;
align-items: center;
text-align: center;
}
| css |
<!DOCTYPE html>
<html lang="en">
<head>
<title>Inline CSS Example</title>
<meta charset="utf-8">
</head>
<body style="background-color:#F5F5F5;color:#008080;">
<h1 style="background-color:#008080;color:#F5F5F5;">Inline CSS</h1>
<p>This paragraph inherits the styles applied to the body tag.</p>
<p style="color:#333333">This paragraph overrides the text color style applied to the body tag.</p>
</body>
</html> | html |
export interface ChatMessage {
senderId: string;
receiverId: string;
senderName: string;
body: string;
timeSent: Date;
} | typescript |
Sonam Kapoor was quite a delight to watch at the Ferragamo do. The way she did her hair, the front-zipper blouse and those traditional temple earrings – every statement reeked of an eccentric idea.
Internet calls 'Cham Cham' girl Shraddha Kapoor the reason for rains at IPL Finale; Actress reacts!
Nushrratt Bharuccha tops the popular Indian celebrities list by IMDb! | english |
class DynamicArray(object):
def __init__(self, capacity=0):
self.capacity = capacity
if not capacity:
self.arr = None
self.len = 0
else:
self.len = 0
self.arr = []
def size(self):
return self.len
def isEmpty(self):
return self.len == 0
def get(self, index):
if index >= self.len or index < 0:
raise ValueError("Index out of range in get")
return self.arr[index]
def set(self, index, elem):
if index >= self.len or index < 0:
raise ValueError("Index out of range in set")
self.arr[index] = elem
def clear(self):
self.arr = []
self.len = 0
def add(self, elem):
if self.len+1 >= self.capacity:
self.capacity *= 2
self.arr.append(elem)
def removeAt(self, rm_index):
if rm_index >= self.len or rm_index < 0:
raise ValueError("Remove Index out of range in removeAt")
data = self.arr.pop(rm_index)
self.len -= 1
return data
def remove(self, value):
self.arr.remove(value)
def indexOf(self, value):
for i in range(self.len):
if self.arr[i] == value:
return i
return -1
def contains(self, value):
return self.indexOf(value) != -1
def __str__ (self):
s = "["
for i in range(self.len-1):
s += str(self.arr[i])
s += ", "
s += str(self.arr[self.len -1]
s += "]"
| python |
"""
coax.exceptions
~~~~~~~~~~~~~~~
"""
class InterfaceError(Exception):
"""An interface error occurred."""
class ReceiveError(Exception):
"""A receive error occurred."""
class InterfaceTimeout(Exception):
"""The interface timed out."""
class ReceiveTimeout(Exception):
"""The receive operation timed out."""
class ProtocolError(Exception):
"""A protocol error occurred."""
| python |
exports.sum = function(from, to) {
return (from + to) * (to - from + 1) / 2;
}; | javascript |
Commonwealth Games 2022: Indian team scripted history on Tuesday by winning the country's first medal in Lawn Bowls in the women's fours event after beating South Africa 17-10. Pinki, one of the four members of the team said that the medal will open the doors for the sport in the country.
Badminton, Table Tennis, Athletics, Cricket, Weightlifting, Boxing and Wrestling were some of the sports that India expected a medal in. However, most of India hadn't even heard of the sport Lawn Bowls , let alone knowing its basic and expecting a medal in it, that too a gold. However, a PE teacher (Pinki), a Sports officer (Rupa Rani Tirkey), a Police officer (Lovely Choubey) and a Forest department officer (Nayanmoni Saikia) will combined to hand India their first-ever medal in Lawn Bowls.
Lawn Bowls was the first event at the start of every day in the ongoing Birmingham Games in 2022 and since no one knew much about the sport and the participants, their performance in the women's fours event slipped under the radar and quietly they qualified for the semi-finals. India had lost the first game against England 9-18 but managed to qualify for the quarter-finals with a 15-9 win against Cooks Islands and 17-7 against Canada.
They breezed past Norfolk Island by 19-7 in the quarters. It seemed like their winning run would be halted by New Zealand in the semis when they were 0-6 behind but recovered well to beat them 16-13. In the gold medal match, the Indian women were leading South Africa 8-2 before the opposition came back strongly to level 8-8.
However, some defining bowling in the last three rounds handed the Indian women a gold medal. Speaking to Sony Sports after the win, Pinki said that the team knew that unless they bring a medal, doors won't open for the sport in the country.
"You can guess from our win that how much it will motivate whole of India. The best part was all four of us were determined to do well not for the team but for the country. And we knew that doors won't open for the sport unless a medal comes. Now they are wide open," Pinki said.
Pinki paid gratitude to the Indian Olympic Association (IOA) and Bowling Federation of India (BFI) for standing behind them and supporting them in whatever they needed. She also thanked the team manager Anju Luthra and the treasurer of BFI, Krishan Bir Singh Rathi for providing the freedom they needed to perform well.
Asked about her thoughts, the team manager Anju said, "My journey has been with them only. Two out of these four players have played four Commonwealth Games and I have been manager in all of them since 2010.
"From the first day, we came eyeing the medal. Every time we used to fall short by one point and that one point gave us sleepless nights for two years, so this year we wanted to do something and bowling federation gave us ample freedom and Rathi sir has been like a backbone for use," she concluded.
With singles, doubles and triples starting their campaigns on Wednesday, India will hope to garner a few more medals in the sport. | english |
<gh_stars>1-10
import React from 'react';
import PropTypes from 'prop-types';
import Button from './Button';
export default function ButtonPanel({ clickHandler }) {
return (
<div className="Groups">
<div className="Group1">
<Button buttonName="AC" color="#EFEFEF" handleClick={clickHandler} />
<Button buttonName="+/-" color="#EFEFEF" handleClick={clickHandler} />
<Button buttonName="%" color="#EFEFEF" handleClick={clickHandler} />
<Button buttonName="÷" handleClick={clickHandler} />
</div>
<div className="Group2">
<Button buttonName="7" color="#EFEFEF" handleClick={clickHandler} />
<Button buttonName="8" color="#EFEFEF" handleClick={clickHandler} />
<Button buttonName="9" color="#EFEFEF" handleClick={clickHandler} />
<Button buttonName="X" handleClick={clickHandler} />
</div>
<div className="Group3">
<Button buttonName="4" color="#EFEFEF" handleClick={clickHandler} />
<Button buttonName="5" color="#EFEFEF" handleClick={clickHandler} />
<Button buttonName="6" color="#EFEFEF" handleClick={clickHandler} />
<Button buttonName="-" handleClick={clickHandler} />
</div>
<div className="Group4">
<Button buttonName="1" color="#EFEFEF" handleClick={clickHandler} />
<Button buttonName="2" color="#EFEFEF" handleClick={clickHandler} />
<Button buttonName="3" color="#EFEFEF" handleClick={clickHandler} />
<Button buttonName="+" handleClick={clickHandler} />
</div>
<div className="Group5">
<Button buttonName="0" wide color="#EFEFEF" handleClick={clickHandler} />
<Button buttonName="." color="#EFEFEF" handleClick={clickHandler} />
<Button buttonName="=" handleClick={clickHandler} />
</div>
</div>
);
}
ButtonPanel.propTypes = {
clickHandler: PropTypes.func.isRequired,
};
| javascript |
<reponame>amsa-code/fgb-decoder
{"Message Type":"User Location (Long)",
"Hex Data":"CE87B1763200184ACC4F20CE030373",
"Hex Id":"9D0F62EC6400309",
"Country Code":"232 (Invalid Oracle URL specified)",
"User Protocol Type":"Serial",
"Beacon Type":"Personal",
"C/S cert. no. present":"YES",
"Serial Number":"572185",
"National Use":"0000000000",
"C/S Type approval number":"194",
"Aux. radio-locating":"121.5 MHz",
"Error Correcting Code":"010110011000100111100",
"Encoded Position Source":"INTERNAL",
"Latitude":"06 28 00N",
"Longitude":"003 00 00E",
"Error Correcting Code":"001101110011"} | json |
Data Management
========================================================
For Scientific Research
[//]: # (author: <NAME>, UW DEOHS)
[//]: # (date: 2014-04-17)
[//]: # (license: CC0 1.0 Universal, linked-content/images)
[//]: # (note: License does not apply to external content such as quoted material, linked web pages, images, or videos. These are licensed separately by their authors, publishers or other copyright holders. See attribution links for details.)
[//]: # (note: Any of the trademarks, service marks, collective marks, design rights, personality rights, or similar rights that are mentioned, used, or cited in the presentations and wiki of the Data Management For Scientific Research workshop/course are the property of their respective owners.)
[//]: # (homepage: https://github.com/brianhigh/data-workshop)
<p style="width: 600px; float: right; clear: right; margin-bottom: 5px; margin-left: 10px; text-align: right; font-weight: bold; font-size: 14pt;"><img src="http://www.stanza.co.uk/body/stanza_+BODY-copy.jpg" alt="stanza body copy" style="padding-bottom:0.5em;" />Photo: © <a href="http://www.stanza.co.uk/body/index.html">Stanza</a>. Used with permission.</p>
Session 3: Systems Analysis and Design
========================================================

Systems Development Life Cycle (SDLC)
==================================
One of several approaches to systems development is the [SDLC](http://en.wikipedia.org/wiki/Systems_development_life_cycle), also called the "Waterfall" model.
<p style="width: 500px; float: left; clear: right; margin-bottom: 5px; margin-left: 10px; text-align: right; font-weight: bold; font-size: 14pt;"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/e/e2/Waterfall_model.svg/500px-Waterfall_model.svg.png" alt="waterfall model" style="padding-bottom:0.5em;" />Image: <a href="http://commons.wikimedia.org/wiki/File:Waterfall_model.svg"><NAME> / <NAME> / Wikimedia</a></p>
SDLC Activities and Artifacts
==================================
| Phase | Activities | Artifacts^1 |
| ----- | ---------- | ----- |
| Planning^2 | Define purpose, scope, options, costs^3 | Go/No-Go Decision, Plan |
| Systems Analysis | Process Modeling, Requirements Anal. | Diagrams^4, Requirements |
| Systems Design | Interface & Data Modeling | Diagrams^5, DD^6, Schema |
| Development | Acquisition and/or Coding, Integration | Working System |
| Testing | Testing, Bug Reports & Fixes | Validated System |
| Deployment | Installation, Training, Launch | Production System |
| Maintenance | Backups, Upgrades | Maintained System |
| Evaluation | Effectiveness^7 and Cost Checks | Evaluation Report |
| Disposal | System Removal, Archival, and Surplus | Archived Artifacts |
(See the next slide for notes.)
SDLC Activities and Artifacts
==================================
| | Notes |
| --- | ---- |
| 1 | There are [dozens](http://www.uspto.gov/about/vendor_info/current_acquisitions/sdi_ng/sdlc_activity_artifact_checklist.xls) of potential [artifacts](http://en.wikipedia.org/wiki/Artifact_%28software_development%29) from each phase. |
| 2 | The [planning phase](http://en.wikipedia.org/wiki/Systems_development_life_cycle#System_investigation) may also be called the preliminary investigation, system investigation, feasibility study, or project initiation phase, among other names. |
| 3 | Determination of options and costs (in the [planning phase](http://en.wikipedia.org/wiki/Systems_development_life_cycle#System_investigation)) is often referred to, specifically, as a [feasibility study](http://www.extension.iastate.edu/agdm/wholefarm/html/c5-65.html). |
| 4 | [Systems analysis](http://en.wikipedia.org/wiki/Systems_analysis) may produce [flow charts](http://en.wikipedia.org/wiki/Flow_chart), [swim lanes](http://en.wikipedia.org/wiki/Swim_lane), [data flow diagrams](http://en.wikipedia.org/wiki/Data_flow_diagram) (DFD), and [UML](http://en.wikipedia.org/wiki/Unified_Modeling_Language) diagrams. |
| 5 | [Systems design](http://en.wikipedia.org/wiki/Systems_design) may produce [Entity-relationship](http://en.wikipedia.org/wiki/Entity_relationship) (ER) diagrams and UML diagrams. |
| 6 | As a systems design artifact, DD represents a [Data Dictionary](http://en.wikipedia.org/wiki/Data_dictionary) document. |
| 7 | The [Evaluation phase](http://en.wikipedia.org/wiki/Systems_Development_Life_Cycle#Evaluation) will have numerous measures of [effectiveness](http://ipmexam.wikispaces.com/Systems+Development+Life+Cycle+-+Evaluation+Phase). |
An Example Research Project
==================================
Let's imagine that we are to conduct a research study like this:
* We will sample various surfaces for bacteria.
* Some of those surfaces will be on human subjects.
* We will analyze the bacteria samples in the lab.
* Test results will be entered into a data system.
* We will perform statistical analyses on the test results.
Goals List
===================================
The stakeholder goals for system, in "verb noun" form are:
| Role | Goal |
| ---- | ---- |
| Subject | Sign Consent Form |
| Sampler | Collect Consent Form |
| Subject | Complete Subject Form |
| Sampler | Collect Subject Form |
| Sampler | Collect Sample |
| Sampler | Deliver Sample |
| Lab Tech | Test Sample |
| Lab Tech | Dispose Sample |
| Statistician | Analyze Results |
Structured Narratives
====================================
From this goals list, we can create use case diagrams and a structured narrative. A structured narrative is a description which conforms to some sort of standardized format.
For the purposes of our preliminary investigation, we will just add one-sentence descriptions for each goal in our list. Our description will use terms such as "if", "must" or "may" and phrases like "for each" or "for all".
This simple structure will allow us to develop a process model using various types of diagrams. From our process model, we will develop a data model.
Structured Narrative: Part 1, Subject Data
====================================
| Actor | Use Case | Description |
| ----- | -------- | -------------------- |
| Subject | Sign Consent Form | If a human subject is sampled, the subject must sign a consent form. |
| Sampler | Collect Consent Form | The sampler must collect the consent form before sampling the subject. |
| Subject | Complete Subject Data Form | The subject must complete a subject data form by providing personal information. |
| Sampler | Collect Subject Data Form | The sampler must collect the subject data form before sampling the subject. |
Structured Narrative: Part 2, Sampling
====================================
| Actor | Use Case | Description |
| ----- | -------- | -------------------- |
| Sampler | Enter Subject Data | The sampler must enter subject information into the system for each human subject sampled. |
| Sampler | Collect Sample | The sampler may collect a sample from a human subject or from a non-human surface. |
| Sampler | Record Geo Location | The sampler must record the geographical sampling location for all samples taken. |
| Sampler | Record Body Location | The sampler must record the human body sampling location for all samples taken from human subjects. |
| Sampler | Record Temperature | The sampler must record a temperature reading for all samples taken. |
| Sampler | Record Humidity | The sampler must record a humidity reading for all samples taken. |
| Sampler | Enter Sample Data | The sampler must enter sample information into the system for each sample collected. |
| Sampler | Deliver Sample | The sampler must deliver the sample to the laboratory. |
Structured Narrative: Part 3, Analysis
====================================
| Actor | Use Case | Description |
| ----- | -------- | -------------------- |
| Lab Tech | Receive Sample | The laboratory technician must receive the sample when it is delivered. |
| Lab Tech | Store Sample | The laboratory technician must store the sample in a cooler (refrigerator). |
| Lab Tech | Split Sample | The laboratory technician must split the sample before testing. |
| Lab Tech | Test Sample | The laboratory technician must test the sample before it expires. |
| Lab Tech | Enter Test Result | The laboratory technician must enter the test result into the system. |
| Lab Tech | Dispose Sample | The laboratory technician must dispose of the sample after it is no longer needed. |
| Statistician | Query Results | The statistician may query the system for test results. |
| Statistician | Analyze Results | The statistician may analyze the results using statistical tools. |
Use Case Narratives
====================================
For even more clarity, one can also develop [use case narratives](http://businessanalystmentor.com/2008/12/03/use-cases-the-use-case-narrative/), which go into far greater detail. This level of detail might be useful in later design phases.
<p style="width: 800px; float: left; clear: right; margin-bottom: 5px; margin-left: 10px; text-align: right; font-weight: bold; font-size: 14pt;"><img src="http://www.cigi.illinois.edu/cybergis-project/img/usecaseimg.png" alt="use case narrative" style="padding-bottom:0.5em;" />Image: <a href="http://www.cigi.illinois.edu/cybergis-project/Feb2011Workshop.php">UI CyberGIS Project</a></p>
Use Case Diagrams: Project Overview
====================================
This diagram shows the actors and their project goals.

Use Case Diagrams: More Detailed View
====================================
This diagram shows a more detailed view of the actors and their project goals.

Flow Charts
====================================
To better elucidate process branching in a system, we can use a flow chart. Here is a closer look at the sampling process.

Swim Lane Diagrams
====================================
This swim lane diagram shows an overview of the system. The lanes not only show actors, but also sequence and outputs.

Data Flow Diagrams
====================================
Context Diagrams (Level 0)
* [Context Diagram with Gane/Sarson Symbols](images/Lab_Data_System_Context_Diagram_Gane.png)
* [Context Diagram with Yourdon/DeMarco Symbols and Curved Lines](images/Lab_Data_System_Context_Diagram_Yourdon_V1.png)
* [Context Diagram with Yourdon/DeMarco Symbols without Subject Entity](images/Lab_Data_System_Context_Diagram_Yourdon_V2.png)
Data Flow Diagrams (Level 1 and higher)
* [Level 1 Data Flow Diagram](images/Lab_Data_System_Level_1_DFD_Yourdon_Angled_Lines.png)
* [Level 1 Data Flow Diagram with Curved Lines](images/Lab_Data_System_Level_1_DFD_v1.png)
* [Level 1 Data Flow Diagram without Subject Entity](images/Lab_Data_System_Level_1_DFD_Yourdon_v2.png)
Context Diagram (Gane/Sarson Symbols)
====================================

Context Diagram (Yourdon/DeMarco)
====================================

Context Diagram: Without Subject Entity
====================================

Level 1 Data Flow Diagram
====================================

Level 1 DFD ... with Curved Lines
====================================

Level 1 DFD ... Without Subject Entity
====================================

Hands-on Group Exercise
========================================================
Working as a group, with a pen or pencil and paper, make some systems analysis diagrams. Sticky notes, a whiteboard, etc. may be helpful when brainstorming and designing the diagrams.
<p style="width: 650px; float: left; clear: right; margin-bottom: 5px; margin-left: 10px; text-align: right; font-weight: bold; font-size: 14pt;"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Group_visioning_session_-_group_one_-_Stierch.jpg/640px-Group_visioning_session_-_group_one_-_Stierch.jpg" alt="group" style="padding-bottom:0.5em;" />Photo: <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Group_visioning_session_-_group_one_-_Stierch.jpg/640px-Group_visioning_session_-_group_one_-_Stierch.jpg">SarahStierch / Wikimedia</a></p>
Hands-on Group Exercise: Variations
========================================================
Data Flow Diagrams
Transform your use case diagram(s) into a context diagram and level 1 DFD, especially if there are many data processing steps or data sources. Diagram further levels (time permitting).
---
Flow Charts and Swim Lanes
Alternatively, if there are complex decisions, branching, or multiple entities performing various actions, then make a flow chart or swim lane diagram from your use case diagram(s).
Discussion
========================================================
Explain your diagrams to the group as though you were presenting your data system requirements to those who would build the data system. Ask questions that a system implementer might ask, especially where there are ambiguities.
<p style="width: 275px; float: left; clear: right; margin-bottom: 5px; margin-left: 10px; text-align: right; font-weight: bold; font-size: 14pt;"><img src="http://upload.wikimedia.org/wikipedia/commons/e/eb/User_journey_discussion.png" alt="discussion" style="padding-bottom:0.5em;" />Graphic: <a href="http://upload.wikimedia.org/wikipedia/commons/e/eb/User_journey_discussion.png">Jagbirlehl / Wikimedia</a></p>
In the Coming Sessions...
========================================================
* Entity-Relationship Diagrams
* MySQL Workbench
* Building Database Tables
* Database Applications
Action Items (videos, readings, and tasks)
========================================================
<table>
<tr border=0>
<td width="128" valign="middle"><img width="128" height="128" alt="watching" src="images/watching.jpg">
</td>
<td valign="middle">
<ul>
<li><a href="https://www.youtube.com/watch?v=O4PXqpv8TAw">Conceptual Data Modeling</a>
<li><a href="https://www.youtube.com/watch?v=V5DyvUfsboA">Defining table relationships</a>
<li><A href="https://www.youtube.com/watch?v=SVV7HjKmFY4">Databases and SQL</a>
<li><a href="https://www.youtube.com/watch?v=-fQ-bRllhXc">ERD Training</a>
</ul>
</td>
</tr>
<tr>
<td width="128" valign="middle"><img width="128" height="128" alt="readings" src="images/reading.jpg">
</td>
<td valign="middle">
<ul>
<li><A href="http://practicalcomputing.org/about">PCfB</a> textbook: Chapter5. Handling Text in the Shell
<li>Skim: Wikipedia: <a href="http://en.wikipedia.org/wiki/Requirements_analysis">Req. anal.</a>, <a href="http://en.wikipedia.org/wiki/Database_design"</a>DB design, <a href="http://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model">E-R model</a>, and <a href="http://en.wikipedia.org/wiki/Database_normalization">normalization</a>
<li>Explore: <A href="http://ciso.uw.edu/privacy/">UW Privacy</a>, <a href="http://yourdon.com/strucanalysis/wiki/index.php/Introduction">SA Wiki</a>, <a href="http://en.wikibooks.org/wiki/Business_Analysis_Guidebook">BA Guidebook</a>
<li>Optional- Skim: <a href="http://www.amazon.com/dp/0123747309">RDDaI3CE</a> textbook: Chapters 3-4
</ul>
</td>
</tr>
<tr>
<td width="128" valign="middle"><img width="128" height="128" alt="tasks" src="images/tasks.jpg"></td>
<td valign="middle">
<ul>
<li> Create enough diagrams to describe your system "unambiguously"
<li> Post your system documents and diagrams in your project wiki
<li> Organize your material into a "Requirements Document" wiki page
<li> Refer to the <a href="https://github.com/brianhigh/data-workshop/wiki/Example-Requirements-Document">example</a> in the "Data Management" project wiki
</ul>
</td>
</tr>
</table>
See Also
========================================================
* [Rapid application development](http://en.wikipedia.org/wiki/Rapid_application_development)
* [Creately - Ultimate Flowchart Guide](http://creately.com/blog/diagrams/flowchart-guide-flowchart-tutorial/)
* [Traditional vs Modern Flowcharts](http://www.smartdraw.com/articles/flowchart/traditional-vs-modern-flowcharts.htm)
* [DFD over Flowcharts PDF](http://ratandon.mysite.syr.edu/cis453/notes/DFD_over_Flowcharts.pdf)
* [DFD Slideshow](http://www.slideshare.net/NidhiSharma78/data-flow-diagram-17909732)
* [Creately DFD](http://creately.com/diagram-community/popular/t/data-flow)
* [DFDs - and follow link to "Article"](http://indianatech2.net/dfd.html)
* [UML Data Modeling Video](https://www.youtube.com/watch?v=OOpiaIcyz30)
* [Graphical Data Flow Programming in LabVIEW Video](https://www.youtube.com/watch?v=PqxStfwjQoQ&list=PLB968815D7BB78F9C)
Questions and Comments
========================================================
<p style="width: 380px; float: right; clear: right; margin-bottom: 5px; margin-left: 10px; text-align: right; font-weight: bold; font-size: 14pt;"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/23/Happy_Question.svg/380px-Happy_Question.svg.png" alt="question" style="padding-bottom:0.5em;" />Image: <a href=http://commons.wikimedia.org/wiki/File:Happy_Question.svg">© <NAME></a> / Wikimedia</p>
Some Parting Words
========================================================
> Essentially, all models are wrong, but some are useful.
--*<a href="http://en.wikipedia.org/wiki/George_E._P._Box"><NAME></a>*
Source: *Empirical Model-Building and Response Surfaces* (1987), p. 424. (<a href="http://en.wikiquote.org/wiki/George_E._P._Box">Wikiquote</a>.)
========================================================
<p style="width: 744px; float: right; clear: right; margin-bottom: 5px; margin-left: 10px; text-align: right; font-weight: bold; font-size: 14pt;"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Flammarion_Woodcut_1888_Color_2.jpg/744px-Flammarion_Woodcut_1888_Color_2.jpg" alt="flammarion" style="padding-bottom:0.5em;" />Source: <a href="http://commons.wikimedia.org/wiki/File:Flammarion_Woodcut_1888_Color_2.jpg">Camille Flammarion / Wikimedia</p>
| markdown |
Worst Memorable Day Of Life!
Worst Memorable Day Of Life!
"Hey there! I am Priya! I have graduated and now have got an opportunity for job in 'Telecom Sector'. As I was new, I didn't know my work. As a result, I always used to keep asking my job, my work to do. Instead my colleague always used to speak up , "Wait ! You will soon be given your job." I would always wait for this opportunity!
Once finally, I was taken with some of my colleagues. But still I didn't know my job. I was first assisted in group of three where I, and two ladies were assisted. I felt comfortable as there's someone lady with us to assist me. We were going to travel by train. But, the train was arriving late at the station. So there was a great mess. Even our group had to be changed. Two men of our company asked the two ladies of our group to be out as, now they were going to assist me. The moment they said this my heart started pumping fast. I was frightened. The train arrived. That thing I took it as granted as however we were going to travel by a train and there will be crowd so there's nothing to worry about.
We reached our destination. We got out of the train. As we were moving forward the crowd was slowly and slowly disappearing. There was nothing on the roadside; but only shops that too bars and red light spot. I was feeling very awkward. The two men, my colleague pointed out to a building and asked me if you are able to communicate with people well. I finally had a sigh of relief and said, "Ya I will. Sure !" Saying so they said, "Let's have a break. Let's go to a nearby restaurant. However, I was hungry but seeing the surrounding I boldly replied "NO". But they forced me to. We entered the restaurant. There was no lady in there but only few drunkards. Somehow I managed to escape the restaurant by saying, "I am feeling like vomiting. So please take to to railway station. From there we shall buy a vomiting medicine so I could feel better."
One of the guy accompanied me. We went to the railway station and bought the medicine. I made up one more reason to escape by saying, "I want to go to washroom." As and how, he was not going to enter the ladies washroom, he replied I will wait till you arrive.
I sat for hours in the washroom. I was so frightened. After sometime, the lady who used to clean the washroom came. She saw me crying and asked the reason for so. I narrated the whole story to her. She promised to help me. She checked out whether there was anyone standing out there and asked to to leave by any train which will arrive at the station. I was fully blank so I listened to her advice and acted accordingly. The situation was the worst but peace of mind was needed. And thanks to that lady who saved my life. Thank you ! "
| english |
<filename>src/shared/filter/http.ts
import { Catch, ArgumentsHost, ExceptionFilter } from "@nestjs/common";
@Catch()
export class BadRequestFilter implements ExceptionFilter {
catch(exception: Error, host: ArgumentsHost) {
const response = host.switchToHttp().getResponse();
response.status(400).json({message: exception.message});
}
} | typescript |
<reponame>VU-libtech/OLE-INST<gh_stars>1-10
package org.kuali.ole.converters;
import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.MarshallingContext;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
import org.kuali.ole.bo.explain.OleSRUExplainIndexMapName;
/**
* Created with IntelliJ IDEA.
* User: ?
* Date: 7/19/12
* Time: 7:02 PM
* To change this template use File | Settings | File Templates.
*/
public class OleSRUExplainIndexMapNameConverter implements Converter {
@Override
public void marshal(Object o, HierarchicalStreamWriter hierarchicalStreamWriter,
MarshallingContext marshallingContext) {
OleSRUExplainIndexMapName oleSRUExplainIndexMapName = (OleSRUExplainIndexMapName) o;
hierarchicalStreamWriter.addAttribute("set", oleSRUExplainIndexMapName.getSet());
hierarchicalStreamWriter.setValue(oleSRUExplainIndexMapName.getValue());
}
@Override
public Object unmarshal(HierarchicalStreamReader hierarchicalStreamReader,
UnmarshallingContext unmarshallingContext) {
OleSRUExplainIndexMapName oleSRUExplainIndexMapName = new OleSRUExplainIndexMapName();
oleSRUExplainIndexMapName.setSet(hierarchicalStreamReader.getAttribute("set"));
oleSRUExplainIndexMapName.setValue(hierarchicalStreamReader.getValue());
return oleSRUExplainIndexMapName;
}
@Override
public boolean canConvert(Class aClass) {
return aClass.equals(OleSRUExplainIndexMapName.class);
}
}
| java |
<reponame>sdpython/mlprodic
# -*- encoding: utf-8 -*-
# pylint: disable=E0203,E1101,C0111
"""
@file
@brief Runtime operator.
"""
from ._op import OpRunBinaryNum
from ._op_numpy_helper import numpy_matmul_inplace
class MatMul(OpRunBinaryNum):
def __init__(self, onnx_node, desc=None, **options):
OpRunBinaryNum.__init__(self, onnx_node, desc=desc, **options)
def _run(self, a, b): # pylint: disable=W0221
return (numpy_matmul_inplace(self.inplaces, a, b), )
def to_python(self, inputs):
return "import numpy", "return %s @ %s" % tuple(inputs)
| python |
[{"id":12045,"idParent":12039,"namaWilayah":"<NAME>","tingkatWilayah":4,"idPro":6728,"idKab":12038,"idKec":12039,"idKel":12045,"namaPro":"<NAME>","namaKab":"<NAME>","namaKec":"<NAME>","namaKel":"<NAME>","kodeWilayah":"12.75.01.1006"},{"id":12043,"idParent":12039,"namaWilayah":"DAMAI","tingkatWilayah":4,"idPro":6728,"idKab":12038,"idKec":12039,"idKel":12043,"namaPro":"<NAME>","namaKab":"<NAME>","namaKec":"<NAME>","namaKel":"DAMAI","kodeWilayah":"12.75.01.1004"},{"id":12048,"idParent":12039,"namaWilayah":"<NAME>","tingkatWilayah":4,"idPro":6728,"idKab":12038,"idKec":12039,"idKel":12048,"namaPro":"<NAME>","namaKab":"<NAME>","namaKec":"<NAME>","namaKel":"<NAME>","kodeWilayah":"12.75.01.1009"},{"id":12047,"idParent":12039,"namaWilayah":"<NAME>","tingkatWilayah":4,"idPro":6728,"idKab":12038,"idKec":12039,"idKel":12047,"namaPro":"<NAME>","namaKab":"<NAME>","namaKec":"<NAME>","namaKel":"<NAME>UR","kodeWilayah":"12.75.01.1008"},{"id":12046,"idParent":12039,"namaWilayah":"<NAME>","tingkatWilayah":4,"idPro":6728,"idKab":12038,"idKec":12039,"idKel":12046,"namaPro":"<NAME>","namaKab":"<NAME>","namaKec":"<NAME>","namaKel":"<NAME>","kodeWilayah":"12.75.01.1007"},{"id":12041,"idParent":12039,"namaWilayah":"JATINEGARA","tingkatWilayah":4,"idPro":6728,"idKab":12038,"idKec":12039,"idKel":12041,"namaPro":"<NAME>","namaKab":"<NAME>","namaKec":"<NAME>","namaKel":"JATINEGARA","kodeWilayah":"12.75.01.1002"},{"id":12044,"idParent":12039,"namaWilayah":"KEBUN LADA","tingkatWilayah":4,"idPro":6728,"idKab":12038,"idKec":12039,"idKel":12044,"namaPro":"<NAME>","namaKab":"<NAME>","namaKec":"<NAME>","namaKel":"KEB<NAME>","kodeWilayah":"12.75.01.1005"},{"id":12042,"idParent":12039,"namaWilayah":"NANGKA","tingkatWilayah":4,"idPro":6728,"idKab":12038,"idKec":12039,"idKel":12042,"namaPro":"SUM<NAME>ARA","namaKab":"KOTA BINJAI","namaKec":"<NAME>","namaKel":"NANGKA","kodeWilayah":"12.75.01.1003"},{"id":12040,"idParent":12039,"namaWilayah":"PAHLAWAN","tingkatWilayah":4,"idPro":6728,"idKab":12038,"idKec":12039,"idKel":12040,"namaPro":"<NAME>","namaKab":"<NAME>","namaKec":"<NAME>","namaKel":"PAHLAWAN","kodeWilayah":"12.75.01.1001"}] | json |
{% extends 'base.html' %}
{% load staticfiles %}
{% block content %}
<form action="" method="post">{% csrf_token %}
{% include 'breadcrumb.html' with title='Remover' subtitle='Remova os itens que são desnecessários.' link1='Model' link2='Remover' %}
<div class="box box-primary" style="margin-top: 30px">
<div class="box-body">
<div class="row">
<div class="text-center">
<h3>Você realmente deseja deletar "{{ object }}" ?</h3>
</div>
</div>
</div>
<div class="box-footer">
<div class="row">
<div class="col-md-4 col-md-offset-2">
<a href="javascript:window.history.back();">
<button id="btn_cancelar" type="button" class="btn btn-default btn-lg btn-block">Cancelar</button>
</a>
</div>
<div class="col-md-4">
<button type="submit" class="btn btn-danger btn-lg btn-block pull-right">Deletar</button>
</div>
</div>
</div>
</div>
</form>
<script type="text/javascript">
$(document).ready(function () {
$('#model').addClass('active');
$('#model-list').addClass('active');
});
</script>
{% endblock %} | html |
Joshimath (Uttarakhand), Jan 19 (PTI) The hotel owner, the shopkeeper, the laundry owner, the roadside vendor… Hundreds of people watch in dismay as rapidly deepening cracks write the epitaph of their businesses and homes in a sinking town that was bustling till just a few weeks ago.
Their dreams for the future shattered, small businesspersons in the Himalayan town of Joshimath wonder how their lives could have been upended so completely – and so fast.
Suraj Kapruwan, a hotel management graduate who left his well-paying job in Mumbai and returned to Joshimath a few years ago to set up a laundry business, remembers the exact moment his plans for the future crumbled.
It was January 2 when land subsidence led to hairline wall fissures widening with a distant rumbling noise heard in some places, leading to gaping cracks in houses, streets and other establishments of the town of nearly 23,000 people, “The disaster shattered my dreams. Tourists have stopped coming here, and bookings have been cancelled. I had to let go of my staff of nine people,” an emotional Kuprawan told PTI.
He set up a laundry to cash in on the booming tourist business of the town, which acts as a gateway to several Himalayan mountain climbing expeditions, trekking trails, and pilgrim centres such as Badrinath and Hemkund Sahib, and also the Valley of Flowers, a UNESCO world heritage site.
“We are mountain people. In the absence of opportunities, many people leave Joshimath for the plains. I thought if I come back, I might be able to help a few more people to stay back and work towards the upliftment of the town,” he said, ruing perhaps his decision to return home.
The 38-year-old said he spent about Rs 35 lakh to set up his laundry, a major chunk going into buying IFB machines worth Rs 20 lakh.
“The setup has developed a wide crack in its basement and has been included in the danger zone,” said Kapruwan.
“Whatever I tried to stitch together in the last few years has been torn to shreds,” he said.
According to Naini Singh Bhandari, chairperson of the Vyapar Mandal Sangh, Joshimath has around 600 business owners, including those who own homestays, hotels, clothing shops and restaurants. Of these, 50 establishments are already in the Red Zone category and off limits.
“These businesses are totally dependent on tourism. We are being told to vacate the damaged shops but where will we go with all the equipment and goods? Overall, business has suffered drastically,” he told PTI.
“We are demanding proper compensation for our goods and a rehabilitation package for traders so they can start their business again… or they should be provided jobs. ” He said many people have taken loans from businesses and relatives for their ventures.
“They had to pay huge sums as ‘pagdi’ to start the businesses. What do they do in the face of so much uncertainty,” he asked.
Carefully calibrated plans for the future have collapsed into nothingness, said residents of this picturesque town.
Suraj Singh, who moved to Joshimath from a village about 30 km away so his children could go to a better school, had set up a shop near the Joshimath-Auli ropeway selling trekking shoes, jackets and other equipment to tourists.
But as the land sank, wide cracks appeared near the ropeway to the ski destination, thronged by visitors in this season. Operation of the ropeway was suspended last week when land subsidence aggravated.
“My business depends on the ropeway. My shop, as well as my house, has developed huge fissures and has been marked under a danger zone. I am trying to shift my goods to a safe locality but haven’t been able to find one yet,” Singh told PTI.
Though his family has shifted back to the village, he has to pay off his house loan.
“My house was only built in 2016. I have a bank loan on me. It looks like this calamity will only get worse,” Singh said, requesting the government to compensate traders.
Vivek Rawat, the owner of a restaurant near the two hotels dangerously leaning towards each other, said tourists have stopped coming since word spread about the land sinking.
The hotels, Malari Inn and Mount View, have been declared unsafe and are being dismantled.
“We were expecting good footfall after the recent snowfall in Auli and higher reaches, but the subsidence event has put a huge dent in our earnings,” Rawat told PTI.
Although his restaurant has not been shut yet, Rawat, a father of a six-year-old, said it will be only a matter of time before that happens.
“The cracks are increasing every day. I don’t know when my shop also comes under its grip,” he said.
Business, he added, has fallen to 20 per cent of what it was, and that too in peak tourist season.
After the January 2 subsidence, his house was one of those totally damaged. His family of six have shifted to a shelter home provided by the authorities.
“We didn’t bring this upon us. The government allowed the NTPC to dig a tunnel here,” said Vyapar Mandal Sangh’s Bhandari.
Although studies are on to find the reason behind the subsidence, residents and activists here alleged that one of the projects of the National Thermal Power Corporation (NTPC) have contributed to it.
The NTPC, however, has denied any link between the project and Joshimath’s subsidence, saying the tunnel connected to the Tapovan Vishnugad hydroelectric project does not pass under Joshimath.
Chamoli District Magistrate Himanshu Khurana said a resettlement and rehabilitation package for the affected people is being prepared.
Khurana who has been meeting affected families said the stakeholders want to be compensated in different ways.
“We are in consultation with people and listening to what kind of a rehabilitation package they want from the authorities,” Khurana told PTI.
“We will include the compensation for those who have lost livelihoods in the final rehabilitation package. We are hopeful that there is a consensus soon on that so that we can act on it further,” he added.
What next? The question haunts families in Joshimath, propelled into national headlines after the subsidence came to light.
Kapruwan said they were aware something was wrong ever since the wide cracks started developing in a line around the neighborhood last year but didn’t ever imagine it could lead to crisis such as this.
“Just a few days back I was providing employment to people, but now I will have to find work. To start all over again from zero at this age will be difficult,” he said.
This report is auto-generated from PTI news service. ThePrint holds no responsibility for its content. | english |
Russia may miss its revenue target for 2024 and be forced to increase business taxes if the rouble strengthens more than expected and economic assumptions fall short, according to analysts. The country's budget plans project Brent crude prices averaging $85 per barrel next year, but there are concerns the Urals price could fall below $60 in 2024-2026.
The military attack on Ukraine cast a shadow over global markets and sparked a fresh bout of risk aversion. Russian assets took the main blow after President Vladimir Putin ordered an operation to “demilitarize” Russia’s neighbor, prompting international condemnation and a U.S. threat of further “severe sanctions” on Moscow.
| english |
A look at the headlines right now:
- Donald Trump, Narendra Modi to discuss bilateral partnership, trade deal today: Meanwhile, former Prime Minister Manmohan Singh turned down an invite to the state banquet organised in honour of Trump’s first visit to India.
- Four protestors among five who died in Delhi clashes over CAA suffered bullet injuries, says doctor: A man who was seen firing during the violence in the Jaffrabad area has been detained.
- Harvey Weinstein convicted of felony sex crime and rape after six women testify against him: The jury found Weinstein guilty on two counts – a criminal sexual act in the first degree and rape in the third degree.
- Court orders UP police chief to act against police officials who attacked students in AMU: The Allahabad High Court passed the order on the basis of a recommendation made by the National Human Rights Commission.
- Sunni Waqf Board accepts alternative land in Ayodhya offered by UP government: The alternative spot was a point of controversy because some of the Muslim litigants in the case had said it was too far from Ayodhya.
- Sonia Gandhi condemns Delhi violence, says no place for communal ideology: A constable was among five people killed, and at least 50 people were injured as mobs threw stones at each other, and set shops, houses and vehicles on fire.
- Air Force pilot dies after NCC plane crashes in Patiala, cadet injured: The two-seater aircraft, which is used for training, crashed in the military area near Patiala Aviation Club.
- Indian markets tumble 2% as coronavirus pandemic spreads: Tata Steel declined over 6% on the BSE, becoming the top loser.
- Lucknow University plans course on teaching women how to behave when they’re pregnant: The programme was planned reportedly after Governor Anandiben Patel proposed it.
- Photos show CAA supporters attacking Muslims at Delhi protest, hurling stones and petrol bombs: The Delhi Police tried to quell the protests, but one policeman and a civilian died during the violence.
| english |
<reponame>jonra1993/Stepper-Motor-Control
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>AVR446 - Linear speed control of stepper motor: speedRampData struct Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.7 -->
<div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<h1>speedRampData Struct Reference</h1><code>#include <<a class="el" href="speed__cntr_8h-source.html">speed_cntr.h</a>></code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Holding data used by timer interrupt for speed ramp calculation.
<p>
Contains data used by timer interrupt to calculate speed profile. Data is written to it by move(), when stepper motor is moving (timer interrupt running) data is read/updated when calculating a new step_delay
<p>
<p>
Definition at line <a class="el" href="speed__cntr_8h-source.html#l00030">30</a> of file <a class="el" href="speed__cntr_8h-source.html">speed_cntr.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>signed int </td><td class="memItemRight" valign=bottom><a class="el" href="structspeedRampData.html#o0">accel_count</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Counter used when accelerateing/decelerateing to calculate step_delay. <a href="#o0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int </td><td class="memItemRight" valign=bottom><a class="el" href="structspeedRampData.html#o1">decel_start</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">What step_pos to start decelaration. <a href="#o1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>signed int </td><td class="memItemRight" valign=bottom><a class="el" href="structspeedRampData.html#o2">decel_val</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets deceleration rate. <a href="#o2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned char </td><td class="memItemRight" valign=bottom><a class="el" href="structspeedRampData.html#o3">dir</a>: 1</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Direction stepper motor should move. <a href="#o3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>signed int </td><td class="memItemRight" valign=bottom><a class="el" href="structspeedRampData.html#o4">min_delay</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Minimum time delay (max speed). <a href="#o4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned char </td><td class="memItemRight" valign=bottom><a class="el" href="structspeedRampData.html#o5">run_state</a>: 3</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">What part of the speed ramp we are in. <a href="#o5"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int </td><td class="memItemRight" valign=bottom><a class="el" href="structspeedRampData.html#o6">step_delay</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Peroid of next timer delay. At start this value set the accelration rate. <a href="#o6"></a><br><br></td></tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="o0" doxytag="speedRampData::accel_count" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> signed int <a class="el" href="structspeedRampData.html#o0">speedRampData::accel_count</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Counter used when accelerateing/decelerateing to calculate step_delay.
<p>
<p>
Definition at line <a class="el" href="speed__cntr_8h-source.html#l00044">44</a> of file <a class="el" href="speed__cntr_8h-source.html">speed_cntr.h</a>.
<p>
Referenced by <a class="el" href="speed__cntr_8c-source.html#l00046">speed_cntr_Move()</a>, and <a class="el" href="speed__cntr_8c-source.html#l00164">speed_cntr_TIMER1_COMPA_interrupt()</a>. </td>
</tr>
</table>
<a class="anchor" name="o1" doxytag="speedRampData::decel_start" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> unsigned int <a class="el" href="structspeedRampData.html#o1">speedRampData::decel_start</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
What step_pos to start decelaration.
<p>
<p>
Definition at line <a class="el" href="speed__cntr_8h-source.html#l00038">38</a> of file <a class="el" href="speed__cntr_8h-source.html">speed_cntr.h</a>.
<p>
Referenced by <a class="el" href="speed__cntr_8c-source.html#l00046">speed_cntr_Move()</a>, and <a class="el" href="speed__cntr_8c-source.html#l00164">speed_cntr_TIMER1_COMPA_interrupt()</a>. </td>
</tr>
</table>
<a class="anchor" name="o2" doxytag="speedRampData::decel_val" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> signed int <a class="el" href="structspeedRampData.html#o2">speedRampData::decel_val</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Sets deceleration rate.
<p>
<p>
Definition at line <a class="el" href="speed__cntr_8h-source.html#l00040">40</a> of file <a class="el" href="speed__cntr_8h-source.html">speed_cntr.h</a>.
<p>
Referenced by <a class="el" href="speed__cntr_8c-source.html#l00046">speed_cntr_Move()</a>, and <a class="el" href="speed__cntr_8c-source.html#l00164">speed_cntr_TIMER1_COMPA_interrupt()</a>. </td>
</tr>
</table>
<a class="anchor" name="o3" doxytag="speedRampData::dir" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> unsigned char <a class="el" href="structspeedRampData.html#o3">speedRampData::dir</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Direction stepper motor should move.
<p>
<p>
Definition at line <a class="el" href="speed__cntr_8h-source.html#l00034">34</a> of file <a class="el" href="speed__cntr_8h-source.html">speed_cntr.h</a>.
<p>
Referenced by <a class="el" href="speed__cntr_8c-source.html#l00046">speed_cntr_Move()</a>, and <a class="el" href="speed__cntr_8c-source.html#l00164">speed_cntr_TIMER1_COMPA_interrupt()</a>. </td>
</tr>
</table>
<a class="anchor" name="o4" doxytag="speedRampData::min_delay" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> signed int <a class="el" href="structspeedRampData.html#o4">speedRampData::min_delay</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Minimum time delay (max speed).
<p>
<p>
Definition at line <a class="el" href="speed__cntr_8h-source.html#l00042">42</a> of file <a class="el" href="speed__cntr_8h-source.html">speed_cntr.h</a>.
<p>
Referenced by <a class="el" href="speed__cntr_8c-source.html#l00046">speed_cntr_Move()</a>, and <a class="el" href="speed__cntr_8c-source.html#l00164">speed_cntr_TIMER1_COMPA_interrupt()</a>. </td>
</tr>
</table>
<a class="anchor" name="o5" doxytag="speedRampData::run_state" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> unsigned char <a class="el" href="structspeedRampData.html#o5">speedRampData::run_state</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
What part of the speed ramp we are in.
<p>
<p>
Definition at line <a class="el" href="speed__cntr_8h-source.html#l00032">32</a> of file <a class="el" href="speed__cntr_8h-source.html">speed_cntr.h</a>.
<p>
Referenced by <a class="el" href="speed__cntr_8c-source.html#l00143">speed_cntr_Init_Timer1()</a>, <a class="el" href="speed__cntr_8c-source.html#l00046">speed_cntr_Move()</a>, and <a class="el" href="speed__cntr_8c-source.html#l00164">speed_cntr_TIMER1_COMPA_interrupt()</a>. </td>
</tr>
</table>
<a class="anchor" name="o6" doxytag="speedRampData::step_delay" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> unsigned int <a class="el" href="structspeedRampData.html#o6">speedRampData::step_delay</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Peroid of next timer delay. At start this value set the accelration rate.
<p>
<p>
Definition at line <a class="el" href="speed__cntr_8h-source.html#l00036">36</a> of file <a class="el" href="speed__cntr_8h-source.html">speed_cntr.h</a>.
<p>
Referenced by <a class="el" href="speed__cntr_8c-source.html#l00046">speed_cntr_Move()</a>, and <a class="el" href="speed__cntr_8c-source.html#l00164">speed_cntr_TIMER1_COMPA_interrupt()</a>. </td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Mon May 8 15:05:04 2006 for AVR446 - Linear speed control of stepper motor by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address>
</body>
</html>
| html |
{
"readerAssignmentRetrieveActionTaskRecord" : {},
"readerAssignmentRetrieveActionResponse" : "readerAssignmentRetrieveActionResponse",
"issuedDeviceAllocationInstanceRecord" : {
"productInstanceReference" : "768264",
"associatedPermissions" : "associatedPermissions",
"customerReference" : "742752",
"issuedDeviceType" : "issuedDeviceType",
"validFromToDate" : "09-22-2018"
},
"readerAssignmentInstanceAnalysis" : {
"readerAssignmentInstanceAnalysisParameters" : "readerAssignmentInstanceAnalysisParameters",
"readerAssignmentInstanceAnalysisReport" : {},
"readerAssignmentInstanceAnalysisReportType" : "readerAssignmentInstanceAnalysisReportType",
"readerAssignmentInstanceAnalysisRecord" : {}
},
"readerAssignmentInstanceReport" : {
"readerAssignmentInstanceReportParameters" : "readerAssignmentInstanceReportParameters",
"readerAssignmentInstanceReportRecord" : {},
"readerAssignmentInstanceReport" : {},
"readerAssignmentInstanceReportType" : "readerAssignmentInstanceReportType"
},
"readerAssignmentInstanceRecord" : {
"issuedDeviceConfiguration" : "issuedDeviceConfiguration",
"usageLog" : "usageLog",
"versionNumber" : "versionNumber",
"issueLocation" : "issueLocation"
},
"readerAssignmentRetrieveActionTaskReference" : "RARATR751831"
} | json |
For years, we have had much discussion in this country about administrative and bureaucratic reforms. We have had two administrative reforms commissions that have given voluminous reports and suggested many changes. But the common feeling is that little has changed. Last year, after the new government came to power it issued a 19 points Do’s and Don’ts to the bureaucracy aimed at improving the administration and making it responsive and transparent. Though none of the points were revolutionary, it did give the bureaucrats a clear picture of what is expected of them. Now the government through the DoPT has come up with another order which seeks to retire compulsorily bureaucrats who are either incompetent or tainted. This order also says once these officers are identified through a process, they will be given a three months time to pack their bags.
Experts say that there is nothing new in this circular. Such rules were already there under the fundamental rules since 1919. After the constitution came into force these rules were adopted under Article 372. Fundamental Rule 56(J) and Rules 48 of the CCS (Pension) Rules, 1972, speak about retirement of inefficient and corrupt officers. As per the Fundamental Rule 56(J), the government has an absolute right to retire, if necessary in the public interest, any Group A and B employee who joined service before the age of 35 and has crossed the age of 50. Group C government servants, having crossed the age of 55, can also be retired prematurely under the rules.
The government has asked all central ministries and departments to take into account all relevant records including personal file of such officers, besides assessing their performance based on files dealt by them. The review is not confined to the consideration of the ACR/APAR dossier. The personal file of the officer may contain valuable material. The work and performance of the officer could also be assessed by looking into files dealt by him or in any papers or reports prepared or submitted by him. The government has also clarified that compulsory retirement shall not be imposed as a punitive measure.
Some experts say that it is necessary to chop off dead wood, but the order of compulsory retirement can be passed after having due regard to the entire service record of the officer.
The problem, however, is that compulsory retirement can also become a tool to persecute bureaucrats since the SC orders can be interpreted quite widely. In S Ramachandra Raju vs State of Orissa, the supreme court of India has said that while “there may not be sufficient evidence to take punitive disciplinary action but his conduct and reputation is such that his continuance in service would be a menace to public service and injurious to public interest”.
Previous government had amended All India Service Rules to provide for compulsory retirement of substandard bureaucrats after just 15 years of service. Compulsory retirement is a desirable approach as the efficacy of a system is determined by the set of incentives facing people who exercise power. The Supreme Court, in a 1980 judgment, has said that compulsory retirement “is undoubtedly in public interest and is not passed by way of punishment”. This judgment was backed by another one supporting the idea of letting go of people in public interest.
The government should also act on suggestions made by the last three pay commissions to link a bureaucrat’s salary to performance. There is a need to link pay to performance to improve work culture. The sixth pay commission suggested an independent external agency measure the performance of bureaucrats with the aim of linking overall payment to performance. Another pay commission has recommended that underperformers be denied normal increment.
A large proportion of the annual budget is earmarked for salaries and pensions. Only the residual amount of money can be used for developmental needs. In this context, getting more out of the bureaucracy is an essential element of administrative reform.
| english |
import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
import { BaseEntity } from "./base.entity";
import { ProductCategory } from "./product-category.entity";
@Entity({ name: 'product' })
export class ProductEntity extends BaseEntity {
@Column()
name: string;
@ManyToOne(() => ProductCategory, category => category.products)
@JoinColumn({ name: 'category_id' })
category: ProductCategory
} | typescript |
<filename>data/song_data/A/P/D/TRAPDHE128EF34B402.json
{"artist_id":"ARGADUL1187B9A0399","artist_latitude":null,"artist_location":"","artist_longitude":null,"artist_name":"<NAME>","duration":216.81587,"num_songs":1,"song_id":"SOBZCXX12A6BD52A29","title":"Twenty-Six Summers (Painting The Invisible Album Version)","year":2007} | json |
LeBron James and Kevin Durant were under pressure to win one title for their respective teams. They are all-time greats who will be judged not purely by their accomplishments but also by their championship haul.
Chris Broussard said they approached winning their first championship in similar ways. With the pressure mounting, they left their respective teams to win a title.
Here's what the Fox Sports analyst had to say on why pressure pushed them to do the unexpected:
After seven seasons with the Cleveland Cavaliers, LeBron James infamously took his talents to South Beach in search of a title. Playing for an organization with Pat Riley heading the front office and Erik Spoelstra coaching did wonders for his career.
Riley offered LeBron the chance to win his first ring alongside Dwyane Wade and Chris Bosh. The "Heatles" went to the finals for four straight years, winning two. The monkey was off James' back in 2012.
Kevin Durant followed the same blueprint in getting his first NBA title. After eight years with the OKC Thunder, Durant joined the rival Golden State Warriors. With Steph Curry, Klay Thompson and Draymond Green, KD appeared in three consecutive NBA Finals, winning two rings.
But the similarities between the two ended there, according to Chris Broussard:
KD went to Brooklyn to build a team of his own. The results have been less than he expected, with little to no playoff success. He recently requested a trade from the Brooklyn Nets.
LeBron James added two championships to his resume. He delivered on his promise to bring a title to Cleveland and led the LA Lakers to their 17th title.
The chase for an NBA title between LeBron James and Kevin Durant reached a crescendo when they met in the 2012 finals. James famously underperformed in 2011 against the Dirk Nowitzki-led Dallas Mavericks. In 2012, the pressure to win was as significant as ever.
Meanwhile, Kevin Durant was the franchise player of a growing powerhouse in the West. He was only 23 years old when he led the OKC Thunder to the Finals. The Thunder's roster featured three future MVPs in KD, Russell Westbrook and James Harden. They won only one game against the "Heatles."
The 2012 NBA Finals was the closest Kevin Durant was to winning a championship as the sole leader.
How did Michael Jordan's gambling "habit" taint his image?
| english |
तेंदुलकर ने कहा, ‘‘खेल मेरी जिंदगी है। ये मेरे लिए ऑक्सीजन की तरह है। इसके बिना जीना मुश्किल है। कई लोग इसे पेशा कहते हैं लेकिन मुझे इसे पेशा कहना पसंद नहीं है। मैं इसे जुनून कहता हूं। मैं हमेशा खेलों के प्रति जुनूनी रहा।’’ उन्होंने इसके साथ ही उम्मीद जताई कि 6 से 27 अक्तूबर तक होने वाले फीफा अंडर-17 विश्व कप में भारतीय टीम का हौसला बढ़ाने के लिए बड़ी संख्या में दर्शक पहुंचेंगे।
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
| english |
import { pipe } from 'fp-ts/function';
import { retryLater } from './static-messages';
import { ArticleServer } from '../../types/article-server';
import { HtmlFragment, toHtmlFragment } from '../../types/html-fragment';
type ServerInfo = {
name: string,
avatarUrl: string,
versionsSupported: boolean,
};
const servers: Record<ArticleServer, ServerInfo> = {
biorxiv: {
name: 'bioRxiv',
avatarUrl: '/static/images/biorxiv.jpg',
versionsSupported: true,
},
medrxiv: {
name: 'medRxiv',
avatarUrl: '/static/images/medrxiv.jpg',
versionsSupported: true,
},
researchsquare: {
name: 'Research Square',
avatarUrl: '/static/images/researchsquare.png',
versionsSupported: false,
},
};
export const renderVersionErrorFeedItem = (server: ArticleServer): HtmlFragment => pipe(
servers[server],
(viewModel) => `
<div class="activity-feed__item__contents">
<header class="activity-feed__item__header">
<img class="activity-feed__item__avatar" src="${viewModel.avatarUrl}" alt="">
<div class="activity-feed__item__meta">
<div class="activity-feed__item__title">
Published on ${viewModel.name}
</div>
</div>
</header>
<p>
We couldn't get version information from ${viewModel.name}.
${viewModel.versionsSupported ? retryLater : ''}
</p>
</div>
`,
toHtmlFragment,
);
| typescript |
/* stylelint-disable block-no-empty */
.city {
background-color: #929fb3;
border-radius: 1.5em;
padding: 1em;
}
.city > :first-child {
margin-top: 0;
}
.city > :last-child {
margin-bottom: 0;
}
.city--cold {
background-color: #3f73be;
}
.city--warm {
background-color: #ec9414;
}
.city__country {
color: #b6bbc7;
margin: 0;
}
.city__link {
display: block;
}
.city__name {
margin: 0;
}
.city__temp {
}
| css |
A power-packed performance by Indian bowlers, followed by superb batting from Shikhar Dhawan and Virat Kohli helped India register an emphatic eight-wicket victory over Sri Lanka in the second semifinal and enter the final of the ICC Champions Trophy 2013. India, the only unbeaten team in the tournament so far, will take on hosts England in the final on Sunday.
India won the toss and elected to field first in Cardiff today. The seamers supported by the fielders tightened the noose on the Sri Lankan batsmen. The Lankans finished at 181/8 in 50 overs. Jayawardene (38), Mathews (51) and Jeevan Mendis (25) were the top scorers. For India, Ishant Sharma and R Ashwin took three wickets each.
Chasing a victory target of 182, the Indian openers added 77 runs for the first wicket. Rohit Sharma made 33. After his departure, Kohli and Dhawan took things forward. Dhawan scored yet another half century in the tournament. He scored 68. Dhawan has scored two hundreds, one 48 and another half century (today) in the ICC Championship 2013.
India reached 182/2 in 35 overs and won the match by 8 wickets. Apart from Rohit and Dhawan, Virat kohli remained unbeaten on 58. Ishant Sharma was declared “Man of the Match”. This is India 3rd appearance in the Champions Trophy final.
| english |
The World Baseball Classic '23 fever is upon us, and the tournament is scheduled to begin on March 8 and end on March 21. Tickets for the World Baseball Classic are offered on several websites with some enticing discounts.
Tickets for the Pool C and D opening rounds in Phoenix and Miami are currently on sale at ticketmaster.com, seatgeek.com, and vividseats.com. Depending on the website and the game selected, tickets range from $20 to $45. However, the majority of well-known games are either more expensive or unavailable.
The Dominican Republic vs. Puerto Rico game at LoanDepot Park in Miami is sold out. The websites above will allow you to buy tickets for most Pool C and Pool D games.
Tickets for all Group A games can be purchased at tixcraft.com, the Taiwanese subsidiary of ticketmaster.com. Pool A games will be played at the Taichung Stadium in Taipei since Chinese Taipei is one of the tournament hosts and was drawn in Group A. Fans can purchase tickets ranging from $33 to $106.
As for the Group B games, which include Japan (another host nation), the tickets can be bought on axs.com, with seven games stipulated to be played at the Tokyo Dome. There aren't many tickets left for the remaining fans to peek at their stars playing on the dirt because tickets for every round-robin game sell like hotcakes. You can still try to find a few reserved tickets for as little as $18.
The first two competitions were separated by three years, with Japan taking first place in 2006 and 2009. After that, the competition was held every four years, with the United States winning in 2017 and the Dominican Republic in 2013. The COVID-19 epidemic forced the cancellation of the WBC scheduled for 2021.
With three venues in place, fans will certainly have to travel the desired distances to watch their beloved teams take the field. Many had already planned the itinerary based on procuring WBC tickets. Four stadiums are stipulated to host all the games of the tournament, and tickets are available now for all the group games. Buy yours now!
Click here for 2023 MLB Free Agency Tracker Updates. Follow Sportskeeda for latest news and updates on MLB.
| english |
Mysore/Mysuru: The newly- formed Mysore Armed Forces Ex-servicemen Association will be jointly inaugurated by Mysuru-Kodagu MP Pratap Simha and Chamarajanagar MP V. Sreenivasa Prasad at a programme to take place at Kodagu Sahakara Sangha premises in Jayalakshmipuram tomorrow (Jan. 31) at 10. 30 am. Chamundeshwari MLA G. T. Devegowda and Association President Havildar (retd. ) P. K. Biddappa will preside….
Mysore/Mysuru: Following demand for premium branded plotted development in Mysuru, KNS INFRA has been delivering quality development since 14 years, over 25 million sq. ft developed and with around 10,000-plus happy customers. Now, KNS INFRA is back with its Phase-2 launch of its flagship project KNS ETHOS, adjacent to the Golf and Race Course in city…. | english |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.