text
stringlengths
1
1.04M
language
stringclasses
25 values
<reponame>AesSedai/bitburner-overseer import { NS } from "../types/bitburner" export async function main(ns: NS) { const scriptStart = new Date().valueOf() const host = ns.args[0] const target = ns.args[1] const sleepFor = ns.args[2] const batchId = ns.args[3] const batchThreads = ns.args[4] const opIdx = ns.args[5] const opCount = ns.args[6] const tag = ns.args[7] const minSec = ns.args[8] if ( typeof host === "string" && typeof target === "string" && typeof sleepFor === "number" && typeof batchId === "number" && typeof batchThreads === "number" && typeof tag === "string" && typeof opIdx === "number" && typeof opCount === "number" && typeof minSec === "number" ) { const sleepStart = new Date().valueOf() await ns.sleep(sleepFor) const sleepEnd = new Date().valueOf() const securityBefore = ns.getServerSecurityLevel(target) const moneyBefore = ns.getServerMoneyAvailable(target) await ns.grow(target) const scriptEnd = new Date().valueOf() const info = ns.getRunningScript() const data = [ JSON.stringify({ host: host, target: target, sleepFor: sleepFor, batchId: batchId, batchThreads: batchThreads, opIdx: opIdx, opCount: opCount, tag: tag, scriptStart: scriptStart, sleepStart: sleepStart, sleepEnd: sleepEnd, scriptEnd: scriptEnd, securityBefore: securityBefore, moneyBefore: moneyBefore, security: ns.getServerSecurityLevel(target), money: ns.getServerMoneyAvailable(target), threads: info.threads }) ] let tries = 0 let maxTries = 5 while (tries < maxTries && !(await ns.tryWritePort(1, data))) { tries += 1 await ns.asleep(100) } } }
typescript
<reponame>vinaydhakretutanota/hmi-external<filename>projects/external-components/src/public-api.ts /* * Public API Surface of external-components */ export * from './lib/primeng-selectors/primeng-selectors.module'; export * from './lib/primeng-selectors/components/password-external/password-external.component'; export * from './lib/primeng-selectors/components/text-external/text-external.component'; export * from './lib/primeng-selectors/components/dropdown-external/dropdown-external.component'; export * from 'primeng/dropdown'; export * from 'primeng/password'; export * from 'primeng/checkbox'; export * from 'primeng/accordion';
typescript
<filename>service/src/main/java/com/excilys/cdb/service/ServiceUser.java package com.excilys.cdb.service; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Component; import com.excilys.cdb.dao.DAOUser; import com.excilys.cdb.model.CdbUserDetails; import com.excilys.cdb.model.User; @Component public class ServiceUser implements UserDetailsService { private DAOUser daoUser; public ServiceUser(DAOUser daoUser) { super(); this.daoUser = daoUser; } @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { User user = daoUser.findbyName(username); if(user == null ) { throw new UsernameNotFoundException("user not found !"); } return new CdbUserDetails(user); } }
java
package maopao_sort import ( "fmt" "testing" ) func TestBubbleSort(t *testing.T) { fmt.Println(BubbleSort([]int{22, 4565, 123, 11, 35, 5, 123, 89, 12234, 788, 123123, 1, 0, 999, 22})) } func TestBubbleSortGetMax(t *testing.T) { fmt.Println("最大值是:", BubbleSortGetMax([]int{22, 4565, 123, 11, 35, 5555555, 123, 89, 12234, 788, 123123, 1, 0, 999, 22})) }
go
<!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Desafio 006</title> </head> <body> <h1>Tags em HTML</h1> <p>Em Html5 podemos inserir os elementos da lista a seguir. Passe o mouse sobre o texto para descobrir qual a tag que deve ser usada em cada uma.</p> <ul> <li><abbr title="use a tag &lt;p&gt;">Paragrafo</abbr></li> <li><abbr title="use a tag &lt;h1&gt;">Titulo</abbr></li> <li><abbr title="use a tag &lt;img&gt;">Imagens</abbr></li> <li><abbr title="use a tag &lt;abbr&gt;">Abreviaçoes</abbr></li> <li><abbr title="use a tag &lt;code&gt;">Codigo fonte</abbr></li> <li><abbr title="use a tag &lt;ol&gt;">Listas numeradas</abbr></li> <li><abbr title="use a tag &lt;ul&gt;">Lista com demarcadores</abbr></li> </ul> </body> </html>
html
<gh_stars>0 //-------------------------------------------------------------------------- // Copyright (C) 2016-2018 Cisco and/or its affiliates. All rights reserved. // // This program is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License Version 2 as published // by the Free Software Foundation. You may not use, modify or distribute // this program under any other version of the GNU General Public License. // // This program is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // You should have received a copy of the GNU General Public License along // with this program; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //-------------------------------------------------------------------------- // tp_mock.cc author <NAME> <<EMAIL>> // Standalone compilation: // g++ -g -Wall -I.. -I/path/to/snort3/src -c tp_mock.cc // g++ -std=c++11 -g -Wall -I.. -I/path/to/snort3/src -shared -fPIC -o libtp_mock.so tp_mock.cc // As a module (dynamically loaded) - see CMakeLists.txt #include <iostream> #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "main/snort_types.h" #include "tp_appid_module_api.h" #include "tp_appid_session_api.h" #define WhereMacro __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ using namespace std; class ThirdPartyAppIDModuleImpl : public ThirdPartyAppIDModule { public: ThirdPartyAppIDModuleImpl(uint32_t ver, const char* mname) : ThirdPartyAppIDModule(ver, mname) { cerr << WhereMacro << endl; } ~ThirdPartyAppIDModuleImpl() { cerr << WhereMacro << endl; } // Hack: use cfg to manipulate pinit to return 1, so we can hit the // if (ret != 0) case in tp_lib_handler.cc. int pinit(ThirdPartyConfig& cfg) { cerr << WhereMacro << endl; return cfg.tp_appid_config.empty() ? 1 : 0; } int tinit() { return 0; } int reconfigure(const ThirdPartyConfig&) { return 0; } int pfini() { cerr << WhereMacro << endl; return 0; } int tfini() { return 0; } int print_stats() { return 0; } int reset_stats() { return 0; } }; class ThirdPartyAppIDSessionImpl : public ThirdPartyAppIDSession { public: bool reset() { return 1; } TPState process(const snort::Packet&, AppidSessionDirection, vector<AppId>&, ThirdPartyAppIDAttributeData&) { return TP_STATE_INIT; } int disable_flags(uint32_t) { return 0; } TPState get_state() { return state; } void set_state(TPState s) { state=s; } void clear_attr(TPSessionAttr attr) { flags &= ~attr; } void set_attr(TPSessionAttr attr) { flags |= attr; } unsigned get_attr(TPSessionAttr attr) { return flags & attr; } private: unsigned flags = 0; }; // Object factories to create module and session. // This is the only way for outside callers to create module and session // once the .so has been loaded. extern "C" { SO_PUBLIC ThirdPartyAppIDModuleImpl* create_third_party_appid_module(); SO_PUBLIC ThirdPartyAppIDSessionImpl* create_third_party_appid_session(); SO_PUBLIC ThirdPartyAppIDModuleImpl* create_third_party_appid_module() { return new ThirdPartyAppIDModuleImpl(1,"foobar"); } SO_PUBLIC ThirdPartyAppIDSessionImpl* create_third_party_appid_session() { return new ThirdPartyAppIDSessionImpl; } }
cpp
We are certainly living in interesting times. It was less than a week ago that a rumor appeared that Apple is going to switch to ARM processors for its next generation of laptops. Obviously, this has very interesting implications for the future of computing and seems to indicate the increasing need for a computing platform that uses less power and that can be used for a day without the need for charging. Earlier today, Google followed up by announcing the Google Chromebook – a netbook (huh, aren’t netbooks dead?) computer concept, built for now by Samsung and Acer around the Atom N750 CPUs. With 2GB of RAM and 16GB of SSD storage, the specifications are somehow low-end, however, this might not be a problem because as Google says in their promo, the web has more storage space than any computer. The price, when these will be available, is believed to be in the range of $400-$500. When I saw the announcement, I thought to myself – why would anybody ever buy something like this? Low end hardware, more expensive than other netbooks and definitively not as attractive as an iPad? Obviously, the answer here is in the “cloud." Google Chrome OS is the first commercially available consumer cloud-centric OS. It is designed around the concept of “expendable” terminals that you can lose, drop or simply throw away without fear of losing your data, which is safely stored into the cloud. From this point of view, the operating system could get damaged or even infected with malware and all you have to do is to reinstall it and re-authenticate with the cloud storage to get exactly the same computing experience as before the crash. Here, I would like to make a mention about the “infected with malware” part. Interesting, Google’s promo claims “it doesn’t need virus protection”. Sadly, this claim comes at a pretty bad time, since the French company VUPEN Security announced only a few days ago that they’ve cracked the security protections build by Google into Chrome and are now able to infect a computer through a malicious page when it’s browsed. Several years ago, I wrote an article saying that malware evolves based on three conditions: With the Chromebook, we have an interesting case, when all these three conditions are met. It’s a (somehow-)new operating system, it has new security defenses into place (self healing, updates) and it’s used in a different way – the data is not on the computer but in the cloud. So, what can we expect from a security point of view? Obviously, with all your data being available into the cloud, in one place, available 24/7 through a fast internet link, this will be a goldmine for cybercriminals. All that is necessary here is to get hold of the authentication tokens required to access the cloud account; this is already happening with malware that has become “steal everything” in the past few years. Although the endpoint is now more secure, the situation is that the data is in a more risky place and it will be much easier to silently steal it. Most of the attacks nowadays focus on infecting the machine and then hiding the presence of the malware for as much time as possible to intercept banking transactions or credit card numbers. With Cloud centric OS’es, the race will be towards stealing access credentials, after which, it’s game over. Who needs to steal banking accounts, when you have Google Checkout? Or, who needs to monitor passwords, when they’re all nicely stored into the Google Dashboard? * Costin Raiu is the Director of Kaspersky Lab’s Global Research & Analysis Team (GReAT) . See Ryan Naraine's disclosure.
english
New Delhi : The Supreme Court has appointed a high-power committee headed by the Jammu &Kashmir government to look into the issue of growing number of casualties of Amarnath pilgrims. The committee which includes secretaries of Home, Health, Environment and Forest, Chief Secretary of J&K, and also various security agencies is expected to suggest ways in which the deaths can be avoided. The Supreme Court took up the matter based on media reports that many deaths were caused due to lack of poor medical facilities. The court today, had called Union home secretary and other top officials to find ways to sort out the issue. The panel members are expected to visit the Amarnath shrine and submit its suggestions to the Chairman of the panel. This will then be examines and submitted to the apex court before August 13.
english
#grid { margin: 0 16px; padding-top: 35px; padding-bottom: 35px; } #searchContainer { justify-content: left; } .titleLine { width: 75px; /* border-top: 2px solid rgb(17, 180, 166); */ border-top: 2px solid #95BF47; margin-top: 4px; } #pageHeader { display: flex; flex-direction: column; align-items: center; } #pageHeadLine { width: 125px; border-top: 2px solid #95BF47; margin-top: 5px; } h1, h2, h3, h4, h5, h6, p, div, button { color: rgb(233, 233, 233) !important; } @media screen and (max-width: 767px) { #searchContainer { justify-content: center; } #grid { padding-bottom: 50px; } }
css
Valorant Convergence 2023 has finally begun. The OFF//SEASON VCT tournament will see six teams compete for a prize pool of $50,000 in Bangalore, India. Five of the six participants are invited from the tier 1 league, while the remaining team comes from the closed qualifier events held in India. Day 3 will begin with a match between Turkey's FUT Esports and Korea's Gen.G. Day 2 opened with a match between Turkey's FUT Esports and India's True Rippers. The series saw a very competitive first map as both teams pushed each other to overtime. However, FUT Esports were able to compose themselves through the Bo3 (Best-of-three) series and won it by 2-0. The second match was similar, as EMEA's Team Vitality completely crushed Brazil's FURIA as they won the Bo3 series by 2-0. FUT Esports vs Gen.G - Which team will make it to the Grand Finals of Valorant Convergence 2023? FUT Esports had an excellent run in VCT 2023. The team finished in the top three of the EMEA League and managed to qualify for every International Valorant event. For 2024, they decided to bring a couple of players to their roster, including world champion cNed. The squad has been a force to be reckoned with in the other OFF//SEASON events. Gen.G started VCT 2023 as one of the most dominating teams in the Pacific League. However, they weren't consistent with their performance and, hence, lost the crucial matches that would have allowed them to qualify for the international events. The team has seen a major revamp for 2024, bringing in some of the best talents from the region, like t3xture, lakia, and Munchkin. This matchup favors FUT Esports, as the team is filled with a lot of experienced players and has shown better results comparatively. However, Gen.G do have the potential to cause a major upset. FUT Esports and Gen.G have never faced each other before. FUT Esports' most recent match was against True Rippers in Valorant Convergence 2023. They won the Bo3 series by 2-0. Gen.G's most recent face-off was also against True Rippers in Valorant Convergence 2023. They won their Bo3 series by 2-1. - Furkan "Mr.FaliN" Yeğen (IGL) - Eray "Gais" Sarikaya (Coach) - Kim "HSK" Hae-Seong (Coach) Interested readers can watch this Valorant match unfold on the official YouTube and Twitch channels of VCT Pacific. The series will take place on December 15, 2023, at 11 pm PST/ December 16 at 8 am CET/ 12:30 pm IST/ 4 pm JST. Poll : Who will win this match?
english
Amaravati, Feb 11: The Andhra Pradesh Police Officers' Association has demanded Chief Minister Y. S. Jagan Mohan Reddy to take action against Animal Husbandry Minister Seediri Appalaraju for abusing and threatening a police officer during an event in Visakhapatnam on February 9. The Association has also sought a public apology from the Minister for using abusive language and behaving rudely with the officer. The Minister was caught on camera abusing and threatening a police inspector during the annual festival of Sri Sarada Peetham in Visakhapatnam attended by the Chief Minister. Appalaraju was miffed after the police officer stopped the entry of his supporters inside Sharada Peetham. The video of the him abusing the police official and threatening him went viral on social media. The Andhra Pradesh Police Officers' Association president J. Srinivasa Rao and others condemned the incident and demanded that the Appalaraju tender a public apology. They said it was unfortunate that a responsible Minister used abusive words and acted rudely with an officer of a key department of the government discharging his duties. The Association urged the Chief Minister to order an inquiry and take appropriate action against Appalaraju and ensure that such incidents are not repeated in future. Earlier, opposition Telugu Desam Party (TDP) general secretary Nara Lokesh posted the video of the incident on Twitter and asked if the Association will show some courage to speak out on the incident. The TDP leader wrote that the DGP and Association faulted his party leaders whenever they raised the issue of law and order and crimes against women. "Let us see if the Association or police boss react to this or blame the person who video recorded it," he had tweeted. The Minister's action has evoked condemnation from BJP. Party state general secretary Vishnu Vardhan Reddy tweeted that the arrogance of the minister is so high that he even forgot the basic laws by which a state is being governed. "Imagine if they can do with the police personnel then what they would do with the common man? Why has a case not been booked against the errant minister? " he asked.
english
import { expect } from 'chai'; import { describe } from 'mocha'; import { getSpatialSearchResultsSQL } from './search-queries'; describe('getSpatialSearchResultsSQL', () => { it('returns null when no systemUserId provided', () => { const response = getSpatialSearchResultsSQL(false, (null as unknown) as number); expect(response).to.be.null; }); it('returns non null when isUserAdmin is true and systemUserId provided', () => { const response = getSpatialSearchResultsSQL(true, 1); expect(response).to.not.be.null; }); it('returns non null when isUserAdmin is false and systemUserId provided', () => { const response = getSpatialSearchResultsSQL(false, 1); expect(response).to.not.be.null; }); });
typescript
{ "name": "vh-json-typescript-mapper", "version": "1.1.5", "typescript": { "definition": "index.d.ts" }, "dependencies": { "reflect-metadata": "^0.1.3" }, "devDependencies": { "chai": "~1.8.0", "mocha": "2.0.1" }, "scripts": { "test": "mocha ./spec/*.js", "typings:generate": "tsc --declaration" }, "description": "For single page application, data sources are obtained from API server. Instead of directly using api data, we \r definitely require an adapter layer to transform data as needed. Furthermore, \r the adapter inverse the the data dependency from API server(API Server is considered uncontrollable and \r highly unreliable as data structure may be edit by backend coder for some specific purposes)to our adapter \r which becomes reliable. Thus, this library is created as the adapter make use of es7 reflect decorator.", "main": "index.js", "repository": { "type": "git", "url": "git+https://github.com/jf3096/json-typescript-mapper.git" }, "keywords": [ "json-mapper", "typescript-json", "json-adapter", "json-transformer", "api-mapper", "api-adapter" ], "author": "<NAME>", "license": "ISC", "bugs": { "url": "https://github.com/jf3096/json-typescript-mapper/issues" }, "homepage": "https://github.com/jf3096/json-typescript-mapper#readme" }
json
The Council of Scientific and Industrial Research (CSIR)-National Institute for Interdisciplinary Science and Technology (NIIST), is looking for project associates. In an official notification, CSIR-NIIST announced taht will be filling temporary positions of project associates for its Pappanamcode and Thiruvananthapuram centres. The CSIR-NIIST has invited applications to fill in a total of six positions of project associate and one position of senior project associate. According to the notification, the posts are temporary and tenable for the duration of the project. The last date to apply is November 15. The job notification further reads that the interview dates for the applicants will be announced on the official website of CSIR-NIIST. To apply for the position of project associate or senior project associate, an applicant will have to visit the official website of CSIR-NIIST - niist. res. in. When the page opens, one has to click the job application section. Once the form opens, the applicant has to submit all details. According to the notification, a candidate will have to upload scanned copies of all certificates, including educational qualification, work experience, age and community. Incomplete applications will be rejected, the job notification reads. The minimum eligibility criteria for the position of project associate and senior project associate is holding a postgraduate degree in the relevant field. The notification further reads that the candidates have to submit separate application forms for each post and indicate the specific job code of the position. The notification mentions that incomplete applications will not be entertained by the CSIR-NIIST screening committee. According to the notification, the project associates will get a basic salary of Rs 31,000 and candidates having a valid CSIR-NIIST score including lectureship or valid gate score will additionally get 16 per cent HRA.
english
<reponame>js4girls-fortaleza/js4girls-fortaleza.github.io require( 'components' ).create( 'navigation-mobile', { initialize: function ( ) { this.$el.on( 'click', this.menuToggle.bind( this ) ) }, menuToggle: function ( event ) { event.preventDefault(); event.stopPropagation(); Rye( '.nav' ).toggleClass( '-opened' ); this.$el.toggleClass( '-opened' ); } } );
javascript
Regular exercise prevents the degradation of neurons vital to movement in rats with symptoms of Parkinson’s disease, emphasizing the importance of physical activity in the condition. The finding could also lead to new treatments for the disease. Parkinson’s disease is a neurodegenerative disorder caused by a loss of dopamine-producing neurons in the substantia nigra, an area of the brain involved in movement. This can cause tremors, loss of motor control, impaired balance or speech, and other symptoms. Previous research has shown that intense exercise can slow the early-stage Parkinson’s disease progression. To understand why, paolo calabresi at the Catholic University of the Sacred Heart in Italy and colleagues analyzed the effect of physical activity on the brains of rats with Parkinson’s symptoms. They injected abnormal protein strands characteristic of Parkinson’s disease into the striatum, a region of the brain crucial for movement, in 19 rats. Of these rats, 13 exercised on a treadmill for 30 minutes a day, five days a week for one month. The rest remained sedentary. After euthanizing the animals, the team bathed slices of their brains in a solution that binds to a dopamine marker, causing it to fluoresce. Sedentary rats had, on average, half as many dopamine-producing neurons in the substantia nigra as sedentary rats. active rats. This indicates that exercise may protect these cells from the deleterious effects of abnormal proteins. Further analysis revealed that neurons in the striatum of active rats maintained the ability to strengthen connections with other cells, a critical trait for transmitting motor signals, whereas this trait was impaired in sedentary rats. The researchers say this may be because exercise increased levels of certain proteins in the animals’ brains, such as brain-derived neurotrophic factor (BDNF), which helps neurons survive and grow. Currently, no approved treatment slows the progression of Parkinson’s disease, Calabresi says. These findings suggest that regular exercise may be one way to do it, she says. The work could also lead to the development of new drugs for the disease. “Once you know the molecular pathways that are being induced by exercise, you could envision having drugs that mimic those effects,” he says. david eidelberg at the Feinstein Institutes for Medical Research in New York. This would be particularly beneficial for people with Parkinson’s who are unable to exercise vigorously. However, this research may not translate to humans, especially since it only looked at one aspect of Parkinson’s disease pathology: abnormal protein strands. It’s not clear what role these play in the disease, Eidelberg says. In fact, some people with Parkinson’s don’t have them at all, she says.
english
AEW commentator Excalibur mentioned a former champion who recently signed with the WWE during the Full Gear pay-per-view. The WWE Superstar in question is none other than Jade Cargill. She recently signed with the Stamford-based promotion and made a few televised appearances. Moreover, she confronted some of the most prominent female stars on the roster, including Charlotte Flair. Before that, she was the longest-reigning TBS Champion in All Elite Wrestling. During the TBS Title three-way match between Kris Statlander, Julia Hart, and Skye Blue at Full Gear, Excalibur namedropped Cargill on commentary. He mentioned how Statlander defeated the 31-year-old to win the gold at Double or Nothing 2023. For those unaware, Statlander defeated Jade Cargill in May 2023 to win the TBS Championship, ending her historic 508-day reign. The loss led to Cargill taking a hiatus from AEW TV for months. Upon her return, the WWE star challenged for the gold again. However, she was unable to regain the championship. Cargill has been presented as a massive star since signing with World Wrestling Entertainment. She has appeared on all three brands but has yet to wrestle her first match in the promotion. What are your thoughts on AEW acknowledging Cargill's history with the TBS Title? Sound off in the comments section below.
english
This is according to a survey‚ conducted by Victoria Milan – a dating website for married and attached people looking to cheat – questioned 3‚412 of its male and female members to discover their real views on attending Music festivals‚ and where and how cheating is most likely to happen. Its results show that 80% of cheaters attend Music Festivals with their friends – setting the perfect anonymous scene for a steamy adventure. Just over one-third of cheaters say indie festivals are the best places to have an affair. While the setting is perfect‚ cheaters claim affairs are not planned – 6 out of every 10 say any hook-up is likely to be spontaneous‚ and a third say it’s probably going to be a one-time fling that wouldn’t last the course of a multi-day festival. One-third say music festivals are the best environments for an affair because they are surrounded by fun‚ and it feels like they’re taking a vacation away from their own life. Just over a quarter admit to taking advantage of the scale of the event arena‚ and getting lost amongst stages and bars to find a fling. Founder and CEO of Victoria Milan‚ Sigurd Vedal‚ said in a statement that music festivals are notorious for fun-loving‚ free-spirited people who are open to experiences. “Losing yourself in the music and the moment is a fantastic experience – it’s no wonder cheaters love to attend music festivals‚ and leave their long-term partner at home. Festivals are full of good-looking people who want to have a great time – and are open to one-night stands‚ flings and flirtations‚” Vedal said. Do you like to go to music festivals with your friends or with your partner? Do you think that having an affair at a music festival is likely to be planned or spontaneous? What do you think influences the attraction felt between strangers at a music festival? What types of affairs happen at festivals? Do you consider music festivals the ideal place for an affair? If yes‚ why? At which music festivals do you think infidelity occurs more?
english
The requested page could not be found. Select the newsletter(s) to which you want to subscribe. The subscriber's email address. Mobile No. Burma (Myanmar) Holy See (Vatican City)
english
<filename>css/checkout.css @import url("https://fonts.googleapis.com/css?family=Poppins"); body { font-family: Poppins; } h2 { font-size: 1rem; } #errorPassword, #errorName, #errorPhone, #errorEmail, #errorAddress, #errorLastname { display: none; min-width: 200px; color: red; } .border--valid { border: 2px solid green; } .border--error { border: 2px red solid; } .show--error { display: block !important; } .message { opacity: 0; } .valid { opacity: 1; } .cancel, .cancel:visited, .cancel:hover { color: #fff; text-decoration: none; } /* footer */ footer.footer { padding-top: 4rem; padding-bottom: 4rem; } /* tablet */ @media (min-width: 576px) { h2 { font-size: 1.2rem; } } /* laptop */ @media (min-width: 992px) { h2 { font-size: 1.5rem; } } /* desktop */ @media (min-width: 1200px) { h2 { font-size: 2rem; } }
css
<gh_stars>0 export class Joke { id: number; title: string; content: string; author: string; authorId: number; }
typescript
import { ChangeDetectionStrategy, Component, Input, OnDestroy, OnInit } from '@angular/core'; import { BehaviorSubject, Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; export interface CodeExplorerData { name: string; language: string; content: string; } @Component({ selector: 'app-code-explorer', templateUrl: './code-explorer.component.html', styles: [ ` .selector { @apply px-4 py-2 bg-gray-300 ring-inset rounded-tl-md rounded-tr-md; @apply focus:outline-none focus:ring-2 focus:ring-blue-600; @apply focus:ring-offset-gray-300 focus:ring-offset-2; } .active { @apply bg-blue-600; @apply focus:ring-white; @apply focus:ring-offset-blue-600; color: #fff; } `, ], changeDetection: ChangeDetectionStrategy.OnPush, }) export class CodeExplorerComponent implements OnInit, OnDestroy { @Input() set codes(data: CodeExplorerData[]) { const selectedTab = this.selectedTab$.getValue(); this.selectedCode$.next(data[selectedTab]); this._codes = data; } get codes() { return this._codes; } selectedTab$ = new BehaviorSubject(0); selectedCode$ = new BehaviorSubject<CodeExplorerData | null>(null); private _codes: CodeExplorerData[] = []; private destroy$ = new Subject(); constructor() {} ngOnInit(): void { this.selectedTab$.pipe(takeUntil(this.destroy$)).subscribe((index) => { this.selectedCode$.next(this.codes[index]); }); } ngOnDestroy() { this.destroy$.next(); this.destroy$.complete(); } }
typescript
/* * Copyright 2019 wjybxx * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.wjybxx.fastjgame.world; import com.google.inject.Inject; import com.wjybxx.fastjgame.core.onlinenode.CenterNodeData; import com.wjybxx.fastjgame.misc.HostAndPort; import com.wjybxx.fastjgame.mrg.*; import com.wjybxx.fastjgame.mrg.async.S2CSessionMrg; import com.wjybxx.fastjgame.mrg.sync.SyncS2CSessionMrg; import com.wjybxx.fastjgame.utils.ConcurrentUtils; import com.wjybxx.fastjgame.utils.GameUtils; import com.wjybxx.fastjgame.utils.ZKPathUtils; import org.apache.curator.utils.ZKPaths; import org.apache.zookeeper.CreateMode; import java.util.concurrent.TimeUnit; import static com.wjybxx.fastjgame.protobuffer.p_center_scene.*; import static com.wjybxx.fastjgame.protobuffer.p_center_scene.p_center_single_scene_hello_result; import static com.wjybxx.fastjgame.protobuffer.p_center_warzone.*; /** * CENTER * @author wjybxx * @version 1.0 * @date 2019/5/15 22:43 * @github - https://github.com/hl845740757 */ public class CenterWorld extends WorldCore { private final CenterDiscoverMrg centerDiscoverMrg; private final SceneInCenterInfoMrg sceneInCenterInfoMrg; private final CenterWorldInfoMrg centerWorldInfoMrg; private final WarzoneInCenterInfoMrg warzoneInCenterInfoMrg; @Inject public CenterWorld(WorldWrapper worldWrapper, WorldCoreWrapper coreWrapper, CenterDiscoverMrg centerDiscoverMrg, SceneInCenterInfoMrg sceneInCenterInfoMrg, WarzoneInCenterInfoMrg warzoneInCenterInfoMrg) { super(worldWrapper, coreWrapper); this.centerDiscoverMrg = centerDiscoverMrg; this.sceneInCenterInfoMrg = sceneInCenterInfoMrg; centerWorldInfoMrg = (CenterWorldInfoMrg) worldWrapper.getWorldInfoMrg(); this.warzoneInCenterInfoMrg = warzoneInCenterInfoMrg; } @Override protected void registerMessageHandlers() { registerResponseMessageHandler(p_center_single_scene_hello_result.class, sceneInCenterInfoMrg::p_center_single_scene_hello_result_handler); registerResponseMessageHandler(p_center_cross_scene_hello_result.class, sceneInCenterInfoMrg::p_center_cross_scene_hello_result_handler); registerResponseMessageHandler(p_center_warzone_hello_result.class,warzoneInCenterInfoMrg::p_center_warzone_hello_result_handler); } @Override protected void registerHttpRequestHandlers() { } @Override protected void registerSyncRequestHandlers() { } @Override protected void registerAsyncSessionLifeAware(S2CSessionMrg s2CSessionMrg) { } @Override protected void registerSyncSessionLifeAware(SyncS2CSessionMrg syncS2CSessionMrg) { } @Override protected void startHook() throws Exception { // 绑定端口并注册到zookeeper bindAndRegisterToZK(); // 注册成功再启动服务发现 centerDiscoverMrg.start(); } private void bindAndRegisterToZK() throws Exception { // 绑定3个内部交互的端口 HostAndPort tcpHostAndPort = innerAcceptorMrg.bindInnerTcpPort(true); HostAndPort syncRpcHostAndPort = innerAcceptorMrg.bindInnerSyncRpcPort(true); HostAndPort httpHostAndPort = innerAcceptorMrg.bindInnerHttpPort(); // 注册到zk String parentPath= ZKPathUtils.onlineParentPath(centerWorldInfoMrg.getWarzoneId()); String nodeName= ZKPathUtils.buildCenterNodeName(centerWorldInfoMrg.getPlatformType(), centerWorldInfoMrg.getServerId()); CenterNodeData centerNodeData =new CenterNodeData(tcpHostAndPort.toString(), syncRpcHostAndPort.toString(), httpHostAndPort.toString(), centerWorldInfoMrg.getProcessGuid()); final String path = ZKPaths.makePath(parentPath, nodeName); curatorMrg.waitForNodeDelete(path); final byte[] initData = GameUtils.serializeToJsonBytes(centerNodeData); ConcurrentUtils.awaitRemoteWithSleepingRetry(path,resource -> { return curatorMrg.createNodeIfAbsent(path,CreateMode.EPHEMERAL,initData); },3, TimeUnit.SECONDS); } @Override protected void tickHook() { centerDiscoverMrg.tick(); } @Override protected void shutdownHook() { centerDiscoverMrg.shutdown(); } }
java
Human Rights defender and tribal activist Father Stan Swamy, who was imprisoned in the Bhima Koregaon case, passed away today at 1. 30 PM. He was 84. Stan Sway was arrested from his home in Ranchi on 8th October 2020 in Bhima Koregaon case. In all these months, the case has not been put on trial and there was no evidence to link him to Bhima Koregaon case. He has not even part of Elgar parishad programme. He was suffering from Parkinson’s disease and was struggling to even drink water. The police did not even allow to have a sipper to him despite several pleas from friends and activists. He was admitted to hospital last night and was put on ventilator. The information about his death was told by Swamy’s counsel to the Bombay High Court, which was hearing his application for bail on medical grounds. They have the blood of an innocent man on their hands. May Fr. Stan Swamy's soul rest in peace. As the bench comprising Justices SS Shinde and NJ Jamadar took up Stan Swamy’s bail application at around 2. 30 PM, Senior Advocate Mihir Desai, his counsel, said that the doctor who was treating the jailed Jesuit priest wanted to say something. “It is with a very heavy heart I have to inform you that Father Stan Swamy has passed away”, Dr. Dsouza of Holy Family hospital Mumbai, where Stan Swamy was admitted for treatment, told the bench. “On Saturday he went into cardiac arrest at 4. 30 am, we couldn’t revive him”, the doctor added. “With all humility at our command, we are sorry to know that he has passed away. We are shocked. We passed orders for his hospital admission on the first day”, the bench observed. The Court has also directed the State to produce all medical records of Stan Swamy before the court on 13th July when the matter will be heard since Swamy’s lawyer MihirDesai alleged negligence at the hands of the state during Swamy’s stay in Taloja Jail. Furthermore, it has directed that an inquiry under provisions of Sec 176(1)(A) Cr. P. C may be followed since the death has occurred in judicial custody & the post mortem shall follow all required protocols in such custodial deaths. Stan Swamy was born in 1937 in Trichy, Tamil Nadu. He became a Jesuit at a young age and in 1957 decided to devote his life to the underprivileged and marginalised. He spent his life working on the rights of Adivasis and Dalit-Bahujans. Stan Swamy has been working for the constitutional rights of Adivasis over water, forest, and land for the last three decades. He has done incredible research work on displacement, looting of natural resources by corporates, and the condition of prisoners under consideration. He has been vigorously raising his voice against anti-people amendments made in 2016 by the BJP government of Jharkhand in the CNT-SPT Act and the Land Acquisition Act. He also strongly opposed the BJP’s Raghubar Das government’s policy of handing over the land in the land bank to the corporate. He has been pushing for the implementation of the 5th Schedule of the Constitution and the PESA Act. Swamy has also raised his voice against issues like hunger deaths, problems with the Aadhar card, and communal violence. He was among the founding members of the ‘Anti-Displacement Mass Development Movement’. They have been working for the release of Adivasis who have been jailed and extending solidarity, and bringing attention to Adivasi movements that have been made illegitimate through the label “Maoist”. Though he states he has never been to Bhima Koregaon, Stan Swamy was arrested from his home in Ranchi on Thursday evening, 8th October 2020, and taken to Mumbai where he was produced before a court the next day.
english
if (!process.env.NODE_ENV) process.env.NODE_ENV = 'development'; if (!process.env.SERVER_HOST) process.env.SERVER_HOST = 'localhost'; if (!process.env.SERVER_PORT) process.env.SERVER_PORT = 3000; const express = require('express'); const webpack = require('webpack'); const webpackDevMiddleware = require('webpack-dev-middleware'); const webpackHotMiddleware = require('webpack-hot-middleware'); const webpackHotServerMiddleware = require('webpack-hot-server-middleware'); const reactLoadableStats = require('../client/development/react.loadable.development.stats.webpack.json'); const webpackClientConfig = require('../config/webpack/client.config')({ dev: true, }); const webpackServerConfig = require('../config/webpack/server.config')({ dev: true, }); const webpackCompiler = webpack([webpackClientConfig, webpackServerConfig]); const [webpackClientCompiler] = webpackCompiler.compilers; const server = express(); server.disable('x-powered-by'); server.use(webpackDevMiddleware(webpackCompiler)); server.use(webpackHotMiddleware(webpackClientCompiler)); server.use( webpackHotServerMiddleware(webpackCompiler, { serverRendererOptions: { reactLoadableStats }, }), ); let BUILD_COMPLETE = false; webpackCompiler.plugin( 'done', () => !BUILD_COMPLETE && server.listen(process.env.SERVER_PORT, (error) => { if (error) { console.error(error); } else { BUILD_COMPLETE = true; console.log( `Server listening at http://${process.env.SERVER_HOST}:${ process.env.SERVER_PORT }`, ); } }), );
javascript
<reponame>fischerq/skilltrees import CyEditor from '../src' export default { name: 'CyEditor', props: { value: { type: Object, default: () => ({ boxSelectionEnabled: true, elements: null, pan: { x: 0, y: 0 }, panningEnabled: true, userPanningEnabled: true, userZoomingEnabled: true, zoom: 1, zoomingEnabled: true }) }, cyConfig: { type: Object, default: () => ({}) }, editorConfig: { type: Object, default: () => ({}) } }, mounted () { const container = this.$el let config = { cy: { ...this.cyConfig }, editor: { container, ...this.editorConfig } } this.cyEditor = new CyEditor(config) this.cyEditor.json(this.value) this.cyEditor.on('change', (scope, editor) => { // let json = this.cyEditor.json() }) }, render (h) { return h('div') } }
javascript
While every effort has been made to follow citation style rules, there may be some discrepancies. Please refer to the appropriate style manual or other sources if you have any questions. Our editors will review what you’ve submitted and determine whether to revise the article. Saint Thomas, city, seat of Elgin county, southeastern Ontario, Canada, on Kettle Creek, just north of Lake Erie. Founded in 1817 as Sterling, it was renamed after Colonel Thomas Talbot, who made it the capital of the extensive settlement that he founded in 1803. A major railway division point and terminal centre, midway between Detroit, Michigan, and Buffalo, New York, and south of London, Ontario, the city is also an important industrial centre. Manufactures include automotive parts, power tools, construction machinery, pet supplies, bearings, and pipes. Pop. (2006) 36,110; (2011) 37,905.
english
<reponame>Esri/ember-animated-status-label .animated-status-label { display: inline-block; }
css
Jaipur: In Rajasthan's Bharatpur, the wife who killed her husband along with her lover often used to watch Crime Patrol. There have been many surprising revelations in the police investigation in the Pawan murder case. According to the report, Pawan Sharma had gone missing since the night of 29 May. Anjana, sister of the deceased Pawan, had told that sister-in-law Reema only watches Crime Patrol on TV and does not allow anyone to enter her room. Even after killing Pawan on May 29, the sister-in-law was living in a normal way. There was no hesitation, shame, or fear on the face. According to the report, Reema also observed Bad Amavasya and Karva Chauth fast on May 30 for her husband's long life. After 16 adornments, filled vermilion in the forehead and made kheer puri at home, and fed it to the family members. During her stay in the house, Reema did not let anyone doubt her. On October 13 also, the accused wife kept Karva Chauth fast for the long life of her husband. Harprasad, the father of the deceased, said that after Pawan went missing on May 29, daughter-in-law Reema kept preventing him from registering a case with the police. She tells the family members that Pawan will be trapped by registering a case with the police. According to the report, no trace of Pawan was found even after the search of the family members. At last, Harprasad filed a missing report of his son at the Chiksana police station. The police registered a missing report and started an investigation. During the investigation, on October 16, lover Bhagendra alias Bhola reached at night to meet his girlfriend Reema. Harprasad Sharma got suspicious when the sound came from Reema's room. On peeping, the father of the missing Pawan saw Bhagendra and Reema in an objectionable position. Both were saying that even after months of the incident, no one suspected anything and nothing will happen in the future. After listening to the lover-girlfriend, Harprasad silently locked the room from the outside. After getting locked from outside, the lover called his father. The lover's father took out Bhagendra alias Bhola after fighting with the family members. After this incident, Harprasad expressed suspicion to the police on both of them. Police strictly interrogated the lover and girlfriend in custody after Harprasad expressed suspicion. During interrogation, both confessed their crime. They told the police during interrogation that on the night of May 29, when both of them were together, Pawan had woken up. On waking up, Pawan protested after finding both of them together. On protesting, the wife and lover strangled the husband to death. After this, Pawan's dead body was buried in a nearby canal. Deep Singh, a friend of lover Bhagendra was also involved in killing her husband. It has been told that Deep Singh is a resident of the Etah district of Uttar Pradesh. Deep Singh had helped in disposing of Pawan's dead body. Police are also interrogating Deep Singh. Earlier, the Chiksana police had arrested lover Bhagendra and his wife while solving the mystery of the murder.
english
<reponame>senjyouhara/ra-lib import path from 'path'; import fs from 'fs'; const packagesPath = path.join(__dirname, 'packages'); let packageNames = fs.readdirSync(packagesPath).filter(item => !item.startsWith('.')); const ignorePackages = [ 'util', 'hooks', 'admin', 'init', 'rancher-deploy', ]; packageNames = packageNames.filter(name => !ignorePackages.includes(name)); export default { cjs: { type: 'babel', lazy: true }, esm: { type: 'babel', importLibToEs: true, }, pkgs: [ 'util', 'hooks', ...packageNames, 'admin', ], };
typescript
Scoble: AppleTV "left the door open to its competitors" Does Apple go around leaving doors open to its competitors? Does Apple go around leaving doors open to its competitors? If Kinect really does taking motion sensing to a new level, Microsoft could reinvent TV in a way that Google or Apple hasn't been able to. The new Edge browser has been marketed very aggressively. In an oddly aggressive move, Apple seems to have begun to react and defend Safari. What we're seeing from Microsoft today didn't happen in five short weeks, but there are plenty of things the company's new CEO deserves credit for. Reports suggest that Microsoft is planning a new assault on the living room with an Xbox-branded set-top box, but players such as Apple and Google are unlikely to give up without a fight. Why is Microsoft launching a $99 Xbox 360/Kinect/subscription bundle now? Here are a few theories. Controlling Netflix on an Xbox 360 can be done hands-free now if you have a Kinect set up too. Microsoft recently shook-up its Entertainment & Devices division in an attempt to jump start its device efforts and pose better competition to Apple and Google. Here are five suggestions as to what they should focus on next.
english
Preeti Jhangiani, who is one of the heroines of Appa Rao Driving School, is playing a quiet role in the film. But she has always been doing demure kind of characters in Telugu. Her ÂboldnessÂ, however, is seen in Hindi. Preeti Jhangiani is hot and sexy in Bollywood. In her next film Chaahat - Ek Nasha due for release, Preeti has shot one of the longest love scenes in Hindi films. Follow us on Google News and stay updated with the latest!
english
package com.example.iumclient.pages.startup; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.animation.AccelerateDecelerateInterpolator; import android.view.animation.BounceInterpolator; import android.view.animation.OvershootInterpolator; import android.widget.ImageView; import com.example.iumclient.R; import com.example.iumclient.pages.mainpage.MainPageView; import com.example.iumclient.util.ApplicationStorage; import com.example.iumclient.util.GlobalApplication; import java.util.Timer; import java.util.TimerTask; import butterknife.BindView; import butterknife.ButterKnife; public class StartupView extends AppCompatActivity { @BindView(R.id.startup_logo) ImageView logo; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.startup_view); ButterKnife.bind(this); // Start the MainPage activity Intent activityToStart = new Intent(GlobalApplication.getAppContext(), MainPageView.class); activityToStart.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); logo.animate() .scaleX(1.8f) .scaleY(1.8f) .setInterpolator(new OvershootInterpolator()) .setDuration(1000); new Timer().schedule(new TimerTask() { @Override public void run() { startActivity(activityToStart); finish(); } }, 1500); } }
java
import os import json import base64 import lzma import black import urllib from flask import Flask, render_template, request, redirect, url_for, jsonify from flask_cors import cross_origin BASE_URL = "https://black.now.sh" BLACK_VERSION = os.getenv("BLACK_VERSION") def get_black_version(): lockfile = json.load(open("./Pipfile.lock")) package = lockfile["default"]["black"] version = package.get("version") ref = package.get("ref") if version: return version.lstrip("==") if ref: return ref[0:6] app = Flask(__name__) black_version = get_black_version() def compress_state(data): compressed = lzma.compress(json.dumps(data).encode("utf-8")) return base64.urlsafe_b64encode(compressed).decode("utf-8") def decompress_state(state): compressed = base64.urlsafe_b64decode(state) return json.loads(lzma.decompress(compressed)) def format_code(source, configuration): try: mode = black.FileMode(**configuration) formatted = black.format_str(source, mode=mode) except Exception as exc: formatted = f"{exc}" return formatted @app.route("/", methods=["POST", "GET"]) @cross_origin() def index(): if request.method == "POST": data = request.get_json() source = data.get("source") options = data.get("options", {}) line_length = int(options.get("line_length", 88)) skip_string_normalization = bool( options.get("skip_string_normalization", False) ) py36 = bool(options.get("py36", False)) pyi = bool(options.get("pyi", False)) else: state = request.args.get("state") if state: state = decompress_state(state) source = state.get("sc") line_length = state.get("ll") skip_string_normalization = state.get("ssn") py36 = state.get("py36") pyi = state.get("pyi") else: source = render_template("source.py") line_length = 88 skip_string_normalization = False py36 = False pyi = False formatted = format_code( source, configuration={ "target_versions": black.PY36_VERSIONS if py36 else set(), "line_length": line_length, "is_pyi": pyi, "string_normalization": not skip_string_normalization }, ) state = compress_state( { "sc": source, "ll": line_length, "ssn": skip_string_normalization, "py36": py36, "pyi": pyi, } ) options = [f"`--line-length={line_length}`"] if skip_string_normalization: options.append("`--skip-string-normalization`") if py36: options.append("`--py36`") if pyi: options.append("`--pyi`") if BLACK_VERSION == "stable": version = f"v{black_version}" else: version = f"https://github.com/python/black/commit/{black_version}" issue_data = { "source_code": source, "formatted_code": formatted, "options": "\n".join(options), "version": version, "playground_link": f"{BASE_URL}/?version={BLACK_VERSION}&state={state}", } issue_body = urllib.parse.quote_plus(render_template("issue.md", **issue_data)) issue_link = f"https://github.com/python/black/issues/new?body={issue_body}" return jsonify( { "source_code": source, "formatted_code": formatted, "options": { "line_length": line_length, "skip_string_normalization": skip_string_normalization, "py36": py36, "pyi": pyi, }, "state": state, "issue_link": issue_link, "version": black_version, } ) @app.route("/version", methods=["GET"]) @cross_origin() def version(): return jsonify({"version": black_version}) if __name__ == "__main__": app.run(debug=True)
python
<gh_stars>0 { "author": { "name": "<NAME>", "email": "<EMAIL>", "url": "http://github.com/interlock" }, "contributors": [ { "name": "<NAME>", "email": "<EMAIL>", "url": "http://github.com/davemo" }, { "name": "<NAME>", "email": "<EMAIL>", "url": "https://github.com/wlaurance" } ], "name": "express-ember-handlebars", "description": "express middleware for ember handlebars based on https://github.com/interlock/connect-handlebars", "version": "0.0.4", "repository": { "type": "git", "url": "git://github.com/wlaurance/express-ember-handlebars" }, "keywords": [ "Handlebars", "Express", "middleware" ], "homepage": "http://github.com/wlaurance/express-ember-handlebars", "bugs": { "url": "https://github.com/wlaurance/express-ember-handlebars/issues" }, "main": "lib/express-handlebars.js", "engines": { "node": "*" }, "licenses": [ { "type": "MIT", "url": "https://github.com/wlaurance/express-ember-handlebars/blob/master/LICENSE" } ] }
json
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.parquet.cli.commands; import com.beust.jcommander.Parameter; import com.beust.jcommander.Parameters; import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import org.apache.parquet.cli.BaseCommand; import org.apache.parquet.cli.util.Formats; import org.apache.avro.file.SeekableInput; import org.apache.hadoop.fs.Path; import org.apache.parquet.format.converter.ParquetMetadataConverter; import org.apache.parquet.hadoop.ParquetFileReader; import org.slf4j.Logger; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.charset.StandardCharsets; import java.util.List; @Parameters(commandDescription="Print the Avro schema for a file") public class SchemaCommand extends BaseCommand { public SchemaCommand(Logger console) { super(console); } @Parameter(description = "<parquet path>") List<String> targets; @Parameter( names={"-o", "--output"}, description="Output file path") String outputPath = null; @Parameter( names={"--overwrite"}, description="Overwrite the output file if it exists") boolean overwrite = false; @Parameter( names={"--parquet"}, description="Print a Parquet schema, without converting to Avro", hidden=true) boolean parquetSchema = false; @Override @SuppressWarnings("unchecked") public int run() throws IOException { Preconditions.checkArgument(targets != null && targets.size() == 1, "Parquet file is required."); if (targets.size() > 1) { Preconditions.checkArgument(outputPath == null, "Cannot output multiple schemas to file " + outputPath); for (String source : targets) { console.info("{}: {}", source, getSchema(source)); } } else { String source = targets.get(0); if (outputPath != null) { try (OutputStream out = overwrite ? create(outputPath) : createWithNoOverwrite(outputPath)) { out.write(getSchema(source).getBytes(StandardCharsets.UTF_8)); } } else { console.info(getSchema(source)); } } return 0; } @Override public List<String> getExamples() { return Lists.newArrayList( "# Print the Avro schema for a Parquet file", "sample.parquet", "# Print the Avro schema for an Avro file", "sample.avro", "# Print the Avro schema for a JSON file", "sample.json" ); } private String getSchema(String source) throws IOException { if (parquetSchema) { return getParquetSchema(source); } else { return getAvroSchema(source).toString(true); } } private String getParquetSchema(String source) throws IOException { Formats.Format format; try (SeekableInput in = openSeekable(source)) { format = Formats.detectFormat((InputStream) in); in.seek(0); switch (format) { case PARQUET: try (ParquetFileReader reader = new ParquetFileReader( getConf(), qualifiedPath(source), ParquetMetadataConverter.NO_FILTER)) { return reader.getFileMetaData().getSchema().toString(); } default: throw new IllegalArgumentException(String.format( "Could not get a Parquet schema for format %s: %s", format, source)); } } } }
java
<filename>CarreGameEngine/Documentation/Doxygen/html/_definitions_8h-source.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Assignment2 - OOber Taxi: C:/Users/New/Documents/Games_Technology/Year4_Semester1/ICT397/~My Work/Assignment2/ICT397Carre/CarreGameEngine/CarreGameEngine/Animation/Definitions.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main&nbsp;Page</span></a></li> <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <h1>C:/Users/New/Documents/Games_Technology/Year4_Semester1/ICT397/~My Work/Assignment2/ICT397Carre/CarreGameEngine/CarreGameEngine/Animation/Definitions.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// $Id: $</span> <a name="l00002"></a>00002 <span class="comment">//</span> <a name="l00003"></a>00003 <span class="comment">// Author: <NAME> <EMAIL></span> <a name="l00004"></a>00004 <span class="comment">//</span> <a name="l00005"></a>00005 <span class="comment">// Complete history on bottom of file</span> <a name="l00006"></a>00006 <a name="l00007"></a>00007 <span class="preprocessor">#ifndef Definitions_H</span> <a name="l00008"></a>00008 <span class="preprocessor"></span><span class="preprocessor">#define Definitions_H</span> <a name="l00009"></a>00009 <span class="preprocessor"></span> <a name="l00010"></a>00010 <span class="preprocessor">#include "glm/glm.hpp"</span> <span class="comment">// glm::vec3, glm::vec4, glm::ivec4, glm::mat4</span> <a name="l00011"></a>00011 <span class="preprocessor">#include "glm/gtc/matrix_transform.hpp"</span> <span class="comment">// glm::translate, glm::rotate, glm::scale, glm::perspective</span> <a name="l00012"></a>00012 <span class="preprocessor">#include "glm/gtc/type_ptr.hpp"</span> <span class="comment">// glm::value_ptr</span> <a name="l00013"></a>00013 <span class="preprocessor">#include "glm/gtx/transform2.hpp"</span> <span class="comment">// for glm::lookAt</span> <a name="l00014"></a>00014 <span class="preprocessor">#include "GL/glew.h"</span> <a name="l00015"></a>00015 <span class="preprocessor">#include "<a class="code" href="glfw3_8h.html" title="The header of the GLFW 3 API.">GLFW/glfw3.h</a>"</span> <a name="l00016"></a>00016 <span class="comment">//#include "FreeImage/FreeImage.h"</span> <a name="l00017"></a>00017 <a name="l00018"></a>00018 <span class="preprocessor">#define MAX_NUM_LIGHTS 5</span> <a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define MAX_RAY 128</span> <a name="l00020"></a>00020 <span class="preprocessor"></span> <a name="l00021"></a>00021 <a name="l00022"></a>00022 <span class="preprocessor">#define BUFFER_OFFSET(i) (reinterpret_cast&lt;void*&gt;(i))</span> <a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define WORLD_COORD_LOCATION 0</span> <a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define NORMAL_COORD_LOCATION 1</span> <a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define TEXTURE_COORD_LOCATION 2</span> <a name="l00026"></a>00026 <span class="preprocessor"></span> <a name="l00027"></a>00027 <a name="l00028"></a>00028 <a name="l00029"></a>00029 <span class="preprocessor">#endif //Definitions_H</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Fri Jun 1 12:56:44 2018 for Assignment2 - OOber Taxi by&nbsp; <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>
html
<gh_stars>1-10 { "database_type" : "mysql", "database_url" : "jdbc:mysql://localhost:3306/mysqldb", "username" : "root", "password" : "", "upload_code" : "9O186I9W3JVXL3BIHERL", "upload_url" : "http://localhost:8000/new_result/", "workload_name" : "workload_name" }
json
<reponame>kckern/IsaiahExplorer { "id": 10729, "source": "bullinger", "verse_id": 18946, "verse_count": 1, "reference": "66:23", "title": "", "html": " <p> <em>new moon. sabbath. <\/em> Reference to Pentateuch. and the law concerning them (<a class=\"ref\">Numbers 10:10; Numbers 28:11-15<\/a>). App-92. Compare <a class=\"ref\">Psalms 81:3, Psalms 81:4<\/a>. <\/p> \n\n <p> <em>before Me. <\/em> Reference to Pentateuch, implying centralized worship, as in <a class=\"ref\">Exodus 20:3, Exodus 20:5. Deuteronomy 26:3, Deuteronomy 26:5<\/a>. App-92. Compare <a class=\"isa\" verses=\"WzE3NjY3XQ==\">Isaiah 1:12<\/a>. <\/p> ", "audit": null }
json
{ "MedlemskapInfoPanel.Medlemskap": "Medlemskap", "ArbeidsforholdInfoPanel.Title": "Arbeidsforhold", "OmPleietrengende.Titel": "Om pleietrengende", "BeregningInfoPanel.Title": "Beregning", "LivetsSluttfasePanel.LivetsSluttfase": "Livets sluttfase", "InntektOgYtelser.Title": "Inntekt og ytelser", "MainSideMenu.Heading": "Saksopplysninger", "OpptjeningInfoPanel.KontrollerFaktaForOpptjening": "Opptjening", "InntektsmeldingInfoPanel.Title": "Inntektsmelding", "Behandlingspunkt.LivetsSluttfase": "Livets sluttfase", "Behandlingspunkt.Inngangsvilkar": "Inngangsvilkår", "Behandlingspunkt.InngangsvilkarForts": "Inngangsvilkår Fortsettelse", "Behandlingspunkt.Beregning": "Beregning", "Behandlingspunkt.Uttak": "Uttak", "Behandlingspunkt.Vedtak": "Vedtak", "Behandlingspunkt.TilkjentYtelse": "Tilkjent ytelse", "Behandlingspunkt.Soknadsfristvilkaret": "Søknadsfrist", "Behandlingspunkt.Avregning": "Simulering", "ProsessStegIkkeBehandletPanel.IkkeBehandlet": "Dette steget er ikke behandlet", "OmPleietrengendeInfoPanel.Title": "Om pleietrengende", "FatterVedtakStatusModal.SendtBeslutter": "Forslag til vedtak er sendt til beslutter", "FatterVedtakStatusModal.ModalDescriptionPleiepenger": "Pleiepenger i livets sluttfase er avslått.", "FatterVedtakStatusModal.GoToSearchPage": "Du kommer nå til forsiden.", "FatterVedtakStatusModal.Ok": "OK", "IverksetterVedtakStatusModal.Innvilget": "Innvilget", "IverksetterVedtakStatusModal.Ok": "Ok", "HelpText.Aksjonspunkt": "Aksjonspunkt", "SoknadsperioderPanel.Soknadsperioder": "Søknadsperioder" }
json
package com.example.apispringboot.exceptions; import lombok.AllArgsConstructor; import lombok.Getter; import java.util.List; @Getter @AllArgsConstructor public class ErrorResponse { private final String message; private final int code; private final String status; private final String objectName; private final List<ErrorObject> errors; }
java
{ "id": 20528, "citation_title": "The Value of Postsecondary Credentials in the Labor Market: An Experimental Study", "citation_author": [ "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>" ], "citation_publication_date": "2014-09-25", "issue_date": "2014-09-25", "revision_date": "2016-01-26", "topics": [ "Health, Education, and Welfare", "Education", "Labor Economics", "Labor Supply and Demand" ], "program": [ "Development of the American Economy", "Economics of Education", "Labor Studies" ], "projects": null, "working_groups": null, "abstract": "\n\nWe study employers\u2019 perceptions of the value of postsecondary degrees using a field experiment. We randomly assign the sector and selectivity of institutions to fictitious resumes and apply to real vacancy postings for business and health jobs on a large online job board. We find that a business bachelor\u2019s degree from a for-profit \u201conline\u201d institution is 22 percent less likely to receive a callback than one from a non-selective public institution. In applications to health jobs, we find that for-profit credentials receive fewer callbacks unless the job requires an external quality indicator such as an occupational license.\n\n", "acknowledgement": "\nThis research is supported in part by the Institute of Education Sciences, U.S. Department of Education, through Grant R305C110011 to Teachers College, Columbia University. We thank <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME> and <NAME> for superb research assistance. We also thank seminar participants at Harvard University, NYU, Princeton University, UC-Santa Barbara and the NBER Summer Institute for helpful feedback. The authors declare that they have no relevant or material financial interests that relate to the research described in this paper. The views expressed herein are those of the authors and do not necessarily reflect the views of the National Bureau of Economic Research.\n\n\n\n<NAME>\n\nThis research is supported in part by the Institute of Education Sciences, U.S. Department of Education, through Grant R305C110011 to Teachers College, Columbia University and the Center for Analysis of Postsecondary Education and Employment (CAPSEE). This study has been approved by the Harvard IRB (IRB13-1856) and was submitted to the American Economic Association Randomized Controlled Trial Registry on March 30, 2014.\n\n\n\n<NAME>\n\nI am a member of the Board of Trustees of the Russell Sage Foundation, the Board of Directors of the Manpower Demonstration Research Corporation, and the Panel of Economic Advisers of the Congressional Budget Office.\n\n\n" }
json
The Ranveer Singh starrer has earned a whopping Rs 150. 81 crore in its first week. Rohit Shetty has yet again proved that he undoubtedly understands the pulse of his audience well. The cop drama, also starring Sara Ali Khan in a lead role, made Rs 20. 72 crore on the opening day itself and crossed Rs 50 crore mark in just three days. It also reached the milestone of Rs 100 crore within five days of its release. And now, the film has crossed Rs 150 crore mark. In his another tweet, he also shared that the Ranveer starrer might also earn Rs 200 crore soon. “#Simmba benchmarks…Crossed ₹ 50 cr: Day 3 ₹ 100 cr: Day 5 ₹ 150 cr: Day 7 With no major release today, #Simmba is sure to dominate the marketplace… ₹ 200 cr mark is definitely within reach… Can even touch ₹ 250 cr, depending on how it trends from next week [11 Jan],” he wrote. #Simmba roars and scores at the BO… Crosses ₹ 150 cr mark in Week 1… Glowing word of mouth has converted into footfalls… Fri 20. 72 cr, Sat 23. 33 cr, Sun 31. 06 cr, Mon 21. 24 cr, Tue 28. 19 cr, Wed 14. 49 cr, Thu 11. 78 cr. Total: ₹ 150. 81 cr. India biz. SUPER HIT. With no major release today, #Simmba is sure to dominate the marketplace… ₹ 200 cr mark is definitely within reach… Can even touch ₹ 250 cr, depending on how it trends from next week [11 Jan]. The film has however received mixed reviews from the movie critics. “It was not an easy role to pull off, but I put my head down and put in the work and I am overwhelmed with the love that has been poured on Simmba. Rohit has an incredible hit ratio and he has hit Simmba out of the park. The success of the film belongs to him and his phenomenal team who are there for him and beside him at all times,” he added. Ranveer has four Rs 100 crore movies in his kitty. His last movie, Padmaavat was also a massive hit. Simmba is Sara’s second movie following Kedarnath. From the looks of it, the action-packed cop drama will only continue to soar high in the coming days. Click for more updates and latest Bollywood news along with Entertainment updates. Also get latest news and top headlines from India and around the world at The Indian Express.
english
<reponame>shunfei/indexr package io.indexr.server.rt.fetcher; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.commons.lang.RandomStringUtils; import java.io.IOException; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Random; import io.indexr.segment.ColumnSchema; import io.indexr.segment.SegmentSchema; import io.indexr.segment.rt.Fetcher; import io.indexr.segment.rt.UTF8JsonRowCreator; import io.indexr.segment.rt.UTF8Row; import io.indexr.util.DateTimeUtil; import io.indexr.util.Strings; public class TestFetcher implements Fetcher { private static final DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("yyyyMMddHH"); @JsonProperty("sleep") public final long sleep; @JsonProperty("random") public final boolean randomValue; @JsonProperty("tag.field") public final String tagField; @JsonProperty("random.tags") public final List<String> randomTags; private SegmentSchema schema; private Random random = new Random(); private final UTF8JsonRowCreator utf8JsonRowCreator = new UTF8JsonRowCreator(true); private volatile boolean closed = false; //private static long v = 0; @JsonCreator public TestFetcher(@JsonProperty("sleep") long sleep, @JsonProperty("random") boolean randomValue, @JsonProperty("tag.field") String tagField, @JsonProperty("random.tags") List<String> randomTags) { this.sleep = sleep; this.randomValue = randomValue; this.tagField = tagField; this.randomTags = randomTags; } @Override public void setRowCreator(String name, UTF8Row.Creator rowCreator) { utf8JsonRowCreator.setRowCreator(name, rowCreator); } @Override public boolean ensure(SegmentSchema schema) throws Exception { this.schema = schema; closed = false; return true; } @Override public boolean hasNext() throws Exception { return !closed; } @Override public List<UTF8Row> next() throws Exception { if (sleep > 0) { Thread.sleep(sleep); } int colId = 0; StringBuilder sb = new StringBuilder(); sb.append('{'); if (!Strings.isEmpty(tagField) && randomTags != null && !randomTags.isEmpty()) { sb.append("\"").append(tagField).append("\":\"").append(randomTags.get(random.nextInt(randomTags.size()))).append("\","); } for (ColumnSchema cs : schema.getColumns()) { sb.append('\"').append(cs.getName()).append("\": "); switch (cs.getSqlType()) { case DATE: LocalDate date = LocalDate.now(); sb.append('\"').append(date.format(DateTimeUtil.DATE_FORMATTER)).append('\"'); break; case TIME: LocalTime time = LocalTime.now(); sb.append('\"').append(time.format(DateTimeUtil.TIME_FORMATTER)).append('\"'); break; case DATETIME: LocalDateTime dateTime = LocalDateTime.now(); sb.append('\"').append(dateTime.format(DateTimeUtil.DATETIME_FORMATTER)).append('\"'); break; case VARCHAR: if (randomValue) { String colValue = RandomStringUtils.randomAlphabetic(random.nextInt(20)); sb.append('\"').append(colValue).append('\"'); } else { sb.append("\"1\""); } break; default: if (randomValue) { sb.append(random.nextInt()); } else { sb.append(1); } } colId++; if (colId < schema.getColumns().size()) { sb.append(','); } } sb.append('}'); byte[] data = sb.toString().getBytes("utf-8"); return utf8JsonRowCreator.create(data); } @Override public void commit() { } @Override public void close() throws IOException { closed = true; } @Override public boolean equals(Fetcher o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TestFetcher that = (TestFetcher) o; if (sleep != that.sleep) return false; if (randomValue != that.randomValue) return false; if (tagField != null ? !tagField.equals(that.tagField) : that.tagField != null) return false; return randomTags != null ? randomTags.equals(that.randomTags) : that.randomTags == null; } @Override public String toString() { return "TestFetcher{" + "sleep=" + sleep + ", randomValue=" + randomValue + '}'; } @Override public long statConsume() { return utf8JsonRowCreator.getConsumeCount(); } @Override public long statProduce() { return utf8JsonRowCreator.getProduceCount(); } @Override public long statIgnore() { return utf8JsonRowCreator.getIgnoreCount(); } @Override public long statFail() { return utf8JsonRowCreator.getFailCount(); } @Override public void statReset() { utf8JsonRowCreator.resetStat(); } }
java
// INSERT COMMON CODE HERE /* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ _.pt = "StopIteration" in _.A ? _.A.StopIteration : { message: "StopIteration", stack: "" }; _.qt = function() {}; _.qt.prototype.next = function() { throw _.pt; }; _.qt.prototype.Ai = function() { return this }; /* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ _.rt = function(a, b) { this.Ha = {}; this.Qb = []; this.Js = this.Wb = 0; var c = arguments.length; if (1 < c) { if (c % 2) throw Error("f"); for (var d = 0; d < c; d += 2) this.set(arguments[d], arguments[d + 1]) } else a && this.addAll(a) }; _.h = _.rt.prototype; _.h.Hb = function() { return this.Wb }; _.h.Xc = function() { st(this); for (var a = [], b = 0; b < this.Qb.length; b++) a.push(this.Ha[this.Qb[b]]); return a }; _.h.Ae = function() { st(this); return this.Qb.concat() }; _.h.Ud = function(a) { return _.tt(this.Ha, a) }; _.h.Sj = _.ja(9); _.h.equals = function(a, b) { if (this === a) return !0; if (this.Wb != a.Hb()) return !1; b = b || ut; st(this); for (var c, d = 0; c = this.Qb[d]; d++) if (!b(this.get(c), a.get(c))) return !1; return !0 }; var ut = function(a, b) { return a === b }; _.rt.prototype.isEmpty = function() { return 0 == this.Wb }; _.rt.prototype.clear = function() { this.Ha = {}; this.Js = this.Wb = this.Qb.length = 0 }; _.rt.prototype.remove = function(a) { return _.tt(this.Ha, a) ? (delete this.Ha[a], this.Wb--, this.Js++, this.Qb.length > 2 * this.Wb && st(this), !0) : !1 }; var st = function(a) { if (a.Wb != a.Qb.length) { for (var b = 0, c = 0; b < a.Qb.length;) { var d = a.Qb[b]; _.tt(a.Ha, d) && (a.Qb[c++] = d); b++ } a.Qb.length = c } if (a.Wb != a.Qb.length) { var e = {}; for (c = b = 0; b < a.Qb.length;) d = a.Qb[b], _.tt(e, d) || (a.Qb[c++] = d, e[d] = 1), b++; a.Qb.length = c } }; _.h = _.rt.prototype; _.h.get = function(a, b) { return _.tt(this.Ha, a) ? this.Ha[a] : b }; _.h.set = function(a, b) { _.tt(this.Ha, a) || (this.Wb++, this.Qb.push(a), this.Js++); this.Ha[a] = b }; _.h.addAll = function(a) { if (a instanceof _.rt) for (var b = a.Ae(), c = 0; c < b.length; c++) this.set(b[c], a.get(b[c])); else for (b in a) this.set(b, a[b]) }; _.h.forEach = function(a, b) { for (var c = this.Ae(), d = 0; d < c.length; d++) { var e = c[d], f = this.get(e); a.call(b, f, e, this) } }; _.h.clone = function() { return new _.rt(this) }; _.h.Ai = function(a) { st(this); var b = 0, c = this.Js, d = this, e = new _.qt; e.next = function() { if (c != d.Js) throw Error("I"); if (b >= d.Qb.length) throw _.pt; var f = d.Qb[b++]; return a ? f : d.Ha[f] }; return e }; _.tt = function(a, b) { return Object.prototype.hasOwnProperty.call(a, b) }; /* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ _.vt = function(a) { var b = [], c = 0, d; for (d in a) b[c++] = a[d]; return b }; _.wt = function(a) { var b = [], c = 0, d; for (d in a) b[c++] = d; return b }; _.xt = function(a) { if (a.Xc && "function" == typeof a.Xc) return a.Xc(); if ("string" === typeof a) return a.split(""); if (_.hb(a)) { for (var b = [], c = a.length, d = 0; d < c; d++) b.push(a[d]); return b } return _.vt(a) }; _.yt = function(a) { if (a.Ae && "function" == typeof a.Ae) return a.Ae(); if (!a.Xc || "function" != typeof a.Xc) { if (_.hb(a) || "string" === typeof a) { var b = []; a = a.length; for (var c = 0; c < a; c++) b.push(c); return b } return _.wt(a) } }; _.zt = function(a, b, c) { if (a.forEach && "function" == typeof a.forEach) a.forEach(b, c); else if (_.hb(a) || "string" === typeof a) _.ob(a, b, c); else for (var d = _.yt(a), e = _.xt(a), f = e.length, g = 0; g < f; g++) b.call(c, e[g], d && d[g], a) }; /* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var zx = function() {}; zx.prototype.DG = null; zx.prototype.getOptions = function() { var a; (a = this.DG) || (a = {}, _.Ax(this) && (a[0] = !0, a[1] = !0), a = this.DG = a); return a }; var Cx; Cx = function() {}; _.K(Cx, zx); _.Ax = function(a) { if (!a.JJ && "undefined" == typeof XMLHttpRequest && "undefined" != typeof ActiveXObject) { for (var b = ["MSXML2.XMLHTTP.6.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"], c = 0; c < b.length; c++) { var d = b[c]; try { return new ActiveXObject(d), a.JJ = d } catch (e) {} } throw Error("ka"); } return a.JJ }; _.Bx = new Cx; /* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ _.Dx = function(a, b) { var c = {}, d; for (d in a) b.call(void 0, a[d], d, a) && (c[d] = a[d]); return c }; _.Ex = function(a, b) { var c = _.hb(b), d = c ? b : arguments; for (c = c ? 0 : 1; c < d.length; c++) { if (null == a) return; a = a[d[c]] } return a }; /* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var Fx; _.Gx = function(a) { return (new Fx).Pf(a) }; Fx = function() {}; Fx.prototype.Pf = function(a) { var b = []; Hx(this, a, b); return b.join("") }; var Hx = function(a, b, c) { if (null == b) c.push("null"); else { if ("object" == typeof b) { if (Array.isArray(b)) { var d = b; b = d.length; c.push("["); for (var e = "", f = 0; f < b; f++) c.push(e), Hx(a, d[f], c), e = ","; c.push("]"); return } if (b instanceof String || b instanceof Number || b instanceof Boolean) b = b.valueOf(); else { c.push("{"); e = ""; for (d in b) Object.prototype.hasOwnProperty.call(b, d) && (f = b[d], "function" != typeof f && (c.push(e), Ix(d, c), c.push(":"), Hx(a, f, c), e = ",")); c.push("}"); return } } switch (typeof b) { case "string": Ix(b, c); break; case "number": c.push(isFinite(b) && !isNaN(b) ? String(b) : "null"); break; case "boolean": c.push(String(b)); break; case "function": c.push("null"); break; default: throw Error("ma`" + typeof b); } } }, Jx = { '"': '\\"', "\\": "\\\\", "/": "\\/", "\b": "\\b", "\f": "\\f", "\n": "\\n", "\r": "\\r", "\t": "\\t", "\x0B": "\\u000b" }, Kx = /\uffff/.test("\uffff") ? /[\\"\x00-\x1f\x7f-\uffff]/g : /[\\"\x00-\x1f\x7f-\xff]/g, Ix = function(a, b) { b.push('"', a.replace(Kx, function(c) { var d = Jx[c]; d || (d = "\\u" + (c.charCodeAt(0) | 65536).toString(16).substr(1), Jx[c] = d); return d }), '"') }; /* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ _.Lx = function(a, b, c) { if ("function" === typeof a) c && (a = (0, _.R)(a, c)); else if (a && "function" == typeof a.handleEvent) a = (0, _.R)(a.handleEvent, a); else throw Error("na"); return 2147483647 < Number(b) ? -1 : _.A.setTimeout(a, b || 0) }; _.Mx = function(a) { _.A.clearTimeout(a) }; _.Nx = function(a) { var b = null; return (new _.Gk(function(c, d) { b = _.Lx(function() { c(void 0) }, a); - 1 == b && d(Error("oa")) })).ys(function(c) { _.Mx(b); throw c; }) }; /* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var Qx, Ux, Vx, Xx, ay, cy; _.Ox = function(a) { if (!Array.isArray(a)) for (var b = a.length - 1; 0 <= b; b--) delete a[b]; a.length = 0 }; _.Px = function(a) { return (a = _.Ax(a)) ? new ActiveXObject(a) : new XMLHttpRequest }; Qx = function(a) { for (var b = /(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g, c = [], d; d = b.exec(a);) c.push([d[1], d[2], d[3] || void 0]); return c }; _.Rx = function(a) { var b = 0, c; for (c in a) b++; return b }; _.Sx = function(a, b) { return null !== a && b in a }; _.Tx = function(a) { if (!a || "object" !== typeof a) return a; if ("function" === typeof a.clone) return a.clone(); var b = Array.isArray(a) ? [] : "function" !== typeof ArrayBuffer || "function" !== typeof ArrayBuffer.isView || !ArrayBuffer.isView(a) || a instanceof DataView ? {} : new a.constructor(a.length), c; for (c in a) b[c] = _.Tx(a[c]); return b }; Ux = function(a) { var b = /rv: *([\d\.]*)/.exec(a); if (b && b[1]) return b[1]; b = ""; var c = /MSIE +([\d\.]+)/.exec(a); if (c && c[1]) if (a = /Trident\/(\d.\d)/.exec(a), "7.0" == c[1]) if (a && a[1]) switch (a[1]) { case "4.0": b = "8.0"; break; case "5.0": b = "9.0"; break; case "6.0": b = "10.0"; break; case "7.0": b = "11.0" } else b = "7.0"; else b = c[1]; return b }; Vx = function() { function a(e) { e = _.hi(e, d); return c[e] || "" } var b = _.xb; if (_.Hb()) return Ux(b); b = Qx(b); var c = {}; _.ob(b, function(e) { c[e[0]] = e[1] }); var d = _.ji(_.Sx, c); return _.Gb() ? a(["Version", "Opera"]) : _.Bb("Edge") ? a(["Edge"]) : _.Bb("Edg/") ? a(["Edg"]) : _.Jb() ? a(["Chrome", "CriOS", "HeadlessChrome"]) : (b = b[2]) && b[1] || "" }; _.Wx = function(a) { return 0 <= _.wb(Vx(), a) }; Xx = function(a, b) { var c = []; for (b = b || 0; b < a.length; b += 2) _.ph(a[b], a[b + 1], c); return c.join("&") }; _.Yx = function(a, b) { var c = 2 == arguments.length ? Xx(arguments[1], 0) : Xx(arguments, 1); return _.oh(a, c) }; _.Zx = function(a, b, c) { c = null != c ? "=" + _.lh(c) : ""; return _.oh(a, b + c) }; _.$x = function(a, b) { _.Zi(a, "/") && (a = a.substr(0, a.length - 1)); _.ed(b, "/") && (b = b.substr(1)); return a + "/" + b }; ay = {}; _.by = function(a) { if (ay[a]) return ay[a]; a = String(a); if (!ay[a]) { var b = /function\s+([^\(]+)/m.exec(a); ay[a] = b ? b[1] : "[Anonymous]" } return ay[a] }; cy = function(a, b) { var c = []; if (_.$a(b, a)) c.push("[...circular reference...]"); else if (a && 50 > b.length) { c.push(_.by(a) + "("); for (var d = a.arguments, e = 0; d && e < d.length; e++) { 0 < e && c.push(", "); var f = d[e]; switch (typeof f) { case "object": f = f ? "object" : "null"; break; case "string": break; case "number": f = String(f); break; case "boolean": f = f ? "true" : "false"; break; case "function": f = (f = _.by(f)) ? f : "[fn]"; break; default: f = typeof f } 40 < f.length && (f = f.substr(0, 40) + "..."); c.push(f) } b.push(a); c.push(")\n"); try { c.push(cy(a.caller, b)) } catch (g) { c.push("[exception trying to get caller]\n") } } else a ? c.push("[...long stack...]") : c.push("[end]"); return c.join("") }; _.dy = function(a) { var b = Error(); if (Error.captureStackTrace) Error.captureStackTrace(b, a || _.dy), b = String(b.stack); else { try { throw b; } catch (c) { b = c } b = (b = b.stack) ? String(b) : null } b || (b = cy(a || arguments.callee.caller, [])); return b }; _.ey = function(a) { switch (a) { case 200: case 201: case 202: case 204: case 206: case 304: case 1223: return !0; default: return !1 } }; _.fy = function(a, b) { _.dj.call(this); this.Ak = a || 1; this.zs = b || _.A; this.zG = (0, _.R)(this.o1, this); this.wK = _.lb() }; _.K(_.fy, _.dj); _.h = _.fy.prototype; _.h.enabled = !1; _.h.uc = null; _.h.setInterval = function(a) { this.Ak = a; this.uc && this.enabled ? (this.stop(), this.start()) : this.uc && this.stop() }; _.h.o1 = function() { if (this.enabled) { var a = _.lb() - this.wK; 0 < a && a < .8 * this.Ak ? this.uc = this.zs.setTimeout(this.zG, this.Ak - a) : (this.uc && (this.zs.clearTimeout(this.uc), this.uc = null), this.dispatchEvent("tick"), this.enabled && (this.stop(), this.start())) } }; _.h.start = function() { this.enabled = !0; this.uc || (this.uc = this.zs.setTimeout(this.zG, this.Ak), this.wK = _.lb()) }; _.h.stop = function() { this.enabled = !1; this.uc && (this.zs.clearTimeout(this.uc), this.uc = null) }; _.h.va = function() { _.fy.T.va.call(this); this.stop(); delete this.zs }; var hy, iy, jy; _.gy = function(a) { _.dj.call(this); this.headers = new _.rt; this.Ax = a || null; this.tf = !1; this.zx = this.Oa = null; this.Ev = ""; this.Yn = 0; this.$l = this.BB = this.gv = this.Lz = !1; this.Jm = 0; this.kd = null; this.Mk = ""; this.ME = this.sf = !1 }; _.K(_.gy, _.dj); _.gy.prototype.Bb = null; hy = /^https?$/i; iy = ["POST", "PUT"]; jy = []; _.ky = function(a, b, c, d, e, f, g) { var k = new _.gy; jy.push(k); b && k.V("complete", b); k.eo("ready", k.kS); f && k.bE(f); g && (k.sf = g); k.send(a, c, d, e) }; _.gy.prototype.kS = function() { this.Da(); _.oi(jy, this) }; _.gy.prototype.bE = function(a) { this.Jm = Math.max(0, a) }; _.gy.prototype.send = function(a, b, c, d) { if (this.Oa) throw Error("pa`" + this.Ev + "`" + a); b = b ? b.toUpperCase() : "GET"; this.Ev = a; this.Yn = 0; this.Lz = !1; this.tf = !0; this.Oa = this.Ax ? _.Px(this.Ax) : _.Px(_.Bx); this.zx = this.Ax ? this.Ax.getOptions() : _.Bx.getOptions(); this.Oa.onreadystatechange = (0, _.R)(this.mL, this); try { this.BB = !0, this.Oa.open(b, String(a), !0), this.BB = !1 } catch (f) { this.ju(5, f); return } a = c || ""; var e = this.headers.clone(); d && _.zt(d, function(f, g) { e.set(g, f) }); d = _.hi(e.Ae(), ly); c = _.A.FormData && a instanceof _.A.FormData; !_.$a(iy, b) || d || c || e.set("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); e.forEach(function(f, g) { this.Oa.setRequestHeader(g, f) }, this); this.Mk && (this.Oa.responseType = this.Mk); "withCredentials" in this.Oa && this.Oa.withCredentials !== this.sf && (this.Oa.withCredentials = this.sf); try { my(this), 0 < this.Jm && ((this.ME = ny(this.Oa)) ? (this.Oa.timeout = this.Jm, this.Oa.ontimeout = (0, _.R)(this.Bg, this)) : this.kd = _.Lx(this.Bg, this.Jm, this)), this.gv = !0, this.Oa.send(a), this.gv = !1 } catch (f) { this.ju(5, f) } }; var ny = function(a) { return _.sc && _.Pc(9) && "number" === typeof a.timeout && void 0 !== a.ontimeout }, ly = function(a) { return "content-type" == a.toLowerCase() }; _.gy.prototype.Bg = function() { "undefined" != typeof _.Wa && this.Oa && (this.Yn = 8, this.dispatchEvent("timeout"), this.abort(8)) }; _.gy.prototype.ju = function(a) { this.tf = !1; this.Oa && (this.$l = !0, this.Oa.abort(), this.$l = !1); this.Yn = a; oy(this); py(this) }; var oy = function(a) { a.Lz || (a.Lz = !0, a.dispatchEvent("complete"), a.dispatchEvent("error")) }; _.gy.prototype.abort = function(a) { this.Oa && this.tf && (this.tf = !1, this.$l = !0, this.Oa.abort(), this.$l = !1, this.Yn = a || 7, this.dispatchEvent("complete"), this.dispatchEvent("abort"), py(this)) }; _.gy.prototype.va = function() { this.Oa && (this.tf && (this.tf = !1, this.$l = !0, this.Oa.abort(), this.$l = !1), py(this, !0)); _.gy.T.va.call(this) }; _.gy.prototype.mL = function() { this.Ob || (this.BB || this.gv || this.$l ? qy(this) : this.BC()) }; _.gy.prototype.BC = function() { qy(this) }; var qy = function(a) { if (a.tf && "undefined" != typeof _.Wa && (!a.zx[1] || 4 != _.ry(a) || 2 != a.getStatus())) if (a.gv && 4 == _.ry(a)) _.Lx(a.mL, 0, a); else if (a.dispatchEvent("readystatechange"), 4 == _.ry(a)) { a.tf = !1; try { _.sy(a) ? (a.dispatchEvent("complete"), a.dispatchEvent("success")) : (a.Yn = 6, a.getStatus(), oy(a)) } finally { py(a) } } }, py = function(a, b) { if (a.Oa) { my(a); var c = a.Oa, d = a.zx[0] ? _.cb : null; a.Oa = null; a.zx = null; b || a.dispatchEvent("ready"); try { c.onreadystatechange = d } catch (e) {} } }, my = function(a) { a.Oa && a.ME && (a.Oa.ontimeout = null); a.kd && (_.Mx(a.kd), a.kd = null) }; _.gy.prototype.$d = function() { return !!this.Oa }; _.sy = function(a) { var b = a.getStatus(), c; if (!(c = _.ey(b))) { if (b = 0 === b) a = String(a.Ev).match(_.nh)[1] || null, !a && _.A.self && _.A.self.location && (a = _.A.self.location.protocol, a = a.substr(0, a.length - 1)), b = !hy.test(a ? a.toLowerCase() : ""); c = b } return c }; _.ry = function(a) { return a.Oa ? a.Oa.readyState : 0 }; _.gy.prototype.getStatus = function() { try { return 2 < _.ry(this) ? this.Oa.status : -1 } catch (a) { return -1 } }; _.ty = function(a) { try { return a.Oa ? a.Oa.responseText : "" } catch (b) { return "" } }; _.uy = function(a) { try { if (!a.Oa) return null; if ("response" in a.Oa) return a.Oa.response; switch (a.Mk) { case "": case "text": return a.Oa.responseText; case "arraybuffer": if ("mozResponseArrayBuffer" in a.Oa) return a.Oa.mozResponseArrayBuffer } return null } catch (b) { return null } }; _.gy.prototype.getResponseHeader = function(a) { if (this.Oa && 4 == _.ry(this)) return a = this.Oa.getResponseHeader(a), null === a ? void 0 : a }; _.gy.prototype.getAllResponseHeaders = function() { return this.Oa && 4 == _.ry(this) ? this.Oa.getAllResponseHeaders() || "" : "" }; _.ni(function(a) { _.gy.prototype.BC = a(_.gy.prototype.BC) }); /* Portions of this code are from MochiKit, received by The Closure Authors under the MIT license. All other code is Copyright 2005-2009 The Closure Authors. All Rights Reserved. */ ctx.QQ = function(a, b) { this.Jw = []; this.gL = a; this.lH = b || null; this.Jq = this.canceled = !1; // xn = canceled this.ij = void 0; this.notCalled = this.ZR = this.zy = !1; // false this.errorTimeout = 0; // QQ.nx = QQ.errorTimeout this.$a = null; this.By = 0 }; ctx.QQ.prototype.cancel = function(a) { // also not obfuscated if (this.canceled) this.ij instanceof ctx.QQ && this.ij.cancel(); // ij is some kind of next or parent pointer else { if (this.$a) { var b = this.$a; delete this.$a; a ? b.cancel(a) : (b.By--, 0 >= b.By && b.cancel()) } this.gL ? this.gL.call(this.lH, this) : this.notCalled = !0; this.canceled || (a = new ctx.CanceledError(this), ctx.checkSingleCall(this), ctx.TQ(this, !1, a)) } }; ctx.QQ.prototype.dH = function(a, b) { this.zy = !1; ctx.TQ(this, a, b) }; ctx.TQ = function(a, b, c) { a.canceled = !0; // true a.ij = c; // next pointer again a.Jq = !b; UQ(a) }; ctx.checkSingleCall = function(what) { // ctx.SQ = ctx.checkSingleCall if (what.canceled) { // *.xn = *.canceled if (!what.notCalled) throw new AlreadyCalledError(what); // *.nE = *.notCalled what.notCalled = !1 // false } }; ctx.QQ.prototype.callback = function(a) { ctx.checkSingleCall(this); ctx.TQ(this, !0, a) }; ctx.QQ.prototype.Td = function(a, b) { return this.Zm(a, null, b) }; ctx.QQ.prototype.Zm = function(a, b, c) { this.Jw.push([a, b, c]); this.canceled && UQ(this); return this }; ctx.QQ.prototype.then = function(a, b, c) { var d, e, f = new ctx.Gk(function(g, k) { d = g; e = k }); this.Zm(d, function(g) { g instanceof ctx.CanceledError ? f.cancel() : e(g) }); return f.then(a, b, c) }; ctx.pk(ctx.QQ); ctx.QQ.prototype.isError = function(a) { return a instanceof Error }; var WQ = function(a) { return ctx.rb(a.Jw, function(b) { return "function" === typeof b[1] }) }, UQ = function(a) { if (a.errorTimeout && a.canceled && WQ(a)) { // gracefully clear timeout var timeout = a.errorTimeout, // QQ.nx = QQ.errorTimeout asyncError = asyncByTimeout[timeout]; asyncError && (ctx.A.clearTimeout(asyncError.timeout), delete asyncByTimeout[timeout]); a.errorTimeout = 0 } a.$a && (a.$a.By--, delete a.$a); var b = a.ij, c; for (var d = c = !1; a.Jw.length && !a.zy;) { var e = a.Jw.shift(), f = e[0], g = e[1]; e = e[2]; if (f = a.Jq ? g : f) try { var k = f.call(e || a.lH, b); void 0 !== k && (a.Jq = a.Jq && (k == b || a.isError(k)), a.ij = b = k); if (ctx.qk(b) || "function" === typeof ctx.A.Promise && b instanceof ctx.A.Promise) d = !0, a.zy = !0 } catch (l) { b = l, a.Jq = !0, WQ(a) || (c = !0) } } a.ij = b; d && (k = (0, ctx.R)(a.dH, a, !0), d = (0, ctx.R)(a.dH, a, !1), b instanceof ctx.QQ ? (b.Zm(k, d), b.ZR = !0) : b.then(k, d)); c && (b = new AsyncError(b), asyncByTimeout[b.timeout] = b, a.errorTimeout = b.timeout) }, AlreadyCalledError = function() { // VQ = AlreadyCalledError ctx.Vc.call(this) }; ctx.K(AlreadyCalledError, ctx.Vc); AlreadyCalledError.prototype.message = "Deferred has already fired"; AlreadyCalledError.prototype.name = "AlreadyCalledError"; // thank you :) ctx.CanceledError = function() { // ctx.RQ = ctx.CanceledError ctx.Vc.call(this) }; ctx.K(ctx.CanceledError, ctx.Vc); ctx.CanceledError.prototype.message = "Deferred was canceled"; ctx.CanceledError.prototype.name = "CanceledError"; // thanks again! var AsyncError = function(error) { // YQ = AsyncError this.timeout = ctx.A.setTimeout((0, ctx.R)(this.throwError, this), 0); // AsyncError.Ca = timeout this.error = error // AsyncError.ju = error }; AsyncError.prototype.throwError = function() { // AsyncError.n1 = throwError delete asyncByTimeout[this.timeout]; throw this.error; }; // key: timeout for AsyncError // value: actual AsyncError var asyncByTimeout = {}; // XQ = asyncByTimeout var ZQ = function(a) { (0, eval)(a) }, $Q = function(a) { var b = ctx.A.onerror, c = !1; ctx.wc && !ctx.Pc("535.3") && (c = !c); ctx.A.onerror = function(d, e, f, g, k) { b && b(d, e, f, g, k); a({ message: d, fileName: e, line: f, lineNumber: f, xaa: g, error: k }); return c } }, aR = function(a) { var b = ""; "function" === typeof a.toString && (b = "" + a); return b + a.stack }, bR = function(a, b) { b || (b = {}); b[aR(a)] = !0; var c = a.stack || ""; (a = a.JG) && !b[aR(a)] && (c += "\nCaused by: ", a.stack && 0 == a.stack.indexOf(a.toString()) || (c += "string" === typeof a ? a : a.message + "\n"), c += bR(a, b)); return c }, cR = function(a) { var b = ctx.pi("window.location.href"); null == a && (a = 'Unknown Error of type "null/undefined"'); if ("string" === typeof a) return { message: a, name: "Unknown error", lineNumber: "Not available", fileName: b, stack: "Not available" }; var c = !1; try { var d = a.lineNumber || a.line || "Not available" } catch (f) { d = "Not available", c = !0 } try { var e = a.fileName || a.filename || a.sourceURL || ctx.A.$googDebugFname || b } catch (f) { e = "Not available", c = !0 } b = bR(a); if (!(!c && a.lineNumber && a.fileName && a.stack && a.message && a.name)) return c = a.message, null == c && (c = a.constructor && a.constructor instanceof Function ? 'Unknown Error of type "' + (a.constructor.name ? a.constructor.name : ctx.by(a.constructor)) + '"' : "Unknown Error of unknown type", "function" === typeof a.toString && Object.prototype.toString !== a.toString && (c += ": " + a.toString())), { message: c, name: a.name || "UnknownError", lineNumber: d, fileName: e, stack: b || "Not available" }; a.stack = b; return a }; var dR = function() { ctx.ri.call(this) }; ctx.ii(dR, ctx.ri); dR.prototype.init = function() { this.zo = [] }; var gR = function(a) { var b = eR; b.xD = a; fR(b) }, iR = function(a, b) { var c = eR; if (c.kca) { a = "Potentially sensitive message stripped for security reasons."; var d = Error("Ra"); d.columnNumber = b.columnNumber; d.lineNumber = b.lineNumber; d.name = b.name; d.fileName = b.fileName; if (ctx.Jb() && ctx.Wx(28) || ctx.Ib() && ctx.Wx(14)) d.stack = b.stack; b = d } c.Ob || b instanceof ctx.CanceledError || (c.xD ? hR(c.xD, b, a) : c.zo && 10 > c.zo.length && c.zo.push([a, b])) }, fR = function(a) { a.zo && (ctx.ob(a.zo, function(b) { hR(this.xD, b[1], b[0]) }, a), a.zo = null) }; dR.prototype.Bb = null; var eR = new dR; var jR = function() { var a = window; if (!a.location) try { ctx.Gx(a) } catch (c) {} var b = a.location && a.location.ancestorOrigins; if (void 0 !== b) return b && b.length ? b[b.length - 1] == a.location.origin : !0; try { return void 0 !== a.top.location.href } catch (c) { return !1 } }; var kR = {}, lR = function() { var a = {}; a.location = document.location.toString(); if (jR()) try { a["top.location"] = top.location.toString() } catch (c) { a["top.location"] = "[external]" } else a["top.location"] = "[external]"; for (var b in kR) try { a[b] = kR[b].call() } catch (c) { a[b] = "[error] " + c.message } return a }; var mR = function(a) { this.XG = a; this.SJ = {}; this.Nq = [] }, hR = function(a, b, c) { var d = lR(); c && (d.message = c); a: { c = ctx.dy();d["call-stack"] = c;b = b instanceof Error ? b : b || ""; for (c = 0; c < a.Nq.length; c++) if (!1 === a.Nq[c](b, d)) break a;c = ""; if (b) { c = b.message || "unknown"; for (var e = 0, f = 0; f < c.length; ++f) e = 31 * e + c.charCodeAt(f) >>> 0; c = e } e = ""; for (g in d) e = e + g + ":" + d[g] + ":"; var g = c + "::" + e;c = a.SJ[g];c || (c = { time: 0, count: 0 }, a.SJ[g] = c);1E4 > ctx.lb() - c.time ? (c.count++, 1 == c.count && (d = lR(), d.message = "Throttling: " + g, a.XG.Ru(b, d))) : (c.count && (d["dropped-instances"] = c.count), c.time = ctx.lb(), c.count = 0, a.XG.Ru(b, d)) } }; /* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var nR = function(a) { ctx.ri.call(this); this.bT = a }; ctx.K(nR, ctx.ri); nR.prototype.wrap = function(a) { return oR(this, a) }; var pR = function(a, b) { return (b ? "__wrapper_" : "__protected_") + ctx.cd(a) + "__" }, oR = function(a, b) { var c = pR(a, !0); b[c] || ((b[c] = qR(a, b))[pR(a, !1)] = b); return b[c] }, qR = function(a, b) { var c = function() { if (a.Ob) return b.apply(this, arguments); try { return b.apply(this, arguments) } catch (d) { a.mg(d) } finally {} }; c[pR(a, !1)] = b; return c }; nR.prototype.mg = function(a) { if (!(a && "object" === typeof a && "string" === typeof a.message && 0 == a.message.indexOf("Error in protected function: ") || "string" === typeof a && 0 == a.indexOf("Error in protected function: "))) throw this.bT(a), new rR(a); }; var sR = function(a, b) { var c = ctx.A.window, d = c[b]; c[b] = function(e, f) { "string" === typeof e && (e = ctx.ji(ZQ, e)); arguments[0] = e = oR(a, e); if (d.apply) return d.apply(this, arguments); var g = e; if (2 < arguments.length) { var k = Array.prototype.slice.call(arguments, 2); g = function() { e.apply(this, k) } } return d(g, f) }; c[b][pR(a, !1)] = d }; nR.prototype.va = function() { var a = ctx.A.window; var b = a.setTimeout; b = b[pR(this, !1)] || b; a.setTimeout = b; b = a.setInterval; b = b[pR(this, !1)] || b; a.setInterval = b; nR.T.va.call(this) }; var rR = function(a) { ctx.Vc.call(this, "Error in protected function: " + (a && a.message ? String(a.message) : String(a))); (a = (this.JG = a) && a.stack) && "string" === typeof a && (this.stack = a) }; ctx.K(rR, ctx.Vc); var uR = function(a, b, c) { ctx.dj.call(this); this.cH = b || null; this.fG = {}; this.nO = tR; this.nW = a; if (!c) if (this.wn = null, ctx.sc && !ctx.Pc("10")) $Q((0, ctx.R)(this.Ru, this)); else { this.wn = new nR((0, ctx.R)(this.Ru, this)); sR(this.wn, "setTimeout"); sR(this.wn, "setInterval"); a = this.wn; b = ctx.A.window; c = ["requestAnimationFrame", "mozRequestAnimationFrame", "webkitAnimationFrame", "msRequestAnimationFrame"]; for (var d = 0; d < c.length; d++) { var e = c[d]; c[d] in b && sR(a, e) } a = this.wn; ctx.mi = !0; b = (0, ctx.R)(a.wrap, a); for (c = 0; c < ctx.ki.length; c++) ctx.ki[c](b); ctx.li.push(a) } }; ctx.K(uR, ctx.dj); var vR = function(a, b) { ctx.vi.call(this, "a"); this.error = a; this.context = b }; ctx.K(vR, ctx.vi); var tR = function(a, b, c, d) { ctx.ky(a, null, b, c, d) }, wR = function(a, b) { a.nO = b }; uR.prototype.Ru = function(a, b) { a = a.error || a; b = b ? ctx.lk(b) : {}; a instanceof Error && ctx.Fb(b, a.__closure__error__context__984382 || {}); a = cR(a); if (this.cH) try { this.cH(a, b) } catch (k) {} var c = a.message.substring(0, 1900), d = a.stack; try { var e = ctx.Yx(this.nW, "script", a.fileName, "error", c, "line", a.lineNumber); ctx.$i(this.fG) || (e = ctx.rh(e, this.fG)); c = {}; c.trace = d; if (b) for (var f in b) c["context." + f] = b[f]; var g = ctx.qh(c); this.nO(e, "POST", g, this.Oaa) } catch (k) {} try { this.dispatchEvent(new vR(a, b)) } catch (k) {} }; uR.prototype.va = function() { ctx.ti(this.wn); uR.T.va.call(this) }; var xR = function() { var a = ctx.S("debug/host"), b = "withCredentials" in new XMLHttpRequest, c = !!window.XDomainRequest, d = document.location.origin; eR.init(); var e = new uR("/_/jserror", void 0, !0); wR(e, function(f, g, k, l) { a === d ? ctx.ky(a + f, null, g, k, l) : c ? (l = new window.XDomainRequest, l.open(g, a + f), l.send(k)) : b && ctx.ky(a + f, null, g, k, l) }); gR(new mR(e)) }, yR = !1; (window.___jsl = window.___jsl || {}).hefn = function(a, b) { // there's the jsl hefn that was uncracked in the loader! yR || (xR(), yR = !0); var c = ctx.S("debug/reportExceptionRate"); ("number" === typeof c ? c : 0) >= Math.random() && (b ? iR(b, a) : iR(null, a)); if (ctx.S("debug/rethrowException")) throw a; }; }); // Google Inc.
javascript
{ "Id": "dragon-scale", "Name": "Dragon Scale", "Rarity": 0, "RarityParameter": null, "ItemCategory": 8, "ShortDescription": "Needed for evolution.", "LongDescription": "A thick, tough scale. It allows a certain kind of Pokémon to evolve.", "BuyPrice": 1000, "SellPrice": 1, "SpriteId": 20, "ItemId": 150, "Param1": 0, "Param2": 0, "Param3": 0 }
json
[{"namaKab":"BENGKAYANG","originalFilename":"BG PENDI 4X6.jpg","namaPartai":"Partai Persatuan pembangunan","id":278299,"noUrut":1,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"<NAME>","originalFilename":"4X6 FAHRUL.jpg","namaPartai":"Partai Persatuan pembangunan","id":274340,"noUrut":2,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"<NAME>","originalFilename":"apriyeni 4x6.jpg","namaPartai":"Partai Persatuan pembangunan","id":279160,"noUrut":3,"nama":"APRIYENI","stringJenisKelamin":"Perempuan"},{"namaKab":"BENGKAYANG","originalFilename":"4x6 ayu.jpg","namaPartai":"Partai Persatuan pembangunan","id":276590,"noUrut":4,"nama":"<NAME>","stringJenisKelamin":"Perempuan"},{"namaKab":"BENGKAYANG","originalFilename":"DSC_0337.jpg","namaPartai":"Partai Persatuan pembangunan","id":276792,"noUrut":5,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"BENGKAYANG","originalFilename":"DSC_0335.jpg","namaPartai":"Partai Persatuan pembangunan","id":277047,"noUrut":6,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"}]
json
How can exposing yourself to your fears possibly help improve your condition? Exposure and Response Prevention can sound counterintuitive in its treatment of Obsessive Compulsive Disorder (OCD), but it can actually do wonders. ERP involves exposure to your fears and response (ritual/compulsion) prevention. OCD is a serious mental health concern that disrupts functioning for many individuals struggling with it. It is characterized by obsessions and intrusive thoughts that keep popping in an individual's mind time and again. These thoughts are ego dystonic, which means that the individual does not want to experience them. To potentially stop the obsessions, the individual engages in compulsions and the cycle goes on. Thus, how does ERP then help an individual with managing their thoughts and behaviors? Exposure and Response Prevention in OCD is not just popular but also an effective treatment for OCD. A mental health professional has to be trained in this particular modality. An ERP therapist will first have you rank all of your fears on subjective units of distress (SUDS) scale. This is a scale that can range from 1-7 or 1-10 (the higher numbers indicating a higher anxiety level or fear). This is called a worry hierarchy. You will begin with exposures to fears lower on the hierarchy and work your way up. This can be a scary step to take, but beginning therapy doesn't mean its always going to be comfortable. Exposure and response prevention can be hard work. Your anxiety is supposed to rise during an exposure, but it will eventually fall. How Does Exposure and Response Prevention Work? As emotionally taxing as this process can be, Exposure and Response Prevention can work for you! There will be times when you might not want to expose yourself to a particular situation. This is a completely natural response in facing your fears. However, these are going to be times we need to push through the hardest to enhance our resilience and become better at dealing with our obsessions. The goal of Exposure and Response Prevention is to learn that your fears are not as daunting as they once seemed and that compulsions are not necessary. You may also learn that you can learn to tolerate the high levels of anxiety. There are majorly two types of exposure. Either you can begin by imagining the situations on the worry hierarchy (mental imagination) or you can engage in real-time experiences. Your therapist will never force you to expose yourself. Once you gain confidence in exposing yourself to the first level, your mental health professional will encourage you to move to the next. In response prevention, you are actively discouraged from engaging in typical compulsive behaviors. These behaviors are thought to reduce anxiety or neutralize the distress caused by the obsessions. However, in response prevention you stop using safety behaviors. Exposure and Response Prevention therapy is one of the most beneficial modalities not only for OCD, but also other anxiety disorders. However, if you don't do the work consistently or if you continue to complete compulsions, you won't get a reduction in symptoms. Let us take an example of someone who has intrusive thoughts about organization, and they feel compelled to organize everything around them excessively. They think that by doing this, they can alleviate the anxiety. In ERP, they would be encouraged to expose themselves to situations that trigger the organization obsession (example, messy cupboards, scattered toys, clothes with wrinkles, etc.) and then be instructed not to organize those items. Over time, as the person consistently refrains from organizing excessively, their anxiety gradually decreases. They eventually learn that they can tolerate the distress without the need to perform their compulsions. Exposure Response Prevention is now considered the gold standard treatment for Obsessive Compulsive Disorder. However, it is important to set realistic expectations when you start this modality of therapy. You are likely to still experience fear, anxiety, and disgust when you encounter triggers. Further, you are also likely to feel uncomfortable when intrusive thoughts pop up. However, with skills you learn through ERP, you can move towards a more positive direction. This direction takes you away from OCD and towards a better life. Janvi Kapur is a counselor with a master's degree in applied psychology with a specialization in clinical psychology. What do you think of this story? Tell us in the comments section below.
english
/*----------------------------------------------------------------------------- KENBURNER RESPONSIVE BASIC STYLES OF HTML DOCUMENT Screen Stylesheet version: 1.0 date: 07/27/11 author: themepunch email: <EMAIL> website: http://www.themepunch.com -----------------------------------------------------------------------------*/ /********************************************************************************************* - SET THE SCREEN SIZES FOR THE BANNER IF YOU WISH TO MAKE THE BANNER RESOPONSIVE - **********************************************************************************************/ /* - THE BANNER CONTAINER (Padding, Shadow, Border etc. ) - */ .bannercontainer { background-color:#fff; width:960px; position:relative; position:relative; margin-left:auto; margin-right:auto; } .banner{ width:960px; height:500px; position:relative; overflow:hidden; } .bannercontainer-simple { padding:0px; background-color:#fff; width:960px; position:relative; position:relative; margin-left:auto; margin-right:auto; } .banner-simple{ width:960px; height:500px; position:relative; overflow:hidden; } .fullwidthbanner-container{ width:100% !important; position:relative; padding:0; max-height:500px !important; overflow:hidden; } .fullwidthbanner-container .fullwidthabnner { width:100% !important; max-height:500px !important; position:relative; } @media only screen and (min-width: 768px) and (max-width: 959px) { .banner, .bannercontainer { width:760px; height:396px;} } @media only screen and (min-width: 480px) and (max-width: 767px) { .banner, .bannercontainer { width:480px; height:250px; } } @media only screen and (min-width: 0px) and (max-width: 479px) { .banner, .bannercontainer { width:320px;height:167px; } }
css
[ { "DeniedAlternatives": [], "Files": { "items/armors/tier3/furaider/furaider.chest": [ "/description" ], "items/armors/tier3/furaider/furaider.head": [ "/description" ], "items/armors/tier3/furaider/furaider.legs": [ "/description" ] }, "Texts": { "Chs": "套装:\n^cyan;自动手枪伤害+7.5%,\n匕首暴击伤害+25%^reset;\n^green;奔跑速度+12%^reset;", "Eng": "Set Bonus:\n^cyan;+7.5% Machine Pistol Damage, +25% Crit Damage(Dagger)^reset;\n^green;+12% Speed^reset;" } } ]
json
{ "name": "output-directory", "version": "0.0.1", "description": "a helper for outputting directories within specified directory", "main": "index.js", "scripts": { "test": "null" }, "repository": { "type": "git", "url": "git+ssh://git@github.com/AlexBai1991/output-directory.git" }, "keywords": [ "nodejs", "output", "directory" ], "author": "<NAME> <<EMAIL>>", "license": "MIT", "bugs": { "url": "https://github.com/AlexBai1991/output-directory/issues" }, "homepage": "https://github.com/AlexBai1991/output-directory#readme" }
json
<filename>data/www/26y5auolpwfqzwo13.json {"title":"暁 リトライ☆ランデヴー","author":"Garnet2020","description":"暁のパンツ、前から見るか?後ろから見るか?","thumb":"//i.iwara.tv/sites/default/files/styles/thumbnail/public/videos/thumbnails/2052822/thumbnail-2052822_0007.jpg?itok=aiGP9xcs","download":"https://www.iwara.tv/api/video/26y5auolpwfqzwo13","origin":"https://www.iwara.tv/videos/26y5auolpwfqzwo13"}
json
<reponame>wlj5240/spring-boot-starter-dubbo-d<gh_stars>10-100 package com.reger.dubbo.config; import static org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition; import static org.springframework.beans.factory.support.BeanDefinitionReaderUtils.registerWithGeneratedName; import static org.springframework.core.annotation.AnnotationUtils.findAnnotation; import static org.springframework.util.ClassUtils.resolveClassName; import java.util.ArrayList; import java.util.List; import java.util.Set; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.aop.support.AopUtils; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanClassLoaderAware; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.BeanDefinitionHolder; import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.ManagedList; import org.springframework.context.EnvironmentAware; import org.springframework.context.ResourceLoaderAware; import org.springframework.core.env.Environment; import org.springframework.core.io.ResourceLoader; import org.springframework.core.type.filter.AnnotationTypeFilter; import org.springframework.util.Assert; import org.springframework.util.ClassUtils; import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; import com.alibaba.dubbo.common.Constants; import com.alibaba.dubbo.config.AbstractConfig; import com.alibaba.dubbo.config.ProtocolConfig; import com.alibaba.dubbo.config.RegistryConfig; import com.alibaba.dubbo.config.annotation.Service; import com.alibaba.dubbo.config.spring.ServiceBean; import com.alibaba.dubbo.config.spring.beans.factory.annotation.InjectAnnotationBeanPostProcessor; import com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor; import com.alibaba.dubbo.config.spring.context.annotation.DubboClassPathBeanDefinitionScanner; import com.alibaba.dubbo.config.spring.util.BeanRegistrar; public class AnnotationBean extends AbstractConfig implements DisposableBean, BeanFactoryPostProcessor, ResourceLoaderAware, EnvironmentAware, BeanClassLoaderAware { private static final long serialVersionUID = 1L; private final Logger logger = LoggerFactory.getLogger(AnnotationBean.class); protected BeanDefinitionRegistry registry; private ResourceLoader resourceLoader; private Environment environment; private ClassLoader classLoader; private String[] annotationPackages; @Override public void setEnvironment(Environment environment) { this.environment = environment; } @Override public void setResourceLoader(ResourceLoader resourceLoader) { this.resourceLoader = resourceLoader; } @Override public void setBeanClassLoader(ClassLoader classLoader) { this.classLoader = classLoader; } @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { this.registry = (BeanDefinitionRegistry) beanFactory; BeanRegistrar.registerInfrastructureBean(registry, InjectAnnotationBeanPostProcessor.BEAN_NAME, InjectAnnotationBeanPostProcessor.class); BeanRegistrar.registerInfrastructureBean(registry, ReferenceAnnotationBeanPostProcessor.BEAN_NAME, ReferenceAnnotationBeanPostProcessor.class); } public void setPackage(String annotationPackage) { if (StringUtils.hasText(annotationPackage)) { this.annotationPackages = trims(annotationPackage); } else { this.annotationPackages = new String[] {}; } } protected void postProcessAnnotationPackageService() { if (this.annotationPackages.length == 0) { return; } DubboClassPathBeanDefinitionScanner definitionScanner = new DubboClassPathBeanDefinitionScanner( registry, environment, resourceLoader); definitionScanner.addIncludeFilter(new AnnotationTypeFilter(Service.class)); Set<BeanDefinitionHolder> definitionHolders = definitionScanner.doScan(this.annotationPackages); for (BeanDefinitionHolder definitionHolder : definitionHolders) { registerServiceBean(definitionHolder, registry); } logger.debug("{} annotated @Service Components { {} } were scanned under package[{}]", definitionHolders.size(), definitionHolders, this.annotationPackages); } /** * Registers {@link ServiceBean} from new annotated {@link Service} * {@link BeanDefinition} * * @param beanDefinitionHolder * @param registry * @see ServiceBean * @see BeanDefinition */ private void registerServiceBean(BeanDefinitionHolder beanDefinitionHolder, BeanDefinitionRegistry registry) { Class<?> beanClass = resolveClass(beanDefinitionHolder); Service service = findAnnotation(beanClass, Service.class); Class<?> interfaceClass = resolveServiceInterfaceClass(beanClass, service); String beanName = beanDefinitionHolder.getBeanName(); if(interfaceClass==null){ Class<?>[] interfacess = beanClass.getInterfaces(); Assert.isTrue(interfacess.length!=0, beanClass+"没有实现任何接口,不可以发布服务"); for (Class<?> interfaces : interfacess) { AbstractBeanDefinition serviceBeanDefinition = buildServiceBeanDefinition(service, interfaces, beanName); registerWithGeneratedName(serviceBeanDefinition, registry); } }else{ AbstractBeanDefinition serviceBeanDefinition = buildServiceBeanDefinition(service, interfaceClass, beanName); registerWithGeneratedName(serviceBeanDefinition, registry); } } private ManagedList<RuntimeBeanReference> toRuntimeBeanReferences(String... beanNames) { ManagedList<RuntimeBeanReference> runtimeBeanReferences = new ManagedList<RuntimeBeanReference>(); if (!ObjectUtils.isEmpty(beanNames)) { for (String beanName : beanNames) { runtimeBeanReferences.add(new RuntimeBeanReference(beanName)); } } return runtimeBeanReferences; } private AbstractBeanDefinition buildServiceBeanDefinition(Service service, Class<?> interfaceClass, String annotatedServiceBeanName) { BeanDefinitionBuilder builder = rootBeanDefinition(ServiceBean.class) .addConstructorArgValue(service) .addPropertyReference("ref", annotatedServiceBeanName) .addPropertyValue("interfaceClass", interfaceClass); /** * Add {@link com.alibaba.dubbo.config.ProviderConfig} Bean reference */ String providerConfigBeanName = service.provider(); if (StringUtils.hasText(providerConfigBeanName)) { builder.addPropertyReference("provider", providerConfigBeanName); } /** * Add {@link com.alibaba.dubbo.config.MonitorConfig} Bean reference */ String monitorConfigBeanName = service.monitor(); if (StringUtils.hasText(monitorConfigBeanName)) { builder.addPropertyReference("monitor", monitorConfigBeanName); } /** * Add {@link com.alibaba.dubbo.config.ApplicationConfig} Bean reference */ String applicationConfigBeanName = service.application(); if (StringUtils.hasText(applicationConfigBeanName)) { builder.addPropertyReference("application", applicationConfigBeanName); } /** * Add {@link com.alibaba.dubbo.config.ModuleConfig} Bean reference */ String moduleConfigBeanName = service.module(); if (StringUtils.hasText(moduleConfigBeanName)) { builder.addPropertyReference("application", moduleConfigBeanName); } /** * Add {@link com.alibaba.dubbo.config.RegistryConfig} Bean reference */ String[] registryConfigBeanNames = service.registry(); List<RuntimeBeanReference> registryRuntimeBeanReferences = toRuntimeBeanReferences(registryConfigBeanNames); if (!registryRuntimeBeanReferences.isEmpty()) { builder.addPropertyValue("registries", registryRuntimeBeanReferences); } /** * Add {@link com.alibaba.dubbo.config.ProtocolConfig} Bean reference */ String[] protocolConfigBeanNames = service.protocol(); List<RuntimeBeanReference> protocolRuntimeBeanReferences = toRuntimeBeanReferences(protocolConfigBeanNames); if (!registryRuntimeBeanReferences.isEmpty()) { builder.addPropertyValue("protocols", protocolRuntimeBeanReferences); } return builder.getBeanDefinition(); } private Class<?> resolveServiceInterfaceClass(Class<?> annotatedServiceBeanClass, Service service) { Class<?> interfaceClass = service.interfaceClass(); if (void.class.equals(interfaceClass)) { interfaceClass = null; String interfaceClassName = service.interfaceName(); if (StringUtils.hasText(interfaceClassName)) { if (ClassUtils.isPresent(interfaceClassName, classLoader)) { interfaceClass = resolveClassName(interfaceClassName, classLoader); } } } if(interfaceClass==null){ return null; } Assert.isTrue(interfaceClass.isInterface(), "The type that was annotated @Service is not an interface!"); return interfaceClass; } private Class<?> resolveClass(BeanDefinitionHolder beanDefinitionHolder) { BeanDefinition beanDefinition = beanDefinitionHolder.getBeanDefinition(); return resolveClass(beanDefinition); } private Class<?> resolveClass(BeanDefinition beanDefinition) { String beanClassName = beanDefinition.getBeanClassName(); return resolveClassName(beanClassName, classLoader); } /** * 切包名字符串 * * @param annotationPackage * 包名 * @return 切好后的字符串 */ private String[] trims(String annotationPackage) { String[] tmpes = Constants.COMMA_SPLIT_PATTERN.split(annotationPackage); List<String> packages = new ArrayList<String>(); for (String tmpe : tmpes) { tmpe = tmpe.trim(); if (!tmpe.isEmpty()) { packages.add(tmpe); } } return packages.toArray(new String[] {}); } /** * 匹配类实例是否在包中 * * @param bean * 被判断的类 * @return 是否包含 */ protected boolean isMatchPackage(Object bean) { if (annotationPackages.length == 0) { return true; } String beanClassName = this.getOriginalClass(bean).getName(); for (String pkg : annotationPackages) { if (beanClassName.startsWith(pkg)) { return true; } } return false; } /** * 获取bean的原始类型 * * @param bean * 输入的bean对象 * @return bean的原始类型 */ private Class<?> getOriginalClass(Object bean) { if (AopUtils.isAopProxy(bean)) { return AopUtils.getTargetClass(bean); } return bean.getClass(); } @Override public void destroy() throws Exception { logger.info("dubbo开始关闭...."); ProtocolConfig.destroyAll(); RegistryConfig.destroyAll(); } }
java
<reponame>Coderangshu/450DSA<filename>Dynamic Programming/2zeroOneKnapsack.cpp<gh_stars>1-10 // { Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to return max value that can be put in knapsack of capacity W. int knapSack(int W, int wt[], int val[], int n) { // Your code here vector<vector<int>> dp(W+1,vector<int>(n+1)); for(int i=0;i<W+1;i++){ for(int j=0;j<n+1;j++){ if(i==0 or j==0) dp[i][j] = 0; else if(wt[j-1]>i) dp[i][j] = dp[i][j-1]; else dp[i][j] = max(dp[i-wt[j-1]][j-1]+val[j-1],dp[i][j-1]); } } // for(auto e:dp){ // for(auto f:e) cout<<f<<" "; // cout<<endl; // } return dp[W][n]; } }; // { Driver Code Starts. int main() { //taking total testcases int t; cin>>t; while(t--) { //reading number of elements and weight int n, w; cin>>n>>w; int val[n]; int wt[n]; //inserting the values for(int i=0;i<n;i++) cin>>val[i]; //inserting the weights for(int i=0;i<n;i++) cin>>wt[i]; Solution ob; //calling method knapSack() cout<<ob.knapSack(w, wt, val, n)<<endl; } return 0; } // } Driver Code Ends
cpp
/* Copyright 2017 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package leelawatcher; /** * A central location for application wide constants. Any immutable value * needed by multiple classes, or relating to the application as a whole * should be defined here. * * @author <NAME> */ public interface TsbConstants { /** * The current version of the program. String is used since the value * of the version is never used in computation. */ String VERSION_STR = "1.0"; /** * The name of the program. */ String PROG_NAME = "LeelaWatcher"; /** * The location of the woodgrain image file used as a background for the * playing board. */ String BRD_BACKGRD = "images/wd-back.gif"; }
java
HONG KONG: The slump in oil dominated the mood on Asian markets Wednesday after falling back below $30 a barrel, hammering energy firms once again and sending stocks deeper into the red. With the euphoria of Friday’s Bank of Japan stimulus but a distant memory, Tokyo led the regional losses followed by Hong Kong, where insurance giant AIA lost almost a 10th of its value on fears China would tighten insurance rules. The plunge in oil prices to 12-year lows has sent shudders through world markets, helping wipe trillions of dollars off valuations, even leading to the word “recession” raising its head. Crude resumed its downward trend this week, jettisoning most of the gains seen in a four-day rally last week fuelled by hopes for OPEC-Russian talks on output cuts. US benchmark West Texas Intermediate crashed more than 11 percent on Monday and Tuesday to fall back through the $30 level for the first time since January 21. Brent lost almost six percent in the same period. And on Wednesday the losses piled up ahead of a US report that analysts warned could see a further increase in stockpiles. WTI lost one percent and Brent 0.9 percent in early Asian trade. Oil prices have crumbled about 75 percent since mid-2014, hit by a perfect storm of weak demand, oversupply, overproduction, a slowing global economy and a strong dollar. After already taking a hit on Tuesday, regional energy stocks were buffeted again on Wednesday.
english
package co.uber.eats.selenium.pageobject.resturant; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import co.uber.eats.selenium.pageobject.PageObject; public class CartPopUp extends PageObject { public CartPopUp(WebDriver driver, PageObject parent) { super(driver, parent); } @Override protected void quickValidate() { By byRestuarantTile = By.xpath("//div/a[contains(text(),'Go to checkout')]"); WebDriverWait wait = new WebDriverWait(driver, 1); wait.until(ExpectedConditions.visibilityOfElementLocated(byRestuarantTile)); } public void goToCheckout() { driver.findElement(By.xpath("//div/a[contains(text(),'Go to checkout')]")).click(); } }
java
<reponame>alswhd20/elk from elasticsearch import Elasticsearch, helpers import os elasticsearch_ip = os.getenv('ELASTICSEARCH_HOST','localhost') elasticsearch_port = os.getenv('ELASTICSEARCH_PORT','9200') es = Elasticsearch(elasticsearch_ip) def create_raw_index(): #인덱스 생성 #raw/twitter/ body = { "mappings": { "twitter":{ "properties": { "timestamp": {"type":"date", "format":"yyyy-MM-dd||yyyy-MM-dd HH:mm"}, #작성시간 "2015-01-01" or "2015/01/01 12:10:30". "html":{"type": "text"}, } } } } res = es.indices.create(index = "raw", body = body, include_type_name =True, ignore=[400, 404]) return res def create_analysis_index(): #https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-nori-tokenizer.html body = { "settings" : { # 색인(index) 정의 "number_of_shards" : 2, # 샤드 개수 "number_of_replicas": 1, # 레플리카 개수 "index": { # 색인 전체 설정 "analysis": { "analyzer": { "nori_analyzer": {# 사용자 정의 분석기 "type": "custom", "tokenizer": "nori_user_dict"# 토크나이저 설정 "filter": ["my_posfilter"] } }, "tokenizer": { "nori_user_dict": {# 토크나이저 정의 "type": "nori_tokenizer",# 한글 분석기 (nori) "decompound_mode": "mixed", #토큰을 처리하는 방법, 분해하지 않는다(none), 분해하고 원본삭제(discard), 분해하고 원본 유지(mixed) "user_dictionary": "userdict_ko.txt" } } "filter": { "my_posfilter": { #제거 할 불용어들 "type": "nori_part_of_speech", "stoptags": ["E", "IC","J","MAG", "MAJ", "MM", "SP", "SSC", "SSO", "SC", "SE", "XPN", "XSA", "XSN", "XSV", "UNA", "NA", "VSV"] } } } } }, "mappings": { "doc":{ "properties": { "author": {"type": "text", "index": "false" }, #작성자 "timestamp": {"type":"date", "format":"yyyy-MM-dd||yyyy-MM-dd HH:mm"}, #작성시간 "2015-01-01" or "2015-01-01 12:10:30". "title": {"type": "text", "analyzer": "nori_analyzer"},# 제목 "contents": {"type": "text", "index": "false"}, #글 내용 "nlp_contents": {"type": "text", "index": "false"},# 형태소 분석된 내용 "url":{"type": "text", "index": "false"},#글 URL "publisher": {"type": "keyword", "index": "false"}, #글 출처 출판사(보안뉴스, 트위터 등) "tag": {"type": "keyword"},#추후 태그 } } } } res = es.indices.create(index = "analysis", body = body, include_type_name =True, ignore=[400, 404]) return res create_raw_index() create_analysis_index() # index 삭제 코드 #es.indices.delete(index = "analysis", ignore=[400, 404])
python
{ "id": "https://example.com/testdata/generate/composite_validation/foo/blob.json", "type": "object", "properties": { "count": { "type": "integer" } }, "required": [ "count" ] }
json
आपको बता दें कि बेहद रोमांचक फाइनल मुकाबले में इंग्लैंड की टीम ने भारत को 9 रनों से हराकर चौथी बार विश्व कप पर कब्जा जमाया। इंग्लैंड की इस जीत में उनकी गेंदबाज आन्या श्रबसोले ने अहम भूमिका निभाई और 46 रन देकर 6 विकेट निकालते हुए टीम इंडिया की पारी को ताश के पत्तों की तरह बिखेर दिया। This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful. Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings. If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
english
<filename>jhipster_rng_vulnerability/save_points/g__kKadoc__videotheque.json { "project_name": "kKadoc/videotheque", "files": { "/src/main/java/fr/mmtech/service/util/RandomUtil.java": 2 }, "pull_request": "https://github.com/kKadoc/videotheque/pull/1", "report": { "files_fixed": 1, "vulnerabilities_fixed": 2 } }
json
package ch.itenengineering.ejb3toejb2.ejb; import javax.ejb.Remote; @Remote public interface EJB3Remote { public String echo(String message); public String echoFromEJB2(String message) throws Exception; }
java
package common import ( "fmt" "net/http" "github.com/labstack/echo/v4" "github.com/cloud-barista/cb-tumblebug/src/core/common" ) func RestGetConnConfig(c echo.Context) error { connConfigName := c.Param("connConfigName") fmt.Println("[Get ConnConfig for name]" + connConfigName) content, err := common.GetConnConfig(connConfigName) if err != nil { common.CBLog.Error(err) return c.JSONBlob(http.StatusFailedDependency, []byte(err.Error())) } return c.JSON(http.StatusOK, &content) } func RestGetConnConfigList(c echo.Context) error { fmt.Println("[Get ConnConfig List]") content, err := common.GetConnConfigList() if err != nil { common.CBLog.Error(err) return c.JSONBlob(http.StatusFailedDependency, []byte(err.Error())) } return c.JSON(http.StatusOK, &content) } func RestGetRegion(c echo.Context) error { regionName := c.Param("regionName") fmt.Println("[Get Region for name]" + regionName) content, err := common.GetRegion(regionName) if err != nil { common.CBLog.Error(err) return c.JSONBlob(http.StatusFailedDependency, []byte(err.Error())) } return c.JSON(http.StatusOK, &content) } func RestGetRegionList(c echo.Context) error { fmt.Println("[Get Region List]") content, err := common.GetRegionList() if err != nil { common.CBLog.Error(err) return c.JSONBlob(http.StatusFailedDependency, []byte(err.Error())) } return c.JSON(http.StatusOK, &content) }
go
OZA, G.L. (J) OZA, G.L. (J) NATRAJAN, S. (J) KULDIP SINGH (J) Assam Rashtrabhasha Prachar (taking over Management and Control) Act. 1984--Section 3--Act held ultra vires--Noti- fication nominating Board to replace Karyapalika and Byabas- thapika Sabha-Quashed. For the spread of Hindi in North-Eastern part of India an institution named Asom Hindi Prachar Samiti was formed on 3.11.38 at Gauhati. In 1948 this Samiti was renamed as Assam Rashtrabhasha Prachar Samiti. The Petitioner No. 1 herein is a registered body which claims to have a membership of about 22000 persons scattered all over the North-Eastern part of India. This Samity has a sole constitution known as Bidhan which is also a duly registered body. The Samiti holds different examinations in Hindi twice a year, publishes text books in Hindi for Primary Schools, High Schools, Higher Secondary Schools and Colleges upto the degree standard. Certificates issued by the Samity are recognised by the Government of India, the Government of Assam and various other organisations. The Samiti also imparts training and teaching in Hindi through a number of Vidyalayas and Prama- nita Pracharaks. The assets and properties of the Samiti at the time of filing this Petition are stated to be worth Rs. According to the Bidhart, the management and administra- tion of the Samiti is run by elected bodies namely Byabas- thapika Sabha and Karyapalika, each having 5 years term from the date of holding of its first meeting. The Karyapalika consisted of 17 members. The Chief Minister of Assam was the Ex-officio Adhyaksa of the Samiti but at the time of holding of the first meeting, the State of Assam was under Presi- dent's rule and consequently the office of Adhyaksha re- mained vacant. Petitioner No. 2 was unanimously elected Mantri. Petitioner No. 2 and other office bearers of the Karyapalika held the first meeting on 19.8.1982 and the Karyapalika was running and managing the day 161 to day affairs of the Samiti efficiently and diligently. The Samiti in its meeting held on 17.7.83 passed a resolution amending the Bidhan deleting the provision that the Chief Minister of Assam shall be the ex-officio Adhyak- sha of the Samiti. This resolution was adopted in full compliance of Section 30 of the Bidhan and all members present in the meeting except one supported the resolution. After the passing of this amendment, the Respondent No. 4 as alleged by the petitioners, passed an order dated 7.7.84 on political considerations purportedly to act as the Ex-offi- cio Adhyaksha of the Samiti declared a state of emergency in the Samiti in exercise of the powers conferred under S. 16(Gha) of the Bidhan, dissolved the existing Karyapalika and constituted an ad hoc body with himself as Chairman and five others as members to manage the affairs of the Samiti and asked the Petitioners to hand over the charge of the Samiti to this Ad hoc committee. Thereupon, the petitioners filed a suit for a declaration that the order dated 7.7.84 passed by Respondent No. 4 was void, illegal, without juris- diction and unenforceable against the petitioner society. The Petitioners also prayed for a permanent injunction restraining the respondents from giving effect to the order and also moved an application for issuance of a temporary injunction upon which a show cause notice was issued to the defendants who filed their objections. While the matter was pending consideration of the question of issuing of a tempo- rary injunction the Governor of Assam purporting to act under clause I of Article 230 of the Constitution of India promulgated an ordinance called the Asom Rashtrabhasha Prachar Samiti (taking over of management and control) Ordinance, 1984. In due course the Ordinance was replaced by an Act passed by the Assam Legislative Assembly. Under the Ordinance and the Act virtually the Samity which was a public body was substituted by a Board appointed by the Government and all the functions, properties and affairs of the Samiti were taken over by the Board. It is this action taken under the Ordinance and ultimately the Act which is the subject matter of challenge in this Writ Petition. It is contended that although the Act as its title discloses, was a temporary measure, was continued at perpetuity and the Samiti is being run by nominated members and the rights of the members of the Samiti under Article 19 of the Constitu- tion of India have not only been restricted but taken away. Even during the hearing it was indicated that the Government of Assam has no intention to end the temporary arrangement of the Samiti and by this process the State Government intends to deprive the members of the society their rights under Article 19(1)(C) for all times to 162 come. In the Act there is no provision providing for resto- ration of the elected bodies which shows that the use of phrase 'temporary' was just an eye wash. Accepting the contentions of the Petitioners, this Court while allowing the Writ Petition. HELD: As the Act of 1984 and the Board nominated or appointed under Section 3 of the Act is controlling the affairs of the Society it is not necessary to go into the orders passed by the Chief Minister invoking the emergency powers although the facts alleged clearly go to show that except that the Constitution (Bidhan) was amended and the Chief Minister was dropped from the place which he used to enjoy before the amendment of the Bidhan, there was nothing serious justifying all these actions starting from invoking the emergency provisions till enacting the present Act. [171G-H; 172A] It is also apparent that since 1984 when this Act was passed and a notification appointing a Board was issued, the Government has not chosen to take any steps to restore the Society back to its elected authorities and office bearers and nor does it intend to do so even now. Thus this Court is left with no option but to decide and decide upholding the Constitution and the right of association conferred under Article 19(1)(C) of the Constitution. [175D-E] The Complete Control has been taken away from the Peti- tioner Society and is given to Board nominated by the Gov- ernment. The Board is not as an interim measure. But will continue to control and manage the affairs of the society. This amounts to taking away the fundamental right of the Petitioner Society to form an Association guaranteed under Article 19(1)(C) of the Constitution of India. [170E] The Notification under the Act enacted by the Assam Legislature is set aside holding that the Act itself is ultra vires of the Constitution. The Notification issued under Section 3 of the Act by which a Board was nominated to replace the Karyapalika and Byabasthapika Sabha is also quashed. [175E] Damyanti Narang v. The Union of India and others, [1971] 3 SCR 940, referred to. ORIGINAL JURISDICTION: Writ Petition (C) No. 9960-61 of 1985. 163 (Under Article 32 of the Constitution of India). Gobind Mukhoty and S.K. Verma for the Petitioners. Dr. Shankar Ghosh and Prabir Choudhary for the Respondents. The Judgment of the Court was delivered by OZA, J. This Writ Petition was filed challenging the action taken by the respondent the State Government of Assam under the Asom Rashtrabhasha Prachar Samiti (Taking over management and Control) Act 1984 (Assam Act No. XXIII of 1984) which was an Act enacted by the Legislative Assembly of Assam and received the assent by the Governor of Assam and published in the Assam Gazette Extraordinary dated 15.12.84. It also challenged the orders contained in Notifi- cation Nos. EPG 57/84/25/A EPG 57/84/30-A and EPG 57/84/ 51-A dated 1.10.84, 10.11.84 and 19.3.85 respectively issued by the Education (Personal) Department of the Government of Assam. According to the petitioner in 1929 Lahore Congress under the leadership of Mahatma Gandhi adopted a resolution for the spread of Hindi as the common language for the whole of India with a view to promote national integrity and in pursuance of this resolution institutions for the spread and prachar of Hindi in the non-Hindi areas were established. First of this kind was established in Madras City in the name of Dakshin Bharat Hindi Prachar Samiti then in Wardha for the development and spread of Hindi. in the rest of India. Late Baba Raghab Das a devoted disciple of Gandhiji undertook the task of spreading Hindi in the North Eastern part of India and in 1934 eminent local leaders of this region Late Tarun Ram Phukan, Late Nabin Chandra Bardaloi, Late Gopinath Bardaloi, Late Krishna Nath Sarma and others joined Baba Raghab Das and the first institution named Asom Hindi Prachar Samiti was formed on 3.11.38 at Gauhati with late Gopinath Bardaloi the first Chief Minister of Assam under the 1935 Act as its President. In 1948 Asom Hindi Prachar Samiti was renamed as Assam Rashtrabhasha Prachar Samiti with its head Office at Gauhati. It is this Assam Rashtrabhasha Prachar Samiti, the petitioner No. 1, which is a registered society under the Societies Registration Act, 1860 with its registered office at Hedayatpur, Gauhati-3 District Kamrup. The registration No. of the Samiti which is 18th of 1951 and according to the petitioner this Society has a membership of about 164 22,000 persons scattered all over the States and Union Territories of North-Eastern part of India. The Samiti has district committees under its control. The Samiti also has two affiliated bodies namely Manipur Hindi Prachar Sabha, Imphal and the Asom Rashtrabhasha Sewak Sangh. This Samiti has a sole constitution known as Bidhan which is also regis- tered with the Registrar of Societies Assam at Gauhati. This Samiti is a literary body and under Section 4 of the Bidban the objects of the Samiti have been stated thus: (a) To propogate and promote Hindi as a na- tional language in Assam, Meghalaya, Mizoram, Nagaland, Manipur, Tripura and Arunachal Pradesh as provided in Article 351 of the Constitution of India. (b) to promote efficient, educated, qualified workers of good character to hold out the Indian ideal before the future generations- (c) to serve the State languages and litera- tures together with the promotion of Hindi. (d) to serve the tribal language and culture through the medium of Hindi language and to create kindness with the tribal brethren. (e) to undertake a programme of literacy amongst the illiterate. This Samiti according to the petitioners discharge its functions including the holding of examinations in Hindi in the State of Assam, Meghalaya and the Union Territory (as they were then) of Mizoram and also production and publica- tion of prescribed text books in Hindi for Primary Schools, High School, Higher Secondary schools and the Colleges upto the degree standard. The Samiti holds different examinations twice in a year in which about 60,000 candidates at the time of the filing of this petition on an average used to appear. The successful candidates are issued certificates which are recognised by the Government of India and the Government of Assam and various All India Organisation. The Samiti also imparts training and teaching in Hindi through a large number of Vidyalayas numbering about 400 and through Prama- nita Pracharaks i.e. authorised propagators numbering about 5000 scattered all over in the North-Eastern part of India. It is also alleged that the Samiti from the very inception had acquired assets 165 and properties and the assets and properties at the time of the filing of the petition were stated to be: 10. Security Deposit with Ashok -- Rs. 30,000.00 Paper Mill Ltd. 11. Shares of Assam Coop-apex -- Rs. 5,000.00 Bank Ltd. 17. Value of the old books -- Rs. 3,00,000.00 TOTAL -- Rs. 124,42,000.00 According to the Bidhan of the Samiti the management and administration of the Samiti is run by elected bodies namely Byabasthapika Sabha (meaning the General Council) and the Karyapalika (meaning the Executive Committee), the term of each body is 5 years from the date of holding of their first meeting. Accordingly the term of 166 the Byabasthapika Sabha was to expire on 9.8.87 (five years from the date of holding the first meeting) which was held on 10.8.82 and the term of Karyapalika was to expire on 18.8.87 (five years from the date of the first meeting which was 19.8.82). That under Section 10 of the Bidhan the Karyapalika of the Samiti consisted of 17 members with the following of- fice-bearers: (i) Adhyakasha (President) (ii) Karyadhakshya (Working President) (iii) Upadhakshya (Vice President) (iv) Mantri (General Secretary) (v) Koshadhyaksha (Treasurer) (vi) Six members elected by the Byabasthapika Sabha (vii) The Education Secretary to the Government of Assam or a member nominated by him. (viii) Five members of the Byabasthapika Sabha nominated by the Adhyaksha, and (ix) Pradhan Sachib (Chief Secretary) and other departmental secretaries of the Samiti. According to the petitioner the first meeting of this last Byabasthapika Sabha was held on 10.8.82 wherein peti- tioner No. 2 was elected unanimously as its Mantri (General Secretary) besides other office bearers. According to the Bidhan of the Samiti as it stood in 1982, the Chief Minister of Assam was the Ex-Officio Adhyaksha of the Samiti but as at the time of holding of the first meeting the State of Assam was under President's rule, consequently the' office of Adhyaksha of the Samiti remained vacant as then there was no Chief Minister of Assam. Petitioner No. 2 and other office bearers of the Karyapalika of the Samiti held the first meeting of the Karyapalika on 19.8.82 and the Karyapa- lika was running the day-to-day administration and was managing the affairs of the Samiti according to the Peti- tioner very efficiently and diligently. It is alleged that in early part of 1983 President's rule was lifted from Assam and a Ministry headed by Shri Hiteswar Saikia was installed in power in Assam. But in the meantime the Samiti-in its meeting of the Byabasthapika Sabha held on 17.7.83 passed a resolution for 167 amendment of the provisions of the Bidhan in the following manner: "That the words contained in Section 16 at page 21 of the Bidhan to the effect that the Chief Minister of Assam shall be the Ex-offi- cio Adhyaksha of the Samiti be deleted. All other such references contained in the Bidhan be also accordingly amended. This amendment shall come into force from today the 17.7.83." That the said resolution was adopted in full compliance of Section 30 of the Bidhan and all members present in the meeting except one supported the resolution. This resolution amending Section 16 of the Bidhan was passed considering the difficulties that arose in the working of the Samiti by keeping Chief Minister as the Adhyaksha of the Samiti. According to the petitioner this amendment was sought neces- sary to keep the Samiti away from politics. According to the petitioner this amendment was introduced in accordance with Section 30 of the Constitution (Bidban) of the Samiti which provided: "The Constitution of the Samiti may be amended as follows: (Ka) The proposal for amendment must reach the head office within the month of January every year. (Kha) The amendment proposals will be sent for information to all the members of the Byabas- thapika Sabha from the Office. (Ga) The amendment will be carried out by the 2/3rd members present." According to the petitioner the procedure stated in this Section of the Constitution was followed and as only one person opposed the Constitution amendment was passed. It is further alleged by the petitioner that as this amendment was passed on 17.7.83 from this date the Chief Minister ceased to be the Ex-officio President and since then according to the petitioner he had nothing to do with the Samiti. The post of Ex-officio President was abolished. According to the petitioner that Respondent No. 4 after passing of this amendment of the Bidhan on political consid- eration passed an order dated 7.7.84 contained in the noti- fication No. CMS 202/79/319 168 dated 7.7.84 whereby respondent No. 4 purportedly to act as the Ex-Officio Adhyaksha of the Samiti declared as a state of emergency in the Samiti in exercise of his powers con- ferred under section 16 (Gha) of the Bidban and dissolved the existing Karyapalika of the Samiti with immediate effect and also constituted an ad hoc body with himself as Chairman and five others as members to manage the affairs of the Samiti. The petitioner has also filed a copy of this order. It is alleged by the petitioner that under this order peti- tioners Nos. 1 and 2 were asked to hand over the charges of the management of the Samiti to the Ad hoc Committee. There- upon the petitioner filed a suit being a Title Suit No. 110 of 1984 in the Court of the Assistant District Judge No. 1, Gauhati for a declaration that the order dated 7.7.84 passed by Respondent No. 4 declaring a state of emergency and by which he dissolved the existing Karyapalika of the Samiti and constituted an Ad hoc Committee, as void, illegal and without jurisdiction and unenforceable against the petition- er Society. As on the day on which he passed the Order he was no longer the Adhyaksha as the Constitution has been amended before that day. Petitioner also prayed for perma- nent injunction restraining the respondent No. 4 and other members of the Ad hoc committee, their agents and servants from giving effect to the order. The petitioners also filed an application under Order 39 Rule 1 and 2 of the Code of Civil Procedure for the issuance of a temporary injunction. It is alleged that the Assistant District Judge No. 1, Gauhati by his order dated 19.7.84 issued a notice to the defendants of that suit to show cause as to why a temporary injunction as prayed for by the petitioners should not be granted and fixed 13.8.84 as the date for showing cause. The defendants filed their objection on 21.8.84 and the case was fixed on 25.10.84 for consideration of the question of issuing a temporary injunction. When the matter was pending in the Court for considera- tion of the question of temporary injunction the Governor of Assam purported to act under Clause 1 of Article 230 of the Constitution of India promulgated an Ordinance called the Asom Rashtrabhasha Prachar Samiti (taking over of Management and Control) Ordinance, 1984 and Section 1 sub-clause (ii) of this Ordinance provided that the Ordinance shall extend to all areas over which the Asom Rashtrabhasha Prachar Samiti had its jurisdiction immediately before the commence- ment of the Ordinance by a Notification No. EPG 57/84/16 issued under the signatures of Respondent No. 3 the Governor of Assam fixed Ist of October, 1984 as the appointed day on which the aforesaid Ordinance 169 came into force and Section 3 of the said Ordinance provided that the Government may constitute a Board for the purposes of taking over the management and control of the Samiti consisting of not more than 9 members. According to the petitioners this Ordinance was issued at the instance of the Chief Minister which was unnecessary, unwarranted and un- called for and was against the law laid down by the Consti- tution Bench of this Court. Notification was issued on 7.7.84, Preamble of which reads as under: "Whereas the Chief Minister of Assam in his capacity as Ex-officio Adhyakasha of the Asom R.B.P. Samiti is satisfied that deterioration of the financial condition of the Samiti has resulted in financial deadlock and the group rivalry among the members, confrontation between the management and the employees culminating in institution of law suits, hunger strikes by employees and chaos in administration matters have resulted in admin- istration deadlock." The petitioners contended that what is stated in the Pream- ble is incorrect and misconceived. The financial condition of the Samiti had never deteriorated nor there were any adverse remark by any auditor in the regular auditing of the accounts of the Samiti. It is alleged that even other facts leading to the taking over are wholly incorrect and mala- cious. Thereafter in 1984 Assam Legislative Assembly passed an Act i.e. Act No. XXIII of 1984 replacing the Ordinance and this Act received the assent of the Governor of Assam on 12.8.84 and was published in the Gazette Extraordinary dated 15.12.84. Under Section 3 of this Act the Assam Rashtrabha- sha Prachar Samiti (taking over of Management and Control) Act, 1984, the number of members constituting the Board was raised to 13. By the provisions of this Act virtually the Samiti which was a public body constituted by its members having elected Byabasthapika Sabha and Karyapalika were substituted by Board appointed by the Government and all the functions, properties and affairs of the Samiti were taken over by this Board and it is this action taken under the Ordinance and the Act and ultimately the Act which is the subject matter of challenge in this Writ Petition. As this infringes the fundamental rights of the members who consti- tute the Samiti their rights under Article 19(1)(c) and by this process of taking over the Samiti has been deprived of its assets and properties and even as alleged by the peti- tioners Government has gone to the 170 extent of changing the name of the institution also. It is alleged that after the passing of this Act the notification under section 3 was issued which was EPG 57/34/75 dated 1.10.84 by which the Rashtrabhasha Prachar Board was consti- tuted with respondents 11, 12 and 13 as members and by this order all persons except respondent No. 12 who was not even the member of the Rashtrabhasha Prachar Samiti were nominat- ed. The petitioners also alleged that in fact all this happened because when the then Chief Minister of Assam learnt about the amendment of the Constitution carried out by Byabasthapika Sabha learnt that under the unamended Bidhan was the Ex-officio Adhyaksha has been dropped by the amendment of the Constitution that with mala fide intention he started taking action in a manner in which he could retain the control of the institution. First,he invoked the Constitution itself by superseding the body by invoking emergency provisions but when that was challenged by a suit, an ordinance was brought taking over the Samiti as a whole specially replacing the Byabasthapika Sabha and the Karyapa- lika and later the ordinance was replaced by the Act and it was contended that this all was the mala fide action of the then Chief Minister of Assam and it is further contended that unfortunately even after the new elections and a new Government comes in power in Assam the Act which as its title discloses was a temporary measure was continued at perpetuity, and the Samiti is being run by nominated members and the rights of the members of the Samiti under Article 19 has not only been restricted but has been taken away. It was also contended that the history of the Samiti and the manner in which it was formed and the persons who initially consti- tuted the Samiti is of significance because its history and historical background touches the ideological and sentimen- tal aspirations of the people of Assam and the infringement of this right to form an association under Article 19(1)(c) is challenged as mala fide action motivated with selfish political motivation. It is also contended that by the operation of this Act those who have nothing to do with the Samiti or its ideals and who were not even the members of the Samiti have been nominated as the members of the Board and they are supposed to run the affairs of the Samiti whereas those who have contributed their heart and soul for the ideals of the Samiti and who have put in long years of hard labour to build up are deprived of their right to manage the affairs of the Samiti. It is also contended that even the assets and the properties of the Rashtrabhasha Prachar Samiti is being mismanaged by nominated board as it has no moral attachment to the ideals nor aptitude with the work of the Samiti and the assets are being neutralized. 171 It was also contended that the heading of the Act as it disclosed "An Act to provide for temporary transfer of the management and control of the affairs of A.R.B.P.S. from the Byabasthapika Sabha, Karyapalika and other holders of office of the Assam Rashtrabhasha Prachar Samiti to a Board". This heading of the Act, according to the learned counsel, is just an eye wash as this heading shows that a temporary arrangement was made because the management of the Samiti was not in proper hands and the temporary arrangement was only to improve the functioning of the society and ultimate- ly it has to be handed over back to the elected body consti- tuted under the Bidhan (constitution of the society regis- tered under the Societies Registration Act) but in fact after the passing of this Act in 1984 till today the re- spondent State had no point of time, even thought of restor- ing the body to the normal functioning after holding elec- tion in accordance with the constitution of the Society. In fact even during the hearing of this Writ Petition the counsel appearing for the State was asked to intimate the Court if even now the State knowing that this was a tempo- rary measure is intending to restore the society back with elected functionaries under the constitution. It was indi- cated that the Government of Assam has no intentions even now to end this temporary arrangement of the Samiti. It is plain that although the Act talks of a temporary measure but it is only an eye wash and by this process the State Govern- ment intends to deprive the members of the society their rights under Article 19(1)(c) for all times to come. In the Act there is no provision providing for restoration of the elected bodies which shows that the use of phrase 'tempo- rary' was just an eye wash. Learned counsel appearing for the State attempted to justify the action however denying that it was not because the constitution was amended and therefore the Chief Minis- ter was annoyed but attempted to suggest that there was some mismanagement of the society but in any event there was no logic which could be suggested for such a permanent taking over of the society registered discharging functions which could not be said to be not ideal and which had started working on some ideals which could not be said 'not for public good'. It is clear that now as the Act of 1984 and a Board nominated or appointed under Section 3 of the Act is con- trolling the affairs of the Society it is not necessary to go into the orders passed by the Chief Minister invoking the emergency powers although the facts which were alleged clearly go to show that except that constitution was amended and the Chief Minister was dropped from the place which he used to enjoy before the amendment of the Bidhan (Constitu- tion). There was 172 nothing serious and the Chief Minister who in fact had ceased to be an Adhyaksha because of the constitutional amendment took that action only to stick to the position and the subsequent acts even if mala fide action is not clearly established, as was alleged, we have no hesitation in ob- serving that there appears to be no .justification as it is clear that if the Act was enacted to meet a temporary con- tingency for taking over of the management temporarily it could have provided for the restoration of the elected body in due course. It is significant that this Act is silent and although as quoted above it talks of being temporary act, it continues and even as stated above there appears to be no intention of the State Government to restore the body back to the elected bodies under the constitution of the society itself. In these circumstances therefore there appears to be no justification for all these actions starting from invok- ing the emergency provisions till enacting the present Act i.e. Asom Rashtrabhasha Prachar Samiti (taking over of the Management and Control) Act, 1984. Except the allegations of mala fide which are not admit- ted, rest of the facts are not in dispute. The only sugges- tion made in the counter is that there was mismanagement, delay in examinations and results and it was because of that that management only under this Act was taken over. But neither in the counter nor during the course of arguments anything could be said on behalf of the State for a perma- nent justification of taking over of the management of the Samiti depriving its members the right under Article 19(1)(c) of the Constitution of India. In the counter it was contended that the Legislature of the State was competent under Entry 25 of the List Ill (concurrent list) Schedule 7 of the Constitution to enact this law. Entry 25 List III reads: "25. Education, including technical education, medical education and universities, subject to the provisions of Entries 63, 64, 65 and 66 of List I; vocational and technical training of labour." The mere perusal of Entry 25 will reveal as to how difficult it will be to stretch Entry 25 to mean the authority to deprive an association of its right under Article 19(1)(c) of the Constitution of India. It would have been different situation, if the state felt that it wanted to do the same thing what this Samiti was doing and further the acts of education and for that purpose if it had taken steps to start similar functions at the 173 state level probably the things would have been different. But here we are simply concerned with the taking over of the management of a registered society having large membership and assets and properties following programme and policies living to the ideals which could not be in any way chal- lenged or adversely commented. Article 19(1)(c) of the Constitution provides: "19. Protection of certain rights regarding freedom of speech, etc.--(1) All citizens shall have the right (a) xx xx xx (b) xx xx xx (c) to form associations or unions; (d) xx xx xx (e) xx xx xx (f) xx xx xx (g) xx xx xx" The Constitution Bench of this Court had an occasion to consider exactly a similar situation when a Hindi Sahitya Sammelan was taken over first by a State law and later by an Act of Parliament and this Court considering the question in Damyanti Naranga v. The Union of India and Others, [1971] INSC 60; [1971] 3 SCR 840, observed: "Further, under Section 7(2) of the Act, the Governing Body of the new Sammelan is to consist of such number of persons, not exceed- ing 55, as the Central Government may from time to time determine; and out of these, a number not exceeding 7 are to be nominated by the Central Government from among education- ists of repute and eminent Hindi scholars. These 7 nominees are to be chosen by the Central Government." In the present case the Government has taken the power under Section 3 to appoint a Board and the Government can appoint any one not connected with the Society at all to be in the Board. In the Act which was being examined by the Constitution Bench there were some restrictions on the nominations of persons although the persons were to be nominated by the Central Government but in the present Act it is left to the discretion of the Government to appoint the whole of the Board which will take place of not only 'the Managing Committee i.e. the Karyapalika but also the place of Byabasthapika Sabha which normally used to be an elected body. In this view the observation of 174 the Constitution Bench in Damyanti Naranga's case goes a long way. It is observed in this judgment: 3. It is therefore clear that what was done in the Sammelan Acts which were under examination in the Constitution Bench judgment referred to above, much more has been done in this case. In this case virtually the right of association has been taken away and not only that it is a sort of depriva- tion for all times as it is not even provided that this Board may be an interim Board and thereafter a proper Board will be elected but here this Board will continue to control and manage the affairs of the Society. In the Constitution Bench case their Lordships considered the scope of Article 19(1)(c) in the context of what was contemplated in that Act and observed: "The right to form an association, in our opinion, necessarily implies that the persons forming the Association have also the right to continue to be associated with only those whom they voluntarily admit in the Association. Any law, by which members are introduced in the voluntary Association without any option being given to the members to keep them out, or any law which takes away the membership of those who have voluntarily joined it, will be a law violating the right to form an association. If we were to accept the submission that the right guaranteed by Art. 19(1)(c) is confined to the initial stage of forming an Association and does not protect the right to continue the Association with the membership either chosen by the founders or regulated by rules made by the Association 175 itself, the right would be meaningless be- cause, as soon as an Association is formed, a law may be passed interfering with its compo- sition, so that the Association formed may not be able to function at all. The right can be effective only if it is held to include within it the right to continue the Association with its composition as voluntarily agreed upon by the persons forming the association." It is therefore clear that even on the basis of the pro- nouncement of the Constitution Bench, the Act and the noti- fication issued under this Act taking over the management of the Rashtrabhasha Prachar Samiti could not be accepted to be in accordance with the Constitution. Apart from this it is also clear that although when the Act talks of a temporary measure in fact, the Act does not provide for as to how when the temporary measures comes to an end the elected Byabasthapika Sabha and Karyapalika would be restored. It is not only that but it is also apparent that since 1984 when this Act was passed and a notification appointing a Board was issued, the Government has not chosen to take any steps to restore the Society back to its elected authorities and office bearers, inspite of the fact that we indicated and asked the counsel appearing for the State to let us know even if now the State is intending to restore it back to the Society but unfortunately it appears that with- out considering the question and its constitutional aspects the reply came that the State has no desire to restore the Samiti and therefore we are left with no option but to decide and decide upholding the Constitution and the right of association conferred under Article 19(1)(c) of the Constitution. We therefore allow these writ petitions, set aside the notification issued under the Act enacted by the Assam Legislature holding that the Act itself is ultra vires of the Constitution. We therefore also quash the notifica- tion issued under Section 3 of the Act as ultra vires by which a Board was nominated to replace the Karyapalika and Byabasthapika Sabha. At the time when this Board was constituted under Sec- tion 3 the Karyapalika and Byabasthapika Sabha duly elected were functioning and they had sufficient time to go on and in this view of the matter we further direct that the Karya- palika and Byabasthapika Sabha which were in existence in 1984 when initially the action under the emergency provi- sions was taken followed by the notification under the Ordinance and the Act shall be restored back and they shall take over the management of the Samiti from the Board imme- diately but it is made clear that the Karyapalika and Bya- basthapika Sabha which were 176 functioning in 1984 and which we are restoring will within six months from the date of this Order will hold proper elections in accordance with the Constitution to elect a Byabasthapika and Karyapalika. This is necessary because the period of the Karyapalika and Byabasthapika Sabha which was functioning in 1984 has come to an end although from 1984 till today they were not allowed to function. It is further directed that the authorities, officers appointed by the Board or the State Government shall restore back all assets and properties of the Samiti to the Karyapalika which will be restored immediately after the passing of this Order. The petitioners shall also be entitled to costs of this peti- tion. Costs quantified at Rs. 10,000. R.N.J. Petition allowed.
english
The under mentioned officers are informed that the updation of U-DISE for year 2015-16 through online is completed in the state. A quick analysis of the data revealed that there is a significant difference in enrolment of children in the U-DISE as well as Child info data of 2014-15 to 2015-16 with regard to some schools in respective districts. The State level teams are constituted to visit the assigned districts and conduct physical verification in 10-20 schools in the district with reference to the school records i.e.,Admission/Attendance/Childinfo etc.
english
package rockredis import ( "errors" "fmt" "hash" "io" "math" "os" "path" "path/filepath" "sort" "strconv" "strings" "sync" "sync/atomic" "time" "github.com/spaolacci/murmur3" "github.com/absolute8511/ZanRedisDB/common" "github.com/absolute8511/gorocksdb" "github.com/shirou/gopsutil/mem" ) const ( MAX_CHECKPOINT_NUM = 10 HLLCacheSize = 512 ) var dbLog = common.NewLevelLogger(common.LOG_INFO, common.NewDefaultLogger("db")) func SetLogLevel(level int32) { dbLog.SetLevel(level) } func SetLogger(level int32, logger common.Logger) { dbLog.SetLevel(level) dbLog.Logger = logger } func GetCheckpointDir(term uint64, index uint64) string { return fmt.Sprintf("%016x-%016x", term, index) } var batchableCmds map[string]bool type RockOptions struct { VerifyReadChecksum bool `json:"verify_read_checksum"` BlockSize int `json:"block_size"` BlockCache int64 `json:"block_cache"` CacheIndexAndFilterBlocks bool `json:"cache_index_and_filter_blocks"` WriteBufferSize int `json:"write_buffer_size"` MaxWriteBufferNumber int `json:"max_write_buffer_number"` MinWriteBufferNumberToMerge int `json:"min_write_buffer_number_to_merge"` Level0FileNumCompactionTrigger int `json:"level0_file_num_compaction_trigger"` MaxBytesForLevelBase uint64 `json:"max_bytes_for_level_base"` TargetFileSizeBase uint64 `json:"target_file_size_base"` MaxBackgroundFlushes int `json:"max_background_flushes"` MaxBackgroundCompactions int `json:"max_background_compactions"` MinLevelToCompress int `json:"min_level_to_compress"` MaxMainifestFileSize uint64 `json:"max_mainifest_file_size"` RateBytesPerSec int64 `json:"rate_bytes_per_sec"` BackgroundHighThread int `json:"background_high_thread,omitempty"` BackgroundLowThread int `json:"background_low_thread,omitempty"` AdjustThreadPool bool `json:"adjust_thread_pool,omitempty"` UseSharedCache bool `json:"use_shared_cache,omitempty"` UseSharedRateLimiter bool `json:"use_shared_rate_limiter,omitempty"` DisableWAL bool `json:"disable_wal,omitempty"` DisableMergeCounter bool `json:"disable_merge_counter,omitempty"` } func FillDefaultOptions(opts *RockOptions) { // use large block to reduce index block size for hdd // if using ssd, should use the default value if opts.BlockSize <= 0 { // for hdd use 64KB and above // for ssd use 32KB and below opts.BlockSize = 1024 * 32 } // should about 20% less than host RAM // http://smalldatum.blogspot.com/2016/09/tuning-rocksdb-block-cache.html if opts.BlockCache <= 0 { v, err := mem.VirtualMemory() if err != nil { opts.BlockCache = 1024 * 1024 * 128 } else { opts.BlockCache = int64(v.Total / 100) if opts.UseSharedCache { opts.BlockCache *= 10 } else { if opts.BlockCache < 1024*1024*64 { opts.BlockCache = 1024 * 1024 * 64 } else if opts.BlockCache > 1024*1024*1024*8 { opts.BlockCache = 1024 * 1024 * 1024 * 8 } } } } // keep level0_file_num_compaction_trigger * write_buffer_size * min_write_buffer_number_tomerge = max_bytes_for_level_base to minimize write amplification if opts.WriteBufferSize <= 0 { opts.WriteBufferSize = 1024 * 1024 * 64 } if opts.MaxWriteBufferNumber <= 0 { opts.MaxWriteBufferNumber = 6 } if opts.MinWriteBufferNumberToMerge <= 0 { opts.MinWriteBufferNumberToMerge = 2 } if opts.Level0FileNumCompactionTrigger <= 0 { opts.Level0FileNumCompactionTrigger = 2 } if opts.MaxBytesForLevelBase <= 0 { opts.MaxBytesForLevelBase = 1024 * 1024 * 256 } if opts.TargetFileSizeBase <= 0 { opts.TargetFileSizeBase = 1024 * 1024 * 64 } if opts.MaxBackgroundFlushes <= 0 { opts.MaxBackgroundFlushes = 2 } if opts.MaxBackgroundCompactions <= 0 { opts.MaxBackgroundCompactions = 4 } if opts.MinLevelToCompress <= 0 { opts.MinLevelToCompress = 3 } if opts.MaxMainifestFileSize <= 0 { opts.MaxMainifestFileSize = 1024 * 1024 * 32 } if opts.AdjustThreadPool { if opts.BackgroundHighThread <= 0 { opts.BackgroundHighThread = 2 } if opts.BackgroundLowThread <= 0 { opts.BackgroundLowThread = 4 } } } type SharedRockConfig struct { SharedCache *gorocksdb.Cache SharedEnv *gorocksdb.Env SharedRateLimiter *gorocksdb.RateLimiter } type RockConfig struct { DataDir string EnableTableCounter bool // this will ignore all update and non-exist delete EstimateTableCounter bool ExpirationPolicy common.ExpirationPolicy DefaultReadOpts *gorocksdb.ReadOptions DefaultWriteOpts *gorocksdb.WriteOptions SharedConfig *SharedRockConfig RockOptions } func NewRockConfig() *RockConfig { c := &RockConfig{ DefaultReadOpts: gorocksdb.NewDefaultReadOptions(), DefaultWriteOpts: gorocksdb.NewDefaultWriteOptions(), EnableTableCounter: true, EstimateTableCounter: false, } c.DefaultReadOpts.SetVerifyChecksums(false) FillDefaultOptions(&c.RockOptions) return c } func NewSharedRockConfig(opt RockOptions) *SharedRockConfig { rc := &SharedRockConfig{} if opt.UseSharedCache { if opt.BlockCache <= 0 { v, err := mem.VirtualMemory() if err != nil { opt.BlockCache = 1024 * 1024 * 128 * 10 } else { opt.BlockCache = int64(v.Total / 10) } } rc.SharedCache = gorocksdb.NewLRUCache(opt.BlockCache) } if opt.AdjustThreadPool { rc.SharedEnv = gorocksdb.NewDefaultEnv() if opt.BackgroundHighThread <= 0 { opt.BackgroundHighThread = 3 } if opt.BackgroundLowThread <= 0 { opt.BackgroundLowThread = 6 } rc.SharedEnv.SetBackgroundThreads(opt.BackgroundLowThread) rc.SharedEnv.SetHighPriorityBackgroundThreads(opt.BackgroundHighThread) } if opt.UseSharedRateLimiter && opt.RateBytesPerSec > 0 { rc.SharedRateLimiter = gorocksdb.NewGenericRateLimiter(opt.RateBytesPerSec, 100*1000, 10) } return rc } func (src *SharedRockConfig) Destroy() { if src.SharedCache != nil { src.SharedCache.Destroy() } if src.SharedEnv != nil { src.SharedEnv.Destroy() } if src.SharedRateLimiter != nil { src.SharedRateLimiter.Destroy() } } type CheckpointSortNames []string func (self CheckpointSortNames) Len() int { return len(self) } func (self CheckpointSortNames) Swap(i, j int) { self[i], self[j] = self[j], self[i] } func (self CheckpointSortNames) Less(i, j int) bool { left := path.Base(self[i]) right := path.Base(self[j]) lsplit := strings.SplitN(left, "-", 2) rsplit := strings.SplitN(right, "-", 2) if len(lsplit) != 2 || len(rsplit) != 2 { dbLog.Panicf("the checkpoint name is not valid: %v, %v", left, right) } lterm, err := strconv.ParseUint(lsplit[0], 16, 64) if err != nil { dbLog.Panicf("the checkpoint name is not valid: %v, %v, %v", left, right, err) } lindex, _ := strconv.ParseUint(lsplit[1], 16, 64) rterm, _ := strconv.ParseUint(rsplit[0], 16, 64) rindex, _ := strconv.ParseUint(rsplit[1], 16, 64) if lterm == rterm { return lindex < rindex } return lterm < rterm } func purgeOldCheckpoint(keepNum int, checkpointDir string) { defer func() { if e := recover(); e != nil { dbLog.Infof("purge old checkpoint failed: %v", e) } }() checkpointList, err := filepath.Glob(path.Join(checkpointDir, "*-*")) if err != nil { return } if len(checkpointList) > keepNum { sortedNameList := CheckpointSortNames(checkpointList) sort.Sort(sortedNameList) for i := 0; i < len(sortedNameList)-keepNum; i++ { os.RemoveAll(sortedNameList[i]) dbLog.Infof("clean checkpoint : %v", sortedNameList[i]) } } } type RockDB struct { expiration cfg *RockConfig eng *gorocksdb.DB dbOpts *gorocksdb.Options defaultWriteOpts *gorocksdb.WriteOptions defaultReadOpts *gorocksdb.ReadOptions wb *gorocksdb.WriteBatch lruCache *gorocksdb.Cache rl *gorocksdb.RateLimiter quit chan struct{} wg sync.WaitGroup backupC chan *BackupInfo engOpened int32 indexMgr *IndexMgr isBatching int32 checkpointDirLock sync.Mutex hasher64 hash.Hash64 hllCache *hllCache stopping int32 } func OpenRockDB(cfg *RockConfig) (*RockDB, error) { if len(cfg.DataDir) == 0 { return nil, errors.New("config error") } if cfg.DisableWAL { cfg.DefaultWriteOpts.DisableWAL(true) } os.MkdirAll(cfg.DataDir, common.DIR_PERM) // options need be adjust due to using hdd or sdd, please reference // https://github.com/facebook/rocksdb/wiki/RocksDB-Tuning-Guide bbto := gorocksdb.NewDefaultBlockBasedTableOptions() // use large block to reduce index block size for hdd // if using ssd, should use the default value bbto.SetBlockSize(cfg.BlockSize) // should about 20% less than host RAM // http://smalldatum.blogspot.com/2016/09/tuning-rocksdb-block-cache.html var lru *gorocksdb.Cache if cfg.RockOptions.UseSharedCache { if cfg.SharedConfig == nil || cfg.SharedConfig.SharedCache == nil { return nil, errors.New("missing shared cache instance") } bbto.SetBlockCache(cfg.SharedConfig.SharedCache) dbLog.Infof("use shared cache: %v", cfg.SharedConfig.SharedCache) } else { lru = gorocksdb.NewLRUCache(cfg.BlockCache) bbto.SetBlockCache(lru) } // cache index and filter blocks can save some memory, // if not cache, the index and filter will be pre-loaded in memory bbto.SetCacheIndexAndFilterBlocks(cfg.CacheIndexAndFilterBlocks) // /* filter should not block_based, use sst based to reduce cpu */ filter := gorocksdb.NewBloomFilter(10, false) bbto.SetFilterPolicy(filter) opts := gorocksdb.NewDefaultOptions() // optimize filter for hit, use less memory since last level will has no bloom filter // opts.OptimizeFilterForHits(true) opts.SetBlockBasedTableFactory(bbto) if cfg.RockOptions.AdjustThreadPool { if cfg.SharedConfig == nil || cfg.SharedConfig.SharedEnv == nil { return nil, errors.New("missing shared env instance") } opts.SetEnv(cfg.SharedConfig.SharedEnv) dbLog.Infof("use shared env: %v", cfg.SharedConfig.SharedEnv) } var rl *gorocksdb.RateLimiter if cfg.RateBytesPerSec > 0 { if cfg.UseSharedRateLimiter { if cfg.SharedConfig == nil { return nil, errors.New("missing shared instance") } opts.SetRateLimiter(cfg.SharedConfig.SharedRateLimiter) dbLog.Infof("use shared rate limiter: %v", cfg.SharedConfig.SharedRateLimiter) } else { rl = gorocksdb.NewGenericRateLimiter(cfg.RateBytesPerSec, 100*1000, 10) opts.SetRateLimiter(rl) } } opts.SetCreateIfMissing(true) opts.SetMaxOpenFiles(-1) // keep level0_file_num_compaction_trigger * write_buffer_size * min_write_buffer_number_tomerge = max_bytes_for_level_base to minimize write amplification opts.SetWriteBufferSize(cfg.WriteBufferSize) opts.SetMaxWriteBufferNumber(cfg.MaxWriteBufferNumber) opts.SetMinWriteBufferNumberToMerge(cfg.MinWriteBufferNumberToMerge) opts.SetLevel0FileNumCompactionTrigger(cfg.Level0FileNumCompactionTrigger) opts.SetMaxBytesForLevelBase(cfg.MaxBytesForLevelBase) opts.SetTargetFileSizeBase(cfg.TargetFileSizeBase) opts.SetMaxBackgroundFlushes(cfg.MaxBackgroundFlushes) opts.SetMaxBackgroundCompactions(cfg.MaxBackgroundCompactions) opts.SetMinLevelToCompress(cfg.MinLevelToCompress) // we use table, so we use prefix seek feature opts.SetPrefixExtractor(gorocksdb.NewFixedPrefixTransform(3)) opts.SetMemtablePrefixBloomSizeRatio(0.1) opts.EnableStatistics() opts.SetMaxLogFileSize(1024 * 1024 * 32) opts.SetLogFileTimeToRoll(3600 * 24 * 3) opts.SetMaxManifestFileSize(cfg.MaxMainifestFileSize) opts.SetMaxSuccessiveMerges(1000) // https://github.com/facebook/mysql-5.6/wiki/my.cnf-tuning // rate limiter need to reduce the compaction io if !cfg.DisableMergeCounter { if cfg.EnableTableCounter { opts.SetUint64AddMergeOperator() } } else { cfg.EnableTableCounter = false } db := &RockDB{ cfg: cfg, dbOpts: opts, lruCache: lru, rl: rl, defaultReadOpts: cfg.DefaultReadOpts, defaultWriteOpts: cfg.DefaultWriteOpts, wb: gorocksdb.NewWriteBatch(), backupC: make(chan *BackupInfo), quit: make(chan struct{}), hasher64: murmur3.New64(), } switch cfg.ExpirationPolicy { case common.ConsistencyDeletion: db.expiration = newConsistencyExpiration(db) case common.LocalDeletion: db.expiration = newLocalExpiration(db) //TODO //case common.PeriodicalRotation: default: return nil, errors.New("unsupported ExpirationPolicy") } err := db.reOpenEng() if err != nil { return nil, err } os.MkdirAll(db.GetBackupDir(), common.DIR_PERM) dbLog.Infof("rocksdb opened: %v", db.GetDataDir()) db.wg.Add(1) go func() { defer db.wg.Done() db.backupLoop() }() return db, nil } func GetBackupDir(base string) string { return path.Join(base, "rocksdb_backup") } func (r *RockDB) CheckExpiredData(buffer common.ExpiredDataBuffer, stop chan struct{}) error { if r.cfg.ExpirationPolicy != common.ConsistencyDeletion { return fmt.Errorf("can not check expired data at the expiration-policy:%d", r.cfg.ExpirationPolicy) } return r.expiration.check(buffer, stop) } func (r *RockDB) GetBackupBase() string { return r.cfg.DataDir } func (r *RockDB) GetBackupDir() string { return GetBackupDir(r.cfg.DataDir) } func GetDataDirFromBase(base string) string { return path.Join(base, "rocksdb") } func (r *RockDB) GetDataDir() string { return path.Join(r.cfg.DataDir, "rocksdb") } func (r *RockDB) reOpenEng() error { var err error hcache, err := newHLLCache(HLLCacheSize, r) if err != nil { return err } r.hllCache = hcache r.eng, err = gorocksdb.OpenDb(r.dbOpts, r.GetDataDir()) r.indexMgr = NewIndexMgr() if err != nil { return err } err = r.indexMgr.LoadIndexes(r) if err != nil { dbLog.Infof("rocksdb %v load index failed: %v", r.GetDataDir(), err) r.eng.Close() return err } r.expiration.Start() atomic.StoreInt32(&r.engOpened, 1) dbLog.Infof("rocksdb reopened: %v", r.GetDataDir()) return nil } func (r *RockDB) getDBEng() *gorocksdb.DB { e := r.eng return e } func (r *RockDB) getIndexer() *IndexMgr { e := r.indexMgr return e } func (r *RockDB) CompactRange() { var rg gorocksdb.Range r.eng.CompactRange(rg) } // [start, end) func (r *RockDB) CompactTableRange(table string) { dts := []byte{KVType, HashType, ListType, SetType, ZSetType} dtsMeta := []byte{KVType, HSizeType, LMetaType, SSizeType, ZSizeType} for i, dt := range dts { rgs, err := getTableDataRange(dt, []byte(table), nil, nil) if err != nil { dbLog.Infof("failed to build dt %v data range: %v", dt, err) continue } // compact data range dbLog.Infof("compacting dt %v data range: %v", dt, rgs) for _, rg := range rgs { r.eng.CompactRange(rg) } // compact meta range minKey, maxKey, err := getTableMetaRange(dtsMeta[i], []byte(table), nil, nil) var rg gorocksdb.Range rg.Start = minKey rg.Limit = maxKey dbLog.Infof("compacting dt %v meta range: %v, %v", dt, minKey, maxKey) r.eng.CompactRange(rg) } } func (r *RockDB) closeEng() { if r.eng != nil { if atomic.CompareAndSwapInt32(&r.engOpened, 1, 0) { r.hllCache.Flush() r.indexMgr.Close() r.expiration.Stop() r.eng.Close() dbLog.Infof("rocksdb engine closed: %v", r.GetDataDir()) } } } func (r *RockDB) Close() { if !atomic.CompareAndSwapInt32(&r.stopping, 0, 1) { return } close(r.quit) r.wg.Wait() r.closeEng() if r.expiration != nil { r.expiration.Destroy() r.expiration = nil } if r.defaultReadOpts != nil { r.defaultReadOpts.Destroy() r.defaultReadOpts = nil } if r.defaultWriteOpts != nil { r.defaultWriteOpts.Destroy() } if r.wb != nil { r.wb.Destroy() } if r.dbOpts != nil { r.dbOpts.Destroy() r.dbOpts = nil } if r.lruCache != nil { r.lruCache.Destroy() r.lruCache = nil } if r.rl != nil { r.rl.Destroy() r.rl = nil } dbLog.Infof("rocksdb %v closed", r.cfg.DataDir) } func (r *RockDB) GetStatistics() string { return r.dbOpts.GetStatistics() } func getTableDataRange(dt byte, table []byte, start, end []byte) ([]gorocksdb.Range, error) { minKey, err := encodeFullScanMinKey(dt, table, start, nil) if err != nil { dbLog.Infof("failed to build dt %v range: %v", dt, err) return nil, err } var maxKey []byte if end == nil { maxKey = encodeDataTableEnd(dt, table) } else { maxKey, err = encodeFullScanMinKey(dt, table, end, nil) } if err != nil { dbLog.Infof("failed to build dt %v range: %v", dt, err) return nil, err } rgs := make([]gorocksdb.Range, 0, 2) rgs = append(rgs, gorocksdb.Range{Start: minKey, Limit: maxKey}) if dt == ZSetType { // zset has key-score-member data except the key-member data zminKey := zEncodeStartKey(table, start) var zmaxKey []byte if end == nil { zmaxKey = encodeDataTableEnd(ZScoreType, []byte(table)) } else { zmaxKey = zEncodeStopKey(table, end) } rgs = append(rgs, gorocksdb.Range{Start: zminKey, Limit: zmaxKey}) } dbLog.Debugf("table dt %v data range: %v", dt, rgs) return rgs, nil } func getTableMetaRange(dt byte, table []byte, start, end []byte) ([]byte, []byte, error) { tableStart := append(table, tableStartSep) tableStart = append(tableStart, start...) minMetaKey, err := encodeScanKey(dt, tableStart) if err != nil { return nil, nil, err } tableStart = tableStart[:0] if end == nil { tableStart = append(table, tableStartSep+1) } else { tableStart = append(table, tableStartSep) tableStart = append(tableStart, end...) } maxMetaKey, err := encodeScanKey(dt, tableStart) if err != nil { return nil, nil, err } dbLog.Debugf("table dt %v meta range: %v, %v", dt, minMetaKey, maxMetaKey) return minMetaKey, maxMetaKey, nil } // [start, end) func (r *RockDB) DeleteTableRange(dryrun bool, table string, start []byte, end []byte) error { // TODO: need handle index and meta data, since index need scan if we delete part // range of table, we can only allow delete whole table if it has index. // fixme: how to handle the table key number counter, scan to count the deleted number is too slow tidx := r.indexMgr.GetTableIndexes(table) if tidx != nil { return errors.New("drop table with any index is not supported currently") } wb := gorocksdb.NewWriteBatch() defer wb.Destroy() // kv, hash, set, list, zset dts := []byte{KVType, HashType, ListType, SetType, ZSetType} dtsMeta := []byte{KVType, HSizeType, LMetaType, SSizeType, ZSizeType} for i, dt := range dts { // delete meta and data rgs, err := getTableDataRange(dt, []byte(table), start, end) if err != nil { dbLog.Infof("failed to build dt %v range: %v", dt, err) continue } dbLog.Infof("delete dt %v data range: %v", dt, rgs) // delete meta minMetaKey, maxMetaKey, err := getTableMetaRange(dtsMeta[i], []byte(table), start, end) if err != nil { continue } dbLog.Infof("deleting dt %v meta range: %v, %v, %v, %v", dt, minMetaKey, maxMetaKey, string(minMetaKey), string(maxMetaKey)) if dryrun { continue } for _, rg := range rgs { wb.DeleteRange(rg.Start, rg.Limit) } wb.DeleteRange(minMetaKey, maxMetaKey) if start == nil && end == nil { // delete table counter r.DelTableKeyCount([]byte(table), wb) } } if dryrun { return nil } err := r.eng.Write(r.defaultWriteOpts, wb) if err != nil { dbLog.Infof("failed to delete table %v range: %v", table, err) } return nil } func (r *RockDB) GetBTablesSizes(tables [][]byte) []int64 { // try all data types for each table tableTotals := make([]int64, 0, len(tables)) for _, table := range tables { ss := r.GetTableSizeInRange(string(table), nil, nil) tableTotals = append(tableTotals, ss) } return tableTotals } // [start, end) func (r *RockDB) GetTablesSizes(tables []string) []int64 { // try all data types for each table tableTotals := make([]int64, 0, len(tables)) for _, table := range tables { ss := r.GetTableSizeInRange(table, nil, nil) tableTotals = append(tableTotals, ss) } return tableTotals } // [start, end) func (r *RockDB) GetTableSizeInRange(table string, start []byte, end []byte) int64 { dts := []byte{KVType, HashType, ListType, SetType, ZSetType} dtsMeta := []byte{KVType, HSizeType, LMetaType, SSizeType, ZSizeType} rgs := make([]gorocksdb.Range, 0, len(dts)) for i, dt := range dts { // data range drgs, err := getTableDataRange(dt, []byte(table), start, end) if err != nil { dbLog.Infof("failed to build dt %v range: %v", dt, err) continue } rgs = append(rgs, drgs...) // meta range minMetaKey, maxMetaKey, err := getTableMetaRange(dtsMeta[i], []byte(table), start, end) if err != nil { dbLog.Infof("failed to build dt %v meta range: %v", dt, err) continue } var rgMeta gorocksdb.Range rgMeta.Start = minMetaKey rgMeta.Limit = maxMetaKey rgs = append(rgs, rgMeta) } sList := r.eng.GetApproximateSizes(rgs, true) dbLog.Debugf("range %v sizes: %v", rgs, sList) total := uint64(0) for _, ss := range sList { total += ss } return int64(total) } // [start, end) func (r *RockDB) GetTableApproximateNumInRange(table string, start []byte, end []byte) int64 { numStr := r.eng.GetProperty("rocksdb.estimate-num-keys") num, err := strconv.Atoi(numStr) if err != nil { dbLog.Infof("total keys num error: %v, %v", numStr, err) return 0 } if num <= 0 { dbLog.Debugf("total keys num zero: %v", numStr) return 0 } dts := []byte{KVType, HashType, ListType, SetType, ZSetType} dtsMeta := []byte{KVType, HSizeType, LMetaType, SSizeType, ZSizeType} rgs := make([]gorocksdb.Range, 0, len(dts)) for i, dt := range dts { // meta range minMetaKey, maxMetaKey, err := getTableMetaRange(dtsMeta[i], []byte(table), start, end) if err != nil { dbLog.Infof("failed to build dt %v meta range: %v", dt, err) continue } var rgMeta gorocksdb.Range rgMeta.Start = minMetaKey rgMeta.Limit = maxMetaKey rgs = append(rgs, rgMeta) } filteredRgs := make([]gorocksdb.Range, 0, len(dts)) sList := r.eng.GetApproximateSizes(rgs, true) for i, s := range sList { if s > 0 { filteredRgs = append(filteredRgs, rgs[i]) } } keyNum := int64(r.eng.GetApproximateKeyNum(filteredRgs)) dbLog.Debugf("total db key num: %v, table key num %v, %v", num, keyNum, sList) // use GetApproximateSizes and estimate-keys-num in property // refer: https://github.com/facebook/mysql-5.6/commit/4ca34d2498e8d16ede73a7955d1ab101a91f102f // range records = estimate-keys-num * GetApproximateSizes(range) / GetApproximateSizes (total) // use GetPropertiesOfTablesInRange to get number of keys in sst return int64(keyNum) } func (r *RockDB) GetInternalStatus() map[string]interface{} { status := make(map[string]interface{}) bbt := r.dbOpts.GetBlockBasedTableFactory() if bbt != nil { bc := bbt.GetBlockCache() if bc != nil { status["block-cache-usage"] = bc.GetUsage() status["block-cache-pinned-usage"] = bc.GetPinnedUsage() } } memStr := r.eng.GetProperty("rocksdb.estimate-table-readers-mem") status["estimate-table-readers-mem"] = memStr memStr = r.eng.GetProperty("rocksdb.cur-size-all-mem-tables") status["cur-size-all-mem-tables"] = memStr memStr = r.eng.GetProperty("rocksdb.cur-size-active-mem-table") status["cur-size-active-mem-tables"] = memStr return status } func (r *RockDB) GetInternalPropertyStatus(p string) string { return r.eng.GetProperty(p) } type BackupInfo struct { backupDir string started chan struct{} done chan struct{} rsp []byte err error } func newBackupInfo(dir string) *BackupInfo { return &BackupInfo{ backupDir: dir, started: make(chan struct{}), done: make(chan struct{}), } } func (self *BackupInfo) WaitReady() { select { case <-self.started: case <-self.done: } } func (self *BackupInfo) GetResult() ([]byte, error) { select { case <-self.done: } return self.rsp, self.err } func (r *RockDB) backupLoop() { for { select { case rsp, ok := <-r.backupC: if !ok { return } func() { // before close rsp.done or rsp.started, the raft loop will block, // after the chan closed, the raft loop continue, so we need make sure // the db engine will not be closed while doing checkpoint, we need hold read lock // before closing the chan. defer close(rsp.done) dbLog.Infof("begin backup to:%v \n", rsp.backupDir) start := time.Now() ck, err := gorocksdb.NewCheckpoint(r.eng) if err != nil { dbLog.Infof("init checkpoint failed: %v", err) rsp.err = err return } r.checkpointDirLock.Lock() _, err = os.Stat(rsp.backupDir) if !os.IsNotExist(err) { dbLog.Infof("checkpoint exist: %v, remove it", rsp.backupDir) os.RemoveAll(rsp.backupDir) } rsp.rsp = []byte(rsp.backupDir) r.eng.RLock() if r.eng.IsOpened() { time.AfterFunc(time.Millisecond*10, func() { close(rsp.started) }) err = ck.Save(rsp.backupDir, math.MaxUint64) } else { err = errors.New("db engine closed") } r.eng.RUnlock() r.checkpointDirLock.Unlock() if err != nil { dbLog.Infof("save checkpoint failed: %v", err) rsp.err = err return } cost := time.Now().Sub(start) dbLog.Infof("backup done (cost %v), check point to: %v\n", cost.String(), rsp.backupDir) // purge some old checkpoint r.checkpointDirLock.Lock() purgeOldCheckpoint(MAX_CHECKPOINT_NUM, r.GetBackupDir()) r.checkpointDirLock.Unlock() }() case <-r.quit: return } } } func (r *RockDB) Backup(term uint64, index uint64) *BackupInfo { fname := GetCheckpointDir(term, index) checkpointDir := path.Join(r.GetBackupDir(), fname) bi := newBackupInfo(checkpointDir) r.hllCache.Flush() select { case r.backupC <- bi: default: return nil } return bi } func (r *RockDB) IsLocalBackupOK(term uint64, index uint64) (bool, error) { backupDir := r.GetBackupDir() checkpointDir := GetCheckpointDir(term, index) fullPath := path.Join(backupDir, checkpointDir) _, err := os.Stat(fullPath) if os.IsNotExist(err) { dbLog.Infof("checkpoint not exist: %v", fullPath) return false, err } dbLog.Infof("begin check local checkpoint : %v", fullPath) defer dbLog.Infof("check local checkpoint : %v done", fullPath) r.checkpointDirLock.Lock() defer r.checkpointDirLock.Unlock() ro := *r.dbOpts ro.SetCreateIfMissing(false) db, err := gorocksdb.OpenDbForReadOnly(&ro, fullPath, false) if err != nil { dbLog.Infof("checkpoint open failed: %v", err) return false, err } db.Close() return true, nil } func copyFile(src, dst string, override bool) error { sfi, err := os.Stat(src) if err != nil { return err } if !sfi.Mode().IsRegular() { return fmt.Errorf("copyfile: non-regular source file %v (%v)", sfi.Name(), sfi.Mode().String()) } _, err = os.Stat(dst) if err != nil { if !os.IsNotExist(err) { return err } } else { if !override { return nil } } in, err := os.Open(src) if err != nil { return err } defer in.Close() out, err := os.Create(dst) if err != nil { return err } _, err = io.Copy(out, in) if err != nil { out.Close() return err } err = out.Sync() if err != nil { out.Close() return err } return out.Close() } func (r *RockDB) Restore(term uint64, index uint64) error { // write meta (snap term and index) and check the meta data in the backup backupDir := r.GetBackupDir() hasBackup, _ := r.IsLocalBackupOK(term, index) if !hasBackup { return errors.New("no backup for restore") } checkpointDir := GetCheckpointDir(term, index) start := time.Now() dbLog.Infof("begin restore from checkpoint: %v\n", checkpointDir) r.closeEng() select { case <-r.quit: return errors.New("db is quiting") default: } // 1. remove all files in current db except sst files // 2. get the list of sst in checkpoint // 3. remove all the sst files not in the checkpoint list // 4. copy all files from checkpoint to current db and do not override sst matchName := path.Join(r.GetDataDir(), "*") nameList, err := filepath.Glob(matchName) if err != nil { dbLog.Infof("list files failed: %v\n", err) return err } ckNameList, err := filepath.Glob(path.Join(backupDir, checkpointDir, "*")) if err != nil { dbLog.Infof("list checkpoint files failed: %v\n", err) return err } ckSstNameMap := make(map[string]string) for _, fn := range ckNameList { if strings.HasSuffix(fn, ".sst") { ckSstNameMap[path.Base(fn)] = fn } } for _, fn := range nameList { shortName := path.Base(fn) if strings.HasPrefix(shortName, "LOG") { continue } if strings.HasSuffix(shortName, ".sst") { if fullName, ok := ckSstNameMap[shortName]; ok { stat1, err1 := os.Stat(fullName) stat2, err2 := os.Stat(fn) if err1 == nil && err2 == nil { if stat1.Size() == stat2.Size() { dbLog.Infof("keeping sst file: %v", fn) continue } else { dbLog.Infof("no keeping sst file %v for mismatch size: %v, %v", fn, stat1, stat2) } } else { dbLog.Infof("no keeping sst file %v for err: %v, %v", fn, err1, err2) } } } dbLog.Infof("removing: %v", fn) os.RemoveAll(fn) } for _, fn := range ckNameList { if strings.HasPrefix(path.Base(fn), "LOG") { dbLog.Infof("ignore copy LOG file: %v", fn) continue } dst := path.Join(r.GetDataDir(), path.Base(fn)) err := copyFile(fn, dst, false) if err != nil { dbLog.Infof("copy %v to %v failed: %v", fn, dst, err) return err } else { dbLog.Infof("copy %v to %v done", fn, dst) } } err = r.reOpenEng() dbLog.Infof("restore done, cost: %v\n", time.Now().Sub(start)) if err != nil { dbLog.Infof("reopen the restored db failed: %v\n", err) } return err } func (r *RockDB) ClearBackup(term uint64, index uint64) error { backupDir := r.GetBackupDir() checkpointDir := GetCheckpointDir(term, index) return os.RemoveAll(path.Join(backupDir, checkpointDir)) } func (r *RockDB) GetIndexSchema(table string) (*common.IndexSchema, error) { return r.indexMgr.GetIndexSchemaInfo(r, table) } func (r *RockDB) GetAllIndexSchema() (map[string]*common.IndexSchema, error) { return r.indexMgr.GetAllIndexSchemaInfo(r) } func (r *RockDB) AddHsetIndex(table string, hindex *common.HsetIndexSchema) error { indexInfo := HsetIndexInfo{ Name: []byte(hindex.Name), IndexField: []byte(hindex.IndexField), PrefixLen: hindex.PrefixLen, Unique: hindex.Unique, ValueType: IndexPropertyDType(hindex.ValueType), State: IndexState(hindex.State), } index := &HsetIndex{ Table: []byte(table), HsetIndexInfo: indexInfo, } return r.indexMgr.AddHsetIndex(r, index) } func (r *RockDB) UpdateHsetIndexState(table string, hindex *common.HsetIndexSchema) error { return r.indexMgr.UpdateHsetIndexState(r, table, hindex.IndexField, IndexState(hindex.State)) } func (r *RockDB) BeginBatchWrite() error { if atomic.CompareAndSwapInt32(&r.isBatching, 0, 1) { r.wb.Clear() return nil } return errors.New("another batching is waiting") } func (r *RockDB) MaybeClearBatch() { if atomic.LoadInt32(&r.isBatching) == 1 { return } r.wb.Clear() } func (r *RockDB) MaybeCommitBatch() error { if atomic.LoadInt32(&r.isBatching) == 1 { return nil } return r.eng.Write(r.defaultWriteOpts, r.wb) } func (r *RockDB) CommitBatchWrite() error { err := r.eng.Write(r.defaultWriteOpts, r.wb) if err != nil { dbLog.Infof("commit write error: %v", err) } atomic.StoreInt32(&r.isBatching, 0) return err } func IsBatchableWrite(cmd string) bool { _, ok := batchableCmds[cmd] return ok } func SetPerfLevel(level int) { if level <= 0 || level > 4 { DisablePerfLevel() return } gorocksdb.SetPerfLevel(gorocksdb.PerfLevel(level)) } func IsPerfEnabledLevel(lv int) bool { if lv <= 0 || lv > 4 { return false } return lv != gorocksdb.PerfDisable } func DisablePerfLevel() { gorocksdb.SetPerfLevel(gorocksdb.PerfDisable) } func init() { batchableCmds = make(map[string]bool) // command need response value (not just error or ok) can not be batched // batched command may cause the table count not-exactly. batchableCmds["set"] = true batchableCmds["setex"] = true batchableCmds["del"] = true batchableCmds["hmset"] = true }
go
<reponame>liyinda/viewdns<filename>frontend/vue-admin-template/node_modules/.cache/vue-loader/40b470800f10dcd8e48c85a355481de2.json<gh_stars>1-10 {"remainingRequest":"/home/gopath/src/github.com/liyinda/viewdns/frontend/vue-admin-template/node_modules/vue-loader/lib/index.js??vue-loader-options!/home/gopath/src/github.com/liyinda/viewdns/frontend/vue-admin-template/src/views/table/index.vue?vue&type=template&id=e97432b2&","dependencies":[{"path":"/home/gopath/src/github.com/liyinda/viewdns/frontend/vue-admin-template/src/views/table/index.vue","mtime":1572349877554},{"path":"/home/gopath/src/github.com/liyinda/viewdns/frontend/vue-admin-template/node_modules/cache-loader/dist/cjs.js","mtime":1571281905841},{"path":"/home/gopath/src/github.com/liyinda/viewdns/frontend/vue-admin-template/node_modules/vue-loader/lib/loaders/templateLoader.js","mtime":1571281915879},{"path":"/home/gopath/src/github.com/liyinda/viewdns/frontend/vue-admin-template/node_modules/cache-loader/dist/cjs.js","mtime":1571281905841},{"path":"/home/gopath/src/github.com/liyinda/viewdns/frontend/vue-admin-template/node_modules/vue-loader/lib/index.js","mtime":1571281915869}],"contextDependencies":[],"result":["\n<div class=\"app-container\">\n <el-table\n v-loading=\"listLoading\"\n :data=\"list\"\n element-loading-text=\"Loading\"\n border\n fit\n highlight-current-row\n >\n <el-table-column align=\"center\" label=\"ID\" width=\"95\">\n <template slot-scope=\"scope\">\n {{ scope.$index }}\n </template>\n </el-table-column>\n <el-table-column label=\"域名\">\n <template slot-scope=\"scope\">\n {{ scope.row.domainname }}\n </template>\n </el-table-column>\n <el-table-column label=\"记录值\" width=\"200\" align=\"center\">\n <template slot-scope=\"scope\">\n <span>{{ scope.row.rdata }}</span>\n </template>\n </el-table-column>\n <el-table-column label=\"类型\" width=\"120\" align=\"center\">\n <template slot-scope=\"scope\">\n <span>{{ scope.row.type }}</span>\n </template>\n </el-table-column>\n <el-table-column label=\"TTL\" width=\"120\" align=\"center\">\n <template slot-scope=\"scope\">\n {{ scope.row.ttl }}\n </template>\n </el-table-column>\n <el-table-column class-name=\"status-col\" label=\"Status\" width=\"150\" align=\"center\">\n <template slot-scope=\"scope\">\n <el-tag :type=\"scope.row.status | statusFilter\">{{ scope.row.status }}</el-tag>\n </template>\n </el-table-column>\n </el-table>\n</div>\n",null]}
json
<reponame>GlarosConsulting/atena-server import { AgreementGetPayload, AgreementCreateInput, AgreementUpdateInput, AgreementWhereInput, } from '@prisma/client'; import Repository from './Repository'; export type Agreement = AgreementGetPayload<{ include: { company: { include: { city: true; }; }; proposalData: { include: { data: { include: { status: true; }; }; programs: { include: { details: { include: { couterpartValues: true; transferValues: true; }; }; }; }; participants: true; }; }; workPlan: { include: { physicalChrono: { include: { list: true; values: true; }; }; disbursementChrono: { include: { list: true; values: { include: { registered: true; register: true; total: true; }; }; }; }; detailedApplicationPlan: { include: { list: true; values: { include: { assets: true; tributes: true; construction: true; services: true; others: true; administrative: true; }; }; }; }; consolidatedApplicationPlan: { include: { list: true; total: true; }; }; }; }; convenientExecution: { include: { executionProcesses: { include: { details: true; }; }; contracts: { include: { details: true; }; }; }; }; accountability: { include: { data: true; }; }; }; }>; class AgreementRepository extends Repository< Agreement, AgreementCreateInput, AgreementUpdateInput > { private readonly include = { company: { include: { city: true, }, }, proposalData: { include: { data: { include: { status: true, }, }, programs: { include: { details: { include: { couterpartValues: true, transferValues: true, }, }, }, }, participants: true, }, }, workPlan: { include: { physicalChrono: { include: { list: true, values: true, }, }, disbursementChrono: { include: { list: true, values: { include: { registered: true, register: true, total: true, }, }, }, }, detailedApplicationPlan: { include: { list: true, values: { include: { assets: true, tributes: true, construction: true, services: true, others: true, administrative: true, }, }, }, }, consolidatedApplicationPlan: { include: { list: true, total: true, }, }, }, }, convenientExecution: { include: { executionProcesses: { include: { details: true, }, }, contracts: { include: { details: true, }, }, }, }, accountability: { include: { data: true, }, }, }; findAll(where?: AgreementWhereInput): Promise<Agreement[]> { return this.prisma.agreement.findMany({ where, include: this.include, }); } findOldest(): Promise<Agreement[]> { return this.prisma.agreement.findMany({ include: this.include, }); } findById(id: string): Promise<Agreement | null> { return this.prisma.agreement.findOne({ where: { id }, include: this.include, }); } create(data: AgreementCreateInput): Promise<Agreement | null> { return this.prisma.agreement.create({ data, include: this.include }); } update(id: string, data: AgreementUpdateInput): Promise<Agreement | null> { return this.prisma.agreement.update({ where: { id }, data, include: this.include, }); } delete(id: string): Promise<Agreement | null> { return this.prisma.agreement.delete({ where: { id }, include: this.include, }); } async existsById(id: string): Promise<boolean> { const count = await this.prisma.agreement.count({ where: { id } }); return count > 0; } async getTest(cities: string[]): Promise<Agreement[]> { const agreements = await this.prisma.agreement.findMany({ where: { company: { city: { name: { in: cities, }, }, }, accountability: { data: { transferValue: { in: 975000, }, }, }, }, include: this.include, }); return agreements; } } export default new AgreementRepository();
typescript
6 And Jehovah spoke to Moses, saying, 2 Speak unto the children of Israel, and say unto them, If a man or a woman have vowed the special vow of a Nazarite, to consecrate themselves to Jehovah; 3 he shall separate himself from wine and strong drink: he shall drink no vinegar of wine, nor vinegar of strong drink, neither shall he drink any liquor of grapes, nor eat grapes, fresh or dried. 4 All the days of his separation shall he eat nothing that is made of the vine, from the seed-stones, even to the skin. 5 All the days of the vow of his separation there shall no razor come upon his head; until the days be fulfilled, that he hath consecrated himself to Jehovah, he shall be holy; he shall let the locks of the hair of his head grow. 6 All the days that he hath consecrated himself to Jehovah, he shall come near no dead body. 7 He shall not make himself unclean for his father, or for his mother, for his brother, or for his sister when they die; for the consecration of his God is upon his head. 8 All the days of his separation he is holy to Jehovah. 9 And if any one die unexpectedly by him suddenly, and he hath defiled the head of his consecration, then he shall shave his head on the day of his cleansing; on the seventh day shall he shave it. 10 And on the eighth day he shall bring two turtle-doves, or two young pigeons, to the priest, at the entrance of the tent of meeting. 11 And the priest shall offer one for a sin-offering, and the other for a burnt-offering, and make an atonement for him, for that he sinned by the dead person; and he shall hallow his head that same day. 12 And he shall [again] consecrate to Jehovah the days of his separation, and shall bring a yearling lamb for a trespass-offering. But the first days are forfeited, for his consecration hath been defiled. 13 And this is the law of the Nazarite on the day when the days of his consecration are fulfilled: he shall be brought to the entrance of the tent of meeting. 14 And he shall present his offering to Jehovah, one yearling he-lamb without blemish for a burnt-offering, and one yearling ewe-lamb without blemish for a sin-offering, and one ram without blemish for a peace-offering; 15 and a basket with unleavened bread, cakes of fine flour mingled with oil, and unleavened wafers anointed with oil, and their oblation, and their drink-offerings. 16 And the priest shall present them before Jehovah, and shall offer his sin-offering and his burnt-offering: 17 and he shall offer the ram, a sacrifice of peace-offering to Jehovah, with the basket of unleavened bread; the priest shall offer also his oblation and his drink-offering. 18 And the Nazarite shall shave the head of his consecration at the entrance to the tent of meeting, and shall take the hair of the head of his consecration, and put it on the fire which is under the sacrifice of the peace-offering. 19 And the priest shall take the boiled shoulder of the ram, and one unleavened cake out of the basket, and one unleavened wafer, and shall put them upon the hands of the Nazarite, after he hath shaven [the hair of] his consecration. 20 And the priest shall wave them as wave-offering before Jehovah; it is holy for the priest, with the breast of the wave-offering and with the shoulder of the heave-offering; and afterwards the Nazarite may drink wine. 21 This is the law of the Nazarite who hath vowed: his offering to Jehovah for his consecration, beside what his hand is able to get; according to the vow which he vowed, so shall he do, according to the law of his consecration. 22 And Jehovah spoke to Moses, saying, 23 Speak unto Aaron and unto his sons, saying, On this wise ye shall bless the children of Israel: saying unto them, 24 Jehovah bless thee, and keep thee; 25 Jehovah make his face shine upon thee, and be gracious unto thee; 26 Jehovah lift up his countenance upon thee, and give thee peace. 27 And they shall put my name upon the children of Israel; and I will bless them.
english
The national flag is a symbol of pride and its dignity should be maintained even while disposing of it. Lucknow Municipal Corporation (LMC) issues guidelines on how to properly dispose of the flag. By India Today Web Desk: Many individuals are unaware of the code that has been established for the correct disposal of the Indian national flag. The national flag should always be disposed of with dignity because it is a sign of pride. The national flag must be completely destroyed in private when it is damaged. With respect to its dignity, it should either be burned or interred. The LMC is extremely concerned about the rising number of synthetic and plastic flags that are not biodegradable. This time, however, only fabric flags have been distributed, and since they may be kept for a longer period of time, it is hoped that they won't be thrown away. The LMC shall dispose of flags in accordance with the national flag code. Many flags are abandoned by citizens each year, and the LMC sanitation team in charge of keeping the city clean was unaware of how to segregate the national flag. - All damaged flags should be gathered, folded, and put in a wooden box before being buried. After the flags are buried, the box is to be buried in the ground, and a moment of quiet is to be observed. - Choosing and cleaning a safe location is required for the second alternative (burning). Fold the flags that have been damaged. They must be properly positioned in the centre of the flames after starting a fire. It is illegal to burn a flag without folding it or to light it before setting it ablaze.
english
Srinagar: Security Forces have cordoned off an area in Srinagar where two terrorists are believed to be trapped. Cordon and search operation underway since last night at Gulab Bagh area in the outskirts of Srinagar city as security forces suspect the presence of terrorists in the area. Two terrorists are believed to be staying in a house in the Gulab Bagh area of the city. Times Now has learnt that the family members of the two were called in and despite several appeals by them, the terrorists have refused to surrender. Heavy exchange of arms has been reported from the area and a joint operation is still underway. No casualty has yet been reported. On Saturday, the security forces had held two Lashkar-e-Taiba (LeT) terrorists in connection with a grenade attack Police Post-Bus Stand in Jammu and Kashmir's Sopore on December 12 last year. A security official lost his life when terrorists opened fire on a search party in Shopian last week. Two terrorists were neutralised in the operation. The ongoing operation comes on the backdrop of a recent attack on Bharatiya Janata Party (BJP) leader Anwar Khan's residence. On Friday, the police gunned down three terrorists involved in the attack.
english
"""solution.py""" # Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode: """ T: O(?) S: O(?) """ l3 = ListNode(0) temp_l3 = l3 carry = 0 while l1 or l2: l1v = 0 if l1 is None else l1.val l2v = 0 if l2 is None else l2.val sum_l1v_l2v_carry = l1v + l2v + carry if sum_l1v_l2v_carry > 9: carry = 1 l3v = sum_l1v_l2v_carry%10 else: carry = 0 l3v = sum_l1v_l2v_carry temp_l3.next = ListNode(l3v) temp_l3 = temp_l3.next if l1 is not None: l1 = l1.next if l2 is not None: l2 = l2.next if carry != 0: temp_l3.next = ListNode(carry) return l3.next """ T: O(?) S: O(?) """ l3 = temp_l3 = ListNode(0) all_carry = 0 while l1 or l2 or all_carry: if l1: all_carry += l1.val l1 = l1.next if l2: all_carry += l2.val l2 = l2.next temp_l3.next = ListNode(all_carry%10) temp_l3 = temp_l3.next all_carry = all_carry // 10 return l3.next
python
import sys,os from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import Qt import sqlite3 import style from PIL import Image #used for uploading image con=sqlite3.connect("products.db") cur=con.cursor() defaultImg="store.png" class AddMember(QWidget): def __init__(self): super().__init__() self.setWindowTitle("Add Member") self.setWindowIcon(QIcon('icons/icon.ico')) self.setGeometry(450,150,350,550) self.setFixedSize(self.size()) # after using this, we now cannot resize our window self.UI() self.show() def UI(self): self.widgets() self.layouts() def widgets(self): self.addMemberImg=QLabel() self.img=QPixmap('icons/addmember.png') self.addMemberImg.setPixmap(self.img) self.addMemberImg.setAlignment(Qt.AlignCenter) self.titleText=QLabel("Add Member") self.titleText.setAlignment(Qt.AlignCenter) self.nameEntry=QLineEdit() self.nameEntry.setPlaceholderText("Enter name of member") self.surnameEntry = QLineEdit() self.surnameEntry.setPlaceholderText("Enter surname of member") self.phoneEntry = QLineEdit() self.phoneEntry.setPlaceholderText("Enter phone number") self.submitBtn=QPushButton("Submit") self.submitBtn.clicked.connect(self.addMember) def layouts(self): self.mainLayout=QVBoxLayout() self.topLayout=QVBoxLayout() self.bottomLayout=QFormLayout() self.topFrame=QFrame() self.topFrame.setStyleSheet(style.addMemberTopFrame()) self.bottomFrame=QFrame() self.bottomFrame.setStyleSheet(style.addMemberBottomFrame()) self.topLayout.addWidget(self.titleText) self.topLayout.addWidget(self.addMemberImg) self.topFrame.setLayout(self.topLayout) self.bottomLayout.addRow(QLabel("Name: "),self.nameEntry) self.bottomLayout.addRow(QLabel("Surname: "), self.surnameEntry) self.bottomLayout.addRow(QLabel("Phone: "), self.phoneEntry) self.bottomLayout.addRow(QLabel(""), self.submitBtn) self.bottomFrame.setLayout(self.bottomLayout) self.mainLayout.addWidget(self.topFrame) self.mainLayout.addWidget(self.bottomFrame) self.setLayout(self.mainLayout) def addMember(self): name=self.nameEntry.text() surname=self.surnameEntry.text() phone=self.phoneEntry.text() if(name and surname and phone !=""): try: query="INSERT INTO 'members' (member_name, member_surname, member_phone) VALUES(?,?,?)" cur.execute(query,(name,surname,phone)) con.commit() QMessageBox.information(self,"Info","Member has been added!") self.nameEntry.setText("") self.surnameEntry.setText("") self.phoneEntry.setText("") except: QMessageBox.information(self, "Info", "Member has not been added!") else: QMessageBox.information(self, "Info", "Fields cannot be empty")
python
import styles from './style.css' import Head from 'next/head' import Link from 'next/link'; import styles from '../components/index.module.css' class Home extends React.Component { render(){ return( <div> <Head> <title> Home Page </title> </Head> <p className={styles.intro}> Welcome to my Pokemon API. </p> <div className={styles.nam}> <Link href="/name"> <a className={styles.lk}>Name Page</a> </Link><br/> </div> <div className={styles.id}> <Link href="/id"> <a className={styles.lk}>Id Page</a> </Link><br/> </div> <div className={styles.typ}> <Link href="/type"> <a className={styles.lk}>Type Page</a> </Link><br/> </div> </div> ); } } export default Home
javascript
Once upon a time in the city Rajnagar there lived one clever king. He was clever and was brainy. One day in her court came one old man. He said that hey king my son didn't take me at home. So, I have no shelter and work. Please give me a job in this court. King said yes uncle why not. But you are looking so hungry. First you eat something and then I Will tell you your work. The old man said thank you for this treat. You are like my son. My son didn't care for me, but you can understand my feelings. Yes uncle.! From the next day he started for his work. And the king was given a work of guard of king. The old man was so happy because he gets simple work to do. Then next two years was so good. But one day there comes one young man for finding work. She asks the king that " King please can I get some work here "? The king replied that ok I will give you the work of a servant. Because there is no worker for this job. Ok said the young man. Then he sees that the old man was standing behind the king then he asks that who is that king? He replied that he is my guard. The young man was so angry. Because he thinks that I get the servant’s work and the old man gets the guard work. Next day the young man started the work. One day he decided that I will make the job of guard, not this fellow old man. Then he makes the plan that I will remove the old man from the court. Then one day he makes the closest friendship with the old man. And one fine night he thinks that I will steal the gold jewellery and diamond jewellery and keep in the old man’s room. That night when he was keeping that jewellery in old man rooms the one of the people in the court see that he is keeping that jewellery in old man room. Then he tells the king that the young man has stolen your jewellery and keeps it in old man’s rooms. Then he says that I know this already when I was walking through the young man room, he was talking to himself about that plan. Then the very next day king didn't react in court. Then when he sees that all the jewellery was at king, and he was shocked. Then she understands that I was wrong about that.
english
/* Mixins */ div.myplacesform div.help { float: right; } div.myplacesform input[type="text"] { width: 83%; } div.myplacesform textarea { width: 80%; } div.myplacesform select { width: 80%; } div.myplacesform .imagePreview { cursor: pointer; } div.myplacescategoryform table input { width: 50px; } div.myplacescategoryform input.oskaricolor { height: 20px; width: 50px; border: 1px solid; padding: 3px; -webkit-border-radius: 5px; -moz-border-radius: 5px; -o-border-radius: 5px; -ms-border-radius: 5px; border-radius: 5px; -webkit-background-clip: padding-box; -moz-background-clip: padding-box; background-clip: padding-box; font-size: 0; /* Hackhack, not an actual used font */ } div.myplacesform div.field, div.myplacescategoryform div.field { padding-bottom: 10px; } div.myplacesform div.renderButton, div.myplacescategoryform div.renderButton { margin: 5px; } div.myplacesform input[type="checkbox"], div.myplacescategoryform input[type="checkbox"] { margin: 0.5em; } div.simpleColorChooser { background-color: #ffffff; } /* Smaller fields for category inputs in table */ div.myplaces2 div.buttons div.button { margin: 10px; padding: 10px; border: 1px solid; -webkit-border-radius: 5px; -moz-border-radius: 5px; -o-border-radius: 5px; -ms-border-radius: 5px; border-radius: 5px; -webkit-background-clip: padding-box; -moz-background-clip: padding-box; background-clip: padding-box; -webkit-box-shadow: 5px 5px 5px #888; -moz-box-shadow: 5px 5px 5px #888; box-shadow: 5px 5px 5px #888; } .divmanazerpopup.myplaces2 { max-width: 260px; } div.simpleColorChooser { background-color: #ffffff; z-index: 10; } div.imagePreview img { max-height: 350px; max-width: 350px; }
css
Former Board of Control for Cricket in India (BCCI) president Anurag Thakur was appointed the new Minister of Youth Affairs and Sports after a major Union Cabinet makeover on Wednesday. Thakur, who was the Union Minister of State for Finance and Corporate Affairs, has been promoted as the Union cabinet minister. The BJP MP from Hamirpur in Himachal Pradesh took the oath as the Union Cabinet Minister at a function in Rashtrapati Bhavan. In his previous successful stints, Thakur was the president of the Board of Control for Cricket in India. Thakur remained the BCCI chief from May 2016 to February 2017. Talking more about his previous stints, the BJP politician also used to look after the Himachal Pradesh Cricket Association (HPCA). His brother Arun Dhumal is currently serving as the treasurer of the BCCI. "I am honoured to serve the people of India as a Union Cabinet minister and take this opportunity to express my sincere gratitude to Prime Minister Sh @narendramodi ji for entrusting me with this responsibility," Thakur tweeted. Taking over from Kiren Rijiju, Thakur has become the new Minister of Youth Affairs and Sports just 16 days before the Tokyo Olympics 2020. Besides Thakur, five more ministers have been promoted to the cabinet rank. The list of promoted ministers features the likes of Rijiju, Hardeep Singh Puri, Parshottam Rupala, G Kishan Reddy, Mansukh Mandaviya. "Honorable Prime Minister Shri. @narendramodi heartfelt thanks. Will work dedicatedly to fulfill the thoughts and vision of Hon'ble Prime Minister to make Atmanirbhar Bharat," former sports minister Rijiju said in his tweet. The likes of Ravi Shastri and Harbhajan Singh, who have worked with Thakur when the latter was the president of the BCCI, took to Twitter to extend their greetings on his appointment. More than 120 athletes have secured their respective tickets for the Olympic Games in Tokyo. The 2020 edition of the Summer Games will be open on July 23 amid strict health safety protocols in the aftermath of the COVID-19 pandemic.
english
The CBI has confirmed rape charges against the prime accused in the Unnao rape case, BJP MLA Kuldeep Singh Sengar. By Shivendra Srivastava, Munish Chandra Pandey: India's premier investigative agency Central Bureau of India (CBI) has denied that it has confirmed rape charges against Bharatiya Janata Party (BJP) MLA Kuldeep Singh Sengar in the Unnao case. Earlier some sections of the media, including IndiaToday. in, had reported that CBI had "found incriminating evidence against BJP MLA Kuldeep Sengar". CBI, on Friday (May 11), clarified "that investigation in Unnao case is still continuing. CBI has not given any update/conclusion/views with respect to the case to any media person. All such stories related to Unnao case published/broadcast in the media recently are purely speculative. " Our original story follows: As per the sources in the Central Bureau of Investigation (CBI), the team probing the Unnao rape case have found incriminating evidence against BJP MLA Kuldeep Sengar, the prime accused. On the basis of forensic evidence and reconstruction of the incident, the investigating agency have rechecked the conclusion that the girl's claims of rape are true. The CBI, subsequently questioned several people who are allegedly involved in the case and they have also narrated the same sequence of events as told by the survivor. In addition, the CBI investigation found loopholes in how the case was pursued by the police. The probe lay bare how the police derided their duty by delaying the medical check-up of the rape survivor-- to help Sengar. Apart from this, the first FIR in the case did not include the BJP MLA's name. In a statement recorded under Section 164 of CrPC, the rape survivor had named Sengar's key aide Shashi Singh-- accusing her of guarding the room the day he raped her. The mother of the survivor, in her complaint to UP Police, now part of the CBI FIR, had also alleged that Shashi Singh lured her daughter and took her to Sengar's residence where he raped her. Subsequently, Shashi Singh was sent to a four-day CBI custody on April 15 as a co-accused in the rape case.
english
<reponame>sudoelvis/slate-plugins import { getRenderElement } from '../../common/utils/getRenderElement'; import { setDefaults } from '../../common/utils/setDefaults'; import { DEFAULTS_MENTION } from './defaults'; import { MentionRenderElementOptions } from './types'; export const renderElementMention = (options?: MentionRenderElementOptions) => { const { mention } = setDefaults(options, DEFAULTS_MENTION); return getRenderElement(mention); };
typescript
<reponame>vamsikarri/DataVirtualization {"remainingRequest":"/Users/vamsikarri/Desktop/Gathi/Angular/FederatedQuery/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js??ref--3-1!/Users/vamsikarri/Desktop/Gathi/Angular/FederatedQuery/node_modules/big-rat/lib/ctz.js","dependencies":[{"path":"/Users/vamsikarri/Desktop/Gathi/Angular/FederatedQuery/node_modules/big-rat/lib/ctz.js","mtime":1529418306677},{"path":"/Users/vamsikarri/Desktop/Gathi/Angular/FederatedQuery/node_modules/cache-loader/dist/cjs.js","mtime":1529418306962},{"path":"/Users/vamsikarri/Desktop/Gathi/Angular/FederatedQuery/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js","mtime":1529418304772}],"contextDependencies":[],"result":["'use strict'\n\nvar db = require('double-bits')\nvar ctz = require('bit-twiddle').countTrailingZeros\n\nmodule.exports = ctzNumber\n\n//Counts the number of trailing zeros\nfunction ctzNumber(x) {\n var l = ctz(db.lo(x))\n if(l < 32) {\n return l\n }\n var h = ctz(db.hi(x))\n if(h > 20) {\n return 52\n }\n return h + 32\n}\n",null]}
json
$(document).ready(function(){ $('.smart').slick({ autoplay: true, infinite: true, slidesToShow: 2, slidesToScroll: 3 }); }); $(document).ready(function(){ $('.lab').slick({ autoplay: true, infinite: true, slidesToShow: 4, slidesToScroll: 3 }); });
javascript
Crypto asset manager Valkyrie, best known for launching one of the only U.S. SEC-approved bitcoin futures ETFs, is moving into a new asset class — venture capital. The firm hired investor Lluís Pedragosa in April and has been quietly preparing him to helm Valkyrie Ventures, its new VC arm announced today, as managing partner. Pedragosa, who previously worked at New York-based venture firm Marker LLC, has spent over 10 years investing in U.S. and Israel, largely in B2B software, he told TechCrunch in an interview. Pedragosa caught the crypto bug after investing in Israeli crypto custody startup Curv in 2018, which PayPal acquired last year. He shared the thesis for Valkyrie’s new fund, which he has been working on since he joined the Nashville-based company in April. “The idea for us is we want to invest in what we call the middleware layer, which is kind of like the infrastructure layer — anything that is between an application and the layer one protocols and in what we call web 2.5,” Pedragosa said, explaining that he aims to back companies that provide a “web2 user experience” but have “web3 infrastructure” underpinning them. Although the fund is an arm of Valkyrie, Pedragosa emphasized that it isn’t a typical corporate VC as Valkyrie Ventures won’t be investing Valkyrie’s balance sheet capital. Instead, Pedragosa is in the process of talking to external investors including institutions and high net worth individuals to raise $25-$30 million for the fund, he said. Pedragosa plans to write checks between $250K and $1 million per company and said investment size may vary based on region. “In the US, I think you can write smaller checks ... But in Israel, you need to be more concentrated on the bets that you make, because the exits may not be as big,” Pedragosa said. The fund is strategic for Valkyrie in that it is focused on nascent infrastructure the firm might use in its digital asset management operations, including: security, authentication, compliance, data management, storage, networking, communication, governance, payments and transactions companies, according to Pedragosa. The firm will focus on investing in the tools developers need to build decentralized companies, he added. Pedragosa believes raising the capital under Valkyrie’s purview but without using the classic corporate VC model affords him the best of both worlds. Valkyrie Ventures joins the growing group of crypto venture funds that have close ties to companies but aren’t investing directly off their balance sheets, including Cathay Innovation, which launched a $110 million VC fund in partnership with hardware provider Ledger last month. “Traditional corporate VCs move relatively slow, or slower than, financial VCs. Sometimes you need to have a champion within the business that wanted to support your investment in a company, for example. So that’s why I stay away from that, why [our fund] is separate. I don’t need to convince anyone. If we think it’s a good investment, we just do it,” Pedragosa said. By partnering with Valkyrie, Pedragosa hopes to leverage the company’s in-house technical expertise for due diligence processes. He added that Valkyrie’s deep network in the crypto space could be an asset to founders as the firm can help make introductions on their behalf. As for timing, the down market in crypto gives Pedragosa confidence that he will be able to find strong companies at cheap valuations. He’s optimistic about the fundraising process based on what he’s been hearing from investors so far and is targeting to close the fund by the end of 2022. “Those [funds] that were [investing in crypto] just because they thought it was the next big thing and they were just investing left and right just to follow the trend will probably have less liquidity to move forward right now. But I think that many of the institutions and many of the sophisticated investors have been waiting for this and they still have firepower to invest,” Pedragosa said.
english
{% extends 'base.html' %} {% load crispy_forms_tags %} {% block title %} CONTATO|{{ block.super }}{% endblock %} {% block content %} <div class="row justify-content-center"> <div class="col-md-12 mt-2"> <div class="card"> <div class="card-header text-center text-muted"> SIGTOMB </div> <div class="card-body"> <div class="h-100 p-4 bg-light border rounded-3"> <div class="bg-light p-3 rounded-lg m-3"> <h1 class="display-5">Sistema de Gerenciamento de Tombamentos</h1> <p class="lead">Página de Contato em construção.</p> <form action="{% url 'core:contato' %}" method="post" class="form text-center" autocomplete="off"> {% csrf_token %} formulario {{ form|crispy }} <a href="" class="btn btn-sm btn-primary">Enviar mensagem</a> </form> <hr class="my-4"> <a href="{% url 'core:home' %}" class="btn btn-sm btn-primary">Ir a Home</a> </div> </div> </div> <div class="card-footer text-center"> <small class="text-center text-muted"> Powered_by_Subseção de Logística CPTran/BPTran - 2021 </small> </div> </div> </div> </div> {% endblock %}
html
<!DOCTYPE html> <!-- Copyright 2018-2021 Ki11er_wolf. 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. --> <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head lang="en"> <!-- Tab Title & Logo --> <title>Enhancers - Resynth Mod Wiki</title> <link rel="icon" href="../../images/icon.png" type="image/png"> <!--Internal css and js.--> <link rel="stylesheet" type="text/css" href="wiki.css"> <!-- SEO --> <meta name="keywords" content="Resynth, Resynth Wiki, Wiki, Resynth Help, Help, Resynth Mod, Growable Ores, Growable Mob Drops, 1.12.2, 1.13.2, 1.14.4, Growable, Enhancer, Enhancers, Calvinite, Sylvanite, Sylvanite Enhancer, Calvinite Enhancer, Calvinite Crystal, Sylvanite Crystal, 1.15, 1.15.2, 1.16, 1.16.1"> <meta name="description" content="Enhancers are a way to increase the Mineral Content of Mineral Soil beyond 50%. They should be placed directly underneath the Mineral Soil block."> <!-- Meta Tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- STYLE --> <!-- JQuery, Bootstrap and Icons--> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="<KEY>" crossorigin="anonymous"> <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script> <link href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css" rel="stylesheet"> <script src="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.js"></script> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <!-- Google Analytics --> <!-- Global site tag (gtag.js) - Google Analytics Site Tag--> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-127648959-1"> </script> <!-- Google Analytics Script --> <script> window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'UA-127648959-1'); // Set the user ID using signed-in user_id. gtag('set', {'user_id': 'USER_ID'}); </script> <!-- Cookie Pop up --> <link rel="stylesheet" type="text/css" href="../../css/jquery-eu-cookie-law-popup.css"/> <script src="../../js/jquery-eu-cookie-law-popup.js"></script> </head> <body class="eupopup eupopup-bottom"> <!-- Navbar --> <nav class="navbar navbar-dark bg-dark"> <span class="navbar-brand"> <img src="../../images/logo.png" height="39" style="margin-top: 10px;" alt="" /> <a title="Go to downloads" style="background: none; border:none;" href="../download.html"> <img style="height: 25px;" src="http://cf.way2muchnoise.eu/full_303846_downloads.svg" alt="download-image"> </a> </span> <span class="navbar-text"> <a href="../../" class="navbar-link" style="text-decoration:none">Home</a> <a href="../download.html" class="navbar-link" style="text-decoration:none">Downloads</a> <a href="" class="navbar-link-active" style="text-decoration:none">Wiki</a> <a href="https://www.curseforge.com/minecraft/mc-mods/resynth/" class="navbar-link" style="text-decoration:none">Project Page</a> <a href="../../pages/changelog/changelog.html" class="navbar-link" style="text-decoration:none">Changelog</a> <a href="../../pages/faq/faq.html" class="navbar-link" style="text-decoration:none">FAQ</a> <a href="../../pages/credits/credits.html" class="navbar-link" style="text-decoration:none">Credits</a> <a href="https://github.com/Resynth-Minecraft-Mod" class="navbar-link" style="text-decoration:none">Source Code</a> <a href="https://www.paypal.com/cgi-bin/webscr?hosted_button_id=H4KMMEX2T693W&item_name=Resynth+-+Growable+Ores+%26+Resources+(from+curseforge.com)&cmd=_s-xclick" class="navbar-link" style="text-decoration:none">Donate</a> </span> </nav> <!-- Page --> <div id="page" class="container-fluid full-width has-inner text-center"> <div class="row"> <!-- Page Navigator / Table of content --> <div id="table-of-content" class="col-lg-1"> <b style="font-size: 20px;">Table of content</b> <br/> <button id="toc-toggle" class="btn btn-primary">Hide table of content</button> <br/><br/> <div id="toc-pages"> <br/> <br/> <b style="font-size: 18px;">Basics</b> <br/> <br/> <!-- Pages --> <a href="home.html" class="page-link"> <div class="page-nav-btn"> Home </div> </a> <a href="getting-started.html" class="page-link"> <div class="page-nav-btn"> Getting Started </div> </a> <a href="plants.html" class="page-link"> <div class="page-nav-btn"> Plants </div> </a> <a href="getting-seeds.html" class="page-link"> <div class="page-nav-btn"> Getting Seeds and Resources </div> </a> <a href="crafting-recipes.html" class="page-link"> <div class="page-nav-btn"> Crafting Recipes </div> </a> <a href="configuring.html" class="page-link"> <div class="page-nav-btn"> Configuring the Mod </div> </a> <a href="plant-requests.html" class="page-link"> <div class="page-nav-btn"> Plant Requests </div> </a> <a href="#" class="page-link"> <div class="page-nav-btn active-page"> Enhancers </div> </a> <!-- Items --> <br/> <br/> <b style="font-size: 18px;">Items</b> <a href="mineral-rock.html" class="page-link"> <div class="page-nav-btn"> Mineral Rock </div> </a> <a href="dense-mineral-rock.html" class="page-link"> <div class="page-nav-btn"> Dense Mineral Rock </div> </a> <a href="mineral-crystal.html" class="page-link"> <div class="page-nav-btn"> Mineral Crystal </div> </a> <a href="mineral-hoe.html" class="page-link"> <div class="page-nav-btn"> Mineral Hoe </div> </a> <a href="seeds.html" class="page-link"> <div class="page-nav-btn"> Seeds </div> </a> <a href="shards.html" class="page-link"> <div class="page-nav-btn"> Shards </div> </a> <a href="bulbs.html" class="page-link"> <div class="page-nav-btn"> Bulbs </div> </a> <!-- Blocks --> <br/> <br/> <b style="font-size: 18px;">Blocks</b> <a href="mineral-soil.html" class="page-link"> <div class="page-nav-btn"> Mineral Soil </div> </a> <a href="mineral-stone.html" class="page-link"> <div class="page-nav-btn"> Mineral Stone </div> </a> <a href="organic-ore.html" class="page-link"> <div class="page-nav-btn"> Organic Ore </div> </a> <br/> <br/> <!-- Plants --> <b style="font-size: 20px;">Plant Types</b> <a href="crystalline-plants.html" class="page-link"> <div class="page-nav-btn"> Crystalline Plants </div> </a> <a href="metallic-plants.html" class="page-link"> <div class="page-nav-btn"> Metallic Plants </div> </a> <a href="biochemical-plants.html" class="page-link"> <div class="page-nav-btn"> Biochemical Plants </div> </a> <br/> <b style="font-size: 18px;">Other Plants</b> <br/> <a href="mystical-seed-pod.html" class="page-link"> <div class="page-nav-btn"> Mystical Seed Pod </div> </a> <!-- Back to top button --> <br/> <a href="#" class="btn btn-primary" title="Back to top">↑</a> <br/> </div> </div> <!-- WIKI PAGE --> <div id="wiki-page" class="col-lg-8"> <div class="row"> <div class="col-md-8 text-left"> <div class="title"> <b>Enhancers</b> </div> <!-- Opening Text --> <div class="wiki-paragraph"> Enhancers are one of two blocks: <b>Calvinite Enhancer</b> and <b>Sylvanite Enhancer</b>, used to increase the tier of Mineral Soil to Tier 2 and Tier 3 respectively. <br /><br />Without Enhancers, a Mineral Soil block can only reach a Mineral Concentration of <code>50%</code>, with Enhancers, the Mineral Concentration can be boosted to <code>60%</code> with <b>Calvinite</b> and <code>75%</code> with <b>Sylvanite</b>. <br /><br />Editing config files allows a Mineral Content of <code>90%</code> and <code>100%</code> to be achieved through Enhancers - though this is <b>NOT</b> the default behaviour. <br /><br /><span style="color: red">Enhancer blocks are only available in <code>1.14.4</code> Resynth Versions and newer.</span> </div> </div> <!-- INFO BOX --> <div id="info-box" class="col-md-4"> <b id="info-box-title">Enhancers</b> <div> <img id="info-box-image" alt="info-box-image" src="../../images/wiki/textures/calvinite-enhancer.png"> </div> <i>The block texture for the Calvinite Enhancer.</i> <div class="row info-box"> <div class="row info-box-row"> <div class="col-sm-6"> Display Name: </div> <div class="col-sm-6"> Enhancer </div> </div> <div class="row info-box-row"> <div class="col-sm-6"> Stackable: </div> <div class="col-sm-6"> Yes(64) </div> </div> <div class="row info-box-row"> <div class="col-sm-6"> Growable: </div> <div class="col-sm-6"> Calvinite: yes <br />Sylvanite: no </div> </div> <div class="row info-box-row"> <div class="col-sm-6"> Added in: </div> <div class="col-sm-6"> 3.1.0 (1.14.4) </div> </div> </div> </div> </div> <!-- WIKI CONTENT --> <div class="row text-left"> <div class="title"> <b>Usage</b> </div> <div class="wiki-paragraph"> Each Enhancer block gives a straight Mineral Content increase to the Mineral Soil block placed directly above it, of <code>10%</code> for Calvinite and <code> 25%</code> for Sylvanite. <br/><br/>The buff will effect instantly once placed, without the need to add any extra Mineral Crystals, provided the Mineral Soil block they are placed under has a Mineral Concentration of <code>50%</code>. <br /><br />Only 1 Enhancer block can be placed per Mineral Soil block. Any more Enhancers placed will not take effect. </div> </div> <br/> <div class="row text-left"> <div class="title"> <b>Placement</b> </div> <div class="wiki-paragraph"> The Enhancer block must be placed directly underneath a Mineral Soil block, with a Mineral Concentration of 50%, in order for the Enhancer to take effect. <br /><br />Once placed, the Enhancer will give a straight Mineral Content increase of 10% (for a total of 60%) with Calvinite Enhancers, and a Mineral Content increase of 25% (for a total of 75%) with Sylvanite Enhancers. <br /><br />The cracks in the Mineral Soil block will change colour to match the Enhancer block if done correctly. <br /><br /> <img src="../../images/wiki/pictures/enhancer-placement.png" alt="Shows how the enhancer should be placed." class="wiki-image"> <br /> <i style="font-size:14px;"> Enhancer blocks underneath Mineral Soil. </i> </div> </div> <!-- Content disclaimer --> <div class="legal-footer"> This wiki is licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0"> Apache License, Version 2.0 </a>. Although its <b>content</b> may be used, copied, modified, and/or distributed without restriction. </div> </div> </div> </div> <!-- Footer --> <footer id="sticky-footer" class="py-4 bg-dark text-white-50" style="margin-top: 20px;"> <div style="width: 50%; margin-left: 25%;"> The Resynth Minecraft Mod, The Resynth Website, and all related content is licensed under the <a class="btn btn-dark" href="https://www.apache.org/licenses/LICENSE-2.0"> Apache License, Version 2.0. </a> All Resynth content is open source and hosted on github. </div> <div style="width: 50%; margin-left: 25%;"> <br> THE RESYNTH MOD, WEBSITE AND ITS RESOURCES ARE PROVIDED AS IS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND. <br/> For more information, view <a class="btn btn-dark" href="https://www.apache.org/licenses/LICENSE-2.0#no-warranty"> Clause 7 </a> of the Apache License, Version 2.0. </div> <hr style="background-color: white"> <div class="container text-center"> <small>Copyright &copy; 2018-2021: Ki11er_wolf</small> </div> </footer> <!-- Table of content script --> <script src="wiki.js"></script> </body> </html>
html
<reponame>betatim/cornerstone_widget<gh_stars>10-100 import numpy as np import pytest from ipywidgets.embed import embed_snippet from cornerstone_widget import CornerstoneWidget, CornerstoneToolbarWidget from cornerstone_widget.cs_widget import encode_numpy_b64 from cornerstone_widget.utils import _virtual_click_button def test_encoding(): with pytest.raises(ValueError): encode_numpy_b64(np.ones((4, 4, 2))) with pytest.raises(ValueError): encode_numpy_b64(np.ones((2, 3, 3)), rgb=True) with pytest.raises(ValueError): encode_numpy_b64(np.ones((2, 3)), rgb=True) def test_ipy(): c = CornerstoneWidget() c.update_image(np.ones((2, 1))) widget_state = c.get_state() assert widget_state['img_bytes'] == 'AAAAAA==' assert widget_state['img_width'] == 1 assert widget_state['img_height'] == 2 widget_html = embed_snippet(c) assert 'CornerstoneModel' in widget_html, 'Should contain widget code' assert 'cornerstone_widget' in widget_html, 'Should contain widget code' c.set_tool_state({'dog': 1}) widget_state = c.get_state() assert widget_state['_tool_state_in'] == '{"dog": 1}' def test_tools(): c = CornerstoneWidget() c.select_tool('pan') widget_state = c.get_state() assert widget_state['_selected_tool'] == 'pan', 'Should be pan' with pytest.raises(NotImplementedError): c.select_tool('pane') with pytest.raises(NotImplementedError): c.update_image(np.zeros((3, 3, 3))) def test_toolbar_tool(): c = CornerstoneToolbarWidget() c.select_tool('pan') widget_state = c.cur_image_view.get_state() assert widget_state['_selected_tool'] == 'pan', 'Should be pan' # check toolbar for i in c._toolbar: cw = i.tooltip c.select_tool(cw) widget_state = c.cur_image_view.get_state() assert widget_state['_selected_tool'] == cw, 'Should be {}'.format(cw) with pytest.raises(NotImplementedError): c.select_tool('pane') with pytest.raises(NotImplementedError): c.update_image(np.zeros((3, 3, 3))) def test_notoolbar(): c = CornerstoneToolbarWidget(tools=[]) assert len(c._toolbar) == 1 start_but = c._toolbar[0] assert start_but.comm is not None, 'Should have something here' # click button _virtual_click_button(start_but) assert start_but.comm is None, 'Should be a dead button' def test_invalid_toolbar(): with pytest.raises(NotImplementedError): CornerstoneToolbarWidget(tools=['Magic_Lasso'])
python
from typing import Any, Optional import numpy as np from joblib import Parallel, delayed from budgetcb.base import MAB from budgetcb.helper import _get_ALP_predict, _LinUCBnTSSingle, _sherman_morrison_update class LinUCB(MAB): """ Constrained LinUCB References: Li, Lihong, et al. "A contextual-bandit approach to personalized news article recommendation." Proceedings of the 19th international conference on World wide web. 2010. """ def __init__( self, ndims: int, alpha: float, narms: int, T: int, B: int, dummy_arm: int ): """ Args: ndims: (int): number of context dimension alpha: (float): hyper-parameter in LinUCB, scaling the UCB associated with the models reward estimate within each arm based on the data matrices. narms (int): number of arms T (int): total global time budget B (int): total resource budget dummy_arm (int): the arm that does not consume any resource """ super().__init__(narms, T, B, dummy_arm) self.ndims = ndims self.alpha = alpha self.b_tau = self.B self.tau = self.T self.AaI = {} # a dict to store the inverse of A for each arm self.ba = {} # a dict to store the `ndims` dimensional vector for each arm for arm in range(self.narms): self.AaI[arm] = np.eye(self.ndims) self.ba[arm] = np.zeros((self.ndims, 1)) def play(self, tround: int, context: np.ndarray) -> int: """ Args: tround (int): the index of rounds, starting from 0 context (np.ndarray): contexts array in the round Returns: the chosen action """ tau = self.T - tround avg_remaining_budget = float(self.b_tau) / tau if self.b_tau > 0: p = np.zeros(self.narms) for arm in range(self.narms): theta = np.dot(self.AaI[arm], self.ba[arm]) standard_deviation = np.sqrt( np.dot(np.dot(context.T, self.AaI[arm]), context) ) p[arm] = np.dot(theta.T, context) + self.alpha * standard_deviation # select the best arm best_arm = np.random.choice(np.where(p == max(p))[0]) # tie-breaking # take the best arm with the probability due to the resource constraint rand = np.random.uniform() if rand < avg_remaining_budget: # take action if best_arm != self.dummy_arm: self.b_tau -= 1 return best_arm else: # skip return self.dummy_arm else: return self.dummy_arm # resource is exhausted def update( self, arm: int, reward: float, context: Optional[np.ndarray] = None, tround: Optional[int] = None, ) -> Any: if context is None: raise ValueError("Must supply with context in LinUCB class") self.AaI[arm] = _sherman_morrison_update(self.AaI[arm], context) self.ba[arm] += reward * context return self class UcbAlp(MAB): """ Constrained UCB-ALP References: Wu, Huasen, et al. "Algorithms with logarithmic or sublinear regret for constrained contextual bandits." Advances in Neural Information Processing Systems. 2015. """ def __init__( self, narms: int, T: int, B: int, pai: np.ndarray, gmm: Any, dummy_arm: int ): """ Args: narms (int): number of arms T (int): total global time budget B (int): total resource budget pai (numpy.ndarray): user class distribution gmm (any object): any fitted clustering object but recommend using the Gaussian Mixture Model dummy_arm (int): the arm that does not consume any resource """ super().__init__(narms, T, B, dummy_arm) self.pai = pai self.gmm = gmm self.J = len(self.pai) # number of user clusters self.b_tau = self.B self.tau = self.T # init self.C = np.zeros((self.J, self.narms)) self.mu_bar = np.zeros((self.J, self.narms)) self.mu_hat = np.ones((self.J, self.narms)) self.mu_star = np.ones(self.J) def play(self, tround: int, context: np.ndarray) -> int: """ Args: tround (int): the index of rounds, starting from 0 context (np.ndarray): contexts array in the round Returns: the chosen action """ tau = self.T - tround # update time budget avg_remaining_budget = float(self.b_tau) / tau # compute the user class j = self.gmm.predict(context.T)[0] score_max = np.max(self.mu_hat[j, :]) best_arm = np.random.choice( [i for i, v in enumerate(self.mu_hat[j, :]) if v == score_max] ) # tie-breaking self.mu_star[j] = score_max if self.b_tau > 0: alp = _get_ALP_predict( self.mu_star, np.array(self.pai), avg_remaining_budget ) # choose the best arm with proba probs_of_action = alp.x # type: ignore rand = np.random.uniform() decision = ["action" if rand < p else "skip" for p in probs_of_action] if decision[j] == "skip": return self.dummy_arm else: if best_arm != self.dummy_arm: self.b_tau -= 1 return best_arm else: return self.dummy_arm # resource is exhausted def update( self, arm: int, reward: float, context: Optional[np.ndarray] = None, tround: Optional[int] = None, ) -> "UcbAlp": """ Single update """ if context is None: raise ValueError("Must supply with context in UcbAlp class") j = self.gmm.predict(context.T)[0] self.C[j, arm] += 1 self.mu_bar[j, arm] = (self.mu_bar[j, arm] + reward) / self.C[j, arm] self.mu_hat[j, arm] = ( self.mu_bar[j, arm] + np.sqrt(np.log(tround + 1)) / 2 * self.C[j, arm] # type: ignore ) best_arm = np.argmax(self.mu_hat[j, :]) self.mu_star[j] = self.mu_hat[j, best_arm] return self class HATCH(MAB): """ References: Yang, Mengyue, et al. "Hierarchical Adaptive Contextual Bandits for Resource Constraint based Recommendation." Proceedings of The Web Conference 2020. 2020. """ def __init__( self, narms: int, gmm: any, # type: ignore J: int, pai: np.ndarray, T: int, B: int, context_dic: dict, alpha: float, njobs: int = 1, dummy_arm: int = 0, ): """ Args: narms (int): number of arms gmm (any object): any fitted clustering object but recommend using the Gaussian Mixture Model J (int): number of segments pai (numpy.ndarray): user class distribution T (int): total global time budget B (int): total resource budget context_dic (dict): user class center learned by the clustering object alpha: (float): hyper-parameter in LinUCB, scaling the UCB associated with the models reward estimate within each arm based on the data matrices. njobs (int): parallel computing parameter, default to 1 dummy_arm (int): the arm that does not consume any resource """ super().__init__(narms, T, B, dummy_arm) self.pai = np.array(pai) self.context_dic = context_dic self.gmm = gmm self.context_dim = len(context_dic.get(dummy_arm)) # type: ignore self._add_common_lin(alpha, narms, njobs, J, self.context_dim) # type: ignore self.ustar = [0 for i in range(J)] self.b_tau = self.B self.tau = self.T self.alpha = alpha def _add_common_lin( self, alpha: float, narms: int, njobs: int, J: int, context_dim: dict ) -> None: if isinstance(alpha, int): alpha = float(alpha) assert isinstance(alpha, float) self.njobs = njobs self.alpha = alpha self.narms = narms self.J = J self._oraclesa = [ [_LinUCBnTSSingle(1.0, context_dim) for n in range(narms)] for i in range(J) # type: ignore ] self._oraclesj = [_LinUCBnTSSingle(1.0, context_dim) for n in range(J)] # type: ignore self.uj = np.array([float(1) for i in range(self.J)]) def play(self, tround: int, context: np.ndarray) -> int: tau = self.T - tround avg_remaining_budget = float(self.b_tau) / tau pred = np.zeros(self.narms) j = self.gmm.predict(context.T) for choice in range(self.narms): pred[choice] = self._oraclesa[j[0]][choice].predict(context.T) best_arm = np.argmax(np.array([pred]), axis=1)[0] if self.b_tau > 0: acc_percentage = _get_ALP_predict( self.uj, np.array(self.pai), avg_remaining_budget ) if np.random.uniform(0, 1) > acc_percentage["x"][j]: # skip return self.dummy_arm else: # retain if best_arm != self.dummy_arm: self.b_tau -= 1 return best_arm else: return self.dummy_arm def update( self, arm: int, reward: float, context: Optional[np.ndarray] = None, tround: Optional[int] = None, ) -> "HATCH": # type: ignore self.ndim = context.shape[1] # type: ignore Xj = np.array( list(map(lambda x: self.context_dic[x], list(self.gmm.predict(context)))) ) Parallel(n_jobs=self.njobs, verbose=0, require="sharedmem")( delayed(self._update_single)(j, context, Xj, arm, reward) for j in range(self.J) ) for j in range(self.J): self.uj[j] = self._oraclesj[j].predict(np.array([self.context_dic[j]])) def _update_single( self, j: int, context: np.ndarray, Xj: np.ndarray, arm: np.ndarray, reward: np.ndarray, ) -> None: xj = self.gmm.predict(context) this_context = xj == j self._oraclesj[j].fit( Xj[this_context, :], reward[this_context].astype("float64") ) for choice in range(self.narms): this_action = arm == choice self._oraclesa[j][choice].fit( context[this_action, :], reward[this_action].astype("float64") )
python
London: England seamer Stuart Broad is confident that the new England captain Andrew Strauss has the character to rebuild any broken bridges in the England dressing room on the forthcoming tour to the Caribbean. “Andrew is a team man, but most people in the England dressing room are team men, so I don’t think it’ll be too difficult to get team unity back," Broad was quoted as saying in the English press. Strauss gave Broad his first international debut in the One-Day international series against Pakistan at Cardiff in 2006, and the paceman believes Strauss’ style of leadership will help foster greater unity. “He’s not in your face. He lets you choose your own fields, with his input. I’m looking forward to playing under him, as I did under Kev," Broad said. After Kevin Pietersen’s resignation following a rift with his coach Peter Moores, 31-year-old Strauss was appointed captain for the the tour of the West Indies. Broad, who is shaping into a future all-rounder with three Test half-centuries under his belt already, credits Andy Flower with much of his improvement as a batsman. “Andy is a very relaxed man and I’m sure he won’t let it phase him," said Broad. “I can’t praise him enough for the work and time he’s put in with me. It’s been helpful in that he was a left-hander. He’s been instrumental in my development as a batsman," he added.
english
New Delhi: It seems to be a scene straight out of Steven Spielberg’s Leonardo DiCaprio and Tom Hanks-starrer Catch Me If You Can. For months, a con artist calling himself ‘Lieutenant Shivam Pandey’ allegedly duped people into believing that he was an Indian Army officer posted with the Srinagar-based Chinar Corps unit. He even published a book under this identity last year — Untold Story From The Indian Army — available on e-commerce sites, and was active on social media. On Monday, however, Pandey’s luck ran out. The alleged imposter was arrested by officers of the military intelligence and the Kolkata Police from the West Bengal capital’s New Market area, after over a month’s surveillance. He is currently in police custody. While the Army is yet to find his real name, sources in the force told ThePrint that he was rather “evasive”. It has, however, been found during investigations that the accused is a resident of Ghazipur in eastern Uttar Pradesh, the sources claimed. Four others, his “body guards”, have also been arrested, sources in the Army said. According to sources in the Army, it was the accused’s active social media presence which finally did him in. The alleged imposter had been promoting his book on social media the past few months, and would also post about his self-proclaimed experiences in the Army. He had also been trying to persuade Twitter and Facebook’s parent company Meta to put a ‘blue tick’ against his account, which is the way to indicate that an account is authentic. According to the sources, military intelligence noticed the man’s profile while monitoring social media activities. Seeing a “serving officer” so active, intelligence officers put his page under observation. After a month of surveillance, military intelligence were sure that the accused was not an Army officer, claimed sources. According to sources, when the Army received a tip-off that he would be travelling to Kolkata, an elaborate plan for his arrest was set up, along with the Kolkata Police. Sources said the accused walked straight into the trap and was arrested near the headquarters of the Army’s Eastern Command around midnight Monday. The accused was dressed in combat fatigues even at the time of his arrest, they added. A search of his possessions revealed a fake Army identity card and multiple writing pads with the Army letterhead. Interestingly, the accused had alerted netizens last month to the alleged misconduct of another “imposter”, who had allegedly robbed Rs 2. 5 lakh from his friend. This guy who is speaking, I am the general manager of YouTube and fraudulently took 2. 5 lakhs from my friend. While this may not be the first time the Army has caught an impostor, it perhaps is the first time an individual has had such an elaborate cover story, one that even includes a book. (Edited by Poulomi Banerjee)
english
According to the The Global Gender Gap Index Report 2015, Pakistan ranked 144 out of 145 countries in women’s participation in all sectors of life. But the ground realities are different. Humaira Bachal started Dream Model Street School for the underprivileged children in Mowach Goth (Karachi) at the age of 12. Sharmeen Obaid Chinoy, the only Pakistani Oscar winner of two awards. Mukhtara Mai, the first women who stood against the decision of local jirga and file a case against them. Shamim Akhtar, who have broken the stereotypes and drove the truck on the roads of Rawalpindi. Addition to the list, Dr. Quratulain Bakhteari is now one of them as well. Dr Bakhteari spent the formative years of her life living in a refugee camp in Karachi after the partition. She was a young mother of three kids at the age of 22, but managed to complete her Masters degree from the University of Karachi and later completed her Doctorate from Loughborough University in England. Today she is the founding director of the Institute For Development Studies and Peace (IDSP) – a training ground for young change-makers from underprivileged communities. She has been working for the development of rural communities and girls’ education in Baluchistan and was nominated for the Nobel Peace Prize in 2006. Due to her, 1800 school were established in the rural areas across Baluchistan. She also helped to solve the sewage and sanitation issues of the locals. Dr Bakhteari helped the residents in the Orangi pilot project to tackle with the problems. Her work became the basis for government to start the project in low-income areas. Her passion for work has set an example for the women who wants do to something for the betterment of the society. Dr Bakhteari is an inspiration of the Pakistani women, her work has been admired when she was nominated for Nobel Prize in 2006. Many of us are still unknown of this beautiful gem Pakistan own. How many of women like Dr Bakhteari are working in the rural areas of Pakistan? How many of like her are struggling without being worried of their own fate? The Global Gender Gap should look upon many of brave Pakistani women like Dr Bakhteari before the issuance of their statistics.
english
Lou Vincent was accused of fixing a T20 match. Sussex are sickened at being tainted by the match-fixing scandal involving former players Lou Vincent and Naveed Arif, manager Mark Robinson admitted on Tuesday. The England and Wales Cricket Board (ECB) on last Thursday charged Vincent and his former Sussex teammate Arif of Pakistan with fixing the outcome of a 40-over county match between Sussex and Kent in August 2011. Former New Zealand cricketer Vincent is also accused of fixing a Twenty20 match between Sussex and Lancashire in the same month. Sussex’s players and coaching staff met on Sunday to discuss the charges relating to those two matches. Captain Ed Joyce spoke of the anger felt in the changing room, but the strongest words were delivered by Robinson. “Obviously the last couple of weeks has been upsetting for everybody connected with the club and especially for the players and coaches involved in that period,” Robinson said. Robinson’s view was echoed by Joyce, who understands that perceptions of Sussex could be tainted by the actions of Vincent and Arif. “My reaction to these stories was anger. There was a lot of anger in the dressing room,” Joyce said. Vincent on last Friday denied striking a plea bargain and said he expected to face more charges on top of the 14 already levelled against him.
english
This beautiful quote, which most travelers are familiar with, emboldens the spirit of Steemit Worldmap. What if we could all share our personal travel-experiences with one another in a convenient way. What if there was a place where you could feel connected to travelers from all over the globe and listen to their stories while sharing your own. We can all agree that that would be an amazing experience. How do we do it? We wanted to have all the stories easily accessible and make it possible to find stories sorted by place or by author. To do just that, we have created Steemit Worldmap. A map which automatically finds posts from travel-bloggers and adds these to itself. Welcome to the newest way of sharing travel-stories! In order to make your post visible on the map follow these 3 simple steps: - Go to Google Maps and click where the story you want to share happened. - Add the following to your post: (remove quotation marks and the markup, they're only here for readability) - Your post has now been added to the Steemit Worldmap! @martibis is a new member to the steemit community. As a passionate, young web developer he's spending a lot of time behind his laptop. Whenever he can find the time he is traveling the world, looking for new adventures. @blueorgy is a well respected steemit veteran. Always on the look out to help out new members, and now looking to become a top 20 steemit witness! 3. Type (blueorgy) in the box and click vote.
english
<filename>api/src/main/java/co/vandenham/telegram/botapi/requests/GetUserProfilePhotosRequest.java package co.vandenham.telegram.botapi.requests; import co.vandenham.telegram.botapi.types.UserProfilePhotos; import java.util.HashMap; import java.util.Map; public class GetUserProfilePhotosRequest implements ApiRequest<UserProfilePhotos> { private Map<String, String> args = new HashMap<>(); public GetUserProfilePhotosRequest(int userId) { this(userId, null); } public GetUserProfilePhotosRequest(int userId, OptionalArgs optionalArgs) { args.put("user_id", String.valueOf(userId)); if (optionalArgs != null) args.putAll(optionalArgs.options()); } @Override public String getMethodName() { return "getUserProfilePhotos"; } @Override public ResultTypes getResultType() { return ResultTypes.USER_PROFILE_PHOTOS; } @Override public Map<String, String> getArgs() { return args; } @Override public RequestStrategy getRequestStrategy() { return new PostStrategy(); } @Override public String toString() { return "GetUserProfilePhotosRequest{" + "args=" + args + '}'; } }
java
Army killed two infiltrating militants in Kupwara district on Wednesday morning. A group of heavily-armed militants tried to sneak into the Indian side at Tangdhar, 140 kms from Srinagar, a defence spokesman said. On noticing their movement, troops challenged them and in the subsequent encounter, two militants were killed. The encounter was continuing when last reports came in.
english
It seems that India may not have to wait unbearably long to greet Uber’s futuristic air taxi services. If media reports are to be believed then India has been enlisted among the important markets for Uber’s air taxi service that is slated for launch in 2023 in the U.S. Talking to Economic Times on the sidelines of Uber Elevate summit 2019, Nikhil Goel, head of product (aviation) at Uber said that the company over the last one year has been holding discussions with several regulators and has hold talks even with Prime Minister Narendra Modi. Goel specified that company’s talks with former aviation minister Jayant Sinha proved fruitful and productive. Last year, Uber had already announced that Los Angeles and Dallas as two cities where it will start pilot testing their flying taxi services. The next stop for Uber Air taxi services would be Melbourne, Australia, which would become the first city outside the US to operate Uber’s futuristic aviation product. The ride-hailing major is aiming for commercial launch of Uber Air in all these three cities by 2023. San Francisco based company is pretty upbeat about its Uber Air services as it believes that in near future traveling via air will become more economically cheaper than driving a car. But for how long will Indian skies have to wait for Uber’s flying taxis. While the company refuses to give any exact timeline for the launch, Allison said that the services may be launched in India in next 5-10 years. Japan, France and Brazil are other international markets where ride-hailing giant is planning to launch Uber Air services.
english
Posted On: The 9th National Voters’ Day (NVD) was celebrated across the country today. President of India Shri Ram Nath Kovind presided over the national level event held at Delhi. The theme for NVD 2019 was ‘No Voter to be Left Behind’ reiterating the commitment of Election Commission of India (ECI) in view of the Lok Sabha elections due this year. President Sh. Ram Nath Kovind hailed the varied interventions taken up by ECI for conduct of free, fair and participative elections. The President particularly appreciated the initiatives for reaching out to voters in the remotest corner to include their names in the electoral roll and to encourage them to exercise the Right to Vote. Referring to his recent visit to Gir National Forest in Gujarat where he came to know about setting up of a polling station even inside the Forest reserve for a single voter, Shri Kovind lauded the efforts of ECI to make every vote count in consonance with the theme of the year. Shri Kovind said that the framers of our Constitution set up the Election Commission as an independent and constitutional body one day before the birth of the Republic of India. This reflects immense regard and deep-rooted belief in democracy and the democratic spirit, he said. Talking about the electoral process – beginning with the preparation of electoral rolls and concluding with the declaration of election results – the President noted it is difficult for an ordinary person to comprehend the complexity of the entire process. The President said that the efforts of ECI have helped establish the credibility of Indian electoral system. It has helped strengthen the belief of Indian voters in the integrity, diligence, fairness and transparency of the election mechanism of the country. Shri Kovind said Voters and Election Commission are complimentary to each other and form the two most vital aspects of democracy. The President appreciated the various initiatives taken by the Commission under the SVEEP programme particularly mentioning the Electoral Literacy Club (ELC) Programme and the all Women Managed Polling Station initiative. The Chief Election Commissioner of India Shri Sunil Arora presented the inaugural issue of the new magazine of ECI, titled “My Vote Matters” to the President on this occasion. The President noted that the ECI magazine is most appropriately titled “My Vote Matters” as every single Vote counts equally in the formation of a government. The bi-lingual quarterly of the Commission hosts interesting and informative articles on many core subjects, new initiatives and topics of concurrent interest in elections, electoral processes and practices with the objective of developing a larger connect and interface with all the Stakeholders. Addressing the gathering Union Minister, Law & Justice Sh Ravi Shankar Prasad, complimented ECI for the stellar role played by ECI for strengthening the Indian democracy. He lauded the courage, commitment and foresight shown by successive Commissions for conduct of free & fair elections and noted that all should trust and believe the sanctity of the election process. Appreciating various initiatives of ECI for voter education and outreach he said voter education is integral to a good democracy. Chief Election Commissioner Shri Sunil Arora in his address, reiterated Commission’s commitment to make elections more and more inclusive, voter friendly, transparent and festive. CEC said that President’s esteemed presence at the occasion further motivates his team to fulfill the commitment towards Constitutional mandate for conduct of free, fair, transparent, robust and ethical elections in the country. Shri Arora elaborated the new initiatives being taken up for efficient and effective connect with the voters and for strengthening the elector confidence. Shri Arora informed the audience about the cVIGIL initiative that provides even time stamping as credible proof of complaints filed against violations of model code of conduct and expenditure, by empowering every citizen to click mere photo or video using a simple Smartphone. Delivering the welcome address, Election Commissioner Shri Ashok Lavasa, briefed the audience about the significance of the day, saying NVD is a day when we celebrate liberty and maturing of young minds into responsible citizens. Six young voters from Delhi were handed over their Elector’s Photo Identity Card (EPIC)s by the President today at the function. Speaking about the National Voters’ Day awards given out on the occasion, Shri Lavasa said the awards are given to honour those who have rendered exceptional service in the field of elections and contributed to developing best practices. Applauding winners of the National Awards the President asked them to keep participating to make elections free and fair. Congratulating the new voters who were handed over their EPICs today, Sh Kovind asked them to take informed decision while casting their vote and highlighted that their decision helps define the future of the country. Special Awards were given today to Indian Railways and Central Reserve Police Force for their contribution in helping transport personnel and material as also guarding the arrangements for smooth conduct of general and recent assembly elections held in 9 states in 2018. In addition, Awards were also given to CSOs and Media Houses who have made outstanding contribution in the field of voter awareness and outreach in these elections. (Details attached). Shri Lavasa also thanked all stakeholders including voluntary organisations for their support. Padma Bhushan MC Marykom, Member of Parliament and National Icon of Election Commission of India also graced the occasion. Members of Political Parties, Members of Parliament besides Diplomats from various countries and representatives from national and international organizations working in the area of democracy and elections attended the National Voters’ Day function. Chief Election Commissioners and senior officials from Election Management Bodies from Bangladesh, Bhutan, Kazakhstan, Maldives, Russia and Sri Lanka and Heads/Senior Representatives of International Organisations viz. Malaysian Commonwealth Studies Centre, U.K.; International Centre for Parliamentary Studies, U.K. and International Institute for Democracy and Electoral Assistance (IDEA) attended the function. The dignitaries also visited the new campus of the India International Institute of Democracy and Election Management (IIIDEM) at Dwarka, New Delhi. The National Voters’ Day (NVD) is celebrated all over the country on January 25 every year since 2011 to mark the Foundation day of Election Commission of India, which was established on this day in the year 1950. The main purpose of the NVD celebration is to encourage, facilitate and maximize the enrollment, especially for the new voters. Dedicated to the voters of the country, the Day is utilized to spread awareness among voters for promoting informed participation in the electoral process. Read this release in:
english
(b) whether it is a fact that there was a charge of embezzelment of Rs. 2.4 lakhs against him; (c) whether Government have received a representation from a Member of the Kamptee Cantonment Board making allegations against him; and (d) if so, the action taken thereon? THE MINISTER OF DEFENCE AND STEEL AND HEAVY ENGINEERING (SHRI SWARAN SINGH): (a) As a result of the findings of a Court of Inquiry appointed to investigate into certain allegations against the officer, he was awarded 'serve displeasure' of the Chief of the Army Staff, and was also ordered to be reverted from the rank of Acting Colonel to Acting Lieut. Colonel. The officer, however, requested for premature retirement so that he could be saved the indignity and embarrassment of having to serve in a lower rank under his juniors. The request was acceded to and he was allowed to retire with effect from 24-11967. Since the officer was not substantive in the rank of Lieut. Colonel, he retired in the rank of substantive Major. (b) to (d). Two letters dated the 28th March 1970 and 17th April 1970 have been received from a member of the Cantonment Board alleging that a former Commandant of the EME Centre, Kamptee, was compulsorily retired after embezzling a sum of Rs. 2.4 lakhs of Government money, that he had made unauthorised constructions in his bungalow and was in arrears of Cantonment Board taxes to the extent of Rs. 2,000/-. The circumstances in which the officer was permitted to retire have been indicated above. No material has been fowarded in support of the allegation of embezzlement of Government money. The Centonment Board is examining the allegation of unauthorised constructions. As ragards arrears of Cantonment dues, a sum of Rs. 327.89 is due from him to the Cantonment Board. The Cantonment Board authorities are taking steps to recover the same. Nuclear Desalination of Sea Water 7994. SHRI GEORGE FERNANDES SHRI DEORAO PATIL: (a) whether the Atomic Energy Establishment, Bombay is conducting experiments on nuclear desalination of sea water; (b) if so, the outcome thereof; (c) whether the economics of setting up nuclear power-cum-desalination unit near Bombay has been considered by Government of Atomic Energy Establishment; (d) if so, the details thereof; and Will the PRIME MINISTER be pleased to state: (e) whether Government would consider undertaking preliminary work to set up a nuclear desalination-cum-power unit to meet the power and water requirements of Bombay? THE PRIME MINISTER, MINISTER OF FINANCE, MINISTER OF ATOMIC ENERGY AND MINISTER OF PLANNING (SHRIMATI INDIRA GANDHI): (a) Such experiments are proposed to be conducted. (b) Does not arise. (c) and (d). Only certain preliminary evaluations have been made. (e) Further detailed studies have to be conducted before any work can be undertaken. Musi Project 7995. SHRI G. S. REDDI: Will the Minister of IRRIGATION AND POWER be pleased to state: (a) whether it is fact that a large volume of water is being wasted from the left Bank Canal by letting out the water into Musi River; and (b) whether there is a proposal of having a temporary parallel canal under construction to fill the Musi Project? THE DEPUTY MINISTER IN THE MINISTRY OF IRRIGATION AND POWER (SHRI SIDDHESHWAR PRASAD): (a) No, Sir. (b) Some lift irrigation schemes are under investigation. Expenditure for Power Generation Scheme under Nagarjunasagar Project 7996. SHRI G. S. REDDI: Will the Minister of IRRIGATION AND POWER be pleased to state: (a) the estimated expenditure for the Power
english
Footballers during a training season. (Photo: ANFA) KATHMANDU: Fourteen players have been out from the closed training of the national football players. Among 58 players taking part in the preliminary closed training session conducted by All Nepal Football Association (ANFA), only 44 were selected for further training and opportunity. Acting coach of the national team Bal Gopal Maharjan shared the information to this regard. The players were selected after a month-long training. Those left behind from the closed training are Bimal Ghartimagar, Rajib Lopchan, Bimal Rana, Suman Aryal, Amit Tamang, Dev Limbu, Randip Poudel, Dipesh Alemagar, Jay Gurung, Jay Gurung, Nitin Thapa, Rajat Tiwari, Rajesh Pariyar, Prijan Tamang and Rejin Subba. Ghartimagar who was off the playground for long was left behind because of injury. He got injury in course of training and will be provided treatment in Qatar, according to ANFA Spokesperson Kiran Rai. The closed training was held at the Training Centre, Satdobato, Lalitpur.
english
Rajasthan election results: The high profile constituency in Jhalawar district came to the spotlight after the Congress pitched Manvendra Singh, Sheo MLA (Barmer), and son of former Union minister Jaswant Singh against Raje. Will chief minister Vasundhara Raje register her “fourth” consecutive victory from her home constituency of Jhalarapatan or will Congress candidate Manvendra Singh upset her in the battle? Whatever be the outcome of the elections, experts say even if Raje wins, her victory margin may reduce. The high profile constituency in Jhalawar district came to the spotlight after the Congress pitched Manvendra Singh, Sheo MLA (Barmer), and son of former Union minister Jaswant Singh against Raje. “It was rated as a one-sided contest in favour of chief minister Raje till a fortnight ago due to a ‘parachute’ candidate Manvendra Singh. However, it has changed now,” said Narayan Baret, political analyst. With most exit polls reflecting an anti-government wave and a pro-Congress sentiment, the chances of Manvendra Singh have gone up, he said. There are around 22,000 Gujjar voters in Jhalarapatan who have also polarised in significant numbers in favour of Congress candidate due to Pradesh Congress Committee president Sachin Pilot who is a contender for the chief minister’s post, the analyst said. Gujjars were earlier supporting Raje, whose daughter-in-law, Niharika Raje, is from the community. Gujarat’s Patidar leader, Hardik Patel, also attended a meeting of the community members in Jhalawar to galvanise voters towards the Congress candidate. “However, one cannot Raje lightly as she has been associated with Jhalarapatan for long and has contributed a lot to the development of the constituency,” said Baret. There was 77. 84% turnout in Jhalarapatan in the election on December 7. Raghuraj Singh Hada, former district president, Jhalawar Congress, said Manvendra Singh can upset the prospects of Raje who was BJP MP from Jhalawar five times till 2003. She was also a three-time MLA from Jhalarapatan. BJP district president, Jhalawar, Sanjay Jain ‘Tau’, described the contest in Jhalarapatan as a one-sided contest in favour of Vasundhara Raje. “Raje will win by a margin of over 50,000 votes on Jhalarapatan constituency and BJP will form its government in state,” he said. Vasundhara Raje defeated Congress candidate Meenakshi Chandrawat by a margin of 60,896 votes in the 2013 assembly elections.
english
<filename>league-client/src/models/metric_metadata.rs<gh_stars>1-10 /* * * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MetricMetadata { #[serde(rename = "alerts", skip_serializing_if = "Option::is_none")] pub alerts: Option<Vec<crate::models::MetricMetadataAlert>>, #[serde(rename = "category", skip_serializing_if = "Option::is_none")] pub category: Option<String>, #[serde(rename = "data_type", skip_serializing_if = "Option::is_none")] pub data_type: Option<crate::models::MetricDataType>, #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option<String>, #[serde(rename = "destination", skip_serializing_if = "Option::is_none")] pub destination: Option<String>, #[serde(rename = "info", skip_serializing_if = "Option::is_none")] pub info: Option<String>, #[serde(rename = "notify", skip_serializing_if = "Option::is_none")] pub notify: Option<crate::models::MetricMetadataNotify>, #[serde(rename = "period", skip_serializing_if = "Option::is_none")] pub period: Option<i32>, #[serde(rename = "pretty_name", skip_serializing_if = "Option::is_none")] pub pretty_name: Option<String>, #[serde(rename = "priority", skip_serializing_if = "Option::is_none")] pub priority: Option<crate::models::MetricPriority>, #[serde(rename = "sample_window_ms", skip_serializing_if = "Option::is_none")] pub sample_window_ms: Option<i32>, #[serde(rename = "transientAggregation", skip_serializing_if = "Option::is_none")] pub transient_aggregation: Option<crate::models::AggregationType>, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub _type: Option<crate::models::MetricType>, #[serde(rename = "units", skip_serializing_if = "Option::is_none")] pub units: Option<String>, } impl MetricMetadata { pub fn new() -> MetricMetadata { MetricMetadata { alerts: None, category: None, data_type: None, description: None, destination: None, info: None, notify: None, period: None, pretty_name: None, priority: None, sample_window_ms: None, transient_aggregation: None, _type: None, units: None, } } }
rust
.alert { position: relative; min-width: 250px; margin: auto; padding: 20px; display: inline-block; font-weight: bolder; font-family: Monospace; font-size: 10; border-radius: 15px; border: 1px solid black; text-align: left; vertical-align: center; opacity: 0.75; } .alert-error { background-color: #FF704D; color: #990000; border-color: #990000; } .alert-success { background-color: #99D6AD; color: #336600; border-color: #336600; } .alert-info { background-color: #99B2FF; color: #003D99; border-color: #003D99; }
css