text stringlengths 1 1.04M | language stringclasses 25 values |
|---|---|
<filename>tests/Mocks/brandCreationResponse.json
{
"api_id": "ab2e4754-b951-11ec-b7ca-0242ac110002",
"brand_id": "B1QSGGS",
"message": "Request to create brand was received and is being processed."
} | json |
package com.andcreations.ae.studio.plugins.android;
import java.util.ArrayList;
import java.util.List;
import com.andcreations.ae.studio.plugins.project.ProjectSettings;
import com.andcreations.ae.studio.plugins.ui.common.UICommon;
/**
* @author <NAME>
*/
public class AndroidSettings {
/** */
private static AndroidSettings instance;
/** */
private AndroidPluginState state;
/** */
private List<AndroidSettingsListener> listeners = new ArrayList<>();
/** */
void init(final AndroidPluginState state) {
this.state = state;
// settings page
UICommon.invokeAndWait(new Runnable() {
/** */
@Override
public void run() {
ProjectSettings.get().addPage(new AndroidSettingsPage(state));
}
});
}
/** */
public void addAndroidSettingsListener(AndroidSettingsListener listener) {
synchronized (listeners) {
listeners.add(listener);
}
}
/** */
void notifyAndroidProjectDirChanged(String dir) {
synchronized (listeners) {
for (AndroidSettingsListener listener:listeners) {
listener.androidProjectDirChanged(dir);
}
}
}
/** */
void notifyAndroidPackageChanged(String androidPackage) {
synchronized (listeners) {
for (AndroidSettingsListener listener:listeners) {
listener.androidPackageChanged(androidPackage);
}
}
}
/** */
public String getAndroidPackage() {
return state.getAndroidPackage();
}
/** */
public static AndroidSettings get() {
if (instance == null) {
instance = new AndroidSettings();
}
return instance;
}
}
| java |
A major offshoot of India unexpectedly winning the 1983 World Cup was that the Indian board was emboldened enough to take on the might of England and Australia and end their hegemony over world cricket once and for all.
The then president of the Indian cricket board, Narendra Kumar Prasadrao Salve, better known by his initials N. K. P. , vowed to fight the class discrimination in the International Cricket Conference (ICC) -- the previous name for the modern day International Cricket Council -- by challenging the then prevailing world cricket order.
The moment India beat the West Indies, Salve deputed two hard negotiators Inderjit Singh Bindra, an Indian Administrative Service (IAS) officer, and Jagmohan Dalmiya, a Kolkata businessman who went on to become the first ICC president from Asia, to dismantle the entire edifice.
As a first step, the World Cup was pulled out of England and held rotationally among member countries. The first beneficiary was India which hosted the next edition in 1987 as holders. India garnered support of non-white members to isolate England and Australia and took away their veto power by making all member-boards equal.
Though it took another 28 years for it to win the World Cup a second time, by now India had changed the dynamics of world cricket to become a big bully.
The current Indian board president Narayanaswamy Srinivasan, unlike his predecessors, smartly got England and Wales Board (ECB) and Cricket Australia (CA) to form a troika to gain control of international cricket, browbeating the other ICC member nations to fall in line. For some strange reasons, Sri Lanka and Pakistan decided to oppose the Big Brother.
Srinivasan will take over as first chairman of the ICC in July.
India thus now has an inviolable veto -- which in any case it has been exercising for almost a decade by refusing to accept the Decision Review System (DRS) or arranging and scrapping tours to reduce the Future Tours Programme (FTP) to a mockery. Under the new dispensation there will be no FTP, it will all be bilateral arrangements.
The three boards will now decide what is good for other players in the ICC after the far-reaching changes to the organisation's structure, governance and revenue sharing. Like Hitler ordering soldiers to "volunteer" for do-or-die assignments, the Big Three left no choice for the member boards except to give their consent to the proposed changes in their own interest.
Even as Srinivasan says that the ICC board is supreme, the Big Three will act like super powers and also share huge chunks of revenue as the major contributors to the growth.
India contributes 80 percent of the ICC revenue and holds the whip in deciding on tours. Every board would now want to play India in India and that means it can remain the world's best team walloping everyone in its own backyard! England and Australia will get more than others.
The first to jump on to the gravy train were the West Indies, New Zealand and Bangladesh, realising that their revenues will go up manifold. Sri Lanka, once a Srinivasan favourite, is no longer willing to play ball with him, though they and Pakistan may not be able to hold out for long.
South Africa, which is sore with India for reducing its recent series to two Tests, was won over promising a full tour plus playing Indian Premier League in that country for a second time if the general elections here clash with the Twenty20 tournament.
India and Australia have been fixing bilateral tours in recent years and it will now be legitimised. India has in recent years decided the number of Tests and One-Day Internationals it plays, keeping an eye on the ICC rankings.
Now the three will decide to play five-Test series among themselves and possibly with South Africa and, in India's case, money -spinner Pakistan. Against the rest they will pay hefty sums for a three or two-Test series and reduce them to second grade teams.
Money talks -- and Srinivasan, ECB chief Giles Clarke and Cricket Australia chairman Wally Edwards, like good corporate honchos, know it. The ICC generated $1. 5 billion during its 2006-14 revenue cycle and in the next cycle (2015-2023) the Big Three expect to negotiate a mind-boggling figure to sell television and multimedia rights.
Frankly, it's all about money, money, money -- and nothing else.
(11. 02. 2014 - Veturi Srivatsa is IANS Sports Editor. The views expressed are personal. He can be contacted at [email protected]) | english |
Having a fast-loading website is crucial in today’s digital world. Slow websites can lead to a poor user experience and loss of potential customers. But don’t worry! There are several strategies you can implement to make your website faster and optimize its Performance. In this article, we will explore essential steps that you can easily follow to improve your website’s speed. From measuring your website’s performance to leveraging caching techniques, adopting the latest technology, choosing a reliable hosting provider, and optimizing content, we will cover everything you need to know.
Let us dive in.
First and foremost, it’s important to measure your website’s performance. You can use tools like pagespeed.web.dev provided by Google to analyze your website’s performance and gain valuable insights into areas that need improvement. It will try to load your page, create multiple snapshots of how it rendered it, point out issues in Performance/SEO/Security, etc. It’s an overall amazing tool, but remember that, at least to my knowledge, tests are made from the perspective of an american user, so websites hosted in other parts of the world will display some worse metrics, like “time to first byte”(and if your website is hosted in the U.S. you won’t be able to tell how well non-americans will load your website).
Keeping your website up-to-date with the latest technology is crucial for optimal performance. Ensure that you are using the latest versions of software and frameworks. These updates often include performance improvements and security enhancements. PHP, for example, has continuously improved its performance over time, and so has wordpress ever since version 6.2.
Choosing a reliable hosting provider is THE most important factor in determining your website’s speed and reliability. Compare multiple hosts and their performance/price before making a choice. I, for example, have hosted this website in two places before: One called Locaweb and now Kinghost. They both offer similar prices, but the later gives 2 cpu cores(which allows to run 4 instances of my website, compared to one on the first), caching services, performance diagnostics, newer versions of PHP and MySQL, etc making my website a lot faster.
Also remember that shared-hosting plans may be cost-effective, but they can be slower due to sharing resources with other websites. Consider upgrading to a virtual private server (VPS) or dedicated hosting if you need extreme performance.
Regularly check your website for unnecessary plugins and scripts. While those can add functionality, they can also slow down your website if not used properly. Remove or replace any unnecessary plugins and scripts with more lightweight alternatives as each one adds to the number of requests the server needs to handle, potentially impacting the website’s speed.
To further improve your website’s speed, consider utilizing a Content Delivery Network (CDN). CDNs consist of a network of servers distributed across various locations globally. By delivering content from servers nearest to your visitors’ geographic locations, they can minimize data travel distance, reducing latency and enhancing loading times. The reason why they’re in “more advanced” is because to set them up you should have a at least a small understanding of domains and DNS(Domain Naming System), since it’ll be necessary to point your domain to the CDN and then it to your servers.
Popular CDN providers include Cloudflare, Fastly, and Akamai(first one is free).
Optimizing images and multimedia content can significantly contribute to faster loading times. Compress and resize images to reduce their file size without compromising quality. Additionally, consider implementing lazy loading for images, which loads images in parallel with the rest of the page, not blocking/slowing it, and convert all images to WEBP.
Minifying and combining files can also improve your website’s speed. Minification involves removing unnecessary characters from your website’s code, such as whitespace and comments, without affecting functionality. Combining multiple CSS and JavaScript files into a single file reduces the number of requests made to the server, resulting in Faster Load Times. Numerous plugins and online tools are available to automate these processes.
Enabling Gzip compression on your server is another effective technique to improve website speed. Compressing can reduce the file size of your website’s resources before they are sent over the network which helps achieve faster load times. Most web servers support Gzip compression, which can be easily enabled through server configuration or using plugins.
Lastly, try implement caching mechanisms to improve your website’s performance. Server-side caching mechanisms like Opcode caching (e.g., APCu, OPcache) or object caching (e.g., Redis, Memcached) store frequently accessed data in memory, reducing the need to query the database repeatedly. Additionally, making use of google’s page speed module can further increase speed.
| english |
package io.jenkins.plugins.oak9.utils;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.IOException;
import org.junit.jupiter.api.Test;
public class SeverityTest {
@Test
public void testExceedsSeverity() {
assertFalse(Severity.exceedsSeverity(3, "low"));
assertTrue(Severity.exceedsSeverity(1, "low"));
}
@Test
public void testNeverFailMaxSeverityNone() {
// maxSeverity = 0, never fail
assertFalse(Severity.exceedsSeverity(0, "low"));
assertFalse(Severity.exceedsSeverity(0, "moderate"));
assertFalse(Severity.exceedsSeverity(0, "high"));
assertFalse(Severity.exceedsSeverity(0, "critical"));
}
@Test
public void testGetIntegerForSeverityText() throws IOException {
assertThrows(IOException.class, () -> Severity.getIntegerForSeverityText("S1"));
}
@Test
public void testGetTextForSeverityLevel() {
assertEquals("", Severity.getTextForSeverityLevel(42));
assertEquals("Low", Severity.getTextForSeverityLevel(1));
}
}
| java |
# Copyright 2015 Huawei Technologies Co., Ltd.
#
# 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.
from oslo_config import cfg
from oslo_log import log as logging
from pecan import rest
import six
import tooz.coordination
import wsmeext.pecan as wsme_pecan
from mistral.api import access_control as acl
from mistral.api.controllers.v2 import resources
# TODO(rakhmerov): invalid dependency, a REST controller must not depend on
# a launch script.
from mistral.cmd import launch
from mistral import context
from mistral import exceptions as exc
from mistral.service import coordination
from mistral.utils import rest_utils
LOG = logging.getLogger(__name__)
class ServicesController(rest.RestController):
@rest_utils.wrap_wsme_controller_exception
@wsme_pecan.wsexpose(resources.Services)
def get_all(self):
"""Return all services."""
acl.enforce('services:list', context.ctx())
LOG.info("Fetch services.")
if not cfg.CONF.coordination.backend_url:
raise exc.CoordinationException("Service API is not supported.")
service_coordinator = coordination.get_service_coordinator()
if not service_coordinator.is_active():
raise exc.CoordinationException(
"Failed to connect to coordination backend."
)
services_list = []
service_group = ['%s_group' % i for i in launch.LAUNCH_OPTIONS]
try:
for group in service_group:
members = service_coordinator.get_members(group)
services_list.extend(
[resources.Service.from_dict(
{'type': group, 'name': member}) for member in members]
)
except tooz.coordination.ToozError as e:
# In the scenario of network interruption or manually shutdown
# connection shutdown, ToozError will be raised.
raise exc.CoordinationException(
"Failed to get service members from coordination backend. %s"
% six.text_type(e)
)
return resources.Services(services=services_list)
| python |
{"PREVALENCE_BY_GENDER_AGE_YEAR":{"TRELLIS_NAME":[],"SERIES_NAME":[],"X_CALENDAR_YEAR":[],"Y_PREVALENCE_1000PP":[]},"PREVALENCE_BY_MONTH":{"X_CALENDAR_MONTH":[],"Y_PREVALENCE_1000PP":[]},"CONDITIONS_BY_TYPE":{"CONCEPT_NAME":"Observation recorded from EHR","COUNT_VALUE":16},"AGE_AT_FIRST_DIAGNOSIS":{"CATEGORY":["FEMALE","MALE"],"MIN_VALUE":[4,7],"P10_VALUE":[4,7],"P25_VALUE":[23,10],"MEDIAN_VALUE":[27,20],"P75_VALUE":[43,55],"P90_VALUE":[68,65],"MAX_VALUE":[68,65]}}
| json |
import { Router } from 'express';
import { sampleDAO } from 'src/container';
const router = Router();
router.get("/", (req, res) => {
res.sendStatus(200);
})
router.get('/sample', async (req, res) => {
const data = await sampleDAO.getData('test', 'test');
if(data) {
res.send(data);
return;
}
res.sendStatus(404);
})
export default router; | typescript |
A former CIA case agent was sentenced to 19 years in prison Friday for espionage conspiracy after prosecutors say he received hundreds of thousands of dollars from China to divulge names of human sources and spycraft intelligence.
Jerry Chun Shing Lee, 55, pleaded guilty to conspiring with China to commit espionage in May, but prosecutors and defense lawyers disagreed about whether Lee succeeded in carrying out any actual espionage. Prosecutors had sought a prison term of more than 20 years, while the defense had asked for a 10-year sentence.
Lee left the CIA in 2007 and moved to Hong Kong. Beginning in 2010, prosecutors said, Chinese intelligence officers gave Lee more than $840,000 over a three-year period. In exchange, they claim, Lee likely gave them all the information he had from his 13-year career as a CIA case officer.
Lee is the third American convicted of committing espionage for the Chinese government in just over a year.
Prosecutors acknowledged they had no direct evidence proving what was transmitted, nor proof that the $840,000 in cash that Lee deposited into his bank account was from Chinese intelligence.
But prosecutors said Lee was never able to come up with a good explanation as to where the money came from. He ran a tobacco business in Hong Kong but it was essentially a failure, according to prosecutors.
U. S. District Judge T. S. Ellis said Friday he agreed with the government's conclusion that at least some of the money deposited into Lee's bank account came from Chinese intelligence. In turn, he said Lee must have divulged at least some classified information.
In 2010, Lee created a computer document which described certain locations where the CIA would assign officers with certain experience, as well as a location and timeframe of a sensitive CIA operation. Lee transferred the document to a thumb drive, according to a Justice Department release.
In 2012, the FBI searched his hotel room in Honolulu and found the thumb drive in Lee’s luggage. They found the document in the deleted section of his thumb drive.
The FBI also found a day planner and address book containing intelligence provided by CIA assets, true names of assets and meeting locations and phone numbers, as well as information about covert facilities.
Lee initially denied knowing anything about the document when questioned by authorities. Eventually, he admitted to creating the document at the behest of Chinese intelligence officers and added that he thought about handing it over to them but never did.
In a January 2018 interview with the FBI, Lee denied keeping work-related notes at home and denied keeping notes with any classified information.
In May of this year, ex-CIA officer Kevin Mallory was sentenced to 20 years in prison for disclosing secrets to China for just $25,000. Prosecutors pointed out the money Lee received far outweighed that of Mallory and showed his activities were even more severe. Defense lawyers responded that nothing disclosed by Lee was above the "Secret" classification level, while some of what Mallory disclosed was classified as Top Secret. | english |
<gh_stars>0
<!doctype html>
<html lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Online Deutsche Luther Bibel - 2 Chronik Kapitel 24:1-27.</title>
<meta name="description" content="Biblical scriptures in your language, chapter #" />
<meta name="keywords" content="Holy Bible, Old and New Testaments, scriptures, Creation, faith, heaven, hell, God, Jesus" />
<!-- Mobile viewport optimisation -->
<link rel="shortcut icon" href="../../favicon.ico?v=2" type="image/x-icon" />
<link href="../../apple-touch-icon.png" rel="apple-touch-icon" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="../_assets/css/css.css" />
<link rel="stylesheet" type="text/css" href="../_assets/css/style.css" />
</head>
<body>
<header class="ym-noprint">
<div id="mytop" class="ym-wrapper">
<div class="ym-wbox">
<span class="wp"><strong><a class="wplink" href="#" target="_top">W</a><a class="wplink" href="#" target="_top">P</a></strong></span>
</div>
</div>
</header>
<nav id="nav">
<div class="ym-wrapper">
<div class="ym-hlist">
<ul>
<li><a title="Other languages" href="https://www.wordproject.org/bibles/index.htm" target="_self">More Bibles</a></li>
<li><a title="Audio Bibles in different languages" href="https://www.wordproject.org/bibles/audio/index.htm" target="_top">Audio Bibles</a></li>
<!--li><a title="Search this Bible" href="search.html" target="_top">Search</a></li-->
</ul>
</div>
</div>
</nav>
<div class="ym-wrapper ym-noprint">
<div class="ym-wbox">
<div class=" ym-grid">
<div class="ym-g62 ym-gl breadCrumbs"> <a title="Bible Book Index" href="../index.htm" target="_self">Bible</a> / <a href="../index.htm" target="_self">@ language</a></div>
</div>
</div>
</div>
<div id="main" class="ym-clearfix" role="main">
<div class="ym-wrapper">
<div class="ym-wbox">
<div class="textHeader">
<h1>2 Chronik 24</h1>
<p class="ym-noprint">
<a href="1.htm#0" class="chap">1</a>
<a href="2.htm#0" class="chap">2</a>
<a href="3.htm#0" class="chap">3</a>
<a href="4.htm#0" class="chap">4</a>
<a href="5.htm#0" class="chap">5</a>
<a href="6.htm#0" class="chap">6</a>
<a href="7.htm#0" class="chap">7</a>
<a href="8.htm#0" class="chap">8</a>
<a href="9.htm#0" class="chap">9</a>
<a href="10.htm#0" class="chap">10</a>
<a href="11.htm#0" class="chap">11</a>
<a href="12.htm#0" class="chap">12</a>
<a href="13.htm#0" class="chap">13</a>
<a href="14.htm#0" class="chap">14</a>
<a href="15.htm#0" class="chap">15</a>
<a href="16.htm#0" class="chap">16</a>
<a href="17.htm#0" class="chap">17</a>
<a href="18.htm#0" class="chap">18</a>
<a href="19.htm#0" class="chap">19</a>
<a href="20.htm#0" class="chap">20</a>
<a href="21.htm#0" class="chap">21</a>
<a href="22.htm#0" class="chap">22</a>
<a href="23.htm#0" class="chap">23</a>
<span class="chapread">24</span>
<a href="25.htm#0" class="chap">25</a>
<a href="26.htm#0" class="chap">26</a>
<a href="27.htm#0" class="chap">27</a>
<a href="28.htm#0" class="chap">28</a>
<a href="29.htm#0" class="chap">29</a>
<a href="30.htm#0" class="chap">30</a>
<a href="31.htm#0" class="chap">31</a>
<a href="32.htm#0" class="chap">32</a>
<a href="33.htm#0" class="chap">33</a>
<a href="34.htm#0" class="chap">34</a>
<a href="35.htm#0" class="chap">35</a>
<a href="36.htm#0" class="chap">36</a>
</p>
</div>
<!--end of chapters-->
<!--Nav left right--><div id="0" > </div><!--SizeText-->
<div class="shareright"><a class="decreaseFont ym-button2">-</a><a class="resetFont ym-button2">Reset</a><a class="increaseFont ym-button2">+</a>
</div>
<!--/SizeText-->
<div class="textOptions">
<div class="textBody" id="textBody">
<h3>Kapitel 24 </h3>
<!--... the Word of God:--><span class="dimver">
</span>
<p><span class="verse" id="1">1 </span>Joas war sieben Jahre alt, als er König wurde; und er regierte vierzig Jahre zu Jerusalem. Seine Mutter hieß Zibja, aus Beerseba.
<br /><span class="verse" id="2">2 </span>Und Joas tat, was dem HERRN wohlgefiel, solange der Priester Jojada lebte.
<br /><span class="verse" id="3">3 </span>Und Jojada nahm zwei Frauen für Joas, und er zeugte Söhne und Töchter.
<br /><span class="verse" id="4">4 </span>Danach nahm sich Joas vor, das Haus des HERRN zu erneuern,
<br /><span class="verse" id="5">5 </span>und versammelte die Priester und Leviten und sprach zu ihnen: Zieht hin in alle Städte Judas und sammelt Geld aus ganz Israel, um jährlich das Haus eures Gottes auszubessern, und eilet, solches zu tun! Aber die Leviten eilten nicht.
<br /><span class="verse" id="6">6 </span>Da rief der König den Hohenpriester Jojada und sprach zu ihm: Warum hast du nicht acht auf die Leviten, daß sie von Juda und Jerusalem die Steuer einbringen, die Mose, der Knecht des HERRN, und die Gemeinde für die Stiftshütte zu sammeln Israel geboten haben?
<br /><span class="verse" id="7">7 </span>Denn die gottlose Athalja und ihre Söhne haben das Haus Gottes verfallen lassen, und alles, was dem Hause des HERRN geheiligt war, haben sie an die Baale gebracht.
<br /><span class="verse" id="8">8 </span>Da befahl der König, daß man eine Lade machte, und man stellte sie außen ins Tor am Hause des HERRN;
<br /><span class="verse" id="9">9 </span>und sie ließen in Juda und Jerusalem ausrufen, daß man dem HERRN die Steuer bringen solle, die in der Wüste von Mose, dem Knecht Gottes, auf Israel gelegt war.
<br /><span class="verse" id="10">10 </span>Da freuten sich alle Oberen und alles Volk und brachten's und warfen's in die Lade, bis sie voll wurde.
<br /><span class="verse" id="11">11 </span>Und wenn man die Lade durch die Leviten zur Verwaltung des Königs brachte und man sah, daß viel Geld darin war, so kam der Schreiber des Königs und der Beauftragte des Hohenpriesters, und man schüttete die Lade aus, und sie trugen sie wieder hin an ihren Ort. So taten sie alle Tage und brachten viel Geld zusammen.
<br /><span class="verse" id="12">12 </span>Und der König und Jojada gaben es den Werkmeistern, die am Hause des HERRN arbeiteten. Diese stellten Steinmetzen und Zimmerleute an, um das Haus des HERRN zu erneuern, und auch Meister in Eisen und Kupfer, um das Haus des HERRN auszubessern.
<br /><span class="verse" id="13">13 </span>Und die Werkmeister sorgten dafür, daß durch sie die Ausbesserung fortschritt, und so stellten sie das Haus Gottes nach seinem alten Maß wieder her.
<br /><span class="verse" id="14">14 </span>Und als sie es vollendet hatten, brachten sie das übrige Geld vor den König und Jojada. Davon machte man Geräte für das Haus des HERRN, Geräte für den Dienst und für die Brandopfer, Löffel und goldene und silberne Geräte. Und sie opferten Brandopfer im Hause des HERRN allezeit, solange Jojada lebte.
<br /><span class="verse" id="15">15 </span>Und Jojada ward alt und lebenssatt und starb und war hundertunddreißig Jahre alt, als er starb.
<br /><span class="verse" id="16">16 </span>Und sie begruben ihn in der Stadt Davids bei den Königen, weil er an Israel und an Gott und seinem Hause wohlgetan hatte.
<br /><span class="verse" id="17">17 </span>Und nach dem Tode Jojadas kamen die Oberen Judas und huldigten dem König; da hörte der König auf sie.
<br /><span class="verse" id="18">18 </span>Und sie verließen das Haus des HERRN, des Gottes ihrer Väter, und dienten den Bildern der Aschera und den Götzen. Da kam der Zorn über Juda und Jerusalem um dieser ihrer Schuld willen.
<br /><span class="verse" id="19">19 </span>Der HERR aber sandte Propheten zu ihnen, daß sie sich zum HERRN bekehren sollten, und die ermahnten sie, aber sie nahmen's nicht zu Ohren.
<br /><span class="verse" id="20">20 </span>Und der Geist Gottes ergriff Sacharja, den Sohn des Priesters Jojada. Der trat vor das Volk und sprach zu ihnen: So spricht Gott: Warum übertretet ihr die Gebote des HERRN, so daß ihr kein Gelingen habt? Denn ihr habt den HERRN verlassen, darum wird er euch auch verlassen.
<br /><span class="verse" id="21">21 </span>Aber sie machten eine Verschwörung gegen ihn und steinigten ihn auf Befehl des Königs im Vorhof am Hause des HERRN.
<br /><span class="verse" id="22">22 </span>Und der König Joas gedachte nicht an die Barmherzigkeit, die Jojada, der Vater Sacharjas, an ihm getan hatte, sondern tötete seinen Sohn. Der aber sprach, als er starb: Der HERR wird es sehen und strafen.
<br /><span class="verse" id="23">23 </span>Und als das Jahr um war, zog herauf das Heer der Aramäer, und sie kamen nach Juda und Jerusalem und brachten alle Oberen im Volk um, und all ihren Raub sandten sie dem König von Damaskus.
<br /><span class="verse" id="24">24 </span>Denn obwohl das Heer der Aramäer mit wenigen Männern kam, gab der HERR ein sehr großes Heer in ihre Hand, weil Juda den HERRN, den Gott ihrer Väter, verlassen hatte. Damit vollzogen sie an Joas die Strafe.
<br /><span class="verse" id="25">25 </span>Und als sie von ihm zogen, ließen sie ihn in großer Krankheit zurück. Es machten aber seine Großen eine Verschwörung gegen ihn um der Blutschuld willen an dem Sohn des Priesters Jojada und töteten ihn auf seinem Bett, und er starb. Und man begrub ihn in der Stadt Davids, aber nicht in den Gräbern der Könige.
<br /><span class="verse" id="26">26 </span>Diese aber machten die Verschwörung gegen ihn: Sabad, der Sohn der Schimath, der Ammoniterin, und Josabad, der Sohn der Schimrith, der Moabiterin.
<br /><span class="verse" id="27">27 </span>Aber seine Söhne und die Menge der Steuern, die er veranlaßte, und der Bau des Hauses Gottes, siehe, das steht geschrieben in den Geschichten im Buch der Könige. Und sein Sohn Amazja wurde König an seiner Statt. </p> <!--... sharper than any twoedged sword... -->
</div> <!-- /textBody -->
</div><!-- /textOptions -->
</div><!-- /ym-wbox end -->
</div><!-- /ym-wrapper end -->
</div><!-- /main -->
<div class="ym-wrapper">
<div class="ym-wbox">
<div class="shareright ym-noprint">
<!--next chapter start/Top-->
<a class="ym-button" title="Page TOP" href="#mytop"> <img src="../../_assets/img/arrow_up.png" class="imageatt" alt="arrowup"/> </a>
<a class="ym-button" title="Next chapter" href="25.htm#0"> <img src="../../_assets/img/arrow_right.png" class="imageatt" alt="arrowright"/> </a></p>
<!--next chapter end-->
</div>
</div>
</div>
<footer>
<div class="ym-wrapper">
<div id="redborder" class="ym-wbox">
<p class="alignCenter">Courtesy of Wordproject, a registered domain of <a href="#" target="_top">International Biblical Association</a>, a non-profit organization registered in Macau, China. </p>
</div>
</footer>
</body>
<script src="../_assets/js/jquery-1.8.0.min.js"></script>
<script src="../_assets/js/script.js"></script>
<script src="../_assets/js/jquery.waypoints.js"></script>
<script src="../_assets/js/sticky.js"></script>
<script src="../_assets/js/bar-ui.js"></script>
<script src="../_assets/js/script.js"></script>
<script src="../_assets/js/jquery.dropotron.min.js"></script>
<script src="../_assets/js/skel.min.js"></script>
<script src="../_assets/js/skel-viewport.min.js"></script>
<script src="../_assets/js/util.js"></script>
<script src="../_assets/js/main.js"></script>
</html>
| html |
These videos, both longer and shorter, will be found on users’ profiles in a new “Video” tab.
Meanwhile, when people encounter videos on Instagram, they’ll be able to tap anywhere on the video to enter into a fullscreen viewing mode. After watching, they can then choose to keep scrolling to discover more video content from creators or tap the back button to exit.
None of these changes will impact what Instagram is doing with Reels, though. The company’s short-form video platform and TikTok rival will continue to remain separate, we’re told. They won’t be mixed into this feed of videos, if users choose to scroll.
IGTV was already losing ground as a standalone product and brand ahead of this change. In early 2020, Instagram dropped the orange IGTV button from Instagram’s home page due to lack of traction. The move came at a time when, at most, just 7 million of Instagram’s 1-billion-plus users had downloaded the standalone IGTV app, TechCrunch previously reported, citing Sensor Tower research. As of August 31, 2021, the firm estimates the app saw 18 million installs globally across the App Store and Google Play.
Instagram had explained its decision to pull out the button by saying that most Instagram users were finding IGTV content through the previews shared to the Feed and in Explore. But the reality was that IGTV as a standalone product was largely leading to clutter and confusion in the flagship app, critics and creators argued, while failing to drive a large number of downloads to the standalone IGTV app.
The IGTV app, however, isn’t going away. Instagram tells us it will now be rebranded as “Instagram Video” and will host the “Instagram Video” formatted content, along with Instagram Live videos. But it will not host Reels videos.
With today’s update, users will still be able to upload their non-Reels videos in the same way as before — by clicking on the plus sign (+) in the top-right corner of the Instagram home page and selecting “Post.” Videos can be up to 60 minutes in length.
Instagram is also adding new features like trimming, filters, and people and location tagging as part of the updated upload experience.
Longer videos, which would have previously been identified as IGTV videos, will show 60-second previews in the Feed, as they did before. However, if the video is eligible for ads, the preview will still be 15 seconds, also as before.
Obviously, “IGTV Ads” will no longer be called this, with today’s changes. Instead, they’ll be called “In-Stream video ads.” Creators can continue to monetize their long-form videos and brands can use the format, as well. And the videos will still be a part of Instagram’s revenue-sharing tests with creators — again, as before. (But if businesses want to boost their videos to reach more people, they’ll need to be no longer than 60 seconds long, Instagram notes.)
Creators will also continue to be able to cross-post their videos through Stories and share through Direct Messages, says Instagram.
Instagram’s goal with these changes will be a more streamlined video experience. However, by keeping Reels separate, the app will still differentiate videos by length. But this is similar to how YouTube is addressing the TikTok threat. Its TikTok competitor, known as YouTube Shorts, has its own dedicated button in the YouTube app, just like Instagram Reels does.
Instagram says the changes are rolling out globally starting today across both iOS and Android.
Updated 10/5/21, 2:10 p.m. EDT with additional estimates from Sensor Tower.
| english |
import React from 'react';
import Text from '../../Text';
import { isString } from '../../utils/StringUtils';
import { MARKETING_LAYOUT_DESCRIPTION } from '../dataHooks';
import styles from '../MarketingLayout.st.css';
import PropTypes from 'prop-types';
const Description = ({ children, size }) => (
<div className={styles.descriptionContainer}>
{isString(children) ? (
<Text dataHook={MARKETING_LAYOUT_DESCRIPTION} size={size}>
{children}
</Text>
) : (
<div data-hook={MARKETING_LAYOUT_DESCRIPTION}>{children}</div>
)}
</div>
);
Description.propTypes = {
children: PropTypes.node,
size: PropTypes.string,
};
export default Description;
| javascript |
<reponame>yifanyou/devops-service
package io.choerodon.devops.infra.common.util.enums;
/**
* Creator: Runge
* Date: 2018/8/20
* Time: 20:07
* Description:
*/
public enum CertificationStatus {
OPERATING("operating"),
APPLYING("applying"),
ACTIVE("active"),
FAILED("failed"),
OVERDUE("overdue"),
DELETING("deleting");
private String status;
CertificationStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
}
| java |
<filename>src/app/pages/user-profile/user-profile.component.ts<gh_stars>0
import { Component, OnInit } from '@angular/core';
import {LoginComponent} from '../login/login.component';
@Component({
selector: 'app-user-profile',
templateUrl: './user-profile.component.html',
styleUrls: ['./user-profile.component.scss']
})
export class UserProfileComponent implements OnInit {
Nom:any;
Prenom:any;
cin:any;
numTel:any;
Username:any;
Mail:any;
constructor() { }
ngOnInit() {
//change me
this.Nom=localStorage.getItem("nameLocal");
this.Prenom=localStorage.getItem("surnameLocal");
this.Mail=localStorage.getItem("MailLocal");
this.Username=localStorage.getItem("Localuser");
this.cin=localStorage.getItem("CinLocal");
// this.numTel=LoginComponent.P.numTel;
}
}
| typescript |
I must say I was sceptical about all the reviews on internet when I purchased this but I am really loving it a week into using it nightly! It can be a bit oily to apply but it does get absorbed quickly - I live in the tropics and have oily skin but it’s ok for night application. The scent is very neutral as well , unlike a lot of other retinol I’ve used in the past. Wish it comes in 60 capsules to reduce packaging.
| english |
Arjun Atwal remained on course to end a prolonged title drought while an upwardly mobile SSP Chowrasia joined the US-based Indian at tied fifth spot after the penultimate round of the Indian Masters in New Delhi on Saturday.
On a day when sub-par rounds were rare, Raphael Jacquelin's second successive eagle on the 14th hole helped the Frenchman soar to the lead after a level-par effort of 72.
Breathing down his neck, just one shot behind, was the trio of Jose Manuel Lara (71), Graeme McDowell (73) and overnight leader Damien McGrane (75) who totalled 211.
A further shot behind was the Indian duo who have spent many days playing together at the Royal Calcutta Golf Club.
Orlando-based Atwal had a birdie start to his round and he picked up a shot each on the fifth, 10th and 11th as well.
But in between, he double bogeyed the seventh and dropped shots on 15th and 16th to eventually settle for an even-par round.
"That double (bogey) on the seventh hurt me a lot. I just did not need that. I think I made silly mistakes today and I'm still relying on my caddy to read the line for me," said Atwal.
"Overall, I guess it was a boring round, no chip-in, no long putts, nothing spectacular. But two-three shots off the lead is okay with me. I just need to make a few more putts tomorrow," Atwal said.
In contrast, playing partner Chowrasia's round of 71 had more drama as he found the bush on quite a few occasions and still conjured up ways to bail himself out.
His spectacular birdie chip on the third hole was the highlight of his round.
Leading scores:
| english |
That's all from us at ESPNcricinfo. As Rohit picks up the trophy, its time for us to say goodbye too. But its a very short goodbye, the T20I series begins next Wednesday, and of course the IPL auction this weekend. See you around, this is Sreshth Shah, and on behalf of Sidharth Monga and Chandan Duorah, we say thank you for your company.
Winning captain Rohit:"Not looking at those (personal win numbers). We have ticked a lot of boxes this series. Whatever we wanted to get out of the series, we got what we wanted. The noise will be around as long as we are playing. We know we are playing a high-profile sport in India and people look up to us and watch us. As players and individuals, we know what we need to focus on. The outside noise doesn't bother the dressing room. As long as we can come out and do what we are expected to do, that is very important. (Prasidh) We wanted bowlers to get bounce off the pitch, we had somebody who could come and bowl those lengths and ask those questions to the batters. It was good to see our fast bowlers, was impressed even with Siraj the way we bowled. And Shardul, Deepak got the opportunity at different times. Both Kuldeep and Chahal are crucial players for us. They have done well together as a group, especially Kuldeep since Chahal was very much in the plan but Kuldeep went off the radar a little bit. It was important to get him back, and get him back slowly. We do understand what he/they bring to the table, give them confidence and for them to try and do what's expected from them to do. We start expecting things little early, and we are pretty sure we can see them back together very soon. (Middle order today) With the top order not firing, it was good for the middle order to bail us out. Today they got us to a respectable total. This was the biggest positive."
Prasidh Krishna is the Player of the Series. He says: "Now that I've been practicing and played a few Vijay Hazare matches I have a few overs in me and am in rhythm. Anything going to the keeper or the slips, I like that kind of wickets. Today both wickets I got, it was quite nice to see the ball got the carry and good to have people behind who won't miss out when you create an opportunity. When you are running in and see the ball flying to the keeper, its what any fast bowler wants. The kind of guys we have in the team, everybody is good and we've been learning from each other. Anybody who turns up can do very well - that's the team effort. Still being grounded that way, its a team effort. If we look at the three games, we batted quite well even though the wicket had something."
Shreyas Iyer is the Player of the Match He says: "To be honest, life was really tough for me last two months. Had an infection and Covid, but this day has summed up for all those days. I am flexible to bat anywhere but No. 4 is the best number to bat at. If I am thrown into a pressure situation like today, I thrive on it and enjoy those moments. When I go in, like today's situation, I had to play off the new ball. For that you need to have good skill and play close to the body. From there you need to set the rhythm through the innings. Its not easy, but if you focus on your skills you can do it."
Pooran, the losing captain: "Wonderful opportunity. Must say congratulations to Rohit Sharma and Rahul Dravid - first white-ball series victory for them. The way we bowled in the series was wonderful. We have a lot of work to do with bowling and batting, more so batting this series. The way the boys bowled was fantastic. It seems like we are better at the shorter format, but we need to put in work in the longer format."
9pm We can see Rohit Sharma having a quiet chat with Kuldeep Yadav by the sidelines. The presentation should come soon.
Siva : "Iyer. MOM. Krishna. MOS. " -- Good call! Between Iyer and Chahar for MoM I guess.
Stat alert: 22.98 - average runs per wicket in the IND-WI series. Lowest in any ODI series/tournament in India.
Akhil: "27.1-4-68-9: these exceptional bowling figures are not from a test match, but are collective bowling figures of Prasidh from three matches of this series against an attacking batting side. What a bowler!"
8.48pm Reactions with Siraj and Chahar.
Siraj: "It was swinging in the first game. The second and third game it was less swing but it was. We wanted to use the swing in the new ball. (Dropped catches) They are part of the game. And then players can also take unbelievable catches. I moved on next ball, and focused on my bowling areas. Just focused on my bowling. When Smith came, he is a T20 player, so I thought I'll bowl him quick back of a length. If he hits me from there, then its a good shot. Eventually was successful. The scrambled seam is my wicket-taking ball. Even in red-ball it works. And then I also do outswing and inswing, so the scrambled seam can help me take wickets."
Chahar: "I want to do well with bat, ball or fielding when playing. I was bowling well and could've bowled a few better areas. (Batting) I try to play to the situation. We had lots of overs left when I came in. But it was difficult to bat due to the bounce. So I tried to target the spinners. I could've played 2-3 more overs. (When ball is now swinging) This wicket was different. You just have to pick the length since there was bounce. On flatter wickets, I need to do more pace and length variations. I have learnt a lot while batting with a bowling machine that if there isn't a variation then it is easy for a batter."
8.45pm And that's the first time India have done a clean sweep over West Indies in an ODI series. A happy, smiling Rohit Sharma leads the team out. The middle order bailed out the top order, and after that the bowlers did the job. Odean Smith entertained with his 18-ball 36, and Joseph-Walsh displayed some resistance, but eventually the poor batting start made West Indies' chase of the target too difficult.
Virat is somewhere in the middle of the handshakes. We can see Ishan Kishan, Suryakumar Yadav and Kieron Pollard having a chat. The mood is light, and we'll soon have the presentation ceremony.
Vikash: "I have to say this. Rohit is a phenomenal captain but I miss the passion of Virat. "
Simmons: West Indies' batting a 'huge concern', needs 'urgent attention'
| english |
<reponame>andrewdbond/CompositeWPF
[
{
"Id": "99331",
"ThreadId": "29809",
"Html": "Hi,<br>\r\n<br>\r\nI am reading CompositeGuidanceWPF.chm from the latest drop and got confused by the term "<span style=\"background-color:rgb(49, 106, 197);color:rgb(255, 255, 255)\">CAAPG</span> baseline\r\narchitecture" in section "<span id=nsrTitle>Technical Concepts</span> ". <br>\r\nI failed searching for it on Internet, could anyone help me to clarify it?<br>\r\n<br>\r\nThanks.<br>\r\n<br>\r\nArthur<br>\r\n",
"PostedDate": "2008-06-17T10:38:27.907-07:00",
"UserRole": null,
"MarkedAsAnswerDate": null
},
{
"Id": "99510",
"ThreadId": "29809",
"Html": "CAPPG stands for Composite APPlication Guidance. We are actually not planning on using the shortened version so will likely remove it from the documentation.<br>\r\n<br>\r\n-b\r\n",
"PostedDate": "2008-06-18T07:49:25.68-07:00",
"UserRole": null,
"MarkedAsAnswerDate": null
},
{
"Id": "99539",
"ThreadId": "29809",
"Html": "Thanks Brum.<br>\r\n",
"PostedDate": "2008-06-18T09:21:37.747-07:00",
"UserRole": null,
"MarkedAsAnswerDate": null
}
] | json |
As the countdown for President Donald Trump’s India visit begins, there has been much speculation about the nature and extent of the trade deal that could or could not be agreed upon between the two countries.
Irrespective of all other details, an issue that is certainly on the table is intellectual property (IP). India will need to tread with caution in the light of demands on that front not only in pharma, but also in the area of agriculture.
There are five good reasons why.
Lest it be forgotten, the US government raised a dispute at the World Trade Organisation’s dispute settlement body (DSB) soon after the WTO was set up. On July 2, 1996, the US requested consultations with India under the WTO concerning the alleged absence of patent protection for not only pharmaceutical but also agricultural chemical products in India, which it claimed were in violation of the provisions (Articles 27, 70. 8 and 70. 9) of WTO’s TRIPS Agreement. India lost that case and the amendments to the country’s Patent Act of 1970 subsequently followed.
But what is critical to retain and respect in the domestic patent law vis-a-vis agriculture is Section 3(j) that excludes from patentability “plants and animals in whole or in any part thereof other than microorganisms but including seeds, varieties, and species, and essentially biological processes for production or propagation of plants and animals”. US seed multinational corporations (MNCs) want nothing less than patents on seeds.
The Office of the United States Trade Representative (USTR) annually prepares a report from a review of the state of IP protection and enforcement in US trading partners around the world. This report has been made every year since 1989 under its Trade Act of 1974.
In the report, it puts countries into different categories depending on the level of IP standards and how those are enforced. This exercise by USTR is to identify trade barriers to US companies from what it sees as inadequacies to IP protection in other countries. Ever since 1989, India has repeatedly been placed in either the ‘Priority Foreign Country’ category or listed on the ‘Priority Watch List’ for not having the IP levels that US wants. Therefore, an IP agreement can be anticipated. Any such agreement can only be about how to discipline India on IP.
Even outside of any bilateral FTAs or BITs, the US always insists on IP in its trade and economic diplomacy in its bilateral dealings. Even before the arrival of the US entourage in India, a memorandum of understanding (MoU) on IP between the two sides has already been approved. The MoU covers the entire range of IP. It is not publicly known what it actually lays down with respect to agriculture. But the MoU was preceded by the Department of Promotion of Industry and Internal Trade (DPIIT) of the Ministry of Commerce and Industry (MoCI) discussing a review of India’s IP laws. It is the same department (then called DIPP) that in 2016 came out with the National IPR Policy, 2016 to appease the US side.
The policy seeks to bring more farmers into the IP system as well. It expressly states that it would reach out to the less visible and silent IP generators and holders, especially in the rural and remote areas, through campaigns tailored to their needs and concerns. These would include small businesses, farmers/plant variety users, holders of traditional knowledge, traditional cultural expressions and folklore, designers and artisans.
Thus far, IP systems (such as in the US) with an instrumental approach to grant monetary incentives to creators/inventors have proved incapable of granting remunerative rewards in equal measure to those socially and economically less privileged. India will have to seriously introspect if its IP law in agriculture – Protection of Plant Varieties and Farmers’ Rights (PPV&FR) Act, 2001, has resulted in either more economic returns to farmers or led to social welfare in the seed sector.
The farmers’ varieties granted plant breeder rights under this law are yet to be mainstreamed. Also, cases of benefit sharing arrangements with those using farmers’ varieties as source material for developing commercial varieties are yet to work out. So any move to tighten the IP system will only widen the gap. The implementation of the law is in favour of corporate plant breeders who hold registrations for new plant varieties. This can put restrictions of use on both farmers and researchers.
China and the US signed a ‘Phase One’ trade agreement on January 15, 2020. The very first chapter of the economic and trade agreement is on intellectual property.
Under the agreement, China has agreed to crack down on business practices that the Trump administration has criticised, which include those related to IP. It has also committed to ensure additional purchases of US agriculture products by $32 billion over two years. Such trade deals is what Trump needs back home in election year. Any trade deal in the future with India will surely have a full-fledged IP chapter.
It is essential that India develops its negotiating position on IP in agriculture based on its own experience with US MNCs. Three legal cases in Indian courts are important to keep in mind. The US Monsanto Inc. has sued domestic seed companies in India on the issue of payment of technology user fees over IP-protected biotechnology in cottonseeds. Monsanto even sued the Competition Commission of India (CCI) at the Delhi high court against its investigation orders. CCI had held that there is prima facie case of contravention of Sections 3(4) & 4 (abuse of dominant position) of the Competition Act by the company.
Another wholly-owned subsidiary of a US MNC – PepsiCo India Holdings Pvt Ltd, actually filed cases through 2018-2019 against several farmers in Gujarat for alleged violation of its IP rights over a potato variety. This is despite a clear legal provision [Section 39(1)(iv)]on farmers’ rights in India’s PPV&FR Act that guarantees farmers’ inherent seed freedoms, even if a plant variety has been granted an IPR.
The fight against US-styled IP is not only in pharma, but also on the farm front.
Shalini Bhutani is a legal researcher and policy analyst based in Delhi; she tracks how trade rules interface with agriculture and biodiversity in the Asian region. | english |
The water disputes between Telangana and Andhra Pradesh continue to go on, with neither parties ready for a compromise. The AP government is finding faults with the way the TS government is using the Krishna river water, while the TS government is finding faults with the way the AP government is using up the Krishna river water, and with the various projects that are under construction by the AP government, on the river.
The Telangana government is in strong opposition to the Rayalaseema Lift Irrigation Project that the AP government is constructing. Now, opposition to this project is coming from the people of AP itself, with TDP members from the Prakasam district fighting against the project. These members have written a letter directly to CM Jagan, requesting the Rayalaseema Lift Irrigation Project not be constructed, as this would mean that the Prakasam district would face a severe shortage if the water was diverted towards Rayalaseema. The Prakasam district mostly depends on the water that flows from Nagarjuna Sagar, and on rainwater. However, given that rains haven’t really been that consistent in the area in the past 12 years, the people of the Prakasam district are not in favour of the Rayalaseema Lift Irrigation Project.
On the other hand, the YSRCP has been making its Minister from the area, Suresh, very publicly announce that the Rayalaseema Lift Irrigation Project would continue to be constructed no matter what. Given that there aren’t many opposition ministers in the district, no one came forward boldly until now. With the problem escalating though, the TDP members have dared to write a letter to Jagan directly. It is now to be seen what Jagan will do, with opposition for the Rayalaseema Lift Irrigation Project stemming from Andhra Pradesh itself. | english |
package me.ryandw11.octree;
public class OutOfBoundsException extends RuntimeException {
public OutOfBoundsException(String message){
super (message);
}
}
| java |
<filename>crates/core_arch/src/mod.rs
//! `core_arch`
#[macro_use]
mod macros;
#[cfg(any(target_arch = "arm", target_arch = "aarch64", dox))]
mod acle;
mod simd;
#[cfg_attr(
not(core_arch_docs),
doc(include = "../stdsimd/crates/core_arch/src/core_arch_docs.md")
)]
#[cfg_attr(core_arch_docs, doc(include = "core_arch_docs.md"))]
#[stable(feature = "simd_arch", since = "1.27.0")]
pub mod arch {
/// Platform-specific intrinsics for the `x86` platform.
///
/// See the [module documentation](../index.html) for more details.
#[cfg(any(target_arch = "x86", dox))]
#[doc(cfg(target_arch = "x86"))]
#[stable(feature = "simd_x86", since = "1.27.0")]
pub mod x86 {
#[stable(feature = "simd_x86", since = "1.27.0")]
pub use crate::core_arch::x86::*;
}
/// Platform-specific intrinsics for the `x86_64` platform.
///
/// See the [module documentation](../index.html) for more details.
#[cfg(any(target_arch = "x86_64", dox))]
#[doc(cfg(target_arch = "x86_64"))]
#[stable(feature = "simd_x86", since = "1.27.0")]
pub mod x86_64 {
#[stable(feature = "simd_x86", since = "1.27.0")]
pub use crate::core_arch::x86::*;
#[stable(feature = "simd_x86", since = "1.27.0")]
pub use crate::core_arch::x86_64::*;
}
/// Platform-specific intrinsics for the `arm` platform.
///
/// See the [module documentation](../index.html) for more details.
#[cfg(any(target_arch = "arm", dox))]
#[doc(cfg(target_arch = "arm"))]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod arm {
pub use crate::core_arch::arm::*;
}
/// Platform-specific intrinsics for the `aarch64` platform.
///
/// See the [module documentation](../index.html) for more details.
#[cfg(any(target_arch = "aarch64", dox))]
#[doc(cfg(target_arch = "aarch64"))]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod aarch64 {
pub use crate::core_arch::aarch64::*;
pub use crate::core_arch::arm::*;
}
/// Platform-specific intrinsics for the `wasm32` platform.
///
/// See the [module documentation](../index.html) for more details.
#[cfg(any(target_arch = "wasm32", dox))]
#[doc(cfg(target_arch = "wasm32"))]
#[stable(feature = "simd_wasm32", since = "1.33.0")]
pub mod wasm32 {
#[stable(feature = "simd_wasm32", since = "1.33.0")]
pub use crate::core_arch::wasm32::*;
}
/// Platform-specific intrinsics for the `mips` platform.
///
/// See the [module documentation](../index.html) for more details.
#[cfg(any(target_arch = "mips", dox))]
#[doc(cfg(target_arch = "mips"))]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod mips {
pub use crate::core_arch::mips::*;
}
/// Platform-specific intrinsics for the `mips64` platform.
///
/// See the [module documentation](../index.html) for more details.
#[cfg(any(target_arch = "mips64", dox))]
#[doc(cfg(target_arch = "mips64"))]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod mips64 {
pub use crate::core_arch::mips::*;
}
/// Platform-specific intrinsics for the `PowerPC` platform.
///
/// See the [module documentation](../index.html) for more details.
#[cfg(any(target_arch = "powerpc", dox))]
#[doc(cfg(target_arch = "powerpc"))]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod powerpc {
pub use crate::core_arch::powerpc::*;
}
/// Platform-specific intrinsics for the `PowerPC64` platform.
///
/// See the [module documentation](../index.html) for more details.
#[cfg(any(target_arch = "powerpc64", dox))]
#[doc(cfg(target_arch = "powerpc64"))]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod powerpc64 {
pub use crate::core_arch::powerpc64::*;
}
/// Platform-specific intrinsics for the `NVPTX` platform.
///
/// See the [module documentation](../index.html) for more details.
#[cfg(any(target_arch = "nvptx", target_arch = "nvptx64", dox))]
#[doc(cfg(any(target_arch = "nvptx", target_arch = "nvptx64")))]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod nvptx {
pub use crate::core_arch::nvptx::*;
}
}
mod simd_llvm;
#[cfg(any(target_arch = "x86", target_arch = "x86_64", dox))]
#[doc(cfg(any(target_arch = "x86", target_arch = "x86_64")))]
mod x86;
#[cfg(any(target_arch = "x86_64", dox))]
#[doc(cfg(target_arch = "x86_64"))]
mod x86_64;
#[cfg(any(target_arch = "aarch64", dox))]
#[doc(cfg(target_arch = "aarch64"))]
mod aarch64;
#[cfg(any(target_arch = "arm", target_arch = "aarch64", dox))]
#[doc(cfg(any(target_arch = "arm", target_arch = "aarch64")))]
mod arm;
#[cfg(any(target_arch = "wasm32", dox))]
#[doc(cfg(target_arch = "wasm32"))]
mod wasm32;
#[cfg(any(target_arch = "mips", target_arch = "mips64", dox))]
#[doc(cfg(any(target_arch = "mips", target_arch = "mips64")))]
mod mips;
#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64", dox))]
#[doc(cfg(any(target_arch = "powerpc", target_arch = "powerpc64")))]
mod powerpc;
#[cfg(any(target_arch = "powerpc64", dox))]
#[doc(cfg(target_arch = "powerpc64"))]
mod powerpc64;
#[cfg(any(target_arch = "nvptx", target_arch = "nvptx64", dox))]
#[doc(cfg(any(target_arch = "nvptx", target_arch = "nvptx64")))]
mod nvptx;
| rust |
PV Sindhu asserted that she is not going to miss her coach-cum-mentor Pullela Gopichand in the upcoming 2021 Tokyo Olympics. The 2016 Rio Olympics silver medallist will be training under the supervision of her new coach Park Tae Sang ahead of the mega-event that begins on July 23, later this year.
PV Sindhu is the only Indian female shuttler to qualify for the 2021 Tokyo Olympics, with Saina Nehwal’s hope all but over after the BWF decided to freeze rankings till the Games. She still remains India’s brightest medal prospect, with her currently placed as the 7th ranked women’s player in the world.
In the build-up to the mega-event, Sindhu has moved out of Gopichand Academy, where she’s trained all these years and is currently training under new coach Park Tae Sang and trainer Suchitra, in Hyderabad itself. The reigning world champion also asserted that she is not going to miss her long-term coach-cum-mentor Pullela Gopichand in the upcoming 2021 Tokyo Olympics.
“I will not miss Gopichand Sir in Tokyo. I am putting in about five-six hours with Park and Suchitra every day to keep myself ready for the Games,” said PV Sindhu, during an interview.
“Park’s personal attention has helped a lot. Ever since we have moved (from Gopichand Academy) to Gachibowli Stadium, the training has been great and the time spent has been worth it,” she added.
Apart from PV Sindhu, India’s top-ranked men’s player Sai Praneeth will also feature in the upcoming 2021 Tokyo Olympics. Meanwhile, the Indian duo of Satwiksairaj Rankireddy and Chirag Shetty qualified in the men’s doubles event for the mega-event that is set for a July 23 start.
| english |
The Libyan army goes on a state of alert in the eastern city of Benghazi after nine people including soldiers are killed in clashes between security forces and Salafi militants.
The fighting erupted following an army operation against the militants from Ansar al-Sharia group that lasted for several hours. Nearly 50 soldiers and civilians were also injured. The unrest comes after weeks of deadly clashes in the city and in the capital Tripoli. Local militias which were empowered during the NATO war on Libya have now turned against the state. Their refusal to put down arms has sparked public protests and the subsequent killings.
The U-S and Britain have suspended military assistance to the so-called Free Syrian Army in northern Syria after al-Qaeda-linked insurgents seized the weapons depots belonging to the F-S-A there.
The so-called Islamic Front, which is an umbrella group of al-Qaeda-affiliated rings, captured the arms depots of the Western-backed Free Syrian Army. The seizure near the Bab el-Hawa border crossing with Turkey came after the Islamic Front, which is backed by regional allies of the U-S, announced that it rejected the authority of the F-S-A command. The militant group was formed just last month when six insurgent groups merged together to try and create a new Islamic Emirate in the crisis-hit Arab country.
Syrian media reports say 22 Saudi terrorists have been killed in an attack by the army on the al-Nusrah front and the Jaysh al-Islam insurgents in Adra.
The Syrian army launched a heavy crackdown against militants in Adra after they seized control of the town two days ago. The al-Qaeda-linked insurgents reportedly beheaded 50 civilians-- including the town\'s mayor, and hung up their heads in a market. Adra which is located northeast of Damascus, has a population of about 100-thousand including Alawites, Druze, Christians and Sunni Muslims. Syria has been gripped by a deadly war since 2011.
Syrian armed forces continue making advances in Aleppo. The army has managed to retake a number of buildings in the district of Layramoun in the city\\\'s north.
The area is considered the northern gateway into Aleppo. The army\\\'s advances stop foreign-backed militants from smuggling weapons into Aleppo from the northern part of the city. The achievement is the latest in a series of military operations against insurgents who receive military aid from their supporters in Western countries and their regional allies, especially Qatar, Saudi Arabia and Turkey.
The Syrian army has carried out major offensives against armed terrorists in areas around the capital Damascus and in the country\'s west.
Syrian army units have cleared the shrine of Sayyeda Sukeina, the daughter of Imam Hussein, in Damascus suburbs from foreign-backed insurgents. The militants had used the shrine as a stronghold for months. They had also desecrated parts of the shrine and set fire to the main building. Elsewhere, in the western city of Homs, government troops killed dozens of insurgents when they attacked a Syrian forces checkpoint. Thirty seven militants have reportedly been killed there.
In Syria, the army is making further advance on the country\'s largest city Aleppo, as it battles foreign-backed insurgents.
In Syria, the army is making further advance on the country\'s largest city Aleppo, as it battles foreign-backed insurgents.
Reports coming out of Syria say government forces have gained control of some areas in Aleppo in the past few weeks. Meanwhile, the army has been deployed en masse around the east of the city. Aleppo has been the scene of deadly clashes between government forces and the militants since December 15th. Syria has been gripped by violence since February 2011. Damascus accuses the the West and its regional allies of fueling the bloodshed by providing the insurgents with weapons and money.
The Syrian army continues its offensive against foreign-backed insurgents in the city of Aleppo, making more advances in the area.
The Syrian army continues its offensive against foreign-backed insurgents in the city of Aleppo, making more advances in the area.
Syrian troops have regained full control of the village of Sheikh Najjar and the strategic Ghali Hill on the outskirts of Aleppo. A large number of foreign-backed insurgents, including some foreigners, were also killed in the offensive. It was the latest in a series of military operations against militants who receive military aid from their supporters in Western countries and their regional allies. Meanwhile, thousands of residents of the city of al-Hasakeh in northeastern Syria took to the streets to show their support for President Bashar al-Assad and the Syrian Army. The demonstrators also chanted slogans condemning the militants\\\' atrocities.
Iraq\'s Defense Minister says the army along with Sunni tribesmen were able to gain full control of the city of Al-Bu Ali Jasim in Iraq\'s Northern Anbar province. Fierce clashes have been underway between Iraqi security forces and militants from the Islamic State of Iraq and the Levant there since late December. The Defense Ministry has issued a statement saying that Sunni tribesmen were a big help in the equation.
We\'ve all seen the epic movies and images of the American army that is presented to the world by Hollywood.
We\'ve all seen the epic movies and images of the American army that is presented to the world by Hollywood.
But what is the true face of the American army?
And how do the people of the West Asian region view the American army?
Finally, what honor does a country have when they don\'t drive out foreign forces that have invaded and occupied their sovereign lands?
The Leader of the Muslim Ummah, Imam Sayyid Ali Khamenei, speaks and answers.
And please stop thinking that Hollywood represents reality; for your own sake.
Video Tags:
More evidence of Israeli Army breaking laws - English. All kinds of international laws are broken by Israeli Army everyday. Again WHO CARES FOR THE INTERNATIONAL LAWS. Zionists DO NOT EVEN CARE FOR THE HUMANITARIAN LAWS.
| english |
<gh_stars>0
//============================================================================
// Vertex.cc
// @author <NAME>
//
// Vertices represent relationship between files in maze.
//============================================================================
#include "MACROS.H" //maze dimensions, source files for images representing maze
#include "Vertex.h"
using namespace std;
/** Vertex: representation of relationships between files in maze */
Vertex::Vertex():i(-1), j(-1), adj()/*may store [0,4] elements*/, visited(false), path(){}
Vertex::~Vertex(){
adj.clear();
}
//end constructors
void Vertex::setPos(int row, int col){
i = row;
j = col;
}//end setPos()
/** must overload for set<Vertex> to function.
unneeded because am now using set<Vertex*> *//*
const bool Vertex::operator < (const Vertex &o) const{
if(i < o.i)
return true;
if(i > o.i)
return false;
return j < o.j;
}*/
/** for iterators */
Vertex::iterator Vertex::begin() {
return adj.begin();
}
Vertex::iterator Vertex::end() {
return adj.end();
}
Vertex::pathItr Vertex::pathBegin() {
return path.begin();
}
Vertex::pathItr Vertex::pathEnd() {
return path.end();
}
/** connect v1 and v2 such that they are adjacent */
void addEdge(Vertex* v1, Vertex* v2){
v1->adj.insert(v2);
v2->adj.insert(v1);
}//end addEdge
/** true if v1 and v2 are adjacent else false */
bool areConnected(Vertex* v1, Vertex* v2){
if(v2->i < 0 || v2->i >= MAZE_LENGTH ||
v2->j < 0 || v2->j >= MAZE_WIDTH) //out of bounds
return false;
return v1->adj.find(v2) != v1->adj.end();
}//end areConnected
/** return directory to correct source image based on adjacent vertices of vertex.
version 0 = normal maze, version 1 = solution path, version 2 = start/end */
char* adjacentVertices(Vertex* v, Vertex fileGrid[][MAZE_WIDTH], int vers){
/* 0,1,2,3 = N,S,E,W
ex. (neighbors[2] == true) -> is adjacent to vertex east of it in grid */
bool neighbors[4] = {false};
int count = 0; //# adjacent vertices
int i = v->i; //row of vertex in grid
int j = v->j; //column
if( areConnected(v, &fileGrid[(i-1)][ j ] ) ){ //N
neighbors[0] = true;
count++;
}
if( areConnected(v, &fileGrid[(i+1)][ j ] ) ){ //S
neighbors[1] = true;
count++;
}
if( areConnected(v, &fileGrid[i][ (j+1) ] ) ){ //E
neighbors[2] = true;
count++;
}
if( areConnected(v, &fileGrid[i][ (j-1) ]) ) { //W
neighbors[3] = true;
count++;
}
//determine image
switch(count){
case 3:
if( !neighbors[0] ) return vers==0 ? (char*)SEW : vers==1 ? (char*)PATH_SEW : (char*)START_SEW; //north not adjacent
if( !neighbors[1] ) return vers==0 ? (char*)NEW : vers==1 ? (char*)PATH_NEW : (char*)START_NEW; //south not adjacent
if( !neighbors[2] ) return vers==0 ? (char*)NSW : vers==1 ? (char*)PATH_NSW : (char*)START_NSW; //east not adjacent
return vers==0 ? (char*)NSE : vers==1 ? (char*)PATH_NSE : (char*)START_NSE; //west not adjacent
case 2: //4 choose 2 = 6 combos
if( neighbors[0] ){ //N
if( neighbors[1] ) return vers==0 ? (char*)NS : vers==1 ? (char*)PATH_NS : (char*)START_NS; //and S
if( neighbors[2] ) return vers==0 ? (char*)NE : vers==1 ? (char*)PATH_NE : (char*)START_NE; //and E
if( neighbors[3] ) return vers==0 ? (char*)NW : vers==1 ? (char*)PATH_NW : (char*)START_NW; //and W
}
if( neighbors[1] ){ //S
if( neighbors[2] ) return vers==0 ? (char*)SE : vers==1 ? (char*)PATH_SE : (char*)START_SE; //and E
if( neighbors[3] ) return vers==0 ? (char*)SW : vers==1 ? (char*)PATH_SW : (char*)START_SW; //and W
}
return vers==0 ? (char*) EW : vers==1 ? (char*)PATH_EW : (char*)START_EW; //E and W
case 1:
if( neighbors[0] ) return vers==0 ? (char*)NORTH : vers==1 ? (char*)PATH_NORTH : (char*)START_NORTH; //N
if( neighbors[1] ) return vers==0 ? (char*)S : vers==1 ? (char*)PATH_S : (char*)START_S; //S
if( neighbors[2] ) return vers==0 ? (char*)E : vers==1 ? (char*)PATH_E : (char*)START_E; //E
return vers==0 ? (char*)W : vers==1 ? (char*)PATH_W : (char*)START_W; //W
default: //4
break;
}//end switch(count)
return vers==0 ? (char*)ALL : vers==1 ? (char*)PATH_ALL : (char*)START_ALL;
}//end adjacentVertices()
| cpp |
In the next post, Bipasha was seen cutting multiple birthday cakes while the doting husband sang for her. “It’s my Birthday ❤️ #capricorn #itsmybirthday #monkeylove #couplereels,” posted the actors. She was also seen doing a happy dance with her birthday balloons.
Before her birthday celebration started, the actor also tried some other trending Instagram reels.
Check them out too:
Bipasha Basu married actor Karan Singh Grover in 2016.
Click for more updates and latest Bollywood news along with Entertainment updates. Also get latest news and top headlines from India and around the world at The Indian Express. | english |
That seems to be the hottest topic among many glamour lovers. Incidentally, the talk is about the fair and fleshy beauty Farzana who stormed the Telugu circuit with a spate of movies and most of them were with the talented Allari Naresh.
Farzana was known for her super dance skills and her generous sex appeal which was voluptuous and sensuous. The last she was heard was in the Tamil movie ‘1977’ where she paired up with Sarath Kumar and after that she has been off the hook.
Farzana’s admirers in Telugu have been waiting to see when she is going to make a comeback so let us hope she is reading this and makes her moves towards Tollywood once again. | english |
<filename>src/mocks/projects.ts
export const projectsMock = [
{
scanner: 1,
lastScanAt: '2010-03-10 13:28:46',
createdAt: '2018-04-10 10:28:46',
projectId: 'ID-12-1234',
id: 7,
projectName: 'Super Vue Ts',
lastScan: '2019-11-06 14:38:38',
alerts: {blocking: 2, exception: 2, info: 2},
ready: true,
planned: true,
plannedDate: '2016-04-10 10:28:46'
},
{
scanner: 2,
lastScanAt: '2019-04-10 10:28:46',
createdAt: '2018-04-10 10:28:46',
projectId: 'ID-11-222111',
id: 8,
projectName: 'Project yellow',
lastScan: '2019-12-06 14:38:38',
alerts: {blocking: 0, exception: 2, info: 0},
ready: true,
planned: true,
plannedDate: '2016-04-10 10:28:46'
},
{
scanner: 2,
lastScanAt: '2019-04-10 11:21:46',
createdAt: '2019-06-10 14:34:41',
projectId: 'ID-13-205711',
id: 0,
projectName: 'Web application test',
lastScan: '2016-10-15 13:43:27',
alerts: {blocking: 1, exception: 2, info: 2},
ready: true,
planned: true,
plannedDate: '2020-04-10 10:28:46'
},
{
scanner: 0,
lastScanAt: false,
createdAt: '2018-04-10 10:28:46',
projectId: 'ID-14-203311',
id: 1,
projectName: 'Client STB',
lastScan: '2019-10-15 13:43:27',
alerts: {blocking: 3, exception: 2},
ready: true,
planned: true,
plannedDate: '2020-04-10 10:28:46'
},
{
scanner: 1,
lastScanAt: '2019-04-10 10:28:46',
createdAt: '2018-04-10 10:28:46',
projectId: 'ID-15-331113',
id: 2,
projectName: 'Pentest Telfort ',
alerts: {blocking: 6, exception: 0},
ready: true,
planned: true,
plannedDate: '2020-04-10 10:28:46'
},
{
scanner: 2,
lastScanAt: '2019-04-10 10:28:46',
createdAt: '2018-04-10 10:28:46',
projectId: 'Project ID-11-231987',
id: 3,
projectName: 'iOS application',
lastScan: '2019-04-26 06:26:28',
alerts: {blocking: 1, exception: 0},
ready: true,
planned: true,
plannedDate: '2020-04-10 10:28:46'
},
{
scanner: 2,
lastScanAt: false,
createdAt: '2019-04-10 10:28:46',
projectId: false,
id: 4,
projectName: 'New side project',
lastScan: '2019-04-10 10:28:46',
alerts: {blocking: 0, exception: 3, info: 0},
ready: true,
planned: true,
plannedDate: '2020-04-10 10:28:46'
},
{
scanner: 0,
lastScanAt: false,
createdAt: '2018-04-10 10:28:46',
projectId: false,
id: 5,
projectName: 'My css favorite stuff',
lastScan: '2019-12-06 14:38:38',
alerts: {blocking: 0, exception: 2, info: 0},
ready: true,
planned: true,
plannedDate: '2019-09-10 10:28:46'
},
{
scanner: 1,
lastScanAt: '2016-04-10 10:28:46',
createdAt: '2016-04-10 10:28:46',
projectId: 'Project ID-11-221671',
id: 6,
projectName: 'New webapp green',
lastScan: '2016-12-06 14:38:38',
alerts: {blocking: 0, exception: 2, info: 0},
ready: true,
planned: true,
plannedDate: '2016-04-10 10:28:46'
}
];
| typescript |
263 (60. 4 ov)
237 (52. 3 ov)
492 (145. 3 ov)
704/3 dec (151. 0 ov)
172/7 (20. 0 ov)
157 (20. 0 ov)
233/3 (20. 0 ov)
171 (18. 2 ov)
416 (100. 4 ov)
325 (76. 2 ov)
It was jelly beans four years ago and it is Vaseline this time as a controversy erupted in the second India-England Test when VVS Laxman was accused of using it on his bat to manipulate the Hot-Spot technology in the Decision Review System.
England captain Andrew Strauss has insisted his side are a more "mature" team than the one caught up in a backfiring jellybean stunt when they last played India at Trent Bridge four years ago.
India's middle order mainstay VVS Laxman reckons his world number side has the ability to bounce back in the four-match Test series against England as the second game starts on Friday.
Chris Tremlett's bounce and James Anderson's swing will be key to nullify Sachin Tendulkar's threat on England in the upcoming Test series against India, reckons former skipper Michael Vaughan.
He does not quite know which way the series would go but former England skipper Michael Vaughan is quite sure that Indian captain Mahendra Singh Dhoni would be pushing more aggressively for a win than his "defensive" rival Andrew Strauss in the Tests starting July 21.
Former England captains Michael Vaughan, Nasser Hussain, Mike Atherton and Graham Gooch have warned that even at the twilight of his international career, Sachin Tendulkar would be the biggest threat to England when they take on India in a Test series starting on July 21.
Speedster S Sreesanth has recovered from an elbow injury to be available for selection for India's cricket tour of England and now wants to avoid frequent breakdowns which has "pegged back his career".
Flower and Strauss guided England to their first Ashes win Down Under in 24 years.
Duncan Fletcher's appointment as India's cricket coach was seen as a move in the right direction by former cricketers and coaches who said the Zimbabwean's vast experience in coaching will hold him in good stead during his two-year stint.
Former England captain Michael Vaughan on Sunday tipped current skipper Andrew Strauss to quit one-day cricket following the team's World Cup quarter-final defeat. | english |
{"word":"swede","definition":"1. A native or inhabitant of Sweden. 2. (Bot.) A Swedish turnip. See under Turnip."} | json |
{
"copyright_text": null,
"description": "",
"duration": 1543,
"language": "eng",
"recorded": "2020-07-06",
"related_urls": [
{
"label": "Conference schedule",
"url": "https://www.scipy2020.scipy.org/schedule"
}
],
"speakers": [
"<NAME>"
],
"tags": [],
"thumbnail_url": "https://i.ytimg.com/vi_webp/TQnxH90PqFc/maxresdefault.webp",
"title": "dabl: Automatic Machine Learning with a Human in the Loop",
"videos": [
{
"type": "youtube",
"url": "https://www.youtube.com/watch?v=TQnxH90PqFc"
}
]
}
| json |
<gh_stars>0
[{"id": 6444, "gempId": "209_49", "side": "Dark", "rarity": "U2", "set": "209", "printings": [{"set": "209"}], "front": {"title": "\u2022Jedha: Jedha City", "imageUrl": "https://res.starwarsccg.org/cards/Virtual9-Dark/large/jedhajedhacity.gif", "type": "Location", "subType": "Site", "destiny": "0", "icons": ["Exterior", "Planet"], "lightSideIcons": 1, "darkSideIcons": 1, "gametext": "Dark: May be deployed instead of Alderaan by Set Your Course For Alderaan. Light: Baze, Chirrut, and Saw deploy -1 here."}, "legacy": false}] | json |
{
"name":"ColdBox Route Visualizer",
"author":"Ortus Solutions.<EMAIL> <<EMAIL>>",
"version":"1.4.0+24",
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/route-visualizer/1.4.0+24/route-visualizer-1.4.0+24.zip",
"slug":"route-visualizer",
"type":"modules",
"homepage":"https://github.com/coldbox-modules/route-visualizer",
"documentation":"https://github.com/coldbox-modules/route-visualizer",
"repository":{
"type":"git",
"url":"https://github.com/coldbox-modules/route-visualizer"
},
"shortDescription":"A nice UI module to visualize and test ColdBox Routing",
"license":[
{
"type":"Apache2",
"url":"http://www.apache.org/licenses/LICENSE-2.0.html"
}
],
"contributors":[
"<NAME> <<EMAIL>>"
],
"ignore":[
"**/.*",
"test-harness",
"*/.md"
],
"scripts":{
"toMaster":"recipe build/toMaster.boxr"
}
} | json |
[{"__symbolic":"module","version":3,"metadata":{"AutocompleteGroup":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor"}],"SetNewValue":[{"__symbolic":"method"}],"Removables":[{"__symbolic":"method"}],"InitialValue":[{"__symbolic":"method"}],"SetCopy":[{"__symbolic":"method"}],"SetValues":[{"__symbolic":"method"}],"FilterRemovals":[{"__symbolic":"method"}]}},"CreateNewAutocompleteGroup":{"__symbolic":"function"}}},{"__symbolic":"module","version":1,"metadata":{"AutocompleteGroup":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor"}],"SetNewValue":[{"__symbolic":"method"}],"Removables":[{"__symbolic":"method"}],"InitialValue":[{"__symbolic":"method"}],"SetCopy":[{"__symbolic":"method"}],"SetValues":[{"__symbolic":"method"}],"FilterRemovals":[{"__symbolic":"method"}]}},"CreateNewAutocompleteGroup":{"__symbolic":"function"}}}] | json |
module.exports = function solveEquation(equation) {
let arrayOfSplit = equation.split(' ');
let a = +arrayOfSplit[0];
let b;
let c;
( arrayOfSplit[3] === "-") && ( b = +(arrayOfSplit[3] + arrayOfSplit[4]) );
( arrayOfSplit[3] != "-") && ( b = +arrayOfSplit[4] );
( arrayOfSplit[7] === "-") && ( c = +(arrayOfSplit[7] + arrayOfSplit[8]) );
( arrayOfSplit[7] != "-") && ( c = +arrayOfSplit[8] );
let disc;
let x1;
let x2;
disc = b * b - (4 * a * c);
x1 = ((-1) * b + Math.sqrt(disc))/( 2 * a );
x2 = ((-1) * b - Math.sqrt(disc))/( 2 * a );
x1 = Math.round(x1);
x2 = Math.round(x2);
let solution;
if(x1 < x2)
solution = [x1, x2];
else solution = [x2, x1];
return solution;
}
| javascript |
package com.game.sdk.dolls.request.payorder;
public class SearchPayOrderReq {
private Long id;
private Long playerId;
private Integer gameId;
private Integer channelId;
private String channelOrderId;
private String roleId;
private String startTime;
private String endTime;
//当前请求的页码
private Integer page;
//当前每页显示的行数
private Integer rows;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getPlayerId() {
return playerId;
}
public void setPlayerId(Long playerId) {
this.playerId = playerId;
}
public Integer getGameId() {
return gameId;
}
public void setGameId(Integer gameId) {
this.gameId = gameId;
}
public Integer getChannelId() {
return channelId;
}
public void setChannelId(Integer channelId) {
this.channelId = channelId;
}
public String getChannelOrderId() {
return channelOrderId;
}
public void setChannelOrderId(String channelOrderId) {
this.channelOrderId = channelOrderId;
}
public String getRoleId() {
return roleId;
}
public void setRoleId(String roleId) {
this.roleId = roleId;
}
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public Integer getPage() {
return page;
}
public void setPage(Integer page) {
this.page = page;
}
public Integer getRows() {
return rows;
}
public void setRows(Integer rows) {
this.rows = rows;
}
}
| java |
import torch
import torch.nn as nn
import torch.nn.functional as F
import data_manager
class Attention(nn.Module):
def __init__(self, device, w2v_weights, decoder_embedding_size, hidden_dim, tagset_size, drop_rate=0.5, bidirectional=False,
freeze=True, max_norm_emb1=10, max_norm_emb2=1, padded_sentence_length=25):
"""
:param device: Device to which to map tensors (GPU or CPU).
:param w2v_weights: Matrix of w2v w2v_weights, ith row contains the embedding for the word mapped to the ith index, the
last row should correspond to the padding token, <padding>.
:param decoder_embedding_size Size of the learned embeddings of the tags.
:param hidden_dim Size of the hidden dimension of the recurrent layer.
:param tagset_size: Number of possible classes, this will be the dimension of the output vector.
:param drop_rate: Drop rate for regularization.
:param bidirectional: If the recurrent should be bidirectional.
:param freeze: If the embedding parameters should be frozen or trained during training.
:param max_norm_emb1 Max norm of the embeddings of tokens (used by the encoder), default 10.
:param max_norm_emb2 Max norm of the embeddings of tags (used by the decoder), default 10.
:param padded_sentence_length Length to which sentences are padded.
"""
super(Attention, self).__init__()
self.device = device
self.hidden_dim = hidden_dim
self.tagset_size = tagset_size
self.embedding_dim = w2v_weights.shape[1]
self.decoder_embedding_size = decoder_embedding_size
self.max_length = padded_sentence_length # max length over any phrase
self.w2v_weights = w2v_weights
self.bidirectional = bidirectional
self.drop_rate = drop_rate
self.drop = nn.Dropout(self.drop_rate)
# encoder section, gru layer accepts inputs of size hiddendim and as hidden state of the same shape
# embeddings for the input tokens
self.embedding_encoder = nn.Embedding.from_pretrained(torch.FloatTensor(w2v_weights), freeze=freeze)
self.embedding_encoder.max_norm = max_norm_emb1
self.gru_encoder = nn.GRU(self.embedding_dim, self.hidden_dim // (1 if not bidirectional else 2),
batch_first=True, bidirectional=bidirectional)
# decoder section
# embeddings that are going to represent the tags, +1 for padding index
self.embedding_decoder = nn.Embedding(self.tagset_size + 1, self.decoder_embedding_size, max_norm=max_norm_emb2)
self.gru_decoder = nn.GRU(self.hidden_dim, self.hidden_dim, batch_first=True)
self.bnorm = nn.BatchNorm2d(1)
self.out = nn.Linear(self.hidden_dim, self.tagset_size)
self.softmax = nn.LogSoftmax(dim=2)
# attention related layers
self.attn = nn.Linear(self.decoder_embedding_size + self.hidden_dim, self.max_length)
self.attn_combine = nn.Linear(self.decoder_embedding_size + self.hidden_dim, self.hidden_dim)
self.bnorm2 = nn.BatchNorm2d(1)
def init_hidden_encoder(self, batch_size):
"""
Inits the hidden state of the gru layer.
:param batch_size
:return: Initialized hidden state of the gru encoder.
"""
if self.bidirectional:
state = torch.zeros(self.gru_encoder.num_layers * 2, batch_size, self.hidden_dim // 2).to(self.device)
else:
state = torch.zeros(self.gru_encoder.num_layers, batch_size, self.hidden_dim).to(self.device)
return state
def decoder_forward(self, starting_input, hidden, encoder_outputs):
"""
Forward function of the decoder section, meant to be used on inputs of a sequence being passed one at a time.
:param starting_input: Input of the form (batch, 1, hidden dim).
:param hidden: Hidden state from a previous iteration.
:param encoder_outputs: Outputs of the encoder, to be used with attention.
:return: Output for the current token of size (batch, tagset) and a new hidden state.
"""
tag_embedded = self.embedding_decoder(starting_input)
tag_embedded = self.drop(tag_embedded)
# apply attention
lookat = torch.cat((tag_embedded, hidden.squeeze(0).unsqueeze(1)), dim=2)
# softmax so that they sum to one
attn_weights = F.softmax(self.attn(lookat), dim=2)
attn_applied = torch.bmm(attn_weights, encoder_outputs)
decoder_input = torch.cat((tag_embedded, attn_applied), 2)
decoder_input = self.attn_combine(decoder_input)
decoder_input = self.bnorm2(decoder_input.unsqueeze(1))
decoder_input = self.drop(decoder_input)
decoder_input = decoder_input.squeeze(1)
# next step of decoding
decoder_input = F.relu(decoder_input)
decoder_output, hidden = self.gru_decoder(decoder_input, hidden)
decoder_output = self.bnorm(decoder_output.unsqueeze(1))
decoder_output = decoder_output.squeeze(1)
decoder_output = self.drop(decoder_output)
decoder_output = self.out(decoder_output)
decoder_output = self.softmax(decoder_output)
return decoder_output, hidden
def forward(self, batch):
"""
Forward pass given data.
:param batch: List of samples containing data as transformed by the init transformer of this class.
:return: A (batch of) vectors of length equal to tagset, scoring each possible class for each word in a sentence,
for all sentences; a tensor containing the true label for each word and a tensor containing the lengths
of the sequences in descending order.
"""
# init hidden layer for the encoder
hidden_encoder = self.init_hidden_encoder(len(batch))
# pack data into a batch
data, labels, _ = data_manager.batch_sequence(batch, self.device)
data = self.embedding_encoder(data)
data = self.drop(data)
# encode
encoder_output, hidden_encoder = self.gru_encoder(data, hidden_encoder)
# set first token passed to decoder as tagset_size, mapped to the last row of the embedding
decoder_input = torch.zeros(len(batch), 1).long()
torch.add(decoder_input, self.tagset_size, decoder_input) # special start character
decoder_input = decoder_input.to(self.device)
# encoder will pass its hidden state to the decoder
if self.bidirectional: # needs to be reshaped since a bidirectional layer will return (2, batch, hidden dim//2)
hidden_decoder = torch.cat((hidden_encoder[0], hidden_encoder[1]), dim=1).unsqueeze(0)
else:
hidden_decoder = hidden_encoder
# decode
results = []
for di in range(encoder_output.size()[1]): # max length of any phrase in the batch
decoder_output, hidden_decoder = self.decoder_forward(decoder_input, hidden_decoder, encoder_output)
_, topi = decoder_output.topk(1) # extract predicted label
decoder_input = topi.squeeze(1).detach() # detach from history as input
results.append(decoder_output)
results = torch.cat(results, dim=1)
return results.view(-1, self.tagset_size), labels.view(-1)
| python |
<reponame>simsieg/alva
import * as Components from '@meetalva/components';
import * as MobxReact from 'mobx-react';
import * as Model from '@meetalva/model';
import * as React from 'react';
import { ViewStore } from '../../store';
import { debounce } from 'lodash';
export interface PropertyItemBooleanProps {
property: Model.ElementProperty;
}
@MobxReact.inject('store')
@MobxReact.observer
export class PropertyItemBoolean extends React.Component<PropertyItemBooleanProps> {
private commit = debounce(() => {
const props = this.props as PropertyItemBooleanProps & { store: ViewStore };
props.store.commit();
}, 300);
private handleChange(e: React.ChangeEvent<HTMLElement>): void {
const props = this.props as PropertyItemBooleanProps & { store: ViewStore };
const target = e.target as HTMLInputElement;
props.property.setValue(target.checked);
this.commit();
}
public render(): JSX.Element | null {
const props = this.props as PropertyItemBooleanProps & { store: ViewStore };
const { property } = props;
const patternProperty = property.getPatternProperty();
if (!patternProperty) {
return null;
}
return (
<Components.PropertyItemBoolean
description={patternProperty.getDescription()}
label={patternProperty.getLabel()}
key={patternProperty.getType()}
checked={property.getValue() as boolean}
onChange={e => this.handleChange(e)}
/>
);
}
}
| typescript |
<reponame>fetus-hina/fest.ink
[{"win_team_name":"キリギリス","win_team_mvp":"めすと"},{"win_team_name":"アリ","win_team_mvp":"ペロロンチー"},{"win_team_name":"アリ","win_team_mvp":"えにくす"},{"win_team_name":"キリギリス","win_team_mvp":"こーぺる"},{"win_team_name":"アリ","win_team_mvp":"ぽち"},{"win_team_name":"キリギリス","win_team_mvp":"めぇ~"},{"win_team_name":"キリギリス","win_team_mvp":"ジョンン"},{"win_team_name":"アリ","win_team_mvp":"たこも"},{"win_team_name":"キリギリス","win_team_mvp":"+328"},{"win_team_name":"キリギリス","win_team_mvp":"びーと"},{"win_team_name":"アリ","win_team_mvp":"かずちゃん"},{"win_team_name":"アリ","win_team_mvp":"あねさん"},{"win_team_name":"アリ","win_team_mvp":"しょうや"},{"win_team_name":"キリギリス","win_team_mvp":"キュリウム"},{"win_team_name":"キリギリス","win_team_mvp":"paleblue"},{"win_team_name":"キリギリス","win_team_mvp":"あまくし"},{"win_team_name":"アリ","win_team_mvp":"ぺんぎん"},{"win_team_name":"キリギリス","win_team_mvp":"こいくち"},{"win_team_name":"アリ","win_team_mvp":"KOUKA"},{"win_team_name":"アリ","win_team_mvp":"きゃま"},{"win_team_name":"キリギリス","win_team_mvp":"ふうちやん"},{"win_team_name":"アリ","win_team_mvp":"NAO"},{"win_team_name":"キリギリス","win_team_mvp":"雺??龍神???"},{"win_team_name":"キリギリス","win_team_mvp":"ありんこ"},{"win_team_name":"キリギリス","win_team_mvp":"えみっこ"},{"win_team_name":"キリギリス","win_team_mvp":"みゃび"},{"win_team_name":"アリ","win_team_mvp":"tatsu"},{"win_team_name":"キリギリス","win_team_mvp":"じつは・・・"},{"win_team_name":"キリギリス","win_team_mvp":"ラッカ"},{"win_team_name":"アリ","win_team_mvp":"katadai"},{"win_team_name":"キリギリス","win_team_mvp":"びねつ"},{"win_team_name":"キリギリス","win_team_mvp":"りょうが"},{"win_team_name":"キリギリス","win_team_mvp":"がく"},{"win_team_name":"アリ","win_team_mvp":"るーしー"},{"win_team_name":"キリギリス","win_team_mvp":"ドラコー"},{"win_team_name":"キリギリス","win_team_mvp":"わさび"},{"win_team_name":"アリ","win_team_mvp":"ヤマ"},{"win_team_name":"アリ","win_team_mvp":"おつさん"},{"win_team_name":"アリ","win_team_mvp":"ともあき"},{"win_team_name":"アリ","win_team_mvp":"めぐ"},{"win_team_name":"キリギリス","win_team_mvp":"Chika"},{"win_team_name":"アリ","win_team_mvp":"さやリン"},{"win_team_name":"アリ","win_team_mvp":"じゅんじゅん"},{"win_team_name":"キリギリス","win_team_mvp":"メグ"},{"win_team_name":"キリギリス","win_team_mvp":"ジロス"},{"win_team_name":"アリ","win_team_mvp":" ひろと "},{"win_team_name":"キリギリス","win_team_mvp":"こはだ"},{"win_team_name":"キリギリス","win_team_mvp":"マッカン"},{"win_team_name":"キリギリス","win_team_mvp":"なーくん#K"},{"win_team_name":"キリギリス","win_team_mvp":"Koo"},{"win_team_name":"アリ","win_team_mvp":"kohei"},{"win_team_name":"キリギリス","win_team_mvp":"ゆにさん"},{"win_team_name":"アリ","win_team_mvp":"ゆう"},{"win_team_name":"アリ","win_team_mvp":"かびん"},{"win_team_name":"アリ","win_team_mvp":"ダンジョー"},{"win_team_name":"アリ","win_team_mvp":"User"},{"win_team_name":"アリ","win_team_mvp":"ベルセルク"},{"win_team_name":"アリ","win_team_mvp":"こあず"},{"win_team_name":"アリ","win_team_mvp":"サーク"},{"win_team_name":"アリ","win_team_mvp":"( ò-ó)"},{"win_team_name":"キリギリス","win_team_mvp":"しゅう"},{"win_team_name":"アリ","win_team_mvp":"チビスケ"},{"win_team_name":"キリギリス","win_team_mvp":"るーるー"},{"win_team_name":"キリギリス","win_team_mvp":"ロッペちゃん"},{"win_team_name":"キリギリス","win_team_mvp":"sato"},{"win_team_name":"キリギリス","win_team_mvp":"だるっち"},{"win_team_name":"アリ","win_team_mvp":"tuba"},{"win_team_name":"アリ","win_team_mvp":"でんきやさん"},{"win_team_name":"アリ","win_team_mvp":"みんみん"},{"win_team_name":"アリ","win_team_mvp":"XF"},{"win_team_name":"キリギリス","win_team_mvp":"02"},{"win_team_name":"キリギリス","win_team_mvp":"ししゃモ"},{"win_team_name":"キリギリス","win_team_mvp":"パパス"},{"win_team_name":"アリ","win_team_mvp":"ヘドばくマッ"},{"win_team_name":"アリ","win_team_mvp":"☆★☆ユウト"},{"win_team_name":"アリ","win_team_mvp":"かしこ"},{"win_team_name":"キリギリス","win_team_mvp":"の!"},{"win_team_name":"アリ","win_team_mvp":"レットX01かい"},{"win_team_name":"キリギリス","win_team_mvp":"ふなっしー´・"},{"win_team_name":"キリギリス","win_team_mvp":"あー。すまん"},{"win_team_name":"キリギリス","win_team_mvp":"☆★☆★"},{"win_team_name":"キリギリス","win_team_mvp":"びすこ"},{"win_team_name":"キリギリス","win_team_mvp":"neu"},{"win_team_name":"アリ","win_team_mvp":"まいーーー8さ"},{"win_team_name":"アリ","win_team_mvp":"Rib◇SZ"},{"win_team_name":"アリ","win_team_mvp":"かめ"},{"win_team_name":"キリギリス","win_team_mvp":"トモキ"},{"win_team_name":"アリ","win_team_mvp":"napo7ch"},{"win_team_name":"キリギリス","win_team_mvp":"*ねこかん2ごう"},{"win_team_name":"キリギリス","win_team_mvp":"ドラにし"},{"win_team_name":"キリギリス","win_team_mvp":"まっち"}] | json |
/** @jsx REACT.DOM */
import React from 'react';
import {classSet} from 'react-addons';
import keymaster from 'keymaster';
export default React.createClass({
componentWillMount: function () {
this.state.queso.on('STATE_CHANGED', this._onChange);
keymaster('space', this.onSpace);
},
getInitialState: function () {
return {queso: this.props.queso};
},
_onChange: function () {
this.setState({queso: this.props.queso});
},
onSpace: function (event) {
event.preventDefault();
this.togglePlayback();
},
play: function () {
this.state.queso.setPlaying(true);
},
stop: function () {
this.state.queso.setPlaying(false);
},
togglePlayback: function () {
const {queso} = this.state;
queso.setPlaying(!queso.isPlaying);
},
record: function () {
const {queso} = this.state;
queso.setRecording(!queso.isRecording);
},
lastTap: null,
tapBpm: function () {
const tapTime = tsw.context().currentTime;
if (this.lastTap) {
const difference = tapTime - this.lastTap;
if (difference < 2) {
this.state.queso.setBpm(Math.round(60 / difference));
}
}
this.lastTap = tsw.context().currentTime;
},
toBeginning: function () {
this.state.queso.setCurrentTime(0);
},
render: function () {
const {queso} = this.state;
const playingClasses = classSet({
'button': true,
'active': queso.isPlaying
});
const recordingClasses = classSet({
'button': true,
'active': queso.isRecording
});
return (
<header className="header">
{
// TODO: probably use some icons
}
<button className={playingClasses} onClick={this.play}>Play</button>
<button className="button" onClick={this.stop} onDoubleClick={this.toBeginning}>Stop</button>
<button className={recordingClasses} onClick={this.record}>Record</button>
<div className="header-right">
<p className="bpm">{this.state.queso.bpm} BPM</p>
<p className="bpm tap-bpm button" onClick={this.tapBpm}>Tap</p>
</div>
</header>
);
}
});
| javascript |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Collapsible</title>
<style>
input {
display: none;
}
label {
display: block;
padding: 10px;
margin-top: 5px;
font-size: 20px;
font-weight: 500;
background-color: #f5f5f5;
border: 1px solid #dddddd;
border-radius: 4px 4px 0 0;
cursor: pointer;
}
.context {
height: 0;
overflow: hidden;
border: 1px solid #dddddd;
border-top: none;
border-radius: 0 0 4px 4px;
transition: all 2s;
}
.context p {
margin: 10px;
font-size: 15px;
}
input:checked + label + .context {
height: 120px;
}
</style>
</head>
<body>
<input type="radio" id="item1" name="Collapsible">
<label for="item1">
Collapsible Group Item #1
</label>
<div class="context">
<p>Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.</p>
</div>
<input type="radio" id="item2" name="Collapsible">
<label for="item2">
Collapsible Group Item #2
</label>
<div class="context">
<p>Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus t<NAME> ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.</p>
</div>
<input type="radio" id="item3" name="Collapsible">
<label for="item3">
Collapsible Group Item #3
</label>
<div class="context">
<p>Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus t<NAME> ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.</p>
</div>
</body>
</html>
| html |
[
{
ingredientPattern: "PP,HH",
ingredients: {
"P": {
type: "item",
code: "game:plank-acacia",
name: "wood",
},
"H": {
type: "item",
code: "bighook-*",
name: "metal",
quantity: 2
},
},
width: 2,
height: 2,
output: { type: "block", code: "meathooks-acacia-{metal}-east" }
},
{
ingredientPattern: "PP,HH",
ingredients: {
"P": {
type: "item",
code: "game:plank-aged",
name: "wood",
},
"H": {
type: "item",
code: "bighook-*",
name: "metal",
quantity: 2
},
},
width: 2,
height: 2,
output: { type: "block", code: "meathooks-aged-{metal}-east" }
},
{
ingredientPattern: "PP,HH",
ingredients: {
"P": {
type: "item",
code: "game:plank-birch",
name: "wood",
},
"H": {
type: "item",
code: "bighook-*",
name: "metal",
quantity: 2
},
},
width: 2,
height: 2,
output: { type: "block", code: "meathooks-birch-{metal}-east" }
},
{
ingredientPattern: "PP,HH",
ingredients: {
"P": {
type: "item",
code: "game:plank-oak",
name: "wood",
},
"H": {
type: "item",
code: "bighook-*",
name: "metal",
quantity: 2
},
},
width: 2,
height: 2,
output: { type: "block", code: "meathooks-oak-{metal}-east" }
},
{
ingredientPattern: "PP,HH",
ingredients: {
"P": {
type: "item",
code: "game:plank-maple",
name: "wood",
},
"H": {
type: "item",
code: "bighook-*",
name: "metal",
quantity: 2
},
},
width: 2,
height: 2,
output: { type: "block", code: "meathooks-maple-{metal}-east" }
},
{
ingredientPattern: "PP,HH",
ingredients: {
"P": {
type: "item",
code: "game:plank-pine",
name: "wood",
},
"H": {
type: "item",
code: "bighook-*",
name: "metal",
quantity: 2
},
},
width: 2,
height: 2,
output: { type: "block", code: "meathooks-pine-{metal}-east" }
},
{
ingredientPattern: "PP,HH",
ingredients: {
"P": {
type: "item",
code: "game:plank-kapok",
name: "wood",
},
"H": {
type: "item",
code: "bighook-*",
name: "metal",
quantity: 2
},
},
width: 2,
height: 2,
output: { type: "block", code: "meathooks-kapok-{metal}-east" }
},
] | json |
Abhishek Raghuram approaches every raga and kriti he presents in his own unique way. His concert was both energetic and intellectual — from the varnam to the concluding Madhyamavati raga composition. Every alapana, song and creative segment showed that a lot of thought goes into structuring of the concert.
Abhishek packed the first half with a surfeit of kalpanaswaras suffixed to all the compositions, except the briskly rendered Kiranavali and the slow-paced Yadukulakamboji kritis. The Purvikalyani alapana that began in a sedate pace also landed in supersonic phrases in the swara segment. However, his free-flowing creativity and change in tempo sustained the audience interest throughout the three-hour concert.
The Bhairavi Ata tala varnam ‘Viriboni’ in two speeds was a nice warm-up piece, while the Harikamboji kriti ‘Rama nannu brovara’ by Tyagaraja came with a brief alapana, niraval and kalpanaswaras.
Playing on the word ‘Velava’, he sang ‘Vaa velava, ka va velava’ before arriving at ‘Ka va va kanda va va’, Papanasam Sivan’s composition in Varali.
R. Sankaranarayanan on the mridangam added a few sparklers at the phrase ‘Pazhani malai’. Exploring all of the three octaves in the lines ‘Padmanabhan maruga’, the Madhyamakala swarakalpanas were back at the pallavi line.
Moving on to Jayantasena raga alapana, Abhishek’s innovative phrases came with brigas and glides and clarity in the lower octaves.
L. Ramakrishnan on the violin was equally imaginative and presented a snappy alapana. He began Tyagaraja’s ‘Vinathasuta vahana’ from the anupallavi, and followed this style in the other compositions too. During his niraval at the charanam line, Abhishek again played with the words ‘sukha’ and ‘sowkhyam’. Ramakrishnan's brilliant interludes added glitter to the presentation. The kalpanaswaras just whizzed by.
‘Eti yochanalu’ another Tyagaraja composition in Kiranavali, set in a tad fast tempo, also began on the anupallavi line ‘Noti mata’. So did the Yadukulakamboji kriti ‘Heccharikaga rara’. The layered swaras with exquisite modulation of the voice to suit the mood of the lyrics served as a breather at this point.
Purvikalyani was presented in all its grandeur. Its long phrases showcased Abhishek’s wide vocal range and remarkable breath control. Appreciably, the violin almost went silent to highlight the singing. After a couple of tanam phrases, Abhishek let the violinist present his version.
The lines ‘iniyaghilum ninai maname inakula tilakanai raghavanai’ from Ambujam Krishna’s composition was taken up for pallavi set in Mishra Chapu. Many nadai variations dominated the swarakalpana.
Sahana followed by Aahiri with swarakalpana incorporating these ragas seamlessly led to the main raga. It was an enjoyable exercise. The intricate kanakkus were for the erudite listeners.
Sankaranarayanan on the mridangam and Sunil Kumar on the kanjira swung into action during their 15-minute tani avarthanam and replied to all the arithmetical challenges thrown by Abhishek, which garnered them thunderous applause.
After a few short, delightful phrases of Maand, Periyasami Thooran’s ‘Muralidhara Gopala’ was a breeze. Muthuswami Dikshitar’s vara kriti for Tuesday — ‘Angarakamashrayamyaham’ in Surutti and Papanasam Sivan's ‘Karpagame’ were the concluding pieces. All of them came with anupallavi.
Despite the racy pace and excessive calculations, Abhishek made every composition his own and the concert was memorable for many listeners. | english |
#![recursion_limit = "128"]
use yew::prelude::*;
#[derive(Properties, PartialEq)]
pub struct ChildProperties {
pub string: String,
#[props(required)]
pub int: i32,
}
pub struct ChildComponent;
impl Component for ChildComponent {
type Message = ();
type Properties = ChildProperties;
fn create(props: Self::Properties, _: ComponentLink<Self>) -> Self {
ChildComponent
}
fn update(&mut self, _: Self::Message) -> ShouldRender {
unimplemented!()
}
}
impl Renderable<ChildComponent> for ChildComponent {
fn view(&self) -> Html<Self> {
unimplemented!()
}
}
fn compile_fail() {
html! { <ChildComponent> };
html! { <ChildComponent:: /> };
html! { <ChildComponent with /> };
html! { <ChildComponent props /> };
html! { <ChildComponent with props > };
html! { <ChildComponent with blah /> };
html! { <ChildComponent with props () /> };
html! { <ChildComponent type=0 /> };
html! { <ChildComponent invalid-prop-name=0 /> };
html! { <ChildComponent unknown="unknown" /> };
html! { <ChildComponent string= /> };
html! { <ChildComponent int=1 string={} /> };
html! { <ChildComponent int=1 string=3 /> };
html! { <ChildComponent int=1 string={3} /> };
html! { <ChildComponent int=0u32 /> };
html! { <ChildComponent string="abc" /> };
}
fn main() {}
| rust |
<gh_stars>0
from math import sin
ys = [sin(i) for i in range(1,3.14, 0.2)]
xs = range(1, 3.14, 0.2)
def h(k):
return xs[k] - xs[k-1]
def f_r(k):
return (ys[k] - ys[k-1]) / h(k)
lamba1 = (3 * f_r(2) - 3 * f_r(1)) / (2 * (h(1) + h(2)))
delta1 = - h(2) / (2 * (h(1) + h(2)))
deltas = [delta1]
lambas = [lamba1]
for k in range(3,n):
t = h(k) / (2 * h(k-1) + 2 * h(k) + h(k-1) * deltas[-1])
deltas.append(t)
for k in range(3,n):
t = 3 * (f_r(k) - f_r(k-1) - h(k-1)*lambas[k-2]) / (
2 * (h(k-1) + h(k)) + h(k-1)*deltas(k-2))
c = [0]
for k in range(n,2):
t = deltas[k-1]*c[-1] + lambas[k-1]
c.append(t)
def c_r(k):
c[k] - c[k-1]
d = [c_r(k) / (3 * h(k)) for k in range(1, len(xs) + 1)
b = [f_r(k) + 2.0 / 3 * h(k)c[k] + 1.0 / 3 * h(k)c[k-1]]
a = ys
| python |
- Movies Tamannaah Bhatia Grooves To Kaavaalaa Song With Fan At Mumbai Airport; Says 'He Is Doing Better Than Me'
- News Who is Monk Amogh Lila Das and Why Has ISKCON Banned Him?
- Travel Have you been to Vishveshwaraya Falls in Mandya yet? If not, this is the best time!
Are Kim And Kanye Getting Married?
Life is turning out to be a fairytale for Kim Kardashian and Kanye West. First of all, they suddenly realised that Kim Kardashian is pregnant! It was unplanned of course. And then, their baby girl arrived 5 weeks before schedule! So Kim Kardashian And Kanye West are realising that life doesn't always go as planned. But then it is all for the best in the end.
The arrival of Kim Kardashian's baby girl may be accompanied by one more good news. Looks like marriage is on the cards for Kim Kardashian and Kanye West! Surprised? After all the episodes of Kanye being absent from Kim's side for months, missing doctor's appointments and even floating rumours of him cheating on a pregnant Kim, marriage seems a little drastic.
So from where did the sudden idea of getting married come? It seems that watching his baby girl being born has had a profound effect on Kanye. He was by Kim's side during a difficult and long labor. This has made Kanye become totally enthralled with his brave girlfriend. He wants to pay his compliments in the form of a wedding ring!
Kim Kardarshian's track record of marriage is not very good. Her first marriage was abusive and ended with life threats and an ugly media circus. Kim Kardashian's second marriage with Kris Humphris was grand but lasted for only 72 days! Now that Kim is freshly divorced from her second husband, marriage is a possible but critical option. Lets hope that their baby girl will give Kim Kardashian and Kanye West enough reasons to stick together. | english |
{
"extends": "npm-package-json-lint-config-default",
"rules": {
"require-keywords": "off",
"require-private": "error",
"valid-values-private": ["error", [true]]
},
"overrides": [
{
"patterns": ["packages/*/package.json"],
"rules": {
"require-private": "off",
"valid-values-private": "off",
"require-repository-directory": "error"
}
}
]
}
| json |
<gh_stars>1-10
# Generated by Django 3.2.5 on 2021-08-31 10:48
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('university', '0009_auto_20210829_2150'),
]
operations = [
migrations.RenameField(
model_name='representative',
old_name='title',
new_name='degree_name',
),
]
| python |
<filename>seaborn/figuregrid.py
"""
(c) <NAME>
FacetFigure
"""
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import numpy as np
from .axisgrid import FacetGrid, PairGrid, JointGrid
from .prettify import get_letter, panel_letter
from . import utils
# TODO better padding between subplots
# TODO better padding within subplot grid
class Figure:
"""
Construct a figure with single plots, subplots,
`FacetGrid` plots, `PairGrid` plots, and `JointGrid` plots.
Parameters
----------
nrows : int, optional
Number of rows in the figure grid.
ncols : int, optional
Number of columns in the figure grid.
figsize : two-tuple, optional
Size of complete figure.
gridspec_kws : dict, optional
Arguments passed to `gridspec.GridSpec`.
fig_kws: dict, optional
Arguments passed to `plt.figure`.
"""
def __init__(
self,
nrows=1,
ncols=1,
figsize=None,
gridspec_kws=None,
**fig_kws
):
gridspec_kws = {} if gridspec_kws is None else gridspec_kws
self._fig = plt.figure(
figsize=figsize,
**fig_kws
)
self._grid = gridspec.GridSpec(
nrows, ncols,
figure=self._fig, **gridspec_kws
)
self._reserved = np.zeros((nrows, ncols)).astype(bool)
self._keys = []
self._handlers = []
def __getitem__(self, key):
if key in self._keys:
index = self._keys.index(key)
return self._handlers[index]
if np.any(self._reserved[key]):
raise KeyError("Indices in key '{}' already in use.".format(key))
# create instance of subplot_spec_handler
subplot_spec_handler = _SubplotSpecHandler(self._fig, self._grid[key])
# append subplot_spec_handler and reserve key
self._handlers.append(subplot_spec_handler)
self._keys.append(key)
self._reserved[key] = True
# return
return subplot_spec_handler
@property
def axes(self):
"""all matplotlib.pyplot.Axis objects in a flattened array
"""
return np.concatenate([
handler.axes
for handler in self._handlers
])
def add_panel_letters(self, lower=False, **kwargs):
"""
Add panel letters to each axis
Parameters
----------
lower : bool, optional
Whether panel letters are lowercase. Defaults to False.
kwargs : dict, optional
Arguments passed to `panel_letter` function.
"""
for idx, ax in enumerate(self.axes):
letter = get_letter(idx, lower)
panel_letter(ax, letter, **kwargs)
class _SubplotSpecHandler:
def __init__(self, fig, subplot_spec):
self._fig = fig
self._subplot_spec = subplot_spec
self._reserved = False
self._g = None
self._axes = None
self._subplot_grid = None
@property
def axes(self):
"""matplotlib.pyplot.Axis objects in a flattened array
"""
return np.array([]) if self._axes is None else self._axes
def __getattr__(self, name):
if hasattr(self._g, name):
return getattr(self._g, name)
else:
raise AttributeError(
'{} does not have attribute {}'.format(type(self._g), name)
)
def add_facetgrid(self, *args, **kwargs):
"""
Parameters
----------
args, kwargs : tuple, dict
Arguments passed to `FacetGrid`.
Returns
-------
g : `FacetGrid` object
"""
if self._reserved:
raise RuntimeError(
'grid or plot for selected figure subplot already created.'
)
g = FacetGrid(
*args,
fig=self._fig,
subplot_spec=self._subplot_spec,
**kwargs
)
self._reserved = True
self._g = g
self._subplot_grid = g._gridspec
self._axes = g.axes.flatten()
return g
def add_pairgrid(self, *args, **kwargs):
"""
Parameters
----------
args, kwargs : tuple, dict
Arguments passed to `PairGrid`.
Returns
-------
g : `PairGrid` object
"""
if self._reserved:
raise RuntimeError(
'grid or plot for selected figure subplot already created.'
)
g = PairGrid(
*args,
fig=self._fig,
subplot_spec=self._subplot_spec,
**kwargs
)
self._reserved = True
self._g = g
self._subplot_grid = g._gridspec
self._axes = g.axes.flatten()
return g
def add_jointgrid(self, *args, **kwargs):
"""
Parameters
----------
args, kwargs : tuple, dict
Arguments passed to `JointGrid`.
Returns
-------
g : `JointGrid` object
"""
if self._reserved:
raise RuntimeError(
'grid or plot for selected figure subplot already created.'
)
g = JointGrid(
*args,
fig=self._fig,
subplot_spec=self._subplot_spec,
**kwargs
)
self._reserved = True
self._g = g
self._subplot_grid = g._gridspec
self._axes = np.array([self.ax_joint, self.ax_marg_x, self.ax_marg_y])
return g
def add_subplot(self, despine=True, **subplot_kws):
"""
Parameters
----------
despine : bool
Whether to apply `despine` to axis.
subplot_kws : dict
Arguments passed to `plt.Subplot`.
Returns
-------
ax : matplotlib.pyplot.Axis
"""
if self._reserved:
raise RuntimeError(
'grid or plot for selected figure subplot already created.'
)
g = gridspec.GridSpecFromSubplotSpec(
1, 1,
subplot_spec=self._subplot_spec
)
ax = plt.Subplot(self._fig, g[0, 0], **subplot_kws)
self._fig.add_subplot(ax)
if despine:
utils.despine(ax=ax)
self._reserved = True
self._g = ax
self._subplot_grid = g
self._axes = np.array([ax])
return ax
def add_grid(
self, nrows=1, ncols=1,
sharex=False, sharey=False, squeeze=True,
wspace=None, hspace=None,
height_ratios=None, width_ratios=None,
despine=True,
**subplot_kws
):
"""
Parameters
----------
nrows, ncols, sharex, sharey, squeeze : various
Same as those passed to `plt.subplots`
wspace, hspace, height_ratios, width_ratios : various
Same as those passed to `gridspec.GridSpec`
despine : bool
Whether to apply `despine` to axis.
subplot_kws : dict
Arguments passed to each subplot instance.
Returns
-------
axes : array of matplotlib.pyplot.Axis
"""
if self._reserved:
raise RuntimeError(
'grid or plot for selected figure subplot already created.'
)
g = gridspec.GridSpecFromSubplotSpec(
nrows=nrows, ncols=ncols,
subplot_spec=self._subplot_spec,
wspace=wspace,
hspace=hspace,
height_ratios=height_ratios,
width_ratios=width_ratios
)
axes = np.empty((nrows, ncols), object)
for irow in range(nrows):
for icol in range(ncols):
# sharex
if sharex == 'row' and icol > 0:
subplot_kws['sharex'] = axes[irow, 0]
elif sharex == 'col' and irow > 0:
subplot_kws['sharex'] = axes[0, icol]
elif sharex and ((irow > 0) or (icol > 0)):
subplot_kws['sharex'] = axes[0, 0]
else:
subplot_kws['sharex'] = None
# sharey
if sharey == 'row' and icol > 0:
subplot_kws['sharey'] = axes[irow, 0]
elif sharey == 'col' and irow > 0:
subplot_kws['sharey'] = axes[0, icol]
elif sharey and ((irow > 0) or (icol > 0)):
subplot_kws['sharey'] = axes[0, 0]
else:
subplot_kws['sharey'] = None
axes[irow, icol] = plt.Subplot(
self._fig, g[irow, icol], **subplot_kws)
self._fig.add_subplot(axes[irow, icol])
# Now we turn off labels on the inner axes
if sharex and not sharex == 'row':
for ax in axes[:-1, :].flat:
for label in ax.get_xticklabels():
label.set_visible(False)
ax.xaxis.offsetText.set_visible(False)
if sharey and not sharey == 'col':
for ax in axes[:, 1:].flat:
for label in ax.get_yticklabels():
label.set_visible(False)
ax.yaxis.offsetText.set_visible(False)
if squeeze:
axes = np.squeeze(axes)
if despine:
for ax in axes.flat:
utils.despine(ax=ax)
self._reserved = True
self._g = axes
self._subplot_grid = g
self._axes = axes.flatten()
return axes
| python |
The Enforcement Directorate of Friday got eight-day custody of Tamil Nadu Minister Senthil Balaji.
Tamil Nadu Minister Senthil Balaji (File Image)
New Delhi: The Enforcement Directorate of Friday got eight-day custody of Tamil Nadu Minister Senthil Balaji . The judgment was pronounced by Principle Sessions Court Judge.
Balaji was arrested by the probe agency in a money laundering probe on Wednesday. After his arrest, the Tamil Nadu minister was hospitalised as he complained of chest pain while being questioned by the ED. He then underwent a coronary angiogram on Wednesday at the Omandurar government hospital in Chennai.
The medical bulletin released by Kauvery Hospital on Friday said that Balaji has been advised an early Coronary Artery Bypass Graft (CABG) Surgery. He is undergoing tests to assess fitness for anaesthesia and based on that, the surgery will be planned.
After his arrest on Wednesday, Balaji was remanded to 14 days' judicial custody. Notably, the minister was arrested in connection with a cash-for-jobs scam when he served as an AIADMK minister from 2011 to 2015.
The war of words erupted after Senthil's arrest. The DMK accused the Centre of using probe agencies to curb the Opposition. Stalin strongly objected to Balaji's arrest. Stalin on Wednesday met Balaji at the hospital.
Tamil Nadu Leader of Opposition Edappadi Palaniswami on Friday said that the arrested state minister was interrogated by the Enforcement Directorate on the orders of the Supreme Court.
After Balaji's arrest, the Tamil Nadu government withdrew general consent given to the Central Bureau of Investigation (CBI) to investigate the cases in the southern state. The central probe agency has to take permission from the Tamil Nadu government before carrying out any investigation. | english |
On the eve of Gold Coast 2018, as most nations went into the ‘Games mode’, India squabbled over accreditation and accommodation of its officials. On Tuesday morning, Saina Nehwal threatened to pull out of the Games if her father Harvir was not allowed to stay inside the Athletes Village. By evening, Harvir’s privilege was upgraded.
Around the same time, the weightlifters made a demand that their physio, Aakrant Saxena, be allowed inside the Village to help them in their recovery process. Their plea, however, fell on deaf ears. This means India’s best medal prospects, including world champion Mirabai Chanu, will now be without a physio when they open their campaign on Thursday. Both, Harvir and Saxena, arrived in Gold Coast as ‘personal coaches’ of their respective athletes. However, as per the rules, personal coaches are not allowed to stay inside the Athletes Village since they are termed as ‘extras’ and not part of the official contingent. They could only enter the residential area during the day time.
Both Harvir and Saxena stayed at a nearby hotel on Monday. While Harvir’s inclusion was objected by the government, Saxena was on the list of officials cleared by the Sports Authority of India on March 21 after the federation made two written requests – one each in February and March.
That is turning out to be a bigger headache for the lifters. The nature of the sport is such that lifters need constant massages and treatment in-between two attempts. It is understood that they requested contingent doctor Amit Soni to be present to help them with the bare minimum. “He said he has another meeting to attend, so that’s a dilemma for our team,” a weightlifting official said.
Sisodia denied getting request to include weightlifting physio in the official team. The composition of India’s contingent has been a highly-debated issue this time round. The ministry didn’t clear the name of sports medicine expert Arun Mendiratta, who was named by the IOA as the chief medical officer of the contingent. Not having an experienced hand showed as the Indian contingent faced the embarrassment of being sanctioned for breaking the Commonwealth Games’ no needle policy. | english |
#include <type_list.h>
#include <gtest/gtest.h>
namespace stdx::test
{
struct literal
{
constexpr literal() = default;
};
TEST(TypeList, class_template_argument_deduction)
{
{
using my_type_list = stdx::type_list<int, double, literal>;
stdx::type_list tl(int{}, double{}, literal{});
static_assert(std::is_same_v<decltype(tl), my_type_list>);
int val = 0;
if constexpr (std::is_same_v<decltype(tl), my_type_list>)
{
++val;
}
EXPECT_EQ(val, 1);
}
{
using my_type_list = stdx::type_list<int, float, char>;
stdx::type_list tl(1, 0.5f, 'c');
static_assert(std::is_same_v<decltype(tl), my_type_list>);
int val = 0;
if constexpr (std::is_same_v<decltype(tl), my_type_list>)
{
++val;
}
EXPECT_EQ(val, 1);
}
{
using my_type_list = stdx::type_list<int, float, char>;
int i = 5;
float f = 2.0f;
char c = 'f';
stdx::type_list tl(i, f, c);
static_assert(std::is_same_v<decltype(tl), my_type_list>);
int val = 0;
if constexpr (std::is_same_v<decltype(tl), my_type_list>)
{
++val;
}
EXPECT_EQ(val, 1);
}
{
using my_type_list = stdx::type_list<>; //empty type list
stdx::type_list tl;
static_assert(std::is_same_v<decltype(tl), my_type_list>);
int val = 0;
if constexpr (std::is_same_v<decltype(tl), my_type_list>)
{
++val;
}
EXPECT_EQ(val, 1);
}
}
}
| cpp |
A shiver ran down his spine as Shameem saw stretchers piled high with dead bodies being taken out from Mina, the neighbourhood of Mecca, which witnessed a massive stampede on Thursday, claiming lives of over 700 haj pilgrims.
A shiver ran down his spine as Shameem saw stretchers piled high with dead bodies being taken out from Mina, the neighbourhood of Mecca, which witnessed a massive stampede on Thursday, claiming lives of over 700 haj pilgrims.
Yet to recuperate from shock, Shameem, a native of the state capital, said he would never forget this haj, where he had a close brush with death not once but twice. On September 11, during the Mecca crane crash, he was just a few metres away from the point where disaster struck.
“It’s my first haj and it would be remembered always. I am also thankful to Allah for keeping me and my family safe,” said Mohammed Shameem. Talking to HT over phone, he said the incident took place around 11am when the pilgrims gathered at Mina, around 5km from Mecca to offer last haj ritual—‘stoning the evil’. “Stampede ensued when the first batch of the pilgrims gathered to perform the ritual. Fortunately, my family and I were in the second batch,” he said.
Narrating the sequence of events, Shameem said the second batch members were waiting for their turn when they heard a massive hue and cry. “We were really unaware what the matter was. After having a word with the pilgrims of the first batch, we came to know it was a stampede,” said Reshma, Shameem’s sister.
A few pilgrims told us that they had to step on the corpses to get out of Mina, she added while informing that the family was associated with Maktab 39, one of the hubs of pilgrims from UP and other states of India. “No casualty was reported at our maktab,” she claimed.
Between the crane crash and stampede, the family also witnessed a painful moment when an elderly member of the clan—Hamatul Nisha, passed away due to dearth of medical assistance. “I lost her on Wednesday, she could not complete her Haj. I ran from pillar to post but couldn’t get medical assistance for my ailing grandmother, who was an asthma patient. After four hours of struggle, she passed away,” said Ayesha Begum, granddaughter of the deceased. | english |
package com.novoda.staticanalysisplugin.sample;
public class MyClass {
}
| java |
Star Wars 9: Will Ewan McGregor return as Obi-Wan?
What can we expect from Respawn’s upcoming Star Wars game?
Why are European Wikipedia sites shutting down in protest?
Has Siri just highlighted cyber-security weaknesses at the heart of the British government?
| english |
thead{
color:#227AB7;
} | css |
use crate::PicInfoUniform;
use idroid::node::{BindingGroupSettingNode, DynamicBindingGroupNode};
pub struct SDFComputeNode {
setting_node: BindingGroupSettingNode,
dynamic_node: DynamicBindingGroupNode,
xy_pipeline: wgpu::ComputePipeline,
x_pipeline: wgpu::ComputePipeline,
y_pipeline: wgpu::ComputePipeline,
offset_stride: wgpu::DynamicOffset,
threadgroup_count: (u32, u32),
pub sdf_buffer: idroid::BufferObj,
pub staging_buffer: wgpu::Buffer,
}
impl SDFComputeNode {
pub fn new(
device: &mut wgpu::Device, _encoder: &mut wgpu::CommandEncoder,
src_view: &wgpu::TextureView, des_view: &wgpu::TextureView, extent: wgpu::Extent3d,
) -> Self {
let img_size = (extent.width * extent.height) as u64;
let offset_stride = 256 as wgpu::DynamicOffset;
let uniform_buffer = idroid::BufferObj::create_uniforms_buffer(
device,
&[
PicInfoUniform {
info: [extent.width as i32, extent.height as i32, 2, 0],
any: [0; 60],
},
PicInfoUniform {
info: [extent.width as i32, extent.height as i32, 0, 0],
any: [0; 60],
},
PicInfoUniform {
info: [extent.width as i32, extent.height as i32, 1, 0],
any: [0; 60],
},
PicInfoUniform {
info: [extent.width as i32, extent.height as i32, 0, 1],
any: [0; 60],
},
PicInfoUniform {
info: [extent.width as i32, extent.height as i32, 1, 1],
any: [0; 60],
},
PicInfoUniform {
info: [extent.width as i32, extent.height as i32, 3, 0],
any: [0; 60],
},
],
Some("uniform_buffer"),
);
let dynamic_node = DynamicBindingGroupNode::new(
device,
vec![(&uniform_buffer, wgpu::ShaderStage::COMPUTE)],
);
let sdf_range = (img_size * 4) as wgpu::BufferAddress;
let sdf_front = idroid::BufferObj::create_empty_storage_buffer(
device,
sdf_range,
false,
Some("sdf_front"),
);
let staging_buffer = device.create_buffer(&wgpu::BufferDescriptor {
size: sdf_range,
usage: wgpu::BufferUsage::MAP_READ | wgpu::BufferUsage::COPY_DST,
label: None,
mapped_at_creation: false,
});
let sdf_background = idroid::BufferObj::create_empty_storage_buffer(
device,
sdf_range,
false,
Some("sdf_background"),
);
let v_buffer = idroid::BufferObj::create_empty_storage_buffer(
device,
sdf_range,
false,
Some("v_buffer"),
);
let z_range = ((extent.width + 1) * (extent.height + 1) * 4) as wgpu::BufferAddress;
let z_buffer = idroid::BufferObj::create_empty_storage_buffer(
device,
z_range,
false,
Some("z_buffer"),
);
let visibilitys: Vec<wgpu::ShaderStage> = [wgpu::ShaderStage::COMPUTE; 6].to_vec();
println!("0");
let setting_node = BindingGroupSettingNode::new(
device,
vec![],
vec![&sdf_front, &sdf_background, &v_buffer, &z_buffer],
vec![
(
src_view,
wgpu::TextureFormat::R32Float,
Some(wgpu::StorageTextureAccess::ReadOnly),
),
(
des_view,
wgpu::TextureFormat::Rgba8Unorm,
Some(wgpu::StorageTextureAccess::WriteOnly),
),
],
vec![],
visibilitys,
);
let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: None,
push_constant_ranges: &[],
bind_group_layouts: &[&setting_node.bind_group_layout, &dynamic_node.bind_group_layout],
});
let shader_xy = idroid::shader2::create_shader_module(device, "sdf/sdf", None);
let xy_pipeline = device.create_compute_pipeline(&wgpu::ComputePipelineDescriptor {
layout: Some(&pipeline_layout),
module: &shader_xy,
entry_point: "main",
label: None,
});
let shader_x = idroid::shader2::create_shader_module(device, "sdf/sdf_x", None);
let x_pipeline = device.create_compute_pipeline(&wgpu::ComputePipelineDescriptor {
layout: Some(&pipeline_layout),
module: &shader_x,
entry_point: "main",
label: None,
});
let shader_y = idroid::shader2::create_shader_module(device, "sdf/sdf_y", None);
let y_pipeline = device.create_compute_pipeline(&wgpu::ComputePipelineDescriptor {
layout: Some(&pipeline_layout),
module: &shader_y,
entry_point: "main",
label: None,
});
let threadgroup_count = ((extent.width + 15) / 16, (extent.height + 15) / 16);
SDFComputeNode {
setting_node,
dynamic_node,
xy_pipeline,
x_pipeline,
y_pipeline,
offset_stride,
threadgroup_count,
staging_buffer,
sdf_buffer: sdf_front,
}
}
pub fn compute(&mut self, _device: &mut wgpu::Device, encoder: &mut wgpu::CommandEncoder) {
let mut cpass = encoder.begin_compute_pass(&wgpu::ComputePassDescriptor { label: None });
cpass.set_pipeline(&self.xy_pipeline);
cpass.set_bind_group(0, &self.setting_node.bind_group, &[]);
cpass.set_bind_group(1, &self.dynamic_node.bind_group, &[0]);
cpass.dispatch(self.threadgroup_count.0, self.threadgroup_count.1, 1);
cpass.set_pipeline(&self.x_pipeline);
// step background y
cpass.set_bind_group(1, &self.dynamic_node.bind_group, &[self.offset_stride * 3]);
cpass.dispatch(self.threadgroup_count.0, 1, 1);
// step front y
cpass.set_bind_group(1, &self.dynamic_node.bind_group, &[self.offset_stride]);
cpass.dispatch(self.threadgroup_count.0, 1, 1);
cpass.set_pipeline(&self.y_pipeline);
// step background x
cpass.set_bind_group(1, &self.dynamic_node.bind_group, &[self.offset_stride * 4]);
cpass.dispatch(1, self.threadgroup_count.1, 1);
// step front x
cpass.set_bind_group(1, &self.dynamic_node.bind_group, &[self.offset_stride * 2]);
cpass.dispatch(1, self.threadgroup_count.1, 1);
// final output
cpass.set_pipeline(&self.xy_pipeline);
cpass.set_bind_group(1, &self.dynamic_node.bind_group, &[self.offset_stride * 5]);
cpass.dispatch(self.threadgroup_count.0, self.threadgroup_count.1, 1);
}
}
| rust |
<gh_stars>0
describe('Component: SpendingAccounts', function() {
var scope,
q,
spendingAccount,
oc;
beforeEach(module('orderCloud'));
beforeEach(module('orderCloud.sdk'));
beforeEach(inject(function($q, $rootScope, OrderCloud) {
q = $q;
scope = $rootScope.$new();
spendingAccount = {
ID: "TestSpendingAccount123456789",
Name: "TestSpendingAccount",
AllowAsPaymentMethod: true,
Balance: 50.0,
StartDate: null,
EndDate: null,
xp: null
};
oc = OrderCloud;
}));
describe('State: spendingAccounts', function() {
var state;
beforeEach(inject(function($state) {
state = $state.get('spendingAccounts');
spyOn(oc.SpendingAccounts, 'List').and.returnValue(null);
}));
it('should resolve SpendingAccountList', inject(function ($injector) {
$injector.invoke(state.resolve.SpendingAccountList);
expect(oc.SpendingAccounts.List).toHaveBeenCalledWith(null, null, null, null, null, {'RedemptionCode': '!*'});
}));
});
describe('State: spendingAccounts.edit', function() {
var state;
beforeEach(inject(function($state) {
state = $state.get('spendingAccounts.edit');
spyOn(oc.SpendingAccounts, 'Get').and.returnValue(null);
}));
it('should resolve SelectedSpendingAccount', inject(function ($injector, $stateParams) {
$injector.invoke(state.resolve.SelectedSpendingAccount);
expect(oc.SpendingAccounts.Get).toHaveBeenCalledWith($stateParams.spendingAccountid);
}));
});
describe('State: spendingAccounts.assignGroup', function() {
var state;
beforeEach(inject(function($state) {
state = $state.get('spendingAccounts.assignGroup');
spyOn(oc.UserGroups, 'List').and.returnValue(null);
spyOn(oc.SpendingAccounts, 'ListAssignments').and.returnValue(null);
spyOn(oc.SpendingAccounts, 'Get').and.returnValue(null);
}));
it('should resolve UserGroupList', inject(function ($injector) {
$injector.invoke(state.resolve.UserGroupList);
expect(oc.UserGroups.List).toHaveBeenCalled();
}));
it('should resolve AssignedUserGroups', inject(function ($injector, $stateParams) {
$injector.invoke(state.resolve.AssignedUserGroups);
expect(oc.SpendingAccounts.ListAssignments).toHaveBeenCalledWith($stateParams.spendingAccountid, null, null, 'Group');
}));
it('should resolve SelectedSpendingAccount', inject(function ($injector, $stateParams) {
$injector.invoke(state.resolve.SelectedSpendingAccount);
expect(oc.SpendingAccounts.Get).toHaveBeenCalledWith($stateParams.spendingAccountid);
}));
});
describe('State: spendingAccounts.assignUser', function() {
var state;
beforeEach(inject(function($state) {
state = $state.get('spendingAccounts.assignUser');
spyOn(oc.Users, 'List').and.returnValue(null);
spyOn(oc.SpendingAccounts, 'Get').and.returnValue(null);
spyOn(oc.SpendingAccounts, 'ListAssignments').and.returnValue(null);
}));
it('should resolve UserList', inject(function ($injector) {
$injector.invoke(state.resolve.UserList);
expect(oc.Users.List).toHaveBeenCalled();
}));
it('should resolve AssignedUsers', inject(function ($injector, $stateParams) {
$injector.invoke(state.resolve.AssignedUsers);
expect(oc.SpendingAccounts.ListAssignments).toHaveBeenCalledWith($stateParams.spendingAccountid, null, null, 'User');
}));
it('should resolve SelectedSpendingAccount', inject(function ($injector, $stateParams) {
$injector.invoke(state.resolve.SelectedSpendingAccount);
expect(oc.SpendingAccounts.Get).toHaveBeenCalledWith($stateParams.spendingAccountid);
}));
});
describe('Controller: SpendingAccountEditCtrl', function() {
var spendingAccountEditCtrl;
beforeEach(inject(function($state, $controller) {
spendingAccountEditCtrl = $controller('SpendingAccountEditCtrl', {
$scope: scope,
SelectedSpendingAccount: spendingAccount
});
spyOn($state, 'go').and.returnValue(true);
}));
describe('Submit', function() {
beforeEach(function() {
spendingAccountEditCtrl.spendingAccount = spendingAccount;
spendingAccountEditCtrl.spendingAccountID = "TestSpendingAccount123456789";
var defer = q.defer();
defer.resolve(spendingAccount);
spyOn(oc.SpendingAccounts, 'Update').and.returnValue(defer.promise);
spendingAccountEditCtrl.Submit();
scope.$digest();
});
it ('should call the SpendingAccounts Update method', function() {
expect(oc.SpendingAccounts.Update).toHaveBeenCalledWith(spendingAccountEditCtrl.spendingAccountID, spendingAccountEditCtrl.spendingAccount);
});
it ('should enter the spendingAccounts state', inject(function($state) {
expect($state.go).toHaveBeenCalledWith('spendingAccounts', {}, {reload:true});
}));
});
describe('Delete', function() {
beforeEach(function() {
var defer = q.defer();
defer.resolve(spendingAccount);
spyOn(oc.SpendingAccounts, 'Delete').and.returnValue(defer.promise);
spendingAccountEditCtrl.Delete();
scope.$digest();
});
it ('should call the SpendingAccounts Delete method', function() {
expect(oc.SpendingAccounts.Delete).toHaveBeenCalledWith(spendingAccount.ID);
});
it ('should enter the spendingAccounts state', inject(function($state) {
expect($state.go).toHaveBeenCalledWith('spendingAccounts', {}, {reload:true});
}));
});
});
describe('Controller: SpendingAccountCreateCtrl', function() {
var spendingAccountCreateCtrl;
beforeEach(inject(function($state, $controller) {
spendingAccountCreateCtrl = $controller('SpendingAccountCreateCtrl', {
$scope: scope
});
spyOn($state, 'go').and.returnValue(true);
}));
describe('Submit', function() {
beforeEach(function() {
spendingAccountCreateCtrl.spendingAccount = spendingAccount;
var defer = q.defer();
defer.resolve(spendingAccount);
spyOn(oc.SpendingAccounts, 'Create').and.returnValue(defer.promise);
spendingAccountCreateCtrl.Submit();
scope.$digest();
});
it ('should call the SpendingAccounts Create method', function() {
expect(oc.SpendingAccounts.Create).toHaveBeenCalledWith(spendingAccountCreateCtrl.spendingAccount);
});
it ('should enter the spendingAccounts state', inject(function($state) {
expect($state.go).toHaveBeenCalledWith('spendingAccounts', {}, {reload:true});
}));
});
});
describe('Controller: SpendingAccountAssignGroupCtrl', function() {
var spendingAccountAssignGroupCtrl;
beforeEach(inject(function($state, $controller) {
spendingAccountAssignGroupCtrl = $controller('SpendingAccountAssignGroupCtrl', {
$scope: scope,
UserGroupList: [],
AssignedUserGroups: [],
SelectedSpendingAccount: {}
});
spyOn($state, 'go').and.returnValue(true);
}));
describe('SaveAssignments', function() {
beforeEach(inject(function(SpendingAccountAssignment) {
spyOn(SpendingAccountAssignment, 'saveAssignments').and.returnValue(null);
spendingAccountAssignGroupCtrl.saveAssignments();
}));
it ('should call the Assignments saveAssignments method', inject(function(SpendingAccountAssignment) {
expect(SpendingAccountAssignment.saveAssignments).toHaveBeenCalled();
}));
});
describe('pagingfunction', function() {
beforeEach(inject(function(SpendingAccountAssignment) {
spyOn(SpendingAccountAssignment, 'paging').and.returnValue(null);
spendingAccountAssignGroupCtrl.list = {
Meta: {
Page: 1,
TotalPages: 2,
PageSize: 20
}
};
spendingAccountAssignGroupCtrl.assignments = {
Meta: {
Page: 1,
TotalPages: 2,
PageSize: 20
}
};
spendingAccountAssignGroupCtrl.pagingfunction();
}));
it ('should call the SpendingAccountAssignment paging method', inject(function(SpendingAccountAssignment) {
expect(SpendingAccountAssignment.paging).toHaveBeenCalledWith(spendingAccountAssignGroupCtrl.spendingAccount.ID, spendingAccountAssignGroupCtrl.list, spendingAccountAssignGroupCtrl.assignments);
}));
});
});
describe('Controller: SpendingAccountAssignUserCtrl', function() {
var spendingAccountAssignUserCtrl;
beforeEach(inject(function($state, $controller) {
spendingAccountAssignUserCtrl = $controller('SpendingAccountAssignUserCtrl', {
$scope: scope,
UserList: [],
AssignedUsers: [],
SelectedSpendingAccount: {}
});
spyOn($state, 'go').and.returnValue(true);
}));
describe('SaveAssignments', function() {
beforeEach(inject(function(SpendingAccountAssignment) {
spyOn(SpendingAccountAssignment, 'saveAssignments').and.returnValue(null);
spendingAccountAssignUserCtrl.saveAssignments();
}));
it ('should call the Assignments saveAssignments method', inject(function(SpendingAccountAssignment) {
expect(SpendingAccountAssignment.saveAssignments).toHaveBeenCalled();
}));
});
describe('pagingfunction', function() {
beforeEach(inject(function(SpendingAccountAssignment) {
spyOn(SpendingAccountAssignment, 'paging').and.returnValue(null);
spendingAccountAssignUserCtrl.list = {
Meta: {
Page: 1,
TotalPages: 2,
PageSize: 20
}
};
spendingAccountAssignUserCtrl.assignments = {
Meta: {
Page: 1,
TotalPages: 2,
PageSize: 20
}
};
spendingAccountAssignUserCtrl.pagingfunction();
}));
it ('should call the SpendingAccountAssignment paging method', inject(function(SpendingAccountAssignment) {
expect(SpendingAccountAssignment.paging).toHaveBeenCalledWith(spendingAccountAssignUserCtrl.spendingAccount.ID, spendingAccountAssignUserCtrl.list, spendingAccountAssignUserCtrl.assignments, 'User');
}));
});
});
describe('Factory: SpendingAccountAssignment', function(){
var spendingAccountAssignment, sampleList, assignments;
beforeEach(inject(function(SpendingAccountAssignment, Assignments, $state){
spendingAccountAssignment = SpendingAccountAssignment;
sampleList = [{ID: 1, selected: true}, {ID: 2, selected: false}, {ID: 3}];
assignments = Assignments;
spyOn($state, 'reload').and.returnValue(true);
}));
it('getAssigned should return a list of IDs', function() {
var result = assignments.getAssigned(sampleList, 'ID');
expect(result).toEqual([1, 2, 3]);
});
it('getSelected should return a list of IDs that also have selected set to true', function() {
var result = assignments.getSelected(sampleList, 'ID');
expect(result).toEqual([1]);
});
it('getUnselected should return a list of IDs where selected is false or undefined', function() {
var result = assignments.getUnselected(sampleList, 'ID');
expect(result).toEqual([2, 3]);
});
it('getToAssign should return a list of IDs that are different between the two lists', function() {
var result = assignments.getToAssign(sampleList, [], 'ID');
expect(result).toEqual([1]);
});
it('getToDelete should return a list of IDs that are the same between the two lists', function() {
var result = assignments.getToDelete(sampleList, [{ID: 2}], 'ID');
expect(result).toEqual([2]);
});
describe('saveAssignments', function() {
var state,
saveFunc,
deleteFunc,
saveCount, deleteCount;
beforeEach(inject(function($state) {
state = $state;
saveCount = deleteCount = 0;
saveFunc = function() {
saveCount++;
};
deleteFunc = function() {
deleteCount++;
};
assignments.saveAssignments(
[{ID: 1, selected: true}, {ID: 2, selected: true}, {ID: 3, selected: false}, {ID: 4, selected: false}],
[{ID: 3}, {ID: 4}],
saveFunc, deleteFunc, 'ID');
scope.$digest();
}));
it('should call the saveFunc twice', function() {
expect(saveCount).toBe(2);
});
it('should call the deleteFunc twice', function() {
expect(deleteCount).toBe(2);
});
it('should call the state reload function on the current state', function() {
expect(state.reload).toHaveBeenCalledWith(state.current);
});
});
});
});
| javascript |
/*
* Copyright 2014 TWO SIGMA OPEN SOURCE, LLC
*
* 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.
*/
(function() {
'use strict';
var module = angular.module('bk.notebook');
module.directive('bkCellTooltip', function(bkUtils) {
return {
restrict: 'E',
template: JST["mainapp/components/notebook/celltooltip"](),
scope: {
editor: '='
},
controller: function($scope) {
},
link: function(scope, element, attrs) {
var tooltip = element.find('.bkcelltooltip');
///handle showTooltip event//////////////////////
scope.$on('showTooltip', function(event, doc) {
showTooltip(doc);
});
function showTooltip(doc) {
bindEvents();
tooltip.empty();
var html;
if (doc.ansiHtml) {
html = ansi_up.ansi_to_html(doc.ansiHtml, {use_classes: true});
} else if (doc.text) {
html = doc.text;
}
if (html) {
tooltip.html(html);
tooltip.addClass('bkcelltooltip-open');
adjustTooltipPosition();
}
}
function hideTooltip() {
unbindEvents();
tooltip.removeClass('bkcelltooltip-open');
}
function adjustTooltipPosition() {
var jqEditor = $(scope.editor.getWrapperElement());
var cmPosition = jqEditor.position();
var position = scope.editor.cursorCoords(true, 'local');
var vMargins = jqEditor.outerHeight(true) - jqEditor.height();
var hMargins = jqEditor.outerWidth(true) - jqEditor.width();
var left = (cmPosition.left + position.left + hMargins);
var top = (cmPosition.top + position.bottom + vMargins);
tooltip.css('position', 'absolute');
tooltip.css('top', top);
tooltip.css('left', left);
}
function shouldHideTooltip(clickEventElement) {
return tooltipIsOpen() && !tooltip.is(clickEventElement) &&
tooltip.has(clickEventElement).length === 0;
}
function tooltipIsOpen() {
return tooltip.hasClass('bkcelltooltip-open');
}
var mouseDownHandler = function(e) {
if (shouldHideTooltip(e.target)) {
hideTooltip();
}
};
var resizeHandler = function() {
if (tooltipIsOpen()) {
adjustTooltipPosition();
}
};
var editorChangeHandler = function() {
if (tooltipIsOpen()) {
hideTooltip();
}
};
var escapeKeyBind = function(evt) {
if (evt.which === 27 && tooltipIsOpen()) {
hideTooltip();
}
};
function bindEvents() {
//handle document mousedown to close tooltip
$(window).on('mousedown', mouseDownHandler);
//adjust tooltip position on window resize
$(window).resize(resizeHandler);
//close tooltip on esc
$(window).on('keydown', escapeKeyBind);
//hide tooltip on typing in editor
scope.editor.on('change', editorChangeHandler);
}
function unbindEvents() {
$(window).off('resize', resizeHandler);
$(window).off('mousedown', mouseDownHandler);
$(window).off('keydown', escapeKeyBind);
if(scope.editor){
scope.editor.off('change', editorChangeHandler);
}
}
scope.$on('$destroy', function() {
unbindEvents();
});
}
};
});
})(); | javascript |
In this Naam film, M. G. Ramachandran, V.N. Janaki played the primary leads.
The Naam was released in theaters on 03 Mar 1953.
Movies like Demonte Colony 2, Vidaamuyarchi, Thangalaan and others in a similar vein had the same genre but quite different stories.
The soundtracks and background music were composed by Chidambaram Jayaram for the movie Naam.
The movie Naam belonged to the Drama, genre.
| english |
{"h":[{"d":[{"e":["`Mingidipan~ `ira~ `kora~ `kaying~.他偷看那個小姐了。。O"],"f":"把…偷看了、窺視了。"},{"e":["`ci~`nira~ `ko~ `mingidipan~ `iso~ `inacila~ `han~?昨天你偷看的是他嗎?"],"f":"指所偷看的、窺視的(對象)"}]}],"stem":"ngidip","t":"mingidipan"} | json |
package com.test.demo.controller;
import com.test.demo.common.Invoke;
import com.test.demo.common.JsonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
@RestController
@RequestMapping("/api/action")
public class ActionController {
@GetMapping("methods")
public JsonResult getAllMethods(){
Class c= Invoke.class;
Method[] methods=c.getDeclaredMethods();
List<String> methodList=new ArrayList<>();
for(Method m:methods){
methodList.add(m.getName());
}
return JsonResult.success(methodList);
}
}
| java |
<filename>WebContent/css/ladder_level_choose.css
.radio-custom,
.checkbox-custom {
margin-left: -20px;
}
.radio-custom input[type=radio],
.checkbox-custom input[type=checkbox] {
position: absolute;
left: -9999em;
}
.radio-custom>i:before,
.checkbox-custom>i:before {
font-size: 1.333em;
vertical-align: -10%;
margin-left: 0;
margin-right: 4px;
color: #ddd;
}
.radio-custom>i.checked:before,
.checkbox-custom>i.checked:before {
color: #92cf5c;
}
.radio-custom>i.disabled:before,
.checkbox-custom>i.disabled:before {
color: #eee;
}
.radio-custom>i.checked:before {
content: '\f111';
}
.checkbox-custom>i.checked:before {
content: '\f046';
}
.spinner .input-group-btn {
display: table-cell;
min-width: 25px;
}
.spinner .input-group-btn .btn {
width: 25px;
padding: 0;
font-size: 12px;
margin-left: -1px;
line-height: 1;
height: 17px;
overflow: hidden;
border-radius: 0 4px 0 0 !important;
}
.spinner .input-group-btn .btn+.btn {
height: 18px;
border-radius: 0 0 4px 0 !important;
}
.spinner .input-sm+.input-group-btn .btn {
font-size: 10px;
height: 15px;
}
.spinner .input-sm+.input-group-btn .btn+.btn {
height: 16px;
}
.select {
position: relative;
display: inline-block;
}
.pillbox {
border: 1px solid #e0e4e8;
padding: 10px;
border-radius: 4px;
}
.pillbox ul {
margin: 0;
padding: 0;
list-style: none;
}
.pillbox li {
display: inline-block;
font-size: 12px;
color: #fff;
padding: 6px 8px;
cursor: pointer;
margin: 2px;
float: left;
}
.pillbox li:after {
content: " x";
font-size: 11px;
font-weight: normal;
opacity: 0.6;
filter: alpha(opacity=60);
}
.pillbox li:hover:after {
opacity: 0.9;
filter: alpha(opacity=90);
}
.pillbox input {
border: none;
outline: 0;
padding: 2px;
min-height: 20px;
width: auto;
display: inline-block;
box-shadow: none;
background: transparent;
}
.datagrid tfoot th {
font-weight: normal;
}
.datagrid tfoot .grid-pager .combobox {
max-width: 80px;
position: relative;
top: 10px;
}
.datagrid tfoot .dropdown-menu {
min-width: 60px;
text-align: left;
}
.datagrid tbody {
height: 256px;
overflow: hidden;
overflow-y: auto;
}
#selectTextSize {
position: absolute;
top: 0;
display: none;
visibility: hidden;
}
.wizard {
font-size: 14px;
padding: 0;
background-color: #f7f8f9;
border-bottom: 1px solid #ebeff6;
}
.step-content {
padding: 15px;
}
.wizard .badge {
margin-right: 4px;
}
.wizard ul li.complete,
.wizard ul li.complete:hover {
cursor: pointer;
background: #f1f5f9;
}
.wizard ul li.complete:after {
border-left-color: #f1f5f9;
}
.wizard ul {
padding: 0;
margin: 0;
list-style: none outside none;
}
.wizard ul li {
position: relative;
float: left;
padding: 0 15px 0 25px;
margin: 0;
color: #999999;
cursor: pointer;
height: 40px;
line-height: 40px;
}
.wizard.wizard-vertical {
float: left;
border-bottom: none;
}
.wizard.wizard-vertical+.step-content {
zoom: 1;
overflow: hidden;
padding-left: 40px;
}
.wizard.wizard-vertical ul li {
position: relative;
float: none;
border-bottom: 1px solid #e0e4e8;
padding-left: 15px;
}
.wizard ul li:first-child {
padding-left: 15px;
border-radius: 4px 0 0 0;
}
.wizard .actions {
float: right;
margin: 8px 10px 0 0;
}
.wizard ul li:before,
.wizard ul li:after {
content: "";
position: absolute;
right: -10px;
border: 20px solid transparent;
border-right: 0;
border-left: 10px solid #e0e4e8;
border-left-color: rgba(0, 0, 0, 0.05);
z-index: 1;
}
.wizard ul li:after {
right: -9px;
border-left-color: #f7f8f9;
z-index: 2;
}
.wizard ul li.active {
cursor: pointer;
color: #3a87ad;
background: #fff;
}
.wizard ul li.disabled {
cursor: not-allowed;
}
.wizard ul li.active:after {
border-left-color: #fff;
}
.step-content .step-pane {
display: none;
}
.step-content .step-pane.active {
display: inherit;
}
.bg-info {
background-color: #23b7e5;
color: #d9f3fb;
}
.bg-info.lter,
.bg-info .lter {
background-color: #55c3e6;
}
.wizard ol li {
cursor: pointer;
}
.wizard ol li.active {
color: #3a87ad;
background: #fff;
}
.m-md {
margin: 20px;
}
.panel {
border-radius: 2px;
}
.wrapper-xs {
padding: 5px;
}
.panel-heading {
border-radius: 2px 2px 0 0;
}
.m-n {
margin: 0 !important;
}
.m-r-xs {
margin-right: 5px;
}
.text-success {
color: #27c24c;
}
.text-md {
font-size: 16px;
}
.panel-heading .nav {
margin: -10px -15px;
}
.text-muted {
color: #99a6ad;
}
.text-active,
.active>.text,
.active>.auto .text {
display: none !important;
}
.active>.text-active,
.active>.auto .text-active {
display: inline-block !important;
}
.no-padder {
padding: 0 !important;
}
.line-lg {
margin-top: 15px;
margin-bottom: 15px;
}
.line {
width: 100%;
height: 2px;
margin: 10px 0;
font-size: 0;
overflow: hidden;
}
.panel {
border-radius: 2px;
border-color: #ebeff6;
}
.panel-heading {
border-color: #ebeff6;
background-color: #fff;
border-radius: 2px 2px 0 0;
}
.m-n {
margin: 0;
}
.h6 {
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.m-r-xs {
margin-right: 5px;
}
.text-success {
color: #92cf5c;
}
.panel-heading .nav {
font-size: 13px;
margin: -10px -15px -11px;
border: none;
}
.panel-heading .nav>li>a {
border-radius: 0;
margin: 0;
border-width: 0;
}
.text-muted {
color: #979797;
}
.text-active,
.active>.text,
.active .auto .text {
display: none !important;
}
.active>.text-active,
.active .auto .text-active {
display: inline-block !important;
}
.line-lg {
margin-top: 15px;
margin-bottom: 15px;
}
.line {
*width: 100%;
height: 2px;
margin: 10px 0;
font-size: 0;
overflow: hidden;
background-color: transparent;
border-width: 0;
border-top: 1px solid #eaedef;
}
.wizard ol li.disabled {
cursor: not-allowed;
}
.wizard ol li.active:after {
border-left-color: #fff;
} | css |
package lisp.exception;
/**
* 予期せぬ引数を表す例外
* @author sam0830
* @version 1.0
*/
@SuppressWarnings("serial")
public class ArgumentException extends LispException {
/**
* コンストラクタ
* @param msg エラーメッセージ
*/
public ArgumentException(String msg) {
super(msg);
}
}
| java |
<reponame>eharshini9/java-practice
package practice.codingbat.warm_up_2;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
public class Array667Test {
@Test
public void test_array_667() {
assertThat(Array667.array667(new int[] { 5, 6, 7 })).isEqualTo(1);
assertThat(Array667.array667(new int[] { 1, 4, 6, 6, 7, 8 })).isEqualTo(2);
assertThat(Array667.array667(new int[] { 6, 9, 6, 6, 6, 7 })).isEqualTo(3);
assertThat(Array667.array667(new int[] { 2, 5, 8, 9 })).isEqualTo(0);
}
}
| java |
CWG 2022: Gurdeep Singh continued India’s impressive campaign in the weightlifting events at the Commonwealth Games 2022 in Birmingham with a bronze medal in the men’s 109+ kg category.
The 26-year-old Gurdeep lifted a total of 390 kg including 167 in snatch and 223 kg in clean and jerk. This was the last event of weightlifting in the Games this year. This is the first medal for India in the heavyweight category of the Commonwealth Games.
Gurdeep did not start well. He lifted 167 kg in the second attempt but could not lift 173 kg in the third attempt. In clean and jerk, he started with 207 kg but failed in his second attempt of 215 kg. He lifted 223 kg in his third attempt.
Pakistan’s Muhammad Noah Butt won the gold medal with a new Commonwealth Games (CWG) record by lifting a total of 405 kg. This is Pakistan’s first gold medal in Commonwealth Games 2022. Till now Pakistan has only two medals. David Andrew of New Zealand got the silver medal with a total lift of 394 kg.
India got the maximum 10 medals in Commonwealth Games in weightlifting. It has three gold, three silver and four bronze medals. Mirabai Chanu, Jeremy Lalrinnunga and Anchita Shuli won the gold medal in this event for the country. Sanket Sargari, Bindiyarani Devi and Vikas Thakur bagged silver while Gururaja Pujari, Harjinder Kaur, Lovepreet Singh and Gurdeep Singh bagged bronze. India has 18 medals so far. | english |
/* Site CSS */
| css |
{"backbone.radio.js":"sha256-gFaXwM0a/qtQY0PZjTiWvb4isofaZHHcLoHu7iVsox0=","backbone.radio.min.js":"sha256-5gxv/CeFrYBHYoauNSbHCJhh14ZorTxx/A5oqlCMbY8="}
| json |
{
"id": 2258,
"source": "ldsces",
"verse_id": 17772,
"verse_count": 1,
"reference": "6:2",
"title": "What Are Seraphim?",
"html": " <p> <em>“Seraphs <\/em> are angels who reside in the presence of God, giving continual glory, honor, and adoration to him. ‘Praise ye him, all his angels: praise ye him, all his hosts.’ (<a class=\"ref\">Ps. 148:2<\/a>.) It is clear that seraphs include the unembodied spirits of pre-existence, for our Lord ‘looked upon the wide expanse of eternity, and <em>all the seraphic hosts of heaven, before the world was made.’ <\/em> (<a class=\"ref\">D. & C. 38:1<\/a>.) Whether the name seraphs also applies to perfected and resurrected angels is not clear. While petitioning on behalf of the saints, the Prophet prayed that ‘we may mingle our voices with those bright, shining seraphs around thy throne, with acclamations of praise, singing Hosanna to God and the Lamb!’ (<a class=\"ref\">D. & C. 109:79<\/a>.) <\/p> <p>“In Hebrew the plural of seraph is <em>seraphim <\/em> or, as incorrectly recorded in the King James Version of the Bible, <em>seraphims<\/em>. Isaiah saw seraphim in vision and heard them cry one to another ‘Holy, holy, holy, is the Lord of hosts; the whole earth is full of his glory.’ (<a class=\"ref\">JST Isa. 6:1–8<\/a>.) The fact that these holy beings were shown to him as having wings was simply to symbolize their ‘power, to move, to act, etc.’ as was the case also in visions others had received. (<a class=\"ref\">D. & C. 77:4<\/a>.)” (<NAME>, <em><NAME>, <\/em> pp. 702–3.) <\/p> <p class=\"cite\"> LDS Church Educational System Old Testament Student Manual, 1 Kings–Malachi, Religion 302, Chapter 13, Item 34 <\/p> ",
"audit": 1
} | json |
"""
Define authorization predicates.
These are functions which accept an `Identity` object and a context object and
return a truthy value. These represent building blocks of our permission map
which define when people do, or don't have permissions.
For example a predicate might define "group_created_by_user" which is only
true when a user is present, a group is present and the user created that
group.
"""
from itertools import chain
from h.models.group import JoinableBy, ReadableBy, WriteableBy
def requires(*parent_predicates):
"""
Decorate a predicate to say it requires other predicates to be True first.
:param parent_predicates: A list of predicates that have to be true for
this predicate to be true as well.
"""
def decorator(function):
function.requires = parent_predicates
return function
return decorator
# Identity things
def authenticated(identity, _context):
return identity
# The `@requires` here means that this predicate needs `authenticate` to be
# True before it's True. It also avoids attribute errors if identity is None
@requires(authenticated)
def authenticated_user(identity, _context):
return identity.user
@requires(authenticated_user)
def user_is_staff(identity, _context):
return identity.user.staff
@requires(authenticated_user)
def user_is_admin(identity, _context):
return identity.user.admin
@requires(authenticated)
def authenticated_client(identity, _context):
return identity.auth_client
@requires(authenticated_client)
def authenticated_client_is_lms(identity, _context):
authority = identity.auth_client.authority
return authority.startswith("lms.") and authority.endswith(".hypothes.is")
# Users
def user_found(_identity, context):
return hasattr(context, "user") and context.user
@requires(authenticated_client, user_found)
def user_authority_matches_authenticated_client(identity, context):
return context.user.authority == identity.auth_client.authority
# Annotations
def annotation_found(_identity, context):
return hasattr(context, "annotation") and context.annotation
@requires(annotation_found)
def annotation_shared(_identity, context):
return context.annotation.shared
@requires(annotation_found)
def annotation_not_shared(_identity, context):
return not context.annotation.shared
@requires(annotation_found)
def annotation_live(_identity, context):
return not context.annotation.deleted
@requires(authenticated_user, annotation_found)
def annotation_created_by_user(identity, context):
return identity.user.userid == context.annotation.userid
# Groups
def group_found(_identity, context):
return hasattr(context, "group") and context.group
def group_not_found(_identity, context):
return not hasattr(context, "group") or not context.group
@requires(group_found)
def group_writable_by_members(_identity, context):
return context.group.writeable_by == WriteableBy.members
@requires(group_found)
def group_writable_by_authority(_identity, context):
return context.group.writeable_by == WriteableBy.authority
@requires(group_found)
def group_readable_by_world(_identity, context):
return context.group.readable_by == ReadableBy.world
@requires(group_found)
def group_readable_by_members(_identity, context):
return context.group.readable_by == ReadableBy.members
@requires(group_found)
def group_joinable_by_authority(_identity, context):
return context.group.joinable_by == JoinableBy.authority
@requires(authenticated_user, group_found)
def group_created_by_user(identity, context):
return context.group.creator and context.group.creator.id == identity.user.id
@requires(authenticated_user, group_found)
def group_has_user_as_member(identity, context):
# With detached groups like we have with the websocket, this doesn't work
# as SQLAlchemy does not consider them equal:
# return context.group in identity.user.groups
return any(user_group.id == context.group.id for user_group in identity.user.groups)
@requires(authenticated_user, group_found)
def group_matches_user_authority(identity, context):
return context.group.authority == identity.user.authority
@requires(authenticated_client, group_found)
def group_matches_authenticated_client_authority(identity, context):
return context.group.authority == identity.auth_client.authority
def resolve_predicates(mapping):
"""
Expand predicates with requirements into concrete lists of predicates.
This takes a permission map which contains predicates which reference
other ones (using `@requires`), and converts each clause to include the
parents in parent first order. This means any parent which is referred to
by a predicate is executed before it, and no predicate appears more than once.
"""
return {
key: [_expand_clause(clause) for clause in clauses]
for key, clauses in mapping.items()
}
def _expand_clause(clause):
"""Generate all of the predicates + parents in a clause without dupes."""
seen_before = set()
# The chain.from_iterable here flattens nested iterables
return list(
chain.from_iterable(
_expand_predicate(predicate, seen_before) for predicate in clause
)
)
def _expand_predicate(predicate, seen_before):
"""Generate all of the parents and the predicate in parents first order."""
if hasattr(predicate, "requires"):
for parent in predicate.requires:
yield from _expand_predicate(parent, seen_before)
if predicate not in seen_before:
seen_before.add(predicate)
yield predicate
| python |
version https://git-lfs.github.com/spec/v1
oid sha256:0f1e34231857d643bfe50584d5eaf98a2dacbaf328b4aa7771613bfcafd1fc04
size 13023
| json |
{
"_id": "page._application-nomis-number",
"_type": "page.singlequestion",
"components": [
{
"_id": "page._application-nomis-number--text.auto_name__20",
"_type": "text",
"hint": "You may know this as your NOMIS number. For example, A1234AA",
"label": "What is your prison number?",
"name": "auto_name__20"
}
],
"sectionHeading": "Application",
"url": "/application-nomis-number"
} | json |
/*
* Java Design Patterns: Visitor
* Author: <NAME> [github.com/JakubVojvoda]
* 2016
*
* Source code is licensed under MIT License
* (for more details see LICENSE)
*
*/
package app;
/*
* Visitor
* declares a Visit operation for each class of ConcreteElement
* in the object structure
*/
public interface Visitor {
public void visitElementA(ConcreteElementA element);
public void visitElementB(ConcreteElementB element);
// ...
}
| java |
JBL has taken the wraps off its latest flagship portable speaker, the JBL Flip 6, by providing some of its key features as well as its price and release date.
The latest features on JBL’s premium Bluetooth speaker include a 12-hour battery life, IP67 water and dustproof rating, and JBL’s PartyBoost feature that allows you to pair multiple speakers together to pump up the volume.
- Looking to save on the latest audio gear? Check out:
At just $129 / £129.99 (about AU$175), it seems like it’s going to be a great value and one of the summer’s must-own poolside accessories. The only problem? It’s coming out during some of North America and Europe’s coldest months – December for the US and November for Europe.
Thankfully those south of the equator will get to enjoy the speaker as soon as it comes out, as that’s right around the time temperatures start to rise, but everyone else will have to wait a few months to test their new speakers out by the water.
Alongside the JBL Flip 6, JBL is also announcing two other speakers: the PartyBox 110 and PartyBox 710.
Somewhere in between a portable speaker and a straight-up loud speaker, the PartyBox series amps up the wattage of the speakers and doubles the amount of drivers. Inside the PartyBox 710 you’ve got two low distortion tweeters, two 8” excursion drivers and an improved bass reflex port. The PartyBox 110 isn’t quite as well-equipped as the 710 model, but with 160W of power, it should be more than enough to keep your guests entertained.
The other good news? You won’t have to wait nearly as long for them.
The JBL PartyBox 110 is available now for $399 / £299.99 (about AU$540) while the JBL PartyBox 710 hits store shelves on November 14 in the US and drops in October for Europe. At $799 / £699.99 (about AU$1,000), the JBL PartyBox 710 won’t be cheap, but it will definitely make a splash at your next outdoor party... you know, sometime in the next six to eight months depending on where in North America or Europe you live.
Get the hottest deals available in your inbox plus news, reviews, opinion, analysis, deals and more from the TechRadar team.
Nick Pino is Managing Editor, TV and AV for TechRadar's sister site, Tom's Guide. Previously, he was the Senior Editor of Home Entertainment at TechRadar, covering TVs, headphones, speakers, video games, VR and streaming devices. He's also written for GamesRadar+, Official Xbox Magazine, PC Gamer and other outlets over the last decade, and he has a degree in computer science he's not using if anyone wants it.
| english |
The report says in India, 45 per cent of urban centres are classified as moderately green or above. Find out more here:
Heatwave is putting Delhi's population at risk.
New Delhi: Warning that health is at the mercy of fossil fuels, from 2000-2004 to 2017-2021 heat-related deaths increased by 55 per cent in India, the 2022 Lancet Countdown report said on Wednesday.
Improvements in air quality will help to prevent deaths. In 2020, over 330,000 people died in India due to exposure to particulate matter from fossil fuel combustion.
In the run-up to the UN Climate Conference in Egypt (COP27), the new findings presented in the seventh annual global report of the Lancet Countdown on Health and Climate Change reveals that governments and companies continue to follow strategies that increasingly threaten the health and survival of all people alive today, and of future generations.
The report says in India, 45 per cent of urban centres are classified as moderately green or above.
Urban redesign that puts health first can provide increased greenspace that reduces urban heat, improve air quality, and benefit physical and mental health.
However, the Indian media coverage of health and climate change increased by 27 per cent between 2020 and 2021.
The report says climate change is amplifying the health impacts of multiple crises in India. The duration of the growth season for maize has decreased by two per cent, compared to a 1981-2010 baseline, while rice and winter wheat have each decreased by one per cent.
From 2012-2021, infants under one year old experienced an average of 72 million more person-days of heatwave s per year, compared to 1985-2005. For the same period, adults over 65 experienced 301 million more person-days. This means that, on average, from 2012-2021, each infant experienced an additional 0. 9 heatwave days per year, while adults over 65 experienced an additional 3. 7 per person, compared to 1986-2021.
In 2021, Indians lost 167. 2 billion potential labour hours due to heat exposure with income losses equivalent to about 5. 4 per cent of the national GDP.
From 1951-1960 to 2012-2021, the number of months suitable for dengue transmission by Aedes aegypti rose by 1. 69 per cent, reaching 5. 6 months each year.
Governments and companies continue to prioritise fossil fuels to the detriment of people's health. In 2019, India had a net negative carbon price, indicating that the government was effectively subsidising fossil fuels.
Biomass accounted for 61 per cent of household energy in 2019, while fossil fuels accounted for another 20 per cent. With this high reliance on dirty fuels, average household concentrations of particulate matter exceeded the WHO recommendation by 27-fold nationally and 35-fold in rural homes.
Globally, the fossil fuels continue to be prioritised over clean energy solutions by governments and companies to the detriment of health.
The vast majority of countries analysed still collectively allocate hundreds of billions of US dollars to subsidising fossil fuels -- this often amounts to sums comparable or even greater than the amount set aside in their total health budgets.
The current strategies of fossil fuel giants threaten a liveable future and would lead to emissions exceeding international climate targets to minimise global warming .
As countries devise responses to these crises, a renewed dependence on fossil fuels could lock in a fatally warmer future. However, a health-centred response can still deliver a thriving future if immediate action is taken.
Accelerating the transition to clean energy and energy efficiency will help prevent further increases in climate change-related death and disease and deliver rapid health benefits through improved energy access and security, cleaner air, healthier diets and lifestyles, and more liveable cities, adds the report.
"Our report this year reveals we are at a critical juncture. We see how climate change is driving severe health impacts all around the world, while the persistent global fossil fuel dependence compounds these health harms amidst multiple global crises, keeping households vulnerable to volatile fossil fuel markets, exposed to energy poverty, and dangerous levels of air pollution," says Marina Romanello, Executive Director of the Lancet Countdown at the University College London.
The seventh Lancet Countdown report represents the work of 99 experts from 51 institutions, including the World Health Organization (WHO) and the World Meteorological Organization (WMO), and is led by University College London.
It publishes ahead of the COP27, presenting 43 indicators that include new and improved metrics that monitor the impact of extreme temperature on food insecurity, household air pollution, and the alignment of the fossil fuel industry with a healthy future.
Woman Proposes To Boyfriend In Front Of Kedarnath Temple In Viral Video, Netizens Are Livid. Here's Why! | english |
<reponame>arzg/syntax-rust<filename>src/lexer.rs
use logos::Logos;
pub(crate) fn lex(s: &str) -> Vec<Token> {
let mut tokens: Vec<_> = TokenKind::lexer(s)
.spanned()
.map(|(kind, range)| Token { kind, range })
.collect();
tokens.reverse();
tokens
}
#[derive(Debug, PartialEq)]
pub(crate) struct Token {
pub(crate) kind: TokenKind,
pub(crate) range: std::ops::Range<usize>,
}
#[derive(Debug, PartialEq, Logos)]
pub(crate) enum TokenKind {
#[token("fn")]
Fn,
#[token("struct")]
Struct,
#[token("trait")]
Trait,
#[token("let")]
Let,
#[regex("_?[A-Z][A-Za-z0-9]*")]
TypeIdent,
#[regex("_?[a-z][a-z0-9_]*")]
Ident,
#[regex("'_?[a-z][a-z0-9_]*")]
TickIdent,
#[token("(")]
OpenParen,
#[token(")")]
CloseParen,
#[token("{")]
OpenBrace,
#[token("}")]
CloseBrace,
#[token("=")]
Equals,
#[token(";")]
Semi,
#[token(",")]
Comma,
#[token("::")]
DoubleColon,
#[token("->")]
ThinArrow,
#[error]
#[regex("[ \t\n\r]", logos::skip)]
Error,
}
#[cfg(test)]
mod tests {
use super::*;
use pretty_assertions::{assert_eq, assert_ne};
#[test]
fn lexes_nothing() {
assert_eq!(TokenKind::lexer("").count(), 0);
}
#[test]
fn skips_spaces() {
assert_eq!(TokenKind::lexer(" ").count(), 0);
}
#[test]
fn skips_tabs() {
assert_eq!(TokenKind::lexer("\t\t\t").count(), 0);
}
#[test]
fn skips_line_feeds() {
assert_eq!(TokenKind::lexer("\n\n\n\n").count(), 0);
}
#[test]
fn skips_carriage_returns() {
assert_eq!(TokenKind::lexer("\r\r").count(), 0);
}
#[test]
fn lexes_fn() {
let mut lexer = TokenKind::lexer("fn");
assert_eq!(lexer.next(), Some(TokenKind::Fn));
assert_eq!(lexer.slice(), "fn");
}
#[test]
fn lexes_struct() {
let mut lexer = TokenKind::lexer("struct");
assert_eq!(lexer.next(), Some(TokenKind::Struct));
assert_eq!(lexer.slice(), "struct");
}
#[test]
fn lexes_trait() {
let mut lexer = TokenKind::lexer("trait");
assert_eq!(lexer.next(), Some(TokenKind::Trait));
assert_eq!(lexer.slice(), "trait");
}
#[test]
fn lexes_let() {
let mut lexer = TokenKind::lexer("let");
assert_eq!(lexer.next(), Some(TokenKind::Let));
assert_eq!(lexer.slice(), "let");
}
#[test]
fn types_are_pascal_case() {
let mut lexer = TokenKind::lexer("PascalCase123");
assert_eq!(lexer.next(), Some(TokenKind::TypeIdent));
assert_eq!(lexer.slice(), "PascalCase123");
}
#[test]
fn types_cannot_start_with_number() {
assert_ne!(
TokenKind::lexer("123NotAType").next(),
Some(TokenKind::TypeIdent)
);
}
#[test]
fn types_can_start_with_an_underscore() {
let mut lexer = TokenKind::lexer("_Unused123Type");
assert_eq!(lexer.next(), Some(TokenKind::TypeIdent));
assert_eq!(lexer.slice(), "_Unused123Type");
}
#[test]
fn idents_are_snake_case() {
let mut lexer = TokenKind::lexer("snake_123_case");
assert_eq!(lexer.next(), Some(TokenKind::Ident));
assert_eq!(lexer.slice(), "snake_123_case");
}
#[test]
fn idents_cannot_start_with_number() {
assert_ne!(TokenKind::lexer("123ident").next(), Some(TokenKind::Ident));
}
#[test]
fn idents_can_start_with_an_underscore() {
let mut lexer = TokenKind::lexer("_unused_ident");
assert_eq!(lexer.next(), Some(TokenKind::Ident));
assert_eq!(lexer.slice(), "_unused_ident");
}
#[test]
fn lifetimes_are_snake_case_with_quote() {
let mut lexer = TokenKind::lexer("'snake_case");
assert_eq!(lexer.next(), Some(TokenKind::TickIdent));
assert_eq!(lexer.slice(), "'snake_case");
}
#[test]
fn lifetimes_cannot_start_with_number() {
assert_ne!(
TokenKind::lexer("'123lifetime").next(),
Some(TokenKind::TickIdent)
);
}
#[test]
fn lifetimes_can_start_with_an_underscore() {
let mut lexer = TokenKind::lexer("'_unused_lifetime");
assert_eq!(lexer.next(), Some(TokenKind::TickIdent));
assert_eq!(lexer.slice(), "'_unused_lifetime");
}
#[test]
fn lexes_open_paren() {
let mut lexer = TokenKind::lexer("(");
assert_eq!(lexer.next(), Some(TokenKind::OpenParen));
assert_eq!(lexer.slice(), "(");
}
#[test]
fn lexes_close_paren() {
let mut lexer = TokenKind::lexer(")");
assert_eq!(lexer.next(), Some(TokenKind::CloseParen));
assert_eq!(lexer.slice(), ")");
}
#[test]
fn lexes_open_brace() {
let mut lexer = TokenKind::lexer("{");
assert_eq!(lexer.next(), Some(TokenKind::OpenBrace));
assert_eq!(lexer.slice(), "{");
}
#[test]
fn lexes_close_brace() {
let mut lexer = TokenKind::lexer("}");
assert_eq!(lexer.next(), Some(TokenKind::CloseBrace));
assert_eq!(lexer.slice(), "}");
}
#[test]
fn lexes_equals() {
let mut lexer = TokenKind::lexer("=");
assert_eq!(lexer.next(), Some(TokenKind::Equals));
assert_eq!(lexer.slice(), "=");
}
#[test]
fn lexes_semicolon() {
let mut lexer = TokenKind::lexer(";");
assert_eq!(lexer.next(), Some(TokenKind::Semi));
assert_eq!(lexer.slice(), ";");
}
#[test]
fn lexes_comma() {
let mut lexer = TokenKind::lexer(",");
assert_eq!(lexer.next(), Some(TokenKind::Comma));
assert_eq!(lexer.slice(), ",");
}
#[test]
fn lexes_double_colon() {
let mut lexer = TokenKind::lexer("::");
assert_eq!(lexer.next(), Some(TokenKind::DoubleColon));
assert_eq!(lexer.slice(), "::");
}
#[test]
fn lexes_thin_arrow() {
let mut lexer = TokenKind::lexer("->");
assert_eq!(lexer.next(), Some(TokenKind::ThinArrow));
assert_eq!(lexer.slice(), "->");
}
}
| rust |
<reponame>retailerwebservices/core<gh_stars>1-10
package org.jimmutable.cloud.elasticsearch;
import org.jimmutable.core.objects.StandardEnum;
import org.jimmutable.core.utils.Normalizer;
import org.jimmutable.core.utils.Validator;
/**
* Search index field datatypes
*
* @author trevorbox
*
*/
public enum SearchIndexFieldType implements StandardEnum
{
ATOM("atom", "keyword"),
TEXT("text", "text"),
LONG("long", "long"),
BOOLEAN("boolean", "boolean"),
FLOAT("float", "float"),
DAY("day", "date"),
INSTANT("instant", "text"),
TIMEOFDAY("timeofday", "text");
static public final MyConverter CONVERTER = new MyConverter();
private String code;
private String search_type;
private SearchIndexFieldType(String code, String search_type)
{
Validator.notNull(code);
Validator.notNull(search_type);
this.code = Normalizer.lowerCase(code);
this.search_type = Normalizer.lowerCase(search_type);
}
/**
* The enum String representation
*/
public String getSimpleCode()
{
return code;
}
/**
* The enum String representation
*/
public String toString()
{
return code;
}
public String getSimpleSearchType()
{
return search_type;
}
/**
* Used for converting Strings to SearchIndexFieldType
*
* @author trevorbox
*
*/
static public class MyConverter extends StandardEnum.Converter<SearchIndexFieldType>
{
public SearchIndexFieldType fromCode(String code, SearchIndexFieldType default_value)
{
if (code == null)
return default_value;
for (SearchIndexFieldType t : SearchIndexFieldType.values())
{
if (t.getSimpleCode().equalsIgnoreCase(code))
return t;
if (t.getSimpleSearchType().equalsIgnoreCase(code))
return t;
}
return default_value;
}
}
}
| java |
The Tokyo 2020 Olympics kicked off on Friday with an unusual but highly anticipated opening ceremony that featured a familiar face.
Much to the internet's delight, Pita Taufatofua — the man who marched shirtless, covered in oil, in traditional Tongan attire during the Rio 2016 Olympics and PyeongChang 2018 Winter Olympics opening ceremonies — was seen once again carrying the Tongan flag.
Taufatofua, who's also a Taekwondo practitioner and skier, captured hearts around the world while carrying Tonga's flag the past two Olympics, so seeing him march a third time — especially after COVID-19 prompted a delay in the games — really excited faithful Olympics fans.
Taufatofua was instantly recognizable to viewers (even with his mask on, for obvious reasons) and it wasn't long until Twitter was flooded with praise for his triumphant return.
This year, however, it seems Taufatofua had a little competition from Vanuatu's flagbearer, who was also shirtless and well-oiled.
We see you, Vanuatu. And while this flagbearer will never be the GOAT shirtless oily man, imitation is supposed to be a form of flattery, right?
As for the beloved Tonga flagbearer's return, the official Olympics Twitter account commented by saying, "If it ain't broke, don't fix it." We agree. Please do not fix.
Much like lighting the torch, Pita is now officially an Olympic tradition. Protect him at all costs.
| english |
With the emergence of All Elite Wrestling (AEW), things have significantly changed for WWE. Many top Superstars are leaving the company for AEW while increasing tension for Vince McMahon.
Vince is ruling the wrestling world since the 1900s and has gained tons of experience handling these types of situations. Many promotions tried to surpass WWE as the biggest wrestling company, but they all failed. The chairman of the board made major changes to his product according to fans’ taste which led to WWE’s major success.
Over the past few years, WWE experienced declining viewership and severe backlash from fans because of their product and the McMahon family has to make several changes to WWE’s product to match fans’ demands. Let’s look at 5 transformations WWE should make to ensure they stay at the top.
Also read: 5 released WWE Superstars Vince McMahon should bring back soon.
NXT has played a pivotal role in WWE's success. Many of the current top Superstars were once a part of this brand. NXT is a developmental brand, but the show provides quality content every week.
Some fans have also pitched the idea of making it a leading brand like Raw and SmackDown. Being a producer, Triple H is doing his job correctly, and if NXT becomes WWE’s third brand, then it would enhance their overall product. A television deal would also ensure more viewers, and thus, more money.
No official news regarding this has been made yet Triple H, in 2018, said this:
"To your point, the landscape of the world changes on a regular basis, whether that be cable live television, broadcast television, networks, OTT services and everything else, it's changing on a daily basis. My point of view on that would be, 'never say never.'
NXT has already produced several 5-star matches in recent times and it would be great if more fans get the oppourtunity to see these bouts at their home.
Speaking to CNBC’s Elizabeth Schulze, in 2018, Stephanie McMahon said this about WWE’s future:
To surpass Disney, WWE has to connect with every portion of the world. Most of their pay-per-views happen inside the USA but this needs to change, and WWE should do shows in every major country as a few live events every year aren't enough to increase WWE’s global fanbase.
Countries such as Mexico, India, and Japan have a strong following of wrestling, but WWE doesn’t do many shows here. The company should hosts major pay-per-views in these countries to increase their fan following.
Over the years, WWE shows have only gotten lengthier. Fans have also complained about this, but WWE didn't listen to them, probably because to have more talent present on their shows. This year, many fans proposed the idea of having a 2-day WrestleMania. It was a great idea, but WWE didn’t capitalize on it.
A 2-day WWE show would allow them to have every major talent on the show, without fans getting tired. This little step could change WWE’s current environment where fans complain about the length of their shows.
WWE pay-per-views happen on Sunday every month, but with a 2-day event plan, the company could do a mini-show on Saturday and finish the rest of it on the following. At first, WWE could apply this scheme on their major shows only and then on their other events. Nevertheless, they could also make it limited to WrestleMania only.
Young talents are the real kingpins of WWE, yet the company focuses more on part-time Superstars. While it’s good to feel the nostalgia when a legend returns, it is also taking the spotlight away from deserving talents.
Brock Lesnar remained in the Universal Championship picture for almost two years, without benefiting the product. He lost the title at WrestleMania 35 but could return at any moment. Not everyone could beat legends like Lesnar, and it is where deserving talents have to suffer. Despite being one of the most popular Superstars in WWE, Braun Strowman lost multiple times against Lesnar.
Recently, The Undertaker also returned to WWE and reportedly will face Elias in Saudi Arabia, and the chances are that the guitarist will lose against The Deadman, which will hurt him. The point is that WWE should focus more on younger talents than Superstars of the past.
Over the past few months, several top Superstars have walked away from WWE. Recently, Dean Ambrose left and now, Sasha Banks, too, is upset with them.
Shinsuke Nakamura, Asuka, and Rusev are also a few names that WWE wasted in recent times. These Superstars were over with the fans, yet the WWE didn’t capitalize on the situation. If things remain the same as they are right now, then these Superstars, too, could quit WWE.
Instead of filling more talents to the roster, WWE should focus on using the existing ones correctly. WWE has already lost many potential Superstars to their competition, and it is crucial that they keep their employees happy. WWE could also send these talents to NXT where Triple H could book them correctly. If NXT gets a television deal, then it will also help to eliminate the problem of Superstars leaving WWE.
| english |
<gh_stars>0
export interface MessageFormatterInterface {
/**
* error()
*
* formats an error message.
* @param message the message to format.
*/
error(message: string): string;
/**
* info()
*
* formats an info message.
* @param message the message to format.
*/
info(message: string): string;
} | typescript |
Ronald Koeman believes his first campaign in charge of Barcelona can be considered a positive one and is confident he will still be in charge next season.
Barca beat Eibar 1-0 in their final La Liga game of the campaign on Saturday to finish third, five points behind Real Madrid and seven adrift of champions Atletico Madrid.
The Catalans also exited the Champions League to Paris Saint-Germain at the last-16 stage, as well as losing to Athletic Bilbao in January’s Supercopa de Espana.
Koeman’s side did exact revenge by beating Athletic in last month’s Copa del Rey final, though, and the Dutchman feels that trophy has salvaged this season.
“We have won many points in the league since the start of 2021 and won the cup in a brilliant way,” Koeman said after the late win at Ipurua, DPA reports.
“If you’d told me in August we’d win a trophy and be fighting for La Liga with two or three games to go, I would sign for it.
The 79 points collected by Koeman is the fewest of any Barcelona boss in their first 38 league games since Frank Rijkaard (72) in 2003-04.
This is the first season Barca have finished outside the top two since 2007-08 and the only time they have gone successive seasons without finishing top since between 2006 and 2008.
But Koeman, who hinted at a lack of support from those above him at his pre-match news conference, insists he is still at the start of a long-term process in Catalonia despite reports suggesting he will be replaced in the close season.
“Many at the club agree with this. We are trying to improve the squad. There are older players, with all due respect, who can still give a lot.
Barca were heading for a goalless draw with Eibar before Antoine Griezmann fired in an impressive acrobatic winner nine minutes from time.
And like his head coach, Griezmann hopes Barca can strengthen their squad during the close season.
“We are hurting after missing out on the title. We have failed in some important games and have to rest and see where we can improve for next year,” he told Movistar. | english |
{"french institute for research in computer science and automation": {"Citation Count": 9.602564102564102, "Publication Count": 2.9871794871794872}, "universite paris saclay": {"Citation Count": 2.6666666666666665, "Publication Count": 0.3333333333333333}, "microsoft": {"Citation Count": 1.9230769230769231, "Publication Count": 0.6346153846153846}, "massachusetts institute of technology": {"Citation Count": 0.38461538461538464, "Publication Count": 0.07692307692307693}, "university of colorado boulder": {"Citation Count": 0.38461538461538464, "Publication Count": 0.07692307692307693}, "national scientific and technical research council": {"Citation Count": 0.38461538461538464, "Publication Count": 0.07692307692307693}, "princeton university": {"Citation Count": 0.7692307692307693, "Publication Count": 0.15384615384615385}, "university of ljubljana": {"Citation Count": 0.38461538461538464, "Publication Count": 0.07692307692307693}, "radboud university nijmegen": {"Citation Count": 0.0, "Publication Count": 1.1666666666666665}, "delft university of technology": {"Citation Count": 0.0, "Publication Count": 0.3333333333333333}, "drexel university": {"Citation Count": 1.0, "Publication Count": 1.0}, "university of oregon": {"Citation Count": 0.0, "Publication Count": 0.75}, "university of kent": {"Citation Count": 1.875, "Publication Count": 0.7083333333333333}, "university of pennsylvania": {"Citation Count": 0.0, "Publication Count": 0.3333333333333333}, "university of bristol": {"Citation Count": 0.0, "Publication Count": 0.3333333333333333}, "harvard university": {"Citation Count": 0.0, "Publication Count": 0.3333333333333333}, "university of cambridge": {"Citation Count": 4.5, "Publication Count": 1.5}, "university of bologna": {"Citation Count": 3.5, "Publication Count": 0.5}, "university of verona": {"Citation Count": 4.0, "Publication Count": 1.0}, "imperial college london": {"Citation Count": 2.75, "Publication Count": 0.75}, "kyoto university": {"Citation Count": 1.5, "Publication Count": 0.5}, "national institute of informatics": {"Citation Count": 1.5, "Publication Count": 0.5}, "university of hong kong": {"Citation Count": 2.25, "Publication Count": 0.75}, "katholieke universiteit leuven": {"Citation Count": 0.75, "Publication Count": 0.25}, "ecole polytechnique": {"Citation Count": 11.0, "Publication Count": 1.0}, "stanford university": {"Citation Count": 8.0, "Publication Count": 0.5}, "max planck society": {"Citation Count": 8.0, "Publication Count": 0.5}, "university of rennes": {"Citation Count": 4.0, "Publication Count": 1.0}, "university of cagliari": {"Citation Count": 0.625, "Publication Count": 0.125}, "university of lisbon": {"Citation Count": 1.25, "Publication Count": 0.25}, "universidade nova de lisboa": {"Citation Count": 4.0, "Publication Count": 0.3333333333333333}, "carnegie mellon university": {"Citation Count": 8.0, "Publication Count": 0.6666666666666666}, "university of tokyo": {"Citation Count": 0.0, "Publication Count": 1.0}, "commonwealth scientific and industrial research organisation": {"Citation Count": 0.6666666666666666, "Publication Count": 0.6666666666666666}, "university of new south wales": {"Citation Count": 0.3333333333333333, "Publication Count": 0.3333333333333333}, "indian institute of science": {"Citation Count": 3.0, "Publication Count": 1.0}, "institut universitaire de france": {"Citation Count": 0.5, "Publication Count": 0.5}, "university of paris": {"Citation Count": 0.5, "Publication Count": 0.5}, "birkbeck university of london": {"Citation Count": 0.0, "Publication Count": 0.5}, "heriot watt university": {"Citation Count": 3.333333333333333, "Publication Count": 0.6666666666666666}, "ecole normale superieure de lyon": {"Citation Count": 1.6666666666666665, "Publication Count": 0.3333333333333333}} | json |
Thursday July 28, 2022,
According to India’s fifth National Family Health Survey, done in two phases between June 2019 and April 2021, the national caesarean section (C-section) rate was a startling 21.5%, much higher than the World Health Organisation’s 'ideal rate’ of 10-15%.
On top of this is the disparity in the number of C-section births at government hospitals and private sector facilities. While 47.4% of babies born in the private sector were being delivered by surgical methods, the C-section rate was 14.3% in the government sector.
Empowering women and raising awareness about the benefits of normal childbirth and the implications of C-sections is the need of the hour, in the wake of a rise in C-section surgeries, especially in the urban milieu. Midwifery care is another way to reduce medical intervention in low-risk pregnancies, and this is what Janhavi Nilekani, a social entrepreneur, is working on.
A development economist from Harvard, Janhavi, Founder of Bengaluru-based Aastrika Foundation and Aastrika Midwifery Centre, is working on bringing midwifery care to the centre stage. She talks to HerStory about the need to establish midwifery as an essential component of maternal care and the challenges she faced along her journey in this space.
These are the issues she wants to tackle through education and empowerment.
Janhavi, who is the daughter of Infosys co-founder and Aadhaar architect Nandan Nilekani and philanthropist Rohini Nilekani, acknowledges her privileged background, which helped her take the plunge into social entrepreneurship. She was especially drawn to maternal healthcare after her own experience with midwife-led delivery in 2016.
“After all my searching in Bengaluru, I finally settled on Dr Vijaya Krishnan in Hyderabad, a certified professional midwife. I had been following her work for some time,” she says.
Driven by her desire to spread awareness on midwifery care, Janhavi established Aastrika Foundation in May 2019. Three years later, the foundation has 30 employees working on making midwifery an important part of childbirth and maternal care.
As part of the foundation, a digital learning platform named Aastrika Sphere was created in September 2020 for nurses and midwives anywhere in the world. The platform aims to help pre-service midwifery students learn essential skills and help in-service midwives to upskill and improve their competencies.
The foundation offers courses from United Nations Population Fund and Fernandez Foundation, among others.
The “biggest, impactful” programme, according to Janhavi, has been the one in partnership with Maternity Foundation and Indian Nursing Council. “Postpartum haemorrhage remains the leading cause of maternal death globally, and I’m proud that our course on active management of the third stage directly targets the leading cause of maternal mortality,” she says.
Nearly 8,000 learners, primarily from government hospitals in rural and urban areas across the country, have taken the course, with about 2,000 obtaining certificates.
In December 2018, the Government of India had come out with ‘Guidelines on Midwifery Services in India, 2018’, with the aim of improving the quality of care and ensuring respectful care for pregnant women and newborn babies. Through the programme, the government aims to establish a cadre of professional midwives who are skilled on par with the international standards set by the International Confederation of Midwives.
Janhavi calls this a huge step in the right direction and attributes the development to the alliance of like-minded individuals and organisations. She particularly credits Dr Evita Fernandez of Hyderabad-based Fernandez Foundation, who had spearheaded the midwifery initiative with the PROMISE Campaign way back in 2011 and committed to creating a national cadre of midwives. She also applauds the work of Dr Vijaya Krishnan and Priyanka Idicula, well-known midwives in India, for taking up midwifery advocacy in the country.
After four years of trying to establish a full-fledged facility in hospitals where pregnant women could avail themselves of midwifery-led care, Janhavi set up her own practice in the private sector—Aastrika Midwifery Centre—in 2021 in partnership with Vasavi Hospital in Bengaluru.
The centre has an interdisciplinary team of obstetricians, midwives, paediatricians, and nurses. Aastrika’s midwives have earned their qualifications from Fernandez Foundation.
As a public policy practitioner working in public health, Janhavi has big plans for the future.
Aastrika Foundation is working on establishing simulation and skilling labs and clinical practice sites for midwifery training.
There are plans for Aastrika Sphere too. “We are using technology designed from the get-go to potentially reach two million to four million nurses and Asha workers. We intend for Aastrika Sphere to be available for each of them; even today, any nurse can log on to our website, make a profile, and avail of these courses, which are specifically designed for nurses, for free,” says Janhavi.
While there are plans to launch more midwifery-led centres in Bengaluru, Janhavi wants to wait for more fully qualified midwives to join the growing tribe. The Aastrika midwifery team is looking to establish a presence in a hospital for low-income groups to increase its reach.
(This story was updated to correct a typo.)
| english |
<reponame>theomjones/theomjones.com<gh_stars>1-10
.Message {
margin-top: 20px;
}
.Form {
margin: 0;
}
.Form button {
margin: 0 10px;
}
.FormInfo,
.FormResult {
display: inline-flex;
justify-content: center;
align-items: center;
}
| css |
New York, NY, February 14, 2022: Medscape Education has been awarded a contract from the US Food and Drug Administration (FDA) for the development of an educational curriculum and outreach programs on the use of biosimilars in medical practice.
Created to enhance healthcare providers’ (HCPs’) understanding of biosimilars, the program will include accredited continuing education (CE) courses for physicians, pharmacists, and nurses, covering a broad range of topics on biosimilars. Biosimilars are biological products that have no clinically meaningful difference from an existing FDA-approved product.
Medscape’s programming will include information on biosimilar development, the regulatory review process, clinical outcomes, and practical applications and uses of biosimilars. A variety of educational formats such as case studies and video roundtable discussions will offer CE options tailored to an HCP’s knowledge level. The leading source of clinical news, health information, and point-of-care tools for healthcare professionals, Medscape and its affiliate network of platforms currently reach over 5 million physicians worldwide.
The interprofessional education curriculum will be available to HCPs free of charge and activities will be certified for CME, CNE, CPE, ICPE, and ABIM MOC credit for primary care physicians, gastroenterologists, dermatologists, endocrinologists, hematologists, oncologists, nurses, and pharmacists.
Programs will begin to launch in spring 2022 and will be available at www.medscape.org.
Medscape Education (medscape.org) is the leading destination for continuous professional development, consisting of more than 30 specialty-focused destinations offering thousands of free CME and CE courses for physicians, nurses, and other healthcare professionals. Medscape Education is part of the WebMD Health Network.
| english |
package main
type req struct {
a *a
b *b
}
func NewReq(a *a, b *b) *req {
return &req{
a: a,
b: b,
}
}
type a struct {
i, y int
}
type b struct {
i, y int
}
| go |
---
layout: news-events
filename: events
title: November 2021 OMERO users workshop
main-blurb: 2-day workshop on how to use OMERO held remotely, organized by Åbo Akademi, Turku.
---
<hr class="whitespace">
<div class="row">
<div class="column">
<h2 class="event-day">Organiser: <a href="https://www.abo.fi/" target="_blank">Åbo Akademi</a></h2>
</div>
</div>
<div class="row">
<div class="column">
<h2 class="event-day">Location: held remotely
</div>
</div>
<div class="row">
<div class="column">
<h2 class="event-day">Date: 15-16th November 2021</h2>
</div>
</div>
<hr class="whitespace">
<div class="row">
<div class="column">
<h2 class="event-day">Duration: 3 hours per day</h2>
<p class="event-day-description">The Open Microscopy Environment (OME) is an open-source software project that develops tools that enable access, analysis, visualization, sharing and publication of biological image data. We support more than 150 image data formats across many imaging modalities including medical imaging, high-content screening and whole-slide imaging.
We support and visualize multi-channel 3D timelapse images.
OMERO, a component of OME, is a software platform for image data management and analysis which was presented in this course.
Import, organisation, viewing, searching, annotation, analysis with Fiji and publishing of imaging data with OMERO was shown.
</p>
<p class="event-day-description">
The workshop concentrated on basics of OMERO and did not assume any programming skills.
</p>
</div>
</div>
<hr class="whitespace">
<div class="row">
<div class="column">
<h2 class="event-day">Resources available under: <a href="https://downloads.openmicroscopy.org/presentations/2021/Turku/" target="_blank">presentation and walkthrough</a>
</p>
</div>
</div>
| html |
//! Elliptic Curve Cryptography
//!
//! This module encapsulates the data structures and methods related to elliptic curve cryptography.
//!
//! Examples can be found within the implementation modules namespaced hereunder.
/// Elliptic curve private key
#[cfg(feature = "elliptic_curve")]
pub trait ECPrivateKey {}
/// Elliptic curve public key
#[cfg(feature = "elliptic_curve")]
pub trait ECPublicKey {}
pub mod curve_25519;
| rust |
<gh_stars>0
import math
from typing import Dict, List
import numpy as np
import pandas as pd
from pandas.core.computation import expressions
from data_manager.base_manager import DataManagerBase, DataParam
from proto.aiengine.v1 import aiengine_pb2
class TimeSeriesDataManager(DataManagerBase):
def __init__(self, param: DataParam, fields: Dict[str, aiengine_pb2.FieldData], action_rewards: Dict[str, str],
actions_order: Dict[str, int], external_reward_funcs: str, laws: List[str]):
super().__init__(param, fields, action_rewards, actions_order, external_reward_funcs, laws)
new_series = {}
for field_name in fields:
new_series[field_name] = [fields[field_name].initializer]
self.massive_table_sparse = pd.DataFrame(new_series, index={self.param.epoch_time})
self.massive_table_sparse = self.massive_table_sparse.resample(self.param.granularity_secs).mean()
self.massive_table_filled = None
self._fill_table()
self.current_time: pd.Timestamp = None
def get_window_span(self):
return math.floor(self.param.interval_secs / self.param.granularity_secs)
def overwrite_data(self, new_data):
self.massive_table_sparse = new_data
self._fill_table()
def _fill_table(self):
self.metrics.start("resample")
self.massive_table_sparse = self.massive_table_sparse.resample(self.param.granularity_secs).mean()
self.metrics.end("resample")
self.metrics.start("ffill")
self.massive_table_filled = self.massive_table_sparse.copy()
for col_name in self.massive_table_sparse:
fill_method = self.fields[col_name].fill_method
if fill_method == aiengine_pb2.FILL_FORWARD:
self.massive_table_filled[col_name] = self.massive_table_sparse[
col_name
].ffill()
elif fill_method == aiengine_pb2.FILL_ZERO:
self.massive_table_filled[col_name] = self.massive_table_sparse[
col_name
].fillna(0)
self.metrics.end("ffill")
self.metrics.start("reindex")
self.massive_table_filled.index = (
self.massive_table_filled.index.drop_duplicates(keep="first")
)
self.metrics.end("reindex")
def _merge_row(self, new_row):
index = new_row.index[0]
for column_name in list(new_row.keys()):
value = new_row[column_name].array[0]
self.massive_table_sparse.loc[index][column_name] = value
self.metrics.start("ffill")
self.massive_table_filled = self.massive_table_sparse.ffill()
self.metrics.end("ffill")
def merge_data(self, new_data):
def combiner(existing, newer):
existing_values = (
existing.values if hasattr(existing, "values") else existing
)
newer_values = newer.values if hasattr(newer, "values") else newer
# use newer values if they aren't nan
condition = pd.isnull(newer_values)
return expressions.where(condition, existing_values, newer_values)
with self.table_lock:
if len(new_data) == 0:
return
if len(new_data) == 1 and new_data.index[0] in self.massive_table_sparse.index:
self.metrics.start("merge_row")
self._merge_row(new_data)
self.metrics.end("merge_row")
return
self.metrics.start("combine")
self.massive_table_sparse = self.massive_table_sparse.combine(new_data, combiner)
self.metrics.end("combine")
self._fill_table()
def add_interpretations(self, interpretations):
self.interpretations = interpretations
def get_interpretations_for_interval(self):
if self.interpretations is not None:
index = self.interpretations.index[int(self.current_time.timestamp())]
if index is not None and index.indicies is not None and len(index.indicies) > 0:
interval_interpretations = []
for i in index.indicies:
interval_interpretations.append(
self.interpretations.interpretations[i]
)
return interval_interpretations
return None
def get_shape(self):
return np.shape([0] * self.get_window_span() * len(self.fields))
def get_current_window(self) -> pd.DataFrame:
with self.table_lock:
# This will get the nearest previous index that matches the timestamp,
# so we don't need to specify the timestamps exactly
start_index = self.massive_table_filled.index.get_loc(self.current_time, "ffill")
end_index = self.massive_table_filled.index.get_loc(self.current_time + self.param.interval_secs, "ffill")
return (
self.massive_table_filled.iloc[start_index:start_index + 1]
if self.get_window_span() == 1 else
self.massive_table_filled.iloc[start_index:end_index])
def get_window_at(self, time):
start_index = None
end_index = None
# If we only have a single row, use it
if self.massive_table_filled.shape[0] == 1:
start_index = self.massive_table_filled.index.get_loc(time)
end_index = start_index
else:
start_index = self.massive_table_filled.index.get_loc(
time - self.param.interval_secs, "ffill"
)
end_index = self.massive_table_filled.index.get_loc(time, "ffill")
if self.get_window_span() == 1:
return self.massive_table_filled.iloc[start_index:start_index + 1]
return self.massive_table_filled.iloc[start_index:end_index]
def reset(self):
self.current_time = self.param.epoch_time
def advance(self) -> bool:
if self.current_time >= self.param.end_time - self.param.interval_secs:
return False
self.current_time += self.param.granularity_secs
return True
| python |
import type { Theme } from '../types';
export function themeToCSSVariables(theme: Theme): Record<string, string | number> {
const result: ReturnType<typeof themeToCSSVariables> = {};
for (const propertyName in theme) {
if (Object.prototype.hasOwnProperty.call(theme, propertyName)) {
result[`--${propertyName}`] = theme[propertyName as keyof Theme];
}
}
return result;
}
| typescript |
import { LitElement } from 'lit';
import { EventEmitter } from '../../internal/decorators';
export default class SlTextarea extends LitElement {
static styles: import("lit").CSSResult;
input: HTMLTextAreaElement;
private inputId;
private helpTextId;
private labelId;
private resizeObserver;
private hasFocus;
private hasHelpTextSlot;
private hasLabelSlot;
size: 'small' | 'medium' | 'large';
name: string;
value: string;
label: string;
helpText: string;
placeholder: string;
rows: number;
resize: 'none' | 'vertical' | 'auto';
disabled: boolean;
readonly: boolean;
minlength: number;
maxlength: number;
pattern: string;
required: boolean;
invalid: boolean;
autocapitalize: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters' | 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
autocorrect: string;
autocomplete: string;
autofocus: boolean;
spellcheck: boolean;
inputmode: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
slChange: EventEmitter<void>;
slInput: EventEmitter<void>;
slFocus: EventEmitter<void>;
slBlur: EventEmitter<void>;
connectedCallback(): void;
disconnectedCallback(): void;
focus(options?: FocusOptions): void;
blur(): void;
select(): void;
scrollPosition(position?: {
top?: number;
left?: number;
}): {
top: number;
left: number;
} | undefined;
setSelectionRange(selectionStart: number, selectionEnd: number, selectionDirection?: 'forward' | 'backward' | 'none'): void;
setRangeText(replacement: string, start: number, end: number, selectMode?: 'select' | 'start' | 'end' | 'preserve'): void;
reportValidity(): boolean;
setCustomValidity(message: string): void;
handleChange(): void;
handleInput(): void;
handleBlur(): void;
handleFocus(): void;
handleRowsChange(): void;
handleSlotChange(): void;
handleValueChange(): void;
setTextareaHeight(): void;
render(): import("lit-html").TemplateResult<1>;
}
declare global {
interface HTMLElementTagNameMap {
'sl-textarea': SlTextarea;
}
}
| typescript |
# XML Parser - Greenter
[](https://github.com/thegreenter/greenter)
Convierte XML de comprobantes electrónicos a clases de PHP.
## Recursos
- [Documentación](https://greenter.dev/packages/xml-parser/)
- [Reportar un error](https://github.com/thegreenter/greenter/issues) o enviar un [pull request](https://github.com/thegreenter/greenter/pulls) al [repositorio principal de greenter](https://github.com/thegreenter/greenter).
| markdown |
<filename>src/main/java/io/renren/modules/blog/controller/api/AbstractController.java
package io.renren.modules.blog.controller.api;
import io.renren.common.exception.ErrorConstant;
import io.renren.common.validator.Assert;
import io.renren.modules.app.utils.JwtUtils;
import io.renren.modules.blog.dto.AccountProfileDto;
import io.renren.modules.blog.utils.ThreadLocalUtils;
/**
* @author codecrab
* @since 2021年09月29日 下午 3:56
*/
public abstract class AbstractController {
protected AccountProfileDto getMember() {
Object cache = ThreadLocalUtils.getCache(JwtUtils.MEMBER_CLAIM);
Assert.isNotNull(cache, ErrorConstant.VERIFY_TOKEN_EXPIRED);
Assert.isTrue(cache instanceof AccountProfileDto, ErrorConstant.VERIFY_TOKEN_ERROR);
return (AccountProfileDto) cache;
}
protected Long getMemberId() {
return getMember().getId();
}
}
| java |
Speaking on the occasion, the President said that Defence Finances have increased manifold since the time of India’s Independence. This sharp rise in defence expenditure is commensurate with the requirements of maintaining a modern defence force in our country. The onus of managing the finances has thus increased in proportion, complexity and dimension. He stated that the probationers would do well to make a vital contribution through faster and efficient decision-making, without compromising on rules and procedures, and yet enabling the defence forces to meet their requirements on time.
| english |
import { cleanup } from "@testing-library/react";
import { renderHook } from "@testing-library/react-hooks";
import useFocusEffect from "../use-focus-effect";
afterEach(cleanup);
test("does not focus on mount when false", () => {
const focusMock = jest.fn();
const mockRef = { current: { focus: focusMock } } as React.RefObject<any>;
const { rerender } = renderHook(() => useFocusEffect(false, mockRef));
expect(focusMock).toBeCalledTimes(0);
rerender();
expect(focusMock).toBeCalledTimes(0);
});
test("focuses on mount when true", () => {
const focusMock = jest.fn();
const mockRef = { current: { focus: focusMock } } as React.RefObject<any>;
const { rerender } = renderHook(() => useFocusEffect(true, mockRef));
expect(focusMock).toBeCalledTimes(1);
rerender();
expect(focusMock).toBeCalledTimes(1);
});
test("focuses when focus value changes to true", () => {
let focused = false;
const focusMock = jest.fn();
const mockRef = { current: { focus: focusMock } } as React.RefObject<any>;
const { rerender } = renderHook(() => useFocusEffect(focused, mockRef));
focused = true;
rerender();
expect(focusMock).toBeCalledTimes(1);
rerender();
expect(focusMock).toBeCalledTimes(1);
focused = false;
rerender();
expect(focusMock).toBeCalledTimes(1);
});
| typescript |
<gh_stars>1000+
export interface ISAMLGlobalSettings {
generateUsername: boolean;
nameOverwrite: boolean;
mailOverwrite: boolean;
immutableProperty: string;
defaultUserRole: string;
userDataFieldMap: string;
usernameNormalize: string;
channelsAttributeUpdate: boolean;
includePrivateChannelsInUpdate: boolean;
}
| typescript |
import { AfterViewInit, Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import {Globals} from '../../../globals';
import * as moment from 'src/assets/plantilla/vendors/bower_components/moment/min/moment.min.js';
import { CodifService } from '../../../services/codif.service';
import { ContratoService } from '../../../services/contrato.service';
import { AdministradoraService } from '../../../services/administradora.service';
declare var $: any;
@Component({
selector: 'app-contratos',
templateUrl: './contratos.component.html',
styleUrls: ['./contratos.component.css']
})
export class ContratosComponent implements OnInit {
submitted = false;
contratoForm: FormGroup;
dtOptions: any = {};
table: any = '';
contrato_id = 0;
administradoras: any = [];
regimen: any = [];
constructor(private formBuilder: FormBuilder, private globals: Globals, private codifService: CodifService, private adminService: AdministradoraService, private contratoService: ContratoService) { }
ngOnInit() {
this.initForm();
this.table = $('#data-table').DataTable(this.fillTable());
}
ngAfterViewInit(): void {
var that = this;
setTimeout(() =>
{
this.globals.getUrl = 'contrato';
}
,0);
$('.select2').select2({dropdownAutoWidth:!0,width:"100%"});
$(".date-picker.fecha").flatpickr({mode: "range", dateFormat: 'd/m/Y', "locale": "es", enableTime:!1,nextArrow:'<i class="zmdi zmdi-long-arrow-right" />',prevArrow:'<i class="zmdi zmdi-long-arrow-left" />'});
$('.wysiwyg-editor').trumbowyg({
svgPath: '/src/assets/plantilla/vendors/bower_components/trumbowyg/dist/ui/icons.svg'
});
this.codifService.getRegimen()
.subscribe(data => this.regimen = data);
this.adminService.getAdministradoras()
.subscribe(data => this.administradoras = data);
$('#data-table').on( 'click', '.btn-del', function () {
that.deleteContrato($(this).attr('date'));
});
$('#data-table').on( 'click', '.btn-edit', function () {
that.fillContrato($(this).attr('date'));
});
$("body").on("click", "[data-table-action]", function(a) {
a.preventDefault();
var b = $(this).data("table-action");
if ("excel" === b && $(this).closest(".dataTables_wrapper").find(".buttons-excel").trigger("click"),
"csv" === b && $(this).closest(".dataTables_wrapper").find(".buttons-csv").trigger("click"),
"print" === b && $(this).closest(".dataTables_wrapper").find(".buttons-print").trigger("click"),
"fullscreen" === b) {
var c = $(this).closest(".card");
c.hasClass("card--fullscreen") ? (c.removeClass("card--fullscreen"),
$("body").removeClass("data-table-toggled")) : (c.addClass("card--fullscreen"),
$("body").addClass("data-table-toggled"))
}
})
}
get f() { return this.contratoForm.controls; }
initForm() {
this.contratoForm = this.formBuilder.group({
COD_CONTRATO: ['', [Validators.required]],
NOM_CONTRATO: ['', [Validators.required]],
ID_ADMINISTRADORA: [''],
FEC_INICIO: ['', [Validators.required]],
FEC_FINAL: [''],
ID_REGIMEN: [''],
TIPO_PAGO: [''],
TIPO_FACTURA: [''],
NUM_AFILIADO: [''],
VALOR_TOTAL: [''],
VALOR_ALERTA: [''],
VALOR_MENSUAL: [''],
VALOR_MENSUAL_VAL: [''],
OBS_CONTRATO: [''],
});
}
fillTable() {
return this.dtOptions = {
pageLength: 10,
autoWidth: !1,
responsive: !0,
"destroy": true,
language: {
"url": "src/assets/Spanish.json",
searchPlaceholder: "Escriba parametro a filtrar..."
},
ajax: this.globals.apiUrl+'/contratos',
columns: [
{ title: 'Código', data: 'COD_CONTRATO', className: "align-middle", "render": function ( data, type, row, meta ) {
return '<code><i class="zmdi zmdi-badge-check"></i> '+data+'</code>';
}},
{ title: 'Contrato', data: 'NOM_CONTRATO', className: "align-middle", "render": function ( data, type, row, meta ) {
return data;
}},
{ title: 'Fecha Inicio', data: 'FEC_INICIO', className: "align-middle", "render": function ( data, type, row, meta ) {
return '<i class="zmdi zmdi-calendar"></i> '+moment(data).format('DD/MM/YYYY');
}},
{ title: 'Fecha Final', data: 'FEC_FINAL', className: "align-middle", "render": function ( data, type, row, meta ) {
return '<i class="zmdi zmdi-calendar"></i> '+moment(data).format('DD/MM/YYYY');
}},
{ title: 'Administradora', data: 'ID_ADMINISTRADORA', className: "align-middle", "render": function ( data, type, row, meta ) {
return '<i class="zmdi zmdi-shield-security"></i> '+row.administradora.NOM_ADMINISTRADORA;
} },
{ title: 'Acción', data: 'ID_CONTRATO', "render": function ( data, type, row, meta ) {
let editar = '<button date="'+data+'" class="btn btn-light btn--icon btn-sm btn-edit" title="Editar contrato" data-toggle="tooltip"><i class="actions__item zmdi zmdi-edit"></i></button> ';
let eliminar = '<button date="'+data+'" class="btn btn-light btn--icon btn-sm btn-del" title="Eliminar contrato" data-toggle="tooltip"><i class="actions__item zmdi zmdi-delete"></i></button>';
return editar + eliminar;
}}],
"columnDefs": [
{ "width": "150px", "targets": 0 },
{ "width": "150px", "targets": 1 },
{ "width": "150px", "targets": 2 },
{ "width": "150px", "targets": 3 },
{ "width": "250px", "targets": 4 },
{ "width": "150px", "targets": 5 }
],
dom: '<"dataTables__top"lfB>rt<"dataTables__bottom"ip><"clear">',
buttons: [{
extend: "excelHtml5",
title: "Export Data"
}, {
extend: "csvHtml5",
title: "Export Data"
}, {
extend: "print",
title: "Material Admin"
}],
"initComplete": function () {
$('[data-toggle="tooltip"]').tooltip();
$(this).closest(".dataTables_wrapper").find(".dataTables__top").prepend('<div class="dataTables_buttons hidden-sm-down actions"><span class="actions__item zmdi zmdi-print" data-table-action="print" /><span class="actions__item zmdi zmdi-fullscreen" data-table-action="fullscreen" /><div class="dropdown actions__item"><i data-toggle="dropdown" class="zmdi zmdi-download" /><ul class="dropdown-menu dropdown-menu-right"><a href="" class="dropdown-item" data-table-action="excel">Excel (.xlsx)</a><a href="" class="dropdown-item" data-table-action="csv">CSV (.csv)</a></ul></div></div>')
},
};
}
clearAll() {
this.contratoForm.get('COD_CONTRATO').setValue('');
this.contratoForm.get('NOM_CONTRATO').setValue('');
this.contratoForm.get('ID_ADMINISTRADORA').setValue('');
this.contratoForm.get('FEC_INICIO').setValue('');
this.contratoForm.get('FEC_FINAL').setValue('');
this.contratoForm.get('ID_REGIMEN').setValue('');
this.contratoForm.get('TIPO_PAGO').setValue(1);
this.contratoForm.get('TIPO_FACTURA').setValue(6);
this.contratoForm.get('NUM_AFILIADO').setValue('');
this.contratoForm.get('VALOR_TOTAL').setValue('');
this.contratoForm.get('VALOR_ALERTA').setValue('');
this.contratoForm.get('VALOR_MENSUAL').setValue('');
this.contratoForm.get('VALOR_MENSUAL_VAL').setValue('');
this.contratoForm.get('OBS_CONTRATO').setValue('');
this.contrato_id = 0;
$('.wysiwyg-editor').html('');
$('#ID_ADMINISTRADORA').val('').trigger('change');
$('#ID_REGIMEN').val('').trigger('change');
$('#TIPO_PAGO').val(1).trigger('change');
$('#TIPO_FACTURA').val(6).trigger('change');
$('.btn-addp').html('<i class="zmdi zmdi-floppy"></i> Registrar');
this.initForm();
$(".date-picker.fecha").flatpickr({
mode: "range",
dateFormat: 'd/m/Y',
"locale": "es",
enableTime:!1,
nextArrow:'<i class="zmdi zmdi-long-arrow-right" />',
prevArrow:'<i class="zmdi zmdi-long-arrow-left" />',
defaultDate: null,
});
}
Registrar() {
this.submitted = true;
if (this.contratoForm.invalid) {
return;
}
if($('#ID_ADMINISTRADORA').val() == '') {
alert("Por favor, escoja la Administradora");
return false;
}
else
if($('#ID_REGIMEN').val() == '') {
alert("Por favor, escoja el Régimen");
return false;
}
else
if($('#TIPO_PAGO').val() == '') {
alert("Por favor, escoja el Tipo de Pago");
return false;
}
else
if($('#TIPO_FACTURA').val() == '') {
alert("Por favor, escoja el Tipo de Factura");
return false;
}
/*else
if ($('.wysiwyg-editor').trumbowyg('html') == '') {
alert("Por favor, diga la observación");
return false;
};*/
if(this.contrato_id == 0) {
/*if(!confirm("Esta Seguro que desea Registrar el CONTRATO?"))
return false;*/
this.contratoForm.get('ID_REGIMEN').setValue($('#ID_REGIMEN').val());
this.contratoForm.get('ID_ADMINISTRADORA').setValue($('#ID_ADMINISTRADORA').val());
this.contratoForm.get('TIPO_PAGO').setValue($('#TIPO_PAGO').val());
this.contratoForm.get('TIPO_FACTURA').setValue($('#TIPO_FACTURA').val());
this.contratoForm.get('OBS_CONTRATO').setValue($('.wysiwyg-editor').trumbowyg('html'));
this.contratoService.crearContrato(this.contratoForm.value)
.subscribe(data => {
this.clearAll();
this.table = $('#data-table').DataTable(this.fillTable());
this.showMessage("Contrato creado");
this.submitted = false;
}
);
}
else {
/*if(!confirm("Esta Seguro que desea Modificar el CONTRATO?"))
return false;*/
this.contratoForm.get('ID_REGIMEN').setValue($('#ID_REGIMEN').val());
this.contratoForm.get('ID_ADMINISTRADORA').setValue($('#ID_ADMINISTRADORA').val());
this.contratoForm.get('TIPO_PAGO').setValue($('#TIPO_PAGO').val());
this.contratoForm.get('TIPO_FACTURA').setValue($('#TIPO_FACTURA').val());
this.contratoForm.get('OBS_CONTRATO').setValue($('.wysiwyg-editor').trumbowyg('html'));
this.contratoService.updateContrato(this.contrato_id, this.contratoForm.value)
.subscribe(data => {
this.clearAll();
this.table = $('#data-table').DataTable(this.fillTable());
this.showMessage("Contrato actualizado");
this.submitted = false;
}
);
}
}
fillContrato(p) {
var that = this;
this.contratoService.getContrato(p)
.subscribe(data => {
var contrato: any = data;
this.contrato_id = contrato.ID_CONTRATO;
this.initForm();
this.contratoForm.get('COD_CONTRATO').setValue(contrato.COD_CONTRATO);
this.contratoForm.get('NOM_CONTRATO').setValue(contrato.NOM_CONTRATO);
this.contratoForm.get('ID_ADMINISTRADORA').setValue(contrato.ID_ADMINISTRADORA);
this.contratoForm.get('FEC_INICIO').setValue(moment(contrato.FEC_INICIO).format('DD/MM/YYYY')+" a "+moment(contrato.FEC_FINAL).format('DD/MM/YYYY'));
this.contratoForm.get('FEC_FINAL').setValue(contrato.FEC_FINAL);
this.contratoForm.get('ID_REGIMEN').setValue(contrato.ID_REGIMEN);
this.contratoForm.get('TIPO_PAGO').setValue(contrato.TIPO_PAGO);
this.contratoForm.get('TIPO_FACTURA').setValue(contrato.TIPO_FACTURA);
this.contratoForm.get('NUM_AFILIADO').setValue(contrato.NUM_AFILIADO);
this.contratoForm.get('VALOR_TOTAL').setValue(contrato.VALOR_TOTAL);
this.contratoForm.get('VALOR_ALERTA').setValue(contrato.VALOR_ALERTA);
this.contratoForm.get('VALOR_MENSUAL').setValue(contrato.VALOR_MENSUAL);
this.contratoForm.get('VALOR_MENSUAL_VAL').setValue(contrato.VALOR_MENSUAL_VAL);
this.contratoForm.get('OBS_CONTRATO').setValue(contrato.OBS_CONTRATO);
$('#ID_ADMINISTRADORA').val(contrato.ID_ADMINISTRADORA).trigger('change');
$('#ID_REGIMEN').val(contrato.ID_REGIMEN).trigger('change');
$('#TIPO_PAGO').val(contrato.TIPO_PAGO).trigger('change');
$('#TIPO_FACTURA').val(contrato.TIPO_FACTURA).trigger('change');
$('.wysiwyg-editor').html(contrato.OBS_CONTRATO);
$('.btn-addp').html('<i class="zmdi zmdi-floppy"></i> Actualizar');
$(".date-picker.fecha").flatpickr({
mode: "range",
dateFormat: 'd/m/Y',
"locale": "es",
enableTime:!1,
nextArrow:'<i class="zmdi zmdi-long-arrow-right" />',
prevArrow:'<i class="zmdi zmdi-long-arrow-left" />',
defaultDate: [moment(contrato.FEC_INICIO).format('DD/MM/YYYY'), moment(contrato.FEC_FINAL).format('DD/MM/YYYY')]
});
$('#collapseOne').collapse('show');
$('#COD_CONTRATO').focus();
$('html, body').animate({ scrollTop: $('#foco').offset().top }, 'slow');
}
);
}
deleteContrato(id) {
if(confirm("Esta Seguro que desea eliminar el CONTRATO?")) {
this.contratoService.delContrato(id)
.subscribe(data => {
this.table = $('#data-table').DataTable(this.fillTable());
this.showMessage("Contrato eliminado");
this.clearAll();
}
);
}
}
showMessage(message: string) {
$.notify({
icon: 'fa fa-check',
title: ' Notificación',
message: message,
url: ''
},{
element: 'body',
type: 'inverse',
allow_dismiss: true,
placement: {
from: 'top',
align: 'center'
},
offset: {
x: 20,
y: 20
},
spacing: 10,
z_index: 1031,
delay: 2500,
timer: 1000,
url_target: '_blank',
mouse_over: false,
animate: {
enter: 'fadeInDown',
exit: 'fadeOutUp'
},
template: '<div data-notify="container" class="alert alert-dismissible alert-{0} alert--notify" role="alert">' +
'<span data-notify="icon"></span> ' +
'<span data-notify="title">{1}</span> ' +
'<span data-notify="message">{2}</span>' +
'<div class="progress" data-notify="progressbar">' +
'<div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>' +
'</div>' +
'<a href="{3}" target="{4}" data-notify="url"></a>' +
'<button type="button" aria-hidden="true" data-notify="dismiss" class="alert--notify__close">Close</button>' +
'</div>'
});
}
}
| typescript |
<filename>discussions/585596.json<gh_stars>0
[
{
"Id": "1361663",
"ThreadId": "585596",
"Html": "I'm getting the following error message after installing the HTML Agility Pack using the NuGet package manager: Could not load file or assembly 'HTMLAgilityPack, Version 1.4.6.0, ... I installed the latest version, which is 1.4.9.0. I got the error when I tried to design a new report in Visual Studio 2013.\r<br />\n<br />\n<img src=\"http://i.imgur.com/UgXYYb6.jpg\" alt=\"Image\" />\r<br />\n<br />\nAs you can see, it is in the References, and the dll is in the bin folder.\r<br />\n<br />\n<img src=\"http://i.imgur.com/6xLAz9x.jpg\" alt=\"Image\" />\r<br />\n<br />\nThis is my first try at writing a report in Visual Studio, and it's mandatory that I use that. Is there something I have to do to get this to work?<br />\n",
"PostedDate": "2015-03-09T11:13:03.577-07:00",
"UserRole": null,
"MarkedAsAnswerDate": null
}
] | json |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function
import abc
import os
import random
import pandas as pd
import pytest
from pandas.util.testing import assert_frame_equal
from pytest import fixture
import targets
import targets.errors
import targets.pipes
from dbnd.testing.helpers_pytest import skip_on_windows
from targets import DataTarget, target
class TestException(Exception):
pass
class FileTargetTestMixin(object):
"""All Target that take bytes (python2: str) should pass those
tests. In addition, a test to verify the method `exists`should be added
"""
@fixture(autouse=True)
def _current_request(self, request):
self._current_request = request
self._id = request.node.name
def assertCleanUp(self, tmp_path=""):
pass
@abc.abstractmethod
def create_target(self, io_pipe=None):
# type: (...)->DataTarget
pass
def test_atomicity(self):
target = self.create_target()
fobj = target.open("w")
assert not target.exists()
fobj.close()
assert target.exists()
def test_readback(self):
target = self.create_target()
origdata = "lol\n"
fobj = target.open("w")
fobj.write(origdata)
fobj.close()
fobj = target.open("r")
data = fobj.read()
assert origdata == data
def test_unicode_obj(self):
target = self.create_target()
origdata = u"lol\n"
fobj = target.open("w")
fobj.write(origdata)
fobj.close()
fobj = target.open("r")
data = fobj.read()
assert origdata == data
def test_with_close(self):
target = self.create_target()
with target.open("w") as fobj:
tp = getattr(fobj, "tmp_path", "")
fobj.write("hej\n")
self.assertCleanUp(tp)
assert target.exists()
def test_with_exception(self):
target = self.create_target()
a = {}
def foo():
with target.open("w") as fobj:
fobj.write("hej\n")
a["tp"] = getattr(fobj, "tmp_path", "")
raise TestException("Test triggered exception")
with pytest.raises(TestException):
foo()
self.assertCleanUp(a["tp"])
assert not target.exists()
def test_del(self):
t = self.create_target()
p = t.open("w")
print("test", file=p)
tp = getattr(p, "tmp_path", "")
del p
self.assertCleanUp(tp)
assert not t.exists()
def test_write_cleanup_no_close(self):
t = self.create_target()
def context():
f = t.open("w")
f.write("stuff")
return getattr(f, "tmp_path", "")
tp = context()
import gc
gc.collect() # force garbage collection of f variable
self.assertCleanUp(tp)
assert not t.exists()
def test_text(self):
t = self.create_target(targets.pipes.UTF8)
a = u"我éçф"
with t.open("w") as f:
f.write(a)
with t.open("r") as f:
b = f.read()
assert a == b
def test_del_with_Text(self):
t = self.create_target(targets.pipes.UTF8)
p = t.open("w")
print(u"test", file=p)
tp = getattr(p, "tmp_path", "")
del p
self.assertCleanUp(tp)
assert not t.exists()
def test_format_injection(self):
class CustomFormat(targets.pipes.IOPipeline):
def pipe_reader(self, input_pipe):
input_pipe.foo = "custom read property"
return input_pipe
def pipe_writer(self, output_pipe):
output_pipe.foo = "custom write property"
return output_pipe
t = self.create_target(CustomFormat())
with t.open("w") as f:
assert f.foo == "custom write property"
with t.open("r") as f:
assert f.foo == "custom read property"
def test_binary_write(self):
t = self.create_target(targets.pipes.Nop)
with t.open("w") as f:
f.write(b"a\xf2\xf3\r\nfd")
with t.open("r") as f:
c = f.read()
assert c == b"a\xf2\xf3\r\nfd"
def test_writelines(self):
t = self.create_target()
with t.open("w") as f:
f.writelines(["a\n", "b\n", "c\n"])
with t.open("r") as f:
c = f.read()
assert c == "a\nb\nc\n"
def test_read_iterator(self):
t = self.create_target()
with t.open("w") as f:
f.write("a\nb\nc\n")
c = []
with t.open("r") as f:
for x in f:
c.append(x)
assert c == ["a\n", "b\n", "c\n"]
@skip_on_windows
def test_gzip(self):
t = self.create_target(io_pipe=targets.pipes.Gzip)
p = t.open("w")
test_data = b"test"
p.write(test_data)
# tp = getattr(p, "tmp_path", "")
assert not t.exists()
p.close()
# self.assertCleanUp(tp)
assert t.exists()
@skip_on_windows
def test_gzip_works_and_cleans_up(self):
t = self.create_target(targets.pipes.Gzip)
test_data = b"123testing"
with t.open("w") as f:
tp = getattr(f, "tmp_path", "")
f.write(test_data)
self.assertCleanUp(tp)
with t.open() as f:
result = f.read()
assert test_data == result
@pytest.mark.skip
def test_dataframe_csv_support(self):
t = self.create_target()
test_data = pd.DataFrame(data=[[1, 1], [2, 2]], columns=["c1", "c2"])
t.as_pandas.to_csv(test_data)
result = t.as_pandas.read_csv()
assert_frame_equal(test_data, result)
@pytest.mark.skip
def test_dataframe_parquet_support(self):
t = self.create_target()
test_data = pd.DataFrame(data=[[1, 1], [2, 2]], columns=["c1", "c2"])
t.as_pandas.to_parquet(test_data)
result = t.as_pandas.read_parquet()
assert_frame_equal(test_data, result)
def test_move_on_fs(self):
# We're cheating and retrieving the fs from target.
# TODO: maybe move to "filesystem_test.py" or something
t = self.create_target()
other_path = t.path + "-" + str(random.randint(0, 999999999))
t.touch()
fs = t.fs
assert t.exists()
fs.move(t.path, other_path)
assert not t.exists()
def test_rename_dont_move_on_fs(self):
# We're cheating and retrieving the fs from target.
# TODO: maybe move to "filesystem_test.py" or something
t = self.create_target()
other_path = t.path + "-" + str(random.randint(0, 999999999))
t.touch()
fs = t.fs
assert t.exists()
fs.rename_dont_move(t.path, other_path)
assert not t.exists()
with pytest.raises(targets.errors.FileAlreadyExists):
fs.rename_dont_move(t.path, other_path)
| python |
Rolf Potts gives a ton of good resources for how to travel long-term. This is not for the person who wants to take a week vacation in Cabo, but for someone who wants to hang out in a country or two or however many for a long time -- several weeks to several years. It's inspiring and helpful to know that I'm not the only one who wants to travel this way!
No comments have been added yet.
| english |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.