text
stringlengths
1
1.04M
language
stringclasses
25 values
All a Linux distribution really needs is any version of the Linux kernel that fits its needs. Linux businesses, like Canonical, Red Hat, and SUSE need more. When they build commercial Linux distributions they need to know that the base Linux kernel will have long-term support. That's just what Linux Foundation fellow and leading Linux kernel developer Greg Kroah-Hartman is giving them. Kroah-Hartman announced on his blog that the 3.10 Linux Kernel would be the next long-term kernel. He said, "Despite the fact that the 3.10-stable kernel releases are not slowing down at all, and there are plenty of pending patches already lined up for the next few releases, I figured it was a good time to let everyone know now that I’m picking the 3.10 kernel release as the next long term kernel, so they can start planning things around it if needed." Kroah-Hartman explained, "I'm picking this kernel after spending a lot of time talking about kernel releases, and product releases and development schedules from a large range of companies and development groups. I couldn’t please everyone, but I think that the 3.10 kernel fits the largest common set of groups that rely on the long term kernel releases." This idea of formally anointing an "official" Linux kernel has been around for years, but it only really got going in 2011. It was then that Kroah-Hartman, who'd been supporting Linux 2.6.16 as a de facto long term kernel, said that since that had worked out well, "a cabal of developers got together at a few different Linux conferences and determined that based on their future distro release cycles, we could all aim for standardizing on the 2.6.32 kernel, saving us all time and energy in the long run." This worked out well, and all of the major 'enterprise and "stable" distro releases became based on the 2.6.32 kernel. Kroah-Hartman then found that it wasn't only the big Linux distributions' developers that craved long-term stability. Many other Linux developers, especially those in the embedded consumer-device space, wanted such a Linux kernel too. So, Kroah-Hartman publicly proposed that a new long-term kernel be picked every year and that it be supported for two years. After some discussion on Google+ and the Linux Kernel Mailing List (LKML), the idea was refined and gained popular support in the development community. Now, two years later, the plan has come to fruition. For the next few years, enterprise and commercial Linux distributions will be based on the 3.10 Linux kernel. Related Stories:
english
<filename>BriskBenchmarks/src/main/java/applications/bolts/udf/comm/AbstractFilterBolt.java package applications.bolts.udf.comm; import brisk.components.operators.base.filterBolt; import brisk.execution.ExecutionGraph; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import util.hash.ODTDBloomFilter; import java.util.Map; import static constants.VoIPSTREAMConstants.Conf; /** * @author <NAME> <<EMAIL>> */ public abstract class AbstractFilterBolt extends filterBolt { private static final Logger LOG = LoggerFactory.getLogger(AbstractFilterBolt.class); private static final long serialVersionUID = -3678935142534984021L; protected final String configPrefix; protected final String outputField; protected final String outputkeyField; protected ODTDBloomFilter filter; private AbstractFilterBolt(String configPrefix, Map<String, Double> output_selectivity, String outputField, String outputkeyField) { this(configPrefix, null, output_selectivity, outputField, outputkeyField); } private AbstractFilterBolt(String configPrefix, Map<String, Double> input_selectivity, Map<String, Double> output_selectivity, String outputField, String outputkeyField) { super(LOG, input_selectivity, output_selectivity); this.configPrefix = configPrefix; this.outputField = outputField; this.outputkeyField = outputkeyField; } protected AbstractFilterBolt(String configPrefix, Map<String, Double> input_selectivity, Map<String, Double> output_selectivity, double read_selectivity) { super(LOG, input_selectivity, output_selectivity, read_selectivity); this.configPrefix = configPrefix; this.outputField = constants.VoIPSTREAMConstants.Field.RATE; this.outputkeyField = null; } // @Override // public Fields getDefaultFields() { // if (this.outputkeyField == null) // return new Fields(Field.CALLING_NUM, Field.TIMESTAMP, outputField, Field.RECORD); // else // return new Fields(Field.CALLING_NUM, Field.TIMESTAMP, outputField, Field.RECORD, outputkeyField); // } @Override public void initialize(int thread_Id, int thisTaskId, ExecutionGraph graph) { int numElements = config.getInt(String.format(Conf.FILTER_NUM_ELEMENTS, configPrefix)); int bucketsPerElement = config.getInt(String.format(Conf.FILTER_BUCKETS_PEL, configPrefix)); int bucketsPerWord = config.getInt(String.format(Conf.FILTER_BUCKETS_PWR, configPrefix)); double beta = config.getDouble(String.format(Conf.FILTER_BETA, configPrefix)); filter = new ODTDBloomFilter(numElements, bucketsPerElement, beta, bucketsPerWord); } }
java
<reponame>vibrant-data-labs/openmappr angular.module('common') .directive('dirElemReady', function ($parse, $timeout) { return { restrict: 'A', link: function ($scope, elem, attrs) { angular.element(elem).ready(function() { $timeout(function() { var func = $parse(attrs.dirElemReady); $scope.$event = {target: elem}; func($scope); }); }); } } })
javascript
Critical commentary on the Narendra Modi government in the latest issue of renowned magazine The Economist has been triggering spirited debate on social media since Thursday. The Economist, a weekly magazine from London, on Thursday released its print edition for January 25 to 31, with the cover reading 'Intolerant India: How Modi is endangering the world's biggest democracy', complete with an illustration of the lotus, the BJP's electoral symbol, atop barbed wire. The Economist print edition features three articles that criticise the Modi government's handling of the Citizenship (Amendment) Act and National Register of Citizens, its inability to push reforms and the economic slowdown. The long-format 'Leader' article is the most damning and argues "India’s 200m Muslims fear the prime minister is building a Hindu state". It describes the National Register of Citizens as a scheme that "looks like the most ambitious step yet in a decades-long project of incitement", which began with the Ayodhya agitation. The Economist argues, "Alas, what has been electoral nectar for the BJP is political poison for India. By undermining the secular principles of the constitution, Mr Modi’s latest initiatives threaten to do damage to India’s democracy that could last for decades. . . " The Economist also notes Modi has been able to calculate a "sizeable minority" of voters are sympathetic to his stance on Muslims, which "is enough" to keep him in office. On the economy, The Economist sounds a warning note in the article 'India’s economy risks swapping stagnation for stagflation'. The article on the economy notes the rise in prices of Railway tickets, mobile tariffs and edible items. The Economist argues, "This miscellany of misery will complicate the government’s efforts to fight an economic slowdown" and forecasts that "another splurge" by the government is expected in the upcoming budget. The third article analyses Modi's political strategy and is headlined 'Narendra Modi's sectarianism is eroding India's secular democracy'. It argues that after his second Lok Sabha poll victory in May 2019, Modi "has now taken his gloves off" to pursue a "Hindutva social agenda". Not surprisingly, the adverse coverage in The Economist has triggered a social media storm. Critics of the BJP and Modi chose to highlight an issue of The Economist in 2010 that noted the progress India was making under the Manmohan Singh government. On the other hand, Ishakaran Singh Bhandari, a lawyer and popular rightwing influencer, tweeted, asking youngsters to stop reading "western media", alleging it was "nothing but rank Islamist agenda". Dr Vijay Chauthaiwale, the head of the BJP's foreign affairs department, slammed the coverage in The Economist as a "colonial" mentality. He tweeted, "We thought the Brits had left in 1947! But the editors of @TheEconomist are still living in in colonial era. They are furious when 600m Indians do not follow their explicit instructions of not voting Modi. " In May 2019, Time Magazine had described Modi as 'India's divider in chief'. The Time Magazine issued generated much debate online and criticism by the BJP. The lead article's author, Aatish Taseer, was stripped of his Overseas Citizen of India (OCI) card in November 2019. While the government claimed Taseer lost his OCI card as he did not reveal his father was a Pakistani, critics of the Modi government insinuated the move was a response to Taseer's writings.
english
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { HttpClientModule } from "@angular/common/http"; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { NavigationComponent } from './start-page/navigation/navigation.component'; import { RetrievalComponent } from './deployment-model-templates/retrieval/retrieval.component'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { MatCardModule, MatButtonModule, MatInputModule, MatExpansionModule, MatGridListModule, MatSelectModule, MatOptionModule, MatSnackBarModule, MatListModule, MatToolbarModule, MatTooltipModule, MatProgressBarModule, MatDialogModule, MatTableModule, MatStepperModule } from "@angular/material"; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FileInputComponent } from './deployment-model-templates/file-input/file-input.component'; import { TemplateListComponent } from './deployment-model-templates/template-list/template-list.component'; import { MappingListComponent } from './mapping-modules/mapping-list/mapping-list.component'; import { AddMappingComponent } from './mapping-modules/add-mapping/add-mapping.component'; import { AppModelListComponent } from './app-model/app-model-list/app-model-list.component'; import { ComparisonViewComponent } from './app-model/comparison-view/comparison-view.component'; import { ServiceRepoTableComponent } from './repositories/service-repo-table/service-repo-table.component'; import { AddServiceMappingComponent } from './repositories/add-service-mapping/add-service-mapping.component'; import { PropertyRepoTableComponent } from './repositories/property-repo-table/property-repo-table.component'; import { AddPropertyMappingComponent } from './repositories/add-property-mapping/add-property-mapping.component'; import { AddAppModelComponent } from './app-model/add-app-model/add-app-model.component'; import { LandingPageComponent } from './start-page/landing-page/landing-page.component'; import { DeploymentPackagesListComponent } from './deployment-packages/deployment-packages-list/deployment-packages-list.component'; import { AddDeploymentPackageComponent } from './deployment-packages/add-deployment-package/add-deployment-package.component'; @NgModule({ declarations: [ AppComponent, NavigationComponent, RetrievalComponent, FileInputComponent, TemplateListComponent, MappingListComponent, AddMappingComponent, AppModelListComponent, ComparisonViewComponent, ServiceRepoTableComponent, AddServiceMappingComponent, PropertyRepoTableComponent, AddPropertyMappingComponent, AddAppModelComponent, LandingPageComponent, DeploymentPackagesListComponent, AddDeploymentPackageComponent ], imports: [ BrowserModule, AppRoutingModule, MatCardModule, FormsModule, ReactiveFormsModule, MatButtonModule, MatInputModule, MatExpansionModule, BrowserAnimationsModule, MatGridListModule, MatSelectModule, MatOptionModule, HttpClientModule, MatSnackBarModule, MatListModule, MatToolbarModule, MatTooltipModule, MatProgressBarModule, MatDialogModule, MatTableModule, MatStepperModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }
typescript
The benchmark Nifty50 managed to reclaim its 200-day moving average (DMA) on Wednesday but about half of top 500 stocks continue to languish below this key technical indicator. The 200-DMA — nearly a year’s average of closing prices — is analysed by traders to understand the market sentiment. A fall below these levels indicates a weak trend. As many as 117 of the top 500 stocks are trading more than ten per cent below their 200-DMAs, data shows. Among individual stocks, Tanla Platforms, Mastek, and Medplus Health Services are trading more than 30 per cent below their 200-DMA. Meanwhile, stocks like Mazgaon Dock Shipbuilders, KRBL and Cochin Shipyard are comfortably above their 200-DMAs, with Mazgaon Dock 104 per cent higher and Cochin Shipyard 55 per cent higher. TO READ THE FULL STORY, SUBSCRIBE NOW NOW AT JUST RS 249 A MONTH. What you get on Business Standard Premium? - Unlock 30+ premium stories daily hand-picked by our editors, across devices on browser and app. - Pick your 5 favourite companies, get a daily email with all news updates on them. - Full access to our intuitive epaper - clip, save, share articles from any device; newspaper archives from 2006. - Preferential invites to Business Standard events. - Curated newsletters on markets, personal finance, policy & politics, start-ups, technology, and more.
english
<reponame>les-imhotep/gestion-des-missions-back package dev.exceptions; public class InvalidDateException extends ServiceException { }
java
Lukas Westtoft is known for Riders of Justice (2020), Planeten drejer stadig (2016) and Equinox (2020). Known for: - Camera and Electrical Department(2nd unit) How much have you seen? Keep track of how much of Lukas Westtoft’s work you have seen. Go to your list.
english
<reponame>Dacrol/storypalette-editor import uiAuth from '../common/uiAuth/index.js'; angular.module('sp.editor.header', [ 'uiAuth' ]) .controller('HeaderCtrl', function ($scope, $location, $route, auth, httpRequestTracker) { //$scope.isAuthenticated = security.isAuthenticated; //$scope.isAdmin = security.isAdmin; /* $scope.home = function() { if (security.isAuthenticated()) { console.log('HeaderCtrl: Authenticated'); $location.path('/edit'); } else { console.log('HeaderCtrl: Not authenticated'); $location.path('/'); } }; */ // What is this for? $scope.hasPendingRequests = function() { return httpRequestTracker.hasPendingRequests(); }; }) ;
javascript
<gh_stars>0 import {Component} from '@angular/core'; import {NavParams, ViewController} from 'ionic-angular'; import {Dialogs} from "@ionic-native/dialogs"; import * as EmailValidator from 'email-validator'; import {CreativeFounder} from "../../models/dto/create-project.dto"; @Component({ selector: 'page-project-create-add-founder', templateUrl: 'project-create-add-founder.html' }) export class ProjectCreateAddFounderPage { private email: string; private silver: number = 0; private copper: number = 0; private index: number; constructor(private viewCtrl: ViewController, private dialogs: Dialogs, private params: NavParams) { let founder: CreativeFounder = params.get('founder'); this.index = params.get('index'); this.email = founder.email; this.silver = founder.silver; this.copper = founder.copper; } private async addCreativeFounder() { if(!EmailValidator.validate(this.email)) { await this.dialogs.alert( "Please enter a valid email address", "Data error", "OK" ) return; } let founder: CreativeFounder = { name: undefined, email: this.email, silver: this.silver, copper: this.copper }; await this.viewCtrl.dismiss({founder: founder, index: this.index}); } private async dismiss() { await this.viewCtrl.dismiss(undefined); } }
typescript
import contextlib import os import tempfile import warnings from enum import Enum import mip class IISFinderAlgorithm(Enum): DELETION_FILTER = 1 ADDITIVE_ALGORITHM = 2 class SubRelaxationInfeasible(Exception): pass class NonRelaxableModel(Exception): pass class ConflictFinder: """This class groups some IIS (Irreducible Infeasible Set) search algorithms""" def __init__(self, model: mip.Model): if model.status == mip.OptimizationStatus.LOADED: print("model not runned yet, checking if feasible or not") model.emphasis = 1 # feasibility model.preprocess = 1 # -1 automatic, 0 off, 1 on. model.optimize() assert ( model.status == mip.OptimizationStatus.INFEASIBLE ), "model is not linear infeasible" self.model = model def find_iis( self, method: IISFinderAlgorithm = IISFinderAlgorithm.DELETION_FILTER, cbc_verbose: bool = False ) -> mip.ConstrList: """main method to find an IIS, this method is just a grouping of the other implementations Args: model (mip.Model): Infeasible model where to find the IIS method (str, optional): name of the method to use ["deletion-filter", "additive_algorithm"]. Defaults to 'deletion-filter". Returns: mip.ConstrList: IIS constraint list """ # assert ,is not because time limit with contextlib.nullcontext() if cbc_verbose else ignore_output() as iow: if method == IISFinderAlgorithm.DELETION_FILTER: return self.deletion_filter() if method == IISFinderAlgorithm.ADDITIVE_ALGORITHM: return self.additive_algorithm() def deletion_filter(self) -> mip.ConstrList: """deletion filter algorithm for search an IIS Args: model (mip.Model): Infeasible model Returns: mip.ConstrList: IIS """ # 1. create a model with all constraints but one aux_model = self.model.copy() aux_model.objective = 1 aux_model.emphasis = 1 # feasibility aux_model.preprocess = 1 # -1 automatic, 0 off, 1 on. print("starting deletion_filter algorithm") for inc_crt in self.model.constrs: aux_model_inc_crt = aux_model.constr_by_name( inc_crt.name ) # find constraint by name aux_model.remove(aux_model_inc_crt) # temporally remove inc_crt aux_model.optimize() status = aux_model.status # 2. test feasibility, if feasible, return dropped constraint to the set # 2.1 else removed it permanently # print('status {}'.format(status)) if status == mip.OptimizationStatus.INFEASIBLE: # print("removing permanently {}".format(inc_crt.name)) continue elif status in [ mip.OptimizationStatus.FEASIBLE, mip.OptimizationStatus.OPTIMAL, ]: aux_model.add_constr( inc_crt.expr, name=inc_crt.name, priority=inc_crt.priority ) iis = aux_model.constrs return iis def additive_algorithm(self) -> mip.ConstrList: """Additive algorithm to find an IIS Returns: mip.ConstrList: IIS """ # Create some aux models to test feasibility of the set of constraints aux_model_testing = mip.Model() for var in self.model.vars: aux_model_testing.add_var( name=var.name, lb=var.lb, ub=var.ub, var_type=var.var_type, # obj= var.obj, # column=var.column #!! libc++abi.dylib: terminating with uncaught exception of type CoinError ) aux_model_testing.objective = 1 aux_model_testing.emphasis = 1 # feasibility aux_model_testing.preprocess = 1 # -1 automatic, 0 off, 1 on. aux_model_iis = ( aux_model_testing.copy() ) # a second aux model to test feasibility of the incumbent iis # algorithm start all_constraints = self.model.constrs testing_crt_set = mip.ConstrList(model=aux_model_testing) # T iis = mip.ConstrList(model=aux_model_iis) # I while True: for crt in all_constraints: testing_crt_set.add(crt.expr, name=crt.name) aux_model_testing.constrs = testing_crt_set aux_model_testing.optimize() if aux_model_testing.status == mip.OptimizationStatus.INFEASIBLE: iis.add(crt.expr, name=crt.name) aux_model_iis.constrs = iis aux_model_iis.optimize() if aux_model_iis.status == mip.OptimizationStatus.INFEASIBLE: return iis elif aux_model_iis.status in [ mip.OptimizationStatus.FEASIBLE, mip.OptimizationStatus.OPTIMAL, ]: testing_crt_set = mip.ConstrList(model=aux_model_testing) for ( crt ) in ( iis ): # basically this loop is for set T=I // aux_model_iis = iis.copy() testing_crt_set.add(crt.expr, name=crt.name) break def deletion_filter_milp_ir_lc_bd(self) -> mip.ConstrList: """Integer deletion filter algorithm (milp_ir_lc_bd) Raises: NotImplementedError: [description] Returns: mip.ConstrList: [description] """ raise NotImplementedError("WIP") # major constraint sets definition t_aux_model = mip.Model(name="t_auxiliary_model") iis_aux_model = mip.Model(name="t_auxiliary_model") linear_constraints = mip.ConstrList( model=t_aux_model ) # all the linear model constraints variable_bound_constraints = mip.ConstrList( model=t_aux_model ) # all the linear model constrants related specifically for the variable bounds integer_varlist_crt = mip.VarList( model=t_aux_model ) # the nature vars constraints for vartype in Integer/Binary # fill the above sets with the constraints for crt in self.model.constrs: linear_constraints.add(crt.expr, name=crt.name) for var in self.model.vars: if var.lb != -mip.INF: variable_bound_constraints.add( var >= var.lb, name="{}_lb_crt".format(var.name) ) if var.ub != mip.INF: variable_bound_constraints.add( var <= var.ub, name="{}_ub_crt".format(var.name) ) for var in self.model.vars: if var.var_type in (mip.INTEGER, mip.BINARY): integer_varlist_crt.add(var) status = "IIS" # add all LC,BD to the incumbent, T= LC + BD for ( var ) in ( self.model.vars ): # add all variables as if they where CONTINUOUS and without bonds (because this will be separated) iis_aux_model.add_var( name=var.name, lb=-mip.INF, ub=mip.INF, var_type=mip.CONTINUOUS ) for crt in linear_constraints + variable_bound_constraints: iis_aux_model.add_constr(crt.expr, name=crt.name, priority=crt.priority) iis_aux_model.optimize() if iis_aux_model.status == mip.OptimizationStatus.INFEASIBLE: # if infeasible means that this is a particular version of an LP return self.deletion_filter() # (STEP 2) # add all the integer constraints to the model iis_aux_model.vars.remove( [var for var in integer_varlist_crt] ) # remove all integer variables for var in integer_varlist_crt: iis_aux_model.add_var( name=var.name, lb=-mip.INF, ub=mip.INF, var_type=var.var_type, # this will add the var with his original type ) # filter IR constraints that create infeasibility (STEP 1) for var in integer_varlist_crt: iis_aux_model.vars.remove(iis_aux_model.var_by_name(var.name)) iis_aux_model.add_var( name=var.name, lb=-mip.INF, ub=mip.INF, var_type=mip.CONTINUOUS, # relax the integer constraint over var ) iis_aux_model.optimize() # if infeasible then update incumbent T = T-{ir_var_crt} # else continue # STEP 2 filter lc constraints # STEP 3 filter BD constraints # return IS o IIS def deletion_filter_milp_lc_ir_bd(self) -> mip.ConstrList: raise NotImplementedError # TODO class ConflictRelaxer: def __init__(self, model: mip.Model): if model.status == mip.OptimizationStatus.LOADED: print("model not runned yet, checking if feasible or not") model.emphasis = 1 # feasibility model.preprocess = 1 # -1 automatic, 0 off, 1 on. model.optimize() assert ( model.status == mip.OptimizationStatus.INFEASIBLE ), "model is not linear infeasible" self.model = model self.iis_num_iterations = 0 self.iis_iterations = [] self.relax_slack_iterations = [] @property def slack_by_crt(self) -> dict: answ = {} for slack_dict_iter in self.relax_slack_iterations: for crt_name in slack_dict_iter.keys(): if crt_name in answ.keys(): answ[crt_name] += slack_dict_iter[crt_name] else: answ[crt_name] = slack_dict_iter[crt_name] return answ def hierarchy_relaxer( self, relaxer_objective: str = "min_abs_slack_val", default_priority: mip.constants.ConstraintPriority = mip.constants.ConstraintPriority.MANDATORY, cbc_verbose: bool = False ) -> mip.Model: """hierarchy relaxer algorithm, it's gonna find a IIS and then relax it using the objective function defined (`relaxer_objective`) and then update the model with the relaxed constraints. This process runs until there's not more IIS on the model. Args: relaxer_objective (str, optional): objective function of the relaxer model (IIS relaxer model). Defaults to 'min_abs_slack_val'. default_priority (ConstraintPriority, optional): If a constraint does not have a supported substring priority in the name, it will assign a default priority. Defaults to ConstraintPriority.MANDATORY. Raises: NonRelaxableModel: [description] Returns: mip.Model: relaxed model """ relaxed_model = self.model.copy() relaxed_model._status = self.model._status # TODO solve this in a different way # map unmaped constraitns to default for crt in relaxed_model.constrs: if not crt.priority: crt.priority = default_priority iis_it = 0 iis_dict = {} taboo_list_iis = [] cf = ConflictFinder(relaxed_model) while True: # 1. find iis iis = cf.find_iis(IISFinderAlgorithm.DELETION_FILTER) self.iis_iterations.append([crt.name for crt in iis]) # track iteration self.iis_num_iterations += 1 # track iteration iis_priority_set = set([crt.priority for crt in iis]) # check if "relaxable" model mapping if iis_priority_set == set([mip.constants.ConstraintPriority.MANDATORY]): raise NonRelaxableModel("Infeasible model, is not possible to relax MANDATORY constraints") # 2. relax iis with contextlib.nullcontext() if cbc_verbose else ignore_output() as iow: for level, relaxing_level in enumerate(sorted(iis_priority_set, key=lambda x: x.value)): # highest case (raise exception) if relaxing_level == mip.constants.ConstraintPriority.MANDATORY: raise NonRelaxableModel("Infeasible model, is not possible to relax MANDATORY constraints") try: slack_dict = self.relax_iis(iis, relaxer_objective=relaxer_objective, lowest_priority=relaxing_level) except SubRelaxationInfeasible as e: warnings.warn(f'Warning relaxing more than one level, currently on l{level} : {relaxing_level}') continue else: # relaxable iis, this is will continue with the next iteration then break self.relax_slack_iterations.append(slack_dict) # 3. add the slack variables to the original problem with contextlib.nullcontext() if cbc_verbose else ignore_output() as iow: relaxed_model = self.relax_constraints(relaxed_model, slack_dict) # 4. check if feasible relaxed_model.emphasis = 1 # feasibility with contextlib.nullcontext() if cbc_verbose else ignore_output() as iow: relaxed_model.optimize() if relaxed_model.status in [ mip.OptimizationStatus.FEASIBLE, mip.OptimizationStatus.OPTIMAL, ]: print("finished relaxation process !") break else: print( "relaxed the current IIS, still infeasible, searching for a new IIS to relax" ) print("relaxed constraints {0}".format(list(slack_dict.keys()))) iis_it += 1 # print(f'found iis_{iis_it} = {[crt.name for crt in iis]}') iis_dict[iis_it] = {} iis_crt = [crt.name for crt in iis] iis_dict[iis_it]['iis'] = [{'name': crt.name, 'priority': str(crt.priority).split('.')[1]} for crt in iis] print(f'found iis_{iis_it} : len = {len(iis_crt)} in_taboo = {(iis_crt in taboo_list_iis)}') taboo_list_iis.append(iis_crt) iis_dict[iis_it]['slack'] = slack_dict return relaxed_model @classmethod def relax_iis( cls, iis: mip.ConstrList, relaxer_objective: str = "min_abs_slack_val", lowest_priority: 'mip.constants.ConstraintPriority' = None ) -> dict: """This function is the sub module that finds the optimum relaxation for an IIS, given a crt priority mapping and a objective function Args: iis (mip.ConstrList): IIS constraint list relaxer_objective (str, optional): objective function to use when relaxing. Defaults to 'min_abs_slack_val'. Returns: dict: a slack variable dictionary with the value of the {constraint_name:slack.value} pair to be added to each constraint in order to make the IIS feasible """ relax_iis_model = mip.Model() if lowest_priority is None: lowest_priority = min([crt.priority for crt in iis]) to_relax_crts = [crt for crt in iis if crt.priority == lowest_priority or crt.priority < lowest_priority] # create a model that only contains the iis slack_vars = {} abs_slack_vars = {} abs_slack_cod_vars = {} for crt in iis: # print(crt.name, crt.priority) for var in crt._Constr__model.vars: relax_iis_model.add_var( name=var.name, lb=var.lb, ub=var.ub, var_type=var.var_type, obj=var.obj, ) if crt in to_relax_crts: # if this is a -to be relax- constraint slack_vars[crt.name] = relax_iis_model.add_var( name="{0}__{1}".format(crt.name, "slack"), lb=-mip.INF, ub=mip.INF, var_type=mip.CONTINUOUS, ) abs_slack_vars[crt.name] = relax_iis_model.add_var( name="{0}_abs".format(slack_vars[crt.name].name), lb=0, ub=mip.INF, var_type=mip.CONTINUOUS, ) # add relaxed constraint to model relax_expr = crt.expr + slack_vars[crt.name] relax_iis_model.add_constr( relax_expr, name="{}_relaxed".format(crt.name), ) # add abs(slack) variable encoding constraints relax_iis_model.add_constr( abs_slack_vars[crt.name] >= slack_vars[crt.name], name="{}_positive_min_bound".format(slack_vars[crt.name].name), ) relax_iis_model.add_constr( abs_slack_vars[crt.name] >= -slack_vars[crt.name], name="{}_negative_min_bound".format(slack_vars[crt.name].name), ) else: # if not to be relaxed we added directly to the model relax_iis_model.add_constr( crt.expr, name="{}_original".format(crt.name), priority=crt.priority ) # find the min abs value of the slack variables relax_iis_model.objective = mip.xsum(list(abs_slack_vars.values())) relax_iis_model.sense = mip.MINIMIZE relax_iis_model.optimize() if relax_iis_model.status == mip.OptimizationStatus.INFEASIBLE: raise SubRelaxationInfeasible("sub relaxation model infeasible, this could mean that in the IIS the mandatory constraints are infeasible sometimes") slack_dict = {} for crt in to_relax_crts: slack_dict[crt.name] = slack_vars[crt.name].x return slack_dict @classmethod def relax_constraints(cls, relaxed_model: mip.Model, slack_dict: dict) -> mip.Model: """this method creates a modification of the model `relaxed_model` where all the constraints in the slack_dict are modified in order to add the slack values to make the IIS disappear Args: relaxed_model (mip.Model): model to relax slack_dict (dict): pairs {constraint_name: slack_var.value} Returns: mip.Model: a modification of the original model where all the constraints are modified with the slack values """ for crt_name in slack_dict.keys(): crt_original = relaxed_model.constr_by_name(crt_name) relax_expr = crt_original.expr + slack_dict[crt_name] relaxed_model.add_constr( relax_expr, name=crt_original.name, priority=crt_original.priority ) relaxed_model.remove(crt_original) # remove constraint return relaxed_model @contextlib.contextmanager def ignore_output(): with tempfile.TemporaryFile() as f: orig_std_out = os.dup(1) os.dup2(f.fileno(), 1) yield # pause the coroutine to execute the with code os.dup2(orig_std_out, 1) os.close(orig_std_out)
python
Prime Minister Narendra Modi will virtually inaugurate 11 medical colleges in Tamil Nadu today, January 12. Along with the medical colleges, a new campus of Central Institute of Classical Tamil will also be inaugurated in Chennai. The new medical colleges have been established at an estimated cost of about Rs 4,000 crore, of which around Rs 2,145 crore has been provided by the Centre and the rest by the Tamil Nadu government, according to an official statement. The districts in which the new Medical Colleges are being established include Virudhunagar, Namakkal, Nilgiris, Tiruppur, Thiruvallur, Nagapattinam, Dindigul, Kallakurichi, Ariyalur, Ramanathapuram and Krishnagiri. The new medical colleges, with a cumulative capacity of 1,450 seats, are being established under the centrally-sponsored scheme 'Establishing of New Medical Colleges attached with existing district/referral hospital'. According to the Prime Minister's Office (PMO), MBBS seats have increased by 79. 60 per cent (from 51,348 seats to 92,222 seats) and the number of PG seats have increased by 80. 70 per cent (from 31,185 seats to 56,374 seats) during the last seven years. The total medical seats before 2014 were around 82,500 and in the last seven years, a jump of around 80 per cent or 66,000 seats has taken place, the PMO said. The total number of medical colleges (both government and private) has increased from 387 to 596, a jump of around 54 per cent, it said.
english
{ "compilerOptions": { "incremental": true /* Enable incremental compilation */, "target": "es6" /* Specify ECMAScript target version: */, "module": "es6" /* 'none', 'commonjs', 'amd', 'system', etc */, "declaration": true /* Concatenate & emit output to single file.*/, "outDir": "lib" /* Redirect output to the directory. */, "esModuleInterop": true /* Enables intero between CommonJS and ES */, "skipLibCheck": true /* Skip type checking of declaration files. */, "forceConsistentCasingInFileNames": true, /* Disallow inconsistently */ "tsBuildInfoFile": "./.buildcache/", "allowJs": true, "moduleResolution": "node", }, "include": ["src"] }
json
#include "stdafx.h" #include "Camera.h" #include "Engine.h" void CameraTPSController::Update() { HWND k = GetForegroundWindow(); if ( k != Engine.m_Renderer.m_Window.m_Hwnd ) { return; } XMVECTOR direction = m_Cam.Focus - m_Cam.Eye; XMVECTOR magnitude = XMVector3Length( direction ); direction = XMVector3Normalize( direction ); XMVECTOR upnorm = XMVector3Normalize( m_Cam.Up ); XMVECTOR right = XMVector3Cross( direction, upnorm ); XMVECTOR forewardVec = direction * (m_MoveSpeed * Engine.m_Time.m_Diff); if ( m_Forward ) { m_Cam.Eye += forewardVec; m_Cam.Focus += forewardVec; } else if ( m_Backward ) { m_Cam.Eye -= forewardVec; m_Cam.Focus -= forewardVec; } XMVECTOR strafeVec = -right * (m_MoveSpeed * Engine.m_Time.m_Diff); if ( m_StrafeRight ) { m_Cam.Eye += strafeVec; m_Cam.Focus += strafeVec; } else if ( m_StrafeLeft ) { m_Cam.Eye -= strafeVec; m_Cam.Focus -= strafeVec; } POINT p; GetCursorPos( &p ); m_MouseDiffX = p.x - 500; m_MouseDiffY = p.y - 500; SetCursorPos( 500, 500 ); if ( m_MouseDiffY != 0 ) { XMVECTOR direction = m_Cam.Focus - m_Cam.Eye; XMVECTOR magnitude = XMVector3Length( direction ); direction = XMVector3Normalize( direction ); XMVECTOR upnorm = XMVector3Normalize( m_Cam.Up ); XMVECTOR right = XMVector3Cross( direction, upnorm ); XMMATRIX rotation = XMMatrixRotationNormal( -right, XMConvertToRadians( (float)m_MouseDiffY * m_RotationSpeed ) ); m_Cam.Focus = (XMVector3Transform( direction, rotation ) * magnitude) + m_Cam.Eye; m_Cam.Up = XMVector3Transform( m_Cam.Up, rotation ); } if ( m_MouseDiffX != 0 ) { XMVECTOR direction = m_Cam.Focus - m_Cam.Eye; XMVECTOR magnitude = XMVector3Length( direction ); direction = XMVector3Normalize( direction ); XMVECTOR upnorm = XMVector3Normalize( m_Cam.Up ); XMVECTOR right = XMVector3Cross( direction, upnorm ); XMMATRIX rotation = XMMatrixRotationNormal( XMVectorSet( 0.0f, 1.0f, 0.0f, 0 ), XMConvertToRadians( (float)m_MouseDiffX * m_RotationSpeed ) ); m_Cam.Focus = (XMVector3Transform( direction, rotation ) * magnitude) + m_Cam.Eye; m_Cam.Up = XMVector3Transform( m_Cam.Up, rotation ); } m_Cam.Update(); }
cpp
<reponame>bluethon/lightweight-django<gh_stars>0 CMD === ``` python python manage migrate python manage ```
markdown
<filename>tasks/tests/test_tasks_filters.py from django.db.models.query import QuerySet import pytest from tasks.models import Priority, Task, Status from users.models import User, Team, Role pytestmark = pytest.mark.django_db class DBPrepare: """ Create an employee test user """ @staticmethod def create_example_employee(username): team = Team.objects.first() employee = User.create_user(username=username, email="<EMAIL>", password='<PASSWORD>', first_name="Test", last_name="Test", role=Role.EMPLOYEE, team=team) return employee """ Create a manager test user """ @staticmethod def create_example_manager(username): team = Team.objects.first() manager = User.create_user(username=username, email="<EMAIL>", password='<PASSWORD>', first_name="Test", last_name="Test", role=Role.MANAGER, team=team) return manager """ Create a test team """ @staticmethod def create_example_team(): team = Team.objects.create(name="TestTeam", description="Test Team") return team """ Create a test task """ @staticmethod def create_example_task(assignee, assigner, priority, status): title = "Test task" description = 'Test' task = Task.objects.create( title=title, created_by=assigner, assignee=assignee, status=status, priority=priority, description=description) return task @pytest.mark.django_db class TestTasksFilters: """ Add test data to database """ @pytest.fixture def prepare_database(self): DBPrepare.create_example_team() manager = DBPrepare.create_example_manager("TestManager") for i in range(5): employee = DBPrepare.create_example_employee(f'TestUser{i}') DBPrepare.create_example_task(employee, manager, Priority.LOW, Status.BACKLOG) DBPrepare.create_example_task(employee, manager, Priority.MEDIUM, Status.IN_PROGRESS) DBPrepare.create_example_task(employee, manager, Priority.HIGH, Status.DONE) """ Test filtering tasks by priority """ def test_priority_filter(self, prepare_database): for priority in (Priority.LOW, Priority.HIGH, Priority.MEDIUM): priority_tasks = Task.objects.filter(priority=priority) filtered_tasks = Task.filter_by_symbol(priority) assert isinstance(filtered_tasks, QuerySet) assert all(isinstance(task, Task) for task in filtered_tasks) assert len(filtered_tasks) == len(priority_tasks) assert all(p == priority for p in filtered_tasks.values_list('priority', flat=True)) """ Test that it is impossible to filter using invalid value """ def test_invalid_priority_filter(self, prepare_database): with pytest.raises(ValueError): Task.filter_by_symbol('INVALID') """ Test filtering tasks by asignee id """ def test_assignee_filter(self, prepare_database): assignee_task = Task.objects.filter(assignee_id=2) filtered_tasks = Task.filter_by_assignee(2) assert isinstance(filtered_tasks, QuerySet) assert all(isinstance(task, Task) for task in filtered_tasks) assert len(filtered_tasks) == len(assignee_task) assert all(assignee_id == 2 for assignee_id in filtered_tasks.values_list('assignee', flat=True)) """ Test that it is impossible to filter using invalid value """ def test_invalid_assignee_filter(self): with pytest.raises(ValueError): Task.filter_by_assignee(-2) with pytest.raises(TypeError): Task.filter_by_assignee('INVALID') """ Test filtering tasks by status """ def test_status_filter(self, prepare_database): for status in Status: status_tasks = Task.objects.filter(status=status) filtered_tasks = Task.filter_by_status(status) assert isinstance(filtered_tasks, QuerySet) assert all(isinstance(task, Task) for task in filtered_tasks) assert len(filtered_tasks) == len(status_tasks) assert all(s == status for s in filtered_tasks.values_list('status', flat=True)) """ Test that it is impossible to filter using invalid value """ def test_invalid_status_filter(self, prepare_database): with pytest.raises(ValueError): Task.filter_by_status('INVALID') """ Test filtering by team """ def test_team_filter(self, test_db): team = test_db[0][0] assert isinstance(team, Team) filtered_tasks = Task.filter_by_team(team) assert isinstance(filtered_tasks, QuerySet) assert len(filtered_tasks) > 0 assert all(isinstance(task, Task) for task in filtered_tasks) assert all(task.assignee.team == team for task in filtered_tasks) """ Test that it is impossible to filter using invalid value """ @pytest.mark.parametrize("invalid_input", ["INVALID VALUE", None, 2]) def test_invalid_team_filter(self, invalid_input): with pytest.raises(Exception): Team.filter_by_team(invalid_input)
python
from time import sleep debug_mode = False time_to_exit = False exiting = False exit_code = 0 def get_debug_mode(): return debug_mode def trigger_exit(_exit_code): global time_to_exit, exit_code exit_code = _exit_code time_to_exit = True sleep(0.1)
python
<reponame>vestylsoftware/d3-annotation import annotation from './src/Adapter-d3' import { Type, d3Label, d3Callout, d3CalloutCurve, d3CalloutElbow, d3CalloutCircle, d3CalloutRect, d3XYThreshold, d3Badge, customType } from './src/Types-d3' // steve here export { annotation, Type as annotationTypeBase , d3Label as annotationLabel , d3Callout as annotationCallout , d3CalloutCurve as annotationCalloutCurve , d3CalloutElbow as annotationCalloutElbow , d3CalloutCircle as annotationCalloutCircle , d3CalloutRect as annotationCalloutRect , d3XYThreshold as annotationXYThreshold , d3Badge as annotationBadge , customType as annotationCustomType } export default { annotation, annotationTypeBase : Type, annotationLabel : d3Label, annotationCallout : d3Callout, annotationCalloutCurve : d3CalloutCurve, annotationCalloutElbow : d3CalloutElbow, annotationCalloutCircle : d3CalloutCircle, annotationCalloutRect : d3CalloutRect, annotationXYThreshold : d3XYThreshold, annotationBadge : d3Badge, annotationCustomType : customType }
javascript
A Golden Globe and the Oscar, RRR has taken the world by storm. So, what made it stand out among the bigwigs? A right mix of social media, influencer trends, shout out from celebrities, and a reported lavish spend of INR80 crore on marketing and campaigning. But then, who is complaining? Share member-only stories with your friends or family and help them read it for free. Gifting Limit Reached! , no more stories left for you to gift. 15 stories next month to share with your friends and family. Stories Left! Continue reading with one of these options: Uh-oh! This is an exclusive story available for selected readers only. Worry not. You’re just a step away. Sign In to Read for Free Prime Account Detected! Already a Member? Already a Member? (Credit card mandatory) (Pay Using Netbanking/UPI/Debit Card) Already a Member?
english
<reponame>dotKokott/APartOfMe<gh_stars>0 { "name": "a-part-of-me", "version": "1.0.0", "description": "Code for \"Ask Something\" exhibition piece at ACUD Berlin - 23rd February", "main": "index.js", "scripts": { "test": "test" }, "repository": { "type": "git", "url": "git+https://github.com/dotKokott/APartOfMe.git" }, "author": "<NAME>", "license": "MIT", "bugs": { "url": "https://github.com/dotKokott/APartOfMe/issues" }, "homepage": "https://github.com/dotKokott/APartOfMe#readme", "dependencies": { "express": "^4.14.1", "johnny-five": "^0.10.6", "robotjs": "^0.4.5", "serialport": "^4.0.7", "socket.io": "^1.7.3", "tween.js": "^16.6.0" } }
json
/* eslint-disable */ export type MsgVpnAclProfilePublishExceptionLinks = { /** * The URI of this Publish Topic Exception object. */ uri?: string; } export namespace MsgVpnAclProfilePublishExceptionLinks { /** * the discriminator for the model if required for more complex api's */ export const discriminator = 'MsgVpnAclProfilePublishExceptionLinks'; }
typescript
<gh_stars>0 System.register(["../utils/backend.js"], function (_export, _context) { "use strict"; var backend_error, python_call, DatabasesPage; _export("DatabasesPage", void 0); return { setters: [function (_utilsBackendJs) { backend_error = _utilsBackendJs.backend_error; python_call = _utilsBackendJs.python_call; }], execute: function () { _export("DatabasesPage", DatabasesPage = class DatabasesPage extends React.Component { constructor(props) { // parameters: {databases: [{name, path}]} // app: App super(props); this.state = { name: "", paths: new Set(), update: true }; this.onChangeName = this.onChangeName.bind(this); this.addFolder = this.addFolder.bind(this); this.addFile = this.addFile.bind(this); this.removePath = this.removePath.bind(this); this.createDatabase = this.createDatabase.bind(this); this.openDatabase = this.openDatabase.bind(this); this.onChangeUpdate = this.onChangeUpdate.bind(this); } render() { const paths = Array.from(this.state.paths); paths.sort(); return /*#__PURE__*/React.createElement("div", { id: "databases", className: "text-center" }, /*#__PURE__*/React.createElement("h1", null, "Welcome to ", window.PYTHON_APP_NAME), /*#__PURE__*/React.createElement("table", { className: "w-100 table-layout-fixed" }, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("h2", null, "Create a database"), /*#__PURE__*/React.createElement("div", { className: "p-1" }, /*#__PURE__*/React.createElement("input", { type: "text", className: "w-100", value: this.state.name, onChange: this.onChangeName, placeholder: "Database name." })), /*#__PURE__*/React.createElement("h3", null, "Database folders and files"), /*#__PURE__*/React.createElement("table", { className: "w-100 table-layout-fixed" }, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("button", { className: "block", onClick: this.addFolder }, "Add folder")), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("button", { className: "block", onClick: this.addFile }, "Add file")))), /*#__PURE__*/React.createElement("table", { className: "w-100 table-layout-fixed" }, paths.map((path, index) => /*#__PURE__*/React.createElement("tr", { key: index }, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("code", null, path)), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("button", { className: "block", onClick: () => this.removePath(path) }, "-"))))), /*#__PURE__*/React.createElement("div", { className: "p-1" }, /*#__PURE__*/React.createElement("button", { className: "block", onClick: this.createDatabase }, "create database"))), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("h2", null, "Open a database (", this.props.parameters.databases.length, " available)"), /*#__PURE__*/React.createElement("div", { className: "p-1" }, /*#__PURE__*/React.createElement("input", { type: "checkbox", id: "update", checked: this.state.update, onChange: this.onChangeUpdate }), " ", /*#__PURE__*/React.createElement("label", { htmlFor: "update" }, "update after opening")), /*#__PURE__*/React.createElement("h3", null, "Click on a database to open it"), this.props.parameters.databases.map((database, index) => /*#__PURE__*/React.createElement("div", { className: "p-1", key: index }, /*#__PURE__*/React.createElement("button", { className: "block", onClick: () => this.openDatabase(database.path) }, database.name))))))); } onChangeName(event) { const name = event.target.value; if (this.state.name !== name) { this.setState({ name }); } } onChangeUpdate(event) { this.setState({ update: event.target.checked }); } addFolder() { python_call("select_directory").then(directory => { if (directory) { const paths = new Set(this.state.paths); paths.add(directory); this.setState({ paths }); } }).catch(backend_error); } addFile() { python_call("select_file").then(file => { if (file) { const paths = new Set(this.state.paths); paths.add(file); this.setState({ paths }); } }).catch(backend_error); } removePath(path) { const paths = new Set(this.state.paths); paths.delete(path); this.setState({ paths }); } createDatabase() { this.props.app.dbUpdate("create_database", this.state.name, Array.from(this.state.paths), this.state.update); } openDatabase(path) { this.props.app.dbUpdate("open_database", path, this.state.update); } }); } }; });
javascript
define({ //Type your controller code here mylongpress: function(commonWidget, gestureInfo) { this.view.lblGesture.text = "A longpress gesture was performed for " + gestureInfo.gesturesetUpParams.pressDuration + " Seconds"; }, addLongPressGesture: function() { var getTime = parseInt(this.view.lstbx.selectedKey); var longConfig = { pressDuration: getTime }; gesturehandle = this.view.FlexContainer0e9c0b42fdc6949.addGestureRecognizer(constants.GESTURE_TYPE_LONGPRESS, longConfig, this.mylongpress); } });
javascript
<reponame>dave-wathen/legend-engine package org.finos.legend.engine.external.format.flatdata.shared.driver.core; import org.finos.legend.engine.external.format.flatdata.shared.driver.core.connection.InputStreamConnection; import org.finos.legend.engine.external.format.flatdata.shared.model.FlatDataSection; import org.finos.legend.engine.external.format.flatdata.shared.driver.spi.FlatDataReadDriver; import org.finos.legend.engine.external.format.flatdata.shared.driver.spi.FlatDataProcessingContext; import org.finos.legend.engine.external.format.flatdata.shared.driver.spi.RecordTypeMultiplicity; public class ImmaterialLinesDriverDescription extends StreamingDriverDescription { @Override public String getId() { return ImmaterialLinesReadDriver.ID; } @Override public FlatDataReadDriver newReadDriver(FlatDataSection section, FlatDataProcessingContext context) { if (!(context.getConnection() instanceof InputStreamConnection)) { throw new RuntimeException("Invalid connection type for this driver"); } return new ImmaterialLinesReadDriver(section, context); } @Override public RecordTypeMultiplicity getRecordTypeMultiplicity() { return RecordTypeMultiplicity.NONE; } @Override public boolean isSelfDescribing() { return true; } }
java
The victims were employees at a brick kiln in Kurukshetra and the incident took place on Tuesday when they were washing clothes near a water tank, the wall of which collapsed suddenly. Kareena Kapoor shared a family photo featuring Raj Kapoor, Babita, and Karisma Kapoor. Here's how fans have reacted. Kareena Kapoor, Karisma Kapoor, Babita and Randhir Kapoor, Rima Jain, Armaan Jain, Aadar Jain, and Anissa Malhotra Jain celebrated Ganesh Chaturthi together. Kareena Kapoor shared a picture as she and Saif Ali Khan met her parents Randhir Kapoor and Babita at Randhir's house. Kareena Kapoor said in a two-decade old interview that her grandfather Raj Kapoor loved her sister Karisma Kapoor much more and she always felt left out. Kareena Kapoor and Karisma Kapoor shared posts for their mother Babita on Mother's Day. Here's how they celebrated the occasion. See pics here. Kareena Kapoor and Karisma Kapoor celebrated mom Babita's 75th birthday with cake and lunch. Check out the pictures here. Saif Ali Khan, Kareena Kapoor Khan, Karisma Kapoor, Rima Jain, and Neetu Kapoor were spotted at Randhir Kapoor's house on Thursday for Babita's birthday. The former actor has turned 75. TMKOC's Dilip-Munmun shake hands at event, fan says: 'Jethaji idhar bhi flirt' Taarak Mehta Ka Ooltah Chashmah's Dilip Joshi and Munmun Dutta smiled and greeted each other at the Indian Television Academy (ITA) Awards. Here's how fans teased them. Watch video. Kareena Kapoor, Taimur Ali Khan, Karisma Kapoor, Jehangir Ali Khan and Neetu Kapoor visited Randhir Kapoor's home. See their pictures here. On Randhir Kapoor's birthday, Kareena Kapoor wished her father with a throwback memory. Randhir turned 75 on Tuesday. Randhir, Babita, Karisma, Kareena huddle up for a cute family pic: 'My world' Kareena Kapoor shared a picture with her parents Randhir Kapoor and Babita along with her sister Karisma Kapoor on Saturday. She called them ‘my world'. Kareena shares old pic with Karisma-Babita, fan says 'you were same like Taimur' Kareena Kapoor Khan has shared a picture from her childhood with sister Karisma Kapoor and mother Babita. See here. Karisma says she initially rejected Dil To Pagal Hai: 'All heroines refused it' Karisma Kapoor has opened up about initially rejecting Dil To Pagal Hai. She added how her mother Babita encouraged her to take up the role. Kareena Kapoor once spoke about her elder sister Karisma Kapoor's days of struggle as an actor. Kareena talked about how she would hide and watch Karisma cry to their mother, Babita Kapoor. Randhir discharged from hospital: 'I am feeling absolutely fine' Randhir Kapoor has been discharged from the hospital, a few weeks after he tested positive for Covid-19. Speaking on his health, the actor has said that he is feeling fine. Actor Kareena Kapoor on Sunday shared a picture from her childhood, featuring her mother Babita and sister Karisma Kapoor on the occasion of Mother's Day. See here. Randhir Kapoor, who is admitted to a Mumbai hospital after testing positive to Covid-19, spoke about his two brothers, Rishi Kapoor and Rajiv Kapoor and how life will never be the same without them. Randhir Kapoor will sell his ancestral home in Chembur area of Mumbai. He will move near the residences of his wife Babita and daughters Karisma Kapoor and Kareena Kapoor. Did you know Kareena Kapoor was named Siddhima to rhyme with cousin Riddhima? Kareena Kapoor was reportedly named Siddhima by her late grandfather Raj Kapoor, in order to rhyme with her cousin Riddhima, who was born six days before the actor's birthday during the Ganpati festival. Amid countdown to Kareena Kapoor's delivery, her mother Babita and sister Karisma Kapoor paid her a visit at her residence on Wednesday. Saif Ali Khan's son Ibrahim Ali Khan was also spotted. On Randhir Kapoor's birthday, let us look at his long endearing friendship with wife Babita. The two got separated in 1988 but never got divorced, continuing to be friends and the best parents to their children.
english
Virtual birdie stand started with an aim to induce the value and importance of the existence of various distinct species of birds around the world with the help of advance technology like 3D virtual world, human gesture and motion recognitions controls at 2 sites – one at Museum Sector 10 Chandigarh and other at Sukhna Lake Chandigarh. Concept was implemented by a Rajasthan based in collaboration with Reliance Jio under CSR for UT Chandigarh. The Nature Interpretation Centre, located near Sukhna Lake, was updated with some interactive 3D images of migrating birds to enhance the experience of bird lovers as well as other visitors. It’s been 2 months and people seem to be enjoying this new feature. The pictures were installed by Jaipur-based Technology Consulting Company. The images are linked to a mobile application, Digiwings. This application not only displays 3D images of the birds but one can also listen to the voice of birds as well as get to know more details about the avian species. The app also provides interesting facts about Sukhna Lake. Approximately 150 visitors come to visit the museum on weekdays whereas nearly 500 people visit the museum during weekends. The Nature Interpretation Centre is divided into two sections and about 30 photos are there at the museum. One section is about birds and the other is about animals. In the birds section, a machine is being installed in which there are many pictures of different birds. It works with the help of a keyboard which has different buttons with the birds’ name and if you press the button of any specific bird, the machine will highlight the bird and will make its sound. One can capture the bird and click its image with the gestures. A person can get the image which the machine captured by scanning the QR code given in the mobile application of the user. This unique initiative is one of its kind and will be prime manifest for UT Chandigarh at international level. The initiative has helped to attract tourists from different parts of the world to visit city beautiful. Besides, it also aides in learnings and knowledge sharing among the citizens especially students about various species of birds.
english
After a good start, Rajinikanth's 2point0 has been doing well at the box office. During the weekend, the collections of the film has been extremely impressive. Not only in India, the overseas market too has picked up unbeleivebly. Rajini's charishma has proved once again that he is an international star and can work wonders at the box office. Prior to its release, the grand audio launch event of 2. 0 was celebrated at Dubai at the lavish Burj Park which created curiosity among the Dubai audience. According to the buzz on social media, in Dubai, the movie has collected Rs 8. 09 crores without 3D Charge and Rs 10. 37 crores including 3D charges. Here is the tweet. Of course, 2point0 has stormed the Indian box office. Rajinikanth has made a fantastic comeback with this film after his last two debacles--kabali and kaala. His upcoming film Petta is on sets and the first single of Petta is releasing on December 3rd at 6 pm. Young talented director Karthik Subbaraj is the director and music is being scores by Anirudh. Petta is produced by Sun Pictures.
english
Begin typing your search above and press return to search. In the women's 400m freestyle relay final, Australia grabbed a new world record in 3:29. 69 on Sunday. The previous two records were also held by the Australians.
english
When it comes to improving and maintaining our relationships with others, Stephen Covey’s metaphor of the Emotional Bank Account is probably one of the most powerful ideas ever created for the development of interpersonal relationships. If you’ve never heard of this, it basically means that anyone with whom we have a relationship with, whether it be our coworkers, family or friends, we maintain a personal “emotional” bank account with them. This account begins on a neutral balance. And just as with any bank account, we can make deposits and withdrawals. However, instead of dealing with units of monetary value, we deal with emotional units. The emotional units that Covey speaks of are centered around trust. When we make emotional deposits into someone’s bank account, their fondness, trust, and confidence in us grows. And as a result our relationship develops and grows. If we can keep a positive reserve in our relationships, by making regular deposits, there will be greater tolerance for our mistakes and we’ll enjoy open communication with that person. On the contrary, when we make withdrawals and our balance becomes low or even overdrawn, bitterness, mistrust and discord develops. If we are to salvage the relationship, we must make a conscious effort to make regular deposits. This post will discuss Covey’s six major ways of making deposits into these Emotional Bank Accounts and how we can avoid making withdrawals.
english
<filename>src/app/blog/blog.module.ts<gh_stars>0 import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { SharedModule } from '@shared/shared.module'; import { BlogRoutingModule } from './blog-routing.module'; import { MainComponent } from './components/main/main.component'; @NgModule({ declarations: [MainComponent], imports: [CommonModule, BlogRoutingModule, SharedModule], }) export class BlogModule {}
typescript
package cloud.timo.TimoCloud.bungeecord.api; import cloud.timo.TimoCloud.api.internal.TimoCloudInternalMessageAPI; import cloud.timo.TimoCloud.bungeecord.TimoCloudBungee; public class TimoCloudInternalMessageAPIBungeeImplementation implements TimoCloudInternalMessageAPI { @Override public void sendMessageToCore(String message) { TimoCloudBungee.getInstance().getSocketClientHandler().sendMessage(message); } }
java
<reponame>nicholascw/tgbot-cpp<filename>docs/search/files_c.js<gh_stars>0 var searchData= [ ['orderinfo_2eh',['OrderInfo.h',['../_order_info_8h.html',1,'']]] ];
javascript
<gh_stars>0 { "state": "NM", "fips5": "35025", "adminarea": "Lea", "urlvbmdropboxes": "https://www.leacounty.net/p/elected-officials/lea-county-clerk", "urlearlyvoting": "https://d38trduahtodj3.cloudfront.net/files.ashx?t=fg&rid=LeaCounty&f=EARLY_and_ABSENTEE_NOTICE(8).pdf", "urlstatelevelvbm": "https://www.sos.state.nm.us/voting-and-elections/voter-information-portal/absentee-and-early-voting/", "flagboxes": 0, "areadatacode": 353, "arealeveltext": "Your county DOES NOT have ballot dropboxes. The SHOW DROP-OFF OPTIONS button will take you to the county webpage which shows the address for your County Clerk's office, where you can hand deliver your completed ballot.", "flagattn": 1, "shortname": "lea" }
json
import sys import argparse import subprocess import os from datetime import datetime import random username="sanchayana2007" token= os.environ.get("GIT_TOKEN") #Random int to create the value j= random.randint(0,1) ################ RAndom file creator for chein in ################## if j: if os.path.isfile("./tete"): output = subprocess.check_output("rm tete",shell = True, stderr=subprocess.STDOUT) else: output = subprocess.check_output("touch tete",shell = True, stderr=subprocess.STDOUT) else: if os.path.isfile("./tete"): output = subprocess.check_output("rm tete",shell = True, stderr=subprocess.STDOUT) ################ RAndom file creator for chein in ################## comment = "checking changes for " + os.environ.get("USERNAME") + " "+ datetime.now().strftime("%b %d, %Y") print(comment) if os.path.isdir("./.git"): print("The Folder is Already Intilaised with Git no need to init it ") CMD = " git status " print("################### GIT STATUS ######################") print("# In ./git/objects compare the staged files the cache#") print("################### #################################") try: output = subprocess.check_output(CMD,shell = True, stderr=subprocess.STDOUT) except subprocess.SubprocessError as e: print("Got and error",e) k= [ print(j) for i,j in enumerate(output.decode('utf-8').split('\n')) if i < 2 ] CMD = " git add --all " print("################### GIT ADD in Staging Area ###################") print("# In ./git/index is the Staged changes are kept as binary #") print("################### ###########################################") try: output = subprocess.check_output(CMD,shell = True, stderr=subprocess.STDOUT) except subprocess.SubprocessError as e: print("Got and error",e) print(output.decode('utf-8')) CMD = " git commit -m " + "\"" + comment + "\"" print("################### GIT COMMIT in LOcal Repo ###################") print("# Local RFepository ./git/ #") print("################### ##############################################") try: output = subprocess.check_output(CMD,shell = True, stderr=subprocess.STDOUT) except subprocess.SubprocessError as e: print("Got and error",e) print(output.decode('utf-8')) CMD = " git remote show origin " print("############ GIT show Branch Names Remote and Local #########") print("# It Shows the Name of the Barnch #") print("################## ###########################################") try: output = subprocess.check_output(CMD,shell = True, stderr=subprocess.STDOUT) except subprocess.SubprocessError as e: print("Got and error",e) print(output.decode('utf-8')) CMD = "cat .git/refs/heads/master" print("################### GIT HEAD pointer ###################") print("# It Shows the Head id where the checkin will be done #") print("############# ###########################################") try: output = subprocess.check_output(CMD,shell = True, stderr=subprocess.STDOUT) except subprocess.SubprocessError as e: print("Got and error",e) print(output.decode('utf-8')) if username and token: CMD = "git push http://" + username + ":"+ token + "@github.com/sanchayana2007/sanchayana2007.github.io.git" try : output = subprocess.check_output(CMD,shell = True, stderr=subprocess.STDOUT) except subprocess.SubprocessError as e: print("Got and error",e) print(output) else: print("Check the Useanme or Tone in Enviroment is not set") else: print("Git Folder is not present.. Run from the main folder Exiting")
python
["blas","cordova-plugin-amplify-pay","cordova-plugin-amplify-payment","math-float64-frexp","math-float64-from-bits","overrustle-logs","rtc-lib","shields-badge-url-codecov","shields-badge-url-coveralls","shields-badge-url-david","shields-badge-url-github-issues","shields-badge-url-github-social","shields-badge-url-travisci","tml-express","tml-js","tml-server","utils-define-read-only-property"]
json
{ "appId": "com.transistorsoft.firebase.capacitor.demo", "appName": "BGFirebase Demo", "webDir": "www", "bundledWebRuntime": false }
json
{ "name": "multi-git-repos-at-once", "version": "1.0.0", "description": "do things & push to multiple git repositories at once", "main": "index.js", "repository": "<EMAIL>:phatpham9/multi-git-repos-at-once.git", "author": "<NAME> (https://onroads.xyz)", "license": "MIT", "dependencies": { "dotenv": "^5.0.1", "node-fetch": "^2.1.1", "sleep": "^5.1.1", "yamljs": "^0.3.0" }, "scripts": { "start": "node index.js" } }
json
<gh_stars>100-1000 {"nom":"Saint-Seine-sur-Vingeanne","circ":"2ème circonscription","dpt":"Côte-d'Or","inscrits":325,"abs":203,"votants":122,"blancs":12,"nuls":1,"exp":109,"res":[{"nuance":"REM","nom":"<NAME>","voix":56},{"nuance":"LR","nom":"<NAME>","voix":53}]}
json
<filename>scripts/plot.py import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import os import report mpl.style.use('seaborn') bytes = report.bytes[0] threads = report.threads # print(data) def plot_data(title=None): ax.plot(bytes, data[0], linestyle='-', label="Hoard malloc", color="firebrick") ax.plot(bytes, data[1], linestyle='--', label="Hoard free", color="firebrick") ax.plot(bytes, data[2], linestyle='-', label="TBB malloc", color="darkgreen") ax.plot(bytes, data[3], linestyle='--', label="TBB free", color="darkgreen") ax.set_title(title) ax.set_xlabel("Allocation size") ax.set_ylabel("Time") ax.legend(loc="upper left") for i in [0, 15]: # First compare some of the single threaded performance data = np.array([ report.first_allocs[i], report.first_frees[i], report.first_tbballocs[i], report.first_tbbfrees[i], ]) fig, axes = plt.subplots(2, 2) fig.suptitle(f'Hoard vs TBB, {i+1} threads') ax = axes[0, 0] plot_data(title="Test 1") ax = axes[0, 1] data = np.array([ report.second_allocs[i], report.second_frees[i], report.second_tbballocs[i], report.second_tbbfrees[i], ]) plot_data(title="Test 2") ax = axes[1, 0] data = np.array([ report.third_allocs[i], report.third_frees[i], report.third_tbballocs[i], report.third_tbbfrees[i], ]) plot_data(title="Test 3") ax = axes[1, 1] data = np.array([ report.fourth_allocs[i], report.fourth_frees[i], report.fourth_tbballocs[i], report.fourth_tbbfrees[i], ]) plot_data( title="Test 4" ) plt.savefig(f"hoard_tbb_{i+1}thr.png") plt.show()
python
<gh_stars>0 .list-title a h2 { display: inline-block; font-size: 1.2em; transition: color linear 300ms; } .list-title a { color: #172b4d; } .list-title a:hover { color: #11cdef; } .list-title img { display: inline-block; width: 40px; height: 55px; margin-right: 20px; }
css
# Java Client A thin library designed to publish messages to Hermes. ## Features * http client-agnostic API * synchronous/asynchronous publishing * configurable retries * metrics ## Overview Core functionality is provided by `HermesClient` class, which in turn uses `HermesSender` to do the heavy lifting. At the moment there are three implementations of `HermesSender`: * **RestTemplateHermesSender** - recommended for services built on [Spring framework](https://spring.io/projects/spring-framework); uses [AsyncRestTemplate](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/client/AsyncRestTemplate.html) for asynchronous transmission * **JerseyHermesSender** - recommended for services using [Jersey](<https://jersey.java.net/>) * **OkHttpHermesSender** - supports both HTTP/1.1 and HTTP/2 protocols, uses [OkHttp3 client](http://square.github.io/okhttp/) ## Creating To start using `HermesClient`, add it as an dependency: ```groovy compile group: 'pl.allegro.tech.hermes', name: 'hermes-client', version: versions.hermes ``` Client should be always built using `HermesClientBuilder`, which allows on setting: ```java HermesClient client = HermesClientBuilder.hermesClient(...) .withURI(...) // Hermes URI .withRetries(...) // how many times retry in case of errors, default: 3 .withRetrySleep(...) // initial and max delay between consecutive retries in milliseconds, default: 100ms (initial), 300ms (max) .withDefaultContentType(...) // what Content-Type to use when none set, default: application/json .withDefaultHeaderValue(...) // append default headers added to each message .withMetrics(metricsRegistry) // see Metrics section below .build(); ``` See [Sender implementations](#sender-implementations) sections for guides on how to construct `HermesSender`. Once created, you can start publishing messages. Hermes Client API is asynchronous by default, returning `CompletableFuture` object that holds the promise of a result. `HermesClient` exposes methods for easy publication of JSON and Avro messages. JSON sender sets `application/json` content type. ```java hermesClient.publishJSON("com.group.json", "{hello: 1}"); ``` Avro sender sets `avro/binary` content type. It also requires to pass Avro schema version of this message, which is passed on to Hermes in `Schema-Version` header. ```java hermesClient.publishAvro("com.group.avro", 1, avroMessage.getBytes()); ``` You can also use `HermesMessage#Builder` to create HermesMessage object, to e.g. pass custom headers: ```java hermesClient.publish( HermesMessage.hermesMessage("com.group.topic", "{hello: 1}") .json() .withHeader("My-Header", "header value") .build() ); ``` Publication results in returning `HermesResponse` object: ```java CompletableFuture<HermesResponse> result = client.publish("group.topic", "{}"); HermesResponse response = result.join(); assert response.isSuccess(); assert response.getStatusCode() == 201; assert response.getMessageId().equals("..."); // message UUID generated by Hermes ``` ## Closing The client allows graceful shutdown, which causes it to stop accepting publish requests and await for delivery of currently processed messages. Two variants of shutting down the client are available: * synchronous `void close(long pollInterval, long timeout)` method will return when all currently processed messages (including retries) are delivered or discarded * asynchronous `CompletableFuture<Void> closeAsync(long pollInterval)` returns immediately and the returned CompletableFuture completes when all messages are delivered or discarded `pollInterval` parameter is used for polling the internal counter of asynchronously processed messages with the user specified interval in milliseconds. Calls to `publish` methods will return an exceptionally completed future with `HermesClientShutdownException`: ```java client.close(50, 1000); assert client.publish("group.topic", "{}").isCompletedExceptionally(); ``` One can use the asynchronous method to wait for the client to terminate within a given timeout, e.g. in a shutdown hook: ```java client.closeAsync(50).get(1, TimeUnit.SECONDS); ``` ## Metrics **Requirement**: dependency `io.dropwizard.metrics:metrics-core` must be provided at runtime. After providing `MetricRegistry`, Hermes Client metrics will be reported to `hermes-client` branch. They include measured latency, meters for each status code received and meter for failures. ```java MetricRegistry registry = myMetricRegistryFactory.createMetricRegistry(); HermesClient client = HermesClientBuilder.hermesClient(sender) .withURI(URI.create("http://localhost:8080")) .withMetrics(registry) .build(); ``` ## Sender implementations ### Spring - WebClient **Requirement**: `org.springframework:spring-webflux` must be provided at runtime. ```java HermesClient client = HermesClientBuilder.hermesClient(new WebClientHermesSender(WebClient.create())) .withURI(URI.create("http://localhost:8080")) .build(); ``` ### Spring - AsyncRestTemplate **Requirement**: `org.springframework:spring-web` must be provided at runtime. ```java HermesClient client = HermesClientBuilder.hermesClient(new RestTemplateHermesSender(new AsyncRestTemplate())) .withURI(URI.create("http://localhost:8080")) .build(); ``` ### Jersey Client **Requirement**: `org.glassfish.jersey.core:jersey-client` must be provided at runtime. ```java HermesClient client = HermesClientBuilder.hermesClient(new JerseyHermesSender(ClientBuilder.newClient())) .withURI(URI.create("http://localhost:8080")) .build(); ``` ### OkHttp Client Requirement: `com.squareup.okhttp3:okhttp` must be provided at runtime. ```java HermesClient client = HermesClientBuilder.hermesClient(new OkHttpHermesSender(new OkHttpClient())) .withURI(URI.create("http://localhost:8080")) .build(); ``` #### HTTP2 support Requirements: JVM configured with [ALPN support](http://www.eclipse.org/jetty/documentation/current/alpn-chapter.html#alpn-starting): ```bash java -Xbootclasspath/p:<path_to_alpn_boot_jar> ... ``` OkHttp Client configured with [SSL support](https://github.com/square/okhttp/wiki/HTTPS): ```java OkHttpClient client = new OkHttpClient.Builder() .sslSocketFactory(sslContext.getSocketFactory()) .build(); HermesClient client = HermesClientBuilder.hermesClient(new OkHttpHermesSender(okHttpClient)) .withURI(URI.create("https://localhost:8443")) .build(); ``` ### Custom HermesSender Example with [Unirest](http://kong.github.io/unirest-java) - very simple http client. ```java HermesClient client = HermesClientBuilder.hermesClient((uri, message) -> { CompletableFuture<HermesResponse> future = new CompletableFuture<>(); Unirest.post(uri.toString()).body(message.getBody()).asStringAsync(new Callback<String>() { @Override public void completed(HttpResponse<String> response) { future.complete(() -> response.getStatus()); } @Override public void failed(UnirestException exception) { future.completeExceptionally(exception); } @Override public void cancelled() { future.cancel(true); } }); return future; }) .withURI(URI.create("http://localhost:8080")) .build(); ```
markdown
Southwest Monsoon that has been active over East India since last few days has given good Monsoon rains in Kolkata in last 24 hours. With good rainfall since the beginning of July and more forecast for next 48 hours, the city of joy is expected to surpass its monthly average rainfall, smoothly. The city has recorded 190 mm rainfall during first the first week of the month. According to Skymet Meteorology Division in India, cyclonic circulation over Bihar and adjoining West Bengal has been giving good weather over the region including Kolkata. However, rainfall was patchy in Kolkata in past 2-3 days as other areas in the state were reording showers. The eastern end of the Monsoon trough over sub-Himalayan West Bengal is also contributing to the rainfall over Kolkata. Moreover, another cyclonic circulation that is present over North Bay of Bengal is likely to gain strength and intensify into low pressure area within next 48 hours or so that will once again increase the intensity of rain over Kolkata. Following with the trend, July 2015 started on a rainy note for Kolkata as it received 87 mm rainfall in just 24 hours on 2nd July. July rainfall remains heavy in the city due to the formation of frequent weather systems in the Bay of Bengal which remain in close proximity to Kolkata. While Monsoon remained subdued in June as the onset was pushed to third week of June in comparison to the usual date of 10th June, the city failed to cover its monthly normal of 284 mm. However, according to Skymet, due to moderate to heavy rainfall expected over Kolkata in next few days due to the present cyclonic circulation and a possible new one developing around 14th July, the city of love and culture is likely to exceed July’s average rainfall, effortlessly.
english
<gh_stars>0 --- title: IDiaEnumDebugStreamData::get_Count | Microsoft Docs ms.date: 11/15/2016 ms.prod: visual-studio-dev14 ms.technology: vs-ide-debug ms.topic: reference dev_langs: - C++ helpviewer_keywords: - IDiaEnumDebugStreamData::get_Count method ms.assetid: 74ff3a85-3cc2-4aa8-ad9a-7f335b795ed1 caps.latest.revision: 10 author: MikeJo5000 ms.author: mikejo manager: jillfra ms.openlocfilehash: a07151e7670f712e20613c675093a17edc66b608 ms.sourcegitcommit: 94b3a052fb1229c7e7f8804b09c1d403385c7630 ms.translationtype: MT ms.contentlocale: pt-BR ms.lasthandoff: 04/23/2019 ms.locfileid: "68198566" --- # <a name="idiaenumdebugstreamdatagetcount"></a>IDiaEnumDebugStreamData::get_Count [!INCLUDE[vs2017banner](../../includes/vs2017banner.md)] Recupera o número de registros no fluxo de dados de depuração. ## <a name="syntax"></a>Sintaxe ```cpp# HRESULT get_Count (  LONG* pRetVal ); ``` #### <a name="parameters"></a>Parâmetros pRetVal [out, retval] Retorna o número de registros. ## <a name="return-value"></a>Valor de retorno Se for bem-sucedido, retornará `S_OK`; caso contrário, retorna um código de erro. ## <a name="see-also"></a>Consulte também [IDiaEnumDebugStreamData](../../debugger/debug-interface-access/idiaenumdebugstreamdata.md) [IDiaEnumDebugStreamData::Item](../../debugger/debug-interface-access/idiaenumdebugstreamdata-item.md)
markdown
Code Repository for the API used in the AZUR project from the 2021 [Tech4Germany](tech.4germany.org) fellowship. The functionalities of this API are also being made accessible through a UI, available [here](https://github.com/daudprobst/AZUR-Frontend). # AZUR In the German Bundestag, various resources are allocated to parties according to their strengths in the plenum using one of three [proportionality calculation](https://en.wikipedia.org/wiki/Party-list_proportional_representation) methods - the Saint-Lague/Schepers, d'Hondt, and Hare-Niemeyer methods. This includes, for example, the number of seats on committees, speaking time on the floor, and even things like floor space on open-door days. AZUR is an internally used calculator that applies these methods - this project is its third iteration, after one created in the 1970s and one created in 2000. # AZUR-API This repository contains the backend API, which is to be hosted separately from the frontend so it can be accessed from other sources. Detailed API docs are to follow - in short, it requires a JSON POST with a vote distribution, the number of seats (or minutes, or square meters, or...) to distribute, and the method to use, and returns the result of that calculation as a JSON with up to three keys: the seat distribution, the assignment sequence (if the method returns one), and a table of distributions from 1 to the requested amount of seats. # Getting Started To run the API locally, clone this project, install requirements.txt in a new python environment, set the flask app with `export FLASK_APP app` (or your OS equivalent of setting an environment variable) and run it with `flask run`.
markdown
def query(self, sql, *args): '''Mixin method for the XXXBase class. conn should be a cm.db.Connection instance.''' conn = self._get_connection() return conn.query(sql, *args) def get_connection(self): '''Mixin method for the XXXBase class. Returns a cm.db.Connection instance.''' raise 'No implementation.' class ObjectBase: '''I am the basis of the model class.''' seq_name = None # The name of the autoincrement id column in the table. def _set_defaults(self, kw): '''Sets the default values for certain 'always there' columns. This method is usually called in a update/insert operation. Returns the modified keyword dictionary. ''' return kw def get_id(self): '''Returns an ID (unique identifier) for the object instance.''' if self.seq_name is None: raise 'There is no autoincrement column.' else: sql = """select nextval('%s');""" % self.seq_name rs = self._query(sql) for r in rs: _id = r.nextval return _id def _get_sort_order(self, kw, default=None): '''Returns the sort order according to key:value parsed in. This method is usually called in a get/select operation. ''' order = kw.get('sort_order') if order == 'up': order_sql = 'asc' elif order == 'down': order_sql = 'desc' else: if default is None: order_sql = 'asc' elif default == 'up': order_sql = 'asc' elif default == 'down': order_sql = 'desc' else: order_sql = 'asc' return order_sql _query = query _get_connection = get_connection class StatusBase: '''I am the basis of the 'type'/'status' listing class. ''' def ids(self): '''Returns a list of ID.''' return [i for (i, s) in self._data] def descs(self): '''Returns a list of Description.''' return [s for (i, s) in self._data] def get_id(self, desc): '''Given a description, returns the related ID.''' ret = [i for (i, s) in self._data if desc == s] if ret is not None: return ret[0] else: raise 'No such desc <%s>.' % desc _query = query _get_connection = get_connection
python
{ "name": "Zed Code Editor", "short_name": "Zed", "key": "<KEY>", "version": "1.0.0", "manifest_version": 2, "minimum_chrome_version": "27", "description": "Offline-capable, feature rich, extensible code editor designed for Chrome", "offline_enabled": true, "app": { "background": { "scripts": ["background.chrome.js"] } }, "permissions": [ "storage", "webview", "identity", "syncFileSystem", "unlimitedStorage", {"fileSystem": ["write", "retainEntries", "directory"]}, {"socket":["tcp-connect", "tcp-listen"]}, "http://*/", "https://*/", "*://*/*" ], "icons": { "128": "Icon.png", "16": "Icon16.png", "48": "Icon48.png" }, "sandbox": { "pages": ["sandbox.html"] } }
json
I remember going over to a friend’s house back in the 1980s. His dad had something called a PC and when you turned it on instead of making showing a READY prompt it did something strange. After a quick beep, something inside started churning and in a minute you saw a menu of games and programs available on something called a “hard disk,” which I assumed were the standard 3 1/2 inch “hard disks” I’d seen in computer magazines. After hitting a key, we began to play a game called “King’s Quest.” The graphics were bright and fluid – although they were, in fact, green on black – and the story was amazing. You’re a dude! Looking for a princess! There’s a frog! With a ball! What was this sorcery? That game, King’s Quest from Sierra, was one of the first Graphic Adventures, a mixture of text and graphics-based play that created an entire generation of hardcore gamers. Ars has a great piece on the phenomenon and talks about the many innovations that, in the end, defined the way we game today. For example, take this chunk of info: In 1991, LucasArts developed iMUSE—the Interactive Music Streaming Engine—as a new audio component of SCUMM. Composers Michael Land and Peter McConnell were behind the engine, which overcame many of the limitations of MIDI technology. Hard cuts and jarring music transitions were a thing of the past; SCUMM-powered adventures now had dynamic audio. This put the company at an immediate competitive advantage—none of its rivals had such a technology, which allowed far more interesting and subtle audio cues than ever before found in games. The new technology saw its first use in Monkey Island 2: LeChuck’s Revenge, which was SCUMM-creator Ron Gilbert’s last game with LucasArts (Gilbert left to found Humungous Entertainment with colleague Shelley Day). Betcha didn’t know about that, right? Sadly, at least to me, the genre’s last great game was Myst. The adventure I loved, though, was Neuromancer and it’s the game that defines the genre for me: adventure, puzzles, and humor, all mixed into a palatable package. These kids with their Bioshocks and Dead Spaces don’t know what they’re missing. You can read the rest here or just start downloading Leisure Suit Larry here.
english
#!/usr/bin/env python from .beamformer import BeamFormer from .compound_beam import CompoundBeam from .sb_generator import SBGenerator from .simulate_sb_pattern import SBPattern __all__ = ['BeamFormer', 'CompoundBeam', 'SBPattern', 'SBGenerator']
python
<reponame>dennmart/wanikani-to-anki body { background-color: #00aaff; color: #fff; } a { color: #FFFF00; } a:hover, a:focus { color: #FF00FF; } h1, h2, h4 { font-family: 'Scada', sans-serif; font-weight: 700; } p { font-family: 'Gudea', sans-serif; } .top-buffer { padding-top: 20px; } .footer { margin-top: 50px; font-size: 11px; } .home h1 { margin-bottom: 20px; } .home .header-spacer { padding-top: 60px; } .header-section { margin-top: 10px; } .header-section h2 { margin-top: 30px; } #user_info .username { font-size: 20px; } .export-section p.title { font-size: 24px; font-weight: 700; margin-bottom: 0; } .export-section a { color: #0ff; } .export-section input[type="text"] { width: 100px; } .export-section .additional-options { display: none; } .export-section form label.error { margin-top: 10px; color: #ff0; }
css
New Delhi: A Jet Airways flight from Mumbai to Delhi was diverted to Ahmedabad early Monday morning after a security threat was reported on board. A note was found on board Jet Airways flight 9W339, that departed at 0255 hours from Mumbai, that said: "9W 339 is covered by hijackers and should not land and should be flown straight to POK. Don't take it as a joke. Cargo area contains explosive bombs and will blast if you land in DEL. Allah is great. " The flight was immediately diverted to Ahmedabad and landed at the city’s Sardar Vallabhbhai Patel International Airport at 0350 hours. By 4. 25 am, all the passengers were safely deplaned. Security agencies have identified the miscreant behind the fake hijack note threat in the flight. The passenger has been identified as a repeat offender and has been arrested. He may now face serious charges for the threat. Civil Aviation Minister Ashok Gajapathi Raju stated that the miscreant who had put the note was identified and has been put on a no-fly list. Jet Airways has put out a statement regarding the incident. "Boeing 737-900 from Mumbai to Delhi was diverted to Ahmedabad following the declaration of an emergency as per established security procedures, due to the detection of an onboard security threat. The aircraft landed without incident at Ahmedabad and was parked at a remote bay, where all 115 guests and 7 crew members were safely deplaned," the statement said.
english
{ "name": "Assignment Four - Toronto Places of Interest", "description": "A handy webapp for users looking to find things to do in the big city of Toronto.", "createdTime": 1585510169971, "lastUpdated": 1585520771293, "creator": "m_tyska" }
json
<filename>src/books/book.module.ts import { AuthorModule } from 'src/authors/author.module'; import { BookSchema } from 'src/books/book.schema'; import { Module, forwardRef } from '@nestjs/common'; import { BookService } from 'src/books/book.service'; import { BookResolver } from 'src/books/book.resolver'; import { MongooseModule } from '@nestjs/mongoose'; @Module({ imports: [forwardRef(() => AuthorModule), MongooseModule.forFeature([{ name: 'Book', schema: BookSchema }])], providers: [BookService, BookResolver], exports: [BookService] }) export class BookModule {}
typescript
<reponame>lukaspirkl/Cumulus<gh_stars>0 # ☁ Cumulus *A game about blowing the clouds* The world is full of people and it's up to you to decide which ones should live in abundance and who shall suffer. Provide water to the villages you deem worthy by blowing a raining cloud 🌧 into their direction. Others will have to scrape by without water 🏜. Careful though - you don't want anyone to die. Just show them who's the boss. That's you. A windy cloud-blowing boss. ## Controls * Click and drag the **left mouse button** to **blow** - the clouds will move in that direction. * Click and drag the **right mouse button** to **move** your screen around. ## Objective * Provide abundance of rain water to one village - the number of villages will increase in the next round. * Don't make any village die of thirst by not providing them any rain drops. ## Interface * There are many villages on the map that are constantly drinking their reserves of water - shown in the red/green bar bellow the village. If the village is thirsty, the bar will be mostly red. If they have plenty of water, their bar will be green. * There are many clouds constantly appearing and disappearing on the map - they grow, rain and then get smaller again. * There is a minimap in the bottom right corner, that shows you locations of all the villages - their colors shifting based on their water supply. * There is a progress at the top right corner showing you how many villages you are supposed to make happy by providing them enough rain water and of course how many are currently happy.
markdown
<gh_stars>100-1000 /* * Copyright (c) 2015 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package de.arcus.framework.settings; import android.content.Context; import android.content.SharedPreferences; import android.net.Uri; /** * Helper class to read and write app settings without to care about to open and close an editor */ public class AppSettings { /** * The default settings file */ public static final String DEFAULT_SETTINGS_FILENAME = "app_settings"; /** * The preferences */ private SharedPreferences mSharedPreferences; /** * Creates a new instance of AppSettings that access to the default settings file * @param context Context of the app */ public AppSettings(Context context) { this(context, DEFAULT_SETTINGS_FILENAME); } /** * Creates a new instance of AppSettings that access to a specific settings file * @param context Context of the app */ public AppSettings(Context context, String settingsFilename) { mSharedPreferences = context.getSharedPreferences(settingsFilename, Context.MODE_PRIVATE); } /** * Gets a string from the settings * @param key Key of the setting * @param defValue Default value which is returned if the key doesn't exists * @return Value */ public String getString(String key, String defValue) { return mSharedPreferences.getString(key, defValue); } /** * Gets a boolean from the settings * @param key Key of the setting * @param defValue Default value which is returned if the key doesn't exists * @return Value */ public boolean getBoolean(String key, boolean defValue) { return mSharedPreferences.getBoolean(key, defValue); } /** * Gets a float from the settings * @param key Key of the setting * @param defValue Default value which is returned if the key doesn't exists * @return Value */ public float getFloat(String key, float defValue) { return mSharedPreferences.getFloat(key, defValue); } /** * Gets an int from the settings * @param key Key of the setting * @param defValue Default value which is returned if the key doesn't exists * @return Value */ public int getInt(String key, int defValue) { return mSharedPreferences.getInt(key, defValue); } /** * Gets a long from the settings * @param key Key of the setting * @param defValue Default value which is returned if the key doesn't exists * @return Value */ public long getLong(String key, long defValue) { return mSharedPreferences.getLong(key, defValue); } /** * Gets a uri from the settings * @param key Key of the setting * @param defValue Default value which is returned if the key doesn't exists * @return Value */ public Uri getUri(String key, Uri defValue) { if (mSharedPreferences.contains(key)) return Uri.parse(mSharedPreferences.getString(key, "")); else return defValue; } /** * Gets an enum value from the settings * @param key Key of the setting * @param defValue Default value which is returned if the key doesn't exists * @param <E> The enum type * @return Value */ public <E extends Enum<E>> E getEnum(String key, E defValue) { String value = mSharedPreferences.getString(key, defValue.name()); // Null check if (value != null) { // Checks all enum values for (E constant : defValue.getDeclaringClass().getEnumConstants()) { if (value.equals(constant.name())) return constant; } } // Return default return defValue; } /** * Returns whether the settings contains a specific key * @param key Key of the setting * @return Returns whether the settings contains a specific key */ public boolean contains(String key) { return mSharedPreferences.contains(key); } /** * Removes an setting from the settings * @param key Key of the setting */ public void remove(String key) { // Opens the editor SharedPreferences.Editor editor = mSharedPreferences.edit(); // Removes the key editor.remove(key); // Commits the change editor.commit(); } /** * Saves a string to the settings * @param key Key of the setting * @param value Value */ public void setString(String key, String value) { // Opens the editor SharedPreferences.Editor editor = mSharedPreferences.edit(); editor.putString(key, value); // Commits the change editor.commit(); } /** * Saves a boolean to the settings * @param key Key of the setting * @param value Value */ public void setBoolean(String key, boolean value) { // Opens the editor SharedPreferences.Editor editor = mSharedPreferences.edit(); editor.putBoolean(key, value); // Commits the change editor.commit(); } /** * Saves a float to the settings * @param key Key of the setting * @param value Value */ public void setFloat(String key, float value) { // Opens the editor SharedPreferences.Editor editor = mSharedPreferences.edit(); editor.putFloat(key, value); // Commits the change editor.commit(); } /** * Saves an int to the settings * @param key Key of the setting * @param value Value */ public void setInt(String key, int value) { // Opens the editor SharedPreferences.Editor editor = mSharedPreferences.edit(); editor.putInt(key, value); // Commits the change editor.commit(); } /** * Saves a long to the settings * @param key Key of the setting * @param value Value */ public void setLong(String key, long value) { // Opens the editor SharedPreferences.Editor editor = mSharedPreferences.edit(); editor.putLong(key, value); // Commits the change editor.commit(); } /** * Saves a uri to the settings * @param key Key of the setting * @param value Value */ public void setUri(String key, Uri value) { // Opens the editor SharedPreferences.Editor editor = mSharedPreferences.edit(); editor.putString(key, value.toString()); // Commits the change editor.commit(); } /** * Saves an enum value to the settings * @param key Key of the setting * @param value Value */ public <E extends Enum<E>> void setEnum(String key, E value) { // Opens the editor SharedPreferences.Editor editor = mSharedPreferences.edit(); editor.putString(key, value.name()); // Commits the change editor.commit(); } }
java
1 Wal detlot pipul hu tok Jisas na det Boswan gulum Masaiya, olabat na biginini blanga God. En enibodi hu laigim det dediwan laigim im biginini olabat du. 2-3 Yu si? Wen wi laigim God en duwit langa im wed, tharran na meigim wi sabi wi laigim ola biginini blanga im, dumaji wen wi laigim God, wi duwit langa im wed.✡ Jon 14:15 4 En det wed blanga im nomo adwan blanga wi blanga dum, dumaji ebri biginini blanga God garram det pawa blanga bidim dijan wel. Yumob sabi? Wi garram det pawa, dumaji wi bilib langa Jisas Krais. 5 Wal yumob dalim mi na. Hu garram det pawa blanga bidim dijan wel? Nobodi. Oni detlot pipul hu bilib Jisas Krais na det San blanga God. 6 Wal wen Jisas Krais bin kaman, imbin beptais garram woda, en afta imbin weistim im blad langa det kros. Im nomo bin oni beptais garram woda en stap deya. Nomo. Imbin beptais garram woda, en afta imbin weistim im blad langa det kros du. En det Holi Spirit im dalim wi dijan im trubala, en det Holi Spirit kaan dalimbat laiya. 7 Wal det thribala ting na dalimbat wi blanga Jisas Krais. 8 Det Holi Spirit, det woda en det blad gibit wi det seimwan stori. 9 Wal wi bilib langa pipul wen dei dalimbat wi blanga Jisas Krais. Bat det wed weya God bin gibit langa wi blanga im San im mowa strongbala langa det wed weya pipul gibit langa wi, dumaji God im God. 10 En enibodi hu bilib langa Jisas Krais det San blanga God garram det wed blanga God insaid langa im hat. Bat detlot pipul hu nomo bilib langa det wed blanga God gulum God laiya, dumaji dei reken det wed blanga God im nomo trubalawan. 11 Wal iya na det wed blanga God. Im tok God bin gibit wi det olagijawan laif, en im San na det olagijawan laif.✡ Jon 3:36 12 En enibodi hu garram im San garram det olagijawan laif. En detlot pipul hu nomo garram im San nomo garram det olagijawan laif. 13 Wal aibin raidimbat dijan leda langa yumob pipul hu bilib langa Jisas Krais det San blanga God, en aibin raidimbat dijan leda blanga meigim yumob sabi brabliwei yumob garram det olagijawan laif. 14 En wi gin jandap strongbala lida langa God, dumaji wi sabi im oldei irrim wi wen wi askim im blanga enijing weya im wandim wi blanga abum. 15 En wi sabi im garra gibit wi det ting weya wi askim im, dumaji wi sabi im oldei irrim wi wen wi askim im. 16 Wal if yumob luk eni braja o sista blanga yumob dumbat nogudbala ting weya kaan meigim im dai, wal yumob garra prei langa God blanga im, en God garra larramgo im fri en meigim im kipgon jidan laibala. Lagijat na yumob garra prei blanga det braja o sista blanga yumob hu dumbat nogudbala ting weya kaan meigim im dai. Bat wanbala nogudbala ting deya garra meigim im dai. En ai nomo dalim yumob blanga prei langa God blanga tharran nogudbala ting. 17 Ebri nogudbala ting weya wi dum im nogud. Bat sambala nogudbala ting nomo meigim wi dai. 18 Wal wi sabi enibodi hu jidan biginini blanga God kaan oldei kipgon dumbat nogudbala ting, dumaji det San blanga God im oldei seibum wi, en det boswan dibuldibul kaan ardim wi. 19 En wi sabi nomeda det boswan dibuldibul jidan bos blanga dijan wel, bat stil im nomo bos blanga wi, dumaji wi jidan biginini blanga God. 20 En wi sabi det San blanga God bin kaman, en imbin meigim wi sabi wulijim wi garra sabi det trubala God. En wi jidan joinap garram det trubala God. Yumob sabi na? Wi jidan joinap garram Jisas Krais det San blanga God. Im na det trubala God. En im det olagijawan laif du. 21 Wal main biginini olabat, yumob garra wotjim miselp en nomo larram eni drimin deigidawei yumob. Binij na.
english
<gh_stars>1-10 [{"namaKab":"<NAME>","originalFilename":"photo4x6merah.jpg","namaPartai":"Partai Solidaritas Indonesia","id":142768,"noUrut":1,"nama":"LIPINUS","stringJenisKelamin":"Laki-Laki"},{"namaKab":"<NAME>","originalFilename":"photo3x4 merrah.jpg","namaPartai":"Partai Solidaritas Indonesia","id":139953,"noUrut":2,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"<NAME>","originalFilename":"TINA- FOTO4x6.jpg","namaPartai":"Partai Solidaritas Indonesia","id":142933,"noUrut":3,"nama":"<NAME>","stringJenisKelamin":"Perempuan"}]
json
<reponame>NaokoAF/discord-vtuber-generator<gh_stars>0 body { margin: 0px; background-color: #403349; color: white; font-family: Arial; overflow: hidden; } .bg { position: absolute; width: 100%; height: 100%; background-image: url('assets/bg.png'); background-position: center; background-size: cover; /*filter: blur(5px);*/ transform: scale(110%); } h1 { margin-top: 0px; margin-bottom: 5px; } .center { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; } .container { padding: 40px; padding-bottom: 20px; width: 350px; background-color: #352b3d; border-radius: 20px; border-style: solid; border-width: 3px; border-color: #ff84bd; z-index: 2; } .form-group { display: flex; flex-direction: column; margin-bottom: 5px; } .textfield { font-size: 16px; border-style: none; border-radius: 5px; padding: 5px 0px 5px 0px; margin-top: 5px; margin-bottom: 8px; } button { padding: 5px; width: 100%; border-radius: 20px; border-style: none; color: white; font-weight: bold; font-size: 16px; background-color: #ff84bd; transition: 0.2s; } button:hover { background-color: #ffffff; color: #ff84bd; cursor: pointer; transform: translateY(-2px); } .credit { position: absolute; bottom: 0; right: 0; margin: 10px; color: #999; font-size: 0.75em; } .credit a, .credit .fas { color: #ff84bd; }
css
Suryakumar Yadav was a sensation for the Mumbai Indians in the Indian Premier League this season. He finished as the highest run-getter for the franchise after being asked to open the innings with the explosive Caribbean southpaw, Evin Lewis. It was the first time Surya was made to open in a significant competition. However, he responded in style and was quite prolific in his run scoring. Kumar scored over 500 runs and provided Mumbai with the perfect starts on more few occasions. For his exceptional run in the IPL, Suryakumar Yadav was handed a spot in the India A team for the Quadrangular series also involving India B, Australia A and South Africa A. During an exclusive interview with the Mumbai Indians, Suryakumar Yadav spoke on his call-up and what future has in store for him. “I am very happy to get an India A call-up. It is almost one step closer to the national side, but at the same time, I would like to live in the present,” Suryakumar was quoted as saying by the Mumbai Indians website. He struck as many as 61 boundaries during the 2018 season. “I’ll just try and take one step at a time, one game at a time and the process which I am following now will be very important for me to going into the Quadrangular series,” he further added. He further stated the preparations for the quadrangular series are going on in full swing and he is feeling delighted. “I try to keep it very simple rather. Cricket is a very simple game if we try and keep it simple, it becomes very easy for us too.” He further added he likes to do a lot of smart practice sessions. “I try to put myself under pressure, create such situations and practice that way so that when I face such situations in the game, it gets easier for me. I don’t like to bat for a long time like 2 hours, 4 hours, 6 hours. Instead, I like to bat 1-1.5 hours, take positives from that and just move out,” he further added. Surya stated it was very kind of the Mumbai Indians to give him the opportunity at the top order in a big tournament like the IPL. He further heaped praise on the team management for giving him the opportunity. “The MI management gave me a chance to express myself in a big tournament like the [VIVO] IPL and I really enjoyed my new role. I would really like to do it in the coming domestic season for my state,” the 27-year-old said. He also stressed on the importance of improving the fitness levels. “I think for a big season it is very important how your fitness levels are because as you see our season starts in September and it directly ends in March-April after the [VIVO] IPL”. “So it becomes important to use these 2 months very smartly to become fit for the next 6 to 8 months but at the same time as the tournaments come closer you have to give a lot of rest to your body as well so that you’re fresh to play matches,” he signed off.
english
// setup calls export const INIT_APP = 'INIT_APP'; // Web3 lookups export const GET_CURRENT_NETWORK = 'GET_CURRENT_NETWORK'; // Contract lookup calls export const GET_ALL_ASSETS = 'GET_ALL_ASSETS'; export const GET_ASSETS_PURCHASED_FOR_ACCOUNT = 'GET_ASSETS_PURCHASED_FOR_ACCOUNT'; export const REFRESH_CONTRACT_DETAILS = 'REFRESH_CONTRACT_DETAILS'; // Contract payment calls export const PURCHASE_ASSET = 'PURCHASE_ASSET'; export const PURCHASE_ASSET_WITH_FIAT = 'PURCHASE_ASSET_WITH_FIAT'; export const REVERSE_PURCHASE_ASSET_WITH_FIAT = 'REVERSE_PURCHASE_ASSET_WITH_FIAT'; // Internal state triggers export const RESET_PURCHASE_STATE = 'RESET_PURCHASE_STATE';
javascript
{"iconate.js":"<KEY>,"iconate.min.css":"<KEY>,"iconate.min.js":"<KEY>}
json
Chairman of Reliance Industries Limited (RIL), Mukesh Ambani during the 44th Annual General Meeting said the company’s retail business is on a hyper-growth trajectory and will provide 10 lakh jobs in the near future. “Even in these challenging times, I am personally proud to report to you that Reliance Retail has not only protected jobs, but also created over 65,000 new jobs. Reliance Retail currently employs over 2 lakh people making us one of the largest employers in the country. Over the next three years, we shall further create employment for over ten lakh people and enable the livelihoods for many more," said Mukesh Ambani. RIL added 1,500 new stores, which is amongst the largest retail expansion undertaken by any retailer during this period, taking the store count to 12,711. “RIL’s apparel business sold nearly five lakh units per day and over 18 crore units during the year. “This is equivalent to dressing the entire population of UK, Germany and Spain once," said Ambani. Ajio has emerged as one of the leading digital commerce platforms for fashion and lifestyle with a portfolio of over 2,000 labels and brands and listing of over 5 lakh options. “Driven by innovation, Ajio now contributes to over 25% of our apparel business," added the RIL chairman. “We further consolidated our position in consumer electronics and sold 4. 5 crore units of electronics last year which translates to over 120,000 units per day," he said. As India’s largest grocery retailer, Reliance Retail sold over a billion units of groceries or about 30 lakh units per day. Jio Mart registered over 6. 5 lakh peak orders in a single day. 3 lakh merchant or shop keeper partners across 150 cities were enabled and empowered to transform their businesses both physically and digitally. “Our promise to them is simple: ‘Customer Apka, Support Hamara’ — We support you, so that you can serve your customers better’ A testament to our promise is that we have seen a 3x growth in kirana orders and 2x growth in order frequency," said Mukesh Ambani. In order to expand the retail business, RIL will be focussing on the following five key initiatives, along with a commitment to go carbon free. First, further investment in research, design and product development capabilities. Second, RIL will further strengthen its sourcing ecosystem working closely with producers, MSMEs, service providers, local and international brand companies. Third, RIL is investing in building state-of-the-art supply chain infrastructure across India by linking all major sourcing and consumption locations. “An automated, modular, reliable and scalable warehousing and logistics ecosystem will enable us to deliver products anywhere across the country in the shortest possible time," announced Ambani. Fourth, the conglomerate will focus on expanding its store footprint multi-fold this year with co-located delivery hubs over the next few years. And fifth, RIL will continue acquiring businesses to heighten offering and experience to customers, sharpen omni-channel capabilities, drive operating efficiencies and strengthen talent pool. Recent acquisitions include leading physical/digital commerce platforms like Netmeds, Urban Ladder and Zivame. “Retail is on a hyper growth trajectory to grow at least 3x in the next 3-5 years," he said.
english
body { height: 100vh; color: white; background-color: #404040; } .bottomleft { opacity: .5; position: absolute; bottom: 0; } .player { font-size: 1.3em; } .player.showdown { font-size: 1.3em; } .player.active { background-color: #03a9f4; } .player.fold { color: gray; } .player.win { background-color: #4CAF50; } .row { display: flex; flex-direction: row; } .table > * { flex: 1; padding: 3px; } .community-cards { align-items: center; justify-content: center; margin: 1em; } .community-cards > * { /* border: 1px solid white; */ font-size: 3em; /* margin-left: 3px; */ margin-right: .3em; /* padding: 3px; */ } .undealt { /* border: 1px dotted white; */ } .header > * { text-transform: uppercase; }
css
<reponame>andersonzeroone/plantmanager-Nlw05 import React, { useEffect, useState } from 'react' import { StyleSheet, View, Text, Image, FlatList, Alert, } from 'react-native'; import {Header} from '../components/Header'; import {PlantCardSecondary} from '../components/PlantCardSecondary'; import colors from '../styles/colors'; import waterdrop from '../assets/waterdrop.png' import { formatDistance } from 'date-fns/esm' import { pt } from 'date-fns/locale' import { loadPlant, PlantProps, removePlant } from '../libs/storage' import fonts from '../styles/fonts'; import { Load } from '../components/Load'; import { ScrollView } from 'react-native-gesture-handler'; const MyPlants: React.FC = () => { const [myPlants, setMyPlants] = useState<PlantProps[]>([]) const [loading, setLoading] = useState(true) const [nextWatered, setNextWatered] = useState<string>() function handleRemove(plant:PlantProps){ Alert.alert('Remover',`Deseja remover a ${plant.name}`,[{ text:'Não 🙏', style:'cancel' }, { text:'Sim', onPress: async ()=>{ try{ await removePlant(plant.id); setMyPlants((oldData) => oldData.filter((item) => item.id !== plant.id) ); }catch(error){ Alert.alert('Não foi possivel remover') } } } ]) } useEffect(() => { async function loadStorageData() { const storagedPlants = await loadPlant() const nextTime = formatDistance( new Date(storagedPlants[0].dateTimeNotification).getTime(), new Date().getTime(), { locale: pt }, ) setNextWatered(`Não esqueça de regar a ${storagedPlants[0].name} daqui a ${nextTime}.`) setMyPlants(storagedPlants) setLoading(false) } loadStorageData() }, []) if(loading) return <Load/> return ( <View style={styles.container}> <Header/> <View style={styles.spotlight}> <Image style={styles.spotlightImage} source={waterdrop} /> <Text style={styles.spotlightText} > {nextWatered} </Text> </View> <View style={styles.plants}> <Text style={styles.plantsTitle}> Próximas regadas</Text> <FlatList data={myPlants} keyExtractor={(item) => String(item.id)} renderItem={({ item }) => ( <PlantCardSecondary data={item} handleRemove={()=> handleRemove(item)} /> )} showsVerticalScrollIndicator={false} // contentContainerStyle={{flex:1}} /> </View> </View> ) } const styles = StyleSheet.create({ container:{ flex:1, alignItems:'center', justifyContent:'space-between', paddingHorizontal:30, paddingTop:50, backgroundColor:colors.background }, spotlight:{ backgroundColor:colors.blue_light, paddingHorizontal:20, borderRadius:20, height:110, flexDirection:'row', justifyContent:'space-between', alignItems:'center' }, spotlightImage:{ width:60, height:60 }, spotlightText:{ flex:1, color:colors.blue, paddingHorizontal:20, }, plants:{ flex:1, width:'100%' }, plantsTitle:{ fontSize:24, fontFamily:fonts.heading, color:colors.heading, marginVertical:21 } }); export default MyPlants;
typescript
{"id": "3094297", "date": "2020-04-13T15:28:07+00:00", "user": "HostSlick", "post": "\n<div class=\"Message userContent\">\n<p>I have provided a Dedicated Server deal in this thread before. Time for a KVM VPS!</p>\n<p>KVM<br>\n1 CPU core<br>\n512 MB RAM<br>\n25GB SSD<br>\n1 Gbps port<br>\n1 TB bandthwith/mo<br>\n1 IPv4 address<br>\n/64 IPv6<br>\nLinux OS (CentOS, Debian, Ubuntu etc, Ubuntu 18.04 pre-installed)<br>\nLocation: Netherlands</p>\n<p>Order: <a href=\"https://hostslick.com/clients/cart.php?a=add&amp;pid=229&amp;currency=3\" rel=\"nofollow\">https://hostslick.com/clients/cart.php?a=add&amp;pid=229&amp;currency=3</a></p>\n<p>Limited amount in stock.</p>\n<p><strong>Payment Methods</strong><br>\nPaysafecard<br>\nBitcoin<br>\nGiropay<br>\nSofortBanking/Sofort\u00dcberweisung<br>\nPayPal<br>\nCredit Card<br>\nSEPA Bank Transfer</p>\n<p><strong>Test IP</strong><br>\nDatacenter: Lelystad, Netherlands (Alticom Media Tower)<br>\nTest File: 172.16.58.3/100mb.test<br>\nPing IP: 172.16.58.3</p>\n</div>\n"}
json
{"url":"https://elchesemueve.com/","requestedUrl":"https://elchesemueve.com/","timestamp":1598811258077,"ranks":{"hundos":28,"performance":33,"accessibility":12,"cumulative":28},"lighthouse":{"version":"6.3.0","performance":0.57,"accessibility":0.96,"bestPractices":0.71,"seo":0.98,"total":322,"carbon":"0.101"},"firstContentfulPaint":2266.016,"speedIndex":6550.484445367562,"largestContentfulPaint":4219.331,"totalBlockingTime":597.0000000000005,"cumulativeLayoutShift":0.11245981852213542,"timeToInteractive":5902.586500000001,"maxPotentialFirstInputDelay":944.0000000000009,"timeToFirstByte":1960.96,"weight":{"summary":"56 requests • 1,764 KiB","total":1806645,"image":1147510,"imageCount":23,"script":168513,"scriptCount":18,"document":32683,"font":311966,"fontCount":6,"stylesheet":145973,"stylesheetCount":8,"thirdParty":66623,"thirdPartyCount":6},"axe":{"passes":1045,"violations":40}}
json
<reponame>Cyberdefence-Lab-Murcia/UMUDGA /** * Project: DomainNameProfiler * Copyright (c) 2017 University of Murcia * * @author <NAME> - <EMAIL> */ package es.um.dga.features.nlp.utils; import org.apache.commons.lang3.StringUtils; import org.jetbrains.annotations.NotNull; /** * Static helper class for String-related algorithms. */ public class StringHelper { /** * Dictionary Vowels. */ public static final String VOWELS = "aeiou".toLowerCase(); /** * Dictionary Consonants. */ public static final String CONSONANTS = "bcdfghjklmnpqrstvwxyz".toLowerCase(); /** * Dictionary Letters. */ public static final String LETTERS = "abcdefghijklmnopqrstuvwxyz".toLowerCase(); /** * Dictionary Digits. */ public static final String DIGITS = "0123456789"; /** * Dictionary Symbols. */ public static final String SYMBOLS = "-."; /** * Common accepted characters in DNS names. Also accents are supported, but not as a standard. */ public static final String ALPHABET = "-0123456789abcdefghijklmnopqrstuvwxyz".toLowerCase(); /** * Longest common substring ('O(mn)' implementation). * * @param first First Word. * @param second Second Word. * * @return Length of the longest common substring. * * @see <a href="https://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Longest_common_substring#Java">WikiBooks Implementation * </a> */ public static int longestCommonSubstring(String first, String second) { int maxLen = 0; int fl = first.length(); int sl = second.length(); int[][] table = new int[fl + 1][sl + 1]; for (int i = 1; i <= fl; i++) { for (int j = 1; j <= sl; j++) { if (Character.toLowerCase(first.charAt(i - 1)) == Character.toLowerCase(second.charAt(j - 1))) { table[i][j] = table[i - 1][j - 1] + 1; if (table[i][j] > maxLen) maxLen = table[i][j]; } } } return maxLen; } /** * Longest consecutive substring in the alphabet. * Overload with string param. * * @param text Text where to search the longest consecutive substring. * @param alphabet Alphabet to search in the test provided. * * @return Size of the longest consecutive substring. * * @see es.um.dga.features.nlp.utils.StringHelper#longestConsecutiveSubstringInAlphabet(char[], String) */ public static int longestConsecutiveSubstringInAlphabet(String text, String alphabet) { return longestConsecutiveSubstringInAlphabet(text.toCharArray(), alphabet); } /** * Longest consecutive substring in the alphabet. * * @param text Text where to search the longest consecutive substring. * @param alphabet Alphabet to search in the test provided. * * @return Size of the longest consecutive substring. */ public static int longestConsecutiveSubstringInAlphabet(char[] text, String alphabet) { int longest = 0; int candidateLength = 0; for (char c : text) { Character C = Character.toLowerCase(c); if (alphabet.indexOf(C) >= 0) { ++candidateLength; } else { if (longest < candidateLength) { longest = candidateLength; } candidateLength = 0; } } if (longest < candidateLength) { longest = candidateLength; } return longest; } /** * Get the ratio of vowels w.r.t. the text passed as param. * * @param text Text to be analysed. * * @return Ratio vowels/text. */ public static Double getRatioVowelsChars(String text) { return getRatioOfSymbolsOccurrence(text, VOWELS); } /** * Get the ratio of consonants w.r.t. the text passed as param. * * @param text Text to be analysed. * * @return Ratio consonants/text. */ public static Double getRatioConsonantsChars(String text) { return getRatioOfSymbolsOccurrence(text, CONSONANTS); } /** * Get the ratio of letters w.r.t. the text passed as param. * * @param text Text to be analysed. * * @return Ratio letters/text. */ public static Double getRatioLettersChars(String text) { return getRatioOfSymbolsOccurrence(text, LETTERS); } /** * Get the ratio of numbers w.r.t. the text passed as param. * * @param text Text to be analysed. * * @return Ratio numbers/text. */ public static Double getRatioNumericChars(String text) { return getRatioOfSymbolsOccurrence(text, DIGITS); } /** * Get the ratio of symbols w.r.t. the text passed as param. * * @param text Text to be analysed. * * @return Ratio symbols/text. */ public static Double getRatioSymbolChars(String text) { return getRatioOfSymbolsOccurrence(text, SYMBOLS); } @NotNull private static Double getRatioOfSymbolsOccurrence(String text, String symbols) { try { double counter = 0; for (Character character : text.toCharArray()) { if (StringUtils.containsIgnoreCase(symbols, character.toString())) { ++counter; } } return counter / text.length(); } catch (ArithmeticException ex) { return Double.NaN; } } }
java
‘India is listening to’ is a look at what music is wildly popular in the country at the moment, and whether it’s worth your time. Some songs have intros that are downright misleading. They start off with the promise of the song sounding a certain way but then the song turns out to be something else entirely. This can be an effective way to flip the script on something familiar and make it interesting, but it can just as easily fall flat. Tyson Sidhu’s “Jatta Ve” does the latter. The song starts slow and features a flurry of piano notes accompanied by an acoustic guitar. Lately, this instrumentation has been the basis of dancehall or even upbeat pop. This song, however, goes into a much mellower mood. While the song does feature a kick-drum heavy beat, that is not the driving force behind it. This is a mellow, slightly introspective track that is propelled by Sidhu’s voice. The instruments all work to prop up his voice rather than trying to take its place. So, while the first few seconds might have you thinking this is a banger, that certainly is not the case. All in all, “Jatta Ve” is a laid-back but still thoughtful track whose best part is Tyson Sidhu’s voice. Who Will Love It: Fans of Tyson Sidhu, fans of mellow Punjabi music. The Good: Sidhu’s voice, the understated instruments. The Bad: The song can feel a bit repetitive. The Verdict: If you’re in the mood for something mellow that still has a beat, this song is perfect.
english
[ { "Id": "171719", "ThreadId": "51230", "Html": "Hi,<br>\r\nHow do I bind to the DeleteCommand of a DataGrid to a button? I've tried this but it something is wrong - the button gets enabled/disabled as items in the grid are selected / deselected and if I press the button it gets disabled as well, but no items are removed. Removing by pressing the delete button works.<br>\r\n<br>\r\n&lt;Window x:Class=&quot;GridDeleteTest.Window1&quot;<br>\r\n&nbsp;&nbsp;&nbsp; xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;<br>\r\n&nbsp;&nbsp;&nbsp; xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;<br>\r\n&nbsp;&nbsp;&nbsp; xmlns:toolkit=&quot;clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit&quot;<br>\r\n&nbsp;&nbsp;&nbsp; Title=&quot;Window1&quot; Height=&quot;300&quot; Width=&quot;300&quot;&gt;<br>\r\n&nbsp;&nbsp;&nbsp; &lt;StackPanel&gt;<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;toolkit:DataGrid AutoGenerateColumns=&quot;False&quot; Name=&quot;grid&quot;&gt;<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;toolkit:DataGrid.Columns&gt;<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;toolkit:DataGridTextColumn Binding=&quot;{Binding Mode=OneWay}&quot; Header=&quot;Header&quot; IsReadOnly=&quot;True&quot; /&gt; <br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/toolkit:DataGrid.Columns&gt;<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/toolkit:DataGrid&gt;<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Button Command=&quot;toolkit:DataGrid.DeleteCommand&quot; CommandTarget=&quot;{Binding ElementName=grid}&quot; Content=&quot;Remove&quot;/&gt;<br>\r\n&nbsp;&nbsp;&nbsp; &lt;/StackPanel&gt;<br>\r\n&lt;/Window&gt;<br>\r\n<br>\r\n", "PostedDate": "2009-03-25T01:16:41.143-07:00", "UserRole": null, "MarkedAsAnswerDate": null }, { "Id": "173831", "ThreadId": "51230", "Html": "Hi,<br>\r\nI had the same problem, and solved that on this way:<br>\r\nset button property <span style=\"font-size:13px;color:#ff0000\">Focusable</span><span style=\"font-size:13px;color:#0000ff\">=&quot;False&quot;</span><br>\r\n", "PostedDate": "2009-03-31T03:27:12.787-07:00", "UserRole": null, "MarkedAsAnswerDate": null }, { "Id": "174077", "ThreadId": "51230", "Html": "Thank you for reporting this issue; we are investigating and hope to release a fix in a future update.<br>\r\n<br>\r\nAlexis\r\n", "PostedDate": "2009-03-31T13:52:06.663-07:00", "UserRole": null, "MarkedAsAnswerDate": null }, { "Id": "174312", "ThreadId": "51230", "Html": "<p>Hi there, i have a few scripts that might help you on the binding delete to a button, you just put them in a click envent</p>\r\n<p></p>\r\n<p>if (MessageBox.Show(<br>\r\nstring.Format(&quot;Are you sure you want to permently delete {0}?&quot;,<br>\r\ndataGVReport.SelectedItems.Count &gt; 1<br>\r\n? string.Format(&quot;{0} records?&quot;, dataGVReport.SelectedItems.Count)<br>\r\n: &quot;this record&quot;),<br>\r\n&quot;Verify your request&quot;, MessageBoxButton.YesNo) == MessageBoxResult.Yes)<br>\r\n{<br>\r\ntry<br>\r\n{<br>\r\naccessCon = new OleDbConnection();<br>\r\naccessCon.ConnectionString = Common.GetConnectionString();<br>\r\naccessCon.Open();<br>\r\nIList iList = dataGVReport.SelectedItems;<br>\r\nfor(int i = 0; i &lt; iList.Count; i++)<br>\r\n{<br>\r\nDataRowView drv = (DataRowView)iList[i]; //get datarowview<br>\r\nint primaryID = (int)drv.Row[0];//get current row's primary id<br>\r\ndtAllBusiness.Rows.Remove(dtAllBusiness.Rows.Find(primaryID));//remove the datarow by finding primaryID<br>\r\naccessCmd = new OleDbCommand(@&quot;DELETE * FROM DailyOperation WHERE Operation_id = &quot; + primaryID, accessCon);<br>\r\naccessCmd.ExecuteNonQuery();  <br>\r\n}<br>\r\naccessCon.Close();<br>\r\nListProducts(dtAllBusiness); //this is to refresh datagrid again, <br>\r\n<br>\r\n}<br>\r\ncatch (Exception ex)<br>\r\n{<br>\r\nCustomMessageBox.Show(this, ex.Message + &quot;... Please Contact Support Immediately!!!&quot;, title, MessageBoxButton.OK, (MessageBoxImage)Enum.Parse(typeof(MessageBoxImage), &quot;Warning&quot;));<br>\r\n}<br>\r\n}<br>\r\n<br>\r\n</p>\r\n", "PostedDate": "2009-04-01T06:12:08.493-07:00", "UserRole": null, "MarkedAsAnswerDate": null }, { "Id": "189199", "ThreadId": "51230", "Html": "<p>I had this issue as well.</p>\r\n<p>@miki28: Thanks for the quick fix, seems to work!</p>\r\n<p>@totolwang: Dude, do you really put SQL statements in your event handlers? :)</p>", "PostedDate": "2009-05-12T03:22:59.463-07:00", "UserRole": null, "MarkedAsAnswerDate": null } ]
json
<gh_stars>1-10 from page_scrapers.wikipedia.scrapers.film import WikipediaFilmScraper query_1 = "<NAME>" scraper_1 = WikipediaFilmScraper(query_1) scraped_1 = scraper_1.scrape() filtered_1 = scraper_1.filter() print(filtered_1) query_2 = "hellraiser judgement" scraper_2 = WikipediaFilmScraper(query_2) scraped_2 = scraper_2.scrape() filtered_2 = scraper_2.filter() print(filtered_2)
python
--- title: Jak zachować format obrazu użytego jako tło ms.date: 03/30/2017 helpviewer_keywords: - aspect ratios of background images [WPF], preserving - brushes [WPF], preserving aspect ratios of background images - background images [WPF], preserving aspect ratios ms.assetid: 28c39478-13d7-4011-80a3-8b9cc3e54478 ms.openlocfilehash: 8cf0a3804172b90af33318299d60aa6c7eaa53f0 ms.sourcegitcommit: a<PASSWORD>c3e44<PASSWORD>6471348893d5373c6e9e49a47 ms.translationtype: MT ms.contentlocale: pl-PL ms.lasthandoff: 09/06/2018 ms.locfileid: "43863089" --- # <a name="how-to-preserve-the-aspect-ratio-of-an-image-used-as-a-background"></a>Jak zachować format obrazu użytego jako tło W tym przykładzie pokazano, jak używać <xref:System.Windows.Media.TileBrush.Stretch%2A> właściwość <xref:System.Windows.Media.ImageBrush> Aby zachować współczynnik proporcji obrazu. Domyślnie, gdy używasz <xref:System.Windows.Media.ImageBrush> można malować obszar, jego zawartość zostanie rozciągnięty w celu całkowitego wypełnienia obszaru wyjściowego. Jeśli obszar danych wyjściowych i obraz, który ma różnych współczynnikach proporcji, obraz, który jest zniekształcony to rozciągając. Aby <xref:System.Windows.Media.ImageBrush> współczynnik proporcji jego obrazu, ustaw <xref:System.Windows.Media.TileBrush.Stretch%2A> właściwości <xref:System.Windows.Media.Stretch.Uniform> lub <xref:System.Windows.Media.Stretch.UniformToFill>. ## <a name="example"></a>Przykład W poniższym przykładzie użyto dwóch <xref:System.Windows.Media.ImageBrush> obiekty do malowania dwoma prostokątami. Każdego prostokąta wynosi 300 x 150 pikseli i każdy z nich zawiera obraz 300 przez 300 pikseli. <xref:System.Windows.Media.TileBrush.Stretch%2A> Pędzla pierwszy zostaje ustalona <xref:System.Windows.Media.Stretch.Uniform>i <xref:System.Windows.Media.TileBrush.Stretch%2A> drugi pędzla zostaje ustalona <xref:System.Windows.Media.Stretch.UniformToFill>. [!code-csharp[UsingImageBrush_snip#ImageBrushStretchModesExampleWholePage](../../../../samples/snippets/csharp/VS_Snippets_Wpf/UsingImageBrush_snip/CSharp/StretchModes.cs#imagebrushstretchmodesexamplewholepage)] Na poniższej ilustracji przedstawiono dane wyjściowe pierwszy pędzla, który ma <xref:System.Windows.Media.TileBrush.Stretch%2A> ustawienie <xref:System.Windows.Media.Stretch.Uniform>. ![ImageBrush za pomocą jednolitego rozciąganie](../../../../docs/framework/wpf/graphics-multimedia/media/graphicsmm-imagebrushuniformstretch.jpg "graphicsmm_ImageBrushUniformStretch") Następna ilustracja przedstawia dane wyjściowe drugi pędzla, który ma <xref:System.Windows.Media.TileBrush.Stretch%2A> ustawienie <xref:System.Windows.Media.Stretch.UniformToFill>. ![ImageBrush z rozciągania typu UniformToFill](../../../../docs/framework/wpf/graphics-multimedia/media/graphicsmm-imagebrushuniformtofillstretch.jpg "graphicsmm_ImageBrushUniformToFillStretch") Należy pamiętać, że <xref:System.Windows.Media.TileBrush.Stretch%2A> właściwość zachowuje się tak samo dla siebie <xref:System.Windows.Media.TileBrush> obiekty, oznacza to, aby uzyskać <xref:System.Windows.Media.DrawingBrush> i <xref:System.Windows.Media.VisualBrush>. Aby uzyskać więcej informacji na temat <xref:System.Windows.Media.ImageBrush> , a druga <xref:System.Windows.Media.TileBrush> obiekty, zobacz [malowanie obrazami, rysowaniem i Visual](../../../../docs/framework/wpf/graphics-multimedia/painting-with-images-drawings-and-visuals.md). Należy zauważyć, że, mimo że <xref:System.Windows.Media.TileBrush.Stretch%2A> właściwość pojawia się, aby określić sposób, w jaki <xref:System.Windows.Media.TileBrush> zawartość zostanie rozciągnięty w celu dopasowania jej obszaru danych wyjściowych, faktycznie określa sposób, w jaki <xref:System.Windows.Media.TileBrush> zawartości odcinkach w celu wypełnienia jego podstawowy Kafelek. Aby uzyskać więcej informacji, zobacz <xref:System.Windows.Media.TileBrush>. Ten przykład kodu jest częścią większego przykładu, który jest udostępniany dla <xref:System.Windows.Media.ImageBrush> klasy. Aby uzyskać pełny przykład, zobacz [przykładowe ImageBrush](https://go.microsoft.com/fwlink/?LinkID=160005). ## <a name="see-also"></a>Zobacz też <xref:System.Windows.Media.TileBrush> [Malowanie przy użyciu obrazów, rysowania i wizualizacji](../../../../docs/framework/wpf/graphics-multimedia/painting-with-images-drawings-and-visuals.md)
markdown
<filename>src/Draggable.js import React, { useRef, useState, useContext, useEffect } from "react"; import { getTransformedPosition } from "./Util"; import { DragContext } from "./DragContext"; export default (props) => { const initialPosition = { x: props.x || 0, y: props.y || 0, }; const [position, setPosition] = useState(initialPosition); useEffect(() => setPosition({ x: props.x, y: props.y })); const container = useRef(); const context = useContext(DragContext); let mousePosition; const mouseDown = (event) => { event.preventDefault(); event.stopPropagation(); document.addEventListener("mousemove", mouseMove); document.addEventListener("mouseup", mouseUp); container.current.style.pointerEvents = "none"; props.dragged && props.dragged(initialPosition); context.setDragData(props.data); }; let mouseUp = (event) => { event.preventDefault(); event.stopPropagation(); document.removeEventListener("mouseup", mouseUp); document.removeEventListener("mousemove", mouseMove); container.current.style.pointerEvents = "initial"; props.dropped && props.dropped(position); context.setDropped(true); if (!props.persist) { setPosition(initialPosition); } }; const mouseMove = (event) => { event.preventDefault(); event.stopPropagation(); let grid = props.grid; if(!grid) { grid = {x: 1, y: 1}; } if (!mousePosition) { mousePosition = { x: event.clientX, y: event.clientY }; } if (props.draggable) { const svg = container.current.viewportElement; let oldPosition = getTransformedPosition(mousePosition, svg); let currentPosition = getTransformedPosition( { x: event.clientX, y: event.clientY }, svg ); let offset = { x: currentPosition.x - oldPosition.x, y: currentPosition.y - oldPosition.y, }; let newPosition = { x: Math.floor((initialPosition.x + offset.x) / grid.x) * grid.x, y: Math.floor((initialPosition.y + offset.y) / grid.y) * grid.y, }; props.moved && props.moved(newPosition, offset); setPosition(newPosition); } }; return ( <g transform={`translate(${position.x}, ${position.y})`} onMouseDown={mouseDown} ref={container} > {props.children} </g> ); };
javascript
At NJPW: Power Struggle 2017, Kenny Omega successfully defended his IWGP United States Championship against Trent in a hard-fought victory. In the aftermath of Omega's win, he was challenged by Chris Jericho and the two men eventually agreed to a match at Wrestle Kingdom. On the third year anniversary of Omega's clash against Trent, the latter took to Twitter to reflect on the bout and sent a message to Jericho. Clearly, Trent wasn't too pleased with Jericho interrupting him three years ago and once again expressed his hate towards the former AEW World Champion. Taking to Twitter, Trent wrote that Chris Jericho stole his thunder on the night with his return and ruined his life. Here is what one-half of the Best Friends wrote: Having already worked alongside Kenny Omega in Japan, Trent is currently sharing the stage with both Omega and Chris Jericho in AEW. A vital part of the AEW Tag Team Division, Trent and his tag partner Chuck Taylor have been working their way up in a stacked division. In 2017, Trent faced Kenny Omega at the Power Struggle pay-per-view. Omega, who had defeated Tomohiro Ishii to become the inaugural IWGP US Champion, defended his title on numerous occasions and his victory over Trent cemented his place as a strong inaugural champion. In the aftermath of his win, Kenny Omega and the rest of The Elite trio was interrupted by Chris Jericho. Omega and Jericho then faced each other at Wrestle Kingdom, in what was an early Match of the Year candidate. In one of the most brutal No DQ matches, Omega retained his title before eventually losing the strap to Jay White. Trent, on the other hand, won the NEVER Openweight 6-Man Tag Team Titles on the same night along with his CHAOS stablemates Chuck Tayor and Toru Yano.
english
<filename>cell.py import torch import torch.nn as nn import torch.nn.functional as F class HiddenGate(nn.Module): def __init__(self, hidden_size, input_size, bias, nonlinearity="sigmoid"): super(HiddenGate, self).__init__() self.linear = nn.Linear( 3*hidden_size + input_size + hidden_size, hidden_size, bias=bias) self.nonlinearity = F.sigmoid if nonlinearity == "sigmoid" else F.tanh def forward(self, Xis, x_i, prev_g): return self.nonlinearity(self.linear(torch.cat([Xis, x_i, prev_g]))) class SentenceStateGate(nn.Module): def __init__(self, hidden_size, input_size, bias): super(SentenceStateGate, self).__init__() self.linear = nn.Linear( hidden_size + hidden_size, hidden_size, bias=bias) def forward(self, prev_g, h): """ h is either h_av or h_i for different i""" return F.sigmoid(self.linear(torch.cat([prev_g, h]))) class SLSTMCell(nn.Module): def __init__(self, input_size, hidden_size, bias=True): super(SLSTMCell, self).__init__() self.input_size = input_size self.hidden_size = hidden_size self.bias = bias # hidden state gates self.i_i_op = HiddenGate(hidden_size, input_size, bias) self.l_i_op = HiddenGate(hidden_size, input_size, bias) self.r_i_op = HiddenGate(hidden_size, input_size, bias) self.f_i_op = HiddenGate(hidden_size, input_size, bias) self.s_i_op = HiddenGate(hidden_size, input_size, bias) self.o_i_op = HiddenGate(hidden_size, input_size, bias) self.u_i_op = HiddenGate(hidden_size, input_size, nonlinearity="tanh") # sentence state gates self.g_f_g_op = SentenceStateGate(hidden_size, input_size, bias) self.g_f_i_op = SentenceStateGate(hidden_size, input_size, bias) self.g_o_op = SentenceStateGate(hidden_size, input_size, bias) def reset_params(self): pass def get_Xis(self, prev_h_states): """Apply proper index selection mask to get xis""" # How do you handle it getting shorter eh?? pass def forward(self, prev_h_states, prev_c_states, prev_g_state, x_i, prev_c_g): Xi_i = self.get_Xi_i(prev_h_states) i_i = self.i_i_op(Xi_i, x_i, prev_g_state) l_i = self.l_i_op(Xi_i, x_i, prev_g_state) r_i = self.l_i_op(Xi_i, x_i, prev_g_state) f_i = self.l_i_op(Xi_i, x_i, prev_g_state) s_i = self.l_i_op(Xi_i, x_i, prev_g_state) o_i = self.l_i_op(Xi_i, x_i, prev_g_state) u_i = self.u_i_op(Xi_i, x_i, prev_g_state) # Now Get Softmaxed Versions i_i, l_i, r_i, f_i, s_i = self.softmaxed_gates( [i_i, l_i, r_i, f_i, s_i]) # what happens to the the last cell here?????? which has no i+1? # what happens when first one has no i-1?? prev_c_left, prev_c_right, prev_c = self.get_prev_cs(prev_c_states) c_i = l_i * prev_c_left + f_i * prev_c + r_i * prev_c_right + \ s_i * prev_c_g + i_i * u_i h_i = o_i * F.tanh(c_i) # Now for the sentence level calculations h_avg = prev_h_states.mean(dim=0) g_f_g = self.g_f_g_op(prev_g_state, h_avg) g_f_i = self.g_f_i_op(prev_g_state, prev_h_states) g_o = self.g_o_op(prev_g_state, h_avg) temp = self.softmaxed_gates(list(torch.unbind(g_f_i)) + [g_f_g]) g_f_i = torch.stack(temp[:-1], dim=0) g_f_g = temp[-1] c_g = g_f_g * prev_c_g + torch.sum(g_f_i * prev_c_states, dim=0) g = g_o * F.tanh(c_g) return h_i, c_i, g, c_g def softmaxed_gates(self, gates_list): softmaxed = F.softmax(torch.stack(gates_list), dim=0) return torch.unbind(softmaxed)
python
package de.captaingoldfish.scim.sdk.server.schemas.custom; import de.captaingoldfish.scim.sdk.common.constants.AttributeNames; import de.captaingoldfish.scim.sdk.common.resources.base.ScimObjectNode; import lombok.Builder; import lombok.NoArgsConstructor; /** * author <NAME> <br> * created at: 26.11.2019 - 08:50 <br> * <br> * this feature extension will allow to disable specific endpoint for specific resource types */ @NoArgsConstructor public class EndpointControlFeature extends ScimObjectNode { @Builder public EndpointControlFeature(Boolean createDisabled, Boolean getDisabled, Boolean listDisabled, Boolean updateDisabled, Boolean deleteDisabled) { this(); setCreateDisabled(createDisabled); setGetDisabled(getDisabled); setListDisabled(listDisabled); setUpdateDisabled(updateDisabled); setDeleteDisabled(deleteDisabled); } /** * if the create endpoint is disabled or not */ public boolean isCreateDisabled() { return getBooleanAttribute(AttributeNames.Custom.DISABLE_CREATE).orElse(false); } /** * if the create endpoint is disabled or not */ public void setCreateDisabled(Boolean createDisabled) { setAttribute(AttributeNames.Custom.DISABLE_CREATE, createDisabled); } /** * if the get endpoint is disabled or not */ public boolean isGetDisabled() { return getBooleanAttribute(AttributeNames.Custom.DISABLE_GET).orElse(false); } /** * if the get endpoint is disabled or not */ public void setGetDisabled(Boolean getDisabled) { setAttribute(AttributeNames.Custom.DISABLE_GET, getDisabled); } /** * if the list endpoint is disabled or not */ public boolean isListDisabled() { return getBooleanAttribute(AttributeNames.Custom.DISABLE_LIST).orElse(false); } /** * if the list endpoint is disabled or not */ public void setListDisabled(Boolean listDisabled) { setAttribute(AttributeNames.Custom.DISABLE_LIST, listDisabled); } /** * if the update endpoint is disabled or not */ public boolean isUpdateDisabled() { return getBooleanAttribute(AttributeNames.Custom.DISABLE_UPDATE).orElse(false); } /** * if the update endpoint is disabled or not */ public void setUpdateDisabled(Boolean disableUpdate) { setAttribute(AttributeNames.Custom.DISABLE_UPDATE, disableUpdate); } /** * if the delete endpoint is disabled or not */ public boolean isDeleteDisabled() { return getBooleanAttribute(AttributeNames.Custom.DISABLE_DELETE).orElse(false); } /** * if the delete endpoint is disabled or not */ public void setDeleteDisabled(Boolean disableDelete) { setAttribute(AttributeNames.Custom.DISABLE_DELETE, disableDelete); } /** * check if all methods are disabled */ public boolean isResourceTypeDisabled() { if (isCreateDisabled() && isGetDisabled() && isListDisabled() && isUpdateDisabled() && isDeleteDisabled()) { return true; } return false; } }
java
export const DATA_SUCCESS = 'boilerplate/DetailsForm/DATA_SUCCESS'; export const CLEAN_DATA = 'boilerplate/DetailsForm/CLEAN_DATA';
javascript
September 8 this year marks the last day of Onam, the biggest harvest festival in Kerala. The day also marks new year’s eve for the Malayalis. The auspicious occasion sees people decorating their homes with rangolis, preparing feasts called “Onam Sadhya” and wearing ethnic outfits. On the eve of the final day of Onam celebrations, various actors, including Sai Pallavi, shared wishes with their beloved Malayali fans on Twitter. Sai Pallavi’s tweet read, “Onam Ashamsakal to all you lovely people. May you be immersed in joy, spread love and pls share Sadhya with friends like me who don’t have access to it. ” She joked about not being a Malayali due to which it is difficult for her to avail of the delicious Onam Sadhya. The tweet has received 13,000 likes and fans in the comments section have also wished her and others Happy Onam. Sai Pallavi’s first film was a Malayalam one by the name Premam, the reason she is very close to her Malayali fans despite being a Tamilian. The actress shot to fame with her film Middle-Class Abbayi in which she played the love interest of Nani’s character. Sai Pallavi has given many iconic performances including Maari 2, NGK, Shyam Singha Roy and Virat Parvam. In her early days, she was also into dancing and was the 3rd runner-up in the 2009 show Dhee Ultimate Dance Show Season 4. Other actors like Madhavan, Nivin Pauly, Karthi, Mammootty and Mohanlal also wished their fans Happy Onam through various social media platforms like Twitter and Instagram. Madhavan shared a selfie and said, “Wish you all a very Happy Onam! ! ! " All the actors, in response to their wishes, got love from their fans irrespective of the social media platform.
english
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.elasticsearch.search.lookup; import org.apache.lucene.index.LeafReader; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.Nullable; import org.elasticsearch.index.fieldvisitor.SingleFieldsVisitor; import org.elasticsearch.index.mapper.IdFieldMapper; import org.elasticsearch.index.mapper.MappedFieldType; import org.elasticsearch.index.mapper.MapperService; import org.elasticsearch.index.mapper.UidFieldMapper; import java.io.IOException; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import static java.util.Collections.singletonMap; public class LeafFieldsLookup implements Map { private final MapperService mapperService; private final boolean singleType; @Nullable private final String[] types; private final LeafReader reader; private int docId = -1; private final Map<String, FieldLookup> cachedFieldData = new HashMap<>(); private final SingleFieldsVisitor fieldVisitor; LeafFieldsLookup(MapperService mapperService, @Nullable String[] types, LeafReader reader) { this.mapperService = mapperService; this.singleType = mapperService.getIndexSettings().isSingleType(); this.types = types; this.reader = reader; this.fieldVisitor = new SingleFieldsVisitor(null); } public void setDocument(int docId) { if (this.docId == docId) { // if we are called with the same docId, don't invalidate source return; } this.docId = docId; clearCache(); } @Override public Object get(Object key) { return loadFieldData(key.toString()); } @Override public boolean containsKey(Object key) { try { loadFieldData(key.toString()); return true; } catch (Exception e) { return false; } } @Override public int size() { throw new UnsupportedOperationException(); } @Override public boolean isEmpty() { throw new UnsupportedOperationException(); } @Override public Set keySet() { throw new UnsupportedOperationException(); } @Override public Collection values() { throw new UnsupportedOperationException(); } @Override public Set entrySet() { throw new UnsupportedOperationException(); } @Override public Object put(Object key, Object value) { throw new UnsupportedOperationException(); } @Override public Object remove(Object key) { throw new UnsupportedOperationException(); } @Override public void clear() { throw new UnsupportedOperationException(); } @Override public void putAll(Map m) { throw new UnsupportedOperationException(); } @Override public boolean containsValue(Object value) { throw new UnsupportedOperationException(); } private FieldLookup loadFieldData(String name) { FieldLookup data = cachedFieldData.get(name); if (data == null) { MappedFieldType fieldType = mapperService.fullName(name); if (fieldType == null) { throw new IllegalArgumentException("No field found for [" + name + "] in mapping with types " + Arrays.toString(types)); } data = new FieldLookup(fieldType); cachedFieldData.put(name, data); } if (data.fields() == null) { String fieldName = data.fieldType().name(); String lookupField = fieldName; if (singleType && UidFieldMapper.NAME.equals(fieldName)) { lookupField = IdFieldMapper.NAME; } fieldVisitor.reset(lookupField); try { reader.document(docId, fieldVisitor); fieldVisitor.postProcess(mapperService); List<Object> storedFields = fieldVisitor.fields().get(fieldName); data.fields(singletonMap(fieldName, storedFields)); } catch (IOException e) { throw new ElasticsearchParseException("failed to load field [{}]", e, name); } } return data; } private void clearCache() { for (Entry<String, FieldLookup> entry : cachedFieldData.entrySet()) { entry.getValue().clear(); } } }
java
<reponame>ShiuLab/RNAseq_pipeline ## IMPORT import sys import os ## MAIN print (''' inp1 = .sra file inp2 = bowtie index root name inp3 = paired (1) or single reads (0) or paired processed as single (2) Optional Inputs: -trim_threads = threads to use when running Trimmomatic (note: the actual number of threads used will be 1 + this value) -trim_adapter = adapter sequenecs to use with Trimmomatic -trim_seed = seed size to use with adapter trimming -trim_pclip = palidromic clipping to use with adapter trimming -trim_sclip = simple clipping to used with adapter trimming -trim_leading = quality value for hard clipping of leading bases -trim_trailing = quality value for hard clipping of trailing bases -trim_winsize = window size for soft clipping -trim_winqual = average quality for soft clipping -trim_minlen = minimum length of trimmed reads -trim_crop = fixed number of bases to trim from the end of all reads -trim_hcrop = fixed number of bases to trim form the front of all reads -tophat_threads = number of threads to use with tophat -min_intron = minimum intron size to use with tophat and cufflinks, default = 50 -max_intron = maximum intron size to use with tophat and cufflinks, default = 5000 -max_multihit = maximum number of mappings per read in tophat, default = 20 -filter_min_len = minimum read length post-trimming, default = 20 -filter_min_phred = minimum average read phred post-trimming, default = 20 Protocol: fastq-dump: covert SRA -> fastq Trimmomatic: trim fastq Filter reads by length and min ave phred score Bowtie: map reads SAMTools: Convert bam file to sam file Filter sam file to primary and unique reads Required Modules: - SRAToolkit (module load SRAToolkit) - Trimmomatic (module load Trimmomatic) - Tophat2 (module load TopHat2) - Boost (module load Boost) - SAMTools (module load SAMTools) module load SRAToolkit; module load Trimmomatic; module load TopHat2; module load Boost; module load SAMTools ''') ## READ INPUT SRA infile = os.path.abspath(sys.argv[1]) genome = sys.argv[2] PE = int(sys.argv[3]) ## PRESET VALUES # out_dir = "" # Trimmomatic Parameters-- Always used # updating adapter_seq to include all universal adaptors, need to have these in wd if PE == 1: adapter_seq = "all_PE_adapters.fa" elif PE == 2: adapter_seq = "all_PE_adapters.fa" else: adapter_seq = "all_SE_adapters.fa" trim_threads = 4 seed_mismatches = 2 palindrome_clip = 30 simple_clip = 10 leading = 3 trailing = 3 window_size = 4 window_quality = 20 # Trimmomatic Parameters-- Added when value is non-zero trim_minlen = 0 trim_crop = 0 trim_headcrop = 0 # Default filtering thresholds min_filter_len = 20 min_filter_phred = 20 # Tophat&Cufflinks Parameters tophat_threads = 8 min_intron_size = 50 max_intron_size = 5000 max_multiHits = 20 ## READ PARAMETERS for i in range(len(sys.argv)): # if sys.argv[i] == "-genome": # genome = sys.argv[i+1] if sys.argv[i] == "-gff": gff = sys.argv[i+1] if sys.argv[i] == "-trim_threads": trim_threads = sys.argv[i+1] if sys.argv[i] == "-trim_adapter": adapter_seq = sys.argv[i+1] if sys.argv[i] == "-trim_seed": seed_mismatches = sys.argv[i+1] if sys.argv[i] == "-trim_pclip": palindrome_clip = sys.argv[i+1] if sys.argv[i] == "-trim_sclip": simple_clip = sys.argv[i+1] if sys.argv[i] == "-trim_leading": leading = sys.argv[i+1] if sys.argv[i] == "-trim_trailing": trailing = sys.argv[i+1] if sys.argv[i] == "-trim_winsize": window_size = sys.argv[i+1] if sys.argv[i] == "-trim_winqual": window_quality = sys.argv[i+1] if sys.argv[i] == "-trim_minlen": trim_minlen = sys.argv[i+1] if sys.argv[i] == "-trim_crop": trim_crop = sys.argv[i+1] if sys.argv[i] == "-trim_hcrop": trim_headcrop = sys.argv[i+1] if sys.argv[i] == "-tophat_threads": tophat_threads = sys.argv[i+1] if sys.argv[i] == "-min_intron": min_intron_size = sys.argv[i+1] if sys.argv[i] == "-max_intron": max_intron_size = sys.argv[i+1] if sys.argv[i] == "-max_multihit": max_multiHits = sys.argv[i+1] if sys.argv[i] == "-filter_min_len": min_filter_len = sys.argv[i+1] if sys.argv[i] == "-filter_min_phred": min_filter_phred = sys.argv[i+1] # if sys.argv[i] == "-output_dir": # out_dir = os.path.abspath(sys.argv[i+1]) ## RUN COMMANDS # Decompress SRA Files f_sra = infile print ("Dumping SRA file") if PE == 1: dump_command = "fastq-dump --split-files "+f_sra os.system(dump_command) elif PE == 2: os.system("fastq-dump --split-files %s"%(f_sra)) elif PE == 0: dump_command = "fastq-dump "+f_sra os.system(dump_command) # print dump_command print ("First fastQC") if PE == 1: f_fastq = infile.split(".")[0]+"_1.fastq" r_fastq = infile.split(".")[0]+"_2.fastq" print (infile, f_fastq, r_fastq) fastqc_command1 = "fastqc -f fastq "+ f_fastq fastqc_command2 = "fastqc -f fastq "+ r_fastq os.system(fastqc_command1) os.system(fastqc_command2) elif PE == 2: name = infile.split(".")[0] f_fastq = infile.split(".")[0]+"_1.fastq" r_fastq = infile.split(".")[0]+"_2.fastq" print (infile, f_fastq) os.system("mv %s %s.fastq" %(f_fastq, name)) fastqc_command = "fastqc -f fastq "+name+".fastq" os.system(fastqc_command) os.system("rm %s"%r_fastq) else: f_fastq = infile.split(".")[0]+".fastq" print (infile, f_fastq) fastqc_command = "fastqc -f fastq "+ f_fastq os.system(fastqc_command) print ("Trimming reads") # Trim Reads if PE==1: f_fastq = infile.split(".")[0]+"_1.fastq" r_fastq = infile.split(".")[0]+"_2.fastq" print (infile, f_fastq, r_fastq) f_fastq_trimmedP = infile.split(".")[0]+"_1trimmed.fastq" r_fastq_trimmedP = infile.split(".")[0]+"_2trimmed.fastq" f_fastq_trimmedU = infile.split(".")[0]+"_1Utrimmed.fastq" r_fastq_trimmedU = infile.split(".")[0]+"_2Utrimmed.fastq" trimmomatic_command = "java -jar $TRIM/trimmomatic PE -threads %s %s %s %s %s %s %s " % (trim_threads,f_fastq,r_fastq, f_fastq_trimmedP, f_fastq_trimmedU, r_fastq_trimmedP, r_fastq_trimmedU) trimmomatic_command = trimmomatic_command + "ILLUMINACLIP:/mnt/research/ShiuLab/16_RNAseq/adapters/%s:%s:%s:%s " % (adapter_seq,seed_mismatches,palindrome_clip,simple_clip) trimmomatic_command = trimmomatic_command + "LEADING:%s TRAILING:%s SLIDINGWINDOW:%s:%s" % (leading,trailing,window_size,window_quality) if not trim_minlen == 0: trimmomatic_command = trimmomatic_command + " MINLEN:%s" % (trim_minlen) if not trim_crop == 0: trimmomatic_command = trimmomatic_command + " CROP:%s" % (trim_crop) if not trim_headcrop == 0: trimmomatic_command = trimmomatic_command + " HEADCROP:%s" % (trim_headcrop) os.system(trimmomatic_command) # print (" Deleting original fastq file:") # print (" %s"%(f_fastq)) #os.system("rm %s"%(f_fastq)) #os.system("rm %s"%(r_fastq)) # print ("Filtering trimmed reads") # # Filter trimmed reads # filter_command1 = "python /mnt/home/lloydjo1/scripts/A_Small_Read_Processing/filter_fastq.py -i %s -min %s -ave %s"%(f_fastq_trimmedP,min_filter_len,min_filter_phred) # filter_command2 = "python /mnt/home/lloydjo1/scripts/A_Small_Read_Processing/filter_fastq.py -i %s -min %s -ave %s"%(r_fastq_trimmedP,min_filter_len,min_filter_phred) # # print filter_command # os.system(filter_command1) # os.system(filter_command2) # # filtered_file = f_fastq_trimmed.replace("fastq","")+str(min_filter_len)+"_min_len."+str(min_filter_len)+"_min_phred.fastq" filtered_file1 = f_fastq_trimmedP filtered_file2 = r_fastq_trimmedP # print (" Deleting trimmed fastq file:") # print (" %s"%(f_fastq_trimmedP)) #os.system("rm %s"%(f_fastq_trimmedP)) #os.system("rm %s"%(r_fastq_trimmedP)) #os.system("rm %s"%(f_fastq_trimmedU)) #os.system("rm %s"%(r_fastq_trimmedU)) print ("Second fastQC") f_fastq2 = f_fastq_trimmedP r_fastq2 = r_fastq_trimmedP fastqc_command1 = "fastqc -f fastq "+ f_fastq2 fastqc_command2 = "fastqc -f fastq "+ r_fastq2 os.system(fastqc_command1) os.system(fastqc_command2) print ("Running TopHat") # Run tophat f_tophat_file = infile.split(".")[0]+".sra_tophat" #naming file # if out_dir != "": # f_tophat_file = out_dir+"/"+f_tophat_file tophat_command = "tophat2 -p %s -i %s -I %s -g %s -o %s %s %s %s" % (tophat_threads,min_intron_size,max_intron_size,max_multiHits,f_tophat_file,genome,filtered_file1, filtered_file2) #command print (tophat_command) os.system(tophat_command) #print (" Deleting filtered fastq file:") print (" %s"%(filtered_file1)) #os.system("rm %s"%(filtered_file)) print ("Converting BAM to SAM") os.system("python /mnt/home/lloydjo1/scripts/A_Small_Read_Processing/bam2sam.py %s/accepted_hits.bam"%(f_tophat_file)) print ("Filtering SAM and get unique reads") os.system("python /mnt/home/john3784/Github/RNAseq_pipeline/primary_and_unique_mapped_reads2.py %s/accepted_hits.sam %s"%(f_tophat_file, PE)) else: f_fastq = infile.split(".")[0]+".fastq" print (infile, f_fastq) f_fastq_trimmed = infile.split(".")[0]+"trimmed.fastq" trimmomatic_command = "java -jar $TRIM/trimmomatic SE -threads %s %s %s " % (trim_threads,f_fastq,f_fastq_trimmed) trimmomatic_command = trimmomatic_command + "ILLUMINACLIP:/mnt/research/ShiuLab/16_RNAseq/adapters/%s:%s:%s:%s " % (adapter_seq,seed_mismatches,palindrome_clip,simple_clip) trimmomatic_command = trimmomatic_command + "LEADING:%s TRAILING:%s SLIDINGWINDOW:%s:%s" % (leading,trailing,window_size,window_quality) if not trim_minlen == 0: trimmomatic_command = trimmomatic_command + " MINLEN:%s" % (trim_minlen) if not trim_crop == 0: trimmomatic_command = trimmomatic_command + " CROP:%s" % (trim_crop) if not trim_headcrop == 0: trimmomatic_command = trimmomatic_command + " HEADCROP:%s" % (trim_headcrop) # print trimmomatic_command os.system(trimmomatic_command) # print (" Deleting original fastq file:") # print (" %s"%(f_fastq)) # #os.system("rm %s"%(f_fastq)) # print ("Filtering trimmed reads") # # Filter trimmed reads # filter_command = "python /mnt/home/lloydjo1/scripts/A_Small_Read_Processing/filter_fastq.py -i %s -min %s -ave %s"%(f_fastq_trimmed,min_filter_len,min_filter_phred) # # print filter_command # os.system(filter_command) # filtered_file = f_fastq_trimmed.replace("fastq","")+str(min_filter_len)+"_min_len."+str(min_filter_len)+"_min_phred.fastq" filtered_file = f_fastq_trimmed # print (" Deleting trimmed fastq file:") # print (" %s"%(f_fastq_trimmed)) # #os.system("rm %s"%(f_fastq_trimmed)) print ("Second fastQC") f_fastq2 = f_fastq_trimmed fastqc_command = "fastqc -f fastq "+ f_fastq2 os.system(fastqc_command) print ("Running TopHat") # Run tophat f_tophat_file = infile.split(".")[0]+".sra_tophat" #naming file # if out_dir != "": # f_tophat_file = out_dir+"/"+f_tophat_file tophat_command = "tophat2 -p %s -i %s -I %s -g %s -o %s %s %s" % (tophat_threads,min_intron_size,max_intron_size,max_multiHits,f_tophat_file,genome,filtered_file) #command print (tophat_command) os.system(tophat_command) #print (" Deleting filtered fastq file:") print (" %s"%(filtered_file)) #os.system("rm %s"%(filtered_file)) print ("Converting BAM to SAM") os.system("python /mnt/home/lloydjo1/scripts/A_Small_Read_Processing/bam2sam.py %s/accepted_hits.bam"%(f_tophat_file)) print ("Filtering SAM to primary and unique reads") os.system("python /mnt/home/john3784/Github/RNAseq_pipeline/primary_and_unique_mapped_reads2.py %s/accepted_hits.sam %s"%(f_tophat_file, PE))
python
Wonder Woman is one of the single weirdest pop culture creations ever. Fans often don't want to hear this about her. When DC Entertainment Chief Diane Nelson recently tried to explain in an interview that DC doesn't know what to do with the character, because "she doesn't have the single, clear, compelling story that everyone knows and recognizes," there was the inevitable backlash. Susana Polo at The Mary Sue made the argument that is usually made in these situations: that there is nothing tricky about Wonder Woman, and that the reason Hollywood is unwilling to greenlight a film is because Hollywood is sexist. The absence of Wonder Woman, a character traditionally part a superhero triumverate with Superman and Batman, became even more noticeable after the recent Comic-Con announcement that we're going to have yet more Superman and Batman on the big screen — but this time, together! It's a predictable choice, and a result of the same dreary calculus which insists on recycling the same guys (and it is always guys) over and over, rather than creating something new, or possibly with a slightly different gender. Still, while Hollywood is quite sexist, and I have no trouble attributing the lack of female-led superhero films in general to that fact, Wonder Woman still presents some serious and legitimate problems for anyone who wants to bring her to the screen today. Most of those problems date back to the character's comic book origins. The man who created Wonder Woman, psychologist William Marston, was ... well, he was kind of a kook. He believed that women were superior to men in large part because they were more submissive than men. He designed Wonder Woman expressly as an icon to teach both boys and girls the virtues of female strength — that female strength being inextricably linked to submissiveness. Marston wasn't shy about the BDSM connotations. Here he is in 1944, for example, explaining Wonder Woman's appeal in an article called "Why 100,000,000 Americans Read Comics": Nor was Marston shy about bondage in his comics. Look at any given page of the original Wonder Woman run, and you'll find women and men alike trussing each other up in inventive and improbable ways. Here, for example, is our heroine breaking free of a gimp mask with her teeth while mentally providing a brief background in bondage history. I've heard folks argue that the point here is that Wonder Woman is breaking out of the bondage, not that she's tied up — but come on. She's in a gimp mask. Someone's tied up on almost every page. You can't tell me Marston didn't think that was sexy — especially when he's on record saying that the point of Wonder Woman is to make folks proud to be willing slaves. Obviously, later versions of Wonder Woman don't focus quite so much on the gimp masks, and Wonder Woman's lasso of obedience even got down-rated to the less useful but substantially more comfortable lasso of truth. Still, the outlines of the original remain. There isn't really any way around the fact that Wonder Woman is an avowedly, even militantly, feminist icon who wears a revealing swimsuit, plus a lasso and bracelets which were intended to be, and are still read now, as bondage gear. And the bondage/feminism problem is only the beginning of the character's idiosyncrasies. Wonder Woman is explicitly supposed to be bringing peace — but she comes from an Amazon warrior culture and spends most of her time fighting. She's a pagan Greek who wears a flag on her swimsuit. She comes from an all-female culture which excludes men — but her mission is to save man's world. And that's not even getting into the not-even-a-little-buried lesbian eroticism of the original comics. Fans agitating for Wonder Woman often point to the Thor movie as if Thor is a similarly odd or difficult choice for a film. But Thor is just a manly warrior who hits things. He's not a gay pacifist bondage enthusiast. Wonder Woman is. I'm not saying that Wonder Woman is a bad or uninteresting character. In fact, I am saying the opposite of that. Those original Wonder Woman comics are glorious and bizarre and beautiful — they are some of the greatest comics, and damn it, some of the greatest art, ever created by anyone. Amazons playing bondage games where they dress up as deer and eat each other; giant spacefaring kangaroos with extra lungs; evil midget hypnotists who ensorcell women in order to draw forth pink, ropy gobs of ectoplasm; cross-dressing snowmen — Marston is a cracked genius, whose exhilaratingly, perversely sexual feminist, queer, pacifist vision still looks, 60 years later, like it's 100 years ahead of its time. As just one example almost at random; here's a brief sequence from Wonder Woman #12, drawn by the amazing (and amazingly named) Harry Peter. Those are winged women from Venus tying up war-mongers in nets of magnetic gold to make them peaceful and loving. You've got Marston's favorite themes of peace, submission, matriarchy, and eroticized love (those are Venus girls after all), all stuffed into one. Plus, in that last panel, where a woman is substituted for the male captives, we get a nod to female-female submission, as the deft, quick motion lines convey the exhilaration of captivity and the rush of returning to a mother-prompted semi-fetal position ("I never felt so happy before!") There is, in short, a very specific artistic vision here, in the hothouse plethora of wings and dresses and nets and eloquently curling hair. And that artistic vision is precisely why it's hard to take Wonder Woman and make sense of her in a different context. Who would try to turn Henry Darger into a popcorn flick? Who wants to make Little Nemo into a television show? How could anyone think that that would be a good idea? It's true that Wonder Woman was made into a successful television show...as well as into lots of other comics, and an animated film, and even into a seminal piece of – video art. But very few of these later iterations have been anything but awful. The 70s television show, despite much nostalgic cache, is virtually unwatchable now (as opposed to the 60s Batman, which is as great as ever.) The 2009 Wonder Woman animated film presents Amazons as needing instruction in love from Steve Trevor. The ongoing comic by Brian Azzarello and Cliff Chiang presents Amazons as castrating child-killers and makes Wonder Woman the daughter of Zeus so that her powers come from her patriarchal bloodline. Even takes that don't flee in panic from the feminism, like Gail Simone's run on the comic, inevitably smooth out the edges, turning Wonder Woman into a fairly standard empowered action heroine, winking now and then at the character's oddness, but mostly ignoring it. None of this is surprising. Pop culture remains uncomfortable with feminism, and if it's going to overcome that discomfort, it's going to try to do it in a way that appeals to the broadest number of people as possible, by avoiding stories that would make both feminists and non-feminists furrow their brows. The current media landscape — and the moderate advances of feminism in media — have arguably made Wonder Woman more, rather than less, difficult to deal with. Just look at Xena, Buffy, Katniss, and Korra — there are lots of female action heroes now who are empowered in ways that don't involve bondage imagery or all-female-community essentialism. There's not that much to Superman or Batman. They're pulp action heroes, period. Wonder Woman, on the other hand, was deliberately, ideologically feminist, sexual, and even messianic. Marston made it work, and made it popular — those original comics were hugely successful. But a studio simply isn't going to pony up the funds for a feminist bondage extravaganza on the strength of the fact that something similar made money six or seven decades ago. Any Wonder Woman film that gets made is going to have to make her blander while leaving her recognizable. It's tricky. And it also seems kind of pointless. If you have to ignore the characters' oddness to make the thing work, why use the character at all? If you don't want the feminist bondage submissive pacifist lesbian goofiness, why not just make a superhero story about someone else? I know there are Wonder Woman fans who love the character in her later, more conventional, almost uniformly badly written incarnations. I don't really understand it, but I acknowledge it. As far as I'm concerned, though, I don't have any desire to see yet another badly conceived version of the character tramp through yet another mediocre storyline, and doing so won't honor Marston or his creation. Honestly, I'm glad the character is tricky enough that studio execs can't quite figure out how to ruin her for a mass audience. May she foil all such attempts to bind and/or unbind her.
english
മികവുറ്റ Car .. Best Car .. One of the best cars, the Rolls Royce Phantom, is full of comfort, luxury, and a stylish look. I can't say more because this is my favorite car. - എല്ലാം (80) - Mileage (11) - Performance (8) - Comfort (26) - Engine (12) - Interior (10) Best Car .. Feeling Rich After Buying This Car.
english
The annual rate of inflation, based on monthly WPI, stood at 4.43% (provisional) for the month of May, 2018 (over May, 2017) as compared to 3.18% (provisional) for the previous month and 2.26% during the corresponding month of the previous year. Build up inflation rate in the financial year so far was 1.38% compared to a build up rate of -0.27% in the corresponding period of the previous year. Inflation for important commodities / commodity groups is indicated in Annex-1 and Annex-II. PRIMARY ARTICLES (Weight 22.62%) The index for ‘Food Articles’ group rose by 0.2 percent to 140.1 (provisional) from 139.8 (provisional) for the previous month due to higher price of fish-marine (8%), poultry chicken (4%), egg and peas/chawali (3% each), fish-inland (2%) and moong, bajra, barley, paddy, wheat and arhar (1% each). However, the price of betel leaves (6%), coffee (4%), tea (3%), gram, urad and fruits & vegetables (2% each) and ragi, jowar and pork (1% each) declined. The index for ‘Minerals’ group rose by 13.7 percent to 138.3 (provisional) from 121.6 (provisional) for the previous month due to higher price of copper concentrate (33%), chromite (14%), manganese ore (11%), sillimanite (8%), phosphorite (6%), limestone and zinc concentrate (2% each) and lead concentrate (1%). However, the price of iron ore (1%) declined. The index for ‘Crude Petroleum & Natural Gas’ group rose by 7.3 percent to 88.1 (provisional) from 82.1 (provisional) for the previous month due to higher price of crude petroleum (9%) and natural gas (3%). FUEL & POWER (Weight 13.15%) The index for ‘Coal’ group declined by 0.1 percent to 122.9 (provisional) from 123.0 (provisional) for the previous month due to lower price of lignite (2%). The index for ‘Mineral Oils’ group rose by 4.1 percent to 93.6 (provisional) from 89.9 (provisional) for the previous month due to higher price of furnace oil and naphtha (10% each), ATF (7%), kerosene, petroleum coke and HSD (4% each) and petrol (3%). However, the price of bitumen and LPG (1% each) declined. MANUFACTURED PRODUCTS (Weight 64.23%) The index for ‘Manufacture of Food Products’ group declined by 0.3 percent to 127.2 (provisional) from 127.6 (provisional) for the previous month due to lower price of molasses (20%), sugar (4%), powder milk, gram powder (besan) and salt (3% each), spices (including mixed spices), manufacture of macaroni, noodles, couscous & similar farinaceous products and instant coffee (2% each) and castor oil, vanaspati, manufacture of starches & starch products, wheat bran, ghee, buffalo meat, fresh/frozen, manufacture of processed ready to eat food, manufacture of health supplements, rice[non-basmati], bagasse and chicken/duck, dressed - fresh/frozen (1% each). However, the price of rice products (6%), copra oil (4%), rice bran oil and coffee powder with chicory (3% each), ice cream, honey and palm oil (2% each) and gur, sunflower oil, butter, processed tea, processing & preserving of fruit and vegetables, mustard oil, rapeseed oil and groundnut oil (1% each) moved up. The index for ‘Manufacture of Beverages’ group rose by 0.3 percent to 119.5 (provisional) from 119.2 (provisional) for the previous month due to higher price of bottled mineral water (2%) and rectified spirit and aerated drinks/soft drinks (incl. soft drink concentrates) (1% each). However, the price of country liquor (2%) declined. The index for ‘Manufacture of Tobacco Products’ group rose by 2.5 percent to 149.7 (provisional) from 146.0 (provisional) for the previous month due to higher price of other tobacco products (5%), cigarette (2%) and biri (1%). The index for ‘Manufacture of Textiles’ group rose by 1.0 percent to 115.5 (provisional) from 114.4 (provisional) for the previous month due to higher price of texturised and twisted yarn (2%) and weaving & finishing of textiles, synthetic yarn, manufacture of knitted & crocheted fabrics, manufacture of made-up textile articles, except apparel, cotton yarn and woollen yarn (1% each). However, the price of manufacture of other textiles (3%) and viscose yarn (1%) declined. The index for ‘Manufacture of Wearing Apparel’ group rose by 1.2 percent to 141.0 (provisional) from 139.3 (provisional) for the previous month due to higher price of manufacture of wearing apparel (woven), except fur apparel and manufacture of knitted & crocheted apparel (1% each). The index for ‘Manufacture of Leather and Related Products’ group declined by 0.2 percent to 121.7 (provisional) from 122.0 (provisional) for the previous month due to lower price of leather shoe (2%) and vegetable tanned leather and harness, saddles & other related items (1% each). However, the price of chrome tanned leather and belt & other articles of leather (2% each) and canvas shoes and waterproof footwear (1% each) moved up. The index for ‘Manufacture of Wood and of Products of Wood and Cork ‘ group rose by 1.3 percent to 133.3 (provisional) from 131.6 (provisional) for the previous month due to higher price of timber/wooden plank, sawn/resawn (4%), lamination wooden sheets/veneer sheets (3%), wooden block - compressed or not (2%) and wooden splint and wood cutting, processed/sized (1% each). However, the price of wooden panel (1%) declined. The index for ‘Manufacture of Paper and Paper Products’ group rose by 0.2 percent to 121.0 (provisional) from 120.8 (provisional) for the previous month due to higher price of newsprint (2%) and laminated plastic sheet, paper carton/box, bristle paper board, paper for printing & writing, laminated paper, card board and map litho paper (1% each). However, the price of base paper (2%) and corrugated sheet box, pulp board, duplex paper, corrugated paper board and kraft paper (1% each) declined. The index for ‘Printing and Reproduction of Recorded Media’ group rose by 1.2 percent to 146.6 (provisional) from 144.9 (provisional) for the previous month due to higher price of printed books and printed form & schedule (2% each) and newspaper and sticker plastic (1% each). However, the price of hologram (3d) and printed labels/posters/calendars (1% each) declined. The index for ‘Manufacture of Chemicals and Chemical Products’ group rose by 0.8 percent to 117.3 (provisional) from 116.4 (provisional) for the previous month due to higher price of sulphuric acid (15%), camphor (10%), nitric acid (9%), poly propylene (PP) (7%), carbon black (6%), mono ethyl glycol and hydrogen peroxide (4% each), gelatine, agro chemical formulation and hair oil/body oil (3% each), other inorganic chemicals, organic chemicals, alkyl benzene, ammonium phosphate, dye stuff/dyes incl. dye intermediates & pigments/colours, fatty acid, xlpe compound, polyester chips or polyethylene terepthalate (pet) chips, mixed fertilizer, alcohols, additive, poly vinyl chloride (PVC) and printing ink (2% each) and liquid air & other gaseous products, rubber chemicals, organic solvent, ethylene oxide, aromatic chemicals, plasticizer, adhesive excluding gum, polyethylene, adhesive tape (non-medicinal), acrylic fibre, di ammonium phosphate, acetic acid and its derivatives, phthalic anhydride, polyester film(metalized), shampoo, foundry chemical, explosive, powder coating material and ethyl acetate (1% each). However, the price of creams & lotions for external application (8%), organic surface active agent, catalysts and varnish (all types) (4% each), toilet soap, amine and fungicide, liquid (3% each), paint, tooth paste/tooth powder, superphospate/phosphatic fertilizer, others and phosphoric acid (2% each) and mosquito coil, ammonium sulphate, sodium silicate, soda ash/washing soda, ammonia liquid, caustic soda (sodium hydroxide), nitrogenous fertilizer, others, insecticide & pesticide and safety matches (match box) (1% each) declined. The index for ‘Manufacture of Pharmaceuticals, Medicinal Chemical and Botanical Products’ group rose by 1.0 percent to 121.6 (provisional) from 120.4 (provisional) for the previous month due to higher price of sulpha drugs (8%), antipyretic, analgesic, anti-inflammatory formulations (7%), anti-retroviral drugs for HIV treatment (5%), cotton wool (medicinal) (4%), antioxidants, antidiabetic drug excluding insulin (i.e. tolbutam) and antiseptics & disinfectants (3% each), api & formulations of vitamins (2%) and anti-malarial drugs, antibiotics & preparations thereof, ayurvedic medicaments and plastic capsules (1% each). However, the price of anti allergic drugs (9%) and medical accessories and anti cancer drugs (1% each) declined. The index for ‘Manufacture of Rubber and Plastics Products’ group rose by 0.3 percent to 108.5 (provisional) from 108.2 (provisional) for the previous month due to higher price of plastic film (3%), plastic components and polypropylene film (2% each) and pvc fittings & other accessories, rubber tread, 2/3 wheeler rubber tube, rubber components & parts, rubber cloth/sheet, motor car tube, elastic webbing, rubber crumb, acrylic/plastic sheet, plastic tape, plastic bag and plastic bottle (1% each). However, the price of V belt (10%), conveyer belt (fibre based) (6%), processed rubber (3%), condoms and polyester film (non-metalized) (2% each) and plastic button, rubber moulded goods, motor car tyre, medium & heavy commercial vehicle tyre and rubberized dipped fabric (1% each) declined. The index for ‘Manufacture of Other Non-Metallic Mineral Products’ group rose by 0.4 percent to 115.7 (provisional) from 115.2 (provisional) for the previous month due to higher price of porcelain sanitary ware, cement superfine, porcelain crockery and non ceramic tiles (3% each), marble slab (2%) and cement blocks (concrete), opthalmic lens, fibre glass incl. sheet, ordinary portland cement, granite, pozzolana cement, glass bottle, poles & posts of concrete and railway sleeper (1% each). However, the price of clinker and toughened glass (4% each), plain bricks (2%) and ordinary sheet glass, asbestos corrugated sheet and graphite rod (1% each) declined. The index for ‘Manufacture of Basic Metals’ group rose by 1.9 percent to 112.2 (provisional) from 110.1 (provisional) for the previous month due to higher price of stainless steel pencil ingots/billets/slabs (10%), aluminium powder (5%), MS bright bars, sponge iron/direct reduced iron (DRI), aluminium shapes - bars/rods/flats, mild steel (MS) blooms, aluminium ingot, alloy steel castings and angles, channels, sections, steel (coated/not) (3% each), cold rolled (CR) coils & sheets, including narrow strip, pig iron, steel cables, brass metal/sheet/coils, aluminium alloys, steel forgings - rough, gp/gc sheet, alloy steel wire rods, alumnium foil, copper shapes - bars/rods/plates/strips and zinc metal/zinc blocks (2% each) and rails, hot rolled (HR) coils & sheets, including narrow strip, stainless steel coils, strips & sheets, copper metal/copper rings and aluminium metal (1% each). However, the price of ferrosilicon, aluminium disk & circles and ferrochrome (2% each) and ferromanganese, MS pencil ingots, silicomanganese and aluminium castings (1% each) declined. The index for ‘Manufacture of Fabricated Metal Products, Except Machinery and Equipment’ group rose by 0.9 percent to 112.7 (provisional) from 111.7 (provisional) for the previous month due to higher price of sanitary fittings of iron & steel (10%), aluminium utensils (3%), forged steel rings and electrical stamping- laminated or otherwise (2% each) and bolts, screws, nuts & nails of iron & steel, bracket, steel pipes, tubes & poles, iron/steel cap, steel structures, hose pipes in set or otherwise, pressure cooker, stainless steel tank, steel drums & barrels, metal cutting tools & accessories, cylinders and steel container (1% each). The index for ‘Manufacture of Electrical Equipment’ group rose by 0.5 percent to 111.3 (provisional) from 110.8 (provisional) for the previous month due to higher price of microwave oven (26%), fibre optic cables (9%), jelly filled cables (4%), washing machines/laundry machines and aluminium wire (3% each), multimeter, rotor/magneto rotor assembly, aluminium/alloy conductor, copper wire and electric switch gear control/starter (2% each) and electric wires & cables, pvc insulated cable, meter panel, insulating & flexible wire, insulator, connector/plug/socket/holder-electric and batteries (1% each). However, the price of transformer and solenoid valve (2% each), acsr conductors, safety fuse, domestic gas stove, cooling tower, flourescent tube and electric filament type lamps (1% each) declined. The index for ‘Manufacture of Machinery and Equipment’ group declined by 0.5 percent to 109.9 (provisional) from 110.4 (provisional) for the previous month due to lower price of printing machinery and air gas compressor including compressor for refrigerator (6% each), pressure vessel & tank for fermentation & other food processing (5%), cranes (4%), packing machine and industrial valve (3% each), excavator, lathes and mining, quarrying & metallurgical machinery/parts (2% each) and open end spinning machinery, roller mill (raymond), air filters, agricultural tractors, pneumatic tools and centrifugal pumps (1% each). However, the price of chillers (3%), pharmaceutical machinery (3%), injection pump, moulding machine and grinding or polishing machine (2% each) and pump sets without motor, hydraulic pump, rice mill machinery, roller & ball bearings, harvesters, water pump, manufacture of bearings, gears, gearing & driving elements and chemical equipment & system (1% each) moved up. The index for ‘Manufacture of Motor Vehicles, Trailers and Semi-Trailers’ group rose by 0.4 percent to 111.7 (provisional) from 111.2 (provisional) for the previous month due to higher price of brake pad/brake liner/brake block/brake rubber, others (7%), axles of motor vehicles (2%) and seat for motor vehicles, cylinder liners, wheels/wheels & parts, head lamp, passenger vehicles and body (for commercial motor vehicles) (1% each). However, the price of release valve (4%), crankshaft (2%) and radiators & coolers (1%) declined. The index for ‘Manufacture of Other Transport Equipment’ group rose by 0.3 percent to 110.5 (provisional) from 110.2 (provisional) for the previous month due to higher price of bicycles of all types (1%). The index for ‘Manufacture of Furniture’ group rose by 1.5 percent to 125.1 (provisional) from 123.3 (provisional) for the previous month due to higher price of foam and rubber mattress (11%) and steel shutter gate (1%). However, the price of hospital furniture and iron/steel furniture (1% each) declined. The index for ‘Other Manufacturing’ group rose by 1.5 percent to 106.9 (provisional) from 105.3 (provisional) for the previous month due to higher price of silver, intraocular lens and playing cards (3% each), cricket ball and gold & gold ornaments (2% each) and cricket bat and plastic moulded-others toys (1% each). However, the price of non mechanical toys (3%), stringed musical instruments (incl. santoor, guitars, etc.) (2%) and sports goods of rubber (incl. balls) (1%) declined. WPI FOOD INDEX (Weight 24.38%) The rate of inflation based on WPI Food Index consisting of ‘Food Articles’ from Primary Articles group and ‘Food Product’ from Manufactured Products group increased from 0.67% in April, 2018 to 1.12% in May, 2018. FINAL INDEX FOR THE MONTH OF MARCH, 2018 (BASE YEAR: 2011-12=100) For the month of March, 2018, the final Wholesale Price Index for ‘All Commodities’ (Base: 2011-12=100) stood at 116.3 as compared to 116.0 (provisional) and annual rate of inflation based on final index stood at 2.74 percent as compared to 2.47 percent (provisional) respectively as reported on 16.04.2018. Wholesale Price Index and Rates of Inflation (Base Year: 2011-12=100) Weight (%)
english
import { Queue } from "../simulateQueue"; describe("simulate queue", () => { describe("empty queue", () => { it("should return top ==== null", () => { expect(new Queue().head).toBeNull(); }); it("should return tail ==== null", () => { expect(new Queue().tail).toBeNull(); }); it("should return size() ==== 0", () => { expect(new Queue().size()).toBe(0); }); }); describe("queue with data [1,2,3,4]", () => { it("queue function", () => { const q = new Queue<number>(); q.enqueue(1); expect(q.tail).toBe(1); expect(q.head).toBe(1); expect(q.size()).toBe(1); q.enqueue(2); expect(q).toMatchSnapshot(); expect(q.head).toBe(1); expect(q.tail).toBe(2); expect(q.size()).toBe(2); q.dequeue(); expect(q.tail).toBe(2); expect(q.head).toBe(2); expect(q.size()).toBe(1); q.enqueue(3); expect(q.tail).toBe(3); expect(q.head).toBe(2); expect(q.size()).toBe(2); q.enqueue(4); expect(q.tail).toBe(4); expect(q.head).toBe(2); expect(q.size()).toBe(3); q.dequeue(); expect(q.tail).toBe(4); expect(q.head).toBe(3); expect(q.size()).toBe(2); }); }); });
typescript
World Stroke Day: While sleep is important to refresh and rejuvenate us, too much of it may be linked to increased risk of a stroke. Here's how. World Stroke Day: Are you among those who struggle to catch some shut-eye or the ones who do not leave any opportunity to hit the pillow? According to studies, not only lack of sleep could lead to health troubles, too much of it can increase risk of a stroke. A stroke typically occurs when blood supply to a part of the brain is interrupted or reduced which may damage the brain tissues. "Not only sleeping less is harmful for body but excessive sleep is also associated with increased risk of certain diseases including stroke," says Dr Jaideep Bansal - Director & HOD - Neurology, Fortis Hospital Shalimar Bagh. A good night's sleep can offer an array of restorative benefits for our heart, digestion, nervous system and mental well-being. "During sleep multiple functions are carried out by our body. Sleep is essential as it relieves mental fatigue, improves memory, regulates metabolism, repair the wear and tear of body and improve immunity," says Dr Bansal. But apparently sleeping excessively could do more damage than good. Recent studies have shown that sleeping more than nine hours per night may predispose the person for stroke and increase their risk of stroke by 85 per cent. "How excessive sleep is associated with occurrence of stroke is not clearly understood but studies have shown that people who sleep too much may have increased cholesterol levels and may gain weight, both are risk factors for stroke. In addition, people who sleep too much may have sedentary lifestyle and may have depression which are also related to increased risk of stroke," says the expert. People may face sleep disorders post having a stroke too. After a stroke, some people may not feel sleepy at night or waking up in the morning may be difficult for them as their sleep-wake schedule is no longer affected by sunlight and the darkness of night according to American Stroke Association. "Stroke may cause various sleep disorders like- lack of sleep (insomnia), excessive sleep (hypersonic), restless leg syndrome, obstructive sleep apnoea and sleep behaviour disorder," says Dr Bansal. "Obstructive sleep apnea is known risk factor for stroke. Excessive daytime sleepiness is part of OSA," according to Dr Bansal.
english
package net.metadata.dataspace.data.access; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.Calendar; import java.util.List; import javax.persistence.EntityManager; import net.metadata.dataspace.app.NonProductionConstants; import net.metadata.dataspace.data.access.manager.DaoManager; import net.metadata.dataspace.data.access.manager.EntityCreator; import net.metadata.dataspace.data.model.PopulatorUtil; import net.metadata.dataspace.data.model.context.Source; import net.metadata.dataspace.data.model.context.SourceAuthor; import net.metadata.dataspace.data.model.context.Subject; import net.metadata.dataspace.data.model.record.Agent; import net.metadata.dataspace.data.model.version.AgentVersion; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; /** * User: alabri * Date: 21/09/2010 * Time: 3:23:30 PM */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = NonProductionConstants.TEST_CONTEXT) public class AgentDaoImplTest { @Autowired private AgentDao agentDao; @Autowired private EntityCreator entityCreator; @Autowired private DaoManager daoManager; private EntityManager entityManager; @Before public void setUp() throws Exception { // PopulatorUtil.cleanup(); entityManager = daoManager.getEntityManagerSource().getEntityManager(); } // @After // public void tearDown() throws Exception { // //Remove all // PopulatorUtil.cleanup(); // } @Test @Transactional public void testAddingAgent() throws Exception { Agent agent = (Agent) entityCreator.getNextRecord(Agent.class); int originalTableSize = agentDao.getAll().size(); AgentVersion agentVersion = PopulatorUtil.getAgentVersion(agent); Subject subject1 = PopulatorUtil.getSubject(); agentVersion.getSubjects().add(subject1); Subject subject2 = PopulatorUtil.getSubject(); agentVersion.getSubjects().add(subject2); agent.addVersion(agentVersion); Source source = PopulatorUtil.getSource(); agentVersion.getDescriptionAuthors().add(new SourceAuthor("Test User", "<EMAIL>", null)); agentVersion.setSource(source); entityManager.persist(source); entityManager.persist(subject1); entityManager.persist(subject2); entityManager.persist(agentVersion); entityManager.persist(agent); Long id = agent.getId(); Agent agentById = agentDao.getById(id); assertTrue("Table has " + agentDao.getAll().size() + " records", agentDao.getAll().size() == (originalTableSize + 1)); assertEquals("Added and Retrieved records are not the same.", id, agentById.getId()); assertEquals("Number of versions", 1, agentById.getVersions().size()); assertEquals("Number of subjects", 2, agentById.getVersions().first().getSubjects().size()); } @Test @Transactional public void testEditingAgent() throws Exception { testAddingAgent(); Calendar editStart = Calendar.getInstance(); assertTrue("Table is empty", agentDao.getAll().size() != 0); List<Agent> agentList = agentDao.getAll(); Agent agent = agentList.get(0); Long id = agent.getId(); String content = "Updated Content"; agent.getVersions().first().setDescription(content); entityManager.flush(); Agent agentById = agentDao.getById(id); assertEquals("Modified and Retrieved records are not the same", agent, agentById); Assert.assertTrue(String.format( "Update Date was not updated. %tFT%<tT.%<tN < %tFT%<tT.%<tN", agentById.getUpdated(), editStart), agentById.getUpdated().after(editStart)); assertEquals("content was not updated", content, agentById.getVersions().first().getDescription()); } @Test @Transactional public void testRemovingAgent() throws Exception { testAddingAgent(); assertTrue("Table is empty", agentDao.getAll().size() != 0); List<Agent> agentList = agentDao.getAll(); for (Agent agent : agentList) { agentDao.delete(agent); entityManager.flush(); } assertTrue("Table is not empty", agentDao.getAll().size() == 0); } @Test @Transactional public void testSoftDeleteAgent() throws Exception { testAddingAgent(); assertTrue("Table is empty", agentDao.getAll().size() != 0); List<Agent> agentList = agentDao.getAll(); int updated = 0; for (Agent agent : agentList) { updated = agentDao.softDelete(agent.getUriKey()); agentDao.refresh(agent); } assertEquals("Updated rows", 1, updated); assertTrue("Table is empty", agentDao.getAll().size() != 0); assertEquals("Table has active records", 0, agentDao.getAllActive().size()); } }
java
/*联通*/ /*头部*/ .u-simcard header{ padding: 0px 10px 10px 10px;border-bottom:1px solid #ddd;overflow:auto;margin-bottom:10px;position:relative;} .u-simcard header .head-l{float:left;width:85px;} .u-simcard header .head-l p{color:#9a9a9a;text-align:center;font-size:12px;} .u-simcard header .head-l img{display:block;width:85px;} .u-simcard header .head-r{padding-left:90px;padding-top:20px;font-size:12px;} .u-simcard header .head-r .simcard-num{font-size:18px;margin-bottom:10px;} .u-simcard header .head-r p{color:#666;padding-bottom:5px;} /*切换卡号图标*/ .changeCard{width:40px;height:24px;background-image:url(../imgs/change.png);position:absolute;right:10px;top:15px;display:block;} /*主要内容*/ .simcard-main {text-align: center;padding:0 10px;margin-bottom:10px;overflow:auto;} .simcard-circle{ border: 2px solid #15b0eb; border-radius: 100%; color: #0d4478; background-image: url(../imgs/circle-bg-0.gif); background-repeat:no-repeat; background-position: center; width: 183px; height: 183px; margin: 0 auto;} /*不同gif背景*/ .circle-bg-0{background-image: url(../imgs/circle-bg-0.gif);}/*0流量*/ .circle-bg-1{background-image: url(../imgs/circle-bg-1.gif);}/*1%-19%流量*/ .circle-bg-2{background-image: url(../imgs/circle-bg-2.gif);}/*20%-29%流量*/ .circle-bg-3{background-image: url(../imgs/circle-bg-3.gif);}/*30%-39%流量*/ .circle-bg-4{background-image: url(../imgs/circle-bg-4.gif);}/*40%-49%流量*/ .circle-bg-5{background-image: url(../imgs/circle-bg-5.gif);}/*50%-59%流量*/ .circle-bg-6{background-image: url(../imgs/circle-bg-6.gif);}/*60%-69%流量*/ .circle-bg-7{background-image: url(../imgs/circle-bg-7.gif);}/*70%-79%流量*/ .circle-bg-8{background-image: url(../imgs/circle-bg-8.gif);}/*80%-89%流量*/ .circle-bg-9{background-image: url(../imgs/circle-bg-9.gif);}/*90%-99%流量*/ .circle-bg-10{background-image: url(../imgs/circle-bg-10.gif);}/*100%流量*/ .simcard-circle .marTop{margin-top:45px;} .simcard-circle .leave_Flow{font-size:30px;padding:10px 0;} .simcard-dated{font-size:16px;margin-bottom:5px;margin-top:10px;} .simcard-dated .dated-days{color:#fd954e;padding:0 5px;} .simcard-dated .simcard-statue{padding:0 5px;color:#fff;margin-left:5px;} .access-remark {margin-top: 10px;color: #cccccc;overflow: auto;display: block;text-align: right;} .sim-statustip-green{padding:0 5px;color:#fff;margin-left:5px;background-color:#4dca7e;}/*绿色背景色*/ .sim-statustip-gray{padding:0 5px;color:#fff;margin-left:5px;background-color:#b5b5b5;}/*灰色背景色*/ .sim-statustip-red{padding:0 5px;color:#fff;margin-left:5px;background-color:#ff5555;}/*红色背景色*/ .renewal-btn a{display:inline-block;background-color:#f9870e;color:#fff;font-size:16px;padding:15px 50px;border-radius:30px;margin-top:10px;} /*底部*/ .u-simcard footer{background-color:#f5f5f5;padding:10px 30px;position:fixed;left:0;bottom:0;width:100%;box-sizing:border-box;} .u-simcard footer a{display:inline-block;width:100%;box-sizing:border-box;text-align:center;color:#0d93ec;padding:10px;border-radius:3px;border:1px solid #0d93ec;background-color:#fff;font-size:16px;} @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2) { .circle-bg-0{background-image: url(../imgs/circle-bg-0@2x.gif);background-size: 163px auto;} .circle-bg-1{background-image: url(../imgs/circle-bg-1@2x.gif);background-size: 163px auto;} .circle-bg-2{background-image: url(../imgs/circle-bg-2@2x.gif);background-size: 163px auto;} .circle-bg-3{background-image: url(../imgs/circle-bg-3@2x.gif);background-size: 163px auto;} .circle-bg-4{background-image: url(../imgs/circle-bg-4@2x.gif);background-size: 163px auto;} .circle-bg-5{background-image: url(../imgs/circle-bg-5@2x.gif);background-size: 163px auto;} .circle-bg-6{background-image: url(../imgs/circle-bg-6@2x.gif);background-size: 163px auto;} .circle-bg-7{background-image: url(../imgs/circle-bg-7@2x.gif);background-size: 163px auto;} .circle-bg-8{background-image: url(../imgs/circle-bg-8@2x.gif);background-size: 163px auto;} .circle-bg-9{background-image: url(../imgs/circle-bg-9@2x.gif);background-size: 163px auto;} .circle-bg-10{background-image: url(../imgs/circle-bg-10@2x.gif);background-size: 163px auto;} .changeCard{background-image:url(../imgs/change@2x.png);background-size:40px auto;} }
css
<reponame>MAMISHO/test_git .wrapper .greet { font-size: 14px; margin: 0 0 15px 0; } .wrapper h3 { font-size: 17px; margin: 0 0 10px 0; } .wrapper div.hover { border-bottom: 1px dashed #80C0C0; padding: 3px 0 3px 0; } div.hover .left { clear: left; float: left; } div.hover .rgt { text-align: right; } .a { float: left; width: 696px; height: 20px; border: 1px solid gray; } .b { float: left; background: #0080FF; height: 16px; color: white; text-align: center; padding: 2px; } .c { margin: 20px 0 0 0; text-align: right; } .required { color: red; } h2 { font-size: 14px; margin: 20px 0 3px 0; } .options { float: left; width: 700px; padding: 20px 0 10px 10px; border: 1px dashed #d0d0d0; } .opt-item { float: left; height: 90px; width: 100px; padding: 5px; overflow: hidden; text-align: center } ul.sysconf_top { margin: 4px 0 0 0; padding: 0; list-style-type: none; } ul.sysconf_top li { float: left; padding: 4px 8px; } ul.sysconf_top li.selected { background: rgb(0, 167, 219); } ul.sysconf_top li.selected a { color: white; } .opt_table { margin: 0 0 0 0; width: 100%; } .opt_table input { text-align: center; } .opt_table .o_title { color: #202020; } .opt_table .o_title sup { font-size: 11px; } .opt_table .o_desc { padding: 4px 0 4px 0; color: #808080; } .opt_table tr.o_heading { font-size: 16px; font-weight: bold; background: #FFF0C0; padding: 2px 4px; margin: 10px 0 0 0; } tr.row_selected { background: #e0f0e0; } tr.row_selected * { color: black; } .notice-form { background: #ffff99; padding: 10px; margin: 5px 0; border: 1px dashed #ff8000; } .notice-form h2 { color: #008000; font-size: 15px; margin: 0 0 10px 0; } .notice-form pre { margin: 2px 2px 2px 8px; padding: 5px; background: #ffffd0; border: 1px solid #e0e000; } /* Widgets */ .wigets-sidebar { float: right; width: 250px; } .wigets-sidebar ul { margin: 0; padding: 0 0 16px 0;} .wigets-sidebar li { display: block; margin: 0; } .wigets-sidebar li a { display: block; padding: 4px; } .wigets-sidebar li a:hover, .wigets-sidebar li.sl { background: #404080; color: white; } .wigets-sidebar li.sl a { color: white; } .widget-settings { margin: 0 270px 0 0; } .wigets-sidebar h2 { font: 16px/1em Arial; margin: 0; padding: 0 0 6px 0; } /* Pagination */ .snippet_paginate { margin: 4px; color: #555; } .snippet_paginate .pages { color: #888; } .snippet_paginate .prev a, .snippet_paginate .next a { text-decoration: underline; } .the_permissions span { color: #000; } .the_permissions span.perm-ok { color: #080; } .the_permissions span.perm-fail { color: #F00; } .cn_breadcrumbs { margin: 0 0 8px 0; } .cn_breadcrumbs a { font-size: 15px; } tr.unabled { color: #a0a0a0; }
css
Posted On: Works related to enumeration of water bodies, as well as their protection from encroachment or diversion for use for other purposes, come under the purview of the State Government concerned. However, from time to time, this Ministry conducts census of minor irrigation schemes in the country, which captures data regarding water bodies in rural areas associated with irrigation. As per the 5th Minor Irrigation Census conducted by this Ministry with reference year 2013-14, there are 5,16,303 water bodies in the rural areas of the country which are being used for minor irrigation, out of which 53,396 are not in use for various reasons such as non-availability of water, siltation, salinity, etc. In addition, this Ministry has launched the first census of water bodies in convergence with the sixth round of minor irrigation census (reference year 2017-18) under the centrally sponsored scheme “Irrigation Census”. The objective of the census of water bodies is to develop a national database for all water bodies by collecting information on all important aspects of the subject including their size, condition, status of encroachments, use, storage capacity etc. Preservation of water bodies, including framing specific policies in this regard, lies in the domain of the State Government. However, some of the policies framed by Government of India in order to supplement the efforts of the State Governments in this regard, are as below: - Ministry of Environment, Forest & Climate Change has notified Wetlands (Conservation and Management) Rules, 2017 for protection, conservation and management of wetlands. - The provisions of the Water (Prevention and Control of Pollution) Act 1974 are being implemented by the State Pollution Control Boards (SPCBs) /Pollution Control Committees (PCCs) by consent management to regulate discharge of effluents and enforcement of standards in respect of polluting sources. - Government of India has stipulated general discharge standards and industry specific effluent discharge standards under Environment (Protection) Rules, 1986, with an aim to prevent pollution in the water bodies. - ‘Indicative Guidelines for restoration of water bodies’ have been issued by Central Pollution Control Board (CPCB) as a guidance to the stakeholders for ensuring restoration/ rejuvenation of water bodies. - Guidelines for immersion of idols in Water Bodies formulated during 2010 has been revised and the “Revised Guidelines on Idol Immersion in Water Bodies “are being implemented in the country with effect from 1st January, 2021. This Information was given by the Minister of State for Jal Shakti, Shri Bishweswar Tudu in a written reply in Rajya Sabha today.
english
<filename>public/discover/management/edit_index_pattern/edit_index_pattern.js import _ from 'lodash'; import './index_header'; import './indexed_fields_table'; import './sample_result'; import UrlProvider from 'ui/url'; import {IndicesEditSectionsProvider} from './edit_sections'; import uiRoutes from 'ui/routes'; import {uiModules} from 'ui/modules'; import template from './edit_index_pattern.html'; import { IndexPatternsProvider } from 'ui/index_patterns/index_patterns' uiRoutes .when('/management/kibana/discover_results_configuration/:indexPatternId', { template, resolve: { indexPattern: function ($route, courier, redirectWhenMissing, Private) { const indexPatterns = Private(IndexPatternsProvider); return indexPatterns .get($route.current.params.indexPatternId) .catch(redirectWhenMissing('/management/kibana/index')); } } }); uiRoutes .when('/management/kibana/discover_results_configuration', { resolve: { redirect: function ($location, config) { const defaultIndex = config.get('defaultIndex'); let path = '/management/kibana/discover_results_configuration'; if (defaultIndex) { path = `/management/kibana/discover_results_configuration/${defaultIndex}`; } $location.path(path).replace(); } } }); uiModules.get('apps/management') .controller('discoverResultsConfigurationEdit', function ($scope, $location, $route, config, courier, Notifier, Private, AppState, docTitle, confirmModal) { const notify = new Notifier(); const $state = $scope.state = new AppState(); $scope.kbnUrl = Private(UrlProvider); $scope.indexPattern = $route.current.locals.indexPattern; $scope.refreshSample = true; docTitle.change($scope.indexPattern.title); const otherPatterns = _.filter($route.current.locals.indexPatterns, pattern => { return pattern.id !== $scope.indexPattern.id; }); $scope.$watch('indexPattern.fields', function () { $scope.editSections = Private(IndicesEditSectionsProvider)($scope.indexPattern); $scope.refreshFilters(); }); $scope.refreshFilters = function () { const indexedFieldTypes = []; $scope.indexPattern.fields.forEach(field => { indexedFieldTypes.push(field.type); }); $scope.indexedFieldTypes = _.unique(indexedFieldTypes); }; $scope.changeFilter = function (filter, val) { $scope[filter] = val || ''; // null causes filter to check for null explicitly }; $scope.$watchCollection('indexPattern.fields', function () { $scope.conflictFields = $scope.indexPattern.fields .filter(field => field.type === 'conflict'); }); });
javascript
{ "name": "SwiftLogootUndo", "version": "0.1.0", "summary": "An implementation of Logoot-Undo in Swift", "description": "Logoot-Undo is a member in CRDTs family (Conflict-free Replicated Data Types) where replicas reach convergence concurrently and automatically without manual interference.", "homepage": "https://github.com/phucnm/SwiftLogootUndo", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { "<NAME>": "<EMAIL>" }, "source": { "git": "https://github.com/phucnm/SwiftLogootUndo.git", "tag": "0.1.0" }, "platforms": { "ios": "11.0" }, "swift_version": "4.2", "source_files": "SwiftLogootUndo/Classes/**/*" }
json
Our relationships and how we navigate them keep evolving with the times. Often, we find questions or worries so personal that they can only be shared with a stranger, but any random stranger is no real solace! Nor is the advice safe. With that in mind, Star Lifestyle brings to you a brand-new relationship advice column from certified experts. This hopes to tackle the host of worries, questions and forks in roads of the relationships plane that includes the personal, professional to psychological. Read on for insights, and shoot us your concerns, even anonymously at [email protected], or send us a message on Star Lifestyle's Facebook page. My girlfriend is asking for my Facebook password. Should I give it to her? Dear Troubled, Instead of giving your password, to her, ask yourself: why is your partner insecure about you in the first place? Why does she want the password to your personal device? Is there anything related to your recent or past behavior that made her feel insecure? Or does it have something to do with her own her life experience (you both need to explore this subject-matter together. ) Finally, all being said, trust is an inevitable component of any kind of relationship in life, so earn her trust first, by making her feel secure about you. And also, you need to realise that to lead a healthy life, we all need to have some sort of set boundaries, without these, every life becomes super complicated. If you think it's not ok for someone to look into your private matters, then that boundary should be explained and drawn with real care — no matter what. Hope this helps.
english
'use strict'; const { Controller } = require("egg"); const Modal = "press" class PressController extends Controller { /** ------------------base------------------- */ async create() { const rule = { name: { type: "string", required: true, message: "必填项" }, }; const data = this.ctx.request.body; await this.ctx.validate(rule, data); this.ctx.body = await this.service[Modal].create(data) } async remove() { const rule = { ids: [{ type: "array", required: true, min: 1, message: "ids验证错误,应为不为空的数组" }], }; const data = this.ctx.request.body; await this.ctx.validate(rule, data); this.ctx.body = await this.service[Modal].removeAll(data.ids) } async list() { this.ctx.body = await this.service[Modal].findList(this.ctx.query) } async update() { const rule = { _id: [{ type: "string", required: true, message: "id不存在" }], }; this.ctx.body = await this.service[Modal].update(this.ctx.request.body) } /**------------------ end ------------------- */ async allList() { this.ctx.body = await this.service[Modal].findList({ size: 100000 }) } } module.exports = PressController;
javascript
We look at the three different Android experiences Google is now managing and explain where each one fits in the mobile industry. We look at the three different Android experiences Google is now managing and explain where each one fits in the mobile industry. The company's carrier project continues to gain features, the latest of which is better international service and helpful alerts. Months of sweet suspense have come to an end. Android O has a name. The acquisition signals Google's continued interest in virtual reality and immersive technologies. A report claims that we can expect to see "a Google-branded phone" arrive "by the end of the year." Get a Nexus 5X they said. Sign up for Project Fi for a month to get a discount, they said. Now I'm hosed. Surely, Nexus phones could benefit from new, unique Android features but how will Google's hardware partners that use their own chip designs react? Following reports of a modified Google Play Store for China, details are surfacing on a similar approach for Android Wear with China-based Lenovo taking the hardware lead. What's the next best thing to a Nexus if you want fast software updates? The 2014 Moto X Pure Edition has to be a contender; it's now getting Android 5.1. Google wants to give two patent families to 50 startups to bolster a tech industry led anti-troll network.
english
<reponame>AnthonyBloomer/covid-cli import csv import time from datetime import datetime from prettytable import PrettyTable from .api import countries, country, totals, us_states def to_csv(data): fieldnames = set() for event in data: fieldnames |= event.keys() with open("%s.csv" % int(time.time()), "w", newline="") as c: w = csv.DictWriter(c, fieldnames=fieldnames) w.writeheader() w.writerows(data) def calculate_death_rate(deaths, recovered): if recovered == 0: return "N/A" return str(round(100 * deaths / (deaths + recovered))) + "%" def from_timestamp(updated): return datetime.fromtimestamp(updated / 1000).strftime("%Y-%m-%d %H:%M") def create_table(args): if args.country: x = PrettyTable() x.field_names = [ "Country", "Deaths", "Critical", "Cases", "Recovered", "Death Rate", "Updated", ] json = country(args.country) x.add_row( [ json["country"], json["deaths"], json["critical"], json["cases"], json["recovered"], calculate_death_rate(json["deaths"], json["recovered"]), from_timestamp(json["updated"]), ] ) print(x) if args.csv: to_csv(json) elif args.totals: x = PrettyTable() x.field_names = [ "Active", "Cases", "Deaths", "Recovered", "Death Rate", "Updated", ] json = totals() x.add_row( [ json["active"], json["cases"], json["deaths"], json["recovered"], calculate_death_rate(json["deaths"], json["recovered"]), from_timestamp(json["updated"]), ] ) print(x) if args.csv: to_csv(json) return True elif args.all: x = PrettyTable() x.field_names = [ "Country", "Active", "Cases", "Deaths", "Recovered", "Death Rate", "Updated", ] c = countries(args.sort_by) for d in c: x.add_row( [ d["country"], d["active"], d["cases"], d["deaths"], d["recovered"], calculate_death_rate(d["deaths"], d["recovered"]), from_timestamp(d["updated"]), ] ) print(x) if args.csv: to_csv(c) return True elif args.us: x = PrettyTable() x.field_names = [ "State", "Active", "Cases", "Deaths", ] states = us_states(sort_by=args.sort_by) for state in states: x.add_row( [state["state"], state["active"], state["cases"], state["deaths"],] ) print(x) if args.csv: to_csv(states) return True else: return False
python
{"html_attributions": [], "result": {"rating": 2.6, "reviews": [{"author_name": "<NAME>", "author_url": "https://www.google.com/maps/contrib/102031128001556431597/reviews", "language": "en", "profile_photo_url": "https://lh3.ggpht.com/-uS8zk-BUD6g/AAAAAAAAAAI/AAAAAAAAAAA/0rpUgRdV6OI/s128-c0x00000000-cc-rp-mo/photo.jpg", "rating": 4, "relative_time_description": "8 months ago", "text": "Very tranquil station, just over a mile from the village. Best way to get there is to walk down to Fan Road (on the right) which follows the route of an old tramway. At the next junction, look for The Incline straight ahead, and follow this to the village.", "time": 1549544951}, {"author_name": "<NAME>", "author_url": "https://www.google.com/maps/contrib/116863978374458592720/reviews", "language": "en", "profile_photo_url": "https://lh3.ggpht.com/-UUurz71HKJA/AAAAAAAAAAI/AAAAAAAAAAA/46TQDlUGmaI/s128-c0x00000000-cc-rp-mo-ba5/photo.jpg", "rating": 2, "relative_time_description": "4 months ago", "text": "I would seriously advice against using this station to travel to Saundersfoot town. If you are traveling to Pentlepoir to the north, then this station is in an \"Ok\" location, with no pavement or lighting however. This station is absolutely not suitable to travel to/from Saundersfoot town with children or any luggage; the walk to Saundersfoot is about a mile down a steep hill, with no pavement or lighting. Needless to say, nobody should ever attempt to reach this station by walking after dark. No taxis wait at the station, so pre-order one if you think this might be necessary. This is a request stop so make sure you signal clearly to the driver that you want to board the train, otherwise you'll have a 2 hour wait for the next train, and trust me you don't want that! On the whole, there is nothing wrong with the station, you just need to be prepared for what you will find. \n If you do get stuck you could try and have a look at the old abandoned tramway tunnel, which runs underneath the station. \nIt can be accessed, well I'm not going to tell you on here, just be prepared for a steep climb and very, very thick mud. \nI hope my photos help.", "time": 1560014760}, {"author_name": "<NAME>", "author_url": "https://www.google.com/maps/contrib/114667354558888802098/reviews", "language": "en", "profile_photo_url": "https://lh3.ggpht.com/-guEDVOz3CEA/AAAAAAAAAAI/AAAAAAAAAAA/ugyijnOnkdI/s128-c0x00000000-cc-rp-mo/photo.jpg", "rating": 1, "relative_time_description": "10 months ago", "text": "It\u2019s not in Saundersfoot !!", "time": 1546001547}, {"author_name": "<NAME>", "author_url": "https://www.google.com/maps/contrib/113902134457230472961/reviews", "profile_photo_url": "https://lh6.ggpht.com/-UAWAVF0xCUQ/AAAAAAAAAAI/AAAAAAAAAAA/ZizurcyNW80/s128-c0x00000000-cc-rp-mo/photo.jpg", "rating": 5, "relative_time_description": "a year ago", "text": "", "time": 1525964255}, {"author_name": "Sam .", "author_url": "https://www.google.com/maps/contrib/117132238539826578852/reviews", "profile_photo_url": "https://lh4.ggpht.com/-_YTQ27LFm0M/AAAAAAAAAAI/AAAAAAAAAAA/L4qF96W9Ea8/s128-c0x00000000-cc-rp-mo/photo.jpg", "rating": 1, "relative_time_description": "2 years ago", "text": "", "time": 1504852899}]}, "status": "OK"}
json
<reponame>MiraiMindz/.dotfiles setInterval(showTime, 1000); setInterval(showDate, 1000); function showTime() { let time = new Date(); let hour = time.getHours(); let min = time.getMinutes(); let sec = time.getSeconds(); hour = hour < 10 ? "0" + hour : hour; min = min < 10 ? "0" + min : min; sec = sec < 10 ? "0" + sec : sec; let currentTime = hour + ":" + min + ":" + sec; document.getElementById("clockhours") .innerHTML = currentTime; } function showDate() { let time = new Date(); let day = time.getDate(); let month = (time.getMonth()+1); let year = time.getFullYear(); let monthname = time.toLocaleString('default', { month: 'long' }); let dayname = time.toLocaleDateString('default', { weekday: 'long' }); day = day < 10 ? "0" + day : day; month = month < 10 ? "0" + month : month; year = year < 10 ? "0" + year : year; let currentTime = day + " of " + monthname + ", " + year; document.getElementById("clockdate").innerHTML = currentTime; document.getElementById("dayname").innerHTML = dayname; } showTime(); showDate();
javascript
Miami GP Live Streaming: Formula 1 Live Streaming: After an enthralling Drama at Baku, the F1 action moves to Miami for the second edition of the Miami Grand Prix. Last year’s debut race was a spectacle to behold, and this year’s event is expected to produce surprise and drama. Follow Formula 1 Live Updates on InsideSport.IN. As the season reaches its midway point, the competition for the top spot in the driver’s and constructor’s championship is heating up. Red Bull Racing has set the pace so far, winning the first four races of the season, with Max Verstappen and Sergio Perez leading the charge. Ferrari’s Charles Leclerc impressed at Baku and would be aiming for another high finish in Miami. Where can you watch the Practice, Qualifying, and Race on TV? The Practice, Qualifying, Sprint, and Race will not be telecast on television in India. F1 fans in India can Live Stream all the formula 1 action on the F1TVPro App and Website. When was the track built? The Miami Grand Prix will be making its debut on the Formula 1 calendar this year. The Miami International Autodrome is an impermanent circuit, yet one intended to have a long-lasting feel. Set in the Hard Rock Stadium complex in Miami Gardens, it is home to the renowned NFL team Miami Dolphins. The current design of the track was chosen from 36 unique designs. The Miami International Autodrome has 19 turns which will give it the vibes of a road circuit. When was its first Grand Prix? The Miami Grand Prix made its debut last year in Formula 1. It is the second race in the United States after the Austin Grand Prix. Max Verstappen won the race the last time out. Miami Grand Prix Concert Schedule: Besides the race, the organizers have also prepared for concerts across four different dates, which will be held at the Hard Rock Beach Club. 6th May – Jonas Brothers,
english
## ## Name: test_scrubby.py ## Purpose: Unit tests for scrubby.py ## ## Copyright (C) 2009, <NAME>, All Rights Reserved. ## import scrubby as S import unittest, functools # {{ class test_scanner class test_scanner(unittest.TestCase): """Low-level tests for the markup_scanner class. Only tests the internal methods; higher-level methods should be tested by using the results in a markup_parser. """ def test_empty_input(self): """Test correct scan of empty input.""" ts = list(S.markup_scanner('').scan()) self.assertEqual(ts, [('eof', 0, 0, None)]) def test_strings(self): """Test quoted string tokens.""" for tag, src in ( ('str', '"double-quoted string"'), ('ustr', '"incomplete string'), ('str', "'single-quoted string'"), ('ustr', "'incomplete string"), ('str', '""'), # empty double-quoted ('str', "''"), # empty single-quoted ('ustr', '"\x01'), # incomplete double-quoted ('ustr', "'\x01"), # incomplete single-quoted ): s = S.markup_scanner(src) self.assertEqual(s.scan_string(0), (tag, 0, len(s.input))) def test_unquoted(self): """Test unquoted string tokens.""" s = S.markup_scanner('unquoted string') self.assertEqual(s.scan_unquoted(0), ('unq', 0, len('unquoted'))) s = S.markup_scanner(' empty') self.assertEqual(s.scan_unquoted(0, allow_blank=True), ('unq', 0, 0)) self.assertRaises(S.parse_error, lambda: s.scan_unquoted(0, allow_blank=False)) s = S.markup_scanner('NAME<') self.assertEqual(s.scan_name(0), ('name', 0, len('NAME'))) def test_space(self): """Test whitespace consumption.""" s = S.markup_scanner('nospace') self.assertEqual(s.scan_space(0), ('ws', 0, 0)) s = S.markup_scanner(' \t\f\r\n$') self.assertEqual(s.scan_space(0), ('ws', 0, len(s.input) - 1)) def test_literal(self): """Test consumption of literals.""" s = S.markup_scanner('$++OK') self.assertEqual(s.scan_literal(1, '++'), ('lit', 1, 1 + len('++'))) self.assertRaises(S.parse_error, lambda: s.scan_literal(0, 'XXX')) def test_entity(self): """Test consumption of entities.""" for src in ('&ok', '&123', '&a1bx3c'): s = S.markup_scanner(src) self.assertEqual(s.scan_entity(1), ('uent', 1, len(s.input))) s = S.markup_scanner(src + ';') self.assertEqual(s.scan_entity(1), ('ent', 1, len(s.input))) s = S.markup_scanner('&$;') self.assertEqual(s.scan_entity(1), ('uent', 1, 1)) def test_comment(self): """Test comment tokens.""" s = S.markup_scanner('<!---->') self.assertEqual(s.scan_comment(0), ('com', 0, len(s.input))) s = S.markup_scanner('<!-- some random stuff') self.assertEqual(s.scan_comment(0), ('ucom', 0, len(s.input))) s = S.markup_scanner('!<FAIL') self.assertRaises(S.parse_error, lambda: s.scan_comment(0)) def test_directives(self): """Test CDATA and other directives.""" s = S.markup_scanner('<!normal directive>') t = len(s.input) self.assertEqual(s.parse_one(0), ('dir', 0, t, { 'content': (2, t - 1), 'name': (2, 2 + len('normal')) })) s = S.markup_scanner('<!broken directive<') t = len(s.input) self.assertEqual(s.parse_one(0), ('udir', 0, t - 1, { 'content': (2, t - 1), 'name': (2, 2 + len('broken')) })) s = S.markup_scanner('<![CDATA[a[<]]*>+y<]]>') t = len(s.input) self.assertEqual(s.parse_one(0), ('cdata', 0, t, { 'content': (len('<![CDATA['), t - len(']]>')) })) s = S.markup_scanner('<![CDATA[...') t = len(s.input) self.assertEqual(s.parse_one(0), ('udata', 0, t, { 'content': (len('<![CDATA['), t) })) def test_attrib(self): """Test tag-attribute tokens.""" s = S.markup_scanner('novalue/') nlen = len('novalue') self.assertEqual(s.parse_attrib(0), ('attr', 0, nlen, { 'name': (0, nlen), 'value': ('none', nlen, nlen) })) s = S.markup_scanner('name=bare word') nlen = len('name') self.assertEqual(s.parse_attrib(0), ('attr', 0, len(s.input) - 5, { 'name': (0, nlen), 'value': ('unq', 5, 9) })) s = S.markup_scanner('name="bare word') self.assertEqual(s.parse_attrib(0), ('attr', 0, len(s.input), { 'name': (0, nlen), 'value': ('ustr', 5, len(s.input)) })) s = S.markup_scanner(s.input + '"') self.assertEqual(s.parse_attrib(0), ('attr', 0, len(s.input), { 'name': (0, nlen), 'value': ('str', 5, len(s.input)) })) # }} # {{ class test_parser class test_parser(unittest.TestCase): """Unit tests for markup_parser.""" def test_directive(self): """Test markup directives.""" s = S.markup_parser('<!DOCTYPE html public>') self.assertEqual(len(s), 2) self.assertEqual(s[0].type, 'dir') self.assertEqual(s[0].name, 'DOCTYPE') self.assertEqual(s[0].innersource, 'DOCTYPE html public') s = S.markup_parser('<?xml ... ?>') self.assertEqual(len(s), 2) self.assertEqual(s[0].type, 'dir') self.assertEqual(s[0].name, 'xml') self.assertEqual(s[0].innersource, 'xml ... ') for src in ('<!', '<?'): s = S.markup_parser(src + 'incomplete') self.assertEqual(len(s), 2) self.assertEqual(s[0].type, 'udir') self.assertEqual(s[0].name, 'incomplete') self.assertEqual(s[0].innersource, 'incomplete') s = S.markup_parser(src) self.assertEqual(len(s), 2) self.assertEqual(s[0].type, 'text') self.assertEqual(s[0].source, s.input) for src in ('<!>', '<??>'): s = S.markup_parser(src) self.assertEqual(len(s), 2) self.assertEqual(s[0].type, 'text') self.assertEqual(s[0].source, s.input) def test_tags(self): """Test tag formats.""" s = S.markup_parser('<open1><open2 bare name1=val name2="foo">') self.assertEqual(len(s), 3) self.assertTagShape(s[0], 'open', 'open1') self.assertTagShape(s[1], 'open', 'open2', bare='', name1='val', name2='foo') s = S.markup_parser("<self foo=bar baz='quux crunch' zot/></endtag>") self.assertEqual(len(s), 3) self.assertTagShape(s[0], 'self', 'self', foo='bar', baz='quux crunch', zot='') self.assertTagShape(s[1], 'close', 'endtag') def test_basic_nesting(self): """Test basic tag nesting rules.""" # test indices 0 1 2 3 4 5 6 7 8 9 10 s = S.markup_parser('<A> w <B> x <C> y <D></B></C> z </A>') self.assertChildOf(s[0], None) # <A> is at the top level self.assertChildOf(s[1], s[0]) # w is a child of <A> self.assertChildOf(s[2], s[0]) # <B> is a child of <A> self.assertChildOf(s[3], s[2]) # x is a child of <B> self.assertChildOf(s[4], s[0]) # <C> is a child of <A> self.assertChildOf(s[5], s[2]) # y is a child of <B> self.assertChildOf(s[6], s[2]) # <D> is a child of <B> self.assertChildOf(s[7], s[0]) # </B> is a child of </A> self.assertChildOf(s[8], s[0]) # </C> is a child of <A> self.assertChildOf(s[9], s[0]) # z is a child of <A> self.assertChildOf(s[10], None) # </A> is at the top level # Partnership tests self.assertPartners(s[0], s[10]) self.assertPartners(s[2], s[7]) self.assertPartners(s[4], s[8]) # Path tests # <A> ==> <B> ==> <D> self.assertEqual(s[6].path, [s[0], s[2], s[6]]) # <A> ==> <B> ==> y self.assertEqual(s[5].path, [s[0], s[2], s[5]]) # <A> ==> <C> self.assertEqual(s[4].path, [s[0], s[4]]) def test_custom_nesting(self): """Test some simple customized nesting rules.""" class TP(S.markup_parser): CLOSED_BY_CLOSE = {'c': set(('b', ))} CLOSED_BY_OPEN = {'c': set(('c', ))} # 0 1 2 3 4 5 6 7 8 9 10 11 s = TP('<A>aaa<B><C>c1<C>c2<C>c3</B>bbb</A>') self.assertPartners(s[0], s[11]) # <A> ~ </A> self.assertPartners(s[2], s[9]) # <B> ~ </B> self.assertPartner(s[3], s[5]) # <C> ~ <C> self.assertPartner(s[5], s[7]) # ditto self.assertPartner(s[7], s[9]) # ditto self.assertChildOf(s[1], s[0]) # A contains aaa self.assertChildOf(s[2], s[0]) # A contains B self.assertChildOf(s[3], s[2]) # B contains C's self.assertChildOf(s[5], s[2]) self.assertChildOf(s[7], s[2]) self.assertChildOf(s[4], s[3]) # C's contain their c's self.assertChildOf(s[6], s[5]) self.assertChildOf(s[8], s[7]) self.assertChildOf(s[10], s[0]) # A contains bbb def test_simple_queries(self): """Test simple .find() and .first() queries.""" s = S.markup_parser('<doc><!-- comment -->text<?dir?>' '<atag x=y><tag><self/>more&amp;</tag>') # Check that we don't find things we're not supposed to self.assertEqual(list(s.find(name='none')), []) self.assertRaises(KeyError, lambda: s.first(name='none')) self.assertRaises(KeyError, lambda: s.first(name='DOC', case_matters=True)) # Make sure we find the things we are supposed to self.assertEqual(s.first(type='com').source, '<!-- comment -->') self.assertEqual(s.last(name='tag').partner.source, '<tag>') self.assertEqual(list(t.source for t in s.find(type='text')), ['text', 'more&amp;']) self.assertEqual(s.first(value='more&').obj_id, 7) self.assertEqual(s.first(type='self').source, '<self/>') self.assertEqual(s.first(type='dir').source, '<?dir?>') # Check that attribute matching works self.assertRaises(KeyError, lambda: s.first(name='atag', attr=('x', False))) self.assertRaises(TypeError, lambda: s.first(attr=False)) self.assertEqual(s.first(name='atag').keys(), ['x']) self.assertEqual(s.first(attr=('x', True))['x'].value, 'y') def test_query_mapping(self): """Test mapping functions over query results.""" s = S.markup_parser('<a><b/>foobar<c></a></c>') self.assertEqual(s.first(type='text', map='source'), 'foobar') self.assertEqual(s.first(type='self', map='start'), 3) self.assertEqual(s.first(type='close', map=('name', 'obj_id')), ('a', 4)) self.assertEqual(list(s.find(map=len)), [3, 4, 6, 3, 4, 4, 0]) # includes eof marker self.assertEqual(list(s.find(map=lambda t: t.linepos[1])), [0, 3, 7, 13, 16, 20, 24]) #includes eof marker def test_query_candidates(self): """Test queries that stipulate a particular candidate set.""" # 0 1 2 3 4 s = S.markup_parser('<T>a span of text<U/>another span</T>') # If no candidate set is given, search the entire set. self.assertEqual(s.first(type='text').obj_id, 1) # Search on an object queries the contents of the object. self.assertEqual(s[0].first(type='text').obj_id, 1) # Search with an explicit range restricts the span. self.assertEqual(s.first(type='text', search_after=s[2]).obj_id, 3) # Multiple restrictions are allowed. self.assertEqual( s.first(search_after=s[1], search_before=s[3]).obj_id, 2) self.assertEqual( s.first(search_after=s[2], search_inside=s[0]).obj_id, 3) self.assertEqual(s[0].first(search_after=s[2], type='text').obj_id, 3) self.assertEqual(s[0].first(search_before=s[2], type='text').obj_id, 1) # Regression: Searching inside a text field doesn't search everything. self.assertRaises(KeyError, lambda: s.first(search_inside=s[1])) self.assertRaises(KeyError, lambda: s[1].first()) def test_line_numbers(self): """Test line numbering support.""" # Corner cases: Empty string, single line. self.assertEqual(S.markup_parser('').get_linecount(), 1) self.assertEqual(S.markup_parser('a').get_linecount(), 1) self.assertEqual(S.markup_parser('a\n').get_linecount(), 1) s = S.markup_parser('<line num=1>\nline 2\nline 3') self.assertEqual(s.get_linecount(), 3) self.assertEqual(s.get_line(1), '<line num=1>\n') self.assertEqual(s.get_line(2), 'line 2\n') self.assertEqual(s.get_line(3), 'line 3') self.assertRaises(IndexError, lambda: s.get_line(4)) t = s.first(type='text') self.assertEqual(t.source, '\nline 2\nline 3') self.assertEqual(t.linepos, (1, 12)) self.assertEqual(s.locate(t.start + 1), t) self.assertEqual(s.locate(len(s.input)).type, 'eof') t = s.locate(7) self.assertEqual(t.type, 'open') self.assertEqual(t.name, 'num') self.assertEqual(t.value, '1') def test_white_filter(self): """Test whitespace filtering.""" s = S.markup_parser(' <t0> <t1/> t2 <t3 num=3> ', skip_white_text=True) self.assertEqual(len(s), 5) self.assertTagShape(s[0], 'open', 't0') self.assertTagShape(s[1], 'self', 't1') self.assertObjectShape(s[2], 'text', source=' t2 ') self.assertTagShape(s[3], 'open', 't3', num='3') self.assertObjectShape(s[4], 'eof') def test_positions(self): """Test line number, character offset, and column number finding.""" s = S.markup_parser('<a>\n\t<b/>\t<c>d\n</c>\t</a>') s.LINE_NUM_BASE = 1 s.COLUMN_NUM_BASE = 0 s.TAB_WIDTH = 8 # Edge case: First line, first column. self.assertEqual(s[0].linepos, (1, 0)) self.assertEqual(s[0].linecol, (1, 0)) self.assertEqual(s[2].linepos, (2, 1)) self.assertEqual(s[2].linecol, (2, 8)) # Conversion of line/offset and line/column into input offsets. self.assertEqual(s.get_offset(1, 0), 0) # beginning self.assertEqual(s.get_offset(2, 9), 13) # at d self.assertEqual(s.get_offset(2, 0), 4) # start of <b> self.assertEqual(s.get_column_offset(1, 0), 0) # beginning self.assertEqual(s.get_column_offset(2, 19), 13) # at d self.assertEqual(s.get_column_offset(2, 8), 5) # start of <b> def test_entities(self): """Test entity substitution.""" s = S.markup_parser('a&lt;b&gt;c&quot;<x>' # 0 1 '--&testName;--<x>' # 2 3 '--&NoneSuch;--<x>' # 4 5 '&#32;&&&#9;') # 6 <eof> self.assertEqual(len(s), 8) # Check default entities self.assertObjectShape(s[0], 'text', value='a<b>c"') # Check custom entities s.ENTITY_NAME_MAP['testName'] = '[ok]' self.assertObjectShape(s[2], 'text', value='--[ok]--') self.assertObjectShape(s[4], 'text', value='--&NoneSuch;--') # Check numeric entities self.assertObjectShape(s[6], 'text', value=' &&\t') def assertChildOf(self, child, parent): self.assertEqual(child.parent, parent) def assertChildrenOf(self, children, parent): for child in children: self.assertChildOf(child, parent) def assertPartners(self, t1, t2): self.assertEqual(t1.partner, t2) self.assertEqual(t2.partner, t1) def assertPartner(self, t1, t2): self.assertEqual(t1.partner, t2) def assertObjectShape(self, obj, type, **kvs): self.assertEqual(obj.type, type) for k, v in kvs.items(): if not hasattr(obj, k): self.fail("expected property {0}, but it is missing".format(k)) self.assertEqual(getattr(obj, k), v) def assertTagShape(self, tag, type, name, **kvs): self.assertEqual(tag.type, type) self.assertEqual(tag.name, name) if hasattr(tag, 'keys'): self.assertEqual(sorted(tag.keys()), sorted(kvs)) for k, v in kvs.items(): self.assertEqual(tag[k].value, v) elif kvs: self.fail("expected attributes, but there are none") # }} # {{ class test_html class test_html(test_parser): """Unit tests for html_parser.""" def test_html_nesting(self): """Test HTML nesting rules.""" s = S.html_parser('<html><head> a <body> b </html>') self.assertChildOf(s[0], None) self.assertChildOf(s[1], s[0]) self.assertChildOf(s[3], s[0]) self.assertChildOf(s[5], None) self.assertPartners(s[0], s[5]) self.assertPartner(s[1], s[3]) # <head> closed by <body> self.assertPartner(s[3], s[5]) # <body> closed by </html> self.assertEqual(s[0].children, [s[1], s[3]]) self.assertEqual(s[1].children, [s[2]]) self.assertEqual(s[3].children, [s[4]]) # Path: <html> ==> <body> ==> b self.assertEqual(s[4].path, [s[0], s[3], s[4]]) # Path: <html> ==> <head> ==> a self.assertEqual(s[2].path, [s[0], s[1], s[2]]) s = S.html_parser('<html>...') self.assertPartner(s[0], s[2]) # <html> closed by EOF # Table nesting rules. # Test table format # x y # a b # Indices: 0 1 2 3 4 5 6 7 8 9 10 11 s = S.html_parser('<table><tr><td>x<td>y<tr><td>a<td>b</table>') self.assertChildrenOf((s[1], s[6]), s[0]) self.assertChildrenOf((s[2], s[4]), s[1]) self.assertChildrenOf((s[7], s[9]), s[6]) self.assertChildOf(s[3], s[2]) self.assertChildOf(s[5], s[4]) self.assertChildOf(s[8], s[7]) self.assertChildOf(s[10], s[9]) # }} if __name__ == "__main__": unittest.main() # Here there be dragons
python
<reponame>joseconstela/meteor /* CSS declarations go here */ * { margin: 0; padding: 0 } #grid td { width: 20px; height: 20px; vertical-align: middle; text-align: center; } .color0 { background: #eee; } .color1 { background: #d8f; } .color2 { background: #8c3; } .color3 { background: #39d; } .color4 { background: #d96; } .color5 { background: #a95; }
css
radius-dict-gen: dictionary: parse error in /Users/avermeer/Documents/go-radius-dictionaries/dictionary/dictionary.iana:18: invalid OID ".1"
go
Dubai is one of the most preferred destinations across the world when one wants to experience ultra-modern hotels, grand malls and spectacular beaches. dubai visa for indians Can be availed through online visa service operated by iVisa. Now, Indians can get a Dubai visa in just 2 hours by simply filling the electronic application form. Whether you are applying for a tourist visa or a business visa, the following details will definitely provide you with a comprehensive understanding of the Dubai visa application formalities: Dubai Visa can be obtained by following three easy steps, i.e. getting quotation, making online payment, submitting documents and finally the traveler will receive his/her Dubai Visa. Following is the complete guide to Dubai Visa for Indians that every traveler must read before going there: Like other countries, Dubai also offers four types of visas i.e. tourist visa, transit visa, business visa and work visa. One can choose the type of visa depending on the purpose of their visit to this city of lights! Following are the types of Dubai visa for Indian tourists: Are you planning a holiday in Dubai with your friends or family? Dubai attracts thousands of tourists every year, especially from India. Those who are interested in luxury and adventurous expeditions. Dubai Visitor Visa is granted to travelers who wish to travel to Dubai for holidays. This visa will be valid for a period of 60 days. This Dubai Single Entry Tourist Visa cannot be extended and the traveler must present sponsorship from a UAE resident, company or hotel. This visa is given for a very short period of time. Travelers who are headed to another country but wish to spend 1-2 days in Dubai opt for this visa. The transit visa is valid for 14 days from the date of issue and the traveler cannot stay in Dubai for more than 96 hours with this visa. If you are planning to travel to any other country and want to stay in Dubai then you can visit this place for about 96 hours with Dubai Transit Visa. Read suggestions: It’s cheaper to fly to Dubai than to fly to Varanasi this weekend and no, that’s not a hoax! Dubai attracts numerous gold, textile and spice traders from India. If you are traveling to Dubai for business purpose or investment, you need to apply for a business visa. To apply for this visa, one must be sponsored by ownership of a business in the UAE. Read suggestions: 6 best homestays in Dubai that are totally glitz, glam and grandeur! This visa is for Indians wishing to work in Dubai. Work visas can only be obtained by an employer or sponsor on behalf of the traveller. Travelers should not fill any visa application form for Dubai work visa. All expenses and formalities will be covered by the employer or sponsor for travelers planning to work in Dubai. Whether applying for a Dubai tourist visa or a business visa, one needs to provide certain documents while filling the visa application form on iVisa. Following is the list of common documents required for Dubai Visa: - Your passport which is valid for at least 6 months after returning from Dubai. - A photocopy of your completed visa application form. - Two passport size photographs. - Covering letter stating the purpose and duration of the visit. - Hotel reservation receipt. - Investment amount of Rs 5 lakh or more in the form of fixed deposit. - A female solo traveler will require NOC from father or husband. How to apply for Dubai Visa? After ensuring the mentioned documents, one can proceed for the visa application form. The Dubai visa application form involves a few simple steps that can be completed easily. In case of any assistance, one can seek assistance from the helpline on the iVisa portal. Know the steps to get Dubai Visa: The three processing options offered on iVisa are: - Standard Processing: The traveler has to pay US$132 and this request will be processed within 2 working days. - Rush Processing: One has to pay US$162 and the application form will be processed within 24 hours. - Super Rush Processing: This is the most expensive process which involves paying US$192 as application fee. This is the fastest option as the application gets processed within 2 hours. The next step is to pay the visa application fee as per the processing option chosen by the traveler while filling the application form. The traveler is advised to check the application form carefully before paying the Dubai Visa fee. If there is a mistake in the application form, you may have to repeat the process. Read suggestions: Dubai Monuments: A mixed list of 8 fascinating old and new monuments in the city! The final step is to upload additional documents which will improve your chances of getting the visa. The portal will give you suggestions about documents that can be uploaded to improve the status of your application for Dubai Visa. After completing these three steps, the traveler will receive an email in PDF format. The status of your visa application will be communicated within the stipulated time depending on the process you have chosen. If you are planning an expedition to this magnificent city then knowing the details of Dubai Visa for Indians will definitely help you plan your trip. Experience the towering skyscrapers, huge shopping malls, desert safari tours and other electrifying activities in Dubai by booking a trip to Dubai with Daily Hind News. You can even get your itinerary customized as per your interests here! Disclaimer: Daily Hind News claims no credit for images displayed on our blog site unless otherwise noted. All visual content is copyright to its respected owners. We try to link to the original sources whenever possible. If you own the rights to any of the images, and do not wish them to appear on Daily Hind News, please Contact us and they will be promptly removed. We believe in giving due credit to the original author, artist or photographer. please pay attention: Any information published by Daily Hind News in any form of content is not intended to be a substitute for medical advice of any kind, and one should not take any action before consulting a professional medical expert of one’s choice. What types of visas are available for Indians to visit Dubai? Tourist visa, business, work and transit visa are available for Indians to visit Dubai. You can get a visa for Dubai within 2 hours of filling the application form. What is the range of fees to travel to Dubai? The fees can range from Rs 2500 to Rs 20,000 depending on the visa you choose. This is one of the easiest visas to get to Dubai. The process is simple and the duration is less than obtaining a visa for other countries. What is a transit visa and how long is it valid? Travelers stopping over in Dubai while traveling to other countries can opt for a transit visa. It is valid for 14 days. On your trip, you can take a short trip and go sightseeing in Dubai before heading to other countries. What additional documents do you need to travel to Dubai? In addition to your passport and financial documents, you will need to submit an itinerary that includes copies of the hotel you will stay in and flight tickets so that officials know the length of your stay. What tips should travelers follow when they visit Dubai? Keep all your documents and proof of address safe, even if they are not mentioned in the guidelines. This is a useful tip to follow to save yourself a lot of trouble. How long is an Indian tourist visa valid in Dubai? Tourist visa from India is valid for two months from the date of issue. You can extend the tourist visa for a maximum period of 40 days. Who can sponsor you when you go to Dubai for business or work? The sponsor can be your employer, relative, friend, travel agency or anyone who is a permanent resident of the UAE. Are you looking to book an international holiday? Book memorable holidays on Daily Hind News with 650+ verified travel agents for 65+ domestic and international destinations. People also read:
english