text
stringlengths
1
1.04M
language
stringclasses
25 values
<filename>build/public/language/zh-TW/admin/settings/reputation.json {"reputation":"Reputation Settings","disable":"Disable Reputation System","disable-down-voting":"Disable Down Voting","votes-are-public":"All Votes Are Public","thresholds":"Activity Thresholds","min-rep-downvote":"Minimum reputation to downvote posts","min-rep-flag":"Minimum reputation to flag posts"}
json
Mohali: An MBA student and her cousin were among three persons arrested with fake Rs 2,000 currency notes with a face value of Rs 42 lakh in Mohali on Wednesday, police said in Mohali. The trio - Vishakha Verma of Kapurthala, who is perusing MBA from Manipur, her B Tech cousin Abhinav Verma from Dhakoli in Zirakpur and their property dealer friend Suman Nagpal of Ludhiana - were caught in an Audi car with illegal red beacon atop. Two of their accomplices are still at large, Mohali SP Parminder Singh Bhandal said. The police said post-demonetisation, the accused had begun printing fake Rs 2,000 notes. According to police, the recovered fake notes were of fine quality and bear close resemblance to the original Rs 2,000 notes. "With red beacon atop the luxury car, the accused were on their way to dupe a gullible customer when on a tip-off, we intercepted them near Bakarpur village," the SP said. Preliminary investigations revealed that the Ludhiana-based property dealer used to look for the gullible persons, interested in exchanging junked currency notes of Rs 500 and 1,000, by charging 30 per cent of the total amount. "After striking a deal, they would give the victims fake currency notes in return," the investigators said. A case under Sections 420, 489-A, B, C, D and 120-B was registered against the accused, who were sent to one-day police remand by a local court.
english
<reponame>nategunawan/atom (function () { // Eagerly require cached-run-in-this-context to prevent a circular require // when using `NativeCompileCache` for the first time. require('cached-run-in-this-context') // Define the window start time before the requires so we get a more accurate // window:start marker. const startWindowTime = Date.now() const electron = require('electron') const path = require('path') const Module = require('module') const getWindowLoadSettings = require('../src/get-window-load-settings') const StartupTime = require('../src/startup-time') const entryPointDirPath = __dirname let blobStore = null let useSnapshot = false const startupMarkers = electron.remote.getCurrentWindow().startupMarkers if (startupMarkers) { StartupTime.importData(startupMarkers) } StartupTime.addMarker('window:start', startWindowTime) window.onload = function () { try { StartupTime.addMarker('window:onload:start') const startTime = Date.now() process.on('unhandledRejection', function (error, promise) { console.error('Unhandled promise rejection %o with error: %o', promise, error) }) // Normalize to make sure drive letter case is consistent on Windows process.resourcesPath = path.normalize(process.resourcesPath) setupAtomHome() const devMode = getWindowLoadSettings().devMode || !getWindowLoadSettings().resourcePath.startsWith(process.resourcesPath + path.sep) useSnapshot = !devMode && typeof snapshotResult !== 'undefined' if (devMode) { const metadata = require('../package.json') if (!metadata._deprecatedPackages) { try { metadata._deprecatedPackages = require('../script/deprecated-packages.json') } catch (requireError) { console.error('Failed to setup deprecated packages list', requireError.stack) } } } else if (useSnapshot) { Module.prototype.require = function (module) { const absoluteFilePath = Module._resolveFilename(module, this, false) let relativeFilePath = path.relative(entryPointDirPath, absoluteFilePath) if (process.platform === 'win32') { relativeFilePath = relativeFilePath.replace(/\\/g, '/') } let cachedModule = snapshotResult.customRequire.cache[relativeFilePath] if (!cachedModule) { cachedModule = {exports: Module._load(module, this, false)} snapshotResult.customRequire.cache[relativeFilePath] = cachedModule } return cachedModule.exports } snapshotResult.setGlobals(global, process, window, document, console, require) } const FileSystemBlobStore = useSnapshot ? snapshotResult.customRequire('../src/file-system-blob-store.js') : require('../src/file-system-blob-store') blobStore = FileSystemBlobStore.load(path.join(process.env.ATOM_HOME, 'blob-store')) const NativeCompileCache = useSnapshot ? snapshotResult.customRequire('../src/native-compile-cache.js') : require('../src/native-compile-cache') NativeCompileCache.setCacheStore(blobStore) NativeCompileCache.setV8Version(process.versions.v8) NativeCompileCache.install() if (getWindowLoadSettings().profileStartup) { profileStartup(Date.now() - startTime) } else { StartupTime.addMarker('window:setup-window:start') setupWindow().then(() => { StartupTime.addMarker('window:setup-window:end') }) setLoadTime(Date.now() - startTime) } } catch (error) { handleSetupError(error) } StartupTime.addMarker('window:onload:end') } function setLoadTime (loadTime) { if (global.atom) { global.atom.loadTime = loadTime } } function handleSetupError (error) { const currentWindow = electron.remote.getCurrentWindow() currentWindow.setSize(800, 600) currentWindow.center() currentWindow.show() currentWindow.openDevTools() console.error(error.stack || error) } function setupWindow () { const CompileCache = useSnapshot ? snapshotResult.customRequire('../src/compile-cache.js') : require('../src/compile-cache') CompileCache.setAtomHomeDirectory(process.env.ATOM_HOME) CompileCache.install(process.resourcesPath, require) const ModuleCache = useSnapshot ? snapshotResult.customRequire('../src/module-cache.js') : require('../src/module-cache') ModuleCache.register(getWindowLoadSettings()) const startCrashReporter = useSnapshot ? snapshotResult.customRequire('../src/crash-reporter-start.js') : require('../src/crash-reporter-start') startCrashReporter({_version: getWindowLoadSettings().appVersion}) const CSON = useSnapshot ? snapshotResult.customRequire('../node_modules/season/lib/cson.js') : require('season') CSON.setCacheDir(path.join(CompileCache.getCacheDirectory(), 'cson')) const initScriptPath = path.relative(entryPointDirPath, getWindowLoadSettings().windowInitializationScript) const initialize = useSnapshot ? snapshotResult.customRequire(initScriptPath) : require(initScriptPath) StartupTime.addMarker('window:initialize:start') return initialize({blobStore: blobStore}).then(function () { StartupTime.addMarker('window:initialize:end') electron.ipcRenderer.send('window-command', 'window:loaded') }) } function profileStartup (initialTime) { function profile () { console.profile('startup') const startTime = Date.now() setupWindow().then(function () { setLoadTime(Date.now() - startTime + initialTime) console.profileEnd('startup') console.log('Switch to the Profiles tab to view the created startup profile') }) } const webContents = electron.remote.getCurrentWindow().webContents if (webContents.devToolsWebContents) { profile() } else { webContents.once('devtools-opened', () => { setTimeout(profile, 1000) }) webContents.openDevTools() } } function setupAtomHome () { if (process.env.ATOM_HOME) { return } // Ensure ATOM_HOME is always set before anything else is required // This is because of a difference in Linux not inherited between browser and render processes // https://github.com/atom/atom/issues/5412 if (getWindowLoadSettings() && getWindowLoadSettings().atomHome) { process.env.ATOM_HOME = getWindowLoadSettings().atomHome } } })()
javascript
{"template":{"small":"https://static-cdn.jtvnw.net/emoticons/v1/{image_id}/1.0","medium":"https://static-cdn.jtvnw.net/emoticons/v1/{image_id}/2.0","large":"https://static-cdn.jtvnw.net/emoticons/v1/{image_id}/3.0"},"channels":{"nippsx":{"title":"NiPPsx","channel_id":49849247,"link":"http://twitch.tv/nippsx","desc":null,"id":"nippsx","first_seen":"2016-09-16 10:10:03","badge":"https://static-cdn.jtvnw.net/badges/v1/eeb3adad-99d3-4bf8-a6e9-2c2da195878c/1","badge_starting":"https://static-cdn.jtvnw.net/badges/v1/eeb3adad-99d3-4bf8-a6e9-2c2da195878c/3","badge_3m":"https://static-cdn.jtvnw.net/badges/v1/a5c07190-0b2c-4bb1-a31e-9f0a5123fb0e/3","badge_6m":"https://static-cdn.jtvnw.net/badges/v1/58231063-b6c6-4d53-b31b-00f00dcc4032/3","badge_12m":"https://static-cdn.jtvnw.net/badges/v1/318f96a8-6031-47dd-beed-76db686409a4/3","badge_24m":"https://static-cdn.jtvnw.net/badges/v1/728ea8b4-a6c6-472b-8b0a-b63e7ee8abc9/3","cheermote1":null,"cheermote100":null,"cheermote1000":null,"cheermote5000":null,"cheermote10000":null,"set":19024,"emotes":[{"code":"nippsStud","image_id":114113},{"code":"nippsBus","image_id":136013},{"code":"nippsTalent","image_id":114115},{"code":"nippsBaldy","image_id":115522},{"code":"nippsShocked","image_id":114044},{"code":"nippsWave","image_id":138816},{"code":"nippsRigged","image_id":136419},{"code":"nippsFluff","image_id":139437}]}}}
json
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package practice; /** * * @author mars */ public class TestCircle { public static void main(String[] args) { //Declare and allocate an instance of class circle called c1 with default radius and color Circle c1 = new Circle(); c1.setColor("Brown"); c1.setRadius(5.0); //calling the toString method explicitly,just like any other method. System.out.println(c1.toString());//explicit call //use the dot operator to invoke methods of instance c1. System.out.println("The circle c1 has a radius of " + c1.getRadius() + " and an area of " + c1.getArea()); //Declare and allocate an instance of classs circle called c2. Circle c2 = new Circle(2.0); System.out.println(c2.toString());//explicit call System.out.println(c2);//implicit call..println() calls toString() implicitly,same as above System.out.println("Operator '+'invokes toString() too: " + c2);//'+' invokes toString() too //use the dot operator to invoke the methods of instance c2. System.out.println("The circle c2 has radius of " + c2.getRadius() + " and an area of " + c2.getArea()); //Declare and allocate an instance of class circle called c3. Circle c3 = new Circle(3.0, "orange"); c3.setColor("Green");//changes the color from orange to green c3.setRadius(4.5);//changes the radius from 3.0 to 4.5. //use the dot operator to invoke the methods of instance c3. System.out.println("The circle c3 has a radius of " + c3.getRadius() + " and is " + c3.getColor() + " in color and an area of " + c3.getArea()); // System.out.println(c1.getRadius()); /*The below method coughs out an error since you cannot access a private variable directly you must use the instance's methos to do so. *c1.radius = 5.0; */ } }
java
[ [ { "courseName": "Mathematics -I", "theoryCredits": 4, "practicalCredits": 0 }, { "courseName": "Chemistry", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Programming for Problem Solving", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Workshop (Manufacturing Practices)", "theoryCredits": 0, "practicalCredits": 3 }, { "courseName": "Professional Communication", "theoryCredits": 2, "practicalCredits": 1 } ], [ { "courseName": "Physics", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Mathematics-II", "theoryCredits": 4, "practicalCredits": 0 }, { "courseName": "Basic Electrical Engineering", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Engineering Graphics", "theoryCredits": 2, "practicalCredits": 2 }, { "courseName": "Engineering Mechanics", "theoryCredits": 2, "practicalCredits": 0 }, { "courseName": "Engineering Exploration", "theoryCredits": 0, "practicalCredits": 2 } ], [ { "courseName": "Mathematics -III", "theoryCredits": 3, "practicalCredits": 0 }, { "courseName": "Analog Electronic Circuits", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Electrical Machnies - I", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Object Oriented Programming", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Circuit Theory", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Electromagnetic Fields", "theoryCredits": 4, "practicalCredits": 0 }, { "courseName": "Computer Application in Electrical Engineering", "theoryCredits": 0, "practicalCredits": 1 } ], [ { "courseName": "Mathematics -IV", "theoryCredits": 3, "practicalCredits": 0 }, { "courseName": "Electrical Machines - II", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Digital Electronics and Logic Design", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Electrical and Electronics Measurements", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Signals and Systems", "theoryCredits": 3, "practicalCredits": 0 }, { "courseName": "Human Values and Professional Ethics", "theoryCredits": 2, "practicalCredits": 1 } ], [ { "courseName": "Power System Engineering", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Feedback Control System", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Microprocessor and Microcontroller", "theoryCredits": 4, "practicalCredits": 1 }, { "courseName": "Digital Signal Processing", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Elective-I", "theoryCredits": 3, "practicalCredits": 0 }, { "courseName": "Mini Project and Seminar-I", "theoryCredits": 0, "practicalCredits": 2 } ], [ { "courseName": "Power System Analysis and Stability", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Control System Design", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Power Electronics", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Power Plant Engineering", "theoryCredits": 3, "practicalCredits": 0 }, { "courseName": "Elective-II", "theoryCredits": 3, "practicalCredits": 0 }, { "courseName": "Mini Project and Seminar-II", "theoryCredits": 0, "practicalCredits": 2 } ], [ { "courseName": "Industrial Drives and Control", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Switchgear and Protection", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Electrical Machine Design", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Industrial Economics and Management", "theoryCredits": 3, "practicalCredits": 0 }, { "courseName": "Elective-III", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Project Work-I", "theoryCredits": 0, "practicalCredits": 4 } ], [ { "courseName": "Elective-IV", "theoryCredits": 4, "practicalCredits": 0 }, { "courseName": "Elective-V", "theoryCredits": 3, "practicalCredits": 1 }, { "courseName": "Seminar on Industrial Training", "theoryCredits": 0, "practicalCredits": 1 }, { "courseName": "Project Work-II (In House)", "theoryCredits": 0, "practicalCredits": 8 } ] ]
json
<filename>mockup/classes.json "classes":[ {"courseName":"Intro to Software Engineering", "courseNumber":"CS 180", "courseSection":"001", "quarter":"Sping 2016", "instructor":"Oben"} {"courseName":"Intro to Software Engineering", "courseNumber":"CS 183", "courseSection":"002", "quarter":"Sping 2016", "instructor":"Oben"} ]
json
complete Ikarus C42 for FS2004 with colors of the French Red-Cross, exclusive Rikoooo in partnership with the FRC. Compatible flight simulators: Photo-real scenery of Aleppo Airport and its surroundings for FS2004, included with trees, airport buildings and monuments in the city and autogen. Compatible flight simulators: This beautiful photo-realistic scenery covers the whole of Sardinia. Includes full mesh of Sardinia, the autogen for cities likes Cagliari, Alghero and Arbatax plus airfields for Torre Foghe and Perdasdefogu. Compatible flight simulators: Compatible flight simulators: Great add-on for FSX and P3D or FS2004, complete package, VC + custom gauges + models + custom sound + complete animation + 3 REF & CHECK + 3 Air Force repaint. A must have ! Compatible flight simulators: Former payware now free, this add-on is a complete package of B-66 Destroyer with virtual cockpit and 2d panel including custom gauges. Compatible flight simulators: This pack contains the aircraft and flight plans intended to tell the story of the 617 Squadron RAF Dambuster Raid on the Moehne and Eder Dams 16 – 17th May 1943. Compatible flight simulators: Yakovlev YAK-42 Version 2.0 for FS2004, beautiful outdoor model included two repaints UR-42369 Lviv Airlines and Aeroflot Yak-42 CCCP-42336, 2D panel specially designed for this add-on, read the documentation. Very great to fly, with this realism. Compatible flight simulators: FS2004 : This package includes three models, 2D panel and custom gauges, custom sounds, two Flight Model options, and 7 liveries. Top quality. Compatible flight simulators:
english
<filename>modeling/dino_loss.py from functools import partial import torch import torch.nn as nn import torch.nn.functional as F class _CELoss(nn.Module): @staticmethod def forward(t, s): return - (t * torch.log(s)).sum(dim=1).mean() class DINOLoss(nn.Module): def __init__(self, weights_momentum, center_momentum, temperature): super(DINOLoss, self).__init__() self.weights_momentum = weights_momentum self.center_momentum = center_momentum self.temperature = temperature self.softmax = partial(F.softmax, dim=1) self.center = None self.loss = _CELoss() def forward(self, student_output, teacher_output): s1, s2 = student_output t1, t2 = teacher_output if self.center is None: self.center = torch.cat([t1, t2], dim=0).mean(dim=0) s1, s2 = self.softmax(s1 / self.temperature), self.softmax(s2 / self.temperature) t1, t2 = self.softmax((t1.detach() - self.center) / self.temperature), \ self.softmax((t2.detach() - self.center) / self.temperature) self.center = self.center * self.center_momentum + ( 1 - self.center_momentum) * torch.cat([t1, t2], dim=0).mean(dim=0) return 0.5 * (self.loss(t1, s2) + self.loss(t2, s1)) if __name__ == "__main__": loss = DINOLoss(0.996, 0.996, 1.) for idx in range(10): output = loss((torch.rand(4, 1000), torch.rand(4, 1000)), (torch.rand(4, 1000), torch.rand(4, 1000)))
python
<reponame>retresco/Spyder<filename>src/spyder/processor/stripsessions.py<gh_stars>10-100 # # Copyright (c) 2011 <NAME> <EMAIL> # # stripsessions.py 14-Apr-2011 # # 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. # # """ Processor to strip all session ids from the extracted URLs. It should be placed at the very end of the scoper chain in order to process only those URLs that are relevant for the crawl. It basically searches for sid= jsessionid= phpsessionid= aspsessionid= """ from spyder.core.constants import CURI_EXTRACTED_URLS class StripSessionIds(object): """ The processor for removing session information from the query string. """ def __init__(self, settings): """ Initialize me. """ self._session_params = ['jsessionid=', 'phpsessid=', 'aspsessionid=', 'sid='] def __call__(self, curi): """ Main method stripping the session stuff from the query string. """ if CURI_EXTRACTED_URLS not in curi.optional_vars: return curi urls = [] for raw_url in curi.optional_vars[CURI_EXTRACTED_URLS].split('\n'): urls.append(self._remove_session_ids(raw_url)) curi.optional_vars[CURI_EXTRACTED_URLS] = "\n".join(urls) return curi def _remove_session_ids(self, raw_url): """ Remove the session information. """ for session in self._session_params: url = raw_url.lower() begin = url.find(session) while begin > -1: end = url.find('&', begin) if end == -1: raw_url = raw_url[:begin] else: raw_url = "%s%s" % (raw_url[:begin], raw_url[end:]) url = raw_url.lower() begin = url.find(session) return raw_url
python
There’s a lot of excitement during the festive season. We keep our worries aside, our work takes a back seat, and we are all focused on making the most of our time. With New Year around the corner, people in India are ready for some quality time with their family and friends. But while making memories, sharing gifts and feasting should be your goal this holiday season, one should be aware and conscious of one’s health. Especially, people with a heart condition or those who have high blood pressure must take extra precautions. Celebrating a festival is all about having no limitations and enjoying the day without any doubts and insecurities. But when it concerns people with pre-existing heart conditions and those prone to hypertension, then one may have to watch what they eat. Your diet and your exercise routine plays an extremely important role in managing your blood pressure levels and keeping heart disease risks at bay. That said, while you may have big plans this festive season, here are some ways you can add to your woes, causing spikes in your BP levels. Additionally, young people are likely to treat themselves with a whole lot of junk, processed foods, that are not only very oily, but also high in calories. High processed foods usually are packed with trans fats, which can increase bad cholesterol (LDL) levels and lower good cholesterol (HDL) from the body. This can further increase your risk of developing hypertension and put a lot of pressure on the heart. Apart from diet, physical activity plays a crucial role in maintaining heart health and managing BP levels. During the festive season, it is likely to lose track of your daily workout and you may cut back on your usual exercises.
english
The Kerala government will consider reopening of schools in a phased manner after the complete vaccination of children in the state but subject to the approval of the Union government and concerned COVID-19 expert agencies, General Education minister V Sivankutty said on Monday. Mr Sivankutty said digital and online classes were not a permanent solution and reopening of schools can be considered after vaccinating children in the state. "We have seen reports about schools being reopened in other states. We need to administer vaccines to the children first and there are various protocols of the union and state governments to be followed in this matter," Mr Sivakutty told the Assembly. "Once we get necessary approval of the union government and concerned COVID-19 expert committees and agencies, the state government will consider the option of reopening the schools in a phased manner," he added. He was replying to various questions raised by Legislator Ramachandran Kadannappally on the steps taken by the government to reduce the stress faced by students in the state among others. Mr Sivankutty said the state government has initiated various programmes including "Our Responsibility to Children" (ORC) to ensure the mental health of school students. "This programme ensures the mental health and welfareof the children in the state. We are also focusing on ensuring the participation of parents in all these initiatives. Digital classes with the help of experts have also been included," the minister told theAssembly. He also said that a tele-counselling programme titled 'Athijeevanam' is being organised by utilising the expertise of government doctors. "Our society has been following a routine in which studies are given more importance than the children. However, now we need to give importance to the children rather than their studies. The elders should ensure more care to the children especially when even small children are using mobile phones and the internet," he said. He said the state government was planning to organise a massive campaign on the mental health of the children and cyber security by coordinating with various agencies. (Except for the headline, this story has not been edited by our staff and is published from a syndicated feed. )
english
With just 2 spots left for the ATP Finals in London, the Rolex Paris Masters has gained a lot of steam as the final regular tournament of the ATP calendar. Day 1 of the tournament didn't feature any seeded player but had a few interesting match-ups. Enjoying a career-best season with 40 wins, 2 titles and a career-high rank of 18, Russian Karen Khachanov defeated Filip Krajinovic from Serbia 7-5, 6-2 after a sluggish start. Khachanov recorded his first ever win at the Paris Masters after saving a set point in the first set. He will play lucky-loser Matthew Ebden in the 2nd round after the Australian came in as a substitute for Kyle Edmund. Joining Khachanov in continuing a career-best season was Nikoloz Basilashvili from Georgia. The 26-year old Georgian world no. 22 beat an injured John Millman who retired after losing the first set 4-6. It was a good day for Bosnia and Herzegovina's Damir Dzumhur who earned a 100th career match win with a 6-4, 7-6(5) win over Peter Gojowczyk. He will face Greek NextGen 20-year old Stefanos Tsitsipas in the next round. During the second match of the day, Roberto Bautista Agut beat Steve Johnson 6-4, 7-6(2) to extend his lead to 6-0 against Johnson. The first day's play also had three NextGen players grinding to end the year on a high. Of them, American Frances Tiafoe was the lone survivor as he beat French veteran Nicolas Mahut 7-6(1), 6-2 to set up a clash against 4th seeded Alexander Zverev. Zverev leads Tiafoe 2-1 in their H2H but Tiafoe won the most recent clash in 3 sets, at the 2017 Cincinnati Masters. Alex de Minaur from Australia, the 19-year old who has been rising in the rankings almost every week and is now at 33 (after beginning the year at 208), 2 shy of a career-high 31, lost to Spanish qualifier Feliciano Lopez in the best match of the day. Lopez had 2 match points at 6-7(4), 6-4 and 5-4(40-15) but de Minaur saved both. De Minaur, in turn, earned 2 match points in the deciding set tiebreaker at 6-4 but failed to earn yet another impressive win. Lopez ultimately won 6-7(4), 6-4, 7-6(6) to set up a 2nd round match-up against 15th seed Diego Schwartzman. Meanwhile, Canadian teenager Denis Shapovalov suffered yet another early loss after beginning the match on a high note, his 4th loss in 5 matches. Playing against Richard Gasquet for the first time, he raced off to a 3-0 lead but squandered it immediately to lose the set 4-6. Gasquet put an exhibition of strong groundstrokes off both wings to register a 6-4, 7-6(3) win. He sets up a 2nd round match-up against defending Jack Sock, who, by the looks of it, is almost certain to suffer a catastrophic fall in the rankings. If Sock doesn't win against Gasquet, he could very well drop out of the top 150 after this week, having started the week at 23 in the rankings. Day 2 features few of the top seeds like Novak Djokovic and Marin Cilic who will begin their campaign and improve the level of tennis after a strong Day 1.
english
Hyderabad: The first batch of 335 Haj Pilgrims touched the Rajiv Gandhi International Airport on Wednesday. The Haj Chartered Flight landed 40 minutes before the scheduled time. The pilgrims were congratulated by Deputy Chief Minister Mohammed Mahmood Ali on fulfilling their lifetime desire of performing Haj. Nearly 4,900 pilgrims from Telangana, Andhra Praesh and Karnataka had gone to Haj, said Mr Syed Omar Jaleel, Secretary, Minorities Welfare department. Telangana Haj Committee special officer Prof. S. A. Shukoor said that a hassle-free Haj was performed by pilgrims and everything went peacefully except for the death of two pilgrims due to natural causes.
english
<filename>package.json<gh_stars>10-100 { "name": "fluxible-js", "version": "6.0.7", "description": "Smaller, faster, better state management system that supports asynchronicity and state persistence out of the box.", "main": "lib/index.js", "files": [ "lib/*", "__tests__/*", "package.json", "LICENSE", "README.md" ], "scripts": { "test": "npm run build && jest __tests__/unit/* --env=node --coverage", "build": "rm -rf lib && mkdir lib && npm run lint && tsc", "eslint": "eslint . --ext .js,.ts --fix", "prettier": "prettier \"*.js|*.ts\" \"src/**/*.js|src/**/*.ts\" --write", "lint": "npm run prettier && npm run eslint", "prepare": "husky install" }, "lint-staged": { "src/**/*.ts": [ "prettier --write", "eslint --fix" ], "__tests__/**/*.js": [ "prettier --write", "eslint --fix" ] }, "repository": { "type": "git", "url": "git+ssh://git@github.com/aprilmintacpineda/fluxible-js.git" }, "keywords": [ "state-management", "state-pattern", "asynchronous-state-management", "synchronous-state-management" ], "author": "<NAME>", "license": "MIT", "bugs": { "url": "https://github.com/aprilmintacpineda/fluxible-js/issues" }, "homepage": "https://github.com/aprilmintacpineda/fluxible-js#readme", "devDependencies": { "@babel/core": "^7.15.0", "@babel/eslint-parser": "^7.15.0", "@babel/node": "^7.14.9", "@babel/preset-env": "^7.15.0", "@typescript-eslint/eslint-plugin": "^5.2.0", "@typescript-eslint/parser": "^5.2.0", "@typescript-eslint/typescript-estree": "^5.2.0", "babel-core": "^7.0.0-bridge.0", "babel-eslint": "^10.1.0", "babel-loader": "^8.1.0", "babel-plugin-module-resolver": "^4.1.0", "babel-preset-minify": "^0.5.1", "eslint": "^8.1.0", "eslint-import-resolver-babel-module": "^5.3.1", "eslint-plugin-import": "^2.25.2", "eslint-plugin-jest": "^25.2.2", "eslint-plugin-module-resolver": "^1.4.0", "eslint-plugin-react": "^7.26.1", "eslint-plugin-react-hooks": "^4.2.0", "husky": "^7.0.4", "jest": "^27.0.6", "lint-staged": "^11.2.6", "prettier": "^2.4.1" }, "dependencies": { "typescript": "^4.4.4" } }
json
The first time Vaadyasya,a city-based semi-classical and Indie-Rock band,performed,they impressed the crowd. That was in 2008,at a memorial show organised for the families of the victims of the 26/11 bomb blast. A year later tragedy struck closer home and their drummer Vinit Pingle died in an accident. But the band members picked their lives together again when Ganesh Venkateswaran joined them in 2010 and set out on a fresh journey. Since then they have been performing at various venues across the city. The six-member band now features Sagar Jadhav on vocals,lead guitarist Ninad Khandekar,Siddhesh Sahsrabuddhe on rhythm guitar,Deepak Ukey on bass,keyboardist Anup Sakpal and Ganesh Venkateswaran on the drums. We all have very tight schedules. Ninad and Siddhesh are still pursuing engineering while the rest of us work but we make it a point to jam at least once in 10 days, says Venkateswaran. Though the band is yet to come out with their own album,they have created an instrumental composition called Introraagh. We usually perform cover songs from Bollywood or old classical ghazals and give it our unique touch of classical rock, says Venkateswaran. Now they are gearing up for their next performance at the TEE party to mark the inauguration of Punes first in-township Golf Course at Blue Ridge,Hinjewadi. The band will be performing the opening act for Agnee. It’s a big accomplishment for us to be sharing the stage with a band like Agnee and we are really looking forward to it, he adds.
english
LeBron James, the legendary NBA player, recently put an end to lingering rumors about his alleged infidelity. However, his recent social media activity has once again raised eyebrows and sparked speculation. LeBron liked a post by Snoop Dogg. This post featured an image comparing teachers of the past to teachers now. It implied that teachers have become more attractive in recent times. This unexpected endorsement has ignited discussions among fans and the public regarding LeBron’s views on the matter. Throughout his illustrious 19-year career, LeBron James has managed to avoid off-court controversies. It’s a commendable feat that few athletes can claim. His commitment to maintaining a squeaky-clean image has been widely recognized and admired. However, his recent liking of Snoop Dogg’s post has drawn attention. It has led to speculations about his personal opinions on the subject. LeBron James has always been known for steering clear of controversies and scandals, both on and off the basketball court. His reputation as a responsible and respectful individual has been well-established. While his liking of Snoop Dogg’s post and potential agreement with the sentiment expressed in it could be seen as harmless amusement, it has also opened the door to interpretation. Some observers speculate that LeBron’s endorsement of the post may indicate his personal agreement with the notion that teachers today are more attractive compared to the past. Adding fuel to the fire were the past cheating rumors involving LeBron James and social media influencer YesJulz. However, YesJulz recently addressed the rumors in a viral video, categorically denying any romantic relationship with the NBA superstar. LeBron himself remained silent during the initial wave of allegations, allowing speculation to grow. With YesJulz’s denial, the rumors have been effectively debunked, putting an end to the speculation surrounding LeBron’s faithfulness to his wife, Savannah James. Savannah James, a pillar of strength and support throughout LeBron’s career, has made a conscious decision to lead a private life. She has consistently focused on being a devoted wife and mother to their three children rather than seeking the limelight or engaging in gossip. In a recent interview, Savannah explained that her priority was to pour her energy into raising their children and supporting LeBron. She expressed discomfort with putting herself out there for public scrutiny. Savannah’s refusal to address rumors publicly has shielded her from unnecessary attention and negative comments. She understands the perils of diving into the world of internet comments, recognizing the potential harm it can cause. Instead, Savannah has chosen to prioritize her family’s well-being and protect their privacy. This has allowed her and LeBron’s enduring bond to withstand the challenges that come with fame and scrutiny.
english
import React from 'react'; import goBackButton from '../styles/images/interface/back button hex match.png' import { useHistory } from 'react-router-dom' const goBackButtonStyles = { backgroundImage: `url("${goBackButton}")`, backgroundSize: '100% 100%', flexGrow: 0 } const GoBackButton = ({ height = 50, width = 50, style }) => { const history = useHistory() const onClick = () => { history.goBack() } return ( <div onClick={onClick} style={{ ...goBackButtonStyles, height, width, ...style }}></div> ) } export default GoBackButton;
javascript
package com.hangon.fragment.order; import java.io.Serializable; /** * Created by Administrator on 2016/5/3. */ public class ZnwhInfoVO implements Serializable { private int userId;//用户 private double mileage;//所行驶的公里数 private int oddGasAmount;//剩余的汽油百分比 private int isGoodEngine;//引擎状况 private int isGoodTran;//变速器状况 private int isGoodLight;//车灯状况 public ZnwhInfoVO() { } public int getUserId() { return userId; } public void setUserId(int userId) { this.userId = userId; } public double getMileage() { return mileage; } public void setMileage(double mileage) { this.mileage = mileage; } public int getOddGasAmount() { return oddGasAmount; } public void setOddGasAmount(int oddGasAmount) { this.oddGasAmount = oddGasAmount; } public int getIsGoodEngine() { return isGoodEngine; } public void setIsGoodEngine(int isGoodEngine) { this.isGoodEngine = isGoodEngine; } public int getIsGoodTran() { return isGoodTran; } public void setIsGoodTran(int isGoodTran) { this.isGoodTran = isGoodTran; } public int getIsGoodLight() { return isGoodLight; } public void setIsGoodLight(int isGoodLight) { this.isGoodLight = isGoodLight; } }
java
# Copyright (c) 2014 Rackspace, 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. from zaqarclient.queues.v1 import core from zaqarclient.queues.v1 import iterator as iterate from zaqarclient.queues.v1 import message class Claim(object): def __init__(self, queue, id=None, ttl=None, grace=None, limit=None): self._queue = queue self.id = id self._ttl = ttl self._grace = grace self._age = None self._limit = limit self._message_iter = None if id is None: self._create() def __repr__(self): return '<Claim id:{id} ttl:{ttl} age:{age}>'.format(id=self.id, ttl=self.ttl, age=self.age) def _get(self): req, trans = self._queue.client._request_and_transport() claim_res = core.claim_get(trans, req, self._queue._name, self.id) self._age = claim_res['age'] self._ttl = claim_res['ttl'] self._grace = claim_res.get('grace') msgs = claim_res.get('messages', []) self._message_iter = iterate._Iterator(self._queue.client, msgs, 'messages', message.create_object( self._queue )) def _create(self): req, trans = self._queue.client._request_and_transport() msgs = core.claim_create(trans, req, self._queue._name, ttl=self._ttl, grace=self._grace, limit=self._limit) # extract the id from the first message if msgs is not None: if self._queue.client.api_version >= 1.1: msgs = msgs['messages'] self.id = msgs[0]['href'].split('=')[-1] self._message_iter = iterate._Iterator(self._queue.client, msgs or [], 'messages', message.create_object( self._queue )) def __iter__(self): if self._message_iter is None: self._get() return self._message_iter @property def age(self): self._get() return self._age @property def ttl(self): if self._ttl is None: self._get() return self._ttl def delete(self): req, trans = self._queue.client._request_and_transport() core.claim_delete(trans, req, self._queue._name, self.id) def update(self, ttl=None, grace=None): req, trans = self._queue.client._request_and_transport() kwargs = {} if ttl is not None: kwargs['ttl'] = ttl if grace is not None: kwargs['grace'] = grace res = core.claim_update(trans, req, self._queue._name, self.id, **kwargs) # if the update succeeds, update our attributes. if ttl is not None: self._ttl = ttl if grace is not None: self._grace = grace return res
python
Original with; Punjab Vidhan Sabha which are followed. When the Chair says that no hon. Member could catch its eye and the motion was put then it is not proper to interrupt the proceedings of the House after that.) ਕਾਮਰੇਡ ਭਾਨ ਸਿੰਘ ਭੋਰਾ : ਮੈਨੂੰ 5 ਮਿੰਟ ਬੋਲਣ ਲਈ ਜ਼ਰੂਰ ਦਿਉ । ਮੈਂ ਬੋਲਣਾ ਹੈ......(ਸ਼ੋਰ) Deputy Speaker: The hon. Member Comrade Bhan Singh Bhaura should please resume his seat. Comrade Bhan Singh Bhaura : Madam, I am within my right to speak on the Bill. Digitized by; Panjab Digital Library PUNJAB VIDHAN SABHA (Noise and Uproar in the House) Deputy Speaker: Question is[7TH APRIL, 1965 That the Punjab Excise (Amendment) Bill, be passed. The motion was carried (Uproar and Noise in the House) (The Sabha then adjourned till 9.30 a.m., on Thursday, the 8th April, 1965)
english
1 A'e re uzapo wi Izaew iaiw ma'e Tupàn henataromo wà. A'e rupi umur kar Minià izuapyapyr a'e pe wakutyr wà, ma'erahy ipuraraw kar pà wanupe wà. Minià umumaw 7 kwarahy wazar romo wiko pà wà. 2 Izaew uzeàmim Minià wanuwi wà, ywykwaruhu pupe wà, ywytyruhu wamyter pe wà no. Ta'e Minià ikàg wera'u wanuwi wà xe. 3 Aze Izaew utym ma'eà'yz oho wà, Minià uzemono'og oho Amarek ywy rehe har wanehe we wà, Izaew waàmàtyry'ym pà wà. 4 Upyta waiwy rehe wà, uker haw iapo pà a'e pe wà. Umumaw wanemi'u imonokatu haw wà. Uhem Kaz ywy rehe wà, kwarahy hemaw awyze har kutyr har pe wà. Nuezar kwaw temi'u Izaew wanupe wà. Ni pitài àràpuhàràna'yr nuezar kwaw wà. Ni pitài tapi'ak wà. Ni pitài zumen wà. 5 Heta tetea'u wà, nuzawy kwaw tukur wà. Werur weimaw tapi'ak wà. Werur wàpuzràn wà no. Heta tetea'u wà. Heta tetea'u waneimaw kàwàruràn kamer her ma'e wanupe no. Teko nupuner kwaw waneta haw ipapar haw rehe wà. Ur ywy imumaw pà wà. 6 Upuraraw kar tuwe ma'erahy Izaew wanupe wà. A'e rupi Izaew uze'eg Tupàn pe wà. — Urepytywà pe nehe, i'i izupe wà. 7 Uze'eg izupe Minià wanehe wà. 8 Waze'eg mehe Tupàn umur kar amo uze'eg imume'u har a'e pe wanupe kury. — Nezewe i'i Tupàn Tuweharupi Wiko Ma'e iko peme a'e kury. — Kwehe mehe apupyro Ezit ywy rehe pemuma'erekoahy kar awer wi ihe, i'i iko peme, i'i wanupe. 9 Apupyro Ezit ywy rehe har wanuwihawete wi ihe. Apumuhem kar ma'erahy ipuraraw kar har wanuwi. Amuhem kar ko ywy rehe har penenatar wi ihe wà. Amono waiwy peme. 10 — Aiko Tupàn pezar romo ihe. Pemuwete katu zo Amohe ywy rehe har wazar tupàn a'ua'u wà nehe, ywy peneko haw rehe har wà nehe, a'e peme. Naperuzar kwaw heze'eg, i'i Tupàn teko wanupe. 11 Na'e amo Tupàn heko haw pe har ur amo ywyra kawar her ma'e iwy pe wapyk pà a'e kury. Opira taw huwake hin a'e ywyra. Zoaz Amiezer iànàm a'e, a'e ywyra izar romo hekon a'e. Ta'yr Zineàw oxooxok arozràn iko ma'e'a kwer iàmi haw pe. Uzeàmim a'e pe zauxiapekwer iaiw ma'e Minià izuapyapyr wanuwi. — Aze ru'u naherexak kwaw wà nehe, i'i uzeupe. 12 Na'e a'e Tupàn heko haw pe har uzexak kar izupe a'e pe kury. — Ma'e wi ukyze 'ym ma'e romo ereiko. Tupàn wiko nerehe we a'e, i'i Zineàw pe. 13 Uze'eg Zineàw izupe. — Aze Tupàn wiko teko heànàm wanehe we, màràzàwe tuwe agwer iaiw ma'e uzeapo waiko urewe wà. Ureràmuz umume'u Tupàn hemiapo kwer ikatuahy ma'e urewe wà. Màràzàwe tuwe nuzapo kwaw agwer ma'e ko 'ar rehe. Upuir urewi a'e, Minià wanupe uremono pà a'e. 14 Na'e Tupàn Tuweharupi Wiko Ma'e uze'eg Zineàw pe kury. — Eho nekàgaw rupi Izaew izuapyapyr wapyro pà Minià wanuwi ne wà nehe ty. Ihe ae oromono kar ihe, wapyro àwàm iapo kar pà newe, i'i izupe. 15 — Ma'e azapo putar Izaew wapyro pà ihe nehe. Naheremetarer kwaw ihe. Heànàm Manaxe izuapyapyr nahemetarer kwaw a'e wà. Naiko kwaw ikàg ma'e romo ihe. Hepyw wera'u heànàm paw wanuwi, i'i izupe. 16 — Erepuner wapyro haw rehe nehe, ta'e urupytywà putar ihe nehe xe. Eremumaw putar Minià upaw rupi ne wà nehe, pitài awa zuka haw ài ne wà nehe, i'i izupe. 17 Aze hekatu newe nehe, ezapo amo ma'e purumupytuhegatu kar haw ihewe nehe, Tupàn ete romo nereko haw hexak kar pà ihewe nehe. 18 Arur putar amo ma'e heremimono ràm newe nehe. Eho zo xe wi imono 'ym mehe we nehe, i'i Tupàn pe. — Apyta putar xe kury. Nezewyr mehe aiko putar xe nehe, i'i Tupàn heko haw pe har Zineàw pe. 19 Wixe Zineàw wàpuz me kury. Umupupur àràpuhàrànete ho'o kwer. Uzapo typy'ak imuapiruru kar pyr 'ym no. Umumaw 10 kir arozràn iku'i kwer iapo mehe. Na'e omono a'e temi'u amo kok pupe. Itykwer omono amo kawaw pupe. Weraha Tupàn heko haw pe har pe upaw rupi. Ywyra iwy pe hin a'e 'ar mehe. 20 Na'e Tupàn heko haw pe har uzapo kar ma'e Zineàw pe kury. — Emuapyk a'e àràpuhàràn ro'o kwer 'àg ita rehe kury. Emono a'e typy'ak hehe no. Emuàkym itykwer hehe nehe, i'i izupe. Uzapo Zineàw hemiapo karer. 21 Na'e Tupàn heko haw pe har werupoe'eg wywyrapokokaw a'e temi'u i'aromo kury. Umuhyk iapyr ho'o kwer rehe kury, typy'ak rehe no. Na'e tata uhem ita wi kury, a'e temi'u hapy pà kury. Na'e Tupàn heko haw pe har ukàzym tàrityka'i kury. 22 A'e rupi Zineàw ukwaw Tupàn heko haw pe har romo heko haw a'e kury. Ukyze katu izuwi. — Tupàn hezar. Aexak tuwe Tupàn heko haw pe har huwa kwez ihe kury, i'i uzeupe. 23 Uze'eg Tupàn Tuweharupi Wiko Ma'e izupe kury. — Ekyze zo nehe, ty. Ikatu upaw rupi. Neremàno kwaw nehe, i'i izupe. 24 Uzapo Zineàw ma'ea'yr hapy haw a'e pe Tupàn pe kury. Omono her izupe. — Tupàn Tuweharupi Wiko Ma'e purupe ukatu haw herur har romo hekon a'e, i'i her. Te ko 'ar rehe a'e ma'ea'yr hapy haw Opira tawhu pe hin. Amiezer iànàm wiko a'e tawhu izar romo wà. 25 Pyhaw kwarahy heixe re Tupàn uze'eg Zineàw pe kury. — Epyhyk tapi'ak awa neru heimaw kury. Ekar amo tapi'ak awa 7 kwarahy hereko har nehe no. Eraha a'e mokoz tapi'ak ma'ea'yr hapy haw tupàn ua'u Ma'aw her ma'e henataromo har pe nehe, neru ywy rehe har pe nehe. Eityk a'e ma'ea'yr hapy haw nehe. Heta amo ita upu'àm ma'e Ma'aw imuwete katu haw huwake. Eityk nehe no. Tapi'ak ikàgaw nepytywà putar heityk mehe. 26 A'e re emono'ono'og ita ikatu ma'e tetea'u nehe, amo ma'ea'yr hapy haw iapo pà xe herenataromo nehe. Ta'e ywatea'u xe a'e xe, ta'e naheta kwaw heàmàtyry'ymar xe a'e wà xe. A'e re epyhyk tapi'ak 7 kwarahy hereko har nehe. Epyhyk ywyra tupàn a'ua'u pe imupu'àm pyrer nehe no. Emonohonohok zepe'aw romo nehe. Emunyk tata ywyra rehe nehe. Eapy tapi'ak hehe nehe, Tupàn henataromo nehe, izupe imonokatu pyr romo nehe, i'i izupe. 27 Weraha Zineàw 10 uzeupe uma'ereko ma'e uzeupi wà. Uzapo ma'e Tupàn ze'eg rupi katete wà. Ukyze wànàm wanuwi a'e, teko a'e tawhu pe har wanuwi a'e no. A'e rupi nuzapo kwaw a'e ma'e 'ar romo. Pyhaw zo uzapo. 28 Iku'egwer pe izi'itahy, awa tawhu pe har upu'àm mehe wà, wexak Ma'aw pe ma'ea'yr hapy haw heityk awer wà. Wexak ita upu'àm ma'e heityk awer wà no. Wexak tapi'ak 7 kwarahy hereko har hapy pyrer ma'ea'yr hapy haw a'e pe iapo pyrer rehe wà no. 29 A'e rupi upuranu uzehezehe wà. — Mon aipo uzapo a'e ma'e paw wà, i'i wà. Upuranu oho amogwer teko wanehe wà. Amo umume'u Zineàw Zoaz ta'yr a'e ma'e iapo arer romo heko haw wà. 30 A'e rupi uze'eg oho Zoaz pe wà. — Erur nera'yr xe nehe, ta'e uruzuka putar zane nehe xe. Ta'e weityk ma'ea'yr hapy haw Ma'aw henataromo arer a'e xe, ta'e weityk ita tupàn a'ua'u wanenataromo imupu'àm pyrer a'e no xe. 31 Zoaz uze'eg a'e pe har uzemono'og ma'e paw wanupe. Aipo pezuka putar amo teko ta'e Ma'aw na'ikatu kwaw izupe a'e xe. Aze amo upyro Ma'aw imuwete katu pà wà nehe, a'e teko umàno putar kwarahy ihem 'ym mehe we, ku'em 'ym mehe we wà nehe. Aze Ma'aw Tupànete romo hekon, tuwe uzepyro wàmàtyry'ymar wanuwi nehe. Ta'e a'e ae a'e ma'ea'yr hapy haw izar romo hekon a'e xe, i'i wanupe. 32 A'e 'ar henataromo teko omono amo ae her Zineàw pe wà. Zeruma'aw her pyahu romo kury. Tuwe Ma'aw uzepyro wàmàtyry'ymar wanuwi nehe, i'i her zaneze'eg rupi. Ta'e Zoaz nezewe i'i a'e xe. — A'e ae a'e ma'ea'yr hapy haw izar romo hekon a'e xe, i'i wanupe. 33 A'e rupi Minià izuapyapyr paw wà, Amarek ywy rehe har paw wà no, ywyxiguhu rehe har paw wà no, uzemono'ono'og wà wà kury. Wahaw Zotàw yrykaw wà. Upytu'u uker haw iapo pà ywy ywytyr wamyter pe har Zereew her ma'e rehe wà. 34 Tupàn rekwe puràg ur Zineàw rehe we kury. Wiko izar romo kury. Upy Zineàw uxi'àm àràpuhàràn i'ak kwer iapo pyrer kury. Awa kwer Amiezer iànàm oho hehe we uzemono'ono'og pà wà kury. 35 Omono kar uze'eg heraha har amogwer Izaew izuapyapyr wanupe wà no, zauxiapekwer wanenoz pà wà no. Manaxe izuapyapyr wà, Azer izuapyapyr wà, Zemurom izuapyapyr wà, Napitari izuapyapyr wà. Oho hehe we uzemono'ono'og pà upaw rupi a'e wà no. 36 Na'e Zineàw uze'eg Tupàn pe kury. — Tupàn. Erepyro kar Izaew kwez ihewe wà, i'i izupe. 37 — Ikatuahy nezewe haw. Amono putar àràpuhàràn hawer arozràn ixoixokaw rehe nehe. Pyhewe ku'em mehe aexak putar aha nehe. Aze heta zuwiri hawer rehe nehe, aze naheta kwaw zuwiri ywy rehe hawer izywyr nehe, a'e mehe akwaw putar Izaew wapyro àràm romo hemuigo kar awer ihe nehe. 38 Uzeapo ma'e ize'eg rupi katete a'e. Iku'egwer pe Zineàw upu'àm uker ire. Azàmi àràpuhàràn hawer oho. Uhem 'y izuwi. 'Y izuwi uhem ma'e kwer umynehem amo kawaw. Naheta kwaw zuwiri ka'api'i rehe. 39 A'e rupi wenoz amo ma'e Tupàn pe kury. — Eikwahy zo herehe nehe, Tupàn. Tuwe aze'eg wi newe kury. Tuwe uruagaw wi àràpuhàràn hawer pupe nehe. Tuwe ikàg nehe. Tuwe heta zuwiri ywy rehe àràpuhàràn hawer izywyr rehe nehe. 40 Umuzeapo kar ma'e heminozgwer rupi katete pyhaw. Ikàgatu àràpuhàràn hawer. Ywy izywyr har rehe heta tetea'u zuwiri kury.
english
{"word":"pupillarity","definition":"The period before puberty, or from birth to fourteen in males, and twelve in females."}
json
<filename>tests/checkable.spec.tsx /* eslint-disable react/jsx-no-bind */ import React from 'react'; import { mount } from './enzyme'; import Cascader from '../src'; describe('Cascader.Checkable', () => { const options = [ { label: 'Light', value: 'light', }, { label: 'Bamboo', value: 'bamboo', children: [ { label: 'Little', value: 'little', children: [ { label: 'Toy Fish', value: 'fish', }, { label: 'Toy Cards', value: 'cards', }, ], }, ], }, ]; it('customize', () => { const onChange = jest.fn(); const wrapper = mount(<Cascader options={options} onChange={onChange} open checkable />); expect(wrapper.exists('.rc-cascader-checkbox')).toBeTruthy(); expect(wrapper.exists('.rc-cascader-checkbox-checked')).toBeFalsy(); expect(wrapper.exists('.rc-cascader-checkbox-indeterminate')).toBeFalsy(); // Check light wrapper.find('.rc-cascader-checkbox').first().simulate('click'); expect(wrapper.exists('.rc-cascader-checkbox-checked')).toBeTruthy(); expect(onChange).toHaveBeenCalledWith( [['light']], [[expect.objectContaining({ value: 'light' })]], ); onChange.mockReset(); // Open bamboo > little wrapper.clickOption(0, 1); wrapper.clickOption(1, 0); // Check cards wrapper.clickOption(2, 1); expect(wrapper.exists('.rc-cascader-checkbox-indeterminate')).toBeTruthy(); expect(onChange).toHaveBeenCalledWith( [ // Light ['light'], // Cards ['bamboo', 'little', 'cards'], ], [ // Light [expect.objectContaining({ value: 'light' })], // Cards [ expect.objectContaining({ value: 'bamboo' }), expect.objectContaining({ value: 'little' }), expect.objectContaining({ value: 'cards' }), ], ], ); }); });
typescript
IMPACT Wrestling has been advertising Rich Swann defending the IMPACT World Title against Tommy Dreamer as the main event of No Surrender. However, Dreamer does not sound as sure as the promotion in promoting the contest. Although IMPACT Wrestling has advertised and promoted this encounter, Tommy Dreamer has never accepted Swann's challenge ahead of the special event. The former ECW Heavyweight Champion made sure to repeat this several times during today's IMPACT Wrestling Press Pass. Speaking to SK Wrestling, Tommy Dreamer brought up WWE's last huge supershow, Royal Rumble 2021, and how their advertised main event was changed the week before the show. Dreamer stated: "The Royal Rumble, one of the main events was Adam Pearce vs. Roman Reigns. And that was the week before the Royal Rumble. And then they changed it. It's apart of when you're doing compelling television or you want people stay tuned. Like I said, you have to tune in on Tuesday to see what I say that's going to happen for Saturday. I want it in my heart, I want it." If Tommy Dreamer does accept the challenge, he stands a chance to win the IMPACT World Championship on his 50th birthday, which will make the occasion a whole lot sweeter. Tommy Dreamer bringing up Adam Pearce is interesting because Pearce holds a similar position that the IMPACT Wrestling star has held in the past. Back during his time with WWE, Dreamer worked as a road agent and WWE official, which is what Pearce does behind the scenes for the company. Unlike Dreamer, Pearce has seen his role evolve to on-air talent as an authority figure of RAW and SmackDown over the past few months. Tommy Dreamer works as an agent for IMPACT Wrestling as well, but he has not let that stop him from mixing it up with the current crop of talent. Fans will have to see what transpires when he steps in the ring with Rich Swann for the first time at No Surrender.
english
Marketing team put glamorous Aishwarya Rai on Jazbaa posters, says Sanjay Gupta: 'That was not my film' Jazbaa director Sanjay Gupta has said he had let down Aishwarya Rai and Irrfan Khan by not fighting with the studio heads who did the wrong marketing by featuring them in glamorous avatars on the posters. Jazbaa wrapped up at around ₹25. 23 crore nett at the domestic box office. Aishwarya played a lawyer, whose daughter is kidnapped and Irrfan joins her in the capacity of a cop to help her. It marked Aishwarya's comeback in films after a five-year-long break. Talking about the film, Sanjay told Times of India in an interview, “Jazbaa was a case of very bad marketing. The team that was marketing the film suddenly put out these posters and banners of a very glamorous Aishwarya Rai running in a leather jacket. That was not my film. They put out these posters of Irrfan posing in sunglasses and a leather jacket. That was not my film. " Jazbaa was the Hindi remake of 2007 South Korean film Seven Days. It also starred Shabana Azmi, Jackie Shroff, Atul Kulkarni and Chandan Roy Sanyal.
english
Virat Kohli and his men are all set to don the new blue and orange away jersey against England on Sunday. The decision has been taking so that India’s usual blue kit doesn’t contradict England’s jersey at Edgbaston in Birmingham. Speaking about the kit, Nike highlighted the science behind the design and mentioned it is solely inspired by the new generation of India. "The ODI and Away Kit designs launched this year are inspired by the young new generation of India and the fearless spirit of the national teams," Nike India stated in a press release. It will be the first time in the history of the Indian cricket team that the Men in Blue will move to a different colour. There have been talks regarding the kit on social media, but nothing official was made until the England game. Meanwhile, India will look to continue their winning run in Birmingham on Sunday, especially in a time when their opponents, England, are coming on the back of two back to back defeats. India, on the other hand, defeated two-time World Cup winners, West Indies by 125 runs on Thursday.
english
Zoey Stark is finally meeting Rhea Ripley one-on-one at WWE Survivor Series. The former NXT Women’s Tag Team Champion will challenge Mami for the Women’s World Championship at the upcoming Premium Live Event in Chicago. Stark earned her shot at Ripley’s world title by winning the battle royal on WWE RAW tonight. The 29-year-old star last eliminated Shayna Baszler with a spinning DDT on the apron. The challenger then confronted the champion during a backstage segment. The pair had met in their Fatal Five-way match at Crown Jewel 2023. With that being said, let’s take a look at three possible reasons as to why Zoey Stark is facing Rhea Ripley at WWE Survivor Series: Zoey Stark has always been great inside the ropes. She had a solid run in Triple H’s version of NXT, where she captured the women’s tag titles alongside IYO SKY. She was also involved in a title program with Mandy Rose but failed to beat her for the NXT Women’s Championship. Stark made her main roster debut on May 8 in a match against Nikki Cross. She soon entered into an alliance with Trish Stratus but turned face at Payback. By giving her a title match at WWE Survivor Series, Triple H could wish to establish Stark as a singles star. Zoey Stark hit Rhea Ripley with her Z-360 finisher but couldn’t capitalize on her momentum at Crown Jewel 2023. The Eradicator recovered and planted Stark with an avalanche riptide. She then pinned Shayna Baszler for the win. It is possible that Zoey Stark could be a one-time feud for Rhea Ripley till The Eradicator eventually moves on to a long-term opponent like Shayna Baszler or Raquel Rodriguez. The Queen of Spades might be next in line for the title shot because she was the last person to be eliminated in the battle royal. WWE has dropped major teases for Rhea Ripley versus Becky Lynch in the past. Both bumped into each other on multiple occasions. The Man has also called out Mami for not being a fighting champion on an episode of WWE RAW. Becky Lynch was supposed to compete in the battle royal tonight on RAW but was taken out by Xia Li before she could enter the ring. Lynch also has a history with Stark, and the whole angle can potentially lead to the eventual Ripley versus Lynch somewhere down the line. Fans can check out the live results of WWE RAW here.
english
<section class="thirteen columns"> <h1>Education</h1> <article> <header> <h1>M.S. in Computer Science and Engineering</h1> <span>Pohang University of Science and Technology (POSTECH)</span> <span><time> Mar. 2018 to Aug. 2021</time></span> </header> <p> Database and Data Mining Lab <br/> <em>Thesis: A Semantic Equivalence Check Tool for Evaluating Text-to-SQL Models</em> </p> </article> <article> <header> <h1>B.S. in Computer Science and Engineering</h1> <span>Pohang University of Science and Technology (POSTECH)</span> <span><time> Mar. 2013 to Feb. 2018</time></span> </header> <!-- <p> <em>Dissertation: Te dicit scripta nec, nec illud decore partem et.</em> </p> --> </article> </section>
html
<filename>server/src/main/java/com/marspie/framework/common/controller/BaseController.java package com.marspie.framework.common.controller; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.RestController; import javax.persistence.MappedSuperclass; /** * @author alex.yao * @create 2018-01-01 16:12 **/ public class BaseController { protected Logger logger = LoggerFactory.getLogger(getClass()); }
java
Episode 1062 of the One Piece anime, titled Three Sword Style of the Supreme Ruler! Zoro vs King concludes the clash between Roronoa Zoro, the second strongest member of the Straw Hat Pirates, and King, the most powerful subordinate of Kaido. Factoring in his Lunarian powers, King could endure Zoro's attacks, despite them packing enough power to hurt even Kaido. As one of his swords, Enma, started reacting uncontrollably, Zoro understood that the blade was testing him. Gaining awareness of his "kingly ambitions," the Straw Hat revealed himself as one of the few natural-born Conqueror's Haki users who can even unleash the advanced version of this power. Thus, in a exciting moment, Zoro ascended to new heights as a master swordsman. During the raid on Onigashima, the five strongest Supernovas - Luffy, Zoro, Law, Kid, and Killer - challenged Kaido and Big Mom. As the battle raged, the two Emperors launched a devastating combined attack. Zoro blocked the hit, protecting the others but suffering grievus injuries. As Kaido knocked out Luffy, Zoro gathered the last of his strength and used his Nine Sword Style: Ashura to fight the Emperor. In the ensuing clash, the green-haired pirate inflicted a large cut on Kaido's chest, leaving him with a scar. However, this wasn't enough to defeat him. With no energy left, Zoro collapsed shortly after. Chopper injected him with a medicine that would instantly heal him but at the cost of subsequent repercussions. King tried to kill Zoro while he was still receiving medical treatment, but Marco managed to block the strike. As the medicine kicked in, Zoro recovered. He hit King with Three Sword Style: Purgatory Oni Giri, but the latter got up unfazed. As such, the two right-hand men started clashing. King used a special mechanism to disarm Zoro from his swords and tried to punch him, but the latter managed to block the strike. King then employed his Ancient Zoan Fruit to turn himself into a human-pteranodon hybrid. Unleashing a barrage of flying slashes, he blasted Zoro out of the Live Floor. He then charged him with Imperial Archer while Zoro performed his Three Sword Style: Ultra Tiger Hunt. Although Zoro broke part of King's helmet, he was blown away with tremendous force through the Skull Dome's outer wall. King attempted to push Zoro off Onigashima with another strike, but the latter used his Two Sword Style: Clear Lance to move in mid-air and return on the island. Propelling his head forward at extreme speed, like a slingshot, King performed Imperial Deep Pride Stake, a destructive move which the Straw Hat barely dodged. In response, Zoro unleashed his Three Sword Style: Black Rope Dragon Twister, a technique strong enough to cut through Kaido's tough dragon scales, wounding him. Shockingly, King completely blocked the attack, declaring that his durability surpasses even that of dinosaurs and dragons. The two right-hand men coated their swords in Armament Haki and clashed once more, with King prevailing. Suddenly, one of Zoro's swords, Enma, started draining his Haki. King then created a massive explosion, but Zoro used his Armament Haki to protect himself. He then performed One Sword Style: Death Lion Song, cutting King at such speed that the latter couldn't even react. Nevertheless, he instantly recovered from the strike, appearing undamaged. As Enma resumed draining Zoro's Haki, King exploited the issue to hit him with a powerful blow. Collecting back his swords, Zoro recalled how he obtained them. He also remembered his childhood meeting with Kozaburo Shimotsuki, an old swordsmith who taught him that each blade has its own personality. To properly wield a sword, one must adapt to its will. Kozaburo's best creation was Enma, the blade that tests the wielder by draining away his Haki. Someone lacking in power would fail the trial. Realizing that Enma had been testing him, Zoro figured out what to do to master the sword, like Oden Kozuki. Surrounded by a group of lower members of the Beasts Pirates, Zoro unleashed his Conqueror's Haki, causing them to pass out instantly. King asked Zoro about his "kingly ambitions," to which he answered that he must fulfill them to honor his promises to his captain and best friend. Realizing that when King deactivates his flames, his speed increases and his outstanding durability decreases, Zoro wounded him with a well-timed strike that exposed his face, revealing his Lunarian traits. Enraged, King killed his henchmen who spoke of the reward the World Government would offer anyone with information on a Lunarian. Coating his swords in Conqueror's Haki and Armament Haki, Zoro unleashed his "King of Hell Style." After remembering the day, Kaido recruited him as his right-hand man and gave him a new name, the formerly called Alber dodged Zoro's King of Hell: Three Sword Style: Purgatory Onigiri, a projected slash. King retaliated with Imperial Flaming Wings, a serpentine dragon of flames with the same properties as magma, but Zoro dodged as well. The Lunarian tried to disarm Zoro off his swords, but the latter stopped his attempt by pushing him back with a Haki barrier. As King temporarily dropped his flame to boost his speed, Zoro tracked his movement and counterattacked him with a Conqueror's Haki-enhanced One Sword Style: Bird Dance. Sliced through his chest, King understood that Zoro had obtained the power to seriously hurt him now. Taking flight high in the sky, King unleashed his strongest move, Extra Large Imperial Flaming Wings, an enormous dragon created out of his Lunarian flames. In response, Zoro coated his swords in Armament and Conqueror's Haki and dashed towards King. The green-haired swordsman jumped into the air and performed a devastating technique called the King of Hell: Three Sword Serpent: Dragon Damnation. With his chest deeply cut, one of his wings sliced off, and his sword was broken in half, King lost the clash and was completely annihilated. After remembering his promise to Luffy, Zoro declared himself the "King of Hell". He then performed Clear Lance to return to Onigashima. As the repercussions of the Minks medicine caused him to suffer double the injuries, pain, and fatigue from the previous battles, Zoro lost his senses. Combining his Lunarian powers with his Ancient Zoan, King showcased durability even greater than Kaido's. A testament to this, King didn't even shed a single drop of blood after being struck with Zoro's slashes, despite them packing enough power to wound Kaido multiple times. To overcome King's immensely resilient Lunarian body, Zoro had to understand the former's powers and improve his own destructive abilities even more, coating his attacks with Conqueror's Haki in addition to Armament Haki. Until then, Zoro was unable to damage King and lost most of their clashes. Granted, the instant medicine healed the damage that Zoro's body suffered against the Emperors but didn't replenish his Haki. Additionally, Enma started testing him during the battle, causing him to waste a lot of energy and leave himself open to King's attacks. Despite such nerf, Zoro held his own decently. After upgrading his Haki powers, Zoro countered or straight up overpowered anything his foe tried to do. Completely outclassed by Zoro's overwhelming might, King ended up slaughtered, with his sword broken and one of his wings torn off. The Advanced Conqueror's Haki boosted Zoro's strength on a whole different level. Characters who can use this ability are inherently among the mightiest fighters by the mere virtue of possessing such a power, which Kaido described as the signature skill of the absolute strongest. Broadly speaking, a superior Haki equates to a stronger character. In One Piece, the most resolute fighters have greater willpower, which results in a more powerful Haki, allowing them to potentially overcome any foe. Merging Conqueror's Haki and Armament Haki to create the King of Hell Style, Zoro became strong enough to annihilate Kaido's strongest subordinate, a fighter of the same caliber as Marco and Katakuri. This game-changing power-up allows Zoro to eclipse even the most powerful Commander-level fighters, as his strength is now approaching the realm of Admirals and Emperors. Such a major status is only fitting for the future World's Strongest Swordsman and right-hand man of the future Pirate King. Zoro's dream to become the World's Strongest Swordsman comes from his "kingly ambitions" as a natural-born Conqueror. The World's Strongest Swordsman is indeed the king of all swordsmen, i.e., the one who surpasses them all, sitting at the top of the One Piece world as the most powerful. Zoro and King went blow for blow relentlessly until the green-haired swordsman unleashed his newfound Haki powers to crush his foe. The two right-hand men fought with commendable determination to honor their captains, making the battle one of the best showdowns ever featured in One Piece. Tapping into his memories, Zoro gained awareness of the enormous power that lay dormant within him and fully unleashed it to fulfill his promises to Luffy and Kuina. He then reaffirmed his resolve to become stronger, surpassing any foe on Luffy's behalf. Since their first meeting, when Kaido recruited him as his right-hand man and gave him the name "King" in recognition of his power, the formerly called Alber followed his captain loyally, considering him to be the legendary Joy Boy who would change the One Piece world. He sincerely regarded Kaido as the absolute strongest. Even in his final moments, King thought of his captain, remembering that he promised him to never lose in battle until Kaido would become the Pirate King.
english
Panaji, Jun 19 (IANS): Fearing that a fish famine could pose a serious threat to the availability of the staple food of the coastal state, the Goa government apart from notifying the "Goa State Mariculture Policy 2020" to carry out open sea cage fish culture, has also urged the NIO to suggest adoption of modern methods for production of fish. Some 2475 boats and 897 trawlers are registered with the fisheries department for fishing activities. According to the fisheries department statistics, while 23,147 tonnes of sardine were caught in 2018, this dropped to 6771 tonnes in 2020. In 2019, it was 10,618 tonnes. The same is the case with mackerel, another staple fish. While in 2018, 35,699 tonnes of mackerel were caught, in 2020 the figure dropped to 25,325 tonnes. Apart from using mackerel for curry and frying, mackerel pickle is also prepared in many houses in Goa. To cater to the fish needs of the populace, it is also imported from other states, which is also purchased by the fish processing units. To deal with the fish famine situation, the government apart from taking action against illegal fishing has focused on resolving issues pertaining to this business. Chief Minister Pramod Sawant has urged the scientists and students of the National Institute of Oceanography (NIO) to suggest ways to increase fish productivity by adopting modern methods. The NIO has played a vital role in increasing the production of green mussels in Goa, training for which was given to stakeholders. According to marine experts, pollution near Goa's river mouths and in the waters off the state's coastline as well as over-fishing using banned practices like bull trawling and LED fishing, could lead to a fish famine in the state. The Opposition benches, during the last term of the BJP government in the state, were vociferous in the Assembly in demanding action against illegal fishing. The fishermen from Goa are also demanding action against illegal practices used to catch fish in the sea. Goa Fisheries Minister Nilkanth Halarnkar, had earlier said the Central government has sanctioned Rs 400 crore for setting up cage fishing infrastructure to boost the coastal state's catch of fish. The state is known for its seafood, which is sought after by the eight million plus tourists who visit Goa every year. The overkill of fish for export and to cater to the hospitality industry in the tourism-oriented state as well as rising sea temperatures has resulted in a fish famine of sorts in the waters off Goa, driving the prices of locally consumed staple fishes through the roof. Ibrahim Maulana, president of the Margao wholesale fish market in South Goa and the only wholesale fish market in the state, said that illegal fishing should be stopped. "On Saturday we got around 50 tonne of fish from Andhra Pradesh," Maulana said. According to sources, fish in Goa is brought from Kerala, Karnataka, Andhra Pradesh and also from Maharashtra.
english
<reponame>Moritz-Pfeifer/TASA-Finance-Ministries {"id": 2239, "url": "http://proxy-pubminefi.diffusion.finances.gouv.fr/pub/document/18/22481.pdf", "author": null, "title": "PUBLICATION PROCHAINE DU RAPPORT D'INFORMATION DU SENAT SUR L'AVENIR DU COMPTE D'AFFECTATION SPECIALE \" GESTION DU PATRIMOINE IMMOBILIER DE L'ETAT\"", "text": " \n \n \n \n<NAME> \nMINISTRE DE L’ACTION ET DES COMPTES PUBLICS \n \nC o m m u n i q u é d e p re s s e \nC o m m u n i q u é d e p re s s e \nwww.economie.gouv.fr \n \n \nParis, le 3 juin 2017 \nN°014 \n \n  \n  \n  PUBLICATION PROCHAINE DU RAPPORT D’INFORMATION DU SENAT \nSUR L’AVENIR DU COMPTE D’AFFECTATION SPECIALE \n« GESTION DU PATRIMOINE IMMOBILIER DE L’ETAT » \n \n \n \nLe rapport d'information n° 570 (2016-2017) du Sénat sur l’avenir du compte d’affectation spéciale \n« Gestion du patrimoine immobilier de l’Etat » sera prochainement rendu public. \n \nLe Ministre de l’Action et des Comptes publics, <NAME>, a souhaité rencontrer dans les \nprochains jours les Sénateurs <NAME> et <NAME>, rapporteurs spéciaux de \nla Commission des finances du Sénat sur la mission « Gestion des finances publiques et \nressources humaines ». \n \nCette rencontre sera l’occasion d’aborder les conclusions contenues dans le rapport, que le \nGouvernement étudiera particulièrement. \n \nLe Ministère de l’Action et des Comptes publics, engagera sous l’autorité de son Ministre une \nprofonde réflexion quant à la bonne utilisation de l’immobilier de l’Etat, dans le cadre du sérieux \nbudgétaire demandé par le Président de la République et le Premier ministre. \n \nLe Ministre souhaite que la rencontre prévue avec les rapporteurs spéciaux du Sénat permette \négalement un échange plus large sur la gestion des finances publiques et des ressources \nhumaines de la puissance publique, constitutive de la politique sérieuse et ambitieuse qu’il \nsouhaite mettre en œuvre en matière d’action publique. \n \n \n \n \n \n \n \n \nContact presse : \nCabinet de <NAME> : 01 53 18 45 03 - <EMAIL> \n \n \n \n \n \n \nToute l’actualité du ministère sur les réseaux sociaux \n \n", "published_date": "2017-06-03", "section": "Communiques"}
json
<reponame>deep-hacker/RecipeAPI package com.omnicell.submission.recipe.service; import com.omnicell.submission.recipe.model.Recipe; import com.omnicell.submission.recipe.repository.RecipeRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; @Service public class RecipeService { @Autowired private RecipeRepository recipeRepository; public List<Recipe> findAll() { Iterable<Recipe> it = recipeRepository.findAll(); List<Recipe> recipes = new ArrayList<Recipe>(); it.forEach(e -> recipes.add(e)); return recipes; } public Recipe findById(Long id) { Recipe recipe = recipeRepository.findById(id).orElse(null); return recipe; } public Recipe addRecipe(Recipe recipe){ return recipeRepository.save(recipe); } }
java
/* * Copyright 2021 VMware, Inc. * SPDX-License-Identifier: Apache License 2.0 */ package com.vmware.avi.sdk.model; import java.util.*; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; /** * The DNSRegisterInfo is a POJO class extends AviRestResource that used for creating * DNSRegisterInfo. * * @version 1.0 * @since * */ @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) public class DNSRegisterInfo { @JsonProperty("dns_info") private List<DnsInfo> dnsInfo = null; @JsonProperty("error") private String error = null; @JsonProperty("fip") private IpAddr fip = null; @JsonProperty("total_records") private Integer totalRecords = null; @JsonProperty("vip") private IpAddr vip = null; @JsonProperty("vip_id") private String vipId = null; @JsonProperty("vs_names") private List<String> vsNames = null; @JsonProperty("vs_uuids") private List<String> vsUuids = null; /** * This is the getter method this will return the attribute value. * Placeholder for description of property dns_info of obj type dnsregisterinfo field type str type array. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @return dnsInfo */ public List<DnsInfo> getDnsInfo() { return dnsInfo; } /** * This is the setter method. this will set the dnsInfo * Placeholder for description of property dns_info of obj type dnsregisterinfo field type str type array. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @return dnsInfo */ public void setDnsInfo(List<DnsInfo> dnsInfo) { this.dnsInfo = dnsInfo; } /** * This is the setter method this will set the dnsInfo * Placeholder for description of property dns_info of obj type dnsregisterinfo field type str type array. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @return dnsInfo */ public DNSRegisterInfo addDnsInfoItem(DnsInfo dnsInfoItem) { if (this.dnsInfo == null) { this.dnsInfo = new ArrayList<DnsInfo>(); } this.dnsInfo.add(dnsInfoItem); return this; } /** * This is the getter method this will return the attribute value. * Placeholder for description of property error of obj type dnsregisterinfo field type str type string. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @return error */ public String getError() { return error; } /** * This is the setter method to the attribute. * Placeholder for description of property error of obj type dnsregisterinfo field type str type string. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @param error set the error. */ public void setError(String error) { this.error = error; } /** * This is the getter method this will return the attribute value. * Placeholder for description of property fip of obj type dnsregisterinfo field type str type ref. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @return fip */ public IpAddr getFip() { return fip; } /** * This is the setter method to the attribute. * Placeholder for description of property fip of obj type dnsregisterinfo field type str type ref. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @param fip set the fip. */ public void setFip(IpAddr fip) { this.fip = fip; } /** * This is the getter method this will return the attribute value. * Placeholder for description of property total_records of obj type dnsregisterinfo field type str type integer. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @return totalRecords */ public Integer getTotalRecords() { return totalRecords; } /** * This is the setter method to the attribute. * Placeholder for description of property total_records of obj type dnsregisterinfo field type str type integer. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @param totalRecords set the totalRecords. */ public void setTotalRecords(Integer totalRecords) { this.totalRecords = totalRecords; } /** * This is the getter method this will return the attribute value. * Placeholder for description of property vip of obj type dnsregisterinfo field type str type ref. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @return vip */ public IpAddr getVip() { return vip; } /** * This is the setter method to the attribute. * Placeholder for description of property vip of obj type dnsregisterinfo field type str type ref. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @param vip set the vip. */ public void setVip(IpAddr vip) { this.vip = vip; } /** * This is the getter method this will return the attribute value. * Placeholder for description of property vip_id of obj type dnsregisterinfo field type str type string. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @return vipId */ public String getVipId() { return vipId; } /** * This is the setter method to the attribute. * Placeholder for description of property vip_id of obj type dnsregisterinfo field type str type string. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @param vipId set the vipId. */ public void setVipId(String vipId) { this.vipId = vipId; } /** * This is the getter method this will return the attribute value. * Placeholder for description of property vs_names of obj type dnsregisterinfo field type str type array. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @return vsNames */ public List<String> getVsNames() { return vsNames; } /** * This is the setter method. this will set the vsNames * Placeholder for description of property vs_names of obj type dnsregisterinfo field type str type array. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @return vsNames */ public void setVsNames(List<String> vsNames) { this.vsNames = vsNames; } /** * This is the setter method this will set the vsNames * Placeholder for description of property vs_names of obj type dnsregisterinfo field type str type array. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @return vsNames */ public DNSRegisterInfo addVsNamesItem(String vsNamesItem) { if (this.vsNames == null) { this.vsNames = new ArrayList<String>(); } this.vsNames.add(vsNamesItem); return this; } /** * This is the getter method this will return the attribute value. * Unique object identifiers of vss. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @return vsUuids */ public List<String> getVsUuids() { return vsUuids; } /** * This is the setter method. this will set the vsUuids * Unique object identifiers of vss. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @return vsUuids */ public void setVsUuids(List<String> vsUuids) { this.vsUuids = vsUuids; } /** * This is the setter method this will set the vsUuids * Unique object identifiers of vss. * Default value when not specified in API or module is interpreted by Avi Controller as null. * @return vsUuids */ public DNSRegisterInfo addVsUuidsItem(String vsUuidsItem) { if (this.vsUuids == null) { this.vsUuids = new ArrayList<String>(); } this.vsUuids.add(vsUuidsItem); return this; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DNSRegisterInfo objDNSRegisterInfo = (DNSRegisterInfo) o; return Objects.equals(this.vipId, objDNSRegisterInfo.vipId)&& Objects.equals(this.vsUuids, objDNSRegisterInfo.vsUuids)&& Objects.equals(this.vip, objDNSRegisterInfo.vip)&& Objects.equals(this.fip, objDNSRegisterInfo.fip)&& Objects.equals(this.dnsInfo, objDNSRegisterInfo.dnsInfo)&& Objects.equals(this.vsNames, objDNSRegisterInfo.vsNames)&& Objects.equals(this.error, objDNSRegisterInfo.error)&& Objects.equals(this.totalRecords, objDNSRegisterInfo.totalRecords); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DNSRegisterInfo {\n"); sb.append(" dnsInfo: ").append(toIndentedString(dnsInfo)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); sb.append(" fip: ").append(toIndentedString(fip)).append("\n"); sb.append(" totalRecords: ").append(toIndentedString(totalRecords)).append("\n"); sb.append(" vip: ").append(toIndentedString(vip)).append("\n"); sb.append(" vipId: ").append(toIndentedString(vipId)).append("\n"); sb.append(" vsNames: ").append(toIndentedString(vsNames)).append("\n"); sb.append(" vsUuids: ").append(toIndentedString(vsUuids)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
java
Bangladesh interim coach Richard Halsall reckons Mustafizur Rahman is on his way to rekindling the early form with the ball that made him a sensation, and revealed that getting back to full fitness was the pacer's priority. The young fast bowler had suffered a shoulder injury in England in 2016, and had to undergo an operation, after which he couldn't put up the sort of performances that the fans had quickly gotten used to. Mustafizur didn't pick up a fifer against Zimbabwe in the tri-series opener on Monday (January 15), but his spell of 10-1-29-2 was a demonstration of his reprise. The wily bowler used cutters and change of pace to good effect, picking the key wicket of Brendon Taylor, and then wrapping up the Zimbabwean essay with the scalp of Blessing Muzarabani. The performance comes at a good time as the left-armer looks to silence his critics, who were growing in number due to his recent dip in form. Since the shoulder operation, Mustafizur has bowled well in bits-and-pieces - a spell or two against Sri Lanka in Bangladesh's historic Test win, and against Ireland during the tri-series in New Zealand. Mustafizur also needed to regain his confidence after having sustained an ankle injury last October in the series in South Africa, which ruled him out of the ODI and T20I series. "If you look at elite baseball, lots of their pitchers have a similar injury. Pitchers throw at 90 mph, but it takes them two years to throw at 90mph," Halsall told reporters in Mirpur on Tuesday (January 16) when he was asked about how he views the comeback match of the young pace bowler. "I think it has been 18 months since his injury. He bowled the cutters and his pace is creeping back up to 85mph," Halsall said. "His cutter is brilliant as ever. His top-end [the highest pace he is bowling] is going up a mile an hour every week. It makes the cutter more effective. His confidence is coming back,' he said. "What is great to see is how hard he is working. He is constantly working on his skills. To see someone who is in love with his skill and passion, it is fantastic for everyone to see," he said. "We are used to seeing Tamim and Mushfiqur in the nets, but to see a bowler behaving as he does in every training session, is very encouraging," he added. According to Shakib Al Hasan, Mustafizur's performance against Zimbabwe was important, but he also stated that he never though Mustafizur 'bowled poorly at any stage'. "I never thought he bowled too poorly at any stage," Shakib said after Bangladesh's victory over Zimbabwe. "We can't expect him to take a lot of wickets all the time. I think he is improving, because he is working hard in his bowling. I am satisfied with his bowling today," he added. Regaining confidence has been key for Mustafizur, but as has a technical change to his bowling - of running in and delivering from close to the stumps - that also played a part in his return to good form. Shakib, and Mustafizur himself, will hope that it continues when Bangladesh take on Sri Lanka in their next fixture of the tri-series - against Sri Lanka on January 19.
english
<filename>ws-tests/test_study_list_and_config.py<gh_stars>1-10 #!/usr/bin/env python import unittest from opentreetesting import test_http_json_method, config from phylesystem_api.tests import (check_study_list_and_config_response, check_external_url_response) DOMAIN = config('host', 'apihost') class TestStudyListAndConfig(unittest.TestCase): def test_study_list_and_config(self): SL_SUBMIT_URI = DOMAIN + '/v3/study_list' r = test_http_json_method(SL_SUBMIT_URI, 'GET', expected_status=200, return_bool_data=True) self.assertTrue(r[0]) sl = r[1] DEP_SUBMIT_URI = DOMAIN + '/v3/phylesystem_config' r = test_http_json_method(DEP_SUBMIT_URI, 'GET', expected_status=200, return_bool_data=True) self.assertTrue(r[0]) full_config = r[1] GEN_SUBMIT_URI = DOMAIN + '/v4/study/config' r = test_http_json_method(GEN_SUBMIT_URI, 'GET', expected_status=200, return_bool_data=True) self.assertTrue(r[0]) gen_config = r[1] check_study_list_and_config_response(self, sl, full_config, gen_config) if not sl: return doc_id = sl[0] EXT_SUBMIT_URI = DOMAIN + '/v4/study/external_url/{}'.format(doc_id) r = test_http_json_method(EXT_SUBMIT_URI, 'GET', expected_status=200, return_bool_data=True) self.assertTrue(r[0]) e = r[1] check_external_url_response(self, doc_id, e) if __name__ == '__main__': # TODO: argv hacking only necessary because of the funky invocation of the test from # germinator/ws-tests/run_tests.sh import sys sys.argv = sys.argv[:1] unittest.main()
python
<reponame>clarkdonald/eecs494game4 // // Instructions_State.cpp // game // // Created by <NAME> on 11/9/13. // // #include "Instructions_State.h" #include "Player_Includes.h" #include "Player_Factory.h" #include "Terrain_Includes.h" #include "Terrain_Factory.h" #include "Npc_Includes.h" #include "Npc_Factory.h" #include "Crystal.h" #include "Game_Object.h" #include <utility> #include <string> #include <fstream> #include <sstream> #include <iostream> using namespace Zeni; using std::make_pair; using std::string; using std::ifstream; using std::istringstream; using std::cout; using std::endl; Instructions_State::Instructions_State() : tb(Point2f(), Point2f(800.0f, 600.0f), "system_36_800x600", "P U R P O S E\n" "Your goal is to find and capture crystals scattered randomly around " "the map and bring them back to your leader.\n\n" "C O N T R O L S\n" "Left Stick: Move the explorer\n" "Right Stick: Look around, aim\n" "Right Trigger: Attack\n" "Left Trigger: Special Attack\n" "Left Bumper: Dash\n" "Start Button: Pause\n" "A Button: Hold down to deposit crystal to leader\n" "Start Button: Pause entire game", Color()), done(false), distance(0.0f), movement(0), start_movement(false), timer_index(0), num_texts_to_render(0) { tb.give_BG_Renderer(new Widget_Renderer_Color(get_Colors()["black"])); // set up map and players load_map("../assets/maps/tutorial.txt"); for (int i = 0; i < 5; ++i) { text_timers.push_back(Chronometer<Time>()); } // set up texts texts.push_back("Six companions fought many battles together."); texts.push_back("After a decade, they finally wanted to split the wealth."); texts.push_back("However, there was dispute over how the wealth was to be split."); texts.push_back("Tension arose, and the companions turned on each other."); texts.push_back("And forever, their relationship will never be the same.."); texts.push_back(""); // fire off first timer text_timers[timer_index].start(); } Instructions_State::~Instructions_State() { for (auto terrain : terrains) delete terrain; for (auto crystal : crystals) delete crystal; delete player_blue0; delete player_blue1; delete player_red0; delete player_red1; delete npc_blue; delete npc_red; } void Instructions_State::on_key(const SDL_KeyboardEvent &event) { if (event.keysym.sym == SDLK_ESCAPE) if (event.state == SDL_PRESSED) get_Game().pop_state(); } void Instructions_State::perform_logic() { // calculate game time const Time_HQ current_time = get_Timer_HQ().get_time(); float processing_time = float(current_time.get_seconds_since(time_passed)); time_passed = current_time; float time_step = processing_time; if (!done && start_movement) { distance += (80.0f * 0.9f * time_step); cout << movement << endl; switch (movement) { case 0: player_red0->move_y(0.9f, time_step, true); player_red1->move_y(0.9f, time_step, true); if (distance > TUTORIAL_LENGTH*3) { distance = 0.0f; movement++; } break; case 1: player_red0->move_x(0.9f, time_step, true); player_red1->move_x(-0.9f, time_step, true); if (distance > TUTORIAL_LENGTH*2) { distance = 0.0f; movement++; } break; case 2: player_red0->move_y(0.3f, time_step, true); player_red1->move_y(0.3f, time_step, true); if (distance > TUTORIAL_LENGTH*1) { distance = 0.0f; movement++; } break; case 3: done = true; break; default: break; } } } void Instructions_State::render() { get_Video().set_2d(make_pair(Point2f(), Point2f(800.0f, 600.0f)), false); if (done) { tb.render(); } else { for (auto terrain : terrains) terrain->render(); for (auto crystal : crystals) crystal->render(); player_blue0->render(); player_blue1->render(); player_red0->render(); player_red1->render(); npc_blue->render(); npc_red->render(); auto text_y_scroll = 0.0f; for(int i = 0; i < num_texts_to_render; ++i) { get_Fonts()["godofwar_12"].render_text(String(texts[i]), Point2f(327.0f, text_y_scroll), get_Colors()["white"]); text_y_scroll += 75.0f; } if (!final_timer.is_running()) { if (text_timers[timer_index].seconds() > 2.0f) { num_texts_to_render++; text_timers[timer_index].stop(); if (++timer_index < text_timers.size()) { text_timers[timer_index].start(); } else { final_timer.start(); } } } else { if (final_timer.seconds() > 3.0f) { start_movement = true; } } } } void Instructions_State::load_map(const string &file_) { // logging cout << "Creating map: " << file_ << endl; ifstream file(file_); // Check if file exists if (!file.is_open()) { string s = "File does not exist: "; error_handle(s + file_); } // Get dimensions of map string line; getline(file,line); istringstream sstream(line); if (line.find('#') != std::string::npos) { getline(file,line); istringstream temp(line); sstream.swap(temp); } if (!(sstream >> dimension.height)) error_handle("Could not input height"); if (!(sstream >> dimension.width)) error_handle("Could not input width"); // logging cout << "Map dimension (y,x): (" << dimension.height << ',' << dimension.width << ')' << endl; // Get map information for (int height = 0; getline(file,line) && height < dimension.height;) { if (line.find('#') != std::string::npos) continue; for (int width = 0; width < line.length() && width < dimension.width; ++width) { Point2f position(TUTORIAL_LENGTH*width, TUTORIAL_LENGTH*height); terrains.push_back(create_terrain("Wood_Floor", position, TUTORIAL_SIZE)); if (line[width] == '.'); else if (line[width] == '0') { // person 0 player_blue0 = create_player("Warrior", position, 0, BLUE, TUTORIAL_SIZE); } else if (line[width] == '1') { // person 1 player_blue1 = create_player("Archer", position, 1, BLUE, TUTORIAL_SIZE); } else if (line[width] == '2') { // person 2 player_red0 = create_player("Mage", position, 2, RED, TUTORIAL_SIZE); } else if (line[width] == '3') { // person 3 player_red1 = create_player("Mage", position, 3, RED, TUTORIAL_SIZE); } else if (line[width] == '4') { // npc blue npc_blue = create_npc("Blonde_Kid", position, BLUE, TUTORIAL_SIZE); } else if (line[width] == '5') { // npc red npc_red = create_npc("Girl", position, RED, TUTORIAL_SIZE); } else if (line[width] == 'L') { // left wall terrains.push_back(create_terrain("Left_Wall", position, TUTORIAL_SIZE)); } else if (line[width] == 'U') { // up wall terrains.push_back(create_terrain("Up_Wall", position, TUTORIAL_SIZE)); } else if (line[width] == 'D') { // down wall terrains.push_back(create_terrain("Down_Wall", position, TUTORIAL_SIZE)); } else if (line[width] == 'R') { // right wall terrains.push_back(create_terrain("Right_Wall", position, TUTORIAL_SIZE)); } else if (line[width] == 'l') { // up left wall terrains.push_back(create_terrain("Up_Left_Wall", position, TUTORIAL_SIZE)); } else if (line[width] == 'u') { // up right wall terrains.push_back(create_terrain("Up_Right_Wall", position, TUTORIAL_SIZE)); } else if (line[width] == 'd') { // down right wall terrains.push_back(create_terrain("Down_Right_Wall", position, TUTORIAL_SIZE)); } else if (line[width] == 'r') { // down left wall terrains.push_back(create_terrain("Down_Left_Wall", position, TUTORIAL_SIZE)); } else if (line[width] == 'x') { // door terrains.push_back(create_terrain("Tan_Wall_Door", position, TUTORIAL_SIZE)); } else if (line[width] == 'T') { // table terrains.push_back(create_terrain("Table", position, TUTORIAL_SIZE)); terrains.push_back(create_terrain("Flower", position, TUTORIAL_SIZE)); } else if (line[width] == 't') { // table terrains.push_back(create_terrain("Table", position, TUTORIAL_SIZE)); } else if (line[width] == 'c') { // chair terrains.push_back(create_terrain("Chair", position, TUTORIAL_SIZE)); } else if (line[width] == 's') { // shelves terrains.push_back(create_terrain("Bookshelf", position, TUTORIAL_SIZE)); } else if (line[width] == 'b') { // bed terrains.push_back(create_terrain("Bed", position, TUTORIAL_SIZE)); } else if (line[width] == 'z') { // dresser position.y -= (TUTORIAL_LENGTH/2.0f); terrains.push_back(create_terrain("Dresser", position, TUTORIAL_SIZE)); } else if (line[width] == 'i') { // chest terrains.push_back(create_terrain("Chest", position, TUTORIAL_SIZE)); } else if (line[width] == 'k') { // crystal crystals.push_back(new Crystal(position, TUTORIAL_SIZE)); } else { string s = "Invalid character found in map: "; error_handle(s); } } ++height; } } void Instructions_State::execute_controller_code(const Zeni_Input_ID &id, const float &confidence, const int &action) { if (action == 108) done = true; if (action == 208) done = true; if (action == 308) done = true; if (action == 408) done = true; }
cpp
{"meta":{"build_time":"2021-04-11T07:04:14.468Z","license":"CC-BY-4.0","version":"2.0-beta"},"data":{"date":"2020-08-22","state":"IL","meta":{"data_quality_grade":"A","updated":"2020-08-22T04:00:00Z","tests":{"total_source":"totalTestsViral"}},"cases":{"total":219702,"confirmed":218285,"probable":1417},"tests":{"pcr":{"total":3649685,"pending":null,"encounters":{"total":null},"specimens":{"total":3649685,"positive":null,"negative":null},"people":{"total":null,"positive":219702,"negative":null}},"antibody":{"encounters":{"total":null,"positive":null,"negative":null},"people":{"total":null,"positive":null,"negative":null}},"antigen":{"encounters":{"total":null,"positive":null,"negative":null},"people":{"total":null,"positive":null,"negative":null}}},"outcomes":{"recovered":null,"hospitalized":{"total":null,"currently":1488,"in_icu":{"total":null,"currently":322},"on_ventilator":{"total":null,"currently":127}},"death":{"total":8083,"confirmed":7874,"probable":209}}}}
json
Italy’s non-playing captain Corrado Barazzutti on Monday predicted a tough match against India, insisting that the hosts were not underdogs despite having lower-ranked players compared to his team. World No 18 Marco Cecchinato will lead Italy’s challenge, while it has two others inside top-60. India’s top-ranked Prajnesh Gunneswaran on the other hand is world number 102. “In Davis Cup, the ranking is only important for the draws on who plays first and who plays second. But everything changes once you step on the courts. No one are underdogs I think. It will be a tough match,” Barazzutti told reporters after Italy's first practice session on grass courts of the Calcutta South Club. Read: Bhupathi: 'Let’s talk about singles now, enough of doubles Grand Slam titles' On head-to-head count, Italy lead India 4-1. India won the last time it played in Kolkata, in 1985. India opted to host formidable Italy on grass on February 1 and 2 on grass courts, considering that the visitor has formidable hard and clay court players. The winner of the tie will qualify for the inaugural World Group Finals in Madrid in November this year. “They are playing at home and on grass. We have to be focused and play with utmost respect. It’s always very difficult to play when you play for your country. It’s important for us for sure. “They are a good side. They are good players. We have to show bigger respect to this team, these players because they are very good,” Barazzutti who was part of the Davis Cup winning Italian team in 1976, said. Cecchinato who defeated Novak Djokovic en route the French Open semifinals last year, has only played one Davis Cup rubber and it was on clay as no one in the Italy squad has played the Davis Cup on grass. “You know the schedule. Only some players played on grass before the Wimbledon last year. There’s maybe one tournament after the Wimbledon. Nobody plays a lot on the grass. Even the Indians don’t play I think. Not only us,” he said. The five-member team got used to the lush green South Club courts sweating it out for close to two hours.
english
<filename>komutlar/genel-profil-bayrak-ayarla.js const Discord = require("discord.js"); const db = require("quick.db"); let config = require("../utils/errors.js"); exports.run = async (client, message, args) => { let bayrak = args.slice(0).join(" "); if (!bayrak) return message.channel.send( "╔════════════「 **Slowex | Profil Sistemi** 」════════════╗ \n║\n║ <a:hyqued3:770590906746142730>・**Ülkenizin Bayrağını Girin.** `(EMOJİ OLSUN)` \n║ <a:premiumpartner:771056935449395250>・**Örnek:** **s!bayrak-ayarla** :flag_tr: \n║ <a:yaplandrma:771056975609462854>・`s!profil-menü` **Yazarak Tüm Komutlara Ulaşa Bilirsiniz.** \n║\n╚════════════「 **Slowex | Profil Sistemi** 」════════════╝" ); db.set(`TimsahTim_Bayrak_${message.author.id}`, bayrak) return message.channel.send( "╔════════════「 **Slowex | Profil Sistemi** 」════════════╗ \n║\n║ <a:premiumdoru:771057021910384660>・**Profil Bayrağın Başarıyla Ayarlandı.** \n║ <a:premiumpartner:771056935449395250>・**Seçdiğiniz Bayrak:** `" + bayrak + "` \n║ <a:yaplandrma:771056975609462854>・`s!profil-menü` **Yazarak Tüm Komutlara Ulaşa Bilirsiniz.** \n║\n╚════════════「 **Slowex | Profil Sistemi** 」════════════╝" ); }; exports.conf = { enabled: true, guildOnly: false, aliases: ["bayrakayarla"], permLevel: 0, kategori: "Profil" }; exports.help = { name: "bayrak-ayarla", description: "", usage: "", kategori: "Profil" };
javascript
Rain kept Stuart Broad waiting for his 500th Test wicket as bad weather frustrated England's bid for a series-clinching win over the West Indies at Old Trafford on Monday. Play was due to start at 11:00 AM local time (1000 GMT) on the fourth day of the decisive third Test but persistent rain meant the pitch and square remained fully covered. Broad is just one wicket away from becoming only the seventh bowler to join the '500 club' after taking all six West Indies wickets that fell on Sunday. The 34-year-old paceman returned first-innings figures of 6-31 as West Indies were bundled out for 197 in reply to England's 369, which included Broad's dashing 62. And after England made 226-2 declared in their second innings, featuring Rory Burns' 90 and fifties from captain Joe Root and Dom Sibley, there was still time for Broad to strike twice by removing John Campbell and nightwatchman Kemar Roach. That left Broad, controversially omitted from West Indies' win in the series opener at Southampton, on 499 Test wickets. The only bowlers with more than 600 Test wickets are a trio of former spinners -- Sri Lanka's Muttiah Muralitharan (800), Australian Shane Warne (708) and India's Anil Kumble (619). The only seamers ahead of Broad are his longtime England new-ball colleague James Anderson (589 wickets) and Australia's Glenn McGrath (563) and the West Indies' Courtney Walsh (519), both of whom are retired. West Indies will resume on 10-2, chasing an unlikely victory target of 399, with the series all square at 1-1. No side have made more to win in the fourth innings of an Old Trafford Test than England's 294-4 against New Zealand in 2008. West Indies, who hold the Wisden Trophy after a 2-1 win over Root's men in the Caribbean last year, are bidding for their first Test series win in England since 1988.
english
'use strict'; const { ApolloLink, Observable } = require('apollo-link'); const VError = require('verror'); module.exports = function createErrorLink () { return new ApolloLink((operation, forward) => { return new Observable(observer => { let sub; try { sub = forward(operation).subscribe({ next: result => { if (result.errors && result.errors.length) { const error = result.errors[0]; if (error.extensions.code === 'SERVICE_UNAVAILABLE') { return; } result = { data: null, errors: [ new VError( { name: 'UnexpectedError', info: error.extensions.exception }, error.message ) ] }; } observer.next(result); }, error: err => { let errorName; let errorMessage; let cause; if (err.code) { // Handle network errors switch (err.code) { case 'ECONNREFUSED': errorName = 'NetworkError'; errorMessage = 'failed connecting to GraphQL service'; cause = err; } } else { // Handle other errors const error = err.result.errors[0]; switch (error.extensions.code) { case 'GRAPHQL_VALIDATION_FAILED': case 'BAD_REQUEST': errorName = 'BadGraphQLRequest'; break; case 'SERVICE_UNAVAILABLE': if (error.extensions.retry === false) { errorName = 'ServiceUnavailableWithoutRetry'; } else { errorName = 'ServiceUnavailableWithRetry'; } break; default: errorName = 'UnexpectedError'; } cause = error.extensions.exception; errorMessage = error.message; } const result = { data: null, errors: [ new VError( { name: errorName, info: cause }, errorMessage ) ] }; observer.next(result); }, complete: () => { observer.complete.bind(observer)(); } }); } catch (e) { observer.error(e); } return () => { if (sub) sub.unsubscribe(); }; }); }); };
javascript
package dev.tdz.OnlineEducation; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.domain.EntityScan; import org.springframework.context.annotation.ComponentScan; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; @ComponentScan(basePackages = {"dev.tdz"}) @ComponentScan(basePackages = {"dev.tdz.services"}) @EnableJpaRepositories(basePackages = {"dev.tdz.repos"}) @EntityScan(basePackages = {"dev.tdz.entities"}) @SpringBootApplication public class OnlineEducationApplication { public static void main(String[] args) { SpringApplication.run(OnlineEducationApplication.class, args); } }
java
Craig of the Creek is an animated comedy series created by Matt Burnett and Ben Levin for Cartoon Network. The show revolves around the adventures of 10-year-old Craig Williams as he explores the Creek, a vast and intriguing wilderness behind his neighborhood. The show's first episode premiered on December 1, 2017, exclusively on the official Cartoon Network app. Following this, the series debuted online on February 19, 2018, with a double premiere event airing on March 30, 2018. This captivating series spanned four seasons before contemplating a fifth season filled with excitement and mystery. On January 19, 2022, Craig of the Creek's fifth season was officially renewed. It was initially planned to consist of 20 episodes, but Warner Bros. Discovery decided to only include 10 episodes. Season 5 of Craig of the Creek premiered on July 10, 2023, on Cartoon Network. The season consists of 10 episodes and can be streamed on HBO Max. The first eight episodes will air from July 10 to July 14, 2023, while the remaining two will be released on September 25, 2023. The reduction of episodes from 20 to 10 raised the possibility that the show may not be renewed for a sixth season; however, Cartoon Network hasn't released any official statement regarding its cancelation. The cast of Craig of the Creek Season 5 includes voice actors such as Philip Solomon as Craig Williams, Noël Wells as Kelsey Pokomoonchi, Michael Croner as JP Mercer, Ben Levin as Kelsey's older brother Anthony, and Shayle Simons as Kelsey's younger sister Tammy. In addition to returning characters, this season also introduces new ones like the Red Poncho—a mysterious figure who is believed to be the guardian of the Creek—and the Kweebecs—a group of small creatures living in the woods. Craig of the Creek season 5 continues to emphasize themes like friendship, adventure, and imagination. However, this season also explores new concepts such as community and storytelling. In Heart of the Forest, which is part one of this fifth season arc, Craig and his friends embark on a quest to find a mythical artifact known as the Heart of the Forest—considered to hold immense power for its possessor. Along their journey, they'll encounter new obstacles and gain deeper insights about themselves and their surroundings. In the eighth episode, an extraordinary event takes place, and the much-anticipated conclusion of the grand Heart of the Forest quest is unveiled. The heroes emerged victorious by going through numerous challenges and setbacks, ultimately fulfilling their arduous journey. The below table defines some important aspects of season 5: Why was Craig of the Creek season 5 reduced to 10 episodes? Warner Bros. Discovery sent a wave of surprise through fans as they announced their decision in October 2022 to halve the fifth season of Craig of the Creek. The initial order for this animated series comprised 20 episodes, but this number was slashed down to 10. Multiple explanations can be offered as potential factors contributing to this significant reduction. One explanation for cutting the episode count might lie in the underwhelming ratings obtained by the show or the unmet expectations held by Warner Bros. Discovery regarding viewership figures. There’s also a plausible chance that the shows' creators consciously opted to conclude their masterpiece after five seasons and intended to produce merely ten more episodes accordingly. However, despite these alterations made by Warner Bros. Discovery decision-makers and the potential motivations behind them, one must not overlook or downplay Craig of Creek's immense success and its uplifting friendship dynamics. By delving into the complexities of childhood endearingly and entertainingly, Craig of the Creek, without a doubt, makes an indelible mark on the hearts of its viewers.
english
{ "directions": [ "Place chicken breasts between 2 layers of plastic wrap and pound to about 1/2-inch thick.", "Season both sides of chicken breasts with cayenne, salt, and black pepper; dredge lightly in flour and shake off any excess.", "Heat olive oil in a skillet over medium-high heat. Place chicken in the pan, reduce heat to medium, and cook until browned and cooked through, about 5 minutes per side; remove to a plate.", "Cook capers in reserved oil, smashing them lightly to release brine, until warmed though, about 30 seconds.", "Pour white wine into skillet. Scrape any browned bits from the bottom of the pan with a wooden spoon. Cook until reduced by half, about 2 minutes.", "Stir lemon juice, water, and butter into the reduced wine mixture; cook and stir continuously to form a thick sauce, about 2 minutes. Reduce heat to low and stir parsley through the sauce.", "Return chicken breasts to the pan cook until heated through, 1 to 2 minutes. Serve with sauce spooned over the top." ], "ingredients": [ "4 skinless, boneless chicken breast halves", "cayenne pepper, or to taste", "salt and ground black pepper to taste", "all-purpose flour for dredging", "2 tablespoons olive oil", "1 tablespoon capers, drained", "1/2 cup white wine", "1/4 cup fresh lemon juice", "1/4 cup water", "3 tablespoons cold unsalted butter, cut in 1/4-inch slices", "2 tablespoons fresh Italian parsley, chopped" ], "language": "en-US", "source": "allrecipes.com", "tags": [], "title": "Quick Chicken Piccata", "url": "http://allrecipes.com/recipe/220751/quick-chicken-piccata/" }
json
The court asked the state government to inform it about who filed the petition that sought to quash the police complaint. The Madras High Court on Monday sought to know if the Tamil Nadu government has challenged its single-judge order that dismissed a First Information Report filed in connection with the alleged distribution of cash among voters in Chennai’s Radhakrishnan Nagar Assembly bye-poll in April 2017, PTI reported. A division bench of Justices M Sathyanarayanan and P Rajamanickam ordered the city commissioner of police, the joint commissioner (east), and the investigation officer of the case to submit a report by December 17. The court asked the Tamil Nadu government to file an affidavit detailing if it had filed a Special Leave Petition against the order of the single-judge bench. It also directed the government about the petitioner who had sought dismissal of the FIR. But the bench turned down a plea seeking that the FIR be re-opened and that the case be handed over to the Central Bureau of Investigation, saying the police should be given a chance to provide an explanation. The FIR had been filed by Election Commission officials. The High Court was hearing pleas filed by several petitioners, including the then Dravida Munnetra Kazhagam candidate N Maruthu Ganesh. The pleas had initially demanded the registration of an FIR over alleged malpractices in the run-up to the RK Nagar bye-poll on April 12, 2017, which was cancelled after complaints that cash was being distributed among voters. The bye-poll was later held in December 2017, with ousted All India Anna Dravida Munnetra Kazhagam leader TTV Dinakaran winning the seat. Public prosecutor A Natarajan on Monday told the court that a single-judge bench had dismissed the FIR on March 13 despite the prosecution’s objection. The High Court asked the police to also explain why no accused had been named in the FIR even though the original complaint mentioned that Income Tax officials had seized incriminating documents from the home of the health minister and two other government officials.
english
// Copyright 2011-2020 Wason Technology, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include "AsyncMessageReader.h" #include <boost/range.hpp> namespace RobotRaconteur { AsyncMessageReaderImpl::state_data::state_data() { state = Message_init; pop_state = Message_init; param1 = 0; param2 = 0; } AsyncMessageReaderImpl::AsyncMessageReaderImpl() { Reset(); buf.reset(new uint8_t[128]); buf_len = 128; } size_t& AsyncMessageReaderImpl::message_len() { return state_stack.front().limit; } AsyncMessageReaderImpl::state_type& AsyncMessageReaderImpl::state() { return state_stack.back().state; } size_t& AsyncMessageReaderImpl::param1() { return state_stack.back().param1; } size_t& AsyncMessageReaderImpl::param2() { return state_stack.back().param2; } std::string& AsyncMessageReaderImpl::param3() { return state_stack.back().param3; } size_t& AsyncMessageReaderImpl::limit() { return state_stack.back().limit; } size_t AsyncMessageReaderImpl::distance_from_limit() { return limit() - message_pos; } void AsyncMessageReaderImpl::pop_state() { if (state_stack.size() == 1) throw InvalidOperationException("Message read stack empty"); state_type s = state_stack.back().pop_state; state_stack.pop_back(); state_stack.back().state = s; } void AsyncMessageReaderImpl::push_state(AsyncMessageReaderImpl::state_type new_state, AsyncMessageReaderImpl::state_type pop_state, size_t relative_limit, RR_INTRUSIVE_PTR<RRValue> data, size_t param1, size_t param2) { state_data d; d.state = new_state; d.pop_state = pop_state; d.data = data; d.param1 = param1; d.param2 = param2; d.limit = message_pos + relative_limit; if (d.limit > message_len()) throw ProtocolException("Invalid message limit"); state_stack.push_back(d); } void AsyncMessageReaderImpl::push_state(AsyncMessageReaderImpl::state_type new_state, AsyncMessageReaderImpl::state_type pop_state, size_t relative_limit, void* ptrdata, size_t param1, size_t param2, std::string& param3) { state_data d; d.state = new_state; d.pop_state = pop_state; d.ptrdata = ptrdata; d.param1 = param1; d.param2 = param2; d.param3.swap(param3); d.limit = message_pos + relative_limit; if (d.limit > message_len()) throw ProtocolException("Invalid message limit"); state_stack.push_back(d); } void AsyncMessageReaderImpl::prepare_continue(const const_buffers& other_bufs1, size_t& other_bufs_used) { if (buf_avail_pos > 0) { if (buf_read_pos == buf_avail_pos) { buf_avail_pos = 0; buf_read_pos = 0; } else { //Move any remaining data to the beginning of buffer size_t n = buf_avail_pos - buf_read_pos; std::memmove(buf.get(), buf.get() + buf_read_pos, n); buf_read_pos = 0; buf_avail_pos = n; } } size_t n2 = boost::asio::buffer_size(this->other_bufs); if ( n2 > 0) { boost::asio::mutable_buffer p2(buf.get(), buf_len); p2 = p2 + buf_avail_pos; size_t n2=boost::asio::buffer_copy(p2, other_bufs); buf_avail_pos += n2; buffers_consume(this->other_bufs, n2); } else { this->other_bufs.clear(); } other_bufs_used = boost::asio::buffer_size(other_bufs1) - boost::asio::buffer_size(this->other_bufs); //other_bufs.clear(); } size_t AsyncMessageReaderImpl::available() { size_t s = (buf_avail_pos - buf_read_pos); s += (boost::asio::buffer_size(other_bufs)); return s; } bool AsyncMessageReaderImpl::read_all_bytes(void* p, size_t len) { if (distance_from_limit() < len) { throw ProtocolException("Message limit error"); } if (available() < len) { return false; } read_some_bytes(p, len); return true; } size_t AsyncMessageReaderImpl::read_some_bytes(void* p, size_t len) { if (len == 0) return 0; len = std::min(len, distance_from_limit()); if (len == 0) throw ProtocolException("Message limit error"); boost::asio::mutable_buffer p2 (p, len); size_t c = 0; if (buf_avail_pos - buf_read_pos > 0) { boost::asio::const_buffer p3(buf.get(), buf_avail_pos); p3 = p3 + buf_read_pos; c = boost::asio::buffer_copy(p2, p3); p2 = p2 + c; p3 = p3 + c; if (boost::asio::buffer_size(p3) == 0) { buf_read_pos = 0; buf_avail_pos = 0; } else { buf_read_pos += c; } if (boost::asio::buffer_size(p2) == 0) { message_pos += c; return c; } } size_t c2 = boost::asio::buffer_copy(p2, other_bufs); if (c2 == 0) { message_pos += c; return c; } buffers_consume(other_bufs, c2); size_t c3 = c + c2; message_pos += c3; return c3; } bool AsyncMessageReaderImpl::peek_byte(uint8_t& b) { if (distance_from_limit() == 0) throw ProtocolException("Message limit error"); if (available() == 0) return false; if (buf_avail_pos - buf_read_pos > 0) { b = *(buf.get() + buf_read_pos); return true; } size_t a1 = boost::asio::buffer_copy(boost::asio::buffer(&b, 1), other_bufs); if (a1 == 1) return true; return false; } bool AsyncMessageReaderImpl::read_uint_x(uint32_t& num) { uint8_t b1; if (!peek_byte(b1)) return false; if (b1 <= 252) { read_number(b1); num = b1; return true; } if (b1 == 253) { size_t a1 = available(); if (a1 < 3) return false; read_number(b1); uint16_t num2; read_number(num2); num = num2; return true; } if (b1 == 254) { size_t a1 = available(); if (a1 < 5) return false; read_number(b1); read_number(num); return true; } throw ProtocolException("Invalid uint_x in read"); } bool AsyncMessageReaderImpl::read_uint_x2(uint64_t& num) { uint8_t b1; if (!peek_byte(b1)) return false; if (b1 <= 252) { read_number(b1); num = b1; return true; } if (b1 == 253) { size_t a1 = available(); if (a1 < 3) return false; read_number(b1); uint16_t num2; read_number(num2); num = num2; return true; } if (b1 == 254) { size_t a1 = available(); if (a1 < 5) return false; read_number(b1); uint32_t num2; read_number(num2); num = num2; return true; } if (b1 == 255) { size_t a1 = available(); if (a1 < 9) return false; read_number(b1); read_number(num); return true; } return false; } bool AsyncMessageReaderImpl::read_int_x(int32_t& num) { uint8_t b1_1; if (!peek_byte(b1_1)) return false; int8_t b1 = *reinterpret_cast<int8_t*>(&b1_1); if (b1 <= 124) { read_number(b1); num = b1; return true; } if (b1 == 125) { size_t a1 = available(); if (a1 < 3) return false; read_number(b1); int16_t num2; read_number(num2); num = num2; return true; } if (b1 == 126) { size_t a1 = available(); if (a1 < 5) return false; read_number(b1); read_number(num); return true; } throw ProtocolException("Invalid uint_x in read"); } bool AsyncMessageReaderImpl::read_int_x2(int64_t& num) { uint8_t b1_1; if (!peek_byte(b1_1)) return false; int8_t b1 = *reinterpret_cast<int8_t*>(&b1_1); if (b1 <= 124) { read_number(b1); num = b1; return true; } if (b1 == 125) { size_t a1 = available(); if (a1 < 3) return false; read_number(b1); int16_t num2; read_number(num2); num = num2; return true; } if (b1 == 126) { size_t a1 = available(); if (a1 < 5) return false; read_number(b1); int32_t num2; read_number(num2); num = num2; return true; } if (b1 == 127) { size_t a1 = available(); if (a1 < 9) return false; read_number(b1); read_number(num); return true; } return false; } static void null_str_deleter(std::string* s) {} bool AsyncMessageReaderImpl::read_string(MessageStringPtr& str, state_type next_state) { uint16_t l; if (!read_number(l)) return false; //TODO: avoid swap std::string s; s.resize(l); size_t n = read_some_bytes(&s[0], l); if (n == l) { str = MessageStringPtr(RR_MOVE(s)); return true; } push_state(Header_readstring, next_state, l - n, &str, n, 0, s); return false; } bool AsyncMessageReaderImpl::read_string(MessageStringPtr& str) { state_type next_state = state(); next_state = static_cast<state_type>(static_cast<int>(next_state) + 1); return read_string(str, next_state); } bool AsyncMessageReaderImpl::read_string4(MessageStringPtr& str, state_type next_state) { uint32_t l; if (!read_uint_x(l)) return false; std::string s; s.resize(l); size_t n = read_some_bytes(&s[0], l); if (n == l) { str = MessageStringPtr(s); return true; } push_state(Header_readstring, next_state, l-n, &str, n, 0, s); return false; } bool AsyncMessageReaderImpl::read_string4(MessageStringPtr& str) { state_type next_state = state(); next_state = static_cast<state_type>(static_cast<int>(next_state) + 1); return read_string4(str, next_state); } void AsyncMessageReaderImpl::Reset() { this->version = 2; buf_avail_pos = 0; buf_read_pos = 0; while (!read_messages.empty()) read_messages.pop(); state_stack.clear(); state_data s; RR_INTRUSIVE_PTR<Message> m = CreateMessage(); s.data = m; s.state = Message_init; s.limit = 12; message_pos = 0; state_stack.push_back(s); message_pos = 0; } #define R(res) if (!res) { \ prepare_continue(other_bufs, other_bufs_used); \ return ReadReturn_continue_nobuffers; } #define DO_POP_STATE() { \ pop_state(); \ continue; } AsyncMessageReaderImpl::return_type AsyncMessageReaderImpl::Read(const const_buffers& other_bufs, size_t& other_bufs_used, size_t continue_read_len, mutable_buffers& next_continue_read_bufs) { this->other_bufs = other_bufs; while (true) { switch (state()) { case Message_init: { RR_INTRUSIVE_PTR<Message> m = CreateMessage(); state_stack[0].data = m; state() = MessageHeader_init; continue; } case Message_done: prepare_continue(other_bufs, other_bufs_used); if (distance_from_limit() != 0) throw ProtocolException("Message did not consume all data"); read_messages.push(RR_STATIC_POINTER_CAST<Message>(state_stack.back().data)); return ReadReturn_done; case MessageHeader_init: { if (available() < 12) { throw ProtocolException("Initial message header not available"); } std::string magic; magic.resize(4); read_all_bytes(&magic[0], 4); if (magic != "RRAC") { throw ProtocolException("Invalid message magic"); } RR_INTRUSIVE_PTR<MessageHeader> h = CreateMessageHeader(); read_number(h->MessageSize); read_number(version); uint16_t header_size = 0; read_number(header_size); h->HeaderSize = header_size; message_len() = h->MessageSize; data<Message>()->header = h; push_state(MessageHeader_routing1, Message_readentries, h->HeaderSize - 12, h); } case MessageHeader_routing1: { boost::array<uint8_t, 16> nodeid; R(read_all_bytes(&nodeid[0], 16)); data<MessageHeader>()->SenderNodeID = NodeID(nodeid); state() = MessageHeader_routing2; } case MessageHeader_routing2: { boost::array<uint8_t, 16> nodeid; R(read_all_bytes(&nodeid[0], 16)); data<MessageHeader>()->ReceiverNodeID = NodeID(nodeid); state() = MessageHeader_endpoint1; } case MessageHeader_endpoint1: { R(read_number(data<MessageHeader>()->SenderEndpoint)); state() = MessageHeader_endpoint2; } case MessageHeader_endpoint2: { R(read_number(data<MessageHeader>()->ReceiverEndpoint)); state() = MessageHeader_routing3; } case MessageHeader_routing3: { R(read_string(data<MessageHeader>()->SenderNodeName, MessageHeader_routing4)); state() = MessageHeader_routing4; } case MessageHeader_routing4: { R(read_string(data<MessageHeader>()->ReceiverNodeName, MessageHeader_metainfo)); state() = MessageHeader_metainfo; } case MessageHeader_metainfo: { R(read_string(data<MessageHeader>()->MetaData, MessageHeader_entrycount)); state() = MessageHeader_entrycount; } case MessageHeader_entrycount: { R(read_number(data<MessageHeader>()->EntryCount)); state() = MessageHeader_messageid1; } case MessageHeader_messageid1: { R(read_number(data<MessageHeader>()->MessageID)); state() = MessageHeader_messageid2; } case MessageHeader_messageid2: { R(read_number(data<MessageHeader>()->MessageResID)); pop_state(); state() = Message_readentries; } case Message_readentries: { Message* m = data<Message>(); m->entries.reserve(m->header->EntryCount); if (m->entries.size() >= m->header->EntryCount) { state() = Message_done; continue; } state() = MessageEntry_init; } case MessageEntry_init: { RR_INTRUSIVE_PTR<MessageEntry> ee = CreateMessageEntry(); data<Message>()->entries.push_back(ee); push_state(MessageEntry_entrysize, Message_readentries, limit() - message_pos, ee); continue; } case MessageEntry_finishread: { if (distance_from_limit() != 0) throw ProtocolException("MessageEntry did not consume all data"); DO_POP_STATE(); } case MessageEntry_entrysize: { uint32_t p = message_pos; MessageEntry* ee = data<MessageEntry>(); R(read_number(ee->EntrySize)); if (ee->EntrySize < 4) throw ProtocolException("Message entry too short"); if (p + ee->EntrySize > message_len()) throw ProtocolException("Message entry out of bounds"); limit() = p + ee->EntrySize; state() = MessageEntry_entrytype; } case MessageEntry_entrytype: { uint16_t t; R(read_number(t)); data<MessageEntry>()->EntryType = static_cast<MessageEntryType>(t); state() = MessageEntry_pad; } case MessageEntry_pad: { uint16_t v; R(read_number(v)); state() = MessageEntry_servicepathstr; } case MessageEntry_servicepathstr: { R(read_string(data<MessageEntry>()->ServicePath, MessageEntry_membernamestr)); state() = MessageEntry_membernamestr; } case MessageEntry_membernamestr: { R(read_string(data<MessageEntry>()->MemberName, MessageEntry_requestid)); state() = MessageEntry_requestid; } case MessageEntry_requestid: { R(read_number(data<MessageEntry>()->RequestID)); state() = MessageEntry_error; } case MessageEntry_error: { MessageEntry* e = data<MessageEntry>(); uint16_t err; R(read_number(err)); data<MessageEntry>()->Error = static_cast<MessageErrorType>(err); state() = MessageEntry_metainfo; } case MessageEntry_metainfo: { R(read_string(data<MessageEntry>()->MetaData, MessageEntry_elementcount)); state() = MessageEntry_elementcount; } case MessageEntry_elementcount: { uint16_t c; R(read_number(c)); param1() = c; data<MessageEntry>()->elements.reserve(c); state() = MessageEntry_readelements; } case MessageEntry_readelements: { MessageEntry* ee = data<MessageEntry>(); if (ee->elements.size() >= param1()) { state() = MessageEntry_finishread; continue; } state() = MessageElement_init; } case MessageElement_init: { RR_INTRUSIVE_PTR<MessageElement> el = CreateMessageElement(); MessageEntry* ee = data<MessageEntry>(); ee->elements.push_back(el); push_state(MessageElement_elementsize, MessageEntry_readelements, limit() - message_pos, el); } case MessageElement_elementsize: { size_t p = message_pos; uint32_t l; R(read_number(l)); if (l < 4) throw ProtocolException("Message element too short"); data<MessageElement>()->ElementSize = l; if (p + l > limit()) throw ProtocolException("Message element out of bounds"); limit() = p + l; state() = MessageElement_elementnamestr; } case MessageElement_elementnamestr: { R(read_string(data<MessageElement>()->ElementName, MessageElement_elementtype)); state() = MessageElement_elementtype; } case MessageElement_elementtype: { uint16_t t; R(read_number(t)); data<MessageElement>()->ElementType = static_cast<DataTypes>(t); state() = MessageElement_elementtypestr; } case MessageElement_elementtypestr: { R(read_string(data<MessageElement>()->ElementTypeName, MessageElement_metainfo)); state() = MessageElement_metainfo; } case MessageElement_metainfo: { R(read_string(data<MessageElement>()->MetaData, MessageElement_datacount)); state() = MessageElement_datacount; } case MessageElement_datacount: { MessageElement* el = data<MessageElement>(); R(read_number(el->DataCount)); state() = MessageElement_readdata; } case MessageElement_readdata: { MessageElement* el = data<MessageElement>(); switch (el->ElementType) { case DataTypes_void_t: { DO_POP_STATE(); } case DataTypes_double_t: case DataTypes_single_t: case DataTypes_int8_t: case DataTypes_uint8_t: case DataTypes_int16_t: case DataTypes_uint16_t: case DataTypes_int32_t: case DataTypes_uint32_t: case DataTypes_int64_t: case DataTypes_uint64_t: case DataTypes_string_t: case DataTypes_cdouble_t: case DataTypes_csingle_t: case DataTypes_bool_t: { state() = MessageElement_readarray1; continue; } case DataTypes_structure_t: case DataTypes_vector_t: case DataTypes_dictionary_t: case DataTypes_multidimarray_t: case DataTypes_list_t: case DataTypes_pod_t: case DataTypes_pod_array_t: case DataTypes_pod_multidimarray_t: case DataTypes_namedarray_array_t: case DataTypes_namedarray_multidimarray_t: { state() = MessageElement_readnested1; continue; } default: throw DataTypeException("Invalid data type"); } } case MessageElement_finishreaddata: { if (distance_from_limit() != 0) throw ProtocolException("Element did not consume all data"); DO_POP_STATE(); } case MessageElement_readarray1: { MessageElement* el = data<MessageElement>(); RR_INTRUSIVE_PTR<RRBaseArray> a = AllocateRRArrayByType(el->ElementType, el->DataCount); size_t n = a->ElementSize() * a->size(); size_t p = read_some_bytes(a->void_ptr(), n); size_t l = el->ElementSize; el->SetData(a); el->ElementSize = l; if (p >= n) { state() = MessageElement_finishreaddata; continue; } push_state(MessageElement_readarray2, MessageElement_finishreaddata, n - p, a, p, n); boost::asio::mutable_buffer b(a->void_ptr(), n); b = b + p; next_continue_read_bufs.push_back(b); state() = MessageElement_readarray2; prepare_continue(other_bufs, other_bufs_used); return ReadReturn_continue_buffers; } case MessageElement_readarray2: { if (buf_avail_pos != 0) { throw InvalidOperationException("Invalid stream position for async read"); } size_t l = param2() - param1(); size_t n1 = boost::asio::buffer_size(other_bufs); if (n1 != 0 && continue_read_len != 0) { throw InvalidOperationException("Cannot use other_bufs and continue_read_bufs at the same time"); } if (continue_read_len == 0) { boost::asio::mutable_buffer b(data<RRBaseArray>()->void_ptr(), param2()); b = b + param1(); size_t n2 = boost::asio::buffer_copy(b, this->other_bufs); buffers_consume(this->other_bufs, n2); message_pos += n2; if (n2 >= l) { //Done DO_POP_STATE(); } param1() += n2; b = b + n2; next_continue_read_bufs.push_back(b); state() = MessageElement_readarray2; prepare_continue(other_bufs, other_bufs_used); return ReadReturn_continue_buffers; } else { param1() += continue_read_len; message_pos += continue_read_len; if (param1() > param2()) throw ProtocolException("Stream reading error"); if (param1() < param2()) { boost::asio::mutable_buffer b(data<RRBaseArray>()->void_ptr(), param2()); b = b + param1(); next_continue_read_bufs.push_back(b); state() = MessageElement_readarray2; prepare_continue(other_bufs, other_bufs_used); return ReadReturn_continue_buffers; } //Done DO_POP_STATE(); } } //Read nested element list case MessageElement_readnested1: { MessageElement* el = data<MessageElement>(); std::vector<RR_INTRUSIVE_PTR<MessageElement> > v; v.reserve(el->DataCount); RR_INTRUSIVE_PTR<MessageElementNestedElementList> s = CreateMessageElementNestedElementList(el->ElementType,el->ElementTypeName, RR_MOVE(v)); uint32_t l = el->ElementSize; el->SetData(s); el->ElementSize = l; push_state(MessageElement_readnested2, MessageElement_finishreaddata, limit() - message_pos, s, el->DataCount); } case MessageElement_readnested2: { MessageElementNestedElementList* s = data<MessageElementNestedElementList>(); if (s->Elements.size() >= param1()) { DO_POP_STATE(); } state() = MessageElement_readnested3; } case MessageElement_readnested3: { RR_INTRUSIVE_PTR<MessageElement> el = CreateMessageElement(); MessageElementNestedElementList* s = data<MessageElementNestedElementList>(); s->Elements.push_back(el); push_state(MessageElement_elementsize, MessageElement_readnested2, limit() - message_pos, el); continue; } //Read header string case Header_readstring: { size_t& p1 = param1(); MessageStringPtr* ptr_s = ptrdata<MessageStringPtr>(); std::string& s = param3(); //TODO: avoid swaps size_t n = read_some_bytes(&(s).at(p1), s.size() - p1); p1 += n; size_t s_size = s.size(); if (p1 == s_size) { (*ptr_s) = MessageStringPtr(RR_MOVE(s)); DO_POP_STATE(); } else { R(false); } } default: throw InvalidOperationException("Invalid read state"); } } } AsyncMessageReaderImpl::return_type AsyncMessageReaderImpl::Read4(const const_buffers& other_bufs, size_t& other_bufs_used, size_t continue_read_len, mutable_buffers& next_continue_read_bufs) { this->other_bufs = other_bufs; while (true) { switch (state()) { case Message_init: { RR_INTRUSIVE_PTR<Message> m = CreateMessage(); state_stack[0].data = m; state() = MessageHeader_init; continue; } case Message_done: prepare_continue(other_bufs, other_bufs_used); if (distance_from_limit() != 0) throw ProtocolException("Message did not consume all data"); read_messages.push(RR_STATIC_POINTER_CAST<Message>(state_stack.back().data)); return ReadReturn_done; case MessageHeader_init: { if (available() < 12) { throw ProtocolException("Initial message header not available"); } std::string magic; magic.resize(4); read_all_bytes(&magic[0], 4); if (magic != "RRAC") { throw ProtocolException("Invalid message magic"); } RR_INTRUSIVE_PTR<MessageHeader> h = CreateMessageHeader(); read_number(h->MessageSize); read_number(version); message_len() = h->MessageSize; data<Message>()->header = h; push_state(MessageHeader_headersize, Message_readentries, h->MessageSize-10, h); } case MessageHeader_headersize: { size_t p = message_pos; uint32_t l; R(read_uint_x(l)); limit() = l; data<MessageHeader>()->HeaderSize = l; state() = MessageHeader_flags; } case MessageHeader_flags: { R(read_number(data<MessageHeader>()->MessageFlags)); state() = MessageHeader_routing1; } case MessageHeader_routing1: { MessageHeader* h = data<MessageHeader>(); if (!(h->MessageFlags & MessageFlags_ROUTING_INFO)) { state() = MessageHeader_endpoint1; continue; } boost::array<uint8_t, 16> nodeid; R(read_all_bytes(&nodeid[0], 16)); h->SenderNodeID = NodeID(nodeid); state() = MessageHeader_routing2; } case MessageHeader_routing2: { boost::array<uint8_t, 16> nodeid; R(read_all_bytes(&nodeid[0], 16)); data<MessageHeader>()->ReceiverNodeID = NodeID(nodeid); state() = MessageHeader_routing3; } case MessageHeader_routing3: { R(read_string4(data<MessageHeader>()->SenderNodeName)); state() = MessageHeader_routing4; } case MessageHeader_routing4: { R(read_string4(data<MessageHeader>()->ReceiverNodeName)); state() = MessageHeader_endpoint1; } case MessageHeader_endpoint1: { MessageHeader* h = data<MessageHeader>(); if (!(h->MessageFlags & MessageFlags_ENDPOINT_INFO)) { state() = MessageHeader_priority; continue; } R(read_uint_x(h->SenderEndpoint)); state() = MessageHeader_endpoint2; } case MessageHeader_endpoint2: { R(read_uint_x(data<MessageHeader>()->ReceiverEndpoint)); state() = MessageHeader_priority; } case MessageHeader_priority: { MessageHeader* h = data<MessageHeader>(); if (!(h->MessageFlags & MessageFlags_PRIORITY)) { state() = MessageHeader_metainfo; continue; } R(read_number(h->Priority)); state() = MessageHeader_metainfo; } case MessageHeader_metainfo: { MessageHeader* h = data<MessageHeader>(); if (!(h->MessageFlags & MessageFlags_META_INFO)) { state() = MessageHeader_stringtable1; continue; } R(read_string4(h->MetaData)); state() = MessageHeader_messageid1; } case MessageHeader_messageid1: { MessageHeader* h = data<MessageHeader>(); R(read_number(h->MessageID)); state() = MessageHeader_messageid2; } case MessageHeader_messageid2: { R(read_number(data<MessageHeader>()->MessageResID)); state() = MessageHeader_stringtable1; } case MessageHeader_stringtable1: { MessageHeader* h = data<MessageHeader>(); if (!(h->MessageFlags & MessageFlags_STRING_TABLE)) { state() = MessageHeader_entrycount; continue; } uint32_t n; R(read_uint_x(n)); param1() = n; state() = MessageHeader_stringtable2; } case MessageHeader_stringtable2: { if (param1() == 0) { state() = MessageHeader_entrycount; continue; } uint32_t code; R(read_uint_x(code)); data<MessageHeader>()->StringTable.push_back(boost::make_tuple(code, "")); param1()--; state() = MessageHeader_stringtable3; } case MessageHeader_stringtable3: { MessageHeader* h = data<MessageHeader>(); R(read_string4(data<MessageHeader>()->StringTable.back().get<1>(), MessageHeader_stringtable2)); state() = MessageHeader_stringtable2; continue; } case MessageHeader_entrycount: { MessageHeader* h = data<MessageHeader>(); if (!(h->MessageFlags & MessageFlags_MULTIPLE_ENTRIES)) { h->EntryCount = 1; } else { uint32_t c; R(read_uint_x(c)); if (c > std::numeric_limits<uint16_t>::max()) throw ProtocolException("Too many entries in message"); h->EntryCount = boost::numeric_cast<uint16_t>(c); } state() = MessageHeader_extended1; } case MessageHeader_extended1: { MessageHeader* h = data<MessageHeader>(); if (!(h->MessageFlags & MessageFlags_EXTENDED)) { pop_state(); state() = Message_readentries; continue; } uint32_t n; R(read_uint_x(n)); h->Extended.resize(n); state() = MessageHeader_extended2; } case MessageHeader_extended2: { MessageHeader* h = data<MessageHeader>(); if (!h->Extended.empty()) { R(read_all_bytes(&h->Extended[0], h->Extended.size())); } pop_state(); state() = Message_readentries; } case Message_readentries: { Message* m = data<Message>(); m->entries.reserve(m->header->EntryCount); if (m->entries.size() >= m->header->EntryCount) { state() = Message_done; continue; } state() = MessageEntry_init; } case MessageEntry_init: { RR_INTRUSIVE_PTR<MessageEntry> ee = CreateMessageEntry(); data<Message>()->entries.push_back(ee); push_state(MessageEntry_entrysize, Message_readentries, limit() - message_pos, ee); continue; } case MessageEntry_finishread: { if (distance_from_limit() != 0) throw ProtocolException("MessageEntry did not consume all data"); DO_POP_STATE(); } case MessageEntry_entrysize: { uint32_t p = message_pos; MessageEntry* ee = data<MessageEntry>(); R(read_uint_x(ee->EntrySize)); if (ee->EntrySize < 4) throw ProtocolException("Message entry too short"); if (p + ee->EntrySize > message_len()) throw ProtocolException("Message entry out of bounds"); limit() = p + ee->EntrySize; state() = MessageEntry_entryflags; } case MessageEntry_entryflags: { R(read_number(data<MessageEntry>()->EntryFlags)); state() = MessageEntry_entrytype; } case MessageEntry_entrytype: { uint16_t t; R(read_number(t)); data<MessageEntry>()->EntryType = static_cast<MessageEntryType>(t); state() = MessageEntry_servicepathstr; } case MessageEntry_servicepathstr: { MessageEntry* ee = data<MessageEntry>(); if (ee->EntryFlags & MessageEntryFlags_SERVICE_PATH_STR) { R(read_string4(ee->ServicePath)); } state() = MessageEntry_servicepathcode; } case MessageEntry_servicepathcode: { MessageEntry* ee = data<MessageEntry>(); if (ee->EntryFlags & MessageEntryFlags_SERVICE_PATH_CODE) { R(read_uint_x(ee->ServicePathCode)); } state() = MessageEntry_membernamestr; } case MessageEntry_membernamestr: { MessageEntry* ee = data<MessageEntry>(); if (ee->EntryFlags & MessageEntryFlags_MEMBER_NAME_STR) { R(read_string4(ee->MemberName)); } state() = MessageEntry_membernamecode; } case MessageEntry_membernamecode: { MessageEntry* ee = data<MessageEntry>(); if (ee->EntryFlags & MessageEntryFlags_MEMBER_NAME_CODE) { R(read_uint_x(ee->MemberNameCode)); } state() = MessageEntry_requestid; } case MessageEntry_requestid: { MessageEntry* ee = data<MessageEntry>(); if (ee->EntryFlags & MessageEntryFlags_REQUEST_ID) { R(read_uint_x(ee->RequestID)); } state() = MessageEntry_error; } case MessageEntry_error: { MessageEntry* ee = data<MessageEntry>(); if (ee->EntryFlags & MessageEntryFlags_ERROR) { uint16_t err; R(read_number(err)); ee->Error = static_cast<MessageErrorType>(err); } state() = MessageEntry_metainfo; } case MessageEntry_metainfo: { MessageEntry* ee = data<MessageEntry>(); if (ee->EntryFlags & MessageEntryFlags_META_INFO) { R(read_string4(ee->MetaData)); } state() = MessageEntry_extended1; } case MessageEntry_extended1: { MessageEntry* ee = data<MessageEntry>(); if (!(ee->EntryFlags & MessageEntryFlags_EXTENDED)) { state() = MessageEntry_elementcount; continue; } uint32_t n; R(read_uint_x(n)); ee->Extended.resize(n); state() = MessageEntry_extended2; } case MessageEntry_extended2: { MessageEntry* ee = data<MessageEntry>(); if (!ee->Extended.empty()) { R(read_all_bytes(&ee->Extended[0], ee->Extended.size())); } state() = MessageEntry_elementcount; } case MessageEntry_elementcount: { MessageEntry* ee = data<MessageEntry>(); uint32_t c; R(read_uint_x(c)); param1() = c; ee->elements.reserve(c); state() = MessageEntry_readelements; } case MessageEntry_readelements: { MessageEntry* ee = data<MessageEntry>(); if (ee->elements.size() >= param1()) { state() = MessageEntry_finishread; continue; } state() = MessageElement_init; } case MessageElement_init: { RR_INTRUSIVE_PTR<MessageElement> el = CreateMessageElement(); MessageEntry* ee = data<MessageEntry>(); ee->elements.push_back(el); push_state(MessageElement_elementsize, MessageEntry_readelements, limit() - message_pos, el); } case MessageElement_elementsize: { size_t p = message_pos; uint32_t l; R(read_uint_x(l)); if (l < 4) throw ProtocolException("Message element too short"); data<MessageElement>()->ElementSize = l; if (p + l > limit()) throw ProtocolException("Message element out of bounds"); limit() = p + l; state() = MessageElement_elementflags; } case MessageElement_elementflags: { R(read_number(data<MessageElement>()->ElementFlags)); state() = MessageElement_elementnamestr; } case MessageElement_elementnamestr: { MessageElement* el = data<MessageElement>(); if (el->ElementFlags & MessageElementFlags_ELEMENT_NAME_STR) { R(read_string4(el->ElementName)); } state() = MessageElement_elementnamecode; } case MessageElement_elementnamecode: { MessageElement* el = data<MessageElement>(); if (el->ElementFlags & MessageElementFlags_ELEMENT_NAME_CODE) { R(read_uint_x(el->ElementNameCode)); } state() = MessageElement_elementnumber; } case MessageElement_elementnumber: { MessageElement* el = data<MessageElement>(); if (el->ElementFlags & MessageElementFlags_ELEMENT_NUMBER) { R(read_int_x(el->ElementNumber)); } state() = MessageElement_elementtype; } case MessageElement_elementtype: { uint16_t t; R(read_number(t)); data<MessageElement>()->ElementType = static_cast<DataTypes>(t); state() = MessageElement_elementtypestr; } case MessageElement_elementtypestr: { MessageElement* el = data<MessageElement>(); if (el->ElementFlags & MessageElementFlags_ELEMENT_TYPE_NAME_STR) { R(read_string4(el->ElementTypeName)); } state() = MessageElement_elementtypecode; } case MessageElement_elementtypecode: { MessageElement* el = data<MessageElement>(); if (el->ElementFlags & MessageElementFlags_ELEMENT_TYPE_NAME_CODE) { R(read_uint_x(el->ElementTypeNameCode)); } state() = MessageElement_metainfo; } case MessageElement_metainfo: { MessageElement* el = data<MessageElement>(); if (el->ElementFlags & MessageElementFlags_META_INFO) { R(read_string4(el->MetaData)); } state() = MessageElement_extended1; } case MessageElement_extended1: { MessageElement* ee = data<MessageElement>(); if (!(ee->ElementFlags & MessageElementFlags_EXTENDED)) { state() = MessageElement_datacount; continue; } uint32_t n; R(read_uint_x(n)); ee->Extended.resize(n); state() = MessageElement_extended2; } case MessageElement_extended2: { MessageElement* ee = data<MessageElement>(); if (!ee->Extended.empty()) { R(read_all_bytes(&ee->Extended[0], ee->Extended.size())); } state() = MessageElement_datacount; } case MessageElement_datacount: { MessageElement* el = data<MessageElement>(); R(read_uint_x(el->DataCount)); state() = MessageElement_readdata; } case MessageElement_readdata: { MessageElement* el = data<MessageElement>(); switch (el->ElementType) { case DataTypes_void_t: { DO_POP_STATE(); } case DataTypes_double_t: case DataTypes_single_t: case DataTypes_int8_t: case DataTypes_uint8_t: case DataTypes_int16_t: case DataTypes_uint16_t: case DataTypes_int32_t: case DataTypes_uint32_t: case DataTypes_int64_t: case DataTypes_uint64_t: case DataTypes_string_t: case DataTypes_cdouble_t: case DataTypes_csingle_t: case DataTypes_bool_t: { state() = MessageElement_readarray1; continue; } case DataTypes_structure_t: case DataTypes_vector_t: case DataTypes_dictionary_t: case DataTypes_multidimarray_t: case DataTypes_list_t: case DataTypes_pod_t: case DataTypes_pod_array_t: case DataTypes_pod_multidimarray_t: case DataTypes_namedarray_array_t: case DataTypes_namedarray_multidimarray_t: { state() = MessageElement_readnested1; continue; } default: throw DataTypeException("Invalid data type"); } } case MessageElement_finishreaddata: { MessageElement* el = data<MessageElement>(); if (distance_from_limit() != 0) throw ProtocolException("Element did not consume all data"); DO_POP_STATE(); } case MessageElement_readarray1: { MessageElement* el = data<MessageElement>(); RR_INTRUSIVE_PTR<RRBaseArray> a = AllocateRRArrayByType(el->ElementType, el->DataCount); size_t n = a->ElementSize() * a->size(); size_t p = read_some_bytes(a->void_ptr(), n); size_t l = el->ElementSize; el->SetData(a); el->ElementSize = l; if (p >= n) { state() = MessageElement_finishreaddata; continue; } push_state(MessageElement_readarray2, MessageElement_finishreaddata, n-p, a, p, n); boost::asio::mutable_buffer b(a->void_ptr(), n); b = b + p; next_continue_read_bufs.push_back(b); state() = MessageElement_readarray2; prepare_continue(other_bufs, other_bufs_used); return ReadReturn_continue_buffers; } case MessageElement_readarray2: { if (buf_avail_pos != 0) { throw InvalidOperationException("Invalid stream position for async read"); } size_t l = param2() - param1(); size_t n1 = boost::asio::buffer_size(other_bufs); if (n1 !=0 && continue_read_len != 0) { throw InvalidOperationException("Cannot use other_bufs and continue_read_bufs at the same time"); } if (continue_read_len==0) { boost::asio::mutable_buffer b(data<RRBaseArray>()->void_ptr(), param2()); b = b + param1(); size_t n2 = boost::asio::buffer_copy(b, this->other_bufs); buffers_consume(this->other_bufs, n2); message_pos += n2; if (n2 >= l) { //Done DO_POP_STATE(); } param1() += n2; b = b + n2; next_continue_read_bufs.push_back(b); state() = MessageElement_readarray2; prepare_continue(other_bufs, other_bufs_used); return ReadReturn_continue_buffers; } else { param1() += continue_read_len; message_pos += continue_read_len; if (param1() > param2()) throw ProtocolException("Stream reading error"); if (param1() < param2()) { boost::asio::mutable_buffer b(data<RRBaseArray>()->void_ptr(), param2()); b = b + param1(); next_continue_read_bufs.push_back(b); state() = MessageElement_readarray2; prepare_continue(other_bufs, other_bufs_used); return ReadReturn_continue_buffers; } //Done DO_POP_STATE(); } } //Read nested elements case MessageElement_readnested1: { MessageElement* el = data<MessageElement>(); std::vector<RR_INTRUSIVE_PTR<MessageElement> > v; v.reserve(el->DataCount); RR_INTRUSIVE_PTR<MessageElementNestedElementList> s = CreateMessageElementNestedElementList(el->ElementType, el->ElementTypeName, RR_MOVE(v)); uint32_t l = el->ElementSize; el->SetData(s); el->ElementSize = l; push_state(MessageElement_readnested2, MessageElement_finishreaddata, limit() - message_pos, s, el->DataCount); } case MessageElement_readnested2: { MessageElementNestedElementList* s = data<MessageElementNestedElementList>(); if (s->Elements.size() >= param1()) { DO_POP_STATE(); } state() = MessageElement_readnested3; } case MessageElement_readnested3: { RR_INTRUSIVE_PTR<MessageElement> el = CreateMessageElement(); MessageElementNestedElementList* s = data<MessageElementNestedElementList>(); s->Elements.push_back(el); push_state(MessageElement_elementsize, MessageElement_readnested2, limit() - message_pos, el); continue; } //Read header string case Header_readstring: { size_t& p1 = param1(); MessageStringPtr* ptr_s = ptrdata<MessageStringPtr>(); //TODO: avoid swaps; std::string& s = param3(); size_t n = read_some_bytes(&(s).at(p1), s.size() - p1); p1 += n; size_t s_size = s.size(); if (p1 == s_size) { (*ptr_s) = MessageStringPtr(RR_MOVE(s)); DO_POP_STATE(); } else { R(false); } } default: throw InvalidOperationException("Invalid read state"); } } } bool AsyncMessageReaderImpl::MessageReady() { return !read_messages.empty(); } RR_INTRUSIVE_PTR<Message> AsyncMessageReaderImpl::GetNextMessage() { if (read_messages.empty()) throw InvalidOperationException("Message not ready"); RR_INTRUSIVE_PTR<Message> m=read_messages.front(); read_messages.pop(); return m; } }
cpp
<gh_stars>0 //**************************************************************************** // (c) 2008, 2009 by the openOR Team //**************************************************************************** // The contents of this file are available under the GPL v2.0 license // or under the openOR comercial license. see // /Doc/openOR_free_license.txt or // /Doc/openOR_comercial_license.txt // for Details. //**************************************************************************** //! OPENOR_INTERFACE_FILE(openOR_core) //**************************************************************************** //! @file //! @ingroup openOR_core #ifndef openOR_Plugin_detail_interfacePtr_hpp #define openOR_Plugin_detail_interfacePtr_hpp #include <boost/tr1/memory.hpp> #include <openOR/Plugin/CreateInterface.hpp> namespace openOR { namespace Plugin { namespace Detail { //-------------------------------------------------------------------------------- //! \brief Creator of smart pointer to a new adapter object which fulfills the //! requested interface class. //! //! \internal //! //! \tparam WrapperBaseType type of the wrapper base //! \tparam InterfaceType type of the requested interface //! \tparam IsWrapperBaseTypeDerivedFromInterface Reports if the WrapperBaseType is derived from InterfaceType //-------------------------------------------------------------------------------- template<class WrapperBaseType, class InterfaceType, bool IsWrapperBaseTypeDerivedFromInterface> struct Pointer2InterfaceCreator { static std::tr1::shared_ptr<InterfaceType> create(const std::tr1::shared_ptr<WrapperBaseType>& pWrapperBase) { typedef Adapter<typename WrapperBaseType::ImplType, InterfaceType> AdapterType; return std::tr1::shared_ptr<InterfaceType>(new AdapterType(pWrapperBase)); } }; //-------------------------------------------------------------------------------- //! \brief Creator of smart pointer to the wrapper object which fulfills the //! requested interface class. //! //! \internal //! //! \tparam WrapperBaseType type of the wrapper base //! \tparam InterfaceType type of the requested interface //! \tparam IsWrapperBaseTypeDerivedFromInterface Reports if the WrapperBaseType is derived from InterfaceType //-------------------------------------------------------------------------------- template<class WrapperBaseType, class InterfaceType> struct Pointer2InterfaceCreator<WrapperBaseType, InterfaceType, true> { static std::tr1::shared_ptr<InterfaceType> create(const std::tr1::shared_ptr<WrapperBaseType>& pWrapperBase) { return std::tr1::shared_ptr<InterfaceType>(pWrapperBase); } }; } //namespace Detail } } #endif
cpp
import {UpdateItemInput} from './UpdateItemInput'; import {UpdateItemOutput} from './UpdateItemOutput'; import {ConditionalCheckFailedException} from './ConditionalCheckFailedException'; import {ProvisionedThroughputExceededException} from './ProvisionedThroughputExceededException'; import {ResourceNotFoundException} from './ResourceNotFoundException'; import {ItemCollectionSizeLimitExceededException} from './ItemCollectionSizeLimitExceededException'; import {InternalServerError} from './InternalServerError'; import {OperationModel as _Operation_} from '@aws-sdk/types'; import {ServiceMetadata} from './ServiceMetadata'; export const UpdateItem: _Operation_ = { metadata: ServiceMetadata, name: 'UpdateItem', http: { method: 'POST', requestUri: '/', }, input: { shape: UpdateItemInput, }, output: { shape: UpdateItemOutput, }, errors: [ { shape: ConditionalCheckFailedException, }, { shape: ProvisionedThroughputExceededException, }, { shape: ResourceNotFoundException, }, { shape: ItemCollectionSizeLimitExceededException, }, { shape: InternalServerError, }, ], };
typescript
This time, the cricketers took things a notch high with his latest act. We know that Sushant Singh Rajput is playing MS Dhoni and Emraan Hashmi is playing Mohammad Azharuddin in their respective biopics. Which got us to think of other such combinations. Here’s a list!
english
NAIROBI, Kenya, May 8 – Machakos Senator Johnstone Muthama will not defend his seat over what he terms as a culture of impunity and dictatorship in Kalonzo Musyoka’s Wiper Party. Though he was to be given a direct ticket, Muthama says he is out of the race because instead of promoting democracy, the party is entrenching a trend where the voice of dissent is repressed. “There is no way I can be celebrating while my people are suffering,” he told Capital FM News in a phone interview in reference to the party primaries, where his close associates lost. Muthama is specifically angered with Wavinya Ndeti’s Wiper gubernatorial candidature in Machakos County, where he describes her as an “outsider” who has been treated disproportionately at the cost of the rest of the party members. “I cannot persevere anymore with Wavinya or Mutua (incumbent) as a Governor,” he said. Wavinya was formerly in Chama Cha Uzalendo (CCU) as party leader before she joined Wiper, where she was initially given a direct ticket, but a nomination was later held after Machakos Deputy Governor Bernard Kiala sought the courts intervention. He was however trounced. Though he has quit elective politics, he says he will energetically campaign for NASA presidential flag bearer Raila Odinga. “I want to prove to Kenyans that it is possible to be a great leader and even serve them without being elected,” he asserted. Musila, who lost the primary to Governor Malombe has since left the party and decided to vie as an independent candidate. He also accused the party of rigging him out in favour of the incumbent. Muthama, an ardent supporter of the former VP missed during the launch of the National Super Alliance at Uhuru Park, saying he was engaged in other matters. He cautioned that the party risks being overtaken by others in the region.
english
<filename>Client/src/component/Menu/index.js<gh_stars>0 import React, { Component, createRef } from "react"; import { Query } from "react-apollo"; import { GET_PRODUCT, GET_MENU } from "../../queries/index"; import NewOrderModal from "../Order/new-order"; import { connect } from "react-redux"; import Error from "../pages/Error" import { Modal, Button } from "react-bootstrap"; class Menu extends Component { state = { Quantity: 1, SelectProduct: [], SelectSube: "", SelectProduct: [], UrunModal: false, Bolge: "", BolgeModal: false, }; constructor(props) { super(props); this.handleChange = this.handleChange.bind(this); this.NewOrder = createRef(); } componentDidMount() { this.setState({ SelectSube: localStorage.getItem("SUBE"), OrderType: localStorage.getItem("siparis_turu") }); var SelectInfo = localStorage.getItem("URUN_ID"); } SetOrder = (Product, Category) => { console.log(Product, Category); this.props.SetDefault(); Product.Price = this.Fiyat(Category, Product.Price); Product.Category = Category.Name; if (Product.Name.trim(' ') === "Kids Club Burger (Küçük) Menü" || Product.Name.trim(' ') === "Marul Sarma Burger (Küçük) Menü" || Product.Name.trim(' ') === "Marul Sarma Burger Menü(Orta)" || Product.Name.trim(' ') === "Marul Sarma Burger Menü(Büyük)" || Product.Name.trim(' ') === "Marul Sarma Burger (Küçük)" || Product.Name.trim(' ') === "Marul Sarma Burger (Orta)" || Product.Name.trim(' ') === "Marul Sarma Burger (Büyük)" || Product.Name.trim(' ') === "Kids Club Burger (Küçük)" ) { Product.EkmekIsRequired = false; Product.IcecekRequired = true; } else { if (Category.Name === "İçecekler") { Product.EkmekIsRequired = false; Product.IcecekRequired = false; } else { Product.EkmekIsRequired = true; Product.IcecekRequired = true; } } this.props.SetProduct(Product); <<<<<<< HEAD this.setState({ OrderModal: true }) ======= this.setState({ UrunModal: true }) >>>>>>> origin/microservice }; handleChange = (e) => { this.setState({ [e.target.name]: e.target.value, }); }; handleClose = () => { this.setState({ UrunModal: false }); localStorage.removeItem("URUN_ID"); }; QuantityHandle = (e, productId) => { this.setState({ [e.target.name]: e.target.value, }); }; CreateSepet = (order) => { var NewOrder = { ProductId: order.id, EkmekOption: Array.from([]), ExtraPrice: 0, ExtraIcecek: 0, IcecekOption: Array.from([]), EkLezzetOption: Array.from([]), ExtraOptions: Array.from([]), NotOptions: Array.from([]), SosOptions: Array.from([]), Price: order.Price, ProductName: order.Name, Quantity: 1, OrderType: "", }; var SepetYeni = []; let Sepet = JSON.parse(localStorage.getItem("Sepet")); if (Sepet !== null) { if (Sepet.length > 0) { for (var i = 0; i < Sepet.length; i++) { SepetYeni.push(Sepet[i]); } } } SepetYeni.push(NewOrder); localStorage.setItem("Sepet", JSON.stringify(SepetYeni)); window.location.reload(); }; Fiyat = (Category, Price) => { return Price; }; render() { return ( <div class="mb-2 menu-wrap" style={{ fontSize: 13 }}> <ul class="nav nav-tabs" id="myTab" role="tablist"> <li class="nav-item"> <a class="nav-link red text-dark active" id="menu-tab" data-toggle="tab" href="#menu" role="tab" aria-controls="home" aria-selected="true" > <b> </b> </a> </li> </ul> <div class="tab-content" id="myTabContent"> <div class="tab-pane fade show active " id="menu" role="tabpanel" aria-labelledby="menu-tab" > <div className="table-responsive"> {this.state.OrderType !== "" && ( <Query query={GET_MENU} variables={{ CategoryType: localStorage.getItem("siparis_turu") }}> {({ loading, data, error }) => { if (loading) return <div className="loading">Loading...</div>; if (error) return <Error error={error} {...this.props} /> return ( <div> {data.GetMenu && data.GetMenu.sort((a, b) => a.Order > b.Order ? 1 : -1 ).map((Category) => ( <table className="table table-hover table-sm"> <thead> <tr> <td style={{ width: "25%" }}> <span style={{ fontSize: 15 }}> <b>{Category.Name}</b> </span> </td> <td style={{ width: "40%" }}></td> {(Category.Name !== "Tatlılar") && (Category.Name !== "İçecekler") && (Category.Name !== "Atıştırmalıklar") ? ( <td style={{ width: "22%" }}><b>Sepet Fiyati</b></td> ) : (<td style={{ width: "22%" }}></td>)} <td style={{ width: "22%" }}><b>Size Özel Fiyat</b></td> </tr> </thead> <tbody> {Category.Products.sort((a, b) => a.Order > b.Order ? 1 : -1 ).map((product) => ( <tr> <td> {product.SelectOption.length > 0 ? ( <button className="btn btn-success btn-sm" style={{ width: 25, height: 25, padding: 0, marginLeft: 5, }} onClick={() => this.SetOrder(product, Category) } data-toggle="modal" data-target="#setOrderModal" > <i class="fa fa-plus"></i> </button> ) : ( <button className="btn btn-success btn-sm" style={{ width: 25, height: 25, padding: 0, marginLeft: 5, }} onClick={() => this.CreateSepet(product)} > <i class="fa fa-plus"></i> </button> )} <img src={ product.Picture === "" ? "https://siparis.hmbrgr.com.tr/Templates/newyork/assets/img/nophoto-img.jpg" : product.Picture } style={{ width: 50, height: 50, marginLeft: 20, marginRight: 10, }} /> </td> <td> <div className="row" style={{ fontSize: 11 }}> <p> <b>{product.Name}</b>{" "} </p> </div> <div className="row" style={{ fontSize: 11 }}> <p>{product.Info}</p> </div> </td> { product.YemekSepetiPrice > 0 ? ( <td > <p> <del style={{ color: "red", fontWeight: "bold", fontSize: 15 }}> {this.Fiyat(Category, product.YemekSepetiPrice)} </del><span style={{ color: "red" }}>TL</span> </p> </td>) : (<td></td>)} <td style={{ color: "#E77F3F", fontWeight: "bold", }} > <p> {this.Fiyat(Category, product.Price)} <b>TL</b> </p> </td> </tr> ))} </tbody> </table> ))} </div> ); }} </Query> )} </div> </div> <div class="tab-pane fade" id="bilgi" role="tabpanel" aria-labelledby="bilgi-tab" > ... </div> </div> <Query query={GET_PRODUCT} variables={{ id: localStorage.getItem("URUN_ID") }} onCompleted={(data) => { if (data.Product) { this.setState({ UrunModal: true }); this.SetOrder(data.Product, data.Product.Category[0]); } }} > {({ loading, data, error }) => { if (loading) return <div className="loading">Loading...</div>; return ( <Modal show={this.state.UrunModal} onHide={this.handleClose} size="lg" > <Modal.Header closeButton> <Modal.Title>Ürün Seçim Ekranı</Modal.Title> </Modal.Header> <Modal.Body> <NewOrderModal /> </Modal.Body> </Modal> ); }} </Query> </div> ); } } const mapStateToProps = ({ Product }) => { return { Product, }; }; const mapDispatchToProps = (dispatch) => { return { SetProduct: (product) => dispatch({ type: "SET_PRODUCT", payload: product }), SetDefault: () => dispatch({ type: "SET_DEFAULT" }), }; }; export default connect(mapStateToProps, mapDispatchToProps)(Menu);
javascript
“Congratulations to India and the Indian people, especially all those who have worked very hard to achieve what they have done,” Lord Paul said. “All of us, I’m personally proud of India and its people. I hope critics in future would realise India does things in its own style and timing and they should not judge India from their way of thinking. India is able to meet its international commitments and it is great pride to be of Indian-origin,” he added. Lord Paul, Britain’s Ambassador for overseas business, said Delhi Chief Minister Sheila Dikshit deserved special kudos for the breathtaking ceremony which wiped away the embarrassment of organisational goof-ups that plagued the build-up to the Games. “Congratulations especially to Ms. Dikshit whom I have always known as a person of great commitment. I genuinely feel she has done a fabulous job,” he said.
english
The WPL (Women's Premier League), a tournament that an entire cricketing fraternity has waited for, one that can change the landscape of women's cricket not only in India but around the world is set to begin tonight (March 4) at the DY Patil Stadium in Navi Mumbai. Gujarat Giants take on Mumbai Indians in the first game of the Women's Premier League 2023. With the arrival of the tournament, we enter the season-long Fantasy season, which began with the Women's T20 WC Fantasy. Powered by Dream11, the WPL 2023 Fantasy league is similar to IPL Fantasy, with three boosters and 50 transfers for the 22 games that await us. The game opened late last night, and as a result, the number of players registered is fairly low so far. Hopefully, it will rise before the deadline. A system of net transfer calculation and the choice to cancel boosters played before the deadline are the main changes ahead of this season. So without further ado, let's look at an ideal fantasy team ahead of the first match of WPL 2023. Transfer Deadline: 08:00 pm on Saturday, March 4. Note: The suggested team is subject to change depending on the toss or other unexpected team news. Any such changes will be updated in the articles for the next matchday. Wicketkeepers: Beth Mooney (GG) (10 Credits) Batters: Jemimah Rodrigues (DC) (9 Credits), Smriti Mandhana (RCB) (10.5 Credits), and Kiran Navgire (UP) (7 Credits) All-Rounders: Ashleigh Gardner (GG) (10.5 Credits), Nat Sciver-Brunt (MI) (10 Credits), Hayley Matthews (MI) (9 Credits), and Sneh Rana (GG) (8.5 Credits) Bowlers: Pooja Vastrakar (MI) (8.5 Credits), Shikha Pandey (DC) (8 Credits), and Renuka Singh (RCB) (9 Credits) Setting a fantasy team for a 5-team league is a challenge because, with games coming thick and fast, one doesn't get to reap the benefits of planning and making good transfers according to the schedule as much as you do in a tournament with eight or ten teams. Nevertheless, I'm starting the season with six players from this first clash, four from the RCB-DC game tomorrow (Sunday, March 5) afternoon, and one player from UP Warriorz, who face Gujarat Giants (they play again in less than 24 hours). There's a slight change in the dynamic while picking teams in women's cricket, with the focus shifting more to all-rounders and spinners. Having a specialist batter is almost a rarity, and it does become difficult to fill those slots. RCB and DC seem to have the bulk of the quality batting options, with UP Warriorz having a couple of nice uncapped picks. Beth Mooney is my wicketkeeper pick, and her selection is quite self-explanatory, considering her consistency. All four all-rounders in my team come from this fixture, with the in-form Nat Sciver-Brunt and Ashleigh Gardners must-haves and Sneh Rana an easy utility pick. It was a toss-up between Amelia Kerr and Hayley Matthews for the fourth overseas player spot, and I'm leaning toward the latter right now. My only fear is that Amelia Kerr might get dropped down the order, and that could affect her overall points. However, her bowling is stronger than Matthews' so could that help her outscore the West Indies captain? We'll get to find out. For now, I'm sticking with Hayley Matthews. Onto the bowlers, Pooja Vastrakar will spearhead the MI pace lineup, which does look a bit weak on paper. She will have plenty of responsibility on her shoulders and could shine with the ball. As for those not playing this WPL game, the selections of Smriti Mandhana and Renuka Singh don't need much explanation. It was a toss-up between Jemimah Rodriguez and Shafali Verma, and I'm backing the former due to her better form in the T20 World Cup. There are a lot of expectations from the hard-hitting Kiran Navgire, and if she gets the opportunity to bat up the order, she could light up the league. Lastly, seam bowler Shikha Pandey was a shrewd acquisition by Delhi Capitals. She joins the two other Indian seam-bowling regulars, Renuka Singh and Pooja Vastrakar. Captaincy for Match 1: Ashleigh Gardner looks like the best captaincy option coming into this WPL game, with question marks rising over the number of overs the MI all-rounders could get with the ball, given the amount of bowling options captain Harmanpreet Kaur has at her disposal. Nat-Sciver Brunt, Beth Mooney or Hayley Matthews look like solid vice-captain picks. Wicketkeepers: Beth Mooney (GG) (10 Credits). Batters: Jemimah Rodrigues (DC) (9 Credits), Smriti Mandhana (RCB) (10.5 Credits), and Kiran Navgire (UP) (7 Credits) All-Rounders: Ashleigh Gardner (GG) (10.5 Credits), Nat Sciver-Brunt (MI) (10 Credits), Hayley Matthews (MI) (9 Credits), and Sneh Rana (GG) (8.5 Credits) Bowlers: Pooja Vastrakar (MI) (8.5 Credits), Shikha Pandey (DC) (8 Credits), and Renuka Singh (RCB) (9 Credits) Note: The players in bold are playing in this WPL game.
english
import * as vscode from 'vscode'; import * as path from 'path'; import * as cp from 'child_process'; import { createSandbox, SinonSandbox, SinonSpy, assert as sinonAssert, SinonStub, match } from 'sinon'; import { expect } from 'chai'; import { def } from 'bdd-lazy-var/global'; import * as taskQueueModule from '../../task-queue'; import * as configurationModule from '../../configuration'; import * as executionModule from '../../execution'; import * as loggerModule from '../../logger'; import { CredoProvider, CredoProviderOptions } from '../../provider'; import { CredoInformation, CredoOutput } from '../../output'; declare let $config: configurationModule.CredoConfiguration; declare let $diagnosticCollection: vscode.DiagnosticCollection; declare let $providerOptions: CredoProviderOptions; declare let $credoProvider: CredoProvider; declare let $workspaceFilePath: string; declare let $fileName: string; declare let $documentUri: vscode.Uri; declare let $textDocument: vscode.TextDocument; declare let $otherDocument: vscode.TextDocument; declare let $credoOutput: CredoOutput; declare let $credoInfoOutput: CredoInformation; describe('CredoProvider', () => { let sandbox: SinonSandbox; def('diagnosticCollection', () => vscode.languages.createDiagnosticCollection('elixir')); def('providerOptions', () => ({ diagnosticCollection: $diagnosticCollection })); def('credoProvider', () => new CredoProvider($providerOptions)); beforeEach(() => { sandbox = createSandbox(); }); afterEach(() => { sandbox.restore(); }); context('#execute', () => { const execute = () => $credoProvider.execute({ document: $textDocument }); context('when linting an invalid file', () => { let taskSpy: SinonSpy; let executeCredoSpy: SinonSpy<executionModule.CredoExecutionArguments[], cp.ChildProcess[]>; beforeEach(() => { taskSpy = sandbox.spy(taskQueueModule, 'Task'); executeCredoSpy = sandbox.spy(executionModule, 'executeCredo'); }); context('when linting an untitled file', () => { def('textDocument', () => ({ languageId: 'elixir', isUntitled: true, getText: () => 'defmodule SampleWeb.Telemtry\n@var 2\nend\n', })); it('does not execute credo', () => { execute(); expect(taskSpy.called).to.be.false; expect(executeCredoSpy.called).to.be.false; }); }); context('when linting an non-elixir file', () => { def('textDocument', () => ({ languageId: 'json', isUntitled: false, getText: () => 'defmodule SampleWeb.Telemtry\n@var 2\nend\n', })); it('does not execute credo', () => { execute(); expect(taskSpy.called).to.be.false; expect(executeCredoSpy.called).to.be.false; }); }); context('when linting an file not stored locally, i.e., its uri does not use the file scheme', () => { def('textDocument', () => ({ languageId: 'elixir', isUntitled: false, uri: vscode.Uri.parse('https://example.com/path'), getText: () => 'defmodule SampleWeb.Telemtry\n@var 2\nend\n', })); it('does not execute credo', () => { execute(); expect(taskSpy.called).to.be.false; expect(executeCredoSpy.called).to.be.false; }); }); }); context('when linting a valid elixir document', () => { def('workspaceFilePath', () => '/Users/bot/sample'); def('fileName', () => `${$workspaceFilePath}/lib/sample_web/telemetry.ex`); def('documentUri', () => vscode.Uri.file($fileName)); def('textDocument', () => ({ languageId: 'elixir', isUntitled: false, uri: $documentUri, fileName: $fileName, getText: () => 'defmodule SampleWeb.Telemtry\n@var 2\nend\n', })); def('credoOutput', () => ({ issues: [{ category: 'readability', check: 'Credo.Check.Readability.ModuleDoc', column: 11, column_end: 32, filename: 'lib/sample_web/telemetry.ex', line_no: 1, message: 'Modules should have a @moduledoc tag.', priority: 1, trigger: 'SampleWeb.Telemetry', }], })); def('credoInfoOutput', () => ({ config: { checks: [], files: [ 'lib/sample_web/telemetry.ex', ], }, system: { credo: '1.5.4-ref.main.9fe4739+uncommittedchanges', elixir: '1.11.1', erlang: '23', }, })); let setDiagnosticCollectionSpy: SinonSpy; let logSpy: SinonSpy<loggerModule.LogArguments[], void>; let execFileStub: SinonStub; beforeEach(() => { logSpy = sandbox.spy(loggerModule, 'log'); setDiagnosticCollectionSpy = sandbox.spy($diagnosticCollection, 'set'); sandbox.stub(vscode.workspace, 'getWorkspaceFolder').withArgs($documentUri).callsFake(() => ({ name: 'phoenix-project', index: 0, uri: vscode.Uri.file($workspaceFilePath), })); sandbox.stub(configurationModule, 'getCurrentConfiguration').returns($config); execFileStub = sandbox .stub(cp, 'execFile') .callsFake((_command, commandArguments, _options, callback) => { if (callback) { if (commandArguments?.includes('info')) { callback(null, JSON.stringify($credoInfoOutput), ''); } else { callback(null, JSON.stringify($credoOutput), ''); } } return { kill: () => {} } as cp.ChildProcess; }); }); context('when lintEverything is true', () => { def('config', (): configurationModule.CredoConfiguration => ({ command: 'mix', configurationFile: '.credo.exs', credoConfiguration: 'default', checksWithTag: [], checksWithoutTag: [], strictMode: false, ignoreWarningMessages: false, lintEverything: true, enableDebug: false, })); it('correctly sets a diagnostic collection for the current document', () => { execute(); sinonAssert.calledWith( setDiagnosticCollectionSpy, $documentUri, [new vscode.Diagnostic( new vscode.Range(0, 10, 0, 31), 'Modules should have a @moduledoc tag. (readability:Credo.Check.Readability.ModuleDoc)', vscode.DiagnosticSeverity.Information, )], ); expect(setDiagnosticCollectionSpy.calledOnce).to.true; }); it('logs an info message when setting diagnostics', () => { execute(); sinonAssert.calledWith( logSpy, { message: 'Setting linter issues for document /Users/bot/sample/lib/sample_web/telemetry.ex.', level: loggerModule.LogLevel.Debug, }, ); }); it('executes credo', () => { execute(); sinonAssert.calledWith( execFileStub, 'mix', ['credo', '--format', 'json', '--read-from-stdin', '--config-name', 'default'], match.any, match.any, ); }); it('logs that credo is being executed', () => { execute(); sinonAssert.calledWith( logSpy, { // eslint-disable-next-line max-len message: 'Executing credo command `mix credo --format json --read-from-stdin --config-name default` for /Users/bot/sample/lib/sample_web/telemetry.ex in directory /Users/bot/sample', level: loggerModule.LogLevel.Debug, }, ); }); it('does not fetch credo information', () => { execute(); expect( execFileStub.calledWith( 'mix', ['credo', 'info', '--format', 'json', '--verbose'], match.any, match.any, ), ).to.be.false; }); it('does not log that credo information is fetched', () => { execute(); expect( logSpy.calledWith( { // eslint-disable-next-line max-len message: 'Retreiving credo information: Executing credo command `mix credo info --format json --verbose` /Users/bot/sample/lib/sample_web/telemetry.ex in directory /Users/bot/sample', level: loggerModule.LogLevel.Debug, }, ), ).to.be.false; }); context('with multiple opened workspaces', () => { let executeCredoSpy: SinonSpy<executionModule.CredoExecutionArguments[], cp.ChildProcess[]>; def('workspaceFilePath', () => path.resolve(__dirname, '../../../src/test/fixtures')); def('fileName', () => `${$workspaceFilePath}/sample.ex`); def('documentUri', () => vscode.Uri.file($fileName)); def('textDocument', () => ({ languageId: 'elixir', isUntitled: false, uri: $documentUri, fileName: $fileName, getText: () => 'defmodule SampleWeb.Telemtry\n@var 2\nend\n', })); beforeEach(() => { sandbox.replaceGetter(vscode.workspace, 'workspaceFolders', () => [ { index: 0, name: 'Another workspace', uri: vscode.Uri.file(path.resolve(__dirname)), }, { index: 1, name: 'Main Workspace', uri: vscode.Uri.file(path.resolve(__dirname, '../../../src/test/fixtures')), }, ]); executeCredoSpy = sandbox.spy(executionModule, 'executeCredo'); }); it('executes the credo commands in the correct workspace folder', () => { execute(); sandbox.assert.calledWith( executeCredoSpy, match.hasNested( 'options.cwd', path.resolve(__dirname, '../../../src/test/fixtures'), ), ); }); }); }); context('when the extension only lints the files specified through the credo configuration file', () => { def('config', (): configurationModule.CredoConfiguration => ({ command: 'mix', configurationFile: '.credo.exs', credoConfiguration: 'default', checksWithTag: [], checksWithoutTag: [], strictMode: false, ignoreWarningMessages: false, lintEverything: false, enableDebug: false, })); context('when the current document should be linted', () => { it('adds the diagnostic', () => { execute(); sinonAssert.calledWith( setDiagnosticCollectionSpy, $documentUri, [new vscode.Diagnostic( new vscode.Range(0, 10, 0, 31), 'Modules should have a @moduledoc tag. (readability:Credo.Check.Readability.ModuleDoc)', vscode.DiagnosticSeverity.Information, )], ); expect(setDiagnosticCollectionSpy.calledOnce).to.true; }); it('logs an info message when setting diagnostics', () => { execute(); sinonAssert.calledWith( logSpy, { message: 'Setting linter issues for document /Users/bot/sample/lib/sample_web/telemetry.ex.', level: loggerModule.LogLevel.Debug, }, ); }); it('executes credo', () => { execute(); sinonAssert.calledWith( execFileStub, 'mix', ['credo', '--format', 'json', '--read-from-stdin', '--config-name', 'default'], match.any, match.any, ); }); it('logs that credo is being executed', () => { execute(); sinonAssert.calledWith( logSpy, { // eslint-disable-next-line max-len message: 'Executing credo command `mix credo --format json --read-from-stdin --config-name default` for /Users/bot/sample/lib/sample_web/telemetry.ex in directory /Users/bot/sample', level: loggerModule.LogLevel.Debug, }, ); }); it('fetches credo information', () => { execute(); sinonAssert.calledWith( execFileStub, 'mix', ['credo', 'info', '--format', 'json', '--verbose'], match.any, match.any, ); }); it('logs an info message when credo information is fetched', () => { execute(); sinonAssert.calledWith( logSpy, { // eslint-disable-next-line max-len message: 'Retreiving credo information: Executing credo command `mix credo info --format json --verbose` for /Users/bot/sample/lib/sample_web/telemetry.ex in directory /Users/bot/sample', level: loggerModule.LogLevel.Debug, }, ); }); }); context('when the current document should not be linted', () => { def('fileName', () => `${$workspaceFilePath}/lib/sample_web/telemetry_test.ex`); it('does not add any diagnostic', () => { execute(); sinonAssert.calledWith( setDiagnosticCollectionSpy, $documentUri, [], ); expect(setDiagnosticCollectionSpy.calledOnce).to.true; }); it('logs an info message when (not) setting diagnostics', () => { execute(); sinonAssert.calledWith( logSpy, { message: 'Setting linter issues for document /Users/bot/sample/lib/sample_web/telemetry_test.ex.', level: loggerModule.LogLevel.Debug, }, ); }); it('does not execute credo', () => { execute(); expect( execFileStub.calledWith( 'mix', ['credo', '--format', 'json', '--read-from-stdin', '--config-name', 'default'], match.any, match.any, ), ).to.be.false; }); it('does not log that credo is being executed', () => { execute(); expect( logSpy.calledWith({ // eslint-disable-next-line max-len message: 'Executing credo command `mix credo --format json --read-from-stdin --config-name default` for /Users/bot/sample/lib/sample_web/telemetry_test.ex in directory /Users/bot/sample', level: loggerModule.LogLevel.Debug, }), ).to.be.false; }); it('fetches credo information', () => { execute(); sinonAssert.calledWith( execFileStub, 'mix', ['credo', 'info', '--format', 'json', '--verbose'], match.any, match.any, ); }); it('logs an info message when credo information is fetched', () => { execute(); sinonAssert.calledWith( logSpy, { // eslint-disable-next-line max-len message: 'Retreiving credo information: Executing credo command `mix credo info --format json --verbose` for /Users/bot/sample/lib/sample_web/telemetry_test.ex in directory /Users/bot/sample', level: loggerModule.LogLevel.Debug, }, ); }); }); }); }); }); context('#clear', () => { const clear = () => $credoProvider.clear({ document: $textDocument }); def('textDocument', () => ({ uri: vscode.Uri.file('/Users/bot/sample/lib/sample_web/telemetry_test.ex') })); it('deletes all diagnostics for the given document', () => { const deleteDiagnosticSpy = sandbox.spy($diagnosticCollection, 'delete'); clear(); sandbox.assert.calledOnceWithExactly( deleteDiagnosticSpy, $textDocument.uri, ); }); it('cancels any ongoing tasks for this document', () => { const taskCancelSpy = sandbox.spy($credoProvider.taskQueue, 'cancel'); clear(); sandbox.assert.calledOnceWithExactly( taskCancelSpy, $textDocument.uri, ); }); it('logs an info message for clearing the diagnostics', () => { const logSpy = sandbox.spy(loggerModule, 'log'); clear(); sandbox.assert.calledOnceWithExactly( logSpy, { // eslint-disable-next-line max-len message: 'Removing linter messages and cancel running linting processes for /Users/bot/sample/lib/sample_web/telemetry_test.ex.', level: loggerModule.LogLevel.Debug, }, ); }); }); context('#clearAll', () => { const clearAll = () => $credoProvider.clearAll(); def('textDocument', () => ({ uri: vscode.Uri.file(path.resolve(__filename)) })); def('otherDocument', () => ({ uri: vscode.Uri.file(path.resolve(__dirname, '../fixtures/sample.ex')) })); beforeEach(() => { sandbox.replaceGetter(vscode.window, 'visibleTextEditors', () => [ { document: $textDocument } as any, { document: $otherDocument } as any, ]); }); it('calls #clear for each document', () => { const clearSpy = sandbox.spy($credoProvider, 'clear'); clearAll(); expect(clearSpy.calledTwice).to.be.true; sandbox.assert.calledWith(clearSpy, { document: $textDocument }); sandbox.assert.calledWith(clearSpy, { document: $otherDocument }); }); }); });
typescript
// Copyright 2015 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 <stddef.h> #include <stdint.h> #include <utility> #include "base/auto_reset.h" #include "base/bind.h" #include "base/callback.h" #include "base/command_line.h" #include "base/json/json_reader.h" #include "base/macros.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" #include "base/test/test_timeouts.h" #include "base/time/time.h" #include "base/values.h" #include "build/build_config.h" #include "components/html_viewer/public/interfaces/test_html_viewer.mojom.h" #include "components/mus/public/cpp/tests/window_server_test_base.h" #include "components/mus/public/cpp/window.h" #include "components/mus/public/cpp/window_tree_connection.h" #include "components/web_view/frame.h" #include "components/web_view/frame_connection.h" #include "components/web_view/frame_tree.h" #include "components/web_view/public/interfaces/frame.mojom.h" #include "components/web_view/test_frame_tree_delegate.h" #include "mojo/services/accessibility/public/interfaces/accessibility.mojom.h" #include "mojo/shell/public/cpp/application_impl.h" #include "net/test/embedded_test_server/embedded_test_server.h" using mus::mojom::WindowTreeClientPtr; using mus::WindowServerTestBase; using web_view::Frame; using web_view::FrameConnection; using web_view::FrameTree; using web_view::FrameTreeDelegate; using web_view::mojom::FrameClient; namespace mojo { namespace { const char kAddFrameWithEmptyPageScript[] = "var iframe = document.createElement(\"iframe\");" "iframe.src = \"http://127.0.0.1:%u/empty_page.html\";" "document.body.appendChild(iframe);"; void OnGotContentHandlerForRoot(bool* got_callback) { *got_callback = true; ignore_result(WindowServerTestBase::QuitRunLoop()); } mojo::ApplicationConnection* ApplicationConnectionForFrame(Frame* frame) { return static_cast<FrameConnection*>(frame->user_data()) ->application_connection(); } std::string GetFrameText(ApplicationConnection* connection) { html_viewer::TestHTMLViewerPtr test_html_viewer; connection->ConnectToService(&test_html_viewer); std::string result; test_html_viewer->GetContentAsText([&result](const String& mojo_string) { result = mojo_string; ASSERT_TRUE(WindowServerTestBase::QuitRunLoop()); }); if (!WindowServerTestBase::DoRunLoopWithTimeout()) ADD_FAILURE() << "Timed out waiting for execute to complete"; // test_html_viewer.WaitForIncomingResponse(); return result; } scoped_ptr<base::Value> ExecuteScript(ApplicationConnection* connection, const std::string& script) { html_viewer::TestHTMLViewerPtr test_html_viewer; connection->ConnectToService(&test_html_viewer); scoped_ptr<base::Value> result; test_html_viewer->ExecuteScript(script, [&result](const String& json_string) { result = base::JSONReader::Read(json_string.To<std::string>()); ASSERT_TRUE(WindowServerTestBase::QuitRunLoop()); }); if (!WindowServerTestBase::DoRunLoopWithTimeout()) ADD_FAILURE() << "Timed out waiting for execute to complete"; return result; } // FrameTreeDelegate that can block waiting for navigation to start. class TestFrameTreeDelegateImpl : public web_view::TestFrameTreeDelegate { public: explicit TestFrameTreeDelegateImpl(mojo::ApplicationImpl* app) : TestFrameTreeDelegate(app), frame_tree_(nullptr) {} ~TestFrameTreeDelegateImpl() override {} void set_frame_tree(FrameTree* frame_tree) { frame_tree_ = frame_tree; } // Resets the navigation state for |frame|. void ClearGotNavigate(Frame* frame) { frames_navigated_.erase(frame); } // Waits until |frame| has |count| children and the last child has navigated. bool WaitForChildFrameCount(Frame* frame, size_t count) { if (DidChildNavigate(frame, count)) return true; waiting_for_frame_child_count_.reset(new FrameAndChildCount); waiting_for_frame_child_count_->frame = frame; waiting_for_frame_child_count_->count = count; return WindowServerTestBase::DoRunLoopWithTimeout(); } // Returns true if |frame| has navigated. If |frame| hasn't navigated runs // a nested message loop until |frame| navigates. bool WaitForFrameNavigation(Frame* frame) { if (frames_navigated_.count(frame)) return true; frames_waiting_for_navigate_.insert(frame); return WindowServerTestBase::DoRunLoopWithTimeout(); } // TestFrameTreeDelegate: void DidStartNavigation(Frame* frame) override { frames_navigated_.insert(frame); if (waiting_for_frame_child_count_ && DidChildNavigate(waiting_for_frame_child_count_->frame, waiting_for_frame_child_count_->count)) { waiting_for_frame_child_count_.reset(); ASSERT_TRUE(WindowServerTestBase::QuitRunLoop()); } if (frames_waiting_for_navigate_.count(frame)) { frames_waiting_for_navigate_.erase(frame); ignore_result(WindowServerTestBase::QuitRunLoop()); } } private: struct FrameAndChildCount { Frame* frame; size_t count; }; // Returns true if |frame| has |count| children and the last child frame // has navigated. bool DidChildNavigate(Frame* frame, size_t count) { return ((frame->children().size() == count) && (frames_navigated_.count(frame->children()[count - 1]))); } FrameTree* frame_tree_; // Any time DidStartNavigation() is invoked the frame is added here. Frames // are inserted as void* as this does not track destruction of the frames. std::set<void*> frames_navigated_; // The set of frames waiting for a navigation to occur. std::set<Frame*> frames_waiting_for_navigate_; // Set of frames waiting for a certain number of children and navigation. scoped_ptr<FrameAndChildCount> waiting_for_frame_child_count_; DISALLOW_COPY_AND_ASSIGN(TestFrameTreeDelegateImpl); }; } // namespace class HTMLFrameTest : public WindowServerTestBase { public: HTMLFrameTest() {} ~HTMLFrameTest() override {} protected: // Creates the frame tree showing an empty page at the root and adds (via // script) a frame showing the same empty page. Frame* LoadEmptyPageAndCreateFrame() { mus::Window* embed_window = window_manager()->NewWindow(); frame_tree_delegate_.reset( new TestFrameTreeDelegateImpl(application_impl())); FrameConnection* root_connection = InitFrameTree( embed_window, "http://127.0.0.1:%u/empty_page2.html"); if (!root_connection) { ADD_FAILURE() << "unable to establish root connection"; return nullptr; } const std::string frame_text = GetFrameText(root_connection->application_connection()); if (frame_text != "child2") { ADD_FAILURE() << "unexpected text " << frame_text; return nullptr; } return CreateEmptyChildFrame(frame_tree_->root()); } Frame* CreateEmptyChildFrame(Frame* parent) { const size_t initial_frame_count = parent->children().size(); // Dynamically add a new frame. ExecuteScript(ApplicationConnectionForFrame(parent), AddPortToString(kAddFrameWithEmptyPageScript)); frame_tree_delegate_->WaitForChildFrameCount(parent, initial_frame_count + 1); if (HasFatalFailure()) return nullptr; return parent->FindFrame(parent->window()->children().back()->id()); } std::string AddPortToString(const std::string& string) { const uint16_t assigned_port = http_server_->host_port_pair().port(); return base::StringPrintf(string.c_str(), assigned_port); } mojo::URLRequestPtr BuildRequestForURL(const std::string& url_string) { mojo::URLRequestPtr request(mojo::URLRequest::New()); request->url = mojo::String::From(AddPortToString(url_string)); return request; } FrameConnection* InitFrameTree(mus::Window* view, const std::string& url_string) { frame_tree_delegate_.reset( new TestFrameTreeDelegateImpl(application_impl())); scoped_ptr<FrameConnection> frame_connection(new FrameConnection); bool got_callback = false; frame_connection->Init( application_impl(), BuildRequestForURL(url_string), base::Bind(&OnGotContentHandlerForRoot, &got_callback)); ignore_result(WindowServerTestBase::DoRunLoopWithTimeout()); if (!got_callback) return nullptr; FrameConnection* result = frame_connection.get(); FrameClient* frame_client = frame_connection->frame_client(); WindowTreeClientPtr tree_client = frame_connection->GetWindowTreeClient(); frame_tree_.reset(new FrameTree( result->GetContentHandlerID(), view, std::move(tree_client), frame_tree_delegate_.get(), frame_client, std::move(frame_connection), Frame::ClientPropertyMap(), base::TimeTicks::Now())); frame_tree_delegate_->set_frame_tree(frame_tree_.get()); return result; } // ViewManagerTest: void SetUp() override { WindowServerTestBase::SetUp(); // Start a test server. http_server_.reset(new net::EmbeddedTestServer); http_server_->ServeFilesFromSourceDirectory( "components/test/data/html_viewer"); ASSERT_TRUE(http_server_->Start()); } void TearDown() override { frame_tree_.reset(); http_server_.reset(); WindowServerTestBase::TearDown(); } scoped_ptr<net::EmbeddedTestServer> http_server_; scoped_ptr<FrameTree> frame_tree_; scoped_ptr<TestFrameTreeDelegateImpl> frame_tree_delegate_; private: DISALLOW_COPY_AND_ASSIGN(HTMLFrameTest); }; // Crashes on linux_chromium_rel_ng only. http://crbug.com/567337 #if defined(OS_LINUX) #define MAYBE_PageWithSingleFrame DISABLED_PageWithSingleFrame #else #define MAYBE_PageWithSingleFrame PageWithSingleFrame #endif TEST_F(HTMLFrameTest, MAYBE_PageWithSingleFrame) { mus::Window* embed_window = window_manager()->NewWindow(); FrameConnection* root_connection = InitFrameTree( embed_window, "http://127.0.0.1:%u/page_with_single_frame.html"); ASSERT_TRUE(root_connection); ASSERT_EQ("Page with single frame", GetFrameText(root_connection->application_connection())); ASSERT_NO_FATAL_FAILURE( frame_tree_delegate_->WaitForChildFrameCount(frame_tree_->root(), 1u)); ASSERT_EQ(1u, embed_window->children().size()); Frame* child_frame = frame_tree_->root()->FindFrame(embed_window->children()[0]->id()); ASSERT_TRUE(child_frame); ASSERT_EQ("child", GetFrameText(static_cast<FrameConnection*>(child_frame->user_data()) ->application_connection())); } // Creates two frames. The parent navigates the child frame by way of changing // the location of the child frame. // Crashes on linux_chromium_rel_ng only. http://crbug.com/567337 #if defined(OS_LINUX) #define MAYBE_ChangeLocationOfChildFrame DISABLED_ChangeLocationOfChildFrame #else #define MAYBE_ChangeLocationOfChildFrame ChangeLocationOfChildFrame #endif TEST_F(HTMLFrameTest, MAYBE_ChangeLocationOfChildFrame) { mus::Window* embed_window = window_manager()->NewWindow(); ASSERT_TRUE(InitFrameTree( embed_window, "http://127.0.0.1:%u/page_with_single_frame.html")); // page_with_single_frame contains a child frame. The child frame should // create a new View and Frame. ASSERT_NO_FATAL_FAILURE( frame_tree_delegate_->WaitForChildFrameCount(frame_tree_->root(), 1u)); Frame* child_frame = frame_tree_->root()->children().back(); ASSERT_EQ("child", GetFrameText(static_cast<FrameConnection*>(child_frame->user_data()) ->application_connection())); // Change the location and wait for the navigation to occur. const char kNavigateFrame[] = "window.frames[0].location = " "'http://1172.16.17.32:%u/empty_page2.html'"; frame_tree_delegate_->ClearGotNavigate(child_frame); ExecuteScript(ApplicationConnectionForFrame(frame_tree_->root()), AddPortToString(kNavigateFrame)); ASSERT_TRUE(frame_tree_delegate_->WaitForFrameNavigation(child_frame)); // There should still only be one frame. ASSERT_EQ(1u, frame_tree_->root()->children().size()); // The navigation should have changed the text of the frame. ASSERT_TRUE(child_frame->user_data()); ASSERT_EQ("child2", GetFrameText(static_cast<FrameConnection*>(child_frame->user_data()) ->application_connection())); } TEST_F(HTMLFrameTest, DynamicallyAddFrameAndVerifyParent) { Frame* child_frame = LoadEmptyPageAndCreateFrame(); ASSERT_TRUE(child_frame); mojo::ApplicationConnection* child_frame_connection = ApplicationConnectionForFrame(child_frame); ASSERT_EQ("child", GetFrameText(child_frame_connection)); // The child's parent should not be itself: const char kGetWindowParentNameScript[] = "window.parent == window ? 'parent is self' : 'parent not self';"; scoped_ptr<base::Value> parent_value( ExecuteScript(child_frame_connection, kGetWindowParentNameScript)); ASSERT_TRUE(parent_value->IsType(base::Value::TYPE_LIST)); base::ListValue* parent_list; ASSERT_TRUE(parent_value->GetAsList(&parent_list)); ASSERT_EQ(1u, parent_list->GetSize()); std::string parent_name; ASSERT_TRUE(parent_list->GetString(0u, &parent_name)); EXPECT_EQ("parent not self", parent_name); } TEST_F(HTMLFrameTest, DynamicallyAddFrameAndSeeNameChange) { Frame* child_frame = LoadEmptyPageAndCreateFrame(); ASSERT_TRUE(child_frame); mojo::ApplicationConnection* child_frame_connection = ApplicationConnectionForFrame(child_frame); // Change the name of the child's window. ExecuteScript(child_frame_connection, "window.name = 'new_child';"); // Eventually the parent should see the change. There is no convenient way // to observe this change, so we repeatedly ask for it and timeout if we // never get the right value. const base::TimeTicks start_time(base::TimeTicks::Now()); std::string find_window_result; do { find_window_result.clear(); scoped_ptr<base::Value> script_value( ExecuteScript(ApplicationConnectionForFrame(frame_tree_->root()), "window.frames['new_child'] != null ? 'found frame' : " "'unable to find frame';")); if (script_value->IsType(base::Value::TYPE_LIST)) { base::ListValue* script_value_as_list; if (script_value->GetAsList(&script_value_as_list) && script_value_as_list->GetSize() == 1) { script_value_as_list->GetString(0u, &find_window_result); } } } while (find_window_result != "found frame" && base::TimeTicks::Now() - start_time < TestTimeouts::action_timeout()); EXPECT_EQ("found frame", find_window_result); } // Triggers dynamic addition and removal of a frame. TEST_F(HTMLFrameTest, FrameTreeOfThreeLevels) { // Create a child frame, and in that child frame create another child frame. Frame* child_frame = LoadEmptyPageAndCreateFrame(); ASSERT_TRUE(child_frame); ASSERT_TRUE(CreateEmptyChildFrame(child_frame)); // Make sure the parent can see the child and child's child. There is no // convenient way to observe this change, so we repeatedly ask for it and // timeout if we never get the right value. const char kGetChildChildFrameCount[] = "if (window.frames.length > 0)" " window.frames[0].frames.length.toString();" "else" " '0';"; const base::TimeTicks start_time(base::TimeTicks::Now()); std::string child_child_frame_count; do { child_child_frame_count.clear(); scoped_ptr<base::Value> script_value( ExecuteScript(ApplicationConnectionForFrame(frame_tree_->root()), kGetChildChildFrameCount)); if (script_value->IsType(base::Value::TYPE_LIST)) { base::ListValue* script_value_as_list; if (script_value->GetAsList(&script_value_as_list) && script_value_as_list->GetSize() == 1) { script_value_as_list->GetString(0u, &child_child_frame_count); } } } while (child_child_frame_count != "1" && base::TimeTicks::Now() - start_time < TestTimeouts::action_timeout()); EXPECT_EQ("1", child_child_frame_count); // Remove the child's child and make sure the root doesn't see it anymore. const char kRemoveLastIFrame[] = "document.body.removeChild(document.body.lastChild);"; ExecuteScript(ApplicationConnectionForFrame(child_frame), kRemoveLastIFrame); do { child_child_frame_count.clear(); scoped_ptr<base::Value> script_value( ExecuteScript(ApplicationConnectionForFrame(frame_tree_->root()), kGetChildChildFrameCount)); if (script_value->IsType(base::Value::TYPE_LIST)) { base::ListValue* script_value_as_list; if (script_value->GetAsList(&script_value_as_list) && script_value_as_list->GetSize() == 1) { script_value_as_list->GetString(0u, &child_child_frame_count); } } } while (child_child_frame_count != "0" && base::TimeTicks::Now() - start_time < TestTimeouts::action_timeout()); ASSERT_EQ("0", child_child_frame_count); } // Verifies PostMessage() works across frames. TEST_F(HTMLFrameTest, PostMessage) { Frame* child_frame = LoadEmptyPageAndCreateFrame(); ASSERT_TRUE(child_frame); mojo::ApplicationConnection* child_frame_connection = ApplicationConnectionForFrame(child_frame); ASSERT_EQ("child", GetFrameText(child_frame_connection)); // Register an event handler in the child frame. const char kRegisterPostMessageHandler[] = "window.messageData = null;" "function messageFunction(event) {" " window.messageData = event.data;" "}" "window.addEventListener('message', messageFunction, false);"; ExecuteScript(child_frame_connection, kRegisterPostMessageHandler); // Post a message from the parent to the child. const char kPostMessageFromParent[] = "window.frames[0].postMessage('hello from parent', '*');"; ExecuteScript(ApplicationConnectionForFrame(frame_tree_->root()), kPostMessageFromParent); // Wait for the child frame to see the message. const base::TimeTicks start_time(base::TimeTicks::Now()); std::string message_in_child; do { const char kGetMessageData[] = "window.messageData;"; scoped_ptr<base::Value> script_value( ExecuteScript(child_frame_connection, kGetMessageData)); if (script_value->IsType(base::Value::TYPE_LIST)) { base::ListValue* script_value_as_list; if (script_value->GetAsList(&script_value_as_list) && script_value_as_list->GetSize() == 1) { script_value_as_list->GetString(0u, &message_in_child); } } } while (message_in_child != "hello from parent" && base::TimeTicks::Now() - start_time < TestTimeouts::action_timeout()); EXPECT_EQ("hello from parent", message_in_child); } } // namespace mojo
cpp
Congress must withdraw completely and fight zero seats and let the federal alliance partners take the lead or have a seat sharing arrangement in some states, writes Chenthil Iyer. Information in Public domain on the use of Electronic Voting Machine by the EC also points out that its software gets compromised, writes Jagdish Kumar. When there is a one-sided demand, vested interests raise the spectre of cultural Nationalism, writes Col KL Viswanathan. Statutory bodies and strict regulations must be in place to allay fears of private players, writes Nikhil Rajput. India cannot play to never lose. We need to take defeats in our stride and also enjoy the game, writes Rishi Desai. The various inaugurations in 2023 by PM Modi will zoom in his already larger-than-life image, writes Nischai Vats. Rethinking enterprise and entrepreneurship for leadership and governance is increasingly becoming a ground zero topic, writes Jyoti Lahiri. The Hindu religion based on which his party runs its political business, acknowledges not just same sex relationships but also marriage, writes Raj Gopinathan. Every year, approximately 1. 5 lakh people die on Indian roads due to accidents, which converts into 1130 accidents and 422 deaths every day, writes Vaidyanathan Subramanian. Civil and legislative bodies should formulate a simple and accessible legal framework for the regulation of street vendors to safeguard their rights, writes Priyank Nagpal. Launched in 2017 as Xi’s pet urban project, Xiong’an has faced delays and limited progress despite the talk of turning the area into the next Shenzhen or Shanghai. The government had in February estimated GDP growth for 2022-23 to be 7%. The higher-than-expected actual performance is largely due to a strong cross-sector showing in Q4. Transfer of Technology (ToT) for jet engines was the main thrust of National Security Advisor Ajit Doval's talks with his American counterpart Jack Sullivan in February. Copyright © 2023 Printline Media Pvt. Ltd. All rights reserved.
english
Britannia’s 4Q performance was tad below expectation on volumes front but a way stronger gross margin for the third time in a row made up for the shortfall. The quantum of earnings beat was also led by bunched-up government incentives received, ex which EBITDA was broadly inline with what we were expecting. Volumes in terms of grammages grew in “very low single-digit” over past 6M but growth in packs sold was c. 12% during Mar-Q, as per management. Going into FY24, management is confident that volume growth would pick up on the back of initiatives on distribution expansion, adjacencies scale-up and price-reversal in brands and SKUs where the same are deemed necessary; the latter would offset some of the gross margin gains expected from the benign costs trend but we reckon that FY24 operating margin could still be better vs FY23-exit excluding the excess incentives included therein. Implicit in this assumption, of course, is that Britannia’s historically-proven ability to grow SG&A at a very low clip, which did not materialise in FY23, would play out going forward. We expect the stock to do well on the back of this result. * Volumes were tad lower-than-expected…: Britannia’s 4QFY23 consolidated sales, EBITDA and net profit grew 10. 9%, 45. 7% and 47. 1% to INR 38. 9bn, INR 8bn and INR 5. 6bn respectively. Standalone sales growth was higher at 14. 3% but was buoyed by 1-2% due to non-cheese Dairy sales moving to the parent entity whilst consolidated sales was adversely impacted by 1-2% due to Cheese revenue now being accounted as ‘share of profits from JV and associates’ instead of a line-by-line consolidation that used to be done earlier. Volumes likely grew 1-2% but growth in number of packs sold was much higher at 12%, as per management. Realisation per kg was still 11-12% higher yoy and management is well-cognizant of the fact that this may need to be adjusted downwards in the days ahead to maintain price-value equation in a lower commodity-costs regime. * made up by much stronger gross margin: Britannia’s consolidated gross margin expanded 577bps yoy and 72bps qoq to an all-time high level of 43. 1% - better vs our expectation of 41. 5% for this quarter which was assuming that the earlier-available lower-priced wheat-flour inventory would have all been used up already. As per management, amongst its key inputs, wheat flour and dairy prices are still significantly inflationary while palm oil, laminates and corrugated boxes’ prices have deflated; the well-timed strategic buying decisions taken by the company could help bring its own costs down by a notch vs what spot prices suggest. Britannia booked INR900mn of operating other income from PLI incentives (partly pertains to earlier periods) during the quarter (was c. INR500mn in 3Q) – this by itself boosted reported operating margin by c. 2ppt. Ex of this, normalised EBITDA margin was in the 18. 7%-range which is c. 300bps higher yoy but just a tad lower qoq. Growth in Staff costs and Other Expenses was of a much higher order than the range that we are used to seeing in Britannia, viz. +40% and +23% respectively.
english
<filename>flow-kit/src/main/java/com/zeoflow/crash/reporter/service/NotificationService.java package com.zeoflow.crash.reporter.service; import android.app.NotificationManager; import android.app.Service; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.IBinder; import androidx.annotation.Nullable; import androidx.core.content.FileProvider; import com.zeoflow.crash.reporter.utils.AppUtils; import com.zeoflow.crash.reporter.utils.FileUtils; import java.io.File; import static com.zeoflow.crash.reporter.utils.Constants.ACTION_CR_ZF_DELETE; import static com.zeoflow.crash.reporter.utils.Constants.ACTION_CR_ZF_SHARE; import static com.zeoflow.crash.reporter.utils.Constants.CRASH_REPORTER_NOTIFICATION_ID; public class NotificationService extends Service { @Override public int onStartCommand(Intent intent, int flags, int startId) { if (intent.getAction() != null) { if (intent.getAction().equals("DELETE_ACTION_CR_ZF")) { if (FileUtils.delete(intent.getStringExtra("LogMessage"))) { NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); notificationManager.cancel(8102020); } } else if (intent.getAction().equals("SHARE_ACTION_CR_ZF")) { Intent intentShare = new Intent(Intent.ACTION_SEND); intentShare.setType("*/*"); intentShare.putExtra(Intent.EXTRA_TEXT, AppUtils.getDeviceDetails()); Uri photoURI = FileProvider.getUriForFile(getApplicationContext(), getApplicationContext().getPackageName() + ".provider", new File(intent.getStringExtra("LogMessage"))); intentShare.putExtra(Intent.EXTRA_STREAM, photoURI); Intent share = Intent.createChooser(intentShare, "Share Crash Report via"); share.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); share.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(share); } } return super.onStartCommand(intent, flags, startId); } @Nullable @Override public IBinder onBind(Intent intent) { return null; } }
java
<filename>SmartValley.FrontEnd/src/app/components/project-info/project-info.component-en.json { "ProjectCard": { "ProjectArea": "Project category", "Country": "Country", "Status": "Status", "IcoDate": "ICO date", "Website": "Website", "OpenWP": "Open White paper" } }
json
export default function toValidCSSIdentifier(s: string) { return s.replace(/[^_0-9a-z]/gi, '_') }
typescript
Turkish President Recep Tayyip Erdogan has criticized US President Joe Biden for calling Russian President Vladimir Putin “a killer,” saying the comment is “unacceptable” and not befitting of a leader. German Health Minister Jens Spahn said on Friday he would be in favor of signing a national supply deal with Russia for its Sputnik V vaccine for COVID-19. Syria and Russia say the United States has been obstructing the return of the displaced Syrians to their homeland by financing foreign-sponsored mercenaries and igniting conflict across the Arab country. Russia has called its ambassador to the US to come back home for consultations on the future of Moscow-Washington relations after US President Joe Biden called his Russian counterpart Vladimir Putin “a killer”. The Kremlin has regretted a recent decision by the United Kingdom to increase its nuclear warhead stockpile by more than 40 percent. A new report released in the United States has blamed Russia for influencing the 2020 presidential election, won by now-President Joe Biden. Iran’s ambassador to Russia and a parliamentary delegation of the Lebanese Hezbollah resistance movement discussed various regional issues at a meeting in Moscow. A delegation of lawmakers from Lebanon’s Hezbollah resistance movement has arrived in Russia’s capital, Moscow, for talks. The Iranian Foreign Ministry’s spokesman said Tehran is considering an invitation to a meeting that Russia is going to host for talks on the Afghan peace process. A Russian military official says Russia is ready for holding talks with Turkey on the possible delivery of Russian-made SU-35 and SU-57 fighter jets providing that Moscow receives the corresponding request Ankara.
english
import { FormControl } from '@angular/forms'; import { ApplicationDataService } from './../application-data.service'; import { ApplicationModel } from '../application.model'; import { Component, OnInit, AfterViewInit } from '@angular/core'; import { Response } from '@angular/http'; import { HttpClient } from '@angular/common/http'; import { FormGroup } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; import { Router } from '@angular/router'; import { environment } from '../../../../environments/environment'; @Component({ selector: 'app-update-application-entity', templateUrl: './update-application-entity.component.html', styleUrls: ['./update-application-entity.component.css'] }) export class UpdateApplicationEntityComponent implements OnInit { constructor(private http: HttpClient, private route: ActivatedRoute, private router: Router, private applicationDataService: ApplicationDataService) { this.applicationForm = new FormGroup({ applicationName: new FormControl(""), applicationCode: new FormControl(""), description: new FormControl(""), enableFlag: new FormControl("") }); } platformURL = environment.platformURL; selectedApplicationCode: string; selectedApplication: any; viewType = true; logoFile: File = null; faviconFile: File = null; logoInBase64: string = ""; faviconInBase64: string = ""; logoUrl: any; faviconUrl: any; applications: any[]; applicationForm: FormGroup; ngOnInit() { this.selectedApplicationCode = "" + this.route.snapshot.params['id']; this.applicationDataService.getOneApplication(this.selectedApplicationCode).subscribe((response: any) => { if(response.data.length!=0){ this.selectedApplication = response.data[0]; this.applicationForm.patchValue({ applicationName: this.selectedApplication.applicationName, applicationCode: this.selectedApplication.applicationCode, enableFlag: this.selectedApplication.enableFlag, description: this.selectedApplication.description }); this.logoUrl = this.selectedApplication.logo; this.faviconUrl = this.selectedApplication.favicon; } }, (err)=>{ this.applicationDataService.openDialog("error", err.error.description).subscribe((response)=>{ // Dialog response can be handled here }) }); } logoUpload(file: FileList) { this.logoFile = file.item(0); var reader = new FileReader(); reader.readAsDataURL(this.logoFile); reader.onload = (e) => { this.selectedApplication.logo = reader.result; this.logoInBase64 = reader.result; this.logoUrl = this.logoInBase64; } } faviconUpload(file: FileList) { this.faviconFile = file.item(0); var reader = new FileReader(); reader.readAsDataURL(this.faviconFile); reader.onload = (e) => { this.selectedApplication.favicon = reader.result; this.faviconInBase64 = reader.result; this.faviconUrl = this.faviconInBase64; } } update() { var applicationData = { applicationName: this.applicationForm.value.applicationName, applicationCode: this.applicationForm.value.applicationCode, enableFlag: this.applicationForm.value.enableFlag, description: this.applicationForm.value.description, logo: this.logoInBase64, favicon: this.faviconInBase64 }; this.applicationDataService.update(applicationData).subscribe((response: any)=>{ this.applicationDataService.openDialog("success", response.description).subscribe((response)=>{ this.router.navigate(['applicationManagement']); })}, (err) => { this.applicationDataService.openDialog("error", err.error.description).subscribe((response: any)=>{ //Dialog Response can be handled here }) } ); } abortUpdateAction(){ this.router.navigate(['/viewApplication', this.selectedApplication.applicationCode]); } }
typescript
<filename>core/src/main/java/com/ctrip/xpipe/migration/DefaultMigrationPublishService.java package com.ctrip.xpipe.migration; import java.net.InetSocketAddress; import java.util.Arrays; import java.util.Date; import java.util.List; /** * @author shyin * * Dec 22, 2016 */ public class DefaultMigrationPublishService extends AbstractMigrationPublishService { @Override public MigrationPublishResult doMigrationPublish(String clusterName, String primaryDcName, List<InetSocketAddress> newMasters) { logger.info("[doMigrationPublish]Cluster:{}, NewPrimaryDc:{}, Masters:{}", clusterName, primaryDcName, newMasters); String startTime = sdf.format(new Date()); MigrationPublishResult res = new MigrationPublishResult("default-addr", clusterName, primaryDcName, newMasters); String endTime = sdf.format(new Date()); res.setSuccess(true);res.setMessage("default-success"); res.setStartTime(startTime); res.setEndTime(endTime); return res; } @Override public MigrationPublishResult doMigrationPublish(String clusterName, String shardName, String primaryDcName, InetSocketAddress newMaster) { logger.info("[doMigrationPublish]Cluster:{}, Shard:{}, NewPrimaryDc:{}, NewMaster:{}", clusterName, shardName, primaryDcName, newMaster); String startTime = sdf.format(new Date()); MigrationPublishResult res = new MigrationPublishResult("default-addr", clusterName, primaryDcName, Arrays.asList(newMaster)); String endTime = sdf.format(new Date()); res.setSuccess(true);res.setMessage("default-success"); res.setStartTime(startTime); res.setEndTime(endTime); return res; } }
java
According to Pakistan Cricket Board CEO Wasim Khan, the 2021 edition of the ICC T20 World Cup could be shifted from India to the UAE. Khan feels India might not be in a position to host the mega event owing to the monumental effects of the COVID-19 pandemic on the country. Following the postponement of the 2020 T20 World Cup that was scheduled to take place in Australia this year, the ICC confirmed that India will host the 2021 edition while the 2022 T20 World Cup will be held in Australia. However, in an interview on the Cricket Baaz YouTube channel, Khan claimed: India will host England before the T20 World Cup next year. The England series will be followed by the new edition of the IPL in the first half of 2021. Wasim Khan, however, insisted that it is too early to conclude that the T20 World Cup will be held in India, adding that a clearer picture will be out by April next year. Wasim Khan also confirmed that the PCB is awaiting written confirmation from both the ICC and the BCCI over the issuing of visas to Pakistan players for the scheduled T20 World Cup in India. He said: "Yes, Mani Sahab (PCB chief Ehsan Mani) has written to them and requested them that given the state of relations between India and Pakistan, it would be best if the ICC and BCCI gives a written assurance about the visas being issued to us. " Khan added that since relations between India and Pakistan are not cordial owing to border tensions, it is the ICC's responsibility to guarantee the participation of teams in world cricketing events. "But yes bilateral relations are not ideal and that is why we have also asked for the assurances for next year's World Cup. " Khan also revealed that the postponed Asia Cup will be held in Sri Lanka in June. This was decided in a recent online meeting of the Asian Cricket Council.
english
<filename>src/rosetta/MDC_DIM_X_G_PER_M_PER_SEC.java package rosetta; public class MDC_DIM_X_G_PER_M_PER_SEC { public static final String VALUE = "MDC_DIM_X_G_PER_M_PER_SEC"; }
java
Former Pakistan international Danish Kaneria wants Babar Azam to step up and deliver for his team against England in the second innings of the ongoing Karachi Test. He pointed out that the right-hander often fails to score big in the second innings. The statement came as Babar has scored 4 and 1, respectively, in the second innings of his last two Tests. So far in his career, he has scored three centuries in 35 innings during the third or fourth innings. Speaking on his YouTube channel, Danish Kaneria said: Babar, however, has scored 136, 75, and 78, in the first innings of the three Tests of the ongoing series. However, it was only a few months ago that Babar scored a magnificent 196 against Australia in the fourth innings of a Test at the same venue, Karachi, to save a Test. So, success in the second innings is far from an unknown phenomenon for the prolific batsman. As far as the state of the ongoing Test is concerned, England were bowled out for 354 in their first innings after Pakistan scored 304 in theirs. Starting with a deficit of 50, the hosts reached 21/0 at the end of play on Day 2. On Day 3, Babar Azam and Co. will look to reach a competitive total against the visitors and try and register a consolation victory in the three-match series. With Shan Masood and Abdullah Shafique at the crease, the hosts will resume their second innings on Monday, December 19. Danish Kaneria, meanwhile, also spoke on Indian left-arm wrist-spinner Kuldeep Yadav. He praised Kuldeep for coming out strongly on Day 5 against Bangladesh after failing to deliver on the previous day. Kuldeep Yadav picked up two more wickets on Day 5 of the ongoing Test between India and Bangladesh at Chattogram. He ended up with three wickets in the innings and eight in the match as India registered a convincing win by 188 runs. Danish Kaneria said that the left-arm unorthodox bowler used his shoulder and back well on the final day of the Chattogram Test, unlike Day 4. Kuldeep took the prized wicket of captain Shakib Al Hasan, who put on a decent fight with 84 runs. He added: The Indian wrist-spinner also scored a crucial 40 runs to win the Player of the Match award on his Test comeback after a 22-month gap. He will next be seen in action in the second Test, starting in Dhaka on Thursday, December 22.
english
<reponame>Hrealm/sparrowApp-vue<filename>src/node/node.js<gh_stars>1-10 const http = require('http'); const url = require('url'); let server = http.createServer(); server.on('request', function (req, res) { // request请求 response返回响应 //console.log(req.url); // req.url 是获取完整路由 (包含参数) const parseObj = url.parse(req.url, true); const pathName = parseObj.pathname; res.writeHeader(200, { 'Content-Type': 'text/html;charset=utf-8', 'Access-Control-Allow-Origin': '*' }); let data = { banner: [ { id: 1, picUrl: '../static/img/1.22a4b42.jpg' }, { id: 2, picUrl: '../static/img/2.ea782e8.jpg' }, { id: 3, picUrl: '../static/img/3.65aee88.jpg' } ], indexHot: [ { id: 1, picHot: '../static/img/1.4dc0732.png' }, { id: 2, picHot: '../static/img/2.e2eab8a.png' }, { id: 3, picHot: '../static/img/3.fe55348.png' }, // { // id: 4, // picHot: '../static/img/1.4dc0732.png' // }, // { // id: 5, // picHot: '../static/img/2.e2eab8a.png' // }, // { // id: 6, // picHot: '../static/img/3.fe55348.png' // } ], indexShare: [ { id: 1, picShare: '../static/img/1.41fb8a7.jpg', location: '西藏', descContent: '一个离天堂最近的地方', picUser: '', userName: '', comment: 0, like: 0 }, { id: 2, picShare: '../static/img/2.b1bd8e2.jpg', location: '内蒙', descContent: '手抓羊排', picUser: '', userName: '', comment: 0, like: 0 }, { id: 3, picShare: '../static/img/3.9baa361.jpg', location: '青海', descContent: '天空之镜', picUser: '', userName: '', comment: 0, like: 0 } ], findTabItem: [ { id: 1, title: '推荐', tip: 'recommend' }, { id: 2, title: '热门', tip: 'findHot' }, { id: 3, title: '关注', tip: 'follow' } ], contentList: { recommend: [ { id: 1, userHead: '../static/img/head.1d7063b.jpg', userName: 'Hrealm', userShare: ['../static/img/1.ad406fc.jpg', '../static/img/2.6e58b97.jpg', '../static/img/3.95d5b79.jpg', '../static/img/4.2f656bf.jpg'], userTag: '云巅之上' }, { id: 2, userHead: '../static/img/head.fc933e2.jpg', userName: 'ECHO', userShare: ['../static/img/1.003a1b6.jpg', '../static/img/2.6a4c60e.jpg', '../static/img/3.f967c6b.jpg', '../static/img/4.c0b84d5.jpg', '/static/img/5.dd5215e.jpg'], userTag: '醉美青海' }, { id: 3, userHead: '../static/img/head.0f570cf.png', userName: 'annie', userShare: ['../static/img/1.a0f22ee.jpg', '../static/img/2.094ba01.jpg', '../static/img/3.2048e81.jpg', '../static/img/4.884e751.jpg'], userTag: '仙境翡翠湖' } ], findHot: [ { id: 1, userHead: '../static/img/head.0f570cf.png', userName: 'annie', userShare: ['../static/img/1.a0f22ee.jpg', '../static/img/2.094ba01.jpg', '../static/img/3.2048e81.jpg', '../static/img/4.884e751.jpg'], userTag: '仙境翡翠湖' } ], follow: [ { id: 1, userHead: '../static/img/head.1d7063b.jpg', userName: 'Hrealm', userShare: ['../static/img/1.ad406fc.jpg', '../static/img/2.6e58b97.jpg', '../static/img/3.95d5b79.jpg', '../static/img/4.2f656bf.jpg'], userTag: '云巅之上' } ] } } switch (pathName) { case '/banner': var route = 'banner'; reJson(route); break; case '/indexHot': var route = 'indexHot'; reJson(route); break; case '/indexShare': var route = 'indexShare'; reJson(route); break; case '/findTabItem': var route = 'findTabItem'; reJson(route); break; case '/contentList': var route = 'contentList'; reJson(route); break; // case '/recommend': // var route = 'recommend'; // reJson(route); // break; // case '/findHot': // var route = 'findHot'; // reJson(route); // break; // case '/follow': // var route = 'follow'; // reJson(route); // break; default: break; } function reJson(route) { if (parseObj.query.id) { let id = parseObj.query.id; let result = data[route].find(function (item) { return item.id == id; }) res.end(JSON.stringify(result)); } else { res.end(JSON.stringify(data[route])); } } }); server.listen(8008, function () { console.log('服务器启动成功了') });
javascript
<reponame>Gantios/Specs { "name": "PowerUpSwift", "version": "0.1.2", "summary": "Utilities to make iOS development faster and be more productive.", "description": "Apple doesn't provide some useful utilities to make our lives easier. This might be for a (good) reason. My experience in iOS Development was brutally painful. It's usually difficult to implement a simple basic feature that you can easily do in Android built-in, so you end up doing a couple more hacks. I created this library to save time, to be more productive, and to be DRY (Don't Repeat Yourself).", "homepage": "https://github.com/PowerUpX/PowerUpSwift", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { "<NAME>": "<EMAIL>" }, "source": { "git": "https://github.com/PowerUpX/PowerUpSwift.git", "tag": "0.1.2" }, "platforms": { "ios": "10.0" }, "source_files": "PowerUpSwift/Classes/**/*", "swift_version": "4.2", "frameworks": [ "UIKit", "Foundation" ] }
json
package goproject import ( "testing" ) func TestLoadConfig(t *testing.T) { _, err := Load() if err != nil { t.Errorf("%v", err) } }
go
{ "slug": "medpex", "relevant-countries": [ "de" ], "categories": [ "commerce" ], "runs": [ "medpex Versandapotheke (www.medpex.de)" ], "name": "<NAME>.", "address": "Industriestraße 111\n67063 Ludwigshafen\nDeutschland", "phone": "+49 800 6633739", "fax": "+49 1803 633739", "email": "<EMAIL>", "web": "https://www.medpex.de/", "sources": [ "https://www.medpex.de/support/help/article/view/32/8/datenschutz", "https://www.medpex.de/support/help/article/view/39/8/impressum" ], "comments": [ "Achtung: Faxnummer kostenpflichtig (9 ct/Min. dt. Festnetz, max. 42 ct/Min. dt. Mobilfunknetz)!" ], "quality": "verified" }
json
<filename>src/MaterialUI/SVGIcon/Icon/LoupeOutlined.js<gh_stars>0 exports.loupeOutlinedImpl = require('@material-ui/icons/LoupeOutlined').default;
javascript
<filename>Specs/2/8/d/WGBAutoScrollNoticeView/1.0.1/WGBAutoScrollNoticeView.podspec.json { "name": "WGBAutoScrollNoticeView", "version": "1.0.1", "summary": "WGBAutoScrollNoticeView.is a auto scroll compents used to ads or message notice show", "description": "The notice with alert msg a auto scroll compents used to ads or message notice show", "homepage": "https://github.com/WangGuibin/WGBAutoScrollNoticeView", "license": "MIT", "authors": { "WGB": "<EMAIL>" }, "platforms": { "ios": "8.0" }, "source": { "git": "https://github.com/WangGuibin/WGBAutoScrollNoticeView.git", "tag": "1.0.1" }, "source_files": [ "WGBAutoScrollNoticeView", "WGBAutoScrollNoticeView/*/WGBAutoScrollNoticeView.{h,m}" ], "exclude_files": "Classes/Exclude", "requires_arc": true, "deprecated": true }
json
Rahul (Shah Rukh Khan) is boarding the eponymous Chennai Express train along with his grandfather’s ashes — who wanted to be immersed partly in the Ganges and partly in Rameswaram. However, the 40-year-old bachelor has planned to deboard at the Kalyan Junction and join his friends on a Goa trip. While trying to deboard the train, he finds a maiden (Deepika Padukone) in distress and helps her to board the train, followed by four other men — ultimately missing the chance to get off. As it turns out, the woman is the daughter of a local mafia leader (Sathyaraj) who is running from a forced marriage — and the accompanying men are her cousins, who throw away Rahul’s cell phone and take him along. What follows next is a hilarious trail of failed attempts to escape, dramatic chases, hilarious conversations, and a refreshing bout of romance.
english
<filename>filtercolor_bk/sync.js const Addon_Id = "filtercolor_bk"; const item = GetAddonElement(Addon_Id); Sync.FilterColor_BK = { List: [], Mode: GetNum(item.getAttribute("Path")) ? "Path" : "Name" }; try { const ado = OpenAdodbFromTextFile(BuildPath(te.Data.DataFolder, "config", Addon_Id + ".tsv")); while (!ado.EOS) { const ar = ado.ReadText(adReadLine).split("\t"); if (ar[0]) { Sync.FilterColor_BK.List.push([ar[0], GetWinColor(ar[1])]); } } ado.Close(); } catch (e) { } AddEvent("ItemPrePaint2", function (Ctrl, pid, nmcd, vcd, plRes) { if (pid) { const path = pid[Sync.FilterColor_BK.Mode]; for (let i = Sync.FilterColor_BK.List.length; i--;) { if (PathMatchEx(path, Sync.FilterColor_BK.List[i][0])) { vcd.clrTextBk = Sync.FilterColor_BK.List[i][1]; return S_OK; } } } });
javascript
package com.tui.architecture.eventdriven.stresstest.controller; import com.tui.architecture.eventdriven.stresstest.core.service.CleanService; import com.tui.architecture.eventdriven.stresstest.core.service.ComparatorService; import com.tui.architecture.eventdriven.stresstest.core.service.CreationService; import com.tui.architecture.eventdriven.stresstest.core.service.DeleteService; import com.tui.architecture.eventdriven.stresstest.core.service.UpdateService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; import java.util.concurrent.TimeUnit; /* * Stress test controller * * @author joseluis.nogueira on 11/10/2019 */ @Log4j2 @RestController @RequestMapping(value = "/stress-test") @Api( value = "Stress test", tags = {"Stress test"} ) public class MainController { @Autowired private CreationService creationService; @Autowired private UpdateService updateService; @Autowired private DeleteService deleteService; @Autowired private ComparatorService comparatorService; @Autowired private CleanService cleanService; @PostMapping(path = "/create/owners/{elements}", produces = MediaType.TEXT_PLAIN_VALUE) public ResponseEntity<String> createOwners( @ApiParam(value = "elements", required = true) @PathVariable(value = "elements") int elements) { if (elements <= 0) { return ResponseEntity.status(HttpStatus.BAD_REQUEST).build(); } long t = System.currentTimeMillis(); creationService.createOwners(elements); return ResponseEntity.ok("Create " + elements + " owners in " + printTime(System.currentTimeMillis() - t)); } @PostMapping(path = "/update/owners/{elements}/{parallel}", produces = MediaType.TEXT_PLAIN_VALUE) public ResponseEntity<String> updateOwners( @ApiParam(value = "elements", required = true) @PathVariable(value = "elements") int elements, @ApiParam(value = "parallel", required = false) @PathVariable(value = "parallel") boolean parallel) { if (elements <= 0) { return ResponseEntity.status(HttpStatus.BAD_REQUEST).build(); } long t = System.currentTimeMillis(); updateService.updateOwners(elements, parallel); return ResponseEntity.ok("Updated " + elements + " owners in " + printTime(System.currentTimeMillis() - t)); } @PostMapping(path = "/delete/owners/{elements}", produces = MediaType.TEXT_PLAIN_VALUE) public ResponseEntity<String> deleteOwners( @ApiParam(value = "elements", required = true) @PathVariable(value = "elements") int elements) { if (elements <= 0) { return ResponseEntity.status(HttpStatus.BAD_REQUEST).build(); } long t = System.currentTimeMillis(); int deleted = deleteService.deleteOwners(elements); return ResponseEntity.ok("Deleted " + deleted + " owners in " + printTime(System.currentTimeMillis() - t)); } @PostMapping(path = "/create/cars/{elements}", produces = MediaType.TEXT_PLAIN_VALUE) public ResponseEntity<String> createCars( @ApiParam(value = "elements", required = true) @PathVariable(value = "elements") int elements) { if (elements <= 0) { return ResponseEntity.status(HttpStatus.BAD_REQUEST).build(); } long t = System.currentTimeMillis(); creationService.createCars(elements); return ResponseEntity.ok("Create " + elements + " cars in " + printTime(System.currentTimeMillis() - t)); } @PostMapping(path = "/update/cars/{elements}/{parallel}", produces = MediaType.TEXT_PLAIN_VALUE) public ResponseEntity<String> updateCars( @ApiParam(value = "elements", required = true) @PathVariable(value = "elements") int elements, @ApiParam(value = "parallel", required = false) @PathVariable(value = "parallel") boolean parallel) { if (elements <= 0) { return ResponseEntity.status(HttpStatus.BAD_REQUEST).build(); } long t = System.currentTimeMillis(); updateService.updateCars(elements, parallel); return ResponseEntity.ok("Updated " + elements + " cars in " + printTime(System.currentTimeMillis() - t)); } @PostMapping(path = "/delete/cars/{elements}", produces = MediaType.TEXT_PLAIN_VALUE) public ResponseEntity<String> deleteCars( @ApiParam(value = "elements", required = true) @PathVariable(value = "elements") int elements) { if (elements <= 0) { return ResponseEntity.status(HttpStatus.BAD_REQUEST).build(); } long t = System.currentTimeMillis(); int deleted = deleteService.deleteCars(elements); return ResponseEntity.ok("Deleted " + deleted + " cars in " + printTime(System.currentTimeMillis() - t)); } @PostMapping(path = "/comparator", produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<List<String>> comparator() { return ResponseEntity.ok(comparatorService.run()); } @PostMapping(path = "/clean", produces = MediaType.TEXT_PLAIN_VALUE) public ResponseEntity<Void> clean() { cleanService.run(); return ResponseEntity.ok().build(); } private String printTime(long millis) { return String.format("%d min, %d sec", TimeUnit.MILLISECONDS.toMinutes(millis), TimeUnit.MILLISECONDS.toSeconds(millis) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millis))); } }
java
The threat of input supply disruption from China is becoming very real for pharmaceutical, electronics and automobile industries due to the coronavirus-induced shutdown of factories in that country, Commerce and Industry Minister Piyush Goyal has said. He is likely to meet industry representatives and export bodies on Thursday to discuss the economic impact of the rapidly spreading virus. The meeting was earlier scheduled last week but was deferred. “The Minister will discuss both the concerns of the sectors hit by falling imports of essential inputs from China as well as opportunities for exporters,” a person familiar with the matter told BusinessLine. In a written reply to the Lok Sabha on Wednesday, the Minister said: “Indian Missions abroad have also been asked to explore the possibility of sourcing raw material for our production, in their respective countries.” The Minister’s response comes after several industries raised the red-flag over the deteriorating situation. Auto industry body SIAM said many automakers import about 10 per cent of their raw materials from China. “The disruption in availability of these parts is likely to critically hamper production across all segments, namely passenger vehicles, commercial vehicles, three-wheelers, and two-wheelers and will gravely affect electric vehicles,” said a statement issued by SIAM on Wednesday. Another major industry that relies on Chinese raw material supplies is pharmaceuticals. A committee has been formed by the Department of Pharmaceuticals to regularly review the availability of stock of Active Pharmaceutical Ingredients/Key Starting Materials and API-based medicines, and to suggest measures for their management. With businesses of most of its key clients — airlines, retail, and oil and gas sectors — impacted by the coronavirus outbreak, growth for India’s IT services sector will be a big challenge the coming fiscal year, predicted former Infosys Chief Financial Officer V Balakrishnan. Talking to the media, he said that the situation looked similar to 2008 (global economic and financial meltdown). “But the issues are different as we don’t know how long this is going to continue.” “The Minister,” said the source, “has especially mentioned that the sectors hurt by the coronavirus should be present at the meeting so that there is a better idea of the extent to which they are getting impacted.” Simultaneously, the Commerce Ministry has been identifying items where Indian manufacturers can increase their production to step up exports for filling the supply gaps left by Chinese exporters. According to a preliminary study, there are more than 500 products where Indian exporters can plug global supply gaps. China is India’s top source. In 2018-19, imports from that country totalled $70.39 billion. China is India’s No 3 export destination with outbound shipments valued at $16.5 billion in FY19. The number of people infected with the coronavirus in about 100 countries has crossed 115,000, with the death toll reaching more than 4,200. In India, the number of infected is now estimated at 60. Entrepreneurs involved in textile manufacturing can make use of the ₹ 2.5 crore subsidy offered by the State government for starting small textile clusters/parks, said Sivaganga Collector J. Jeyakanthan. A consultative meeting was organised with textile entrepreneurs and investors here on Wednesday. The Collector said that the textile industry was an important sector because of its ability to generate a large number of jobs. He also highlighted that Chief Minister Edappadi K. Palaniswami had made an announcement under Rule 110 in the Tamil Nadu Legislative Assembly regarding the subsidy of ₹ 2.5 crore for starting textile parks and added that an organisation with a minimum of three members would be eligible for the scheme. They must also possess two acres of land for the purpose. He said that this initiative of the State government was to promote the growth of textile industry and modernising it. The objective was to enhance production and also focus on yield. As a result, the workforce can also be trained to the state-of-the-art technologies available, which would facilitate survival in the sector. The Collector added that the creation of such small textile parks in different regions will help in creation of employment, thus boosting the economy overall. Migration of labourers can be prevented. Also, the workforce would not be concentrated in one city or town, but spread across the length and breadth of the State, Mr. Jayakanthan said. He appealed to the entrepreneurs to make use of the government’s initiative and help in the creation of jobs for generations. Some of the participants welcomed the objective and hoped to take it up in the ensuing fiscal year. A Parliamentary Panel on India’s Ministry of Commerce and Industry calls for avoiding over-dependence on the United States and European Union to promote trade and exports. Observing the decline in India’s export due to global economic slowdown, increasing protectionism, heightened trade tensions between US and China, US sanctions against Iran, the Committee urged the ministry to make vigorous efforts for market expansion and establish trade synergies with new emerging trade destinations in Africa, Latin America and West Asia region to reduce overdependence on developed countries especially US and EU for exports and to minimize uncertainties in our exports due to adverse global event/scenario. It recommended the Government to be vigilant in checking fluctuations in the exchange rate of rupee and unfair trade practices adopted by the trading partners. The recommendations were made by the 31 Member Department-related Parliamentary Standing Committee on Commerce headed by Rajya Sabha Member, V. Vijayasai Reddy, which presented its 152nd and 153rd Reports on Demands for Grants of the Department of Commerce and the Department for Promotion of Industry and Internal Trade, Ministry of Commerce and Industry to Parliament today. Taking note of an allocation of Rs.6219.32 crore in BE 2020-21 against the Department’s projected demand of Rs.9238.51 crore, the Committee felt that reduction of allocation to the tune of Rs.3019.19 crore will adversely impact the promotion of trade, augmentation of export and revival of a subdued trend in export. It recommended enhancing budgetary allocation for optimal implementation of policies and schemes in the ensuing year while ensuring maximum utilization of funds at the disposal of the Department.Land acquisition reforms to make India an attractive global destination for MNEs facilitating its participation in GVCs. Committee says inadequate allocation of funds for Department of Commerce and Department for Promotion of Industry and Internal Trade will hit recovery goals. 2. Parliamentary Panel in its Report has stressed the need for a calibrated approach, concerted efforts, diversification of India’s export basket, removal of supply chain bottlenecks and simplification of export procedures, among others, to achieve the goal of making India a significant global player in goods and services trade with USD 1 trillion export volume by 2024-25. 3. The Committee in its Report noted that in 2019, India was the 19th largest exporter in the world in merchandise trade with a share of 1.7 per cent and 10th largest importer with a share of 2.6 per cent. India’s exports have surpassed half trillion mark (USD 538.08 billion) in 2018-19 for the first time. The Committee, however, expressed its concern on the contraction of exports in 2019-20 and noted volatility in export growth in key sectors such as engineering goods, petroleum products, gems and jewellery, cotton yarn/fabrics, leather, etc. It recommended undertaking detailed analysis of performance and close monitoring of existing schemes and policies aimed at boosting exports. 4. Taking note of an allocation of Rs.6219.32 crore in BE 2020-21 against the Department’s projected demand of Rs.9238.51 crore, the Committee felt that reduction of allocation to the tune of Rs.3019.19 crore will adversely impact promotion of trade, augmentation of export and revival of subdued trend in export. It recommended to enhance budgetary allocation for optimal implementation of policies and schemes in ensuing year, while ensuring maximum utilization of funds at the disposal of the Department. 5. Observing decline in India’s export due to global economic slowdown, increasing protectionism, heightened trade tensions between US and China, US sanctions against Iran, etc., the Committee urged the Department to make vigorous efforts for market expansion and establish trade synergies with new emerging trade destinations in Africa, Latin America and West Asia region to reduce overdependence on developed countries especially US and EU for exports and to minimize uncertainties in our exports due to adverse global event/scenario. It recommended the Government to be vigilant in checking fluctuations in exchange rate of rupee and unfair trade practices adopted by the trading partners. 6. The Committee appreciated the strategic initiatives taken by the Government to deal with unfair trade practices against India, to safeguard the Indian domestic industries against dumping of cheap and subsidized goods and setting up a monitoring committee to address key issues related to Free Trade Agreements (FTAs), etc. The Committee recommended to strengthen the Directorate General of Trade Remedies (DGTR) for conducting quality investigations into unfair trade practices within reasonable time frame. 7. Expressing concern on discriminating measures such as delisting India from ‘Developing Beneficiary Country’ under the ‘Generalised System of Preferences (GSP)’, inclusion of India in ‘Priority Watch List’ by United States Trade Representative (USTR) and increase in disputes against India in the WTO, the Committee urged the Department to undertake a comprehensive study/analysis of trade remedial measures and constitute a research wing under DGTR for detailed examination and assessment of such issues and for apprising traders/exporters of the adverse consequences. 8. Referring to the Economic Survey 2019-20, the Committee noted that specialization of labour intensive sectors and identification of group of industries in network products for including them in Global Value Chains (GVCs) would tremendously boost India’s trade competitiveness and export performance. While appreciating measures undertaken by the Government for facilitating ease of doing business, the Committee felt that India’s integration in GVCs calls for sustainable trade growth, strengthening of export infrastructure, effective implementation of GST, timely refunds of duties and taxes to the exporters, reforms in land acquisition and making India an attractive global destination for investment by Multinational Enterprises (MNEs), etc. The Committee recommended the Government to formulate a Global Value Chain Integration Policy to facilitate Indian industries participation in GVCs. 9. Pointing out that proper assessment of the Merchandise Exports from India Scheme (MEIS) vis-à-vis the WTO norms since its implementation from 2015 has not been made by the Government, the Committee felt that merely discontinuing the MEI Scheme before putting in place any suitable substitutive mechanism will impact the sectors which at present are under the garb of inverted duty structure. The Committee recommended to make a careful evaluation and analysis of new scheme viz. Remission of Duties or Taxes on Export Products (RoDTEP) Scheme before its implementation for its compliance with global trade norms. 10. Taking note of the significant role of MSME sector in country’s economy accounting for nearly 48 per cent share in India’s total exports and about 29 per cent contribution in GDP, the Committee stressed the need to address issues concerning MSME sector and apprised MSME exports about the benefits of various schemes and subsidies and encourage their participation in the GVCs. The Committee recommended to devise a customized export scheme encompassing financial, technological and policy aspects for holistic promotion of MSME sector, which would provide much needed fillip to the overall exports of the country. 11. Appreciating the Government to come out with a new Agriculture Export Policy aimed to double farmers’ income by 2022 and boost agricultural exports by integrating farmers and agricultural products with the GVCs, the Committee recommends the Department to ensure active participation of the State Governments in effective implementation of the policy in agriculture clusters for promoting exports in the year ahead. 12. The Committee noted that the Scheme of Price Stabilisation Fund aimed at providing financial relief to small growers of tea, coffee, rubber, tobacco, etc. has discontinued since 2013 and in its place a new Scheme of Revenue Insurance Scheme for Plantation Crops (RISPC) has not been implemented. The Committee has recommended to launch a new crop insurance scheme at the earliest to provide security to the plantation growers in terms of price stabilization and crop protection and thus contributing to the welfare of farmers in the plantation sector. 13. The Report has also expressed its deep concern on the substantial reduction of the budgetary allocation made to Agencies/Commodity Boards viz. Agricultural and Processed Food Products Export Development Authority (APEDA), Marine Products Export Development Authority (MPEDA), Tea Board, Coffee Board, Rubber Board and Spices Board from the proposed outlay under the Medium Term Expenditure Framework. The curtailing of funds will, thus, impact the functioning of the schemes and programmes of the Agencies and Boards and the shortfall may lead to upsurge in liabilities in the coming years. It, therefore, recommended the Department to engage with Ministry of Finance for additional allocation at the supplementary grants stage for their optimal functioning. 14. While appreciating the initiatives of the Government in according high priority to promote trade and exports from the North Eastern Region, the Committee felt that the allocation of funds provided under various schemes for boosting trade from the region is considerably low. The Committee laid emphasis on raising budget to give effect to various activities such as production, processing, marketing, infrastructure, packaging, international meets and seminars to promote exports from this region. Taking cognizance of trade facilitation measures being taken by the Department for boosting trade and commerce in the North-East Region, the Committee stressed the need for devising a comprehensive trade promotion programme for the entire region of North East. 15. As regards 153rd Report relating to the Department for Promotion of Industry and Internal Trade, the Committee took note of the declining sectoral growth rate of Index of Industrial Production (IIP) comprising three sectors, namely, mining, manufacturing and electricity with mining registering a negative growth rate during April-October 2019-20 and the declining growth rate of Gross Value Added (GVA) in industry at constant prices with manufacturing sector registering a negative growth rate during second Quarter (2019-20). While appreciating the measures taken by the Department to boost industrial production, the Committee recommended the Government to make concerted efforts to revive the industrial sector with focus on mining, manufacturing and electricity sectors given their importance in the economy and address declining capacity utilisation of manufacturing sector considering its impact on investment and job creation. 16. The Committee appreciated the Department for devising new Industrial Policy, which is currently under consideration, having the objective to improve the share of manufacturing sector to more than 20 per cent by focusing on 10-12 industry sectors for boosting competitiveness, generating jobs and growth in manufacturing and exports. The Committee has recommended to finalise the policy at the earliest in tune with changing global scenario. 17. The Committee took note of the positive trend in the FDI inflows since the launch of Make in India flagship programme in 2014. In the last 51⁄2 years (April 2014-September 2019) India received FDI inflows worth USD 319 billion which is 50 per cent of the total FDI inflow (USD 642 billion) in the last over 19 years since April 2000. The Committee while appreciating the measures taken by the Department for making the process of FDI simpler and investor friendly, has, however, expressed its concern on the declining FDI inflow in manufacturing sector and also disparity in FDI inflows among the States and recommended to address these issues to make India an attractive destination for investment. 18. Regarding the budgetary allocation to the Department, the Committee noted that an allocation of Rs.6605.55 crore in BE 2020-21 has been made against the Department’s projected demand of Rs.16767.40 crore and expressed its concern on the shortfall in allocation at a time when the industrial sector is in doldrums. It stressed the need for adequate allocation for implementing optimally the major schemes such as National Industrial Corridor Development and Implementation Trust, Refund of Central and Integrated GST to Industrial Units in North Eastern Region and Himalayan States, Transport/Freight Subsidy Scheme, etc. 19. Regarding the intellectual property rights, the Committee appreciated the steps taken by the Department for reducing the time to examine and dispose of the patent applications from average 72 months in 2014-15 to about 24-36 months at present. The Committee stressed the need to further reduce the time for examination and disposal of patents to match the international standard, create awareness among various stakeholders and fill the sanctioned posts of Patent Examiners and Controllers at the earliest. While taking note of the World Intellectual Property Organisation (WIPO) Report 2019 which ranks India at 13th place in Patent Cooperation Treaty (PCT) filing of patent applications, the Committee stressed the need to strengthen intellectual property ecosystem to keep pace with research and innovation and to compete with developed countries. 20. Taking note of the World Bank’s Doing Business Report, 2020 which ranks India at 63rd amongst 190 countries, improving its rank by 14 from 77 in the 2019 Report, the Committee appreciated the sustained measures taken by the Department for improving India’s ranking in ease of doing business. It stressed on the need for further improvement to foster a vibrant business environment thereby promoting entrepreneurship, innovation and wealth creation and to make India an attractive destination for business and investment. 21. Regarding Startup India, a Government’s flagship initiative aimed at building a strong ecosystem for nurturing innovation and start-ups to drive sustainable economic growth and to generate large scale employment opportunities, the Committee recommended the Government to fast track the finalisation of Startup Vision 2024 which aims to facilitate establishment of 50,000 new start-ups by 2024 creating 20 lakh jobs. Further, it recommended to increase registration of Startups in GeM portal, facilitate establishment of start-ups in those States with dismal record, address the issue of insignificant drawing of funds from the Fund of Funds Scheme for Startups, to operationalise Credit Guarantee Scheme for Startups to ease the availability of credit to start-ups, etc. Expressing concern over the delay in payment by the PSUs and the Government Departments to the Startups, the Committee recommended to increase procurement by PSUs and Government Departments from Startups and payment of dues within a stipulated time period to maintain constant cash flow to the Startups. 22. Regarding five industrial corridors viz. Delhi-Mumbai, Chennai-Bengaluru, Amritsar-Kolkata, Vizag-Chennai and Bengaluru-Mumbai Industrial Corridors, the Committee expressed its displeasure at their slow pace of their development and urged the Department to expedite their construction to provide much needed thrust to the Indian industry. 23. Regarding the industrial development of backward and remote areas, the Committee took note of the various schemes, viz. Transport/Freight Subsidy Scheme, package for special category States for J&K (now UTs of J&K and Ladakh), Himachal Pradesh and Uttarakhand, refund of Central and Integrated GST to industrial units in North Eastern Region and Himalayan States, North East Industrial Development Scheme, etc. and expressed displeasure at slow pace of utilisation of funds and urged timely disbursal of incentives, subsidy and tax refunds to industrial units and adequate allocation of funds under the schemes in the ensuing financial year. Once again, crude oil prices seem to favour the Modi government, which has been facing much flak for the country’s economic situation. But is the government prepared to turn the steep fall in oil prices to its advantage or will it become a case of another missed opportunity?“ The oil price crash comes at an inopportune time for the energy-hungry and import-dependent Asian economies,” said Vandana Hari, founder and CEO of Vanda Insights. “It may provide marginal relief, but it is no match for the debilitating economic impact of the coronavirus. It could, thus, end up being a lost opportunity as it is unlikely to spur consumption.” Economic uncertainty is a huge dampener on spending, she said, adding: “Had India been ready with its strategic storage infrastructure, it could have filled it up with cheap oil. Overall, the cheap oil this time also comes with huge uncertainty — the OPEC+ alliance could get back on track. So, it is going to be hard for countries to plan their spending based on today’s prices.”Indian Strategic Petroleum Reserves Ltd is responsible for building buffers. Currently, it has 5.33 million tonnes of underground strategic reserve facility in Visakhapatnam, Mangaluru and Padur (Karnataka), while another 6.5 mt facility is coming up at Padur and Chandikhole (Odisha). Work on two more facilities — at Bikaner in Rajasthan and Rajkot in Gujarat — will be initiated soon. But does the price offer any comfort? Energy expert Narendra Taneja says, “Neither ultra-low nor ultra-high prices are good for India. Prices that encourage growth in both the exporting Gulf countries and India are good for us; after all, nearly 10 million Indians work in the GCC countries, who send over $40 billion in remittances.” The price which should keep everyone happy is $60 a barrel, he said, adding: “Ultra-low prices may help India in the short run but can hurt in the medium to long run.” But for the main Opposition party, the Congress, the low crude prices offer a new ammunition against the government. The party has urged the government to pass on the benefits of the low crude prices to the common man, by reducing the retail rates of petrol, diesel and cooking gas. “The Modi-Shah government must pass on the relief of record low crude oil price to the people of India against the stagflation (rising inflation combined with economic slowdown) and rising unemployment by lowering petrol/diesel/LPG rates in consonance with the huge fall in international crude oil prices,” it said in a statement. “In dollar terms, the international crude oil prices are down to the level of 2004 November, when petrol, diesel and LPG were available at ₹37.84, ₹26.28 a litre, and ₹281.60 per cylinder, respectively... For the last six years, the government and oil marketing companies have been making huge windfall gains amounting to lakhs of crores per year. The BJP government has looted more than ₹16-lakh crore in the last five years by charging exorbitant taxes on petrol-diesel,” charged the party statement. It said: “The central excise duty has been hiked more than a dozen times since the BJP came to power. It has been increased by 218 per cent on petrol and 458 per cent on diesel by the Modi government since May 2014.”. The consumer would certainly want the duties — which account for the major portion of retail price — reduced and pump prices lowered. But the government would prefer to raise them to maximise revenues. Now, all eyes are on the government if it will tweak the excise duty and other levies on fuel. India is exploring workable components of a possible free trade agreement with Australia, following the visit of Australian Trade Minister Simon Birmingham to New Delhi last month, when he discussed the advantages of forging such a pact with his Indian counterpart Piyush Goyal. “Australia already knows about many of our red lines which include dairy and certain agricultural products and seems ready to accept them. That makes it easier for us to negotiate an FTA,” an official said. The formal decision to launch negotiations for an FTA — officially known as Comprehensive Economic Cooperation Agreement (CECA) — between India and Australia will be taken after both sides go through what each is ready to offer the other, in a series of video-conference meetings. “India and Australia both are working on what they can offer each other. Once it is discussed, a decision can be taken on whether negotiations should begin on a CECA,” the official said. In his meeting with Goyal, the Australian Trade Minister said while his country wanted India to re-enter the Regional Comprehensive Economic Partnership (RCEP) negotiations, it was willing to look at India’s proposal of a bilateral pact. India had exited the RCEP, the 16-member proposed bloc, including the ten-member ASEAN, China, Australia, New Zealand, India, Japan and South Korea, in November 2019 as it was not comfortable with the high levels of market access being sought by other members and inadequate protection against cheap imports from China due to less stringent Rules of Origin norms. “Both India and Australia are willing to see if the work we have done bilaterally in relation to RCEP could be captured between the two countries. We have asked our officials to look at that,” Birmingham had said in a select media briefing following his meeting with Goyal. Trade between India and Australia trade has grown steeply over the last decade but is heavily skewed in Australia’s favour. In 2018-19, India’s imports from the island-nation were valued at $13.3 billion, while Australia’s imports from India accounted for only at $3.52 billion, resulting in a trade deficit of almost $10 billion. However, as Birmingham pointed out, the imbalance is mostly due to high imports of coal by India from the country. India and Australia had started negotiating a bilateral CECA in May 2011, but the talks got suspended in 2015 because of disagreement over issues such as the market access in agriculture and dairy products demanded by Australia. “If Australia adopts a flexible approach in dairy and agriculture and is willing to accommodate some of our interests in the services sector including easier visa rules for workers, a free trade pact can certainly be worked out,” the official said. Note: The above prices are Chinese Price (1 CNY = 0.14374 USD dtd. 12/03/2020). The prices given above are as quoted from Global Textiles.com. SRTEPC is not responsible for the correctness of the same. President of Pakistan Businessmen and Intellectuals Forum (PBIF), Mian Zahid Hussain, has said that the issues confronting the textile sector should be resolved so that it can play an effective role in national development. Speaking at a meeting of FPCCI Standing Committee for Textile, Dying and Processing, through a video link in which business leaders from Karachi, Lahore and other cities participated, he called upon the government to start working immediately so that the next cotton crop could be saved from collapse. He said that increased taxes, costly energy, the demand for bank guarantees by gas utilities and delayed refunds had increased the cost of doing business. He said that the importance of textile sector had increased manifold in the current global economic scenario which must be realized. He said that textile exports could fetch extra billions of dollars for the country. Mian Zahid Hussain said that apart from all other things, the coronavirus had also reduced price of cotton which would provide relief to our textile sector. He said that President of FPCCI Anjum Nisar had been busy in serving the business community and forwarding research-based proposals to the government which would go a long way in resolving the issues of industrialists and traders. Chairman of the committee, Irfan Saeed, said that the textile processing industry was in tatters which should be bailed out. Taxes, energy and exchange rate erosion had taken a toll on this important sector while the cost of raw material had been increased by 30 to 35 percent. This sector was finding it difficult to fulfill commitments of dying and printing, therefore, duties on the import of raw materials should be reduced, he demanded. Deputy Convener of the committee Tahir Mahboob said that extension in GSP Plus for two years was a welcome development. BANGKOK - Thailand should be downgraded by the US State Department in its annual report on human trafficking because of its lack of progress in protecting garment and fishing workers, according to a coalition of human rights groups. The South-East Asian country had failed to provide sufficient evidence of increased efforts to combat human trafficking, said the Thai Seafood Working Group (SWG), a coalition of almost 60 labour, human rights and green groups. Last year, Thailand was ranked as a Tier 2 country - above the lowest ranking of Tier 3 - in the US State Department's Trafficking in Persons (TIP) report which noted significant efforts to combat trafficking. The Economic Coordination Committee (ECC) of the Cabinet on Wednesday approved a special relief package to further continue the provision of subsidized electricity at 7.5 US cents per KWH till end June 2020 to five export-oriented sectors, namely textile, carpets, leather, sports and surgical goods. The Finance Division (FD) issued two statements at the conclusion of the ECC meeting, which was chaired by Adviser to the Prime Minister on Finance and Revenue Dr Abdul Hafeez Shaikh here on Wednesday. Soon after the meeting, the FD issued an official statement, saying that the ECC approved a proposal by the Power Division for a special relief package of Rs 20 billion to further continue provision of subsidized electricity until June 2020 to five export-oriented sectors. However, later a revised statement was issued where the amount of Rs 20 billion was not mentioned and stated as, “ECC approved a proposal by Power Division for a special relief package to further continue provision of subsidized electricity until June 2020 to five export-oriented sectors".According to the Power Division summary submitted to the ECC of the Cabinet, Finance Division will budget Rs 28 billion as subsidy for fiscal year 2019-2020 to be paid to the Power Division in the first week of July 2020 out of the budget of fiscal year 2020-2021. According to the summary of the Ministry of Energy (Power Division), which was submitted to the ECC of the Cabinet, the five export sectors would be provided electricity at an all-inclusive rate of 7.5 US cent per unit (Kwh) from January 1, 2019 to June 30, 2020 plus applicable taxes. Electricity bills issued from January 2019 till date, which included surcharges, quarterly adjustments, and fuel price adjustments, financial cost surcharge (FC) and Neelum-Jhelum Surcharge (NJ), will be adjusted to a fixed tariff of US cents 7.5 per unit (kWh). Taxes of the period will be paid by the consumers in addition. The summary, which was submitted to the ECC, maintained that in order to promote five export sectors, namely textile, carpets, leather, sports and surgical goods, the ECC of the Cabinet on October 24, 2018 decided to provide electricity at US cents 7.5/Kwh to these export-oriented sectors from January 1, 2019. Pursuant to that electricity tariff was reduced to US cents 7.5/ Kwh vide SRO 12(1)2019 dated January 1, 2019 issued by Ministry of Energy (Power Division). Later on, it was also clarified that to all the XWDISCO's that Financial Cost Surcharge (FC), Neelum-Jhelum surcharge (NJ), taxes and positive fuel adjustments will be part of billing, and would be part of subsidy claims to be picked up by the government, subject to confirmation by the Finance Division. However, Finance Division conveyed that the fiscal implications of financial cost surcharge, Neelum-Jhelum surcharge, taxes and fuel adjustment are estimated at Rs 4-5 billion annually. No budgetary allocation for this purpose was provided in fiscal year 2018-2019 and fiscal year 2019-2020. Being a pass through item, it should be billed to the industrial consumers. Alternately, the ECC of the cabinet may like to consider exemption of the same. While processing five export-sector subsidy claims, the ECC of the Cabinet's directions were silent on quarterly adjustment, distribution margin, US $ to Pk rupees conversion rates, etc. The Minister for Finance at that time indicated that the understanding given to five sectors was indeed a fixed tariff of US cents 7.5/Kwh; however nothing was provided for as additional subsidy in the budget. Subsequently, the matter was deliberated in the ECC of the Cabinet meeting held on October 2, 2019, and accorded approval for imposition of quarterly adjustments and annual indexations on five export sectors. Resultantly, the quarterly adjustments and other allied expenses were applied and charged over and above the notified tariff for five export sectors consumers, i.e., at US cents 7.51 per Kwh. When the five export sectors appealed the same in the court, the committee constituted by the ECC of the Cabinet to review the matter, held its 3rd meeting on 23.10.2019 under the chairmanship of Minister for Economic Affairs in office of Advisor to the Prime Minister on Commerce, Textile, Industries and Production and Investment. The ECC of the Cabinet meeting dated 27.11.2019 approved the committee's recommendations, wherein the committee inter alia recommended to continue power tariff of US cents 7.5 till June 2020, and quarterly adjustment charges and fuel adjustment charges also be added to the tariff. The Finance Division raised objections and asked to seek clarification from the ECC of the cabinet as there are no directions whether the tariff differential would be cross-subsidized or paid by the GoP as subsidy, which is estimated to be around Rs 23 billion/annum. Further, clear direction from the ECC would also be required on the taxes and surcharges as whether the same are to be exempted from recovery or otherwise. This may have financial implications of Rs 4-5 billion annually. Subsequently, the ECC of the cabinet dated 2.10.2019 directed the Power Division to submit the case in light of the report of the Advisor to the Prime Minister on Commerce, Textile, Industry and Production and Investment on the outcome of meeting with the APTMA as directed by the prime minister during the meeting of the cabinet on 1.10.2019. In order to implement the ECC of the Cabinet decisions, a high-level meeting was held on 26.2.2020 in meeting Minister for Energy (Power Division) Omar Ayub Khan, Minister for Economic Afairs Hammad Azhar, Special Assistant to Prime Minister on Petroleum, Nadeem Babar, Advisor to the PM on Industries, and Commerce Abdul Razak Dawood and Punjab Governor Chaudhry Mohammad Sarwar held deliberations with the APTMA and other industrialists on their issues related to special relief for five exports sectors. In the meeting following decision were taken: (a) The five exports sectors would be provided electricity at an all-inclusive rate of US cents of 7.5 per unit (Kwh) from January 1, 2019 to June 30, 2020 other than taxes, (b) electricity bills issued from January 2019 till date would be adjusted on rate charged above US cent of 7.5 per unit (Kwh) from January 1, 2019, which had included surcharges, quarterly adjustment and fuel price adjustment other than taxes, (c) Finance Division will budget Rs 28 billion as an additional subsidy to the Power Division in the next fiscal year 2020-2021. Despite a financial crunch faced by the power sector, Ministry of Energy (Power Division) supports the government's initiative to boost exports and provide relief to five export sectors. However, in this regard following submissions are required to be deliberated: a. The total volume of subsidy package from January 2019 to June 2020 would be around Rs 28 billion as per following breakdown: Adjustment from January 2019 to June 2019 on account of the FPA, the Neelum-Jhelum surcharge, O&M cost, fixed charges etc – Rs 5 billion, tariff from July 2019 to June 2020 on account of quarterly adjustment plus tariff differential subsidy plus FPA, fixed charges etc – Rs 23 billion per year. b. This relief package would yield an increase on circular debt by an amount of Rs 28 billion by the end of June 2020 subject to actual on the current set targets. However, given the cautioned litigation and position of the five export sectors, the commitment to them was a fixed all-inclusive US cents of 7.5 per unit (Kwh) plus taxes, the following recommendations are submitted for consideration of the ECC of the Cabinet. a. The five export sectors would be provided electricity at an all-inclusive rate of US cent of 7.5 per unit (Kwh) from 01.01.2019 to 30.06.2020 plus applicable taxes. b. Electricity bills issued from January 2019 till date, which included surcharges, quarterly adjustments, fuel price adjustments, FCC, and NJS will be adjusted to a fixed tariff of US cents of 7.5 per unit (kWh). Taxes of the period will be paid by the consumers in addition; c. Finance Division will budget Rs 28 billion as subsidy for fiscal year 2019-2020 to be paid to the Power Division in the first week of July 2020 out of the budget of fiscal year 2020-21; d. For continuation of relief package in the next fiscal year 2020-2021, additional subsidy will be capped at Rs 20 billion, making a total of Rs 48 billion in the budget of fiscal year 2020-2021 for both gas and power sectors. In view of urgency, the matter is being submitted to the ECC of the Cabinet. The Finance Division may offer its views and comments during the ECC of the Cabinet meeting. Approval of the ECC of the Cabinet is solicited for the recommendations made above. The ECC also approved a proposal by the Ministry of Energy (Power Division) for two amendments aimed at providing ease of doing business to upstream petroleum sector. The amendments are related to extension of exploration licences beyond two years by the ECC rather than the Minister in-Charge of Petroleum Division and creation of a new Zone-1 (F) for onshore licensing regime and consequent revision in the Zonal Map. The ECC has discussed proposal to increase wheat support price to Rs 1,400 per 40kg and will convene a special session on Thursday (today) afternoon to discuss a detailed plan to keep the wheat flour prices at the lowest possible level throughout the year in view of any increase in support price and incidental charges for supply of the PASSCO procured wheat to provinces and allied issues related to procurement of wheat by provinces and the private sector. The ECC also okayed the National Telecommunication Corporation's revised budget estimates for 2018-2019 and 2019-2020. The ECC also gave an approval, in principal, to a proposal for SAR 22.5 million equity investments abroad by Eastern Products (Pvt) Ltd. Pakistan. Italy’s sweeping nationwide restrictions that have put the entire country under lockdown in a desperate attempt to contain the coronavirus outbreak have brought to a standstill the world’s eighth-largest economy’s trade with other countries, including Turkey. The spreading illness has dealt a serious blow to the country’s economy – the third-largest of the 19 countries using the euro – as authorities said 631 people have died of COVID-19, with an increase of 168 fatalities recorded Tuesday. Infections in the country have topped 10,000 – more than anywhere but China. The health crisis is said to have brought to a halt Turkey’s trade with Italy, which is its third-largest export and fifth-largest import market. Flights have already been halted and Rome announcing Monday it was putting the entire country under lockdown has left in a lurch business trading with the country. There were over 119,000 cases of coronavirus globally and nearly 4,300 deaths linked to the virus as of early Wednesday. Among the countries with cases, Italy is the one Turkish business are having most difficulties with, said Istanbul Leather and Leather Products Exporters Association (İDMİB) Chairman Mustafa Şenocak. “Orders in Italy were cut like a knife. Previously given orders are also pending,” Şenocak told Turkish daily Dünya Wednesday. “Leather-related fairs were held in Italy, which we attended and received orders. Now, the companies that placed these orders say that they do not want them because they cannot open their stores,” he added. Turkey’s bilateral trade with Italy amounted to nearly $19.7 billion in 2018, before it dropped to $17.9 billion last year. Exports in January of this year were up 9.2% year-on-year to $887 million, while imports reached $623 million. Automotive goods, staple and subindustry goods, textile, steel and byproducts spearhead exports to Italy, while machinery, electronic devices, means of transport, metals and chemical goods lead in imports. There are some 1,500 companies with Italian capital operating in Turkey. The country is said to have made around a $3.7 billion investment in Turkey between 2002 and 2019. It ranked second just to the Netherlands in 2018 when it made $523 million foreign direct investments. There are serious contractions in the orders of Turkish companies doing business with Italy, according to Mediterranean Exporters' Associations Coordinator head Hayri Uğur, who said this rate is already up to 50-60%. “The orders could be canceled. A serious contraction is expected in trade volume,” Uğur continued. “Things are very difficult in Italy. There is no solution suggestion for now. Have to wait. The wait could last until at least June and then the assessments will be made depending on the situation.” Concerns persist that the same situation could also be experienced in other countries as well, he noted. “Works from home continue. Lastly, the Inditex Group has decided not to accept any manufacturer in its office. Also, company officials that were expected to arrive next week postponed their trips to the end of May,” Uğur added. Uludağ Automotive Industry Exporters' Association (OİB) Chairman Baraç Çelik noted Italy was an important destination for the Turkish automotive industry. “It is a third-largest export market for the Turkish automotive sector. ... We make more than 15% of our total exports to Italy. The quarantine is currently being implemented in Italy. To look at the short-term effect of this, it is important how much the products supplied from Italy will be affected,” Çelik said. “If Italy solves this by April 3, our automotive industry will manage this situation somewhat. But if it extends until mid-April, there may be a problem,” he added. Even though they are two competing countries in the home and kitchen utensils sector, Italy is an important export market in the said industry. “Now many of our customers in Italy had to cancel their orders. We have companies that have their products ready but cannot load due to this reason. On the other hand, Italy is a country where we import intermediate goods in some product groups. It's too early to see the whole picture,” Burak Önder, the chairman of the Home and Kitchenware Industrialists and Exporters Associations, told Dünya. Italy is also an important route in transit transport to other European countries. Both highway transport and roll-on, roll-off, or Ro-Ro, transport with Italy continue; however, transportation companies are concerned that the borders will be completely shut down. International Transporters Association of Turkey (UND) officials have said there were currently no obstacles in transportation to Italy, where around 40,000 export trips are made annually. Fuat Pamukçu, sales, marketing, business development and strategy vice president at the Mediterranean Business Unit of DFDS, which is one of the most important companies engaged in Ro-Ro transport between Turkey and Italy, said nearly 45 Ro-Ro monthly trips are made to Italy. “We have called off trips for nearly one month. Crews are changing in Turkey. We transfer the drivers from Slovenia, not from Italy. Even though Italy is in a quarantine state, factories, workplace and rig traffic continue. Precautions have been taken everywhere. We are following the developments closely,” Pamukçu was cited as saying.
english
package string import ( "testing" ) func TestString(t *testing.T) { s := "Hey man, 你好!" for i := 0; i < len(s); i++ { t.Logf("s[%d]=%c", i, s[i]) } for i, c := range s { t.Logf("s[%d]=%c", i, c) } t.Logf("%s%s", s[9:12], s[12:15]) } func TestStringBitMove(t *testing.T) { c := '中' s := "hello" t.Logf("%c, %[1]v, %016[1]b, %v, %016[2]b", c<<1, c) t.Logf("%c, %[1]v, %0[1]X", c-1) t.Logf("%c, %[1]v, %0[1]X, len(c)=%d", c, len(s)) t.Log(s + "world") }
go
var FFA = require('ffa') , TieBreaker = require('..') , test = require('bandage'); test('unbalancedFfa', function *(t) { var ffa = new FFA(16, { sizes: [4, 4], advancers: [2] }); var fm = ffa.matches; // top seeds to final ffa.score(fm[0].id, [4,3,2,1]); ffa.score(fm[1].id, [4,3,2,1]); ffa.score(fm[2].id, [4,3,2,1]); ffa.score(fm[3].id, [4,3,2,1]); // 2x three way tie them in final ffa.score(fm[4].id, [4,4,4,1]); ffa.score(fm[5].id, [4,3,3,3]); t.eq(ffa.rawPositions(ffa.results()), [ [ [1, 3, 6], [], [], [8] ], [ [2], [4, 5, 7], [], [] ] ], 'posAry for ffa - 2x three way tie in final' ); // want to gradually (over the course of several tiebreakers) break up posAry // first a noop TB (all just tie again) var tb = TieBreaker.from(ffa, 4); var tbm = tb.matches; t.eq(tbm.length, 2, 'two matches in tbm'); t.eq(tbm[0].p, [1,3,6], 's1 tiebreaker 1'); t.eq(tbm[1].p, [4,5,7], 's1 tiebreaker 2'); t.ok(tb.score(tbm[0].id, [1,1,1]), 'can fully tie s1m1'); t.ok(tb.score(tbm[1].id, [2,2,2]), 'can fully tie s1m2'); t.ok(tb.isDone(), 'tb done now'); t.eq(tb.rawPositions(), [ [ [1, 3, 6], [], [], [8] ], [ [2], [4, 5, 7], [], [] ] ], 'posAry after tb1 - no changes' ); // then partialy break r1m2 var tb2 = TieBreaker.from(tb, 4); var tb2m = tb2.matches; t.eq(tb2m.length, 2, 'two matches in tb2m'); t.eq(tb2m[0].p, [1,3,6], 'r1 tiebreaker 1'); t.eq(tb2m[1].p, [4,5,7], 'r1 tiebreaker 2'); t.ok(tb2.score(tb2m[0].id, [1,1,1]), 'can still fully tie s1m1'); t.ok(tb2.score(tb2m[1].id, [2,2,1]), 'can untie s1m2 partially'); t.ok(tb2.isDone(), 'tb2 done now'); t.eq(tb2.rawPositions(), [ [ [1, 3, 6], [], [], [8] ], [ [2], [4, 5], [], [7] ] ], 'posAry after tb2 - partially broken cluster 1' ); // then break remaining r1m2 var tb3 = TieBreaker.from(tb2, 4); var tb3m = tb3.matches; t.eq(tb3m.length, 2, 'two matches in tb3m'); t.eq(tb3m[0].p, [1,3,6], 's1 tiebreaker 1'); t.eq(tb3m[1].p, [4,5], 's1 tiebreaker 2 smaller now'); t.ok(tb3.score(tb3m[0].id, [1,1,1]), 'can still fully tie s1m1'); t.ok(tb3.score(tb3m[1].id, [2,1]), 'can untie s1m2 fully'); t.ok(tb3.isDone(), 'tb3 done now'); t.eq(tb3.rawPositions(), [ [ [1, 3, 6], [], [], [8] ], [ [2], [4], [5], [7] ] ], 'posAry after tb3 - fully broken cluster 1' ); var tb4 = TieBreaker.from(tb3, 4); var tb4m = tb4.matches; t.eq(tb4m.length, 1, 'only 1 match in tb4m'); t.eq(tb4m[0].p, [1,3,6], 's1 tiebreaker 1'); t.ok(tb4.score(tb4m[0].id, [1,1,0]), 'can sufficiently untie s1'); t.ok(tb4.isDone(), 'tb4 done now'); t.eq(tb4.rawPositions(), [ [ [1, 3], [], [6], [8] ], [ [2], [4], [5], [7] ] ], 'posAry after tb4 - fully broken cluster 1' ); // ensure we can still change our mind });
javascript
{"name": "Richmond, Virginia Regional Tournament", "host": "University of Richmond", "location": "Richmond, Virginia", "start_date": "February 11, 2017", "end_date": "February 12, 2017", "level": "regionals", "year": "2017", "bid_start_date": "March 24, 2017", "bid_end_date": "March 26, 2017", "bid_location": "Wilmington, Delaware", "amta_rep_0": "Kyle\tThomason", "amta_rep_1": "Kevin\tHarrison", "tab_note_0": "9th\tplace\tafter\tround\t3:\t4\tWins"}
json
<gh_stars>0 use std::collections::HashMap; pub struct Request<C: Clone + Sync + Send> { pub method: String, pub path: String, pub query_string: String, pub headers: HashMap<String, String>, pub content_type: Option<String>, pub content_length: usize, pub header_lenght: usize, pub body: Vec<u8>, pub logger: slog::Logger, pub context: C, } impl<C: Clone + Sync + Send> Request<C> { pub fn body_as<'a, T>(&'a self) -> serde_json::Result<T> where T: serde::de::Deserialize<'a>, { serde_json::from_slice(&self.body) } pub fn query_string_as<'a, T>(&'a self) -> Result<T, serde::de::value::Error> where T: serde::de::Deserialize<'a>, { serde_urlencoded::from_str(&self.query_string) } }
rust
package sample.cluster.transformation.japi; import akka.actor.ActorSystem; import akka.actor.Props; public class TransformationBackendMain { public static void main(String[] args) throws Exception { // Override the configuration of the port // when specified as program argument if (args.length > 0) System.setProperty("akka.remote.netty.port", args[0]); ActorSystem system = ActorSystem.create("ClusterSystem"); system.actorOf(new Props(TransformationBackend.class), "backend"); } }
java
{ "name": "highstock", "author": "highslide-software", "description": "Highcharts JS is a JavaScript charting library based on SVG and VML rendering.", "version": "3.0.1", "main": [ "js/highcharts.src.js", "js/highstock.src.js", "js/highcharts-more.src.js" ], "ignore": [ "components", "css", "node_modules", "test", ".*", "Gruntfile.js", "exporting-server", "fiddles", "gfx", "lib", "samples", "studies", "tools", "ant", "build.*", "invalidations.txt", "whats-new.htm" ], "homepage": "https://github.com/robdodson/highcharts.com", "_release": "3.0.1", "_resolution": { "type": "version", "tag": "v3.0.1", "commit": "a9d147a0d94fc0d71d0916cd2d87bc21cd8dc0ec" }, "_source": "https://github.com/robdodson/highcharts.com.git", "_target": "^3.0.1", "_originalSource": "highstock", "_direct": true }
json
<filename>accounting-settlement-core/src/main/java/com/jimsp/accountsettlement/converter/AccountSettlementDataToAccountSettlementCanonico.java package com.jimsp.accountsettlement.converter; import org.springframework.stereotype.Component; import com.jimsp.accountsettlement.canonico.AccountSettlementCanonico; import com.jimsp.accountsettlement.model.AccountSettlementData; @Component public class AccountSettlementDataToAccountSettlementCanonico { public AccountSettlementCanonico accountSettlementCanonicoToAccountSettlementData( final AccountSettlementData accountSettlementData) { return new AccountSettlementCanonico(accountSettlementData.getContaContabil(), accountSettlementData.getData(), accountSettlementData.getValor()); } }
java
The Union cabinet has finally cleared the much debated Foreign Direct Investment hike upto 74 per cent in the telecom sector. While presenting the maiden budget of the UPA government last year in July, Finance Minister P. Chidambaram had announced the proposal of hiking the FDI cap for the telecom sector to 74 per cent from the prevailing 49 per cent, as a sequel to the Common Minimum Programme (CMP) vision to increase FDI in a few sectors. The decision, predictably, did not go down well with the Left parties. The UPA-Left Coordination Panel deliberated on the issue and the finance ministry gave a detailed reply to a Left dossier which highlighted the need for hiking FDI limits. There were inter-ministerial differences as well that seem resolved now. The benefits of the government’s decision need to be looked at from a few angles. One, whether increasing the FDI limit will actually pave the way for more inflow of capital into the telecom sector. And two, are the security concerns really tenable? The steering committee of the Planning Commission headed by N. K. Singh recommended FDI upto 74 per cent in basic and cellular services and 100 per cent in all other services subject to security clearances. It also contended that US$ 2. 5 billion was needed annually during the 10th Five Year Plan period to sustain telecom growth and achieve the targeted tele-density. Based on this assessment, there was a need for more FDI in the sector due to two related reasons — firstly, the available domestic capital was simply not adequate and secondly, the available capital could not be expected to be spent on the telecom sector only. According to the finance ministry, the expected investments required were US $ 28. 06 billion for the five year period of 2002-07 for achieving tele-density of 19. 2 per cent while according to a Morgan Stanley study, it would be US $ 20 billion for the same period to achieve a tele-density of 13. 7 per cent. These estimates have considered both the private and public sector investment possibilities. Left parties do not subscribe to the view that opening the limits of FDI will bring in more investment. They contend that most major countries like the US, Canada, France and China have restricted their telecom sectors on the issue of FDI. They are trying to plead for the Chinese model whereby FDI is restricted to 49 per cent and at the same time efforts are made for more investments in domestic manufacturing by having alliances with state owned companies. The problem is that the Chinese domestic market did not spring up overnight. It grew up on the sidelines of the immense investments made by MNCs in the sector in that country. That made the hardware industry competitive. Unfortunately in India, we do not have the time to restart the growth of a hardware industry although we could do well to have vast production to cater to the domestic hardware market. A case in point could be the mass production of the low-cost yet high-technology simputer which could work wonders in all our e-governance programmes and efforts to increase PC penetration. Coming to the second point of security, the Left had raised the issue of national security implications and the possibility of control of networks going into foreign hands. In this case, we need to look at the hardware and networking aspects and the management aspects that could allow such possibilities. Presently the import of hardware is already free under the OGL scheme and their installation in critical telecom infrastructure will naturally be subject to due diligence before they are commissioned. This is generally provisioned by all the customers in their purchase formalities. Moreover, for a long time we have been relying on foreign hardware for all our networks’ functioning and till date no unwanted activity or remote management has been noticed. As far as management issues are concerned, there have been suggestions about Indian management keeping the actual control. But this could come in the way of the Companies Act which clearly envisages management control based on shareholding patterns. Similarly, the software for the day-to-day management of the networks could also be regularly audited by government agencies as also occasional surprise checks undertaken. This is not to say that surveillance should be the order of the day nor that the government has the best surveillance tools available with it. For now, everybody will watch the Left’s reaction. Meanwhile the government and its agencies alongwith the private sector players in the arena need to ensure that the Cabinet decision paves the way for all round growth of the industry and the quality of service improves. Else, the purpose of the move will be lost.
english
<gh_stars>0 { "name": "medium-2-md", "version": "0.5.0", "preferGlobal": true, "description": "Converts Medium posts to Jekyll/Hugo compatible markdown and adds front matter.", "bin": { "medium-2-md": "./index.js" }, "author": "<NAME> <<EMAIL>> (https://github.com/gautamdhameja/)", "homepage": "https://github.com/gautamdhameja/medium-2-md", "repository": { "type": "git", "url": "https://github.com/gautamdhameja/medium-2-md" }, "keywords": [ "medium", "markdown", "html-to-markdown", "medium-to-jekyll", "medium-to-hugo" ], "license": "Apache-2.0", "dependencies": { "cheerio": "^1.0.0-rc.2", "commander": "^2.20.0", "js-yaml": "^3.13.1", "node-fetch": "~2.6.0", "turndown": "^5.0.3" } }
json
I want to meet you in Bosnian: What's Bosnian for I want to meet you? If you want to know how to say I want to meet you in Bosnian, you will find the translation here. We hope this will help you to understand Bosnian better. "I want to meet you in Bosnian." In Different Languages, https://www.indifferentlanguages.com/words/i_want_to_meet_you/bosnian. Accessed 07 Oct 2023. Check out other translations to the Bosnian language:
english
Bihar STET 2022 Exam Cancelled: The Bihar government has announced that the Bihar STET 2022 exam has been cancelled and the state will not conduct the state-level teachers eligibility test. This year, the recruitment will take place on the basis of the Central Teachers Eligibility Test (CTET) score. The state government believes that since the Central Government of India conducts CTET twice a year, that should be sufficient to assess a teacher’s qualification. Therefore, the Bihar STET exam has been cancelled with immediate effect. This decision was taken by the state’s Additional Chief Secretary (education) Deepak Kumar Singh. For this, a letter was issued by Director (Primary Education) Ravi Prakash to the Secretary of Bihar School Examination Board (BSEB). “As per the provisions laid down under the Bihar Elementary School Service (appointment, promotion, transfer, disciplinary proceeding and service condition) Rules. 2020, qualifying TET conducted either by the Centre or state is required for teachers’ recruitment. The Centre holds it twice a year. in July and December. As such, the need for another similar test at the state level is not being felt. If such a need arises in future, the department will take a decision,” the letter read (translated). Bihar STET exam was last conducted for the 2019 batch. The Bihar STET exam was in discussion in the November 2021 when several teachers had gone on protest to raise their voices against the ‘delay’ in the issuing of appointment letters for thousands of teachers.
english
The Indian team is considered one of the best in the world because they are good in all aspects – batting, bowling and fielding. The fielding department has improved considerably over the last few years and players have learnt the importance of fitness in the modern game today. Here is a look at the fittest Indian cricketers: Virat Kohli: Probably the fittest batsman in the country, Virat Kohli has gone from being a chubby Punjabi boy to the poster boy for lean and mean. Kohli has spoken about his fitness regime on multiple occasions and how he has learnt to respect his body to bring that extra dimension to his game. Kohli, being the captain, sets the bar for the rest of the field and he is always running around the pitch, diving and trying to stop runs. He also runs very fast between wickets and has a superb throwing arm too. He is one of the fittest Indian cricketers ever. MS Dhoni: If there is one word you would associate with MS Dhoni, it would be power. That power comes from being fit and looking after himself really well. Dhoni is naturally very stocky and muscular and the fact that he is a keeper means he has to look after his fitness levels even more. Dhoni was famous for admitting he drank litres of cow’s milk on multiple occasions to build his muscle and at the age of 36, he is still giving youngsters a run for their money. Umesh Yadav: Though Yadav is not the most agile fielder in the team, he has a throwing arm to die for. His strong frame is perfect for a fast bowler and rarely does he suffer from injuries. Yadav is probably the fittest Indian cricketer if we look at just the physical aspect. His long, burly arms and muscular frame mean that he can bowl many overs in a spell and not feel too fatigued. He has effected run outs from the deep too, thanks to his powerful throwing arm on many occasions. Hardik Pandya: Hardik Pandya is another one of the newer crop of Indian players who places a huge emphasis on his fitness and conditioning. His social media is replete with images and videos of him in the gym and the power he has in stock has been showcased on many occasions. Ravindra Jadeja: Jadeja is another one of those players who uses his lithe frame to his complete advantage. He is probably the best fielder inside the circle in world cricket and few batsmen have the guts to take on his throwing arm. Ravindra Jadeja, one of the fittest Indian cricketers, is very fast and on multiple occasions, he has chased the ball from the circle all the way to the boundary to stop a four. He is a real asset for the Indian cricket team and will continue to be so for many more years.
english
<gh_stars>0 {"appId":"org.nativescript.MyDoors","minSdkVersion":null,"targetSdkVersion":null,"multiDexEnabled": true}
json
<filename>dataset/test/data_array_test.cpp // SPDX-License-Identifier: BSD-3-Clause // Copyright (c) 2021 Scipp contributors (https://github.com/scipp) #include <gtest/gtest.h> #include "scipp/dataset/data_array.h" #include "scipp/dataset/except.h" #include "scipp/dataset/util.h" #include "scipp/variable/operations.h" #include "test_macros.h" using namespace scipp; class DataArrayTest : public ::testing::Test { protected: Variable data = makeVariable<double>(Values{1}); Variable coord = makeVariable<double>(Values{2}); Variable mask = makeVariable<bool>(Values{false}); Variable attr = makeVariable<double>(Values{3}); }; TEST_F(DataArrayTest, constructor_shares) { DataArray a(data, {{Dim::X, coord}}, {{"mask", mask}}, {{Dim("attr"), attr}}); EXPECT_TRUE(a.data().is_same(data)); EXPECT_TRUE(a.coords()[Dim::X].is_same(coord)); EXPECT_TRUE(a.masks()["mask"].is_same(mask)); EXPECT_TRUE(a.attrs()[Dim("attr")].is_same(attr)); } TEST_F(DataArrayTest, copy_shares) { const DataArray a(data, {{Dim::X, coord}}, {{"mask", mask}}, {{Dim("attr"), attr}}); const DataArray b(a); EXPECT_TRUE(a.data().is_same(b.data())); EXPECT_TRUE(a.coords()[Dim::X].is_same(b.coords()[Dim::X])); EXPECT_TRUE(a.masks()["mask"].is_same(b.masks()["mask"])); EXPECT_TRUE(a.attrs()[Dim("attr")].is_same(b.attrs()[Dim("attr")])); EXPECT_NE(&a.coords(), &b.coords()); EXPECT_NE(&a.masks(), &b.masks()); EXPECT_NE(&a.attrs(), &b.attrs()); } TEST_F(DataArrayTest, construct_fail) { // Invalid data EXPECT_THROW(DataArray(Variable{}), std::runtime_error); } TEST_F(DataArrayTest, name) { DataArray array(data); EXPECT_EQ(array.name(), ""); array.setName("newname"); EXPECT_EQ(array.name(), "newname"); } TEST_F(DataArrayTest, erase_coord) { DataArray a(data); a.coords().set(Dim::X, coord); EXPECT_THROW(a.attrs().erase(Dim::X), except::NotFoundError); EXPECT_NO_THROW(a.coords().erase(Dim::X)); a.attrs().set(Dim::X, attr); EXPECT_NO_THROW(a.attrs().erase(Dim::X)); a.attrs().set(Dim::X, attr); EXPECT_THROW(a.coords().erase(Dim::X), except::NotFoundError); } TEST_F(DataArrayTest, shadow_attr) { const auto var1 = 1.0 * units::m; const auto var2 = 2.0 * units::m; DataArray a(0.0 * units::m); a.coords().set(Dim::X, var1); a.attrs().set(Dim::X, var2); EXPECT_EQ(a.coords()[Dim::X], var1); EXPECT_EQ(a.attrs()[Dim::X], var2); EXPECT_THROW_DISCARD(a.meta(), except::DataArrayError); a.attrs().erase(Dim::X); EXPECT_EQ(a.meta()[Dim::X], var1); } TEST_F(DataArrayTest, astype) { DataArray a( makeVariable<int>(Dims{Dim::X}, Shape{3}, Values{1, 2, 3}), {{Dim::X, makeVariable<int>(Dims{Dim::X}, Shape{3}, Values{4, 5, 6})}}); const auto x = astype(a, dtype<double>); EXPECT_EQ(x.data(), astype(a.data(), dtype<double>)); } TEST_F(DataArrayTest, view) { const auto var = makeVariable<double>(Values{1}); const DataArray a(copy(var), {{Dim::X, copy(var)}}, {{"mask", copy(var)}}, {{Dim("attr"), copy(var)}}); const auto b = a.view(); EXPECT_EQ(a, b); EXPECT_EQ(&a.data(), &b.data()); EXPECT_EQ(&a.coords(), &b.coords()); EXPECT_EQ(&a.masks(), &b.masks()); EXPECT_EQ(&a.attrs(), &b.attrs()); EXPECT_EQ(a.name(), b.name()); } TEST_F(DataArrayTest, as_const) { const auto var = makeVariable<double>(Values{1}); const DataArray a(copy(var), {{Dim::X, copy(var)}}, {{"mask", copy(var)}}, {{Dim("attr"), copy(var)}}); const auto b = a.as_const(); EXPECT_EQ(a, b); EXPECT_TRUE(b.is_readonly()); EXPECT_TRUE(b.coords().is_readonly()); EXPECT_TRUE(b.masks().is_readonly()); EXPECT_TRUE(b.attrs().is_readonly()); EXPECT_TRUE(b.coords()[Dim::X].is_readonly()); EXPECT_TRUE(b.masks()["mask"].is_readonly()); EXPECT_TRUE(b.attrs()[Dim("attr")].is_readonly()); EXPECT_EQ(a.name(), b.name()); }
cpp
import { Firestore } from '@google-cloud/firestore'; import { Store } from 'express-session'; export interface StoreOptions { dataset: Firestore; kind?: string; } export declare class FirestoreStore extends Store { db: Firestore; kind: string; constructor(options: StoreOptions); get: (sid: string, callback: (err?: Error | null | undefined, session?: Express.SessionData | undefined) => void) => void; set: (sid: string, session: Express.SessionData, callback?: ((err?: Error | undefined) => void) | undefined) => void; destroy: (sid: string, callback?: ((err?: Error | undefined) => void) | undefined) => void; }
typescript
Remember the Get Windows 10 (GWX) app? The one that constantly prodded Windows 7/8.1 users to upgrade to the newest OS? Well, it's finally been removed by Microsoft. And about time too, you might rightly think – after all, didn't the free upgrade to Windows 10 offer expire at the end of July, almost two months ago now? Indeed it did, and while you might not have heard from GWX since, the program – and related nagging software – has still been sat on your PC. Until now that is, because Microsoft has released an update which 'removes software related to the Windows 10 free upgrade offer'. And you can get it via Windows Update, unsurprisingly – you'll find it under optional updates, where it's labelled KB3184143 (although as ever the description given is just a vague bit of 'this resolves issues in Windows' patter). The full description is given in the relevant Microsoft Knowledge Base article here, which actually shows that this gets rid of a number of pieces of software aside from GWX. So as well as dumping the Get Windows 10 app, it also removes 'Windows 8.1 OOBE modifications to reserve Windows 10' (along with an update for that piece of software), and the 'Windows 8.1 and Windows 7 SP1 end of free upgrade offer notification'. Along with a few other bits and pieces such as 'Internet Explorer 11 capabilities to upgrade Windows 8.1 and Windows 7'. Which shows you just how serious Microsoft was about pushing Windows 10 over the course of the free offer. If you didn't already realize that from the amount of times the upgrade nag box popped up, and the controversial measures the company sometimes used when trying to get people to switch to its latest OS. Including the sort of tactics usually employed by spammers. At any rate, this marks the official end of the GWX matter. We hope – because the bullheaded app had a habit of coming back when you uninstalled it via third-party solutions. We presume this won't be the case when you remove the thing via the official channels, though. Get the hottest deals available in your inbox plus news, reviews, opinion, analysis, deals and more from the TechRadar team. Darren is a freelancer writing news and features for TechRadar (and occasionally T3) across a broad range of computing topics including CPUs, GPUs, various other hardware, VPNs, antivirus and more. He has written about tech for the best part of three decades, and writes books in his spare time (his debut novel - 'I Know What You Did Last Supper' - was published by Hachette UK in 2013).
english
mod demo; #[allow(dead_code)] mod util; use std::io; use std::time::Duration; use structopt::StructOpt; use termion::event::Key; use termion::input::MouseTerminal; use termion::raw::IntoRawMode; use termion::screen::AlternateScreen; use tui::backend::TermionBackend; use tui::Terminal; use crate::demo::{ui, App}; use crate::util::event::{Config, Event, Events}; #[derive(Debug, StructOpt)] struct Cli { #[structopt(long = "tick-rate", default_value = "250")] tick_rate: u64, #[structopt(long = "log")] log: bool, } fn main() -> Result<(), failure::Error> { let cli = Cli::from_args(); stderrlog::new().quiet(!cli.log).verbosity(4).init()?; let events = Events::with_config(Config { tick_rate: Duration::from_millis(cli.tick_rate), ..Config::default() }); let stdout = io::stdout().into_raw_mode()?; let stdout = MouseTerminal::from(stdout); let stdout = AlternateScreen::from(stdout); let backend = TermionBackend::new(stdout); let mut terminal = Terminal::new(backend)?; terminal.hide_cursor()?; let mut app = App::new("Termion demo"); loop { ui::draw(&mut terminal, &app)?; match events.next()? { Event::Input(key) => match key { Key::Char(c) => { app.on_key(c); } Key::Up => { app.on_up(); } Key::Down => { app.on_down(); } Key::Left => { app.on_left(); } Key::Right => { app.on_right(); } _ => {} }, Event::Tick => { app.on_tick(); } } if app.should_quit { break; } } Ok(()) }
rust
Begin typing your search above and press return to search. 'Sangeet Vidyalaya to organize monthly programme' SILCHAR, July 10: The monthly ‘Shruti Mandal’ programme of Sangeet Vidyalaya will be organized at the premises of Sangeet Vidyalaya, at Park Road of this town, on Monday. Invited artistes include Soli Choudhury, Manisha Roy, Sanjay Choudhury and Runu Roy. All music-lovers have been requested to attend the programme. It was stated by a press-release by Bhaskar Das. Shruti Mandal has been trying to keep the tradition of classical songs alive in the hearts of the people.
english
/* * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at * http://www.eclipse.org/org/documents/edl-v10.php. * * SPDX-License-Identifier: BSD-3-Clause */ package com.sun.tools.xjc.reader.xmlschema; import com.sun.tools.xjc.reader.Ring; /** * Component accessible from {@link Ring}. * * @author <NAME> */ public abstract class BindingComponent { protected BindingComponent() { Ring.add(this); } // // // Accessor to common components. // // protected final ErrorReporter getErrorReporter() { return Ring.get(ErrorReporter.class); } protected final ClassSelector getClassSelector() { return Ring.get(ClassSelector.class); } }
java
#[derive(Debug)] pub enum Unit { Number(f64), Operator(char), }
rust
import stringArray from './stringArray' import orThrow from './orThrow' export default (key: string, separator?: string) => orThrow((k) => stringArray(k, separator), 'string array')(key)
typescript
.center { display: block; margin: 0 auto; } .margins { margin-top: 10px; } .margins-bottom { margin-bottom: 10px; } .large-button { height: 70px; width: 140px; margin-top: 10px; border-width: 2px; border-radius: 5px; font-size: 20px; } .medium-button { height: 40px; width: 80px; border-width: 1px; border-radius: 4px; font-size: 18px; margin-bottom: 50px; } .small-button { height: 20px; border-width: 1px; border-radius: 2px; font-size: 12px; } .button-blue { background-color: blue; color: white; } .smaller-text { font-size: 16px; } .alert { border: 2px solid; border-radius: 5px; text-align: center; padding-top: 2px; padding-bottom: 2px; font-size: 16px; letter-spacing: .1em; } .alert-info { background-color: dodgerblue; color: lightskyblue; border-color: lightskyblue; } .alert-error { background-color: darkred; color: orangered; border-color: orangered; } .items { width: 100%; padding: 5px; } .items thead td { font-weight: bold; border-bottom: 1px solid black; } .items tbody tr:nth-child(odd) { background-color: gainsboro; } .img-small { height: 50px; width: auto; }
css