text
stringlengths 1
1.04M
| language
stringclasses 25
values |
---|---|
<filename>test/integration/index.js
/* eslint-disable no-console */
"use strict";
const path = require("path");
const fs = require("fs-extra");
const child_process = require("child_process");
const jwt = require("jsonwebtoken");
const phin = require("phin");
const util = require("util");
const events = require("events");
const libLink = require("@clusterio/lib/link");
const server = require("@clusterio/lib/factorio/server");
const { ConsoleTransport, logger } = require("@clusterio/lib/logging");
const libLoggingUtils = require("@clusterio/lib/logging_utils");
// Make sure permissions from plugins are loaded
require("../../plugins/global_chat/info");
require("../../plugins/player_auth/info");
require("../../plugins/research_sync/info");
require("../../plugins/statistics_exporter/info");
require("../../plugins/subspace_storage/info");
class TestControl extends libLink.Link {
constructor(connector) {
super("control", "master", connector);
libLink.attachAllMessages(this);
this.slaveUpdates = [];
this.instanceUpdates = [];
this.saveListUpdates = [];
this.connector.on("connect", () => {
libLink.messages.setSlaveSubscriptions.send(
this, { all: true, slave_ids: [] }
).catch(err => logger.error(`Error setting slave subscriptions:\n${err.stack}`));
libLink.messages.setInstanceSubscriptions.send(
this, { all: true, instance_ids: [] }
).catch(err => logger.error(`Error setting instance subscriptions:\n${err.stack}`));
libLink.messages.setSaveListSubscriptions.send(
this, { all: true, instance_ids: [] }
).catch(err => logger.error(`Error setting save list subscriptions:\n${err.stack}`));
});
}
async prepareDisconnectRequestHandler(message, request) {
this.connector.setClosing();
return await super.prepareDisconnectRequestHandler(message, request);
}
async debugWsMessageEventHandler() { }
async slaveUpdateEventHandler(message) {
this.slaveUpdates.push(message.data);
}
async instanceUpdateEventHandler(message) {
this.instanceUpdates.push(message.data);
}
async saveListUpdateEventHandler(message) {
this.saveListUpdates.push(message.data);
}
async logMessageEventHandler() { }
}
class TestControlConnector extends libLink.WebSocketClientConnector {
register() {
this.sendHandshake("register_control", { token: this.token, agent: "clusterioctl", version: "test" });
}
}
// Mark that this test takes a lot of time, or depeneds on a test
// that takes a lot of time.
function slowTest(test) {
// eslint-disable-next-line node/no-process-env
if (process.env.FAST_TEST) {
test.skip();
}
test.timeout(20000);
}
async function get(urlPath) {
let res = await phin({
method: "GET",
url: `https://localhost:4443${urlPath}`,
core: { rejectUnauthorized: false },
});
if (res.statusCode !== 200) {
throw new Error(`Got response code ${res.statusCode}, content: ${res.body}`);
}
return res;
}
let masterProcess;
let slaveProcess;
let control;
let url = "https://localhost:4443/";
let controlToken = jwt.sign({ aud: "user", user: "test" }, "<PASSWORD>");
let instancesDir = path.join("temp", "test", "instances");
let databaseDir = path.join("temp", "test", "database");
let pluginListPath = path.join("temp", "test", "plugin-list.json");
let masterConfigPath = path.join("temp", "test", "config-master.json");
let slaveConfigPath = path.join("temp", "test", "config-slave.json");
let controlConfigPath = path.join("temp", "test", "config-control.json");
async function exec(command, options = {}) {
console.log(command);
options = { cwd: path.join("temp", "test"), ...options };
return await util.promisify(child_process.exec)(command, options);
}
async function execCtl(...args) {
args[0] = `node ../../packages/ctl ${args[0]}`;
return await exec(...args);
}
async function sendRcon(instanceId, command) {
let response = await libLink.messages.sendRcon.send(control, { instance_id: instanceId, command });
return response.result;
}
function getControl() {
return control;
}
function spawn(name, cmd, waitFor) {
return new Promise((resolve, reject) => {
console.log(cmd);
let parts = cmd.split(" ");
let process = child_process.spawn(parts[0], parts.slice(1), { cwd: path.join("temp", "test") });
let stdout = new server._LineSplitter((line) => {
line = line.toString("utf8");
if (waitFor.test(line)) {
resolve(process);
}
console.log(name, line);
});
let stderr = new server._LineSplitter((line) => { console.log(name, line.toString("utf8")); });
process.stdout.on("data", chunk => { stdout.data(chunk); });
process.stdout.on("close", () => { stdout.end(); });
process.stderr.on("data", chunk => { stderr.data(chunk); });
process.stderr.on("close", () => { stderr.end(); });
});
}
before(async function() {
this.timeout(40000);
// Some integration tests may cause log events
logger.add(new ConsoleTransport({
level: "info",
format: new libLoggingUtils.TerminalFormat(),
}));
await fs.remove(databaseDir);
await fs.remove(instancesDir);
await fs.remove(pluginListPath);
await fs.remove(masterConfigPath);
await fs.remove(slaveConfigPath);
await fs.remove(controlConfigPath);
await fs.ensureDir(path.join("temp", "test"));
await exec("node ../../packages/master config set master.auth_secret TestSecretDoNotUse");
await exec("node ../../packages/master config set master.http_port 8880");
await exec("node ../../packages/master config set master.https_port 4443");
await exec("node ../../packages/master config set master.heartbeat_interval 0.25");
await exec("node ../../packages/master config set master.connector_shutdown_timeout 2");
await exec("node ../../packages/master config set master.tls_certificate ../../test/file/tls/cert.pem");
await exec("node ../../packages/master config set master.tls_private_key ../../test/file/tls/key.pem");
await exec("node ../../packages/ctl plugin add ../../plugins/global_chat");
await exec("node ../../packages/ctl plugin add ../../plugins/research_sync");
await exec("node ../../packages/ctl plugin add ../../plugins/statistics_exporter");
await exec("node ../../packages/ctl plugin add ../../plugins/subspace_storage");
await exec("node ../../packages/ctl plugin add ../../plugins/player_auth");
await exec("node ../../packages/master bootstrap create-admin test");
await exec("node ../../packages/master bootstrap create-ctl-config test");
await exec("node ../../packages/ctl control-config set control.tls_ca ../../test/file/tls/cert.pem");
masterProcess = await spawn("master:", "node ../../packages/master run", /Started master/);
await execCtl("slave create-config --id 4 --name slave --generate-token");
await exec(`node ../../packages/slave config set slave.factorio_directory ${path.join("..", "..", "factorio")}`);
await exec("node ../../packages/slave config set slave.tls_ca ../../test/file/tls/cert.pem");
slaveProcess = await spawn("slave:", "node ../../packages/slave run", /SOCKET \| registering slave/);
let tlsCa = await fs.readFile("test/file/tls/cert.pem");
let controlConnector = new TestControlConnector(url, 2, tlsCa);
controlConnector.token = controlToken;
control = new TestControl(controlConnector);
await controlConnector.connect();
});
after(async function() {
this.timeout(20000);
if (slaveProcess) {
console.log("Shutting down slave");
slaveProcess.kill("SIGINT");
await events.once(slaveProcess, "exit");
}
if (masterProcess) {
console.log("Shutting down master");
masterProcess.kill("SIGINT");
await events.once(masterProcess, "exit");
}
if (control) {
await control.connector.close();
}
});
// Ensure the test processes are stopped.
process.on("exit", () => {
if (slaveProcess) { slaveProcess.kill(); }
if (masterProcess) { masterProcess.kill(); }
});
module.exports = {
TestControl,
TestControlConnector,
slowTest,
get,
exec,
execCtl,
sendRcon,
getControl,
spawn,
url,
controlToken,
instancesDir,
databaseDir,
masterConfigPath,
slaveConfigPath,
controlConfigPath,
};
| javascript |
Is abusive behaviour a choice?
I was once called a whore. Chances are, so have you, if you're a woman.
And like me, you've probably been called other names too (and I'm sorry that you have), but this is the one I choose to focus on because this one befuddles me.
What is the intent of a statement like this? Who is being debased? Me? Sex workers?
Both are problematic, obviously. In the same way it's problematic when the word chasha, farmer, is hurled as an abuse.
Because these words have political content.
These words, they assume a certain class position, status, and power - perceived or otherwise - over the person(s) that these words are directed towards. They contain the idea of being better than the other, they contain disparagement, they contain misogyny.
In my research, I've found something else as well: status inconsistency, or in regular parlance, a battered ego.
I found that it is when status is threatened (and status inconsistency occurs) that some individuals resort to being abusive. This is more like, I theorise, when the status quo is patriarchal to begin with. And thus I found an answer to why I was called a whore. I was called a whore because that's what men call you when they can't control you, or your thoughts. That's what women call you too, when they buy into the same patriarchy that governs them.
Recent research indicates that 80 percent of a nationally representative sample of women in Bangladesh reported experiencing domestic violence in their intimate relationships. That's a lot of people. And, pretty alarming.
As good citizens what are we to do when we witness or have knowledge of such violence? Ensure that those who are or have been experiencing violence have a safety plan including a safe place to go to. This may be difficult; many individuals remain in violent relationships because they have nowhere else to go, because they're dependent on their partners. "Leaving the abuse" may render them homeless. These are valid reasons for which many women don't and can't access help. However, there are organisations such as BNWLA and ASK that one can reach out to for help.
"Violence need not be physical for it to be violent. I will invoke what my colleague Annette Semanchin-Jones recently said: emotional violence may be far more harmful than one instance of physical abuse.
At the same time, we have to recognise that individuals who abuse their partners (or others) need various types of therapy - including anger management and cognitive behavioural therapy (CBT). CBT is a good choice because they need a shift in their mindsets, they need to let go of misogyny and sexism, they need to reframe their negative and dehumanising ideals about the people that they abuse, they need to stop believing in patriarchy. They need to learn new behaviours to replace the abusive ones. They need to learn what to do when they get angry.
This is to say that people can change but success depends on whether they voluntarily seek help or are coerced to, for example by the courts. Research shows that voluntary participation in interventions is far more likely to be successful than mandatory participation. But how do we know if people have actually changed?
Various scholars have developed guidelines to assess change among those with a history of violence. One that I like is Bancroft and Silverman's guideline which incorporates elements of restorative justice. They propose assessing the following questions when estimating the degree of change:
Has he made full disclosure of his history of physical, sexual, and psychological and other forms of abuse?
Has he recognised that abusive behaviour is unacceptable?
Has he recognised that abusive behaviour is a choice?
Does he show empathy for the effects of his actions on his partner and children?
Can he identify his pattern of controlling behaviours and entitled attitudes?
Has he replaced abusive behaviours with respectful behaviours and attitudes?
Is he willing to make amends in a meaningful way?
Does he accept consequences for his actions?
I like this framework because it ensures that there is cognitive engagement on the part of the individuals who want to change, who can then demonstrate that they've unlearned their abusive behaviours, thus distancing themselves from such behaviours, with the understanding that behaviours can change; that it is important to repent, and take responsibility for actions that have harmed others; and that their use of violence is not "who they are. "
But individuals with a history of violence aren't the only ones who need to change their mindsets. The society as a whole does. I say this because it's not uncommon for people to brush aside or even condone violence and abusive behaviours, particularly of people they know and love, and against people and groups they don't care for.
I am going to point to a couple of reasons.
One, they support individuals who abuse their partners because they don't know what else to do. They feel the need to be supportive, as they perhaps should, but they don't know how to do that and be helpful at the same time, and thus become enablers. And therein lies the problem; the message that enablers send is that it's okay to abuse people. This is not helpful for anyone involved. Friends and family of individuals who abuse are especially well placed to help individuals recognise the problem with their behaviour, and encourage them to change that behaviour. Such enablers need to understand that being supportive need not equal accepting their behaviours.
Two, they themselves subscribe to the same ideals of misogyny, sexism, and patriarchy that allow the use of violence against women (and others). As such they end up victim blaming and calling into question the reasons for which violence was used in the first place. Indeed, even women believe in patriarchy. It is perhaps inevitable given that patriarchy informs the social order within which we live.
And a third reason is that violence and subjugation of women is normalised. It's so pervasive that it's normal. When it happens, people are no longer shocked. And more times than not, people justify violence against women. Even women.
Fourth, people don't know who to blame, as if we have to blame someone. In my interviews with women, I have found many women term it as a problem with their fate, not the men or their behaviours in question. It's one way of coping with the violence in their lives, particularly if they see no way out of it.
Fifth, women who have withstood abuse in their previous relationship(s) might sometimes bring that same abuse and violence into their new relationship(s), especially when unmitigated through lack of therapy, where they might use violence - physical or emotional - which they have learned as "conflict resolution"which in turn might be reciprocated, resulting in further use of violence.
Violence need not be physical for it to be violent. I will invoke what my colleague Annette Semanchin-Jones recently said: emotional violence may be far more harmful than one instance of physical abuse.
As I recall all the khota, jabs, that I've received in my life, many of which I have found difficult to forget, I recognise that that is a form of emotional abuse. | english |
Cleaning can be a chore, but having a helpful toddler can make the process a little more challenging.
My little girl has decided that she wants to help with just about ever aspect of daily life. She looks up at me with her big brown eyes and declares, "I help!"
I do try and let her help as much as I can, since I know it will teach her good skills for the future. She's very good at putting trash in the trash can, and picking up some of her toys.
But I was folding towels and she decided she wanted to help. Her folding technique was comprised of pushing the towel into a ball and then trying to add it to my neat piles.
I ended up just giving her the folded towels to put in the appropriate pile, which she was happy to do. Then she insisted on helping put them away which involved me having to hold her up so she could stuff the towels into the closet. It was actually quite cute.
Even though it does take extra time to get chores done this way, it is teaching her good skills. So I'll continue to let her help as long as she wants to. And do any cleaning that I don't want her to help with while she's asleep!
| english |
American retailer RadioShack that rebranded itself into an online-focused brand in 2020, is considering to foray further into the crypto market as an exchange platform. Banking on its established market reputation, the company is planning to target older CEOs and help them enter the crypto space. Citing research, RadioShack website says the average CEO age for companies is 68 years, but people that age often refrain from trying out new technologies.
The company, that recently launched its own native token RADIO, believes that cryptocurrency companies are not taking the “old-school, customer feel comfortable” approach to rope in elderly investors to enter the crypto space.
“There is a real generational gap between the average crypto buyer and the average business decision-maker. This demographic difference creates a substantial psychological barrier to crypto adoption. We will be the bridge between the CEOs who lead the world's corporations and the new world of cryptocurrencies,” says the company website.
“Crypto hasn't even gotten started yet. What an opportunity for those who come to market quickly,” an official RadioShack blog said.
The cryptocurrency market is booming internationally. Presently, the global crypto market capitalisation is around $3 trillion (roughly Rs. 2,15,66,720 crore) as per the data by CoinMarketCap.
The year 2021 has emerged as a benchmark for the crypto market in other ways as well.
For instance, a recent report by PitchBook Data revealed that crypto-related firms collectively raised more than $30 billion (roughly Rs. 2,27,617 crore) from venture capital firms in 2021, making it the highest collection so far. In 2018, the same number was $8 billion (roughly Rs. 60,704 crore).
Catch the latest from the Consumer Electronics Show on Gadgets 360, at our CES 2024 hub.
| english |
import * as pg from 'pg'
import { ResultError } from './errors'
import { SqlQuery } from './SqlQuery'
import { coerce, map, mapField } from './util'
/** A connection pool or a connection checked out of a pool. */
export type Connection = pg.Pool | pg.PoolClient
/**
* Execute a `SELECT` or other query that returns zero or more rows.
*
* Returns all rows.
*
* @param connection A connection pool or a connection checked out from a pool.
* @param sql The SQL query to execute.
* @param rowParser A function that validates and transforms each row.
*/
export async function query<T>(
connection: Connection,
sql: SqlQuery,
rowParser: (row: unknown) => T = coerce
): Promise<T[]> {
const { fields, rows } = await send(connection, sql)
if (fields.length !== 1) {
return rowParser === coerce ? rows : map(rowParser, rows)
} else {
return mapField(fields[0].name, rowParser, rows)
}
}
/**
* Execute a `SELECT` or other query that returns exactly one row.
*
* Returns the first row.
*
* - Throws a `ResultError` if query does not return exactly one row.
*
* @param connection A connection pool or a connection checked out from a pool.
* @param sql The SQL query to execute.
* @param rowParser A function that validates and transforms the row.
*/
export async function queryOne<T = unknown>(
connection: Connection,
sql: SqlQuery,
rowParser: (row: unknown) => T = coerce
): Promise<T> {
const { fields, rows } = await send(connection, sql)
const { length } = rows
if (length !== 1) {
throw new ResultError(
`Expected query to return exactly 1 row, got ${length}`,
sql
)
}
return fields.length !== 1
? rowParser(rows[0])
: rowParser(rows[0][fields[0].name])
}
/**
* Execute a `SELECT` or other query that returns zero or one rows.
*
* Returns the first row or `undefined`.
*
* - Throws a `ResultError` if query returns more than 1 row.
*
* @param connection A connection pool or a connection checked out from a pool.
* @param sql The SQL query to execute.
* @param rowParser A function that validates and transforms each row.
*/
export async function queryMaybeOne<T = unknown>(
connection: Connection,
sql: SqlQuery,
rowParser: (row: unknown) => T = coerce
): Promise<T | undefined> {
const { fields, rows } = await send(connection, sql)
const { length } = rows
if (length > 1) {
throw new ResultError(
`Expected query to return 0–1 rows, got ${length}`,
sql
)
}
return length === 0
? undefined
: fields.length !== 1
? rowParser(rows[0])
: rowParser(rows[0][fields[0].name])
}
/**
* Execute an `INSERT`, `UPDATE`, `DELETE` or other query that is not expected to return any rows.
*
* Returns the number of rows affected.
*
* @param connection A connection pool or a connection checked out from a pool.
* @param sql The SQL query to execute.
*/
export async function execute(
connection: Connection,
sql: SqlQuery
): Promise<number> {
const { rowCount } = await send(connection, sql)
return rowCount
}
function send(connection: Connection, sql: SqlQuery): Promise<pg.QueryResult> {
if (!(sql instanceof SqlQuery)) {
throw new TypeError(
'The query was not constructed with the `sql` tagged template literal'
)
}
return connection.query(sql)
}
| typescript |
<gh_stars>1-10
// BSD 3-Clause License
// Copyright (c) 2019, SCALE Lab, Brown University
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither the name of the copyright holder nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// Temproary fix for OpenSTA import ordering
#define THROW_DCL throw()
#include "Psn.hpp"
#include <tcl.h>
#include "Config.hpp"
#include "FileUtils.hpp"
#include "OpenPhySyn/DatabaseHandler.hpp"
#include "OpenPhySyn/PsnGlobal.hpp"
#include "OpenPhySyn/PsnLogger.hpp"
#include "PsnException.hpp"
#include "StringUtils.hpp"
#include "TransformHandler.hpp"
#include "db_sta/dbSta.hh"
#ifdef OPENPHYSYN_AUTO_LINK
#include "StandardTransforms/BufferFanoutTransform/src/BufferFanoutTransform.hpp"
#include "StandardTransforms/ConstantPropagationTransform/src/ConstantPropagationTransform.hpp"
#include "StandardTransforms/GateCloningTransform/src/GateCloningTransform.hpp"
#include "StandardTransforms/HelloTransform/src/HelloTransform.hpp"
#include "StandardTransforms/PinSwapTransform/src/PinSwapTransform.hpp"
#endif
extern "C"
{
extern int Psn_Init(Tcl_Interp* interp);
}
namespace psn
{
Psn* Psn::psn_instance_;
bool Psn::is_initialized_ = false;
Psn::Psn(DatabaseSta* sta) : sta_(sta), db_(nullptr), interp_(nullptr)
{
exec_path_ = FileUtils::executablePath();
db_ = sta_->db();
db_handler_ = new DatabaseHandler(this, sta_);
}
void
Psn::initialize(DatabaseSta* sta, bool load_transforms, Tcl_Interp* interp,
bool import_psn_namespace, bool print_psn_version,
bool setup_sta_tcl)
{
psn_instance_ = new Psn(sta);
if (load_transforms)
{
psn_instance_->loadTransforms();
}
if (interp != nullptr)
{
psn_instance_->setupInterpreter(interp, import_psn_namespace,
print_psn_version, setup_sta_tcl);
}
is_initialized_ = true;
}
Psn::~Psn()
{
delete db_handler_;
}
Database*
Psn::database() const
{
return db_;
}
DatabaseSta*
Psn::sta() const
{
return sta_;
}
LibraryTechnology*
Psn::tech() const
{
return db_->getTech();
}
DatabaseHandler*
Psn::handler() const
{
return db_handler_;
}
Psn&
Psn::instance()
{
if (!is_initialized_)
{
PSN_LOG_CRITICAL("OpenPhySyn is not initialized!");
}
return *psn_instance_;
}
Psn*
Psn::instancePtr()
{
return psn_instance_;
}
int
Psn::loadTransforms()
{
std::vector<psn::TransformHandler> handlers;
int load_count = 0;
#ifdef OPENPHYSYN_AUTO_LINK
#ifdef OPENPHYSYN_TRANSFORM_HELLO_TRANSFORM_ENABLED
handlers.push_back(TransformHandler("hello_transform",
std::make_shared<HelloTransform>()));
#endif
#ifdef OPENPHYSYN_TRANSFORM_BUFFER_FANOUT_ENABLED
handlers.push_back(TransformHandler(
"buffer_fanout", std::make_shared<BufferFanoutTransform>()));
#endif
#ifdef OPENPHYSYN_TRANSFORM_GATE_CLONE_ENABLED
handlers.push_back(TransformHandler(
"gate_clone", std::make_shared<GateCloningTransform>()));
#endif
#ifdef OPENPHYSYN_TRANSFORM_PIN_SWAP_ENABLED
handlers.push_back(
TransformHandler("pin_swap", std::make_shared<PinSwapTransform>()));
#endif
#ifdef OPENPHYSYN_TRANSFORM_CONSTANT_PROPAGATION_ENABLED
handlers.push_back(
TransformHandler("constant_propagation",
std::make_shared<ConstantPropagationTransform>()));
#endif
#else
std::string transforms_paths(
FileUtils::joinPath(FileUtils::homePath(), ".OpenPhySyn/transforms") +
":" + FileUtils::joinPath(exec_path_, "./transforms") + ":" +
FileUtils::joinPath(exec_path_, "../transforms"));
const char* env_path = std::getenv("PSN_TRANSFORM_PATH");
if (env_path)
{
transforms_paths = std::string(env_path);
}
std::vector<std::string> transforms_dirs =
StringUtils::split(transforms_paths, ":");
for (auto& transform_parent_path : transforms_dirs)
{
if (transform_parent_path.length() &&
FileUtils::isDirectory(transform_parent_path))
{
std::vector<std::string> transforms_paths =
FileUtils::readDirectory(transform_parent_path);
for (auto& path : transforms_paths)
{
PSN_LOG_DEBUG("Loading transform", path);
handlers.push_back(TransformHandler(path));
}
PSN_LOG_DEBUG("Found", transforms_paths.size(), "transforms under",
transform_parent_path);
}
}
#endif
for (auto tr : handlers)
{
std::string tr_name(tr.name());
if (!transforms_.count(tr_name))
{
auto transform = tr.load();
transforms_[tr_name] = transform;
transforms_info_[tr_name] = TransformInfo(
tr_name, tr.help(), tr.version(), tr.description());
load_count++;
}
else
{
PSN_LOG_WARN("Transform", tr_name,
"was already loaded, discarding subsequent loads");
}
}
return load_count;
}
bool
Psn::hasTransform(std::string transform_name)
{
return transforms_.count(transform_name);
}
int
Psn::runTransform(std::string transform_name, std::vector<std::string> args)
{
if (!database() || database()->getChip() == nullptr)
{
PSN_LOG_ERROR("Could not find any loaded design.");
return -1;
}
try
{
if (!transforms_.count(transform_name))
{
throw TransformNotFoundException();
}
if (args.size() && args[0] == "version")
{
PSN_LOG_INFO(transforms_info_[transform_name].version());
return 0;
}
else if (args.size() && args[0] == "help")
{
PSN_LOG_INFO(transforms_info_[transform_name].help());
return 0;
}
else
{
PSN_LOG_INFO("Invoking", transform_name, "transform");
int rc = transforms_[transform_name]->run(this, args);
sta_->ensureLevelized();
handler()->resetDelays();
PSN_LOG_INFO("Finished", transform_name, "transform (", rc, ")");
return rc;
}
}
catch (PsnException& e)
{
PSN_LOG_ERROR(e.what());
return -1;
}
}
Tcl_Interp*
Psn::interpreter() const
{
return interp_;
}
int
Psn::setupInterpreter(Tcl_Interp* interp, bool import_psn_namespace,
bool print_psn_version, bool setup_sta)
{
if (interp_)
{
PSN_LOG_WARN("Multiple interpreter initialization!");
}
interp_ = interp;
if (Psn_Init(interp) == TCL_ERROR)
{
return TCL_ERROR;
}
if (setup_sta)
{
const char* tcl_psn_setup =
#include "Tcl/SetupPsnSta.tcl"
;
if (evaluateTclCommands(tcl_psn_setup) != TCL_OK)
{
return TCL_ERROR;
}
}
else
{
const char* tcl_psn_setup =
#include "Tcl/SetupPsn.tcl"
;
if (evaluateTclCommands(tcl_psn_setup) != TCL_OK)
{
return TCL_ERROR;
}
}
const char* tcl_define_cmds =
#include "Tcl/DefinePSNCommands.tcl"
;
if (evaluateTclCommands(tcl_define_cmds) != TCL_OK)
{
return TCL_ERROR;
}
if (import_psn_namespace)
{
const char* tcl_psn_import =
#include "Tcl/ImportNS.tcl"
;
if (evaluateTclCommands(tcl_psn_import) != TCL_OK)
{
return TCL_ERROR;
}
}
if (print_psn_version)
{
const char* tcl_print_version =
#include "Tcl/PrintVersion.tcl"
;
if (evaluateTclCommands(tcl_print_version) != TCL_OK)
{
return TCL_ERROR;
}
}
return TCL_OK;
}
int
Psn::evaluateTclCommands(const char* commands) const
{
if (!interp_)
{
PSN_LOG_ERROR("Tcl Interpreter is not initialized");
return TCL_ERROR;
}
return Tcl_Eval(interp_, commands);
}
void
Psn::printVersion(bool raw_str)
{
if (raw_str)
{
PSN_LOG_RAW("OpenPhySyn:", PSN_VERSION_STRING);
}
else
{
PSN_LOG_INFO("OpenPhySyn:", PSN_VERSION_STRING);
}
}
void
Psn::printUsage(bool raw_str, bool print_transforms, bool print_commands)
{
PSN_LOG_RAW("");
if (print_commands)
{
printCommands(true);
}
PSN_LOG_RAW("");
if (print_transforms)
{
printTransforms(true);
}
}
void
Psn::printLicense(bool raw_str)
{
std::string license = R"===<><>===(BSD 3-Clause License
Copyright (c) 2019, SCALE Lab, Brown University
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE."
)===<><>===";
license = std::string("OpenPhySyn ") + PSN_VERSION_STRING + "\n" + license;
PSN_LOG_RAW("");
if (raw_str)
{
PSN_LOG_RAW(license);
}
else
{
PSN_LOG_INFO(license);
}
}
void
Psn::printCommands(bool raw_str)
{
if (raw_str)
{
PSN_LOG_RAW("Available command: ");
}
else
{
PSN_LOG_INFO("Available commands: ");
}
PSN_LOG_RAW("");
std::string commands_str;
commands_str +=
"print_version Print version\n"
"version Print version\n"
"help Print help\n"
"print_usage Print help\n"
"print_license Print license information\n"
"print_transforms List loaded transforms\n"
"import_lef <file path> Load LEF file\n"
"import_def <file path> Load DEF file\n"
"import_lib <file path> Load a liberty file\n"
"import_liberty <file path> Load a liberty file\n"
"export_def <output file> Write DEF file\n"
"set_wire_rc <res> <cap> Set resistance & capacitance "
"per micron\n"
"set_max_area <area> Set maximum design area\n"
"optimize_design [<options>] Perform timing optimization on "
"the design\n"
"optimize_fanout <options> Buffer high-fanout nets\n"
"optimize_power [<options>] Perform power optimization on "
"the design\n"
"transform <transform name> <args> Run transform on the loaded "
"design\n"
"has_transform <transform name> Checks if a specific transform "
"is loaded\n"
"design_area Returns total design cell area\n"
"link <design name> Link design top module\n"
"link_design <design name> Link design top module\n"
"sta <OpenSTA commands> Run OpenSTA commands\n"
"make_steiner_tree <net> Construct steiner tree for the "
"provided net\n"
"set_log <log level> Set log level [trace, debug, "
"info, "
"warn, error, critical, off]\n"
"set_log_level <log level> Set log level [trace, debug, "
"info, warn, error, critical, off]\n"
"set_log_pattern <pattern> Set log printing pattern, refer "
"to spdlog logger for pattern formats";
PSN_LOG_RAW(commands_str);
}
void
Psn::printTransforms(bool raw_str)
{
if (raw_str)
{
PSN_LOG_RAW("Loaded transforms: ");
}
else
{
PSN_LOG_INFO("Loaded transforms: ");
}
PSN_LOG_RAW("");
std::string transform_str;
for (auto it = transforms_.begin(); it != transforms_.end(); ++it)
{
transform_str = it->first;
transform_str += " (";
transform_str += transforms_info_[it->first].version();
transform_str += "): ";
transform_str += transforms_info_[it->first].description();
if (raw_str)
{
PSN_LOG_RAW(transform_str);
}
else
{
PSN_LOG_INFO(transform_str);
}
PSN_LOG_RAW("");
}
} // namespace psn
int
Psn::setLogLevel(const char* level)
{
std::string level_str(level);
std::transform(level_str.begin(), level_str.end(), level_str.begin(),
[](unsigned char c) { return std::tolower(c); });
if (level_str == "trace")
{
return setLogLevel(LogLevel::trace);
}
else if (level_str == "debug")
{
return setLogLevel(LogLevel::debug);
}
else if (level_str == "info")
{
return setLogLevel(LogLevel::info);
}
else if (level_str == "warn")
{
return setLogLevel(LogLevel::warn);
}
else if (level_str == "error")
{
return setLogLevel(LogLevel::error);
}
else if (level_str == "critical")
{
return setLogLevel(LogLevel::critical);
}
else if (level_str == "off")
{
return setLogLevel(LogLevel::off);
}
else
{
PSN_LOG_ERROR("Invalid log level", level);
return false;
}
return true;
} // namespace psn
int
Psn::setLogPattern(const char* pattern)
{
PsnLogger::instance().setPattern(pattern);
return true;
}
int
Psn::setLogLevel(LogLevel level)
{
PsnLogger::instance().setLevel(level);
return true;
}
int
Psn::setupInterpreterReadline()
{
const char* rl_setup =
#include "Tcl/Readline.tcl"
;
return evaluateTclCommands(rl_setup);
}
int
Psn::sourceTclScript(const char* script_path)
{
if (!FileUtils::pathExists(script_path))
{
PSN_LOG_ERROR("Failed to open", script_path);
return -1;
}
if (interp_ == nullptr)
{
PSN_LOG_ERROR("Tcl Interpreter is not initialized");
return -1;
}
std::string script_content;
try
{
script_content = FileUtils::readFile(script_path);
}
catch (FileException& e)
{
PSN_LOG_ERROR("Failed to open", script_path);
PSN_LOG_ERROR(e.what());
return -1;
}
if (evaluateTclCommands(script_content.c_str()) == TCL_ERROR)
{
return -1;
}
return 1;
}
void
Psn::setWireRC(float res_per_micon, float cap_per_micron)
{
if (!database() || database()->getChip() == nullptr)
{
PSN_LOG_ERROR("Could not find any loaded design.");
return;
}
handler()->setWireRC(res_per_micon, cap_per_micron);
}
int
Psn::setWireRC(const char* layer_name)
{
auto tech = db_->getTech();
if (!tech)
{
PSN_LOG_ERROR("Could not find any loaded technology file.");
return -1;
}
auto layer = tech->findLayer(layer_name);
if (!layer)
{
PSN_LOG_ERROR("Could not find layer with the name", layer_name);
return -1;
}
auto width = handler()->dbuToMicrons(layer->getWidth());
float res_per_micon = (layer->getResistance() / width) * 1E6;
float cap_per_micron =
(handler()->dbuToMicrons(1) * width * layer->getCapacitance() +
layer->getEdgeCapacitance() * 2.0) *
1E-12 * 1E6;
setWireRC(res_per_micon, cap_per_micron);
return 1;
}
// Private methods:
void
Psn::clearDatabase()
{
handler()->clear();
}
} // namespace psn | cpp |
<reponame>PeterXiao/jmh-sample-and-java8-current<filename>src/main/java/versions/java8/concurrence/LinkedBlockingQueueDemo.java
package versions.java8.concurrence;
import versions.java8.concurrence.jdk.BlockingQueue;
import versions.java8.concurrence.jdk.LinkedBlockingQueue;
public class LinkedBlockingQueueDemo {
static BlockingQueue<String> blockingQueue = new LinkedBlockingQueue<String>();
public static void main(String[] args) throws InterruptedException {
for (int i = 0; i < 5; i++) {
final int index = i;
new Thread(() -> {
System.out.println("thread_" + index + " producing 1000 strings");
for (int j = 0; j < 1000; j++)
try {
blockingQueue.put("thread_" + index + "_" + j);
} catch (InterruptedException e) {
}
}).start();
}
Thread.sleep(2000);
int blockingQueueSize = blockingQueue.size();
System.out.println("the size of blocking queue is " + blockingQueueSize);
System.out.println(blockingQueue.take());
System.out.println(blockingQueue.take());
System.out.println(blockingQueue.take());
}
}
| java |
<reponame>nisaruj/algorithms
from algorithms.backtrack import (
add_operators,
permute,
permute_iter,
anagram,
array_sum_combinations,
unique_array_sum_combinations,
combination_sum,
find_words,
pattern_match,
)
import unittest
from algorithms.backtrack.generate_parenthesis import *
class TestAddOperator(unittest.TestCase):
def test_add_operators(self):
# "123", 6 -> ["1+2+3", "1*2*3"]
s = "123"
target = 6
self.assertEqual(add_operators(s, target), ["1+2+3", "1*2*3"])
# "232", 8 -> ["2*3+2", "2+3*2"]
s = "232"
target = 8
self.assertEqual(add_operators(s, target), ["2+3*2", "2*3+2"])
s = "123045"
target = 3
answer = ['1+2+3*0*4*5',
'1+2+3*0*45',
'1+2-3*0*4*5',
'1+2-3*0*45',
'1-2+3+0-4+5',
'1-2+3-0-4+5',
'1*2+3*0-4+5',
'1*2-3*0-4+5',
'1*23+0-4*5',
'1*23-0-4*5',
'12+3*0-4-5',
'12-3*0-4-5']
self.assertEqual(add_operators(s, target), answer)
class TestPermuteAndAnagram(unittest.TestCase):
def test_permute(self):
perms = ['abc', 'bac', 'bca', 'acb', 'cab', 'cba']
self.assertEqual(perms, permute("abc"))
def test_permute_iter(self):
it = permute_iter("abc")
perms = ['abc', 'bac', 'bca', 'acb', 'cab', 'cba']
for i in range(len(perms)):
self.assertEqual(perms[i], next(it))
def test_angram(self):
self.assertTrue(anagram('apple', 'pleap'))
self.assertFalse(anagram("apple", "cherry"))
class TestArrayCombinationSum(unittest.TestCase):
def test_array_sum_combinations(self):
A = [1, 2, 3, 3]
B = [2, 3, 3, 4]
C = [2, 3, 3, 4]
target = 7
answer = [[1, 2, 4], [1, 3, 3], [1, 3, 3], [1, 3, 3],
[1, 3, 3], [1, 4, 2], [2, 2, 3], [2, 2, 3],
[2, 3, 2], [2, 3, 2], [3, 2, 2], [3, 2, 2]]
answer.sort()
self.assertListEqual(sorted(array_sum_combinations(A, B, C, target)), answer)
def test_unique_array_sum_combinations(self):
A = [1, 2, 3, 3]
B = [2, 3, 3, 4]
C = [2, 3, 3, 4]
target = 7
answer = [(2, 3, 2), (3, 2, 2), (1, 2, 4),
(1, 4, 2), (2, 2, 3), (1, 3, 3)]
answer.sort()
self.assertListEqual(sorted(unique_array_sum_combinations(A, B, C, target)), answer)
class TestCombinationSum(unittest.TestCase):
def check_sum(self, nums, target):
if sum(nums) == target:
return (True, nums)
else:
return (False, nums)
def test_combination_sum(self):
candidates1 = [2, 3, 6, 7]
target1 = 7
answer1 = [
[2, 2, 3],
[7]
]
self.assertEqual(combination_sum(candidates1, target1), answer1)
candidates2 = [2, 3, 5]
target2 = 8
answer2 = [
[2, 2, 2, 2],
[2, 3, 3],
[3, 5]
]
self.assertEqual(combination_sum(candidates2, target2), answer2)
class TestFindWords(unittest.TestCase):
def test_normal(self):
board = [
['o', 'a', 'a', 'n'],
['e', 't', 'a', 'e'],
['i', 'h', 'k', 'r'],
['i', 'f', 'l', 'v']
]
words = ["oath", "pea", "eat", "rain"]
self.assertEqual(find_words(board, words).sort(),
['oath', 'eat'].sort())
def test_none(self):
board = [
['o', 'a', 'a', 'n'],
['e', 't', 'a', 'e'],
['i', 'h', 'k', 'r'],
['i', 'f', 'l', 'v']
]
words = ["chicken", "nugget", "hello", "world"]
self.assertEqual(find_words(board, words), [])
def test_empty(self):
board = []
words = []
self.assertEqual(find_words(board, words), [])
def test_uneven(self):
board = [
['o', 'a', 'a', 'n'],
['e', 't', 'a', 'e']
]
words = ["oath", "pea", "eat", "rain"]
self.assertEqual(find_words(board, words), ['eat'])
def test_repeat(self):
board = [
['a', 'a', 'a'],
['a', 'a', 'a'],
['a', 'a', 'a']
]
words = ["a", "aa", "aaa", "aaaa", "aaaaa"]
self.assertTrue(len(find_words(board, words)) == 5)
class TestPatternMatch(unittest.TestCase):
def test_pattern_match(self):
pattern1 = "abab"
string1 = "redblueredblue"
pattern2 = "aaaa"
string2 = "asdasdasdasd"
pattern3 = "aabb"
string3 = "xyzabcxzyabc"
self.assertTrue(pattern_match(pattern1, string1))
self.assertTrue(pattern_match(pattern2, string2))
self.assertFalse(pattern_match(pattern3, string3))
class TestGenerateParenthesis(unittest.TestCase):
def test_generate_parenthesis(self):
self.assertEqual(generate_parenthesis_v1(2), ['()()', '(())'])
self.assertEqual(generate_parenthesis_v1(3), ['()()()', '()(())', '(())()', '(()())', '((()))'])
self.assertEqual(generate_parenthesis_v2(2), ['(())', '()()'])
self.assertEqual(generate_parenthesis_v2(3), ['((()))', '(()())', '(())()', '()(())', '()()()'])
if __name__ == '__main__':
unittest.main()
| python |
<reponame>oradoc/webjet
define(["knockout"], function(ko){
return function app(){
this.firstName = ko.observable("John");
this.initial = ko.pureComputed(function(){
return this.firstName().substr(0,1);
}, this);
}
});
| javascript |
<reponame>koddsson/island.is
import React, { FC, useState } from 'react'
import { UserWithMeta } from '@island.is/service-portal/core'
import { useNatRegFamilyLookup } from '@island.is/service-portal/graphql'
import InfoAccordionCard from '../../../components/InfoAccordionCard/InfoAccordionCard'
interface Props {
userInfo: UserWithMeta
}
type SidebarType = null
const FamilyInfoCard: FC<Props> = ({ userInfo }) => {
const [activeSidebar, setActiveSidebar] = useState<SidebarType>(null)
const { data: userFamilyReg } = useNatRegFamilyLookup(userInfo)
const handleSetActiveSidebar = (value: SidebarType) => setActiveSidebar(value)
return (
<>
<InfoAccordionCard
id="basic-user-info"
label="Fjölskyldan"
description="Hér getur þú breytt upplýsingum um fjölskylduna. Nöfnum barnana þinna, sótt um skilnað og margt fleira skemmtilegt."
rows={[
{
columns: [
{ content: 'Nafn (N/A)' },
{ content: 'Kennitala (N/A)' },
{ content: 'Heimilsfang (N/A)' },
],
},
].concat(
userFamilyReg?.results?.map((line) => ({
columns: [
{
content: line.name,
},
{
content: line.ssn,
},
{
content: `${line.address}, ${line.postalcode} ${line.city}`,
},
],
})) || [],
)}
/>
</>
)
}
export default FamilyInfoCard
| typescript |
<filename>assets/css/style.css
@import url('https://fonts.googleapis.com/css?family=Press+Start+2P');
* {
margin: 0;
padding: 0;
}
html,
body {
width: 100%;
height: 100%;
}
body {
position: relative;
overflow: hidden;
line-height: 3rem;
}
.noise {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
z-index: 400;
opacity: 0.8;
pointer-events: none;
opacity: 1;
z-index: 450;
}
.noise:before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('../images/background-noise.png');
pointer-events: none;
will-change: background-position;
animation: noise 1s infinite alternate;
}
.lines {
position: fixed;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
pointer-events: none;
z-index: 300;
opacity: 0.6;
will-change: opacity;
animation: opacity 3s linear infinite;
}
.lines:before {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
pointer-events: none;
background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, .5) 51%);
background-size: 100% 4px;
will-change: background, background-size;
animation: scanlines 0.2s linear infinite;
}
.main {
position: relative;
top: 0;
left: 0;
font-family: 'Press Start 2P', cursive;
color: #fff;
font-size: 2rem;
width: 100vw;
height: 100vh;
background-size: cover !important;
background-position: center !important;
}
.main .noise:before {
background-size: 150%;
}
.main .video {
position: relative;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.main .video .overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9999;
}
.main .vhs .char {
will-change: opacity;
animation: type 1.2s infinite alternate;
animation-delay: calc(60ms * var(--char-index));
}
.main .logo,
.main .episode,
.main .live,
.main .rec,
.main .discord {
position: absolute;
will-change: text-shadow;
animation: rgbText 1s steps(9) 0s infinite alternate;
text-transform: uppercase;
}
.main .logo {
max-width: 150px;
-webkit-filter: blur(1px); /* Safari 6.0 - 9.0 */
filter: blur(1px);
animation: rgbImage 2s steps(9) 0s infinite alternate;
top: 2.5rem;
left: 2.5rem;
}
.main .episode {
bottom: 5.5rem;
left: 2.5rem;
}
.main .live {
right: 2.5rem;
top: 2.5rem;
}
.main .live .fa-circle {
color: #ff0000;
position: relative;
font-size: 1.4rem;
top: -9px;
left: 11px;
display: inline-block;
}
.main .rec {
right: 2.5rem;
bottom: 2.5rem;
}
.main .discord {
left: 2.5rem;
bottom: 2.5rem;
}
@keyframes noise {
0%,
100% {
background-position: 0 0;
}
10% {
background-position: -5% -10%;
}
20% {
background-position: -15% 5%;
}
30% {
background-position: 7% -25%;
}
40% {
background-position: 20% 25%;
}
50% {
background-position: -25% 10%;
}
60% {
background-position: 15% 5%;
}
70% {
background-position: 0 15%;
}
80% {
background-position: 25% 35%;
}
90% {
background-position: -10% 10%;
}
}
@keyframes opacity {
0% {
opacity: 0.6;
}
20% {
opacity: 0.3;
}
35% {
opacity: 0.5;
}
50% {
opacity: 0.8;
}
60% {
opacity: 0.4;
}
80% {
opacity: 0.7;
}
100% {
opacity: 0.6;
}
}
@keyframes scanlines {
from {
background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, .5) 51%);
background-size: 100% 4px;
}
to {
background: linear-gradient(to bottom, rgba(0, 0, 0, .5) 50%, transparent 51%);
background-size: 100% 4px;
}
}
@keyframes rgbText {
0% {
text-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), 0px 0 1px rgba(251, 0, 231, 0.8), 0 0px 3px rgba(0, 233, 235, 0.8), 0px 0 3px rgba(0, 242, 14, 0.8), 0 0px 3px rgba(244, 45, 0, 0.8), 0px 0 3px rgba(59, 0, 226, 0.8);
}
25% {
text-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), 0px 0 1px rgba(251, 0, 231, 0.8), 0 0px 3px rgba(0, 233, 235, 0.8), 0px 0 3px rgba(0, 242, 14, 0.8), 0 0px 3px rgba(244, 45, 0, 0.8), 0px 0 3px rgba(59, 0, 226, 0.8);
}
45% {
text-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), 5px 0 1px rgba(251, 0, 231, 0.8), 0 5px 1px rgba(0, 233, 235, 0.8), -5px 0 1px rgba(0, 242, 14, 0.8), 0 -5px 1px rgba(244, 45, 0, 0.8), 5px 0 1px rgba(59, 0, 226, 0.8);
}
50% {
text-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), -5px 0 1px rgba(251, 0, 231, 0.8), 0 -5px 1px rgba(0, 233, 235, 0.8), 5px 0 1px rgba(0, 242, 14, 0.8), 0 5px 1px rgba(244, 45, 0, 0.8), -5px 0 1px rgba(59, 0, 226, 0.8);
}
55% {
text-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), 0px 0 3px rgba(251, 0, 231, 0.8), 0 0px 3px rgba(0, 233, 235, 0.8), 0px 0 3px rgba(0, 242, 14, 0.8), 0 0px 3px rgba(244, 45, 0, 0.8), 0px 0 3px rgba(59, 0, 226, 0.8);
}
90% {
text-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), -5px 0 1px rgba(251, 0, 231, 0.8), 0 5px 1px rgba(0, 233, 235, 0.8), 5px 0 1px rgba(0, 242, 14, 0.8), 0 -5px 1px rgba(244, 45, 0, 0.8), 5px 0 1px rgba(59, 0, 226, 0.8);
}
100% {
text-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), 5px 0 1px rgba(251, 0, 231, 0.8), 0 -5px 1px rgba(0, 233, 235, 0.8), -5px 0 1px rgba(0, 242, 14, 0.8), 0 5px 1px rgba(244, 45, 0, 0.8), -5px 0 1px rgba(59, 0, 226, 0.8);
}
}
@keyframes rgbImage {
0% {
box-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), 0px 0 1px rgba(251, 0, 231, 0.8), 0 0px 3px rgba(0, 233, 235, 0.8), 0px 0 3px rgba(0, 242, 14, 0.8), 0 0px 3px rgba(244, 45, 0, 0.8), 0px 0 3px rgba(59, 0, 226, 0.8);
}
25% {
box-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), 0px 0 1px rgba(251, 0, 231, 0.8), 0 0px 3px rgba(0, 233, 235, 0.8), 0px 0 3px rgba(0, 242, 14, 0.8), 0 0px 3px rgba(244, 45, 0, 0.8), 0px 0 3px rgba(59, 0, 226, 0.8);
}
45% {
box-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), 5px 0 1px rgba(251, 0, 231, 0.8), 0 5px 1px rgba(0, 233, 235, 0.8), -5px 0 1px rgba(0, 242, 14, 0.8), 0 -5px 1px rgba(244, 45, 0, 0.8), 5px 0 1px rgba(59, 0, 226, 0.8);
}
50% {
box-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), -5px 0 1px rgba(251, 0, 231, 0.8), 0 -5px 1px rgba(0, 233, 235, 0.8), 5px 0 1px rgba(0, 242, 14, 0.8), 0 5px 1px rgba(244, 45, 0, 0.8), -5px 0 1px rgba(59, 0, 226, 0.8);
}
55% {
box-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), 0px 0 3px rgba(251, 0, 231, 0.8), 0 0px 3px rgba(0, 233, 235, 0.8), 0px 0 3px rgba(0, 242, 14, 0.8), 0 0px 3px rgba(244, 45, 0, 0.8), 0px 0 3px rgba(59, 0, 226, 0.8);
}
90% {
box-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), -5px 0 1px rgba(251, 0, 231, 0.8), 0 5px 1px rgba(0, 233, 235, 0.8), 5px 0 1px rgba(0, 242, 14, 0.8), 0 -5px 1px rgba(244, 45, 0, 0.8), 5px 0 1px rgba(59, 0, 226, 0.8);
}
100% {
box-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), 5px 0 1px rgba(251, 0, 231, 0.8), 0 -5px 1px rgba(0, 233, 235, 0.8), -5px 0 1px rgba(0, 242, 14, 0.8), 0 5px 1px rgba(244, 45, 0, 0.8), -5px 0 1px rgba(59, 0, 226, 0.8);
}
}
@keyframes type {
0%,
19% {
opacity: 0;
}
20%,
100% {
opacity: 1;
}
} | css |
<reponame>exocuted/laguinda
import React from 'react'
import Link from 'gatsby-link'
import Background from '../../assets/pattern1_com.jpg'
import Logo_cap from '../../assets/logo_cap.png'
// PROCESS
import Seeds from '../../assets/test1.jpg'
import Sprouts from '../../assets/test2.jpg'
import Plant from '../../assets/test3.jpg'
import Jfb from '../../assets/port/jfb.png'
import LogoFruitiver from '../../assets/port/logofruitiver.jpg'
import Foto from '../../assets/port/fotolg.jpg'
import Social from '../../assets/port/feed_ubart.png'
import c1 from '../../assets/clients/c1.png'
import c2 from '../../assets/clients/c2.png'
import c3 from '../../assets/clients/c3.png'
import c4 from '../../assets/clients/c4.png'
import c5 from '../../assets/clients/c5.png'
import c6 from '../../assets/clients/c6.png'
import facebook from '../../assets/png/facebook_laguinda.png'
import instagram from '../../assets/png/instagram_laguinda.png'
import Xavi from '../../assets/people/c1.jpg'
import Eneko from '../../assets/people/c2.jpg'
import concrete from '../../assets/png/cpr.png'
import { TagCloud } from "react-tagcloud";
import Typist from 'react-typist'
import TypistLoop from 'react-typist-loop'
import { withScriptjs, withGoogleMap, GoogleMap, Marker } from "react-google-maps"
const MapHome = withScriptjs(withGoogleMap((props) =>
<GoogleMap
defaultZoom={12}
defaultCenter={{ lat: 41.4051999, lng: 2.1660092 }}
defaultOptions={{
styles: mapstyle,
streetViewControl: false,
scaleControl: false,
mapTypeControl: false,
panControl: false,
zoomControl: false,
rotateControl: false,
fullscreenControl: false
}}
>
{props.isMarkerShown && <Marker position={{ lat: 41.4051999, lng: 2.1660092 }} />}
</GoogleMap>
))
const xavi_data = [
{ value: "Técnico audiovisual", count: 20 },
{ value: "Coordinador de equipos", count: 25 },
{ value: "Fotógrafo", count: 40 },
{ value: "Community Manager", count: 25 },
{ value: "Creativo", count: 20 },
{ value: "Creador de contenidos", count: 40 },
{ value: "Profesor de fotografía", count: 20 },
{ value: "Coworker", count: 25 },
{ value: "Diseñador gráfico", count: 40 },
{ value: "Director de fotografía", count: 25 },
{ value: "Freelance", count: 20 }
];
const eneko_data = [
{ value: "Metodologías ágiles", count: 35 },
{ value: "Profesor de programación", count: 30 },
{ value: "Coworker", count: 25 },
{ value: "Freelance", count: 25 },
{ value: "Desarrollador full-stack", count: 40 },
{ value: "Experiencias de usuario", count: 25 },
{ value: "Devops", count: 40 },
{ value: "Creador de apps híbridas", count: 28 },
{ value: "Web scraping", count: 25 },
{ value: "Data science", count: 30 },
{ value: "GNU/Linux", count: 40 },
];
const mapstyle = require('../resources/fancyStyles.json')
const IndexPage = () => (
<div className="indexContent">
<div className="cap" style={{
height: '100vh',
width: '100%',
backgroundImage: 'url(' + Background + ')',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
backgroundAttachment: 'fixed',
boxShadow: 'inset 0px 11px 16px -10px #333, inset 0px -11px 16px -10px #333'
}}>
<div>
<img src={Logo_cap} alt={"Logo de la Guinda"} style={{
width: '400px',
display: 'block',
margin: '0 auto'
}} />
<span className="slogan" style={{
textAlign: 'center',
color: '#fff',
fontWeight: 200,
marginTop: '30px',
fontSize: '1.4em',
display: 'block',
fontSize: '1.5em',
textShadow: '0px 0px 15px black'
}}>Lo hacemos simple, pero significativo</span>
</div>
<div>
</div>
</div>
<div className="intro" style={{
padding: '100px 0px'
}}>
<div className="container">
<div className="row justify-content-md-center">
<div className="col-md-10">
<h1 className="desc" style={{
fontWeight: 600,
textAlign: 'center',
fontSize: '1.8em'
}}>Somos un equipo de creativos empeñados en comunicar de forma efectiva, basándonos en una metodología ágil, digital y comprometida.</h1>
<hr />
</div>
</div>
<div className="row process">
<div className="col-md-4">
<div className="imgWrapper">
<img src={Seeds} />
</div>
<h3>Ideas</h3>
<p>Las ideas son el principio de todo gran proyecto; te ayudaremos a que lleguen con el mensaje adecuado.</p>
</div>
<div className="col-md-4">
<div className="imgWrapper">
<img src={Sprouts} />
</div>
<h3>Creación</h3>
<p>Crear contenido es nuestra especialidad y nuestra pasión, y nos esforzaremos al máximo para que no pase desapercibido.</p>
</div>
<div className="col-md-4">
<div className="imgWrapper">
<img src={Plant} />
</div>
<h3>Difusión</h3>
<p>Difundiremos el mensaje al público adecuado para que tu proyecto crezca, usando los formatos oportunos para alcanzar los objetivos que te propongas.</p>
</div>
</div>
</div>
</div>
<div className="que-hacemos container-fluid">
<div className="servicios">
<div className="row serv-web">
<div className="col-md-5 order-md-1 order-sm-1" style={{
backgroundImage: 'url(' + Jfb + ')',
backgroundSize: 'cover',
minHeight: '475px'
}}>
</div>
<div className="col-md-7 tc order-md-2 order-sm-2">
<div className="textWrapper">
<h3>Desarrollo web</h3>
<p>Todas nuestras webs son desarrolladas a medida para cada cliente, sin plantillas para CMS que ralentizan la web y condicionan la experiencia de usuario. Utilizamos Roots para Wordpress para crear una plantilla base de alta calidad sobre la que construir todos los componentes que tu web necesite. Esto hará que la usabilidad, posicionamiento y accesibilidad de la web sean óptimos.</p>
<span className="typistWrapper">
<TypistLoop interval={3000}>
{[
'Wordpress',
'E-commerce',
'Landing pages',
'Desarrollo a medida'
].map(text => <Typist key={text} startDelay={500}>{text}</Typist>)}
</TypistLoop>
</span>
</div>
</div>
</div>
<div className="row serv-foto">
<div className="col-md-5 order-md-2 order-sm-1" style={{
backgroundImage: 'url(' + Foto + ')',
backgroundSize: 'cover',
minHeight: '475px'
}}>
</div>
<div className="col-md-7 tc order-md-1 order-sm-2">
<div className="textWrapper">
<h3>Fotografía</h3>
<p>Nos encargamos de la producción, realización y postproducción de las imágenes. Asumimos todo el proceso para asegurar fotografías de calidad e impactantes que sirvan para diferenciarse de la competencia, aportar información, generar confianza y siempre respetando la imagen de marca.</p>
<span className="typistWrapper">
<TypistLoop interval={3000}>
{[
'Comercial',
'Eventos',
'Books corporativos',
'Producto'
].map(text => <Typist key={text} startDelay={500}>{text}</Typist>)}
</TypistLoop>
</span>
</div>
</div>
</div>
<div className="row serv-design">
<div className="col-md-5 order-md-1 order-sm-1" style={{
backgroundImage: 'url(' + LogoFruitiver + ')',
backgroundSize: 'cover',
minHeight: '475px'
}}>
</div>
<div className="col-md-7 tc order-md-2 order-sm-2">
<div className="textWrapper">
<h3>Diseño gráfico</h3>
<p>Estudiamos la identidad corporativa para seguir la misma línea y transformamos las ideas en contenido publicitario a partir de ellas. Diseñamos, producimos y entregamos en el formato conveniente.</p>
<span className="typistWrapper">
<TypistLoop interval={3000}>
{[
'Experiencia de usuario (UI/UX)',
'Creación de contenidos',
'Branding',
'Comunicación visual online y offline'
].map(text => <Typist key={text} startDelay={500}>{text}</Typist>)}
</TypistLoop>
</span>
</div>
</div>
</div>
<div className="row serv-social">
<div className="col-md-5 order-md-2 order-sm-1" style={{
backgroundImage: 'url(' + Social + ')',
backgroundSize: 'cover',
minHeight: '475px'
}}>
</div>
<div className="col-md-7 tc order-md-1 order-sm-2">
<div className="textWrapper">
<h3>Social media</h3>
<p>Generamos contenido para aumentar la notoriedad, mejoramos la tasa de conversión humanizando la marca, escuchamos al cliente de manera continua y lo fidelizamos. Además, la mayoría de estrategias tienen un menor coste comparándolas con las convencionales u offline.</p>
<span className="typistWrapper">
<TypistLoop interval={3000}>
{[
'Creación y gestión de contenidos',
'Analítica',
'Comunicación y engagement',
'Planificación de acciones'
].map(text => <Typist key={text} startDelay={500}>{text}</Typist>)}
</TypistLoop>
</span>
</div>
</div>
</div>
</div>
</div>
<div className="container-fluid quienes-somos" style={{
backgroundImage: 'url(' + concrete + ')',
padding: '100px 0px'
}}>
<h2 style={{ fontSize: '2.1em' }}>Conócenos</h2>
<div className="container">
<div className="row">
<div className="col-md-6">
<div className="pwrap">
<img src={Xavi} />
</div>
<h3><NAME></h3>
<TagCloud minSize={20}
maxSize={35}
tags={xavi_data}
onClick={tag => console.log('clicking on tag:', tag)} />
</div>
<div className="col-md-6 eneko-wrapper">
<div className="pwrap">
<img src={Eneko} />
</div>
<h3><NAME></h3>
<TagCloud minSize={20}
maxSize={35}
tags={eneko_data}
onClick={tag => console.log('clicking on tag:', tag)} />
</div>
</div>
<div style={{
backgroundColor: "rgba(255,255,255,.2)",
padding: "30px",
margin: '60px 0px',
}}>
<p style={{
color: '#fff',
fontSize: '1.3em',
textAlign: 'center',
marginBottom: '0px',
fontWeight: 300
}}>Contamos con una red de colaboradores y proveedores para complementar los servicios que ofrecemos.</p>
</div>
</div>
</div>
<div className="container clientes-home">
<h2 style={{ textAlign: 'center', fontSize: '2.1em' }}>Conoce a algunos de nuestros clientes</h2>
<div className="row">
<div className="col-md-4">
<img src={c1} />
</div>
<div className="col-md-4">
<img src={c2} />
</div>
<div className="col-md-4">
<img src={c3} />
</div>
<div className="col-md-4">
<img src={c4} />
</div>
<div className="col-md-4">
<img src={c5} />
</div>
<div className="col-md-4">
<img src={c6} />
</div>
</div>
</div>
<div className="container contact-home">
<h2 className="text-center" style={{ textAlign: 'center', fontSize: '2.1em' }}>¿Te gusta como trabajamos? Contáctanos!</h2>
<div className="row">
<div className="col-md-6">
<form action="https://formcarry.com/s/r10hapGKM" method="POST" acceptCharset="UTF-8" style={{margin: '40px 0px'}}>
<div className="form-group">
<label htmlFor="name">Nombre</label>
<input type="text" className="form-control" name="name" required />
</div>
<div className="form-group">
<label htmlFor="email">Email</label>
<input type="email" className="form-control" name="email" required />
</div>
<div className="form-group">
<label htmlFor="tel">Teléfono</label>
<input type="text" className="form-control" name="tel" required />
</div>
<div className="form-group">
<label htmlFor="idea">Tu gran idea</label>
<textarea name="idea" className="form-control" rows="5" required></textarea>
</div>
<div className="form-group">
<label htmlFor="idea">
<input type="checkbox" name="req" required /> Acepto los <Link to="/privacidad">términos y condiciones</Link>
</label>
</div>
<div className="form-group">
<button type="submit" className="enviar2">Enviar</button>
</div>
</form>
</div>
<div className="col-md-6">
<div className="mapHomeWrapper">
<div id="mwr">
<MapHome
isMarkerShown
googleMapURL="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=geometry,drawing,places&key=<KEY>"
loadingElement={<div style={{ height: `500px` }} />}
containerElement={<div style={{ height: `500px`, width: '500px', maxWidth: '100%' }} />}
mapElement={<div style={{ height: `500px` }} />}
/>
</div>
</div>
</div>
</div>
<div className="contact-details" style={{marginTop: '70px' }}>
<h3 className="text-center" style={{ textAlign: 'center'}}>Nos encontramos en el coworking de calle Nàpols 343, 08025, Barcelona</h3>
<h4 className="text-center">¡Llámanos al +34 666 958 086!</h4>
</div>
</div>
<div className="homeFooter">
<div style={{ display: 'none' }} className="container-fluid redes">
<div style={{ width: '50%', display: 'inline-block', padding: '0px 20px' }}>
<a href="https://www.facebook.com/laguinda.co/" target="_blank">
<img src={facebook} alt="Facebook de La Guinda" style={{float: 'right'}} />
</a>
</div>
<div style={{ width: '50%', display: 'inline-block', padding: '0px 20px' }}>
<a href="https://www.instagram.com/laguinda.co/" target="_blank">
<img src={instagram} alt="Instagram de La Guinda" style={{float: 'left'}} />
</a>
</div>
<div style={{clear: 'both'}}></div>
</div>
<div className="subfooter">
<Link to="/privacidad">Privacidad</Link>
<Link to="/legal">Aviso legal</Link>
<span>Copyright 2018</span>
</div>
</div>
</div>
)
if(typeof window !== 'undefined') {
window.addEventListener("load", function(){
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#ad152e"
},
"button": {
"background": "#871326"
}
},
"theme": "edgeless",
"position": "bottom-right",
"content": {
"message": "Navegando en esta web aceptas que usemos cookies para entender mejor a nuestros usuarios.",
"dismiss": "Entendido!",
"link": "Saber más"
}
})});
}
export default IndexPage
| javascript |
package Helper;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.LinkedList;
public class PlayGround {
public static void main(String args[])
{
String query="Select * from employee where employeename=?";
String query1="Select * from employee where idemployee=?";
try {
ArrayList<Employee> empInfo=new ArrayList<Employee>();
Class.forName("com.mysql.jdbc.Driver");
Connection conn=DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/employeedetails","root","<PASSWORD>");
ResultSet rs;
String s="Akash";
Long n= (long) 1;
PreparedStatement ps= conn.prepareStatement(query);
PreparedStatement ps1= conn.prepareStatement(query1);
System.out.println("------------------------------------------------");
ps1.setLong(1,n );
ps.setString(1,s);
rs=ps.executeQuery();
while (rs.next()) {
empInfo.add(new Employee(Long.parseLong(rs.getString(1)),rs.getString(2)));
}
rs=ps1.executeQuery();
while (rs.next()) {
empInfo.add(new Employee(Long.parseLong(rs.getString(1)),rs.getString(2)));
}
System.out.println(empInfo);
for(Employee emp:empInfo)
{
System.out.println("Name :"+emp.getEmployeeName());
}
conn.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
| java |
Incidents of destruction of ballot boxes and intimidation of voters were also reported from some areas of the state.
At least 13 persons were killed in separate incidents of violence in West Bengal on Saturday during the panchayat polls in the state, reported PTI.
Eight Trinamool Congress Party members and one worker each of the Bharatiya Janata Party, the Communist Party of India (Marxist), the Congress, the Indian Secular Front and a supporter of an independent candidate are those among the dead.
The panchayat polls for 73,887 seats began at 7 am. Despite deployment of central security forces by a Calcutta High Court order last month, widespread violence has marred the polling process across the state.
The BJP has alleged that its polling agent, Madhav Biswas, in Falimari gram panchayat of Cooch Behar was shot dead by Trinamool Congress members, reported PTI.
BJP MLA from Cooch Behar Nikhil Ranjan Dey accused West Bengal Election Commission Rajiv Sinha of covertly supporting the Trinamool Congress and allowing violence against the Opposition, reported ANI. He also said that the BJP will take the matter to the Calcutta High Court.
| english |
Welcome back to the \"Fact Flicks\", where Sister Huda shows you some interesting facts in a flick.
Welcome back to the \"Fact Flicks\", where Sister Huda shows you some interesting facts in a flick.
As it’s the Holy Month of Ramadan and the Al-Quds day is approaching us soon, we decided to flick through some quick facts about the beautiful nation of Palestine.
What is Palestine best known for? Why does this piece of land have such a powerful hold on billions of people?
Get to know some of the special features of this holy Land.
Furthermore, sister Huda will be sharing some intriguing facts about the illegal occupation of Palestine in a flick, stay tuned till the end - wherever you are!
Welcome to the Islamic Pulse Talk Show.
In this episode we're answering the fundamental question, "Is Islam A Religion of Politics?".
Welcome to the Islamic Pulse Talk Show.
In this episode we're answering the fundamental question, "Is Islam A Religion of Politics?".
Why is this question such an important question that needs answering?
What is one of the objectives for the Almighty Allah to send divinely appointed Prophets (A) to the Earth?
What does it mean when it is said that Islam is a comprehensive religion and it includes all aspects of life?
What kind of view of Islam do the people have that don't have a deep understanding of Islam?
What are some examples of Islam's nurturing of and encouraging social life?
What are some interesting points about the congregational Friday prayers known as the Jum'ah Prayers and its relation to the discussion at hand?
What role does the Masjid play in the original and Pure Muhammadan Islam of the Messenger of Allah (S)?
Where can the roots of the separation of politics from Islam ultimately be traced back to?
What is the concept of a 'spiritual Wilayah' and a 'social Wilayah'; and where were they united?
Why is it said that an Islam without politics is a 'weak' Islam?
What did Imam Khomeini (R) mean when he said that before the Islamic Revolution, Islam was like a dead horse?
What is the source of all the progress that is being seen in the Islamic Republic of Iran?
If the other divinely appointed Imams (A) had the opportunity to establish a government, would they?
What is an interesting story about an Englishman in a Muslim country, and how is it related to our discussion and our mourning ceremonies in the month of Muharram and Safar?
What is a profound statement of Imam Husayn (A) that shows us that his eminence's stand was for all of humanity and for all of time?
And in the end, "Is Islam A Religion of Politics?
To answer these questions and many more, we humbly invited Shaykh Hurr Shabbiri from the United Kingdom, to sit down with us and speak a little bit about the answer to the age-old question, "Is Islam A Religion of Politics?".
Unfortunate that after so many years, we are still answering this age-old question, whose answer is all so fundamentally crystal clear.
Some of the barbaric and savage atrocities committed by Daesh (ISIS) terrorists are still coming to light.
Some of the barbaric and savage atrocities committed by Daesh (ISIS) terrorists are still coming to light.
One such barbaric terrorist attack was committed in the Fu\\\'a and Kafariya incident in Syria in which children were targeted in a planned bomb-blast and the girls were abducted by ISIS savages.
Daesh (ISIS) was created, supported, and funded by the United States of America and its allies.
This short documentary shows the wish of a survivor of that incident to meet the Leader of the Islamic Revolution, Imam Sayyid Ali Khamenei.
A must watch.
| english |
Philippines Women will lock horns with Singapore Women in a three-match T20I series, starting on December 27, Wednesday. All three games will be hosted at Friendship Oval in Dasmarinas.
Both sides have announced their squads for the series, boasting young and budding talent, aiming to prove their mettle. Philippines Women will be led by keeper-batter Catherine Bagaoisan while Singapore Women will be captained by Shafina Mahesh.
Philippines Women last played T20s in SEA Games Women's competition when they finished with the wooden spoon in Group A, losing all three games. On the other hand, Singapore Women are coming into the series on the back of a 0-3 T20I series defeat against Myanmar Women in August 2023.
Singapore Women were also part of the SEA Games Women's T20 Competition, where they finished second in Group B with one win and a defeat in two games. Ultimately, they suffered an eight-wicket defeat at the hands of Malaysia Women in the third-place playoff.
So far, Singapore Women have played 39 T20Is, winning nine, and losing 26 with one no result. Their inaugural match was played in August 2018. Meanwhile, Philippines Women have played 13 T20Is, winning one and losing 12.
Philippines Women vs Singapore Women, T20I Series 2023: Full Schedule & Match Timings (All Times in IST)
Unfortunately, there is no announcement about the live stream and broadcast for the three-match T20I series between the Philippines Women and Singapore Women for the fans in India.
April Saquilon, Arlyn Dacutan, Jomae Masaya, Jona Eguid, Ma Mandia, Alex Smith, Angela Busa, Jhon Andreano, Alpha Arayan (wk), Catherine Bagaoisan (c and wk), Riza Penalba (wk), Marica Taira, Reyven Castillo, Romela Osabel, Simranjeet Sirah.
Rasmeka Narayanan, Roma Raval, Sara Merican, Vathana Sreemurugavel, GK Diviya, Riyaa Bhasin, Roshni Seth, Shafina Mahesh (c), Piumi Gurusinghe (wk), Ada Bhasin, Damini Ramesh, Haresh Dhavina, Jocelyn Pooranakaran, Johanna Pooranakaran.
| english |
Speaking at the RSS headquarters on the occasion of Vijayadashami, Bhagwat said the government was bold in its stance to scrap Article 370 in Jammu and Kashmir and added that it is in the best interest of the country.
By India Today Web Desk: Rashtriya Swayamsevak Sangh (RSS) chief Mohan Bhagwat on Tuesday praised the government’s decision to scrap Article 370, which accorded special status to Jammu and Kashmir.
Speaking at the RSS function at Reshimbagh on the occasion of Vijayadashami, Bhagwat said the government was bold in its stance to scrap Article 370 in Jammu and Kashmir and added that it is in the best interest of the country.
"In realizing the public expectations, respecting the public sentiments, the courage to fulfill their wishes in the interest of the country is in the chosen regime again. This has been proved by the government's work of making Article 370 ineffective," Bhagwat said.
Bhagwat went on to praise Prime Minister Narendra Modi and Union Home Minister Amit Shah for the work they have done towards abrogating Article 370.
He then spoke about the contributions of the new government but added that there are several roadblocks and obstacles that need to be dealt with.
"There are some questions that we have to answer, and some problems that we have to diagnose and solve," he said. Criticising naysayers, he said, "A developed Bharat creates fear in the minds of vested interests. Only people with vested interests don't want Bharat to be strong and vibrant. "
"It is essential to be alert in identifying plots of vested interest and counter them on intellectual and social planes. Alertness is a constant necessity," he added.
Bhagwat also highlighted the need for increased vigilance along coastal borders, especially islands.
"Guards, checkposts on land borders and surveillance along maritime border, especially islands, have to be increased," Bhagwat said.
On recent incidents of mob lynching in the country, Bhagwat said it is not a part of Indian ethos and that people of the country trust in brotherhood.
"Lynching is not the word from Indian ethos, its origin is from a story in a separate religious text. We Indians trust in brotherhood. Don't impose such terms on Indians," he said.
"Lynching itself is a western construct and one shouldn't use it in the Indian context to defame the country," he added.
Bhagwat added that the incidents of mob lynching are not one-sided and "both communities" are engaged in allegations and counter-allegations.
"Some incidents have been done deliberately, some have been published in a malafide manner. These incidents are not the tradition of our country nor are these in accordance with our constitution. These have been never endorsed by RSS. On the contrary, RSS has always been against such incidents and have always stood against such incidents. Swayamsevaks are continuously striving to stop such incidents," Bhagwat said.
Besides addressing RSS workers, Bhagwat also performed 'shastra puja' at the annual Vijayadashmi festival in Maharashtra's Nagpur city.
HCL founder Shiv Nadar was the chief guest for this year's event. Union ministers Nitin Gadkari, Gen V K Singh (retd) and Maharashtra Chief Minister Devendra Fadnavis were among those present at the event. | english |
<filename>styles.css
body {
background-image: url("https://cdn.glitch.com/9529195d-62ac-4daf-a8c1-7bf2bb0614f7%2F5be2143a-2934-4a5f-c0ed-0f696e5630d0.png?1522016225204");
background-repeat: no-repeat;
background-size: cover;
}
h1 {
color: #30ceff;
text-align: center;
margin: 20px;
padding: 25px;
font-family: 'Space Mono', monospace;
}
.problem {
color: #ffffff;
font-size: 20px;
cursor: pointer;
font-family: 'Montserrat', sans-serif;
position:absolute;
}
#home-button {
color: #ffffff;
}
.blackhole {
background-image: url("https://cdn.glitch.com/9529195d-62ac-4daf-a8c1-7bf2bb0614f7%2F5be2143a-2934-4a5f-c0ed-0f696e5630d0.png?1522016225204");
height: 600px;
width: 600px;
background-position: center;
background-repeat: no-repeat;
border-radius: 50%;
}
@keyframes spin { 100% { transform:rotate(360deg); } }
.rotating{
animation:spin 50s linear infinite;
}
.reverse-rotating{
animation:spin reverse 50s linear infinite;
display: inline-block;
}
.center {
margin: auto;
/*width: 50%;*/
}
.bottom-right-box {
position:absolute;
bottom:10px;
right:10px;
}
| css |
{
"id": "CWE-237",
"name": "Improper Handling of Structural Elements",
"href": "AIP/quality-standards/CWE/items/CWE-237",
"url": "https://cwe.mitre.org/data/definitions/237.html",
"description": "The software does not handle or incorrectly handles inputs that are related to complex structures.",
"isoPatterns": null,
"count": 0,
"qualityRules": null,
"qualityTemplates": null
}
| json |
<filename>hospital/src/main/java/vacheck/demo/controller/HospitalController.java
package vacheck.demo.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import vacheck.demo.model.Hospital;
import vacheck.demo.service.HospitalService;
@Controller
public class HospitalController {
@Autowired
HospitalService hospitalService;
@RequestMapping("/hospital")
public String listadoHospitales(Model model) {
List<Hospital> hospitales= hospitalService.getAll();
model.addAttribute("listaHospital",hospitales);
return "hospital/index";
}
@RequestMapping("/hospital/add")
public String addHospital(Model model) {
model.addAttribute("hospital",new Hospital());
return "hospital/add";
}
@PostMapping("/hospital/save")
public String saveHospital(Hospital u) {
hospitalService.save(u);
return "redirect:/hospital";
}
@RequestMapping("/hospital/edit/{id}")
public String edithospital(@PathVariable("id") Integer id,Model model) {
model.addAttribute("usuario",hospitalService.getById(id));
return "hospital/edit";
}
@RequestMapping("/hospital/view/{id}")
public String viewhospital(@PathVariable("id") Integer id,Model model) {
model.addAttribute("hospital",hospitalService.getById(id));
return "hospital/view";
}
@RequestMapping("/hospital/delete/{id}")
public String deleteHospital(@PathVariable("id") Integer id) {
hospitalService.delete(id);
return "redirect:/hospital";
}
} | java |
{"questions": [{"player_1": {"name": "<NAME>", "player_stat": 34.0}, "player_2": {"name": "<NAME>", "player_stat": 48.0}, "stat": "wickets", "skill": "BOWL", "question_text": "Who has taken more wickets?", "greater": true}, {"player_1": {"name": "<NAME>", "player_stat": 17.57}, "player_2": {"name": "<NAME>", "player_stat": 37.72}, "stat": "average", "skill": "BAT", "question_text": "Who has the better batting average?", "greater": true}, {"player_1": {"name": "<NAME>", "player_stat": 175.0}, "player_2": {"name": "<NAME>", "player_stat": 67.0}, "stat": "highest", "skill": "BAT", "question_text": "Who has the greater highest score?", "greater": true}, {"player_1": {"name": "<NAME>", "player_stat": 20.2}, "player_2": {"name": "<NAME>", "player_stat": 21.5}, "stat": "strike_rate", "skill": "BOWL", "question_text": "Who has the better bowling strike rate?", "greater": false}, {"player_1": {"name": "<NAME>", "player_stat": 28.7}, "player_2": {"name": "<NAME>", "player_stat": 18.66}, "stat": "average", "skill": "BAT", "question_text": "Who has the better batting average?", "greater": true}, {"player_1": {"name": "<NAME>", "player_stat": 7.09}, "player_2": {"name": "<NAME>", "player_stat": 6.57}, "stat": "economy", "skill": "BOWL", "question_text": "Who has the better economy rate?", "greater": false}, {"player_1": {"name": "<NAME>", "player_stat": 1.0}, "player_2": {"name": "<NAME>", "player_stat": 15.0}, "stat": "fifties", "skill": "BAT", "question_text": "Who has scored more fifties?", "greater": true}, {"player_1": {"name": "<NAME>", "player_stat": 99.0}, "player_2": {"name": "<NAME>", "player_stat": 219.0}, "stat": "sixes", "skill": "BAT", "question_text": "Who has hit more sixes?", "greater": true}, {"player_1": {"name": "<NAME>", "player_stat": 7.0}, "player_2": {"name": "<NAME>", "player_stat": 1.0}, "stat": "maidens", "skill": "BOWL", "question_text": "Who has bowled more maidens?", "greater": true}, {"player_1": {"name": "<NAME>", "player_stat": 0.0}, "player_2": {"name": "<NAME>", "player_stat": 1.0}, "stat": "fifties", "skill": "BAT", "question_text": "Who has scored more fifties?", "greater": true}, {"player_1": {"name": "<NAME>", "player_stat": 23.8}, "player_2": {"name": "<NAME>", "player_stat": 18.0}, "stat": "strike_rate", "skill": "BOWL", "question_text": "Who has the better bowling strike rate?", "greater": false}, {"player_1": {"name": "<NAME>", "player_stat": 3684.0}, "player_2": {"name": "<NAME>", "player_stat": 1449.0}, "stat": "runs_given", "skill": "BOWL", "question_text": "Who has given away less runs?", "greater": false}, {"player_1": {"name": "<NAME>", "player_stat": 23.1}, "player_2": {"name": "<NAME>", "player_stat": 19.0}, "stat": "strike_rate", "skill": "BOWL", "question_text": "Who has the better bowling strike rate?", "greater": false}, {"player_1": {"name": "<NAME>", "player_stat": 3.0}, "player_2": {"name": "<NAME>", "player_stat": 1.0}, "stat": "zeroes", "skill": "BAT", "question_text": "Who has more ducks?", "greater": true}, {"player_1": {"name": "<NAME>", "player_stat": 1652.0}, "player_2": {"name": "<NAME>", "player_stat": 2311.0}, "stat": "runs_given", "skill": "BOWL", "question_text": "Who has given away less runs?", "greater": false}, {"player_1": {"name": "<NAME>", "player_stat": 7.3}, "player_2": {"name": "<NAME>", "player_stat": 7.88}, "stat": "economy", "skill": "BOWL", "question_text": "Who has the better economy rate?", "greater": false}, {"player_1": {"name": "<NAME>", "player_stat": 20.1}, "player_2": {"name": "<NAME>", "player_stat": 15.5}, "stat": "strike_rate", "skill": "BOWL", "question_text": "Who has the better bowling strike rate?", "greater": false}, {"player_1": {"name": "<NAME>", "player_stat": 13.9}, "player_2": {"name": "<NAME>", "player_stat": 27.1}, "stat": "strike_rate", "skill": "BOWL", "question_text": "Who has the better bowling strike rate?", "greater": false}, {"player_1": {"name": "<NAME>", "player_stat": 22.0}, "player_2": {"name": "<NAME>", "player_stat": 26.8}, "stat": "strike_rate", "skill": "BOWL", "question_text": "Who has the better bowling strike rate?", "greater": false}, {"player_1": {"name": "<NAME>", "player_stat": 151.97}, "player_2": {"name": "<NAME>", "player_stat": 129.74}, "stat": "strike_rate", "skill": "BAT", "question_text": "Who has the better batting strike rate?", "greater": true}]} | json |
Australian wicketkeeper Alex Carey's dismissal of Jonny Bairstow at Lord's in the second Test has been the talking point of the Ashes 2023. Carey stumped out his English counterpart when he wandered outside the crease after ducking a Cameron Green short ball in England's 371-run chase on Day 5.
The controversial dismissal sparked vociferous reactions from England supporters, including some of the MCC members targeting the Australian team at the Lord's Long Room.
Reacting to the England crowd's booing of Alex Carey at Headingley, former Australia player Ian Chappell called the behavior ludicrous. In his latest column for ESPNcricinfo, the 79-year-old said:
"Bairstow was out and his thoughtlessness was the result of an abject failure to respect his wicket. What Alex Carey did was simply smart cricket; there was no deviousness involved and the crowd reaction was despicable, including ludicrous cries about Carey being a cheat. "
He further mentioned:
"If Bairstow was trying to highlight the way etiquette has been ignored (a batter should be ready to face up when the bowler is in position to begin his run) his thought process was commendable but his method was totally wrong. "
Ian Chappell called out the laxity of umpires and administrators of the game for not backing the rules. The former Australian cricketer believes that the controversial laws need to be precise in the public domain to avoid personal attacks on players for simply following the rules.
Chappell said:
"Umpires have been lax in not enforcing this unwritten rule when it comes to batters wandering out of their crease, and the administrators are negligent for not backing umpires to the hilt. "
He added:
"That has served to further expose the administrators' inaction. They haven't had the guts to explain some of the more controversial laws. Consequently the players undeservedly hear despicable chants of "Cheat! " from an ill-informed public. "
Australia currently lead the 2023 Ashes by a 2-1 margin. The tourists will have their opportunity to win their first Ashes urn in England in the fourth Test that gets underway at Emirates Old Trafford stadium in Manchester on July 19. | english |
<filename>src/framework/piral-core/src/components/SetRedirect.tsx<gh_stars>1000+
import * as React from 'react';
import { Redirect } from 'react-router';
import { useAction, useSetter } from '../hooks';
/**
* The props for the SetRedirect component.
*/
export interface SetRedirectProps {
/**
* The path of the seen route.
*/
from: string;
/**
* The path of the target route.
*/
to: string;
}
/**
* The component capable of setting a global redirect route at mounting.
*/
export function SetRedirect({ from, to }: SetRedirectProps): React.ReactElement {
const setRoute = useAction('setRoute');
useSetter(() => setRoute(from, () => <Redirect to={to} />));
// tslint:disable-next-line:no-null-keyword
return null;
}
| typescript |
import { SUBSCRIPTION_STATUS } from './enum'
import { db } from '~/utils/db.server'
export async function getSubscriptionActiveByUserId(userId: string) {
return await db.subscription.findFirst({
where: {
userId,
status: SUBSCRIPTION_STATUS.ACTIVE,
},
})
}
| typescript |
<reponame>haruio/nodejs-monetization<gh_stars>0
{
"numberOfReview": 10,
"url": "http://m.tstore.co.kr/mobilepoc/reply/replyTotalListMore.omp",
"selectors":
[
{
"selector": "a img.author-image",
"attr": "src",
"property": "authimage"
}
]
} | json |
Ending months of speculation about Audi being involved in Formula 1, specifically with Infiniti Red Bull Racing, the German carmakers have issues statements denying that they would be involved in Formula 1.
Red Bull, currently associated with Renault, their constructors, have been vocal in their unhappiness. With multiple engine failures and issues for both Red Bull and their sister team, Scuderia Toro Rosso, RBR have appeared to have reached the end of their tether – with team principal Christian Horner, motorsport head Helmut Marko and boss Dietrich Mateschitz all expressing dissatisfaction. However, all of them vehemently denied that a multi-million dollar deal with Audi was in the works – until last week, when Marko suggested it might be otherwise. Horner, however, maintained that Red Bull’s contract with Renault ran up to 2016, so they would be associated with them until then.
Audi CEO Rupert Stadler alluded in a statement to Red Bull’s constant issues with Renault, saying “Formula One need to sort out their problems on their own.” This, however, was a contradiction from Stadler’s own statement the previous week, where he suggested in a response to an interviewer that Audio and the Volkswagen Auto Group were keeping the option of entering Formula One open.
The company is not at all alien to the world of motorsport; Audi are involved in the WEC – the World Endurance Championship as well as Formula E, which involves single-seater electric cars.
Ferdinand Piech, then-Chairman of Volkswagen, quit his job last month, which led to a rise in rumours of Audi’s Formula 1 involvement, primarily because Piech was said to have been vocal in his opposition of it.
It seems that there are no rings in store for the Bull this year.
However the V.A.G also own Bugatti, Porsche and Skoda and sell automobiles under the Lamborghini label in addition ; it remains to be seen if the group will, in any way, involve itself in Formula 1.
| english |
{
"contract": "0x4d552a4facc008cdf004833aaa1499a1ed5977c7",
"tool": "mythril",
"start": 1563326537.4717433,
"end": 1563326546.085928,
"duration": 8.614184617996216,
"analysis": {
"success": false,
"error": "Solc experienced a fatal error (code 1).\n\n/unique_contracts/0x4d552a4facc008cdf004833aaa1499a1ed5977c7.sol:1:1: Error: Source file requires different compiler version (current compiler is 0.4.25+commit.59dbf8f1.Linux.g++ - note that nightly builds are considered to be strictly less than the released version\npragma solidity 0.4.20;\r\n^---------------------^\n/unique_contracts/0x4d552a4facc008cdf004833aaa1499a1ed5977c7.sol:137:3: Warning: Defining constructors as functions with the same name as the contract is deprecated. Use \"constructor(...) { ... }\" instead.\n function RBAC()\r\n ^ (Relevant source part starts here and spans across multiple lines).\n/unique_contracts/0x4d552a4facc008cdf004833aaa1499a1ed5977c7.sol:257:5: Warning: Defining constructors as functions with the same name as the contract is deprecated. Use \"constructor(...) { ... }\" instead.\n function PriceOracle(uint256 _initialPrice) RBAC() public {\r\n ^ (Relevant source part starts here and spans across multiple lines).\n/unique_contracts/0x4d552a4facc008cdf004833aaa1499a1ed5977c7.sol:203:5: Warning: Invoking events without \"emit\" prefix is deprecated.\n RoleAdded(addr, roleName);\r\n ^-----------------------^\n/unique_contracts/0x4d552a4facc008cdf004833aaa1499a1ed5977c7.sol:215:5: Warning: Invoking events without \"emit\" prefix is deprecated.\n RoleRemoved(addr, roleName);\r\n ^-------------------------^\n/unique_contracts/0x4d552a4facc008cdf004833aaa1499a1ed5977c7.sol:273:9: Warning: Invoking events without \"emit\" prefix is deprecated.\n PriceUpdate(priceUSDcETH);\r\n ^-----------------------^\n",
"issues": []
}
} | json |
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<style>
/* модальный DIV, который всё перекрывает */
#box {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 999;
/* нужно если в документе есть элементы с z-index > 0 */
background: #aef;
opacity: 0.7;
}
p,
button {
margin: 35px;
}
</style>
</head>
<body>
<div id="box"></div>
<button onclick="alert('Эта кнопка не должна работать')">Эта кнопка не работает</button>
<p>Текст Текст Текст</p>
<button onclick="alert('Эта кнопка не должна работать')">Эта кнопка не работает</button>
<p>Текст Текст Текст</p>
<button onclick="alert('Эта кнопка не должна работать')">Эта кнопка не работает</button>
<p>Текст Текст Текст</p>
<button onclick="alert('Эта кнопка не должна работать')">Эта кнопка не работает</button>
<p>Текст Текст Текст</p>
<button onclick="alert('Эта кнопка не должна работать')">Эта кнопка не работает</button>
<p>Текст Текст Текст</p>
<button onclick="alert('Эта кнопка не должна работать')">Эта кнопка не работает</button>
<p>Текст Текст Текст</p>
<button onclick="alert('Эта кнопка не должна работать')">Эта кнопка не работает</button>
</body>
</html> | html |
<reponame>H0JLuk/nodejs-credit-system
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import * as mongoose from 'mongoose';
import { CreditParameter } from './credit-parameter.schema';
import { PersonalData } from './perconal-data.schema';
import { WorkFinance } from './work-finance.schema';
import { Contacts } from './contacts.schema';
import { Additionally } from './additionally.schema';
import { BankConsideration } from './bank-consideration.schema';
export type CreditDocument = Credit & mongoose.Document;
@Schema()
export class Credit {
@Prop({ type: mongoose.Schema.Types.String, default: 'pending' })
status: string;
@Prop({ type: mongoose.Schema.Types.ObjectId, ref: 'CreditParameter' })
creditParameter: CreditParameter;
@Prop({ type: mongoose.Schema.Types.ObjectId, ref: 'PersonalData' })
personalData: PersonalData;
@Prop({ type: mongoose.Schema.Types.ObjectId, ref: 'WorkFinance' })
workFinance: WorkFinance;
@Prop({ type: mongoose.Schema.Types.ObjectId, ref: 'Contacts' })
contacts: Contacts;
@Prop({ type: mongoose.Schema.Types.ObjectId, ref: 'Additionally' })
additionally: Additionally;
@Prop({ type: mongoose.Schema.Types.ObjectId, ref: 'BankConsideration' })
bankConsideration: BankConsideration;
}
export const CreditSchema = SchemaFactory.createForClass(Credit);
| typescript |
/*
* Copyright 2019 <NAME>. (http://www.onehippo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.bloomreach.xm.repository.security.impl;
import java.util.Set;
import com.bloomreach.xm.repository.security.AbstractRole;
/**
* Abstract implementation of a {@link AbstractRole}
*/
public abstract class AbstractRoleImpl implements AbstractRole {
private final String name;
private final String description;
private final boolean system;
private final Set<String> roles;
protected AbstractRoleImpl(final String name, final String description, final boolean system,
final Set<String> roles) {
this.name = name;
this.description = description;
this.system = system;
this.roles = roles;
}
@Override
public String getName() {
return name;
}
@Override
public String getDescription() {
return description;
}
@Override
public boolean isSystem() {
return system;
}
@Override
public Set<String> getRoles() {
return roles;
}
@Override
public int hashCode() {
return name.hashCode();
}
}
| java |
with a resolution of 2160x3840 pixels and an impressive pixel density of 806ppi. The new Sony phone however, even before going up for sale, is under scrutiny for not displaying a 4K resolution all across the UI.
During the time we spent with Xperia Z5 Premium at IFA we noted that screenshots captured from the Z5 Premium were actually of 1080p resolution. We checked with Sony executives present at the launch event about the same but did not receive any kind of explanation. Now, Sony has provided an official answer.
"Xperia Z5 Premium features a 4K display with a resolution of 3840x2160 pixels based on SID Standard and enables all video and image content to be enjoyed in 4K resolution. All other content is displayed at 1080P or lower resolution in order to optimise the performance and battery stamina for this device, ensuring you can enjoy the 4K resolution when you need it most," Sony said in a statement to Phonearena.
To recall, Sony at the IFA launch had claimed that its new Sony Xperia Z5, Xperia Z5 Compact, and Xperia Z5 Premium can offer up to 2 days of battery life. Sony's optimisation technology for content viewing on the handset now explains how the Xperia Z5 Premium even with a massive screen resolution is expected to deliver up to 2 days of battery life.
The Japanese company has been lately been part of a controversy that questioned the waterproof capabilities of its devices. Sony started warning its users that they shouldn't use their Xperia devices (whether smartphone or tablet) underwater. To do so, will void the device's warranty, the company added.
To note, most companies shipping smartphones with QHD (2K) displays, including Sony with the Xperia Z4v, natively show all content in QHD resolution, taxing the batteries and processors on the phone. Also notable, is that for regular UI and browsing, the Xperia Z5 Premium with its 4K display would look less sharp than most 2K QHD smartphones. | english |
Apple recruits more medical tech experts, new health iGadget on the way?
Apple is busy on a recruitment drive for more medical tech personnel, adding further fuel to the rumour fire that Cupertino is looking to produce some manner of standalone medical device.
This speculation kicked off last November, when chief executive Tim Cook was interviewed by the Telegraph, and talked about how he wouldn't put the Apple Watch through the FDA's process (the body which regulates medical devices over in the US).
However, he hinted that there could be an incoming piece of hardware (or possibly an app) which could need FDA approval.
And now Buzzfeed has spotted four job postings for Apple's health division which have popped up this month and last.
They include two positions for biomedical engineers with expertise in medical, health and fitness sensors and devices, along with software, and one role involves developing "prototype hardware for physiological measurement applications".
There's also a posting looking for a lab technician who knows his or her biomedical and/or hardware engineering and health sensor onions, and a role for a project manager, too.
If Apple is recruiting along these lines it certainly makes an upcoming medical device seem more likely, particularly with the mention of prototyping. And Buzzfeed also trawled LinkedIn and spotted that since last autumn, at least five medical tech staff have already joined Apple's ranks.
Those employees include biomedical engineer Jay Mung, who previously worked for Medtronic, and before that Quantason. Previous to that, he was the founder of Sinc Labs LLC, an R&D consultancy outfit which dealt with "medical image-guided interventions, robotics and big data".
Put this all together and, well, you have a collection of vague rumours and pieces of speculation, but it's certainly pointing in the right direction when it comes to a possible medical device from Apple. We very much doubt anything will be happening in the near future, though.
However, Cupertino would be foolish not to go in this direction eventually, given that the company already has a ready-made slogan for the product. After all, 'An Apple a day keeps the doctor away'.
Sign up to the TechRadar Pro newsletter to get all the top news, opinion, features and guidance your business needs to succeed!
Darren is a freelancer writing news and features for TechRadar (and occasionally T3) across a broad range of computing topics including CPUs, GPUs, various other hardware, VPNs, antivirus and more. He has written about tech for the best part of three decades, and writes books in his spare time (his debut novel - 'I Know What You Did Last Supper' - was published by Hachette UK in 2013).
| english |
// import $config from '../../config'
export default {
title: '业务组件',
id: 'businessComponents',
icon: 'yewuzujian',
components: [
{
elName: 'IocEwForm',
title: '城市运行分析预警',
isSvg: true,
icon: 'Ioc_Ew_Form',
// 每个组件设置props来展示哪些显示哪些编辑项
valueType: '', // 标识数据类型,用于表单组件
defaultStyle: {
width: 273,
height: 238
}
},
{
elName: 'IocUsNum',
title: '数字标题',
isSvg: true,
icon: 'Ioc_Us_Num',
// 每个组件设置props来展示哪些显示哪些编辑项
valueType: '', // 标识数据类型,用于表单组件
defaultStyle: {
width: 270,
height: 53
}
},
{
elName: 'IocPmTree',
title: '城市运行体征监管',
isSvg: true,
icon: 'Ioc_Pm_Tree',
// 每个组件设置props来展示哪些显示哪些编辑项
valueType: '', // 标识数据类型,用于表单组件
defaultStyle: {
width: 720,
height: 212
}
},
{
elName: 'IocOmCardPanel',
title: '城市运行检测单元',
isSvg: true,
icon: 'Ioc_Om_CardPanel',
// 每个组件设置props来展示哪些显示哪些编辑项
valueType: '', // 标识数据类型,用于表单组件
defaultStyle: {
width: 140,
height: 58
}
},
{
elName: 'IocHeder',
title: '图片标题',
isSvg: true,
icon: 'Ioc_Heder',
// 每个组件设置props来展示哪些显示哪些编辑项
valueType: '', // 标识数据类型,用于表单组件
defaultStyle: {
width: 270,
height: 47
}
}
]
}
| javascript |
<filename>docs/data/leg-t2/035/03505207.json
{"nom":"Noyal-sur-Vilaine","circ":"5ème circonscription","dpt":"Ille-et-Vilaine","inscrits":4494,"abs":2291,"votants":2203,"blancs":156,"nuls":37,"exp":2010,"res":[{"nuance":"REM","nom":"Mme <NAME>","voix":1369},{"nuance":"LR","nom":"Mme <NAME>","voix":641}]} | json |
Feedback (2)
OEM Supply Reflective Clothes - GL8640 softshell jacket for men – Greenland Detail:
for workwear.
2) Reflective segmented print and zipper for safety and decoration.
3) 3 zippered pockets to hold different belongs.
Product detail pictures:
Related Product Guide:
We insist over the principle of enhancement of 'High high quality, Efficiency, Sincerity and Down-to-earth working approach' to offer you with superb assistance of processing for OEM Supply Reflective Clothes - GL8640 softshell jacket for men – Greenland, The product will supply to all over the world, such as: Mongolia, luzern, Jersey, we have 8 years experience of production and 5 years experience in trading with the customers all over the world. our clients mainly distributed in the North America, Africa and Eastern Europe. we can supply high quality products with the very competitive price.
Company director has very rich management experience and strict attitude, sales staff are warm and cheerful, technical staff are professional and responsible,so we have no worry about product,a nice manufacturer.
Send your message to us:
| english |
Bengaluru: A day ahead of the AICC Presidential poll, Congress leader in the fray, Mallikarjun Kharge on Sunday fired salvos at the BJP government in the Centre.
Speaking to the media at the party office here, Kharge accused the Central government of misusing investigating agencies and pulling down the governments in Congress-ruled states. He said that the BJP government at the Centre has the backing of the RSS.
Blaming the Modi government for the destabilisation of Congress-led governments in states like Madhya Pradesh, Goa and Manipur, Kharge stressed on the need for a strong Opposition to counter the BJP and protect democracy in the country.
Polling for the AICC President election is scheduled on Monday, for which 494 office-bearers of the party in Karnataka are eligible to vote.
Terming the contest, in which he is fielded against Shashi Tharoor, ‘a friendly fight’, Kharge stated that he is contesting for the post of AICC President to strengthen the party.
Preferring not to respond to remarks made by Tharoor during the course of campaigning, Kharge stressed on the need for collective leadership to strengthen the party at all levels.
| english |
The Council of Higher Secondary Education, Odisha has released the schedule for the Class 12 exams at http://chseodisha. nic. in. The examinations for Arts, Science and Commerce streams will begin from May 18 and continue till June 12. The exams for vocational courses will begin on May 28 and will be concluded in 12 days. The CHSE Class 12 registration process began on February 6 and will continue till March 3. All the papers will be held in the morning shift from 9. 15 am to 12. 15 pm at multiple centres in various cities across the state. The board has also released the HSE practical exam 2021 dates for all the subjects. It is scheduled to be conducted between April 29 and May 8.
CHSE has asked principals and nodal officers to inform the external examiners about the practical exams in advance. It also stated that in case of any delay in communication or any alternative arrangement made by the principals or centre superintendents without CHSE approval, the test will be discarded and results will be withheld.
A New Indian Express report said, the exam dates will not clash with any of the national level competitive exams or entrance exams. Also, a gap of two or three days has been provided to the students before the important papers. The exam will be conducted under CCTV surveillance, said Controller of Examination BK Sahu.
Around 3. 50 lakh students will write the plus two examination this year. The papers will be conducted by following all the COVID-19 safety guidelines and social distancing norms. Candidates are requested to visit the official website of CHSE, Odisha for further updates.
CHSE starts Odisha Class 12 exams with English every year, however, this year, the first paper will be Physics. | english |
<filename>lib_design_pattern/src/main/java/pr/tongson/pattern2/Flyweight/Flyweight.java
package pr.tongson.pattern2.Flyweight;
/**
* <b>Description:</b> 抽象享元 <br>
*/
abstract public class Flyweight {
/**
* 外蕴状态作为参量传入到方法中
*
* @param state
*/
abstract public void operation(String state);
}
| java |
We are shown the post World War Two years in Quebec. The changing morals and fashions. Ovide is still as uptight as he was in the first film. His marriage to the good time girl Rita Toulouse has not brought him the happiness he desired. He is still the Charlie Brown character of the piece.
Lemelin and Arcand try hard to make this into an exciting thriller but fail. There's just not very much to care about. Ovide is not that compelling a character. Gabriel Arcand is a mesmerizing stage actor, but on screen he lacked the charisma to carry the movie to its climax. By the end I really didn't care if he killed his wife or not. Today I don't even remember if he did it or what his fate ultimately was. Lemelin might have done better to follow up with the story of one of the other brothers. Maybe Guillaume.
| english |
<reponame>comerc/yobrNXT
import React from 'react'
import { connectPage } from 'app/store'
import Link from 'next/link'
class Page extends React.Component {
render () {
return (
<h1><Link href="/"><a>Home</a></Link></h1>
)
}
}
Page.getInitialProps = async (ctx) => {
// console.log('ctx', ctx)
return {}
}
export default connectPage()(Page)
// export default Page
| javascript |
<filename>components/bootstrap/js/show.js
$(document).ready(function ()
{
var type = $.urlParam("type");
$.get("/news_reporter/include/rowData.php?type="+type, function (data)
{
obj = jQuery.parseJSON(data);
var size = obj.length;
//var size = Math.ceil(size / 10);
console.log(size);
var i = 0;
count = 0;
var perPage = new Array();
for (; i < 10; i++)
{
perPage[i] = obj[i];
}
loadData(perPage);
$("#loadMore").click(function ()
{
if (count <= size)
{
count += 10;
console.log("count " + count);
var i = count;
console.log("I " + i);
var perPage = new Array();
var x = 0;
for (; i < count + 10; i++)
{
perPage[x] = obj[i];
x++;
}
loadData(perPage);
}
else {
return;
}
});
});
});
function loadData(obj)
{
try {
jQuery.each(obj, function (key, val)
{
console.log("id => " + val.id + "\n");
$("#show").append("<a href='article.php?id=" + val.id+"&type="+val.type + "'><div class='thumbnail'><div class='caption media-body'><h3 class='media-header'>" + val.title + "</h3><p>" + val.body.content.substring(0, 50) + "</p></div></div></a>");
});
}catch (e)
{
console.log("nothing to load");
}
}
$.urlParam = function(name){
var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
if (results==null){
return null;
}
else{
return results[1] || 0;
}
} | javascript |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.sis.metadata;
import java.util.Map;
import java.util.Iterator;
import java.util.Collection;
import org.opengis.util.CodeList;
import org.apache.sis.util.Emptiable;
import org.apache.sis.internal.util.CollectionsExt;
import static org.apache.sis.metadata.ValueExistencePolicy.*;
/**
* Implementation of {@link AbstractMetadata#isEmpty()} and {@link ModifiableMetadata#prune()} methods.
*
* @author <NAME> (Geomatys)
* @since 0.3
* @version 0.3
* @module
*/
final class Pruner {
/**
* The thread-local map of metadata objects already tested. The keys are metadata instances, and values
* are the results of the {@code metadata.isEmpty()} operation.
*
* If the final operation requested by the user is {@code isEmpty()}, then this map will contain at most
* one {@code false} value since the walk in the tree will stop at the first {@code false} value found.
*
* If the final operation requested by the user is {@code prune()}, then this map will contain a mix of
* {@code false} and {@code true} values since the operation will unconditionally walk through the entire tree.
*/
private static final RecursivityGuard<Boolean> MAPS = new RecursivityGuard<Boolean>();
/**
* For internal usage only.
*/
private Pruner() {
}
/**
* Returns the metadata properties. When used for pruning empty values, the map needs to
* include empty (but non-null) values in order to allow us to set them to {@code null}.
*/
private static Map<String, Object> asMap(final MetadataStandard standard, final Object metadata,
final boolean mandatory, final boolean prune)
{
final PropertyAccessor accessor = standard.getAccessor(metadata.getClass(), mandatory);
if (accessor != null) {
return new ValueMap(metadata, accessor, KeyNamePolicy.JAVABEANS_PROPERTY, prune ? NON_NULL : NON_EMPTY);
}
return null;
}
/**
* Returns {@code true} if the value for the given entry is a primitive type.
*/
private static boolean isPrimitive(final Map.Entry<String,Object> entry) {
return (entry instanceof ValueMap.Property) &&
((ValueMap.Property) entry).getValueType().isPrimitive();
}
/**
* Returns {@code true} if all properties in the given metadata are null or empty.
* This method is the entry point for the {@link AbstractMetadata#isEmpty()} and
* {@link ModifiableMetadata#prune()} public methods.
*
* <p>This method is typically invoked recursively while we iterate down the metadata tree.
* It creates a map of visited nodes when the iteration begin, and deletes that map when the
* iteration ends.</p>
*
* @param metadata The metadata object.
* @param mandatory {@code true} if we shall throw an exception if {@code metadata} is not of the expected class.
* @param prune {@code true} for deleting empty entries.
* @return {@code true} if all metadata properties are null or empty.
*/
static boolean isEmpty(final AbstractMetadata metadata, final boolean mandatory, final boolean prune) {
final Map<String,Object> properties = asMap(metadata.getStandard(), metadata, mandatory, prune);
if (properties == null) {
return false; // For metadata of unknown class, conservatively assume non-empty.
}
final Map<Object,Boolean> tested = MAPS.get();
if (!tested.isEmpty()) {
return isEmpty(properties, tested, prune);
} else try {
tested.put(metadata, Boolean.FALSE);
return isEmpty(properties, tested, prune);
} finally {
MAPS.remove();
/*
* Note: we could invoke 'tested.clear()' instead in order to recycle the existing
* IdentityHashMap instance, but we presume that usage of this class will be
* rare enough for not being worth to keep those objects around.
*/
}
}
/**
* {@link #isEmpty(boolean)} implementation, potentially invoked recursively for inspecting
* child metadata and optionally removing empty ones. The map given in argument is a safety
* guard against infinite recursivity.
*
* @param properties The metadata properties.
* @param tested An initially singleton map, to be filled with tested metadata.
* @param prune {@code true} for removing empty properties.
* @return {@code true} if all metadata properties are null or empty.
*/
private static boolean isEmpty(final Map<String,Object> properties,
final Map<Object,Boolean> tested, final boolean prune)
{
boolean isEmpty = true;
for (final Map.Entry<String,Object> entry : properties.entrySet()) {
final Object value = entry.getValue();
/*
* No need to check for null values, because the ValueExistencePolicy argument
* given to asMap(…) asked for non-null values. If nevertheless a value is null,
* following code should be robust to that.
*
* We use the 'tested' map in order to avoid computing the same value twice, but
* also as a check against infinite recursivity - which is why a value needs to be
* set before to iterate over children. The default value is 'false' because if we
* test the same object through a "A → B → A" dependency chain, this means that A
* was not empty (since it contains B).
*/
final Boolean isEntryEmpty = tested.put(value, Boolean.FALSE);
if (isEntryEmpty != null) {
if (isEntryEmpty) { // If a value was already set, restore the original value.
tested.put(value, Boolean.TRUE);
} else {
isEmpty = false;
if (!prune) break; // No need to continue if we are not pruning the metadata.
}
} else {
/*
* At this point, 'value' is a new instance not yet processed by Pruner. The value may
* be a data object or a collection. For convenience we will proceed as if we had only
* collections, wrapping data object in a singleton collection if necessary.
*/
boolean allElementsAreEmpty = true;
final Collection<?> values = CollectionsExt.toCollection(value);
for (final Iterator<?> it = values.iterator(); it.hasNext();) {
final Object element = it.next();
if (!isNullOrEmpty(element)) {
/*
* At this point, 'element' is not an empty CharSequence, Collection or array.
* It may be an other metadata, a Java primitive type or user-defined object.
*
* - For AbstractMetadata, delegate to the public API in case it has been overriden.
* - For user-defined Emptiable, delegate to the user's isEmpty() method. Note that
* we test at different times depending if 'prune' is true of false.
*/
boolean isEmptyElement = false;
if (element instanceof AbstractMetadata) {
final AbstractMetadata md = (AbstractMetadata) element;
if (prune) md.prune();
isEmptyElement = md.isEmpty();
} else if (!prune && element instanceof Emptiable) {
isEmptyElement = ((Emptiable) element).isEmpty();
// If 'prune' is true, we will rather test for Emptiable after our pruning attempt.
} else if (!(element instanceof Enum<?>) && !(element instanceof CodeList<?>)) {
final MetadataStandard standard = MetadataStandard.forClass(element.getClass());
if (standard != null) {
isEmptyElement = isEmpty(asMap(standard, element, false, prune), tested, prune);
if (!isEmptyElement && element instanceof Emptiable) {
isEmptyElement = ((Emptiable) element).isEmpty();
}
} else if (isPrimitive(entry)) {
if (value instanceof Number) {
isEmptyElement = Double.isNaN(((Number) value).doubleValue());
} else {
// Typically methods of the kind 'isFooAvailable()'.
isEmptyElement = Boolean.FALSE.equals(value);
}
}
}
if (!isEmptyElement) {
// At this point, we have determined that the property is not empty.
// If we are not removing empty nodes, there is no need to continue.
if (!prune) {
return false;
}
allElementsAreEmpty = false;
continue;
}
}
// Found an empty element. Remove it if we are
// allowed to do so, then check next elements.
if (prune && values == value) {
it.remove();
}
}
// If all elements were empty, set the whole property to 'null'.
isEmpty &= allElementsAreEmpty;
if (allElementsAreEmpty) {
tested.put(value, Boolean.TRUE);
if (prune) try {
entry.setValue(null);
} catch (UnsupportedOperationException e) {
// Entry is read only - ignore.
}
}
}
}
return isEmpty;
}
}
| java |
The ‘Best Picture’ award is possibly one of the most prestigious and coveted prizes of the Oscar ceremony. Like every other year, this year also 10 exceptional films released in 2022 have been nominated in the Best Picture category of the Oscars. The nominated films feature a wide range of genres as well as a balance between box office juggernauts and indies.
Organized by the Academy of Motion Picture Arts and Sciences (AMPAS), the Academy Award, aka the Oscar, is one of the most prestigious and well-known awards in the film industry.
The 95th Academy Awards will be presented on March 12, 2023, in a ceremony held at the Dolby Theater in Los Angeles. The event will be broadcast on US television by ABC. Ahead of the awards ceremony, here's a quick roundup of the 10 Best Picture nominees this year and where you can watch them.
Edward Berger's epic anti-war film based on Erich Maria Remarque's 1929 novel of the same name is set during World War I and deals with armistice negotiations to end the war. The film has received nine Oscar nominations, including Best Picture.
Starring Felix Kammerer as a young, idealistic German soldier named Bäumer, the film follows the 17-year-old's life, who enlists in the German Army with his friends. Paul's journey exposes him to the realities of war, and ultimately shatters his cherished hopes of becoming a hero as he is left to survive the horrors of warfare.
Where to watch: The film is available for streaming on Netflix.
James Cameron's Avatar: The Way of Water is the sequel to the 2009 Avatar film, a unique sci-fi tale set in the mid-22nd century, and the second installment in the Avatar film series.
The commercially successful film, featuring first-of-its-kind underwater performance capture filming techniques, has been nominated for four awards at the Oscars, including Best Picture.
The film explores the lives of Na'vi Jake Sully and his family, who seek refuge with the Metkayina clan of Pandora when faced with renewed human threat.
Where to watch: The film is currently playing in theaters. Walt Disney Studios Home Entertainment will release Avatar: The Way of Water for digital download on March 28, 2023.
Directed, written, and co-produced by Martin McDonagh, this tragicomedy is set in 1923 on a remote island off the west coast of Ireland. The critically-acclaimed film has received nine nominations at the 95th Academy Awards, including Best Picture.
The moving film features Colin Farrell and Brendan Gleeson as Pádraic Súilleabháin and Colm Doherty, respectively. The two are lifelong best friends who reach an impasse when one of them abruptly ends their relationship.
Where to watch: The film is available for streaming on HBO Max.
Baz Luhrmann's biographical drama depicts the meteoric rise to fame and eventual downfall of the American rock-and-roll singer and actor Elvis Presley (played by Austin Butler), from the perspective of his manager Colonel Tom Parker (played by Tom Hanks).
Featuring an ensemble cast of Olivia DeJonge, Helen Thomson, Kodi Smit-McPhee, Richard Roxburgh, David Wenham, and Luke Bracey, the film was both a commercial as well as a critical success. At the 95th Academy Awards, it has been nominated for eight awards, including Best Picture.
Where to watch: The film is available for streaming on HBO Max.
Directed, written, and co-produced by Daniel Kwan and Daniel Scheinert, this absurdist comedy-drama centers on a Chinese-American immigrant named Evelyn Wang (played by Michelle Yeoh), who discovers that she needs to connect with parallel universe versions of herself in order to prevent a powerful being from destroying the multiverse.
The critically-acclaimed film dabbles in a number of genres by incorporating elements of surreal comedy, science fiction, fantasy, martial arts films, and animation. The commercially successful film has also been lauded for its authentic representation of Asian-American identity, concepts such as existentialism, nihilism, and absurdism, as well as issues such as ADHD, depression, and generation gap.
The film has received a whopping 11 nominations at the Oscars, including Best Picture.
Where to watch: The film is available for streaming on Showtime, including the add-on package to Amazon, Hulu and Paramount+.
Directed by Steven Spielberg, this coming-of-age film features a semi-autobiographical story inspired by Spielberg's adolescence and early years as a filmmaker. The film has earned seven nominations at the Oscars, including Best Picture.
Depicting the story of a fictional young aspiring filmmaker named Sammy Fabelman (played by Gabriel LaBelle), The Fabelmans chronicles how the power of films helped him to see the truth about his dysfunctional family and those around him.
Where to watch: The film is available for streaming on various VOD platforms.
Written and directed by Todd Field, the psychological drama focuses on the story of Lydia Tár (played by Cate Blanchett), a renowned female conductor of the Berlin Philharmonic, who is accused of s*xual abuse.
At the 95th Academy Awards, the critically-acclaimed film has been nominated for Best Picture, Best Director, Best Original Screenplay, Best Actress (Blanchett), Best Cinematography, and Best Editing.
Where to watch: The film is available for streaming on Peacock.
Directed by Joseph Kosinski, this action drama is a sequel to Tom Cruise's 1986 film Top Gun. Set 30 years after the events of the original film, the film finds Cruise reprising his role as the naval aviator Lieutenant Pete “Maverick” Mitchell. Maverick confronts his past while training a group of younger Top Gun graduates for a dangerous mission, including the son of his deceased best friend.
The critically-acclaimed film has been nominated for six awards at the 95th Academy Awards, including Best Picture.
Where to watch: The film is available for streaming on Paramount+.
Written and directed by Ruben Östlund in his English-language feature film debut, this satirical black comedy starring Harris Dickinson, the late Charlbi Dean, Dolly de Leon, Zlatko Burić, Henrik Dorsin, Vicki Berlin, and Woody Harrelson follows a model-influencer couple, Carl and Yaya, who embarked on a luxury yacht with super-wealthy guests and a drunk captain. The situation takes an unexpected turn when a brutal storm hits the ship.
The critically-acclaimed film has received three nominations at the 95th Academy Awards, including Best Picture.
Where to watch: The film is available for streaming on Hulu.
Written and directed by Sarah Polley, the film is based on Miriam Toews' 2018 novel of the same name.
Featuring an ensemble cast of Claire Foy, Jessie Buckley, Rooney Mara, Ben Whishaw, Judith Ivey, and Frances McDormand, the film follows the real-life story of the women of the Manitoba Colony, a remote and isolated Mennonite community in Bolivia, who struggle to reconcile their faith after a series of s*xual assaults.
At the 95th Academy Awards, the film has received nominations for Best Picture and Best Adapted Screenplay.
Where to watch: The film is available for streaming on various VOD platforms.
Don't forget to stream these films before watching the highly anticipated 95th Academy Awards 2023 on ABC on Sunday, March 12, 2023, at 8 pm ET. | english |
“While SEBI’s regulations of 2023 define green security, it is of limited use. In green bonds, the amounts that have been raised are almost outdated — hardly Rs 4,000 crore in written terms. So, unless you define taxonomy, investors would not be sure where their investments are going. Apart from greenwashing concerns, it’s also our responsibility towards the investors to see where they are investing,” he said while speaking at The Energy Transition Dialogues organised by the Global Energy Alliance (GEAPP). The event is being held from November 1-3.
A foreign institutional investor planning to invest in India would always compare India’s green taxonomy with, say, that of the European Union (EU), and only invest if he is satisfied, said Tyagi.
The former SEBI chief said the bond market development is underdeveloped in India, unlike the equity market.
“In fact, 97% of the bonds are raised in AAA, AA plus and AA categories. Now many of these green energy projects will not match that. We have to have a great enhancement mechanism. In addition, we have to undertake some of the capital reforms that can really help in minimising the credit-off-taker risk as well as the currency risk,” he said.
A financial stability report put out by the International Monetary Fund in October said that almost 90% of this requirement would have to come from the private sector; as of now, ex-China is only around 40%.
“To reach 90% by 2030 is a very big challenge,” said Tyagi who served as the SEBI Chairman from March 2017 to February 2022. He has also worked extensively in the environment and energy sectors.
Other than the number and requirement of funds, Tyagi also raised concerns on whether the economy would be able to absorb such a magnitude of capital raising without increasing financial stability risk.
The other stakeholders and experts at the session agreed that regulators play a critical role in facilitating green transition by lowering risks and ensuring the decarbonisation goals are met in a timely manner. They were of the view that better regulation in the sector could also mean the introduction of market reforms and new instruments to bring in much-needed capital.
| english |
<filename>public/products/electronique.json
{
"data": [
{
"id": "8daff13e-bde3-4b40-a90b-6b34732da361",
"type": "electronique",
"title": "Featherweight",
"description": "Cette machine est compacte et complète, elle est facile à transporter et possède aussi de nombreuses fonctionnalités.",
"photo": [
"https://res.cloudinary.com/dctlti6fj/image/upload/v1639917614/produits/electronique/Featherweight-top_vrgmte.jpg",
"https://res.cloudinary.com/dctlti6fj/image/upload/v1639917610/produits/electronique/Featherweight-boite-accessoire_rqsbq6.jpg",
"https://res.cloudinary.com/dctlti6fj/image/upload/v1639917605/produits/electronique/Face-web_rbs3l2.jpg"
],
"details": [
"70 programmes de points (basiques, stretchs, décoratifs, quilting)",
"Système d’entrainement régulier intégré",
"Écran LCD tactile",
"Longueur et largeur de point ajustables",
"3 boutonnières automatiques en 1 temps",
"Enfile-aiguille automatique",
"Position d’aiguille haute/basse",
"Touche Start & Stop et contrôle de la vitesse",
"2 lumières LED",
"Machine fournie avec 6 pieds presseurs et une housse de protection rigide"
],
"promotion": {},
"outstock": false
},
{
"id": "be5b992d-5769-44df-88ce-f3188cde2ccd",
"type": "electronique",
"title": "STYLIST 4085",
"description": "",
"photo": [
"https://res.cloudinary.com/dctlti6fj/image/upload/v1639917726/produits/electronique/Stylist-4085-2_h9zgxb.png"
],
"details": [
"Plus de 960 programmes de couture (10 basics, 21 stretch, 212 décoratifs),",
"6 alphabets (+ chiffres) avec fonction mémoire.",
"13 boutonnières auto en 1 temps,",
"Longueur et largeur de point ajustables",
"Mémoire avec mode édition,",
"Point miroir / inversé",
"Elongation de point",
"Coupe-fil automatique",
"Enfile-aiguille automatique",
"Touche marche/arrêt (start/stop),",
"Couture avec et sans pédale,",
"Arrêt aiguille en position haute/basse",
"Point d’arrêt automatique,",
"Touche couture arrière,",
"Griffes d’entraînement 7 segments"
],
"promotion": {},
"outstock": false
},
{
"id": "cb4c5cd0-db5e-45aa-9b77-f94d3cdced3e",
"type": "electronique",
"title": "EXPÉRIENCE 400",
"description": "La machine parfaite pour toutes vos coutures et points décoratifs.",
"photo": [
"https://res.cloudinary.com/dctlti6fj/image/upload/v1639917679/produits/electronique/Experience-400_dncq1h.png"
],
"details": [
"98 programmes de points (9 basiques, 8 stretch, 76 décoratifs…).",
"Fonction Start & Stop.",
"6 boutonnières automatiques en 1 temps.",
"Enfile-aiguille automatique",
"Aiguille haute/basse",
"13 positions d’aiguille",
"Sélection directe des points",
"Système de canette top-drop",
"Table d’extension",
"Réalise des angles parfaits"
],
"promotion": {},
"outstock": true
},
{
"id": "fb06f788-3be9-433b-bfc3-f2ae0a99eaee",
"type": "electronique",
"title": "Futura 200",
"description": "Machine à coudre électronique. Avez-vous l’esprit créatif ou la passion du quilt ? Le pied double et la table d’extension vous permettront de coudre à la main libre !",
"photo": [
"https://res.cloudinary.com/dctlti6fj/image/upload/v1639911249/produits/electronique/futura200_promotion_b69qlw_d9lzkg.jpg",
"https://res.cloudinary.com/dctlti6fj/image/upload/v1639917472/produits/electronique/singer-futura200-tablette_i49fm0.jpg",
"https://res.cloudinary.com/dctlti6fj/image/upload/v1639917479/produits/electronique/singer-futura200-face_deghrv.jpg"
],
"details": [
"98 programmes de points (9 basiques, 8 stretch, 76 décoratifs…).",
"Fonction Start & Stop.",
"6 boutonnières automatiques en 1 temps.",
"Enfile-aiguille automatique",
"Aiguille haute/basse",
"13 positions d’aiguille",
"Sélection directe des points",
"Système de canette top-drop",
"Table d’extension",
"Réalise des angles parfaits"
],
"promotion": {
"type": "reduction",
"name": "Un acheté, un offert"
},
"outstock": true
}
]
}
| json |
<reponame>TechFlexa/PocketSource
{
"_comment": "This file is auto-generated by write-translations.js",
"localized-strings": {
"next": "Next",
"previous": "Previous",
"tagline": "Open source project to manage resources",
"add-resource": "Adding a resource",
"api-introduction": "Introduction",
"doc2": "document number 2",
"doc3": "This is document number 3",
"edit-resource": "Edit Resources",
"doc4": "Other Document",
"doc5": "Fifth Document",
"getting-started": "PocketSource",
"Getting Started": "Getting Started",
"installation": "Installing PocketSource",
"login-api": "Login API",
"register-api": "Register API",
"retrieve-resources-api": "Retrieve Resources with API",
"running-local-server": "Running on local server",
"search-resource": "Search Resources",
"Docs": "Docs",
"API": "API",
"Help": "Help",
"Blog": "Blog",
"Guides": "Guides",
"First Category": "First Category"
},
"pages-strings": {
"Help Translate|recruit community translators for your project": "Help Translate",
"Edit this Doc|recruitment message asking to edit the doc source": "Edit",
"Translate this Doc|recruitment message asking to translate the docs": "Translate"
}
}
| json |
<filename>src/main/java/pattern/factory/abstractfactory/Factory.java
package pattern.factory.abstractfactory;
/**
* @Author stormbroken
* Create by 2021/03/17
* @Version 1.0
**/
public abstract class Factory {
public abstract AbstractProductA createProductA();
public abstract AbstractProductB createProductB();
}
| java |
<reponame>chemineer/GrowthHack
<!DOCTYPE html>
<html lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Chapter 27 Quora | translation_Growth Hacking</title>
<meta name="description" content="이 자료는 bookdown 패키지를 이용하여 작성한 번역물이다. 이 예제의 출력형식은 다음과 같다. bookdown::gitbook." />
<meta name="generator" content="bookdown 0.21 and GitBook 2.6.7" />
<meta property="og:title" content="Chapter 27 Quora | translation_Growth Hacking" />
<meta property="og:type" content="book" />
<meta property="og:description" content="이 자료는 bookdown 패키지를 이용하여 작성한 번역물이다. 이 예제의 출력형식은 다음과 같다. bookdown::gitbook." />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Chapter 27 Quora | translation_Growth Hacking" />
<meta name="twitter:description" content="이 자료는 bookdown 패키지를 이용하여 작성한 번역물이다. 이 예제의 출력형식은 다음과 같다. bookdown::gitbook." />
<meta name="author" content="chemineer" />
<meta name="date" content="2021-01-30" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="prev" href="pinterest.html"/>
<link rel="next" href="reddit.html"/>
<script src="libs/jquery-2.2.3/jquery.min.js"></script>
<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
<script src="libs/accessible-code-block-0.0.1/empty-anchor.js"></script>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
<div class="book-summary">
<nav role="navigation">
<ul class="summary">
<li><a href="./">A Minimal Book Example</a></li>
<li class="divider"></li>
<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Foreword</a></li>
<li class="chapter" data-level="2" data-path="meet-the-growth-hacker.html"><a href="meet-the-growth-hacker.html"><i class="fa fa-check"></i><b>2</b> Meet the Growth Hacker</a></li>
<li class="chapter" data-level="3" data-path="closing.html"><a href="closing.html"><i class="fa fa-check"></i><b>3</b> Closing</a></li>
<li class="chapter" data-level="4" data-path="designs.html"><a href="designs.html"><i class="fa fa-check"></i><b>4</b> 99designs</a></li>
<li class="chapter" data-level="5" data-path="airbnb.html"><a href="airbnb.html"><i class="fa fa-check"></i><b>5</b> AirBnB</a></li>
<li class="chapter" data-level="6" data-path="amazon.html"><a href="amazon.html"><i class="fa fa-check"></i><b>6</b> Amazon</a></li>
<li class="chapter" data-level="7" data-path="belly.html"><a href="belly.html"><i class="fa fa-check"></i><b>7</b> Belly</a></li>
<li class="chapter" data-level="8" data-path="dropbox.html"><a href="dropbox.html"><i class="fa fa-check"></i><b>8</b> Dropbox</a></li>
<li class="chapter" data-level="9" data-path="ebay.html"><a href="ebay.html"><i class="fa fa-check"></i><b>9</b> eBay</a></li>
<li class="chapter" data-level="10" data-path="etsy.html"><a href="etsy.html"><i class="fa fa-check"></i><b>10</b> Etsy</a></li>
<li class="chapter" data-level="11" data-path="eventbrite.html"><a href="eventbrite.html"><i class="fa fa-check"></i><b>11</b> Eventbrite</a></li>
<li class="chapter" data-level="12" data-path="evernote.html"><a href="evernote.html"><i class="fa fa-check"></i><b>12</b> Evernote</a></li>
<li class="chapter" data-level="13" data-path="facebook.html"><a href="facebook.html"><i class="fa fa-check"></i><b>13</b> Facebook</a></li>
<li class="chapter" data-level="14" data-path="github.html"><a href="github.html"><i class="fa fa-check"></i><b>14</b> GitHub</a></li>
<li class="chapter" data-level="15" data-path="goodreads.html"><a href="goodreads.html"><i class="fa fa-check"></i><b>15</b> Goodreads</a></li>
<li class="chapter" data-level="16" data-path="groupon.html"><a href="groupon.html"><i class="fa fa-check"></i><b>16</b> Groupon</a></li>
<li class="chapter" data-level="17" data-path="grubhub.html"><a href="grubhub.html"><i class="fa fa-check"></i><b>17</b> GrubHub</a></li>
<li class="chapter" data-level="18" data-path="hubspot.html"><a href="hubspot.html"><i class="fa fa-check"></i><b>18</b> Hubspot</a></li>
<li class="chapter" data-level="19" data-path="instagram.html"><a href="instagram.html"><i class="fa fa-check"></i><b>19</b> Instagram</a></li>
<li class="chapter" data-level="20" data-path="linkedin.html"><a href="linkedin.html"><i class="fa fa-check"></i><b>20</b> LinkedIn</a></li>
<li class="chapter" data-level="21" data-path="livingsocial.html"><a href="livingsocial.html"><i class="fa fa-check"></i><b>21</b> LivingSocial</a></li>
<li class="chapter" data-level="22" data-path="mashable.html"><a href="mashable.html"><i class="fa fa-check"></i><b>22</b> Mashable</a></li>
<li class="chapter" data-level="23" data-path="mint.html"><a href="mint.html"><i class="fa fa-check"></i><b>23</b> Mint</a></li>
<li class="chapter" data-level="24" data-path="mixpanel.html"><a href="mixpanel.html"><i class="fa fa-check"></i><b>24</b> Mixpanel</a></li>
<li class="chapter" data-level="25" data-path="paypal.html"><a href="paypal.html"><i class="fa fa-check"></i><b>25</b> PayPal</a></li>
<li class="chapter" data-level="26" data-path="pinterest.html"><a href="pinterest.html"><i class="fa fa-check"></i><b>26</b> Pinterest</a></li>
<li class="chapter" data-level="27" data-path="quora.html"><a href="quora.html"><i class="fa fa-check"></i><b>27</b> Quora</a></li>
<li class="chapter" data-level="28" data-path="reddit.html"><a href="reddit.html"><i class="fa fa-check"></i><b>28</b> Reddit</a></li>
<li class="chapter" data-level="29" data-path="relayrides.html"><a href="relayrides.html"><i class="fa fa-check"></i><b>29</b> RelayRides</a></li>
<li class="chapter" data-level="30" data-path="sidecar.html"><a href="sidecar.html"><i class="fa fa-check"></i><b>30</b> Sidecar</a></li>
<li class="chapter" data-level="31" data-path="square.html"><a href="square.html"><i class="fa fa-check"></i><b>31</b> Square</a></li>
<li class="chapter" data-level="32" data-path="taskrabbit.html"><a href="taskrabbit.html"><i class="fa fa-check"></i><b>32</b> TaskRabbit</a></li>
<li class="chapter" data-level="33" data-path="tinder.html"><a href="tinder.html"><i class="fa fa-check"></i><b>33</b> Tinder</a></li>
<li class="chapter" data-level="34" data-path="tripadvisor.html"><a href="tripadvisor.html"><i class="fa fa-check"></i><b>34</b> TripAdvisor</a></li>
<li class="chapter" data-level="35" data-path="tumblr.html"><a href="tumblr.html"><i class="fa fa-check"></i><b>35</b> Tumblr</a></li>
<li class="chapter" data-level="36" data-path="twitter.html"><a href="twitter.html"><i class="fa fa-check"></i><b>36</b> Twitter</a></li>
<li class="chapter" data-level="37" data-path="uber.html"><a href="uber.html"><i class="fa fa-check"></i><b>37</b> Uber</a></li>
<li class="chapter" data-level="38" data-path="udemy.html"><a href="udemy.html"><i class="fa fa-check"></i><b>38</b> Udemy</a></li>
<li class="chapter" data-level="39" data-path="upworthy.html"><a href="upworthy.html"><i class="fa fa-check"></i><b>39</b> Upworthy</a></li>
<li class="chapter" data-level="40" data-path="warby-parker.html"><a href="warby-parker.html"><i class="fa fa-check"></i><b>40</b> Warby Parker</a></li>
<li class="chapter" data-level="41" data-path="waze.html"><a href="waze.html"><i class="fa fa-check"></i><b>41</b> Waze</a></li>
<li class="chapter" data-level="42" data-path="yelp.html"><a href="yelp.html"><i class="fa fa-check"></i><b>42</b> Yelp</a></li>
<li class="chapter" data-level="43" data-path="youtube.html"><a href="youtube.html"><i class="fa fa-check"></i><b>43</b> YouTube</a></li>
<li class="divider"></li>
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./">translation_Growth Hacking</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<section class="normal" id="section-">
<div id="quora" class="section level1">
<h1><span class="header-section-number">Chapter 27</span> Quora</h1>
<p>The question and answer site Quora was founded in 2009 and went public in 2010. It was created by two Facebook alums, <NAME> and <NAME>, who were in a unique position to bring growth insight to the endeavor.
After coverage from TechCrunch on January 5, 2011, Quora enjoyed a social media surge, going from 3,000 Twitter mentions to more than 10,000 in a day. Seizing the moment, Quora deployed a growth team to keep the sudden influx of new users and to grow their base.
None of the growth hacking techniques the company applied are in any way revolutionary, but all were perfectly executed examples of taking and applying the fundamentals repeatedly to maximize success.
This “wash, rinse, repeat” model is key to growth applications since it tends to return compounding results, much like interest earned on a savings account or certificate of deposit.
Quora’s engagement with users is razor sharp and aimed at “stickiness” to lengthen the period of time a person spends on the site. The goal is to get people hooked on relevant information.
To achieve this, Quora has crafted an excellent algorithm to suggest new and related questions to readers as well as those that are interesting and relevant based on the individual’s browsing history. The site does not rely on its users to actual read the content however, understanding that in spite of the text intensive nature of the web, many people prefer to watch video. Many Quora answers are also accompanied by short instructional videos of exceptionally high quality.
Having been created by two former Facebook employees, Quora has benefited from tightly integrated social media integration from its inception. When answering questions, members have the option to share the content on various platforms or through email, and they can share questions they’ve read as well.
Finding your friends on Quora is functional and easy, which enhances the social reach of the site and creates a greater sense of community. Inherent in any site that depends on a social component is the phenomenon of perceived status within the group, an especially strong driver on a question and answer site.
Relevancy is central to the Quora experience. Users can follow question threads and are updated in email when a new answer is added. (There is an option for a daily digest to avoid cluttering up the user’s email inbox.)
On their custom home page, members can see the activity on threads they have followed, as well as new answer written by specific people they follow or content they have “up voted,” which is the site’s social bookmarking feature.
In January 2011, before the boost in traffic generated by the TechCrunch coverage, Quora had approximately 500,000 users. In July 2012, the site was averaging 1.5 million unique visits.
Given the presence of many luminaries and celebrities in a range of fields on the site, there is every indication the Quora ecosystem will continue to thrive and grow. It has, however, reached a self-sustaining mass and is unlikely to see another growth surge like the one in 2011.</p>
</div>
</section>
</div>
</div>
</div>
<a href="pinterest.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
<a href="reddit.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
</div>
</div>
<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
<script src="libs/gitbook-2.6.7/js/lunr.js"></script>
<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
<script>
gitbook.require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": {
"github": false,
"facebook": true,
"twitter": true,
"linkedin": false,
"weibo": false,
"instapaper": false,
"vk": false,
"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
},
"fontsettings": {
"theme": "white",
"family": "sans",
"size": 2
},
"edit": {
"link": "https://github.com/rstudio/bookdown-demo/edit/master/Quora.Rmd",
"text": "Edit"
},
"history": {
"link": null,
"text": null
},
"view": {
"link": null,
"text": null
},
"download": ["translate-demo.pdf", "translate-demo.epub"],
"toc": {
"collapse": "subsection"
}
});
});
</script>
</body>
</html>
| html |
Shillong: Justice Mohammad Yaqoob Mir, Chief Justice of Meghalaya High Court said that the issue of human trafficking appears to be unassuming on the surface but a closer look reveals that the menace of human trafficking is a cause for concern.
Justice Mir, who is also the Patron-in-Chief Meghalaya State Legal Services Authority (MSLSA) stated this while delivering the keynote address at the 2nd Regional Consultation on Child Right in the Context of Human Trafficking (sex & bonded labour) in North East India at Yojana Bhavan, Shillong on September 22.
The consultation was organized by International Justice Mission (IJM) & North East for Child Rights under the aegis of the Nagaland State Legal Services Authority (NSLSA) and Meghalaya State Legal Services Authority (MSLSA).
Justice Mir further lamented that lamented the North East has emerged as hub of human trafficking in India, where unemployment, poverty, migration for search of jobs are some of the reasons of human trafficking.
The Meghalaya High Court Chief Justice pointed out that the state has the largest number of child trafficking after Assam, he said that in the coal mines of Jaintia hills, Meghalaya thousands of children are working in hazardous conditions.
He said Assam has the highest number of trafficking cases in the country with 1494 cases. The state accounts for 22 percent of the total reported cases of trafficking as per report released by National Crime Records Bureau 2015.
He noted that Assam with protracted insurgency problem coupled with recurrent flood, peculiar geographical setting has made it vulnerable to infiltration.
While lauding Mizoram for being the first state in NE to formulate the Victim of Crime Compensation Scheme, Justice Mir however said that in spite of these novel measures, human trafficking is still active in the state.
On Manipur scenario, Justice Mir said the state has emerged as the new source of cross border human trafficking in India and also being used as an easy transit route.
While highlighting these scenarios, Justice Mir said introspection is required to meet the challenge of human trafficking. He said collective responsibility of stakeholders, state legal services authority and police to take care of the rights of the children and save them from being exploited.
Delivering special address, Justice Arup Kumar Goswami, Chief Justice (Acting) Gauhati High Court and Patron-in-Chief, NSLSA said child rights and human trafficking are concepts which are at opposite pole as trafficking crushes the rights of a child. | english |
Jose Mourinho has led Manchester United to their joint worst start to a Premier League season after his side were beaten at West Ham.
A 3-1 loss at London Stadium on Saturday leaves United with 10 points after seven matches, Mourinho's men having also lost to Tottenham and Brighton and Hove Albion this term.
United exited the EFL Cup at the first hurdle this week, going out in the third round on penalties at home to Derby County - managed by Frank Lampard, who played for Mourinho at Chelsea.
In the Premier League era, United has never collected a lower number of points after its first seven matches of the season.
Mourinho's 2018-19 tally matches the 10 points from seven games taken by United under David Moyes in his disastrously short reign as Alex Ferguson's successor.
Moyes led United to Premier League defeats against rivals Liverpool and Manchester City in his supposed honeymoon period, the latter match a 4-1 loss.
| english |
[1] a friend of mine is on their way to their first militant street demonstration and here's what i told them. (long thread)
[2] it's okay to decide to stick through tougher shit, it's also okay to run, so long as you're not abandoning people who are relying on you). you and the people you’re with should consciously be an affinity group.
[3] if you are the sort who feels most comfortable rolling solo, more power to you, but that is harder and more complicated both in terms of staying safe and of being useful.
[4] be very aware of peer pressure and how it's influencing you. crowds are powerful, which is cool, but it's easy to be swept along in the excitement. sometimes being swept along is beautiful. just stay within your own ethical and strategic bounds.
[5] Don't judge ppl who don't share your idea of what tactics are strategic. Your enemies are the ppl attempting to stop you from exerting power over your lives - the police - not ppl who wish to exert their power in different ways than you. Shit gets too hairy, leave. No shame.
[6] diversity of tactics is wonderful and makes our movement strong but make sure that what you're doing doesn't hurt anyone you don't intend for it to hurt.
[7] do not wear contact lenses. do not wear contact lenses.
Water is what you use to flush your eyes for tear gas and pepper spray. Fuck milk. When you get home take a cool shower with plenty of soap.
Water is what you use to flush your eyes for tear gas and pepper spray. Fuck milk. When you get home take a cool shower with plenty of soap.
[8] keep an eye on exits at all times. this is vital. in any situation be aware of your best bet for getting out of it. personally, i dip when i see that there's only one exit left, because it means police are probably attempting to encircle the crowd.
[9] it's possible to work with a group of people to maintain an exit to help people escape. Police are slow, but they're powerful once they're in place. A crowd is nimble and fast. Play to your strengths, not to the enemy's.
[10] worst case scenario, if you as an individual need to get out, a police line can be broken by bolting through it while it is being drawn. not after (it takes a crowd of people to break through a police line after it is finished being drawn).
[11] while they're still moving, their job is “form the line” not “arrest people.” cops are powerful but simple robots who can only run one program at a time, basically.
[12] wear a mask, obviously double true right now. as for the rest of your outfit, pick between indistinguishably normal (pants, random t-shirt) or indistinguishably black bloc. (all black unmarked clothes. black tshirt as ninja mask. Cover all tattoos at the very least).
[13] you dont want to stand out at a militant demonstration; youre there to provide force, cover, or numbers, not to be seen. if your goals involve breaking laws, up your concealment game. If your goals involve providing cover to those breaking laws, up your concealment game.
[14] so that others don't stand out. note that if your plan is to break laws, you should probably look for a far more in-depth guide than this one about how to evade surveillance and identification.
have a change of clothes, especially if you are in black bloc.
have a change of clothes, especially if you are in black bloc.
[15] the police are more likely to arrest people in smaller groups or isolated individuals. approaching and leaving a demonstration are times to be particularly on guard. Often, the police wait for the larger crowd to disperse and attack or arrest those who remain.
[16] dont brag on social media until the dust clears. the dust may never clear. probably you just don't get to brag on social media. if you broke any particular law, then you never get to brag about it, not even in person. so it goes.
[17] accept it like a beautiful burden of forced humility. you know you're a badass. don't brag by omission either by being like "oh man the things i could tell you but i can't because they are illegal!"
[18] dont photograph protestors unless you have a DAMN good reason, and a plan to get out with your footage, a plan to blur all faces (and possibly rest of bodies esp if people are breaking laws). video the police, instead.
[19] Videos are used as evidence in court, so only record things that there should be evidence of. Videography at demonstrations without basically being a snitch is a pretty high level skill.
[20] consider leaving your phone in the car or maybe at home. if you do bring it, lock it with a passcode not just a PIN. Do not use fingerprint or face ID lock. At the inauguration protestors in 2017, those with androids had their phones broken into by police.
[21] phones are handy as fuck for maps and communications, so it's a bit of a tossup. If you've got a burner, bring that, without anything stored in it. If you're communicating at a demo, use Signal and set the disappearing messages to some obnoxiously fast time like a minute.
[22] have a plan for if you get arrested. this makes getting arrested less scary and less traumatizing. have someone who is keeping tabs on you, who will assume you are arrested if you do not check in at a pre-arranged time.
[23] if there is a legal support number for the demonstration, write it on your body with sharpie. if you are arrested, the outside person can do things like tell your family, make sure your dog gets walked, or harass the jail to make sure you get your meds.
[24] If you are arrested, shut the fuck up. "I am going to remain silent. I would like to see my lawyer." That's pretty much the only thing you can possibly say to a cop that will make your life better instead of worse.
[25] Many of us who live petty criminal lives are used to trying to charm or reason or polite our way out of tickets and arrests in our day-to-day life, but if this doesn't work at demos. Cops are either in just-following-orders robot mode or fury-and-fear mode.
[27] the protest isn't over until everyone is out of jail. As a lawyer friend points out though, jail support isn't an opportunity to cause more disruption; the goal is to observe and monitor the courts to keep those in custody safe and ensure their quick and safe return.
[28/28] The most important thing you can accomplish at a militant street demonstration is helping keep the people around you safe. Protect each other. At the end of it all, we're all we've got.
| english |
Central State Farms
24. DR. SAKSHIJI: Will the Minister of AGRICULTURE be pleased to state:
(a) the total area of land under the Central State Farms in Uttar Pradesh;
(b) the area of land being utilized for production of seeds of various foodgrains; and
(c) the quantum of seeds produced in these Farms during 1993-94?
THE MINISTER OF STATE IN THE MINISTRY OF NON-CONVENTIONAL ENERGY SOURCES AND MINISTER OF STATE IN THE MINISTRY OF AGRICULTURE (SHRI S. KRISHNA KUMAR): (a) Total area of land under Central State Farms in Uttar Pradesh is indicated below:
(i) Central State Farm-3828 ha. Bahraich.
(ii) Central State Farm-191 ha. Raebareli.
(b) Area of land being utilised for production of seeds of various foodgrains in the above two farms is as under:
(i) Central State Farm-2716 ha. Bahraich. (ii) Central State Farm-165 ha. Raebareli.
(c) Quantum of seeds produced in these two farms during 1993-94 is given below:
(i) Central State Farm-33683 quintals Bahraich. (ii) Central State Farm-1325 quintals Raebareli. Consumption of Fertilizers
25. SHRI CHHEDI PASWAN: Will the Minister of AGRICULTURE be pleased to state:
(a) the per hectare consumption of fertilizers in Bihar during the last two years;
(b) whether the Government propose to provide any special assistance to the farmers for the proper usage of fertilizers during the current year; and
(c) if so, the details thereof?
THE MINISTER OF STATE IN THE MINISTRY OF AGRICULTURE (SHRI ARVIND NETAM): (a) The estimated per hectare consumption of fertiliser nutrients in Bihar is 56.82 kg/ha. during 1992-93 and 56.69 kg/ha. during 1993-94.
(b) and (c) There is no proposal to provide any special assistance to the farmers in Bihar for proper usage of fertilisers. However, central assistance is available to all the State Governments including Bihar under the following schemes for ensuring judicious use of fertilisers:(1) Balanced and Integrated Use of Fertilisers; and (2) National project on Development of Fertiliser Use in Low Consumption and Rainfed Areas.
Development of Greater Bombay
26. SHRIMATI SURYA KANTA PATIL: Will the Minister of PLANNING AND PROGRAMME IMPLEMENTATION be pleased to state:
(a) whether the Government propose to provide central assistance during the current Plan period for the development of Greater Bombay city;
(c) the other steps taken by the Government for development of that city?
THE MINISTER OF STATE OF THE MINISTRY OF PLANNING AND PROGRAMME IMPLEMENTATION (SHRI GIRIDHAR GAMANG): (a) Yes, Sir.
(b) Under the newly introduced Centrally Sponsored Scheme of Infrastructural Development in Mega Cities, an amount of Rs. 16 crores is proposed for release to Bombay during 1994-95 as Central share under the scheme. Allocation for subsequent years will depends upon the proposals to be received from the Maharashtra Government, performance of the projects taken up and budgetary allocations.
(c) The Government of Maharashtra has prepared a project report under the Mega City Scheme, covering development works pertaining to urban infrastructure in Greater Bombay. The funds will be used to take up a mix of remunerative, cost recovery and non-remunerative projects.
Manganese Extraction
27. SHRI K.G. SHIVAPPA: Will the Minister of ENVIRONMENT AND FORESTS be pleased to state:
(a) whether land in the Bisgod forest has been leased for manganese extraction;
(b) whether indiscriminate mining has wrecked the ecology of Uttara Kannada;
(c) whether a massive demonstration was organised to protest against indiscriminate mining;
(d) whether ecologists have appealed to stop mining in the region; and
(e) if so, the reaction of the Government thereto?
THE MINISTER OF STATE OF THE MINISTRY OF ENVIRONMENT AND FORESTS (SHRI KAMAL NATH): (a) The State Government of Karnataka has submitted a proposal for renewal of mining lease under the Forest (Conservation) Act, 1980 for manganese extraction in Bisgod forest of Uttara Kannada district. However, formal approval under the Forest (Conservation) Act 1980 has not yet been accorded by the Ministry.
(b) to (e) Reports have been received in this regard and it has already been decided to constitute a Committee to enquire into the issues.
Halt at Hatisa Bhagwantpur
28. DR. LAL BAHADUR RAWAL: Will the Minister of RAILWAYS be pleased to state:
(a) whether the Government have granted approval for construction of railway halt at Hatisa Bhagwantpur between Hathras city and Mursan railway stations; and
(b) if so, the time by which it is likely to be constructed? THE MINISTER OF RAILWAYS (SHRI C.K. JEFFER SHARIEF): (a) No, Sir. (b) Does not arise.
Halt of Shatabdi Express
29. SHRI RAJVEER SINGH: Will the Minister of RAILWAYS be pleased to state:
(a) whether the Government propose to provide halt of Shatabdi Express between New Delhi and Lucknow at Bareilly Junction;
(c) if not, the reasons therefor?
THE MINISTER OF RAILWAYS (SHRI C.K. JAFFER SHARIEF): (a) to (c) 2003/2004 New Delhi-Lucknow Shatabdi Express does not run via Bareilly.
Fruits and Vegetables Price
30. SHRI PANKAJ CHOWDHARY: SHRI RAM PAL SINGH:
Will the Minister of AGRICULTURE be pleased to state: (a) whether there is uniformity in prices of the fruits and vegetables being sold by the outlets of the Mother Dairy in Delhi;
(b) if not, the reasons therefor; and
(c) the steps taken or proposed to be taken by the Government to remove the difference in prices?
THE MINISTER OF STATE IN THE MINISTRY OF AGRICULTURE (SHRI ARVIND NETAM): (a) No, Sir.
(b) The variation is mainly to avoid problems of underpricing/overpricing in relation to the open market where the prices vary from locality to locality.
(c) Not necessary in view of above.
Danapur Railway Division
31. SHRI RAM KRIPAL YADAV: Will the Minister of RAILWAYS be pleased to state:
(a) whether there is any proposal for setting up railway station/halts and construction of over bridges under the Danapur Railway Division;
(c) the action taken by the Government thereon? THE MINISTER OF RAILWAYS (SHRI C.K. JAFFER SHARIEF): (a) to (c) Yes, Sir. Two proposals for opening
of halts over Danapur Divison were received. The propo for opening of halt at Jamira between Ara and Kulha stations was examined in the past and the same w found neither financially justified not feasible on passeng amenity grounds. The other proposal for opening of a hi at Gumti No. 51 at Kuwardah village between Bihiya ar Kauriya stations is under examination.
Construction of one foot-over bridge at Luckeesarai bee included in final Works Programme for the year 1995-96 subject to availability of funds. (Translation)
Pollution Control
32. SHRI BALRAJ PASSI: SHRI DEVI BUX SINGH: SHRI MAHESH KANODIA: DR. RAMESH CHAND TOMAR: SHRI SHANKERSINH VAGHELA:
(a) the level of pollution in India as compared to other countries;
(b) whether some industrial units, vehicles and indiscriminate and illegal denudation of forests are the main cause of pollution;
(c) if so, whether the Government propose to formulate any comprehensive policy for conservation of environment and for checking pollution;
(d) if so, the details thereof; and
(e) if not, the reasons therefor?
THE MINISTER OF STATE OF THE MINISTRY OF ENVIRONMENT AND FORESTS (SHRI KAMAL NATH): (a) According to the report "Global Pollution and Health" prepared by World Health Organisation (W.H.O.) and United Nations Environment Programme (UWEP), the levels of suspended particulate matter (SPM) in respect of Delhi, Calcutta and Bombay rank 4th, 6th and 13th respectively among 54 cities of the world. With respect to sulphur dioxide, these cities rank 27th, 18th and 37th respectively among 41 cities.
(b) Yes, Sir.
(c) and (d) The Government of India have formulated comprehensive Policies for conservation of environment and checking pollution. These include Policy Statement for Abatement of Pollution and the National Conservation Strategy and Policy Statement on Environment and Development. The Policy Statement for Abatement of Pollution envisages integration of environmental and economic aspects of development planning, lays stress on preventive aspects of pollution abatement and promotion of technological inputs to reduce industrial pollutants. The National Conservation Strategy and Policy Statement of Environment and Development sets out priorities on conservation of natural resources such as land and water; prevention and control of atmospheric pollution including noise pollution and industrial development by using a mix of promotional and regulatory steps.
(e) Does not arise.
Impact assessment of Ravva Oil and Gas Field 33. SHRI G.M.C. BALAYOGI:
SHRI D. VENKATESHWARA RAO:
(a) whether in view of the blow out in the oil well at Pasarlapudi in Andhra Pradesh, the joint venture company of Australia has asked the National Environmental Research Engineering Institute conduct to environmental impact assessment for the Rawa Oil and Gas Field coming up in the same State;
(b) whether the studies to be undertaken by NEERI also aim at assessing the existing environmental status of the project area to identify the positive and negative impacts due to the proposed developments and to suggest measures for mitigating the adverse impact;
(c) if so, whether any studies have been made in this regard so far; and
(d) if so, the details thereof?
THE MINISTER OF STATE OF THE MINISTRY OF ENVIRONMENT AND FORESTS (SHRI KAMAL NATH): (a) No, Sir. The project proponents have approached NEERI for conducting on environmental impact assessment study for the phase II development of the Ravva offshore oil and gas fields. The proposal has no relavance to the blow out in the oil well at Pasarlapudi. (b) Yes, Sir.
(c) Studies with respect to the proposed development I have not been initiated.
(d) Does not arise.
Shortage of Urea
34. SHRI MOHAN SINGH (DEORIA): Will the Minister of CHEMICALS AND FERTILISERS be pleased to state:
(a) Whether the farmers in all the States are facing a lot of difficulties in getting sufficient urea for this Rabi crop and have to purchase it from black market;
(b) if so, the reasons therefor; and
(c) the remedial measures taken/proposed to be taken by the Government in this regard?
THE MINISTER OF STATE IN THE MINISTRY OF CHEMICALS AND FERTILISERS AND MINISTER OF STATE IN THE MINISTRY OF PARLIAMENTARY AFFAIRS AND MINISTER OF STATE IN THE DEPARTMENT OF ELECTRONICS AND DEPARTMENT OF OCEAN DEVELOPMENT (SHRI EDUARDO FALEIRO): (a) and (b) The availability of urea in the country, which is under price and movement controls, has been adequate with reference to the assessed demand of the State as reflected in the allocations made for the current Rabi season under the Essential Commodities Act,
1955 (ECA) except for temporary and localised shortages in some States. These shortages arose due to low opening stocks for Rabi 1994-95, changes in the demand pattern induced by favourable materologicial conditions, production cutbacks in some units and occasional slippages in the arrivals of vessels as well as movement problems.
Although balanced distribution of urea within the States is the responsibility of the State Governments concerned, the occasional localised shortages experienced during the current Rabi season have been promptly met by rushing Under alternative Essential sources. supplies from Commodities Act 1955, the powers of enforcement in regard to black marketing and other unfair trade practices in fertilisers vest in the State Governments.
The improved overall availability of urea in the field has been able to support 5% increase in the sales during the period from 1.10.94 to 31.1.95 as compared to the corresponding period of the last Rabi season.
(c) The following steps have been taken to improve the availability of urea during the current Rabi season:
(i) The indigenous production of urea has been optimised by deferment of the shutdowns and revival of production in the 3 closed sick units of Hindustan Fertiliser Corporation Limited (HFC) and Fertiliser Corporation of India (FCI).
(ii) The pace of arrival of imported urea has been stepped up and its handling at ports has been expedited.
(iii) The despatches of urea from plants/ports have been accelerated.
(iv) Monthly despatches of urea have been programmed in consultation with the State Governments and the supplies have been intensively monitored to ensure timely and equitable distribution of the available material in conformity with the current demand of the States.
Super Bazar
35. SHRI JEEWAN SHARMA: Will the Minister of CIVIL SUPPLIES, CONSUMER AFFAIRS AND PUBLIC DISTRIBUTION be pleased to state:
(a) the names of the new suppliers introduced in the household, footwear and furniture department of the Super Bazar during the last 12 months, month-wise;
(b) the reasons for adding these items particularly when the Super Bazar had on its inventory those items from the established and reputed manufacturers;
(c) whether a steel almirah by the brand name 'Llyod' was introduced few months back;
(d) whether the almirah has been found of substandard quality; and
| english |
import fs from 'fs';
import express from 'express';
import bodyParser from 'body-parser';
import { graphqlExpress, graphiqlExpress } from 'apollo-server-express';
import schema from './resolver';
const app = express();
const port = 3000;
app.use(function (req, res, next) {
console.log('Time: %d', Date.now())
//console.log(req);
var log_attack = "Attacker IP: " + req.headers['x-real-ip'] + "\n"
log_attack += "Origin: " + req.headers['origin'] + "\n"
log_attack += "User-Agen: " + req.headers['user-agent'] + "\n"
log_attack += "\n"
fs.appendFile("all.log", log_attack, function(err) {
if(err) {
return console.log(err);
}
console.log("The file was saved!");
});
next()
});
app.use('/graphql', bodyParser.json(), graphqlExpress({ schema }));
app.use('/graphiql', graphiqlExpress({
endpointURL: '/graphql',
}));
app.listen(port, () => console.log(`Server on ${port}`));
| javascript |
use crate::ast;
use crate::compiler::{Compiler, Needs};
use crate::error::CompileResult;
use crate::traits::{Compile, Resolve as _};
use crate::CompileError;
use runestick::{CompileMeta, Hash, Inst};
/// Compile a call expression.
impl Compile<(&ast::ExprCall, Needs)> for Compiler<'_> {
fn compile(&mut self, (expr_call, needs): (&ast::ExprCall, Needs)) -> CompileResult<()> {
let span = expr_call.span();
log::trace!("ExprCall => {:?}", self.source.source(span));
let scope = self.scopes.child(span)?;
let guard = self.scopes.push(scope);
let args = expr_call.args.items.len();
// NB: either handle a proper function call by resolving it's meta hash,
// or expand the expression.
#[allow(clippy::never_loop)]
let path = loop {
match &*expr_call.expr {
ast::Expr::Path(path) => {
log::trace!("ExprCall(Path) => {:?}", self.source.source(span));
break path;
}
ast::Expr::ExprFieldAccess(ast::ExprFieldAccess {
expr,
expr_field: ast::ExprField::Ident(ident),
..
}) => {
log::trace!(
"ExprCall(ExprFieldAccess) => {:?}",
self.source.source(span)
);
self.compile((&**expr, Needs::Value))?;
for (expr, _) in expr_call.args.items.iter() {
self.compile((expr, Needs::Value))?;
self.scopes.decl_anon(span)?;
}
let ident = ident.resolve(&self.storage, &*self.source)?;
let hash = Hash::of(ident);
self.asm.push(Inst::CallInstance { hash, args }, span);
}
expr => {
log::trace!("ExprCall(Other) => {:?}", self.source.source(span));
for (expr, _) in expr_call.args.items.iter() {
self.compile((expr, Needs::Value))?;
self.scopes.decl_anon(span)?;
}
self.compile((expr, Needs::Value))?;
self.asm.push(Inst::CallFn { args }, span);
}
}
if !needs.value() {
self.asm.push(Inst::Pop, span);
}
self.scopes.pop(guard, span)?;
return Ok(());
};
for (expr, _) in expr_call.args.items.iter() {
self.compile((expr, Needs::Value))?;
self.scopes.decl_anon(span)?;
}
let item = self.convert_path_to_item(path)?;
if let Some(name) = item.as_local() {
if let Some(var) = self.scopes.try_get_var(name)? {
var.copy(&mut self.asm, span, format!("var `{}`", name));
self.asm.push(Inst::CallFn { args }, span);
if !needs.value() {
self.asm.push(Inst::Pop, span);
}
self.scopes.pop(guard, span)?;
return Ok(());
}
}
let meta = match self.lookup_meta(&item, path.span())? {
Some(meta) => meta,
None => {
return Err(CompileError::MissingFunction { span, item });
}
};
let item = match &meta {
CompileMeta::Tuple { tuple, .. } | CompileMeta::TupleVariant { tuple, .. } => {
if tuple.args != expr_call.args.items.len() {
return Err(CompileError::UnsupportedArgumentCount {
span,
meta: meta.clone(),
expected: tuple.args,
actual: expr_call.args.items.len(),
});
}
if tuple.args == 0 {
let tuple = path.span();
self.warnings.remove_tuple_call_parens(
self.source_id,
span,
tuple,
self.context(),
);
}
tuple.item.clone()
}
CompileMeta::Function { item, .. } => item.clone(),
_ => {
return Err(CompileError::MissingFunction { span, item });
}
};
let hash = Hash::type_hash(&item);
self.asm
.push_with_comment(Inst::Call { hash, args }, span, format!("fn `{}`", item));
// NB: we put it here to preserve the call in case it has side effects.
// But if we don't need the value, then pop it from the stack.
if !needs.value() {
self.asm.push(Inst::Pop, span);
}
self.scopes.pop(guard, span)?;
Ok(())
}
}
| rust |
<reponame>learninto/sentry
from __future__ import absolute_import
from sentry.api.bases.incident import IncidentEndpoint, IncidentPermission
from sentry.api.serializers import serialize
from sentry.api.serializers.models.commit import CommitSerializer
from sentry.incidents.logic import get_incident_suspects
class OrganizationIncidentSuspectsIndexEndpoint(IncidentEndpoint):
permission_classes = (IncidentPermission,)
def get(self, request, organization, incident):
"""
Fetches potential causes of an Incident.
````````````````````````````````````````
Fetches potential causes of an Incident. Currently this is just suspect
commits for all related Groups.
:auth: required
"""
# Only fetch suspects for projects that the user has access to
projects = [
project
for project in incident.projects.all()
if request.access.has_project_access(project)
]
commits = list(get_incident_suspects(incident, projects))
# These are just commits for the moment, just serialize them directly
serialized_suspects = serialize(commits, request.user, serializer=CommitSerializer())
# TODO: For now just hard coding this format. As we add in more formats
# we'll handle this in a more robust way.
return self.respond(
[{"type": "commit", "data": suspect} for suspect in serialized_suspects]
)
| python |
The Brihanmumbai Municipal Corporation (BMC), which is eyeing a six-acre salt-pan land parcel in Mumbai’s Mahul to set up a stormwater drain pumping station, has been told by the Salt Commissioner’s regional office in the city that apart from paying the market value for the land, the civic body should also compensate the licence holders who own the right to cultivate salt there.
“Since BMC wants six acres of land for construction of the pumping station, the licence holders’ livelihood will be affected,” an official from the Salt Commissioner’s office in Mumbai, who did not wish to be named, said.
“Murali Lal Garodia and Rohinton Dhalla are the two licence holders…they have been given a licence in 1916 by the Salt Commissioner office. Garodia had approached our office seeking compensation. He also approached the BMC, and a letter from the corporation has been received at our office,” the official added.
The official said that as per policy, the affected party needs to be compensated and this has been communicated both to the Centre and the BMC.
However, the official from the Salt Commissioner’s office said that they do not have a policy to give land to the state government at RR rate. “Since it is between the Centre and the state, the land value is calculated based on market value. In addition, the BMC has asked to reduce the cost as the land also falls in the coastal regulation zone,” he added.
The BMC is hoping the pumping station will help make low-lying areas in the eastern suburbs of Mumbai, such as Wadala, Chunabhatti, Dadar, Gandhi Market, Sion, Matunga etc, flood-free during the monsoon. The BMC plans to set up 10 pumps with a capacity to drain 6,000 litres per second and two more pumps on standby at an estimated cost of Rs 350 crore.
Although tenders were first floated in 2019, the project recommended by the Chitale Committee after the July 26, 2005 deluge has been delayed since. | english |
A two-day Chinese martial arts training was held at Rosebud School in Budhha Nagar, Kathmandu.
According to the school principal Damodar Dhungana, more than 200 students, from primary to high school levels, participated in the training program, which started on 8th September and concluded on 9th September, 2018.
Director of China Cultural Center, Yin Kusong, was the chief guest at the program. Wang Zunfa and Zhong Aiguo were the two martial arts coaches from China. | english |
Of late, Devin Davis has been a frequent namedrop for Death Cab For Cutie's Ben Gibbard - including in a piece for Wired, - but Davis' songs are a far cry from Gibbard's heart-on-sleeve ballads. Instead - giant spiders chase, the White House is exploded, people flee, people fall in love. It's a bombastic folk-pop that makes me want to dive through windows, glass shattering every which-way. Part parade, part cloud-watching, part breathless head-over-heels downhill roll. Go download "Iron Woman" and "Giant Spiders" (although the album version of the latter is far superior), and then buy the remarkable record.
| english |
Yahoo Sports senior NBA writer Vincent Goodwill spoke with the Naismith Basketball Hall of Famer and 4-time league scoring champion on why he continues to push to play a role in helping the current generation of stars. Hear the full conversation on “Good Word with Goodwill” - part of the “Ball Don’t Lie” podcast - and subscribe on Apple Podcasts, Spotify or wherever you listen. Pre-order George's upcoming book 'Ice: Why I Was Born To Score', which will be released on October 31.
VINCENT GOODWILL: Joining us now on the show, this is a huge, huge honor for me. He's a member of the Naismith Basketball Hall of Fame. He's a member of the College Basketball Hall of Fame. He's a member of the NBA's top 50 and top 75. He's a nine time all-Star, a four time scoring champ. He is a charter member of the ABA NBA.
The way that you see the game play today, the style, a lot of it has to do with this man, the one and only George "The Iceman" Gervin. George has a book coming out on Halloween called "Ice, Why I Was Born to Score". And Kevin Durant spoke in the book. He actually wrote the foreword in the book. And he talked about seeing you first and hearing people talk about you, then meeting you.
Where does your desire come from, to mentor these younger guys? Because I'm sure you don't want anything from them. You just want to help.
GEORGE GERVIN: Yeah, man. You know, I tell them all the time, too. Man, I don't want nothing from you. All I want you to do is take the wisdom I give you and pass it down to another young man, you know? So we can keep going. You know what I mean? Because this is a great opportunity to play in this league, man, I mean. And so many youngsters look up to you.
You know, I write in the book also about the-- I ain't talking about the NBA. I'm talking about the NBA Players Association. I'm saying, man, y'all should have created a different kind of program to implement guys like me that been through things. They got all the money in the world to create a program, man, to where they can implement us to have an opportunity, man, to help guide these youngsters.
Kevin, he was like a sponge. You know I mean? He took it in. I done been through things in my life, you know? And you know like I know, life about recovery. All of us going to get tripped sooner or later, you know?
And when you can address with these youngsters about these pitfalls, you know, and encourage them to go in another direction, I think it's so important, man, for them. I feel I'm a part of the foundation of this NBA. Whether they tell me or not, I know I am, you know? So I wanted to stay. I wanted to continue to grow.
But I get tired of seeing youngsters being tripped and don't know there's a line there that they're getting ready to walk over and be tripped on. We can help with that, you know? So I do mention that in my book. And it means a lot to me.
VINCENT GOODWILL: There is so much in the book. You can preorder it, "Ice, Why I Was Born to Score." It was George Gervin and Scoop Jackson. The foreword was written by Kevin Durant. You can get them wherever books are sold. It comes out in two weeks on Halloween. Detroit's own George Gervin, thank you so much for your time.
GEORGE GERVIN: [INAUDIBLE], appreciate you, man. Appreciate y'all. Thank you very much.
VINCENT GOODWILL: Thank you, George.
| english |
Fifty three Karatekas under the banner of the All Meghalaya Karate-do Association will participate in the 6th NESKFI North East Karate Championship 2018 to be held at Assam Rifles Training Centre & School, Shukovi, Dimapur in Nagaland.
The championship is being held from December 10 to December 12.
The team is being accompanied by two coaches – Arjun Sewa, and Mingson Rymbai; two managers – Albertstar Kharkongor, Edilbert A. Lyndem’ technical officials – Donboklang Lyngdoh and Damang Syngkon.
The names of the participants are: Boys & Men: Badondor Ryntathiang, Ram Lanong, Gideon Tympuin, Zimeon Sun, Gerard A. Nongkhlaw, John Basaiawmoit, Rodrick Syiem, John Basaiawmoit, Freddy B. Syiem, Jeremy Kurkalang, Rodrick Syiem, Edwilbert Nongkynrih, Glikerius Buhphang, Badondor Ryntathiang, Daniel D. Warjri,
Mewankitbok Kharbuli, Ram Lanong, Lakhon Lanong, Gregor Wilson Makdoh, Damebanmerbha Blah, Samebanmerbha Blah, Tingnam B. H. Mukhim, Damanbha Pde, Zimeon Sun, Ewansalan Dkhar, Teiborlang Lapang, Albert Jyrwa, Bhawanchwadame L. Mawphlang, Freddy B. Syiem, Jeremy Kurkalang, Iainehlang Kharbuli, Josanky Rympei, Glikerius Buhphang, Ronald L. Nonglait and Frederick Shangpliang.
Girls & Women: Emika Deimaia Myrthong, Wanda Kyrmen Kharkit, Daiaihunlin Pde, Phidawansanilee Wahlang,
Elisheba Khongwar, Isadora A. Lyngdoh, Banylla Shallam, Isadora A. Lyngdoh, Elisheba Khongwar, Lawandashisha Muttyent, Ankita Koch, Banylla Shallam, Barisha Kharbani, Nangbiangsaphi Mukhim, Dayalangki Challam, Loreenia Mawlong, Daiaihunlin Pde, Stephanie Sun, Inlumlang Skhemiew, Aibiangpormika L. Mawphlang, Melvarica Kharbani, Edahunsha Challam, Phidawansanilee Wahlang, Carenia Rapthap, Rosezana Kharkongor, Daiaikyntiew Wahlang, Wandahunshisha Mawblei, Elisheba Khongwar, Isadora A. Lyngdoh, Eva Gracia Kharumnuid, Danibhalin Thangkhiew, Felicia Nongdhar, Banylla Shallam, Barisha Kharbani, Ankita Koch, Bandana Wahlang.
This was informed by the Association general secretary Ksan Kupar Warjri. | english |
<reponame>RevansChen/online-judge
# [Simple Fun #1: Seats in Theater](https://www.codewars.com/kata/simple-fun-number-1-seats-in-theater/)
| markdown |
115 Written Answers
fisheries, education, Women and child development, health etc. sectors.
(e) Further project processing including size and scope of the project, suitability, timing and extent of World Bank assistance would depend on mandatory clearances from the concerned administrative ministries from technical, feasibility angle and the Planning Commission from resource angle, detailed project preparation including preparation mechanism of World Bank and donor preference and availability of committable funds with donor agency.
Running of Jute Industry on Cooperative Basis
9544. DR. KARTIKESWAR PATRA: Will the Minister of TEXTILES be pleased to state:
(a) whether the Union Government have received any scheme from Orissa to run the jute industry on cooperative basis;
(c) the action taken by the Government thereon; and
(d) if no action has been taken so far, the reasons therefor?
THE MINISTER OF STATE OF THE MINISTRY OF TEXTILES(SHRI ASHOK GEHLOT): (a) No, Sir.
(b) to (d). Do not arise.
Opening of office of Mauritius Export and Investment Authority in India
Written Answers 116
Investment Authority has opened an office in India recently;
9545. DR. RAJAGOPALAN SRIDHARAN: Will the Minister of COMMERCE be pleased to state:
(a) whether the Maurtitius Export and
(c) the extent to which trade between the two countries has been or is likely to be improved by the opening of this autherity; and
(d) the items identified for the trade between the two countries?
THE MINISTER OF STATE OF THE MINISTRY OF COMMERCE (SHRI P. CHIDAMBARAM): (a) Yes, Sir.
(b) Mauritius Export and Investment Autharity has recently opened a representative office at General Assurance Building, 2nd Floor, 232 Dr. D.N. Road, Bombay-1.
(c) The above autharity is expected to help in augmenting trade between the two countries though it is premature at this stage to judge the extent of improvement.
However, as an indicator it may be mentioned that Indian export to Mauritius have been increasing. It increased by 115. 77% in 1990-91 over 1989-90 and by 46.66% during April 91 January 92 over the corespending period of previous year.
(d) Area of trade cover fields like Light engineering goods, Chemicals and Pharmaceuticals, Gem & Jewellary etc.
Taking Over of Appu Ghar
9546. SHRISURYANARAYAN YADAV: Will the Minister of COMMERCE be pleased to state:
(a) whether the Appu Ghar situated at Pragati Maidan, New Delhi is being operated
| english |
<reponame>ryanYtan/main
{
"attributes": {
"su": true
},
"courseCode": "SN2282",
"courseCredit": "4",
"description": "This module examines the way music shapes social, political and cultural identities in South Asia. Using an interdisciplinary approach, this course will serve as an introduction to current trends in the fields of ethnomusicology, critical musicology, and popular music studies.",
"faculty": "Arts and Social Science",
"title": "Music in South Asia"
}
| json |
Avaya has announced a strategic partnership with RingCentral to expand and develop its unified communications as a service (UCaaS) provision with the launch of a new Avaya Cloud Office platform.
The new partnership will allow Avaya to better target a wider market, while also benefiting from RingCentral's advances in conferencing delivery.
The deal also sees RingCentral as the exclusive provider of UCaaS for Avaya, allowing for a full suite of private, hybrid, and public service provisions for global customers and partners.
The deal also sees RingCentral invest $125 million in Avaya shares, equivalent to around a six percent total holding, as well as provide an advance of $375 million for future payments and certain licensing rights.
In addition, Avaya’s Board of Directors has authorized a share repurchase program under which it may purchase up to $500 million of Avaya’s common stock, as well as pay down $250 million of the principal debt under its Term Loan B.
The news comes after a bad year for Avaya, in which it originally sought to sell itself off, then merge with Mitel, before rumors of an acquisition or partnership with RingCentral surfaced over the past few weeks, as we reported here.
Sign up to the TechRadar Pro newsletter to get all the top news, opinion, features and guidance your business needs to succeed!
Brian has over 30 years publishing experience as a writer and editor across a range of computing, technology, and marketing titles. He has been interviewed multiple times for the BBC and been a speaker at international conferences. His specialty on techradar is Software as a Service (SaaS) applications, covering everything from office suites to IT service tools. He is also a science fiction and fantasy author, published as Brian G Turner.
| english |
<reponame>33kk/uso-archive
{
"id": 124217,
"name": "Cleaner TVDB",
"description": "Remove top advertising banner, shrink TVDB logo",
"user": {
"id": 123496,
"name": "MisterBuggles",
"email": "redacted",
"paypal_email": "<EMAIL>",
"homepage": null,
"about": null,
"license": "publicdomain"
},
"updated": "2016-02-12T17:31:52.000Z",
"weekly_install_count": 0,
"total_install_count": 30,
"rating": null,
"after_screenshot_name": "https://userstyles.org/auto_style_screenshots/124217-after.png?r=1586332980",
"obsoleting_style_id": null,
"obsoleting_style_name": null,
"obsolete": 0,
"admin_delete_reason_id": null,
"obsoletion_message": null,
"screenshots": null,
"license": null,
"created": "2016-02-12T17:31:52.000Z",
"category": "site",
"raw_subcategory": "thetvdb",
"subcategory": "thetvdb",
"additional_info": null,
"style_tags": [],
"css": "@-moz-document domain(\"thetvdb.com\") {\r\n#ad {display: none !important;}\r\nbody>table>tbody>tr:nth-of-type(2)>td>a>img {width:960px; height:135px !important;}\r\n}",
"discussions": [],
"discussionsCount": 0,
"commentsCount": 0,
"userjs_url": "/styles/userjs/124217/cleaner-tvdb.user.js",
"style_settings": []
} | json |
According to a report by Bloomberg, Yahoo has several potential suitors interested in its core business. Following pressure from shareholders, and a failed turnaround effort under CEO Marissa Mayer, Yahoo put its core business up for sale and set an April 11 deadline for placing bids.
Since Microsoft, Comcast and AT&T have all dropped out of the bidding, it seems that Verizon and Google are the clear favorites to take over ownership of the struggling Web property, although Google hasn’t stated definitively that it will make an offer, just that it’s “considering” it.
Google is said to mainly be interested in Yahoo’s core business, while Verizon has shown interest in Yahoo Japan as well.
The report outlines a Verizon plan that would oust Mayer as the head of the company and install AOL CEO Tim Armstrong in the role, with Verizon executive VP Marni Walden assisting the management of the combined entity.
Of course, the new owner of Yahoo could very well be neither of the two frontrunners, as Time Inc. is still evaluating a bid, while private equity firms Bain and TPG are planning to throw their respective hats into the ring as well.
Get the most important tech news in your inbox each week.
| english |
Meningitis is an inflammation of the meninges, the protective membranes surrounding the brain and spinal cord. It can be caused by viruses, bacteria, fungi, or other pathogens and may lead to symptoms such as severe headaches, fever, neck stiffness, and, in severe cases, neurological complications. One of the primary impacts of meningitis in children is the potential for long-term neurological complications. Brain damage, hearing loss, seizures, learning disabilities, and developmental delays are some of the potential consequences of meningitis.
The causes of meningitis, whether bacterial, viral, fungal, or parasitic, can lead to severe inflammation and damage to the protective membranes surrounding the brain and spinal cord. Fortunately, early diagnosis and appropriate treatment are crucial in reducing the impacts of meningitis in children. Effective treatment options, including antibiotics, antiviral medications, and antifungal drugs, can help control the infection and reduce the severity of symptoms.
Meningitis in children can be caused by various factors, including:
- Bacterial infections such as Streptococcus pneumoniae, Neisseria meningitidis, and Haemophilus influenzae type b (Hib).
- Viral infection is more common and less severe than bacterial meningitis. Enteroviruses, such as coxsackievirus and echovirus, are the most common viral causes.
- A fungal infection such as Cryptococcus can cause meningitis in immunocompromised children, such as those with weakened immune systems due to HIV infection or certain medications.
- Parasitic meningitis, caused by parasites such as Toxoplasma gondii or Naegleria fowleri, is sporadic but can occur in certain circumstances.
Recognising the symptoms of meningitis early on is crucial for prompt medical intervention. The following signs and symptoms are commonly associated with meningitis in children:
- Children may experience severe, persistent headaches that worsen over time.
- Sensitivity to light is another common symptom.
- Meningitis may cause irritability, confusion, and changes in behaviour in children.
- Children with meningitis may experience nausea, vomiting, and a lack of appetite.
- Certain types of meningitis, such as meningococcal meningitis, can cause a distinctive rash.
Once meningitis is suspected, immediate medical attention is crucial. The treatment options for meningitis in children vary depending on the cause and severity.
They may include:
- Antibiotics: In the case of bacterial meningitis, prompt administration of intravenous antibiotics is vital to eradicate the infection and prevent complications. The choice of antibiotic depends on the specific bacteria involved and may be adjusted based on laboratory test results.
- Antiviral Medications: Specific antiviral medications may be prescribed for viral meningitis to alleviate symptoms and aid in recovery.
- Supportive Care: Regardless of the cause of meningitis, supportive care is essential. This may include pain relievers, ample fluid intake, and bed rest to help alleviate symptoms and aid the body’s healing process.
Prevention is crucial to reducing the risk of meningitis in children. Some preventive measures include:
- Vaccination: Immunisation plays a vital role in preventing bacterial meningitis. Vaccines, such as the Hib vaccine, pneumococcal conjugate vaccine, and meningococcal vaccines, should be administered according to the recommended schedule.
- Good Hygiene Practices: Encouraging children to practise good hygiene, such as regular handwashing, can help reduce the risk of spreading infections.
- Avoiding Close Contact: Limiting close contact with individuals with respiratory infections, especially during outbreaks, can minimise the risk of meningitis transmission.
You can also get in touch with the expert Nephrology doctors at Narayana Healthcare based in your city to get immediate attention and medical support during injuries, health disorders or any other health concern.
Meningitis in children is a severe condition that requires early recognition and appropriate medical intervention. Understanding the causes, recognising the symptoms, and seeking immediate medical attention can significantly improve affected children’s outcomes. By following preventive measures, such as vaccination and good hygiene practices, anyone can reduce the risk of meningitis and protect their children’s health and well-being.
Q. What causes meningitis in children?
A. Meningitis in children can be caused by bacterial infections, viral infections, fungal infections, or, rarely, parasitic infections.
Q. How do bacteria cause meningitis in children?
A. Bacteria such as Streptococcus pneumoniae, Neisseria meningitidis, and Haemophilus influenzae type b (Hib) can enter the bloodstream and reach the meninges, causing infection and inflammation.
Q. What are the common symptoms of meningitis in children?
A. Common symptoms of meningitis in children include high fever, severe headache, stiff neck, sensitivity to light (photophobia), irritability, confusion, nausea, vomiting, and sometimes a skin rash.
Q. How is meningitis in children diagnosed?
A. Diagnosis involves a thorough examination by a healthcare professional, including a physical examination, evaluation of symptoms, analysis of cerebrospinal fluid obtained through a lumbar puncture, and possibly other diagnostic tests such as blood tests and imaging studies.
Q. What are the treatment options for meningitis in children?
A. Treatment options for meningitis depend on the cause and severity. Bacterial meningitis requires the immediate administration of intravenous antibiotics, while antiviral medications may be prescribed for viral meningitis. Fungal meningitis requires specific antifungal medications, and parasitic meningitis is treated with targeted therapies. Supportive care, such as pain relief, fluid intake, and rest, is also essential.
| english |
<filename>packages/plugin-cooldowns/src/index.ts
import { Logger, Plugin } from 'gcommands';
import { Cooldowns } from './utils/CooldownManager';
const pluginName = '@gcommands/plugin-cooldowns';
new Plugin(pluginName, client => {
if (!client.getDatabase())
return Logger.error(
'Please add the database parameter to the client.',
pluginName,
);
Cooldowns.init();
});
export * from './inhibitors/CooldownInhibitor';
export * from './utils/CooldownManager';
| typescript |
Petu Piyawa song is a Bhojpuri devotional song from the Aashirwad Vaishnao Mai Ke released on 2017. Music of Petu Piyawa song is composed by Avinash Jha. Petu Piyawa was sung by Sonu Singh. Download Petu Piyawa song from Aashirwad Vaishnao Mai Ke on Raaga.com.
| english |
<reponame>NBens/Invoicerr
function showThenHide(div1, div2) {
var download = document.getElementById(div1);
download.style.display="block";
var send = document.getElementById(div2);
send.style.display="none";
}
function replaceMessage() {
var email = document.getElementById("email");
var message = "Hi [RECEIVER],\n\nA new invoice has been created on your account. You may find a PDF of your invoice attached.\n\nThank you for your business!\n\nWith Regards,\n\n- [SENDER]";
senderText = document.getElementById("sender").value;
receiverText = document.getElementById("receiver").value;
message = message.replace("[RECEIVER]", receiverText);
message = message.replace("[SENDER]", senderText);
email.value = message;
var invoiceNumInput = document.getElementById("invoiceNumInput").value;
var subject = document.getElementById("subject");
if (invoiceNumInput.trim() != "") {
subject.innerText = senderText + " : " + invoiceNumInput;
} else {
subject.innerText = senderText;
}
}
function replaceCurrency() {
var currency = document.getElementById("currency");
var currencies = document.getElementsByClassName("currency");
for (var i = 0; i < currencies.length;i++) {
currencies[i].innerText = currency.value;
}
}
function deleteItem(e) {
e.parentElement.parentElement.parentElement.removeChild(e.parentElement.parentElement);
}
function createItem() {
var e = document.createElement("tr");
var data = '<td><input class="u-full-width" type="text" placeholder="Item Name or Description"></td><td><input class="u-full-width" type="text" size=4></td><td><input class="u-full-width" type="text" size=4></td><td><span class="tableTotals">0</span> <span class="currency">$</span> <i class="fa fa-times delete u-pull-right" onclick="deleteItem(this);"></i></a></td>';
e.innerHTML = data;
var tbody = document.getElementById("tbody");
tbody.appendChild(e);
} | javascript |
<reponame>ro-msg-spring-training/online-shop-mariusfica10
package ro.msg.learning.shop.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import ro.msg.learning.shop.controller.dto.LocationDTO;
import ro.msg.learning.shop.service.LocationService;
@RestController
public class LocationController {
@Autowired
LocationService locationService;
@GetMapping(value="/locations")
public List<LocationDTO> getLocations()
{
return locationService.getLocations();
}
@GetMapping(value="/locations/{id}")
public LocationDTO getLocationByID(@PathVariable int id)
{
return locationService.getLocationByID(id);
}
@RequestMapping(value="/locations/save", method=RequestMethod.POST)
public void saveLocation(@RequestBody LocationDTO locationDTO)
{
locationService.saveLocation(locationDTO);
}
}
| java |
/*############################################################################
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT
############################################################################*/
#include "./cpu_workstream.h"
#include "vpl/mfxvideo.h"
#include "vpl/mfxdispatcher.h"
mfxStatus MFXInit(mfxIMPL implParam, mfxVersion *ver, mfxSession *session) {
mfxInitParam par = {};
par.Implementation = implParam;
if (ver) {
par.Version = *ver;
}
par.ExternalThreads = 0;
return MFXInitEx(par, session);
}
mfxStatus MFXInitEx(mfxInitParam par, mfxSession *session) {
if (!session) {
return MFX_ERR_INVALID_HANDLE;
}
if ((par.Version.Major == 0) && (par.Version.Minor == 0)) {
par.Version.Major = MFX_VERSION_MAJOR;
par.Version.Minor = MFX_VERSION_MINOR;
}
else {
// check the library version
if ((MFX_VERSION_MAJOR < par.Version.Major) ||
(MFX_VERSION_MAJOR == par.Version.Major && MFX_VERSION_MINOR < par.Version.Minor)) {
return MFX_ERR_UNSUPPORTED;
}
}
mfxIMPL impl = par.Implementation & 0x000F;
switch (impl) {
case MFX_IMPL_AUTO:
case MFX_IMPL_SOFTWARE:
break;
case MFX_IMPL_HARDWARE:
case MFX_IMPL_HARDWARE_ANY:
case MFX_IMPL_HARDWARE2:
case MFX_IMPL_HARDWARE3:
case MFX_IMPL_HARDWARE4:
case MFX_IMPL_RUNTIME:
default:
return MFX_ERR_UNSUPPORTED;
}
uint32_t via = par.Implementation & 0x0F00;
switch (via) {
case 0:
case MFX_IMPL_VIA_ANY:
break;
default:
return MFX_ERR_UNSUPPORTED;
}
// create CPU workstream
CpuWorkstream *ws = new CpuWorkstream;
if (!ws) {
return MFX_ERR_UNSUPPORTED;
}
// save the handle
*session = (mfxSession)(ws);
return MFX_ERR_NONE;
}
mfxStatus MFXClose(mfxSession session) {
if (0 == session) {
return MFX_ERR_INVALID_HANDLE;
}
CpuWorkstream *ws = reinterpret_cast<CpuWorkstream *>(session);
delete ws;
ws = nullptr;
return MFX_ERR_NONE;
}
mfxStatus MFXQueryIMPL(mfxSession session, mfxIMPL *impl) {
if (0 == session) {
return MFX_ERR_INVALID_HANDLE;
}
if (0 == impl) {
return MFX_ERR_NULL_PTR;
}
*impl = MFX_IMPL_SOFTWARE;
return MFX_ERR_NONE;
}
mfxStatus MFXQueryVersion(mfxSession session, mfxVersion *pVersion) {
if (0 == session) {
return MFX_ERR_INVALID_HANDLE;
}
if (0 == pVersion) {
return MFX_ERR_NULL_PTR;
}
// set the library's version
pVersion->Major = MFX_VERSION_MAJOR;
pVersion->Minor = MFX_VERSION_MINOR;
return MFX_ERR_NONE;
}
// These functions are optional and not implemented in this
// reference implementation.
mfxStatus MFXJoinSession(mfxSession session, mfxSession child) {
return MFX_ERR_NOT_IMPLEMENTED;
}
mfxStatus MFXDisjoinSession(mfxSession session) {
return MFX_ERR_NOT_IMPLEMENTED;
}
mfxStatus MFXCloneSession(mfxSession session, mfxSession *clone) {
return MFX_ERR_NOT_IMPLEMENTED;
}
mfxStatus MFXSetPriority(mfxSession session, mfxPriority priority) {
return MFX_ERR_NOT_IMPLEMENTED;
}
mfxStatus MFXGetPriority(mfxSession session, mfxPriority *priority) {
return MFX_ERR_NOT_IMPLEMENTED;
}
// DLL entry point
#if defined(_WIN32) || defined(_WIN64)
#include <windows.h>
BOOL APIENTRY DllMain(HMODULE, DWORD, LPVOID lpReserved) {
return TRUE;
} // BOOL APIENTRY DllMain(HMODULE hModule,
#else // #if defined(_WIN32) || defined(_WIN64)
void __attribute__((constructor)) dll_init(void) {}
#endif // #if defined(_WIN32) || defined(_WIN64)
| cpp |
Lab tests by Consumer Reports have confirmed what Wired and its readers have been telling you all along: The problem with the iPhone 4’s reception has nothing to do with how the signal-strength bars are represented, and everything to do with the phone’s faulty antenna design.
Consumer Reports took three separate iPhone 4s into the controlled environment of their radio frequency-insulated testing chamber. That room is insulated from all outside RF signals, so there’s nothing to interfer with the tests. Once inside the chamber, the testers set each iPhone to connect with a base station emulator — a piece of testing equipment that acts like one of AT&T’s cellphone towers. They then tested the iPhones’ ability to connect when held various ways.
“Our engineers found that when you place your finger on the gap between the two antennas on the lower left hand side of the iPhone 4, signal strength can drop by about 20 decibels — and that’s enough to drop a call,” CR reported in a video posted on its site (and embedded below).
In other words, it’s a design problem, not an issue with the way the iPhone 4 displays its signal strength bars, as Apple has tried to claim.
Significantly, CR’s tests showed that just a light finger touch was enough to trigger the problem — no sweaty-palmed “death grip” is required, as other testers have reported.
Further, CR’s tests place the blame squarely on Apple’s phone, not AT&T’s network. Because these tests were done in a controlled environment where no other devices were competing to connect with the base station, the reception problems can’t be attributed to network congestion or to a flaw in AT&T’s wireless network.
Because of those flaws, CR says it cannot recommend the iPhone 4 to consumers.
If you still want an iPhone 4, however, the magazine recommends placing a strip of duct tape over the corner of the phone — much like the electrical tape solution Wired reader Ryan Rhea recommended two weeks ago.
Follow us for real-time tech news: Dylan Tweney and Gadget Lab on Twitter.
| english |
{"categories":["Uncategorized"],"desc":"\n","details":{"authors":"<NAME>","format":"pdf","isbn-10":"0789747103","isbn-13":"978-0789747105","pages":"1104 pages","publication date":"August 26, 2011","publisher":"Que Publishing","size":"25.00Mb"},"img":"http://2192.168.3.118/covers/41/41645b79be191dea2d383475b70c0ef0.jpg","link":"https://rapidhosting.info/files/7vo","title":"Upgrading and Repairing PCs (20th Edition)"} | json |
Nokia Nearby, the location-based web app that allows consumers to discover, search, explore and share places of interest near them, will now feature premium listings from Getit, a popular digital platform for local search, classifieds, micro communities and deals in India.
Nokia Nearby is a local search web application that helps people discover new places by searching nearby locations and presenting the options on a map. Nokia Nearby presents information about places and listings like restaurants, movie theatres, malls etc. even without maps on the phone. Nokia Nearby also gives details about the places that interest and provides an option to contact them from within the app. Users also have the options to share points of interest or other locations via Facebook. Nokia Nearby is available via the Nokia Xpress Browser and downloadable from Nokia Store.
"Nokia Nearby has received overwhelming response from consumers, with half a million new users having downloaded the web app in the previous month alone," Viral Oza, director of marketing, Nokia India said.
Thanks to the collaboration, Getit will be able sell premium listings to businesses, which will appear as paid content on top of Nokia Nearby organic search results, which are organised by proximity to the user.
"Through Getit Infoservices, users will enjoy an enhanced experience that enables them to search, discover and share even more places with great accuracy and richness of content," Oza added.
Jaspreet Bindra, CEO, Getit Infoservices Pvt. Ltd, said, "The inclusion of premium listings on the Nokia Nearby web app can create significant exposure for small-to-medium size enterprises through location-relevant listings appearing alongside organic search results."
Catch the latest from the Consumer Electronics Show on Gadgets 360, at our CES 2024 hub.
| english |
The 2022 Nobel Peace Prize will be announced on Friday at 11 am, local time. It is the fifth and final prize area that Alfred Nobel mentioned in his will.
Winning the prize often provides a boost for a grassroots activist or international group working for peace and human rights, opening doors and elevating the causes for which they fight.
TO READ THE FULL STORY, SUBSCRIBE NOW NOW AT JUST RS 249 A MONTH.
What you get on Business Standard Premium?
- Unlock 30+ premium stories daily hand-picked by our editors, across devices on browser and app.
- Pick your 5 favourite companies, get a daily email with all news updates on them.
- Full access to our intuitive epaper - clip, save, share articles from any device; newspaper archives from 2006.
- Preferential invites to Business Standard events.
- Curated newsletters on markets, personal finance, policy & politics, start-ups, technology, and more. | english |
Manguraha Ke Bam Ba , Sekhauna Ke Bam Ba song is a Bhojpuri devotional song from the Kunware Me Kaila Jaldhari released on 2020. Music of Manguraha Ke Bam Ba , Sekhauna Ke Bam Ba song is composed by Madan Premi. Manguraha Ke Bam Ba , Sekhauna Ke Bam Ba was sung by Manish Abhiraj. Download Manguraha Ke Bam Ba , Sekhauna Ke Bam Ba song from Kunware Me Kaila Jaldhari on Raaga.com.
| english |
<filename>tools/mytools/ARIA/src/py/aria/ancProtocol.py
"""
ARIA -- Ambiguous Restraints for Iterative Assignment
A software for automated NOE assignment
Version 2.3
Copyright (C) <NAME>, <NAME>, <NAME>,
<NAME>, and <NAME>
All rights reserved.
NO WARRANTY. This software package is provided 'as is' without warranty of
any kind, expressed or implied, including, but not limited to the implied
warranties of merchantability and fitness for a particular purpose or
a warranty of non-infringement.
Distribution of substantively modified versions of this module is
prohibited without the explicit permission of the copyright holders.
$Author: bardiaux $
$Revision: 1.1.1.1 $
$Date: 2010/03/23 15:27:24 $
"""
from aria.ariabase import *
from aria.Settings import Settings
from aria.xmlutils import XMLElement, XMLBasePickler
from numpy import *
from time import clock
from time import ctime
## BARDIAUX 280105
REPORT_UPDATED_SPECTRUM = '.assigned'
REPORT_SUMMARY = 'report'
REPORT_NOE_RESTRAINTS = 'noe_restraints'
MISSING_STRUCTURES = 'missing_structures'
KEYBOARD_INTERRUPT = 'keyboard_interrupt'
## local path where MOLMOL restraints files are stored
PATH_MOLMOL = 'molmol'
def files_exist(file_list):
import os
for fn in file_list:
fn = os.path.expanduser(fn)
if not os.path.exists(fn):
return 0
return 1
def dump_peaks_as_text(peak_list, filename, gzip, options = None):
check_type(peak_list, LIST, TUPLE)
check_string(filename)
check_int(gzip)
check_type(options, NONE, DICT)
import aria.AriaPeak as AriaPeak
## write contributions as text file (both, ambiguous and
## unambiguous in one file)
## TODO: so far, text-pickler options are hard-coded.
settings = AriaPeak.AriaPeakListTextPicklerSettings()
## set options
if options is not None:
settings.update(options)
pickler = AriaPeak.AriaPeakListTextPickler(settings)
## sort peak list such, that active restraints come first,
## inactive last.
active = [p for p in peak_list if p.isActive()]
inactive = [p for p in peak_list if not p.isActive()]
peak_list = active + inactive
## Dump assignments
pickler.dump_assignments(peak_list, filename + '.assignments')
## decompose peak_list into ambiguous and unambiguous
## restraints
ambig = [p for p in peak_list if p.isAmbiguous()]
unambig = [p for p in peak_list if not p.isAmbiguous()]
pickler.dump_ambiguous(ambig, filename + '.ambig', gzip)
pickler.dump_unambiguous(unambig, filename + '.unambig', gzip)
## Dump restraint list, sorted by violations.
## Active restraints come first, inactive last
violated = [p for p in peak_list if p.analysis.isViolated()]
if violated:
d_lower = []
d_upper = []
lower = []
upper = []
for r in violated:
## In case of a lower-bound violation,
## put restraint in list of lower-bound-violating
## restraints
d = r.analysis.getLowerBoundViolation()[0]
if d is not None and d > 0.:
d_lower.append(d)
lower.append(r)
else:
d = r.analysis.getUpperBoundViolation()[0]
if d is not None and d > 0.:
d_upper.append(d)
upper.append(r)
lower_indices = argsort(d_lower).tolist()
lower_indices.reverse()
upper_indices = argsort(d_upper).tolist()
upper_indices.reverse()
a = [lower[i] for i in lower_indices]
b = [upper[i] for i in upper_indices]
viol = a + b
else:
viol = []
active = [p for p in viol if p.isActive()]
inactive = [p for p in viol if not p.isActive()]
viol = active + inactive
pickler.dump_violations(viol, filename + '.violations', gzip)
class IterationSettings(Settings):
def create(self):
from aria.Settings import TypeEntity, ChoiceEntity, NonNegativeInt
kk = {}
kk['number'] = NonNegativeInt()
kk['number_of_structures'] = NonNegativeInt()
kk['number_of_best_structures'] = NonNegativeInt()
kk['number_of_kept_structures'] = NonNegativeInt()
choices = ['total_energy', 'restraint_energy','noe_violations', 'restraint_violations'] # BARDIAUX 2.2
msg = 'Sort structures according to one of the following' + \
'choices: %s' % ', '.join(choices)
entity = ChoiceEntity(choices, error_message = msg, description = msg)
kk['sort_criterion'] = entity
msg = 'Argument has to be a %s instance.'
d = {'calibrator_settings': 'CalibratorSettings',
'peak_assigner_settings': 'PeakAssignerSettings',
'violation_analyser_settings': 'ViolationAnalyserSettings',
'contribution_assigner_settings': 'ContributionAssignerSettings',
'merger_settings': 'MergerSettings',
'network_anchoring_settings' : 'NetworkSettings'}
for name, type in d.items():
entity = TypeEntity(type, error_message = msg % type)
kk[name] = entity
return kk
def create_default_values(self):
import aria.Calibrator as Calibrator
import aria.PeakAssigner as PeakAssigner
import aria.ViolationAnalyser as VA
import aria.ContributionAssigner as CA
import aria.Merger as Merger
## BARDIAUX 2.2
import aria.Network as Network
d = {}
d['calibrator_settings'] = Calibrator.CalibratorSettings()
d['peak_assigner_settings'] = PeakAssigner.PeakAssignerSettings()
d['violation_analyser_settings'] = VA.ViolationAnalyserSettings()
d['contribution_assigner_settings'] = CA.ContributionAssignerSettings()
d['merger_settings'] = Merger.MergerSettings()
## BARDIAUX 2.2
d['network_anchoring_settings'] = Network.NetworkSettings()
for value in d.values():
value.reset()
d['number'] = 0
d['number_of_structures'] = 20
d['number_of_best_structures'] = 7
d['number_of_kept_structures'] = 10
d['sort_criterion'] = 'total_energy'
return d
class IterationSettingsXMLPickler(XMLBasePickler):
order = ['number', 'n_structures', 'sort_criterion',
'n_best_structures', 'n_kept_structures', 'assignment', 'merging',
'calibration', 'violation_analysis',
'partial_assignment', 'network_anchoring']
def _xml_state(self, x):
e = XMLElement(tag_order = self.order)
e.number = x['number']
e.n_structures = x['number_of_structures']
e.sort_criterion = x['sort_criterion']
e.n_best_structures = x['number_of_best_structures']
e.assignment = x['peak_assigner_settings']
e.merging = x['merger_settings']
e.calibration = x['calibrator_settings']
e.violation_analysis = x['violation_analyser_settings']
e.partial_assignment = x['contribution_assigner_settings']
# BARDIAUX 2.2
e.network_anchoring = x['network_anchoring_settings']
e.n_kept_structures = x['number_of_kept_structures']
return e
def load_from_element(self, e):
s = IterationSettings()
s['number'] = int(e.number)
s['number_of_structures'] = int(e.n_structures)
s['sort_criterion'] = str(e.sort_criterion)
s['number_of_best_structures'] = int(e.n_best_structures)
s['peak_assigner_settings'] = e.assignment
s['merger_settings'] = e.merging
s['calibrator_settings'] = e.calibration
s['violation_analyser_settings'] = e.violation_analysis
s['contribution_assigner_settings'] = e.partial_assignment
## BARDIAUX 2.2
if hasattr(e, 'network_anchoring'):
s['network_anchoring_settings'] = e.network_anchoring
else:
import aria.Network as Network
nas = Network.NetworkSettings()
nas.reset()
s['network_anchoring_settings'] = nas
## BARDIAUX 2.2
if hasattr(e, 'n_kept_structures'):
s['number_of_kept_structures'] = int(e.n_kept_structures)
else:
s['number_of_kept_structures'] = 0
return s
class ProtocolSettings(Settings):
def create(self):
from aria.Settings import TypeEntity, ChoiceEntity
d = {}
## water-refinement parameters
data_type = 'WaterRefinementParameters'
msg = 'Argument has to be a %s instance.' % data_type
entity = TypeEntity(data_type, error_message = msg)
d['water_refinement'] = entity
## iteration settings
entity = TypeEntity(DICT)
entity.set({})
d['iteration_settings'] = entity
## floating assignment flag
choices = [YES, NO]
msg = 'Floating assignment: %s?' % ' / '.join(choices)
entity = ChoiceEntity(choices, error_message = msg)
d['floating_assignment'] = entity
return d
def create_default_values(self):
return {'floating_assignment': YES}
def addIterationSettings(self, settings):
check_type(settings, 'IterationSettings')
number = settings['number']
it_settings = self['iteration_settings']
if not it_settings.has_key(number):
it_settings[number] = settings
else:
msg = 'IterationSettings instance with same number ' + \
'(%d) already stored in protocol settings.' % number
self.error(KeyError, msg)
def delIterationSettings(self, s):
check_type(s, 'IterationSettings')
number = s['number']
it_settings = self['iteration_settings']
if it_settings.has_key(number):
del it_settings[number]
else:
msg = 'IterationSettings (number %d) d not exist.' % number
self.error(KeyError, msg)
class Protocol(AriaBaseClass):
def __init__(self, settings):
check_type(settings, 'ProtocolSettings')
AriaBaseClass.__init__(self, name = 'Protocol')
self.setSettings(settings)
self.__reports_written = 0
self.constraintSetSerial = None
## self.iterations = {}
def getIterationSettings(self, number):
check_int(number)
return self.getSettings()['iteration_settings'][number]
def getInfrastructure(self):
from aria.Singleton import ProjectSingleton
project = ProjectSingleton()
return project.getInfrastructure()
def initialize(self):
"""
must be called after unpickling a protocol in
order to finalize its initialization.
create objects which implement the actual aria-method
set parameters of first iteration.
"""
from aria.NOEModel import NOEModel, ISPA
import aria.Calibrator as Calibrator
import aria.ViolationAnalyser as VA
import aria.ContributionAssigner as CA
import aria.Merger as Merger
## BARDIAUX 2.2
import aria.Network as Network
## NOE model
## TODO: not nessecary to store model!
#self.model = NOEModel()
self.model = ISPA()
## calibrator
cs = Calibrator.CalibratorSettings()
self.calibrator = Calibrator.Calibrator(cs, self.model)
## violation-analyser
vas = VA.ViolationAnalyserSettings()
self.violation_analyser = VA.ViolationAnalyser(vas)
## contribution assigner
cas = CA.ContributionAssignerSettings()
self.contribution_assigner = CA.ContributionAssigner(cas)
## merger
ms = Merger.MergerSettings()
self.merger = Merger.Merger(ms)
## BARDIAUX 2.2
## network
nas = Network.NetworkSettings()
self.network_anchoring = Network.NetworkAnchoring(nas)
def _updateIterationSettings(self, iteration):
"""
applies the parameters-settings in 'iteration' to
sub-modules
"""
check_type(iteration, 'Iteration')
settings = self.getIterationSettings(iteration.getNumber())
cs = settings['calibrator_settings']
self.calibrator.getSettings().update(cs)
vas = settings['violation_analyser_settings']
self.violation_analyser.getSettings().update(vas)
cas = settings['contribution_assigner_settings']
self.contribution_assigner.getSettings().update(cas)
ms = settings['merger_settings']
self.merger.getSettings().update(ms)
## BARDIAUX 2.2
nas = settings['network_anchoring_settings']
self.network_anchoring.getSettings().update(nas)
def _updateSpectrumSettings(self, spectrum):
spectrum_data = spectrum.getDataSource()
self.calibrator.getSettings().update(spectrum_data)
self.violation_analyser.getSettings().update(spectrum_data)
def mergePeakLists(self, iteration):
## BARDIAUX 2.2
# remove previous combined peaks
iteration.setCombinedRestraints([])
if self.merger.getSettings()['method'] == 'no_merging':
return
peaks = [p for p in iteration.getPeakList() if p.isActive()]
## merge peaks. peaks which are merged (away), i.e.
## are marked via peak.isMerged(1)
n, combined = self.merger(peaks)
# add combined restraints
iteration.setCombinedRestraints(combined)
if n:
msg = 'Peaks merged: %d / %d peaks (%.1f %%) (see report for details).'
self.message(msg % (n, len(peaks), 100. * n / len(peaks)))
if combined:
msg = 'Peaks combined: %d / %d peaks (%.1f %%).'
self.message(msg % (len(combined), len(peaks), 100. * len(combined) / len(peaks)))
## self.message('old %d new %d.' % (len(peaks), len([p for p in iteration.getPeakList() if p.isActive()])))
def compileFileList(self, number, **kw):
"""
Compiles a tuple of filenames which must exist after
iteration 'number' has been successfully completed.
If the method is called with keywords, the returned tuple
contains only a sub-set of all filenames. The sub-set depends
on the particular keyword(s)
"""
check_int(number)
STRUCTURES = 'structures'
FLOAT_FILES = 'float_files'
from os.path import join
keywords = (STRUCTURES, FLOAT_FILES)
unknown = [key for key in kw if key not in keywords]
if unknown:
s = 'Unknown sub-list identifier ("%s"). Known identifier ' + \
'are: %s'
self.error(s % (str(unknown), str(keywords)))
if kw:
keywords = kw.keys()
infra = self.getInfrastructure()
## structures (pdb-files)
it_settings = self.getIterationSettings(number)
n_structures = it_settings['number_of_structures']
path = infra.get_iteration_path(number)
l = []
if STRUCTURES in keywords:
name_template = infra.get_file_root() + '_%d.pdb'
l += [join(path, name_template % j) \
for j in range(1, n_structures + 1)]
if FLOAT_FILES in keywords:
name_template = infra.get_file_root() + '_%d.float'
l += [join(path, name_template % j) \
for j in range(1, n_structures + 1)]
return tuple(l)
def findFirstIteration(self):
"""
For every iteration, this method checks if the required
PDB-files exist. If so, it seeks to the next iteration until
it ends up at an iteration with missing files. If files are
present for all iterations, None is returned. Otherwise the
number of the iteration with missing files is returned.
"""
infra = self.getInfrastructure()
n_iterations = infra.getSettings()['n_iterations']
for i in range(n_iterations):
## Get filenames of all structures for iteration i
pdb_files = self.compileFileList(i, structures=1)
if not files_exist(pdb_files):
return i
return None
def _writePDBFileList(self, iteration):
import os
infra = self.getInfrastructure()
iteration_path = infra.get_iteration_path(iteration.getNumber())
molmol_path = os.path.join(iteration_path, PATH_MOLMOL)
ok = 1
if not os.path.exists(molmol_path):
try:
os.makedirs(molmol_path)
except Exception, msg:
import aria.tools as tools
self.warning(tools.last_traceback())
msg = 'Could not create directory for MOLMOL output.'
self.warning(msg)
ok = 0
if not ok:
return None
## file.nam
## files are sorted according to 'sort_criterion'
## which is part of the <structure_generation>
## section of project xml.
ensemble = iteration.getStructureEnsemble()
file_list = ensemble.getFiles()
if file_list is None:
s = 'Could not write MolMol file.nam: No PDB-files' + \
'in structure ensemble.'
self.warning(s)
return None
filename = os.path.join(molmol_path, 'file.nam')
try:
f = open(filename, 'w')
except:
self.warning('Could not create %s.' % filename)
return None
s = '\n'.join(file_list)
try:
f.write(s)
f.close()
except:
self.warning('Could not write PDB-file list (%s).' % filename)
return None
return molmol_path
def structure_calc_done(self, engine, molecule, iteration):
## Check if there are missing structures
if engine.missingStructures():
self.__done = MISSING_STRUCTURES
return
self.message('Structure calculation done.')
it_settings = self.getIterationSettings(iteration.getNumber())
ensemble = engine.getEnsemble(it_settings, molecule)
## store structure-ensemble in iteration
iteration.setStructureEnsemble(ensemble)
self.__done = 1
def startStructureCalculation(self, iteration, molecule, kept_structures = []):
from aria.Singleton import ProjectSingleton
## get list of all restraints
peaks = iteration.getPeakList()
## BARDIAUX 2.2 Add user-distance CCPN restraints
restraints = iteration.getDistanceRestraintsList()
peaks += restraints
# add also combined restraints
combined = iteration.getCombinedRestraints()
peaks += combined
project = ProjectSingleton()
engine = project.getStructureEngine()
## callback that will be called when pdb-files have been generated.
f = lambda engine = engine, molecule = molecule, it = iteration, \
c = self.structure_calc_done: c(engine, molecule, it)
engine.set_callback(f)
## < Mareuil
MODE = self.getMODE()
engine.go(peaks, self.getSettings(), iteration.getNumber(), kept_structures = kept_structures, MODE=MODE)
## Mareuil >
def doSolventRefinement(self, iteration, molecule):
from aria.Singleton import ProjectSingleton
import aria.StructureEnsemble as SE
## If the given iteration lacks a structure ensemble,
## load PDB-files from last iteration.
## < Mareuil
MODE = self.getMODE()
## Mareuil >
ensemble = iteration.getStructureEnsemble()
if ensemble is None:
## create structure-ensemble from given 'filenames'
number = iteration.getNumber()
it_settings = self.getIterationSettings(number)
se_settings = SE.StructureEnsembleSettings()
## Set iteration-specific settings
se_settings.update(it_settings)
ensemble = SE.StructureEnsemble(se_settings)
filenames = self.compileFileList(number, structures=1)
naming_convention = 'cns'
ensemble.read(filenames, molecule, naming_convention)
iteration.setStructureEnsemble(ensemble)
project = ProjectSingleton()
engine = project.getStructureEngine()
## < Mareuil
file_list = engine.solvent_refine(self.getSettings(), ensemble, MODE=MODE)
## Mareuil >
## cleanup (for solvent refinement and last iteration)
infra = self.getInfrastructure()
last_it = infra.getSettings()['n_iterations'] - 1
engine.cleanup(infra.get_refinement_path())
engine.cleanup(infra.get_iteration_path(last_it))
def doViolationAnalysis(self, restraints, ensemble, store_analysis = 0):
"""
'restraints': list of AriaPeaks. The bounds of every
restraint in that list is checked against distances found
in the 'ensemble'.
'targets': list of AriaPeaks. The violationAnalyser will
store all intermediate results in their analysis-section.
Note: we assume, that peaks[i] corresponds to results[i]
for all i !. If a restraint has been violated, the
corresponding 'target'_restraint will be marked as violated.
"""
f = self.violation_analyser.analysePeak
violated = []
non_violated = []
## get theshold for current iteration
settings = self.violation_analyser.getSettings()
threshold = settings['violation_threshold']
for restraint in restraints:
R_viol = f(ensemble, restraint, store_analysis)
##
## If a restraint has been violated in too many structures
## (according to 'threshold'), mark is a violated.
##
if R_viol > threshold:
restraint.analysis.isViolated(1)
violated.append(restraint)
else:
restraint.analysis.isViolated(0)
non_violated.append(restraint)
## For violated restraints: if bound-correction is enabled,
## repeat violation-analysis with modified bounds.
if settings['lower_bound_correction']['enabled'] == YES:
new_lower = settings['lower_bound_correction']['value']
else:
new_lower = None
if settings['upper_bound_correction']['enabled'] == YES:
new_upper = settings['upper_bound_correction']['value']
else:
new_upper = None
if new_lower is not None or new_upper is not None:
## We forget 'store_analysis' here, since it has already
## been stored (if set).
R_viol = [f(ensemble, r, lower_correction = new_lower,
upper_correction = new_upper) for r in violated]
## List of restraint-indices which are no longer
## violated after bound modification.
indices = flatnonzero(less(R_viol, threshold))
new_non_violated = [violated[i] for i in indices]
[r.analysis.isViolated(0) for r in new_non_violated]
else:
new_non_violated = None
return violated, non_violated, new_non_violated
def done(self):
self.message('finished.')
def _dump_peak_list(self, peaks, path):
check_list(peaks)
check_string(path)
import os
from aria.Singleton import ProjectSingleton
import aria.Merger as Merger
project = ProjectSingleton()
s = project.getReporter()['noe_restraint_list']
## Dump only non-merged restraitns
not_merged = [r for r in peaks if not r.isMerged()]
if s['xml_output'] in (YES, GZIP):
from aria.AriaXML import AriaXMLPickler as pickler
filename = os.path.join(path, REPORT_NOE_RESTRAINTS + '.xml')
t = clock()
p = pickler()
# BARDIAUX 2.2: It's not possible to dump
# CCPN restraints as XML
not_merged = [r for r in not_merged if not is_type(r, 'DistanceRestraint')]
gzip = {YES: 0, GZIP: 1}[s['xml_output']]
p.dump(not_merged, filename, gzip = gzip)
self.message('NOE-restraint list (xml) written (%s).' % filename)
self.debug('Time: %ss' % str(clock()-t))
if s['text_output'] in (YES, GZIP):
t = clock()
filename = os.path.join(path, REPORT_NOE_RESTRAINTS)
gzip = {YES: 0, GZIP: 1}[s['text_output']]
dump_peaks_as_text(not_merged, filename, gzip)
self.message('NOE-restaint list (text) written (%s).' % filename)
self.debug('Time: %ss' % str(clock()-t))
if s['pickle_output'] in (YES, GZIP):
from aria.tools import Dump
filename = os.path.join(path, REPORT_NOE_RESTRAINTS + '.pickle')
t = clock()
gzip = {YES: 0, GZIP: 1}[s['pickle_output']]
Dump(not_merged, filename, gzip = gzip)
self.message('NOE-restraint list (python pickle) ' + \
'written (%s).' % filename)
self.debug('Time: %ss' % str(clock()-t))
## Write Merger report
t = clock()
merged = [r for r in peaks if r.isMerged()]
filename = os.path.join(path, REPORT_NOE_RESTRAINTS + '.merged')
p = Merger.MergerTextPickler()
p.dump(merged, filename)
self.message('Report for Merging-step written (%s).' % filename)
self.debug('Time: %ss' % str(clock() - t))
def _dump_spectra(self, peaks, spectrum, filename):
check_list(peaks)
check_type(spectrum, 'NOESYSpectrum')
check_string(filename)
import os
from aria.Singleton import ProjectSingleton
from aria.NOESYSpectrum import NOESYSpectrum
import aria.Assignment as Assignment
from copy import deepcopy
from aria.AriaXML import AriaXMLPickler as pickler
project = ProjectSingleton()
s = project.getReporter()['spectra']
if s['write_unambiguous_only'] == YES:
peaks = [pk for pk in peaks if not pk.isAmbiguous()]
if peaks and s['write_assigned'] == YES:
spectrum = deepcopy(spectrum)
for pk in peaks:
ref_pk = spectrum.findPeak(pk.getReferencePeak().getNumber())
if ref_pk is None:
self.error('Inconsistency: Could not find reference peak %d in copy of spectrum "%s"' %
(ref_pk.getNumber(), spectrum.getName()))
active_contribs = [c for c in pk.getContributions() \
if c.getWeight() > 0.]
if not ref_pk.isAssigned() or \
(ref_pk.isAssigned() and s['write_assigned_force'] == YES) and\
active_contribs:
h = active_contribs[0]
ss = h.getSpinSystems()
for sp_sys in ss:
dim = ref_pk.getDimension(sp_sys)
AUTO = Assignment.ASSIGNMENT_TYPE_AUTOMATIC
A = Assignment.Assignment(sp_sys.getAtoms(), AUTO)
if dim == 1:
ref_pk.setProton1Assignments((A,))
elif dim == 2:
ref_pk.setProton2Assignments((A,))
for h in active_contribs[1:]:
ss = h.getSpinSystems()
for sp_sys in ss:
dim = ref_pk.getDimension(sp_sys)
AUTO = Assignment.ASSIGNMENT_TYPE_AUTOMATIC
A = Assignment.Assignment(sp_sys.getAtoms(), AUTO)
if dim == 1:
atoms_assi = [a.getAtoms() for a in ref_pk.getProton1Assignments()]
if not A.getAtoms() in atoms_assi:
ref_pk.addProton1Assignment(A)
elif dim == 2:
atoms_assi = [a.getAtoms() for a in ref_pk.getProton2Assignments()]
if not A.getAtoms() in atoms_assi:
ref_pk.addProton2Assignment(A)
t = clock()
p = pickler()
p.dump(spectrum, filename, gzip = 0)
self.debug('Time: %ss' % str(clock()-t))
self.message('Assigned spectrum "%s" written to file %s"' \
% (spectrum.getName(), filename))
def _dump_ccpn(self, iteration, path, is_water_refinement=False):
from aria.Singleton import ProjectSingleton
project = ProjectSingleton()
if project.ccpn_project_instance is None:
return
## # BARDIAUX 2.3 : when solvent molec present, abort CCPN PDB export
## write_solvent = self.getSettings()['water_refinement']['write_solvent_molecules']
## if is_water_refinement and write_solvent == YES:
## msg = 'CCPN export: Solvent refined structures contain solvent molecules.' + \
## 'PDB files will not be exported.'
## self.warning(msg)
## return
# BARDIAUX 2.3
try:
import aria.exportToCcpn as ccpnExport
except:
self.warning('CCPNmr Analysis not found. CCPN export aborted.')
return
from aria.importFromCcpn import getKeysFromString
project_settings = project.getSettings()
run_name = project_settings['run'].strip().replace(' ', '_')
file_root = project_settings['file_root'].strip().replace(' ', '_')
ccpn_project = project.ccpn_project_instance
nmrProject = ccpn_project.currentNmrProject or ccpn_project.findFirstNmrProject()
## TBD: proper handling of NMR projects, e.g. the case in which
## multiple NMR projects exist.
if not nmrProject:
self.message('CCPN export: No NMR project found, creating new one.')
name = 'ARIA2_run_%s' % run_name
nmrProject = ccpn_project.newNmrProject(name=name)
s = project.getReporter()['ccpn']
export = 0
# TJS: Includes inactive ones as these are
# now passed back to CCPN (and marked)
restraints = iteration.getPeakList()
# BARDIAUX: Update for multiple chains
aria_chain = project.getMolecule().get_chains()[0]
chains = ccpnExport.getChainsFromAria2(restraints, ccpn_project,
aria_chain=aria_chain)
# TJS: Get Run object for CCPN to group objects
# If data comes from CCPN, this would have been made
# in Extend-NMR GUI or at load time
if chains:
ccpnMolSystem = chains[0].molSystem
ccpnAriaRun = ccpnExport.getAriaRun(ccpnMolSystem)
ask_water = self.getSettings()['water_refinement']['enabled'] == YES
is_last_iteration = iteration.getNumber() == project.getSettings()['n_iterations']-1
if ccpnAriaRun:
# TJS: Completed runs will not be used again after this
if (is_water_refinement and ask_water) or \
(is_last_iteration and not ask_water):
ccpnAriaRun.status = 'completed'
else:
ccpnAriaRun = None
# TJS: Export structures before restraints & peaks thus
# we have to link NmrConstraintStore to the structure generation
# at the very end
struct_gen = None
if s['export_structures'] == YES and \
(is_last_iteration or is_water_refinement):
export = 1
# TJS: Moved above beacause chains needed for CCPn Run Object
# chains = ccpnExport.getChainsFromAria2(restraints, ccpn_project,
# aria_chain=aria_chain)
if not chains:
self.warning('CCPN export: No molecular system found.')
return
structures = ccpnExport.getStructuresFromAria2Dir(path, chains)
if not structures:
self.warning('CCPN export: Unable to load any structures from iteration directory %s' % path)
else:
self.message('CCPN export: PDB files exported.')
if not is_water_refinement:
name = 'ARIA2_run_%s_it%d' % (run_name, iteration.getNumber())
details = 'Structures created by ARIA2, %s run "%s", iteration %d.' % \
(file_root, run_name, iteration.getNumber())
else:
name = 'ARIA2_run_%s_water_refine' % (run_name,)
details = 'Structures created by ARIA2, %s run "%s", water refinement.' % \
(file_root, run_name)
# TJS: Structure generation is the old way of storing results
struct_gen = ccpnExport.makeStructureGeneration(structures, None)
struct_gen.name = name
struct_gen.details = details
# TJS: Store ARIA generated data as output of CCPN NmrCalc run
if ccpnAriaRun:
dataObj = ccpnAriaRun.newStructureEnsembleData(ensembleId=structures.ensembleId,
molSystemCode=chains[0].molSystem.code,
ioRole='output', name=name,
details=details)
else:
structures = None
if not is_water_refinement and (s['export_noe_restraint_list'] == 'all' or \
(s['export_noe_restraint_list'] == 'last' and \
is_last_iteration)):
export = 1
if self.constraintSetSerial is not None:
constraintSet = nmrProject.findFirstNmrConstraintStore(serial=self.constraintSetSerial)
self.message('CCPN export: Using existing constraint set.')
else:
self.message('CCPN export: Creating new constraint set.')
constraintSet = ccpnExport.makeNmrConstraintStore(nmrProject)
self.constraintSetSerial = constraintSet.serial
# TJS: Link back to any structure generation object
if struct_gen:
struct_gen.nmrConstraintStore = constraintSet
# BARDIAUX: Update for multiple chains
chains = ccpnExport.getChainsFromAria2(restraints, ccpn_project,
aria_chain=aria_chain)
if restraints:
# TJS expert rejected (not active) restraints back to CCPN for analysis
constrList, rejectList, violList = ccpnExport.getConstraintsFromAria2(restraints, chains, constraintSet,
structures)
constrList.name = 'ARIA2_run%s_NOEs_it%d' % (run_name, iteration.getNumber())
constrList.details = 'ARIA2 NOEs, project "%s", run "%s", iteration %d.' % \
(file_root, run_name, iteration.getNumber())
# TJS: Store ARIA generated data as output of CCPN NmrCalc run
if ccpnAriaRun:
cSet = constraintSet.serial
dataObj = ccpnAriaRun.newConstraintStoreData(constraintStoreSerial=cSet,
constraintListSerials=[constrList.serial],
ioRole='output', name=constrList.name,
details=constrList.details)
# TJS constraint list contaning the inactive restraints
if rejectList is not None:
rejectList.name = 'ARIA2_REJECT_run%s_NOEs_it%d' % (run_name, iteration.getNumber())
rejectList.details = 'ARIA2 *INACTIVE* NOEs, project "%s", run "%s", iteration %d.' % \
(file_root, run_name, iteration.getNumber())
# TJS: Store ARIA generated data as output of CCPN NmrCalc run
if ccpnAriaRun:
cSet = constraintSet.serial
dataObj = ccpnAriaRun.newConstraintStoreData(constraintStoreSerial=cSet,
constraintListSerials=[rejectList.serial],
ioRole='output', name=rejectList.name,
details=rejectList.details)
self.message('CCPN export: NOE restraint list exported.')
# BARDIAUX export Constraints from CCPN
for orig_list, distance_constraints in iteration.getDistanceRestraints().items():
# TJS adjust; we want the inactive too. ;-)
# distance_constraints = [r for r in distance_constraints if r.isActive()]
constrList, rejectList, violList = ccpnExport.getConstraintsFromAria2(distance_constraints, chains,
constraintSet, structures)
# TJS adjust
ccpnKeys = getKeysFromString(orig_list.getDataSource().get('ccpn_id'))
list_id = '%s|%s' % (ccpnKeys[-2],ccpnKeys[-1])# Project id is too verbose and redundant inside same project
constrList.name = 'ARIA2_run%s_Dists_%s_it%d' % (run_name, list_id, iteration.getNumber())
constrList.details = 'ARIA2 Distances %s, project "%s", run "%s", iteration %d.' % \
(orig_list.getName(), file_root, run_name, iteration.getNumber())
# TJS: Store ARIA generated data as output of CCPN NmrCalc run
if ccpnAriaRun:
cSet = constraintSet.serial
dataObj = ccpnAriaRun.newConstraintStoreData(constraintStoreSerial=cSet,
constraintListSerials=[constrList.serial],
ioRole='output', name=constrList.name,
details=constrList.details)
# TJS constraint list contaning the inactive restraints
if rejectList is not None:
rejectList.name = 'ARIA2_REJECT_run%s_Dists_%s_it%d' % (run_name, list_id, iteration.getNumber())
rejectList.details = 'ARIA2 *INACTIVE* Distances %s, project "%s", run "%s", iteration %d.' % \
(orig_list.getName(), file_root, run_name, iteration.getNumber())
# TJS: Store ARIA generated data as output of CCPN NmrCalc run
if ccpnAriaRun:
cSet = constraintSet.serial
dataObj = ccpnAriaRun.newConstraintStoreData(constraintStoreSerial=cSet,
constraintListSerials=[rejectList.serial],
ioRole='output', name=rejectList.name,
details=rejectList.details)
self.message('CCPN export: DistanceConstraints list exported.')
if not is_water_refinement and (s['export_assignments'] == YES and is_last_iteration):
import aria.DataContainer as DC
export = 1
## compile dict that maps peaklist keys to name of new peaklist
ccpn_spectra = [x for x in project.ccpn_data_sources.get(DC.DATA_SPECTRUM, ())]
names_dict = {}
template = 'ARIA2_NOE_Peaks_run%s_it%d_%s'
for x in ccpn_spectra:
ccpn_id = x['peaks']['ccpn_id']
args = run_name, iteration.getNumber(), ccpn_id
names_dict[ccpn_id] = template % args
peak_list_keys = ccpnExport.getPeakAssignmentsFromAria2(ccpn_project, restraints, namesDict=names_dict,
aria_chain=aria_chain)
# TJS: Store ARIA generated data as output from run
if ccpnAriaRun and peak_list_keys:
from aria.importFromCcpn import getCcpnPeakList
for peak_list_key in peak_list_keys:
ccpnPeakList = getCcpnPeakList(ccpn_project, peak_list_key)
if ccpnPeakList:
spectrum = ccpnPeakList.dataSource
eSerial = spectrum.experiment.serial
sSerial = spectrum.serial
pSerial = ccpnPeakList.serial
details = ccpnPeakList.details
plId = '%d|%d|%d' % (eSerial, sSerial, pSerial)
name = template % (run_name, iteration.getNumber(), plId)
ccpnAriaRun.newPeakListData(experimentSerial=eSerial,
dataSourceSerial=sSerial,
peakListSerial=pSerial,
ioRole='output',
details=details,
name=name[:80])
self.message('CCPN export: NOE assignments exported.')
if export:
try:
ccpn_project.saveModified()
except Exception, msg:
self.warning('CCPN export: Could not save project. Error message was: %s' % msg) #by AWSS, msg is an object not a string
self.message('CCPN project saved.')
def _dump_iteration(self, iteration, path):
import os
import aria.Iteration as Iteration
filename = os.path.join(path, REPORT_SUMMARY)
pickler = Iteration.IterationTextPickler()
pickler.dump(iteration, filename)
## BARDIAUX 2.2
def _dump_rms(self, peaks, iteration_number):
import aria.RmsReport as RmsReport
infra = self.getInfrastructure()
text_path = infra.get_iteration_path(iteration_number)
graphics_path = infra.get_iteration_graphics_path(iteration_number)
rp = RmsReport.RmsReport(peaks, iteration_number, text_path, graphics_path)
rp.go()
def dumpIteration(self, iteration):
import os
from aria.Singleton import ProjectSingleton
project = ProjectSingleton()
check_type(iteration, 'Iteration')
infra = self.getInfrastructure()
path = infra.get_iteration_path(iteration.getNumber())
# BARDIAUX 2.2
# dump also CCPN DistanceRestraints
# all_peaks = iteration.getPeaks()
all_peaks = {}
all_peaks.update(iteration.getPeaks())
all_peaks.update(iteration.getDistanceRestraints())
order = all_peaks.keys()
order.sort()
peak_list = []
for spectrum in order:
peaks = all_peaks[spectrum]
## sort peak_list wrt ref_peak number
peaks.sort(lambda a, b, c = cmp: \
c(a.getReferencePeak().getNumber(), \
b.getReferencePeak().getNumber()))
peak_list += peaks
## BARDIAUX 25/04/05
# Dump updated spectrum
if is_type(spectrum, 'ConstraintList'):
# Not for CCPN ConstraintList
continue
spec_name = spectrum.getName()
spec_name = spec_name.replace(' ','_')
filename = os.path.join(path, spec_name + \
REPORT_UPDATED_SPECTRUM +'.xml')
s = project.getReporter()['spectra']
if s['iteration'] == 'all' or \
(s['iteration'] == 'last' and \
iteration.getNumber() == project.getSettings()['n_iterations']-1):
self._dump_spectra(peaks, spectrum, filename)
self._dump_peak_list(peak_list, path)
self._dump_iteration(iteration, path)
self._dump_ccpn(iteration, path)
## BARDIAUX 2.2
## RMS report
if peak_list and iteration.getNumber() > 0:
try:
self._dump_rms(peak_list, iteration.getNumber())
#except:
# self.message('Error during RMS analysis/graphics generation.')
except Exception, msg:
import aria.tools as tools
self.warning(tools.last_traceback())
msg = 'Error during RMS analysis/graphics generation.'
self.warning(msg)
self.__reports_written = 1
def reportsWritten(self):
"""
returns 1 if any report files have been written.
"""
return self.__reports_written
def _get_peak_sizes(self, peaks):
"""
depending on the calibrator-setting 'volume_or_intensity',
the method returns volumes or intensities
"""
ref_peaks = [p.getReferencePeak() for p in peaks]
if self.calibrator.getSettings()['volume_or_intensity'] == 'volume':
peak_sizes = [p.getVolume()[0] for p in ref_peaks]
else:
peak_sizes = [p.getIntensity()[0] for p in ref_peaks]
return peak_sizes
# Bardiaux rMat
def _get_peak_theoric_volumes(self, peaks):
"""
get the theoric volume from the spin diffusin correction.
"""
return array([p.getTheoricVolume() for p in peaks])
# BARDIAUX 2.2
# get settings of DistanceRestraint sourec list
def __getListSource(self, p):
return p.getReferencePeak().getSpectrum().getListSource()
def setModelIntensities(self, restraints, ensemble, calibration_factor):
from aria.Datum import Datum
f = self.model.calculatePeaksize
model_peak_sizes = array([f(r, ensemble) for r in restraints])
calculated_peak_sizes = model_peak_sizes * calibration_factor
for i in range(len(restraints)):
d = Datum(calculated_peak_sizes[i], None)
restraints[i].analysis.setCalculatedPeaksize(d)
def calculateBounds(self, factor, peaks, bound_corrected = None, ensemble = None):
"""
calculate lower- and upper bounds for every peak using
the calibration 'factor'. values are stored.
'bound_corrected': list of restraints which are classified
as correct after bound-modification.
"""
# BARDIAUX 2.2
# ConstraintList can bypass the calibration
if is_type(peaks[0], 'DistanceRestraint'):
calibrate = self.__getListSource(peaks[0])['calibrate']
if calibrate == NO or \
(self.findFirstIteration() == 0 and calibrate == 'all_iterations_except_first'):
return
factor = power(factor, 1./6)
peak_sizes = self._get_peak_sizes(peaks)
# Malliavin/Bardiaux rMat
cs = self.calibrator.getSettings()
if cs['relaxation_matrix'] == YES and ensemble is not None:
## from NOEModel import ISPA
## ispa = ISPA()
## f = ispa.calculatePeaksize
## ispa_peak_sizes = array([f(r, ensemble) for r in peaks])
ispa_peak_sizes = array([p.getIspa() for p in peaks])
peak_theoric_vol = self._get_peak_theoric_volumes(peaks)
ratio = ispa_peak_sizes / peak_theoric_vol
distances = factor * power(peak_sizes * ratio, -1. / 6)
else:
distances = factor * power(peak_sizes, -1. / 6)
## TODO: hard-coded 0.125
if cs['error_estimator'] == 'intensity':
errors = 0.125 * power((factor * power(peak_sizes, -1. / 6)), 2.)
else:
errors = 0.125 * power(distances, 2.)
## # BARDIAUX : To be implemented
## if cs['error_estimator'] == 'no_errors':
## errors = [0.] * len(distances)
# errors = [0.] * len(distances)
## distances = factor * power(peak_sizes, -1. / 6)
## ## TODO: hard-coded 0.125
## errors = 0.125 * power(distances, 2.)
## lower bounds are >= 0.
lower_bounds = clip(distances - errors, 0., 1.e10)
upper_bounds = distances + errors
for i in range(len(peaks)):
peak = peaks[i]
peak.setDistance(distances[i])
peak.setLowerBound(lower_bounds[i])
peak.setUpperBound(upper_bounds[i])
## Set new (fixed) bounds for bound-corrected restraints
if bound_corrected:
va_settings = self.violation_analyser.getSettings()
if va_settings['lower_bound_correction']['enabled'] == YES:
new_bound = va_settings['lower_bound_correction']['value']
[r.setLowerBound(new_bound) for r in bound_corrected]
if va_settings['upper_bound_correction']['enabled'] == YES:
new_bound = va_settings['upper_bound_correction']['value']
[r.setUpperBound(new_bound) for r in bound_corrected]
def doDumboCalibration(self, peaks):
# BARDIAUX 2.2
# ConstraintList can bypass calibration
if is_type(peaks[0], 'DistanceRestraint'):
do_cal = self.__getListSource(peaks[0])['calibrate'] == 'all_iterations_except_first'
if do_cal:
return 1.
peak_sizes = self._get_peak_sizes(peaks)
## Assume that average distance of atoms
## causing an NOE is 3.0A
d_calib = 3.0
sum_noe_calc = len(peaks) * (d_calib ** -6)
factor = sum(peak_sizes) / sum_noe_calc
return factor
def doCalibration(self, restraints, ensemble, store_analysis = 0):
do_cal = 1
# BARDIAUX 2.2
# ConstraintList can bypass calibration
if is_type(restraints[0], 'DistanceRestraint'):
do_cal = self.__getListSource(restraints[0])['calibrate'] == NO
if do_cal:
return 1.
if ensemble is None:
factor = self.doDumboCalibration(restraints)
else:
f = self.calibrator.calculateEstimator
factor = f(restraints, ensemble, store_analysis = store_analysis)
## if factor is None, i.e. if no NOEs stronger than a
## certain cutoff were found, set the cutoff to zero
## and calibrate again.
if factor is None:
s = self.calibrator.getSettings()
d_cutoff = s['distance_cutoff']
s = 'Could not perform 1st calibration, since ' + \
'no distances less than %.1f A were found in the ' + \
'ensemble. Omitting distance-cutoff and ' + \
'calibrating again...'
self.message(s % d_cutoff)
factor = f(restraints, ensemble, \
store_analysis = store_analysis, use_cutoff = 0)
return factor
def finalize_engine(self, molecule):
from aria.Singleton import ProjectSingleton
project = ProjectSingleton()
engine = project.getStructureEngine()
engine.prepare(self.getSettings(), molecule)
def doAnalysis(self, restraints, ensemble):
##
## 1st calibration
##
## Store results.
##
factor = self.doCalibration(restraints, ensemble, store_analysis = 1)
##
## Violation analysis
##
## Store results:
##
## - average violation distance
## - whether a restraint is violated
## - degree of violation etc.
##
violated, non_violated, new_non_violated = \
self.doViolationAnalysis(restraints, ensemble,
store_analysis = 1)
## If possible, enlarge set of non-violated restraints
if new_non_violated:
non_violated += new_non_violated
##
## 2nd calibration
##
if non_violated:
factor = self.doCalibration(non_violated, ensemble)
## Calculate model peak-sizes
self.setModelIntensities(restraints, ensemble, factor)
def export_water_refined_structures(self, iteration):
if self.getSettings()['water_refinement']['enabled'] == NO:
return
infra = self.getInfrastructure()
path = infra.get_refinement_path()
self._dump_ccpn(iteration, path, is_water_refinement=True)
def writeReports(self, iteration):
t = clock()
s = 'Performing analysis on calculated structures...'
self.message(s)
ensemble = iteration.getStructureEnsemble()
# BARDIAUX 2.2
# add CCPN DistanceRestraints
all_restraints = {}
all_restraints.update(iteration.getPeaks())
all_restraints.update(iteration.getDistanceRestraints())
for spectrum, restraints in all_restraints.items():
#for spectrum, restraints in iteration.getPeaks().items():
## Set spectrum-specific settings
self._updateSpectrumSettings(spectrum)
self.doAnalysis(restraints, ensemble)
self.message('Analysis done.')
self.debug('Time: %ss' % str(clock() - t))
self.dumpIteration(iteration)
def readPDBFiles(self, filenames, molecule, float_files = None,
format = 'cns'):
"""
'filenames' is a dict or a tuple. In case of a dict,
keys are filenames, values are format-strings. In case of
a tuple, the argument 'format' is used as format-string.
Reads PDB-files 'filenames' and the respective
'float_files'. Returns a StructureEnsemble.
"""
check_type(filenames, TUPLE, DICT)
check_type(molecule, 'Molecule')
check_type(float_files, TUPLE, NONE)
check_string(format)
import aria.StructureEnsemble as SE
if float_files == ():
float_files = None
if float_files is not None:
from aria.FloatFile import FloatFile
parser = FloatFile()
swapped_atoms = [parser.parse(f) for f in float_files]
else:
swapped_atoms = None
## create structure-ensemble from given 'filenames'
se_settings = SE.StructureEnsembleSettings()
ensemble = SE.StructureEnsemble(se_settings)
ensemble.read(filenames, molecule, format, swapped_atoms)
return ensemble
def start(self, iteration, molecule):
"""
setup the first iteration. calculate distance-estimates
using either a template structure or by doing a dumbo-
calibration.
"""
check_type(molecule, 'Molecule')
check_type(iteration, 'Iteration')
## set-up first iteration
import os
from aria.Singleton import ProjectSingleton
from aria.DataContainer import DATA_TEMPLATE_STRUCTURE
t_iteration = clock()
## create seed-assignment
## if a template-structure has been specified,
## use that structure to create a better seed-assignment.
## otherwise we use an extended chain (in case of CNS,
## it is created by using generate_template.inp
infra = self.getInfrastructure()
project = ProjectSingleton()
templates = project.getData(DATA_TEMPLATE_STRUCTURE)
templates = [t for t in templates if t['enabled'] == YES]
## If template structures have been specified, we
## create an initial structure ensemble which will
## be used in the following steps to calculate
## an initial calibration factor etc.
if templates:
filenames = [t['filename'] for t in templates]
formats = [t['format'] for t in templates]
s = 'Template structure(s) specified (%s). Using template(s)' + \
' for calibration / seed-assignment generation.'
self.message(s % ', '.join(map(os.path.basename, filenames)))
## Compile local filenames (template PDB-files are
## read from local data-directory)
filenames = [infra.get_local_filename(f, DATA_TEMPLATE_STRUCTURE) \
for f in filenames]
## Build dict with filenames as keys and formats as
## values.
d = {}
for i in range(len(formats)):
d[filenames[i]] = formats[i]
ensemble = self.readPDBFiles(d, molecule)
ensemble.getSettings()['number_of_best_structures'] = 'all'
iteration.setStructureEnsemble(ensemble)
self.message('Initial iteration created.', verbose_level = VL_LOW)
self.debug('Time: %ss' % str(clock() -t_iteration))
## register initial iteration and start protocol
## self.iterations[iteration.getNumber()] = iteration
## Return last iteration
return self.run_protocol(molecule, iteration)
## < Mareuil
def go(self, iteration, molecule, MODE = None):
self.setMODE(MODE)
## Mareuil >
check_type(molecule, 'Molecule')
check_type(iteration, 'Iteration')
## Check which iterations have already been
## calculated, so that we can skip them.
first_iteration = self.findFirstIteration()
## If no iteration has been calculated yet, run the
## full protocol.
if first_iteration == 0:
iteration = self.start(iteration, molecule)
## If some iterations already exist, calculate the remaing ones.
elif first_iteration is not None:
t = clock()
s = 'Existing iterations found. Resuming with iteration ' + \
'%d.'
self.message(s % first_iteration)
iteration._setNumber(first_iteration - 1)
## Get filenames of structures which ought exist
## after parent-iteration has been successfully completed.
CFL = self.compileFileList
filenames = CFL(first_iteration - 1, structures = 1)
float_files = CFL(first_iteration - 1, float_files = 1)
it_settings = self.getIterationSettings(iteration.getNumber())
## Default PDB-format is 'cns'
ensemble = self.readPDBFiles(filenames, molecule,
float_files)
## Apply structure-ensemble settings of current
## iteration.
se_settings = ensemble.getSettings()
se_settings.update(it_settings)
ensemble.settingsChanged()
iteration.setStructureEnsemble(ensemble)
s = 'PDB-files / FLOAT-files for iteration %d read: %ss'
self.debug(s % (first_iteration, str(clock() - t)))
iteration = self.run_protocol(molecule, iteration)
else:
from aria.Iteration import Iteration
self.message('Iterations are already complete.')
## TODO: this is a bit fiddled!
## Since the solvent-refinement step does not refer to any
## restraint, we simply create an empty iteration
## and set its number to the last iteration's.
infra = self.getInfrastructure()
last_iteration = infra.getSettings()['n_iterations'] - 1
iteration = Iteration(last_iteration)
## Start water refinement
self.doSolventRefinement(iteration, molecule)
## Export structures to CCPN
self.export_water_refined_structures(iteration)
## End of ARIA protocol.
self.done()
## return last iteration
return iteration
## BARDIAUX 2.2
def _checkSpectrumData(self, spectrum):
k = spectrum.getExperimentData().values()
return len([v for v in k if v <> 0.0]) == len(k)
def run_iteration(self, molecule, last_iteration, iteration,
is_first_iteration = 0):
"""
last_iteration is introduced, to provide time-shifted
pickling of restraint lists (i.e. while another
iteration is on its way)
"""
from time import sleep
check_type(molecule, 'Molecule')
check_type(last_iteration, 'Iteration')
## if all iterations shall be stored in memory ...
## self.iterations[iteration.getNumber()] = iteration
## apply settings of target iteration to all sub-modules
self._updateIterationSettings(iteration)
## get structure ensemble calculated in last iteration
ensemble = last_iteration.getStructureEnsemble()
## We now analyse the structure ensemble of the last
## iteration to generate a new set of restraints which
## will then be used to calculate a new ensemble of
## structures for the target iteration.
spectra = last_iteration.getPeaks().keys()
spectra.sort()
# BARDIAUX 2.2
# add CCPN DistanceRestraints
constraint_lists = last_iteration.getDistanceRestraints().keys()
constraint_lists.sort()
# Malliavin/Bardiaux rMat
cs = self.calibrator.getSettings()
for s in spectra:
if cs['relaxation_matrix'] <> NO and not self._checkSpectrumData(s):
self.warning("Missing experimental data for spectrum \"%s\". " % s.getName())
self.warning("Spin-diffusion correction will be disabled.\n")
cs['relaxation_matrix'] = NO
#continue
if cs['relaxation_matrix'] == YES and ensemble is not None:
from aria.NOEModel import SpinDiffusionCorrection
self.model = SpinDiffusionCorrection()
self.calibrator.setModel(self.model)
self.model.prepare(molecule, ensemble)
# initialize matrix
for spectrum in spectra:
self.model.setIntensityMatrix(spectrum)
spectra += constraint_lists
for spectrum in spectra:
self.message('Calibrating spectrum "%s"...' % spectrum.getName())
## get peaks stored in current iteration
## BARDIAUX 2.2 ConstraintList
if is_type(spectrum, 'ConstraintList'):
peaks = iteration.getDistanceRestraints(spectrum)
else:
peaks = iteration.getPeaks(spectrum)
##
## Calibration
##
## If we do not have a seed structure ensemble, we
## perform a very simple calibration
##
## set spectrum-specific parametes for Calibrator
self._updateSpectrumSettings(spectrum)
if ensemble is None:
factor = self.doCalibration(peaks, None)
new_non_violated = None
else:
## Calculate initial calibraton factor.
factor = self.doCalibration(peaks, ensemble)
## Calculate upper/lower bounds for restraints of current
## iteration.
t = clock()
self.calculateBounds(factor, peaks, ensemble = ensemble)
s = '1st calibration and calculation of new ' + \
'distance-bounds done (calibration factor: %e)'
self.message(s % factor, verbose_level = VL_LOW)
self.debug('Time: %ss' % str(clock() - t))
##
## Violation Analysis
##
## Assess every restraint regarding its degree of violation.
##
## Violated restraints will be disabled for the
## current iteration and thus will not be used during
## structure calculation.
##
t = clock()
violated, non_violated, new_non_violated = \
self.doViolationAnalysis(peaks, ensemble)
## Augment set of non-violated restraints
if new_non_violated:
non_violated += new_non_violated
n = len(peaks)
n_viol = len(violated)
p_viol = n_viol * 100. / n
s = 'Violation analysis done: %d / %d restraints ' + \
'(%.1f %%) violated.'
self.message(s % (n_viol, n, p_viol))
if new_non_violated:
s = 'Number of valid restraints has been increased ' + \
'by %d (%.1f%%) after applying a bound-correction.'
p_new = len(new_non_violated) * 100. / n
self.message(s % (len(new_non_violated), p_new))
self.debug('Time: %ss' % str(clock()-t))
##
## 2nd calibration - wrt to non-violated restraints.
## If no restraints have been violated, we use the
## 1st calibration factor.
## Again, we do not store results.
##
if non_violated:
factor = self.doCalibration(non_violated, ensemble)
##
## Activate restraints explicitly.
## We consider a restraint as active, if it has
## not been violated or if its reference cross-peak is
## 'reliable'.
##
for r in peaks:
if not r.analysis.isViolated() or \
r.getReferencePeak().isReliable():
r.isActive(1)
else:
r.isActive(0)
## Store final calibration factor for current iteration.
iteration.setCalibrationFactor(spectrum, factor)
## Calculate upper/lower bounds for restraint-list
## used in the current iteration. I.e. these bounds
## will be used to calculated the structures.
t = clock()
self.calculateBounds(factor, peaks, new_non_violated, ensemble = ensemble)
s = 'Final calibration and calculation of new distance-bounds' + \
' done (calibration factor: %e).' % factor
self.message(s, verbose_level = VL_LOW)
self.debug('Time: %ss' % str(clock() - t))
##
## Partial assignment for restraint-list used in
## current iteration, i.e. for all restraints:
## Calculate weight for every contribution
## and (depends possibly on partial analyser
## settings) throw away 'unlikely' contributions.
##
## If we do not have an ensemble, all contributions
## are activated.
##
t = clock()
# BARDIAUX 2.2
# if we are using the NA, we do not filter the contributions yet
# if the spectrum is a ConstraintList, check if needs to be filtered
NA = self.network_anchoring
ns = NA.getSettings()
do_filter = ns['enabled'] == NO
if is_type(spectrum, 'ConstraintList'):
do_filter = do_filter or \
spectrum.getListSource()['run_network_anchoring'] == NO
do_filter = do_filter and \
spectrum.getListSource()['filter_contributions'] == YES
self.contribution_assigner.assign(peaks, ensemble, filter_contributions = do_filter)
self.message('Partial assignment done.', verbose_level = VL_LOW)
self.debug('Time: %ss' % str(clock() - t))
# BARDIAUX 2.2 NA
NA = self.network_anchoring
ns = NA.getSettings()
if ns['enabled'] == YES:
NA.run(iteration)
# filter contributions
for spectrum in spectra:
# CCPN ConstraintList may not be filtered
if is_type(spectrum, 'ConstraintList'):
if spectrum.getListSource()['filter_contributions'] == NO:
continue
peaks = iteration.getDistanceRestraints(spectrum)
else:
peaks = iteration.getPeaks(spectrum)
self.contribution_assigner.filter_contributions(peaks)
##
## Merge spectra
##
self.mergePeakLists(iteration)
## BARDIAUX
# test maxn remove peak
maxn = self.contribution_assigner.getSettings()['max_contributions']
for p in iteration.getPeakList():
if len(p.getActiveContributions()) > maxn and \
not p.getReferencePeak().isReliable():
p.isActive(0)
## to known when the structure generation has been completed.
self.__done = 0
## Display some cache statistics
if AriaBaseClass.cache and ensemble is not None:
cache = ensemble._StructureEnsemble__cache
hit_rate = float(cache['hit']) * 100. / cache['total']
self.debug('StructureEnsemble cache hit-rate: %.1f%%' % hit_rate)
##
## Run structure calculation
##
# test BARDIAUX 2.2 kept_structures
kept_structures = []
if ensemble is not None:
kept_structures = ensemble.getFiles()
self.startStructureCalculation(iteration, molecule, kept_structures = kept_structures)
##
## Perform analysis wrt to last iteration
## Dump report files
##
if not is_first_iteration:
## apply settings of last iteration to sub-modules
self._updateIterationSettings(last_iteration)
self.writeReports(last_iteration)
## Restore old settings
self._updateIterationSettings(iteration)
## Wait for completion of structure generation.
self.message('Waiting for completion of structure calculation...')
try:
while not self.__done:
sleep(1.)
except KeyboardInterrupt:
self.__done = KEYBOARD_INTERRUPT
if self.__done in (MISSING_STRUCTURES, KEYBOARD_INTERRUPT):
## shut down job-manager
from aria.Singleton import ProjectSingleton
project = ProjectSingleton()
engine = project.getStructureEngine()
engine.getJobScheduler().shutdown()
if self.__done == MISSING_STRUCTURES:
## BARDIAUX 2.2
# get list of missing structures
missing = engine.missingStructures()
msg = 'Structure calculation failed for structure %d.\n' #Please check your setup and the CNS output files for errors.'
err_msg = ''
for m in missing:
err_msg += msg % m
err_msg += 'Please check your setup and the CNS output files for errors.'
## err_msg = 'Structure calculation failed. ' + \
## 'Some structures are missing. ' + \
## 'Please check your setup and/or CNS output files.'
else:
err_msg = 'Interrupted by user.'
self.error(StandardError, err_msg)
## Return current, most recently calculated iteration
return iteration
def run_protocol(self, molecule, iteration):
check_type(molecule, 'Molecule')
check_type(iteration, 'Iteration')
from copy import copy
from aria.Singleton import ProjectSingleton
infra = self.getInfrastructure()
project = ProjectSingleton()
engine = project.getStructureEngine()
msg = '---------------------- Iteration %d -----------------------\n'
is_first_it = 1
n_iterations = len(self.getSettings()['iteration_settings'])
t_main_protocol = clock()
n_first = iteration.getNumber()
for it_number in range(n_first, n_iterations - 1):
## create new iteration
t = clock()
target = copy(iteration)
target._setNumber(iteration.getNumber() + 1)
self.debug('New iteration created: %ss' % str(clock() - t))
self.message(msg % (target.getNumber()))
## Run calculation
t = clock()
iteration = self.run_iteration(molecule, iteration, target,
is_first_it)
## cleanup
if it_number < n_iterations - 1:
it_path = infra.get_iteration_path(it_number)
engine.cleanup(it_path)
is_first_it = 0
self.message('Iteration %s done.' % target.getNumber())
self.debug('Time: %ss' % str(clock() - t))
self.debug('Total time for all iterations: %ss' % \
str(clock() - t_main_protocol))
## Write reports for final iteration
self.writeReports(iteration)
self.writeFinalReports(iteration)
## Return last iteration
return iteration
def writeFinalReports(self, iteration):
check_type(iteration, 'Iteration')
import os
import aria.MolMol as MolMol
from aria.Singleton import ProjectSingleton
## write MOLMOL file-list "file.nam"
molmol_path = self._writePDBFileList(iteration)
if molmol_path is None:
msg = 'Could not write MOLMOL file-list.'
self.warning(msg)
return
## if that worked, attempt to write restraint-lists
project = ProjectSingleton()
s = project.getReporter()['molmol']
if s['enabled'] in (YES, GZIP):
## restraint files
restraints = iteration.getPeakList()
not_merged = [r for r in restraints if not r.isMerged()]
gzip = {YES: 0, GZIP: 1}[s['enabled']]
MolMol.write_noe_restraints(not_merged, molmol_path,
gzip = gzip)
self.message('MOLMOL lower and upper bound (.lol, .upl) ' + \
'files written.')
class ProtocolXMLPickler(XMLBasePickler):
order = ['floating_assignment', 'iteration',
'water_refinement']
def _xml_state(self, x):
e = XMLElement(tag_order = self.order)
s = x.getSettings()
e.iteration = tuple(s['iteration_settings'].values())
e.water_refinement = s['water_refinement']
e.floating_assignment = s['floating_assignment']
return e
def load_from_element(self, e):
from aria.tools import as_tuple
s = ProtocolSettings()
it_settings = as_tuple(e.iteration)
[s.addIterationSettings(i) for i in it_settings]
s['water_refinement'] = e.water_refinement
s['floating_assignment'] = str(e.floating_assignment)
d = s['iteration_settings']
it_numbers = d.keys()
if min(it_numbers) <> 0:
self.warning('Iteration numbering does not start at 0, renumbering ...')
_min = min(it_numbers)
for number, it_settings in d.items():
new_number = number - _min
it_settings['number'] = new_number
d[new_number] = it_settings
del d[number]
p = Protocol(s)
return p
IterationSettings._xml_state = IterationSettingsXMLPickler()._xml_state
Protocol._xml_state = ProtocolXMLPickler()._xml_state
| python |
Results from a survey of just about 2,000 Ontario voters released Tuesday by Abacus Data Inc. found that respondents were two per cent less likely to vote for the the Progressive Conservatives if an election was held now than they were two weeks ago, falling to 27 per cent.
“The Greenbelt scandal has very likely hurt support for the PCs,” the polling company’s CEO David Collette said in a press release. To reach these results, Abacus surveyed just over 2,000 eligible Ontario voters from Aug. 29 to Sept. 4, 2023, seeking to measure the effect the Greenbelt scandal had on support for the Ontario PCs and the Ford government. Most of the survey was completed before Housing Minister Steve Clark resigned on Labour Day Monday, the company said.
The NDP held onto 84 per cent of its voter support and the Liberals held 76 per cent, suggesting neither opposition party has gained from the drop in PC support.In Abacus’ Tuesday release, Colette noted that the drop in support for the Ford government in the wake of the land swap scandal is “significant.
“Whether this is the end [of] the bleeding remains to be seen, but so far, the PCs are in their weakest position since the resounding re-election in June 2022.”The survey was conducted with 2,003 eligible voters in Ontario adults from Aug. 29 to Sept. 4, 2023. A random sample of panelists were invited to complete the survey from a set of partner panels based on the Lucid exchange platform. headtopics.comRead more:
'Lowest level of support' measured for Ontario PCs since 2022 as Greenbelt scandal unfolds: surveyAs the $8-billion Ontario Greenbelt land-swap scandal unfolds, a recent poll of eligible voters is showing the lowest levels of support for the Ford government since the last provincial election in June 2022.
A chronology of key events following Ontario's decision to develop Greenbelt landsTORONTO — Ontario Premier Doug Ford said Tuesday the province will review all Greenbelt lands, including the 14 that were chosen for development after two legislative watchdogs found the selection process to be hasty and flawed.
Greenbelt's 'Mr. X' is a former Ontario mayor: sourcesThe mystery man known as “Mr. X” in a scathing Integrity Commissioner report on how parcels of land came to be removed from Ontario’s protected Greenbelt is a former Ontario mayor, sources say.
Newly-minted Ontario housing minister set to face questions over Greenbelt reviewOntario's newly-minted housing minister Paul Calandra is set to face questions this morning over a review he's expected to launch of 14 sites the government removed from the Greenbelt for housing development.
CP NewsAlert: Greenbelt land swaps to be reviewed, Ontario Premier Doug Ford saysTORONTO — Ontario Premier Doug Ford says the government will review the Greenbelt land swaps that two provincial watchdogs have said was rushed and flawed. More coming.
| english |
Kalaburgi (Karnataka), July 7 (IANS) In a major decision, the Karnataka High Court on Friday held that abusive words against the Prime Minister can be derogatory and irresponsible, but do not amount to sedition.
Sedition charges were slapped against the Shaheen School management following the performance of a play against the Citizenship Amendment Act and NRC by students on January 21, 2020 at the school premises in Bidar city. The incident had become a national news.
The court has quashed the case of sedition against the school management, including Allauddin, Abdul Khaleq, Mohammad Bilal and Mohammad Mehatab, and all members of the school management.
A bench headed by Justice Hemanth Chamdangaudar in Kalaburgi held that the charges made under IPC's Section 153 (A) for causing disharmony between religious groups are not substantiated.
"The utterance of abusive words against the Prime Minister. . . should be hit with footwear is not only derogatory but irresponsible. The constructive criticism of the government is allowed but the constitutional functionaries can't be insulted for having taken a policy decision for which certain section of people may have objection," the bench stated.
Disclaimer: This story has not been edited by the Sakshi Post team and is auto-generated from syndicated feed. | english |
// Copyright (c) 2016 Uber Technologies, Inc.
//
// 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.
package storehost
import (
serverStream "github.com/uber/cherami-server/stream"
"github.com/uber/cherami-thrift/.generated/go/store"
"github.com/stretchr/testify/mock"
"github.com/uber/tchannel-go/thrift"
)
// MockStoreHost is a mock of the storehost used for testing
type MockStoreHost struct {
mock.Mock
}
// OpenAppendStream is a mock of the corresponding storehost routinee
func (m *MockStoreHost) OpenAppendStream(ctx thrift.Context) (serverStream.BStoreOpenAppendStreamOutCall, error) {
args := m.Called(ctx)
return args.Get(0).(serverStream.BStoreOpenAppendStreamOutCall), args.Error(1)
}
// GetAddressFromTimestamp is a mock of the corresponding storehost routinee
func (m *MockStoreHost) GetAddressFromTimestamp(ctx thrift.Context, getAddressRequest *store.GetAddressFromTimestampRequest) (*store.GetAddressFromTimestampResult_, error) {
args := m.Called(ctx, getAddressRequest)
return args.Get(0).(*store.GetAddressFromTimestampResult_), args.Error(1)
}
// GetExtentInfo is a mock of the corresponding storehost routinee
func (m *MockStoreHost) GetExtentInfo(ctx thrift.Context, extentInfoRequest *store.GetExtentInfoRequest) (*store.ExtentInfo, error) {
args := m.Called(ctx, extentInfoRequest)
return args.Get(0).(*store.ExtentInfo), args.Error(1)
}
// SealExtent is a mock of the corresponding storehost routinee
func (m *MockStoreHost) SealExtent(ctx thrift.Context, sealRequest *store.SealExtentRequest) error {
args := m.Called(ctx, sealRequest)
return args.Error(0)
}
// OpenReadStream is a mock of the corresponding storehost routinee
func (m *MockStoreHost) OpenReadStream(ctx thrift.Context) (serverStream.BStoreOpenReadStreamOutCall, error) {
args := m.Called(ctx)
return args.Get(0).(serverStream.BStoreOpenReadStreamOutCall), args.Error(1)
}
// PurgeMessages is a mock of the corresponding storehost routine
func (m *MockStoreHost) PurgeMessages(ctx thrift.Context, purgeMessagesRequest *store.PurgeMessagesRequest) (*store.PurgeMessagesResult_, error) {
args := m.Called(ctx, purgeMessagesRequest)
return args.Get(0).(*store.PurgeMessagesResult_), args.Error(1)
}
// ReadMessages is a mock of the corresponding storehost routine
func (m *MockStoreHost) ReadMessages(ctx thrift.Context, readMessagesRequest *store.ReadMessagesRequest) (*store.ReadMessagesResult_, error) {
args := m.Called(ctx, readMessagesRequest)
return args.Get(0).(*store.ReadMessagesResult_), args.Error(1)
}
// ReplicateExtent is a mock of the corresponding storehost routine
func (m *MockStoreHost) ReplicateExtent(ctx thrift.Context, replicateExtentRequest *store.ReplicateExtentRequest) error {
args := m.Called(ctx, replicateExtentRequest)
return args.Error(0)
}
// RemoteReplicateExtent is a mock of the corresponding storehost routine
func (m *MockStoreHost) RemoteReplicateExtent(ctx thrift.Context, request *store.RemoteReplicateExtentRequest) error {
args := m.Called(ctx, request)
return args.Error(0)
}
// ListExtents is a mock of the corresponding storehost routine
func (m *MockStoreHost) ListExtents(ctx thrift.Context) (*store.ListExtentsResult_, error) {
args := m.Called(ctx)
return args.Get(0).(*store.ListExtentsResult_), args.Error(1)
}
| go |
// MIT License
//
// Copyright (c) 2017-2021 Advanced Micro Devices, Inc. All rights reserved.
//
// 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.
#include "common_test_header.hpp"
// required rocprim headers
#include <rocprim/device/device_segmented_scan.hpp>
// required test headers
#include "test_utils_types.hpp"
#include <numeric>
template<
class Input,
class Output,
class ScanOp = ::rocprim::plus<Input>,
int Init = 0, // as only integral types supported, int is used here even for floating point inputs
unsigned int MinSegmentLength = 0,
unsigned int MaxSegmentLength = 1000,
// Tests output iterator with void value_type (OutputIterator concept)
// Segmented scan primitives which use head flags do not support this kind
// of output iterators.
bool UseIdentityIterator = false
>
struct params
{
using input_type = Input;
using output_type = Output;
using scan_op_type = ScanOp;
static constexpr int init = Init;
static constexpr unsigned int min_segment_length = MinSegmentLength;
static constexpr unsigned int max_segment_length = MaxSegmentLength;
static constexpr bool use_identity_iterator = UseIdentityIterator;
};
template<class Params>
class RocprimDeviceSegmentedScan : public ::testing::Test {
public:
using params = Params;
};
using custom_short2 = test_utils::custom_test_type<short>;
using custom_int2 = test_utils::custom_test_type<int>;
using custom_double2 = test_utils::custom_test_type<double>;
typedef ::testing::Types<
params<unsigned char, unsigned int, rocprim::plus<unsigned int>>,
params<int, int, rocprim::plus<int>, -100, 0, 10000>,
params<custom_double2, custom_double2, rocprim::minimum<custom_double2>, 1000, 0, 10000>,
params<custom_int2, custom_short2, rocprim::maximum<custom_int2>, 10, 1000, 10000>,
params<float, double, rocprim::maximum<double>, 50, 2, 10>,
params<float, float, rocprim::plus<float>, 123, 100, 200, true>,
params<rocprim::bfloat16, float, rocprim::plus<rocprim::bfloat16>, 0, 10, 300, true>,
params<rocprim::bfloat16, rocprim::bfloat16, test_utils::bfloat16_minimum, 0, 1000, 30000>,
#ifndef __HIP__
// hip-clang does not allow to convert half to float
params<rocprim::half, float, rocprim::plus<float>, 0, 10, 300, true>,
// hip-clang does provide host comparison operators
params<rocprim::half, rocprim::half, test_utils::half_minimum, 0, 1000, 30000>,
#endif
params<unsigned char, long long, rocprim::plus<int>, 10, 3000, 4000>
> Params;
TYPED_TEST_SUITE(RocprimDeviceSegmentedScan, Params);
std::vector<size_t> get_sizes(int seed_value)
{
std::vector<size_t> sizes = {
1024, 2048, 4096, 1792,
0, 1, 10, 53, 211, 500,
2345, 11001, 34567,
(1 << 16) - 1220
};
const std::vector<size_t> random_sizes = test_utils::get_random_data<size_t>(2, 1, 1000000, seed_value);
sizes.insert(sizes.end(), random_sizes.begin(), random_sizes.end());
return sizes;
}
TYPED_TEST(RocprimDeviceSegmentedScan, InclusiveScan)
{
int device_id = test_common_utils::obtain_device_from_ctest();
SCOPED_TRACE(testing::Message() << "with device_id= " << device_id);
HIP_CHECK(hipSetDevice(device_id));
using input_type = typename TestFixture::params::input_type;
using output_type = typename TestFixture::params::output_type;
using scan_op_type = typename TestFixture::params::scan_op_type;
static constexpr bool use_identity_iterator =
TestFixture::params::use_identity_iterator;
// use double for accumulation of bfloat16 and half inputs on host-side if operator is rocprim::plus
using is_plus_op = test_utils::is_plus_operator<scan_op_type>;
using is_plus_op_value_type = typename is_plus_op::value_type;
using scan_op_type_host = typename std::conditional<
is_plus_op::value,
typename test_utils::select_plus_operator_host<is_plus_op_value_type>::type,
scan_op_type>::type;
using acc_type = typename std::conditional<
is_plus_op::value,
typename test_utils::select_plus_operator_host<input_type>::acc_type,
input_type>::type;
scan_op_type_host scan_op_host;
using offset_type = unsigned int;
const bool debug_synchronous = false;
scan_op_type scan_op;
std::random_device rd;
std::default_random_engine gen(rd());
std::uniform_int_distribution<size_t> segment_length_dis(
TestFixture::params::min_segment_length,
TestFixture::params::max_segment_length
);
hipStream_t stream = 0; // default stream
for (size_t seed_index = 0; seed_index < random_seeds_count + seed_size; seed_index++)
{
unsigned int seed_value = seed_index < random_seeds_count ? rand() : seeds[seed_index - random_seeds_count];
SCOPED_TRACE(testing::Message() << "with seed= " << seed_value);
const std::vector<size_t> sizes = get_sizes(seed_value);
for(size_t size : get_sizes(seed_value))
{
if (size == 0 && test_common_utils::use_hmm())
{
// hipMallocManaged() currently doesnt support zero byte allocation
continue;
}
SCOPED_TRACE(testing::Message() << "with size = " << size);
// Generate data and calculate expected results
std::vector<output_type> values_expected(size);
std::vector<input_type> values_input = test_utils::get_random_data<input_type>(size, 0, 100, seed_value);
std::vector<offset_type> offsets;
unsigned int segments_count = 0;
size_t offset = 0;
while(offset < size)
{
const size_t segment_length = segment_length_dis(gen);
offsets.push_back(offset);
const size_t end = std::min(size, offset + segment_length);
acc_type aggregate = values_input[offset];
values_expected[offset] = aggregate;
for(size_t i = offset + 1; i < end; i++)
{
aggregate = scan_op_host(aggregate, values_input[i]);
values_expected[i] = static_cast<output_type>(aggregate);
}
segments_count++;
offset += segment_length;
}
offsets.push_back(size);
input_type * d_values_input;
offset_type * d_offsets;
output_type * d_values_output;
HIP_CHECK(test_common_utils::hipMallocHelper(&d_values_input, size * sizeof(input_type)));
HIP_CHECK(test_common_utils::hipMallocHelper(&d_offsets, (segments_count + 1) * sizeof(offset_type)));
HIP_CHECK(test_common_utils::hipMallocHelper(&d_values_output, size * sizeof(output_type)));
HIP_CHECK(
hipMemcpy(
d_values_input, values_input.data(),
size * sizeof(input_type),
hipMemcpyHostToDevice
)
);
HIP_CHECK(
hipMemcpy(
d_offsets, offsets.data(),
(segments_count + 1) * sizeof(offset_type),
hipMemcpyHostToDevice
)
);
HIP_CHECK(hipDeviceSynchronize());
size_t temporary_storage_bytes;
HIP_CHECK(
rocprim::segmented_inclusive_scan(
nullptr, temporary_storage_bytes,
d_values_input,
test_utils::wrap_in_identity_iterator<use_identity_iterator>(d_values_output),
segments_count,
d_offsets, d_offsets + 1,
scan_op,
stream, debug_synchronous
)
);
ASSERT_GT(temporary_storage_bytes, 0);
void * d_temporary_storage;
HIP_CHECK(test_common_utils::hipMallocHelper(&d_temporary_storage, temporary_storage_bytes));
HIP_CHECK(
rocprim::segmented_inclusive_scan(
d_temporary_storage, temporary_storage_bytes,
d_values_input,
test_utils::wrap_in_identity_iterator<use_identity_iterator>(d_values_output),
segments_count,
d_offsets, d_offsets + 1,
scan_op,
stream, debug_synchronous
)
);
HIP_CHECK(hipDeviceSynchronize());
std::vector<output_type> values_output(size);
HIP_CHECK(
hipMemcpy(
values_output.data(), d_values_output,
values_output.size() * sizeof(output_type),
hipMemcpyDeviceToHost
)
);
HIP_CHECK(hipDeviceSynchronize());
ASSERT_NO_FATAL_FAILURE(test_utils::assert_near(values_output, values_expected, test_utils::precision_threshold<input_type>::percentage));
HIP_CHECK(hipFree(d_temporary_storage));
HIP_CHECK(hipFree(d_values_input));
HIP_CHECK(hipFree(d_offsets));
HIP_CHECK(hipFree(d_values_output));
}
}
}
TYPED_TEST(RocprimDeviceSegmentedScan, ExclusiveScan)
{
int device_id = test_common_utils::obtain_device_from_ctest();
SCOPED_TRACE(testing::Message() << "with device_id= " << device_id);
HIP_CHECK(hipSetDevice(device_id));
using input_type = typename TestFixture::params::input_type;
using output_type = typename TestFixture::params::output_type;
using scan_op_type = typename TestFixture::params::scan_op_type;
static constexpr bool use_identity_iterator =
TestFixture::params::use_identity_iterator;
// use double for accumulation of bfloat16 and half inputs on host-side if operator is rocprim::plus
using is_plus_op = test_utils::is_plus_operator<scan_op_type>;
using is_plus_op_value_type = typename is_plus_op::value_type;
using scan_op_type_host = typename std::conditional<
is_plus_op::value,
typename test_utils::select_plus_operator_host<is_plus_op_value_type>::type,
scan_op_type>::type;
using acc_type = typename std::conditional<
is_plus_op::value,
typename test_utils::select_plus_operator_host<input_type>::acc_type,
input_type>::type;
scan_op_type_host scan_op_host;
using offset_type = unsigned int;
const input_type init = input_type{TestFixture::params::init};
const bool debug_synchronous = false;
scan_op_type scan_op;
std::random_device rd;
std::default_random_engine gen(rd());
std::uniform_int_distribution<size_t> segment_length_dis(
TestFixture::params::min_segment_length,
TestFixture::params::max_segment_length
);
hipStream_t stream = 0; // default stream
for (size_t seed_index = 0; seed_index < random_seeds_count + seed_size; seed_index++)
{
unsigned int seed_value = seed_index < random_seeds_count ? rand() : seeds[seed_index - random_seeds_count];
SCOPED_TRACE(testing::Message() << "with seed= " << seed_value);
const std::vector<size_t> sizes = get_sizes(seed_value);
for(size_t size : sizes)
{
if (size == 0 && test_common_utils::use_hmm())
{
// hipMallocManaged() currently doesnt support zero byte allocation
continue;
}
SCOPED_TRACE(testing::Message() << "with size = " << size);
// Generate data and calculate expected results
std::vector<output_type> values_expected(size);
std::vector<input_type> values_input = test_utils::get_random_data<input_type>(size, 0, 100, seed_value);
std::vector<offset_type> offsets;
unsigned int segments_count = 0;
size_t offset = 0;
while(offset < size)
{
const size_t segment_length = segment_length_dis(gen);
offsets.push_back(offset);
const size_t end = std::min(size, offset + segment_length);
acc_type aggregate = init;
values_expected[offset] = aggregate;
for(size_t i = offset + 1; i < end; i++)
{
aggregate = scan_op_host(aggregate, values_input[i-1]);
values_expected[i] = static_cast<output_type>(aggregate);
}
segments_count++;
offset += segment_length;
}
offsets.push_back(size);
input_type * d_values_input;
offset_type * d_offsets;
output_type * d_values_output;
HIP_CHECK(test_common_utils::hipMallocHelper(&d_values_input, size * sizeof(input_type)));
HIP_CHECK(test_common_utils::hipMallocHelper(&d_offsets, (segments_count + 1) * sizeof(offset_type)));
HIP_CHECK(test_common_utils::hipMallocHelper(&d_values_output, size * sizeof(output_type)));
HIP_CHECK(
hipMemcpy(
d_values_input, values_input.data(),
size * sizeof(input_type),
hipMemcpyHostToDevice
)
);
HIP_CHECK(
hipMemcpy(
d_offsets, offsets.data(),
(segments_count + 1) * sizeof(offset_type),
hipMemcpyHostToDevice
)
);
HIP_CHECK(hipDeviceSynchronize());
size_t temporary_storage_bytes;
HIP_CHECK(
rocprim::segmented_exclusive_scan(
nullptr, temporary_storage_bytes,
d_values_input,
test_utils::wrap_in_identity_iterator<use_identity_iterator>(d_values_output),
segments_count,
d_offsets, d_offsets + 1,
init, scan_op,
stream, debug_synchronous
)
);
HIP_CHECK(hipDeviceSynchronize());
ASSERT_GT(temporary_storage_bytes, 0);
void * d_temporary_storage;
HIP_CHECK(test_common_utils::hipMallocHelper(&d_temporary_storage, temporary_storage_bytes));
HIP_CHECK(
rocprim::segmented_exclusive_scan(
d_temporary_storage, temporary_storage_bytes,
d_values_input,
test_utils::wrap_in_identity_iterator<use_identity_iterator>(d_values_output),
segments_count,
d_offsets, d_offsets + 1,
init, scan_op,
stream, debug_synchronous
)
);
HIP_CHECK(hipDeviceSynchronize());
std::vector<output_type> values_output(size);
HIP_CHECK(
hipMemcpy(
values_output.data(), d_values_output,
values_output.size() * sizeof(output_type),
hipMemcpyDeviceToHost
)
);
HIP_CHECK(hipDeviceSynchronize());
ASSERT_NO_FATAL_FAILURE(test_utils::assert_near(values_output, values_expected, test_utils::precision_threshold<input_type>::percentage));
HIP_CHECK(hipFree(d_temporary_storage));
HIP_CHECK(hipFree(d_values_input));
HIP_CHECK(hipFree(d_offsets));
HIP_CHECK(hipFree(d_values_output));
}
}
}
TYPED_TEST(RocprimDeviceSegmentedScan, InclusiveScanUsingHeadFlags)
{
int device_id = test_common_utils::obtain_device_from_ctest();
SCOPED_TRACE(testing::Message() << "with device_id= " << device_id);
HIP_CHECK(hipSetDevice(device_id));
// Does not support output iterator with void value_type
using input_type = typename TestFixture::params::input_type;
using flag_type = unsigned int;
using output_type = typename TestFixture::params::output_type;
using scan_op_type = typename TestFixture::params::scan_op_type;
// scan function
scan_op_type scan_op;
// use double for accumulation of bfloat16 and half inputs on host-side if operator is rocprim::plus
using is_plus_op = test_utils::is_plus_operator<scan_op_type>;
using is_plus_op_value_type = typename is_plus_op::value_type;
using scan_op_type_host = typename std::conditional<
is_plus_op::value,
typename test_utils::select_plus_operator_host<is_plus_op_value_type>::type,
scan_op_type>::type;
using acc_type = typename std::conditional<
is_plus_op::value,
typename test_utils::select_plus_operator_host<input_type>::acc_type,
input_type>::type;
scan_op_type_host scan_op_host;
const bool debug_synchronous = false;
hipStream_t stream = 0; // default stream
for (size_t seed_index = 0; seed_index < random_seeds_count + seed_size; seed_index++)
{
unsigned int seed_value = seed_index < random_seeds_count ? rand() : seeds[seed_index - random_seeds_count];
SCOPED_TRACE(testing::Message() << "with seed= " << seed_value);
const std::vector<size_t> sizes = get_sizes(seed_value);
for(auto size : sizes)
{
if (size == 0 && test_common_utils::use_hmm())
{
// hipMallocManaged() currently doesnt support zero byte allocation
continue;
}
SCOPED_TRACE(testing::Message() << "with size = " << size);
// Generate data
std::vector<input_type> input = test_utils::get_random_data<input_type>(size, 1, 10, seed_value);
std::vector<flag_type> flags = test_utils::get_random_data<flag_type>(size, 0, 10, seed_value);
if( size != 0 )
flags[0] = 1U;
std::transform(
flags.begin(), flags.end(), flags.begin(),
[](flag_type a){ if(a == 1U) return 1U; return 0U; }
);
input_type * d_input;
flag_type * d_flags;
output_type * d_output;
HIP_CHECK(test_common_utils::hipMallocHelper(&d_input, input.size() * sizeof(input_type)));
HIP_CHECK(test_common_utils::hipMallocHelper(&d_flags, flags.size() * sizeof(flag_type)));
HIP_CHECK(test_common_utils::hipMallocHelper(&d_output, input.size() * sizeof(output_type)));
HIP_CHECK(
hipMemcpy(
d_input, input.data(),
input.size() * sizeof(input_type),
hipMemcpyHostToDevice
)
);
HIP_CHECK(
hipMemcpy(
d_flags, flags.data(),
flags.size() * sizeof(flag_type),
hipMemcpyHostToDevice
)
);
HIP_CHECK(hipDeviceSynchronize());
// Calculate expected results on host
std::vector<output_type> expected(input.size());
test_utils::host_inclusive_segmented_scan_headflags<acc_type>(input.begin(), input.end(), flags.begin(), expected.begin(), scan_op_host);
// temp storage
size_t temp_storage_size_bytes;
// Get size of d_temp_storage
HIP_CHECK(
rocprim::segmented_inclusive_scan(
nullptr, temp_storage_size_bytes,
d_input, d_output, d_flags,
input.size(), scan_op, stream,
debug_synchronous
)
);
HIP_CHECK(hipDeviceSynchronize());
// temp_storage_size_bytes must be >0
ASSERT_GT(temp_storage_size_bytes, 0);
// allocate temporary storage
void * d_temp_storage = nullptr;
HIP_CHECK(test_common_utils::hipMallocHelper(&d_temp_storage, temp_storage_size_bytes));
HIP_CHECK(hipDeviceSynchronize());
// Run
HIP_CHECK(
rocprim::segmented_inclusive_scan(
d_temp_storage, temp_storage_size_bytes,
d_input, d_output, d_flags,
input.size(), scan_op, stream,
debug_synchronous
)
);
HIP_CHECK(hipDeviceSynchronize());
// Check if output values are as expected
std::vector<output_type> output(input.size());
HIP_CHECK(
hipMemcpy(
output.data(), d_output,
output.size() * sizeof(output_type),
hipMemcpyDeviceToHost
)
);
HIP_CHECK(hipDeviceSynchronize());
ASSERT_NO_FATAL_FAILURE(test_utils::assert_near(output, expected, test_utils::precision_threshold<input_type>::percentage));
HIP_CHECK(hipFree(d_temp_storage));
HIP_CHECK(hipFree(d_input));
HIP_CHECK(hipFree(d_flags));
HIP_CHECK(hipFree(d_output));
}
}
}
TYPED_TEST(RocprimDeviceSegmentedScan, ExclusiveScanUsingHeadFlags)
{
int device_id = test_common_utils::obtain_device_from_ctest();
SCOPED_TRACE(testing::Message() << "with device_id= " << device_id);
HIP_CHECK(hipSetDevice(device_id));
// Does not support output iterator with void value_type
using input_type = typename TestFixture::params::input_type;
using flag_type = unsigned int;
using output_type = typename TestFixture::params::output_type;
using scan_op_type = typename TestFixture::params::scan_op_type;
const input_type init = input_type{TestFixture::params::init};
// scan function
scan_op_type scan_op;
// use double for accumulation of bfloat16 and half inputs on host-side if operator is rocprim::plus
using is_plus_op = test_utils::is_plus_operator<scan_op_type>;
using is_plus_op_value_type = typename is_plus_op::value_type;
using scan_op_type_host = typename std::conditional<
is_plus_op::value,
typename test_utils::select_plus_operator_host<is_plus_op_value_type>::type,
scan_op_type>::type;
using acc_type = typename std::conditional<
is_plus_op::value,
typename test_utils::select_plus_operator_host<input_type>::acc_type,
input_type>::type;
scan_op_type_host scan_op_host;
const bool debug_synchronous = false;
hipStream_t stream = 0; // default stream
for (size_t seed_index = 0; seed_index < random_seeds_count + seed_size; seed_index++)
{
unsigned int seed_value = seed_index < random_seeds_count ? rand() : seeds[seed_index - random_seeds_count];
SCOPED_TRACE(testing::Message() << "with seed= " << seed_value);
const std::vector<size_t> sizes = get_sizes(seed_value);
for(auto size : sizes)
{
if (size == 0 && test_common_utils::use_hmm())
{
// hipMallocManaged() currently doesnt support zero byte allocation
continue;
}
SCOPED_TRACE(testing::Message() << "with size = " << size);
// Generate data
std::vector<input_type> input = test_utils::get_random_data<input_type>(size, 1, 10, seed_value);
std::vector<flag_type> flags = test_utils::get_random_data<flag_type>(size, 0, 10, seed_value);
if( size != 0 )
flags[0] = 1U;
std::transform(
flags.begin(), flags.end(), flags.begin(),
[](flag_type a){ if(a == 1U) return 1U; return 0U; }
);
input_type * d_input;
flag_type * d_flags;
output_type * d_output;
HIP_CHECK(test_common_utils::hipMallocHelper(&d_input, input.size() * sizeof(input_type)));
HIP_CHECK(test_common_utils::hipMallocHelper(&d_flags, flags.size() * sizeof(flag_type)));
HIP_CHECK(test_common_utils::hipMallocHelper(&d_output, input.size() * sizeof(output_type)));
HIP_CHECK(
hipMemcpy(
d_input, input.data(),
input.size() * sizeof(input_type),
hipMemcpyHostToDevice
)
);
HIP_CHECK(
hipMemcpy(
d_flags, flags.data(),
flags.size() * sizeof(flag_type),
hipMemcpyHostToDevice
)
);
HIP_CHECK(hipDeviceSynchronize());
// Calculate expected results on host
std::vector<output_type> expected(input.size());
test_utils::host_exclusive_segmented_scan_headflags(input.begin(), input.end(), flags.begin(), expected.begin(), scan_op_host, acc_type(init));
// temp storage
size_t temp_storage_size_bytes;
// Get size of d_temp_storage
HIP_CHECK(
rocprim::segmented_exclusive_scan(
nullptr, temp_storage_size_bytes,
d_input, d_output, d_flags, init,
input.size(), scan_op, stream, debug_synchronous
)
);
HIP_CHECK(hipDeviceSynchronize());
// temp_storage_size_bytes must be >0
ASSERT_GT(temp_storage_size_bytes, 0);
// allocate temporary storage
void * d_temp_storage = nullptr;
HIP_CHECK(test_common_utils::hipMallocHelper(&d_temp_storage, temp_storage_size_bytes));
HIP_CHECK(hipDeviceSynchronize());
// Run
HIP_CHECK(
rocprim::segmented_exclusive_scan(
d_temp_storage, temp_storage_size_bytes,
d_input, d_output, d_flags, init,
input.size(), scan_op, stream, debug_synchronous
)
);
HIP_CHECK(hipDeviceSynchronize());
// Check if output values are as expected
std::vector<output_type> output(input.size());
HIP_CHECK(
hipMemcpy(
output.data(), d_output,
output.size() * sizeof(output_type),
hipMemcpyDeviceToHost
)
);
HIP_CHECK(hipDeviceSynchronize());
ASSERT_NO_FATAL_FAILURE(test_utils::assert_near(output, expected, test_utils::precision_threshold<input_type>::percentage));
HIP_CHECK(hipFree(d_temp_storage));
HIP_CHECK(hipFree(d_input));
HIP_CHECK(hipFree(d_flags));
HIP_CHECK(hipFree(d_output));
}
}
}
| cpp |
On a state-wide call by Punjab State Medical and Dental Teachers Association (PSMDTA), medical dental teachers and resident PCMS doctors of Government Medical and Dental Colleges in Patiala and Amritsar and Guru Gobind Singh Medical College Faridkot on Monday observed one day complete protest against Sixth Punjab Pay Commission report relating to the state government doctors which has led to a drastic cut in their salaries.
According to Dr DS Bhullar, state General Secretary of Punjab State Medical and Dental Teachers Association (PSMDTA), OPD and operation theatre services along with class room teaching of the students were kept completely suspended for the whole day in medical and dental colleges and attached hospitals in Patiala, Amritsar and Faridkot as a mark of protest.
However emergency, indoor patient and Covid services along with emergency medicolegal and post-mortem work was kept running smoothly during the protest.
Medical and Dental teachers along with resident PCMS doctors from different departments organised a massive rally in medical college premises and blocked Patiala Sangrur Highway as a symbolic protest making a strong appeal to the Chief Minister Punjab to accept their NPA demand as early as possible so that patient care and teaching of the students do not suffer further.
PSMDTA has also condemned the threatening attitude of Research and Medical Education Minister OP Soni during his meeting with the PSMDTA leaders on Saturday at Chandigarh.
Although the minister assured the association to accept the genuine demands of the medical and dental teachers but demanded one month time to resolve the issue which has been turned down by the association as it has already declared July 20 as the deadline to sort out the issue of NPA after which they will go on indefinite strike along with all other associations of the state government doctors which are on the warpath on NPA and we may even stop attending Covid duties for which the state government will be held responsible.
PSMDTA condemned Ministers threatening attitude; doctors block national highways .The government doctors are on protest for the last more than three weeks and demanding restoration of their NPA to its original form and link it with their basic pay along with restoration of all other allowances.
The Pay Commission has itself stated and clarified in its report that NPA was started by Central and State governments primarily to retain the doctors in public service and to halt the exodus of medical professionals from the country.
The other reason given was that the doctors need to be compensated for longer duration of studies and internship, because of which they usually are late entrants in Government service, said Dr. Bhullar.
| english |
/*! ANinit.css v1.0.3 | THE RIGHT THING SOLUTIONS d.o.o. | <NAME> | <EMAIL> */
.ig-div-autonumeric,
.ig-auto-numeric {
width:100%;
}
.ig-autonumeric-custom {
line-height:32px;
}
.ig-div-autonumeric.ig-autonumeric-custom {
height:100%;
}
/* IG 20.2 height variable fix */
.ig-auto-numeric {
height: 100%!important;
/*height: var(--a-gv-cell-height)!important; /* also works with 20.2*/
}
/*# sourceMappingURL=ANinit.css.map */
| css |
{"success":true,"code":"SUCCESS","data":{"from":1546281000000,"to":1553711400000,"transactionData":[{"name":"Peer-to-peer payments","paymentInstruments":[{"type":"TOTAL","count":27621606,"amount":5.524607172222856E10}]},{"name":"Recharge & bill payments","paymentInstruments":[{"type":"TOTAL","count":11650961,"amount":3.8211818166204696E9}]},{"name":"Merchant payments","paymentInstruments":[{"type":"TOTAL","count":3921438,"amount":1.6642093345681162E9}]},{"name":"Financial Services","paymentInstruments":[{"type":"TOTAL","count":359993,"amount":3.634041257538466E7}]},{"name":"Others","paymentInstruments":[{"type":"TOTAL","count":402042,"amount":3.733552895614773E8}]}]},"responseTimestamp":1630501490326} | json |
<filename>src/components/partials/overview-pages/photo-overview/photo-overview.component.js
import React, { memo, Fragment } from "react";
import moment from "moment";
import { withTranslation } from "react-i18next";
// import UserPhoto from "../../../partials/user-photo/user-photo.component";
import SeeLink from "../../../partials/see-all-link/see-all-link";
import "./photo-overview.css";
const PhotosOverview = ({ t, photos }) => (
<div className="flex-column box-shadow padding-bottom white-bg margin-top margin-right photos-section">
<div className="flex-row justify-between padding border-bottom gray-bg">
<h3>{t("BOARDING_PAGE.VIEW_BOARDING.PHOTOS")}</h3>
<div className="item-label">{!!photos.length ? photos.length : ""}</div>
</div>
{!!photos.length ? (
<Fragment>
<div className="flex-row justify-between padding-top photos-list margin-left margin-right">
{photos.slice(0, 12).map((photo, ind) => (
<div
key={ind}
className="flex-column align-center margin-bottom photo-container"
>
<div className="big-photo-icon">
{/* <UserPhoto imageId={photo.url} defaultIcon={false} /> */}
<img
className="icon"
src={require("../../../../assets/photo-big-icon.png")}
alt="no logo"
/>
</div>
<div className="item-label margin-top date-text">
{moment(photo.date).format("L")}
</div>
</div>
))}
</div>
<div className="flex-row justify-center padding-top">
<SeeLink linkText={t("BUTTONS.SEE_ALL")} />
</div>
</Fragment>
) : (
<div className="padding">{t("WARNINGS.NO_PHOTOS")}</div>
)}
</div>
);
export default withTranslation("translation")(memo(PhotosOverview));
| javascript |
Year 2022 is going to be a great one for actress Rakul Preet Singh's career. She has around 7 films awaiting release in the year which is comparable to some really big stars like Akshay Kumar and Ajay Devgan. Naturally, Rakul is super excited that people are going to witness her in so many avatars this year. "I’ve had an amazing experience shooting for all of them and once the films start coming out you’ll see that each character is very different from each other, each film is a different genre," she told a news outlet.
Talking about the variety of themes in her upcoming films, Rakul said, "If there is an ‘Attack’ which is a Sci-Fi action then there is ‘Runway 34’ where I play a pilot then there is ‘Doctor G’ where I play a gynecologist, ‘Thank God’ is your commercial slice of life film and then there is Akshay sir’s film which is your thriller commercial zone, then ‘Chattriwali’ which I am heading where I play a condom tester. "
Follow us on Google News and stay updated with the latest! | english |
Kyle Coetzer has gone on a rant in reaction to not to being included in Scotland's 15-man squad for next month's World T20 qualifiers. Saying he is "hugely disappointed", Coetzer has questioned the move based on his years of service to Scottish cricket as well as current form.
Coetzer was vice-captain at this year's World Cup and was the team's leading run-scorer with an average of 42. He also is a previous captain of his country and has prior World T20 experience.
Off-spinner Majid Haq has also been left out from the squad.
"I believed I had a great deal to offer Scotland in all three formats of the game," Coetzer said.
"I am immensely proud of my overall record for Scotland, which includes being their leading run-scorer in the T20 format and for Scotland at the 2009 T20 World Cup. After the recent 50-over World Cup which was successful from a personal point of view it is upsetting I will not be able to transfer that into the shorter format of the game.
"Having played in a T20 World Cup before, overseas T20 comps and in the Northants side that won the T20 competition in 2013, I would have loved to have been able to pass on some of my experience to the exciting younger members of the squad to play a key part in the qualification, but unfortunately that is not to be.
"I look forward to hopefully being involved in future squads and good luck to those involved at the qualifiers."
The 14-team qualifying event will be staged across eight venues in Ireland and Scotland from 9-26 July. The two group winners automatically qualify for the World Twenty20 to be held in India in March - April 2016.
The sides finishing second and third in each group will play cross-over matches with the two winners progressing. The losing sides from the two play-off matches will then play the fourth-placed sides from each of the two groups in cross-over matches, with the winners completing the 16-team line-up.
Scotland: Preston Mommsen (capt), Matthew Cross (vc), Richie Berrington, Freddie Coleman, Josh Davey, Con de Lange, Alasdair Evans, Michael Leask, Calum MacLeod, Gavin Main, George Munsey, Safyaan Sharif, Rob Taylor, Craig Wallace, Mark Watt.
| english |
// MIT Licensed (see LICENSE.md).
#pragma once
namespace Plasma
{
DeclareBitField1(TorqueFlags, LocalTorque);
/// Applies a torque to the center of mass of a body.
class TorqueEffect : public PhysicsEffect
{
public:
LightningDeclareType(TorqueEffect, TypeCopyMode::ReferenceType);
TorqueEffect();
// Component Interface
void Serialize(Serializer& stream) override;
void DebugDraw() override;
// Physics Effect Interface
void PreCalculate(real dt) override;
void ApplyEffect(RigidBody* obj, real dt) override;
// Properties
/// Determines if the torque is applied in local or world space.
bool GetLocalTorque() const;
void SetLocalTorque(bool state);
/// The strength of the torque being applied.
float GetTorqueStrength() const;
void SetTorqueStrength(float strength);
/// The axis that the torque is being applied about.
Vec3 GetTorqueAxis() const;
void SetTorqueAxis(Vec3Param axis);
/// The axis of the torque in world space (can be used to manually add torque
/// to a RigidBody).
Vec3 GetWorldTorqueAxis() const;
private:
// Whether or not the torque is local.
BitField<TorqueFlags::Enum> mTorqueStates;
// The strength of torque.
float mTorqueStrength;
// The axis of the torque.
Vec3 mTorqueAxis;
Vec3 mWorldTorqueAxis;
};
} // namespace Plasma
| cpp |
{
"description": "go/doc: set Type.Name field",
"cc": [
"<EMAIL>",
"<EMAIL>"
],
"reviewers": [],
"messages": [
{
"sender": "<EMAIL>",
"recipients": [
"<EMAIL>",
"<EMAIL>",
"<EMAIL>",
"<EMAIL>"
],
"text": "LGTM",
"disapproval": false,
"date": "2012-01-23 02:27:38.503320",
"approval": true
},
{
"sender": "<EMAIL>",
"recipients": [
"<EMAIL>",
"<EMAIL>",
"<EMAIL>",
"<EMAIL>"
],
"text": "*** Submitted as http://code.google.com/p/go/source/detail?r=f664e6283c56 ***\n\ngo/doc: set Type.Name field\n\nR=golang-dev, adg\nCC=golang-dev\nhttp://codereview.appspot.com/5569043",
"disapproval": false,
"date": "2012-01-23 02:52:41.281555",
"approval": false
},
{
"sender": "<EMAIL>",
"recipients": [
"<EMAIL>",
"<EMAIL>",
"<EMAIL>"
],
"text": "Hello <EMAIL>,\n\nI'd like you to review this change to\nhttps://go.googlecode.com/hg/",
"disapproval": false,
"date": "2012-01-23 02:13:22.182693",
"approval": false
}
],
"owner_email": "<EMAIL>",
"private": false,
"base_url": "",
"owner": "gri",
"subject": "code review 5569043: go/doc: set Type.Name field",
"created": "2012-01-23 02:08:12.147887",
"patchsets": [
1,
2001,
2002,
6001,
2003
],
"modified": "2012-01-23 02:52:42.360738",
"closed": true,
"issue": 5569043
} | json |
.klaro .cookie-modal, .klaro .cookie-notice {
/* The switch - the box around the slider */
font-size: 14px;
}
.klaro .cookie-modal .switch, .klaro .cookie-notice .switch {
position: relative;
display: inline-block;
width: 50px;
height: 30px;
}
.klaro .cookie-modal .cm-app-input:checked + .cm-app-label .slider, .klaro .cookie-notice .cm-app-input:checked + .cm-app-label .slider {
background-color: #0885BA;
}
.klaro .cookie-modal .cm-app-input.required:checked + .cm-app-label .slider, .klaro .cookie-notice .cm-app-input.required:checked + .cm-app-label .slider {
opacity: 0.8;
background-color: #006A4E;
cursor: not-allowed;
}
.klaro .cookie-modal .slider, .klaro .cookie-notice .slider {
box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.2), 5px 5px 10px 0 rgba(0, 0, 0, 0.19);
}
.klaro .cookie-modal .cm-app-input, .klaro .cookie-notice .cm-app-input {
position: absolute;
top: 0;
left: 0;
opacity: 0;
width: 50px;
height: 30px;
}
.klaro .cookie-modal .cm-app-label, .klaro .cookie-notice .cm-app-label {
/* The slider */
/* Rounded sliders */
}
.klaro .cookie-modal .cm-app-label .slider, .klaro .cookie-notice .cm-app-label .slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
width: 50px;
display: inline-block;
}
.klaro .cookie-modal .cm-app-label .slider:before, .klaro .cookie-notice .cm-app-label .slider:before {
position: absolute;
content: "";
height: 20px;
width: 20px;
left: 5px;
bottom: 5px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
.klaro .cookie-modal .cm-app-label .slider.round, .klaro .cookie-notice .cm-app-label .slider.round {
border-radius: 30px;
}
.klaro .cookie-modal .cm-app-label .slider.round:before, .klaro .cookie-notice .cm-app-label .slider.round:before {
border-radius: 50%;
}
.klaro .cookie-modal .cm-app-label input:focus + .slider, .klaro .cookie-notice .cm-app-label input:focus + .slider {
box-shadow: 0 0 1px #0885BA;
}
.klaro .cookie-modal .cm-app-label input:checked + .slider:before, .klaro .cookie-notice .cm-app-label input:checked + .slider:before {
-webkit-transform: translateX(20px);
-ms-transform: translateX(20px);
transform: translateX(20px);
}
.klaro .cookie-modal .cm-app-input:focus + .cm-app-label .slider, .klaro .cookie-notice .cm-app-input:focus + .cm-app-label .slider {
box-shadow: 0 4px 6px 0 rgba(125, 125, 125, 0.2), 5px 5px 10px 0 rgba(125, 125, 125, 0.19);
}
.klaro .cookie-modal .cm-app-input:checked + .cm-app-label .slider:before, .klaro .cookie-notice .cm-app-input:checked + .cm-app-label .slider:before {
-webkit-transform: translateX(20px);
-ms-transform: translateX(20px);
transform: translateX(20px);
}
.klaro .cookie-modal .slider, .klaro .cookie-notice .slider {
box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.2), 5px 5px 10px 0 rgba(0, 0, 0, 0.19);
}
.klaro .cookie-modal a, .klaro .cookie-notice a {
color: #00AA3E;
text-decoration: none;
}
.klaro .cookie-modal p, .klaro .cookie-modal strong, .klaro .cookie-modal h1, .klaro .cookie-modal h2, .klaro .cookie-modal ul, .klaro .cookie-modal li, .klaro .cookie-notice p, .klaro .cookie-notice strong, .klaro .cookie-notice h1, .klaro .cookie-notice h2, .klaro .cookie-notice ul, .klaro .cookie-notice li {
font-family: inherit;
color: #eee;
}
.klaro .cookie-modal p, .klaro .cookie-modal h1, .klaro .cookie-modal h2, .klaro .cookie-modal ul, .klaro .cookie-modal li, .klaro .cookie-notice p, .klaro .cookie-notice h1, .klaro .cookie-notice h2, .klaro .cookie-notice ul, .klaro .cookie-notice li {
display: block;
text-align: left;
margin: 0;
padding: 0;
margin-top: 0.7em;
}
.klaro .cookie-modal .cm-link, .klaro .cookie-notice .cm-link {
padding-left: 4px;
vertical-align: middle;
}
.klaro .cookie-modal .cm-btn, .klaro .cookie-notice .cm-btn {
background: #555;
color: #eee;
border-radius: 6px;
padding: 6px 10px;
margin-right: 0.5em;
border: 0;
}
.klaro .cookie-modal .cm-btn:disabled, .klaro .cookie-notice .cm-btn:disabled {
opacity: 0.5;
}
.klaro .cookie-modal .cm-btn.cm-btn-sm, .klaro .cookie-notice .cm-btn.cm-btn-sm {
padding: 0.4em;
font-size: 1em;
}
.klaro .cookie-modal .cm-btn.cm-btn-close, .klaro .cookie-notice .cm-btn.cm-btn-close {
background: #eee;
color: #000;
}
.klaro .cookie-modal .cm-btn.cm-btn-success, .klaro .cookie-notice .cm-btn.cm-btn-success {
background: #00AA3E;
}
.klaro .cookie-modal .cm-btn.cm-btn-info, .klaro .cookie-notice .cm-btn.cm-btn-info {
background: #0885BA;
}
.klaro .cookie-modal .cm-btn.cm-btn-right, .klaro .cookie-notice .cm-btn.cm-btn-right {
float: right;
margin-left: 0.5em;
margin-right: 0;
}
.klaro .cookie-modal {
width: 100%;
height: 100%;
position: fixed;
overflow: hidden;
left: 0;
top: 0;
z-index: 1000;
}
.klaro .cookie-modal .cm-bg {
background: rgba(0, 0, 0, 0.5);
height: 100%;
width: 100%;
position: fixed;
top: 0;
left: 0;
}
.klaro .cookie-modal .cm-modal {
z-index: 1001;
box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.2), 5px 5px 10px 0 rgba(0, 0, 0, 0.19);
width: 100%;
max-height: 98%;
top: 50%;
transform: translateY(-50%);
position: fixed;
overflow: auto;
background: #333;
color: #eee;
}
@media (min-width: 1024px) {
.klaro .cookie-modal .cm-modal {
border-radius: 4px;
position: relative;
margin: 0 auto;
max-width: 640px;
height: auto;
width: auto;
}
}
.klaro .cookie-modal .cm-modal .hide {
border: none;
background: none;
position: absolute;
top: 20px;
right: 20px;
z-index: 1;
}
.klaro .cookie-modal .cm-modal .hide svg {
stroke: #eee;
}
.klaro .cookie-modal .cm-modal .cm-footer {
padding: 1em;
border-top: 1px solid #555;
}
.klaro .cookie-modal .cm-modal .cm-footer-buttons::before, .klaro .cookie-modal .cm-modal .cm-footer-buttons::after {
content: " ";
display: table;
}
.klaro .cookie-modal .cm-modal .cm-footer-buttons::after {
clear: both;
}
.klaro .cookie-modal .cm-modal .cm-footer .cm-powered-by {
font-size: 0.8em;
padding-top: 4px;
text-align: center;
}
.klaro .cookie-modal .cm-modal .cm-footer .cm-powered-by a {
color: #999;
}
.klaro .cookie-modal .cm-modal .cm-header {
padding: 1em;
padding-right: 24px;
border-bottom: 1px solid #555;
}
.klaro .cookie-modal .cm-modal .cm-header h1 {
margin: 0;
font-size: 2em;
display: block;
}
.klaro .cookie-modal .cm-modal .cm-header h1.title {
padding-right: 20px;
}
.klaro .cookie-modal .cm-modal .cm-body {
padding: 1em;
}
.klaro .cookie-modal .cm-modal .cm-body ul {
display: block;
}
.klaro .cookie-modal .cm-modal .cm-body span {
display: inline-block;
width: auto;
}
.klaro .cookie-modal .cm-modal .cm-body ul.cm-apps {
padding: 0;
margin: 0;
}
.klaro .cookie-modal .cm-modal .cm-body ul.cm-apps li.cm-app {
position: relative;
line-height: 20px;
vertical-align: middle;
padding-left: 60px;
min-height: 40px;
}
.klaro .cookie-modal .cm-modal .cm-body ul.cm-apps li.cm-app:first-child {
margin-top: 0;
}
.klaro .cookie-modal .cm-modal .cm-body ul.cm-apps li.cm-app .switch {
position: absolute;
left: 0;
}
.klaro .cookie-modal .cm-modal .cm-body ul.cm-apps li.cm-app p {
margin-top: 0;
}
.klaro .cookie-modal .cm-modal .cm-body ul.cm-apps li.cm-app p.purposes {
font-size: 0.8em;
color: #999;
}
.klaro .cookie-modal .cm-modal .cm-body ul.cm-apps li.cm-app.cm-toggle-all {
border-top: 1px solid #555;
padding-top: 1em;
}
.klaro .cookie-modal .cm-modal .cm-body ul.cm-apps li.cm-app span.cm-app-title {
font-weight: 600;
}
.klaro .cookie-modal .cm-modal .cm-body ul.cm-apps li.cm-app span.cm-opt-out, .klaro .cookie-modal .cm-modal .cm-body ul.cm-apps li.cm-app span.cm-required {
padding-left: 0.2em;
font-size: 0.8em;
color: #999;
}
.klaro .cookie-notice {
background: #333;
z-index: 999;
position: fixed;
width: 100%;
bottom: 0;
right: 0;
}
@media (min-width: 990px) {
.klaro .cookie-notice {
box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.2), 5px 5px 10px 0 rgba(0, 0, 0, 0.19);
border-radius: 4px;
position: fixed;
bottom: 20px;
right: 20px;
max-width: 300px;
}
}
@media (max-width: 989px) {
.klaro .cookie-notice {
border: none;
border-radius: 0;
}
}
.klaro .cookie-notice .cn-body {
margin-bottom: 0;
margin-right: 0;
bottom: 0;
padding: 1em;
padding-top: 0;
}
.klaro .cookie-notice .cn-body p {
margin-bottom: 0.5em;
}
.klaro .cookie-notice .cn-body p.cn-changes {
text-decoration: underline;
}
.klaro .cookie-notice .cn-body .cn-learn-more {
display: inline-block;
}
.klaro .cookie-notice .cn-body p.cn-ok {
padding-top: 0.5em;
margin: 0;
display: flex;
align-items: center;
justify-content: flex-start;
}
.klaro .cookie-notice-hidden {
display: none !important;
}
| css |
Josh Hazlewood's four wickets ensured Pakistan were never able to get away.
Brief scores:
Pakistan 213 in 49. 5 overs (Haris Sohail 41, Misbah-ul-Haq 34; Josh Hazlewood 4 for 35, Mitchell Starc 2 for 40) vs Australia.
(Shiamak Unwalla, a reporter with CricketCountry, is a self-confessed Sci-Fi geek and Cricket fanatic. His Twitter handle is @ShiamakUnwalla) | english |
.header {
position: relative;
background-color: var(--background);
}
.header__wrapper {
display: flex;
align-items: center;
justify-content: space-between;
gap: 11.875rem;
padding-inline: 1rem;
padding-block: 0.5rem;
block-size: 56px;
}
.header__title {
font-size: 0;
display: flex;
align-items: center;
gap: 1rem;
}
.header__title span {
font-size: 1rem;
background-color: var(--success);
color: var(--white);
font-weight: 600;
font-family: 'Roboto', sans-serif;
}
.header__title-image {
font-size: 1rem;
}
.header__title-image img {
inline-size: 4.1875rem;
block-size: 2.5rem;
}
.header__navigation {
display: flex;
align-items: center;
justify-content: space-between;
flex-direction: row-reverse;
gap: 24px;
}
#check-search-icon,
#check-menu-icon {
display: none;
}
.header .icon__menu {
font-size: 1.5rem;
color: var(--primary);
}
/* Menu */
#check-menu-icon:checked ~ .navigation {
display: block;
opacity: 1;
transform: translateX(0);
}
#check-menu-icon:checked + label[for="check-menu-icon"] > i:before {
content: "\e902";
}
.header__navigation label[for="check-menu-icon"] {
z-index: 3;
cursor: pointer;
}
.header__navigation label[for="check-menu-icon"] > i {
vertical-align: middle;
}
.navigation {
position: fixed;
top: 0;
right: 0;
padding: 4rem;
block-size: 100vh;
inline-size: 80vw;
background-color: var(--background);
transition: 350ms;
transform: translateX(100%);
opacity: 0;
z-index: 2;
}
.navigation__list {
display: flex;
flex-direction: column;
gap: 2rem;
padding: 0;
margin: 0;
block-size: 100%;
}
.navigation__item {
list-style: none;
}
.navigation__link {
font: var(--menu-link);
color: var(--white);
text-decoration: none;
}
@media screen and (min-width: 400px) {
.navigation {
inline-size: 70vw;
}
}
@media screen and (min-width: 767px) {
.navigation {
inline-size: 40vw;
}
}
@media screen and (min-width: 1024px) {
.navigation {
inline-size: 30vw;
}
}
@media screen and (min-width: 1279px) {
.header__wrapper {
gap: 11.875rem;
block-size: 7rem;
padding-block: 1.5rem;
padding-inline: 1rem;
}
.header__title-image img {
inline-size: 6.6875rem;
block-size: 4rem;
}
.navigation {
position: initial;
top: 0;
right: 0;
padding: 0;
transform: initial;
block-size: initial;
inline-size: initial;
opacity: initial;
}
.navigation__list {
display: flex;
flex-direction: initial;
justify-content: initial;
align-items: center;
gap: 1.5rem;
block-size: initial;
}
.navigation__link {
color: var(--white);
text-decoration: none;
}
.navigation__link--active:hover {
color: var(--primary);
text-decoration: underline;
}
.header__navigation label[for="check-menu-icon"] {
display: none;
}
} | css |
{"ast":null,"code":"import _classCallCheck from\"@babel/runtime/helpers/classCallCheck\";import _createClass from\"@babel/runtime/helpers/createClass\";import _inherits from\"@babel/runtime/helpers/inherits\";import _possibleConstructorReturn from\"@babel/runtime/helpers/possibleConstructorReturn\";import _getPrototypeOf from\"@babel/runtime/helpers/getPrototypeOf\";function _createSuper(Derived){return function(){var Super=_getPrototypeOf(Derived),result;if(_isNativeReflectConstruct()){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect===\"undefined\"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy===\"function\")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}import AnimatedNode from\"./AnimatedNode\";import{val}from\"../val\";var AnimatedParam=function(_AnimatedNode){_inherits(AnimatedParam,_AnimatedNode);var _super=_createSuper(AnimatedParam);function AnimatedParam(){var _this;_classCallCheck(this,AnimatedParam);_this=_super.call(this,{type:'param'},[]);_this.argsStack=[];_this.__attach();return _this;}_createClass(AnimatedParam,[{key:\"beginContext\",value:function beginContext(ref){this.argsStack.push(ref);}},{key:\"endContext\",value:function endContext(){this.argsStack.pop();}},{key:\"setValue\",value:function setValue(value){var top=this.argsStack[this.argsStack.length-1];top.setValue(value);}},{key:\"__onEvaluate\",value:function __onEvaluate(){var top=this.argsStack[this.argsStack.length-1];return val(top);}}]);return AnimatedParam;}(AnimatedNode);export function createAnimatedParam(){return new AnimatedParam();}","map":{"version":3,"sources":["C:/Users/aines/Desktop/book-santa-stage-11-master/node_modules/react-native-reanimated/src/core/AnimatedParam.js"],"names":["AnimatedNode","val","AnimatedParam","type","argsStack","__attach","ref","push","pop","value","top","length","setValue","createAnimatedParam"],"mappings":"m7BAAA,MAAOA,CAAAA,YAAP,sBACA,OAASC,GAAT,c,GAEMC,CAAAA,a,uGAGJ,wBAAc,+CACZ,uBAAM,CAAEC,IAAI,CAAE,OAAR,CAAN,CAAyB,EAAzB,EADY,MAFdC,SAEc,CAFF,EAEE,CAEZ,MAAKC,QAAL,GAFY,aAGb,C,4EAEYC,G,CAAK,CAChB,KAAKF,SAAL,CAAeG,IAAf,CAAoBD,GAApB,EACD,C,+CAEY,CACX,KAAKF,SAAL,CAAeI,GAAf,GACD,C,0CAEQC,K,CAAO,CACd,GAAMC,CAAAA,GAAG,CAAG,KAAKN,SAAL,CAAe,KAAKA,SAAL,CAAeO,MAAf,CAAwB,CAAvC,CAAZ,CACAD,GAAG,CAACE,QAAJ,CAAaH,KAAb,EACD,C,mDAEc,CACb,GAAMC,CAAAA,GAAG,CAAG,KAAKN,SAAL,CAAe,KAAKA,SAAL,CAAeO,MAAf,CAAwB,CAAvC,CAAZ,CACA,MAAOV,CAAAA,GAAG,CAACS,GAAD,CAAV,CACD,C,2BAxByBV,Y,EA2B5B,MAAO,SAASa,CAAAA,mBAAT,EAA+B,CACpC,MAAO,IAAIX,CAAAA,aAAJ,EAAP,CACD","sourcesContent":["import AnimatedNode from './AnimatedNode';\nimport { val } from '../val';\n\nclass AnimatedParam extends AnimatedNode {\n argsStack = [];\n\n constructor() {\n super({ type: 'param' }, []);\n this.__attach();\n }\n\n beginContext(ref) {\n this.argsStack.push(ref);\n }\n\n endContext() {\n this.argsStack.pop();\n }\n\n setValue(value) {\n const top = this.argsStack[this.argsStack.length - 1];\n top.setValue(value);\n }\n\n __onEvaluate() {\n const top = this.argsStack[this.argsStack.length - 1];\n return val(top);\n }\n}\n\nexport function createAnimatedParam() {\n return new AnimatedParam();\n}\n"]},"metadata":{},"sourceType":"module"} | json |
Yash Raj Studios was lit up last night as 30 aspirants walked the ramp in the hope to clinch the title of Femina Miss India 2017. However, it was Haryana girl Manushi Chillar who trumped them all and took home the coveted title.
Manushi, born to doctor parents, studied in St. Thomas School in Delhi and Bhagat Phool Singh Government Medical College for Women in Sonepat.
Miss Jammu and Kashmir, Sana Dua, and Miss Bihar, Priyanka Kumari were declared the first and second runner-up respectively.
Bollywood celebs such as Alia Bhatt, Ranbir Kapoor, Sushant Singh Rajput and Sonu Nigam gave the evening some stupendous performances. While Alia performed on-stage in a shimmery outfit, Ranbir donned a suit for his act. Soon after the event, the actor rushed to attend good-friend, Arjun Kapoor’s, birthday bash.
The aforementioned stars were not the only celebs present at the venue. The judging panel boasted names such as Arjun Rampal, Manish Malhotra, Illeana D' Cruz, Bipasha Basu, Abhishek Kapoor, Vidyut Jammwal and Miss World 2016 Stehanie Del Valle.
Coming back to the contestants, Shefali Sood, Sana Dua, Priyanka Kumari, Manushi Chillar, Anukriti Gusain and Aishwarya Devan were chosen as top finalists of the contest and each was asked the question --the lesson that they would take back after spending a month with 30 contestants.
To that, Manushi replied, "Throughout the journey I had a vision and with this came a belief, I can change the world.''
All the 30 participants came from all parts of the country were mentored by Neha Dhupia, Waluscha De Sousa, Dipannita Sharma and Parvathy Omanakuttan.
Congratulations, Manushi!
| english |
The assured returns and enormous maturity amount of life insurance policies look tempting to many. Topping the list is the need to save tax. Whatever be the reason, millions of Indians are holding life insurance policies that don’t suit their needs. Before you buy insurance, ask yourself if you need it at all. How to find out if you have a bad life insurance policy and how to get rid of it.
Insurance as a product has been existing for ages, but still the industry was growing at a very slow pace. The awareness and the need to have insurance on which companies had been spending tons of money got created without them spending even a penny, due to covid. But it came with its set of problems, more claims, more requirements of capital. Then came changes in tax laws, which was another big blow. Given the fact that the overall size of the markets, a number of these problems will get resolved over a period of time. So does the current phase of consolidation is an opportunity for investors looking for a long term investment opportunity?
Considering publically-available data with bourses, LIC's equity portfolio has risen by about Rs 80,300 crore to Rs 11.7 lakh crore now. At the end of the September quarter, LIC's equity portfolio was estimated to be worth around Rs 10.9 lakh crore, shows ACE Equity data.
GMR Airports Infrastructure is currently developing two significant greenfield airport projects - one in Bhogapuram, Andhra Pradesh, and the other in Heraklion, Crete, Greece, in collaboration with construction company GEK Terna. The passenger traffic at Delhi and Hyderabad airports is consistently increasing, reaching the highest year-to-date (YTD) levels recorded.
Tata Tech IPO was oversubscribed 69.43 times as investors poured in Rs 1.57 lakh crore by making 73.58 lakh applications. The issue closed for subscription on Friday. In terms of the number of applications, Tata Tech has broken LIC's record of 73.38 lakh applications in May 2022. Reliance Power is at the third place as it had got 48 lakh IPO applications in January 2008.
The recent RBI guidelines on tightening the normal for provision for unsecured lending, bring back the debate to whether from a long term perspective, it is better to own a good housing finance stocks as it largely secured portfolio or should be stick to unsecured lenders who have faster growth rate. Despite all the ills of the real estate and housing finance business, one of the biggest wealth creators in the history of the Indian stock market has been a housing finance company, erstwhile HDFC which now merged with HDFC bank. So, it is a business which is good to own but what you choose to own matters most.
Department of Investment and Public Asset Management (DIPAM) Secretary Tuhin Kanta Pandey had last week said the IDBI Bank strategic sale transaction is "on course" but the transaction would not be completed in the current fiscal. "We practically don't think that before March we can conclude it (IDBI Bank stake sale)," Tuhin Kanta Pandey had said.
Stock Reports Plus, powered by Refinitiv, undertakes detailed company analysis for 4,000+ listed stocks. In addition to detailed company analysis, the report also collates analysts’ forecasts and trend analysis for each component. An average score in Stock Reports Plus is calculated by undertaking quantitative analysis of five key investment tools - earnings, fundamentals, relative valuation, risk and price momentum.
India's largest life insurer the Life Insurance Corporation of India (LIC) decreased its holding in 115 stocks during the quarter ended September 30, 2023. ETMarkets brings 10 stocks where LIC reduced its holdings the most as of the last quarter. The average stock price change during the quarter was 17.28% for these stocks. The state-run insurance company has more than 1% equity across 274 companies, according to Prime Infobase data. The data also states that LIC accounts for the largest share of investments in equities by insurance companies with 68% share out of a total Rs 11.72 lakh crore.
A look at the top additions for three consecutive months shows that mutual funds have been consistent buyers in RIL, HDFC Bank, ICICI Bank, LIC, Kotak Mahindra Bank, Nykaa, HPCL, Eureka Forbes and Maharashtra Seamless.
For all those, who are surprised the fact that all of sudden bank nifty or finnifty witnessed a sharp fall, it would worth remembering that whether it is upward or southward movement of Nifty and Sensex, it is largely led by financial services because of high ownership of institutional investor’s both domestic and foreign portfolio investors. So if there a sell of due to risk off mode for emerging markets, which market has moved to in last few days. It is financials which are likely to lead to the decline, but, there is equal sharp recovery in them. So, be careful both in buying and selling decision in financial space.
Till a few months back If any global investor wanted to take exposure to the housing finance sector in India. The first choice would be HDFC ltd, Post the mergers with HDFC bank, to take exposure to HDFC, investors will have to buy HDFC bank, which they may or may not do, given constraints under which each fund works. So one of the unintended consequences of this merger of HDFC Ltd and HDFC bank has been that other pure housing finance stocks have a higher probability of getting attention from investors. Now this has happened at a time when after a long phase of headwind and turbulence in which the sector saw many companies going down under and some exchanging hands, some respite has emerged and some tailwinds are emerging.
Whether it is upward or southward movement of Nifty and Sensex, it is largely led by financial services stocks which include banks, both private and public sector and other heavyweights which essentially are part of the financial services. The reason, high ownership of foreign portfolio investors ( FPIs) in the majority of financial services and banking stocks. Given the fact that yields on US bonds have reached closer to 5 percent mark and there are clear fears looming on the street, about an increase in global cost of capital.
The Department of Investment and Public Asset Management (DIPAM) has informed prospective asset valuers that IDBI Bank has deferred tax assets of Rs 11,520 crore and 120 properties in major cities. DIPAM stated that the intangible assets on the bank's balance sheet primarily consist of deferred tax assets, which can be adjusted against future tax dues.
Financial services stocks and IT stocks are the main components of the Nifty. A large number of times when IT stocks are under pressure, it is financials that come to the rescue. When financials are under pressure it is IT stocks which tend to play the balancing act. While IT stocks have been underperforming for some time, what needs to be seen is that in today's trading session, with Infy's Q2 result impact bringing another round of pressure, will financials services stock be able to give much needed support. If they also witness any strong pressure due to the global development then it would bring more pressure on nIfty which would also lead to pressure on broader markets.
"We have been adding Praj Industries because the outlook has improved with their foray into the compressed biogas segment now becoming clearer. We have been also accumulating Voltas as it is one midcap that is reasonably placed. Aditya Birla Retail is the third stock we have accumulated as all negatives are in as we enter the festival season."
Since it is the beginning of the new series, options data is scattered at various far strikes in the monthly series. On the weekly options front, the maximum Call OI is placed at 19400 and then towards 19500 strikes.
Market data shows LIC ownership went up in at least 40 stocks and trimmed holdings in 75 other counters. LIC's stake rose 409 bps in fertiliser-maker Kothari Industrial Corporation, 301 bps in Tata Chemicals, 240 bps in SAIL, 173 bps in Bata India and 164 bps in IEX.
Franklin Templeton Asset Management sold 0.1% of its stake in LIC, while Union Mutual Fund divested its entire holding?in May. Mutual funds were sellers in PSU stocks of Indian Oil Corporation and Hindustan Aeronautics, while stocks of Avenue Supermarts gave negative returns of over 1%. Leading mutual funds such as Axis Mutual Fund, Aditya Birla Sun Life Mutual Fund, and Kotak Mahindra Mutual Fund sold largecap, midcap and smallcap stocks in May. Recommendations, suggestions, views and opinions given by the experts are their own.
BPCL is a good buy at current levels, but investors should be cautious as the market is volatile. The stock is also a good bet because it is a derivative of crude oil prices. Today, I have picked up LIC due to its good risk reward ratio. Pansari further says, the current market price of LIC is Rs 576 and targets for LIC are Rs 600 and Rs 615 with a stop loss of Rs 565.
Stocks that were in focus include names like ACC which was down nearly 2%, Life Insurance Corporation fell nearly 3% to hit its fresh 52-week low, and Bata India fell over 2% to hit a fresh low on Monday.
| english |
Bunny Vasu, the producer of 'Geetha Govindam', is on a cloud nine. In an interview, he talks about the collections, donations to Kerala and more.
'Geetha Govindam' has grossed about Rs. 38 Cr in just three days. Did you anticipate this phenomenal success?
During the making of the movie, we were confident that it will definitely do well because it's a comedy entertainer and Vijay Deverakonda is a rising star. But frankly, we didn't expect it to take this kind of huge openings. I am happy that our distributors got their monies back by the second day. This is a rarity in our industry.
Did Deverakonda accept the film without a second thought? It's said that, at first, he had certain reservations.
When Parasuram gave him a narration, he liked it. But he felt that the film should be done in a different way. I assured him that the film will definitely do well even in B centres. I told him this is going to definitely help his career. He completely trusted us and did the film.
Parasuram has finally got his due. He has always narrated every single story to you over the years. What is unique about him in your opinion?
He is a genuine filmmaker. He doesn't get involved in things that are not his brief. I see him as a brother.
From Chiranjeevi to Mahesh Babu and Ram Charan, everybody is praising the movie. What is your feeling?
It feels great. When Allu Arjun watched the movie in the Edit room, he hugged me for getting it right. Since the movie's release, others have commended our movie.
Unfortunately, video clippings from the movie got leaked. At least 17 students and an editor have been arrested in this regard. Allu Aravind has said that it pained him and others associated with the movie so much. How did you react to the turn of events?
When our film, which was made with crores of rupees, was stolen, I was devastated. For 10 days, I experienced what hell is like! I wouldn't wish such a thing even upon my enemies. It's unfortunate that many are saying that the leakage was done by us to build hype around the movie. Will anybody deliberately leak an entire movie for creating hype? A top cop is investigating the leakage case.
In hindsight, did the leakage help the film in any way?
No, it has been a loss. In some schools and colleges, the film was played in auditoriums to a large audience! This is so bad.
You have decided to donate the entire collections accruing from Kerala towards flood relief measures. Tell us about that.
Since I have dealt with releases of Bunny's films over there, I know the market there. 'Geetha Govindam' grossed Rs. 14 lakhs on Day 1 in Kerala. On Day 2, it made another Rs. 6 lakhs. I was shocked that the film got this response at a time when floods are ravaging the state. I wanted to pay back to the state by announcing the donation.
What is Allu Arjun doing next? Since you are close to him, what is your impression?
As far as I know, two big announcements are coming! Bunny doesn't share things with others until the story is locked. He wanted to do a straight Tamil film in the past but that will take time.
Follow us on Google News and stay updated with the latest! | english |
{
"schema_version": "1.2.0",
"id": "GHSA-vjv5-2xqq-c8vh",
"modified": "2022-05-13T01:27:19Z",
"published": "2022-05-13T01:27:19Z",
"aliases": [
"CVE-2017-3160"
],
"details": "After the Android platform is added to Cordova the first time, or after a project is created using the build scripts, the scripts will fetch Gradle on the first build. However, since the default URI is not using https, it is vulnerable to a MiTM and the Gradle executable is not safe. The severity of this issue is high due to the fact that the build scripts immediately start a build after Gradle has been fetched. Developers who are concerned about this issue should install version 6.1.2 or higher of Cordova-Android. If developers are unable to install the latest version, this vulnerability can easily be mitigated by setting the CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL environment variable to https://services.gradle.org/distributions/gradle-2.14.1-all.zip",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N"
}
],
"affected": [
],
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-3160"
},
{
"type": "WEB",
"url": "https://cordova.apache.org/announcements/2017/01/27/android-612.html"
},
{
"type": "WEB",
"url": "https://www.oracle.com/security-alerts/cpuapr2020.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/95838"
}
],
"database_specific": {
"cwe_ids": [
],
"severity": "HIGH",
"github_reviewed": false
}
} | json |
Saji Mohan was deputed as zonal director of NCB Chandigarh on Feb, 2007,was arrested by ATS on Jan, 2009.
The court of Additional District and Sessions Judge Najar Singh also slapped a penalty of Rs 20,000 on the convict.
Perjury proceedings have been recommended against six persons for fabricating evidence and misleading the Court in a case of pilferage of heroin in which IPS officer Saji Mohan stands guilty.
Former NCB director Saji Mohan seems to have run his alleged drug racket akin to a professional business model.
Their modus operandi is illustrated by this incident in 2008.
Two Mumbai ATS officials and a BSF Inspector were deposed on Wednesday in connection with a drug pilferage case against former Narcotics Control Bureau (NCB) Zonal Director and IPS officer,Saji Mohan.
A local court issued production warrants of Saji Mohan,former Narcotics Control Bureau director and IPS officer,in an embezzlement case.
Supporting the case of the prosecution,three prosecution witnesses recorded their statements before a lower Court of Chandigarh today in connection with the drug pilferage case against disgraced former Narcotics Control Bureau zonal director and IPS officer Saji Mohan.
The sessions court on Saturday rejected the bail application of IPS officer Saji Mohan,who is in custody in connection with a drug-dealing case. | english |
import React, { Component } from 'react';
import './App.css';
import FlavorForm from './flavor-form/FlavorForm';
class App extends Component {
render() {
return (
<div className="App">
<FlavorForm/>
</div>
);
}
}
export default App;
| javascript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.