text
stringlengths
1
1.04M
language
stringclasses
25 values
<reponame>blockhunters/smartbugs-results<filename>results/smartcheck/icse20/0x2527767c5328e8fd847f0e21ce2ae5a695a40113/result.json { "contract": "0x2527767c5328e8fd847f0e21ce2ae5a695a40113", "tool": "smartcheck", "start": 1563644525.7868404, "end": 1563644535.1109889, "duration": 9.324148416519165, "analysis": [ { "name": "SOLIDITY_ADDRESS_HARDCODED", "patternId": "adc165", "severity": 1, "line": 62, "column": 16, "content": "0xD29C684C272ca7BEb3B54Ed876acF8C784a84fD1" }, { "name": "SOLIDITY_ADDRESS_HARDCODED", "patternId": "adc165", "severity": 1, "line": 63, "column": 17, "content": "0xD29C684C272ca7BEb3B54Ed876acF8C784a84fD1" }, { "name": "SOLIDITY_ADDRESS_HARDCODED", "patternId": "adc165", "severity": 1, "line": 65, "column": 19, "content": "0xF06A984d59E64687a7Fd508554eB8763899366EE" }, { "name": "SOLIDITY_EXTRA_GAS_IN_LOOPS", "patternId": "d3j11j", "severity": 1, "line": 99, "column": 12, "content": "for(i=0;i<_timestamps.length;i++){timestampList.push(_timestamps[i]);mirrors[_timestamps[i]].push(msg.sender);betHistory[msg.sender].push(_timestamps[i]);averageTimestamp=averageTimestamp.mul(countBet)+_timestamps[i];averageTimestamp=averageTimestamp.div(countBet+1);countBet++;playerBets[msg.sender]++;}" }, { "name": "SOLIDITY_EXTRA_GAS_IN_LOOPS", "patternId": "d3j11j", "severity": 1, "line": 207, "column": 8, "content": "for(i=0;i<countWinners;i++){mirrors[winnerTimestamp][i].transfer(share.mul(9).div(10));referral[mirrors[winnerTimestamp][i]].transfer(share.mul(1).div(10));emitPayreward(mirrors[winnerTimestamp][i],share);}" }, { "name": "SOLIDITY_EXTRA_GAS_IN_LOOPS", "patternId": "d3j11j", "severity": 1, "line": 216, "column": 8, "content": "for(i=0;i<countSecondWinners;i++){mirrors[secondWinnerTimestamp][i].transfer(share.mul(9).div(10));referral[mirrors[secondWinnerTimestamp][i]].transfer(share.mul(1).div(10));emitPayreward(mirrors[secondWinnerTimestamp][i],share);}" }, { "name": "SOLIDITY_GAS_LIMIT_IN_LOOPS", "patternId": "f6f853", "severity": 2, "line": 99, "column": 12, "content": "for(i=0;i<_timestamps.length;i++){timestampList.push(_timestamps[i]);mirrors[_timestamps[i]].push(msg.sender);betHistory[msg.sender].push(_timestamps[i]);averageTimestamp=averageTimestamp.mul(countBet)+_timestamps[i];averageTimestamp=averageTimestamp.div(countBet+1);countBet++;playerBets[msg.sender]++;}" }, { "name": "SOLIDITY_PRAGMAS_VERSION", "patternId": "23fc32", "severity": 1, "line": 1, "column": 16, "content": "^" }, { "name": "SOLIDITY_PRIVATE_MODIFIER_DONT_HIDE_DATA", "patternId": "5616b2", "severity": 1, "line": 32, "column": 9, "content": "private" }, { "name": "SOLIDITY_PRIVATE_MODIFIER_DONT_HIDE_DATA", "patternId": "5616b2", "severity": 1, "line": 33, "column": 9, "content": "private" }, { "name": "SOLIDITY_PRIVATE_MODIFIER_DONT_HIDE_DATA", "patternId": "5616b2", "severity": 1, "line": 54, "column": 12, "content": "private" }, { "name": "SOLIDITY_SAFEMATH", "patternId": "837cac", "severity": 1, "line": 22, "column": 4, "content": "usingSafeMathforuint256;" }, { "name": "SOLIDITY_TRANSFER_IN_LOOP", "patternId": "8jdj43", "severity": 2, "line": 207, "column": 8, "content": "for(i=0;i<countWinners;i++){mirrors[winnerTimestamp][i].transfer(share.mul(9).div(10));referral[mirrors[winnerTimestamp][i]].transfer(share.mul(1).div(10));emitPayreward(mirrors[winnerTimestamp][i],share);}" }, { "name": "SOLIDITY_TRANSFER_IN_LOOP", "patternId": "8jdj43", "severity": 2, "line": 216, "column": 8, "content": "for(i=0;i<countSecondWinners;i++){mirrors[secondWinnerTimestamp][i].transfer(share.mul(9).div(10));referral[mirrors[secondWinnerTimestamp][i]].transfer(share.mul(1).div(10));emitPayreward(mirrors[secondWinnerTimestamp][i],share);}" }, { "name": "SOLIDITY_UPGRADE_TO_050", "patternId": "91h3sa", "severity": 1, "line": 230, "column": 16, "content": "public" }, { "name": "SOLIDITY_UPGRADE_TO_050", "patternId": "341gim", "severity": 1, "line": 94, "column": 17, "content": "uint256[]_timestamps" }, { "name": "SOLIDITY_VISIBILITY", "patternId": "b51ce0", "severity": 1, "line": 58, "column": 4, "content": "uint256countWeek;" }, { "name": "SOLIDITY_VISIBILITY", "patternId": "b51ce0", "severity": 1, "line": 77, "column": 4, "content": "mapping(uint256=>address[])mirrors;" } ] }
json
import { FormGroup, FormControl, Validators } from '@angular/forms'; import { Component, OnInit } from '@angular/core'; /** * @title Seven character code input example */ @Component({ selector: 'code-input-seven-char-example', templateUrl: 'code-input-seven-char-example.html', styleUrls: ['code-input-seven-char-example.css'] }) export class CodeInputSevenCharExampleComponent implements OnInit { inputValue: string = ''; codeForm: FormGroup; ngOnInit() { this.codeForm = new FormGroup({ keyCode: new FormControl(this.inputValue, { validators: [ Validators.required, Validators.minLength(7) ], updateOn: 'submit' }) }); } get keyCode() { return this.codeForm.get('keyCode'); } }
typescript
AGRAHAYANA 12, 1926 (Saka) (g) if so, the response of the Government thereto and step taken by the Government thereon? THE MINISTER OF FINANCE (SHRI P. CHIDAMBARAM): (a) No, Sir. (b) Does not arise. (c) to (e) On the basis of certain reports indicating a sudden spurt in transaction in shares of erstwhile Global Trust Bank (GTB) before the moratorium was announced on 25th July, 2004, an investigation by SEBI was ordered. Enquiry revealed that two Overseas Corporate Bodies (OCBS) namely Far East Investment Corporation Limited and European Investment Ltd. based in Mauritius, started selling their shares from 17th June, 2004. This was done after they became eligible to trade in the shares of GTB on June 12, 2004. Together, they sold 95 lakh shares till 19th July, 2004. The main findings of SEBI are:(i) The analysis of the data and information of GTB scrip does not suggest that the sales by the concerned persons were based on any information about the likely announcement of moratorium by Government/RBI or the likely swap ratio and there are no evidences to suggest that they were in possession of the price sensitive information. (ii) During the pre-moratorium period, the purchasers were widespread and no concentrated purchases could be observed except two clients namely Suman Goyal, a resident of Ludhiana, and Ramji Mehrotra a resident of Kanpur, who purchased 599016 and 575000 shares, respectively. The analysis did not reveal any common set of purchasers and sellers during the period. (iii) During the post moratorium period, the purchasers and sellers were widespread and no concentrated purchased could be observed with few exceptions. No adverse findings could be observed on the above transaction. During the post moratorium period the prices of the scrip of GTB had fallen to a negligible level of about Rs. 2/-. (f) and (g) Several representations were received from different quarters including Members of Parliament expressing concern on the fate of investors and depositors of erstwhile GTB after the moratorium was imposed. A scheme of amalgamation was notified by the Government on 13th August 2004, which clearly laid down provisions protecting the interests of shareholders and depositors. The issue has also been debated threadbare in the Lok Sabha on 01.12.2004 and necessary clarifications have been provided. Loan to Customers in Rural Areas *48. SHRI SUKDEO PASWAN: Will the Minister of FINANCE be pleased to state: (a) the details of the reasons for not providing loans to customers in rural areas in the country by nationalised banks; (b) whether there is wide difference between deposits and advances in most of the nationalised banks in rural areas; (c) if so, the details and reasons therefor; and (d) the steps taken by the Government to rectify the disparity for the grant of loans/advances to the customers/ farmers in rural areas through nationalized banks? THE MINISTER OF FINANCE (SHRI P. CHIDAMBARAM): (a) The Public Sector Banks do lend to customers throughout the country including rural areas for various purposes including agriculture, small scale industry, Government sponsored programmes etc. (b) and (c) As at the end of March, 2004 the total deposits and advances of Public Sector Banks in rural areas stood at Rs. 147182 crores and Rs. 63419 crores, respectively. The comparatively low level of credit deployed in rural areas is attributable to several factors including poor infrastructural facilities, low capital formation in agriculture, crash in prices of certain agricultural commodities like coffee, rubber etc. overhang of nonperforming assets, poor access of rural industries to technology, markets etc. (d) Several measures have been taken by the Government/RBI to increase institutional finance to agriculture and allied activities. These measures include implementation of Special Agriculture Credit Plan (SACP), opening of Specialized Agriculture Finance Branches, introduction of Kisan Credit Cards, mandated lending under priority sector and setting up of Rural Infrastructure Development Fund (RIDF) with NABARD. Besides, a new agriculture credit package has been announced by the Government on 18th June, 2004 to double the flow of credit to agriculture and allied activities in the next three years and to increase the flow of credit by 30 percent during 2004-05. Textile Export DECEMBER 3, 2004 *49. SHRI BHARTRUHARI MAHTAB: SHRI K.C. PALANISAMY: Will the Minister of TEXTILES be pleased to state: (a) the value of textile exports during each of the last three years; (b) the percentage of decline/increase during the above period and the reasons therefor; (c) if so, the reasons therefor; (d) whether the industry has sought certain incentives from the Government to check dip in textile export due to ever-changing global scenario; (e) if so, the details thereof; (f) whether the Government is aware about selective clampdown of Chinese textiles import by US Administration; (g) if so, the details thereof; (h) whether Indian exporters of textiles will be benefited by this selective clampdown; and (i) if so, the details thereof? THE MINISTER OF TEXTILES (SHRI SHANKERSINH VAGHELA): (a) to (c) As per available Directorate General of Commerce Intelligence & Statistics (DGCI&S) data, the textile exports during the last three years i.e. 2001-02, 2002-03 and 2003-04 have been as given below: (Value in US$ Million) Textile Exports % increase/ decrease over the previous year The decline during the year 2001-02 was mainly due to the general recession in the world market and stiff competition from low cost supplying countries. (d) and (e) Suggestions have been received from time to time from the Trade for enhancing the competitiveness of Indian textile industry and accelerated growth in textile export. These suggestions inter-alia include reforms in labour laws, availability of adequate infrastructure facilities, reduction in transaction cost, flexibility in trade policy provisions, refund of local taxes and duties suffered on the inputs of export products, increased export incentives, providing level playing field, exemption from Income Tax, procedural changes for exporter friendly trade policy and hassle free system, etc. (f) Yes, Sir. (g) The United States has established an import limit for certain textile and clothing products imported from China. The products covered include. (i) Cotton, Wool and Man-made Fibre socks in category 332/432 and 632 (ii) Knit Fabric, Category 222 (iii) Brassieres and Other Body Supporting Garments, Category 349/649 (iv) Cotton and Man-made Fibre Dressing Gowns and Robes The details of some of the product category and the import limits specified by US on certain categories of products from China as part of textile safeguard mechanism are as under:
english
<reponame>shaymk1/Wai-Studio-Mandala-Shop<gh_stars>0 from django.shortcuts import render def home(request): context = {} return render(request, 'store/home.html', context)
python
Tom Brady’s 2022 offseason has been atypical and headline filling. As the king of the NFL mountains for decades, the crown gets heavy, and the masses look for dents in the armor. Even if it involves his wife Gisele Bündchen. Of course, it’s not necessarily new that his wife Bündchen caught some flak from the media. An ad campaign from 2011 featured her stripping down to her underwear before letting her husband know that “she crashed his car again. ” The commercial received pointed criticism from officials in the Brazilian government at the time. Specifically, the women’s secretariat criticized the ad as “sexist. ” The government officials even went as far as demanding Bündchen’s commercial to be banned. The officials made a public statement regarding the ad: The statement further read: Lingerie company Hope responded that its ad campaign was meant to “joke about daily life” and was not intended to objectify women. As a sixth-round pick, Tom Brady has clawed his way to the top. Even during down years with the New England Patriots, Brady kept his team in contention regardless of the supporting cast. In his third season with the Tampa Bay Buccaneers, the star quarterback faces new challenges. The Buccaneers’ offensive line has endured injuries in training camp and saw departures in free agency as well. Star receiver Chris Godwin is recovering from an ACL tear. Additionally, Tom Brady will be playing without his star tight end and friend Rob Gronkowski, who decided to retire after last season. The Buccaneers added wide receivers Julio Jones and Russell Gage. However, Brady will not have the reliability and spark of Gronkowski and Antonio Brown. Although the Buccaneers remain the favorites in the NFC and the NFC South, some division rivals may be on the upswing. The Carolina Panthers hope to get a boost from newly-acquired quarterback Baker Mayfield. He will star alongside D. J. Moore and Christian McCaffrey. The New Orleans Saints are leaning into a reload rather than a rebuild by drafting wide receiver Chris Olave. Star receiver Michael Thomas will be back, too. If quarterback Jameis Winston can recover from his knee injury, Tom Brady and the Buccaneers won't have an easy path out of the NFC South. 5 Times Steph Curry Was HUMILIATED On And Off The Court!
english
A shooting that left at least six people dead at an Independence Day parade in a Chicago suburb rattled Monday’s celebrations across the US and further rocked a country already awash in turmoil over high court rulings on abortion and guns as well as hearings on the Jan. 6 insurrection. The latest mass shooting came as the nation tried to find cause to celebrate its founding and the bonds that still hold it together. It was supposed to be a day for taking off work, flocking to parades, devouring hot dogs and burgers at backyard barbecues and gathering under a canopy of stars and exploding fireworks. “On a day that we came together to celebrate community and freedom, we are instead mourning the tragic loss of life and struggling with the terror that was brought upon us," Highland Park Mayor Nancy Rotering said. The parade began around 10 a. m. but was suddenly halted 10 minutes later after shots were fired. Hundreds of Highland Park parade-goers — some visibly bloodied — fled the parade route, leaving behind chairs, baby strollers and blankets. Authorities brought a person of interest into custody Monday evening. President Joe Biden, in remarks Monday celebrating 246 years of America’s independence, sought to reassure a nation both exhausted and unsettled by recent events. “In recent days, there’s been reason to think this country is moving backwards, that freedom is being reduced, that rights we assumed were protected are no longer," Biden said in remarks to military families and administration officials enjoying a picnic on the South Lawn of the White House. “I know it can be exhausting and unsettling, but tonight I want you to know we’re going to get through all of this. " Biden said many people see a divided country, but “I believe we are more united than we are divided. " He tweeted earlier in the day about the shooting, calling it “senseless gun violence that has yet again brought grief to an American community this Independence Day. " “I will not give up fighting the epidemic of gun violence," the president tweeted. These are precarious times: An economic recession lurks, and the Highland Park shooting will weigh on a national psyche already raw from mass shootings like those seen recently at a Texas elementary school and a New York supermarket. Sharp social and political divisions have also been laid bare by recent Supreme Court decisions overturning the constitutional right to abortion and striking down a New York law limiting who may carry a gun in public. Nevertheless, many had reason to gather and celebrate for the first time in three years amid easing coronavirus precautions. Nathan’s Famous Fourth of July hot dog eating contest returned to its traditional location in Brooklyn’s Coney Island neighborhood after two years elsewhere thanks to the pandemic. “It’s beautiful to be back here," Joey “Jaws" Chestnut told ESPN after winning the men’s competition by downing 63 hot dogs and buns — even as he momentarily put a protester who rushed the stage in a chokehold. Miki Sudo chomped 40 franks to win the women’s event. Colorful displays were scheduled to light up the night sky from New York to Seattle to Chicago to Dallas. However, others, particularly in drought-stricken and wildfire-prone regions of the West, will forgo them. Fireworks were the suspected cause behind a fire in Centerville, Utah, that led to the evacuation of dozens of homes and the cancellation of some of its Independence Day events, officials said. It was a different matter in Phoenix, which is again going without fireworks — not because of the pandemic or fire concerns but supply-chain issues. In emotional ceremonies across the country, some swore oaths of citizenship, qualifying them to vote in the upcoming midterm elections. During a ceremony for naturalized citizens held at Mount Vernon, the Virginia home of George Washington, Treasury Secretary Janet Yellen told 52 people originally from 42 different countries that they were essential to building a strong labor force. “Immigrants strengthen our workforce, and, in the process, help drive the resiliency and vitality of our economy," Yellen said in remarks prepared for the Monday event. For many, July 4 was also a chance to set aside political differences and to celebrate unity, reflecting on the revolution that gave rise to history’s longest-living democracy. “There’s always something to divide or unite us," says Eli Merritt, a political historian at Vanderbilt University whose upcoming book traces the fraught founding of the United States. But he sees the Jan. 6 hearings probing last year’s storming of the U. S. Capitol as a reason for hope, an opportunity to rally behind democratic institutions. Even though not all Americans or their elected representatives agree with the committee’s work, Merritt is heartened by the fact that it’s at least somewhat bipartisan. “Moral courage as a locus for Americans to place hope, the willingness to stand up for what is right and true in spite of negative consequences to oneself," he said. “That is an essential glue of constitutional democracy. " Read all the Latest News, Breaking News, watch Top Videos and Live TV here. (This story has not been edited by News18 staff and is published from a syndicated news agency feed - Associated Press)
english
{ "name": "Def Tactic 1", "sp": 60, "type": "C", "description": "At start of turn, grants Def+2 to allies within 2 spaces for 1 turn. Granted only if number of that ally's movement type on current team ≤ 2.", "icon": "/images/icons/passives/def-tactic-1.png", "link": "https://kagerochart.com/hero/passives/def-tactic-1", "id": "def-tactic-1" }
json
/** * Type definition tests. */ import {StyleSheet} from 'react-native'; import EStyleSheet, {MediaQuery} from '..'; const eStyles = EStyleSheet.create({ $var: 10, button1: { width: () => '100%', height: 40, '@media (min-width: 350)': { width: '$var' } as MediaQuery }, button2: { width: 200 }, '@media ios': { button3: { width: '100%' } } as MediaQuery, }); const styles = StyleSheet.create({ button1: { ...EStyleSheet.absoluteFillObject, color: 'red' }, button2: { color: 'blue', borderBottomWidth: EStyleSheet.hairlineWidth, } }); EStyleSheet.build(); EStyleSheet.build({$var: 'foo'}); EStyleSheet.value('100%'); EStyleSheet.value('100%', 'width'); EStyleSheet.subscribe('build', () => {}); EStyleSheet.clearCache(); const x = EStyleSheet.absoluteFill; EStyleSheet.flatten(eStyles.button1); EStyleSheet.flatten([eStyles.button1, eStyles.button2]); EStyleSheet.flatten(styles.button1); EStyleSheet.flatten([styles.button1, styles.button2]); EStyleSheet.setStyleAttributePreprocessor('color', () => 'red');
typescript
import { useState } from "react"; const Education = ({classes, ...props}) => { const [university, setUniversity] = useState(''); const [degree, setDegree] = useState(''); const [startDate, setStartDate] = useState(''); const [endDate, setEndDate] = useState(''); return ( <form className={classes.form} onSubmit={props.onProgress}> <div className={classes.formItem}> <input type="text" required value={university} onChange={e => setUniversity(e.target.value)} /> <label><i className="fas fa-university"></i><span>School/University</span></label> </div> <div className={classes.formItem}> <input type="text" required value={degree} onChange={e => setDegree(e.target.value)} /> <label><i className="fas fa-user-graduate"></i><span>Class/Degree</span></label> </div> <div className={classes.formItem}> <input type="date" required value={startDate} onChange={e => setStartDate(e.target.value)} /> <label><i className="fas fa-calendar-alt"></i><span>Start</span></label> </div> <div className={classes.formItem}> <input type="date" required value={endDate} onChange={e => setEndDate(e.target.value)} /> <label><i className="fas fa-calendar-alt"></i><span>End</span></label> </div> <button type="submit" onClick={() => props.onProgress({ university, degree, startDate, endDate })}><i className='fas fa-check'></i></button> </form> ) } export default Education;
javascript
About the only thing that brings about more discussion and hand-wringing than international cricket in Pakistan is the state of the domestic cricket. Such is the frequency of introspection, especially among ex-cricketers, administrators and journalists, that Abid Ali Kazi - a leading authority on the local game - reckons that since the inception of first-class cricket in Pakistan in 1947-48, no two seasons have ever followed the same format. With that in mind, and the fact that the domestic structure has had three major overhauls in the last four seasons, the Pakistan Cricket Board held seminars recently in Karachi and Lahore ... and again it was the domestic game that was under the hammer. The seminar - attended by a kaleidoscope of local administrators, past and present cricketers, journalists, and school and university staff - was ostensibly held to gauge opinions on the current domestic format. In reality, it was an exercise to test the water about yet another structural change - one that goes right to the heart of the local set-up. Commercial sides, such as Pakistan International Airlines (PIA) and Habib Bank, have been an integral part of the local game since Abdul Hafeez Kardar brought them in, back in the 1950s. They have also been the focal point of stinging criticism from some - Imran Khan, for example - who feel that players and crowds alike feel no passion and place no emotional attachment to a game between a national airline and a bank. Critics also argue that such outfits don't breed cricketers, as regional academies and teams would, but instead cherry-pick the best players from elsewhere. Rameez Raja, the PCB's current chief executive, basically agrees with Imran and co., although his marketing background has injected a degree of financial realism into his deliberations. The current domestic structure, a revamp from last season, was carried out on the advice of an independent committee which was set up to investigate the disastrous World Cup performance. They finally heeded Imran's long-standing call to rid the game of departmental teams, and in a move marketed as a radical shift - although actually it has happened before - decided to separate the commercial teams from regional associations. Two tournaments, the Patron's Trophy for departmental teams and the Quaid-e-Azam Trophy for regional ones, were pencilled in, along with a qualifying round for the Patron's Trophy. Eventually, said Rameez, the departmental teams would be phased out altogether. However, the seminar showed that this would be an unpopular and unnecessary move. In practice there seems little wrong with the current format. Ex-Test players like Haseeb Ahsan and Sadiq Mohammad spoke in favour of it, as did administrators in the shape of Siraj Bokhari and Aslam Sanjani, the current and past presidents of the Karachi City Cricket Association. Let departmental teams have their own tournament, they said: their players receive an income and a job - the overriding raison d'etre for the idea in the first place - and everybody is happy. Regional cricket has the Quaid-e-Azam Trophy, and if sponsorship is eventually found (domestic cricket has been without one for four years), then the regional players will also be paid well. The seminar pointed up some other flaws too. Poor umpiring standards (a Pakistani puzzle as old as the day is long) were discussed, as were the facilities and maintenance of most grounds and pitches. Gul Hameed Bhatti, an eminent sports journalist who misses little on the local scene, pointed out how few of the big-name players took part in domestic tournaments anyway these days. Bhatti, an avid cricket statistician, revealed that Wasim Akram played only around five Quaid-e-Azam Trophy games in a career spanning 20 years. A visibly surprised Shaharyar Khan, the new PCB chairman, wondered aloud about a system in which the leading players would not be guaranteed selection in the national squad unless they appeared in domestic cricket at some stage. But the West Indian stance - where if you do not play domestically, you are not considered for the Test team - was quickly ruled out. The inability to find a sponsor has severely hampered the domestic game. Some argued that if sponsorship could be found, then TV coverage would also follow, and that this development could be crucial - presently domestic cricket is not even considered worthy of a couple of minutes of coverage on the evening news, let alone an entire live broadcast. As Zaheer Abbas said, with crowds for international matches dwindling, the chances of attracting people to a local game, whether it be Habib Bank v Pakistan Customs or Lahore v Karachi, is negligible. Which means televising games - even if only brief highlights to start with - is essential. Sadiq Mohammad, in a suggestion as dashing as his opening once was, called for the company teams (who, he pointed out, aren't short of funds) to shell out for two cameras - one funded by each side - at every match, thus ensuring that, at the very least, a video archive could be kept of all domestic games. The PCB and the regional teams (which are generally under-funded) could share the cost of the cameras for regional games. But it was to the private sector that we had to turn for a glimpse into what will probably be the way forward. Jamal Mir, the CEO of Prestige Advertising (a leading ad agency in Pakistan), argued the case for cricket to be treated not simply as a game but as an entertainment industry, similar to the treatment of sports in the United States. Citing the success of franchises in American sport, Mir envisioned a plan to attract businessmen to sponsor a region, and bring merchandising into the game. Marketing the game, then, would be as important as the mechanical or structural sides of it. How many of the suggestions so eagerly noted down by the PCB will see light of day depends mainly on the energies of Shaharyar Khan and Rameez Raja. What they can take from the seminar is clear: departmental teams, as much as some may argue otherwise, clearly have a place in the domestic Pakistan game. Any move to try to phase them out would be as unpopular as Aamer Sohail - and without sponsorship or an alternative source of funds, financially suicidal. The current structure is set so stay untouched for next season, and perhaps that is what is needed. Leave aside the changes, cosmetic or deep-rooted; bring back the star players; get on the telly; and market yourself. Osman Samiuddin is a freelance journalist in Karachi.
english
{ "vorgangId": "74332", "VORGANG": { "WAHLPERIODE": "18", "VORGANGSTYP": "EU-Vorlage", "TITEL": "Bericht der Kommission an das Europäische Parlament und den Rat\r\nAchter Finanzbericht der Kommission an das Europäische Parlament und den Rat über den Europäischen Landwirtschaftsfonds für die Entwicklung des Ländlichen Raums (ELER) Haushaltsjahr 2014 \r\nKOM(2016) 181 endg.; Ratsdok. 7685/16", "INITIATIVE": "Bundestag", "AKTUELLER_STAND": "", "SIGNATUR": "", "GESTA_ORDNUNGSNUMMER": "", "WICHTIGE_DRUCKSACHE": { "DRS_HERAUSGEBER": "BT", "DRS_NUMMER": "18/8470", "DRS_TYP": "Unterrichtung", "DRS_LINK": "http://dipbt.bundestag.de:80/dip21/btd/18/084/1808470.pdf" }, "EU_DOK_NR": "Ratsdok. 7685/16, Kom. (2016) 181 endg.", "ABSTRAKT": "" }, "VORGANGSABLAUF": { "VORGANGSPOSITION": { "ZUORDNUNG": "BT", "URHEBER": "Unterrichtung: Keine Ausschussüberweisung, Urheber : Bundestag ", "FUNDSTELLE": "13.05.2016 - BT-Drucksache 18/8470, Nr. B.6", "FUNDSTELLE_LINK": "http://dipbt.bundestag.de:80/dip21/btd/18/084/1808470.pdf" } } }
json
<gh_stars>100-1000 package com.sequenceiq.redbeams.configuration; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.concurrent.TimeUnit.SECONDS; import java.nio.file.Files; import java.nio.file.Paths; import java.sql.SQLException; import javax.inject.Inject; import javax.inject.Named; import javax.persistence.EntityManagerFactory; import javax.sql.DataSource; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.DependsOn; import org.springframework.core.env.Environment; import org.springframework.orm.jpa.JpaTransactionManager; import org.springframework.orm.jpa.JpaVendorAdapter; import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; import org.springframework.orm.jpa.vendor.Database; import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; import com.sequenceiq.cloudbreak.common.database.BatchProperties; import com.sequenceiq.cloudbreak.common.database.JpaPropertiesFacory; import com.sequenceiq.cloudbreak.common.tx.CircuitBreakerType; import com.sequenceiq.cloudbreak.util.DatabaseUtil; import com.sequenceiq.flow.ha.NodeConfig; import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; @Configuration @EnableTransactionManagement public class DatabaseConfig { @Value("${redbeams.db.env.user:}") private String dbUser; @Value("${redbeams.db.env.pass:}") private String dbPassword; @Value("${redbeams.db.env.db:}") private String dbName; @Value("${redbeams.db.env.poolsize:10}") private int poolSize; @Value("${redbeams.db.env.connectiontimeout:30}") private long connectionTimeout; @Value("${redbeams.db.env.minidle:2}") private int minimumIdle; @Value("${redbeams.db.env.idletimeout:10}") private long idleTimeout; @Value("${redbeams.db.env.schema:" + DatabaseUtil.DEFAULT_SCHEMA_NAME + '}') private String dbSchemaName; @Value("${redbeams.db.env.ssl:}") private boolean ssl; @Value("#{'${redbeams.cert.dir:}/${redbeams.db.env.cert.file:}'}") private String certFile; @Value("${redbeams.hbm2ddl.strategy:validate}") private String hbm2ddlStrategy; @Value("${redbeams.hibernate.debug:false}") private boolean debug; @Value("${redbeams.hibernate.circuitbreaker:LOG}") private CircuitBreakerType circuitBreakerType; @Inject @Named("databaseAddress") private String databaseAddress; @Inject private NodeConfig nodeConfig; @Inject private Environment environment; @Bean public DataSource dataSource() throws SQLException { DatabaseUtil.createSchemaIfNeeded("postgresql", databaseAddress, dbName, dbUser, dbPassword, dbSchemaName); HikariConfig config = new HikariConfig(); if (ssl && Files.exists(Paths.get(certFile))) { config.addDataSourceProperty("ssl", "true"); config.addDataSourceProperty("sslfactory", "org.postgresql.ssl.SingleCertValidatingFactory"); config.addDataSourceProperty("sslfactoryarg", "file://" + certFile); } if (nodeConfig.isNodeIdSpecified()) { config.addDataSourceProperty("ApplicationName", nodeConfig.getId()); } config.setDriverClassName("io.opentracing.contrib.jdbc.TracingDriver"); config.setJdbcUrl(String.format("jdbc:tracing:postgresql://%s/%s?currentSchema=%s&traceWithActiveSpanOnly=true", databaseAddress, dbName, dbSchemaName)); config.setUsername(dbUser); config.setPassword(<PASSWORD>); config.setMaximumPoolSize(poolSize); config.setMinimumIdle(minimumIdle); config.setConnectionTimeout(SECONDS.toMillis(connectionTimeout)); config.setIdleTimeout(MINUTES.toMillis(idleTimeout)); return new HikariDataSource(config); } @Bean public PlatformTransactionManager transactionManager() throws SQLException { JpaTransactionManager jpaTransactionManager = new JpaTransactionManager(); jpaTransactionManager.setEntityManagerFactory(entityManagerFactory()); jpaTransactionManager.afterPropertiesSet(); return jpaTransactionManager; } @Bean @DependsOn("databaseUpMigration") public EntityManagerFactory entityManagerFactory() throws SQLException { LocalContainerEntityManagerFactoryBean entityManagerFactory = new LocalContainerEntityManagerFactoryBean(); entityManagerFactory.setPackagesToScan("com.sequenceiq.redbeams", "com.sequenceiq.flow", "com.sequenceiq.cloudbreak.ha"); entityManagerFactory.setDataSource(dataSource()); entityManagerFactory.setJpaVendorAdapter(jpaVendorAdapter()); entityManagerFactory.setJpaProperties(JpaPropertiesFacory.create(hbm2ddlStrategy, debug, dbSchemaName, circuitBreakerType, createBatchProperties())); entityManagerFactory.afterPropertiesSet(); return entityManagerFactory.getObject(); } @Bean public JpaVendorAdapter jpaVendorAdapter() { HibernateJpaVendorAdapter hibernateJpaVendorAdapter = new HibernateJpaVendorAdapter(); hibernateJpaVendorAdapter.setShowSql(true); hibernateJpaVendorAdapter.setDatabase(Database.POSTGRESQL); return hibernateJpaVendorAdapter; } private BatchProperties createBatchProperties() { return new BatchProperties(environment.getProperty("spring.jpa.properties.hibernate.jdbc.batch_size", Integer.class), environment.getProperty("spring.jpa.properties.hibernate.order_inserts", Boolean.class), environment.getProperty("spring.jpa.properties.hibernate.order_updates", Boolean.class), environment.getProperty("spring.jpa.properties.hibernate.jdbc.batch_versioned_data", Boolean.class)); } }
java
{"openfl.js":"sha256-5pjpaYbvg10HhzzU+sWbFELD2pTXJ125JXqwfXiBpXc=","openfl.min.js":"sha256-+8artxqyjPWDAH/ODu2zu4nt/PE3YLO8U+ELVQ2YYkA="}
json
<filename>malfind.html {% extends 'widgets/widget_template.html' %} {% load custom_template %} {% block title_color %}{{ title_color|default:'white' }}{% endblock %} {% block title_text_color %}{{ title_text_color|default:'black' }}{% endblock %} {% block body_color %}{{ body_color|default:'white' }}{% endblock %} {% block body_text_color %}{{ body_text_color|default:'#868686' }}{% endblock %} {% block custom_title_prop %}{% if title_logo %}style="background-size: auto 60%; background-position: 50%; background-repeat: no-repeat; background-image: url('/app_resource/{{ title_logo }}');"{% endif %}{% endblock %} {% block title1 %}Volatility{% endblock %} {% block title2 %}Malfind{% endblock %} {% block widget_content %} <!--File: ./volatility/malfind.html Copyright (c) 2014-2016 Splunk Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <style> .pre { white-space: pre; font-family: monospace; } .nowrap { white-space: nowrap; } </style> <div class="row-fluid" onwidgetload="$(this).parent().css('overflow', 'auto');" style="padding-top: 10px; color: {{ body_text_color|default:'#868686' }};"> {% for buffer in buffers %} <div class="row"> <div class="col-md-6 nowrap">Process: {{ buffer.process }}</div> <div class="col-md-2 nowrap">PID: {{ buffer.pid }}</div> <div class="col-md-4 nowrap">Address: {{ buffer.address }}</div> </div> <div class="row"> <div class="col-md-4 nowrap">Vad Tag: {{ buffer.vad_tag }}</div> <div class="col-md-8 nowrap">Protection: {{ buffer.protection }}</div> </div> <div class="row"> <div class="col-md-12 nowrap">Flags: {{ buffer.flags }}</div> </div> <br> <div class="row"><div class="col-md-12 pre">{{ buffer.buffer }}</div></div> <div class="row"><div class="col-md-12 pre">{{ buffer.disassembly }}</div></div> {% if not forloop.last %} <hr> {% endif %} {% endfor %} </div> {% endblock %}
html
from pathlib import Path import os from PIL import Image, ImageFont, ImageDraw import numpy as np import pandas as pd from math import * p = Path("resources/graphics/Pokemon/Icons") df = pd.read_csv(Path("resources/PBS/compressed/pokemon.csv"), index_col=0) width = 64 height = ceil(len(df) / 64) canvas = Image.new("RGBA", (width, height), "#00000000") draw = ImageDraw.Draw(canvas) for i, row in df.iterrows(): try: img = ( Image.open(p / f"{row.internalname}.png") .convert("RGBA") .resize((64, 32), resample=Image.NEAREST) .crop((0, 0, 32, 32)) ) canvas.alpha_composite(img, ((i % 64) * 32, (i // 64) * 32)) except Exception as e: continue canvas.save(Path("resources/graphics/generated/battler_ldtk_list.png")) # for pth in p.glob("*.png"): # img = ( # Image.open(pth) # .convert("RGBA") # .resize((64, 32), resample=Image.NEAREST) # .crop((0, 0, 32, 32)) # )
python
//! Configuration variables for the SUS Kernel //! //! This file contains some configuration variables for the SUS kernel. It //! defines constants that are to be compiled into the final binary. //! //! Make sure to edit this file in `config/`. This file is copied to the `src/` //! directory as part of the build process. Any changes made there will be //! ignored by `cargo build`. #![allow(dead_code)] use crate::executable; use crate::executable::factory::AutoExecutableFactory; use crate::executable::run::Runner; use crate::permission; use crate::permission::factory::AutoPermissionFactory; #[cfg(feature = "log")] use crate::log; #[cfg(feature = "log")] use crate::log::Logger; /// The method to use to find the [Executable][eb] to run /// /// [eb]: executable::Executable pub const EXECUTABLE_FACTORY: AutoExecutableFactory = executable::factory::from_commandline; /// The method to use to find the current [Permission][p]s the user has /// /// Note that this is the current [Permission][p]s this binary is executing /// under. For this reason, the user should not be trusted to provide this. It /// should be obtained by other means, like looking at the Real UID, Real /// Primary GID, and Secondary Groups. /// /// [p]: permission::Permission pub const CURRENT_PERMISSION_FACTORY: AutoPermissionFactory = permission::factory::from_environment; /// The method to use to find the [Permission][p]s to run the executable as /// /// This is the target [Permission][p]s of the [Executable][eb]. As such, it is /// perfectly safe to take this in from the user. Indeed, the user must be able /// to execute as a requested privilege. /// /// [p]: permission::Permission /// [eb]: executable::Executable pub const REQUESTED_PERMISSION_FACTORY: AutoPermissionFactory = permission::factory::from_commandline; /// The method to run the [Executable][eb] created /// /// [eb]: executable::Executable pub const RUNNER: Runner = executable::run::exec; /// The path to log to /// /// The path to sudoers file. For readability purpose, this is represented as JSON /// and not traditional sudoers file syntax pub const SUDOER_PATH: &str = "/etc/sudoers.json"; /// How to log incoming [Request][rq]s /// /// For administrative purposes, it might be useful to log what [Request][rq]s /// people make to this binary. This is the function that is called for logging. /// /// [rq]: crate::request::Request #[cfg(feature = "log")] pub const LOGGER: Logger = log::to_file; /// The path to log to /// /// The [log::to_file] logger uses this path to determine where to log *all* the /// incoming [Request][rq]s, both successful and failed. As such, this log file /// can grow very quickly and should be rotated regularly, say with `logrotate`. /// This path is hard-coded into the binary and cannot be changed at runtime. /// /// [rq]: crate::request::Request #[cfg(feature = "log")] pub const LOG_FILE_PATH: &str = "/var/log/sus.log"; /// The permissions to log with /// /// This configuration parameter sets the permissions that [log::to_file] will /// set the log file. They will be set unconditionally. #[cfg(feature = "log")] pub const LOG_FILE_PERMS: u32 = 0o400; /// The format of the log message on success /// /// The logging functionality of this crate allows us to configure the messages /// that are written on success and failure. This configuration parameter /// configures the success message. /// /// Note that this is a macro instead of a hard string literal. This is so that /// formatting string still works. The format string literal has to be in the /// code literally or as a macro. Thus, this solution. /// /// The code provides the following variables for use /// * `tstamp_secs`: The current unix timestamp's whole number part in seconds /// * `tstamp_nanos`: The fractional part of the current unix timestamp in /// nanoseconds /// * `execable`: The [Executable][eb] to execute /// * `cur_perm`: The current [Permissions][pm] of the user /// * `req_perm`: The [Permissions][pm] the user requested /// /// [eb]: executable::Executable /// [pm]: permission::Permission #[cfg(feature = "log")] macro_rules! LOG_WRITE_SUCCESS_MSG { () => { "{tstamp_secs}.{tstamp_nanos:0>9} SUCCESS Executing {execable}; From {cur_perm}; To {req_perm}\n" }; } #[cfg(feature = "log")] pub(crate) use LOG_WRITE_SUCCESS_MSG; /// The format of the log message on failure /// /// The logging functionality of this crate allows us to configure the messages /// that are written on success and failure. This configuration parameter /// configures the failure message. /// /// Note that this is a macro instead of a hard string literal. This is so that /// formatting string still works. The format string literal has to be in the /// code literally or as a macro. Thus, this solution. /// /// The code provides the following variables for use /// * `tstamp_secs`: The current unix timestamp's whole number part in seconds /// * `tstamp_nanos`: The fractional part of the current unix timestamp in /// nanoseconds /// * `execable`: The [Executable][eb] to execute /// * `cur_perm`: The current [Permissions][pm] of the user /// * `req_perm`: The [Permissions][pm] the user requested /// * `failure`: The [VerifyError][ve] reported. Only provided if the /// `log_fail_msg` feature is enabled. /// /// [eb]: executable::Executable /// [pm]: permission::Permission /// [ve]: permission::verify::VerifyError #[cfg(all(feature = "log", not(feature = "log_fail_msg")))] macro_rules! LOG_WRITE_FAILURE_MSG { () => { "{tstamp_secs}.{tstamp_nanos:0>9} FAILURE Executing {execable}; From {cur_perm}; To {req_perm}\n" }; } #[cfg(all(feature = "log", feature = "log_fail_msg"))] macro_rules! LOG_WRITE_FAILURE_MSG { () => { "{tstamp_secs}.{tstamp_nanos:0>9} FAILURE Executing {execable}; From {cur_perm}; To {req_perm}; Error {failure}\n" }; } #[cfg(feature = "log")] pub(crate) use LOG_WRITE_FAILURE_MSG; /// What command line argument number to look for for the path of the binary to /// execute /// /// Used by [executable::factory::from_commandline] pub const EXECUTABLE_COMMANDLINE_PATH_IDX: usize = 4; /// What command line argument number to use as the first parameter to the /// program, with subsequent arguments being used in order /// /// Used by [executable::factory::from_commandline] pub const EXECUTABLE_COMMANDLINE_ARG_START_IDX: usize = 5; /// What command line argument number to look at for the UID /// /// Used by [permission::factory::from_commandline] pub const PERMISSION_COMMANDLINE_UID_IDX: usize = 1; /// What command line argument number to look at for the Primary GID /// /// Used by [permission::factory::from_commandline] pub const PERMISSION_COMMANDLINE_PRIMARY_GID_IDX: usize = 2; /// What command line argument number to look at for a comma separated list of /// the Secondary GIDs. /// /// Used by [permission::factory::from_commandline] pub const PERMISSION_COMMANDLINE_SECONDARY_GID_IDX: usize = 3;
rust
/* * mydraft.cc * * @license * Copyright (c) <NAME>. All rights reserved. */ import { ConstraintFactory, DefaultAppearance, RenderContext, ShapePlugin } from '@app/wireframes/interface'; import { CommonTheme } from './_theme'; const DEFAULT_APPEARANCE = {}; DEFAULT_APPEARANCE[DefaultAppearance.FOREGROUND_COLOR] = CommonTheme.CONTROL_TEXT_COLOR; DEFAULT_APPEARANCE[DefaultAppearance.TEXT] = 'Heading'; DEFAULT_APPEARANCE[DefaultAppearance.FONT_SIZE] = 24; export class Heading implements ShapePlugin { public identifier(): string { return 'Heading'; } public defaultAppearance() { return DEFAULT_APPEARANCE; } public defaultSize() { return { x: 90, y: 35 }; } public constraint(factory: ConstraintFactory) { return factory.textSize(10); } public render(ctx: RenderContext) { ctx.renderer2.text(ctx.shape, ctx.rect, p => { p.setForegroundColor(ctx.shape); }); } }
typescript
<gh_stars>0 export default [ // user { path: '/user', component: '../layouts/UserLayout', routes: [ { path: '/user', redirect: '/user/login' }, { path: '/user/login', name: 'login', component: './User/Login' }, { path: '/user/register', name: 'register', component: './User/Register' }, { path: '/user/register-result', name: 'register.result', component: './User/RegisterResult', }, { component: '404', }, ], }, // app { path: '/', component: '../layouts/BasicLayout', Routes: ['src/pages/Authorized'], routes: [ // dashboard { path: '/', redirect: '/goods', authority: ['ADMIN'] }, // 商品管理页面 { path: '/goods', icon: 'table', name: 'goods', authority: ['ADMIN'], component: './Goods/BasicList', }, { path: '/goods/:id', hideInMenu: true, name: 'gooddetail', authority: ['ADMIN'], component: './Goods/BasicProfile', }, // 订单管理页面 { path: '/orders', icon: 'table', name: 'orders', authority: ['ADMIN'], component: './Orders/TableList', }, { path: '/orders/:id', hideInMenu: true, name: 'orderdetail', authority: ['ADMIN'], component: './Orders/BasicProfile', }, { path: '/users', icon: 'table', authority: ['ADMIN'], name: 'users', component: './Users/BasicList', }, { name: 'exception', icon: 'warning', path: '/exception', hideInMenu: true, routes: [ // exception { path: '/exception/403', name: 'not-permission', component: './Exception/403', }, { path: '/exception/404', name: 'not-find', component: './Exception/404', }, { path: '/exception/500', name: 'server-error', component: './Exception/500', }, { path: '/exception/trigger', name: 'trigger', hideInMenu: true, component: './Exception/TriggerException', }, ], }, ], }, ];
javascript
<link rel="stylesheet" href="../../../../default.css"> <script src="../../../../highlight.pack.js"></script> <script>hljs.initHighlightingOnLoad();</script> <html><h3></h3><h3>Before Change</h3><pre><code class='java'> sens_index = dataset.feature_names.index(self.sensitive_attr) x_train = dataset.features y_train = np.array([1 if y == <a id="change">[dataset.favorable_label]</a> else -1 for y in dataset.labels]) x_control_train = x_train[:, sens_index].copy() </code></pre><h3>After Change</h3><pre><code class='java'> x_train = dataset.features y_train = np.where(dataset.labels.flatten() == dataset.favorable_label, 1, -1) <a id="change">x_control_train = np.where( np.isin(dataset.protected_attributes[:, sens_idx], dataset.privileged_protected_attributes[sens_idx]), 1, 0)</a> self.model = self.obj.getModel(self.tau, x_train, y_train, x_control_train, self.seed) </code></pre>
html
#! /usr/bin/env python3 # coding: utf-8 # modified example from https://weatherstack.com/documentation import requests, hvac, getpass # sets up the vault client, prompts for creds, and gather's the data client = hvac.Client(url='http://localhost:8200') client.auth.userpass.login(input("username: "), getpass.getpass(prompt='password: ', stream=None),mount_point='userpass') token = client.secrets.kv.v2.read_secret_version(path='api_key')['data']['data']['token'] params = { 'access_key': token, # Nashville 'query': '36.1608014,-86.7833216', 'forcast_days': '1', 'days': '1', 'units': 'f' } api_result = requests.get('http://api.weatherstack.com/forecast', params) api_response = api_result.json() city = api_response['location']['name'] region = api_response['location']['region'] for i, k in enumerate(api_response['forecast']): forecast_values = api_response['forecast'][k] max_temp = forecast_values['maxtemp'] min_temp = forecast_values['mintemp'] avg_temp = forecast_values['avgtemp'] uv_index = forecast_values['uv_index'] print(f'Forcast for {city}, {region} tomorrow is \n\taverage temp: {avg_temp} F \n\tminimum temp: {min_temp} F \n\tmaximum temp: {max_temp} F \n\tUV index: {uv_index}')
python
A study published in the journal ‘Nature’ on Wednesday – an analysis of over 17 million people in England (40 per cent of the English population) – has quantified a range of clinical risk factors for deaths associated with Covid-19. The authors of the study claim that it is the largest cohort study conducted by any country to date. What does the study say? In the study, the researchers linked the data of more than 17 million adults to 10,000 of those who died due to the disease. They found that deaths were associated with being male, older age, deprivation, diabetes and severe asthma, among other factors. They also note that compared with white people, Blacks and South Asians were at a higher risk of developing poorer outcomes due to the disease. Out of the 17 million people in the study, 11 per cent had non-white ethnicities. Significantly, they found that old age was “strongly associated” with risk, with those 80 years or above at 20-fold increased risk than those between the age 50-59 years. As per them, most comorbidities were associated with increased risk – these include cardiovascular diseases, diabetes, respiratory disease such as asthma, obesity, cancer, kidney, liver, neurological or autoimmune conditions. Even so, one limitation of the study is that the researchers included in the study clinically suspected and not laboratory-confirmed Covid-19 cases, as a result of which some patients could have been incorrectly identified as Covid-19 positive. So what is new about the findings? It is already known that older individuals and those with comorbidities are at higher risk of developing severe outcomes from the disease and the findings of the study are largely in line with what is being observed in Covid-19 patients around the world. Therefore, more than the nature of their findings, it is the scale of the study that has allowed researchers to be more precise on rare exposures, multiple risk factors and the rapid detection of important signals. Essentially, studying the disease patterns in such a large data set has allowed the researchers to assess the less common risk factors more robustly.
english
This article is republished from The Conversation under a Creative Commons license. Read the original article, which was published July 11, 2022. Whether to spend money on outer space exploration or to apply it to solve serious problems on Earth, like climate change and food shortages, is a contentious debate. But one argument in favour of space exploration highlights benefits that do, in fact, help study, monitor and address serious concerns like climate change and food production. As access to space increases, the potential for terrestrial benefits directly tied to space exploration grow exponentially. For example, agriculture has been improved significantly through the application of space-based advances to terrestrial challenges. It is now increasingly likely that food items have been produced with the assistance of space-based technologies, like freeze-dried foods, or through the use of crop monitoring from space-based observatories. Satellite monitoring is arguably the most realized benefit of space for farming. Like mindful eyes in the sky, satellites watch over the farmlands across the globe day and night. Specialized sensors on relevant satellites (for example, NASA’s Landsat, the European Space Agency’s Envisat and the Canadian Space Agency’s RADARSAT) monitor various parameters relevant to agriculture. Sensors monitoring soil moisture can tell us when and how fast soils are drying, helping direct more efficient irrigation on a regional scale. Weather satellites help predict drought, floods, precipitation patterns and plant disease outbreaks. Satellite data helps us predict food insecurity threats or crop failures. It’s not only lifeless machines that dwell in space. Humans have managed to survive and grow plants in low-Earth orbit aboard several spacecraft and stations. Space is the ultimate “harsh environment” for life to exist in, including plants, due to such novel stressors as cosmic radiation and lack of gravity. Space biologist Anna-Lisa Paul describes plants as being able to “reach into their genetic toolbox and remake the tools they need” to adapt to the novel environment of space. The new tools and behaviours expressed by plants under spaceflight conditions could be used to solve challenges facing crops in Earth’s changing climate. Researchers at NASA sent cotton seeds to the International Space Station to understand how cotton roots grow in the absence of gravity. The findings of the research will help develop cotton plant varieties with a deeper root system to access and absorb water more efficiently from soil in drought-prone areas. Soon, humans will go to the moon and eventually to Mars. While there, astronauts will have to grow their own food. Space agencies have been working on specialized systems that provide the conditions necessary for plant cultivation in space. These systems are containers that can control the internal environment and grow plants without soil under LED lights. NASA’s research in controlled environment systems to grow plants was foundational in developing the modern-day vertical farm sector — indoor farms that grow crops in stacks without soil under the purple haze of LEDs. Now a burgeoning industry, vertical farms are churning out enormous volumes of fresh and healthy leafy crops with a fraction of the water and nutrients that would be used in land-based farm systems. Vertical farms can be set up within cities, right where the demand lies, thereby cutting the need for long-distance transport. As crops are grown indoors in controlled environments, vertical farms can substantially reduce the reliance on herbicides and pesticides, while recycling water and preventing nutrient runoff. Considering the constraints of space, crop production techniques need to be more energy-efficient and require minimal human input. Crops need to also be nutrition-rich, with the ability to withstand high-stress environments. These features are also desirable for crops on Earth. Scientists are developing a more resource-efficient potato crop where the whole plant can be consumed, including roots, shoots and fruits. Such crops will play a pivotal role in addressing food and nutritional security on Earth and in space. Space exploration has served as a major driver for technological advances. The renewed interest in space can only benefit agriculture here on Earth by providing new opportunities to improve agriculture. Innovations that are quite literally out-of-this-world can provide us tools to tackle food production under the looming threats posed by global climate change. Written by Ajwal Dsouza, PhD Candidate, Environmental Sciences, University of Guelph, and Thomas Graham, Assistant Professor, Environmental Sciences, University of Guelph.
english
<gh_stars>0 package com.juvenxu.mvnbook.account.service; public class AccountServiceException extends Exception { private static final long serialVersionUID = 949282286716874926L; public AccountServiceException( String message ) { super( message ); } public AccountServiceException( String message, Throwable throwable ) { super( message, throwable ); } }
java
{% strip %} <div class="overview"> <div class="row"> {% include blocks/overview_block.html overview=true dir="/developerportal/companyadmin/" category="Company Admin" icon="apidocs/-icon-sdk.png" %} </div> </div> {% endstrip %}
html
package trading import ( "encoding/json" "fmt" "net/http" "net/http/httptest" "testing" "time" "github.com/quantfamily/lemonmarkets/client" "github.com/quantfamily/lemonmarkets/client/helpers" "github.com/stretchr/testify/assert" ) func TestAccount(t *testing.T) { rawFileBytes := helpers.ParseFile(t, "get_account.json") t.Run("fail to get response", func(t *testing.T) { expectedErr := client.LemonError{ Time: time.Time{}, Mode: "paper", Status: "error", Code: "order_total_price_limit_exceeded", Message: "cannot place/activate buy order if estimated total price is greater than 25k Euro", } errRsp, _ := json.Marshal(&expectedErr) server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { http.Error(w, string(errRsp), 400) })) defer server.Close() backend := client.Backend{BaseURL: server.URL} client := TradingClient{backend: &backend} account := client.GetAccount() assert.NotNil(t, account.Error) assert.Equal(t, &expectedErr, account.Error) }) t.Run("Fail to decode results", func(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, `really odd response`) })) defer server.Close() backend := client.Backend{BaseURL: server.URL} client := TradingClient{backend: &backend} account := client.GetAccount() assert.NotNil(t, account.Error) assert.ObjectsAreEqual(&json.SyntaxError{}, account.Error) }) t.Run("Successful test", func(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, string(rawFileBytes)) })) defer server.Close() backend := client.Backend{BaseURL: server.URL} client := TradingClient{backend: &backend} account := client.GetAccount() assert.Nil(t, account.Error) assert.Equal(t, "basic", account.Data.TradingPlan) assert.Equal(t, "K2057263187", account.Data.DepositID) assert.Equal(t, "<EMAIL>", account.Data.EMail) }) } func TestCreateWithdrawal(t *testing.T) { t.Run("fail to get response", func(t *testing.T) { expectedErr := client.LemonError{ Time: time.Time{}, Mode: "paper", Status: "error", Code: "order_total_price_limit_exceeded", Message: "cannot place/activate buy order if estimated total price is greater than 25k Euro", } errRsp, _ := json.Marshal(&expectedErr) server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { http.Error(w, string(errRsp), 400) })) defer server.Close() backend := client.Backend{BaseURL: server.URL} client := TradingClient{backend: &backend} err := client.CreateWithdrawal(&Withdrawal{Amount: 10}) assert.NotNil(t, err) assert.Equal(t, &expectedErr, err) }) t.Run("Successful test", func(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, `{"status": "ok"}`) })) defer server.Close() backend := client.Backend{BaseURL: server.URL} client := TradingClient{backend: &backend} err := client.CreateWithdrawal(&Withdrawal{Amount: 10}) assert.Nil(t, err) }) } func TestGetWithdrawals(t *testing.T) { rawFileBytes := helpers.ParseFile(t, "get_withdrawals.json") t.Run("fail to get response", func(t *testing.T) { expectedErr := client.LemonError{ Time: time.Time{}, Mode: "paper", Status: "error", Code: "order_total_price_limit_exceeded", Message: "cannot place/activate buy order if estimated total price is greater than 25k Euro", } errRsp, _ := json.Marshal(&expectedErr) server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { http.Error(w, string(errRsp), 400) })) defer server.Close() backend := client.Backend{BaseURL: server.URL} client := TradingClient{backend: &backend} withdrawalCh := client.GetWithdrawals() withdrawal := <-withdrawalCh assert.NotNil(t, withdrawal.Error) assert.Equal(t, &expectedErr, withdrawal.Error) }) t.Run("Fail to decode results", func(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, `really odd response`) })) defer server.Close() backend := client.Backend{BaseURL: server.URL} client := TradingClient{backend: &backend} withdrawalCh := client.GetWithdrawals() withdrawal := <-withdrawalCh assert.NotNil(t, withdrawal.Error) assert.ObjectsAreEqual(&json.SyntaxError{}, withdrawal.Error) }) t.Run("Successful test", func(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, string(rawFileBytes)) })) defer server.Close() backend := client.Backend{BaseURL: server.URL} client := TradingClient{backend: &backend} withdrawalCh := client.GetWithdrawals() withdrawal := <-withdrawalCh assert.Nil(t, withdrawal.Error) assert.Equal(t, 1000000, withdrawal.Data.Amount) }) } func TestGetBankStatements(t *testing.T) { rawFileBytes := helpers.ParseFile(t, "get_bankstatements.json") t.Run("fail to get response", func(t *testing.T) { expectedErr := client.LemonError{ Time: time.Time{}, Mode: "paper", Status: "error", Code: "order_total_price_limit_exceeded", Message: "cannot place/activate buy order if estimated total price is greater than 25k Euro", } errRsp, _ := json.Marshal(&expectedErr) server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { http.Error(w, string(errRsp), 400) })) defer server.Close() backend := client.Backend{BaseURL: server.URL} client := TradingClient{backend: &backend} bankstatementCh := client.GetBankStatements() bankstatement := <-bankstatementCh assert.NotNil(t, bankstatement.Error) assert.Equal(t, &expectedErr, bankstatement.Error) }) t.Run("Fail to decode results", func(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, `really odd response`) })) defer server.Close() backend := client.Backend{BaseURL: server.URL} client := TradingClient{backend: &backend} bankstatementCh := client.GetBankStatements() bankstatement := <-bankstatementCh assert.NotNil(t, bankstatement.Error) assert.ObjectsAreEqual(&json.SyntaxError{}, bankstatement.Error) }) t.Run("Successful test", func(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, string(rawFileBytes)) })) defer server.Close() backend := client.Backend{BaseURL: server.URL} client := TradingClient{backend: &backend} bankstatementCh := client.GetBankStatements() bankstatement := <-bankstatementCh assert.Nil(t, bankstatement.Error) assert.Equal(t, 100000, bankstatement.Data.Amount) }) } func TestGetDocuments(t *testing.T) { rawFileBytes := helpers.ParseFile(t, "get_documents.json") t.Run("fail to get response", func(t *testing.T) { expectedErr := client.LemonError{ Time: time.Time{}, Mode: "paper", Status: "error", Code: "order_total_price_limit_exceeded", Message: "cannot place/activate buy order if estimated total price is greater than 25k Euro", } errRsp, _ := json.Marshal(&expectedErr) server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { http.Error(w, string(errRsp), 400) })) defer server.Close() backend := client.Backend{BaseURL: server.URL} client := TradingClient{backend: &backend} documentCh := client.GetDocuments() document := <-documentCh assert.NotNil(t, document.Error) assert.Equal(t, &expectedErr, document.Error) }) t.Run("Fail to decode results", func(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, `really odd response`) })) defer server.Close() backend := client.Backend{BaseURL: server.URL} client := TradingClient{backend: &backend} documentCh := client.GetDocuments() document := <-documentCh assert.NotNil(t, document.Error) assert.ObjectsAreEqual(&json.SyntaxError{}, document.Error) }) t.Run("Successful test", func(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, string(rawFileBytes)) })) defer server.Close() backend := client.Backend{BaseURL: server.URL} client := TradingClient{backend: &backend} documentCh := client.GetDocuments() document := <-documentCh assert.Nil(t, document.Error) assert.Equal(t, "account_opening.pdf", document.Data.Name) }) } func TestGetAccountIntegration(t *testing.T) { client := IntegrationClient(t) account := client.GetAccount() assert.Nil(t, account.Error) } func TestGetWithdrawalIntegration(t *testing.T) { client := IntegrationClient(t) ch := client.GetWithdrawals() withdrawal := <-ch assert.Nil(t, withdrawal.Error) } func TestGetWithdrawalsIntegration(t *testing.T) { client := IntegrationClient(t) ch := client.GetWithdrawals() withdrawal := <-ch assert.Nil(t, withdrawal.Error) } func TestGetBankStatementsIntegration(t *testing.T) { client := IntegrationClient(t) ch := client.GetBankStatements() bankstatement := <-ch assert.Nil(t, bankstatement.Error) } func TestGetDocumentsIntegration(t *testing.T) { client := IntegrationClient(t) ch := client.GetDocuments() document := <-ch assert.Nil(t, document.Error) }
go
<gh_stars>1-10 { "generator-easy-ui5": { "projectname": "workbench", "namespace": "com.mrb", "platform": "Static webserver", "viewtype": "XML", "viewname": "Main", "ui5libs": "Content delivery network (OpenUI5)", "newdir": false, "namespaceURI": "com/mrb" } }
json
<filename>systests/src/test/java/org/apache/qpid/test/unit/client/temporaryqueue/TemporaryQueueTest.java /* * * 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.qpid.test.unit.client.temporaryqueue; import org.apache.qpid.client.AMQDestination; import org.apache.qpid.client.AMQSession; import org.apache.qpid.test.utils.QpidBrokerTestCase; import javax.jms.Connection; import javax.jms.JMSException; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TemporaryQueue; import javax.jms.TextMessage; /** * Tests the behaviour of {@link TemporaryQueue}. */ public class TemporaryQueueTest extends QpidBrokerTestCase { /** * Tests the basic produce/consume behaviour of a temporary queue. */ public void testMessageDeliveryUsingTemporaryQueue() throws Exception { final Connection conn = getConnection(); final Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); final TemporaryQueue queue = session.createTemporaryQueue(); assertNotNull(queue); final MessageProducer producer = session.createProducer(queue); final MessageConsumer consumer = session.createConsumer(queue); conn.start(); producer.send(session.createTextMessage("hello")); TextMessage tm = (TextMessage) consumer.receive(2000); assertNotNull("Message not received", tm); assertEquals("hello", tm.getText()); } /** * Tests that a temporary queue cannot be used by another {@link Session}. */ public void testUseFromAnotherSessionProhibited() throws Exception { final Connection conn = getConnection(); final Session session1 = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); final Session session2 = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); final TemporaryQueue queue = session1.createTemporaryQueue(); assertNotNull(queue); try { session2.createConsumer(queue); fail("Expected a JMSException when subscribing to a temporary queue created on a different session"); } catch (JMSException je) { //pass assertEquals("Cannot consume from a temporary destination created on another session", je.getMessage()); } } /** * Tests that the client is able to explicitly delete a temporary queue using * {@link TemporaryQueue#delete()} and is prevented from deleting one that * still has consumers. * * Note: Under < 0-10 {@link TemporaryQueue#delete()} only marks the queue as deleted * on the client. 0-10 causes the queue to be deleted from the Broker. */ public void testExplictTemporaryQueueDeletion() throws Exception { final Connection conn = getConnection(); final Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); final AMQSession<?, ?> amqSession = (AMQSession<?, ?>)session; // Required to observe the queue binding on the Broker final TemporaryQueue queue = session.createTemporaryQueue(); assertNotNull(queue); final MessageConsumer consumer = session.createConsumer(queue); conn.start(); assertTrue("Queue should be bound", amqSession.isQueueBound((AMQDestination)queue)); try { queue.delete(); fail("Expected JMSException : should not be able to delete while there are active consumers"); } catch (JMSException je) { //pass assertEquals("Temporary Queue has consumers so cannot be deleted", je.getMessage()); } consumer.close(); // Now deletion should succeed. queue.delete(); try { session.createConsumer(queue); fail("Exception not thrown"); } catch (JMSException je) { //pass assertEquals("Cannot consume from a deleted destination", je.getMessage()); } if (isBroker010()) { assertFalse("Queue should no longer be bound", amqSession.isQueueBound((AMQDestination)queue)); } } /** * Tests that a temporary queue remains available for reuse even after its initial * consumer has disconnected. * * This test would fail under < 0-10 as their temporary queues are deleted automatically * (broker side) after the last consumer disconnects (so message2 would be lost). For this * reason this test is excluded from those profiles. */ public void testTemporaryQueueReused() throws Exception { final Connection conn = getConnection(); final Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); final TemporaryQueue queue = session.createTemporaryQueue(); assertNotNull(queue); final MessageProducer producer1 = session.createProducer(queue); final MessageConsumer consumer1 = session.createConsumer(queue); conn.start(); producer1.send(session.createTextMessage("message1")); producer1.send(session.createTextMessage("message2")); TextMessage tm = (TextMessage) consumer1.receive(2000); assertNotNull("Message not received by first consumer", tm); assertEquals("message1", tm.getText()); consumer1.close(); final MessageConsumer consumer2 = session.createConsumer(queue); conn.start(); tm = (TextMessage) consumer2.receive(2000); assertNotNull("Message not received by second consumer", tm); assertEquals("message2", tm.getText()); consumer2.close(); } }
java
<reponame>NextFEM/API-Python # coding=utf8 # to launch file: exec(open('filename.py').read()) import clr import os; import ctypes; # for dialog boxes from winreg import * # for reg. access addr = r"SOFTWARE\Classes\NextFEM Designer\shell\open\command" aReg = ConnectRegistry(None, HKEY_LOCAL_MACHINE) aKey = OpenKey(aReg, addr); vkey = QueryValueEx(aKey,None) dir=os.path.split(vkey[0].replace('"','').replace("%1","").strip())[0] dirname=os.path.dirname # support for cleaning screen: call clear() clear = lambda: os.system('cls') clr.AddReference(dir + "\\NextFEMapi.dll") # support for message boxes in Windows def msgbox(title, text, style): return ctypes.windll.user32.MessageBoxW(0, text, title, style) import NextFEMapi nf=NextFEMapi.API() # put you model name HERE nf.openModel(dir + "\\testAPI.nxf") # nodal forces node = "21"; loadcase = "perm" d={}; dt={} connElem = nf.getConnectedElements(node); print("Connected elements: " + str(connElem)) if not connElem: quit() # for coordinate tranformation use local axes of 1st element in list lcs=nf.getLocalAxes(connElem[0]) for el in connElem: solls=nf.getBeamForcesAtNode(el,node,loadcase) s=[] for so in solls: s.append(so) d[el] = s # tranformation print("Elem" + str(el) +" ----------------------------------------") print(s) vF=NextFEMapi.vert3(s[0],s[1],s[2]); vM=NextFEMapi.vert3(s[3],s[4],s[5]) res1=vF.v3Transform(lcs); res2=vM.v3Transform(lcs) sT=[res1.X,res1.Y,res1.Z,res2.X,res2.Y,res2.Z]; print(sT) dt[el] = sT print("-----------------------------------------------") print(d); print(dt)
python
Watch I Hate You Web Series All Episodes Online On Rabbit Movies Cast Crew & Actress Name: A new web series is going to be premiered soon on Rabbit Original App and the series name is titled ‘I Hate You’. To increase the level of excitement among the audience, the makers of the series have released its trailer on its online platform. The trailer itself is very electrifying and has increased the level of interest among the viewers who are now excitedly waiting for its premiere. This crime romance web series is also building a lot of thrill since its trailer has been launched on Rabbit’s online video platform. The thing to be noted is that the ‘I Hate You’ series is featuring new actors and actresses to play the lead and main characters in this web series. So, you will definitely see some new faces and their acting skills in this series. So far, not very much is revealed about the series, however we have gathered all the details that have been announced so far, so that you can get a complete overview of the upcoming ‘I Hate You’ Web Series. As this series has started creating a lot of buzz online, we are here to provide you some important details about ‘I Hate You’ Web Series including its casts, episodes, plot, and so much more. The series ‘I Hate You’ revolves around a woman named Alia Khanna who is married but still in search of deep love. Due to this she gets romantically involved with other men also, however, the plot will take a dramatic twist at the end and what will happen next is the main climax of this crime romance series. The trailer of the crime-romance web series ‘I Hate You’ has been already released online at the official platform of Rabbit Movies App on Wednesday. In addition to that, the viewers can also get the access of ‘I Hate You’ official trailer on YouTube. The makers have released its trailer on Rabbit Movies YouTube channel 17 hours before on 26th May 2021. So far, the trailer is gaining good attention from the audience and the plot of the series also seems to be quite exciting. The ‘I Hate You’ Web Series is going to premiere on 29th May 2021 (Saturday) and will be streamed only at Rabbit Movies App or its official website. This app is a Video on Demand Platform that lets its users or viewers to get access to a wide range of Web Series, movies and entertaining videos. Download the Rabbit Movies App to stream this exciting web series on its premiere date i.e. on May 29.
english
<filename>docs/data/leg-t2/009/00902201.json {"nom":"Montégut-en-Couserans","circ":"2ème circonscription","dpt":"Ariège","inscrits":71,"abs":31,"votants":40,"blancs":0,"nuls":3,"exp":37,"res":[{"nuance":"REM","nom":"<NAME>","voix":23},{"nuance":"FI","nom":"<NAME>","voix":14}]}
json
{"season":18,"name":"Ice Cream of Margie: With the Light Blue Hair","year":"2006","rated":"TV-PG","released":null,"episode":7,"runtime":"30 min","genres":"Animation, Comedy","director":"<NAME>","writer":"<NAME> (created by), <NAME> (developed by), <NAME> (developed by), <NAME> (developed by), <NAME>","actors":"<NAME>, <NAME>, <NAME>, <NAME>","plot":"Homer sets up as an ice cream salesman,having bought a van from the widow of ice-cream seller Max. Marge,feeling a need to express her creative instincts,becomes famous as a folk art sculptress when she makes life-sized figures of Springfielders from the discarded popsicle sticks and even has her own exhibition. In his haste to attend it Homer runs his van through all Marge's statues and accidentally destroys them. But Marge has yet to create the ultimate figure,which will still be hailed as a masterpiece two hundred years later.","languages":"English","country":"USA","awards":"N/A","poster":"http://ia.media-imdb.com/images/M/MV5BMTk0MTAzMzgxOV5BMl5BanBnXkFtZTgwOTM3Mjg4MzE@._V1_SX300.jpg","ratings":[{"Source":"Internet Movie Database","Value":"6.9/10"}],"metascore":"N/A","rating":"6.9","votes":"553","imdbid":"tt0888355","seriesid":"tt0096697","type":"episode","response":"True"}
json
<gh_stars>1-10 #include "RenderSystem/Vulkan/Managers/CDeviceMemoryManager.h" #if VKE_VULKAN_RENDERER #include "RenderSystem/CDeviceContext.h" #include "RenderSystem/CDDI.h" namespace VKE { namespace RenderSystem { CDeviceMemoryManager::CDeviceMemoryManager(CDeviceContext* pCtx) : m_pCtx{ pCtx } { } CDeviceMemoryManager::~CDeviceMemoryManager() { } Result CDeviceMemoryManager::Create(const SDeviceMemoryManagerDesc& Desc) { m_Desc = Desc; Result ret = VKE_OK; // Add empty pool m_PoolBuffer.Add( {} ); m_vPoolViews.PushBack( {} ); m_vSyncObjects.PushBack( {} ); m_lastPoolSize = Desc.defaultPoolSize; return ret; } void CDeviceMemoryManager::Destroy() { } handle_t CDeviceMemoryManager::_CreatePool( const SCreateMemoryPoolDesc& Desc ) { handle_t ret = INVALID_HANDLE; SAllocateMemoryDesc AllocDesc; AllocDesc.size = Desc.size; AllocDesc.usage = Desc.usage; SAllocateMemoryData MemData; Result res = m_pCtx->DDI().Allocate( AllocDesc, &MemData ); if( VKE_SUCCEEDED( res ) ) { SPool Pool; Pool.Data = MemData; ret = m_PoolBuffer.Add( Pool ); if( ret != UNDEFINED_U32 ) { CMemoryPoolView::SInitInfo Info; Info.memory = (uint64_t)(MemData.hDDIMemory); Info.offset = 0; Info.size = Desc.size; Info.allocationAlignment = Desc.alignment; CMemoryPoolView View; handle_t viewIdx = ret; // There is a new pool to be added if( ret >= m_vPoolViews.GetCount() ) { viewIdx = m_vPoolViews.PushBack( View ); m_vSyncObjects.PushBack( {} ); } { m_vPoolViews[ viewIdx ].Init( Info ); } m_totalMemAllocated += AllocDesc.size; VKE_LOG_WARN("Created new device memory pool with size: " << VKE_LOG_MEM_SIZE(AllocDesc.size) << "."); VKE_LOG("Total device memory allocated: " << VKE_LOG_MEM_SIZE(m_totalMemAllocated) << "."); } } return ret; } uint32_t CalculateNewPoolSize(const uint32_t& newPoolSize, const uint32_t& lastPoolSize, const SDeviceMemoryManagerDesc& Desc) { uint32_t ret = newPoolSize; if (newPoolSize == 0) { switch (Desc.resizePolicy) { case DeviceMemoryResizePolicies::DEFAULT_SIZE: { ret = Desc.defaultPoolSize; break; } case DeviceMemoryResizePolicies::TWO_TIMES_DEFAULT_SIZE: { ret = Desc.defaultPoolSize * 2; break; } case DeviceMemoryResizePolicies::FOUR_TIMES_DEFAULT_SIZE: { ret = Desc.defaultPoolSize * 4; break; } case DeviceMemoryResizePolicies::TWO_TIMES_LAST_SIZE: { ret = lastPoolSize * 2; break; } case DeviceMemoryResizePolicies::FOUR_TIMES_LAST_SIZE: { ret = lastPoolSize * 4; break; } } } return ret; } handle_t CDeviceMemoryManager::_CreatePool(const SAllocateDesc& Desc, const SAllocationMemoryRequirementInfo& MemReq) { auto poolSize = std::max<uint32_t>(m_lastPoolSize, MemReq.size); poolSize = std::max<uint32_t>(poolSize, Desc.poolSize); SCreateMemoryPoolDesc PoolDesc; PoolDesc.usage = Desc.Memory.memoryUsages; PoolDesc.size = poolSize; PoolDesc.alignment = MemReq.alignment; handle_t hPool = _CreatePool(PoolDesc); m_mPoolIndices[Desc.Memory.memoryUsages].PushBack(hPool); m_lastPoolSize = poolSize; return hPool; } handle_t CDeviceMemoryManager::_AllocateFromPool( const SAllocateDesc& Desc, const SAllocationMemoryRequirementInfo& MemReq, SBindMemoryInfo* pBindInfoOut ) { handle_t ret = INVALID_HANDLE; //SPool* pPool = nullptr; auto Itr = m_mPoolIndices.find( Desc.Memory.memoryUsages ); // If no pool is created for such memory usage create a new one // and call this function again if( Itr == m_mPoolIndices.end() ) { const handle_t hPool = _CreatePool(Desc, MemReq); VKE_ASSERT(hPool != INVALID_HANDLE, ""); ret = _AllocateFromPool( Desc, MemReq, pBindInfoOut ); } else { const HandleVec& vHandles = Itr->second; SAllocateMemoryInfo Info; Info.alignment = MemReq.alignment; Info.size = MemReq.size; uint64_t memory = CMemoryPoolView::INVALID_ALLOCATION; // Find firt pool with enough memory for( uint32_t i = 0; i < vHandles.GetCount(); ++i ) { const auto poolIdx = vHandles[ i ]; //auto& Pool = m_PoolBuffer[ poolIdx ]; auto& View = m_vPoolViews[ poolIdx ]; CMemoryPoolView::SAllocateData Data; memory = View.Allocate( Info, &Data ); if( memory != CMemoryPoolView::INVALID_ALLOCATION ) { pBindInfoOut->hDDIBuffer = Desc.Memory.hDDIBuffer; pBindInfoOut->hDDITexture = Desc.Memory.hDDITexture; pBindInfoOut->hDDIMemory = (DDIMemory)( Data.memory ); pBindInfoOut->offset = Data.offset; pBindInfoOut->hMemory = poolIdx; UAllocationHandle Handle; SMemoryAllocationInfo AllocInfo; AllocInfo.hMemory = Data.memory; AllocInfo.offset = Data.offset; AllocInfo.size = Info.size; Handle.hAllocInfo = m_AllocBuffer.Add( AllocInfo ); Handle.hPool = static_cast< uint16_t >( poolIdx ); Handle.dedicated = false; ret = Handle.handle; break; } } // If there is no free space in any of currently allocated pools if (memory == CMemoryPoolView::INVALID_ALLOCATION) { // Create new memory pool SAllocateDesc NewDesc = Desc; NewDesc.poolSize = CalculateNewPoolSize(Desc.poolSize, m_lastPoolSize, m_Desc); const float sizeMB = NewDesc.poolSize / 1024.0f / 1024.0f; VKE_LOG_WARN("No device memory for allocation with requirements: " << VKE_LOG_MEM_SIZE(MemReq.size) << ", " << MemReq.alignment << " bytes alignment."); //VKE_LOG_WARN("Create new device memory pool with size: " << VKE_LOG_MEM_SIZE(NewDesc.poolSize) << "."); const handle_t hPool = _CreatePool(NewDesc, MemReq); //VKE_LOG_WARN("Total device memory allocated: " << VKE_LOG_MEM_SIZE(m_totalMemAllocated) << "." ); VKE_ASSERT(hPool != INVALID_HANDLE, ""); ret = _AllocateFromPool(Desc, MemReq, pBindInfoOut); } } m_totalMemUsed += MemReq.size; return ret; } handle_t CDeviceMemoryManager::_AllocateMemory( const SAllocateDesc& Desc, SBindMemoryInfo* pOut ) { handle_t ret = INVALID_HANDLE; const auto dedicatedAllocation = Desc.Memory.memoryUsages & MemoryUsages::DEDICATED_ALLOCATION; SAllocationMemoryRequirementInfo MemReq = {}; if( Desc.Memory.hDDIBuffer != DDI_NULL_HANDLE ) { m_pCtx->DDI().GetBufferMemoryRequirements( Desc.Memory.hDDIBuffer, &MemReq ); } else if( Desc.Memory.hDDITexture != DDI_NULL_HANDLE ) { m_pCtx->DDI().GetTextureMemoryRequirements( Desc.Memory.hDDITexture, &MemReq ); } if( !dedicatedAllocation ) { ret =_AllocateFromPool( Desc, MemReq, pOut ); } else { SAllocateMemoryData Data; SAllocateMemoryDesc AllocDesc; AllocDesc.size = MemReq.size; AllocDesc.usage = Desc.Memory.memoryUsages; Result res = m_pCtx->_GetDDI().Allocate( AllocDesc, &Data ); if( VKE_SUCCEEDED( res ) ) { auto& BindInfo = *pOut; BindInfo.hDDITexture = Desc.Memory.hDDITexture; BindInfo.hDDIBuffer = Desc.Memory.hDDIBuffer; BindInfo.hDDIMemory = Data.hDDIMemory; BindInfo.hMemory = INVALID_HANDLE; BindInfo.offset = 0; SMemoryAllocationInfo AllocInfo; AllocInfo.hMemory = ( handle_t )( Data.hDDIMemory ); AllocInfo.offset = 0; AllocInfo.size = AllocDesc.size; UAllocationHandle Handle; Handle.dedicated = true; Handle.hAllocInfo = m_AllocBuffer.Add( AllocInfo ); Handle.hPool = 0; ret = Handle.handle; VKE_LOG_WARN("Allocate new device memory with size: " << VKE_LOG_MEM_SIZE(AllocDesc.size) << "."); m_totalMemAllocated += AllocDesc.size; m_totalMemUsed += AllocDesc.size; VKE_LOG_WARN("Total device memory allocated: " << VKE_LOG_MEM_SIZE(m_totalMemAllocated) << "."); } } return ret; } handle_t CDeviceMemoryManager::AllocateBuffer( const SAllocateDesc& Desc ) { SBindMemoryInfo BindInfo; handle_t ret = _AllocateMemory( Desc, &BindInfo ); if( ret != INVALID_HANDLE ) { { m_pCtx->_GetDDI().Bind< ResourceTypes::BUFFER >( BindInfo ); } } return ret; } handle_t CDeviceMemoryManager::AllocateTexture(const SAllocateDesc& Desc ) { SBindMemoryInfo BindInfo; handle_t ret = _AllocateMemory( Desc, &BindInfo ); if( ret != INVALID_HANDLE ) { { m_pCtx->_GetDDI().Bind< ResourceTypes::TEXTURE >( BindInfo ); } } return ret; } Result CDeviceMemoryManager::UpdateMemory( const SUpdateMemoryInfo& DataInfo, const SBindMemoryInfo& BindInfo ) { Result ret = VKE_ENOMEMORY; SMapMemoryInfo MapInfo; MapInfo.hMemory = BindInfo.hDDIMemory; MapInfo.offset = BindInfo.offset + DataInfo.dstDataOffset; MapInfo.size = DataInfo.dataSize; void* pDst = m_pCtx->DDI().MapMemory( MapInfo ); if( pDst != nullptr ) { Memory::Copy( pDst, DataInfo.dataSize, DataInfo.pData, DataInfo.dataSize ); ret = VKE_OK; } m_pCtx->DDI().UnmapMemory( BindInfo.hDDIMemory ); return ret; } Result CDeviceMemoryManager::UpdateMemory( const SUpdateMemoryInfo& DataInfo, const handle_t& hMemory ) { UAllocationHandle Handle = hMemory; const auto& AllocInfo = m_AllocBuffer[ Handle.hAllocInfo ]; Result ret = VKE_ENOMEMORY; SMapMemoryInfo MapInfo; MapInfo.hMemory = ( DDIMemory )( AllocInfo.hMemory ); MapInfo.offset = AllocInfo.offset + DataInfo.dstDataOffset; MapInfo.size = DataInfo.dataSize; { Threads::ScopedLock l( m_vSyncObjects[Handle.hPool] ); void* pDst = m_pCtx->DDI().MapMemory( MapInfo ); if( pDst != nullptr ) { Memory::Copy( pDst, DataInfo.dataSize, DataInfo.pData, DataInfo.dataSize ); ret = VKE_OK; } m_pCtx->DDI().UnmapMemory( MapInfo.hMemory ); } return ret; } void* CDeviceMemoryManager::MapMemory(const SUpdateMemoryInfo& DataInfo, const handle_t& hMemory) { UAllocationHandle Handle = hMemory; const auto& AllocInfo = m_AllocBuffer[Handle.hAllocInfo]; SMapMemoryInfo MapInfo; MapInfo.hMemory = (DDIMemory)AllocInfo.hMemory; MapInfo.offset = AllocInfo.offset + DataInfo.dstDataOffset; MapInfo.size = DataInfo.dataSize; Threads::ScopedLock l(m_vSyncObjects[Handle.hPool]); void* pRet = m_pCtx->DDI().MapMemory(MapInfo); return pRet; } void CDeviceMemoryManager::UnmapMemory(const handle_t& hMemory) { UAllocationHandle Handle = hMemory; const auto& AllocInfo = m_AllocBuffer[Handle.hAllocInfo]; Threads::ScopedLock l(m_vSyncObjects[Handle.hPool]); m_pCtx->DDI().UnmapMemory((DDIMemory)AllocInfo.hMemory); } const SMemoryAllocationInfo& CDeviceMemoryManager::GetAllocationInfo( const handle_t& hMemory ) { UAllocationHandle Handle = hMemory; return m_AllocBuffer[Handle.hAllocInfo]; } } // RenderSystem } // VKE #endif // VKE_VULKAN_RENDERER
cpp
YouTuber and content creator Chris Tyson, who is recognized for their association with Jimmy "MrBeast," has been a highly discussed topic in the YouTube community lately. They recently disclosed that they have started hormone replacement therapy (HRT) to transition, which has resulted in a lot of speculation, particularly because Chris is married with a child. Chris has always remained a rather private person, and little is known about their spouse. However, they recently gave an update regarding their status with their partner. On March 28, 2023, they tweeted that they and their spouse (Katie) have separated and are "finalizing things. " In a subsequent tweet, they also expressed a desire to keep their privacy regarding the matter and requested their followers not to inquire about their marital situation: How long has Chris Tyson been separated from their wife? As evidenced in the aforementioned tweets, Chris disclosed that they and their spouse have been separated for more than a year, indicating that the separation occurred in early 2022. It's worth noting that at the time of the separation, Chris had not commenced their HRT. Therefore, it remains uncertain whether Chris' transition contributed to their separation, as they have not divulged any specifics regarding the matter. Chris has remained relatively quiet regarding the precise reason for their separation. How old is their child? Chris Tyson and Katie tied the knot in 2018, when they were 21 and 24 years old, respectively. They welcomed their first child, Tucker Stephen Tyson, in June 2020. Even though Tucker is still a toddler, he has already made a few appearances in MrBeast's videos. Tucker's debut physical appearance was in the video titled "I Spent $1,000,000 on Lottery Tickets and WON. " Despite the separation, Chris remains very attached to their child. In fact, during MrBeast's recent trip to Japan, Chris disclosed that they have been spending quality time with Tucker and, as a result, was not always available for shooting. Karl Jacobs, a popular member of the MrBeast crew, is also the godfather of Katie and Chris' son, which is a fun fact. Is Chris Tyson dating anyone? As of this writing, there is no public knowledge of Chris Tyson seeing anyone romantically. Nevertheless, rumors sparked after a photo of them with Twitch streamer Jude "F1NN5TER" emerged. Moreover, the duo has also been engaging with each other on Twitter. However, it's worth noting that these are mere speculations, and neither has confirmed any romantic relationship. They may also be just friends, considering they are both LGBTQ+ creators. Despite the speculations and rumors surrounding Chris, it's important to continue supporting their social media growth and ensure their inclusion.
english
<gh_stars>0 import { Injectable } from '@nestjs/common'; import { Connection, createConnection, MysqlError } from 'mysql'; import { LoggingService } from './logging.service'; import { IgnoredSearchResult } from './app.model'; import { last } from 'lodash'; interface IgnoreQueryDef { queryHash: string; valuesHash: string; } const ACCEPTABLE_DB_RECONNECT_DELAY = 1000 * 60 * 5; const DB_TABLE_IGNORE = 'hashes'; const DB_TABLE_IGNORE_COLUMN_QUERY_HASH = 'queryHashes'; export const DB_TABLE_IGNORE_COLUMN_VALUES_HASH = 'valueHashes'; @Injectable() export class DatabaseService { private connection: Connection; private errorTimestamps: number[] = []; constructor(private loggingService: LoggingService) { this.setConnection(); this.setupConnectionWatchers(); } private setupConnectionWatchers(): void { this.connection.on('error', (error) => { this.loggingService.log<MysqlError>(error); this.tryReconnect(); }); this.connection.on('connect', () => { this.loggingService.log('Connected to database'); }); } private setConnection(): void { this.loggingService.log('Connecting to database...'); const PORT = process.env.DATABASE_PORT ? Number(process.env.DATABASE_PORT) : undefined; this.connection = createConnection({ host: process.env.DATABASE_HOST || '127.0.0.1' || '192.168.99.100', user: process.env.DATABASE_USER || 'root', password: process.env.DATABASE_PASSWORD || 'password', database: process.env.DATABASE_NAME || 'db', port: PORT || 3306, }); } private tryReconnect(): void { this.loggingService.log('Trying to reconnect to database'); const lastErrorTimestamp = last(this.errorTimestamps) || 0; const msToPreviousError = new Date().getTime() - lastErrorTimestamp; if (msToPreviousError <= ACCEPTABLE_DB_RECONNECT_DELAY) { this.loggingService.log('Stopping reconnecting, too frequent retries'); return; } this.setConnection(); } ignoreQuery(ignoreQueryDef: IgnoreQueryDef): void { const QUERY = `INSERT INTO ${ DB_TABLE_IGNORE } (${ DB_TABLE_IGNORE_COLUMN_QUERY_HASH }, ${ DB_TABLE_IGNORE_COLUMN_VALUES_HASH }) VALUES ('${ ignoreQueryDef.queryHash }', '${ ignoreQueryDef.valuesHash }')`; this.connection.query(QUERY); } getIgnoredResults(queryHash: string, valuesHashes: string[] = []): Promise<any> { return new Promise((resolve, reject) => { const hashesPreparedForQuery = valuesHashes.map(val => `'${ val }'`).join(','); const QUERY = `SELECT \`${ DB_TABLE_IGNORE_COLUMN_VALUES_HASH }\` FROM ${ DB_TABLE_IGNORE } WHERE ${ DB_TABLE_IGNORE_COLUMN_VALUES_HASH } IN (${ hashesPreparedForQuery })`; this.connection.query(QUERY, (error, results: IgnoredSearchResult[], fields) => { if (error) { return reject(error); } resolve(results); }); }); } }
typescript
<gh_stars>1-10 package adt; import java.util.Random; /** * User: <NAME> * * class that encodeds probilities as UNSIGNED bytes and makes things go seriously fast! * Date: 14-Jul-2006 * Time: 00:08:49 */ public class ByteProbability { /** * converts from byte's to probabilities usage: BYTE_TO_DOUBLE[myByte&0xFF] */ public static final double [] BYTE_TO_DOUBLE = new double[256]; //fast convertion between numbers 0-255 and doubles intervales [0.1] public static final byte [] INTEGER_TO_BYTE = new byte[256]; //fast convertion between numbers 0-255 and unsigned bytes (packed in a signed byte) public static final byte[][] MULTIPLY = new byte[256][256]; public static final byte[][] DIVIDE = new byte[256][256]; static{ for(int i=0; i<256; i++){ BYTE_TO_DOUBLE[i] = (double)i/(double)255; } for(int i=Byte.MIN_VALUE; i<=Byte.MAX_VALUE; i++){ byte val = (byte) i; int intVal = val&0xFF; INTEGER_TO_BYTE[intVal] = val; } for(int i=0; i<256; i++){ for(int j=0; j<256; j++){ MULTIPLY[i][j] = toByte(BYTE_TO_DOUBLE[i]*BYTE_TO_DOUBLE[j]); } } for(int i=0; i<256; i++){ for(int j=0; j<256; j++){ DIVIDE[i][j] = toByte(BYTE_TO_DOUBLE[i]/BYTE_TO_DOUBLE[j]); } } } /** * not so easy, SEQ search SLOW!!! * @param v * @return */ public static byte toByte(double v) { byte nearest = 0; double nearestValue = Double.MAX_VALUE; for(int i=0; i<256; i++){ double val = BYTE_TO_DOUBLE[i]; double diff = Math.abs(v-val); if(diff < nearestValue){ nearestValue = diff; nearest = INTEGER_TO_BYTE[i]; } } return nearest; } public static final byte multiply(byte a, byte b){ return MULTIPLY[a&0xFF][b&0xFF]; } public static final byte divide(byte a, byte b){ return DIVIDE[a&0xFF][b&0xFF]; } public static void main(String[] args) { for(int i=0;i<256;i++){ System.out.println("i = " + i); byte tstByte = INTEGER_TO_BYTE[i]; System.out.println("tstByte = " + tstByte); System.out.println("tstByte&0xFF = " + (tstByte & 0xFF)); System.out.println("INTEGER_TO_BYTE[tstByte & 0xFF] = " + INTEGER_TO_BYTE[tstByte & 0xFF]); System.out.println("BYTE_TO_DOUBLE[tstByte&0xFF] = " + BYTE_TO_DOUBLE[tstByte & 0xFF]); tstByte++; } Random rnd = new Random(); for(int i=0; i< 20; i++){ int index1 = rnd.nextInt(256); int index2 = rnd.nextInt(256); byte a = INTEGER_TO_BYTE[index1]; byte b = INTEGER_TO_BYTE[index2]; double ad = BYTE_TO_DOUBLE[a&0xFF]; double bd = BYTE_TO_DOUBLE[b&0xFF]; double multiply = BYTE_TO_DOUBLE[MULTIPLY[a&0xFF][b&0xFF] & 0xFF]; double check = ad*bd; System.out.println("multiply via byte = " + multiply); System.out.println("check via double = " + check); } for(int i=0; i< 20; i++){ int index1 = rnd.nextInt(256); int index2 = rnd.nextInt(256); byte a = INTEGER_TO_BYTE[index1]; byte b = INTEGER_TO_BYTE[index2]; double ad = BYTE_TO_DOUBLE[a&0xFF]; double bd = BYTE_TO_DOUBLE[b&0xFF]; double multiply = BYTE_TO_DOUBLE[DIVIDE[a&0xFF][b&0xFF] & 0xFF]; double check = ad/bd; System.out.println("divide via byte = " + multiply); System.out.println("check via double = " + check); } } }
java
--- edited: 2018-11-01T12:00:00.000Z title: A ClojureScript exercise template published: true description: My template for completing small code exercises in Clojure tags: beginners, clojure, tutorial --- Clojure is a fantastic language. It's quite minimal - there's very little syntax to learn, and it supports absolutely any paradigm of your choosing while still offering seamless (really, seamless) interop with both the massive Java and JavaScript ecosystems. Unfortunately, though, getting going with it can be tricky and a little on the heavy side for quick experimentation. You don't want to spin up a JVM and bootstrap the language just to run a quick function. ClojureScript has a name that makes it sound like a whole separate thing but it's mostly the same exact language. It's just hosted by JavaScript instead of Java. One consequence of this is it becomes feasible for scripting. You *can* do it with JVM Clojure but there's still more spin-up time than there should be. My favorite option is called [planck](http://planck-repl.org/). It starts almost instantly. I've taken advantage of this to use it for language-agnostic code exercises - Advent of Code is just around the corner! The [planck guide](http://planck-repl.org/guide-all.html) should help answer any questions, and also lists a number of very useful builtins for interacting with the shell and making network requests - you could use this instead of Python or Ruby for scripting tasks. Here's my blank template: ```clojure (ns exercise.core (:require [cljs.test :refer-macros [deftest is run-tests]] ;[clojure.string :refer [split]] ; you can import clojure fns! [planck.core :refer [slurp]])) ;; IMPLEMENTATION (defn part1 "Write your first function here!" [word] (str "Hello " word) ;; TESTS (deftest test-part1 (is (= (part1 "CLJS") "Hello, World"))) ;; RUN (defn -main [] (let [puzzle (slurp "realinput.txt")] (run-tests) (println (str "Part 1 output: " (part1 puzzle))) (set! *main-cli-fn* -main) ``` This setup will run your tests, and then use the builtin `slurp` to read the contents of the file you give it into a string. Then you just run it! Run `planck exercise.cljs` and watch your tests fail :) Here's an example completed exercise: ```clojure (ns d4.core (:require [cljs.test :refer-macros [deftest is run-tests]] [clojure.string :refer [split]] [planck.core :refer [slurp]])) ;; IMPLEMENTATION (defn part1 "Get how many times w occurs in ws" [w ws] (->> ws (filter #{w}) count)) (defn part2 "Get how many anagrams of w occur in ws" [w ws] (->> ws (filter #(= (sort w) (sort %))) count)) (defn valid? "Check s for validity according to f" [f s] (let [words (split s " ")] (->> (map #(f % words) words) (filter #(> % 1)) (empty?)))) (defn count-valid "Given string, returns how many lines are valid" [f s] (->> (split s "\n") (filter #(valid? f %)) (count))) ;; TESTS (deftest sample1 (is (valid? part1 "aa bb cc dd ee")) (is (not (valid? part1 "aa bb cc dd aa"))) (is (valid? part1 "aa bb cc dd aaa"))) (deftest sample2 (is (valid? part2 "abcde fghij")) (is (not (valid? part2 "abcde xyz ecdab"))) (is (valid? part2 "a ab abc abd abf abj")) (is (valid? part2 "iiii oiii ooii oooi oooo")) (is (not (valid? part2 "oiii ioii iioi iiio")))) ;; RUN (defn -main [] (let [puzzle (slurp "d4.txt")] (run-tests) (println (str "Part 1 output: " (count-valid part1 puzzle))) (println (str "Part 2 output: " (count-valid part2 puzzle))))) (set! *main-cli-fn* -main) ``` Happy coding!
markdown
{"nft":{"id":"1313","name":"PixelFreak #01313","description":"They call us ugly, and misfits, but we prefer to call ourselves freaks","image":"ipfs://QmXG3pW1MEuQPn1xV9vswPPTX4vsCvGCQ2JnhwGWyzFERB","attributes":[{"trait_type":"pet","value":"<NAME>"},{"trait_type":"body","value":"Ron A"},{"trait_type":"eyes","value":"Crying"},{"trait_type":"head","value":"Blu"},{"trait_type":"nose","value":"Nasum"},{"trait_type":"extra","value":"Zopiclone"},{"trait_type":"mouth","value":"Heavy smoker"},{"trait_type":"background","value":"RandomColor"},{"trait_type":"Trait Count","value":"8"}]},"attributeRarities":[{"trait_type":"pet","value":"<NAME>","count":83,"ratio":0.0083,"ratioScore":120.48192771084337},{"trait_type":"body","value":"Ron A","count":164,"ratio":0.0164,"ratioScore":60.975609756097555},{"trait_type":"eyes","value":"Crying","count":323,"ratio":0.0323,"ratioScore":30.959752321981423},{"trait_type":"head","value":"Blu","count":453,"ratio":0.0453,"ratioScore":22.075055187637968},{"trait_type":"nose","value":"Nasum","count":1067,"ratio":0.1067,"ratioScore":9.37207122774133},{"trait_type":"extra","value":"Zopiclone","count":495,"ratio":0.0495,"ratioScore":20.2020202020202},{"trait_type":"mouth","value":"Heavy smoker","count":413,"ratio":0.0413,"ratioScore":24.213075060532685},{"trait_type":"background","value":"RandomColor","count":9595,"ratio":0.9595,"ratioScore":1.0422094841063054},{"trait_type":"Trait Count","value":"8","count":10000,"ratio":1,"ratioScore":1}],"rarityScore":290.3217209509608,"rank":1370}
json
<gh_stars>0 {"value":[],"odata.metadata":"https://opendata.cbs.nl/ODataFeed/OData/80137ned/$metadata#Cbs.OData.WebAPI.CategoryGroups"}
json
T. Narasipur: The fear of leopard attack has returned to haunt villagers here, as in yet another incident, a 60- year-old woman was killed in a similar incident at Kannanayakanahalli in T. Narasipur taluk on Friday. It is the third such incident in the last three months, with two students falling victims in similar cases in the same taluk. Siddamma, wife of Ningaraju of the village, had gone to fetch firewood in the backyard of her house at about 6 pm, when the feline attacked her. She had suffered bites on her face and other parts of her body. Though she mustered courage to raise an alarm, she had succumbed to the injuries by the time neighbours rushed to her help. It is said, the leopard tried to drag the body of Siddamma, but fled after seeing the crowd rushing to the spot. Following the incident, family members of Siddamma were inconsolable. Though Forest Department was informed about the incident, they allegedly did not turn up even an hour after, earning the wrath of irate villagers. Meanwhile, the body was shifted to T. Narasipur Government General Hospital Mortuary. MLA M. Ashwin Kumar, who rushed to the spot, collected the information about the incident and consoled the grieving family members of Siddamma. Tahsildar Geetha, ACF Lakshmikanth, RFO Syed Nadeem, DRFOs Manjunath and Umesh, PSI Pachchegowda and others also visited the spot. A case has been registered at T. Narasipur Police Station. In similar incidents of leopard attack, Mallikarjuna of M. L. Hundi village was killed on Oct. 30, 2022 and Meghana of M. Kebbehundi village on Dec. 1, both in T. Naraspur taluk, triggering outrage among villagers. After nearly a month-long operation, especially after Meghana’s incident, involving 10 expert teams, Forest Department had succeeded in capturing the same leopard that was believed to have claimed the lives of the duo, at Muthathi village on Dec. 22. During the same time, Forest Department had trapped two more leopards including a three-year-old male leopard at Muthathi village and eight-year-old male leopard at Mallappana Betta. Following the trapping of leopards, the villagers nearby had heaved a sigh of relief.
english
<reponame>wayerr/jsterest package wayerr.jsterest.nashorn; import jdk.nashorn.api.scripting.ScriptObjectMirror; import jdk.nashorn.internal.objects.NativeJSON; import jdk.nashorn.internal.runtime.Undefined; import wayerr.jsterest.AssertionError; import java.util.logging.Level; import java.util.logging.LogRecord; import java.util.logging.Logger; /** */ class Console { private static final Logger LOG = Logger.getLogger("console"); Console() { } @JsMethod(name = "assert") private void _assert(Object expr, Object... args) { if(args.length == 0) { return; } if(expr != null && (expr instanceof Boolean) && (Boolean)expr) { return; } StringBuilder sb = new StringBuilder(); Throwable th = printMsg(args, sb); if(th != null) { throw new AssertionError(sb.toString(), th); } throw new AssertionError(sb.toString()); } @JsMethod public void debug(Object... args) { log(Level.INFO, args); } @JsMethod public void log(Object... args) { log(Level.INFO, args); } @JsMethod public void warn(Object... args) { log(Level.WARNING, args); } @JsMethod public void error(Object... args) { log(Level.SEVERE, args); } private void log(Level level, Object[] args) { StringBuilder sb = new StringBuilder(); Throwable t = printMsg(args, sb); LogRecord lr = new LogRecord(level, sb.toString()); lr.setThrown(t); //it need for prevent logger from walking over call stack // also it force to use logger name lr.setSourceClassName(null); lr.setLoggerName(LOG.getName()); LOG.log(lr); } private Throwable printMsg(Object[] args, StringBuilder sb) { Throwable t = null; for (Object o : args) { if (o instanceof Throwable) { t = (Throwable) o; } if (sb.length() > 0) { sb.append(' '); } toString(sb, o); } return t; } private void toString(StringBuilder sb, Object o) { if (o instanceof ScriptObjectMirror) { try { Undefined undef = Undefined.getUndefined(); String str = (String) NativeJSON.stringify(undef, o, undef, undef); sb.append(str); return; } catch (Exception e) { // nothing } } sb.append(o); } }
java
Is Topsoil Safe for Dogs? As a Dog owner, you want to make sure that everything your furry friend ingests is safe for them. Topsoil is a common gardening material, but is it safe for dogs to eat or come into contact with? The answer is not straightforward. While topsoil itself is not toxic to dogs, it may contain harmful substances that can be dangerous if ingested in large amounts. For example, some topsoils may contain fertilizers or pesticides that can be harmful to dogs if ingested. It is important to check the ingredients of the topsoil before using it in your garden. In addition, some dogs may have allergies or sensitivities to certain constituents of the topsoil, such as mold or fungi. If your dog has a history of allergies or respiratory issues, it is best to avoid using topsoil that may contain these substances. Another concern is the temperature of the topsoil. During hot summer months, topsoil can become very hot and may burn your dog’s paws if they walk on it. It is important to keep your dog away from the topsoil until it has cooled down. If you decide to use topsoil in your garden, make sure to keep your dog away from the area until the topsoil has been properly secured. Dogs have a tendency to dig and may accidentally ingest the topsoil or any harmful substances it may contain. To prevent this, consider using a fence or barrier around the garden area. See also: Will Mothballs Keep Dogs Out of Flowerbeds? If you’re a pet owner, you know how curious dogs can be. They love to explore their surroundings and dig up the dirt. While it may seem harmless, it’s important to know that topsoil can contain a variety of toxic components that can be harmful to your furry friend. Here are some of the potential hazards of topsoil for dogs: - Lead, Zinc, Copper, and Arsenic: Topsoil can contain these toxic components, which can cause various health problems in dogs. If ingested, it can lead to vomiting, diarrhea, lethargy, loss of appetite, and even death in severe cases. - Fertilizers and Pesticides: Many fertilizers and pesticides contain harmful chemicals that can be dangerous if ingested by dogs. These chemicals can cause vomiting, diarrhea, and other gastrointestinal problems. - Sharp Objects: Topsoil can contain sharp objects like broken glass, metal pieces, and rocks that can cause injuries to your dog’s paws or eyes. - Allergies: Dogs can be allergic to certain types of topsoil, which can cause skin irritation, itching, and other allergic reactions. To keep your dog safe, it’s important to supervise them when they’re digging and to provide them with a designated digging area. You can also use pet-friendly topsoil that is free from harmful chemicals and additives. Additionally, make sure to keep fertilizers and pesticides out of your dog’s reach and avoid using them in areas where your dog spends time. If you have a dog, you know they can get into just about anything. This includes topsoil, which can be harmful to your furry friend if ingested. To prevent your dog from ingesting topsoil, there are a few precautions you can take. It is important to discourage your dog from digging in areas where topsoil is present. You can do this by creating designated areas where your dog is allowed to dig. This will help to redirect their desire to dig and focus their attention on a specific area. If you notice your dog is particularly stressed or anxious, they may be more likely to dig and ingest topsoil. In this case, it may be helpful to consult with a veterinarian or animal behaviorist to address the underlying issue. It is also important to keep your dog’s environment clean and free of germs. This means regularly cleaning up any feces or urine in your yard and ensuring that any topsoil used in your garden is free of harmful chemicals or contaminants. If you do use topsoil in your garden, it is important to keep an eye on your dog when they are outside to ensure they are not ingesting it. You can also consider using a barrier, such as a fence or rocks, to keep your dog away from areas where topsoil is present. If you’re concerned about the safety of topsoil for your furry friend, you’ll be pleased to know that there are several safe alternatives available. Here are a few options to consider: Organic fertilizers are a great alternative to topsoil because they are made from natural materials and are safe for pets. They are also rich in nutrients that can help promote healthy plant growth. Some popular organic fertilizers include bone meal, blood meal, and fish meal. These fertilizers are high in nitrogen and can help improve soil quality. Growing vegetables and herbs in your yard is a great way to provide your dog with fresh, healthy treats while also improving the soil quality. Vegetables like carrots, green beans, and sweet potatoes are safe for dogs to eat and can be grown in most soil types. Herbs like basil and thyme are also safe for dogs and can be used to add flavor to their food. Berries are a great source of antioxidants and can be a tasty treat for your dog. Some safe options to consider include blueberries, raspberries, and strawberries. These fruits can be grown in most soil types and are easy to care for. If you’re looking to create a safe play area for your dog, consider installing a nontoxic fence. This will help keep your dog in a designated area while also preventing them from getting into any potentially harmful materials. If you’re looking for a natural way to improve your soil quality, consider using natural fertilizer. This can include things like compost, manure, and worm castings. These materials are safe for pets and can help improve soil quality over time.
english
#!/usr/bin/env python # 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. # pylint: skip-file import sys sys.path.insert(0, "../../python/") import mxnet as mx import numpy as np import numpy.random as rnd import time def check_diff_to_scalar(A, x, rank=None): """ assert A == x""" assert(np.sum(np.abs((A - x).asnumpy())) == 0), (rank, A.asnumpy(), x) # setup keys = ['3', '5', '7'] rsp_keys = ['9', '11', '13'] rate = 2 shape = (2, 3) big_shape = (1200, 1200) # bigger than BIGARRAY_BOUND def init_kv(): kv = mx.kv.create('dist_sync') # init kv dns keys kv.init(keys, [mx.nd.ones(shape)] * len(keys)) kv.init('99', mx.nd.ones(big_shape)) # init kv row_sparse keys kv.init(rsp_keys, [mx.nd.ones(shape).tostype('row_sparse')] * len(rsp_keys)) kv.init('100', mx.nd.ones(big_shape).tostype('row_sparse')) # worker info my_rank = kv.rank nworker = kv.num_workers # init updater on servers kv.set_optimizer(mx.optimizer.create('test', rescale_grad=rate)) return kv, my_rank, nworker def test_sync_push_pull(): kv, my_rank, nworker = init_kv() def check_default_keys(kv, my_rank, nworker): nrepeat = 3 for i in range(nrepeat): kv.push('3', mx.nd.ones(shape)*(my_rank+1)) kv.push('99', mx.nd.ones(big_shape)*(my_rank+1)) num = (nworker + 1) * nworker * rate / 2 * nrepeat + 1 val = mx.nd.zeros(shape) kv.pull('3', out=val) check_diff_to_scalar(val, num) val2 = mx.nd.zeros(big_shape) kv.pull('99', out=val2) check_diff_to_scalar(val2, num) def check_row_sparse_keys(kv, my_rank, nworker): nrepeat = 3 # prepare gradient v = mx.nd.zeros(shape) my_row = my_rank % shape[0] v[my_row] = my_rank + 1 # push for i in range(nrepeat): kv.push('9', v.tostype('row_sparse')) # select a random subset of rows this worker is interested in num_rows = shape[0] row_ids_np = np.random.randint(num_rows, size=num_rows) row_ids = mx.nd.array(row_ids_np, dtype='int64') # perform pull val = mx.nd.zeros(shape, stype='row_sparse') kv.row_sparse_pull('9', out=val, row_ids=row_ids) # prepare updated values updated_val = mx.nd.ones(shape) for rank in range(nworker): row = rank % shape[0] updated_val[row] += (rank + 1) * rate * nrepeat # verify subset of updated values expected = mx.nd.zeros(shape) for row in row_ids_np: expected[row] = updated_val[row] check_diff_to_scalar(val, expected) def check_row_sparse_keys_with_zeros(kv, my_rank, nworker): nrepeat = 3 # prepare gradient v = mx.nd.zeros(shape) big_v = mx.nd.zeros(big_shape) # push for i in range(nrepeat): kv.push('11', v.tostype('row_sparse')) kv.push('100', big_v.tostype('row_sparse')) # pull a subset of rows this worker is interested in all_row_ids = np.arange(shape[0]) val = mx.nd.ones(shape).tostype('row_sparse') big_val = mx.nd.ones(big_shape).tostype('row_sparse') kv.row_sparse_pull('11', out=val, row_ids=mx.nd.array(all_row_ids, dtype='int64')) big_num_rows = shape[0] big_all_row_ids = np.arange(big_shape[0]) kv.row_sparse_pull('100', out=big_val, row_ids=mx.nd.array(big_all_row_ids, dtype='int64')) # verify results check_diff_to_scalar(val, mx.nd.ones(shape)) check_diff_to_scalar(big_val, mx.nd.ones(big_shape)) def check_big_row_sparse_keys(kv, my_rank, nworker): mx.random.seed(123) rnd.seed(123) density = 0.3 nrepeat = 3 # prepare gradient v = mx.nd.zeros(big_shape) idx_sample = rnd.rand(big_shape[0]) indices = np.argwhere(idx_sample < density).flatten() # each worker chooses a subset of the indices to update update_rows = [] for rank in range(nworker): rows = [] i = 0 step = (rank + 1) * 2 while i < len(indices): rows.append(indices[i]) i += step update_rows.append(np.array(rows)) # rows to update for this worker for row in update_rows[my_rank]: v[row] = my_rank + 1 # push for i in range(nrepeat): kv.push('100', v.tostype('row_sparse')) # select a random subset of rows this worker is interested in mx.random.seed(my_rank) rnd.seed(my_rank) num_rows = big_shape[0] row_ids_np = np.random.randint(num_rows, size=num_rows) row_ids = mx.nd.array(row_ids_np, dtype='int64') # perform pull val = mx.nd.zeros(big_shape, stype='row_sparse') kv.row_sparse_pull('100', out=val, row_ids=row_ids) # prepare expected result updated_val = mx.nd.ones(big_shape) # apply updates from each worker for rank in range(nworker): for row in update_rows[rank]: updated_val[row] += (rank + 1) * rate * nrepeat expected = mx.nd.zeros(big_shape) for row in row_ids_np: expected[row] = updated_val[row] check_diff_to_scalar(val, expected, rank=my_rank) check_default_keys(kv, my_rank, nworker) check_row_sparse_keys(kv, my_rank, nworker) check_row_sparse_keys_with_zeros(kv, my_rank, nworker) check_big_row_sparse_keys(kv, my_rank, nworker) print('worker ' + str(my_rank) + ' is done') if __name__ == "__main__": test_sync_push_pull()
python
{"pos":"v","translits":{"wə·yiḵ·sā·lū":{"jer.10.8|2":["they are dull-hearted","and foolish–","a doctrine"]}},"meanings":{"foolish":1},"meaningsCount":1,"occurences":1,"translation":"greek-3474"}
json
package com.glitchcam.vepromei.edit.Caption; import android.graphics.Color; import android.os.Bundle; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.SeekBar; import android.widget.TextView; import com.glitchcam.vepromei.R; import com.glitchcam.vepromei.edit.adapter.SpaceItemDecoration; import com.glitchcam.vepromei.edit.data.CaptionColorInfo; import com.glitchcam.vepromei.edit.interfaces.OnItemClickListener; import com.glitchcam.vepromei.utils.ScreenUtils; import java.util.ArrayList; /** * 字幕背景色 */ public class CaptionBackgroundFragment extends Fragment { private RecyclerView mCaptionBackgroundRecyclerView; private CaptionBackgroundRecyclerAdaper mCaptionBackgroundRecycleAdapter; private SeekBar mCaptonOpacitySeekBar; private SeekBar mCaptonCornerSeekBar; private TextView mSeekBarOpacityValue; private TextView mSeekBarCornerValue; private OnCaptionBackgroundListener captionBackgroundListener; private ArrayList<CaptionColorInfo> mCaptionColorInfolist = new ArrayList<>(); private LinearLayout mApplyToAll; private ImageView mApplyToAllImage; private TextView mApplyToAllText; private boolean mIsApplyToAll = false; public interface OnCaptionBackgroundListener{ void onFragmentLoadFinished(); void onCaptionColor(int pos); void onCaptionOpacity(int progress); void onCaptionCorner(int progress); void onIsApplyToAll(boolean isApplyToAll); } public void setCaptionBackgroundListener(OnCaptionBackgroundListener captionBackgroundListener) { this.captionBackgroundListener = captionBackgroundListener; } public void updateCaptionOpacityValue(int progress){ mSeekBarOpacityValue.setText(String.valueOf(progress)); mCaptonOpacitySeekBar.setProgress(progress); } /** * 更新设置圆角的进度 * @param progress 获取圆角的值 * */ public void updateCaptionCornerValue(int progress){ mSeekBarCornerValue.setText(String.valueOf(progress)); mCaptonCornerSeekBar.setProgress(progress); } /** * 设置最大进度 * @param max 最大值(原则上是高度的一半) */ public void initCaptionMaxCorner(int max){ mCaptonCornerSeekBar.setMax(max); } public void setCaptionBackgroundInfolist(ArrayList<CaptionColorInfo> captionColorInfolist) { this.mCaptionColorInfolist = captionColorInfolist; if(mCaptionBackgroundRecycleAdapter != null) mCaptionBackgroundRecycleAdapter.setCaptionBackgroundColorList(captionColorInfolist); } public void applyToAllCaption(boolean isApplyToAll){ mApplyToAllImage.setImageResource(isApplyToAll ? R.mipmap.applytoall : R.mipmap.unapplytoall); mApplyToAllText.setTextColor(isApplyToAll ? Color.parseColor("#ff4a90e2") : Color.parseColor("#ff909293")); mIsApplyToAll = isApplyToAll; } public void notifyDataSetChanged(){ mCaptionBackgroundRecycleAdapter.notifyDataSetChanged(); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View rootParent = inflater.inflate(R.layout.caption_background_fragment, container, false); mCaptionBackgroundRecyclerView = (RecyclerView)rootParent.findViewById(R.id.captionColorRecyerView); mCaptonOpacitySeekBar = (SeekBar)rootParent.findViewById(R.id.captonOpacitySeekBar); mCaptonOpacitySeekBar.setMax(100); mCaptonCornerSeekBar = (SeekBar)rootParent.findViewById(R.id.captonCornerSeekBar); mCaptonCornerSeekBar.setMax(100); mSeekBarOpacityValue = (TextView) rootParent.findViewById(R.id.seekBarOpacityValue); mSeekBarCornerValue = (TextView) rootParent.findViewById(R.id.seekBarCornerValue); mApplyToAll = (LinearLayout)rootParent.findViewById(R.id.applyToAll); mApplyToAllImage = (ImageView)rootParent.findViewById(R.id.applyToAllImage); mApplyToAllText = (TextView)rootParent.findViewById(R.id.applyToAllText); return rootParent; } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); initCaptionBackgroundRecycleAdapter(); initCaptionBackgroundSeekBar(); if(captionBackgroundListener != null){ captionBackgroundListener.onFragmentLoadFinished(); } } private void initCaptionBackgroundSeekBar() { mCaptonOpacitySeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { if(fromUser){ updateCaptionOpacityValue(progress); if(captionBackgroundListener != null){ captionBackgroundListener.onCaptionOpacity(progress); } } } @Override public void onStartTrackingTouch(SeekBar seekBar) { } @Override public void onStopTrackingTouch(SeekBar seekBar) { } }); mCaptonCornerSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { if(fromUser){ updateCaptionCornerValue(progress); if(captionBackgroundListener != null){ captionBackgroundListener.onCaptionCorner(progress); } } } @Override public void onStartTrackingTouch(SeekBar seekBar) { } @Override public void onStopTrackingTouch(SeekBar seekBar) { } }); } private void initCaptionBackgroundRecycleAdapter() { LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false); mCaptionBackgroundRecyclerView.setLayoutManager(layoutManager); mCaptionBackgroundRecycleAdapter = new CaptionBackgroundRecyclerAdaper(getActivity()); mCaptionBackgroundRecycleAdapter.setCaptionBackgroundColorList(mCaptionColorInfolist); mCaptionBackgroundRecyclerView.setAdapter(mCaptionBackgroundRecycleAdapter); mCaptionBackgroundRecyclerView.addItemDecoration(new SpaceItemDecoration(0, ScreenUtils.dip2px(getActivity(),16))); mCaptionBackgroundRecycleAdapter.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(View view, int pos) { if(captionBackgroundListener != null){ captionBackgroundListener.onCaptionColor(pos); } } }); mApplyToAll.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mIsApplyToAll = !mIsApplyToAll; applyToAllCaption(mIsApplyToAll); if(captionBackgroundListener != null){ captionBackgroundListener.onIsApplyToAll(mIsApplyToAll); } } }); } }
java
<gh_stars>0 // @flow // ----- Imports ----- // import { getQueryParameter } from 'helpers/url'; import { type ContributionType, type PaymentMethod, toContributionType, } from 'helpers/contributions'; import { getMinContribution, parseContribution, toContributionTypeOrElse, validateContribution, } from 'helpers/contributions'; import * as storage from 'helpers/storage'; import { type Switches, type SwitchObject } from 'helpers/settings'; import type { CountryGroupId } from 'helpers/internationalisation/countryGroup'; import type { IsoCountry } from 'helpers/internationalisation/country'; // ----- Types ----- // export type PaymentMethodSwitch = 'directDebit' | 'payPal' | 'stripe'; type StripeHandler = { open: Function, close: Function }; export type ThirdPartyPaymentLibrary = StripeHandler; // ----- Functions ----- // function toPaymentMethodSwitchNaming(paymentMethod: PaymentMethod): PaymentMethodSwitch | null { switch (paymentMethod) { case 'PayPal': return 'payPal'; case 'Stripe': return 'stripe'; case 'DirectDebit': return 'directDebit'; default: return null; } } function getAmount(contributionType: ContributionType, countryGroup: CountryGroupId): number { const contributionValue = getQueryParameter('contributionValue'); if (contributionValue !== null && contributionValue !== undefined) { const parsed = parseContribution(contributionValue); if (parsed.valid) { const error = validateContribution(parsed.amount, contributionType, countryGroup); if (!error) { return parsed.amount; } } } return getMinContribution(contributionType, countryGroup); } function getValidContributionTypesFromUrlOrElse(fallback: ContributionType[]): ContributionType[] { const contributionTypesFromUrl = getQueryParameter('contributionTypes'); if (contributionTypesFromUrl) { return contributionTypesFromUrl .split(',') .map(toContributionType) .filter(Boolean); } return fallback; } function getValidContributionTypes(): ContributionType[] { return getValidContributionTypesFromUrlOrElse(['ONE_OFF', 'MONTHLY', 'ANNUAL']); } function toHumanReadableContributionType(contributionType: ContributionType): 'Single' | 'Monthly' | 'Annual' { switch (contributionType) { case 'ONE_OFF': return 'Single'; case 'MONTHLY': return 'Monthly'; case 'ANNUAL': return 'Annual'; default: return 'Annual'; } } function getContributionTypeFromSessionOrElse(fallback: ContributionType): ContributionType { return toContributionTypeOrElse(storage.getSession('selectedContributionType'), fallback); } function getContributionTypeFromUrlOrElse(fallback: ContributionType): ContributionType { return toContributionTypeOrElse(getQueryParameter('selectedContributionType', fallback), fallback); } // Returns an array of Payment Methods, in the order of preference, // i.e the first element in the array will be the default option function getPaymentMethods(contributionType: ContributionType, countryId: IsoCountry): PaymentMethod[] { return contributionType !== 'ONE_OFF' && countryId === 'GB' ? ['DirectDebit', 'Stripe', 'PayPal'] : ['Stripe', 'PayPal']; } const switchIsOn = (switches: SwitchObject, switchName: PaymentMethodSwitch | null) => switchName && switches[switchName] && switches[switchName] === 'On'; function getValidPaymentMethods( contributionType: ContributionType, allSwitches: Switches, countryId: IsoCountry, ): PaymentMethod[] { const switches = (contributionType === 'ONE_OFF') ? allSwitches.oneOffPaymentMethods : allSwitches.recurringPaymentMethods; return getPaymentMethods(contributionType, countryId) .filter(paymentMethod => switchIsOn(switches, toPaymentMethodSwitchNaming(paymentMethod))); } function getPaymentMethodToSelect( contributionType: ContributionType, allSwitches: Switches, countryId: IsoCountry, ) { const validPaymentMethods = getValidPaymentMethods(contributionType, allSwitches, countryId); return validPaymentMethods[0] || 'None'; } function getPaymentMethodFromSession(): ?PaymentMethod { const pm: ?string = storage.getSession('selectedPaymentMethod'); if (pm === 'DirectDebit' || pm === 'Stripe' || pm === 'PayPal') { return (pm: PaymentMethod); } return null; } function getPaymentDescription(contributionType: ContributionType, paymentMethod: PaymentMethod): string { if (contributionType === 'ONE_OFF') { if (paymentMethod === 'PayPal') { return 'with PayPal'; } return 'with card'; } return ''; } function getPaymentLabel(paymentMethod: PaymentMethod): string { switch (paymentMethod) { case 'Stripe': return 'Credit/Debit card'; case 'DirectDebit': return 'Direct debit'; case 'PayPal': default: return 'PayPal'; } } // ----- Exports ----- // export { getAmount, getValidContributionTypes, getContributionTypeFromSessionOrElse, getContributionTypeFromUrlOrElse, toHumanReadableContributionType, getValidPaymentMethods, getPaymentMethodToSelect, getPaymentMethodFromSession, getPaymentDescription, getPaymentLabel, };
javascript
Former Indian fast bowler Venkatesh Prasad is of the opinion that Team India should bowl first if they went on to win the toss in their first Super four game of the Asia Cup 2018 against Bangladesh which is slated to be played in Dubai on Friday (September 21). Prasad stated that Team India ticked almost all the boxes during their thoroughly professional performance against Pakistan which saw them thrashing their arch-rivals by eight wickets and with more than 21 overs to spare. It was indeed a special all-round performance. The victory will keep them in good shape ahead of their Super four matches. “Rohit Sharma’s India ticked almost all the boxes in their comprehensive win over Pakistan on Wednesday night. Rohit came to the party at the right time with his free-flowing display of batting prowess while Kedar Jadhav, returning to cricket after a long injury layoff, fitted the role of the sixth bowler perfectly,” Prasad wrote in his column for ToI. Prasad maintained Bangladesh is a threat for any team on its day. “In my opinion, catching was the only blemish in the otherwise dominant show by the victors. They’ll have to work off this shoddy touch before they take on Bangladesh in the Super Four contest on Friday evening. Bangladesh is a dangerous side, especially in big matches. They don’t feel pressure. Instead, they thrive in games such as this, knowing what a win can do for the sport in their country,” Prasad added. Prasad was hopeful of Mohammad Mithun and Shakib Al Hasan coming good n the absence of Tamim Iqbal. The absence of Tamim will surely be worrying signs for Bangladesh as he has been a champion batsman for them over the years. The veteran left-handed batsman Iqbal fractured his left wrist and was subsequently ruled out from the rest of the tournament. “Bangladesh will hope their injury woes, which have been plenty, won’t hurt them. Tamim Iqbal’s injury is a huge blow for them. In his absence, the likes of the seasoned Shakib al Hasan and Mohammed Mithun will have to add firepower to the batting. In these conditions, Shakib, the left-arm spinner, will be more than a handful with the ball as well,” Iqbal stated. Venkatesh Prasad also sheds light on the weather conditions in the UAE. “The toss will be crucial. Losing the toss against Pakistan proved to be a blessing in disguise given the weather conditions. If Rohit calls right, he should ideally insert the opposition to bat because when you bat first, the ball is not coming on to the bat and is slow off the pitch. So in conditions such as the one in Dubai, it makes sense to chase as the ball tends to come on to the bat. With the pitch being on the slower side, the Indian spinners will be a crucial factor again, and Kedar will be interesting to watch. He may well be the surprise package again,” Prasad added.
english
<filename>webapp/src/services/contaxy-client/model/UserInput.js /** * Contaxy API * Functionality to create and manage projects, services, jobs, and files. * * The version of the OpenAPI document: 0.0.6 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. * */ import ApiClient from '../ApiClient'; /** * The UserInput model module. * @module model/UserInput * @version 0.0.6 */ class UserInput { /** * Constructs a new <code>UserInput</code>. * @alias module:model/UserInput */ constructor() { UserInput.initialize(this); } /** * Initializes the fields of this object. * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). * Only for internal use. */ static initialize(obj) {} /** * Constructs a <code>UserInput</code> from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. * @param {module:model/UserInput} obj Optional instance to populate. * @return {module:model/UserInput} The populated <code>UserInput</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new UserInput(); if (data.hasOwnProperty('username')) { obj['username'] = ApiClient.convertToType(data['username'], 'String'); } if (data.hasOwnProperty('email')) { obj['email'] = ApiClient.convertToType(data['email'], 'String'); } if (data.hasOwnProperty('disabled')) { obj['disabled'] = ApiClient.convertToType(data['disabled'], 'Boolean'); } } return obj; } } /** * A unique username on the system. * @member {String} username */ UserInput.prototype['username'] = undefined; /** * User email address. * @member {String} email */ UserInput.prototype['email'] = undefined; /** * Indicates that user is disabled. Disabling a user will prevent any access to user-accesible resources. * @member {Boolean} disabled * @default false */ UserInput.prototype['disabled'] = false; export default UserInput;
javascript
package io.github.mattlavallee.budgetbeaver.models; import android.content.Context; import android.content.SharedPreferences; import android.graphics.Color; import android.preference.PreferenceManager; import io.github.mattlavallee.budgetbeaver.models.enums.PreferenceFiles; import io.github.mattlavallee.budgetbeaver.models.enums.SortDirection; import io.github.mattlavallee.budgetbeaver.models.enums.SortType; public class Settings { private SharedPreferences _preferences; private Context _context; private int defaultPositiveColor = Color.parseColor("#333333"); private int defaultNegativeColor = Color.parseColor("#cc0000"); public Settings(Context context){ _context = context; _preferences = context.getSharedPreferences(PreferenceFiles.DefaultPreferences(), Context.MODE_PRIVATE); } public SortType getTransactionSortType(){ String sortTypeAsString = _preferences.getString("setting_transaction_sort_type", "4"); return SortType.fromInt(Integer.parseInt(sortTypeAsString)); } public SortType getTransactionSortType(int accountId){ SharedPreferences accountPrefs = _context.getSharedPreferences( PreferenceFiles.AccountPreferences(accountId), Context.MODE_PRIVATE); String sortType = accountPrefs.getString("setting_act_transaction_sort_type", null); if(sortType == null) return getTransactionSortType(); return SortType.fromInt(Integer.parseInt(sortType)); } public SortDirection getTransactionSortDirection(){ boolean reverseSort = _preferences.getBoolean("setting_transaction_sort_direction", false); return SortDirection.fromInt( reverseSort ? 1 : 0 ); } public SortDirection getTransactionSortDirection(int accountId){ SharedPreferences accountPrefs = _context.getSharedPreferences( PreferenceFiles.AccountPreferences(accountId), Context.MODE_PRIVATE); boolean reverseSort = accountPrefs.getBoolean( "setting_act_transaction_sort_direction", _preferences.getBoolean("setting_transaction_sort_direction", false) ); return SortDirection.fromInt( reverseSort ? 1 : 0 ); } public int getPositiveTransactionColor(){ return _preferences.getInt("setting_transaction_positive_color", defaultPositiveColor); } public int getPositiveTransactionColor(int accountId){ SharedPreferences accountPrefs = _context.getSharedPreferences( PreferenceFiles.AccountPreferences(accountId), Context.MODE_PRIVATE); return accountPrefs.getInt("setting_act_transaction_positive_color", _preferences.getInt("setting_transaction_positive_color", defaultPositiveColor)); } public int getNegativeTransactionColor(){ return _preferences.getInt("setting_transaction_negative_color", defaultNegativeColor); } public int getNegativeTransactionColor(int accountId){ SharedPreferences accountPrefs = _context.getSharedPreferences( PreferenceFiles.AccountPreferences(accountId), Context.MODE_PRIVATE); return accountPrefs.getInt("setting_act_transaction_negative_color", _preferences.getInt("setting_transaction_negative_color", defaultNegativeColor)); } public int getPositiveAccountColor(){ return _preferences.getInt("setting_account_positive_color", defaultPositiveColor); } public int getNegativeAccountColor(){ return _preferences.getInt("setting_account_negative_color", defaultNegativeColor); } }
java
7 To the weary you have (A)given no water to drink,And from the hungry you have (B)withheld bread. Legacy Standard Bible Copyright ©2021 by The Lockman Foundation. All rights reserved. Managed in partnership with Three Sixteen Publishing Inc. LSBible.org For Permission to Quote Information visit https://www.LSBible.org.
english
In Philadelphia’s Center City and University City neighborhoods, hundreds of people marched to criticize Israel's military actions in Gaza, The Philadelphia Inquirer reported. A video of demonstrators outside of Goldie Falafel depicted people chanting, “Goldie, Goldie, you can’t hide, we charge you with genocide." Shapiro first addressed the protest on X, formerly known as Twitter. Later at an event in suburban Philadelphia, the governor said he told one of the restaurant's owners that he supported him and his staff. Michael Solomonov is a prominent Israeli chef who has co-authored three cookbooks and received several James Beard awards. He and Steve Cook, the co-owner, are both Jewish. “The purposeful gathering of a mob outside of a restaurant simply because it is owned by a Jewish person. Well, that’s antisemitism, plain and simple,” Shapiro said at a separate news conference Monday in suburban Philadelphia. Goldie Falafel is a vegan kosher restaurant that has five locations in Philadelphia and is owned by the restaurant group CookNSolo. Representatives from the group declined to comment. In a statement, organizers of the protest, Philly Palestine Coalition, called for a boycott of the company's restaurants. They criticized Solomonov’s role as a culinary ambassador to Israel, and his recent donation efforts. “He has made a handsome living passing off Palestinian and other Arab cuisine as ‘Israeli food,’ the proceeds of which are now supporting the very army that is enacting Israel’s genocidal bombing of Palestinians,” the organizers wrote. On Oct. 12, CookNSolo announced on Instagram that they were donating all sales from the day to United Hatzalah, a nonprofit emergency medical service that responds to calls in Israel and the West Bank. No arrests were made, though during the course of the evening, several businesses were vandalized, including a bank and a Starbucks, as well as a police vehicle, the Philadelphia Police Department said. Shapiro called for those who defaced property and broke the law to be arrested and prosecuted. Police said they were investigating and reviewing footage of the area. While campaigning last year, Shapiro talked about his Jewish faith and how it inspires him toward public service. A line of people stretched into the street outside of Goldie on Monday afternoon, with many coming out to get food and to show support. Hamas’ Oct. 7 attack on Israel triggered the deadliest Israeli-Palestinian violence in decades. The war has killed thousands and displaced over three-fourths of Gaza's population of 2.3 million people, who are running out of safe places to go. The war has sparked protests against the war across the U.S. andabroad. Students around the country have faced suspension for demonstrations on college campuses and high school walkouts. Demonstrators who targeted specific companies have largely protested media bias and focused on media outlets, including the New York Times.
english
- Urfi Javed Goes Bold Yet Again! Is She Trying To Outdo Ranveer Singh? - Ekta Kapoor Refutes KRK's Claim That Ek Villain Returns Is Copied From Korean Film; 'Don't Know What He Is. . . ' - Salman Khan Praises Katrina Kaif; 'She Has Worked Really Hard' - Shamshera's Debacle Makes Ranbir Kapoor Worried About Animal; 'I Hope The Audience Is Ready For That Film' - Ram Gopal Varma On Ranveer Singh's Naked Photoshoot: If Women Can Show Off Their Sexy Bodies Why Cannot Men?
english
In this new Cricbuzz series - The IPL Benchwarmers - we talk to players who made it to the IPL alright, but didn't go very far, and were out of opportunities - and reckoning - sooner than they'd have liked. In this ultra-professional age of Twenty20 cricket, in which the game is increasingly analysed to within an inch of its life, it's refreshing to return to the shortest format's roots and recall what the early days of the IPL were like. IPL squads these days are assembled on the back of hours and hours of statistical examination, highbrow tactical debate and attempts to control even the minutiae of a head-to-head encounter. But this was not the case in 2008, when the first edition of one of world sport's most successful events was effectively a game of real-life fantasy cricket played out by India's millionaires. The extreme to which this went is brilliantly represented by the story of Tatenda Taibu, Zimbabwe's diminutive wicketkeeper-batsman and a player who scored a lucrative gig at Kolkata Knight Riders, thanks to having admirers in high places. Taibu was at the top of his game in January 2008, but was nonetheless taken aback to receive a phone call from a certain 'Diraj' during Zimbabwe's tour of Pakistan - the sort of call that might raise one's eyebrows. Diraj said that KKR wanted to put Taibu's name in the auction for the inaugural IPL, and could he provide his email address so that he could complete the necessary forms. Taibu was fresh from scoring 81 in an ODI in Hyderabad, a city in the Sindh province of Pakistan, but soon obliged. He was duly snapped up for $125,000 at the auction, and was on his way to Bollywood icon Shah Rukh Khan's team. It would be a few months before he learnt KKR's primary motivation for adding him to a squad that had Brendon McCullum and Wriddhiman Saha among the wicketkeeping stock. "Shah Rukh was brilliant, amazing, although maybe I'm a bit biased because I was his son's favourite player," Taibu recalls to Cricbuzz. "I remember him bringing his son (Aryan) into the changing room and he came straight to me and said, 'Tatenda, there is someone I would like you to meet.' His son was 10 at the time if my memory serves me right. And he says, 'You know what, yours was the first name I wrote on the paper, because my son thinks you are round about the same age [as him], because you are short.'" The story should not diminish Taibu's reputation as a cricketer. He was selected for a tour of the West Indies in 2000 at the age of 16, at a time when Zimbabwe were peaking as a cricketing nation. When politics led the country to lose 15 of its best players in the rebel walkout of 2004, Taibu became the youngest captain in Test history, and his batting capabilities were the difference between heavy defeat and total annihilation in most games. By late 2005, tired of Zimbabwe Cricket's lies and mismanagement, and entangled in a dark political web that brought his family's safety into question, he quit international cricket and went wandering - through Bangladesh, England and South Africa. When ZC's sponsors made Taibu's return one of their conditions for ongoing funding, Taibu was talked into returning. He announced his international comeback in mid-2007 with an unbeaten century against South Africa, and narrowed his focus to individual goals in order to shield out the chaos of Zimbabwe's cricket structures. "Late 2007 to 2009 was when I played my best cricket, after rejoining the national team," he says. "I remember my state of mind during that period, I concentrated less on the team and more on myself. That was because of the disappointment, which anyone who knows my history will understand. Zimbabwe cricket was not in a good state at that time. We had withdrawn ourselves from Test cricket so we were only playing 50-over cricket." Needless to say with ZC in dire straits, and Zimbabwe as a country bottoming out economically in 2008, a three-year contract with KKR that netted $110,000 per year (after tax) was handy - particularly for someone with healthy habits. "It was a lot of money in comparison to what I was earning from Zimbabwe Cricket, which at the time was about $80,000-90,000 a year," recalls Taibu. "I'm very economical when it comes to using money - I'm not a flashy kind of person or materialistic. So I bought a property and used some of the money to pay back to my coaches who had given time for me to achieve what I achieved. My wife and I helped out a children's home as well, and managed to put some in savings. It went a long way for us." But Taibu's ambitions went beyond a big payday and its potential to assist people around him. He wanted to succeed on the field as well. His first task, though, was simply to get onto that field. While he had an admirer in high places, Aryan Khan was not picking the playing XI, and Taibu was seen as a middle-order batting option in a squad full of international stars. "After looking at the squad and the competition that I had, I actually didn't think I was going to get a single game," Taibu admits. "We had Ricky Ponting, Chris Gayle, Dave Hussey, Umar Gul, Shoaib Akhtar, Ajantha Mendis, Salman Butt, Mohammad Hafeez, Brad Hodge and Brendon McCullum. But I kept on preparing well, because the One that controls the universe might have other plans, and other plans He had. After losing four straight games, I got a chance. I had batted well in all the warm-up games without being dismissed. In particular, one game we played against each other I played really well on a very green track against Shoaib, Umar Gul and Ajit Agarkar. The way I prepared managed to get the confidence of our captain, Sourav Ganguly, and coach John Buchanan." Taibu's selection would coincide with Kolkata breaking a four-match losing streak to win three on the trot, but the Zimbabwean contributed just 28 runs in those three games. Looking back, he feels that his entire IPL career came down to his first innings, and his inability to convert a promising start into something more. Picked to bat at No 5 in a game against Bangalore at Eden Gardens, Taibu walked to the crease with the home side on 46 for 3 batting first, after local icon Ganguly had been run out. The Bangalore attack boasted Dale Steyn, Zaheer Khan, Praveen Kumar, R Vinay Kumar and Anil Kumble, and the crowd was bigger than any he had played in front of before, but Taibu was not feeling overawed. "I loved it and if anything I played better in front of bigger crowds. It was nice having such noise that you could not even hear yourself speak," he says. "I felt really great. I remember Kumar was bowling and I got two runs off the first ball and blocked the next one. Straight away I felt good. When he tried to bowl inswing I hit him over midwicket, and when he tried to bowl away swing I hit him over extra cover. Those are the two boundaries that I scored. But the most profound thing I remember about the innings is that it could have made me way better than I was. Had I gone on to convert my 15 to a fifty or something, that would have almost cemented my place, but I didn't take that opportunity. "Steyn was brought back into the attack because I was looking set and we were starting to build an innings, and instead of just helping the ball on its way I tried to smash it for six and got a top edge (that was caught by wicketkeeper Mark Boucher). The other two games weren't much to talk about, because I was coming in around the 18th or 19th over without much to do - I would just try and give my partner strike. That's why I always go back to that first innings, which was the only time I had a chance to make something of myself in that league." While he had little opportunity to score runs, Taibu still collected some memories along the way. The third match, against Delhi Daredevils, saw Shoaib Akhtar make a memorable IPL debut with a searing spell of new-ball bowling that destroyed a top order of Gautam Gambhir, Virender Sehwag and AB de Villiers. Shoaib finished with 4 for 11 from three overs as Delhi were bowled out for 110, but Taibu was just surprised to see the Pakistani pacer on the field. "We had practised with him and the way he had bowled and his fitness levels were nowhere near international standards. He had not been playing for a long time due to an injury and had just come back to playing. He struggled to finish his overs in the squad games we played in between the proper matches and he had struggled with our fitness practices. So I was surprised he was fit to take the field. I remember thinking, 'Either fair play to his character that he can take the field when he isn't ready, or fair play to the trainer who managed to get him in shape.' He bowled really quickly and swung the ball." Taibu was run out for seven in that game, taking on Tillakaratne Dilshan's arm as he sped back for a second. "He was a very good fielder but I fancied myself as a quick runner between the wickets and I thought I would make it. I actually made my ground but the bat bounced off the ground. Had the rules been as they are now, I would have made it." Taibu was dropped after that, and watched Kolkata go on a three-game losing streak. He was due to return for a game in Delhi towards the end of the campaign, until it was washed out without a ball being bowled. KKR eventually finished sixth to miss out on the semi-finals, and Taibu found himself heading back to his old life. "It first hit me when I got to the airport and I was left to board my flight back to Zimbabwe. I no longer had guards around me and people carrying my bag, and I'd just left a professional setup. A week later I was playing a first-class game, and it was like living in a different world altogether. There was high professionalism at the IPL and then I came back home and the level was so different - even just the pace at which the game was played. It's supposed to be 'easier' but you actually start to struggle because of the pace, just waiting for the ball to get to you, and getting bad balls that you won't get at IPL level. I found it very difficult adjusting from that high level of cricket to going back to our franchise cricket." Kolkata paid Taibu's contract out the following year and let him go - a sign, perhaps, that there was already less room for sentiment in the IPL. He played on for Zimbabwe until mid-2012, when he quit international cricket at the age of 29 to focus on his work with the church. Disillusionment at the way cricket was being run in Zimbabwe did not make the decision difficult. A subsequent spell as a selector and cricket director in Zimbabwe ended in further acrimony, but Taibu has let that go now. Last year he released an autobiography that laid out the details of a career that was so often derailed by politics. His son TJ has been reading it during lockdown at the family's home in Liverpool, and is not the only one to have provided a positive review. One suspects that Aryan Khan, now a 22-year-old filmmaking student, might have been an equally avid reader.
english
This year we saw some of the Bollywood’s beloved actors leaving for their heavenly abode. After Irrfan Khan and Rishi Kapoor, Sushant Singh Rajput left his fans shocked after he allegedly ended his life. After his death, SSR’s close friend Mahesh Shetty had become one of the prime witnesses who was the last dialled call on SSR’s phone. As we are ready to step into 2021, Mahesh Shetty penned a long note for those who left away before time. For those who don’t know, Sushant Singh Rajput had last called Mahesh Shetty and he wasn’t able to pick the phone. Sushant Singh Rajput ended his life on June 14 by hanging himself to the ceiling at his Bandra West apartment. It’s been 6 months ever since he left for heavenly abode and CBI has been investigating his case very closely. A few months back, CBI ruled out homicide and said it was a clear case of suicide.
english
<filename>modules/aho/lexrep/MatchSet.cpp #include "StaticModel.h" namespace iknow { namespace model { namespace MODELNS { static const SmallOffset match_set[] = { #include "lexrep/MatchSet.inl" }; const SmallOffset* MatchSet() { return match_set; } } } }
cpp
<reponame>mono-developer/RSMaker {"type":"Feature","id":"node/2997543968","properties":{"addr:city":"Oßling","addr:housenumber":"1","addr:postcode":"01920","addr:street":"Am Teichhaus","addr:suburb":"Weißig","amenity":"restaurant","email":"<EMAIL>","fixme":"position estimated","name":"<NAME>","operator":"Helga und Uwe Bräuer","phone":"+49 35792 50411","shop":"farm","website":"http://www.teichhaus1.de/","id":"node/2997543968"},"geometry":{"type":"Point","coordinates":[14.1132895,51.348876]}}
json
We depend on sturdy technical force and continually create sophisticated technologies to meet the demand of blank sweatshirt, Custom Cycling Clothing , Custom Cycling Clothing , Recycle Sport Bra ,Swim Trunk Water Resistant . Any needs from you'll be paid out with our best notice! The product will supply to all over the world, such as Europe, America, Australia,Switzerland , Iraq ,Paraguay , Zimbabwe .We believe in establishing healthy customer relationships and positive interaction for business. Close cooperation with our customers has helped us to create strong supply chains and reap benefits. Our products have gained us widespread acceptance and the satisfaction of our worldwide valued clients.
english
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _without from \"lodash-es/without\";\nimport cx from 'clsx';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { childrenUtils, customPropTypes, getElementType, getUnhandledProps, SUI, useTextAlignProp } from '../../lib';\n/**\n * A card can contain a header.\n */\n\nfunction CardHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n textAlign = props.textAlign;\n var classes = cx(useTextAlignProp(textAlign), 'header', className);\n var rest = getUnhandledProps(CardHeader, props);\n var ElementType = getElementType(CardHeader, props);\n return /*#__PURE__*/React.createElement(ElementType, _extends({}, rest, {\n className: classes\n }), childrenUtils.isNil(children) ? content : children);\n}\n\nCardHeader.handledProps = [\"as\", \"children\", \"className\", \"content\", \"textAlign\"];\nCardHeader.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /** An element type to render as (string or function). */\n as: PropTypes.elementType,\n\n /** Primary content. */\n children: PropTypes.node,\n\n /** Additional classes. */\n className: PropTypes.string,\n\n /** Shorthand for primary content. */\n content: customPropTypes.contentShorthand,\n\n /** A card header can adjust its text alignment. */\n textAlign: PropTypes.oneOf(_without(SUI.TEXT_ALIGNMENTS, 'justified'))\n} : {};\nexport default CardHeader;","map":{"version":3,"sources":["/Users/atusanaseri/code/project4/node_modules/semantic-ui-react/dist/es/views/Card/CardHeader.js"],"names":["_extends","_without","cx","PropTypes","React","childrenUtils","customPropTypes","getElementType","getUnhandledProps","SUI","useTextAlignProp","CardHeader","props","children","className","content","textAlign","classes","rest","ElementType","createElement","isNil","handledProps","propTypes","process","env","NODE_ENV","as","elementType","node","string","contentShorthand","oneOf","TEXT_ALIGNMENTS"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,QAAP,MAAqB,mBAArB;AACA,OAAOC,EAAP,MAAe,MAAf;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAASC,aAAT,EAAwBC,eAAxB,EAAyCC,cAAzC,EAAyDC,iBAAzD,EAA4EC,GAA5E,EAAiFC,gBAAjF,QAAyG,WAAzG;AACA;AACA;AACA;;AAEA,SAASC,UAAT,CAAoBC,KAApB,EAA2B;AACzB,MAAIC,QAAQ,GAAGD,KAAK,CAACC,QAArB;AAAA,MACIC,SAAS,GAAGF,KAAK,CAACE,SADtB;AAAA,MAEIC,OAAO,GAAGH,KAAK,CAACG,OAFpB;AAAA,MAGIC,SAAS,GAAGJ,KAAK,CAACI,SAHtB;AAIA,MAAIC,OAAO,GAAGf,EAAE,CAACQ,gBAAgB,CAACM,SAAD,CAAjB,EAA8B,QAA9B,EAAwCF,SAAxC,CAAhB;AACA,MAAII,IAAI,GAAGV,iBAAiB,CAACG,UAAD,EAAaC,KAAb,CAA5B;AACA,MAAIO,WAAW,GAAGZ,cAAc,CAACI,UAAD,EAAaC,KAAb,CAAhC;AACA,SAAO,aAAaR,KAAK,CAACgB,aAAN,CAAoBD,WAApB,EAAiCnB,QAAQ,CAAC,EAAD,EAAKkB,IAAL,EAAW;AACtEJ,IAAAA,SAAS,EAAEG;AAD2D,GAAX,CAAzC,EAEhBZ,aAAa,CAACgB,KAAd,CAAoBR,QAApB,IAAgCE,OAAhC,GAA0CF,QAF1B,CAApB;AAGD;;AAEDF,UAAU,CAACW,YAAX,GAA0B,CAAC,IAAD,EAAO,UAAP,EAAmB,WAAnB,EAAgC,SAAhC,EAA2C,WAA3C,CAA1B;AACAX,UAAU,CAACY,SAAX,GAAuBC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAAzB,GAAwC;AAC7D;AACAC,EAAAA,EAAE,EAAExB,SAAS,CAACyB,WAF+C;;AAI7D;AACAf,EAAAA,QAAQ,EAAEV,SAAS,CAAC0B,IALyC;;AAO7D;AACAf,EAAAA,SAAS,EAAEX,SAAS,CAAC2B,MARwC;;AAU7D;AACAf,EAAAA,OAAO,EAAET,eAAe,CAACyB,gBAXoC;;AAa7D;AACAf,EAAAA,SAAS,EAAEb,SAAS,CAAC6B,KAAV,CAAgB/B,QAAQ,CAACQ,GAAG,CAACwB,eAAL,EAAsB,WAAtB,CAAxB;AAdkD,CAAxC,GAenB,EAfJ;AAgBA,eAAetB,UAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _without from \"lodash-es/without\";\nimport cx from 'clsx';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { childrenUtils, customPropTypes, getElementType, getUnhandledProps, SUI, useTextAlignProp } from '../../lib';\n/**\n * A card can contain a header.\n */\n\nfunction CardHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n textAlign = props.textAlign;\n var classes = cx(useTextAlignProp(textAlign), 'header', className);\n var rest = getUnhandledProps(CardHeader, props);\n var ElementType = getElementType(CardHeader, props);\n return /*#__PURE__*/React.createElement(ElementType, _extends({}, rest, {\n className: classes\n }), childrenUtils.isNil(children) ? content : children);\n}\n\nCardHeader.handledProps = [\"as\", \"children\", \"className\", \"content\", \"textAlign\"];\nCardHeader.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /** An element type to render as (string or function). */\n as: PropTypes.elementType,\n\n /** Primary content. */\n children: PropTypes.node,\n\n /** Additional classes. */\n className: PropTypes.string,\n\n /** Shorthand for primary content. */\n content: customPropTypes.contentShorthand,\n\n /** A card header can adjust its text alignment. */\n textAlign: PropTypes.oneOf(_without(SUI.TEXT_ALIGNMENTS, 'justified'))\n} : {};\nexport default CardHeader;"]},"metadata":{},"sourceType":"module"}
json
With the lockdown imposed across the country, the celebrities are confined to their houses. Since all the movie shootings got suspended, they have nothing to do busy, they are revisiting their old pictures and sharing them with their fans on Social Media. Bollywood's actress, Sara Ali Khan took Instagram to share a monochrome photo of her. Sara looked pretty as ever in what seems to be a fancy lehenga choli. This Love Aaj Kal actress looked simple with half tied hair to the back. Along with the picture, she wrote, "Our hearts, minds and souls aren't in lockdown #stayhome #staystrong #staypositive #staysafe. " Unlike her regular quotes, she wrote a bit philosophical this time. On the work front, Sara will be seen opposite to Varun Dhawan in Coolie No. 1, and sharing screen space with Akshay Kumar and Dhanush in Atrangi Re.
english
<filename>src/main/java/openmarker/trove/net/SocketFactory.java /* * Copyright 1997-2011 teatrove.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package openmarker.trove.net; import java.net.*; /** * Allows client sockets to be created or recycled. * * @author <NAME> */ public interface SocketFactory { /** * Returns the InetAddress and port that this factory will most likely * connect to. If the address isn't precisely known, its value is 0.0.0.0. * If the port isn't known, its value is -1. */ public InetAddressAndPort getInetAddressAndPort(); /** * Returns the InetAddress and port that this factory will most likely * connect to. If the address isn't precisely known, its value is 0.0.0.0. * If the port isn't known, its value is -1. * * @param session Object whose hashcode might be used to select a specific * connection if factory is distributed. If null, then no session is used. */ public InetAddressAndPort getInetAddressAndPort(Object session); /** * Returns the default timeout for creating or getting sockets or -1 if * infinite. */ public long getDefaultTimeout(); /** * Must always return a new socket connection. When the socket is no longer * needed, call {@link recycleSocket} so that it be used again. * * @throws ConnectException if timeout has elapsed and no socket is * available or factory is closed */ public CheckedSocket createSocket() throws ConnectException, SocketException; /** * Returns a new socket connection. When the socket is no longer * needed, call {@link recycleSocket} so that it be used again. * * @param session Object whose hashcode might be used to select a specific * connection if factory is distributed. If null, then no session is used. * @throws ConnectException if timeout has elapsed and no socket is * available or factory is closed */ public CheckedSocket createSocket(Object session) throws ConnectException, SocketException; /** * Returns a new socket connection. When the socket is no longer * needed, call {@link recycleSocket} so that it be used again. * * @param timeout Maximum time to wait (in milliseconds) for a connection * to be created before throwing a ConnectException * @throws ConnectException if timeout has elapsed and no socket is * available or factory is closed */ public CheckedSocket createSocket(long timeout) throws ConnectException, SocketException; /** * Returns a new socket connection. When the socket is no longer * needed, call {@link recycleSocket} so that it be used again. * * @param session Object whose hashcode might be used to select a specific * connection if factory is distributed. If null, then no session is used. * @param timeout Maximum time to wait (in milliseconds) for a connection * to become available before throwing an exception * @throws ConnectException if timeout has elapsed and no socket is * available or factory is closed */ public CheckedSocket createSocket(Object session, long timeout) throws ConnectException, SocketException; /** * Returns a new or recycled socket connection. When the socket is no * longer needed, call {@link recycleSocket} so that it be used again. * * @throws ConnectException if timeout has elapsed and no socket is * available or factory is closed */ public CheckedSocket getSocket() throws ConnectException, SocketException; /** * Returns a new or recycled socket connection. When the socket is no * longer needed, call {@link recycleSocket} so that it be used again. * * @param session Object whose hashcode might be used to select a specific * connection if factory is distributed. If null, then no session is used. * @throws ConnectException if timeout has elapsed and no socket is * available or factory is closed */ public CheckedSocket getSocket(Object session) throws ConnectException, SocketException; /** * Returns a new or recycled socket connection. When the socket is no * longer needed, call {@link recycleSocket} so that it be used again. * * @param timeout Maximum time to wait (in milliseconds) for a connection * to be returned before throwing a ConnectException * @throws ConnectException if timeout has elapsed and no socket is * available or factory is closed */ public CheckedSocket getSocket(long timeout) throws ConnectException, SocketException; /** * Returns a new or recycled socket connection. When the socket is no * longer needed, call {@link recycleSocket} so that it be used again. * * @param session Object whose hashcode might be used to select a specific * connection if factory is distributed. If null, then no session is used. * @param timeout Maximum time to wait (in milliseconds) for a connection * to be returned before throwing a ConnectException * @throws ConnectException if timeout has elapsed and no socket is * available or factory is closed */ public CheckedSocket getSocket(Object session, long timeout) throws ConnectException, SocketException; /** * Recycle a socket connection that was returned from the {@link getSocket} * or {@link createSocket} methods. Since SocketFactory has no knowledge of * any protocol being used on the socket, it is the responsibility of the * caller to ensure the socket is in a "clean" state. Depending on * implementation, the recycled socket may simply be closed. * * @param socket Socket which must have come from this factory. Passing in * null is ignored. */ public void recycleSocket(CheckedSocket socket) throws SocketException, IllegalArgumentException; /** * Closes all recycled connections, but does not prevent new connections * from being created and recycled. */ public void clear(); /** * Returns the number of recycled sockets currently available. */ public int getAvailableCount(); }
java
<reponame>tqian/SARAv2<filename>node_modules/angular-azure-blob-service/package.json { "_args": [ [ "angular-azure-blob-service@1.1.0", "/Users/mash2/Dropbox (PAC LAB)/codes/ionic_projects/SARAV3/SARA_modular" ] ], "_from": "angular-azure-blob-service@1.1.0", "_id": "angular-azure-blob-service@1.1.0", "_inBundle": false, "_integrity": "<KEY> "_location": "/angular-azure-blob-service", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, "raw": "angular-azure-blob-service@1.1.0", "name": "angular-azure-blob-service", "escapedName": "angular-azure-blob-service", "rawSpec": "1.1.0", "saveSpec": null, "fetchSpec": "1.1.0" }, "_requiredBy": [ "/" ], "_resolved": "https://registry.npmjs.org/angular-azure-blob-service/-/angular-azure-blob-service-1.1.0.tgz", "_spec": "1.1.0", "_where": "/Users/mash2/Dropbox (PAC LAB)/codes/ionic_projects/SARAV3/SARA_modular", "dependencies": { "tslib": "^1.9.0" }, "description": "[![Build Status](https://travis-ci.org/Gullfaxi171/angular-azure-blob-service.svg?branch=master)](https://travis-ci.org/Gullfaxi171/angular-azure-blob-service)", "devDependencies": { "@angular-devkit/build-angular": "~0.8.0", "@angular/cli": "6.2.3", "@angular/compiler-cli": "^6.1.9", "@angular/language-service": "^6.1.9", "@types/jasmine": "~2.8.8", "@types/jasminewd2": "~2.0.4", "@types/node": "~10.11.3", "codelyzer": "~4.4.4", "jasmine-core": "~3.2.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~3.0.0", "karma-chrome-launcher": "~2.2.0", "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "^2.0.4", "karma-jasmine": "~1.1.2", "karma-jasmine-html-reporter": "^1.3.1", "ng-packagr": "^4.2.0", "protractor": "~5.4.1", "ts-node": "~7.0.1", "tslint": "~5.11.0", "typescript": "^2.9.2" }, "es2015": "fesm2015/angular-azure-blob-service.js", "esm2015": "esm2015/angular-azure-blob-service.js", "esm5": "esm5/angular-azure-blob-service.js", "fesm2015": "fesm2015/angular-azure-blob-service.js", "fesm5": "fesm5/angular-azure-blob-service.js", "license": "MIT", "main": "bundles/angular-azure-blob-service.umd.js", "metadata": "angular-azure-blob-service.metadata.json", "module": "fesm5/angular-azure-blob-service.js", "name": "angular-azure-blob-service", "peerDependencies": { "@angular/animations": "^6.1.9", "@angular/common": "^6.1.9", "@angular/compiler": "^6.1.9", "@angular/core": "^6.1.9", "@angular/forms": "^6.1.9", "@angular/platform-browser": "^6.1.9", "@angular/platform-browser-dynamic": "^6.1.9", "@angular/router": "^6.1.9", "classlist.js": "^1.1.20150312", "core-js": "^2.5.7", "node-sass": "^4.9.3", "rxjs": "^6.3.3", "web-animations-js": "^2.3.1", "zone.js": "^0.8.26" }, "private": false, "sideEffects": false, "typings": "angular-azure-blob-service.d.ts", "version": "1.1.0" }
json
--- layout: null section-type: about title: About --- ## About Hi, I am Hrishabh, a Software Developer by professsion. I have done undergraduate course specialised in Computer Science and Engineering. Currently I am working in Tata Consultancy Services Limited as Java Developer. I am also familiar with a variety of programming languages, frameworks and libraries including Python, JavaScript, Node.js, Redux etc. Sometimes I write Tech Blogs. In my spare time, I love to cook 👨🏻‍🍳. <small> Currently I am attending many meetups and online events to Explore 🚀 features of ML 🤖. </small>
html
package org.batfish.question.bidirectionalreachability; import com.google.common.collect.ImmutableMap; import java.util.Map; import javax.annotation.ParametersAreNonnullByDefault; import net.sf.javabdd.BDD; import org.batfish.specifier.Location; /** The result of a bidirectional reachability analysis. */ @ParametersAreNonnullByDefault public class BidirectionalReachabilityResult { private final Map<Location, BDD> _startLocationReturnPassFailureBdds; private final Map<Location, BDD> _startLocationReturnPassSuccessBdds; public BidirectionalReachabilityResult( Map<Location, BDD> startLocationReturnPassSuccessBdds, Map<Location, BDD> startLocationReturnPassFailureBdds) { _startLocationReturnPassSuccessBdds = ImmutableMap.copyOf(startLocationReturnPassSuccessBdds); _startLocationReturnPassFailureBdds = ImmutableMap.copyOf(startLocationReturnPassFailureBdds); } /** * @return A {@link BDD} representing the set of packets at each {@link Location} for which the * forward direction can succeed and then the return direction can fail. */ public Map<Location, BDD> getStartLocationReturnPassFailureBdds() { return _startLocationReturnPassFailureBdds; } /** * @return A {@link BDD} representing the set of packets at each {@link Location} for which both * directions (can) succeed. */ public Map<Location, BDD> getStartLocationReturnPassSuccessBdds() { return _startLocationReturnPassSuccessBdds; } }
java
BY A STAFF REPORTER: Again fire brokes at Mumbai city. Sources said that, Level 2 fire breaks out at a mall in Hiranandani Powai. Fire tenders at the spot. 12 fire tenders at the spot after a Level 2 fire broke out in Mumbai's Powai area. No one trapped or injured so far. As per BMC report, fire broke out at about 7:30 am in Haico Super Market, Powai.
english
import math import time ### IronPython 2 from mesh_vertex_color import irp_ray_triangle_intersection reload(irp_ray_triangle_intersection) rt = irp_ray_triangle_intersection.RayTriangleIntersection() class MeshPointInsideOutside(): """ mesh = [[v0.X, v0.Y, v0.Z], [v1.X, v1.Y, v1.Z], [v2.X, v2.Y, v2.Z]] """ def mesh_intersect(self, mesh, point): ### ray_triangle_intersection ### rt.calc_intersection(o, d, v0, v1, v2) o = [0, 0, 0] d = point v0 = mesh[0] v1 = mesh[1] v2 = mesh[2] bool_intersect = rt.calc_intersection(o, d, v0, v1, v2) return bool_intersect def poly_mesh_intersection(self, poly_mesh, point): in_out_count = 0 mesh_count = len(poly_mesh) ### Poly-Mesh >>> Mesh for i in range(mesh_count): tmp_mesh = poly_mesh[i] in_out_bool = self.mesh_intersect(tmp_mesh, point) if in_out_bool != None: in_out_count += 1 return in_out_count
python
# !/usr/bin/env python # -*- coding:utf8 -*- # # Copyright (c) 2019 - 2040 <NAME> Technology CO.,Ltd. # 北京智图时空科技有限公司 # # All rights reserved. # from flask import Flask, render_template, send_from_directory from flask_tus import tus_manager import os app = Flask(__name__) tm = tus_manager(app, upload_url='/file-upload', upload_folder='uploads/') app.run("0.0.0.0", 1080)
python
import { MdiReactIconComponentType } from './dist/typings'; declare const VectorCombineIcon: MdiReactIconComponentType; export default VectorCombineIcon;
typescript
<reponame>sudoyashi/python_progress #set following variables types_of_people = 10 x = f"There are {types_of_people} types of people." binary = "binary" do_not = "don't" y = f"Those who know {binary} and those who {do_not}." #print variables "x" and "y" to create sentences print(x) print(y) #print f-strings, notated with "f" in initial position. #Using f-strings allow you to print literal strings AND variables notated in {} print(f"I said: {x}") print(f"I also said: '{y}'") hilarious = False #Empty curly braces set so for following print with formatting joke_evaluation = "Isn't that joke so funny?! {}" #Since we did not use the format (print (f...)) here, we used curly braces as #a replacement field. Anything placed in {} are evaluating code, like normal. print(joke_evaluation.format(hilarious)) w = "This is the left side of ..." e = "a string with a right side" #printing variables with "+" operator print (w + e)
python
With existing socio-economic challenges, India needs a people-first development paradigm to move towards a climate-secure future, and become a leading voice on climate action for the Global South. With programmes around green fuel, climate-friendly farming, green buildings, low-carbon mobility, and policies for efficient energy use across various economic sectors, the 2023-24 Budget lays a strong foundation for green growth – a step in the right direction for enabling climate action in India. Finance minister Nirmala Sitharaman’s speech builds climate ambition for India, and, in her words, “This Budget provides ₹35,000 crore for priority capital investments towards energy transition and net-zero objectives, and energy security". With an outlay of ₹19,700 crores, the Green Hydrogen Mission is expected to reduce dependence on fossil fuel imports, and help India emerge as a market leader, with an annual production target of 5 MMT by 2030. These measures are instrumental in meeting India’s net-zero objectives under its updated Nationally Determined Contributions (NDCs) by 2070. We must collectively ensure this transition is people-first – where socio-economic benefits trickle down to address energy access and energy poverty in rural areas, and create green jobs in low-income communities. Building on the rise of climate-smart agricultural practices, an agriculture accelerator fund has been set up to promote agricultural tech start-ups in rural areas, and increase productivity and profitability. Over the next three years, 1 crore farmers will be facilitated to adopt natural farming, with 10,000 bio-input resource centres proposed and related GST exemptions. Climate-resilient and nutritious crops, like millets, will be promoted through the establishment of a global hub for millets, and support for the Indian Institute of Millet Research, Hyderabad – for future integration into public food systems. The significance of nature-based solutions also reflects in MISHTI (Mangrove Initiative for Shore Line Habitat and Tangible Incomes), a scheme to strengthen mangrove plantation and ecosystems along India’s shorelines and improve tangible incomes for local communities. The Amrit Dharohar scheme, to be implemented over the next three years to conserve and restore wetlands, is welcome, and urgently needed as two of every five wetlands in India have lost their natural existence in the last 30 years. While the measures and schemes announced are crucial for a green industrial and energy transition, there is little mention of the actual physical risks of climate change. 75% of India’s districts are vulnerable to increasingly unpredictable and extreme weather events, and India might be one of the first places in the world to break the human survivability limit, with extreme heatwaves. India’s annual adaptation costs are an estimated $45.3 billion (over ₹3.7 trillion), and loss and damage from floods and storms alone cost India $7.6 billion (over ₹62,000 crores) in 2021. Over 100 crore people have been affected by natural disasters since 2001; losses amount to over ₹13 trillion, nearly 6% of India’s GDP (adjusted with 2021 prices). Such overwhelming data leaves no other conclusion; deep climate budgeting must aim to climate-proof development schemes – including financial protection schemes, water budgeting, rural/urban planning, and agriculture. Yet, budgetary allocations for inclusive development are not clear on how and whether they account for those risks. For example, it is unclear how risks, such as land subsidence in Joshimath, will be integrated into the proposed sustainable city models, to climate-proof human settlements. India’s position as the seventh most vulnerable country to climate change, and the third largest emitter in the world puts us in a unique position; we have to develop while decarbonising. But in a world where CO2 emissions occupy a disproportionate share of climate conversations, physical climate risks are forcing us to take a hard look at what we’re solving for. Along with improving our economic trajectory and strengthening climate change mitigation, we are also tasked with a deeper challenge of adaptation and resilience – of ensuring every community has access to water, shelter, livelihoods, and food, in the face of climate risks. Although this inalienable, collective right to develop will need larger inflows of capital, domestic and international, and integration of climate risk data into our welfare models, a climate-conscious budget like this is an essential foundation for our future. Shloka Nath is acting CEO, India Climate Collaborative. Unlock a world of Benefits! From insightful newsletters to real-time stock tracking, breaking news and a personalized newsfeed – it's all here, just a click away! Login Now!
english
IMAGES PROVIDED BY: American Gastroenterological Association: "Living with Hemorrhoids." Harvard Health Publications, Harvard Medical School: "Hemorrhoids and what to do about them." FamilyDoctor.org: “Hemorrhoids: Causes and Risk Factors." UpToDate: "Patient information: Hemorrhoids (Beyond the Basics)." Cleveland Clinic: "Hemorrhoids." Mayo Clinic: "Hemorrhoids."
english
import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import { Grid } from '@material-ui/core'; import Button from '@material-ui/core/Button'; import "react-multi-carousel/lib/styles.css"; import { Alert } from '@material-ui/lab'; import Modal from '@material-ui/core/Modal'; import Backdrop from '@material-ui/core/Backdrop'; import Fade from '@material-ui/core/Fade'; import ModalContact from 'components/Modals/modalcontact'; const useStyles = makeStyles((theme) => ({ modal: { display: 'flex', padding: 300, alignItems: 'center', justifyContent: 'center', }, paper: { borderRadius: '24px', }, grid: { padding: 5, [theme.breakpoints.down('xs')]: { padding: 0, paddingBottom: 15 , }, }, image2: { height: '310px', margin: `5%`, [theme.breakpoints.down('xs')]: { width: '100%', margin: 0, }, }, text: { margin: 0, }, buttom: { [theme.breakpoints.down('xs')]: { margin: 10, }, }, })) export default function LendingButton() { const classes = useStyles(); const [open, setOpen] = React.useState(false); const handleOpen = () => { setOpen(true); }; const handleClose = () => { setOpen(false); }; return( <Grid container className={classes.grid} justifyContent="center" alignItems="center"> <Modal aria-labelledby="transition-modal-title" aria-describedby="transition-modal-description" className={classes.modal} open={open} onClose={handleClose} closeAfterTransition BackdropComponent={Backdrop} BackdropProps={{ timeout: 500, }} > <Fade in={open}> <div className={classes.paper}> <Alert style={{"borderRadius":"24px","marginBottom":"10px","padding":"5px"}} severity="info">Para acceder a este servicio pongase en contacto con el siguiente miembro de nustro equipo el lo atendera lo mas rapido posible.</Alert> <ModalContact ></ModalContact> </div> </Fade> </Modal> <Grid style={{"paddingLeft":"4%","paddingRight":"4%","paddingBottom":"4%"}} item md={6} xs={12}> <h1 style={{marginBottom:"10px"}} className={classes.text}>Servicios de Lending</h1> <h4 className={classes.text}>Las compras P2P ofrecen la posibilidad de comprar y vender bitcoin y otras criptomonedas entre particulares de una forma segura. La gran ventaja es la multitud de diferentes métodos de pago disponibles, todo ello, con la seguridad que ofrece Binance.</h4> <Grid container justifyContent="flex-end"><Button className={classes.buttom} onClick={()=>{handleOpen()}} variant="contained" color="primary">Contactenos</Button></Grid> </Grid> <Grid item md={6} xs={12}> <img alt="img" className={classes.image2} src={require(`assets/img/lending.jpg`)} ></img> </Grid> </Grid> ) }
javascript
<filename>node_modules/mapbox-gl-style-spec/docs/_generate/item.html <div class='col12 clearfix pad0y pad2x'> <div> <span class='code space-right'><a id='<%= id %>' href='#<%= id %>'><%= name %></a></span> <% if (prop.function == "interpolated" ) { %><span class='icon smooth-ramp inline quiet'></span><% } %> <% if (prop.function == "piecewise-constant" ) { %><span class='icon step-ramp inline quiet'></span><% } %> <% if (prop.transition) { %><span class='icon opacity inline quiet'></span><% } %> </div> <div> <em class='inline quiet'> <%= prop.required ? 'Required' : 'Optional' %> <% if (prop.type && prop.type !== '*') { %><a href='#<%= prop.type %>'><%= prop.type %></a>.<% } %> </em> <% if (prop.values) { %><span class='space-right quiet'> <em>One of</em> <%= _(prop.values).map(function(opt) { return '<var>' + opt + '</var>' }).join(', ') %>. </span><% } %> <% if (prop.units) { %><span class='space-right quiet'> <em>Units in</em> <% if (typeof prop.units === 'object') { %> <%= _(prop.units).map(function(opt) { return '<var>' + opt + '</var>' }).join(', ') %>. <% } else { %> <var><%= prop.units %></var>. <% } %> </span><% } %> <% if (prop.default || prop.default === false || prop.default === 0) { %><span class='space-right quiet'> <em>Defaults to </em> <var><%= prop.default %></var>. </span><% } %> <% if (prop.requires) { %><span class='space-right quiet'> <%= _(prop.requires).map(function(req) { if (typeof req === 'string') { return '<em>Requires</em> <var>' + req + '</var>.'; } else { if (req['!']) { return '<em>Disabled by</em> <var>' + req['!'] + '</var>.'; } else { return '<em>Requires</em> <var>' + _.pairs(req)[0][0] + ' = ' + _.pairs(req)[0][1] + '</var>.'; } } }).join(' ') %> </span><% } %> </div> <% if (prop.doc) { %> {% capture prop_doc %}<%= prop.doc %>{% endcapture %} <div class='space-bottom1'>{{prop_doc | markdownify}}</div> <% } %> <% if (prop.example) { %> <div class='space-bottom1 clearfix'> {% highlight json %} <%= '"' + name + '": ' + JSON.stringify(prop.example, null, 2) %> {% endhighlight %} </div> <% } %> <% if (prop['sdk-support']) { var support = function(type, sdk) { var support = prop['sdk-support'][type]; if (!support) return 'Not yet supported'; support = support[sdk]; if (support === undefined) return 'Not yet supported'; return '>= ' + support; } %> <div class='space-bottom2'> <table class='fixed'> <thead> <tr class='fill-light'> <th>SDK Support</th> <td class='center'>Mapbox GL JS</td> <td class='center'>iOS SDK</td> <td class='center'>Android SDK</td> </tr> </thead> <tbody> <tr> <td>Base support</td> <td class='center'><%- support('basic', 'js') %></td> <td class='center'><%- support('basic', 'ios') %></td> <td class='center'><%- support('basic', 'android') %></td> </tr> <% if (prop['property-function']) { %> <tr> <td>Data-driven styling</td> <td class='center'><%- support('property-function', 'js') %></td> <td class='center'><%- support('property-function', 'ios') %></td> <td class='center'><%- support('property-function', 'android') %></td> </tr> <% } %> </tbody> </table> </div> <% } %> </div>
html
<filename>fish/tr/it.json { "SWIM_TOWARDS_NEIGHBORS": "Nuota verso i vicini", "SWIM_WITH_NEIGHBORS": "Nuota con i vicini", "NEIGHBOR_COUNT": "Numero di vicini", "SPEED": "Velocità" }
json
{"citations": [{"Paper_link": "http://www.sciencedirect.com/science/article/pii/0375960173900881", "Title": "Positron annihilation in Ca++-doped NaCl single crystals", "authors": [" Balogh", "<NAME>", "<NAME>", "<NAME> "], "Citations_Link": "https://scholar.google.com/scholar?cites=5351560882988579137&as_sdt=2005&sciodt=0,5&hl=en&num=20"}], "paper_link": "https://scholar.google.com/citations?view_op=view_citation&hl=en&user=Zs9227oAAAAJ&cstart=2059&pagesize=100&citation_for_view=Zs9227oAAAAJ:qhW0HyKmSusC", "authors": ["<NAME>", "<NAME>", "<NAME>"], "title": "Positro annihilation in organic media and ionic crystals", "publication": "Chemical Physics Letters 3 (4), 247-249, 1969"}
json
Happy Birthday Katrina Kaif: The Bollywood Star Is The Ultimate Dance Queen And These 10 Songs Are The Proof! A combination of good looks and unpredictable enigma, Katrina Kaif's rise from anonymity to stardom proves that conviction can take one a long way. The actress made her Bollywood debut with Kaizad Gustad's 2003 film Boom which was a box office debable. During her early days in the industry, the Bollywood star received flak for her heavily-accented Hindi and acting chops. However, Kat believed in staying detached from the end result and kept working on her craft. She learnt the Devanagari script, gave tireless auditions, worked hard on her body and taught herself things she wasn't well-versed with. Like a phoenix who rises from the ashes, the actress soon stunned everyone with her transformation. With her successive films hitting the bullseye at the box office, Katrina slowly climbed the ladder of success and established herself as one of the most sought-after actresses in Bollywood. Later, in one of her interviews, when Katrina was asked about her success mantra, the gorgeous lady answered, "Concentration and focus." Another reason why fans are all hearts over Katrina Kaif is because of her mind-blowing dancing skills. However, you folks would be surprised to know that initially, the actress struggled a lot when it came to shaking a leg. "My biggest hichki in the beginning of my career was dance. While shooting for a Telugu film with superstar Venkatesh, Raju Sundaram, who was choreographing me, looked quite irritated with my dancing. But he didn't say anything. Later, on the set of Wanted, I overheard him telling Salman Khan, 'As a dancer, Katrina Kaif is zero!' I was shocked," Katrina recalled in one of her interviews. Isabelle Kaif Reveals One Acting Tip That Katrina Kaif Gave Her; 'Everything Should Be A Little Exaggerated' Determined to prove her naysayers wrong, Katrina took up dance lessons. "I trained with Kathak guru, Veeru Krishnan, from 7 am to 1 pm almost every day. And choreographers Bosco-Ceaser gave me the confidence to perform my best in the film Race. I guess, this is what a good teacher does - gives a person confidence that he/she can do it. That's how I overcame my challenge of being a 'zero' dancer," she added in the same interview. When you look back at Katrina Kaif's 17-year journey in Bollywood, you will realize that the actress has given Bollywood some of its biggest hit dance numbers. As the diva celebrates her 38th birthday today (July 16, 2021), we bring you 10 of our most favourite dance songs of Katrina which always make us want to hit the dance floor. 1. Kamli (Dhoom 3) Katrina Kaif's introductory song in Aamir Khan's Dhoom 3 always leaves us with goosebumps. From her unbelievable histrionics in the air to her well-toned hot bod, the actress sets the temperature soaring in this pumping track choreographed by Vaibhavi Merchant. 2. Chikni Chameli (Agneepath) Katrina Kaif's 'desi thumkas' in this glamorous number from Hrithik Roshan-Sanjay Dutt's Agneepath is a rage with the masses even today. 3. Kala Chashma (Baar Baar Dekho) There's no doubt that Katrina Kaif's 'Kala Chashma' is a party starter. Right from the first frame till the last, the actress and her co-star, the handsome Sidharth Malhotra ooze swag with their 'kala chashma'. And did we forget to mention Kat's six-pack abs which makes you want to hit the gym right away? 4. Mashaallah (Ek Tha Tiger) Ufff, Katrina Kaif's scintillating belly dance moves is enough to make us go 'Mashaallah'. Giving her company on the dance floor is superstar Salman Khan whose signature dance moves make the track even more memorable. 5. Sheila Ki Jawani (Tees Maar Khan) Katrina Kaif left everyone in frenzy with her jaw-dropping dance moves in this song from Akshay Kumar-starrer Tees Maar Khan. The actress watched many DVDs of older films before shooting this track. "There is exposure in the song but it is more about attitude and I was specific about it. It is about dancing with openness and not being inhibited," the actress had said, calling it one of her raunchiest songs. 6. Ishq Shava (Jab Tak Hai Jaan) Katrina Kaif-Shah Rukh Khan's sizzling dance moves in the fast-paced 'Ishq Shava' song is all things love. The actress performed numerous rehearsals for this song before filming and her hard work reflected in the final product. "Katrina had to be dressed in a certain way, and then she was getting her layers off and she had to dance in that freezing cold! "We were still layered in jackets but I can only imagine how the actors pulled it off," Vaibhavi Merchant who choreographed this number recalled in an interview. 7. Zara Zara Touch Me (Race) Is there anyone out there who didn't skip a heartbeat when Katrina Kaif flaunted her seductive dance moves in this Bosco-Caesor choreographed song? The Bollywood star is a dancing dream in this catchy track. 8. Nachde Ne Sare (Baar Baar Dekho) Katrina Kaif exudes charm in this foot-tapping wedding song from Baar Baar Dekho, set against a vibrant backdrop. 9. Pashmina (Fitoor) Who says Katrina Kaif nails only fast-paced and peppy numbers? The actress is a sight for sore eyes in this alluring love song! "To shoot the song 'Pashmina' both I and Aditiya Roy Kapur had to give up our Christmas and New Year's holidays. We broke a few bones, had few injuries during the shoot of the song," the actress recalled but it was every bit worth! 10. Swag Se Swagat (Tiger Zinda Hai) Shot in picturesque locations, Katrina Kaif set the screen ablaze with her enchanting dance moves in this song from Tiger Zinda Hai. Along with Salman Khan, she oozed enough 'swag' to make us go gaga over her! Filmibeat wishes Katrina Kaif a very happy birthday!
english
Rio de Janeiro, Sep 25 (IANS) Joao Paulo scored a late winner as Brazilian football club Botafogo kept alive their hopes of qualifying for the 2018 Copa Libertadores with a 3-2 victory over Coritiba in Brazil’s Serie A championship. Botafogo moved up to sixth — Brazil’s last Copa Libertadores qualifying place — while Coritiba slid to 19th in the 20-team standings, reports Xinhua news agency. On Sunday, defender Werley gave Coritiba an early lead at their Couto Pereira stadium before Roger and Guilherme struck just after halftime to give the visitors the lead. Thiago Carleto appeared to secure a point for the hosts when he thumped a free-kick into the bottom right corner in the 83rd minute. But Botafogo secured their 11th win of the campaign when Paulo controlled a long pass with his chest before swivelling and firing a left-footed shot past goalkeeper Wilson. In other matches on Sunday, Corinthians drew 1-1 at Sao Paulo, Chapecoense secured a 1-0 home victory over Ponte Preta, Cruzeiro won 2-1 at Atletico Goianiense, hosts Bahia beat Gremio 1-0, Vitoria won 3-1 at Atletico Mineiro and defending champions Palmeiras clinched a 1-0 victory at Fluminense.
english
With the Centre giving its seal of approval, India hopes to officially become the seventh nation to ratify the Nagoya Protocol — which prevents biopiracy and ensures that local communities will benefit from the commercial exploration of their natural genetic resources — by the time the high-level segment of the U. N. summit on biodiversity begins here on October 16. A process to ensure that India officially appears on the U. N. list still remains before Prime Minister Manmohan Singh opens the high-level segment, welcoming Ministers from 192 nations, in ten days’ time. The Protocol is vital to India’s interests, given that the mega-diverse country has seven to eight per cent of the world’s recorded species and a vast repertoire of traditional knowledge, including a rich history of alternative medicine systems such as Ayurveda and Unani and Siddha, which use natural resources.
english
{ "id": "d264-82", "text": "7H -H\ns~-\nLeo Martin\nRadio station WBGR\nBo3ton University\nBoston, ma333c:vj33tts\n5\n’4133 Camille s. Rendcrson\nRadio Station ;VBKY\nUniversity of Kentucky\nLexington, Kentucky $\nf\nSidney Stone\nRadio station 7B0U\nBowlin ? Green *tate University\nBowling Green, Ohio 3\nMarguerite Kirk\nRadio Station V.’LGQ\n>*' Direc tor, Dept, of Libraries\nVisual A Us and Radio\n31 Green St., Newark 2. <NAME>. 5\n<NAME>\nRadio Station iVBSZ\nBoard ©f Education\n228 North LaSalle Streat\nChicago, Illinois 2\n<NAME>\nRadio Station V/BAA\nPurdue University\nLafayette, Indiana 2\n| ' ~T\nDale*F. Keller\nRadi® Station WgP3-FM\nGreensboro Public Schools\n501 Aaheboro 3t.\nGreensboro, North Carolina *\nParker 7heatley\nRadio Station AGDH\nLowell Institute Cooperative\nBros leas tint Council, Symphony Call\nBoat&n lb, Mass. 5\nH. B, Salley\nRadio Station flFPL\nLouisville .• ree Public Library\nLouisville 3, Kentucky\nI 1\nGeorge 0. Johnson\nRadio Station w?IU\nIndiana University\nBlod-nington, Indiana\nJ’-s ' ■\nE. C* Waggoner\nms\nBoar*J of Education\nHigh School Building\nBlgir), Illinois\nB. Kendall Crane\nRadi© Station tfDUQ\nDuguSsne University\nPittsburg, Pennsylvania\nTom Carnegie\nRadio Station 17AJC-FM\n1204 !3. Delaware St0\nIndianapolis, Ind.\ndigs Joan U. Olrich\nRadio Station UAER\nSyracuse University\nSyracuse, New York\n2\n5\nMiss Kathleen U. Lardlb\nRalib Station WDTR\n934^ Lawton Avenue\nDetroit 6, Michigan 3\nR, Dwight wheelor\nStation #DET\n*ay?se University 5063 Can3 Avo.\nDetroit, Mich, 3" }
json
package com.atexpose.dispatcher.channels.web_channel.redirect; import lombok.SneakyThrows; import org.junit.Assert; import org.junit.Test; import java.net.URI; public class HttpsRedirectTest { @Test @SneakyThrows public void testShouldRedirect_And_GetNewLocation_http() { URI uri = new URI("http://www.example.com"); Assert.assertTrue(new HttpsRedirect().shouldRedirect(uri)); Assert.assertEquals("https://www.example.com", new HttpsRedirect().getNewLocation(uri).toString()); } @Test @SneakyThrows public void testShouldRedirect_And_GetNewLocation_HTTP_uppercase() { URI uri = new URI("HTTP://www.example.com"); Assert.assertTrue(new HttpsRedirect().shouldRedirect(uri)); Assert.assertEquals("https://www.example.com", new HttpsRedirect().getNewLocation(uri).toString()); } @Test @SneakyThrows public void testShouldRedirect_https() { URI uri = new URI("https://www.example.com"); Assert.assertFalse(new HttpsRedirect().shouldRedirect(uri)); } @Test @SneakyThrows public void testShouldRedirect_HTTPS_uppercase() { URI uri = new URI("HTTPS://www.example.com"); Assert.assertFalse(new HttpsRedirect().shouldRedirect(uri)); } @Test @SneakyThrows public void testGetRedirect_argumentShouldNotChange() { URI uri = new URI("http://www.example.com"); Assert.assertEquals("https://www.example.com", new HttpsRedirect().getNewLocation(uri).toString()); Assert.assertEquals("http://www.example.com", uri.toString()); } }
java
Follow Us On: The remarkable odyssey of Asia Cup 2023! Hats off to their resilience and spirit! ???? The remarkable odyssey of Asia Cup 2023! Hats off to their resilience and spirit! ???? Product Links : PS - My channel is dedicated to my much beloved n most missed Father - Mr. Kulwant Singh. He was, is and will always be in my heart to heal it whenever it gets hurt. He's living this life through me. Launch of Gujarat Election Campaign in Ahmedabad. This video is an intellectual property belonging to the Indian National Congress. Please seek prior permission before using any part of this video in any form. Follow Indian National Congress! Are you tired of letting anger get the best of you? In this insightful video, join Sakshi Shree as he shares powerful techniques to help you master your anger and maintain emotional balance. ???? Whether it's at work, in relationships, or dealing with life's challenges, these practical tips will empower you to stay calm and composed. Don't let anger control you – take charge of your emotions starting today! ???? Remember to like, share, and subscribe for more valuable insights on personal growth and emotional empowerment. Let's embark on this journey to a happier and more peaceful you together! संबुद्ध सद्गुरु साक्षी श्री आपके जीवन की प्रमुख समस्याओं को बिना बताए स्वयं ही लिख देते हैं और फिर उसका अत्यंत प्रभावशाली समाधान भी उपलब्ध करा देते हैं। इसे स्वयं साक्षात अनुभव करने के लिए आप सादर आमंत्रित हैं। इस जीवन रूपांतरकारी भेंट का लाभ उठाने के लिए आप जो महत्वपूर्ण सहयोग राशि देते हैं, वह मलिन बस्तियों के अभावग्रस्त बच्चों की बुनियादी शिक्षा, आश्रय व पोषण के कार्य में उपयोग के लिए सीधे झुग्गी झोपड़ी शिक्षा सेवा समिति के खाते में जाती है। इस प्रकार आपकी सहयोग राशि सच्चे अर्थों में सेवा बन जाती है। साक्षी श्री फेसबुक से जुड़ें: साक्षी श्री इंस्टाग्राम से जुड़ें: हमारी वेबसाइट: Attend our video training workshops to know this science of Nature Cure fully and get rid of all your diseases in a natural way without taking any medicines : ????Attend our Sunday free Live training session held on each Sunday. - Attend our 4 days Residential camp (NLS Graduate Course - Be your own Doctor) which takes place mainly in Delhi and the details of which can be obtained from contact no. 9870291634/5/6. ???? ठंडी पेट की पट्टी खरीदें - Purchase Abdominal Wet pack through this link : ???? ऐनिमा किट खरीदें – Purchase Enema Kit through this link : Read our books which are also available online under the following link. Today Express 24X7 provides comprehensive up-to-date coverage of the Breaking News, Politics, Latest News, Entertainment News, Business News, and Sports News. Stay tuned for all the News in Hindi. Today Express 24X7 पर आप ट्रेंडिंग न्यूज, राजनीति, मनोरंजन, बॉलीवुड, बिजनेस, क्रिकेट और अन्य खेलों की लेटेस्ट खबरों के साथ-साथ विस्तृत विश्लेषण पा सकते हैं। We do NOT own the video materials and all credits belong to respectful owner. In case of copyright issues, please contact us immediately for further credit or clip delete. Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, commenting, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favour of fair use. Contact Us for Copyright Related issues, Credit addition and deletion: बढ़ता मोटापा...बड़ी समस्या.. क्या आप भी हैं मोटापे से परेशान? कैसे करें वज़न कंट्रोल? Khabar Fast News Channel: खबर फास्ट भारत का हिंदी न्यूज चैनल है । खबर फास्ट चैनल हरियाणा, हिमाचल प्रदेश, पंजाब, राजस्थान, उत्तर प्रदेश और हर एक राज्य से जुड़ी खबर से रुबरु कराता है । ख़बर फास्ट न्यूज चैनल राजनीति, मनोरंजन, बॉलीवुड, व्यापार और खेल में नवीनतम समाचारों को शामिल करता है। खबर फास्ट चैनल की लाइव खबरें एवं ताजा ब्रेकिंग अपडेट न्यूज, प्रोग्राम के लिए बने रहिए- टीवी चैनल्स, सोशल मीडिया (YOUTUBE, FACEBOOK, INSTAGRAM,TWITTER AND WEBSITE) Khabar Fast is the Hindi news channel of India. Khabar Fast Channel deals with news related to Haryana, Himachal Pradesh, Punjab, Rajasthan, Uttar Pradesh and every state. The Khabar Fast News channel covers the latest news in politics, entertainment, Bollywood, business and sports. Khabar Fast Channel Live news and latest breaking news, stay tuned for the program - TV channels, social media (YOUTUBE, FACEBOOK, INSTAGRAM, TWITTER AND WEBSITE) आप भी हैं मोटापे के शिकार ? Khabar Fast News Channel: खबर फास्ट भारत का हिंदी न्यूज चैनल है । खबर फास्ट चैनल हरियाणा, हिमाचल प्रदेश, पंजाब, राजस्थान, उत्तर प्रदेश और हर एक राज्य से जुड़ी खबर से रुबरु कराता है । ख़बर फास्ट न्यूज चैनल राजनीति, मनोरंजन, बॉलीवुड, व्यापार और खेल में नवीनतम समाचारों को शामिल करता है। खबर फास्ट चैनल की लाइव खबरें एवं ताजा ब्रेकिंग अपडेट न्यूज, प्रोग्राम के लिए बने रहिए- टीवी चैनल्स, सोशल मीडिया (YOUTUBE, FACEBOOK, INSTAGRAM,TWITTER AND WEBSITE) Khabar Fast is the Hindi news channel of India. Khabar Fast Channel deals with news related to Haryana, Himachal Pradesh, Punjab, Rajasthan, Uttar Pradesh and every state. The Khabar Fast News channel covers the latest news in politics, entertainment, Bollywood, business and sports. Khabar Fast Channel Live news and latest breaking news, stay tuned for the program - TV channels, social media (YOUTUBE, FACEBOOK, INSTAGRAM, TWITTER AND WEBSITE) The next tentative schedule of the next 4- Days Camp is : Link for registration of the Nature Cure Health Workshop : Mr. Dinesh Vijay shared his wonderful experience after attending 4 days camp. He had been suffering from cough and cold for the past 40 years. He used to cough around 100-150 times a day making it difficult for him to attend any meeting or conference. He tried various allopathic and ayurvedic medicines. He was also overweight. After attending the camp, he witnessed the following results: 1. His cough had improved by 95% within 4 days. 2. Lost 4 Kg in 3 days only. 3. Felt active and energetic. 4. Recovered from frequent urination. Watch the full video to know more about his wonderful transformation. For any additional information please feel free to reach us below: To know more about us visit our official website : Connect with us on other Social Media platforms : Before adopting this Natural Lifestyle you can learn it thoroughly in the following ways : 1) Attend our upcoming video training workshops to know in detail about the science of nature cure which aims to cure all diseases. Subscribe to our channel to get notifications about the same and register for our next session via the link given below: അമിതഭാരം പലതരത്തിൽ ആരോഗ്യപ്രശ്നങ്ങള് ഉണ്ടാക്കുമെന്ന് അറിയാമല്ലോ. എന്നാല് കിഡ്നിയെ ബാധിക്കുന്ന അര്ബുദം വരെ അമിതഭാരം മൂലം ഉണ്ടാകാം എന്നറിയാമോ? Renal Cell Carcinoma (RCC) എന്ന കാൻസറാണ് അമിതവണ്ണം മൂലം ഉണ്ടാകാന് സാധ്യത ഉണ്ടെന്നു ഡോക്ടർമാര് സൂചിപ്പിക്കുന്നത്. Link for registration of the Nature Cure Health Workshop : Our beloved patient from Moti Nagar who has been with us from past 4 months and since then she has been following Natural Life Style diet plan due to which she has tremendously lost 12 kg in just 3 months and also get recovered from her chronic knee pain. Watch the full video to know the diet plan followed by her and understand the importance of Natural science as shared by her. For any additional information please feel free to reach us below: To know more about us visit our official website : Connect with us on other Social Media platforms : Before adopting this Natural Lifestyle you can learn it thoroughly in the following ways : 1) Attend our upcoming video training workshops to know in detail about the science of nature cure which aims to cure all diseases. Subscribe to our channel to get notifications about the same and register for our next session via the link given below: 2) Watch more videos in this channel especially the science of naturopathy through the following link : 3) Read our books which are also available online under the following link. In this video Dr. Shehzad Ali talks about a healthy diet for obesity. To Get Health & Beauty Tips Subscribe To Pragya Wellness Tv : Like Our Facebook Page:
english
package io.renren.util; import java.text.MessageFormat; import java.util.regex.Matcher; import java.util.regex.Pattern; import io.renren.utils.RRException; public class MessageFormatUtil { public static String format(String msg,Object[] arry){ return MessageFormat.format(msg, arry); } public static int getParameterNo(String str){ String regEx ="\\{\\d+\\}"; Pattern pat = Pattern.compile(regEx); Matcher mat = pat.matcher(str); int count=0; while(mat.find()){ count++; } for(int i=0 ;i<count;i++){ if(!str.contains("{"+i+"}")){ throw new RRException("模版表达式错误:缺少{"+i+"}"); } } return count; } public static void main(String[] args) { System.out.println(format("abcde{0}hjk",new Object []{"!","@"})); } }
java
--- title: "Requery Method | Microsoft Docs" ms.prod: sql ms.prod_service: connectivity ms.component: "ado" ms.technology: connectivity ms.custom: "" ms.date: "01/19/2017" ms.reviewer: "" ms.suite: "sql" ms.tgt_pltfrm: "" ms.topic: conceptual apitype: "COM" f1_keywords: - "Recordset15::Requery" - "Recordset15::raw_Requery" helpviewer_keywords: - "Requery method [ADO]" ms.assetid: d81ab76f-1aa8-4ccf-92ec-b65254dc3ea1 caps.latest.revision: 14 author: MightyPen ms.author: genemi manager: craigg --- # Requery Method Updates the data in a [Recordset](../../../ado/reference/ado-api/recordset-object-ado.md) object by re-executing the query on which the object is based. ## Syntax ``` recordset.Requery Options ``` #### Parameters *Options* Optional. A bitmask that contains [ExecuteOptionEnum](../../../ado/reference/ado-api/executeoptionenum.md) and [CommandTypeEnum](../../../ado/reference/ado-api/commandtypeenum.md) values affecting this operation. > [!NOTE] > If *Options* is set to **adAsyncExecute**, this operation will execute asynchronously and a [RecordsetChangeComplete](../../../ado/reference/ado-api/willchangerecordset-and-recordsetchangecomplete-events-ado.md) event will be issued when it concludes. The **ExecuteOpenEnum** values of **adExecuteNoRecords** or **adExecuteStream** should not be used with **Requery**. ## Remarks Use the **Requery** method to refresh the entire contents of a **Recordset** object from the data source by reissuing the original command and retrieving the data a second time. Calling this method is equivalent to calling the [Close](../../../ado/reference/ado-api/close-method-ado.md) and [Open](../../../ado/reference/ado-api/open-method-ado-recordset.md) methods in succession. If you are editing the current record or adding a new record, an error occurs. While the **Recordset** object is open, the properties that define the nature of the cursor ([CursorType](../../../ado/reference/ado-api/cursortype-property-ado.md), [LockType](../../../ado/reference/ado-api/locktype-property-ado.md), [MaxRecords](../../../ado/reference/ado-api/maxrecords-property-ado.md), and so forth) are read-only. Thus, the **Requery** method can only refresh the current cursor. To change any of the cursor properties and view the results, you must use the [Close](../../../ado/reference/ado-api/close-method-ado.md) method so that the properties become read/write again. You can then change the property settings and call the [Open](../../../ado/reference/ado-api/open-method-ado-recordset.md) method to reopen the cursor. ## Applies To [Recordset Object (ADO)](../../../ado/reference/ado-api/recordset-object-ado.md) ## See Also [Execute, Requery, and Clear Methods Example (VB)](../../../ado/reference/ado-api/execute-requery-and-clear-methods-example-vb.md) [Execute, Requery, and Clear Methods Example (VBScript)](../../../ado/reference/ado-api/execute-requery-and-clear-methods-example-vbscript.md) [Execute, Requery, and Clear Methods Example (VC++)](../../../ado/reference/ado-api/execute-requery-and-clear-methods-example-vc.md) [CommandText Property (ADO)](../../../ado/reference/ado-api/commandtext-property-ado.md)
markdown
The former Australian captain and vice-captain David Warner were both suspended for 12 months for their role in the ball tampering incident in Cape Town in March this year during the Test series against South Africa. Opening batsman Cameron Bancroft was also banned for nine months. In the aftermath of the scandal, Smith was subjected to a lot of ridicule and was widely criticised as his team used unfair means to get an advantage over their opponents. The former Australia captain, addressing the media after returning from South Africa, had broken down while speaking about his family and the pain he must have caused them due to his involvement in the biggest scandal to hit the sport in a long time. “To see the way my old man’s been…it hurts. I just want to say I’m sorry for the pain that I’ve brought to Australia and the fans and the public, it’s devastating and I’m truly sorry,” a gutted Smith had said. Smith, who was once being touted as the next Don Bradman, also faced humiliating scenes after the scandal rocked Australia as he had to face boos and cries of “cheat” while making his way through Johannesburg airport. The tainted cricketer was surrounded by many security officials who were seen holding Smith’s arms. Smith was charged with knowledge of a potential plan “to attempt to artificially alter the condition of the ball” but Warner was charged with developing the plan. Both Smith and Warner were also banned from playing the Indian Premier League (IPL) 2018. While Warner, who was the vice-captain of the Australian team, will not be considered ever for the leadership role of the national team, Smith and Cameron Bancroft would not be picked for captaincy until a minimum of 12 months after the end of their suspensions, Cricket Australia (CA) said in a statement.
english
--- title: "lacework query" slug: lacework_query hide_title: true --- ## lacework query Run and manage queries ### Synopsis Run and manage Lacework Query Language (LQL) queries. To provide customizable specification of datasets, Lacework provides the Lacework Query Language (LQL). LQL is a human-readable text syntax for specifying selection, filtering, and manipulation of data. Currently, Lacework has introduced LQL for configuration of AWS CloudTrail policies and queries. This means you can use LQL to customize AWS CloudTrail policies only. For all other policies, use the previous existing methods. Lacework ships a set of default LQL queries that are available in your account. For more information about LQL, visit: https://docs.lacework.com/lql-overview To view all LQL queries in your Lacework account. lacework query ls To show a query. lacework query show <query_id> To execute a query. lacework query run <query_id> **NOTE: LQL syntax may change.** ### Options ``` -h, --help help for query ``` ### Options inherited from parent commands ``` -a, --account string account subdomain of URL (i.e. <ACCOUNT>.lacework.net) -k, --api_key string access key id -s, --api_secret string secret access key --api_token string access token (replaces the use of api_key and api_secret) --debug turn on debug logging --json switch commands output from human-readable to json format --nocache turn off caching --nocolor turn off colors --noninteractive turn off interactive mode (disable spinners, prompts, etc.) --organization access organization level data sets (org admins only) -p, --profile string switch between profiles configured at ~/.lacework.toml --subaccount string sub-account name inside your organization (org admins only) ``` ### SEE ALSO * [lacework](lacework.md) - A tool to manage the Lacework cloud security platform. * [lacework query create](lacework_query_create.md) - Create a query * [lacework query delete](lacework_query_delete.md) - Delete a query * [lacework query list](lacework_query_list.md) - List queries * [lacework query list-sources](lacework_query_list-sources.md) - List Lacework query data sources * [lacework query run](lacework_query_run.md) - Run a query * [lacework query show](lacework_query_show.md) - Show a query * [lacework query show-source](lacework_query_show-source.md) - Show Lacework query data source * [lacework query update](lacework_query_update.md) - Update a query * [lacework query validate](lacework_query_validate.md) - Validate a query
markdown
// Unit Tests for Scintilla internal data structures #include <cstring> #include <algorithm> #include "Platform.h" #include "UnicodeFromUTF8.h" #include "catch.hpp" // Test UnicodeFromUTF8. // Use examples from Wikipedia: // http://en.wikipedia.org/wiki/UTF-8 TEST_CASE("UnicodeFromUTF8") { SECTION("ASCII") { const unsigned char s[]={'a', 0}; REQUIRE(UnicodeFromUTF8(s) == 'a'); } SECTION("Example1") { const unsigned char s[]={0x24, 0}; REQUIRE(UnicodeFromUTF8(s) == 0x24); } SECTION("Example2") { const unsigned char s[]={0xC2, 0xA2, 0}; REQUIRE(UnicodeFromUTF8(s) == 0xA2); } SECTION("Example3") { const unsigned char s[]={0xE2, 0x82, 0xAC, 0}; REQUIRE(UnicodeFromUTF8(s) == 0x20AC); } SECTION("Example4") { const unsigned char s[]={0xF0, 0x90, 0x8D, 0x88, 0}; REQUIRE(UnicodeFromUTF8(s) == 0x10348); } }
cpp
<reponame>whyisyoung/CADE """ mask_exp_by_approximation.py ~~~~~~~ Functions for mask explanation: why a sample is an drifting (approximation-based exp only). exp = x * mask Only use the target x to solve the mask, didn't use the x + noise (as the perturbation might not be a good choice). """ import os, sys os.environ['PYTHONHASHSEED'] = '0' os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" # so the IDs match nvidia-smi os.environ["CUDA_VISIBLE_DEVICES"] = '0' from numpy.random import seed import random random.seed(1) seed(1) from tensorflow import set_random_seed set_random_seed(2) from keras import backend as K import tensorflow as tf K.tensorflow_backend._get_available_gpus() config = tf.ConfigProto() # allocate as-needed config.gpu_options.allow_growth = True # only allow a total of half the GPU memory to be allocated config.gpu_options.per_process_gpu_memory_fraction = 0.5 # create a session with the above options specified K.tensorflow_backend.set_session(tf.Session(config=config)) import sys import logging import numpy as np import tensorflow as tf from keras.losses import binary_crossentropy from sklearn.metrics import accuracy_score import warnings warnings.filterwarnings('ignore') class OptimizeExp(object): def __init__(self, input_shape, mask_shape, model, num_class, optimizer, initializer, lr, regularizer, model_file): ''' Args: input_shape: the input shape for an input image mask_shape: the shape of the mask model: the target model we want to explain num_class: number of distinct labels in the target model optimizer: tf.train.Optimizer() object initializer: initializer for the mask lr: learning rate regularizer: add regularization for the mask (to keep it as small as possible) ''' self.model = model self.num_class = num_class self.lambda_1 = tf.placeholder(tf.float32) # placeholder is similar to cin of C++ self.optimizer = optimizer(lr) self.initializer = initializer self.regularizer = regularizer self.build_opt_func(input_shape, mask_shape) self.model_file = model_file @staticmethod def elasticnet_loss(tensor): loss_l1 = tf.reduce_sum(tf.abs(tensor)) loss_l2 = tf.sqrt(tf.reduce_sum(tf.square(tensor))) return loss_l1 + loss_l2 def build_opt_func(self, input_shape, mask_shape): # use tf.variable_scope and tf.get_variable() to achieve "variable sharing" # AUTO_REUSE: we create variables if they do not exist, and return them otherwise with tf.variable_scope('mask', reuse=tf.AUTO_REUSE): self.mask = tf.get_variable('mask', shape=mask_shape, initializer=self.initializer) self.mask_reshaped = self.mask self.mask_normalized = tf.minimum(1.0, tf.maximum(self.mask_reshaped, 0.0)) # get_input_at(node_index): Retrieves the input tensor(s) of a layer at a given node. node_index = 0 corresponds to the first time the layer was called. self.input = self.model.get_input_at(0) self.x_exp = self.input * self.mask_normalized # + self.fused_image * reverse_mask # the explanation we are looking for, which contributes the most to the final prediction reverse_mask = tf.ones_like(self.mask_normalized) - self.mask_normalized self.x_remain = self.input * reverse_mask # + self.fused_image * self.mask_normalized ''' because it's symbolic tensor with no actual value, so can't use model.predict() see: https://stackoverflow.com/questions/51515253/optimizing-a-function-involving-tf-kerass-model-predict-using-tensorflow-op ''' self.output_exp = self.model(self.x_exp) # self.x_exp is the input to the self.model self.output_remain = self.model(self.x_remain) self.y_target = tf.placeholder(tf.float32, shape=(None, self.num_class)) self.loss_exp = tf.reduce_mean(binary_crossentropy(self.y_target, self.output_exp)) self.loss_remain = tf.reduce_mean(binary_crossentropy(self.y_target, self.output_remain)) if self.regularizer == 'l1': self.loss_reg_mask = tf.reduce_sum(tf.abs(self.mask_reshaped)) elif self.regularizer == 'elasticnet': self.loss_reg_mask = self.elasticnet_loss(self.mask_reshaped) # minimize mask elif self.regularizer == 'l2': self.loss_reg_mask = tf.sqrt(tf.reduce_sum(tf.square(self.mask_reshaped))) else: self.loss_reg_mask = tf.constant(0) self.loss = self.loss_exp - self.loss_remain + self.lambda_1 * self.loss_reg_mask # trainable variable self.var_train = tf.trainable_variables(scope='mask') # only one trainable variable: mask/mask: 0 # training function with tf.variable_scope('opt', reuse=tf.AUTO_REUSE): self.train_op = self.optimizer.minimize(self.loss, var_list=self.var_train) def fit_local(self, X, y, epochs, lambda_1, display_interval=10, exp_acc_lowerbound=0.8, iteration_thredshold=1e-4, lambda_patience=100, lambda_multiplier=1.5, early_stop_patience=10): """ explain a local prediction. Arguments: X {numpy array} -- A single image from the input. y {numpy vector} -- the probabilities of each label for X. epochs {int} -- [training epochs] lambda_1 {int} -- hyper parameter Keyword Arguments: display_interval {int} -- [display the loss values periodically] (default: {10}) exp_acc_lowerbound {float} -- [the lowerbound of the accuracy by using only explanation part as features] (default: {0.8}) iteration_thredshold {float} -- [if loss - loss_prev < threshold, early_stop + 1] (default: {1e-4}) lambda_patience {int} -- [to work with lambda_up_counter or lambda_down_counter] (default: {100}) lambda_multiplier {float} -- [if achieved lambda_patience, then increase/decrease lambda] (default: {1.5}) early_stop_patience {int} -- [if loss didn't change much for X epoches, then stop] (default: {10}) Returns: [numpy array] -- [the best mask we can found] """ input_ = np.expand_dims(X, axis=0).reshape(1, -1) logging.debug(f'input_ shape: {input_.shape}') if len(y.shape) == 1: y = np.expand_dims(y, axis=0) logging.debug(f'y shape: {y.shape}') loss_best = float('inf') loss_last = float('inf') loss_sparse_mask_best = float('inf') loss_sparse_mask_last = float('inf') mask_best = None early_stop_counter = 0 lambda_up_counter = 0 lambda_down_counter = 0 # start training... with tf.Session() as sess: # WARNING: it has to be like this, or the weights of the model could not be really loaded. sess.run(self.mask.initializer) sess.run(tf.variables_initializer(self.optimizer.variables())) sess.run(tf.initializers.global_variables()) # same as tf.global_variables_initializer() for step in range(epochs): feed_dict = {self.input: input_, self.y_target: y, self.lambda_1: lambda_1} ''' debugging with tensorboard ''' # logging.debug('debugging*******************') # writer = tf.summary.FileWriter("/tmp/mnist/", self.sess.graph) sess.run(self.train_op, feed_dict) self.model.load_weights(self.model_file, by_name=True) self.output_exp = self.model(self.x_exp) # logging.debug('current weights: ', self.model.get_layer('encoder_0').get_weights()[0][0][:5]) ''' debugging if the weights of the target model are correctly loaded ''' # x_exp_value = sess.run(self.x_exp, feed_dict) # expected_exp = self.model.predict(x_exp_value) pred_exp = sess.run([self.output_exp], feed_dict)[0] [loss, loss_sparse_mask] = sess.run([self.loss, self.loss_reg_mask], feed_dict) acc_2 = accuracy_score(np.argmax(y, axis=1), np.argmax(pred_exp, axis=1)) # check cost modification if acc_2 >= exp_acc_lowerbound: lambda_up_counter += 1 if lambda_up_counter >= lambda_patience: lambda_1 = lambda_1 * lambda_multiplier lambda_up_counter = 0 logging.debug('Updating lambda1 to %.8f to %.8f'% (self.lambda_1)) else: lambda_down_counter += 1 if lambda_down_counter >= lambda_patience: lambda_1 = lambda_1 / lambda_multiplier lambda_down_counter = 0 logging.debug('Updating lambda1 to %.8f to %.8f'% (self.lambda_1)) if (np.abs(loss - loss_last) < iteration_thredshold) or \ (np.abs(loss_sparse_mask - loss_sparse_mask_last) < iteration_thredshold): early_stop_counter += 1 if (acc_2 > exp_acc_lowerbound) and (early_stop_counter >= early_stop_patience): logging.info('Reach the threshold and stop training at iteration %d/%d.' % (step+1, epochs)) mask_best = sess.run([self.mask_normalized])[0] break loss_last = loss loss_sparse_mask_last = loss_sparse_mask if (step+1) % display_interval == 0: mask = sess.run(self.mask) if np.isnan(mask).any(): mask[np.isnan(mask)] = 1e-16 sess.run(self.mask.assign(mask)) feed_dict = {self.input: input_, self.y_target: y, self.lambda_1: lambda_1} [pred_remain, pred_exp] = sess.run([self.output_remain, self.output_exp], feed_dict) [loss, loss_exp, loss_remain, loss_sparse_mask] = \ sess.run([self.loss, self.loss_exp, self.loss_remain, self.loss_reg_mask], feed_dict) acc_1 = accuracy_score(np.argmax(y, axis=1), np.argmax(pred_remain, axis=1)) acc_2 = accuracy_score(np.argmax(y, axis=1), np.argmax(pred_exp, axis=1)) # loss_sparse_mask: minimize mask if loss_best > loss or loss_sparse_mask_best > loss_sparse_mask: logging.debug(f'updating best loss from {loss_best} to {loss}') logging.debug(f'updating best sparse mask loss from {loss_sparse_mask_best} to {loss_sparse_mask}') logging.debug("Epoch %d/%d: loss = %.5f explanation_loss = %.5f remain_loss = %.5f " "mask_sparse_loss = %.5f acc_remain = %.5f acc_exp = %.5f" % (step+1, epochs, loss, loss_exp, loss_remain, loss_sparse_mask, acc_1, acc_2)) loss_best = loss loss_sparse_mask_best = loss_sparse_mask mask_best = sess.run([self.mask_normalized])[0] if mask_best is None: logging.info(f'did NOT find the best mask') return mask_best
python
With Cheltenham now just three days away, Irish punters admit to faking a fondness for Champagne, flashing cash and wearing flat caps at Cheltenham, Paddy Power reveals. Around 30 per cent of punters are more likely to carry cash instead of a card on race days.Read more: With Cheltenham now just three days away, Irish punters admit to faking a fondness for Champagne, flashing cash and wearing flat caps at Cheltenham, Paddy Power reveals.Almost a fifth, 19 per cent, admitted that while they wouldn’t touch the stuff under normal circumstances, they regularly swig prosecco or champagne when they go racing. More than one in 10, 11 per cent, sup pints of the black stuff when they wouldn’t usually opt for Guinness in their boozer. Around 30 per cent of punters are more likely to carry cash instead of a card on race days. And 13 per cent of racing fans said they wear a flat cap to the races. While the Peaky Blinders-inspired trend may be mostly associated with UK fans, it turns out that eight per cent of Irish punters wear tweed at the track. Most Irish punters, 41 per cent, rely on their knowledge of a well-known jockey when it comes to placing their bets and 38 per cent go on the name of a horse. Just eight per cent will go on how the horse looks, while seven per cent make their selection based on the number of the horse. And six per cent place their bets based on the colour of the jockeys’ silks. A spokesperson for Paddy Power said: “I’m a firm believer in faking it until you make it, but these findings show that horse racing fans take it to a whole other level.
english
Why you can trust TechRadar We spend hours testing every product or service we review, so you can be sure you’re buying the best. Find out more about how we test. Despite offering some of the most compact ultraportables on the market, the Samsung P50 (£949 ex. VAT) presents a larger option for the mobile business user. Although not the largest laptop we've seen (it weighs in at 2.8kg), mobility is far from that offered by the Sony, but remains adequate for short journeys. Chassis strength is good throughout, providing reliable stability. The trade-off is the use of a larger 15-inch TFT screen. Clarity and colour reproduction are strong. Unfortunately, its low 1024 x 768-pixel (XGA) resolution is poor and unsuitable for business use, as spreadsheets will quickly fill the screen. Usability is more pleasing. The quality of the 300mm keyboard is excellent and ideal for working on the move. The touchpad and mouse buttons are equally usable, and a biometric fingerprint reader is located on the right of the chassis to add security. Where the P50 excels is in performance and battery life. An Intel Core Duo T2500 processor running at 2GHz, and 1024MB of DDR2 memory allowed the system to score 241 points from MobileMark tests. Providing mobile usability, the Samsung ran for 312 minutes under test conditions, so you can get more than five hours of use out of it - ideal for a business audience. An 80GB hard disk spinning at 5400rpm and a dual-format recordable DVD drive supporting dual-layer discs, mean users can burn up to 8.5GB to a single disc. Perfect for large quantities of data or multimedia files, storage is effective but again bettered by the Sony. Multimedia use takes a backseat. Sourcing graphics from the integrated Intel 945GM chip, a score of just 1503 points from 3DMark 2003 tests is adequate for presentations and business use. However, DVD use is unhindered for watching movies. Essential for business, maximum connectivity is provided. Gigabit Ethernet and an 802.11a/b/g Wi-Fi card allow for high-speed data transfers wherever you roam. Bluetooth and Infrared connectivity allow users to sync the laptop with external peripherals with ease. Tech.co.uk was the former name of TechRadar.com. Its staff were at the forefront of the digital publishing revolution, and spearheaded the move to bring consumer technology journalism to its natural home – online. Many of the current TechRadar staff started life a Tech.co.uk staff writer, covering everything from the emerging smartphone market to the evolving market of personal computers. Think of it as the building blocks of the TechRadar you love today.
english
Bengaluru: Former Chief Minister S. M. Krishna has been selected for the 2018 Kengal Hanumanthaiah Samskriti Endowment Award. At a meeting chaired by Kannada Sahitya Parishat President Manu Baligar recently, S. M. Krishna was selected for the award. The selection committee also picked journalist H. B. Madanagowda for the 2019 Nagadikere Kittappagowda Rukmini Endowment award. While Kengal Hanumanthaiah award carries a cash award of Rs. 25,000, the other award carries a cash award of Rs. 10,000, said Kannada Sahitya Parishat Secretary V. H. Chennagowda.
english
{"deprecated": "false", "authority-code": "TWP", "identifier": "TWP", "about": "http://publications.europa.eu/resource/authority/language/TWP", "prefLabel": {"@lang": "twp", "#text": "ere"}, "start.use": "1950-05-09"}
json
<gh_stars>1-10 vti_encoding:SR|utf8-nl vti_timelastmodified:TR|02 Oct 2017 19:28:20 -0000 vti_extenderversion:SR|12.0.0.0 vti_author:SR|SIMONSVOSS\\rotts vti_modifiedby:SR|SIMONSVOSS\\rotts vti_timecreated:TR|30 Sep 2017 21:44:10 -0000 vti_title:SR|Event Messenger - Create Unlocking Event vti_backlinkinfo:VX| vti_nexttolasttimemodified:TW|02 Oct 2017 11:38:24 -0000 vti_cacheddtm:TX|02 Oct 2017 19:28:20 -0000 vti_filesize:IR|1610 vti_cachedtitle:SR|Event Messenger - Create Unlocking Event vti_cachedbodystyle:SR|<body> vti_cachedlinkinfo:VX|S|img20.jpg S|img19.jpg vti_cachedsvcrellinks:VX|FSUS|img20.jpg FSUS|img19.jpg vti_cachedneedsrewrite:BR|false vti_cachedhasbots:BR|false vti_cachedhastheme:BR|false vti_cachedhasborder:BR|false vti_metatags:VR|HTTP-EQUIV=Content-Language de HTTP-EQUIV=Content-Type text/html;\\ charset=utf-8 vti_charset:SR|utf-8 vti_language:SR|de
html
<reponame>connorads/mobx require("mobx-react-lite/batchingForReactDom")
javascript
<filename>bucket/heu-kms-activator.json<gh_stars>0 { "version": "24.6.3", "description": "HEU KMS Activator, maintained by zbezj(知彼而知己).", "homepage": "https://github.com/zbezj/HEU_KMS_Activator", "license": { "identifier": "Freeware" }, "notes": [ "Author: zbezj, WeChat Official Accounts: HEU168", "Do not use for commercial purposes, personal users are also limited to research, communication use, must be deleted within 24 hours, the use of genuine Windows and Office should be purchased from the regular channels." ], "url": "https://github.com/zbezj/HEU_KMS_Activator/releases/download/24.6.3/HEU_KMS_Activator_v24.6.3.HEU168.zip#dl.zip_", "hash": "92cc2faefc259ff9991eb9783a2b85828ca2417e9d04afef65695b2680c1f4d8", "pre_install": [ "$7z=(Get-ChildItem $dir\\HEU_KMS_Activator_$version*).Name", "7z x -pHEU168 $dir\\$7z $('-o' + $dir) | Out-Null", "Rename-Item \"$dir\\HEU_KMS_Activator_v*.exe\" \"HEU_KMS_Activator.exe\" -Force", "Remove-Item \"$dir\\*dl.zip_\" -Force -ErrorAction SilentlyContinue" ], "bin": "HEU_KMS_Activator.exe", "shortcuts": [ [ "HEU_KMS_Activator.exe", "HEU KMS Activator" ] ], "checkver": { "url": "https://api.github.com/repos/zbezj/HEU_KMS_Activator/releases", "regex": "(?sm)browser_download_url.*?releases/download/([\\d.]+)/(?<file>HEU_KMS_Activator.*?\\.zip)" }, "autoupdate": { "url": "https://github.com/zbezj/HEU_KMS_Activator/releases/download/$version/$matchFile#dl.zip_" } }
json
{"appid": 406410, "name": "Minigolf VR", "windows": true, "mac": false, "linux": false, "early_access": true, "lookup_time": 1490987592}
json
Music is such a sanct, personal, pure thing. It goes far beyond songs and earphones and iPods and phones. Am I right or am I right? These 3 earphone accessories will not make you want to sell your kidneys like these will. Been a while since you had a heart-to-heart with your earphones? After this, your earphones will love you more than ever. If you’ve not heard about Comply yet, your earphones have been sleeping every night without a pillow. Why you do this? This USA based brand is known globally to enhance your music listening experience multifold with superior sound isolation, great comfort and in-ear retention. More than 75 earphone brands suggest these Comply foam tips to improve your listening experience. Comply calls this the “Sound of Science. ” With the use of memory foam technology, the tips take the shape of your ear canal entirely depending upon your body temperature. This gives a dynamic fit and makes the sound so much better for you. Comply tips are 30x softer than silicone eartips so it goes without saying that they’ll be super comfortable. Your ears will hear every detail amplified since these Comply eartips go deep into your ear canal. They also come with optional built-in filters to protect your earphones from unhygienic ear wax or sweat. These tips also come in multiple core sizes to be compatible with most earphones. Don’t forget to check the compatible core size before buying! You can also choose from Small, Medium and Large sizes based on your core size. In a world saturated with battery powered noise cancellation headphones that cost a bomb, Comply as an inexpensive & excellent way to achieve noise isolation. Starts at Rs. 699! Lacking intimacy in your relationship? Get closer than ever to your earphones with triple flange eartips. Triple flange eartips look like small mountains stacked on top of each other. These eartips are designed to improve your music listening experience remarkably. How does it work? Very simple, because it fits into your ear canal deeper than conventionally sized silicone tips, they are extremely good for noise isolation. All you gotta do is replace your existing ear tips with triple flange eartips to experience a new level of comfort. You can stop worrying about them falling down while you are running or doing any kind of exercise. These are easily the best option for isolation after Comply Foam eartips. What are you waiting for? Ditch those old eartips and get the replacement your earphones have been silently wanting. Want your earphones to stop stumbling out again and again? Earhooks to the rescue. Earhooks is a very simple product – it rests easily behind your ears, giving you the security every earphone demands. Earhooks are great especially if you are using them with in-ear monitors. They are made for people with active lifestyle, for professionals or even casual users. These earhooks are adjustable so that if you have extremely big ears or even tiny ears, you can effortlessly use them and mould them over your ear. Your earphones will have never fit so securely before. A great convertor for regular wired IEMs, these inexpensive ear hooks will easily make your music listening experience more enjoyable. What did your earphones ever do to you to deserve such frustration and unapologetic behaviour? The most distinct way to keep your earphones from tangling is by using the simple SmartWrap. SmartWrap is the cord manager you never thought you’d need. They are a dapper accessory for your ever tangling pair of earphones. This increases the life of your earphones by keeping them safe and sound. They are simple and modern looking, definitely adding to your style statement. The SmartWrap is available in numerous charming colours. They are not rough on your pocket. Using them is definitely not rocket science. If nothing else, getting the SmartWrap should give you a quiet “thank you” from your favourite pair of earphones.
english
package printer import ( "encoding/json" "fmt" "github.com/neko-neko/utmpdump/utmp" ) // TSV printer type JsonPrinter struct{} // Format TSV func (t *JsonPrinter) Print(u *utmp.GoUtmp) { json, _ := json.Marshal(u) fmt.Println(string(json)) }
go
<reponame>purush7/migrate package testing import ( "testing" ) func ExampleParallelTest(t *testing.T) { // nolint:govet var isReady = func(i Instance) bool { // Return true if Instance is ready to run tests. // Don't block here though. return true } // t is *testing.T coming from parent Test(t *testing.T) ParallelTest(t, []Version{{Image: "docker_image:9.6"}}, isReady, func(t *testing.T, i Instance) { // Run your test/s ... t.Fatal("...") }) }
go
<reponame>melferrer99/CITEHomeLearnersGuideWeb { "type": "service_account", "project_id": "cite-home-learner-s-guide", "private_key_id": "<KEY>", "private_key": "-----<KEY>", "client_email": "<EMAIL>", "client_id": "102515575598942772770", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-agm5p%40cite-home-learner-s-guide.iam.gserviceaccount.com" }
json
<reponame>jonathanlaflamme/blog<gh_stars>100-1000 var BaseController = require('./BaseController'); var HomeController = BaseController.extend(function(){ this.getIndex = function(req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World \n'); }; }); module.exports = HomeController;
javascript
{ "Lyrics": [ "\nAyy, ayy, ayy, ayy\n(DJ Swift on the Track)\nAyy, ayy, ayy, ayy, Kodak\n(Dubba AA Flex)\nGlee\n(It's-it's the sound)\n\n\nLook, every time you see me I'm surrounded by them snipers\nYou ain't never run off with a hustler in your life, huh?\nI'm from 1800, I'm a hot boy, but I'm iced up\nUgly corner where we smile with you and we don't like you\nJust hopped off the plane, I just got out about a day ago\nEverybody love me, when they see me they be like, \"There he go!\"\nGot me a new lady, we 'bout to take a trip to Mexico\nCrackas took my .40 so I'm 'bout to go buy a Draco\n\n\nAyy, Lil Kodak on the beat I got that bass, hoe\nAyy, boy, I drop that shit that they be waitin' for\nI like the Bimmer but I'm 'bout to go cop a Wraith tho'\nI done peeped your true colors, boy, you a rainbow\nI got Space Jams on my feet, I'm on the moon\nI'm really lit, so I ain't gotta use no auto-tune\nYeah, I'm the shit, but you know damn well I ain't number two\nI'm in this bih' around some niggas who ain't got nothin' to lose\nBut shawty got that head, she got that fire brain\nShe know I love the head, I love that migraine\nYou ain't never run off with a boss ain't ya?\nShe know a nigga be stuntin' like a Power Ranger\n\n\nEvery time you see me I'm surrounded by them snipers\nYou ain't never run off with a hustler in your life, huh?\nI'm from 1800, I'm a hot boy, but I'm iced up\nUgly corner where we smile with you and we don't like you\nJust hopped off the plane, I just got out about a day ago\nEverybody love me, when they see me they be like, \"There he go!\"\nGot me a new lady, we 'bout to take a trip to Mexico\nCrackas took my .40 so I'm 'bout to go buy a Draco\n\n\nThese ain't Ray-Bans, these Saint Laurent shades, ho\nThe way my niggas hit your block, you'd think it's Halo\nNo more home invadin' now, I'm on the radio\nI don't even like to fuck, I only want fellatio\nI done jumped out to that bag, baby, check my swag\nMoney fallin' out my ass, I got a lot of cash\nAyy, everybody runnin', nigga got a gun\nI ain't makin' beats but the Draco got a drum\nI don't wear no fuckin' Yeezys, I got too much sauce\nLike I don't believe in Jesus, how I triple cross\nI ain't even brush my teeth, but I'm on the block\nI ain't even brush my teeth, all I do is floss\n\n\nEvery time you see me I'm surrounded by them snipers\nYou ain't never run off with a hustler in your life, huh?\nI'm from 1800, I'm a hot boy, but I'm iced up\nUgly corner where we smile with you and we don't like you\nJust hopped off the plane, I just got out about a day ago\nEverybody love me, when they see me they be like, \"There he go!\"\nGot me a new lady, we 'bout to take a trip to Mexico\nCrackers took my 40 so I'm 'bout to go buy a Draco" ], "Release date": "December 6, 2016", "Title": "There He Go", "Artist": "<NAME>" }
json
After a first virtuoso teaser mounted upside down, The Underground Railroad offers itself a new trailer just as impressive. The first series by Barry Jenkins, director of the Oscar-winning film Moonlight, adapts the eponymous novel by Colson Whitehead, published in 2016 and honored with the Pulitzer Prize for fiction the following year, in 2017. Composed of ten episodes, the program follows the extraordinary journey of Cora, a slave in a cotton plantation in Georgia, abandoned by her mother who fled. When she learns about the Underground Railroad – which allowed many slaves to flee, helped by the abolitionists in particular – the young woman will finally touch freedom. Impossible to remain indifferent to the beauty and poetry of the images in the new trailer. For his series, Barry Jenkins finds the cinematographer James Laxton, who had also signed the photography of his two previous films, Moonlight and If Beale Street could speak. The Underground Railroad will mark the first appearance of South African Thuso Mbedu, who lends her features to Cora. She is surrounded by Joel Edgerton, Chase W. Dillon, Lily Rabe and Will Poulter.
english