text
stringlengths
1
1.04M
language
stringclasses
25 values
.toggle-container { display: block; margin-top: 0.5rem; text-align: right; } @media only screen and (min-width: 768px) and (max-width: 1023px) { .switch { color: var(--element-3); } } @media only screen and (min-width: 320px) and (max-width: 767px) { .toggle-container { z-index: 1; position: absolute; right: 1rem; top: -0.88rem; } } .btn-toggle { position: absolute; width: 1rem; height: 1rem; opacity: 0; } .btn-toggle:checked:focus + .sun { outline: 1px solid var(--element-4); } .btn-toggle:not(:checked):focus + .moon { outline: 1px solid var(--element-4); } .switch { position: relative; color: var(--element-4); width: 2rem; margin: 5px; }
css
Job search engine SimplyHired.com, which aggregates jobs listing across the Web, is now adding international professional social network Viadeo to its supported services. The new integration will allow users to see which of their business contacts work at the companies surfaced by job searches on SimplyHired’s website. SimplyHired previously added support for Facebook and LinkedIn to do the same. Viadeo is not as commonly known here in the U.S. as its rival LinkedIn, but it has a fairly good-sized user base of 35 million members worldwide. (In comparison, LinkedIn now reports having 120 million users.) However, Viadeo reached 30 million users back in May 2010, which means that it has grown by just 5 million in the months since. Considering that the company has been targeting highly populated Asian countries like India and China, the opportunity for additional growth is still abundant. In May of this year, Viadeo put plans for its IPO on hold so it could focus on growing its core business. At the time, its Chief Executive Dan Serfaty said it might revisit the question of going public in about 18 to 24 months. The new Viadeo integration goes live on SimplyHired.com in 12 countries today, including Argentina, Austria, Belgium, Brazil, Canada, France, Germany, Italy, Mexico, Netherlands, Spain and Switzerland. U.S. users, though, will not have the option.
english
Two weeks ago, I changed tracks on my car playlist and played Dekha Hai Pehli Baar – from Saajan -- on my way to meet a friend. I sang along loudly, revelling in a song I had first heard three decades ago, and always felt shy to sing then. It was 1991, I was a seven-year-old in a small town of Bharatpur, in the Rajasthan-Uttar Pradesh border. A Hindustani classical music fan, my father didn’t think much of the 90s mainstream Bollywood music and we had a cleverly-crafter TV-watching window to catch-up on Bollywood films -- the only film cassette that me and my sister had managed to acquire was of Anjali because it was a children’s film. That was our acquisition for the next few years. But then, it was 1991 and by then there was one voice which was everywhere – SPB’s. It reverberated from the corner paan stalls to the market bakery, which sold cream rolls and in grocer-cum-electronics-cum-apparel multi-storeyed shop. Usually it was the soundtrack of Saajan, but there was also 100 days and Jackie Shroff singing Sun Beliya, and Love with its mellifluous and doting Saathiya Tu Ne Kya Kiya. Then there was me, a sucker for music, all kinds, classical falling at the bottom of the ladder of preference. Salman Khan sure was bursting into prominence, but there was also this voice, so uniquely sensual, sonorous and playful. Within the house, as we waited for our parents to return from work, the local cable TV guy supplied the stash of new songs on his own channel. I remember feeling a bit embarrassed and amused hearing SPB sing Ab Jaa Ke Aaya Mere Bechain Dil Ko Karaar. Later, I realized it was the shy sensuality of the voice that caused me to blush. Incidentally, around the same time I discovered an older song. At an English class for college students my uncle took and graciously accommodated us to also benefit from, a shy young man sang Sach Mere Yaar Hai, Bas Wahi Pyaar Hai (from Sagar) for a pretty girl he liked. If you ask me, SPB at that time, from the vantage of a kid growing up in north India, was the voice of contemporary love, which often found expression on torn notebook pages, notes left on bicycle carriers, songs sung in farewell parties and dedicated to the 'girl in the gang'. I have often thought of 90s as a low point of Indian cinema – not withstanding exceptions. Growing up in the small town of Bharatpur in the backdrop of Bollywood films and songs where the hero’s haloed role was to stalk his love-interest and exhaust her into saying yes, was terrifying in many ways. That created local replicas who couldn’t take no for an answer. But then, there was some mainstream music, which befitted more the love-interest you’d chose. These SPB songs are perched there. By the next year, we all knew of the man from the south who changed the way music sounded. A. R. Rahman had changed the goalpost of music, and with Roja the isolation of my imagination ended. I located SPB, not as the Bollywood hero’s voice from the cassettes in the two-in-one, but as a Tamil singer who also sang Bollywood songs. But the delight continued. In Yeh Mausam Ka Jaadu Hai Mitwa (Hum Aapke Hain Kaun), we would wait to hear the little laugh as he started the new stanza; despite loving all songs in Sapnay, I couldn’t help but get struck by Door Naa Jaa Mujhse for the free-wheeling desire the voice carries and the sign-off with a long sigh. The song is a staple on my playlist. In the last decade, I also discovered SPB’s immense ouvre in Tamil, which is what I mostly hear now, the versatility of his voice and its presence through the decades. But for the 90s kid from north India, this voice was first heard, where else, but in Hindi songs; it sang of love and longing in times when love was also heavily mistaken for coercion. (Chinmayi Shalya is a policy researcher by profession, lover of music, with a soft spot for Tamil songs)
english
{"connections": [{"connectionId": "con_11", "pageSourceId": "vegetarian", "pageTargetId": "pizza"}, {"connectionId": "con_24", "pageSourceId": "pizza", "pageTargetId": "sandwiches"}, {"connectionId": "con_36", "pageSourceId": "pizza", "pageTargetId": "bagels"}, {"connectionId": "con_48", "pageSourceId": "pizza", "pageTargetId": "burgers"}, {"connectionId": "con_60", "pageSourceId": "pizza", "pageTargetId": "fast_food"}, {"connectionId": "con_72", "pageSourceId": "sandwiches", "pageTargetId": "ice_cream"}, {"connectionId": "con_83", "pageSourceId": "bagels", "pageTargetId": "ice_cream"}, {"connectionId": "con_95", "pageSourceId": "sandwiches", "pageTargetId": "donuts"}, {"connectionId": "con_107", "pageSourceId": "sandwiches", "pageTargetId": "dessert"}, {"connectionId": "con_118", "pageSourceId": "bagels", "pageTargetId": "ice_cream"}, {"connectionId": "con_129", "pageSourceId": "bagels", "pageTargetId": "donuts"}, {"connectionId": "con_140", "pageSourceId": "bagels", "pageTargetId": "dessert"}, {"connectionId": "con_151", "pageSourceId": "burgers", "pageTargetId": "ice_cream"}, {"connectionId": "con_162", "pageSourceId": "burgers", "pageTargetId": "donuts"}, {"connectionId": "con_173", "pageSourceId": "burgers", "pageTargetId": "dessert"}, {"connectionId": "con_184", "pageSourceId": "fast_food", "pageTargetId": "ice_cream"}, {"connectionId": "con_203", "pageSourceId": "fast_food", "pageTargetId": "donuts"}, {"connectionId": "con_214", "pageSourceId": "fast_food", "pageTargetId": "dessert"}, {"connectionId": "con_226", "pageSourceId": "ice_cream", "pageTargetId": "seafood"}, {"connectionId": "con_238", "pageSourceId": "ice_cream", "pageTargetId": "gluten_free"}, {"connectionId": "con_250", "pageSourceId": "ice_cream", "pageTargetId": "barbeque"}, {"connectionId": "con_262", "pageSourceId": "ice_cream", "pageTargetId": "hot_dogs"}, {"connectionId": "con_274", "pageSourceId": "ice_cream", "pageTargetId": "chicken_wings"}, {"connectionId": "con_286", "pageSourceId": "ice_cream", "pageTargetId": "local_flavor"}, {"connectionId": "con_297", "pageSourceId": "donuts", "pageTargetId": "seafood"}, {"connectionId": "con_308", "pageSourceId": "donuts", "pageTargetId": "gluten_free"}, {"connectionId": "con_319", "pageSourceId": "donuts", "pageTargetId": "barbeque"}, {"connectionId": "con_330", "pageSourceId": "donuts", "pageTargetId": "hot_dogs"}, {"connectionId": "con_349", "pageSourceId": "donuts", "pageTargetId": "chicken_wings"}, {"connectionId": "con_360", "pageSourceId": "donuts", "pageTargetId": "local_flavor"}, {"connectionId": "con_371", "pageSourceId": "dessert", "pageTargetId": "seafood"}, {"connectionId": "con_382", "pageSourceId": "dessert", "pageTargetId": "gluten_free"}, {"connectionId": "con_393", "pageSourceId": "dessert", "pageTargetId": "barbeque"}, {"connectionId": "con_404", "pageSourceId": "dessert", "pageTargetId": "hot_dogs"}, {"connectionId": "con_415", "pageSourceId": "dessert", "pageTargetId": "chicken_wings"}, {"connectionId": "con_426", "pageSourceId": "dessert", "pageTargetId": "local_flavor"}], "message": "<p>Please specify the preference order for the TYPE of FOOD during LUNCH.</p><p>Click and drag new preference relation from the red square in each element; Pease do not create loops. Click on a relation to delete it.</p>", "id": "13", "block": [{"positionY": 511, "positionX": 704, "blockId": "local_flavor"}, {"positionY": 505, "positionX": 229, "blockId": "barbeque"}, {"positionY": 204, "positionX": 561, "blockId": "burgers"}, {"positionY": 506, "positionX": 555, "blockId": "chicken_wings"}, {"positionY": 315, "positionX": 660, "blockId": "dessert"}, {"positionY": 207, "positionX": 401, "blockId": "bagels"}, {"positionY": 321, "positionX": 509, "blockId": "donuts"}, {"positionY": 320, "positionX": 357, "blockId": "ice_cream"}, {"positionY": 201, "positionX": 737, "blockId": "fast_food"}, {"positionY": 498, "positionX": 73, "blockId": "gluten_free"}, {"positionY": 506, "positionX": 404, "blockId": "hot_dogs"}, {"positionY": 125, "positionX": 542, "blockId": "pizza"}, {"positionY": 210, "positionX": 255, "blockId": "sandwiches"}, {"positionY": 421, "positionX": 13, "blockId": "seafood"}, {"positionY": 40, "positionX": 566, "blockId": "vegetarian"}], "name": "13"}
json
// use chrono::{UTC, NaiveDateTime}; // use semver::Version; #[derive(RustcEncodable, RustcDecodable, Debug)] pub enum Protocol { Ping(PingCommand), Pong(PongResponse) } #[derive(RustcEncodable, RustcDecodable, Debug)] pub struct PingCommand { pub time: i64, pub version: String } impl PingCommand { pub fn new(time: i64, version: String) -> PingCommand { PingCommand { time: time, version: version } } } #[derive(RustcEncodable, RustcDecodable, Debug)] pub struct PongResponse { pub time: i64, pub version: String } impl PongResponse { pub fn new(time: i64, version: String) -> PongResponse { PongResponse { time: time, version: version } } }
rust
<reponame>debianmaster/peer-calls<filename>server/sfu_test.go package server_test import ( "context" "io" "net/http/httptest" "strings" "testing" "time" "github.com/peer-calls/peer-calls/server" "github.com/peer-calls/peer-calls/server/test" "github.com/pion/webrtc/v3" "github.com/pion/webrtc/v3/pkg/media" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/goleak" "nhooyr.io/websocket" ) func setupSFUServer(rooms server.RoomManager, jitterBufferEnabled bool) (s *httptest.Server, url string) { handler := server.NewSFUHandler( loggerFactory, server.NewWSS(loggerFactory, rooms), []server.ICEServer{}, server.NetworkConfigSFU{}, server.NewMemoryTracksManager(loggerFactory, jitterBufferEnabled), ) s = httptest.NewServer(handler) url = "ws" + strings.TrimPrefix(s.URL, "http") + "/ws/" return } func TestSFU_ConnectDisconnect(t *testing.T) { defer goleak.VerifyNone(t) newAdapter := server.NewAdapterFactory(loggerFactory, server.StoreConfig{}) defer newAdapter.Close() rooms := server.NewAdapterRoomManager(newAdapter.NewAdapter) server, url := setupSFUServer(rooms, false) defer server.Close() ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() wsc := mustDialWS(t, ctx, url) err := wsc.Close(websocket.StatusNormalClosure, "") require.Nil(t, err, "error closing client socket") } func waitForUsersEvent(t *testing.T, ctx context.Context, ch <-chan server.Message) { t.Helper() for { select { case msg := <-ch: // t.Log("1 msg.Type", msg) if msg.Type == "users" { assert.Equal(t, "users", msg.Type) assert.Equal(t, roomName, msg.Room) payload := msg.Payload.(map[string]interface{}) assert.Equal(t, "__SERVER__", payload["initiator"]) assert.Equal(t, []interface{}{"__SERVER__"}, payload["peerIds"]) // assert.Equal(t, map[string]interface{}{clientID: "some-user"}, payload["nicknames"]) return } case <-ctx.Done(): t.Errorf("context timeout: %s", ctx.Err()) return } } } func startSignalling(t *testing.T, wsClient *server.Client, wsRecvCh <-chan server.Message, signaller *server.Signaller) { t.Helper() signalChan := signaller.SignalChannel() go func() { for msg := range wsRecvCh { if msg.Type == "signal" { payload, ok := msg.Payload.(map[string]interface{}) require.True(t, ok, "invalid signal msg payload type") err := signaller.Signal(payload) require.NoError(t, err, "error in receiving signal payload: %w", err) } } }() go func() { for signal := range signalChan { err := wsClient.Write(server.NewMessage("signal", roomName, signal)) require.NoError(t, err, "error sending signal to ws: %w", err) } }() } func createPeerConnection(t *testing.T, ctx context.Context, url string, clientID string) (pc *webrtc.PeerConnection, signaller *server.Signaller, cleanup func() error) { t.Helper() var closer test.TestCloser cleanup = closer.Close wsc := mustDialWS(t, ctx, url) closer.AddFuncErr(func() error { return wsc.Close(websocket.StatusNormalClosure, "") }) wsClient := server.NewClientWithID(wsc, clientID) msgChan := wsClient.Subscribe(ctx) err := wsClient.Write(server.NewMessage("ready", roomName, map[string]interface{}{ "nickname": "some-user", })) require.NoError(t, err, "error sending ready message") waitForUsersEvent(t, ctx, msgChan) require.Nil(t, wsClient.Err()) var mediaEngine webrtc.MediaEngine server.RegisterCodecs(&mediaEngine, false) api := webrtc.NewAPI( webrtc.WithMediaEngine(mediaEngine), webrtc.WithSettingEngine(webrtc.SettingEngine{ LoggerFactory: server.NewPionLoggerFactory(loggerFactory), }), ) pc, err = api.NewPeerConnection(webrtc.Configuration{}) require.Nil(t, err, "error creating peer connection") signaller, err = server.NewSignaller( loggerFactory, false, pc, clientID, "__SERVER__", ) require.Nil(t, err, "error creating signaller") closer.AddFuncErr(signaller.Close) // also closes pc startSignalling(t, wsClient, msgChan, signaller) return } func waitPeerConnected(t *testing.T, ctx context.Context, pc *webrtc.PeerConnection) { t.Helper() waitCh := make(chan struct{}) // signaller and negotiator do not use this method. if they were, resetting // this listener could mess up their functionality. in the future, the whole // pc could be wrapped by signaller or some other higher-level struct pc.OnConnectionStateChange(func(state webrtc.PeerConnectionState) { if state == webrtc.PeerConnectionStateConnected { pc.OnConnectionStateChange(nil) close(waitCh) } }) wait(t, ctx, waitCh) } func sendVideoUntilDone(t *testing.T, done <-chan struct{}, track *webrtc.Track) { for { select { case <-time.After(20 * time.Millisecond): assert.NoError(t, track.WriteSample(media.Sample{Data: []byte{0x00}, Samples: 1})) case <-done: return } } } func wait(t *testing.T, ctx context.Context, done <-chan struct{}) { t.Helper() select { case <-done: return case <-ctx.Done(): t.Error("context cancelled:", ctx.Err()) } } func TestSFU_PeerConnection(t *testing.T) { defer goleak.VerifyNone(t) newAdapter := server.NewAdapterFactory(loggerFactory, server.StoreConfig{}) defer newAdapter.Close() rooms := server.NewAdapterRoomManager(newAdapter.NewAdapter) srv, wsBaseURL := setupSFUServer(rooms, false) defer srv.Close() ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() pc, _, cleanup := createPeerConnection(t, ctx, wsBaseURL+roomName+"/"+clientID, clientID) defer cleanup() waitPeerConnected(t, ctx, pc) } func TestSFU_OnTrack(t *testing.T) { defer goleak.VerifyNone(t) newAdapter := server.NewAdapterFactory(loggerFactory, server.StoreConfig{}) log := loggerFactory.GetLogger("test") defer newAdapter.Close() rooms := server.NewAdapterRoomManager(newAdapter.NewAdapter) srv, wsBaseURL := setupSFUServer(rooms, false) defer srv.Close() ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() pc1, signaller1, cleanup := createPeerConnection(t, ctx, wsBaseURL+roomName+"/"+clientID, clientID) defer cleanup() waitPeerConnected(t, ctx, pc1) pc2, signaller2, cleanup := createPeerConnection(t, ctx, wsBaseURL+roomName+"/"+clientID2, clientID2) defer cleanup() waitPeerConnected(t, ctx, pc2) onTrackFired, onTrackFiredDone := context.WithCancel(ctx) onTrackEOF, onTrackEOFDone := context.WithCancel(ctx) pc2.OnTrack(func(remoteTrack *webrtc.Track, receiver *webrtc.RTPReceiver) { log.Println("OnTrack", remoteTrack.SSRC()) onTrackFiredDone() for { _, err := remoteTrack.ReadRTP() if remoteTrack != nil { log.Printf("pc2 remote track ended") assert.Equal(t, io.EOF, err, "error reading track") onTrackEOFDone() return } } }) localTrack, err := pc1.NewTrack(webrtc.DefaultPayloadTypeVP8, 12345, "track-one", "stream-one") require.NoError(t, err) log.Println("AddTrack start") sender, err := pc1.AddTrack(localTrack) log.Println("AddTrack end") require.NoError(t, err) require.NotNil(t, sender) go sendVideoUntilDone(t, onTrackFired.Done(), localTrack) log.Printf("sending negotiate request (1)") wait(t, ctx, signaller1.Negotiate()) log.Println("Negotiate (1) done ======================================================") <-onTrackFired.Done() log.Println("sending video done") assert.Equal(t, context.Canceled, onTrackFired.Err(), "test timed out") log.Println("removing track") // trigger io.EOF when reading from track2 assert.NoError(t, pc1.RemoveTrack(sender)) log.Printf("sending negotiate request (2)") wait(t, ctx, signaller1.Negotiate()) log.Println("Negotiate (2) done ======================================================") <-onTrackEOF.Done() assert.Equal(t, context.Canceled, onTrackEOF.Err(), "test timed out") log.Printf("waiting for peer2 negotiation to be done (3)") // server will want to negotiate after track is removed so we wait for negotiation to complete wait(t, ctx, signaller2.NegotiationDone()) log.Println("Negotiation (3) done ======================================================") }
go
The Golden Globes 2020 after-party, hosted by InStyle and Warner Bros. Pictures, was one heck of a lit affair. Among many other celebrities, Justin Bieber’s wife and super model Hailey Baldwin, too, graced the event and added glam with her presence. For the night, Hailey donned a shimmery suit-style mini dress that came with a super-plunging neckline. And while Hailey looked ultra-gorgeous in her outfit, we couldn’t help but wonder about her missing pants that might have completed or added more charm to her sizzling look. (ALSO READ - Hailey Baldwin Bieber Laughs At Pregnancy Rumours; Says ‘Internet Is Funny’) Hailey Baldwin was sporting a black glittery dress with a deep neckline that was a Saint Laurent creation. The long, loose sleeves and collars made it appear like Hailey is wearing a blazer sans trousers. Hailey completed her look with a black leather belt, open blonde tresses, nude makeup and diamond danglers. Those sharply pointed stilettos only added oomph to her look, but, hey, where them pants at? On the contrary, Hailey’s super-toned legs compensated for the loss. Check out her video and pictures from the event below: Well, Justin and Hailey’s obsession with taking down pants is not a new thing. It was before the New Years that the Baby hit-maker took to his Instagram and shared an intimate picture with wifey Hailey. It saw him pulling down his pants, as Hailey was all cuddled up in his arms. He also flaunted that perfectly-sculpted body, his tattoos and, of course, Calvin Klein. “My gift this year @haileybieber #mycalvins,” wrote Justin. Take a look:
english
Skill Trees are making a comeback in Diablo 4, and they are absolute game-changers. If you've already gone ahead and selected your characters' class, you might want to start getting to know the skills and abilities at your disposal. There are a ton of builds for every player in the game to try, but if you're not familiar with the skills and passives, there's a chance that your build won't work out so well. This guide aims to provide you with the basics on how to manage your abilities so you can go for builds that suit your playstyle. Before we begin, it's important to know how skills and passives work in Diablo 4. Much like 90% of video games out there, the title's characters have skills that they can use in battle. These abilities are unique to each class and need to be equipped and manually activated through your controller or keyboard. Once you've leveled up, you'll be able to acquire skill points, which lets you upgrade your abilities. Keep in mind, skills are linked to your weapons, so if you're thinking of switching them out, make sure you have the necessary skills to wield them. These active skills are chosen and upgraded through the skill tree via skill nodes. Passives, on the other hand, are similar to active skills but aren't manually activated. Once you've unlocked them, they'll be mobilized automatically. They also differ visually on the skill tree as passive skills do not have three extending branches compared to active skills. Lastly, Diablo 4's skill trees aren't as complicated as one would think. They're composed of skill nodes that branch off into different skills and passives as you go along and unlock them. Some parts of these skill trees won't be unlocked until you've spent a certain amount of skill points on a previous branch so make sure you spend those skill points wisely. When you first pick a basic skill in Diablo 4, regardless of what character class you choose, you'll be allowed to get two potential upgrades. The first upgrade is something you have to get, while the second one is more of a choice between option A and option B. For example, you pick the Rogue's Heartseeker skill and upgrade it for the first time. This allows you to unlock the corresponding skill next to it. In this case, it would be the Enhanced Heartseeker. After unlocking the first upgrade, you'll then be given the option to choose what kind of extra powers and abilities you'd want to incorporate with the skill. Would you go with the Fundamental Heartseeker that increases crit damage? Or Primary Heartseeker with the ability to hit more enemies? These choices are entirely up to you. It is also highly recommended by many Diablo 4 players to go for a single basic skill to focus on instead of two or three. However, if you wish to simply unlock the next skill branch, then go ahead and get those skills. From here. you can play around with them, test them out, and see what feels right. At the end of the day, it's still up to you and your playstyle. What's even better is that you can refund skill points whenever, so adjusting your skill trees to fit your playstyle will be nothing but a breeze. We hope this guide helps you gain more power in Diablo 4. And if you're looking to deal even heavier damage, here are five of the best early-game DPS builds.
english
TREE = "#" def hit_test(map_, y, x, width) -> bool: while x >= width: x -= width return map_[y][x] == TREE def hit_test_map(map_, vy, vx) -> int: height, width = len(map_), len(map_[0]) r = 0 for x, y in enumerate(range(0, height, vy)): r += hit_test(map_, y, x * vx, width) return r def convert_to_map(s: str) -> list: return [n.strip() for n in s.strip("\n").splitlines()] def hit_test_multi(s: str) -> int: map_ = convert_to_map(s) return hit_test_map(map_, 1, 1) * hit_test_map(map_, 1, 3) * hit_test_map(map_, 1, 5) * hit_test_map(map_, 1, 7) * hit_test_map(map_, 2, 1) def run_tests(): test_input = """..##....... #...#...#.. .#....#..#. ..#.#...#.# .#...##..#. ..#.##..... .#.#.#....# .#........# #.##...#... #...##....# .#..#...#.#""" test_output = 336 test_map = convert_to_map(test_input) assert hit_test_map(test_map, 1, 1) == 2 assert hit_test_map(test_map, 1, 3) == 7 assert hit_test_map(test_map, 1, 5) == 3 assert hit_test_map(test_map, 1, 7) == 4 assert hit_test_map(test_map, 2, 1) == 2 assert hit_test_multi(test_input) == test_output def run() -> int: with open("inputs/input_03.txt") as file: data = file.read() return hit_test_multi(data) if __name__ == "__main__": run_tests() print(run())
python
{"js-data-http.js":"sha256-JwrA7w8sLdIW/H3yWqYivh/2U3VQ34ePbV4/niuRBeM=","js-data-http.min.js":"sha256-x5/xrNXJL/YVdmAwDFgbgRf+3n3VvXegiI80f+YsJW8="}
json
<filename>artistools/packets/__init__.py #!/usr/bin/env python3 import math import gzip # import multiprocessing import sys from pathlib import Path # import matplotlib.patches as mpatches import numpy as np import pandas as pd # from collections import namedtuple from functools import lru_cache import artistools as at CLIGHT = 2.99792458e10 DAY = 86400 types = { 10: 'TYPE_GAMMA', 11: 'TYPE_RPKT', 20: 'TYPE_NTLEPTON', 32: 'TYPE_ESCAPE', } type_ids = dict((v, k) for k, v in types.items()) @lru_cache(maxsize=16) def get_column_names_artiscode(modelpath): modelpath = Path(modelpath) if Path(modelpath, 'artis').is_dir(): print('detected artis code directory') packet_properties = [] inputfilename = at.firstexisting( ['packet_init.cc', 'packet_init.c'], path=(modelpath / 'artis')) print(f'found {inputfilename}: getting packet column names from artis code') with open(inputfilename) as inputfile: packet_print_lines = [line.split(',') for line in inputfile if 'fprintf(packets_file,' in line] for line in packet_print_lines: for element in line: if 'pkt[i].' in element: packet_properties.append(element) for i, element in enumerate(packet_properties): packet_properties[i] = element.split('.')[1].split(')')[0] columns = packet_properties replacements_dict = { 'type': 'type_id', 'pos[0]': 'posx', 'pos[1]': 'posy', 'pos[2]': 'posz', 'dir[0]': 'dirx', 'dir[1]': 'diry', 'dir[2]': 'dirz', 'escape_type': 'escape_type_id', 'em_pos[0]': 'em_posx', 'em_pos[1]': 'em_posy', 'em_pos[2]': 'em_posz', 'absorptiontype': 'absorption_type', 'absorptionfreq': 'absorption_freq', 'absorptiondir[0]': 'absorptiondirx', 'absorptiondir[1]': 'absorptiondiry', 'absorptiondir[2]': 'absorptiondirz', 'stokes[0]': 'stokes1', 'stokes[1]': 'stokes2', 'stokes[2]': 'stokes3', 'pol_dir[0]': 'pol_dirx', 'pol_dir[1]': 'pol_diry', 'pol_dir[2]': 'pol_dirz' } for i, column_name in enumerate(columns): if column_name in replacements_dict: columns[i] = replacements_dict[column_name] return columns return False def add_derived_columns(dfpackets, modelpath, colnames, allnonemptymgilist=None): cm_to_km = 1e-5 day_in_s = 86400 if dfpackets.empty: return dfpackets colnames = at.makelist(colnames) def em_modelgridindex(packet): return at.inputmodel.get_mgi_of_velocity_kms(modelpath, packet.emission_velocity * cm_to_km, mgilist=allnonemptymgilist) def emtrue_modelgridindex(packet): return at.inputmodel.get_mgi_of_velocity_kms(modelpath, packet.true_emission_velocity * cm_to_km, mgilist=allnonemptymgilist) def em_timestep(packet): return at.get_timestep_of_timedays(modelpath, packet.em_time / day_in_s) def emtrue_timestep(packet): return at.get_timestep_of_timedays(modelpath, packet.trueem_time / day_in_s) if 'emission_velocity' in colnames: dfpackets.eval( "emission_velocity = sqrt(em_posx ** 2 + em_posy ** 2 + em_posz ** 2) / em_time", inplace=True) dfpackets.eval( "em_velx = em_posx / em_time", inplace=True) dfpackets.eval( "em_vely = em_posy / em_time", inplace=True) dfpackets.eval( "em_velz = em_posz / em_time", inplace=True) if 'em_modelgridindex' in colnames: if 'emission_velocity' not in dfpackets.columns: dfpackets = add_derived_columns(dfpackets, modelpath, ['emission_velocity'], allnonemptymgilist=allnonemptymgilist) dfpackets['em_modelgridindex'] = dfpackets.apply(em_modelgridindex, axis=1) if 'emtrue_modelgridindex' in colnames: dfpackets['emtrue_modelgridindex'] = dfpackets.apply(emtrue_modelgridindex, axis=1) if 'em_timestep' in colnames: dfpackets['em_timestep'] = dfpackets.apply(em_timestep, axis=1) return dfpackets def readfile_text(packetsfile, modelpath=Path('.')): column_names = None try: fpackets = at.zopen(packetsfile, 'rt') datastartpos = fpackets.tell() # will be updated if this was actually the start of a header firstline = fpackets.readline() if firstline.lstrip().startswith('#'): column_names = firstline.lstrip('#').split() # get the column count from the first data line to check header matched datastartpos = fpackets.tell() dataline = fpackets.readline() inputcolumncount = len(dataline.split()) else: inputcolumncount = len(firstline.split()) fpackets.seek(datastartpos) # go to first data line except gzip.BadGzipFile: print(f"\nBad Gzip File: {packetsfile}") raise gzip.BadGzipFile if inputcolumncount < 3: print("\nWARNING: packets file has no columns!") print(open(packetsfile, "r").readlines()) usecols_nodata = None # print a warning for missing columns if the source code columns can't be read if column_names: # found a header in the file assert len(column_names) == inputcolumncount else: column_names = get_column_names_artiscode(modelpath) if column_names: # found them in the artis code files assert len(column_names) == inputcolumncount else: # infer from positions # new artis added extra columns to the end of this list, but they may be absent in older versions # the packets file may have a truncated set of columns, but we assume that they # are only truncated, i.e. the columns with the same index have the same meaning columns_full = ( 'number', 'where', 'type_id', 'posx', 'posy', 'posz', 'dirx', 'diry', 'dirz', 'last_cross', 'tdecay', 'e_cmf', 'e_rf', 'nu_cmf', 'nu_rf', 'escape_type_id', 'escape_time', 'scat_count', 'next_trans', 'interactions', 'last_event', 'emissiontype', 'trueemissiontype', 'em_posx', 'em_posy', 'em_posz', 'absorption_type', 'absorption_freq', 'nscatterings', 'em_time', 'absorptiondirx', 'absorptiondiry', 'absorptiondirz', 'stokes1', 'stokes2', 'stokes3', 'pol_dirx', 'pol_diry', 'pol_dirz', 'originated_from_positron', 'true_emission_velocity', 'trueem_time', 'pellet_nucindex', ) assert len(columns_full) >= inputcolumncount usecols_nodata = [n for n in columns_full if columns_full.index(n) >= inputcolumncount] column_names = columns_full[:inputcolumncount] try: dfpackets = pd.read_csv(fpackets, delim_whitespace=True, names=column_names, header=None) except Exception as ex: print(f'Problem with file {packetsfile}') print(f'ERROR: {ex}') fpackets.close() sys.exit(1) fpackets.close() if usecols_nodata: print(f'WARNING: no data in packets file for columns: {usecols_nodata}') for col in usecols_nodata: dfpackets[col] = float('NaN') return dfpackets @at.diskcache(savezipped=True) def readfile(packetsfile, type=None, escape_type=None): """Read a packet file into a pandas DataFrame.""" packetsfile = Path(packetsfile) if packetsfile.suffixes == ['.out', '.parquet']: dfpackets = pd.read_parquet(packetsfile) elif packetsfile.suffixes == ['.out', '.feather']: dfpackets = pd.read_feather(packetsfile) elif packetsfile.suffixes in [['.out'], ['.out', '.gz'], ['.out', '.xz']]: dfpackets = readfile_text(packetsfile) # dfpackets.to_parquet(at.stripallsuffixes(packetsfile).with_suffix('.out.parquet'), # compression='brotli', compression_level=99) else: print('ERROR') sys.exit(1) filesize = Path(packetsfile).stat().st_size / 1024 / 1024 print(f'Reading {packetsfile} ({filesize:.1f} MiB)', end='') print(f' ({len(dfpackets):.1e} packets', end='') if escape_type is not None and escape_type != '' and escape_type != 'ALL': assert type is None or type == 'TYPE_ESCAPE' dfpackets.query(f'type_id == {type_ids["TYPE_ESCAPE"]} and escape_type_id == {type_ids[escape_type]}', inplace=True) print(f', {len(dfpackets)} escaped as {escape_type})') elif type is not None and type != 'ALL' and type != '': dfpackets.query(f'type_id == {type_ids[type]}', inplace=True) print(f', {len(dfpackets)} with type {type})') else: print(')') # dfpackets['type'] = dfpackets['type_id'].map(lambda x: types.get(x, x)) # dfpackets['escape_type'] = dfpackets['escape_type_id'].map(lambda x: types.get(x, x)) # # neglect light travel time correction # dfpackets.eval("t_arrive_d = escape_time / 86400", inplace=True) dfpackets.eval( "t_arrive_d = (escape_time - (posx * dirx + posy * diry + posz * dirz) / 29979245800) / 86400", inplace=True) return dfpackets @lru_cache(maxsize=16) def get_packetsfilepaths(modelpath, maxpacketfiles=None): def preferred_alternative(f, files): f_nosuffixes = at.stripallsuffixes(f) suffix_priority = [['.out', '.gz'], ['.out', '.xz'], ['.out', '.feather'], ['.out', '.parquet']] if f.suffixes in suffix_priority: startindex = suffix_priority.index(f.suffixes) + 1 else: startindex = 0 if any(f_nosuffixes.with_suffix(''.join(s)).is_file() for s in suffix_priority[startindex:]): return True return False packetsfiles = sorted( list(Path(modelpath).glob('packets00_*.out*')) + list(Path(modelpath, 'packets').glob('packets00_*.out*'))) # strip out duplicates in the case that some are stored as binary and some are text files packetsfiles = [f for f in packetsfiles if not preferred_alternative(f, packetsfiles)] if maxpacketfiles is not None and maxpacketfiles > 0 and len(packetsfiles) > maxpacketfiles: print(f'Using only the first {maxpacketfiles} of {len(packetsfiles)} packets files') packetsfiles = packetsfiles[:maxpacketfiles] return packetsfiles def get_escaping_packet_angle_bin(modelpath, dfpackets): MABINS = 100 syn_dir = at.get_syn_dir(modelpath) angle_number = np.zeros(len(dfpackets)) i = 0 for pkt_index, _ in dfpackets.iterrows(): pkt_dir = [dfpackets['dirx'][pkt_index], dfpackets['diry'][pkt_index], dfpackets['dirz'][pkt_index]] costheta = at.dot(pkt_dir, syn_dir) thetabin = ((costheta + 1.0) * np.sqrt(MABINS) / 2.0) vec1 = vec2 = vec3 = [0, 0, 0] xhat = [1, 0, 0] vec1 = at.cross_prod(pkt_dir, syn_dir, vec1) vec2 = at.cross_prod(xhat, syn_dir, vec2) cosphi = at.dot(vec1, vec2) / at.vec_len(vec1) / at.vec_len(vec2) vec3 = at.cross_prod(vec2, syn_dir, vec3) testphi = at.dot(vec1, vec3) if testphi > 0: phibin = (math.acos(cosphi) / 2. / np.pi * np.sqrt(MABINS)) else: phibin = ((math.acos(cosphi) + np.pi) / 2. / np.pi * np.sqrt(MABINS)) na = (thetabin * np.sqrt(MABINS)) + phibin # think na is angle number??? if na >= 100: print(f'error bin number too high {na}') angle_number[i] = int(na) i += 1 dfpackets['angle_bin'] = angle_number return dfpackets def make_3d_histogram_from_packets(modelpath, timestep): modeldata, _, vmax_cms = at.inputmodel.get_modeldata(modelpath) timeminarray = at.get_timestep_times_float(modelpath=modelpath, loc='start') timedeltaarray = at.get_timestep_times_float(modelpath=modelpath, loc='delta') timemaxarray = at.get_timestep_times_float(modelpath=modelpath, loc='end') # timestep = 63 # 82 73 #63 #54 46 #27 print([(ts, time) for ts, time in enumerate(timeminarray)]) packetsfiles = at.packets.get_packetsfilepaths(modelpath) emission_position3d = [[], [], []] e_rf = [] for npacketfile in range(0, len(packetsfiles)): # for npacketfile in range(0, 1): dfpackets = at.packets.readfile(packetsfiles[npacketfile]) at.packets.add_derived_columns(dfpackets, modelpath, ['emission_velocity']) dfpackets = dfpackets.dropna(subset=['emission_velocity']) # drop rows where emission_vel is NaN # print(dfpackets[['emission_velocity', 'em_velx', 'em_vely', 'em_velz']]) # select only type escape and type r-pkt (don't include gamma-rays) dfpackets.query(f'type_id == {type_ids["TYPE_ESCAPE"]} and escape_type_id == {type_ids["TYPE_RPKT"]}', inplace=True) dfpackets.query('@timeminarray[@timestep] < escape_time/@DAY < @timemaxarray[@timestep]', inplace=True) emission_position3d[0].extend([em_velx / CLIGHT for em_velx in dfpackets['em_velx']]) emission_position3d[1].extend([em_vely / CLIGHT for em_vely in dfpackets['em_vely']]) emission_position3d[2].extend([em_velz / CLIGHT for em_velz in dfpackets['em_velz']]) e_rf.extend([e_rf for e_rf in dfpackets['e_rf']]) emission_position3d = np.array(emission_position3d) weight_by_energy = False if weight_by_energy: e_rf = np.array(e_rf) weights = e_rf else: weights = None print(emission_position3d.shape) print(emission_position3d[0].shape) # print(emission_position3d) grid_3d, _, _, _ = make_3d_grid(modeldata, vmax_cms) print(grid_3d) # https://stackoverflow.com/questions/49861468/binning-random-data-to-regular-3d-grid-with-unequal-axis-lengths hist, _ = np.histogramdd(emission_position3d.T, [np.append(ax, np.inf) for ax in grid_3d], weights=weights) # print(hist.shape) if weight_by_energy: # Divide binned energies by number of processes and by length of timestep hist = hist / len(packetsfiles) / timedeltaarray[timestep] # histogram weighted by energy # - need to divide by number of processes # and length of timestep # # print histogram coordinates # coords = np.nonzero(hist) # for i, j, k in zip(*coords): # print(f'({grid_3d[0][i]}, {grid_3d[1][j]}, {grid_3d[2][k]}): {hist[i][j][k]}') return hist def make_3d_grid(modeldata, vmax_cms): # modeldata, _, vmax_cms = at.inputmodel.get_modeldata(modelpath) grid = round(len(modeldata['inputcellid']) ** (1. / 3.)) xgrid = np.zeros(grid) vmax = vmax_cms / CLIGHT i = 0 for z in range(0, grid): for y in range(0, grid): for x in range(0, grid): xgrid[x] = -vmax + 2 * x * vmax / grid i += 1 x, y, z = np.meshgrid(xgrid, xgrid, xgrid) grid_3d = np.array([xgrid, xgrid, xgrid]) # grid_Te = np.zeros((grid, grid, grid)) # print(grid_Te.shape) return grid_3d, x, y, z def get_mean_packet_emission_velocity_per_ts(modelpath, packet_type='TYPE_ESCAPE', escape_type='TYPE_RPKT', maxpacketfiles=None, escape_angles=None): packetsfiles = at.packets.get_packetsfilepaths(modelpath, maxpacketfiles=maxpacketfiles) nprocs_read = len(packetsfiles) assert nprocs_read > 0 timearray = at.get_timestep_times_float(modelpath=modelpath, loc='mid') arr_timedelta = at.get_timestep_times_float(modelpath=modelpath, loc='delta') timearrayplusend = np.concatenate([timearray, [timearray[-1] + arr_timedelta[-1]]]) dfpackets_escape_velocity_and_arrive_time = pd.DataFrame emission_data = pd.DataFrame({'t_arrive_d': timearray, 'mean_emission_velocity': np.zeros_like(timearray, dtype=float)}) for i, packetsfile in enumerate(packetsfiles): dfpackets = at.packets.readfile(packetsfile, type=packet_type, escape_type=escape_type) at.packets.add_derived_columns(dfpackets, modelpath, ['emission_velocity']) if escape_angles is not None: dfpackets = at.packets.get_escaping_packet_angle_bin(modelpath, dfpackets) dfpackets.query('angle_bin == @escape_angles', inplace=True) if i == 0: # make new df dfpackets_escape_velocity_and_arrive_time = dfpackets[['t_arrive_d', 'emission_velocity']] else: # append to df dfpackets_escape_velocity_and_arrive_time = dfpackets_escape_velocity_and_arrive_time.append( dfpackets[['t_arrive_d', 'emission_velocity']], ignore_index=True) print(dfpackets_escape_velocity_and_arrive_time) binned = pd.cut(dfpackets_escape_velocity_and_arrive_time['t_arrive_d'], timearrayplusend, labels=False, include_lowest=True) for binindex, emission_velocity in dfpackets_escape_velocity_and_arrive_time.groupby(binned)[ 'emission_velocity'].mean().iteritems(): emission_data['mean_emission_velocity'][binindex] += emission_velocity # / 2.99792458e10 return emission_data
python
COVID-19 infections linked to the new Omicron subvariant BF. 7, which is behind the current spike in cases in China and other countries, have also been found in India. According to reports, at least four BF. 7 infections have been reported in India so far. Three cases of BF. 7 were reported from Gujarat and one from Odisha. "There are currently ten different variants of COVID-19 in the country, with the latest variant being BF. 7. At present various variants of Omicron are spreading in the country and the Delta variant can still be seen in the country," a source told ANI. A case of Omicron BF. 7 Covid sub-variant was detected in Odisha in a single sample tested on September 30, state Health Department officials said on Wednesday. The RT-PCR testing of a woman from the Khordha district was done on demand. Later, the Regional Medical Research Centre (RMRC), Bhubaneswar, did the genome sequencing for the sample. The woman, who came out asymptomatic at that time of the test, had got tested for her travel to the US. She and her family have been there since October, but none of them have had any flu-like symptoms since their departure from India, the department said. At the time of testing, the Centre neither declared it as a VOC (Variant of Concern) nor VOI (Variant of Interest). In the past three months, no other sample of BF. 7 has been detected in Odisha, state's Director, Public Health Niranjan Mishra, said. The first BF. 7 case in Gujarat was also detected in September, on a 61-year-old woman, a resident of the Subhanpura area of Vadodara, who arrived in the city in September from the USA. The BF. 7 is a sub-lineage of the Omicron variant BA. 5 and has the strongest infection ability since it is highly transmissible, has a shorter incubation period, and has a higher capacity to cause reinfection or infect even those vaccinated. It has already been detected in several other countries, including the US and UK and European nations such as Belgium, Germany, France and Denmark. Amid the growing concerns over another possible COVID-19 surge in India, as a precautionary measure, the government has restarted random sampling of international passengers at airports across the country from Wednesday. On Wednesday, Gujarat Health Minister Rushikesh Patel asked officials to conduct "compulsory" testing of travellers arriving in the state from other countries. While no patient infected with a new Omicron variant has been identified in the state yet, Maharashtra Heath Minister Tanaji Sawant said on Wednesday that thermal screening will be conducted for air passengers arriving from countries where the variant has been found. For more on news and current affairs from around the world, please visit Indiatimes News.
english
Sami Zayn was one of the major stars who did not participate in WWE SummerSlam 2023. However, he did appear on this week's RAW but sported an injured elbow after an attack courtesy of JD McDonagh. Unfortunately for the champion, the injury is not part of the storyline. According to Dave Meltzer of the Wrestling Observer Newsletter, Sami Zayn is suffering from bursitis, or a bursa sac infection. This is why there was an angle on RAW where he was taken out to give him time to heal. The report also noted Kevin Owens' condition, who is out due to a broken rib. Despite this, the Undisputed Tag Team Champions will not be stripped of the titles. "Zayn has an elbow swollen like a golf ball which is why they did the angle on RAW where Judgment Day took him out. The injury that would cause that would be bursitis or a bursa sac infection. Owens is injured as well but he was given time off to let his broken rib get a rest and the plan wasn’t to take the tag titles off them," said Meltzer. The Prizefighter was last seen on the July 24, 2023, episode of RAW. He supported Zayn as the latter battled Dominik Mysterio for the North American Championship but was attacked backstage by Rhea Ripley and Damian Priest. It was later reported that he had a legitimate fractured rib. While the 39-year-old could not perform at this year's SummerSlam event because his partner was out of action, multiple participants in the event walked out injured. It was reported after the premium live event that Roman Reigns had also suffered an injury. It was believed that it occurred when Jey Uso performed a Suicide Dive through the ropes and collided with his opponent's back. Wrestling Observer Newsletter also noted that aside from The Tribal Chief and Sami Zayn, Brock Lesnar also joined them on the list of injured stars. He reportedly sustained his injury early in his match against Cody Rhodes. Which WWE Superstar suffered the same injury as Sami Zayn 10 years ago? From the looks of it, a bursa sac injury is quite common among wrestlers, and the RAW star could possibly heal in a few weeks. In 2013, another top star who suffered from this was John Cena. The Cenation Leader was out for two months, but he was also dealing with other injuries. It remains to be seen when and where fans will see Sami again after his unfortunate injury.
english
<gh_stars>1-10 #!/usr/bin/env python3 # -*- coding: utf-8 -*- file1=open('data/u_Lvoid_20.txt',encoding='utf-8') file2=open('temp2/void.txt','w',encoding='utf-8') count=0 for line in file1: count=count+1 if(line[0]=='R'):# 'line' here is a string line_list=line.split( ) # 'line_list' is a list of small strings=['R41_1_2', 'n1_1620161_481040', n1_1620161_480880, 2.8e-05] branch=line_list[0].split('-') #branch is a list of string=['R41','1','2'] branch0=branch[0].split('R')#branch is a list of string=['','41'] branch[0]=branch0[1]#now branch is a list of string=['41','1','2'], which is [layer_id, tree_id, branch_id] for i in range(3): file2.write(str(branch[i])) file2.write(' ') branch1=line_list[1].split('_') for i in range(2): file2.write(str(int(branch1[i+1])/1000)) file2.write(' ') branch3=line_list[3].split('um') a=float(branch3[0]) file2.write(str(a)) file2.write('\n') file1.close() file2.close()
python
import React from 'react' import ReactDOM from 'react-dom' import 'normalize.css' // import 'katex/dist/katex.min.css' import './assets/main.css' import App from './App' ReactDOM.render(<App />, document.getElementById('root'))
javascript
import axios from 'axios' import React, {useCallback, useEffect, useMemo, useState} from 'react' import {useDropzone} from 'react-dropzone' const baseStyle = { display: 'flex', flexDirection: 'column', alignItems: 'center', padding: '20px', borderWidth: 2, borderRadius: 2, borderColor: '#eeeeee', borderStyle: 'dashed', backgroundColor: '#fafafa', color: '#bdbdbd', transition: 'border .3s ease-in-out' }; const activeStyle = { borderColor: '#2196f3' }; const acceptStyle = { borderColor: '#00e676' }; const rejectStyle = { borderColor: '#ff1744' }; export default function UploadFile(props) { const [files, setFiles] = useState([]); const onDrop = useCallback(acceptedFiles => { setFiles(acceptedFiles.map(file => Object.assign(file, { preview: URL.createObjectURL(file) }))); acceptedFiles.forEach((file) => { const reader = new FileReader() reader.onabort = () => console.log('file reading was aborted') reader.onerror = () => console.log('file reading has failed') reader.onload = () => { const binaryStr = reader.result console.log(binaryStr) axios.post('/identify', binaryStr).then(x => { console.log(x) console.log('Post successful') debugger }) } reader.readAsArrayBuffer(file) }) }, []) const {getRootProps, getInputProps, isDragActive, isDragAccept, isDragReject} = useDropzone({onDrop, accept: 'image/jpeg, image/png'}) const style = useMemo(() => ({ ...baseStyle, ...(isDragActive ? activeStyle : {}), ...(isDragAccept ? acceptStyle : {}), ...(isDragReject ? rejectStyle : {}) }), [ isDragActive, isDragReject, isDragAccept ]); const thumbs = files.map(file => ( <div key={file.name}> <img src={file.preview} alt={file.name} /> </div> )); // clean up useEffect(() => () => { files.forEach(file => URL.revokeObjectURL(file.preview)); }, [files]); return ( <section> <div {...getRootProps({style})}> <input {...getInputProps()} /> { isDragActive ? <p>Drop the files here ...</p> : <p>Drag 'n' drop some files here, or click to select files</p> } </div> <aside> {thumbs} </aside> </section> ) }
javascript
Rahane said that he learnt a lot on the tour and he was sure that he would learn a lot more on future tours. Melbourne: He has taken guard in different positions and came at seven in India’s latest World Cup victory against Pakistan but key batsman Ajinkya Rahane does not mind being shuffled in the batting order. 26-year-old Rahane, who has played 47 ODIs and 14 Tests, said that the batting technique remains the same irrespective of his slot and only flexibility of mind is required to make the adjustment. Playing in his first World Cup, Rahane said that he has been working on a range of shots as he aims to make a mark in the showpiece event. “I have been working on shot selections. I have been working on shots that I am uncomfortable playing so that I can score even off them if the opposition has a different field placed for me. When you play certain shots, again there are mind games that you play with your opposition. There is risk involved but you need to take them,” Rahane told bcci. tv. India scored a blank in the long tour of Australia before defeating Pakistan in the ongoing World Cup but Rahane said that the experience of the last two and a half months would come handy as the mega event progresses. We have been here for a long time now and we’re playing good cricket at the moment. The experiences that we have had over the past few months here will help our mind to mould into the tournament. The challenge is to use those experiences and train the mind to get the desired results. Personally, I have learnt a lot on this tour and I am sure I will be able to learn a lot more in the future tours,” said Rahane, who usually bats in the top-order. “It is important to switch off from the game and for that I listen to music and read books to keep my mind fresh. Mental freshness is important to keep you going,” he said. Rahane is considered to be a batsman of Rahul Dravid mould and he admitted that he has been influenced a lot by the former India captain while playing for Rajasthan Royals in the IPL. “I still have a long way to go. As a batsman, you need to think like a bowler and vice versa. If you can do that you can read the game better. It is an ability that I learnt with the Rajasthan Royals where I played under Shane Warne and Rahul Dravid. Warne always used to bring different ideas on the field and think about ways to get the batsmen out. Watching Dravid Sir play, I used to ask him about his thought process and he stressed on thinking not just as a batsmen but as a bowler as well. Having played under two different captains has helped my game,” Rahane said.
english
The hosts India and the visitors South Africa were ready for the first game of the three-match ODI series at Himachal Pradesh Cricket Association Stadium (Dharamsala). But the rain and wet outfield have forced to abandon this opening game of the series. This is the last international series for both India and South Africa in the ongoing 2019/20 season. Both teams are in very different forms at the present moment as India lost their last three ODIs while South Africa won all their last three ODIs. Last time, India and South Africa met in the ODI cricket during the round-robin stage of the ICC Cricket World Cup 2019 at Southampton on 5th June 2019. India won that match by six wickets. Coming back to this Dharamsala ODI, the toss had been delayed due to wet conditions, while it was originally scheduled at 13:00 IST (also in local time). The umpires were initially scheduled to inspect the ground at 13:15 IST (also in local time). But that inspection was interrupted due to the rain. For most of the entire original first session was wasted due to rain. While the cut-off time for a 20-over game was 18:30 IST (also in local time), the match officials decided to abandon the match around 17:20 IST (also in local time). Apart from the weather issue, the stadium had a very lesser crowd due to the Covid-19 or Coronavirus outbreak. After the abandoned result in the Dharamsala ODI, it is now going to be the two-match ODI series affair between India and South Africa. They will play the next game of this ODI series at Bharat Ratna Shri Atal Bihari Vajpayee Ekana Cricket Stadium (Lucknow) on this Sunday (15th March). Eden Gardens (Kolkata) will host the last game of this series on 18th March. Both the upcoming matches are likely to be played behind the close door as the Sports Ministry has recently advised it all the national federations.
english
{"type":"Feature","id":"node/1820163230","properties":{"amenity":"vending_machine","name":"<NAME>","vending":"drinks;food","id":"node/1820163230"},"geometry":{"type":"Point","coordinates":[15.647594,46.5533663]}}
json
<reponame>ryanYtan/main { "courseCode": "PS3252", "courseCredit": "4", "description": "This is a module that examines theories of human rights since 1945, and the practice of promoting or rejecting these ideas as universal &quot;goods&quot; in international relations. Students will critically examine NGO issue advocacy, western states' &quot;ethical&quot; foreign policies; and the &quot;Asian values&quot; counter-challenge. This module relates the subject of human rights to political philosophy, international law, the UN system, morality, national interest, and values/ideology in foreign policy.", "faculty": "Arts and Social Science", "preclusion": "GEK3006", "title": "Human Rights in International Politics" }
json
{"autorun/rlib/obj/obj_avatar.lua":"8aaec29945036dd3f363a832dcb9d7dca6d6357f","autorun/rlib/fonts.lua":"db0f35e41a14a9d4cdc3440f4d7f17dd6de26583","autorun/rlib/obj/obj_dlist.lua":"e5e786ae2391fe1760d93fcd3aa36397e7bc9a31","autorun/rlib/csh.lua":"e6d1c7d1e69c6f781e55fc4c82465ea94e0d4367","autorun/rlib/layout/rlib_lo_svg.lua":"3e0b94a4abdae7ee7455d0c8a1bfbecb2afb0200","autorun/rlib/obj/obj_slider_v2.lua":"fc1f4d77ed0a7691e2b01c7f151345b8f9e45796","autorun/rlib/packages/spew.lua":"255234271700bdde7252e426b53d2d8bd43edd6d","autorun/rlib/resources.lua":"9bf333e52f5f5d70e0cf61dc75137a26f4d46bc0","autorun/rlib/materials.lua":"5739f6a6d6911c300c8b82b826e2eacece996a89","autorun/rlib/obj/obj_text.lua":"3354cffaa5e8a06294f77e707a1bf6c034fe2181","autorun/rlib/permissions.lua":"f702ff2227ce8b113678ffc786ec4e430f077548","autorun/rlib/obj/obj_tab.lua":"8b799e0f48106ae6bf805d9e733b4ec530f172f6","autorun/_rcore_loader.lua":"716d759f6c7bfc12715bfe371f4d97f15554a80f","autorun/rlib/global.lua":"86d6601d56b6e74c81d75600af32a2f2ad6458b2","autorun/rlib/register.lua":"a77a3e5b88519a874648001ff7e98950648cc251","autorun/rlib/obj/obj_cbox_v2.lua":"fe906e41a10d6b439e744a9afafc145970d3ede5","autorun/rlib/resources/snd.lua":"0993c9194d6f4980a62c956be30b265f2ace5d59","autorun/rlib/resources/ptc.lua":"e080f36de858357a054e67348da0088c8da347fe","autorun/rlib/cvar/sh_cvar.lua":"efca7b858304bbeae78487f7148de87f4a41d2f9","autorun/rlib/layout/rlib_lo_lang.lua":"97d90e5aa0692b1cceebe44ac97915dec6dc6a7d","autorun/rlib/uclass.lua":"e5f0c91ab134edfc18548e098dd8f30b4c7e48c6","autorun/rlib/layout/rlib_lo_mviewer.lua":"93e43e316eed75e2a3dd65753ecedde5ca5e49ef","autorun/rlib/layout/rlib_lo_welcome.lua":"25b835bae4eebf5258b47763b474539c33c58453","autorun/rlib/tools.lua":"a0bec650fe383a73b4a941e0b18c0998a0b3b892","autorun/rlib/cvar/cl_cvar.lua":"d0adf9fac86010c1a42a3c7622167d38c47e0687","autorun/rlib/emeta.lua":"cfb1cf5c44683f071e741bd652e7da27cc62fb4f","autorun/rlib/obj/obj_ticker.lua":"d19023710d9b146661f8ad9e5a17eebc0399321b","autorun/rlib/design.lua":"aab7e9a50798a2ac5a7c03377ff91238d065e6e5","autorun/rlib/rnet.lua":"16231ecf54ec40617e8b0625df38949141bf33e2","autorun/rlib/layout/rlib_lo_svg_c.lua":"3cfe0a55155ce860758606c54d979d61112fe3ed","autorun/rlib/rcc/sv_rcc_raw.lua":"6609e80b705a99c2c218baffa2dea38fe88e15ee","autorun/rlib/resources/pnl.lua":"900127aee713f18fa59e3497f6dbf8a14733ee6e","autorun/rlib/pmeta.lua":"6b5e42c2d2b2abe14db0bc65e4aefc4ad9e2ed74","autorun/rlib/obj/obj_spnl.lua":"b2e216cf954e45207bfa515cc7d0793da956cf73","autorun/rlib/define.lua":"3a71af09eb12c39e41707e14740290a52a4db215","autorun/rlib/packages/rcc.lua":"3164c6d451babd31d2cd5b0712b938156af89d8a","autorun/rlib/ccl.lua":"1c6a64f4afcb17eb0fad16f5f19c31878a906ac2","autorun/rlib/packages/rhook.lua":"6c1a1ebcae09886a185d13eaaf41a81efb92c1c2","autorun/rlib/obj/obj_tab_data.lua":"1b2232d3f4509ac90b551c9e18c97704596d9c04","autorun/rlib/rcc/sv_rcc.lua":"354be131b16f9db344125ab9d240d68fe65fb91d","autorun/rlib/layout/rlib_lo_diag.lua":"1f2d9f78d167b39668c1d49e3fb3cb2893f8eac2","autorun/rlib/csv.lua":"5ad3952fcbce595c31b932c8aaeef33860b71417","autorun/rlib/calls/sh_calls.lua":"c3da88062e1fec289292ed0495c8fd5d61dc5efc","autorun/rlib/obj/obj_cbo.lua":"782d11d29b3acd99e40a65509ca2b9bdc4e0e131","autorun/rlib/obj/obj_cbox_v3.lua":"dccf3fb76851c01572316ae55be8c40bb530018f","autorun/rlib/obj/obj_cbox_v4.lua":"f0d012a783f9e72401f1d5deb8a0e85af7c66695","autorun/rlib/obj/obj_overlay.lua":"39fe655d5a226b35cda73c94b116c490f11dbaf7","autorun/rlib/obj/obj_cbox.lua":"ec10ad518d5691b607e08d2568dc2bb22ce95f6b","autorun/rlib/obj/obj_sbar.lua":"3f6baad7896fb6cd4901b8f734b45e49bf71c81a","autorun/rlib/obj/obj_sbar_v2.lua":"e86ad3c45fb29aa6ecb973bccce20b55b25a26c2","autorun/rlib/base.lua":"ce4fab65a25d3ae2c4c07f708f115cb79eae12f1","autorun/rlib/packages/timex.lua":"22b07eee96846e9b601321a671b03393bf928207","autorun/rlib/packages/calc.lua":"40891a0179296980be765f9e9f0ccaa9ddb25794","autorun/rlib/calls/sv_calls.lua":"266938b0e5e1112abbedc00e4eb21e7715b4127f","autorun/rlib/resources/mdl.lua":"9900686985490e71781359671cdce3cbc81fc070","autorun/rlib/storage.lua":"d5fab82fb923d1a6359ea9b207c816ed3df6f02b","autorun/rlib/obj/obj_spnl_v2.lua":"79cd1a91d4a400e0ed78958551c7d420ce7c357a","autorun/rlib/obj/obj_spnl_v3.lua":"cf1c7a08164259c5cc05bea45ac33d4e66328060","autorun/rlib/get.lua":"81077e6d8d339505c74a493bbdc3052c26816c6d","autorun/rlib/obj/obj_sbar_v3.lua":"3b09c8a5b7e9282c0e6e46d88ca5027cff3b609d","autorun/rlib/modules.lua":"453781cdcd313389e651e2273695b6404f01779e","autorun/rlib/obj/obj_slider_v1.lua":"3d492b299a96470eaa7f41ad07038a00408260c2","autorun/rlib/packages/glon.lua":"46ec055f7739ebb94a428251e34aa8fdb0e2888f","autorun/rlib/packages/rnet.lua":"59be37580b33356253913ecef074936f230170eb","autorun/rlib/rcc/cl_rcc.lua":"b0c95e56260c6f1f0ec54530f75bcf8de754a3ad","autorun/rlib/rcc/sh_rcc.lua":"7e5d1ac91cf8ca9d2e74bb68fea55ba30bb5bd2a"}
json
WWE Superstar Santos Escobar shared his thoughts on Dominik Mysterio's promo on RAW that saw him comparing himself to the late Eddie Guerrero. This week's edition of Monday Night RAW opened with Judgment Day's promo stating their dominance in the company. Dominik Mysterio then grabbed the mic to state that he's built differently, calling himself "this generation's Eddie Guerrero." Dominik's words received tons of heat from fans as the Spectrum Center was filled with boos. SmackDown star Santos Escobar also chimed in with his thoughts on the promo as he tweeted a one-word response. Judgment Day was soon interrupted by AJ Styles and The Club. The former WWE Champion dragged Dominik Mysterio, saying that the latter is more like James Ellsworth than Eddie. Rey Mysterio and Eddie Guerrero are two of the greatest Latino stars to ever set foot in the squared circle. The pair's impact on Mexican wrestling is unparalleled, with many young fans in Mexico growing up to follow their path. Santos Escobar is no different. The SmackDown star has previously stated his desire to follow in the legendary footsteps of Rey and Eddie to become the company's next Latino Megastar. Santos recently made his main roster debut alongside his stablemates. While he and Dominik Mysterio are currently on different brands, Escobar going after the RAW star for his comments could certainly capture the interest of fans. Would you like to see Legado Del Fantasma take on Judgment Day in WWE? Sound your thoughts in the comment section below.
english
Hailing it as the first step towards attaining a majority in the Lok Sabha, AAP convenor and Delhi Chief Minister Arvind Kejriwal Saturday said that the party’s victory with more than 3 lakh votes and a margin of more than 58,000 in the Jalandhar bypoll was a testament to the people of Punjab having expressed their contentment and approval of the AAP state government. The victory, Kejriwal added, became even more significant given that the AAP had “shattered” the long-standing stronghold of the Congress party in Jalandhar, which had prevailed for the past 50-60 years, he said. “The Assembly elections in Jalandhar previously witnessed the Congress securing five out of the nine seats. However, in this by-poll, the AAP emerged victorious on an impressive seven seats, displaying a remarkable surge in support,” Kejriwal said. He sought to emphasise the AAP’s aspirations to “make a substantial impact on the national political landscape”, saying that if the people of the country desire, AAP will “attain majority in Lok Sabha”. The AAP had fielded former Congress MLA from Jalandhar West Sushil Rinku from the seat. The by-poll was necessitated after the death of its incumbent MP Santokh Singh Chaudhary from a heart attack during the Punjab leg of the Rahul Gandhi-led Bharat Jodo Yatra. “If the people of the country desire, AAP may even achieve a majority in Lok Sabha in the near future. The AAP has become a recognised national party, having established its presence in all political spheres, including the Lok Sabha,” Kejriwal added. Punjab CM Bhagwant Mann sought to highlight the development as the public’s endorsement of the AAP’s “work culture, honesty, and commitment to inclusive politics”. “This victory marks AAP’s re-entry into Lok Sabha. AAP stands firm in its commitment to politics free from religious and caste divisions,” he said.
english
Christian to Turner, out Turner Run Out!! Bull's eye! The batsman is no where in the frame. Challenges Bailey and has to pay the price for it. Knocks the length delivery to mid-off and calls for a single. However, Bailey is quick to gather it and have a direct hit at the bowler's end. No chance to complete the run as he's miles outside. Half of the team is back in the hut. Time for them to have an early supper. Turner run out (Bailey) 2(4)
english
package PaDialogs; import PaForms.PaImageTabModel; import PaGlobal.*; import java.awt.Color; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.util.HashSet; import java.util.Iterator; import javax.swing.BorderFactory; import javax.swing.Box; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import PaGlobal.PaGuiTools; import static PaGlobal.PaUtils.*; /** * <p>Find image dialog class</p> * @author avd * */ public class PaImageFindDialog extends JDialog { private static final long serialVersionUID = 1L; private JButton m_OkButton = new JButton(getGuiStrs("buttonFindCaption")); private JButton m_CancelButton = new JButton(getGuiStrs("buttonCancelCaption")); private JLabel m_infoLabel = new JLabel(" "); /** * here we have results of find operation in order to get possibility to move through them */ private HashSet<Integer> m_findResults = new HashSet<Integer>(); private PaImageTabModel m_refModel; JTextField m_textF = new JTextField(); Iterator<Integer> m_findIterator; private String m_oldValue = new String(); public PaImageFindDialog (JFrame jfrm, PaImageTabModel model) { super (jfrm, getGuiStrs("findPhotoDialogCaption"), true); m_refModel = model; add(createGUI()); setBounds(250, 150, 225, 240); pack(); setResizable(false); } /** * * @return main UI panel with all components constructed */ private JPanel createGUI () { JPanel panel_MAIN = PaGuiTools.createVerticalPanel(); panel_MAIN.setBorder( BorderFactory.createEmptyBorder(PaUtils.VERT_STRUT,PaUtils.VERT_STRUT, PaUtils.VERT_STRUT,PaUtils.VERT_STRUT)); JPanel panel_set = PaGuiTools.createHorizontalPanel(); JLabel jLabel = new JLabel(getGuiStrs("findComboLabelName")+" "); panel_set.add(jLabel); panel_set.add(m_textF); m_textF.setBorder(BorderFactory.createLoweredBevelBorder()); m_textF.setSize(200, m_textF.getSize().height); JPanel panel_Ok_Cancel = new JPanel( new GridLayout( 1,3,5,0) ); panel_Ok_Cancel.add(Box.createHorizontalStrut(100)); panel_Ok_Cancel.add(m_OkButton); panel_Ok_Cancel.add(m_CancelButton); JPanel panelInfo = PaGuiTools.createHorizontalPanel(); panelInfo.add(m_infoLabel); panelInfo.add(Box.createHorizontalGlue()); panel_MAIN.add(Box.createVerticalStrut(PaUtils.VERT_STRUT)); panel_MAIN.add(panel_set); panel_MAIN.add(Box.createVerticalStrut(PaUtils.VERT_STRUT)); panel_MAIN.add(panelInfo); panel_MAIN.add(Box.createVerticalStrut(PaUtils.VERT_STRUT)); panel_MAIN.add(panel_Ok_Cancel); setListeners(); return panel_MAIN; } /** * <p>Sets all listeners in the dialog</p> */ private void setListeners() { Forwarder forwarder = new Forwarder(); m_OkButton.addActionListener(forwarder); m_CancelButton.addActionListener(forwarder); EnterListener l = new EnterListener(); m_textF.addKeyListener(l); m_OkButton.addKeyListener(l); m_CancelButton.addKeyListener(l); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we) { dispose(); } }); } class Forwarder implements ActionListener { public void actionPerformed(ActionEvent e){ if ( e.getSource() == m_OkButton ) onOK(e); if ( e.getSource() == m_CancelButton ) onCancel(e); } } public void onOK(ActionEvent e) { findOperation(); } public void onCancel(ActionEvent e) { dispose(); } /** * <p>Main find algorithm</p> */ private void findOperation() { boolean flag = false; if ( ! m_oldValue.equals( m_textF.getText() ) ) { m_oldValue = m_textF.getText(); m_findResults.clear(); m_refModel.findRows(m_oldValue,m_findResults); Iterator<Integer> it = m_findResults.iterator(); m_findIterator = it; if ( m_findIterator.hasNext() ) { m_refModel.setRowSelected(m_findIterator.next()); flag = true; } } else { if ( m_findIterator.hasNext() ) { m_refModel.setRowSelected(m_findIterator.next()); flag = true; } else { Iterator<Integer> it1 = m_findResults.iterator(); m_findIterator = it1; if ( m_findIterator.hasNext() ) { m_refModel.setRowSelected(m_findIterator.next()); flag = true; } } } if(flag) { m_infoLabel.setText(getMessagesStrs("subjectHasBeenFoudMessage")); m_infoLabel.setForeground(Color.BLUE); } else { m_infoLabel.setText(getMessagesStrs("subjectHasNotBeenFoudMessage")); m_infoLabel.setForeground(Color.RED); } } /** * Catches the Enter button press event to start the find operation * @author avd * */ private class EnterListener implements KeyListener { @Override public void keyPressed(KeyEvent arg0) { } @Override public void keyReleased(KeyEvent e) { int key=e.getKeyCode(); if(key==KeyEvent.VK_ENTER) { if(e.getSource()== m_textF) { onOK(null); } if ( e.getSource() == m_OkButton ) { onOK(null); } if ( e.getSource() == m_CancelButton ) { onCancel(null); } } } @Override public void keyTyped(KeyEvent arg0) { } } }
java
<reponame>Yaska1706/CodingChallenges<filename>JosephusProblem/josephus_test.go<gh_stars>0 package JosephusProblem import "testing" func TestJosephus(t *testing.T) { type args struct { number int start int } tests := []struct { name string args args want int }{ // TODO: Add test cases. { name: "When there are 5 people and starting position is 2", args: args{ number: 5, start: 2, }, want: 3, }, { name: "When there are 14 people and starting position is 2", args: args{ number: 14, start: 2, }, want: 13, }, { name: "When there are 14 people and starting position is 5", args: args{ number: 14, start: 5, }, want: 11, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { if got := Josephus(tt.args.number, tt.args.start); got != tt.want { t.Errorf("Expected %v but instead got %v", got, tt.want) } }) } }
go
{ "id": "61198", "key": "TIMOB-566", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11222", "name": "Release 1.2.0", "archived": true, "released": true, "releaseDate": "2010-04-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:53:31.000+0000", "created": "2011-04-15T02:32:06.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "crash", "kitchensink" ], "versions": [], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "<NAME>", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:53:31.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}<div><p>If your phone has USB debugging turned on, it does not crash and\nworks great. But as soon as you turn off USB debugging, i can\nreliably crash the app every time.</p>\n<p>Base UI &gt; Window (Standalone) &gt; Open (plain)</p>\n<p>Unfortunately due to the nature of the crash (doesnt happen in\ndebug mode) i can provide no trace log.</p></div>{html}", "attachment": [], "flagged": false, "summary": "KitchenSink crashes on device when not in USB debugging mode (ANDROID)", "creator": { "name": "kevinholland", "key": "kevinholland", "displayName": "<NAME>", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kevinholland", "key": "kevinholland", "displayName": "<NAME>", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "123571", "author": { "name": "dthorp", "key": "dthorp", "displayName": "<NAME>", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}<div><p>Could not duplicate in latest release. 1.2.0 development.</p></div>{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "<NAME>", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:07.000+0000", "updated": "2011-04-15T02:32:07.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }
json
<reponame>PaulBernert/World-Bank-Visualizations<gh_stars>0 .line { fill: none; stroke-width: 2px; } .red { stroke: red; } .green { stroke: green; } .navyblue { stroke: navy ; } .gold { stroke: gold } .gray { stroke: gray; } .burlywood { stroke: burlywood } .darkred { stroke: darkred } .blue { stroke: blue; } #legend { float: right; }
css
According to the Sun, The chilling warning came via an email that a bomb would be planted at the home of the United skipper. The Manchester giants are suffering a terrible run of form and lost embarrassingly 4-0 to rivals Liverpool on Tuesday. Investigation is ongoing in order to get hold of the person behind this bomb threat. More reports to follow. “In the last 24 hours, Harry has received a serious threat to his family home,”a spokesman for Maguire said. “He has reported this to the police who are now looking into the matter. The safety of his family and those around him is obviously Harry’s number one priority. The club have today officially announced the appointment of Erik ten Hag as new permanent manager for the 2022/23 season as the Dutch manager will leave Ajax. Maguire and the rest of the United team have regularly received death threats and abuse on social media this season but the context of this latest threat has been taken extremely seriously. Maguire and his family are understood to have been left extremely shocked. The club have been asked to comment on the matter by the media. England centre-back Maguire played 90 minutes for United in the defeat to Liverpool earlier this week. And last month Maguire was subjected to boos from Three Lions fans while playing for his country against Ivory Coast.
english
Kevin Ginkel blew the last of the Arizona Diamondbacks’ three leads in a 6-4 loss to the New York Yankees on Monday, dropping them into a tie with the Chicago Cubs for the National League’s second wild-card spot. Ginkel (9-1) loaded the bases in the eighth inning by allowing two singles and a walk. He walked in the tying run by issuing a free pass to Oswald Peraza and Gleyber Torres scored on a sacrifice fly to left from Estevan Florial to give the Yankees their first lead. Everson Pereira added an RBI single for a 6-4 lead. Ginkel’s rough outing, which followed blown leads by Merrill Kelly in the fourth and Ryan Thompson in the seventh, resulted in Arizona’s second loss in eight games. Peraza hit a tying homer to open the seventh off Ryan Thompson. Thompson kept the game tied when center fielder Alek Thomas made a leaping catch to rob Aaron Judge of a homer.Read more: Yankees meet the Diamondbacks after Judge's 3-home run gameThe New York Yankees host the Arizona Diamondbacks after Aaron Judge hit three home runs on Friday in a 7-1 win over the Diamondbacks. Arizona Diamondbacks vs New York Yankees Line MovementMLB line and odds movement for Arizona Diamondbacks vs New York Yankees on Sep 24, 2023. Diamondbacks' Ketel Marte scratched vs. Yankees because of illnessArizona Diamondbacks second baseman Ketel Marte was scratched from a game against the New York Yankees because of an illness. MLB Diamondbacks vs Yankees Box ScoreArizona Diamondbacks vs New York Yankees MLB game box score for Sep 24, 2023. Yankees miss playoffs for first time since 2016 with windy 7-1 loss to DiamondbacksThe New York Yankees missed the playoffs for the first time since 2016, getting mathematically eliminated with a 7-1 loss Sunday to the Arizona Diamondbacks as Zac Gallen pitched six innings and got his 17th win. Yankees officially eliminated from playoff race with ugly loss to DiamondbacksThe Yankees are now officially out of postseason contention, a foregone conclusion for a team that's wrapping up a disastrous season. ’ three leads in a 6-4 loss to the New York Yankees on Monday, dropping them into a tie with the Chicago Cubs for the National League’s second wild-card spot. Ginkel (9-1) loaded the bases in the eighth inning by allowing two singles and a walk. He walked in the tying run by issuing a free pass to Oswald Peraza and Gleyber Torres scored on a sacrifice fly to left from Estevan Florial to give the Yankees their first lead. Everson Pereira added an RBI single for a 6-4 lead. Ginkel’s rough outing, which followed blown leads by Merrill Kelly in the fourth and Ryan Thompson in the seventh, resulted in Arizona’s second loss in eight games. The Diamondbacks are seeking to secure one of the NL’s three wild card spots to get back into the playoffs for the first time since 2017. Rookie Corbin Carroll got two of his three hits in those innings and his bases-loaded single in the eighth off Ian Hamilton put Arizona ahead 4-3. An inning earlier, he stole his 51st base and scored on Gabriel Moreno’s single to snap a 2-2 tie. Peraza hit a tying homer to open the seventh off Ryan Thompson. Thompson kept the game tied when center fielder Alek Thomas made a leaping catch to rob Aaron Judge of a homer. Judge lofted a fly ball toward the Yankee bullpen but Thomas charged back and timed his leap, stuck his glove up over the fence and completed the catch near the 385-foot sign. Hamilton (3-2) got the win and Clay Holmes got his 22nd save as the Yankees moved two games over .500 a day after beingfor the first time since 2016. New York needs three wins in its final six games to avoid its first losing season since 1992. Thomas hit a two-run single in the first but Austin Wells hit a tying two-run shot in the fourth.Arizona’s Merrill Kelly pitched five gritty innings, allowing two runs and four hits. He struck out four and walked two and the Yankees constantly fouled off pitches. New York’s Clarke Schmidt allowed two runs and three hits in four innings. He stayed after Carroll’s single in the second deflected off his left elbow.New York went 42-39, its poorest home record since 2014.The Yankees drew 3,272,243 for 80 home dates, up from 3,136,207 for 78 home dates last year. They had 15 sellouts, none after Aug. 6 and down from 16 last year. Diamondbacks: 2B Ketel Marte returned from an illness and walked as a pinch hitter in the eighth. RHP Miguel Castro returned from the paternity list after missing two games. … RHP Slade Cecconi, who allowed Judge’s third homer Friday, was optioned to Triple-A Reno. Yankees: RHP Tommy Kahnle (right shoulder inflammation) was placed on the injured list. Kahnle missed the first two months because of right biceps tendinitis and was 1-3 with a 2.66 ERA in 42 appearances. … 1B Anthony Rizzo (post-concussion syndrome), who was shut down Sept. 5, said he is feeling normal and will have one more checkup in New York during the early part of the offseason. "I think we just ran out of time but I’m definitely feeling back to myself, feeling a lot clearer and pretty strong," Rizzo said. … RHP Matt Bowman was recalled from Triple-A Scranton/Wilkes Barre to replace Kahnle.Diamondbacks: RHP Zach Davies (2-5, 6.81 ERA) opposes White Sox RHP Jose Urena (0-6, 7.27) in the opener of a three-game series in Chicago on Tuesday. Yankees: Michael King (4-7, 2.66) opposes Blue Jays RHP Kevin Gausman (12-9, 3.29) in the opener of a three-game series Tuesday in Toronto.
english
use super::Capabilities; use crate::{ arena::{Arena, BadHandle, Handle, UniqueArena}, proc::Alignment, }; bitflags::bitflags! { /// Flags associated with [`Type`]s by [`Validator`]. /// /// [`Type`]: crate::Type /// [`Validator`]: crate::valid::Validator #[repr(transparent)] pub struct TypeFlags: u8 { /// Can be used for data variables. /// /// This flag is required on types of local variables, function /// arguments, array elements, and struct members. /// /// This includes all types except `Image`, `Sampler`, /// and some `Pointer` types. const DATA = 0x1; /// The data type has a size known by pipeline creation time. /// /// Unsized types are quite restricted. The only unsized types permitted /// by Naga, other than the non-[`DATA`] types like [`Image`] and /// [`Sampler`], are dynamically-sized [`Array`s], and [`Struct`s] whose /// last members are such arrays. See the documentation for those types /// for details. /// /// [`DATA`]: TypeFlags::DATA /// [`Image`]: crate::Type::Image /// [`Sampler`]: crate::Type::Sampler /// [`Array`]: crate::Type::Array /// [`Struct`]: crate::Type::struct const SIZED = 0x2; /// The data can be copied around. const COPY = 0x4; /// Can be be used for interfacing between pipeline stages. /// /// This includes non-bool scalars and vectors, matrices, and structs /// and arrays containing only interface types. const INTERFACE = 0x8; /// Can be used for host-shareable structures. const HOST_SHARED = 0x10; /// This type can be passed as a function argument. const ARGUMENT = 0x40; } } #[derive(Clone, Copy, Debug, thiserror::Error)] pub enum Disalignment { #[error("The array stride {stride} is not a multiple of the required alignment {alignment}")] ArrayStride { stride: u32, alignment: u32 }, #[error("The struct span {span}, is not a multiple of the required alignment {alignment}")] StructSpan { span: u32, alignment: u32 }, #[error("The struct member[{index}] offset {offset} is not a multiple of the required alignment {alignment}")] MemberOffset { index: u32, offset: u32, alignment: u32, }, #[error("The struct member[{index}] is not statically sized")] UnsizedMember { index: u32 }, #[error("The type is not host-shareable")] NonHostShareable, } #[derive(Clone, Debug, thiserror::Error)] pub enum TypeError { #[error(transparent)] BadHandle(#[from] BadHandle), #[error("The {0:?} scalar width {1} is not supported")] InvalidWidth(crate::ScalarKind, crate::Bytes), #[error("The {0:?} scalar width {1} is not supported for an atomic")] InvalidAtomicWidth(crate::ScalarKind, crate::Bytes), #[error("The base handle {0:?} can not be resolved")] UnresolvedBase(Handle<crate::Type>), #[error("Invalid type for pointer target {0:?}")] InvalidPointerBase(Handle<crate::Type>), #[error("Unsized types like {base:?} must be in the `Storage` storage class, not `{class:?}`")] InvalidPointerToUnsized { base: Handle<crate::Type>, class: crate::StorageClass, }, #[error("Expected data type, found {0:?}")] InvalidData(Handle<crate::Type>), #[error("Base type {0:?} for the array is invalid")] InvalidArrayBaseType(Handle<crate::Type>), #[error("The constant {0:?} can not be used for an array size")] InvalidArraySizeConstant(Handle<crate::Constant>), #[error("The constant {0:?} is specialized, and cannot be used as an array size")] UnsupportedSpecializedArrayLength(Handle<crate::Constant>), #[error("Array type {0:?} must have a length of one or more")] NonPositiveArrayLength(Handle<crate::Constant>), #[error("Array stride {stride} is smaller than the base element size {base_size}")] InsufficientArrayStride { stride: u32, base_size: u32 }, #[error("Field '{0}' can't be dynamically-sized, has type {1:?}")] InvalidDynamicArray(String, Handle<crate::Type>), #[error("Structure member[{index}] at {offset} overlaps the previous member")] MemberOverlap { index: u32, offset: u32 }, #[error( "Structure member[{index}] at {offset} and size {size} crosses the structure boundary of size {span}" )] MemberOutOfBounds { index: u32, offset: u32, size: u32, span: u32, }, } // Only makes sense if `flags.contains(HOST_SHARED)` type LayoutCompatibility = Result<Option<Alignment>, (Handle<crate::Type>, Disalignment)>; fn check_member_layout( accum: &mut LayoutCompatibility, member: &crate::StructMember, member_index: u32, member_layout: LayoutCompatibility, parent_handle: Handle<crate::Type>, ) { *accum = match (*accum, member_layout) { (Ok(cur_alignment), Ok(align)) => { let align = align.unwrap().get(); if member.offset % align != 0 { Err(( parent_handle, Disalignment::MemberOffset { index: member_index, offset: member.offset, alignment: align, }, )) } else { let combined_alignment = ((cur_alignment.unwrap().get() - 1) | (align - 1)) + 1; Ok(Alignment::new(combined_alignment)) } } (Err(e), _) | (_, Err(e)) => Err(e), }; } #[derive(Clone, Debug)] pub(super) struct TypeInfo { pub flags: TypeFlags, pub uniform_layout: LayoutCompatibility, pub storage_layout: LayoutCompatibility, } impl TypeInfo { fn dummy() -> Self { TypeInfo { flags: TypeFlags::empty(), uniform_layout: Ok(None), storage_layout: Ok(None), } } fn new(flags: TypeFlags, align: u32) -> Self { let alignment = Alignment::new(align); TypeInfo { flags, uniform_layout: Ok(alignment), storage_layout: Ok(alignment), } } } impl super::Validator { pub(super) fn check_width(&self, kind: crate::ScalarKind, width: crate::Bytes) -> bool { match kind { crate::ScalarKind::Bool => width == crate::BOOL_WIDTH, crate::ScalarKind::Float => { width == 4 || (width == 8 && self.capabilities.contains(Capabilities::FLOAT64)) } crate::ScalarKind::Sint | crate::ScalarKind::Uint => width == 4, } } pub(super) fn reset_types(&mut self, size: usize) { self.types.clear(); self.types.resize(size, TypeInfo::dummy()); self.layouter.clear(); } pub(super) fn validate_type( &self, handle: Handle<crate::Type>, types: &UniqueArena<crate::Type>, constants: &Arena<crate::Constant>, ) -> Result<TypeInfo, TypeError> { use crate::TypeInner as Ti; Ok(match types[handle].inner { Ti::Scalar { kind, width } => { if !self.check_width(kind, width) { return Err(TypeError::InvalidWidth(kind, width)); } TypeInfo::new( TypeFlags::DATA | TypeFlags::SIZED | TypeFlags::COPY | TypeFlags::INTERFACE | TypeFlags::HOST_SHARED | TypeFlags::ARGUMENT, width as u32, ) } Ti::Vector { size, kind, width } => { if !self.check_width(kind, width) { return Err(TypeError::InvalidWidth(kind, width)); } let count = if size >= crate::VectorSize::Tri { 4 } else { 2 }; TypeInfo::new( TypeFlags::DATA | TypeFlags::SIZED | TypeFlags::COPY | TypeFlags::INTERFACE | TypeFlags::HOST_SHARED | TypeFlags::ARGUMENT, count * (width as u32), ) } Ti::Matrix { columns: _, rows, width, } => { if !self.check_width(crate::ScalarKind::Float, width) { return Err(TypeError::InvalidWidth(crate::ScalarKind::Float, width)); } let count = if rows >= crate::VectorSize::Tri { 4 } else { 2 }; TypeInfo::new( TypeFlags::DATA | TypeFlags::SIZED | TypeFlags::COPY | TypeFlags::INTERFACE | TypeFlags::HOST_SHARED | TypeFlags::ARGUMENT, count * (width as u32), ) } Ti::Atomic { kind, width } => { let good = match kind { crate::ScalarKind::Bool | crate::ScalarKind::Float => false, crate::ScalarKind::Sint | crate::ScalarKind::Uint => width == 4, }; if !good { return Err(TypeError::InvalidAtomicWidth(kind, width)); } TypeInfo::new( TypeFlags::DATA | TypeFlags::SIZED | TypeFlags::HOST_SHARED, width as u32, ) } Ti::Pointer { base, class } => { use crate::StorageClass as Sc; if base >= handle { return Err(TypeError::UnresolvedBase(base)); } let base_info = &self.types[base.index()]; if !base_info.flags.contains(TypeFlags::DATA) { return Err(TypeError::InvalidPointerBase(base)); } // Runtime-sized values can only live in the `Storage` storage // class, so it's useless to have a pointer to such a type in // any other class. // // Detecting this problem here prevents the definition of // functions like: // // fn f(p: ptr<workgroup, UnsizedType>) -> ... { ... } // // which would otherwise be permitted, but uncallable. (They // may also present difficulties in code generation). if !base_info.flags.contains(TypeFlags::SIZED) { match class { Sc::Storage { .. } => {} _ => { return Err(TypeError::InvalidPointerToUnsized { base, class }); } } } // Pointers passed as arguments to user-defined functions must // be in the `Function`, `Private`, or `Workgroup` storage // class. We only mark pointers in those classes as `ARGUMENT`. // // `Validator::validate_function` actually checks the storage // class of pointer arguments explicitly before checking the // `ARGUMENT` flag, to give better error messages. But it seems // best to set `ARGUMENT` accurately anyway. let argument_flag = match class { Sc::Function | Sc::Private | Sc::WorkGroup => TypeFlags::ARGUMENT, Sc::Uniform | Sc::Storage { .. } | Sc::Handle | Sc::PushConstant => { TypeFlags::empty() } }; // Pointers cannot be stored in variables, structure members, or // array elements, so we do not mark them as `DATA`. TypeInfo::new(argument_flag | TypeFlags::SIZED | TypeFlags::COPY, 0) } Ti::ValuePointer { size: _, kind, width, class: _, } => { if !self.check_width(kind, width) { return Err(TypeError::InvalidWidth(kind, width)); } TypeInfo::new(TypeFlags::DATA | TypeFlags::SIZED | TypeFlags::COPY, 0) } Ti::Array { base, size, stride } => { if base >= handle { return Err(TypeError::UnresolvedBase(base)); } let base_info = &self.types[base.index()]; if !base_info.flags.contains(TypeFlags::DATA | TypeFlags::SIZED) { return Err(TypeError::InvalidArrayBaseType(base)); } //Note: `unwrap()` is fine, since `Layouter` goes first and calls it let base_size = types[base].inner.size(constants); if stride < base_size { return Err(TypeError::InsufficientArrayStride { stride, base_size }); } let general_alignment = self.layouter[base].alignment; let uniform_layout = match base_info.uniform_layout { Ok(base_alignment) => { // combine the alignment requirements let align = ((base_alignment.unwrap().get() - 1) | (general_alignment.get() - 1)) + 1; if stride % align != 0 { Err(( handle, Disalignment::ArrayStride { stride, alignment: align, }, )) } else { Ok(Alignment::new(align)) } } Err(e) => Err(e), }; let storage_layout = match base_info.storage_layout { Ok(base_alignment) => { let align = ((base_alignment.unwrap().get() - 1) | (general_alignment.get() - 1)) + 1; if stride % align != 0 { Err(( handle, Disalignment::ArrayStride { stride, alignment: align, }, )) } else { Ok(Alignment::new(align)) } } Err(e) => Err(e), }; let sized_flag = match size { crate::ArraySize::Constant(const_handle) => { let constant = constants.try_get(const_handle)?; let length_is_positive = match *constant { crate::Constant { specialization: Some(_), .. } => { // Many of our back ends don't seem to support // specializable array lengths. If you want to try to make // this work, be sure to address all uses of // `Constant::to_array_length`, which ignores // specialization. return Err(TypeError::UnsupportedSpecializedArrayLength( const_handle, )); } crate::Constant { inner: crate::ConstantInner::Scalar { width: _, value: crate::ScalarValue::Uint(length), }, .. } => length > 0, // Accept a signed integer size to avoid // requiring an explicit uint // literal. Type inference should make // this unnecessary. crate::Constant { inner: crate::ConstantInner::Scalar { width: _, value: crate::ScalarValue::Sint(length), }, .. } => length > 0, _ => { log::warn!("Array size {:?}", constant); return Err(TypeError::InvalidArraySizeConstant(const_handle)); } }; if !length_is_positive { return Err(TypeError::NonPositiveArrayLength(const_handle)); } TypeFlags::SIZED | TypeFlags::ARGUMENT } crate::ArraySize::Dynamic => { // Non-SIZED types may only appear as the last element of a structure. // This is enforced by checks for SIZED-ness for all compound types, // and a special case for structs. TypeFlags::empty() } }; let base_mask = TypeFlags::COPY | TypeFlags::HOST_SHARED | TypeFlags::INTERFACE; TypeInfo { flags: TypeFlags::DATA | (base_info.flags & base_mask) | sized_flag, uniform_layout, storage_layout, } } Ti::Struct { ref members, span } => { let mut ti = TypeInfo::new( TypeFlags::DATA | TypeFlags::SIZED | TypeFlags::COPY | TypeFlags::HOST_SHARED | TypeFlags::INTERFACE | TypeFlags::ARGUMENT, 1, ); let mut min_offset = 0; for (i, member) in members.iter().enumerate() { if member.ty >= handle { return Err(TypeError::UnresolvedBase(member.ty)); } let base_info = &self.types[member.ty.index()]; if !base_info.flags.contains(TypeFlags::DATA) { return Err(TypeError::InvalidData(member.ty)); } if !base_info.flags.contains(TypeFlags::HOST_SHARED) { if ti.uniform_layout.is_ok() { ti.uniform_layout = Err((member.ty, Disalignment::NonHostShareable)); } if ti.storage_layout.is_ok() { ti.storage_layout = Err((member.ty, Disalignment::NonHostShareable)); } } ti.flags &= base_info.flags; if member.offset < min_offset { //HACK: this could be nicer. We want to allow some structures // to not bother with offsets/alignments if they are never // used for host sharing. if member.offset == 0 { ti.flags.set(TypeFlags::HOST_SHARED, false); } else { return Err(TypeError::MemberOverlap { index: i as u32, offset: member.offset, }); } } //Note: `unwrap()` is fine because `Layouter` goes first and checks this let base_size = types[member.ty].inner.size(constants); min_offset = member.offset + base_size; if min_offset > span { return Err(TypeError::MemberOutOfBounds { index: i as u32, offset: member.offset, size: base_size, span, }); } check_member_layout( &mut ti.uniform_layout, member, i as u32, base_info.uniform_layout, handle, ); check_member_layout( &mut ti.storage_layout, member, i as u32, base_info.storage_layout, handle, ); // The last field may be an unsized array. if !base_info.flags.contains(TypeFlags::SIZED) { let is_array = match types[member.ty].inner { crate::TypeInner::Array { .. } => true, _ => false, }; if !is_array || i + 1 != members.len() { let name = member.name.clone().unwrap_or_default(); return Err(TypeError::InvalidDynamicArray(name, member.ty)); } if ti.uniform_layout.is_ok() { ti.uniform_layout = Err((handle, Disalignment::UnsizedMember { index: i as u32 })); } } } let alignment = self.layouter[handle].alignment.get(); if span % alignment != 0 { ti.uniform_layout = Err((handle, Disalignment::StructSpan { span, alignment })); ti.storage_layout = Err((handle, Disalignment::StructSpan { span, alignment })); } ti } Ti::Image { .. } | Ti::Sampler { .. } => TypeInfo::new(TypeFlags::ARGUMENT, 0), }) } }
rust
A Noida businessman returned to India Sunday after a four-day ordeal in the UAE owing to mistaken identity. He was detained and questioned several times by the UAE authorities before they realised he was not a criminal and set him free. He was then let go, Kumar said, but his boarding pass did not work at the check-in. “I thought it must be some mistake since they let me go. But then the CID came back and took me into custody and started questioning me again. They thought I was some other criminal who had the same name and date of birth. But I kept telling them that all other details are different and that I have never been to the UAE before. ” Meanwhile, Kumar’s wife was sent back to India as she did not have a UAE visa. The next day, Kumar said he was moved to a common cell with 30-40 other people. “It was basically a jail, the conditions were very bad. They should not treat anyone like this. It is one thing if you suspect some issue and question me, but without proof, they were treating me as though I was a criminal. I could not eat the food there also since it was non-vegetarian. I was mostly surviving on tea,” Kumar said. On October 13, Kumar was taken to the city of Ras Al-Khaimah to meet a judge over video conferencing the next day. The confusion started to clear up after he was given a Hindi interpreter. “I told them again that all the details were different and showed a photocopy of my passport as well since the CID had the original. The criminal was originally from Kerala and the case was from 2015, whereas I had never been to Abu Dhabi and my passport was issued in 2016. I kept telling them this. I could see from their body language that they were also in a state of confusion. They asked for my old passport but I told them that I had only this one, and there was no old passport,” said Kumar. After another round of questioning along the same line, Kumar was finally told he was free to go. But he had to wait for one more day before he was taken back to Abu Dhabi and he spent the rest of the day in custody. He finally caught a flight back to India late on October 15 after UAE officials dropped him back at the airport and returned his documents. Kumar’s family and friends welcomed him at the airport Sunday morning.
english
The war in Iraq, now nearing its inevitable end, represents a multi-dimensional tragedy. First, of course, it? s a human tragedy of immense proportions. The war in Iraq, now nearing its inevitable end, represents a multi-dimensional tragedy. First, of course, it’s a human tragedy of immense proportions. Thousands of Iraqi men, women and children have been killed in the relentless one-sided bombing and invasion of a population that is totally bereft of any air cover. This ‘collateral damage’ to an already weakened and traumatised Iraqi population represents one of the major human disasters in recent times. When the death of one child can bring untold misery to a family, one shudders to think of the emotional pain being caused to the Iraqi people. Its ruthless ruler and his regime are not to the liking of many. But surely the children of Iraq are as much part of the global community as children anywhere else. The defence put up by the Iraqis facing fearful odds showed that Iraqi nationalism was gravely underestimated by the coalition, a major political miscalculation for which a high price will have to be paid in human suffering, including coalition casualties. The second area of tragedy is the immense environmental destruction being caused by the unprecedented bombing and subsequent fires throughout Iraq. The equivalent of millions of tonnes of TNT that have been dropped on the Iraqi population represents a destruction of the environment that is irreversible, and will surely have a malign impact on the entire region and ultimately around the globe. As it is, global warming, and the US reneging from the Kyoto Convention, constitute a major threat to the biosphere of our planet. A third element is the massive economic cost of the war, already running into hundreds of billions of dollars, to which will be added the cost of reconstructing a devastated Iraq after its ‘liberation’. That such massive resources are being expanded on a war that a majority of the people of the world consider avoidable represents yet another blow to the economic welfare of the planet. If even a fraction of these amounts were spent on removing poverty in the developing world, it would have yielded rich dividends. Ammunition manufacturers and oil giants — mostly American — may make huge profits from this conflict, but the cumulative impact on the world economy will surely be lethal. A fourth aspect, of course, is the blow that this war has struck to the international community, specially the United Nations Security Council which was supposed to ensure the world against the scourge of war. The inevitable weakening of the entire UN system, the deep cleavages that have emerged within the European Union and the North Atlantic Alliance, the massive alienation of large sections of people around the world as symbolised by massive protests, are all negative fall-outs from the present war. The spurt in international terrorism, dramatically symbolised by the horrific 9/11 attack on the US, and the war in Iraq show clearly that hopes for a movement towards a sane and harmonious global society are rapidly fading. Indeed, the world now looks a much more dangerous place than before, and negative scenarios are likely to develop as the longer term implications of the war begin to unfold. Finally, this is a civilisational tragedy. Although they represent only a small section of the entire Islamic world, the Arabs have historically spearheaded the Islamic civilisation from its origins. The whole West Asian region is now in turmoil, and the churning is likely to produce an enhanced dimension of terrorism and move humanity closer towards an apocalyptic clash of civilisations. And this in a global society that desperately needs not clash but a confluence of civilisations, not religious fanaticism but interfaith harmony, not earthshaking bombardment but earth-greening cooperation, not unabashed unilateralism but symbiotic multilateralism. In some ways this war is equally a tragedy for America. This great and beautiful country stretching from sea to shining sea represents some of the great contemporary achievements of humankind. Its commitment to liberty and the rule of law, its astounding breakthroughs in the field of science and technology, its immense creativity in almost every field of human endeavour make it the cynosure of all eyes. My generation grew up inspired by the speeches of Abraham Lincoln and admiring F. D. Roosevelt for his spirited defence against fascism and his support for India’s freedom. The Kennedy brothers and Martin Luther King became shining symbols of the battle against lingering remnants of slavery in the US. Over a million Indians have made their home in this great country, and have flourished in its open and highly competitive society. The vertical ecstasy of New York and the classical gravitas of Washington DC; the glory of the Golden Gate Bridge in San Francisco and the indescribable beauty of Alaska’s lakes and mountains — what a fabulous country this is, endowed with all the riches that nature could possibly bestow. There is so much to admire in America that it is a tragedy to see it undertaking a brutal and avoidable war. Senator Robert Byrd said in his speech in the US Senate that he weeps for his country. The Iraqis of course are weeping in agony. As for the rest of the world, we weep both for Iraq and for the US. (The writer is a Rajya Sabha member)
english
// // $Id$ package com.threerings.bang.avatar.client; import com.jme.renderer.Renderer; import com.jmex.bui.BButton; import com.jmex.bui.BComponent; import com.jmex.bui.BImage; import com.jmex.bui.BLabel; import com.jmex.bui.event.ActionEvent; import com.jmex.bui.event.ActionListener; import com.jmex.bui.util.Point; import com.jmex.bui.util.Rectangle; import com.threerings.crowd.data.PlaceObject; import com.threerings.bang.client.BangUI; import com.threerings.bang.client.ShopView; import com.threerings.bang.client.TownButton; import com.threerings.bang.client.WalletLabel; import com.threerings.bang.client.bui.StatusLabel; import com.threerings.bang.util.BangContext; import com.threerings.bang.avatar.data.BarberCodes; import com.threerings.bang.avatar.data.BarberObject; /** * Displays the main barber interface wherein the player can create new "looks" * for their avatar and purchase them. */ public class BarberView extends ShopView { public BarberView (BangContext ctx) { super(ctx, BarberCodes.BARBER_MSGS); add(new BLabel(_msgs.get("m.welcome"), "shop_status"), new Rectangle(203, 655, 610, 40)); add(_tip = new BLabel(_msgs.get("m.looks_tip"), "barber_tip_label"), new Rectangle(185, 565, 390, 55)); add(_status = new StatusLabel(ctx), new Rectangle(230, 10, 500, 50)); _status.setStyleClass("shop_status"); _status.setText(getShopTip()); // we need to handle displaying the avatar specially _avatar = new AvatarView(ctx, 2, true, false); // put our new look and change clothes interfaces in tabs _wearclothes = new WearClothingView(ctx, _status); _newlook = new NewLookView(ctx, _status); _editchar = new EditCharacterView(ctx, _status); // start with the wear clothes view "selected" add(_active = _wearclothes, CONTENT_RECT); // do our hacky fake tab business _looktab = _ctx.loadImage("ui/barber/top_looks.png"); _chartab = _ctx.loadImage("ui/barber/top_character.png"); for (int ii = 0; ii < TABS.length; ii++) { BButton btn = new BButton("", _selector, TABS[ii]); add(btn, new Rectangle(TAB_LOCS[ii], 623, 150, 30)); btn.setStyleClass("def_button"); } add(new WalletLabel(ctx, true), new Rectangle(40, 38, 150, 40)); add(createHelpButton(), new Point(745, 25)); add(new TownButton(ctx), new Point(835, 25)); } @Override // documentation inherited public void willEnterPlace (PlaceObject plobj) { super.willEnterPlace(plobj); BarberObject barbobj = (BarberObject)plobj; _wearclothes.setBarberObject(barbobj); _newlook.setBarberObject(barbobj); _editchar.setBarberObject(barbobj); } @Override // documentation inherited protected Point getShopkeepNameLocation () { return new Point(23, 548); } @Override // documentation inherited protected void wasAdded () { super.wasAdded(); _looktab.reference(); _chartab.reference(); } @Override // documentation inherited protected void wasRemoved () { super.wasRemoved(); _looktab.release(); _chartab.release(); } @Override // documentation inherited protected void renderComponent (Renderer renderer) { // hackity hack hack hack if (_active == _newlook) { _looktab.render(renderer, 179, 598, _alpha); } else if (_active == _editchar) { _chartab.render(renderer, 179, 598, _alpha); } // render our children components over the fake tab super.renderComponent(renderer); } protected ActionListener _selector = new ActionListener() { public void actionPerformed (ActionEvent event) { BComponent nactive; String action = event.getAction(), tip; if (action.equals("looks")) { nactive = _newlook; tip = "looks"; } else if (action.equals("clothes")) { nactive = _wearclothes; tip = "clothes"; } else { // if (action.equals("character")) { nactive = _editchar; tip = "character"; } remove(_active); add(_active = nactive, CONTENT_RECT); _tip.setText(_msgs.get("m." + tip + "_tip")); BangUI.play(BangUI.FeedbackSound.TAB_SELECTED); } }; protected AvatarView _avatar; protected BComponent _active; protected BLabel _tip; protected StatusLabel _status; protected BImage _looktab, _chartab; protected WearClothingView _wearclothes; protected NewLookView _newlook; protected EditCharacterView _editchar; protected static Rectangle CONTENT_RECT = new Rectangle(40, 65, 980, 545); protected static final String[] TABS = { "clothes", "looks", "character" }; protected static final int[] TAB_LOCS = { 200, 370, 540 }; }
java
{ "hostname": "garage", "wifi_ssid": "EyeFi", "wifi_password": "<PASSWORD>", "mqtt_prefix": "home/garage", "mqtt_clientid": "garage", "mqtt_host": "192.168.1.110", "mqtt_port": 1883, "mqtt_user": "device", "mqtt_password": "<PASSWORD>", "zone": 1 }
json
[{"namaKab":"<NAME>","originalFilename":"ZDP_5104.JPG","namaPartai":"Partai Keadilan Sejahtera","id":2751,"noUrut":1,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"<NAME>","originalFilename":"Dok baru 2018-07-10 (6)_1.jpg","namaPartai":"Partai Keadilan Sejahtera","id":2739,"noUrut":2,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"<NAME>","originalFilename":"ZDP_5089.JPG","namaPartai":"Partai Keadilan Sejahtera","id":70043,"noUrut":3,"nama":"<NAME>","stringJenisKelamin":"Perempuan"},{"namaKab":"<NAME>","originalFilename":"ZDP_5321.JPG","namaPartai":"Partai Keadilan Sejahtera","id":69776,"noUrut":4,"nama":"<NAME>","stringJenisKelamin":"Perempuan"},{"namaKab":"<NAME>","originalFilename":"Dok baru 2018-07-06 (8)_2.jpg","namaPartai":"Partai Keadilan Sejahtera","id":69363,"noUrut":5,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"}]
json
{ "powers": [ "dsmorigins:budding_amethyst", "dsmorigins:kobold", "dsmorigins:budding_amethyst_recipe", "dsmorigins:luck_charm_recipe", "dsmorigins:luck_charm", "dsmorigins:cracking", "dsmorigins:cracking_reset", "dsmorigins:cracking_fix", "dsmorigins:cracking_dealt", "dsmorigins:pickaxe_buff", "dsmorigins:pickaxe_buff_eff", "dsmorigins:kobold_stats", "dsmorigins:fragile_body", "dsmorigins:night_vision", "dsmorigins:night_vision_shader", "dsmorigins:night_vision_toggle", "dsmorigins:pickaxe_bonus_origin", "dsmorigins:mining_frenzy", "dsmorigins:mining_frenzy_food_immunity", "dsmorigins:mining_frenzy_smoke", "dsmorigins:mining_frenzy_attributes", "dsmorigins:mining_frenzy_resource", "dsmorigins:mining_frenzy_shader", "dsmorigins:mining_frenzy_reset", "dsmorigins:ore_smell", "dsmorigins:ore_smell_toggle" ], "icon": "amethyst_block", "order": 1, "impact": 2 }
json
<filename>postal/54314.json<gh_stars>1-10 [{"postal_code":"54314","place_name":"Magisterial","place_type":"Fraccionamiento","county":"Villa del Carbón","state":"México","city":""}]
json
<reponame>CaptainBriot/prosperpy import functools import logging import traceback import prosperpy LOGGER = logging.getLogger(__name__) def fatal(func): @functools.wraps(func) async def wrapper(*args, **kwargs): try: return await func(*args, **kwargs) except Exception as ex: LOGGER.fatal("Error '%s' occurred when running '%s(%s, %s)'", ex, func, args, kwargs) LOGGER.fatal(traceback.format_exc()) LOGGER.info('Stopping %s', prosperpy.engine) prosperpy.engine.stop() return wrapper
python
For several weeks now, Eliott (Stéphane Monpetit) has made his comeback in Un Si Grand Soleil. After a stint in prison for drug trafficking and a stint as aescort boy, the son of Eve Prodi has gradually switched to illicit activities by setting up trafficking in cigarettes with Virgil. Following an agreement with the prosecutor Bernier to prevent him from returning behind bars, Eliott accepted a mission: to get closer to the businesswoman Alicia Boisseron, suspected of tax evasion and money laundering. To this end, Eliott meets Sam (Montaine Frégeai), Alicia’s daughter. After quickly getting closer to her, Eliott, pushed by the prosecutor to obtain new more conclusive evidence against his mother, finishes seducing Sam, and offers to marry him following a bet. Against all expectations, the young woman accepts! But will the wedding take place? In an exclusive extract on the site of Leisure TV, we see in fact the young couple leaving a town hall in wedding attire, all smiles in front of their loved ones. What was originally a challenge will he materialize in a true love story, to the point that Eliott compromises his mission? Will he be ready to jeopardize his feelings for Sam? You will find out in the next episodes of Un Si Grand Soleil on France 2!
english
How To Learn And Memorize Legal Terminology (Paperback) If you've ever wanted to improve your ability to learn and memorize legal terminology and case studies by 100% ... 200% ... 300% (or more) using simple skills you can learn in under an hour (or less), then this may be the most important book you will ever read. Guess what? You're wasting time listening to the standard advice about learning the law. You can't continue with "random acts of learning" as you study from you legal dictionary and other legal books - at least not for long. The truth is that learning the law can be incredibly simple. You just need to know how. In How To Learn and Memorize Legal Terminology ... Using A Memory Palace, Anthony Metivier shows you everything you need to develop the right skills, the right mindset and the right dedicated memorization strategy for memorizing any legal term. Plus you'll learn how to find the right tempo for studying the law to match your background and personal interests. The key to learning and memorizing legal terminology is to follow a model. You won't succeed without one. And your best bet is to supplement that math learning model with strong memory skills. Want To Eliminate The Pain and Frustration of Studying Law? Most of the suffering caused by learning math comes from "cognitive overload." The information in this book will teach you: * Why memory techniques for learning the law are like a bicycle everyone can ride (with some minor personal adjustments). * The real reason why no one should ever be squeamish about using memory techniques for studying legal books and the law. * Sample examples and illustrations that will show you exactly how and why these memory techniques and strategies work. * Unique approaches that will have you literally "tuning in" on legal concepts so that you can memorize and recall them with ease. Memorizing multiple aspects of the legal profession is one of the greatest frustrations law students face. But using the Memory Palace and visualization secrets revealed in this book, you'll learn: * How to visualize any legal term so that it literally pops out in your mind whenever you look for it. * How to use actors, other public figures and famous pieces of artwork to help you memorize legal terms, concepts and even precedents. * Simple strategies for practicing recall so that you are relaxed during exams and can easily recall everything you've studied no matter how difficult. As you probably know, it's getting harder and harder to find the time for learning anything, especially the law. That's why you need a proven plan for increasing your legal knowledge. The good news is it's not hard to improve your approach to learning the law. This second edition of How To Learn And Memorize Legal Terminology ... Using A Memory Palace gives you amazing tools designed to speed up the process and get you solid results. Understand how the method taught in this book works and you'll make advanced strides in how you learn legal terms quickly and in ways that are effective, elegant and fun. Would You Like To Know More? Scroll to the top of the page and select the "buy" button.
english
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Lighting Converter</title> <meta name="description" content="Just drop your file in the box, if there is an availlable converter the download link will be generated."> <meta name="author" content="<NAME> (Sonic)"> <link rel="stylesheet" href="design.css" /> <link rel="icon" href="./favicon.ico" type="image/x-icon"/> <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon"/> <script async src="https://www.googletagmanager.com/gtag/js?id=G-5DFKGYKN3H"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-5DFKGYKN3H'); </script> </head> <body> <h1>Lighting Converter</h1> <h2>Just drop your file in the box, if there is an availlable converter the download link will be generated.</h2> <div id="wrapper"> <div id="fileDropBox"><input type="file" multiple id="fileSelection" /><br/>Drop files here.</div> <script src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script> <script src="./src/utilities.js" type="module"></script> </div> <p id="fileDropBoxMessage"></p> <footer> <p>Availlable converters: <ul> <li>Depence2 to WYSIWYG CSV format (For <a href="https://www.mschoeffmann.com/tools/wyg2gma-converter/">WYG2MA</a>)</li> <li>WYSIWYG to Depence2 (Using MA2 showfile XML format)</li> </ul> </p> </footer> </body> </html>
html
Dollar General Distribution Center is one of the largest employers in Fulton, MO. With the recent Coronavirus or COVID-19 pandemic, this means that it is even more important for them to be responsible when faced with a positive test result within their Distribution Center. With employees commuting from Jefferson City, Columbia, and surrounding areas, a poorly managed outbreak could prove devastating to our community as well as those in surrounding areas. That is why we are reaching out with this petition in an effort to show Dollar General that we will not sit by and allow them to put the health of our friends, loved ones, and communities at risk for monetary profit. Dollar General has not been screening employees appropriately upon entering the building. They take temperatures, but do not do a verbal screening: “have you traveled outside of the state recently? “Have you or someone you know been in contact with someone who has COVID-19?” “Have you had any of the following symptoms...?” Etc. We have all experienced these screening questions when entering a public building- a doctor’s office for example- as a way to help gauge an individuals risk. This is especially important because there is a 14 day incubation period in which individuals may not show symptoms or have a fever. Dollar General is not requiring masks to be worn inside the building. They have left this “optional” for their employees, but in doing so, they are putting everyone in the building at risk. The masks that the general public are wearing do more to protect others from you than they do to protect the actual individual wearing the mask, as they keep respiratory droplets from entering the air or contaminating surfaces. So the people who are concerned for their health and wearing masks are in reality only protecting those around them, and have been left with no way of protecting themselves. Dollar General was made aware of the first positive case of COVID-19 in their building the week of June 28th. As a result, they shut down, but for less than 24 hours- just long enough to sanitize surfaces. They then required that every employee report for their shifts. No additional screening was done when employees returned. No testing was implemented to help identify anyone who may have been infected. Dollar General is convinced that they are doing enough, because they are doing what they are required to do. However, there has now been another confirmed case at the distribution center. If sanitizing surfaces was enough, these two cases would have never happened, because Dollar General has been sanitizing surfaces since the pandemic began. The majority of COVID-19 cases have been from contact with an infected individual, NOT from contaminated surfaces. There has been additional research done that has shown that COVID-19 is not as easily spread from surface contact as we originally thought. The CDC even specifically says on their website that if there is a case of COVID-19 detected in a workplace, there are often asymptomatic or presymptomatic individuals present. The CDC also reccomends screening and TESTING of all employees once a positive case is reported. Dollar General has not done any of this, as it is recommended and not required. This shows that they are only willing to do the bare minimum to protect their employees and members of our community. They are offering no paid leave right those who are concerned for their health or the health of their family members, and have still not implemented testing or furthered their screening processes or given anyone any way to further protect themselves. This is essentially forcing people to work in unsafe conditions, leaving many people scared for their lives and for their families, but unable to act, as no one can afford to go without pay for an extended period of time. Even if someone were to accept the unpaid leave that is offered, it wouldn’t do any good, because Dollar General is refusing to take responsibility for the health of their employees and enforce mask wearing, testing, screening, or anything above and beyond the basic requirements. So really all taking a leave of absence would do is make someone two weeks poorer and then put them right back into the situation they were trying to avoid once they are forced to return to an unsafe work environment where COVID-19 is still spreading due to lack of initiative from the company. We cannot stand by and let Dollar General risk the health of our families, of our community. Sign this petition today to let Dollar General know that enough is enough, and that we demand they take initiative and protect their employees and their families.
english
--- layout: post title: "Leetcode problem: Univalued Binary Tree" tags: [leetcode, 'post'] description: "An easy-level leetcode problem" date: 2019-12-17 --- ## Problem description [Problem on leetcode](https://leetcode.com/problems/univalued-binary-tree/) A binary tree is univalued if every node in the tree has the same value. Return true if and only if the given tree is univalued. ## Intuition We've got to visit all the nodes of this tree and make sure they're the same value. So I'm figuring I can accomplish this with [depth-first search](https://en.wikipedia.org/wiki/Depth-first_search) or [breadth-first search](https://en.wikipedia.org/wiki/Breadth-first_search). Either will get the job done. I'll set the first root value as my value check, since it's easy to grab that to start. Then I can implement DFS or BFS. At each node, I'll check if the value matches the root node's value. If it doesn't, I can return false. If it does, I'll keep on going with the algorithm. If the algorithm completes and I haven't returned false, I'll return true. Here's how I expressed that in JavaScript: ``` var isUnivalTree = function(root) { let val = root.val; let response = true; dfs(root); return response; function dfs(node) { if (node.val !== val) { response = false; return; } if (node.left) { dfs(node.left); } if (node.right) { dfs(node.right); } } }; ``` I chose DFS purely because it's been a few weeks since I last coded it up and wanted aother refresher. Also note I'm using [hoisting](https://scotch.io/tutorials/understanding-hoisting-in-javascript#toc-hoisting-functions) on the function - so I can call `dfs()` above where I've defined it. On my first submission I forgot to actually call it and failed. Classic.
markdown
<reponame>PatUgarte/PatVideo<gh_stars>0 export const setFavorite = (payload) => ({ type: "SET_FAVORITE", payload, }); export const unsetFavorite = (payload) => ({ type: "UNSET_FAVORITE", payload, }); export const submitUser = (payload) => ({ type: "SUBMIT_USER", payload, }); export const toggleLog = (payload) => ({ type: "TOGGLE_LOG", payload, }); export const setPlayingState = (payload) => ({ type: "SET_PLAYING_STATE", payload, }); export const setSearchResult = (payload) => ({ type: "SET_SEARCH_RESULT", payload, });
javascript
// +build integration package m3u8 import ( "io" "os/exec" "testing" ) func TestDownload(t *testing.T) { testCases := []struct { name string md5sum string }{ {"https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8", "3f5ce2b21252a21722ae17f26a90164e"}, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { // getter := nil // &fileGet{} m, err := NewMaster(tc.name, nil) if err != nil { t.Fatal(err) return } p, err := NewPlayList(m.WorstQuality(), nil) if err != nil { t.Fatal(err) return } r, err := p.Download() if err != nil { t.Fatal(err) return } cmd := exec.Command("mplayer", "-cache", "1024", "-") stdin, err := cmd.StdinPipe() if err != nil { t.Fatal(err) return } go func() { if _, err := io.Copy(stdin, r); err != nil { t.Fatalf("Can't pipe to comand: %v", err) stdin.Close() return } stdin.Close() }() err = cmd.Run() if err != nil { t.Errorf("Can't run command: %v", err) return } }) } }
go
New Delhi: A variety of foods, despite being inherently healthy, can be made healthier when fortified. Fortification is the process of enhancing the food's nutritional value by adding vitamins, minerals, and other essential nutrients into a food. However, not all kinds of fortifications are healthy. While some can add to the healthiness of the food, others can lead to digestive discomfort and other health complications. Here are some fortified foods that you must add to your diet: - Orange juice: You know what's better than a glass of good ol' OJ? A glass of fortified OJ. Orange juice can be a source of excessive sugar, artificial flavour, colour, and other additives. These unhealthy aspects can be eliminated through the fortification of orange juice to enhance its fibre, vitamin D, protein, vitamin C, and calcium content. - Eggs: Did you know that eggs can be fortified too? As weird as it may sound, fortification of eggs is done to enhance their omega 3 content. This nutrient can aid cognitive development and growth. As omega 3 is often found in fatty fishes such as sardines, salmon, mackerel, etc, fortifying eggs can help ovo-vegetarians, the term used for vegetarians who eat eggs, fulfil their omega 3 requirements. - Whole grain bread: Bread serves as an excellent breakfast food. From toasts to sandwiches, bread is a flexible ingredient that can be used to prepare a variety of dishes. However, the nuanced use of this ingredient in the kitchen makes it important to choose the right type of bread. Whole-grain bread is fortified with vitamins, folate, and other nutrients to eliminate the regular use of white bread. - Yoghurt: A variety of yoghurt is fortified to enhance vitamin D, calcium, and magnesium content which can help improve bone health. When picking yoghurt, go for the non-flavoured one because flavoured yoghurts can contain excessive sugar and additives which can harm the body. - Whole-grain cereal: Consumption of cereal for breakfast has become a common practice for various people. Despite the pre-existing health benefits of this breakfast choice, its fortification has made it into an even healthier food you can start your day with. Disclaimer: Tips and suggestions mentioned in the article are for general information purposes only and should not be construed as professional medical advice. Always consult your doctor or a dietician before starting any fitness programme or making any changes to your diet.
english
Chairman of the Central Board of Taxes Pramod Chandra Mody gave a “shocking” directive to bury a “sensitive case” and claimed that he had “secured” his position at the top because of a “successful search” action against an Opposition leader. This is the key allegation in an unprecedented complaint against the nation’s top tax administrator by Alka Tyagi, who was Chief Commissioner of Income Tax (Unit 2) in Mumbai when she sent her complaint to Union Finance Minister Nirmala Sitharaman on June 21, less than a month after the new government was sworn in. Tyagi’s nine-page complaint, reviewed by The Indian Express, alleges “tremendous pressure” from Mody. An almost identical complaint has been sent by her to the Prime Minister’s Office, the Central Vigilance Commission and the Cabinet Secretary, sources confirmed. As reported by The Indian Express earlier this month, a break-in was reported by Tyagi in her office and she had submitted a written complaint about this to her senior, Principal Chief Commissioner S K Gupta. Tyagi, an IRS officer of the 1984 batch, has alleged that an old vigilance case against her, which Mody had himself later disposed of and in which she was given an all-clear, was recalled by Mody and is being used as a “weapon of blackmail” to stall her posting. Two months after this complaint, the government extended Mody’s tenure for a year. And on Thursday, Tyagi herself, due for a posting as Principal Chief Commissioner of Income Tax, was moved out to the National Academy of Direct Taxes in Nagpur as Principal Director General of Income Tax (training). In her complaint, Tyagi alleged Mody has “admitted” to her that “a successful search supervised by him in the case of an opposition leader, firmly secured him in his position as chairman (CBDT) and (that). he could take unfettered action against some officers too”. According to the complaint, Mody gave instructions that “there should be no record maintained of the fact that he was in any manner, involved in this sensitive case (which Mody asked to close) even for consultations and that it should be ensured that nothing in this file should ever show his linkage, in any manner to this case”. Tyagi has also said that the chairman put “tremendous pressure” on her “to close this file at any cost”. She has detailed how “initial notices” in the case were filed and prior to that, “it was a herculean task to convince him (the Chairman) that once such information was received, the initiation of the action was mandatory, failing which the careers of the dealing officers would be jeopardised, probably resulting in vigilance proceedings being initiated against them. Even after this, Mr P C Mody directed that the draft of the notices would be approved by him. Here again, he failed to accord approval till the very end, despite being aware that he was jeopardising our careers”. Among the assessment cases being handled by Tyagi’s office are the Deepak Kochhar-ICICI Bank case, notices sent to members of Mukesh Ambani’s family under the Black Money Act, the Jet Airways case, besides several important search cases. In her letter to the Finance Minister, Tyagi said she had “never dreamt” of revealing such details but did so because of the “manipulative and unscrupulous” nature of the functioning of the CBDT chairman. Once, Tyagi alleged, Mody called her for a meeting at around 8. 45/9 pm in his office in North Block. She has written in her complaint that she ignored the request. Tyagi has spent 11 years of her career outside the Income Tax Department – as western zone director of the Narcotics Control Bureau and Chairman and Managing Director of the state-owned Hindustan Diamond Co. Her complaint details a pending vigilance inquiry pertaining to banking transactions linked to her family. She stated that her husband, V Raman Kumar, is a non-resident businessman and a former IRS official. In 2012, Kumar sold his Nasdaq-listed firm, Mmodal. The vigilance matter began with a 2016 enquiry by the Enforcement Directorate (ED) into “some large transactions” in banks accounts of her family members wherein she was a signatory. According to Tyagi’s complaint, after a detailed verification, the ED did not find any forex violations and referred the case to the tax department for further enquiry. Subsequently, the then CBDT member ( investigation) conducted an “exhaustive” enquiry and found that all credits and debits handled by her were “accounted for” and that “the entire taxable income arising from these transactions had been offered for tax” by her family members. The complaint notes that since Tyagi is a government officer, the case was referred to the CBI which found no violation by her. Subsequently, the CBI referred the case to the cadre controlling authority of CBDT to see if there was any procedural violation by Tyagi in disclosing these transactions. However, that report too did not find any deficiencies and her vigilance file was put up for closure in 2018.
english
<gh_stars>1-10 import { MalformedVerifiedContentError } from '../verified-content.errors' import { getCpVerifiedContent, getSpVerifiedContent, } from '../verified-content.utils' describe('verified-content.utils', () => { describe('getSpVerifiedContent', () => { it('should successfully create SpVerifiedContent', async () => { // Arrange const correctDataWithExtra = { uinFin: 'something', extraData: 'extra', } // Act const actualResult = getSpVerifiedContent(correctDataWithExtra) // Assert expect(actualResult._unsafeUnwrap()).toEqual({ uinFin: correctDataWithExtra.uinFin, }) }) it('should return MalformedVerifiedContentError on invalid shape', async () => { // Arrange const incorrectData = { incorrect: 'something', extraData: 'extra', } // Act const actualResult = getSpVerifiedContent(incorrectData) // Assert expect(actualResult._unsafeUnwrapErr()).toEqual( new MalformedVerifiedContentError(), ) }) }) describe('getCpVerifiedContent', () => { it('should successfully create CpVerifiedContent', async () => { // Arrange const correctDataWithExtra = { uinFin: 'something', userInfo: 'another', extraData: 'extra', } // Act const actualResult = getCpVerifiedContent(correctDataWithExtra) // Assert expect(actualResult._unsafeUnwrap()).toEqual({ cpUen: correctDataWithExtra.uinFin, cpUid: correctDataWithExtra.userInfo, }) }) it('should return MalformedVerifiedContentError on partial shape', async () => { // Arrange // Has uinFin but not userInfo key const partialData = { uinFin: 'some uinFin', extraData: 'extra', } // Act const actualResult = getCpVerifiedContent(partialData) // Assert expect(actualResult._unsafeUnwrapErr()).toEqual( new MalformedVerifiedContentError(), ) }) it('should return MalformedVerifiedContentError on invalid shape', async () => { // Arrange const incorrectData = { incorrect: 'something', extraData: 'extra', } // Act const actualResult = getCpVerifiedContent(incorrectData) // Assert expect(actualResult._unsafeUnwrapErr()).toEqual( new MalformedVerifiedContentError(), ) }) }) })
typescript
/* eslint-disable no-unused-expressions */ 'use strict' const { expect } = require('chai') const init = require('../../../helpers/util/init') const { createSingle, createMultiple, createProvider } = require('../../../../lib/handlers/createHandlers') const { removeSingle, removeMultiple } = require('../../../../lib/handlers/removeHandlers') const { errors: ARANGO_ERRORS } = require('@arangodb') describe('Create Handlers', () => { before(init.setup) after(init.teardown) it('should create a single vertex', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const body = { k1: 'v1', src: `${__filename}:should create a single vertex` } const node = createSingle( { pathParams, body }, { returnNew: true } ) expect(node).to.be.an.instanceOf(Object) expect(node).to.have.property('_id') expect(node).to.have.property('_key') expect(node).to.have.property('_rev') expect(node.new).to.be.an.instanceOf(Object) expect(node.new._id).to.equal(node._id) expect(node.new._key).to.equal(node._key) expect(node.new._rev).to.equal(node._rev) expect(node.new.k1).to.equal('v1') expect(node.old).to.be.empty }) it('should create two vertices', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const body = [ { k1: 'v1', src: `${__filename}:should create two vertices` }, { k1: 'v1', src: `${__filename}:should create two vertices` } ] const nodes = createMultiple( { pathParams, body }, { returnNew: true } ) expect(nodes).to.be.an.instanceOf(Array) expect(nodes).to.have.lengthOf(2) nodes.forEach(node => { expect(node).to.be.an.instanceOf(Object) expect(node).to.have.property('_id') expect(node).to.have.property('_key') expect(node).to.have.property('_rev') expect(node.new).to.be.an.instanceOf(Object) expect(node.new._id).to.equal(node._id) expect(node.new._key).to.equal(node._key) expect(node.new._rev).to.equal(node._rev) expect(node.new.k1).to.equal('v1') expect(node.old).to.be.empty }) }) it('should create a single edge', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const vbody = [ { k1: 'v1', src: `${__filename}:should create a single edge` }, { k1: 'v1', src: `${__filename}:should create a single edge` } ] const vnodes = createMultiple({ pathParams, body: vbody }) const ebody = { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should create a single edge` } pathParams.collection = init.TEST_DATA_COLLECTIONS.edge const enode = createSingle( { pathParams, body: ebody }, { returnNew: true } ) expect(enode).to.be.an.instanceOf(Object) expect(enode).to.have.property('_id') expect(enode).to.have.property('_key') expect(enode).to.have.property('_rev') expect(enode.new).to.be.an.instanceOf(Object) expect(enode.new._id).to.equal(enode._id) expect(enode.new._key).to.equal(enode._key) expect(enode.new._rev).to.equal(enode._rev) expect(enode.new._from).to.equal(vnodes[0]._id) expect(enode.new._to).to.equal(vnodes[1]._id) expect(enode.new.k1).to.equal('v1') expect(enode.old).to.be.empty }) it('should create two edges', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const vbody = [ { k1: 'v1', src: `${__filename}:should create two edges` }, { k1: 'v1', src: `${__filename}:should create two edges` } ] const vnodes = createMultiple({ pathParams, body: vbody }) const ebody = [ { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should create two edges` }, { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should create two edges` } ] pathParams.collection = init.TEST_DATA_COLLECTIONS.edge const enodes = createMultiple( { pathParams, body: ebody }, { returnNew: true } ) expect(enodes).to.be.an.instanceOf(Array) expect(enodes).to.have.lengthOf(2) enodes.forEach(enode => { expect(enode).to.be.an.instanceOf(Object) expect(enode).to.have.property('_id') expect(enode).to.have.property('_key') expect(enode).to.have.property('_rev') expect(enode.new).to.be.an.instanceOf(Object) expect(enode.new._id).to.equal(enode._id) expect(enode.new._key).to.equal(enode._key) expect(enode.new._rev).to.equal(enode._rev) expect(enode.new._from).to.equal(vnodes[0]._id) expect(enode.new._to).to.equal(vnodes[1]._id) expect(enode.new.k1).to.equal('v1') expect(enode.old).to.be.empty }) }) it('should fail when creating a vertex with existing key', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const body = { k1: 'v1', src: `${__filename}:should fail when creating a vertex with existing key` } const node = createSingle({ pathParams, body }) expect(() => createSingle({ pathParams, body: node }) ) .to.throw() .with.property('errorNum', ARANGO_ERRORS.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED.code) }) it('should fail when creating a vertex with the same key as a deleted vertex', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const body = { k1: 'v1', src: `${__filename}:should fail when creating a vertex with the same key as a deleted vertex` } const node = createSingle({ pathParams, body }) removeSingle({ pathParams, body: node }) expect(() => createSingle({ pathParams, body: node }) ).to.throw(`Event log found for node with _id: ${node._id}`) }) it('should fail when creating two vertices with existing key', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const body = [ { k1: 'v1', src: `${__filename}:should fail when creating two vertices with existing key` }, { k1: 'v1', src: `${__filename}:should fail when creating two vertices with existing key` } ] let nodes = createMultiple({ pathParams, body }) nodes = createMultiple({ pathParams, body: nodes }) expect(nodes).to.be.an.instanceOf(Array) nodes.forEach(node => { expect(node).to.be.an.instanceOf(Object) expect(node.errorNum).to.equal( ARANGO_ERRORS.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED.code ) expect(node.errorMessage).to.include( ARANGO_ERRORS.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED.message ) }) }) it('should fail when creating two vertices with the same keys as deleted vertices', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const body = [ { k1: 'v1', src: `${__filename}:should fail when creating two vertices with the same keys as deleted vertices` }, { k1: 'v1', src: `${__filename}:should fail when creating two vertices with the same keys as deleted vertices` } ] const nodes = createMultiple({ pathParams, body }) removeMultiple({ pathParams, body: nodes }) const cnodes = createMultiple({ pathParams, body: nodes }) expect(cnodes).to.be.an.instanceOf(Array) cnodes.forEach((node, idx) => { expect(node).to.be.an.instanceOf(Error) expect(node.message).to.include( `Event log found for node with _id: ${nodes[idx]._id}` ) }) }) it('should fail when creating an edge with existing key', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const vbody = [ { k1: 'v1', src: `${__filename}:should fail when creating an edge with existing key` }, { k1: 'v1', src: `${__filename}:should fail when creating an edge with existing key` } ] const vnodes = createMultiple({ pathParams, body: vbody }) const ebody = { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should fail when creating an edge with existing key` } pathParams.collection = init.TEST_DATA_COLLECTIONS.edge const enode = createSingle({ pathParams, body: ebody }, { returnNew: true }) .new expect(() => createSingle({ pathParams, body: enode }) ) .to.throw() .with.property('errorNum', ARANGO_ERRORS.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED.code) }) it('should fail when creating an edge with the same key as a deleted edge', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const vbody = [ { k1: 'v1', src: `${__filename}:should fail when creating an edge with the same key as a deleted edge` }, { k1: 'v1', src: `${__filename}:should fail when creating an edge with the same key as a deleted edge` } ] const vnodes = createMultiple({ pathParams, body: vbody }) const ebody = { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should fail when creating an edge with the same key as a deleted edge` } pathParams.collection = init.TEST_DATA_COLLECTIONS.edge const enode = createSingle({ pathParams, body: ebody }, { returnNew: true }) .new removeSingle({ pathParams, body: enode }) expect(() => createSingle({ pathParams, body: enode }) ).to.throw(`Event log found for node with _id: ${enode._id}`) }) it('should fail when creating two edges with existing key', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const vbody = [ { k1: 'v1', src: `${__filename}:should fail when creating two edges with existing key` }, { k1: 'v1', src: `${__filename}:should fail when creating two edges with existing key` } ] const vnodes = createMultiple({ pathParams, body: vbody }) const ebody = [ { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should fail when creating two edges with existing key` }, { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should fail when creating two edges with existing key` } ] pathParams.collection = init.TEST_DATA_COLLECTIONS.edge let enodes = createMultiple( { pathParams, body: ebody }, { returnNew: true } ) enodes = createMultiple({ pathParams, body: enodes.map(node => node.new) }) expect(enodes).to.be.an.instanceOf(Array) enodes.forEach(node => { expect(node).to.be.an.instanceOf(Object) expect(node.errorNum).to.equal( ARANGO_ERRORS.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED.code ) expect(node.errorMessage).to.include( ARANGO_ERRORS.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED.message ) }) }) it('should fail when creating two edges with the same keys as deleted vertices', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const vbody = [ { k1: 'v1', src: `${__filename}:should fail when creating two edges with the same keys as deleted vertices` }, { k1: 'v1', src: `${__filename}:should fail when creating two edges with the same keys as deleted vertices` } ] const vnodes = createMultiple({ pathParams, body: vbody }) const ebody = [ { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should fail when creating two edges with the same keys as deleted vertices` }, { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should fail when creating two edges with the same keys as deleted vertices` } ] pathParams.collection = init.TEST_DATA_COLLECTIONS.edge const enodes = createMultiple( { pathParams, body: ebody }, { returnNew: true } ) removeMultiple({ pathParams, body: enodes }) const ecnodes = createMultiple({ pathParams, body: enodes.map(node => node.new) }) expect(ecnodes).to.be.an.instanceOf(Array) ecnodes.forEach((node, idx) => { expect(node).to.be.an.instanceOf(Error) expect(node.message).to.include( `Event log found for node with _id: ${enodes[idx]._id}` ) }) }) }) describe('Create Provider', () => { before(init.setup) after(init.teardown) it('should create a single vertex', () => { const body = { k1: 'v1', src: `${__filename}:should create a single vertex` } const node = createProvider(init.TEST_DATA_COLLECTIONS.vertex, body, { returnNew: true }) expect(node).to.be.an.instanceOf(Object) expect(node).to.have.property('_id') expect(node).to.have.property('_key') expect(node).to.have.property('_rev') expect(node.new).to.be.an.instanceOf(Object) expect(node.new._id).to.equal(node._id) expect(node.new._key).to.equal(node._key) expect(node.new._rev).to.equal(node._rev) expect(node.new.k1).to.equal('v1') expect(node.old).to.be.empty }) it('should create two vertices', () => { const body = [ { k1: 'v1', src: `${__filename}:should create two vertices` }, { k1: 'v1', src: `${__filename}:should create two vertices` } ] const nodes = createProvider(init.TEST_DATA_COLLECTIONS.vertex, body, { returnNew: true }) expect(nodes).to.be.an.instanceOf(Array) expect(nodes).to.have.lengthOf(2) nodes.forEach(node => { expect(node).to.be.an.instanceOf(Object) expect(node).to.have.property('_id') expect(node).to.have.property('_key') expect(node).to.have.property('_rev') expect(node.new).to.be.an.instanceOf(Object) expect(node.new._id).to.equal(node._id) expect(node.new._key).to.equal(node._key) expect(node.new._rev).to.equal(node._rev) expect(node.new.k1).to.equal('v1') expect(node.old).to.be.empty }) }) it('should create a single edge', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const vbody = [ { k1: 'v1', src: `${__filename}:should create a single edge` }, { k1: 'v1', src: `${__filename}:should create a single edge` } ] const vnodes = createMultiple({ pathParams, body: vbody }) const ebody = { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should create a single edge` } pathParams.collection = init.TEST_DATA_COLLECTIONS.edge const enode = createProvider(init.TEST_DATA_COLLECTIONS.edge, ebody, { returnNew: true }) expect(enode).to.be.an.instanceOf(Object) expect(enode).to.have.property('_id') expect(enode).to.have.property('_key') expect(enode).to.have.property('_rev') expect(enode.new).to.be.an.instanceOf(Object) expect(enode.new._id).to.equal(enode._id) expect(enode.new._key).to.equal(enode._key) expect(enode.new._rev).to.equal(enode._rev) expect(enode.new._from).to.equal(vnodes[0]._id) expect(enode.new._to).to.equal(vnodes[1]._id) expect(enode.new.k1).to.equal('v1') expect(enode.old).to.be.empty }) it('should create two edges', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const vbody = [ { k1: 'v1', src: `${__filename}:should create two edges` }, { k1: 'v1', src: `${__filename}:should create two edges` } ] const vnodes = createMultiple({ pathParams, body: vbody }) const ebody = [ { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should create two edges` }, { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should create two edges` } ] pathParams.collection = init.TEST_DATA_COLLECTIONS.edge const enodes = createProvider(init.TEST_DATA_COLLECTIONS.edge, ebody, { returnNew: true }) expect(enodes).to.be.an.instanceOf(Array) expect(enodes).to.have.lengthOf(2) enodes.forEach(enode => { expect(enode).to.be.an.instanceOf(Object) expect(enode).to.have.property('_id') expect(enode).to.have.property('_key') expect(enode).to.have.property('_rev') expect(enode.new).to.be.an.instanceOf(Object) expect(enode.new._id).to.equal(enode._id) expect(enode.new._key).to.equal(enode._key) expect(enode.new._rev).to.equal(enode._rev) expect(enode.new._from).to.equal(vnodes[0]._id) expect(enode.new._to).to.equal(vnodes[1]._id) expect(enode.new.k1).to.equal('v1') expect(enode.old).to.be.empty }) }) it('should fail when creating a vertex with existing key', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const body = { k1: 'v1', src: `${__filename}:should fail when creating a vertex with existing key` } const node = createSingle({ pathParams, body }) expect(() => createProvider(init.TEST_DATA_COLLECTIONS.vertex, node)).to.throw().with.property('errorNum', ARANGO_ERRORS.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED.code) }) it('should fail when creating a vertex with the same key as a deleted vertex', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const body = { k1: 'v1', src: `${__filename}:should fail when creating a vertex with the same key as a deleted vertex` } const node = createSingle({ pathParams, body }) removeSingle({ pathParams, body: node }) expect(() => createProvider(init.TEST_DATA_COLLECTIONS.vertex, node)).to.throw( `Event log found for node with _id: ${node._id}`) }) it('should fail when creating two vertices with existing key', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const body = [ { k1: 'v1', src: `${__filename}:should fail when creating two vertices with existing key` }, { k1: 'v1', src: `${__filename}:should fail when creating two vertices with existing key` } ] let nodes = createMultiple({ pathParams, body }) nodes = createProvider(init.TEST_DATA_COLLECTIONS.vertex, nodes) expect(nodes).to.be.an.instanceOf(Array) nodes.forEach(node => { expect(node).to.be.an.instanceOf(Object) expect(node.errorNum).to.equal( ARANGO_ERRORS.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED.code ) expect(node.errorMessage).to.include( ARANGO_ERRORS.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED.message ) }) }) it('should fail when creating two vertices with the same keys as deleted vertices', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const body = [ { k1: 'v1', src: `${__filename}:should fail when creating two vertices with the same keys as deleted vertices` }, { k1: 'v1', src: `${__filename}:should fail when creating two vertices with the same keys as deleted vertices` } ] const nodes = createMultiple({ pathParams, body }) removeMultiple({ pathParams, body: nodes }) const cnodes = createProvider(init.TEST_DATA_COLLECTIONS.vertex, nodes) expect(cnodes).to.be.an.instanceOf(Array) cnodes.forEach((node, idx) => { expect(node).to.be.an.instanceOf(Error) expect(node.message).to.include( `Event log found for node with _id: ${nodes[idx]._id}` ) }) }) it('should fail when creating an edge with existing key', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const vbody = [ { k1: 'v1', src: `${__filename}:should fail when creating an edge with existing key` }, { k1: 'v1', src: `${__filename}:should fail when creating an edge with existing key` } ] const vnodes = createMultiple({ pathParams, body: vbody }) const ebody = { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should fail when creating an edge with existing key` } pathParams.collection = init.TEST_DATA_COLLECTIONS.edge const enode = createSingle({ pathParams, body: ebody }, { returnNew: true }).new expect(() => createProvider(init.TEST_DATA_COLLECTIONS.edge, enode)).to.throw().with.property('errorNum', ARANGO_ERRORS.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED.code) }) it('should fail when creating an edge with the same key as a deleted edge', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const vbody = [ { k1: 'v1', src: `${__filename}:should fail when creating an edge with the same key as a deleted edge` }, { k1: 'v1', src: `${__filename}:should fail when creating an edge with the same key as a deleted edge` } ] const vnodes = createMultiple({ pathParams, body: vbody }) const ebody = { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should fail when creating an edge with the same key as a deleted edge` } pathParams.collection = init.TEST_DATA_COLLECTIONS.edge const enode = createSingle({ pathParams, body: ebody }, { returnNew: true }) .new removeSingle({ pathParams, body: enode }) expect(() => createProvider(init.TEST_DATA_COLLECTIONS.edge, enode)).to.throw( `Event log found for node with _id: ${enode._id}`) }) it('should fail when creating two edges with existing key', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const vbody = [ { k1: 'v1', src: `${__filename}:should fail when creating two edges with existing key` }, { k1: 'v1', src: `${__filename}:should fail when creating two edges with existing key` } ] const vnodes = createMultiple({ pathParams, body: vbody }) const ebody = [ { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should fail when creating two edges with existing key` }, { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should fail when creating two edges with existing key` } ] pathParams.collection = init.TEST_DATA_COLLECTIONS.edge let enodes = createMultiple( { pathParams, body: ebody }, { returnNew: true } ) enodes = createProvider(init.TEST_DATA_COLLECTIONS.edge, enodes.map(node => node.new)) expect(enodes).to.be.an.instanceOf(Array) enodes.forEach(node => { expect(node).to.be.an.instanceOf(Object) expect(node.errorNum).to.equal( ARANGO_ERRORS.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED.code ) expect(node.errorMessage).to.include( ARANGO_ERRORS.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED.message ) }) }) it('should fail when creating two edges with the same keys as deleted vertices', () => { const pathParams = { collection: init.TEST_DATA_COLLECTIONS.vertex } const vbody = [ { k1: 'v1', src: `${__filename}:should fail when creating two edges with the same keys as deleted vertices` }, { k1: 'v1', src: `${__filename}:should fail when creating two edges with the same keys as deleted vertices` } ] const vnodes = createMultiple({ pathParams, body: vbody }) const ebody = [ { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should fail when creating two edges with the same keys as deleted vertices` }, { _from: vnodes[0]._id, _to: vnodes[1]._id, k1: 'v1', src: `${__filename}:should fail when creating two edges with the same keys as deleted vertices` } ] pathParams.collection = init.TEST_DATA_COLLECTIONS.edge const enodes = createMultiple( { pathParams, body: ebody }, { returnNew: true } ) removeMultiple({ pathParams, body: enodes }) const ecnodes = createProvider(init.TEST_DATA_COLLECTIONS.edge, enodes.map(node => node.new)) expect(ecnodes).to.be.an.instanceOf(Array) ecnodes.forEach((node, idx) => { expect(node).to.be.an.instanceOf(Error) expect(node.message).to.include( `Event log found for node with _id: ${enodes[idx]._id}` ) }) }) })
javascript
Nayanthara presently has many films in her kitty and most of them have her as the solo female lead. The list includes 'Dora', 'Aram' and 'Kolaiyuthir Kalam' in Tamil. Here comes yet another addition. The prestigious Eros International banner has signed up Nayanthara for a film to be directed by debutante Bharath Krishnamachari. In an official statement, Eros has said, "We are delighted to announce our next yet-to-be-titled project with Nayanthara. Bharath Krishnamachari had narrated a script of a life time to Nayanthara and she instantly gave a positive nod for the same. The whole industry is aware of her choice of roles and her rich knowledge of the scripts. Eros always had an inclination to work with her considering her huge screen presence and the opportunity to work with her was seized instantly. And here we are joining together to make a film of massive proportions. The pre-production work is on full swing and we are all set to start the shoot from March 2017. " The Lady Superstar will be apparently playing a journalist, and the film will be predominantly shot abroad. Follow us on Google News and stay updated with the latest!
english
England thrashed minnows Andorra 4-0 at the Wembley in a 2022 FIFA World Cup qualifier. A brace from Jesse Lingard, coupled with goals from Harry Kane (penalty) and Bukayo Saka, got the job done for the Three Lions. Incidentally, England had also won by the same scoreline in their midweek game at Hungary. The hosts were in control for much of the game, with the world's 156th-ranked side looking overmatched against the Euro 2020 finalists. England's persistence paid off in the final quarter when Kane clinically dispatched a penalty before Saka and Lingard also scored. It's a fifth consecutive victory in the FIFA World Cup 2022 qualifiers for England. They are now the only side apart from Denmark and Sweden with a 100% win record in the qualification campaign thus far. On that note, here are the player ratings for England: His second England outing couldn't have been easier, as Johnstone barely had to break a sweat for his clean sheet. His cracking effort against the bar early on was the only notable moment for James, who inexplicably struggled to replicate his Chelsea exploits. A highly dependable figure at the back, Mings laid down a marker with his passes. Discipline, though, wasn't his forte, and his second booking of the campaign means he'll miss England's trip to Poland. The Wolves star was an assured presence at the back for England, distributing the ball superbly. He even attempted an acrobatic effort that sailed narrowly over the bar. It was a good performance from the England full-back at both ends. He defended well, and looked to amp up the attack too, laying two key passes. What a talent Bellingham is! He oozed class with every touch of the ball and conjured a few excellent chances too. With such attitude and determination, the teenager could go places. He rallied his young troops from the front, keeping his side pushing with precise passes. He looked out of depth in midfield, and only felt a semblance of normalcy after switching to his natural habitat in the right-back position. Two goals and one assist - Lingard was the star for England on the night. He demonstrated how lethal he could be when opportunities come his way. England's centre-forward for the day, Bamford blazed one good chance over the bar from close range. That was the only notable moment from the striker all game. It was a toothless performance from him otherwise, despite playing against one of the least formidable teams in the game. Andorra must be sick of the sight of Saka. The Arsenal star gave them a lot of headaches with his speed, intelligent movement and link-up play. He also topped that off with a goal too. He came on for what he was brought on for - score a goal - which he did from the penalty spot with nonchalance. It was another mediocre performance from the new Manchester City man, who only laid four long balls for England. He fought hard for the ball, winning all four of his ground duels, but struggled to make any meaningful impact.
english
{"type":"Feature","id":"node/5928449475","properties":{"amenity":"vending_machine","man_made":"surveillance","name":"EI de Vallei","payment:cash":"yes","payment:coins":"yes","surveillance:type":"camera","vending":"eggs;potatoes","id":"node/5928449475"},"geometry":{"type":"Point","coordinates":[5.4541084,52.1464104]}}
json
<reponame>Snurr-Games/Nonogram-Maker<filename>package.json { "name": "nonogram-maker", "version": "1.0.3", "description": "", "private": true, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "dev": "npx parcel src/index.html --out-dir dev", "build": "npx parcel build src/index.html --no-source-maps --out-dir ." }, "keywords": [ "nonogram" ], "author": "Kniffen", "license": "MIT", "devDependencies": { "parcel-bundler": "^1.12.5" } }
json
The Internet is a wondrous thing which has enabled us to communicate with persons across the world in an instant. It is something that has been so widely adopted that it has become an integral part of our lives. I’m sure many of us out there wonder how they would ever survive without an internet connection in this age. But what exactly is the Internet? When we hear the term internet we automatically think of the World Wide Web and sometimes use the two terms interchangeably. But are they the same thing and is it correct to use the two terms interchangeably? In this article, we will explore the answers to these questions. Basically, the Internet is a system of networks connected together across the globe which you can gain access to via an Internet Service Provider. This colossal system of networks relies on the Transmission Control Protocol/Internet Protocol suite in order to support data transfer as well as other related protocols and gives us access to a variety of other useful services such as the World Wide Web. One of the services that the internet allows us to access is the World Wide Web (WWW). The World Wide Web is a collection of web pages found on the collection of networks that is the internet.Note: The World Wide Web relies on three main technologies which are HTML (Hyper Text Markup Language), HTTP (Hyper Text Transfer Protocol) and URL (Uniform Resource Locator). HTML is the language of web pages. HTTP is the system of instructions that controls the transfer of information on the World Wide Web. A URL specifies the location of a web page on the World Wide Web. The web was originally formulated in order to make the sharing of data from experiments easier between scientists. Today however, it is accessible to everyone who has an internet connection. It allows for the sharing of vast amounts of information on a variety of different topics. The web has had a profound impact on the way we live life. As an example, the invention of search engines and social media have both been enabled by the web and have literally changed the way we access information and interact. The internet is not the World Wide Web. The web is a collection of web pages found on the internet. The internet itself is a collection of networks that has enabled other services such as Internet Relay Chat (IRC) which we have not touched on in this article. The internet paved the way for the web which is quite valuable since it allows access to vast amounts of information which may not have been accessible to many persons otherwise. Both the internet and the World Wide Web are quite significant inventions which have changed the way much of the globe’s population lives their lives. The above article may contain affiliate links which help support Guiding Tech. However, it does not affect our editorial integrity. The content remains unbiased and authentic.
english
The Minister of Defence, Finance and Corporate Affairs Shri Arun Jaitley is embarking on three-day visit from today to Russia with a high level Indian delegation, to co-chair two meetings with the Government of the Russian Federation. On June 21, Shri Jaitley will co-chair the first meeting of the India-Russia High Level Committee on Science & Technology with the Deputy Prime Minister of Russia Mr. Dmitry Rogozin. This is a newly established committee to discuss cooperation in high technologies. The meeting will be held on the sidelines of the Technoprom Exhibition in the city of Novosibirsk. The Defence Minister will also address the main Plenary Session of the Technoprom, which is a major annual science, technology and innovation exhibition of Russia. On June 23, the Defence Minister will co-chair the 17th meeting of the India-Russia Inter Governmental Commission on Military-Technical Cooperation in Moscow with his Russian counterpart, General Sergei Shoigu. The meeting will review the entire range of military and military-technical cooperation issues between India and Russia within the framework of the Special and Privileged Strategic Partnership between the two countries.
english
Aloe vera gel is an excellent natural moisturizer that hydrates the skin without leaving it greasy. It has anti-inflammatory properties that can soothe various skin irritations, including rashes, itching, and minor cuts or burns. It also helps to reduce inflammation and redness associated with acne, promoting clearer skin. Aloe vera gel naturally promotes skin regeneration, which can fade scars, blemishes, and dark spots over time. Regular use of aloe vera gel can help reduce the appearance of fine lines, wrinkles, and age spots. Aloe vera gel contains enzymes that gently exfoliate the skin, removing dead skin cells and unclogging pores. Aloe vera gel provides deep hydration and helps to soothe and nourish dry, flaky, or irritated skin. The gel has anti-inflammatory that is beneficial for various skin conditions like eczema, psoriasis, and rosacea. Aloe vera gel has wound-healing properties and can accelerate the healing process of minor cuts, burns, and abrasions.
english
<reponame>armel/DXTrackerProxy<filename>README.md # DXTrackerProxy ## Installation Cloner le projet dans le `/opt` de RRF2. ``` cd /opt git clone https://github.com/armel/DXTrackerProxy.git ``` ## Lignes grises À ajouter dans la crontab de RRF2, via `crontab -e` ``` */2 * * * * /opt/DXTrackerProxy/DXGreyline.py */2 * * * * /opt/DXTrackerProxy/DXSunmap.py ``` > Les images générées sont dispos dans `/var/www/html/ > Le script `DXEarth.py` produit une carte de qualité moyenne. Je ne l'ai pas donc activé, mais il est fonctionnel. ## Sat et Cluster Copier `DXSat.py` et `DXCluster.py` dans `/var/www/RRFBlockIP/back/` That's all.
markdown
<gh_stars>10-100 /* * Copyright (c) 2018 Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.couchbase.client.core.tracing; import com.couchbase.client.core.logging.CouchbaseLogger; import com.couchbase.client.core.logging.CouchbaseLoggerFactory; import com.couchbase.client.core.message.CouchbaseRequest; import com.couchbase.client.core.message.CouchbaseResponse; import com.couchbase.client.core.message.analytics.AnalyticsRequest; import com.couchbase.client.core.message.config.ConfigRequest; import com.couchbase.client.core.message.kv.BinaryRequest; import com.couchbase.client.core.message.kv.BinaryResponse; import com.couchbase.client.core.message.query.QueryRequest; import com.couchbase.client.core.message.search.SearchRequest; import com.couchbase.client.core.message.view.ViewRequest; import io.netty.util.internal.shaded.org.jctools.queues.MpscUnboundedArrayQueue; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Queue; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import static com.couchbase.client.core.tracing.ThresholdLogReporter.SERVICE_ANALYTICS; import static com.couchbase.client.core.tracing.ThresholdLogReporter.SERVICE_FTS; import static com.couchbase.client.core.tracing.ThresholdLogReporter.SERVICE_KV; import static com.couchbase.client.core.tracing.ThresholdLogReporter.SERVICE_N1QL; import static com.couchbase.client.core.tracing.ThresholdLogReporter.SERVICE_VIEW; import static com.couchbase.client.core.utils.DefaultObjectMapper.prettyWriter; import static com.couchbase.client.core.utils.DefaultObjectMapper.writer; /** * The {@link DefaultOrphanResponseReporter} receives requests's of orphan responses * and stores them for aggregation and logging. * * @author <NAME> * @since 1.6.0 */ public class DefaultOrphanResponseReporter implements OrphanResponseReporter { private static final CouchbaseLogger LOGGER = CouchbaseLoggerFactory.getInstance(DefaultOrphanResponseReporter.class); private static final AtomicInteger REPORTER_ID = new AtomicInteger(); private static final long MIN_LOG_INTERVAL = TimeUnit.SECONDS.toNanos(1); private final Queue<CouchbaseResponse> queue; private final long logIntervalNanos; private final int sampleSize; private final boolean pretty; private final Thread worker; private volatile boolean running; public static DefaultOrphanResponseReporter.Builder builder() { return new DefaultOrphanResponseReporter.Builder(); } public static DefaultOrphanResponseReporter disabled() { return builder().logInterval(0, TimeUnit.SECONDS).build(); } public static DefaultOrphanResponseReporter create() { return builder().build(); } /** * Creates the {@link OrphanResponseReporter} using the given config. */ public DefaultOrphanResponseReporter(final Builder builder) { logIntervalNanos = builder.logIntervalUnit.toNanos(builder.logInterval); sampleSize = builder.sampleSize; if (logIntervalNanos > 0 && logIntervalNanos < minLogInterval()) { throw new IllegalArgumentException("The log interval needs to be either 0 or greater than " + MIN_LOG_INTERVAL + " micros"); } queue = new MpscUnboundedArrayQueue<CouchbaseResponse>(builder.spanQueueSize); pretty = builder.pretty; running = true; if (logIntervalNanos > 0) { worker = new Thread(new Worker()); worker.setDaemon(true); worker.start(); } else { worker = null; LOGGER.debug("OrphanResponseLogReporter disabled via config."); } } /** * Returns the minimum log interval. * * This can be overridden by test impls if needed. */ long minLogInterval() { return MIN_LOG_INTERVAL; } /** * Reports the given {@link CouchbaseRequest} as a orphan response. * * @param request the request that shpuld be reported. */ @Override public void report(final CouchbaseResponse request) { if (!queue.offer(request)) { LOGGER.debug("Could not enqueue CouchbaseRequest {} for orphan reporting, discarding.", request); } } /** * Stop the reporter and its associated threads. */ public void shutdown() { running = false; if (worker != null) { worker.interrupt(); } } /** * The builder to configure the {@link DefaultOrphanResponseReporter} */ public static class Builder { private static final long DEFAULT_LOG_INTERVAL = 10; private static final TimeUnit DEFAULT_LOG_INTERVAL_UNIT = TimeUnit.SECONDS; private static final int DEFAULT_SPAN_QUEUE_SIZE = 1024; private static final int DEFAULT_SAMPLE_SIZE = 10; private static final boolean DEFAULT_PRETTY = false; private long logInterval = DEFAULT_LOG_INTERVAL; private TimeUnit logIntervalUnit = DEFAULT_LOG_INTERVAL_UNIT; private int spanQueueSize = DEFAULT_SPAN_QUEUE_SIZE; private int sampleSize = DEFAULT_SAMPLE_SIZE; private boolean pretty = DEFAULT_PRETTY; public DefaultOrphanResponseReporter build() { return new DefaultOrphanResponseReporter(this); } /** * Allows to customize the log interval. if set to 0, disables it. * * @param interval the interval to use. * @param unit the time unit for the interval. * @return this builder for chaining. */ public Builder logInterval(final long interval, final TimeUnit unit) { this.logInterval = interval; this.logIntervalUnit = unit; return this; } /** * Allows to customize the sample size per service. * * @param sampleSize the sample size to set. * @return this builder for chaining. */ public Builder sampleSize(final int sampleSize) { this.sampleSize = sampleSize; return this; } /** * Allows to set the JSON output to pretty, making it more * readable but also more verbose. Helpful during debugging. * * @param pretty set to true, false by default * @return this builder for chaining. */ public Builder pretty(final boolean pretty) { this.pretty = pretty; return this; } } /** * This worker consumes the queue in the given interval and logs what * is needed. */ class Worker implements Runnable { /** * Time this worker spends between check cycles. 100ms should be granular enough * but making it configurable, who knows... */ private final long workerSleepMs = Long.parseLong( System.getProperty("com.couchbase.orphanResponseReporterSleep", "100") ); private final Set<CouchbaseResponse> kvSet = new LinkedHashSet<CouchbaseResponse>(); private final Set<CouchbaseResponse> n1qlSet = new LinkedHashSet<CouchbaseResponse>(); private final Set<CouchbaseResponse> viewSet = new LinkedHashSet<CouchbaseResponse>(); private final Set<CouchbaseResponse> ftsSet = new LinkedHashSet<CouchbaseResponse>(); private final Set<CouchbaseResponse> analyticsSet = new LinkedHashSet<CouchbaseResponse>(); private int kvCount = 0; private int n1qlCount = 0; private int viewCount = 0; private int ftsCount = 0; private int analyticsCount = 0; private long lastLog; private boolean hasWritten; @Override public void run() { Thread.currentThread().setName("cb-orphan-" + REPORTER_ID.incrementAndGet()); while (running) { try { handleOrphanQueue(); Thread.sleep(workerSleepMs); } catch (final InterruptedException ex) { if (!running) { return; } else { Thread.currentThread().interrupt(); } } catch (final Exception ex) { LOGGER.warn("Got exception on orphan response reporter, ignoring.", ex); } } } /** * Helper method which drains the queue, handles the sets and logs if needed. */ private void handleOrphanQueue() { long now = System.nanoTime(); if (now > (lastLog + logIntervalNanos)) { prepareAndLogOrphans(); lastLog = now; } while (true) { CouchbaseResponse response = queue.poll(); if (response == null) { return; } CouchbaseRequest request = response.request(); if (request instanceof BinaryRequest) { updateSet(kvSet, response); kvCount += 1; } else if (request instanceof QueryRequest) { updateSet(n1qlSet, response); n1qlCount += 1; } else if (request instanceof ViewRequest) { updateSet(viewSet, response); viewCount += 1; } else if (request instanceof AnalyticsRequest) { updateSet(analyticsSet, response); analyticsCount += 1; } else if (request instanceof SearchRequest) { updateSet(ftsSet, response); ftsCount += 1; } else { LOGGER.warn("Unknown service in orphan {}", request); } } } /** * Helper method which updates the set with the span and ensures that the sample * size is respected. * * @param set the set to work with. * @param response the response to store. */ private void updateSet(final Set<CouchbaseResponse> set, final CouchbaseResponse response) { if (set.size() < sampleSize) { set.add(response); hasWritten = true; } } /** * Logs the orphan data and resets the sets. */ private void prepareAndLogOrphans() { if (!hasWritten) { return; } hasWritten = false; List<Map<String, Object>> output = new ArrayList<Map<String, Object>>(); if (!kvSet.isEmpty()) { output.add(convertThresholdSet(kvSet, kvCount, SERVICE_KV)); kvSet.clear(); kvCount = 0; } if (!n1qlSet.isEmpty()) { output.add(convertThresholdSet(n1qlSet, n1qlCount, SERVICE_N1QL)); n1qlSet.clear(); n1qlCount = 0; } if (!viewSet.isEmpty()) { output.add(convertThresholdSet(viewSet, viewCount, SERVICE_VIEW)); viewSet.clear(); viewCount = 0; } if (!ftsSet.isEmpty()) { output.add(convertThresholdSet(ftsSet, ftsCount, SERVICE_FTS)); ftsSet.clear(); ftsCount = 0; } if (!analyticsSet.isEmpty()) { output.add(convertThresholdSet(analyticsSet, analyticsCount, SERVICE_ANALYTICS)); analyticsSet.clear(); analyticsCount = 0; } logOrphans(output); } private Map<String, Object> convertThresholdSet(Set<CouchbaseResponse> set, int count, String serviceType) { Map<String, Object> output = new HashMap<String, Object>(); List<Map<String, Object>> top = new ArrayList<Map<String, Object>>(); for (CouchbaseResponse response : set) { HashMap<String, Object> fieldMap = new HashMap<String, Object>(); CouchbaseRequest request = response.request(); if (request != null) { fieldMap.put("s", formatServiceType(request)); putIfNotNull(fieldMap, "i", request.operationId()); putIfNotNull(fieldMap, "b", request.bucket()); putIfNotNull(fieldMap, "c", request.lastLocalId()); putIfNotNull(fieldMap, "l", request.lastLocalSocket()); putIfNotNull(fieldMap, "r", request.lastRemoteSocket()); } if (response instanceof BinaryResponse) { putIfNotNull(fieldMap, "d", ((BinaryResponse) response).serverDuration()); } top.add(fieldMap); } output.put("service", serviceType); output.put("count", count); output.put("top", top); return output; } private void putIfNotNull(final Map<String, Object> map, final String key, final Object value) { if (value != null) { map.put(key, value); } } /** * Helper method to turn the request into the proper string service type. */ private String formatServiceType(final CouchbaseRequest request) { if (request instanceof BinaryRequest) { return ThresholdLogReporter.SERVICE_KV; } else if (request instanceof QueryRequest) { return ThresholdLogReporter.SERVICE_N1QL; } else if (request instanceof ViewRequest) { return ThresholdLogReporter.SERVICE_VIEW; } else if (request instanceof AnalyticsRequest) { return ThresholdLogReporter.SERVICE_ANALYTICS; } else if (request instanceof SearchRequest) { return ThresholdLogReporter.SERVICE_FTS; } else if (request instanceof ConfigRequest) { // Shouldn't be user visible, but just for completeness sake. return "config"; } else { return "unknown"; } } } /** * This method is intended to be overridden in test implementations * to assert against the output. */ void logOrphans(final List<Map<String, Object>> toLog) { try { String result = pretty ? prettyWriter().writeValueAsString(toLog) : writer().writeValueAsString(toLog); LOGGER.warn("Orphan responses observed: {}", result); } catch (Exception ex) { LOGGER.warn("Could not write orphan log.", ex); } } }
java
{"word":"molehill","definition":"A little hillock of earth thrown up by moles working under ground; hence, a very small hill, or an insignificant obstacle or difficulty. Having leapt over such mountains, lie down before a molehill. South."}
json
#include "GA.h" #include "GAPowerUp.h" #include "GACharacter.h" #include "GAAudioManager.h" #include "Net/UnrealNetwork.h" AGAPowerUp::AGAPowerUp(const class FPostConstructInitializeProperties& PCIP) : Super(PCIP) { IsInit = false; IsPowerUpActive = false; EffectRadius = 1000; IsAffectingAll = false; IsAffectingOne = false; // Replicate to Server / Clients bReplicates = true; bAlwaysRelevant = true; PrimaryActorTick.bCanEverTick = true; } void AGAPowerUp::Tick(float DeltaTime){ Super::Tick(DeltaTime); if(!IsInit) InitPowerUp(); ReduceCoolDown(DeltaTime); } void AGAPowerUp::InitPowerUp(){ if (Role == ROLE_Authority){ if (IsRandomPowerUp){ PowerUpType = (TEnumAsByte<EGAPowerUp::Type>) FMath::RandRange(1, 2); } IsInit = true; } } void AGAPowerUp::ReduceCoolDown(float DeltaTime){ if (Role == ROLE_Authority){ if (!IsPowerUpActive){ CurrentCoolDown -= DeltaTime; if (CurrentCoolDown <= 0){ PowerUpFinishedCoolDown(); IsPowerUpActive = true; } } } } void AGAPowerUp::OnRep_IsPowerUpActive(){ if (IsPowerUpActive){ PowerUpFinishedCoolDown(); } else{ PowerUpTaken(); for (TActorIterator<AGAAudioManager> ActorItr(GetWorld()); ActorItr; ++ActorItr){ (*ActorItr)->PowerUpTaken(this); } } } void AGAPowerUp::ReceiveActorBeginOverlap(class AActor* OtherActor){ Super::ReceiveActorBeginOverlap(OtherActor); if (OtherActor->ActorHasTag("Player") && IsPowerUpActive){ ActivatePowerUpEffect(OtherActor); } } void AGAPowerUp::ActivatePowerUpEffect(class AActor* OtherActor){ if (Role < ROLE_Authority){ ServerActivatePowerUpEffect(OtherActor); } else{ if (IsAffectingAll){ for (TActorIterator<AGACharacter> ActorItr(GetWorld()); ActorItr; ++ActorItr){ if (PowerUpType == EGAPowerUp::Type::GAHealthBoost){ ActorItr->HealPlayer(HealAmount); } else { ActorItr->ActivatePowerUp(PowerUpType, EffectDuration); } } } else if (IsAffectingOne){ if (PowerUpType == EGAPowerUp::Type::GAHealthBoost){ ((AGACharacter*)OtherActor)->HealPlayer(HealAmount); } else { ((AGACharacter*)OtherActor)->ActivatePowerUp(PowerUpType, EffectDuration); } } else{ for (TActorIterator<AGACharacter> ActorItr(GetWorld()); ActorItr; ++ActorItr){ if (FVector::Dist(ActorItr->GetActorLocation(), GetActorLocation()) <= EffectRadius){ if (PowerUpType == EGAPowerUp::Type::GAHealthBoost){ ActorItr->HealPlayer(HealAmount); } else { ActorItr->ActivatePowerUp(PowerUpType, EffectDuration); } } } } CurrentCoolDown = CoolDown; IsPowerUpActive = false; PowerUpTaken(); for (TActorIterator<AGAAudioManager> ActorItr(GetWorld()); ActorItr; ++ActorItr){ (*ActorItr)->PowerUpTaken(this); } if (IsRandomPowerUp){ PowerUpType = (TEnumAsByte<EGAPowerUp::Type>) FMath::RandRange(1, 2); } } } bool AGAPowerUp::ServerActivatePowerUpEffect_Validate(class AActor* OtherActor){return true;} void AGAPowerUp::ServerActivatePowerUpEffect_Implementation(class AActor* OtherActor){ActivatePowerUpEffect(OtherActor);} // Replicates Replicated Attributes void AGAPowerUp::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const{ Super::GetLifetimeReplicatedProps(OutLifetimeProps); DOREPLIFETIME(AGAPowerUp, IsAffectingOne); DOREPLIFETIME(AGAPowerUp, IsAffectingAll); DOREPLIFETIME(AGAPowerUp, IsPowerUpActive); DOREPLIFETIME(AGAPowerUp, PowerUpType); DOREPLIFETIME(AGAPowerUp, IsRandomPowerUp); DOREPLIFETIME(AGAPowerUp, HealAmount); DOREPLIFETIME(AGAPowerUp, CoolDown); DOREPLIFETIME(AGAPowerUp, EffectDuration); DOREPLIFETIME(AGAPowerUp, CurrentCoolDown); DOREPLIFETIME(AGAPowerUp, EffectRadius); }
cpp
A lot of amazing engineering and design goes into making your smartphone. And smartphone displays are one of the most important parts — they're your window onto the internet, and the world. But the technical terms we use to describe them can be pretty confusing. Here's how to sound like you know what you're talking about when it comes to displays. If you've ever looked at a spec sheet, you know that exploring the world of mobile displays is like being force fed a choking helping of alphabet soup: OLED, AMOLED, LCD, TFT, TN, IPS, IGZO, RGB, RGBG, etc. Not to mention every company has its own proprietary display technologies and pixel layouts that are, of course, THE BEST. But once you understand the details of what these various acronyms mean, you'll find it's not actually about "best" at all. Looking for the best smartphone screen becomes just a matter of preference, a delicate balance between performance and energy efficiency. The easiest place to start is with OLED (organic light emitting diode) displays and LCDs (liquid crystal displays) because all flagship smartphones today use some version of these two technologies. It's impossible to say if one screen technology is objectively "better" than another, but they both have distinct trade-offs. Ones that can effect the features your phone can offer. You know Moto Display? That feature that serves up text messages and notifications frequently on the lock screen in an outline of black and white? On LCD screens—like the iPhone's—a feature like this would be wildly inadvisable because it would absolutely destroy idle battery life. But it can work on Motorola's AMOLED (active-matrix OLED) displays no problem. Thanks AMOLED! AMOLED and OLED are almost completely interchangeable. "Active matrix" refers to how each pixel is actively addressed by a transistor and capacitor. There is such a thing as PMOLED display (passive matrix), but it's pretty much a dinosaur at this point so we won't worry about it. AMOLED displays and LCDs are powered very differently. LCDs use a backlight that delivers white light (in most cases) to the entire panel. This light passes through polarizing filters and a layer of liquid crystal to produce the image you're seeing. Because this backlight is always on, light is still shining in areas even when backgrounds should be inky blacks. This means no matter what pixels are actually being used, the whole panel is still producing light. Because of this, LCDs tend to be incredibly vibrant and have excellent color reproduction—basically meaning "they do colors good"—but suffer when you're trying to look at the phone from a wide angle. They're also bad at true blacks—instead they look more like a very dark gray because of that always-on backlight. There are ways to mitigate this stuff—like Nokia's ClearBlack technology, which polarizes light differently and makes some other tweaks—but even the best LCD can't best OLEDs when it comes to this stuff. AMOLED displays, on the other hand, use a layer of organic material where each individual pixel is independently powered. This means the display selects what pixels draw power so features like Moto Display don't eat up battery because black pixels are actually, literally off; they're as black as can be and don't draw power doing it. It's this same trick that makes things like Samsung's black-and-white low-power mode work. That's a fantastic feature—especially considering how important battery life is—but these screens come with their own disadvantages as well. Namely production costs. Wherever you read OLED, translate that into $$$. There are also reports of screen burn-in, where an image left on the screen too long actually burns into it. (Remember how you had to use screensavers on old displays? Like that but not as bad.) And since OLEDs are made of organic material, it can also degrade over time. In the case of LCDs, there are a lot of jumble-letter subflavors—primarily TFT (thin-film transistor), IPS (in-plane switching), and TN (twisted nematics). Don't freak out at all the letters just yet: IPS and TN are just two forms of TFT LCDs. IPS is generally the go-to for high-end computers, especially when you need accurate color representation and the best viewing angles. IPS displays are among the best to look at from a super-wide angle like "practically sideways." Which makes them fantastic for things you'll be looking at different viewpoints. Apple's iPhones have used IPS LCD displays since the iPhone 4 and similar ones have been widely adopted by Google, HTC, and LG, and other companies that make Android phones. TN displays, on the other hand, are pretty much out performed by IPS in almost every way except for how much they cost to make, so you're most likely to only see these guys in older/cheaper smartphones. Then there's IGZO. Named for the semiconducting materials its made from (Indium Gallium Zinc Oxygen) IGZO is a technology that works on the something called the backplane, the part of display controlling all the pixels on your screen. It works with both OLED and LCD displays, giving devices better image quality and efficiency. DisplayMate, the go-to resource for absurdly science-y breakdowns on all display tech, says that the iPad Air saw a 57 percent power efficiency bump because of the IGZO LCD backplane. So bottom line, IGZO is generally just a bonus for whatever it's attached to. Samsung is one of the biggest pushers of OLED displays, and according to them, they've moved beyond your standard OLED offering to tech they call Super AMOLED displays, which is simply that the tactile part of the screen is baked into the display tech so it's thinner. Weeeeee. But Samsung backs another specific display technology known as PenTile, which uses a RGBG design instead of the standard RGB. This means that there are more green subpixels—the colored subsections that add up to make one single color-changing pixel—than red or blue. Also, because of a whole ton of really specific mumbo jumbo we wont get into, PenTile displays actually have less sub-pixels on the whole than a tradition display and are often more power efficient. The catch is that these screens have also been knocked for color fringing on icons and looking shittier up close. Other companies have also used Samsung's PenTile layout, including Nokia and HTC, but now almost all, even including Samsung, have pretty much ditched it. Samsung now uses what it calls a Diamond Pixel layout in the Galaxy S4 and S5 that, while still PenTile, resolves a lot of the tech's problems. Now, in the pixel dense displays of today, PenTile or no PenTile is rarely an issue. You may have also been hearing a lot about Quantum Dot displays. Although this tech is, for the most part, reserved for televisions, it could soon make its way to smartphones. Essentially, Quantum Dots try to clean up the backlight on LCD displays, and make the LCD's behave a lot more like OLEDs, in a good way. I won't get too deep into it since this tech hasn't come to phones just yet, but know if QD is present, then you're talking about an LCD display with some OLED-like behaviors underneath such as a wider color gamut, which generally means "a better LCD display." The final piece of vocabulary you've definitely heard of is "Retina." The term Retina is an Apple-branded marketing term that basically translates to "you can't see the pixels from a foot away." Since it's perception based, that makes it a relative term that changes on what device you're talking about. For the iPhone 6 Plus it's 401 PPI whereas the new 5K iMac it's only 218 PPI. Prominent experts have refuted that claim, saying pixel counts should be higher, but basically Retina is Apple saying "this is the highest resolution your eye will recognize, so why go higher?" Which honestly, isn't a terrible question when you get into energy trade-offs with higher resolution displays. Still, the problem with "Retina" is that since it's such a vague term, it's hard to make direct comparisons. In theory that doesn't matter because "Retina" is designed to mean "good enough that getting better doesn't matter" but it's the least concrete of any screen-tech term you're likely to hear. Of course your screen is just one part of your phone, even if it's one of the most important. And how your screen plays with the processor that's pushing the pixels and the battery that's powering them is more important than any screen tech can be on its own. But armed with a basic understanding of the techtalk you can have at least some sense of what you're buying in terms of performance, battery life, and quality next time you are face to face with a spec sheet. Thanks to Jordan Ellenberg, whose amazing book about math, How Not to Be Wrong, inspired the name for the posts in this ongoing series.
english
<filename>data/dndmaps/2021/01/t3_kxfdqv.json { "author": { "id": "t2_3aham3g1", "name": "marcjammy" }, "date": { "day": 1610582400, "full": 1610660142, "month": 1609459200, "week": 1610236800 }, "id": "t3_kxfdqv", "misc": { "postHint": "image" }, "picture": { "filesize": 444861, "fullUrl": "https://preview.redd.it/olceyvev9db61.png?auto=webp&s=663a104d54bc4bac9eda49a00519d97c9ad11667", "hash": "0d9cfbc821", "height": 360, "lqip": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAIAAAC0SDtlAAAACXBIWXMAAAsTAAALEwEAmpwYAAABxElEQVQYlQG5AUb+ACsWAjwuF09GI09HKkRFKUlEIFVUPlhWQ2BfXmFkakpJPmttSX1nQjcmBi9AEj4rJwA3HwU2KhNdXDxqZUNNTyo6Ng9UUihfXEJ6e3x5eXlaWkdUVTVlakQ+SzMkLQgcDAAAJhQCPDIZbHBWbG1XhoRaXl8/ZGEyh4RsfX9+W1lNX2JJVl4+VF45UmM8LT8YJA8CACIaBy0lF0IuHE1JMWVjRnx2Z5iXiZGTinh7d1FRRFJTQ2ZoSWVtRklWLjkmCyYOAQAvIg45NyVgTjJqZUlVU0iTk5CQk5WIjpB/hIJLTEtzd1+GgVVF<KEY> "thumbnailUrl": "https://a.thumbs.redditmedia.com/apeGGNITLR-UPR_A6MhlUHBha0okk8k9K5_lOuvqUN0.jpg", "url": "https://preview.redd.it/olceyvev9db61.png?width=640&crop=smart&auto=webp&s=54bfedbeb734bbc9b1109001b999f1730e64bfba", "width": 640 }, "score": { "comments": 1, "downs": 0, "isCurated": false, "ratio": 1, "ups": 5, "value": 5 }, "subreddit": { "id": "t5_3isai", "name": "dndmaps" }, "tags": ["Encounter"], "title": "Autumn River Creek", "url": "https://www.reddit.com/r/dndmaps/comments/kxfdqv/autumn_river_creek/" }
json
export { JWTOptions } from './jwt-options' export { VerifyOptions } from './verify-options'
typescript
<filename>cmd/cobra.go package cmd import ( "github.com/spf13/cobra" "os" ) var ( // Used for flags. cfgFile string userLicense string rootCmd = &cobra.Command{ Use: "currency", Short: "currency Api server", Long: `start currency Api server`, SilenceUsage: true, DisableAutoGenTag: true, PersistentPreRunE: func(*cobra.Command, []string) error { return nil }, } ) //Execute : run commands func Execute() { if err := rootCmd.Execute(); err != nil { os.Exit(-1) } } func init() { rootCmd.AddCommand(StartCmd) }
go
England will have to go back to the drawing board and reconsider using more spinners, he says. West Indies all-rounder Marlon Samuels questioned England’s bowling tactics in the first Twenty20 International at the Kensington Oval in Bridgetown. The hosts won the match by 27 runs to take a 1-0 lead in the three-match series. “We were surprised that the pitch favoured spin because Bajan pitches are usually known more for their pace but regardless of the pitch and its bounce, we have some pretty good spinners who use the new ball well. I think England will have to go back to the drawing board and reconsider using more spinners,” Samuels was quoted as saying by Cricket365. Samuels scored a quickfire 69 off just 46 balls with the help of 10 boundaries and a six. He produced an all-round show as in the second innings Samuels bagged two for 21 off his four overs to guide his side to a win. “We knew the record of this ground and we wanted to post a total of around 160 or 165. It was good for us to get more than we bargained for. We had a plan and put in an all-round performance and it all came together for us at the end so we have to keep working hard at it and come up with the goods more often than not,” Samuels added. Meanwhile, England captain Stuart Broad has been ruled out of the remainder of the three-match T20 series against the West Indies due to a knee injury.
english
ISIS modules have also been identified and busted in states other than Kerala which indicates that the terrorists do not recognize the borders of states and nations. Muslim consolidation and the division of Hindu votes propelled Congress to the poll position in the recently concluded Karnataka polls. If Bajrang Dal is banned in Karnataka during the Congress rule, Hindus in the state must find an equally effective way to stop cow slaughter and smuggling, fight love jihad, intercept forced conversions, and protect Hindu processions from stone pelting. Anagha Jaigopal and Vishali Shetty described in detail the process of radicalisation, conversion to Islam, and how they were saved. They also put their views about the film The Kerala Story. The first Akshayya HINDU Awards were given to Ashutosh Adoni, Dinesh Joshi and Sneha Joshi, Swati Shilkar, Kumar Panjlar, and Shalutaai Kolhe for their contribution to Hindutva in their respective fields.
english
Hi, my 2b WD 20earx is making some very weird noises recently , guys please take 30 seconds of your time and listen to clip that i have posted to rapidshare(link below) . Hi i have mtnl dna a212 wireless router in perfect working condition,its 6 months old replaced once by mtnl, good news is it comes with unlimited warranty if you or any of your friend is using mtnl connection . Asking price is rs 750. How can i install mac os x on my pc? i have amd athlon x2 250 running windows 7. i have already searched at google but i am not able to get proper tutorial or maybe i am not able to understand it.:???::???: yes i am using an ups..now its working fine from past 13 hrs without any smell...yesterday it was smelling like an burned plastic, maybe faun is right can be spider(not lizard) electrocution 'lol' I dont think there is any point now to take it to service centre. Hello guys last month i got my new rig as suggested by forums members .. thank you guys :smile: 3 fans(coz its on 24/7)
english
package es.tid.rsvp.messages; import java.util.LinkedList; import org.slf4j.Logger; import es.tid.rsvp.RSVPProtocolViolationException; import es.tid.rsvp.constructs.SenderDescriptor; import es.tid.rsvp.constructs.te.SenderDescriptorTE; import es.tid.rsvp.objects.Integrity; import es.tid.rsvp.objects.RSVPHop; import es.tid.rsvp.objects.RSVPHopIPv4; import es.tid.rsvp.objects.RSVPHopIPv6; import es.tid.rsvp.objects.RSVPObject; import es.tid.rsvp.objects.Session; import es.tid.rsvp.objects.SessionIPv4; import es.tid.rsvp.objects.SessionIPv6; import es.tid.rsvp.objects.SessionLSPTunnelIPv4; import org.slf4j.LoggerFactory; /** RFC 2205: RSVP Path Teardown Message. Receipt of a PathTear (path teardown) message deletes matching path state. Matching state must have match the SESSION, SENDER_TEMPLATE, and PHOP objects. In addition, a PathTear message for a multicast session can only match path state for the incoming interface on which the PathTear arrived. If there is no matching path state, a PathTear message should be discarded and not forwarded. PathTear messages are initiated explicitly by senders or by path state timeout in any node, and they travel downstream towards all receivers. A unicast PathTear must not be forwarded if there is path state for the same (session, sender) pair but a different PHOP. Forwarding of multicast PathTear messages is governed by the rules of Section 3.9. A PathTear message must be routed exactly like the corresponding Path message. Therefore, its IP destination address must be the session DestAddress, and its IP source address must be the sender address from the path state being torn down. {@code <PathTear Message> ::= <Common Header> [ <INTEGRITY> ] <SESSION> <RSVP_HOP> [ <sender descriptor> ] <sender descriptor> ::= (see earlier definition)} A PathTear message may include a SENDER_TSPEC or ADSPEC object in its sender descriptor, but these must be ignored. The order requirements are as given earlier for a Path message, but the above order is recommended. Deletion of path state as the result of a PathTear message or a timeout must also adjust related reservation state as required to maintain consistency in the local node. The adjustment depends upon the reservation style. For example, suppose a PathTear deletes the path state for a sender S. If the style specifies explicit sender selection (FF or SE), any reservation with a filter spec matching S should be deleted; if the style has wildcard sender selection (WF), the reservation should be deleted if S is the last sender to the session. These reservation changes should not trigger an immediate Resv refresh message, since the PathTear message has already made the required changes upstream. They should not trigger a ResvErr message, since the result could be to generate a shower of such messages. */ public class RSVPPathTearMessage extends RSVPMessage { /* * RSVP Common Header 0 1 2 3 +-------------+-------------+-------------+-------------+ | Vers | Flags| Msg Type | RSVP Checksum | +-------------+-------------+-------------+-------------+ | Send_TTL | (Reserved) | RSVP Length | +-------------+-------------+-------------+-------------+ The fields in the common header are as follows: Vers: 4 bits Protocol version number. This is version 1. Flags: 4 bits 0x01-0x08: Reserved No flag bits are defined yet. Msg Type: 8 bits 1 = Path 2 = Resv 3 = PathErr 4 = ResvErr 5 = PathTear 6 = ResvTear 7 = ResvConf RSVP Checksum: 16 bits The one's complement of the one's complement sum of the message, with the checksum field replaced by zero for the purpose of computing the checksum. An all-zero value means that no checksum was transmitted. Send_TTL: 8 bits The IP TTL value with which the message was sent. See Section 3.8. RSVP Length: 16 bits The total length of this RSVP message in bytes, including the common header and the variable-length objects that follow. <PathTear Message> ::= <Common Header> [ <INTEGRITY> ] <SESSION> <RSVP_HOP> [ <sender descriptor> ] <sender descriptor> ::= (see earlier definition) */ private Integrity integrity; private Session session; private RSVPHop rsvpHop; private LinkedList<SenderDescriptor> senderDescriptors; /** * Log */ private static final Logger log = LoggerFactory.getLogger("ROADM"); /** * Constructor that has to be used in case of creating a new Path Teardown Message to * be sent. */ public RSVPPathTearMessage(){ vers = 0x01; flags = 0x00; msgType = RSVPMessageTypes.MESSAGE_PATHTEAR; rsvpChecksum = 0xFF; sendTTL = 0x00; reserved = 0x00; length = es.tid.rsvp.messages.RSVPMessageTypes.RSVP_MESSAGE_HEADER_LENGTH; senderDescriptors = new LinkedList<SenderDescriptor>(); log.debug("RSVP Path Teardown Message Created"); } /** * Constructor to be used in case of creating a new Path TearDown message to be decoded * @param bytes bytes * @param length length */ public RSVPPathTearMessage(byte[] bytes, int length){ this.bytes = bytes; this.length = length; senderDescriptors = new LinkedList<SenderDescriptor>(); log.debug("RSVP Path Message Created"); } /** * */ public void encodeHeader() { bytes[0]= (byte)(((vers<<4) &0xF0) | (flags & 0x0F)); bytes[1]= (byte) msgType; bytes[2]= (byte)((rsvpChecksum>>8) & 0xFF); bytes[3]= (byte)(rsvpChecksum & 0xFF); bytes[4]= (byte) sendTTL; bytes[5]= (byte) reserved; bytes[6]= (byte)((length>>8) & 0xFF); bytes[7]= (byte)(length & 0xFF); } /** * */ public void encode() throws RSVPProtocolViolationException { log.debug("Starting RSVP Path TearDown Message encode"); // Obtengo el tama�o de la cabecera comun int commonHeaderSize = es.tid.rsvp.messages.RSVPMessageTypes.RSVP_MESSAGE_HEADER_LENGTH; length=commonHeaderSize; // Obtencion del tama�o completo del mensaje if(integrity != null){ length = length + integrity.getLength(); log.debug("Integrity RSVP Object found"); } if(session != null){ length = length + session.getLength(); log.debug("Session RSVP Object found"); }else{ // Campo Obligatorio, si no existe hay fallo log.error("Session RSVP Object NOT found"); throw new RSVPProtocolViolationException(); } if(rsvpHop != null){ length = length + rsvpHop.getLength(); log.debug("Hop RSVP Object found"); }else{ // Campo Obligatorio, si no existe hay fallo log.error("Hop RSVP Object NOT found"); throw new RSVPProtocolViolationException(); } int sdSize = senderDescriptors.size(); for(int i = 0; i < sdSize; i++){ SenderDescriptor sd = (SenderDescriptor) senderDescriptors.get(i); length = length + sd.getLength(); log.debug("Sender Descriptor RSVP Construct found"); } bytes = new byte[length]; encodeHeader(); int currentIndex = commonHeaderSize; if(integrity != null){ //Campo Opcional integrity.encode(); System.arraycopy(integrity.getBytes(), 0, bytes, currentIndex, integrity.getLength()); currentIndex = currentIndex + integrity.getLength(); } // Campo Obligatorio session.encode(); System.arraycopy(session.getBytes(), 0, bytes, currentIndex, session.getLength()); currentIndex = currentIndex + session.getLength(); // Campo Obligatorio rsvpHop.encode(); System.arraycopy(rsvpHop.getBytes(), 0, bytes, currentIndex, rsvpHop.getLength()); currentIndex = currentIndex + rsvpHop.getLength(); // Lista de Sender Descriptors for(int i = 0; i < sdSize; i++){ SenderDescriptor sd = (SenderDescriptor) senderDescriptors.get(i); try{ sd.encode(); System.arraycopy(sd.getBytes(), 0, bytes, currentIndex, sd.getLength()); currentIndex = currentIndex + sd.getLength(); }catch(RSVPProtocolViolationException e){ log.error("Errors during Sender Descriptor number " + i + " encoding"); } } log.debug("RSVP Path TearDown Message encoding accomplished"); } /** * */ public void decode() throws RSVPProtocolViolationException { decodeHeader(); int offset = RSVPMessageTypes.RSVP_MESSAGE_HEADER_LENGTH; while(offset < length){ // Mientras quede mensaje int classNum = RSVPObject.getClassNum(bytes,offset); if(classNum == 1){ // Session Object int cType = RSVPObject.getcType(bytes,offset); if(cType == 1){ // Session IPv4 session = new SessionIPv4(); session.decode(bytes, offset); offset = offset + session.getLength(); }else if(cType == 2){ // Session IPv6 session = new SessionIPv6(); session.decode(bytes, offset); offset = offset + session.getLength(); }else if(cType == 7){ // LSPTunnelSession IPv4 session = new SessionLSPTunnelIPv4(bytes,offset); session.decode(bytes, offset); offset = offset + session.getLength(); }else{ // Fallo en cType throw new RSVPProtocolViolationException(); } } else if(classNum == 3){ // RSVPHop Object int cType = RSVPObject.getcType(bytes,offset); if(cType == 1){ // RSVPHop IPv4 rsvpHop = new RSVPHopIPv4(); rsvpHop.decode(bytes, offset); offset = offset + rsvpHop.getLength(); }else if(cType == 2){ // RSVPHop IPv6 rsvpHop = new RSVPHopIPv6(); rsvpHop.decode(bytes, offset); offset = offset + rsvpHop.getLength(); }else{ // Fallo en cType throw new RSVPProtocolViolationException(); } } else if(classNum == 4){ // Integrity Object int cType = RSVPObject.getcType(bytes,offset); if(cType == 1){ integrity = new Integrity(); integrity.decode(bytes, offset); offset = offset + integrity.getLength(); }else{ // Fallo en cType throw new RSVPProtocolViolationException(); } } else if(classNum == 11){ // Sender Descriptor Construct int cType = RSVPObject.getcType(bytes,offset); if((cType == 7)||(cType == 8)){ SenderDescriptorTE sd = new SenderDescriptorTE(); sd.decode(bytes, offset); offset = offset + sd.getLength(); this.addSenderDescriptor(sd); }else{ // Fallo en cType throw new RSVPProtocolViolationException(); } } else{ // Fallo en classNum throw new RSVPProtocolViolationException(); } } } /** * * @param senderDescriptor Sender Descriptor */ public void addSenderDescriptor(SenderDescriptor senderDescriptor){ senderDescriptors.add(senderDescriptor); } // Getters & Setters public Integrity getIntegrity() { return integrity; } public void setIntegrity(Integrity integrity) { this.integrity = integrity; } public Session getSession() { return session; } public void setSession(Session session) { this.session = session; } public RSVPHop getRsvpHop() { return rsvpHop; } public void setRsvpHop(RSVPHop rsvpHop) { this.rsvpHop = rsvpHop; } public LinkedList<SenderDescriptor> getSenderDescriptors() { return senderDescriptors; } public void setSenderDescriptors(LinkedList<SenderDescriptor> senderDescriptors) { this.senderDescriptors = senderDescriptors; } }
java
<filename>third_party/blink/renderer/platform/context_lifecycle_notifier.cc // Copyright 2021 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 "third_party/blink/renderer/platform/context_lifecycle_notifier.h" #include "third_party/blink/renderer/platform/bindings/script_forbidden_scope.h" #include "third_party/blink/renderer/platform/context_lifecycle_observer.h" namespace blink { ContextLifecycleNotifier::~ContextLifecycleNotifier() { #if DCHECK_IS_ON() // `NotifyContextDestroyed()` must be called prior to destruction. DCHECK(did_notify_observers_); #endif } void ContextLifecycleNotifier::AddContextLifecycleObserver( ContextLifecycleObserver* observer) { observers_.AddObserver(observer); } void ContextLifecycleNotifier::RemoveContextLifecycleObserver( ContextLifecycleObserver* observer) { DCHECK(observers_.HasObserver(observer)); observers_.RemoveObserver(observer); } void ContextLifecycleNotifier::NotifyContextDestroyed() { ScriptForbiddenScope forbid_script; observers_.ForEachObserver([](ContextLifecycleObserver* observer) { observer->NotifyContextDestroyed(); }); observers_.Clear(); #if DCHECK_IS_ON() did_notify_observers_ = true; #endif } void ContextLifecycleNotifier::Trace(Visitor* visitor) const { visitor->Trace(observers_); } } // namespace blink
cpp
# GenApp Recovery Kits ## Summary The SIOS Steeleye Protection Suite &copy; Generic Application (GenApp) is an entry point into the world of custom Highly Available applications. GenApp is a harness that allows you to interface your application with the SPS framework. Quickly and easily make any application highly available with GenApp! Steeleye Protection Suite (SPS) is an enterprise class application and data high availability supporting single & multi-site clusters leveraging any server and storage environment. More information, including evaluation copies, can be found at http://us.sios.com. ### Purpose * GenApp kits provide a robust harness to protect custom applications * Easily integrate many applications with the SPS solution ### Technologies * Requires the Steeleye Protection Suite installed on all nodes of the cluster. * SPS for Linux is supported on either Red Hat Enterprise Linux (RHEL) or SuSE Linux Enterprise Server (SLES) * Any Scipting language or binary can be used for with the GenApp. All it has to do is be executable and can interact with Linux's send event API. ### Installation * Install SPS for Linux. * Verify your custom application is properly installed and configured for your needs * Write the scripts (or the executables) that will be used to protect your application. * Using the included lkGUIapp or the web based GUI management console, create your GenApp and extend it to all nodes within your cluster. For more information on how to do this visit http://docs.us.sios.com/ * Now your application is Highly Available!
markdown
Actor Alec Baldwin and his family celebrated Halloween days after the recent on-set 'Rust' movie shooting in New Mexico in which the Hollywood star was involved. Alec's wife Hilaria Baldwin recently shared pictures of her family enjoying Halloween on Instagram. The photos come after the on-set shooting that left cinematographer Halyna Hutchins dead and injured director Joel Souza. "Parenting through this has been an intense experience, to say the least. Today, we rallied to give them a holiday. Last min costumes. . . a little hodge-podge. . . but they were so happy and that warmed my mama heart. Happy Halloween, from the Baldwinitos. They give us. We send you," she wrote alongside a series of pictures and videos. In the photos, the family can be seen posing on the porch of their property smiling at the camera as Alec wears a Viking-style outfit together with a long stringy beard. In another, Hilaria is seen matching with her two daughters in black witch-like outfits and spider web fascinators. As per Fox News, the post comes a day after the Baldwins spoke to photographers in Vermont, when Alec said he is cooperating with police and has been speaking to them every day. Alec maintained that he could not speak on the active investigation. "It's an active investigation in terms of a woman died, she was my friend," the actor said. "We were a very, very well-oiled crew shooting a film together, and then this horrible event happened," he added. Alec admitted the fatal shooting on the set is a "one-in-a-trillion event. " "There are incidental accidents on film sets from time to time, but nothing like this," he said. "This is a one in a trillion episode. It's a one in a trillion event. " The actor further said he is "extremely interested" in limiting the use of firearms onset following the fatal incident. In the days after the shooting, Hilaria was spotted driving her husband around a posh ski town. At one point, she could even be seen hiding her head from photographers as the duo tried to keep a low profile amid the investigation into Alec's involvement in the accidental shooting incident. READ ALSO:
english
<reponame>woow-wu7/7-react-admin-ts import React, {Suspense} from 'react' import {Route, Switch} from 'react-router-dom' function renderRoutes(routes: any, extraProps ={}, switchProps = {}) { return routes ? ( <Suspense fallback={<div>loading...</div>}> <Switch {...switchProps}> { routes.map((route: any, index: number) => { const {key, path, exact, strict, render} = route return ( <Route key={key || index} path={path} exact={exact} strict={strict} render={(props) => { return render ? render({...props, ...extraProps, route: route}) : <route.component {...props} {...extraProps} route={route}/> }} /> ) }) } </Switch> </Suspense> ) : null } export default renderRoutes
typescript
Network unveiled new brand identity for Star Sports across 6 channels and renames all ESPN channels. From Nov 3,ESS will begin broadcast of first round of matches all the way up to Final next year. Rupert Murdoch-owned News Corp in June this year had announced the plan to buy out the remaining 50 per cent stake in ESPN Star Sports from ESPN. The Financial Express was first to report the development in its edition dated February 28. This will allow News Corp to operate all ESS businesses while providing ESPN more independence. Deal includes rights to telecast matches live and exclusive on-air,online and on mobile platform.
english
Earlier in March, tech giant Apple announced its grand plans to launch its own premium streaming service called Apple TV+. While the company gave a wide insight into what all content we can expect from the service, it did not give details about the launch period. A new report now suggests that the streaming service will launch in November and will have a monthly fee of $9. 99 (approx. Rs 715). The date might appear to be falling in a competitive slot for Apple as Disney+ is also slated to release on November. The report also suggested that the tech company will offer a free trial, just like Netflix, so that the consumer can get a taste of the services before fully committing to it. The service is expected to launch with shows like The Morning Show, Amazing Stories, See, Truth Be Told and a documentary called Home. Another report published by the Financial Times pointed at the fact that the Cupertino-based company has already spent over $6 billion to produce its original shows. The service will reportedly be available worldwide upon launch in over 150 countries. At its monthly subscription price of $9. 99, the fee might sound a tad-bit higher compared to Amazon Prime or Netflix, which provide basic subscription plan starting $8. 99 (approx. Rs 644) per month and $9 per month, respectively. On the other hand, Dinsey’s upcoming service will be launched at a price of $6. 99 (approx. Rs 500) per month.
english
LLB Full Form is Bachelor of Laws - Know what LLB stands for, meaning, what is LLB, description, example, acronym for, abbreviation, definitions and full name of LLB in the field of Law. LLB full form is Bachelor of Laws in English. In Latin, LLB full form abbreviates to Legum Baccalaureus. LLB is one of the most popular undergraduate degree courses for pursuing a career in Law. Students who wish to become a Lawyer can apply for LLB course after completing 12th from a recognized board in India. Selection of the candidates is based on their grades in class 12th and scores obtained in the LLB entrance exams such as CLAT, DUET, SAT, etc. In this article, students can find LLB full form, course details, eligibility criteria, entrance exam, top 10 colleges in India, salary, etc. The candidates can check out the table below to get an overview of the LLB full form. What is LLB? LLB stands for Bachelor of Laws or also abbreviated as Legum Baccalaureus in Latin. The abbreviation includes two L’s as any abbreviation in plural in Latin is denoted by doubling the first letter. In the case of LLB, the letter L comes twice where L denotes Laws (plural of law). LLB is a 3-year Undergraduate degree or a 5-year Integrated degree in Law (BA LLB). BA LLB stands for Bachelor of Arts + Bachelor of Laws. BA LLB is dual integrated degree in law. Majority of students opt for BA LLB. Students interested in practicing law apply for studying LLB course after completing 12th. Admission to LLB degree is based on performance in the LLB entrance exams such as CLAT, DU LLB, LSAT, AILET, etc. CLAT is the national entrance exam for LLB course in India. Students holding LLB degree must also pass the All India Bar Examination (AIBE) which is administered by the Bar Council Of India (BCI). There are different types of LLB degrees such as BA LLB (Bachelor of Arts + Bachelor of Laws), BBA LLB (Bachelor of Business Administration + Bachelor of Laws), B.Com LLB (Bachelor of Commerce + Bachelor of Laws), B.Sc LLB (Bachelor of Science + Bachelor of Laws), BCA LLB (Bachelor of Computer Applications + Bachelor of Laws), B.Tech LLB (Bachelor of Technology + Bachelor of Laws). Candidates are interested in pursuing LLB degree must meet the following eligibility criteria: There is no prescribed age limit to write the LLB entrance examination. Candidate should have qualified class 10+2 exam with at least 45% marks from a recognised board. Students can check below different types of LLB courses, their duration and fees below: The selection process for admission to the LLB degree is based on grades in 10+2 examination and performance in the LLB entrance exams. Final scores in the LLB entrance exam for admission to LLB colleges/universities is the basis for selection for further process. After the release of the scores of the entrance exam, candidates are shortlisted for the counselling round. CLAT (Common Law Admission Test) is the national entrance exam for admission to 22 participating national law colleges or universities offering LLB degree. For undergraduate CLAT, students must have passed class 12th qualified class 10+2 exam with at least 45% marks from a recognised board. For Post Graduate CLAT, students must have passed graduation in LLB (3-year or 5-year) from a recognized university with at least 50% marks (40% marks for ST/SC) in the qualifying exam. CLAT (Common Law Admission Test) AILET (All India Law Entrance Test) LSAT (Law School Admission Test) DUET (Law) KLEE (Kerala LLB Entrance Exam) Commissioner for Entrance Examinations (CEE) One can pursue either the three-year or the five-year Integrated LLB course from the respective colleges. These colleges are ranked by NIRF based on their infrastructure and top faculties. National Law School of India University (NLSIU) National Law University (NLU) Candidates who qualify for the LLB course will be required to write the AIBE examination. Qualifying for this exam will make the candidate eligible to become an Advocate and practice in lower or higher courts. The salary package for an Advocate after qualifying for the course is going to be Rs 5 to 6 LPA. Additionally, one can also enroll to become a corporate lawyer. These lawyers will be required to work under a law firm and provide their services for the corporate sector. The salary package for the corporate lawyer shall range between Rs 8 to 10 LPA. Jobs and career opportunities after completing LLB degree include Lawyer, Criminal Lawyer, Civil Lawyer, Cyber Lawyer, Family Lawyer, Real Estate Lawyer, Human Rights Lawyer, Notary, Legal Journalist, Immigration Lawyer, Paralegal, etc.
english
<filename>packages/omgx/contracts/deploy/000-Messenger.deploy.ts<gh_stars>10-100 import { getContractFactory } from '@eth-optimism/contracts' import { DeployFunction, DeploymentSubmission } from 'hardhat-deploy/dist/types' import { Contract, ContractFactory} from 'ethers' import chalk from 'chalk'; require('dotenv').config() import L1_MessengerJson from '../artifacts/contracts/OVM_L1CrossDomainMessengerFast.sol/OVM_L1CrossDomainMessengerFast.json' let Factory__L1_Messenger: ContractFactory let L1_Messenger: Contract const deployFn: DeployFunction = async (hre) => { const addressManager = getContractFactory('Lib_AddressManager') .connect((hre as any).deployConfig.deployer_l1) .attach(process.env.ADDRESS_MANAGER_ADDRESS) as any Factory__L1_Messenger = new ContractFactory( L1_MessengerJson.abi, L1_MessengerJson.bytecode, (hre as any).deployConfig.deployer_l1 ) L1_Messenger = await Factory__L1_Messenger.deploy() await L1_Messenger.deployTransaction.wait() const L1_MessengerDeploymentSubmission: DeploymentSubmission = { ...L1_Messenger, receipt: L1_Messenger.receipt, address: L1_Messenger.address, abi: L1_MessengerJson.abi, }; await hre.deployments.save('OVM_L1CrossDomainMessengerFast', L1_MessengerDeploymentSubmission) console.log(`🌕 ${chalk.red('L1_CrossDomainMessenger_Fast deployed to:')} ${chalk.green(L1_Messenger.address)}`) const L1_Messenger_Deployed = await Factory__L1_Messenger.attach(L1_Messenger.address) // initialize with address_manager const L1MessagerTX = await L1_Messenger_Deployed.initialize( addressManager.address ) await L1MessagerTX.wait() console.log(`⭐️ ${chalk.blue('Fast L1 Messager initialized:')} ${chalk.green(L1MessagerTX.hash)}`) //this will fail for non deployer account const L1MessagerTXreg = await addressManager.setAddress( 'OVM_L1CrossDomainMessengerFast', L1_Messenger.address ) await L1MessagerTXreg.wait() console.log(`⭐️ ${chalk.blue('Fast L1 Messager registered:')} ${chalk.green(L1MessagerTXreg.hash)}`) } deployFn.tags = ['FastMessenger', 'required'] export default deployFn
typescript
Where the ruling TDP has made it clear that it will not participate in the bandh called by the opposition parties in Andhra Pradesh, though they have mentioned that they stand by the demand, the YSRCP has been taking the bandh very seriously. To go ahead with their agenda, the party has also appointed special observers for the bandh which will be held all over the state on August 29, which incidentally happens to be Raksha Bandhan. The observers will be responsible for ensuring that the bandh is total and successful. Another interesting fact is that the party has appointed some senior leaders for the job and these include – Babynayana from Srikakulam, Dharmana Krishnadasu from Vijayanagaram, Vijayasai Reddy from Vizag, Dharmana Prasada Rao from East Godavari, Pilli Subhash Chandra Bose from West Godavari, Peddireddy Ramachandra Reddy from Krishna district, Botsa Satyanarayana from Guntur, DC Govinda Reddy from Prakasam, YV Subbareddy from Nellore, Ananta Venkatarama Reddy from Kurnool, YS Avinash Reddy, Meruga Nagarjuna and Suresh Babu from Cudappah, Mithun Reddy from Anantapur, P Ravindranath Reddy from Chittoor. It is interesting to note that two extra members have been appointed for Cudappah. The party will hold a meeting of all those assigned with the job on August 18.
english
<filename>c-compiler/rpn.rs fn main(){ let v = rev_polish_notation("a + b * c + (d * e + f)*g"); println!("v is {:?}", v); } fn get_priority(c: &char) -> u8{ // 获取优先级 match c{ '+'|'-' => 1, '*'|'/' => 2, '(' => 0, // 遇到左括号 _ => u8::MAX } } fn rev_polish_notation(expr: &str) -> Vec<char> { let count = expr.len(); let mut stack = Vec::with_capacity(count); let mut output = Vec::with_capacity(count); for c in expr.chars(){ match c{ ' ' => continue, //遇到空字符,跳过 ')' => { // 遇到右括号、从栈中找到左括号为止 while let Some(op) = stack.pop(){ if op == '('{ // 遇到左括号停止弹出 break; }else{ output.push(op); } } }, '(' => { // 左括号直接入栈,只有右括号出现时它才能出栈 stack.push(c); }, '+'|'-'|'*'|'/' => { // 针对+-*/运算,得从栈尾往前一直找到优先级比其低的运算符为止 let cur_prio = get_priority(&c); while let Some(op) = stack.last(){ let prev_prio = get_priority(op); if prev_prio >= cur_prio{ output.push(stack.pop().unwrap()); }else{ break; } } // 将当前符号压入栈中 stack.push(c); }, _ => { // 操作数,直接输出 output.push(c); } }; } // 将栈中剩余元素全部加入到输出队列中 while let Some(op) = stack.pop(){ output.push(op); } output }
rust
Ace writer, Kona Venkat is one man who is wanted by one and all in the industry. He is associated with probably every big budget film in Tollywood. His latest presentation is Shankarabharanam. The film is up for release this week and on this occasion, we caught up with Kona for an exclusive interview. Let’s see what he has to say. Q) Is Shankarabbharanam a remake of Phas Gaya Re Obama ? No ! our film is not a remake. When I watched Phas Gaya Re Obama, I liked the backdrop and the plot of the film. Similarly, I took the basic essence and wrote a different story which suits our Telugu nativity. Q) What is Shankarabharanam all about ? As we all know, Bihar and Uttar Pradesh are very famous for honour killings. Our story is of a boy whose parents run away from Bihar and send their son to sort out their problems. Nikhil plays an NRI who handles these tensions. Q) What is the highlight of the film ? The industry and social media have slammed us with various abuses that I only make similar kind of stories. For the first time, I have tried something new which will be showcased in this film in a complete new avatar with a unique story line. Q) What made you wait so long to change your writing style ? See ! I need to clear certain things here. All the producers who come to us want the same old formula films. Even though we narrate them different stories, they want to play it safe and ask us for these routine scripts. As we have a very good relation with them, we are left with no choice and give them these regular stories. Q) How do you react to the abuses on the social media ? I get very disappointed and feel that it is not entirely my fault. Audience need to even understand the problems within the industry as a lot of money and name is associated with each film. Hopefully, Shankarabharanam will change everything for me. Q) So why don’t you approach stars with these unique ideas ? Our stars are stuck in the trap of fans and image. There are so many things in consideration when we write scripts for them. We cannot go over board and write things which will harm their image. The change is coming slowly and I feel that the biggest of stars are now ready for experiments. Q) What made you choose Nikhil ? For this film, the story should be the hero. As soon as I finished the script, the only name which came to my mind is Nikhil. Even Nikhil has a image of trying new things out with all his films. Once I narrated the script, he immediately said yes and the project was on. Q) What made you showcase Anjali in such a harsh role ? Anjali is generally very talkative and dominating in real life. I decided to tap that nature in the film and set her character in the rustic locales of Bihar. Q) When will you direct your own film ? Probably next year, I will direct my debut film. From now on, I have decided that whenever I write a different story, I myself will direct it. I am done with the routine formula flicks and will present myself in a new way. Q) So, sum up Shankarabharanam for us ? This film is an answer to all those who say Tollywood is stuck in that routine dance and action formula. I am very confident about the film’s success and the audience too will have a different kind of an experience this time around. Articles that might interest you:
english
[{"meeting_cd":"C2502006090610301","committee":"Energy Resources Committee","dttm":"September 6, 2006-10:30A","session":"","bill_name":"","bill_cd":"","position":"","rbnt":false,"self":false,"fullWitnessName":"Interim Charge #6\r","given_name":"Interim Charge #6","sur_name":"","organization":"","error":true},{"meeting_cd":"C2502006090610301","committee":"Energy Resources Committee","dttm":"September 6, 2006-10:30A","session":"","bill_name":"","bill_cd":"","position":"For","rbnt":false,"self":false,"fullWitnessName":"<NAME> (Entergy Nuclear)","given_name":"Jay","sur_name":"Brister","organization":"Entergy Nuclear","error":false},{"meeting_cd":"C2502006090610301","committee":"Energy Resources Committee","dttm":"September 6, 2006-10:30A","session":"","bill_name":"","bill_cd":"","position":"On","rbnt":false,"self":false,"fullWitnessName":"<NAME> (ERCOT)","given_name":"William","sur_name":"Bojorquez","organization":"ERCOT","error":false},{"meeting_cd":"C2502006090610301","committee":"Energy Resources Committee","dttm":"September 6, 2006-10:30A","session":"","bill_name":"","bill_cd":"","position":"On","rbnt":false,"self":false,"fullWitnessName":"<NAME> (NRG Energy, Inc.)","given_name":"Thad","sur_name":"Hill","organization":"NRG Energy, Inc.","error":false},{"meeting_cd":"C2502006090610301","committee":"Energy Resources Committee","dttm":"September 6, 2006-10:30A","session":"","bill_name":"","bill_cd":"","position":"On","rbnt":false,"self":false,"fullWitnessName":"<NAME> (Public Utility Commission of Texas)","given_name":"Paul","sur_name":"Hudson","organization":"Public Utility Commission of Texas","error":false},{"meeting_cd":"C2502006090610301","committee":"Energy Resources Committee","dttm":"September 6, 2006-10:30A","session":"","bill_name":"","bill_cd":"","position":"On","rbnt":false,"self":false,"fullWitnessName":"<NAME> (FPL Group)","given_name":"<NAME>","sur_name":"Jefferson","organization":"FPL Group","error":false}]
json
{ "id": 1001102, "name": "Avoid PLI Procedures & Functions with a very low comment/code ratio (PL1)", "href": "AIP/quality-rules/1001102", "critical": false, "maxWeight": 8, "description": "This rule searches for all the PLI Procedures or Functions having a very low comment/code ratio. PLI procedures or functions should have at least a ratio comment/code > X %\nThe threshold is a parameter and can be changed at will.", "output": "The report lists all the PLI Procedures and PLI Functions with a very low comment/code ratio.\n\nIt provides following information: \n- PLI Procedures and PLC Function full name", "rationale": "Maintainability of the code is facilitated if there is documentation in the code. This rule will ensure there are comments within the Artifact", "remediation": "Document your source code in order to keep a satisfactory comment/code ratio.", "total": "Number of PLI Procedures and Functions", "businessCriteria": [ { "id": 60012, "name": "Changeability", "href": "AIP/business-criteria/60012" }, { "id": 66033, "name": "Documentation", "href": "AIP/business-criteria/66033" }, { "id": 60011, "name": "Transferability", "href": "AIP/business-criteria/60011" } ], "technicalCriteria": [ { "id": 61028, "name": "Documentation - Volume of Comments", "weight": 8, "critical": false } ], "technologies": [ { "id": 1004000, "name": "PLI", "href": "AIP/technologies/1004000" } ], "qualityStandards": [ ] }
json
A cricket fan cries, shouts, dances when his team wins, and gets overtly critical when his team loses. There are a few people who have dedicated their lives to rooting their country from the stands. They are ardent supporters of their cricket team- come what may. Meet Pakistan’s Abdul Jalil, better known as “Chacha Cricket”. He is Pakistan’s most famous spectator, and is the face of their cricket team. It is his passion and commitment as a supporter, which saw Pakistan Cricket Board (PCB) label him as the official mascot of the Pakistan cricket team. He gets a fixed sum from the PCB for supporting the team. Chacha always seems to find a sponsor for his food and stay. In the recently concluded World Twenty20 championships, Chacha stayed in the same hotel as the team. In 1969, Colin Cowdrey’s MCC team had toured Pakistan. That was when Chacha started his journey as a cricket fan. Chacha worked at a forest department in Abu Dhabi. Sharjah hosted its first One Day International in the year 1984. Chacha used to travel from Abu Dhabi to Sharjah to view the matches which featured Pakistan. He was spotted by the television cameras and got noticed there. Chacha’s most favourite moment came during the 1986 Austral-Asia Cup final. Four runs were needed by Pakistan off the final ball. Javed Miandad smashed Chetan Sharma over the deep-midwicket fence for a six. This remains a poignant chapter in the cricketing rivalry of India and Pakistan. Chacha is believed to have distributed sweets that day. A 63-year-old Chacha is not very difficult to spot in the stands, when Pakistan is playing. Look out for the noisiest section of the ground. Go closer, and you will see a man wearing a green salwar-kameez, singing inspirational songs and rhythmically flying the Pakistan flag. Chacha is primarily an entertainer, who earns his bread and butter by entertaining people at wedding ceremonies or in some annual programme of the school. Chaudhary’s journey from being an ordinary citizen to an extra-ordinary cricket fan is interesting. In the winter of 2002, West Indies had toured India. One of the One Day Internationals was scheduled to be played at Jamshedpur. Chaudhary wanted to meet his idol Sachin Tendulkar, and get an autograph from him. He set out for his mission on a bicycle from his home at Muzzafarpur, Bihar. He could not get an autograph, but Chaudhary did not lose hope. Chaudhary realized his dream the next year. Chaudhary was dressed in the same manner as he dresses when he comes to support India. He went on a bicycle till Mumbai and waited outside Tendulkar’s residence. The word had spread that there was an ardent Tendulkar fan waiting outside the batting maestro’s house. The security guards did not let Choudhary enter Tendulkar’s house. Soon however, there was a lot of hoopla outside Tendulkar’s house. Eventually, Tendulkar agreed to meet Chaudhary. Tendulkar gifted Chaudhary a t-shirt, gave him an autograph and also asked him if he was ready to watch matches at stadiums. Tendulkar promised Chaudhary that he would get the tickets for every India match. That brought about an unexpected turn in Chaudhary’s life. He is now the most revered cricket fan in India. When India won the Cricket World Cup in 2011, Tendulkar called Chaudhary inside the dressing room and told him to lift the cup. That remains the most cherished memory for Choudhary. It is interesting to know that Chaudhary has married cricket. He has decided to remain single throughout his life. Whatever little he earns, he spends on travelling to the places where India plays. In 1981, Sri Lanka got their test match status. Their first home test match was at the Paikiasothy Saravanamutthu Stadium, Colombo on the 17th February, 1982 against England. The main pavilion was filled with the dignitaries. Donald Carr, the English Cricket Board (ECB) secretary, was the chief guest on the occasion. Percy entered the main pavilion with a Sri Lankan flag and sang the following: Percy continues: Percy hugged Carr when he stood up. The Sri Lankan president, J. R. Jayewardene, who seldom laughs, burst into fits of laughter after seeing that. My most favourite composition of Percy’s came when Australia toured the island nation in 1992-93. David Boon came into bat minutes before the lunch interval. Percy started with his composition on Boon: He is known to give his honest opinion to the players. There has never been any tinge of diplomacy in whatever Percy has said. Russell Arnold, the Sri Lankan middle-order batsman, was once having a poor run during his tenure with the team. Percy met him during that time, in a practice session. Arnold said: “Uncle, you are now boring.”. Percy replied: “Yes, I’m boring son, because you are not scoring”. In 1972, the Australian Under-19 team toured Sri Lanka. The first of the two three-day games was drawn, and the Sri Lankan team was precariously placed in the second game. Sri Lanka was battling for a draw, and had lost nine wickets. Skipper Asitha Jayaweera and Flavin Aponso (who later played five ODIs for Netherlands!) were batting. Percy invaded the ground to congratulate Jayaweera for his half-century in his attempt to kill time. He was arrested by the police, but was released after four hours. Percy was astonished to see people waiting outside the police station to greet him. Percy asked about what had happened to the match. He was satisfied to know that the match had been drawn. Percy got a lot of coverage in the newspapers the following day. From then onwards, Percy has been a known figure in Sri Lankan cricket. These three cricketing doyens have set a solid benchmark for cricket fans. They have all made some sacrifices or the other. However, it does not bother them. They are always cheering their team, egging them on, and praying for their team’s victory. These gentlemen are no ordinary men, they are SUPERSTARS!
english
import { classToPlain } from 'class-transformer'; export class UnauthorizedError extends Error { public readonly statusCode = 401; constructor(message: string = 'Unauthorized') { super(message); Object.defineProperty(this, 'message', { enumerable: true }); } toJSON() { return classToPlain(this); } }
typescript
With 2020 coming to an end, we give you 7 films that Bollywood delivered and impressed us much. From ludo to Gunjan Saxena, Sir to Taish and Shakuntala Devi, here's a list of films that stood out! This was a terrible year for all, Hindi cinema included. Most of the feature films that were dumped on the OTT platform were sub-standard, if not outright unpalatable. Even some of the films that I liked on first viewing in 2020, turned out to be disappointments on repeat viewing. These include Hitesh Kawalya’s gay love story Shubh Mangal Zyada Savdhan, Meghna Gulzar’s true-life story of an acid-attack survivor, Chhapaak, and Irrfan’s swan-song Angrezi Medium and Sushant Singh Rajput’s farewell film Dil Bechara. Here are the ones that I felt good about at the end of the year. Ludo: Anurag Basu’s comeback film combined endearing craziness with a deep emotional heft. The languorous humour and the self-deprecatory laughs go away into making Ludo the most engaging film of the year. A pity we had to watch it at home. Ludo belongs to the big screen. It is big in plot, emotions, performances, and production value. This time Anurag Basu has done the cinematography himself. He knows exactly which tonal complexion to adopt for every character. They resiliently come out as definitive decisive individuals with massive quirks and eclectic eccentricities. Crazily out of control, these characters are driven deftly into a melee of madness and steered expertly out of the mess by a director who has never been in a better place. Welcome back, Mr Basu. Jagga Jasoos is forgiven. Sir: There is something inherently distasteful and eye-rolling about the idea of a well-to-do eligible single man falling in love with his live-in house-help in a Mumbai highrise. I have to admit I approached Rohena Gera’s feature-film debut with a lot of apprehensions. By the end of the sparse slim and tender tale of forbidden love, I was completely sold over, thanks to the dignity grace restrain, and nurturing unconditional kindness of Ratna, the maidservant who dares to dream. Gera builds the relationship in the domestic environment with subtle gestures of unpunctuated empathy. There is an uncalculated precision in the way the relationship grows. House-help Ratna’s character is written with rare care. In the hands of Tillotama Shome, Ratna becomes someone we know intimately in no time at all. The minutest of gestures speaks volumes of her self-respect. Taish: As I finished watching this lengthy masterpiece for the second time, indeed a masterclass in adroit storytelling with room for every character to breathe even when they are destined to die, I thought not for the first time… what am I doing watching this at home???!!! Taish is a big-screen experience in every sense: big emotions, big egos, big fights, big vendetta, big screams, big silences…This is the kind of internecine vista of continuous bloodshed and vendetta that would end up being no more than an exercise in gratuitous violence in lesser hands. Not Bejoy Nambiar. I’ve watched his work closely and admired it since he started with Shaitaan. Thappad: On second viewing Thappad turned out to be not as exhilarating as Anubhav Sinha’s last work Article 15, but still way ahead of the competition this year (if we can call Imtiaz Ali’s dreadfully dull Love Aaj Kal and Shoojit Sircar’s unbearably obnoxious Gulabo Sitabo competition). Thappad is an important film. It tears at the hypocrisy of the middle-class to show how pathetically short we fall as a collective nation when it comes to basic human rights even within the four walls of private homes. Thappad can either be seen as a powerful parable of women’s empowerment or a scathing ironic indictment of the way that empowerment is subverted. The writing is so sharp it cuts open our collective perception of what cinema about marital imbalance should be. This is Anubhav Sinha’s third important film in a row. I can’t wait to see where he goes next. Gunjan Saxena: It makes its point about a girl breaking into a male domain without shattering any glass ceilings. The transformative spirit animates the inner soul of the plot without standing back to be congratulated. The direction by first-timer Sharan Sharma is equanimous and unwilling to forfeit its composure for cheap thrills. Miraculously the scenes of jets flying across the battle line do not run amok. The CGs are aesthetically done. Manush Nandan’s camera isn’t looking for ways to prettify the frames. The beauty of the scenes lies in the eyes of the beholder, in this case, us. I only wish the narrative had avoided those intermittent songs in the background. This film didn’t need them. It creates a world beautiful in its imperfections. How I missed the applause in a movie theatre when Gunjan Saxena strides across the screen all ready to pilot her destiny into orbit. Jawani Jaan-e-Mann: This film is a whole lot of fun. It’s like a casually but immaculately cut suit designed to fit and flatter the wearer without looking over-tailored. It’s a story that opens its heart to human flaws, an over-sexualized (okay, horny) 40-plus Londoner who thinks life is a bed of….well, just a bed where you ‘sleep’ (actually not a wink) your way through as many women as humanly possible. Going into it, expecting one more film showcasing Saif Ali Khan’s roguish charms, you come away surprised at the walloping punch that this punch-drunk celebration of a midlife crisis brings to the table.
english
/** * <copyright> </copyright> * * $Id$ */ package orgomg.cwmx.resource.imsdatabase; import org.eclipse.emf.common.util.EList; import orgomg.cwm.resource.record.RecordFile; import orgomg.cwmx.resource.imsdatabase.imstypes.AccessMethodType; /** * <!-- begin-user-doc --> A representation of the model object ' * <em><b>DBD</b></em>'. <!-- end-user-doc --> * * <!-- begin-model-doc --> * An instance of this object class represents an IMS Data Base Description, which is the Root entity for a DBD object. * * DBDs describe the organization of data and the pathways by which an application program can retrieve or store Records. A Record within a DBD is called a Segment. Segments are connected by parent-child relationships to create the information hierarchy. * <!-- end-model-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link orgomg.cwmx.resource.imsdatabase.DBD#getDliAccess <em>Dli Access</em>}</li> * <li>{@link orgomg.cwmx.resource.imsdatabase.DBD#isIsVSAM <em>Is VSAM</em>}</li> * <li>{@link orgomg.cwmx.resource.imsdatabase.DBD#isPasswordFlag <em>Password Flag</em>}</li> * <li>{@link orgomg.cwmx.resource.imsdatabase.DBD#getVersionString <em>Version String</em>}</li> * <li>{@link orgomg.cwmx.resource.imsdatabase.DBD#getAccessMethod <em>Access Method</em>}</li> * <li>{@link orgomg.cwmx.resource.imsdatabase.DBD#getAcblib <em>Acblib</em>}</li> * <li>{@link orgomg.cwmx.resource.imsdatabase.DBD#getDataset <em>Dataset</em>}</li> * <li>{@link orgomg.cwmx.resource.imsdatabase.DBD#getSegment <em>Segment</em>}</li> * <li>{@link orgomg.cwmx.resource.imsdatabase.DBD#getPcb <em>Pcb</em>}</li> * <li>{@link orgomg.cwmx.resource.imsdatabase.DBD#getExit <em>Exit</em>}</li> * <li>{@link orgomg.cwmx.resource.imsdatabase.DBD#getLibrary <em>Library</em>}</li> * </ul> * </p> * * @see orgomg.cwmx.resource.imsdatabase.ImsdatabasePackage#getDBD() * @model * @generated */ public interface DBD extends RecordFile { /** * Returns the value of the '<em><b>Dli Access</b></em>' attribute. The * literals are from the enumeration * {@link orgomg.cwmx.resource.imsdatabase.imstypes.AccessMethodType}. <!-- * begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> This * attribute holds the access method of the DBD. PSINDEX, PHDAM, and PHIDAM * are new valid values added for IMS V6. <!-- end-model-doc --> * * @return the value of the '<em>Dli Access</em>' attribute. * @see orgomg.cwmx.resource.imsdatabase.imstypes.AccessMethodType * @see #setDliAccess(AccessMethodType) * @see orgomg.cwmx.resource.imsdatabase.ImsdatabasePackage#getDBD_DliAccess() * @model * @generated */ AccessMethodType getDliAccess(); /** * Sets the value of the '{@link orgomg.cwmx.resource.imsdatabase.DBD#getDliAccess <em>Dli Access</em>}' attribute. * <!-- begin-user-doc --> <!-- * end-user-doc --> * @param value the new value of the '<em>Dli Access</em>' attribute. * @see orgomg.cwmx.resource.imsdatabase.imstypes.AccessMethodType * @see #getDliAccess() * @generated */ void setDliAccess(AccessMethodType value); /** * Returns the value of the '<em><b>Is VSAM</b></em>' attribute. <!-- * begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> This * attribute indicates whether the operating system access method for the * DBD is VSAM. It affects the string in the ACCESS keyword in the generated * DBD when dliAccess=GSAM, HDAM,or HIDAM. <!-- end-model-doc --> * * @return the value of the '<em>Is VSAM</em>' attribute. * @see #setIsVSAM(boolean) * @see orgomg.cwmx.resource.imsdatabase.ImsdatabasePackage#getDBD_IsVSAM() * @model dataType="orgomg.cwm.objectmodel.core.Boolean" * @generated */ boolean isIsVSAM(); /** * Sets the value of the '{@link orgomg.cwmx.resource.imsdatabase.DBD#isIsVSAM <em>Is VSAM</em>}' attribute. * <!-- begin-user-doc --> <!-- end-user-doc --> * @param value the new value of the '<em>Is VSAM</em>' attribute. * @see #isIsVSAM() * @generated */ void setIsVSAM(boolean value); /** * Returns the value of the '<em><b>Password Flag</b></em>' attribute. <!-- * begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> This * attribute is a flag to indicate whether PASSWD=YES should be specified on * the DBD macro. <!-- end-model-doc --> * * @return the value of the '<em>Password Flag</em>' attribute. * @see #setPasswordFlag(boolean) * @see orgomg.cwmx.resource.imsdatabase.ImsdatabasePackage#getDBD_PasswordFlag() * @model dataType="orgomg.cwm.objectmodel.core.Boolean" * @generated */ boolean isPasswordFlag(); /** * Sets the value of the '{@link orgomg.cwmx.resource.imsdatabase.DBD#isPasswordFlag <em>Password Flag</em>}' attribute. * <!-- begin-user-doc --> <!-- * end-user-doc --> * @param value the new value of the '<em>Password Flag</em>' attribute. * @see #isPasswordFlag() * @generated */ void setPasswordFlag(boolean value); /** * Returns the value of the '<em><b>Version String</b></em>' attribute. <!-- * begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> This is * a 255-character string that is generated with the VERSION keyword to * serve as a descriptive label on the DBD. <!-- end-model-doc --> * * @return the value of the '<em>Version String</em>' attribute. * @see #setVersionString(String) * @see orgomg.cwmx.resource.imsdatabase.ImsdatabasePackage#getDBD_VersionString() * @model dataType="orgomg.cwm.objectmodel.core.String" * @generated */ String getVersionString(); /** * Sets the value of the '{@link orgomg.cwmx.resource.imsdatabase.DBD#getVersionString <em>Version String</em>}' attribute. * <!-- begin-user-doc --> <!-- * end-user-doc --> * @param value the new value of the '<em>Version String</em>' attribute. * @see #getVersionString() * @generated */ void setVersionString(String value); /** * Returns the value of the '<em><b>Access Method</b></em>' containment * reference. It is bidirectional and its opposite is ' * {@link orgomg.cwmx.resource.imsdatabase.AccessMethod#getDbd <em>Dbd</em>} * '. <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> * Connection to additional attributes and relationships that apply to a * specific access method. <!-- end-model-doc --> * * @return the value of the '<em>Access Method</em>' containment reference. * @see #setAccessMethod(AccessMethod) * @see orgomg.cwmx.resource.imsdatabase.ImsdatabasePackage#getDBD_AccessMethod() * @see orgomg.cwmx.resource.imsdatabase.AccessMethod#getDbd * @model opposite="dbd" containment="true" * @generated */ AccessMethod getAccessMethod(); /** * Sets the value of the '{@link orgomg.cwmx.resource.imsdatabase.DBD#getAccessMethod <em>Access Method</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Access Method</em>' containment reference. * @see #getAccessMethod() * @generated */ void setAccessMethod(AccessMethod value); /** * Returns the value of the '<em><b>Acblib</b></em>' reference list. The * list contents are of type {@link orgomg.cwmx.resource.imsdatabase.ACBLIB} * . It is bidirectional and its opposite is ' * {@link orgomg.cwmx.resource.imsdatabase.ACBLIB#getDbd <em>Dbd</em>}'. * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> * The ACBLIB(s) in which the DBD is used. <!-- end-model-doc --> * * @return the value of the '<em>Acblib</em>' reference list. * @see orgomg.cwmx.resource.imsdatabase.ImsdatabasePackage#getDBD_Acblib() * @see orgomg.cwmx.resource.imsdatabase.ACBLIB#getDbd * @model opposite="dbd" * @generated */ EList<ACBLIB> getAcblib(); /** * Returns the value of the '<em><b>Dataset</b></em>' containment reference * list. The list contents are of type * {@link orgomg.cwmx.resource.imsdatabase.Dataset}. It is bidirectional and * its opposite is '{@link orgomg.cwmx.resource.imsdatabase.Dataset#getDbd * <em>Dbd</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> <!-- * begin-model-doc --> The set of Dataset instances used by this DBD. <!-- * end-model-doc --> * * @return the value of the '<em>Dataset</em>' containment reference list. * @see orgomg.cwmx.resource.imsdatabase.ImsdatabasePackage#getDBD_Dataset() * @see orgomg.cwmx.resource.imsdatabase.Dataset#getDbd * @model opposite="dbd" containment="true" * @generated */ EList<Dataset> getDataset(); /** * Returns the value of the '<em><b>Segment</b></em>' containment reference * list. The list contents are of type * {@link orgomg.cwmx.resource.imsdatabase.Segment}. It is bidirectional and * its opposite is '{@link orgomg.cwmx.resource.imsdatabase.Segment#getDbd * <em>Dbd</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> <!-- * begin-model-doc --> Segments that are part of this DBD. <!-- * end-model-doc --> * * @return the value of the '<em>Segment</em>' containment reference list. * @see orgomg.cwmx.resource.imsdatabase.ImsdatabasePackage#getDBD_Segment() * @see orgomg.cwmx.resource.imsdatabase.Segment#getDbd * @model opposite="dbd" containment="true" * @generated */ EList<Segment> getSegment(); /** * Returns the value of the '<em><b>Pcb</b></em>' reference list. The list * contents are of type {@link orgomg.cwmx.resource.imsdatabase.PCB}. It is * bidirectional and its opposite is ' * {@link orgomg.cwmx.resource.imsdatabase.PCB#getDbd <em>Dbd</em>}'. <!-- * begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> The * PCBs that are based on this DBD. <!-- end-model-doc --> * * @return the value of the '<em>Pcb</em>' reference list. * @see orgomg.cwmx.resource.imsdatabase.ImsdatabasePackage#getDBD_Pcb() * @see orgomg.cwmx.resource.imsdatabase.PCB#getDbd * @model opposite="dbd" * @generated */ EList<PCB> getPcb(); /** * Returns the value of the '<em><b>Exit</b></em>' containment reference * list. The list contents are of type * {@link orgomg.cwmx.resource.imsdatabase.Exit}. It is bidirectional and * its opposite is '{@link orgomg.cwmx.resource.imsdatabase.Exit#getDbd * <em>Dbd</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> <!-- * begin-model-doc --> Data capture exit used by this DBD. <!-- * end-model-doc --> * * @return the value of the '<em>Exit</em>' containment reference list. * @see orgomg.cwmx.resource.imsdatabase.ImsdatabasePackage#getDBD_Exit() * @see orgomg.cwmx.resource.imsdatabase.Exit#getDbd * @model opposite="dbd" containment="true" * @generated */ EList<Exit> getExit(); /** * Returns the value of the '<em><b>Library</b></em>' reference list. The * list contents are of type {@link orgomg.cwmx.resource.imsdatabase.DBDLib} * . It is bidirectional and its opposite is ' * {@link orgomg.cwmx.resource.imsdatabase.DBDLib#getDbd <em>Dbd</em>}'. * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> * DBDLIB(s) in which DBD is stored. <!-- end-model-doc --> * * @return the value of the '<em>Library</em>' reference list. * @see orgomg.cwmx.resource.imsdatabase.ImsdatabasePackage#getDBD_Library() * @see orgomg.cwmx.resource.imsdatabase.DBDLib#getDbd * @model opposite="dbd" * @generated */ EList<DBDLib> getLibrary(); } // DBD
java
<reponame>ryangillard/misc<gh_stars>0 # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def isSameTree(self, p, q): """ :type p: TreeNode :type q: TreeNode :rtype: bool """ return self.iterative(p, q) def recursive(self, p, q): check = self.nodeCheck(p, q) if check == 0: return True elif check == 1: return False return self.recursive(p.left, q.left) and self.recursive(p.right, q.right) def iterative(self, p, q): queue = [(p, q)] while queue: p, q = queue.pop(0) check = self.nodeCheck(p, q) if check % 2 == 1: return False if p: queue.append((p.left, q.left)) queue.append((p.right, q.right)) return True def nodeCheck(self, p, q): if not p and not q: return 0 if not p or not q: return 1 if p.val != q.val: return 1 return 2
python
<reponame>CLBExchange/certified-token-list<filename>101/BBZbqM7RPKzncqaC26gtq6Z4dkm5ksZXib4nJYjk8L3X.json {"name":"<NAME>","symbol":"NUGGET","logoURI":"https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/BBZbqM7RPKzncqaC26gtq6Z4dkm5ksZXib4nJYjk8L3X/logo.png","decimals":9,"address":"BBZbqM7RPKzncqaC26gtq6Z4dkm5ksZXib4nJYjk8L3X","chainId":101,"tags":["utility-token"],"extensions":{"website":"http://degenislands.com/","twitter":"https://twitter.com/degenislands","discord":"https://discord.gg/dzyMPzmFMe","description":"NUGGETs are the official tokens for Degen Islands"}}
json
India captain Virat Kohli has refrained from making any comments on the Citizenship Amendment Act (CAA), without gaining full knowledge on the sensitive subject. The CAA will grant Indian nationality to people belonging to minority communities – Hindus, Sikhs, Buddhists, Jains, Parsis and Christians – in Afghanistan, Bangladesh and Pakistan after six years of residence in India instead of 12, even if they don’t possess any proper document. In 2016, Kohli had termed demonetisation as the ‘greatest move in the history of Indian politics’, which met with sharp criticism from a lot of quarters, with people questioning his knowledge on the subject. With Guwahati witnessing massive protests against the CAA till some days back, Kohli was asked about it and the Indian skipper weighed his words carefully. “On the issue, I do not want to be irresponsible and speak on something that has, you know, radical opinions both sides. I need to have total information, total knowledge of what it means and what is going on and then be responsible to give my opinion on it,” Kohli said ahead of India’s first T20 International against Sri Lanka. The skipper made it clear that he will not like to get embroiled in controversy by commenting on a subject that he is not well aware of. However, Kohli on his part was happy with the security arrangements and felt that the city is ‘absolutely safe’. “The city is absolutely safe. We didn’t see any problems on the roads,” Kohli said, giving his thumbs-up for the match at the Barsapara Stadium. The Assam Cricket Association is using this match as a ‘curtain-raiser’ ahead of their maiden IPL match this season as Rajasthan Royals have adopted this venue. There has been deployment of Rapid Action Force for the teams and ACA secretary Devajit Saikia has said the spectators will not even be allowed to bring along handkerchiefs and towels on the match-day as the traditional Assamese scarf was used for protests against CAA.
english
<reponame>zhaoshijing/first-project { "main": "../bundles/ng-zorro-antd-pagination.umd.js", "module": "../fesm5/ng-zorro-antd-pagination.js", "es2015": "../fesm2015/ng-zorro-antd-pagination.js", "esm5": "../esm5/pagination/ng-zorro-antd-pagination.js", "esm2015": "../esm2015/pagination/ng-zorro-antd-pagination.js", "fesm5": "../fesm5/ng-zorro-antd-pagination.js", "fesm2015": "../fesm2015/ng-zorro-antd-pagination.js", "typings": "ng-zorro-antd-pagination.d.ts", "metadata": "ng-zorro-antd-pagination.metadata.json", "sideEffects": false, "name": "ng-zorro-antd/pagination" }
json
{"contents":"exports.__esModule = true;\nfunction __DefaultExport__(parent, x0, y0, x1, y1) {\n var nodes = parent.children, node, i = -1, n = nodes.length, k = parent.value && (x1 - x0) / parent.value;\n while (++i < n) {\n (node = nodes[i], node.y0 = y0, node.y1 = y1);\n (node.x0 = x0, node.x1 = x0 += node.value * k);\n }\n}\nexports.default = __DefaultExport__;\n"}
json
package stubidp.utils.rest.analytics; import org.apache.http.NameValuePair; import org.apache.http.client.utils.URIBuilder; import org.apache.http.message.BasicNameValuePair; import org.glassfish.jersey.server.ContainerRequest; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import stubidp.utils.rest.configuration.AnalyticsConfiguration; import stubidp.utils.rest.configuration.AnalyticsConfigurationBuilder; import javax.ws.rs.core.Cookie; import java.net.URI; import java.net.URISyntaxException; import java.time.Clock; import java.time.Instant; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; import static java.text.MessageFormat.format; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static stubidp.utils.rest.analytics.AnalyticsReporter.PIWIK_VISITOR_ID; @ExtendWith(MockitoExtension.class) class AnalyticsReporterTest { private static final DateTimeFormatter dateTimeFormatter = new DateTimeFormatterBuilder().appendPattern("yyyy-MM-dd HH:mm:ss") .appendInstant(0) .toFormatter() .withZone(ZoneId.of("UTC")); @Mock private ContainerRequest requestContext; @Mock private PiwikClient piwikClient; private final String visitorId = "123"; private final Clock clock = Clock.fixed(Instant.now(), ZoneId.of("UTC")); @Test void shouldCallGenerateUrlAndSendToPiwikAsynchronouslyWhenReportingCustomVariable() throws Exception { doReturn(Map.of(PIWIK_VISITOR_ID, new Cookie(PIWIK_VISITOR_ID, visitorId))).when(requestContext).getCookies(); when(requestContext.getRequestUri()).thenReturn(URI.create("http://localhost")); AnalyticsReporter analyticsReporter = spy(new AnalyticsReporter(piwikClient, new AnalyticsConfigurationBuilder().build(), clock)); CustomVariable customVariable = new CustomVariable(2, "IDP", "Experian"); analyticsReporter.reportCustomVariable("friendly description of URL", requestContext, customVariable); URI expected = analyticsReporter.generateURI("friendly description of URL", requestContext, Optional.of(customVariable), Optional.of(visitorId)); verify(piwikClient).report(expected, requestContext); } @Test void shouldCallGenerateUrlAndSendToPiwkAsynchronously() throws URISyntaxException { doReturn(Map.of(PIWIK_VISITOR_ID, new Cookie(PIWIK_VISITOR_ID, visitorId))).when(requestContext).getCookies(); String friendlyDescription = "friendly description of URL"; URI piwikUri = URI.create("piwik"); AnalyticsReporter analyticsReporter = spy(new AnalyticsReporter(piwikClient, new AnalyticsConfigurationBuilder().build(), clock)); doReturn(piwikUri).when(analyticsReporter).generateURI(friendlyDescription, requestContext, Optional.empty(), Optional.of(visitorId)); analyticsReporter.report(friendlyDescription, requestContext); verify(piwikClient).report(piwikUri, requestContext); } @Test void shouldHandleAnyExceptions() throws URISyntaxException { doReturn(Map.of(PIWIK_VISITOR_ID, new Cookie(PIWIK_VISITOR_ID, visitorId))).when(requestContext).getCookies(); String friendlyDescription = "friendly description of URL"; AnalyticsReporter analyticsReporter = spy(new AnalyticsReporter(piwikClient, new AnalyticsConfigurationBuilder().build(), clock)); doThrow(new RuntimeException("error")).when(analyticsReporter).generateURI(friendlyDescription, requestContext, Optional.empty(), Optional.of(visitorId)); analyticsReporter.report(friendlyDescription, requestContext); } @Test void shouldGeneratePiwikUrl() throws URISyntaxException { Instant now = Instant.now(clock); when(requestContext.getHeaderString("Referer")).thenReturn("http://piwikserver/referrerUrl"); when(requestContext.getRequestUri()).thenReturn(new URI("http://piwikserver/requestUrl")); AnalyticsConfiguration analyticsConfiguration = new AnalyticsConfigurationBuilder().build(); URIBuilder expectedURI = new URIBuilder(format("http://piwik-digds.rhcloud.local/analytics?idsite={0}&rec=1&apiv=1&url=http%3A%2F%2Fpiwikserver%2FrequestUrl&urlref=http%3A%2F%2Fpiwikserver%2FreferrerUrl&_id=abc&ref=http%3A%2F%2Fpiwikserver%2FreferrerUrl&cookie=false&action_name=SERVER+friendly+description+of+URL", analyticsConfiguration.getSiteId())); expectedURI.addParameter("cdt", dateTimeFormatter.format(now)); AnalyticsReporter analyticsReporter = new AnalyticsReporter(piwikClient, analyticsConfiguration, clock); URIBuilder testURI = new URIBuilder(analyticsReporter.generateURI("SERVER friendly description of URL", requestContext, Optional.empty(), Optional.of("abc"))); Map<String, NameValuePair> expectedParams = expectedURI.getQueryParams().stream() .collect(Collectors.toMap(NameValuePair::getName, e -> e)); for (NameValuePair param : testURI.getQueryParams()) { assertThat(expectedParams).containsEntry(param.getName(), param); } assertThat(testURI.getQueryParams().size()).isEqualTo(expectedParams.size()); } @Test void shouldGeneratePiwikCustomVariableUrl() throws URISyntaxException { doReturn(Map.of(PIWIK_VISITOR_ID, new Cookie(PIWIK_VISITOR_ID, visitorId))).when(requestContext).getCookies(); when(requestContext.getRequestUri()).thenReturn(URI.create("http://localhost")); Instant now = Instant.now(clock); String customVariable = "{\"1\":[\"RP\",\"HMRC BLA\"]}"; AnalyticsConfiguration analyticsConfiguration = new AnalyticsConfigurationBuilder().build(); URIBuilder expectedURI = new URIBuilder(format("http://piwiki-dgds.rhcloud.local/analytics?_id=123&idsite={0}&rec=1&apiv=1&action_name=page-title&cookie=false", analyticsConfiguration.getSiteId())); expectedURI.addParameter("_cvar", customVariable); expectedURI.addParameter("url", requestContext.getRequestUri().toString()); expectedURI.addParameter("cdt", dateTimeFormatter.format(now)); AnalyticsReporter analyticsReporter = new AnalyticsReporter(piwikClient, analyticsConfiguration, clock); Optional<Cookie> piwikCookie = Optional.ofNullable(requestContext.getCookies().get(PIWIK_VISITOR_ID)); Optional<String> visitorId = piwikCookie.map(Cookie::getValue); Optional<CustomVariable> customVariableOptional = Optional.of(new CustomVariable(1, "RP", "HMRC BLA")); URIBuilder testURI = new URIBuilder(analyticsReporter.generateURI("page-title", requestContext, customVariableOptional, visitorId)); Map<String, NameValuePair> expectedParams = expectedURI.getQueryParams().stream() .collect(Collectors.toMap(NameValuePair::getName, e -> e)); for (NameValuePair param : testURI.getQueryParams()) { assertThat(expectedParams).containsEntry(param.getName(), param); } assertThat(testURI.getQueryParams().size()).isEqualTo(expectedParams.size()); } @Test void simulatePageView_generatesExpectedParameters() { doReturn(Map.of(PIWIK_VISITOR_ID, new Cookie(PIWIK_VISITOR_ID, visitorId))).when(requestContext).getCookies(); AnalyticsConfiguration config = new AnalyticsConfigurationBuilder().build(); AnalyticsReporter reporter = new AnalyticsReporter(piwikClient, config, clock); ArgumentCaptor<URI> captor = ArgumentCaptor.forClass(URI.class); reporter.reportPageView("Title", requestContext, "http://page-view"); verify(piwikClient).report(captor.capture(), eq(requestContext)); URIBuilder uriBuilder = new URIBuilder(captor.getValue()); checkURIBase(uriBuilder.toString(), config.getPiwikServerSideUrl()); checkURIURL(uriBuilder, "http://page-view"); checkURITitle(uriBuilder, "Title"); checkParams(uriBuilder, config.getSiteId().toString()); } @Test void simulatePageView_includesVisitorIdIfPresent() { doReturn(Map.of(PIWIK_VISITOR_ID, new Cookie(PIWIK_VISITOR_ID, visitorId))).when(requestContext).getCookies(); AnalyticsReporter reporter = new AnalyticsReporter(piwikClient, new AnalyticsConfigurationBuilder().build(), clock); ArgumentCaptor<URI> captor = ArgumentCaptor.forClass(URI.class); reporter.reportPageView("Title", requestContext, "http://page-view"); verify(piwikClient).report(captor.capture(), eq(requestContext)); checkVisitorId(captor.getValue().getQuery(), visitorId); } @Test void simulatePageView_handlesMissingVisitorId() { when(requestContext.getCookies()).thenReturn(Map.of()); AnalyticsConfiguration config = new AnalyticsConfigurationBuilder().build(); AnalyticsReporter reporter = new AnalyticsReporter(piwikClient, config, clock); ArgumentCaptor<URI> captor = ArgumentCaptor.forClass(URI.class); reporter.reportPageView("Title", requestContext, "http://page-view"); verify(piwikClient).report(captor.capture(), eq(requestContext)); String query = captor.getValue().getQuery(); checkQueryParamMissing(query, "_id"); } @Test void simulatePageView_doesNotReportIfAnalyticsIsDisabled() { AnalyticsConfiguration config = new AnalyticsConfigurationBuilder().setEnabled(false).build(); AnalyticsReporter reporter = new AnalyticsReporter(piwikClient, config, clock); reporter.reportPageView("Title", requestContext, "http://page-view"); verify(piwikClient, never()).report(any(URI.class), any(ContainerRequest.class)); } private void checkCommonParams(URIBuilder uriBuilder, String siteId) { checkQueryParam(uriBuilder, "idsite", siteId); checkQueryParam(uriBuilder, "apiv", "1"); checkQueryParam(uriBuilder, "rec", "1"); } private void checkVisitorId(String query, String visitorId) { checkQueryParam(query, "_id", visitorId); } private void checkURIURL(URIBuilder query, String expected) { checkQueryParam(query, "url", expected); } private static void checkURIBase(String uri, String expected) { assertThat(uri.indexOf(expected)).isEqualTo(0); } private void checkURITitle(URIBuilder query, String title) { checkQueryParam(query, "action_name", title); } private void checkQueryParam(String query, String name, String expected) { assertThat(queryContains(query, name, expected)).as("Looking for param %s with value %s in query %s", name, expected, query).isTrue(); } private static void checkQueryParam(URIBuilder uriBuilder, String name, String expected) { assertThat(uriBuilder.getQueryParams().contains(new BasicNameValuePair(name, expected))).as("Looking for param %s with value %s", name, expected).isTrue(); } private static boolean queryContains(String query, String name, String expectedValue) { String match = name + "=" + expectedValue; return List.of(query.split("&")).stream().anyMatch(match::equals); } private static void checkQueryParamMissing(String query, String name) { assertThat(query.contains(name + "=")).isFalse(); } private void checkParams(URIBuilder uriBuilder, String siteId) { checkCommonParams(uriBuilder, siteId); checkQueryParam(uriBuilder, "cookie", "false"); checkQueryParam(uriBuilder, "cdt", dateTimeFormatter.format(Instant.now(clock))); } }
java
For almost 30 years, Brazilian activist Joenia Wapixana, has been fighting for indigenous land rights and against “institutionalized discrimination” in Brazil. In a special interview with UN News, to mark the 20th anniversary of the Durban Declaration and Programme of Action, she says it’s time to dedicate more resources to this fight. “My name is Joenia, I am a member of the Wapixchana indigenous tribe. My second education, as I always say, was the indigenous movement, working with indigenous organizations. And, above all, fighting for the collective rights of communities. Society needs to understand that discrimination against the indigenous has always existed in Brazil. There is discrimination against indigenous people who are not recognized or even respected. You can look through the available data on discrimination. Most of it is just about the Afro-descendant population, but not about the indigenous people. There is no data on this. Most studies do not address the issue of discrimination [against indigenous peoples]. So, when you see someone, such as a minister saying that indigenous people cannot wear Nike because that would conflict with indigenous customs; or criticizing an indigenous woman who uses an iPhone, as if this would take away her indigenous identity; or not recognizing the rights of indigenous peoples as Brazilian citizens, this is a kind of institutionalized discrimination. Joenia Wapixana: In that same year, she was awarded the UN Human Rights Prize, a high profile award whose previous winners have included Eleanor Roosevelt, Martin Luther King, and Nelson Mandela. After taking the “Raposa Serra do Sol” land dispute to the Inter-American Commission on Human Rights, Wapixana became the first indigenous lawyer to argue and win a case before the Supreme Court of Brazil. , I believe that when a person has suffered racial discrimination, or is suffering from racism, it is necessary to protect them with the fullest extent of the law. Report the incident, even if nothing comes of it. It is important for us to create a record of this phase that we are going through. The Conference should also hold discussions on the inclusion of indigenous peoples in the debate on public policy, because it is essential to include in the fight the specific needs of the various groups. This article is one of a series of multimedia features published as part of the commemorations surrounding the twentieth anniversary of the UN’s Durban Declaration, considered to be a milestone in the global fight against racism. As an independent media platform, we do not take advertisements from governments and corporate houses. It is you, our readers, who have supported us on our journey to do honest and unbiased journalism. Please contribute, so that we can continue to do the same in future.
english
Maoist Center Chair Pushpa Kamal Dahal alias Prachanda undergoes medical tests at Mediciti Hospital in Lalitpur Saturday. KATHMANDU: Maoist Center Chairman Pushpa Kamal Dahal ‘Prachanda’ has been admitted to Mediciti Hospital in Lalitpur Saturday. Prachanda had been resting at home due to health problems under the vigil of a doctor. However, he has been admitted to Mediciti Hospital after his blood pressure level got out of control, family sources said. He was scheduled to go to Mahottari today to attend a program there but due to his health, the program was postponed.
english
<reponame>panchbhai1969/gerbil-client-django-webapp from django.contrib import admin # Register your models here. from .models import Question,Choice admin.site.register(Question) admin.site.register(Choice)
python
Everyone will say goodbye to 2022, the year that gave us our lives back. After two years of Covid restrictions, people have returned to normalcy, so enjoy the New Year and welcome 2023 with your family and friends. Happy 2023 New Year! On January 1, 2023, we will usher in the New Year. Celebrate the new beginnings with our warmest wishes, photographs, greetings, messages, and quotations. You may share it with family and friends on Facebook, WhatsApp, and other social media platforms. Every year, the festivities begin on New Year's Eve (December 31) and go on until the early morning hours of January 1. Remember to wish your loved ones and check in on them as you commemorate the event by recalling wonderful memories. Another night like the rest. It’s just another New Year’s Eve. Let’s make it the best. - Happy New Year's Eve. It is time to thank God for a great year and seek his blessings for the upcoming year. - Happy New Year's Eve wishes to my family who has always been there for me. Looking forward to another amazing year with you. - Happy New Year's Eve! Never ever take along the negative thoughts and bad memories with you into the New Year. Always carry the good things to make it a good year. - A very Happy New Year's Eve to my loving family. May we are always there for each other, always there to make every celebration so memorable. - Happy New Year's Eve! May New Year 2023 bring success filled with peace hope and togetherness in our family. We love you and wish you God’s blessings. 2023 is going to bring some big new changes for you, but hopefully, you're happy being stuck with the same old me. Happy New Year. A new year is like a blank book; the pen is in your hands. It is your chance to write a beautiful story for yourself. Happy New Year! I'm so proud of all your accomplishments this year - and I just can't wait to see what you do in the next. Happy New Year. Seasons change; years come and go, but our family grows stronger. Happy New Year. I knew I could make it through this year because of you. Thank you for your friendship! Here’s to making more memories in 2023. Tonight’s another chance to start again. It’s just another New Year’s Eve. Here's wishing all of you a Happy and Prosperous New Year!
english
<gh_stars>0 var data = { "body": "<path opacity=\".3\" d=\"M5 17c0 .55.45 1 1 1h1v-4H5v3zm12-3h2v4h-2z\" fill=\"currentColor\"/><path d=\"M12 1a9 9 0 0 0-9 9v7c0 1.66 1.34 3 3 3h3v-8H5v-2c0-3.87 3.13-7 7-7s7 3.13 7 7v2h-4v8h4v1h-7v2h6c1.66 0 3-1.34 3-3V10a9 9 0 0 0-9-9zM7 14v4H6c-.55 0-1-.45-1-1v-3h2zm12 4h-2v-4h2v4z\" fill=\"currentColor\"/>", "width": 24, "height": 24 }; exports.__esModule = true; exports.default = data;
javascript
<filename>tests/test_utils.py import unittest from cloudr.utils import change_path_prefix class TestUtils(unittest.TestCase): def test_change_path_prefix(self): self.assertEqual(change_path_prefix('/123', '/', '/'), '/123') self.assertEqual(change_path_prefix('/123/234', '/123', '/123'), '/123/234') self.assertEqual(change_path_prefix('/123', '/', '/234'), '/234/123') self.assertEqual(change_path_prefix('/123', '/', '/123'), '/123/123') self.assertEqual(change_path_prefix('/123/345', '/123', '/'), '/345') self.assertEqual(change_path_prefix('/123/234/345', '/123/234', '/456'), '/456/345') self.assertEqual(change_path_prefix('/123/345', '/123', '/234/456'), '/234/456/345') if __name__ == "__main__": unittest.main()
python
EXCLUSIVE: Katrina wishes Ranbir on the sets of Jagga Jasoos, but skips cake cutting ceremony! As Ranbir Kapoor turned a year older yesterday, his close friends decided to surprise him on the sets of Jagga Jasoos with a huge football cake. Anurag Basu, Arjun Kapoor and Aditya Roy Kapur were present for the lovely celebration. However, all eyes were trying to spot Ranbir's ex Katrina Kaif, who was shooting with the actor till 10 pm on September 28, 2016. But much to everyone's disappointment, Katrina wasn't present at the cake cutting ceremony as she left before that. A source present on the set informed us, "As soon as the shoot got over, Katrina wrapped up her work and headed home. All expected her to wait but that didn't happen. Though she wished Ranbir before leaving." "Katrina didn't want things to turn awkward and hence decided to leave before Ranbir ringed in his birthday. But she made it a point to wish her ex-flame," adds another source. Well, now that's one smart move! Isn't it? NET Worth: ~ 41.7 MN USD (RS 345 cr)
english
<filename>discussions/33377.json [ { "Id": "110649", "ThreadId": "33377", "Html": "In that case, the 'look ahead' row is not created since the declared collection item is an interface. A nice feature would be to be able to provide the corresponding class that could serve as a base for instantiation. In the meantime, all such collections have to declare the 'class item' ... or is there an alternative? Thank you, Julie.\r\n", "PostedDate": "2008-08-12T11:18:52.317-07:00", "UserRole": null, "MarkedAsAnswerDate": null }, { "Id": "111100", "ThreadId": "33377", "Html": "<div class=CommentText3>\r\n<p>One workaround is to derive from ObservableCollection&lt;ISomething&gt; and start with a non-empty list. For example:</p>\r\n<p>public class Products : ObservableCollection&lt;IProduct&gt;</p>\r\n<p>&nbsp; &nbsp;{</p>\r\n<p>&nbsp; &nbsp; &nbsp; &nbsp;public Products()</p>\r\n<p>&nbsp; &nbsp; &nbsp; &nbsp;{</p>\r\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Add((new Product(&quot;Pro WPF in C# 2008&quot;, &quot;<NAME>&quot;, 49.99)));</p>\r\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Add((new Product(&quot;Window Presentation Foundation Unleashed&quot;, &quot;<NAME>&quot;, 49.99)));</p>\r\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Add((new Product(&quot;Programming WPF&quot;, &quot;<NAME> and and <NAME>&quot;, 49.99)));</p>\r\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Add((new Product(&quot;WPF Programming&quot;, &quot;<NAME>, <NAME>, <NAME>, and <NAME>&quot;, 49.99)));</p>\r\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Add((new Product(&quot;3D Programming For Windows&quot;, &quot;<NAME>&quot;, 49.99)));</p>\r\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Add((new Product(&quot;Applications = Code + Markup&quot;, &quot;<NAME>&quot;, 49.99)));</p>\r\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Add((new Product(&quot;Practical WPF Graphics Programming&quot;, &quot;<NAME>&quot;, 49.99)));</p>\r\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Add((new Product(&quot;Essential Windows Presentation Foundation&quot;, &quot;<NAME>&quot;, 49.99)));</p>\r\n<p>&nbsp; &nbsp; &nbsp; &nbsp;}</p>\r\n<p>&nbsp; &nbsp;}</p>\r\n<p>where Product implements IProduct. &nbsp;You do have to have a non-empty collection to begin with. &nbsp;Since you derive from ObservableCollection&lt;T&gt; the ListViewCollectionView code will not try to construct the new object with the generic argument (IProduct) and instead will try to get a representative type by actually querying for an item in the list. &nbsp;In this case it will return a type of Product which as long as there is a default constructor will create the new item for you.</p>\r\n<p>With just ObservableCollection&lt;T&gt;, the framework has to query for the type it has and use reflection to construct it. &nbsp;If it's an interface it cannot just construct the item solely based on that information.</p>\r\n</div>\r\n", "PostedDate": "2008-08-14T07:22:16.703-07:00", "UserRole": null, "MarkedAsAnswerDate": null }, { "Id": "111290", "ThreadId": "33377", "Html": "One can also note that the following quasi-equivalent construction : &quot; IEditableCollectionView iecv = new ListCollectionView(ObservableCollection&lt;IProduct&gt; as IList); &quot; also leaves the 'CanAddNew' placeholder status of&nbsp;iecv to false.<br>\r\n<br>\r\nSuch instantiation casts the ObservableCollection&lt;IProduct&gt; to a non-generic IList straight into the constructor of ListCollectionView, that is responsible for the 'CanAddNew' placeholder status.<br>\r\n<br>\r\nDespite this, the ListCollectionView will ignore the IList intent and still introspect the provided collection as an &quot;ObservableCollection&lt;IProduct&gt;&quot; and not as a &quot;IList&quot;. Based on this mechanism,<br>\r\nit will set the 'CanAddNew' placeholder status to 'false'. If it had taken the &quot;as Ilist&quot; cast into account, it would have discovered the underlying &quot;Product&quot; class type and set the 'CanAddNew' placeholder status to 'true'.\r\n", "PostedDate": "2008-08-15T00:19:04.74-07:00", "UserRole": null, "MarkedAsAnswerDate": null } ]
json