text
stringlengths
1
1.04M
language
stringclasses
25 values
<html> <head> <title>UW Summa</title> <script src="../../javascripts/listCollapse.js" type="text/javascript" language="javascript1.2"></script> <link href="../../javascripts/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen"> <script src="../../javascripts/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> </head> <body onload="compactMenu('root',false,'');"> <div class="container"> <h1><a href="index.html">Summa <img id="logo" width="30" src="http://knowitall.cs.washington.edu/summa/img/logo.png"></a></h1> <span></span> <ul class="list-group" id="root"> <li class="list-group-item"> <span>3-2-2014 Deadly bomb blasts have rocked a marketplace in the capital of Nigeria 's northern Borno state .</span> <ul class="list-group"> <li class="list-group-item"> <span>3-2-2014 Deadly bomb blasts have rocked a marketplace in the capital of Nigeria 's northern Borno state .</span> <ul class="list-group"> <li class="list-group-item"> <span>3-2-2014 Nigeria is battling a bloody Islamic insurgency , which has escalated over the past month .</span> </li> <li class="list-group-item"> <span>3-2-2014 The groups are believed to be responsible for killing thousands of people in north and central regions of the country .</span> </li> <li class="list-group-item"> <span>3-2-2014 The Islamist militant group wants to impose Shariah law in Nigeria .</span> </li> </ul> </li> <li class="list-group-item"> <span>4-14-2014 An earlier one on April 14 killed at least 75 people .</span> <ul class="list-group"> <li class="list-group-item"> <span>4-14-2014 While commiserating with the families of the defenceless who lost their lives in the act , the Minister assured Nigerians that the current administration will continue to do everything within available resources to discharge its constitutional and statutory responsibilities of providing secure environment for Nigerians and foreigners domiciled in the country at all times .</span> </li> <li class="list-group-item"> <span>4-14-2014 The Minister further assured Nigerians that security agencies will ensure that those behind the act are apprehended and brought to book .</span> </li> </ul> </li> <li class="list-group-item"> <span>4-19-2014 The group released its new video to journalists in northeast Nigeria Saturday , hours after AFP news agency published highlights of the clip .</span> </li> <li class="list-group-item"> <span>4-20-2014 Witnesses and reporters , however , put the casualty figure far higher .</span> </li> <li class="list-group-item"> <span>5-1-2014 Abuja -- The Nigerian government has slapped a massive security cordon on Abuja in response to a deadly car bomb Thursday , ordering the closure of all public schools and offices from Wednesday when the capital will be hosting the World Economic Forum on Africa .</span> </li> </ul> </li> <li class="list-group-item"> <span>5-2-2014 Witnesses say an apparently bomb-rigged car exploded at the busy site shortly after its driver exited the vehicle and walked away .</span> <ul class="list-group"> <li class="list-group-item"> <span>5-2-2014 Witnesses say an apparently bomb-rigged car exploded at the busy site shortly after its driver exited the vehicle and walked away .</span> <ul class="list-group"> <li class="list-group-item"> <span>5-2-2014 The economic meeting is scheduled to hold from Wednesday to Friday , and will be attended by world leaders and business executives around the world . ''</span> </li> <li class="list-group-item"> <span>5-2-2014 Measures scheduled by the organizers will see security zone perimeters expanded at key locations and additional security at venues , Abuja airport and key roads , as well as on dedicated shuttle services to and from the airport and between venues . ''</span> </li> <li class="list-group-item"> <span>5-2-2014 Thursday 's attack occurred about 200 meters away from the scene of the first .</span> </li> </ul> </li> <li class="list-group-item"> <span>5-18-2014 Kano , the North 's most populated and cosmopolitan city had enjoyed months of respite from the militant sect after series of deadly attacks .</span> </li> <li class="list-group-item"> <span>5-19-2014 Police Investigators have been combing the scene of a suicide car bomb attack that killed some people in Kano Sunday .</span> </li> </ul> </li> <li class="list-group-item"> <span>6-2-2014 The 23rd Armoured Brigade of the Nigerian Army , Yola , equally confirmed the blast .</span> <ul class="list-group"> <li class="list-group-item"> <span>6-2-2014 Adamawa Police Command confirmed the bomb blast , but could not confirm the casualty figure .</span> <ul class="list-group"> <li class="list-group-item"> <span>6-2-2014 He said the blast occurred at a popular relaxation centre , Kabang .</span> </li> <li class="list-group-item"> <span>6-2-2014 The Command 's spokesman , <NAME> , said the blast occurred at about 6p .</span> </li> </ul> </li> <li class="list-group-item"> <span>6-25-2014 The blast occurred at the busy plaza at about 4 p.m. local time , setting off a huge fire .</span> <ul class="list-group"> <li class="list-group-item"> <span>6-25-2014 Authorities say the explosion went off after bombers riding on a motorcycle hauled an explosive device towards the shopping mall .</span> </li> <li class="list-group-item"> <span>6-25-2014 The blast occurred at the busy plaza at about 4 p.m. local time , setting off a huge fire .</span> </li> <li class="list-group-item"> <span>6-23-2014 No group has claimed responsibility for the blast although the insurgent Boko Haram has carried out similar attacks in Kano and other northern states .</span> </li> <li class="list-group-item"> <span>6-23-2014 He said the blast occurred at about 2:05 p.m. .</span> </li> </ul> </li> <li class="list-group-item"> <span>6-27-2014 The cause of the late Friday blast was not immediately clear , but Boko Haram Islamists have attacked Bauchi repeatedly during their five-year uprising aimed at creating a strict Islamic state in the north .</span> </li> </ul> </li> <li class="list-group-item"> <span>6-28-2014 Bomb attacks on targets which Boko Haram has branded sinful - including bars , churches and schools teaching a Western curriculum - have formed a major part of the insurgency .</span> <ul class="list-group"> <li class="list-group-item"> <span>6-28-2014 No claim of responsibility While no group had claimed responsibility for the attack , authorities in the West African country generally look for clues of involvement by the Islamist extremist group Boko Haram .</span> <ul class="list-group"> <li class="list-group-item"> <span>6-28-2014 Boko Haram began waging war against the Nigerian government in 2009 and seeks to introduce an Islamic state .</span> </li> <li class="list-group-item"> <span>7-1-2014 While there was no immediate claim of responsibility , blame was likely to fall on Boko Haram , which was founded in Maiduguri more than a decade ago and has killed thousands during a five-year uprising .</span> </li> <li class="list-group-item"> <span>6-28-2014 Police in the northern Nigerian city of Bauchi say they are searching for the reason for a deadly blast overnight .</span> </li> <li class="list-group-item"> <span>7-1-2014 A truck exploded in a huge fireball killing at least 15 people on Tuesday in the northeast Nigerian city of Maiduguri , the latest attack in a city repeatedly hit by Boko Haram Islamists .</span> </li> </ul> </li> <li class="list-group-item"> <span>7-24-2014 A witness said the explosion targeted a prominent Islamic cleric , Dahiru Bauchi , who had delivered Ramadan lecture at the Square .</span> <ul class="list-group"> <li class="list-group-item"> <span>7-27-2014 By <NAME> Six people were Sunday killed in Kano by bomb blast , believed to have been masterminded by Boko haram insurgents .</span> </li> <li class="list-group-item"> <span>7-24-2014 By <NAME> The blast occurred along Isa Kaita road which leads to the popular Murtala Square .</span> </li> <li class="list-group-item"> <span>7-24-2014 The sheikh escaped unhurt as the bomb , concealed in a red Volkswagen golf car parked by the road side , went off , a witness , <NAME> , told PREMIUM TIMES . ''</span> </li> </ul> </li> <li class="list-group-item"> <span>7-28-2014 Eight people sustained injuries , three suspect were arrested by the police over the incident .</span> <ul class="list-group"> <li class="list-group-item"> <span>7-28-2014 The bomb blast occured at a Church and Kofar Nasarawa in Kano .</span> </li> <li class="list-group-item"> <span>7-28-2014 Kano State Police Commissioner Mr. <NAME> confirm the story .</span> </li> </ul> </li> </ul> </li> <li class="list-group-item"> <span>9-17-2014 Gunshots and an explosion were heard at the school .</span> <ul class="list-group"> <li class="list-group-item"> <span>9-17-2014 According to reports , students were seen fleeing from the school .</span> <ul class="list-group"> <li class="list-group-item"> <span>9-17-2014 According to reports , there was a blast and sporadic gunshots resulting in pandemonium as residents scampered to safety while shop owners hurriedly locked up their shops .</span> </li> <li class="list-group-item"> <span>9-17-2014 There was no immediate indication of whether there had been any casualties in the attack .</span> </li> <li class="list-group-item"> <span>9-17-2014 A BLAST on Wednesday rocked the Federal College of Education , Kano .</span> </li> </ul> </li> <li class="list-group-item"> <span>11-4-2014 At least 29 persons were yesterday confirmed dead and 80 others seriously injured after a suspected Boko Haram suicide bomber targeted a religious procession of the Shia Islamic brotherhood in Potiskum town of Yobe State , officials and witnesses have said .</span> <ul class="list-group"> <li class="list-group-item"> <span>11-4-2014 LEADERSHIP had officially been informed by hospital sources in Potiskum that 22 persons were instantly killed in the blast , while five others died as a result of bullet injuries sustained during the shooting that followed the blast .</span> </li> <li class="list-group-item"> <span>11-4-2014 A medical staff member of Potiskum General Hospital , who spoke to LEADERSHIP but wishes not to be named , said two other injured persons later died at about 6pm yesterday .</span> </li> <li class="list-group-item"> <span>11-3-2014 Official figures said 8 people died , with 46 injured .</span> </li> <li class="list-group-item"> <span>11-3-2014 Many other vehicles parked there were destroyed by the explosion .</span> </li> </ul> </li> <li class="list-group-item"> <span>11-10-2014 One witness said the explosions in the second biggest town in Bauchi State , occurred around 9 am as people , many of them from Potiskum in Yobe State , queued at the ATM to make cash withdrawals .</span> <ul class="list-group"> <li class="list-group-item"> <span>11-10-2014 A top security source told Weekly Trust that most of the victims came from Potiskum in Yobe State . ''</span> </li> <li class="list-group-item"> <span>11-10-2014 By <NAME> -- At least 14 people were killed and many critically wounded when two bombs exploded at a First Bank Automatic Teller Machine -LRB- ATM -RRB- in Azare , headquarters of Katagum local government area of Bauchi State yesterday , residents .</span> </li> <li class="list-group-item"> <span>11-10-2014 The 14 victims were buried in Azare cemetery yesterday after Islamic rites at the town 's central mosque .</span> </li> </ul> </li> </ul> </li> </ul> </div> <body> </html>
html
<gh_stars>0 import BezierEasing, { EasingFunction } from "bezier-easing"; type BezierCoords = [number, number, number, number]; export const DefaultBezierCoords: BezierCoords = [0.25, 0.1, 0.25, 1.0]; const getCoordsOrDefault = (coords?: BezierCoords): BezierCoords => { let x1, y1, x2, y2; if (coords) { [x1, y1, x2, y2] = coords; } else { [x1, y1, x2, y2] = DefaultBezierCoords; } return [x1, y1, x2, y2]; }; export const useBezierEasing = (coords?: BezierCoords): EasingFunction => { const [x1, y1, x2, y2] = getCoordsOrDefault(coords); return BezierEasing(x1, y1, x2, y2); }; export const getBezierValue = ( val: number, coords?: BezierCoords ): null | number => { if (val > 1 || val < 0) { console.error( "Bezier value called with invalid value: ", val, "should be between 0-1" ); return null; } const [x1, y1, x2, y2] = getCoordsOrDefault(coords); return BezierEasing(x1, y1, x2, y2)(val); }; export default useBezierEasing;
typescript
package evaluations import ( "encoding/json" "os" "os/signal" "strconv" "time" consul "github.com/hashicorp/consul/api" nomad "github.com/hashicorp/nomad/api" "github.com/seatgeek/nomad-firehose/helper" "github.com/seatgeek/nomad-firehose/sink" log "github.com/sirupsen/logrus" ) const ( consulLockKey = "nomad-firehose/evaluations.lock" consulLockValue = "nomad-firehose/evaluations.value" ) // Firehose ... type Firehose struct { nomadClient *nomad.Client consulClient *consul.Client consulSessionID string consulLock *consul.Lock stopCh chan struct{} lastChangeIndex uint64 sink sink.Sink } // NewFirehose ... func NewFirehose() (*Firehose, error) { lock, sessionID, err := helper.WaitForLock(consulLockKey) if err != nil { return nil, err } defer lock.Unlock() nomadClient, err := nomad.NewClient(nomad.DefaultConfig()) if err != nil { return nil, err } consulClient, err := consul.NewClient(consul.DefaultConfig()) if err != nil { return nil, err } sink, err := sink.GetSink() if err != nil { log.Fatal(err) os.Exit(1) } return &Firehose{ nomadClient: nomadClient, consulClient: consulClient, consulSessionID: sessionID, consulLock: lock, sink: sink, }, nil } // Start the firehose func (f *Firehose) Start() error { // Restore the last change time from Consul err := f.restoreLastChangeTime() if err != nil { return err } go f.sink.Start() // Stop chan for all tasks to depend on f.stopCh = make(chan struct{}) // setup signal handler for graceful shutdown go f.signalHandler() // watch for allocation changes go f.watch() // Save the last event time every 10s go f.persistLastChangeTime(10) // wait forever for a stop signal to happen for { select { case <-f.stopCh: return nil } } } // Stop the firehose func (f *Firehose) Stop() { close(f.stopCh) f.sink.Stop() f.writeLastChangeTime() } // Read the Last Change Time from Consul KV, so we don't re-process tasks over and over on restart func (f *Firehose) restoreLastChangeTime() error { kv, _, err := f.consulClient.KV().Get(consulLockValue, &consul.QueryOptions{}) if err != nil { return err } // Ensure we got if kv != nil && kv.Value != nil { sv := string(kv.Value) v, err := strconv.ParseInt(sv, 10, 64) if err != nil { return err } f.lastChangeIndex = uint64(v) log.Infof("Restoring Last Change Time to %s", sv) } else { log.Info("No Last Change Time restore point, starting from scratch") } return nil } // Write the Last Change Time to Consul so if the process restarts, // it will try to resume from where it left off, not emitting tons of double events for // old events func (f *Firehose) persistLastChangeTime(interval time.Duration) { ticker := time.NewTicker(interval * time.Second) for { select { case <-f.stopCh: break case <-ticker.C: f.writeLastChangeTime() } } } func (f *Firehose) writeLastChangeTime() { v := strconv.FormatUint(f.lastChangeIndex, 10) log.Infof("Writing lastChangedTime to KV: %s", v) kv := &consul.KVPair{ Key: consulLockValue, Value: []byte(v), Session: f.consulSessionID, } _, err := f.consulClient.KV().Put(kv, &consul.WriteOptions{}) if err != nil { log.Error(err) } } // Publish an update from the firehose func (f *Firehose) Publish(update *nomad.Evaluation) { b, err := json.Marshal(update) if err != nil { log.Error(err) } f.sink.Put(b) } // Continously watch for changes to the allocation list and publish it as updates func (f *Firehose) watch() { q := &nomad.QueryOptions{ WaitIndex: f.lastChangeIndex, WaitTime: 5 * time.Minute, AllowStale: true, } for { log.Infof("Fetching evaluations from Nomad: %+v", q) evaluations, meta, err := f.nomadClient.Evaluations().List(q) if err != nil { log.Errorf("Unable to fetch evaluations: %s", err) time.Sleep(10 * time.Second) continue } // Only work if the WaitIndex have changed if meta.LastIndex <= f.lastChangeIndex { log.Infof("Evaluations index is unchanged (%d <= %d)", meta.LastIndex, f.lastChangeIndex) continue } log.Infof("Evaluations index is changed (%d <> %d)", meta.LastIndex, f.lastChangeIndex) // Iterate clients and find events that have changed since last run for _, evaluation := range evaluations { if evaluation.ModifyIndex <= f.lastChangeIndex { continue } f.Publish(evaluation) evaluation = nil } evaluations = nil // Update WaitIndex and Last Change Time for next iteration f.lastChangeIndex = meta.LastIndex q.WaitIndex = meta.LastIndex } } // Close the stopCh if we get a signal, so we can gracefully shut down func (f *Firehose) signalHandler() { c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt) select { case <-c: log.Info("Caught signal, releasing lock and stopping...") f.Stop() case <-f.stopCh: break } }
go
<gh_stars>0 #![feature(try_from, extern_prelude)] #![allow(dead_code)] extern crate clap; mod cli; use cli::cli; mod crypter; use crypter::{crypt_and_save, CryptError}; pub fn run() -> Result<(), CryptError> { let (file, filename, key, encrypted) = cli()?; match crypt_and_save(file, filename, key, encrypted) { Ok(_) => { if encrypted { println!("Success! You can find the decrypted file in the same directory with the original or chosen name."); } else { println!("Success! You can find the encrypted file in the same directory with a .encrypt suffix."); println!("Advise: You can now test to decrypt the file again and then should delete the both unencrypted files."); println!("Otherwise you whould have just wasted your time and no one wants to waist their time."); } } Err(e) => return Err(e), } Ok(()) }
rust
<reponame>fossabot/gophr import json from django.conf import settings from django import VERSION as django_version from django.contrib import admin from mptt.admin import DraggableMPTTAdmin from django.utils.safestring import mark_safe from nested_admin.nested import NestedModelAdmin, NestedStackedInline from cms.models import Page, Section, Component, ComponentType from cms.form import component_form_factory def publish_page(modeladmin, request, queryset): queryset.update(is_published=True) publish_page.short_description = 'Publish Page' class ComponentInlineAdmin(NestedStackedInline): model = Component extra = 0 # formset = inlineformset_factory(Section, Component, form=ComponentFormset, fields=('name', 'slug', 'content')) sortable_field_name = 'position' ordering = ['position'] fields = ('component_type', 'name', 'slug', 'position', 'admin_edit_link') readonly_fields = ('admin_edit_link',) def admin_edit_link(self, obj): return mark_safe(obj.get_admin_edit_link()) admin_edit_link.allow_tags = True admin_edit_link.short_description = "Edit Component" class SectionInlineAdmin(NestedStackedInline): model = Section can_delete = False fields = ('name', 'position') extra = 0 verbose_name = 'Section for this Page' show_change_link = False inlines = [ComponentInlineAdmin] sortable_field_name = 'position' ordering = ['position'] class PageAdmin(DraggableMPTTAdmin, NestedModelAdmin): mptt_level_indent = 20 list_display = ('tree_actions', 'indented_title', 'api_url', 'path', 'created_at', 'updated_at', 'is_published') list_display_links = ('indented_title',) fields = ('site', 'name', 'title', 'description', 'is_published', 'path', 'slug') search_fields = ('name', 'description',) readonly_fields = ('path', 'slug') actions = [publish_page] actions_on_top = True inlines = (SectionInlineAdmin,) class Media: js = ( settings.STATIC_URL + 'jquery/jquery.min.js', # settings.STATIC_URL + '/bootstrap/dist/js/bootstrap.min.js', ) css = { 'all': ( settings.STATIC_URL + '/bootstrap/dist/css/bootstrap.min.css', settings.STATIC_URL + '/gophr-cms/css/gophr-admin.css' ), } def api_url(self, obj): url = obj.get_absolute_url() if django_version[0] == 2: return url else: return '<a href="%s" target="_blank">%s</a>' % (url, url) api_url.allow_tags = True class SectionAdmin(admin.ModelAdmin): list_display = ('page', 'name', 'slug') fields = ('page', 'name', 'slug') readonly_fields = ('slug',) class ComponentAdmin(admin.ModelAdmin): list_display = ('section', 'component_type', 'name', 'slug') # fields = ('section', 'component_type', 'name',) # readonly_fields = ('slug',) list_display = ('name', 'section', 'component_type',) def get_form(self, request, obj=None, **kwargs): self.obj = obj schema = obj.component_type.schema return component_form_factory(obj, json.loads(schema)) # self.obj = obj # return super(ComponentAdmin, self).get_form(request, obj=obj, **kwargs) class ComponentTypeAdmin(admin.ModelAdmin): list_display = ('name', 'slug', 'is_static', 'schema') fields = ('name', 'slug', 'is_static', 'schema') readonly_fields = ('slug', 'is_static') admin.site.register(Page, PageAdmin) admin.site.register(Section, SectionAdmin) admin.site.register(Component, ComponentAdmin) admin.site.register(ComponentType, ComponentTypeAdmin)
python
The use of VAR or Video Assistant Referee has been a topic of discussion all throughout this World Cup. Unsurprisingly many are divided on its usage and the discussion which is all around is whether VAR is good for the game or not? From what we have seen during the Group Stages, I believe VAR has been an enormous success and through this article, I will look at the arguments for and against VAR and explain that, despite some teething issues, VAR is the best thing for football. First things first and the biggest point of this article is that VAR does not make bad decisions, bad referees do. Referees in games are referred to VAR when there is a possibility a ruling should be overturned if there is a clear and obvious error. Once the referee has seen this they can choose to stick with their on the field decision or overturn this. If this process is followed correctly and the decision is still the wrong one, it is the referee which has failed, not VAR. VAR is purely a video recording of the incident. It is not something that conspires against any team or supports the bigger teams, it merely gives the referees the chance to look at a decision again in order to give the best chance of arriving at the correct decision. Football is a game of opinions and whilst VAR will not stop some people contesting a decision, anything that gives the officials the best chance of getting a call correct has to be a good thing. Now I shall go through some examples and explain why the decision was wrong/right and then go through the reasons why I think VAR should be here to stay, if not with a couple of amendments. A decision which was certainly corrected thanks to VAR was the theatrics from Brazilian star Neymar. After turning a defender in the box, Neymar was struggling to go onto the ball and was touched on the shoulder by the Costa Rican defender, resulting in him falling on the floor dramatically in an attempt to win a penalty. Originally, he succeeds in this as the official pointed to the spot and gave Brazil a penalty. Without VAR, we would be referencing a horrendous mistake from the officials but thankfully, the referee was able to overturn his original choice. Another correct decision when referred to VAR, from a long Nigerian cross into the box. Going for a header, Rojo inadvertently headed the ball onto his own arm. This led to Nigerian players swarming the ref asking for a VAR decision. The team upstairs referred the referee to the screen in order to check if he wanted to overturn his original verdict. However, after looking at the incident on the screen, the referee rightfully waved away appeals and stuck with his original decision. This was a horrible decision by the officials in which VAR did not result in the correct decision. Referee Enrique Caceres pointed to the spot to give Iran a penalty for handball, which to the eyes of many was never deserving of the decision. A header in the box was blocked unintentionally by the outstretched arm of fullback Cedric from extremely close quarters. The attack then broke down with barely an appeal coming from the Iranian players. As he is fully entitled to do, the referee went to the monitor to reassess the incident and go over the replay. Bizarrely the Paraguayan official then re-entered to pitch and gave a penalty, to the disbelief of almost everyone watching. Such a blatant error caused much uproar about the incident, with many VAR critics citing it as a pure example of a system which does not work. While the decision was not correct I lay the blame on the shoulders of the referee, rather than VAR. The system is there for the official to check the incident, to overturn the decision was the responsibility of Enrique Caceres and unfortunately, he got it badly wrong. This is a much more contentious decision. Walker was adjudged to have pulled down Tunisian attacker Ben Youssef after misjudging the height of the cross and having his arms out wide parallel with the ground. While Ben Youssef was unlikely to get the ball, he was obstructed by the arm of Walker and hit the ground, resulting in the referee calling a penalty. VAR did look at the incident but decided not to ask the referee to check on his decision as there was not a clear or obvious mistake. While I can understand how some may find it hard to see how this incident could deserve a penalty, Walker's mistake in causing the attacker to fall inside the box gave the referee a decision to make. With this being such a close call, it is going to be impossible to convince everyone that the end result was the correct one. Yet, to overruling this would have given VAR even more negative press and as a result this was probably the right decision. These examples I feel show a broad range of the good and bad for VAR in this World Cup and I would love to hear your thoughts on all of the incidents above and any other instances, in the comments down below. Now, I think it’s time to get past the controversy and the critics and talk about why VAR has overall been a positive for the game. The best thing about the system for me is offside decisions. As a fan, there is nothing worse than seeing a perfectly good goal disallowed for offside when replays show the attacker has timed his run perfectly. In this World Cup, linesmen have been encouraged that when a decision is close, allow the attack to progress and then let VAR judge the call, meaning that the issue of a wrongly disallowed goal is almost eradicated. Being a linesman at the highest level must be one of the most difficult jobs in sports officiating and any help to get these decisions right is a massive positive. Another massive positive is the controversy it adds to the game. Many critics of technology in football state that the lack of controversy will make every game boring and a little soulless. Yet, with VAR the excitement of a decision is massive and we are much more likely to get the end result correct thanks to the replays, surely this is the best of both worlds. Watching a referee walk over to the monitor and look at the incident, the suspense mounts as to what way the call will go and it creates great excitement. I do agree that for fans inside the stadium, there needs to be more communication with the supporters, but for fans at home, it is incredibly gripping. Overall then I think VAR has been a massive success this World Cup. It is not designed to be a flawless system, it merely gives the officials the best chance to get the right decision and so far, it is achieving a better percentage of correct decisions. As the power remains with the referees, there will be bad decisions made on account for poor officiating, but VAR makes these incidents few and far between. This is VAR's first real test on a big stage and like anything new, it is not perfect and has some issues but overall, I think it has been a success. The main question that must be asked 'Has this World up been exciting and enjoyable to watch?' This is a resounding yes so far and I believe VAR has been a positive part of Russia 2018's triumph.
english
<reponame>alldaysunshine/sling-org-apache-sling-app-cms<gh_stars>10-100 { "jcr:primaryType" : "sling:Component", "jcr:title": "Honeypot", "componentType": "Form Field", "reloadPage": true }
json
<reponame>ssunorz/k8s-athenz-webhook package main import ( "bytes" "context" "crypto/rand" "encoding/base32" "reflect" "strings" "testing" "time" "os" "fmt" "io/ioutil" api "github.com/yahoo/k8s-athenz-webhook" authn "k8s.io/api/authentication/v1beta1" authz "k8s.io/api/authorization/v1beta1" ) var testContext = context.Background() func TestMapReadAccess(t *testing.T) { expect := func(s string, v bool) { a := isReadAccess(s) if a != v { t.Errorf("read access check for %q: got %v, want %v", s, v, a) } } expect("get", true) expect("list", true) expect("watch", true) expect("read", false) expect("write", false) expect("frobnicate", false) } func TestMapSystemNs(t *testing.T) { expect := func(s string, v bool) { a := isSystemNamespace(s) if a != v { t.Errorf("system namespace check for %q: got %v, want %v", s, v, a) } } expect("kube-system", true) expect("kube-application", true) expect("kubedns", false) expect("something-different", false) expect("app-kube-systenm", false) } func TestMapUserMapping(t *testing.T) { m := &UserMapper{Groups: []string{"foo"}} u, err := m.MapUser(testContext, "my.domain", "my-service") if err != nil { t.Fatal(err) } expected := authn.UserInfo{ Username: "my.domain.my-service", UID: "my.domain.my-service", Groups: []string{"foo"}, } if !reflect.DeepEqual(expected, u) { t.Fatal("bad user info, want", expected, "got", u) } } func TestMapInList(t *testing.T) { tests := []struct { check string list []string outcome bool }{ {"apples", nil, false}, {"apples", []string{}, false}, {"apples", []string{"oranges", "peaches"}, false}, {"apples", []string{"oranges", "peaches", "apples"}, true}, } for _, test := range tests { a := inList(test.check, test.list) if a != test.outcome { t.Errorf("inList %q -> %s, expected %v got %v", test.check, test.list, test.outcome, a) } } } func TestMapRestoreDomainName(t *testing.T) { tests := []struct { input string output string }{ {"foobarbaz", "foobarbaz"}, {"foo-bar-baz", "foo.bar.baz"}, {"foo-bar--baz", "foo.bar-baz"}, } for _, test := range tests { a := RestoreDomainName(test.input) if a != test.output { t.Errorf("TestRestoreDomainName %q -> %q, got %q", test.input, test.output, a) } } } func TestDomainFromNamespace(t *testing.T) { adminDomain := "k8s.admin" d := &ResourceMapper{AdminDomain: adminDomain} tests := []struct { input string output string }{ {"", "k8s.admin"}, // blank to admin {"foo-bar-baz", "foo.bar.baz"}, // dashes to dots {"kube-system-foo", "k8s.admin.kube-system-foo"}, // dub-dashes to dash {"kube-system-foo-bar--baz", "k8s.admin.kube-system-foo-bar--baz"}, // no mods here } for _, test := range tests { a := d.DomainFromNamespace(test.input) if a != test.output { t.Errorf("DomainFromNamespace %q -> %q, got %q", test.input, test.output, a) } } } func TestMapPrincipalFromUser(t *testing.T) { adminDomain := "k8s.admin" d := &ResourceMapper{AdminDomain: adminDomain} tests := []struct { input string output string }{ {"foobar", "foobar"}, // simple as is {"exotic:user", "exotic:user"}, // exotic as-is {"system:anonymous", "system:anonymous"}, // this, in particular, should not be modified {"system:serviceaccount:foo", "system:serviceaccount:foo"}, // single name doesn't change {"system:serviceaccount:foo:bar", "foo.bar"}, // 2 parts do {"system:serviceaccount:foo:bar:baz", "foo.bar"}, // third part ignored {"system:serviceaccount:kube-system-foo:bar", adminDomain + ".kube-system-foo.bar"}, // system domain } for _, test := range tests { a := d.PrincipalFromUser(test.input) if a != test.output { t.Errorf("PrincipalFromUser %q -> %q, got %q", test.input, test.output, a) } } } type result struct { principal string checks []api.AthenzAccessCheck err string } func TestMapResourceMapper(t *testing.T) { r := &ResourceMapper{ AdminDomain: "k8s", DenyResources: []string{"pids"}, AdminResources: []string{"namespaces"}, DenyUsers: []string{"system:anonymous"}, } resourceSAR := func(user string, verb, ns, res, subres, name string) authz.SubjectAccessReviewSpec { return authz.SubjectAccessReviewSpec{ User: user, ResourceAttributes: &authz.ResourceAttributes{ Verb: verb, Namespace: ns, Resource: res, Subresource: subres, Name: name, }, } } noresSAR := func(user string, verb, path string) authz.SubjectAccessReviewSpec { return authz.SubjectAccessReviewSpec{ User: user, NonResourceAttributes: &authz.NonResourceAttributes{ Verb: verb, Path: path, }, } } makeChecks := func(p string, err string, action string, resources ...string) result { checks := []api.AthenzAccessCheck{} for _, r := range resources { checks = append(checks, api.AthenzAccessCheck{Action: action, Resource: r}) } return result{ principal: p, err: err, checks: checks, } } tests := []struct { input authz.SubjectAccessReviewSpec output result }{ { resourceSAR("bob", "write", "foo-bar", "things", "", ""), makeChecks("bob", "", "write", "foo.bar:things"), }, { resourceSAR("bob", "write", "foo-bar", "things", "games", "monopoly"), makeChecks("bob", "", "write", "foo.bar:things.games"), }, { noresSAR("bob", "write", "foo-bar"), makeChecks("bob", "", "write", "k8s:foo-bar"), }, { resourceSAR("bob", "write", "foo-bar", "pids", "", ""), makeChecks("bob", "'pids' resources are not allowed through Athenz", ""), }, { resourceSAR("system:anonymous", "write", "foo-bar", "things", "games", "monopoly"), makeChecks("system:anonymous", "'system:anonymous' is not authorized for any actions", ""), }, { resourceSAR("bob", "write", "foo-bar", "namespaces", "", ""), makeChecks("bob", "", "write", "k8s:foo.bar.namespaces"), }, { resourceSAR("bob", "list", "foo-bar", "namespaces", "", ""), makeChecks("bob", "", "list", "foo.bar:namespaces", "k8s:namespaces"), }, } for i, test := range tests { p, checks, err := r.MapResource(testContext, test.input) switch { case err == nil && test.output.err == "": // ok case err != nil && test.output.err != "": //maybe ok if !strings.Contains(err.Error(), test.output.err) { t.Fatalf("Resource mapper %d: error: expected '%s' to contain '%s'", i, err.Error(), test.output.err) } default: // definitely not ok t.Fatalf("Resource mapper %d: err mismatch, want '%s' got %v", i, test.output.err, err) } if err == nil { actual := result{principal: p, checks: checks} if !reflect.DeepEqual(actual, test.output) { t.Errorf("Resource mapper %d: check mismatch want %v got %v", i, test.output, actual) } } } } func TestMapLogProvider(t *testing.T) { var buf bytes.Buffer lp := NewLogProvider(&buf) logger := lp("foobar") logger.Println("hello", "world") log := buf.String() contents := []string{"[foobar] ", "hello world"} for _, c := range contents { if !strings.Contains(log, c) { t.Errorf("log '%s' did not contain '%s'", log, c) } } } func randomSig() string { sig := "unknown" b := make([]byte, 5) _, err := rand.Reader.Read(b) if err == nil { sig = strings.ToLower(base32.StdEncoding.EncodeToString(b)) } return sig } func newToken() string { return fmt.Sprintf("d=my.domain;n=my-service;e=%d;s=%s", time.Now().Unix(), randomSig()) } func TestMapToken(t *testing.T) { file := "/tmp/token" s1 := newToken() err := ioutil.WriteFile(file, []byte(s1), 0644) if err != nil { t.Fatal(err) } defer os.Remove(file) ft, err := NewFileToken(file, true, time.Second) if err != nil { t.Fatal(err) } defer ft.Close() s, err := ft.TokenValue() if err != nil { t.Fatal(err) } if s != s1 { t.Errorf("bad token want %q got %q", s1, s) } s2 := newToken() err = ioutil.WriteFile(file, []byte(s2), 0644) if err != nil { t.Fatal(err) } time.Sleep(time.Second + 100*time.Millisecond) s, err = ft.TokenValue() if err != nil { t.Fatal(err) } if s != s2 { t.Errorf("bad token want %q got %q", s2, s) } } func TestMapTokenImmediateError(t *testing.T) { file := "/tmp/token" err := ioutil.WriteFile(file, []byte("random"), 0644) if err != nil { t.Fatal(err) } defer os.Remove(file) _, err = NewFileToken(file, true, time.Second) if err == nil { t.Fatal("expected error but succeeded") } msg := "invalid server identity token" if !strings.Contains(err.Error(), msg) { t.Fatalf("bad error message, %v, did not have %q", err, msg) } } func TestMapTokenDeferredError(t *testing.T) { file := "/tmp/token" s1 := newToken() err := ioutil.WriteFile(file, []byte(s1), 0644) if err != nil { t.Fatal(err) } defer os.Remove(file) ft, err := NewFileToken(file, true, time.Second) if err != nil { t.Fatal(err) } defer ft.Close() os.Remove(file) time.Sleep(time.Second + 100*time.Millisecond) _, err = ft.TokenValue() if err == nil { t.Fatal("expected token error, but succeeded") } } func TestMapTokenNoRefresh(t *testing.T) { file := "/tmp/token" s1 := newToken() err := ioutil.WriteFile(file, []byte(s1), 0644) if err != nil { t.Fatal(err) } defer os.Remove(file) ft, err := NewFileToken(file, true, 0) if err != nil { t.Fatal(err) } defer ft.Close() os.Remove(file) time.Sleep(time.Second + 100*time.Millisecond) _, err = ft.TokenValue() if err != nil { t.Fatal(err) } }
go
Frankly, this designation is a bit odd. Even though Ghost has been openly courting defectors—the company has a concierge service to entice writers looking to switch—it’s not exactly a one-to-one Substack substitute. Newsletters are Substack’s core product. Not so for Ghost, which was originally envisioned as a snazzier version of WordPress when it was funded through a Kickstarter campaign in 2013. Unlike the VC-fueled Substack, Ghost is a bootstrapped affair, with a lean staff of two dozen scattered around the globe. The business models of Substack and Ghost are also completely different. Rather than take a cut of subscriber revenue like Substack, Ghost’s paid hosting service, Ghost Pro, takes a fee, starting at $9 a month. (The figure varies depending on how many readers a publication has.) Its free-spirited CEO and cofounder John O’Nolan, who uploaded videos of his nomadic lifestyle to YouTube for many years, is currently camped out in Florida. With no investors, he feels no pressure to scale up quickly. Ghost has definitely grown since 2013—its paying customers include Tinder and OkCupid, so there’s a chance you could get ghosted on a dating app that uses Ghost, and its software has been installed more than 2.5 million times—but the nonprofit simply isn’t trying to operate with the same never-stop-scaling! mindset that guides so many digital-media startups flush with Silicon Valley cash. Also, Ghost is open source, which means anyone, anywhere can use it how they see fit, provided they know how to host their own website. While Ghost Pro does have a content-moderation policy (basic stuff—no porn or phishing schemes allowed), the vast majority of Ghost users go the free route, leaving them thoroughly unmoderated. Basically, Ghost could be home to the exact same content driving people off Substack. Or worse. “We have absolutely no ability to control how Ghost is used,” O’Nolan says. Why, then, did Ghost become the go-to for people looking to abandon Substack? When asked, writers who made the switch had a few answers for why no-moderation Ghost is seen as more virtuous than light-moderation Substack. For starters, Ghost’s nonprofit status gives its reputation a squeaky-clean shine. But more important, Ghost knows what it is and what it is not—and it’s not a publication. One of the main reasons Substack has received so much blowback is because of Substack Pro, its program that pays well-known writers eye-popping sums to create newsletters. To be clear, Linehan is not one of these writers. Still, the existence of this program suggests to many critics that Substack, whether it will admit it or not, is a publisher as well as a platform. Paying writers is, after all, an editorial choice. “Substack has staked out a stance on moderation,” says progressive political consultant Aaron Huertas, who recently moved his writing from Medium to Ghost. “If you’re going to have a policy, you should actually enforce it.” (Asked to comment, a Substack spokesperson said, “Advances have nothing to do with particular viewpoints or moderation decisions. We’re strong supporters of a free press and the open exchange of ideas, so we don’t influence anyone’s writing and we take a light touch with moderation.”) Ghost, which does not pay any of its writers or attempt curation, doesn’t occupy the same gray area between platform and publisher that Substack does. So new converts don’t necessarily expect it to behave in the same way they wanted Substack to behave. “The way Ghost works is different from the way that Substack works,” Yanyi says. A number of new Ghost-adjacent services have recently cropped up to help people who like the idea of Ghost but who don’t necessarily want to take up coding. For example, Outpost, which was created by former WIRED editor Ryan Singel, is a media co-op built on top of Ghost, offering hand-holding for writers and publishers who like the idea of Ghost but not the whole DIY element. According to veteran investigative journalist David Sirota, this type of service can still save money. After he migrated his indie newsroom The Daily Poster from Substack to Ghost using Outpost, he found paying for both services was the better financial choice than Substack’s revenue-sharing model. “We have substantially reduced our overhead costs to the tune of at least 50 percent,” he says. Controversies fade, but Ghost has a promising future even if it runs out of Substack writers to convert. The nature of its slow-and-steady, independent project means that it stands an especially strong chance of being around the next time another publishing startup pisses people off. And by studiously avoiding any behavior that could get it pegged as a publisher, it may be able to sidestep future debates about moderation. Also, the appeal of durability in digital publishing cannot be overstated—most of us who have been on the internet for decades know how often one-time big-shot platforms fade away and shutter, leaving their users scrambling to preserve a record. Although it’s named after a single phantom, Ghost’s real appeal lies in the fact that it has not yet disappeared. - 📩 The latest on tech, science, and more: Get our newsletters! - Covid forced the US to make more stuff. What happens now? - How do people actually catch baseballs?
english
<filename>Front-End Basics Sept 2020/07. Responsive Design/07.Media-Queries-Exercise-Resources/L8_05_Responsive-forms/style.css @import "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css"; * { box-sizing: border-box; } *::after, *::before { box-sizing: border-box; } html { font-size: 18px; font-family: Sans-Serif; } body { margin: 0; background-color: rgb(255, 255, 255); } li { list-style: none outside; } a { color: white; text-decoration: none; } .page-container { max-width: 1000px; margin: 0 auto; padding: 80px 0px; } form { width: 50%; margin: 0 auto; } fieldset { background: #F8F8F8; border: 1px solid #ccc; border-top: 1px solid black; border-radius: 0.2em; padding: 1.5em; padding-left: 0; box-shadow: 0 2px 5px 1px rgba(0, 0, 0, 0.1); } p { display: inline-block; margin-left: 1.5em; margin-right: 0.5em; width: 20%; } input { background: white; border: none; border-radius: 3px; border: 1px solid #ccc; padding: 0.3em; width: 70%; } input[type="submit"] { background: #2D2D2D; color: white; font-weight: 600; padding: 0.5em 1em; border: none; border-radius: 0.3em; margin-left: 2em; width: 19%; } p { font-weight: 600; } legend { padding: 0.5em 2em; border: 1px solid #ccc; border-bottom: 1px solid black; border-radius: 0.2em; margin-left: 0; background: white; width: 200px; box-shadow: 0 2px 5px 1px rgba(0, 0, 0, 0.2); }
css
India seamer Irfan Pathan said he will miss Sachin Tendulkar's valuable tips at mid-on or mid-off while taking his run up after the veteran bids goodbye following his last Test against the West Indies next month. India seamer Irfan Pathan said he will miss Sachin Tendulkar‘s valuable tips at mid-on or mid-off while taking his run up after the veteran bids goodbye following his last Test against the West Indies next month. “At the start of my career, he has helped me a lot. Whenever I used to bowl, he used to tell me what length to bowl for a reverse swing,” said Pathan. “I have learnt a lot from him. Not just bowling, I have learnt a lot about batting too. I have seen him closely for nine years in the dressing room and [observed] how he carries himself and how he behaves off the field. He is an ideal role model for all the cricketers. “I will miss all these. But definitely on the field, I would miss the big cricketer at mid-on, mid-off,” he added. He hoped the crowd give Tendulkar the best-ever farewell. “No one even came close to it [200 Test matches]. It will be a huge event. I really hope that the crowd give him the best send off any player would have got, as he deserves that. I hope it becomes the biggest event when he plays his 200th game,” Pathan told reporters at the sidelines of the Reliance 2013 India Junior and Cadet Open event. Asked how he reacted to the news of Tendulkar’s retirement, the 28-year-old said, “When you hear it for the first time, when he announced his retirement, a player like Sachin Tendulkar, who has given so much not only to Indian cricketers but the people around the world, you do feel sad. I felt sad when I heard it. “But somewhere you realise a day would come, and thinking of that was frightening. Now that the day is going to come soon, it is a disappointing news,” he said. “His memories will always bring us cheer. It is sad for cricket loving people but when he is quitting, he is spreading happiness,” Pathan added. The Baroda all-rounder was ruled out of the recent NKP Salve Challenger Trophy due to a rib injury and Pathan said he was planning to hire a personal physio to prevent injuries. “I am planning to hire a physio who can look after me. This year I had two injuries. That injuries have come at a time when I was going to the next level of my career. I will make sure that I will be fit within a month and I will start getting back to playing Ranji trophy. “I should be fit in 3-4 weeks. I will start bowling after two or two-and-a-half weeks. The second or third Ranji match [for Baroda], I should be playing,” said Pathan. “I will make sure that I play a lot of matches and get fit and try to make a comeback. That’s why I am thinking of getting a physio who can personally look after me throughout the year. I don’t want unnecessary injuries. That will be a good investment for me as he will know my body and can actually be there on a regular call,” he explained. The left-arm seamer said a bowler required special attention while playing the Ranji Trophy matches. “I really think there is a big difference when you play international cricket or IPL and when you play domestic Ranji trophy cricket. It is tiring because you play every third or fourth day and its a four-day game. So you need a lot of attention, especially the fast bowlers,” he said. India lost the first game of the seven-match ODI series at Pune by 72 runs on Sunday.
english
<filename>modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeClientCodegenTest.java package org.openapitools.codegen.typescript.typescriptnode; import org.openapitools.codegen.languages.TypeScriptNodeClientCodegen; import org.testng.Assert; import org.testng.annotations.Test; public class TypeScriptNodeClientCodegenTest { @Test public void convertVarName() throws Exception { TypeScriptNodeClientCodegen codegen = new TypeScriptNodeClientCodegen(); Assert.assertEquals(codegen.toVarName("name"), "name"); Assert.assertEquals(codegen.toVarName("$name"), "$name"); Assert.assertEquals(codegen.toVarName("nam$$e"), "nam$$e"); Assert.assertEquals(codegen.toVarName("user-name"), "userName"); Assert.assertEquals(codegen.toVarName("user_name"), "userName"); Assert.assertEquals(codegen.toVarName("user|name"), "userName"); Assert.assertEquals(codegen.toVarName("user !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~name"), "user$Name"); } }
java
{"status":200,"data":{"totalSubs":187,"subsInEachSource":{"feedly":137,"inoreader":47,"feedsPub":3},"failedSources":{}},"lastModified":1609061555724}
json
, is one of Tollywood's most prolific actors, having acted in more than 350 movies. He is credited with introducing many firsts in Telugu film Industry like the first Colour movie, the first Cinemascope movie, the first 70mm movie, and the first Cowboy movie. He has also directed seventeen feature films. . Legendary actor and Super Star Krishna Ghattamaneni passed away in the early morning of November 15th, 2022. After suffering a severe cardiac arrest, he was admitted to Continental Hospital in Hyderabad on November 14th. He was 79 years old.
english
<gh_stars>1-10 /* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ 'use strict'; const msRest = require('ms-rest'); const WebResource = msRest.WebResource; /** * Registers a user for an existing device * * @param {string} userId The ID of the user * * @param {object} body The device info. * * @param {string} body.udid The Unique Device IDentifier of the device * * @param {string} body.model The model identifier of the device, in the format * iDeviceM,N * * @param {string} [body.osBuild] The build number of the last known OS version * running on the device * * @param {string} [body.osVersion] The last known OS version running on the * device * * @param {string} [body.serial] The device's serial number. Always empty or * undefined at present. * * @param {string} [body.imei] The device's International Mobile Equipment * Identity number. Always empty or undefined at present. * * @param {string} [body.ownerId] The user ID of the device owner. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} callback - The callback. * * @returns {function} callback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ function _registerUserForDevice(userId, body, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { callback = options; options = null; } if (!callback) { throw new Error('callback cannot be null.'); } // Validate try { if (userId === null || userId === undefined || typeof userId.valueOf() !== 'string') { throw new Error('userId cannot be null or undefined and it must be of type string.'); } if (body === null || body === undefined) { throw new Error('body cannot be null or undefined.'); } } catch (error) { return callback(error); } // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'v0.1/users/{user_id}/devices/register'; requestUrl = requestUrl.replace('{user_id}', encodeURIComponent(userId)); // Create HTTP transport objects let httpRequest = new WebResource(); httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if(options) { for(let headerName in options['customHeaders']) { if (options['customHeaders'].hasOwnProperty(headerName)) { httpRequest.headers[headerName] = options['customHeaders'][headerName]; } } } // Serialize Request let requestContent = null; let requestModel = null; try { if (body !== null && body !== undefined) { let requestModelMapper = new client.models['DeviceInfoRequest']().mapper(); requestModel = client.serialize(requestModelMapper, body, 'body'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + `payload - ${JSON.stringify(body, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; if (statusCode !== 200 && statusCode !== 404) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); error.response = msRest.stripResponse(response); if (responseBody === '') responseBody = null; let parsedErrorResponse; try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { let internalError = null; if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; error.code = internalError ? internalError.code : parsedErrorResponse.code; error.message = internalError ? internalError.message : parsedErrorResponse.message; } } catch (defaultError) { error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + `- "${responseBody}" for the default response.`; return callback(error); } return callback(error); } // Create Result let result = null; if (responseBody === '') responseBody = null; // Deserialize Response if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['DeviceInfoResponse']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError.request = msRest.stripRequest(httpRequest); deserializationError.response = msRest.stripResponse(response); return callback(deserializationError); } } // Deserialize Response if (statusCode === 404) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ErrorDetails']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError1.request = msRest.stripRequest(httpRequest); deserializationError1.response = msRest.stripResponse(response); return callback(deserializationError1); } } return callback(null, result, httpRequest, response); }); } /** * Returns the device details. * * @param {string} deviceUdid The UDID of the device * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} callback - The callback. * * @returns {function} callback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ function _deviceDetails(deviceUdid, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { callback = options; options = null; } if (!callback) { throw new Error('callback cannot be null.'); } // Validate try { if (deviceUdid === null || deviceUdid === undefined || typeof deviceUdid.valueOf() !== 'string') { throw new Error('deviceUdid cannot be null or undefined and it must be of type string.'); } } catch (error) { return callback(error); } // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'v0.1/user/devices/{device_udid}'; requestUrl = requestUrl.replace('{device_udid}', encodeURIComponent(deviceUdid)); // Create HTTP transport objects let httpRequest = new WebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if(options) { for(let headerName in options['customHeaders']) { if (options['customHeaders'].hasOwnProperty(headerName)) { httpRequest.headers[headerName] = options['customHeaders'][headerName]; } } } httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; if (statusCode !== 200 && statusCode !== 400 && statusCode !== 403 && statusCode !== 404) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); error.response = msRest.stripResponse(response); if (responseBody === '') responseBody = null; let parsedErrorResponse; try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { let internalError = null; if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; error.code = internalError ? internalError.code : parsedErrorResponse.code; error.message = internalError ? internalError.message : parsedErrorResponse.message; } } catch (defaultError) { error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + `- "${responseBody}" for the default response.`; return callback(error); } return callback(error); } // Create Result let result = null; if (responseBody === '') responseBody = null; // Deserialize Response if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['DeviceInfoResponse']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError.request = msRest.stripRequest(httpRequest); deserializationError.response = msRest.stripResponse(response); return callback(deserializationError); } } // Deserialize Response if (statusCode === 400) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ErrorDetails']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError1.request = msRest.stripRequest(httpRequest); deserializationError1.response = msRest.stripResponse(response); return callback(deserializationError1); } } // Deserialize Response if (statusCode === 403) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ErrorDetails']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError2 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError2.request = msRest.stripRequest(httpRequest); deserializationError2.response = msRest.stripResponse(response); return callback(deserializationError2); } } // Deserialize Response if (statusCode === 404) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ErrorDetails']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError3 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError3.request = msRest.stripRequest(httpRequest); deserializationError3.response = msRest.stripResponse(response); return callback(deserializationError3); } } return callback(null, result, httpRequest, response); }); } /** * Removes an existing device from a user * * @param {string} deviceUdid The UDID of the device * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} callback - The callback. * * @returns {function} callback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * See {@link ErrorDetails} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ function _removeUserDevice(deviceUdid, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { callback = options; options = null; } if (!callback) { throw new Error('callback cannot be null.'); } // Validate try { if (deviceUdid === null || deviceUdid === undefined || typeof deviceUdid.valueOf() !== 'string') { throw new Error('deviceUdid cannot be null or undefined and it must be of type string.'); } } catch (error) { return callback(error); } // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'v0.1/user/devices/{device_udid}'; requestUrl = requestUrl.replace('{device_udid}', encodeURIComponent(deviceUdid)); // Create HTTP transport objects let httpRequest = new WebResource(); httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if(options) { for(let headerName in options['customHeaders']) { if (options['customHeaders'].hasOwnProperty(headerName)) { httpRequest.headers[headerName] = options['customHeaders'][headerName]; } } } httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; if (statusCode !== 200 && statusCode !== 403 && statusCode !== 404) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); error.response = msRest.stripResponse(response); if (responseBody === '') responseBody = null; let parsedErrorResponse; try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { let internalError = null; if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; error.code = internalError ? internalError.code : parsedErrorResponse.code; error.message = internalError ? internalError.message : parsedErrorResponse.message; } } catch (defaultError) { error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + `- "${responseBody}" for the default response.`; return callback(error); } return callback(error); } // Create Result let result = null; if (responseBody === '') responseBody = null; // Deserialize Response if (statusCode === 403) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ErrorDetails']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError.request = msRest.stripRequest(httpRequest); deserializationError.response = msRest.stripResponse(response); return callback(deserializationError); } } // Deserialize Response if (statusCode === 404) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ErrorDetails']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError1.request = msRest.stripRequest(httpRequest); deserializationError1.response = msRest.stripResponse(response); return callback(deserializationError1); } } return callback(null, result, httpRequest, response); }); } /** * Returns all devices associated with the given user. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} callback - The callback. * * @returns {function} callback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ function _userDevicesList(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { callback = options; options = null; } if (!callback) { throw new Error('callback cannot be null.'); } // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'v0.1/user/devices'; // Create HTTP transport objects let httpRequest = new WebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if(options) { for(let headerName in options['customHeaders']) { if (options['customHeaders'].hasOwnProperty(headerName)) { httpRequest.headers[headerName] = options['customHeaders'][headerName]; } } } httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; if (statusCode !== 200 && statusCode !== 400 && statusCode !== 403 && statusCode !== 404) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); error.response = msRest.stripResponse(response); if (responseBody === '') responseBody = null; let parsedErrorResponse; try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { let internalError = null; if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; error.code = internalError ? internalError.code : parsedErrorResponse.code; error.message = internalError ? internalError.message : parsedErrorResponse.message; } } catch (defaultError) { error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + `- "${responseBody}" for the default response.`; return callback(error); } return callback(error); } // Create Result let result = null; if (responseBody === '') responseBody = null; // Deserialize Response if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = { required: false, serializedName: 'parsedResponse', type: { name: 'Sequence', element: { required: false, serializedName: 'DeviceInfoResponseElementType', type: { name: 'Composite', className: 'DeviceInfoResponse' } } } }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError.request = msRest.stripRequest(httpRequest); deserializationError.response = msRest.stripResponse(response); return callback(deserializationError); } } // Deserialize Response if (statusCode === 400) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ErrorDetails']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError1.request = msRest.stripRequest(httpRequest); deserializationError1.response = msRest.stripResponse(response); return callback(deserializationError1); } } // Deserialize Response if (statusCode === 403) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ErrorDetails']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError2 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError2.request = msRest.stripRequest(httpRequest); deserializationError2.response = msRest.stripResponse(response); return callback(deserializationError2); } } // Deserialize Response if (statusCode === 404) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ErrorDetails']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError3 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError3.request = msRest.stripRequest(httpRequest); deserializationError3.response = msRest.stripResponse(response); return callback(deserializationError3); } } return callback(null, result, httpRequest, response); }); } /** * Returns the resign status to the caller * * @param {string} releaseId The ID of the release. * * @param {string} resignId The ID of the resign operation. * * @param {string} ownerName The name of the owner * * @param {string} appName The name of the application * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.includeProvisioningProfile] A boolean value that * indicates if the provisioning profile should be return in addition to the * status. When set to true, the provisioning profile will be returned only * when status is 'complete' or 'preparing_for_testers'. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} callback - The callback. * * @returns {function} callback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ function _getReleaseUpdateDevicesStatus(releaseId, resignId, ownerName, appName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { callback = options; options = null; } if (!callback) { throw new Error('callback cannot be null.'); } let includeProvisioningProfile = (options && options.includeProvisioningProfile !== undefined) ? options.includeProvisioningProfile : undefined; // Validate try { if (releaseId === null || releaseId === undefined || typeof releaseId.valueOf() !== 'string') { throw new Error('releaseId cannot be null or undefined and it must be of type string.'); } if (resignId === null || resignId === undefined || typeof resignId.valueOf() !== 'string') { throw new Error('resignId cannot be null or undefined and it must be of type string.'); } if (includeProvisioningProfile !== null && includeProvisioningProfile !== undefined && typeof includeProvisioningProfile !== 'boolean') { throw new Error('includeProvisioningProfile must be of type boolean.'); } if (ownerName === null || ownerName === undefined || typeof ownerName.valueOf() !== 'string') { throw new Error('ownerName cannot be null or undefined and it must be of type string.'); } if (appName === null || appName === undefined || typeof appName.valueOf() !== 'string') { throw new Error('appName cannot be null or undefined and it must be of type string.'); } } catch (error) { return callback(error); } // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'v0.1/apps/{owner_name}/{app_name}/releases/{release_id}/update_devices/{resign_id}'; requestUrl = requestUrl.replace('{release_id}', encodeURIComponent(releaseId)); requestUrl = requestUrl.replace('{resign_id}', encodeURIComponent(resignId)); requestUrl = requestUrl.replace('{owner_name}', encodeURIComponent(ownerName)); requestUrl = requestUrl.replace('{app_name}', encodeURIComponent(appName)); let queryParameters = []; if (includeProvisioningProfile !== null && includeProvisioningProfile !== undefined) { queryParameters.push('include_provisioning_profile=' + encodeURIComponent(includeProvisioningProfile.toString())); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } // Create HTTP transport objects let httpRequest = new WebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if(options) { for(let headerName in options['customHeaders']) { if (options['customHeaders'].hasOwnProperty(headerName)) { httpRequest.headers[headerName] = options['customHeaders'][headerName]; } } } httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; if (statusCode !== 200 && statusCode !== 400 && statusCode !== 404) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); error.response = msRest.stripResponse(response); if (responseBody === '') responseBody = null; let parsedErrorResponse; try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { let internalError = null; if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; error.code = internalError ? internalError.code : parsedErrorResponse.code; error.message = internalError ? internalError.message : parsedErrorResponse.message; } } catch (defaultError) { error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + `- "${responseBody}" for the default response.`; return callback(error); } return callback(error); } // Create Result let result = null; if (responseBody === '') responseBody = null; // Deserialize Response if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ResignStatus']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError.request = msRest.stripRequest(httpRequest); deserializationError.response = msRest.stripResponse(response); return callback(deserializationError); } } // Deserialize Response if (statusCode === 400) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ErrorDetails']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError1.request = msRest.stripRequest(httpRequest); deserializationError1.response = msRest.stripResponse(response); return callback(deserializationError1); } } // Deserialize Response if (statusCode === 404) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ErrorDetails']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError2 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError2.request = msRest.stripRequest(httpRequest); deserializationError2.response = msRest.stripResponse(response); return callback(deserializationError2); } } return callback(null, result, httpRequest, response); }); } /** * Returns all devices associated with the given distribution group. * * @param {string} distributionGroupName The name of the distribution group. * * @param {string} ownerName The name of the owner * * @param {string} appName The name of the application * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.unprovisionedOnly] when true, filters out * provisioned devices * * @param {array} [options.udids] multiple UDIDs which should be part of the * resulting CSV. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} callback - The callback. * * @returns {function} callback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ function _listCsvFormat(distributionGroupName, ownerName, appName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { callback = options; options = null; } if (!callback) { throw new Error('callback cannot be null.'); } let unprovisionedOnly = (options && options.unprovisionedOnly !== undefined) ? options.unprovisionedOnly : false; let udids = (options && options.udids !== undefined) ? options.udids : undefined; // Validate try { if (distributionGroupName === null || distributionGroupName === undefined || typeof distributionGroupName.valueOf() !== 'string') { throw new Error('distributionGroupName cannot be null or undefined and it must be of type string.'); } if (unprovisionedOnly !== null && unprovisionedOnly !== undefined && typeof unprovisionedOnly !== 'boolean') { throw new Error('unprovisionedOnly must be of type boolean.'); } if (Array.isArray(udids)) { for (let i = 0; i < udids.length; i++) { if (udids[i] !== null && udids[i] !== undefined && typeof udids[i].valueOf() !== 'string') { throw new Error('udids[i] must be of type string.'); } } } if (ownerName === null || ownerName === undefined || typeof ownerName.valueOf() !== 'string') { throw new Error('ownerName cannot be null or undefined and it must be of type string.'); } if (appName === null || appName === undefined || typeof appName.valueOf() !== 'string') { throw new Error('appName cannot be null or undefined and it must be of type string.'); } } catch (error) { return callback(error); } // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'v0.1/apps/{owner_name}/{app_name}/distribution_groups/{distribution_group_name}/devices/download_devices_list'; requestUrl = requestUrl.replace('{distribution_group_name}', encodeURIComponent(distributionGroupName)); requestUrl = requestUrl.replace('{owner_name}', encodeURIComponent(ownerName)); requestUrl = requestUrl.replace('{app_name}', encodeURIComponent(appName)); let queryParameters = []; if (unprovisionedOnly !== null && unprovisionedOnly !== undefined) { queryParameters.push('unprovisioned_only=' + encodeURIComponent(unprovisionedOnly.toString())); } if (udids !== null && udids !== undefined) { queryParameters.push('udids=' + encodeURIComponent(udids.join(','))); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } // Create HTTP transport objects let httpRequest = new WebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if(options) { for(let headerName in options['customHeaders']) { if (options['customHeaders'].hasOwnProperty(headerName)) { httpRequest.headers[headerName] = options['customHeaders'][headerName]; } } } httpRequest.body = null; // Send Request httpRequest.streamedResponse = true; return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; if (statusCode !== 200 && statusCode !== 400 && statusCode !== 404 && statusCode !== 500) { let error = new Error(`Unexpected status code: ${statusCode}`); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); error.response = msRest.stripResponse(response); if (responseBody === '') responseBody = null; let parsedErrorResponse; try { if (responseBody !== undefined) parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { let internalError = null; if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; error.code = internalError ? internalError.code : parsedErrorResponse.code; error.message = internalError ? internalError.message : parsedErrorResponse.message; } } catch (defaultError) { error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + `- "${responseBody}" for the default response.`; return callback(error); } return callback(error); } // Create Result let result = response; return callback(null, result, httpRequest, response); }); } /** * Returns all devices associated with the given distribution group * * @param {string} distributionGroupName The name of the distribution group. * * @param {string} ownerName The name of the owner * * @param {string} appName The name of the application * * @param {object} [options] Optional Parameters. * * @param {number} [options.releaseId] when provided, gets the provisioning * state of the devices owned by users of this distribution group when compared * to the provided release. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} callback - The callback. * * @returns {function} callback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ function _list(distributionGroupName, ownerName, appName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { callback = options; options = null; } if (!callback) { throw new Error('callback cannot be null.'); } let releaseId = (options && options.releaseId !== undefined) ? options.releaseId : undefined; // Validate try { if (distributionGroupName === null || distributionGroupName === undefined || typeof distributionGroupName.valueOf() !== 'string') { throw new Error('distributionGroupName cannot be null or undefined and it must be of type string.'); } if (releaseId !== null && releaseId !== undefined && typeof releaseId !== 'number') { throw new Error('releaseId must be of type number.'); } if (ownerName === null || ownerName === undefined || typeof ownerName.valueOf() !== 'string') { throw new Error('ownerName cannot be null or undefined and it must be of type string.'); } if (appName === null || appName === undefined || typeof appName.valueOf() !== 'string') { throw new Error('appName cannot be null or undefined and it must be of type string.'); } } catch (error) { return callback(error); } // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'v0.1/apps/{owner_name}/{app_name}/distribution_groups/{distribution_group_name}/devices'; requestUrl = requestUrl.replace('{distribution_group_name}', encodeURIComponent(distributionGroupName)); requestUrl = requestUrl.replace('{owner_name}', encodeURIComponent(ownerName)); requestUrl = requestUrl.replace('{app_name}', encodeURIComponent(appName)); let queryParameters = []; if (releaseId !== null && releaseId !== undefined) { queryParameters.push('release_id=' + encodeURIComponent(releaseId.toString())); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } // Create HTTP transport objects let httpRequest = new WebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if(options) { for(let headerName in options['customHeaders']) { if (options['customHeaders'].hasOwnProperty(headerName)) { httpRequest.headers[headerName] = options['customHeaders'][headerName]; } } } httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; if (statusCode !== 200 && statusCode !== 400 && statusCode !== 404) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); error.response = msRest.stripResponse(response); if (responseBody === '') responseBody = null; let parsedErrorResponse; try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { let internalError = null; if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; error.code = internalError ? internalError.code : parsedErrorResponse.code; error.message = internalError ? internalError.message : parsedErrorResponse.message; } } catch (defaultError) { error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + `- "${responseBody}" for the default response.`; return callback(error); } return callback(error); } // Create Result let result = null; if (responseBody === '') responseBody = null; // Deserialize Response if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = { required: false, serializedName: 'parsedResponse', type: { name: 'Sequence', element: { required: false, serializedName: 'DeviceInfoResponseElementType', type: { name: 'Composite', className: 'DeviceInfoResponse' } } } }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError.request = msRest.stripRequest(httpRequest); deserializationError.response = msRest.stripResponse(response); return callback(deserializationError); } } // Deserialize Response if (statusCode === 400) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ErrorDetails']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError1.request = msRest.stripRequest(httpRequest); deserializationError1.response = msRest.stripResponse(response); return callback(deserializationError1); } } // Deserialize Response if (statusCode === 404) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ErrorDetails']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError2 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError2.request = msRest.stripRequest(httpRequest); deserializationError2.response = msRest.stripResponse(response); return callback(deserializationError2); } } return callback(null, result, httpRequest, response); }); } /** * **Warning, this operation is not reversible.** * * A successful call to this API will permanently stop ingesting any logs * received via SDK for the given installation ID, and cannot be restored. We * advise caution when using this API, it is designed to permanently disable * collection from a specific installation of the app on a device, usually * following the request from a user. * * * @param {string} installId The id of the device * * @param {string} ownerName The name of the owner * * @param {string} appName The name of the application * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} callback - The callback. * * @returns {function} callback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {string} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ function _blockLogs(installId, ownerName, appName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { callback = options; options = null; } if (!callback) { throw new Error('callback cannot be null.'); } // Validate try { if (installId === null || installId === undefined || typeof installId.valueOf() !== 'string') { throw new Error('installId cannot be null or undefined and it must be of type string.'); } if (ownerName === null || ownerName === undefined || typeof ownerName.valueOf() !== 'string') { throw new Error('ownerName cannot be null or undefined and it must be of type string.'); } if (appName === null || appName === undefined || typeof appName.valueOf() !== 'string') { throw new Error('appName cannot be null or undefined and it must be of type string.'); } } catch (error) { return callback(error); } // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'v0.1/apps/{owner_name}/{app_name}/devices/block_logs/{install_id}'; requestUrl = requestUrl.replace('{install_id}', encodeURIComponent(installId)); requestUrl = requestUrl.replace('{owner_name}', encodeURIComponent(ownerName)); requestUrl = requestUrl.replace('{app_name}', encodeURIComponent(appName)); // Create HTTP transport objects let httpRequest = new WebResource(); httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if(options) { for(let headerName in options['customHeaders']) { if (options['customHeaders'].hasOwnProperty(headerName)) { httpRequest.headers[headerName] = options['customHeaders'][headerName]; } } } httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); error.response = msRest.stripResponse(response); if (responseBody === '') responseBody = null; let parsedErrorResponse; try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { let internalError = null; if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; error.code = internalError ? internalError.code : parsedErrorResponse.code; error.message = internalError ? internalError.message : parsedErrorResponse.message; } } catch (defaultError) { error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + `- "${responseBody}" for the default response.`; return callback(error); } return callback(error); } // Create Result let result = null; if (responseBody === '') responseBody = null; // Deserialize Response if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = { required: false, serializedName: 'parsedResponse', type: { name: 'String' } }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError.request = msRest.stripRequest(httpRequest); deserializationError.response = msRest.stripResponse(response); return callback(deserializationError); } } return callback(null, result, httpRequest, response); }); } /** Class representing a Devices. */ class Devices { /** * Create a Devices. * @param {AppCenterClient} client Reference to the service client. */ constructor(client) { this.client = client; this._registerUserForDevice = _registerUserForDevice; this._deviceDetails = _deviceDetails; this._removeUserDevice = _removeUserDevice; this._userDevicesList = _userDevicesList; this._getReleaseUpdateDevicesStatus = _getReleaseUpdateDevicesStatus; this._listCsvFormat = _listCsvFormat; this._list = _list; this._blockLogs = _blockLogs; } /** * Registers a user for an existing device * * @param {string} userId The ID of the user * * @param {object} body The device info. * * @param {string} body.udid The Unique Device IDentifier of the device * * @param {string} body.model The model identifier of the device, in the format * iDeviceM,N * * @param {string} [body.osBuild] The build number of the last known OS version * running on the device * * @param {string} [body.osVersion] The last known OS version running on the * device * * @param {string} [body.serial] The device's serial number. Always empty or * undefined at present. * * @param {string} [body.imei] The device's International Mobile Equipment * Identity number. Always empty or undefined at present. * * @param {string} [body.ownerId] The user ID of the device owner. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<Object>} - The deserialized result object. * * @reject {Error} - The error object. */ registerUserForDeviceWithHttpOperationResponse(userId, body, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { self._registerUserForDevice(userId, body, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } return; }); }); } /** * Registers a user for an existing device * * @param {string} userId The ID of the user * * @param {object} body The device info. * * @param {string} body.udid The Unique Device IDentifier of the device * * @param {string} body.model The model identifier of the device, in the format * iDeviceM,N * * @param {string} [body.osBuild] The build number of the last known OS version * running on the device * * @param {string} [body.osVersion] The last known OS version running on the * device * * @param {string} [body.serial] The device's serial number. Always empty or * undefined at present. * * @param {string} [body.imei] The device's International Mobile Equipment * Identity number. Always empty or undefined at present. * * @param {string} [body.ownerId] The user ID of the device owner. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} [optionalCallback] - The optional callback. * * @returns {function|Promise} If a callback was passed as the last parameter * then it returns the callback else returns a Promise. * * {Promise} A promise is returned * * @resolve {Object} - The deserialized result object. * * @reject {Error} - The error object. * * {function} optionalCallback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ registerUserForDevice(userId, body, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { optionalCallback = options; options = null; } if (!optionalCallback) { return new Promise((resolve, reject) => { self._registerUserForDevice(userId, body, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { return self._registerUserForDevice(userId, body, options, optionalCallback); } } /** * Returns the device details. * * @param {string} deviceUdid The UDID of the device * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<Object>} - The deserialized result object. * * @reject {Error} - The error object. */ deviceDetailsWithHttpOperationResponse(deviceUdid, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { self._deviceDetails(deviceUdid, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } return; }); }); } /** * Returns the device details. * * @param {string} deviceUdid The UDID of the device * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} [optionalCallback] - The optional callback. * * @returns {function|Promise} If a callback was passed as the last parameter * then it returns the callback else returns a Promise. * * {Promise} A promise is returned * * @resolve {Object} - The deserialized result object. * * @reject {Error} - The error object. * * {function} optionalCallback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ deviceDetails(deviceUdid, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { optionalCallback = options; options = null; } if (!optionalCallback) { return new Promise((resolve, reject) => { self._deviceDetails(deviceUdid, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { return self._deviceDetails(deviceUdid, options, optionalCallback); } } /** * Removes an existing device from a user * * @param {string} deviceUdid The UDID of the device * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<ErrorDetails>} - The deserialized result object. * * @reject {Error} - The error object. */ removeUserDeviceWithHttpOperationResponse(deviceUdid, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { self._removeUserDevice(deviceUdid, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } return; }); }); } /** * Removes an existing device from a user * * @param {string} deviceUdid The UDID of the device * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} [optionalCallback] - The optional callback. * * @returns {function|Promise} If a callback was passed as the last parameter * then it returns the callback else returns a Promise. * * {Promise} A promise is returned * * @resolve {ErrorDetails} - The deserialized result object. * * @reject {Error} - The error object. * * {function} optionalCallback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * See {@link ErrorDetails} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ removeUserDevice(deviceUdid, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { optionalCallback = options; options = null; } if (!optionalCallback) { return new Promise((resolve, reject) => { self._removeUserDevice(deviceUdid, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { return self._removeUserDevice(deviceUdid, options, optionalCallback); } } /** * Returns all devices associated with the given user. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<Object>} - The deserialized result object. * * @reject {Error} - The error object. */ userDevicesListWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { self._userDevicesList(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } return; }); }); } /** * Returns all devices associated with the given user. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} [optionalCallback] - The optional callback. * * @returns {function|Promise} If a callback was passed as the last parameter * then it returns the callback else returns a Promise. * * {Promise} A promise is returned * * @resolve {Object} - The deserialized result object. * * @reject {Error} - The error object. * * {function} optionalCallback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ userDevicesList(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { optionalCallback = options; options = null; } if (!optionalCallback) { return new Promise((resolve, reject) => { self._userDevicesList(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { return self._userDevicesList(options, optionalCallback); } } /** * Returns the resign status to the caller * * @param {string} releaseId The ID of the release. * * @param {string} resignId The ID of the resign operation. * * @param {string} ownerName The name of the owner * * @param {string} appName The name of the application * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.includeProvisioningProfile] A boolean value that * indicates if the provisioning profile should be return in addition to the * status. When set to true, the provisioning profile will be returned only * when status is 'complete' or 'preparing_for_testers'. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<Object>} - The deserialized result object. * * @reject {Error} - The error object. */ getReleaseUpdateDevicesStatusWithHttpOperationResponse(releaseId, resignId, ownerName, appName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { self._getReleaseUpdateDevicesStatus(releaseId, resignId, ownerName, appName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } return; }); }); } /** * Returns the resign status to the caller * * @param {string} releaseId The ID of the release. * * @param {string} resignId The ID of the resign operation. * * @param {string} ownerName The name of the owner * * @param {string} appName The name of the application * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.includeProvisioningProfile] A boolean value that * indicates if the provisioning profile should be return in addition to the * status. When set to true, the provisioning profile will be returned only * when status is 'complete' or 'preparing_for_testers'. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} [optionalCallback] - The optional callback. * * @returns {function|Promise} If a callback was passed as the last parameter * then it returns the callback else returns a Promise. * * {Promise} A promise is returned * * @resolve {Object} - The deserialized result object. * * @reject {Error} - The error object. * * {function} optionalCallback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ getReleaseUpdateDevicesStatus(releaseId, resignId, ownerName, appName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { optionalCallback = options; options = null; } if (!optionalCallback) { return new Promise((resolve, reject) => { self._getReleaseUpdateDevicesStatus(releaseId, resignId, ownerName, appName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { return self._getReleaseUpdateDevicesStatus(releaseId, resignId, ownerName, appName, options, optionalCallback); } } /** * Returns all devices associated with the given distribution group. * * @param {string} distributionGroupName The name of the distribution group. * * @param {string} ownerName The name of the owner * * @param {string} appName The name of the application * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.unprovisionedOnly] when true, filters out * provisioned devices * * @param {array} [options.udids] multiple UDIDs which should be part of the * resulting CSV. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<Object>} - The deserialized result object. * * @reject {Error} - The error object. */ listCsvFormatWithHttpOperationResponse(distributionGroupName, ownerName, appName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { self._listCsvFormat(distributionGroupName, ownerName, appName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } return; }); }); } /** * Returns all devices associated with the given distribution group. * * @param {string} distributionGroupName The name of the distribution group. * * @param {string} ownerName The name of the owner * * @param {string} appName The name of the application * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.unprovisionedOnly] when true, filters out * provisioned devices * * @param {array} [options.udids] multiple UDIDs which should be part of the * resulting CSV. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} [optionalCallback] - The optional callback. * * @returns {function|Promise} If a callback was passed as the last parameter * then it returns the callback else returns a Promise. * * {Promise} A promise is returned * * @resolve {Object} - The deserialized result object. * * @reject {Error} - The error object. * * {function} optionalCallback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ listCsvFormat(distributionGroupName, ownerName, appName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { optionalCallback = options; options = null; } if (!optionalCallback) { return new Promise((resolve, reject) => { self._listCsvFormat(distributionGroupName, ownerName, appName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { return self._listCsvFormat(distributionGroupName, ownerName, appName, options, optionalCallback); } } /** * Returns all devices associated with the given distribution group * * @param {string} distributionGroupName The name of the distribution group. * * @param {string} ownerName The name of the owner * * @param {string} appName The name of the application * * @param {object} [options] Optional Parameters. * * @param {number} [options.releaseId] when provided, gets the provisioning * state of the devices owned by users of this distribution group when compared * to the provided release. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<Object>} - The deserialized result object. * * @reject {Error} - The error object. */ listWithHttpOperationResponse(distributionGroupName, ownerName, appName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { self._list(distributionGroupName, ownerName, appName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } return; }); }); } /** * Returns all devices associated with the given distribution group * * @param {string} distributionGroupName The name of the distribution group. * * @param {string} ownerName The name of the owner * * @param {string} appName The name of the application * * @param {object} [options] Optional Parameters. * * @param {number} [options.releaseId] when provided, gets the provisioning * state of the devices owned by users of this distribution group when compared * to the provided release. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} [optionalCallback] - The optional callback. * * @returns {function|Promise} If a callback was passed as the last parameter * then it returns the callback else returns a Promise. * * {Promise} A promise is returned * * @resolve {Object} - The deserialized result object. * * @reject {Error} - The error object. * * {function} optionalCallback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ list(distributionGroupName, ownerName, appName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { optionalCallback = options; options = null; } if (!optionalCallback) { return new Promise((resolve, reject) => { self._list(distributionGroupName, ownerName, appName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { return self._list(distributionGroupName, ownerName, appName, options, optionalCallback); } } /** * **Warning, this operation is not reversible.** * * A successful call to this API will permanently stop ingesting any logs * received via SDK for the given installation ID, and cannot be restored. We * advise caution when using this API, it is designed to permanently disable * collection from a specific installation of the app on a device, usually * following the request from a user. * * * @param {string} installId The id of the device * * @param {string} ownerName The name of the owner * * @param {string} appName The name of the application * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<String>} - The deserialized result object. * * @reject {Error} - The error object. */ blockLogsWithHttpOperationResponse(installId, ownerName, appName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { self._blockLogs(installId, ownerName, appName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } return; }); }); } /** * **Warning, this operation is not reversible.** * * A successful call to this API will permanently stop ingesting any logs * received via SDK for the given installation ID, and cannot be restored. We * advise caution when using this API, it is designed to permanently disable * collection from a specific installation of the app on a device, usually * following the request from a user. * * * @param {string} installId The id of the device * * @param {string} ownerName The name of the owner * * @param {string} appName The name of the application * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} [optionalCallback] - The optional callback. * * @returns {function|Promise} If a callback was passed as the last parameter * then it returns the callback else returns a Promise. * * {Promise} A promise is returned * * @resolve {String} - The deserialized result object. * * @reject {Error} - The error object. * * {function} optionalCallback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {string} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ blockLogs(installId, ownerName, appName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { optionalCallback = options; options = null; } if (!optionalCallback) { return new Promise((resolve, reject) => { self._blockLogs(installId, ownerName, appName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { return self._blockLogs(installId, ownerName, appName, options, optionalCallback); } } } module.exports = Devices;
javascript
Former Indian selector Pranab Roy has admitted that his decision to pick MS Dhoni in 2004 for the ODI series against Bangladesh is the best decision he made as a selector. He also weighed in on the captaincy debate and reaffirmed that MS Dhoni knows when to hand over the limited-overs captaincy to Virat Kohli in an interview with TOI. Before Dhoni was selected in 2004, there was huge debate as to who would be India’s wicketkeeper and take over from Rahul Dravid, who stepped in as a part-time keeper. After a lot of debate, the selectors led by Kiran More, picked Dhoni over Dinesh Karthik, Parthiv Patel and Deep Das Gupta, a scene which also appeared in Dhoni’s biopic, “MS Dhoni: The Untold Story”. Speaking about the selection meeting, Roy, who is currently playing the role of a match referee in the ongoing season of the Ranji Trophy, said: “Actually, there was two other names too that were discussed. Deep Das Gupta and Parthiv Patel. But the selectors stuck with Dhoni. Rahul Dravid had already carried on the role of a wicket-keeper batsman for a long time, thus we went with Dhoni. “Probably, the decision to back him during the selection (in 2004) is the best I have made as a selector,” he added. After Virat Kohli led India to another successful series at home and the No. 1 spot in Tests, the rumours surrounding him taking over from Dhoni have begun to circulate once again but Roy admitted that more than anyone else, Dhoni knows when to “hand the baton” over to his successor. "At the moment, there is no replacement for Dhoni in limited overs. He is too good a player and a leader. There is no need to think of changing captaincy. Dhoni knows when to hand the baton to Kohli," the 59-year-old said. The former Indian international admitted that he was “surprised” when Dhoni decided to retire from Test in the middle of the Test series against Australia in 2014/15, having followed the Indian limited-overs captain from his U-16 days. Despite his retirement from Tests, the 35-year-old continues to lead the limited-overs side and will look to take India to No. 3 with victory in the five-match ODI series against New Zealand, which begins on October 16.
english
h1 { color: #01AED9; font-family: arial; vertical-align: middle; } button { font-family: arial; height:40px; width:100px; } .health { border:.2em solid #01AED9; border-radius:8px; width:600px; padding:20px; } #healthdata { padding:20px; } .log { border:.2em solid #01AED9; border-radius:8px; width:600px; padding:20px; } .datatable tr { border: .2em solid #01AED9} table { border: .2em solid #01AED9; border-radius: 8px; border-collapse: collapse; } td { padding:20px; border:.1em solid black; }
css
A study has shown that sugary drinks can increase the risk of death. The research was conducted by Harvard University and has been published in the British Medical Journal. According to research, people with type 2 diabetes should avoid all sugary drinks, including soda drinks, energy drinks, and fruit drinks, because these people are more likely to die prematurely from heart disease. According to experts, 12,000 people participated in this research, and the consumption of common drinks was evaluated in relation to deaths and cardiovascular diseases. According to experts, research has shown that people who reduce their consumption of sugar-based products are less likely to die prematurely. Experts have asked to remove the lack of water in the body to prevent diseases, for which it has been advised to give up sugary drinks and prefer to drink plain water.
english
Registered candidates can download their hall ticket from the official website uppsc.up.nic.in using their login details. Uttar Pradesh Public Service Commission (UPPSC) has released the admit card for the UP Technical Education (Teaching) Service Examination 2021 for the Librarian, Chemical Engineering, Diary Engineering and Automotive Engineering exams. Registered candidates can download their hall ticket from the official website uppsc.up.nic.in using their login details. The exam for Librarian and other remaining posts is scheduled to be conducted on August 13, 2023. The UPPSC Technical Education Service Exam 2021 for Mechanical and Civil Engineering was held on December 22, 2021. The recruitment drive is being conducted to fill up a total of 1370 vacancies, of which 13 vacancies are for the post of Principal, 1039 for Lecturer, Engineering & Technical Branches, 16 for Workshop Superintendent, 87 for Librarian, and 215 for Lecturer (Non Engineering). Direct link to download admit card.
english
--- title: Ändra namnet på ett lokalt konto eller ett Microsoft-konto ms.author: pebaum author: pebaum manager: scotv ms.audience: Admin ms.topic: article ms.service: o365-administration ROBOTS: NOINDEX, NOFOLLOW localization_priority: Normal ms.collection: Adm_O365 ms.custom: - "9001440" - "3439" ms.openlocfilehash: 8c7d1d384548beef56dda7fb5793e66daf15d68fa6d27999b09a6321579dfff6 ms.sourcegitcommit: b5f7da89a650d2915dc652449623c78be6247175 ms.translationtype: MT ms.contentlocale: sv-SE ms.lasthandoff: 08/05/2021 ms.locfileid: "54017834" --- # <a name="change-the-name-of-a-local-account-or-a-microsoft-account"></a>Ändra namnet på ett lokalt konto eller ett Microsoft-konto Om du bara använder ett användarnamn och lösenord för att logga in Windows 10 loggar du in med ett lokalt konto. **Så här ändrar du namnet på ett lokalt konto:** 1. Klicka på **Start-knappen,** **skriv Kontrollpanelen** och **välj Kontrollpanelen** i listan med resultat. 2. Klicka **på Användarkonton** och sedan **på Ändra kontotyp.** 3. Välj det konto som du vill ändra, klicka **på** Egenskaper och ange sedan ett nytt namn för Användarnamn. 4. Klicka på **OK**. Om du använder en e-postadress och ett lösenord för att logga in använder du ett Microsoft-konto. **Så här ändrar du visningsnamnet för ditt Microsoft-konto:** Du använder ditt visningsnamn när du loggar in på ditt konto. Det är också det namn som visas på dina e Windows 10 enheter och det är namnet personer ser när du skickar e-postmeddelanden. Det här namnet kan skilja sig från det lokala kontots visningsnamn. Så här ändrar du visningsnamnet: 1. Logga in på sidan **Din info** på webbplatsen [för Microsoft-kontot.](https://account.microsoft.com/) 2. Klicka på Redigera namn **under ditt namn.** Om det inte finns något namn än klickar du på Lägg **till namn.** 3. Ange det namn du vill använda, skriv CAPTCHA och klicka på **Spara**. Namn tillåts inte om de innehåller blockerade ord eller fraser. Om ett felmeddelande visas när du skriver in ditt namn kan du prova med ett smeknamn istället. 4. Om visningsnamnet inte ändras direkt, eller om det gamla namnet fortfarande visas i e-postmeddelanden, kan informationen cachelagras. Om du vill uppdatera namnet snabbt kan du byta till ditt lokala konto och sedan [logga in på ditt Microsoft-konto igen.](https://account.microsoft.com/) Visningsnamnet ändrar inte din gamertag. Om du vill ha en ny gamertag kan du [gå till Ändra din Xbox-gamertag](https://support.xbox.com/id-ID/account-management/change-xbox-live-gamertag). **Så här ändrar du administratörsnamnet:** 1. Skriv Datorhantering i sökrutan i **Aktivitetsfältet och** välj det i listan. 2. Klicka på pilen bredvid Lokala **användare och grupper för att** expandera den. Klicka **på Användare.** 3. Högerklicka på Administratör **och klicka** på Byt **namn.** 4. Skriv ett nytt namn. Observera att du måste vara administratör för att ändra det här namnet. **Här är några andra användbara saker du kan ändra i ditt Microsoft-konto:** - [Vilka e-postadresser kan du använda för att logga in på ditt Microsoft-konto](https://support.microsoft.com/help/4026162) - [Vilka e-postadresser du kan använda för att skicka e-post](https://support.microsoft.com/help/12407) (genom att lägga till och hantera alias på ditt Microsoft-konto) - [Födelsedatum för ditt Microsoft-konto](https://support.microsoft.com/help/12411) - [Bild på ditt Microsoft-konto](https://support.microsoft.com/help/4026790) [Få mer hjälp med att konfigurera och hantera ditt Microsoft-konto](https://support.microsoft.com/hub/4294457/microsoft-account-help#manage-account)
markdown
Singer-actress Monica Dogra, who recently moderated a chat with American showbiz artiste Courtney Love in Mumbai, says she was over the moon to meet the globally known celebrity, who is an inspiration to her. In fact, Monica feels she has had a “relationship” with Love for years. “My relationship with Courtney Love as a persona, as a muse, as a rock n roll bada** is like decades long and that’s something that really inspires me about her. What I loved about meeting her was that she’s exactly what she is. You know the same Courtney that I’ve seen in interviews, it was the same Courtney that was sitting right in front of me,” Monica said in a statement. Monica was especially impressed by how Love “doesn’t adjust herself for situations”. Click for more updates and latest Bollywood news along with Entertainment updates. Also get latest news and top headlines from India and around the world at The Indian Express.
english
--- layout: default --- <header id="masthead" > <div class="overlay-layer-wrap"> <div class=" overlay-layer"> <div class="intro-section"> <h1 class="intro"> <NAME> </h1> </div> </div> </div> </header> <div class="section-gray"> <div class="container"> <div class="row main-info" > <div class="col-md-7 post rounded" > {% for post in site.posts limit:1 %} <h3> <a href="{{ post.url }}">{{ post.title }}</a> </h3> <img src="{{ post.preview-image }}" class="img-fluid" alt="Responsive image"> <div class="content"> {{ post.excerpt }} </div> {% endfor %} </div> <div class="col-md-5"> <div id="fb-root"></div> <script> (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <div class="fb-page" data-href="https://www.facebook.com/skisumavavimperk/" data-tabs="timeline" data-width="500" data-small-header="true" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="false"> <blockquote class="fb-xfbml-parse-ignore" cite="https://www.facebook.com/rouvyspecialized/"><a href="https://www.facebook.com/rouvyspecialized">ROUVY Specialized Cycling Team</a></blockquote> </div> </div> </div> </div> </div> <div class="container"> <div class="row " > <div class="col-md-8" > <div id="projects" > <h3 class="my-4">Pořádáme</h3> <div class="row"> {% for project in site.data.projects %} <div class="col-lg-6 col-md-12" id="{{ project-id }}"> <div class="project-content" style="background-image: url('{{ project.bg-image }}')" > <h4 class="align-middle"> <a href="{{ project.url}}" class="roundedAll"> {{ project.name }} </a> </h4> </div> </div> {% endfor %} </div> </div> </div> <div class="col-md-4" > <h3 class="my-4">Kalendář</h3> <ul class="list-group list-group-flush"> {% for event in site.data.event-calendar %} <li class="list-group-item"> <h5> {% if event.url %} <a href="{{ event.url }}">{{ event.name }}</a> {% else %} {{ event.name }} {% endif %} </h5> <div> {{ event.date }} {% if event.proposition %} <a href="{{ event.proposition }}"> Propozice </a> {% endif %} {% if event.results %} <a href="{{ event.results }}"> Výseldky </a> {% endif %} {% if event.description %} <p> {{ event.description }} </p> {% endif %} <div> </li> {% endfor %} </ul> </div> </div> </div> <script type="text/javascript"> var ChangeFBPagePlugin = function () { //getting parent box height //var container_height = (Number($('.fb-column').height()) - (Number($('.fb-column-header').height()) + Number($('.fb-column-header').css('margin-bottom').replace("px", "")) + Number(($('.fb-column').css('padding-top').replace("px", "")*2)))).toFixed(0); var containerHeight = Math.floor(Number($(".main-info .post").outerHeight())); var containerWidth = Math.floor(Number($(".main-info").outerWidth() - $(".post").outerWidth())) if (!isNaN(containerHeight)) { $(".fb-page").attr("data-height", containerHeight); if (!isNaN(containerWidth)){ $(".fb-page").attr("data-width", containerWidth); } if (typeof FB !== 'undefined' ) { FB.XFBML.parse(); } } } var SetProjectPadding = function() { $(".project-content").each ( function(){ var innerH = Number($(this).innerHeight()); var height = Number($(this).find(" > h4").height()) var pT = Math.round((innerH - height)/2) var pInnerH = $(this).find(" > h4").css("padding-top", pT + "px") }) } $(window).on('resize', function() { setTimeout(function(){ChangeFBPagePlugin()}); SetProjectPadding() }); $(window).on('load', function() { setTimeout(function(){ChangeFBPagePlugin()}); SetProjectPadding() }); </script>
html
<filename>public/distractors/2417.json<gh_stars>1-10 {"id": "2417", "article": "One of my main concerns when I am helping people achieve their goals is how they measure success . I see individuals getting frustrated as they struggle hard for success . One of the main reasons that cause this frustration is that people allow their definition of success to be determined by someone or something else . Another is that they become frustrated at their own apparent lack of success when comparing themselves to other people . We are individuals with individual wants , skills and experiences . We should look at our own skills to determine what is successful to us . We should look inwards to determine what it would mean for us to be successful in our own mind rather than someone else ' s . Evaluating a successful person needs to look at his pathway to success , his actions , his determination and translate that into his own experience to see how he can improve himself . You must set your own course of action , and stay on your course . You alone must determine what success means to you . Do what you do to the best of your ability and the rest will take care of itself . For example , I believe that I am successful but I am not a millionaire ! Others may not see me as successful in their eyes but that does not matter . It is how I see myself that is important to me and my life . Here is the truth . Being a success is doing your best , not being the best . Success is not something you become ; it is something you continue being . When we get to that point , we will experience a lot more joy and a lot less frustration . And that sounds good to us ! Remember the great quote from <NAME> , \" If you can not do great things , do small things in a great way . \"", "questions": "Which is NOT true according to the passage ?", "options": {"human": ["Success is something you keep on being rather than you become .", "It does n ' t matter others may not consider you as a success in their eyes .", "It matters that you set your own course of action and stay on it .", "Evaluating a successful person needs to look at others ' judgment ."]}, "answer": {"human": 3}}
json
<filename>maven/src/test/java/sorting/SortingTest.java package sorting; import sorting.*; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Arrays; import java.util.stream.*; public class SortingTest { private void sortAndAssert(Sorter sorter, Comparable[] arr) { String unsortedString = Arrays .stream(arr) .map(item -> item.toString()) .collect(Collectors.joining(",")); sorter.sort(arr); String sortedString = Arrays .stream(arr) .map(item -> item.toString()) .collect(Collectors.joining(",")); assertTrue( Sorter.sorted(arr), unsortedString + " <> " + sortedString); } private void runTests(Sorter sorter) { sortAndAssert(sorter, new Integer[] { }); sortAndAssert(sorter, new Integer[] { 0, 1, 2, 3 }); sortAndAssert(sorter, new Integer[] { 3, 2, 1, 0 }); sortAndAssert(sorter, new Integer[] { 4, 7, 2, 1 }); sortAndAssert(sorter, new Integer[] { 4, 7, 2, 3, 5, 1, 2, 6, 20, 1 }); sortAndAssert(sorter, new String[] { "x", "a", "b" }); } @Test public void testSelectionSorter() { runTests(new SelectionSorter()); } @Test public void testInsertionSorter() { runTests(new InsertionSorter()); } @Test public void testShellSorter() { runTests(new ShellSorter()); } @Test public void testRecursiveMergeSorter() { runTests(new RecursiveMergeSorter()); } @Test public void testBottomUpMergeSorter() { runTests(new BottomUpMergeSorter()); } @Test public void testQuickSorter() { runTests(new QuickSorter()); } }
java
{ "parent": "worldIDestructibleSpotsSystem", "name": "gameDestructibleSpotsSystem", "flags": 2 }
json
<reponame>itshui3/janky-algos export function minimumWaitingTime(queries: number[]) { // Write your code here. if (!queries.length) return -1; queries = queries.sort((a, b) => a-b); let runningWait = 0; return queries.map((wait) => { let waitTime = runningWait; runningWait = waitTime + wait; return waitTime; }).reduce(((acc, cur) => { return acc + cur; }), 0); }; export function simple_minimumWaitingTime(queries: number[]) { // Write your code here. let curWait = 0; return queries.sort((a, b) => a-b).reduce((totalWait, cur) => { let indexWait = totalWait + curWait; curWait += cur; return indexWait; }, 0); }
typescript
<filename>README.md<gh_stars>0 # node-jwt-authentication-api NodeJS JWT Authentication API For documentation and instructions check out http://jasonwatmore.com/post/2018/08/06/nodejs-jwt-authentication-tutorial-with-example-api Use NGROK to test API locally: https://www.npmjs.com/package/ngrok ``` ngrok http 4000 ```
markdown
It is becoming a trend for the Chennai Super Kings (CSK) in IPL 2020 that the only batsman who has been putting up valiant efforts is Faf du Plessis. It was no different on Friday as he top-scored for his side with a 35-ball 43 before CSK eventually lost to the Delhi Capitals (DC) by 44 runs at the Dubai International Stadium. What it meant, though, was that three potentially match-saving innings catapulted du Plessis to the summit of the IPL 2020 ‘Orange Cap’ list with a cumulative total of 173 runs. He has reopened a 20-run lead above second-placed KL Rahul. The former Proteas captain has scores of 58 not out, 72 and 43 in his three innings so far. Another Kings XI Punjab (KXIP) opener – Mayank Agarwal – is third on the list with 115 runs under his belt. Rohit Sharma (92 runs) and AB de Villiers (79 runs) complete the top 5 in the race for the IPL 2020 ‘Orange Cap’. It was a team effort from DC last night as their top order is proving to be potential contenders for the coveted award. While opener Prithvi Shaw is ninth in the table, Rishabh Pant and captain Shreyas Iyer – in that order – occupy the two spots below him. Man of the Match Shaw, who scored 64 off 43 balls against CSK, has a cumulative total of 69 runs, while Pant and Iyer are on 68 runs and 65 runs respectively. Batting at No. 3, the wicketkeeper-batsman smashed a 25-ball 37 while Iyer struggled to get going before perishing for a 22-ball 26. CSK batter Ambati Rayudu, who scored 71 runs in the opening fixture against the Mumbai Indians (MI) before missing the two subsequent games with injury, is at the seventh spot. The action shifts to Abu Dhabi tonight as two-time champions Kolkata Knight Riders (KKR) will take on the Sunrisers Hyderabad (SRH) – both teams lost their opening match. The batsman most likely to break into the top 10 is SRH’s Jonny Bairstow, who is 14th on the list after scoring 61 off 43 balls against the Royal Challengers Bangalore (RCB) on Monday. But, as has been the trend in IPL 2020 thus far, one shouldn’t be surprised if a big knock emerges from the team batting first. While both opener David Warner and No. 3 Manish Pandey can play whirlwind innings to take the game away from the opposition, KKR boasts a middle-order comprising of Eoin Morgan, captain Dinesh Karthik and Andre Russell, and they can make a mockery of any total.
english
<reponame>JohnLFX/COP4710-Project-1<filename>src/main/java/P1.java import java.io.BufferedReader; import java.io.IOException; import java.lang.reflect.Field; import java.nio.file.Files; import java.nio.file.Paths; import java.util.*; public class P1 { //TODO Duplicate coach ids? private final List<Coache> coaches; private final List<Team> teams; public P1() { this.coaches = new ArrayList<>(); this.teams = new ArrayList<>(); } public void run() { System.out.println("The mini-DB of NBA coaches and teams"); System.out.println("Please enter a command. Enter 'help' for a list of commands."); System.out.println(); System.out.print("> "); Command cmd; while ((cmd = CommandParser.fetchCommand()) != null) { //System.out.println(cmd); try { switch (cmd.getCommand()) { case "help": System.out.println("add_coach ID SEASON FIRST_NAME LAST_NAME SEASON_WIN "); System.out.println(" SEASON_LOSS PLAYOFF_WIN PLAYOFF_LOSS TEAM - add new coach data"); System.out.println("add_team ID LOCATION NAME LEAGUE - add a new team"); System.out.println("print_coaches - print a listing of all coaches"); System.out.println("print_teams - print a listing of all teams"); System.out.println("coaches_by_name NAME - list info of coaches with the specified name"); System.out.println("teams_by_city CITY - list the teams in the specified city"); System.out.println("load_coaches FILENAME - bulk load of coach info from a file"); System.out.println("load_teams FILENAME - bulk load of team info from a file"); System.out.println("best_coach SEASON - print the name of the coach with the most netwins in a specified season"); System.out.println("search_coaches field=VALUE - print the name of the coach satisfying the specified conditions"); System.out.println("exit - quit the program"); break; case "add_coach": { Coache coache = new Coache(); coache.setCoach_ID(cmd.getParameters()[0]); coache.setSeason(Integer.parseInt(cmd.getParameters()[1])); coache.setFirst_name(cmd.getParameters()[2]); coache.setLast_name(cmd.getParameters()[3]); coache.setSeason_win(Integer.parseInt(cmd.getParameters()[4])); coache.setSeason_loss(Integer.parseInt(cmd.getParameters()[5])); coache.setPlayoff_win(Integer.parseInt(cmd.getParameters()[6])); coache.setPlayoff_loss(Integer.parseInt(cmd.getParameters()[7])); coache.setTeam(cmd.getParameters()[8]); if (!coaches.add(coache)) throw new IllegalArgumentException("Duplicate coache ID"); break; } case "add_team": { Team team = new Team(); team.setTeam_ID(cmd.getParameters()[0]); team.setLocation(cmd.getParameters()[1]); team.setName(cmd.getParameters()[2]); team.setLeague(cmd.getParameters()[3].charAt(0)); if (!teams.add(team)) throw new IllegalArgumentException("Duplicate team ID"); break; } case "print_coaches": { //System.out.println("Coach_ID | season | first_name | last_name | season_win | season_loss | playoff_win | playoff_loss | team"); coaches.forEach(System.out::println); //System.out.println("----------"); break; } case "print_teams": { //System.out.println("Team_ID | Location | Name | League"); teams.forEach(System.out::println); //System.out.println("----------"); break; } case "coaches_by_name": { //System.out.println("Coach_ID | season | first_name | last_name | season_win | season_loss | playoff_win | playoff_loss | team"); for (Coache coache : coaches) { if (coache.getLast_name().equalsIgnoreCase(cmd.getParameters()[0])) { System.out.println(coache); } } //System.out.println("----------"); break; } case "teams_by_city": { //System.out.println("Team_ID | Location | Name | League"); for (Team team : teams) { if (team.getLocation().equalsIgnoreCase(cmd.getParameters()[0])) { System.out.println(team); } } //System.out.println("----------"); break; } case "load_coaches": { try (BufferedReader br = Files.newBufferedReader(Paths.get(cmd.getParameters()[0]))) { String line; br.readLine(); // Skip header in csv while ((line = br.readLine()) != null) { String[] data = line.split(","); Arrays.setAll(data, i -> data[i].trim()); Coache coache = new Coache(); coache.setCoach_ID(data[0]); coache.setSeason(Integer.parseInt(data[1])); coache.setFirst_name(data[2]); coache.setLast_name(data[3]); coache.setSeason_win(Integer.parseInt(data[4])); coache.setSeason_loss(Integer.parseInt(data[5])); coache.setPlayoff_win(Integer.parseInt(data[6])); coache.setPlayoff_loss(Integer.parseInt(data[7])); coache.setTeam(data[8]); coaches.add(coache); } } catch (IOException e) { e.printStackTrace(); } break; } case "load_teams": { try (BufferedReader br = Files.newBufferedReader(Paths.get(cmd.getParameters()[0]))) { String line; br.readLine(); // Skip header in csv while ((line = br.readLine()) != null) { String[] data = line.split(","); Arrays.setAll(data, i -> data[i].trim()); Team team = new Team(); team.setTeam_ID(data[0]); team.setLocation(data[1]); team.setName(data[2]); team.setLeague(data[3].charAt(0)); teams.add(team); } } catch (IOException e) { e.printStackTrace(); } break; } case "best_coach": { int season = Integer.parseInt(cmd.getParameters()[0]); Optional<Coache> coache = coaches.stream() .filter(c -> c.getSeason() == season) .max(Comparator.comparingInt(Coache::getNetWins)); if (coache.isPresent()) { //System.out.println("Coach_ID | season | first_name | last_name | season_win | season_loss | playoff_win | playoff_loss | team"); System.out.println(coache.get().getFirst_name() + " " + coache.get().getLast_name()); // System.out.println("----------"); } else { System.out.println("Error: No coaches are found in the database"); } break; } case "search_coaches": Coache needle = new Coache(); Map<String, String> operatorFieldMap = new HashMap<>(); Field[] fields = needle.getClass().getDeclaredFields(); Arrays.stream(fields).forEach(field -> field.setAccessible(true)); for (String parameter : cmd.getParameters()) { if (parameter.trim().isEmpty()) continue; //System.out.println("Parameter: " + parameter); StringBuilder fieldNameBuilder = new StringBuilder(); StringBuilder operatorBuilder = new StringBuilder(); StringBuilder fieldValueBuilder = new StringBuilder(); boolean populatingName = true; for (char c : parameter.toCharArray()) { if (c == '=' || c == '<' || c == '>' || c == '!') { operatorBuilder.append(c); populatingName = false; } else { if (populatingName) { fieldNameBuilder.append(c); } else { fieldValueBuilder.append(c); } } } //System.out.println(fieldName.toString() + " | " + operator + " | " + fieldValue); String fieldName = fieldNameBuilder.toString(); for (Field field : fields) { if (field.getName().equalsIgnoreCase(fieldName)) { operatorFieldMap.put(field.getName(), operatorBuilder.toString()); try { if (field.getType() == Integer.class) { field.set(needle, Integer.valueOf(fieldValueBuilder.toString())); } else { field.set(needle, fieldValueBuilder.toString()); } } catch (IllegalAccessException e) { e.printStackTrace(); } break; } } } //printCoache(needle); //System.out.println("Coach_ID | season | first_name | last_name | season_win | season_loss | playoff_win | playoff_loss | team"); for (Coache coache : coaches) { boolean printCoach = true; for (Field field : fields) { try { if (field.get(needle) != null) { //System.out.println("Check value: " + field.get(needle)); Object checkObj = field.get(needle); Object needleObj = field.get(coache); switch (operatorFieldMap.get(field.getName())) { case "=": if (needleObj instanceof String) { if (!String.valueOf(needleObj).equalsIgnoreCase(String.valueOf(checkObj))) printCoach = false; } else { if (!Objects.equals(checkObj, needleObj)) { printCoach = false; } } break; case ">": if (needleObj instanceof Integer) { if ((Integer) checkObj >= (Integer) needleObj) printCoach = false; } else { throw new IllegalArgumentException("Cannot use \">\" operator for data type " + field.getType()); } break; default: throw new IllegalArgumentException("Invalid operator: \"" + operatorFieldMap.get(field.getName()) + "\""); } } } catch (IllegalAccessException e) { e.printStackTrace(); } } if (printCoach) System.out.println(coache); } //System.out.println("----------"); break; case "exit": System.out.println("Leaving the database, goodbye!"); System.exit(0); case "": break; default: System.out.println("Invalid Command, try again!"); break; } } catch (IllegalArgumentException e) { System.out.println("Input error: " + e.getMessage()); e.printStackTrace(); } catch (ArrayIndexOutOfBoundsException e) { System.out.println("Error: Incorrect number of arguments supplied for command " + cmd.getCommand()); e.printStackTrace(); } System.out.print("> "); } } public static void main(String[] args) { new P1().run(); } }
java
You may not have played No Man’s Sky, but you’ve probably heard of it. No Man’s Sky was one of the most anticipated games of 2016, having won awards before it had even been released. Unfortunately, much of that excitement was swept away once the game was out. This was largely due to a lack of promised features that the game would have, such as an in-depth multiplayer. Well, after two years, Hello Games has finally released the patch that might deliver on all those promises fans were excited for. If you don’t already know, No Man’s Sky is an action-adventure survival game based on exploring and surviving in the depths of space. Each planet is a unique experience, as the universe is open and massive. This new update is meant to expand the player’s experience past simply solo exploration. The update is called Next, and actually follows three previous major updates, Atlas Rises, Pathfinder, and Foundation. The trailers, demos, and marketing of No Man’s Sky featured many gameplay elements that were not included in the final release. Each of these updates brought along many of those elements, along with a plethora of updates catering to fans, or fixing problems with the current game. Next seems to be the update that brings some of the final major changes that fans were upset about at release. The biggest and most noteworthy change is, of course, the inclusion of multiplayer. Players can work together, or play as enemies, allowing for a new and exciting experience. Together, they can build bases and develop teamwork, while also being able to fight each other for resources. Along with this, you’ll be able to customize your character to differentiate between you and your new friends. While the excitement for the multiplayer is understandable, there are many more benefits from this update that players will be excited to discover. This update allows for a fantastic new experience for both new and returning players by completely overhauling the starting content. Along with this, the graphics and UI have been updated immensely, further developing the update’s approach to new and returning players. On top of this, practically everything has been improved or touched upon. There are new missions, new base mechanics (they can be built anywhere now!), new freighters, and even new graphic updates that completely change your view of the game. If you own this game, and were disappointed by the lack of content it had on release, then this is the update for you. So many things have been updated to provide more content, that it the game has become far closer to the anticipated game, rather than what the game was when it actually was released.
english
A plea was moved in the Delhi High Court today seeking direction to the Centre and AAP government to relax the age criterion for COVID-19 vaccination drive and to allow more private sector participation in the process. The petition, filed by a final year law student of Delhi University, also sought direction to the authorities to formulate a policy to provide the benefits of vaccination drive to senior citizens, differently-abled persons and poor sections of the society by initiating door-to-door vaccination services in the national capital. The petitioner Mrigank Mishra, represented through advocate Kushal Kumar, said in the light of the alarming situation of rising coronavirus cases and the second wave which is more severe than the first one, it is pertinent to boost the vaccination drive for which widening of involvement of private sector entities is necessary as it will facilitate rapid and mass vaccination and allow door-to-door vaccination of the citizens. The plea said the current system of vaccination drive involves visitation to centers after securing an appointment on the Co-Win portal and the on-the-spot registrations are very limited in number and often lead to long queues. Certain classes of citizens including bed-ridden senior citizens, differently-abled persons, poor sections of the society are at disadvantage owing to the present system of vaccination drive, it said. It is also necessary to remove/ relax the age restrictions in relation to the beneficiaries of vaccination drive since the increasing number of coronavirus cases are a concern for health and safety of every citizen, the plea, filed through advocates Harsh Ahuja, Aadtya Kapoor and Akash Deep Gupta, said. The petition has arrayed the Union Ministries of Home Affairs and Health and Family Welfare and Delhi government as parties. It said currently people above the age of 45 years are eligible for vaccines by visiting the designated COVID-19 vaccination centres. However, considering the ever-rising number of coronavirus cases, availability of infrastructure and resources and in a situation where the governments have ruled out the possibilities of lockdown, expanding the reach of vaccination drive is the only solution to meet the ends. Delhi recorded 5,506 fresh cases of COVID-19 on Wednesday, the highest single-day rise this year, while 20 more people died due to the coronavirus infection, taking the number of deaths to 11,133, according to the city Health Department. The plea claimed there is an urgent need to take effective measures for the vaccination of a large number of citizens and the involvement of private players such as private labs and NGOs can boost the vaccination drive and facilitate mass vaccination. Several experts have opined and suggested that the involvement of the private sector in COVID-19vaccination drive can benefit the vaccination program and lead to rapid and mass vaccination. Private players such as private diagnostics can play a key role in collaboration with the government in the administration and distribution of the vaccine owing to their vast network across the country, and trained workforce, it said. Claiming that the current system has failed to take into account that the disparities in technology access and literacy are clearly hindering equitable vaccine distribution, the plea said expanding the private participation would complement the government's effort and lead to rapid mass vaccination through door-to-door vaccination of the beneficiaries. (Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed. )
english
from __future__ import division from __future__ import print_function from __future__ import absolute_import from builtins import str from builtins import range from past.utils import old_div from builtins import object import os import re import json import copy from glm.Qtpy.Qt import QtGui, QtCore, QtWidgets, Qt from . import nodz_utils as utils from . import nodz_extra defaultConfigPath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'default_config.json') if Qt.IsPyQt5 or Qt.IsPyQt4: signalObject = 'PyQt_PyObject' else: signalObject = 'PyObject' class ConnectionInfo(object): def __init__(self, connectionItem): # Storage. self.socketNode = connectionItem.socketNode self.socketAttr = connectionItem.socketAttr self.plugNode = connectionItem.plugNode self.plugAttr = connectionItem.plugAttr class Nodz(QtWidgets.QGraphicsView): """ The main view for the node graph representation. The node view implements a state pattern to control all the different user interactions. """ # if we want to be more generic, should use pre and post signals, and fetch whatever in Layout side, but this is not resilient to nested calls :/ # some calls have not been handled via those methodes : createNode (handled via nodeCreator overload), editNode, deleteNode, createAttribute, editAttribute, deleteAttribute : they are not called directly by LayoutEditor, but encapsulated via nodeCreator, loadGraph, etc. We issue less events if handling the top level action issueing this # all undo calls start with emitter nodzInstance signal_UndoRedoModifySelection = QtCore.Signal(signalObject, signalObject, signalObject) # node id list before, node id list after. signal_NodeSelected does not send previous selection signal_UndoRedoDeleteSelectedNodes = QtCore.Signal(signalObject, signalObject) # list of deleted nodes (user data copies). signal_NodeDeleted does only send deleted node names, too late to get their userData for redo # # signal_UndoRedoEditNodeName = QtCore.Signal(signalObject, str, str) # node name before, node name after UNUSED signal_UndoRedoAddNode = QtCore.Signal(signalObject, signalObject) # node added user data. For consistency with signal_UndoRedoDeleteSelectedNodes (we may actually store undo via signal_NodeCreated, but would be called a lot of time from loadGraph) signal_UndoRedoMoveNodes = QtCore.Signal(signalObject, signalObject, signalObject, signalObject) # node name list, fromPos list, toPos list. signal_NodeMoved does not send previous position signal_UndoRedoConnectNodes = QtCore.Signal(signalObject, signalObject, signalObject) # list of removed ConnectionInfo (potentially due to addition), list of new ConnectionInfo. Could deal with it with plug/socket connected / disconnected but would be tedious with a lot of calls signal_dropOnNode = QtCore.Signal(signalObject, signalObject) #nodzInst, nodeItem signal_StartCompoundInteraction = QtCore.Signal(signalObject) # starts user interaction on a nodz signal_EndCompoundInteraction = QtCore.Signal(signalObject, bool) # end user interaction on a nodz signal_NodeCreated = QtCore.Signal(signalObject) signal_NodePreDeleted = QtCore.Signal(signalObject) signal_NodeDeleted = QtCore.Signal(signalObject) signal_NodeEdited = QtCore.Signal(signalObject, signalObject) signal_NodeSelected = QtCore.Signal(signalObject) signal_NodeMoved = QtCore.Signal(signalObject, signalObject) # signal_NodeRightClicked = QtCore.Signal(signalObject) signal_NodeDoubleClicked = QtCore.Signal(signalObject) signal_ViewContextMenuEvent = QtCore.Signal(signalObject) # view context menu event signal_NodeContextMenuEvent = QtCore.Signal(signalObject, signalObject) # node context menu event, node name signal_AttrCreated = QtCore.Signal(signalObject, signalObject) signal_AttrDeleted = QtCore.Signal(signalObject, signalObject) signal_AttrEdited = QtCore.Signal(signalObject, signalObject, signalObject) signal_PlugConnected = QtCore.Signal(signalObject, signalObject, signalObject, signalObject) signal_PlugDisconnected = QtCore.Signal(signalObject, signalObject, signalObject, signalObject) signal_SocketConnected = QtCore.Signal(signalObject, signalObject, signalObject, signalObject) signal_SocketDisconnected = QtCore.Signal(signalObject, signalObject, signalObject, signalObject) signal_GraphSaved = QtCore.Signal() signal_GraphLoaded = QtCore.Signal() signal_GraphCleared = QtCore.Signal() signal_GraphEvaluated = QtCore.Signal() signal_KeyPressed = QtCore.Signal(signalObject) signal_Dropped = QtCore.Signal() signal_dragEvent = QtCore.Signal(signalObject, signalObject) # dragDropEvent, nodzInst signal_dragMoveEvent = QtCore.Signal(signalObject, signalObject) # dragDropEvent, nodzInst signal_dropEvent = QtCore.Signal(signalObject, signalObject) # dragDropEvent, nodzInst def __init__(self, parent, configPath=defaultConfigPath): """ Initialize the graphics view. """ super(Nodz, self).__init__(parent) # Load nodz configuration. self.config = None self.loadConfig(configPath) # General data. self.gridVisToggle = True self.gridSnapToggle = False self._nodeSnap = False self.selectedNodes = list() # Connections data. self.drawingConnection = False self.currentHoveredNodeForConnection = None self.currentHoveredNodeForDrop = None self.currentHoveredAttribute = None self.currentHoveredLink = None self.sourceSlot = None self.allowLoop = True self.editEnabled = True # Display options. self.currentState = 'DEFAULT' self.pressedKeys = list() # Node creation helper self.nodeCreationPopup = None self.nodeCreationPopupKeyEvent = None # drag n drop data to set when event called self.dragAccept = False self.dragMoveAccept = False self.dropAccept = False self.cutTool = None self.setRenderHints(QtGui.QPainter.Antialiasing | QtGui.QPainter.SmoothPixmapTransform | QtGui.QPainter.HighQualityAntialiasing) def setEnableDrop(self, enabled): self.setAcceptDrops(enabled and self.editEnabled) # self.setDropIndicatorShown(enabled) def dragEnterEvent(self, e): if (self.editEnabled): self.signal_dragEvent.emit(e, self) if self.dragAccept: e.accept() else: e.ignore() else: e.ignore() def dragMoveEvent(self, e): if (self.editEnabled): self.signal_dragMoveEvent.emit(e, self) if self.dragMoveAccept: e.accept() else: e.ignore() else: e.ignore() def dropEvent(self, e): if (self.editEnabled): self.signal_dropEvent.emit(e, self) if self.dropAccept: e.accept() else: e.ignore() else: e.ignore() def event(self, event): if (self.editEnabled and event.type() == QtCore.QEvent.KeyPress): # bypass QWidget behaviors which is to checks for Tab and Shift+Tab and tries to move the focus appropriately self.keyPressEvent(event) return True return super(Nodz, self).event(event) def wheelEvent(self, event): """ Zoom in the view with the mouse wheel. """ self.currentState = 'ZOOM_VIEW' self.setTransformationAnchor(QtWidgets.QGraphicsView.AnchorUnderMouse) inFactor = 1.15 outFactor = old_div(1, inFactor) delta = int(0) if (hasattr(event, 'angleDelta') and callable(getattr(event, 'angleDelta'))): delta = event.angleDelta().y() else: delta = event.delta() if delta > 0: zoomFactor = inFactor self.scale(zoomFactor, zoomFactor) elif delta < 0: zoomFactor = outFactor self.scale(zoomFactor, zoomFactor) # if delta is 0 we probably have alt key active or things like that self.currentState = 'DEFAULT' def contextMenuEvent(self, event): if (event.modifiers() & QtCore.Qt.AltModifier) or (event.modifiers() & QtCore.Qt.ControlModifier) or (not self.editEnabled): return p=event.pos() item=self.itemAt(p.x(),p.y()) if item is not None: item.contextMenuEvent(event) return self.signal_ViewContextMenuEvent.emit(event) def mousePressEvent(self, event): """ Initialize tablet zoom, drag canvas and the selection. """ # Tablet zoom if (event.button() == QtCore.Qt.RightButton and (event.modifiers() & QtCore.Qt.AltModifier)): self.currentState = 'ZOOM_VIEW' self.initMousePos = event.pos() self.zoomInitialPos = event.pos() self.initMouse = QtGui.QCursor.pos() self.setInteractive(False) # Drag view elif (event.button() == QtCore.Qt.MiddleButton and (event.modifiers() & QtCore.Qt.AltModifier)): self.currentState = 'DRAG_VIEW' self.prevPos = event.pos() self.setDragMode(QtWidgets.QGraphicsView.ScrollHandDrag) self.setCursor(QtCore.Qt.ClosedHandCursor) self.setInteractive(False) # Rubber band selection elif (event.button() == QtCore.Qt.LeftButton and (event.modifiers() == QtCore.Qt.NoModifier) and self.scene().itemAt(self.mapToScene(event.pos()), QtGui.QTransform()) is None): self.currentState = 'SELECTION' self._initRubberband(event.pos()) self.setInteractive(False) # Drag Item elif (self.editEnabled and event.button() == QtCore.Qt.LeftButton and (event.modifiers() == QtCore.Qt.NoModifier) and isinstance(self.scene().itemAt(self.mapToScene(event.pos()), QtGui.QTransform()), NodeItem)): self.currentState = 'DRAG_ITEM' self.setInteractive(True) # Add selection elif (event.button() == QtCore.Qt.LeftButton and (event.modifiers() & QtCore.Qt.ShiftModifier) and (event.modifiers() & QtCore.Qt.ControlModifier)): self.currentState = 'ADD_SELECTION' self._initRubberband(event.pos()) self.setInteractive(False) # Subtract selection elif (event.button() == QtCore.Qt.LeftButton and (event.modifiers() & QtCore.Qt.ControlModifier)): self.currentState = 'SUBTRACT_SELECTION' self._initRubberband(event.pos()) self.setInteractive(False) # Toggle selection elif (event.button() == QtCore.Qt.LeftButton and (event.modifiers() & QtCore.Qt.ShiftModifier)): self.currentState = 'TOGGLE_SELECTION' self._initRubberband(event.pos()) self.setInteractive(False) # Cut tool Golaem elif (self.editEnabled and event.button() == QtCore.Qt.LeftButton and (event.modifiers() & QtCore.Qt.AltModifier) and self.scene().itemAt(self.mapToScene(event.pos()), QtGui.QTransform()) is None): self.currentState = 'CUT_LINK' self._initCutTool(event.pos()) self.setCursor(QtCore.Qt.CrossCursor) self.setInteractive(True) else: self.currentState = 'DEFAULT' super(Nodz, self).mousePressEvent(event) def mouseMoveEvent(self, event): """ Update tablet zoom, canvas dragging and selection. """ # Zoom. if self.currentState == 'ZOOM_VIEW': offset = self.zoomInitialPos.x() - event.pos().x() if offset > self.previousMouseOffset: self.previousMouseOffset = offset self.zoomDirection = -1 self.zoomIncr -= 1 elif offset == self.previousMouseOffset: self.previousMouseOffset = offset if self.zoomDirection == -1: self.zoomDirection = -1 else: self.zoomDirection = 1 else: self.previousMouseOffset = offset self.zoomDirection = 1 self.zoomIncr += 1 if self.zoomDirection == 1: zoomFactor = 1.03 else: zoomFactor = 1 / 1.03 # Perform zoom and re-center on initial click position. pBefore = self.mapToScene(self.initMousePos) self.setTransformationAnchor(QtWidgets.QGraphicsView.AnchorViewCenter) self.scale(zoomFactor, zoomFactor) pAfter = self.mapToScene(self.initMousePos) diff = pAfter - pBefore self.setTransformationAnchor(QtWidgets.QGraphicsView.NoAnchor) self.translate(diff.x(), diff.y()) # Drag canvas. elif self.currentState == 'DRAG_VIEW': offset = self.prevPos - event.pos() self.prevPos = event.pos() self.verticalScrollBar().setValue(self.verticalScrollBar().value() + offset.y()) self.horizontalScrollBar().setValue(self.horizontalScrollBar().value() + offset.x()) # cutTool Golaem elif self.currentState == 'CUT_LINK': scenePos = self.mapToScene(event.pos()) deltaLine = scenePos - self.cutToolStartScenePos self.cutTool.setLine(self.cutToolStartScenePos.x(), self.cutToolStartScenePos.y(), self.cutToolStartScenePos.x() + deltaLine.x(), self.cutToolStartScenePos.y() + deltaLine.y()) # RuberBand selection. elif (self.currentState == 'SELECTION' or self.currentState == 'ADD_SELECTION' or self.currentState == 'SUBTRACT_SELECTION' or self.currentState == 'TOGGLE_SELECTION'): self.rubberband.setGeometry(QtCore.QRect(self.origin, event.pos()).normalized()) super(Nodz, self).mouseMoveEvent(event) def mouseReleaseEvent(self, event): """ Apply tablet zoom, dragging and selection. """ self.setDragMode(QtWidgets.QGraphicsView.NoDrag) # Zoom the View. if self.currentState == '.ZOOM_VIEW': self.offset = 0 self.zoomDirection = 0 self.zoomIncr = 0 self.setInteractive(True) # Drag View. elif self.currentState == 'DRAG_VIEW': self.setCursor(QtCore.Qt.ArrowCursor) self.setInteractive(True) # Selection. elif self.currentState == 'SELECTION': self.rubberband.setGeometry(QtCore.QRect(self.origin, event.pos()).normalized()) painterPath = self._releaseRubberband() self.setInteractive(True) self.scene().setSelectionArea(painterPath) # Add Selection. elif self.currentState == 'ADD_SELECTION': self.rubberband.setGeometry(QtCore.QRect(self.origin, event.pos()).normalized()) painterPath = self._releaseRubberband() self.setInteractive(True) for item in self.scene().items(painterPath): item.setSelected(True) # Subtract Selection. elif self.currentState == 'SUBTRACT_SELECTION': self.rubberband.setGeometry(QtCore.QRect(self.origin, event.pos()).normalized()) painterPath = self._releaseRubberband() self.setInteractive(True) for item in self.scene().items(painterPath): item.setSelected(False) # Toggle Selection elif self.currentState == 'TOGGLE_SELECTION': self.rubberband.setGeometry(QtCore.QRect(self.origin, event.pos()).normalized()) painterPath = self._releaseRubberband() self.setInteractive(True) for item in self.scene().items(painterPath): if item.isSelected(): item.setSelected(False) else: item.setSelected(True) # Cut tool Golaem elif self.currentState == 'CUT_LINK': scenePos = self.mapToScene(event.pos()) deltaLine = scenePos - self.cutToolStartScenePos self.cutTool.setLine(self.cutToolStartScenePos.x(), self.cutToolStartScenePos.y(), self.cutToolStartScenePos.x() + deltaLine.x(), self.cutToolStartScenePos.y() + deltaLine.y()) painterPath = self._releaseCutTool() removedConnections = list() addedConnections = list() self.setInteractive(True) for item in self.scene().items(painterPath): if (isinstance(item, ConnectionItem)): removedConnections.append(ConnectionInfo(item)) item._remove() self.setCursor(QtCore.Qt.ArrowCursor) if len(removedConnections) > 0: self.signal_UndoRedoConnectNodes.emit(self, removedConnections, addedConnections) self.currentState = 'DEFAULT' super(Nodz, self).mouseReleaseEvent(event) if(self.editEnabled and event.button() == QtCore.Qt.RightButton and not event.isAccepted()): self.signal_ViewRightClicked.emit() def keyPressEvent(self, event): """ Save pressed key and apply shortcuts. Shortcuts are: DEL - Delete the selected nodes F - Focus view on the selection """ if event.key() not in self.pressedKeys: self.pressedKeys.append(event.key()) if (self.editEnabled): if event.key() in (QtCore.Qt.Key_Delete, QtCore.Qt.Key_Backspace): self._deleteSelectedNodes() if event.key() == self.nodeCreationPopupKeyEvent: self.nodeCreationPopup.popup() if event.key() == QtCore.Qt.Key_Escape: self.nodeCreationPopup.popdown() if event.key() == QtCore.Qt.Key_F: self._focus() if event.key() == QtCore.Qt.Key_A: itemsArea = self.scene().itemsBoundingRect() self.fitInView(itemsArea, QtCore.Qt.KeepAspectRatio) if event.key() == QtCore.Qt.Key_S: self._nodeSnap = True # Emit signal. self.signal_KeyPressed.emit(event.key()) def keyReleaseEvent(self, event): """ Clear the key from the pressed key list. """ if event.key() == QtCore.Qt.Key_S: self._nodeSnap = False if event.key() in self.pressedKeys: self.pressedKeys.remove(event.key()) def _initRubberband(self, position): """ Initialize the rubber band at the given position. """ self.rubberBandStart = position self.origin = position self.rubberband.setGeometry(QtCore.QRect(self.origin, QtCore.QSize())) self.rubberband.show() def _releaseRubberband(self): """ Hide the rubber band and return the path. """ painterPath = QtGui.QPainterPath() rect = self.mapToScene(self.rubberband.geometry()) painterPath.addPolygon(rect) self.rubberband.hide() return painterPath def _initCutTool(self, position): """ Initialize the cut tool at the given position. """ if (self.cutTool is None): self.cutTool = QtWidgets.QGraphicsLineItem() self.cutTool.setZValue(65535) pen = QtGui.QPen(QtCore.Qt.red, 2, QtCore.Qt.DashLine) self.cutTool.setPen(pen) self.cutTool.hide() self.scene().addItem(self.cutTool) self.cutToolStartScenePos = self.mapToScene(position) self.cutTool.setPos(0,0) self.cutTool.setLine(self.cutToolStartScenePos.x(), self.cutToolStartScenePos.y(), self.cutToolStartScenePos.x(), self.cutToolStartScenePos.y()) self.cutTool.show() def _releaseCutTool(self): """ Hide the cut tool """ painterPath = self.cutTool.shape() self.cutTool.hide() return painterPath def _focus(self): """ Center on selected nodes or all of them if no active selection. """ if self.scene().selectedItems(): itemsArea = self._getSelectionBoundingbox() self.fitInView(itemsArea, QtCore.Qt.KeepAspectRatio) else: itemsArea = self.scene().itemsBoundingRect() self.fitInView(itemsArea, QtCore.Qt.KeepAspectRatio) def _getSelectionBoundingbox(self): """ Return the bounding box of the selection. """ bbx_min = None bbx_max = None bby_min = None bby_max = None bbw = 0 bbh = 0 for item in self.scene().selectedItems(): pos = item.scenePos() x = pos.x() y = pos.y() w = x + item.boundingRect().width() h = y + item.boundingRect().height() # bbx min if bbx_min is None: bbx_min = x elif x < bbx_min: bbx_min = x # end if # bbx max if bbx_max is None: bbx_max = w elif w > bbx_max: bbx_max = w # end if # bby min if bby_min is None: bby_min = y elif y < bby_min: bby_min = y # end if # bby max if bby_max is None: bby_max = h elif h > bby_max: bby_max = h # end if # end if bbw = bbx_max - bbx_min bbh = bby_max - bby_min return QtCore.QRectF(QtCore.QRect(bbx_min, bby_min, bbw, bbh)) def _resetScale(self): """ Resets the scale of the graphics view """ originalTransform = self.transform() self.resetTransform() self.translate(originalTransform.dx(), originalTransform.dy()) def _deleteSelectedNodes(self): """ Delete selected nodes. """ # self.signal_UndoRedoPreDeleteSelectedNodes.emit() removedConnections = list() deletedNodesUserData = list() # iterate on nodes first, will delete single connections after getting back selected items selected_nodes = list() if len(self.scene().selectedItems()) == 0: return for node in self.scene().selectedItems(): if type(node) is NodeItem: #NodeItem selected_nodes.append(node.name) nodzInst = self.scene().views()[0] nodzInst.signal_StartCompoundInteraction.emit(nodzInst) if len(selected_nodes) > 0: self.signal_NodePreDeleted.emit(selected_nodes) for node in self.scene().selectedItems(): if type(node) is NodeItem: #NodeItem if node.scene() is not None: # else already deleted by a previous node # stack all sockets connections. for socket in list(node.sockets.values()): for iCon in range(0, len(socket.connections)): removedConnections.append(ConnectionInfo(socket.connections[iCon])) # stack all plugs connections. for plug in list(node.plugs.values()): for iCon in range(0, len(plug.connections)): removedConnections.append(ConnectionInfo(plug.connections[iCon])) deletedNodesUserData.append(copy.deepcopy(node.userData)) node._remove() # scene should be refreshed with deleted items absent of selection now, just process remaining single connectionItems for node in self.scene().selectedItems(): if type(node) is ConnectionItem: #connectionItem removedConnections.append(ConnectionInfo(node)) node._remove() if len(removedConnections)>0 : addedConnections = list() self.signal_UndoRedoConnectNodes.emit(self, removedConnections, addedConnections) nodzInst.signal_EndCompoundInteraction.emit(nodzInst, True) # Emit signal. if len(selected_nodes) > 0: self.signal_NodeDeleted.emit(selected_nodes) self.signal_UndoRedoDeleteSelectedNodes.emit(self, deletedNodesUserData) def _returnSelection(self): """ Wrapper to return selected items. """ #self.selectedNodes # self.signal_UndoRedoPreModifySelection.emit() oldSelectedNodes = self.selectedNodes self.selectedNodes = list() if self.scene().selectedItems(): for node in self.scene().selectedItems(): if type(node) is NodeItem: self.selectedNodes.append(node.name) # Emit signal. self.signal_NodeSelected.emit(self.selectedNodes) #self.selectedNodes if (oldSelectedNodes != self.selectedNodes): self.signal_UndoRedoModifySelection.emit(self, oldSelectedNodes, self.selectedNodes) ################################################################## # API ################################################################## def loadConfig(self, filePath): """ Set a specific configuration for this instance of Nodz. :type filePath: str. :param filePath: The path to the config file that you want to use. """ self.config = utils._loadConfig(filePath) def initialize(self): """ Setup the view's behavior. """ # Setup view. config = self.config self.setRenderHint(QtGui.QPainter.Antialiasing, config['antialiasing']) self.setRenderHint(QtGui.QPainter.TextAntialiasing, config['antialiasing']) self.setRenderHint(QtGui.QPainter.HighQualityAntialiasing, config['antialiasing_boost']) self.setRenderHint(QtGui.QPainter.SmoothPixmapTransform, config['smooth_pixmap']) self.setRenderHint(QtGui.QPainter.NonCosmeticDefaultPen, True) self.setViewportUpdateMode(QtWidgets.QGraphicsView.FullViewportUpdate) self.setTransformationAnchor(QtWidgets.QGraphicsView.AnchorUnderMouse) self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.rubberband = QtWidgets.QRubberBand(QtWidgets.QRubberBand.Rectangle, self) # Setup scene. scene = NodeScene(self) sceneWidth = config['scene_width'] sceneHeight = config['scene_height'] scene.setSceneRect(0, 0, sceneWidth, sceneHeight) self.setScene(scene) # Connect scene node moved signal scene.signal_NodeMoved.connect(self.signal_NodeMoved) # Tablet zoom. self.previousMouseOffset = 0 self.zoomDirection = 0 self.zoomIncr = 0 # Connect signals. self.scene().selectionChanged.connect(self._returnSelection) def initNodeCreationHelper(self, completerNodeList=[], nodeCreatorCallback=None, keyEvent=QtCore.Qt.Key_Tab): """ Setup the node's creation helper that is available from the tab key """ self.nodeCreationPopupKeyEvent = keyEvent self.nodeCreationPopup = nodz_extra.QtPopupLineEditWidget(self.scene().views()[0]) self.nodeCreationPopup.setNodesList(completerNodeList) if nodeCreatorCallback is not None: self.nodeCreationPopup.nodeCreator = nodeCreatorCallback # NODES def createNode(self, name='default', preset='node_default', position=None, alternate=True): """ Create a new node with a given name, position and color. :type name: str. :param name: The name of the node. The name has to be unique as it is used as a key to store the node object. :type preset: str. :param preset: The name of graphical preset in the config file. :type position: QtCore.QPoint. :param position: The position of the node once created. If None, it will be created at the center of the scene. :type alternate: bool. :param alternate: The attribute color alternate state, if True, every 2 attribute the color will be slightly darker. :return : The created node """ # print("create node {} at creaetNode pos {}".format(name, position)) # Check for name clashes if name in list(self.scene().nodes.keys()): print('A node with the same name already exists : {0}'.format(name)) print('Node creation aborted !') return else: nodeItem = NodeItem(name=name, alternate=alternate, preset=preset, config=self.config) # Store node in scene. self.scene().nodes[name] = nodeItem if position is None: # Get the center of the view. position = self.mapToScene(self.viewport().rect().center()) # Set node position. self.scene().addItem(nodeItem) nodeItem.setPos(position - nodeItem.nodeCenter) nodeItem.checkIsWithinSceneRect() # Emit signal. self.signal_NodeCreated.emit(name) return nodeItem def deleteNode(self, node): """ Delete the specified node from the view. :type node: class. :param node: The node instance that you want to delete. """ if not node in list(self.scene().nodes.values()): print('Node object does not exist !') print('Node deletion aborted !') return if node in list(self.scene().nodes.values()): nodeName = node.name # Should handle UndoRedo here, but deleteNode is not used anywhere in our code removedConnections = list() addedConnections = list() selected_nodes = list() selected_nodes.append(node) # stack all sockets connections. for socket in list(node.sockets.values()): if len(socket.connections)>0: for socketConnection in socket.connections: removedConnections.append(ConnectionInfo(socketConnection)) # stack all plugs connections. for plug in list(node.plugs.values()): if len(plug.connections)>0: for plugConnection in plug.connections: removedConnections.append(ConnectionInfo(plugConnection)) self.signal_NodePreDeleted.emit([nodeName]) node._remove() # Emit signal. self.signal_NodeDeleted.emit([nodeName]) self.signal_UndoRedoConnectNodes.emit(self, removedConnections, addedConnections) self.signal_UndoRedoDeleteSelectedNodes.emit(self, selected_nodes) def editNode(self, node, newName=None): """ Rename an existing node. :type node: class. :param node: The node instance that you want to delete. :type newName: str. :param newName: The new name for the given node. """ if not node in list(self.scene().nodes.values()): print('Node object does not exist !') print('Node edition aborted !') return oldName = node.name if newName is not None: # Check for name clashes if newName in list(self.scene().nodes.keys()): print('A node with the same name already exists : {0}'.format(newName)) print('Node edition aborted !') return else: #oldName = node.name node.name = newName # Replace node data. self.scene().nodes[newName] = self.scene().nodes[oldName] self.scene().nodes.pop(oldName) # Store new node name in the connections if node.sockets: for socket in list(node.sockets.values()): for connection in socket.connections: connection.socketNode = newName if node.plugs: for plug in list(node.plugs.values()): for connection in plug.connections: connection.plugNode = newName node.update() # Emit signal. self.signal_NodeEdited.emit(oldName, newName) # editNode ot used in golaem, else needs an event # self.signal_UndoRedoEditNodeName.emit(self, oldName, newName) # ATTRS def createAttribute(self, node, name='default', index=-1, preset='attr_default', plug=True, socket=True, dataType=None, plugMaxConnections=-1, socketMaxConnections=1): """ Create a new attribute with a given name. :type node: class. :param node: The node instance that you want to delete. :type name: str. :param name: The name of the attribute. The name has to be unique as it is used as a key to store the node object. :type index: int. :param index: The index of the attribute in the node. :type preset: str. :param preset: The name of graphical preset in the config file. :type plug: bool. :param plug: Whether or not this attribute can emit connections. :type socket: bool. :param socket: Whether or not this attribute can receive connections. :type dataType: type. :param dataType: Type of the data represented by this attribute in order to highlight attributes of the same type while performing a connection. :type plugMaxConnections: int. :param plugMaxConnections: The maximum connections that the plug can have (-1 for infinite). :type socketMaxConnections: int. :param socketMaxConnections: The maximum connections that the socket can have (-1 for infinite). """ if not node in list(self.scene().nodes.values()): print('Node object does not exist !') print('Attribute creation aborted !') return if name in node.attrs: print('An attribute with the same name already exists : {0}'.format(name)) print('Attribute creation aborted !') return node._createAttribute(name=name, index=index, preset=preset, plug=plug, socket=socket, dataType=dataType, plugMaxConnections=plugMaxConnections, socketMaxConnections=socketMaxConnections) # Emit signal. self.signal_AttrCreated.emit(node.name, index) def deleteAttribute(self, node, index): """ Delete the specified attribute. :type node: class. :param node: The node instance that you want to delete. :type index: int. :param index: The index of the attribute in the node. """ if not node in list(self.scene().nodes.values()): print('Node object does not exist !') print('Attribute deletion aborted !') return node._deleteAttribute(index) # Emit signal. self.signal_AttrDeleted.emit(node.name, index) def editAttribute(self, node, index, newName=None, newIndex=None): """ Edit the specified attribute. :type node: class. :param node: The node instance that you want to delete. :type index: int. :param index: The index of the attribute in the node. :type newName: str. :param newName: The new name for the given attribute. :type newIndex: int. :param newIndex: The index for the given attribute. """ if not node in list(self.scene().nodes.values()): print('Node object does not exist !') print('Attribute creation aborted !') return if newName is not None: if newName in node.attrs: print('An attribute with the same name already exists : {0}'.format(newName)) print('Attribute edition aborted !') return else: oldName = node.attrs[index] # Rename in the slot item(s). if node.attrsData[oldName]['plug']: node.plugs[oldName].attribute = newName node.plugs[newName] = node.plugs[oldName] node.plugs.pop(oldName) for connection in node.plugs[newName].connections: connection.plugAttr = newName if node.attrsData[oldName]['socket']: node.sockets[oldName].attribute = newName node.sockets[newName] = node.sockets[oldName] node.sockets.pop(oldName) for connection in node.sockets[newName].connections: connection.socketAttr = newName # Replace attribute data. node.attrsData[oldName]['name'] = newName node.attrsData[newName] = node.attrsData[oldName] node.attrsData.pop(oldName) node.attrs[index] = newName if isinstance(newIndex, int): utils._swapListIndices(node.attrs, index, newIndex) # Refresh connections. for plug in list(node.plugs.values()): plug.update() if plug.connections: for connection in plug.connections: if isinstance(connection.source, PlugItem): connection.source = plug connection.source_point = plug.center() else: connection.target = plug connection.target_point = plug.center() if newName: connection.plugAttr = newName connection.updatePath() for socket in list(node.sockets.values()): socket.update() if socket.connections: for connection in socket.connections: if isinstance(connection.source, SocketItem): connection.source = socket connection.source_point = socket.center() else: connection.target = socket connection.target_point = socket.center() if newName: connection.socketAttr = newName connection.updatePath() self.scene().update() node.update() # Emit signal. if newIndex: self.signal_AttrEdited.emit(node.name, index, newIndex) else: self.signal_AttrEdited.emit(node.name, index, index) # GRAPH def autoLayoutGraph(self, nodes = None, margin = 50): """ Auto set nodes positions in the graph according to their connections. """ nodeWidth = 300 #default value, will be replaced by node.baseWidth + margin when iterating on the first node sceneNodes = list(self.scene().nodes.keys()) if (nodes is None) or len(nodes)==0: nodes = sceneNodes rootNodes = [] alreadyVisitedNodes = [] # root nodes (without connection on the plug) for nodeName in sceneNodes: node = self.scene().nodes[nodeName] if node is not None: nodeWidth = node.baseWidth + margin isRoot = True for plug in list(node.plugs.values()): isRoot &= (len(plug.connections)==0) if isRoot: rootNodes.append(node) maxGraphWidth = 0 rootGraphs = [[[0 for _x in range(0)] for _y in range(0)] for _z in range(0)] for rootNode in rootNodes: rootGraph = [[0 for _x in range(0)] for _y in range(0)] rootGraph.append([rootNode]) currentGraphLevel = 0 doNextGraphLevel = True while(doNextGraphLevel): doNextGraphLevel = False for nodeI in range(len(rootGraph[currentGraphLevel])): currentNode = rootGraph[currentGraphLevel][nodeI] for attr in currentNode.attrs: if attr in currentNode.sockets: socket = currentNode.sockets[attr] for connection in socket.connections: connectedNode = connection.plugItem.parentItem() if (connectedNode not in alreadyVisitedNodes): alreadyVisitedNodes.append(connectedNode) if len(rootGraph)<=(currentGraphLevel+1): emptyArray = [] rootGraph.append(emptyArray) rootGraph[currentGraphLevel+1].append(connection.plugItem.parentItem()) doNextGraphLevel = True currentGraphLevel+=1 graphWidth = len(rootGraph) * (nodeWidth+margin) maxGraphWidth = max(graphWidth, maxGraphWidth) rootGraphs.append(rootGraph) #update scene rect if needed if maxGraphWidth > self.scene().width(): sceneRect = self.scene().sceneRect() sceneRect.setWidth(maxGraphWidth) self.scene().setSceneRect(sceneRect) alreadyVisitedNodes = [] baseYpos = margin nodesMovedList = list() fromPosList = list() toPosList = list() for rootGraph in rootGraphs: #set positions... currentXpos = max(0, 0.5*(self.scene().width()-maxGraphWidth)) + maxGraphWidth-nodeWidth #middle of the view nextBaseYpos = baseYpos for nodesAtLevel in rootGraph: currentYpos = baseYpos for node in nodesAtLevel: if len(node.plugs)>0: if len(list(node.plugs.values())[0].connections)>0: parentPosition = list(node.plugs.values())[0].connections[0].socketItem.parentItem().pos() currentXpos = parentPosition.x() - nodeWidth #currentYpos = parentPosition.y() if (node not in alreadyVisitedNodes) and (node.name in nodes): alreadyVisitedNodes.append(node) node_pos = QtCore.QPointF(currentXpos, currentYpos) #check scene dimensions shouldResize = False sceneRect = self.scene().sceneRect() if node_pos.x() < nodeWidth : sceneRect.setWidth(self.scene().width() - node_pos.x() + nodeWidth + margin) node_pos.setX(nodeWidth + margin) shouldResize = True if node_pos.x() + nodeWidth > self.scene().width(): sceneRect.setWidth(node_pos.x() + nodeWidth + margin) shouldResize = True if node_pos.y() < node.height : sceneRect.setHeight(self.scene().height() - node_pos.y() + node.height + margin) node_pos.setY(node.height + margin) shouldResize = True if node_pos.y() + node.height > self.scene().height(): sceneRect.setHeight(node_pos.y() + node.height + margin) shouldResize = True if shouldResize: self.scene().setSceneRect(sceneRect) if node_pos.x() < 0 or node_pos.x() > self.scene().width() or node_pos.y()<0 or node_pos.y() > self.scene().height(): print("Warning: {0}: Invalid node position : ({1} ; {2}), frame dimension: ({3} ; {4}).".format(node.name, node_pos.x(), node_pos.y(), self.scene().width(), self.scene().height())) nodesMovedList.append(node.name) fromPosList.append(node.pos()) node.setPos(node_pos) node.checkIsWithinSceneRect() # Emit signal. self.signal_NodeMoved.emit(node.name, node.pos()) toPosList.append(node.pos()) currentYpos += node.height + margin nextBaseYpos = max(nextBaseYpos, currentYpos) currentXpos -= nodeWidth baseYpos = nextBaseYpos self.scene().updateScene() self.signal_UndoRedoMoveNodes.emit(self, nodesMovedList, fromPosList, toPosList) def saveGraph(self, filePath='path'): """ Get all the current graph infos and store them in a .json file at the given location. :type filePath: str. :param filePath: The path where you want to save your graph at. """ data = dict() # Store nodes data. data['NODES'] = dict() nodes = list(self.scene().nodes.keys()) for node in nodes: nodeInst = self.scene().nodes[node] preset = nodeInst.nodePreset nodeAlternate = nodeInst.alternate data['NODES'][node] = {'preset': preset, 'position': [nodeInst.pos().x(), nodeInst.pos().y()], 'alternate': nodeAlternate, 'attributes': []} attrs = nodeInst.attrs for attr in attrs: attrData = nodeInst.attrsData[attr] # serialize dataType if needed. if isinstance(attrData['dataType'], type): attrData['dataType'] = str(attrData['dataType']) data['NODES'][node]['attributes'].append(attrData) # Store connections data. data['CONNECTIONS'] = self.evaluateGraph() # Save data. try: utils._saveData(filePath=filePath, data=data) except: print('Invalid path : {0}'.format(filePath)) print('Save aborted !') return False # Emit signal. self.signal_GraphSaved.emit() def loadGraph(self, filePath='path'): """ Get all the stored info from the .json file at the given location and recreate the graph as saved. :type filePath: str. :param filePath: The path where you want to load your graph from. """ # Load data. if os.path.exists(filePath): data = utils._loadData(filePath=filePath) else: print('Invalid path : {0}'.format(filePath)) print('Load aborted !') return False # Apply nodes data. nodesData = data['NODES'] nodesName = list(nodesData.keys()) for name in nodesName: preset = nodesData[name]['preset'] position = nodesData[name]['position'] position = QtCore.QPointF(position[0], position[1]) alternate = nodesData[name]['alternate'] node = self.createNode(name=name, preset=preset, position=position, alternate=alternate) # Apply attributes data. attrsData = nodesData[name]['attributes'] for attrData in attrsData: index = attrsData.index(attrData) name = attrData['name'] plug = attrData['plug'] socket = attrData['socket'] preset = attrData['preset'] dataType = attrData['dataType'] plugMaxConnections = 1 # default before plugMaxConnections if ('plugMaxConnections' in attrData): plugMaxConnections = attrData['plugMaxConnections'] socketMaxConnections = -1 if ('socketMaxConnections' in attrData): socketMaxConnections = attrData['socketMaxConnections'] # un-serialize data type if needed if (isinstance(dataType, str) and dataType.find('<') == 0): dataType = eval(str(dataType.split('\'')[1])) self.createAttribute(node=node, name=name, index=index, preset=preset, plug=plug, socket=socket, dataType=dataType, plugMaxConnections=plugMaxConnections, socketMaxConnections=socketMaxConnections ) # Apply connections data. connectionsData = data['CONNECTIONS'] for connection in connectionsData: source = connection[0] sourceNode = source.split('.')[0] sourceAttr = source.split('.')[1] target = connection[1] targetNode = target.split('.')[0] targetAttr = target.split('.')[1] plugItem = self.scene().nodes[sourceNode].plugs[sourceAttr] socketItem = self.scene().nodes[targetNode].sockets[targetAttr] if (socketItem.accepts(plugItem)): self.createConnection(sourceNode, sourceAttr, targetNode, targetAttr) self.scene().update() # Emit signal. self.signal_GraphLoaded.emit() def removeConnectionByInfo(self, connectionInfo): for item in list(self.scene().items()): if (isinstance(item, ConnectionItem)): if (item.plugNode == connectionInfo.plugNode and item.plugAttr == connectionInfo.plugAttr and item.socketNode == connectionInfo.socketNode and item.socketAttr == connectionInfo.socketAttr): item._remove() def createConnectionByInfo(self, connectionInfo): self.createConnection(connectionInfo.plugNode, connectionInfo.plugAttr, connectionInfo.socketNode, connectionInfo.socketAttr) def createConnection(self, sourceNode, sourceAttr, targetNode, targetAttr): """ Create a manual connection. :type sourceNode: str. :param sourceNode: Node that emits the connection. :type sourceAttr: str. :param sourceAttr: Attribute that emits the connection. :type targetNode: str. :param targetNode: Node that receives the connection. :type targetAttr: str. :param targetAttr: Attribute that receives the connection. """ plug = self.scene().nodes[sourceNode].plugs[sourceAttr] socket = self.scene().nodes[targetNode].sockets[targetAttr] connection = ConnectionItem(plug.center(), socket.center(), plug, socket) connection.plugNode = plug.parentItem().name connection.plugAttr = plug.attribute connection.socketNode = socket.parentItem().name connection.socketAttr = socket.attribute plug.connect(socket, connection) socket.connect(plug, connection) connection.updatePath() self.scene().addItem(connection) return connection def evaluateGraph(self): """ Create a list of connection tuples. [("sourceNode.attribute", "TargetNode.attribute"), ...] """ scene = self.scene() data = list() for item in list(scene.items()): if isinstance(item, ConnectionItem): connection = item data.append(connection._outputConnectionData()) # Emit Signal self.signal_GraphEvaluated.emit() return data def clearGraph(self): """ Clear the graph. """ self.cutTool = None self.scene().clear() self.scene().nodes = dict() # Emit signal. self.signal_GraphCleared.emit() ################################################################## # END API ################################################################## class NodeScene(QtWidgets.QGraphicsScene): """ The scene displaying all the nodes. """ signal_NodeMoved = QtCore.Signal(signalObject, signalObject) def __init__(self, parent): """ Initialize the class. """ super(NodeScene, self).__init__(parent) # General. self.gridSize = parent.config['grid_size'] map = QtGui.QPixmap(self.gridSize, self.gridSize) gridBGColor = utils._convertDataToColor(parent.config['grid_background_color']) map.fill(gridBGColor) painter = QtGui.QPainter() painter.begin(map) gridColor = utils._convertDataToColor(parent.config['grid_color']) painter.setPen(gridColor) painter.drawRect(QtCore.QRectF(0, 0, self.gridSize, self.gridSize)) painter.end() self.parent().setDragMode(QtWidgets.QGraphicsView.NoDrag) # self.setDragMode(QtWidgets.QGraphicsView.NoDrag) self.gridBrush = QtGui.QBrush() self.gridBrush.setTexture(map) # Nodes storage. self.nodes = dict() self.userData = None #handled by user, won't be read nor written by Nodz def dragEnterEvent(self, event): """ Make the dragging of nodes into the scene possible. """ if (self.parent().editEnabled): event.setDropAction(QtCore.Qt.MoveAction) event.accept() def dragMoveEvent(self, event): """ Make the dragging of nodes into the scene possible. """ if (self.parent().editEnabled): event.setDropAction(QtCore.Qt.MoveAction) event.accept() def dropEvent(self, event): """ Create a node from the dropped item. """ # Emit signal. if (self.parent().editEnabled): self.signal_Dropped.emit(event.scenePos()) event.accept() def drawBackground(self, painter, rect): """ Draw a grid in the background. """ if self.views()[0].gridVisToggle: nodzInst = self.parent() painter.save() backgroundRect = QtCore.QRectF(nodzInst.viewport().rect()) painterTransform = painter.transform() painter.resetTransform() painterTranslation = QtCore.QPointF( painterTransform.dx(), painterTransform.dy() ) # Translate the painter during the scrollHandDrag mode only. Note : Glitches when starting zooming if( nodzInst.dragMode() == QtWidgets.QGraphicsView.ScrollHandDrag ): painter.translate( painterTranslation ) backgroundRect.translate( -painterTranslation ) painter.fillRect(backgroundRect, self.gridBrush) painter.restore() # nodzInst = self.parent() #.views()[0] # # config = nodzInst.config # viewport_rect = QtCore.QRect( # 0, 0, nodzInst.viewport().width(), nodzInst.viewport().height()) # visible_scene_rect = nodzInst.mapToScene(viewport_rect).boundingRect() # gridSize = self.gridSize * visible_scene_rect.width() / viewport_rect.width() # leftLine = rect.left() - rect.left() % gridSize # topLine = rect.top() - rect.top() % gridSize # lines = list() # i = int(leftLine) # while i < int(rect.right()): # lines.append(QtCore.QLineF(i, rect.top(), i, rect.bottom())) # i += gridSize # u = int(topLine) # while u < int(rect.bottom()): # lines.append(QtCore.QLineF(rect.left(), u, rect.right(), u)) # u += gridSize # self.pen = QtGui.QPen() # config = self.parent().config # self.pen.setColor(utils._convertDataToColor(config['grid_color'])) # self.pen.setWidth(0) # painter.setPen(self.pen) # painter.drawLines(lines) def updateScene(self): """ Update the connections position. """ for connection in [i for i in list(self.items()) if isinstance(i, ConnectionItem)]: connection.target_point = connection.target.center() connection.source_point = connection.source.center() connection.updatePath() class NodeItem(QtWidgets.QGraphicsItem): """ A graphic representation of a node containing attributes. """ def __init__(self, name, alternate, preset, config): """ Initialize the class. :type name: str. :param name: The name of the node. The name has to be unique as it is used as a key to store the node object. :type alternate: bool. :param alternate: The attribute color alternate state, if True, every 2 attribute the color will be slightly darker. :type preset: str. :param preset: The name of graphical preset in the config file. """ super(NodeItem, self).__init__() self.baseZValue = 1 self.setZValue(self.baseZValue) # Storage self.name = name self.alternate = alternate self.nodePreset = preset self.attrPreset = None # Attributes storage. self.attrs = list() self.attrsData = dict() self.attrCount = 0 self.currentDataType = None self.userData = None #handled by user, won't be read nor written by Nodz self.plugs = dict() self.sockets = dict() self.attributeBeingPlugged = None self.lastMousePressPos = None self.acceptNodeDrop = False self.icon = None self.scaledIcon = None self.usingSquareDisplay = False # Methods. self._createStyle(config) @property def height(self): """ Increment the final height of the node every time an attribute is created. """ aHeight = self.baseHeight if self.attrCount > 0: aHeight += self.attrHeight * self.attrCount + self.border + 0.5 * self.radius if (self.usingSquareDisplay): aHeight = max(self.baseWidth, aHeight) return aHeight @property def pen(self): """ Return the pen based on the selection state of the node. """ nodzInst = self.scene().views()[0] if self.isSelected(): return self._penSel elif self is nodzInst.currentHoveredNodeForDrop: return self._penHover else: return self._pen def _createStyle(self, config): """ Read the node style from the configuration file. """ self.setAcceptHoverEvents(True) self.setFlag(QtWidgets.QGraphicsItem.ItemIsMovable) self.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable) # Dimensions. self.baseWidth = config['node_width'] self.baseHeight = config['node_height'] self.attrHeight = config['node_attr_height'] self.border = config['node_border'] self.radius = config['node_radius'] self.nodeCenter = QtCore.QPointF() self.nodeCenter.setX(self.baseWidth / 2.0) self.nodeCenter.setY(self.height / 2.0) self._brush = QtGui.QBrush() self._brush.setStyle(QtCore.Qt.SolidPattern) self._brush.setColor(utils._convertDataToColor(config[self.nodePreset]['bg'])) self._pen = QtGui.QPen() self._pen.setStyle(QtCore.Qt.SolidLine) self._pen.setWidth(self.border) self._pen.setColor(utils._convertDataToColor(config[self.nodePreset]['border'])) self._penSel = QtGui.QPen() self._penSel.setStyle(QtCore.Qt.SolidLine) self._penSel.setWidth(self.border) self._penSel.setColor(utils._convertDataToColor(config[self.nodePreset]['border_sel'])) # make link highlit self._penHover = QtGui.QPen() self._penHover.setStyle(QtCore.Qt.SolidLine) self._penHover.setWidth(self.border) self._penHover.setColor(utils._convertDataToColor(config[self.nodePreset]['border_sel'])) self._textPen = QtGui.QPen() self._textPen.setStyle(QtCore.Qt.SolidLine) self._textPen.setColor(utils._convertDataToColor(config[self.nodePreset]['text'])) self._nodeTextFont = QtGui.QFont(config['node_font'], config['node_font_size'], QtGui.QFont.Bold) self._attrTextFont = QtGui.QFont(config['attr_font'], config['attr_font_size'], QtGui.QFont.Normal) self._attrAlign = QtCore.Qt.AlignCenter self._attrVAlign = QtCore.Qt.AlignVCenter self._attrBrush = QtGui.QBrush() self._attrBrush.setStyle(QtCore.Qt.SolidPattern) self._attrBrushAlt = QtGui.QBrush() self._attrBrushAlt.setStyle(QtCore.Qt.SolidPattern) self._attrPen = QtGui.QPen() self._attrPen.setStyle(QtCore.Qt.SolidLine) def _createAttribute(self, name, index, preset, plug, socket, dataType, plugMaxConnections, socketMaxConnections): """ Create an attribute by expanding the node, adding a label and connection items. :type name: str. :param name: The name of the attribute. The name has to be unique as it is used as a key to store the node object. :type index: int. :param index: The index of the attribute in the node. :type preset: str. :param preset: The name of graphical preset in the config file. :type plug: bool. :param plug: Whether or not this attribute can emit connections. :type socket: bool. :param socket: Whether or not this attribute can receive connections. :type dataType: type. :param dataType: Type of the data represented by this attribute in order to highlight attributes of the same type while performing a connection. """ if name in self.attrs: print('An attribute with the same name already exists on this node : {0}'.format(name)) print('Attribute creation aborted !') return self.attrPreset = preset # Create a plug connection item. if plug: plugInst = PlugItem(parent=self, attribute=name, index=self.attrCount, preset=preset, dataType=dataType, maxConnections=plugMaxConnections) self.plugs[name] = plugInst # Create a socket connection item. if socket: socketInst = SocketItem(parent=self, attribute=name, index=self.attrCount, preset=preset, dataType=dataType, maxConnections=socketMaxConnections) self.sockets[name] = socketInst self.attrCount += 1 # Add the attribute based on its index. if index == -1 or index > self.attrCount: self.attrs.append(name) else: self.attrs.insert(index, name) # Store attr data. self.attrsData[name] = {'name': name, 'socket': socket, 'plug': plug, 'preset': preset, 'dataType': dataType, 'plugMaxConnections': plugMaxConnections, 'socketMaxConnections': socketMaxConnections } # Update node height. self.update() def _deleteAttribute(self, index): """ Remove an attribute by reducing the node, removing the label and the connection items. :type index: int. :param index: The index of the attribute in the node. """ name = self.attrs[index] # Remove socket and its connections. if name in list(self.sockets.keys()): for connection in self.sockets[name].connections: connection._remove() self.scene().removeItem(self.sockets[name]) self.sockets.pop(name) # Remove plug and its connections. if name in list(self.plugs.keys()): for connection in self.plugs[name].connections: connection._remove() self.scene().removeItem(self.plugs[name]) self.plugs.pop(name) # Reduce node height. if self.attrCount > 0: self.attrCount -= 1 # Remove attribute from node. if name in self.attrs: self.attrs.remove(name) self.update() def updateNodeConnectionsPath(self): """ Update the connections position. """ for plug in list(self.plugs.values()): for connection in plug.connections: if (connection.target is not None and connection.source is not None): connection.target_point = connection.target.center() connection.source_point = connection.source.center() connection.updatePath() for socket in list(self.sockets.values()): for connection in socket.connections: if (connection.target is not None and connection.source is not None): connection.target_point = connection.target.center() connection.source_point = connection.source.center() connection.updatePath() def _disconnectAll(self): """ Disconnect this node from all nodes of the scene """ #reconnect if only one in and one out removedConnections = list() addedConnections = list() nodzInst = self.scene().views()[0] nodzInst.signal_StartCompoundInteraction.emit(nodzInst) selectionPlugConnectionItems = list() selectionSocketConnectionItems = list() #store connections before reconnecting in-out nodes, cause it will shunt incoming connection for selectedNode in nodzInst.selectedNodes: for socket in list(self.scene().nodes[selectedNode].sockets.values()): # Remove all sockets connections not in selection for iCon in range(0, len(socket.connections)): if socket.connections[iCon].plugNode not in nodzInst.selectedNodes: selectionPlugConnectionItems.append(socket.connections[iCon]) removedConnections.append(ConnectionInfo(socket.connections[iCon])) for plug in list(self.scene().nodes[selectedNode].plugs.values()): # Remove all plugs connections. for iCon in range(0, len(plug.connections)): if plug.connections[iCon].socketNode not in nodzInst.selectedNodes: selectionSocketConnectionItems.append(plug.connections[iCon]) removedConnections.append(ConnectionInfo(plug.connections[iCon])) if len(selectionPlugConnectionItems) == 1 and len(selectionSocketConnectionItems) == 1: plugItem = selectionPlugConnectionItems[0].plugItem socketItem = selectionSocketConnectionItems[0].socketItem # link previous plug to next socket if (socketItem.accepts(plugItem)): newConnection = nodzInst.createConnection(selectionPlugConnectionItems[0].plugNode, selectionPlugConnectionItems[0].plugAttr, selectionSocketConnectionItems[0].socketNode, selectionSocketConnectionItems[0].socketAttr) addedConnections.append(ConnectionInfo(newConnection)) # actually remove remaining connections for selectedNode in nodzInst.selectedNodes: for socket in list(self.scene().nodes[selectedNode].sockets.values()): # Remove all sockets connections. if len(socket.connections) > 0: connectionIndex = len(socket.connections) - 1 while connectionIndex >= 0: if socket.connections[connectionIndex].plugNode not in nodzInst.selectedNodes: socket.connections[connectionIndex]._remove() connectionIndex -= 1 for selectedNode in nodzInst.selectedNodes: for plug in list(self.scene().nodes[selectedNode].plugs.values()): # Remove all plugs connections. if len(plug.connections) > 0: connectionIndex = len(plug.connections) - 1 while connectionIndex >= 0: if plug.connections[connectionIndex].socketNode not in nodzInst.selectedNodes: plug.connections[connectionIndex]._remove() connectionIndex -= 1 if (len(removedConnections) > 0 or len(addedConnections) > 0): # for removedCon in removedConnections: # print "stack undo Redo connections : Remove {}.{} to {}.{}".format(removedCon.plugNode, removedCon.plugAttr, removedCon.socketNode, removedCon.socketAttr ) # for addedCon in addedConnections: # print "stack undo Redo connections : Add {}.{} to {}.{}".format(addedCon.plugNode, addedCon.plugAttr, addedCon.socketNode, addedCon.socketAttr ) # print('disconnectAll') nodzInst.signal_UndoRedoConnectNodes.emit(nodzInst, removedConnections, addedConnections) nodzInst.signal_EndCompoundInteraction.emit(nodzInst, True) else: nodzInst.signal_EndCompoundInteraction.emit(nodzInst, False) def _remove(self): """ Remove this node instance from the scene. Make sure that all the connections to this node are also removed in the process """ # Remove all sockets connections. for socket in list(self.sockets.values()): while len(socket.connections)>0: socket.connections[0]._remove() # Remove all plugs connections. for plug in list(self.plugs.values()): while len(plug.connections)>0: plug.connections[0]._remove() self.scene().nodes.pop(self.name) # Remove node. scene = self.scene() scene.removeItem(self) scene.update() def center(self): """ Return The center of the Slot. """ rect = self.boundingRect() center = QtCore.QPointF(rect.x() + rect.width() * 0.5, rect.y() + rect.height() * 0.5) return self.mapToScene(center) def boundingRect(self): """ The bounding rect based on the width and height variables. """ rect = QtCore.QRect(0, 0, self.baseWidth, self.height) rect = QtCore.QRectF(rect) return rect def checkIsWithinSceneRect(self): """ Resize scene if node position is outside of the scene """ currentNodz = self.scene().parent() config = currentNodz.config baseResolution = [config["scene_width"], config["scene_height"]] borderMarginRatio = config["scene_marginRatio"] currentPos = self.pos() sceneRect = self.scene().sceneRect() rectHasChanged = False borderMarginWidth = (borderMarginRatio * baseResolution[0]) borderMarginHeight = (borderMarginRatio * baseResolution[1]) if currentPos.x() - borderMarginWidth < sceneRect.x(): xBefore = sceneRect.x() sceneRect.setX(currentPos.x() - borderMarginWidth) xAfter = sceneRect.x() sceneRect.setWidth(sceneRect.width() + (xBefore - xAfter)) rectHasChanged = True if currentPos.y() - borderMarginHeight < sceneRect.y(): yBefore = sceneRect.y() sceneRect.setY(currentPos.y() - borderMarginHeight) yAfter = sceneRect.y() sceneRect.setHeight(sceneRect.height() + (yBefore - yAfter)) rectHasChanged = True if currentPos.x() + borderMarginWidth > sceneRect.x() + sceneRect.width(): sceneRect.setWidth( currentPos.x() - sceneRect.x() + borderMarginWidth ) rectHasChanged = True if currentPos.y() + borderMarginHeight > sceneRect.y() + sceneRect.height(): sceneRect.setHeight( currentPos.y() - sceneRect.y() + borderMarginHeight ) rectHasChanged = True if rectHasChanged: self.scene().setSceneRect(sceneRect) self.updateNodeConnectionsPath() def getAttributeAtPos(self, scenePos): """ return the attribute plug """ #check that scenePos x is in node range : yPos = scenePos.y() - self.pos().y() if (yPos <= 0 or yPos > self.height): return None yPos = yPos - self.baseHeight + self.radius # if (yPos > 0): take banner as first attribute (easier to click for layout) yPos /= self.attrHeight attributeIndex = int(yPos) # yPos is now the attribute index, if any : if(yPos < self.attrCount): return self.attrs[attributeIndex] return None def getAttributePlugAtPos(self, scenePos): """ return the attribute plug """ if (len(self.plugs) == 1): return next(iter(self.plugs.values())) attributeName = self.getAttributeAtPos(scenePos) if (attributeName is not None): #print "found plug for {}".format(attributeName) if attributeName in list(self.plugs.keys()): return self.plugs[attributeName] #print "found no plug" return None def getAttributeSocketAtPos(self, scenePos): """ return the attribute plug """ if (len(self.sockets) == 1): return next(iter(self.sockets.values())) attributeName = self.getAttributeAtPos(scenePos) if (attributeName is not None): #print "found socket for {}".format(attributeName) if attributeName in list(self.sockets.keys()): return self.sockets[attributeName] #print "found no socket" return None def shape(self): """ The shape of the item. """ path = QtGui.QPainterPath() path.addRect(self.boundingRect()) return path def paint(self, painter, option, widget): """ Paint the node and attributes. """ # Node base. painter.setBrush(self._brush) painter.setPen(self.pen) nodzInst = self.scene().views()[0] config = nodzInst.config viewport_rect = QtCore.QRect(0, 0, nodzInst.viewport().width(), nodzInst.viewport().height()) visible_scene_rect = nodzInst.mapToScene(viewport_rect).boundingRect() nodeSizeInScreenPixels = old_div(self.baseWidth * viewport_rect.width(), visible_scene_rect.width()) # displaying icon : attributesDisplayLimitPixOnScreen = config["attributes_display_limit"] titleDisplayLimitPixOnScreen = config["node_title_display_limit"] big_icon_display_limit = config["big_icon_display_limit"] if (nodeSizeInScreenPixels <= big_icon_display_limit): self.usingSquareDisplay = True else: self.usingSquareDisplay = False painter.drawRoundedRect(0, 0, self.baseWidth, self.height, self.radius, self.radius) # Node label. painter.setPen(self._textPen) painter.setFont(self._nodeTextFont) metrics = QtGui.QFontMetrics(painter.font()) text_width = metrics.boundingRect(self.name).width() + 14 text_height = metrics.boundingRect(self.name).height() + 14 margin = (text_width - self.baseWidth) * 0.5 textRect = QtCore.QRect(-margin, -text_height, text_width, text_height) if (self.icon is not None): if (nodeSizeInScreenPixels > big_icon_display_limit and nodeSizeInScreenPixels > titleDisplayLimitPixOnScreen): # display beside the node title iconSize = 32 margin = 4 iconRect = QtCore.QRect(textRect.left() - (old_div(iconSize,2)), textRect.top() - (iconSize + margin) + text_height, iconSize, iconSize) self.icon.paint(painter, iconRect, QtCore.Qt.AlignCenter, QtGui.QIcon.Normal, QtGui.QIcon.On) textRect.setRect(textRect.left() + (old_div(iconSize,2)), textRect.top() - old_div((iconSize - text_height + margin), 2), textRect.width(), textRect.height()) elif (nodeSizeInScreenPixels < big_icon_display_limit): iconSize = 128 if (self.scaledIcon is None): scaledPixmap2 = self.icon.pixmap(iconSize, iconSize).scaled(iconSize, iconSize, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation) self.scaledIcon = QtGui.QIcon(scaledPixmap2) # center on node attributes iconRect = QtCore.QRect(0 + old_div((self.baseWidth - iconSize),2), 0 + old_div((self.baseWidth - iconSize),2), iconSize, iconSize) self.scaledIcon.paint(painter, iconRect, QtCore.Qt.AlignCenter, QtGui.QIcon.Normal, QtGui.QIcon.On) if (nodeSizeInScreenPixels > titleDisplayLimitPixOnScreen): painter.drawText(textRect, QtCore.Qt.AlignCenter, self.name) # Attributes. if (nodeSizeInScreenPixels >= big_icon_display_limit): offset = 0 for attr in self.attrs: # Attribute rect. rect = QtCore.QRect(old_div(self.border, 2), self.baseHeight - self.radius + offset, self.baseWidth - self.border, self.attrHeight) attrData = self.attrsData[attr] name = attr preset = attrData['preset'] # Attribute base. self._attrBrush.setColor(utils._convertDataToColor(config[preset]['bg'])) if self.alternate: self._attrBrushAlt.setColor(utils._convertDataToColor(config[preset]['bg'], True, config['alternate_value'])) self._attrPen.setColor(utils._convertDataToColor([0, 0, 0, 0])) painter.setPen(self._attrPen) painter.setBrush(self._attrBrush) if (old_div(offset, self.attrHeight)) % 2: painter.setBrush(self._attrBrushAlt) painter.drawRect(rect) if (nodeSizeInScreenPixels > attributesDisplayLimitPixOnScreen): painter.setPen(utils._convertDataToColor(config[preset]['text'])) painter.setFont(self._attrTextFont) # Search non-connectable attributes. if nodzInst.drawingConnection: if self == nodzInst.currentHoveredNodeForConnection: if (attrData['dataType'] != nodzInst.sourceSlot.dataType or (nodzInst.sourceSlot.slotType == 'plug' and attrData['socket'] == False or nodzInst.sourceSlot.slotType == 'socket' and attrData['plug'] == False)): # Set non-connectable attributes color. painter.setPen(utils._convertDataToColor(config['non_connectable_color'])) textRect = QtCore.QRect(rect.left() + self.radius, rect.top(), rect.width() - 2*self.radius, rect.height()) painter.drawText(textRect, self._attrVAlign, name) offset += self.attrHeight def contextMenuEvent(self, event): if (self.scene().parent().editEnabled): self.scene().parent().signal_NodeContextMenuEvent.emit(event, self.name) def mousePressEvent(self, event): """ Keep the selected node on top of the others. """ # nodzInst = self.scene().views()[0] if (self.scene().parent().editEnabled): maxZValue = 0 nodes = self.scene().nodes for node in list(nodes.values()): node.setZValue(node.baseZValue) maxZValue = max(maxZValue, node.baseZValue) for item in list(self.scene().items()): if isinstance(item, ConnectionItem): item.setZValue(1) self.setZValue(maxZValue+1) self.attributeBeingPlugged = None # if middle click, initiate a link from the current attribute if (event.button() == QtCore.Qt.MiddleButton): self.attributeBeingPlugged = self.getAttributePlugAtPos(event.scenePos()) if (self.attributeBeingPlugged is not None): self.attributeBeingPlugged.mousePressEvent(event) else: super(NodeItem, self).mousePressEvent(event) self.lastMousePressPos = self.pos() # take position after potential node selection / edition which may change the layout else: super(NodeItem, self).mousePressEvent(event) def mouseDoubleClickEvent(self, event): """ Emit a signal. """ super(NodeItem, self).mouseDoubleClickEvent(event) if (self.scene().parent().editEnabled): self.scene().parent().signal_NodeDoubleClicked.emit(self.name) def mouseMoveEvent(self, event): """ . """ if (self.scene().parent().editEnabled): if (self.attributeBeingPlugged is not None): self.attributeBeingPlugged.mouseMoveEvent(event) else: if self.scene().views()[0].gridVisToggle: if self.scene().views()[0].gridSnapToggle or self.scene().views()[0]._nodeSnap: gridSize = self.scene().gridSize currentPos = self.mapToScene(event.pos().x() - old_div(self.baseWidth, 2), event.pos().y() - old_div(self.height, 2)) snap_x = (round(old_div(currentPos.x(), gridSize)) * gridSize) - old_div(gridSize,4) snap_y = (round(old_div(currentPos.y(), gridSize)) * gridSize) - old_div(gridSize,4) snap_pos = QtCore.QPointF(snap_x, snap_y) self.setPos(snap_pos) self.scene().updateScene() else: self.scene().updateScene() super(NodeItem, self).mouseMoveEvent(event) # Moving the node : is there a connectionItem around there to plug ourself nodzInst = self.scene().views()[0] config = nodzInst.config if event.modifiers() & QtCore.Qt.AltModifier: self._disconnectAll() # Handle drop on link : highlight currently selected link if any, and only if nodeItem is a pass through (1 in 1 out) nodzInst.currentHoveredLink = None if (len(self.plugs) == 1 and len(self.sockets) == 1): theNodePlug = next(iter(self.plugs.values())) theNodeSocket = next(iter(self.sockets.values())) plugConnections = theNodePlug.connections socketConnections = theNodeSocket.connections if (len(plugConnections) == 0 and len(socketConnections) == 0): mbb = utils._createPointerBoundingBox(pointerPos=event.scenePos().toPoint(),bbSize=config['mouse_bounding_box']) hoveredItems = self.scene().items(mbb) lowestDistance2 = 10000000000 for hoveredItem in hoveredItems: if (isinstance(hoveredItem, ConnectionItem)): # Check that link accepts plug-nodeSocket and nodePlug-socket connections # use theNodeSocket to test accepts, as plugs must be empty / not at max connection if (theNodeSocket.accepts(hoveredItem.plugItem) and theNodePlug.accepts(hoveredItem.socketItem)): fromScenePos = event.scenePos() toScenePos = hoveredItem.center() deltaPos = toScenePos - fromScenePos distance2 = deltaPos.x() * deltaPos.x() + deltaPos.y() * deltaPos.y() if (nodzInst.currentHoveredLink is None or distance2 < lowestDistance2): lowestDistance2 = distance2 nodzInst.currentHoveredLink = hoveredItem nodzInst.currentHoveredNodeForDrop = None mbb = utils._createPointerBoundingBox(pointerPos=event.scenePos().toPoint(),bbSize=config['mouse_bounding_box']) hoveredItems = self.scene().items(mbb) lowestDistance2 = 10000000000 for hoveredItem in hoveredItems: if (hoveredItem is not self and isinstance(hoveredItem, NodeItem) and hoveredItem.acceptNodeDrop): fromScenePos = event.scenePos() toScenePos = hoveredItem.center() deltaPos = toScenePos - fromScenePos distance2 = deltaPos.x() * deltaPos.x() + deltaPos.y() * deltaPos.y() if (nodzInst.currentHoveredNodeForDrop is None or distance2 < lowestDistance2): lowestDistance2 = distance2 nodzInst.currentHoveredNodeForDrop = hoveredItem self.checkIsWithinSceneRect() # else: # super(NodeItem, self).mouseMoveEvent(event) # parent graphic item will move on mouseMoveEvent if not blocked def mouseReleaseEvent(self, event): """ Emit signal_NodeMoved signal. """ if (self.scene().parent().editEnabled): # Emit node moved signal. nodzInst = self.scene().views()[0] if(event.button() == QtCore.Qt.LeftButton): if (self.lastMousePressPos != self.pos()): nodesMovedList = list() fromPosList = list() toPosList = list() deltaPosAdded = self.pos() - self.lastMousePressPos if (nodzInst.selectedNodes is not None): for selectedNode in nodzInst.selectedNodes: selectedNodeInst = self.scene().nodes[selectedNode] self.scene().signal_NodeMoved.emit(selectedNode, selectedNodeInst.pos()) nodesMovedList.append(selectedNode) fromPosList.append(selectedNodeInst.pos() - deltaPosAdded) toPosList.append(selectedNodeInst.pos()) # nodesMovedList.append(self) # fromPosList.append() # toPosList.append(self.pos()) # print("move node {} from {} to {}".format(self.name, self.lastMousePressPos, self.pos())) # if currentHoveredNodeForDrop is not None, we drop node on other node : don't care about "moving" i if nodzInst.currentHoveredNodeForDrop is None: nodzInst.signal_UndoRedoMoveNodes.emit(nodzInst, nodesMovedList, fromPosList, toPosList) #handle connection if dropped an unconnected "pass through" node on a link if nodzInst.currentHoveredLink is not None: fromNode = nodzInst.currentHoveredLink.plugNode fromAttr = nodzInst.currentHoveredLink.plugAttr toNode = nodzInst.currentHoveredLink.socketNode toAttr = nodzInst.currentHoveredLink.socketAttr theNodePlugAttr = iter(self.plugs.values()).next().attribute theNodeSocketAttr = iter(self.sockets.values()).next().attribute removedConnections = list() addedConnections = list() # pack the layout update call in a single call nodzInst.signal_StartCompoundInteraction.emit(nodzInst) removedConnections.append(ConnectionInfo(nodzInst.currentHoveredLink)) nodzInst.currentHoveredLink._remove() addedConnections.append(ConnectionInfo(nodzInst.createConnection(fromNode, fromAttr, self.name, theNodeSocketAttr))) addedConnections.append(ConnectionInfo(nodzInst.createConnection(self.name, theNodePlugAttr, toNode, toAttr))) nodzInst.signal_EndCompoundInteraction.emit(nodzInst, True) nodzInst.signal_UndoRedoConnectNodes.emit(nodzInst, removedConnections, addedConnections) if nodzInst.currentHoveredNodeForDrop is not None: nodzInst.signal_dropOnNode.emit(nodzInst, nodzInst.currentHoveredNodeForDrop.name) # can get back selection from nodzInst elif(event.button() == QtCore.Qt.MiddleButton): if (self.attributeBeingPlugged is not None): self.attributeBeingPlugged.mouseReleaseEvent(event) elif nodzInst.currentHoveredLink is not None: fromNode = nodzInst.currentHoveredLink.plugNode fromAttr = nodzInst.currentHoveredLink.plugAttr toNode = nodzInst.currentHoveredLink.socketNode toAttr = nodzInst.currentHoveredLink.plugAttr theNodePlugAttr = iter(self.plugs.values()).next().key() theNodeSocketAttr = iter(self.sockets.values()).next()().key() removedConnections = list() addedConnections = list() removedConnections.append(ConnectionInfo(nodzInst.currentHoveredLink)) nodzInst.currentHoveredLink._remove() addedConnections.append(ConnectionInfo(nodzInst.createConnection(fromNode, fromAttr, self, theNodeSocketAttr))) addedConnections.append(ConnectionInfo(nodzInst.createConnection(self, theNodePlugAttr, toNode, toAttr))) nodzInst.signal_UndoRedoConnectNodes.emit(nodzInst, removedConnections, addedConnections) # if(event.button() == QtCore.Qt.RightButton): # self.scene().parent().signal_NodeRightClicked.emit(self.name) self.attributeBeingPlugged = None if (nodzInst.currentHoveredNodeForDrop is None): super(NodeItem, self).mouseReleaseEvent(event) nodzInst.currentHoveredNodeForDrop = None nodzInst.currentHoveredLink = None self.setZValue(self.baseZValue) #restore the base Z order (notes behind, other ndoes in front...) # else: # super(NodeItem, self).mouseReleaseEvent(event) def hoverLeaveEvent(self, event): """ . """ if (self.scene().parent().editEnabled): nodzInst = self.scene().views()[0] for item in list(nodzInst.scene().items()): if isinstance(item, ConnectionItem): item.setZValue(0) super(NodeItem, self).hoverLeaveEvent(event) class SlotItem(QtWidgets.QGraphicsItem): """ The base class for graphics item representing attributes hook. """ def __init__(self, parent, attribute, preset, index, dataType, maxConnections): """ Initialize the class. :param parent: The parent item of the slot. :type parent: QtWidgets.QGraphicsItem instance. :param attribute: The attribute associated to the slot. :type attribute: String. :param index: int. :type index: The index of the attribute in the node. :type preset: str. :param preset: The name of graphical preset in the config file. :param dataType: The data type associated to the attribute. :type dataType: Type. """ super(SlotItem, self).__init__(parent) # Status. self.setAcceptHoverEvents(True) # Storage. self.slotType = None self.attribute = attribute self.preset = preset self.index = index self.dataType = dataType # Style. self.brush = QtGui.QBrush() self.brush.setStyle(QtCore.Qt.SolidPattern) self.pen = QtGui.QPen() self.pen.setStyle(QtCore.Qt.SolidLine) # Connections storage. self.connected_slots = list() self.newConnection = None self.connections = list() self.maxConnections = maxConnections def accepts(self, slot_item): """ Only accepts plug items that belong to other nodes, and only if the max connections count is not reached yet. """ # no plug on plug or socket on socket thePlugItem = None theSocketItem = None if isinstance(self, PlugItem): thePlugItem = self if isinstance(slot_item, PlugItem): thePlugItem = slot_item if isinstance(self, SocketItem): theSocketItem = self if isinstance(slot_item, SocketItem): theSocketItem = slot_item if thePlugItem is None or theSocketItem is None: return False # no self connection if self.parentItem() == slot_item.parentItem(): return False #no more than maxConnections if self.maxConnections>0 and len(self.connected_slots) >= self.maxConnections: return False #no connection with different types if slot_item.dataType != self.dataType: return False # if loop forbidden, the plug/source node should not be already connected to target via its source nodes nodzInst = self.scene().views()[0] if not nodzInst.allowLoop: validConnection = True processedNodes = list() nodesToProcess = list() nextNodesToProcess = list() processedNodes.append(theSocketItem.parentItem().name) #forbid target node in parents nodesToProcess.append(thePlugItem.parentItem()) # check parents from sourceNode while (not len(nodesToProcess) == 0 and validConnection): for nodeToProcess in nodesToProcess: processedNodes.append(nodeToProcess.name) for socket in list(nodeToProcess.sockets.values()): for connection in socket.connections: if connection.plugNode in processedNodes: validConnection = validConnection and connection.plugNode != processedNodes[0] # processedNodes[0] is theSocketItem.parentItem() else: nextNodesToProcess.append( self.scene().nodes[connection.plugNode] ) # may be stacked several times in nextNodesToProcess, but will be skipped later by processedNodes test if not validConnection: break nodesToProcess = nextNodesToProcess[:] nextNodesToProcess[:] = [] # del nodesToProcess[:] if not validConnection: print("This Connection would make a loop, this is forbidden") return #otherwise, all fine. return True def mousePressEvent(self, event): """ Start the connection process. """ if (self.scene().parent().editEnabled): if event.button() == QtCore.Qt.LeftButton or event.button() == QtCore.Qt.MiddleButton: self.newConnection = ConnectionItem(self.center(), self.mapToScene(event.pos()), self, None) self.connections.append(self.newConnection) self.scene().addItem(self.newConnection) nodzInst = self.scene().views()[0] nodzInst.drawingConnection = True nodzInst.sourceSlot = self nodzInst.currentDataType = self.dataType else: super(SlotItem, self).mousePressEvent(event) else: super(SlotItem, self).mousePressEvent(event) def mouseMoveEvent(self, event): """ Update the new connection's end point position. """ if (self.scene().parent().editEnabled): nodzInst = self.scene().views()[0] config = nodzInst.config if nodzInst.drawingConnection: mbb = utils._createPointerBoundingBox(pointerPos=event.scenePos().toPoint(), bbSize=config['mouse_bounding_box']) # Get nodes in pointer's bounding box. targets = self.scene().items(mbb) if any(isinstance(target, NodeItem) for target in targets): if self.parentItem() not in targets: for target in targets: if isinstance(target, NodeItem): nodzInst.currentHoveredNodeForConnection = target eventScenePos = self.mapToScene(event.pos()) nodzInst.currentHoveredAttribute = nodzInst.currentHoveredNodeForConnection.getAttributeAtPos(eventScenePos) else: nodzInst.currentHoveredNodeForConnection = None nodzInst.currentHoveredAttribute = None # Set connection's end point. self.newConnection.target_point = self.mapToScene(event.pos()) self.newConnection.updatePath() else: super(SlotItem, self).mouseMoveEvent(event) else: super(SlotItem, self).mouseMoveEvent(event) def mouseReleaseEvent(self, event): """ Apply the connection if target_slot is valid. """ if (self.scene().parent().editEnabled): nodzInst = self.scene().views()[0] if event.button() == QtCore.Qt.LeftButton or event.button() == QtCore.Qt.MiddleButton : nodzInst.drawingConnection = False nodzInst.currentDataType = None target = self.scene().itemAt(event.scenePos().toPoint(), QtGui.QTransform()) if isinstance(target, NodeItem): target = target.getAttributeSocketAtPos(event.scenePos()) if not isinstance(target, SlotItem): self.newConnection._remove() super(SlotItem, self).mouseReleaseEvent(event) return if target.accepts(self): self.newConnection.target = target self.newConnection.source = self self.newConnection.target_point = target.center() self.newConnection.source_point = self.center() # Perform the ConnectionItem. self.connect(target, self.newConnection) target.connect(self, self.newConnection) self.newConnection.updatePath() removedConnections = list() addedConnections = list() addedConnections.append(ConnectionInfo(self.newConnection)) nodzInst.signal_UndoRedoConnectNodes.emit(nodzInst, removedConnections, addedConnections) else: self.newConnection._remove() else: super(SlotItem, self).mouseReleaseEvent(event) else: super(SlotItem, self).mouseReleaseEvent(event) nodzInst.currentHoveredNodeForConnection = None nodzInst.currentHoveredNodeForDrop = None nodzInst.currentHoveredAttribute = None nodzInst.currentHoveredLink = None def shape(self): """ The shape of the Slot is a circle. """ path = QtGui.QPainterPath() path.addRect(self.boundingRect()) return path def paint(self, painter, option, widget): """ Paint the Slot. """ painter.setBrush(self.brush) painter.setPen(self.pen) nodzInst = self.scene().views()[0] config = nodzInst.config if nodzInst.drawingConnection: if self.parentItem() == nodzInst.currentHoveredNodeForConnection: # non connectable by type painter.setBrush(utils._convertDataToColor(config['connection_color'])) if (self.slotType == nodzInst.sourceSlot.slotType or self.dataType != nodzInst.sourceSlot.dataType): painter.setBrush(utils._convertDataToColor(config['non_connectable_color'])) else: if (len(self.parentItem().sockets) == 1 or self.attribute == nodzInst.currentHoveredAttribute): _penValid = QtGui.QPen() _penValid.setStyle(QtCore.Qt.SolidLine) _penValid.setWidth(2) _penValid.setColor(QtGui.QColor(255, 255, 255, 255)) painter.setPen(_penValid) painter.setBrush(utils._convertDataToColor(config['connection_sel_color'])) #painter.setBrush(self.brush) painter.drawEllipse(self.boundingRect()) def center(self): """ Return The center of the Slot. """ rect = self.boundingRect() center = QtCore.QPointF(rect.x() + rect.width() * 0.5, rect.y() + rect.height() * 0.5) return self.mapToScene(center) class PlugItem(SlotItem): """ A graphics item representing an attribute out hook. """ def __init__(self, parent, attribute, index, preset, dataType, maxConnections): """ Initialize the class. :param parent: The parent item of the slot. :type parent: QtWidgets.QGraphicsItem instance. :param attribute: The attribute associated to the slot. :type attribute: String. :param index: int. :type index: The index of the attribute in the node. :type preset: str. :param preset: The name of graphical preset in the config file. :param dataType: The data type associated to the attribute. :type dataType: Type. """ super(PlugItem, self).__init__(parent, attribute, preset, index, dataType, maxConnections) # Storage. self.attribute = attribute self.preset = preset self.slotType = 'plug' # Methods. self._createStyle(parent) def _createStyle(self, parent): """ Read the attribute style from the configuration file. """ config = parent.scene().views()[0].config self.brush = QtGui.QBrush() self.brush.setStyle(QtCore.Qt.SolidPattern) self.brush.setColor(utils._convertDataToColor(config[self.preset]['plug'])) def boundingRect(self): """ The bounding rect based on the width and height variables. """ width = height = self.parentItem().attrHeight / 2.0 nodzInst = self.scene().views()[0] config = nodzInst.config x = self.parentItem().baseWidth - (width / 2.0) y = (self.parentItem().baseHeight - config['node_radius'] + old_div(self.parentItem().attrHeight, 4) + self.parentItem().attrs.index(self.attribute) * self.parentItem().attrHeight) rect = QtCore.QRectF(QtCore.QRect(x, y, width, height)) return rect def connect(self, socket_item, connection): """ Connect to the given socket_item. """ if self.maxConnections>0 and len(self.connected_slots) >= self.maxConnections: # Already connected. self.connections[self.maxConnections-1]._remove() # Populate connection. connection.plugItem = self connection.plugNode = self.parentItem().name connection.plugAttr = self.attribute connection.socketItem = socket_item connection.socketNode = socket_item.parentItem().name connection.socketAttr = socket_item.attribute # Add socket to connected slots. if socket_item in self.connected_slots: self.connected_slots.remove(socket_item) self.connected_slots.append(socket_item) # Add connection. if connection not in self.connections: self.connections.append(connection) # Emit signal. nodzInst = self.scene().views()[0] nodzInst.signal_PlugConnected.emit(connection.plugNode, connection.plugAttr, connection.socketNode, connection.socketAttr) def disconnect(self, connection): """ Disconnect the given connection from this plug item. """ # Emit signal. nodzInst = self.scene().views()[0] nodzInst.signal_PlugDisconnected.emit(connection.plugNode, connection.plugAttr, connection.socketNode, connection.socketAttr) # Remove connected socket from plug if connection.socketItem in self.connected_slots: self.connected_slots.remove(connection.socketItem) # Remove connection self.connections.remove(connection) class SocketItem(SlotItem): """ A graphics item representing an attribute in hook. """ def __init__(self, parent, attribute, index, preset, dataType, maxConnections): """ Initialize the socket. :param parent: The parent item of the slot. :type parent: QtWidgets.QGraphicsItem instance. :param attribute: The attribute associated to the slot. :type attribute: String. :param index: int. :type index: The index of the attribute in the node. :type preset: str. :param preset: The name of graphical preset in the config file. :param dataType: The data type associated to the attribute. :type dataType: Type. """ super(SocketItem, self).__init__(parent, attribute, preset, index, dataType, maxConnections) # Storage. self.attribute = attribute self.preset = preset self.slotType = 'socket' # Methods. self._createStyle(parent) def _createStyle(self, parent): """ Read the attribute style from the configuration file. """ config = parent.scene().views()[0].config self.brush = QtGui.QBrush() self.brush.setStyle(QtCore.Qt.SolidPattern) self.brush.setColor(utils._convertDataToColor(config[self.preset]['socket'])) def boundingRect(self): """ The bounding rect based on the width and height variables. """ width = height = self.parentItem().attrHeight / 2.0 nodzInst = self.scene().views()[0] config = nodzInst.config x = - width / 2.0 y = (self.parentItem().baseHeight - config['node_radius'] + (old_div(self.parentItem().attrHeight,4)) + self.parentItem().attrs.index(self.attribute) * self.parentItem().attrHeight ) rect = QtCore.QRectF(QtCore.QRect(x, y, width, height)) return rect def connect(self, plug_item, connection): """ Connect to the given plug item. """ if self.maxConnections>0 and len(self.connected_slots) >= self.maxConnections: # Already connected. self.connections[self.maxConnections-1]._remove() # Populate connection. connection.socketItem = self connection.socketNode = self.parentItem().name connection.socketAttr = self.attribute connection.plugItem = plug_item connection.plugNode = plug_item.parentItem().name connection.plugAttr = plug_item.attribute # Add plug to connected slots. self.connected_slots.append(plug_item) # Add connection. if connection not in self.connections: self.connections.append(connection) # Emit signal. nodzInst = self.scene().views()[0] nodzInst.signal_SocketConnected.emit(connection.plugNode, connection.plugAttr, connection.socketNode, connection.socketAttr) def disconnect(self, connection): """ Disconnect the given connection from this socket item. """ # Emit signal. nodzInst = self.scene().views()[0] nodzInst.signal_SocketDisconnected.emit(connection.plugNode, connection.plugAttr, connection.socketNode, connection.socketAttr) # Remove connected plugs if connection.plugItem in self.connected_slots: self.connected_slots.remove(connection.plugItem) # Remove connections self.connections.remove(connection) class ConnectionItem(QtWidgets.QGraphicsPathItem): """ A graphics path representing a connection between two attributes. """ def __init__(self, source_point, target_point, source, target): """ Initialize the class. :param sourcePoint: Source position of the connection. :type sourcePoint: QPoint. :param targetPoint: Target position of the connection :type targetPoint: QPoint. :param source: Source item (plug or socket). :type source: class. :param target: Target item (plug or socket). :type target: class. """ super(ConnectionItem, self).__init__() self.setZValue(1) self.lastSelected = False # Storage. self.socketNode = None self.socketAttr = None self.plugNode = None self.plugAttr = None self.source_point = source_point self.target_point = target_point self.source = source self.target = target self.plugItem = None self.socketItem = None self.movable_point = None self.data = tuple() # Methods. self._createStyle() @property def pen(self): """ Return the pen based on the selection state of the node. """ nodzInst = self.source.scene().views()[0] if self.isSelected(): return self._penSel elif nodzInst.currentHoveredLink is self: return self._penHover else: return self._pen def paint(self, painter, option, widget): """ Paint the node and attributes. """ #handle selection change... isSelected = self.isSelected() if self.lastSelected != isSelected: self.updatePath() self.lastSelected = isSelected super(ConnectionItem, self).paint(painter, option, widget) def center(self): """ Return The center of the Slot. """ rect = self.boundingRect() center = QtCore.QPointF(rect.x() + rect.width() * 0.5, rect.y() + rect.height() * 0.5) return self.mapToScene(center) def _createStyle(self): """ Read the connection style from the configuration file. """ config = self.source.scene().views()[0].config self.setAcceptHoverEvents(True) self.setZValue(-1) self._pen = QtGui.QPen(utils._convertDataToColor(config['connection_color'])) self._pen.setWidth(config['connection_width']) # make link selectable + selection style self._penSel = QtGui.QPen(utils._convertDataToColor(config['connection_sel_color'])) self._penSel.setWidth(config['connection_sel_width']) # make link highlit self._penHover = QtGui.QPen(utils._convertDataToColor(config['connection_color'])) self._penHover.setWidth(config['connection_sel_width']) self.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable) def _outputConnectionData(self): """ . """ return ("{0}.{1}".format(self.plugNode, self.plugAttr), "{0}.{1}".format(self.socketNode, self.socketAttr)) def mousePressEvent(self, event): """ Make connection in front of other items """ nodzInst = self.scene().views()[0] for item in list(nodzInst.scene().items()): if isinstance(item, ConnectionItem): item.setZValue(0) super(ConnectionItem, self).mousePressEvent(event) def _remove(self): """ Remove this Connection from the scene. """ if self.source is not None: self.source.disconnect(self) if self.target is not None: self.target.disconnect(self) scene = self.scene() scene.removeItem(self) scene.update() def updatePath(self): """ Update the path. """ self.setPen(self.pen) path = QtGui.QPainterPath() path.moveTo(self.source_point) dx = (self.target_point.x() - self.source_point.x()) * 0.5 dy = self.target_point.y() - self.source_point.y() ctrl1 = QtCore.QPointF(self.source_point.x() + dx, self.source_point.y() + dy * 0) ctrl2 = QtCore.QPointF(self.source_point.x() + dx, self.source_point.y() + dy * 1) path.cubicTo(ctrl1, ctrl2, self.target_point) self.setPath(path)
python
Amir to Pat Cummins, out Caught by Rizwan!! Another one bites the dust, and this time Cummins decides to walk. He shuffled across a long way and didn't expect a bouncer coming. He goes on with the pull shot, but he is late into the shot. He gets a faint top edge and Rizwan behind the stumps snares it with ease. Pat Cummins c Rizwan b Amir 0(3) Amir to Mitchell Marsh, out Caught by Imad Wasim!! First-ball dismissal for Marsh and Australia are in strife now. Loose shot from Marsh, this was full, this was wide outside off. Marsh threw his hands at the drive, went with hard hands, didn't bother to keep it down. Straight into the hands of Imad Wasim at extra-cover. Amir is thrilled to bits and Pakistan are making a roaring comeback into the game. The move to push Marsh up the order hasn't worked. Mitchell Marsh c Imad Wasim b Amir 0(1)
english
<reponame>DenysMelnychenko2021/goit-react-hw-07-phonebook import { createAction } from '@reduxjs/toolkit'; export const handleFilterChange = createAction('phonebook/HandleFilterChange');
javascript
{"status":{"code":200,"http":"Fetched (ring) 200 600 and parsed 1/90 entries","nextFetch":1505906,"entriesCountSinceLastMaintenance":2,"velocity":5.8,"generatedIds":true,"period":600,"lastFetch":1505905,"lastParse":1505905,"lastMaintenanceAt":1505896,"feed":"https://www.theguardian.com/uk/technology/rss"},"permalinkUrl":"https://www.theguardian.com/uk/technology","standardLinks":{"alternate":[{"title":"Technology | The Guardian","rel":"alternate","href":"https://www.theguardian.com/uk/technology","type":"text/html"}],"image":[{"title":"The Guardian","rel":"image","href":"https://assets.guim.co.uk/images/guardian-logo-rss.c45beb1bafa34b347ac333af2e6fe23f.png","type":"image/png"}]},"image":"https://assets.guim.co.uk/images/guardian-logo-rss.c45beb1bafa34b347ac333af2e6fe23f.png","title":"Technology | The Guardian","updated":1505905660,"id":"technology-the-guardian-2017-9-20-11","items":[{"id":"https://www.theguardian.com/film/filmblog/2017/sep/20/tomb-raider-alicia-vikander-reboot-white-saviour-barbie","published":1505905265,"updated":1505905265,"title":"Tomb Raider: is the Alicia Vikander reboot just Gap Yah: The Movie?","summary":"<p>A privileged young white woman gallivants around the developing world in search of adventure … is it Lara Croft or White Saviour Barbie?</p><p>Remember White Saviour Barbie? <a href=\"https://www.instagram.com/barbiesavior/?hl=en\">It was big on Instagram last year</a>. White Saviour Barbie only had one joke, but it was a doozy: it followed the adventures of a wide-eyed Barbie doll as she travelled through the developing world on a gap year in the naive assumption that she was somehow helping. “What better way to bless the villagers than a fresh coat of paint?!” she asked in one post. “Many of them don’t know the calming effect that just the right color can provide. I’m just doing what I can to help these huts become homes”.</p><p>White Saviour Barbie is so popular that they’ve now made a movie about her, <a href=\"https://www.theguardian.com/film/2016/apr/28/alicia-vikander-lara-croft-tomb-raider-reboot-movie\">starring Alicia Vikander</a>. True, they’ve called the movie Tomb Raider for some reason, but anyone with half a brain can see from the trailer that it’s really about White Saviour Barbie. Let’s run through some quick comparisons.</p> <a href=\"https://www.theguardian.com/film/filmblog/2017/sep/20/tomb-raider-alicia-vikander-reboot-white-saviour-barbie\">Continue reading...</a>","permalinkUrl":"https://www.theguardian.com/film/filmblog/2017/sep/20/tomb-raider-alicia-vikander-reboot-white-saviour-barbie","standardLinks":{"alternate":[{"title":"Tomb Raider: is the Alicia Vikander reboot just Gap Yah: The Movie?","rel":"alternate","href":"https://www.theguardian.com/film/filmblog/2017/sep/20/tomb-raider-alicia-vikander-reboot-white-saviour-barbie","type":"text/html"}],"enclosure":[{"title":"Tomb Raider: is the Alicia Vikander reboot just Gap Yah: The Movie?","rel":"enclosure","href":"https://i.guim.co.uk/img/media/2b147cf8a60816625ae0509ccd9bf5483d1c10a8/77_0_2310_1386/master/2310.jpg?w=140&q=55&auto=format&usm=12&fit=max&s=7e279ac593f4060730e0c2f2bbf2c601"},{"title":"Tomb Raider: is the Alicia Vikander reboot just Gap Yah: The Movie?","rel":"enclosure","href":"https://i.guim.co.uk/img/media/2b147cf8a60816625ae0509ccd9bf5483d1c10a8/77_0_2310_1386/master/2310.jpg?w=460&q=55&auto=format&usm=12&fit=max&s=f1f69b9539b19b71e01c04a6040b8462"}]},"actor":{"displayName":"<NAME>","id":"Stuart Heritage"},"categories":["Film","Tomb raider","Culture","Games","Alicia Vikander","Gap year travel","Travel","Technology"],"language":"en"}]}
json
45 Written Answers AGRAHAYANA 6, 1908 (SAKA) (c) whether Government are also aware that due to time gap of half-an-hour in plying DTC buses, the number of commuters sometimes swells to more than 100 at the very starting points and nearly half of them travel in standing position to their destinations; and (d) if so, the steps Government propose to take to remove such inconveniences ? THE MINISTER OF STATE OF THE MINISTRY OF SURFACE TRANSPORT (SHRI RAJESH PILOT): (a) Instances of non-issuance of tickets in advance by the conductors at the starting point have come to the notice. (b) Besides taking action against defaulting staff on receipt of specific complaints, standing instructions to the conductors to pre-book the buses at the starting point are repeated to the conductors and the Regional Managers are asked to ensure strict compliance. (c) and (d). There is heavy rush and With a over crowding during peak hours. view to provide adequate transport services, besides arranging trips as per traffic requirements DTC has planned augmentation of fleet by acquiring 408 buses during the current year. The steps are taken for improvement of maintenance facilities thereby improving the carrying capacity of fleet existing fleet. vehicle utilisation, utilisation, and reduction in number of breakdowns. The operational efficiency is also planned to be stepped by intensifying line-checking and monitoring of operations. Pension Adalats in South Central Railway 3582. SHRI MANIK REDDY: Will the Minister of RAILWAYS be pleased to state : (a) whether it is a fact that the South Central Railway will hold 'Pension Adalats' at various places; and (b) if so, the details of the 'Pension Adalats' scheme and the centres where these will be located and the number of retired railway employees expected to be benefited by the Scheme ? Written Answers 46 THE MINISTER OF STATE OF THE MINISTRY OF RAILWAYS (SHRI MADHAVRAO SCINDIA).: (a) Yes, Sir. (b) Pension Adalat' is proposed to be held at Secunderabad (for Hyderabad and Secunderabad Divisions and other Units including workshops in Secunderabad area), Hubli, Vijayawada and Guntakal. The dates are yet to be fixed. As regards the number of retired employees that would be benefitted, it would depend on the number of cases that would be referred to the Pension Adalats and the admissibility of the claims as per rules in respect of these cases. So far 634 representations have been received to be considered by these Pension Adalats. IDA to Finance Project to Boost Ground Water Resources 3583. SHRIMATI MADHUREE SINGH : Will the Minister of WATER RESOURCES be pleased to state: (a) whether the International Development Association has agreed to finance a project to boost ground water resources for increasing agricultural production; and (b) if so, the details thereof ? THE MINISTER OF WATER RESOURCES (SHRI B. SHANKARANAND) : (a) Yes, Sir. (b) International Development Association have recently approved a credit of US $ 68 million for the Bihar Public Tubewells Scheme costing about Rs. 130 crores. The Scheme would cover 26 Districts of Northern Bihar and would irrigate 8 Command Area of 4,47,000 ha. OB completion. Mabi Bajajsagar Project 3584. SHRI KEYUR BHUSHAN : Will the Minister of WATER RESOURCES be pleased to state : (a) what were the conditions on which Government of Madhya Pradesh agreed for the construction of Mahi-Bajajsagar project of Rajasthan; 47 Written Answers (b) have those conditions been fulfilled, if not, what has been the difference in fulfilment of the conditions to which Government of Madhya Pradesh agreed; (c) whether it is appropriate for a State to violate the conditions to which it is a party, (d) what are the details of the Madhya Pradesh land coming submergence due to construction of Mahi-Bajajsagar Project of Rajasthan and whether the Government of Rajasthan has agreed to pay adequate compensation to Madhya Pradesh; and (e) if not, whether Union Government will persuade the Government of Rajasthan to pay adequate compensation ? THE MINISTER OF WATER RESOURCES (SHRI B. SHANKARANAND): (a) to (e). The Government of Madhya Pradesh agreed to the construction of Mahi-Bajajsagar Project in Rajasthan in 1962 subject to the reservation of 13 TMC of water for upstream utilisation in Madhya Pradesh and accordingly Government of Rajasthan have reserved 12 TMC of water for use in Madhya Pradesh area. The revised Project report of MahiBajajsagar, Unit-I prepared by the Government of Rajasthan in 1978, involves the submergence of 622.43 ha, in Madhya Pradesh. Replacement for Kanishka 3585. SHRI SANAT KUMAR MANDAL: DR. B L. SHAILESH : Will the Minister of CIVIL AVIATION be pleased to state: (a) whether Air India has landed in trouble with its fleet plan following the grounding of 2 Boeings 747; (b) whether the Airlines has not been able to secure the Boeing 747 SP aircraft as a replacement for 'Kanishka' so far; and (c) if so, its likely effect on the airline's schedule for the next 6 to 8 months and its financial implications from the point of view of the Airlines traffic earnings ? Written Answers 48 THE MINISTER OF STATE OF THE MINISTRY OF CIVIL AVIATION (SHRIJAGDISH TYTLER): (a) No, Sir. The schedule of flights is being maintained. (b) Air India is in the process of selecting an aircraft to replace 'Kanishka'. (c) Following the loss of Kanishka', services to Canada were suspended and some services to Gulf were being operated with Airbus/Boeing 707. Consequent upon the phasing out of Boeing 707s, the capacity to the Gulf, which was curtailed, has now been restored by operations with A-310 Airbus aircraft. Passenger amenities at Nagercoil Town Railway Station 3586. SHRI N. DENNIS : Will the Minister of RAILWAYS be pleased to state : (a) whether Government are aware of the difficulties faced by the passengers due to the absence of platform, latrine and waiting room at Nagercoil Town Railway Station of the Trivendrum-Kanya Kumari Railway line; (b) whether proper road facility would be provided to this station; and (c) the steps Government propose to take to provide the above said passenger facilities at this railway station ? THE MINISTER OF STATE OF THE MINISTRY OF RAILWAYS (SHRI MADHAVRAO SCINDIA): (a) No, Sir. These facilities already exist. (b) A metelled approach road connecting the Nagercoil Station with National Highway already exists. (c) Does not arise. India's Participation in Seoul Asiad 3587. SHRI MOOL CHAND, DAGA : Will the Minister of HUMAN RESOURCE DEVELOPMENT be pleased to state : (a) whether it is a fact that although coaching camps were held only for 12 disciplines, India took part in 22 events at Seoul; 49 Written Answers AGRAHAYANA 6, 1908 (SAKA) Written Answers 50 developed to further promote IEC efforts for family welfare. One major objective listed in the Communication Guidelines that have been developed in this connection is to highlight male responsibility and increase male participation in family planning. This is being taken up as a particular theme, addressed through special communication materials created for the mass media, as also inter-personal communication. (b) if so, how the selection was made for the events in which India participated in Seoul ASIAD; (c) the number of events in which India participated in ASIAD, 1982; and (d) the number of members of the contingent who took their families with them and the number of them who stayed back and did not join the contingent on return ? THE MINISTER OF STATE IN THE DEPARTMENTS OF YOUTH AFFAIRS AND SPORTS AND WOMEN AND CHILD DEVELOPMENT IN THE MINISTRY OF HUMAN RESOURCE DEVELOPMENT (SHRIMATI MARGARET ALVA): (a) No, Sir. (b) Selections were made by the Indian Olympic Association and Government clearance given according to prescribed criteria. (c) Indian sportspersons and teams were cleared for participation in 24 competitions in X Asian Games, 1986. (d) According to information furnished by Indian Olympic Association, no members of Indian contingent took their families to Seoul and no member of the contingent stayed back at Seoul after Indian contingent left for India. Proposal to Educate Males on Birth Control 3588. SHRI LAKSHMAN MALLICK : Will the Minister of HEALTH AND FAMILY WELFARE be pleased to state : (a) whether there is any proposal under the consideration of Government to impart education to males, particularly fathers, on birth control and also on the population explosion as they are the ones who take decision about the number of children in their family; and (b) if so, the details thereof? THE MINISTER OF STATE IN THE MINISTRY OF HEALTH AND FAMILY WELFARE (KUMARI SAROJ KHAPARDE) : (a) Yes, Sir. series of (b) A communication campaigns multi-media are being In the existing programme, the multipurpose male workers are required to identify the male community leaders in each village of his area for promotion of family welfare programme. For enlisting the support of local male leaders, opinion leaders' camps are also being organised by the State Government and through voluntary organisations for promotion of small family Dorms. The multi-purpose male workers are required to provide follow up services to male family planning acceptors, identify side effects, give treatment on the spot for side effects and minor complaints, and to refer those cases that need attention by the physician to the Primary Health Centres/ Hospitals. Overbridge at Sanatoagar Railway Crossing (Hyderabad) 3589. SHRI S. PALAKONDRAYUDU : Will the Minister of RAILWAYS be pleased to state : (a) whether there is any proposal to construct overbridge at Sanatnagar Railway crossing (Hyderabad); and (b) if so, the details of the proposal and the amount sanctioned ? THE MINISTER OF STATE OF THE MINISTRY OF RAILWAYS (SHRI MADHAVRAO SCINDIA): (a) Yes, Sir. (b) Construction of a road over bridge at Sanathnagar in lieu of existing level crossing has been sanctioned on cost sharing basis with the State Government. The sanctioned cost of the work is Rs. 114.08 lakhs (Railways' share Rs, 74.03 lakhs).
english
#subsonic-container form { width: auto; background: #fff; position: absolute; display: grid; grid-template-columns: 10em 10em; z-index: 1; }
css
WWE will present WrestleMania Backlash in just a matter of hours, live from the Dunkin' Donuts Center in Providence, Rhode Island. The event will be the first major premium live event since the two-night WrestleMania 38 showcase that took place last month in Arlington, Texas. A number of high-stakes encounters will take place in the ring, as SmackDown Women's Champion Charlotte Flair will defend her title against Ronda Rousey in an "I Quit Match." In WrestleMania rematches, Cody Rhodes will battle Seth "Freakin" Rollins, and Edge will go toe to toe with AJ Styles. As always, with a major event, not everybody can be squeezed onto the card, and a large number of the company's current champions will not be in action tonight. With that being said, let's take a look at six current champions who are surprisingly missing from WrestleMania Backlash. Since capturing the WWE Women's Tag Team Championship at WrestleMania 38, Sasha Banks and Naomi have been on a roll. They are currently embroiled in a feud with Natalya and Shayna Baszler. Although surprisingly not booked for tonight's premium live event, the team will defend their tag team gold this Friday on SmackDown against The Queen of Harts and The Queen of Spades. The 24/7 Championship has been seeing a lot of television time lately on RAW. There was even a chaotic wedding just recently, which resulted in the 24/7 title changing hands numerous times. The 24/7 segments are a lot of fun when done right and always add something different. Though nothing has been officially announced, it would be a surprise if not even one segment airs involving Dana Brooke to break up the premium live event. The Intercontinental Champion has been on a strange course as of late. Going from hardly being defended during Shinsuke Nakamura's reign, to Ricochet now ultimately becoming a fighting champion. Though now regularly being defended, the title did not even make it onto the WrestleMania 38 card, despite it being a two-night event. WrestleMania Backlash could have been the night to make amends for that to focus the spotlight on the prestigious title once more. Despite being embarrassed at WrestleMania 38, after losing to Pat McAfee and then being Stunned out of the ring by "Stone Cold" Steve Austin, Theory is in the midst of a big push. The United States Champion, who is the Protégé of Mr. McMahon, should in all likelihood have a significant match at the premium live event tonight. This will further build his momentum after winning the title on April 18 against Finn Bálor. After overcoming the odds at The Show of Shows to take the RAW Women's Championship from Becky Lynch, Bianca Belair has had to face the wrath of WWE official Sonya Deville. Sonya in fact faced Belair on the April 25 episode of RAW in a losing effort with the title on the line. With no essential build-up to a major RAW Women's Championship bout, The EST is surprisingly absent from WrestleMania Backlash tonight, despite her ever-growing popularity and return to the top of the women's division. Which opponent would you choose for Bianca Belair if she was to defend the RAW Women's Championship at WrestleMania Backlash? Let us know in the comments section below! Poll : Are you tuning in to watch WrestleMania Backlash tonight?
english
In his memoir Spare, Prince Harry said that he had asked Meghan Markle not to get clicked in front of the white-marble mausoleum as he did not want people to think she was mimicking his mother. New Delhi: Meghan Markle , who visited India in 2017, received an advice from her husband Prince Harry ahead of her trip. Harry, also known as the Duke of Sussex , told his wife Meghan not to take a picture in front of iconic Taj Mahal . Meghan visited India in January 2017 as part of her work with the charity World Vision. In his memoir Spare, Harry said that he had asked Meghan not to get clicked in front of the white-marble mausoleum as he did not want people to think she was mimicking his mother. Diana, Princess of Wales was clicked sitting alone on a bench in the front of Taj Mahal. She visited the mausoleum in 1992 on an official state visit to India. The picture was widely interpreted as a statement of her solitude and her strained relationship with King Charles III. Prince Harry said that he and Meghan Markle laughed about the advice he gave her ahead of her India visit. “Do not take a photo in front of the Taj Mahal. She’d asked why and I’d said: My mum,” Prince Harry wrote. “I’d explained that my mother had posed for a photo there, and it had become iconic, and I didn’t want anyone thinking Meg was trying to mimic my mother. I didn’t want anyone thinking Meg was trying to mimic my mother. Meg had never heard of this photo, and found the whole thing baffling, and I loved her for being baffled,’ the 38-year-old said in his memoir. Prince Harry earlier in an interview said that his brother Prince William and his wife Kate Middleton “stereotyped” Meghan Markle as a “divorced biracial American actress”. “There was a lot of stereotyping that was happening, that I was guilty of as well, at the beginning. American actress, right, and that was playing out in the British press in the media at the time as well. Some of the things that my brother and sister-in-law – some of the way that they were acting or behaving – definitely felt to me as though, unfortunately, that stereotyping was causing a bit of a barrier to them really sort of, you know, introducing or welcoming her in," he said in the interview with Britain's ITV channel.
english
{ "name": "bruteforce", "version": "0.0.2", "description": "generate every possible permutation of characters", "devDependencies": { "should": "4.1.0" }, "main": "lib/bruteforce.js", "scripts": { "test": "node ./test.js" }, "author": "<NAME> <<EMAIL>> (http://ajaymt.github.com)", "license": "MIT", "repository": { "type": "git", "url": "http://github.com/AjayMT/bruteforce.git" }, "keywords": ["utility", "brute", "force", "bruteforce", "permutation"] }
json
Play Far Cry 5, Naraka: Bladepoint and other games this month! Play Far Cry 5, Naraka: Bladepoint and other games this month! Manage your messages better! Will it be the most powerful Android smartphone? No wonder Carell played boss in both instances. Samsung introduces 200MP camera sensor with smallest pixels. The US carriers are making it difficult for Nothing! GoT fans await the prequel. Apple AR Glass now in design development stage. Uber and Lyft drivers want more control over ride selection and pricing!
english
--- layout: post date: '2016-06-18' title: "Watters Wtoo by Wedding Dress Nicola 18259" category: Watters tags: [Watters] --- ### Watters Wtoo by Wedding Dress Nicola 18259 Just **$307.99** ### &nbsp; <a href="https://www.eudances.com/en/watters/954-wtoo-by-watters-wedding-dress-nicola-18259.html"><img src="//www.eudances.com/2800-thickbox_default/wtoo-by-watters-wedding-dress-nicola-18259.jpg" alt="Wtoo by Watters Wedding Dress Nicola 18259" style="width:100%;" /></a> <!-- break --><a href="https://www.eudances.com/en/watters/954-wtoo-by-watters-wedding-dress-nicola-18259.html"><img src="//www.eudances.com/2801-thickbox_default/wtoo-by-watters-wedding-dress-nicola-18259.jpg" alt="Wtoo by Watters Wedding Dress Nicola 18259" style="width:100%;" /></a> <a href="https://www.eudances.com/en/watters/954-wtoo-by-watters-wedding-dress-nicola-18259.html"><img src="//www.eudances.com/2799-thickbox_default/wtoo-by-watters-wedding-dress-nicola-18259.jpg" alt="Wtoo by Watters Wedding Dress Nicola 18259" style="width:100%;" /></a> Buy it: [https://www.eudances.com/en/watters/954-wtoo-by-watters-wedding-dress-nicola-18259.html](https://www.eudances.com/en/watters/954-wtoo-by-watters-wedding-dress-nicola-18259.html)
markdown
<gh_stars>0 var NAVTREEINDEX66 = { "d6/d91/classMCPhoton.html#a0c5f7e0fedca36958eace43d42988745":[4,0,383,50], "d6/d91/classMCPhoton.html#a0ef7d41745717a1cd2592a65117b69e4":[4,0,383,38], "d6/d91/classMCPhoton.html#a15a68f5a0f111a2f6727843467ee34fe":[4,0,383,29], "d6/d91/classMCPhoton.html#a167b14ef376b7760c39be47689293f89":[4,0,383,6], "d6/d91/classMCPhoton.html#a179253e087a07ed35bc027066281ee21":[4,0,383,43], "d6/d91/classMCPhoton.html#a26f15f2e53d93e71812c37da8dbb49d3":[4,0,383,32], "d6/d91/classMCPhoton.html#a2d08774de857af2a6f58d1a84e3ad246":[4,0,383,14], "d6/d91/classMCPhoton.html#a308134594fc96cbbba2660c6447c49b5":[4,0,383,64], "d6/d91/classMCPhoton.html#a34630bd1340bd1c20dfa890ae6247bfa":[4,0,383,19], "d6/d91/classMCPhoton.html#a385c5b6b58998d1012e07ce7e6a33364":[4,0,383,70], "d6/d91/classMCPhoton.html#a38b4aa09114487b6905a1a53b11ed670":[4,0,383,16], "d6/d91/classMCPhoton.html#a3acb1cf7040aaeebb8ed1e0249f95edd":[4,0,383,45], "d6/d91/classMCPhoton.html#a402cbd638c472ed8494e2da68e56314c":[4,0,383,44], "d6/d91/classMCPhoton.html#a4559375a2b6061f272c1758225f24866":[4,0,383,22], "d6/d91/classMCPhoton.html#a47af07dd11a9e21c582e15a5a06205cd":[4,0,383,56], "d6/d91/classMCPhoton.html#a4c89239c1c7e07f461138d6b11913605":[4,0,383,26], "d6/d91/classMCPhoton.html#a4e6ea109679b22aff2003630294176dd":[4,0,383,12], "d6/d91/classMCPhoton.html#a5511fce82366ab451634a3f5383518c7":[4,0,383,35], "d6/d91/classMCPhoton.html#a5ba10503f2189498c9346a1da859432b":[4,0,383,31], "d6/d91/classMCPhoton.html#a61e8ac6872a5230dbb5938634c3ca200":[4,0,383,1], "d6/d91/classMCPhoton.html#a64722c9994d8a7f9f0de3ffa22305499":[4,0,383,57], "d6/d91/classMCPhoton.html#a65e88b9b750cd29301882ceb5499f80fa5a0806c9f404d4a3f68b316f74cb2be7":[4,0,383,0], "d6/d91/classMCPhoton.html#a6d37e23cc758b3a401afa50b41ce4ea3":[4,0,383,40], "d6/d91/classMCPhoton.html#a6d8d985751a938765ee2e66584b72639":[4,0,383,46], "d6/d91/classMCPhoton.html#a7156b1cb6c410941b5199cc547dbbd7a":[4,0,383,48], "d6/d91/classMCPhoton.html#a71617ab8d78f9298316abe0f48c869db":[4,0,383,21], "d6/d91/classMCPhoton.html#a71e3febba5cc3eb90a004014f869ee38":[4,0,383,36], "d6/d91/classMCPhoton.html#a721927d60f1d57b4f7d2da3ecee8f8e4":[4,0,383,61], "d6/d91/classMCPhoton.html#a75de650a5eaf38400eb02c3479ba8a2c":[4,0,383,71], "d6/d91/classMCPhoton.html#a77c57ffafac4af42bb8a9508b6c15167":[4,0,383,11], "d6/d91/classMCPhoton.html#a77dce01043455158ecae12c6ba6879a9":[4,0,383,58], "d6/d91/classMCPhoton.html#a797af6e8f1cbad2c7a7696e55b9bc061":[4,0,383,69], "d6/d91/classMCPhoton.html#a7ce0557978c496c6918382648f5507c9":[4,0,383,49], "d6/d91/classMCPhoton.html#a7cf2e4de3061ca960f548d3632e548d5":[4,0,383,10], "d6/d91/classMCPhoton.html#a7f56ad0106f5a98422a93fce3687e4e4":[4,0,383,30], "d6/d91/classMCPhoton.html#a7f7838d781c4099d307aca0333a28c39":[4,0,383,27], "d6/d91/classMCPhoton.html#a839aad2daf6f3cf2a0d5591ffd44df69":[4,0,383,62], "d6/d91/classMCPhoton.html#a83e62138a7dd3925ebdabc5d577e9399":[4,0,383,65], "d6/d91/classMCPhoton.html#a8a887910f75243a73c3fc831a23cef93":[4,0,383,51], "d6/d91/classMCPhoton.html#a8c57bda9aacf1e72c956d612ab469064":[4,0,383,39], "d6/d91/classMCPhoton.html#a8ea03cdd9036365d682b7dfaa1aa8cd2":[4,0,383,63], "d6/d91/classMCPhoton.html#a8fc1a48cf82d7a13929e62bdef56bc68":[4,0,383,23], "d6/d91/classMCPhoton.html#a91d4315875814e4406274ded02ae4f27":[4,0,383,34], "d6/d91/classMCPhoton.html#a9f847244af8aa1f9ef7b132e9e04bb48":[4,0,383,68], "d6/d91/classMCPhoton.html#a9fe681a36ceff43511262695fa826cb7":[4,0,383,41], "d6/d91/classMCPhoton.html#aa1f0e52e33865fedebac6ae16cc687f6":[4,0,383,67], "d6/d91/classMCPhoton.html#aaa07f0c649167a4ad2eee6884947d427":[4,0,383,33], "d6/d91/classMCPhoton.html#aaaf7985a092cdb9cea1dc1d69de1f393":[4,0,383,60], "d6/d91/classMCPhoton.html#aad21f3ee179c7b375aa873acd7c9ce91":[4,0,383,54], "d6/d91/classMCPhoton.html#ab5c24bc6282a2c620d89e4d8c9c2d8fe":[4,0,383,9], "d6/d91/classMCPhoton.html#ab6cae07ead7b3756a5766c20701263d3":[4,0,383,24], "d6/d91/classMCPhoton.html#ab74e441a78de5a64fd0026e233f5a274":[4,0,383,25], "d6/d91/classMCPhoton.html#abaf31fdec6b6a8d6541a650c62f01341":[4,0,383,18], "d6/d91/classMCPhoton.html#abb1a3bb8b46bae5efffef5168e2dfadf":[4,0,383,5], "d6/d91/classMCPhoton.html#abc7e731096e1eb87fe26e6a5121f7a29":[4,0,383,3], "d6/d91/classMCPhoton.html#abcd87d6f5c77627e3311c07e42af9feb":[4,0,383,59], "d6/d91/classMCPhoton.html#ac4d204e9f90fb37a1746a55627e9f294":[4,0,383,37], "d6/d91/classMCPhoton.html#ace344451b92c0540c5c711f3d31513f8":[4,0,383,47], "d6/d91/classMCPhoton.html#ace96361dadbb0d2759d8a7716294c86b":[4,0,383,4], "d6/d91/classMCPhoton.html#ad0a80e4f26941cc2560485f9e1515007":[4,0,383,8], "d6/d91/classMCPhoton.html#ad528a0448fe97642f16ac3770da5b4e4":[4,0,383,52], "d6/d91/classMCPhoton.html#ad5db45267485408b7964ad4130a553c8":[4,0,383,17], "d6/d91/classMCPhoton.html#ade6f0400b918ad2e180e47718a894acf":[4,0,383,42], "d6/d91/classMCPhoton.html#ae4e442bb9099653734cb59867c26022b":[4,0,383,15], "d6/d91/classMCPhoton.html#ae514c21c50d60f1ca52fdaf22e9d9bba":[4,0,383,66], "d6/d91/classMCPhoton.html#af0e890296f3b7172cbc595169ff1ed76":[4,0,383,28], "d6/d91/classMCPhoton.html#af3a4fbfe3e9efc5e12ec1299a4b50b6e":[4,0,383,2], "d6/d91/classMCPhoton.html#af87c9fff5fd23569f94652fab9941d66":[4,0,383,7], "d6/d91/classMCPhoton.html#af9121dbf9441b510d513e8c23fca0eab":[4,0,383,55], "d6/d91/classtower.html":[4,0,988], "d6/d91/classtower.html#a0341356e28525eb43aed54d01304c299":[4,0,988,4], "d6/d91/classtower.html#a080a22bbdb2ab9332d1498166c365c4e":[4,0,988,33], "d6/d91/classtower.html#a18d8a76800bceba99e26a89380e26782":[4,0,988,20], "d6/d91/classtower.html#a1c9164a8c61961ad76720f91b6daf8b1":[4,0,988,6], "d6/d91/classtower.html#a29a460ff2441ea22cd07e21d98e9229c":[4,0,988,17], "d6/d91/classtower.html#a30684af7236c686f4943e090ff62ef79":[4,0,988,0], "d6/d91/classtower.html#a4f33186440c589e9e112c2e47ffb6b8e":[4,0,988,27], "d6/d91/classtower.html#a508ad468fe9190c814c64fdeb3a1cc6b":[4,0,988,26], "d6/d91/classtower.html#a58ab97d8bfb99c2e0a476934dadd39e2":[4,0,988,12], "d6/d91/classtower.html#a5cd8c5e5a88d82a1807954afa152cc57":[4,0,988,22], "d6/d91/classtower.html#a5fc77da256b5dd593fe3f8e780478dbd":[4,0,988,3], "d6/d91/classtower.html#a62af558ca91c07688f49f5f69df85c89":[4,0,988,21], "d6/d91/classtower.html#a6b90a78b4db8186165a254f621a99d7e":[4,0,988,8], "d6/d91/classtower.html#a79dd59d88811bddc9dab3e9658a831b5":[4,0,988,29], "d6/d91/classtower.html#a7a7b3412aed1cae121e6828ee8733cd3":[4,0,988,24], "d6/d91/classtower.html#a7d2c2397aab15e195fde15fdf3f37f9c":[4,0,988,35], "d6/d91/classtower.html#a7fd6d1e76dd748ce9227089213b486f5":[4,0,988,32], "d6/d91/classtower.html#a8664994de990e572f0224841c1a68383":[4,0,988,18], "d6/d91/classtower.html#a8e609f1c5feb0f96951cad181da09bb7":[4,0,988,2], "d6/d91/classtower.html#a91187e018cd57aa2ed9a5a7bb8ba7b9f":[4,0,988,5], "d6/d91/classtower.html#a93aee9c494cd0045a02e778913e278a2":[4,0,988,34], "d6/d91/classtower.html#a944a4bf0a3836d6fe5661f9cc057243a":[4,0,988,7], "d6/d91/classtower.html#a9d0fdf9fd2b3514b7c7ec9986b000896":[4,0,988,16], "d6/d91/classtower.html#a9ef46b2670d0eace9e1597ef3b4c0ab8":[4,0,988,11], "d6/d91/classtower.html#ab291cb7f339218a5563e59059065d5b2":[4,0,988,1], "d6/d91/classtower.html#ab46801af7f7c7e638afb2e0c35722150":[4,0,988,9], "d6/d91/classtower.html#abe75b4a00b6204b9b0fd6131e5bb811e":[4,0,988,31], "d6/d91/classtower.html#ac7d5aa854119c3f3ed53cda2cc5c35e5":[4,0,988,10], "d6/d91/classtower.html#acc105204007d56b5330aeba79d9afd87":[4,0,988,14], "d6/d91/classtower.html#aced50dc85d886414ce2b07ab7528612a":[4,0,988,19], "d6/d91/classtower.html#ad08dc851701d4ca0ab39b00541970df4":[4,0,988,28], "d6/d91/classtower.html#ad55ba1530a283e41e4e147e61b76623a":[4,0,988,36], "d6/d91/classtower.html#ad7195522153f2a83833cde6ce5b701fe":[4,0,988,37], "d6/d91/classtower.html#ad88f64a2618a9c910e84691dccda5200":[4,0,988,13], "d6/d91/classtower.html#ae00c5e392b50099d90c5ec0e81a1278a":[4,0,988,38], "d6/d91/classtower.html#aefc84203eb62f00d64f9ee2ad039154c":[4,0,988,30], "d6/d91/classtower.html#af3f53aa4e4f982859573151682ac095d":[4,0,988,25], "d6/d91/classtower.html#af8f146861fcad79d34e8a4464866c9dc":[4,0,988,15], "d6/d91/classtower.html#af9674607e37b475f3478336e05d5042b":[4,0,988,23], "d6/d93/DumpSyncObject_8cc.html":[5,0,1,0,0,1,2,8,56], "d6/d93/DumpSyncObject_8cc.html#aa51ac7d904f226c2410259bc44291fc4":[5,0,1,0,0,1,2,8,56,0], "d6/d93/DumpSyncObject_8cc_source.html":[5,0,1,0,0,1,2,8,56], "d6/d94/PHG4GDMLWriteParamvol_8hh.html":[5,0,1,0,0,2,0,6,11], "d6/d94/PHG4GDMLWriteParamvol_8hh_source.html":[5,0,1,0,0,2,0,6,11], "d6/d97/pyhitest_8f.html":[5,0,1,0,0,0,1,2,127], "d6/d97/pyhitest_8f.html#ad7a2cf3c87068f12f08723ca60d921f8":[5,0,1,0,0,0,1,2,127,0], "d6/d97/pyhitest_8f_source.html":[5,0,1,0,0,0,1,2,127], "d6/d98/Surf3DHistoMaker_8C.html":[5,0,0,0,0,1,1,0,16], "d6/d98/Surf3DHistoMaker_8C.html#ac846ef3799eee8013735f142e7453ce3":[5,0,0,0,0,1,1,0,16,0], "d6/d98/Surf3DHistoMaker_8C_source.html":[5,0,0,0,0,1,1,0,16], "d6/d9a/Prototype4_2TempInfoUnpackPRDF_8h.html":[5,0,5,0,0,1,0,2,28], "d6/d9a/Prototype4_2TempInfoUnpackPRDF_8h_source.html":[5,0,5,0,0,1,0,2,28], "d6/d9b/TrackProjectorPid_8cc.html":[5,0,0,0,0,17,1,25], "d6/d9b/TrackProjectorPid_8cc_source.html":[5,0,0,0,0,17,1,25], "d6/d9d/TrackingPerformanceCheck_8C.html":[5,0,0,0,0,29,4,2], "d6/d9d/TrackingPerformanceCheck_8C_source.html":[5,0,0,0,0,29,4,2], "d6/d9d/hijflv_8f.html":[5,0,1,0,0,0,1,2,41], "d6/d9d/hijflv_8f.html#a0de9790372d2607197005c9e1ec7d530":[5,0,1,0,0,0,1,2,41,0], "d6/d9d/hijflv_8f_source.html":[5,0,1,0,0,0,1,2,41], "d6/d9e/Prototype2_2RawTower__TemperatureLinkDef_8h.html":[5,0,5,0,0,1,0,0,20], "d6/d9e/Prototype2_2RawTower__TemperatureLinkDef_8h_source.html":[5,0,5,0,0,1,0,0,20], "d6/d9e/classPHG4CrystalCalorimeterDisplayAction.html":[4,0,536], "d6/d9e/classPHG4CrystalCalorimeterDisplayAction.html#a08171e161dfc56ee047f545c2d3349d3":[4,0,536,4], "d6/d9e/classPHG4CrystalCalorimeterDisplayAction.html#a6cfcd28834198726c6e96edde43df7fd":[4,0,536,1], "d6/d9e/classPHG4CrystalCalorimeterDisplayAction.html#a7bbbd0dc54b8711d57c392eca5f86eec":[4,0,536,5], "d6/d9e/classPHG4CrystalCalorimeterDisplayAction.html#a858b3a05db015fe4274a08500bfdff85":[4,0,536,2], "d6/d9e/classPHG4CrystalCalorimeterDisplayAction.html#a9d19d9c5a6ba06912514c0dbb784fef7":[4,0,536,3], "d6/d9e/classPHG4CrystalCalorimeterDisplayAction.html#acdcb23f17f6086040b837875cc115b83":[4,0,536,0], "d6/d9e/namespaceInttDefs.html":[3,0,16], "d6/d9e/namespaceInttDefs.html":[4,0,16], "d6/d9f/TrkrTrackContainerLinkDef_8h.html":[5,0,1,0,0,1,2,14,31], "d6/d9f/TrkrTrackContainerLinkDef_8h_source.html":[5,0,1,0,0,1,2,14,31], "d6/da0/PHG4Prototype2InnerHcalSteppingAction_8cc.html":[5,0,5,0,0,2,0,0,14], "d6/da0/PHG4Prototype2InnerHcalSteppingAction_8cc_source.html":[5,0,5,0,0,2,0,0,14], "d6/da0/structhash.html":[4,0,305], "d6/da1/classProto2ShowerCalib.html":[4,0,826], "d6/da1/classProto2ShowerCalib.html#a08ac794c277cf4ee1da8ccdd6ed3bff6":[4,0,826,39], "d6/da1/classProto2ShowerCalib.html#a08f35127b277746bd98156dc9f771355":[4,0,826,44], "d6/da1/classProto2ShowerCalib.html#a0a9d6509bf05db4de703e27412f463df":[4,0,826,37], "d6/da1/classProto2ShowerCalib.html#a0e3dcf02dd4bc78d232eaf737dd91672":[4,0,826,15], "d6/da1/classProto2ShowerCalib.html#a1562c8772c448c065ac19ea9d6dd8e37":[4,0,826,22], "d6/da1/classProto2ShowerCalib.html#a16a5ee9381274ba018c38403033b05fc":[4,0,826,34], "d6/da1/classProto2ShowerCalib.html#a273937781b4577613b1060a140cff6e8a12e7578bc34fb5d98e0b934b6420c67c":[4,0,826,7], "d6/da1/classProto2ShowerCalib.html#a273937781b4577613b1060a140cff6e8aa13ce2cd2957ff880bcaf72c6df5ca1a":[4,0,826,5], "d6/da1/classProto2ShowerCalib.html#a273937781b4577613b1060a140cff6e8af6e78c38a5b966dc31d4a15008665a8f":[4,0,826,6], "d6/da1/classProto2ShowerCalib.html#a273ed537e19d4a9d9d4a15352455b138":[4,0,826,23], "d6/da1/classProto2ShowerCalib.html#a273ed537e19d4a9d9d4a15352455b138":[4,0,826,24], "d6/da1/classProto2ShowerCalib.html#a29c2e47ee6fa5881df5c19abef625f4b":[4,0,826,30], "d6/da1/classProto2ShowerCalib.html#a39aa199dcfc32a275dfd5ad90f41fcb3":[4,0,826,47], "d6/da1/classProto2ShowerCalib.html#a3c2f286fba67a62eb67a9a7a3139ff46":[4,0,826,40], "d6/da1/classProto2ShowerCalib.html#a3f2269bb6f443ea4b93758363171da3b":[4,0,826,14], "d6/da1/classProto2ShowerCalib.html#a40875173e0136368a9493472125d779d":[4,0,826,35], "d6/da1/classProto2ShowerCalib.html#a41e058e71b92b426265514ab6b0d9ce9":[4,0,826,18], "d6/da1/classProto2ShowerCalib.html#a41e058e71b92b426265514ab6b0d9ce9":[4,0,826,19], "d6/da1/classProto2ShowerCalib.html#a4858b04110051da259491936bfe5842fabd2604bf234444cadd5bc63bb0ad67e6":[4,0,826,4], "d6/da1/classProto2ShowerCalib.html#a542203a3fcea704950b1a785bd0963fd":[4,0,826,38], "d6/da1/classProto2ShowerCalib.html#a5b88d89e217ef7f3f43bf6f01a99c8da":[4,0,826,46], "d6/da1/classProto2ShowerCalib.html#a73ff609be7af65586ded64ffa8fb5896":[4,0,826,8], "d6/da1/classProto2ShowerCalib.html#a7b42b9ff3bea63def79a57e2df6b6754":[4,0,826,42], "d6/da1/classProto2ShowerCalib.html#a7c86f9fbaec9291281b0097561a2f25c":[4,0,826,17], "d6/da1/classProto2ShowerCalib.html#a82dc0e444325a2ab911e3698db3bd8f3":[4,0,826,9], "d6/da1/classProto2ShowerCalib.html#a8b0ea8abe0d3c583f25eefc9496fe185":[4,0,826,28], "d6/da1/classProto2ShowerCalib.html#a9985994c0c7deac7875ae49fd5cfa383":[4,0,826,33], "d6/da1/classProto2ShowerCalib.html#aa7c052d3fa1c2ff625d53452710798dc":[4,0,826,29], "d6/da1/classProto2ShowerCalib.html#aa7e70e9213200973ba6e492ec5a10351":[4,0,826,12], "d6/da1/classProto2ShowerCalib.html#aa7e70e9213200973ba6e492ec5a10351":[4,0,826,13], "d6/da1/classProto2ShowerCalib.html#aaefb8f0d9067cda7756b3d6da375826e":[4,0,826,20], "d6/da1/classProto2ShowerCalib.html#aaefb8f0d9067cda7756b3d6da375826e":[4,0,826,21], "d6/da1/classProto2ShowerCalib.html#aaf5b1ae60be92cc73a0b62efb6f8bbda":[4,0,826,10], "d6/da1/classProto2ShowerCalib.html#ab21586d6d12c067752cc39ce49638b15":[4,0,826,36], "d6/da1/classProto2ShowerCalib.html#ab67870d795b1d96b98ad670ef27f826c":[4,0,826,11], "d6/da1/classProto2ShowerCalib.html#acdbc70e3d9fd76151ff1ea043ccf7db8":[4,0,826,25], "d6/da1/classProto2ShowerCalib.html#acdbc70e3d9fd76151ff1ea043ccf7db8":[4,0,826,26], "d6/da1/classProto2ShowerCalib.html#acec63527968c4fcc5a15a02edd0c8cfb":[4,0,826,43], "d6/da1/classProto2ShowerCalib.html#ad008a4af36e7d831328a333fa6a918f1":[4,0,826,16], "d6/da1/classProto2ShowerCalib.html#ad13e2ca98ba9e7e4be2dd9993ee1c3c3":[4,0,826,27], "d6/da1/classProto2ShowerCalib.html#ad5e653c44c1a56f8c9e6ed8a2b192c8b":[4,0,826,31], "d6/da1/classProto2ShowerCalib.html#adaad1f5b14928f214e2121f22d1b56cf":[4,0,826,45], "d6/da1/classProto2ShowerCalib.html#ae3edc77a363f8b8aaeeb11e395be6bdc":[4,0,826,41], "d6/da1/classProto2ShowerCalib.html#af49f712fc0a160c3264aa032f0e83245":[4,0,826,32], "d6/da3/classTrackProjectorPid.html":[4,0,1009], "d6/da3/classTrackProjectorPid.html#a683ba621660e53e316f70c5ab0c0a0ad":[4,0,1009,0], "d6/da3/classTrackProjectorPid.html#a683ba621660e53e316f70c5ab0c0a0ada1f843c9b0bbffac87fcdc7e210df56ee":[4,0,1009,0,2], "d6/da3/classTrackProjectorPid.html#a683ba621660e53e316f70c5ab0c0a0ada2e1c75ed372132e8b2ed4b429bd00e1c":[4,0,1009,0,0], "d6/da3/classTrackProjectorPid.html#a683ba621660e53e316f70c5ab0c0a0adaa4745404967458cf30a85f118e736cdb":[4,0,1009,0,1], "d6/da3/classTrackProjectorPid.html#a761112407aabd5a6d99ea41f41770a63":[4,0,1009,1], "d6/da3/classTrackProjectorPid.html#a9f3fd115cf1925838507787e3c740eb9":[4,0,1009,4], "d6/da3/classTrackProjectorPid.html#ab53b5229a4ee859aaeed457344c81a5e":[4,0,1009,6], "d6/da3/classTrackProjectorPid.html#ad70d7eaa5e67746fca02a01d2609a803":[4,0,1009,5], "d6/da3/classTrackProjectorPid.html#adbe36afa614bc6046982e3e6aa6c73bc":[4,0,1009,3], "d6/da3/classTrackProjectorPid.html#af395e05f89a086fa464a0b14c9c3033c":[4,0,1009,2], "d6/da4/PHG4InttFPHXParameterisation_8h.html":[5,0,1,0,0,2,0,8,19], "d6/da4/PHG4InttFPHXParameterisation_8h_source.html":[5,0,1,0,0,2,0,8,19], "d6/da5/classtileTree.html":[4,0,986], "d6/da5/classtileTree.html#a16fc0dee99dae8623eeae562e7548e0d":[4,0,986,5], "d6/da5/classtileTree.html#a37b21d80d181e36b4ca1fb837a173be7":[4,0,986,4], "d6/da5/classtileTree.html#a45c646c220b239c31be1c7efa3c137db":[4,0,986,3], "d6/da5/classtileTree.html#a686adc24f58670501a6cf8603b0d4049":[4,0,986,2], "d6/da5/classtileTree.html#a9c6d21140970796a61294fa3d0862304":[4,0,986,1], "d6/da5/classtileTree.html#ae75036fd01b9693b1ae8de269113e2cd":[4,0,986,0], "d6/da5/classtileTree.html#aff7b2ae0aa007ced4a1bd49a7577652a":[4,0,986,6], "d6/da6/classTrackProjectorPlaneECAL.html":[4,0,1010], "d6/da6/classTrackProjectorPlaneECAL.html#a07eb49d991e1d83c0b69aa5d1b968c37":[4,0,1010,3], "d6/da6/classTrackProjectorPlaneECAL.html#a14603670b0b521ae02116ae909a85df4":[4,0,1010,4], "d6/da6/classTrackProjectorPlaneECAL.html#a1be681d5d977f6c7212766ba1949db29":[4,0,1010,12], "d6/da6/classTrackProjectorPlaneECAL.html#a40ffb360358e2b976ee1c19ea20504a8":[4,0,1010,5], "d6/da6/classTrackProjectorPlaneECAL.html#a4bd8c49642974b12bdd6fdde0afcbb5f":[4,0,1010,7], "d6/da6/classTrackProjectorPlaneECAL.html#a4f5f4f9946b55c2eb0ec9624ecd60061":[4,0,1010,1], "d6/da6/classTrackProjectorPlaneECAL.html#a4f5f4f9946b55c2eb0ec9624ecd60061a08d7911ef30131d2733db7fadcb7714c":[4,0,1010,1,2], "d6/da6/classTrackProjectorPlaneECAL.html#a4f5f4f9946b55c2eb0ec9624ecd60061a0a39dd8013ab1ebbd70639bb2889fbe1":[4,0,1010,1,3], "d6/da6/classTrackProjectorPlaneECAL.html#a4f5f4f9946b55c2eb0ec9624ecd60061a52f012e379945dd0e1473b393918ea6e":[4,0,1010,1,1], "d6/da6/classTrackProjectorPlaneECAL.html#a4f5f4f9946b55c2eb0ec9624ecd60061adde3caaf4245c7b37b2be7f5fd27699b":[4,0,1010,1,0], "d6/da6/classTrackProjectorPlaneECAL.html#a7b3d2c6edf47bf58a4cf110db8a9eae5":[4,0,1010,0], "d6/da6/classTrackProjectorPlaneECAL.html#a7b3d2c6edf47bf58a4cf110db8a9eae5abfb6144c2c832ac13f1462d6f17b1348":[4,0,1010,0,2], "d6/da6/classTrackProjectorPlaneECAL.html#a7b3d2c6edf47bf58a4cf110db8a9eae5ac03fd74b739d064a231a9de66ac58e9e":[4,0,1010,0,0], "d6/da6/classTrackProjectorPlaneECAL.html#a7b3d2c6edf47bf58a4cf110db8a9eae5adac9207c6e1c063436f2615b9736d655":[4,0,1010,0,1], "d6/da6/classTrackProjectorPlaneECAL.html#ab054ef5689be6c5af015a641a7364c7a":[4,0,1010,9], "d6/da6/classTrackProjectorPlaneECAL.html#ab648c5c08c39cf9b6d0597d19ca88991":[4,0,1010,10], "d6/da6/classTrackProjectorPlaneECAL.html#ac5fd0d05d593111397cd273b29e8c22e":[4,0,1010,6], "d6/da6/classTrackProjectorPlaneECAL.html#ae13a12c89dd112f670220653c0cfdac6":[4,0,1010,11], "d6/da6/classTrackProjectorPlaneECAL.html#ae142a1e2e265735f1c6e28733cf4b8a2":[4,0,1010,8], "d6/da6/classTrackProjectorPlaneECAL.html#afd4d26b22125159168874b18e7a5e90d":[4,0,1010,2], "d6/da7/PHFlag_8cc.html":[5,0,1,0,0,1,1,4,5], "d6/da7/PHFlag_8cc_source.html":[5,0,1,0,0,1,1,4,5], "d6/da7/RawTowerv1_8h.html":[5,0,1,0,0,1,2,0,48], "d6/da7/RawTowerv1_8h_source.html":[5,0,1,0,0,1,2,0,48], "d6/da8/classHijJet1.html":[4,0,337], "d6/da8/classHijJet1.html#a01bd98133119f78b61847ec162e69db0":[4,0,337,9], "d6/da8/classHijJet1.html#a0831fcd5f452e35379a3f64215cb9341":[4,0,337,23], "d6/da8/classHijJet1.html#a14a4e69f43cc7ac1e504b7456267e802":[4,0,337,4], "d6/da8/classHijJet1.html#a25965e2e2d97fa68ada3dae73879cb7f":[4,0,337,17], "d6/da8/classHijJet1.html#a3b559ce37283b9b2aae5039360670914":[4,0,337,21], "d6/da8/classHijJet1.html#a49d765b2091704a72fde7e863831245b":[4,0,337,12], "d6/da8/classHijJet1.html#a5a99a0d25cae332b4db9e9301101cf3a":[4,0,337,10], "d6/da8/classHijJet1.html#a5ca0ccacb607f0bce3be0dafe8b22654":[4,0,337,3], "d6/da8/classHijJet1.html#a5cf90a3a2ed55aa999003181c1628593":[4,0,337,11], "d6/da8/classHijJet1.html#a61fd2f7bfaaefab42266a3a35b4a81e1":[4,0,337,5], "d6/da8/classHijJet1.html#a681c4afa0dd49a3ac51957c489ad8b0c":[4,0,337,1], "d6/da8/classHijJet1.html#a696121386f272fff3aff8b5b58fb6c96":[4,0,337,8], "d6/da8/classHijJet1.html#a697e67fd2b035752e8be9b205aaf93ce":[4,0,337,24] };
javascript
<filename>app.json { "name": "RailButler", "description": "Google action for fetching details related to your Indian railways journey", "repository": "https://github.com/torquecoder/RailButler", "keywords": ["railbutler", "python", "googleaction"] }
json
<filename>dataset/klga/20141017.json version https://git-lfs.github.com/spec/v1 oid sha256:453d6653ba4817c6b2b17dbddc24b32a7bc5380ac8a57260c1cb04fa9e2845a9 size 21645
json
Slip this one in the Captian Obvious file folder. It really shouldn’t come as a surpise that Blu-ray is selling more titles this year than previous; 9 million discs vs 4.5 million during the first quarter. The landscape has changed dramatically within the last year. Naturally, more consumers bought HDTVs and needed more HD content to show on it. The price of Blu-ray players have dropped dramatically, especially over the 2008 Christmas season when they could have been picked up for less than $150. And the amount of titles have increased exponentially. But lets not for get the single, biggest reason. HD DVD is dead. Blu-ray doesn’t have a competing format anymore. Consumers have jumped off the fence and are now enjoying high-def via Blu-ray. HD DVD died shortly after CES 2008 as movie studios and hardware manufactures jumped ship in droves and swam over to the Blu-ray camp, leaving Toshiba to fight on alone. The format quickly became just a memory as Blu-ray marched on victoriously. The real winner was the consumer though. Two competing formats doesn’t help anyone. It really didn’t matter what format walked away from the fight, just as long as one did. The numbers are coming in that show people want their movies in HD. The next battle for Blu-ray will be digital downloads though, which might involve a multi-front war and will probably be a bit tougher than HD DVD.
english
{ "profiles": [], "server.ports": { "local.server.port": 8222 }, "servletContextInitParams": {}, "systemProperties": { "java.runtime.name": "Java(TM) SE Runtime Environment", "PORT": "8222", "name": "Alice", ... }, "systemEnvironment": { "NUMBER_OF_PROCESSORS": "4", "name": "John", ... }, "applicationConfig: [classpath:/application.yml]": { "server.port": "${PORT:8100}", "name": "World", "endpoints.health.sensitive": false, "endpoints.shutdown.enabled": true } }
json
{ "country": "Brooklyn, NY, USA", "github": "noopkat", "home": "http://noopkat.com/", "name": "<NAME>", "twitter": "noopkat" }
json
<filename>json/f707965d0fc24b23108d6d4f61633464c3567472.json<gh_stars>1-10 {"attackers":[{"alliance_id":498125261,"character_id":96672103,"corporation_id":1018389948,"damage_done":5565,"final_blow":true,"security_status":5,"ship_type_id":34317,"weapon_type_id":3033}],"killmail_id":71246288,"killmail_time":"2018-07-14T12:16:45-07:00","solar_system_id":30002139,"victim":{"alliance_id":99006828,"character_id":2113362939,"corporation_id":98178881,"damage_taken":5565,"items":[{"flag":12,"item_type_id":2046,"quantity_destroyed":1},{"flag":27,"item_type_id":44102,"quantity_dropped":1},{"flag":21,"item_type_id":3831,"quantity_dropped":1},{"flag":19,"item_type_id":578,"quantity_destroyed":1},{"flag":13,"item_type_id":1541,"quantity_destroyed":1},{"flag":94,"item_type_id":31788,"quantity_destroyed":1},{"flag":29,"item_type_id":8091,"quantity_dropped":1},{"flag":5,"item_type_id":32782,"quantity_dropped":10},{"flag":93,"item_type_id":31788,"quantity_destroyed":1},{"flag":28,"item_type_id":8091,"quantity_dropped":1},{"flag":5,"item_type_id":27387,"quantity_destroyed":288},{"flag":20,"item_type_id":578,"quantity_dropped":1},{"flag":33,"item_type_id":21096,"quantity_dropped":1},{"flag":92,"item_type_id":31716,"quantity_destroyed":1},{"flag":31,"item_type_id":8091,"quantity_destroyed":1},{"flag":5,"item_type_id":16273,"quantity_destroyed":88},{"flag":32,"item_type_id":8091,"quantity_dropped":1},{"flag":30,"item_type_id":8091,"quantity_destroyed":1},{"flag":11,"item_type_id":1541,"quantity_dropped":1}],"position":{"x":1.5651313594781865e+12,"y":-9.966736282617671e+10,"z":1.9375494247770012e+12},"ship_type_id":32878}}
json
New Delhi: US President Donald Trump has turned down India's invitation to be the chief guest at next year's Republic Day parade, CNN-News18 has learnt. Sources said the US authorities conveyed Trump's decision in a letter to NSA Ajit Doval recently. The US president's "domestic commitments", including his State of the Union address, around that time seems to have been the reason for declining the invitation. In the letter, Trump is said to have regretted his inability to accept the invitation. India had officially sent the Republic Day invite to the US president in April this year. The US authorities had confirmed receiving the invite, but said the final decision would be taken after the inaugural 2+2 dialogue in September. Ties between India and the United States have recently been under a lot of strain because of India's defence purchases from Russia and the oil imports from Iran. US had said that countries trading with Russia's defence and intelligence sectors would face automatic sanctions under a sweeping legislation called Countering America's Adversaries Through Sanctions Act (CAATSA). However, despite the threat, India went ahead and bought the formidable S-400 surface to air missile systems from Russia. The Trump administration had also given a November 4 deadline to its allies to bring down their import of Iranian oil to zero, but New Delhi continued to import the oil. State Department spokesperson Heather Nauert said had said that US was reviewing India's decision "very carefully". According to a Times of India report, at one stage, India was so keen to host Trump that it offered to consider another set of dates for the visit in the month of February to avoid clash with the State of the Union.
english
<reponame>armantaherian/coypu { "name": "coypu", "version": "1.3.0", "homepage": "https://coypu.co", "license": "MIT", "description": "Text-editor-like weekly planner", "author": "<NAME> <<EMAIL>>", "main": "main.js", "dependencies": { "electron-context-menu": "0.8.0", "electron-squirrel-startup": "1.0.0", "electron-window-state": "4.0.2" } }
json
<filename>package.json { "name": "@openst/mosaic-proof", "version": "0.1.0-alpha.1", "description": "Mosaic proof is a tool for generating merkle patricia proof of message that is used by the protocol for message transfers.", "repository": { "type": "git", "url": "git+https://github.com/OpenST/mosaic-proof.git" }, "keywords": [ "Merkel proof", "Proof generator", "Facilitator", "OpenST", "OST", "Mosaic", "Simple Token", "Token Economy", "web3", "Ethereum", "EIP20" ], "author": "OpenST Ltd.", "license": "Apache v2.0", "bugs": { "url": "https://github.com/OpenST/mosaic-proof/issues" }, "homepage": "https://github.com/OpenST/mosaic-proof#readme", "scripts": { "lint:ts": "eslint src -c .eslintrc.json --ext ts", "lint:ts-fix": "eslint src -c .eslintrc.json --ext ts --fix", "compile:ts": "tsc", "clean": "rm -r lib 2> /dev/null || true", "build:package": "npm run prepare:publish && npm pack", "prepare:publish": "npm run clean && npm run compile:ts" }, "dependencies": { "@types/web3": "1.0.19", "web3": "1.0.0-beta.55", "typescript": "3.5.1", "rlp": "2.2.3" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "1.10.2", "@typescript-eslint/parser": "1.10.2", "@typescript-eslint/typescript-estree": "1.10.2", "eslint": "5.16.0", "eslint-config-airbnb-base": "13.1.0", "eslint-plugin-import": "2.17.3", "eslint-plugin-json": "1.4.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", "files": [ "lib" ] }
json
[{"id": 1114, "gempId": "3_126", "side": "Dark", "rarity": "C2", "set": "3", "printings": [{"set": "3"}], "front": {"title": "He Hasn't Come Back Yet", "imageUrl": "https://res.starwarsccg.org/cards/Hoth-Dark/large/hehasntcomebackyet.gif", "type": "Interrupt", "subType": "Lost", "destiny": "4", "gametext": "During your control phase, target any character alone at one of your exterior planet sites (except a docking bay). Draw destiny. Target is missing if destiny + 3 > ability.", "lore": "'<NAME> is wondering about <NAME>...She doesn't know where he is.' 'I don't know where he is.' 'Nobody knows where he is.'"}, "legacy": false}]
json
A custom casket maker in Texas is helping the victims and their families in the aftermath of Tuesday’s mass shooting at Robb Elementary School in Uvalde, Texas. Trey Ganem, 50, of SoulShine Industries in Edna, has reached out to and has personally met with many of the families of the deceased and has agreed to construct personalized caskets for them, Fox 26 of Houston reported. During an interview, Ganem told Fox Houston’s Tiffany Justice that the caskets will be dedicated to each victim and will help their families remember the positives about their life. "This casket is for an adult, for a very beautiful person, who tried to protect children," Ganem told the outlet, per the report. "I sat with the family. I was drawn to this casket, especially after hearing the stories. " The casket maker said meeting with the families and hearing about the victims was integral in idealizing and eventually crafting the personalized caskets. "Building that relationship, being able to go to their homes is something that is very emotional for me," Ganem added, Fox Houston reported. "To listen to them talk about their loved one, it helps me incorporate the design for these caskets. When people talk about what they loved, they start smiling. Even though it’s this horrible time, they’re remembering the joy and the love their loved ones had. " According to the report, Ganem has assisted other families, including caskets for Vanessa Guillen, a Fort Hood soldier that was murdered, and Maleah Davis, a missing 4-year-old who was later found in a trash bag on the side of the road in Arkansas. No longer just a box, Ganem said the personalized casket was a "beautiful creation that represents their loved ones. " Ganem said he was approached by someone at the Texas Funeral Directors Association, who asked if he would be able to help supply caskets for the small town, as 21 caskets — 19 of them for children — is difficult with the town’s limited resources, BuzzFeed News reported. "I think there were 17 at the time that he knew of, and [he] wanted to know if I would be able to help out and make sure that all these kids have, you know, some personalization," Ganem said, per the outlet. SoulShine Industries ordered the caskets from a manufacturer in Griffin, Georgia, who the casket maker said worked 20 straight hours to ensure the order would be done as soon as possible, BuzzFeed News reported. Ganem then hired a truck driving company to drive 26 hours round trip to retrieve the caskets, and he personally worked on only a few hours of sleep to ensure the caskets would be ready to use in their respective funerals, according to the report. TEXAS SCHOOL SHOOTING SUSPECT'S GRANDMOTHER UPGRADED TO 'FAIR CONDITION' Others have gathered to pay their respects to the grieving community, including President Biden and First Lady Jill Biden, who visited Uvalde Sunday afternoon. During their visit, they stopped by a memorial for the victim of the tragedy, attended a Catholic Church service and met with the families of the victims. At Robb Elementary School, the Bidens placed a bouquet of white flowers at a tribute featuring 21 white crosses in front of the school’s placard. President Biden and the First Lady also met privately with the victims’ families. "It is time to turn this pain into action," the president tweeted ahead of his visit. The Associated Press contributed to this report.
english
{"clientID":"HeKoeAw8PNiNfphi2vLd/Q==","serverToken":"<KEY>,"clientToken":"<KEY>,"encKey":"<KEY>,"macKey":"<KEY>}
json
Sopore: At around 12 pm, on Tuesday, members of the Jammu and Kashmir Police’s Special Operation Group (SOG) raided the house of Irfan Ahmad Dar, a 23-year-old shopkeeper, at Sidiq Colony in the Sopore area of north Kashmir’s Baramulla district. Irfan was arrested from the shop he owned, adjacent to his house. At around 3:30 pm, the SOG raided his house. This search operation lasted for 20 minutes. This time, the police detained his 30-year-old brother, Javid, and took him to the SOG camp, located at Townhall in Sopore. Javid was released later that night but on Wednesday morning – September 16 – the news broke that Irfan had died. Irfan’s death comes a little more than a year after the March 19, 2019 incident in which school principal Rizwan Asad Pandit, from south Kashmir’s Pulwama district, died after having been detained by the Jammu and Kashmir police for questioning in a “militancy related case”. As news of Irfan Ahmed Dar’s death spread through the area, local residents took to the streets to protest what they said was a custodial killing. Irfan’s family members demanded punishment for the “killers” and asked that his body be handed over to them. According to the police statement, Irfan “was apprehended and two Chinese Hand Grenades were recovered from his possession”. An FIR (257/2020) was registered at the Sopore Police Station under Section 18 of the Unlawful Activities (Prevention) Act, the police said, and an investigation launched. “During the course of investigation, a police team visited Chairdaji area of Tujjar-Sharief along with OGW for affecting some more recovery on the disclosure of the OGW,” the police statement reads. The body, according to the police, was then taken to the nearby Primary Health Centre (PHC), from where it was shifted to the Police Control Room (PCR) for fulfilling medical and other legal formalities. The police statement makes no mention of the cause of death or of any injuries on the 23-year-old man’s body. Though a postmortem examination of the body was conducted at the PCR, the family has not been provided any details. With the Sopore police providing no information to Irfan’s family about the cause of death and then refusing to hand over his body, the family is convinced he was killed in police custody and later branded an over-ground worker of militants. “No one in the family has a single FIR in their name in any police station in Kashmir. Nor were we involved in any militancy. My brother was murdered in custody and then dubbed a militant,” said Javid. Javid told The Wire that the police detained him at the SOG camp at Sopore, and claimed that Irfan had been detained at Sopore police station. “The police told me that some militants were in our house 10 days ago. They asked me about the militants. I told them, ‘You can check the CCTV footage, if you find any one entering our home on that day, you can do whatever you want’,” Javid said. At around 11 pm on September 15, Javid said he was not feeling well and was allowed to go home. “I asked them about Irfan and they told me he will be released in the morning, so I went back home. We were shocked to know [the next morning] that he had been killed,” Javid said. Rayees Ahmad, the Dars’ neighbour, told The Wire that the brothers were always busy with their work. “They usually did not get time to even eat their meals at the proper time. They never had time to working for militants or do stone pelting, as far I know,” he said. Family members waiting outside the police control room at Srinagar to see Javid’s remains told The Wire that police were refusing to even show his body to them. “We want to see his body, we are sure that he was tortured to death in custody but the police is not allowing us in,” Noor Mohammad, Irfan’s maternal uncle told The Wire on Wednesday afternoon. When he finally saw Irfan’s face during the last rites that the police conducted in Sonmarg, he noticed his nephew’s front teeth were broken and that his head appeared as if it had been hit by some object. Another of Irfan’s brothers, Waheed, is studying for an engineering degree outside J&K. He told The Wire that the police had zeroed in on them because the family has two houses in their compound. They use the new one as their residence and the old one primarily as a store house. “Sometimes we slept in the old house when friends would visit us. So we used to keep bedding scattered,” he told The Wire. “They asked us, ‘Who is sleeping here? ’,” Ahmad said, adding that his siblings were detained on this “doubt” alone. Since the outbreak of COVID-19, the J&K authorities have quietly buried the bodies of those claimed to be militants killed in alleged encounters either at Sonmarg in Ganderbal district or at Gantamulla in Baramulla. According to police, this is being done to prevent large funerals for slain militants. Though his family insists Irfan was not a militant or an OGW, the police buried him in Sonmarg, 100 kilometres away. Speaking to The Wire, senior superintendent of police, Sopore Javid Iqbal said the authorities have recommended a magisterial probe into Irfan’s death. However, he held fast to the claim that the young man was an OGW and had sheltered militants. “The family can say anything as they are in an emotional state but the truth is that he gave shelter to militants. We have recommended a probe, everything will be clear after that,” Iqbal said. As news of Ifran Dar’s death came, former chief minister of Jammu and Kashmir state and National Conference vice-president Omar Abdullah took to Twitter to express his scepticism at the official account: The administration can’t possibly win back the confidence of the people if “encounters” like Shopian or suspicious deaths like Sopore are allowed to pass without the facts being established & guilt, when determined, fully punished. @manojsinha_ must intervene in both these cases. Iltija Mufti, who operates former chief minister and PDP president Mehbooba Mufti’s Twitter account while she is incarcerated, called Irfan’s death a ‘cold blooded murder’: People’s Conference supremo Sajad Lone also mocked the police account: Sopore incident just doesn’t add up. They have done a bad job even at inventing a story. The guilty need to be punished.
english
<filename>locksmith/src/graphql/typeDefinitions.ts import { gql } from 'apollo-server-express' // eslint-disable-next-line import/prefer-default-export export const typeDefs = gql` input KeyHolderQuery { address: String! } input LocksQuery { owner: String address_in: [String] } type Lock { id: ID address: String name: String tokenAddress: String price: String expirationDuration: Int totalSupply: Int maxNumberOfKeys: String owner: String keys: [Key] } type KeyPurchase { id: ID! lock: String! purchaser: String! price: String! timestamp: String! tokenAddress: String! } type Query { key(id: ID!): Key keys(first: Int): [Key] locks(where: LocksQuery): [Lock] keyPurchases: [KeyPurchase!] keyHolders(where: KeyHolderQuery!): [KeyHolder] } type Attribute { trait_type: String! value: Int! display_type: String! } type Metadata { name: String! description: String! image: String! attributes: [Attribute] } type KeyHolder { id: ID! address: String! keys: [Key] } type Key { id: ID! lock: Lock! keyId: String! owner: KeyHolder! expiration: Int! metadata: Metadata tokenURI: String } `
typescript
<gh_stars>0 import { Alert, Modal, StyleSheet, Text, TouchableHighlight, View, } from 'react-native'; import { Button, Fab, Icon } from 'native-base'; import React, { useState } from 'react'; import { AssignType } from '../../types/homework'; import FormExample from './FormExample'; interface AddAssignButtonProps { addModalVisible: boolean; showAddModal: () => void; } export function AddAssignButton({ addModalVisible, showAddModal, }: AddAssignButtonProps) { return ( <Fab active={!addModalVisible} direction="up" containerStyle={{ backgroundColor: 'black' }} style={{ backgroundColor: '#bbb' }} position="bottomRight" onPress={showAddModal}> <Text style={{ fontSize: 24 }}>➕</Text> </Fab> ); } export default AddAssignButton;
typescript
import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; import sinon from 'sinon'; module('Unit | Authenticator | firebase', function (hooks) { setupTest(hooks); module('authenticate()', function () { test('should use the callback', async function (assert) { assert.expect(1); // Arrange const authenticator = this.owner.lookup('authenticator:firebase'); // Act const result = await authenticator.authenticate(() => Promise.resolve({ user: 'foo' })); // Assert assert.deepEqual(result, { user: 'foo' }); }); }); module('invalidate()', function () { test('should sign out firebase user', function (assert) { assert.expect(1); // Arrange const authenticator = this.owner.lookup('authenticator:firebase'); const signOutStub = sinon.stub(); const firebase = { auth: sinon.stub().returns({ signOut: signOutStub }), }; authenticator.set('firebase', firebase); // Act authenticator.invalidate(); // Assert assert.ok(signOutStub.calledOnce); }); }); module('restore()', function () { test('should sign in using custom token when fastboot header contains authorization token', async function (assert) { assert.expect(1); // Arrange const authenticator = this.owner.lookup('authenticator:firebase'); const fastboot = this.owner.lookup('service:fastboot'); fastboot.set('isFastBoot', true); fastboot.set('request', { headers: new Headers({ Authorization: 'Bearer 123', }), }); const userCredential = { user: { id: 'foo' }, }; const firebase = { auth: sinon.stub().returns({ signInWithCustomToken: sinon .stub() .withArgs('123') .returns(Promise.resolve(userCredential)), }), }; authenticator.set('firebase', firebase); // Act const result = await authenticator.restore(); // Assert assert.deepEqual(result, { user: { id: 'foo' }, }); }); test('should return the authenticated user from auth state changed', async function (assert) { assert.expect(1); // Arrange const authenticator = this.owner.lookup('authenticator:firebase'); const user = { id: 'foo' }; const firebase = { auth: sinon.stub().returns({ onAuthStateChanged(callback: (firebaseUser: { id: string }) => void) { setTimeout(() => callback(user)); return () => {}; }, }), }; authenticator.set('firebase', firebase); // Act const result = await authenticator.restore(); // Assert assert.deepEqual(result, { user: { id: 'foo' }, }); }); test('should return the authenticated user from a redirect result', async function (assert) { assert.expect(1); // Arrange const authenticator = this.owner.lookup('authenticator:firebase'); const user = { id: 'foo' }; const firebase = { auth: sinon.stub().returns({ getRedirectResult: sinon.stub().returns(Promise.resolve({ user })), onAuthStateChanged(callback: () => void) { setTimeout(() => callback()); return () => {}; }, }), }; authenticator.set('firebase', firebase); // Act const result = await authenticator.restore(); // Assert assert.deepEqual(result, { user: { id: 'foo' }, }); }); }); });
typescript
Ahmedabad: After the 44-run win over West Indies on Wednesday at the Narendra Modi stadium, India allrounder Deepak Hooda confessed his dream in a candid chat with Suryakumar Yadav. Hooda said that it was his dream to get his debut cap from either MS Dhoni or Virat Kohli. “I made my debut in the first ODI, it was an amazing feeling. You always work hard for that, before the match I spoke to you (Suryakumar Yadav). I feel blessed to be a part of the side. It was my childhood dream to get cap from either MS Dhoni or Virat Kohli. Getting the cap from Kohli was an amazing feeling. I worked on sidelining the distraction and work on my process,” Hooda told teammate Suryakumar Yadav in a video posted on BCCI.TV.
english
<reponame>roblabs/maplibre-gl-native<filename>test/src/mbgl/test/stub_file_source.hpp #pragma once #include <mbgl/storage/file_source.hpp> #include <mbgl/storage/online_file_source.hpp> #include <mbgl/storage/resource.hpp> #include <mbgl/storage/resource_options.hpp> #include <mbgl/util/timer.hpp> #include <map> #include <unordered_map> namespace mbgl { class StubFileSource : public FileSource { public: enum class ResponseType { Asynchronous = 0, Synchronous }; StubFileSource(const ResourceOptions&, ResponseType = ResponseType::Asynchronous); StubFileSource(ResponseType = ResponseType::Asynchronous); ~StubFileSource() override; std::unique_ptr<AsyncRequest> request(const Resource&, Callback) override; bool canRequest(const Resource&) const override { return true; } void remove(AsyncRequest*); void setProperty(const std::string&, const mapbox::base::Value&) override; mapbox::base::Value getProperty(const std::string&) const override; using ResponseFunction = std::function<optional<Response> (const Resource&)>; // You can set the response callback on a global level by assigning this callback: ResponseFunction response = [this] (const Resource& resource) { return defaultResponse(resource); }; // Or set per-kind responses by setting these callbacks: ResponseFunction styleResponse; ResponseFunction sourceResponse; ResponseFunction tileResponse; ResponseFunction glyphsResponse; ResponseFunction spriteJSONResponse; ResponseFunction spriteImageResponse; ResponseFunction imageResponse; void setResourceOptions(ResourceOptions options) override; ResourceOptions getResourceOptions() override; private: friend class StubOnlineFileSource; // The default behavior is to throw if no per-kind callback has been set. optional<Response> defaultResponse(const Resource&); std::unordered_map<AsyncRequest*, std::tuple<Resource, ResponseFunction, Callback>> pending; ResponseType type; util::Timer timer; std::map<std::string, mapbox::base::Value> properties; ResourceOptions resourceOptions; }; } // namespace mbgl
cpp
Feedback (2) Excellent quality 12 Volt Air Cooler - USB desk min air cooler – XIKOO Detail: Product detail pictures: Related Product Guide: We take "customer-friendly, quality-oriented, integrative, innovative" as objectives. "Truth and honesty" is our administration ideal for Excellent quality 12 Volt Air Cooler - USB desk min air cooler – XIKOO , The product will supply to all over the world, such as: Tajikistan, Honduras, Bangladesh, Custom orders are acceptable with different quality grade and customer's especial design. We are looking forward to establish the good and successful cooperation in business with long terms from the customers of all over the world. Product quality is good, quality assurance system is complete, every link can inquire and solve the problem timely! Send your message to us:
english
After watching a few lessons from "lessons taught y life" on YouTube. It was 9 am in the morning. A man was ready for the office, as usual, his wife prepared breakfast and asked him to stay at home today as she wanted to make love to him because there was two weeks gap due to reasons. He agreed. He had breakfast, she got ready for some 20 minutes and has invited him to the bedroom with all windows open and sunlit glittering walls. He was happy and was ready too. But suddenly he got a headache and said wait. I have a little headache and I don't know why. She thought for a while and said go and have a visit to the washroom. He came out, congratulated her, hugged her, and said how did you know? "She said" I've observed you have a bottle of water. And you do take a bottle of water every day before leaving because it takes exactly 30 minutes by car and thereafter everyday compulsory meetings in the office. "Yeah, holding urine for a longer time does brings headache and you took half an hour to get ready for lovemaking". She smiled and he giggled. She said she was shaving. He jumped on to her and they were extremely dangerous to each other as their thirst and love were highly inflammable.
english
This content is Open Access. The JoVE video player is compatible with HTML5 and Adobe Flash. Older browsers that do not support HTML5 and the H.264 video codec will still use a Flash-based video player. We recommend downloading the newest version of Flash here, but we support all versions 10 and above. If that doesn't help, please let us know. Please note that all translations are automatically generated. Funktionell transkraniell dopplerundersökning (fTCD) är en enkel och icke-invasiv ultraljud teknik som kan användas för att bedöma lateralization av kognitiva funktioner, särskilt språk och är lämplig för användning med barn.
english
of the State Governments this problem cannot be solved. Thus, you will have to make arrangements to direct the State Governments to stringently follow it. Mr. Deputy Speaker, Sir, I thank you for allowing me to speak and with these words I conclude. SHRI BHERU LAL MEENA (Salumbar) : Mr. Deputy Speaker, Sir, an important discussion is underway in the House on National Housing Policy. While formulating any housing Scheme, you are requested to keep in mind the condition of the houses being constructed by the Housing Board in Rajasthan. The houses constructed by the Government have weak foundations and sub-standard material is used and several irregularities are committed in their construction. The houses constructed in my area, Udaipur are not of the kind they should I have been. Our area is a tribal area and the tribal areas should also be benefited by such housing schemes. Usually the rich people manage to get houses and the poor ones are left without them. Since it is a national scheme the people of rural areas should also be benefited by it. Your policy says that the housing scheme will be launched in highly populated areas, having more population at least a population of 3040 thousand people. But the areas where small farmers are living, the people of small townships will not be benefited by it. That is why, I submit that the population limit should be brought down. Then the people of small townships will also be benefited. Only then our national housing scheme will be successful. The population of rural areas constitute the 80 per cent of the total population. We are going to formulate the National Housing Scheme, but its benefits would be available only to 20 per cent population. I would submit that you should keep the rural areas also in mind. Like, National Housing 664 Policy Indira Housing Scheme has been launched in rural areas but the funds provided under this scheme are inadequate. The construction of houses remains incomplete. If the efforts are made to somehow complete them, even then many things remain incomplete. As a result the house collapse after a few years and the people are again rendered without shelter. In this context I would request you to increase the funds provided under Indira Housing Scheme to enable people to get all the facilities for the construction of their houses. You are aware that wood has become very expensive these days. These people can not even get even the materials for hovels and thatched huts. I would request that more funds should be provided under this scheme. Mr. Deputy Speaker, Sir, while concluding my speech I would submit that the hon. Minister should give more attention to rural areas. SHRI SYED SHAHABUDDIN (Kishanganj): Mr. Deputy Speaker, Sir, I have gone through this Statement of National Housing Policy and I also recall the statistics on housing shortage from year to year as mentioned in various Parliamentary questions. I do not believe those statistics. They vary from year to year. The only thing we can say is that our increasing population demands roughly four million housing units every year. Surely, the Government is not in a position to devise any policy which would meet this recurring shortage far less fill the backlog. Therefore, I do not believe, even for a moment, that at the end of this century, we shall be a country without the homeless. I prefer to speak of shelter, not of housing. If we can provide just shelter, a roof over the head of every individual citizen, far less a home, perhaps we should be satisfied. The hon. Minister had my sympathies. She is racing not only against the natural decay of old housing, she is also racing against the rural exodus. The triple factors of rising population, rural exodus and urban decay make it virtually impossible for the country to meet the housing shortage. There must be a massive resource input. Sir, housing has become a matter of social prestige in our country. We find tremendous disparity in the level of housing. We must be prepared to bring this disparity down, to conceive some sort of housing unit which should be available to every individual family and cut out all grandiose housing. You find here housing units which are spread over thousands of square metres right in the heart of Delhi. Is that justifiable? Is that fair? Is that in consonance with the national objectives? I feel, Mr. Deputy Speaker, Sir, that they are not. Whatever be our policy, our entire programme of housing has been elite oriented, has been in favour of the privileged classes. I regard, Sir, even the Government servants compared to the rest of ordinary Indians are a privileged class. This is what is making us short of resources and also making it difficult for us to meet the shortages. Sir, as regards urban housing scheme, I have gone through the figures of HUDCO. I find that there is a wide disparity in the level of HUDCO allocations between one State and another. In fact the States with a higher housing shortage in terms of percentage of population not covered by housing are getting less allocation. Therefore, the HUDCO allocations themselves are creating more and more National Housing 666 Policy Sir, you look at these schemes of Higher Income Groups, Middle Income Groups and Lower Income Groups. In fact when they are implemented, even the Lower Income Group Housing is utilised for the benefit of the Higher Income Groups. In fact, the low income group hardly gets any housing. The State acquires the land sometimes at a very cheap price. Then they develop it at a tremendous cost; then it allocates it for the cooperative group housing. A lot has been said here about cooperative housing. But who are the beneficiaries of the cooperative housing? Are they the homeless? They are the elite; they are the privileged class; they are the service holders; they are the rich people who get cheap developed land at public expense. This is not fair. There is something wrong; there is something distorted in our implementation of the entire housing programme. In the rural housing sector, there is an emphasis today under the Indira Awas Yojana on upgradation of housing. Upgradation will not add to the national pool of housing; upgradation leaves the pool exactly of the same size as it was before. Earlier the emphasis was on additional housing, even a small house low cost house, houses built of locally available material costing Rs. 7000 or Rs. 8000. You allot a piece of land to the people who are absolutely homeless, who should get the first priority. They could be given a small loan in order to build a house. Today, you are going to the next strata; are you forgetting the homeless; you are going to the strata which has already a house; you are helping them to upgrade their houses. Upgradation of housing, to my mind, is contrary to the national objective of reducing the housing gap. In every village, we have got people who are below the poverty line; we have got people who have been identified under the IRDP. In my opinion, the people who are living below the poverty line, the families which are absolutely homeless, the families which are registered under IRDP, should get priority in allocation of resources; it should not be done on the caste basis, because that creates social distortions; it creates more social tensions within the same village. If you adopt a purely economic standard, if you adopt the standard of homelessness and you help the homeless to find a shelter irrespective of caste to which they belong, I am sure, that will be far more conducive. In towns and cities, we have got slums. I recall the problem of post war France. The man who devised it was then the Mayor of Marseilles. Later, he became the President of the Republic of France. He had this concept of social housing. This I saw with my own eyes in practice in Algeria where there are a large number of homeless people and they are accommodated in high rising buildings with minimum comforts. That is the policy that was followed also in other Socialist countries. He was called the socialist Mayor. In my view, in towns and cities just tinkering with the slums problem will not do. I am not in favour of just making slums more liveable so that you make them a permanent feature of our urban life. Why should we accept it? We want to do without slums; we want to have a neat life, clean life, a simple life. This can be done only by going in for high rise construction because urban land is limited. In my view urban land should be nationalised, should be rationed, should be made available equa!!y to all who are homeless. You can, of course, solve the problem if you adopt this technique of high rise buildings. I would suggest a few financial measures. Apart from the modification of the Rent control Law, which has been mentioned here, I would suggest that for bank credit, housing should become a priority sector. I would like to go to the extent of suggesting to the Government for their consideration that black money, should be permitted to be utilised for social housing, should be permitted! No question should be asked about it so long as the rent is kept under proper regulation. Sir, there is one item which has come r to my notice. There is a programme about rehabilitation of flood and fire victims. Again I am told that in some States it is applicable only to some classes of people. It is again very wrong. Flood and fire know no castes, no religions. Anyone, any family, below the poverty line, which is affected by flood and fire and loses whatever home stead it had should be helped to build their house again. Sir, finally I come to an aspect of social planning. Here and there, in every town we are building harijan colonies. Even in villages, we are building harijan colonies. That reminds me of the policy of apartheid. That is not the way of trying to do away with this menace, with this vice of untouchability. You must have mixed housing. Let all the poor live together. Why can they not live together? In this age when children can go to the same school, why can the people of different castes and different social strata not live together in the same colonies? Why should we have harijan colonies, exclusively harijan colonies, as if those were the untouchable parts of the town. It is a reservation. I do not accept this policy of reservation. I cannot accept this policy of apartheid. Finally, I would say that in the Action Plan we have talked about the State Plan and we have talked about the District Plan. I feel that housing and shelter are problems so close to the ground that unless you have the village Plan, unless you have a Mohalla Plan, you cannot achieve the housing target, you cannot even identify the size of the problem. You have to go below the town level, you have to go below the Panchayat level and you have to find in every village, what is the housing shortage, who are the persons involved, how can they best be helped, individual by individual, group by group, at least to have the minimum shelter which they should have over their rood. Sir, therefore, I feel that without really bringing in, ushering in, the Panchayati Raj and without making our Municipalities more functional, I do not think that the housing shortage can easily be resolved. Sir, I would once again express my view that the entire housing policy needs to be oriented towards the masses. The big people shall take care of themselves. There is enough black money flowing through our economy, which can help the rich, which can help the affluent, which can help the businessmen, the civil servants to find their own housing. In fact, I was once a Government servant. I go to the extent of suggesting that in many developing countries, even in many developed countries, the Government servants are not provided with housing. The Government servants have an inbuilt element in their emoluments to find a house for themselves and surely we can adopt a policy of recruitment in which less people are transferable, more people at least in the lower levels work where they live and they are recruited from the area where they live. So, if you adopt a new employment policy, you can even do away with this expenditure National Housing 670 Policy of national resources for a given sector, a very specialised sector, a very narrow sector, a very narrow slice of the national population. Therefore, Sir, with your permission, while participating in this debate, I would only appeal to the hon. Minister to adopt a new criterion and not to look at the problem from the point of view of the urban rich or the urban elite but from the point of view of the rural masses, from the point of view of the people who are living in the slums. Let us give them some hope that within their lifetime, they shall be able to have a roof over their heads. We should plan not in terms of a static figure of 1980 or 1990 but in terms of a dynamic flow of population that we as a nation, have to provide for at least five million houses every year. Unless we can do that, the problem will remain with us. One Minister may come, one Minister may go, one Government may come, one Government may go but the problem will go on for ever. SHRI LOKANATH CHOUDHURY (Jagatsinghpur): Mr. Deputy Speaker, Sir, at least when we are going into the Forty eighth year of our Independence, Madam Shrimati Sheila Kaul, the hon. Minister of Urban Development has brought a statement on the National Housing Policy for which I thank her. But, as I go through this Policy, I find that it does not reflect what the problem is both in the urban areas and in the rural areas. I would rather say that the whole policy will only remain a policy statement for ever, for years to come. We should understand first what really the problem is and what its dimensions are today. I come from a rural area. I have seen villages where eleven members of a family stay in a house measuring eleven feet by ten feet. You may not believe it. Then if we go further into the more interior villages we will find that many people are homeless. And today, due to our economic policy, centralised economic policy or due to the industrialisation, the people from the villages, are coming to the towns and slums are created. Today, towns in India consist of more people who are without a roof. So, the time has come to consider whether getting a house or a shelter should be a Fundamental Right or not. It should be now treated so, because as the position stands today, the thrust of the National Policy should be to go to a particular position and analyse the factors and go to another position where very citizen of the country will have the right to have a house. So, this Policy does not go to that extent. It just wants to tackle some problems which are coming up now and from the point of view of some influential people who are capable of influencing the policy in a particular direction. The real National Policy should aim at solving the whole nation's problem. Beginning from the poorest to poor the need of the richest man should be reflected. Does this policy reflect that ? ! think that you and all of us in this House will agree that it does not. So, we have failed to do it. Then the question of urbanisation comes. There are also question of floods and cyclones in this country. When floods come damages do take place. In Himachal Shri Sukh Ram will agree with me that due to this year's floods many houses were damaged. In Orissa, in my constituency houses of more than 1,40,000 houses have collapsed recently and the people are living on the embankments. That is a regular feature there. When cyclone comes whatever roof is there, that goes away. National Housing 672 Policy So, all these factors which are very much natural to us, should be taken into consideration. It should be considered that in chronically cyclone affected areas houses which could resist cyclone are the first urgency. Our housing schemes should also take into consideration the special needs of flood affected areas where the houses are generally damaged by floods. You go to Bombay or you go to Calcutta, you see lakhs of people sleeping on the pavements. I do not know whether they are the people whom we take into consideration. So, the question comes how to tackle this problem. Can you tackle this problem with your resources, with the money you have got? I think, whatever money, whatever planning, whatever housing is made today, it is not available to the poor people. Actually, the benefits do not go to them. You take the case of Indira Awas Yojana. I want to tell the hon. Minister of State in the Ministry of Social Welfare that, no doubt, you have given the money but are you allowing those harijans or those poor people to build their houses? Your block administration gives it to the contractors and within two years houses collapse. So, will the Government not have the eyes to see to it? It is related with our economic problems. I remember in 1936 when I was a boy of ten years old, in spite of restrictions imposed by the school, I went to the school and got ten canes from the headmaster. When one Congress Leader was addressing a meeting in 1931, he said we had 34 crores of people and when he was talking, countries like Pakistan and Burma were there. Now, India's population is 93 crores or something like that. By the end of the century, it will be 100 crores. So, in a populous country like us, let us not look in that way. Unless we change our very thinking process, we will not be able to provide housing to all the people. We may take a little satisfaction that we are going to build some houses for some prosperous people, who have the benefit of house building schemes. It also relates to the Land Policy in the villages. In the rural areas, the question of homestead land is there. I know that even eleven family members stay in a house of 12' x 10' size. They can build the house with whatever material that is available. But they have got no piece of land to build a house. I remember one instance of Kerala. When there was a joint Ministry of Congress and CPI - Shri Achyuta Menon was the Chief Minister - a housing scheme was envisaged. What was that housing scheme? They could build one lakh houses with the peoples cooperation and participation. Unless house building schemes are taken up with the peoples cooperation, you cannot do it. With this sort of approach you cannot solve the housing problem of the country. You are only going to make it further worse. Therefore, I have taken this opportunity to speak and I say that when we decide any National Policy, we should take the whole national reality into consideration in all its aspects. This Policy has not taken all the aspects into consideration. Those who have drafted the Policy have not kept the whole nation's interests before them. You cannot call this a national policy. You can say it is a policy of Madam Shiela Kaul for the time being and not to solve the national interest. Our objective should be to serve the people. I will request the Government to keep the objective in mind that housing is a fundamental right of a citizen. It should be included in the Constitution of India as a fundamental right of the citizen. The National Housing 674 Policy Government should take all these factors like population, cyclone etc. and fix the priority so that the same type of expenditure is not incurred again and again. There should be some saving. The most important thing is in the rural areas and especially in the urban areas, if we go to the roadside you will see that there are houses on the roadside and people have taken shelter. Railways cannot maintain speed of the trains because people have built houses near the track. You go to Sealdah. You will find that the Railways cannot maintain the speed because people have built houses along the railway line. You go to anywhere in India and you will find the same situation. Taking all these things into consideration the Government should do something to solve their problems and this should be done with a Gandhian outlook. I apprehend another thing. By giving the construction work to big construction companies etc. we may have some problem. We once created the landlord class in India. The Britishers created a landlord class in India. I think by this new policy let the Government not create another class of housing landlords. You cannot rule out the situation. In a situation where so many people are below the poverty line, by handing over the housing work to different housing companies you are only creating another class of housing landlords like the erstwhile landlords. Let it not happen. I make a suggestion that the political parties here, if they feel it is a problem which has surpassed the limits, should do something. It could have been done much earlier. In this aspect, instead of depending on money contribution from the Government, a new scheme with the people's cooperation and participation should come to solve the problem. Then alone you can justify that every citizen has a right to get a house. I think the Government will take all these factors into consideration. By having only limited ideas and by not having the whole problem of the country before them, they should not call it a National Housing Policy but they should say it is a policy of Madam Sheila Kaul. With these words I conclude. SHRI LAKSHMAN SINGH (Rajgarh) : Mr. Deputy Speaker, Sir, I support the National Housing Policy and congratulate the hon. Minister for not bringing an end to the Minimum Need Programme of the Seventh Five Year Plan but it has been included in the Eighth Five Year Plan which will help considerably in solving the problem of Housing in rural areas. Under this Housing Policy 51 percent amount has been kept for the construction of houses in the rural areas. She deserves to be congratulated for it. Apart from it there are a number of problems both in urban and rural areas, which need to be paid attention. There is a need of 20.36 million houses in rural areas. This need is increasing continuously in the wake of the growing population. Therefore, we must prepare new housing schemes for rural areas. Earlier also many schemes were prepared like the Jawahar Rozgar Yojana and the Indira Awas Yojana which are still in operation. These schemes have solved this problem to great extent. Earlier aroom could be constructed in 4-5 thousand rupees but today the price of material has increased manifold. Therefore, only local material should be used in the construction of houses under Indira Awas Yojana and Jawahar Rozgar Yojana. The rules of mining should be National Housing 676 Policy amended for it. It must be done since if a house is constructed in a rural area of Madhya Pradesh under the Indira Awas Yojana, the bricks for this purpose are brought from Uttar Pradesh since the rules of mining there are such that even the local material like soil etc. can not be dug. Therefore, it should be changed. It is must that the rules of mining should be easy. The poor person has to pay a heavy price by losing his land and house when the development in rural areas takes place. I would like to cite an example. In Vijaypur in my constituency in Madhya Pradesh a gas based fertilizer plant and a big project of the Gas Authority of India have been set up. These are public sector projects and the Central Government has spent 3-4 thousand crore rupees on them but those who have lost their land and houses on account of it have not been provided constructed houses by the companies till date. This is the attitude of the Government projects. One can imagine the plight of the people who are rendered homeless due to the setting up of the factories by the private companies. Therefore, it is necessary to rehabilitate those people whose land and houses are taken over in the name of development by the big factories. I hope that the hon. Minister would include this point also in this policy. Natural calamities like floods, earthquake and fire take place in our country. Latur in Maharashtra was severely hit by earthquake recently in which thousands of people were killed and thousands of houses had collapsed. Military and the voluntary organisations did well in the matter of rehabilitation there. The Government has also done something but it has no comparison with the work done by the other organisations. Therefore, it is necessary that those voluntary organisations which have worked for the rehabilitation of the earthquake affected persons should be associated in such activities and given the responsibility to work there and get the houses constructed there. I would like to say that the aid given by the State or the Central Government should be sent to these voluntary organisations, which have stood by the people in troubled time, instead of sending it to the Government officers, so that the amount can reach in the proper hands. This year, there has been heavy floods in Kerala and Madhya Pradesh. It is the need of the hour that the Government should prepare plans for the rehabilitation of the flood affected persons. Mr. Deputy Speaker, Sir, there are so many architects living in the cities who are the owners of mines and who can go to villages to get the houses constructed at a very low price, the Government should utilise the services of those architects. MR. DEPUTY SPEAKER : Shri Laxman Singh, how much more time do you need? SHRI LAKSHMAN SINGH: Another two minutes, Sir. MR. DEPUTY SPEAKER : Can we sit for another ten or fifteen minutes ? SOME HON. MEMBERS: Sir, we will continue tomorrow. MR. DEPUTY SPEAKER: Okay, he will be the last speaker. SHRI LAKSHMAN SINGH: Mr. Deputy Speaker, Sir, a provision has been made in this Housing Policy to give loan to the Cooperative societies for building houses but I would like to inform you that the capitalists are taking advantage of this facility in name of the cooperative societies. The Government should enquire into it and such people should be severely punished. I would like to say that even their properties should be consficated and distributed among those who do not have houses. The Government must do something for the bonded labourers living in rural areas. There are many such castes in our rural areas like the Banjaras, who roam from place to place. Neither any scheme has been made till date for constructing houses for them, nor any effort has ever been made to rehabilitate them. Therefore, a policy for the rehabilitation of the communities like the Banjaras who are in large number should be formulated. As far as HUDCO is concerned, this organisation is limited only to cities. In rural areas it has not done any significant work. Therefore, HUDCO should be asked to extend its area of activities to the villages. We provide facilities to the municipal committees through HUDCO but recount the number of such municipal committees which have been given loan by the HUDCO. As far as I think their number is limited. I would like to submit that Madhya Pradesh is the only State which has implemented the Panchayati Raj. My suggestion is that amount should be made available to these panchayats by HUDCO. Besides, it, the members of the municipal committees, the Sarpanchs and the members of the municipal committees should be given an opportunity to make available the houses in villages. There is one more problem today that people come to settle down in cities from villages. Such people have the problem of housing in cities. My submission to the Government is that something should be done for such people also. The colonisers in cities, I do not claim that all the colonisers are dishonest, but majority of the colonisers do play fraud with the poor people. A coloniser sells the same plot to five persons. I would like to inform you that there are many developed countries where the amount of the coloniser is kept in the bank and the coloniser does not have the right to use this amount. I think that we should also I have such a law. The Government in consultation with the RBI should pass an order that the amount received by the coloniser, should be deposited in the bank and he should only be allowed to use this amount as a guarantee. He should not be allowed to utilise that amount for his personal work. This condition should continue to remain in force till he comes to the position of allotment of houses to the people. The rate of interest on the loan given to the poor is very high. A common man can not pay it. Besides it, a number of plots of land are disputed in the cities and cases are pending in the courts about them. Just now our colleague has said that the urban ceiling should be abolished. I do not say that there should be no urban ceiling but it should be changed. We should change it and ask the party to take back the litigation. There we can have the rule that 30 per cent of the land which the party is going to acquire should be kept for those who have no house. The houses should be constructed on that land. Sir, the Central Building Research National Housing 680 Policy Institute is in Roorkee. Such type of institutes should be set up more since we are spending crores of rupees on the housing but its know how is not available everywhere. Therefore, it is must that the technology should reach the villages, so that the villagers can understand it and for all this we must pay attention towards such institutions. I would like to submit one more thing that in our housing policy, we should have a provision for the rehabilitation of the people who have migrated or have been uprooted from Jammu and Kashmir. We should have the provision in housing policy for the rehabilitation of those who have been uprooted by the militants. Sir, in the end, I would like to submit that we are running the National Housing Bank. We have given a loan of 132 crore rupees to the Private and cooperative societies for house building, out of that 1.5 per cent has been given to the housing sector and out of that 1.5 per cent only 30 per cent a very meagre part has been given as a loan to the individuals. The percentage of this amount should be increased so that the individuals can also have the right to go to the National Housing Bank to take the loans to build houses. Sir, with these words I conclude and I am thankful to you for giving me an opportunity to speak. MR. DEPUTY SPEAKER : The House stands adjourned to meet again tomorrow, 19th August, 1994 at 11.00 hours. The Lok Sabha then adjoumed till Elev of the Clock on Friday, August 19, 19 Sravana 28, 1916 (Saka) PRINTED AT: S. NARAYAN & SONS, B-88, OKHLA INDUSTRIAL AREA, PHASE-II, NEW DELHI-2
english
Sprint’s LTE network is only slated to go live in a handful of markets right now, but the country’s third largest wireless carrier is wasting no time in introducing some hew hardware to take advantage of the nascent network. We were all thrown for a loop when a Sprint Galaxy Nexus popped up in an online ad recently, and the company has just recently confirmed that the handset is indeed the real deal. Sprint hasn’t been overly forthcoming with detail, but their version of the new Nexus only has 16GB of internal storage (the Verizon model has 32GB), although it reportedly sports a faster processor than its Verizon cousin. While the Galaxy Nexus will probably be enough to whet Sprint Android fans’ appetites for a while, it won’t be making its debut alone. The LG Viper 4G LTE packs a 4-inch Nova display, a 1.2 GHz dual-core processor, Android 2.3.7 Gingerbread, and an NFC chip with full support for Google Wallet. Like another LTE device announced today, the Viper is also meant to ease your sense of eco-guilt, as its case is made partially of recycled plastic and its ships with a super-efficient AC adapter. It certainly lacks some of the wow-factor the Galaxy Nexus has, and early impressions seem mixed, but it could prove to be a solid option for those who LTE connectivity without a hefty price tag.
english
Thiruvananthapuram: The Kerala Public Service Commission (PSC) has decided to conduct descriptive examinations for the post of assistant professors at government colleges. A section of the candidates had sought for OMR exams. The exams, for the post of assistant professors in various subjects, are scheduled to be conducted in November. The question papers have gone to print. The last date for giving confirmation for appearing in the exams has passed and no change is possible in this matter now, the PSC officials said. Some of the candidates pointed out that the accuracy of the computer evaluation in the OMR exams cannot be ensured for descriptive exams. However, the PSC decided that candidates' grasp over the subjects can be better assessed through descriptive exams. The answer sheets will be scanned and the evaluation will follow the on-screen marking system. The PSC officials also pointed out that there would not be any glitches as the evaluation would be held at centralised camps based on the set answer key. One teacher is required to evaluate 10 answer sheets each in the morning and afternoon.
english
By , Researchers announced Thursday a rare discovery of a new mammal species called the olinguito. And its teddy bear face makes it instantly adorable. The raccoon-sized critter leaps through the trees of mountainous forests of Ecuador and Colombia, but it shouldn't have been too hard to find — one of them lived in the Smithsonian-run National Zoo in the Washington for a year. "It's been kind of hiding in plain sight for a long time" despite its extraordinary beauty, said Kristofer Helgen, the Smithsonian's curator of mammals. The zoo's little critter, named Ringerl, was mistaken for a sister species, the olingo. Ringerl was shipped from zoo to zoo from 1967 to 1976: Louisville, Ky. , Tucson, Ariz. , Salt Lake City, Washington and New York City to try to get it to breed with other olingos. It wouldn't. "It turns out she wasn't fussy," Helgen said. "She wasn't the right species. " The discovery is described in a study in the journal ZooKey. Helgen first figured olinguitos were different from olingos when he was looking at pelts and skeletons in a museum. He later led a team to South America in 2006. "When we went to the field we found it in the very first night," said study co-author Roland Kays of the North Carolina Museum of Natural Sciences. "It was almost like it was waiting for us. " It's hard to figure how olingos and onlinguitos were confused for each other. "How is it different? In almost every way that you can look at it," Helgen said. Olinguitos are smaller, have shorter tails, a rounder face, tinier ears and darker bushier fur, he said. "It looks kind of like a fuzzball . . . kind of like a cross between a teddy bear and a house cat," Helgen said. It eats fruit, weighs about 2 pounds and has one baby at a time. Helgen figures there are thousands of olinguitos in the mountainous forest, traveling through the trees at night so they are hard to see. While new species are found regularly, usually they are tiny and not mammals, the warm-blooded advanced class of animals that have hair, live births and mammary glands in females. Outside experts said this is not merely renaming something, but a genuine new species and a significant find, the type that hasn't happened for about 35 years. "Most people believe there are no new species to discover, particularly of relatively large charismatic animals," said Case Western Reserve University anatomy professor Darin Croft. "This study demonstrates that this is clearly not the case. " Based on reporting by The Associated Press.
english
Having let go the likes of Abhishek Singh and Fazel Atrachali, U Mumba went hard on Pawan Sehrawat but were priced out after he went to the Tamil Thalaivas for a record 2.26 crore. In response, the franchise put its faith in young stars. Guman Singh, who had an impressive end to season 8 was poached for a stunning 1.22 crore. U Mumba also went hard to land Heidarali Ekrami, while bringing back the experienced Surinder Singh to their ranks. Rinku and Rahul Sethpal who were among the shining lights in season 8, were retained. Retained Players: Rinku, Shivam, Pranay Vinay Rane, Prince, Rahul Sethpal, Kamlesh, Shivansh Thakur, Rupesh, and Sachin. Auction Buys: Ashish, Guman Singh, Surinder Singh, Heidarali Ekrami, Gholamabbas Korouki, Harendra Kumar, Kiran Laxman Magar, Mohit, Ankush, Jai Bhagwan, and Satywan. नवे खेळाडू, नवा उत्साह! Here’s your squad for #VivoProKabaddiLeague Season 9!
english
<reponame>ag-sbogd/mono-changelog<gh_stars>0 import update from 'immutability-helper'; import { reducerUtil } from '../../../utils/reducer.util'; import preferencesList from '../../../constants/preferences'; import { IPreferencesState } from '../../../features/preferences/redux/typings'; import { IBooleanAction } from '../../../'; import { EModesXl } from '../../../definitions'; import { preferencesTypes } from './types'; const { NICKNAME_CONFIRMED, SELECTED_CHIP, SELECTED_CAMERA_ID, SELECTED_CAMERA_SHOW_AGAIN, SIDE_BETS_PANEL_SHOW_AGAIN, IS_TABLE_MINIMISED, AMBIENT_SOUND_VOLUME, IS_AMBIENT_SOUND_ENABLED, GAME_EFFECTS_VOLUME, ARE_GAME_EFFECTS_ENABLED, MUSIC_VOLUME, IS_MUSIC_ENABLED, VOICE_OVER_VOLUME, IS_VOICE_OVER_ENABLED, ACTIVE_XL_MODE, PLAY_VIDEO_STATE, } = preferencesList; export const initialState: IPreferencesState = { userPreferences: { [NICKNAME_CONFIRMED]: false, [SELECTED_CHIP]: 50, [SELECTED_CAMERA_ID]: 2, [SELECTED_CAMERA_SHOW_AGAIN]: true, [SIDE_BETS_PANEL_SHOW_AGAIN]: true, [IS_TABLE_MINIMISED]: false, [AMBIENT_SOUND_VOLUME]: 100, [IS_AMBIENT_SOUND_ENABLED]: true, [GAME_EFFECTS_VOLUME]: 100, [ARE_GAME_EFFECTS_ENABLED]: true, [MUSIC_VOLUME]: 100, [IS_MUSIC_ENABLED]: true, [VOICE_OVER_VOLUME]: 100, [IS_VOICE_OVER_ENABLED]: true, [ACTIVE_XL_MODE]: EModesXl.XL, [PLAY_VIDEO_STATE]: true, }, isFetching: false, }; /** * Fires action to update the local preferences * @param preferences - New local preferences */ const updateLocalPreferences = ( state: IPreferencesState, { payload }: any ) => update( state, { userPreferences: { $merge: payload }, } ); /** * Sets the isFetching * @param isFetching - New isFetching state */ const setIsFetching = ( state: IPreferencesState, { payload }: IBooleanAction ) => update( state, { isFetching: { $set: payload }, } ); export const preferences = reducerUtil( initialState, { [preferencesTypes.SET_IS_FETCHING]: setIsFetching, [preferencesTypes.UPDATE_LOCAL]: updateLocalPreferences, } );
typescript
<reponame>cgoncalves85/syswac<filename>web/css/custom.css @font-face { font-family: GothamLight; src: url(../fonts/Gotham-Font/GothamLight.ttf); } @font-face { font-family: GothamBold; src: url(../fonts/Gotham-Font/GothamBold.ttf); } @font-face { font-family: OpenSans; src: url(../fonts/OpenSans-Regular.ttf); } html, body { font-family: GothamLight; } .rota-img { transform: rotate(180deg); -ms-transform: rotate(180deg); /* IE 9 */ -moz-transform: rotate(180deg); /* Firefox */ -webkit-transform: rotate(180deg); /* Safari and Chrome */ -o-transform: rotate(180deg); /* Opera */ } .content-alert { margin-left: 225px; margin-right: 350px; margin-top: 25px; } .navbar { padding: 1rem 1rem } .text-bold { font-family: GothamBold; } .list-group-item.active { color: #4b0d44; font-weight: bold; } .credit { margin-left: 35px; } .line { position: absolute; bottom: 10px; left: 33%; } .form-create-order { //font-family: OpenSans; color: #0C0C0C; font-size: 1.05rem; margin-top: 65px; } .container-proyecto { padding-bottom: 140px; } .form-control, .form-control:focus { background-color: #e2e2e2; } .form-control:focus { border-color: #4b0d44; -webkit-box-shadow: 0px 0px 15px 0px rgba(75,13,68,0.3); -moz-box-shadow: 0px 0px 15px 0px rgba(75,13,68,0.3); box-shadow: 0px 0px 15px 0px rgba(75,13,68,0.3); } .form-control-lg { font-size: 1rem; } .custom-radio .custom-control-input:checked~.custom-control-label::before, .custom-radio .custom-control-input:checked~.custom-control-label::after { background-color: #000; border-radius: 50%; } .custom-radio .custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(255, 123, 255, 0.25); } select { background: url("../img/icons/chevron-right-6.png") no-repeat right #FFF; -moz-appearance: none; -webkit-appearance: none; appearance: none; background-position: 90%; } .select-custom { text-align-last:center; } .small, small { font-size: 95%; } .footer { position: fixed; bottom: 0; width: 100%; height: 60px; font-size: 0.9rem; background-color: #fff; border-top: 1px solid #6c757d; padding-top: 6px; z-index: 99; } .container-footer { padding-left: 10%; } .btn-outline-wac { font-size: 1rem; color: #16b494; border-color: #16b494; padding-right: 30px; font-weight: bold; } .btn-outline-wac>img { margin-right: 15px; } .btn-outline-wac:hover, .btn-outline-wac:focus, .btn-outline-wac:active { color: #16b494; background-color: #FFF; border-color: #16b494; } .btn-outline-wac:not(:disabled):not(.disabled).active, .btn-outline-wac:not(:disabled):not(.disabled):active, .show>.btn-outline-wac.dropdown-toggle { color: #16b494; background-color: transparent; border-color: #16B494; } .btn-proceso { position: absolute; right: 0px; margin-right: 10%; bottom: 10px; padding-left: 30px; padding-right: 30px; background-color: #16b494; border-color: #16B494; } .btn-proceso:hover, .btn-proceso:focus, .btn-proceso:active { background-color: #16b494; border-color: #16B494; } .btn-proceso:not(:disabled):not(.disabled).active, .btn-proceso:not(:disabled):not(.disabled):active, .show>.btn-proceso.dropdown-toggle { background-color: #16b494; border-color: #16B494; } .text-verde { color: #16B494; } .user { margin-top: 5px; margin-right: 10px; display: inline-block; position: absolute; } .img-drop-down { margin-top: 15px; } .img-icon-sidebar { margin: 0 25px; } .img-icon-dropdown { margin-right: 15px; } .mt-m { margin-top: -1%; } .user-name { margin-left: 52px; margin-top: 5px; display: inline-block; } .user-type { position: absolute; top: 33px; left: 60px; } .img-drop { margin-top: 18px; margin-left: 10px; } .drop-down::after { border: none; } .dropdown-menu-right { margin-top: 16px; right: 0; left: auto; border-radius: 0px; } .dropdown-menu { border: 1px solid #dee2e6; } .list-group-item { border: none; padding: 0.8rem 1.25rem; } #wrapper { overflow-x: hidden; } #sidebar-wrapper { min-height: 100vh; margin-left: -15rem; -webkit-transition: margin .25s ease-out; -moz-transition: margin .25s ease-out; -o-transition: margin .25s ease-out; transition: margin .25s ease-out; } #sidebar-wrapper .sidebar-heading { margin-top: 10px; padding: 0.875rem 1.25rem; font-size: 1.2rem; } #sidebar-wrapper .list-group { width: 15rem; } #page-content-wrapper { min-width: 100vw; background-color: #efefef8a; } .bg-content { background-color: #ececec; border-bottom: 1px solid #ccc; } #wrapper.toggled #sidebar-wrapper { margin-left: 0; } .input-lg.select2-container--krajee .select2-selection--multiple .select2-selection__choice, .input-group-lg .select2-container--krajee .select2-selection--multiple .select2-selection__choice { font-size: 14px; line-height: 1.3333333; border-radius: 4px; margin: 6px 0 0 8px; padding: 5px 10px; } .input-lg.select2-container--krajee .select2-selection--multiple .select2-selection__choice__remove, .input-group-lg .select2-container--krajee .select2-selection--multiple .select2-selection__choice__remove { font-size: 16px; margin-left: 3px; } .select2-container--krajee .select2-selection--multiple .select2-selection__rendered { background-color: #e2e2e2; } .input-lg.select2-container--krajee .select2-selection--multiple .select2-search--inline .select2-search__field, .input-group-lg .select2-container--krajee .select2-selection--multiple .select2-search--inline .select2-search__field { height: 42px; } .input-lg.select2-container--krajee .select2-selection__clear, .input-group-lg .select2-container--krajee .select2-selection__clear { top: 6px; font-size: 24px; } .input-lg.select2-container--krajee .select2-selection--multiple, .input-group-lg .select2-container--krajee .select2-selection--multiple { min-height: 40px; } .img-logo { margin-top: 15%; } .img-logo:hover { transition:all .3s ease-in-out; -webkit-transform: rotate(360deg); transform: rotate(360deg); } @media (min-width: 768px) { #sidebar-wrapper { margin-left: 0; } #page-content-wrapper { min-width: 0; width: 100%; } #wrapper.toggled #sidebar-wrapper { margin-left: -15rem; } }
css
RB Leipzig striker Timo Werner has been on the shortlist of every major European powerhouse with Real Madrid being the latest club to join the race for his signature. Los Blancos, who are planning for a long-term replacement for star striker Karim Benzema, are keen to bring Werner to Madrid. According to Spanish media outlet El Desmarque, Real Madrid have identified Timo Werner as Karim Benzema’s successor in the long run. The RB Leipzig striker has been one of the most wanted strikers in Europe and Real are the latest to join the chase. The report also added that the Spanish giants want the German striker as early as this January before the winter transfer window closes. Real Madrid continues to work, as every year, in improving its workforce. Zinedine Zidane has managed, with several tweaks, to re-engage Santiago Bernabeu and, if that were not enough, his team to fight for LaLiga Santander. However, the group still has a serious scorer problem and to solve it they have moved to Germany. Los Blancos are ready to offer £80 million for Werner’s services. The Luka Jovic experiment has failed miserably with the Serbian only scoring once so far in the entire season. Zinedine Zidane has lost his patience with Jovic and wants a new striker for the remainder of the campaign. However, Real will have a tough task of fighting big clubs to win Werner’s signature. Chelsea, Bayern Munich and Arsenal are also in the hunt to sign the 23-year-old number nine. Luring Werner from RB Leipzig won’t be easy as he signed a new contract extension in August with his current deal running till 2023. Die Roten Bullen are leading the Bundesliga table and are keen to win their first league title, in such circumstances, the club hierarchy won’t be willing to part ways with one of their most effective stars on the pitch.
english
{ "name": "messagesbroker", "version": "1.0.0", "description": "a nodejs secured mqtt broker for push messaging", "main": "server.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { "mosca":"2.2.0", "dotenv": "4.0.0", "messagingcommons": "file:../messagingcommons/" }, "keywords": [ "mqtt", "broker", "cloud", "messaging" ], "author": "famargon", "license": "Apache-2.0" }
json
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/browser_action_test_util.h" #include "chrome/browser/extensions/extension_action.h" #include "chrome/browser/extensions/extension_action_manager.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_tab_util.h" #include "chrome/browser/sessions/session_tab_helper.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_commands.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/test/base/interactive_test_utils.h" #include "chrome/test/base/ui_test_utils.h" #include "content/public/browser/notification_service.h" #include "extensions/browser/extension_registry.h" #include "extensions/browser/extension_system.h" #include "extensions/common/extension.h" #include "extensions/common/extension_set.h" #include "extensions/common/permissions/permissions_data.h" #include "extensions/test/extension_test_message_listener.h" #include "extensions/test/result_catcher.h" #if defined(OS_WIN) #include "ui/views/win/hwnd_util.h" #endif namespace extensions { namespace { // chrome.browserAction API tests that interact with the UI in such a way that // they cannot be run concurrently (i.e. openPopup API tests that require the // window be focused/active). class BrowserActionInteractiveTest : public ExtensionApiTest { public: BrowserActionInteractiveTest() {} virtual ~BrowserActionInteractiveTest() {} protected: // Function to control whether to run popup tests for the current platform. // These tests require RunExtensionSubtest to work as expected and the browser // window to able to be made active automatically. Returns false for platforms // where these conditions are not met. bool ShouldRunPopupTest() { // TODO(justinlin): http://crbug.com/177163 #if defined(OS_WIN) && !defined(NDEBUG) return false; #elif defined(OS_MACOSX) // TODO(justinlin): Browser window do not become active on Mac even when // Activate() is called on them. Enable when/if it's possible to fix. return false; #else return true; #endif } // Open an extension popup via the chrome.browserAction.openPopup API. void OpenExtensionPopupViaAPI() { // Setup the notification observer to wait for the popup to finish loading. content::WindowedNotificationObserver frame_observer( content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, content::NotificationService::AllSources()); // Show first popup in first window and expect it to have loaded. ASSERT_TRUE(RunExtensionSubtest("browser_action/open_popup", "open_popup_succeeds.html")) << message_; frame_observer.Wait(); EXPECT_TRUE(BrowserActionTestUtil(browser()).HasPopup()); } }; // Tests opening a popup using the chrome.browserAction.openPopup API. This test // opens a popup in the starting window, closes the popup, creates a new window // and opens a popup in the new window. Both popups should succeed in opening. IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest, TestOpenPopup) { if (!ShouldRunPopupTest()) return; BrowserActionTestUtil browserActionBar = BrowserActionTestUtil(browser()); // Setup extension message listener to wait for javascript to finish running. ExtensionTestMessageListener listener("ready", true); { OpenExtensionPopupViaAPI(); EXPECT_TRUE(browserActionBar.HasPopup()); browserActionBar.HidePopup(); } EXPECT_TRUE(listener.WaitUntilSatisfied()); Browser* new_browser = NULL; { content::WindowedNotificationObserver frame_observer( content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, content::NotificationService::AllSources()); // Open a new window. new_browser = chrome::FindBrowserWithWebContents( browser()->OpenURL(content::OpenURLParams( GURL("about:"), content::Referrer(), NEW_WINDOW, ui::PAGE_TRANSITION_TYPED, false))); #if defined(OS_WIN) // Hide all the buttons to test that it opens even when browser action is // in the overflow bucket. // TODO(justinlin): Implement for other platforms. browserActionBar.SetIconVisibilityCount(0); #endif frame_observer.Wait(); } EXPECT_TRUE(new_browser != NULL); // Flaky on non-aura linux http://crbug.com/309749 #if !(defined(OS_LINUX) && !defined(USE_AURA)) ResultCatcher catcher; { content::WindowedNotificationObserver frame_observer( content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, content::NotificationService::AllSources()); // Show second popup in new window. listener.Reply(""); frame_observer.Wait(); EXPECT_TRUE(BrowserActionTestUtil(new_browser).HasPopup()); } ASSERT_TRUE(catcher.GetNextResult()) << message_; #endif } // Tests opening a popup in an incognito window. IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest, TestOpenPopupIncognito) { if (!ShouldRunPopupTest()) return; content::WindowedNotificationObserver frame_observer( content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, content::NotificationService::AllSources()); ASSERT_TRUE(RunExtensionSubtest("browser_action/open_popup", "open_popup_succeeds.html", kFlagEnableIncognito | kFlagUseIncognito)) << message_; frame_observer.Wait(); // Non-Aura Linux uses a singleton for the popup, so it looks like all windows // have popups if there is any popup open. #if !(defined(OS_LINUX) && !defined(USE_AURA)) // Starting window does not have a popup. EXPECT_FALSE(BrowserActionTestUtil(browser()).HasPopup()); #endif // Incognito window should have a popup. EXPECT_TRUE(BrowserActionTestUtil(BrowserList::GetInstance( chrome::GetActiveDesktop())->GetLastActive()).HasPopup()); } #if defined(OS_LINUX) #define MAYBE_TestOpenPopupDoesNotCloseOtherPopups DISABLED_TestOpenPopupDoesNotCloseOtherPopups #else #define MAYBE_TestOpenPopupDoesNotCloseOtherPopups TestOpenPopupDoesNotCloseOtherPopups #endif // Tests if there is already a popup open (by a user click or otherwise), that // the openPopup API does not override it. IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest, MAYBE_TestOpenPopupDoesNotCloseOtherPopups) { if (!ShouldRunPopupTest()) return; // Load a first extension that can open a popup. ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII( "browser_action/popup"))); const Extension* extension = GetSingleLoadedExtension(); ASSERT_TRUE(extension) << message_; ExtensionTestMessageListener listener("ready", true); // Load the test extension which will do nothing except notifyPass() to // return control here. ASSERT_TRUE(RunExtensionSubtest("browser_action/open_popup", "open_popup_fails.html")) << message_; EXPECT_TRUE(listener.WaitUntilSatisfied()); content::WindowedNotificationObserver frame_observer( content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, content::NotificationService::AllSources()); // Open popup in the first extension. BrowserActionTestUtil(browser()).Press(0); frame_observer.Wait(); EXPECT_TRUE(BrowserActionTestUtil(browser()).HasPopup()); ResultCatcher catcher; // Return control to javascript to validate that opening a popup fails now. listener.Reply(""); ASSERT_TRUE(catcher.GetNextResult()) << message_; } // Test that openPopup does not grant tab permissions like for browser action // clicks if the activeTab permission is set. IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest, TestOpenPopupDoesNotGrantTabPermissions) { if (!ShouldRunPopupTest()) return; OpenExtensionPopupViaAPI(); ExtensionService* service = extensions::ExtensionSystem::Get( browser()->profile())->extension_service(); ASSERT_FALSE( service->GetExtensionById(last_loaded_extension_id(), false) ->permissions_data() ->HasAPIPermissionForTab( SessionTabHelper::IdForTab( browser()->tab_strip_model()->GetActiveWebContents()), APIPermission::kTab)); } // Test that the extension popup is closed when the browser window is clicked. IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest, BrowserClickClosesPopup1) { if (!ShouldRunPopupTest()) return; // Open an extension popup via the chrome.browserAction.openPopup API. content::WindowedNotificationObserver frame_observer( content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, content::NotificationService::AllSources()); ASSERT_TRUE(RunExtensionSubtest("browser_action/open_popup", "open_popup_succeeds.html")) << message_; frame_observer.Wait(); EXPECT_TRUE(BrowserActionTestUtil(browser()).HasPopup()); // Click on the omnibox to close the extension popup. ui_test_utils::ClickOnView(browser(), VIEW_ID_OMNIBOX); EXPECT_FALSE(BrowserActionTestUtil(browser()).HasPopup()); } // Test that the extension popup is closed when the browser window is clicked. IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest, BrowserClickClosesPopup2) { if (!ShouldRunPopupTest()) return; // Load a first extension that can open a popup. ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII( "browser_action/popup"))); const Extension* extension = GetSingleLoadedExtension(); ASSERT_TRUE(extension) << message_; // Open an extension popup by clicking the browser action button. content::WindowedNotificationObserver frame_observer( content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, content::NotificationService::AllSources()); BrowserActionTestUtil(browser()).Press(0); frame_observer.Wait(); EXPECT_TRUE(BrowserActionTestUtil(browser()).HasPopup()); // Click on the omnibox to close the extension popup. ui_test_utils::ClickOnView(browser(), VIEW_ID_OMNIBOX); EXPECT_FALSE(BrowserActionTestUtil(browser()).HasPopup()); } // Test that the extension popup is closed on browser tab switches. IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest, TabSwitchClosesPopup) { if (!ShouldRunPopupTest()) return; // Add a second tab to the browser and open an extension popup. chrome::NewTab(browser()); ASSERT_EQ(2, browser()->tab_strip_model()->count()); OpenExtensionPopupViaAPI(); // Press CTRL+TAB to change active tabs, the extension popup should close. ASSERT_TRUE(ui_test_utils::SendKeyPressSync( browser(), ui::VKEY_TAB, true, false, false, false)); EXPECT_FALSE(BrowserActionTestUtil(browser()).HasPopup()); } IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest, DeleteBrowserActionWithPopupOpen) { if (!ShouldRunPopupTest()) return; // First, we open a popup. OpenExtensionPopupViaAPI(); BrowserActionTestUtil browser_action_test_util(browser()); EXPECT_TRUE(browser_action_test_util.HasPopup()); // Then, find the extension that created it. content::WebContents* active_web_contents = browser()->tab_strip_model()->GetActiveWebContents(); ASSERT_TRUE(active_web_contents); GURL url = active_web_contents->GetLastCommittedURL(); const Extension* extension = ExtensionRegistry::Get(browser()->profile())-> enabled_extensions().GetExtensionOrAppByURL(url); ASSERT_TRUE(extension); // Finally, uninstall the extension, which causes the view to be deleted and // the popup to go away. This should not crash. UninstallExtension(extension->id()); EXPECT_FALSE(browser_action_test_util.HasPopup()); } #if defined(TOOLKIT_VIEWS) // Test closing the browser while inspecting an extension popup with dev tools. IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest, CloseBrowserWithDevTools) { if (!ShouldRunPopupTest()) return; // Load a first extension that can open a popup. ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII( "browser_action/popup"))); const Extension* extension = GetSingleLoadedExtension(); ASSERT_TRUE(extension) << message_; // Open an extension popup by clicking the browser action button. content::WindowedNotificationObserver frame_observer( content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, content::NotificationService::AllSources()); BrowserActionTestUtil(browser()).InspectPopup(0); frame_observer.Wait(); EXPECT_TRUE(BrowserActionTestUtil(browser()).HasPopup()); // Close the browser window, this should not cause a crash. chrome::CloseWindow(browser()); } #endif // TOOLKIT_VIEWS #if defined(OS_WIN) // Test that forcibly closing the browser and popup HWND does not cause a crash. // http://crbug.com/400646 IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest, DISABLED_DestroyHWNDDoesNotCrash) { if (!ShouldRunPopupTest()) return; OpenExtensionPopupViaAPI(); BrowserActionTestUtil test_util(browser()); const gfx::NativeView view = test_util.GetPopupNativeView(); EXPECT_NE(static_cast<gfx::NativeView>(NULL), view); const HWND hwnd = views::HWNDForNativeView(view); EXPECT_EQ(hwnd, views::HWNDForNativeView(browser()->window()->GetNativeWindow())); EXPECT_EQ(TRUE, ::IsWindow(hwnd)); // Create a new browser window to prevent the message loop from terminating. Browser* new_browser = chrome::FindBrowserWithWebContents( browser()->OpenURL(content::OpenURLParams( GURL("about:"), content::Referrer(), NEW_WINDOW, ui::PAGE_TRANSITION_TYPED, false))); // Forcibly closing the browser HWND should not cause a crash. EXPECT_EQ(TRUE, ::CloseWindow(hwnd)); EXPECT_EQ(TRUE, ::DestroyWindow(hwnd)); EXPECT_EQ(FALSE, ::IsWindow(hwnd)); } #endif // OS_WIN } // namespace } // namespace extensions
cpp
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.odftoolkit.simple.common.navigation; import java.util.logging.Level; import java.util.logging.Logger; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.odftoolkit.simple.Document; import org.odftoolkit.simple.TextDocument; import org.odftoolkit.simple.table.Cell; import org.odftoolkit.simple.table.Table; import org.odftoolkit.simple.utils.ResourceUtilities; /** * Test the method of class * org.odftoolkit.simple.common.navigation.TableSelection */ public class TableSelectionTest { private static final String TEXT_FILE = "TestTextSelection.odt"; TextDocument doc,sourcedoc; TextNavigation search; @BeforeClass public static void setUpClass() throws Exception { } @AfterClass public static void tearDownClass() throws Exception { } @Before public void setUp() { try { doc = (TextDocument) Document.loadDocument(ResourceUtilities.getAbsolutePath(TEXT_FILE)); sourcedoc=TextDocument.newTextDocument(); String tablename = "Table1"; int rowcount = 7, columncount = 5; String[][] data = new String[rowcount][columncount]; for (int i = 0; i < rowcount; i++) { for (int j = 0; j < columncount; j++) { data[i][j] = "string" + (i * columncount + j); } } String[] rowlabels = new String[rowcount]; for (int i = 0; i < rowcount; i++) { rowlabels[i] = "RowHeader" + i; } String[] columnlabels = new String[columncount]; for (int i = 0; i < columncount; i++) { columnlabels[i] = "ColumnHeader" + i; } Table table = Table.newTable(sourcedoc, rowlabels, columnlabels, data); table.setTableName(tablename); String tablename2 = "Table2"; int rowcount2 = 10, columncount2 = 4; double[][] data2 = new double[rowcount2][columncount2]; for (int i = 0; i < rowcount2; i++) { for (int j = 0; j < columncount2; j++) { data2[i][j] = Math.random(); } } String[] rowlabels2 = new String[rowcount2]; for (int i = 0; i < rowcount2; i++) { rowlabels2[i] = "RowHeader" + i; } String[] columnlabels2 = new String[columncount2]; for (int i = 0; i < columncount2; i++) { columnlabels2[i] = "ColumnHeader" + i; } Table table2 = Table.newTable(sourcedoc, rowlabels2, columnlabels2, data2); table2.setTableName(tablename2); String tablename3 = "Table3"; int rownumber3 = 5; int clmnumber3 = 3; Table table1 = Table.newTable(sourcedoc, rownumber3, clmnumber3); table1.setTableName(tablename3); sourcedoc.save(ResourceUtilities.newTestOutputFile("TestTableSelectionSource.odt")); } catch (Exception e) { Logger.getLogger(TableSelectionTest.class.getName()).log(Level.SEVERE, e.getMessage(), e); Assert.fail("Failed with " + e.getClass().getName() + ": '" + e.getMessage() + "'"); } } @After public void tearDown() { } /** * Test replaceWithTable method of * org.odftoolkit.simple.common.navigation.TableSelection replace replace SIMPLE,Task1,Container to different Table */ @Test public void testReplaceWithTable() { search = null; //6 Simple, at the middle of original Paragraph, split original Paragraph, insert before the second Paragraph. search = new TextNavigation("SIMPLE", doc); while (search.hasNext()) { TextSelection item = (TextSelection) search.nextSelection(); TableSelection nextTableSelection=new TableSelection(item); Table table=sourcedoc.getTableByName("Table1"); Cell cell = table.getCellByPosition(0, 0); cell.setStringValue("SIMPLE"); Table newtable = nextTableSelection.replaceWithTable(table); Assert.assertNotNull(newtable); Assert.assertEquals(1, newtable.getHeaderColumnCount()); Assert.assertEquals(1, newtable.getHeaderRowCount()); Assert.assertEquals(7 + 1, newtable.getRowCount()); Assert.assertEquals(5 + 1, newtable.getColumnCount()); cell = newtable.getCellByPosition(1, 1); Assert.assertEquals("string", cell.getValueType()); } //2 Task1, #1 at the start of original Paragraph, #2 replace original Paragraph search = new TextNavigation("Task1", doc); while (search.hasNext()) { TextSelection item = (TextSelection) search.nextSelection(); TableSelection nextTableSelection=new TableSelection(item); Table table=sourcedoc.getTableByName("Table2"); Table newtable = nextTableSelection.replaceWithTable(table); Cell cell = newtable.getCellByPosition(0, 0); cell.setStringValue("From Source Table2"); Assert.assertNotNull(newtable); Assert.assertEquals(1, newtable.getHeaderColumnCount()); Assert.assertEquals(1, newtable.getHeaderRowCount()); Assert.assertEquals(10 + 1, newtable.getRowCount()); Assert.assertEquals(4 + 1, newtable.getColumnCount()); cell = newtable.getCellByPosition(1, 1); Assert.assertEquals("float", cell.getValueType()); } //1 RESS%>, #1 at the end of original Paragraph, search = new TextNavigation("RESS%>", doc); while (search.hasNext()) { TextSelection item = (TextSelection) search.nextSelection(); TableSelection nextTableSelection=new TableSelection(item); Table table=sourcedoc.getTableByName("Table3"); Table newtable = nextTableSelection.replaceWithTable(table); Cell cell = newtable.getCellByPosition(0, 0); cell.setStringValue("From Source Table3"); Assert.assertNotNull(newtable); Assert.assertEquals(5, newtable.getRowCount()); Assert.assertEquals(3, newtable.getColumnCount()); } try { doc.save(ResourceUtilities.newTestOutputFile("TestTableSelectionResult.odt")); } catch (Exception e) { Logger.getLogger(TableSelectionTest.class.getName()).log(Level.SEVERE, e.getMessage(), e); Assert.fail("Failed with " + e.getClass().getName() + ": '" + e.getMessage() + "'"); } } }
java
{"PREVALENCE_BY_GENDER_AGE_YEAR":{"TRELLIS_NAME":[],"SERIES_NAME":[],"X_CALENDAR_YEAR":[],"Y_PREVALENCE_1000PP":[]},"PREVALENCE_BY_MONTH":{"X_CALENDAR_MONTH":[],"Y_PREVALENCE_1000PP":[]},"PROCEDURE_FREQUENCY_DISTRIBUTION":{"Y_NUM_PERSONS":0,"X_COUNT":1},"PROCEDURES_BY_TYPE":{"CONCEPT_NAME":"EHR order list entry","COUNT_VALUE":46},"AGE_AT_FIRST_OCCURRENCE":{"CATEGORY":["FEMALE","MALE"],"MIN_VALUE":[18,7],"P10_VALUE":[49,15],"P25_VALUE":[57,26],"MEDIAN_VALUE":[61,35],"P75_VALUE":[74,55],"P90_VALUE":[84,68],"MAX_VALUE":[91,88]}}
json
Former England coach Paul Farbrace expressed his concern over Buttler’s dwindling form and opined that the keeper would need to step aside from Tests if he fails in Sri Lanka. Farbrace hailed Ben Foakes as a suitable replacement for Buttler and also praised Bairstow for his recent improvements. Former England assistant coach expressed his concern over wicket-keeper Jos Buttler’s ever-diminishing form in red-ball cricket. The otherwise free flowing batsman last scored a Test ton almost 18 months ago, while scoring just one fifty in his last 10 five-day games, averaging just 21.31 since the Ashes. These numbers have Farbrace worrying about Buttler and the former England coach feels that the Sri Lanka series will be be very crucial for the wicket-keeper batsman. The former Kent batter feels that Buttler must step aside from the red-ball format and work on his game should he fail to get runs under his belt in Sri Lanka. "I am worried about Jos," Farbrace told ESPN Cricinfo. "I think Jos should be England's keeper and batter but he knows he can't keep going long periods of time without making contributions. "What should a player of his ability be averaging after 40 games? It should be 40-plus. It is a lot lower than he would want it to be. I would definitely keep him for the Sri Lanka series but he needs to score runs. If not, then he has to step aside." The inclusion of Ben Foakes, hero of England’s last Sri Lanka tour, is bound to add burden on Buttler’s already occupied shoulders. Farbrace was all praise for Foakes and the wicket-keeper's hunger to get runs and opined that the 27-year-old's disappointing 2019 Championship season (in which he averaged 26.14) may well have been provoked by his being dropped by England. Farbrace also had some world of praise for Jonny Bairstow's growth as a wicket-keeper after his recent axing from the side. "Foakes is England's best keeper bar none," Farbrace said. "He is a quality act with the bat. He showed he is up to it in Sri Lanka. Being dropped in the West Indies had a massive effect on him during the English summer. It kicked the legs from underneath him. "Jonny Bairstow's keeping improved enormously, too, but he got bowled too often and did not score enough runs. To get the best out of Jonny, he bats at No. 7 and keeps wicket. A lot of us think he can nail down No. 5, but maybe No. 7 suits him."
english
The Merseyside Derby has never needed any talking up , but the match on 28th might just be one of the most important derbies in recent times. With both Liverpool and Everton pushing hard for the coveted top 4 finish, this article looks into the Strengths, Weaknesses, Opportunities and Threats both sides are going to face heading into the marquee clash on Tuesday. When you talk about Liverpool, one man will be at the center of all discussions and that man is Luis Suarez. The Liverpool front man has been in top form this season and containing him seems to be just impossible for defences around the Premier League. Also, with the return of Daniel Sturridge to the line up, the Liverpool attack can boast of two top quality strikers. When the hard work of Henderson, the vision and drive of Gerrard and the brilliance of Coutinho are added to the mix, Liverpool certainly look like a very difficult team to contain. Also, at Anfield they have shown some solid form and coupled with the fact that they are the League’s second most prolific team, Everton’s defence will have a real task at hand to keep the Liverpool front men at bay. After a busy Christmas schedule, injuries have started taking a toll on the reds. The injury ravaged reds have key defensive players like Agger, Sakho and Enrique missing. Also, Liverpool have looked really vulnerable to quick counter attacks and set pieces. At Goodison park, Lukaku and Mirallas caused a host of problems to the Liverpool defence, and they will be looking to exploit the weakened back line of the reds. With key players like Sturridge, Joe Allen and Flanagan just returning from injuries, a match of this magnitude might really expose the physical frailties of the reds. For the first time in four seasons, Liverpool have a realistic chance of finishing in the top 4 this season. A win over their Merseyside rivals will provide them the perfect boost to kick on and play some quality football in the second half of the season. With their home form being solid if not spectacular, Liverpool will be looking to put some distance between their fellow top 4 rivals by securing a positive result on tuesday night. Liverpool have been in the top 4 positions from pretty much the beginning of this season and would like to keep it that way. With Everton, Tottenham and Manchester United all breathing down their necks, a loss here might just set the dominoes falling and cause real panic among both the fans and the players. A club of Liverpool’s stature definitely needs to play in the Champions League and it is these type of matches that have to be won to ensure their participation in Europe’s elite club competition next season. A team which is high on confidence, Everton have looked strong throughout the season. With impressive displays against Arsenal and Manchester United away, Everton have become really tough to beat. With the power and skills of Lukaku, the pace and trickery of Mirallas , the no nonsense play of Barry and a solid defensive back line with the likes of Leighton Baines in the team, Everton have more than enough players capable of creating a problem to the very best. Under Roberto Martinez, Everton have been playing football which is easy on the eye and managed to grind out results in some tough matches. After having performed admirably up to this point in the season, Everton will be going with no fear to Anfield . Just like their Merseyside rivals, Everton have also been hit with a spate of injuries . One of their best performers Coleman has been sidelined with a minor hamstring injury. Promising performers like Ross Barkely, Steven Pienaar, Oviedo and Gerard Deulofeu have also suffered injuries in the past few matches and will definitely miss out on Tuesday night. With a new look back line which has been largely untested this season, Suarez and Sturridge will be fancying their chances of getting on the score sheet. Also, Lukaku has been showing some indifferent form in the past few weeks, and they seem to lack a plan b if things start going wrong. A win here will see them overtaking their great rivals in the League standings and will guarantee their position as serious top 4 contenders. Everton have quietly been going about their business this season, and a positive result at Anfield will go a long way in securing a European position for the next season. With a solid if not spectacular start to the season, Everton are at a real risk of letting a promising position slip if they have a lackluster performance on Tuesday night. With all their top 4 rivals having arguably better squads on paper, Everton will have to really dig deep to grind out a result at Anfield . Look out for the battle of tactics between two of the most promising young managers – Brendan Rodgers and Roberto Martinez. All things said and done, the Merseyside derby will be a truly entertaining affair with many goals expected. If the last match between these two great rivals is anything to go by, we are definitely in for a treat on Tuesday night. Who do you think is going to win? Leave a comment.
english
A very warm welcome to our Institute. Over the last few decades, we have become synonymous with quality hospitality education . We are focused on designing educational and training opportunities for you. Experiencing- something that someone has actually done or lived through- is the difference for students enrolled with us. Experiential learning is intertwined into all aspects of your life while on campus, in and out of the classroom. You don’t just learn theory. The ongoing pandemic has created a challenging situation for the whole world and our way of living has been undergoing tremendous changes over the last several months. The time is now ripe to reinvent ourselves. The strength of our institution is its people – faculty, staff and especially you the students who have an innate capacity of adapting and rising above testing environments. We iinvite you to chart your own path of discovery, learning and growth, and begin your unque journey that is as unique and individual as you are. © IHM GOA 2023 | Web Design by Team Inertia Technologies. | Hosted By National Informatics Centre. Web Design by Team Inertia Technologies.
english
<filename>olympics/testdata/tests/top-athletes-in-sport/2/out.json [{"athlete":"<NAME>","country":"Italy","medals":{"gold":2,"silver":0,"bronze":1,"total":3},"medals_by_year":{"2002":{"gold":1,"silver":0,"bronze":0,"total":1},"2006":{"gold":1,"silver":0,"bronze":0,"total":1},"2010":{"gold":0,"silver":0,"bronze":1,"total":1}}},{"athlete":"<NAME>","country":"Austria","medals":{"gold":2,"silver":0,"bronze":0,"total":2},"medals_by_year":{"2006":{"gold":1,"silver":0,"bronze":0,"total":1},"2010":{"gold":1,"silver":0,"bronze":0,"total":1}}},{"athlete":"<NAME>","country":"Germany","medals":{"gold":2,"silver":0,"bronze":0,"total":2},"medals_by_year":{"2002":{"gold":1,"silver":0,"bronze":0,"total":1},"2006":{"gold":1,"silver":0,"bronze":0,"total":1}}}]
json
{ "name": "mac-brave", "version": "2020.12.3", "description": "macOS Brave Browser.app scripts", "keywords": [ "Brave", "Browser" ], "homepage": "https://github.com/looking-for-a-job/mac-brave", "license": "Unlicense", "bin": { ".brave-close.applescript": "./scripts/.brave-close.applescript", ".brave-fullscreen-detect.applescript": "./scripts/.brave-fullscreen-detect.applescript", ".brave-fullscreen-enter.applescript": "./scripts/.brave-fullscreen-enter.applescript", ".brave-fullscreen-exit.applescript": "./scripts/.brave-fullscreen-exit.applescript", ".brave-isready.applescript": "./scripts/.brave-isready.applescript", ".brave-noisy-tabs.applescript": "./scripts/.brave-noisy-tabs.applescript", ".brave-open.applescript": "./scripts/.brave-open.applescript", ".brave-refresh.applescript": "./scripts/.brave-refresh.applescript", ".brave-url.applescript": "./scripts/.brave-url.applescript", ".brave-urls.applescript": "./scripts/.brave-urls.applescript", "brave": "./scripts/brave", "brave-close": "./scripts/brave-close", "brave-frontmost": "./scripts/brave-frontmost", "brave-fullscreen-detect": "./scripts/brave-fullscreen-detect", "brave-fullscreen-enter": "./scripts/brave-fullscreen-enter", "brave-fullscreen-exit": "./scripts/brave-fullscreen-exit", "brave-isready": "./scripts/brave-isready", "brave-kill": "./scripts/brave-kill", "brave-noisy-tabs": "./scripts/brave-noisy-tabs", "brave-open": "./scripts/brave-open", "brave-pid": "./scripts/brave-pid", "brave-refresh": "./scripts/brave-refresh", "brave-url": "./scripts/brave-url", "brave-urls": "./scripts/brave-urls" } }
json
<filename>app/main/static/css/worklog.css .margin-top-05 { margin-top: 0.5em; } .margin-top-10 { margin-top: 1.0em; } .margin-top-15 { margin-top: 1.5em; } .margin-top-20 { margin-top: 2.0em; } .margin-clear{ margin: 0} .padding-05 { padding: 0.5em; } .padding-10 { padding: 1.0em; } .padding-15 { padding: 1.5em; } .padding-20 { padding: 2.0em; } .txt-center{text-align: center;} .font-bold {font-weight: 700; } .top-buffur {top: 8em} fieldset.scheduler-border { border: 1px solid #ddd !important; padding: 0 1.4em 1.4em 1.4em !important; margin: 0 0 1.5em 0 !important; -webkit-box-shadow: 0px 0px 0px 0px #000; box-shadow: 0px 0px 0px 0px #000; border-radius: 4px; } textarea{ resize: vertical;} img {vertical-align: text-top;} legend.scheduler-border { font-size: 1.2em !important; font-weight: bold !important; text-align: left !important; width:auto; padding:0 10px; border-bottom:none; } .search{ background:#f5f5f5 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAAb0lEQVR42p2RMQ7AIAhFWXsG1h7Gtffo6urqyJGpwyetomnwJ38BH/wgfZSaS7PABbVOqkqm3Fzx6IQTatlDb5PJi21YBy1iuNgjJIgzFXqyCcXj1Z1DXNGTiw01aP252DCCgH7Fk41h8KaAGMDxADnaOPucd/m3AAAAAElFTkSuQmCC) no-repeat 6px 10px; padding-left: 24px; } #pagination .pagination{ margin: 0; } #collapse{text-decoration: none;} #issues-wrap div.row.well{ margin-top: -15px; border-radius: 0; } #report-tb tr td, #report-tb tr th{ vertical-align: middle; } #loginDialog { position: absolute; top: 15%; left: 50%; margin-left: -200px; padding: 20px; } #loginDialog div.modal-content{ width: 400px; background-color: #eee; } body { padding-bottom: 40px; background-color: #eee; } .input-group-addon.danger { color: rgb(255, 255, 255); background-color: rgb(217, 83, 79); border-color: rgb(212, 63, 58); } .input-group-addon.success { color: rgb(255, 255, 255); background-color: rgb(92, 184, 92); border-color: rgb(76, 174, 76); } .input-group-addon.info { color: rgb(255, 255, 255); background-color: rgb(57, 179, 215); border-color: rgb(38, 154, 188); } .report-tip{ text-align: center; padding: 15px; } .form-signin { max-width: 330px; padding: 15px; margin: 0 auto; } .form-signin .form-signin-heading, .form-signin .checkbox { margin-bottom: 10px; } .form-signin .checkbox { font-weight: normal; } .form-signin .form-control { position: relative; height: auto; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; padding: 10px; font-size: 16px; } .form-signin .form-control:focus { z-index: 2; } .form-signin input[type="email"] { margin-bottom: -1px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .form-signin input[type="password"] { margin-bottom: 10px; border-top-left-radius: 0; border-top-right-radius: 0; } .has-error{ border: 1px solid red !important; outline: none !important; } p.issue-summary{ margin: 0; padding: 0; } p.issue-summary i{ font-weight: normal; font-size: small; width:100%; line-height:18px; height:36px; overflow: hidden; word-break: break-all; word-wrap: break-word; color: #666; } #footer{ padding-top: 30px; background-color: #f0f0f0; border-top: 1px solid #d9d9d9; vertical-align: middle; color: #333333; } .loading{ width: 420px; background-color: white; line-height: 50px; height: 50px; border-radius: 4px; position: absolute; top: 50%; left: 50%; margin-left: -210px; margin-top: -25px; } #loginTip{ color: red; margin: 10px 0 0 0; } #add-other span.btn{ cursor: pointer; font-weight: bold; } #add-other span.btn:hover{ color: #000; } #report-tb tr.update{ background-color:#efefef; } .worklog-wrap{ min-height:400px; }
css
<reponame>anthgold/ping-pong <!DOCTYPE html> <html> <head> <link href="css/bootstrap.css" rel="stylesheet" type="text/css"> <link href="css/styles.css" rel="stylesheet" type="text/css"> <script src="js/jquery-1.12.2.js"></script> <script src="js/scripts.js"></script> <meta charset="utf-8"> <title>Ping-Pong</title> </head> <body> <div class="container"> <h1>Ping-Pong</h1> <p> Ping-pong takes a number and returns a range of numbers from 1 to the chosen number with the following exceptions: </p> <ul> <li>Numbers divisible by 3 are replaced with "ping";</li> <li>Numbers divisible by 5 are replaced with "pong";</li> <li>Numbers divisible by 15 are replaced with "pingpong."</li> </ul> <!-- Ask for and take user input, with button --> <form id="number-taker"> <div class="form-group"> <label for="form"> Enter a number here: </label> <input id="number" type="number" min="1"> </div> <button type="submit" class="btn">Let's Play!</button> </form> <ul id="result"> <!-- Output goes here --> </ul> </div> <div class="container"> <div id="resubmit"> <button type="submit" class="btn">Let's Play Again!</button> </div> </div> </body> </html>
html
What’s the story? In his recap of the Royal Rumble for Wrestling Observer’s Figure Four Online, Dave Meltzer noted that SmackDown Live superstar Luke Harper has likely turned ‘face’ as he attacked his fellow Wyatt Family members, Bray Wyatt and Randy Orton, during the 2017 Royal Rumble match. Randy Orton registered his second Royal Rumble victory after last eliminating Roman Reigns at the Alamodome in San Antonio, Texas last night. In the closing stages of the match, it was down to Orton, Bray Wyatt, Roman Reigns and Chris Jericho. A ‘Superman Punch’ from Reigns accounted for Jericho, leaving him and the Wyatts as the last three men in the race for a ticket to WrestleMania. Even as ‘The Viper’ and Bray tried to double-team against ‘The Big Dog’, he managed to toss ‘The Eater of the Worlds’ over the top rope. However, Randy Orton countered an attempted spear on him with an RKO and eliminated Roman to win the match. Bray Wyatt and Randy Orton were already in the ring when Luke Harper made his entry in the Royal Rumble match at #25. He started off by making short work of Apollo Crews before setting his sights on Orton. Wyatt, as usual, tried to play the peacemaker but received a lariat from Harper for his efforts. ‘The Backwoods Brawler’ attacked Randy as well and proceeded to set up Bray Wyatt for a ‘Sister Abigail’. ‘The Apex Predator’ came to the rescue, though, and delivered an RKO to Luke Harper. However, Harper did manage to stick around for a while before being eliminated by Goldberg. What next? The turn of events at the Royal Rumble has added an interesting angle to the Wyatt Family storyline and post-Rumble episode of SmackDown Live is sure to witness the repercussions of it. His fallout with The Wyatt Family may have provided Luke Harper the perfect opportunity to gain more prominence as a singles wrestler. We will be hoping that Harper is given enough scope to prove whether he belongs to the big league or not.
english
<gh_stars>100-1000 { "word": "Rear", "definitions": [ "Bring up and care for (a child) until they are fully grown.", "(of an animal) care for (its young) until they are fully grown.", "Breed and raise (animals)", "Grow or cultivate (plants)", "(of a horse or other animal) raise itself upright on its hind legs.", "(of a building, mountain, etc.) extend or appear to extend to a great height.", "(of a person) show anger or irritation.", "Set upright." ], "parts-of-speech": "Verb" }
json
.navigator{ width: 100%; height: 55px; background: #1A374D; border: 1px solid white; padding-left: 20px; padding-right: 20px; display: flex; flex-direction: row; align-items: center; top: 0; left: 0; } .navigator a{ text-decoration: none; color: #8DA7BE; font-size: 1em; margin-right: 10px; } .navigator a:hover{ color: #cde6f5; }
css
'use strict' /** * Module Dependencies * @ignore */ const OperationNotSupportedError = require('../OperationNotSupportedError') /** * KeyType * @ignore */ class KeyType { /** * constructor * * @class KeyType * * @internal For internal use only * * @description * Abstract KeyType class */ constructor (params) { this.params = params } /** * IMPORT * @ignore */ fromPrivatePKCS1 (key) { throw new OperationNotSupportedError() } fromPrivatePKCS8 (key) { throw new OperationNotSupportedError() } fromPublicPKCS1 (key) { throw new OperationNotSupportedError() } fromPublicPKCS8 (key) { throw new OperationNotSupportedError() } fromPrivateBlk (key) { throw new OperationNotSupportedError() } fromPublicBlk (key) { throw new OperationNotSupportedError() } fromJwk (key) { throw new OperationNotSupportedError() } /** * EXPORT * @ignore */ toPrivatePKCS1 (key) { throw new OperationNotSupportedError() } toPrivatePKCS8 (key) { throw new OperationNotSupportedError() } toPublicPKCS1 (key) { throw new OperationNotSupportedError() } toPublicPKCS8 (key) { throw new OperationNotSupportedError() } toPrivateBlk (key) { throw new OperationNotSupportedError() } toPublicBlk (key) { throw new OperationNotSupportedError() } toPrivateJwk (key) { throw new OperationNotSupportedError() } toPublicJwk (key) { throw new OperationNotSupportedError() } /** * HELPERS * @ignore */ static formatPem (base64pem, descriptor) { return `-----BEGIN ${descriptor} KEY-----\n` + base64pem.match(/.{1,64}/g).join('\n') + `\n-----END ${descriptor} KEY-----` } } /** * Export * @ignore */ module.exports = KeyType
javascript
<reponame>C-Element/raven-messenger<filename>src/pages/App.tsx import { Box, Typography } from '@material-ui/core'; import React from 'react'; export default function Hello(): JSX.Element { return ( <Box sx={{ display: 'flex', height: '80vh' }}> <Box sx={{ margin: 'auto' }}> <Typography variant="h3"><NAME>!</Typography> </Box> </Box> ); }
typescript
tion of coking coal mines, as such has not been under the consideration of the Government. (b) and (c). Do not arise. Setting up of Project and Camps for Eye Operation 8399. SHRI MAYAVAN : SHRI N. R. LASKAR: SHRI DHANDAPANI : SHRI CHENGALRAYA NAIDU : SHRI B. K. DASCHOWDHURY: Will the Minister of HEALTH AND FAMILY PLANNING AND WORKS, HOUSING AND URBAN DEVELOPMENT be pleased to state : (a) whether it is a fact that the Union Government has approved the Project 'Eyes of India' whose aim is to organise eye camps and undertake eye operations; (b) if so, what will be the total cost of expenditure involved; (c) whether the scheme has been worked out by the Royal Commonwealth Society for the blind in collaboration with the National Association of the Blind in India ; and (d) if so, how far this project will help Government in producing ophthalmic specialist and for giving medical aid to the people. THE MINISTER OF STATE IN THE MINISTRY OF HEALTH AND FAMILY PLANNING AND WORKS, HOUSING AND URBAN DEVELOPMENT (SHRI B. S. MURTHY): (a) The project has not yet been formally approved by the Government of India as no detailed report has been submitted to them nor a formal request made. (b) It is difficult at this stage to estimate cost. According to one estimate the expenditure would range between £65,000 to £85,000. (c) Yes. (d) The project aims at providing operative ophthalmic care to the needy in the villages and not in providing ophthalmic specialists. Import needs of Crude Oil during 1969 8401. SHRI ONKARLAL BOHRA : Will the Minister of PETROLEUM AND CHEMICALS AND MINES AND METALS be pleased to state : (a) whether it is a fact that the import need of crude oil for 1969 was estimated at 12.36 million tonnes involving a foreign exchange worth Rs. 107 crores ; (b) what are the actual figures of import for the said period; and (c) whether this heavy burden on foreign exchange was caused due to the reckless dieselisation programme of Railways, which on the other hand resulted in loss to the coal industry ? THE MINISTER OF STATE IN THE MINISTRY OF PETROLEUM AND CHEMICALS AND MINES AND METALS (SHRI D. R. CHAVAN): (a) Yes. (b) During 1969, crude oil imports amounted to 10.8 million tonnes costing Rs. 94.6 crores in foreign exchange. (c) No. On the other hand, the production of high speed diesel oil within the country during 1969 was in excess of the requirements, and the surplus totalling 67,000 tonnes was exported. Comparative deposits of low grade and high grade coking coal 8402. SHRI ONKARLAL BOHRA : SHRI SAMAR GUHA : Will the Minister of PETROLEUM AND CHEMICALS AND MINES AND METALS be pleased to state : (a) whether it is fact that the country has larger deposits of comparatively poorer grade of coking coal as compared to higher grade of coal and in order to conserve the higher grade coal, the steel plants shall have to consume comparatively poorer grade of coal in much quantity; VAISAKHA 14, 1892 (SAKA) (b) whether it is also a fact that the Hindustan Steel Limited is offering price for higher grade of coal which is mined at less cost as compared to comparatively poorer grade of coal being mined costing heavy expenditure ; and (c) whether this will not render comparatively low grade mines uneconomical which may result in their closing down and create unemployment problem, and also quicker extinction of limited deposits of higher grade coal ? THE MINISTER OF STATE IN THE MINISTRY OF PETROLEUM AND CHEMICALS AND MINES AND METALS (SHRI JAGANATH RAO): (a) Yes, Sir. The Steel Plants are already taking lower grades of coking coal after beneficiation to the extent possible. (b) and (c). Price of coal is related to quality. The cost of mining of coal depends on several factors, such as, depth, mining conditions, extent of mechanisation, etc. It cannot be said, as a general rule, that higher grades of coking coal are mined at less cost than lower grades of coal. Again, coal mined under adverse conditions is eligible for subsidy, so that the mining operations under difficult conditions do not become very un-economical. Frustration and Discontent among the Architectural Draftsmen in C. P. W. D. 8403. SHRI A. DIPA: Will the Minister of HEALTH AND FAMILY PLANNING AND WORKS, HOUSING AND URBAN DEVELOPMENT be pleased to state : (a) whether it is fact that frustration and discontent prevails among the Architectural Draftsmen in C. P. W. D. on account of their low and shortspanned grade viz. Rs. 205 to 280 and poor avenues of promotion and 30 per cent of architectural draftsmen have reached the maximum of grade within last three years; (b) whether it is also a fact that Architectural Draftsmen of C. P. W. D. have submitted a representation regarding extension of maximum of the grade; if so, the details there of; (c) the action taken thereon and if not, the reasons therefor; and (d) whether Government will reconsider the matter? THE MINISTER OF HEALTH AND FAMILY PLANNING AND WORKS, HOUSING AND URBAN DEVELOPMENT (SHRI K. K. SHAH): (a) the scale of pay of Architectural Draftsmen is Rs. 205-7-240-8280 and is a shortspanned grade. About 18.3% of Architectural Draftsmen are, at present, drawing the maximum of the pay scale viz. Rs. 280/-. There may be some frustration among the Architectural Draftsmen on this count. The (b) Yes. Architectural Draftsmen desire that their grade should be extended upto Rs. 380/- making it a scale of Rs. 205-7240-8-280-10-380. (c) There is a ban on upward revision of scales of pay and the Association have been informed that eir proposal to revise the scale of pay of Architectural Draftsmen cannot be accepted at this stage. (d) The Government can reconsider the matter only when the ban on upward revision of scale of pay has been lifted. Further the Third Pay Commission may also look into this Disparity in determination of Selection Grade of Architectural Draftsmen 8404. SHRI A. DIPA : Will the Minister of HEALTH AND FAMILY PLANNING AND WORKS, HOUSING AND URBAN DEVELOPMENT be pleased to state : (a) whether it is a fact that in the Ministry the Health Department determines Selection Grade posts at the rate of 20 per cent of the total strength of Architectural Draftsmen, whereas the C. P. W. D., determines Selection Grade posts at the rate 20 per cent of the permanent strength of Architectural Draftsmen ; and (b) if so, the reasons for such disparity and the steps government propose to take to rectify the same? THE MINISTER OF HEALTH AND FAMILY PLANNING AND WORKS, HOUSING AND URBAN DEVELOPMENT (SHRI K. K. SHAH): (a) No, Sir. In the Department of Health also the number of posts of Architectural Draftsmen in Selection Grade is now calculated at 20% of permanent posts of Architectural Draftsmen. (b) There is no disparity. Removal of Slum Colonies around Safdarjung Enclave, New Delhi 8405. SHRI S. C. SAMANTA : Will the Minister of HEALTH AND FAMILY PLANNING AND WORKS, HOUSING AND URBAN DEVELOPMENT be pleased to state : (a) whether the Safdarjung Enclave was developed by the Delhi Development Authority and plots therein were sold by public auction; (b) if so, the maximum price for a plot of 200 square yards the D. D. A. got through public auction till recently ; (c) whether the Safdarjung Enclave is completely developed, as was declared by D. D. A. before the auction was made ; (d) whether it is a fact that Safdarjung Enclave surrounds some unauthorised colonies with a number of dairies and hundreds of cattle, a ganda nallah, and a dumping ground; (e) whether Government are also aware that the unhygienic conditions of the slumcolonies are affecting the health and also cause many inconveniences to the residents of the Enclave who had to pay exorbitant price for the plots; and (f) the steps Government propose to take to remove the slum-colonies contiguous to the Safdarjung Enclave ? THE MINISTER OF HEALTH AND FAMILY PLANNING AND WORKS, HOUSING AND URBAN DEVELOPMENT (SHRI K. K. SHAH): (a) Yes, Sir. (c) Yes, Sir. (d) to #f). Information is being collected and will be laid on the Table of the Sabha. Confirmation of Staff in Enforcement Directorate 8406. SHRI S. C. SAMANTA: Will the Minister of FINANCE be pleased to state : (a) the number of persons in each grade in the Enforcement Directorate, who have rendered more than five years of service and have not yet been confirmed ; (b) the reasons for non-confirmation; (c) whether there are any orders from the Home Ministry in this regard ; and (d) if so, the details thereof? THE MINISTER OF STATE IN THE MINISTRY OF FINANCE (SHRI P. C. SETHI): (a) A statement showing the number of persons in the Enforcement Directorate who have rendered more than five years of service in a grade and have not been confirmed in that grade, is laid on the Table of the House. [Placed in Library. See No. LT-3398/ 70]. (b) Confirmation of temporary employees against available permanent posts has been pending for finalisation of the Recruitment Rules for various posts and settlement of seniority disputes, etc. (c) and (d). Ministry of Home Affairs in their O. M. No. 12/7/69-Ests (D), dated the 27th October, 1969 have issued instructions regarding conducting of annual reviews for conversion of temporary posts into permanent ones in accordance with the various orders issued by the Ministry of Finance (Department of Expenditure) with a view to confirming the eligible temporary employees against permanent posts. VAISAKHA 14, 1892 SAKA) Additional Posts sanctioned for Enforcement Directorate 8407. SHRI S. C. SAMANTA: Will the Minister of FINANCE be pleased to state : (a) whether any additional posts for different categories in the Enforcement Directorate have been sanctioned; (b) if so, from which date ; (c) whether the posts have been filled up and if not, the reason therefor; (d) whether the vacancies will also be filled up by departmental promotions; and (e) whether there are any recruitment rules for the various categories of staff and if so, the details thereof? THE MINISTER OF STATE IN THE MINISTRY OF FINANCE (SHRI P. C. SETHI): (a) Yes, Sir. (b) A statement is laid on the Table of the House. [Placed in Library. See No. LT-3399/ 70]. (c) Some of these posts have been filled up; others are in the process of being filled up. The time lag is due to some procedural difficulties, including finalisation of Recruitment Rules for certain posts and seniority disputes in certain grades. (d) The vacancies will be filled up in accordance with the Recruitment Rules which would include quotas for departmental promotions. (e) Recruitment Rules for almost all Class I and II posts have already been framed and notified vide Notification No. 11/GSR/F. No. 33/112/68-Ad. IA. dated 2nd August, 1969. Recruitment Rules for other posts are in the process of finalisation in consultation with the Ministry of Home Affairs and wherever required also the U. P. S. C. Arrears of Income Tax 8408. SHRI BHOGENDRA JHA: Will the Minister of FINANCE be pleased to refer to the reply given to Unstarred Question No. 444; on the 30th March, 1970 and state : (a) whether analysis of the arrear demands of Income Tax above Rupees 1 lakh and below Rs. 5 lakhs has since been completed; and (b) if so, the details thereof? THE MINISTER OF STATE IN THE MINISTRY OF FINANCE (SHRI P. C. SETHI): (a) No Sir, The analysis is not yet completed. (b) Does not arise. Amount of Bank Credit Advanced during 'Current Busy Season' 8409. SHRI BHOGENDRA JHA: Will the Minister of FINANCE be pleased to refer to the reply given to Starred Question No. 835 on the 6th April, 1970 and state : (a) whether it is a fact that the advancement of about Rs. 414.6 crores was made against the policies of Government enunciated with regard to the nationalised banks and the State Bank; (b) whether responsibility for this advance by the nationalised Banks even on a bigger scale than when they were not nationalised during this very season last year has been fixed; and (c) if so, the details thereof; if not, the reasons therefor? THE MINISTER OF STATE IN THE MINISTRY OF FINANCE (SHRI P. C. SETHI) (a) to (c). An increase in bank credit is not necessarily undesirable from the point of view of maintenance of price stability, if it is met out of increased deposit mobilisation and not by recourse to borrowing from the Reserve Bank. Banks cannot deny credit for essential industrial activities. In order to discourage recourse to refinance from the Reserve Bank, the latter has recently imposed a number of restrictions such as increased net liquidity ratio and higher penal rates of interest on such re-finance. The Reserve Bank has simultaneously removed the ceiling of 9 per cent on bank's lending and the latter are, therefore, now free to charge a higher rate of interest. It is expected that these measures will bring about a reduction in the pace of credit expansion. In order to curb the use of credit for speculative build up of certain sensitive items like cotton, foodgrains etc., the Reserve Bank has tightened selective control on such advances by imposing higher minimum margins and minimum rates of interest. Apart from discouraging credit for these specified commodities, there are, however, no restrictions on the banks for lending to industry in general for genuine needs of production. The increase in the bank credit during the past few months is attributable to several reasons, including the need to finance higher level of sugar stocks and generally the revival of industrial activity. A part of the rise is also due to increased lending to hitherto neglected sector including agriculture, road transport operators etc. In the circumstances mentioned above, the question of fixing responsibility for increased advances during the current busy season does not arise. Opening of Branches of Nationalised Banks in Darbhanga District, Bihar 8410. SHRI BHOGENDRA JHA: Will the Minister of FINANCE be pleased to refer to the reply given to Unstarred Question No. 5314 on the 6th April, 1970 and state : (a) the reasons for not opening a single new branch in Basopatti, Benipatti, Jhanjharpur, Madhawapur, Loukaha, Khutana, Phulparas, Yhogiara, Kamtaul, Singhhara, Pahika, Umagaon, Madhepur, Bahera, Kallyanpur, Waris Nagar, Khajouli Kushesh-warsthan, Tajpur, Babu Barahi, Ladania, Loukahi, Audhratharhi and other sub-treasury centres or towns in the district of Darbhanga, the District having biggest population in Bihar ; (b) whether the 'Lead Bank' for Darbhanga, the Central Bank has decided for opening new branches in the District; and (c) if so, the details thereof; if not, the reasons for the delay? THE MINISTER OF STATE IN THE MINISTRY OF FINANCE (SHRI P. C. SETHI): (a) As indicated in reply to Unstarred Question No. 5314 answered on 6th April 1970, in drawing up the programme of branch expansion in the year 1970, the Reserve Bank has given priority to opening of bank offices at un-banked towns ('towns' as per 1961 Census classification) and un-banked treasury/ sub-treasury centres. None of the centres mentioned in the present Question appears to come within these categories. Further, no commercial bank had approached the Reserve Bank of India for permission to open offices at these centres. (b) and (c). The Central Bank of India, to whom Darbhanga district has been allotted under the 'Lead Bank' scheme, has conducted a preliminary survey of that district and identified four centres viz., Sarairanjan, Jhanjharpur, Tajpur and Madhubani for opening bank offices and has recently approached Reserve Bank in this regard. The matter is under consideration of the Reserve Bank. गांधी बलिदान स्थल न्यास 8411. श्री शशि भूषण : श्री स्वामी ब्रह्मानन्द जी : aut faresa aur afcare fautora site निर्माण, आवास तथा नगरीय विकास मंत्री यह बताने की कृपा करेंगे कि : (क) "गांधी बलिदान स्थल न्यास" में बिड़ला परिवार के कितने सदस्यों को शामिल किये जाने की सम्भावना है ; (ख) क्या बिड़ला परिवार का एक सदस्य उक्त न्यास का भविष्य में भी सदस्य रहेगा ; (ग) इस सम्बन्ध में सरकार की क्या नीति है, तथा न्यास कब बनाया जायगा ; (घ) क्या सरकार का विचार उक्त न्यास में हरिजनों, अल्पसंख्यक समुदाय के व्यक्तियों तथा आदिवासियों के प्रतिनिधियों को भी
english
<gh_stars>100-1000 { "id": 2532, "name": "teamnewzealand", "description": "Team New Zealand style for Google.co.nz.", "user": { "id": 2918, "name": "reb", "email": "<PASSWORD>", "paypal_email": null, "homepage": null, "about": null, "license": null }, "updated": "2007-06-07T18:18:45.000Z", "weekly_install_count": 0, "total_install_count": 131, "rating": null, "after_screenshot_name": "https://userstyles.org/auto_style_screenshots/2532-after.png?r=1589357004", "obsoleting_style_id": null, "obsoleting_style_name": null, "obsolete": 0, "admin_delete_reason_id": null, "obsoletion_message": null, "screenshots": null, "license": null, "created": "2007-06-07T16:41:57.000Z", "category": "site", "raw_subcategory": "google", "subcategory": "google", "additional_info": null, "style_tags": [], "css": "@namespace url(http://www.w3.org/1999/xhtml);\r\n\r\n@-moz-document url(\"http://www.google.co.nz/\") {\r\n\r\nbody {\r\nbackground-image: url(http://farm2.static.flickr.com/1411/534473539_e0b4bbd2a6_o.jpg);\r\n/* Photo credit and terms of use: http://www.flickr.com/photos/fabiogava/534473539/ */\r\nbackground-position: 50% -220px;\r\n}\r\n\r\nbody a {\r\nbackground: blue !important;\r\ncolor: white !important;\r\n}\r\n\r\ncenter font a {\r\nfont-size: 0.8em !important;\r\n}\r\n\r\ncenter div {\r\nbackground-image: none !important;\r\nheight: auto !important;\r\n}\r\n\r\ncenter div:before {\r\ncontent: \"Google New Zealand\";\r\ndisplay: block;\r\nbackground: red;\r\ncolor: white;\r\ntext-align: center;\r\nfont-weight: bold;\r\nfont-size: 1.2em;\r\nmargin-top: 75px;\r\n}\r\n\r\ncenter div div {\r\ndisplay: none;\r\n}\r\n\r\nform:after {\r\ncontent: \"Photo credit: http://www.flickr.com/photos/fabiogava/\";\r\ndisplay: block;\r\nwidth: 30em;\r\nmargin-top: 0.8em;\r\npadding: 0.1em 0;\r\nbackground: white;\r\ncolor: #333;\r\ntext-align: center;\r\nfont-size: 0.7em;\r\n}\r\n\r\n}", "discussions": [], "discussionsCount": 0, "commentsCount": 0, "userjs_url": "/styles/userjs/2532/teamnewzealand.user.js", "style_settings": [] }
json
package models; import java.util.Observable; public class Game extends Observable { private static Game sm = null; private GameState currentState; private Player PLAYER_1 = new Player(); private Player PLAYER_2 = new Player(); private Player currentPlayer = PLAYER_1; private Game() { } public static Game getInstance() { if (sm == null) { System.out.println("Game Estava Null"); sm = new Game(); } return sm; } /*@ @ requires player != null; @ requires damage != null; @*/ public void DoDamage(Player player, Integer damage) { player.doDamage(damage); this.setChanged(); if (player.getLife() <= 0) { this.notifyObservers(new Event(GameState.Ended)); } else { this.notifyObservers(new Event(GameState.Playing)); } } /*@ @ ensures result == currentState; @*/ public /*@ pure @*/ GameState getCurrentGameState(){ return this.currentState; } /*@ @ requires state != null; @ ensures this.currentState == state; @*/ public void setNextGameState(GameState state) { this.currentState = state; this.setChanged(); this.notifyObservers(new Event(state)); } /*@ @ requires (cardPath != null) && (currentPlayer != getPlayer1); @ ensures currentPlayer == getPlayer2(); @ also @ requires (cardPath != null) && (currentPlayer != getPlayer2); @ ensures currentPlayer == getPlayer2(); @*/ public /*@ pure @*/ void changeCurrentPlayer() { if (currentPlayer == getPlayer1()) currentPlayer = getPlayer2(); else currentPlayer = getPlayer1(); this.setChanged(); this.notifyObservers(new Event(GameState.EndTurn)); } /*@ @ requires PLAYER_1 != null; @ ensures result == PLAYER_1; @*/ public /*@ pure @*/ Player getPlayer1() { return PLAYER_1; } /*@ @ requires PLAYER_2 != null; @ ensures result == PLAYER_2; @*/ public /*@ pure @*/ Player getPlayer2() { return PLAYER_2; } /*@ @ requires player != null; @ requires name != null; @ ensures player.setName == PLAYER_2; @*/ public void RenamePlayer (Player player, String name) { player.setName(name); } /*@ @ requires PLAYER_2 != null; @ ensures result == PLAYER_2; @*/ public /*@ pure @*/ Player getCurrentPlayer() { return currentPlayer; } public void startNewGame() { PLAYER_1.reset(); PLAYER_2.reset(); this.currentPlayer = PLAYER_1; System.out.println("Iniciou novo game"); this.setChanged(); this.notifyObservers(new Event(GameState.NewGame)); } public void createPlayersBattleDeck() { PLAYER_1.GetBattleDeck().ClearDeck(); PLAYER_2.GetBattleDeck().ClearDeck(); for (int i = 0; i < 10 ; i++) { PLAYER_1.AddCardToDeck(CardFactory.getInstance().getRandomCard()); PLAYER_2.AddCardToDeck(CardFactory.getInstance().getRandomCard()); } System.out.println("Adicionou as cartas ao deck."); } /*@ @ requires PLAYER_2.getLife() <= 1; @ ensures result == PLAYER_1; @ also @ requires PLAYER_1.getLife() <= 1; @ ensures result == PLAYER_2; @*/ public /*@ pure @*/ Player getWinner() { if (PLAYER_1.getLife() > 0) return PLAYER_1; else return PLAYER_2; } }
java
<reponame>Static-electro/fileseqmini #pragma once #include <cmath> #include <cstdint> #include <iomanip> #include <sstream> #include <vector> namespace fileseqmini { using StringVector = std::vector<std::string>; class FileSequenceBase { public: FileSequenceBase( const std::string& pattern, const std::string& delimiters, char padChar ); virtual ~FileSequenceBase() = default; virtual bool isOk() const = 0; virtual std::size_t size() const = 0; const std::string& getOriginalPattern() const { return m_originalPattern; } protected: struct SequenceDesc { int32_t beg = 0; int32_t end = 0; int32_t step = 1; uint8_t pad = 0; std::size_t size() const { return isOk() ? ( end - beg ) / step + 1 : 0; } bool isOk() const { return ( end - beg ) / step >= 0; } }; using PackedSequence = std::vector<SequenceDesc>; using PackedPath = std::vector<PackedSequence>; protected: StringVector splitOriginalPattern() const; StringVector unpackSequence( const PackedSequence& seq ) const; PackedPath parsePatterns( const StringVector& tokens ) const; bool checkPatternCharset( const std::string& pattern ) const; bool parsePatternStart( char** patternStr, SequenceDesc& desc ) const; bool parsePatternEnd( char** patternStr, SequenceDesc& desc ) const; bool parsePatternStep( char** patternStr, SequenceDesc& desc ) const; bool parsePatternPad( char** patternStr, SequenceDesc& desc ) const; template<typename T> bool parseInteger( char** str, T& val ) const; std::string writePadded( int32_t value, uint8_t pad ) const; protected: std::string m_originalPattern; std::string m_delimiters; char m_padChar; }; class FileSequence : public FileSequenceBase { public: using iterator = StringVector::const_iterator; public: explicit FileSequence( const std::string& pattern, const std::string& delimiters = "", char padChar = '0' ); virtual bool isOk() const override { return m_paths.size() > 1; } virtual std::size_t size() const override { return isOk() ? m_paths.size() : 0; } const StringVector& getFullPaths() const { return m_paths; } const std::string& operator[]( std::size_t index ) const; iterator begin() const { return m_paths.cbegin(); } iterator end() const { return m_paths.cend(); } private: void generatePaths( const std::vector<StringVector>& pathParts ); private: StringVector m_paths; std::string m_invalidDesc; }; class FileSequenceLazy : public FileSequenceBase { public: class iterator { public: iterator( const FileSequenceLazy& sequence, std::size_t i ) : m_sequence( sequence ) , m_pos( i ) {} std::string operator*() const { return m_sequence[m_pos]; } iterator& operator++() { m_pos++; return *this; } iterator operator++( int ) { return iterator( m_sequence, m_pos + 1 ); } bool operator!=( const iterator& other ) const { return !( *this == other ); } bool operator==( const iterator& other ) const { return &m_sequence == &other.m_sequence && m_pos == other.m_pos; } private: const FileSequenceLazy& m_sequence; std::size_t m_pos; }; public: explicit FileSequenceLazy( const std::string& pattern, const std::string& delimiters = "", char padChar = '0' ); virtual bool isOk() const override { return m_isOk; } virtual std::size_t size() const override { return m_size; } StringVector getFullPaths() const; std::string operator[]( std::size_t index ) const; iterator begin() const { return iterator( *this, 0 ); } iterator end() const { return iterator( *this, m_size ); } private: std::string unpackSequence( const PackedSequence& seq, std::size_t branch ) const; std::size_t sequenceSize( const PackedSequence& seq ) const; private: PackedPath m_packedPaths; StringVector m_pathParts; std::size_t m_size; bool m_isOk; }; inline FileSequence::FileSequence( const std::string& pattern, const std::string& delimiters, char padChar ) : FileSequenceBase( pattern, delimiters, padChar ) { StringVector tokens = splitOriginalPattern(); PackedPath parsedPatterns = parsePatterns( tokens ); std::vector<StringVector> pathParts; pathParts.reserve( parsedPatterns.size() ); for ( std::size_t i = 0; i < parsedPatterns.size(); ++i ) { const PackedSequence& currentPattern = parsedPatterns[i]; if ( currentPattern.empty() ) { pathParts.emplace_back( 1, tokens[i] ); } else { pathParts.emplace_back( unpackSequence( currentPattern ) ); } } generatePaths( pathParts ); } inline void FileSequence::generatePaths( const std::vector<StringVector>& pathParts ) { std::size_t totalPaths = 1; for ( const auto& part : pathParts ) { totalPaths *= part.size(); } m_paths.resize( totalPaths ); for ( std::size_t i = 0; i < totalPaths; ++i ) { std::size_t branchId = i; std::size_t branchesLeft = totalPaths; for ( const auto& part : pathParts ) { const std::size_t partId = ( branchId % branchesLeft ) / ( branchesLeft / part.size() ); m_paths[i].append( part[partId] ); branchId = branchId % branchesLeft; branchesLeft = branchesLeft / part.size(); } } } inline const std::string& FileSequence::operator[]( std::size_t index ) const { if ( index < m_paths.size() ) { return m_paths[index]; } return m_invalidDesc; } inline FileSequenceLazy::FileSequenceLazy( const std::string& pattern, const std::string& delimiters, char padChar ) : FileSequenceBase( pattern, delimiters, padChar ) , m_size( 0 ) , m_isOk( false ) { m_pathParts = splitOriginalPattern(); m_packedPaths = parsePatterns( m_pathParts ); std::size_t pathCount = 1; for ( std::size_t i = 0; i < m_packedPaths.size(); ++i ) { if ( !m_packedPaths[i].empty() ) { pathCount *= sequenceSize( m_packedPaths[i] ); m_isOk = pathCount > 1; } } if ( m_isOk ) { m_size = pathCount; } } inline StringVector FileSequenceLazy::getFullPaths() const { StringVector result; result.reserve( m_size ); for ( std::size_t i = 0; i < m_size; ++i ) { result.push_back( ( *this )[i] ); } return result; } inline std::string FileSequenceLazy::operator[]( std::size_t index ) const { std::string result; std::size_t branchId = index; std::size_t branchesLeft = m_size; for ( std::size_t i = 0; i < m_pathParts.size(); ++i ) { if ( m_packedPaths[i].empty() ) { result.append( m_pathParts[i] ); } else { const std::size_t seqSize = sequenceSize( m_packedPaths[i] ); const std::size_t branch = ( branchId % branchesLeft ) / ( branchesLeft / seqSize ); result.append( unpackSequence( m_packedPaths[i], branch ) ); branchId = branchId % branchesLeft; branchesLeft = branchesLeft / seqSize; } } return result; } inline std::string FileSequenceLazy::unpackSequence( const PackedSequence& seq, std::size_t branch ) const { for ( const auto& slice : seq ) { const std::size_t subBranchSize = slice.size(); if ( subBranchSize > branch ) { int32_t id = static_cast<int32_t>( slice.beg + ( slice.step * branch ) ); return writePadded( id, slice.pad ); } else { branch -= subBranchSize; } } return {}; } inline std::size_t FileSequenceLazy::sequenceSize( const PackedSequence& seq ) const { std::size_t result = 0; for ( const auto& slice : seq ) { result += slice.size(); } return result; } inline FileSequenceBase::FileSequenceBase( const std::string& pattern, const std::string& delimiters, char padChar ) : m_originalPattern( pattern ) , m_delimiters( delimiters ) , m_padChar( padChar ) { if ( m_delimiters.empty() ) { m_delimiters = "\\/."; } } inline StringVector FileSequenceBase::splitOriginalPattern() const { StringVector result; std::size_t startToken = 0; for ( std::size_t i = 0; i < m_originalPattern.length(); ++i ) { if ( m_delimiters.find( m_originalPattern[i] ) != std::string::npos ) { if ( startToken < i ) { result.emplace_back( m_originalPattern, startToken, i - startToken ); } result.emplace_back( m_originalPattern, i, 1 ); startToken = i + 1; } } if ( startToken < m_originalPattern.length() ) { result.emplace_back( m_originalPattern, startToken, std::string::npos ); } return result; } inline FileSequenceBase::PackedPath FileSequenceBase::parsePatterns( const StringVector& tokens ) const { PackedPath result( tokens.size() ); for ( std::size_t i = 0; i < tokens.size(); ++i ) { if ( checkPatternCharset( tokens[i] ) ) { std::stringstream ss( tokens[i] ); std::string buf; PackedSequence sliceSequence; bool success = true; while ( success && std::getline( ss, buf, ',' ) ) { if ( buf.empty() ) { success = false; break; } sliceSequence.emplace_back(); SequenceDesc& desc = sliceSequence.back(); char* patternStr = &buf[0]; success = parsePatternStart( &patternStr, desc ) && parsePatternEnd( &patternStr, desc ) && parsePatternStep( &patternStr, desc ) && parsePatternPad( &patternStr, desc ) && desc.isOk(); } if ( success ) { result[i].swap( sliceSequence ); } } } return result; } inline bool FileSequenceBase::checkPatternCharset( const std::string& pattern ) const { for ( auto c : pattern ) { switch ( c ) { case '#': case ',': case '-': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '@': case 'x': continue; default: return false; } } return true; } inline bool FileSequenceBase::parsePatternStart( char** patternStr, SequenceDesc& desc ) const { if ( *patternStr[0] == '#' || *patternStr[0] == '@' ) { if ( parsePatternPad( patternStr, desc ) ) { desc.end = static_cast<int32_t>( std::pow( 10, desc.pad ) - 1 ); return true; } } if ( !parseInteger( patternStr, desc.beg ) ) { return false; } desc.end = desc.beg; return true; } inline bool FileSequenceBase::parsePatternEnd( char** patternStr, SequenceDesc& desc ) const { if ( *patternStr == nullptr || *patternStr[0] == 0 ) { return true; } if ( *patternStr[0] == '-' ) { (*patternStr)++; if ( !parseInteger( patternStr, desc.end ) ) { return false; } } else if ( *patternStr[0] != '#' && *patternStr[0] != '@' ) { return false; } if ( desc.beg > desc.end ) { desc.step = -1; } return true; } inline bool FileSequenceBase::parsePatternStep( char** patternStr, SequenceDesc& desc ) const { if ( *patternStr == nullptr || *patternStr[0] == 0 ) { return true; } if ( *patternStr[0] == 'x' ) { (*patternStr)++; if ( !parseInteger( patternStr, desc.step ) || desc.step == 0 ) { return false; } } else if ( *patternStr[0] != '#' && *patternStr[0] != '@' ) { return false; } return true; } inline bool FileSequenceBase::parsePatternPad( char** patternStr, SequenceDesc& desc ) const { if ( *patternStr == nullptr || *patternStr[0] == 0 ) { return true; } while ( *patternStr[0] ) { if ( *patternStr[0] == '@' ) { desc.pad += 1; } else if ( *patternStr[0] == '#' ) { desc.pad += 4; } else { return false; } (*patternStr)++; } return true; } template<typename T> bool FileSequenceBase::parseInteger( char** str, T& val ) const { char* parseEnd = *str; val = static_cast<T>( std::strtol( *str, &parseEnd, 10 ) ); if ( parseEnd == *str ) { return false; } *str = parseEnd; return true; } inline std::string FileSequenceBase::writePadded( int32_t value, uint8_t pad ) const { std::stringstream ss; ss << std::setw( pad ) << std::setfill( m_padChar ) << std::internal << value; return ss.str(); } inline StringVector FileSequenceBase::unpackSequence( const PackedSequence& seq ) const { StringVector result; for ( const auto& slice : seq ) { auto inBounds = [&slice]( int32_t i ) { return ( slice.step < 0 ) ? ( i >= slice.end ) : ( i <= slice.end ); }; for ( int32_t i = slice.beg; inBounds( i ); i += slice.step ) { result.emplace_back( writePadded( i, slice.pad ) ); } } return result; } } // namespace fileseqlite
cpp
const setupModule = require(`./lib/text-layout-sync.js`); module.exports = setupModule(); if (!module.exports.TextLayout) { throw new Error(`Synchronous loading failed`); }
javascript
// https://www.npmjs.com/package/json2typescript import { JsonObject, JsonProperty } from 'json2typescript'; import { RecipeUser } from './RecipeUser'; @JsonObject export class RecipeSummary { @JsonProperty('id', Number) _id: number = undefined; get id() { return this._id; } @JsonProperty('title', String) title: string = undefined; }
typescript
<filename>posts.json --- --- {"posts":[{% for post in site.posts %} {"title":"{{ post.title | replace: '"', '\"' }}","url":"{{ post.url }}","img":"{{ post.image }}","tags":[{% for tag in post.tags %}"{{ tag }}"{% unless forloop.last %},{% endunless %}{% endfor %}],"keywords":[{% for keyword in post.keywords %}"{{ keyword }}"{% unless forloop.last %},{% endunless %}{% endfor %}]}{% unless forloop.last %},{% endunless %} {% endfor %}]}
json
<reponame>suishounianhua/suishounianhua.github.io /* Error: Mixin flexbox is missing argument $properties. on line 695 of D:/www/github/nodePPT/assets/scss/nodeppt.scss, in `flexbox' from line 695 of D:/www/github/nodePPT/assets/scss/nodeppt.scss 690: left: 0; 691: padding: 1em; 692: background: rgba(0, 0, 0, 0.3); 693: opacity: 0; 694: // pointer-events: none; 695: @include flexbox; 696: @include flex-center-center; 697: @include border-radius($slide-border-radius); 698: 699: @include box-sizing(border-box); 700: @include transform(translateY($slide-height / 2)); Backtrace: D:/www/github/nodePPT/assets/scss/nodeppt.scss:695:in `flexbox' D:/www/github/nodePPT/assets/scss/nodeppt.scss:695 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:73:in `block in perform_arguments' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:65:in `zip' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:65:in `perform_arguments' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:348:in `block in visit_mixin' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/stack.rb:98:in `block in with_mixin' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/stack.rb:115:in `with_frame' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/stack.rb:98:in `with_mixin' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:336:in `visit_mixin' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/base.rb:36:in `visit' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:158:in `block in visit' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/stack.rb:79:in `block in with_base' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/stack.rb:115:in `with_frame' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/stack.rb:79:in `with_base' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:158:in `visit' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:420:in `block (2 levels) in visit_rule' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:420:in `map' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:420:in `block in visit_rule' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:179:in `with_environment' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:418:in `visit_rule' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/base.rb:36:in `visit' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:158:in `block in visit' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/stack.rb:79:in `block in with_base' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/stack.rb:115:in `with_frame' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/stack.rb:79:in `with_base' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:158:in `visit' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/base.rb:52:in `block in visit_children' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/base.rb:52:in `map' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/base.rb:52:in `visit_children' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:167:in `block in visit_children' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:179:in `with_environment' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:166:in `visit_children' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/base.rb:36:in `block in visit' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:186:in `visit_root' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/base.rb:36:in `visit' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:157:in `visit' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/visitors/perform.rb:8:in `visit' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/root_node.rb:36:in `css_tree' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/tree/root_node.rb:20:in `render' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/engine.rb:268:in `render' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/plugin/compiler.rb:492:in `update_stylesheet' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/plugin/compiler.rb:215:in `block in update_stylesheets' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/plugin/compiler.rb:209:in `each' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/plugin/compiler.rb:209:in `update_stylesheets' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.9/lib/sass/plugin/compiler.rb:293:in `watch' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/lib/compass/sass_compiler.rb:46:in `watch!' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/lib/compass/commands/watch_project.rb:41:in `perform' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/lib/compass/commands/base.rb:18:in `execute' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/lib/compass/commands/project_base.rb:19:in `execute' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/lib/compass/exec/sub_command_ui.rb:43:in `perform!' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/lib/compass/exec/sub_command_ui.rb:15:in `run!' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/bin/compass:30:in `block in <top (required)>' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/bin/compass:44:in `call' C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/bin/compass:44:in `<top (required)>' C:/Ruby200-x64/bin/compass:23:in `load' C:/Ruby200-x64/bin/compass:23:in `<main>' */ body:before { white-space: pre; font-family: monospace; content: "Error: Mixin flexbox is missing argument $properties.\A on line 695 of D:/www/github/nodePPT/assets/scss/nodeppt.scss, in `flexbox'\A from line 695 of D:/www/github/nodePPT/assets/scss/nodeppt.scss\A \A 690: left: 0;\A 691: padding: 1em;\A 692: background: rgba(0, 0, 0, 0.3);\A 693: opacity: 0;\A 694: // pointer-events: none;\A 695: @include flexbox;\A 696: @include flex-center-center;\A 697: @include border-radius($slide-border-radius);\A 698: \A 699: @include box-sizing(border-box);\A 700: @include transform(translateY($slide-height / 2));"; }
css
Trinbago Knight Riders will be up against the Barbados Tridents in the 9th match of the Caribbean Premier League (CPL) 2020. Currently, Trinbago Knight Riders are at the second place in the points table and have won both the games they have played. They are the only team who are undefeated in the tournament so far. Sunil Narine is the star player for the TKR, he was the player of the match in both the matches for TKR. Narine has scored 50+ scores in both the matches and took some crucial wickets as well. His inclusion in the team as an opener is giving the results and most importantly Narine is taking his batting seriously, he is no longer playing just like a pinch hitter in the power-play overs. Along with Narine, Colin Munro is also performing well at Number 3. Munro stood with Narine for a partnership of 75 runs in the last match when Lendl Simmons got out on the third ball of the innings. In both the matches TKR was also successful in restricting the opposition below 150. TKR has performed well as a bowling unit and every bowler has delivered for them in these two games if not with the wickets then with the economy rate. With the likes of Sunil Narine, DJ Bravo, DM Bravo, Colin Munro, Captain Kieron Pollard, and Lindl Simmons TKR is one the strongest side in the league as well. On the other side, Barbados Tridents are at the fifth position in the points table with a win and a loss in their two games. Their last game against St Lucia Zouks was the rain-affected contest where BT didn’t get to play after the 17th over but they got 47 runs to defend in 5 overs which was a comfortable situation for them after batting horrifyingly in the first innings. Captain Jason Holder has to take his Barbados team to the victory in this match anyhow because a team can’t afford to lose multiple games in the initial stage of the tournament. The star batsmen like CJ Anderson, Shai Hope, and Johnson Charles are still left to deliver. Mitchell Santner and Rashid Khan were the stars for Barbados in their opening game of the tournament against St Kitts and Nevis Patriots where they performed both with the bat and ball. This will be an exciting encounter for both the teams and they would look to seal the victory and surge forward in the tournament. The first phase of the tournament is being played in Brian Lara Cricket Stadium, Trinidad, which is also the venue for this match as well. The match will start at 7:30 IST. Sunil Narine(captain), Rashid Khan(vice-captain), Colin Munro, Darren Bravo, Corey Anderson, Dwayne Bravo, Jason Holder, Mitchell Santner, Jayden Seales, Ali Khan.
english
The Lanka Premier League Players’ Draft on Monday saw marquee international names as well local players get picked by team. The tournament will have 23 matches and will be played between November 21-December 13 at two venues – Pallekele and Hambantota. Angelo Mathews, Faf du Plessis and Andre Russell were among the marquee names picked by the Colombo Kings franchisee. Dav Whatmore is a part of the coaching set-up of the Colombo franchisee in the League. Two Indian players, former KKR batsman Manvinder Bisla and CSK pacer MS Gony have also been picked from the draft. Among others, Kandy Tuskers picked up Kushal Janith as the Local Icon while Chris Gayle and Liam Plunkett were picked as the two overseas signing. The team will be coached by Hashan Tilakratne. Galle Gladiators have Lasith Malinga as the Local Icon while Shahid Afridi and Colin Ingram are the two overseas signing. The team will be coached by Moin Khan. Dashun Shanka is the Local Icon for Dambulla Hawks while David Miller and Carlos Brathwaite are the overseas signing. The Hawks team will be coached by Jon Lewis. Meanwhile, Jaffna Stallions have Thisara Perera as the Local Icon and Dawid Malan and Wanindu Hasaranga as the overseas signing.
english
Grey’s Anatomy is an all-time favorite TV show that has been running for over a decade now. With over 365 episodes, it has become a show that has captured the hearts of millions of people. If you are finding a way to stream Grey’s Anatomy, you’re in the right place! In this article, we will guide you on how to stream Grey’s Anatomy, from the beginning to the end. We will also provide you with some best practices, tips, and tricks to enhance your viewing experience. Grey’s Anatomy is an American medical drama television series that premiered on the American Broadcasting Company (ABC) in 2005. The show follows the life and career of a group of surgical residents, interns, attendings, and the people around them as they navigate their lives. To watch Grey’s Anatomy, you can choose from the following options: The simplest way to watch Grey’s Anatomy is through ABC itself. If you have a cable or satellite TV subscription, you can watch the show on ABC as it airs on Thursday nights. You can also stream live episodes on ABC’s official website or mobile app. All you need to do is log in with your cable or satellite provider’s credentials, and you’re good to go. However, this method has some restrictions, as live streaming is only available in select markets. Netflix is one of the most popular streaming platforms worldwide. Grey’s Anatomy is available on Netflix in multiple regions, including the US, Canada, the UK, Australia, and New Zealand. You can stream all 17 seasons of Grey’s Anatomy on Netflix, which means that you can watch the series from beginning to end at your own pace. To watch Grey’s Anatomy on Netflix, you’ll need a Netflix subscription, which starts at $8.99 per month, and an internet connection. Hulu is another popular streaming service that offers many TV shows and movies, including Grey’s Anatomy. With Hulu, you can watch current and past episodes of Grey’s Anatomy. Hulu has a package that costs $5.99/month, which provides access to Grey’s Anatomy and other TV shows and movies. However, you may experience Ads while watching, so you’ll need to upgrade to the ad-free Hulu plan, which costs $11.99/month. For people who already have Hulu subscription, this is a great option. Amazon Prime Video is yet another streaming platform that offers Grey’s Anatomy. With Amazon Prime Video, you can watch all 17 seasons of Grey’s Anatomy at any time. To watch Grey’s Anatomy on Amazon Prime Video, you need to subscribe to Amazon Prime subscription, which starts at $8.99 per month or $119 per year. If you have an Amazon Prime subscription already, then you will already have access to Grey’s Anatomy and the rest of Amazon’s streaming program. Which Streaming Service is Best for Grey’s Anatomy? All the four streaming platforms mentioned above are great options for streaming Grey’s Anatomy. However, each plan has its pros and cons, including cost, availability, and live-streaming options. Netflix has all 17 seasons of Grey’s Anatomy, and you can watch anywhere across the world. Hulu streams the current and past episodes of Grey’s Anatomy with a subscription plan that starts at $5.99 per month. Amazon Prime Video also offers all 17 seasons and has exclusive Grey’s Anatomy contents not available on Netflix. Finally, you have ABC itself, which is the simplest way to watch Grey’s Anatomy on a Thursday night with the live broadcast. Whether you’re new to Grey’s Anatomy or you’re rewatching it, here are some best practices to enhance your viewing experience. Grey’s Anatomy has been running for a long time, and there’s a good chance that some episodes have already been spoiled for you. However, try your best to avoid spoilers as they can ruin the experience of watching the show. You can use the spoiler-free guide to avoid any surprises or spoilers. With 17 seasons and 365 episodes, Grey’s Anatomy is the perfect show to binge-watch. Watching the show for an extended period of time is ideal for fully immersing yourself in the characters’ lives and story arcs. Though binge-watching Grey’s Anatomy can be a lot of fun, remember to take breaks. It’s like taking a break from your work to focus better later. Watch a new episode or two after dinner and set the limit. Grey’s Anatomy has a large fan base, and connecting with other fans can make the viewing experience even more enjoyable. Join online discussion groups and forums, participate in social media hashtags, and post your thoughts and theories about the show on the platforms. The soundtrack is a vital part of Grey’s Anatomy. The songs from the show have become iconic, and paying attention to them can add another dimension to the viewing experience. Finally, enjoy the show, if it is clouding your mind with academic stress and you feel like you are not able to give 100% attention to the show, it is better to pause and watch when you are done with the work for the day! 1. Is Grey’s Anatomy on Netflix? Yes, Grey’s Anatomy is available to stream on Netflix. All 17 seasons are available to watch, so you can binge-watch the show from beginning to end. 2. Can I watch Grey’s Anatomy on Hulu? Yes, you can watch Grey’s Anatomy on Hulu. However, you need a subscription, which costs $5.99 per month or $11.99 per month for the ad-free version. 3. Does Amazon Prime Video have Grey’s Anatomy? Yes, Amazon Prime Video offers all 17 seasons of Grey’s Anatomy. You need to subscribe to Amazon Prime subscription, which starts at $8.99 per month or $119 per year. 4. Where can I watch the current episodes of Grey’s Anatomy? You can watch current episodes of Grey’s Anatomy on ABC, either on your TV, or you can live stream the episode on ABC’s official website or mobile app. However, this method is only available in select markets. For fans of Grey’s Anatomy, watching the show has never been easier. With multiple streaming platforms, including Netflix, Hulu, Amazon Prime, and ABC itself, you can watch all 17 seasons of the show or its latest episodes. Remember to avoid spoilers, take breaks, connect with other fans, and enjoy the show by paying attention to the soundtrack. Happy streaming and enjoy!
english
<filename>N/Nephropathic_adjective.json<gh_stars>100-1000 { "word": "Nephropathic", "definitions": [ "Relating to or characterized by nephropathy." ], "parts-of-speech": "Adjective" }
json