text
stringlengths
1
1.04M
language
stringclasses
25 values
<filename>datapacks/Luigi's Mansion/data/luigis_mansion/tags/functions/room/ghost_portrificationizer_room/load.json { "values": [ "luigis_mansion:room/ghost_portrificationizer_room/load/set_loaded", "luigis_mansion:room/ghost_portrificationizer_room/load/spawn_e_gadd", "luigis_mansion:room/ghost_portrificationizer_room/load/ghost_portrificationizer" ] }
json
Big Bazaar Direct is a direct selling platform that will enable customers to place orders with the company’s franchisees, after which they will receive their orders in three-seven days. Kishore Biyani, chief executive officer of Future Group, the company that owns the offline retail chain Big Bazaar, has launched a new venture called Big Bazaar Direct. Leveraging a tablet based e-commerce backend, Big Bazaar Direct is basically a direct selling platform that will enable customers to place orders with the company’s franchisees, post which they will receive their orders in three-seven days. Wannabe entrepreneurs can sign up by filling a franchisee application form on BigBazaarDirect.com, after which they will need to send their Know Your Customer (KYC) documents and an application fee of Rs 1,000. For sealing the deal, an investment of Rs 3 lakh will be have to be made by the franchisees that includes Rs 1 lakh each as non-interest bearing refundable security deposit; initial advance that is to be used for placing orders; and set up charges for Big Bazaar Direct tablet, initial branding, one year training, and launch material, etc. Franchisees need to simply take orders from the customer on the tablet provided by the company, post which customers will receive a confirmation SMS and will need to make the payment to the franchisee. Customers will also be offered over 1,000 deals by Big Bazaar. In addition, franchisees don’t need to stock and deliver goods; Big Bazaar will handle the same. The company will also provide a dedicated team for franchisee and customer support; in case of any product related issue, Big Bazaar Direct will arrange for the return pick up. Franchisees will get a cut of every order placed via their tablets. Big Bazaar is aiming to have 100,000 franchisees in two years. This roughly translates into Rs 3,010 crore in direct earning (in addition to the sales of products) for the company, considering the amount it is charging for setting up a single franchisee. While all of this does look good on paper, we don’t really understand the point of it all. Why would customers bother to place orders on tablets and wait for three-seven days for delivery of their products, when they can simply go to the nearest kirana store and purchase them. And if the argument is the ‘convenience of ordering from home’, online grocery sites like AaramShop, LocalBanya, Ekstop, BigBasket, ZopNow and MyGrahak already offer the same. While their reach may not be as extensive, the delivery time is much less which is a key feature for any consumer.
english
- 1 hr ago 50th GST Council Meet: Cancer Medicine Price May Be Reduced; How Can It Benefit Patients? The position of stars and planets determines the changes in a person's life as per Vedic astrology. The future brings possibilities and uncertainties. Be it love, career, relationship, education or family, you may be curious about what lies ahead. While for some, there will be obstacles, others will bask in the glory of opportunities. Read your daily horoscope to see what the stars of your fate have in store for you. Today you are advised to avoid getting into unnecessary trouble. Think carefully before discussing any controversial issue. On the work front, the day is giving very good indications. Any difficult task of yours can be completed today without any hindrance. There is a possibility of improvement in the financial situation. You can get the stopped money. As far as health is concerned, you may have problems like fever, cold, cold etc. Do not be negligent in legal matters otherwise you will be stuck in this affair for a long time. Today is going to be a hectic day on the work front. However, with your hard work and understanding, you will be able to complete all your work on time. Financial condition will be good. Today you can also buy an expensive gift for someone close. If the home environment is not going well for some time, then some improvement can be seen today. It will be better if you also take care of your speech and behaviour. The day will be fine in terms of health. Today can bring great relief for you. If you have taken a loan or loan, you will be able to repay it. People associated with business will have to be very careful. Stay away from lottery and betting, otherwise, you may suffer loss. The day of employed people is going to be normal. You can get a chance to travel with your spouse. Today you can go to your favourite place. The day will be better in terms of health. You have to be careful in the workplace. Opponents will remain active and may try to obstruct any of your important work. Today you can meet an old friend of yours. After a long time, you will have a very fun time. In terms of money, the day is going to be mixed. Do not spend more than your income. Think carefully before making any promise to your spouse, otherwise, bitterness may increase between you. If you have a complaint of asthma your problem may increase today. You are advised to avoid being aggressive while talking with your spouse, otherwise there may be a quarrel between you today. Such things will have a bad effect on your children as well. The day is going to be normal in terms of money. Avoid spending without thinking. Today in the office you may have differences with higher officials. You are advised to present your side very calmly and intelligently. The sum of profit is being made for the traders. You can get good financial benefits. Today is going to be a good day for you in terms of health. There is a strong possibility of a boom in the economic situation. Today you will get freedom from the worries related to money. On the work front, the day will be good. Today you will be able to focus on your work properly. If you are associated with your ancestral business, then take the advice of your elders before taking any important decision today. The relationship with the spouse will be strong. There will be cooperation in fulfilling domestic responsibilities. Today will be a good day in terms of health. Today is giving a very good indication for the people associated with politics. You may get some big success. At the same time, the doors of success will open for people associated with fashion and media. Today will be a better day for you in terms of money. You can get a good chance to earn money. Conditions seem to be normal in family life. There can be improvement in mutual relations. Your health will be fine. However, you are advised to do yoga and meditation daily. If you are a student then you will have to concentrate fully on your studies. If your exams are coming soon, then make good use of your time. There are signs of strengthening in your financial condition. Today suddenly money can be received. Competition will be very high in the office. In such a situation, you are advised not to be negligent towards work. Businessmen will have to take their decisions carefully to earn big profits. The atmosphere of the house will be fine. Your health will be fine. Today you will feel very energetic. If you want to sell any of your ancestral property, today you may get a good opportunity. You must take advice from your close ones. Tension seems to be increasing due to work. Businessmen may feel very disappointed for not getting the expected results. There are ups and downs like this in business. Stay positive and keep working hard. Money situation will be fine. If we talk about health, then due to disturbance in food, there may be problems related to stomach. Today is going to be auspicious for you in terms of your finances. You can get money from more than one source. You may have to travel in connection with work. Your journey will be very auspicious. Your spouse will be in a very romantic mood today and may demand to spend more time with you. Today they can also buy your favourite gift for you. As far as your health is concerned, you will feel good mentally. Today will be a challenging day for businessmen. You may suffer financial loss due to the sudden deterioration of some work being done. On the other hand, employed people are advised to avoid relying too much on colleagues in the office. Avoid doing too many secret things related to yourself here and there. In terms of money, the day is going to be mixed. If you are planning to take a loan, today your hands may feel disappointed. Today will not be anything special for you in terms of health. You need to avoid carelessness. If there is any work-related problem, today with the help of a close one, your problem can be solved. After a long time, you will find yourself in a better mood. Your financial condition will be good. Today you can also take an important financial decision. By talking with your spouse, you will try to clear all the misunderstandings. It is possible that you will get success. Your health-related problems can happen. Today you may have to spend a lot of money on doctors and medicines. Disclaimer: The information is based on assumptions and information available on the internet and the accuracy or reliability is not guaranteed. Boldsky doesn't confirm any inputs or information related to the article and our only purpose is to deliver information. Kindly consult the concerned expert before practising or implementing any information and assumption. - astrologyHoroscope Today, 10 July 2023: Gemini Needs To Be Careful About Finances, Taurus Will Be Lucky In Love! - astrologyHoroscope Today, 07 July 2023: Cancer Will Experience A Great Love Life, Virgo Will Struggle For Success ! - astrologyHoroscope Today, 04 July 2023: Aries Need To Focus On Their Personal Life, Sagittarius Will Acquire Money! - astrologyLove Horoscope July 2023: While Gemini Will For Intense Connections, Leo's Heart Will Shine This Month!
english
public class Main { public static void main(String[] args) { System.out.println(4000 << 4); } }
java
{"LegionOfLostSouls": ["MysteriousPast", "HeartbrokenBadass", "NobleFugitive", "YouCantGoHomeAgain", "CheeseEatingSurrenderMonkeys", "EagleSquadron", "ArmyOfThievesAndWhores", "TradingBarsForStripes", "Qurac", "SpaceMarines", "InSpace", "MiniMecha", "SergeantRock", "AffablyEvil", "FunnyForeigner", "CrazyJealousGuy", "ForbiddenFruit", "NegativeContinuity", "EndOfAnEra", "ExactlyWhatItSaysOnTheTin", "TropeMakers", "ExactlyWhatItSaysOnTheTin", "RecycledInSpace", "NiceJobBreakingItHero", "RecycledInSpace", "BadassCreed", "InSpace", "HeelFaceTurn", "Gotterdammerung", "ArmyOfThievesAndWhores", "MindWipe", "BadassBookworm", "TheCharmer", "DrillSergeantNasty", "CampGay", "Beat", "TheRunaway", "AnachronismStew", "TheRunaway", "SpaceOpera", "HumongousMecha", "BigFreakingSword", "YourDaysAreNumbered", "TheTriadsAndTheTongs", "TheCartel", "ThoseWackyNazis", "ArmsDealer", "MadScientist", "OlderThanTheyLook", "MixAndMatchMan", "OneManArmy", "YourDaysAreNumbered", "BrainBleach", "TheSmartGuy", "Backstory", "TalkingAnimal", "DeusExMachina", "GeneralRipper", "INeedToGoIronMyDog", "BrainBleach", "ANaziByAnyOtherName", "HellholePrison", "VigilanteExecution", "ANaziByAnyOtherName", "HellholePrison", "VigilanteExecution"]}
json
<reponame>fullstackdeveloperstar/laravel_event_attendize { "name": "DateTimePicker", "title": "Responsive flat design jQuery DateTime Picker plugin for Web & Mobile", "description": "DateTime Picker is a quick highly customizable jQuery plugin. The design is clutter free & well suited for embedding it into mobile application development. Users can change values using +/- buttons or type values directly into the textbox by selecting each value fields. For web, picker can be binded relative to reference element, were it will appear at the bottom of the element. For mobile, the picker can appear as a dialog box covering entire window.", "keywords": ["date", "time", "datetime", "plugin", "picker", "DatePicker", "TimePicker", "DateTimePicker", "Responsive", "Flat", "Mobile", "jquery"], "author": { "name": "Curious Solutions", "url": "http://curioussolutions.in/" }, "maintainers": [ { "name": "<NAME>", "url": "https://github.com/nehakadam" } ], "repository": { "type" : "git", "url" : "https://github.com/CuriousSolutions/DateTimePicker.git" }, "homepage": "http://curioussolutions.github.io/DateTimePicker/", "docs": "http://curioussolutions.github.io/DateTimePicker/", "version": "0.1.26", "licenses": [ { "type": "MIT", "url": "https://github.com/CuriousSolutions/DateTimePicker/blob/master/LICENSE" } ], "dependencies": { "jquery": ">=1.9.1" }, "bugs": "https://github.com/CuriousSolutions/DateTimePicker/issues" }
json
$(document).ready(function() { $('#checkout').on('click', function(){ $('#your-gem-tab').removeClass('active') $('#all-gem-tab').addClass('active') }); });
javascript
click(Pattern("Bameumbrace.png").similar(0.80)) sleep(1) click("3abnb.png") exit(0)
python
package com.jacksonleonardo.unpaper.model.services; import com.jacksonleonardo.unpaper.model.entities.IUser; import com.jacksonleonardo.unpaper.model.enumerators.ERole; import com.jacksonleonardo.unpaper.model.exceptions.NullArgumentException; import java.util.HashSet; import java.util.Set; import static com.jacksonleonardo.unpaper.model.services.IdentificationService.identificationServiceDefault; import static com.jacksonleonardo.unpaper.model.services.LoginService.LoginServiceDefault; import static com.jacksonleonardo.unpaper.model.services.PermissionService.permissionServiceDefault; import static com.jacksonleonardo.unpaper.model.services.SessionService.getCurrentUser; public class AuthenticationService implements IAuthenticationService { private final IIdentificationService identificationService; private final IPermissionService permissionService; private final ILoginService loginService; public AuthenticationService(IIdentificationService identificationService, IPermissionService permissionService, ILoginService loginService) { if (identificationService == null || permissionService == null || loginService == null) throw new NullArgumentException(); this.identificationService = identificationService; this.permissionService = permissionService; this.loginService = loginService; } @Override public boolean authenticate(String accessKey, String password) { if (accessKey == null || password == null) throw new NullArgumentException(); IUser user = identificationService.identifyUser(accessKey); if (user == null) return false; return loginService.logInto(user, password); } @Override public boolean authenticate(String accessKey, String password, ERole role) { if (accessKey == null || password == null || role == null) throw new NullArgumentException(); IUser user = identificationService.identifyUser(accessKey); if (user == null) return false; if (!permissionService.hasRole(user, role)) return false; return loginService.logInto(user, password); } @Override public boolean isAuthenticated(IUser user, Set<ERole> roles) { if (user == null || roles == null) throw new NullArgumentException(); if (identificationService.isValid(user)) { for (ERole role : roles) { if (!user.getRoles().contains(role)) return false; } return getCurrentUser() != null && getCurrentUser().equals(user) && getCurrentUser().getCredential().equals(user.getCredential()); } return false; } @Override public boolean isAuthenticated(IUser user) { return isAuthenticated(user, new HashSet<>()); } public static IAuthenticationService authenticationServiceDefault() { return new AuthenticationService(identificationServiceDefault(), permissionServiceDefault(), LoginServiceDefault()); } }
java
Former Pakistan National Cricket Team express pacer Shoaib Akhtar has dissociated himself from his biopic “Rawalpindi Express – Running against the odds” and has threatened to take “severe legal action” against makers if the project continues. On Sunday, July 24, 2022, Shoaib Akhtar announced the launch of his biopic on social media. The film was directed by Muhammad Faraz Qaiser, written by Qaiser Nawaz and produced under the banner of Q Films Productions. Also, it was set to release on November 16, 2023. “Beginning of this beautiful journey. Announcing the launch of my story, my life, my Biopic, “RAWALPINDI EXPRESS – Running against the odds” You’re in for a ride you’ve never taken before. First foreign film about a Pakistani Sportsman. Controversially yours, Shoaib Akhtar,” Akhtar, who represented his country in 46 Tests, 163 ODIs and 15 T20Is, had said on Twitter back then. On Saturday, January 21, 2023, Shoaib Akhtar, who holds the record for bowling the fastest delivery in international cricket of 161kmph, took to Twitter to state that the “failure to resolve disagreements amicably and constant contractual violations” has led to him moving away from his “dream project”. He has also threatened the makers to move legally if they continue with the project. “Very sadly, I would like to inform all of you that after careful consideration of months, I have decided to dissociate myself from the film Rawalpindi Express & its makers by terminating the agreement through my management and legal team. Definitely, it was a dream project and I tried a lot to prevent and stay in the boat but unfortunately, things were not going well. “Failure to resolve disagreements amicably and constant contractual violations finally resulted in us cutting ties with them. Therefore I have left the project after complying with all legal protocols of revoking the rights to the story of my life. Severe legal action will be taken if the makers continue to make biography film and use my name and life story events in any way,” Shoaib said.
english
<filename>src/Error.ts import { ErrorRequestHandler, NextFunction } from "express"; import { ParamsDictionary, Request, Response } from "express-serve-static-core"; import path from "path"; import { Logger } from "./Logger"; import { getResponseObject, ResponseStatus } from "./Models/IResponseData"; import { CORS_ERROR } from "./Cors"; import { isError } from "./Shared/Core"; export class UserInputError extends Error { private inputErrorValue: boolean; constructor(message: string) { super(message); this.inputErrorValue = true; } get inputError(): boolean { return this.inputErrorValue; } static isThisType(error: Error): error is UserInputError { return (error as UserInputError).inputError !== undefined; } } export const errorMiddleware: ErrorRequestHandler = ( error: unknown, req: Request<ParamsDictionary>, res: Response, next: NextFunction ) => { const logger = Logger.get(path.basename(__filename)); logger.error(error as Record<string, string>); if (isError(error)) { if (UserInputError.isThisType(error)) { res.status(400); return res.send(getResponseObject(ResponseStatus.Failed, error.message)); } else if (error.message === CORS_ERROR) { res.status(401); return res.send(getResponseObject(ResponseStatus.Failed, error.message)); } } res.status(500); return res.send(getResponseObject(ResponseStatus.Failed)); };
typescript
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding. You are using an out of date browser. It may not display this or other websites correctly. My local dealer told me that ther is one of HP costs 3350+t is that good? Or better options at that range? Hi Guest we just wanted to alert you to a major change in the forum. We will no longer be allowing the posting of outgoing links. Please use the attachment feature to attach media to your posts.
english
{"PREVALENCE_BY_GENDER_AGE_YEAR":{"TRELLIS_NAME":[],"SERIES_NAME":[],"X_CALENDAR_YEAR":[],"Y_PREVALENCE_1000PP":[]},"PREVALENCE_BY_MONTH":{"X_CALENDAR_MONTH":[],"Y_PREVALENCE_1000PP":[]},"PROCEDURE_FREQUENCY_DISTRIBUTION":{"Y_NUM_PERSONS":0,"X_COUNT":1},"PROCEDURES_BY_TYPE":{"CONCEPT_NAME":"Hospitalization Cost Record","COUNT_VALUE":12},"AGE_AT_FIRST_OCCURRENCE":{"CATEGORY":["MALE","FEMALE"],"MIN_VALUE":[57,38],"P10_VALUE":[57,38],"P25_VALUE":[63,49],"MEDIAN_VALUE":[64,57],"P75_VALUE":[79,75],"P90_VALUE":[81,78],"MAX_VALUE":[81,78]}}
json
# https://www.youtube.com/watch?v=G-Rp41BzGxg&list=PLCC34OHNcOtpz7PJQ7Tv7hqFBP_xDDjqg&index=44 from kivymd.app import MDApp from kivy.lang import Builder class Codemy_Tutorial_App(MDApp): def build(self): self.theme_cls.theme_style = 'Dark' self.theme_cls.primary_palette = 'BlueGray' return Builder.load_file('codemy_KivyMd_31_Login.kv') def logger(self): self.root.ids.my_label.text = f'{self.root.ids.user.text}' def clear(self): self.root.ids.my_label.text = 'WELCOME' self.root.ids.user.text = '' self.root.ids.password.text = '' if __name__ == '__main__': Codemy_Tutorial_App().run()
python
It was the most tragic way to be dismissed after dominating for most of 180 deliveries in tricky conditions in his country’s first overseas Day and Night Test. Virat Kohli looked really good today. He was determined, he was focused, he left beautifully, he played the pull with conviction, there were some sublime flicks on the leg side and he put away the rare bad deliveries. And just when he and Ajinkya Rahane looked all set to take the match away from Australia, after doing all the hard work negotiating the world class attack of Cummins, Hazlewood, Starc and Lyon, Kohli was left high and dry and stranded half way courtesy a terrible call from his partner and was run out. That run out of Kohli came at a crucial time for India - just three overs prior to the new ball when batting under lights becomes a major challenge. India had a mini collapse and moved from a strong position (188 for 3) to 233 for 6 at stumps on Day 1 losing two big wickets with the second new Pink Ball under the floodlit Adelaide Oval. Kohli’s dismissal may just turn out to be the turning point not only for this Test but the entire series. The Indian skipper has been a run-machine Down Under and has loved batting at the Adelaide Oval. He has scored 1348 runs in just 13 Tests (24 innings) at an average of 56. 16 in Australia. For visiting batsmen from the subcontinent (min. 500 runs), only Kumar Sangakkara (60. 33) has a higher average in Australia than Kohli. Just for perspective, Pujara has a batting average of 54. 64, Tendulkar - 53. 2, Gavaskar - 51. 11, Younis Khan - 50. 63, Sehwag - 46. 86, Laxman - 44. 14 and Dravid - 41. 64 in Australia. Kohli has bettered all their efforts. Kohli has registered 6 hundreds in Australia and is tied third with Herbert Sutcliffe and Tendulkar. But while the incumbent Indian captain has just taken 12 Tests to register these 6 centuries, Sutcliffe and Tendulkar played 14 and 20 Tests in Australia. Only Jack Hobbs (9) and Wally Hammond (7) have registered more hundreds Down Under than Kohli. Kohli’s record in Adelaide stands out. He has aggregated 505 runs in 7 innings at an average of 72. 14 in Adelaide. Amongst visiting batsmen, only Lara, Hobbs and Vivian Richards have scored more runs at the venue. Kohli’s three hundreds at the Adelaide Oval are also the joint-highest for a visiting batsman along with Sir Jack Hobbs. Batting at Number 6, Kohli scored a fighting 116 in the first innings in Adelaide in 2012. He came out to bat at 87 for 4 and top-scored for his country even as wickets tumbled at the other end. The second highest score of the innings was 35. That innings’ set the tone for Kohli - the Test batsman. It was his first overseas Test hundred and he has never looked back thereafter. Kohli became the fourth Indian after Hazare, Gavaskar and Dravid to register a hundred in each innings of a Test when he scored 115 and 141 at the Adelaide Oval in 2014. Chasing 364, Kohli and Murali Vijay had forged together a brilliant 185-run stand for the third wicket before Vijay’s dismissal opened the floodgates for India. Kohli continued the fight but was finally out with the team score at 304 hammering a brilliant 141 off just 175 deliveries - one of the finest Test hundreds by a visiting batsman in Australia, albeit in a losing cause. Kohli looked all set to register his 4th ton at the Adelaide Oval today. He has one more innings to put the disappointment of his dismissal behind and leave a mark on the series.
english
<reponame>krassowski/sql-language-server<gh_stars>0 import { CompletionItem } from 'vscode-languageserver-types' import { FromTableNode } from '@joe-re/sql-parser' import { Table } from '../../database_libs/AbstractClient' import { getAliasFromFromTableNode, makeColumnName } from '../StringUtils' import { isTableMatch } from '../AstUtils' import { ICONS } from '../CompletionItemUtils' import { Identifier } from '../Identifier' export function createCandidatesForColumnsOfAnyTable( tables: Table[], lastToken: string ): CompletionItem[] { return tables .flatMap((table) => table.columns) .map((column) => { return new Identifier( lastToken, column.columnName, column.description, ICONS.TABLE, 'FROM' ) }) .filter((item) => item.matchesLastToken()) .map((item) => item.toCompletionItem()) } export function createCandidatesForScopedColumns( fromNodes: FromTableNode[], tables: Table[], lastToken: string ): CompletionItem[] { return tables .flatMap((table) => { return fromNodes .filter((fromNode) => isTableMatch(fromNode, table)) .map(getAliasFromFromTableNode) .filter((alias) => lastToken.startsWith(alias + '.')) .flatMap((alias) => table.columns.map((col) => { return new Identifier( lastToken, makeColumnName(alias, col.columnName), col.description, ICONS.COLUMN ) }) ) }) .filter((item) => item.matchesLastToken()) .map((item) => item.toCompletionItem()) }
typescript
<html><head><link rel="stylesheet" href="../../../css/style.css"/> <link rel="stylesheet" href="../../../css/override.css"/> </head><body><p>description: Reduce learning rate when a metric has stopped improving.</p> <div itemscope="" itemtype="http://developers.google.com/ReferenceObject"> <meta itemprop="name" content="tf.keras.callbacks.ReduceLROnPlateau"/> <meta itemprop="path" content="Stable"/> <meta itemprop="property" content="__init__"/> <meta itemprop="property" content="in_cooldown"/> <meta itemprop="property" content="set_model"/> <meta itemprop="property" content="set_params"/> </div> <a class="dashingAutolink" name="autolink-6439"></a><a class="dashAnchor" name="//apple_ref/cpp/Function/tf.keras.callbacks.ReduceLROnPlateau"></a><h1>tf.keras.callbacks.ReduceLROnPlateau</h1> <!-- Insert buttons and diff --> <table class="tfo-notebook-buttons tfo-api nocontent" align="left"> </table> <p><a target="_blank" href="code/stable/tensorflow/python/keras/callbacks.py">View source</a></p> <p>Reduce learning rate when a metric has stopped improving.</p> <p>Inherits From: <a href="../../../tf/keras/callbacks/Callback.html"><code>Callback</code></a></p> <p></p><section class="expandable"><br/> <h4 class="showalways">View aliases</h4><br/> <p><br/> <b>Compat aliases for migration</b><br/> </p><p>See<br/> <a href="https://www.tensorflow.org/guide/migrate">Migration guide</a> for<br/> more details.</p><br/> <p><code>tf.compat.v1.keras.callbacks.ReduceLROnPlateau</code></p><br/> <p></p><br/> </section><p></p> <pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link"><code>tf.keras.callbacks.ReduceLROnPlateau( monitor=&#39;val_loss&#39;, factor=0.1, patience=10, verbose=0, mode=&#39;auto&#39;, min_delta=0.0001, cooldown=0, min_lr=0, **kwargs ) </code></pre> <!-- Placeholder for "Used in" --> <p>Models often benefit from reducing the learning rate by a factor<br/> of 2-10 once learning stagnates. This callback monitors a<br/> quantity and if no improvement is seen for a &#39;patience&#39; number<br/> of epochs, the learning rate is reduced.</p> <h4>Example:</h4> <div class="highlight"><pre><span></span><span class="n">reduce_lr</span> <span class="o">=</span> <span class="n">ReduceLROnPlateau</span><span class="p">(</span><span class="n">monitor</span><span class="o">=</span><span class="s1">&#39;val_loss&#39;</span><span class="p">,</span> <span class="n">factor</span><span class="o">=</span><span class="mf">0.2</span><span class="p">,</span> <span class="n">patience</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">min_lr</span><span class="o">=</span><span class="mf">0.001</span><span class="p">)</span> <span class="n">model</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="n">X_train</span><span class="p">,</span> <span class="n">Y_train</span><span class="p">,</span> <span class="n">callbacks</span><span class="o">=</span><span class="p">[</span><span class="n">reduce_lr</span><span class="p">])</span> </pre></div> <!-- Tabular view --> <p><br/><br/><p></p><p></p><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><table class="responsive fixed orange"> <colgroup><col width="214px"/><col/></colgroup> <tbody><tr><th colspan="2"><h2 class="add-link">Arguments</h2></th></tr> <tr> <td><br/> <code>monitor</code><br/> </td> <td><br/> quantity to be monitored.<br/> </td> </tr><tr> <td><br/> <code>factor</code><br/> </td> <td><br/> factor by which the learning rate will be reduced.<br/> <code>new_lr = lr * factor</code>.<br/> </td> </tr><tr> <td><br/> <code>patience</code><br/> </td> <td><br/> number of epochs with no improvement after which learning rate<br/> will be reduced.<br/> </td> </tr><tr> <td><br/> <code>verbose</code><br/> </td> <td><br/> int. 0: quiet, 1: update messages.<br/> </td> </tr><tr> <td><br/> <code>mode</code><br/> </td> <td><br/> one of <code>{&#39;auto&#39;, &#39;min&#39;, &#39;max&#39;}</code>. In <code>&#39;min&#39;</code> mode,<br/> the learning rate will be reduced when the<br/> quantity monitored has stopped decreasing; in <code>&#39;max&#39;</code> mode it will be<br/> reduced when the quantity monitored has stopped increasing; in <code>&#39;auto&#39;</code><br/> mode, the direction is automatically inferred from the name of the<br/> monitored quantity.<br/> </td> </tr><tr> <td><br/> <code>min_delta</code><br/> </td> <td><br/> threshold for measuring the new optimum, to only focus on<br/> significant changes.<br/> </td> </tr><tr> <td><br/> <code>cooldown</code><br/> </td> <td><br/> number of epochs to wait before resuming normal operation after<br/> lr has been reduced.<br/> </td> </tr><tr> <td><br/> <code>min_lr</code><br/> </td> <td><br/> lower bound on the learning rate.<br/> </td> </tr> </tbody></table></p> <h2>Methods</h2> <a class="dashingAutolink" name="autolink-6440"></a><a class="dashAnchor" name="//apple_ref/cpp/Method/in_cooldown"></a><h3 id="in_cooldown"><code>in_cooldown</code></h3> <p><a target="_blank" href="code/stable/tensorflow/python/keras/callbacks.py">View source</a></p> <pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link"><code>in_cooldown() </code></pre> <a class="dashingAutolink" name="autolink-6441"></a><a class="dashAnchor" name="//apple_ref/cpp/Method/set_model"></a><h3 id="set_model"><code>set_model</code></h3> <p><a target="_blank" href="code/stable/tensorflow/python/keras/callbacks.py">View source</a></p> <pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link"><code>set_model( model ) </code></pre> <a class="dashingAutolink" name="autolink-6442"></a><a class="dashAnchor" name="//apple_ref/cpp/Method/set_params"></a><h3 id="set_params"><code>set_params</code></h3> <p><a target="_blank" href="code/stable/tensorflow/python/keras/callbacks.py">View source</a></p> <pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link"><code>set_params( params ) </code></pre> <script src="../../../js/math.js"></script> <script src="../../../js/main.js"></script> </body></html>
html
Kuldeep Yadav has been tough to fathom for batsmen over the past two years, helping India script ODI series wins, including their first ever in South Africa. Despite enduring tough times in this IPL and in the last ODI series against Australia at home, Kuldeep Yadav is crucial to India’s bowling plans at the World Cup. The chinaman bowler has been tough to fathom for batsmen over the past two years, helping India script ODI series wins, including their first ever in South Africa. The Kanpur bowler attributes his success to skill, and vows he will continue to attack batsmen at the World Cup. Excerpts: You arrived with a bang, taking wickets by the bagful. Did your being a chinaman bowler help surprise batsmen initially? Not really. There was a little bit of advantage, especially when I started, as there was no other chinaman bowler. But it didn’t entirely give me an advantage. Eventually it boils down to how you spin the ball, how much air you are giving, tempting and deceiving batsmen and making them commit mistakes. It is not that I am a mystery bowler and always successful. I go for runs sometimes and I try and make a comeback. Skills are important, and how well you execute them is more important. If you are deceiving batsmen in the air or on the drive and the ball is turning, it comes in the skill category. If the batsman is unable to pick you, gets bowled or is leg before or stumped regularly, then it is mystery. My basics are good and my focus is on bowling like a classical leg-spinner. Chinaman bowlers aren’t always the first choice. How difficult was it for you to take on the role as wicket-taker at the international level? Confidence comes only if you have practised enough. I have been bowling this since childhood. I always had command over this skill. I never used to see myself as a chinaman bowler. I used to feel I am bowling like Shane Warne. So I always used to bowl like him, try to turn the ball like him. I never used to get scared even if I went for runs. I felt nothing should weigh that heavily on me that it makes me scared. That is a plus point for me. Sometimes I do go for runs and feel bad. But I know I can also get the batsman out. That is an advantage I had since childhood. That is the skill I have got. Yes, yes. The team management and support staff have helped me completely. Seniors like Virat bhai, Mahi bhai and Rohit bhai have given me the freedom to attack. Ravi bhai too. It has never been like I am a chinaman bowler, unusual, so I shouldn’t be taken seriously. The culture is not like that. They have always supported every kind of spinner. That is the good thing. So it feels good, gives you confidence. As skipper, Virat bhai backs you to the hilt. Because of that freedom, our success ratio has gone up. Mahi bhai has played so much cricket, seen the game from such close quarters, and he passes on his experience, about the pitch, batsmen. Even if we are 60%, he makes up the other 40%. It becomes complete. Sometimes we don’t know what the batsman is planning to do, so he keeps talking to us and telling us. It feels great. He has been with me since my debut. Both (Yuzvendra) Chahal and I have been lucky. Before IPL, you spoke about focussing on bowling a restrictive length? I was trying that for IPL. You can try it in T20 because the batsman always tries to hit out. In one-day cricket, you have to be attacking. Your chances are bright in ODIs only if you attack. The batsman can give his wicket. In T20, you think of stopping runs, getting a dot, and not give boundaries. The wicket demands it. If you give even a little bit of flight in T20s, it becomes easy for batsmen to go for big hits. So, I was trying to control that a bit. But you struggled to get wickets, your strength, in IPL this time? It is not like that. You will always not be good, sometimes bad times will come. Sometimes, the wicket will be good for batting, sometimes batsmen will play well. You get just four overs in T20 so one bad over can hurt you. I don’t think I bowled badly in IPL. I was bowling well and with rhythm. It is just that there was no luck, catches were dropped. The wicket at Eden (KKR’s base) has been good for the last two years, and was especially good for batting this time. Consistent grass was left, making it tough for spinners. If you see the record, spinners of other teams coming to Eden too struggled, and always went for runs. It is tough to bowl there. My strength is to bowl with flight and go for wickets. If you do that, you’ll go for runs. It is not like I went for runs in all the matches. I went for runs in one or two overs and you think my season went bad. It is cricket. It happens. You can’t always be perfect. You struggled in the recent ODIs versus Australia. Your coach said it was because you had been playing continuously? If you play too much cricket, you end up lacking somewhere. It is not that I was bad. I managed to take 10 wickets, which I think was the most for India. So you can’t say I was bad. In one or two matches if you don’t get wickets, people start commenting that your rhythm has gone. Even batsmen won’t hit hundreds everyday on good batting wickets. Yes, I was a bit tired because it was a long season. Wickets were also slow. When the wicket is slow batsmen get time, especially against wrist-spinners. If the wicket would have been faster or bouncier, it would have been easier to control the batsmen. Also, Usman Khawaja and Aaron Finch batted well, credit to them. We had a long season against them, starting with Tests. If you play a bowler regularly, sometimes you end up playing him better. Looking at the England-Pak ODIs, the wickets will be very batting-friendly where even 350 is not safe. We can’t say anything about wickets or how to bowl on them from here. We are focussing on basics and skills. That is important. My approach in ODIs has always been to attack and for me it is important to take wickets in the middle overs. If I get wickets, then even 300 will be a lot for them. Our target will be to take wickets in the mid-innings. It depends on conditions. We have matured enough to plan a day or two before seeing the wicket. Also, both England and Pakistan have batted very well. Your understanding with Chahal will be key. We back each other to perform. Understanding has developed because we stay and spend time together even off the field. So, it becomes equally easy to interact and understand each other on the ground. We don’t need to discuss before a game or series, we just talk normally during the game. If he bowls first, he’ll tell me how wicket plays after his over ends. If I bowl first then I tell him if the wicket is helping turn, etc. Also, Mahi bhai helps a lot from behind the wicket.
english
A free program for Android, by AniHub. YouTube for Android TV - Bring YouTube to your TV for free! A free app for Android, by NeoHD Wallpaper nd Keyboard. A free program for Android, by Faizy Dev.
english
<gh_stars>0 --- layout: post title: "[Data-Intensive] Ch3. 저장소와 검색 - OLTP/OLAP/DW" date: 2019-05-22 15:15:12 categories: Data-Intensive-Application author : <NAME>˚ tag: Data-Intensive-Application cover: "/assets/instacode.png" --- ## 저장소와 검색 '데이터 중심 애플리케이션 설계'를 읽고 정리하고자함 --- ## 정리 - 저장소 엔진은 트랙잭션 처리 최적화(OLTP)와 분석 최적화(OLAP)로 큰 두가지 범주로 나눔 - OLTP > - 사용자 대면이기 때문에 대량의 요청을 받을 수 있음 > - 부하를 처리하기 위해 보통 애플리케이션이 각 질의마다 **작은 수의 레코드**만 다룸 > - 애플리케이션은 키의 일부만 사용하는 레코드를 요청하고 저장소 엔진은 요청한 키의 데이터를 찾기 위해 색인을 사용함 > - 대개 디스크 탐색이 병목 포인트임 - OLAP > - 데이터 웨어하우스와 유사한 분석 시스템 > - 최종 사용자가 아닌 비지느스 분석가가 주로 사용함 > - OLTP 시스템보다 훨씬 **적은 수의 질의를 다루지만, 각 질의는 대개 다루기 어렵고 짧은 시간에 수백만 개의 레코드를 스캔** 해야함 > - 디스크 대역폭, 디스크 탐색이 아닌 부분이 병목 포인트 > - 컬럼 지향 저장소는 이런 종류의 작업부하를 처리할 때 사용 가능한 솔루션 - OLTP 측면에서 두가지 주요한 관점 1. 로그 구조화 관점에서 파일에 추가와 오래된 파일의 삭제만 허용하고, 한번 쓰여진 파일은 절대 갱신하지 않음 > - 비트캐스크, SS테이블, LSM트리, 레벨DB, 카산드라, HBase, 루씬 등이 속함 2. 제자리 갱신 관점에서 덮어쓰기 할 수 있는 고정 크기 페이지의 셋으로 디스크를 다룸 > - B트리로, 모든 주요 관계형 데이터베이스와 많은 비정형 데이터베이스서 사용함 - 로그 구조화 저장소의 핵심 아이디어는 '임의 접근 쓰기를 체계적으로 디스크에 순차 쓰기로 바꾼 것' > - 그 결과, 하드/SSD의 성능 특성에 맞춰 쓰기 처리량을 높이는 것이 가능해짐 - 데이터 웨어하우스의 고수준 아키텍처로 저장소 엔진의 내부 설명 > - 왜 분석 작업부하가 OLTP와 많이 다른지 설명함 > - 질의가 디스크에서 읽는 데이터 양을 최소화하기 위해 데이터를 작게 부호화하는 것이 중요해졌음 > - 칼럼 지향 저장소가 이 목표를 달성하는데 도움을 줌 ## 트랙잭션 처리(OLTP)나 분석(OLAP)? - 트랙잭션이란 단어를 사용하는 이유 > - 초창기 비즈니스 데이터 처리는 데이터베이스 쓰기가 보통 판패,공급 업체에 발주, 직원 급여 지불등과 같은 **커머설 트랙잭션(commercial transaction)**에 해당되었음 > - 금전 거래가 아닌 영역으로 데이터베이스가 확장됐어도 **트랙잭션** 용어는 변하지 않고 **논리 단위 행태로서 읽기와 쓰기 그룹**을 나타냄' - 트랙잭션의 ACID > - 트랙잭션이 반드시 ACID(원자성(atomicity),일관성(consistency),격리성(isolation),지속성(durability)) 속성을 가질 필요없음 > - **클라이언트가 지연시간이 낮은 읽기와 쓰기를 가능하게 한다는 의미임** ### 온라인 트랜잭션 처리(online transaction processing, OLTP) - 보통 애플리케이션은 색인을 사용해 일부 키에 대한 적은 수의 레코드를 찾음 ### 온라인 분석 처리(online analytic processing, OLAP) - 분석은 트랜잭션과 접근 패턴이 다름 - 분석은 원시 데이터를 반환하는 것이 아닌 많은 수의 레코드를 스캔해 집계 같은 통계 계산하는 경우가 많음 - 이런 데이터베이스 사용 패턴을 트랙잭션 처리와 구별하기 위해 OLAP로 부름 | | 트랜잭션 처리 시스템(OLTP) | 분석 시스템(OLAP) | |:--------------:|:------------------------------------------------:|:----------------------------------------------------:| | 주요 읽기 패턴 | 질의당 적은 수의 레코드, 키 기준으로 가져옴 | 많은 레코드에 대한 집계 | | 주요 쓰기 패턴 | 임의 접근, 사용자 입력을 낮은 지연 시간으로 기록 | 대규모 불러오기(bulk import, ETL) 또는 이벤트 스트림 | | 주요 사용처 | 웹 애플리케이션을 통한 최종 사용자 | 의사결정 지원을 위한 내부 분석가 | | 데이터 표현 | 데이터의 최신 상태, 현 시점 | 시간이 지나며 일어난 이벤트 이력 | | 데이터셋 크기 | GB ~ TB | TB ~ PB | ## 데이터 웨어하우징 (Data Warehousing) - 분석가들이 OLTP 작업에 영향을 주지 않고 마음껏 질의할 수 있는 개별 데이터베이스 - 다양한 OLTP 시스템에 있는 데이터의 읽기 전용 복사본 - OLTP 데이터베이스에서 주기적인 데이터 덤프나 지속적인 갱신 스트림을 사용해 데이터 웨어하우스에 적재함 > - 이 작업을 ETL(Extract - Transformation - Load)라고 함 - 개별 데이터웨어하우스는 '분석 접근 패턴'에 맞게 최적화할 수 있는 장점이 있음 - 그러면 왜 OTLP 작업에 영향을 주지않게 데이터 웨어하우징을 할까 > - OTLP 시스템은 사업 운영에 매우 중요해, 일반적으로 높은 가용성과 낮은 지연시간의 트랜잭션 처리를 함 > - 그래서 비즈니스 분석가가 OLTP 시스템에 ad hoc analytic query하는 것을 꺼려하고, 분석 질의가 데이터셋의 많은 부분을 스캔하면서 > - 동시에 실행되는 트랜잭션 성능을 저하시킬 수 도 있기 때문 - OTLP 데이터베이스와 데이터 웨어하우스 둘다 SQL 질의 인터페이스를 지원함 - 하지만, 각각 매우 다른 질의 패턴에 맞게 최적화됐기 때문에 시스템 내부는 다르고 - 대다수의 데이터베이스 벤더는 트랜잭션 처리와 분석 작업부하 양쪽 모두 지원하기보다는 둘 중 하나를 지원하는데 중점을 둠 --- ## 컬럼 지향 저장소 - OLTP 데이터베이스 > - 로우 지향 방식을 데이터를 배치 > - 테이블에서 한 로우의 모든 값은 서로 인접하게 저장됌 - 컬럼 지향 저장소 > - 모든 값을 하나의 로우에 함께 저장하지 않는 대신 **각 칼럼별로 모든 값을 함께 저장** > - 각 칼럼을 개별 파일에 저장하면 질의에 사용되는 칼럼만 읽고 분석할 수 있음 -> 작업량이 줄어듬 - 칼럼 압축 > - 질의에 필요한 칼럼을 디스크에서 읽거 적재하는 작업 외에도 데이터를 **압축**하면 디스크 처리량을 더 줄일 수 있음 > - 칼럼 지향 데이터베이스는 압축에 적합함 > - 칼럼의 데이터에 따라 압축 기법을 사용할 수 있지만, 데이터 웨어하우스에서는 **비트맵 부호화 (bitmap encoding)**이 효과적 > - 보통 고유한 컬럼의 수는 고유한 로우 수보다 적기 때문에 비트맵으로 색인하는 방법이 좋음 > - 칼럼값의 고유값으로 0,1로 변환하고, 0값이 많은 sparse한 상황에서는 run-length encoding으로 효율을 높일 수 있음 - 컬럼 지향 저장소에 쓰기 > - B트리 사용과 같은 제자리 갱신(update-in-place) 접근 방식은 압축된 컬럼에서는 불가능함 > > - 정렬된 테이블의 중간에 로우를 삽임하려면 모든 칼럼 파일을 재작성해야하고 > > - 로우는 칼럼 안의 위치에 따라 식별되므로 모든 칼럼을 일관되게 갱신되어야함 > - 그래서 B트리 말고, LSM 트리로 해결할 수 있음 > > - 모든 쓰기는 먼저 인메모리에 저장소에 이동해 정렬된 구조에 추가하고 디스크에 쓸 준비를 함 > > - 충분한 쓰기가 모으면 디스크의 컬럼 파일에 병합하고 대량으로 새로운 파일에 기록
markdown
The motor-cultivator, like any other machinery, presupposes the need for timely maintenance and repair. If you do not intend to contact specialists and are well versed in mechanical engineering, then you can find out the malfunction and restore the device's performance. Point out that the engine for the Mower cultivator is out of order, it may be impossible to start the equipment. The cause in this case may be the launch system. The master must determine the source of failure, for this check the condition of the spark plugs. If they are dry, this indicates that the fuel mixture is not injected into the cylinder by the motor. To lead to this can clog the holes in the fuel tank plug, the lack of fuel and the presence of foreign objects in the fuel supply system. A closed fuel supply cock may cause a malfunction. If the motor for the Mole motor cultivator does not start, it is necessary to open the fuel tank, free the drainage holes from foreign objects, and also remove the fuel cock. The tank should be drained of gasoline, and after washing the internal surfaces with clean fuel. The master will have to remove the connecting hose, which is located on the side of the carburetor. These manipulations are necessary in order to blow it along with the jets without disassembling the latter. It is recommended that you use a fuel pump. If the motor for the Mole motor cultivator does not start, despite the fact that the candles are wet, the problem of the ignition system failure can be that there is a deposit on the electrode of the candles. In this case, the operator has to clean the surface of the candles using emery. After that, the elements are washed with gasoline and well dried. The cause of the problem can also be that the gap between the electrodes does not correspond to that recommended by the manufacturer. Adjust the clearance by the method of bending the side electrode to the required dimensions. The motor for the Mole-cultivator Mole may not work because the spark plugs are damaged. This also applies to faulty wiring. These elements must necessarily be replaced. The "Stop" key can be closed to the ground, in order to start the motor, the closure should be disposed of. The contacts of the glow plugs can also be broken, if this condition is met, then the contacts need to be put in order. The Krot motor-cultivator with the Honda engine may not start if the gap between the starter and the magnetic shoe does not match the value mentioned in the passport. The starter will need to be replaced if it has been found to be defective. During the operation, the Mole machine may require repair. The Honda engine, for example, in some cases "pleases" the violation of compression. At the same time, it is possible to start the launch, but this process is rather difficult. The motor will run erratically, but it will not work out enough power. As a cause, the deposit may appear on the working surfaces of the valves. The exhaust valve is often deformed, and the piston rings wear out, all this leads to a difficult start of the equipment. If you purchased a Mole cultivator, engine repairs may be necessary after a while. When a consumer encounters the above-described problems, it is necessary to analyze what the state of the gas distribution mechanism of the motor is. The details on which the donkey is deposited must be cleaned. If some parts are damaged, they need to be replaced. The operator should check how well the piston rings are kept. In the event of a malfunction of this node, it will need to be replaced. If you encounter such problems, and on the electrodes of the candles, an excess of oil was noticed, then it is most likely necessary to adjust the carburetor, replace the failed piston rings. The installation of the motor on the Mower cultivator can be carried out independently. However, it should be understood that if the work is carried out without compliance with the technology, the error can cause a rapid failure of the equipment. In this case, you will come across a prolonged dysfunction of the device until the problem is resolved. If you do not want to lose much needed equipment to perform many tasks, then the work should be carried out with responsibility. At the first stage, the torque is transmitted from the engine to the gearbox . The engine must be securely attached to the frame of the structure or gearbox. To carry out the work it will be necessary to buy a special installation kit that will allow the engine to be mounted in place. On the purchased site of the installation kit will need to fix a new engine. At the next stage the pulley is put on the output crankshaft of the unit. If you use the installation kit, you can install the engine in minutes. At the same time, it will be possible to use an imported motor, installing it on an assembly produced by a domestic plant. The replacement of the engine for the Krot motor-cultivator is quite often performed by users independently. Initially, the equipment is equipped with a 2. 4-liter engine. from. If the engine is out of order, but it can be started, but with big problems, sometimes use an electric drill in the role of a starter. If you are faced with the described problems, which are supplemented by the fact that the equipment stalls after heating, the cause may be wear of the oil seal of the engine. If you have an old sample generator that is capable of producing 36 volts and has a power of 200 watts, you can use this engine as the basis of the device. It consumes about 3 liters of gasoline per hour. Having cut the generator, you can take out of it a coupling with the bearing and some part of the case. A piece of the generator can be used as an adapter for the pulley of a motor cultivator. To form the second point of support, you can purchase Chinese bearings by attaching them to vertical slats. This element on the axis of the former generator can be simply welded. After the replacement for such an engine has been made, it will be possible to use any gasoline. As many users emphasize, in order to start up the equipment, even kerosene can be used. The maximum speed, of course, will be reduced, but the feeling will become more torque. You should consider that after that the noise level will increase, but when using such a device it is not critical. As with the "native" engine the unit produces a lot of noise. Among other things, the manufacturer advises you to use headphones when working.
english
The Little Book of Whittling (Woodcarving Illustrated Books) (Paperback) With a friendly, down-home style, this guide encourages readers to whittle away the hours. Great for beginners looking for an easy way to get started and more advanced carvers looking for a relaxing way to spend their time, this instructional manual provides 18 step-by-step whittling projects, including knives, forks, birds, animals, trees, and flowers. Chapters detail the proper whittling tools and materials, including what woods are best to carve, and how to start projects by selecting and safely sharpening the best knife for each project. Author Chris Lubkemann was born of missionary parents in Brazil and remembers his earliest attempts at woodcarving at age seven, deep in the Amazon rain forest of eastern Peru. His appreciation for wood and love for making things from it never stopped. His first forked-branch rooster hatched between his junior and senior years at college, and the hours spent whittling away actually helped pay for his education. Chris' work in the ministry has taken him to many foreign countries and throughout the United States. Wherever he has gone, he has always had a pocketknife close by with a handful of twigs and branches. So, the simple craft picked up more than 37 years ago continues to be shared and passed on to people from all over the world. Find out more about Chris at his website.
english
{ "/js/app.js": "/js/app.js", "/assets/css/style.css": "/assets/css/style.css", "/assets/css/components.css": "/assets/css/components.css" }
json
// keyboard and joystick support extern crate minifb; use minifb::*; use c64::cia; /* C64 keyboard map: Bit | 7 6 5 4 3 2 1 0 -----+------------------------------------------------------ 7 | RUNSTOP Q C= SPACE 2 CTRL <- 1 6 | / ^ = RSHIFT HOME ; * POUND 5 | , @ " . - L P + 4 | N O K M 0 J I 9 3 | V U H B 8 G Y 7 2 | X T F C 6 D R 5 1 | LSHIFT E S Z 4 A W 3 0 | CRSR-DN F5 F3 F1 F7 CRSR-RT RETURN DELETE */ pub struct IO { keyboard_state: [bool; 0xFF], // key states, including shift presses joystick_state: [bool; 0x0A], // 9 directions (num-pad) + 1 fire button joy_port1: bool, // is joystick plugged to port 1? } impl IO { pub fn new() -> IO { IO { keyboard_state: [false; 0xFF], joystick_state: [false; 0x0A], joy_port1: false } } pub fn update(&mut self, window: &Window, cia1: &mut cia::CIAShared) { // keyboard processing // iterating over all keys is crawling-slow, so check individual keys self.process_key(window.is_key_down(Key::Key0), Key::Key0, cia1); self.process_key(window.is_key_down(Key::Key1), Key::Key1, cia1); self.process_key(window.is_key_down(Key::Key2), Key::Key2, cia1); self.process_key(window.is_key_down(Key::Key3), Key::Key3, cia1); self.process_key(window.is_key_down(Key::Key4), Key::Key4, cia1); self.process_key(window.is_key_down(Key::Key5), Key::Key5, cia1); self.process_key(window.is_key_down(Key::Key6), Key::Key6, cia1); self.process_key(window.is_key_down(Key::Key7), Key::Key7, cia1); self.process_key(window.is_key_down(Key::Key8), Key::Key8, cia1); self.process_key(window.is_key_down(Key::Key9), Key::Key9, cia1); self.process_key(window.is_key_down(Key::A), Key::A, cia1); self.process_key(window.is_key_down(Key::B), Key::B, cia1); self.process_key(window.is_key_down(Key::C), Key::C, cia1); self.process_key(window.is_key_down(Key::D), Key::D, cia1); self.process_key(window.is_key_down(Key::E), Key::E, cia1); self.process_key(window.is_key_down(Key::F), Key::F, cia1); self.process_key(window.is_key_down(Key::G), Key::G, cia1); self.process_key(window.is_key_down(Key::H), Key::H, cia1); self.process_key(window.is_key_down(Key::I), Key::I, cia1); self.process_key(window.is_key_down(Key::J), Key::J, cia1); self.process_key(window.is_key_down(Key::K), Key::K, cia1); self.process_key(window.is_key_down(Key::L), Key::L, cia1); self.process_key(window.is_key_down(Key::M), Key::M, cia1); self.process_key(window.is_key_down(Key::N), Key::N, cia1); self.process_key(window.is_key_down(Key::O), Key::O, cia1); self.process_key(window.is_key_down(Key::P), Key::P, cia1); self.process_key(window.is_key_down(Key::Q), Key::Q, cia1); self.process_key(window.is_key_down(Key::R), Key::R, cia1); self.process_key(window.is_key_down(Key::S), Key::S, cia1); self.process_key(window.is_key_down(Key::T), Key::T, cia1); self.process_key(window.is_key_down(Key::U), Key::U, cia1); self.process_key(window.is_key_down(Key::V), Key::V, cia1); self.process_key(window.is_key_down(Key::W), Key::W, cia1); self.process_key(window.is_key_down(Key::X), Key::X, cia1); self.process_key(window.is_key_down(Key::Y), Key::Y, cia1); self.process_key(window.is_key_down(Key::Z), Key::Z, cia1); self.process_key(window.is_key_down(Key::F1), Key::F1, cia1); self.process_key(window.is_key_down(Key::F2), Key::F2, cia1); self.process_key(window.is_key_down(Key::F3), Key::F3, cia1); self.process_key(window.is_key_down(Key::F4), Key::F4, cia1); self.process_key(window.is_key_down(Key::F5), Key::F5, cia1); self.process_key(window.is_key_down(Key::F6), Key::F6, cia1); self.process_key(window.is_key_down(Key::F7), Key::F7, cia1); self.process_key(window.is_key_down(Key::F8), Key::F8, cia1); self.process_key(window.is_key_down(Key::Down), Key::Down, cia1); self.process_key(window.is_key_down(Key::Up), Key::Up, cia1); self.process_key(window.is_key_down(Key::Right), Key::Right, cia1); self.process_key(window.is_key_down(Key::Left), Key::Left, cia1); self.process_key(window.is_key_down(Key::Space), Key::Space, cia1); self.process_key(window.is_key_down(Key::Comma), Key::Comma, cia1); self.process_key(window.is_key_down(Key::Period), Key::Period, cia1); self.process_key(window.is_key_down(Key::Slash), Key::Slash, cia1); self.process_key(window.is_key_down(Key::Enter), Key::Enter, cia1); self.process_key(window.is_key_down(Key::Backspace), Key::Backspace, cia1); self.process_key(window.is_key_down(Key::Backquote), Key::Backquote, cia1); self.process_key(window.is_key_down(Key::LeftShift), Key::LeftShift, cia1); self.process_key(window.is_key_down(Key::RightShift), Key::RightShift, cia1); self.process_key(window.is_key_down(Key::Escape), Key::Escape, cia1); self.process_key(window.is_key_down(Key::Minus), Key::Minus, cia1); self.process_key(window.is_key_down(Key::Equal), Key::Equal, cia1); self.process_key(window.is_key_down(Key::Insert), Key::Insert, cia1); self.process_key(window.is_key_down(Key::Home), Key::Home, cia1); self.process_key(window.is_key_down(Key::LeftBracket), Key::LeftBracket, cia1); self.process_key(window.is_key_down(Key::RightBracket), Key::RightBracket, cia1); self.process_key(window.is_key_down(Key::Delete), Key::Delete, cia1); self.process_key(window.is_key_down(Key::Semicolon), Key::Semicolon, cia1); self.process_key(window.is_key_down(Key::Apostrophe), Key::Apostrophe, cia1); self.process_key(window.is_key_down(Key::Backslash), Key::Backslash, cia1); self.process_key(window.is_key_down(Key::Tab), Key::Tab, cia1); self.process_key(window.is_key_down(Key::LeftCtrl), Key::LeftCtrl, cia1); // joystick processing self.process_joystick(window.is_key_down(Key::NumPad1), Key::NumPad1, cia1); self.process_joystick(window.is_key_down(Key::NumPad2), Key::NumPad2, cia1); self.process_joystick(window.is_key_down(Key::NumPad3), Key::NumPad3, cia1); self.process_joystick(window.is_key_down(Key::NumPad4), Key::NumPad4, cia1); self.process_joystick(window.is_key_down(Key::NumPad5), Key::NumPad5, cia1); self.process_joystick(window.is_key_down(Key::NumPad6), Key::NumPad6, cia1); self.process_joystick(window.is_key_down(Key::NumPad7), Key::NumPad7, cia1); self.process_joystick(window.is_key_down(Key::NumPad8), Key::NumPad8, cia1); self.process_joystick(window.is_key_down(Key::NumPad9), Key::NumPad9, cia1); self.process_joystick(window.is_key_down(Key::RightCtrl), Key::RightCtrl, cia1); // helper keys // toggle between joystick ports 1 and 2 if window.is_key_pressed(Key::NumLock, KeyRepeat::No) { self.joy_port1 = !self.joy_port1; if self.joy_port1 { cia1.borrow_mut().joystick_2 = 0xFF; } else { cia1.borrow_mut().joystick_1 = 0xFF; } println!("Using joystick in port {}", if self.joy_port1 { "1" } else { "2" }); } } pub fn check_restore_key(&self, window: &Window) -> bool { // End will serve as the Restore key window.is_key_pressed(Key::End, KeyRepeat::No) } // *** private functions *** // fn process_key(&mut self, key_pressed: bool, keycode: Key, cia1: &mut cia::CIAShared) { if key_pressed { self.on_key_press(keycode, cia1); } else { self.on_key_release(keycode, cia1); } } fn on_key_press(&mut self, keycode: Key, cia1: &mut cia::CIAShared) { let c64_keycode = self.keycode_to_c64(keycode); if self.keyboard_state[c64_keycode as usize] || c64_keycode == 0xFF { return } self.keyboard_state[c64_keycode as usize] = true; let c64_bit = c64_keycode & 7; let c64_byte = (c64_keycode >> 3) & 7; // key is shifted? if (c64_keycode & 0x80) != 0 { cia1.borrow_mut().key_matrix[6] &= 0xEF; cia1.borrow_mut().rev_matrix[4] &= 0xBF; } cia1.borrow_mut().key_matrix[c64_byte as usize] &= !(1 << c64_bit); cia1.borrow_mut().rev_matrix[c64_bit as usize] &= !(1 << c64_byte); } fn on_key_release(&mut self, keycode: Key, cia1: &mut cia::CIAShared) { let c64_keycode = self.keycode_to_c64(keycode); if !self.keyboard_state[c64_keycode as usize] || c64_keycode == 0xFF { return; } self.keyboard_state[c64_keycode as usize] = false; let c64_bit = c64_keycode & 7; let c64_byte = (c64_keycode >> 3) & 7; // key is shifted? if (c64_keycode & 0x80) != 0 { cia1.borrow_mut().key_matrix[6] |= 0x10; cia1.borrow_mut().rev_matrix[4] |= 0x40; } cia1.borrow_mut().key_matrix[c64_byte as usize] |= 1 << c64_bit; cia1.borrow_mut().rev_matrix[c64_bit as usize] |= 1 << c64_byte; } fn process_joystick(&mut self, key_pressed: bool, keycode: Key, cia1: &mut cia::CIAShared) { if key_pressed { self.on_joy_press(keycode, cia1); } else { self.on_joy_release(keycode, cia1); } } fn on_joy_press(&mut self, keycode: Key, cia1: &mut cia::CIAShared) { let mut joystate = if self.joy_port1 { cia1.borrow_mut().joystick_1 } else { cia1.borrow_mut().joystick_2 }; match keycode { // down-left Key::NumPad1 => { self.joystick_state[0] = true; joystate = (joystate | 0x09) & !0x06; }, // down Key::NumPad2 => { self.joystick_state[1] = true; joystate = (joystate | 0x01) & !0x02; }, // down-right Key::NumPad3 => { self.joystick_state[2] = true; joystate = (joystate | 0x05) & !0x0A; }, // left Key::NumPad4 => { self.joystick_state[3] = true; joystate = (joystate | 0x08) & !0x04; }, // center Key::NumPad5 => { self.joystick_state[4] = true; joystate |= 0x0F; }, // right Key::NumPad6 => { self.joystick_state[5] = true; joystate = (joystate | 0x04) & !0x08; }, // up-left Key::NumPad7 => { self.joystick_state[6] = true; joystate = (joystate | 0x0A) & !0x05; }, // up Key::NumPad8 => { self.joystick_state[7] = true; joystate = (joystate | 0x02) & !0x01; }, // up-right Key::NumPad9 => { self.joystick_state[8] = true; joystate = (joystate | 0x06) & !0x09; }, // fire button Key::RightCtrl => { self.joystick_state[9] = true; joystate &= !0x10; }, _ => (), } if self.joy_port1 { cia1.borrow_mut().joystick_1 = joystate; } else { cia1.borrow_mut().joystick_2 = joystate; } } fn on_joy_release(&mut self, keycode: Key, cia1: &mut cia::CIAShared) { let mut joystate = if self.joy_port1 { cia1.borrow_mut().joystick_1 } else { cia1.borrow_mut().joystick_2 }; if joystate == 0xFF { return; } match keycode { // down-left Key::NumPad1 => if self.joystick_state[0] { joystate |= 0x06; self.joystick_state[0] = false; }, // down Key::NumPad2 => if self.joystick_state[1] { joystate |= 0x02; self.joystick_state[1] = false; }, // down-right Key::NumPad3 => if self.joystick_state[2] { joystate |= 0x0A; self.joystick_state[2] = false; }, // left Key::NumPad4 => if self.joystick_state[3] { joystate |= 0x04; self.joystick_state[3] = false; }, // center Key::NumPad5 => self.joystick_state[4] = false, // right Key::NumPad6 => if self.joystick_state[5] { joystate |= 0x08; self.joystick_state[5] = false; }, // up-left Key::NumPad7 => if self.joystick_state[6] { joystate |= 0x05; self.joystick_state[6] = false; }, // up Key::NumPad8 => if self.joystick_state[7] { joystate |= 0x01; self.joystick_state[7] = false; }, // up-right Key::NumPad9 => if self.joystick_state[8] { joystate |= 0x09; self.joystick_state[8] = false; }, // fire button Key::RightCtrl => if self.joystick_state[9] { joystate |= 0x10; self.joystick_state[9] = false; }, _ => (), } if self.joy_port1 { cia1.borrow_mut().joystick_1 = joystate; cia1.borrow_mut().joystick_2 = 0xFF; } else { cia1.borrow_mut().joystick_1 = 0xFF; cia1.borrow_mut().joystick_2 = joystate; } } fn keycode_to_c64(&self, keycode: Key) -> u8 { // fetch key's bit combination as represented in C64 keyboard matrix let to_c64 = |row_bit: u8, col_bit: u8| (row_bit << 3) | col_bit; match keycode { Key::Key0 => to_c64(4, 3), Key::Key1 => to_c64(7, 0), Key::Key2 => to_c64(7, 3), Key::Key3 => to_c64(1, 0), Key::Key4 => to_c64(1, 3), Key::Key5 => to_c64(2, 0), Key::Key6 => to_c64(2, 3), Key::Key7 => to_c64(3, 0), Key::Key8 => to_c64(3, 3), Key::Key9 => to_c64(4, 0), Key::A => to_c64(1, 2), Key::B => to_c64(3, 4), Key::C => to_c64(2, 4), Key::D => to_c64(2, 2), Key::E => to_c64(1, 6), Key::F => to_c64(2, 5), Key::G => to_c64(3, 2), Key::H => to_c64(3, 5), Key::I => to_c64(4, 1), Key::J => to_c64(4, 2), Key::K => to_c64(4, 5), Key::L => to_c64(5, 2), Key::M => to_c64(4, 4), Key::N => to_c64(4, 7), Key::O => to_c64(4, 6), Key::P => to_c64(5, 1), Key::Q => to_c64(7, 6), Key::R => to_c64(2, 1), Key::S => to_c64(1, 5), Key::T => to_c64(2, 6), Key::U => to_c64(3, 6), Key::V => to_c64(3, 7), Key::W => to_c64(1, 1), Key::X => to_c64(2, 7), Key::Y => to_c64(3, 1), Key::Z => to_c64(1, 4), Key::F1 => to_c64(0, 4), Key::F2 => to_c64(0, 4) | 0x80, Key::F3 => to_c64(0, 5), Key::F4 => to_c64(0, 5) | 0x80, Key::F5 => to_c64(0, 6), Key::F6 => to_c64(0, 6) | 0x80, Key::F7 => to_c64(0, 3), Key::F8 => to_c64(0, 3) | 0x80, Key::Down => to_c64(0, 7), Key::Up => to_c64(0, 7) | 0x80, Key::Right => to_c64(0, 2), Key::Left => to_c64(0, 2) | 0x80, Key::Space => to_c64(7, 4), Key::Comma => to_c64(5, 7), Key::Period => to_c64(5, 4), Key::Slash => to_c64(6, 7), Key::Enter => to_c64(0, 1), Key::Backspace => to_c64(0, 0), // Left arrow key Key::Backquote => to_c64(7, 1), Key::LeftShift => to_c64(1, 7), Key::RightShift => to_c64(6, 4), // Run Stop key Key::Escape => to_c64(7, 7), // Plus key Key::Minus => to_c64(5, 0), // Minus key Key::Equal => to_c64(5, 3), // Pound key Key::Insert => to_c64(6, 0), // CLR/Home key Key::Home => to_c64(6, 3), // Home key Key::Delete => to_c64(6, 6), // @ key Key::LeftBracket => to_c64(5, 6), // * key Key::RightBracket => to_c64(6, 1), // Colon key Key::Semicolon => to_c64(5, 5), // Semicolon key Key::Apostrophe => to_c64(6, 2), // Equals key Key::Backslash => to_c64(6, 5), // Control key Key::Tab => to_c64(7, 2), // Commodore key Key::LeftCtrl => to_c64(7, 5), // unknown _ => 0xFF } } }
rust
import sys REQUIRED_PYTHON = 3 REQUIRED_PYTHON_MINOR = 8 def main(): system_major = sys.version_info.major system_minor = sys.version_info.minor if system_major != REQUIRED_PYTHON: raise TypeError( "This project requires Python {}. Found: Python {}".format( REQUIRED_PYTHON, sys.version)) else: if system_minor < REQUIRED_PYTHON_MINOR: raise TypeError( "This project requires at least Python {}.{}. Found: Python {}.{}".format( REQUIRED_PYTHON, REQUIRED_PYTHON_MINOR, system_major, system_minor)) else: print(">>> Development environment passes all tests!") if __name__ == '__main__': main()
python
<reponame>Baraa-asal/dashbooard import 'react-perfect-scrollbar/dist/css/styles.css'; import React, { useContext, useEffect, useState } from 'react'; import { useRoutes } from 'react-router-dom'; import { ThemeProvider } from '@material-ui/core'; import GlobalStyles from 'src/components/GlobalStyles'; import 'src/mixins/chartjs'; import theme from 'src/theme'; import routes from 'src/routes'; import { Connector } from 'mqtt-react'; import CircularProgress from '@material-ui/core/CircularProgress'; import LoginView from './views/auth/LoginView'; import UserProvider, { UserContext } from './providers/UserProvider'; import { auth } from './firebase'; const App = () => { const [isInitialized, setIsInitialized] = useState(false); const routing = useRoutes(routes); useEffect(() => { auth.onAuthStateChanged(() => { setIsInitialized(true); }); }, []); return ( <UserProvider> <ThemeProvider theme={theme}> <GlobalStyles /> { isInitialized ? auth.currentUser ? ( <Connector mqttProps={{ host: 'ip-160-153-252-170.ip.secureserver.net', port: 8888, username: 'feUser', password: '<PASSWORD>' }} > {routing} </Connector> ) : <LoginView /> : <CircularProgress /> } </ThemeProvider> </UserProvider> ); }; export default App;
javascript
{ "publicUrl": "/lab", "frontendModules": { "@openmrs/esm-patient-banner-app":"3.1.1-pre.1554", "@openmrs/esm-patient-registration-app" :"3.1.0", "@openmrs/esm-primary-navigation-app" : "3.2.0", "@openmrs/esm-implementer-tools-app" : "3.2.0", "@openmrs/esm-patient-search-app" : "3.1.0", "@openmrs/esm-login-app" : "3.2.0" } }
json
<filename>src/views/app/send-code/send-code.tsx import React, { useState } from 'react'; import { useMutation } from 'react-query'; import { AxiosError } from 'axios'; import { useRouter } from 'next/router'; import { useFormik } from 'formik'; import { request } from '@modules/request'; import { Error, ErrorResponse } from '@modules/api-response'; import { ServerErrors } from '@components/server-error'; import { AlertError } from '@components/icons'; import { Email, Keys, LockOpen } from '@components/illustrations'; import { Input, Spinner, Alert, Button } from '@components/app'; import { sendCodeValidationSchema } from './validations'; import styles from './send-code.module.scss'; const SendCode = () => { const router = useRouter(); const [serverErrors, setServerErrors] = useState<Error[]>([]); const { mutate, isLoading } = useMutation( (variables: any) => request.post('/api/v1/auth/send-code', variables), { onError: (error: AxiosError<ErrorResponse>) => { setServerErrors(error?.response?.data?.error || []); }, onSuccess: () => { if (router.query.type === 'forgot-password') { router.push('/app/reset-password'); } else { router.push(`/app/security-code?type=${router.query.type}`); } }, } ); const formik = useFormik({ validateOnChange: false, initialValues: { email: '', }, validationSchema: sendCodeValidationSchema, onSubmit: (values) => { mutate({ type: router.query.type, email: values.email, }); }, }); const handleEmailChange = (event: React.ChangeEvent<HTMLInputElement>) => { formik.handleChange(event); if (formik.errors.email) { formik.setFieldError('email', ''); } }; const getIllustration = (type: string) => { switch (type) { case 'confirm-email': return <Email size={196} className="mx-auto" />; case 'forgot-password': return <Keys size={196} className="mx-auto" />; case 'unlock-account': return <LockOpen size={196} className="mx-auto" />; default: break; } return ''; }; const getHeadingText = (type: string) => { switch (type) { case 'confirm-email': return 'Confirm your email'; case 'forgot-password': return 'Forgot your password?'; case 'unlock-account': return 'Unlock your account'; default: break; } return ''; }; const getDescriptionText = (type: string) => { switch (type) { case 'confirm-email': return 'confirm your email'; case 'forgot-password': return 'reset your password'; case 'unlock-account': return 'unlock your account'; default: break; } return ''; }; return ( <div className={styles.grid}> <div className={styles.gridLeft}> <div className={styles.sendCodeGrid}> <div className="py-6"> {getIllustration(router.query.type as string)} <div className="text-center my-8"> <h1 className="text-2xl 768:text-3xl font-bold"> {getHeadingText(router.query.type as string)} </h1> <div className="mt-1"> Please enter your email address and we will send you a code to{' '} {getDescriptionText(router.query.type as string)}. </div> </div> <div> <form onSubmit={formik.handleSubmit} noValidate> <div className="mb-2"> <label htmlFor="password" className="text-sm 768:text-base"> <span>Email address</span> {formik.errors.email && formik.touched.email ? ( <span className="text-red-600 mt-1"> {' '} {formik.errors.email} </span> ) : null} <div className="mt-1"> <Input id="email" name="email" type="email" value={formik.values.email} onChange={handleEmailChange} onBlur={formik.handleBlur} error={!!(formik.errors.email && formik.touched.email)} /> </div> </label> </div> <div className="mt-8"> <Button type="submit" variant="primary" loading={isLoading} fullWidth > Send code </Button> </div> <div className="mt-8"> <div className="flex justify-center"> <Spinner size={3} active={isLoading} /> </div> {serverErrors.length > 0 && ( <Alert variant="error"> <div className="mr-3"> <AlertError size={18} /> </div> <Alert.Content> <ServerErrors errors={serverErrors} /> </Alert.Content> </Alert> )} </div> </form> </div> </div> </div> </div> <div className={styles.gridRight}> <svg width="100%" height="100%" viewBox="0 0 538 768" preserveAspectRatio="xMidYMid slice" fill="none" xmlns="http://www.w3.org/2000/svg" > <g clipPath="url(#clip0)"> <rect width="538" height="768" fill="#68D391" /> <path d="M646.504 -172.224L745.903 276.292L307.777 138.116L646.504 -172.224Z" fill="white" fillOpacity="0.1" /> <rect width="20" height="20" transform="matrix(0.910492 0.413527 -0.413526 0.910492 453.271 535)" fill="white" fillOpacity="0.1" /> <path d="M118 429L124.735 449.729H146.532L128.898 462.541L135.634 483.271L118 470.459L100.366 483.271L107.102 462.541L89.4683 449.729H111.265L118 429Z" fill="white" fillOpacity="0.1" /> <rect x="171.956" y="219" width="55.55" height="20.7855" transform="rotate(15.9132 171.956 219)" fill="white" fillOpacity="0.1" /> <circle cx="169" cy="791" r="127" fill="white" fillOpacity="0.1" /> </g> <defs> <clipPath id="clip0"> <rect width="538" height="768" fill="white" /> </clipPath> </defs> </svg> </div> </div> ); }; export { SendCode };
typescript
{ "name": "@ultraq/fetch-utils", "version": "1.1.0", "description": "A collection of utilities for working with the Fetch API", "author": "<NAME> <<EMAIL>> (http://www.ultraq.net.nz/)", "license": "Apache-2.0", "repository": { "type": "git", "url": "https://github.com/ultraq/fetch-utils.git" }, "keywords": [ "fetch", "utilities" ], "main": "fetch-utils.cjs.js", "module": "fetch-utils.es.js", "sideEffects": false, "scripts": { "lint": "eslint \"*.js\"", "test": "jest", "coverage": "cat coverage/lcov.info | coveralls", "build": "npm run build:cjs && npm run build:es", "build:cjs": "BABEL_ENV=cjs babel fetch-utils.js --out-file fetch-utils.cjs.js --source-maps", "build:es": "BABEL_ENV=es babel fetch-utils.js --out-file fetch-utils.es.js --source-maps", "prepublishOnly": "npm run build" }, "devDependencies": { "@babel/core": "^7.10.3", "@babel/cli": "^7.10.3", "@babel/preset-env": "^7.10.3", "coveralls": "^3.1.0", "eslint": "^6.8.0", "eslint-config-ultraq": "^2.3.3", "jest": "^25.5.4", "node-fetch": "^2.6.0" }, "engines": { "node": ">=8" } }
json
<gh_stars>0 {"answers":["chem","chemmy","chyme","cyme","cymene","emcee","emmy","heme","henchmen","hmmm","hymn","mech","meme","mene","meve","mneme","neem","nemn","vehemence","vehemency","vehm","vehme"],"centerLetter":"m","letterString":"mcehnvy","outerLetters":["c","e","h","n","v","y"],"pangrams":["vehemency"],"validLetters":["c","e","h","m","n","v","y"]}
json
import { useIsEditingNotes } from 'context/notesContext/NotesContext'; import { checkKeyDefinitionIsPressed } from 'utility/keyboardNavigationUtilities'; import { useTodoContext } from 'context/todoContext/TodoContext'; import { useEffect } from 'react'; import { navigateToPrevious } from 'constants/keyDefnitions'; export default function useNavigateToPreviousItemOnUpKeyPressed() { const { moveToPrevious, isEditing } = useTodoContext(); const isEditingNotes = useIsEditingNotes(); useEffect(() => { if (isEditing || isEditingNotes) { return; } const onKeyUp = (event: WindowEventMap['keyup']) => { if (!checkKeyDefinitionIsPressed(navigateToPrevious, event)) { return; } event.preventDefault(); moveToPrevious(); }; window.addEventListener('keyup', onKeyUp); return () => window.removeEventListener('keyup', onKeyUp); }, [moveToPrevious, isEditing, isEditingNotes]); }
typescript
The wrestlers plan to organise a women’s mahapanchayat on the same day the new Parliament is officially declared open. This might be a mistake. On Sunday, when the national headlines are saturated by the political squabble between the Centre and the Opposition, and the new Parliament is finally inaugurated, two women who have won laurels for our nation will likely be banished to the margins. No matter which side of the ideological divide you are on when it comes to who should have done the honours for opening the abode of Indian democracy, there is only one side to be on when it comes to women flagging something as grave as entrenched and institutional sexual abuse. Every morning at the crack of dawn, Vinesh Phogat and Sakshi Malik, world champion medallist and Olympic medallist, respectively, first head to a stadium close to the pavement in central Delhi that has been their home for the last month. There, they train for the upcoming Asian Games in September. Then they return to the protest site, cheek by jowl with workers’ unions, displaced Manipuri citizens, idli vendors, camera units and police. It’s been over one month since their movement to demand action against Brij Bhushan Sharan Singh, Bharatiya Janata Party (BJP) parliamentarian and the man who helms the Wrestling Federation of India, began. Does Singh — who faced multiple criminal cases — not gravely lower the dignity of the new Parliament? You can argue that the wrestlers’ movement has made some missteps. Allowing Opposition politicians on their stage – something they refused to do the first time they protested – would be top of that list. But, on the other hand, they could turn around and ask, how you expect a small group of women, no matter how strong, to sustain their cause as the media moves on to the next story, and those in power look the other way. You could also pull out a list of questions, something that always happens with women who break the silence on sexual harassment. For example, why did Sakshi Malik invite Singh to her wedding if he was an abuser? Why did the women remain quiet for so long? Why are more women not on record? But all you have to do is wait for Singh to unleash his vitriol for you to instinctively separate right from wrong, and just from unjust. It also helps you understand why it is so difficult and frightening for young women to confront Singh directly. Armed with the ownership of scores of private educational institutions and the audacity to openly criticise the powerful Uttar Pradesh chief minister, Yogi Adityanath, Singh wears his clout on his kurta sleeve. Most recently, Singh likened Vinesh Phogat to Manthara from the Ramayana. Manthara, Queen Kaikeyi’s hunchbacked help, convinced her that the throne was rightfully that of the latter’s son Bharat and that stepson and crown prince Rama should be sent into exile. So, is Singh casting himself as Lord Rama? Curiously, Singh invoked Donald Trump, who has been accused of sexual misconduct by several women. Trump was convicted in one such case in the last fortnight and asked to pay $5 million to his accusers. Singh’s analogy, therefore, would have been hilarious if it were not so tragic. How does the BJP, defined by muscular nationalism, feel about such language, irrespective of its opinion on the guilt or innocence of Singh in this case? Singh’s impunity is also revealing. In 2004, he was replaced as a candidate by Ghanshyam Shukla, who was killed in a road accident. Shukla’s wife Nandita alleged murder in a letter to Atal Bihari Vajpayee. The matter dragged on in court for years. As a result, four criminal cases are pending against Singh. The wrestlers plan to organise a women’s mahapanchayat on the same day the new Parliament is officially declared open. This might be a mistake. To rally the numbers, they would again have to fall back on the network of Opposition parties, many of whom are boycotting the inauguration. Their movement will be devoured by the political clashes of the day. But as Parliament makes a new beginning, with Prime Minister Narendra Modi receiving the Sengol that Jawaharlal Nehru did in 1947, I hope he intervenes on behalf of the wrestlers. Singh’s coarse attack on his female accusers sullies all that Parliament is meant to stand for.
english
<filename>package.json { "name": "furriopolis", "version": "0.0.1", "productName": "Furriopolis", "description": "Furriopolrs chat client", "author": "Faolan (https://github.com/Faolan-Rad/)", "license": "UNLICENSED", "homepage": "https://github.com/Furriopolis/Chat", "bugs": { "url": "https://github.com/Furriopolis/Chat/issues" }, "main": "main.js", "scripts": { "start": "electron .", "cilinux": "node build.js WINDOWS && node build.js LINUX", "cidarwin": "node build.js MAC", "dist": "cross-env ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true node build.js", "build": "npm run dist -- WINDOWS", "dist:mac": "npm run dist -- MAC", "dist:linux": "npm run dist -- LINUX", "lint": "eslint --config .eslintrc.json .", "ship": "build --win -p always" }, "repository": "https://github.com/Furriopolis/Chat", "keywords": [ "Electron", "quick", "start", "tutorial", "demo" ], "devDependencies": { "electron": "^7.0.0", "electron-builder": "^22.1.0" }, "dependencies": { "body-parser": "^1.19.0", "cross-env": "^6.0.3", "ejs-electron": "^2.0.3", "electron-updater": "^4.2.0", "jquery": "^3.4.1", "update-electron-app": "^1.5.0" }, "build": { "appId": "ml.furriopolis", "productName": "Furriopolis", "files": [ "dist", "node_modules", "main.js", "package.json" ], "directories": { "output": "output" }, "win": { "publish": { "provider": "github", "private": true, "token": " <KEY> " } } } }
json
import {Injectable} from '@angular/core'; import {Observable} from 'rxjs'; import {RequestItem} from '../../@core/firestore-interfaces/request'; import {FirebaseService} from '../firebase.service'; import {__STATS__, __STATS__ITEMS, REQUESTS, REQUESTS__ITEMS, USERS} from '../../@core/firestore-collections'; import {RequestService} from './request.service'; import {User, UserStats} from '../../@core/firestore-interfaces/user'; export interface AgenciesNeedItemResult { id: string; name: string; } @Injectable({ providedIn: 'root' }) export class StatsService { constructor( private firebaseService: FirebaseService, private requestService: RequestService ) { } mostWantedItems(limit = 5): Promise<RequestItem[]> { return new Promise((resolve, reject) => { this.firebaseService.firestore() .collection(REQUESTS).doc(__STATS__) .collection(__STATS__ITEMS) .orderBy('qtyNeed', 'desc') .limit(limit) .get() .then(snapshot => { const items = []; const docs = snapshot.docs; docs.forEach(doc => { items.push(doc.data() as RequestItem); }); resolve(items); }) .catch(e => { reject(e); }); }); } get agencyJoined(): Observable<number> { return new Observable<number>(subscriber => { this.firebaseService.firestore().collection(USERS).doc(__STATS__) .onSnapshot(snapshot => { const data = snapshot.data() as UserStats; subscriber.next(data.agencies); }); }); } get completeRequest(): Observable<number> { return new Observable<number>(subscriber => { this.firebaseService.firestore().collection(REQUESTS).doc(__STATS__) .onSnapshot(snapshot => { const data = snapshot.data(); subscriber.next(data.complete); }); }); } get activeRequest(): Observable<number> { return new Observable<number>(subscriber => { this.firebaseService.firestore().collection(REQUESTS).doc(__STATS__) .onSnapshot(snapshot => { const data = snapshot.data(); subscriber.next(data.active); }); }); } /** * real-time data of overall request items * * @todo unsubscribe() on component destroy to avoid memory leaks */ get requestItemsSnapshot(): Observable<RequestItem[]> { return new Observable(subscriber => { this.firebaseService.firestore().collection(REQUESTS).doc(__STATS__) .collection(__STATS__ITEMS) .onSnapshot(snapshot => { const requestItems: RequestItem[] = []; snapshot.docs.forEach(doc => { const item = doc.data() as RequestItem; if (!((item.qtyFilled >= item.qtyNeed))) { requestItems.push(item); } }); subscriber.next(requestItems); }); }); } getAgenciesNeedItem(itemName: string): Promise<AgenciesNeedItemResult[]> { const agencies: AgenciesNeedItemResult[] = []; return this.firebaseService.firestore() .collection(USERS) .where(`_recentNeededItems.${itemName}`, '>', 0) .get() .then(snapshot => { const docs = snapshot.docs; docs.forEach(doc => { const data = doc.data() as User; const agencyResult: AgenciesNeedItemResult = { id: doc.id, name: data.name }; agencies.push(agencyResult); }); return agencies; }).catch(e => { console.error(e); return agencies; }); } }
typescript
export const environment = { production: true, API_KEY: '<KEY>' };
typescript
In a blow to retail pioneer Kishore Biyani’s $-3. 4-billion bid to sell the assets of Future Retail Limited (FRL) to Mukesh Ambani’s Reliance Infrastructure Group, the Supreme Court on Friday upheld the October 25, 2020 interim award of the Emergency Arbitrator under the Arbitration Rules of the Singapore International Arbitration Centre (SIAC) restraining FRL from going ahead with the deal. A Bench of Justices R F Nariman and B R Gavai set aside two judgments of the Delhi High Court Division Bench that had stayed the order of a Single Bench of the HC upholding the Emergency Arbitrator’s order. Amazon — which had objected to the FRL-Reliance deal alleging breach of its earlier contract with FRL’s promoter firm — had approached the SC against the decisions of the HC Division Bench. Among Future Retail’s brands are the supermarket chain Big Bazaar and the premium food retailer Foodhall. Ruling in favour of Amazon, the Bench rejected FRL’s argument that the award of an Emergency Arbitrator under the SIAC Rules would not fall under Section 17(1) of the Arbitration and Conciliation Act, 1996. Section 17 of the Act prescribes the mechanism for parties to an arbitration to seek interim reliefs from the arbitral tribunal during the pendency of the arbitral proceedings. The court said that “Section 17, as construed in the light of the other provisions of the Act, clearly leads to the position that such emergency award is made under the provisions of Section 17(1) and can be enforced under the provisions of Section 17(2)”. Appearing for FRL, Senior Advocate Harish Salve had contended that the Law Commission in its 246th Report had advocated the amendment of the Arbitration Act to include a provision for appointment of an Emergency Arbitrator. But Parliament did not adopt the suggestion when it amended the Arbitration Act in 2015, “thereby indicating that such orders would not fall within Section 17(1) of the Arbitration Act”. But the SC, which relied on an earlier case law, said “the mere fact that a recommendation of a Law Commission Report is not followed by Parliament would not necessarily lead to the conclusion that what has been suggested by the Law Commission cannot form part of the statute as properly interpreted”. The court pointed out that a High-Level Committee constituted by the Government of India under the chairmanship of Justice B N Srikrishna (retd) to review the institutionalisation of the arbitration mechanism in India and look into the provisions of the Arbitration Act after the 2015 Amendment Act had, in its July 30, 2017 report, said that “given that international practice is in favour of enforcing emergency awards (Singapore, Hong Kong and the United Kingdom all permit enforcement of emergency awards), it is time that India permitted the enforcement of emergency awards in all arbitral proceedings”. The bench upheld Amazon’s counsel Senior Advocate Ranjit Kumar’s argument that the legislative intent in enacting the Arbitration Act was to decongest courts, and said arbitral awards “are an important step in aid of decongesting the civil courts and affording expeditious interim relief to the parties”. “An Emergency Arbitrator’s “award”, i. e. , order, would undoubtedly be an order which furthers these very objectives, i. e. , to decongest the court system and to give the parties urgent interim relief in cases which deserve such relief,” the Bench ruled. It said that full party autonomy is given by the Arbitration Act to have a dispute decided in accordance with institutional rules which can include Emergency Arbitrators delivering interim orders, described as “awards”, and that such orders are an important step in aid of decongesting the civil courts and affording expeditious interim relief to the parties and as such would fall in the purview of Section 17 of the Arbitration Act. The court also held that “a party cannot be heard to say, after it participates in an Emergency Award proceeding, having agreed to institutional rules made in that regard, that thereafter it will not be bound by an Emergency Arbitrator’s ruling”. The SC also said that an order passed under Section 17(2) of the Arbitration Act to enforce the award of an Emergency Arbitrator cannot be appealed against. As per an Amazon-FRL understanding, the latter was prohibited from encumbering/ transferring/ selling/ divesting/ disposing of its retail assets to “restricted persons” which included the Reliance Group. However, in August 2020, FRL and Reliance struck a deal to sell the former’s assets to the latter following which Amazon approached the Emergency Arbitrator who ruled in its favour.
english
<gh_stars>1-10 /* * 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.ignite.internal.processors.cache.persistence; import java.io.BufferedOutputStream; import java.io.DataOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.FilenameFilter; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.DataRegionConfiguration; import org.apache.ignite.configuration.DataStorageConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor; import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; import org.apache.ignite.internal.processors.cache.StoredCacheData; import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager; import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.marshaller.jdk.JdkMarshaller; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.CACHE_DATA_FILENAME; import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.CACHE_DATA_TMP_FILENAME; /** * Tests that ignite can start when caches' configurations with same name in different groups stored. */ @RunWith(JUnit4.class) public class IgnitePdsCacheConfigurationFileConsistencyCheckTest extends GridCommonAbstractTest { /** */ private static final int CACHES = 4; /** */ private static final int NODES = 4; /** */ private static final String ODD_GROUP_NAME = "group-odd"; /** */ private static final String EVEN_GROUP_NAME = "group-even"; /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); return cfg.setDataStorageConfiguration(new DataStorageConfiguration() .setDefaultDataRegionConfiguration(new DataRegionConfiguration() .setMaxSize(200 * 1024 * 1024) .setPersistenceEnabled(true))); } /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { super.beforeTest(); stopAllGrids(); cleanPersistenceDir(); } /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { stopAllGrids(); cleanPersistenceDir(); super.afterTest(); } /** * Tests that ignite can start when caches' configurations with same name in different groups stored. * * @throws Exception If fails. */ @Test public void testStartDuplicatedCacheConfigurations() throws Exception { IgniteEx ig0 = (IgniteEx)startGrids(NODES); ig0.cluster().active(true); startCaches(ig0); DynamicCacheDescriptor desc = ig0.context().cache().cacheDescriptor(cacheName(3)); storeInvalidCacheData(desc); stopAllGrids(); startGrids(NODES); desc = ig0.context().cache().cacheDescriptor(cacheName(3)); assertEquals("expected that group of " + cacheName(3) + " is " + EVEN_GROUP_NAME, EVEN_GROUP_NAME, desc.groupDescriptor().groupName()); } /** * Check that cache_data.dat.tmp files are deleted after node restarts. * * @throws Exception If failed. */ @Test public void testTmpCacheConfigurationsDelete() throws Exception { IgniteEx ig0 = (IgniteEx)startGrids(NODES); ig0.cluster().active(true); startCaches(ig0); DynamicCacheDescriptor desc = ig0.context().cache().cacheDescriptor(cacheName(3)); storeTmpCacheData(desc); stopAllGrids(); startGrids(NODES); for (int i = 0; i < NODES; i++) { IgniteEx ig = grid(i); GridCacheSharedContext sharedCtx = ig.context().cache().context(); FilePageStoreManager pageStore = (FilePageStoreManager) sharedCtx.pageStore(); File[] tmpFile = pageStore.cacheWorkDir(true, ODD_GROUP_NAME).listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { return name.endsWith(CACHE_DATA_TMP_FILENAME); } }); assertNotNull(tmpFile); assertEquals(0, tmpFile.length); } } /** * Check that exception contains proper filename when trying to read corrupted cache configuration file. * * @throws Exception If failed. */ @Test public void testCorruptedCacheConfigurationsValidation() throws Exception { IgniteEx ig0 = (IgniteEx)startGrids(NODES); ig0.cluster().active(true); startCaches(ig0); DynamicCacheDescriptor desc = ig0.context().cache().cacheDescriptor(cacheName(2)); corruptCacheData(desc); stopAllGrids(); GridTestUtils.assertThrowsAnyCause(log, () -> startGrids(NODES), IgniteCheckedException.class, desc.cacheName() + CACHE_DATA_FILENAME); } /** * Store cache descriptor to PDS with invalid group name. * * @param cacheDescr Cache descr. * @throws IgniteCheckedException If fails. */ private void storeInvalidCacheData(DynamicCacheDescriptor cacheDescr) throws IgniteCheckedException { for (int i = 0; i < NODES; i++) { IgniteEx ig = grid(i); GridCacheSharedContext sharedCtx = ig.context().cache().context(); FilePageStoreManager pageStore = (FilePageStoreManager) sharedCtx.pageStore(); StoredCacheData corrData = cacheDescr.toStoredData(); corrData.config().setGroupName(ODD_GROUP_NAME); pageStore.storeCacheData(corrData, true); } } /** * Store temp cache descriptor to PDS. * * @param cacheDescr Cache descr. * @throws IgniteCheckedException If fails. */ private void storeTmpCacheData(DynamicCacheDescriptor cacheDescr) throws Exception { Marshaller marshaller = new JdkMarshaller(); for (int i = 0; i < NODES; i++) { IgniteEx ig = grid(i); GridCacheSharedContext sharedCtx = ig.context().cache().context(); FilePageStoreManager pageStore = (FilePageStoreManager) sharedCtx.pageStore(); StoredCacheData data = cacheDescr.toStoredData(); data.config().setGroupName(ODD_GROUP_NAME); File tmp = new File(pageStore.cacheWorkDir(true, ODD_GROUP_NAME), data.config().getName() + CACHE_DATA_TMP_FILENAME); try (OutputStream stream = new BufferedOutputStream(new FileOutputStream(tmp))) { marshaller.marshal(data, stream); } } } /** * Store temp cache descriptor to PDS. * * @param cacheDescr Cache descr. * @throws IgniteCheckedException If fails. */ private void corruptCacheData(DynamicCacheDescriptor cacheDescr) throws Exception { for (int i = 0; i < NODES; i++) { IgniteEx ig = grid(i); GridCacheSharedContext sharedCtx = ig.context().cache().context(); FilePageStoreManager pageStore = (FilePageStoreManager) sharedCtx.pageStore(); StoredCacheData data = cacheDescr.toStoredData(); data.config().setGroupName(ODD_GROUP_NAME); File config = new File(pageStore.cacheWorkDir(true, ODD_GROUP_NAME), data.config().getName() + CACHE_DATA_FILENAME); try (DataOutputStream os = new DataOutputStream(new FileOutputStream(config))) { os.writeLong(-1L); } } } /** * @param ignite Ignite instance. */ private void startCaches(Ignite ignite) { List<CacheConfiguration> ccfg = new ArrayList<>(CACHES); for (int i = 0; i < CACHES; i++) { ccfg.add(new CacheConfiguration<>(cacheName(i)) .setGroupName(i % 2 == 0 ? ODD_GROUP_NAME : EVEN_GROUP_NAME) .setBackups(1) .setAffinity(new RendezvousAffinityFunction(false, 32))); } ignite.createCaches(ccfg); } /** * Generate cache name from idx. * * @param idx Index. */ private String cacheName(int idx) { return "cache" + idx; } }
java
Sunday November 21, 2021, With growing urbanisation, universal availability of electricity, and overall upward mobility, power demand in India is expected to triple by 2040. It is simply not feasible nor sustainable to meet this explosion of demand through traditional fossil fuels. We have the technology available today to meet this demand with clean energy. Home solar and batteries will be a critical piece of this future, ensuring everyone has access to sustainable, affordable, and reliable power. Across the globe, the energy sector is witnessing a transformation with sustainability emerging as a major theme. All these factors have necessitated a growing focus on renewable energy technology. India has set a target of about 450 Gigawatt (GW) of installed renewable energy capacity by 2030, with solar contributing about 280 GW (about 60 percent ). While the target is certainly admirable, a lot needs to be done to make this a reality. The Government and industry have taken certain steps to boost solar adoption in India. The Ministry of New and Renewable Energy (MNRE) has set an ambitious target to deploy renewable energy capacities to the tune of 227 GW by 2022, with solar accounting for 114 GW. The Government of India’s plans to develop a ‘green city' in every state of the country will help mainstream environment-friendly power. The ‘green city’ will have solar rooftop systems on all its houses, solar parks on the city’s outskirts, waste-to-energy plants, and electric mobility-enabled public transport systems. Some states have also announced subsidies for the installation of small solar plants in homes. The pandemic has increased greater awareness on health, sustainability, climate change etc. which has, in turn, led to greater demand for green energy solutions such as solar. At the same time, as new technologies boost efficiency levels, the cost of generation of solar power is expected to fall too. It is likely to go as low as Rs 1. 9 per unit in India by 2030 as per a joint study by TERI and the US-based think tank Climate Policy Initiative (CPI). Over the last couple of years, the adoption of rooftop solar has been growing steadily, despite the overall penetration still being quite low. While the current initiatives are certainly welcome, there’s more to be done, especially for rooftop solar. The technology available today allows for rapid deployment and installation of home solar energy on rooftops across the country. As the growing installer network gets trained to deploy projects quickly, households can potentially generate their own energy with the sun within weeks of signing up. As more solar is deployed, we should also begin installing more batteries to allow the sun to power homes and businesses at night and give people backup energy when the larger system fails. However, residential rooftop solar installations in the country still account for just a small fraction of the total installations. Therefore, there needs to be a more cohesive approach to help ramp up the adoption of rooftop solar energy in the domestic sector. Some of the key recommendations are: In India, there is little awareness of rooftop solar and battery technology and its applicability in the household context. This lack of awareness about solar products, processes, and advantages presents a major challenge. Building targeted awareness and educational programs that make information on domestic solar easily accessible is critical. Currently, India lacks a consistent policy on regulations for rooftop solar. For instance, while some Indian States have placed restrictions on the size of the plant that can be installed at a resident’s facility, there is no uniformity. Instead, having clear guidelines that are based purely on technical considerations is recommended. Also, frequent policy changes, especially on a retrospective basis can severely impact customer confidence and dampen demand. A recent report by the Asian Development Bank cites the poor and piecemeal implementation of net metering policies as a major roadblock for the uptake of rooftop solar systems in India. For instance, several states have capped the maximum capacity limit for rooftop solar systems to be connected to the distribution grid at 1 MW per metering point. This ceiling which is based on factors such as poor financial health of discoms can hinder large-scale deployment. Therefore, a consistent national policy that is conducive to greater deployment is much needed. At the same time, it is also important to improve market stability to help address the price volatility of solar systems. Given that a large chunk of solar infrastructure is imported, taking steps to reduce dependence on imports is key. For example, in November 2020, the Government announced a production-linked incentive (PLI) for high-efficiency solar PV modules manufacturing. The scheme is worth Rs. 4,500 crore (US$ 610. 23 million) over five years. Also, customs duty on solar inverters was increased from 5 percent to 20percent, and on solar lanterns from 5to 15 percent to encourage domestic production. While these measures are welcome, more needs to be done to boost domestic manufacturing. One of the biggest factors holding back the adoption of rooftop solar, especially in the domestic sector, is the need for high upfront capital investment. This can be addressed through a financing and credit guarantee scheme that can offer customers much-needed confidence, without having to worry about lowered credit credentials. The introduction of rooftop solar-specific loans that do not require the proposed rooftop to be offered as collateral will go a long way in boosting adoption. The sun is one of the most abundant sources of energy in the universe. Let’s build an energy system that maximises the benefits of solar energy, giving everyone access to clean, affordable, and reliable power day and night. (Disclaimer: The views and opinions expressed in this article are those of the author and do not necessarily reflect the views of YourStory. )
english
At least three militants have been killed in an ongoing encounter with security forces in Shopian district of south Kashmir, police said. “Bodies of three militants can be seen from some distance at the encounter site in Shopian district. We can say for sure if they are dead only when we retrieve the bodies,” a police official said. The exchange of fire between the remaining militants, believed to be at least two, was going on till reports last came in, he said. A gun battle broke out between the security forces and militants in Kadder forest area falling under Keller police station in Shopian this morning after the counter-insurgency forces launched a search operation. There were no reports of any casualties among security forces so far, the official said.
english
package cn.wildfirechat.remote; public interface GeneralCallback { void onSuccess(); void onFail(int errorCode); }
java
फोर्ट संज्ञा पुं॰ [अं॰ फो़र्ट] किला । दुर्ग । Hindi Dictionary. Devnagari to roman Dictionary. हिन्दी भाषा का सबसे बड़ा शब्दकोष। देवनागरी और रोमन लिपि में। एक लाख शब्दों का संकलन। स्थानीय और सरल भाषा में व्याख्या। Fort के पर्यायवाची: Fort, Fort meaning in English. Fort in english. Fort in english language. What is meaning of Fort in English dictionary? Fort ka matalab english me kya hai (Fort का अंग्रेजी में मतलब ). Fort अंग्रेजी मे मीनिंग. English definition of Fort. English meaning of Fort. Fort का मतलब (मीनिंग) अंग्रेजी में जाने। Fort kaun hai? Fort kahan hai? Fort kya hai? Fort kaa arth. Hindi to english dictionary(शब्दकोश).फोर्ट को अंग्रेजी में क्या कहते हैं. इस श्रेणी से मिलते जुलते शब्द: ये शब्द भी देखें: synonyms of Fort in Hindi Fort ka Samanarthak kya hai? Fort Samanarthak, Fort synonyms in Hindi, Paryay of Fort, Fort ka Paryay, In “gkexams” you will find the word synonym of the Fort And along with the derivation of the word Fort is also given here for your enlightenment. Paryay and Samanarthak both reveal the same expressions. What is the synonym of Fort in Hindi?
english
<filename>lms/lms-server/src/main/java/org/github/shimonxin/lms/server/netty/NettyAcceptor.java package org.github.shimonxin.lms.server.netty; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.ChannelPipeline; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; import java.io.IOException; import io.netty.handler.timeout.IdleStateHandler; import org.github.shimonxin.lms.server.ServerAcceptor; import org.github.shimonxin.lms.server.netty.metrics.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.github.shimonxin.lms.parser.MQTTDecoder; import com.github.shimonxin.lms.parser.MQTTEncoder; import com.github.shimonxin.lms.spi.messaging.Messaging; /** * * @author andrea */ public class NettyAcceptor implements ServerAcceptor { private static final Logger LOG = LoggerFactory.getLogger(NettyAcceptor.class); EventLoopGroup m_bossGroup; EventLoopGroup m_workerGroup; // BytesMetricsCollector m_metricsCollector = new BytesMetricsCollector(); MessageMetricsCollector m_metricsCollector = new MessageMetricsCollector(); public void initialize(Messaging messaging, String host, int port, final int defaultTimeout) throws IOException { m_bossGroup = new NioEventLoopGroup(); m_workerGroup = new NioEventLoopGroup(); final NettyMQTTHandler handler = new NettyMQTTHandler(); handler.setMessaging(messaging); ServerBootstrap b = new ServerBootstrap(); b.group(m_bossGroup, m_workerGroup).channel(NioServerSocketChannel.class).childHandler(new ChannelInitializer<SocketChannel>() { @Override public void initChannel(SocketChannel ch) throws Exception { ChannelPipeline pipeline = ch.pipeline(); pipeline.addFirst("idleStateHandler", new IdleStateHandler(0, 0, defaultTimeout)); pipeline.addAfter("idleStateHandler", "idleEventHandler", new MqttIdleTimoutHandler(null,null)); pipeline.addLast("decoder", new MQTTDecoder()); pipeline.addLast("encoder", new MQTTEncoder()); pipeline.addLast("metrics", new MessageMetricsHandler(m_metricsCollector)); pipeline.addLast("handler", handler); } }).option(ChannelOption.SO_BACKLOG, 128).option(ChannelOption.SO_REUSEADDR, true).childOption(ChannelOption.SO_KEEPALIVE, true); try { // Bind and start to accept incoming connections. ChannelFuture f = b.bind(host, port); LOG.info("Server binded"); f.sync(); } catch (InterruptedException ex) { LOG.error(null, ex); } } public void close() { if (m_workerGroup == null) { throw new IllegalStateException("Invoked close on an Acceptor that wasn't initialized"); } if (m_bossGroup == null) { throw new IllegalStateException("Invoked close on an Acceptor that wasn't initialized"); } MessageMetrics metrics = m_metricsCollector.computeMetrics(); m_workerGroup.shutdownGracefully(); m_bossGroup.shutdownGracefully(); // LOG.info(String.format("Bytes read: %d, bytes wrote: %d", metrics.readBytes(), metrics.wroteBytes())); LOG.info("Msg read: {}, msg wrote: {}", metrics.messagesRead(), metrics.messagesWrote()); } }
java
# Done by <NAME> (16/09/2020) # SCU_2.7 - Modify a User-Defined Function def my_function(x, y): return (x+y)/2 x = 4 y = 5 print("The average is: ", my_function(x,y))
python
<filename>Codes/yore/offer2/Offer034.java package com.yore.offer2; import java.util.HashMap; import java.util.Map; /** * @author Yore * @date 2022/1/20 20:24 * @description */ public class Offer034 { public static void main(String[] args) { Offer034 o = new Offer034(); System.out.println(o.isAlienSorted(new String[]{"apple","app"},"abcdefghijklmnopqrstuvwxyz")); } public boolean isAlienSorted(String[] words, String order) { if (words.length == 1) { return true; } Map<Character, Integer> indexMap = new HashMap<>(); for (int i = 0; i < order.length(); i++) { indexMap.put(order.charAt(i), i); } for (int i = 1; i < words.length; i++) { if (!cmp(words[i - 1], words[i], indexMap)) { return false; } } return true; } public boolean cmp(String a, String b, Map<Character, Integer> indexMap) { int i = 0; int j = 0; while (i < a.length() && j < b.length()) { char a_c = a.charAt(i); char b_c = b.charAt(j); if (a_c != b_c) { return indexMap.get(a_c) < indexMap.get(b_c); } else { i++; j++; } } return i == a.length(); } }
java
Scottish and Australian researchers have found surprising evidence than detonating landmines, lethal explosives that leech toxic chemicals into soil, may actually be better for the environment than removing them outright. Their paper appears in the journal PLoS One. A team of scientists from Dundee University and the James Hutton Institute, both in Scotland, and the ChemCentre and Curtin University, both in Australia, measured the presence of TNT in soil. TNT is a poisonous and explosive chemical compound that litters conflict zones and landmine fields. The researchers were comparing the presence of TNT in soils where landmines were removed against those where landmines were detonated. You might think that removing the landmines would result in less TNT pollution than exploding them, but as the scientists found, detonating the landmines shook up the surrounding soil, making it more porous. That porosity, they found, made the soil more amenable to bioremediation, a process in which bacteria consume environmental pollutants. Speaking to Scottish publication The National, researcher Nic Daeid explained that the explosions allowed pollutant-removing bacteria to access the soil more quickly, and the more-porous soil had less toxic contamination at the end of the six-week study period. Clearing explosives from minefields is, as you’d imagine, a very dangerous and time-consuming endeavor. Humanitarians have used everything from drones to dogs to honey bees to aid in clearing them. Obviously, this doesn’t mean anyone should go around detonating landmines as the desire strikes them, but the researchers suggest using less toxic explosions to increase the porosity of soils contaminated by TNT. Restoring the environment after conflict is extremely important, and this could be a big step in understanding the process.
english
<reponame>Cahllagerfeld/nestjs-astra-module export interface AstraConfig { astraDatabaseId: string; astraDatabaseRegion: string; applicationToken: string; }
typescript
Former India cricketer Kris Srikkanth reckons the Men in Blue would have been firm favorites to win World Cup 2023 if explosive keeper-batter Rishabh Pant was fit. While Pant has not been ruled out of the ICC event, he's all set to miss the World Cup in India. The 25-year-old was involved in a horrific car crash in December last year and has been missing from action since. India have struggled in the keeping department in Pant’s absence. They have tried out Ishan Kishan, KL Rahul and Sanju Samson in the limited-overs formats and KS Bharat in Tests. Discussing Team India’s chances of winning the World Cup at home, after the schedule for the event was announced on Tuesday (June 27), Srikkanth opined that Pant’s absence leaves a gaping hole in the team. He told India Today: “We don’t know the real truth about Rishabh Pant. If he was playing, I would straightaway say India are the real favorites. But Pant’s fitness is obviously questionable. The 1983 World Cup-winning opener, though, asserted that India have a good blend of young and experienced players to pick from when selecting the 2023 World Cup squad: “Even Ishan Kishan, if he makes it to the team, he could be a dangerous cricketer. I believe Ishan Kishan is going to be a good player. I believe that guys like KL Rahul should be back in the middle order. He will be fantastic. You have Rohit Sharma opening, Shubman Gill and King Kohli, who is fantastic in this format and has been doing well. He’s been in form, so I believe India has got the capabilities of winning the World Cup," he added. India haven’t won an ICC event in a decade since MS Dhoni led them to victory in the 2013 Champions Trophy. Asked if he's looking forward to performances from any of the Indian youngsters from the current lot, Srikkanth picked in-form opener Shubman Gill as one to keep a close eye on. The former player said: “Shubman Gill is here to stay. He has been having a fantastic run from 2022. From January 2023, it has been a golden year for him, be it Test cricket, one-day cricket or T20 cricket. He’s got a double hundred in one-day cricket; you’ve got to understand that. “That guy knows what it is; he knows how to pace himself. The way he paces his innings is extraordinary,” Srikkanth concluded. Gill was part of the Indian team that lost the World Test Championship 2023 final to Australia at The Oval. He had a poor game, registering scores of 13 and 18.
english
The city of Belgorod is located in the Central Black Earth region of Russia, not far from the border with Ukraine. From Moscow it is separated by almost 700 kilometers. By the decree of Tsar Fedor Ioannovich, the city was founded as a border fortress in September 1596. Although the mention of the settlement, located on this place, dates back to a much earlier period - the 10th century. From 1658 through Belgorod passed the 800-kilometer defensive line, which was called the Belgorod line, - it protected the Moscow kingdom from enemies - Crimean Tatars. After the annexation of Ukraine (early 18th century) and the construction of the Ukrainian defensive line, the importance of Belgorod for the defense of the country decreased. Finally, it disappeared after the conquest of the Crimea, it was even excluded from the number of active fortresses. This happened in 1785. During the Great Patriotic War, the city had to withstand twice the occupation. It was considered one of the key settlements on the Kursk Bulge. Belgorod was liberated at the same time as Orel. This happened on August 5, 1943. Moscow welcomed the liberation of cities with the first victory salute. So now Belgorod is called the city of the first salute, and also the first military glory. Belgorod was the first to be awarded this honorary title. He was awarded the Order of the Patriotic War 1st degree. As is common now, Belgorod, which has a well-developed infrastructure, is an economic, scientific, cultural and spiritual center. In fact, this is a relatively small city with a population of about half a million people. It is compactly located on the river Seversky Donets, which is the right tributary of the Don. Its territory is divided into Eastern and Western districts. The city is adjoined by suburbs - areas with individual buildings. Belgorod can not be called original or original, because during the war it was turned into ruins. And yet there are a lot of monuments of architecture, interesting historical buildings and buildings, which make up the sights of Belgorod. Uspensko-Nikolaevsky and Preobrazhensky cathedrals, "Selivanov's house", "Tree of friendship", the museum-diorama "Fiery arc", singing fountains . . . These and many other architectural sights of Belgorod deserve to be told about them in detail. Seventeen churches and churches were built here at different times. The oldest - not only in Belgorod, but in the entire region - is the Uspensko-Nicholas Cathedral. Its construction was completed in the beginning of the XVIII century. Tsar Peter I granted 100 rubles for his erection. A letter written by the emperor with his own hand was kept in the altar for more than 200 years. Other Russian princes also complained for the cathedral "gospels in expensive salaries," moreover, the old, "in the seventeenth century written. " This ancient monument of architecture was remarkable for its splendor, beautiful wall paintings, gilded iconostasis with gold leaf. It dates back to the same century, another ancient temple of Belgorod - the Smolensk Cathedral. It was built on the site where the miraculous icon of the Smolensk Mother of God appeared to people. First there was built a wooden church, then - a stone church. A hundred years later, the Transfiguration Cathedral was erected in the city to commemorate the victory over Napoleon. There, the five hundred-year-old miraculous icon of Nikolai Ratny, the relics of St. Joasaph and the icon of the Mother of God "The Sign" are kept there. These artifacts attract many pilgrims to the city. Attractions of the city of Belgorod are also the churches of the Blessed Matrona of Moscow, Nikolo-Ioasafovsky and Krestovozdvizhensky churches and many others, including new churches, that are very popular in Russia. The sights of Belgorod are diverse and numerous, but the largest number is located in the central part of the city. Begin acquaintance with them from the prospect of Bogdan Khmelnitsky, then you can walk the streets of Popov and Vatutin. In this area there are about 80% of the most significant tourism objects. The main square of the city is called Sobornaya. True, instead of cathedrals there is a traditional monument to Lenin, a memorial with a perpetual eternal fire and a sculpture of the actor MS Shchepkin at the drama of the same name. The role of the temple can be attributed to the building of the regional administration as the main one here. The architecture of the square is made in Stalinist modernism. Movement over the area is blocked - this is a pedestrian zone. Next to the regional administration is a fashionable hotel "Belgorod". Cathedral Square is the place where two of the city's most beautiful thoroughfares meet: Holy Trinity Boulevard and Civic Avenue. Boulevard can be called not only the central, but also the oldest street in Belgorod. Once it was built up with two-story houses, some of them have survived to this day. On the street you can go to the building of the State University. Nearby is the Trinity Cathedral, and in front of it - a monument to the heavenly patron of the city, the prelate Joasaph. By the way, at the university, although it is located near the temple, there is a church built on the bank of the river Vezelki. If you go from the Cathedral Square in the other direction along the Civic Avenue, you can see interesting buildings of original architecture. There is also the Smolensk Cathedral. The Art Museum of Belgorod is distinguished by a chic interior and interesting design. There are no world masterpieces in his collection, but he who loves art will not regret visiting. The museum collection began with a gift of 243 paintings, obtained from the widow of the city's native artist, artist M. N. Dobronravov. A number of exhibition works by this time gathered already in the Belgorod organization of the Union of Artists of Russia. Therefore, it was decided to open the museum. At that time, the collection of paintings numbered about 400 exhibits. There were works by A. Laktionov, Yu. Pimenov, S. Gerasimov, P. Ossovsky and other artists. In 2004-2008, the museum continued to be replenished with paintings by masters of fine arts of Russia of the 20th century. On the first floor of the building, an art salon is open, where you can buy paintings, graphics, handicrafts and printed products. On the bank of the small river Vezelka there is a unique museum-diorama "Fire arc". It is devoted to the great tank battle near Prokhorovka, which occurred in July 1943. In the building made in the form of an arc, the main place is occupied by a large art canvas, the length of which is 67 meters, and the height - 15 meters. It tells of a grand tank battle. The museum has a large collection of items brought from the battlefields. Near the diorama is an exhibition of military equipment, which was used during the Great Patriotic War. One of the oldest cultural institutions of the city and the region is the historical museum of local lore, in which you can get acquainted with the history of the Belgorod region. Previously, he was in the Transfiguration Cathedral. "House Selivanov" - a building that belongs to the monuments of architecture of the XVIII century. Now it houses the Belgorod Literary Museum. Print publications, including books, as well as individual publications presented here, cover not only the period of the XVIII century, but also the present. In the center, where 50-year-old street of the Belgorod region and Narodny Boulevard intersect, a huge sundial is installed. They have become a favorite meeting place for the city's residents. Show genuine interest to them and tourists. The composition, whose height is 11 meters, is made of granite and bronze. It was created by the sculptor Taras Kostenko, well known among the inhabitants of the city. The opening of the sculpture was timed to coincide with the 65th anniversary of the liberation of Belgorod. Then in the city there were new fountains and streets were arranged. The time for the solar clock can be determined with an error of only 10 minutes. And not only in clear weather. In a dark or gloomy time of the day a special program operates in the clock, which controls the light bulbs. By the way, at night the stars light up on the dial, and the brightest constellations of the hemisphere, as well as the Milky Way, are clearly visible. Sundial is maintained in perfect condition. Their work capacity is not in anyone's doubts, because the authorities are watching to ensure that citizens and visitors are attracted to such sights of Belgorod. Photo of a sundial in memory of a visit to the city - what could be better? There are many squares and parks in Belgorod. There are among them large and small, well-groomed and not very well-known to all and visited only by connoisseurs. Those who like to walk among the green trees, you can advise to start with the Theater Square. True, this place is more suitable for young people: the Theater Passage constantly rolls here and there girls and boys on roller skates, students sit on benches, often with guitars. However, parents with children here too much. Opposite the square is Victory Park. There's plenty of room for everyone. The park stretches along the banks of the river Vezelka. By the way, you can go here from Vatutin Avenue and Sumskaya Street. The latter is more like a park alley - there is practically no movement. It is this street that will lead us to the square. In the main part of the park there are sculptures, a hero's alley, a singing fountain, a children's and a sports town. The monument "Victory in the Patriotic War", which was established in 1983 in commemoration of the 40th anniversary of the Battle of Kursk and the liberation of Belgorod, deserves attention. In a somewhat secluded corner of the park, exercise lovers on the horizontal bars are provided with a separate playground. Those interested can take a ride on the river by boat, renting it. Enumerating the parks of Belgorod, it is impossible not to call the Central Park of Culture and Rest named after VI Lenin, in which the citizens and guests can not only have a good rest, but also have fun. There are amusement rides, folk festivals are often held, new artists come out. From the observation platform, built on the Kharkov mountain, you can contemplate the city in all its glory. Noteworthy and less famous parks of Belgorod, among which you can name the campus of the University of Technology. Here you can get to the alley, leading from the monument to Prince Vladimir on the Kharkov mountain. You find yourself in a very cozy square, well-kept, clean. Here, too, there is an observation deck, with a wonderful view of the river Seversky Donets and a part of the city. You can walk by the fountain, and still admire the interesting sculptures, the names of which speak for themselves: "Students", "Runners", "Pushkin and Natalie", "The Girl with the Dog". Zoo of Belgorod began with a regular zoo corner in Victory Park. Now it covers an area of more than three hectares. There are about 400 animals of 84 species. Some of them are quite rare and listed in the Red Book. The exhibited collection of the zoo is represented by mammals, birds, reptiles, insects. Still, Belgorod residents believe that their zoo does not have enough space for development, so in 2010 the city authorities decided to move it to the Sosnovka tract. Allotted a plot of 50 hectares. In 2011, construction work began. Meanwhile, he will be in the old place in the center of the city (address: Bogdan Khmelnitsky Avenue, 16 "a"). The Belgorod zoo operates in the warm season every day, except Monday, from 10 to 20 hours. From November to the end of March, there is one more day off - Tuesday, and the work time is reduced to 18 hours. The name of the city was given by Cretaceous mountains, which have a light, almost white color. In the vicinity of Belgorod, quarries are being developed, and a building materials plant is operating. On the highest of the mountains, Belaya, there is an iron cross and an observation deck was made to look at the city and its surroundings. Quite near the White Mountain is the so-called Monastery Forest. There is a chapel, a spring and a font. Water in the source is considered curative. The history of this holy place is very ancient. At the end of the XVII century in the forest, at the source, the Korsun Icon of the Mother of God was revealed. At this place - with the blessing of Metropolitan Hilarion - a chapel was built, which was then handed over to the Nativity-Bogoroditsky Convent. Over time, two churches were built here. One - in honor of the icon of Korsun, the second - in honor of the Savior Not Made by Hands. However, the revolution, the Patriotic War and Soviet power played their part in the destruction of churches and the closure of the monastery. The modern chapel of the Korsun Icon of the Mother of God was erected and consecrated in 1995. In the vicinity of Belgorod is the village of Dubovoe. Its landmark is an age-old oak tree, three times its width, planted more than 300 years ago by Bogdan Khmelnitsky. Townspeople often come here with a view to stroll through the beautiful park and take a break from the hustle and bustle. In Belgorod, there are many establishments where you can eat deliciously or simply snack, have a good rest and relax. For example, the Irish Pub on Michurin Street. This two-story establishment is really made in the Irish style. Beer lovers here can try el, the famous Guinness and other equally famous drinks. In the pub often perform well-known bands from Ireland. Their concerts are popular. It is interesting to celebrate St. Patrick's Day and Halloween, periodically pass tastings of beer varieties, watching sports matches.
english
<gh_stars>0 package com.google.places.showcase.test; import android.test.ApplicationTestCase; import android.test.UiThreadTest; import com.google.places.showcase.PlacesApplication; /** * Application start test */ public class ApplicationStartTest extends ApplicationTestCase <PlacesApplication> { public ApplicationStartTest() { super(PlacesApplication.class); } @UiThreadTest public void testInit() { createApplication(); // check if application created correctly assertNotNull(getApplication()); // check if providers initialize correctly assertNotNull(getApplication().getLocationProvider()); assertNotNull(getApplication().getPlacesProvider()); } }
java
The Union Cabinet today gave its approval to the following proposals : i) The establishment of “Institute for Stem Cell Science and Regenerative Medicine” (SCSRM) as an autonomous institution of DBT with a total cost of Rs. 203.10 crore. ii) The flexibility in the management function for : a) hiring qualified manpower based on selection by a selection committee, not exceeding 7%, of its sanctioned manpower, for recruiting exceptional overseas candidates or to compensate for sudden loss of leadership in challenging technical areas; b) offering one scale higher than a level of an available post to a candidate of exceptional merit by the Governing Board; c) appoint overseas Indian scientists as adjunct faculty; d) provide an outstanding performance allowance to 20% of faculty / scientists with the approval of the Governing Board; e) create Extramural unit in hospitals and IITs to augment translation and have freedom to negotiate Public-Private Partnership; f) for scientist to open start ups as per the approved CSIR norms; g) raise endowments from private foundations for scientific purposes. iii) Integration of Stem Cell Centre (SCC) at Christian Medical College, Vellore now funded in project mode by the Department of Biotechnology with the SCSRM, on expiry of the project period, with due operational flexibility for SCC as recommended by the Expenditure Finance Committee. The decision for establishment of Institute will help in developing policies relating to stem cell technologies, identify needs, facilitate conseptualization and design of new technologies.
english
{"meta":{"build_time":"2021-06-01T07:04:25.950Z","license":"CC-BY-4.0","version":"2.0-beta"},"data":{"date":"2021-01-28","state":"AZ","meta":{"data_quality_grade":"A+","updated":"2021-01-28T05:00:00Z","tests":{"total_source":"totalTestsViral"}},"cases":{"total":743232,"confirmed":696548,"probable":46684},"tests":{"pcr":{"total":6549568,"pending":null,"encounters":{"total":null},"specimens":{"total":6549568,"positive":null,"negative":null},"people":{"total":3409395,"positive":743232,"negative":2712847}},"antibody":{"encounters":{"total":531723,"positive":null,"negative":null},"people":{"total":415234,"positive":null,"negative":null}},"antigen":{"encounters":{"total":null,"positive":null,"negative":null},"people":{"total":null,"positive":null,"negative":null}}},"outcomes":{"recovered":null,"hospitalized":{"total":51349,"currently":4087,"in_icu":{"total":null,"currently":1023},"on_ventilator":{"total":null,"currently":692}},"death":{"total":12819,"confirmed":11440,"probable":1379}}}}
json
<reponame>feiandre/M3UAssistant """ Allocator is responsible of: 1. concatenating .ts file fragments into one, and 2. converting .ts file to .mp4 """ import logging import os import subprocess as sp import sys from typing import List class Allocator: def __init__(self, alc_logger: logging.Logger) -> None: """ Welcoming the logger assigned and create place holders for tools :param alc_logger: the logger assigned """ self._logger = alc_logger self.cov_tool = None self.cat_tool = None def check_tool(self, conversion_tool: str, concatenation_tool: str) -> None: """ Checking if the tools are available :param conversion_tool: the tool assigned for conversion :param concatenation_tool: the tool assigned for concatenation """ if sp.call(['which', conversion_tool], stdout=sp.DEVNULL): self._logger.error( "abort: Cannot access conversion tool {}".format(conversion_tool)) exit(2) if sp.call(['which', concatenation_tool], stdout=sp.DEVNULL): self._logger.error( "abort: Cannot access concatenation_tool tool {}".format(concatenation_tool)) exit(2) self.cov_tool = conversion_tool self.cat_tool = concatenation_tool def concatenate(self, input_files: List[str], concatenated_name: str) -> None: """ Concatenating the input files to one :param input_files: a list of files to concatenate :param concatenated_name: the name of the concatenated file """ if len(input_files) == 1: return cat_command = [self.cat_tool] + input_files + ['>', concatenated_name] os.system(" ".join(cat_command)) def convert(self, in_ts: str, out_mp4: str) -> None: """ Converting .ts file to .mp4 :param in_ts: the .ts file to convert :param out_mp4: the name of the converted file """ cov_command = '{tool} -i {in_ts} -codec {codec} {out_mp4} ' \ .format(tool=self.cov_tool, in_ts=in_ts, codec='copy', out_mp4=out_mp4) sp.call(cov_command.split()) # Demo if __name__ == '__main__': logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler(sys.stdout)) minion = Allocator(logger) minion.concatenate(input_files=['01.ts', '02.ts', '03.ts'], concatenated_name="out.ts") minion.convert(in_ts="out.ts", out_mp4="out.mp4")
python
<filename>dist/esri/widgets/Locate/t9n/Locate_fr.json { "widgetLabel": "Localiser", "title": "Rechercher mon emplacement", "currentLocation": "Position actuelle", "timestamp": "Date", "latitude": "Latitude", "longitude": "Longitude", "accuracy": "Précision", "altitude": "Altitude", "altitudeAccuracy": "Exactitude de l’altitude", "heading": "Direction", "speed": "Vitesse" }
json
<reponame>ucsd-progsys/csolve-bak<filename>src/regrtest.py #!/usr/bin/python # Copyright (c) 2009 The Regents of the University of California. All rights reserved. # # Permission is hereby granted, without written agreement and without # license or royalty fees, to use, copy, modify, and distribute this # software and its documentation for any purpose, provided that the # above copyright notice and the following two paragraphs appear in # all copies of this software. # # IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES # ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN # IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY # OF SUCH DAMAGE. # # THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY # AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS # ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION # TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. import time, subprocess, optparse, sys, socket, os import misc.rtest as rtest solve = "./csolve -c".split() null = open("/dev/null", "w") now = (time.asctime(time.localtime(time.time()))).replace(" ","_") logfile = "../tests/logs/regrtest_results_%s_%s" % (socket.gethostname (), now) argcomment = "//! run with " def logged_sys_call(args, out=None, err=None): print "exec: " + " ".join(args) return subprocess.call(args, stdout=out, stderr=err) def solve_quals(file,bare,time,quiet,flags): if quiet: out = null else: out = None if time: time = ["time"] else: time = [] hygiene_flags = [("--csolveprefix=%s" % (file)), "-o", "/dev/null"] out = open(file + ".log", "w") rv = logged_sys_call(time + solve + flags + hygiene_flags + [file], out) out.close() return rv def run_script(file,quiet): if quiet: out = null else: out = None return logged_sys_call(file, out) def getfileargs(file): f = open(file) l = f.readline() f.close() if l.startswith(argcomment): return l[len(argcomment):].strip().split(" ") else: return [] class Config (rtest.TestConfig): def __init__ (self, dargs, testdirs, logfile, threadcount): rtest.TestConfig.__init__ (self, testdirs, logfile, threadcount) self.dargs = dargs if os.path.exists("../tests/postests/coreutils/"): logged_sys_call(["../tests/postests/coreutils/makeCoreUtil.sh", "init"], None) def run_test (self, file): os.environ['CSOLVEFLAGS'] = self.dargs if file.endswith(".c"): fargs = getfileargs(file) return solve_quals(file, True, False, True, fargs) elif file.endswith(".sh"): return run_script(file, True) def is_test (self, file): return (file.endswith(".sh") and os.access(file, os.X_OK)) \ or (file.endswith(".c") and not file.endswith(".csolve.save.c") and not file.endswith(".ssa.c")) ##################################################################################### #testdirs = [("../postests", 0)] #testdirs = [("../negtests", 1)] #testdirs = [("../slowtests", 1)] #DEFAULT testdirs = [("../tests/postests", 0), ("../tests/negtests", [1, 2])] #testdirs = [("../tests/microtests", 0)] parser = optparse.OptionParser() parser.add_option("-t", "--threads", dest="threadcount", default=1, type=int, help="spawn n threads") parser.add_option("-o", "--opts", dest="opts", default="", type=str, help="additional arguments to csolve") parser.disable_interspersed_args() options, args = parser.parse_args() runner = rtest.TestRunner (Config (options.opts, testdirs, logfile, options.threadcount)) exit (runner.run ())
python
<filename>maps/gsiv/rooms/19874.json { "id": 19874, "title": [ "[Storage]" ], "description": [ "Several utilitarian shelving units hold various solutions and implements for cleaning. One large bin, with brooms leaning against it, is right next to the door and obviously meant for trash. The only light comes from a small skylight above, and the room is barely large enough to turn around in." ], "paths": [ "Obvious exits: northeast" ], "location": "Mist Harbor", "wayto": { "19873": "go door", "19876": "northeast" }, "timeto": { "19873": 0.2, "19876": 0.2 }, "tags": [ "cleric alchemy cleaning supplies" ] }
json
import java.util.concurrent.TimeUnit; public class CustomerGenerator extends Thread{ Cafe cafe; Table table; int id = 1; int lim = 0; public CustomerGenerator(Cafe cafe, Table table) { this.cafe = cafe; this.table = table; } public void run() { while (Clock.close) { System.out.print(""); if (!Clock.close) break; } while (!Clock.close) { if (lim >= 50) break; Customer customer = new Customer(id, cafe, table); Thread threadCustomer = new Thread(customer); threadCustomer.start(); try { TimeUnit.SECONDS.sleep((long) (Math.random()*1.3)); } catch (InterruptedException ie) { ie.printStackTrace(); } lim++; id++; } if (Clock.close) { try { Thread.sleep(3000); } catch (InterruptedException ie) { ie.printStackTrace(); } } return; } }
java
(function () { 'use strict'; function Base(x, y, w, h, fill) { this.x = x || 0; this.y = y || 0; this.w = w || 0; this.h = h || 0; this.fill = fill || 0; }; Base.prototype.draw = function (context) { context.fillStyle = this.fill; context.fillRect(this.x, this.y, this.w, this.h); }; } ());
javascript
<filename>venta/admin.py<gh_stars>0 # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin import models import forms from inventario import models as inventario # Register your models here. class DetalleInline(admin.StackedInline): model = models.Detalle form = forms.DetalleForm extra = 1 # end class class FacturaAdmin(admin.ModelAdmin): list_display = ['comprador','fecha','subtotal','iva','impoconsumo','total','creador','paga'] search_fields = ['comprador','fecha','subtotal','iva','impoconsumo','total','creador','paga'] form = forms.FacturaForm inlines = [DetalleInline,] icon = '<i class="material-icons">receipt</i>' def save_model(self, request, obj, form, change): obj.save() total = 0 for s in models.Detalle.objects.filter(factura__id=obj.id): articulo = inventario.Activo.objects.filter(id=s.articulo.id).first() if s.cantidad > s.articulo.existencias : s.cantidad = s.articulo.existencias #end if if articulo: articulo.existencias = articulo.existencias - s.cantidad articulo.save() total = s.cantidad * articulo.precio_venta #end if # end for obj.total = total obj.save() # end if #end class class DetalleAdmin(admin.ModelAdmin): list_display = ['factura','articulo','cantidad','valor_unitario','total'] search_fields = ['factura','articulo','cantidad','valor_unitario','total'] form = forms.DetalleForm icon = '<i class="material-icons">assignment</i>' #end class admin.site.register(models.Factura, FacturaAdmin) admin.site.register(models.Detalle, DetalleAdmin)
python
<gh_stars>1-10 package service import ( "fmt" "goblog/dto" "goblog/model" module "goblog/module/db" ) //GetParentCommentsByPage 分页获取父评论 func GetParentCommentsByPage(blogId, pageIndex int) ([]model.Comment, error) { var comments []model.Comment sql := fmt.Sprintf("select * from comments where blog_id=%d and parent_comment_id=-1 order by create_time desc limit %d,%d", blogId, pageIndex*10, 10) err := module.GetDB().Raw(sql).Scan(&comments).Error return comments, err } //GetSonComments 获取子评论 func GetSonComments(blogId, parent_comment_id int) ([]model.Comment, error) { var comments []model.Comment err := module.GetDB().Where("blog_id=? and parent_comment_id=?", blogId, parent_comment_id).Order("create_time desc").Find(&comments).Error return comments, err } //CreateCommentDtos 递归构建评论信息 func CreateCommentDtos(parentComments []model.Comment) ([]dto.CommentDto, error) { commentDtos := make([]dto.CommentDto, 0) for _, v := range parentComments { //创建一个commentDto对象 var commentDto dto.CommentDto //将v的值存进去 commentDto.Comment = v //新开一个列表存子评论 commentDto.Childs = make([]dto.ChildComment, 0) //递归获取对应的子评论 err := recursion(&commentDto.Childs, v.UserName, v.BlogId, v.Id) if err != nil { return nil, err } commentDtos = append(commentDtos, commentDto) } return commentDtos, nil } //recursion 递归获取子评论 func recursion(childComments *[]dto.ChildComment, name string, blog_id, parent_comment_id int) error { //获取对应的子评论 childs, err := GetSonComments(blog_id, parent_comment_id) if err != nil { return err } for _, v := range childs { //赋值给childComment var childComment dto.ChildComment childComment.Comment = v childComment.ParentName = name //添加进childComments中 *childComments = append(*childComments, childComment) //递归查找 err := recursion(childComments, v.UserName, v.BlogId, v.Id) if err != nil { return err } } return nil } //AddComment 添加评论 func AddComment(comment model.Comment) error { err := module.GetDB().Create(&comment).Error return err } //DeleteComment 删除评论 func DeleteComment(id int) error { err := module.GetDB().Where("id=?", id).Delete(&model.Comment{}).Error return err } //CountComment 评论数量 func CountComment(blog_id, parent_comment_id int) (int, error) { var counts int sql1 := "1=1" sql2 := "1=1" //表示传的是指定的blog_id,否则就是全查,parent_comment_id同理 if blog_id != -2 { sql1 = fmt.Sprintf("blog_id=%d", blog_id) } if parent_comment_id != -2 { sql2 = fmt.Sprintf("parent_comment_id=%d", parent_comment_id) } err := module.GetDB().Model(model.Comment{}).Where(sql1 + " and " + sql2).Count(&counts).Error return counts, err }
go
use r2d2_mysql::mysql::{Opts, OptsBuilder}; use r2d2_mysql::MysqlConnectionManager; pub type Pool = r2d2::Pool<MysqlConnectionManager>; pub fn get_db_pool() -> Pool { let db_url = std::env::var("DATABASE_URL").expect("DATABASE_URL must be set"); let opts = Opts::from_url(&db_url).unwrap(); let builder = OptsBuilder::from_opts(opts); let manager = MysqlConnectionManager::new(builder); r2d2::Pool::new(manager).expect("Failed to create DB Pool") }
rust
"use strict"; window.cls || (window.cls = {}); /** * */ cls.ResourceInspector = function(network_logger) { var EXPAND_COLLAPSE_ATTRIBUTE = "data-expand-collapse-id"; var RESOURCE_UID_ATTRIBUTE = "data-resource-uid"; var HIGHLIGHT_CLASSNAME = "resource-highlight"; var THROTTLE_DELAY = 250; this._network_logger = network_logger; this._handle_list_documents = function(status, msg) { this._document_list = new cls.DocumentManager["1.0"].DocumentList(msg).documentList; this._document_list = this._document_list.filter(function(d) { // discard documents that do not have a URL property yet return Boolean(d.url); }); this._document_list.forEach(function(d) { // use the URL class d.original_url = d.url; d.url = new URI(d.url); }); this._update(); }; this._list_documents = function() { var tag = window.tag_manager.set_callback(this, this._handle_list_documents); window.services["document-manager"].requestListDocuments(tag, []); }.bind(this).throttle(THROTTLE_DELAY); this.get_views = function() { if (this.tree_view == null) this.tree_view = window.views.resource_tree_view; if (this.detail_view == null) this.detail_view = window.views.resource_detail_view; }; this.get_group_order = function() { this.get_views(); if (this.group_order == null && this.tree_view != null) { this.group_order = this.tree_view.get_group_order(); this.group_order_type_index = {}; this.group_order.forEach(function(g, i) { this.group_order_type_index[g.type] = i; }, this); } } this._update = function(msg) { this.get_views(); // bounce if _suppress_updates if (this._suppress_updates_url) { if (msg && msg.type == "resource-update") { // suppress the uid altogether if its URL matches the one we are requesting var r = this._network_logger.get_resources([msg.id])[0]; if (r && r.url == this._suppress_updates_url) this._suppress_uids[msg.id] = true; // skip the update if it is about a suppressed uid if (this._suppress_uids[msg.id]) return; } } // build the context var ctx = {}; // get list of window_contexts for which we saw the main_document ctx.window_list = (this._network_logger.get_window_contexts() || []).filter(function(w) { return w.saw_main_document; }); if (ctx.window_list.length) { // get all the (non-suppressed) resources with content ctx.resource_list = (this._network_logger.get_resources() || []).filter(function(resource) { return !this._suppress_uids.hasOwnProperty(resource.uid) && resource.responsecode != 204; }, this); ctx.selected_resource_uid = this._selected_resource_uid; ctx.collapsed = this._collapsed_hash; // get the order of the groups of resources, this.get_group_order(); ctx.group_order = this.group_order; ctx.document_resource_hash = {}; var lead = function(str, char, len) { str = String(str); return new Array((len || 8) - str.length + 1).join(char || "-") + str; }; // mapping of the WindowIDs in the debugging context + pivot_id var window_id_index = {}; ctx.window_list.forEach(function(w, i) { w.pivot_id = lead(w.id); window_id_index[w.id] = i; }); var null_document_id = false; var document_id_index = {}; // filter the documents that belong in the window_id list, // set null_document_id flag, // augment the document objects, // set the default collapsed flags ctx.document_list = this._document_list.filter(function(document, document_index, document_list) { var in_context = window_id_index.hasOwnProperty(document.windowID); if (in_context) { if (!null_document_id && !document.documentID) null_document_id = true; if (document.resourceID != null) ctx.document_resource_hash[document.resourceID] = document.documentID; // populate document_id_index document_id_index[document.documentID] = document_index; // set depth, pivot_id and same_origin var parent_document = document_list[document_id_index[document.parentDocumentID]]; if (!parent_document) { parent_document = { "pivot_id": ctx.window_list[window_id_index[document.windowID]].pivot_id, "depth": 0 }; } var id = parent_document.pivot_id + lead(document.documentID); document.depth = parent_document.depth + 1; document.pivot_id = id; document.same_origin = cls.ResourceUtil.sameOrigin(parent_document.url, document.url); // set the default collapsed flag var hash = this._collapsed_hash; if (!hash.hasOwnProperty(id)) { hash[id] = document.depth > 1; ctx.group_order.forEach(function(g) { hash[id + "_" + g.type] = true; }); } } return in_context; }, this); var unknown_document_id = false; // filter out resources pointing to an unknown document_id, // set unknown_document_id flag, // assign top resource to the right document, // add group to each resource, // same_origin flag to each resource, // full_id ( pivot_id + group + uid ), // pivot_id ctx.resource_list = ctx.resource_list.filter(function(resource) { // check if this is the top resource of a document var document_id = ctx.document_resource_hash[resource.resource_id]; if (document_id != null && document_id != resource.document_id) resource.document_id = document_id; var document = this._document_list[document_id_index[resource.document_id]]; if (!document) { unknown_document_id = true; return false; } resource.group = this.group_order_type_index.hasOwnProperty(resource.type) ? resource.type : ctx.group_order.last.type; resource.same_origin = cls.ResourceUtil.sameOrigin(document.url, resource); resource.full_id = document.pivot_id + " " + lead(this.group_order_type_index[resource.group], " ") + "_" + resource.uid; resource.pivot_id = document.pivot_id + "_" + resource.group; resource.is_hidden = ctx.collapsed[resource.pivot_id] == true; return true; }, this); // sort the resource by their full_id ( pivot + uid ) ctx.resource_list = ctx.resource_list.sort(function(a, b) { return a.full_id > b.full_id ? 1 : a.full_id == b.full_id ? 0 : -1; }); // filter the list of window. Purge the ones with no documents ctx.window_list = ctx.window_list.filter(function(window) { return ctx.document_list.some(function(document) { return window.id == document.windowID; }); }); // sort the documents by their resources var document_id_order = {}; ctx.resource_list.forEach(function(r, i) { document_id_order[r.document_id] = i; }); ctx.document_list = ctx.document_list.sort(function(a, b) { return document_id_order[a.documentID] - document_id_order[b.documentID]; }); // request the list of documents if we have // an empty document_list // or a resource pointing to an unknown document // or a document does not have a document_id yet if (!ctx.document_list.length || unknown_document_id || null_document_id) this._list_documents(); this._context = ctx; } else { this._context = null; } this.tree_view.update(); }; this._update_bound = this._update.bind(this); this._on_debug_context_selected_bound = function() { this._reset(); }.bind(this); this._handle_expand_collapse_bound = function(event, target) { if (!this._context) return; var pivot = target.get_ancestor("[" + EXPAND_COLLAPSE_ATTRIBUTE + "]"); if (pivot) { var hash = this._collapsed_hash; var pivot_id = pivot.getAttribute(EXPAND_COLLAPSE_ATTRIBUTE); var pivot_ids = [pivot_id]; var collapsed = !hash[pivot_id]; if (event.shiftKey) { pivot_ids.push.apply(pivot_ids, Object.keys(hash).filter(function(p) { return p.startswith(pivot_id); })); } pivot_ids.forEach(function(p) { hash[p] = collapsed; }); this.tree_view.update(); } }.bind(this); this._handle_resource_detail_bound = function(event, target) { if (!this._context) return; var parent = target.get_ancestor("[" + RESOURCE_UID_ATTRIBUTE + "]"); if (parent == null) return; var uid = parent.getAttribute(RESOURCE_UID_ATTRIBUTE); this.highlight_resource(uid); this.detail_view.show_resource(uid); }.bind(this); this.highlight_resource = function(uid) { if (this._selected_resource_uid == uid) return; var e = document.querySelector("." + HIGHLIGHT_CLASSNAME); if (e) e.removeClass(HIGHLIGHT_CLASSNAME); this._selected_resource_uid = uid; if (this._context) this._context.selected_resource_uid = uid; e = document.querySelector("[" + RESOURCE_UID_ATTRIBUTE + "='" + this._selected_resource_uid + "']"); if (e) { e.addClass(HIGHLIGHT_CLASSNAME); Tooltips.hide_tooltip(); // scroll into view var container = this.tree_view.get_container().firstChild; var y = container.scrollTop; var max_y = e.offsetTop; var min_y = max_y + e.offsetHeight - container.clientHeight; if (y < min_y) container.scrollTop = min_y; else if (y > max_y) container.scrollTop = max_y; } }.bind(this); this._highlight_sibling_resource = function(inc) { if (!this._context) return; // walk the list of resources in the "inc" direction, looking for the last visible // resource before we reached the selected resource uid ( or the end of the list ) var uid; var list = this._context.resource_list; var i = inc < 0 ? list.length - 1 : 0; while (list[i] != null && list[i].uid != this._selected_resource_uid) { if (list[i].is_selectable) uid = list[i].uid; i += inc; } if (uid != null) { this.highlight_resource(uid); this.detail_view.show_resource(uid); return true; } }; this.highlight_next_resource_bound = function() { return !this._highlight_sibling_resource(-1); }.bind(this); this.highlight_previous_resource_bound = function() { return !this._highlight_sibling_resource(1); }.bind(this); this._resource_request_update_bound = function(msg) { delete this._suppress_updates_url; }.bind(this); this._init = function() { var listener; var eh = window.event_handlers; eh.click["resources-expand-collapse"] = this._handle_expand_collapse_bound; eh.click["resource-detail"] = this._handle_resource_detail_bound; eh.click["open-resource-tab"] = function(event, target) { var broker = cls.ResourceDisplayBroker.get_instance(); broker.show_resource_for_ele(target); }; var messages = window.messages; messages.add_listener("debug-context-selected", this._on_debug_context_selected_bound); listener = this._resource_request_update_bound; messages.add_listener("resource-request-resource", listener); messages.add_listener("resource-request-fallback", listener); listener = this._update_bound; this._network_logger.add_listener("resource-update", listener); this._network_logger.add_listener("window-context-added", listener); this._network_logger.add_listener("window-context-removed", listener); window.services["window-manager"].add_listener("windowclosed", listener); this._reset(); }; this._reset = function() { this._context = null; this._selected_resource_uid = null; this._document_list = []; this._collapsed_hash = {}; this._suppress_uids = {}; }; this.get_resource_context = function() { return this._context; }; this._get_resource_by_key_value = function(key, value) { var ctx = this._context; if (!ctx) return null; return ctx.resource_list.filter(function(v) { return v[key] == value; }).last; }; this.get_resource = function(uid) { return this._get_resource_by_key_value("uid", uid); }; this.get_resource_by_url = function(url) { return this._get_resource_by_key_value("url", url); }; this.request_resource_data = function(url, callback, data, resource_info) { this._suppress_updates_url = url; new cls.ResourceRequest(url, callback, data, resource_info); }; this._init(); }; cls.ResourceRequest = function(url, callback, data, resource_info) { var SUCCESS = 0; var TRANSPORT_STRING = 1; var TRANSPORT_DATA_URI = 3; var TRANSPORT_OFF = 4; var DECODE_TRUE = 1; var SIZE_LIMIT = 1e7; var MAX_RETRIES = 3; this._init = function(url, callback, data, resource_info) { this.url = url; this.resource_info = resource_info; this._data = data || {}; this._callback = callback; this._retries = 0; this._resource_manager = window.services["resource-manager"]; if (this._resource_manager) this._request_create_request(); else this._fallback(); }; this._fallback = function() { // broadcast that we fellback window.messages.post("resource-request-fallback", {resource_id: this.resource_id}); window.open(this.url); }; this._request_create_request = function() { if (this._resource_manager.requestCreateRequest) { var window_id = this._data.window_id || window.window_manager_data.get_debug_context(); var tag = window.tag_manager.set_callback(this, this._on_request_resource_id); this._resource_manager.requestCreateRequest(tag, [window_id, this.url, "GET"]); } else this._fallback(); }; this._on_request_resource_id = function(status, message) { if (status == SUCCESS && this._resource_manager.requestGetResource) { // resource_id -> getResource => _on_request_get_resource var RESOURCE_ID = 0; this.resource_id = message[RESOURCE_ID]; this._request_get_resource(); } else this._fallback(); }; this._request_get_resource = function() { var transport_type = TRANSPORT_OFF; if (this.type) { // resource of known type-> call with appropriate transport mode. var response_type = cls.ResourceUtil.type_to_content_mode(this.type); var transport_type = response_type == "datauri" ? TRANSPORT_DATA_URI : TRANSPORT_STRING; } var tag = window.tag_manager.set_callback(this, this._on_request_get_resource); this._resource_manager.requestGetResource(tag, [this.resource_id, [transport_type, DECODE_TRUE, SIZE_LIMIT]]); }; this._on_request_get_resource = function(status, message) { if (status == SUCCESS && this._retries < MAX_RETRIES) { var resource_data = new cls.ResourceManager["1.2"].ResourceData(message); if (resource_data.content) { // content -> mock a cls.NetworkLoggerEntry and instanciate a cls.ResourceInfo this.requests_responses = [{responsebody: resource_data}]; var resource_info = new cls.ResourceInfo(this); if (!this.resource_info) this.resource_info = resource_info; else this.resource_info.data = resource_info.data; // broadcast that we got payload of the resource window.messages.post("resource-request-resource", {resource_id: this.resource_id}); // aaaand callback this._callback(this.resource_info, this._data); } else { // no content -> guess the type and request using the appropriate transport mode this.type = cls.ResourceUtil.guess_type(resource_data.mimeType, this.extension); this._request_get_resource(); this._retries++; } } else this._fallback(); }; this._init(url, callback, data, resource_info); }; cls.ResourceRequest.prototype = new URIPrototype("url");
javascript
{"tauCharts.dark.min.css":"<KEY>,"tauCharts.default.min.css":"<KEY>,"tauCharts.min.css":"<KEY>,"tauCharts.min.js":"sha512-USvTuIo8snVSt4OfYYFZ6KBqLAIeOKm/LN6nJeNXCK+3rchwwqZ/pHEnoSD4RxBhE6+fFvA9LNxjA9ut2n1ikQ==","tauCharts.normalize.min.css":"sha5<KEY>}
json
package k8s import ( "context" "github.com/go-logr/logr" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/util/retry" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" ) type APIObject interface { metav1.Object runtime.Object } type FinalizerManager interface { AddFinalizers(ctx context.Context, obj APIObject, finalizers ...string) error RemoveFinalizers(ctx context.Context, obj APIObject, finalizers ...string) error } func NewDefaultFinalizerManager(k8sClient client.Client, log logr.Logger) FinalizerManager { return &defaultFinalizerManager{ k8sClient: k8sClient, log: log, } } type defaultFinalizerManager struct { k8sClient client.Client log logr.Logger } func (m *defaultFinalizerManager) AddFinalizers(ctx context.Context, obj APIObject, finalizers ...string) error { return retry.RetryOnConflict(retry.DefaultBackoff, func() error { if err := m.k8sClient.Get(ctx, NamespacedName(obj), obj); err != nil { return err } oldObj := obj.DeepCopyObject() needsUpdate := false for _, finalizer := range finalizers { if !HasFinalizer(obj, finalizer) { controllerutil.AddFinalizer(obj, finalizer) needsUpdate = true } } if !needsUpdate { return nil } return m.k8sClient.Patch(ctx, obj, client.MergeFromWithOptions(oldObj, client.MergeFromWithOptimisticLock{})) }) } func (m *defaultFinalizerManager) RemoveFinalizers(ctx context.Context, obj APIObject, finalizers ...string) error { return retry.RetryOnConflict(retry.DefaultBackoff, func() error { if err := m.k8sClient.Get(ctx, NamespacedName(obj), obj); err != nil { return err } oldObj := obj.DeepCopyObject() needsUpdate := false for _, finalizer := range finalizers { if HasFinalizer(obj, finalizer) { controllerutil.RemoveFinalizer(obj, finalizer) needsUpdate = true } } if !needsUpdate { return nil } return m.k8sClient.Patch(ctx, obj, client.MergeFromWithOptions(oldObj, client.MergeFromWithOptimisticLock{})) }) } // HasFinalizer tests whether k8s object has specified finalizer func HasFinalizer(obj metav1.Object, finalizer string) bool { f := obj.GetFinalizers() for _, e := range f { if e == finalizer { return true } } return false }
go
<filename>src/hooks/useExhibitionImageUrl.tsx import { useState } from "react"; import api from "@afes-website/docs"; import { useAspidaClient } from "hooks/auth/useAuth"; let imageIds: { [exhId: string]: string } | null = null; let imageIdsFetchPromise: Promise<unknown> | null = null; const useExhibitionImageUrl = ( exhId: string, query?: { size?: "s" | "m" } ): string | null => { const aspida = useAspidaClient(); const [fetchStatus, setFetchStatus] = useState< "beforeInit" | "waiting" | "ready" >("beforeInit"); switch (fetchStatus) { case "beforeInit": if (!imageIdsFetchPromise) { imageIdsFetchPromise = api(aspida) .exhibitions.$get() .then((allStatus) => { imageIds = Object.fromEntries( Object.entries(allStatus.exhibition).map(([id, status]) => [ id, status.info.thumbnail_image_id, ]) ); }); } imageIdsFetchPromise.then(() => { setFetchStatus("ready"); }); setFetchStatus("waiting"); return null; case "waiting": return null; case "ready": if (!imageIds || !Object.prototype.hasOwnProperty.call(imageIds, exhId)) return null; return api(aspida).images._id(imageIds[exhId]).$path({ query }); } }; export default useExhibitionImageUrl;
typescript
Want to know why you couldn't use your Gmail account Tuesday? Blame the outage on overworked routers that decided to go on strike. At least that's what Google engineer (and VP) Ben Treynor wrote in a blog post Tuesday night, explaining in relatively clear engineer-ese why Gmail went down for about 100 minutes earlier that afternoon. That's good to know. Not because I know anything about configuring request routers to keep them from acting like French factory workers, but because Google is letting me know clearly what happened, what they did and how they will take steps to keep it from happening in the future. That's the kind of transparency one wants from a firm that is asking people to use its cloud computing services -- Gmail and Google Docs -- as replacements for Microsoft's desktop software. Update: In response to a reader's question, Wired.com asked Google if a hack or an attack was involved. According to a Google spokesman, "There was no attack or hack. They got overloaded because we had slightly underestimated the the load which some recent updates placed on them." And if you are one of the Enterprise or Education customers who pays Google for their app service, you just got three free days of service added to your account, on account of Gmail failing to deliver its promised 99.9 percent uptime every month. At least that's what a Google spokesperson told Wired.com. (For those of you doing math at home, Google's 100 minute outage means that even if Gmail is perfect for the rest of September, the best performance it can get is 99.8 percent. That falls below the Service Level Agreement Google promises to its top-level customers.) Gmail's last major outage was in May, and it had a number of outages in 2008. But Google says its service is still far more reliable than corporate networks, many of which run Microsoft Exchange servers. Official Gmail Blog: More on today's Gmail issue. See Also:
english
/* State Pattern Code Example - This example descirbes the time for someone to wake up depending if it is a weekday or weekend <NAME> */ #include <iostream> #include <typeinfo> using namespace std; class Context; //All methods that all concrete states should implement class State { protected: Context *_context; public: virtual ~State() { } void setContext(Context *context) { this->_context = context; } virtual void handle1() = 0; virtual void handle2() = 0; }; class Context { private: State *_state; public: //Context allows switching state at runtime Context(State *state) : _state(nullptr) { this->transitionTo(state); } ~Context() { delete _state; } //Outputs the transition to console and switches states void transitionTo(State *state) { cout << "Context: Transition to " << typeid(*state).name() << ".\n"; if (this->_state != nullptr) delete this->_state; this->_state = state; this->_state->setContext(this); } void request1() { this->_state->handle1(); } void request2() { this->_state->handle2(); } }; /* * Concrete State implementations */ class Weekday : public State { public: //Switch states after run void handle1() override; //Keep Current State after run void handle2() override { cout << "Weekday handles request2.\n"; //Here to illustrate the changes in state cout << " Today is a Weekday, you need to wake up at 7:00am and go to sleep by 11:00pm.\n"; } }; class Weekend : public State { public: void handle1() override { cout << "Weekend handles request1.\n"; //Here to illustrate the changes in state cout << " Today is a Weekend, wake up and go to sleep when you want.\n"; } void handle2() override { cout << "Weekend handles request2.\n"; //Here to illustrate the changes in state cout << " Today is a weekend, wake up when you want but you need to go to sleep by 11:00pm. Tomorrow is a Weekday.\n"; cout << "Weekend wants to change the state of the context.\n"; //Here to illustrate the changes in state this->_context->transitionTo(new Weekday); } }; void Weekday::handle1() { cout << "Weekday handles request1.\n"; //Here to illustrate the changes in state cout << " Today is a weekday, you need to wake up at 7:00am and go to sleep whenever. Tomorrow is the weekend.\n"; cout << "Weekday wants to change the state of the context.\n"; //Here to illustrate the changes in state this->_context->transitionTo(new Weekend); } //Function that starts everything and would process the state requests void clientCode() { Context *context = new Context(new Weekend); //Events that would change the object's internal state (Hard coded to start on a Sunday and goes until the next Sunday) context->request2(); //Sunday - Switches to Weekday context->request2(); //Monday context->request2(); //Tuesday context->request2(); //Wednesday context->request2(); //Thursday context->request1(); //Friday - Switches to Weekend context->request1(); //Saturday context->request2(); //Sunday - Switches to Weekday delete context; } int main() { clientCode(); return 0; }
cpp
Madrid, Sep 22 (IANS) Villarreal scored first and held on for a 1-1 draw against Real Madrid to snap the Spanish football giants' 16-match winning streak in La Liga. The result left Madrid tied with the 2010-11 FC Barcelona squad for most consecutive La Liga wins, reports Efe. Real Madrid dominated from the onset and throughout the second half of the match here on Wednesday, but its inability to capitalise on six corner kicks in 10 minutes in the first half and several other opportunities proved costly. Star strikers Karim Benzema and Cristiano Ronaldo are also still trying to find their groove after recovering from hip and knee injuries, respectively, and were not in top form at Santiago Bernabeu stadium. Villarreal still needed some luck and got it when defender Raphael Varane's botched step over left the ball at the feet of Manu Trigueros, whose shot from close range struck Sergio Ramos' arm in the 45th minute. The referee awarded a penalty, which Bruno Soriano converted in style by chipping the ball into the middle of the goal as goalkeeper Kiko Casilla dived to the left. Real Madrid got the equaliser just four minutes into the second half through a header by Ramos. Madrid then went all-out for the win over the final 40 minutes, with Dani Carvajal creating pressure down the right side and James Rodriguez sending in threatening crosses from the left. But to no avail as they had to settle for a draw that ended their La Liga winning streak at 16 games. They are however still at the top of the table with 13 points after five matches. "These are mistakes that can happen in football," Zidane said afterward of Varane's defensive blunder. "We didn't draw because of the error we made defensively, but more because of the first half as a whole. We were less engaged at the start, because the second half was phenomenal. " "You can't always get the three points at the last minute. We weren't strong enough in the first half. In the second, we had chances and I can't blame my players for anything. I'm pleased with what we're doing. We're not going to talk anymore about the record," he added. With the draw, Villarreal is now in the sixth place with nine points.
english
What does VJC mean? The above is one of VJC meanings. You can download the image below to print or share it with your friends through Twitter, Facebook, Google or Pinterest. If you are a webmaster or blogger, feel free to post the image on your website. The VJC may have other definitions. Please scroll down to see its definitions in English, and other five meanings in your language. Meaning of VJCThe following image presents one of the definitions of VJC in English language. You can download the image file in PNG format for offline use or send image of VJC definition to your friends by email.
english
package com.gnomon.api.models.enums; public enum RoleName { USER, ADMIN }
java
const { app, BrowserWindow } = require("electron"); const path = require("path"); const url = require("url"); let win, serve; const args = process.argv.slice(1); serve = args.some(val => val === '--serve'); // Security warnings from hot-reload process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'; function createWindow() { const { screen } = require("electron"); const electronScreen = screen; const size = electronScreen.getPrimaryDisplay().workAreaSize; win = new BrowserWindow({ x: 0, y: 0, width: size.width, height: size.height }); if (serve) { // load from web server require('electron-reload')(__dirname, { electron: require(`${__dirname}/node_modules/electron`) }); win.loadURL('http://localhost:4200'); win.webContents.openDevTools() } else { // load the dist folder from Angular win.loadURL( url.format({ pathname: path.join(__dirname, `/dist/index.html`), protocol: "file:", slashes: true }) ); } win.on("closed", () => { win = null; }); } try { app.on("ready", createWindow); // on macOS, closing the window doesn't quit the app app.on("window-all-closed", () => { if (process.platform !== "darwin") { app.quit(); } }); // initialize the app's main window app.on("activate", () => { if (win === null) { createWindow(); } }); } catch (e) { throw e; }
javascript
<filename>data/spack-issues/issue-12648.json { "body": "There are multiple places inside /lib/spack/spack/relocate.py where strings and bytes are concatenated, which is not allowed in Python 3. For instance, if you try to install a package from binary cache (`spack buildcache install <spec-available-at-buildcache>`), using Spack+Py3, the process fails with an error from line 323 of lib/spack/spack/relocate.py complaining about this. There are at least a few other places in that file which cause problems during installation from binary cache with python3.", "user": "eugeneswalker", "url": "https://api.github.com/repos/spack/spack/issues/12648", "updated_at": "2019-10-14 16:09:34", "created_at": "2019-08-29 17:29:55", "closed_at": "2019-10-14 16:09:34", "state": "closed", "title": "Binary Relocation in Py3: string + byte concatenation error", "number": 12648, "milestone": null, "labels": [ "bug", "python3", "buildcache" ], "id": 487086496, "html_url": "https://github.com/spack/spack/issues/12648", "assignees": [], "comments": 9 }
json
Putin should say, not only Muhammad Paigambar but insulting any religious places of faith cannot be freedom of expression; because religious fanatics are attacking the religious freedom and sentiments of Sikhs, Christians as well as Hindus. This also should be strongly opposed by the whole world. Moscow (Russia) – Insulting Muhammad Paigambar cannot be the freedom of expression. Sentiments of those who respect Islam are hurt. We should not violate religious freedom in the name of freedom of art. Insulting other’s religious faith gives rise to fundamentalism. The incident in Paris is a very good example of its kind, stated Russian President Vladimir Putin in the Press Conference. When ‘Charlie Hebdo’ magazine had published Muhammad Paigambar’s cartoon in 2015 in France, its office was attacked then in which 13 people were killed. Pakistan’s Prime Minister has welcomed this comment by Putin.
english
वाक्य में प्रयोग 1 - जंगल में मंगल माना जाने वाला संजय वन किस नेशनल हाईवे पर स्थित है जिसके एक और गुलाबों का पार्क है वहीं कैफेटेरिया के पीछे एक कृत्रिम झील , उस से आगे एक डीयर पार्क तथा जगह - जगह विश्राम स्थल बने है ? वाक्य में प्रयोग 2 - प्रसिद्ध राजस्थानी नर्तकी गुलाबों का सम्बन्ध किस नृत्य से है ? Hindi Dictionary. Devnagari to roman Dictionary. हिन्दी भाषा का सबसे बड़ा शब्दकोष। देवनागरी और रोमन लिपि में। एक लाख शब्दों का संकलन। स्थानीय और सरल भाषा में व्याख्या। Gulabon के पर्यायवाची: गुलाब के फूलो , Gulabon, Gulabon meaning in English. Gulabon in english. Gulabon in english language. What is meaning of Gulabon in English dictionary? Gulabon ka matalab english me kya hai (Gulabon का अंग्रेजी में मतलब ). Gulabon अंग्रेजी मे मीनिंग. English definition of Gulabon. English meaning of Gulabon. Gulabon का मतलब (मीनिंग) अंग्रेजी में जाने। Gulabon kaun hai? Gulabon kahan hai? Gulabon kya hai? Gulabon kaa arth. Hindi to english dictionary(शब्दकोश).गुलाबों को अंग्रेजी में क्या कहते हैं. इस श्रेणी से मिलते जुलते शब्द: ये शब्द भी देखें: synonyms of Gulabon in Hindi Gulabon ka Samanarthak kya hai? Gulabon Samanarthak, Gulabon synonyms in Hindi, Paryay of Gulabon, Gulabon ka Paryay, In “gkexams” you will find the word synonym of the Gulabon And along with the derivation of the word Gulabon is also given here for your enlightenment. Paryay and Samanarthak both reveal the same expressions. What is the synonym of Gulabon in Hindi?
english
import pytest from datacube.utils.geometry import box from datacube_ows.cube_pool import cube from datacube_ows.ogc_utils import local_solar_date_range from datacube_ows.ows_configuration import get_config from datacube_ows.mv_index import MVSelectOpts, mv_search_datasets def test_full_layer(): cfg = get_config() lyr = list(cfg.product_index.values())[0] with cube() as dc: sel = mv_search_datasets(dc.index, MVSelectOpts.COUNT, layer=lyr) assert sel > 0 class MockGeobox: def __init__(self, geom): if geom.crs != "EPSG:4326": geom = geom.to_crs("EPSG:4326") self.geographic_extent = geom def test_time_search(): cfg = get_config() lyr = list(cfg.product_index.values())[0] time = lyr.ranges["times"][-1] geom = box( lyr.bboxes["EPSG:4326"]["left"], lyr.bboxes["EPSG:4326"]["bottom"], lyr.bboxes["EPSG:4326"]["right"], lyr.bboxes["EPSG:4326"]["top"], "EPSG:4326", ) time_rng = local_solar_date_range(MockGeobox(geom), time) with cube() as dc: sel = mv_search_datasets( dc.index, MVSelectOpts.COUNT, times=[time_rng], layer=lyr ) assert sel > 0 def test_count(): cfg = get_config() lyr = list(cfg.product_index.values())[0] with cube() as dc: count = mv_search_datasets(dc.index, MVSelectOpts.COUNT, layer=lyr) ids = mv_search_datasets(dc.index, MVSelectOpts.IDS, layer=lyr) assert len(ids) == count def test_datasets(): cfg = get_config() lyr = list(cfg.product_index.values())[0] with cube() as dc: dss = mv_search_datasets(dc.index, MVSelectOpts.DATASETS, layer=lyr) ids = mv_search_datasets(dc.index, MVSelectOpts.IDS, layer=lyr) assert len(ids) == len(dss) for ds in dss: assert str(ds.id) in ids def test_extent_and_spatial(): cfg = get_config() lyr = list(cfg.product_index.values())[0] layer_ext_bbx = ( lyr.bboxes["EPSG:4326"]["left"], lyr.bboxes["EPSG:4326"]["bottom"], lyr.bboxes["EPSG:4326"]["right"], lyr.bboxes["EPSG:4326"]["top"], ) small_bbox = pytest.helpers.enclosed_bbox(layer_ext_bbx) layer_ext_geom = box( layer_ext_bbx[0], layer_ext_bbx[1], layer_ext_bbx[2], layer_ext_bbx[3], "EPSG:4326", ) small_geom = box( small_bbox[0], small_bbox[1], small_bbox[2], small_bbox[3], "EPSG:4326" ) with cube() as dc: all_ext = mv_search_datasets( dc.index, MVSelectOpts.EXTENT, geom=layer_ext_geom, layer=lyr ) small_ext = mv_search_datasets( dc.index, MVSelectOpts.EXTENT, geom=small_geom, layer=lyr ) assert layer_ext_geom.contains(all_ext) assert small_geom.contains(small_ext) assert all_ext.contains(small_ext) assert small_ext.area < all_ext.area all_count = mv_search_datasets( dc.index, MVSelectOpts.COUNT, geom=layer_ext_geom, layer=lyr ) small_count = mv_search_datasets( dc.index, MVSelectOpts.COUNT, geom=small_geom, layer=lyr ) assert small_count <= all_count
python
const fs = require('fs') const { readFileSync, writeFileSync, mkdirSync } = fs const { unlink, readdir, access, mkdir } = fs.promises const { F_OK } = fs.constants const { dirname, join } = require('path') const { getIdentifier, createIdentifier, identifierKey } = require('./lib/minidump-io') class FileStore { constructor (apiKey, storageDir, crashDir) { const base = join(storageDir, 'bugsnag', apiKey) const isMac = process.platform === 'darwin' this._paths = { events: join(base, 'events'), sessions: join(base, 'sessions'), runinfo: join(base, 'runinfo'), device: join(base, 'device.json'), minidumps: join(crashDir, isMac ? 'completed' : 'reports') } } // Create directory layout async init () { await mkdir(this._paths.events, { recursive: true }) await mkdir(this._paths.sessions, { recursive: true }) await mkdir(this._paths.runinfo, { recursive: true }) } getPaths () { return this._paths } async listMinidumps () { const basepath = this._paths.minidumps return readdir(basepath, { withFileTypes: true }) .then(async entries => { const minidumps = entries .filter(entry => entry.isFile() && entry.name.match(/\.dmp$/)) .map(async entry => { const minidumpPath = join(basepath, entry.name) const eventPath = await getIdentifier(minidumpPath) .then(async id => { const path = this.getEventInfoPath(id) return await fileExists(path) ? path : null }) .catch(() => null) return new Minidump(minidumpPath, eventPath) }) return Promise.all(minidumps) }) .catch((e) => { console.log(e) return [] }) } getEventInfoPath (appRunID) { return join(this._paths.runinfo, appRunID) } async getAppRunID (minidumpPath) { return getIdentifier(minidumpPath) } async deleteMinidump (minidump) { await unlink(minidump.minidumpPath) if (minidump.eventPath) { await unlink(minidump.eventPath) } } async clearEventInfoPaths () { const base = this._paths.runinfo await readdir(base, { withFileTypes: true }) .then(async entries => { await Promise.all(entries .filter(e => e.isFile()) .map(async e => unlink(join(base, e.name)))) }) .catch(() => {}) } /* * Loads persisted device info. If none is present, it generates an identifier * for the device and persists it prior to returning device info. */ getDeviceInfo () { let device try { // Do this one sync routine upon startup because if we use the async fs operations, // it doesn't get scheduled until at least 500ms after the process has started. // Bugsnag needs the device ID before sending any events or sessions so it's // important we get it in a timely manner const contents = readFileSync(this._paths.device) device = JSON.parse(contents) } catch (e) { // either the file could not be read or wasn't valid JSON } try { // attempt to create or update the device.json file with // a) the device data we retrieved or // b) a new auto generated id return this.setDeviceInfo(device) } catch (e) { // in the event of a failure we don't want to return the device // id we have in memory because it won't have been persisted, // and so won't be stable across app launches return {} } } setDeviceInfo (device = {}) { if (!device.id) { device.id = createIdentifier() } mkdirSync(dirname(this._paths.device), { recursive: true }) writeFileSync(this._paths.device, JSON.stringify(device)) return device } createAppRunMetadata () { return { [identifierKey]: createIdentifier() } } } class Minidump { constructor (minidumpPath, eventPath) { this.minidumpPath = minidumpPath this.eventPath = eventPath } } const fileExists = async (filepath) => { try { await access(filepath, F_OK) return true } catch (e) { return false } } module.exports = { FileStore }
javascript
/******************************************************************************* * Caleydo - Visualization for Molecular Biology - http://caleydo.org * Copyright (c) The Caleydo Team. All rights reserved. * Licensed under the new BSD license, available at http://caleydo.org/license ******************************************************************************/ package org.caleydo.view.tourguide.api.score; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import org.caleydo.core.data.virtualarray.group.Group; import org.caleydo.core.util.base.DefaultLabelProvider; import org.caleydo.core.util.color.Color; import org.caleydo.view.tourguide.spi.adapter.ITourGuideDataMode; import org.caleydo.view.tourguide.spi.algorithm.IComputeElement; import org.caleydo.view.tourguide.spi.score.IScore; import org.caleydo.vis.lineup.model.mapping.PiecewiseMapping; import com.google.common.collect.Iterators; /** * marker for a default multi score * * @author <NAME> * */ public class MultiScore extends DefaultLabelProvider implements IScore, Iterable<IScore> { private final Collection<IScore> children = new ArrayList<>(); private final Color color; private final Color bgColor; /** * the combined modi for creating a combined rank column */ private final int combinedType; public MultiScore(String label, Color color, Color bgColor) { this(label, color, bgColor, 0); } public MultiScore(String label, Color color, Color bgColor, int combinedType) { setLabel(label); this.color = color; this.bgColor = bgColor; this.combinedType = combinedType; } /** * @return the combinedType, see {@link #combinedType} */ public int getCombinedType() { return combinedType; } /** * @param createJaccardME */ public void add(IScore score) { children.add(score); } @Override public Iterator<IScore> iterator() { return Iterators.unmodifiableIterator(children.iterator()); } @Override public PiecewiseMapping createMapping() { return null; } @Override public String getAbbreviation() { return ""; } @Override public String getDescription() { return ""; } @Override public Color getBGColor() { return bgColor; } @Override public Color getColor() { return color; } @Override public final double apply(IComputeElement elem, Group g) { return Double.NaN; } @Override public boolean supports(ITourGuideDataMode mode) { for (IScore s : children) { if (!s.supports(mode)) return false; } return true; } public Collection<? extends IScore> getChildren() { return children; } }
java
Sri Reddy In Begging Mode For KTR’s Appointment! Actress Sri Reddy who came to limelight with the casting couch and abuse on Pawan Kalyan has completely changed her route. After days of crying through her Facebook posts, claiming that she is forced to stay indoors for security reasons, the controversial actress has shifted her attention to Telangana IT Minister KTR. She has already put a couple of Facebook posts, and Tweets through her official social networking handles, requesting the appointment of Telangana IT Minister KTR to discuss the casting couch, and the difficulties she is facing. In her latest post, she once again requested KTR for his appointment. “Please kindly try to understand sir. Why are you silent about the fate of women sir in the Telugu film industry subjected to sexual harassment, when you seem to talk many things about women empowerment… where is empowerment without adequate protection, sir… please, we need ur appointment” [sic], read her message. She left the message to KTR through WhatsApp at around 11:21 pm last night, and share the same via a screenshot on Facebook. No one representing KTR, or the Telangana Government has responded to this.
english
<filename>internal/config/config.go package config import ( "encoding/json" "fmt" "io" "net/http" "strings" "github.com/xdrm-io/aicra/validator" ) // Server definition type Server struct { Validators []validator.Type Services []*Service } // Parse a configuration into a server. Server.Validators must be set beforehand // to make datatypes available when checking and formatting the configuration. func (s *Server) Parse(r io.Reader) error { err := json.NewDecoder(r).Decode(&s.Services) if err != nil { return fmt.Errorf("%s: %w", ErrRead, err) } err = s.validate() if err != nil { return fmt.Errorf("%s: %w", ErrFormat, err) } return nil } // validate all services func (s Server) validate(datatypes ...validator.Type) error { for _, service := range s.Services { err := service.validate(s.Validators...) if err != nil { return fmt.Errorf("%s '%s': %w", service.Method, service.Pattern, err) } } if err := s.collide(); err != nil { return fmt.Errorf("%s: %w", ErrFormat, err) } return nil } // Find a service matching an incoming HTTP request func (s Server) Find(r *http.Request) *Service { for _, service := range s.Services { if matches := service.Match(r); matches { return service } } return nil } // collide returns if there is collision between any service for the same method // and colliding paths. Note that service path collision detection relies on // validators: // - example 1: `/user/{id}` and `/user/articles` will not collide as {id} is // an int and "articles" is not // - example 2: `/user/{name}` and `/user/articles` will collide as {name} is // a string so as "articles" // - example 3: `/user/{name}` and `/user/{id}` will collide as {name} and {id} // cannot be checked against their potential values func (s *Server) collide() error { length := len(s.Services) // for each service combination for a := 0; a < length; a++ { for b := a + 1; b < length; b++ { aService := s.Services[a] bService := s.Services[b] if aService.Method != bService.Method { continue } aURIParts := SplitURL(aService.Pattern) bURIParts := SplitURL(bService.Pattern) if len(aURIParts) != len(bURIParts) { continue } err := checkURICollision(aURIParts, bURIParts, aService.Input, bService.Input) if err != nil { return fmt.Errorf("(%s '%s') vs (%s '%s'): %w", aService.Method, aService.Pattern, bService.Method, bService.Pattern, err) } } } return nil } // check if uri of services A and B collide func checkURICollision(uriA, uriB []string, inputA, inputB map[string]*Parameter) error { var errors = []error{} // for each part for pi, aPart := range uriA { bPart := uriB[pi] // no need for further check as it has been done earlier in the validation process aIsCapture := len(aPart) > 1 && aPart[0] == '{' bIsCapture := len(bPart) > 1 && bPart[0] == '{' // both captures -> as we cannot check, consider a collision if aIsCapture && bIsCapture { errors = append(errors, fmt.Errorf("%w (path %s and %s)", ErrPatternCollision, aPart, bPart)) continue } // no capture -> check strict equality if !aIsCapture && !bIsCapture { if aPart == bPart { errors = append(errors, fmt.Errorf("%w (same path '%s')", ErrPatternCollision, aPart)) continue } } // A captures B -> check type (B is A ?) if aIsCapture { input, exists := inputA[aPart] // fail if no type or no validator if !exists || input.Validator == nil { errors = append(errors, fmt.Errorf("%w (invalid type for %s)", ErrPatternCollision, aPart)) continue } // fail if not valid if _, valid := input.Validator(bPart); valid { errors = append(errors, fmt.Errorf("%w (%s captures '%s')", ErrPatternCollision, aPart, bPart)) continue } // B captures A -> check type (A is B ?) } else if bIsCapture { input, exists := inputB[bPart] // fail if no type or no validator if !exists || input.Validator == nil { errors = append(errors, fmt.Errorf("%w (invalid type for %s)", ErrPatternCollision, bPart)) continue } // fail if not valid if _, valid := input.Validator(aPart); valid { errors = append(errors, fmt.Errorf("%w (%s captures '%s')", ErrPatternCollision, bPart, aPart)) continue } } errors = append(errors, nil) } // at least 1 URI part not matching -> no collision var firstError error for _, err := range errors { if err != nil && firstError == nil { firstError = err } if err == nil { return nil } } return firstError } // SplitURL without empty sets func SplitURL(url string) []string { trimmed := strings.Trim(url, " /\t\r\n") split := strings.Split(trimmed, "/") // remove empty set when empty url if len(split) == 1 && len(split[0]) == 0 { return []string{} } return split }
go
WWE have announced that Brock Lesnar will be on Monday Night RAW next week. The WWE Champion has not been on WWE TV for some time and will be making his return. Along with Lesnar, his advocate, Paul Heyman will also be returning to RAW. Rumors suggest that Lesnar will be defending his championship at Royal Rumble next month and the return next week could be a buildup for that match. Cain Velasquez was first rumored to be his opponent at the pay-per-view but he has now been pencilled in for the Royal Rumble match. Wrestling Observer Newsletter have reported that the opponent at Royal Rumble for Brock Lesnar could be one of Seth Rollins, Drew McIntyre or Erick Rowan. Bobby Lashley has also revealed that he would love to face Lesnar in 2020, but with him involved in the storyline with Lana and Rusev (maybe even Liv Morgan now), it does not look like he will get his hands on the WWE Champion at Royal Rumble. Lesnar won the title from Kofi Kingston back in October and has defended it just once. The match was at Survivor Series and he managed to pick up the win despite Rey Mysterio and his son teaming up to attack the champion.
english
<gh_stars>10-100 { "id" : "44dcf537-5f47-4080-8028-73acdb5dd5e8", "name" : "api_v1_data", "request" : { "url" : "/api/v1/data", "method" : "PUT", "headers" : { "Authorization" : { "equalTo" : "<KEY>" } }, "bodyPatterns" : [ { "equalToJson" : "{\"name\":\"/d0c80776-bcf7-45e0-8737-b48ad688d7fb\",\"value\":{\"0cd1c805-6541-4b7a-8f3f-fc9c32c93d31\":\"39374b3f-81f4-41d2-96e4-ed720282152c\"},\"type\":\"json\"}", "ignoreArrayOrder" : true, "ignoreExtraElements" : true } ] }, "response" : { "status" : 200, "body" : "{\"type\":\"json\",\"version_created_at\":\"2019-10-04T08:41:50Z\",\"id\":\"bb4ba4bf-b2a7-415d-a0de-4a768e54c0a3\",\"name\":\"/d0c80776-bcf7-45e0-8737-b48ad688d7fb\",\"value\":{\"0cd1c805-6541-4b7a-8f3f-fc9c32c93d31\":\"39374b3f-81f4-41d2-96e4-ed720282152c\"}}", "headers" : { "X-Content-Type-Options" : "nosniff", "X-XSS-Protection" : "1; mode=block", "Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate", "Pragma" : "no-cache", "Expires" : "0", "Strict-Transport-Security" : "max-age=31536000 ; includeSubDomains", "X-Frame-Options" : "DENY", "Content-Type" : "application/json;charset=UTF-8", "Date" : "Fri, 04 Oct 2019 08:41:49 GMT" } }, "uuid" : "44dcf537-5f47-4080-8028-73acdb5dd5e8", "persistent" : true, "insertionIndex" : 17 }
json
use gw_common::{ builtins::CKB_SUDT_ACCOUNT_ID, ckb_decimal::CKBCapacity, h256_ext::H256Ext, state::State, H256, }; use gw_traits::CodeStore; use gw_types::{ offchain::RollupContext, packed::{Script, WithdrawalRequestExtra}, prelude::*, U256, }; use tracing::instrument; use crate::{ constants::MAX_WITHDRAWAL_SIZE, error::{AccountError, WithdrawalError}, sudt::build_l2_sudt_script, utils::build_withdrawal_cell_output, Error, }; use super::chain_id::ChainIdVerifier; pub struct WithdrawalVerifier<'a, S> { state: &'a S, rollup_context: &'a RollupContext, } impl<'a, S: State + CodeStore> WithdrawalVerifier<'a, S> { pub fn new(state: &'a S, rollup_context: &'a RollupContext) -> Self { Self { state, rollup_context, } } /// Verify withdrawal request /// Notice this function do not perform signature check #[instrument(skip_all)] pub fn verify( &self, withdrawal: &WithdrawalRequestExtra, asset_script: Option<Script>, ) -> Result<(), Error> { // check withdrawal size if withdrawal.as_slice().len() > MAX_WITHDRAWAL_SIZE { return Err(WithdrawalError::ExceededMaxWithdrawalSize { max_size: MAX_WITHDRAWAL_SIZE, withdrawal_size: withdrawal.as_slice().len(), } .into()); } let raw = withdrawal.request().raw(); // check chain_id ChainIdVerifier::new(self.rollup_context.rollup_config.chain_id().unpack()) .verify(raw.chain_id().unpack())?; let account_script_hash: H256 = raw.account_script_hash().unpack(); let sudt_script_hash: H256 = raw.sudt_script_hash().unpack(); let amount: u128 = raw.amount().unpack(); let capacity: u64 = raw.capacity().unpack(); let fee = raw.fee().unpack(); let registry_address = self .state .get_registry_address_by_script_hash(raw.registry_id().unpack(), &account_script_hash)? .ok_or(Error::Account(AccountError::UnknownAccount))?; // check capacity (use dummy block hash and number) build_withdrawal_cell_output( self.rollup_context, withdrawal, &H256::one(), 1, asset_script, )?; // find user account let id = self .state .get_account_id_by_script_hash(&account_script_hash)? .ok_or(AccountError::UnknownAccount)?; // find Simple UDT account // check nonce let expected_nonce = self.state.get_nonce(id)?; let actual_nonce: u32 = raw.nonce().unpack(); if actual_nonce != expected_nonce { return Err(WithdrawalError::Nonce { expected: expected_nonce, actual: actual_nonce, } .into()); } // check CKB balance let ckb_balance = self .state .get_sudt_balance(CKB_SUDT_ACCOUNT_ID, &registry_address)?; let required_ckb_capacity = CKBCapacity::from_layer1(capacity) .to_layer2() .saturating_add(fee.into()); if required_ckb_capacity > ckb_balance { return Err(WithdrawalError::Overdraft.into()); } let l2_sudt_script_hash = build_l2_sudt_script(self.rollup_context, &sudt_script_hash).hash(); let sudt_id = self .state .get_account_id_by_script_hash(&l2_sudt_script_hash.into())? .ok_or(AccountError::UnknownSUDT)?; // The sUDT id must not be equals to the CKB sUDT id if amount isn't 0 if sudt_id != CKB_SUDT_ACCOUNT_ID { // check SUDT balance // user can't withdrawal 0 SUDT when non-CKB sudt_id exists if amount == 0 { return Err(WithdrawalError::NonPositiveSUDTAmount.into()); } let balance = self.state.get_sudt_balance(sudt_id, &registry_address)?; if U256::from(amount) > balance { return Err(WithdrawalError::Overdraft.into()); } } else if amount != 0 { // user can't withdrawal CKB token via SUDT fields return Err(WithdrawalError::WithdrawFakedCKB.into()); } Ok(()) } }
rust
<gh_stars>1-10 {"books":[{"id":"2202","title":"History of Robinson Crusoe","description":"A 6-page digest of Defoe's famous work for young readers (Summary by <NAME>)<p>","url_text_source":"http:\/\/www.childrenslibrary.org\/icdl\/SaveBook?bookid=___hist_00360034&lang=English","language":"English","copyright_year":"1880","num_sections":"1","url_rss":"http:\/\/librivox.org\/rss\/2202","url_zip_file":"http:\/\/www.archive.org\/download\/history_crusoe_ds_librivox\/history_crusoe_ds_librivox_64kb_mp3.zip","url_project":"","url_librivox":"http:\/\/librivox.org\/the-history-of-robinson-crusoe\/","url_other":null,"totaltime":"0:15:56","totaltimesecs":956,"authors":[{"id":"19","first_name":"","last_name":"Anonymous","dob":"","dod":""}],"url_iarchive":"http:\/\/www.archive.org\/details\/history_crusoe_ds_librivox","sections":[{"id":"160135","section_number":"1","title":"History of Robinson Crusoe","listen_url":null,"language":"English","playtime":"956","file_name":null,"readers":[{"reader_id":"26","display_name":"<NAME>"}]}],"genres":[{"id":"37","name":"Action & Adventure"}],"translators":[]}]}
json
<gh_stars>0 # Generated by Django 3.1.2 on 2020-10-27 02:15 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Album', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100)), ('cover', models.ImageField(upload_to='covers')), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ], ), migrations.CreateModel( name='Artist', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ], ), migrations.CreateModel( name='Song', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ('album', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='songs.album')), ('artist', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='songs.artist')), ], ), ]
python
--- title: CRLException permalink: /Java/CRLException/ date: 2021-01-11 key: Java.C.CRLException category: Java tags: ['java se', 'java.security.cert', 'java.base', 'clase java', 'Java 1.2'] sidebar: nav: java --- ## Descripción {{site.data.Java.C.CRLException.description }} ## Sintaxis ~~~java public class CRLException extends GeneralSecurityException ~~~ ## Constructores * [CRLException()](/Java/CRLException/CRLException/) ## Ejemplo ~~~java {{ site.data.Java.C.CRLException.code}} ~~~ ## Artículos <ul> {%- for _ldc in site.data.Java.C.CRLException.ldc -%} <li> <a href="{{_ldc['url'] }}">{{ _ldc['nombre'] }}</a> </li> {%- endfor -%} </ul>
markdown
The Apple Watch dominates the smartwatch market and there is really no other competitor if you are looking for a watch with third party app support. Garmin and Samsung do well with GPS sports watches that have advanced activity tracking and offline music support. Huawei's latest watch, the Watch GT 2, offers many features and functions similar to Garmin and Samsung at a lower price, but it's not available for buyers in the US. The new Huawei Watch GT 2 is available for £179 for the 42mm model and £199 for the larger 46 mm model. For the past few weeks I've been testing the 46mm Watch GT 2 Sport variant and have been impressed by its capabilities and disappointed its not an option for US customers. The Watch GT 2 is a high quality wearable focused on 24/7 tracking with GPS capability. It also has a speaker onboard so like an Apple Watch or Samsung Galaxy watch you can carry on phone calls with a connected phone. It provides basic notifications from your smartphone and there is no third party app store to add apps so it's not really considered a smartwatch competitor. The Huawei Watch GT 2 I tested has a black stainless steel case with smooth black high quality plastic on the back. Huawei also has stainless steel and titanium grey stainless steel case options available. Its AMOLED display has a very high resolution for a smartwatch and it looks fantastic. The glass transitions into the front bezel that has large numbers that go from 0 to 22 with five tick marks between the even number count. I'm not sure what these numbers mean, other than giving it a sporty look. The back of the watch is mostly matte finish hard plastic with a center heart rate monitor area that protrudes up a bit. This center area also fits into the charging puck that has magnets for proper alignment and a USB-C port for connecting to a charging cable. On the right side there are two large buttons and an opening for the speaker. The Watch GT 2 has a mic and a speaker so you can have phone calls right from the watch with a connected phone placed somewhere else. The speaker can also play music if your headphones died or you wanted to work out with just some background music. It's a fairly loud and perfectly adequate speaker. The top button on the right side jumps to the app launcher and back to the watch face while pressing one on the bottom button takes you to the activity launcher. While on the workout launcher screen pressing the bottom button works to select items too. Holding in on the top button lets you restart or power off the watch. The silicone straps are comfortable for extended use and have quick release pins so you can swap them out for other 22mm bands as well. I used the included straps for the last couple of weeks I was using the Watch GT 2. The Huawei Watch GT 2 is powered by Huawei's own Lite OS, which is comparable to Samsung's Tizen OS in many respects. It works with both Android and iOS devices through its Huawei Health application. When you enable the watch, the watchface is the first screen shown. Press and hold on the display to view available watch faces. There are 14 available faces with some of them having options for basic customization. The selection is fairly comprehensive with both digital and analog options. You can also enable an always-on watch face, either an analog or digital option, but Huawei states this cuts the battery life in half. I used it for about a week, but went back to raise-to-wake in order to enjoy longer battery life. In addition to using the two hardware buttons for navigation, swipe left or right from the watch face to view the various available widgets. You can view your activity summary, music player, weather, stress summary, and heart rate summary. A swipe from left to right also takes you back when you are in one of the apps. Tapping on the display works to select the option. Scrolling up or down gets you through various lists. Swipe down on the display from the watch face to access quick settings. These include do not disturb, show time, find phone, alarm, and settings. The connection status, battery life remaining, date, and day of the week also appear under these quick controls. Within the settings are you will find more extensive options for earbuds, display, sounds, vibration strength, do not disturb, down button customization, system, and about. Within the workout screen, you will find options for running course (13 available types of running training are provided), outdoor run, indoor run, outdoor walk, indoor walk, outdoor cycle, indoor cycle, pool swim, open water swim, climb, hike, trail run, triathlon, elliptical, rowing machine, and other. Each of these workout options has a gear icon you can tap on to setup goals and reminders. Selecting a workout then initiates active heart rate monitoring and GPS navigation. Tap on the center of the workout screen and get started. By default ,you will hear audio prompts during your workout for passing through different intervals. To setup and use the Huawei Watch GT 2, you need to install the Huawei Health app on your Android or iOS smartwatch. There are four tabs in the app for health, exercise, devices, and profile. The health page shows you the latest steps and active time synced from your watch. Below this you will see small thumbnails for exercise, heart rate, sleep, weight, and stress. You can edit and rearrange these too. The exercise tab is used when you want to use your phone to track exercise in the Huawei Health app. The devices tab is where you manage your watch from your phone and also where you select and sync music from your phone to the watch. While the Watch GT 2 supports offline music playback via Bluetooth or the watch speaker, you need to load MP3 music onto the watch from your phone. There is no support for any subscription music service. Music playback worked well though even when the Watch GT 2 was placed on either one of my wrists. Tapping on the Watch GT 2 on the devices tab gives you access to several settings that you can enable or disable. These include Huawei TruSleep, activity reminders, continuous heart rate (necessary for REM sleep tracking), notifications, weather reports, and more. This is also where you initiate firmware updates. The profile tab contains your particular measurements, unit selector, heart rate limits, and data sharing options. Exercise data captured in Huawei Health can be synced to Google Fit and MyFitnessPal so that you can use it outside of the Huawei system. The Huawei Watch GT 2 is a very capable 24/7 activity tracker with some of the latest advanced sleep tracking capability we have seen from the latest Garmin, Polar, and Fitbit products (sleep score and REM). It even offers a smart wake option where you can choose a band around your alarm time to wake you during a light sleep cycle. Fitbit is adding this to its devices in December, but no one else has this option. It is a very well made watch that is comfortable for 24/7 wear and has a battery that has proven to last me a full week with a couple of GPS run tracking events during that week. It's nice to not have to charge up your watch daily while still having a lovely AMOLED high resolution display. The watch is not very useful for smartphone notifications as you can only view some notifications. No actions, even on basic text messaging, are supported with the watch. You can make and receive phone calls from the watch via a connected phone so that is useful at times. The GPS tracking was fairly accurate, when compared to other GPS watches, but there is not enough customization available for the screen you see while working out. It's a solid basic GPS sports watch and at the price it is selling for that is as much as you can really expect. It's too bad the Huawei Watch GT 2 isn't available in the US as it does offer a good option for those who want more than what Fitbit offers, but less than what Garmin offers.
english
Leg-spinner Wanindu Hasaranga registered figures of 5-13 as Sri Lanka crushed Oman by ten wickets in the 11th game of the ICC Cricket World Cup 2023 Qualifiers at the Queens Sports Club in Bulawayo on Friday (June 23). Bowling first after winning the toss in the Group B game, Sri Lanka bundled out Oman for a paltry 98 in 30.2 overs and chased down the target in 15 overs without losing a wicket. Apart from Hasaranga, pacer Lahiru Kumara also impressed with figures of 3-22. Kumara claimed the first wicket to fall, trapping Kashyap Prajapati lbw for 1. Aqib Ilyas (6) was the next to go, nicking Kasun Rajitha towards gully. Kumara then dismissed Oman captain Zeeshan Maqsood (1) and Mohammad Nadeem (0) to reduce the batting side to 20-4. Hasaranga then ran through the middle and lower order to complete an impressive five-fer. He had Jatinder Singh lbw for 21 as the opener missed his paddle. In the same over, Shoaib Khan (0) was cleaned up by a googly while attempting a slog sweep. Hasaranga had his third in the over when Jay Odedra (0) was also trapped leg before when he missed a googly. Naseem Khushi was run out for one after which Hasaranga helped himself to the wickets of Ayaan Khan, who top-scored with a defiant 41 and Bilal Khan (0). In their chase, Sri Lanka had it all easy, as Dimuth Karunaratne (61* off 51) and Pathum Nissanka (37* off 39) added 100 in quick time. Karunaratne struck eight fours and Nissanka five as Sri Lanka romped home in the World Cup 2023 Qualifiers clash. In the 12th game of the World Cup 2023 Qualifiers at the Bulawayo Athletic Club, Scotland eased their way to a 111-run win over United Arab Emirates. After Scotland were asked to bat by UAE, captain Richie Berrington led from the front, hammering 127 off 136. Scotland were off to a poor start, as Junaid Siddique dismissed openers Christopher McBride (5) and Matthew Cross (13). Brandon McMullen (4) and Tomas Mackintosh (11) also fell cheaply as Scotland found themselves in trouble at 48-4. Berrington and Michael Leask (41 off 46) then added 67 runs for the fifth wicket to lift the batting side. Handy contributions from Chris Greaves (22) and Mark Watt (44*) also aided Scotland’s cause. Berrington was run out off the last ball of the innings, having struck nine fours and three sixes. UAE never got going in the chase and were bowled out for 171 in 35.3 overs. Safyaan Sharif (4/20) was the standout performer with the ball for Scotland in the World Cup 2023 Qualifiers clash, while Chris Sole picked up 3-37. For UAE, captain Muhammad Waseem top-scored with 36, while Basil Hameed contributed 30.
english
{ "region": "us-east-1", "tags": { "pattern": "s3-lambda-textract", "deployed_by": "cdktf", "repository": "https://github.com/aws-samples/serverless-patterns/tree/main/s3-lambda-textract-cdktf" }, "layers": { "pillow": { "always_refresh": false, "url":"https://files.pythonhosted.org/packages/15/37/45ad6041473ebb803d0bb265cf7e749c4838dc48c3335a03e63d6aad07d8/Pillow-9.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", "hash": "82283af99c1c3a5ba1da44c67296d5aad19f11c535b551a5ae55328a317ce331" } } }
json
Former Pakistan spinner Danish Kaneria has expressed his displeasure over the lack of intent shown by Babar Azam and Mohammad Rizwan in the T20 World Cup 2022 final against England. Speaking on his YouTube channel, he claimed that the two batters are only bothered about maintaining their respective positions in the ICC rankings. He pointed out how Babar played at an underwhelming strike rate in the summit clash, managing 32 runs off 28 balls. Citing the example of Team India's Suryakumar Yadav, Kaneria stated that the player has risen to the top spot in the rankings in T20Is, even though he bats at No. 4. He said: "Babar Azam scored 32 runs off 28 balls. What kind of cricket is this? He should have scored at least 40 runs from those many deliveries. The two openers could have at least tried to hit. It doesn't matter if they failed, but at least they could have tried. "Both Babar and Rizwan are way too concerned about their rankings. It's become a matter of ego now. But Suryakumar Yadav has claimed the top spot, despite batting at No. 4. Ranking is secondary; it is the way you play that matters most. " While Babar got off to a decent start against England, Rizwan failed to make a significant impact in the crucial tie. The wicketkeeper-batter was dismissed for just 15 runs in the all-important fixture at the Melbourne Cricket Ground (MCG). Jos Buttler won the toss and elected to field first against Pakistan in the T20 World Cup 2022 final on Sunday, November 13. The Men in Green struggled on a seam-friendly surface, losing wickets at regular intervals. The Babar Azam-led side managed to post a modest total of 137/8 in 20 overs. Shan Masood was the top contributor for the side, mustering 38 runs. For England, Sam Curran emerged as the pick of the bowlers, bagging three scalps while conceding just 12 runs from his full quota of four overs. While the Pakistani bowlers gave England a tough fight in the second half of the game, senior all-rounder Ben Stokes guided his side to a stunning victory with his unbeaten knock of 52. Haris Rauf picked up two wickets for Pakistan, while Shaheen Afridi, Shadab Khan, and Mohammad Wasim Jr finished with one wicket each. England chased down the total with an over and five wickets to spare to lift the trophy.
english
<gh_stars>100-1000 {"nom":"Montredon-Labessonnié","circ":"1ère circonscription","dpt":"Tarn","inscrits":1627,"abs":759,"votants":868,"blancs":82,"nuls":55,"exp":731,"res":[{"nuance":"DVD","nom":"M. <NAME>","voix":535},{"nuance":"FN","nom":"<NAME>","voix":196}]}
json
From UPSC perspective, the following things are important : The Tamil Nadu government launched an initiative for the conservation of the Nilgiri Tahr, the State animal. - Surveys and radio telemetry studies; - Reintroduce the Tahrs to their historical habitat; - Increase public awareness of the species. - The project is to be implemented from 2022 to 2027. - Furthermore, October 7 will be celebrated as ‘Niligiri Tahr Day’ in honour of E.R.C. Davidar, who was responsible for pioneering one of the first studies of the species in 1975. - There are multiple references to the Nilgiri Tahr in Tamil Sangam literature dating back to 2,000 years. - The late Mesolithic (10,000-4,000 BC) paintings highlight the significance of the Tahr in folklore, culture and life. - It was designated as the State animal in recognition of its ecological and cultural significance.
english
Several rights organizations, including Amnesty International, have warned of a considerable rise in hate crimes in the British capital London over the past year following Brexit. According to Press TV, in a report published in the British newspaper The Independent on Tuesday, the organizations expressed alarm at “deeply worrying” figures recently presented by the Metropolitan Police regarding a sizable increase in hate-related crimes in London over the last year, particularly since Britons voted to leave the European Union in June 2016. According to the statistics, the number of incidents relating to religion and race has increased by almost 20 percent from 14,004 to 16,618 ever since, with the rights groups saying the rise is definitely linked to Britain’s exit from the 28-member bloc and the "toxic language" that was used during the exit campaign. Reacting to the figures, prominent rights group Amnesty International said that the recent discriminatory language in Britain has been unprecedented in decades. “If accurate, these figures are deeply worrying, and they bear out our initial concerns that divisive political campaigning last summer gave license to the expression of discriminatory views in a way we haven’t seen for decades,” said Kerry Moscogiuri, the Director of Campaigns at Amnesty International UK. “We had witnessed negative and sometimes toxic language being used in debates on refugees and migrant rights. The London Mayor election and the EU referendum brought some of this to the surface, but there has been an insidious narrative developing for much longer,” he added. “There needs to be a much stronger message from all quarters of the political establishment that racially charged and demonizing language is totally unacceptable in modern Britain,” Moscogiuri stressed. Another rights group, Stop Hate UK, attributing the rise in hate crimes to Brexit, said some forms of hate crimes were under-reported and called on those in positions of power to stand up against the crimes.
english
Tianhui- salah satu pengeluar dan pembekal cip LED UV terkemuka menyediakan perkhidmatan cip LED UV ODM/OEM. Apabila musim panas menghampiri, begitu juga dengan masalah nyamuk yang menjengkelkan. Serangga kecil ini boleh merosakkan malam luar yang damai, menyebabkan kita mengalami gigitan gatal dan risiko penyakit. Nasib baik, ada penyelesaian dalam bentuk Perangkap nyamuk LED UV . Peranti ini menggunakan kuasa cahaya ultraungu untuk menarik nyamuk dan serangga terbang lain dengan lebih baik. Mereka bukan sahaja menjadikan aktiviti luar lebih menyeronokkan, tetapi mereka juga menyediakan cara pembasmian kuman udara yang berkesan. Memandangkan permintaan untuk perangkap nyamuk LED UV terus meningkat, semakin banyak Pengeluar LED UV sedang membangunkan penyelesaian inovatif untuk mengelakkan nyamuk. Sila baca! Perangkap nyamuk LED UV menggunakan cahaya ultraviolet untuk menarik nyamuk dan serangga terbang lain. Nyamuk tertarik kepada cahaya ultraungu kerana mereka menggunakannya untuk mengemudi dalam gelap. Apabila nyamuk mendekati perangkap nyamuk LED UV, ia disedut masuk oleh kipas yang kuat dan terperangkap di dalam peranti. Sebaik sahaja di dalam, nyamuk sama ada dehidrasi atau mati oleh cas elektrik yang kecil. Sesetengah perangkap nyamuk LED UV juga menggunakan penarik tambahan seperti CO2 atau haba untuk menjadikan perangkap itu lebih berkesan. Dengan menggunakan perangkap nyamuk LED UV, anda boleh meminimumkan bilangan nyamuk di ruang luar anda dengan ketara sambil meningkatkan kualiti udara dengan membasmi kuman udara. Nyamuk menggunakan banyak isyarat deria untuk mengemudi dan mencari makanan seterusnya. Salah satu isyarat ini ialah cahaya ultraungu, yang terdapat dalam cahaya matahari dan digunakan oleh nyamuk untuk mengorientasikan diri mereka. Nyamuk boleh mengesan cahaya ultraviolet menggunakan sel khusus di mata mereka, yang dikenali sebagai fotoreseptor. Fotoreseptor ini paling sensitif kepada cahaya dalam julat 300-400 nanometer, termasuk panjang gelombang yang dipancarkan oleh perangkap nyamuk LED UV. Apabila nyamuk mengesan cahaya ultraviolet, ia lebih cenderung untuk terbang ke arah itu, membawanya ke arah perangkap. Walau bagaimanapun, bukan sahaja cahaya ultraviolet menarik nyamuk ke perangkap nyamuk LED UV. Peranti ini juga menggunakan isyarat lain, seperti haba dan karbon dioksida, untuk meniru bau dan kehangatan hos manusia. Gabungan isyarat ini menjadikan perangkap lebih berkesan untuk memikat nyamuk, menghasilkan kadar tangkapan yang lebih tinggi berbanding perangkap serangga tradisional. Akhir sekali, dengan memahami sains di sebalik tingkah laku nyamuk dan isyarat deria, pengeluar perangkap nyamuk LED UV boleh mereka bentuk peranti yang lebih berkesan dan cekap untuk kawalan nyamuk. Selain memerangkap nyamuk dan serangga terbang lain, perangkap nyamuk LED UV mempunyai faedah tambahan untuk menyediakan pembasmian kuman udara. Cahaya UV-C yang dipancarkan oleh peranti ini boleh membunuh pelbagai patogen, termasuk virus, bakteria, dan spora acuan, yang mungkin terdapat di udara. Patogen ini boleh menyebabkan penyakit seperti selesema, selsema, dan alahan malah memburukkan lagi keadaan seperti asma. Selain itu, perangkap nyamuk LED UV tidak menggunakan sebarang bahan kimia, menjadikannya pilihan yang selamat dan mesra alam untuk pembasmian kuman udara. Dengan menghapuskan keperluan untuk penghalau serangga dan penyegar udara berasaskan kimia, perangkap nyamuk LED UV adalah penyelesaian semula jadi dan berkesan untuk mengurangkan kehadiran patogen di udara sambil mengawal populasi serangga. Berikut ialah beberapa ciri utama yang perlu dicari apabila memilih perangkap nyamuk LED UV: · Lampu LED Ultraviolet: Cari perangkap yang menggunakan lampu LED UV berkualiti tinggi yang berkesan menarik nyamuk dan serangga terbang lain. · Kipas yang kuat: Perangkap harus mempunyai kipas yang kuat untuk menarik serangga ke dalam peranti dan menghalangnya daripada melarikan diri. · Mudah dibersihkan: Pilih perangkap yang mudah dibuka dan dibersihkan, kerana penyelenggaraan tetap diperlukan untuk prestasi optimum. · Selamat untuk manusia dan haiwan peliharaan: Cari perangkap yang direka bentuk untuk selamat untuk manusia dan haiwan peliharaan, tanpa bahan kimia atau pelepasan berbahaya. · Kawasan liputan: Pertimbangkan saiz ruang luar anda dan pilih perangkap yang boleh menutupi kawasan tersebut dengan berkesan. · Jimat tenaga: Pilih perangkap yang menggunakan lampu LED yang cekap tenaga dan penggunaan kuasa yang rendah untuk mengurangkan bil elektrik anda. · Ciri tambahan: Sesetengah perangkap mungkin mempunyai ciri lain, seperti CO2 atau tarikan haba, untuk meningkatkan keberkesanannya. · Ketahanan: Cari perangkap yang dibuat dengan bahan tahan lama yang direka bentuk untuk menahan keadaan luar. · Waranti: Pertimbangkan untuk membeli perangkap dengan jaminan untuk memastikan anda dilindungi daripada kecacatan atau kerosakan. Perangkap nyamuk LED UV mempunyai beberapa kelebihan berbanding perangkap serangga tradisional, menjadikannya lebih berkesan dalam mengawal populasi nyamuk. Berikut adalah beberapa sebab mengapa: · Tarikan yang disasarkan: Tidak seperti perangkap serangga tradisional yang menggunakan pelbagai jenis penarik, perangkap nyamuk LED UV menggunakan cahaya ultraviolet yang disasarkan untuk menarik nyamuk secara khusus. Ini menyebabkan kadar tangkapan nyamuk yang lebih tinggi dan lebih sedikit serangga bukan sasaran yang terperangkap. · Mesra alam: Perangkap nyamuk LED UV tidak menggunakan bahan kimia atau racun perosak, menjadikannya pilihan yang selamat dan mesra alam. Perangkap serangga tradisional mungkin menggunakan bahan kimia berbahaya yang boleh membahayakan alam sekitar atau membahayakan kesihatan manusia. · Pembasmian kuman: Seperti yang dinyatakan sebelum ini, perangkap nyamuk LED UV boleh membasmi kuman udara dengan membunuh bakteria, virus dan patogen lain. Perangkap serangga tradisional tidak mempunyai faedah tambahan ini. · Penyelenggaraan yang mudah: Perangkap nyamuk LED UV memerlukan penyelenggaraan yang minimum, malah sesetengah model menampilkan mekanisme pembersihan diri. Perangkap serangga tradisional mungkin memerlukan penggantian yang kerap pada pad melekit atau bahan habis pakai lain. Secara keseluruhan, perangkap nyamuk LED UV adalah penyelesaian yang lebih cekap dan berkesan untuk mengawal populasi nyamuk sambil memberikan faedah seperti pembasmian kuman udara dan mesra alam. Pasaran untuk perangkap nyamuk LED UV dijangka meneruskan trajektori pertumbuhannya apabila pengguna semakin mencari penyelesaian yang mesra alam dan berkesan untuk kawalan serangga. Dengan peningkatan penyakit bawaan nyamuk, seperti virus Zika dan West Nile, terdapat kesedaran yang lebih besar tentang keperluan untuk melindungi daripada perosak ini. Perangkap nyamuk LED UV akan menjadi lebih cekap dan berkesan seiring dengan kemajuan teknologi, dengan ciri tambahan seperti alat kawalan jauh dan penyepaduan rumah pintar. Memandangkan permintaan untuk penyelesaian UV LED untuk kawalan nyamuk terus berkembang, pasaran untuk peranti ini dijangka berkembang secara global. · Bagaimanakah perangkap nyamuk LED UV berfungsi? Perangkap nyamuk LED UV menggunakan cahaya ultraviolet untuk menarik nyamuk dan memerangkapnya dengan kipas berkuasa di dalam peranti. · Adakah perangkap nyamuk UV LED selamat untuk manusia dan haiwan peliharaan? Ya, ia secara amnya selamat untuk manusia dan haiwan peliharaan kerana mereka tidak menggunakan bahan kimia berbahaya atau mengeluarkan pelepasan berbahaya. · Adakah perangkap nyamuk LED UV benar-benar berfungsi? Ya, ia berkesan untuk mengurangkan populasi nyamuk apabila digunakan dengan betul. · Berapa kerapkah saya perlu membersihkan perangkap nyamuk LED UV saya? Adalah disyorkan untuk membersihkan perangkap setiap 1-2 minggu untuk prestasi optimum. · Bolehkah perangkap nyamuk LED UV digunakan di dalam rumah? Ya, sesetengah model sesuai untuk kegunaan dalaman. · Berapa banyak tenaga elektrik yang digunakan oleh perangkap nyamuk LED UV? Mereka menggunakan elektrik yang agak rendah, biasanya sekitar 10-20 watt. · Adakah perangkap nyamuk LED UV menarik serangga lain selain nyamuk? Sesetengah perangkap mungkin menarik serangga terbang lain, seperti rama-rama atau lalat, tetapi ia biasanya direka untuk menyasarkan nyamuk secara khusus. · Berapa lama perangkap nyamuk LED UV tahan? Jangka hayat boleh berbeza-beza, tetapi kebanyakan perangkap direka untuk bertahan beberapa tahun dengan penyelenggaraan yang betul. · Adakah perangkap nyamuk LED UV lebih mahal daripada perangkap serangga tradisional? Ia boleh menjadi lebih mahal di muka, tetapi ia mungkin lebih berbaloi dalam jangka masa panjang kerana keperluan penyelenggaraan yang rendah dan kekurangan bahan habis pakai. Perangkap nyamuk LED UV mempunyai kesan alam sekitar yang lebih rendah daripada perangkap serangga tradisional yang menggunakan bahan kimia atau racun perosak. Mereka tidak menghasilkan sebarang pelepasan atau bahan buangan berbahaya dan menggunakan tenaga yang sangat sedikit. Dengan mengurangkan keperluan untuk penghalau serangga berasaskan kimia, perangkap nyamuk LED UV juga boleh membantu melindungi alam sekitar dan menggalakkan kelestarian. Ia adalah penyelesaian semula jadi dan mesra alam untuk mengawal populasi nyamuk dan meningkatkan kualiti udara. Perangkap nyamuk LED UV umumnya dianggap lebih selamat untuk manusia dan alam sekitar daripada penghalau serangga kimia. Penghalau serangga kimia boleh mengandungi bahan kimia berbahaya yang boleh menyebabkan kerengsaan kulit, tindak balas alahan dan masalah kesihatan lain. Selain itu, bahan kimia ini boleh menjadi toksik kepada alam sekitar, termasuk tumbuhan, haiwan dan sumber air. Perangkap nyamuk LED UV, sebaliknya, tidak menggunakan bahan kimia dan tidak mengeluarkan pelepasan berbahaya, menjadikannya pilihan yang selamat dan mesra alam. Dengan menghapuskan keperluan untuk penghalau serangga berasaskan kimia, perangkap nyamuk LED UV boleh membantu melindungi kesihatan manusia dan alam sekitar sambil tetap menyediakan kawalan nyamuk yang berkesan. Perangkap nyamuk LED UV ialah penyelesaian yang berkesan dan mesra alam untuk mengawal populasi nyamuk dan meningkatkan kualiti udara. Dengan menggunakan cahaya ultraungu untuk menarik nyamuk, peranti ini menawarkan kaedah yang disasarkan dan cekap untuk mengurangkan bilangan perosak di ruang luar anda sambil turut memberikan faedah tambahan seperti pembasmian kuman udara. Berbanding dengan penghalau serangga kimia, perangkap nyamuk LED UV adalah pilihan yang lebih selamat dan lebih mampan untuk manusia dan alam sekitar. Pada Tianhui Elektrik , kami menawarkan pelbagai jenis perangkap nyamuk LED UV berkualiti tinggi yang direka untuk memenuhi keperluan anda. Hubungi kami sekarang untuk mengetahui lebih lanjut tentang produk kami dan cara ia boleh membantu anda menikmati ruang luar bebas nyamuk. Terima kasih kerana Membaca!
english
<reponame>ApocalypseMac/Leetcode class Solution: def searchInsert(self, nums: List[int], target: int) -> int: lo, hi = 0, len(nums) while lo < hi: mid = lo + (hi - lo) // 2 if nums[mid] < target: lo = mid + 1 elif nums[mid] > target: hi = mid else: return mid return lo
python
We live in the age of the mob. Self-styled policemen of patriotism patrol our social media posts and navigate the imagined interiors of our minds to see if we pass or fail tests set by them. Television anchors — who have never known the grief of funerals, never seen the sight of either blood or bodies and have never reported from any conflict or war zone — pompously hand out certificates of nationalist and anti-national every night. Right wing thugs thrash poor Kashmiri vendors on the streets of Lucknow. On Twitter, their more upscale versions threaten and smear those who dare to bring nuance into any conversation. I experienced this personally. For suggesting that those turning on innocent Kashmiri students were only playing into the hands of Pakistan — and for offering to help stranded Kashmiris — I was targeted in a coordinated mob attack with more than a thousand calls, nude photographs and death threats. This coarseness is vile. If anyone is anti-national, it is these bullies and goons. They are not nationalists; they are pseudo-patriots. I would even say that, by their own definition, they are traitors. This is because nothing suits the Pakistani script more than Indian citizens quarrelling among themselves. We must ask ourselves how we got to this point. How did this brute, ugly, bully’s rulebook come to define how we see ourselves and each other? There is so much talk of reclaiming Hinduism from Hindutva. Even more crucial is the need to reclaim nationalism from pseudo-patriots. Unfortunately, several of my liberal friends, especially those on the Left of the spectrum, don’t get how important this is. They appear embarrassed by any visible displays of loyalty to the Indian State or any overt manifestations of patriotic sentiment. They deconstruct nationalism in an elite, academic and clinical way that is still rooted in European history instead of the homegrown constitutional patriotism of our own freedom movement. With its disavowal of or discomfort with the idea of the nation, the Left has vacated the entire space for the Right to define nationalism in the manner it chooses. The dogma of the Left has given rise to the Right and this crude playbook of patriotism. Recently, I was under attack from a few liberal colleagues for openly identifying as an “Indian” journalist in the aftermath of the Pulwama terror attack and the subsequent Balakot airstrike. Some colleagues criticised me for my admiration of the courage of young Indian Air Force pilots who were part of the operations. Others objected to my argument that the Indian assault on a terror base in Pakistan after Pulwama was about justice and not war. Ironically, in the same week that the Left called me a warmonger, the right wing has continued to question my nationalism for my position that India should be tough with Pakistan but sensitive with its own people in Kashmir. My argument with the venerable voices of the liberal-Left made me realise how woefully out of touch they are with the larger sentiment in India. First, the Indian State and the Indian government are not interchangeable entities. I can — and do — applaud the courage of young soldiers and wing commanders without losing the right (and duty) to interrogate the ruling party. Second, how can one not understand and reflect on the deep-seated anger at relentless terror attacks patronised by Pakistan’s deep State? This does not stop me — or anyone else — from asking for more effective and transparent communication from the government; or from objecting to soldiers being used as material for vote gathering. And one can feel deeply for war veterans and the honour of the uniform ( I do) while simultaneously calling out flaws in the domestic Kashmir policy (I do). That is why some of the wisest words on the situation in Kashmir have come from generals who have served in the Valley, including the officers who led the first surgical strikes in 2016. America, the most liberal of nations, is an instructive example. Whatever else the Democrats and Republicans argue over, patriotism is not a point of disagreement. Former US President Barack Obama, a beloved of liberals, took out Osama bin Laden from inside Pakistan in a widely acclaimed operation. He was not called a war monger; nor were journalists who admired the skill of the US Navy Seals. Jack Tapper, a fiercely independent and much admired CNN anchor, doesn’t hide his affiliation with the American State (not the government. ). In fact, he personally runs fund-raising drives for military veterans calling for his viewers to “give back”. Two politicians, who are opposed to the BJP, but get this are Yogendra Yadav and Asaduddin Owaisi. Both of them, in different ways, have venerated the constitutional patriotism represented by India’s freedom fighters. Lofty commentary by several Left commentators has been mocking and oversimplistic. If those who otherwise talk non-stop about preserving the “idea of India” mock the sentiment people feel for India, they caricature themselves and do liberalism a disservice. We, the people, need to reclaim our nationalism — as much from the right wing’s policing as the Left wing’s sneering.
english
US pharmaceutical company Pfizer has begun Phase 1 clinical trial of a novel oral antiviral drug for SARS-CoV-2, the virus that causes COVID-19. NEW YORK: US pharmaceutical company Pfizer has begun Phase 1 clinical trial of a novel oral antiviral drug for SARS-CoV-2, the virus that causes COVID-19. The oral antiviral clinical candidate "PF-07321332", a SARS-CoV2-3CL protease inhibitor, has demonstrated potent in vitro anti-viral activity against SARS-CoV-2, as well as activity against other coronaviruses, the company said in a statement late on Tuesday. According to the company, the findings suggest potential for use in the treatment of COVID-19 as well as potential use to address future coronavirus threats. "We have designed PF-07321332 as a potential oral therapy that could be prescribed at the first sign of infection, without requiring that patients are hospitalised or in critical care," said Mikael Dolsten, Chief Scientific Officer and President, Worldwide Research, Development and Medical of Pfizer. "At the same time, Pfizer's intravenous anti-viral candidate is a potential novel treatment option for hospitalised patients. Together, the two have the potential to create an end-to-end treatment paradigm that complements vaccination in cases where the disease still occurs," Dolsten added. Protease inhibitors bind to a viral enzyme (called a protease), preventing the virus from replicating in the cell. Protease inhibitors have been effective at treating other viral pathogens such as HIV and hepatitis C virus, both alone and in combination with other anti-virals, the company said. Currently marketed therapeutics that target viral proteases are not generally associated with toxicity and as such, this class of molecules may potentially provide well-tolerated treatments against COVID-19, it added. The Phase 1 trial is a randomised, double-blind, sponsor-open, placebo-controlled, single and multiple dose-escalation study in healthy adults evaluating the safety, tolerability and pharmacokinetics of PF-07321332. The initiation of this study is supported by preclinical studies that demonstrated the antiviral activity of this potential first-in-class SARS-CoV-2 therapeutic designed specifically to inhibit replication of the SARS-CoV2 virus. The structure of PF-07321332, together with the pre-clinical data, will be shared in a COVID-19 session of the Spring American Chemical Society meeting on April 6. The company said that it is also investigating an intravenously administered investigational protease inhibitor, PF-07304814, which is currently in Phase 1b multi-dose trial in hospitalised clinical trial participants with COVID-19. (IANS)
english
<gh_stars>0 {"type":"Feature","id":"node/705403773","properties":{"addr:city":"Erlangen","addr:country":"DE","addr:housenumber":"20","addr:postcode":"91056","addr:street":"Herzogenauracher Straße","name":"<NAME>","shop":"farm","id":"node/705403773"},"geometry":{"type":"Point","coordinates":[10.9583225,49.5689613]}}
json
<filename>node_modules/.cache/babel-loader/da9d71c4ec800f038c76e03c5fe928b6.json {"remainingRequest":"E:\\XiangMu\\ant-design-pro-vue\\node_modules\\thread-loader\\dist\\cjs.js!E:\\XiangMu\\ant-design-pro-vue\\node_modules\\babel-loader\\lib\\index.js!E:\\XiangMu\\ant-design-pro-vue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!E:\\XiangMu\\ant-design-pro-vue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!E:\\XiangMu\\ant-design-pro-vue\\src\\views\\user\\RegisterResult.vue?vue&type=script&lang=js&","dependencies":[{"path":"E:\\XiangMu\\ant-design-pro-vue\\src\\views\\user\\RegisterResult.vue","mtime":1562294713123},{"path":"E:\\XiangMu\\ant-design-pro-vue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\XiangMu\\ant-design-pro-vue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\XiangMu\\ant-design-pro-vue\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"E:\\XiangMu\\ant-design-pro-vue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\XiangMu\\ant-design-pro-vue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { Result } from '@/components';\nexport default {\n name: 'RegisterResult',\n components: {\n Result: Result\n },\n data: function data() {\n return {\n description: '激活邮件已发送到你的邮箱中,邮件有效期为24小时。请及时登录邮箱,点击邮件中的链接激活帐户。',\n form: {}\n };\n },\n computed: {\n email: function email() {\n var v = this.form && this.form.email || 'xxx';\n var title = \"\\u4F60\\u7684\\u8D26\\u6237\\uFF1A\".concat(v, \" \\u6CE8\\u518C\\u6210\\u529F\");\n return title;\n }\n },\n created: function created() {\n this.form = this.$route.params;\n },\n methods: {\n goHomeHandle: function goHomeHandle() {\n this.$router.push({\n name: 'login'\n });\n }\n }\n};",null]}
json
SARLAHI: Three persons were killed and 31 others were injured when a bus turned turtle at Lalbandi Municipality-1, Baagwani along the East-West Highway on Sunday morning. The deceased are identified as Shreemant Chaudhary of Morang and Anil Urau and Bobby Urau of Sunsari, according to DSP Prateet Singh Rathore. The bus, Ba 3 Kha 1318, was carrying workers of the Sindhupalchowk-based Joshi Hydropower when it overturned. Among the injured, four are said to be critical condition. Some 27 injured are undergoing treatment at local hospitals in Lalbandi and four others in Biratnagar.
english
<filename>exmathlib/exmathlib/Source.cpp #include "exmath.h" using namespace std; int main() { Fraction a(1, 2); cout << Fraction::Add(a, Fraction(1, 2)); cin.get(); }
cpp
""" At work I had this requirement: log messages and warnings to stdout, errors and above to stderr. This is one way to achieve this with a logging.Filter-like function. """ import sys import logging def upper_bound(level): """Filter logrecords by level. Allow only records with level number LE to level. """ def upper_bound_filter(log_record): return int(log_record.levelno <= level) return upper_bound_filter logger = logging.getLogger('default') logger.setLevel(logging.INFO) # Handles levels ERROR and up h1 = logging.StreamHandler(sys.stderr) h1.setLevel(logging.ERROR) h1.setFormatter(logging.Formatter("%(name)s error handler: %(message)s")) # Handler for a window of levels between INFO and WARNING h2 = logging.StreamHandler(sys.stdout) h2.setLevel(logging.INFO) h2.setFormatter(logging.Formatter("%(name)s info handler: %(message)s")) h2.addFilter(upper_bound(logging.WARNING)) # Order in which handlers get added doesn't matter logger.addHandler(h2) logger.addHandler(h1) # test different levels logger.info("just a message") logger.warning("beware!") logger.error('panic! panic!') logger.error('GÖTTERDÄMERUNG!!!')
python